/* Scoped copy for safe production integration; visual declarations unchanged. */
/* Clean final visual tokens. Loaded only by StudioPage. */
@property --title-angle { syntax: '<angle>'; inherits: false; initial-value: 90deg; }
.studio-page-clean {
  color-scheme: dark;
  --page:#121212; --sidebar:#171717; --surface:#222; --panel:#252525;
  --text:#fafafa; --secondary:#b8b8bc; --muted:#99999f; --line:rgba(255,255,255,.08);
  --hover:rgba(255,255,255,.06); --selected:rgba(255,255,255,.08); --accent:#c5eff5;
  --sidebar-width:240px; --editor-width:1000px;
  --ease:cubic-bezier(.4,0,.2,1); --spring:cubic-bezier(.22,1,.36,1);
  --font:'PingFang SC','Hiragino Sans GB','Microsoft YaHei',Arial,sans-serif;
  --mode-fill:linear-gradient(180deg,#fafafa 0%,rgba(250,250,250,.78) 6%,rgba(250,250,250,.65) 13%,rgba(250,250,250,.37) 25%,transparent 42%,transparent 58%,rgba(250,250,250,.37) 75%,rgba(250,250,250,.65) 87%,rgba(250,250,250,.78) 94%,#fafafa 100%),linear-gradient(90deg,transparent 0%,rgba(247,237,227,.14) 3%,rgba(253,233,221,.73) 13%,rgba(255,226,206,.85) 22%,rgba(255,221,197,.85) 29%,rgba(245,231,209,.85) 35%,rgba(235,234,224,.85) 41%,rgba(196,237,240,.85) 48%,rgba(173,238,251,.85) 54%,rgba(150,239,255,.85) 61%,rgba(158,235,251,.84) 67%,rgba(173,238,251,.85) 73%,rgba(190,243,254,.85) 80%,rgba(204,245,255,.78) 86%,rgba(206,243,249,.4) 92%,rgba(218,247,249,.11) 97%,transparent 100%),#fafafa;
}
.studio-page-clean *, .studio-page-clean *::before, .studio-page-clean *::after { box-sizing:border-box; }
.studio-page-clean-shell { min-width:320px; background:var(--page); scrollbar-gutter:auto; }
.studio-page-clean-shell { margin:0; min-height:100dvh; color:var(--text); font:14px/1.5 var(--font); -webkit-font-smoothing:antialiased; }
.studio-page-clean button, .studio-page-clean input, .studio-page-clean textarea, .studio-page-clean select { font:inherit; color:inherit; }
.studio-page-clean button { border:0; padding:0; cursor:pointer; background:none; touch-action:manipulation; -webkit-tap-highlight-color:transparent; }
.studio-page-clean button:disabled { cursor:default; }
.studio-page-clean button, .studio-page-clean a, .studio-page-clean input, .studio-page-clean textarea { outline-offset:4px; }
.studio-page-clean :focus-visible { outline:2px solid #e6edf0; }
.studio-page-clean button { transition:background-color 120ms,color 120ms,opacity 120ms; }
.studio-page-clean button:not(:disabled):active { opacity:.78; }
.studio-page-clean [hidden] { display:none!important; }
.studio-page-clean svg.icon { width:20px; height:20px; display:block; flex-shrink:0; fill:currentColor; }
.studio-page-clean .sr-only { position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap; border:0; }
.skip-link { position:fixed; top:8px; left:260px; z-index:80; background:#fafafa; color:#121212; padding:8px 16px; border-radius:8px; transform:translateY(-150%); }
.skip-link:focus { transform:translateY(0); }
.sidebar { position:fixed; inset:0 auto 0 0; z-index:20; display:flex; flex-direction:column; width:var(--sidebar-width); padding:14px 12px 12px; background:var(--sidebar); transition:width 520ms var(--spring); }
.brand-row { display:flex; align-items:center; height:40px; flex-shrink:0; }
.brand { display:flex; align-items:center; gap:9px; min-width:0; height:40px; flex:1; text-align:left; border-radius:8px; position:relative; }
.brand-mark { position:relative; display:grid; place-items:center; width:34px; height:40px; flex-shrink:0; }
.brand-mark img { display:block; object-fit:contain; border-radius:7px; transition:opacity 120ms; }
.brand-expand { position:absolute; opacity:0; transition:opacity 120ms; }
.brand-name { font-size:18px; line-height:28px; font-weight:650; white-space:nowrap; overflow:hidden; transition:opacity 160ms 60ms; }
.icon-button { position:relative; display:grid; place-items:center; width:28px; height:28px; flex-shrink:0; border-radius:8px; color:var(--secondary); }
.icon-button:hover { color:var(--text); background:var(--hover); }
.icon-button .icon { width:16px; height:16px; }
.sidebar-toggle { margin-left:auto; }
.main-nav { display:flex; flex-direction:column; gap:4px; margin-top:32px; }
.nav-item { position:relative; display:flex; align-items:center; gap:12px; height:36px; padding:0 8px; border-radius:8px; text-align:left; flex-shrink:0; color:#f1f1f3; white-space:nowrap; }
.nav-item.active { background:var(--selected); }
.nav-item:hover { background:var(--hover); }
.nav-item.active:hover { background:rgba(255,255,255,.11); }
.nav-label { display:block; overflow:hidden; font-size:14px; line-height:22px; font-weight:500; transition:opacity 160ms 60ms; }
.sidebar-scroll { min-height:0; overflow-y:auto; overflow-x:hidden; flex:1; padding-top:12px; scrollbar-width:thin; scrollbar-color:#3a3a3a transparent; }
.nav-group + .nav-group { margin-top:10px; }
.group-header { display:flex; align-items:center; min-height:34px; position:relative; }
.group-toggle { display:flex; align-items:center; gap:4px; min-width:0; flex:1; padding:5px 8px; height:34px; text-align:left; font-size:13px; line-height:20px; color:#9da1aa; border-radius:6px; white-space:nowrap; }
.group-toggle:hover { color:#d7d9de; }
.group-toggle .icon { width:12px; height:12px; transition:transform 180ms var(--ease); }
.new-record { width:24px; height:24px; margin-right:4px; color:#bfc0c4; }
.group-items { display:grid; gap:2px; overflow:hidden; }
.group-empty { color:#7f838d; font-size:12px; line-height:28px; padding:0 8px; white-space:nowrap; }
.group-items>button,.record-button { width:100%; min-width:0; display:flex; align-items:center; gap:8px; padding:5px 8px; color:#9da1aa; border-radius:6px; font-size:12px; text-align:left; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.group-items>button:hover { color:#e2e4e8; background:var(--hover); }
.task-record-button { min-height:42px; align-items:center; gap:7px; }
.task-record-button:hover,.task-record-button.is-selected { color:#e7e9ed; background:rgba(255,255,255,.075); }
.task-record-button>.icon { width:14px; height:14px; color:#9fa2a8; }
.task-record-copy { display:flex; min-width:0; flex:1; flex-direction:column; gap:1px; overflow:hidden; }
.task-record-label { overflow:hidden; color:#aeb2bb; font-size:12px; line-height:17px; text-overflow:ellipsis; white-space:nowrap; }
.task-record-status { overflow:hidden; color:#7f838c; font-size:10px; line-height:14px; text-overflow:ellipsis; white-space:nowrap; }
.task-record-status-succeeded { color:#9dc8b3; }
.task-record-status-failed { color:#d9a4a2; }
.task-record-status-running,.task-record-status-queued { color:#b9c8d6; }
.task-record-id { flex:0 0 auto; color:#696e79; font-family:ui-monospace,SFMono-Regular,Menlo,monospace; font-size:10px; }
.task-load-more { justify-content:center; min-height:30px; color:#9da0a6; font-size:11px; }
.task-load-more:hover:not(:disabled) { color:#e9e9ec; background:rgba(255,255,255,.05); }
.workspace-record-button { min-height:42px; align-items:center; gap:7px; }
.workspace-record-button:hover,.workspace-record-button.is-selected { color:#e7e9ed; background:rgba(255,255,255,.075); }
.workspace-record-thumb,.workspace-record-icon { width:22px; height:22px; flex:0 0 22px; border-radius:6px; object-fit:cover; background:#303033; }
.workspace-record-icon { display:grid; place-items:center; color:#aeb0b6; }
.workspace-record-icon .icon { width:14px; height:14px; }
.workspace-record-copy { display:flex; min-width:0; flex:1; flex-direction:column; gap:1px; overflow:hidden; }
.workspace-record-label { overflow:hidden; color:#aeb2bb; font-size:12px; line-height:17px; text-overflow:ellipsis; white-space:nowrap; }
.workspace-record-meta { overflow:hidden; color:#7f838c; font-size:10px; line-height:14px; text-overflow:ellipsis; white-space:nowrap; }
.workspace-record-pin { flex:0 0 auto; color:#c5eff5; font-size:16px; line-height:1; }
.canvas-record-button { min-height:34px; }
.canvas-record-thumb,.canvas-record-icon { width:22px; height:22px; flex:0 0 22px; border-radius:5px; object-fit:cover; background:#303033; }
.canvas-record-icon { display:grid; place-items:center; color:#aeb0b6; }
.canvas-record-icon .icon { width:13px; height:13px; }
.canvas-record-pin { width:12px; height:12px; flex:0 0 12px; color:#9fa1a7; }
.group-items .icon { width:14px; height:14px; }
.nav-group[data-open=false] .group-items { display:none; }
.nav-group[data-open=false] .chevron { transform:rotate(-90deg); }
.local-label { display:flex; align-items:center; gap:7px; height:24px; padding:0 8px; color:#99999f; font-size:11px; white-space:nowrap; overflow:hidden; }
.status-dot { width:5px; height:5px; border-radius:50%; background:#a3afb0; flex-shrink:0; }
.studio-page-clean[data-sidebar=collapsed] { --sidebar-width:64px; }
.studio-page-clean[data-sidebar=collapsed] .sidebar { padding-inline:12px; }
.studio-page-clean[data-sidebar=collapsed] .brand { flex:none; width:40px; }
.studio-page-clean[data-sidebar=collapsed] .brand-mark { width:40px; }
.studio-page-clean[data-sidebar=collapsed] .brand-name,.studio-page-clean[data-sidebar=collapsed] .nav-label { width:0; opacity:0; pointer-events:none; transition-delay:0s; }
.studio-page-clean[data-sidebar=collapsed] .sidebar-toggle { display:none; }
.studio-page-clean[data-sidebar=collapsed] .brand:hover img,.studio-page-clean[data-sidebar=collapsed] .brand:focus-visible img { opacity:0; }
.studio-page-clean[data-sidebar=collapsed] .brand:hover .brand-expand,.studio-page-clean[data-sidebar=collapsed] .brand:focus-visible .brand-expand { opacity:1; }
.studio-page-clean[data-sidebar=collapsed] .nav-item { width:36px; margin-inline:2px; justify-content:center; padding:0; gap:0; }
.studio-page-clean[data-sidebar=collapsed] .sidebar-scroll { overflow:visible; }
.studio-page-clean[data-sidebar=collapsed] .group-toggle,.studio-page-clean[data-sidebar=collapsed] .group-items { display:none; }
.studio-page-clean[data-sidebar=collapsed] .new-record { width:36px; height:36px; margin:0 2px; }
.studio-page-clean[data-sidebar=collapsed] .new-record .icon { width:20px; height:20px; }
.studio-page-clean[data-sidebar=collapsed] .local-label { visibility:hidden; }
[data-tooltip] { position:relative; }
.icon-button[data-tooltip]:is(:hover,:focus-visible)::after,.submit-button[data-tooltip]:hover::after,.mention-button:hover::after,.upload-trigger:hover::after,.studio-page-clean[data-sidebar=collapsed] .nav-item:is(:hover,:focus-visible)::after,.studio-page-clean[data-sidebar=collapsed] .brand:is(:hover,:focus-visible)::after { content:attr(data-tooltip); position:absolute; z-index:60; width:max-content; max-width:220px; bottom:calc(100% + 8px); left:50%; transform:translateX(-50%); padding:5px 9px; border:1px solid #383838; border-radius:7px; background:#2d2d2d; box-shadow:0 4px 12px #0003; font-size:12px; line-height:20px; font-weight:400; color:#f4f4f4; pointer-events:none; }
.account-tools [data-tooltip]:is(:hover,:focus-visible)::after { top:calc(100% + 8px); bottom:auto; }
.studio-page-clean[data-sidebar=collapsed] .sidebar [data-tooltip]:is(:hover,:focus-visible)::after { left:calc(100% + 12px); top:50%; bottom:auto; transform:translateY(-50%); }
.workspace { position:relative; min-height:100dvh; margin-left:var(--sidebar-width); padding:68px 40px 60px; isolation:isolate; transition:margin-left 520ms var(--spring); }
.workspace-art { position:absolute; inset:0 0 auto; height:400px; overflow:hidden; z-index:-1; pointer-events:none; }
.workspace-art img { position:absolute; width:1200px; max-width:none; height:400px; left:50%; transform:translateX(-50%); top:0; }
.account-tools { position:absolute; z-index:10; top:20px; right:20px; display:flex; align-items:center; gap:4px; min-height:36px; padding:3px 5px; border:1px solid rgba(255,255,255,.04); border-radius:9px; background:#12121259; }
.workspace[data-top-notice-open="true"] .account-tools { top:68px; }
.account-tools .icon-button { color:#e7e7e9; }
.profile-button { display:flex; align-items:center; gap:7px; height:34px; padding:0 8px 0 5px; margin-left:3px; font-size:12px; font-weight:500; color:#dfdfe1; border-radius:8px; text-align:left; }
.profile-button:hover { background:var(--hover); }
.profile-avatar { display:grid; place-items:center; width:25px; height:25px; flex:0 0 25px; border:1px solid rgba(197,239,245,.3); border-radius:50%; background:linear-gradient(135deg,#3d555a,#a2d8df); color:#101516; font-size:11px; font-weight:700; letter-spacing:.01em; }
.profile-copy { display:flex; min-width:0; flex-direction:column; gap:0; line-height:15px; }
.profile-copy strong { max-width:150px; overflow:hidden; color:#e4e6e9; font-size:11px; font-weight:600; text-overflow:ellipsis; white-space:nowrap; }
.profile-copy small { color:#aeb3bb; font-size:10px; font-weight:500; white-space:nowrap; }

.studio-announcement { position:sticky; top:0; z-index:30; display:flex; align-items:center; gap:8px; width:min(var(--editor-width),100%); min-height:38px; margin:0 auto 18px; padding:4px 8px 4px 10px; border:1px solid rgba(143,222,231,.22); border-radius:10px; background:linear-gradient(90deg,rgba(13,29,58,.96),rgba(17,43,91,.92)),rgba(17,24,39,.94); color:#c7d5db; box-shadow:0 10px 30px rgba(0,0,0,.2); text-align:left; font-family:var(--font); font-size:12px; font-weight:400; line-height:20px; backdrop-filter:blur(16px); transition:border-color 180ms ease,background-color 180ms ease,color 180ms ease; }
.studio-announcement:hover { border-color:rgba(166,236,242,.48); background:linear-gradient(90deg,rgba(16,37,73,.98),rgba(20,52,105,.96)),rgba(17,24,39,.96); color:#f1fdff; }
.studio-announcement-main { display:flex; align-items:center; min-width:0; flex:1 1 auto; gap:8px; padding:0; border:0; background:transparent; color:inherit; text-align:left; }
.studio-announcement-main:focus-visible,.studio-announcement-close:focus-visible { outline:2px solid rgba(170,239,245,.84); outline-offset:2px; }
.studio-announcement-icon { display:grid; place-items:center; width:22px; height:22px; flex:0 0 22px; border-radius:7px; background:rgba(156,232,240,.12); color:#b6f0f4; }
.studio-announcement-icon .icon { width:13px; height:13px; }
.studio-announcement-track { min-width:0; flex:1 1 auto; overflow:hidden; }
.studio-announcement-text { display:block; min-width:0; overflow:hidden; animation:studio-announcement-in 420ms var(--spring) both; font-size:12px; line-height:20px; overflow-wrap:normal; text-overflow:ellipsis; white-space:nowrap; }
.studio-announcement-position { flex:0 0 auto; color:#9cb4c0; font-size:10px; font-variant-numeric:tabular-nums; }
.studio-announcement-action { flex:0 0 auto; align-self:center; color:#b7f0f2; font-size:11px; font-weight:600; }
.studio-announcement-close { display:grid; place-items:center; width:28px; height:28px; flex:0 0 28px; padding:0; border:0; border-radius:7px; background:transparent; color:#a9bfca; cursor:pointer; transition:background-color 160ms ease,color 160ms ease; }
.studio-announcement-close:hover { background:rgba(255,255,255,.11); color:#f5ffff; }
.studio-announcement-close .icon { width:14px; height:14px; }
@keyframes studio-announcement-in { from { opacity:0; transform:translateY(5px); } to { opacity:1; transform:none; } }
@media (prefers-reduced-motion: reduce) { .studio-announcement-text { animation:none; } }

/* The creation page header announcement is an independent channel from the
   existing in-content Studio announcement. It follows the official compact
   blue notice bar: full width of the work area, a restrained cyan edge, and a
   close button that only hides this bar for the current page session. */
.studio-top-notice { position:fixed; top:24px; left:var(--sidebar-width); right:0; z-index:32; display:flex; align-items:center; gap:8px; width:auto; height:38px; min-height:38px; padding:0 10px; overflow:hidden; border:1px solid rgba(52,126,201,.7); border-radius:11px; background-color:#102969; background-image:linear-gradient(90deg,rgba(8,27,70,.2),rgba(8,27,70,.08)),url('/studio-clean-assets/top-notice-background.jpg'); background-position:center; background-size:cover; background-repeat:no-repeat; color:#d7e8f7; box-shadow:0 8px 24px rgba(2,12,29,.5), inset 0 1px 0 rgba(112,187,255,.15), inset 0 -1px 0 rgba(42,122,197,.65); text-align:left; font-family:var(--font); font-size:12px; font-weight:400; line-height:20px; transition:border-color 180ms ease,background-color 180ms ease,color 180ms ease; }
.studio-top-notice::after { content:""; position:absolute; left:10px; right:10px; bottom:-1px; height:1px; pointer-events:none; background:linear-gradient(90deg,rgba(45,143,255,.05),rgba(80,182,255,.72) 50%,rgba(45,143,255,.05)); opacity:.88; }
.studio-top-notice:hover { border-color:rgba(100,176,239,.9); background-color:#123173; background-image:linear-gradient(90deg,rgba(8,27,70,.12),rgba(8,27,70,.02)),url('/studio-clean-assets/top-notice-background.jpg'); color:#f0f8ff; }
.studio-top-notice-main { display:flex; align-items:center; min-width:0; flex:1 1 auto; gap:8px; padding:0; border:0; background:transparent; color:inherit; text-align:left; }
.studio-top-notice-main:focus-visible,.studio-top-notice-close:focus-visible { outline:2px solid rgba(170,239,245,.84); outline-offset:2px; }
.studio-top-notice-icon { display:grid; place-items:center; width:22px; height:22px; flex:0 0 22px; border:1px solid rgba(176,235,255,.34); border-radius:7px; background:rgba(108,187,255,.14); color:#c5ebff; }
.studio-top-notice-icon .icon { width:14px; height:14px; }
.studio-top-notice-track { min-width:0; flex:1 1 auto; overflow:hidden; }
.studio-top-notice-text { display:block; min-width:0; overflow:hidden; animation:studio-top-notice-in 420ms var(--spring) both; font-size:12px; line-height:20px; overflow-wrap:normal; text-overflow:ellipsis; white-space:nowrap; }
.studio-top-notice-position { flex:0 0 auto; color:#9fc1e4; font-size:10px; font-variant-numeric:tabular-nums; }
.studio-top-notice-action { flex:0 0 auto; color:#bfeeff; font-size:11px; font-weight:600; }
.studio-top-notice-close { display:grid; place-items:center; width:28px; height:28px; flex:0 0 28px; padding:0; border:0; border-radius:7px; background:transparent; color:#a9bfca; cursor:pointer; transition:background-color 160ms ease,color 160ms ease; }
.studio-top-notice-close:hover { background:rgba(255,255,255,.11); color:#f5ffff; }
.studio-top-notice-close .icon { width:14px; height:14px; }
@keyframes studio-top-notice-in { from { opacity:0; transform:translateY(5px); } to { opacity:1; transform:none; } }
@media (prefers-reduced-motion: reduce) { .studio-top-notice-text { animation:none; } }
.hero { display:flex; flex-direction:column; align-items:center; gap:24px; position:relative; }
.hero h1 { margin:0; font-size:30px; font-weight:700; line-height:38px; color:#fafafa; text-align:center; text-wrap:balance; }
.title-accent { display:inline-block; --title-angle:90deg; background:conic-gradient(from var(--title-angle) at 53.3188% -36.0861%,#ffe3d4 0deg,#fafafa 7.68151deg,#fafafa 140.47681deg,#1b60ff 161.33242deg,#24aef0 176.17102deg,#22f1ff 243.63215deg,#fafafa 256.44976deg,#f6ec00 271.88446deg,#ff772b 329.68462deg,#ffe3d4 360deg); background-clip:text; -webkit-background-clip:text; color:transparent; -webkit-text-fill-color:transparent; animation:title-sweep 2s linear forwards; }
@keyframes title-sweep { 0% { --title-angle:90deg; animation-timing-function:ease-in-out; } 60%,100% { --title-angle:-240deg; } }
.mode-switch { display:flex; gap:2px; width:min(320px,100%); height:40px; padding:2px; border-radius:110px; background:rgba(255,255,255,.08); }
.mode-switch button { display:flex; align-items:center; justify-content:center; flex:1; min-width:0; height:36px; padding:4px 16px; border-radius:999px; font-size:13px; font-weight:500; line-height:22px; color:#fafafa; transition:background-color 100ms linear,color 100ms linear; }
.mode-switch button[aria-selected=true] { background:var(--mode-fill); color:#1a1a1a; }
.mode-switch button[aria-selected=false]:hover { background:rgba(255,255,255,.04); }
.mode-stage { position:relative; width:min(var(--editor-width),100%); margin:36px auto 0; }
.composer { position:relative; background:rgba(34,34,34,.72); border-radius:24px; box-shadow:inset 0 0 0 1px rgba(255,255,255,.04); transition:box-shadow 350ms cubic-bezier(.15,.75,.3,1); isolation:isolate; }
.composer:hover,.composer:focus-within { box-shadow:0 4px 32px rgba(0,0,0,.04),0 6px 24px rgba(0,0,0,.03),inset 0 0 0 1px rgba(255,255,255,.045); }
.composer-material { position:absolute; inset:0; z-index:0; width:100%; height:100%; border-radius:inherit; pointer-events:none; opacity:1; transition:opacity 600ms var(--ease); }
.composer:hover .composer-material,.composer:focus-within .composer-material { opacity:0; }
.studio-page-clean[data-transition=mode] .composer-material { opacity:0; transition:none; }
.composer-mask { position:absolute; top:0; left:0; width:100%; height:60px; pointer-events:none; z-index:1; border-radius:24px 24px 0 0; overflow:hidden; }
.composer-header { position:relative; z-index:2; display:flex; align-items:center; justify-content:space-between; gap:10px; min-height:36px; padding-right:12px; }
.media-tabs { display:flex; position:relative; z-index:2; height:36px; align-items:stretch; flex:0 0 auto; }
.media-tabs [role=tab] { display:flex; align-items:center; justify-content:center; gap:5px; width:120px; flex-shrink:0; padding:0 4px; border-radius:12px 12px 0 0; font-size:12px; line-height:20px; color:#b0b0b5; }
.media-tabs [role=tab] .icon { width:16px; height:16px; display:none; }
.media-tabs [role=tab][aria-selected=true] { color:#fafafa; font-weight:500; }
.media-tabs [role=tab][aria-selected=true] .icon { display:block; }
.media-tabs [role=tab][aria-selected=false]:hover { color:#e7e7ec; }
.composer-inner { position:relative; z-index:2; padding:16px; display:grid; grid-template-columns:auto minmax(0,1fr); column-gap:16px; row-gap:16px; }
.composer.is-reference-expanded .composer-inner { grid-template-columns:minmax(0,1fr); }
.prompt-row { display:flex; align-items:flex-start; gap:12px; min-width:0; }
.references { display:flex; flex-shrink:0; flex-wrap:wrap; gap:10px; max-width:100%; overflow-x:hidden; overflow-y:visible; padding:6px 4px 4px; scrollbar-width:none; }
.references::-webkit-scrollbar { display:none; }
.upload-trigger { position:relative; flex:0 0 48px; width:48px; height:64px; border-radius:9px; color:#999fa0; }
.stack-card { position:absolute; left:7px; top:4px; width:34px; height:46px; border-radius:5px; background:rgba(255,255,255,.06); transition:transform 300ms var(--ease),background-color 180ms; }
.stack-back { transform:rotate(-9deg); background:rgba(255,255,255,.03); }
.stack-front { display:flex; flex-direction:column; align-items:center; justify-content:center; gap:3px; transform:rotate(-8deg); border:1px solid rgba(255,255,255,.015); }
.stack-front .icon { width:16px; height:16px; }
.stack-front>span { font-size:11px; line-height:14px; }
.upload-trigger:hover .stack-front,.upload-trigger:focus-visible .stack-front { transform:rotate(0); background:rgba(255,255,255,.11); color:#fafafa; }
.upload-trigger:hover .stack-back { transform:translateX(-4px) rotate(-16deg); }
.prompt-input { width:100%; min-width:0; flex:1; height:76px; transition:height 280ms var(--spring); resize:none; border:0; outline:0; padding:0 4px 0 0; background:transparent; font-size:14px; line-height:24px; scrollbar-width:thin; scrollbar-color:#565656 transparent; caret-color:#fff; }
.prompt-input::placeholder { color:#a1a3a7; opacity:1; }
.prompt-input.studio-page-clean :focus-visible { outline:0; }
.composer:has(.prompt-input:focus-visible) { box-shadow:inset 0 0 0 1px rgba(255,255,255,.25); }
.composer-toolbar { grid-column:1/-1; display:flex; align-items:center; justify-content:space-between; gap:8px; min-height:32px; }
.parameter-tools { display:flex; align-items:center; flex-wrap:wrap; min-width:0; gap:4px; }
.tool-button { display:flex; align-items:center; gap:5px; min-height:32px; padding:0 8px; border-radius:8px; color:#e4e4e8; font-size:12px; font-weight:500; white-space:nowrap; }
.tool-button:hover,.tool-button[aria-expanded=true] { background:rgba(255,255,255,.07); }
.tool-button .icon { width:14px; height:14px; }
.tool-button .small-chevron { width:11px; height:11px; color:#adb1b3; }
.model-button { max-width:290px; }
.tool-label { min-width:0; overflow:hidden; text-overflow:ellipsis; }
.mention-button { min-width:30px; justify-content:center; font-size:16px; font-weight:400; }
.submit-button { flex-shrink:0; position:relative; display:grid; place-items:center; width:32px; height:32px; border-radius:50%; background:var(--mode-fill); color:#171717; transition:background 120ms,color 120ms; }
.submit-button .icon { width:20px; height:20px; }
.studio-page-clean .submit-button:disabled { color:rgba(255,255,255,.24); background:rgba(255,255,255,.16); }
.studio-page-clean .submit-button:not(:disabled):hover { filter:brightness(1.07); }
.composer-feedback { margin:10px 16px 0; min-height:0; font-size:12px; line-height:20px; color:var(--secondary); }
.composer-feedback:empty { display:none; }
.composer-feedback.error { color:#f3aaa7; }
.draft-status { margin:10px 16px; color:var(--secondary); font-size:12px; }
.asset-item { position:relative; flex-shrink:0; width:56px; height:76px; }
.asset-thumb { display:flex; align-items:center; justify-content:center; width:56px; height:56px; border-radius:7px; background:#353535; overflow:hidden; }
.asset-thumb img,.asset-thumb video { width:100%; height:100%; object-fit:cover; }
.asset-thumb .icon { width:22px; height:22px; color:#c9d4d8; }
.asset-label { display:block; font-size:10px; line-height:18px; white-space:nowrap; text-align:center; color:#bcbcc3; }
.asset-remove { position:absolute; z-index:2; top:0; right:0; display:grid; place-items:center; width:24px; height:24px; background:rgba(18,18,18,.9); color:#fff; border-radius:0 7px 0 7px; }
.asset-remove .icon { width:13px; height:13px; }
.reference-toggle { display:flex; align-items:center; justify-content:center; gap:7px; flex:0 0 auto; min-width:42px; min-height:28px; padding:0 10px; border:1px solid rgba(255,255,255,.1); border-radius:999px; background:rgba(16,16,16,.68); color:#d3d3d8; font-size:11px; line-height:18px; transition:border-color 180ms,background-color 180ms,color 180ms; }
.reference-toggle:hover,.reference-toggle[aria-expanded=true] { border-color:rgba(255,255,255,.2); background:rgba(255,255,255,.1); color:#fff; }
.reference-toggle .icon { width:12px; height:12px; transition:transform 220ms var(--spring); }
.reference-toggle[aria-expanded=true] .icon { transform:rotate(180deg); }
.reference-count { min-width:17px; height:17px; padding:0 4px; display:inline-grid; place-items:center; border-radius:999px; background:rgba(255,255,255,.12); color:#f4f4f5; font-size:10px; line-height:1; font-variant-numeric:tabular-nums; }
.reference-panel { min-width:0; display:flex; flex-direction:column; align-self:start; gap:8px; max-width:240px; }
.reference-panel[data-expanded=true] { max-width:none; width:100%; }
.reference-panel[data-expanded=false] .references { gap:0; }
.reference-panel[data-expanded=false] .asset-item+.asset-item { margin-left:-7px; }
.reference-panel[data-expanded=false] .asset-preview { transform:rotate(-5deg); }
.reference-panel[data-expanded=false] .asset-item:nth-of-type(even) .asset-preview { transform:rotate(5deg); }
.reference-panel[data-expanded=false] .asset-item:hover { z-index:3; }
.reference-panel[data-expanded=false] .asset-item:hover .asset-preview { transform:translateY(-2px) rotate(0); }
.reference-panel[data-expanded=false][data-hovered=true] .references { gap:8px; }
.reference-panel[data-expanded=false][data-hovered=true] .asset-item { width:112px; height:78px; margin-left:0; transition:width 220ms var(--spring),height 220ms var(--spring),margin-left 220ms var(--spring); }
.reference-panel[data-expanded=false][data-hovered=true] .asset-item+.asset-item { margin-left:0; }
.reference-panel[data-expanded=false][data-hovered=true] .asset-preview { width:108px; height:58px; transform:none; transition:width 220ms var(--spring),height 220ms var(--spring),transform 220ms var(--spring); }
.reference-panel[data-expanded=false][data-hovered=true] .asset-item::before { left:3px; width:104px; height:56px; transform:rotate(-2deg); }
.reference-panel[data-expanded=false][data-hovered=true] .asset-item:nth-of-type(odd)::before { transform:rotate(2deg); }
.reference-panel[data-expanded=false][data-hovered=true] .asset-label { max-width:108px; color:#d7d9de; }
.references .upload-trigger { order:10; }
.reference-more { order:9; flex:0 0 34px; height:54px; margin-right:3px; border:1px solid #ffffff15; border-radius:5px; background:#343638; color:#e1e3e6; font-size:12px; align-self:flex-start; }
.reference-toolbar { display:flex; align-items:center; justify-content:space-between; gap:10px; min-width:0; }
.reference-filters { display:flex; align-items:center; gap:4px; min-width:0; overflow-x:auto; scrollbar-width:none; }
.reference-filters::-webkit-scrollbar { display:none; }
.reference-filter { display:inline-flex; align-items:center; justify-content:center; gap:5px; flex:0 0 auto; min-height:28px; padding:0 9px; border-radius:999px; color:#b9bbc0; font-size:12px; line-height:18px; transition:background-color 160ms,color 160ms; }
.reference-filter:hover:not(:disabled),.reference-filter[aria-pressed=true] { background:rgba(255,255,255,.12); color:#f4f4f6; }
.reference-filter:disabled { color:#68686e; cursor:default; }
.reference-filter span { color:#909096; font-variant-numeric:tabular-nums; }
.reference-filter[aria-pressed=true] span { color:#e3e3e7; }
.reference-clear { flex:0 0 auto; min-height:28px; padding:0 7px; border-radius:6px; color:#b9bbc0; font-size:12px; }
.reference-clear:hover:not(:disabled) { background:rgba(255,255,255,.08); color:#f1f1f3; }
.reference-clear:disabled { color:#69696f; }
.asset-item { flex-shrink:0; width:48px; height:74px; }
.asset-item::before { content:""; position:absolute; z-index:0; top:2px; left:4px; width:40px; height:54px; border:1px solid rgba(255,255,255,.08); border-radius:7px; background:#353535; box-shadow:0 3px 9px rgba(0,0,0,.25); transform:rotate(-5deg); transition:transform 180ms var(--spring); }
.asset-item:nth-of-type(odd)::before { transform:rotate(4deg); }
.asset-item:hover::before { transform:translateY(-2px) rotate(0); }
.asset-preview { position:relative; z-index:1; display:grid; place-items:center; width:44px; height:56px; overflow:hidden; border:1px solid rgba(255,255,255,.1); border-radius:6px; background:#29292b; box-shadow:0 4px 12px rgba(0,0,0,.28); transition:transform 180ms var(--spring); }
.asset-preview.studio-page-clean :focus-visible { outline-offset:2px; }
.asset-thumb { width:100%; height:100%; border-radius:inherit; background:#303033; }
.asset-thumb img,.asset-thumb video { width:100%; height:100%; object-fit:cover; }
.asset-thumb .icon { width:17px; height:17px; color:#c9d4d8; }
.asset-label { display:block; max-width:48px; overflow:hidden; font-size:10px; line-height:18px; white-space:nowrap; text-overflow:ellipsis; text-align:center; color:#c9c9ce; }
.asset-remove { top:-5px; right:-3px; width:24px; height:24px; border:1px solid rgba(255,255,255,.18); border-radius:50%; background:#181819; }
.asset-remove .icon { width:10px; height:10px; }
.asset-remove { opacity:0; }
.asset-item:hover .asset-remove,.asset-item:focus-within .asset-remove { opacity:1; }
.asset-remove:disabled { opacity:.4; }
.composer-actions { display:flex; align-items:center; gap:8px; flex:0 0 auto; }
.composer-expand-toggle { display:grid; place-items:center; width:30px; height:30px; border:1px solid rgba(255,255,255,.1); border-radius:50%; background:rgba(255,255,255,.05); color:#dedee3; transition:background-color 180ms,border-color 180ms,transform 220ms var(--spring),color 180ms; }
.composer-expand-toggle:hover,.composer-expand-toggle[aria-expanded=true] { border-color:rgba(255,255,255,.23); background:rgba(255,255,255,.12); color:#fff; }
.composer-expand-toggle .icon { width:14px; height:14px; transform:rotate(180deg); transition:transform 220ms var(--spring); }
.composer-expand-toggle[aria-expanded=true] .icon { transform:rotate(0); }
.composer.is-expanded .prompt-input { height:clamp(220px,34vh,320px); }
.composer.is-dragging { box-shadow:inset 0 0 0 2px #e1ecee; }
.canvas-directory { width:min(var(--editor-width),100%); margin:0 auto; }
.canvas-directory-header { display:flex; align-items:baseline; justify-content:space-between; gap:12px; margin:0 4px 12px; color:#e5e5e8; }
.canvas-directory-header strong { font-size:14px; font-weight:600; }
.canvas-directory-header span { color:#9fa0a6; font-size:12px; }
.canvas-directory-empty { padding:28px 12px; color:#9fa0a6; font-size:12px; text-align:center; }
.canvas-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; }
.new-canvas-card,.canvas-card { min-height:140px; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:7px; border:1px solid rgba(255,255,255,.035); border-radius:16px; background:radial-gradient(circle,#ffffff13 .75px,transparent 1px) 8px 8px/22px 22px,linear-gradient(#1c1c1c,#202020); text-align:center; padding:20px; overflow:hidden; }
.new-canvas-card:hover,.canvas-card:hover { border-color:rgba(255,255,255,.13); background-color:#282828; }
.new-canvas-card { font-size:12px; font-weight:500; }
.new-canvas-icon { display:grid; place-items:center; width:32px; height:32px; border-radius:9px; background:#fafafa; color:#121212; }
.new-canvas-icon .icon { width:20px; height:20px; }
.canvas-card-name { font-size:14px; font-weight:500; max-width:100%; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.canvas-card-meta { font-size:12px; color:var(--secondary); }
.canvas-card-thumb { width:100%; height:70px; border-radius:9px; object-fit:cover; background:#303033; }
.canvas-composer { width:calc(100% - 200px); margin:32px auto 0; min-height:70px; padding:16px; display:flex; align-items:center; gap:14px; border:1px solid rgba(255,255,255,.04); border-radius:20px; background:linear-gradient(#1c1c1c,#222); }
.canvas-composer textarea { min-width:0; width:100%; resize:none; border:0; outline:0; background:transparent; font-size:14px; line-height:24px; max-height:144px; }
.canvas-composer textarea::placeholder { color:#a1a1a6; }
.canvas-composer:focus-within { border-color:#ffffff33; }
.morph-surface { pointer-events:none; position:fixed; z-index:15; background:#202020; transform-origin:0 0; border:1px solid #ffffff06; }
.is-entering { will-change:opacity; }
@keyframes panel-enter { from { opacity:0; transform:translateY(12px); } to { opacity:1; transform:translateY(0); } }
.popover { position:fixed; inset:auto; z-index:50; margin:0; padding:8px; max-width:calc(100vw - 24px); max-height:min(510px,calc(100dvh - 24px)); overflow:auto; background:#252525; color:var(--text); border:1px solid #ffffff0d; border-radius:14px; box-shadow:0 12px 40px #0006,0 2px 6px #0003; scrollbar-width:thin; scrollbar-color:#555 transparent; }
.popover:popover-open { animation:popover-in 140ms ease-out; }
.popover-title { margin:0; padding:4px 6px 10px; font-size:13px; font-weight:500; }
.model-search { display:block; width:100%; height:34px; margin:0 0 8px; padding:0 11px; background:#1d1d1d; border:1px solid #ffffff0c; border-radius:8px; outline-offset:1px; font-size:12px; }
.model-list { display:grid; gap:3px; max-height:330px; overflow:auto; scrollbar-width:thin; }
.model-option { display:flex; align-items:center; gap:10px; width:100%; padding:10px; border:1px solid transparent; border-radius:9px; text-align:left; }
.model-option:hover { background:#ffffff07; }
.model-option.selected,.model-option[aria-selected=true] { background:#ffffff0d; border-color:#ffffff05; }
.model-option>.icon { width:18px; height:18px; color:#c4d7d9; flex-shrink:0; }
.model-copy { display:flex; flex:1; min-width:0; flex-direction:column; gap:3px; }
.model-title { font-size:12px; line-height:19px; font-weight:500; overflow-wrap:anywhere; }
.model-meta { font-size:11px; line-height:16px; color:#aaaab0; }
.model-footer { font-size:10px; line-height:17px; color:#b0b0b7; border-top:1px solid #ffffff08; margin-top:7px; padding:8px 5px 2px; }
.option-list { display:grid; gap:3px; }
.option-button { display:flex; justify-content:space-between; align-items:center; gap:10px; min-height:36px; width:100%; padding:8px 10px; border-radius:7px; font-size:12px; text-align:left; }
.option-button:hover,.option-button.selected { background:var(--selected); }
.option-button .icon { width:15px; height:15px; }
@keyframes popover-in { from { opacity:0; transform:translateY(5px); } to { opacity:1; transform:none; } }
dialog { width:min(620px,calc(100vw - 32px)); max-height:calc(100dvh - 48px); padding:0; margin:auto; color:var(--text); background:#202020; border:1px solid #ffffff12; border-radius:18px; box-shadow:0 24px 80px #0006; }
dialog[open] { animation:popover-in 160ms ease-out; }
dialog::backdrop { background:#0009; backdrop-filter:blur(4px); }
.dialog-header { display:flex; align-items:center; justify-content:space-between; gap:20px; padding:18px 20px; border-bottom:1px solid var(--line); }
.dialog-header h2 { font-size:16px; line-height:24px; font-weight:600; margin:0; }
.dialog-body { padding:20px; overflow:auto; max-height:calc(100dvh - 130px); scrollbar-width:thin; }
.dialog-copy { font-size:13px; line-height:1.8; color:#bcbcc2; margin:0 0 16px; }
.dialog-copy p:first-child { margin-top:0; }
.dialog-form { display:grid; gap:16px; }
.field { display:grid; gap:7px; font-size:12px; }
.field input,.field textarea,.field select,.dialog-body input:not([type=checkbox]),.dialog-body textarea { width:100%; background:#171717; border:1px solid #ffffff18; border-radius:8px; padding:9px 11px; color:#e7e7ec; font:13px/22px var(--font); }
.dialog-body input[type=checkbox] { accent-color:#c2eaf0; }
.dialog-body label { color:#c7c7ce; }
.dialog-actions { display:flex; justify-content:flex-end; flex-wrap:wrap; gap:8px; margin-top:20px; }
.primary-button,.secondary-button { display:inline-flex; align-items:center; justify-content:center; gap:7px; min-height:34px; padding:6px 14px; border-radius:8px; font-size:12px; font-weight:500; }
.primary-button { background:#e9f1f2; color:#16191a; }
.secondary-button { background:#ffffff09; border:1px solid #ffffff15; color:#e5e5e9; }
.primary-button .icon,.secondary-button .icon { width:15px; height:15px; }
.empty-state { display:grid; justify-items:center; gap:12px; text-align:center; color:var(--secondary); padding:24px 10px; font-size:13px; }
.empty-state .icon { width:28px; height:28px; color:#b3c4c7; }
.library-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:12px; }
.library-item { min-width:0; background:#2a2a2a; border:1px solid #ffffff0d; border-radius:10px; padding:8px; font-size:11px; overflow-wrap:anywhere; }
.library-item img,.library-item video { width:100%; height:100px; object-fit:cover; border-radius:6px; background:#121212; }
.library-item audio { width:100%; height:32px; }
.library-item button { margin-top:6px; font-size:11px; }
.canvas-surface { display:grid; gap:14px; min-height:220px; border:1px solid #ffffff0a; border-radius:12px; padding:20px; background:radial-gradient(circle,#ffffff19 .7px,transparent 1px) 0 0/18px 18px,#181818; }
.text-node { background:#292929; border:1px solid #ffffff1a; border-radius:10px; padding:14px; }
.text-node textarea { min-height:100px; }
.toast { position:fixed; z-index:80; left:calc(50% + var(--sidebar-width)/2); bottom:24px; transform:translateX(-50%); width:max-content; max-width:calc(100vw - var(--sidebar-width) - 40px); border:1px solid #ffffff16; padding:11px 18px; border-radius:10px; background:#303030; box-shadow:0 8px 24px #0003; font-size:12px; line-height:20px; color:#e9ecef; }
.noscript { position:fixed; z-index:90; top:0; left:0; right:0; padding:16px; background:#463326; }
.studio-page-clean[data-motion=reduced] *,.studio-page-clean[data-motion=reduced] *::before,.studio-page-clean[data-motion=reduced] *::after { animation-duration:.01ms!important; transition-duration:.01ms!important; }
.studio-page-clean[data-motion=reduced] .title-accent { animation:none!important; --title-angle:-240deg; }
.studio-page-clean[data-motion=reduced] .composer-material { display:none; }
@media (min-width:1680px) { .studio-page-clean .workspace { padding-inline:40px; } }
@media (max-width:1100px) { .studio-page-clean .workspace { padding-inline:24px; } .studio-page-clean .model-button { max-width:245px; } .studio-page-clean .parameter-tools { gap:2px; } .studio-page-clean .tool-button { padding-inline:6px; } }
@media (max-width:800px) {
  .workspace { padding:92px 20px 40px; }
  .hero h1 { font-size:27px; line-height:36px; }
  .mode-stage { margin-top:30px; }
  .composer-inner { padding:14px; }
  .model-button { max-width:230px; }
  .canvas-composer { width:100%; }
  .account-tools { top:16px; right:16px; }
}
@media (max-width:600px) {
  .studio-page-clean-shell { --sidebar-width:64px; }
  .sidebar { z-index:40; padding:14px 12px 12px; width:64px; }
  .studio-page-clean[data-sidebar=expanded] .sidebar { width:240px; box-shadow:12px 0 50px #000a; }
  .workspace { margin-left:64px; padding:94px 12px 32px; }
  .hero { gap:22px; }
  .hero h1 { font-size:23px; line-height:32px; }
  .mode-switch { max-width:280px; }
  .mode-stage { margin-top:30px; }
  .account-tools { right:12px; }
  .profile-button .profile-copy { display:none; }
  .profile-button { width:32px; justify-content:center; padding:0; margin:0; }
  .composer-inner { padding:12px; gap:14px; grid-template-columns:minmax(0,1fr); }
  .reference-panel { max-width:100%; }
  .composer-header { gap:6px; padding-right:8px; }
  .media-tabs { flex:1 1 auto; min-width:0; }
  .media-tabs [role=tab] { width:auto; min-width:0; flex:1 1 0; gap:4px; padding-inline:3px; font-size:11px; }
  .reference-toggle { width:42px; min-width:42px; padding:0 3px; gap:4px; }
  .reference-toggle-label { display:none; }
  .reference-count { min-width:15px; height:15px; padding:0 3px; font-size:9px; }
  .prompt-row { flex-wrap:wrap; gap:12px; }
  .references { max-width:100%; gap:6px; overflow-x:hidden; }
  .reference-toolbar { gap:4px; flex-wrap:wrap; }
  .reference-filter { padding-inline:7px; }
  .reference-clear { padding-inline:4px; font-size:11px; }
  .prompt-input { flex-basis:100%; height:96px; font-size:16px; line-height:25px; }
  .composer.is-expanded .prompt-input { height:230px; }
  .parameter-tools { gap:4px; }
  .composer-toolbar { align-items:flex-end; }
  .model-button { width:100%; max-width:none; justify-content:flex-start; }
  .tool-button { min-height:36px; }
  .tool-button.model-button { flex-basis:100%; }
  .tool-label { max-width:min(180px,calc(100vw - 226px)); }
  .submit-button { width:36px; height:36px; margin-bottom:0; }
  .composer-expand-toggle { width:36px; height:36px; }
  .canvas-grid { grid-template-columns:1fr; }
  .canvas-composer { padding:12px; }
  .canvas-composer textarea { font-size:16px; line-height:24px; }
  .library-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .toast { left:calc(50% + 32px); max-width:calc(100vw - 88px); bottom:max(16px,env(safe-area-inset-bottom)); }
  .dialog-header { padding:16px; }
  .dialog-body { padding:16px; }
  .local-label { padding:0; }
}
@media (hover:none) { .studio-page-clean .asset-remove { opacity:1; } }
@media (prefers-reduced-motion:reduce) {
  .studio-page-clean *, .studio-page-clean *::before, .studio-page-clean *::after { animation-duration:.01ms!important; animation-iteration-count:1!important; transition-duration:.01ms!important; scroll-behavior:auto!important; }
  .studio-page-clean .title-accent { animation:none!important; --title-angle:-240deg; }
  .studio-page-clean .composer-material { display:none; }
}

/* Compatibility bridge: keep formal StudioPage behavior while applying clean dark visual tokens. */
.studio-page-clean { background: var(--page, #121212) !important; color: var(--text, #fafafa) !important; }
.studio-page-clean .studio-topbar, .studio-page-clean .studio-composer-card, .studio-page-clean .studio-filter-shell { background: rgba(34,34,34,.92) !important; color: var(--text,#fafafa) !important; border-color: rgba(255,255,255,.08) !important; }

/* Creation-window and canvas actions stay in the clean rail without adding a
   second navigation structure. */
.studio-page-clean .record-row-shell {
  position: relative;
  display: flex;
  min-width: 0;
  align-items: center;
}
.studio-page-clean .record-row-shell > .record-button {
  min-width: 0;
  flex: 1 1 auto;
  padding-right: 32px;
}
.studio-page-clean .record-more-button {
  position: absolute;
  right: 3px;
  top: 50%;
  display: grid;
  width: 26px;
  height: 26px;
  place-items: center;
  border-radius: 7px;
  color: #888c95;
  opacity: 0;
  transform: translateY(-50%);
  transition: opacity 140ms ease, background-color 140ms ease, color 140ms ease;
}
.studio-page-clean .record-more-button .icon {
  width: 15px;
  height: 15px;
}
.studio-page-clean .record-row-shell:hover .record-more-button,
.studio-page-clean .record-row-shell:focus-within .record-more-button {
  opacity: 1;
}
.studio-page-clean .record-more-button:hover,
.studio-page-clean .record-more-button:focus-visible {
  background: rgba(255,255,255,.11);
  color: #f4f5f6;
}

.studio-page-clean .clean-context-menu {
  position: fixed;
  z-index: 120;
  display: grid;
  min-width: 144px;
  padding: 5px;
  gap: 2px;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 10px;
  background: rgba(37,37,37,.98);
  box-shadow: 0 18px 48px rgba(0,0,0,.42);
  color: #e8e9ec;
}
.studio-page-clean .clean-context-menu button {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 32px;
  padding: 0 9px;
  border-radius: 7px;
  color: #d5d7dc;
  font-size: 12px;
  text-align: left;
}
.studio-page-clean .clean-context-menu button:hover,
.studio-page-clean .clean-context-menu button:focus-visible {
  background: rgba(255,255,255,.09);
  color: #fff;
}
.studio-page-clean .clean-context-menu button.danger { color: #f0aca9; }
.studio-page-clean .clean-context-menu button.danger:hover,
.studio-page-clean .clean-context-menu button.danger:focus-visible {
  background: rgba(232,112,111,.14);
  color: #ffc3c0;
}
.studio-page-clean .clean-context-menu .icon {
  width: 14px;
  height: 14px;
  flex: 0 0 auto;
}

/* The main feed uses the existing TaskCard/ReferenceStrip business
   components, but repaints their former light utility classes on the clean
   dark surface. */
.studio-page-clean .task-feed {
  display: grid;
  width: min(var(--editor-width), 100%);
  min-height: 0;
  margin: 24px auto 0;
  gap: 4px;
  padding: 0 0 24px;
}
.studio-page-clean .task-feed-card {
  min-width: 0;
  border-bottom: 1px solid rgba(255,255,255,.07);
  padding: 0 0 16px;
}
.studio-page-clean .task-feed-card article {
  max-width: none !important;
  color: #e6e8eb;
}
.studio-page-clean .task-feed-card :is(.text-slate-950, .text-slate-900, .text-slate-800, .text-slate-700, .text-slate-600) {
  color: #e5e7ea !important;
}
.studio-page-clean .task-feed-card :is(.text-slate-500, .text-slate-400, .text-slate-300) {
  color: #9da3ac !important;
}
.studio-page-clean .task-feed-card :is(.bg-white, .bg-white\/70, .bg-white\/80, .bg-slate-50, .bg-slate-100) {
  background: #222224 !important;
}
.studio-page-clean .task-feed-card :is(.border-slate-100, .border-slate-200, .border-slate-300, .ring-slate-200, .ring-slate-200\/80) {
  border-color: rgba(255,255,255,.12) !important;
  --tw-ring-color: rgba(255,255,255,.12) !important;
}
.studio-page-clean .task-feed-card :is(.bg-emerald-50, .bg-blue-50, .bg-red-50, .bg-amber-50, .bg-sky-50) {
  background: rgba(255,255,255,.08) !important;
}
.studio-page-clean .task-feed-card :is(.text-emerald-700, .text-blue-700, .text-red-700, .text-amber-700, .text-sky-700) {
  color: #b9eef0 !important;
}
.studio-page-clean .task-feed-card :is(.shadow-sm, .shadow-\[0_18px_45px_-24px_rgba\(15\,23\,42\,0\.48\)\]) {
  box-shadow: 0 14px 34px rgba(0,0,0,.18) !important;
}
.studio-page-clean .task-feed-card video,
.studio-page-clean .task-feed-card img {
  border-color: rgba(255,255,255,.1);
}
.studio-page-clean .task-feed-state {
  display: flex;
  min-height: 72px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: #999fa8;
  font-size: 12px;
}
.studio-page-clean .task-feed-load-older {
  width: fit-content;
  max-width: calc(100% - 24px);
  min-height: 42px;
  margin: 8px auto 14px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  color: var(--secondary);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 160ms var(--ease), border-color 160ms var(--ease), color 160ms var(--ease), transform 160ms var(--ease);
}
.studio-page-clean .task-feed-load-older:hover:not(:disabled) {
  border-color: var(--accent);
  background: var(--hover);
  color: var(--text);
}
.studio-page-clean .task-feed-load-older:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}
.studio-page-clean .task-feed-load-older:active:not(:disabled) {
  transform: translateY(1px);
}
.studio-page-clean .task-feed-load-older:disabled {
  cursor: wait;
  opacity: .7;
}
.studio-page-clean .task-feed-state .icon {
  width: 17px;
  height: 17px;
}
.studio-page-clean .task-feed-empty {
  flex-direction: column;
  min-height: 120px;
  border: 1px dashed rgba(255,255,255,.12);
  border-radius: 14px;
  background: rgba(255,255,255,.025);
}
.studio-page-clean .task-feed-sentinel {
  height: 1px;
  width: 100%;
}
.studio-page-clean .task-feed + .composer {
  position: sticky;
  bottom: 16px;
  z-index: 12;
  margin-top: 18px;
  box-shadow: 0 18px 50px rgba(0,0,0,.34), inset 0 0 0 1px rgba(255,255,255,.05);
}

/* contentEditable is not covered by the input/textarea dark-theme rules. */
.studio-page-clean .studio-prompt-editor {
  color: #f5f7f8 !important;
  caret-color: #c5eff5 !important;
  -webkit-text-fill-color: #f5f7f8;
}
.studio-page-clean .studio-prompt-editor::selection {
  background: rgba(197,239,245,.28);
  color: #fff;
}
.studio-page-clean .clean-prompt-placeholder { color: #9fa5ad !important; }

.studio-page-clean .canvas-card-shell {
  position: relative;
  min-width: 0;
}
.studio-page-clean .canvas-card-shell .canvas-card {
  width: 100%;
}
.studio-page-clean .canvas-card-more {
  position: absolute;
  top: 9px;
  right: 9px;
  z-index: 3;
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 8px;
  background: rgba(18,18,18,.74);
  color: #b8bdc4;
  opacity: 0;
  transition: opacity 140ms ease, background-color 140ms ease, color 140ms ease;
}
.studio-page-clean .canvas-card-more .icon { width: 16px; height: 16px; }
.studio-page-clean .canvas-card-shell:hover .canvas-card-more,
.studio-page-clean .canvas-card-shell:focus-within .canvas-card-more {
  opacity: 1;
}
.studio-page-clean .canvas-card-more:hover,
.studio-page-clean .canvas-card-more:focus-visible {
  background: rgba(255,255,255,.12);
  color: #fff;
}
.studio-page-clean .canvas-card-shell.is-pinned .canvas-card {
  border-color: rgba(197,239,245,.42);
  box-shadow: 0 0 0 1px rgba(197,239,245,.12), 0 18px 45px rgba(0,0,0,.22);
}
.studio-page-clean .studio-account-summary, .studio-page-clean .studio-status-summary > *, .studio-page-clean .studio-result-summary { background: rgba(34,34,34,.9) !important; color: var(--secondary,#b8b8bc) !important; border-color: rgba(255,255,255,.08) !important; }
.studio-page-clean .studio-prompt-editor { color:#fafafa !important; }
.studio-page-clean .studio-prompt-placeholder { color:#99999f !important; }
.studio-page-clean .studio-compose-toolbar { border-color: rgba(255,255,255,.08) !important; }
.studio-page-clean button { color: inherit; }
/* Compatibility bridge for formal StudioPage DOM. */
.studio-page-clean { background: var(--page,#121212) !important; color: var(--text,#fafafa) !important; }
.studio-page-clean .studio-topbar, .studio-page-clean .studio-composer-card, .studio-page-clean .studio-filter-shell { background: rgba(34,34,34,.92) !important; color: var(--text,#fafafa) !important; border-color: rgba(255,255,255,.08) !important; }
.studio-page-clean .studio-account-summary, .studio-page-clean .studio-status-summary > *, .studio-page-clean .studio-result-summary { background: rgba(34,34,34,.9) !important; color: var(--secondary,#b8b8bc) !important; border-color: rgba(255,255,255,.08) !important; }
.studio-page-clean .studio-prompt-editor { color:#fafafa !important; }
.studio-page-clean .studio-prompt-placeholder { color:#99999f !important; }

/* Task-record view: keep the clean shell, but give the selected creation
   record the same focused composition as the reference product. The route is
   activated with #/studio?workspace=<id>&record=1, so the default landing view
   keeps its announcement, hero and generate/canvas switch. */
.studio-page-clean[data-task-record-view="true"] .hero,
.studio-page-clean[data-task-record-view="true"] .workspace-art {
  display: none;
}

.studio-page-clean[data-task-record-view="true"] .workspace {
  display: flex;
  flex-direction: column;
  height: 100dvh;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior-y: contain;
  scrollbar-gutter: stable;
  scrollbar-width: thin;
  scrollbar-color: #4a4a4a transparent;
  padding-top: 68px;
  padding-bottom: 16px;
}
.studio-page-clean[data-task-record-view="true"] .workspace::-webkit-scrollbar {
  width: 8px;
}
.studio-page-clean[data-task-record-view="true"] .workspace::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: #4a4a4a;
}

.studio-page-clean[data-task-record-view="true"] .account-tools {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 30;
}

.studio-page-clean[data-task-record-view="true"] .mode-stage {
  display: flex;
  flex: 0 0 auto;
  flex-direction: column;
  width: min(var(--editor-width), 100%);
  max-width: 100%;
  min-height: 0;
  margin-top: 0;
}

.studio-page-clean[data-task-record-view="true"] #generatePanel {
  display: flex;
  flex: 0 0 auto;
  flex-direction: column;
  width: 100%;
  max-width: 100%;
  min-height: 0;
}

.studio-page-clean[data-task-record-view="true"] .task-feed {
  flex: 0 0 auto;
  width: 100%;
  max-width: 100%;
  min-height: 0;
  margin-top: 0;
  margin-inline: auto;
  padding: 4px 0 28px;
  overflow: visible;
  align-content: start;
}

.studio-page-clean[data-task-record-view="true"] .task-feed-card {
  width: 100%;
  max-width: 100%;
}

.studio-page-clean[data-task-record-view="true"] .task-feed-card article {
  width: 100%;
  max-width: 100% !important;
}

.studio-page-clean[data-task-record-view="true"] .task-feed + .composer {
  position: sticky;
  bottom: 16px;
  z-index: 20;
  flex: 0 0 auto;
  margin-top: 12px;
  margin-bottom: 16px;
  backdrop-filter: blur(18px);
  box-shadow: 0 22px 64px rgba(0,0,0,.48), inset 0 0 0 1px rgba(255,255,255,.06);
}

@media (max-width: 800px) {
  .studio-page-clean[data-task-record-view="true"] .workspace {
    padding-top: 62px;
    padding-bottom: 12px;
  }

  .studio-page-clean[data-task-record-view="true"] .mode-stage {
    width: 100%;
  }

  .studio-page-clean[data-task-record-view="true"] .account-tools {
    top: 12px;
    right: 12px;
  }
}

.studio-page-clean .studio-generating-preview {
  margin-left: 0;
  margin-right: auto;
}

/* Keep task-card actions centered and bounded when the record feed narrows. */
.studio-page-clean .studio-task-action {
  box-sizing: border-box;
  min-width: 112px;
  max-width: 100%;
  min-height: 44px;
  height: 44px;
  flex: 0 1 auto;
  justify-content: center;
  overflow: hidden;
  white-space: nowrap;
  line-height: 1;
  text-align: center;
}

.studio-page-clean .studio-task-action > svg {
  flex: 0 0 auto;
}

.studio-page-clean .studio-task-action > span {
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Shared inline controls on the assets/API routes cannot grow past their
   rounded container when translated labels are longer. */
.clean-library-page :is(button, a)[class~="inline-flex"],
.clean-api-page :is(button, a)[class~="inline-flex"],
.clean-api-page button.glass-button {
  box-sizing: border-box;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  justify-content: center;
  line-height: 1.2;
}

.clean-library-page :is(button, a)[class~="inline-flex"] > svg,
.clean-api-page :is(button, a)[class~="inline-flex"] > svg,
.clean-api-page button.glass-button > svg {
  flex: 0 0 auto;
}

.clean-api-page .api-key-form > button {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  text-align: center;
}
