/* ==========================================================================
   Orchestra — ATTRACT MODE skin
   Dan doesn't have a portfolio, he owns an arcade. Home is the building's
   attract screen; projects are cabinets on the floor; the master bus (Nimbus)
   is the marquee cabinet. Two authored palettes: "the floor" (dark, default)
   and "the flyer" (light — printed paper, blue replaces yellow, a faint
   halftone over large fills only). Everything is CSS-drawn; system fonts only;
   the one canvas (the ship over the floor grid) is driven by nonced arcade.js.
   Motion is an enhancement and is removed under prefers-reduced-motion — with
   zero motion every page is fully readable and every control works.
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Tokens — dark ("the floor") is the root palette
   -------------------------------------------------------------------------- */
:root {
  color-scheme: dark light;

  --marquee-font: Impact, Haettenschweiler, "Arial Narrow", "Franklin Gothic Medium", "Arial Black", sans-serif;
  --body: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, "Cascadia Mono", Consolas, monospace;
  --body-size: 17px;
  --body-lh: 1.55;
  --measure: 62ch;
  --wrap: 1180px;

  /* room + cabinets */
  --room: #0B0E1A;
  --room-2: #101530;
  --cab: #1B2140;
  --cab-2: #253058;
  --cab-edge: #0A0D1C;
  --cab-side: #131838;
  --panel: var(--room);            /* base.css body background */
  --text: #EDEDF2;
  --muted: #A9AFC6;
  --ink: #0B0E1A;
  --line: rgba(255, 255, 255, .10);
  --line-strong: rgba(255, 255, 255, .22);
  --shadow: rgba(0, 0, 0, .6);

  /* the three lights */
  --coin: #E63946;                 /* cabinet red: CTAs, coin slot */
  --coin-fg: #0B0E1A;              /* text on a red button (5.2:1 on the red) */
  --coin-dim: #7A1E27;
  --coin-glow: rgba(230, 57, 70, .55);
  --marquee: #FFD166;              /* marquee yellow: headings */
  --marquee-dim: #8A6A1E;
  --marquee-glow: rgba(255, 209, 102, .5);
  --mq-bg: #FFD166;                /* a lit marquee strip on a cabinet */
  --mq-fg: #0B0E1A;
  --phos: #7CFFB2;                 /* phosphor green: links, scores, on-screen */
  --phos-dim: #2E7A55;
  --phos-glow: rgba(124, 255, 178, .45);

  /* the marquee type: face + the 3 hard offset layers */
  --mq-face: var(--marquee);
  --mq-s1: var(--coin);
  --mq-s2: var(--ink);
  --mq-s3: var(--cab-2);

  /* a screen is dark glass in BOTH palettes (a flyer prints the screen dark) */
  --screen-bg: #05070F;
  --screen-bg-2: #0E1A2E;
  --screen-phos: #7CFFB2;
  --screen-amber: #FFD166;
  --screen-red: #FF5C6A;
  --screen-blue: #5DA9FF;
  --screen-text: #E9F7EF;

  --pill-ok-bg: #123B2A;   --pill-ok-fg: #7CFFB2;
  --pill-warn-bg: #3F3212; --pill-warn-fg: #FFD166;
  --pill-hold-bg: #3E141A; --pill-hold-fg: #FF8A93;
  --pill-mute-bg: #262B44; --pill-mute-fg: #C2C7DA;

  --focus: var(--marquee);
  --link: var(--phos);
  --link-hover: var(--marquee);
  --code-bg: rgba(255, 255, 255, .08);

  /* the halftone: transparent on the floor; a 6% dot screen on the flyer */
  --halftone: radial-gradient(circle, transparent 0, transparent 100%);
  --halftone-size: 6px 6px;
  --grid-line: rgba(124, 255, 178, .55);
  --grid-line-2: rgba(230, 57, 70, .35);
  --horizon: rgba(255, 209, 102, .35);

  /* Widgets (base.css) are cabinets: cab surfaces, the marquee accent, and
     dark-glass wells with phosphor text in BOTH palettes. */
  --widget-mono: var(--mono);
  --widget-surface: var(--cab);
  --widget-surface-2: var(--cab-2);
  --widget-border: var(--cab-edge);
  --widget-border-strong: var(--cab-edge);
  --widget-radius: 8px;
  --widget-control-radius: 3px;
  --widget-hi: rgba(255, 255, 255, .08);
  --widget-shadow: var(--shadow);
  --widget-text: var(--text);
  --widget-muted: var(--muted);
  --widget-accent: var(--marquee);
  --widget-accent-fg: var(--mq-fg);
  --widget-accent-glow: var(--marquee-glow);
  --widget-hot: var(--coin);
  --widget-well: var(--screen-bg);
  --widget-well-fg: var(--screen-phos);
  --widget-control: var(--room);
  --widget-marquee-bg: var(--mq-bg);
  --widget-marquee-fg: var(--mq-fg);
}

/* Light ("the flyer") — an authored print palette, not an inversion. */
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    --room: #F2F3F5;
    --room-2: #E6E8EE;
    --cab: #E1E4EC;
    --cab-2: #FFFFFF;
    --cab-edge: #B7BCCB;
    --cab-side: #CBD0DD;
    --panel: var(--room);
    --text: #15171F;
    --muted: #4C5062;
    --ink: #15171F;
    --line: rgba(21, 23, 31, .12);
    --line-strong: rgba(21, 23, 31, .28);
    --shadow: rgba(21, 23, 31, .22);

    --coin: #D62839;
    --coin-fg: #F2F3F5;
    --coin-dim: #F0B7BD;
    --coin-glow: rgba(214, 40, 57, .3);
    --marquee: #2447B3;              /* print blue replaces yellow on paper */
    --marquee-dim: #9FB0E3;
    --marquee-glow: rgba(36, 71, 179, .25);
    --mq-bg: #2447B3;
    --mq-fg: #F2F3F5;
    --phos: #0F7A4F;
    --phos-dim: #9FD4BC;
    --phos-glow: rgba(15, 122, 79, .25);

    --mq-face: var(--marquee);
    --mq-s1: var(--coin);
    --mq-s2: var(--ink);
    --mq-s3: #C9CDD8;

    --pill-ok-bg: #D7F2E4;   --pill-ok-fg: #0B5C3B;
    --pill-warn-bg: #DDE4F8; --pill-warn-fg: #1E3A94;
    --pill-hold-bg: #FADDE0; --pill-hold-fg: #9C1C2A;
    --pill-mute-bg: #E4E6EC; --pill-mute-fg: #3F4353;

    --code-bg: rgba(21, 23, 31, .06);
    --halftone: radial-gradient(circle, rgba(21, 23, 31, .06) 1px, transparent 1.3px);
    --grid-line: rgba(36, 71, 179, .45);
    --grid-line-2: rgba(214, 40, 57, .3);
    --horizon: rgba(36, 71, 179, .18);
  }
}
:root[data-theme="light"] {
  --room: #F2F3F5;
  --room-2: #E6E8EE;
  --cab: #E1E4EC;
  --cab-2: #FFFFFF;
  --cab-edge: #B7BCCB;
  --cab-side: #CBD0DD;
  --panel: var(--room);
  --text: #15171F;
  --muted: #4C5062;
  --ink: #15171F;
  --line: rgba(21, 23, 31, .12);
  --line-strong: rgba(21, 23, 31, .28);
  --shadow: rgba(21, 23, 31, .22);
  --coin: #D62839;
  --coin-fg: #F2F3F5;
  --coin-dim: #F0B7BD;
  --coin-glow: rgba(214, 40, 57, .3);
  --marquee: #2447B3;
  --marquee-dim: #9FB0E3;
  --marquee-glow: rgba(36, 71, 179, .25);
  --mq-bg: #2447B3;
  --mq-fg: #F2F3F5;
  --phos: #0F7A4F;
  --phos-dim: #9FD4BC;
  --phos-glow: rgba(15, 122, 79, .25);
  --mq-face: var(--marquee);
  --mq-s1: var(--coin);
  --mq-s2: var(--ink);
  --mq-s3: #C9CDD8;
  --pill-ok-bg: #D7F2E4;   --pill-ok-fg: #0B5C3B;
  --pill-warn-bg: #DDE4F8; --pill-warn-fg: #1E3A94;
  --pill-hold-bg: #FADDE0; --pill-hold-fg: #9C1C2A;
  --pill-mute-bg: #E4E6EC; --pill-mute-fg: #3F4353;
  --code-bg: rgba(21, 23, 31, .06);
  --halftone: radial-gradient(circle, rgba(21, 23, 31, .06) 1px, transparent 1.3px);
  --grid-line: rgba(36, 71, 179, .45);
  --grid-line-2: rgba(214, 40, 57, .3);
  --horizon: rgba(36, 71, 179, .18);
}

