/* 90sTV: everything is drawn with CSS, no image files.
   The TV is a fixed 982x614 design canvas, scaled to the viewport by js/main.js. */

:root {
  --vfd: #6effc8;          /* VCR-style display colour */
  --vfd-glow: rgba(110, 255, 200, .55);
  --osd: #63ff6e;          /* on-screen display green */
  --plastic-hi: #43464e;
  --plastic: #34373e;
  --plastic-lo: #24262b;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  height: 100%;
  overflow: hidden;
  background:
    radial-gradient(ellipse 70% 55% at 50% 42%, #262830 0%, #15161b 55%, #08080b 100%);
  color: #c9ccd3;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  -webkit-tap-highlight-color: transparent;
  -webkit-user-select: none;
  user-select: none;
  touch-action: manipulation;
}

/* ---------- stage + body ---------- */

#stage {
  position: fixed;
  left: 0;
  top: 0;
  width: 982px;
  height: 614px;
  transform-origin: 0 0;
  visibility: hidden;          /* shown once main.js has scaled it */
}
#stage.ready { visibility: visible; }

.tv {
  position: absolute;
  inset: 0;
  border-radius: 46px;
  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='.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .5 0 0 0 0 .5 0 0 0 0 .5 0 0 0 .55 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"),
    linear-gradient(180deg, rgba(255,255,255,.11) 0%, rgba(255,255,255,0) 16%, rgba(0,0,0,0) 78%, rgba(0,0,0,.38) 100%),
    linear-gradient(90deg, var(--plastic-lo) 0%, var(--plastic) 12%, var(--plastic-hi) 50%, var(--plastic) 88%, var(--plastic-lo) 100%);
  background-blend-mode: overlay, normal, normal;
  box-shadow:
    0 50px 90px -30px rgba(0,0,0,.85),
    0 0 0 2px #121316,
    inset 0 2px 1px rgba(255,255,255,.22),
    inset 0 -4px 3px rgba(0,0,0,.45),
    inset 3px 0 2px rgba(255,255,255,.05),
    inset -3px 0 2px rgba(0,0,0,.3);
}

/* ---------- bezel, tube well, screen ---------- */

.bezel {
  position: absolute;
  left: 26px;
  top: 24px;
  width: 714px;
  height: 566px;
  border-radius: 34px;
  background: linear-gradient(165deg, #2a2c32 0%, #1c1d22 55%, #141519 100%);
  box-shadow:
    inset 0 2px 2px rgba(255,255,255,.10),
    inset 0 -2px 3px rgba(0,0,0,.6),
    0 1px 0 rgba(255,255,255,.14),
    0 -1px 0 rgba(0,0,0,.5);
}

.well {
  position: absolute;
  left: 26px;
  top: 14px;
  width: 662px;
  height: 500px;
  border-radius: 48px / 44px;
  background: #050506;
  box-shadow:
    inset 0 0 0 2px #000,
    inset 0 8px 16px rgba(0,0,0,.95),
    0 1px 0 rgba(255,255,255,.12),
    0 -1px 1px rgba(0,0,0,.7);
}

.screen {
  position: absolute;
  left: 11px;
  top: 10px;
  width: 640px;
  height: 480px;
  border-radius: 40px / 36px;
  overflow: hidden;
  isolation: isolate;
  background:
    radial-gradient(ellipse 80% 70% at 42% 38%, #2b322f 0%, #1b201e 55%, #0e1110 100%);
  transition: box-shadow .6s ease;
  touch-action: none;            /* swipes on the screen are ours (js/gestures.js) */
}
/* G: tube glow bleeding onto the well, pulsing 5-30px (spec §7) */
.on.glow .screen { animation: tube-glow 3.6s ease-in-out infinite alternate; }
@keyframes tube-glow {
  from { box-shadow: 0 0 5px 1px rgba(150, 195, 255, .20), 0 0 2px 1px rgba(170, 210, 255, .30); }
  to   { box-shadow: 0 0 30px 5px rgba(150, 195, 255, .26), 0 0 3px 1px rgba(170, 210, 255, .40); }
}

.picture {
  position: absolute;
  inset: 0;
  background: #000;
  opacity: 0;
  transform-origin: 50% 50%;
}
.on .picture { opacity: 1; }

/* The iframe is taller than the screen so YouTube's title bar and logo
   fall outside the visible area. A 4:3 clip fills the screen exactly. */
.player-crop {
  position: absolute;
  left: 0;
  top: -60px;
  width: 100%;
  height: calc(100% + 120px);
}
.player-crop iframe,
#player {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  pointer-events: none;   /* taps go to the TV, never to YouTube's chrome */
}

/* B: black & white set */
.bw .player-crop { filter: grayscale(1) contrast(1.08) brightness(1.03); }

/* N: faint snow over the picture, opacity .04 per level (spec §7) */
#snow {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  pointer-events: none;
  opacity: calc(var(--noise, 0) * .04);
  display: none;
}
.on .noisy #snow { display: block; }

