/* Button and tab colors inherit pc.css tokens aligned with the mini-program's uni.scss. */
:root {
  --blue: #349ef5;
  --violet: #8055ed;
  --text: #252638;
  --muted: #727487;
  --page: #fff;
  --hover: #f7f6fc;
  --border: #eae9f1;
  --hero-blue: #e8f3ff;
  --hero-violet: #eeeaff;
  --header-glass: rgba(255,255,255,.96);
  --soft-shadow: 0 12px 40px rgba(67,55,126,.08);
  --shadow: 0 20px 70px rgba(43,36,81,.15);
  --radius-xl: 24px;
  --radius-btn: 12px;
  --font-base: 15px;
  --layout-width: 1200px;
  --page-gutter: 40px;
  --section-space: 88px;
  --header-height: 80px;
  --hero-title: 64px;
  --section-title: 38px;
  --gradient: linear-gradient(110deg,var(--blue),var(--primary) 68%,var(--violet));
}
html { scroll-padding-top: calc(var(--header-height) + var(--space-xl)); }
body { background: var(--page); -webkit-font-smoothing: antialiased; }
button,a,input,summary { -webkit-tap-highlight-color: transparent; }
button,input,textarea,summary { font: inherit; }
h1,h2,h3 { font-weight: 700; letter-spacing: -.035em; }
h1 { font-size: 42px; }
.workspace { margin-left: 0; min-width: 0; }
.page-container { width: min(100%,calc(var(--layout-width) + var(--page-gutter)*2)); padding: 56px var(--page-gutter) var(--section-space); margin: auto; min-height: 62vh; }
.site-header { height: var(--header-height); position: sticky; top: 0; background: var(--header-glass); border-bottom: 1px solid var(--border); z-index: 20; }
.header-inner { display: flex; align-items: center; height: 100%; max-width: 1440px; padding: 0 var(--page-gutter); margin: auto; gap: var(--space-xxl); }
.brand { padding: 0; gap: var(--space-md); flex: 0 0 auto; color: var(--text); font-size: 24px; letter-spacing: -.05em; }
.brand-symbol { background: var(--gradient); border-radius: var(--radius-lg); padding: var(--space-sm); }
.brand-symbol svg { fill: currentColor; stroke: none; }
.brand>span:last-child { display: inline; }
#navigation { display: flex; align-items: center; gap: var(--space-xl); margin: 0 auto 0 var(--space-xl); }
.nav-item { padding: var(--space-sm) 0; margin: 0; width: auto; white-space: nowrap; color: var(--text); border-radius: 0; }
.nav-item.active,.nav-item:hover { background: transparent; color: var(--primary); }
.nav-item.active { box-shadow: 0 2px 0 var(--primary); }
.header-actions,.account { display: flex; align-items: center; gap: var(--space-lg); min-width: 0; }
.account .button { white-space: nowrap; font-size: var(--font-base); min-height: 42px; padding: var(--space-md) var(--space-lg); }
.profile-link { display: flex; align-items: center; gap: var(--space-sm); max-width: 160px; overflow: hidden; white-space: nowrap; color: var(--text); }
.avatar { width: 32px; height: 32px; background: var(--primary-light); color: var(--primary); border-radius: 50%; display: grid; place-items: center; flex: 0 0 auto; }
.balance { white-space: nowrap; }
.site-header details { position: relative; }
.site-header summary { list-style: none; display: flex; align-items: center; justify-content: center; gap: var(--space-sm); cursor: pointer; min-height: 44px; color: var(--text); }
.site-header summary::-webkit-details-marker { display: none; }
.account-menu summary { font-size: var(--font-sm); }
.account-menu summary svg { width: 20px; }
.menu-content { position: absolute; right: 0; top: calc(100% + var(--space-lg)); width: 200px; padding: var(--space-sm); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow); background: var(--white); }
.menu-content a,.menu-content button { display: block; width: 100%; padding: var(--space-md) var(--space-lg); text-align: left; border: 0; background: transparent; color: var(--text); border-radius: var(--radius-md); }
.menu-content a:hover,.menu-content button:hover,.menu-content a[aria-current=page] { background: var(--primary-light); color: var(--primary); }
.mobile-menu { display: none; }
.button { background: var(--primary); border-color: transparent; min-height: 48px; padding: var(--space-md) var(--space-xl); font-weight: 600; transition: box-shadow .18s,filter .18s; }
.button:hover { box-shadow: var(--soft-shadow); filter: brightness(1.04); }
.button.secondary { background: var(--white); border-color: var(--border); color: var(--text); }
.button.secondary:hover { border-color: var(--primary); color: var(--primary); }
.gradient-text { background: var(--gradient); background-clip: text; -webkit-background-clip: text; color: transparent; }
body[data-page=home] .page-container { max-width: none; width: 100%; padding: 0 0 var(--section-space); }
.home-hero { background: radial-gradient(ellipse at 8% 30%,var(--hero-violet),transparent 56%),linear-gradient(135deg,var(--hero-blue),var(--white) 55%,var(--hero-violet)); text-align: center; padding: 74px var(--page-gutter) 40px; overflow: hidden; }
.hero-copy { max-width: var(--layout-width); margin: auto; }
.hero-copy h1 { font-size: var(--hero-title); line-height: 1.25; margin-bottom: var(--space-xl); font-weight: 800; }
.hero-copy p { color: var(--muted); font-size: 18px; margin: 0 0 var(--space-xxl); }
.hero-button { min-width: 220px; min-height: 56px; font-size: 18px; gap: var(--space-xl); }
.hero-button svg { width: 22px; height: 22px; }
.mobile-break { display: none; }
.hero-showcase { max-width: 1040px; margin: 48px auto 0; display: grid; grid-template-columns: 1.55fr 1fr; grid-template-rows: repeat(2,175px); gap: var(--space-lg); text-align: left; }
.hero-showcase>a { background: var(--white); border: 6px solid var(--white); border-radius: var(--radius-xl); overflow: hidden; position: relative; box-shadow: var(--soft-shadow); color: var(--text); }
.showcase-main { grid-row: span 2; }
.hero-showcase>a:only-child { grid-column: 1/-1; max-width: 750px; width: 100%; justify-self: center; }
.hero-showcase .tool-visual { height: 100%; aspect-ratio: auto; }
.hero-showcase .showcase-main .tool-visual { height: calc(100% - 64px); }
.hero-showcase .tool-visual img,.scene-image { display: block; width: 100%; height: 100%; object-fit: cover; }
.showcase-caption { display: flex; justify-content: space-between; gap: var(--space-lg); padding: var(--space-lg) var(--space-xl); background: var(--white); align-items: center; }
.showcase-caption strong { font-size: var(--font-md); }
.showcase-caption>span { color: var(--muted); font-size: var(--font-sm); }
.showcase-side { display: grid; grid-template-columns: 54% 46%; }
.showcase-side .showcase-caption { flex-direction: column; justify-content: center; align-items: flex-start; padding: var(--space-md); gap: var(--space-sm); }
.showcase-side .tool-visual img { object-fit: cover; }
.example-note { color: var(--muted); font-size: var(--font-sm); margin: var(--space-lg) 0 0; }
.home-section { max-width: calc(var(--layout-width) + var(--page-gutter)*2); padding: 0 var(--page-gutter); margin: var(--section-space) auto 0; }
.section-intro { text-align: center; margin-bottom: 40px; }
.section-intro h2 { font-size: var(--section-title); margin-bottom: var(--space-lg); }
.section-intro p { color: var(--muted); font-size: var(--font-md); }
.tool-group { margin-top: var(--space-xxl); }
.tool-group>h3 { font-size: var(--font-lg); margin-bottom: var(--space-xl); }
.tool-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: var(--space-xl); }
.tool-card { display: flex; flex-direction: column; gap: 0; padding: 0; overflow: hidden; min-height: 0; border: 1px solid var(--border); border-radius: var(--radius-xl); color: var(--text); transition: transform .18s,box-shadow .18s; }
.tool-card:hover { border-color: var(--border); box-shadow: var(--soft-shadow); transform: translateY(-4px); }
.tool-visual { display: block; width: 100%; aspect-ratio: 16/9; overflow: hidden; background: var(--hero-blue); }
.tool-visual img { display: block; width: 100%; height: 100%; object-fit: cover; }
.tool-visual--icon { background: linear-gradient(125deg,var(--hero-blue),var(--hero-violet)); display: grid; place-items: center; }
.tool-visual--icon img { width: 45%; height: 75%; object-fit: contain; }
.tool-card-content { width: 100%; padding: var(--space-xl); gap: var(--space-sm); flex: 1; }
.tool-card-content strong { font-size: var(--font-xl); }
.configured-tool-icon { width: 32px; height: 32px; object-fit: contain; flex: 0 0 auto; vertical-align: middle; }
.tool-card-content strong,.showcase-caption strong { display: flex; align-items: center; gap: var(--space-sm); }
.showcase-caption .configured-tool-icon { width: 24px; height: 24px; }
body[data-page=tool] h1 .configured-tool-icon { width: 48px; height: 48px; margin-right: var(--space-md); }
.tool-card-content .muted { font-size: var(--font-base); min-height: 24px; }
.tool-card-bottom { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: var(--space-sm); margin-top: auto; padding-top: var(--space-lg); }
.tool-card-bottom small { font-size: var(--font-sm); color: var(--muted); margin: 0; }
.tool-entry { display: flex; align-items: center; gap: var(--space-sm); color: var(--primary); font-size: var(--font-base); }
.tool-entry svg { width: 18px; height: 18px; }
.scene-feature { display: grid; grid-template-columns: 1.1fr 1fr; gap: 64px; align-items: center; margin-top: 48px; }
.scene-feature>.tool-visual,.scene-feature>.scene-image { border-radius: var(--radius-xl); aspect-ratio: 4/3; max-height: 420px; }
.scene-feature h3 { font-size: 30px; line-height: 1.4; }
.scene-feature p:not(.example-note) { color: var(--muted); line-height: 1.9; margin: var(--space-xl) 0; }
.scene-feature:nth-child(even) { grid-template-columns: 1fr 1.1fr; }
.scene-feature:nth-child(even)>.tool-visual { order: 2; }
.steps-section { background: var(--hover); border-radius: var(--radius-xl); padding-top: 48px; padding-bottom: 48px; }
.creation-steps { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 48px; list-style: none; padding: 0; margin: 0; text-align: center; }
.creation-steps li>span { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 50%; background: var(--primary-light); color: var(--primary); font-size: 22px; font-weight: 600; margin: 0 auto var(--space-xl); }
.creation-steps h3 { font-size: var(--font-lg); }
.creation-steps p { font-size: var(--font-base); color: var(--muted); margin-top: var(--space-md); }
.section-heading { margin-top: 0; margin-bottom: var(--space-xxl); }
body[data-page=tools] #page-content>h1,body[data-page=tools] #page-content>p,body[data-page=tools] #page-content>.section-heading { text-align: center; justify-content: center; }
body[data-page=tools] .search-form { margin: var(--space-xxl) auto; width: 100%; }
body[data-page=tools] .filters { justify-content: center; margin-bottom: 40px; }
.search-form input { background: var(--hover); min-height: 50px; border-radius: var(--radius-btn); }
.chip { border-color: transparent; background: var(--hover); padding: var(--space-md) var(--space-xl); border-radius: var(--radius-btn); }
.chip.selected { background: var(--primary-light); border-color: transparent; font-weight: 600; }
.panel { border-color: var(--border); box-shadow: none; padding: var(--space-xxl); }
body:not([data-page=home]):not([data-page=tools]) .workspace { background: linear-gradient(180deg,var(--hover),var(--white) 540px); }
body[data-page=tool] #page-content>.section-heading { justify-content: center; flex-direction: column; text-align: center; gap: var(--space-sm); margin-bottom: 40px; }
body[data-page=tool] #page-content>h1,body[data-page=tool] #page-content>p { text-align: center; }
.back-link { display: inline-block; color: var(--muted); margin-bottom: var(--space-xl); }
.workbench { grid-template-columns: minmax(0,1.35fr) minmax(300px,1fr); gap: var(--space-xxl); align-items: stretch; }
.preview-panel { min-height: 400px; padding: var(--space-xl); background: var(--white); border: none; }
.intro-example { width: 100%; text-align: center; }
.intro-example .tool-visual { aspect-ratio: 4/3; border-radius: var(--radius-lg); }
.upload-panel { padding: 40px var(--space-xxl); display: flex; flex-direction: column; justify-content: center; border: 1px solid var(--border); box-shadow: var(--soft-shadow); }
.upload-panel h2 { font-size: 28px; }
.upload-panel .file-button { min-height: 58px; font-size: var(--font-lg); margin-top: var(--space-lg); }
.file-button:focus-within { outline: 2px solid var(--primary); outline-offset: 3px; }
.compare:focus-within { outline: 2px solid var(--primary); outline-offset: 3px; }
.preview-unavailable { display: grid; place-items: center; width: 100%; height: 100%; min-height: 100px; padding: var(--space-lg); color: var(--muted); }
body[data-page=tool] #main-content>.panel { margin-top: 64px; padding: 40px; line-height: 1.9; }
body[data-page=tool] #main-content>.panel h2 { margin-top: var(--space-xl); }
.processing,.result-panel { margin: auto; }
.result-view { --result-preview-height:clamp(200px,calc(100dvh - 480px),640px); display:flex; flex-direction:column; gap:var(--space-xl); }
.result-view-heading { display:flex; align-items:center; justify-content:space-between; gap:var(--space-lg); }
.result-view-heading h2 { margin:0; font-size:var(--font-base); font-weight:600; letter-spacing:0; }
.result-view-tabs { display:flex; flex-shrink:0; gap:var(--space-xs); padding:var(--space-xs); border-radius:var(--radius-md); background:var(--hover); }
.result-view-tabs button { border:0; padding:calc(var(--space-xs)*1.5) calc(var(--space-sm) + var(--space-md)/2); border-radius:calc(var(--radius-sm)*1.5); background:transparent; color:var(--muted); font-size:var(--font-sm); }
.result-view-tabs button[aria-pressed=true] { color:var(--text); background:var(--white); box-shadow:var(--shadow); }
.result-view-tabs button:focus-visible { outline:2px solid var(--primary); outline-offset:var(--space-xs); }
.result-view .result-canvas { display:flex; align-items:center; justify-content:center; min-width:0; height:calc(var(--result-preview-height) + var(--space-xxl)); padding:var(--space-lg); border-radius:var(--radius-xl); background:var(--page); }
.result-view .result-canvas .result-media { display:block; width:auto; max-width:100%; max-height:var(--result-preview-height); object-fit:contain; margin:0; border-radius:var(--radius-md); }
.result-view .result-text { min-height:var(--result-preview-height); padding:var(--space-lg); line-height:1.8; }
dialog.feedback-dialog { width:min(512px,calc(100vw - var(--space-xl)*2)); max-height:calc(100dvh - var(--space-xl)*2); padding:var(--space-xl); border:1px solid var(--border); border-radius:var(--radius-lg); background:var(--white); color:var(--text); box-shadow:var(--shadow); }
dialog.feedback-dialog::backdrop { background:var(--mask); }
dialog.feedback-dialog>header { padding:0; border:0; gap:var(--space-lg); align-items:flex-start; }
dialog.feedback-dialog h2 { margin:0; font-size:var(--font-lg); font-weight:600; line-height:1.4; letter-spacing:0; }
dialog.feedback-dialog .icon-button { flex-shrink:0; width:var(--space-xl); height:var(--space-xl); color:var(--muted); }
dialog.feedback-dialog .icon-button svg { width:var(--space-lg); height:var(--space-lg); fill:none; stroke:currentColor; stroke-width:2; }
dialog.feedback-dialog .dialog-body { padding:var(--space-lg) 0 0; font-size:var(--font-base); line-height:1.7; overflow:auto; }
dialog.feedback-dialog .dialog-body>p { margin:0; color:var(--muted); white-space:pre-wrap; overflow-wrap:anywhere; }
.feedback-actions { display:flex; justify-content:flex-end; flex-wrap:wrap; gap:var(--space-sm); margin-top:var(--space-xl); }
.feedback-actions .button { min-height:calc(var(--space-xl) + var(--space-lg)); border-radius:var(--radius-lg); font-size:var(--font-base); padding:var(--space-sm) var(--space-lg); }
body[data-page=tool] #work-area .processing.panel,
body[data-page=tool] #work-area .result-panel { border:0; }
.actions { flex-wrap: wrap; }
.membership-banner { background: linear-gradient(110deg,var(--hero-blue),var(--hero-violet)); border: 1px solid var(--border); color: var(--text); border-radius: var(--radius-xl); padding: 40px; }
.membership-banner p { color: var(--muted); }
.package-grid { gap: var(--space-xl); }
.package { position: relative; padding: var(--space-xxl); }
.package .price { color: var(--primary); }
.stats-grid { gap: var(--space-lg); }
th { background: var(--hover); color: var(--muted); font-weight: 500; }
td,th { padding: var(--space-lg) var(--space-xl); }
.table-wrap { overflow-x: auto; max-width: 100%; }
.table-wrap table { min-width: 600px; }
.task-row { border-bottom-color: var(--border); gap: var(--space-xl); }
.agreement { max-width: 900px; margin: auto; line-height: 1.9; }
dialog { border-radius: var(--radius-xl); border-color: var(--border); }
dialog>header { border: none; padding-bottom: var(--space-sm); }
.dialog-body { padding: var(--space-xxl); }
.direct-upload-choose { width:auto; min-height:calc(var(--space-xl)*1.667); margin-top:var(--space-lg); padding:var(--space-sm) var(--space-lg); gap:var(--space-sm); border-radius:var(--radius-lg); font-size:var(--font-base); font-weight:500; }
.direct-upload-choose .upload-icon { width:var(--font-lg); height:var(--font-lg); filter:brightness(0) invert(1); }
.upload-progress-dialog { width:min(256px,calc(100vw - 32px)); }
.upload-progress-dialog>header { display:none; }
.upload-progress-dialog .dialog-body { display:flex; flex-direction:column; align-items:stretch; }
.upload-progress-dialog #popup-close { display:none; }
.upload-progress { display:flex; flex-direction:column; align-items:center; gap:var(--space-lg); padding:var(--space-lg) 0; }
.upload-progress svg { width:56px; height:56px; transform:rotate(-90deg); color:var(--primary); }
.upload-progress circle { fill:none; stroke:currentColor; stroke-width:4; }
.upload-progress .upload-progress-track { color:var(--border); }
.upload-progress .upload-progress-value { stroke-linecap:round; stroke-dasharray:100; stroke-dashoffset:100; transition:stroke-dashoffset .3s; }
.upload-progress-label { margin:0; font-size:var(--font-md); font-weight:500; font-variant-numeric:tabular-nums; }
.upload-progress-dialog #upload-cancel { width:100%; margin-top:var(--space-sm); border-color:transparent; background:transparent; color:var(--muted); font-weight:500; }
.upload-progress-dialog #upload-cancel:hover { border-color:transparent; background:transparent; color:var(--muted); box-shadow:none; filter:none; }
.qr-code { max-width: 100%; }
.site-footer { display: block; background: var(--hover); border-top: 1px solid var(--border); padding: 56px var(--page-gutter) var(--space-xl); font-size: var(--font-base); color: var(--muted); }
.footer-top { max-width: var(--layout-width); margin: auto; display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: var(--space-xxl); }
.footer-brand { font-size: 24px; font-weight: 700; color: var(--text); }
.footer-top p { margin: var(--space-lg) 0 var(--space-sm); }
.footer-top nav { display: flex; flex-direction: column; align-items: flex-start; gap: var(--space-md); }
.footer-top strong { margin-bottom: var(--space-sm); color: var(--text); }
.footer-top a:not(.footer-brand),.footer-top button { color: var(--muted); }
.footer-top button { border: 0; background: none; padding: 0; }
.footer-top a:hover,.footer-top button:hover { color: var(--primary); }
.footer-bottom { max-width: var(--layout-width); margin: 40px auto 0; padding-top: var(--space-xl); border-top: 1px solid var(--border); display: flex; gap: var(--space-xl); flex-wrap: wrap; font-size: var(--font-sm); }
@media(min-width:1600px) { .tool-grid { grid-template-columns: repeat(3,minmax(0,1fr)); } }
@media(max-width:1100px) {
  :root { --page-gutter: 28px; --hero-title: 54px; --section-title: 32px; }
  .header-inner { gap: var(--space-xl); }
  #navigation { gap: var(--space-xl); margin-left: var(--space-sm); }
  .account-menu summary>span,.balance { display: none; }
  .scene-feature { gap: var(--space-xxl); }
  .tool-card-content { padding: var(--space-lg); }
  .header-actions { gap: var(--space-md); }
}
@media(max-width:850px) {
  :root { --hero-title: 44px; --section-space: 64px; --header-height: 72px; }
  .workspace { margin-left: 0; }
  #navigation,.account-menu { display: none; }
  .mobile-menu { display: block; }
  .header-actions { margin-left: auto; }
  .brand>span:last-child { display: inline; }
  .home-hero { padding-top: 56px; }
  .hero-showcase { grid-template-rows: repeat(2,150px); gap: var(--space-md); }
  .showcase-side .showcase-caption>span { display: none; }
  .showcase-main .showcase-caption>span { display: none; }
  .tool-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .workbench { grid-template-columns: 1fr; }
  .upload-panel { padding: var(--space-xxl); }
  .scene-feature,.scene-feature:nth-child(even) { gap: var(--space-xl); }
  .scene-feature h3 { font-size: 24px; }
  .creation-steps { gap: var(--space-xl); }
  .footer-top { grid-template-columns: 2fr 1fr 1fr; }
  .footer-top>div { grid-column: 1/-1; }
}
@media(max-width:600px) {
  :root { --page-gutter: 20px; --hero-title: 36px; --section-title: 28px; --section-space: 56px; }
  .page-container { padding-top: var(--space-xxl); }
  .header-inner { gap: var(--space-md); }
  .brand { font-size: 20px; gap: var(--space-sm); }
  .brand-symbol { padding: 6px; }
  .brand-symbol svg { width: 22px; height: 22px; }
  .account .button { padding: var(--space-sm) var(--space-md); min-height: 40px; font-size: 12px; }
  .header-actions { gap: var(--space-md); }
  .profile-link { max-width: 92px; font-size: var(--font-sm); }
  .profile-link .avatar { display: none; }
  .menu-content { width: min(280px,calc(100vw - 40px)); }
  .hero-copy h1 { max-width: 330px; margin: auto auto var(--space-xl); }
  .hero-copy h1 span { display: block; }
  .hero-copy p { font-size: 15px; line-height: 1.9; }
  .mobile-break { display: block; }
  .home-hero { padding-top: 48px; padding-bottom: var(--space-xl); }
  .hero-button { min-height: 52px; }
  .hero-showcase { margin-top: var(--space-xxl); grid-template-columns: repeat(2,minmax(0,1fr)); grid-template-rows: auto auto; }
  .showcase-main { grid-column: 1/-1; grid-row: auto; }
  .hero-showcase .showcase-main .tool-visual { height: auto; aspect-ratio: 3/2; }
  .showcase-side { display: flex; flex-direction: column; }
  .hero-showcase .showcase-side .tool-visual { height: auto; aspect-ratio: 4/3; }
  .showcase-caption { padding: var(--space-md); }
  .showcase-caption strong { font-size: var(--font-base); }
  .showcase-side .showcase-caption { padding: var(--space-sm); }
  .hero-showcase>a { border-width: 4px; border-radius: var(--radius-lg); }
  .example-note { font-size: 11px; }
  .tool-grid { grid-template-columns: 1fr; }
  .tool-card-content { padding: var(--space-xl); }
  .tool-card-content strong { font-size: var(--font-xl); }
  .section-intro { margin-bottom: var(--space-xxl); }
  .section-intro h2 { line-height: 1.5; }
  .scene-feature,.scene-feature:nth-child(even) { grid-template-columns: 1fr; }
  .scene-feature:nth-child(even)>.tool-visual { order: 0; }
  .scene-feature h3 { margin-top: var(--space-sm); }
  .creation-steps { grid-template-columns: 1fr; gap: var(--space-xxl); }
  .steps-section { margin-left: var(--page-gutter); margin-right: var(--page-gutter); }
  .footer-top { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .footer-top>div { grid-column: 1/-1; }
  .footer-top nav:last-child { grid-column: 1/-1; }
  h1 { font-size: 32px; }
  .panel,.upload-panel,.membership-banner { padding: var(--space-xl); }
  .preview-panel { min-height: 0; padding: 0; }
  .package-grid { grid-template-columns: 1fr; }
  .actions { gap: var(--space-sm); }
  .result-panel .section-heading { gap: var(--space-md); }
  body[data-page=tool] #main-content>.panel { margin-top: var(--space-xxl); padding: var(--space-xl); }
}
@media(prefers-reduced-motion:reduce) { * { transition: none !important; animation: none !important; } }

/* Tool upload workspace: shared by image and video tools. */
.tool-upload { grid-template-columns: repeat(2,minmax(0,1fr)); gap: var(--space-lg) calc(var(--space-xl)*1.5); }
.tool-upload .preview-panel { padding: 0; min-height: 0; aspect-ratio: 16/10; border-radius: var(--radius-lg); }
.tool-upload .preview-panel>.result-image { height: 100%; max-height: none; }
.tool-upload .tool-compare { width: 100%; height: 100%; border-radius: inherit; }
.tool-upload .tool-compare>img { width: 100%; height: 100%; max-height: none; object-fit: cover; object-position: center; }
.tool-upload .tool-compare>input { touch-action: none; }
.tool-upload .compare-handle { position: absolute; left: var(--split); top: 50%; transform: translate(-50%,-50%); width: calc(var(--space-xxl)*1.25); height: calc(var(--space-xxl)*1.25); border: calc(var(--space-xs)*.5) solid var(--white); border-radius: 50%; background: var(--mask); display: flex; align-items: center; justify-content: center; pointer-events: none; z-index: 1; }
.tool-upload .compare-handle img { width: var(--space-xl); height: var(--space-xl); margin-inline: calc(var(--space-xs)*-1); flex-shrink: 0; filter: brightness(0) invert(1); }
.tool-upload .compare-handle img:first-child { transform: rotate(180deg); }
.tool-upload .upload-panel { min-width: 0; padding: var(--space-xxl) var(--space-xl); border: 0; border-radius: var(--space-lg); box-shadow: none; text-align: center; align-items: center; background: color-mix(in srgb,var(--muted) 16%,var(--white)); cursor: pointer; }
.tool-upload .upload-panel.has-source { background: var(--white); }
.tool-upload .upload-panel.is-dragging { outline: var(--space-xs) dashed var(--primary); outline-offset: calc(var(--space-xs)*-2); background: var(--primary-light); }
.tool-upload .upload-panel .upload-prompt { margin: 0 0 calc(var(--space-xl) + var(--space-xs)); font-size: clamp(var(--font-md), 2.4vw, calc(var(--font-xl) + var(--space-xs)/2)); font-weight: 400; letter-spacing: 0; line-height: 1.5; text-wrap: balance; }
.tool-upload .upload-panel .file-button { width: 72%; min-width: max-content; min-height: calc(var(--space-xxl) + var(--space-xl)); margin: 0; padding: var(--space-sm) var(--space-lg); border-radius: calc(var(--space-xxl)*2); font-size: var(--font-xl); font-weight: 500; white-space: nowrap; gap: var(--space-md); box-shadow: 0 calc(var(--space-xs)/2) var(--space-md) var(--border); }
.tool-upload .upload-icon { width: calc(var(--space-xl) + var(--space-xs)/2); height: calc(var(--space-xl) + var(--space-xs)/2); flex-shrink: 0; filter: brightness(0) invert(1); }
.direct-upload-choose { white-space: nowrap; }
.tool-upload .file-button input { height: 100%; }
.tool-upload .upload-panel>button:not([hidden]),.tool-upload fieldset { margin: var(--space-lg) 0 0; width: 100%; }
.tool-upload .upload-panel [hidden] { display: none; }
.tool-upload .upload-panel[aria-busy=true] .file-button { opacity: .55; cursor: wait; }
.tool-upload fieldset { text-align: left; cursor: auto; }
.tool-upload .upload-pricing { grid-column: 2; margin: 0; text-align: right; color: var(--muted); font-size: var(--font-md); }
.tool-upload .intro-example { height: 100%; position: relative; }
.tool-upload .intro-example .tool-visual { height: 100%; border-radius: inherit; }
.tool-upload .intro-example .example-note { position: absolute; inset: auto 0 0; margin: 0; padding: var(--space-sm); background: var(--white); }
@media(max-width:850px) {
  .tool-upload { grid-template-columns: minmax(0,1fr); gap: var(--space-xl); }
  .tool-upload .upload-panel { min-height: calc(var(--space-xxl)*10); }
  .tool-upload .upload-pricing { grid-column: 1; }
}
@media(max-width:600px) {
  .tool-upload .upload-panel { padding: var(--space-xl); min-height: calc(var(--space-xxl)*9); }
  .tool-upload .upload-panel .upload-prompt { font-size: var(--font-xl); margin-bottom: var(--space-xl); }
  .tool-upload .upload-panel .file-button { width: 85%; }
}
.tool-upload .tool-action-row.has-source { display:grid; grid-template-columns:minmax(0,.9fr) minmax(0,1fr); }
.tool-upload .tool-action-row.has-source .button { width:100%; min-width:0; min-height:calc(var(--space-xl)*2); padding:var(--space-sm) var(--space-xs); border-radius:var(--radius-btn); font-size:var(--font-md); font-weight:500; line-height:1.4; white-space:nowrap; }
.tool-upload .tool-action-row.has-source .file-button { background:var(--muted); color:var(--white); gap:var(--space-xs); box-shadow:none; }
.tool-upload .tool-action-row.has-source .upload-icon { width:var(--space-lg); height:var(--space-lg); }
.workbench.tool-upload.image-crop-configure { grid-template-columns:minmax(0,1fr); width:100%; max-width:calc(var(--space-xl)*32); margin-inline:auto; }
.workbench.tool-upload.image-crop-configure .preview-panel { border:0; border-radius:var(--radius-md); }
.workbench.tool-upload.image-crop-configure .upload-panel { display:contents; }

/* Shared configuration and result actions stay visible while the page scrolls. */
body:has(#work-area .tool-action-dock) { padding-bottom:calc(var(--space-xl)*5 + env(safe-area-inset-bottom, 0px)); }
html:has(#work-area .tool-action-dock) { scroll-padding-bottom:calc(var(--space-xl)*5 + env(safe-area-inset-bottom, 0px)); }
#work-area .tool-action-dock { position:fixed; inset:auto 0 0; z-index:20; padding:var(--space-lg) var(--page-gutter) calc(var(--space-lg) + env(safe-area-inset-bottom, 0px)); border-top:1px solid var(--border); background:var(--white); cursor:default; }
#work-area .tool-action-dock .tool-action-row { display:flex; flex-wrap:nowrap; align-items:center; justify-content:flex-end; gap:var(--space-md); width:100%; max-width:var(--layout-width); margin:0 auto; }
#work-area .tool-action-dock .button { flex:0 1 auto; width:auto; min-width:0; min-height:calc(var(--space-xl)*2); margin:0; padding:var(--space-sm) var(--space-xl); border-radius:var(--radius-btn); font-size:var(--font-base); font-weight:500; line-height:1.4; white-space:nowrap; box-shadow:none; }
#work-area .tool-action-dock .file-button { background:var(--white); color:var(--text); border:1px solid var(--border); }
#work-area .tool-action-dock .upload-icon { display:none; }
#work-area .tool-action-row:has(.tool-start-action) { align-items:flex-start; }
#work-area .tool-start-action { display:flex; flex-direction:column; gap:var(--space-xs); min-width:0; }
#work-area .tool-start-action .button { width:100%; flex:none; }
#work-area .tool-start-price { color:var(--muted); font-size:var(--font-sm); font-weight:400; line-height:1.4; white-space:normal; text-align:center; }
@media(max-width:600px) {
  #work-area .tool-action-dock { padding-inline:var(--space-lg); }
  #work-area .tool-action-dock .button { flex:1; padding-inline:var(--space-md); }
  #work-area .tool-action-dock .tool-start-action { flex:1; }
  #work-area .tool-action-dock .tool-start-action .button { flex:none; }
}
