/* Shotink — dark studio theme, an ink-and-optics palette.

   Three layers, in this order, and nothing skips a layer:
     1. raw palette   ink / amber / verdigris / rust / paper ramps  (hex, no meaning)
     2. channels      --*-rgb, so an alpha tint never re-states the hue
     3. semantic      --bg/--surface/--brand/--on-brand/...         (what you use)

   Rule that is easy to get wrong: amber is a LIGHT colour. Anything filled with
   --brand takes --on-brand (near-black) for its text, never var(--paper) — white on
   amber lands around 2.2:1 and fails WCAG AA outright. */
:root{
  /* ---- 1. raw palette --------------------------------------------- */
  /* Neutral black chrome: no blue cast, no navy tint. */
  --ink-900:#050505; --ink-850:#0A0A0B; --ink-800:#101011;
  --ink-700:#171718; --ink-600:#262628;
  /* Pastel accents stay small and intentional; stage art carries the colour. */
  --amber-300:#E8D8FF; --amber-400:#D8C0FF; --amber-500:#C7A6FF;
  --amber-600:#A984E8; --amber-700:#8063BC;
  --verd-400:#D9FFB0; --verd-500:#C4E996; --verd-600:#8EAF68;
  --rust-400:#FFB9C8; --rust-500:#E995A8; --rust-600:#B9687B;
  --paper:#F4F3EF; --paper-2:#B6B6B8; --paper-dim:#858589;
  /* Deeper than --bg, for wells the studio sits INSIDE: a media stage, a
     scroll trough, the strip behind a filmstrip. It was var(--ink-950) hardcoded in
     seventeen places, which is a token that had not been written down. */
  --ink-950:#000;
  /* True black, and true white, both DELIBERATE and both for art surfaces only.
     A mask preview has to be judged against real black or a soft edge reads as
     opaque; a paint canvas is paper, and warm paper would tint the artwork the
     user is matching colours against. Neither belongs in chrome — the rule
     above still holds everywhere else. */
  --void:#000;
  --canvas-paper:#FFF;
  /* THE MIXER NEEDS FOUR LANES AND THE BRAND HAS THREE HUES.
     Picture, voice, effects and music have to be told apart at a glance in a
     26px track, which amber/verdigris/rust cannot do. So the fourth is declared
     rather than smuggled in: these were rose/teal/amber/purple straight out of
     a utility palette, off-system and unnamed. Pulled toward the brand where a
     hue existed — picture takes rust, voice takes verdigris, effects take
     amber — and plum is the one genuinely new colour in the system.
     Channels as well as hex, because every lane pairs a fill tint with it. */
  --lane-pic:var(--rust-400);      --lane-pic-rgb:224,112,90;
  --lane-voice:var(--verd-400);    --lane-voice-rgb:79,194,174;
  --lane-sfx:var(--amber-400);     --lane-sfx-rgb:245,195,104;
  --lane-music:#A98CD8;            --lane-music-rgb:169,140,216;

  /* ---- 2. channels, so alpha tints don't hardcode the hue ---------- */
  --bg-rgb:10,10,12;
  --brand-rgb:199,166,255;
  --accent-rgb:196,233,150;
  --danger-rgb:233,149,168;
  --paper-rgb:244,240,255;

  /* ---- 3. semantic ------------------------------------------------- */
  --bg:var(--ink-900);
  --surface:var(--ink-800);
  --surface-2:var(--ink-700);
  --surface-3:var(--ink-600);
  --line:rgba(var(--paper-rgb),.10);
  --line-strong:rgba(var(--paper-rgb),.18);
  --ink:var(--paper);
  --muted:var(--paper-dim);
  --brand:var(--amber-500);
  --brand-2:var(--amber-600);
  --on-brand:#12151E;
  --accent:var(--verd-500);
  --danger:var(--rust-500);
  --warn:var(--amber-400);
  --info:var(--verd-400);
  /* was a second amber, which now collides with --brand; parchment instead so
     script/link accents still read as a separate thing. */
  --gold:var(--paper-2);

  /* ---- type -------------------------------------------------------- */
  --font-disp:'Newsreader',Georgia,'Times New Roman',serif;
  --font-body:'Manrope',system-ui,sans-serif;
  --font-mono:'DM Mono',ui-monospace,'SF Mono',Menlo,Consolas,monospace;

  /* ---- form -------------------------------------------------------- */
  --radius:12px; --radius-sm:9px; --radius-lg:18px;
  --shadow:0 18px 50px -28px rgba(0,0,0,.8);
  --shadow-sm:0 6px 18px -10px rgba(0,0,0,.7);
  --ring:0 0 0 3px rgba(var(--brand-rgb),.32);
}
*{margin:0;padding:0;box-sizing:border-box}
/* One focus treatment for the whole app. There was none before: keyboard
   users got the UA default, which is invisible on this background. */
:focus-visible{outline:2px solid var(--brand);outline-offset:2px;border-radius:4px}
.btn:focus-visible,input:focus-visible,textarea:focus-visible,select:focus-visible{outline:none;box-shadow:var(--ring)}
body{font-family:var(--font-body);background:var(--bg);color:var(--ink);line-height:1.55}
h1,h2,h3,.disp{font-family:var(--font-disp);font-weight:500;letter-spacing:-.02em;line-height:1.12}
a{color:inherit;text-decoration:none}
img{max-width:100%;display:block}
.wrap{max-width:1240px;margin:0 auto;padding:0 22px}
.muted{color:var(--muted)}
.row{display:flex;gap:12px;align-items:center}
.col{display:flex;flex-direction:column;gap:12px}
.spread{display:flex;justify-content:space-between;align-items:center;gap:12px}
/* buttons */
.btn{display:inline-flex;align-items:center;gap:8px;border:none;cursor:pointer;font-family:inherit;
  font-weight:700;font-size:.88rem;padding:10px 17px;border-radius:11px;
  background:linear-gradient(135deg,var(--amber-400),var(--brand));color:var(--on-brand);transition:.15s}