/* --------------------------------------------------------------------------
   2. Surfaces
   -------------------------------------------------------------------------- */
body.skin-arcade {
  background:
    var(--halftone) 0 0 / var(--halftone-size),
    radial-gradient(120% 70% at 50% 0%, var(--room-2) 0%, var(--room) 60%);
  background-attachment: fixed;
  color: var(--text);
}
.wrap--floor { max-width: none; padding-inline: 0; }

/* --------------------------------------------------------------------------
   3. Type — marquee (≥48px, always), mono readouts, pills, buttons
   -------------------------------------------------------------------------- */
.marquee {
  font-family: var(--marquee-font);
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: .02em;
  line-height: .96;
  font-size: clamp(3rem, 7vw, 5.6rem);         /* never under 48px */
  color: var(--mq-face);
  text-shadow:
    .03em .03em 0 var(--mq-s1),
    .06em .06em 0 var(--mq-s2),
    .09em .09em 0 var(--mq-s3);
  overflow-wrap: anywhere;
  padding-right: .1em;                          /* room for the shadow stack */
}
.marquee--hero { font-size: clamp(3rem, 9.5vw, 8rem); }
.marquee--section { font-size: clamp(3rem, 5vw, 3.6rem); }
.marquee__line { display: block; }
.marquee__line:nth-child(2) { color: var(--text); }
.marquee__line:nth-child(3) { color: var(--phos); }

.mono {
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
  text-transform: uppercase;
  letter-spacing: .1em;
  font-size: .74rem;
  line-height: 1.5;
}
.mono--phos { color: var(--phos); }
.mono--muted { color: var(--muted); }
.mono--big { font-size: .9rem; }
.eyebrow { color: var(--phos); margin-bottom: 14px; }
.lead { font-size: 1.15rem; color: var(--muted); max-width: var(--measure); }
.summary { font-size: 1.12rem; max-width: var(--measure); }

.pill {
  display: inline-block;
  font-family: var(--mono);
  font-size: .64rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  line-height: 1;
  padding: .45em .6em .4em;
  border-radius: 3px;
  background: var(--pill-mute-bg);
  color: var(--pill-mute-fg);
  white-space: nowrap;
}
.pill--live, .pill--shipped, .pill--merged, .status-live .pill--status, .status-shipped .pill--status { background: var(--pill-ok-bg); color: var(--pill-ok-fg); }
.pill--beta, .pill--building, .pill--open, .pill--planned, .pill--proposed, .status-beta .pill--status, .status-building .pill--status { background: var(--pill-warn-bg); color: var(--pill-warn-fg); }
.pill--on-hold, .pill--closed, .status-on-hold .pill--status { background: var(--pill-hold-bg); color: var(--pill-hold-fg); }

/* The coin-door button: red, hard-edged, a slot on the left. */
.coin-btn {
  display: inline-flex;
  align-items: center;
  gap: .7em;
  font-family: var(--mono);
  font-weight: 700;
  font-size: .78rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--coin-fg);
  background: var(--coin);
  padding: .8em 1.1em .75em .9em;
  border: 2px solid var(--ink);
  border-radius: 4px;
  box-shadow: 3px 3px 0 var(--ink);
  cursor: pointer;
  transition: transform .08s, box-shadow .08s;
}
.coin-btn::before {
  content: "";
  width: 4px; height: 1.1em;
  background: var(--coin-fg);
  border-radius: 1px;
  opacity: .8;
}
.coin-btn:hover, .coin-btn:focus-visible { color: var(--coin-fg); transform: translate(1px, 1px); box-shadow: 2px 2px 0 var(--ink); }
.coin-btn:active { transform: translate(3px, 3px); box-shadow: 0 0 0 var(--ink); }
.coin-btn--ghost { background: var(--cab); color: var(--text); }
.coin-btn--ghost::before { background: var(--phos); }
.coin-btn--ghost:hover, .coin-btn--ghost:focus-visible { color: var(--text); }
.coin-btn--phos { background: var(--phos); color: var(--ink); }
.coin-btn--phos::before { background: var(--ink); }
.coin-btn--phos:hover, .coin-btn--phos:focus-visible { color: var(--ink); }

.actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin-top: 26px; }

/* NIMBUS INSIDE — the sticker. */
.sticker {
  display: inline-block;
  font-family: var(--mono);
  font-size: .56rem;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  line-height: 1;
  padding: .45em .6em .4em;
  color: var(--ink);
  background: var(--marquee);
  border: 1.5px solid var(--ink);
  border-radius: 999px;
  box-shadow: 1px 1px 0 var(--ink);
  white-space: nowrap;
  text-decoration: none;
}
.sticker::before { content: "◉ "; }
a.sticker:hover, a.sticker:focus-visible { color: var(--ink); background: var(--phos); }

/* --------------------------------------------------------------------------
   4. Header — the building's sign + the menu + the SERVICE door
   -------------------------------------------------------------------------- */
.arcade-head {
  position: relative;
  background: linear-gradient(180deg, var(--cab-2), var(--cab));
  border-bottom: 3px solid var(--cab-edge);
  box-shadow: 0 2px 0 var(--marquee-dim);
}
.arcade-head__row {
  display: flex;
  align-items: center;
  gap: 16px 22px;
  flex-wrap: wrap;
  padding-top: 12px;
  padding-bottom: 12px;
}
.sign {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text);
}
.sign__bulb {
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--marquee);
  box-shadow: 0 0 8px var(--marquee-glow);
  flex: none;
}
.sign__name {
  font-family: var(--mono);
  font-weight: 700;
  font-size: .82rem;
  letter-spacing: .2em;
  text-transform: uppercase;
}
.sign__mode { font-size: .6rem; color: var(--phos); letter-spacing: .16em; }
.sign:hover .sign__name, .sign:focus-visible .sign__name { color: var(--marquee); }

.arcade-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 14px;
  margin-inline-start: auto;
}
.arcade-nav a {
  display: inline-flex;
  align-items: center;
  gap: .45em;
  font-family: var(--mono);
  font-weight: 700;
  font-size: .72rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--text);
  padding: .5em .4em;
}
.arcade-nav a::before {
  content: "▶";
  font-size: .7em;
  color: transparent;
  width: 1em;
}
.arcade-nav a:hover, .arcade-nav a:focus-visible { color: var(--marquee); }
.arcade-nav a:hover::before, .arcade-nav a:focus-visible::before { color: var(--marquee); }
.arcade-nav a[aria-current="page"] { color: var(--phos); }
.arcade-nav a[aria-current="page"]::before { color: var(--phos); }

