/* Shared studio controls. Interaction references are recorded in COMPONENT-SOURCES.md. */
@font-face{font-family:Inter;font-style:normal;font-weight:400;font-display:swap;src:url("./fonts/inter-400.ttf") format("truetype")}
@font-face{font-family:Inter;font-style:normal;font-weight:500;font-display:swap;src:url("./fonts/inter-500.ttf") format("truetype")}
@font-face{font-family:Inter;font-style:normal;font-weight:600;font-display:swap;src:url("./fonts/inter-600.ttf") format("truetype")}
:root{
  color-scheme:dark;--ground:#000;--surface:#111;--raised:#1c1c20;--border:#2b2b30;--control:#45414d;
  --studio-backdrop:#000;
  --ink:#f5f3fa;--text:#f5f3fa;--muted:#b0acb9;--faint:#c6c1cf;--accent:#a855f7;--brand:#a855f7;--violet:#a855f7;
  --line:#302b38;--accent-ink:#190d2c;--accent-hover:#bca4ff;--selected:#2b1e40;
  --font:Inter,-apple-system,BlinkMacSystemFont,"PingFang SC","Microsoft YaHei",sans-serif;
}
html,body{background:var(--ground);color:var(--ink);font-family:var(--font);font-size:14px}
body{background:var(--studio-backdrop);background-attachment:fixed;isolation:isolate}
input,textarea{caret-color:var(--accent)}
body[data-studio] input::placeholder,body[data-studio] textarea::placeholder{color:var(--muted);opacity:1}
html{scrollbar-color:#514b5e var(--ground);scrollbar-width:thin}
button,input,textarea,select{font-family:inherit;font-variant-numeric:tabular-nums}
button:focus-visible,a:focus-visible,input:focus-visible,textarea:focus-visible,select:focus-visible{outline:2px solid var(--accent);outline-offset:3px}
button{box-shadow:none}
::selection{background:var(--control);color:#fff}
.studio-header{height:54px;position:fixed;inset:0 0 auto;z-index:60;display:flex;align-items:center;gap:28px;padding:0 28px;background:var(--ground);border-bottom:1px solid var(--raised)}
.studio-wordmark{display:flex;align-items:center;gap:10px;color:#f5f5f5;font-size:16px;font-weight:600;white-space:nowrap;letter-spacing:0}
.studio-wordmark svg{width:21px;height:25px;color:var(--ink)}
.split-text-active{position:relative;display:inline-block}
.split-text-active>.split-text-source{opacity:0}
.split-text-visual{position:absolute;inset:0;white-space:pre;pointer-events:none;user-select:none}
.split-text-char{display:inline-block}
@media(prefers-reduced-motion:reduce){.split-text-active>.split-text-source{opacity:1}.split-text-visual{display:none}}
.studio-nav{display:flex;gap:8px;align-items:center;min-width:0;height:100%}
.studio-nav a{display:flex;align-items:center;gap:8px;height:36px;text-decoration:none;padding:0 15px;border-radius:6px;color:var(--faint);font-size:13px;white-space:nowrap;transition:background .16s,color .16s}
.studio-nav a:hover{background:var(--raised);color:#fff}
.studio-nav a[aria-current="page"]{color:var(--ink);background:var(--selected)}
.studio-mode{margin-left:auto;color:#a9a9a9;font-size:12px;white-space:nowrap}
.studio-help{color:#c1c1c1;border-radius:6px;padding:7px 10px;font-size:12px}
.studio-help:hover{background:var(--raised)}
.studio-guide{max-width:560px;max-height:calc(100dvh - 48px);overflow:auto;padding:28px;background:var(--surface);border:1px solid #404040;color:#eee;border-radius:16px}
.studio-guide::backdrop{background:#000b}
.studio-guide h2{margin:0 0 16px;font-size:22px}
.studio-guide p{line-height:1.8;color:var(--muted);font-size:14px}
.studio-guide button{background:#eee;color:var(--accent-ink);border-radius:999px;padding:10px 20px;margin-top:12px}
.studio-guide button+button{margin-left:8px;background:var(--border);color:#eee}
.studio-credit-list strong{font-weight:500;color:#eee}
.studio-credit-list a{color:#d6e9e4;text-decoration:underline;text-underline-offset:3px;white-space:nowrap}
.studio-motion-setting{display:flex;gap:10px;align-items:center;color:var(--muted);font-size:13px;margin:18px 0}
.studio-motion-setting input{accent-color:var(--ink);width:18px;height:18px}
.studio-guide ol{padding-left:20px;line-height:2;color:var(--muted)}
.glass{backdrop-filter:none!important;background:var(--surface);border-color:var(--border);box-shadow:none}
.background,.background:after,.ambient{display:none!important}
.popover,.general-dialog,.modal,.modal-panel,dialog#modal{background:var(--surface);color:#f4f4f4;border-color:var(--control);box-shadow:0 16px 60px #0008}
dialog::backdrop{backdrop-filter:none!important;background:#000b}
.primary-button,.solid-button,.generate-button:not(:disabled),.dialog-action{background:var(--accent)!important;color:var(--accent-ink)!important;border-color:var(--accent)!important;box-shadow:none!important}
.primary-button:hover,.solid-button:hover,.generate-button:not(:disabled):hover,.dialog-action:hover{background:var(--accent-hover)!important}
.secondary-button,.quiet-button,.control,.pill,.chip,.text-tab{color:#c4c4c4}
.control,.pill,.chip{background:var(--raised);border-color:var(--control)}
.new-tag,.badge{background:var(--line)!important;color:var(--ink)!important}
.support,.help-button{display:none}
.upload-box,.upload-tile{border:1px dashed var(--control);background:var(--surface);box-shadow:none;transform:none}
.upload-box:hover,.upload-box.dragging,.upload-tile:hover{border-color:var(--ink);background:var(--raised)}
.upload-trigger:focus-visible{outline-offset:-4px}
.upload-hint,.upload-meta,.upload-count,.card-copy .tags span,.upload-caption{font-size:12px;color:var(--muted)}
.upload-title{font-size:14px;color:#ededed}
.upload-box,.upload-tile,.template-card{border-radius:10px}
.template-card.selected{outline-color:#eee}
.template-card .checkmark{background:#eee;color:var(--accent-ink)}
.field-shell{background:var(--surface);border-color:var(--control);box-shadow:none}
.field-shell:focus-within{border-color:var(--faint)}
.nav-link.selected,.nav-group .active,.nav-button.active{background:var(--selected);color:#fff;box-shadow:none}
.text-tab.selected,.all-templates,.library-tabs button.active{color:#eee}
.library-tabs button.active:after{background:#eee}
.switch-label input:checked+i,.ai-toggle input:checked+i{background:var(--accent)}
.chip.active{background:var(--selected);border-color:#888;color:#fff}
.round,.nav-button,.nav-link,.template-card{transition:background .16s,color .16s,outline-color .16s}
.model-tip{display:none!important}

/* Design: a complete composer stays beside its own template controls. */
body[data-studio="design"] main{padding:54px 28px 0 24px}
body[data-studio="design"] .sidebar{top:54px;background:var(--ground)}
body[data-studio="design"] .brand{display:none}
body[data-studio="design"] .nav-main,body[data-studio="design"] .nav-bottom{background:var(--ground);border:0;box-shadow:none;border-radius:12px}
body[data-studio="design"] .nav-button{color:var(--muted)}
body[data-studio="design"] .nav-button span{display:block;font-size:11px}
body[data-studio="design"] .creative-section{padding-top:32px;width:auto;margin-left:0}
body[data-studio="design"] .hero-heading{margin:0;text-align:left;width:100%;max-width:1152px;margin-inline:auto}
body[data-studio="design"] .hero-heading h1{font:600 26px/1.4 var(--font);letter-spacing:-.02em;white-space:normal;margin-bottom:7px}
body[data-studio="design"] .hero-heading p{font-size:14px;color:var(--muted);letter-spacing:0}
body[data-studio="design"] .composer-wrap{width:100%;max-width:1152px;margin:24px auto 0;transform:none}
body[data-studio="design"] .composer{background:var(--surface);border:1px solid var(--border);border-radius:14px;box-shadow:none;min-height:200px;padding:24px}
body[data-studio="design"] .composer textarea{font-size:15px}
body[data-studio="design"] .upload-tile{width:68px;height:78px;color:#c9c9c9;background:var(--raised)}
body[data-studio="design"] .upload-tile span{display:block;font-size:11px}
body[data-studio="design"] .assist-button{font-size:12px;background:var(--raised);color:var(--muted);height:28px}
body[data-studio="design"] .quick-tools{margin-top:14px;justify-content:flex-start;gap:12px}
body[data-studio="design"] .quick-tools>span{display:none}
body[data-studio="design"] #quickButtons{justify-content:flex-start;gap:4px 12px;flex-wrap:wrap}
body[data-studio="design"] #quickButtons button{font-size:13px;color:var(--muted);background:transparent;border-radius:6px;box-shadow:none;padding:9px 8px}
body[data-studio="design"] #quickButtons .mode-tool{display:inline-flex!important}
body[data-studio="design"] .inspiration-view{margin-top:36px}
body[data-studio="design"] .section-heading h2{font-size:20px}
body[data-studio="design"] .section-heading p{font-size:13px;color:var(--faint)}
body[data-studio="design"] .reference-item{border-color:#777}
body[data-studio="design"] .reference-item button{background:var(--border);border-color:var(--control)}
body[data-studio="design"] .gallery{gap:12px}
body[data-studio="design"] .gallery-column{gap:12px}
body[data-studio="design"] .gallery-card{border-radius:8px}
body[data-studio="design"] .site-footer{font-size:12px}
body[data-studio="design"] .view-tabs button{font-size:14px}
body[data-studio="design"].page-assets .assets-view{padding-top:32px}
body[data-studio="design"] .card-favorite.saved{color:#fff;background:#333}
body[data-studio="design"] .generate-button svg{color:inherit}
body[data-studio="design"] .prompt-chip{background:var(--border);color:var(--ink)}
body[data-studio="design"].page-generate .creative-section{padding-top:28px}
body[data-studio="design"].page-generate .composer-wrap{position:relative;left:auto;bottom:auto;transform:none;width:100%;margin:0 auto;display:block;padding:0;background:none;border:0}
body[data-studio="design"].page-generate #generateView{padding:32px 0 80px;min-height:0;max-width:1152px}
body[data-studio="design"].page-generate .composer-footer{grid-column:1/-1;grid-row:auto}
body[data-studio="design"].page-generate .composer:not(.has-references) .composer-footer{grid-column:1/-1;grid-row:auto}
body[data-studio="design"].page-generate .reference-tray{flex-wrap:wrap;overflow:visible}
body[data-studio="design"].page-generate .quick-tools{margin-top:14px}
body[data-studio="design"].page-generate .quick-tools>div{background:transparent;padding:0}
body[data-studio="design"].page-generate .reference-item{width:66px;height:66px}
body[data-studio="design"].page-generate .selected-template{display:block}

/* Creator: keep the functional reference slots; remove the landing-page treatment. */
body[data-studio="creator"] main{padding-top:78px}
body[data-studio="creator"] .logo,body[data-studio="creator"] .product-switch{display:none}
body[data-studio="creator"] .rail{padding-top:54px}
body[data-studio="creator"] .hero{padding-top:20px;padding-bottom:20px}
body[data-studio="creator"] .hero-inner{max-width:1000px}
body[data-studio="creator"] .headline{font:600 28px/1.45 var(--font);letter-spacing:-.02em;margin-bottom:8px;background:none;color:#eee}
body[data-studio="creator"] .subtitle{color:var(--faint);font-size:14px}
body[data-studio="creator"] .input-card,body[data-studio="creator"] .prompt-card,body[data-studio="creator"] .input-container{background:var(--surface);border-color:var(--control);box-shadow:none}
body[data-studio="creator"] .mode-description{font-size:13px;color:var(--muted)}
body[data-studio="creator"] .discover{padding-top:30px}
body[data-studio="creator"] .discover h2{font-size:20px;letter-spacing:0}
body[data-studio="creator"] .nav-group{border-radius:12px}
body[data-studio="creator"] .round{color:var(--muted)}
body[data-studio="creator"] .publish{border-color:var(--control)}
body[data-studio="creator"] .view-title{font-size:26px}
body[data-studio="creator"] .creation-view .workspace{margin-top:28px}
body[data-studio="creator"] .edit-composer{background:var(--surface);border-color:var(--control);box-shadow:none}
body[data-studio="creator"] .tagline{font:14px/1.6 var(--font);letter-spacing:0;text-shadow:none;margin-bottom:28px}
body[data-studio="creator"] .upload-card{background:var(--surface);border:1px dashed var(--control);border-radius:12px;box-shadow:none;backdrop-filter:none;transform:none}
body[data-studio="creator"] .upload-card:before{box-shadow:none}
body[data-studio="creator"] .upload-card .card-label,body[data-studio="creator"] .card-note{font-size:13px;color:var(--muted);text-shadow:none}
body[data-studio="creator"] .upload-card img.platform-logo{filter:grayscale(1)}
body[data-studio="creator"] .segmented,body[data-studio="creator"] .prompt-shell{box-shadow:none;background:var(--surface);backdrop-filter:none}
body[data-studio="creator"] .prompt-shell{border-color:var(--control)}
body[data-studio="creator"] .resolution button.active{background:#555;color:#fff;box-shadow:none}
body[data-studio="creator"] .tool-circle{box-shadow:none!important}
body[data-studio="creator"] .tool-option span:last-child,body[data-studio="creator"] .style-chip,body[data-studio="creator"] .refresh-styles,body[data-studio="creator"] .image-count,body[data-studio="creator"] .resolution button,body[data-studio="creator"] .price,body[data-studio="creator"] .help,body[data-studio="creator"] .side-footer small,body[data-studio="creator"] .popover button{font-size:12px}
body[data-studio="creator"] .style-chip,body[data-studio="creator"] .refresh-styles{color:var(--muted)}
body[data-studio="creator"] .send-button:not(:disabled){background:var(--accent);color:var(--accent-ink);border-color:var(--accent);box-shadow:none}
body[data-studio="creator"] .side-panel{top:54px;background:var(--surface);backdrop-filter:none}
body[data-studio="creator"] .hero-inner{max-width:1152px;text-align:left}
body[data-studio="creator"] .headline{text-align:left}
body[data-studio="creator"] .tagline{justify-content:flex-start;margin:0 0 24px}
body[data-studio="creator"] .workspace{width:100%;max-width:none;padding:24px;background:var(--surface);border-radius:16px}
body[data-studio="creator"] .mode-switch{position:static;display:flex;flex-direction:row;gap:6px;justify-content:flex-start;margin-bottom:20px}
body[data-studio="creator"] .tool-option{display:flex;flex-direction:row;align-items:center;gap:8px;border-radius:7px;padding:7px 12px;background:var(--raised)}
body[data-studio="creator"] .tool-option .tool-circle{width:20px;height:20px;border:0;background:none;color:var(--muted)}
body[data-studio="creator"] .tool-option.selected{background:var(--selected)}
body[data-studio="creator"] .tool-option span:last-child{opacity:1;font-size:13px}
body[data-studio="creator"] .mobile-toolbar{display:none}
body[data-studio="creator"] .auto-controls{align-items:flex-start}
body[data-studio="creator"] .mode-description{justify-content:flex-start;margin:10px 0 0}
body[data-studio="creator"] .cards{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:16px;width:100%;height:auto;transform:none;margin:24px 0}
body[data-studio="creator"] .card-wrap{width:auto;margin:0}
body[data-studio="creator"] .upload-card{width:100%;height:154px}
body[data-studio="creator"] .card-preview{border-radius:12px}
body[data-studio="creator"] .style-field{width:100%;margin-top:0}
body[data-studio="creator"] .style-field>label{display:block;align-self:flex-start;text-align:left;margin-bottom:10px;font-size:14px}
body[data-studio="creator"] .prompt-shell{width:100%;border-radius:10px}
body[data-studio="creator"] .style-chips{max-width:none;justify-content:flex-start;margin-top:14px}
body[data-studio="creator"] .style-chip{padding:5px 10px;border-radius:6px}
body[data-studio="creator"] .refresh-styles{margin-top:10px}
body[data-studio="creator"] .workflow{display:none}
body[data-studio="creator"] .send-wrap{position:static;display:flex;flex-direction:row;justify-content:flex-end;align-items:center;margin:20px 0 0;transform:none}
body[data-studio="creator"] .send-button{display:flex;align-items:center;justify-content:center;width:auto;min-width:132px;gap:9px;height:42px;border-radius:999px;font-size:13px;padding:0 16px}
body[data-studio="creator"] .price{display:none}
body[data-studio="creator"] .workflow-draft-bar{margin-top:20px}
body[data-studio="creator"] .discover{max-width:1200px;margin-inline:auto;padding-top:24px}

/* Video: inputs and project results share the full available work area. */
body[data-studio="video"] .workspace{top:74px;bottom:20px}
body[data-studio="video"] .rail{top:74px;background:var(--ground);box-shadow:none;border-color:var(--selected);border-radius:12px}
body[data-studio="video"] .brand,body[data-studio="video"] .rail-bottom{display:none}
body[data-studio="video"] .composer{border-radius:16px;background:var(--surface);border-color:var(--border)}
body[data-studio="video"] .title-row,body[data-studio="video"] #mode-button{font-size:20px}
body[data-studio="video"] .intro{padding-bottom:22px}
body[data-studio="video"] .intro p:last-child{font-size:13px;color:var(--faint)}
body[data-studio="video"] .welcome h1{font-size:28px;line-height:1.4;color:var(--ink);background:none}
body[data-studio="video"] .welcome p{font-size:14px;color:var(--faint)}
body[data-studio="video"] .welcome{white-space:normal}
body[data-studio="video"] .canvas-content{right:16px;align-items:flex-start;padding-top:40px;overflow-y:auto}
body[data-studio="video"] .settings-toggle:disabled{color:var(--faint)}
body[data-studio="video"] .nav-link span{font-size:12px}
body[data-studio="video"] .disclaimer-row>button,body[data-studio="video"] .ai-toggle{font-size:12px}
body[data-studio="video"] .template-card .badge,body[data-studio="video"] .template-card .tags span,body[data-studio="video"] .field-count{font-size:11px}
body[data-studio="video"] .studio-rail{width:192px;left:20px;padding:16px 12px;align-items:stretch}
body[data-studio="video"] .studio-rail .nav-link{flex-direction:row;width:100%;justify-content:flex-start;gap:12px;padding:11px 12px;min-height:44px}
body[data-studio="video"] .studio-rail .nav-link span{font-size:13px}
body[data-studio="video"] .new-creation{display:block;background:var(--accent);color:var(--accent-ink);min-height:40px;border-radius:8px;font-size:13px}
body[data-studio="video"] .sidebar-projects{display:block;margin-top:24px}
body[data-studio="video"] .sidebar-section-label{font-size:12px;color:var(--faint)}
body[data-studio="video"] .sidebar-section-label button{font-size:12px}
body[data-studio="video"] .sidebar-project{font-size:12px;color:var(--muted)}
body[data-studio="video"] .workspace{left:236px}
body[data-studio="video"] .composer{width:510px;min-width:510px}
body[data-studio="video"] .route-workspace{inset:74px 24px 24px 236px;background:var(--ground)}
body[data-studio="video"] .workflow-title h1{font-size:22px;line-height:1.4}
body[data-studio="video"] .workflow-title button,body[data-studio="video"] .workflow-service,body[data-studio="video"] .workflow-meta,body[data-studio="video"] .workflow-actions button{font-size:12px}
body[data-studio="video"] .workflow-prompt{font-size:14px;color:var(--ink)}
body[data-studio="video"] .workflow-empty{margin-top:28px;text-align:left;padding:28px 22px}
body[data-studio="video"] .workflow-empty h2{font-size:22px;color:#eee;letter-spacing:0}
body[data-studio="video"] .workflow-empty p{max-width:none;margin:12px 0 20px;font-size:14px;color:var(--muted)}
body[data-studio="video"] .workflow-steps{font-size:12px;justify-content:flex-start}
body[data-studio="video"] .workflow-steps span:after{display:none}

/* A magnifier compares full framing and detail of the same licensed photo. */
.studio-comparison{min-width:0;background:var(--surface);border-radius:16px;overflow:hidden;display:flex;flex-direction:column}
.studio-comparison-head,.studio-comparison-foot{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:14px 16px}
.studio-comparison-head h2{margin:0;font-size:15px;font-weight:500}
.studio-comparison-head button{color:var(--muted);font-size:12px;padding:6px 0}
.studio-comparison-stage{position:relative;min-height:260px;flex:1;background:#e2e0dc;overflow:hidden;--compare:50%}
.studio-comparison-stage>img,.studio-comparison-before img{width:100%;height:100%;object-fit:cover;display:block;position:absolute;inset:0}
.studio-comparison-stage>.studio-after{transform:scale(1.65);transform-origin:50% 40%}
.template-diagram.reference-preview{position:relative;display:block;overflow:hidden}
.template-diagram.reference-preview>.template-output-picture{width:100%;height:100%;max-height:220px;object-fit:cover}
.template-reference-caption{position:absolute;left:10px;bottom:10px;background:#111b;color:#eee;padding:3px 8px;border-radius:4px;font-size:12px}
.studio-comparison-before{position:absolute;inset:0;clip-path:inset(0 calc(100% - var(--compare)) 0 0)}
.studio-comparison-rule{position:absolute;inset:0 auto 0 var(--compare);width:2px;background:#fff;pointer-events:none}
.studio-comparison-rule:after{content:"";position:absolute;left:-11px;top:calc(50% - 18px);width:24px;height:36px;border-radius:18px;background:#fff;box-shadow:0 2px 10px #0003}
.studio-comparison-range{position:absolute;inset:0;width:100%;height:100%;margin:0;opacity:0;cursor:ew-resize;z-index:2}
.studio-comparison-stage:focus-within{outline:2px solid #fff;outline-offset:-4px}
.studio-comparison-label{position:absolute;top:12px;left:12px;padding:4px 8px;font-size:11px;color:#fff;background:#202020b8;border-radius:4px;pointer-events:none}
.studio-comparison-label:last-of-type{right:12px;left:auto}
.studio-comparison-foot span{color:var(--faint);font-size:12px}
.studio-comparison-foot button{padding:7px 12px;background:var(--border);color:#fff;border-radius:7px;font-size:12px}
body[data-studio="design"]:not(.page-generate) .creative-section.studio-comparison-layout{display:grid;grid-template-columns:minmax(0,1fr) minmax(270px,32%);gap:20px 28px;max-width:1352px;margin-inline:auto}
body[data-studio="design"] .studio-comparison-layout .hero-heading{grid-column:1;width:100%;margin:0}
body[data-studio="design"] .studio-comparison-layout .composer-wrap{grid-column:1;width:100%;margin:0}
body[data-studio="design"] .studio-comparison-layout .studio-comparison{grid-column:2;grid-row:1/3}
body[data-studio="design"].page-generate .studio-comparison{display:none}
.gallery-card>img:first-child,.discover-card img{transition:transform .35s cubic-bezier(.16,1,.3,1)}
@media(hover:hover){.gallery-card:hover>img:first-child{transform:scale(1.025)}}
.studio-nav a:active,.primary-button:active,.solid-button:active,.generate-button:active{transform:translateY(1px)}
dialog[open]{animation:studio-dialog .22s cubic-bezier(.16,1,.3,1)}
@keyframes studio-dialog{from{opacity:.5;transform:scale(.985) translateY(5px)}to{opacity:1;transform:none}}

@media(max-width:920px){
  .studio-header{padding:0 18px;gap:18px}.studio-mode{display:none}
  body[data-studio="video"] .workspace{position:relative;inset:auto;margin:74px 20px 100px 114px}
  body[data-studio="video"] .canvas{display:block}
  body[data-studio="video"] .canvas-content{position:relative;inset:auto}
  body[data-studio="video"] .studio-rail{width:76px;left:18px;padding:14px 6px}
  body[data-studio="video"] .studio-rail .nav-link{flex-direction:column;padding:8px 4px;gap:4px}
  body[data-studio="video"] .studio-rail .nav-link span{font-size:12px}
  body[data-studio="video"] .new-creation,body[data-studio="video"] .sidebar-projects{display:none}
  body[data-studio="video"] .route-workspace{inset:74px 20px 90px 114px}
  body[data-studio="video"] .composer{min-width:0;width:100%}
  body[data-studio="design"]:not(.page-generate) .creative-section.studio-comparison-layout{display:block}
  body[data-studio="design"] .studio-comparison-layout .composer-wrap{margin-top:24px}
  body[data-studio="design"] .studio-comparison-layout .studio-comparison{margin-top:20px}
  .studio-comparison-stage{flex:none;height:240px}
}
@media(max-width:600px){
  .studio-header{height:92px;padding:10px 16px 0;display:grid;grid-template-columns:1fr auto;gap:0}
  .studio-wordmark{font-size:15px;gap:8px}.studio-wordmark svg{width:17px;height:21px}
  .studio-nav{grid-column:1/-1;grid-row:2;height:44px;gap:0;justify-content:space-between}
  .studio-nav a{padding:0 14px;height:38px;font-size:13px}
  .studio-help{grid-column:2;grid-row:1;padding:6px;font-size:12px}
  .studio-guide{width:calc(100% - 32px);padding:22px}
  body[data-studio="design"] main{padding:92px 16px 80px;margin-left:0}
  body[data-studio="design"] .sidebar{inset:auto 0 0;width:100%;height:66px;background:var(--accent-ink)}
  body[data-studio="design"] .nav-main{position:static;transform:none;width:100%;height:100%;display:flex;flex-direction:row;justify-content:space-around;border:0;padding:5px 16px;gap:12px}
  body[data-studio="design"] .nav-main .nav-button{width:auto;flex:1;height:54px}
  body[data-studio="design"] .nav-main .nav-button span{display:block}
  body[data-studio="design"] .nav-bottom{display:none}
  body[data-studio="design"] .creative-section{padding-top:24px}
  body[data-studio="design"] .hero-heading h1{font-size:24px}
  body[data-studio="design"] .hero-heading p{font-size:13px}
  body[data-studio="design"] .composer-wrap{margin-top:20px}
  body[data-studio="design"] .composer{padding:16px;min-height:210px}
  body[data-studio="design"] .composer-tools{width:100%}
  body[data-studio="design"] .parameter-row{width:100%;gap:5px}
  body[data-studio="design"] .control{padding:0 8px;gap:6px;height:40px}
  body[data-studio="design"] .generate-button{height:40px;min-width:78px;padding:0 10px;margin-left:auto}
  body[data-studio="design"] #quickButtons{flex-wrap:wrap;overflow:visible}
  body[data-studio="design"] #quickButtons button{font-size:12px;min-height:40px;padding:7px 10px}
  body[data-studio="design"] .inspiration-view{margin-top:28px}
  body[data-studio="creator"] main{padding:112px 0 90px}
  body[data-studio="creator"] .rail{padding-top:0}
  body[data-studio="creator"] .headline{font-size:24px}
  body[data-studio="creator"] .hero{padding-top:10px}
  body[data-studio="creator"] .side-panel{top:92px}
  body[data-studio="creator"] .workspace{padding:18px 16px}
  body[data-studio="creator"] .cards{grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin:20px 0}
  body[data-studio="creator"] .upload-card{height:132px}
  body[data-studio="creator"] .style-field{width:100%}
  body[data-studio="creator"] .mode-description{white-space:normal;text-align:left;line-height:1.6}
  body[data-studio="creator"] .hero{padding-inline:16px}
  body[data-studio="video"] .workspace{inset:auto;margin:104px 16px 100px}
  body[data-studio="video"] .rail{top:auto;border-radius:12px}
  body[data-studio="video"] .studio-rail{width:auto;left:12px;right:12px;padding:6px}
  body[data-studio="video"] .studio-rail .nav-link{width:auto;flex:1;padding:5px 6px}
  body[data-studio="video"] .route-workspace{position:relative;inset:auto;margin:104px 16px 100px;overflow:visible}
  body[data-studio="video"] .composer{padding:18px 14px}
  .upload-title{font-size:13px}.upload-hint{font-size:11px}
}
@media(max-width:768px){
  body[data-studio="creator"] .rail{padding:6px;height:60px;background:var(--surface);border-color:var(--border);backdrop-filter:none}
}
@media(prefers-reduced-motion:reduce){*,*:before,*:after{scroll-behavior:auto!important;animation:none!important;transition:none!important}}

/* A video is one project. Settings, shots and outputs follow one reading order. */
body[data-studio="video"]{overflow-y:auto}
body[data-studio="video"] .studio-rail{position:fixed;top:74px;bottom:20px;height:calc(100dvh - 94px)}
body[data-studio="video"] .workspace{position:relative;inset:auto;margin:74px 28px 60px 236px;display:flex;flex-direction:column;gap:0;max-width:1500px}
.studio-project-heading{display:flex;align-items:center;justify-content:space-between;gap:20px;padding:10px 0 24px}
.studio-project-heading p{font-size:13px;color:var(--faint);margin:0 0 7px}
.studio-project-heading h1{font-size:26px;margin:0;font-weight:600;line-height:1.4}
body[data-studio="video"] .studio-project-heading .project-bar{margin:0;padding:0;height:auto}
body[data-studio="video"] .studio-project-heading #project-name{font-size:26px;max-width:650px;line-height:1.4;font-weight:600}
.studio-project-heading nav{display:flex;align-items:center;gap:6px}
.studio-project-heading nav button{color:var(--muted);background:var(--surface);border-radius:8px;padding:9px 13px;font-size:13px}
body[data-studio="video"] .composer{width:100%;min-width:0;max-width:none;height:auto;min-height:0;flex-shrink:0;overflow:visible;padding:24px 28px;border:0;border-radius:16px 16px 0 0;background:var(--surface)}
body[data-studio="video"] .composer-header{display:flex;gap:24px;align-items:flex-start;justify-content:space-between;margin-bottom:20px}
body[data-studio="video"] .title-row{border:0;padding:0;min-height:0;white-space:nowrap}
body[data-studio="video"] .intro{padding:0;max-width:510px}
body[data-studio="video"] .intro p:last-child{margin-top:4px}
body[data-studio="video"] .form-scroll{overflow:visible;display:grid;grid-template-columns:minmax(260px,.85fr) minmax(320px,1.15fr);gap:22px;flex:none}
body[data-studio="video"] #upload-section{min-width:0}
body[data-studio="video"] #template-section{min-width:0}
body[data-studio="video"] #template-section:empty{display:none}
body[data-studio="video"] .form-scroll:has(#template-section:empty) #upload-section{grid-column:1/-1}
body[data-studio="video"] #prompt-section{grid-column:1/-1;min-width:0;display:grid;grid-template-columns:1fr 1fr;gap:0 20px}
body[data-studio="video"] #prompt-section{display:block}
body[data-studio="video"] #prompt-section>div:not(.template-settings){display:grid;grid-template-columns:1fr 1fr;gap:0 20px}
body[data-studio="video"] #prompt-section>div:not(:has(#music))>.field-shell,body[data-studio="video"] #prompt-section>div:not(:has(#music))>.field-label{grid-column:1/-1}
body[data-studio="video"] #prompt-section .field-label:nth-of-type(1){grid-column:1;grid-row:1}
body[data-studio="video"] #prompt-section .field-shell:nth-of-type(1){grid-column:1;grid-row:2}
body[data-studio="video"] #prompt-section .field-label:nth-of-type(2){grid-column:2;grid-row:1}
body[data-studio="video"] #prompt-section .field-shell:nth-of-type(2){grid-column:2;grid-row:2}
body[data-studio="video"] #prompt-section .field-shell{margin-bottom:0}
body[data-studio="video"] #prompt-section textarea{min-height:90px;max-height:260px;font-size:14px}
body[data-studio="video"] textarea::placeholder{color:var(--muted)}
body[data-studio="video"] .templates-head{margin-top:0;min-height:20px}
body[data-studio="video"] .upload-box{height:176px}
body[data-studio="video"] .template-card{flex-basis:122px;height:176px;aspect-ratio:auto}
body[data-studio="video"] .template-settings{margin:14px 0 0}
body[data-studio="video"] .composer-footer{display:flex;align-items:center;justify-content:space-between;gap:20px;padding-top:22px}
body[data-studio="video"] .disclaimer-row{height:auto;margin:0;min-width:0}
body[data-studio="video"] .actions{flex:none;max-width:100%;gap:8px}
body[data-studio="video"] .pill{height:42px;flex:none;min-width:148px;max-width:230px;padding:0 14px;font-size:13px}
body[data-studio="video"] .generate-button{flex:none;min-width:132px;height:42px;font-size:14px}
body[data-studio="video"] .ai-toggle{position:static;margin-left:16px}
body[data-studio="video"] .canvas{display:block;min-height:0;flex:none;background:var(--surface);border-radius:0 0 16px 16px}
body[data-studio="video"] .canvas-content{position:relative;inset:auto;overflow:visible;display:block;padding:6px 28px 28px}
body[data-studio="video"] #project-content{max-width:none;scroll-margin-top:74px}
body[data-studio="video"] .composer{scroll-margin-top:74px}
body[data-studio="video"] .workflow-title{border-top:1px solid var(--line);padding-top:24px;margin:0}
body[data-studio="video"] .workflow-title h1{font-size:18px}
body[data-studio="video"] .workflow-empty{margin:18px 0 0;padding:18px 0;border:0}
body[data-studio="video"] .workflow-empty h2{font-size:16px}
body[data-studio="video"] .workflow-empty p{margin:7px 0;font-size:13px}
body[data-studio="video"] .workflow-empty .dialog-action{display:none}
body[data-studio="video"] .workflow-steps{display:none}
body[data-studio="video"] .nav-link.active{background:var(--selected)}
body[data-studio="video"] .nav-link.active svg{color:#fff}
@media(max-width:1200px){
  body[data-studio="video"] .composer-header{display:block}
  body[data-studio="video"] .intro{margin-top:12px;max-width:none}
  body[data-studio="video"] .form-scroll{grid-template-columns:minmax(0,1fr) minmax(0,1fr)}
}
@media(max-width:920px){
  body[data-studio="video"] .workspace{margin:74px 20px 90px 114px}
  body[data-studio="video"] .composer{padding:22px}
  body[data-studio="video"] .form-scroll{display:block}
  body[data-studio="video"] #template-section,body[data-studio="video"] #prompt-section{margin-top:22px}
  body[data-studio="video"] .composer-footer{display:block}
  body[data-studio="video"] .disclaimer-row{justify-content:flex-start;margin-bottom:14px}
  body[data-studio="video"] .actions{width:100%}
  body[data-studio="video"] .pill{min-width:0;flex:1;max-width:none}
  .studio-project-heading{align-items:flex-start}
  .studio-project-heading nav{display:none}
  body[data-studio="video"] .studio-project-heading #project-name{font-size:24px}
  body[data-studio="video"] .canvas-content{padding:4px 22px 22px}
}
@media(max-width:600px){
  body[data-studio="video"] .workspace{margin:108px 16px 100px}
  body[data-studio="video"] .composer{padding:20px 16px}
  body[data-studio="video"] .title-row,body[data-studio="video"] #mode-button{font-size:18px}
  body[data-studio="video"] #prompt-section{display:block}
  body[data-studio="video"] #prompt-section>div:not(.template-settings){display:block}
  body[data-studio="video"] #prompt-section .field-shell{margin-bottom:20px}
  body[data-studio="video"] .canvas-content{padding:0 16px 22px}
  body[data-studio="video"] .pill{padding:0 8px;font-size:11px}
  body[data-studio="video"] .generate-button{min-width:85px;padding:0 10px}
  body[data-studio="video"] .reset-button{width:36px;height:42px}
  body[data-studio="video"] .actions{gap:5px;flex-wrap:wrap}
  body[data-studio="video"] .actions .generate-button{flex:1;width:100%;flex-basis:100%;margin-top:6px}
  body[data-studio="video"] .canvas{margin-top:0}
  body[data-studio="video"] .studio-rail{top:auto;bottom:12px;height:64px}
}
@media(max-width:600px){
  .studio-header:has(.sa-tools){height:100px}
  .studio-header .sa-top-button{min-width:44px;min-height:44px}
  .studio-header .studio-nav a{height:44px}
  body[data-studio="design"]:has(.sa-tools) main{padding-top:100px}
  body[data-studio="creator"]:has(.sa-tools) main{padding-top:120px}
  body[data-studio="video"]:has(.sa-tools) .workspace,body[data-studio="video"]:has(.sa-tools) .route-workspace{margin-top:116px}
}

/* Graphite surfaces; porcelain accents are reserved for the primary action. */
.studio-header{background:var(--ground);border-bottom-color:var(--border)}
.studio-header .studio-mode,.studio-header .studio-help{color:var(--muted)}
.studio-header .sa-top-button{background:transparent;border-color:transparent;color:var(--muted)}
.studio-header .sa-top-button:hover{background:var(--raised);border-color:var(--control)}
.studio-header .sa-save-button{background:transparent;border-color:var(--border);color:var(--ink)}
.studio-header .sa-save-button:hover{background:var(--raised)}
.studio-header .sa-save-status{color:var(--muted)}
body[data-studio] .nav-button.active,body[data-studio] .nav-link.active,body[data-studio] .tool-option.selected{background:var(--selected);color:var(--ink)}
body[data-studio] .nav-button.active svg,body[data-studio] .nav-link.active svg{color:var(--accent)}
body[data-studio="design"] .composer:focus-within{border-color:var(--accent)}
body[data-studio="design"] .selected-template .prompt-chip{background:var(--raised);border-color:var(--border);color:var(--ink)}
body[data-studio="design"] .selected-template-controls button{background:var(--raised);border-color:var(--border);color:var(--ink)}
body[data-studio="design"] .assist-button:hover,body[data-studio="design"] #quickButtons button:hover{background:var(--raised);color:var(--ink)}
body[data-studio="design"] .generate-button:disabled,body[data-studio="video"] .generate-button:disabled{background:var(--raised);color:var(--muted);opacity:1}
html body[data-studio="design"].page-generate{--design-ink:var(--ink);--design-muted:var(--muted);--design-cool:var(--accent);--design-panel:var(--surface);--design-field:var(--raised);--design-line:var(--border)}
html body[data-studio="design"].page-generate .template-dock{background:var(--surface)}
html body[data-studio="design"].page-generate .inline-parameter-grid input{background:var(--raised);border-color:var(--control);color:var(--ink)}
html body[data-studio="design"].page-generate .inline-template-roles>button{background:var(--raised);border-color:var(--control);color:var(--ink)}
html body[data-studio="design"].page-generate .inline-role-assignment{background:var(--surface)}
body[data-studio="creator"] .nav-group{background:var(--ground)}
body[data-studio="creator"] .resolution button.active{background:var(--selected);color:var(--accent)}
body[data-studio] .sa-dialog{background:var(--surface);border-color:var(--border);color:var(--ink)}
body[data-studio] .sa-dialog .sa-primary{background:var(--accent);border-color:var(--accent);color:var(--accent-ink)}
body[data-studio] .sa-dialog .sa-primary:hover{background:var(--accent-hover);border-color:var(--accent-hover)}
body[data-studio] .sa-dialog :is(.sa-auth-tabs,.sa-project-tabs) button[aria-pressed=true]{background:var(--selected);border-color:transparent;color:var(--accent)}
body[data-studio] .sa-dialog :is(input,select):focus{border-color:var(--accent);outline:2px solid var(--accent);outline-offset:2px}
body[data-studio] .sa-dialog :is(button,a):focus-visible{outline-color:var(--accent)}
body[data-studio] .sa-dialog :is(.sa-button,.sa-notice,.sa-new-project):not(.sa-primary):not(.sa-danger){border-color:var(--border);background:var(--raised)}
body[data-studio] .sa-dialog.studio-glow-surface::after{content:none}
body[data-studio] .sa-dialog input,body[data-studio] .sa-dialog select{background:var(--raised);border-color:var(--control);color:var(--ink)}
.studio-motion-setting input{accent-color:var(--accent)}

/* Secondary tools and batch controls share the same quiet surface hierarchy. */
body[data-studio="design"] .nav-main,body[data-studio="design"] .nav-bottom{background:transparent}
body[data-studio="design"] .assist-button{background:transparent;color:var(--muted)}
body[data-studio="design"] .batch-slot,body[data-studio="design"] .custom-template-card,body[data-studio="design"] .material-group-card{background:var(--surface);border-color:var(--border)}
body[data-studio="design"] .batch-slot.is-variable{border-color:var(--control)}
body[data-studio="design"] .advanced-field input,body[data-studio="design"] .advanced-field select,body[data-studio="design"] .advanced-field textarea{background:var(--raised);border-color:var(--border);color:var(--ink)}
body[data-studio="design"] .advanced-field>span,body[data-studio="design"] .batch-slot-heading small,body[data-studio="design"] .batch-empty-upload>small,body[data-studio="design"] .batch-position>small{color:var(--muted)}
body[data-studio="design"] .batch-position>button{color:var(--muted);border-color:var(--border)}
body[data-studio="design"] .batch-position>button.active,body[data-studio="design"] .batch-type-tabs button.active{background:var(--selected);border-color:var(--control);color:var(--ink)}
body[data-studio="design"] .batch-empty-upload{border-color:var(--control)}
body[data-studio="design"] .batch-empty-upload>svg,body[data-studio="design"] .material-group-card>svg{color:var(--muted)}
body[data-studio="design"] .batch-summary{border-color:var(--border);color:var(--muted)}
body[data-studio="design"] .batch-summary strong{color:var(--ink)}
body[data-studio="design"] .batch-notice{background:var(--raised);border-color:var(--border);color:var(--ink)}
body[data-studio="design"] .batch-settings>.secondary-button{background:transparent;border-color:var(--border);color:var(--muted)}

@media(min-width:601px){
  body[data-studio="design"] .sidebar{width:64px;height:calc(100dvh - 54px);background:transparent}
  body[data-studio="design"] .nav-main{top:20px;transform:none;left:6px;width:52px;padding:4px;gap:8px}
  body[data-studio="design"] .nav-main .nav-button{width:44px;height:52px;border-radius:9px}
  body[data-studio="design"] .nav-bottom{left:6px;bottom:16px;width:52px;padding:4px;gap:8px}
  body[data-studio="design"] .nav-bottom .nav-button{width:44px;height:44px;border-radius:9px}
  body[data-studio="design"] main{margin-left:64px;padding-left:20px;padding-right:24px}
}
@media(max-width:600px){
  body[data-studio="design"]:not(.page-generate) .composer:not(.has-references) .composer-footer{grid-row:2;grid-column:1/-1}
}

/* Keep media (including transparent uploads) and editing surfaces above the field. */
body[data-studio="design"] .reference-item{background:var(--surface)}
body[data-studio="creator"] .ec-composer{background:var(--raised);border-color:var(--control);backdrop-filter:none;box-shadow:none}
body[data-studio="creator"] .ec-input::placeholder{color:var(--muted);opacity:1}
body[data-studio="creator"] :is(.ec-thumbnail,.library-card,.workflow-asset-preview,.workflow-result>button,.director-image-choice,.director-result,.lightbox-img){background:var(--surface)}
body[data-studio="video"] .cv-editor{--ed-surface:var(--surface);--ed-muted:var(--muted);--ed-line:var(--border)}
body[data-studio="video"] .cve-field :is(input[type=number],textarea,select){background:var(--raised)}
body[data-studio="video"] .cve-field textarea::placeholder{color:var(--muted);opacity:1}

/* Pointer light stays on the panel edge, clear of text and controls. */
.studio-glow-positioned{position:relative}
.studio-glow-surface::after{content:"";position:absolute;inset:0;box-sizing:border-box;border-radius:inherit;padding:1px;background:radial-gradient(280px circle at var(--surface-glow-x,50%) var(--surface-glow-y,50%),var(--accent),transparent 72%);-webkit-mask:linear-gradient(#fff 0 0) content-box,linear-gradient(#fff 0 0);-webkit-mask-composite:xor;mask:linear-gradient(#fff 0 0) content-box,linear-gradient(#fff 0 0);mask-composite:exclude;opacity:0;transition:opacity .25s;pointer-events:none;z-index:4}
.studio-glow-surface.studio-glow-active::after{opacity:.95}
body[data-studio] .studio-glow-surface.studio-glow-active{box-shadow:none}

/* Compact prompt bar uses the existing textarea, attachments and settings. */
body[data-studio="design"]:not(.page-generate) .composer{display:grid;grid-template-columns:44px minmax(0,1fr);grid-template-rows:auto auto;min-height:154px;padding:18px 20px;gap:12px;border-radius:18px}
body[data-studio="design"]:not(.page-generate) .composer:not(.has-references) .reference-tray{display:contents}
body[data-studio="design"]:not(.page-generate) .composer:not(.has-references) .upload-tile{grid-row:2;grid-column:1;width:44px;height:44px;border:0;border-radius:12px;background:var(--raised)}
body[data-studio="design"]:not(.page-generate) .composer:not(.has-references) .upload-tile>span{display:none}
body[data-studio="design"]:not(.page-generate) .composer textarea{grid-column:1/-1;grid-row:1;width:100%;min-height:74px;max-height:220px;font-size:15px;line-height:1.75;padding:0}
body[data-studio="design"]:not(.page-generate) .composer:not(.has-references) .composer-footer{grid-column:2;grid-row:2;min-height:0;align-items:center;gap:12px;flex-wrap:wrap}
body[data-studio="design"]:not(.page-generate) .composer-tools{display:flex;flex-direction:row;align-items:center;gap:10px;flex:1;min-width:0}
body[data-studio="design"]:not(.page-generate) .parameter-row{flex:1;gap:8px;flex-wrap:wrap}
body[data-studio="design"]:not(.page-generate) .assist-button{flex:none;white-space:nowrap}
body[data-studio="design"]:not(.page-generate) .selected-template:empty{display:none}
body[data-studio="design"]:not(.page-generate) .composer.has-references .reference-tray{grid-column:1/-1;grid-row:1;display:flex}
body[data-studio="design"]:not(.page-generate) .composer.has-references textarea{grid-row:2}
body[data-studio="design"]:not(.page-generate) .composer.has-references .composer-footer{grid-column:1/-1;grid-row:3;min-height:0;align-items:center}

/* Sling-style generation control; its native click handler remains the sender. */
body[data-studio] button.studio-sling{position:relative;width:46px!important;min-width:46px!important;max-width:46px;height:46px!important;min-height:46px;flex:0 0 46px!important;border-radius:50%!important;padding:0!important;margin-left:auto;margin-top:0;font-size:0!important;touch-action:none;transition:translate .32s cubic-bezier(.2,1.25,.3,1),background .2s,box-shadow .2s}
body[data-studio] button.studio-sling>*{display:none!important}
body[data-studio] button.studio-sling::after{content:"";position:absolute;left:14px;top:14px;width:18px;height:18px;background:var(--accent-ink);mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 20V4m-6 6 6-6 6 6' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/contain no-repeat}
body[data-studio] button.studio-sling:not(:disabled):hover{box-shadow:0 0 0 5px #bfece41f!important}
body[data-studio] button.studio-sling.studio-sling-pulling{transition:none;box-shadow:0 0 0 6px #bfece432!important}
body[data-studio] button.studio-sling:disabled::after{opacity:.5;background:var(--muted)}
body[data-studio] button.studio-sling[data-sling-busy="true"]::after{mask:none;background:none;border:2px solid #ffffff40;border-top-color:var(--ink);border-radius:50%;animation:studio-sling-spin .8s linear infinite}
@keyframes studio-sling-spin{to{rotate:360deg}}

/* One inspiration card flips at a time, with the original detail entry on back. */
body[data-studio="design"] .gallery-card.studio-flip-card{overflow:visible;perspective:1100px;border-radius:12px}
.studio-flip-rotor{position:relative;transform-style:preserve-3d;transition:transform .58s cubic-bezier(.22,1.15,.32,1);border-radius:inherit}
.studio-flip-front,.studio-flip-back{border-radius:inherit;backface-visibility:hidden;-webkit-backface-visibility:hidden;overflow:hidden;background:var(--surface)}
.studio-flip-front{position:relative}
.studio-flip-front>img:not(.original-thumb){display:block;width:100%;height:auto}
.studio-flip-back{position:absolute;inset:0;transform:rotateY(180deg);display:flex;flex-direction:column;gap:12px;padding:18px;border:1px solid var(--border);color:var(--ink)}
.studio-flipped .studio-flip-rotor{transform:rotateY(180deg)}
.studio-flip-back h3{font-size:15px;font-weight:600;margin:0;padding-right:28px}
.studio-flip-back p{font-size:13px;line-height:1.75;flex:1;min-height:0;overflow:auto;margin:0;color:var(--muted)}
.studio-flip-open{padding:9px 12px;border-radius:8px;background:var(--accent);color:var(--accent-ink);min-height:38px;font-size:12px}
.studio-flip-hint{position:absolute;bottom:12px;left:12px;padding:4px 8px;border-radius:6px;background:#233547bf;color:#f3fbff;font-size:11px;opacity:0;transition:opacity .2s}
.studio-flip-card:hover .studio-flip-hint,.studio-flip-card:focus-visible .studio-flip-hint{opacity:1}
.studio-flip-card .card-favorite{z-index:5}
@media(max-width:600px){
  body[data-studio="design"]:not(.page-generate) .composer{padding:16px;gap:12px}
  body[data-studio="design"]:not(.page-generate) .composer-tools{flex-wrap:wrap;gap:6px}
  body[data-studio="design"]:not(.page-generate) .assist-button{font-size:0;width:28px;padding:0;height:28px}
  body[data-studio="design"]:not(.page-generate) .assist-button svg{width:16px;height:16px}
  body[data-studio="design"]:not(.page-generate) .parameter-row{gap:5px}
  body[data-studio="design"]:not(.page-generate) .model-control{max-width:130px}
  .studio-flip-back{padding:12px;gap:8px}.studio-flip-back h3{font-size:13px}.studio-flip-back p{font-size:12px;line-height:1.65}.studio-flip-open{min-height:44px;padding:7px;font-size:12px}.studio-flip-hint{opacity:1;left:8px;bottom:8px}
}
@media(prefers-reduced-motion:reduce){
  .studio-glow-surface::after{display:none}
  .studio-flip-rotor,.studio-flipped .studio-flip-rotor{transform:none;transition:none}
  .studio-flip-back{transform:none;visibility:hidden}.studio-flipped .studio-flip-back{visibility:visible}.studio-flipped .studio-flip-front{visibility:hidden}
  body[data-studio] button.studio-sling{transition:none}
}

/* Phone prompt bar: one primary toolbar and one compact options row. */
@media(max-width:600px){
  body[data-studio="design"]:not(.page-generate) .composer{--prompt-controls-row:2;--prompt-options-row:3;--prompt-tag-row:4;grid-template-columns:44px minmax(0,1fr) 44px 46px;grid-template-rows:none;grid-auto-rows:auto;gap:10px 8px}
  body[data-studio="design"]:not(.page-generate) .composer.has-references{--prompt-controls-row:3;--prompt-options-row:4;--prompt-tag-row:5}
  body[data-studio="design"]:not(.page-generate) .composer .composer-footer,body[data-studio="design"]:not(.page-generate) .composer .composer-tools,body[data-studio="design"]:not(.page-generate) .composer .parameter-row{display:contents}
  body[data-studio="design"]:not(.page-generate) .composer .model-control{grid-row:var(--prompt-controls-row);grid-column:2/4;min-width:0;max-width:none;align-self:center}
  body[data-studio="design"]:not(.page-generate) .composer.has-references .model-control{grid-column:1/4}
  body[data-studio="design"]:not(.page-generate) #modelButton{width:100%;justify-content:flex-start;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
  body[data-studio="design"]:not(.page-generate) #modelButton,body[data-studio="design"]:not(.page-generate) #sizeButton,body[data-studio="design"]:not(.page-generate) #countButton{min-height:44px;min-width:44px}
  body[data-studio="design"]:not(.page-generate) #generateButton{grid-row:var(--prompt-controls-row);grid-column:4}
  body[data-studio="design"]:not(.page-generate) #sizeButton{grid-row:var(--prompt-options-row);grid-column:1/3;justify-self:start}
  body[data-studio="design"]:not(.page-generate) #countButton{grid-row:var(--prompt-options-row);grid-column:2;justify-self:start;margin-left:32px}
  body[data-studio="design"]:not(.page-generate) .composer .assist-button{grid-row:var(--prompt-options-row);grid-column:4;width:46px;height:44px;justify-self:end}
  body[data-studio="design"]:not(.page-generate) .composer .selected-template:not(:empty){grid-row:var(--prompt-tag-row);grid-column:1/-1}
  body[data-studio="design"] #quickButtons button{min-height:44px}
  .studio-flip-card .card-favorite::before{content:"";position:absolute;inset:-8px}
}