.btn:hover{filter:brightness(1.08);transform:translateY(-1px)}
.btn.ghost{background:transparent;color:var(--ink);border:1.5px solid var(--line)}
.btn.ghost:hover{background:var(--surface-2);transform:none;filter:none}
.btn.sm{padding:6px 12px;font-size:.78rem;border-radius:9px}
.btn.block{width:100%;justify-content:center}
.btn.danger{background:var(--rust-600);color:var(--paper)}
.btn:disabled{opacity:.45;cursor:not-allowed;transform:none}
/* header */
header{position:sticky;top:0;z-index:40;background:rgba(var(--bg-rgb),.85);backdrop-filter:blur(12px);border-bottom:1px solid var(--line)}
.brand{font-family:var(--font-disp);font-weight:600;color:var(--ink);font-size:1.12rem;margin-right:auto;
  display:flex;flex-direction:row;align-items:center;gap:10px;line-height:1}
.brand>span{display:flex;flex-direction:column}
.brand small{font-family:var(--font-body);font-size:.56rem;letter-spacing:.3em;text-transform:uppercase;color:var(--brand);font-weight:800}
.brand .mk,.lp-logo .mk{width:auto;height:30px;flex:0 0 auto}
.nav{display:flex;align-items:center;gap:22px;padding:13px 0}
.nav a.link{font-weight:600;font-size:.85rem;color:var(--muted);display:inline-flex;align-items:center;gap:6px}
.nav a.link:hover,.nav a.link.active{color:var(--ink)}
.chip.tool{color:var(--brand)}
label{display:block;font-size:.76rem;font-weight:700;margin:12px 0 5px;color:var(--muted)}
input,textarea,select{width:100%;padding:10px 12px;border:1.5px solid var(--line);border-radius:10px;font-family:inherit;
  font-size:.9rem;background:var(--surface-2);color:var(--ink)}
input:focus,textarea:focus,select:focus{outline:none;border-color:var(--brand)}
textarea{resize:vertical;min-height:78px}
.note{font-size:.76rem;color:var(--muted)}
.tile .src.job{color:var(--accent)}
.job{background:var(--surface-2);border:1px solid var(--line);border-radius:11px;padding:10px 12px;margin-bottom:9px}
.job .spread{margin-bottom:7px}
.job .name{font-size:.82rem;font-weight:700}
.job .msg{font-size:.72rem;color:var(--muted);margin-top:5px}
.status{font-size:.66rem;font-weight:800;padding:3px 8px;border-radius:20px;text-transform:capitalize}
/* toasts */
.toasts{position:fixed;bottom:18px;left:50%;transform:translateX(-50%);z-index:120;display:flex;flex-direction:column;gap:8px}
.toast{background:var(--surface-2);border:1px solid var(--line);color:var(--ink);padding:10px 16px;border-radius:11px;
  font-size:.84rem;font-weight:600;box-shadow:var(--shadow);
  /* A structured refusal is a sentence, not a word: let it wrap rather than run
     off both edges of a narrow window. */
  max-width:min(560px,calc(100vw - 36px));line-height:1.45}
.toast.success{border-color:var(--accent)}
.toast.error{border-color:var(--danger)}
#maskDraw{position:absolute;top:0;left:0;cursor:crosshair;touch-action:none}
.lp-bar .wrap{display:flex;align-items:center;gap:20px;padding:15px 22px}
.lp-bar nav a.profile .btn{padding-left:5px}
.lp-bar nav a.profile .avatar{width:22px;height:22px;border-radius:50%;display:grid;place-items:center;background:rgba(10,10,11,.22);font-size:.72rem;font-weight:800}
@media (max-width:880px){
  .lp-bar nav.open{display:flex}
}
.mb-btn.on{color:var(--brand);background:rgba(var(--brand-rgb),.12)}
.mb-btn.ghost{border-color:var(--line)}
.cell-ph.sm{font-size:1rem}
.muted.sm{font-size:.76rem;color:var(--muted);line-height:1.5}
.feat.on{border-color:var(--brand);background:rgba(var(--brand-rgb),.1)}
.ctl.mono{font-family:ui-monospace,monospace;font-size:.74rem}
.mini.ghost{background:transparent;color:var(--muted)}
/* jobs */
.job{background:var(--surface-2);border:1px solid var(--line);border-radius:10px;padding:10px 12px;margin-bottom:8px}
.job.completed{border-color:rgba(var(--accent-rgb),.4)}
.job.failed{border-color:rgba(var(--danger-rgb),.5)}
/* INDETERMINATE. A job that is provisioning has no percentage to show and never
   did — the bar sat at 0% for the whole cold-volume bootstrap (19 min, measured
   2026-08-24) and read as a hang. A sweep says "working, duration unknown", which
   is the truth; a made-up percentage would not be. */
@keyframes indet{0%{transform:translateX(-100%)}100%{transform:translateX(350%)}}
.job-clear .muted{margin-left:auto}
.stage{flex:1;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px;
  background:transparent;border:none;border-right:1px solid var(--line);color:var(--muted);cursor:pointer;
  position:relative;transition:color .15s,background .15s}
.stage:last-child{border-right:none}
.stage:hover{color:var(--ink);background:rgba(255,255,255,.03)}
.stage.on{color:var(--ink);background:rgba(var(--brand-rgb),.1)}
.stage.on::before{content:'';position:absolute;top:0;left:0;right:0;height:3px;background:var(--brand)}
.stage.on .stage-no{color:var(--brand)}
.opt-in.sm{width:120px}
/* ============================================================= *//*  STUDIO v3 — professional creative-tool design system          *//*  Neutral chrome, one calm accent, splash-image stage pills.    *//*  Inspiration: Figma canvas, ZBrush/Photoshop panel chrome.     *//* ============================================================= *//* Adds only what the studio shell needs on top of the palette at the top of this
   file. Re-declaring --bg/--surface/--ink/--muted/--line/--radius here would win
   by being second and turn that palette into dead code. */