/* SERVICE — a <details> so it works with scripting off; `~` toggles it via JS. */
.service { position: relative; }
.service__btn {
  list-style: none;
  display: inline-flex;
  align-items: center;
  gap: .5em;
  font-family: var(--mono);
  font-weight: 700;
  font-size: .62rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--muted);
  padding: .55em .8em;
  border: 1px solid var(--line-strong);
  border-radius: 3px;
  cursor: pointer;
  user-select: none;
}
.service__btn::-webkit-details-marker { display: none; }
.service__btn::before { content: "~"; color: var(--phos); }
.service__btn:hover, .service[open] .service__btn { color: var(--phos); border-color: var(--phos-dim); }
.service__screen {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  z-index: 40;
  width: min(360px, calc(100vw - 32px));
  background: var(--screen-bg);
  color: var(--screen-phos);
  border: 4px solid var(--cab-edge);
  border-radius: 8px;
  padding: 16px 18px 14px;
  box-shadow: 0 0 0 2px var(--cab-side), 0 18px 40px -10px var(--shadow), inset 0 0 40px rgba(124, 255, 178, .08);
  font-family: var(--mono);
  font-size: .72rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  line-height: 1.7;
}
.service__screen::after {
  content: "";
  position: absolute; inset: 0;
  pointer-events: none;
  background: repeating-linear-gradient(0deg, rgba(0, 0, 0, .22) 0 1px, transparent 1px 3px);
  border-radius: 4px;
}
.service__screen h2 {
  font-size: .72rem;
  letter-spacing: .18em;
  color: var(--screen-amber);
  margin-bottom: 6px;
}
.service__screen dl { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 0 14px; margin: 0; }
.service__screen dt { color: var(--screen-text); opacity: .8; }
.service__screen dd { margin: 0; overflow-wrap: anywhere; }
.service__links { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 10px; position: relative; }
.service__links a { color: var(--screen-amber); text-decoration: none; }
.service__links a:hover, .service__links a:focus-visible { color: var(--screen-text); text-decoration: underline; }
.service__links a::before { content: "[ "; }
.service__links a::after { content: " ]"; }
.service__hint { display: block; margin-top: 8px; color: var(--screen-text); opacity: .6; font-size: .62rem; }

/* --------------------------------------------------------------------------
   5. Hero — the attract screen
   -------------------------------------------------------------------------- */
.attract {
  position: relative;
  min-height: calc(100vh - 70px);
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: minmax(0, 1fr) auto;
  overflow: hidden;
  isolation: isolate;
}
.attract__copy {
  position: relative;
  z-index: 3;
  min-width: 0;
  padding-top: clamp(32px, 7vh, 72px);
  padding-bottom: 24px;
  max-width: 980px;
}
.attract__thesis {
  margin-top: 22px;
  font-size: 1.12rem;
  max-width: var(--measure);
  color: var(--text);
}
.attract__instr {
  margin-top: 18px;
  font-size: .68rem;
  letter-spacing: .1em;
  color: var(--muted);
  max-width: var(--measure);
  text-transform: none;
}

/* The floor: a perspective grid, drawn as a plane and tilted away. */
.attract__floorband {
  position: relative;
  z-index: 1;
  height: clamp(220px, 38vh, 420px);
  overflow: hidden;
  perspective: 500px;
  perspective-origin: 50% 0;
  border-top: 1px solid var(--horizon);
  background: linear-gradient(180deg, var(--horizon), transparent 32%);
}
.attract__grid {
  position: absolute;
  left: -50%;
  top: 0;
  width: 200%;
  height: 200%;
  transform-origin: 50% 0;
  transform: rotateX(62deg);
  background-image:
    linear-gradient(90deg, var(--grid-line) 0 2px, transparent 2px),
    linear-gradient(0deg, var(--grid-line-2) 0 2px, transparent 2px);
  background-size: 80px 80px;
  background-position: 0 0;
}
.attract__fade {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, var(--room) 0%, transparent 35%, transparent 80%, var(--room) 100%);
  pointer-events: none;
}
.attract__canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 2;
  cursor: crosshair;
  touch-action: none;
  outline-offset: -4px;
}
.attract__hint {
  position: absolute;
  right: clamp(16px, 4vw, 40px);
  bottom: 12px;
  z-index: 3;
  font-size: .6rem;
  color: var(--muted);
  pointer-events: none;
}

/* Roster ticker: phosphor mono, scrolls on the floor; wraps under reduced motion. */
.ticker {
  margin-top: 26px;
  overflow: hidden;
  contain: inline-size;      /* the nowrap track must never widen the page */
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 8px 0;
  font-family: var(--mono);
  font-size: .74rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--phos);
  white-space: nowrap;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
}
.ticker__track { display: inline-flex; gap: 0; animation: arcade-ticker 48s linear infinite; }
.ticker__track:hover, .ticker:focus-within .ticker__track { animation-play-state: paused; }
.ticker__item { padding-inline: 1.2em; }
.ticker__item::after { content: "★"; color: var(--marquee); margin-left: 2.4em; }
.ticker__dup { display: inline-flex; }
@keyframes arcade-ticker { from { transform: translateX(0); } to { transform: translateX(-50%); } }

.insert-coin { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 22px; margin-top: 24px; }
.blink {
  font-family: var(--mono);
  font-weight: 700;
  font-size: .8rem;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--marquee);
  animation: arcade-blink 1.1s steps(2, jump-none) infinite;   /* ~1 Hz: far below any flash threshold */
}
@keyframes arcade-blink { from { opacity: 1; } to { opacity: .15; } }

/* SELECT MODE — the routing menu under the hero */
.select-mode { padding-top: 40px; padding-bottom: 12px; }
.select-mode__menu { list-style: none; padding: 0; margin: 10px 0 0; display: grid; gap: 4px; max-width: 720px; }
.mode {
  display: grid;
  grid-template-columns: 1.2em max-content minmax(0, 1fr);
  align-items: baseline;
  gap: 12px;
  text-decoration: none;
  color: var(--text);
  padding: 10px 12px;
  border-radius: 4px;
  font-family: var(--mono);
  text-transform: uppercase;
  letter-spacing: .1em;
}
.mode::before { content: "▶"; color: transparent; font-size: .8em; }
.mode__title { font-weight: 700; font-size: .9rem; }
.mode__meta { font-size: .66rem; color: var(--muted); text-transform: none; letter-spacing: .04em; }
.mode:hover, .mode:focus-visible { background: var(--cab); color: var(--phos); }
.mode:hover::before, .mode:focus-visible::before { color: var(--phos); }
.mode:hover .mode__meta, .mode:focus-visible .mode__meta { color: var(--text); }
.note-row { padding-top: 26px; padding-bottom: 46px; }
.note-row p { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; font-size: .95rem; color: var(--muted); }

/* --------------------------------------------------------------------------
   6. The floor — cabinets
   -------------------------------------------------------------------------- */
