/* QUANTUM ROCK — THE GUARDIAN. "Lab Console" UI over a full-screen WebGL canvas.
   Language: brushed graphite plates with brass screws, paint-filled engraving and recessed amber readouts; machined brass
   hardware (src/ui/hw.js) you can actually operate. Headlines in Fraunces float over the scene; everything you touch is a part.
   Layout: #main holds tall empty scroll spacers; the content panels sit in fixed .layers and fade by scroll (src/ui/index.js). */
:root {
  --ink: #03060a;
  --tx: #efe9dc;
  --tx-1: rgba(239, 233, 220, 0.9);
  --tx-2: rgba(239, 233, 220, 0.74);
  --mut: rgba(239, 233, 220, 0.5);
  --eng: #ecdfc2;                         /* paint-filled engraving */
  --eng-2: rgba(236, 223, 194, 0.74);
  --eng-3: rgba(236, 223, 194, 0.6);
  --gold: #e6c27a;
  --g1: #fbe8b4;
  --amber: #ffc24a;
  --rd: #ffcf8a;                          /* readout glow */
  --green: #8fe36a;
  --ginger: #ff9a52;
  --cy: #86dfe6;
  --display: 'Fraunces', 'Iowan Old Style', Georgia, serif;
  --sans: 'Geist', 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mono: 'Geist Mono', ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
  --gut: clamp(16px, 3.5vw, 56px);
  --hdr: 128px;                           /* header block height incl. its top gap (the rotary plate is 108px) */
  --hudw: 192px;                          /* the descent gauge plate on the right (desktop) */
  --hudr: calc(var(--hudw) + 40px);
  --ease: cubic-bezier(0.22, 0.61, 0.2, 1);
  --snap: cubic-bezier(0.5, 0, 0.3, 1.45);
  --ban: 40px;                            /* pre-launch scam warning bar (index.html .scam) */
  --sat: calc(env(safe-area-inset-top, 0px) + var(--ban));
  --sab: env(safe-area-inset-bottom, 0px);
  --sal: env(safe-area-inset-left, 0px);
  --sar: env(safe-area-inset-right, 0px);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { background: var(--ink); -webkit-text-size-adjust: 100%; }
html:has(body.is-throw), html:has(body.is-loading) { overflow: hidden; }
body { margin: 0; background: var(--ink); color: var(--tx); font: 400 15px/1.5 var(--sans); -webkit-font-smoothing: antialiased; overflow-x: hidden; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }
::selection { background: rgba(230, 194, 122, 0.3); color: #fff; }
:focus-visible { outline: 1px solid var(--g1); outline-offset: 4px; border-radius: 4px; }
p, h1, h2, h3, dl, dd, ol, ul { margin: 0; }

#stage { position: fixed; inset: 0; width: 100%; height: 100%; display: block; z-index: 0; outline: none; touch-action: none; }
@media (pointer: coarse) { body:not(.is-throw) #stage { touch-action: pan-y !important; } }
#main { position: relative; z-index: 1; pointer-events: none; }
.sp { display: block; width: 1px; }

/* legibility scrim between the canvas and the UI: dark on the text side, the rock's column stays clear */
.vig { position: fixed; inset: 0; z-index: 2; pointer-events: none; transition: opacity 1.2s var(--ease);
  background: linear-gradient(90deg, rgba(3, 6, 10, 0.86) 0%, rgba(3, 6, 10, 0.58) 25%, rgba(3, 6, 10, 0) 43%, rgba(3, 6, 10, 0) 64%, rgba(3, 6, 10, 0.5) 80%, rgba(3, 6, 10, 0.8) 100%),
              linear-gradient(180deg, rgba(3, 6, 10, 0.5) 0%, rgba(3, 6, 10, 0) 16%, rgba(3, 6, 10, 0) 72%, rgba(3, 6, 10, 0.55) 100%); }
body.is-throw .vig { opacity: 0.35; }

/* ================= the console material ================= */
/* brushed graphite anodising, chamfered edge, real shadow */
.plate { position: relative; border-radius: 10px;
  background: radial-gradient(120% 60% at 0% 0%, rgba(255, 255, 255, 0.07), transparent 45%), linear-gradient(180deg, #34373b 0%, #26282b 48%, #1c1d20 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.22), inset 0 -2px 0 rgba(0, 0, 0, 0.55), inset 0 0 0 1px rgba(0, 0, 0, 0.6),
              0 2px 0 #0b0c0d, 0 34px 60px -24px rgba(0, 0, 0, 0.95), 0 8px 18px rgba(0, 0, 0, 0.55); }
/* brushing: long horizontal grain */
.plate::before { content: ''; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; opacity: 0.55; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='600' height='300'%3E%3Cfilter id='b'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.0025 .9' numOctaves='3' seed='3'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 1.1 -.2'/%3E%3C/filter%3E%3Crect width='600' height='300' filter='url(%23b)'/%3E%3C/svg%3E");
  background-size: 600px 300px; }
/* edge wear: the top-left corner is where hands rest */
.plate::after { content: ''; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  background: radial-gradient(160px 70px at 0 0, rgba(255, 240, 210, 0.12), transparent 70%), radial-gradient(120px 50px at 100% 100%, rgba(255, 240, 210, 0.06), transparent 70%); }
.plate > * { position: relative; z-index: 1; }
.plate > .sc { position: absolute; width: 11px; height: 11px; z-index: 2; pointer-events: none; }
.sc--tl { top: 9px; left: 9px; } .sc--tr { top: 9px; right: 9px; } .sc--bl { bottom: 9px; left: 9px; } .sc--br { bottom: 9px; right: 9px; }
.groove { position: absolute; width: 2px; background: linear-gradient(90deg, rgba(0, 0, 0, 0.6) 50%, rgba(255, 255, 255, 0.1) 50%); }
/* paint-filled engraving */
.eng { color: var(--eng); font-family: var(--sans); text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.75), 0 1px 0 rgba(255, 255, 255, 0.12); }
.eng.lbl { font: 600 14px/1.15 var(--sans); letter-spacing: -0.005em; }
.eng.cap { font: 600 9px/1.1 var(--sans); letter-spacing: 0.14em; text-transform: uppercase; color: var(--eng-3); }
.eng.small { font: 400 13px/1.45 var(--sans); color: var(--eng-2); }
/* recessed readout window */
.well { display: block; border-radius: 4px; background: linear-gradient(180deg, #08090a, #121315); box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.9), 0 1px 0 rgba(255, 255, 255, 0.12);
  font: 400 14px/1 var(--mono); color: var(--rd); text-shadow: 0 0 8px rgba(255, 160, 70, 0.45); font-feature-settings: 'tnum', 'zero'; }
.well.is-tba { color: rgba(255, 207, 138, 0.62); }
.hw { display: block; width: 100%; height: auto; overflow: visible; }
.hw-defs { pointer-events: none; }
/* small CSS pilot lamp (gauge, legends, loader) */
.led { display: inline-block; flex: none; width: 9px; height: 9px; border-radius: 50%;
  background: radial-gradient(circle at 40% 35%, #7a5524, #2a1a06 75%); box-shadow: 0 0 0 1.5px #9c7134, 0 0 0 2.5px rgba(0, 0, 0, 0.5), inset 0 1px 1px rgba(0, 0, 0, 0.6);
  transition: background 0.3s, box-shadow 0.3s; }
.led--amber, .led.is-on { background: radial-gradient(circle at 42% 38%, #fff2c8, var(--amber) 45%, #a55a06); box-shadow: 0 0 0 1.5px #9c7134, 0 0 0 2.5px rgba(0, 0, 0, 0.5), 0 0 10px 1px rgba(255, 194, 74, 0.7); }
.led--green { background: radial-gradient(circle at 42% 38%, #eaffd8, var(--green) 45%, #2c6a12); box-shadow: 0 0 0 1.5px #9c7134, 0 0 0 2.5px rgba(0, 0, 0, 0.5), 0 0 10px 1px rgba(143, 227, 106, 0.6); }

/* ================= hardware states (parts from src/ui/hw.js) ================= */
.lp { opacity: 0; transition: opacity 0.16s; }
.lamp-hw[data-l='amber'] .lp--amber, .lamp-hw[data-l='green'] .lp--green, .lamp-hw[data-l='red'] .lp--red { opacity: 1; }
.lamp-hw { width: 26px; flex: none; }
/* attack: the cover folds into its hinge, the lifted cover swings up out of it */
.atk { position: relative; display: block; width: 100%; padding: 0; border: 0; background: none; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.atk:disabled { cursor: default; }
.attack-hw .a-cc, .attack-hw .a-cl { transform-box: view-box; transform-origin: 110px 18px; }
.attack-hw .a-cc { transition: transform 0.2s cubic-bezier(0.3, 0.7, 0.4, 1) 0.14s; }
.attack-hw .a-cl { transform: scaleY(0); transition: transform 0.14s ease-in; }
.atk:not([data-st='closed']) .a-cc { transform: scaleY(0); transition: transform 0.15s ease-in; }
.atk:not([data-st='closed']) .a-cl { transform: none; transition: transform 0.42s cubic-bezier(0.25, 1.55, 0.45, 1) 0.12s; }
.attack-hw .a-arm, .attack-hw .a-hot, .attack-hw .a-pring { opacity: 0; transition: opacity 0.25s; }
.attack-hw .a-glow { opacity: 0; transform-box: fill-box; transform-origin: center; transition: opacity 0.35s, transform 0.35s var(--ease); }
.attack-hw .a-lens { transform-box: view-box; transform-origin: 110px 110px; transition: transform 0.12s var(--ease); }
.atk[data-st='armed'] .a-arm { opacity: 1; }
.atk[data-st='armed'] .a-glow { opacity: 0.6; }
.atk[data-st='armed']:hover .a-glow, .atk[data-st='armed']:focus-visible .a-glow { opacity: 0.85; }
.atk[data-st='pressed'] .a-hot, .atk[data-st='pressed'] .a-pring { opacity: 1; }
.atk[data-st='pressed'] .a-glow { opacity: 1; transform: scale(1.25); }
.atk[data-st='pressed'] .a-lens { transform: translateY(3px) scale(0.94); }
.atk[data-st='armed']:active .a-lens { transform: translateY(2px) scale(0.96); }
.attack-hw .a-refl { transition: opacity 0.3s; }
.atk[data-st='pressed'] .a-refl { opacity: 0.42; }
body.is-attack .atk .a-hot { animation: lensbeat 0.5s ease-in-out infinite alternate; }
@keyframes lensbeat { from { opacity: 0.75; } to { opacity: 1; } }
.atk__cap { transition: color 0.3s; }
.atk[data-st='armed'] ~ .atk__cap, .c-atk:has(.atk[data-st='armed']) .atk__cap { color: var(--ginger); text-shadow: 0 0 8px rgba(255, 122, 50, 0.45); }
/* bat toggles: the lever flips through its pivot */
.tog { display: flex; flex-direction: column; align-items: center; padding: 0; border: 0; background: none; cursor: pointer; text-align: center; -webkit-tap-highlight-color: transparent; }
.tog__hw { display: block; width: 50px; }
.toggle-hw .t-lev { transform-box: view-box; transform-origin: 45px 84px; transform: scaleY(-1); transition: transform 0.2s var(--snap); }
.tog.is-up .t-lev { transform: none; }
.toggle-hw .t-shu, .toggle-hw .t-shd { transition: opacity 0.2s; }
.toggle-hw .t-shu { opacity: 0; } .tog.is-up .t-shu { opacity: 1; } .tog.is-up .t-shd { opacity: 0; }
.tog.is-lit .lp--amber { opacity: 1; }
.tog:hover .t-lev, .tog:focus-visible .t-lev { filter: brightness(1.12); }
.tog:not(.is-up):hover .t-lev { transform: scaleY(-0.9); }
.tog.is-up:hover .t-lev { transform: scaleY(0.9); }
.tog .eng.lbl { margin-top: 3px; font-size: 13px; }
.tog .eng.cap { margin-top: 5px; font-size: 8.5px; }
.tog.is-ring .lp--amber { animation: ringlamp 0.9s steps(2) both; }
@keyframes ringlamp { 0%, 50% { opacity: 1; } 100% { opacity: 0; } }
/* key switch */
.keysw { display: flex; flex-direction: column; align-items: center; text-align: center; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.keysw__hw { display: block; width: 100%; }
.key-hw .k-key { transform-box: view-box; transform-origin: 70px 78px; transform: rotate(-40deg); transition: transform 0.42s cubic-bezier(0.55, -0.35, 0.3, 1.35); }
.keysw:hover .k-key, .keysw:focus-visible .k-key { transform: rotate(-31deg); transition-duration: 0.3s; }
.keysw.is-on .k-key { transform: rotate(40deg); }
.key-hw text { transition: fill 0.3s; }
.keysw.is-on .k-buy, body.is-latched .js-buy .k-buy { fill: var(--amber); }
.keysw .eng.lbl { margin-top: 2px; font-size: 13px; white-space: nowrap; }
.keysw .eng.cap { margin-top: 5px; font-size: 8.5px; }
body.is-latched .keysw__cap { color: var(--green); }
/* square push buttons */
.pbtn { display: inline-flex; flex-direction: column; align-items: center; gap: 3px; padding: 0; border: 0; background: none; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.pbtn__hw { display: block; width: 44px; }
.push-hw .p-cap { transition: transform 0.1s, filter 0.1s; }
.pbtn:hover .p-cap, .pbtn:focus-visible .p-cap { filter: brightness(1.35); }
.pbtn:active .p-cap, .pbtn.is-press .p-cap { transform: translateY(1.6px); filter: brightness(0.8); }

/* ================= loader ================= */
.loader { position: fixed; inset: 0; z-index: 100; background: #000; display: grid; place-items: center; padding: 24px; transition: opacity 1.6s var(--ease), visibility 0s 1.6s; }
.loader.is-out { opacity: 0; visibility: hidden; pointer-events: none; }
.loader__inner { width: min(380px, 84vw); }
.loader__m { display: block; width: auto; height: 56px; margin: 0 auto 22px; filter: drop-shadow(0 0 20px rgba(240, 200, 120, 0.32)); }
.loader__t { margin: 0 0 28px; font: 300 clamp(28px, 7vw, 36px)/1 var(--display); letter-spacing: -0.02em; text-align: center; color: #f6f0e3; }
.loader__bar { position: relative; height: 10px; padding: 0; overflow: visible; }
.loader__bar > span { position: absolute; left: 3px; right: 3px; top: 4px; height: 2px; border-radius: 1px; background: linear-gradient(90deg, #a55a06, var(--amber), #fff2c8); box-shadow: 0 0 10px rgba(255, 194, 74, 0.8); transform: scaleX(0); transform-origin: left; }
.lg { position: absolute; top: -14px; left: calc(var(--x) * 100%); margin-left: -12px; }
.lg.is-on { background: radial-gradient(circle at 42% 38%, #eaffd8, var(--green) 45%, #2c6a12); box-shadow: 0 0 0 1.5px #9c7134, 0 0 0 2.5px rgba(0, 0, 0, 0.5), 0 0 10px 1px rgba(143, 227, 106, 0.6); }
.loader__row { margin: 18px 0 0; display: flex; justify-content: space-between; gap: 12px; font: 600 9.5px/1.2 var(--sans); letter-spacing: 0.14em; text-transform: uppercase; color: var(--eng-3); }
.loader__k { font: 400 12px/1 var(--mono); letter-spacing: 0; color: var(--rd); text-shadow: 0 0 8px rgba(255, 160, 70, 0.45); }

.skip { position: fixed; left: 12px; top: -60px; z-index: 120; padding: 10px 14px; background: var(--ink); border: 1px solid var(--gold); font-size: 12px; }
.skip:focus { top: calc(10px + var(--sat)); }

/* header: see 'header: rotary selector' below */

/* ================= descent gauge: one instrument plate (temperature window + stage lamps) ================= */
.gauge { position: fixed; z-index: 20; right: calc(var(--gut) + var(--sar)); top: calc(var(--hdr) + var(--sat) + 40px); width: var(--hudw); padding: 24px 22px 22px; transition: opacity 0.8s var(--ease), visibility 0s; }
body[data-section='bid'] .gauge { opacity: 0; visibility: hidden; transition: opacity 0.5s, visibility 0s 0.5s; }
.temp__l { padding-left: 2px; }
.temp__k { margin-top: 8px; padding: 10px 12px 9px; font-size: 24px; letter-spacing: -0.03em; white-space: nowrap; }
.temp__k span { transition: text-shadow 0.4s, color 0.4s; }
.temp.is-live .temp__k span { color: #ffe3b8; text-shadow: 0 0 12px rgba(255, 170, 80, 0.9); }
.temp__s { margin-top: 7px; padding-left: 2px; font-size: 12px; line-height: 1.3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vw { --step: 24px; position: relative; margin-top: 14px; padding-top: 12px; height: calc(var(--step) * 5 + 30px); border-top: 1px solid rgba(0, 0, 0, 0.55); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.07); }
.gauge__rail { position: absolute; left: 4px; top: 22px; width: 2px; height: calc(var(--step) * 5); background: linear-gradient(90deg, rgba(0, 0, 0, 0.7) 50%, rgba(255, 255, 255, 0.08) 50%); }
.gauge__rail span { position: absolute; inset: 0; background: linear-gradient(180deg, #a55a06, var(--amber)); box-shadow: 0 0 6px rgba(255, 194, 74, 0.6); transform: scaleY(0); transform-origin: top; }
.gauge__dot { display: none; }
.gauge__n { position: absolute; left: 0; right: 0; top: calc(22px + var(--k) * var(--step) * 5); display: flex; align-items: center; gap: 11px; height: 20px; margin-top: -10px; }
.gauge__n .led { position: relative; z-index: 1; }
.gauge__n em { flex: 1; min-width: 0; font: normal 600 11.5px/1 var(--sans); color: var(--eng-3); text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.75), 0 1px 0 rgba(255, 255, 255, 0.1); white-space: nowrap; transition: color 0.3s; }
.gauge__n b { font: 400 10px/1 var(--mono); color: rgba(236, 223, 194, 0.38); transition: color 0.3s; }
a.gauge__n { cursor: pointer; }
a.gauge__n:hover em { color: var(--eng); }
.gauge__n.is-pass .led { background: radial-gradient(circle at 42% 38%, #eaffd8, var(--green) 45%, #2c6a12); box-shadow: 0 0 0 1.5px #9c7134, 0 0 0 2.5px rgba(0, 0, 0, 0.5), 0 0 7px rgba(143, 227, 106, 0.45); }
.gauge__n.is-on .led { background: radial-gradient(circle at 42% 38%, #fff2c8, var(--amber) 45%, #a55a06); box-shadow: 0 0 0 1.5px #9c7134, 0 0 0 2.5px rgba(0, 0, 0, 0.5), 0 0 12px 2px rgba(255, 194, 74, 0.75); }
.gauge__n.is-on em { color: var(--eng); }
.gauge__n.is-on b { color: var(--rd); }
.gauge.is-ping .gauge__n.is-on .led { animation: ping 0.9s var(--ease) 0.1s both; }
@keyframes ping { 0%, 40% { filter: brightness(2.2); } 20%, 60% { filter: brightness(0.6); } 100% { filter: none; } }
.gauge.is-ping .temp__k span { animation: tping 1s var(--ease) 0.2s both; }
@keyframes tping { 0% { color: #fff; text-shadow: 0 0 18px rgba(255, 200, 120, 1); } 100% { } }

/* ================= panel layers ================= */
.layers { position: fixed; inset: 0; z-index: 10; pointer-events: none; transition: opacity 1.4s var(--ease); }
body:not(.is-revealed) .layers { opacity: 0; }
body.is-throw .layers, body.is-throw .gauge, body.is-throw .hdr .dl, body.is-throw .mk { opacity: 0; visibility: hidden; transition: opacity 0.5s, visibility 0s 0.5s; }
.wrap { position: absolute; inset: 0; opacity: var(--o, 0); }
.wrap.is-off { visibility: hidden; }
.wrap > * { pointer-events: auto; transform: translateY(calc((1 - var(--o, 0)) * 22px)); }
.wrap--l, .wrap--r { display: flex; align-items: center; padding: calc(var(--hdr) + var(--sat) + 8px) calc(var(--gut) + var(--sar)) 40px calc(var(--gut) + var(--sal)); }
.wrap--r { justify-content: flex-end; padding-right: calc(var(--gut) + var(--hudr) + var(--sar)); }

/* section: kicker + Fraunces headline over the scene, then a plate */
.panel { position: relative; width: min(450px, 34vw); min-width: 340px; }
.kick { font: 400 13px/1.2 var(--sans); color: var(--mut); text-shadow: 0 1px 10px rgba(0, 0, 0, 0.9); }
.kick b { margin-right: 8px; font: italic 400 15px/1 var(--display); color: var(--gold); }
.ttl { margin-top: 12px; font: 300 clamp(42px, 4.2vw, 66px)/0.98 var(--display); letter-spacing: -0.03em; font-variation-settings: 'opsz' 144, 'SOFT' 50; color: #f6f0e3; text-wrap: balance; text-shadow: 0 6px 40px rgba(0, 0, 0, 0.6); }
.ttl em, .hero__title em, .report__t em { font-style: italic; font-variation-settings: 'opsz' 144, 'SOFT' 100; }
.lede { margin-top: 16px; max-width: 30em; font: 400 15.5px/1.55 var(--sans); color: var(--tx-2); text-wrap: pretty; text-shadow: 0 1px 12px rgba(0, 0, 0, 0.9); }
.pl { margin-top: 22px; padding: 18px 22px 16px 24px; }
.pl__hd { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin: 0 4px 10px 12px; }
.pl__id { color: rgba(236, 223, 194, 0.42); letter-spacing: 0.1em; }
/* threat rows: lamp + engraved label + plain line */
.rows > div { display: grid; grid-template-columns: 26px 86px 1fr; align-items: center; gap: 0 12px; padding: 11px 0; }
.rows > div + div { border-top: 1px solid rgba(0, 0, 0, 0.55); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.07); }
.rows dd { font-size: 13.5px; }
/* guardian spec: readouts in recessed windows */
.spec { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 16px; margin: 4px 0 2px; }
.spec dd { margin-top: 6px; padding: 10px 11px; font-size: 13px; line-height: 1.25; }
.spec > div:last-child:nth-child(odd) { grid-column: 1 / -1; }
/* state plate */
.qs__top { display: grid; grid-template-columns: 26px auto 1fr; align-items: center; gap: 0 12px; }
.qstate__mode { padding: 10px 12px; font-size: 15px; letter-spacing: 0.14em; text-align: center; }
.meter { position: relative; height: 18px; margin-top: 14px; padding: 6px 8px; }
.meter::after { content: ''; position: absolute; left: 8px; right: 8px; top: 3px; bottom: 3px; pointer-events: none; background: repeating-linear-gradient(90deg, rgba(236, 223, 194, 0.22) 0 1px, transparent 1px 10%); }
.qstate__bar { position: relative; display: block; height: 6px; }
.qstate__bar span { position: absolute; inset: 0; border-radius: 1px; background: linear-gradient(90deg, #a55a06, var(--amber), #fff2c8); box-shadow: 0 0 8px rgba(255, 194, 74, 0.7); transform: scaleX(0.004); transform-origin: left; transition: transform 1.2s var(--ease); }
.qs__row { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-top: 11px; font: 400 12.5px/1.2 var(--mono); color: var(--rd); text-shadow: 0 0 8px rgba(255, 160, 70, 0.35); }
.qs__row + .qs__row { margin-top: 6px; }
.qstate__src { color: rgba(236, 223, 194, 0.45); text-shadow: none; }
/* brass tag riveted to the plate */
.tagplate { display: block; margin: 16px auto 2px; width: max-content; max-width: 100%; padding: 7px 16px; border-radius: 3px;
  font: 600 9.5px/1.2 var(--sans); letter-spacing: 0.24em; text-transform: uppercase; color: #3a2709; text-shadow: 0 1px 0 rgba(255, 240, 200, 0.5);
  background: linear-gradient(180deg, #f6dfa6, #cfa45c 40%, #9c7134); box-shadow: inset 0 1px 0 rgba(255, 246, 220, 0.7), inset 0 0 0 1px rgba(58, 39, 9, 0.5), 0 3px 8px rgba(0, 0, 0, 0.55); }
.qstate[data-mode='observed'] .qstate__bar span { background: linear-gradient(90deg, #2c6a12, var(--green), #eaffd8); box-shadow: 0 0 8px rgba(143, 227, 106, 0.6); }
.qstate[data-mode='observed'] .qstate__mode { color: #d9ffc4; text-shadow: 0 0 8px rgba(143, 227, 106, 0.5); }
.qstate:not([data-mode='observed']) .qs__top .lamp-hw .lp--amber { animation: blink 1.6s ease-in-out infinite; }
@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: 0.25; } }
.qstate.is-flip .plaque { animation: flipflash 1.6s var(--ease); }
@keyframes flipflash { 0% { filter: brightness(2.2); } 100% { filter: none; } }

/* ================= hero: title + the console ================= */
.wrap--hero { display: flex; padding: calc(var(--hdr) + var(--sat) + clamp(20px, 6.2vh, 56px)) calc(var(--gut) + var(--sar)) calc(clamp(24px, 5.6vh, 52px) + var(--sab)) calc(var(--gut) + var(--sal)); }
.hero { display: flex; flex-direction: column; justify-content: space-between; gap: 24px; width: 100%; min-height: 0; }
.wrap--hero > .hero { pointer-events: none; }
.hero > * { pointer-events: auto; }
.hero__head { width: min(620px, 42vw); }
.hero__eyebrow { font: italic 400 17px/1.2 var(--display); color: var(--tx-2); text-shadow: 0 1px 10px rgba(0, 0, 0, 0.9); }
.hero__title { margin-top: 14px; font: 300 clamp(60px, min(7vw, 12.4vh), 112px)/0.9 var(--display); letter-spacing: -0.03em; font-variation-settings: 'opsz' 144, 'SOFT' 30; color: #f6f0e3; white-space: nowrap; text-shadow: 0 10px 60px rgba(0, 0, 0, 0.6); }
.hero__tag { margin-top: 20px; max-width: 25em; font: 400 17px/1.5 var(--sans); color: var(--tx-2); text-shadow: 0 1px 14px rgba(0, 0, 0, 0.95); text-wrap: pretty; }

/* the console: covered attack button | poke · throw · POV toggles | buy key; ~20% smaller than the mock */
.console { flex: none; width: 532px; height: 206px; margin-top: 50px; }
.c-atk { position: absolute; left: 18px; top: -46px; width: 164px; text-align: center; }
.c-atk .eng.lbl { margin-top: -12px; font-size: 14px; }
.c-atk .eng.cap { margin-top: 6px; font-size: 8.5px; }
.g1 { left: 198px; top: 22px; bottom: 22px; }
.c-tog { position: absolute; left: 212px; top: 24px; display: flex; gap: 6px; }
.c-tog .tog { width: 66px; }
.g2 { left: 424px; top: 22px; bottom: 22px; }
.console .keysw { position: absolute; left: 436px; top: 22px; width: 84px; }
.strip { position: absolute; left: 216px; right: 22px; bottom: 18px; display: flex; justify-content: space-between; align-items: center; }
.strip .eng.small { font-size: 11.5px; }
.strip__go { padding: 4px 0; transition: color 0.3s; }
.strip__go:hover { color: var(--eng); }
.strip__go i { font-style: normal; display: inline-block; animation: nudge 2.6s var(--ease) infinite; }
@keyframes nudge { 0%, 70%, 100% { transform: none; } 82% { transform: translateY(3px); } }
body:not([data-section='hero']) .strip__go i { animation: none; }
/* hero stagger after the loader veil */
.hero > * { opacity: 0; transform: translateY(16px); transition: opacity 1.1s var(--ease), transform 1.1s var(--ease); }
body.is-revealed .hero > * { opacity: 1; transform: none; }
body.is-revealed .hero > .console { transition-delay: 0.3s; }
.hero__eyebrow, .hero__tag { transition: opacity 1s var(--ease) 0.5s; }
body:not(.is-revealed) .hero__eyebrow, body:not(.is-revealed) .hero__tag { opacity: 0; }

/* ================= bid ================= */
.wrap--bid { display: flex; padding: calc(var(--hdr) + var(--sat) + clamp(16px, 4.6vh, 42px)) calc(var(--gut) + var(--sar)) calc(64px + var(--sab)) calc(var(--gut) + var(--sal)); }
.bid { display: flex; justify-content: space-between; align-items: flex-start; gap: 32px; width: 100%; }
.bid > * { pointer-events: auto; }
.bid__l { width: min(520px, 35vw); min-width: 360px; }
.bid__l .ttl { font-size: clamp(44px, 4.4vw, 70px); }
.steps { margin-top: clamp(20px, 5vh, 44px); padding: 14px 22px 14px 24px; }
.steps__l { list-style: none; padding: 0; }
.steps__l li { display: grid; grid-template-columns: 30px 24px 1fr 40px; align-items: center; gap: 0 12px; padding: 13px 0; }
.steps__l li + li { border-top: 1px solid rgba(0, 0, 0, 0.55); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.07); }
.steps__l .lamp-hw { width: 30px; }
.num { font: 300 italic 26px/1 var(--display); color: rgba(236, 223, 194, 0.78); text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.75), 0 1px 0 rgba(255, 255, 255, 0.12); }
.steps__l h3 { font-size: 15px; }
.steps__l p { margin-top: 3px; font-size: 12.5px; }
.step-sw { margin: -8px 0; }
.step-sw .tog__hw { width: 38px; }
.steps__l li > * { min-width: 0; }
.steps__l .lp { transition: opacity 0.55s var(--ease); }
.steps__l h3 { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 10px; transition: color 0.4s; }
.steps__l p { transition: color 0.4s; }
.steps__l li.is-done h3 { color: #fff1d0; } .steps__l li.is-done p { color: var(--eng); }
.step__ok { opacity: 0; transform: translateX(-4px); transition: opacity 0.35s, transform 0.4s var(--ease); font-size: 8px; color: var(--amber); }
.is-done .step__ok { opacity: 1; transform: none; }
.num { display: grid; } .num > * { grid-area: 1 / 1; font-style: inherit; text-align: center; transition: opacity 0.35s, transform 0.45s var(--snap), color 0.35s, text-shadow 0.35s; }
.num i { opacity: 0; transform: scale(0.4); font: 600 17px/1 var(--sans); color: var(--amber); text-shadow: 0 0 10px rgba(255, 194, 74, 0.7); }
.is-done .num b { opacity: 0; transform: scale(1.6); } .is-done .num i { opacity: 1; transform: none; }
.step__x { display: grid; grid-template-rows: 0fr; opacity: 0; transition: grid-template-rows 0.45s var(--ease), opacity 0.3s; }
.is-done .step__x { grid-template-rows: 1fr; opacity: 1; }
.step__xi { overflow: hidden; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; }
.step__xi:not(:empty) { padding-top: 7px; }
.is-done .step__xi:empty { padding: 0; }
.step__tip { font: 400 italic 13px/1.4 var(--display); color: var(--g1); }
.step__a { display: inline-flex; align-items: center; gap: 5px; padding: 5px 9px; border: 0; border-radius: 5px; cursor: pointer; font: 600 9px/1 var(--sans); letter-spacing: 0.14em; text-transform: uppercase; color: var(--eng);
  background: linear-gradient(180deg, #3a3d42, #222326); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), inset 0 0 0 1px rgba(0, 0, 0, 0.6), 0 2px 4px rgba(0, 0, 0, 0.5); transition: color 0.25s, box-shadow 0.25s; }
.step__a:hover, .step__a:focus-visible { color: #fff1d0; box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25), inset 0 0 0 1px rgba(0, 0, 0, 0.6), 0 0 14px rgba(255, 194, 74, 0.3); }
.step__a i { font-style: normal; }
.step__wait { display: inline-flex; align-items: center; gap: 7px; font: 600 9px/1 var(--sans); letter-spacing: 0.14em; text-transform: uppercase; color: var(--amber); }
.step__wait .led { width: 6px; height: 6px; }
body.is-observed .step__wait { display: none; }
.steps__ft { display: grid; }
.steps__ft > * { grid-area: 1 / 1; transition: opacity 0.4s, transform 0.5s var(--ease); }
.steps__ready { display: flex; align-items: center; gap: 9px; margin: 4px 0 0; padding: 11px 0 2px; border-top: 1px solid rgba(0, 0, 0, 0.55); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.07);
  font-size: 10px; letter-spacing: 0.2em; color: #fff1d0; text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.85), 0 0 12px rgba(143, 227, 106, 0.4); opacity: 0; transform: translateY(4px); pointer-events: none; }
.steps.is-ready .steps__ready { opacity: 1; transform: none; }
.steps.is-ready .legend { opacity: 0; transform: translateY(-4px); }
.steps.is-pulse .steps__l .lamp-hw { animation: steppulse 1.4s var(--ease) both; }
.steps.is-pulse .steps__l li:nth-child(2) .lamp-hw { animation-delay: 0.12s; } .steps.is-pulse .steps__l li:nth-child(3) .lamp-hw { animation-delay: 0.24s; }
@keyframes steppulse { 0% { filter: none; } 25% { filter: brightness(1.8) drop-shadow(0 0 8px rgba(143, 227, 106, 0.9)); } 100% { filter: none; } }
.legend { display: flex; flex-wrap: wrap; gap: 8px 20px; margin-top: 4px; padding: 11px 0 2px; border-top: 1px solid rgba(0, 0, 0, 0.55); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.07); }
.legend span { display: inline-flex; align-items: center; gap: 8px; }
.legend b { font-weight: inherit; }
.bid__r { position: relative; width: min(420px, 28vw); min-width: 320px; display: grid; gap: 16px; margin-top: 6px; }
.tokp { padding: 20px 22px 18px; }
.tokp__hd { margin-left: 12px; }
.tokp__g { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 16px; margin-top: 12px; }
.tokp__g dd { margin-top: 6px; padding: 10px 11px; }
.ca { display: grid; grid-template-columns: 1fr auto; gap: 0 14px; align-items: end; margin-top: 16px; }
.ca__v { margin-top: 6px; padding: 11px 11px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-size: 12.5px; }
.ca .pbtn { margin-bottom: -4px; }
.ca__note { margin-top: 10px; font-size: 12px; }
.keyp { display: grid; grid-template-columns: 92px 1fr; gap: 0 18px; align-items: center; padding: 16px 22px 16px 20px; }
.keyp .eng.lbl { font-size: 16.5px; line-height: 1.25; }
.keyp__sub { margin-top: 5px; }
.chart { display: inline-flex; gap: 6px; margin-top: 10px; padding-bottom: 3px; font: 400 14px/1 var(--sans); color: var(--tx); border-bottom: 1px solid rgba(239, 233, 220, 0.4); transition: border-color 0.3s; }
.chart:hover { border-color: var(--gold); }
.chart i { font-style: normal; }
.ftr { position: absolute; left: 0; right: 0; bottom: calc(18px + var(--sab)); padding: 0 calc(var(--gut) + var(--sar)) 0 calc(var(--gut) + var(--sal)); display: flex; align-items: center; justify-content: space-between; gap: 18px;
  font: 400 12.5px/1.4 var(--sans); color: var(--mut); transform: none !important; pointer-events: none !important; text-shadow: 0 1px 8px rgba(0, 0, 0, 0.9); }
.ftr > * { pointer-events: auto; }
.ftr__soc { display: flex; align-items: center; gap: 10px; flex: none; }
.ftr__soc i { font-style: normal; color: rgba(239, 233, 220, 0.3); }
.ftr__a { color: var(--tx-2); padding: 6px 0; transition: color 0.3s; }
.ftr__a:hover { color: var(--tx); }

/* ================= throw HUD ================= */
.hud { position: fixed; z-index: 40; left: 50%; bottom: calc(24px + var(--sab)); transform: translate(-50%, 24px); width: max-content; max-width: calc(100vw - 24px);
  display: flex; align-items: center; gap: 16px; padding: 14px 24px 12px 22px; opacity: 0; visibility: hidden; transition: opacity 0.5s, transform 0.6s var(--ease), visibility 0s 0.6s; }
body.is-throw .hud { opacity: 1; visibility: visible; transform: translate(-50%, 0); transition-delay: 0.2s, 0.2s, 0s; }
.hud > .lamp-hw { width: 28px; }
.hud__rd { display: flex; align-items: center; gap: 18px; }
.hud__count { display: flex; align-items: center; gap: 10px; }
.hud__count strong { min-width: 2.4em; padding: 7px 10px; font-size: 22px; text-align: center; letter-spacing: -0.02em; }
.hud__count strong.bump { animation: bump 0.45s var(--ease); }
@keyframes bump { 0% { color: #fff; text-shadow: 0 0 16px rgba(255, 200, 120, 1); } 100% { } }
.hud__hint { max-width: 17em; font: italic 300 15px/1.3 var(--display); color: var(--eng-2); }

/* ================= attack report: a measurement result plate ================= */
.report { position: fixed; z-index: 45; left: 50%; top: 50%; width: min(360px, calc(100vw - 32px)); padding: 20px 24px 18px; transform: translate(-50%, -46%); opacity: 0; visibility: hidden;
  transition: opacity 0.4s, transform 0.6s var(--ease), visibility 0s 0.6s; }
.report.is-on { opacity: 1; visibility: visible; transform: translate(-50%, -50%); transition-delay: 0s; }
.report__hd { display: grid; grid-template-columns: 24px 1fr auto; align-items: center; gap: 10px; margin: 0 4px 0 10px; }
.report__hd .lamp-hw { width: 24px; }
.report__hd .lamp-hw .lp--red { animation: blink 1s ease-in-out infinite; }
.report__t { margin: 14px 0 12px; font: 300 40px/1 var(--display); letter-spacing: -0.01em; font-variation-settings: 'opsz' 144, 'SOFT' 30; color: #f6f0e3; }
.report__lines { list-style: none; padding: 0; }
.report__lines li { display: grid; grid-template-columns: 34px 1fr auto; align-items: center; gap: 10px; padding: 8px 0; }
.report__lines li + li { border-top: 1px solid rgba(0, 0, 0, 0.55); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.07); }
.report__lines li .eng.small { color: var(--eng); }
.report__lines b { padding: 6px 9px; font-size: 13px; font-weight: 400; }
.report__btns { display: flex; gap: 22px; justify-content: flex-end; margin-top: 12px; }

/* ================= toast ================= */
.toast { position: fixed; z-index: 60; left: 50%; bottom: calc(88px + var(--sab)); transform: translate(-50%, 12px); max-width: calc(100vw - 32px); display: flex; align-items: center; gap: 12px; padding: 11px 18px 11px 14px;
  opacity: 0; pointer-events: none; transition: opacity 0.3s, transform 0.4s var(--ease); }
.toast .lamp-hw { width: 22px; }
.toast__m { font: 500 13px/1.35 var(--sans); color: var(--eng); text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.75); }
.toast.is-on { opacity: 1; transform: translate(-50%, 0); }
.noscript { position: fixed; inset: 0; z-index: 200; display: grid; place-items: center; margin: 0; background: var(--ink); }

/* ================= the console reacts to the scene ================= */
/* attack: lamps flicker, plates take a chromatic edge; hit: everything bolted down rattles */
body.is-surge .lamp-hw, body.is-surge .led { animation: surgel 0.18s steps(2) infinite; }
@keyframes surgel { 50% { filter: brightness(1.8) hue-rotate(-20deg); } }
body.is-surge .console, body.is-surge .gauge { box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.22), inset 0 -2px 0 rgba(0, 0, 0, 0.55), inset 0 0 0 1px rgba(0, 0, 0, 0.6), 0 2px 0 #0b0c0d, -3px 0 18px -4px rgba(255, 96, 82, 0.55), 3px 0 18px -4px rgba(127, 227, 238, 0.55), 0 34px 60px -24px rgba(0, 0, 0, 0.95); }
body.is-surge .temp__k span { color: #fff; text-shadow: -2px 0 8px rgba(255, 96, 82, 0.8), 2px 0 10px rgba(127, 227, 238, 0.9); }
body.is-hit .console, body.is-hit .gauge, body.is-hit .wrap.is-in .plate { animation: rattle 0.5s linear both; }
@keyframes rattle { 0% { translate: 0 0; } 15% { translate: -3px 1px; } 30% { translate: 3px -1px; } 45% { translate: -2px 0; } 60% { translate: 2px 1px; } 80% { translate: -1px 0; } 100% { translate: 0 0; } }
/* collapse: every lamp flashes green for a beat */
body.is-flip .lamp-hw .lp--green { animation: flipg 1.5s var(--ease) both; }
body.is-flip .led { animation: flipled 1.5s var(--ease) both; }
@keyframes flipg { 0%, 12% { opacity: 0; } 18%, 70% { opacity: 1; } 100% { opacity: 0; } }
@keyframes flipled { 18%, 70% { background: radial-gradient(circle at 42% 38%, #eaffd8, var(--green) 45%, #2c6a12); box-shadow: 0 0 0 1.5px #9c7134, 0 0 14px 2px rgba(143, 227, 106, 0.8); } }
/* ?moment=...: hold the peak of a reaction (still frames) */
body.is-hold .lamp-hw, body.is-hold .led, body.is-hold .lp { animation: none !important; }
body.is-hold.is-flip .lamp-hw .lp--green { opacity: 1; }

/* ================= narrower desktops ================= */
@media (max-width: 1280px) {
  :root { --hudw: 158px; --hudr: calc(var(--hudw) + 28px); }
  .gauge__n b { display: none; }
  .console { zoom: 0.9; }
}
@media (max-width: 1100px) and (min-width: 761px) {
  .panel { width: min(420px, 46vw); min-width: 0; }
  .hero__head { width: 60vw; }
  .bid__l { width: 46vw; min-width: 0; } .bid__r { width: 36vw; min-width: 0; }
  .gauge { width: 140px; padding: 14px; }
  .temp__k { font-size: 20px; }
  .gauge__n em { font-size: 10.5px; }
  .console { zoom: 0.78; }
}
@media (max-height: 820px) and (min-width: 761px) {
  :root { --hdr: 104px; }
  .gauge { top: calc(var(--hdr) + var(--sat) + 20px); }
  .vw { --step: 20px; }
  .ttl { font-size: clamp(38px, 3.6vw, 56px); }
  .lede { margin-top: 12px; font-size: 14.5px; }
  .pl { margin-top: 16px; padding-top: 14px; padding-bottom: 12px; }
  .rows > div { padding: 8px 0; } .spec { gap: 8px 14px; } .spec dd { padding: 8px 10px; }
  .steps__l li { padding: 9px 0; }
  .hero__tag { margin-top: 14px; font-size: 16px; }
}

/* ================= short & wide (landscape phones, 640x360 checks) ================= */
@media (max-height: 560px) and (min-width: 561px) {
  :root { --hdr: 46px; --hudw: 118px; --hudr: 128px; }
  .gauge { top: calc(var(--hdr) + 4px); padding: 9px 10px 9px; }
  .gauge .sc, .vw, .temp__l { display: none; }
  .temp__k { margin-top: 0; padding: 6px 8px; font-size: 15px; } .temp__s { margin-top: 4px; font-size: 9.5px; }
  .wrap--hero { padding-top: calc(var(--hdr) + 6px); padding-bottom: 8px; }
  .hero { gap: 6px; }
  .hero__head { width: 48vw; }
  .hero__eyebrow { font-size: 11px; } .hero__title { margin-top: 4px; font-size: clamp(30px, 10vh, 52px); } .hero__tag { margin-top: 6px; font-size: 11.5px; line-height: 1.35; max-width: 22em; }
  .console { zoom: 0.56; margin-top: 46px; }
  .panel { width: min(330px, 48vw); min-width: 0; }
  .kick { font-size: 9.5px; } .kick b { font-size: 11px; }
  .ttl, .bid__l .ttl { margin-top: 4px; font-size: 24px; }
  .lede { margin-top: 5px; font-size: 10.5px; line-height: 1.35; }
  .pl { margin-top: 8px; padding: 8px 12px 8px; }
  .plate > .sc { width: 8px; height: 8px; } .sc--tl, .sc--tr { top: 5px; } .sc--bl, .sc--br { bottom: 5px; } .sc--tl, .sc--bl { left: 5px; } .sc--tr, .sc--br { right: 5px; }
  .pl__hd { margin-bottom: 4px; } .eng.cap { font-size: 7px; }
  .rows > div { grid-template-columns: 16px 56px 1fr; gap: 0 8px; padding: 3px 0; } .rows .lamp-hw { width: 16px; } .rows dd { font-size: 9.5px; line-height: 1.3; }
  .spec { gap: 4px 8px; margin: 0; } .spec dt { font-size: 9px; } .spec dd { margin-top: 2px; padding: 5px 7px; font-size: 9.5px; }
  .qs__top { grid-template-columns: 16px auto 1fr; gap: 0 8px; } .qs__top .lamp-hw { width: 16px; } .qs__top .eng.small { font-size: 9.5px; } .qstate__mode { padding: 5px 7px; font-size: 10px; }
  .meter { margin-top: 6px; height: 12px; padding: 3px 6px; } .qs__row { margin-top: 4px; font-size: 9px; } .tagplate { margin-top: 6px; padding: 4px 10px; font-size: 7px; }
  .wrap--l, .wrap--r { padding-bottom: 8px; }
  .wrap--bid { padding-top: calc(var(--hdr) + 4px); padding-bottom: 30px; }
  .bid { gap: 12px; } .bid__l { width: 46vw; min-width: 0; } .bid__r { width: 36vw; min-width: 0; gap: 6px; margin-top: 0; }
  .steps { margin-top: 6px; padding: 4px 12px 4px; }
  .steps__l li { grid-template-columns: 16px 12px 1fr 22px; gap: 0 7px; padding: 3px 0; } .steps__l .lamp-hw { width: 16px; } .num { font-size: 13px; } .steps__l h3 { font-size: 10.5px; } .steps__l p, .legend { display: none; }
  .step-sw .tog__hw { width: 20px; }
  .steps:not(.is-ready) .steps__ready { display: none; } .step__xi:not(:empty) { padding-top: 2px; } .step__tip { font-size: 10px; } .step__a, .step__wait { font-size: 7px; padding: 3px 6px; } .steps__ready { padding: 4px 0 2px; font-size: 8px; } .num i { font-size: 11px; }
  .tokp { padding: 8px 12px 8px; } .tokp__g { gap: 4px 8px; margin-top: 4px; } .tokp__g dt { font-size: 9px; } .tokp__g dd { margin-top: 2px; padding: 5px 7px; font-size: 10px; }
  .ca { margin-top: 6px; gap: 0 8px; } .ca__w .eng.small { display: none; } .ca__v { padding: 6px 7px; font-size: 9.5px; } .ca__note { display: none; } .pbtn__hw { width: 26px; } .pbtn .eng.cap { font-size: 6.5px; }
  .keyp { grid-template-columns: 44px 1fr; gap: 0 10px; padding: 8px 12px; } .keyp .eng.lbl { font-size: 11px; } .keyp__sub { display: none; } .chart { margin-top: 4px; font-size: 10px; }
  .ftr { bottom: 8px; font-size: 9px; }
  .hud { padding: 8px 14px; gap: 10px; } .hud__hint { display: none; } .hud__count strong { font-size: 16px; padding: 5px 8px; }
}

/* ================= phones ================= */
@media (max-width: 760px) and (min-height: 561px) {
  :root { --hdr: 66px; --gut: 16px; }
  body { font-size: 13px; }
  .vig { background: linear-gradient(180deg, rgba(3, 6, 10, 0.9) 0%, rgba(3, 6, 10, 0.66) 20%, rgba(3, 6, 10, 0.1) 32%, rgba(3, 6, 10, 0) 44%, rgba(3, 6, 10, 0) 62%, rgba(3, 6, 10, 0.72) 76%, rgba(3, 6, 10, 0.92) 100%); }
  /* the gauge shrinks to a small temperature window under the header */
  .gauge { top: calc(var(--hdr) + var(--sat) + 4px); right: calc(var(--gut) + var(--sar)); width: auto; padding: 7px 9px 7px; border-radius: 8px; }
  .gauge .sc, .vw, .temp__l { display: none; }
  .temp__k { margin-top: 0; padding: 6px 8px; font-size: 16px; } .temp__s { max-width: 12ch; margin-top: 4px; font-size: 9.5px; }
  /* hero: title up top (clear of the rock), compact console at the bottom */
  .wrap--hero { padding: calc(var(--hdr) + var(--sat) + 12px) calc(12px + var(--sar)) calc(14px + var(--sab)) calc(12px + var(--sal)); }
  .hero__head { width: 100%; padding: 0 4px; }
  .hero__eyebrow { font-size: 14px; max-width: 60%; }
  .hero__title { margin-top: 8px; font-size: clamp(38px, 12vw, 50px); }
  .hero__tag { margin-top: 8px; max-width: 19.5em; font-size: 13.5px; line-height: 1.42; }
  .console { width: 100%; height: 150px; margin-top: 30px; }
  .console > .sc { width: 9px; height: 9px; } .console .sc--tl, .console .sc--tr { top: 6px; } .console .sc--bl, .console .sc--br { bottom: 6px; } .console .sc--tl, .console .sc--bl { left: 6px; } .console .sc--tr, .console .sc--br { right: 6px; }
  .c-atk { left: 10px; top: -30px; width: 112px; }
  .c-atk .eng.lbl { margin-top: -10px; font-size: 11.5px; line-height: 1.15; }
  .c-atk .eng.cap { display: none; }
  .g1 { left: 132px; top: 14px; bottom: 14px; }
  .c-tog { left: 140px; right: 8px; top: 10px; gap: 0; justify-content: space-between; }
  .c-tog .tog { width: 68px; }
  .tog__hw { width: 38px; }
  .tog .eng.lbl { margin-top: 1px; font-size: 11.5px; }
  .tog .eng.cap { display: none; }
  .g2, .strip { display: none; }
  .console .keysw { left: 146px; right: 14px; top: 90px; width: auto; display: grid; grid-template-columns: 46px auto 1fr; align-items: center; gap: 0 10px; text-align: left; }
  .console .keysw__hw { width: 46px; margin-top: -6px; }
  .console .keysw .eng.lbl { margin: 0; font-size: 12.5px; }
  .console .keysw .eng.cap { margin: 0; justify-self: end; font-size: 7.5px; }
  /* sections: plates at the bottom, the rock stays in the upper half */
  .wrap--l, .wrap--r, .wrap--bid { flex-direction: column; justify-content: flex-end; align-items: stretch; padding: 0 calc(var(--gut) + var(--sar)) calc(16px + var(--sab)) calc(var(--gut) + var(--sal)); }
  .panel, .bid__l { width: 100%; min-width: 0; }
  .kick { font-size: 12px; }
  .ttl { margin-top: 6px; font-size: 32px; }
  .lede { margin-top: 8px; font-size: 13.5px; line-height: 1.45; }
  .pl { margin-top: 12px; padding: 12px 14px 12px 16px; }
  .pl__hd { margin: 0 6px 6px 8px; }
  .pl__id { display: none; }
  .rows > div { grid-template-columns: 22px 1fr; gap: 2px 10px; padding: 8px 0; } .rows .lamp-hw { width: 22px; grid-row: span 2; } .rows dd { font-size: 12.5px; line-height: 1.35; }
  .spec { gap: 8px 10px; } .spec dt { font-size: 11.5px; } .spec dd { margin-top: 4px; padding: 8px 9px; font-size: 12px; }
  .qstate__mode { font-size: 13px; padding: 8px 10px; }
  .wrap--bid { padding-bottom: calc(40px + var(--sab)); }
  .bid { flex-direction: column; align-items: stretch; gap: 10px; }
  .bid__l .ttl { font-size: 30px; }
  .steps { margin-top: 10px; padding: 8px 22px 8px 18px; }
  .steps__l li { grid-template-columns: 22px 14px 1fr 30px; gap: 0 9px; padding: 6px 0; } .steps__l .lamp-hw { width: 22px; } .num { font-size: 18px; } .steps__l h3 { font-size: 13px; } .steps__l p, .legend { display: none; }
  .step-sw .tog__hw { width: 28px; margin-top: -12px; } .step-sw .t-lamp { display: none; }
  .steps:not(.is-ready) .steps__ready { display: none; } .step__tip { font-size: 12px; } .steps__ready { padding: 8px 0 2px; } .num i { font-size: 13px; }
  .bid__r { width: 100%; min-width: 0; gap: 10px; margin-top: 0; }
  .tokp { padding: 14px 18px 16px; }
  .tokp__hd { display: none; }
  .tokp__g { grid-template-columns: repeat(4, 1fr); gap: 6px; margin-top: 0; } .tokp__g dt { font-size: 10.5px; white-space: nowrap; } .tokp__g dd { margin-top: 3px; padding: 7px 6px; font-size: 12px; text-align: center; }
  .ca { margin-top: 8px; } .ca__w .eng.small { display: none; } .ca__v { margin-top: 0; padding: 10px; font-size: 11.5px; } .ca__note { display: none; }
  .pbtn__hw { width: 34px; } .ca .pbtn { margin-bottom: 0; }
  .keyp { grid-template-columns: 56px 1fr; gap: 0 14px; padding: 10px 16px; } .keyp .eng.lbl { font-size: 14px; } .keyp__sub { display: none; } .chart { margin-top: 6px; font-size: 13px; }
  .ftr { bottom: calc(10px + var(--sab)); font-size: 10px; gap: 10px; }
  .hud { width: calc(100vw - 24px); padding: 12px 16px; justify-content: space-between; } .hud__hint { display: none; }
  .report { padding: 18px 18px 16px; }
  .toast { bottom: calc(184px + var(--sab)); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
}

/* ================= effects (src/ui/fx.js) ================= */
/* word masks: headlines rise word by word on section enter */
.wm { display: inline-block; overflow: hidden; vertical-align: top; padding: 0.12em 0.06em 0.18em; margin: -0.12em -0.06em -0.18em; }
.wm > span { display: inline-block; transform: translate3d(0, 112%, 0); transition: transform 1.1s var(--ease) calc(0.06s + var(--i, 0) * 0.07s); will-change: transform; }
.wrap.is-in .wm > span, body.is-revealed .hero__title .wm > span { transform: none; }
.wrap:not(.is-in) .wm > span { transition-delay: 0s; transition-duration: 0.4s; }
body.is-revealed .hero__title .wm > span { transition-delay: calc(0.25s + var(--i, 0) * 0.09s); transition-duration: 1.4s; }
.wrap .wm > span { transition-delay: calc(0.2s + var(--i, 0) * 0.07s); }
/* section enter: the plate drops into place, its contents fade up */
.wrap .panel .plate, .wrap .bid__r .plate { opacity: 0; transform: translateY(14px); transition: opacity 0.5s var(--ease), transform 0.5s var(--ease); }
.wrap.is-in .panel .plate, .wrap.is-in .bid__r .plate { opacity: 1; transform: none; transition: opacity 0.9s var(--ease) 0.35s, transform 0.9s var(--ease) 0.35s; }
.wrap.is-in .bid__r .plate:nth-child(2) { transition-delay: 0.5s; }
.wrap .lede { opacity: 0; transition: opacity 0.5s var(--ease); }
.wrap.is-in .lede { opacity: 1; transition: opacity 0.9s var(--ease) 0.4s; }
/* desktop cursor: a lagging ring + a precise dot; the ring grows over the rock (mirrors the scene's canvas cursor) */
body.has-cur, body.has-cur #stage { cursor: none !important; }
body.has-cur a, body.has-cur button { cursor: pointer; }
.cur { position: fixed; inset: 0; z-index: 150; pointer-events: none; opacity: 0; transition: opacity 0.4s; }
.cur.is-on { opacity: 1; }
.cur__ring, .cur__dot { position: absolute; left: 0; top: 0; will-change: transform; }
.cur__ring::before { content: ''; position: absolute; left: -17px; top: -17px; width: 34px; height: 34px; border-radius: 50%;
  border: 1px solid rgba(251, 232, 180, 0.5); transform: scale(var(--s, 1)); transition: transform 0.5s var(--ease), border-color 0.3s, background-color 0.3s, box-shadow 0.3s; }
.cur__dot::before { content: ''; position: absolute; left: -2.5px; top: -2.5px; width: 5px; height: 5px; border-radius: 50%; background: var(--g1); box-shadow: 0 0 8px rgba(255, 194, 74, 0.8); transition: opacity 0.2s, transform 0.3s var(--ease); }
.cur.is-ui .cur__ring { --s: 0.55; } .cur.is-ui .cur__dot::before { opacity: 0; }
.cur.is-rock .cur__ring { --s: 2.1; } .cur.is-rock .cur__ring::before { border-color: rgba(251, 232, 180, 0.75); background-color: rgba(226, 189, 114, 0.06); box-shadow: 0 0 24px -6px rgba(226, 189, 114, 0.6); }
.cur.is-grab .cur__ring { --s: 1.45; } .cur.is-down .cur__dot::before { transform: scale(0.6); }
.cur.is-down .cur__ring::before { transform: scale(calc(var(--s, 1) * 0.82)); }
/* frost / glitch flash when the descent passes a temperature stage */
.frost { position: fixed; inset: 0; z-index: 25; pointer-events: none; opacity: 0; mix-blend-mode: screen;
  background: radial-gradient(ellipse 75% 70% at 50% 50%, transparent 52%, rgba(150, 225, 245, 0.16) 82%, rgba(214, 248, 255, 0.34) 100%),
    repeating-linear-gradient(0deg, rgba(218, 252, 255, 0.045) 0 1px, transparent 1px 3px); }
.frost::after { content: ''; position: absolute; left: 0; right: 0; top: 38%; height: 7px; background: linear-gradient(90deg, transparent, rgba(218, 252, 255, 0.35), transparent); opacity: 0; }
.frost.is-on { animation: frost 1s var(--ease) both; }
.frost.is-on::after { animation: glitchband 0.42s steps(4) both; }
@keyframes frost { 0% { opacity: 0; transform: none; } 7% { opacity: 1; transform: translate3d(-3px, 0, 0); } 13% { transform: translate3d(2px, 0, 0); } 19% { opacity: 0.7; transform: none; } 100% { opacity: 0; } }
@keyframes glitchband { 0% { opacity: 1; transform: translate3d(0, 0, 0); } 33% { transform: translate3d(0, 90px, 0) scaleY(0.4); } 66% { transform: translate3d(0, -40px, 0) scaleY(1.6); } 100% { opacity: 0; transform: translate3d(0, 160px, 0); } }
@media (hover: none) { .cur { display: none; } }

/* fixed screenshots: final states, no motion */
body.is-shot *, body.is-shot *::before, body.is-shot *::after { transition: none !important; }
body.is-shot .strip__go i, body.is-shot .grain { animation: none; }

/* clean frames: ?ui=0 */
body.no-ui #app, body.no-ui .hdr, body.no-ui .gauge, body.no-ui .layers, body.no-ui .hud, body.no-ui .report, body.no-ui .toast, body.no-ui .loader, body.no-ui .vig, body.no-ui .grain { display: none !important; }

/* film grain over the UI layers (the scene has its own): ties the flat UI into the same optics */
.grain { position: fixed; inset: -50%; z-index: 48; pointer-events: none; opacity: 0.075; mix-blend-mode: overlay;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0.5 0 0 0 0 0.5 0 0 0 0 0.5 0 0 0 1.6 -0.3'/%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23n)'/%3E%3C/svg%3E") 0 0 / 180px 180px;
  animation: grain 0.9s steps(5) infinite; }
@keyframes grain { 0% { transform: translate3d(0, 0, 0); } 20% { transform: translate3d(-37px, 21px, 0); } 40% { transform: translate3d(18px, -42px, 0); } 60% { transform: translate3d(-12px, 33px, 0); } 80% { transform: translate3d(41px, 9px, 0); } 100% { transform: translate3d(0, 0, 0); } }
@media (prefers-reduced-motion: reduce) { .grain { animation: none; } }

/* compatibility tokens for css/pov.css (POV HUD), restyled into the console language */
:root { --reg: linear-gradient(180deg, #2b2e32, #1c1d20); --cy-d: rgba(0, 0, 0, 0.6); --cy-hi: #ecdfc2; }
.povhud { border-radius: 10px; box-shadow: 0 2px 0 #0b0c0d, 0 24px 50px -20px rgba(0, 0, 0, 0.95); }
.povhud .gate, .povhud__g { display: grid; place-items: center; font: italic 400 22px/1 var(--display); color: #3a2709;
  background: linear-gradient(180deg, #f6dfa6, #cfa45c 40%, #9c7134); box-shadow: inset 0 1px 0 rgba(255, 246, 220, 0.7), inset 0 0 0 1px rgba(58, 39, 9, 0.5); border-radius: 10px 0 0 10px; }
.povhud__rd { border: 0; box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), inset 0 -2px 0 rgba(0, 0, 0, 0.55); }
.povhud__k { font: 600 9.5px/1 var(--sans); letter-spacing: 0.14em; color: var(--eng); }
.povhud__x { border: 0; border-radius: 0 10px 10px 0; font-family: var(--sans); font-weight: 600; color: var(--eng); background: linear-gradient(180deg, #34373b, #1c1d20);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.22), inset 1px 0 0 rgba(0, 0, 0, 0.6); }
.povhud__x:hover, .povhud__x:focus-visible { color: #fff; background: linear-gradient(180deg, #3d4045, #232427); }
/* a local shade behind the floating headline + lede (the gold chandelier gets bright behind some sections) */
.panel::before { content: ''; position: absolute; z-index: -1; left: -90px; right: -90px; top: -70px; height: calc(var(--shade, 300px) + 140px); pointer-events: none;
  background: radial-gradient(closest-side, rgba(3, 6, 10, 0.78), rgba(3, 6, 10, 0.5) 55%, rgba(3, 6, 10, 0)); }
.bid__l::before { --shade: 150px; }
@media (max-width: 760px) and (min-height: 561px) { .panel::before { left: -40px; right: -40px; top: -50px; height: calc(100% + 80px); } }

/* ================= header: rotary selector ================= */
/* Left: the logo nameplate. Centre: one chunky knurled brass knob on a stadium escutcheon is the navigation (engraved arc
   scale, a lamp per station, the pointer swings to the active section with a little mechanical overshoot). Right: the
   utility plate (sound + night bat toggles, the brass Buy key). Phones / short windows: a mini knob plate that opens the dial. */
.hdr { position: fixed; inset: 0 0 auto 0; z-index: 30; padding: calc(var(--sat) + 12px) calc(var(--gut) + var(--sar)) 0 calc(var(--gut) + var(--sal)); pointer-events: none; transition: opacity 1s var(--ease) 0.4s; }
body.is-loading .hdr, body.is-loading .gauge { opacity: 0; }
.hdr__in { --hz: 1; position: relative; height: 108px; zoom: var(--hz); }
.hdr .plate { border-radius: 12px; pointer-events: auto; }
/* nameplate */
.np { position: absolute; left: 0; top: 18px; display: flex; align-items: center; gap: 14px; height: 58px; padding: 0 24px 0 9px; white-space: nowrap; }
.np__well { display: grid; place-items: center; width: 58px; height: 40px; border-radius: 7px; background: radial-gradient(70% 90% at 50% 40%, #16120b, #050506 80%);
  box-shadow: inset 0 3px 6px rgba(0, 0, 0, 0.95), inset 0 0 0 1px rgba(0, 0, 0, 0.9), 0 1px 0 rgba(255, 255, 255, 0.14); }
.np__well img { display: block; width: auto; height: 25px; filter: drop-shadow(0 0 7px rgba(240, 200, 120, 0.35)); transition: filter 0.3s; }
.np:hover .np__well img { filter: drop-shadow(0 0 11px rgba(241, 217, 154, 0.7)); }
.np__t { display: flex; flex-direction: column; gap: 5px; }
.np__t b { font: 400 20px/1 var(--display); font-variation-settings: 'opsz' 36; color: var(--eng); text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.8), 0 1px 0 rgba(255, 255, 255, 0.14); }
.np__t small { font: 500 8.5px/1 var(--mono); letter-spacing: 0.2em; text-transform: uppercase; color: var(--eng-3); }
/* the dial */
.hdr .dl { position: absolute; left: 50%; top: 0; width: 380px; height: 106px; margin-left: -190px; border-radius: 53px; }
.hdr .dl::after { background: radial-gradient(220px 80px at 50% 0, rgba(255, 240, 210, 0.1), transparent 70%); }
.dl__sc { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.dl__l { position: absolute; z-index: 2; transform: translate(calc(-100% + 9px), -50%); display: flex; flex-direction: row-reverse; align-items: center; gap: 8px; padding: 4px 6px; cursor: pointer;
  font: 600 10.5px/1 var(--sans); letter-spacing: 0.17em; text-transform: uppercase; color: var(--eng-3); text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.85), 0 1px 0 rgba(255, 255, 255, 0.1);
  transition: color 0.3s, text-shadow 0.3s; white-space: nowrap; -webkit-tap-highlight-color: transparent; }
.dl__l .led { width: 6px; height: 6px; box-shadow: 0 0 0 1px #6b4a1d, 0 0 0 2px rgba(0, 0, 0, 0.5), inset 0 1px 1px rgba(0, 0, 0, 0.7); background: radial-gradient(circle at 40% 35%, #3a2a12, #120b03 75%); transition: background 0.3s, box-shadow 0.3s; }
.dl__l--r { flex-direction: row; transform: translate(-9px, -50%); }
.dl__l:hover, .dl__l.is-hov { color: var(--eng); }
.dl__l.is-active { color: #fff1d0; text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.85), 0 0 12px rgba(255, 194, 74, 0.45); }
.dl__l.is-active .led { background: radial-gradient(circle at 42% 38%, #fff2c8, var(--amber) 45%, #a55a06); box-shadow: 0 0 0 1px #9c7134, 0 0 0 2px rgba(0, 0, 0, 0.5), 0 0 9px 1px rgba(255, 194, 74, 0.8); }
/* the knob: --a = pointer angle (eased with a slight overshoot), --h = ghost tick (hovered / keyboard-selected station) */
.kb { --a: 0deg; --h: 0deg; display: block; border-radius: 50%; -webkit-tap-highlight-color: transparent; }
.dl .kb { position: absolute; z-index: 3; left: 190px; top: 66px; width: 66px; height: 66px; margin: -33px 0 0 -33px; cursor: grab; touch-action: none; }
.dl .kb.is-drag { cursor: grabbing; }
.kb > span { position: absolute; border-radius: 50%; }
.kb__sh { inset: -2px; background: rgba(0, 0, 0, 0.75); transform: translate(3px, 7px); filter: blur(6px); }
.kb__sk { inset: -6px; background: radial-gradient(circle at 50% 40%, #2a2c30, #0d0e10 70%); box-shadow: inset 0 2px 3px rgba(0, 0, 0, 0.9), 0 1px 0 rgba(255, 255, 255, 0.12); }
.kb__kn, .kb__pt { inset: 0; transform: rotate(var(--a)); transition: transform 0.7s cubic-bezier(0.45, -0.1, 0.2, 1.25), filter 0.3s; }
.kb__kn { background: repeating-conic-gradient(from 0deg, #2a2216 0 2.5deg, #c9a160 3.5deg 5deg, #5e4520 6deg 7.5deg, #2a2216 8deg 10deg); }
.kb.is-drag .kb__kn, .kb.is-drag .kb__pt { transition-duration: 0.18s; transition-timing-function: var(--ease); }
.kb__lt { inset: 0; pointer-events: none; background: radial-gradient(circle at 34% 24%, rgba(255, 244, 214, 0.55), transparent 45%), radial-gradient(circle at 70% 85%, rgba(0, 0, 0, 0.55), transparent 55%);
  box-shadow: inset 0 0 0 1px rgba(30, 18, 2, 0.9), inset 0 2px 1px rgba(255, 240, 200, 0.35); }
.kb__cap { inset: 9px; background: conic-gradient(from 200deg, #6b4a1d, #f6dfa6 10%, #a77c3c 22%, #e9cd8c 34%, #7a5524 48%, #fbe7b4 60%, #9c7134 72%, #e2bd72 86%, #6b4a1d);
  box-shadow: 0 2px 3px rgba(0, 0, 0, 0.7), inset 0 1px 0 rgba(255, 246, 220, 0.7), inset 0 -1px 2px rgba(60, 36, 8, 0.8); }
.kb__cap::after { content: ''; position: absolute; inset: 0; border-radius: 50%; background: radial-gradient(circle at 36% 30%, rgba(255, 255, 255, 0.45), transparent 40%); }
.kb__pt { pointer-events: none; border-radius: 0; }
.kb__pt::before { content: ''; position: absolute; left: 50%; top: 11px; width: 4px; height: 19px; margin-left: -2px; border-radius: 2px;
  background: linear-gradient(180deg, #fff8e6, #efe2c4); box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(40, 24, 4, 0.8); }
.kb__pt::after { content: ''; position: absolute; left: 50%; top: -11px; width: 7px; height: 7px; margin-left: -3.5px; border-radius: 50%;
  background: radial-gradient(circle at 42% 38%, #fff2c8, var(--amber) 45%, #a55a06); box-shadow: 0 0 0 1px #3a2709, 0 0 10px 2px rgba(255, 194, 74, 0.8); }
.kb__gh { inset: 0; border-radius: 0; transform: rotate(var(--h)); opacity: 0; transition: opacity 0.25s, transform 0.3s var(--ease); pointer-events: none; }
.kb__gh::after { content: ''; position: absolute; left: 50%; top: -12px; width: 9px; height: 9px; margin-left: -4.5px; border-radius: 50%; border: 1px dashed rgba(255, 210, 140, 0.9); }
.kb.is-ghost .kb__gh { opacity: 1; }
.dl .kb:hover .kb__kn, .dl .kb:focus-visible .kb__kn { filter: brightness(1.12); }
.dl .kb:focus-visible { outline: none; }
.dl .kb:focus-visible .kb__sk { box-shadow: inset 0 2px 3px rgba(0, 0, 0, 0.9), 0 0 0 1.5px rgba(255, 194, 74, 0.75), 0 0 14px rgba(255, 194, 74, 0.35); }
/* utility plate */
.ut { position: absolute; right: 0; top: 18px; display: flex; align-items: center; gap: 16px; height: 58px; padding: 0 22px; }
.ut > .sc { position: absolute; top: 50%; width: 9px; height: 9px; margin-top: -4.5px; } .ut > .sc--l { left: 7px; } .ut > .sc--r { right: 7px; }
.ut__g.tog { flex-direction: row; align-items: center; gap: 8px; }
.ut__g .tog__hw { width: 22px; }
.ut__l { display: flex; flex-direction: column; gap: 5px; text-align: left; }
.ut__l .eng.cap { display: flex; align-items: center; gap: 5px; margin: 0; font-size: 8.5px; line-height: 1; white-space: nowrap; }
.ut__l .eng.cap svg { flex: none; }
.ut__l .eng.cap b { font-weight: 600; color: var(--eng-2); transition: color 0.3s, text-shadow 0.3s; }
.ut__g:hover .eng.cap, .ut__g:focus-visible .eng.cap { color: var(--eng); }
body.is-sound .snd .eng.cap b, body.is-night .nite .eng.cap b { color: var(--amber); text-shadow: 0 0 8px rgba(255, 194, 74, 0.5); }
.snd__w { display: none; }
body.is-sound .snd__x { display: none; } body.is-sound .snd__w { display: inline; }
.nite__g { display: grid; } .nite__g svg { grid-area: 1 / 1; transition: opacity 0.3s; }
.nite__moon { opacity: 0; } body.is-night .nite__sun { opacity: 0; } body.is-night .nite__moon { opacity: 1; }
.hg { flex: none; width: 2px; height: 34px; background: linear-gradient(90deg, rgba(0, 0, 0, 0.65) 50%, rgba(255, 255, 255, 0.1) 50%); }
.keysw--hdr { flex-direction: row; align-items: center; gap: 9px; }
.keysw--hdr .keysw__hw { width: 40px; margin-top: -4px; }
.keysw--hdr .eng.lbl { margin: 0; font-size: 14px; }
body.is-latched .js-buy-hdr .k-buy { fill: var(--amber); }
/* phone mini plate (hidden on desktop) */
.mk { display: none; }

/* widths: the plates give up their words before they touch */
@media (max-width: 1340px) { .keysw--hdr .eng.lbl { display: none; } .hg--k { display: none; } .ut { gap: 14px; } }
@media (max-width: 1120px) { .np__t, .ut__l { display: none; } .np { padding-right: 9px; } .ut { gap: 12px; padding: 0 20px; } }
/* heights: shorter windows get a slightly smaller header */
@media (max-height: 880px) and (min-width: 761px) and (min-height: 561px) { :root { --hdr: 116px; } .hdr__in { --hz: 0.88; } }
@media (max-height: 820px) and (min-width: 761px) and (min-height: 561px) { :root { --hdr: 104px; } .hdr { padding-top: calc(var(--sat) + 8px); } .hdr__in { --hz: 0.82; } }
@media (max-height: 720px) and (min-width: 761px) and (min-height: 561px) { :root { --hdr: 96px; } .hdr__in { --hz: 0.76; } }

/* compact: phones and short landscape windows. The mini knob plate shows the current station; a tap opens the full dial. */
@media (max-width: 760px), (max-height: 560px) {
  .hdr { padding: calc(var(--sat) + 10px) calc(10px + var(--sar)) 0 calc(10px + var(--sal)); }
  .hdr__in { --hz: 1; height: 52px; }
  .np { top: 0; height: 52px; gap: 10px; padding: 0 7px; }
  .np__well { width: 46px; height: 34px; } .np__well img { height: 20px; }
  .np__t, .ut__l, .ut > .sc, .hg, .keysw--hdr { display: none; }
  .ut { top: 0; height: 52px; gap: 14px; padding: 0 15px; }
  .ut__g .tog__hw { width: 19px; }
  .mk { position: absolute; left: 68px; right: 92px; top: 0; height: 52px; display: flex; align-items: center; gap: 12px; padding: 0 14px 0 10px; border: 0; cursor: pointer; text-align: left; color: inherit; font: inherit; -webkit-tap-highlight-color: transparent; }
  .mk .kb { position: relative; width: 34px; height: 34px; flex: none; }
  .mk .kb__cap { inset: 5px; } .mk .kb__sk { inset: -3px; } .mk .kb__sh { transform: translate(2px, 4px); filter: blur(4px); }
  .mk .kb__pt::before { top: 6px; width: 3px; height: 9px; margin-left: -1.5px; } .mk .kb__pt::after { display: none; }
  .mk__t { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
  .mk__t b { font: 600 13px/1 var(--sans); letter-spacing: 0.14em; text-transform: uppercase; color: #fff1d0; text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.85), 0 0 10px rgba(255, 194, 74, 0.35); white-space: nowrap; }
  .mk__t small { font: 400 9px/1 var(--mono); color: var(--rd); }
  .mk__c { margin-left: auto; font: 600 8px/1 var(--sans); letter-spacing: 0.16em; text-transform: uppercase; color: var(--eng-3); transition: color 0.3s; }
  .hdr.is-open .mk__c { color: var(--amber); }
  .mk:active .kb { transform: scale(0.96); }
  .hdr .dl { top: 64px; z-index: 2; transform: translateY(-6px) scale(0.86); transform-origin: 50% 0; opacity: 0; visibility: hidden;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.22), inset 0 -2px 0 rgba(0, 0, 0, 0.55), inset 0 0 0 1px rgba(0, 0, 0, 0.6), 0 2px 0 #0b0c0d, 0 24px 50px rgba(0, 0, 0, 0.85);
    transition: opacity 0.3s, transform 0.4s var(--ease), visibility 0s 0.4s; }
  .hdr.is-open .dl { opacity: 1; visibility: visible; transform: scale(0.86); transition-delay: 0s; }
  .dl__l { padding: 8px 6px; font-size: 11.5px; }
}
@media (max-height: 560px) and (min-width: 561px) {
  .hdr { padding-top: calc(var(--sat) + 4px); }
  .hdr__in { height: 38px; }
  .np, .mk, .ut { height: 38px; border-radius: 9px; }
  .np__well { width: 38px; height: 26px; } .np__well img { height: 16px; }
  .mk { left: 58px; right: auto; width: 210px; gap: 10px; }
  .mk .kb { width: 26px; height: 26px; } .mk__t { flex-direction: row; align-items: baseline; gap: 8px; } .mk__t b { font-size: 11px; }
  .ut { padding: 0 12px; gap: 12px; } .ut__g .tog__hw { width: 15px; }
  .hdr .dl { top: 44px; left: 58px; margin-left: 0; transform-origin: 0 0; transform: translateY(-6px) scale(0.8); }
  .hdr.is-open .dl { transform: scale(0.8); }
}
body.is-shot .kb > span, body.is-shot .dl__l, body.is-shot .dl__l .led { transition: none !important; }
@media (prefers-reduced-motion: reduce) { .kb__kn, .kb__pt { transition-duration: 0.2s; transition-timing-function: ease-out; } }

/* device tiers (html[data-q] = src/tier.js result): on mid / low the compositor work around the WebGL canvas is trimmed.
   The UI grain is a constant mid-grey in overlay mode (a visual no-op) but forces a full-screen blend over the canvas every
   frame, so it is dropped there. */
html[data-q='mid'] .grain, html[data-q='low'] .grain { display: none; }

/* Pre-launch scam warning: fixed hazard bar above everything (static HTML so it shows before JS / during the loader). */
.scam { position: fixed; inset: 0 0 auto 0; z-index: 9999; box-sizing: border-box; height: calc(var(--ban) + env(safe-area-inset-top, 0px));
  padding: env(safe-area-inset-top, 0px) 16px 0; display: flex; align-items: center; justify-content: center; gap: 14px;
  font: 600 13.5px/1.25 "Geist", system-ui, sans-serif; letter-spacing: 0.01em; color: #1a1205; text-align: center;
  background: repeating-linear-gradient(135deg, #f2b33a 0 22px, #e8a52a 22px 44px);
  box-shadow: 0 1px 0 rgba(255, 220, 150, 0.6) inset, 0 6px 18px rgba(0, 0, 0, 0.45); }
.scam b { font-weight: 800; }
.scam__short { display: none; }
.scam__lamp { flex: 0 0 auto; width: 10px; height: 10px; border-radius: 50%; background: #d4231b;
  box-shadow: 0 0 0 2px #1a1205, 0 0 10px 2px rgba(255, 60, 40, 0.8); animation: scamBlink 1.1s steps(2, start) infinite; }
@keyframes scamBlink { to { visibility: hidden; } }
@media (prefers-reduced-motion: reduce) { .scam__lamp { animation: none; } }
@media (max-width: 720px) { :root { --ban: 46px; } .scam { font-size: 12.5px; gap: 8px; padding-left: 10px; padding-right: 10px; } .scam__long { display: none; } .scam__short { display: inline; } }
body.no-ui .scam { display: none; }