:root{
  --line-2:rgba(var(--paper-rgb),.16);
  --faint:#6B6659;
  --ac:var(--brand);           /* the single accent */
  --ac-soft:rgba(var(--brand-rgb),.14);
  --ac-line:rgba(var(--brand-rgb),.45);
  --ok:var(--accent);
  --ease-spring:cubic-bezier(.34,1.4,.5,1);
  --dot:radial-gradient(circle, rgba(var(--paper-rgb),.05) 1px, transparent 1px);
}
/* calm neutral ambience, not a light show */
body::before{
  content:"";position:fixed;inset:0;z-index:-1;pointer-events:none;
  background:radial-gradient(70% 55% at 50% -10%,rgba(var(--brand-rgb),.08),transparent 70%);
}
/* NO `transform:translateY(0)` in the `to` keyframe. These animations run with
   `both`, so the final keyframe stays applied for the life of the element — and a
   transform other than `none` makes that element a stacking context AND the
   containing block for its `position:fixed` descendants. `.workarea` carries this
   animation (below), so the editor sheet inside it was being sized to the work area
   rather than the viewport and painted UNDER the unpositioned menubar, whatever
   z-index it asked for. translateY(0) is the default; leaving it out changes
   nothing on screen and un-traps .workarea, .inspector and
   .history-window alike. */
@keyframes fadeSlideUp{from{opacity:0;transform:translateY(12px)}to{opacity:1}}
@keyframes scaleIn{from{opacity:0;transform:scale(.96)}to{opacity:1}}
/* same reason as above */
@keyframes floaty{0%,100%{transform:translateY(0)}50%{transform:translateY(-5px)}}
/* ---- buttons: solid, quiet, one accent (NO multicolor gradients) ---- */
.btn{background:var(--ac);color:var(--on-brand);border:1px solid transparent;border-radius:10px;
  font-weight:600;transition:transform .16s var(--ease-spring),background .16s,box-shadow .16s}
.btn:hover{background:var(--amber-400);transform:translateY(-1px);box-shadow:0 6px 18px -8px rgba(var(--brand-rgb),.6);filter:none}
.btn:active{transform:translateY(0)}
.btn.ghost{background:var(--surface-2);color:var(--ink);border:1px solid var(--line-2)}
.btn.ghost:hover{background:var(--surface-3);box-shadow:none}
.btn.danger{background:var(--rust-600);color:var(--paper)}
.btn.lg{padding:13px 24px;font-size:.96rem;border-radius:12px}
.stagebar .stage{
  position:relative;display:flex;align-items:center;justify-content:center;gap:9px;flex:1;min-width:130px;
  border:none;border-right:1px solid var(--line);border-radius:0;padding:0 18px;cursor:pointer;
  color:rgba(255,255,255,.7);background-color:var(--surface-2);background-size:cover;
  background-position:right center;background-repeat:no-repeat;overflow:hidden;
  transition:filter .2s,color .2s,box-shadow .2s;
  filter:saturate(.5) brightness(.7)}
.stagebar .stage:last-child{border-right:none}
.stagebar .stage:hover{filter:saturate(.8) brightness(.86);color:var(--paper)}
.stagebar .stage.on{
  filter:none;color:var(--paper);
  box-shadow:inset 0 -3px 0 var(--paper),0 1px 0 rgba(255,255,255,.05) inset}
.ctool.on{background:var(--ac-soft);color:var(--paper);border-color:var(--ac-line)}
.dropzone.drag{border-color:var(--ac);color:var(--ink);background:var(--ac-soft);transform:scale(1.005)}
.dz-file .ok{color:var(--ok);margin-left:auto}
.badge.ok{background:rgba(var(--accent-rgb),.14);color:var(--ok)}
/* tidy scrollbars */
::-webkit-scrollbar{width:11px;height:11px}
::-webkit-scrollbar-thumb{background:rgba(255,255,255,.10);border-radius:999px;border:3px solid transparent;background-clip:content-box}
::-webkit-scrollbar-thumb:hover{background:rgba(255,255,255,.18);background-clip:content-box}
.chip.tool{background:var(--ac-soft);color:var(--amber-300)}
.status{font-size:.72rem;font-weight:700;padding:3px 9px;border-radius:999px;background:var(--surface-3);color:var(--muted)}
.status.s-completed{background:rgba(var(--accent-rgb),.14);color:var(--ok)}
.status.s-running,.status.s-pending{background:var(--ac-soft);color:var(--amber-300)}
.status.s-failed{background:rgba(var(--danger-rgb),.16);color:var(--danger)}
/* permanent delete + assistant ask box */
.mini.danger{color:var(--danger);border-color:rgba(var(--danger-rgb),.4)}
.mini.danger:hover{background:rgba(var(--danger-rgb),.12);color:var(--rust-400)}
.row.gap{display:flex;gap:8px;flex-wrap:wrap;margin-top:8px}
.acm.user{align-self:flex-end;background:var(--ac);color:var(--on-brand);border-bottom-right-radius:3px}
.viewtoggle button.on{background:var(--ac-soft);color:var(--paper);box-shadow:inset 0 0 0 1px var(--ac-line)}
.rd-cine .row.gap textarea.ctl{flex:1 1 0;min-width:0}
.rd-acts.tight{flex-wrap:nowrap;align-items:center;margin:0}
.rd-acts.tight > :last-child{margin-left:auto}
.rd-animatable .row{justify-content:space-between}
.gf-negchip.on{color:var(--ac);border-color:var(--ac-line);background:var(--ac-soft)}
.srcboard-tabs button.on{background:var(--ac-soft);color:var(--paper);box-shadow:inset 0 0 0 1px var(--ac-line)}
/* The JUDGE block was here — score tags, the judge bar, the score dock.
   Removed 2026-08-15 with the feature (services/gemini.py has the reasoning).
   Nothing else used .sc-good/.sc-ok/.sc-bad, .cell-score, .judge-* or .jc*;
   verified by grep over templates/ and static/js/ before deleting. *//* =========================================================== *//*  EDITOR UI POLISH (slice 4)                                  *//* =========================================================== *//* Feature panel: shot-generator hero preview with an animated sheen */
