/* Milkhouse Studio — the studio of tomorrow, 1962: boomerang roofs, ivory enamel, cherry-red script, chrome bezels,
   brass trim and a blue desert sky. Every department is a machine on the plaza (js/machines.js).
   Day shoot by default; a neon night shoot for evening work. All type and artwork are local. */

:root, [data-theme="light"] {
  --bg0: #fffdf7; --bg: #f6eddc; --bg1: #efe4ce; --bg2: #fffaf0; --bg3: #f8f0e0; --hover: #f4e7cf;
  --line: #e6d8bd; --line2: #cfbc9a;
  --fg: #2b2320; --fg2: #54473f; --muted: #786758; --faint: #8f7e6e;
  --accent: #c9342a; --accent-ink: #fff6e6; --accent-soft: rgba(201, 52, 42, .11); --red-deep: #8f1f18;
  --gold: #d9a441; --gold-hi: #f6d68e; --brass: #a8761f; --sky: #2f86d1; --teal: #22958a;
  --cyan: #2f8ea1; --rose: #c25b4e; --violet: #7b65a6; --sage: #4f8a62; --slate: #5f7d99; --sand: #b48434;
  --ok: #2f7d55; --warn: #a3600c; --bad: #a3203f; --info: #2f78bd;
  --masthead: #fffaf0; --nav-ink: #2b2320;
  --chrome: linear-gradient(180deg, #ffffff 0%, #f1f0ec 34%, #cfcdc7 52%, #e7e5df 70%, #fbfaf6 100%);
  --chrome-x: linear-gradient(90deg, #a19e97 0%, #ffffff 28%, #d9d7d1 52%, #f6f5f1 72%, #96938c 100%);
  --ring: #e9e7e1; --ring2: #aca79d;
  --enamel: linear-gradient(180deg, #e2503f 0%, #c9342a 52%, #ab2920 100%);
  --btn: linear-gradient(180deg, #ffffff 0%, #f6f1e6 55%, #e9e1d1 100%);
  --shadow: 0 16px 40px rgba(86, 44, 18, .16);
  --panel-shadow: 0 1px 2px rgba(86, 44, 18, .05), 0 8px 22px rgba(86, 44, 18, .06);
  --scrim: rgba(40, 18, 10, .72);
  color-scheme: light;
}
[data-theme="dark"] {
  --bg0: #0c1321; --bg: #101a2c; --bg1: #18243b; --bg2: #152036; --bg3: #1b2943; --hover: #22334f;
  --line: #2b3b58; --line2: #44587b;
  --fg: #fbf0dc; --fg2: #dccfb9; --muted: #b3aa9b; --faint: #938b7f;
  --accent: #ff6b57; --accent-ink: #2b0d08; --accent-soft: rgba(255, 107, 87, .15); --red-deep: #b9362a;
  --gold: #f2c14e; --gold-hi: #ffe2a0; --brass: #f0c062; --sky: #7cc0ff; --teal: #5fd6c4;
  --cyan: #79c6d4; --rose: #f09a8c; --violet: #bba8e6; --sage: #9bd0ad; --slate: #a3bad3; --sand: #e2bf7a;
  --ok: #86d6a4; --warn: #f4b860; --bad: #ff8fb0; --info: #8cc8ff;
  --masthead: #121c30; --nav-ink: #fbf0dc;
  --chrome: linear-gradient(180deg, #4e5a74 0%, #34405a 40%, #232d44 55%, #333f59 78%, #46526c 100%);
  --chrome-x: linear-gradient(90deg, #252f46 0%, #5a6782 30%, #36425c 55%, #4c5872 75%, #222b40 100%);
  --ring: #2a3550; --ring2: #56637f;
  --enamel: linear-gradient(180deg, #ff806c 0%, #f05a47 50%, #d24434 100%);
  --btn: linear-gradient(180deg, #24324d 0%, #1c2840 100%);
  --shadow: 0 16px 40px rgba(0, 0, 0, .38); --panel-shadow: 0 4px 18px rgba(0, 0, 0, .14);
  --scrim: rgba(4, 9, 18, .86);
  color-scheme: dark;
}
:root {
  --display: "Jost", "Futura", "Century Gothic", system-ui, sans-serif;
  --sign: "Yellowtail", "Brush Script MT", cursive;
  --script: "Courier Prime", "Courier New", monospace;
  --ui: "IBM Plex Sans Condensed", "Arial Narrow", system-ui, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --r: 18px; --gut: 36px;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 178px; }
body { background: var(--bg); color: var(--fg); font: 15px/1.5 var(--ui); font-variant-numeric: tabular-nums; min-height: 100vh; overflow-x: hidden;
  background-image: radial-gradient(ellipse 1100px 420px at 85% -120px, color-mix(in srgb, var(--sky) 13%, transparent), transparent 70%); background-repeat: no-repeat; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
img, video { display: block; max-width: 100%; }
::selection { background: var(--accent); color: var(--accent-ink); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.boot { font: italic 500 22px var(--display); color: var(--muted); padding: 40px var(--gut); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- masthead: the boomerang sign ---------- */
.skip-link { position: fixed; top: -70px; left: 16px; z-index: 100; padding: 12px 20px; background: var(--bg0); color: var(--accent); border-radius: 999px; }
.skip-link:focus { top: 12px; }
.top { position: sticky; top: 0; z-index: 30; background: var(--masthead); box-shadow: 0 4px 14px rgba(86, 44, 18, .1); }
.topin { position: relative; display: flex; align-items: center; gap: 30px; padding: 10px max(var(--gut), env(safe-area-inset-right)) 12px max(var(--gut), env(safe-area-inset-left)); min-height: 90px; max-width: 1680px; margin: auto; }
.brand { position: relative; display: flex; align-items: center; gap: 14px; text-decoration: none; white-space: nowrap; color: var(--accent); padding-right: 30px; }
.brand::after { content: ""; position: absolute; left: 70px; right: -40px; bottom: -9px; height: 20px; border-bottom: 4px solid var(--accent); border-radius: 0 0 60% 40% / 0 0 100% 100%; opacity: .9; pointer-events: none; }
.brand-port { display: grid; place-items: center; width: 62px; height: 62px; border-radius: 50%; background: var(--chrome); box-shadow: 0 0 0 1px var(--ring2), 0 3px 8px rgba(86, 44, 18, .22); flex: none; }
.brand-mark { width: 54px; height: 54px; }
.wordmark { display: grid; gap: 0; }
.brand b { font: 400 50px/.9 var(--sign); letter-spacing: 0; padding: 0 4px 0 2px; text-shadow: 1px 1px 0 var(--bg0), 3px 3px 0 color-mix(in srgb, var(--red-deep) 22%, transparent); }
.wordmark > span { font: 600 12px/1 var(--display); letter-spacing: .62em; text-transform: uppercase; color: var(--fg); padding-left: 46px; margin-top: 2px; }
.brand-star { position: absolute; left: 66px; top: -4px; width: 22px; height: 22px; color: var(--gold); filter: drop-shadow(0 1px 0 var(--red-deep)); }
.brand-star svg { width: 100%; height: 100%; }
.brand-motto { padding-left: 26px; border-left: 2px solid var(--line); font: 600 11px/1.35 var(--display); letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }
.brand-motto em { display: block; font: 400 25px/1 var(--sign); letter-spacing: 0; text-transform: none; color: var(--accent); margin-top: 3px; }
.topr { margin-left: auto; display: flex; align-items: center; gap: 12px; white-space: nowrap; }
.conn { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px 6px 9px; border: 1px solid var(--line2); border-radius: 999px; background: var(--bg0);
  font: 600 10px/1 var(--display); letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }
.conn i { width: 9px; height: 9px; border-radius: 50%; background: var(--faint); box-shadow: inset 0 -1px 1px rgba(0,0,0,.25); }
.conn.live { color: var(--accent); border-color: color-mix(in srgb, var(--accent) 40%, var(--line2)); }
.conn.live i { background: radial-gradient(circle at 35% 30%, #ffd3c9, var(--accent) 60%); box-shadow: 0 0 0 3px var(--accent-soft), 0 0 8px var(--accent); }
.conn.connecting i, .conn.reconnecting i { background: var(--warn); } .conn.offline i { background: var(--bad); }
.spendchip { display: inline-flex; align-items: center; gap: 8px; font-size: 12px; color: var(--muted); text-decoration: none; padding: 4px 6px 4px 12px; border: 1px solid var(--line2); border-radius: 999px; background: var(--btn); }
.spendchip > span:first-child { font: 600 9px/1 var(--display); letter-spacing: .14em; text-transform: uppercase; }
.spendchip b { font: 600 13px/1 var(--mono); color: var(--gold-hi); background: #2b2320; padding: 5px 8px; border-radius: 6px; box-shadow: inset 0 1px 3px rgba(0,0,0,.6); letter-spacing: .04em; }
[data-theme="dark"] .spendchip b { background: #050a14; }
.spendchip .of { padding-right: 6px; }
.spendchip.over b { color: #ff9a9a; }
.iconbtn { all: unset; cursor: pointer; display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; color: var(--fg2); background: var(--btn); box-shadow: 0 0 0 1px var(--line2), 0 1px 2px rgba(86, 44, 18, .12); }
.iconbtn:hover { color: var(--accent); }
.iconbtn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.iconbtn svg { width: 16px; height: 16px; }

/* ---------- the monorail: department navigation ---------- */
.navband { background: var(--chrome); border-top: 1px solid var(--line); border-bottom: 4px solid var(--accent); box-shadow: 0 3px 0 var(--gold); color: var(--nav-ink); }
.navin { max-width: 1680px; margin: auto; display: flex; align-items: center; gap: 20px; padding: 0 var(--gut); }
.projsel { display: flex; align-items: center; gap: 8px; min-width: 0; flex: none; }
.projsel > span { font: 600 9.5px/1 var(--display); text-transform: uppercase; letter-spacing: .16em; color: var(--muted); }
.projsel select { background: var(--bg0); color: var(--fg); border: 1px solid var(--line2); border-radius: 999px; padding: 6px 26px 6px 12px; max-width: 190px; font: 500 13px var(--display); }
.projsel select option { color: var(--fg); background: var(--bg2); }
.tabs { display: flex; align-items: center; gap: 4px; min-width: 0; overflow-x: auto; scrollbar-width: none; padding: 7px 2px; }
.tabs::-webkit-scrollbar { display: none; }
.tab { display: inline-flex; align-items: center; gap: 7px; color: var(--nav-ink); text-decoration: none; padding: 6px 10px 6px 6px; border-radius: 999px; white-space: nowrap; transition: background .15s, color .15s, box-shadow .15s; }
.tab > svg { width: 26px; height: 26px; padding: 5px; flex: none; border-radius: 50%; background: var(--bg0); color: var(--accent); box-shadow: 0 0 0 1px var(--line2); }
.tab-t { display: grid; font: 600 13px/1.05 var(--display); letter-spacing: .01em; }
.tab-t small { font: 600 8.5px/1.2 var(--display); letter-spacing: .18em; text-transform: uppercase; color: var(--muted); }
.tab:hover { background: color-mix(in srgb, var(--bg0) 70%, transparent); }
.tab.on { background: var(--enamel); color: var(--accent-ink); box-shadow: inset 0 1px 0 rgba(255,255,255,.3), inset 0 0 0 1px rgba(246, 214, 142, .5), 0 2px 0 var(--red-deep); }
.tab.on > svg { background: var(--gold-hi); color: var(--red-deep); box-shadow: none; }
.tab.on .tab-t small { color: var(--gold-hi); }
.tab .n { background: var(--accent); color: var(--accent-ink); padding: 3px 6px; border-radius: 999px; font: 600 10px/1 var(--display); }
.tab.on .n { background: var(--gold-hi); color: var(--red-deep); }
.tabsep { width: 8px; height: 8px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 0 2px var(--bg0), 0 0 0 3px var(--line2); margin: 0 3px; flex: none; }

main { padding: 0 max(var(--gut), env(safe-area-inset-right)) 20px max(var(--gut), env(safe-area-inset-left)); max-width: 1680px; margin: 0 auto; }
main:focus { outline: none; }
.workspace-label { display: flex; align-items: center; gap: 10px; padding: 22px 0 18px; font: 600 10px/1.2 var(--display); text-transform: uppercase; letter-spacing: .16em; color: var(--muted); min-width: 0; }
.workspace-label > span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 40%; }
.workspace-label b { color: var(--accent); font-weight: 600; }
.label-divider { display: inline-grid; color: var(--gold); }
.label-divider svg { width: 13px; height: 13px; }
.workspace-edition { margin-left: auto; font: 400 19px/1 var(--sign); letter-spacing: 0; text-transform: none; color: var(--accent); }

/* ---------- a machine's nameplate (every view's header) ---------- */
.view-h { position: relative; display: flex; flex-wrap: wrap; align-items: baseline; gap: 12px 20px; margin: 4px 0 26px; padding-bottom: 22px; border-bottom: 2px solid var(--line); }
.view-h::after { content: ""; position: absolute; left: 0; bottom: -2px; width: min(280px, 40%); height: 2px; background: linear-gradient(90deg, var(--accent), var(--gold) 70%, transparent); }
.view-h h1 { font: 600 clamp(32px, 3.4vw, 48px)/1.04 var(--display); letter-spacing: -.02em; margin: 0; text-wrap: balance; }
.view-h h1 em, .modal .mh h2 em { font: 400 1.22em/.9 var(--sign); letter-spacing: 0; color: var(--accent); padding: 0 .04em; }
.model-no { display: inline-block; vertical-align: .35em; margin-left: .2em; padding: .32em .7em; border-radius: 999px; background: var(--chrome); box-shadow: 0 0 0 1px var(--ring2);
  font: 600 .36em/1 var(--display); letter-spacing: .16em; color: var(--fg2); }
.view-h .sub { color: var(--muted); max-width: 100ch; margin: 0; flex-basis: 100%; font-size: 15px; }
.view-h .sub b { color: var(--accent); font-weight: 600; }
.plate { flex-basis: 100%; display: inline-flex; align-items: center; gap: 8px; width: max-content; max-width: 100%; }
.plate, .cad-intro .plate { padding: 6px 15px 6px 10px; border-radius: 999px; background: var(--enamel); color: var(--accent-ink); box-shadow: inset 0 0 0 1px rgba(246, 214, 142, .55), 0 2px 0 var(--red-deep);
  font: 600 10px/1 var(--display); letter-spacing: .18em; text-transform: uppercase; }
.view-h > .plate { flex: 0 0 auto; }
.view-h > .plate + h1 { flex-basis: 100%; }
.plate svg { width: 13px; height: 13px; color: var(--gold-hi); }
.plate b { color: var(--gold-hi); font-weight: 600; }
.plate > span { padding-left: 9px; border-left: 1px solid rgba(255, 246, 230, .4); }
.stats { display: flex; flex-wrap: wrap; gap: 6px 20px; color: var(--muted); font-size: 13px; }
.stats b { color: var(--fg); font-weight: 600; }
.view-h .stats { background: var(--bg2); border: 1px solid var(--line); border-radius: 999px; padding: 10px 20px; box-shadow: var(--panel-shadow); }
.view-h .stats span + span { padding-left: 20px; border-left: 1px solid var(--line); }
.studio-footer { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 20px; border-top: 2px solid var(--line); margin-top: 52px; padding: 18px 0 0; color: var(--muted); font-size: 12px; }
.foot-sign { font: 400 28px/1 var(--sign); color: var(--accent); }
.foot-est { font: 600 10px/1 var(--display); letter-spacing: .16em; text-transform: uppercase; color: var(--brass); }
.studio-footer .btn { margin-left: auto; }

/* ---------- reel: the shot monorail ---------- */
.reelwrap { margin: 12px 0 20px; padding: 14px 16px 12px; border: 1px solid var(--line); background: var(--bg2); border-radius: var(--r); box-shadow: var(--panel-shadow); }
.reel { display: flex; gap: 3px; height: 38px; min-width: 0; padding-bottom: 5px; border-bottom: 3px solid var(--line2); }
.cell { --c: var(--slate); position: relative; min-width: 3px; display: flex; align-items: flex-end; padding: 0 3px 3px; text-decoration: none;
  font: 600 10px/1 var(--display); letter-spacing: .04em; border-radius: 6px 6px 3px 3px; overflow: hidden; color: var(--accent-ink);
  background: var(--c); }
.cell span { overflow: hidden; white-space: nowrap; }
.cell.st-none { background: transparent; box-shadow: inset 0 0 0 1px var(--c); color: var(--c);
  background-image: repeating-linear-gradient(135deg, color-mix(in srgb, var(--c) 30%, transparent) 0 2px, transparent 2px 6px); }
.cell.st-frame { background: color-mix(in srgb, var(--c) 40%, var(--bg)); color: var(--fg); }
.cell.st-clip { background: color-mix(in srgb, var(--c) 72%, var(--bg)); }
.cell.cur { outline: 2px solid var(--fg); outline-offset: 1px; z-index: 1; }
.cell.mon { opacity: .55; }
.reelkey { display: flex; flex-wrap: wrap; gap: 3px 14px; color: var(--muted); font-size: 12px; margin-top: 8px; }
.reelkey i { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 5px; vertical-align: -1px; background: var(--c); }
.reelkey .lv { margin-left: auto; display: flex; gap: 10px; }
.reelkey .lv i.st-none { background: transparent; box-shadow: inset 0 0 0 1px var(--muted); }
.reelkey .lv i.st-frame { background: color-mix(in srgb, var(--muted) 40%, var(--bg)); }
.reelkey .lv i.st-clip { background: color-mix(in srgb, var(--muted) 72%, var(--bg)); }
.reelkey .lv i.st-cut { background: var(--muted); }

/* ---------- atoms ---------- */
.lab { font: 600 10.5px/1.3 var(--display); letter-spacing: .14em; color: var(--muted); text-transform: uppercase; }
.muted { color: var(--muted); } .faint { color: var(--faint); }
.mono { font-family: var(--mono); font-size: 12px; }
.num { font-variant-numeric: tabular-nums; }
.row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.grow { flex: 1 1 auto; min-width: 0; }
.right { margin-left: auto; }
.secid { display: inline-block; font: 600 12px/1 var(--display); letter-spacing: .1em; padding: 5px 8px; border-radius: 999px; color: var(--accent-ink); background: var(--c, var(--slate)); font-style: normal; vertical-align: 3px; }
kbd { font: 600 10.5px/1 var(--ui); padding: 2px 5px 1px; border: 1px solid var(--line2); border-bottom-width: 2px; border-radius: 4px; color: var(--muted); background: var(--bg1); }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 36px; padding: 6px 16px; border-radius: 999px; cursor: pointer;
  border: 1px solid var(--line2); background: var(--btn); color: var(--fg); font: 500 13.5px/1.1 var(--display); letter-spacing: .015em; white-space: nowrap; text-decoration: none;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .7), 0 1px 2px rgba(86, 44, 18, .12); transition: background .15s, border-color .15s, box-shadow .15s, transform .08s; }
[data-theme="dark"] .btn { box-shadow: inset 0 1px 0 rgba(255, 255, 255, .06), 0 1px 2px rgba(0, 0, 0, .3); }
.btn:hover:not(:disabled) { border-color: var(--accent); color: var(--accent); }
.btn:active:not(:disabled) { transform: translateY(1px); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn.pri { background: var(--enamel); border-color: var(--red-deep); color: var(--accent-ink); font-weight: 600; text-shadow: 0 1px 0 rgba(0, 0, 0, .18);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .35), inset 0 0 0 1px rgba(246, 214, 142, .35), 0 2px 0 var(--red-deep), 0 4px 10px rgba(143, 31, 24, .2); }
[data-theme="dark"] .btn.pri { text-shadow: none; }
.btn.pri:hover:not(:disabled) { filter: brightness(1.07); color: var(--accent-ink); }
.btn.ghost { background: transparent; border-color: transparent; color: var(--fg2); box-shadow: none; }
.btn.ghost:hover:not(:disabled) { background: var(--hover); border-color: transparent; }
.btn.danger { color: var(--bad); }
.btn.sm { min-height: 29px; padding: 4px 12px; font-size: 12.5px; }
.btn svg { width: 14px; height: 14px; flex: none; }
.btn kbd { margin-left: 2px; }
.btn.pri kbd { color: var(--accent-ink); border-color: color-mix(in srgb, var(--accent-ink) 40%, transparent); background: transparent; }
.chip { display: inline-flex; align-items: center; gap: 5px; min-height: 24px; padding: 2px 10px; border-radius: 999px; font-size: 12px; font-weight: 500;
  border: 1px solid var(--line2); color: var(--fg2); white-space: nowrap; background: transparent; }
button.chip { cursor: pointer; }
button.chip:hover { border-color: var(--accent); }
button.chip.on { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
button.chip.on .muted { color: inherit; opacity: .8; }
.chip.amber { color: var(--brass); border-color: color-mix(in srgb, var(--gold) 70%, transparent); background: color-mix(in srgb, var(--gold) 10%, transparent); }
.chip.bad { color: var(--bad); border-color: color-mix(in srgb, var(--bad) 50%, transparent); }
.chip.ok { color: var(--ok); border-color: color-mix(in srgb, var(--ok) 50%, transparent); }
.chip.info { color: var(--info); border-color: color-mix(in srgb, var(--info) 50%, transparent); }

/* status meter: no frame / frame picked / clip picked / in the cut */
.stat { display: inline-flex; align-items: center; gap: 6px; font-size: 11.5px; color: var(--muted); white-space: nowrap; }
.stat .m { display: inline-flex; gap: 3px; }
.stat .m i { width: 9px; height: 9px; border-radius: 50%; box-shadow: inset 0 0 0 1px var(--line2); }
.stat.lv1 .m i:nth-child(-n+1), .stat.lv2 .m i:nth-child(-n+2) { background: var(--fg2); box-shadow: none; }
.stat.lv3 .m i { background: var(--accent); box-shadow: 0 0 5px color-mix(in srgb, var(--accent) 60%, transparent); }
.stat.lv3 { color: var(--accent); } .stat.lv2, .stat.lv1 { color: var(--fg2); }

input[type=text], input[type=number], input[type=search], input:not([type]), select, textarea {
  background: var(--bg0); border: 1px solid var(--line2); border-radius: 10px; padding: 7px 11px; min-width: 0; box-shadow: inset 0 1px 2px rgba(86, 44, 18, .07); }
textarea { width: 100%; resize: vertical; line-height: 1.45; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
select { padding-right: 22px; }
input[type=number] { width: 72px; }
input[type=checkbox], input[type=range] { accent-color: var(--accent); }
.field { display: grid; gap: 7px; margin: 0 0 13px; min-width: 0; }
.field > .lab { display: flex; align-items: center; gap: 8px; }
.script-in { font: 14px/1.5 var(--script); }
.dirty-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--accent); display: inline-block; box-shadow: 0 0 6px var(--accent); }

/* a panel is an enamel control face with a red knob on its label */
.panel { background: var(--bg2); border: 1px solid var(--line); border-radius: var(--r); min-width: 0; box-shadow: var(--panel-shadow); }
.panel > .ph { display: flex; align-items: center; gap: 8px; padding: 12px 18px; border-bottom: 1px solid var(--line); min-height: 50px; background: linear-gradient(var(--bg0), var(--bg3)); border-radius: var(--r) var(--r) 0 0; }
.panel > .ph h2, .panel > .ph h3 { display: inline-flex; align-items: center; gap: 10px; font: 600 11.5px/1.3 var(--display); letter-spacing: .15em; text-transform: uppercase; color: var(--fg); margin: 0; }
.panel > .ph h2::before, .panel > .ph h3::before { content: ""; flex: none; width: 11px; height: 11px; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #ffb2a6 0 15%, var(--accent) 50%, var(--red-deep) 100%); box-shadow: 0 0 0 2px var(--ring), 0 0 0 3px var(--ring2); }
.panel > .pb { padding: 16px 18px; }
.empty { color: var(--muted); font-style: italic; padding: 24px; border: 1px dashed var(--line2); border-radius: 14px; text-align: center; }
.err { color: var(--bad); }
.warnline { color: var(--warn); font-size: 12.5px; }
.hint { color: var(--muted); font-size: 12.5px; }

/* progress */
.prog { height: 5px; background: var(--line); border-radius: 999px; overflow: hidden; min-width: 40px; }
.prog i { display: block; height: 100%; background: linear-gradient(90deg, var(--gold), var(--accent)); width: 0; transition: width .3s; border-radius: 999px; }
.prog.failed i { background: var(--bad); } .prog.done i { background: var(--ok); } .prog.cancelled i { background: var(--faint); }

/* ---------- shot list ---------- */
.toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 18px 0 16px; }
.toolbar > .chip { min-height: 32px; padding: 5px 12px; }
.toolbar input[type=search] { width: 220px; }
.sec { margin-top: 26px; background: var(--bg2); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--panel-shadow); }
.sec-h { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 16px; padding: 17px 18px; border-bottom: 1px solid var(--line); background: linear-gradient(var(--bg0), var(--bg3)); border-radius: var(--r) var(--r) 0 0; }
.sec-h h2 { font: 600 24px/1.1 var(--display); letter-spacing: -.015em; margin: 0; }
.sec-h .where { color: var(--muted); font-size: 13px; }
.sec-h details { flex-basis: 100%; color: var(--muted); font-size: 13px; }
.sec-h summary { cursor: pointer; width: max-content; }
.sec-h details p { margin: 6px 0 0; max-width: 100ch; }
.shotrow { display: grid; grid-template-columns: 68px 190px minmax(0, 1fr) 155px; gap: 18px; padding: 18px; border-bottom: 1px solid var(--line);
  cursor: pointer; border-left: 2px solid transparent; }
.shotrow:hover { background: var(--bg1); }
.shotrow.sel { background: var(--bg1); border-left-color: var(--accent); }
.shotrow .slate { display: flex; flex-direction: column; gap: 7px; color: var(--muted); font-size: 12px; }
.shotrow .sid { font: 600 24px/1 var(--display); color: var(--accent); letter-spacing: .02em; }
.thumb { position: relative; aspect-ratio: 16 / 9; background: var(--bg1); border-radius: 10px; overflow: hidden; border: 1px solid var(--line); }
.thumb img, .thumb video { width: 100%; height: 100%; object-fit: cover; }
.thumb .ph { position: absolute; inset: 0; display: grid; place-items: center; color: var(--faint); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; }
.thumb .badge { position: absolute; left: 4px; bottom: 4px; font: 600 10px/1 var(--ui); padding: 3px 4px; border-radius: 2px; background: rgba(0,0,0,.7); color: #eee; letter-spacing: .06em; }
.scr { font: 13.5px/1.5 var(--script); min-width: 0; }
.scr p { margin: 0 0 4px; }
.scr .clamp { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.scr .ln { margin-left: 2.5ch; }
.scr .who { font-weight: 700; letter-spacing: .04em; }
.scr .sfx { color: var(--muted); }
.shotrow .side { display: flex; flex-direction: column; gap: 10px; align-items: flex-start; font-size: 12px; color: var(--muted); }
.shotrow .acts { display: flex; gap: 2px; margin-top: auto; }
.shotrow .acts .iconbtn { width: 26px; height: 26px; }
.addrow { padding: 10px 14px; }

/* ---------- workspace ---------- */
.ws-h { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; margin: 0 0 22px; padding-bottom: 18px; border-bottom: 1px solid var(--line); }
.ws-h .sid { font: 600 38px/1 var(--display); letter-spacing: -.02em; color: var(--accent); }
.ws-h .meta { display: flex; flex-wrap: wrap; gap: 4px 12px; color: var(--muted); font-size: 13px; align-items: center; }
.ws { display: grid; grid-template-columns: minmax(280px, 330px) minmax(0, 1fr) minmax(280px, 320px); gap: 18px; align-items: start; }
.ws-c { display: grid; gap: 18px; min-width: 0; }
.viewer { position: relative; background: #000; border-radius: var(--r); overflow: hidden; aspect-ratio: 16 / 9; display: grid; place-items: center; }
.viewer img, .viewer video { width: 100%; height: 100%; object-fit: contain; }
.viewer .vlabel { position: absolute; left: 10px; top: 10px; display: flex; gap: 6px; align-items: center; pointer-events: none; }
.viewer .vlabel span { font: 600 11px/1 var(--ui); letter-spacing: .08em; padding: 4px 6px; border-radius: 3px; background: rgba(0,0,0,.72); color: #eee; }
.viewer .vlabel span.pk { background: #c9342a; color: #fff6e6; }
.viewer .empty { border: 0; color: #888; }
.viewer .zoombtn { position: absolute; right: 8px; top: 8px; background: rgba(0,0,0,.6); color: #eee; }
.strip-h { display: flex; align-items: baseline; gap: 10px; margin: 2px 0 6px; }
.strip-h h3 { font: 600 11px/1 var(--display); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin: 0; }
.strip { display: grid; grid-template-columns: repeat(auto-fill, minmax(132px, 1fr)); gap: 8px; }
.take { all: unset; display: block; cursor: pointer; min-width: 0; border-radius: 4px; position: relative; }
.take .thumb { border: 2px solid transparent; }
.take.pick .thumb { border-color: var(--accent); }
.take.used .thumb { border-color: color-mix(in srgb, var(--accent) 45%, transparent); border-style: dashed; }
.take.cur .thumb { box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px var(--fg); }
.take:focus-visible .thumb { box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px var(--accent); }
.take .cap { display: flex; gap: 6px; align-items: center; font-size: 12px; color: var(--muted); margin-top: 3px; }
.take.pick .cap { color: var(--accent); }
.take .cap .n { font-weight: 600; color: var(--fg); }
.take.pick .cap .n { color: var(--accent); }
.take .cap .ic { margin-left: auto; display: inline-flex; gap: 4px; }
.take .cap svg { width: 12px; height: 12px; }
.takeinfo { display: grid; gap: 10px; }
.takeinfo .kv { display: flex; flex-wrap: wrap; gap: 3px 14px; color: var(--muted); font-size: 12.5px; }
.takeinfo .kv b { color: var(--fg2); font-weight: 500; }
.prompt { font: 13px/1.5 var(--script); color: var(--fg2); max-height: 7.5em; overflow: auto; background: var(--bg0); border: 1px solid var(--line); border-radius: 4px; padding: 6px 8px; margin: 0; white-space: pre-wrap; }
.diff { font: 13.5px/1.55 var(--script); background: var(--bg0); border: 1px solid var(--line); border-radius: 4px; padding: 8px 10px; margin: 0; white-space: pre-wrap; }
.diff ins { background: color-mix(in srgb, var(--ok) 22%, transparent); color: var(--fg); text-decoration: none; border-radius: 2px; }
.diff del { background: color-mix(in srgb, var(--bad) 18%, transparent); color: var(--muted); border-radius: 2px; }
.flags { display: flex; flex-direction: column; gap: 6px; }
.flag { display: grid; grid-template-columns: auto 1fr; gap: 8px; align-items: start; font-size: 13px; }
.flag .chip { text-transform: uppercase; letter-spacing: .08em; font-weight: 600; }
.genp .seg { display: flex; border: 1px solid var(--line2); border-radius: 999px; overflow: hidden; background: var(--bg0); }
.genp .seg button { all: unset; cursor: pointer; flex: 1; text-align: center; padding: 9px 8px; font: 600 11px/1.2 var(--display); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.genp .seg button.on { background: var(--enamel); color: var(--accent-ink); border-radius: 999px; }
.genp .seg button:focus-visible { outline: 2px solid var(--accent); outline-offset: -3px; }
.genp .seg button:disabled { opacity: .4; cursor: not-allowed; }
.genp .grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.est { display: grid; gap: 5px; padding: 12px 14px; border-radius: 14px; background: var(--bg0); border: 1px solid var(--line); border-left: 4px solid var(--gold); font-size: 12.5px; }
.est .usd { font: 600 19px/1.1 var(--mono); color: var(--fg); }
.est.big .usd { color: var(--warn); }
.est.err { border-color: color-mix(in srgb, var(--bad) 50%, transparent); }
.est.stale .usd { opacity: .45; }
.modelopt-note { font-size: 12px; color: var(--muted); }
.jobmini { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 4px 8px; align-items: center; font-size: 12px; padding: 5px 0; border-top: 1px solid var(--line); }
.jobmini .prog { grid-column: 1 / -1; }
.dot { width: 7px; height: 7px; border-radius: 50%; display: inline-block; background: var(--faint); flex: none; }
.dot.running { background: var(--accent); } .dot.queued { background: var(--slate); } .dot.done { background: var(--ok); }
.dot.failed { background: var(--bad); } .dot.cancelled { background: var(--faint); }
@keyframes pulse { 50% { opacity: .35; } }
.dot.running { animation: pulse 1.2s infinite; }
.reflist { display: flex; flex-wrap: wrap; gap: 5px; }
.lines-ed { display: grid; gap: 8px; }
.line-ed { display: grid; grid-template-columns: 96px 1fr auto; gap: 6px; align-items: start; }
.line-ed .opts { grid-column: 2 / -1; display: flex; gap: 12px; font-size: 12px; color: var(--muted); }
.line-ed label { display: inline-flex; gap: 4px; align-items: center; }
.listed { display: grid; gap: 6px; }
.listed .it { display: grid; grid-template-columns: 1fr auto; gap: 6px; }

/* ---------- refs ---------- */
.refrow { display: grid; grid-template-columns: minmax(220px, 340px) minmax(0, 1fr); gap: 24px; padding: 22px; margin: 16px 0; background: var(--bg2); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--panel-shadow); }
.refrow h3 { font: 400 34px/1 var(--sign); margin: 0 0 10px; color: var(--accent); }
.refrow h3 a { text-decoration: none; }
.refrow h3 a:hover { color: var(--accent); }
.refrow .desc { font: 13px/1.5 var(--script); color: var(--fg2); margin: 0; }
.refrow .strip { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); }

/* ---------- cast / sound tables ---------- */
.cols2 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr); gap: 16px; align-items: start; }
.rules { margin: 0; padding: 0; list-style: none; display: grid; gap: 6px; }
.rules li { display: grid; grid-template-columns: 22px 1fr auto; gap: 6px; align-items: start; }
.rules li .n { color: var(--muted); font-size: 12px; text-align: right; padding-top: 9px; }
.castcard { border-top: 1px solid var(--line); padding: 12px 0; display: grid; gap: 8px; }
.castcard:first-child { border-top: 0; padding-top: 0; }
.castcard h3 { font: 400 32px/1 var(--sign); margin: 0; color: var(--accent); }
.castgrid { display: grid; grid-template-columns: 1.2fr 1fr; gap: 8px; }
.linelist { display: grid; gap: 2px; }
.lineitem { display: grid; grid-template-columns: 54px 1fr auto; gap: 8px; align-items: center; padding: 4px 0; font-size: 13px; border-top: 1px solid var(--line); }
.lineitem .t { font-family: var(--script); }
.auds { display: flex; flex-wrap: wrap; gap: 6px; }
.play { all: unset; cursor: pointer; display: inline-flex; align-items: center; gap: 5px; height: 24px; padding: 0 9px 0 6px; border-radius: 999px; background: var(--bg0); border: 1px solid var(--line2);
  font-size: 12px; color: var(--fg2); white-space: nowrap; }
.play:hover { background: var(--hover); }
.play:focus-visible { outline: 2px solid var(--accent); }
.play svg { width: 11px; height: 11px; }
.play.on { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.play.pick { border-color: var(--accent); color: var(--accent); }
.play.pick.on { color: var(--accent-ink); }
.play.used { border-style: dashed; border-color: var(--accent); }
.tbl { width: 100%; border-collapse: collapse; font-size: 13px; }
.tbl th { font: 600 10px/1.3 var(--display); letter-spacing: .14em; text-transform: uppercase; color: var(--accent); text-align: left; padding: 12px 10px; border-bottom: 1px solid var(--line2); white-space: nowrap; }
.tbl td { padding: 12px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
.tbl tbody tr:last-child td { border-bottom: 0; }
.tbl tr.sel td { background: var(--bg1); }
.tbl td.r, .tbl th.r { text-align: right; }
.tbl .t { font-family: var(--script); }
.sndrow-takes { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; }
.nowrap { white-space: nowrap; }
.show-s { display: none; }
.gencompact { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.gencompact select { max-width: 190px; }
.gencompact .estx { font-size: 12px; color: var(--muted); min-width: 60px; }

/* ---------- edit ---------- */
.ed-top { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 14px; align-items: start; }
.tl { position: relative; overflow-x: auto; overflow-y: hidden; border: 1px solid var(--line); border-radius: var(--r); background: var(--bg1); padding-bottom: 6px;
  overscroll-behavior-x: contain; }
.tl-in { position: relative; }
.tl-ruler { position: relative; height: 22px; border-bottom: 1px solid var(--line); cursor: pointer; }
.tl-ph { margin-left: 0; }
.tl-ruler .tick { position: absolute; top: 0; bottom: 0; border-left: 1px solid var(--line2); font-size: 10px; color: var(--muted); padding: 3px 0 0 3px; white-space: nowrap; }
.tl-track { position: relative; height: 30px; margin-top: 4px; }
.tl-track.v { height: 46px; }
.tl-lab { position: sticky; left: 0; z-index: 5; display: flex; align-items: center; width: 60px; height: 100%; font: 600 9.5px/1 var(--display); letter-spacing: .12em;
  color: var(--muted); background: var(--bg1); padding: 0 8px; text-transform: uppercase; border-right: 1px solid var(--line); }
.tl-ruler .tl-lab { letter-spacing: 0; font-weight: 500; color: var(--accent); }
.tl-blk { position: absolute; top: 0; bottom: 0; border-radius: 3px; overflow: hidden; cursor: pointer; background: var(--c, var(--slate)); color: var(--accent-ink);
  font: 600 10.5px/1 var(--ui); padding: 4px 4px; white-space: nowrap; border: 1px solid rgba(0,0,0,.35); }
.tl-blk.still { background-image: repeating-linear-gradient(135deg, rgba(0,0,0,.18) 0 3px, transparent 3px 7px); }
.tl-blk.title { background: var(--bg3); color: var(--fg); }
.tl-blk.sel { outline: 2px solid var(--fg); outline-offset: 0; z-index: 2; }
.tl-blk .sub { display: block; font-weight: 500; opacity: .75; margin-top: 3px; }
.tl-mk { position: absolute; top: 3px; height: 22px; border-radius: 3px; font-size: 10.5px; line-height: 22px; padding: 0 5px; white-space: nowrap; overflow: hidden; cursor: pointer;
  background: color-mix(in srgb, var(--c) 30%, var(--bg2)); border-left: 2px solid var(--c); color: var(--fg); }
.tl-rng { position: absolute; top: 3px; height: 22px; border-radius: 3px; font-size: 10.5px; line-height: 22px; padding: 0 6px; white-space: nowrap; overflow: hidden;
  background: color-mix(in srgb, var(--c) 22%, transparent); border: 1px solid color-mix(in srgb, var(--c) 60%, transparent); color: var(--fg); }
.tl-ph { position: absolute; top: 0; bottom: 0; width: 0; border-left: 2px solid var(--accent); pointer-events: none; z-index: 4; }
.tl-ph::before { content: ""; position: absolute; top: 0; left: -6px; border: 5px solid transparent; border-top-color: var(--accent); }
.trim { display: grid; gap: 10px; }
.trim-deck { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 20px; align-items: center; }
.trim-deck.preview-only { grid-template-columns: minmax(0, 1fr); }
.trim-controls { display: grid; gap: 12px; min-width: 0; }
.trim .viewer { width: 100%; max-width: calc(30vh * 16 / 9); margin: 0 auto; }
.trim-deck:not(.preview-only) .viewer { max-width: none; }
.trimbar { position: relative; height: 70px; touch-action: none; user-select: none; margin: 0 8px; }
.trimbar .rail { position: absolute; left: 0; right: 0; top: 24px; height: 22px; background: var(--bg0); border: 1px solid var(--line2); border-radius: 3px; cursor: pointer; }
.trimbar .keep { position: absolute; top: 24px; height: 22px; background: color-mix(in srgb, var(--accent) 26%, transparent); border-top: 2px solid var(--accent); border-bottom: 2px solid var(--accent); pointer-events: none; }
.trimbar .hd { position: absolute; top: 18px; width: 14px; height: 34px; margin-left: -7px; background: var(--accent); border-radius: 3px; cursor: ew-resize; touch-action: none; display: grid; place-items: center; }
.trimbar .hd::after { content: ""; width: 2px; height: 16px; background: var(--accent-ink); opacity: .6; }
.trimbar .hd:focus-visible { outline: 2px solid var(--fg); outline-offset: 2px; }
.trimbar .hd .tip { position: absolute; top: 36px; font-size: 10.5px; color: var(--accent); white-space: nowrap; }
.trimbar .ph { position: absolute; top: 20px; height: 30px; width: 0; border-left: 2px solid var(--fg); pointer-events: none; }
.trimbar .pin { position: absolute; top: 0; height: 18px; transform: translateX(-1px); border-left: 2px solid var(--c); padding-left: 3px; font-size: 10.5px; line-height: 14px; white-space: nowrap;
  color: var(--fg2); cursor: grab; touch-action: none; }
.trimbar .pin:focus-visible { outline: 2px solid var(--accent); }
.trimbar .pin.line { --c: var(--rose); } .trimbar .pin.sfx { --c: var(--cyan); }
.cues { display: grid; gap: 6px; }
.cue { display: grid; grid-template-columns: 14px minmax(0, 1fr) auto auto auto; gap: 8px; align-items: center; font-size: 13px; }
.cue i { width: 10px; height: 10px; border-radius: 2px; background: var(--c); }
.cue.line { --c: var(--rose); } .cue.sfx { --c: var(--cyan); }
.cue input[type=number] { width: 64px; }
.cuts { display: grid; gap: 8px; }
.cutitem { display: grid; grid-template-columns: 1fr auto; gap: 6px; align-items: center; font-size: 13px; padding: 6px 0; border-top: 1px solid var(--line); }
.bedrow { display: grid; grid-template-columns: 14px minmax(70px, 1fr) auto auto auto auto; gap: 6px; align-items: center; font-size: 13px; padding: 4px 0; }
.bedrow i { width: 10px; height: 10px; border-radius: 2px; background: var(--c); }
.bedrow select { max-width: 92px; }

/* ---------- power plant / mission control ---------- */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 310px), 1fr)); gap: 18px; }
.be h3 { font: 600 22px/1.1 var(--display); margin: 0; }
.be .st { display: flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--muted); }
.be .models { display: grid; gap: 4px; margin-top: 8px; }
.be .mrow { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px; font-size: 12.5px; padding: 4px 0; border-top: 1px solid var(--line); }
.be .mrow .caps { display: flex; gap: 4px; flex-wrap: wrap; grid-column: 1 / -1; }
.bigtimer { font: 600 26px/1 var(--mono); color: var(--accent); }
.setgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 10px 18px; }
.defrow { display: grid; grid-template-columns: 70px 1fr; gap: 8px; align-items: center; font-size: 13px; }
.tree { display: grid; gap: 10px; }
.tree-leaves { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 8px 22px; }
.tree-row { display: grid; grid-template-columns: minmax(0, 1fr) 110px; gap: 8px; align-items: center; font-size: 13px; }
.tree-row.wide { grid-template-columns: minmax(90px, .6fr) minmax(0, 1.4fr); }
.tree-row input[type=number] { width: 100%; }
.tree-row.json { grid-column: 1 / -1; align-items: start; }
.tree-row.json textarea { width: 100%; font-size: 12px; }
.tree-sets { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 10px; }
.tree-set { border: 1px solid var(--line); border-radius: 14px; padding: 8px 12px 10px; margin: 0; min-width: 0; }
.tree-set legend { padding: 0 4px; }
.tree-set .tree-leaves { grid-template-columns: minmax(0, 1fr); }
.jobs .tbl td { vertical-align: middle; }
.jobs .tbl td.prog-c { min-width: 140px; }
.jobs .tbl .tg { font-family: var(--mono); font-size: 12px; }
.jobs .log { font: 12px/1.5 var(--mono); background: var(--bg0); border: 1px solid var(--line); border-radius: 4px; padding: 8px 10px; max-height: 260px; overflow: auto; white-space: pre-wrap; margin: 0; }
.ledger { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 12px; margin-top: 16px; }
.lrow { display: grid; grid-template-columns: minmax(90px, 1fr) 70px 60px; gap: 8px; align-items: center; font-size: 13px; padding: 5px 0; border-top: 1px solid var(--line); }
.lrow .bar { grid-column: 1 / -1; height: 3px; background: var(--line); border-radius: 2px; overflow: hidden; }
.lrow .bar i { display: block; height: 100%; background: var(--fg2); }
.lrow .bar i.over { background: var(--bad); }
.dr-sum { display: flex; gap: 10px; flex-wrap: wrap; }
.dr-shot { display: grid; grid-template-columns: 60px minmax(0, 1fr); gap: 10px; padding: 8px 0; border-top: 1px solid var(--line); font-size: 13px; }
.dr-shot .tag { font: 600 10px/1 var(--ui); letter-spacing: .1em; padding: 3px 4px; border-radius: 2px; width: max-content; }
.dr-shot.add .tag { background: color-mix(in srgb, var(--ok) 25%, transparent); color: var(--ok); }
.dr-shot.del .tag { background: color-mix(in srgb, var(--bad) 22%, transparent); color: var(--bad); }
.dr-shot.chg .tag { background: var(--accent-soft); color: var(--accent); }
.dr-shot.del .scr { text-decoration: line-through; color: var(--muted); }

/* ---------- overlays ---------- */
.toasts { position: fixed; right: 16px; bottom: 16px; z-index: 80; display: grid; gap: 8px; max-width: min(420px, calc(100vw - 32px)); }
.toast { background: var(--bg2); border: 1px solid var(--line2); border-left: 5px solid var(--info); border-radius: 14px; padding: 12px 16px; box-shadow: var(--shadow); font-size: 14px; }
.toast.err { border-left-color: var(--bad); } .toast.ok { border-left-color: var(--ok); }
.modal-bg { position: fixed; inset: 0; z-index: 90; background: var(--scrim); display: grid; place-items: center; padding: 16px; }
.modal { background: var(--bg2); border: 1px solid var(--line2); border-top: 6px solid var(--accent); border-radius: 24px; box-shadow: var(--shadow); width: min(560px, 100%); max-height: calc(100vh - 32px); overflow: auto; }
.modal.wide { width: min(1100px, 100%); }
.modal .mh { padding: 24px 24px 0; }
.modal .mh h2 { font: 600 28px/1.1 var(--display); letter-spacing: -.015em; margin: 0; }
.modal .mb { padding: 18px 24px; }
.modal .mf { padding: 12px 24px 24px; display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; }
.lb { position: fixed; inset: 0; z-index: 95; background: rgba(0,0,0,.92); display: grid; place-items: center; }
.lb img, .lb video { max-width: 96vw; max-height: 88vh; }
.lb .cap { position: absolute; left: 16px; bottom: 14px; color: #ddd; font-size: 13px; }
.lb .x { position: absolute; right: 12px; top: 12px; color: #ddd; }
.help { columns: 2 240px; column-gap: 28px; font-size: 13px; }
.help h3 { font: 600 10.5px/1 var(--display); letter-spacing: .16em; color: var(--accent); text-transform: uppercase; margin: 0 0 8px; break-after: avoid; }
.help div { break-inside: avoid; margin-bottom: 14px; }
.help p { margin: 0 0 5px; display: flex; gap: 8px; justify-content: space-between; }

/* ---------- the plaza ---------- */
.eyebrow { display: inline-flex; align-items: center; gap: 8px; color: var(--accent); font: 600 10px/1.3 var(--display); letter-spacing: .18em; text-transform: uppercase; }
.eyebrow svg { width: 13px; height: 13px; color: var(--gold); }
.plaza-hero { position: relative; margin-bottom: 44px; }
/* The artwork is cropped to 2.4 : 1 at 40% from the top; --k is that box's aspect over the picture's (1672 / 941), so a
   hotspot's place in the picture (--x, --y) maps to the same spot in the box at any width. */
.plaza-art { --k: 1.3507; --oy: .4; position: relative; aspect-ratio: 2.4; border-radius: 28px; overflow: hidden; background: #8ec5ef;
  box-shadow: 0 0 0 5px var(--ring), 0 0 0 6px var(--ring2), var(--shadow); }
.plaza-art img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 40%; }
[data-theme="dark"] .plaza-art img { filter: brightness(.86) saturate(1.05); }
.hotspot { position: absolute; left: calc(var(--x) * 100%); top: calc((var(--y) * var(--k) - var(--oy) * (var(--k) - 1)) * 100%);
  display: flex; align-items: center; gap: 9px; transform: translate(-9px, -50%); text-decoration: none; color: #2b2320; }
.hotspot.hs-actor { flex-direction: row-reverse; transform: translate(calc(-100% + 9px), -50%); }
.beacon { position: relative; flex: none; width: 18px; height: 18px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #fff3c8 0 18%, #f2c14e 50%, #c98a1b);
  box-shadow: 0 0 0 3px rgba(255, 250, 240, .9), 0 2px 6px rgba(0, 0, 0, .35); }
.beacon::after { content: ""; position: absolute; inset: -3px; border-radius: 50%; border: 2px solid #f6d68e; animation: ping 2.2s ease-out infinite; }
@keyframes ping { from { transform: scale(1); opacity: .9; } to { transform: scale(2.6); opacity: 0; } }
.hs-label { display: inline-flex; align-items: center; gap: 8px; padding: 7px 13px 7px 14px; border-radius: 999px; background: rgba(255, 250, 240, .95);
  box-shadow: 0 0 0 1px #e1c27d, 0 6px 16px rgba(60, 30, 10, .28); font: 600 13px/1.05 var(--display); white-space: nowrap; transition: transform .15s; }
.hs-label small { display: block; font-size: 8.5px; letter-spacing: .18em; text-transform: uppercase; color: #a8761f; }
.hs-label svg { width: 14px; height: 14px; color: #c9342a; }
.hotspot:hover .hs-label, .hotspot:focus-visible .hs-label { transform: scale(1.05); background: #c9342a; color: #fff6e6; box-shadow: 0 0 0 2px #f6d68e, 0 8px 18px rgba(60, 30, 10, .35); }
.hotspot:hover .hs-label small, .hotspot:hover .hs-label svg, .hotspot:focus-visible .hs-label small, .hotspot:focus-visible .hs-label svg { color: #f6d68e; }
.hotspot:focus-visible { outline: none; }
.hs-actor .hs-label { font-size: 15px; padding: 9px 16px 9px 18px; }
.plaza-marquee { position: relative; margin: -92px 0 0 34px; max-width: 650px; padding: 26px 32px 28px; border-radius: 26px; background: var(--bg2);
  border-top: 6px solid var(--accent); box-shadow: 0 0 0 1px var(--line), var(--shadow); }
.plaza-marquee::after { content: ""; position: absolute; right: 26px; top: -20px; width: 34px; height: 34px; background: var(--gold);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 .5l.8 9.56 3.44-2.3-2.3 3.44 9.56.8-9.56.8 2.3 3.44-3.44-2.3-.8 9.56-.8-9.56-3.44 2.3 2.3-3.44L.5 12l9.56-.8-2.3-3.44 3.44 2.3z'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 .5l.8 9.56 3.44-2.3-2.3 3.44 9.56.8-9.56.8 2.3 3.44-3.44-2.3-.8 9.56-.8-9.56-3.44 2.3 2.3-3.44L.5 12l9.56-.8-2.3-3.44 3.44 2.3z'/%3E%3C/svg%3E") center / contain no-repeat; }
.plaza-marquee h1 { font: 600 clamp(36px, 3.9vw, 56px)/1.02 var(--display); letter-spacing: -.025em; margin: 14px 0 14px; }
.plaza-marquee h1 em { font: 400 1.25em/.85 var(--sign); letter-spacing: 0; color: var(--accent); }
.plaza-marquee p { font-size: 15.5px; line-height: 1.5; color: var(--fg2); margin: 0 0 20px; max-width: 52ch; }
.hero-cta, .hero-cta2 { min-height: 42px; padding: 9px 20px; font-size: 14.5px; }

.section-h, .productions-h { display: flex; gap: 12px; align-items: end; justify-content: space-between; margin: 0 0 18px; }
.section-h h2, .productions-h h2 { display: flex; align-items: center; gap: 12px; font: 600 32px/1.15 var(--display); letter-spacing: -.02em; margin: 6px 0 0; }
.section-h h2 em, .productions-h h2 em { font: 400 1.3em/.9 var(--sign); letter-spacing: 0; color: var(--accent); }
.section-h > .muted, .productions-h > .muted { font-size: 13px; padding-bottom: 4px; }
.section-h > .muted b { color: var(--fg); font-weight: 600; }
.project-count { display: inline-grid; place-items: center; min-width: 30px; height: 30px; padding: 0 8px; border-radius: 999px; background: var(--chrome); box-shadow: 0 0 0 1px var(--ring2); font: 600 13px/1 var(--display); letter-spacing: 0; color: var(--fg2); }

/* the plaza directory: one card per machine */
.directory { margin-bottom: 48px; }
.machines { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; }
.machine { position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 0; min-height: 214px; padding: 20px 20px 16px; border-radius: 22px;
  background: var(--bg2); border: 1px solid var(--line); box-shadow: var(--panel-shadow); color: inherit; text-decoration: none; text-align: left; font: inherit; cursor: pointer;
  transition: transform .2s, box-shadow .2s, border-color .2s; overflow: hidden; }
.machine::before { content: ""; position: absolute; right: -60px; top: -70px; width: 170px; height: 150px; border: 3px solid color-mix(in srgb, var(--accent) 16%, transparent); border-radius: 50%; pointer-events: none; }
.machine:hover:not(.off) { transform: translateY(-3px); border-color: var(--accent); box-shadow: var(--shadow); }
.machine.off { cursor: default; opacity: .62; }
.porthole { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 50%; flex: none; color: #fff6e6;
  background: radial-gradient(circle at 35% 30%, #f07a6b 0 10%, #c9342a 50%, #8f1f18); box-shadow: 0 0 0 4px var(--ring), 0 0 0 5px var(--ring2), 0 4px 10px rgba(86, 44, 18, .2); }
.porthole svg { width: 22px; height: 22px; }
.machine-no { margin-top: 16px; font: 600 10px/1 var(--display); letter-spacing: .2em; text-transform: uppercase; color: var(--brass); min-height: 10px; }
.machine-name { margin-top: 6px; font: 600 21px/1.1 var(--display); letter-spacing: -.01em; }
.machine-name em { font: 400 1.25em/.9 var(--sign); letter-spacing: 0; color: var(--accent); }
.machine-tag { margin-top: 6px; font-size: 13px; color: var(--muted); line-height: 1.4; }
.machine-go { margin-top: auto; padding-top: 14px; display: inline-flex; align-items: center; gap: 8px; font: 500 12.5px/1 var(--display); color: var(--accent); }
.machine-go svg { width: 14px; height: 14px; }
.machine.off .machine-go { color: var(--muted); }
.machine.feature { grid-column: span 2; grid-row: span 2; padding: 0 0 20px; color: #fff6e6; border-color: var(--red-deep); background: linear-gradient(180deg, #c9342a, #a8281f); }
.machine.feature::before { border-color: rgba(246, 214, 142, .25); top: auto; bottom: -80px; right: -50px; width: 260px; height: 200px; }
.machine.feature > :not(img) { margin-left: 24px; margin-right: 24px; }
.machine-art { width: 100%; height: 300px; object-fit: cover; object-position: 30% 35%; border-bottom: 4px solid var(--gold); }
.machine.feature .porthole { margin-top: -30px; position: relative; width: 60px; height: 60px; color: #c9342a; background: radial-gradient(circle at 35% 30%, #fff 0 12%, #fff4df 55%, #ead7b0); }
.machine.feature .machine-no { color: #f6d68e; }
.machine.feature .machine-name { font-size: 30px; }
.machine.feature .machine-name em { color: #fff3dc; }
.machine.feature .machine-tag { color: #ffe3d6; font-size: 15px; }
.machine.feature .machine-go { color: #f6d68e; font-size: 14px; }
.machine.feature:hover:not(.off) { border-color: var(--gold); }

/* soundstages: one production per stage */
.projcards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); gap: 22px; }
.projcard { display: flex; flex-direction: column; padding: 0; overflow: hidden; text-decoration: none; transition: transform .2s, box-shadow .2s, border-color .2s; border-radius: 22px; }
.projcard:hover { transform: translateY(-3px); border-color: var(--accent); box-shadow: var(--shadow); }
.project-cover { --band: var(--accent); position: relative; isolation: isolate; display: flex; flex-direction: column; justify-content: space-between; gap: 14px; min-height: 186px; padding: 18px 22px 16px;
  background: linear-gradient(180deg, #fffdf8, #f1e7d2); color: #2b2320; overflow: hidden; border-bottom: 6px solid var(--band); }
.project-cover::after { content: ""; position: absolute; z-index: -1; right: 18px; top: 50px; width: 90px; height: 90px; border-radius: 50%;
  background: repeating-radial-gradient(circle, transparent 0 9px, color-mix(in srgb, var(--band) 14%, transparent) 9px 11px); }
.cover-1 { --band: #2f86d1; }
.cover-2 { --band: #d9a441; }
[data-theme="dark"] .project-cover { background: linear-gradient(180deg, #1d2b47, #142036); color: #fbf0dc; }
.cover-top, .cover-bottom { display: flex; align-items: center; justify-content: space-between; gap: 10px; font: 600 9px/1 var(--display); text-transform: uppercase; letter-spacing: .18em; color: color-mix(in srgb, currentColor 70%, transparent); }
.stage-no { display: inline-flex; align-items: baseline; gap: 6px; padding: 6px 12px 5px; border-radius: 8px; background: #fff; box-shadow: 0 0 0 1px #d9cfbc, 0 2px 0 #c6b99f;
  font: 600 26px/1 var(--display); letter-spacing: .02em; color: #2b2320; }
.stage-no small { font-size: 10px; letter-spacing: .2em; }
.project-cover h3 { font: 400 42px/1 var(--sign); letter-spacing: 0; margin: 4px 0 0; color: var(--band); overflow-wrap: anywhere; text-shadow: 1px 1px 0 #fff; }
[data-theme="dark"] .project-cover h3 { text-shadow: none; filter: brightness(1.25); }
.cover-bottom { letter-spacing: .08em; font-size: 10.5px; color: #54473f; }
[data-theme="dark"] .cover-bottom { color: #dccfb9; }
.cover-bottom > span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 65%; }
.cover-bottom small { font-size: 8px; margin-left: 3px; letter-spacing: .1em; }
.project-body { padding: 18px 22px 14px; display: flex; flex-direction: column; gap: 14px; flex: 1; }
.projcard .project-description { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.project-body .stats { gap: 6px 16px; font-size: 12px; }
.project-open { margin-top: auto; padding-top: 13px; border-top: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.project-open b { display: inline-flex; align-items: center; gap: 9px; font: 500 13px/1 var(--display); color: var(--accent); }
.project-open svg, .new-production-link svg { width: 14px; height: 14px; }
.project-open > span { font-size: 11px; color: var(--muted); }
.new-production { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; min-height: 320px; padding: 26px; color: var(--muted); border: 2px dashed var(--line2); border-radius: 22px;
  background: repeating-linear-gradient(135deg, transparent 0 14px, color-mix(in srgb, var(--gold) 7%, transparent) 14px 28px); cursor: pointer; transition: border-color .2s, background .2s; font: inherit; }
.new-production:hover { border-color: var(--accent); }
.new-production-icon { display: grid; place-items: center; width: 54px; height: 54px; border-radius: 50%; margin-bottom: 6px; color: #fff6e6;
  background: radial-gradient(circle at 35% 30%, #f07a6b 0 10%, #c9342a 50%, #8f1f18); box-shadow: 0 0 0 4px var(--ring), 0 0 0 5px var(--ring2); }
.new-production-icon svg { width: 22px; height: 22px; }
.new-production > b { font: 600 24px/1.1 var(--display); color: var(--fg); }
.new-production > span:not(.new-production-icon) { font-size: 13px; }
.new-production-link { display: inline-flex; align-items: center; gap: 8px; margin-top: 10px; color: var(--accent); font: 500 13px var(--display); }
.newproj { display: grid; gap: 10px; }
.new-project-panel { margin-bottom: 36px; scroll-margin-top: 190px; }
.story-matic { border-top: 4px solid var(--accent); }
.help-note { color: var(--muted); font-style: italic; }

/* ---------- the Actor Generator 3200 ---------- */
.agen { display: grid; grid-template-columns: 300px minmax(0, 1fr); grid-template-areas: "chamber console" "company company"; gap: 24px 28px; margin: 0 0 28px; padding: 26px;
  border-radius: 30px; background: linear-gradient(180deg, var(--bg2), var(--bg3)); box-shadow: 0 0 0 1px var(--line2), 0 0 0 7px var(--ring), 0 0 0 8px var(--ring2), var(--shadow); scroll-margin-top: 190px; }
.chamber { grid-area: chamber; display: flex; flex-direction: column; align-items: center; gap: 0; min-width: 0; }
.chamber-sign { position: relative; z-index: 2; display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; padding: 12px 10px; border-radius: 999px 999px 16px 16px;
  background: var(--enamel); color: #fff3dc; font: 600 15px/1 var(--display); letter-spacing: .16em; text-transform: uppercase; white-space: nowrap;
  box-shadow: inset 0 0 0 2px rgba(246, 214, 142, .6), 0 3px 0 var(--red-deep), 0 6px 12px rgba(143, 31, 24, .25); }
[data-theme="dark"] .chamber-sign { color: #2b0d08; }
.chamber-sign svg { width: 15px; height: 15px; color: #f6d68e; flex: none; }
[data-theme="dark"] .chamber-sign svg { color: #fff3c8; }
.chamber-cap { width: 88%; height: 20px; margin-top: 6px; border-radius: 10px 10px 4px 4px; background: var(--chrome-x); box-shadow: 0 0 0 1px var(--ring2), 0 3px 4px rgba(0, 0, 0, .15); }
.chamber-tube { position: relative; width: 78%; aspect-ratio: 3 / 4.3; overflow: hidden; border-left: 7px solid transparent; border-right: 7px solid transparent;
  background: radial-gradient(ellipse 80% 45% at 50% 100%, rgba(255, 205, 105, .95), rgba(255, 196, 95, .35) 55%, transparent 80%) padding-box,
    linear-gradient(90deg, #f1d18f, #fff4d8 45%, #fff8e6 55%, #efcd88) padding-box, var(--chrome-x) border-box;
  box-shadow: inset 12px 0 20px rgba(255, 255, 255, .55), inset -12px 0 20px rgba(150, 100, 25, .25); }
.chamber-tube img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 22%; }
.chamber-tube.full::after { content: ""; position: absolute; inset: 0; background: linear-gradient(0deg, rgba(255, 200, 100, .45), transparent 30%); pointer-events: none; }
.tube-glare { position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background: linear-gradient(90deg, transparent 10%, rgba(255, 255, 255, .5) 16%, transparent 24%, transparent 72%, rgba(255, 255, 255, .28) 78%, transparent 84%); }
.silhouette { position: absolute; left: 27%; bottom: 5%; width: 46%; fill: rgba(130, 82, 24, .22); }
.chamber-tube.busy .silhouette { animation: flicker 1.1s steps(2) infinite; fill: rgba(201, 52, 42, .35); }
.tube-beam { position: absolute; inset: 0; z-index: 1; pointer-events: none; background: repeating-linear-gradient(0deg, transparent 0 7px, rgba(255, 246, 210, .55) 7px 9px); animation: beam 1.4s linear infinite; }
@keyframes beam { from { background-position: 0 0; } to { background-position: 0 -64px; } }
@keyframes flicker { 50% { opacity: .45; } }
.chamber-base { width: 100%; height: 30px; border-radius: 12px 12px 50% 50% / 12px 12px 100% 100%; background: var(--chrome-x); box-shadow: 0 0 0 1px var(--ring2), 0 6px 10px rgba(86, 44, 18, .18); position: relative; }
.chamber-base span { position: absolute; left: 12%; right: 12%; top: 8px; height: 4px; border-radius: 4px; background: linear-gradient(90deg, transparent, var(--accent), transparent); box-shadow: 0 0 8px var(--accent); }
.chamber-status { margin: 14px 0 10px; text-align: center; font: 600 10.5px/1.35 var(--display); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.chamber-takes { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; width: 100%; margin-bottom: 10px; }
.chamber-takes .take img { width: 100%; aspect-ratio: 1; object-fit: cover; object-position: 50% 20%; border-radius: 10px; border: 2px solid transparent; }
.chamber-takes .take.pick img { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-soft); }
.chamber-takes .take:focus-visible img { outline: 2px solid var(--accent); outline-offset: 1px; }

.console { grid-area: console; display: grid; gap: 14px; align-content: start; min-width: 0; padding: 18px 22px 20px; border-radius: 24px; background: var(--bg0);
  box-shadow: inset 0 0 0 1px var(--line), 0 0 0 5px var(--ring), 0 0 0 6px var(--ring2); }
.console-h { display: flex; align-items: flex-end; gap: 14px; flex-wrap: wrap; }
.console-h .field { margin: 0; }
.console-h input { width: 100%; font: 500 16px var(--display); }
.console-id { display: inline-flex; align-items: center; gap: 6px; padding-bottom: 4px; }
.dials { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 26px; }
.dial { display: grid; grid-template-columns: minmax(0, 1fr) 42px; gap: 7px 12px; align-items: center; padding: 12px 0; border-top: 1px solid var(--line); min-width: 0; }
.dial-lab { grid-column: 1; font: 600 11.5px/1 var(--display); letter-spacing: .16em; text-transform: uppercase; color: var(--fg); }
.keys { grid-column: 1; display: flex; flex-wrap: wrap; gap: 5px; }
.knob { grid-column: 2; grid-row: 1 / span 2; justify-self: end; }
.key { all: unset; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; padding: 4px 11px; border-radius: 999px; border: 1px solid var(--line2); background: var(--bg2);
  font: 500 12.5px/1.25 var(--ui); color: var(--fg2); transition: background .12s, color .12s; }
.key:hover { border-color: var(--accent); color: var(--accent); }
.key.on { background: var(--enamel); color: var(--accent-ink); border-color: var(--red-deep); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .3); }
.key:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.swatch { width: 11px; height: 11px; border-radius: 50%; background: var(--sw); box-shadow: 0 0 0 1px rgba(0, 0, 0, .25); }
.knob { all: unset; cursor: pointer; position: relative; width: 36px; height: 36px; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #ffad9f 0 12%, #dc4537 42%, #a2251c 80%, #7e1912);
  box-shadow: 0 0 0 3px var(--ring), 0 0 0 4px var(--ring2), 0 4px 7px rgba(60, 20, 10, .3); transform: rotate(var(--a)); transition: transform .45s cubic-bezier(.3, 1.6, .5, 1); }
.knob i { position: absolute; left: 50%; top: 4px; width: 3px; height: 11px; margin-left: -1.5px; border-radius: 2px; background: #fff3dc; }
.knob:focus-visible { outline: 2px solid var(--accent); outline-offset: 5px; }
.star-dial, .voice-dial, .notes-dial { grid-template-columns: minmax(0, 1fr) auto; }
.star-read { grid-column: 1 / -1; display: flex; align-items: center; gap: 14px; }
.star-read b { font: 600 12px/1.2 var(--display); letter-spacing: .14em; text-transform: uppercase; color: var(--accent); }
.star-dial input[type=range] { grid-column: 1 / -1; width: 100%; margin: 0; }
.gauge { width: 112px; height: 64px; flex: none; }
.g-arc, .g-hot { fill: none; stroke-width: 8; stroke-linecap: round; }
.g-arc { stroke: var(--line2); } .g-hot { stroke: var(--accent); }
.g-tick { stroke: var(--muted); stroke-width: 1.5; }
.g-needle { fill: var(--fg); }
.gauge g { transition: transform .45s cubic-bezier(.3, 1.5, .5, 1); }
.g-hub { fill: var(--accent); stroke: var(--bg0); stroke-width: 2; }
.voice-wave { display: inline-flex; align-items: center; gap: 2px; height: 20px; }
.voice-wave i { width: 3px; border-radius: 2px; background: var(--teal); }
.voice-dial input, .voice-dial select, .notes-dial input { grid-column: 1 / -1; width: 100%; }
.speccard { display: grid; gap: 6px; padding-top: 12px; border-top: 1px solid var(--line); }
.speccard .lab { display: flex; align-items: center; gap: 8px; }
.speccard textarea { background: repeating-linear-gradient(180deg, transparent 0 20px, color-mix(in srgb, var(--sky) 9%, transparent) 20px 21px), var(--bg0); }
.materialize { display: flex; align-items: center; gap: 18px; padding: 12px 22px 12px 14px; border-radius: 999px; background: linear-gradient(var(--bg3), var(--bg1)); border: 1px solid var(--line); width: max-content; max-width: 100%; }
.materialize b { display: block; font: 600 19px/1.1 var(--display); letter-spacing: .12em; text-transform: uppercase; color: var(--accent); }
.materialize small { display: block; font-size: 12.5px; color: var(--muted); margin-top: 3px; }
.bigred { all: unset; cursor: pointer; position: relative; flex: none; width: 66px; height: 66px; border-radius: 50%;
  background: radial-gradient(circle at 38% 30%, #ffc0b4 0 9%, #ec4e3f 36%, #b6281e 72%, #7d1812);
  box-shadow: 0 0 0 6px var(--ring), 0 0 0 7px var(--ring2), 0 9px 0 1px #7d1812, 0 12px 18px rgba(86, 24, 12, .35); transition: transform .08s, box-shadow .08s; }
.bigred:active:not(:disabled) { transform: translateY(5px); box-shadow: 0 0 0 6px var(--ring), 0 0 0 7px var(--ring2), 0 4px 0 1px #7d1812, 0 6px 10px rgba(86, 24, 12, .3); }
.bigred:disabled { cursor: not-allowed; filter: grayscale(.7); opacity: .6; }
.bigred:focus-visible { outline: 3px solid var(--gold); outline-offset: 10px; }
.develop { display: grid; gap: 10px; padding-top: 14px; border-top: 1px dashed var(--line2); }
.company { grid-area: company; min-width: 0; padding-top: 18px; border-top: 2px solid var(--line); }
.company-h { display: flex; align-items: baseline; gap: 12px; margin-bottom: 10px; }
.company-h .lab { color: var(--fg); font-size: 11.5px; }
.company-h .muted { font-size: 12.5px; }
.company-row { display: flex; gap: 10px; overflow-x: auto; padding: 4px 2px 10px; scrollbar-width: thin; }
.actor { all: unset; cursor: pointer; flex: none; width: 118px; display: grid; justify-items: center; gap: 4px; text-align: center; padding: 12px 8px 10px; border-radius: 18px; border: 1px solid transparent; }
.actor:hover { background: var(--bg2); border-color: var(--line2); }
.actor.on { background: var(--bg2); border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.actor:focus-visible { outline: 2px solid var(--accent); }
.portrait { position: relative; display: grid; place-items: center; width: 78px; height: 78px; border-radius: 50%; overflow: hidden; margin-bottom: 4px;
  background: radial-gradient(circle at 50% 85%, #f6cf86, #fff3d8 72%); box-shadow: 0 0 0 3px var(--ring), 0 0 0 4px var(--ring2); }
.portrait img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 18%; }
.portrait .silhouette { position: static; width: 46%; margin-top: 18%; }
.actor b { font: 600 14px/1.15 var(--display); text-transform: capitalize; overflow-wrap: anywhere; }
.actor small { font-size: 11px; color: var(--muted); line-height: 1.3; }
.actor.new .portrait { background: transparent; border: 2px dashed var(--line2); box-shadow: none; color: var(--accent); }
.actor.new .portrait svg { width: 26px; height: 26px; }

/* ---------- responsive ---------- */
@media (max-width: 1360px) {
  .brand-motto { display: none; }
  .machines { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 1280px) {
  :root { --gut: 26px; }
  .projsel > span { display: none; }
  .navin { gap: 14px; }
  .tab-t small { display: none; }
  .tab { padding: 6px 11px 6px 7px; }
  .tabsep { margin: 0 4px; }
  .ws { grid-template-columns: minmax(0, 1fr) minmax(280px, 330px); }
  .ws > .ws-script { grid-column: 1 / -1; order: 3; }
  .ed-top { grid-template-columns: minmax(0, 1fr) 320px; }
}
@media (max-width: 1100px) {
  .agen { grid-template-columns: 250px minmax(0, 1fr); padding: 20px; gap: 20px; }
  .dials { grid-template-columns: minmax(0, 1fr); }
  .chamber-sign { font-size: 13px; letter-spacing: .12em; }
}
@media (max-width: 960px) {
  .projsel { display: none; }
  .tabs { width: 100%; }
  .spendchip > span:first-child { display: none; }
  .hs-stage, .hs-rail { display: none; }
  .plaza-marquee { margin-left: 20px; margin-right: 20px; }
  .ws { grid-template-columns: minmax(0, 1fr); }
  .ws > .ws-gen { order: 2; }
  .ed-top { grid-template-columns: minmax(0, 1fr); }
  .cols2 { grid-template-columns: minmax(0, 1fr); }
  .shotrow { grid-template-columns: 64px 150px minmax(0, 1fr); }
  .shotrow .side { grid-column: 3; flex-direction: row; flex-wrap: wrap; align-items: center; }
  .shotrow .side .acts { margin: 0 0 0 auto; }
  .agen { grid-template-columns: minmax(0, 1fr); grid-template-areas: "chamber" "console" "company"; }
  .chamber { width: min(100%, 300px); margin: 0 auto; }
}
@media (max-width: 720px) {
  :root { --gut: 16px; --r: 16px; }
  html { scroll-padding-top: 140px; }
  .topin { gap: 10px; padding-top: 10px; padding-bottom: 12px; min-height: 74px; }
  .brand { gap: 9px; padding-right: 8px; }
  .brand::after { left: 52px; right: -8px; bottom: -8px; border-bottom-width: 3px; }
  .brand-port { width: 46px; height: 46px; }
  .brand-mark { width: 40px; height: 40px; }
  .brand b { font-size: 36px; }
  .wordmark > span { font-size: 9px; letter-spacing: .5em; padding-left: 30px; }
  .brand-star { left: 50px; width: 16px; height: 16px; }
  .navin { padding: 0; }
  .tabs { padding: 6px 12px; }
  .tab { padding: 5px 11px 5px 6px; }
  .tab > svg { width: 24px; height: 24px; }
  .tab-t { font-size: 12.5px; }
  .tabsep { margin: 0 4px; }
  .topr { gap: 6px; }
  .conn span { display: none; }
  .conn { padding: 6px; }
  .spendchip { display: none; }
  .workspace-label { padding: 16px 0; gap: 8px; font-size: 9px; }
  .workspace-edition { display: none; }
  .view-h { gap: 10px; padding-bottom: 16px; margin-bottom: 18px; }
  .view-h h1 { font-size: 32px; }
  .view-h .sub { font-size: 14px; }
  .view-h .stats { gap: 8px 14px; padding: 10px 14px; border-radius: 16px; }
  .view-h .stats span + span { padding-left: 0; border: 0; }
  .plaza-art { --k: 1; aspect-ratio: 1672 / 941; border-radius: 18px; box-shadow: 0 0 0 3px var(--ring), 0 0 0 4px var(--ring2), var(--shadow); }
  .hs-actor .hs-label { font-size: 12px; padding: 6px 11px 6px 12px; }
  .hs-label small { display: none; }
  .beacon { width: 14px; height: 14px; }
  .plaza-marquee { margin: -18px 8px 0; padding: 22px 20px 22px; border-radius: 20px; }
  .plaza-marquee::after { right: 18px; top: -16px; width: 26px; height: 26px; }
  .plaza-marquee h1 { font-size: clamp(32px, 9.4vw, 46px); }
  .plaza-marquee p { font-size: 14.5px; }
  .hero-cta, .hero-cta2 { width: 100%; }
  .section-h, .productions-h { flex-wrap: wrap; }
  .section-h > .muted, .productions-h > .muted { display: none; }
  .section-h h2, .productions-h h2 { font-size: 27px; }
  .machines { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .machine { min-height: 0; padding: 16px 14px 14px; border-radius: 18px; }
  .machine.feature { grid-row: span 1; padding-bottom: 18px; }
  .machine.feature > :not(img) { margin-left: 18px; margin-right: 18px; }
  .machine-art { height: 190px; }
  .machine.feature .machine-name { font-size: 25px; }
  .porthole { width: 42px; height: 42px; }
  .porthole svg { width: 18px; height: 18px; }
  .machine-name { font-size: 17px; }
  .machine-tag { font-size: 12px; }
  .projcards { gap: 16px; }
  .new-production { min-height: 250px; }
  .studio-footer { gap: 10px 16px; margin-top: 32px; }
  .studio-footer .btn { margin-left: 0; }
  .sec-h { padding: 14px; }
  .sec-h h2 { font-size: 22px; }
  .shotrow { grid-template-columns: 100px minmax(0, 1fr); gap: 10px; padding: 14px 12px; }
  .shotrow .slate { grid-column: 2; grid-row: 1; flex-direction: row; flex-wrap: wrap; align-items: baseline; gap: 2px 10px; }
  .shotrow .thumbc { grid-column: 1; grid-row: 1 / span 2; }
  .shotrow .scr { grid-column: 2; }
  .shotrow .scr .clamp { -webkit-line-clamp: 2; }
  .shotrow .scr .ln, .shotrow .scr .sfx { display: none; }
  .shotrow .side { grid-column: 1 / -1; }
  .refrow { grid-template-columns: minmax(0, 1fr); }
  .strip { grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); }
  .castgrid, .genp .grid2 { grid-template-columns: minmax(0, 1fr); }
  .trim-deck { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .trim .ph { flex-wrap: wrap; }
  .tbl.stack thead { display: none; }
  .tbl.stack tr { display: grid; grid-template-columns: 1fr auto; column-gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--line); }
  .tbl.stack td { border: 0; padding: 2px 0; }
  .tbl.stack tr.sel { background: var(--bg1); }
  .tbl.stack tr.sel td { background: transparent; }
  .tbl.stack td.full { grid-column: 1 / -1; }
  .ws-h .sid { font-size: 24px; }
  .toolbar input[type=search] { width: 100%; }
  .line-ed { grid-template-columns: 1fr auto; }
  .line-ed .opts { grid-column: 1 / -1; }
  .cue { grid-template-columns: 14px minmax(0, 1fr) auto auto; }
  .cue .gain { display: none; }
  .help { columns: 1; }
  .hide-s { display: none !important; }
  .show-s { display: inline-flex; }
  .sndrow-takes { width: 100%; }
  .agen { padding: 14px; border-radius: 22px; box-shadow: 0 0 0 1px var(--line2), 0 0 0 4px var(--ring), 0 0 0 5px var(--ring2), var(--shadow); }
  .console { padding: 14px; border-radius: 18px; }
  .materialize { width: 100%; padding-right: 14px; }
  .materialize b { font-size: 16px; }
}
@media (max-width: 380px) {
  .topin { gap: 6px; }
  .brand { gap: 7px; }
  .brand-port { width: 40px; height: 40px; }
  .brand-mark { width: 35px; height: 35px; }
  .brand b { font-size: 31px; }
  .brand::after { left: 46px; }
  .brand-star { left: 42px; }
  .wordmark > span { font-size: 8px; padding-left: 24px; letter-spacing: .42em; }
  .topr { gap: 4px; }
  .iconbtn { width: 30px; height: 30px; }
}
@media (max-width: 340px) {
  .machines { grid-template-columns: minmax(0, 1fr); }
  .machine.feature { grid-column: span 1; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

/* The Prop Fabricator 8800: a sunlit drafting table with a generous inspection stage. */
.cad-intro { display:grid; grid-template-columns:1fr 290px; gap:36px; padding:34px 12px 32px; border-bottom:1px solid var(--line); margin-bottom:22px; }
.cad-intro h1 { font:600 clamp(36px,4.4vw,60px)/1.04 var(--display); letter-spacing:-.02em; margin:16px 0 18px; }
.cad-intro h1 em { font:400 1.22em/.9 var(--sign); color:var(--accent); }
.cad-intro p:not(.eyebrow) { max-width:620px; color:var(--muted); line-height:1.7; }
.cad-intro-mark { display:flex; flex-direction:column; align-items:center; justify-content:center; gap:18px; color:var(--accent); font:600 11px var(--display); text-transform:uppercase; letter-spacing:.18em; }
.cad-intro-mark > svg { width:110px; height:110px; stroke-width:1; }
.cad-toolbar { gap:10px; flex-wrap:wrap; }
.cad-toolbar input { width:210px; }
.cad-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(270px,1fr)); gap:22px; margin:24px 0; }
.cad-card { overflow:hidden; display:block; border:1px solid var(--line); border-radius:20px; background:var(--bg2); color:inherit; text-decoration:none; box-shadow:0 5px 18px #132b4910; transition:transform .18s,box-shadow .18s; }
.cad-card:hover { transform:translateY(-3px); box-shadow:0 10px 26px #132b4920; }
.cad-card-image { aspect-ratio:16/10; position:relative; background:#e5e8e7; display:flex; align-items:center; justify-content:center; overflow:hidden; }
.cad-card-image img { width:100%; height:100%; object-fit:contain; }
.cad-card-image > svg { width:70px; height:70px; color:var(--accent); stroke-width:1; }
.cad-card-image > span { position:absolute; bottom:12px; left:12px; padding:5px 10px; background:#fff9ebed; color:#c9342a; border-radius:999px; font-size:10px; letter-spacing:.8px; text-transform:uppercase; }
.cad-card-body { padding:19px 20px 15px; }
.cad-card h2 { font:600 23px/1.15 var(--display); margin:8px 0 14px; }
.cad-card p { display:flex; justify-content:space-between; color:var(--muted); font-size:12px; gap:10px; }
.cad-layout { display:grid; grid-template-columns:minmax(0,1fr) 340px; align-items:start; gap:24px; margin-top:20px; }
.cad-main,.cad-side { min-width:0; }
.cad-side { display:grid; gap:18px; }
.cad-fields { display:grid; gap:14px; }
.cad-fields input:not([type=checkbox]),.cad-fields textarea,.cad-fields select { width:100%; box-sizing:border-box; }
.cad-fields textarea { font:inherit; line-height:1.5; padding:9px 10px; resize:vertical; }
.cad-fields .field { display:grid; gap:6px; }
.cad-create { max-width:760px; margin:20px auto; }
.cad-create .row { margin-top:18px; }
.cad-tabs,.cad-view-tools,.cad-downloads { display:flex; flex-wrap:wrap; align-items:center; gap:7px; }
.cad-tabs { margin-bottom:12px; }
.cad-stage { height:clamp(300px,41vw,580px); position:relative; background:#e9e6dc; border-radius:16px 16px 0 0; overflow:hidden; }
.cad-stage canvas { display:block; width:100%; height:100%; touch-action:none; }
.cad-viewer-status { position:absolute; inset:0; display:grid; place-content:center; text-align:center; padding:30px; background:#eee9dfc9; color:#8f1f18; }
.cad-view-tools { padding:12px 14px 5px; }
.cad-view-hint { padding:0 14px 12px; }
.cad-downloads { margin:18px 0; }
.cad-downloads .lab { margin-right:8px; }
.cad-unbuilt { min-height:380px; display:flex; flex-direction:column; align-items:center; justify-content:center; text-align:center; padding:30px; border:2px dashed var(--line2); border-radius:20px; background:var(--bg2); }
.cad-unbuilt > svg { width:80px; height:80px; color:var(--accent); stroke-width:1; margin-bottom:22px; }
.cad-unbuilt h2 { font:600 30px var(--display); margin:0 0 12px; }
.cad-unbuilt p { max-width:390px; line-height:1.6; }
.cad-upload { width:100%; border:1px dashed var(--line); border-radius:5px; padding:24px 12px; display:flex; align-items:center; flex-direction:column; gap:10px; background:var(--bg); color:var(--accent); cursor:pointer; }
.cad-upload span { font-size:11px; color:var(--muted); }
.cad-sources { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; margin:14px 0; }
.cad-sources img,.cad-sources video { width:100%; height:95px; object-fit:cover; border-radius:3px; }
.cad-sources span { display:block; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-size:10px; margin:4px 0; }
.cad-stages { color:var(--accent); font-size:12px; line-height:1.8; }
.cad-renders { display:grid; gap:16px; }
.cad-renders figure { margin:0; background:var(--bg2); border:1px solid var(--line); border-radius:6px; overflow:hidden; }
.cad-renders img { display:block; width:100%; max-height:600px; object-fit:contain; background:#e8e7e0; }
.cad-renders figcaption { padding:12px; display:flex; align-items:center; justify-content:space-between; gap:10px; font-size:12px; text-transform:capitalize; }
.cad-report { padding:20px; white-space:pre-wrap; overflow-wrap:anywhere; font:12px/1.7 var(--mono); max-height:850px; overflow:auto; }
.cad-reference { margin-top:22px; scroll-margin-top:18px; border-color:var(--accent); }
.cad-reference-preview { width:100%; max-height:280px; object-fit:contain; background:#e8e7e0; border-radius:4px; }
.cad-shot-picks { border:1px solid var(--line); border-radius:4px; padding:12px; max-height:220px; overflow:auto; }
.cad-shot-picks legend { font-size:12px; padding:0 5px; }
.cad-shot-picks label { display:flex; align-items:baseline; gap:10px; padding:5px; font-size:12px; }
.cad-job { margin-top:22px; }
.cad-job progress { width:100%; height:7px; accent-color:var(--accent); margin:14px 0; }
.cad-error { color:var(--bad); white-space:pre-wrap; font-size:12px; overflow-wrap:anywhere; }
.cad-inventory-row { display:flex; justify-content:space-between; align-items:center; gap:14px; padding:14px 0; border-bottom:1px solid var(--line); }
.cad-inventory-row small { display:block; color:var(--muted); margin-top:5px; }
.cad-equipment { margin-top:30px; padding:18px; border:1px solid var(--line); border-radius:5px; }
.cad-equipment summary { cursor:pointer; font-size:13px; }
.cad-tool-status { display:flex; flex-wrap:wrap; gap:16px; margin:18px 0; font-size:12px; }
.cad-tool-status .ready { color:var(--ok); }
.cad-tool-status .missing { color:var(--muted); }
@media(max-width:1000px) { .cad-layout { grid-template-columns:minmax(0,1fr) 300px; gap:16px; } .cad-intro { grid-template-columns:1fr 180px; } }
@media(max-width:760px) { .cad-layout { grid-template-columns:1fr; } .cad-intro { grid-template-columns:1fr; padding:20px 0; gap:0; } .cad-intro-mark { display:none; } .cad-stage { height:350px; } .cad-toolbar input { width:100%; } .cad-grid { grid-template-columns:repeat(auto-fill,minmax(240px,1fr)); } .cad-side { margin-top:10px; } .cad-layout .cad-fields { gap:12px; } }
@media(prefers-reduced-motion:reduce) { .cad-card { transition:none; } .cad-card:hover { transform:none; } }