#static {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: none;
  z-index: 2;
}
.picture.tuning #static { display: block; }
.picture.tuning.nostatic #static { display: none; }   /* O key: plain black between channels */
.picture.tuning .player-crop { opacity: 0; }         /* never show YouTube's loading UI */

/* ---------- on-screen display ---------- */

.osd {
  position: absolute;
  inset: 0;
  z-index: 5;
  pointer-events: none;
  font-family: "VT323", ui-monospace, Menlo, monospace;
  color: var(--osd);
  text-shadow: 2px 2px 0 #000, -1px -1px 0 #000, 1px -1px 0 #000, -1px 1px 0 #000, 0 0 8px rgba(99,255,110,.5);
}
.osd > div {
  position: absolute;
  opacity: 0;
  transition: opacity .35s ease;
  white-space: nowrap;
}
.osd > div.show { opacity: 1; transition: none; }
.off .osd { visibility: hidden; }

.osd-ch { left: 44px; top: 30px; font-size: 48px; line-height: 1; letter-spacing: 2px; transition-duration: .9s; }
.osd-msg {
  left: 0; right: 0; top: 50%;
  transform: translateY(-50%);
  text-align: center;
  font-size: 44px;
  letter-spacing: 3px;
}
.osd-msg.blink.show { animation: blink 1s steps(2, start) infinite; }
.osd-bar { left: 44px; right: 44px; bottom: 36px; font-size: 30px; letter-spacing: 1px; overflow: hidden; text-overflow: ellipsis; }
.osd-bar .bar { letter-spacing: -2px; }

/* ---------- on-screen category menu ---------- */