.floor-head { padding-top: 40px; padding-bottom: 8px; }
.floor-head__lead { margin-top: 14px; max-width: var(--measure); color: var(--muted); }
.gallery { display: flex; flex-direction: column; }
.floor {
  display: flex;
  gap: 40px;
  align-items: flex-end;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x proximity;
  scroll-padding-inline: clamp(16px, 4vw, 40px);
  padding: 30px clamp(16px, 4vw, 40px) 26px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background:
    var(--halftone) 0 0 / var(--halftone-size),
    repeating-linear-gradient(90deg, transparent 0 78px, var(--line) 78px 79px),
    linear-gradient(180deg, transparent, var(--room-2));
}
.floor__section { display: flex; flex-direction: column; gap: 12px; flex: none; scroll-snap-align: start; }
.floor-label {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--mono);
  font-weight: 700;
  font-size: .68rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--marquee);
}
.floor-label::before { content: ""; width: 26px; height: 2px; background: var(--marquee); }
.floor-label__n { color: var(--muted); font-weight: 600; }
.floor__row { display: flex; gap: 22px; align-items: flex-end; }

.cab {
  position: relative;
  width: 232px;
  flex: none;
  padding-right: 22px;     /* room for the side panel */
  padding-bottom: 8px;
}
.cab--master { width: 300px; }
.cab__link { display: block; text-decoration: none; color: inherit; }
.cab__body {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  gap: 6px;
  background:
    var(--halftone) 0 0 / var(--halftone-size),
    linear-gradient(180deg, var(--cab-2), var(--cab));
  border: 2px solid var(--cab-edge);
  border-radius: 8px 8px 3px 3px;
  padding: 8px 8px 6px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .08), 0 14px 26px -12px var(--shadow);
  transition: transform .15s;
}
.cab__marquee {
  display: block;
  background: linear-gradient(180deg, var(--mq-bg), var(--mq-bg));
  color: var(--mq-fg);
  font-family: var(--mono);
  font-weight: 700;
  font-size: .72rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  text-align: center;
  line-height: 1.25;
  padding: .7em .5em .6em;
  border-radius: 4px 4px 2px 2px;
  border: 2px solid var(--ink);
  box-shadow: 0 0 14px var(--marquee-glow), inset 0 -3px 0 rgba(0, 0, 0, .15);
  overflow-wrap: anywhere;
}
.cab--master .cab__marquee { font-size: .88rem; letter-spacing: .18em; box-shadow: 0 0 26px var(--marquee-glow), inset 0 -3px 0 rgba(0, 0, 0, .15); }
.cab__bezel {
  display: block;
  background: linear-gradient(180deg, #0F1224, #090B16);
  border: 2px solid var(--cab-edge);
  border-radius: 6px;
  padding: 9px 9px 12px;
}
.cab__panel {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 36px;
  padding: 0 12px;
  background: linear-gradient(180deg, var(--cab), var(--cab-edge));
  border-radius: 3px;
  border: 1px solid var(--cab-edge);
  transform: perspective(200px) rotateX(18deg);
  transform-origin: 50% 100%;
}
.cab__joy {
  position: relative;
  width: 12px; height: 12px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #FF7B85, var(--coin) 60%, var(--coin-dim));
  box-shadow: 0 0 0 2px var(--ink);
  margin-right: 8px;
}
.cab__joy::after {
  content: "";
  position: absolute;
  left: 50%; top: 100%;
  width: 3px; height: 8px;
  margin-left: -1.5px;
  background: #777C94;
}
.cab__btn {
  width: 11px; height: 11px;
  border-radius: 50%;
  border: 2px solid var(--ink);
  box-shadow: inset 0 -2px 0 rgba(0, 0, 0, .3);
}
.cab__btn--a { background: var(--coin); }
.cab__btn--b { background: var(--marquee); }
.cab__btn--c { background: var(--phos); }
.cab__coin {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  height: 30px;
  padding: 0 10px;
  background: linear-gradient(180deg, var(--cab), var(--cab-side));
  border: 1px solid var(--cab-edge);
  border-radius: 2px;
  font-family: var(--mono);
  font-size: .56rem;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--muted);
}
.cab__slot {
  width: 5px; height: 16px;
  background: var(--coin);
  border-radius: 1px;
  box-shadow: 0 0 8px var(--coin-glow), inset 0 0 0 1px var(--ink);
}
.cab__side {
  position: absolute;
  z-index: 1;
  top: 10px;
  right: 0;
  width: 22px;
  height: calc(100% - 10px);
  background: linear-gradient(180deg, var(--cab-side), var(--cab-edge));
  border-radius: 0 4px 4px 0;
  transform: skewY(-38deg);
  transform-origin: 0 0;
  overflow: visible;
}
.cab__side .sticker {
  position: absolute;
  left: 50%;
  top: 44%;
  transform: translate(-50%, -50%) rotate(-90deg);
  transform-origin: 50% 50%;
  font-size: .5rem;
  padding: .4em .5em .35em;
}
.cab__plate { padding: 10px 4px 0; display: grid; gap: 6px; }
.cab__tag { font-size: .84rem; line-height: 1.35; color: var(--muted); }
.cab__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.cab__score { color: var(--phos); }
.cab__link:hover .cab__body, .cab__link:focus-visible .cab__body { transform: translateY(-4px); }
.cab__link:hover .cab__marquee, .cab__link:focus-visible .cab__marquee { box-shadow: 0 0 26px var(--marquee-glow), inset 0 -3px 0 rgba(0, 0, 0, .15); }
.cab__link:focus-visible { outline: 3px solid var(--focus); outline-offset: 4px; border-radius: 8px; }
.cab.is-featured .cab__body { border-color: var(--marquee-dim); }
.cab__admin { margin-top: 8px; }

/* --------------------------------------------------------------------------
   7. Screens — a CSS mini of each app, keyed by bus (+ slug overrides)
   -------------------------------------------------------------------------- */
.screen {
  position: relative;
  display: block;
  aspect-ratio: 4 / 3;
  border-radius: 6px;
  overflow: hidden;
  background: radial-gradient(100% 80% at 50% 45%, var(--screen-bg-2), var(--screen-bg) 90%);
  box-shadow: inset 0 0 30px rgba(0, 0, 0, .7);
}
.screen::after {
  content: "";
  position: absolute; inset: 0;
  pointer-events: none;
  background:
    repeating-linear-gradient(0deg, rgba(0, 0, 0, .18) 0 1px, transparent 1px 3px),
    radial-gradient(120% 120% at 50% 50%, transparent 55%, rgba(0, 0, 0, .45));
}
.screen--big { border-radius: 10px; }
.screen i { position: absolute; display: block; }
.screen__label {
  position: absolute;
  left: 8px; bottom: 6px;
  z-index: 1;
  font-family: var(--mono);
  font-size: .5rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--screen-phos);
  opacity: .85;
}
.screen__label::after { content: "▮"; animation: arcade-blink 1s steps(2, jump-none) infinite; }

