/* Silver Gate — interface
   Palette: black velvet, silver gelatin, ground glass, brass, nitrate amber (light), safelight red (rolling only) */
:root {
  --velvet: #050506;
  --plate: rgba(13, 13, 14, 0.8);
  --plate-solid: #0e0e0f;
  --silver: #cfcbbf;
  --silver-dim: #a6a296;
  --glass: #7c8580;
  --brass: #a88a55;
  --brass-hi: #d6b878;
  --amber: #e3a23b;
  --safelight: #c2321f;
  --line: rgba(207, 203, 191, 0.13);
  --line-strong: rgba(207, 203, 191, 0.26);
  --display: 'Bodoni Moda', Didot, 'Bodoni 72', Georgia, serif;
  --ui: 'Archivo', 'Helvetica Neue', Arial, sans-serif;
  --gap: 16px;
  --console-h: 238px;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--velvet); color: var(--silver); overflow: hidden; }
body { font: 400 13px/1.45 var(--ui); font-stretch: 92%; -webkit-font-smoothing: antialiased; }
button, input, output { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
:focus-visible { outline: 2px solid var(--amber); outline-offset: 2px; border-radius: 4px; }
kbd { font: 500 10px/1 var(--ui); font-stretch: 80%; color: var(--glass); border: 1px solid var(--line); border-radius: 3px; padding: 2px 4px; margin-left: 6px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
h1, h2, h3, h4, p { margin: 0; }

#gl { position: fixed; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; }
#iris { position: fixed; inset: 0; pointer-events: none; z-index: 40; --r: 160vmax; background: radial-gradient(circle at 50% 50%, transparent var(--r), #000 calc(var(--r) + 1.5px)); }

/* ---------- visibility by mode ---------- */
#intro, #caption, #card, #btnTourSkip, #top, #stage, #cutUI, #xpanel, #info, #console, #screenUI, #flat, #labels, #help { display: none; }
body[data-mode="intro"] #intro { display: grid; }
body[data-mode="tour"] #caption, body[data-mode="tour"] #card, body[data-mode="tour"] #btnTourSkip { display: block; }
body[data-mode="tour"] #top { display: flex; }
body[data-mode="tour"] #top .eras, body[data-mode="tour"] #top .modes .mode { visibility: hidden; }
body[data-mode="operate"] #top, body[data-mode="xray"] #top, body[data-mode="screen"] #top, body[data-mode="cut"] #top { display: flex; }
body[data-mode="cut"] #cutUI { display: grid; }
body[data-mode="operate"] #stage, body[data-mode="operate"] #console, body[data-mode="operate"] #help { display: block; }
body[data-mode="operate"] #console { display: grid; }
body[data-mode="xray"] #xpanel, body[data-mode="xray"] #labels { display: block; }
body[data-mode="xray"] #info.show { display: block; }
body[data-mode="screen"] #screenUI { display: block; }
body[data-mode="screen"].flat #flat { display: flex; }
body.expanded #stage, body.expanded #help { display: none !important; }

/* ---------- intertitles ---------- */
#intro { position: fixed; inset: 0; z-index: 30; place-items: center; background: radial-gradient(ellipse at 50% 45%, rgba(5,5,6,0.35), rgba(5,5,6,0.92) 70%); }
.intertitle { position: relative; max-width: 640px; margin: 24px; padding: 54px 64px 46px; text-align: center; border: 1px solid var(--line-strong); }
.intertitle::before { content: ''; position: absolute; inset: 7px; border: 1px solid var(--line); pointer-events: none; }
.intertitle::after { content: ''; position: absolute; left: 50%; top: -5px; width: 9px; height: 9px; margin-left: -5px; background: var(--velvet); border: 1px solid var(--line-strong); transform: rotate(45deg); }
.it-kicker { font: italic 400 17px/1.3 var(--display); color: var(--silver-dim); }
#intro h1 { font: 400 clamp(58px, 9vw, 104px)/0.95 var(--display); font-optical-sizing: auto; letter-spacing: -0.01em; margin: 14px 0 10px; color: #e7e3d6; }
.it-years { font: 400 21px/1 var(--display); font-variant-numeric: lining-nums; color: var(--brass-hi); letter-spacing: 0.04em; }
.it-body { max-width: 30em; margin: 26px auto 0; font-size: 15px; line-height: 1.55; color: var(--silver-dim); font-stretch: 100%; }
.it-actions { display: flex; gap: 12px; justify-content: center; margin-top: 30px; flex-wrap: wrap; }
.it-note { margin-top: 18px; font-size: 12px; color: var(--glass); }
.btn-primary { height: 44px; padding: 0 22px; border-radius: 22px; background: var(--silver); color: #111; font-weight: 600; font-stretch: 100%; transition: background .2s; }
.btn-primary:hover:not(:disabled) { background: #fff; }
.btn-primary:disabled { background: #2a2a2a; color: var(--glass); cursor: progress; }
.btn-quiet { height: 44px; padding: 0 18px; border-radius: 22px; border: 1px solid var(--line-strong); color: var(--silver-dim); }
.btn-quiet:hover:not(:disabled) { color: var(--silver); border-color: var(--silver-dim); }
.btn-quiet:disabled { opacity: .4; }
.btn-quiet.floating { position: fixed; right: 20px; bottom: 22px; z-index: 42; height: 36px; background: rgba(5,5,6,.5); }

#caption { position: fixed; left: 50%; bottom: 9vh; transform: translateX(-50%); width: min(780px, 88vw); text-align: center; z-index: 20; pointer-events: none; }
#caption p { font: italic 400 clamp(19px, 2.2vw, 27px)/1.38 var(--display); color: #ebe7da; text-shadow: 0 2px 18px #000, 0 0 2px #000; opacity: 0; transition: opacity .9s; }
#caption p.show { opacity: 1; }
#card { position: fixed; inset: 0; z-index: 41; display: none !important; place-items: center; background: #000; }
#card.show { display: grid !important; }
#card .intertitle { padding: 46px 70px; }
#card h2 { font: 400 clamp(54px, 8vw, 96px)/1 var(--display); color: #e8e4d7; font-variant-numeric: lining-nums; }
#card p { font: italic 400 22px/1.4 var(--display); color: var(--silver-dim); margin-top: 12px; }

/* ---------- top bar ---------- */
#top { position: fixed; top: 0; left: 0; right: 0; z-index: 20; height: 66px; padding: 0 20px; align-items: center; justify-content: space-between; gap: 16px; background: linear-gradient(#050506 10%, rgba(5,5,6,0)); pointer-events: none; }
#top > * { pointer-events: auto; }
.wordmark { font: italic 400 23px/1 var(--display); color: #e7e3d6; white-space: nowrap; min-width: 150px; }
.eras { display: flex; position: relative; background: #0c0b0a; padding: 9px 4px; border-radius: 3px;
  background-image: repeating-linear-gradient(90deg, transparent 0 6px, #050404 6px 13px), repeating-linear-gradient(90deg, transparent 0 6px, #050404 6px 13px);
  background-size: 100% 4px, 100% 4px; background-position: 0 2px, 0 calc(100% - 2px); background-repeat: no-repeat; box-shadow: inset 0 0 0 1px rgba(160,120,60,.18); }
.era { width: 128px; height: 40px; margin: 0 2px; display: flex; flex-direction: column; align-items: center; justify-content: center; background: #15120e; border-radius: 2px; color: var(--glass); transition: background .35s, color .35s; }
.era .yr { font: 500 18px/1 var(--display); font-variant-numeric: lining-nums; letter-spacing: .02em; }
.era .nm { font-size: 10.5px; font-stretch: 78%; margin-top: 3px; letter-spacing: .01em; }
.era:hover { color: var(--silver); }
.era.on { color: #1b1206; background: radial-gradient(ellipse at 50% 50%, #f6d79a 0%, #e3a23b 55%, #9a6420 100%); box-shadow: 0 0 22px rgba(227,162,59,.35); }
.modes { display: flex; align-items: center; gap: 4px; min-width: 150px; justify-content: flex-end; }
.mode { height: 34px; padding: 0 11px; color: var(--silver-dim); font-size: 13.5px; font-stretch: 96%; position: relative; }
.mode::after { content: ''; position: absolute; left: 11px; right: 11px; bottom: 4px; height: 1px; background: var(--brass); transform: scaleX(0); transition: transform .25s; }
.mode:hover { color: var(--silver); }
.mode.on { color: #ece8dc; }
.mode.on::after { transform: scaleX(1); }
.icon-btn { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 8px; color: var(--silver-dim); }
.icon-btn:hover { color: var(--silver); background: rgba(255,255,255,.04); }
.icon-btn svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.icon-btn svg .fill { fill: currentColor; stroke: none; }
#btnHelp[aria-expanded="true"] { color: var(--amber); }
#btnSound svg path:first-child { fill: currentColor; stroke: none; }
#btnSound[aria-pressed="false"] .wave { opacity: .15; }

/* ---------- panels ---------- */
.drawer, .plate, #screenUI .sc-left, #screenUI .sc-right, #screenUI .sc-bottom, #info { background: var(--plate); backdrop-filter: blur(16px) saturate(1.1); -webkit-backdrop-filter: blur(16px); border: 1px solid var(--line); }
.drawer { position: fixed; left: var(--gap); top: 78px; width: 300px; max-height: calc(100vh - var(--console-h) - 110px); z-index: 15; border-radius: 12px; overflow: hidden; display: flex; flex-direction: column; }
#xpanel { max-height: calc(100vh - 100px); }
.drawer.right { left: auto; right: var(--gap); width: 284px; }
.drawer.right.collapsed .collapse svg { transform: rotate(180deg); }
.chip[aria-pressed="true"] { color: #f2ede0; border-color: var(--amber); background: rgba(227,162,59,.13); }
#btnHold[aria-pressed="true"] { border-color: var(--safelight); background: rgba(194,50,31,.18); }
.note.armed { color: var(--amber); }
body.held .crank-read output { color: var(--safelight); }
.drawer-head { display: flex; align-items: center; justify-content: space-between; padding: 12px 10px 8px 16px; }
.drawer-head h3 { font: italic 400 20px/1 var(--display); color: #e7e3d6; }
.drawer-body { padding: 4px 16px 16px; overflow: auto; scrollbar-width: thin; scrollbar-color: #333 transparent; }
.drawer.collapsed .drawer-body { display: none; }
.drawer.collapsed .collapse svg { transform: rotate(180deg); }
.group { padding: 12px 0; border-top: 1px solid var(--line); }
.group:first-child { border-top: 0; padding-top: 4px; }
.group h4 { font-size: 12px; font-weight: 500; color: var(--glass); margin-bottom: 8px; font-stretch: 88%; }
.note { font-size: 12px; line-height: 1.5; color: var(--silver-dim); margin-top: 8px; font-stretch: 98%; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { height: 28px; padding: 0 10px; border-radius: 6px; border: 1px solid var(--line-strong); color: var(--silver-dim); font-size: 12.5px; white-space: nowrap; transition: border-color .2s, background .2s, color .2s; }
.chip:hover { color: var(--silver); border-color: var(--silver-dim); }
.chip.on { color: #f2ede0; border-color: var(--amber); background: rgba(227,162,59,.13); }
.chip:disabled { opacity: .35; cursor: default; }
.btn-line { height: 32px; padding: 0 12px; border-radius: 6px; border: 1px solid var(--line-strong); color: var(--silver); margin-top: 10px; }
.btn-line:hover { border-color: var(--silver-dim); background: rgba(255,255,255,.03); }
.btn-tiny { height: 22px; padding: 0 7px; border-radius: 5px; border: 1px solid var(--line); color: var(--silver-dim); font-size: 11px; font-stretch: 85%; }
.btn-tiny:hover { color: var(--silver); border-color: var(--line-strong); }
.btn-tiny[aria-pressed="true"] { color: var(--amber); border-color: rgba(227,162,59,.5); }
.btn-tiny kbd { margin-left: 4px; padding: 1px 3px; }
.seg { display: inline-flex; border: 1px solid var(--line-strong); border-radius: 6px; overflow: hidden; }
.seg button { height: 24px; padding: 0 9px; font-size: 11.5px; color: var(--silver-dim); font-stretch: 88%; }
.seg button.on { background: rgba(207,203,191,.14); color: #f0ebde; }

input[type=range] { -webkit-appearance: none; appearance: none; width: 100%; height: 22px; background: none; cursor: pointer; }
input[type=range]::-webkit-slider-runnable-track { height: 2px; background: linear-gradient(90deg, var(--brass) var(--p, 50%), rgba(207,203,191,.18) var(--p, 50%)); border-radius: 1px; }
input[type=range]::-moz-range-track { height: 2px; background: rgba(207,203,191,.18); }
input[type=range]::-moz-range-progress { height: 2px; background: var(--brass); }
input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 13px; height: 13px; margin-top: -5.5px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #f0dcaa, #a88a55 60%, #5c4624); box-shadow: 0 1px 3px #000; }
input[type=range]::-moz-range-thumb { width: 13px; height: 13px; border: 0; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #f0dcaa, #a88a55 60%, #5c4624); }
.row-slider { display: grid; grid-template-columns: 1fr; gap: 2px; font-size: 12px; color: var(--silver-dim); }
.row-slider.small { grid-template-columns: auto 1fr minmax(22px, auto); align-items: center; gap: 8px; }
.row-slider.small output { white-space: nowrap; }
.row-slider output { font: 500 13px/1 var(--display); font-variant-numeric: lining-nums tabular-nums; text-align: right; color: var(--silver); }

/* lights switchboard */
.light { padding: 9px 0 6px; border-top: 1px solid rgba(207,203,191,.07); }
.light:first-child { border-top: 0; }
.light-head { display: grid; grid-template-columns: 38px 1fr auto; align-items: center; gap: 8px; }
.light-name { font-size: 13px; color: var(--silver); line-height: 1.25; }
.light-name small { display: block; font-size: 11px; color: var(--glass); font-stretch: 85%; }
.knife { width: 34px; height: 18px; border-radius: 9px; background: #1d1c1a; border: 1px solid var(--line-strong); position: relative; transition: background .2s; }
.knife::after { content: ''; position: absolute; top: 2px; left: 2px; width: 12px; height: 12px; border-radius: 50%; background: #5e5a52; transition: transform .2s, background .2s, box-shadow .2s; }
.knife[aria-pressed="true"] { background: rgba(227,162,59,.22); border-color: rgba(227,162,59,.6); }
.knife[aria-pressed="true"]::after { transform: translateX(16px); background: var(--amber); box-shadow: 0 0 8px var(--amber); }
.light .info-btn { width: 22px; height: 22px; border-radius: 50%; color: var(--glass); border: 1px solid var(--line); font: italic 500 12px/1 var(--display); }
.light .info-btn[aria-expanded="true"] { color: var(--amber); border-color: rgba(227,162,59,.5); }
.light .desc { display: none; font-size: 12px; color: var(--silver-dim); margin: 6px 0 2px 46px; line-height: 1.5; }
.light.open .desc { display: block; }
.light .sliders { margin-left: 46px; display: grid; gap: 0; }
.light .sliders label { display: grid; grid-template-columns: 54px 1fr; align-items: center; font-size: 11px; color: var(--glass); font-stretch: 85%; }

/* ---------- operator console ---------- */
#console { position: fixed; left: var(--gap); right: var(--gap); bottom: var(--gap); height: var(--console-h); z-index: 16; grid-template-columns: auto minmax(280px, 1fr) 236px 214px; gap: 10px; align-items: stretch; }
#console > .plate { border-radius: 14px; padding: 14px 16px; }
.vf-wrap { padding: 6px 4px 0; }
.vf-wrap { display: flex; flex-direction: column; gap: 8px; }
#vf { position: relative; width: 244px; height: 183px; border-radius: 4px; background: transparent; box-shadow: 0 0 0 1px var(--line-strong), 0 0 0 5px rgba(8,8,8,.92), 0 0 0 6px var(--line), 0 10px 30px rgba(0,0,0,.6); cursor: grab; }
#vf:active { cursor: grabbing; }
.vf-corner { position: absolute; width: 12px; height: 12px; border: 1px solid rgba(232,228,214,.5); }
.vf-corner.tl { left: -9px; top: -9px; border-right: 0; border-bottom: 0; } .vf-corner.tr { right: -9px; top: -9px; border-left: 0; border-bottom: 0; }
.vf-corner.bl { left: -9px; bottom: -9px; border-right: 0; border-top: 0; } .vf-corner.br { right: -9px; bottom: -9px; border-left: 0; border-top: 0; }
.vf-rec { position: absolute; left: 8px; top: 7px; display: none; align-items: center; gap: 5px; font-size: 10.5px; font-stretch: 85%; color: #ffd6cf; text-shadow: 0 1px 3px #000; }
.vf-rec i { width: 7px; height: 7px; border-radius: 50%; background: var(--safelight); box-shadow: 0 0 6px var(--safelight); animation: pulse 1s infinite; }
body.rolling .vf-rec { display: flex; }
.vf-tools { display: flex; gap: 6px; align-items: center; padding: 6px; border-radius: 9px; background: var(--plate); border: 1px solid var(--line); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
body.expanded #vf { position: fixed; z-index: 25; left: 50%; top: 84px; transform: translateX(-50%); --vh: calc(100vh - var(--console-h) - 130px); width: min(calc(var(--vh) * 1.3333), calc(100vw - 80px)) !important; height: auto !important; aspect-ratio: 4 / 3; box-shadow: 0 0 0 1px var(--line-strong), 0 0 0 9999px rgba(0,0,0,.78); }
body[data-era="1935"].expanded #vf { aspect-ratio: 1.375; width: min(calc(var(--vh) * 1.375), calc(100vw - 80px)) !important; }
body[data-era="1935"] #vf { height: 177px; }

.optics { display: flex; flex-direction: column; gap: 7px; min-width: 0; justify-content: center; }
.scale-row, .chips-row { display: grid; grid-template-columns: 74px 1fr 62px; align-items: center; gap: 10px; }
.chips-row { grid-template-columns: 74px 1fr; }
.lbl { display: flex; flex-direction: column; gap: 3px; align-items: flex-start; }
.lbl span { font-size: 12px; color: var(--glass); font-stretch: 88%; }
.scale-row output { font: 500 15px/1 var(--display); font-variant-numeric: lining-nums tabular-nums; color: #ece8dc; text-align: right; white-space: nowrap; }
.barrel { position: relative; height: 30px; border-radius: 5px; overflow: hidden; cursor: ew-resize; touch-action: none;
  background: linear-gradient(#060606, #1d1c1a 22%, #2e2c28 48%, #1a1917 76%, #050505); box-shadow: inset 0 0 0 1px rgba(0,0,0,.6), 0 0 0 1px var(--line); }
.barrel canvas { position: absolute; top: 0; left: 0; height: 100%; }
.barrel::before, .barrel::after { content: ''; position: absolute; top: 0; bottom: 0; width: 34%; z-index: 1; pointer-events: none; }
.barrel::before { left: 0; background: linear-gradient(90deg, rgba(5,5,5,.92), transparent); }
.barrel::after { right: 0; background: linear-gradient(-90deg, rgba(5,5,5,.92), transparent); }
.barrel .index { position: absolute; left: 50%; top: 0; width: 0; height: 0; margin-left: -5px; border: 5px solid transparent; border-top: 6px solid var(--amber); z-index: 2; }
.barrel .index::after { content: ''; position: absolute; left: -0.5px; top: 0; width: 1px; height: 24px; background: rgba(227,162,59,.55); }
.barrel.fixed { cursor: default; opacity: .55; }
.dolly-row { display: none; }
body[data-era="1935"] .dolly-row { display: grid; }

.instruments { display: flex; flex-direction: column; gap: 6px; }
.meter { position: relative; height: 92px; }
.meter svg { width: 168px; height: 99px; display: block; margin: 0 auto; }
.meter .arc { fill: none; stroke: rgba(207,203,191,.35); stroke-width: 1.2; }
.meter .arc-ok { fill: none; stroke: var(--amber); stroke-width: 3; }
.meter #meterTicks line { stroke: rgba(207,203,191,.5); stroke-width: 1; }
.meter #meterTicks text { fill: var(--silver-dim); font: 400 10px var(--display); text-anchor: middle; }
.meter #needle { stroke: #f1ecdf; stroke-width: 1.6; stroke-linecap: round; transition: transform .12s linear; transform-origin: 100px 104px; }
.meter circle { fill: var(--brass); }
.meter-read { position: absolute; left: 0; right: 0; bottom: -2px; text-align: center; font-size: 11px; color: var(--glass); font-stretch: 85%; }
.meter-read output { font: 500 16px/1 var(--display); font-variant-numeric: lining-nums tabular-nums; color: #ece8dc; margin-right: 4px; }
.meter.under .meter-read output, .meter.over .meter-read output { color: var(--amber); }
.readouts { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 12px; margin-top: 4px; }
.readouts div { display: flex; flex-direction: column; }
.readouts span { font-size: 10.5px; color: var(--glass); font-stretch: 82%; }
.readouts output { font: 500 14px/1.15 var(--display); font-variant-numeric: lining-nums tabular-nums; color: #e9e5d8; white-space: nowrap; }
#btnReload { align-self: flex-start; margin-top: 2px; }

.crank-wrap { display: flex; flex-direction: column; align-items: center; gap: 6px; position: relative; }
#crank { position: relative; width: 108px; height: 108px; touch-action: none; cursor: grab; border-radius: 50%; margin-top: -2px; }
#crank:active { cursor: grabbing; }
#crank svg { width: 100%; height: 100%; display: block; filter: drop-shadow(0 6px 14px rgba(0,0,0,.6)); }
#crank .arm { stroke: #8f7442; stroke-width: 9; stroke-linecap: round; }
#crank .knob { fill: #2a1a10; stroke: #c9a567; stroke-width: 3; }
#crank .hub { fill: #c9a567; }
#crankTicks line { stroke: #6b6253; stroke-width: 2.4; stroke-linecap: round; transition: stroke .08s; }
#crankTicks line.hot { stroke: var(--amber); }
#crankTicks text { fill: #7c7466; font: italic 400 11px var(--display); text-anchor: middle; }
.crank-read { display: flex; align-items: baseline; gap: 6px; margin-top: -2px; }
.crank-read output { font: 400 22px/1 var(--display); font-variant-numeric: lining-nums tabular-nums; color: #f1ecdf; min-width: 1.6em; text-align: right; }
.crank-read span { font-size: 11px; color: var(--glass); font-stretch: 82%; }
body[data-era="1935"] #crank { cursor: default; }
body[data-era="1935"] #crankArm { opacity: 0; }
.crank-tools { display: grid; grid-template-columns: auto 1fr 20px; align-items: center; gap: 8px; width: 100%; }
.crank-tools output { font: 500 13px/1 var(--display); font-variant-numeric: lining-nums tabular-nums; text-align: right; }
.toggle { display: flex; align-items: center; gap: 7px; font-size: 12px; color: var(--silver-dim); cursor: pointer; }
.toggle input { accent-color: var(--amber); margin: 0; }
body[data-era="1935"] .crank-tools { visibility: hidden; }
.roll { display: flex; align-items: center; justify-content: center; gap: 7px; width: 100%; height: 36px; border-radius: 18px; border: 1px solid rgba(214,58,38,.6); background: linear-gradient(#2b1410, #1b0d0a); color: #f6e9e4; font-size: 14px; font-weight: 600; font-stretch: 95%; white-space: nowrap; box-shadow: 0 6px 18px rgba(194,50,31,.16), inset 0 1px 0 rgba(255,255,255,.05); transition: background .2s, border-color .2s, box-shadow .2s; }
.roll .dot { flex: none; width: 11px; height: 11px; border-radius: 50%; background: #e1412b; box-shadow: 0 0 9px rgba(225,65,43,.75), inset 0 0 0 1px rgba(255,255,255,.2); }
.roll:hover { border-color: #e1412b; background: linear-gradient(#3b1812, #24100c); box-shadow: 0 6px 22px rgba(194,50,31,.3), inset 0 1px 0 rgba(255,255,255,.06); }
.roll kbd { color: #d9b7ae; border-color: rgba(225,65,43,.35); }
.roll .rt, .roll .st { display: none; }
.roll .rt { font-variant-numeric: tabular-nums; font-weight: 500; }
.roll .st { font-weight: 500; opacity: .85; }
.roll[aria-pressed="true"] { background: var(--safelight); border-color: #e1412b; color: #fff; font-size: 13px; animation: recGlow 1.6s ease-in-out infinite; }
.roll[aria-pressed="true"] .dot { background: #fff; box-shadow: 0 0 6px rgba(255,255,255,.8); animation: pulse 1s infinite; }
.roll[aria-pressed="true"] .rt, .roll[aria-pressed="true"] .st { display: inline; }
.roll[aria-pressed="true"] kbd { display: none; }
@keyframes recGlow { 50% { box-shadow: 0 0 0 4px rgba(194,50,31,.22), 0 6px 24px rgba(194,50,31,.45); } }
@keyframes pulse { 50% { opacity: .35; } }

/* ---------- x-ray ---------- */
.parts { display: flex; flex-direction: column; gap: 2px; margin: 10px 0 6px; }
.parts button { text-align: left; padding: 7px 8px; border-radius: 6px; color: var(--silver-dim); font-size: 13px; display: flex; gap: 10px; align-items: baseline; }
.parts button i { font: italic 400 12px/1 var(--display); color: var(--brass); width: 14px; font-style: italic; }
.parts button:hover, .parts button.on { background: rgba(207,203,191,.07); color: #ece8dc; }
#labels { position: fixed; inset: 0; pointer-events: none; z-index: 12; }
.lab { position: absolute; left: 0; top: 0; pointer-events: auto; cursor: pointer; display: flex; align-items: center; gap: 0; transform-origin: 0 50%; }
.lab .pt { width: 9px; height: 9px; margin: -4.5px 0 0 -4.5px; border-radius: 50%; border: 1.5px solid #f2ecdc; background: rgba(227,162,59,.4); box-shadow: 0 0 10px rgba(227,162,59,.6); position: absolute; left: 0; top: 0; }
.lab .ln { position: absolute; left: 0; top: 0; height: 1px; background: rgba(242,236,220,.45); transform-origin: 0 0; }
.lab .tx { position: absolute; white-space: nowrap; font-size: 12px; color: #ece8dc; padding: 3px 7px; border-radius: 4px; background: rgba(5,5,6,.66); border: 1px solid var(--line); transform: translateY(-50%); }
.lab.on .tx { border-color: var(--amber); color: #fff; }
.lab.on .pt { background: var(--amber); }
#info { position: fixed; right: var(--gap); top: 82px; width: 330px; z-index: 18; padding: 18px 20px 20px; border-radius: 12px; display: none; }
#info h4 { font: italic 400 22px/1.15 var(--display); color: #efe9db; padding-right: 26px; }
#info p { margin-top: 10px; font-size: 13.5px; line-height: 1.55; color: var(--silver); font-stretch: 100%; }
#info .close { position: absolute; right: 8px; top: 8px; }

/* ---------- screening ---------- */
#screenUI .sc-left { position: fixed; left: var(--gap); top: 78px; width: 270px; max-height: calc(100vh - 210px); overflow: auto; border-radius: 12px; padding: 14px 14px; z-index: 15; }
#screenUI h3 { font: italic 400 20px/1 var(--display); color: #e7e3d6; margin-bottom: 10px; }
.take { width: 100%; text-align: left; display: grid; grid-template-columns: 64px 1fr; gap: 10px; padding: 8px; border-radius: 8px; align-items: center; border: 1px solid transparent; }
.take:hover { background: rgba(207,203,191,.05); }
.take.on { border-color: rgba(227,162,59,.5); background: rgba(227,162,59,.07); }
.take img { width: 64px; height: 48px; object-fit: cover; border-radius: 2px; background: #111; box-shadow: 0 0 0 1px var(--line); }
.take b { display: block; font: italic 400 16px/1.2 var(--display); color: #ece8dc; }
.take span { font-size: 11.5px; color: var(--silver-dim); font-stretch: 88%; line-height: 1.4; display: block; }
#noTakes p { font-size: 13px; color: var(--silver-dim); line-height: 1.5; }
#noTakes .btn-line, #binEmpty .btn-line { width: 100%; }
#noTakes .btn-line + .btn-line { margin-top: 6px; }
#screenUI .sc-right { position: fixed; right: var(--gap); top: 78px; width: 270px; max-height: calc(100vh - 210px); overflow: auto; border-radius: 12px; padding: 4px 16px 16px; z-index: 15; }
#screenUI .sc-bottom { position: fixed; left: var(--gap); right: var(--gap); bottom: var(--gap); height: 96px; border-radius: 14px; z-index: 15; display: grid; grid-template-columns: 56px 1fr 220px; gap: 16px; align-items: center; padding: 0 16px; }
.play { width: 52px; height: 52px; border-radius: 50%; background: var(--silver); color: #111; display: grid; place-items: center; }
.play svg { width: 22px; height: 22px; fill: currentColor; }
.play .s { display: none; } .play[aria-pressed="true"] .s { display: block; } .play[aria-pressed="true"] .p { display: none; }
.play:disabled { background: #2a2a2a; color: #555; }
.strip-wrap { position: relative; height: 70px; overflow: hidden; border-radius: 3px; background: #120d08; cursor: pointer;
  background-image: repeating-linear-gradient(90deg, transparent 0 7px, #000 7px 14px), repeating-linear-gradient(90deg, transparent 0 7px, #000 7px 14px);
  background-size: 100% 6px; background-position: 0 3px, 0 calc(100% - 3px); background-repeat: no-repeat; }
#strip { position: absolute; left: 0; top: 13px; bottom: 13px; right: 0; display: flex; gap: 3px; }
#strip img { height: 100%; width: auto; flex: 0 0 auto; opacity: .9; filter: sepia(.25); }
#playhead { position: absolute; top: 0; bottom: 0; width: 2px; margin-left: -1px; background: var(--amber); box-shadow: 0 0 8px var(--amber); left: 0; }
.sc-meta { font-size: 12px; color: var(--silver-dim); line-height: 1.5; font-stretch: 88%; }
.sc-meta b { display: block; font: 500 17px/1.2 var(--display); font-variant-numeric: lining-nums tabular-nums; color: #ece8dc; }
#flat { position: fixed; inset: 0; z-index: 5; background: #000; align-items: center; justify-content: center; padding: 80px 300px 130px; }
#flat canvas { max-width: 100%; max-height: 100%; width: auto !important; height: auto !important; display: block; }
#btnExport { width: 100%; margin-top: 14px; }
#btnExport.busy { color: var(--amber); border-color: rgba(227,162,59,.5); }

/* ---------- cutting room ---------- */
#cutUI { position: fixed; inset: 0; z-index: 14; padding: 78px var(--gap) var(--gap); grid-template-columns: 264px minmax(0, 1fr) 286px; grid-template-rows: minmax(0, 1fr) 172px; gap: 12px;
  background: radial-gradient(ellipse 60% 55% at 50% 42%, #1a1712 0%, #0b0a09 55%, #060606 100%); }
#cutUI .plate { border-radius: 12px; padding: 14px; overflow: auto; scrollbar-width: thin; scrollbar-color: #333 transparent; }
#cutUI h3 { font: italic 400 20px/1 var(--display); color: #e7e3d6; margin-bottom: 10px; }
.cut-bin { grid-column: 1; grid-row: 1; display: flex; flex-direction: column; }
#bin { display: flex; flex-direction: column; gap: 6px; }
.bin-row { display: grid; grid-template-columns: 58px 1fr auto; gap: 9px; align-items: center; padding: 6px; border-radius: 8px; border: 1px solid transparent; }
.bin-row:hover { background: rgba(207,203,191,.05); }
.bin-row img { width: 58px; height: 44px; object-fit: cover; border-radius: 2px; background: #111; box-shadow: 0 0 0 1px var(--line); }
.bin-row b { display: block; font: italic 400 15px/1.2 var(--display); color: #ece8dc; }
.bin-row span { display: block; font-size: 11px; color: var(--silver-dim); font-stretch: 86%; line-height: 1.35; }
.bin-actions { margin-top: auto; padding-top: 10px; display: grid; gap: 0; }
.bin-actions .btn-line { width: 100%; }
.cut-viewer { grid-column: 2; grid-row: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; min-height: 0; }
#viewer { position: relative; width: min(100%, calc((100vh - 400px) * 1.3333)); aspect-ratio: 4 / 3; background: #000; border-radius: 4px; box-shadow: 0 0 0 1px var(--line-strong), 0 0 0 7px #0d0c0b, 0 0 0 8px var(--line), 0 24px 70px rgba(0,0,0,.7), 0 0 120px rgba(227,162,59,.06); overflow: hidden; }
#viewer canvas { width: 100% !important; height: 100% !important; display: block; }
.cut-transport { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; justify-content: center; }
.play.small { width: 42px; height: 42px; }
.play.small svg { width: 18px; height: 18px; }
.tc { min-width: 120px; text-align: center; font-size: 11px; color: var(--glass); font-stretch: 86%; line-height: 1.3; }
.tc b { display: block; font: 500 17px/1.1 var(--display); font-variant-numeric: lining-nums tabular-nums; color: #ece8dc; }
#btnScreenReel { margin-top: 0; }
.cut-insp { grid-column: 3; grid-row: 1; }
#insp .group:first-of-type { border-top: 1px solid var(--line); padding-top: 12px; }
.trim { display: grid; grid-template-columns: 38px 1fr 42px; align-items: center; gap: 8px; font-size: 12px; color: var(--silver-dim); }
.trim output { font: 500 13px/1 var(--display); font-variant-numeric: lining-nums tabular-nums; text-align: right; color: var(--silver); }
#insp textarea { width: 100%; resize: vertical; background: #0a0a0a; color: #ece8dc; border: 1px solid var(--line-strong); border-radius: 6px; padding: 8px 10px; font: italic 400 16px/1.4 var(--display); }
#insp textarea:focus { outline: 2px solid var(--amber); outline-offset: 1px; }
.insp-actions { display: flex; flex-wrap: wrap; gap: 6px; border-top: 1px solid var(--line); padding-top: 12px; margin-top: 4px; }
.btn-tiny.danger:hover { color: #ffb4a8; border-color: rgba(194,50,31,.6); }
.cut-timeline { grid-column: 1 / -1; grid-row: 2; display: flex; flex-direction: column; gap: 8px; overflow: hidden !important; }
.reel-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; }
.reel-head .note { margin: 0; }
.reel-wrap { position: relative; flex: 1; min-height: 0; border-radius: 3px; background: #120d08;
  background-image: repeating-linear-gradient(90deg, transparent 0 7px, #000 7px 14px), repeating-linear-gradient(90deg, transparent 0 7px, #000 7px 14px);
  background-size: 100% 6px; background-position: 0 3px, 0 calc(100% - 3px); background-repeat: no-repeat; }
#reel { position: absolute; inset: 13px 0; display: flex; gap: 0; overflow-x: auto; overflow-y: hidden; padding: 0 8px; scrollbar-width: thin; scrollbar-color: #3a2a18 transparent; }
#reelEmpty { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 13px; color: var(--glass); pointer-events: none; }
.clip { position: relative; flex: 0 0 auto; height: 100%; overflow: hidden; cursor: grab; background: #1b140c; border-left: 2px solid #c9b48a; outline: none; }
.clip:first-child { border-left: 0; }
.clip.title { background: #0d0d0d; }
.clip-strip { position: absolute; inset: 0; display: flex; gap: 2px; padding: 0 1px; }
.clip-strip img { height: 100%; flex: 1 1 0; min-width: 0; object-fit: cover; opacity: .82; filter: sepia(.2); }
.clip-lab { position: absolute; left: 0; right: 0; bottom: 0; padding: 14px 7px 4px; background: linear-gradient(transparent, rgba(0,0,0,.85)); display: flex; align-items: baseline; gap: 6px; white-space: nowrap; }
.clip-lab b { font: italic 400 13px/1 var(--display); color: #f0ebde; }
.clip-lab span { font-size: 10.5px; color: var(--silver-dim); font-stretch: 84%; }
.clip-lab .dot { width: 8px; height: 8px; border-radius: 50%; margin-left: auto; box-shadow: 0 0 0 1px rgba(0,0,0,.5); }
.clip.on { box-shadow: inset 0 0 0 2px var(--amber); }
.clip.on .clip-strip img { opacity: 1; }
.clip:focus-visible { box-shadow: inset 0 0 0 2px var(--amber); }
.clip.dragging { opacity: .4; }
.clip.drop-l { box-shadow: inset 3px 0 0 var(--amber); }
.clip.drop-r { box-shadow: inset -3px 0 0 var(--amber); }
#reelHead { position: absolute; left: 8px; top: 0; bottom: 0; width: 2px; margin-left: -1px; background: var(--amber); box-shadow: 0 0 8px var(--amber); pointer-events: none; }
@media (max-width: 1100px) { #cutUI { grid-template-columns: 220px minmax(0,1fr); grid-template-rows: minmax(0,1fr) auto 160px; } .cut-insp { grid-column: 1 / -1; grid-row: 2; max-height: 34vh; } .cut-timeline { grid-row: 3; } }
@media (max-width: 860px) { #cutUI { padding-top: 124px; grid-template-columns: 1fr; grid-template-rows: auto auto auto 150px; overflow: auto; } .cut-bin, .cut-viewer, .cut-insp, .cut-timeline { grid-column: 1; } .cut-bin { grid-row: 2; max-height: 30vh; } .cut-viewer { grid-row: 1; } .cut-insp { grid-row: 3; } .cut-timeline { grid-row: 4; } #viewer { width: 100%; } }

/* ---------- toast & hint ---------- */
#toast { position: fixed; left: 50%; bottom: calc(var(--console-h) + 30px); transform: translate(-50%, 8px); z-index: 30; padding: 9px 14px; border-radius: 8px; background: rgba(17,16,15,.92); border: 1px solid var(--line-strong); font-size: 13px; color: #ece8dc; opacity: 0; transition: opacity .25s, transform .25s; pointer-events: none; max-width: 80vw; text-align: center; }
#toast.show { opacity: 1; transform: translate(-50%, 0); }
body[data-mode="screen"] #toast, body[data-mode="xray"] #toast { bottom: 130px; }
body[data-mode="cut"] #toast { bottom: 206px; }
.take.reel b { color: var(--amber); }
.hint { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(var(--console-h) + 26px); font-size: 12px; color: var(--glass); z-index: 10; pointer-events: none; transition: opacity 1.2s; text-shadow: 0 1px 6px #000; }
.hint.gone { opacity: 0; }

/* ---------- small screens ---------- */
@media (max-width: 1180px) {
  #console { grid-template-columns: auto minmax(240px, 1fr) 214px; }
  .instruments { display: none; }
}
@media (max-width: 860px) {
  :root { --console-h: 46vh; --gap: 8px; }
  #top { height: auto; padding: 8px 10px; flex-wrap: wrap; gap: 6px; }
  .wordmark { font-size: 19px; min-width: 0; }
  .eras { order: 3; width: 100%; justify-content: center; }
  .era { width: 31%; }
  .modes { min-width: 0; }
  .mode { padding: 0 7px; font-size: 12.5px; }
  .drawer { top: 124px; width: calc(100vw - 16px); max-height: 34vh; }
  .drawer.collapsed { width: auto; }
  #console { height: var(--console-h); overflow-y: auto; overscroll-behavior: contain; grid-template-columns: 1fr 1fr; grid-auto-rows: min-content; gap: 8px; padding-bottom: 8px; }
  .vf-wrap { grid-column: 1 / -1; align-items: center; padding-top: 4px; }
  #vf { width: 240px; height: 180px; }
  body[data-era="1935"] #vf { height: 175px; }
  .optics { grid-column: 1 / -1; }
  .scale-row { grid-template-columns: 62px 1fr 54px; }
  .chips-row { grid-template-columns: 62px 1fr; }
  .instruments { display: flex; }
  .readouts { grid-template-columns: 1fr; }
  #crank { width: 104px; height: 104px; }
  .hint { display: none !important; }
  #screenUI .sc-left, #screenUI .sc-right { top: auto; bottom: 112px; width: calc(50vw - 12px); max-height: 32vh; }
  #screenUI .sc-right { right: 8px; }
  #screenUI .sc-bottom { grid-template-columns: 56px 1fr; height: 84px; }
  .sc-meta { display: none; }
  #flat { padding: 124px 8px 46vh; }
  .intertitle { padding: 40px 26px 34px; }
  #info { left: 8px; right: 8px; width: auto; top: auto; bottom: 8px; }
  #xpanel { max-height: 30vh; }
  #toast { bottom: calc(var(--console-h) + 28px); }
  body.expanded #vf { top: 130px; --vh: calc(100vh - var(--console-h) - 150px); }
}
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}

/* ---------- the lab ---------- */
.insp-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin-bottom: 4px; }
.insp-head h3 { margin-bottom: 6px !important; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.insp-tabs button:disabled { opacity: .4; cursor: default; }
.lab-sum b { font: italic 400 14px/1.2 var(--display); color: #ece8dc; }
.lab-sum + .btn-tiny { margin-top: 8px; }
.lab-card { display: flex; flex-direction: column; }
.lab-sec { padding: 11px 0 12px; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 7px; }
.lab-sec:first-child { border-top: 0; padding-top: 2px; }
.lab-sec h5 { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; font-size: 11.5px; font-weight: 500; color: var(--glass); font-stretch: 88%; letter-spacing: .02em; margin-top: 2px; }
.lab-sec h5 em { font: italic 400 14px/1 var(--display); color: #e9e4d6; letter-spacing: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lab-sec .note { margin-top: 0; }
.lab-looks { gap: 5px; }
.lab-looks .chip { height: 26px; padding: 0 8px; font-size: 12px; }
.swatches { display: flex; flex-wrap: wrap; gap: 6px; }
.sw { width: 22px; height: 22px; border-radius: 50%; padding: 0; position: relative; background: var(--c, #888); box-shadow: inset 0 0 0 1px rgba(0,0,0,.45), 0 0 0 1px var(--line-strong); transition: box-shadow .15s, transform .15s; }
.sw:hover { transform: scale(1.08); }
.sw.on { box-shadow: inset 0 0 0 1px rgba(0,0,0,.45), 0 0 0 2px #0e0e0f, 0 0 0 3.5px var(--amber); }
.sw.none { background: #141414; }
.sw.none::after { content: ''; position: absolute; left: 4px; right: 4px; top: 50%; height: 1.5px; margin-top: -0.75px; background: var(--silver-dim); transform: rotate(-45deg); border-radius: 1px; }
.sw.cycle { background: conic-gradient(#e0533b, #e8c64a, #5cc27c, #4f7fd6, #a865d8, #e0533b); }
.swatches.small { gap: 3px; flex-wrap: nowrap; }
.swatches.small .sw { width: 17px; height: 17px; flex: 0 0 17px; }
.swatches.small .sw.none::after { left: 3px; right: 3px; }
.dye-rows { display: flex; flex-direction: column; gap: 5px; margin-top: 2px; }
.dye-row { display: grid; grid-template-columns: 54px 1fr; align-items: center; gap: 6px; }
.dye-row span { font-size: 11.5px; color: var(--silver-dim); font-stretch: 86%; }
.lab-stencil { display: flex; flex-direction: column; gap: 8px; }
.lab-card .seg { align-self: flex-start; }
.lab-card .seg button { padding: 0 8px; }
.lab-card .row-slider.small { grid-template-columns: 86px 1fr 44px; }
.lab-card .row-slider.small span { font-size: 11.5px; font-stretch: 88%; }
.lab-colour-off { padding: 10px 0; border-top: 1px solid var(--line); }
.lab-actions { display: flex; flex-wrap: wrap; gap: 6px; border-top: 1px solid var(--line); padding-top: 12px; }
.lab-group { margin-top: 14px; }
.lab-head { font: italic 400 20px/1.1 var(--display) !important; color: #e7e3d6; margin: 0 0 8px !important; }
#screenLab .btn-line { width: 100%; }
.clip-lab em { font: italic 400 11px/1 var(--display); color: var(--amber); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; flex: 0 1 auto; }
.clip-lab span { flex: 0 0 auto; }
.btn-line.stall { width: 100%; margin-top: 0; display: flex; align-items: center; justify-content: center; gap: 4px; }
.btn-line.stall:hover { border-color: rgba(194,50,31,.7); color: #ffd6cf; }
.btn-line.stall.burning { background: rgba(194,50,31,.22); border-color: var(--safelight); color: #fff; }

/* ================= the museum layer ================= */
/* 1 · captions */
#mcap { position: fixed; left: 0; top: 0; z-index: 62; max-width: 330px; padding: 9px 12px 9px; border-radius: 8px; background: rgba(13,12,11,.96); border: 1px solid var(--line-strong); box-shadow: 0 12px 30px rgba(0,0,0,.55); opacity: 0; pointer-events: none; transition: opacity .18s; cursor: pointer; --ax: 50%; }
#mcap.show { opacity: 1; pointer-events: auto; }
#mcap::after { content: ''; position: absolute; left: var(--ax); bottom: -6px; width: 10px; height: 10px; margin-left: -5px; background: rgba(13,12,11,.96); border-right: 1px solid var(--line-strong); border-bottom: 1px solid var(--line-strong); transform: rotate(45deg); }
#mcap.below::after { bottom: auto; top: -6px; transform: rotate(225deg); }
#mcap b { display: block; font: italic 400 15px/1.2 var(--display); color: #efe9db; }
#mcap span { display: block; margin-top: 3px; font-size: 12.5px; line-height: 1.45; color: var(--silver-dim); font-stretch: 96%; }
#mcap .mcap-more { margin-top: 6px; padding: 0; font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--brass-hi); font-stretch: 90%; }
#mcap .mcap-more i { font-style: normal; }
#mcap:hover .mcap-more { color: var(--amber); }
[data-k] { cursor: help; }
button[data-k], .chip[data-k], .sw[data-k] { cursor: pointer; }

/* 2 · museum labels */
#mlabel { position: fixed; right: var(--gap); top: 80px; z-index: 55; width: 360px; max-height: calc(100vh - 100px); overflow: auto; scrollbar-width: thin; padding: 22px 24px 20px; border-radius: 4px;
  background: #0d0c0b; border: 1px solid var(--line-strong); box-shadow: 0 0 0 5px #0d0c0b, 0 0 0 6px var(--line), 0 30px 80px rgba(0,0,0,.7);
  opacity: 0; transform: translateX(16px); pointer-events: none; transition: opacity .25s, transform .25s; }
#mlabel.show { opacity: 1; transform: none; pointer-events: auto; }
.ml-close, .ms-close, .mf-close, .mt-close { position: absolute; right: 10px; top: 8px; width: 34px; height: 34px; border-radius: 50%; font: 300 24px/1 var(--ui); color: var(--silver-dim); }
.ml-close:hover, .ms-close:hover, .mf-close:hover, .mt-close:hover { color: #fff; background: rgba(255,255,255,.06); }
.ml-no { font-size: 10.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--brass-hi); font-stretch: 90%; padding-bottom: 10px; border-bottom: 3px double var(--line-strong); margin-right: 28px; }
#mlTitle { margin-top: 14px; font: italic 400 27px/1.12 var(--display); color: #f1ebdd; }
.ml-cap { margin-top: 8px; font: 400 16px/1.42 var(--display); color: var(--silver); }
.ml-meta { display: grid; grid-template-columns: 64px 1fr; gap: 5px 12px; margin-top: 16px; padding: 12px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.ml-meta dt { font-size: 10.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--glass); font-stretch: 88%; padding-top: 2px; }
.ml-meta dd { margin: 0; font-size: 13px; color: var(--silver); line-height: 1.4; }
.ml-h { margin-top: 16px; font-size: 10.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--glass); font-weight: 500; font-stretch: 88%; }
.ml-how { margin-top: 6px; font-size: 14px; line-height: 1.62; color: #ddd8ca; font-stretch: 100%; }
.ml-film:empty { display: none; }
.ml-play { display: grid; grid-template-columns: 38px 1fr; gap: 12px; align-items: center; width: 100%; margin-top: 16px; padding: 10px; text-align: left; border-radius: 6px; border: 1px solid var(--line-strong); background: linear-gradient(90deg, rgba(227,162,59,.08), transparent); }
.ml-play:hover { border-color: var(--amber); }
.ml-play i { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 50%; background: var(--silver); color: #111; font-style: normal; font-size: 13px; padding-left: 2px; }
.ml-play span { font-size: 12px; color: var(--silver-dim); line-height: 1.4; }
.ml-play b { display: block; font: italic 400 15px/1.25 var(--display); color: #efe9db; }
.ml-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.ml-actions .btn-line { margin-top: 0; }
.btn-line.primary { border-color: rgba(227,162,59,.6); color: #f4ecda; background: rgba(227,162,59,.1); }
.btn-line.primary:hover { background: rgba(227,162,59,.18); }
.btn-line i { font-style: normal; }

/* 3 · stories */
#mstory { position: fixed; inset: 0; z-index: 58; overflow: auto; background: rgba(5,5,6,.93); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); opacity: 0; pointer-events: none; transition: opacity .3s; }
#mstory.show { opacity: 1; pointer-events: auto; }
.ms-inner { position: relative; max-width: 680px; margin: 0 auto; padding: 96px 28px 90px; }
.ms-close { position: fixed; right: 22px; top: 76px; width: 44px; height: 44px; border: 1px solid var(--line-strong); }
.ms-kicker { font-size: 11px; letter-spacing: .16em; text-transform: uppercase; color: var(--brass-hi); font-stretch: 90%; }
#mstory h2 { margin: 10px 0 26px; font: 400 clamp(36px, 5vw, 54px)/1.04 var(--display); color: #f1ebdd; letter-spacing: -0.01em; }
#mstory article > p { margin-top: 16px; font-size: 16.5px; line-height: 1.72; color: #d9d4c6; font-stretch: 100%; }
#mstory article > p.ms-lede { font: 400 20px/1.6 var(--display); color: #ece6d6; }
#mstory article > p.ms-lede::first-letter { float: left; font: 400 64px/0.82 var(--display); color: var(--brass-hi); margin: 6px 10px 0 0; }
#mstory h5 { margin-top: 40px; padding-top: 16px; border-top: 1px solid var(--line); font-size: 10.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--glass); font-weight: 500; }
.ms-see { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.ms-see button { padding: 8px 12px; border-radius: 6px; border: 1px solid var(--line-strong); font: italic 400 14.5px/1.2 var(--display); color: var(--silver); }
.ms-see button:hover { border-color: var(--amber); color: #fff; }
.ms-film { margin: 30px 0 0; }

/* archive films */
#mfilm { position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; padding: 24px; background: rgba(0,0,0,.92); opacity: 0; pointer-events: none; transition: opacity .3s; }
#mfilm.show { opacity: 1; pointer-events: auto; }
.mf-inner { position: relative; width: min(1000px, 100%); }
.mf-close { right: -6px; top: -48px; border: 1px solid var(--line-strong); }
.mf-screen { position: relative; background: #000; box-shadow: 0 0 0 1px var(--line-strong), 0 0 0 8px #0b0a09, 0 0 0 9px var(--line), 0 30px 90px rgba(0,0,0,.8); }
.mf-screen video { display: block; width: 100%; max-height: 66vh; background: #000; }
.mf-err { position: absolute; left: 0; right: 0; bottom: 50%; text-align: center; color: var(--silver-dim); font-size: 13px; padding: 0 20px; }
.mf-meta { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; margin-top: 20px; }
.mf-meta h3 { margin-top: 6px; font: italic 400 28px/1.1 var(--display); color: #f1ebdd; }
.mf-note { margin-top: 6px; font-size: 14px; line-height: 1.5; color: var(--silver-dim); max-width: 560px; }
.mf-credit { margin-top: 8px; font-size: 11.5px; color: var(--glass); }
.mf-actions { display: flex; flex-direction: column; gap: 8px; flex: 0 0 auto; }
.mf-actions .btn-line { margin-top: 0; display: inline-flex; align-items: center; justify-content: center; text-decoration: none; }

/* the timeline rail */
#mtimeline { position: fixed; inset: 0; z-index: 50; display: flex; flex-direction: column; background: radial-gradient(ellipse 80% 70% at 50% 40%, #15120e 0%, #070707 70%); opacity: 0; pointer-events: none; transition: opacity .3s; }
#mtimeline.show { opacity: 1; pointer-events: auto; }
.mt-head { position: relative; display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; padding: 22px 28px 12px; border-bottom: 1px solid var(--line); }
.mt-head h2 { margin-top: 4px; font: 400 40px/1 var(--display); font-variant-numeric: lining-nums; color: #efe9db; }
.mt-head h2 span { color: var(--brass); }
.mt-legend { display: flex; gap: 18px; margin-right: 56px; font-size: 12px; color: var(--silver-dim); }
.mt-legend .lg::before { content: ''; display: inline-block; width: 10px; height: 10px; margin-right: 7px; border-radius: 2px; vertical-align: -1px; }
.lg.inv::before { background: var(--brass); } .lg.film::before { background: #e9e2d0; } .lg.ppl::before { background: #7fa8a0; }
.mt-close { top: 18px; right: 18px; border: 1px solid var(--line-strong); }
.mt-rail { flex: 1; min-height: 0; overflow: auto; cursor: grab; scrollbar-width: thin; scrollbar-color: #3a2a18 transparent; outline: none; }
.mt-rail.dragging { cursor: grabbing; }
.mt-rail.dragging .mt-card { pointer-events: none; }
.mt-track { position: relative; }
.mt-lane { position: absolute; left: 0; right: 0; border-top: 1px dashed rgba(207,203,191,.06); }
.mt-lane span { position: sticky; z-index: 3; left: 16px; display: inline-block; margin-top: 4px; padding: 1px 6px 1px 0; background: #0b0a09; font-size: 10px; letter-spacing: .14em; text-transform: uppercase; color: rgba(166,162,150,.55); font-stretch: 88%; }
.mt-axis { position: absolute; left: 0; right: 0; height: 26px; background: #120d08; border-top: 1px solid #2a2016; border-bottom: 1px solid #2a2016;
  background-image: repeating-linear-gradient(90deg, transparent 0 8px, #050403 8px 14px), repeating-linear-gradient(90deg, transparent 0 8px, #050403 8px 14px);
  background-size: 100% 4px; background-position: 0 2px, 0 calc(100% - 2px); background-repeat: no-repeat; }
.mt-tick { position: absolute; width: 1px; height: 26px; background: rgba(214,184,120,.18); }
.mt-tick.five { background: rgba(214,184,120,.45); }
.mt-year { position: absolute; transform: translateX(-50%); padding: 0 5px; background: #120d08; font: 500 14px/22px var(--display); font-variant-numeric: lining-nums; color: var(--brass-hi); }
.mt-stop { position: absolute; top: 0; width: 2px; margin-left: -1px; background: linear-gradient(rgba(214,184,120,.9), rgba(214,184,120,.15) 30%, rgba(214,184,120,.15) 80%, transparent); z-index: 1; }
.mt-stop .tx { position: absolute; left: 8px; top: 8px; width: 230px; padding: 8px 10px 9px; text-align: left; border-radius: 6px; border: 1px solid rgba(214,184,120,.6); background: rgba(30,24,16,.94); font-size: 11.5px; line-height: 1.4; color: var(--silver-dim); }
.mt-stop .tx b { display: block; font: italic 400 15px/1.2 var(--display); color: #f4ecda; }
.mt-stop .tx em { display: block; margin-top: 4px; font-style: normal; font-size: 10.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--amber); }
.mt-stop:hover .tx { border-color: var(--amber); }
.mt-card { position: absolute; z-index: 2; width: 186px; height: 64px; padding: 6px 9px 7px 10px; text-align: left; border-radius: 5px; background: rgba(16,15,13,.94); border: 1px solid var(--line); border-left: 3px solid var(--brass); transition: border-color .2s, transform .2s, background .2s; }
.mt-card.film { border-left-color: #e9e2d0; }
.mt-card.ppl { border-left-color: #7fa8a0; }
.mt-card:hover { border-color: var(--line-strong); background: rgba(24,22,19,.98); transform: translateY(-1px); }
.mt-card.on { border-color: var(--amber); box-shadow: 0 0 0 1px var(--amber), 0 8px 24px rgba(0,0,0,.5); }
.mt-card.pulse { animation: mtpulse 1.6s ease-out; }
@keyframes mtpulse { 0% { box-shadow: 0 0 0 0 rgba(227,162,59,.8); } 100% { box-shadow: 0 0 0 18px rgba(227,162,59,0); } }
.mt-pin { position: absolute; z-index: 1; width: 1px; background: rgba(207,203,191,.16); }
.mt-pin::after { content: ''; position: absolute; left: -2px; width: 5px; height: 5px; border-radius: 50%; background: var(--brass); }
.mt-pin.inv::after { bottom: -3px; } .mt-pin.film::after, .mt-pin.ppl::after { top: -3px; }
.mt-card .yr { display: block; font: 500 11px/1 var(--display); font-variant-numeric: lining-nums; color: var(--brass-hi); letter-spacing: .04em; }
.mt-card b { display: block; margin-top: 2px; font: italic 400 14px/1.15 var(--display); color: #efe9db; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding-right: 14px; }
.mt-card .cp { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; margin-top: 2px; font-size: 10.5px; line-height: 1.3; color: var(--silver-dim); font-stretch: 92%; }
.mt-card .pl { position: absolute; right: 8px; top: 7px; font-style: normal; font-size: 10px; color: var(--amber); }
.mt-decades { display: flex; justify-content: center; gap: 6px; padding: 10px 16px 16px; border-top: 1px solid var(--line); }
.mt-decades button { height: 30px; padding: 0 12px; border-radius: 15px; border: 1px solid var(--line-strong); font: 500 14px/1 var(--display); font-variant-numeric: lining-nums; color: var(--silver-dim); }
.mt-decades button:hover { color: #fff; border-color: var(--silver-dim); }
body.timeline-open #mlabel { top: 104px; }
#btnTimeline { margin-left: 2px; }
#btnTimeline svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.6; }

@media (max-width: 860px) {
  #mlabel { left: 8px; right: 8px; width: auto; top: auto; bottom: 8px; max-height: 62vh; transform: translateY(16px); }
  .mt-head { padding: 14px 16px 10px; } .mt-head h2 { font-size: 30px; } .mt-legend { display: none; }
  .ms-inner { padding: 80px 18px 60px; } .ms-close { top: 14px; right: 12px; }
  .mf-meta { flex-direction: column; }
}
.mode-tl { height: 34px; padding: 0 11px 0 9px; display: inline-flex; align-items: center; gap: 6px; color: var(--silver-dim); font-size: 13.5px; font-stretch: 96%; border: 1px solid var(--line); border-radius: 17px; margin-left: 6px; }
.mode-tl:hover { color: var(--silver); border-color: var(--line-strong); }
.mode-tl svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.5; }
.mode-tl svg circle { fill: currentColor; stroke: none; }
body.timeline-open .mode-tl:not(.mode-tr) { color: var(--amber); border-color: rgba(227,162,59,.5); }
.it-actions { flex-wrap: wrap; }
@media (max-width: 860px) { .mode-tl { padding: 0 8px; font-size: 0; gap: 0; } .mode-tl svg { width: 20px; height: 20px; } }

/* ---------- first-take coaching ---------- */
.mode .badge { position: absolute; top: 1px; right: -7px; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 8px; background: var(--amber); color: #1a1208; font: 700 10px/16px var(--ui); text-align: center; font-variant-numeric: tabular-nums; opacity: 0; transform: scale(.4); transition: opacity .2s, transform .25s; pointer-events: none; }
.mode .badge.show { opacity: 1; transform: none; }
.mode .badge.pop { animation: badgePop .5s ease-out; }
@keyframes badgePop { 0% { transform: scale(.4); } 60% { transform: scale(1.25); } 100% { transform: none; } }
#coach { position: fixed; left: 0; top: 0; z-index: 45; width: 300px; max-width: calc(100vw - 20px); padding: 13px 16px 14px; border-radius: 10px; background: #15120e; border: 1px solid rgba(227,162,59,.55); box-shadow: 0 0 0 4px rgba(227,162,59,.07), 0 18px 44px rgba(0,0,0,.6); opacity: 0; visibility: hidden; transition: opacity .3s, visibility 0s .3s; --ax: 50%; }
#coach.show { opacity: 1; visibility: visible; transition: opacity .3s; }
#coach .co-arrow { position: absolute; left: var(--ax); width: 12px; height: 12px; margin-left: -6px; background: #15120e; border: 1px solid rgba(227,162,59,.55); transform: rotate(45deg); }
#coach[data-place="above"] .co-arrow { bottom: -7px; border-top: 0; border-left: 0; }
#coach[data-place="below"] .co-arrow { top: -7px; border-bottom: 0; border-right: 0; }
#coach .co-k, #helpCard .co-k { margin: 0 24px 4px 0; font-size: 10.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--amber); font-stretch: 90%; }
#coach h4 { margin: 0 24px 4px 0; font: italic 400 19px/1.2 var(--display); color: #f1ecdf; }
#coach .co-t { margin: 0; font-size: 13px; line-height: 1.5; color: var(--silver); }
#coach .co-act:empty { display: none; }
#coach .co-go { margin-top: 11px; height: 32px; padding: 0 14px; border-radius: 16px; background: var(--amber); color: #1a1208; font-weight: 600; font-size: 13px; }
#coach .co-go:hover { background: #f0b456; }
#coach .co-x, #helpCard .hc-x { position: absolute; right: 6px; top: 5px; width: 28px; height: 28px; border-radius: 50%; font: 300 20px/1 var(--ui); color: var(--silver-dim); }
#coach .co-x:hover, #helpCard .hc-x:hover { color: #fff; background: rgba(255,255,255,.06); }
.coach-target { position: relative; z-index: 3; animation: coachRing 1.8s ease-out infinite; }
.mode.coach-target { color: #ece8dc; border-radius: 8px; }
@keyframes coachRing { 0% { box-shadow: 0 0 0 0 rgba(227,162,59,.55); } 70% { box-shadow: 0 0 0 9px rgba(227,162,59,0); } 100% { box-shadow: 0 0 0 0 rgba(227,162,59,0); } }
#btnRoll.coach-target:not([aria-pressed="true"]) { animation: coachRing 1.8s ease-out infinite; }
body.coaching #help { opacity: 0; }
#helpCard { position: fixed; top: 58px; right: var(--gap); z-index: 57; width: 330px; max-width: calc(100vw - 16px); max-height: calc(100vh - 76px); overflow: auto; scrollbar-width: thin; padding: 16px 18px 18px; border-radius: 10px; background: #100e0c; border: 1px solid var(--line-strong); box-shadow: 0 24px 60px rgba(0,0,0,.65); opacity: 0; transform: translateY(-6px); pointer-events: none; transition: opacity .2s, transform .2s; }
#helpCard.show { opacity: 1; transform: none; pointer-events: auto; }
#helpCard .hc-flow { list-style: none; margin: 6px 0 4px; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; counter-reset: f; }
#helpCard .hc-flow li { counter-increment: f; padding: 8px 9px; border-radius: 7px; background: rgba(255,255,255,.03); border: 1px solid var(--line); font-size: 11.5px; line-height: 1.35; color: var(--silver-dim); }
#helpCard .hc-flow b { display: block; margin-bottom: 2px; font: italic 400 16px/1.1 var(--display); color: #f1ecdf; }
#helpCard .hc-flow b::before { content: counter(f) ' · '; font: 600 10px/1 var(--ui); color: var(--amber); vertical-align: 2px; }
#helpCard h5 { margin: 14px 0 6px; font-size: 10.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--glass); font-weight: 500; }
#helpCard ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 5px; }
#helpCard ul li { display: grid; grid-template-columns: 92px 1fr; align-items: center; gap: 8px; font-size: 12.5px; color: var(--silver); }
#helpCard .hk { display: flex; gap: 3px; flex-wrap: wrap; }
#helpCard .hc-tips { width: 100%; margin-top: 16px; }
@media (max-width: 860px) {
  .roll[aria-pressed="true"] .t { display: none; }
  #coach { width: 270px; }
  .mode .badge { top: -1px; right: -6px; }
}
#helpCard .hk kbd { margin-left: 0; }

/* ---------- Watch: your takes or the archive shelf ---------- */
.sc-src { display: flex; flex: none; width: 100%; margin-bottom: 10px; }
#screenUI .sc-left { display: flex; flex-direction: column; overflow: hidden; }
#screenUI .src-pane { flex: 1 1 auto; min-height: 0; overflow: auto; scrollbar-width: thin; margin: 0 -6px; padding: 0 6px; }
#screenUI .src-pane[hidden] { display: none; }
.btn-tiny.compare[hidden] { display: none; }
.sc-src button { flex: 1; height: 30px; font-size: 12.5px; font-stretch: 92%; }
.src-note { margin: 0 0 6px; }
.arch-h { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; margin: 14px 2px 4px; font-size: 10px; letter-spacing: .1em; line-height: 1.3; text-transform: uppercase; color: var(--amber); font-weight: 500; font-stretch: 90%; }
.arch-h span { flex: none; white-space: nowrap; letter-spacing: .02em; color: var(--glass); text-transform: none; font-size: 10.5px; }
.arch-h:first-child { margin-top: 4px; }
.take.arch { grid-template-columns: 76px 1fr; align-items: start; }
.take.arch .poster { position: relative; display: block; width: 76px; height: 57px; border-radius: 2px; overflow: hidden; background: repeating-linear-gradient(90deg, #15130f 0 6px, #1c1914 6px 7px); box-shadow: 0 0 0 1px var(--line); }
.take.arch .poster img { width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .4s; filter: saturate(.9) contrast(1.05); }
.take.arch.posted .poster img { opacity: 1; }
.take.arch .poster i { position: absolute; inset: 0; display: grid; place-items: center; }
.take.arch .poster i::after { content: ''; width: 0; height: 0; border-left: 9px solid rgba(255,255,255,.85); border-top: 6px solid transparent; border-bottom: 6px solid transparent; margin-left: 2px; opacity: 0; transition: opacity .2s; filter: drop-shadow(0 1px 3px rgba(0,0,0,.8)); }
.take.arch:hover .poster i::after, .take.arch.noposter .poster i::after { opacity: 1; }
.take.arch.on .poster i::after { opacity: 0; }
.take.arch b { font-size: 15px; }
.take.arch .arch-meta { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; margin-top: 3px; }
.take.arch .arch-meta em { font-style: normal; font-size: 10px; padding: 1px 5px; border-radius: 3px; border: 1px solid var(--line-strong); color: var(--silver); letter-spacing: .02em; }
.take.arch .arch-state:empty { display: none; }
.take.arch .arch-state { margin-top: 3px; color: var(--amber); font-size: 11px; }
.take.arch.loading .poster::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: linear-gradient(90deg, transparent, var(--amber), transparent); animation: threading 1.1s linear infinite; }
@keyframes threading { from { transform: translateX(-100%); } to { transform: translateX(100%); } }
.take.arch.plain .arch-state { color: var(--silver-dim); }
#noTakes [data-src-go] { margin-top: 6px; }
#scMeta a { color: var(--glass); text-decoration: none; font-size: 11px; }
#scMeta a:hover { color: var(--silver); text-decoration: underline; }
/* hold to compare */
.lab-head-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.lab-head-row .lab-head { margin: 0 !important; min-width: 0; flex: 1 1 auto; }
.lab-head-row .compare { margin-top: 2px; }
.btn-tiny.compare { flex: none; display: inline-flex; align-items: center; gap: 5px; user-select: none; -webkit-user-select: none; touch-action: none; }
.btn-tiny.compare svg { width: 13px; height: 13px; fill: none; stroke: currentColor; stroke-width: 1.6; }
.btn-tiny.compare svg .fill { fill: currentColor; stroke: none; }
.btn-tiny.compare.on { border-color: var(--amber); color: var(--amber); background: rgba(227,162,59,.1); }
#cmpTag { position: fixed; left: 50%; top: 74px; transform: translate(-50%, -6px); z-index: 30; padding: 6px 14px; border-radius: 14px; background: rgba(13,12,11,.9); border: 1px solid rgba(227,162,59,.6); color: var(--amber); font-size: 11.5px; letter-spacing: .12em; text-transform: uppercase; opacity: 0; pointer-events: none; transition: opacity .15s, transform .15s; }
body.comparing[data-mode="screen"] #cmpTag { opacity: 1; transform: translate(-50%, 0); }

/* ---------- double exposure, beside Record ---------- */
.rec-row { display: flex; gap: 6px; width: 100%; }
.rec-row .roll { flex: 1 1 auto; min-width: 0; }
.wind-btn { flex: none; width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; border: 1px solid var(--line-strong); color: var(--silver-dim); transition: color .2s, border-color .2s, background .2s; }
.wind-btn svg { width: 17px; height: 17px; fill: currentColor; }
.wind-btn:hover, .wind-btn[aria-expanded="true"] { color: #f1ecdf; border-color: var(--silver-dim); }
.wind-btn.armed { color: var(--amber); border-color: rgba(227,162,59,.7); background: rgba(227,162,59,.1); }
body.rolling .wind-btn { display: none; }
.wind-pop { position: fixed; z-index: 44; width: 272px; max-width: calc(100vw - 16px); padding: 13px 15px 14px; border-radius: 10px; background: #15120e; border: 1px solid var(--line-strong); box-shadow: 0 18px 44px rgba(0,0,0,.6); --ax: 50%; }
.wind-pop::after { content: ''; position: absolute; left: var(--ax); bottom: -7px; width: 12px; height: 12px; margin-left: -6px; background: #15120e; border: 1px solid var(--line-strong); border-top: 0; border-left: 0; transform: rotate(45deg); }
.wind-pop[hidden] { display: none; }
.wind-pop .wp-k { margin: 0 0 4px; font-size: 10.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--amber); font-stretch: 90%; }
.wind-pop .wp-t { margin: 0 0 10px; font-size: 12.5px; line-height: 1.5; color: var(--silver); }
.wind-pop .chips { display: flex; flex-wrap: wrap; gap: 6px; }
.wind-pop .note { margin: 9px 0 0; }
.wind-pop .note.armed { color: var(--amber); }
.wind-pop .btn-tiny { margin-top: 8px; }
/* ---------- design credit ---------- */
#credit { position: fixed; left: 50%; bottom: 3px; transform: translateX(-50%); z-index: 31; font-size: 9px; line-height: 11px; letter-spacing: .22em; text-transform: uppercase; color: rgba(186,182,170,.62); text-decoration: none; font-stretch: 90%; white-space: nowrap; }
#credit:hover, #credit:focus-visible { color: var(--amber); }
body[data-mode="intro"] #credit { bottom: 14px; font-size: 10px; }
@media (max-width: 860px) {
  #console, #screenUI .sc-bottom { bottom: 18px; }
  #cutUI { padding-bottom: 18px; }
}
.roll.over kbd { display: none; }
/* ---------- keeping the work ---------- */
.take-row { position: relative; }
.take-row .take { padding-right: 30px; }
.take-del { position: absolute; top: 6px; right: 6px; height: 22px; min-width: 22px; padding: 0 6px; border-radius: 11px; display: flex; align-items: center; justify-content: center; font-size: 12px; color: var(--silver-dim); border: 1px solid transparent; opacity: 0; transition: opacity .15s, background .15s, color .15s; }
.take-del .x { font: 300 17px/1 var(--ui); }
.take-del .q { display: none; font-size: 11px; font-weight: 600; }
.take-row:hover .take-del, .take-del:focus-visible, .take-del.armed { opacity: 1; }
.take-del:hover { color: #fff; border-color: var(--line-strong); }
.take-del.armed { background: var(--safelight); border-color: var(--safelight); color: #fff; }
.take-del.armed .x { display: none; } .take-del.armed .q { display: inline; }
@media (hover: none) { .take-del { opacity: .7; } }
.keep-note { margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 10px; }
.keep-note:empty { display: none; }
.keep-note .note { margin: 0; display: flex; align-items: center; gap: 6px; }
.keep-note .dot { width: 6px; height: 6px; border-radius: 50%; background: #6fae7b; box-shadow: 0 0 6px rgba(111,174,123,.6); }
.keep-note.asking .note { color: #f0c9bf; }
.keep-ask { display: flex; gap: 6px; }
.btn-tiny.danger { border-color: var(--safelight); color: #fff; background: rgba(194,50,31,.35); }
.btn-tiny.danger:hover { background: var(--safelight); }
.it-kept { margin: 18px 0 0; font-size: 13px; color: var(--amber); }
.it-kept .link { color: #f1ecdf; text-decoration: underline; text-underline-offset: 3px; font-size: 13px; margin-left: 4px; }
.it-kept .link:hover { color: #fff; }

/* ---------- Tricks of the Trade ---------- */
.mode-tr { margin-left: 10px; }
.mode-tr + .mode-tl { margin-left: 6px; }
.mode-tr svg { stroke-linecap: round; }
.mode-tr[aria-expanded="true"], body.trick-on .mode-tr { color: var(--amber); border-color: rgba(227,162,59,.5); }
#tricksBook { position: fixed; inset: 0; z-index: 50; display: flex; flex-direction: column; background: radial-gradient(ellipse 80% 70% at 50% 35%, #16120d 0%, #080707 72%); opacity: 0; pointer-events: none; transition: opacity .3s; }
#tricksBook.show { opacity: 1; pointer-events: auto; }
.tb-head { position: relative; flex: none; display: flex; align-items: flex-end; gap: 24px; padding: 22px 28px 14px; border-bottom: 1px solid var(--line); }
.tb-head h2 { margin: 2px 0 0; font: italic 400 clamp(26px, 3.2vw, 38px)/1.05 var(--display); color: #efe9da; }
.tb-kicker { margin: 0; font-size: 10.5px; letter-spacing: .16em; text-transform: uppercase; color: var(--amber); font-stretch: 90%; }
.tb-prog { margin-left: auto; margin-right: 56px; display: flex; flex-direction: column; align-items: flex-end; gap: 6px; font-size: 12px; color: var(--silver-dim); }
.tb-prog i { display: block; width: 140px; height: 3px; border-radius: 2px; background: rgba(207,203,191,.12); overflow: hidden; }
.tb-prog b { display: block; height: 100%; background: var(--amber); transition: width .4s; }
.tb-close { position: absolute; right: 20px; top: 18px; width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line-strong); font: 300 24px/1 var(--ui); color: var(--silver); }
.tb-close:hover { color: #fff; border-color: var(--silver-dim); }
.tb-body { flex: 1 1 auto; overflow: auto; scrollbar-width: thin; padding: 6px 28px 40px; }
.tb-grid { max-width: 1320px; margin: 0 auto; }
.tb-sec { margin: 22px 0 12px; font-size: 11px; letter-spacing: .16em; text-transform: uppercase; color: var(--glass); font-weight: 500; }
.tb-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(232px, 1fr)); gap: 14px; }
.tb-card { position: relative; display: flex; flex-direction: column; text-align: left; border-radius: 10px; overflow: hidden; background: rgba(20,18,15,.9); border: 1px solid var(--line); transition: border-color .2s, transform .2s, background .2s; }
.tb-card:hover { border-color: rgba(227,162,59,.45); transform: translateY(-2px); background: rgba(26,22,17,.95); }
.tb-poster { position: relative; display: block; aspect-ratio: 16 / 10; overflow: hidden; background: repeating-linear-gradient(90deg, #15130f 0 7px, #1b1813 7px 8px); }
.tb-poster img { width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .4s, transform .6s; filter: saturate(.85) contrast(1.05); }
.tb-poster.posted img { opacity: 1; }
.tb-card:hover .tb-poster img { transform: scale(1.04); }
.tb-poster i { position: absolute; inset: 0; display: grid; place-items: center; background: linear-gradient(transparent 55%, rgba(0,0,0,.55)); }
.tb-poster i::after { content: ''; width: 0; height: 0; margin-left: 3px; border-left: 12px solid rgba(255,255,255,.88); border-top: 8px solid transparent; border-bottom: 8px solid transparent; filter: drop-shadow(0 1px 4px rgba(0,0,0,.8)); opacity: .0; transition: opacity .2s; }
.tb-card:hover .tb-poster i::after, .tb-poster.noposter i::after { opacity: 1; }
.tb-meta { display: flex; flex-direction: column; gap: 3px; padding: 11px 13px 14px; }
.tb-meta em { font-style: normal; font-size: 10px; letter-spacing: .14em; text-transform: uppercase; color: var(--amber); }
.tb-meta b { font: italic 400 20px/1.15 var(--display); color: #efe9da; }
.tb-meta > span { font-size: 12.5px; line-height: 1.4; color: var(--silver); }
.tb-meta small { margin-top: 4px; font-size: 11px; color: var(--glass); }
.tb-tick { position: absolute; top: 9px; right: 9px; width: 24px; height: 24px; border-radius: 50%; display: none; place-items: center; background: var(--amber); box-shadow: 0 2px 8px rgba(0,0,0,.5); }
.tb-tick::after { content: ''; width: 9px; height: 5px; border-left: 2px solid #1a1208; border-bottom: 2px solid #1a1208; transform: rotate(-45deg) translate(1px, -1px); }
.tb-card.done .tb-tick { display: grid; }
.tb-card.active { border-color: rgba(227,162,59,.7); }
.tb-card.active .tb-meta em::after { content: ' · in progress'; color: var(--silver-dim); letter-spacing: .08em; }
.tb-detail { max-width: 1240px; margin: 0 auto; padding-top: 0; }
.tb-nav { position: sticky; top: -6px; z-index: 3; display: flex; align-items: center; justify-content: space-between; gap: 16px; margin: -6px -28px 22px; padding: 12px 28px; background: linear-gradient(#0d0b09 70%, rgba(13,11,9,0)); }
.tb-back { display: inline-flex; align-items: center; gap: 10px; height: 44px; padding: 0 22px 0 16px; border-radius: 22px; border: 1px solid rgba(227,162,59,.65); background: rgba(227,162,59,.1); color: #f4ecda; font-size: 15px; font-weight: 600; letter-spacing: .01em; transition: background .2s, border-color .2s, color .2s; }
.tb-back svg { width: 20px; height: 20px; fill: none; stroke: var(--amber); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; transition: transform .2s, stroke .2s; }
.tb-back:hover { background: var(--amber); border-color: var(--amber); color: #1a1208; }
.tb-back:hover svg { stroke: #1a1208; transform: translateX(-3px); }
.tb-pn { display: flex; align-items: center; gap: 8px; }
.tb-pn button { display: inline-flex; align-items: center; gap: 6px; height: 36px; max-width: 230px; padding: 0 14px; border-radius: 18px; border: 1px solid var(--line-strong); color: var(--silver); font-size: 13px; }
.tb-pn button span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-family: var(--display); font-style: italic; font-size: 14.5px; }
.tb-pn button svg { flex: none; width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.tb-pn button:hover:not(:disabled) { border-color: var(--silver-dim); color: #fff; }
.tb-pn button:disabled { opacity: .3; cursor: default; }
.tb-pn button:disabled span { display: none; }
.tb-of { min-width: 52px; text-align: center; font-size: 12px; color: var(--glass); font-variant-numeric: tabular-nums; }
@media (max-width: 860px) { .tb-nav { margin: -6px -16px 16px; padding: 10px 16px; } .tb-pn button span { display: none; } .tb-pn button { padding: 0 10px; } }
.tb-split { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(300px, 1fr); gap: 36px; align-items: start; }
.tb-film { margin: 0; }
.tb-screen { position: relative; aspect-ratio: 4 / 3; border-radius: 6px; overflow: hidden; background: #000; box-shadow: 0 0 0 1px var(--line-strong), 0 30px 70px rgba(0,0,0,.6); }
.tb-screen video { width: 100%; height: 100%; object-fit: contain; display: block; background: #000; }
.tb-err:empty { display: none; }
.tb-err { position: absolute; left: 0; right: 0; bottom: 48px; text-align: center; font-size: 12.5px; color: var(--silver-dim); }
.tb-film figcaption { display: flex; flex-direction: column; gap: 2px; margin-top: 12px; font-size: 12px; color: var(--silver-dim); }
.tb-film figcaption b { font: italic 400 19px/1.2 var(--display); color: #efe9da; }
.tb-note { margin-top: 4px; font-size: 12.5px; line-height: 1.5; color: var(--silver); max-width: 60ch; }
.tb-recipe h3 { margin: 6px 0 4px; font: italic 400 clamp(30px, 3.4vw, 42px)/1.02 var(--display); color: #f1ecdf; }
.tb-line { margin: 0 0 14px; font-size: 15px; color: var(--silver); }
.tb-learn { margin: 0 0 18px; padding-left: 14px; border-left: 2px solid rgba(227,162,59,.5); font-size: 13.5px; line-height: 1.6; color: var(--silver); }
.tb-steps { list-style: none; margin: 0 0 22px; padding: 0; counter-reset: st; display: grid; gap: 9px; }
.tb-steps li { counter-increment: st; display: grid; grid-template-columns: 24px 1fr; gap: 10px; font-size: 13.5px; line-height: 1.45; color: #e6e1d4; }
.tb-steps li::before { content: counter(st); width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; border: 1px solid var(--line-strong); font-size: 11px; color: var(--amber); }
.tb-start { height: 40px; padding: 0 20px; border-radius: 20px; background: var(--amber); color: #1a1208; font-weight: 600; font-size: 14px; }
.tb-start:hover { background: #f0b456; }
body.tricks-open #credit { z-index: 49; }
/* the guide, docked in the studio while a trick is under way */
#trickGuide { position: fixed; z-index: 18; right: var(--gap); top: 78px; width: 304px; max-height: calc(100vh - var(--console-h) - 110px); overflow: auto; scrollbar-width: thin; border-radius: 12px; background: rgba(16,14,12,.94); border: 1px solid var(--line-strong); box-shadow: 0 20px 50px rgba(0,0,0,.55); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }
#trickGuide[hidden] { display: none; }
#trickGuide[data-mode="screen"], #trickGuide[data-mode="cut"] { right: auto; left: 50%; transform: translateX(-50%); top: 70px; width: 380px; max-height: 52vh; z-index: 20; }
.tg-head { display: grid; grid-template-columns: 56px 1fr auto auto; gap: 10px; align-items: center; padding: 10px 8px 10px 10px; }
.tg-orig { padding: 0; border-radius: 4px; overflow: hidden; }
.tg-orig .tb-poster { width: 56px; aspect-ratio: 4 / 3; }
.tg-orig .tb-poster i::after { opacity: .9; border-left-width: 8px; border-top-width: 5px; border-bottom-width: 5px; }
.tg-title { min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.tg-title b { font: italic 400 17px/1.15 var(--display); color: #efe9da; }
.tg-now { display: none; font-size: 11.5px; line-height: 1.35; color: var(--silver); overflow: hidden; display: none; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
#trickGuide.min .tg-now { display: -webkit-box; }
.tg-min, .tg-x { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; color: var(--silver-dim); }
.tg-min svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.tg-x { font: 300 20px/1 var(--ui); }
.tg-min:hover, .tg-x:hover { color: #fff; background: rgba(255,255,255,.06); }
.tg-bar { display: block; height: 2px; margin: 0 12px; background: rgba(207,203,191,.1); border-radius: 1px; overflow: hidden; }
.tg-bar b { display: block; height: 100%; background: var(--amber); transition: width .4s; }
.tg-steps { list-style: none; margin: 0; padding: 10px 12px 4px; display: grid; gap: 8px; }
.tg-steps li { display: grid; grid-template-columns: 20px 1fr; gap: 9px; font-size: 12.5px; line-height: 1.45; color: var(--silver-dim); }
.tg-steps li.now { color: #f1ecdf; }
.tg-steps li.ok { color: var(--glass); }
.tg-check { width: 18px; height: 18px; margin-top: 1px; border-radius: 50%; border: 1.5px solid var(--line-strong); position: relative; }
.tg-steps li.now .tg-check { border-color: var(--amber); }
.tg-steps li.ok .tg-check { background: var(--amber); border-color: var(--amber); }
.tg-steps li.ok .tg-check::after { content: ''; position: absolute; left: 4px; top: 4px; width: 7px; height: 4px; border-left: 2px solid #1a1208; border-bottom: 2px solid #1a1208; transform: rotate(-45deg); }
.tg-do { display: inline-block; margin: 5px 0 0; height: 24px; padding: 0 10px; border-radius: 12px; border: 1px solid rgba(227,162,59,.6); color: var(--amber); font-size: 11.5px; font-weight: 600; background: rgba(227,162,59,.08); }
.tg-do:hover { background: rgba(227,162,59,.18); color: #ffd28a; }
.tg-steps li span { display: block; }
.tg-steps li span .tg-do { display: table; }
.tg-watch { display: flex; gap: 6px; align-items: baseline; width: 100%; padding: 9px 12px 12px; font-size: 12px; color: var(--silver-dim); text-align: left; border-top: 1px solid var(--line); margin-top: 8px; }
.tg-watch::before { content: '▶'; font-size: 9px; color: var(--amber); }
.tg-watch span { font-style: italic; font-family: var(--display); font-size: 13px; color: var(--silver); }
.tg-watch:hover, .tg-watch:hover span { color: #fff; }
.tg-done { margin: 8px 12px 12px; padding: 10px 12px; border-radius: 8px; background: rgba(227,162,59,.1); border: 1px solid rgba(227,162,59,.35); font-size: 12.5px; line-height: 1.5; color: #f1e6cf; }
.tg-done b { color: var(--amber); }
.tg-done-acts { display: flex; gap: 6px; margin-top: 8px; }
.tg-done-acts button { height: 26px; padding: 0 11px; border-radius: 13px; border: 1px solid rgba(227,162,59,.55); font-size: 11.5px; color: var(--amber); }
.tg-done-acts .tg-next { background: var(--amber); color: #1a1208; font-weight: 600; }
#trickGuide.min .tg-bar, #trickGuide.min .tg-steps, #trickGuide.min .tg-watch, #trickGuide.min .tg-done { display: none; }
body.trick-on #cmpTag { top: 136px; }
body.expanded #trickGuide { display: none; }
@media (max-width: 1100px) { #trickGuide:not([data-mode="screen"]):not([data-mode="cut"]) { top: auto; bottom: calc(var(--console-h) + 24px); } }
@media (max-width: 860px) {
  .tb-head { padding: 16px 16px 12px; flex-wrap: wrap; } .tb-prog { margin: 0; align-items: flex-start; } .tb-body { padding: 6px 16px 30px; }
  .tb-split { grid-template-columns: 1fr; gap: 20px; }
  #trickGuide, #trickGuide[data-mode="screen"], #trickGuide[data-mode="cut"] { left: 8px; right: 8px; width: auto; transform: none; top: 120px; bottom: auto; max-height: 40vh; }
}
