@font-face { font-family: "Inter"; src: url("/assets/fonts/Inter.woff2") format("woff2"); font-weight: 300 800; font-display: swap; }
@font-face { font-family: "IBM Plex Mono"; src: url("/assets/fonts/PlexMono-400.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "IBM Plex Mono"; src: url("/assets/fonts/PlexMono-500.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Permanent Marker"; src: url("/assets/fonts/PermanentMarker.woff2") format("woff2"); font-display: swap; }

:root {
  --bg: #030303;
  --text: #ece8e1;
  --dim: #a09a90;
  --faint: #635e57;
  --line: #1f1d1a;
  --red: #e5342e;
  --osd: #8dffa8;           /* the set's own channel readout */
  --vcr: #f2f4f8;           /* white on the tube */
  --font-sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, "Cascadia Mono", Consolas, monospace;
  --font-marker: "Permanent Marker", "Segoe Print", cursive;
  --gutter: clamp(16px, 4vw, 40px);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 400 17px/1.6 var(--font-sans); -webkit-font-smoothing: antialiased; overflow-x: hidden; font-feature-settings: "cv11", "ss01"; }
img, video { display: block; }
a { color: inherit; }
button { font: inherit; color: inherit; }
::selection { background: var(--red); color: #fff; }
:focus-visible { outline: 2px solid var(--red); outline-offset: 3px; }
.wrap { width: 100%; max-width: 1080px; margin: 0 auto; padding: 0 var(--gutter); }
.touch-only { display: none !important; }
.touch .touch-only { display: block !important; }
.sr-only { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.label { font-family: var(--font-mono); font-weight: 500; font-size: 12px; letter-spacing: 0.16em; text-transform: uppercase; }

/* ================================================================ header */

.top {
  position: fixed; inset: 0 0 auto 0; z-index: 40;
  display: flex; align-items: center; justify-content: flex-end; gap: 16px;
  padding: 20px var(--gutter);
  font-family: var(--font-mono); font-weight: 500; font-size: 12px; letter-spacing: 0.16em; text-transform: uppercase;
  pointer-events: none;
}
.top > * { pointer-events: auto; }
.top a, .top button { text-decoration: none; color: var(--dim); background: none; border: 0; padding: 6px 0; cursor: pointer; letter-spacing: inherit; text-transform: inherit; font-weight: inherit; transition: color 0.15s; }
.top a:hover, .top button:hover { color: var(--text); }
.top nav { display: flex; align-items: center; gap: clamp(16px, 2.6vw, 30px); }
.sound { display: inline-flex; align-items: center; gap: 8px; }
.sound::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--faint); }
.sound[aria-pressed="true"] { color: var(--text) !important; }
.sound[aria-pressed="true"]::before { background: var(--osd); box-shadow: 0 0 8px var(--osd); }
.top.scrolled { background: linear-gradient(180deg, rgba(3,3,3,0.92), rgba(3,3,3,0)); }
@media (max-width: 560px) { .top { padding-top: 14px; font-size: 11px; } .top .hide-sm { display: none; } }

/* ================================================================ the room */

.room {
  position: relative; height: 100vh; height: 100svh; min-height: 540px; overflow: hidden;
  background: var(--bg);
}
.stage { position: absolute; left: 0; top: 0; width: 3200px; height: 2000px; transform-origin: 0 0; }
.stage.zooming { transition: transform 0.9s cubic-bezier(0.6, 0, 0.3, 1); }
.room-img { position: absolute; inset: 0; width: 3200px; height: 2000px; user-select: none; -webkit-user-drag: none; }
/* Fade the render's edges into the page so it never shows a border, whatever the window shape. */
.stage::after {
  content: ""; position: absolute; inset: -2px; pointer-events: none; z-index: 3;
  background:
    linear-gradient(90deg, var(--bg) 0, transparent 9%, transparent 91%, var(--bg) 100%),
    linear-gradient(180deg, var(--bg) 0, transparent 8%, transparent 78%, var(--bg) 100%);
}

/* Moving film grain over the whole room, the picture on the tube included. tv.js moves it every frame. */
.grain {
  position: absolute; left: -256px; top: -256px; right: -256px; bottom: -256px; z-index: 6; pointer-events: none;
  background-image: var(--grain-tile); background-size: var(--grain-size, 256px) var(--grain-size, 256px);
  opacity: 0.075; will-change: transform;
}

/* Light from the picture falling on the set and the floor. Colour and strength follow the picture. */
.glow { position: absolute; pointer-events: none; mix-blend-mode: screen; opacity: calc(var(--lum, 0.4) * var(--power, 1)); transition: opacity 0.18s linear; z-index: 1; }
/* Bloom: exactly the tube's outline, glowing outward onto the bezel. */
.glow.bloom { left: 1165px; top: 675px; width: 768px; height: 577px; border-radius: 70px / 60px; box-shadow: 0 0 70px 14px rgb(var(--glow, 120 150 200) / 0.32), 0 0 180px 40px rgb(var(--glow, 120 150 200) / 0.10); }
/* Spill: the stand's top and front, starting at the cabinet's foot, centred under the picture, as wide as the stand. */
.glow.spill { left: 1040px; top: 1346px; width: 1220px; height: 600px; background: radial-gradient(ellipse 48% 70% at 41% 0%, rgb(var(--glow, 120 150 200) / 0.26), rgb(var(--glow, 120 150 200) / 0.08) 55%, transparent 100%); }

/* ---------------------------------------------------------------- the picture tube */

.screen {
  position: absolute; left: 1165px; top: 675px; width: 768px; height: 577px; z-index: 2;
  overflow: hidden; background: #020303; container-type: size;
  -webkit-mask-image: url("/assets/room/screen-mask.png"); mask-image: url("/assets/room/screen-mask.png");
  -webkit-mask-size: 100% 100%; mask-size: 100% 100%;
}
.picture { position: absolute; inset: 0; transform-origin: 50% 50%; }
.power-on .picture { animation: power-on 0.75s cubic-bezier(0.2, 0.7, 0.2, 1) both; }
.power-off .picture { animation: power-off 0.45s cubic-bezier(0.6, 0, 0.9, 0.4) both; }
@keyframes power-on {
  0% { transform: scale(0.002, 0.002); filter: brightness(8); }
  25% { transform: scale(1, 0.006); filter: brightness(6); }
  55% { transform: scale(1, 1.02); filter: brightness(1.6); }
  100% { transform: none; filter: none; }
}
@keyframes power-off {
  0% { transform: none; filter: none; }
  60% { transform: scale(1, 0.006); filter: brightness(5); }
  100% { transform: scale(0, 0.004); filter: brightness(10); opacity: 0; }
}
.off .picture { opacity: 0; }

.channel { position: absolute; inset: 0; }
.channel[hidden] { display: block; visibility: hidden; }
.channel video, .channel .still { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; filter: saturate(1.08) contrast(1.06); }

/* Lower third: what's on, and what you can do with it. (Sizes are in tube pixels; the set is scaled.) */
.lower {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 70px 42px 36px;
  background: linear-gradient(0deg, rgba(0,0,0,0.9) 0%, rgba(0,0,0,0.62) 55%, transparent 100%);
  font-family: var(--font-sans); color: var(--vcr);
  text-shadow: 0 0 12px rgba(0, 0, 0, 0.6), -1px 0 rgba(255, 70, 70, 0.28), 1px 0 rgba(70, 220, 255, 0.28);
}
.lower .kicker { margin: 0 0 10px; font-family: var(--font-mono); font-weight: 500; font-size: 17px; letter-spacing: 0.18em; color: rgba(242, 244, 248, 0.66); text-transform: uppercase; }
.lower h2, .lower h1 { margin: 0; font-weight: 700; font-size: 58px; line-height: 0.98; letter-spacing: -0.025em; }
.lower p.line { margin: 12px 0 22px; font-size: 21px; line-height: 1.38; max-width: 30em; color: rgba(242, 244, 248, 0.82); }
.tv-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.tv-btn {
  display: inline-flex; align-items: center; gap: 12px; padding: 13px 22px;
  font-family: var(--font-sans); font-weight: 600; font-size: 19px; letter-spacing: 0.06em; line-height: 1; text-transform: uppercase; text-decoration: none;
  color: #0a0a0a; background: var(--vcr); border: 0; border-radius: 3px; cursor: pointer; text-shadow: none;
  box-shadow: 0 0 22px rgba(242, 244, 248, 0.25);
}
.tv-btn:hover { background: #fff; }
.tv-btn.ghost { color: var(--vcr); background: rgba(0,0,0,0.3); box-shadow: inset 0 0 0 1.5px rgba(242,244,248,0.6); }
.tv-btn.ghost:hover { background: rgba(242,244,248,0.12); }
.tri { width: 0; height: 0; border-style: solid; border-width: 0.36em 0 0.36em 0.58em; border-color: transparent transparent transparent currentColor; }

/* On-screen display: channel number, tape mode. */
.osd { position: absolute; inset: 0; z-index: 6; pointer-events: none; font-family: var(--font-mono); font-weight: 500; color: var(--osd); text-transform: uppercase;
  text-shadow: 0 0 2px #000, 0 0 12px rgba(141, 255, 168, 0.55); }
.osd-ch { position: absolute; top: 34px; right: 42px; font-size: 46px; line-height: 1; letter-spacing: 0.04em; opacity: 0; transition: opacity 0.2s; }
.osd-ch.show { opacity: 1; }
.osd-mode { position: absolute; top: 40px; left: 42px; font-size: 20px; letter-spacing: 0.16em; line-height: 1; color: var(--vcr); display: flex; align-items: center; gap: 10px;
  text-shadow: 0 0 2px #000, 0 0 10px rgba(220,235,255,0.4); }
.osd-count { position: absolute; bottom: 38px; right: 42px; font-size: 17px; letter-spacing: 0.12em; color: var(--vcr); opacity: 0.7; }

.ch-step {
  position: absolute; z-index: 7; top: 50%; width: 64px; height: 120px; margin-top: -60px;
  display: flex; align-items: center; justify-content: center;
  background: none; border: 0; cursor: pointer; opacity: 0; transition: opacity 0.2s;
  font-family: var(--font-sans); font-weight: 300; font-size: 72px; color: var(--vcr); text-shadow: 0 0 10px rgba(0,0,0,0.9);
}
.ch-step.prev { left: 6px; } .ch-step.next { right: 6px; }
.screen:hover .ch-step, .ch-step:focus-visible, .touch .ch-step { opacity: 0.75; }
.ch-step:hover { opacity: 1 !important; }

/* The tube itself: scanlines, curvature shading, glass, a slow roll bar, and static between channels. */
.crt { position: absolute; inset: 0; z-index: 8; pointer-events: none;
  background:
    radial-gradient(ellipse 120% 90% at 30% 18%, rgba(255,255,255,0.07), transparent 38%),
    radial-gradient(ellipse at 50% 50%, transparent 58%, rgba(0,0,0,0.55) 100%),
    repeating-linear-gradient(0deg, rgba(0,0,0,0.26) 0 2px, transparent 2px 4px);
}
.roll { position: absolute; left: 0; right: 0; height: 22%; top: -25%; z-index: 7; pointer-events: none;
  background: linear-gradient(180deg, transparent, rgba(255,255,255,0.045) 45%, rgba(255,255,255,0.06) 50%, transparent);
  animation: roll 9s linear infinite; }
@keyframes roll { to { top: 105%; } }
.flicker { animation: flicker 4s steps(1) infinite; }
@keyframes flicker { 0%, 100% { opacity: 1; } 31% { opacity: 0.94; } 32% { opacity: 1; } 67% { opacity: 0.97; } 68% { opacity: 1; } }
.snow { position: absolute; inset: 0; z-index: 5; width: 100%; height: 100%; opacity: 0; pointer-events: none; image-rendering: pixelated; }
.snow.on { opacity: 1; }
.tracking .picture { animation: tracking 0.9s steps(8) both; }
@keyframes tracking {
  0% { transform: translateX(0); clip-path: inset(0); }
  20% { transform: translateX(-14px) skewX(-3deg); clip-path: inset(10% 0 60% 0); }
  40% { transform: translateX(10px); clip-path: inset(40% 0 20% 0); }
  60% { transform: translateY(-30px) skewX(2deg); clip-path: inset(0 0 30% 0); }
  80% { transform: translateX(-6px); clip-path: inset(0); }
  100% { transform: none; clip-path: inset(0); }
}

/* Teletext page. */
.teletext { background: #000; font-family: var(--font-mono); font-weight: 500; color: #fff; padding: 30px 38px; font-size: 21px; line-height: 1.35; }
.tt-row { display: flex; justify-content: space-between; white-space: nowrap; }
.tt-head { color: #fff; font-size: 18px; letter-spacing: 0.06em; }
.tt-head .yellow { color: #ffff3c; }
.tt-banner { margin: 14px 0 18px; background: #0024ff; color: #ffff3c; padding: 12px 16px; font-family: var(--font-sans); font-weight: 800; font-size: 50px; line-height: 1; letter-spacing: -0.01em; }
.tt-banner small { display: block; margin-top: 6px; font-family: var(--font-mono); font-weight: 500; font-size: 17px; color: #3cffff; letter-spacing: 0.16em; }
.teletext p { margin: 0 0 14px; color: #fff; }
.teletext .cyan { color: #3cffff; } .teletext .yellow { color: #ffff3c; } .teletext .green { color: #3cff3c; } .teletext .red { color: #ff3c3c; } .teletext .magenta { color: #ff3cff; }
.tt-index { list-style: none; margin: 0 0 14px; padding: 0; }
.tt-index li { display: flex; justify-content: space-between; }
.tt-index a { color: #3cffff; text-decoration: none; } .tt-index a:hover { background: #3cffff; color: #000; }
.tt-foot { position: absolute; left: 0; right: 0; bottom: 22px; display: flex; font-size: 17px; letter-spacing: 0.06em; }
.tt-foot span { flex: 1; padding: 4px 12px; color: #000; }
.tt-foot .r { background: #ff3c3c; } .tt-foot .g { background: #3cff3c; } .tt-foot .y { background: #ffff3c; } .tt-foot .c { background: #3cffff; }

/* Paused tape (no footage): a still with the VCR's PAUSE and a little jitter. */
.paused .still { image-rendering: pixelated; filter: saturate(1.1) contrast(1.1) brightness(0.8); animation: pause-jitter 0.18s steps(2) infinite; }
@keyframes pause-jitter { 50% { transform: translateY(1.5px); } }

/* Controls on the set itself: invisible buttons over the rendered knobs. */
.hot { position: absolute; z-index: 4; background: transparent; border: 0; padding: 0; cursor: pointer; border-radius: 50%; }
.hot:hover::after, .hot:focus-visible::after { content: ""; position: absolute; inset: -6px; border-radius: inherit; box-shadow: 0 0 0 3px rgba(242, 244, 248, 0.55), 0 0 18px rgba(242, 244, 248, 0.35); }
.hot.preset { border-radius: 4px; }
.hot.hint::after { content: ""; position: absolute; inset: -6px; border-radius: inherit; animation: hint 1.6s ease-out 3; box-shadow: 0 0 0 0 rgba(242, 244, 248, 0.6); }
@keyframes hint { 0% { box-shadow: 0 0 0 0 rgba(242, 244, 248, 0.6); } 100% { box-shadow: 0 0 0 28px rgba(242, 244, 248, 0); } }
.tip {
  position: absolute; z-index: 9; pointer-events: none; transform: translate(-50%, -150%);
  font-family: var(--font-mono); font-weight: 500; font-size: 24px; letter-spacing: 0.16em; text-transform: uppercase; white-space: nowrap;
  color: var(--vcr); background: rgba(0,0,0,0.7); padding: 8px 14px; border-radius: 3px; opacity: 0; transition: opacity 0.15s;
}
.tip.show { opacity: 1; }

/* Scroll cue at the bottom of the room. */
.cue { position: absolute; left: 50%; bottom: 20px; z-index: 7; transform: translateX(-50%); font-family: var(--font-mono); font-weight: 500; font-size: 11px; letter-spacing: 0.2em; color: var(--dim); text-decoration: none; text-transform: uppercase; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.cue:hover { color: var(--text); }
.cue::after { content: ""; width: 1px; height: 26px; background: linear-gradient(var(--dim), transparent); animation: cue 2.2s ease-in-out infinite; }
@keyframes cue { 0%, 100% { transform: scaleY(0.4); transform-origin: top; } 50% { transform: scaleY(1); transform-origin: top; } }

/* ================================================================ the tapes */

.shelf { padding: clamp(40px, 8vw, 90px) 0 clamp(60px, 10vw, 120px); }
.shelf-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 28px; }
.shelf-head h2 { margin: 0; font-weight: 700; font-size: clamp(30px, 4vw, 40px); letter-spacing: -0.02em; line-height: 1; }
.shelf-head p { margin: 0; font-family: var(--font-mono); font-weight: 500; font-size: 12px; letter-spacing: 0.16em; color: var(--faint); text-transform: uppercase; }

.tapes { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.tape {
  --rot: 0deg; --shift: 0px;
  position: relative; display: flex; align-items: center; gap: 18px;
  height: clamp(92px, 12vw, 124px); padding: 0 clamp(18px, 4vw, 44px);
  text-decoration: none; color: inherit;
  transform: translateX(var(--shift)) rotate(var(--rot));
  border-radius: 7px;
  background:
    repeating-linear-gradient(90deg, rgba(255,255,255,0.035) 0 2px, transparent 2px 7px) left / 34px 100% no-repeat,
    repeating-linear-gradient(90deg, rgba(255,255,255,0.035) 0 2px, transparent 2px 7px) right / 34px 100% no-repeat,
    linear-gradient(180deg, #232326 0%, #121214 45%, #0b0b0c 100%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.09), inset 0 -2px 0 rgba(0,0,0,0.6), 0 14px 22px -12px rgba(0,0,0,0.9);
  transition: transform 0.25s cubic-bezier(0.3, 0.7, 0.2, 1);
}
.tape:hover, .tape:focus-visible { transform: translateX(calc(var(--shift) + 26px)) rotate(var(--rot)); }
.tape-label {
  position: relative; flex: 1; align-self: stretch; margin: clamp(14px, 2vw, 20px) 0;
  display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 0 clamp(14px, 2.4vw, 26px);
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3'/%3E%3CfeColorMatrix values='0 0 0 0 0.35 0 0 0 0 0.3 0 0 0 0 0.2 0 0 0 0.16 0'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)'/%3E%3C/svg%3E"),
    linear-gradient(180deg, #ede5d0, #dfd5bb);
  border-radius: 2px; transform: rotate(-0.4deg);
  box-shadow: 0 1px 0 rgba(255,255,255,0.3) inset, 0 1px 3px rgba(0,0,0,0.5);
  color: #1b1d3b; overflow: hidden;
}
.tape-label::before { content: ""; position: absolute; left: 0; right: 0; top: 22%; border-top: 1px solid rgba(40, 70, 160, 0.18); box-shadow: 0 calc(1.6em) 0 0 rgba(40,70,160,0.14); }
.tape-title { font-family: var(--font-marker); font-size: clamp(24px, 3.4vw, 40px); line-height: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; transform: rotate(-1deg); }
.tape-meta { font-family: var(--font-mono); font-weight: 500; font-size: clamp(10px, 1.1vw, 12px); letter-spacing: 0.14em; text-transform: uppercase; color: rgba(27, 29, 59, 0.62); white-space: nowrap; text-align: right; line-height: 1.6; }
.tape-meta b { display: block; font-weight: 500; color: var(--red); }
.tape-no { font-family: var(--font-mono); font-weight: 500; font-size: 12px; letter-spacing: 0.14em; color: #6f6b64; writing-mode: vertical-rl; transform: rotate(180deg); }
@media (max-width: 560px) { .tape-meta { display: none; } }

.shelf-note { margin: 28px 0 0; color: var(--dim); font-size: 15px; }
.shelf-note a { color: var(--text); text-decoration-color: var(--red); text-underline-offset: 3px; }

/* ================================================================ game page: the back of the tape box */

.caseback { padding: clamp(40px, 7vw, 90px) 0 clamp(60px, 9vw, 110px); }
.case {
  position: relative; padding: clamp(24px, 5vw, 56px);
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='3'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0.035 0'/%3E%3C/filter%3E%3Crect width='200' height='200' filter='url(%23n)'/%3E%3C/svg%3E"),
    linear-gradient(180deg, #121110, #0c0b0a);
  border: 1px solid #25221e; border-radius: 3px;
  box-shadow: 0 40px 80px -30px rgba(0,0,0,0.9), inset 0 1px 0 rgba(255,255,255,0.04);
}
.case::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 6px; background: linear-gradient(180deg, var(--c1, #e5342e) 0 33%, var(--c2, #e8a33a) 33% 66%, var(--c3, #3aa7e8) 66%); }
.case-kicker { margin: 0 0 14px; font-family: var(--font-mono); font-weight: 500; font-size: 12px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--dim); }
.case h2 { margin: 0; font-weight: 800; font-size: clamp(42px, 7vw, 80px); line-height: 0.95; letter-spacing: -0.035em; }
.case .lede { margin: 20px 0 0; font-size: clamp(18px, 2vw, 22px); line-height: 1.5; max-width: 36em; color: var(--text); font-weight: 400; }
.stills { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(10px, 2vw, 18px); margin: clamp(28px, 4vw, 44px) 0; }
.stills button { padding: 0; border: 0; background: #000; cursor: zoom-in; aspect-ratio: 16 / 9; overflow: hidden; box-shadow: 0 0 0 1px #2c2924, 0 10px 18px -10px #000; }
.stills img { width: 100%; height: 100%; object-fit: cover; filter: saturate(0.95) contrast(1.05); transition: transform 0.3s; }
.stills button:hover img { transform: scale(1.04); }
@media (max-width: 700px) { .stills { grid-template-columns: repeat(2, 1fr); } }

.case-cols { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: clamp(28px, 5vw, 64px); }
@media (max-width: 820px) { .case-cols { grid-template-columns: 1fr; } }
.prose h3 { margin: 1.6em 0 0.5em; font-weight: 700; font-size: 20px; line-height: 1.2; letter-spacing: -0.01em; color: var(--text); }
.prose h3:first-child { margin-top: 0; }
.prose p, .prose ul { margin: 0 0 1em; color: #d2ccc1; }
.prose ul { padding-left: 1.2em; }
.prose li { margin: 0.25em 0; }
.prose li::marker { color: var(--red); }
.prose strong { color: var(--text); font-weight: 600; }
.prose a { color: var(--text); text-decoration-color: var(--red); text-underline-offset: 3px; }
.keys { display: grid; grid-template-columns: auto 1fr; gap: 9px 16px; margin: 0 0 1.4em; align-items: center; }
.keys dt { font-family: var(--font-mono); font-weight: 500; font-size: 12px; letter-spacing: 0.06em; color: var(--text); background: #1c1a17; border: 1px solid #34302a; border-bottom-width: 3px; border-radius: 4px; padding: 3px 9px 2px; white-space: nowrap; justify-self: start; }
.keys dd { margin: 0; color: #d2ccc1; font-size: 15px; }
.specs { margin: 0; border-top: 1px solid #25221e; }
.specs div { display: flex; justify-content: space-between; gap: 14px; padding: 10px 0; border-bottom: 1px solid #25221e; font-size: 14px; }
.specs dt { color: var(--faint); }
.specs dd { margin: 0; text-align: right; color: #d2ccc1; }
.side-actions { display: grid; gap: 10px; margin-top: 20px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 46px; padding: 0 20px; font-family: var(--font-sans); font-weight: 600; font-size: 14px; letter-spacing: 0.08em; text-transform: uppercase; line-height: 1; text-decoration: none; color: var(--text); background: transparent; border: 1px solid #45403a; border-radius: 3px; cursor: pointer; }
.btn:hover { border-color: var(--text); }
.btn.primary { background: var(--vcr); border-color: var(--vcr); color: #0a0a0a; }
.btn.primary:hover { background: #fff; }

.case-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 18px; margin-top: clamp(30px, 5vw, 50px); padding-top: 22px; border-top: 1px solid #25221e; }
.badges { display: flex; flex-wrap: wrap; gap: 8px; }
.badges span { font-family: var(--font-mono); font-weight: 500; font-size: 11px; letter-spacing: 0.14em; line-height: 1; padding: 6px 9px; border: 1px solid #5d584f; color: #b8b1a5; border-radius: 2px; text-transform: uppercase; }
.badges span.fill { background: #d8d1c2; border-color: #d8d1c2; color: #0c0b0a; }
.barcode { display: flex; align-items: flex-end; gap: 12px; color: var(--faint); font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; }
.barcode i { display: block; width: 110px; height: 42px; background: repeating-linear-gradient(90deg, #d8d1c2 0 2px, transparent 2px 3px, #d8d1c2 3px 4px, transparent 4px 7px, #d8d1c2 7px 10px, transparent 10px 11px, #d8d1c2 11px 12px, transparent 12px 15px); opacity: 0.8; }

/* ---------------------------------------------------------------- the player (after zooming into the set) */

.player { position: fixed; inset: 0; z-index: 60; background: #000; display: flex; flex-direction: column; opacity: 0; transition: opacity 0.35s; }
.player.open { opacity: 1; }
.player[hidden] { display: none; }
.player-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 12px; font-family: var(--font-mono); font-weight: 500; font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--dim); background: #070707; border-bottom: 1px solid #161616; }
.player-bar .group { display: flex; gap: 10px; align-items: center; }
.player-bar button, .player-bar a { font-family: inherit; font-size: inherit; font-weight: inherit; letter-spacing: inherit; text-transform: inherit; color: var(--text); background: #121212; border: 1px solid #2a2a2a; border-radius: 3px; padding: 8px 12px; cursor: pointer; text-decoration: none; line-height: 1; }
.player-bar button:hover, .player-bar a:hover { border-color: var(--text); }
.player iframe { flex: 1; width: 100%; border: 0; background: #000; }
@media (max-width: 560px) { .player-bar .title { display: none; } }

.lightbox { padding: 0; border: 0; background: transparent; max-width: 96vw; max-height: 96vh; }
.lightbox::backdrop { background: rgba(0,0,0,0.92); }
.lightbox img { max-width: 96vw; max-height: 88vh; margin: 0 auto; }
.lightbox form { text-align: center; margin-top: 10px; }

/* ================================================================ footer */

.foot { border-top: 1px solid var(--line); padding: 28px 0 40px; color: var(--faint); font-size: 13px; }
.foot .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px 24px; }
.foot nav { display: flex; gap: 18px; flex-wrap: wrap; }
.foot a { color: var(--dim); text-decoration: none; }
.foot a:hover { color: var(--text); }

.lost .snow.on { opacity: 0.6; }

/* ---------------------------------------------------------------- small sets (phones): words move off the tube */

.caption-only { display: none; }
.caption { display: none; }
.small-tv .screen .lower { display: none !important; }
.small-tv .ch-step { display: none; }
.small-tv .caption {
  display: block; position: absolute; left: 0; right: 0; bottom: 0; z-index: 5;
  padding: 48px var(--gutter) 40px;
  background: linear-gradient(180deg, transparent 0, rgba(3,3,3,0.8) 48px, rgba(3,3,3,0.94) 100%);
}
.small-tv .caption .lower { display: block; position: static; padding: 0; background: none; text-shadow: 0 1px 8px rgba(0,0,0,0.9); }
.small-tv .caption .kicker { font-size: 11px; margin-bottom: 8px; }
.small-tv .caption h1, .small-tv .caption h2 { font-size: clamp(28px, 8.5vw, 38px); }
.small-tv .caption p.line { font-size: 15px; line-height: 1.5; margin: 8px 0 16px; }
.small-tv .caption .tv-btn { font-size: 13px; padding: 12px 16px; }
.caption .tuner { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; font-family: var(--font-mono); font-weight: 500; font-size: 12px; letter-spacing: 0.16em; color: var(--osd); }
.caption .tuner button { width: 38px; height: 34px; background: rgba(0,0,0,0.5); border: 1px solid rgba(242,244,248,0.35); border-radius: 3px; color: var(--vcr); font-size: 22px; font-weight: 300; line-height: 1; cursor: pointer; }
.small-tv .cue { display: none; }

.osd-mode[hidden] { display: none; }

@media (prefers-reduced-motion: reduce) {
  .roll, .flicker, .cue::after, .paused .still { animation: none !important; }
  .grain { display: none; }
  .power-on .picture, .power-off .picture { animation-duration: 0.01s; }
  .stage.zooming { transition-duration: 0.01s; }
  .tape { transition: none; }
}
