/* ==========================================================
   GREG BLAKE — Greg's World
   Minimal cinematic UI over a full-screen 3D world
   ========================================================== */

:root {
  --ink: #f4efe6;            /* main text: warm off-white */
  --ink-dim: rgba(244, 239, 230, .55);
  --ink-faint: rgba(244, 239, 230, .18);
  --night: #0b0a0c;          /* page background */
  --panel: rgba(16, 13, 12, .62);
  --accent: #f2b46d;         /* updated per zone from JS */
  --ease: cubic-bezier(.22, 1, .36, 1);
  --font: 'Archivo', 'Helvetica Neue', Arial, sans-serif;
  --gutter: clamp(16px, 2.6vw, 36px);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  background: var(--night);
  color: var(--ink);
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.5;
  font-weight: 450;
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
  overscroll-behavior: none;
}
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
a { color: inherit; }
[hidden] { display: none !important; }

/* Small bold uppercase label (mola "heading-1") */
.heading {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  line-height: 1.3;
}
.link-small {
  font-size: 11px;
  letter-spacing: .06em;
  text-transform: uppercase;
  text-decoration: none;
  opacity: .7;
  transition: opacity .3s;
}
.link-small:hover { opacity: 1; }
.dim { opacity: .4; }

#webgl {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  touch-action: none;
  cursor: grab;
}
#webgl.dragging { cursor: grabbing; }

