/* Shared studio theme and reference-aligned page layouts. */
:root {
  --bg:#0a0b0d;
  --sidebar:#0a0b0d;
  --panel:#101215;
  --soft:#181b20;
  --line:#272b31;
  --muted:#898d96;
  --text:#eceef1;
  --green:#02bfe8;
  --green-ink:#00171f;
  --radius:14px;
  --nav-width:80px;
  color:#eceef1;
  background:#0a0b0d;
  font-family:Arial,"Microsoft YaHei","PingFang SC",sans-serif;
}
.studio-quote { min-height:16px; margin:0 0 8px; color:#9ea6b2; font-size:11px; line-height:1.45; overflow-wrap:anywhere; }
.studio-quote.quote-error,[data-quote-summary].quote-error { color:#f2b2ad; }
.quote-confirm-dialog { width:min(440px,calc(100vw - 28px)); padding:23px; border:1px solid #39434e; border-radius:14px; color:#edf2f8; background:#10151b; box-shadow:0 24px 90px #0009; }
.quote-confirm-dialog::backdrop { background:#000a; }
.quote-confirm-dialog h2 { margin:0 0 15px; font-size:19px; }
.quote-confirm-dialog p { margin:10px 0; line-height:1.7; font-size:13px; }
.quote-confirm-dialog .quote-confirm-units { color:#a6b3c2; font-size:12px; }
.quote-confirm-actions { display:flex; justify-content:flex-end; gap:10px; margin-top:22px; }
.status-review,.status-partial { color:#e6c78f; background:#302719; border-color:#665236; }
.review-callout,.partial-callout { color:#dccba8; background:#241f17; border-color:#544631; }
.portrait-consent { line-height:1.65; align-items:flex-start; }
body { background:var(--bg); color:var(--text); }
button,a,input,select,textarea { -webkit-tap-highlight-color:transparent; }
button:focus-visible,a:focus-visible,input:focus-visible,textarea:focus-visible,select:focus-visible { outline-color:var(--green); }
::selection { background:#04bfe844; }
.sidebar { width:80px; border-right:1px solid #17191d; background:#0b0d10; padding:10px 7px; overflow:visible; }
.brand { padding:5px 0 11px; justify-content:center; height:49px; }
.brand > span:not(.brand-icon) { display:none; }
.brand-icon { background:#151a21; color:#d9f9ff; width:33px; height:33px; border-radius:10px; border:1px solid #303943; }
.brand-icon svg { width:23px; height:23px; stroke-width:2; }
#navigation { padding:2px 0; flex:1; overflow-y:auto; scrollbar-width:none; }
.nav-group + .nav-group { margin-top:3px; }
.nav-caption,.nav-out { display:none; }
.nav-link { min-height:58px; padding:8px 2px; gap:5px; flex-direction:column; justify-content:center; margin:2px 0; color:#a6a9b2; border-radius:10px; font-size:11px; line-height:1.25; text-align:center; }
.nav-link svg { width:21px; height:21px; stroke-width:1.6; }
.nav-link > span { max-width:62px; }
.nav-link:hover { background:#171b23; color:white; }
.nav-link.active { color:#effbff; background:#112331; border:1px solid #183344; }
.nav-link.active svg { color:#4ddaff; }
.sidebar-footer { display:none; }
.sidebar-account { margin-top:8px; display:flex; flex-direction:column; align-items:center; gap:12px; padding:6px 0; }
.sidebar-account .top-badge { font-size:8px; padding:3px 5px; color:#787f8c; background:transparent; border-color:transparent; order:3; }
.sidebar-account .balance-pill { width:57px; min-height:56px; display:flex; flex-wrap:wrap; justify-content:center; align-items:center; gap:3px; padding:5px 3px; border:1px solid #292d35; border-radius:13px; background:#101319; font-size:11px; }
.sidebar-account .balance-pill svg { width:11px; height:11px; color:#cbd2de; }
.sidebar-account .balance-pill span { color:var(--green); width:100%; text-align:center; font-size:10px; }
.sidebar-account .account-button b { display:none; }
.sidebar-account .account-button > span { width:31px; height:31px; background:#ddd6c9; color:#4e4456; border:0; border-radius:10px; }
.sidebar-account .button { min-width:0; font-size:10px; padding:7px 5px; white-space:normal; }
.surface { margin-left:80px; }
.topbar { display:none; }
#main { max-width:none; padding:32px 38px; }
.page-footer { color:#686c74; font-size:10px; padding:16px 32px; border-color:#1d2025; }
body[data-route="home"] #main,body[data-route="discover"] #main { padding:0 36px 32px; }
body[data-route="home"] .page-footer { border:0; }
.button,.icon-button { border-radius:8px; font-weight:500; }
.button { min-height:38px; padding:8px 13px; }
.button.primary { background:var(--green); color:#001820; border:1px solid #00c7ef; font-weight:650; }
.button.primary:hover:not(:disabled) { background:#31d0f3; border-color:#52dcf7; }
.button.secondary,.icon-button { background:#14171c; border-color:#30343c; color:#d5d8de; }
.button.secondary:hover:not(:disabled),.icon-button:hover:not(:disabled) { background:#22262d; border-color:#424954; }
.plain-button,.subtle-link { color:#9298a4; }
.plain-button:hover,.subtle-link:hover { color:#e1f7ff; }
.tone-lime,.tone-violet,.tone-blue,.tone-pink,.tone-gold { --tone:#72d8f0; --tone-bg:#12252d; --tone-line:#25414b; }
.tool-icon { background:#181e25; border-color:#2b3540; color:#a1cfe1; border-radius:10px; width:37px; height:37px; }
.badge { font-weight:400; font-size:10px; }
.badge.neutral { color:#a1a7b1; background:#191d23; border-color:#2a3038; }
.badge.test { color:#8da0b5; background:#171d25; border-color:#2d3c4b; }
.badge.live,.badge.status-succeeded { color:#7ed9c2; background:#142824; border-color:#20443b; }
.badge.status-running { color:#7ed5f2; background:#142d3c; border-color:#244453; }
.eyebrow { font-size:9px; color:#7c8696; font-weight:500; }
.panel,.tool-card,.example-card { background:#101318; border-color:#292e36; border-radius:12px; }
.tool-card:hover { border-color:#435461; background:#151a21; transform:translateY(-2px); }
.tool-card h3 { font-weight:550; font-size:15px; }
.tool-card p { color:#888f9a; }
.card-link { color:#b3c0cf; font-size:11px; }
.page-heading { margin-bottom:24px; }
.page-heading h1 { font-weight:600; font-size:25px; letter-spacing:-.02em; }
.page-heading p { font-size:12px; color:#858c98; }
.section-title h2 { font-size:18px; font-weight:550; }
.field > span,.field > label,.check,.module-field legend { color:#bcc0c9; font-weight:400; font-size:12px; }
input:not([type=checkbox]):not([type=file]),textarea,select { background:#111419; border-color:#2b3038; color:#d9dce4; font-size:12px; border-radius:8px; }
input::placeholder,textarea::placeholder { color:#727985; }
select { color-scheme:dark; }
select option,select optgroup { background:#111419; color:#e8edf4; }
select option:checked { background:#163c4a; color:#ffffff; }
select option:disabled { color:#82909f; }
input:not([type=checkbox]):not([type=file]):focus,textarea:focus,select:focus { border-color:#4b6477; }
select[multiple] option:checked { background:#183440; color:#c8f3ff; }
.field em { color:#62cde8; }
.module-field { border-color:#2c333d; }
.selected-order li { background:#1b222c; }
.filter { background:transparent; color:#8d939e; border-color:transparent; font-size:12px; min-height:28px; padding:5px 13px; border-radius:18px; }
.filter.selected,.filter:hover { background:#1e222a; border-color:#292e38; color:#f2f4f8; }
.test-callout { color:#8997a8; background:#151c25; border-color:#273342; font-size:11px; }
.callout { color:#b2c0d2; background:#17202b; border-color:#2a394c; font-size:11px; }
.callout strong { font-weight:500; }
.error-callout,.form-error { color:#f5b4b1; background:#2f1c21; border-color:#51303a; }
.panel-title { border-color:#262c35; }
.panel-title h2 { font-size:14px; font-weight:500; }
.panel-title p { color:#78818f; }
.empty strong { font-size:14px; font-weight:500; }
.empty p { font-size:12px; color:#7d8490; }
.empty-icon { background:transparent; border:0; color:var(--green); }
.result-meta span { color:#9eb6cc; background:#1b252f; font-size:10px; }
.result-text { background:#10151c; color:#d4d9e2; border-color:#293441; }
.bubble { background:#171e27; border-color:#2a3543; }
.bubble.user { background:#17303d; border-color:#2c4a59; }
.bubble small { color:#71bbd6; }
.drama-history strong { color:#a3bdce; }
.wallet-metrics strong,.plan-card > strong { color:#e1edf6; }
.output-list article { background:#141a22; border-color:#293443; }
.asset-icon { background:#202a37; color:#9ac9df; }
.shot-list,.shot-list > div + div { border-color:#293443; }
.shot-list strong { color:#94c8de; }
.account-summary,.checkout-summary { background:#17202c; }
dialog { color:var(--text); background:#14191f; border-color:#343d49; border-radius:14px; }
dialog::backdrop { background:#040609c9; backdrop-filter:blur(6px); }
.dialog-header h2 { font-size:17px; font-weight:550; }
.asset-preview { background:#0a0d11; }
.notice { color:#d5edfc; background:#183344; border-color:#365669; }
progress,progress::-webkit-progress-bar { background:#26313c; }

/* Home: a direct composer, quick scenes and photographic discovery. */
.home-screen { width:100%; padding-top:1px; }
.home-composer-wrap { position:relative; max-width:830px; margin:70px auto 34px; }
.home-composer-wrap::after { content:''; pointer-events:none; position:absolute; z-index:-1; width:75%; height:80px; left:12.5%; bottom:-34px; background:#6f9ec442; filter:blur(42px); border-radius:50%; }
.home-composer { position:relative; min-height:174px; display:grid; grid-template-columns:76px minmax(0,1fr); grid-template-rows:minmax(80px,1fr) 40px; gap:12px 14px; border:1px solid #32343b; border-radius:20px; padding:16px 18px; background:linear-gradient(135deg,#14171b,#111316); box-shadow:0 0 0 1px #1c1f2477; }
.home-reference { align-self:start; display:grid; gap:5px; justify-items:center; }
.home-reference button,.home-reference .reference-tile { display:grid; place-items:center; width:59px; height:67px; border:1px solid #4b5f6a; border-radius:12px; background:linear-gradient(150deg,#31434d,#1c333f); color:#ecf8ff; box-shadow:0 0 0 4px #1e282c; transform:rotate(-6deg); }
.home-reference svg { width:22px; height:22px; }
.home-reference small { color:#728390; font-size:9px; text-align:center; }
.home-composer textarea { grid-column:2; min-height:72px; border:0; background:transparent; resize:none; padding:1px 0; color:#e1e5ed; font-size:14px; line-height:1.7; outline:none; }
.home-composer textarea::placeholder { color:#b5b8c0; }
.home-composer textarea:focus { outline:0; }
.home-composer-bottom { grid-column:1/-1; display:flex; align-items:center; gap:9px; justify-content:space-between; align-self:end; }
.home-composer-bottom select { width:auto; max-width:200px; border:0; background:transparent; font-size:12px; padding:4px 18px 4px 0; min-height:30px; }
.home-composer-bottom > span { font-size:11px; color:#6e7987; margin-left:auto; }
.home-send { display:grid; place-items:center; width:34px; height:34px; border:0; border-radius:50%; background:var(--green); color:#00212b; }
.home-send svg { transform:rotate(-90deg); width:20px; height:20px; }
.home-selected { grid-column:1/-1; display:flex; flex-wrap:wrap; gap:5px; }
.home-selected .badge { background:#1c2a35; font-size:10px; }
.scene-strip { display:grid; grid-template-columns:repeat(7,minmax(0,1fr)); gap:10px; max-width:1200px; margin:0 auto 35px; }
.scene-card { position:relative; min-height:66px; display:flex; align-items:center; gap:9px; overflow:hidden; border:1px solid #262b32; background:#151a20; color:#e2e5ec; padding:9px 10px; border-radius:10px; text-align:left; }
.scene-card:hover { border-color:#516879; background:#1d2630; }
.scene-card img { width:40px; height:46px; object-fit:cover; border-radius:6px; opacity:.85; }
.scene-card svg { width:25px; height:25px; color:#9eaec0; }
.scene-card strong { display:block; font-weight:500; font-size:12px; }
.scene-card small { display:block; color:#78818f; font-size:9px; line-height:1.5; margin-top:3px; }
.home-gallery { margin:18px 20px 0; }
.gallery-tabs { display:flex; align-items:center; gap:9px; margin:0 0 19px; }
.gallery-tabs button { border:0; border-radius:15px; background:transparent; color:#989ca7; padding:6px 14px; font-size:12px; }
.gallery-tabs button[aria-pressed=true],.gallery-tabs button.active,.gallery-tabs button.selected { color:#f6f8fc; background:#1d2026; }
.gallery-grid { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:15px 12px; align-items:start; }
.gallery-card { position:relative; display:block; overflow:hidden; border:1px solid #1b1f24; border-radius:12px; background:#171b21; aspect-ratio:3/4; min-height:220px; max-height:570px; }
.gallery-card:nth-child(4n+2) { aspect-ratio:4/5; }
.gallery-photo { position:absolute; inset:0; width:100%; height:100%; object-fit:cover; transition:transform .35s; }
.gallery-card:hover .gallery-photo { transform:scale(1.025); }
.gallery-card::after { content:''; position:absolute; inset:55% 0 0; background:linear-gradient(transparent,#000b); pointer-events:none; }
.gallery-overlay,.gallery-card-caption { position:absolute; left:13px; right:13px; bottom:13px; z-index:1; display:flex; align-items:end; gap:10px; }
.gallery-card strong { font-size:12px; font-weight:500; text-shadow:0 1px 6px #000; }
.gallery-card small { display:block; color:#d1d4dc; font-size:10px; margin-top:5px; }
.gallery-actions { display:flex; align-items:center; gap:4px; margin-left:auto; flex-shrink:0; }
.gallery-actions button { display:flex; align-items:center; gap:4px; background:transparent; color:#fff; border:0; padding:5px; font-size:10px; border-radius:7px; }
.gallery-actions button:hover,.gallery-actions button[aria-pressed=true] { color:#6de2ff; background:#0004; }
.gallery-reuse { position:absolute; top:12px; right:12px; z-index:2; opacity:0; border:1px solid #ffffff40; background:#121820b8; color:white; border-radius:16px; padding:7px 12px; font-size:11px; backdrop-filter:blur(6px); }
.gallery-card:hover .gallery-reuse,.gallery-reuse:focus-visible { opacity:1; }
.gallery-card .gallery-description { display:none; }

/* Creation: inputs, preview and a persistent right-hand task queue. */
body:has(.studio-screen) { overflow:hidden; }
body:has(.studio-screen) #main { height:100dvh; padding:22px 22px 18px; background-image:linear-gradient(#18202a54 1px,transparent 1px),linear-gradient(90deg,#18202a54 1px,transparent 1px); background-size:36px 36px; }
body:has(.studio-screen) .page-footer { display:none; }
.studio-screen { height:100%; }
.studio-grid { display:grid; grid-template-columns:minmax(360px,.95fr) minmax(340px,1.05fr) 248px; gap:13px; height:100%; }
.studio-input,.studio-preview,.studio-queue { min-width:0; height:100%; border:1px solid #2a3038; border-radius:17px; background:#0e1216e8; overflow:hidden; }
.studio-input { padding:12px; display:flex; flex-direction:column; }
.studio-tool-head { display:flex; align-items:center; gap:8px; min-height:38px; margin:0 1px 11px; }
.studio-tool-head h1 { font-size:15px; font-weight:550; }
.studio-tool-head .tool-icon { width:28px; height:28px; background:transparent; border:0; }
.studio-tool-head .new-button,.studio-tool-head > button:last-child { margin-left:auto; }
.studio-tool-head .badge { margin-left:0; font-size:8px; padding:2px 5px; }
.studio-input #workspace-form { display:flex; flex-direction:column; flex:1; min-height:0; gap:10px; }
.studio-input-scroll { flex:1; overflow-y:auto; overflow-x:hidden; min-height:0; display:flex; flex-direction:column; gap:12px; padding:2px 2px 10px; scrollbar-width:thin; scrollbar-color:#343f4c transparent; }
.studio-input .field { gap:5px; }
.studio-input .field:has(textarea[name=prompt]) { flex:1; min-height:190px; }
.studio-input textarea[name=prompt] { flex:1; min-height:160px; max-height:none; background:#101215; border-color:#2b3037; border-radius:12px; padding:13px; resize:vertical; }
.studio-input .workspace-shortcuts { gap:5px; margin:0 0 10px; padding-bottom:1px; flex-wrap:wrap; }
.studio-input .workspace-shortcuts .button { font-size:10px; min-height:27px; padding:4px 8px; border-radius:14px; }
.studio-input .workspace-shortcuts .button:first-child { color:#bfefff; border-color:#234d5d; }
.studio-input .submit-bar { position:relative; flex-shrink:0; display:flex; flex-direction:column; align-items:stretch; gap:7px; padding-top:8px; border-color:#242b34; background:#0e1216; margin-top:auto; }
.studio-input .submit-bar > div { display:flex; justify-content:space-between; align-items:center; }
.studio-input .submit-bar small { font-size:10px; color:#6f7d8f; }
.studio-input .submit-bar strong { font-size:11px; color:#92b4c7; margin:0; font-weight:500; }
.studio-input .submit-bar .button { width:100%; min-height:40px; font-size:13px; border-radius:12px; }
.studio-input .test-callout { margin:0; padding:6px 9px; font-size:10px; }
.studio-input .asset-field { padding:8px; border:1px dashed #303a46; border-radius:10px; background:#12171d; }
.studio-input .asset-picker { grid-template-columns:minmax(0,1fr) auto; gap:6px; }
.studio-input .asset-picker select { font-size:11px; background:#10151b; min-height:32px; padding:6px; border-color:#283440; }
.studio-input .asset-picker .button { font-size:10px; min-height:32px; padding:5px 8px; }
.studio-input .asset-field small { font-size:9px; color:#728090; }
.studio-input .field-grid { gap:7px; }
.studio-input .field-grid .field > span { font-size:10px; color:#7e8b9d; }
.studio-input .field-grid select,.studio-input .field-grid input { min-height:34px; }
.studio-preview { display:flex; flex-direction:column; padding:13px; }
.studio-preview-head { display:flex; justify-content:space-between; align-items:center; gap:10px; padding:1px 1px 14px; flex-shrink:0; }
.studio-preview-head h2 { font-size:12px; font-weight:500; }
.studio-preview-head .button { padding:4px 7px; min-height:24px; font-size:10px; }
.studio-preview #job-result { flex:1; min-height:0; overflow-y:auto; background:#11151a; border-radius:12px; padding:15px; scrollbar-width:thin; scrollbar-color:#343f4c transparent; }
.studio-preview #job-result:has(> .empty) { display:grid; align-items:center; }
.studio-preview #job-result > .empty { min-height:100%; }
.studio-preview .job-detail { gap:12px; }
.studio-preview .job-detail .result-text { max-height:none; padding:15px; line-height:1.9; }
.studio-preview .output-list article { display:grid; grid-template-columns:1fr auto; padding:8px; }
.studio-preview .output-list article .asset-icon { display:none; }
.studio-preview .output-list article [data-media-preview] { grid-column:1/-1; min-height:180px; max-height:60vh; background:#090c11; }
.studio-preview .output-list article:has(video) { overflow:hidden; }
.studio-preview .output-list { gap:14px; }
.studio-result-media { width:100%; height:clamp(250px,55vh,580px); min-height:250px; border:1px solid #202b38; border-radius:10px; background:#090d12; }
.studio-result-media img,.studio-result-media video { width:100%; height:100%; object-fit:contain; }
.studio-result-media audio { width:min(90%,420px); }
.studio-preview .studio-result-media img,.studio-preview .studio-result-media video { object-fit:contain; }
.studio-preview .studio-result-media { display:block; min-height:250px; }
.studio-preview .studio-result-media img,.studio-preview .studio-result-media video { max-height:100%; min-height:0; }
.studio-preview .empty strong { font-size:14px; }
.studio-preview .empty .empty-icon { color:#09bde7; }
.studio-preview .test-callout { font-size:10px; padding:8px; opacity:.85; }
.studio-queue { padding:13px 11px; display:flex; flex-direction:column; }
.queue-head { display:flex; justify-content:space-between; align-items:center; gap:8px; margin-bottom:12px; }
.queue-head h2 { font-size:12px; font-weight:500; }
.queue-head .plain-button { font-size:10px; }
.queue-label { font-size:10px; color:#858d99; margin:6px 0 10px; }
#workspace-queue { overflow-y:auto; flex:1; scrollbar-width:thin; scrollbar-color:#343f4c transparent; }
.queue-job { display:flex; gap:8px; align-items:center; width:100%; border:1px solid #292f38; border-radius:9px; background:#151a21; text-align:left; padding:9px; margin:0 0 8px; color:#c5cbd5; }
.queue-job:hover { border-color:#425667; background:#1a2632; }
.queue-job.active { border-color:#0b8ba9; background:#122a35; }
.queue-job strong,.queue-job small { display:block; }
.queue-job strong { font-size:10px; font-weight:450; }
.queue-job small { color:#6c7889; font-size:9px; margin-top:4px; }
.queue-job .badge { margin-left:auto; font-size:8px; padding:3px 4px; }
.queue-job svg { width:16px; height:16px; color:#627e98; }
.queue-empty { color:#606c7c; text-align:center; font-size:11px; padding:45px 5px; }
.queue-drafts { margin-bottom:14px; max-height:30%; overflow:auto; }
.queue-drafts .button { width:100%; margin-bottom:5px; font-size:10px; justify-content:flex-start; }

/* Authenticated previews use local object URLs. */
[data-media-preview] { position:relative; overflow:hidden; display:grid; place-items:center; min-height:100px; background:#111722; }
[data-media-preview] img,[data-media-preview] video { display:block; width:100%; height:100%; object-fit:cover; }
.media-preview-fallback { display:grid; place-items:center; color:#526579; font-size:11px; gap:7px; }
.asset-card-visual { position:relative; min-height:190px; padding:0; border-color:#242c37; border-radius:8px; overflow:hidden; background:#111820; }
.asset-card-visual .badge { position:absolute; top:9px; right:9px; z-index:1; background:#111a25b8; backdrop-filter:blur(8px); }
.asset-card-visual > .tool-icon { position:absolute; left:10px; top:10px; z-index:1; width:26px; height:26px; background:#121b2677; }
.asset-card-visual [data-media-preview] { min-height:190px; width:100%; }
.asset-card h3 { font-size:12px; font-weight:500; }
.asset-card p { color:#7e8999; font-size:10px; }
.asset-grid { grid-template-columns:repeat(4,minmax(0,1fr)); gap:14px; }
.asset-card { padding:10px; }

.mobile-topbar { display:none; }
.home-composer { display:flex; flex-direction:column; gap:12px; }
.home-composer-bottom { align-self:stretch; width:100%; }
.gallery-photo[src$="scene-1.jpg"] { object-position:72% 50%; }
.gallery-photo[src$="scene-2.jpg"] { object-position:50% 65%; }
.home-composer-top { display:grid; grid-template-columns:66px minmax(0,1fr); gap:15px; flex:1; }
button.home-reference { display:grid; place-items:center; align-self:start; width:57px; height:63px; padding:8px; gap:4px; border:1px solid #475a65; border-radius:11px; background:linear-gradient(145deg,#2a3e4a,#1d303a); color:#d7ecf7; box-shadow:0 0 0 3px #222a31; transform:rotate(-5deg); }
button.home-reference span { font-size:8px; color:#acc0cd; }
.home-composer-top textarea { grid-column:auto; background:transparent; }
.home-selected-assets { display:flex; gap:6px; flex-wrap:wrap; }
.home-selected-assets:empty { display:none; }
.home-reference-chip { padding:4px 7px; border:1px solid #35424f; background:#192734; border-radius:7px; font-size:10px; color:#b9d2e3; max-width:180px; text-overflow:ellipsis; overflow:hidden; white-space:nowrap; }
.scene-strip { margin-bottom:24px; }
.scene-button { display:flex; align-items:center; justify-content:center; min-height:48px; border:1px solid #272d36; border-radius:10px; background:linear-gradient(135deg,#171f28,#10151b); color:#c3cfdf; gap:8px; font-size:11px; white-space:nowrap; }
.scene-button:hover { color:#d8f5ff; border-color:#3b5b70; background:#172934; }
.scene-button:first-child,.scene-button:nth-child(2) { border-color:#294354; background:linear-gradient(120deg,#172b37,#10171e); }
.scene-button svg { width:19px; height:19px; color:#7899b3; }
.gallery-open { position:absolute; inset:0; display:block; padding:0; border:0; border-radius:0; width:100%; height:100%; background:#13181f; text-align:left; color:#fff; }
.gallery-open::after { content:''; position:absolute; inset:55% 0 0; background:linear-gradient(transparent,#000b); }
.gallery-card-title { position:absolute; z-index:1; bottom:42px; left:13px; right:13px; font-size:13px; font-weight:500; text-shadow:0 1px 6px #000; }
.gallery-type { position:absolute; top:11px; left:11px; z-index:1; display:grid; place-items:center; width:27px; height:27px; background:#111a2380; border:1px solid #ffffff23; border-radius:8px; backdrop-filter:blur(5px); }
.gallery-card-meta { align-items:center; color:#c3cad3; font-size:10px; }
.gallery-card-meta > div { display:flex; gap:6px; margin-left:auto; }
.gallery-like { background:transparent; color:#e4eaf0; border:0; border-radius:6px; font-size:12px; padding:3px 4px; }
.gallery-like:hover,.gallery-like.active { color:#71dcfa; }
.studio-tool-selector { display:block; min-width:0; }
.studio-tool-selector select { min-height:32px; background:transparent; border-color:transparent; font-size:14px; font-weight:550; padding:4px 25px 4px 5px; max-width:200px; color:#e8edf4; }
.studio-new { margin-left:auto; display:flex; align-items:center; gap:4px; color:#9ba4b2; border:0; background:transparent; font-size:11px; padding:5px 3px; }
.studio-prompt-area { display:flex; flex-direction:column; flex:1; min-height:190px; gap:9px; }
.studio-prompt-area .prompt-field { flex:1; display:flex; flex-direction:column; }
.studio-prompt-area .workspace-shortcuts { margin-bottom:0; }
.studio-settings,.studio-fields { display:grid; gap:12px; }
.studio-reference-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; }
.studio-reference-grid > :only-child { grid-column:1/-1; }
.studio-reference-grid .asset-picker { display:flex; flex-direction:column; }
.studio-reference-grid .asset-picker select { width:100%; }
.studio-reference-grid .asset-picker .upload-control { align-self:flex-start; }
.studio-reference-grid .compact-references { padding:4px 3px 8px; border:0; background:transparent; }
.reference-upload-row { display:flex; flex-wrap:wrap; gap:14px; padding:7px 2px; }
.reference-upload-tile { position:relative; width:66px; min-height:72px; display:flex; flex-direction:column; align-items:center; gap:6px; color:#bbc4cf; cursor:pointer; font-size:10px; }
.reference-upload-tile svg { display:block; width:53px; height:53px; padding:15px; border:1px solid #3a414c; border-radius:11px; background:#1c242d; color:#bdc9d5; }
.reference-upload-tile:hover svg { color:#81ddf7; border-color:#32708a; background:#18323f; }
.reference-upload-tile small { display:none; }
.reference-upload-tile input[type=file] { position:absolute; inset:0; width:1px; height:1px; opacity:0; overflow:hidden; }
.reference-library { border-top:1px solid #222a34; padding-top:8px; margin-top:6px; }
.reference-library summary { cursor:pointer; color:#748a9e; font-size:10px; list-style:none; padding:4px 2px; }
.reference-library summary:hover { color:#9dc7df; }
.reference-library select { margin-top:6px; width:100%; max-height:98px; }
.reference-library > small { display:block; margin-top:5px; }
.material-library-link { border:0; border-top:1px solid #222a34; background:transparent; color:#748a9e; font-size:10px; text-align:left; padding:10px 2px; margin-top:4px; }
.material-library-link:hover { color:#9dc7df; }
button.reference-upload-tile { border:0; background:transparent; padding:0; }
.material-slot { display:flex; flex-direction:column; align-items:center; justify-content:center; gap:7px; width:100%; min-height:104px; padding:13px 10px; border:1px dashed #394452; border-radius:10px; background:#121820; color:#a5b0bf; text-align:center; }
.material-slot:hover { border-color:#3889a1; background:#162933; color:#c8eff9; }
.material-slot > span { font-size:11px; max-width:100%; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.material-slot > small { font-size:9px; color:#65788c; }
.material-slot.has-selection { border-style:solid; border-color:#285267; background:#142631; color:#b3dce9; }
.studio-submit { flex-shrink:0; margin-top:auto; display:grid; gap:8px; padding-top:9px; background:#0e1216; border-top:1px solid #252c35; }
.studio-model { border:1px solid #2a3440; border-radius:10px; padding:9px 10px; display:flex; align-items:center; justify-content:space-between; gap:8px; font-size:11px; color:#b1bbc9; }
.studio-model > span { min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.studio-model .test-callout,.studio-model .badge { flex-shrink:0; }
.studio-generate { display:flex; width:100%; min-height:42px; justify-content:center; align-items:center; gap:10px; border-radius:11px; }
.studio-generate > span { display:inline-flex; align-items:center; gap:5px; }
.studio-generate > span:last-child { font-size:11px; opacity:.8; font-weight:400; }
.studio-preview-head { font-size:12px; }
.studio-preview-head > span:last-child { color:#747f8e; font-size:10px; }
.preview-placeholder { height:100%; min-height:320px; display:flex; flex-direction:column; align-items:center; justify-content:center; text-align:center; gap:14px; }
.preview-placeholder-icon { color:var(--green); }
.preview-placeholder-icon svg { width:30px; height:30px; stroke-width:1.3; }
.preview-placeholder strong { font-size:14px; font-weight:500; }
.preview-placeholder p { color:#778291; font-size:11px; }
.preview-placeholder-actions { display:flex; flex-direction:column; align-items:center; gap:12px; margin-top:8px; }
.preview-placeholder-actions > span { font-size:9px; color:#425363; }
.studio-preview #job-result:has(> .preview-placeholder) { display:flex; flex-direction:column; }
.studio-preview #job-result > .preview-placeholder { flex:1; }
#workspace-queue { display:flex; flex-direction:column; }
.queue-head { flex-shrink:0; justify-content:flex-start; padding-bottom:10px; border-bottom:1px solid #20262f; }
.queue-tab { display:flex; align-items:center; gap:4px; background:transparent; border:0; padding:3px 0; color:#717d8c; font-size:11px; margin-right:12px; }
.queue-tab.active { color:#dde5ee; }
.queue-tab > span { color:#56667a; font-size:9px; }
.queue-list { flex:1; overflow-y:auto; padding-top:10px; scrollbar-width:thin; }
.queue-job.selected { border-color:#16647b; background:#152a37; }
.queue-job-icon { display:grid; place-items:center; width:32px; height:39px; background:#1f2b39; border-radius:5px; flex-shrink:0; }
.queue-job > span:nth-child(2) { min-width:0; }
.queue-job strong { white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.queue-status { display:block; color:#7193a9; font-size:8px; margin-top:6px; }
.queue-status.status-succeeded { color:#59b5a3; }
.queue-status.status-failed { color:#b77d88; }
.queue-all { color:#657b92; font-size:10px; display:flex; align-items:center; justify-content:space-between; padding-top:12px; border-top:1px solid #20262f; }

@media(min-width:2200px) {
  .studio-grid { grid-template-columns:minmax(450px,.9fr) minmax(440px,1.1fr) 270px; }
  .gallery-grid { grid-template-columns:repeat(5,minmax(0,1fr)); }
  .home-composer-wrap { margin-top:78px; }
}
@media(max-width:1450px) {
  .studio-grid { grid-template-columns:minmax(320px,.95fr) minmax(280px,1fr) 210px; gap:10px; }
  body:has(.studio-screen) #main { padding:15px; }
  .scene-strip { gap:7px; }
  .scene-card { padding:8px; }
  .scene-card small { display:none; }
  .gallery-card { min-height:260px; }
}
@media(max-width:1120px) {
  :root { --nav-width:80px; }
  .studio-grid { grid-template-columns:minmax(300px,.95fr) minmax(300px,1.05fr); }
  .studio-queue { display:none; }
  .gallery-grid,.asset-grid { grid-template-columns:repeat(3,minmax(0,1fr)); }
  .scene-strip { display:flex; overflow-x:auto; padding-bottom:5px; }
  .scene-card { flex:0 0 145px; }
  .home-gallery { margin-inline:0; }
}
@media(max-width:760px) {
  .sidebar { width:64px; padding:7px 4px; transform:none; }
  .nav-link { min-height:54px; font-size:9px; gap:5px; }
  .nav-link svg { width:19px; height:19px; }
  .brand { height:41px; padding-bottom:5px; }
  .brand-icon { width:29px; height:29px; }
  .sidebar-account { gap:7px; }
  .sidebar-account .balance-pill { width:48px; font-size:9px; min-height:48px; }
  .sidebar-account .top-badge { display:none; }
  .surface { margin-left:64px; }
  #main,body[data-route=home] #main,body[data-route=discover] #main { padding:18px 15px; }
  body:has(.studio-screen) { overflow:auto; }
  body:has(.studio-screen) #main { height:auto; padding:12px; }
  .studio-grid { grid-template-columns:minmax(0,1fr); height:auto; }
  .studio-input { min-height:620px; height:auto; }
  .studio-input-scroll { max-height:none; }
  .studio-preview { min-height:360px; height:auto; }
  .studio-queue { display:flex; min-height:180px; height:auto; }
  .studio-input #workspace-form { min-height:500px; }
  .studio-preview #job-result { min-height:280px; }
  .home-composer-wrap { margin:25px 0 24px; }
  .home-composer { grid-template-columns:52px minmax(0,1fr); padding:14px; gap:10px; min-height:172px; border-radius:15px; }
  .home-reference button,.home-reference .reference-tile { width:43px; height:51px; border-radius:9px; }
  .home-composer textarea { font-size:12px; }
  .home-composer-top { grid-template-columns:49px minmax(0,1fr); gap:10px; }
  button.home-reference { width:43px; height:51px; }
  .scene-button { flex:0 0 136px; min-height:43px; font-size:10px; }
  .gallery-card-title { bottom:37px; font-size:11px; left:9px; right:9px; }
  .gallery-card-meta { font-size:9px; }
  .gallery-type { left:8px; top:8px; width:22px; height:22px; }
  .studio-reference-grid { grid-template-columns:minmax(0,1fr); }
  .home-composer-bottom > span { display:none; }
  .gallery-grid,.asset-grid { grid-template-columns:repeat(2,minmax(0,1fr)); gap:9px; }
  .gallery-card,.gallery-card:nth-child(4n+2) { min-height:180px; aspect-ratio:3/4; }
  .gallery-overlay,.gallery-card-caption { bottom:9px; left:8px; right:8px; gap:4px; }
  .gallery-card strong { font-size:10px; line-height:1.5; }
  .gallery-card small { display:none; }
  .gallery-actions button { padding:2px; font-size:9px; }
  .gallery-actions button:last-child { display:none; }
  .gallery-tabs { gap:3px; margin-bottom:12px; flex-wrap:wrap; }
  .gallery-tabs button { font-size:11px; padding:5px 10px; }
  .scene-strip { margin-bottom:20px; }
  .gallery-reuse { opacity:1; font-size:9px; padding:4px 7px; top:8px; right:7px; }
  .asset-card-visual,.asset-card-visual [data-media-preview] { min-height:120px; }
  .asset-search { grid-template-columns:minmax(0,1fr); }
  .wallet-metrics,.plan-grid { grid-template-columns:minmax(0,1fr); }
  .task-list article { grid-template-columns:auto minmax(0,1fr) auto; }
  .page-footer { padding:15px; font-size:9px; flex-wrap:wrap; }
}