/* games → starfield + a ship */
.screen--games {
  background-image:
    radial-gradient(1.5px 1.5px at 12% 20%, #fff 50%, transparent 55%),
    radial-gradient(1px 1px at 30% 70%, #fff 50%, transparent 55%),
    radial-gradient(1.5px 1.5px at 48% 30%, var(--screen-blue) 50%, transparent 55%),
    radial-gradient(1px 1px at 66% 60%, #fff 50%, transparent 55%),
    radial-gradient(1.5px 1.5px at 82% 18%, #fff 50%, transparent 55%),
    radial-gradient(1px 1px at 90% 78%, var(--screen-amber) 50%, transparent 55%),
    radial-gradient(1px 1px at 22% 88%, #fff 50%, transparent 55%),
    radial-gradient(1px 1px at 58% 84%, #fff 50%, transparent 55%),
    radial-gradient(100% 80% at 50% 45%, var(--screen-bg-2), var(--screen-bg) 90%);
}
.screen--games i:nth-child(1) {   /* the ship */
  left: 50%; top: 58%;
  width: 0; height: 0;
  margin-left: -8px;
  border-left: 8px solid transparent;
  border-right: 8px solid transparent;
  border-bottom: 18px solid var(--screen-phos);
  filter: drop-shadow(0 0 4px var(--screen-phos));
}
.screen--games i:nth-child(2) {   /* the shot */
  left: 50%; top: 30%;
  width: 2px; height: 10px;
  margin-left: -1px;
  background: var(--screen-amber);
}
.screen--games i:nth-child(3), .screen--games i:nth-child(4), .screen--games i:nth-child(5) {  /* invaders */
  top: 16%; width: 12px; height: 8px;
  background: var(--screen-red);
  box-shadow: -3px 4px 0 -1px var(--screen-red), 3px 4px 0 -1px var(--screen-red);
}
.screen--games i:nth-child(3) { left: 24%; }
.screen--games i:nth-child(4) { left: 46%; }
.screen--games i:nth-child(5) { left: 68%; }
.screen--games i:nth-child(6) { left: 6%; bottom: 8%; height: 2px; width: 88%; background: var(--screen-phos); opacity: .5; }
.screen--games i:nth-child(7), .screen--games i:nth-child(8) { display: none; }

/* travel → a map with pins */
.screen--travel {
  background-image:
    radial-gradient(26% 40% at 32% 40%, #1F6F4A 60%, transparent 62%),
    radial-gradient(22% 30% at 68% 62%, #1F6F4A 60%, transparent 62%),
    radial-gradient(12% 18% at 74% 26%, #1F6F4A 60%, transparent 62%),
    linear-gradient(90deg, rgba(255, 255, 255, .06) 0 1px, transparent 1px),
    linear-gradient(0deg, rgba(255, 255, 255, .06) 0 1px, transparent 1px),
    radial-gradient(100% 80% at 50% 45%, #11365A, #071A2E 90%);
  background-size: auto, auto, auto, 20px 20px, 20px 20px, auto;
}
.screen--travel i:nth-child(-n+4) {   /* pins */
  width: 8px; height: 8px;
  border-radius: 50% 50% 50% 0;
  background: var(--screen-red);
  transform: rotate(-45deg);
  box-shadow: 0 0 6px var(--screen-red);
}
.screen--travel i:nth-child(1) { left: 28%; top: 34%; }
.screen--travel i:nth-child(2) { left: 40%; top: 46%; }
.screen--travel i:nth-child(3) { left: 66%; top: 58%; }
.screen--travel i:nth-child(4) { left: 74%; top: 24%; background: var(--screen-amber); box-shadow: 0 0 6px var(--screen-amber); }
.screen--travel i:nth-child(5) {   /* the route */
  left: 30%; top: 40%;
  width: 46%; height: 20%;
  border-top: 1.5px dashed var(--screen-phos);
  border-radius: 50% 50% 0 0 / 100% 100% 0 0;
  opacity: .8;
}
.screen--travel i:nth-child(n+6) { display: none; }

/* listening → waveform bars */
.screen--listening i {
  bottom: 22%;
  width: 7%;
  background: linear-gradient(180deg, var(--screen-amber), var(--screen-phos));
  border-radius: 2px 2px 0 0;
  box-shadow: 0 0 6px var(--screen-phos);
}
.screen--listening i:nth-child(1) { left: 12%; height: 24%; }
.screen--listening i:nth-child(2) { left: 22%; height: 46%; }
.screen--listening i:nth-child(3) { left: 32%; height: 34%; }
.screen--listening i:nth-child(4) { left: 42%; height: 58%; }
.screen--listening i:nth-child(5) { left: 52%; height: 40%; }
.screen--listening i:nth-child(6) { left: 62%; height: 52%; }
.screen--listening i:nth-child(7) { left: 72%; height: 28%; }
.screen--listening i:nth-child(8) { left: 82%; height: 44%; }

/* collecting → a stamp (perforated) — or a coin for numistoria */
.screen--collecting i:nth-child(1) {   /* the stamp: perforated by a dotted edge */
  left: 30%; top: 16%;
  width: 40%; height: 56%;
  background: #F4EFE0;
  border: 3px dotted var(--screen-bg);
  outline: 2px solid #F4EFE0;
  box-shadow: 0 6px 14px rgba(0, 0, 0, .5);
  transform: rotate(-6deg);
}
.screen--collecting i:nth-child(2) {   /* the vignette */
  left: 37%; top: 25%;
  width: 26%; height: 36%;
  background: linear-gradient(160deg, #C9433A, #6E1F1A);
  transform: rotate(-6deg);
}
.screen--collecting i:nth-child(3) {   /* the crosshair (the grader) */
  left: 48%; top: 40%;
  width: 4%; height: 8%;
  border: 1px solid var(--screen-phos);
  border-radius: 50%;
  box-shadow: 0 0 0 4px transparent, 0 -14px 0 -3px var(--screen-phos), 0 14px 0 -3px var(--screen-phos);
}
.screen--collecting i:nth-child(n+4) { display: none; }
.screen--numistoria i:nth-child(1) {   /* the coin */
  left: 30%; top: 18%;
  width: 40%; height: 54%;
  border-radius: 50%;
  border: 3px solid transparent;
  outline: 0;
  background: radial-gradient(circle at 35% 30%, #F1D48A, #B98A2E 55%, #7A5A18);
  box-shadow: 0 6px 14px rgba(0, 0, 0, .55), inset 0 0 0 3px rgba(0, 0, 0, .25);
  transform: none;
}
.screen--numistoria i:nth-child(2) {   /* the bust */
  left: 44%; top: 30%;
  width: 12%; height: 30%;
  border-radius: 50% 50% 40% 40%;
  background: #8A6420;
  transform: none;
}
.screen--numistoria i:nth-child(3) { display: none; }

/* finance → a rising chart */
.screen--finance {
  background-image:
    linear-gradient(90deg, rgba(255, 255, 255, .06) 0 1px, transparent 1px),
    linear-gradient(0deg, rgba(255, 255, 255, .06) 0 1px, transparent 1px),
    radial-gradient(100% 80% at 50% 45%, var(--screen-bg-2), var(--screen-bg) 90%);
  background-size: 16px 16px, 16px 16px, auto;
}
.screen--finance i:nth-child(-n+6) {
  bottom: 14%;
  width: 9%;
  background: var(--screen-phos);
  box-shadow: 0 0 6px var(--screen-phos);
}
.screen--finance i:nth-child(1) { left: 10%; height: 18%; }
.screen--finance i:nth-child(2) { left: 24%; height: 26%; }
.screen--finance i:nth-child(3) { left: 38%; height: 22%; background: var(--screen-red); box-shadow: 0 0 6px var(--screen-red); }
.screen--finance i:nth-child(4) { left: 52%; height: 38%; }
.screen--finance i:nth-child(5) { left: 66%; height: 50%; }
.screen--finance i:nth-child(6) { left: 80%; height: 64%; }
.screen--finance i:nth-child(7) {   /* the trend line */
  left: 12%; bottom: 30%;
  width: 74%; height: 2px;
  background: var(--screen-amber);
  transform: rotate(-24deg);
  transform-origin: 0 100%;
}
.screen--finance i:nth-child(8) { display: none; }

/* tooling → a folding box (isometric cube) */
.screen--tooling i:nth-child(1) {   /* top face */
  left: 50%; top: 22%;
  width: 26%; height: 26%;
  margin-left: -13%;
  background: var(--screen-phos);
  transform: rotate(45deg) skew(-16deg, -16deg) scaleY(.7);
}
.screen--tooling i:nth-child(2) {   /* left face */
  left: 33%; top: 40%;
  width: 17%; height: 30%;
  background: #2E9A6B;
  transform: skewY(26deg);
}
.screen--tooling i:nth-child(3) {   /* right face */
  left: 50%; top: 40%;
  width: 17%; height: 30%;
  background: #1F6F4A;
  transform: skewY(-26deg);
}
.screen--tooling i:nth-child(4) {   /* the flap */
  left: 50%; top: 10%;
  width: 26%; height: 8%;
  margin-left: -13%;
  border: 1.5px dashed var(--screen-amber);
  border-bottom: 0;
}
.screen--tooling i:nth-child(n+5) { display: none; }

/* master → a cloud (Nimbus) */
.screen--master i:nth-child(1) {
  left: 24%; top: 44%;
  width: 52%; height: 24%;
  border-radius: 999px;
  background: #EAF4FF;
  box-shadow: 0 0 18px rgba(93, 169, 255, .5);
}
.screen--master i:nth-child(2) { left: 34%; top: 28%; width: 22%; height: 30%; border-radius: 50%; background: #EAF4FF; }
.screen--master i:nth-child(3) { left: 50%; top: 22%; width: 26%; height: 36%; border-radius: 50%; background: #EAF4FF; }
.screen--master i:nth-child(4) {   /* the rain: three phosphor ticks */
  left: 38%; top: 74%;
  width: 3px; height: 10%;
  background: var(--screen-phos);
  box-shadow: 14px 5px 0 var(--screen-phos), 28px 0 0 var(--screen-phos), 42px 5px 0 var(--screen-phos);
  transform: skewX(-20deg);
}
.screen--master i:nth-child(n+5) { display: none; }

/* foundation → a circuit board */
.screen--foundation {
  background-image:
    linear-gradient(90deg, rgba(124, 255, 178, .18) 0 1px, transparent 1px),
    linear-gradient(0deg, rgba(124, 255, 178, .18) 0 1px, transparent 1px),
    radial-gradient(100% 80% at 50% 45%, #0E2A1F, #06120D 90%);
  background-size: 14px 14px, 14px 14px, auto;
}
.screen--foundation i:nth-child(1) {   /* the chip */
  left: 36%; top: 32%;
  width: 28%; height: 36%;
  background: #121722;
  border: 2px solid var(--screen-phos);
  border-radius: 3px;
}
.screen--foundation i:nth-child(2), .screen--foundation i:nth-child(3) {   /* legs */
  top: 40%;
  width: 8%; height: 2px;
  background: var(--screen-amber);
  box-shadow: 0 7px 0 var(--screen-amber), 0 14px 0 var(--screen-amber);
}
.screen--foundation i:nth-child(2) { left: 26%; }
.screen--foundation i:nth-child(3) { left: 66%; }
.screen--foundation i:nth-child(n+4) { display: none; }

/* aux / unknown → PLAY */
.screen--aux i:nth-child(1) {
  left: 30%; top: 36%;
  width: 40%; height: 28%;
  border: 2px solid var(--screen-phos);
  border-radius: 4px;
}
.screen--aux i:nth-child(2) {
  left: 44%; top: 43%;
  width: 0; height: 0;
  border-top: 7px solid transparent;
  border-bottom: 7px solid transparent;
  border-left: 12px solid var(--screen-phos);
}
.screen--aux i:nth-child(n+3) { display: none; }

/* --------------------------------------------------------------------------
   8. HIGH SCORES — the roster as data
   -------------------------------------------------------------------------- */
.scores { padding-top: 36px; padding-bottom: 40px; }
.scores__head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 10px 22px; margin-bottom: 16px; }
.scores__scroll { overflow-x: auto; }
.score-table {
  width: 100%;
  border-collapse: collapse;
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
  text-transform: uppercase;
  letter-spacing: .08em;
  font-size: .78rem;
  background: var(--screen-bg);
  color: var(--screen-text);
  border: 4px solid var(--cab-edge);
  border-radius: 8px;
  box-shadow: 0 0 0 2px var(--cab-side), inset 0 0 60px rgba(124, 255, 178, .06);
}
.score-table caption {
  caption-side: top;
  text-align: left;
  padding: 0 0 8px;
  color: var(--muted);
  font-size: .66rem;
  letter-spacing: .14em;
}
.score-table th, .score-table td { padding: 10px 12px; text-align: left; vertical-align: top; border-bottom: 1px solid rgba(124, 255, 178, .14); }
.score-table th { color: var(--screen-amber); font-weight: 700; font-size: .66rem; letter-spacing: .16em; }
.score-table tbody tr:last-child td { border-bottom: 0; }
.score-table tbody tr:hover td { background: rgba(124, 255, 178, .06); }
.score-table .num { text-align: right; white-space: nowrap; }
.score-table .rank { color: var(--screen-amber); white-space: nowrap; }
.score-table .rank--1 { color: var(--screen-red); }
.score-table .rank--2 { color: var(--screen-amber); }
.score-table .rank--3 { color: var(--screen-phos); }
.score-table .score { color: var(--screen-phos); text-shadow: 0 0 6px var(--phos-glow); }
.score-table .proj a { color: var(--screen-text); text-decoration: none; font-weight: 700; }
.score-table .proj a:hover, .score-table .proj a:focus-visible { color: var(--screen-phos); text-decoration: underline; }
.score-table .proj small { display: block; margin-top: 3px; font-size: .64rem; color: var(--muted); text-transform: none; letter-spacing: .02em; font-weight: 400; }
.score-table .bus { color: var(--muted); white-space: nowrap; }
.score-table .ext a { color: var(--screen-amber); text-decoration: none; font-size: 1.05em; }
.score-table .ext a:hover, .score-table .ext a:focus-visible { color: var(--screen-text); }

/* --------------------------------------------------------------------------
   9. Project page — the cabinet zoomed in
   -------------------------------------------------------------------------- */
.zoom { padding-top: 34px; padding-bottom: 50px; }
.zoom__head { display: grid; gap: 14px; margin-bottom: 26px; }
.zoom__grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: 34px; align-items: start; }
.zoom__cab {
  position: sticky;
  top: 20px;
  background:
    var(--halftone) 0 0 / var(--halftone-size),
    linear-gradient(180deg, var(--cab-2), var(--cab));
  border: 2px solid var(--cab-edge);
  border-radius: 10px;
  padding: 12px;
  box-shadow: 0 20px 40px -18px var(--shadow);
}
.zoom__bezel { background: linear-gradient(180deg, #0F1224, #090B16); border: 2px solid var(--cab-edge); border-radius: 8px; padding: 12px; }
.zoom__cab .cab__panel { margin-top: 8px; }
.spec { margin-top: 12px; }
.spec__list { display: grid; gap: 2px; margin: 0; }
.spec__list > div {
  display: grid;
  grid-template-columns: 7.5em minmax(0, 1fr);
  gap: 10px;
  padding: 8px 10px;
  background: rgba(0, 0, 0, .18);
  border-radius: 3px;
  font-family: var(--mono);
  font-size: .72rem;
  letter-spacing: .08em;
}
.spec__list dt { color: var(--marquee); text-transform: uppercase; font-weight: 700; }
.spec__list dd { margin: 0; color: var(--text); overflow-wrap: anywhere; }
.spec__list dd .score { color: var(--phos); }
.coin-door { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; padding-top: 14px; border-top: 1px dashed var(--line-strong); }
.zoom__body { display: grid; gap: 28px; }
.zoom__section h2 { margin-bottom: 12px; }
.prose { color: var(--text); }
.prose h2, .prose h3 { font-family: var(--mono); text-transform: uppercase; letter-spacing: .1em; color: var(--marquee); font-weight: 700; }
.prose h2 { font-size: 1rem; }
.prose h3 { font-size: .86rem; }
.prose a { color: var(--link); }
.prose a:hover { color: var(--link-hover); }
.prose blockquote { border-left-color: var(--phos); }
.diagram {
  background: var(--screen-bg);
  border: 4px solid var(--cab-edge);
  border-radius: 8px;
  padding: 16px;
  box-shadow: 0 0 0 2px var(--cab-side);
}
.diagram figcaption { color: var(--screen-amber); margin-bottom: 10px; }
.diagram__svg svg { width: 100%; height: auto; color: var(--screen-text); }
.backline { padding-top: 24px; }
.backline a {
  font-family: var(--mono);
  font-weight: 700;
  font-size: .74rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--phos);
}
.backline a:hover, .backline a:focus-visible { color: var(--marquee); text-decoration: underline; }

/* --------------------------------------------------------------------------
   10. Leaderboard (generic collection: OSS / notes / pages)
   -------------------------------------------------------------------------- */
.board { padding-top: 36px; padding-bottom: 50px; }
.board__head { margin-bottom: 20px; }
.board__lead { margin-top: 12px; max-width: var(--measure); color: var(--muted); }
.board-list {
  list-style: none;
  padding: 14px 6px;
  margin: 0;
  display: grid;
  gap: 2px;
  background: var(--screen-bg);
  color: var(--screen-text);
  border: 4px solid var(--cab-edge);
  border-radius: 8px;
  box-shadow: 0 0 0 2px var(--cab-side), inset 0 0 60px rgba(124, 255, 178, .06);
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
}
.board-list__cols {
  display: grid;
  grid-template-columns: 3.2em 9em minmax(0, 1fr) auto 2em;
  gap: 12px;
  padding: 4px 12px 10px;
  color: var(--screen-amber);
  font-size: .64rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  font-weight: 700;
  border-bottom: 1px solid rgba(124, 255, 178, .18);
}
.score-row {
  display: grid;
  grid-template-columns: 3.2em 9em minmax(0, 1fr) auto 2em;
  gap: 12px;
  align-items: start;
  padding: 10px 12px;
  border-radius: 3px;
  font-size: .78rem;
  letter-spacing: .06em;
}
.score-row:hover { background: rgba(124, 255, 178, .06); }
.score-row__rank { color: var(--screen-amber); text-transform: uppercase; }
.score-row:nth-child(2) .score-row__rank { color: var(--screen-red); }
.score-row__up { color: var(--screen-phos); text-transform: uppercase; overflow-wrap: anywhere; }
.score-row__title { color: var(--screen-text); text-decoration: none; font-weight: 700; text-transform: uppercase; }
.score-row__title:hover, .score-row__title:focus-visible { color: var(--screen-phos); text-decoration: underline; }
.score-row__blurb { display: block; margin-top: 4px; font-size: .7rem; color: var(--muted); text-transform: none; letter-spacing: .02em; font-family: var(--body); }
.score-row__meta { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; justify-content: flex-end; font-size: .64rem; text-transform: uppercase; color: var(--muted); }
.score-row__ext { color: var(--screen-amber); text-decoration: none; text-align: right; font-size: 1.05em; }
.score-row__ext:hover, .score-row__ext:focus-visible { color: var(--screen-text); }
.pager { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; margin-top: 22px; }
.empty { color: var(--muted); }

/* --------------------------------------------------------------------------
   11. Page readout (generic entry) — an on-screen readout
   -------------------------------------------------------------------------- */
.readout { padding-top: 34px; padding-bottom: 50px; }
.readout__head { display: grid; gap: 12px; margin-bottom: 24px; }
.readout__grid { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 30px; align-items: start; }
.readout__screen {
  position: relative;
  background: var(--screen-bg);
  color: var(--screen-text);
  border: 4px solid var(--cab-edge);
  border-radius: 10px;
  padding: clamp(18px, 3vw, 30px);
  box-shadow: 0 0 0 2px var(--cab-side), inset 0 0 80px rgba(124, 255, 178, .06);
}
.readout__screen::after {
  content: "";
  position: absolute; inset: 0;
  pointer-events: none;
  border-radius: 6px;
  background: repeating-linear-gradient(0deg, rgba(0, 0, 0, .12) 0 1px, transparent 1px 4px);
}
.readout__screen .prose { color: var(--screen-text); position: relative; z-index: 1; }
.readout__screen .prose h2, .readout__screen .prose h3 { color: var(--screen-amber); }
.readout__screen .prose a { color: var(--screen-phos); }
.readout__screen .prose a:hover { color: var(--screen-amber); }
.readout__screen .prose code { background: rgba(124, 255, 178, .12); color: var(--screen-phos); }
.readout__screen .empty { color: var(--screen-phos); position: relative; z-index: 1; }
.readout__cursor::after { content: "▮"; color: var(--screen-phos); animation: arcade-blink 1s steps(2, jump-none) infinite; margin-left: .2em; }
.readout__spec { position: sticky; top: 20px; background: var(--cab); border: 2px solid var(--cab-edge); border-radius: 8px; padding: 14px; }

/* --------------------------------------------------------------------------
   12. 404 — GAME OVER
   -------------------------------------------------------------------------- */
.gameover { padding-top: 60px; padding-bottom: 70px; text-align: center; display: grid; justify-items: center; gap: 18px; }
.gameover .marquee { color: var(--coin); }
.gameover__continue { display: grid; justify-items: center; gap: 6px; }
.gameover__count {
  font-family: var(--marquee-font);
  font-size: clamp(3rem, 10vw, 6rem);
  line-height: 1;
  color: var(--marquee);
  text-shadow: .04em .04em 0 var(--coin), .08em .08em 0 var(--ink);
  min-width: 1.2em;
  display: grid;
  height: 1em;
  overflow: hidden;
}
.gameover__count span { display: block; height: 1em; }
.gameover__count .digits { animation: arcade-count 10s steps(10, jump-none) infinite; }
@keyframes arcade-count { from { transform: translateY(0); } to { transform: translateY(-9em); } }
.gameover__copy { max-width: 48ch; color: var(--muted); }

/* --------------------------------------------------------------------------
   13. Footer
   -------------------------------------------------------------------------- */
.arcade-foot {
  margin-top: 30px;
  background: linear-gradient(180deg, var(--cab), var(--room));
  border-top: 3px solid var(--cab-edge);
  box-shadow: inset 0 3px 0 var(--marquee-dim);
}
.arcade-foot__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) minmax(0, 1fr);
  gap: 28px;
  padding-top: 32px;
  padding-bottom: 24px;
}
.arcade-foot__brand { display: grid; gap: 12px; justify-items: start; }
.arcade-foot__route { font-size: .92rem; color: var(--muted); max-width: 40ch; }
.arcade-foot__route a { color: var(--phos); }
.foot-nav { display: grid; gap: 6px; align-content: start; }
.foot-nav a, .skin-switch a {
  font-family: var(--mono);
  font-weight: 700;
  font-size: .7rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--text);
}
.foot-nav a:hover, .foot-nav a:focus-visible, .skin-switch a:hover, .skin-switch a:focus-visible { color: var(--marquee); }
.skin-switch ul { list-style: none; padding: 0; margin: 8px 0 0; display: grid; gap: 6px; }
.skin-switch a { display: inline-flex; align-items: center; gap: .6em; }
.skin-switch a::before { content: "○"; color: var(--muted); }
.skin-switch a[aria-current="true"] { color: var(--phos); }
.skin-switch a[aria-current="true"]::before { content: "●"; color: var(--phos); }
.foot-legal { padding-top: 4px; padding-bottom: 26px; }

/* --------------------------------------------------------------------------
   14. Responsive
   -------------------------------------------------------------------------- */
@media (max-width: 900px) {
  .zoom__grid { grid-template-columns: minmax(0, 1fr); }
  .zoom__cab { position: static; }
  .readout__grid { grid-template-columns: minmax(0, 1fr); }
  .readout__spec { position: static; }
  .arcade-foot__grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
}

/* Cocktail-table: cabinets stack vertically; HIGH SCORES becomes the nav. */
@media (max-width: 640px) {
  .arcade-head__row { gap: 10px 14px; }
  .arcade-nav { margin-inline-start: 0; width: 100%; gap: 2px 8px; }
  .arcade-nav a { font-size: .66rem; padding: .45em .3em; }
  .service { margin-inline-start: auto; }

  .attract { min-height: 0; }
  .attract__floorband { height: 200px; }
  .marquee--hero { font-size: clamp(3rem, 12.5vw, 4rem); }

  .gallery .scores { order: -1; padding-top: 10px; padding-bottom: 26px; }
  .score-table { font-size: .72rem; }
  .score-table th, .score-table td { padding: 8px 8px; }
  .score-table .bus, .score-table .proj small { display: none; }

  .floor { flex-direction: column; align-items: stretch; gap: 30px; overflow: visible; scroll-snap-type: none; }
  .floor__section { align-items: stretch; }
  .floor__row { flex-direction: column; align-items: stretch; gap: 14px; }
  .cab, .cab--master { width: 100%; padding-right: 0; }
  .cab__side { display: none; }
  /* the cabinet lies flat: marquee across the top, screen left, the control
     cluster (stick + buttons) beside it, the coin door along the bottom */
  .cab__body {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 76px;
    grid-template-areas:
      "marquee marquee"
      "bezel   panel"
      "coin    coin";
    column-gap: 10px;
    align-items: stretch;
  }
  .cab__marquee { grid-area: marquee; }
  .cab__bezel { grid-area: bezel; }
  .cab__panel {
    grid-area: panel;
    flex-direction: column;
    justify-content: center;
    gap: 14px;
    height: auto;
    padding: 12px 0;
    transform: none;
  }
  .cab__joy { margin: 0 0 8px; }
  .cab__coin { grid-area: coin; }
  .cab__plate { padding: 8px 2px 0; }
  .mode { grid-template-columns: 1.2em minmax(0, 1fr); }
  .mode__meta { grid-column: 2; }
  .cab__tag { font-size: .8rem; }
  .cab--master .cab__marquee { font-size: .8rem; }

  .board-list__cols { display: none; }
  .score-row { grid-template-columns: 2.6em minmax(0, 1fr) 2em; grid-template-areas: "rank up ext" "rank title ext" "rank meta ext"; }
  .score-row__rank { grid-area: rank; }
  .score-row__up { grid-area: up; }
  .score-row__title { grid-area: title; }
  .score-row__meta { grid-area: meta; justify-content: flex-start; }
  .score-row__ext { grid-area: ext; }

  .spec__list > div { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .arcade-foot__grid { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 400px) {
  .wrap { padding-inline: 14px; }
  .actions, .insert-coin { width: 100%; }
  .actions .coin-btn, .insert-coin .coin-btn { width: 100%; justify-content: center; }
  .cab__body { grid-template-columns: 112px minmax(0, 1fr); }
  .service__screen { right: auto; left: 0; }
}

/* --------------------------------------------------------------------------
   14b. Widgets on the floor — a widget IS a cabinet: halftone cab body with
   a hard ink edge, an Impact marquee with the shadow stack, the bezel from
   the zoom view, the tilted control panel, scanlines over the command well.
   Structure lives in base.css.
   -------------------------------------------------------------------------- */
.skin-arcade .widget {
  background:
    var(--halftone) 0 0 / var(--halftone-size),
    linear-gradient(180deg, var(--cab-2), var(--cab));
  border-width: 2px;
  border-radius: 8px 8px 3px 3px;
}
.skin-arcade .rx__cab { border-width: 2px; }
.skin-arcade .rx__marquee {
  font-family: var(--marquee-font);
  font-weight: 400;
  font-size: 1.7rem;
  letter-spacing: .04em;
  line-height: 1;
  padding: .35em .5em .3em;
  border: 2px solid var(--ink);
  text-shadow: .03em .03em 0 var(--mq-s1), .06em .06em 0 var(--mq-s2);
}
.skin-arcade .rx__bezel { background: linear-gradient(180deg, #0F1224, #090B16); border: 2px solid var(--cab-edge); }
.skin-arcade .rx__panel {
  background: linear-gradient(180deg, var(--cab), var(--cab-edge));
  transform: perspective(200px) rotateX(18deg);
  transform-origin: 50% 100%;
}
.skin-arcade .rx__joy { box-shadow: 0 0 0 2px var(--ink); }
.skin-arcade .rx__btn { border-color: var(--ink); }
.skin-arcade .rx__coin { color: var(--screen-amber); }
.skin-arcade .pk__cmd {
  border: 2px solid var(--cab-edge);
  background-image: repeating-linear-gradient(0deg, rgba(0, 0, 0, .18) 0 1px, transparent 1px 3px);
  text-shadow: 0 0 6px var(--phos-glow);
}
.skin-arcade .pk__input, .skin-arcade .pk__select { border-color: var(--line-strong); }
.skin-arcade .pk__label { color: var(--marquee); }
.skin-arcade .pk__status { color: var(--phos); }

/* --------------------------------------------------------------------------
   15. Reduced motion — the arcade is fully readable with zero motion
   -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  .ticker { white-space: normal; -webkit-mask-image: none; mask-image: none; }
  .ticker__track { animation: none; display: block; }
  .ticker__dup { display: none; }
  .ticker__item { display: inline-block; padding: .2em 1em .2em 0; }
  .blink, .screen__label::after, .readout__cursor::after, .gameover__count .digits { animation: none; }
  .attract__canvas { cursor: default; }
  .cab__body, .coin-btn { transition: none; }
}

/* --------------------------------------------------------------------------
   Top scores — the home stat strip (_stats.php / base.css .stats) as the
   attract screen's high-score table: one lit screen in a cabinet bezel, cells
   ruled by phosphor hairlines, figures in glowing phosphor, captions in the
   table-header amber. The screen stays dark glass in both palettes.
   -------------------------------------------------------------------------- */
.attract__scores { margin-top: 26px; }
.attract__scores-h { margin-bottom: 10px; }
.attract__scores .stats {
  gap: 1px;                                      /* the hairline grid shows through */
  background: rgba(124, 255, 178, .14);
  border: 4px solid var(--cab-edge);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 0 0 2px var(--cab-side), inset 0 0 60px rgba(124, 255, 178, .06);
}
.attract__scores .stat {
  gap: 8px;
  padding: 16px 14px 14px;
  background: var(--screen-bg);
  background-image: linear-gradient(180deg, var(--screen-bg-2), var(--screen-bg) 70%);
}
.attract__scores .stat__num {
  font-family: var(--mono);
  font-weight: 700;
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  letter-spacing: .02em;
  text-transform: uppercase;
  color: var(--screen-phos);
  text-shadow: 0 0 6px var(--phos-glow), 0 0 18px rgba(124, 255, 178, .25);
}
.attract__scores .stat__label {
  font-family: var(--mono);
  font-weight: 700;
  font-size: .64rem;
  line-height: 1.5;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--screen-amber);
}