/* ================= Loader: TV test card ================= */
.loader {
  position: fixed;
  inset: 0;
  z-index: 50;
  background: #000;
  transition: opacity 1.4s var(--ease), visibility 1.4s;
}
.loader.is-done { opacity: 0; visibility: hidden; }
.tv__screen { position: absolute; inset: 0; overflow: hidden; border-radius: 18px; transform-origin: center; background: #7c7c7c; }
.tv__card { position: absolute; inset: 0; width: 100%; height: 100%; }
/* the round Wave pattern in the middle (js/ui/wave.js), with the control desk under it */
.tv__center {
  --d: max(180px, min(56vmin, 500px, calc(100vh - 330px)));
  position: absolute; left: 50%; top: calc(50% - 90px);   /* lifted to leave room for the desk under it */
  width: var(--d); height: var(--d);
  transform: translate(-50%, -50%);
}
@supports (height: 100dvh) { .tv__center { --d: max(180px, min(56vmin, 500px, calc(100dvh - 330px))); } }
/* phones held upright: circle near the top, as big as the desk under it allows */
@media (orientation: portrait) and (max-width: 700px) {
  .tv__center { --d: max(170px, min(80vw, 380px, calc(100vh - 360px))); top: calc(58px + var(--d) / 2); }
  @supports (height: 100dvh) { .tv__center { --d: max(170px, min(80vw, 380px, calc(100dvh - 360px))); } }
  .tv__desk { top: calc(100% + 18px); gap: 8px; }
  .wave-ctrl { gap: 5px; font-size: 10px; }
  .wave-ctrl__btn, .wave-ctrl__chip, .wave-ctrl__read { height: 30px; padding: 0 8px; }
  .wave-ctrl__speed input[type="range"] { width: 64px; }
  .tv__plate { padding: 8px 10px 10px; gap: 6px; }
  .tv__name { font-size: 22px; }
  .tv__links { gap: 6px; }
  .sound-choice, .loader__skip { font-size: 10px; padding: 7px 9px; }
  .loader__ride { font-size: 12px; padding: 8px 12px; }
}
.tv__circle {
  /* pattern colours (wave.js reads these; light and dark versions) */
  --wave-bg: #EBEFF3; --wave-line: #17222E; --wave-ball: #DE271C;
  position: absolute; inset: 0;
  border-radius: 50%;
  overflow: hidden;
  background: radial-gradient(circle, color-mix(in srgb, var(--wave-bg) 100%, #fff 12%) 0%, var(--wave-bg) 72%);
  background-color: var(--wave-bg);
  box-shadow: 0 0 0 calc(var(--d) * .018) #000, 0 0 0 calc(var(--d) * .034) #f2f2f2, 0 0 0 calc(var(--d) * .05) #000;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .tv__circle { --wave-bg: #090D12; --wave-line: #A9BDD2; --wave-ball: #FF4B3F; }
}
:root[data-theme="dark"] .tv__circle { --wave-bg: #090D12; --wave-line: #A9BDD2; --wave-ball: #FF4B3F; }
.tv--art .tv__circle { box-shadow: 0 0 0 calc(var(--d) * .018) #000, 0 0 0 calc(var(--d) * .034) #f2f2f2, 0 0 0 calc(var(--d) * .05) #000, 0 0 calc(var(--d) * .12) rgba(90,140,255,.45); }
.wave__canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.wave__nogl { position: absolute; inset: 0; display: grid; place-items: center; margin: 0; padding: 20%; text-align: center;
  font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--wave-line); }

/* the desk under the circle: pattern controls, station plate (name + loading bar / Enter), links */
.tv__desk {
  position: absolute; left: 50%; top: calc(100% + max(16px, var(--d) * .07));
  width: min(max(var(--d), 460px), calc(100vw - 32px));
  transform: translateX(-50%);
  display: grid; gap: 10px; justify-items: center;
}
/* short landscape screens (phones on their side): circle on the left, desk on the right */
@media (orientation: landscape) and (max-height: 540px) {
  .tv__center { --d: min(74vh, 42vw); left: 30%; top: 50%; }
  @supports (height: 100dvh) { .tv__center { --d: min(74dvh, 42vw); } }
  .tv__desk { left: calc(100% + max(24px, 4vw)); top: 50%; transform: translateY(-50%);
    width: min(360px, calc(70vw - var(--d) / 2 - 56px)); }
}
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* pattern controls: small black chips, like labels taped to the card */
.wave-ctrl { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 6px;
  font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: #f4f4f4; }
.wave-ctrl__btn, .wave-ctrl__chip, .wave-ctrl__read {
  display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 9px;
  background: #000; color: #f4f4f4; border: 1px solid rgba(244,244,244,.7); font: inherit; letter-spacing: inherit;
}
.wave-ctrl__btn { min-width: 32px; justify-content: center; cursor: pointer; font-size: 15px; }
.wave-ctrl__btn:hover, .wave-ctrl__btn:focus-visible, .wave-ctrl__chip:hover { background: #f4f4f4; color: #000; outline: none; }
.wave-ctrl__chip { cursor: pointer; }
.wave-ctrl__chip input[type="checkbox"] { accent-color: #DE271C; width: 13px; height: 13px; margin: 0; }
/* pause / play icon */
.wave-ctrl__icon { width: 10px; height: 11px; display: block;
  background: linear-gradient(90deg, currentColor 0 35%, transparent 35% 65%, currentColor 65%); }
.wave-ctrl__btn[data-state="paused"] .wave-ctrl__icon { background: currentColor; clip-path: polygon(0 0, 100% 50%, 0 100%); }
.wave-ctrl__speed input[type="range"] { width: 76px; accent-color: #DE271C; margin: 0; }
.wave-ctrl__speed output { min-width: 3.4em; font-variant-numeric: tabular-nums; }
.wave-ctrl__read { font-variant-numeric: tabular-nums; border-style: dashed; color: rgba(244,244,244,.8); cursor: default; }
.wave-ctrl__act { color: #fff; font-weight: 700; min-width: 4.6em; text-align: center; }

/* station plate: the name over a step-scale loading bar */
.tv__plate { width: 100%; display: grid; gap: 7px; justify-items: center;
  padding: 10px 12px 12px; background: #000; color: #f4f4f4;
  border: 2px solid #f4f4f4; box-shadow: 0 0 0 3px #000, 0 8px 22px rgba(0,0,0,.45); }
.tv__name { font-size: clamp(20px, calc(var(--d) * .085), 40px); letter-spacing: .12em; text-transform: uppercase; line-height: 1; }
.tv__status { font-size: 12px; font-weight: 700; letter-spacing: .22em; text-transform: uppercase; font-variant-numeric: tabular-nums; }
/* loading bar: 12 grey steps (black to white, like the card's step scale) light up as the world loads */
.tv__tune { position: relative; width: 100%; height: 46px; padding: 0; border: 2px solid #f4f4f4; background: #0d0d0d;
  color: #fff; cursor: progress; overflow: hidden; transition: background .35s, box-shadow .35s, transform .2s; }
.tv__steps { position: absolute; inset: 3px; display: grid; grid-template-columns: repeat(12, 1fr); gap: 3px; }
.tv__steps i { background: #1c1c1c; transition: background .25s; }
.tv__steps i.on:nth-child(1) { background: #262626; } .tv__steps i.on:nth-child(2) { background: #3a3a3a; }
.tv__steps i.on:nth-child(3) { background: #4f4f4f; } .tv__steps i.on:nth-child(4) { background: #646464; }
.tv__steps i.on:nth-child(5) { background: #797979; } .tv__steps i.on:nth-child(6) { background: #8e8e8e; }
.tv__steps i.on:nth-child(7) { background: #a3a3a3; } .tv__steps i.on:nth-child(8) { background: #b8b8b8; }
.tv__steps i.on:nth-child(9) { background: #cdcdcd; } .tv__steps i.on:nth-child(10) { background: #dedede; }
.tv__steps i.on:nth-child(11) { background: #ececec; } .tv__steps i.on:nth-child(12) { background: #fafafa; }
/* the text sits on a small black label over the steps */
.tv__tune-label { position: absolute; inset: 0; display: grid; place-items: center; color: #fff; }
.tv__tune-label .tv__status { background: #000; padding: 4px 10px; box-shadow: 0 0 0 1px rgba(244,244,244,.35); }
.tv__tune.is-ready .tv__tune-label .tv__status { background: none; box-shadow: none; }
.tv__status--go { font-size: 15px; letter-spacing: .2em; }
/* ready: the bar becomes a red Enter button (the colour of the pattern's balls) */
.tv__tune.is-ready { cursor: pointer; background: #DE271C; border-color: #fff;
  box-shadow: 0 0 0 3px #000, 0 0 22px rgba(222,39,28,.65); animation: tune-pulse 1.6s ease-in-out infinite; }
.tv__tune.is-ready .tv__steps { opacity: 0; transition: opacity .3s; }
.tv__tune.is-ready .tv__status--go { animation: none; }
.tv__tune.is-ready:hover, .tv__tune.is-ready:focus-visible { background: #f0352a; transform: scale(1.02); outline: 2px solid #fff; outline-offset: 3px; }
.tv__tune.is-going { animation: none; cursor: default; box-shadow: 0 0 0 3px #000, 0 0 26px rgba(255,60,45,.8); }
@keyframes tune-pulse { 0%, 100% { box-shadow: 0 0 0 3px #000, 0 0 14px rgba(222,39,28,.45); } 50% { box-shadow: 0 0 0 3px #000, 0 0 30px rgba(255,60,45,.9); } }
.tv--art .tv__tune.is-ready .tv__status--go { color: #fff; text-shadow: none; }
@media (prefers-reduced-motion: reduce) { .tv__tune.is-ready { animation: none; } }

/* links row: sound choice, text version, the other ride */
.tv__links { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 8px; }
.sound-choice {
  white-space: nowrap; font-size: 11px; letter-spacing: .12em; text-transform: uppercase;
  color: #fff; background: #000; padding: 7px 12px; border: 1px solid #f4f4f4; cursor: pointer;
}
.sound-choice:hover, .sound-choice:focus-visible { background: #f4f4f4; color: #000; outline: none; }
.sound-choice__state { font-weight: 700; }
/* TV static, scanlines and curved-glass glow */
.tv__static { position: absolute; inset: 0; width: 100%; height: 100%; image-rendering: pixelated; opacity: .09; mix-blend-mode: screen; pointer-events: none; transition: opacity .25s; }
.tv__glass {
  position: absolute; inset: 0; pointer-events: none;
  background:
    repeating-linear-gradient(0deg, rgba(0,0,0,.16) 0 1px, transparent 1px 3px),
    radial-gradient(ellipse at center, rgba(255,255,255,.06) 0%, transparent 55%, rgba(0,0,0,.55) 100%);
  animation: flicker 4s infinite;
}
@keyframes flicker { 0%, 100% { opacity: 1; } 48% { opacity: .92; } 50% { opacity: 1; } 52% { opacity: .95; } }
.loader__skip { white-space: nowrap; color: #fff; background: #000; padding: 7px 10px; }
.loader__ride {
  white-space: nowrap; font: 700 13px/1 Georgia, serif; letter-spacing: .04em; color: #2a1e10; text-decoration: none;
  padding: 9px 16px; background: linear-gradient(#f3d68a, #c9963e); border: 3px double #5a3e14;
  box-shadow: 0 0 0 2px #e8c470, 0 6px 18px rgba(0,0,0,.45);
}
.loader__ride:hover, .loader__ride:focus-visible { background: linear-gradient(#ffe7a4, #d9a64e); outline: none; }
.loader__ride.is-back { font-family: inherit; }
/* Old-TV switch-off and back on (ui.js switchOn), 5.5 s. Times in seconds:
   0-0.23     the pattern's white dot blooms into a full white screen (.tv__off-white, from --dx/--dy)
   0.3-0.9    black closes from the top and bottom to a thin glowing line across the middle (.tv__off)
   0.9-1.4    the line holds
   1.4-2.1    the line squeezes in slowly from both sides to a white dot in the middle
   2.1-3.1    the dot holds for a second
   3.1-3.7    reverse: the dot stretches back out to a line across the full width
   3.7-4.4    the line opens up and down, the white turning into TV static as it opens (.tv__off-snow)
   4.4-5.0    the static holds (the world is switched on underneath at 5.0)
   5.0-5.5    the static fades away and the world shows */
.tv__off { position: absolute; inset: 0; z-index: 3; pointer-events: none; visibility: hidden;
  filter: drop-shadow(0 0 6px #fff) drop-shadow(0 0 14px rgba(255,255,255,.7)); }    /* glow round the line and dot */
.tv__off-white { position: absolute; inset: 0; background: #fff; }
.tv__off-snow { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; image-rendering: pixelated; }
.loader.tv-off { background: #000; }
.loader.tv-off .tv__off { visibility: visible; }
.loader.tv-off .tv__off-white { animation: tvOffLine 5.5s linear forwards; }
.loader.tv-off .tv__screen { animation: tvScreenOff 5.5s steps(1, end) forwards; }
.loader.tv-off .tv__off-snow { animation: tvOffSnow 5.5s linear forwards; }
.loader.tv-reveal { background: transparent; }            /* the world is on under the white */
@keyframes tvOffLine {
  /* the dot swells slowly, then floods the screen */
  0% { clip-path: circle(6px at var(--dx, 50%) var(--dy, 50%)); animation-timing-function: cubic-bezier(.6, 0, .9, .5); }
  4.18% { clip-path: circle(150vmax at var(--dx, 50%) var(--dy, 50%)); }
  /* switch to a box at the same full size, so the next steps can interpolate */
  4.19%, 5.45% { clip-path: inset(0 0 0 0 round 0px); opacity: 1; animation-timing-function: cubic-bezier(.55, 0, .85, .4); }
  16.36%, 25.45% { clip-path: inset(calc(50% - 2px) 0 calc(50% - 2px) 0 round 2px); animation-timing-function: cubic-bezier(.45, 0, .55, 1); }
  38.18%, 56.36% { clip-path: inset(calc(50% - 6px) calc(50% - 6px) calc(50% - 6px) calc(50% - 6px) round 6px); animation-timing-function: cubic-bezier(.45, 0, .55, 1); }
  67.27% { clip-path: inset(calc(50% - 2px) 0 calc(50% - 2px) 0 round 2px); animation-timing-function: cubic-bezier(.45, 0, .55, 1); }
  80%, 90.91% { clip-path: inset(0 0 0 0 round 0px); opacity: 1; animation-timing-function: ease-in-out; }
  100% { clip-path: inset(0 0 0 0 round 0px); opacity: 0; }
}
@keyframes tvScreenOff { 0% { opacity: 1; } 4.18%, 100% { opacity: 0; } }
/* the opening shows static, not white: white while it is a line, static by the time it is half open */
@keyframes tvOffSnow { 0%, 67.27% { opacity: 0; } 74%, 100% { opacity: 1; } }
#webgl.tv-hidden { visibility: hidden; }

/* ===== Channel guide (js/ui/channels.js): a 1960s tabletop TV set in a dim room =====
   .set = the set (--u = 1% of its width; every size inside is in --u). Walnut cabinet (wood grain drawn in code, --wood),
   a brown mask with a chrome bead round the picture tube (rounded, slightly bulging sides: SVG mask), and a brushed-gold
   control panel on the right: brand plate, VHF channel knob (2-13), On/Off + Volume knobs, station log card, speaker louvers.
   Inside the tube: preview stills, OSD channel number, lower third (name, tagline, Watch). data-kind: ride / soon / pattern / show / empty. */
.tv--guide .tv__card, .tv--guide .tv__center, .tv--guide .tv__glass { visibility: hidden; }
.tv--guide .tv__screen { background: #0d0b09; border-radius: 0; }     /* the room, while the guide starts up */
.guide { position: absolute; inset: 0; z-index: 2; color: #fff; overflow: hidden; touch-action: pan-y; user-select: none; -webkit-user-select: none;
  display: grid; place-items: center; align-content: center; gap: 1.2vh;
  /* the room: dark striped wallpaper, a lamp glow from the upper left, a wooden table top under the set */
  background:
    radial-gradient(ellipse 70% 60% at 28% 18%, rgba(255,196,120,.16), transparent 70%),
    linear-gradient(transparent 0 calc(50% + var(--seth, 30vh) / 2 + 2.2vh), #2a170b calc(50% + var(--seth, 30vh) / 2 + 2.2vh), #120904 100%),
    repeating-linear-gradient(90deg, rgba(255,255,255,.018) 0 14px, transparent 14px 46px),
    linear-gradient(#1d1915, #0d0b09);
  --setw: min(94vw, 138vh); --u: calc(var(--setw) / 100); --seth: calc(var(--u) * 59.5); }
@supports (height: 100dvh) { .guide { --setw: min(94vw, 138dvh); } }

.set { position: relative; width: var(--setw); }
.guide.is-intro .set { animation: setIntro 1.5s cubic-bezier(.2, .7, .2, 1) both; }
@keyframes setIntro { from { transform: scale(1.55); filter: brightness(.4); } to { transform: none; filter: none; } }

/* walnut cabinet */
.set__cab { position: relative; display: grid; grid-template-columns: calc(var(--u) * 69.9) 1fr; gap: calc(var(--u) * 2);
  height: var(--seth); padding: calc(var(--u) * 3); border-radius: calc(var(--u) * 2.4);
  background: var(--wood, #4a2a14) center / cover, #4a2a14;
  box-shadow:
    inset 0 calc(var(--u) * .35) calc(var(--u) * .4) rgba(255,220,170,.28),     /* rounded top edge catching the lamp */
    inset 0 calc(var(--u) * -.6) calc(var(--u) * .8) rgba(0,0,0,.55),
    inset calc(var(--u) * .3) 0 calc(var(--u) * .5) rgba(255,220,170,.12),
    0 calc(var(--u) * 1.4) calc(var(--u) * 3) rgba(0,0,0,.75); }
.set__cab::after { content: ''; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;   /* lacquer sheen */
  background: linear-gradient(115deg, rgba(255,240,215,.13) 0%, transparent 32%, transparent 70%, rgba(255,240,215,.06) 100%); }
.set__feet { position: absolute; left: 0; right: 0; top: 100%; height: calc(var(--u) * 2.2); pointer-events: none; }
.set__feet i { position: absolute; top: 0; width: calc(var(--u) * 7); height: 100%; border-radius: 0 0 calc(var(--u) * .8) calc(var(--u) * .8);
  background: linear-gradient(90deg, #160c05, #3a2210 40%, #1d1007); box-shadow: 0 calc(var(--u) * .6) calc(var(--u) * 1) rgba(0,0,0,.7); }
.set__feet i:first-child { left: 8%; } .set__feet i:last-child { right: 8%; }

/* the mask round the tube: cocoa-brown plastic, a chrome bead, a soft bevel */
.set__mask { position: relative; padding: calc(var(--u) * 2.2); border-radius: calc(var(--u) * 1.6);
  background: radial-gradient(ellipse at 30% 20%, #4b3526, #2a1c13 70%);
  box-shadow: 0 0 0 calc(var(--u) * .3) #c9c2b4, 0 0 0 calc(var(--u) * .5) #5d564c,   /* chrome bead */
    inset 0 calc(var(--u) * .4) calc(var(--u) * .6) rgba(255,255,255,.12), inset 0 calc(var(--u) * -.5) calc(var(--u) * .8) rgba(0,0,0,.6); }
/* the tube shape: big rounded corners, sides bowed out a little (stretched to the box) */
.set__gasket, .set__tube {
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 400 300' preserveAspectRatio='none'%3E%3Cpath d='M46 2 Q200 -6 354 2 Q394 4 396 46 Q404 150 396 254 Q394 296 354 298 Q200 306 46 298 Q6 296 4 254 Q-4 150 4 46 Q6 4 46 2Z'/%3E%3C/svg%3E") center / 100% 100% no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 400 300' preserveAspectRatio='none'%3E%3Cpath d='M46 2 Q200 -6 354 2 Q394 4 396 46 Q404 150 396 254 Q394 296 354 298 Q200 306 46 298 Q6 296 4 254 Q-4 150 4 46 Q6 4 46 2Z'/%3E%3C/svg%3E") center / 100% 100% no-repeat; }
.set__gasket { position: relative; width: 100%; height: 100%; background: #050403; padding: calc(var(--u) * .7); }
.set__tube { position: relative; width: 100%; height: 100%; overflow: hidden; background: #0b0d0c; container-type: size; }
.set__picture { position: absolute; inset: 0; transform-origin: 50% 50%; }
/* curved glass: dark round the rim, a soft window reflection top left, faint grey-green phosphor tint */
.set__glass { position: absolute; inset: 0; pointer-events: none; z-index: 5;
  background:
    radial-gradient(ellipse 38% 26% at 26% 18%, rgba(255,255,255,.16), rgba(255,255,255,.04) 60%, transparent 72%),
    linear-gradient(160deg, rgba(255,255,255,.07) 0%, transparent 35%),
    radial-gradient(ellipse 75% 72% at 50% 50%, transparent 55%, rgba(0,0,0,.38) 82%, rgba(0,0,0,.85) 100%),
    rgba(120,150,130,.05); }
.set__glass::after { content: ''; position: absolute; inset: 0;      /* scanlines */
  background: repeating-linear-gradient(0deg, rgba(0,0,0,.18) 0 1px, transparent 1px 3px); animation: flicker 4s infinite; }

/* power off: the picture squeezes to a line, then a dot that fades (power on plays it backwards) */
.set__dot { position: absolute; left: 50%; top: 50%; width: 2.2cqw; height: 2.2cqw; margin: -1.1cqw; border-radius: 50%; z-index: 4; pointer-events: none;
  background: #fff; box-shadow: 0 0 2cqw #fff, 0 0 5cqw rgba(200,230,255,.7); opacity: 0; }
.guide.is-off .set__picture { animation: crtOff .6s ease-in forwards; }
.guide.is-off .set__dot { animation: crtDot 2.4s ease-out forwards; }
.guide.is-powering .set__picture { animation: crtOn .7s ease-out; }
@keyframes crtOff { 0% { transform: none; filter: none; } 45% { transform: scale(1, .006); filter: brightness(5); } 85% { transform: scale(.01, .006); filter: brightness(8); } 100% { transform: scale(0, 0); } }
@keyframes crtOn { 0% { transform: scale(.01, .006); filter: brightness(8); } 40% { transform: scale(1, .006); filter: brightness(5); } 100% { transform: none; filter: none; } }
@keyframes crtDot { 0%, 22% { opacity: 0; } 25% { opacity: 1; transform: scale(1); } 100% { opacity: 0; transform: scale(.3); } }

/* what's on the screen */
.guide__pic { position: absolute; inset: 0; }
.guide__pic img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0;
  transition: opacity 1.1s ease; filter: saturate(.82) contrast(1.06); }
.guide__pic img.is-on { opacity: 1; }
.guide__pic img.is-kb { animation: guideZoom 9s linear forwards; }
@keyframes guideZoom { from { transform: scale(1.02); } to { transform: scale(1.12) translateX(-1.5%); } }
.guide[data-kind="empty"] .guide__pic, .guide[data-kind="soon"] .guide__pic, .guide[data-kind="pattern"] .guide__pic { opacity: 0; }
/* channel 7: the test card + Wave pattern (moved here from the loader); the caption fades so the card shows whole */
.guide__pattern { position: absolute; inset: 0; display: none; background: #7c7c7c; }
.guide[data-kind="pattern"] .guide__pattern { display: block; }
.guide__pattern .tv__card { visibility: visible; }
.guide__pattern-c { --d: 46cqh; position: absolute; left: 50%; top: 50%; width: var(--d); height: var(--d); transform: translate(-50%, -50%); }
.guide[data-kind="pattern"] .guide__third { animation: patternCaption 7s ease forwards; }
@keyframes patternCaption { 0%, 70% { opacity: 1; } 100% { opacity: 0; } }
.guide[data-kind="pattern"] .guide__third:hover, .guide[data-kind="pattern"] .guide__third:focus-within { animation: none; opacity: 1; }
.guide .tv__static { opacity: .12; }
.guide__scan { position: absolute; inset: 0; pointer-events: none; }
.guide__scan::after { content: ''; position: absolute; left: 0; right: 0; height: 18%; top: -20%;
  background: linear-gradient(transparent, rgba(255,255,255,.05), transparent); animation: guideRoll 7s linear infinite; }
@keyframes guideRoll { to { top: 120%; } }
.guide.is-flip .guide__pic { animation: guideFlip .38s steps(4, end); }
@keyframes guideFlip { 0% { transform: translateY(-7%) skewX(5deg); filter: brightness(2.2); } 60% { transform: translateY(3%); filter: brightness(1.4); } 100% { transform: none; filter: none; } }

/* green on-screen channel number */
.guide__osd { position: absolute; top: 6cqh; left: 6cqw; display: grid; gap: 2px; pointer-events: none; z-index: 2;
  font: 700 clamp(18px, 6.5cqw, 64px)/1 'Courier New', ui-monospace, monospace; color: #7dff6a; letter-spacing: .04em;
  text-shadow: 0 0 10px rgba(125,255,106,.75), 2px 2px 0 rgba(0,0,0,.6); }
.guide__osd-note { font-size: .34em; letter-spacing: .2em; }
@keyframes blink { 50% { opacity: 0; } }

/* the caption of the picture showing (old-TV shows): a small label top right */
.guide__bug { position: absolute; top: 6cqh; right: 6cqw; z-index: 2; max-width: 52cqw; pointer-events: none; opacity: 0; transition: opacity .6s;
  font: 700 clamp(9px, 1.8cqw, 15px)/1.2 var(--slab); letter-spacing: .1em; text-transform: uppercase; text-align: right; color: #f4efe2;
  text-shadow: 0 1px 3px #000, 0 0 10px rgba(0,0,0,.8); }
.guide__bug.is-on { opacity: .9; }
.guide[data-kind="show"] .guide__pic img { filter: saturate(.7) contrast(1.1) brightness(1.05) blur(.3px); }

/* coming soon: a planet through the snow + PLEASE STAND BY */
.guide__standby { position: absolute; inset: 0 0 30% 0; display: none; place-items: center; align-content: center; gap: 4cqh; pointer-events: none; }
.guide[data-kind="soon"] .guide__standby { display: grid; }
.guide__planet { position: relative; width: 26cqh; aspect-ratio: 1; border-radius: 50%;
  background: radial-gradient(circle at 34% 30%, #ffe2a8, #e0913f 38%, #8a3d16 70%, #2a0d05 100%);
  box-shadow: 0 0 40px rgba(255,170,90,.35); animation: spinSlow 30s linear infinite; }
.guide__planet i { position: absolute; left: -38%; right: -38%; top: 42%; height: 16%; border-radius: 50%;
  border: 3px solid rgba(255,225,170,.7); transform: rotate(-14deg); box-shadow: 0 0 10px rgba(255,200,120,.4); }
@keyframes spinSlow { to { transform: rotate(360deg); } }
.guide__standby-plate { background: #000; color: #f2f2f2; padding: .6em 1.4em; font-size: clamp(11px, 2.6cqw, 22px); letter-spacing: .22em; text-transform: uppercase; box-shadow: 0 0 0 2px #f2f2f2; }

/* lower third: kicker, name, tagline, Watch */
.guide__third { position: absolute; left: 0; right: 0; bottom: 0; z-index: 3; display: grid; gap: 1.2cqh;
  padding: 14cqh 7cqw 7cqh; background: linear-gradient(transparent, rgba(0,0,0,.55) 35%, rgba(0,0,0,.82)); }
.guide__kicker { font-family: var(--slab); font-size: clamp(10px, 1.9cqw, 16px); font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: #f2b46d; }
.guide__name { font-family: var(--slab); font-size: clamp(18px, 5.4cqw, 52px); font-weight: 700; line-height: 1.02; letter-spacing: .01em; text-shadow: 0 3px 18px rgba(0,0,0,.6); }
.guide__tag { font-size: clamp(11px, 1.9cqw, 16px); line-height: 1.45; color: rgba(255,255,255,.88); max-width: 60ch; text-shadow: 0 1px 8px rgba(0,0,0,.8); }
.guide__act { margin-top: .6cqh; }
.guide__act:empty { display: none; }
.guide__watch { width: min(300px, 44cqw); height: clamp(36px, 8cqh, 54px); }
.guide__watch .tv__status--go { font-size: clamp(13px, 2.2cqw, 17px); }

/* ---- control panel: brushed gold faceplate ---- */
.set__panel { position: relative; display: grid; grid-template-rows: auto auto auto auto 1fr; justify-items: center; gap: calc(var(--u) * 1.1);
  padding: calc(var(--u) * 1.4) calc(var(--u) * 1.2); border-radius: calc(var(--u) * 1.2); color: #2a1c0c;
  background:
    repeating-linear-gradient(90deg, rgba(255,255,255,.07) 0 1px, transparent 1px 3px, rgba(0,0,0,.05) 3px 4px),
    linear-gradient(160deg, #f1dca2 0%, #c9a55c 38%, #e8cf8e 55%, #a9843f 100%);
  box-shadow: 0 0 0 calc(var(--u) * .25) #6b5228, inset 0 calc(var(--u) * .25) calc(var(--u) * .3) rgba(255,255,255,.55), inset 0 calc(var(--u) * -.4) calc(var(--u) * .6) rgba(70,45,10,.45); }
.set__label { font: 700 clamp(7px, calc(var(--u) * .78), 12px)/1 var(--slab); letter-spacing: .16em; text-transform: uppercase; color: #3b2a12; text-shadow: 0 1px 0 rgba(255,240,200,.6); }
/* chrome script brand plate */
.set__brand { display: grid; justify-items: center; gap: calc(var(--u) * .2); width: 100%; padding: calc(var(--u) * .5) 0 calc(var(--u) * .6);
  border-bottom: 1px solid rgba(80,55,20,.35); }
.set__brand-name { font: italic 700 clamp(14px, calc(var(--u) * 2.6), 40px)/1 Georgia, 'Times New Roman', serif; letter-spacing: .01em;
  background: linear-gradient(#fdfdfd 0%, #b8bcc2 45%, #5e6268 52%, #e9ecef 80%); -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 1px 0 #3a2a10) drop-shadow(0 2px 2px rgba(0,0,0,.35)); }
.set__brand-model { font: 700 clamp(6px, calc(var(--u) * .7), 11px)/1 var(--slab); letter-spacing: .3em; text-transform: uppercase; color: #4a3616; }

/* the channel selector: numbers printed on the faceplate round a black ridged knob with a chrome cap;
   channel 0 is an unused dot */
.guide__dial { display: grid; justify-items: center; gap: calc(var(--u) * .4); }
.dial { --s: calc(var(--u) * 16.5); position: relative; width: var(--s); height: var(--s); border-radius: 50%;
  background: radial-gradient(circle, transparent 0 60%, rgba(60,40,10,.18) 61%, transparent 64%, transparent 92%, rgba(60,40,10,.35) 93% 94%, transparent 95%); }
.dial__num { position: absolute; transform: translate(-50%, -50%); width: calc(var(--s) * .15); height: calc(var(--s) * .15); border-radius: 50%; border: 0; background: none; cursor: pointer;
  font: 700 clamp(8px, calc(var(--s) * .072), 15px)/calc(var(--s) * .15) var(--slab); color: rgba(59,42,18,.5); padding: 0; transition: color .2s, background .2s, transform .2s; }
.dial__num.is-live { color: #2a1a06; }
.dial__num:hover, .dial__num:focus-visible { color: #8a1a10; outline: none; transform: translate(-50%, -50%) scale(1.15); }
.dial__num.is-active { background: #8a1a10; color: #ffe9c0; box-shadow: 0 0 0 2px rgba(255,240,200,.5); }
.dial__num--zero:not(.is-live) { font-size: 0; cursor: default; pointer-events: none; }
.dial__num--zero:not(.is-live)::before { content: '•'; font-size: 11px; color: rgba(59,42,18,.45); }
.dial__knob, .knob { border-radius: 50%; touch-action: none; transition: transform .28s var(--ease);
  background: radial-gradient(circle at 36% 28%, rgba(255,255,255,.35), transparent 42%), repeating-conic-gradient(#1a1714 0 6deg, #34302b 6deg 12deg);
  box-shadow: 0 calc(var(--u) * .5) calc(var(--u) * .9) rgba(40,20,0,.65), inset 0 -3px 8px rgba(0,0,0,.7), inset 0 2px 3px rgba(255,255,255,.25), 0 0 0 calc(var(--u) * .15) rgba(30,20,8,.6); }
.dial__knob { position: absolute; inset: 22%; cursor: grab; }
.dial__knob:active { cursor: grabbing; }
.dial__knob:focus-visible, .knob:focus-visible { outline: 2px solid #8a1a10; outline-offset: 4px; }
.dial__pointer { position: absolute; left: 50%; top: 3%; width: 7%; height: 26%; margin-left: -3.5%; border-radius: 3px; background: #f4efe2; box-shadow: 0 0 3px rgba(0,0,0,.6); }
.dial__cap { position: absolute; inset: 30%; border-radius: 50%; background: radial-gradient(circle at 40% 35%, #ffffff, #b8bcc2 45%, #5e6268 80%, #2e3034 100%); box-shadow: 0 2px 6px rgba(0,0,0,.7), inset 0 0 0 1px rgba(255,255,255,.5); }

/* On/Off + Volume knobs */
.set__knobs { display: flex; justify-content: center; gap: calc(var(--u) * 2.2); width: 100%; }
.set__ctl { display: grid; justify-items: center; gap: calc(var(--u) * .45); position: relative; }
.knob { position: relative; width: calc(var(--u) * 5.4); height: calc(var(--u) * 5.4); border: 0; padding: 0; cursor: pointer; transform: rotate(-130deg); }
.knob[aria-pressed="true"] { transform: rotate(60deg); }
.knob::before { content: ''; position: absolute; inset: 28%; border-radius: 50%; background: radial-gradient(circle at 40% 35%, #fff, #b8bcc2 45%, #5e6268 85%); box-shadow: inset 0 0 0 1px rgba(255,255,255,.5); }
.knob__mark { position: absolute; left: 50%; top: 5%; width: 9%; height: 20%; margin-left: -4.5%; border-radius: 2px; background: #f4efe2; }
.knob__scale { display: flex; justify-content: space-between; width: calc(var(--u) * 6.4); margin-bottom: calc(var(--u) * -.2);
  font: 700 clamp(6px, calc(var(--u) * .6), 10px)/1 var(--slab); letter-spacing: .08em; text-transform: uppercase; color: rgba(59,42,18,.75); }
.set__state { font: 700 clamp(7px, calc(var(--u) * .7), 11px)/1 var(--slab); letter-spacing: .1em; text-transform: uppercase; color: #6b1a10; }
/* pilot light: an amber jewel that glows while the set is on */
.set__pilot { position: absolute; top: calc(var(--u) * 1.6); right: calc(var(--u) * -1.1); width: calc(var(--u) * .9); height: calc(var(--u) * .9); border-radius: 50%;
  background: radial-gradient(circle at 40% 35%, #fff3c4, #ffb02e 45%, #a24b00); box-shadow: 0 0 calc(var(--u) * .9) #ffae2a, 0 0 0 1px #5a3a10; transition: all .4s; }
.guide.is-off .set__pilot { background: radial-gradient(circle at 40% 35%, #8a6a40, #4a2c10); box-shadow: 0 0 0 1px #5a3a10; }

/* station log card: the channels, typed on a cream card behind a brass frame */
.set__log { width: 100%; padding: calc(var(--u) * .7) calc(var(--u) * .8); background: #f4ead2; color: #2a1c0c; border-radius: 3px;
  box-shadow: 0 0 0 calc(var(--u) * .25) #8a6a30, inset 0 0 calc(var(--u) * 1.5) rgba(140,100,40,.25); }
.guide__list-title { font: 700 clamp(7px, calc(var(--u) * .72), 12px)/1.2 var(--slab); letter-spacing: .14em; text-transform: uppercase; color: #6b1a10; margin-bottom: calc(var(--u) * .35);
  border-bottom: 1px solid rgba(107,26,16,.4); padding-bottom: calc(var(--u) * .3); }
.guide__list ol { list-style: none; display: grid; grid-template-columns: 1fr 1fr; gap: 1px calc(var(--u) * .4); margin: 0; padding: 0; }
.guide__list button { width: 100%; display: flex; align-items: center; gap: calc(var(--u) * .6); padding: calc(var(--u) * .25) calc(var(--u) * .3); color: inherit; background: none; border: 0; cursor: pointer; text-align: left;
  font: clamp(8px, calc(var(--u) * .9), 14px)/1.15 'Courier New', ui-monospace, monospace; }
.guide__list button:hover, .guide__list button:focus-visible { background: rgba(140,100,40,.18); outline: none; }
.guide__list button[aria-pressed="true"] { background: #8a1a10; color: #ffe9c0; }
.guide__list-ch { font-weight: 700; min-width: 2ch; }
.guide__list-name { flex: 1; font-weight: 700; }
.guide__list-name { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.guide__list-soon { display: none; font-size: .75em; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; border: 1px solid currentColor; padding: 1px 4px; opacity: .7; }

/* speaker: wooden louvers over gold cloth */
.set__grille { align-self: stretch; width: 100%; min-height: calc(var(--u) * 3); border-radius: calc(var(--u) * .6);
  background:
    repeating-linear-gradient(0deg, transparent 0 calc(var(--u) * .55), rgba(0,0,0,.55) calc(var(--u) * .55) calc(var(--u) * .65), #6a3e1c calc(var(--u) * .65) calc(var(--u) * .8), #3a2010 calc(var(--u) * 1.15) calc(var(--u) * 1.25), rgba(0,0,0,.6) calc(var(--u) * 1.25) calc(var(--u) * 1.35)),
    repeating-linear-gradient(90deg, rgba(0,0,0,.25) 0 1px, transparent 1px 3px),
    repeating-linear-gradient(0deg, rgba(0,0,0,.25) 0 1px, transparent 1px 3px),
    #8a6e3c;
  box-shadow: inset 0 calc(var(--u) * .3) calc(var(--u) * .6) rgba(0,0,0,.6), 0 0 0 calc(var(--u) * .2) #6b5228; }

.guide__help { font-size: 11px; letter-spacing: .06em; color: rgba(255,235,205,.55); text-align: center; margin-top: calc(var(--u) * 2.4); }
.guide__foot { position: absolute; top: var(--gutter); right: var(--gutter); display: flex; gap: 8px; }
/* once Watch is pressed the set is busy tuning in */
.guide.is-locked .guide__dial, .guide.is-locked .set__log, .guide.is-locked .knob--power { opacity: .55; pointer-events: none; transition: opacity .4s; }

/* phones held upright: tube on top, controls in a row under it */
@media (max-aspect-ratio: 1/1) {
  .guide { --setw: min(96vw, 72vh); --seth: calc(var(--u) * 118); }
  @supports (height: 100dvh) { .guide { --setw: min(96vw, 72dvh); } }
  .set__cab { grid-template-columns: 1fr; height: auto; padding: calc(var(--u) * 3.4); gap: calc(var(--u) * 3); }
  .set__mask { aspect-ratio: 4 / 3; height: auto; padding: calc(var(--u) * 2.6); }
  .set__panel { grid-template-columns: auto 1fr auto; grid-template-rows: auto auto; align-items: center; gap: calc(var(--u) * 2); padding: calc(var(--u) * 2); }
  .set__brand { grid-column: 1 / -1; border-bottom: 0; padding: 0; }
  .set__brand-name { font-size: calc(var(--u) * 6); }
  .set__brand-model { font-size: calc(var(--u) * 1.6); }
  .dial { --s: calc(var(--u) * 34); }
  .set__knobs { flex-direction: column; align-items: center; gap: calc(var(--u) * 2.5); }
  .knob { width: calc(var(--u) * 11); height: calc(var(--u) * 11); }
  .knob__scale { width: calc(var(--u) * 13); font-size: 8px; }
  .set__label, .set__state { font-size: 9px; }
  .set__pilot { top: calc(var(--u) * 3.6); right: calc(var(--u) * -2.6); width: calc(var(--u) * 2); height: calc(var(--u) * 2); }
  .set__log { display: none; }
  .set__grille { width: calc(var(--u) * 18); height: calc(var(--u) * 34); }
  .guide__third { padding: 12cqh 5cqw 5cqh; }
  .guide__tag { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
  .guide__help { display: none; }
}
/* phones on their side: no log card */
@media (orientation: landscape) and (max-height: 540px) {
  .set__log { display: none; }
  .guide__help, .guide__foot { display: none; }
  .guide__tag { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
}
@media (prefers-reduced-motion: reduce) {
  .guide__pic img.is-kb, .guide__scan::after, .guide__planet, .guide.is-flip .guide__pic,
  .guide.is-intro .set, .set__glass::after { animation: none; }
}

@keyframes fadeUp { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

/* ================= Persistent UI ================= */
.ui { position: fixed; inset: 0; z-index: 10; pointer-events: none; }
.ui > * { pointer-events: auto; }
.ui-top {
  position: absolute;
  top: 0; left: 0; right: 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--gutter);
  pointer-events: none;
}
.ui-top > * { pointer-events: auto; }
.ui-logo { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.ui-logo img { width: 26px; height: 26px; filter: grayscale(1) brightness(2.2); }
.ui-top__right { display: flex; align-items: center; gap: 22px; }
.menu-btn { padding: 6px 0; position: relative; }
.menu-btn::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: 2px; height: 1px;
  background: currentColor; transform: scaleX(0); transform-origin: right; transition: transform .5s var(--ease);
}
.menu-btn:hover::after { transform: scaleX(1); transform-origin: left; }

/* Sound button with little waveform (mola style) */
.sound-btn { display: flex; align-items: center; gap: 10px; padding: 6px 0; --intensity: 0; }
.sound-btn__bars { display: flex; align-items: center; gap: 2px; height: 14px; }
.sound-btn__bars i {
  display: block; width: 2px; height: 100%;
  background: currentColor;
  transform: scaleY(.18);
  animation: bar 1s ease-in-out infinite;
  animation-play-state: paused;
}
.sound-btn[aria-pressed="true"] .sound-btn__bars i { animation-play-state: running; }
.sound-btn__bars i:nth-child(2) { animation-delay: -.3s; }
.sound-btn__bars i:nth-child(3) { animation-delay: -.7s; }
.sound-btn__bars i:nth-child(4) { animation-delay: -.15s; }
.sound-btn__bars i:nth-child(5) { animation-delay: -.5s; }
.sound-btn__bars i:nth-child(6) { animation-delay: -.85s; }
.sound-btn__bars i:nth-child(7) { animation-delay: -.4s; }
@keyframes bar { 0%, 100% { transform: scaleY(.2); } 50% { transform: scaleY(.95); } }

/* Zone title */
.zone-title {
  position: absolute;
  left: var(--gutter);
  bottom: var(--gutter);
  max-width: min(640px, 70vw);
  pointer-events: none;
}
.zone-title__index { opacity: .7; margin-bottom: 8px; font-variant-numeric: tabular-nums; }
.zone-title__name {
  font-size: clamp(44px, 8.4vw, 132px);
  font-weight: 800;
  font-stretch: 62%;
  font-variation-settings: 'wdth' 62;
  text-transform: uppercase;
  line-height: .86;
  letter-spacing: -.01em;
}
.zone-title__tag { margin-top: 12px; max-width: 420px; opacity: .8; font-size: 13px; }
.zone-title .char { display: inline-block; will-change: transform, opacity; }


.hint {
  position: absolute;
  left: 50%;
  bottom: var(--gutter);
  transform: translateX(-50%);
  opacity: .7;
  transition: opacity 1s;
  pointer-events: none;
  white-space: nowrap;
}
.hint.is-hidden { opacity: 0; }

/* Hotspot markers (diamond + label) */
.hotspots { position: absolute; inset: 0; pointer-events: none; }
.hotspot {
  position: absolute;
  left: 0; top: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  pointer-events: auto;
  opacity: 0;
  transition: opacity .6s;
  will-change: transform;
}
.hotspot.is-visible { opacity: 1; }
.hotspot.is-hidden { pointer-events: none; }
.hotspot__dot {
  width: 22px; height: 22px;
  margin: -11px 0 0 -11px;
  display: grid; place-items: center;
  position: relative;
}
.hotspot__dot::before, .hotspot__dot::after {
  content: ''; position: absolute; inset: 0; margin: auto;
  width: 9px; height: 9px; transform: rotate(45deg);
  background: var(--ink);
}
.hotspot__dot::after {
  width: 22px; height: 22px; background: none; border: 1px solid var(--ink);
  animation: pulse 2.4s var(--ease) infinite;
}
@keyframes pulse { 0% { transform: rotate(45deg) scale(.5); opacity: 1; } 100% { transform: rotate(45deg) scale(1.5); opacity: 0; } }
.hotspot__label {
  font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  padding: 6px 10px; margin-top: -11px;
  background: rgba(10, 8, 8, .35);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  border-radius: 999px;
  white-space: nowrap;
  transition: background .3s, color .3s;
}
.hotspot:hover .hotspot__label, .hotspot:focus-visible .hotspot__label { background: var(--ink); color: var(--night); }

/* ================= Menu ================= */
.menu {
  position: fixed;
  inset: 0;
  z-index: 30;
  background: rgba(8, 7, 7, .72);
  backdrop-filter: blur(22px); -webkit-backdrop-filter: blur(22px);
  display: grid;
  grid-template-rows: 1fr auto;
  padding: calc(var(--gutter) + 50px) var(--gutter) var(--gutter);
  opacity: 0;
  visibility: hidden;
  transition: opacity .7s var(--ease), visibility .7s;
}
.menu.is-open { opacity: 1; visibility: visible; }
.menu { grid-template-rows: minmax(0, 1fr) auto; }
.menu__list { max-height: 100%; overflow-y: auto; overscroll-behavior: contain; }   /* long lists (art ride: 17) scroll on phones */
.menu__list {
  list-style: none;
  align-self: center;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: 6vw;
  row-gap: 2px;
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
}
.menu__list li { overflow: hidden; }
.menu__list button {
  display: flex; align-items: baseline; gap: 14px; width: 100%; text-align: left;
  padding: 4px 0;
  transform: translateY(105%);
  transition: transform .9s var(--ease), opacity .3s;
}
.menu.is-open .menu__list button { transform: none; }
.menu__num { font-size: 11px; font-weight: 700; opacity: .5; font-variant-numeric: tabular-nums; min-width: 22px; }
.menu__name {
  font-size: clamp(30px, 4.6vw, 66px);
  font-weight: 800;
  font-variation-settings: 'wdth' 62;
  text-transform: uppercase;
  line-height: 1;
}
.menu__tag { font-size: 12px; opacity: 0; transition: opacity .4s; margin-left: auto; text-align: right; }
.menu__list button:hover .menu__tag, .menu__list button:focus-visible .menu__tag { opacity: .7; }
.menu__list:hover button { opacity: .45; }
.menu__list:hover button:hover { opacity: 1; }
.menu__foot { display: flex; flex-wrap: wrap; gap: 22px; justify-content: center; }

/* ================= Content panel ================= */
.panel {
  position: fixed;
  z-index: 20;
  top: 0; right: 0; bottom: 0;
  width: min(520px, 100%);
  background: var(--panel);
  backdrop-filter: blur(26px) saturate(1.2); -webkit-backdrop-filter: blur(26px) saturate(1.2);
  border-left: 1px solid var(--ink-faint);
  transform: translateX(102%);
  transition: transform .9s var(--ease);
}
.panel.is-open { transform: none; }
.panel__close { position: absolute; top: var(--gutter); right: var(--gutter); z-index: 2; padding: 6px 0; }
.panel__scroll {
  height: 100%;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: calc(var(--gutter) + 46px) var(--gutter) 60px;
  scrollbar-width: thin;
  scrollbar-color: var(--ink-faint) transparent;
}
.panel h2 {
  font-size: clamp(36px, 5vw, 58px);
  font-weight: 800;
  font-variation-settings: 'wdth' 62;
  text-transform: uppercase;
  line-height: .9;
  margin: 8px 0 22px;
}
.panel h3 {
  font-size: 22px; font-weight: 800; font-variation-settings: 'wdth' 70;
  text-transform: uppercase; line-height: 1; margin-bottom: 8px;
}
.panel p { margin-bottom: 14px; opacity: .88; font-size: 15px; line-height: 1.6; }
.panel .kicker { color: var(--accent); }
.panel blockquote {
  border-left: 1px solid var(--accent);
  padding: 4px 0 4px 16px;
  margin: 22px 0;
  font-size: 18px;
  font-weight: 300;
  line-height: 1.45;
}
.panel blockquote cite { display: block; margin-top: 8px; font-style: normal; font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; opacity: .6; }
.panel figure { margin: 18px 0 22px; }
.panel figure img {
  width: 100%; display: block; border-radius: 4px; cursor: zoom-in;
  aspect-ratio: 3 / 2; object-fit: cover;
}
.panel figcaption { margin-top: 8px; font-size: 11px; opacity: .6; }
.panel figcaption a { opacity: 1; }
.panel .item { padding: 22px 0; border-top: 1px solid var(--ink-faint); }
.panel .item__year { color: var(--accent); margin-bottom: 4px; }
.panel .links { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 6px; }
.panel .btn-link {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; text-decoration: none;
  padding: 10px 16px; border: 1px solid var(--ink-faint); border-radius: 999px;
  transition: background .3s, color .3s;
}
.panel .btn-link:hover { background: var(--ink); color: var(--night); }
.panel .btn-link--big { padding: 16px 22px; font-size: 13px; width: 100%; justify-content: space-between; margin-bottom: 10px; }
.panel .note { font-size: 12px; opacity: .55; }
.panel .credits li { list-style: none; font-size: 12px; margin-bottom: 10px; opacity: .8; }

/* ================= Lightbox ================= */
.lightbox {
  position: fixed; inset: 0; z-index: 40;
  background: rgba(6, 5, 5, .92);
  display: grid; place-items: center; align-content: center; gap: 14px;
  padding: var(--gutter);
  cursor: zoom-out;
}
.lightbox img { max-width: 100%; max-height: 82vh; border-radius: 4px; }
.lightbox__cap { font-size: 12px; opacity: .7; text-align: center; }

/* ================= Text fallback ================= */
.fallback {
  position: relative; z-index: 60;
  max-width: 760px; margin: 0 auto;
  padding: 60px 16px 100px;
  height: 100%; overflow-y: auto;
}
body.text-mode { overflow: auto; }
body.text-mode .fallback { height: auto; overflow: visible; }
.fallback h1 { font-size: 64px; font-weight: 800; font-variation-settings: 'wdth' 62; text-transform: uppercase; line-height: .9; margin-bottom: 20px; }
.fallback h2 { font-size: 36px; font-weight: 800; font-variation-settings: 'wdth' 62; text-transform: uppercase; margin: 56px 0 12px; }
.fallback h3 { font-size: 20px; margin: 22px 0 6px; }
.fallback p { margin-bottom: 12px; opacity: .88; line-height: 1.65; }
.fallback img { max-width: 100%; border-radius: 4px; margin: 12px 0 4px; }
.fallback figcaption { font-size: 11px; opacity: .6; }
.fallback blockquote { border-left: 1px solid var(--ink-faint); padding-left: 14px; margin: 16px 0; }
.fallback a { color: var(--accent); }

/* ================= Small screens ================= */
@media (max-width: 760px) {
  .menu__list { grid-template-columns: 1fr; }
  .menu__tag { display: none; }
  .menu__name { font-size: clamp(28px, 9vw, 44px); }
  .zone-title { max-width: calc(100vw - 2 * var(--gutter)); bottom: calc(var(--gutter) + 26px); }
  .zone-title__tag { font-size: 12px; }
  .hint { display: none; }
  .sound-btn__label { display: none; }
  .panel { top: auto; height: 78vh; width: 100%; border-left: 0; border-top: 1px solid var(--ink-faint); border-radius: 14px 14px 0 0; transform: translateY(102%); }
  .panel.is-open { transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .2s !important; }
}
.zone-title .word { display: inline-block; white-space: nowrap; }

/* ==========================================================
   PARK-SIGN LOOK (overrides the original mola-style UI above):
   slab font, bigger header, louder hotspot labels, road
   navigation with a little bike, welcome message (Idaho), menu.
   ========================================================== */
:root { --slab: 'Zilla Slab', Rockwell, Georgia, serif; }
.welcome { display: none; }

.ui-logo { gap: 14px; }
.ui-logo img { width: 42px; height: 42px; }
.ui-logo .heading { font-family: var(--slab); font-size: 24px; font-weight: 700; letter-spacing: .02em; text-transform: none; }
.menu-btn {
  font-family: var(--slab); font-size: 19px; font-weight: 600; letter-spacing: .03em; text-transform: none;
  padding: 7px 20px; border: 2px solid var(--ink); border-radius: 999px; transition: background .3s, color .3s;
}
.menu-btn::after { display: none; }
.menu-btn:hover { background: var(--ink); color: var(--night); }
.sound-btn__label { font-family: var(--slab); font-size: 16px; font-weight: 600; text-transform: none; letter-spacing: .02em; }

.zone-title__name {
  font-family: var(--slab); font-weight: 700;
  font-stretch: normal; font-variation-settings: normal;
  font-size: clamp(28px, 3vw, 46px);
  letter-spacing: .06em; line-height: 1;
}
.zone-title__index { font-family: var(--slab); font-size: 14px; font-weight: 600; letter-spacing: .04em; }
.zone-title__tag { font-size: 15px; }

/* hotspot labels: big, bright, clearly clickable */
.hotspot { gap: 14px; cursor: pointer; }
.hotspot__dot { transform: scale(1.5); }
.hotspot__label {
  font-family: var(--slab); font-size: 19px; font-weight: 700; letter-spacing: .02em; text-transform: none;
  padding: 10px 20px 10px 18px;
  background: var(--accent); color: #1a1208;
  box-shadow: 0 6px 22px rgba(0,0,0,.45), 0 0 0 3px rgba(255,255,255,.22);
  animation: hsBob 2.6s ease-in-out infinite;
}
.hotspot__label::after { content: ' \2192'; }
.hotspot:hover .hotspot__label { background: #fff; color: #1a1208; box-shadow: 0 6px 26px rgba(0,0,0,.5), 0 0 0 4px var(--accent); }
@keyframes hsBob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-4px); } }

/* road navigation with the little bike */
.hint { display: none; }   /* replaced by the welcome hint */
.roadnav {
  display: block;
  position: absolute; right: var(--gutter); bottom: var(--gutter);
  width: min(480px, 40vw);
  padding-top: 8px;
}
.roadnav__name { font-family: var(--slab); font-size: 17px; font-weight: 700; text-align: right; margin-bottom: 46px; letter-spacing: .03em; }
.roadnav__road {
  position: relative; height: 12px; margin: 0 14px;
  background: #2a282b; border-radius: 6px; box-shadow: 0 0 0 2px rgba(244,239,230,.35);
}
.roadnav__road::before {        /* yellow centre dashes */
  content: ''; position: absolute; left: 6px; right: 6px; top: 50%; height: 2px; margin-top: -1px;
  background: repeating-linear-gradient(90deg, #e8b83a 0 8px, transparent 8px 16px);
}
.roadnav__bike {
  position: absolute; bottom: 17px; left: 0; width: 46px; margin-left: -23px;
  color: var(--ink); filter: drop-shadow(0 2px 3px rgba(0,0,0,.6));
  transition: left .25s linear;
}
.roadnav__bike svg { display: block; width: 100%; }
.roadnav__stop {
  position: absolute; top: 50%; width: 26px; height: 26px; margin: -13px 0 0 -13px;
  border-radius: 50%; background: #1a1816; border: 2px solid var(--ink);
  font-family: var(--slab); font-size: 13px; font-weight: 700; line-height: 22px; text-align: center;
  transition: background .3s, color .3s, transform .3s;
}
.roadnav__stop:hover, .roadnav__stop.is-active { background: var(--accent); color: #1a1208; border-color: var(--accent); transform: scale(1.18); }
.roadnav__stop::after {         /* stop name on hover */
  content: attr(data-name); position: absolute; bottom: 32px; left: 50%; transform: translateX(-50%);
  white-space: nowrap; font-size: 13px; padding: 3px 8px; border-radius: 6px;
  background: rgba(10,8,8,.75); color: var(--ink); opacity: 0; pointer-events: none; transition: opacity .2s;
}
.roadnav__stop:hover::after { opacity: 1; }
/* many markers (art ride: museum + 16 eras): wider road, smaller numbered circles */
.roadnav--many { width: min(640px, 52vw); }
.roadnav--many .roadnav__stop { width: 22px; height: 22px; margin: -11px 0 0 -11px; font-size: 11px; line-height: 18px; }
.roadnav--many .roadnav__stop::after { bottom: 28px; }

/* welcome message, top centre */
.welcome { transition: opacity .6s ease; }
.welcome.is-away { opacity: 0 !important; pointer-events: none; }
.welcome:not([hidden]) {
  display: block;
  position: absolute; left: 0; right: 0; margin: 0 auto; top: calc(var(--gutter) + 64px);   /* centred without transform (GSAP animates it) */
  width: min(680px, calc(100vw - 2 * var(--gutter)));
  text-align: center; pointer-events: none;
  padding: 18px 26px 16px;
  background: rgba(14, 10, 8, .42);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  border-radius: 18px; border: 1px solid rgba(244,239,230,.18);
  text-shadow: 0 2px 10px rgba(0,0,0,.45);
}
.welcome__title { font-family: var(--slab); font-size: clamp(26px, 3.2vw, 42px); font-weight: 700; line-height: 1.1; }
.welcome__body { margin-top: 8px; font-size: clamp(14px, 1.3vw, 18px); line-height: 1.45; opacity: .95; }
.welcome__hint {
  margin-top: 12px; display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--slab); font-size: 16px; font-weight: 600; color: var(--accent);
}
.welcome__mouse {           /* little mouse with a scrolling wheel */
  width: 18px; height: 28px; border: 2px solid currentColor; border-radius: 10px; position: relative;
}
.welcome__mouse::after {
  content: ''; position: absolute; left: 50%; top: 5px; width: 3px; height: 6px; margin-left: -1.5px;
  border-radius: 2px; background: currentColor; animation: wheel 1.6s ease-in-out infinite;
}
@keyframes wheel { 0% { transform: translateY(0); opacity: 1; } 80% { transform: translateY(8px); opacity: 0; } 100% { opacity: 0; } }

@media (max-width: 760px) {
  .roadnav { left: var(--gutter); right: var(--gutter); width: auto; bottom: 12px; }
  .zone-title { bottom: calc(var(--gutter) + 104px); }
  .zone-title__name { font-size: 24px; letter-spacing: .04em; }
  .roadnav__name { text-align: left; margin-bottom: 40px; }
  .roadnav--many { width: auto; }
  .roadnav--many .roadnav__stop { width: 18px; height: 18px; margin: -9px 0 0 -9px; font-size: 9.5px; line-height: 14px; border-width: 2px; }
  .ui-logo .heading { font-size: 19px; }
  .menu-btn { font-size: 16px; padding: 5px 14px; }
  .hotspot__label { font-size: 15px; padding: 8px 14px; }
  .welcome:not([hidden]) { top: calc(var(--gutter) + 52px); padding: 12px 14px; }
}

/* menu: one line per stop in the slab font, no wrapped names */
.menu__list { row-gap: 10px; column-gap: 5vw; max-width: 1100px; }
.menu__list button { align-items: center; gap: 16px; padding: 8px 0; border-bottom: 1px solid rgba(244,239,230,.14); }
.menu__num {
  font-family: var(--slab); font-size: 15px; font-weight: 700; opacity: 1; min-width: 34px; height: 34px;
  display: grid; place-items: center; border: 2px solid var(--ink); border-radius: 50%;
}
.menu__list button:hover .menu__num { background: var(--accent); border-color: var(--accent); color: #1a1208; }
.menu__name {
  font-family: var(--slab); font-size: clamp(22px, 2.5vw, 36px); font-weight: 700;
  font-variation-settings: normal; text-transform: none; letter-spacing: .01em;
  white-space: nowrap; line-height: 1.15;
}
.menu__tag { opacity: .6; font-size: 13px; flex: 1 1 0; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.menu__foot { gap: 26px; }
.menu__foot .link-small { font-family: var(--slab); font-size: 15px; font-weight: 600; letter-spacing: .02em; text-transform: none; }
@media (max-width: 760px) {
  .menu__list { grid-template-columns: 1fr; row-gap: 2px; }
  .menu__tag { display: none; }
  .menu__name { font-size: 22px; }
}

/* content panel headings in the slab font too */
.panel h2 { font-family: var(--slab); font-weight: 700; font-variation-settings: normal; text-transform: none; line-height: 1.05; font-size: clamp(30px, 3.6vw, 44px); }
.panel h3 { font-family: var(--slab); font-variation-settings: normal; }
.panel__close { font-family: var(--slab); font-size: 16px; font-weight: 600; text-transform: none; }

/* hotspot label flipped to the left of its marker (near the right edge) */
.hotspot.is-flip { flex-direction: row-reverse; }
.hotspot.is-flip .hotspot__label::after { content: ''; }
.hotspot--ride .hotspot__label::after { content: ''; }   /* "← Back from the future": the arrow is in the label */
.hotspot.is-flip .hotspot__label::before { content: '\2190 '; }

/* menu top bar: Home (back to Idaho) and Close, since the menu covers the header */
.menu__top {
  position: absolute; top: var(--gutter); left: var(--gutter); right: var(--gutter);
  display: flex; justify-content: space-between; align-items: center;
}
.menu__home, .menu__close {
  font-family: var(--slab); font-size: 19px; font-weight: 600; letter-spacing: .02em;
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 20px; border: 2px solid var(--ink); border-radius: 999px;
  transition: background .3s, color .3s, border-color .3s;
}
.menu__home span { font-size: 22px; line-height: 1; }
.menu__home:hover, .menu__close:hover, .menu__home:focus-visible, .menu__close:focus-visible { background: var(--accent); border-color: var(--accent); color: #1a1208; outline: none; }
@media (max-width: 760px) { .menu__home, .menu__close { font-size: 16px; padding: 6px 14px; } }
.menu__top-left { display: flex; gap: 10px; align-items: center; }
.menu__start { text-decoration: none; color: inherit; }
@media (max-width: 420px) { .menu__top-left { gap: 6px; } .menu__home, .menu__close { padding: 6px 10px; font-size: 15px; } }

/* Pause / Play button (top right, next to Sound): two bars when riding, a triangle when paused */
.pause-btn { display: flex; align-items: center; gap: 9px; padding: 6px 0; }
.pause-btn__label { font-family: var(--slab); font-size: 16px; font-weight: 600; text-transform: none; letter-spacing: .02em; }
.pause-btn__icon { width: 12px; height: 14px; border-left: 4px solid currentColor; border-right: 4px solid currentColor; box-sizing: border-box; }
.pause-btn[aria-pressed="true"] .pause-btn__icon {
  border-right: 0; border-left: 12px solid currentColor;
  border-top: 7px solid transparent; border-bottom: 7px solid transparent; width: 0; height: 0;
}
.pause-btn[aria-pressed="true"] .pause-btn__label { color: var(--accent); }
@media (max-width: 760px) { .pause-btn__label { display: none; } }
/* riding speed: a little gauge whose needle points left / up / right, and the speed name */
.speed-btn { display: flex; align-items: center; gap: 8px; padding: 6px 0; }
.speed-btn__label { font-family: var(--slab); font-size: 16px; font-weight: 600; text-transform: none; letter-spacing: .02em; min-width: 3.6em; text-align: left; }
.speed-btn__icon { position: relative; width: 18px; height: 10px; border: 2px solid currentColor; border-bottom: 0; border-radius: 10px 10px 0 0; box-sizing: border-box; }
.speed-btn__icon::after { content: ""; position: absolute; left: calc(50% - 1px); bottom: -1px; width: 2px; height: 8px; background: currentColor; transform-origin: 50% 100%; transform: rotate(var(--needle, 0deg)); transition: transform .3s ease; }
.speed-btn[data-speed="0.5"] { --needle: -55deg; }
.speed-btn[data-speed="2"] { --needle: 55deg; }
.speed-btn[data-speed="2"] .speed-btn__label { color: var(--accent); }
@media (max-width: 760px) {
  .speed-btn { gap: 5px; }
  .speed-btn__label { display: none; }
  .speed-btn::after { content: attr(data-short); font-family: var(--slab); font-size: 14px; font-weight: 600; }
  .speed-btn[data-speed="2"]::after { color: var(--accent); }
}
/* keyboard guide at the foot of the menu (hidden on touch screens) */
.menu__keys { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 4px 22px; margin: 18px 0 6px; font-size: 13px; opacity: .8; }
.menu__keys div { display: flex; gap: 10px; }
.menu__keys dt { min-width: 74px; font-weight: 700; }
.menu__keys dd { margin: 0; }
.menu__keys-title { grid-column: 1 / -1; font-size: 12px; letter-spacing: .12em; opacity: .7; }
@media (hover: none) { .menu__keys { display: none; } }
/* the smallest phones: just the logo mark, so Pause / Speed / Sound / Menu fit */
@media (max-width: 400px) { .ui-logo .heading { display: none; } }

/* ===== Ride Through Art History (?ride=art) ===== */
.art-btn { display: flex; align-items: center; padding: 6px 0; }
.art-btn__label { font-family: var(--slab); font-size: 16px; font-weight: 600; text-transform: none; letter-spacing: .02em; }
.art-btn[aria-pressed="true"] .art-btn__label { color: var(--accent); }
/* the painted worlds can be pale (Mondrian is mostly white): keep the scene title readable */
.art-ride .zone-title { text-shadow: 0 1px 3px rgba(0,0,0,.9), 0 0 16px rgba(0,0,0,.55); }
/* museum wall label */
.art-label {
  position: fixed; left: var(--gutter); top: 84px; z-index: 6; width: min(300px, calc(100vw - 2 * var(--gutter)));
  padding: 14px 16px 12px; background: #fbf8f1; color: #1d1a16; border-left: 4px solid var(--accent);
  box-shadow: 0 8px 24px rgba(0,0,0,.35); font-family: Georgia, serif; pointer-events: none;
  transition: opacity .8s, transform .8s; opacity: 0; transform: translateY(-6px);
}
.art-label.is-in { opacity: 1; transform: none; }
.art-label__title { font-weight: 700; font-size: 18px; line-height: 1.2; }
.art-label__line { font-style: italic; font-size: 13px; opacity: .75; margin-top: 3px; }
.art-label__text { font-size: 13.5px; line-height: 1.45; margin: 8px 0 0; }
/* phones: keep the header on one line (the art ride adds Postcard + Peek) */
.ui-logo .heading, .ui-top__right > * { white-space: nowrap; }
@media (max-width: 760px) {
  .art-ride .ui-top__right { gap: 14px; }
}
@media (max-width: 520px) {
  .art-ride .ui-logo .heading { display: none; }   /* logo mark stays and still links home */
}
@media (max-width: 760px) {
  .art-btn__label { font-size: 14px; }
  .art-label { top: 64px; width: min(260px, calc(100vw - 2 * var(--gutter))); padding: 10px 12px; }
  .art-label__text { display: none; }
}

/* ---------- Gas stop card (fuel gauge = loading bar while the scenes ahead load) ---------- */
.fuel { display: none; }
.fuel:not([hidden]) {
  display: flex; align-items: center; gap: 16px;
  position: absolute; left: 0; right: 0; margin: 0 auto; top: calc(var(--gutter) + 64px);
  width: min(460px, calc(100vw - 2 * var(--gutter)));
  padding: 14px 20px 14px 16px; pointer-events: none;
  background: rgba(14, 10, 8, .55);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  border-radius: 18px; border: 1px solid rgba(244,239,230,.18);
  text-shadow: 0 2px 10px rgba(0,0,0,.45);
  opacity: 0; transform: translateY(-10px); transition: opacity .5s ease, transform .5s var(--ease);
}
.fuel.is-on { opacity: 1; transform: none; }
.fuel__gauge { flex: 0 0 auto; width: 104px; height: 62px; overflow: visible; }
.fuel__arc { fill: none; stroke: rgba(244,239,230,.22); stroke-width: 7; stroke-linecap: round; }
.fuel__arc--fill { stroke: var(--accent); stroke-dasharray: 100; stroke-dashoffset: 100; transition: stroke-dashoffset .6s linear; }
.fuel__ticks line { stroke: var(--ink-dim); stroke-width: 2; }
.fuel__ef { font-family: var(--slab); font-size: 12px; font-weight: 700; fill: var(--ink); text-anchor: middle; }
.fuel__needle { transform-origin: 60px 64px; transform: rotate(-90deg); transition: transform .6s linear; }   /* CSS transition: keeps moving while a scene builds */
.fuel__needle line { stroke: #e8432e; stroke-width: 3.5; stroke-linecap: round; }
.fuel__hub { fill: var(--ink); }
.fuel__text { min-width: 0; }
.fuel__title { font-family: var(--slab); font-size: clamp(19px, 2vw, 24px); font-weight: 700; line-height: 1.15; }
.fuel__line { margin-top: 4px; font-size: 15px; opacity: .95; min-height: 1.3em; transition: opacity .3s; }
.fuel__line.is-swap { opacity: 0; }
.fuel__load { margin-top: 4px; font-family: var(--slab); font-size: 13px; font-weight: 600; color: var(--accent); letter-spacing: .02em; }
@media (max-width: 520px) {
  .fuel:not([hidden]) { gap: 12px; padding: 10px 14px 10px 10px; top: calc(var(--gutter) + 52px); }
  .fuel__gauge { width: 80px; height: 48px; }
  .fuel__line { font-size: 13px; }
}
.hotspots.is-fueling { opacity: 0; pointer-events: none; transition: opacity .4s; }
/* art ride: the same card as a curator's note (cream museum label) with a paint palette as the loading bar */
.fuel__palette { display: none; }
.fuel--art .fuel__gauge { display: none; }
.fuel--art .fuel__palette { display: block; flex: 0 0 auto; width: 96px; height: 68px; overflow: visible; }
.fuel__board { fill: #c89a62; stroke: #6a4a2a; stroke-width: 2; fill-rule: evenodd; }
.fuel__brush { stroke: #5a3a22; stroke-width: 4; stroke-linecap: round; }
.fuel__dab { fill: var(--c); stroke: rgba(40,24,12,.35); stroke-width: 1; opacity: .2; transform-box: fill-box; transform-origin: center; transform: scale(.55); transition: opacity .4s, transform .5s var(--ease); }
.fuel__dab.is-on { opacity: 1; transform: none; }
.fuel.fuel--art:not([hidden]) {
  background: #fbf8f1; color: #1d1a16; border: 0; border-left: 4px solid #8a3a22; border-radius: 4px;
  box-shadow: 0 8px 24px rgba(0,0,0,.35); text-shadow: none; backdrop-filter: none; -webkit-backdrop-filter: none;
  font-family: Georgia, serif;
}
.fuel--art .fuel__title { font-family: Georgia, serif; }
.fuel--art .fuel__line { font-style: italic; }
.fuel--art .fuel__load { font-family: Georgia, serif; color: #8a3a22; }
body:has(.fuel.is-on) .art-label { opacity: 0; }   /* the era label steps aside while the card is up */
@media (max-width: 520px) {
  .fuel--art .fuel__palette { width: 72px; height: 51px; }
}

/* ===== Tube check (js/ui/tubecheck.js): a 1960s TV service bench sizes up the computer before a ride ===== */
.tcheck { position: absolute; inset: 0; z-index: 4; container-type: size; background: #000; overflow: hidden;
  animation: crtOn .55s ease-out; font-family: 'Courier New', ui-monospace, monospace; color: #7dff8a; }
.tcheck.is-leaving { animation: crtOff .45s ease-in forwards; }
/* the test screens fill the tube */
.tcheck__gl { position: absolute; inset: 0; width: 100%; height: 100%; transition: opacity .6s, filter .6s; }
.tcheck.is-done .tcheck__gl { opacity: .7; }
/* slate top left: TUBE CHECK · Test 2 of 5 · Color bars */
.tcheck__slate { position: absolute; top: 5cqh; left: 5cqw; right: 22cqw; display: grid; gap: .6cqh; pointer-events: none; }
.tcheck__title { font: 700 clamp(13px, 3.6cqw, 34px)/1 var(--slab); color: #f4efe2; letter-spacing: .14em; text-transform: uppercase;
  text-shadow: 0 2px 0 #000, 0 0 12px rgba(0,0,0,.9); }
.tcheck__test { justify-self: start; background: rgba(0,0,0,.72); padding: .35em .7em; font-size: clamp(9px, 1.9cqw, 17px); letter-spacing: .12em;
  text-transform: uppercase; text-shadow: 0 0 8px rgba(125,255,138,.6); border-left: 3px solid #7dff8a; }
.tcheck__skip { position: absolute; top: 5cqh; right: 5cqw; background: rgba(0,0,0,.5); border: 1px solid rgba(244,239,226,.5); color: #f4efe2; cursor: pointer;
  font: 700 clamp(9px, 1.6cqw, 14px)/1 var(--slab); letter-spacing: .14em; text-transform: uppercase; padding: .6em 1.2em; border-radius: 3px; }
.tcheck__skip:hover, .tcheck__skip:focus-visible { background: rgba(244,239,226,.2); }
/* the repairman's service card: bottom left */
.tcheck__card { position: absolute; left: 5cqw; bottom: 6cqh; width: 52cqw; background: rgba(0,6,2,.8); border: 1px solid rgba(125,255,138,.45);
  padding: 1.6cqh 2cqw; display: grid; gap: .9cqh; font-size: clamp(8px, 1.75cqw, 16px); text-shadow: 0 0 7px rgba(125,255,138,.5);
  box-shadow: 0 1cqh 3cqh rgba(0,0,0,.6); }
.tcheck__maker { font-size: .78em; letter-spacing: .18em; text-transform: uppercase; opacity: .7; border-bottom: 1px dashed rgba(125,255,138,.35); padding-bottom: .5cqh; }
.tcheck__steps { list-style: none; margin: 0; padding: 0; display: grid; gap: .35cqh; }
.tcheck__steps li { display: grid; grid-template-columns: 1.4em 1fr auto; align-items: center; opacity: .38; transition: opacity .25s; }
.tcheck__steps li.is-on, .tcheck__steps li.is-done { opacity: 1; }
.tcheck__mark { width: .8em; height: .8em; border: 1px solid currentColor; display: grid; place-items: center; font-size: .9em; line-height: 1; }
.tcheck__steps li.is-on .tcheck__mark { background: #7dff8a; animation: blink .5s steps(1) infinite; }
.tcheck__steps li.is-done .tcheck__mark::after { content: '\2713'; }
.tcheck__sfps { font-weight: 700; min-width: 3ch; text-align: right; }
.tcheck__sfps:not(:empty)::after { content: ' fps'; font-weight: 400; opacity: .7; }
.tcheck__steps li[data-grade="0"] .tcheck__sfps { color: #ff7a66; } .tcheck__steps li[data-grade="1"] .tcheck__sfps { color: #f2c14a; }
.tcheck__info { display: flex; flex-wrap: wrap; gap: .2cqh 2.4cqw; font-size: .82em; opacity: .85; border-top: 1px dashed rgba(125,255,138,.35); padding-top: .6cqh; }
.tcheck__info span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.tcheck__info b { color: #d8ffd8; font-weight: 700; }
.tcheck__phase:empty { display: none; }
.tcheck__phase { color: #f4efe2; letter-spacing: .06em; animation: blink 1.2s steps(1) infinite; }
/* the meter: bottom right, cream face like a tube tester */
.tcheck__meter { position: absolute; right: 5cqw; bottom: 6cqh; width: 30cqw; background: linear-gradient(#f4ecd6, #ddd0ae); border-radius: 1.4cqw;
  box-shadow: 0 0 0 .5cqw #1b1712, 0 0 0 .8cqw #8b7d62, 0 1cqh 3cqh rgba(0,0,0,.7), inset 0 -1cqh 2cqh rgba(80,60,30,.25); padding: 1cqh 1cqw .8cqh; }
.tcheck__meter svg { display: block; width: 100%; height: auto; }
.tcheck__meter path { fill: none; }
.tcheck__z0 { stroke: #c4352a; stroke-width: 9; } .tcheck__z1 { stroke: #e0a92a; stroke-width: 9; } .tcheck__z2 { stroke: #3e9a3c; stroke-width: 9; }
.tcheck__tick { stroke: #2a241c; stroke-width: 1.4; }
.tcheck__labels text { font: 700 11px/1 var(--slab); fill: #2a241c; text-anchor: middle; text-transform: uppercase; letter-spacing: .08em; }
.tcheck__needle { transform-origin: 100px 108px; transform: rotate(-60deg); }
.tcheck__needle path { stroke: #111; stroke-width: 2.4; stroke-linecap: round; }
.tcheck__meter circle { fill: #1b1712; }
.tcheck__fps { text-align: center; color: #2a241c; text-shadow: none; font-size: clamp(8px, 1.5cqw, 14px); letter-spacing: .1em; text-transform: uppercase; }
.tcheck__fps b { font-size: 1.5em; }
/* the verdict: a rubber stamp slammed onto the picture, then the red Continue button under it */
.tcheck__stamp { position: absolute; left: 66%; top: 29%; z-index: 2; display: grid; justify-items: center; gap: .6cqh; padding: 2cqh 4cqw;
  border: .7cqw solid currentColor; border-radius: 1cqw; background: rgba(10,8,6,.85); color: #4fc24a; transform: translate(-50%, -50%) rotate(-8deg);
  font-family: var(--slab); text-transform: uppercase; animation: tcheckStamp .35s cubic-bezier(.2,1.4,.4,1) both; box-shadow: 0 2cqh 5cqh rgba(0,0,0,.6); }
.tcheck__stamp[data-grade="0"] { color: #ff6b5a; } .tcheck__stamp[data-grade="1"] { color: #f2c14a; }
.tcheck__stamp b { font-size: clamp(22px, 9cqw, 90px); line-height: 1; letter-spacing: .1em; }
.tcheck__stamp span { font-size: clamp(10px, 2.4cqw, 22px); letter-spacing: .2em; color: #f4efe2; }
@keyframes tcheckStamp { from { opacity: 0; transform: translate(-50%, -50%) rotate(-8deg) scale(2.2); } to { opacity: 1; transform: translate(-50%, -50%) rotate(-8deg) scale(1); } }
.tcheck__go { position: absolute; left: 66%; top: 47%; transform: translate(-50%, -50%); z-index: 3; cursor: pointer; border: 0; border-radius: 4px;
  background: #c8352a; color: #fff6e8; font: 700 clamp(11px, 2.4cqw, 22px)/1 var(--slab); letter-spacing: .14em; text-transform: uppercase; white-space: nowrap;
  padding: .75em 1.6em; box-shadow: 0 0 0 2px #f4efe2, 0 .6cqh 2cqh rgba(0,0,0,.6), 0 0 2.5cqh rgba(255,90,70,.55);
  animation: tcheckGo .4s ease-out both, tcheckPulse 1.8s ease-in-out .4s infinite; }
.tcheck__go:hover, .tcheck__go:focus-visible { background: #e04434; outline: none; }
@keyframes tcheckGo { from { opacity: 0; margin-top: 1cqh; } }
@keyframes tcheckPulse { 50% { box-shadow: 0 0 0 2px #f4efe2, 0 .6cqh 2cqh rgba(0,0,0,.6), 0 0 4.5cqh rgba(255,90,70,.9); } }
/* portrait (phones on the full-screen test card): card across the bottom, meter above it */
@container (orientation: portrait) {
  .tcheck__card { left: 4cqw; right: 4cqw; width: auto; bottom: 4cqh; }
  .tcheck__meter { width: 46cqw; bottom: auto; top: 16cqh; right: 4cqw; }
  .tcheck__slate { right: 4cqw; }
  .tcheck__stamp { left: 50%; top: 36%; }
  .tcheck__go { left: 50%; top: 50%; }
}
@media (prefers-reduced-motion: reduce) { .tcheck, .tcheck.is-leaving, .tcheck__stamp, .tcheck__phase, .tcheck__go, .tcheck__steps li.is-on .tcheck__mark { animation: none; } }

/* ---------- Solar System flight (channel 4): helm console along the bottom + warp flash ---------- */
.is-gone { display: none !important; }
.ui--helm .zone-title { display: none; }
.warpflash { position: fixed; inset: 0; pointer-events: none; z-index: 5; opacity: 0; background: radial-gradient(circle, #ffffff 0%, #bfe8ff 35%, rgba(90,160,255,.0) 75%); }
.warpflash.is-on { animation: warpFlash .9s ease-out; }
@keyframes warpFlash { 0% { opacity: 0; } 12% { opacity: 1; } 100% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .warpflash.is-on { animation-duration: .3s; } }
.helm {
  position: absolute; left: 0; right: 0; bottom: 0; pointer-events: auto; z-index: 3;
  padding: 0 var(--gutter) max(8px, env(safe-area-inset-bottom));
  font-family: Archivo, Arial, sans-serif; font-variant-numeric: tabular-nums; color: #cfd8e3;
}
.helm__bezel {
  display: grid; grid-template-columns: minmax(0, 2.3fr) minmax(0, 1.25fr) minmax(0, 1.15fr) minmax(130px, .6fr); gap: 10px;
  max-width: 1500px; margin: 0 auto; padding: 12px 12px 10px; border-radius: 16px 16px 6px 6px;
  background: linear-gradient(180deg, #343941 0%, #23272d 18%, #181b20 100%);
  border: 1px solid #50565f; border-bottom-color: #0c0d10;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.16), inset 0 -2px 6px rgba(0,0,0,.5), 0 -12px 40px rgba(0,0,0,.65);
}
.helm__block {
  min-width: 0; padding: 8px 10px 9px; border-radius: 8px; background: #06070a; border: 1px solid #000;
  box-shadow: inset 0 2px 10px rgba(0,0,0,.9), 0 1px 0 rgba(255,255,255,.07);
}
.helm__cap { display: flex; justify-content: space-between; font-size: 10px; font-weight: 700; letter-spacing: .2em; text-transform: uppercase; color: #7f93a8; margin-bottom: 7px; }
.helm__ship { color: #ffb447; letter-spacing: .24em; }
.helm__keys { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 5px; }
.helm__key {
  position: relative; height: 32px; padding: 0 2px 0 13px; border-radius: 4px; cursor: pointer; text-align: left;
  border: 1px solid #2b3139; background: linear-gradient(180deg, #1d2229, #121519); color: #a9bccf;
  font: 700 10.5px/1 Archivo, Arial, sans-serif; letter-spacing: .02em; text-transform: uppercase;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; box-shadow: inset 0 1px 0 rgba(255,255,255,.06);
  transition: background .15s, color .15s, box-shadow .15s;
}
.helm__key:hover { color: #e6f0fb; border-color: #3d4652; }
.helm__lamp { position: absolute; left: 6px; top: 50%; width: 5px; height: 5px; margin-top: -2.5px; border-radius: 50%; background: #262c34; }
.helm__key.is-here .helm__lamp { background: #5aff9a; box-shadow: 0 0 6px #5aff9a; }
.helm__key.is-on { background: linear-gradient(180deg, #ffd38a, #e79a2c); color: #201304; border-color: #ffe0a8; box-shadow: 0 0 14px rgba(255,180,71,.45), inset 0 1px 0 rgba(255,255,255,.5); }
.helm__mode { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; margin-bottom: 6px; }
.helm__seg {
  height: 24px; border-radius: 4px; border: 1px solid #2b3139; background: #11141a; color: #7f93a8; cursor: pointer;
  font: 700 10px/1 Archivo, Arial, sans-serif; letter-spacing: .16em; text-transform: uppercase;
}
.helm__seg.is-on { background: #0f2a3a; color: #8fdcff; border-color: #3a8ab8; box-shadow: 0 0 10px rgba(80,180,255,.3), inset 0 0 8px rgba(80,180,255,.25); }
.helm__dial { display: grid; grid-template-columns: 34px 1fr 34px; align-items: center; gap: 6px; }
.helm__step {
  height: 34px; border-radius: 50%; border: 1px solid #3a414b; background: radial-gradient(circle at 40% 35%, #3a4049, #15181d 70%);
  color: #dfe8f2; font: 700 18px/1 Archivo, Arial, sans-serif; cursor: pointer; touch-action: none; user-select: none;
  box-shadow: 0 2px 4px rgba(0,0,0,.6), inset 0 1px 0 rgba(255,255,255,.15);
}
.helm__step:active { transform: translateY(1px); }
.helm__readout { display: flex; flex-direction: column; align-items: center; line-height: 1.05; }
.helm__big { font-size: 24px; font-weight: 800; color: #ffc46a; text-shadow: 0 0 12px rgba(255,170,60,.45); letter-spacing: .02em; white-space: nowrap; }
.helm__small { font-size: 11px; color: #8fdcff; letter-spacing: .06em; margin-top: 2px; white-space: nowrap; }
.helm__slider { width: 100%; margin: 7px 0 0; accent-color: #ffb447; height: 16px; }
.helm__data { display: grid; gap: 4px; margin: 0; }
.helm__data div { display: flex; justify-content: space-between; gap: 8px; align-items: baseline; }
.helm__data dt { font-size: 10px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: #6f8399; white-space: nowrap; }
.helm__data dd { margin: 0; font-size: 15px; font-weight: 700; color: #e8f2ff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.helm__status { margin-top: 6px; font-size: 10px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: #5aff9a; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.helm__go { display: flex; padding: 8px; }
.helm__engage {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; border-radius: 8px; cursor: pointer;
  border: 1px solid #ff9a6a; background: linear-gradient(180deg, #e2462e, #9c1a10); color: #fff;
  box-shadow: 0 0 22px rgba(255,90,50,.35), inset 0 1px 0 rgba(255,255,255,.35), inset 0 -3px 8px rgba(0,0,0,.35);
  transition: filter .15s, box-shadow .15s;
}
.helm__engage:hover { filter: brightness(1.12); }
.helm__engage:active { transform: translateY(1px); }
.helm__engage[data-act="engage"], .helm__engage[data-act="course"] { animation: helmReady 1.6s ease-in-out infinite; }
.helm__engage[data-act="stop"] { border-color: #8fb8d8; background: linear-gradient(180deg, #46525f, #222a33); box-shadow: inset 0 1px 0 rgba(255,255,255,.2); animation: none; }
.helm__engage:disabled { opacity: .35; cursor: default; animation: none; box-shadow: none; filter: grayscale(.6); }
.helm__engage-label { font-size: 18px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; }
.helm__engage-sub { font-size: 10px; font-weight: 700; letter-spacing: .22em; text-transform: uppercase; opacity: .85; }
@keyframes helmReady { 50% { box-shadow: 0 0 34px rgba(255,110,60,.65), inset 0 1px 0 rgba(255,255,255,.35); } }
@media (prefers-reduced-motion: reduce) { .helm__engage { animation: none !important; } }
@media (max-width: 900px) {
  .helm { padding: 0 8px max(6px, env(safe-area-inset-bottom)); }
  .helm__bezel { grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr) 110px; gap: 7px; padding: 8px; }
  .helm__dest { grid-column: 1 / -1; }
  .helm__keys { grid-template-columns: repeat(6, minmax(0, 1fr)); }
}
@media (max-width: 560px) {
  .helm__bezel { grid-template-columns: minmax(0, 1fr) 96px; }
  .helm__nav { grid-column: 1 / -1; grid-row: 3; }
  .helm__go { grid-row: 2; grid-column: 2; }
  .helm__keys { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 4px; }
  .helm__key { height: 28px; font-size: 10px; padding-left: 13px; }
  .helm__big { font-size: 20px; }
  .helm__data { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
  .helm__data div { flex-direction: column; align-items: flex-start; gap: 2px; }
  .helm__data dd { font-size: 13px; }
  .helm__engage-label { font-size: 15px; }
}