.menu {
  position: absolute;
  left: 52px;
  right: 52px;
  top: 40px;
  bottom: 40px;
  z-index: 5;
  padding: 12px 22px 10px;
  display: flex;
  flex-direction: column;
  background: rgba(10, 18, 78, .9);
  border: 3px solid #c9d4ff;
  box-shadow: 0 0 0 3px #0a1040, 0 10px 30px rgba(0,0,0,.6);
  font-family: "VT323", ui-monospace, Menlo, monospace;
  color: #fff;
  text-shadow: 2px 2px 0 rgba(0,0,0,.6);
}
.menu[hidden] { display: none; }
.off .menu { display: none; }
/* phones held upright: the menu floats over the page at a readable size */
.menu.floating {
  position: fixed;
  left: 50%;
  top: 0;
  right: auto;
  bottom: auto;
  width: 536px;
  height: 400px;
  z-index: 50;
  transform-origin: 50% 0;
  transform: translate(-50%, var(--menu-top, 12px)) scale(var(--menu-scale, 1));
}
.menu-tabs {
  display: flex;
  justify-content: center;
  gap: 18px;
  margin-bottom: 8px;
}
.menu-tab {
  padding: 0 10px;
  border: 0;
  background: none;
  color: rgba(255, 228, 92, .45);
  font: 32px/1.05 "VT323", ui-monospace, Menlo, monospace;
  letter-spacing: 3px;
  text-shadow: inherit;
  cursor: pointer;
  touch-action: manipulation;
}
.menu-tab[hidden] { display: none; }
.menu-tab.active { color: #ffe45c; text-decoration: underline; text-underline-offset: 5px; text-decoration-thickness: 2px; }
.menu-tab:hover,
.menu-tab:focus { outline: none; background: #ffe45c; color: #0a1040; text-shadow: none; text-decoration: none; }
.menu-page { display: flex; flex-direction: column; flex: 1 1 auto; min-height: 0; }
.menu-page[hidden] { display: none; }
.menu-grid {
  display: grid;
  grid-template-rows: repeat(8, auto);
  grid-auto-flow: column;
  grid-auto-columns: 1fr;
  column-gap: 18px;
  row-gap: 1px;
}
.menu-grid.settings { grid-template-rows: repeat(6, auto); row-gap: 6px; }
.menu-item .value { color: #ffe45c; text-align: right; white-space: nowrap; }
.menu-item:hover .value,
.menu-item:focus .value { color: #0a1040; }
.menu-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 2px 8px;
  border: 0;
  background: none;
  color: inherit;
  font: 26px/1.05 "VT323", ui-monospace, Menlo, monospace;
  text-shadow: inherit;
  text-align: left;
  cursor: pointer;
  touch-action: manipulation;
}
.menu-item .box::before { content: "[ ]"; }
.menu-item[aria-checked="true"] .box::before { content: "[X]"; }
.menu-item .name { flex: 1 1 auto; }
.menu-item .count { opacity: .7; min-width: 2ch; text-align: right; }
.menu-item.empty { opacity: .45; }
.menu-item:hover,
.menu-item:focus { outline: none; background: #ffe45c; color: #0a1040; text-shadow: none; opacity: 1; }
.menu-foot {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-top: auto;
  padding-top: 8px;
}
.menu-foot .menu-item { padding: 2px 12px; }
.menu-status {
  text-align: center;
  font-size: 22px;
  color: #9fd8ff;
  margin-top: 4px;
}

@keyframes blink { to { visibility: hidden; } }

/* ---------- CRT overlays ---------- */

.crt {
  position: absolute;
  inset: 0;
  pointer-events: none;
  border-radius: inherit;
}
.scanlines {
  z-index: 6;
  background: repeating-linear-gradient(180deg,
    rgba(0,0,0,.28) 0px, rgba(0,0,0,.28) 1px,
    rgba(0,0,0,0) 1px, rgba(0,0,0,0) 3px);
  opacity: 0;
  transition: opacity .4s;
}
.on .scanlines { opacity: .75; }

.vignette {
  z-index: 7;
  background: radial-gradient(ellipse 78% 74% at 50% 50%, rgba(0,0,0,0) 58%, rgba(0,0,0,.6) 100%);
  box-shadow: inset 0 0 48px rgba(0,0,0,.85), inset 0 0 8px rgba(0,0,0,.95);
}
.glass {
  z-index: 8;
  background:
    radial-gradient(ellipse 55% 35% at 28% 10%, rgba(255,255,255,.13), rgba(255,255,255,0) 70%),
    radial-gradient(ellipse 120% 90% at 50% 50%, rgba(255,255,255,0) 62%, rgba(255,255,255,.05) 80%, rgba(255,255,255,0) 100%),
    linear-gradient(172deg, rgba(255,255,255,.06) 0%, rgba(255,255,255,0) 38%);
}
.afterglow {
  z-index: 9;
  opacity: 0;
  background: radial-gradient(circle at 50% 50%, #fff 0, rgba(220,235,255,.9) 3px, rgba(160,200,255,.35) 9px, rgba(0,0,0,0) 22px);
}

/* power on: a bright line opens out into the picture */
.booting .picture { animation: crt-on .65s cubic-bezier(.2,.7,.3,1) both; }
@keyframes crt-on {
  0%   { transform: scale(1, .004); filter: brightness(5); opacity: 1; }
  30%  { transform: scale(1, .006); filter: brightness(5); }
  70%  { transform: scale(1, 1);    filter: brightness(1.8); }
  100% { transform: scale(1, 1);    filter: brightness(1); }
}

/* power off: collapse to a line, then a dot that fades */
.shutting .picture { animation: crt-off .45s cubic-bezier(.6,0,.9,.4) both; }
.shutting .afterglow { animation: dot-fade 1.4s ease-out .36s both; }
@keyframes crt-off {
  0%   { transform: scale(1, 1);      filter: brightness(1); opacity: 1; }
  55%  { transform: scale(1, .005);   filter: brightness(6); opacity: 1; }
  100% { transform: scale(.004, .004); filter: brightness(10); opacity: 0; }
}
@keyframes dot-fade {
  0%   { opacity: 1; }
  100% { opacity: 0; }
}

/* ---------- VFD title bar ---------- */

.lcd {
  position: absolute;
  left: 37px;
  top: 526px;
  width: 640px;
  height: 28px;
  padding: 0 12px;
  border-radius: 5px;
  display: flex;
  align-items: center;
  gap: 14px;
  background: linear-gradient(180deg, #08100d 0%, #0d1814 100%);
  box-shadow: inset 0 2px 4px rgba(0,0,0,.95), inset 0 0 0 1px #000, 0 1px 0 rgba(255,255,255,.09);
  font-family: "VT323", ui-monospace, Menlo, monospace;
  font-size: 23px;
  line-height: 1;
  color: var(--vfd);
  text-shadow: 0 0 6px var(--vfd-glow);
  overflow: hidden;
  white-space: nowrap;
  transition: color .3s, text-shadow .3s;
}
.off .lcd { color: rgba(110,255,200,.07); text-shadow: none; }

.lcd-ch { flex: none; min-width: 64px; }
.lcd-meta { flex: none; opacity: .85; }
.lcd-flags { flex: none; font-size: 18px; letter-spacing: 1px; }
.lcd-flags:empty { display: none; }
.lcd-title {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  position: relative;
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 10px, #000 calc(100% - 14px), transparent 100%);
          mask-image: linear-gradient(90deg, transparent 0, #000 10px, #000 calc(100% - 14px), transparent 100%);
}
.lcd-track { display: inline-block; padding-left: 8px; }
.lcd-track.scroll { animation: marquee var(--marquee-dur, 12s) linear infinite; }
@keyframes marquee {
  from { transform: translateX(0); }
  to   { transform: translateX(var(--marquee-dist, -50%)); }
}

/* ---------- side panel ---------- */

.panel {
  position: absolute;
  left: 760px;
  top: 24px;
  width: 196px;
  height: 566px;
  border-radius: 26px;
  background: linear-gradient(180deg, rgba(255,255,255,.035), rgba(0,0,0,.08));
  box-shadow: inset 0 1px 1px rgba(255,255,255,.08), inset 0 -1px 2px rgba(0,0,0,.35);
}

.brand {
  position: absolute;
  left: 0;
  right: 0;
  top: 22px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}
.logo {
  font: italic 900 33px/1 "Arial Black", "Helvetica Neue", Impact, sans-serif;
  letter-spacing: 1px;
  background: linear-gradient(180deg, #ffffff 0%, #c9ced6 42%, #6d727c 52%, #d6dae1 100%);
  -webkit-background-clip: text;
          background-clip: text;
  color: transparent;
  filter: drop-shadow(0 1px 0 rgba(0,0,0,.7));
}
.model {
  font-size: 9.5px;
  letter-spacing: .28em;
  color: #9a9fa8;
}
.badge {
  margin-top: 6px;
  padding: 2px 7px;
  border: 1px solid #7b808a;
  border-radius: 3px;
  font: 700 8.5px/1.3 system-ui, sans-serif;
  letter-spacing: .22em;
  color: #aeb3bc;
}

/* ---------- year dial ---------- */

.dial {
  position: absolute;
  left: 18px;
  top: 104px;
  width: 160px;
  height: 196px;
}
.knob {
  position: absolute;
  left: 34px;
  top: 44px;
  width: 92px;
  height: 92px;
  border-radius: 50%;
  cursor: grab;
  touch-action: none;
  background: radial-gradient(circle at 50% 50%, #1b1c20 0 60%, #0c0d0f 71%);
  box-shadow: 0 8px 14px rgba(0,0,0,.55), 0 2px 0 #121316, inset 0 1px 0 rgba(255,255,255,.08);
}
.knob:active { cursor: grabbing; }
.knob:focus { outline: none; }
.knob:focus-visible { outline: 2px solid var(--vfd); outline-offset: 4px; }
.knob-grip {
  position: absolute;
  inset: 3px;
  border-radius: 50%;
  background:
    repeating-conic-gradient(from 0deg, rgba(255,255,255,.10) 0 5deg, rgba(0,0,0,.25) 5deg 10deg),
    radial-gradient(circle at 38% 30%, #6c707a, #3b3e45 55%, #26282d 100%);
  box-shadow: inset 0 1px 1px rgba(255,255,255,.25), inset 0 -2px 3px rgba(0,0,0,.5);
  transform: rotate(var(--angle, -150deg));
  transition: transform .22s cubic-bezier(.3, 1.5, .5, 1);
}
.knob-grip::after {             /* pointer notch */
  content: "";
  position: absolute;
  left: 50%;
  top: 5px;
  width: 4px;
  height: 22px;
  margin-left: -2px;
  border-radius: 2px;
  background: #f3f0e6;
  box-shadow: 0 0 4px rgba(255,255,255,.35);
}
.knob-cap {
  position: absolute;
  inset: 24px;
  border-radius: 50%;
  pointer-events: none;
  background: radial-gradient(circle at 40% 32%, #5d616a, #33363c 70%);
  box-shadow: 0 2px 4px rgba(0,0,0,.6), inset 0 1px 0 rgba(255,255,255,.2);
}
.dial-label {
  position: absolute;
  width: 30px;
  height: 22px;
  margin: -11px 0 0 -15px;
  padding: 0;
  border: 0;
  background: none;
  color: #8e939c;
  font: 700 11px/22px system-ui, sans-serif;
  letter-spacing: .04em;
  cursor: pointer;
  touch-action: manipulation;
  transition: color .2s, text-shadow .2s;
}
.dial-label:focus { outline: none; }
.dial-label:focus-visible { outline: 1px solid var(--vfd); }
.dial-label.active { color: #f3f0e6; text-shadow: 0 0 6px rgba(255,255,255,.45); }
.dial-caption {
  position: absolute;
  left: 0;
  right: 0;
  top: 170px;
  text-align: center;
  font-size: 9.5px;
  letter-spacing: .3em;
  color: #8e939c;
}

.controls {
  position: absolute;
  left: 18px;
  right: 18px;
  top: 300px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  column-gap: 12px;
  row-gap: 5px;
}
.ctl-label {
  grid-column: 1 / -1;
  margin-top: 4px;
  font-size: 9.5px;
  letter-spacing: .3em;
  color: #8e939c;
  text-align: center;
}

.btn {
  height: 42px;
  border: 0;
  border-radius: 10px;
  background: linear-gradient(180deg, #555963 0%, #3b3e45 100%);
  color: #d4d7de;
  font: 600 19px/1 system-ui, sans-serif;
  cursor: pointer;
  box-shadow:
    0 3px 0 #17181b,
    0 5px 8px rgba(0,0,0,.45),
    inset 0 1px 0 rgba(255,255,255,.22),
    inset 0 -1px 0 rgba(0,0,0,.3);
  transition: transform .05s, box-shadow .05s;
  touch-action: manipulation;
}
.btn:focus { outline: none; }
.btn:focus-visible { outline: 2px solid var(--vfd); outline-offset: 2px; }
.btn:active,
.btn.pressed {
  transform: translateY(2px);
  box-shadow:
    0 1px 0 #17181b,
    0 2px 3px rgba(0,0,0,.45),
    inset 0 1px 0 rgba(255,255,255,.12);
}

.btn.small {
  height: 28px;
  margin-top: 8px;
  font-size: 10px;
  letter-spacing: .25em;
  border-radius: 8px;
}

.btn.power {
  grid-column: 1 / -1;
  margin-top: 8px;
  height: 46px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-size: 12px;
  letter-spacing: .3em;
  background: linear-gradient(180deg, #4b4e57 0%, #2f3137 100%);
}
.led {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #6b1612;
  box-shadow: inset 0 1px 1px rgba(0,0,0,.6);
}
.off .led {
  background: #ff3b2f;
  box-shadow: 0 0 6px 1px rgba(255,59,47,.7);
  animation: standby 2.4s ease-in-out infinite;
}
.on .led {
  background: #7dff6a;
  box-shadow: 0 0 7px 2px rgba(125,255,106,.75);
}
@keyframes standby {
  0%, 100% { opacity: 1; }
  50% { opacity: .35; }
}

/* ---------- page hint ---------- */

.hint {
  position: fixed;
  left: 0;
  right: 0;
  bottom: max(10px, env(safe-area-inset-bottom));
  margin: 0;
  text-align: center;
  font-size: 13px;
  color: #6f747d;
  transition: opacity .6s;
}
.hint kbd {
  font: 12px ui-monospace, Menlo, monospace;
  padding: 1px 5px;
  border: 1px solid #4a4e56;
  border-radius: 4px;
}
.hint.gone { opacity: 0; pointer-events: none; }
.hint .for-touch { display: none; }
@media (hover: none) and (pointer: coarse) {
  .hint .for-keys { display: none; }
  .hint .for-touch { display: inline; }
}

.has-remote .hint { display: none; }

/* ---------- immersive (I): just the front of the set ---------- */

#stage.animate { transition: transform .45s cubic-bezier(.3, .8, .3, 1); }
.tv, .panel { transition: opacity .35s, background-color .35s; }
#stage.immersive .tv { background: none; box-shadow: none; }
#stage.immersive .panel { opacity: 0; visibility: hidden; }
#stage.immersive .bezel { box-shadow: 0 30px 90px rgba(0,0,0,.75), inset 0 2px 2px rgba(255,255,255,.10); }

/* fullscreen / immersive: hide the pointer while it rests */
body.hide-cursor,
body.hide-cursor * { cursor: none !important; }

/* ---------- remote control (phones held upright) ---------- */

.remote {
  display: none;
  position: fixed;
  left: 50%;
  bottom: max(14px, env(safe-area-inset-bottom));
  transform: translateX(-50%);
  width: min(330px, calc(100% - 32px));
  padding: 16px 16px 12px;
  flex-direction: column;
  gap: 12px;
  border-radius: 30px 30px 40px 40px;
  background:
    linear-gradient(180deg, rgba(255,255,255,.08), rgba(255,255,255,0) 30%),
    linear-gradient(90deg, #1d1e22, #2a2c31 50%, #1d1e22);
  box-shadow: 0 20px 40px rgba(0,0,0,.6), inset 0 1px 1px rgba(255,255,255,.15), 0 0 0 1px #0c0d0f;
}
.has-remote .remote { display: flex; }
.r-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.r-btn,
.r-rocker button {
  height: 44px;
  border: 0;
  border-radius: 14px;
  background: linear-gradient(180deg, #4c5059, #33363d);
  color: #dfe2e8;
  font: 700 11px/1 system-ui, sans-serif;
  letter-spacing: .14em;
  box-shadow: 0 3px 0 #111214, inset 0 1px 0 rgba(255,255,255,.18);
  cursor: pointer;
  touch-action: manipulation;
}
.r-btn:active,
.r-rocker button:active { transform: translateY(2px); box-shadow: 0 1px 0 #111214, inset 0 1px 0 rgba(255,255,255,.1); }
.r-btn:focus,
.r-rocker button:focus { outline: none; }
.r-power { display: flex; align-items: center; justify-content: center; gap: 7px; background: linear-gradient(180deg, #a3332b, #7a211b); }
.remote .led { width: 7px; height: 7px; }
.tv-on .remote .led { background: #7dff6a; box-shadow: 0 0 6px 2px rgba(125,255,106,.7); }
body:not(.tv-on) .remote .led { background: #ffb3ad; box-shadow: 0 0 6px 1px rgba(255,120,110,.7); animation: standby 2.4s ease-in-out infinite; }
.r-rockers { grid-template-columns: 1fr 1fr; gap: 24px; padding: 0 18px; }
.r-rocker {
  display: grid;
  grid-template-rows: 52px auto 52px;
  align-items: center;
  text-align: center;
  padding: 4px;
  border-radius: 26px;
  background: #15161a;
  box-shadow: inset 0 2px 4px rgba(0,0,0,.6);
}
.r-rocker span { font: 700 10px/22px system-ui, sans-serif; letter-spacing: .25em; color: #8e939c; }
.r-rocker button { height: 52px; border-radius: 22px; font-size: 19px; letter-spacing: 0; }
.r-year { grid-template-columns: 56px 1fr 56px; align-items: center; }
.r-year-display {
  height: 44px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background: linear-gradient(180deg, #08100d, #0d1814);
  box-shadow: inset 0 2px 4px rgba(0,0,0,.9);
  font-family: "VT323", ui-monospace, Menlo, monospace;
  color: var(--vfd);
  text-shadow: 0 0 6px var(--vfd-glow);
}
.r-year-display small { font-size: 12px; letter-spacing: .2em; opacity: .7; line-height: 1; }
.r-year-display span { font-size: 24px; line-height: 1; }
.r-brand {
  text-align: center;
  font: italic 900 15px/1 "Arial Black", "Helvetica Neue", Impact, sans-serif;
  color: #6f737c;
  letter-spacing: 1px;
}

/* ---------- help card (page level, outside the scaled TV) ---------- */

.help {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 16px;
  background: rgba(4, 5, 8, .62);
  -webkit-backdrop-filter: blur(3px);
          backdrop-filter: blur(3px);
  -webkit-user-select: text;
  user-select: text;
}
.help[hidden] { display: none; }
.help-card {
  width: min(540px, 100%);
  max-height: 100%;
  overflow: auto;
  padding: 22px 26px 20px;
  border-radius: 6px;
  color: #26241f;
  background:
    repeating-linear-gradient(180deg, rgba(0,0,0,0) 0 27px, rgba(80,70,40,.06) 27px 28px),
    #efe8d6;
  box-shadow: 0 24px 60px rgba(0,0,0,.6), inset 0 0 0 1px rgba(0,0,0,.08);
  font-size: 14.5px;
  line-height: 1.45;
}
.help-card h2 {
  margin: 0 0 6px;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: #57524a;
}
.help-logo {
  display: block;
  font: italic 900 30px/1.1 "Arial Black", "Helvetica Neue", Impact, sans-serif;
  letter-spacing: 1px;
  text-transform: none;
  color: #26241f;
}
.help-lead { margin: 0 0 14px; }
.help-card h3 {
  margin: 14px 0 6px;
  font-size: 12px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: #6b655a;
}
.help-list { margin: 0 0 10px; padding-left: 18px; }
.help-list li { margin-bottom: 4px; }
.keys { width: 100%; border-collapse: collapse; margin-bottom: 12px; }
.keys td { padding: 4px 0; vertical-align: top; border-top: 1px dashed rgba(60,55,40,.25); }
.keys td:first-child { width: 112px; white-space: nowrap; }
.help-card kbd {
  display: inline-block;
  min-width: 22px;
  padding: 1px 6px;
  border-radius: 4px;
  border: 1px solid #8c8577;
  border-bottom-width: 2px;
  background: #fbf8ef;
  font: 600 12px/1.5 ui-monospace, Menlo, monospace;
  text-align: center;
  color: #26241f;
}
.help-touch { margin: 0 0 8px; color: #4a463e; }
.help-close {
  display: block;
  margin: 16px 0 0 auto;
  padding: 8px 18px;
  border: 0;
  border-radius: 6px;
  background: #2e3036;
  color: #f3f0e6;
  font: 600 13px/1 system-ui, sans-serif;
  letter-spacing: .1em;
  cursor: pointer;
}
.help-close:focus-visible { outline: 2px solid #2e3036; outline-offset: 3px; }

@media (prefers-reduced-motion: reduce) {
  .booting .picture, .shutting .picture, .shutting .afterglow,
  .off .led, .lcd-track.scroll, .on.glow .screen { animation: none !important; }
  #stage.animate { transition: none; }
}