@keyframes pzazSheen{0%{background-position:0% 50%}100%{background-position:200% 50%}}
@media (max-width:760px){
  .wrap{padding:0 15px}
}
/* Shotink visual system: neutral black editorial cockpit */
:root{
  --ink-950:#070d1b; --ink-900:#0c1526; --ink-850:#111d31; --ink-800:#172640;
  --ink-700:#223554; --ink-600:#2c4162;
  --silver-100:#f2f4f7; --silver-200:#d7dee8; --silver-300:#aeb9ca; --silver-400:#8290a5;
  --blue-300:#9ebbe5; --blue-400:#6f94ca; --blue-500:#4e73a9; --blue-600:#385987;
  --bg:var(--ink-900); --surface:var(--ink-850); --surface-2:var(--ink-800); --surface-3:var(--ink-700);
  --line:rgba(196,211,232,.13); --line-strong:rgba(196,211,232,.24);
  --ink:var(--silver-100); --muted:var(--silver-400); --brand:var(--blue-300); --brand-2:var(--blue-500);
  --accent:var(--silver-200); --gold:var(--silver-300); --paper:var(--silver-100); --paper-2:var(--silver-200); --paper-dim:var(--silver-400);
  --bg-rgb:12,21,38; --brand-rgb:158,187,229; --accent-rgb:215,222,232; --paper-rgb:242,244,247;
  --font-disp:'Cormorant Garamond', Georgia, serif; --font-body:'DM Sans', system-ui, sans-serif;
  --radius:14px; --radius-sm:10px; --radius-lg:22px;
  --shadow:0 24px 80px -34px rgba(0,0,0,.85); --shadow-sm:0 10px 28px -18px rgba(0,0,0,.9);
  --ring:0 0 0 3px rgba(158,187,229,.24);
}
body{background:radial-gradient(900px 520px at 78% -12%,rgba(78,115,169,.16),transparent 68%),var(--bg);letter-spacing:.005em}
body:before{content:"";position:fixed;inset:0;pointer-events:none;opacity:.16;background-image:linear-gradient(rgba(255,255,255,.025) 1px,transparent 1px),linear-gradient(90deg,rgba(255,255,255,.025) 1px,transparent 1px);background-size:56px 56px;mask-image:linear-gradient(to bottom,black,transparent 80%)}
h1,h2,h3,.disp{font-weight:500;letter-spacing:-.035em}
.btn{background:linear-gradient(135deg,var(--blue-300),var(--blue-500));box-shadow:0 10px 24px -16px rgba(158,187,229,.8);border-radius:10px;transition:transform .25s cubic-bezier(.2,.8,.2,1),box-shadow .25s,filter .25s}
.btn:hover{transform:translateY(-2px);box-shadow:0 16px 32px -16px rgba(158,187,229,.7)}
header{background:rgba(12,21,38,.82);backdrop-filter:blur(18px);border-bottom-color:var(--line-strong)}
@media (prefers-reduced-motion:no-preference){
  .card,.btn,.tile,.lp-feature{animation:rise-in .6s both}
  @keyframes rise-in{from{opacity:0;transform:translateY(8px)}to{opacity:1;transform:none}}
}
.stage-sidebar.on{filter:none;box-shadow:inset 3px 0 var(--paper),0 8px 18px -14px #000!important}
:root{
  --ink-950:#000000; --ink-900:#050505; --ink-850:#0A0A0B; --ink-800:#101011;
  --ink-700:#171718; --ink-600:#262628;
  --bg:#050505; --surface:#0A0A0B; --surface-2:#101011; --surface-3:#171718;
  --bg-rgb:5,5,5; --paper-rgb:244,244,242;
  --line:rgba(244,244,242,.11); --line-strong:rgba(244,244,242,.20);
  --ink:#F4F4F2; --muted:#858589; --on-brand:#0A0A0B;
  /* The brand is the pastel lavender the buttons and the studio's active
     states already use; the moonlight-blue block above left --brand on blue
     while .btn had moved on, so a link and a button disagreed. Lime stays
     the small accent. Fonts are the ones base.html and landing.html load. */
  --brand:#C7A6FF; --brand-2:#A984E8; --brand-rgb:199,166,255;
  --accent:#C4E996; --accent-rgb:196,233,150;
  --ring:0 0 0 3px rgba(199,166,255,.28);
  --font-disp:'Newsreader',Georgia,'Times New Roman',serif;
  --font-body:'Manrope',system-ui,sans-serif;
  --font-mono:'DM Mono',ui-monospace,'SF Mono',Menlo,Consolas,monospace;
}
body{background:var(--bg)}
.btn{background:linear-gradient(135deg,#D8C0FF,#C7A6FF);box-shadow:0 10px 24px -16px rgba(199,166,255,.55)}
@media (max-width:760px){
  .stage-sidebar.on{box-shadow:inset 0 -3px var(--paper)!important}
}
.dash-body .note{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.dash-actions .btn.icon{padding:6px 9px}
.dash-actions .btn.ghost.on{border-color:var(--brand);color:var(--brand)}
@media (max-width:560px){
  .dash-cont-head .btn{width:100%;justify-content:center}
}
.acct .spread.sm{font-size:.8rem}
.acct .pr-plan .btn{margin-top:auto;justify-content:center}
.fx-scope .mini.on{background:var(--ac);color:var(--on-brand);border-color:var(--ac)}
.fx-beat.on{border-color:var(--ac);box-shadow:inset 0 0 0 1px var(--ac)}
/* #7 polish: loading skeletons + smoother cells */
@keyframes shimmer{100%{background-position:-200% 0}}
.fp-card.wide{align-items:flex-start;flex-wrap:wrap}
/* The label wins the width; the strip drops to its own row when the card is
   narrow, rather than truncating "Apply Anime Style 2 · …" down to nothing. */
.fp-card.wide .fp-tx{min-width:130px;flex:1 1 auto}
.fp-card.wide .fp-tx b{white-space:normal;overflow:visible;text-overflow:clip}
.fp-card.on{border-color:var(--ac);background:var(--ac-soft)}
.fb-step.ok{color:var(--ok);border-color:rgba(var(--accent-rgb),.35);background:rgba(var(--accent-rgb),.08)}
.fb-step.ok i{color:var(--ok)}
.fb-chip.is-active .fb-ic,.fb-chip.is-next .fb-ic{opacity:1;color:var(--ac)}
@keyframes chipPulse{0%{opacity:.6;transform:scale(1)}70%,100%{opacity:0;transform:scale(1.06)}}
/* ACTIVE — its panel is open right now. */
.fb-chip.is-active{border-color:var(--ac);background:var(--ac-soft);box-shadow:0 0 0 1px var(--ac-line)}
.fb-chip.is-active .fb-no,.fb-chip.is-active .fb-ic{background:var(--ac);color:var(--on-brand)}
.fb-chip.is-active::after{display:none}
/* DONE WINS THE MARK. A finished step keeps its green tick while it is the
   selected chip; selection is the border, completion is the badge. Before this
   the one chip that could never show done was the one you had just run — which
   is the only success signal a step that writes NO files has (Understand Pages
   writes analyses, not assets), so running it looked like nothing happened. */
.fb-chip.is-active.is-done .fb-no{background:var(--ok);color:var(--on-brand)}
.fb-chip.is-active.is-done .fb-ic{background:transparent;color:var(--ok);opacity:.85}
.fb-jobs.on{color:var(--ac);border-color:var(--ac)}
.srctab.on{background:var(--ac-soft);color:var(--ac)}
.srctab.on b{background:var(--ac);color:var(--on-brand)}
@media(max-width:640px){
/* THE STAGE BAR MUST NEVER TILE EXACTLY. Six stages at `min-width:130px`
     happen to fit a 390px phone THREE to a screen with no remainder — so the row
     looks complete, and a row that looks complete is a row nobody swipes. Sized
     as a fraction of the viewport instead, so a slice of the next stage is
     always showing at any width: 38% gives 2.6 tabs, and 2.6 is the whole point.
     `flex:0 0` because `flex:1` would stretch them back to fill the bar, which
     is the tiling this removes. */
  .stagebar .stage{flex:0 0 38%;min-width:0}
}
.st-fam button.on{background:var(--ac-soft,var(--surface-3));border-color:var(--ac-line);color:var(--ac)}
.st-fam button.on .st-count{color:var(--ac)}
/* =========================================================== *//*  MOTION — a small, consistent vocabulary                     *//*                                                              *//*  Four ideas, used everywhere, so the app feels like one       *//*  thing: chrome SETTLES in, panels SLIDE from the edge they    *//*  belong to, lists STAGGER so the eye follows the order, and   *//*  anything running BREATHES. Durations stay under 340ms —      *//*  this is a tool people use all day, not a landing page.       *//* =========================================================== */
@keyframes dockIn{from{opacity:0;transform:translateX(18px)}to{opacity:1;transform:translateX(0)}}
@keyframes popIn{from{opacity:0;transform:scale(.92)}to{opacity:1;transform:scale(1)}}
@keyframes breathe{0%,100%{opacity:1}50%{opacity:.55}}
/* stage bar: the current stage lifts */
.stagebar .stage{transition:filter .24s,color .24s,box-shadow .24s,transform .24s var(--ease-spring)}
.stagebar .stage:hover{transform:translateY(-2px)}
.stagebar .stage.on{transform:translateY(-2px)}
/* focus that is visible without being loud — keyboard users get a real ring */
.fb-chip:focus-visible,.dl-btn:focus-visible,.stagebar .stage:focus-visible,
.mb-btn:focus-visible,.run:focus-visible,.mini:focus-visible{
  outline:2px solid var(--ac);outline-offset:2px}
/* =========================================================== *//*  Respect the OS setting. Motion is decoration here — every    *//*  state it expresses is also expressed by colour, a number or  *//*  an icon, so turning it all off loses nothing.                *//* =========================================================== */
@media (prefers-reduced-motion:reduce){
  *,*::before,*::after{
    animation-duration:.01ms!important;animation-iteration-count:1!important;
    transition-duration:.01ms!important;scroll-behavior:auto!important}
  .fb-chip:hover,.dl-btn:hover,.stagebar .stage:hover,.stagebar .stage.on{transform:none}
}
.canvas-bar .mini.on{border-color:var(--ac-line);color:var(--ink)}
/* The editor bodies were written to fill `.wa-body`; inside the sheet they fill
   the sheet instead. Their trailing helper line was flush against `.wa-body`'s
   own padding and inside the sheet there is none, so it ran into the corner. */
.editor-sheet > .canvaswrap > p.muted,
.editor-sheet > .docwrap > p.muted{padding:0 14px 12px;margin:6px 0 0}
/* Fix this clip carries eight fields; the tools carry two or three. */
.ed-dock.wide{flex-basis:340px}
.ed-dock-body .job{margin-bottom:8px}
@media (max-width:1100px){
  .ed-dock.wide{flex-basis:270px}
}
@keyframes veil-in{ from { opacity: 0 } to { opacity: 1 } }
@keyframes sheet-in{ from { opacity: 0; transform: translateY(8px) scale(.985) } }
.sbd-voice:hover,.sbd-voice.on{border-color:var(--brand);background:rgba(var(--brand-rgb),.08)}
.sbd-unfit.short{border-color:var(--line);color:var(--muted)}
.sbd-unfit.short:hover{background:var(--surface-2);color:var(--ink)}
/* The video-script mark. `on` is a STATE, not a hover — exactly one file in the
   project carries it, and it has to read as chosen from across the grid. */
.mini.on,.vs-mark.on{background:rgba(var(--brand-rgb),.16);color:var(--brand);
  border-color:rgba(var(--brand-rgb),.45)}
.ns-kind.on{border-color:var(--brand);background:rgba(var(--brand-rgb),.12)}
.doc-tabs button.on{background:var(--surface-3);color:var(--ink)}
.opt-in.who{width:140px}
.srt-views button.on{background:rgba(var(--brand-rgb),.18);color:var(--ink)}
@media (max-width: 720px){
  .opt-in.who{width:100%}
}
/* An open card takes the full row: the reading is paragraphs and a list of lines,
   and neither is editable in a 230px column. */
.stcell.open{grid-column:1/-1;border-color:var(--ac)}
.stcell.open .st-media{aspect-ratio:auto;height:160px}
.st-line .opt-in.who{flex:0 0 200px}
.st-sure.on{color:var(--brand-2);border-color:var(--brand-2)}
@media (max-width: 720px){
  .st-line .opt-in.who{flex:1 1 100%}
}
.vboard.on{border-color:var(--brand);box-shadow:0 0 0 1px var(--brand) inset}
/* The frames popup: every plate in one board, full size. */
.modal.wide{max-width:min(1040px,92vw)}
.mix-block.live{filter:brightness(1.35);box-shadow:0 0 0 1px rgba(var(--paper-rgb),.5)}
.room-banner .btn{flex:none}
/* The 2026-09-27 mark is wide (~1.9:1), so on a phone it is drawn a step
   smaller and the one text link in the app bar is kept on one line. */
@media (max-width:560px){
  .brand .mk{height:24px}
}
.cr-strip-item.on{border-color:var(--ac);box-shadow:0 0 0 1px var(--ac) inset}
.cr-strip-item.on figcaption{color:var(--ac);font-weight:700}
@media (max-width:720px){
  .board-beat .row.gap{flex-wrap:wrap}
}
.appbar-brand .mk{height:28px;width:auto;flex:0 0 auto}
.appnav a.on{color:var(--ink);background:var(--surface-2);box-shadow:inset 0 0 0 1px var(--line)}
.appbar-project .dot{width:6px;height:6px;border-radius:50%;background:var(--accent);flex:0 0 auto;
  box-shadow:0 0 0 3px rgba(var(--accent-rgb),.12)}
.appbar-project .name{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.avatar{
  width:30px;height:30px;border-radius:50%;display:grid;place-items:center;flex:0 0 auto;
  background:linear-gradient(135deg,#DCC8FF,#B58BFF);color:#14091F;
  font-family:var(--font-body);font-size:.7rem;font-weight:800;letter-spacing:.02em;
}
.avatar.lg{width:38px;height:38px;font-size:.82rem}
.account-trigger .who{display:flex;flex-direction:column;align-items:flex-start;line-height:1.15;min-width:0}
.account-trigger .who b{font-size:.76rem;font-weight:700;max-width:120px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.account-trigger .who small{font-size:.6rem;color:var(--muted);font-weight:600;letter-spacing:.05em;text-transform:uppercase}
@keyframes wsPop{from{opacity:0;transform:translateY(-5px) scale(.985)}to{opacity:1;transform:none}}
.sx-hint{color:var(--muted);font-size:.76rem;line-height:1.55}
.sx-iconbtn{
  width:34px;height:34px;display:inline-grid;place-items:center;flex:0 0 auto;
  background:transparent;border:1px solid var(--line);border-radius:9px;
  color:var(--muted);font-size:.8rem;cursor:pointer;transition:.15s;
}
.sx-iconbtn:hover{color:var(--ink);background:var(--surface-2);border-color:var(--line-strong)}
.sx-iconbtn:disabled{opacity:.45;cursor:not-allowed}
.sx-iconbtn.danger-text{color:var(--danger)}
.sx-chip.ok{background:rgba(var(--accent-rgb),.11);color:var(--accent)}
.sx-chip.danger{background:rgba(var(--danger-rgb),.12);color:var(--danger)}
.sx-notice.danger{background:rgba(var(--danger-rgb),.07);border-color:rgba(var(--danger-rgb),.3);color:var(--paper-2)}
.sx-notice.danger>i{color:var(--danger)}
.sx-notice .btn{margin-left:auto;flex:0 0 auto}
.sx-table .mono{font-family:var(--font-mono);font-size:.76rem}
.mono{font-family:var(--font-mono);font-size:.78rem}
.sx-tabs>button.on{color:var(--ink);border-bottom-color:var(--brand)}
@keyframes wsPulse{0%{box-shadow:0 0 0 0 rgba(var(--accent-rgb),.45)}70%{box-shadow:0 0 0 6px rgba(var(--accent-rgb),0)}100%{box-shadow:0 0 0 0 rgba(var(--accent-rgb),0)}}
/* ---- dialogs ------------------------------------------------------------ */
.sx-veil{
  position:fixed;inset:0;z-index:100;display:grid;place-items:center;padding:18px;
  background:rgba(2,2,3,.72);backdrop-filter:blur(5px);
  animation:wsFade .14s ease both;
}
@keyframes wsFade{from{opacity:0}to{opacity:1}}
.sx-modal{
  position:relative;display:flex;flex-direction:column;width:100%;max-width:560px;
  max-height:calc(100dvh - 36px);
  background:#0D0D0F;border:1px solid var(--line-strong);border-radius:16px;
  box-shadow:0 40px 110px -30px rgba(0,0,0,.95),0 1px 0 rgba(255,255,255,.05) inset;
  outline:none;animation:wsModalIn .18s var(--ease-spring) both;
}
@keyframes wsModalIn{from{opacity:0;transform:translateY(8px) scale(.99)}to{opacity:1;transform:none}}
.sx-modal:focus{outline:none}
.sx-modal-head{
  display:flex;align-items:flex-start;justify-content:space-between;gap:16px;
  padding:20px 20px 15px;border-bottom:1px solid var(--line);flex:0 0 auto;
}
.sx-modal-title{display:flex;gap:12px;align-items:flex-start;min-width:0}
.sx-modal-ic{
  width:36px;height:36px;flex:0 0 auto;display:grid;place-items:center;border-radius:10px;
  background:rgba(var(--brand-rgb),.12);border:1px solid rgba(var(--brand-rgb),.22);color:var(--brand);font-size:.9rem;
}
.sx-modal-head h2{font-family:var(--font-disp);font-weight:500;font-size:1.35rem;letter-spacing:-.025em;line-height:1.1;overflow-wrap:anywhere}
.sx-modal-head p{color:var(--muted);font-size:.78rem;margin-top:4px}
.sx-modal-body{padding:20px;overflow:auto;min-height:0}
.sx-modal-foot{
  display:flex;justify-content:flex-end;gap:8px;flex-wrap:wrap;
  padding:14px 20px 18px;border-top:1px solid var(--line);flex:0 0 auto;
}
.sx-modal .btn.danger{background:var(--rust-600);color:var(--paper)}
.sx-modal input:not([type="checkbox"]):not([type="radio"]),
.sx-modal textarea,
.sx-modal select{
  width:100%;background:var(--bg);border:1px solid var(--line-2);border-radius:9px;
  color:var(--ink);padding:9px 11px;font:inherit;font-size:.86rem;transition:border-color .15s,box-shadow .15s;
}
.sx-modal input:focus,.sx-modal textarea:focus,.sx-modal select:focus{outline:none;border-color:var(--ac-line);box-shadow:0 0 0 3px var(--ac-soft)}
.sx-modal textarea{resize:vertical;min-height:72px;line-height:1.5}
.sx-modal label{display:block;font-size:.72rem;font-weight:700;color:var(--paper-2);margin:0 0 6px;letter-spacing:.01em}
.sx-modal label span{font-weight:500;color:var(--muted)}
.sx-menu button.danger{color:var(--danger)}
.sx-menu button.danger i{color:var(--danger)}
.sx-menu button.danger:hover{background:rgba(var(--danger-rgb),.09);color:var(--danger)}
.pj-continue-main .btn{margin-left:auto}
.pj-live-head .muted{font-weight:600;letter-spacing:.02em;text-transform:none}
.pj-avatar.lg{width:50px;height:50px;border-radius:13px;font-size:1.35rem}
.pj-progress .spread{font-size:.72rem;color:var(--muted);margin-bottom:6px}
.pj-progress .spread>span{display:inline-flex;align-items:center;gap:6px}
.pj-progress .spread b{font-family:var(--font-mono);font-size:.7rem;color:var(--paper-2)}
.skel-line.wide{width:74%}
.pj-form .sx-hint{margin-top:9px}
.pj-dropzone.drag{border-color:var(--brand);background:rgba(var(--brand-rgb),.07)}
.pj-dropzone .btn{margin-top:9px}
.pj-dropzone .btn.disabled,.btn.disabled{opacity:.5;pointer-events:none}
.pj-assets-bar .sx-hint{margin:0}
.bl-card-head.tight{margin-bottom:10px}
.bl-wallet-actions .btn{flex:0 0 auto}
.dot{display:inline-block;width:6px;height:6px;border-radius:50%}
.dot.monthly{background:var(--brand)}
.dot.extra{background:var(--accent)}
.bl-plan .btn{margin-top:auto;justify-content:center}
.bl-plan .btn.ghost{background:var(--surface-2);border:1px solid var(--line-2);color:var(--ink)}
.se-nav a.on{color:var(--ink);background:var(--surface-2);box-shadow:inset 0 0 0 1px var(--line)}
.se-nav a.danger{color:var(--danger)}
.se-nav a.danger:hover{background:rgba(var(--danger-rgb),.07)}
.se-field{display:flex;flex-direction:column;margin-bottom:15px}
.se-field>label{display:block;font-size:.72rem;font-weight:700;color:var(--paper-2);margin:0 0 6px}
.se-field input,.se-field select,.se-field textarea{
  width:100%;background:var(--bg);border:1px solid var(--line-2);border-radius:9px;
  color:var(--ink);padding:9px 11px;font:inherit;font-size:.86rem;transition:border-color .15s,box-shadow .15s;
}
.se-field input:focus,.se-field select:focus,.se-field textarea:focus{outline:none;border-color:var(--ac-line);box-shadow:0 0 0 3px var(--ac-soft)}
.se-field .sx-hint{margin-top:5px}
.se-error{color:var(--danger);font-size:.76rem;line-height:1.5;margin:4px 0 8px}
.se-danger .btn.danger{background:var(--rust-600);color:var(--paper)}
.sy-tabs .sy-tab-count.live{background:rgba(var(--accent-rgb),.12);color:var(--accent)}
.sy-tabs .sy-tab-count.danger{background:rgba(var(--danger-rgb),.14);color:var(--danger)}
.sy-progress.wide{width:100%;min-width:64px;max-width:120px}
.sy-run .btn{padding:4px 8px;font-size:.64rem}
.sy-attention-row .dot{flex:0 0 auto}
.sy-attention-row .dot.danger{background:var(--danger)}
.sy-attention-row .dot.warn{background:var(--brand)}
.plan-dot.studio{background:var(--danger)}
.sy-segment button.on{background:var(--surface-3);color:var(--ink)}
.sy-status.ok{color:var(--accent)}
.sy-status.ok i{background:var(--accent)}
.sy-status.danger{color:var(--danger)}
.sy-status.danger i{background:var(--danger)}
.sy-status.live{color:var(--brand)}
.sy-status.live i{background:var(--brand);animation:wsPulse 2s infinite}
.sy-failed-card .sx-card-head>.muted{white-space:nowrap}
.plan-pill.studio{background:rgba(var(--danger-rgb),.1);color:var(--danger)}
.sy-row-actions .btn,.sy-row-actions .sx-iconbtn{display:inline-flex;vertical-align:middle;margin-left:4px}
.sy-field textarea.mono,.sy-field .mono{font-family:var(--font-mono);font-size:.72rem}
.sy-field .sx-hint{margin-top:4px}
.sy-config-field .btn{flex:0 0 auto}
.sy-credit-edit .btn{align-self:end}
.sy-drawer-tabs button.on{color:var(--ink);border-bottom-color:var(--brand)}
@media (max-width:1150px){
  .account-trigger .who b{max-width:88px}
}
@media (max-width:980px){
  .account-trigger .who{display:none}
  .se-nav a.on{border-color:var(--line-strong)}
  .se-nav a.danger{order:9}
}
@media (max-width:820px){
  .sx-head-actions .btn{flex:0 1 auto}
  .pj-continue-main .btn{margin-left:0}
  .sy-editor-actions .btn{flex:1}
}
@media (max-width:640px){
  .sx-head-actions .btn{font-size:.78rem;padding:8px 11px}
  .sx-modal-head{padding:16px 15px 12px}
  .sx-modal-body{padding:15px}
  .sx-modal-foot{padding:12px 15px 15px}
  .sx-modal-head h2{font-size:1.18rem}
  .sx-modal-ic{width:31px;height:31px;font-size:.8rem}
  .sx-veil{padding:9px}
  .sx-modal{max-height:calc(100dvh - 18px);border-radius:13px}
  .sx-modal-foot .btn{flex:1;justify-content:center}
  .se-form-actions .btn{flex:1}
  .sy-run .btn{grid-column:2 / 4;justify-self:start}
  .sy-config-field .btn{width:100%}
  .sy-credit-edit .btn{grid-column:1 / -1}
  .sy-drawer-foot .btn{width:100%}
}
@media (max-width:430px){
  .bl-plan-actions .btn,.bl-plan-actions .bl-text-link{width:100%;justify-content:center}
}
/* Respect a reduced-motion preference across every new surface. */
@media (prefers-reduced-motion:reduce){
  .account-pop,.sx-modal,.sx-veil,.sx-menu{animation:none}
  .live-dot,.sy-status.live i{animation:none}
}
@media (max-width:700px){
  .sy-jobs-table .sy-progress.wide{flex:1;max-width:none}
}
/* Disabled states must survive the entrance animation and stay visibly inert. */
.btn:disabled{opacity:.42!important;filter:saturate(.55)}
.sx-iconbtn:disabled{opacity:.35!important}
.ct-sent{display:flex;flex-direction:column;align-items:flex-start;gap:7px;padding:10px 2px 4px}
.ct-sent-ic{
  width:44px;height:44px;display:grid;place-items:center;border-radius:12px;
  background:rgba(var(--accent-rgb),.1);color:var(--accent);font-size:1rem;margin-bottom:4px;
}
.ct-sent h3{font-family:var(--font-disp);font-size:1.25rem;font-weight:500;letter-spacing:-.02em;color:var(--ink)}
.ct-sent p{font-size:.84rem;line-height:1.6;color:var(--muted);max-width:52ch}
.ct-sent b{color:var(--paper-2);overflow-wrap:anywhere}
.ct-form .se-field textarea{resize:vertical;min-height:120px}
.pj-group-head .muted{color:var(--muted);font-size:.7rem;margin-left:auto;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.tm-invite-row .btn{flex:0 0 auto;white-space:nowrap}
.tm-linkline .btn{flex:0 0 auto}
.tm-block-head .muted{color:var(--muted);font-size:.7rem}
.tm-seg button.on{background:var(--surface-3);color:var(--ink)}
.tm-join-head .btn{flex:0 0 auto}
@media (max-width:700px){
  .tm-invite-row .btn{justify-content:center}
  .tm-linkline .btn{justify-content:center}
}
@media (min-width:761px){
  .stage-navigation .stage-sidebar.on{
    background-color:var(--surface-2)!important;
    box-shadow:inset 2px 0 var(--ac)!important}
  .stage-sidebar.on .stage-no,.stage-sidebar:hover .stage-no{color:var(--paper-2)}
  .stage-sidebar.on .stage-ic{color:var(--ac)}
  .stage-sidebar.on .stage-lb,.stage-sidebar:hover .stage-lb{color:var(--ink)}
}
.demo-btn.ghost{background:transparent;border:1px solid rgba(255,230,173,.45);color:#ffe6ad}
.demo-btn.ghost:hover{background:rgba(255,230,173,.12)}
.demo-modal.credits .demo-btn.ghost{background:transparent;color:inherit;border:1px solid var(--line-strong,#2a3648)}

/* The black theme's header override. In the old monolith it was grouped as
   `header,.menubar`; .menubar is studio-only, so the studio keeps its half in
   studio.css and every other page gets this one. */
header{background:rgba(5,5,5,.90)}
