/* =============================================================
   The Lobby — Amsterdam Zuid · refined design system
   One cohesive dark-glass language: a living diorama hero, a crisp
   departures board, glance cards, a story strip, and a status ticker.
   ============================================================= */
:root {
  /* brand */
  --ns-yellow: #ffc917;
  --ns-blue: #1d4ed8;
  /* product categories */
  --ic: #2156d6;
  --spr: #1ea05a;
  --icd: #c0492f;
  --sng: #2f86c4;
  /* surfaces & ink */
  --bg: #070a11;
  --bg-2: #0b1018;
  --glass: rgba(20, 27, 40, 0.72);
  --glass-2: rgba(28, 37, 54, 0.66);
  --ink: #eef2f8;
  --muted: #93a0b4;
  --faint: #5d6b80;
  --line: rgba(255, 255, 255, 0.08);
  --line-2: rgba(255, 255, 255, 0.14);
  /* signal */
  --led: #ffd23f;
  --ok: #41c98a;
  --warn: #ffb020;
  --bad: #ff6a6a;
  /* shape */
  --r: 14px;
  --r-sm: 9px;
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.5);
  --ring: 0 0 0 1px var(--line);
  --ui: "Sora", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --mono: "SF Mono", ui-monospace, "Roboto Mono", Menlo, Consolas, monospace;
  --comic: "Comic Neue", "Comic Sans MS", system-ui, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  height: 100%;
  background:
    radial-gradient(120% 80% at 80% -10%, #16213b 0%, transparent 55%),
    radial-gradient(100% 70% at 0% 110%, #131a2c 0%, transparent 55%),
    var(--bg);
  color: var(--ink);
  font-family: var(--ui);
  font-feature-settings: "tnum" 1;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}
body { display: flex; flex-direction: column; height: 100vh; overflow: hidden; }

/* full-bleed: the diorama fills the whole screen; every panel floats over it and
   the departures rail is the only chrome below (board removed, v1.51) */
.app {
  position: relative;
  flex: 1;
  min-height: 0;
  padding: 0;
}

/* ---------- stage ---------- */
.stage-wrap { position: relative; height: 100%; min-width: 0; }

/* the nameplate floats as a slim top overlay (branding + LIVE + breath line) */
.nameplate {
  position: absolute; top: 0; left: 0; right: 0; z-index: 5;
  display: flex; align-items: center; gap: 11px;
  padding: 9px 18px 14px;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(8, 11, 20, 0.6), transparent);
}
.nameplate .np-live { pointer-events: auto; }
.np-name { font-size: 22px; font-weight: 700; letter-spacing: 0.2px; }
.np-sub { font-size: 12px; font-weight: 500; color: var(--muted); letter-spacing: 0.4px; }
/* the "breath line" — a slow, fading editorial quip in the open header space
   (golden-hour wind-down energy; rises gently in, sinks out, like an exhale) */
.np-breath {
  flex: 1 1 auto; min-width: 0; align-self: center; text-align: center;
  padding: 0 28px; font-size: 14px; font-weight: 500; font-style: italic;
  letter-spacing: 0.2px; color: rgba(245, 222, 170, 0.92);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  opacity: 0; transform: translateY(3px);
  transition: opacity 2.5s ease-in-out, transform 2.5s ease-in-out;
  text-shadow: 0 0 18px rgba(245, 200, 120, 0.12);
}
.np-breath.show { opacity: 0.92; transform: translateY(0); }
@media (max-width: 980px) { .np-breath { display: none; } }
.np-live {
  margin-left: auto; align-self: center;
  display: inline-flex; align-items: center; gap: 6px;
  color: var(--ok); font-size: 10.5px; font-weight: 700; letter-spacing: 1.5px;
}
/* the live-data heartbeat: a steady dot with a radar ping (also used in the board foot) */
.live-dot {
  display: inline-block; vertical-align: middle; width: 7px; height: 7px;
  border-radius: 50%; flex: 0 0 auto;
  background: var(--ok); box-shadow: 0 0 0 0 rgba(65, 201, 138, 0.5);
  animation: livepulse 2.4s ease-out infinite;
}
@keyframes livepulse {
  0% { box-shadow: 0 0 0 0 rgba(65, 201, 138, 0.5); }
  70% { box-shadow: 0 0 0 7px rgba(65, 201, 138, 0); }
  100% { box-shadow: 0 0 0 0 rgba(65, 201, 138, 0); }
}
.np-live::first-letter { color: var(--ok); }

.stage {
  position: absolute; inset: 0;
  overflow: hidden;
  background: #0a0f24;
  box-shadow: inset 0 0 90px rgba(0, 0, 0, 0.5);
}
#scene { display: block; width: 100%; height: 100%; }

/* ---------- controls (float along the bottom of the stage, above the rail) ---------- */
.controls {
  position: absolute; left: 14px; right: 14px; bottom: 10px; z-index: 5;
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
}
.ctrl {
  background: var(--glass-2);
  color: var(--ink);
  border: 1px solid var(--line-2);
  border-radius: 999px;
  padding: 7px 14px;
  font: 600 13px var(--ui);
  cursor: pointer;
  backdrop-filter: blur(8px);
  transition: transform 0.14s ease, border-color 0.14s ease, background 0.14s ease;
}
.ctrl:hover { border-color: #44557a; transform: translateY(-1px); }
.ctrl.on { background: var(--ns-blue); border-color: #3b6ae6; color: #fff; }
.sky-phase { margin-left: auto; color: var(--muted); font-size: 13px; }
.sky-phase b { color: var(--ink); font-weight: 600; }
.music-now { color: var(--muted); font-size: 12px; max-width: 210px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* a whisper-subtle countdown to Basil the dachshund's next arrival, bottom-left */
.basil-timer {
  position: absolute; left: 16px; bottom: 14px; z-index: 4; pointer-events: none;
  font: 600 12px var(--ui); letter-spacing: 0.4px; color: rgba(255, 255, 255, 0.5);
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.55); font-variant-numeric: tabular-nums;
}
.basil-timer[hidden] { display: none; }

/* ---------- glance cards (cohesive glass) ---------- */
.info-panels {
  position: absolute; top: 52px; left: 14px; z-index: 3;
  display: flex; flex-direction: column; align-items: flex-start; gap: 11px;
  width: 208px; pointer-events: none;
}
/* only ONE glance card shows at a time (rotated by app.js) so the stack stays short
   and never covers the regional exhibit below it on the left */
.info-panels .info-panel { display: none; }
.info-panels .info-panel.is-shown { display: block; animation: glanceIn 0.45s ease; }
.info-panels .info-panel[hidden] { display: none !important; }
@keyframes glanceIn { from { opacity: 0; transform: translateX(-10px); } }
.info-panel {
  width: 100%;
  background: var(--glass);
  border: 1px solid var(--line-2);
  border-radius: var(--r);
  overflow: hidden;
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px) saturate(1.2);
}
.ip-hdr {
  display: flex; align-items: center; gap: 6px;
  font-size: 10.5px; font-weight: 700; letter-spacing: 0.6px; text-transform: uppercase;
  color: var(--ns-yellow);
  padding: 8px 12px 7px;
  border-bottom: 1px solid var(--line);
}
.ip-body { padding: 10px 12px 12px; color: var(--ink); }

.ip-weather-top { display: flex; align-items: center; gap: 9px; }
.ip-weather-top .wx { font-size: 30px; line-height: 1; }
.ip-weather-top .tmp { font-size: 30px; font-weight: 700; line-height: 1; }
.ip-cond { font-size: 12.5px; font-weight: 500; margin-top: 5px; color: var(--muted); }
.ip-rain { margin-top: 7px; font-size: 12.5px; font-weight: 700; }
.ip-rain.wet { color: #7fb6ff; }
.ip-rain.dry { color: var(--ok); }

.ip-delay-row { display: flex; align-items: baseline; gap: 6px; font-size: 13px; font-weight: 600; padding: 3px 0; }
.ip-delay-row .nm { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ip-delay-row .mn { font-variant-numeric: tabular-nums; font-weight: 700; }
.ip-delay-row.minor .mn { color: var(--warn); }
.ip-delay-row.major .mn { color: var(--bad); }
.ip-delay-row.cancel .mn { color: #c79bff; }
.ip-allgood { font-size: 13px; font-weight: 600; color: var(--ok); }

/* ---------- departures board ---------- */
.board {
  display: flex; flex-direction: column; overflow: hidden;
  background: linear-gradient(180deg, rgba(18, 24, 37, 0.92), rgba(11, 16, 25, 0.92));
  border: 1px solid var(--line-2);
  border-radius: var(--r);
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
}
.board-head {
  position: relative;
  padding: 16px 18px 14px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(29, 78, 216, 0.16), transparent);
}
.board-head::after {
  content: ""; position: absolute; left: 18px; right: 18px; bottom: -1px; height: 2px;
  background: linear-gradient(90deg, var(--ns-yellow), rgba(255, 201, 23, 0));
}
.clock {
  font-family: var(--mono); font-size: 40px; font-weight: 600; line-height: 1;
  letter-spacing: 0.5px; font-variant-numeric: tabular-nums;
  color: var(--led); text-shadow: 0 0 22px rgba(255, 210, 63, 0.3);
}
/* seconds ride small + dimmed so HH:MM reads as the headline (platform-board look) */
.clock .cs {
  font-size: 0.5em; font-weight: 500; letter-spacing: 0; color: var(--led);
  opacity: 0.62; text-shadow: none; margin-left: 3px; vertical-align: 0.12em;
}
.clock-date { color: var(--muted); font-size: 12.5px; margin-top: 6px; letter-spacing: 0.2px; }
.board-title { margin-top: 10px; font-size: 10.5px; letter-spacing: 2px; text-transform: uppercase; color: var(--ns-yellow); font-weight: 700; }
/* title row + crowding legend (Yodeck wall display has no hover, so the
   coloured crowd blocks need an always-on key) */
.board-title-row { display: flex; align-items: baseline; justify-content: space-between; gap: 14px; flex-wrap: wrap; }
.crowd-legend { margin-top: 10px; display: flex; align-items: baseline; gap: 12px; font-size: 9.5px; letter-spacing: 1px; text-transform: uppercase; color: var(--muted); font-weight: 600; }
.crowd-legend .lg { display: inline-flex; align-items: baseline; gap: 4px; white-space: nowrap; }
.crowd-legend .crowd { margin-left: 0; font-size: 11px; }

.board-cols, .row {
  display: grid;
  grid-template-columns: 52px 44px 1fr 34px 54px;   /* tighter time/track/eta → DESTINATION gets the room (Schiphol Airport no longer clips) */
  gap: 8px; align-items: center;
}
.board-cols {
  padding: 10px 18px; font-size: 9.5px; text-transform: uppercase; letter-spacing: 1px;
  color: var(--faint); border-bottom: 1px solid var(--line);
}
.board-rows { flex: 1 1 auto; min-height: 0; overflow-y: auto; }
.board-rows::-webkit-scrollbar { width: 8px; }
.board-rows::-webkit-scrollbar-thumb { background: var(--line-2); border-radius: 8px; }
.row {
  padding: 11px 18px; font-size: 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  animation: rowin 0.3s ease both;
}
.board-rows .row:first-child { background: linear-gradient(90deg, rgba(255, 201, 23, 0.08), transparent 70%); }
@keyframes rowin { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }

.c-time { font-family: var(--mono); font-weight: 600; font-size: 12.5px; display: flex; flex-direction: column; line-height: 1.12; font-variant-numeric: tabular-nums; color: var(--muted); }
.t-on { color: var(--ink); }
.t-planned { color: var(--faint); text-decoration: line-through; font-size: 11px; }
.t-delay { color: var(--bad); font-weight: 700; }

.badge { font-size: 10.5px; font-weight: 700; color: #fff; padding: 2.5px 6px; border-radius: 5px; letter-spacing: 0.3px; }
.badge-ic { background: var(--ic); }
.badge-spr { background: var(--spr); }
.badge-icd { background: var(--icd); }
.badge-sng { background: var(--sng); }

.c-dest { font-weight: 600; font-size: 14.5px; letter-spacing: 0.1px; display: flex; align-items: center; min-width: 0; color: var(--ink); }
.c-dest .dn { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.cx { color: var(--bad); font-size: 11px; font-weight: 700; margin-left: 6px; }
.crowd { font-weight: 800; font-size: 11px; margin-left: 5px; vertical-align: 1px; flex: 0 0 auto; }
.crowd-quiet { color: #4f9d6b; }
.crowd-busy { color: var(--warn); }
.crowd-packed { color: var(--bad); }

.c-track { text-align: center; }
.trk {
  display: inline-block; min-width: 24px; padding: 2.5px 5px;
  background: var(--glass-2); border: 1px solid var(--line); border-radius: var(--r-sm);
  font-weight: 700; font-size: 13px; font-variant-numeric: tabular-nums;
}
.trk.changed { background: #3a1f55; border-color: #8b3fd0; color: #e6c8ff; animation: trkflash 1.1s ease-in-out infinite; }
@keyframes trkflash { 50% { background: #8b3fd0; color: #fff; } }

.c-eta { text-align: right; font-size: 13px; font-weight: 700; font-variant-numeric: tabular-nums; color: var(--muted); transition: color 0.3s ease; }
.eta-soon { color: var(--ns-yellow); text-shadow: 0 0 12px rgba(255, 201, 23, 0.25); }
.eta-now { color: var(--ok); text-shadow: 0 0 14px rgba(65, 201, 138, 0.45); animation: etapulse 1.6s ease-in-out infinite; }
@keyframes etapulse { 50% { opacity: 0.55; } }
.eta-gone { color: var(--faint); font-size: 12px; font-weight: 600; }
/* live-position confirmed: train is still physically standing at the platform */
.eta-platform { color: var(--ok); font-size: 11px; font-weight: 600; letter-spacing: 0.01em; }
.eta-platform.eta-late { color: var(--ns-yellow); }

.row.cancelled .c-dest, .row.cancelled .c-time { opacity: 0.55; }
.board-empty { padding: 32px 18px; text-align: center; color: var(--muted); font-size: 13px; line-height: 1.5; }

/* board extras: heading-home + today */
.board-extra { border-top: 1px solid var(--line); padding: 12px; display: flex; flex-direction: column; gap: 10px; }
.board-extra .info-panel { background: var(--glass-2); box-shadow: none; backdrop-filter: none; }
.ip-home-row { display: grid; grid-template-columns: 1fr auto; gap: 0 8px; padding: 3px 0; align-items: baseline; }
.ip-home-row .hd-dest { font-size: 13px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ip-home-row .hd-mins { font-size: 13px; font-weight: 700; color: #7fb6ff; font-variant-numeric: tabular-nums; }
.ip-home-row .hd-meta { grid-column: 1 / -1; font-size: 11px; color: var(--muted); }
.ip-home-row .hd-meta b { color: var(--bad); }
.ip-home-row.last .hd-dest { color: #ffac6b; }
.ip-stat { display: inline-flex; flex-direction: column; align-items: center; margin: 0 12px 4px 0; }
.ip-stat .st-n { font-size: 22px; font-weight: 700; line-height: 1; }
.ip-stat .st-n.good { color: var(--ok); } .ip-stat .st-n.warn { color: var(--warn); } .ip-stat .st-n.bad { color: var(--bad); }
.ip-stat .st-l { font-size: 9.5px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.3px; margin-top: 3px; }
.ip-stat-row { font-size: 12px; font-weight: 500; color: var(--muted); margin-top: 3px; }
.ip-stat-row.cx { color: #c79bff; }

.board-foot { padding: 10px 16px; font-size: 11px; color: var(--muted); border-top: 1px solid var(--line); }

/* ---------- story cards (top-right; text-only, no live close-up) ---------- */
/* ONE overlay slot, top-left. Story cards used to live top-right while the glance
   cards sat top-left, so a viewer had to watch two corners for the same class of
   information with no rule explaining which went where.
   They cannot simply be STACKED in one corner: measured against the locked frame, the
   left column has only ~185px before the maquette starts (y237) and the right ~238px
   before the VERTREK board (y290), while a single card is ~130px. So this is one slot
   showing one card at a time — a story card when a train event fires, the rotating
   glance cards otherwise (see .info-panels.yielded). Nothing ever covers the maquette. */
.comic-strip {
  position: absolute; top: 52px; left: 14px; right: auto; bottom: auto; z-index: 4;
  display: flex; flex-direction: column; align-items: flex-start; gap: 10px;
  padding: 0; pointer-events: none; max-width: 300px;
}
/* while a story card holds the slot, the glance stack steps aside */
.info-panels.yielded { visibility: hidden; }
.comic-panel {
  width: 272px; position: relative;
  background: var(--glass); border: 1px solid var(--line-2); border-radius: var(--r);
  box-shadow: var(--shadow); overflow: hidden; backdrop-filter: blur(12px);
  transform-origin: top right; animation: panelIn 0.5s cubic-bezier(.2, 1.2, .35, 1);
}
.comic-panel.out { animation: panelOut 0.4s forwards; }
.comic-panel .hdr {
  display: flex; align-items: center; gap: 6px; padding: 7px 11px;
  font-size: 11px; font-weight: 700; letter-spacing: 0.2px;
  color: var(--ink); border-bottom: 1px solid var(--line);
  white-space: nowrap; overflow: hidden;
}
.comic-panel .hdr .pl { background: var(--ns-yellow); color: #11161f; border-radius: 4px; padding: 1px 5px; font-weight: 800; }
.comic-panel .hdr .badge { font-size: 10px; padding: 1px 5px; }
.comic-panel .hdr .late { margin-left: auto; color: var(--bad); }
.comic-panel .stamprow { padding: 9px 12px 0; line-height: 0; }
.comic-stamp {
  display: inline-block; line-height: 1;
  font: 800 13px var(--comic); letter-spacing: 0.3px; color: #fff; text-transform: uppercase;
  padding: 2px 9px; border-radius: 6px; border: 2px solid rgba(255, 255, 255, 0.85);
  white-space: nowrap; transform: rotate(-3deg);
  box-shadow: 0 2px 9px rgba(0, 0, 0, 0.55); animation: stampPop 0.34s cubic-bezier(.2, 1.7, .4, 1);
}
.comic-stamp.aboard { background: #1f9d52; }
.comic-stamp.late { background: #d3322a; }
.comic-stamp.arrive { background: #2f6fd0; }
.comic-stamp.depart { background: #c98a1a; }
.comic-stamp.track { background: #8b3fd0; }
.comic-stamp.packed { background: #c0402a; }
@keyframes stampPop { from { transform: rotate(-7deg) scale(1.7); opacity: 0; } }
.comic-panel .cap { padding: 9px 12px 11px; color: var(--ink); font: 700 13.5px/1.32 var(--comic); }
@keyframes panelIn { from { transform: translateY(26px) scale(0.9); opacity: 0; } }
@keyframes panelOut { to { transform: translateY(26px) scale(0.9); opacity: 0; } }

/* ---------- bottom rail: clock + departures ticker ---------- */
.deckbar {
  display: flex; align-items: stretch; height: 72px; flex: 0 0 auto;
  background: linear-gradient(180deg, rgba(10, 19, 48, 0.94), rgba(7, 11, 24, 0.98));
  border-top: 2px solid var(--ns-yellow);
}
.deckbar-clock {
  display: flex; flex-direction: column; justify-content: center;
  padding: 7px 20px; min-width: 176px; white-space: nowrap;
  background: rgba(0, 0, 0, 0.28); border-right: 1px solid var(--line);
}
.deckbar-clock .clock {
  font-size: 27px; font-weight: 700; line-height: 1.05; color: var(--ink);
  font-variant-numeric: tabular-nums; letter-spacing: 0.5px;
}
.deckbar-clock .clock .cs { font-size: 15px; color: var(--muted); margin-left: 2px; font-weight: 600; }
.deckbar-clock .clock-date { font-size: 11px; color: var(--muted); margin-top: 4px; line-height: 1.1; }
.deckbar-clock .board-foot {
  font-size: 9px; color: var(--muted); margin-top: 3px; padding: 0; border: none;
  max-width: 240px; overflow: hidden; text-overflow: ellipsis; line-height: 1.2;
}

/* pinned imminent departures — frozen + highlighted at the head of the rail */
/* mixed-feed rail items: imminent departures glow inline, plus weather / disruptions /
   station colour woven between them — no frozen pinned block */
.deckbar .ticker-item.ti-now { background: linear-gradient(180deg, rgba(255, 201, 23, 0.18), rgba(255, 201, 23, 0.06)); border-radius: 8px; }
.ti-now .t-eta { color: #ffe08a; font-weight: 700; }
.t-boarding {
  font: 800 11px var(--ui); letter-spacing: 0.6px; color: #11161f;
  background: var(--ns-yellow); border-radius: 999px; padding: 2px 9px;
  align-self: center; animation: board-pulse 1.2s ease-in-out infinite;
}
@keyframes board-pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.55; } }
.t-wx { color: #ffd479; font-weight: 700; }
.t-warn { color: #ff9d5c; font-weight: 700; }
.t-colour { color: #8aa0bd; font-style: italic; font-weight: 500; }

.ticker-viewport { position: relative; flex: 1; overflow: hidden; }
.ticker-track {
  position: absolute; top: 0; left: 0; height: 100%;
  display: flex; align-items: center; white-space: nowrap;
  font-size: 14px; font-weight: 500; will-change: transform;
  animation: ticker-scroll 60s linear infinite;
}
.ticker-track:hover { animation-play-state: paused; }
.ticker-item { padding: 0 14px; }
.ticker-item .t-rail { color: var(--ns-yellow); }
.ticker-item .t-extra { color: #aab8cf; font-weight: 400; }
.ticker-item .t-road { color: #7fc4ff; }
.t-sep { color: #3a4a63; padding: 0 4px; }
.ticker-item b { color: #ff7a7a; }
@keyframes ticker-scroll { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* departures-tape items: time · IC/SPR · destination · platform · ETA */
.deckbar .ticker-item { display: inline-flex; align-items: baseline; gap: 7px; padding: 0 20px; font-size: 15px; }
.deckbar .ticker-item .badge { align-self: center; }
.t-time { color: var(--ink); font-weight: 700; font-variant-numeric: tabular-nums; }
.t-planned { color: var(--muted); text-decoration: line-through; font-variant-numeric: tabular-nums; }
.t-late { color: var(--bad); font-weight: 700; }
.t-dest { color: #fff; font-weight: 600; }
.deckbar .t-rail { color: var(--ns-yellow); font-weight: 700; }
.deckbar .t-rail.t-changed { color: #c79bff; }
.t-eta { color: #9fb4cf; font-weight: 500; }
.ticker-item.t-cancel { opacity: 0.55; }
.ticker-item.t-cancel .t-dest { text-decoration: line-through; }
.deckbar .t-sep { align-self: center; }

/* ---------- responsive ---------- */
/* PORTRAIT phones/tablets: stack the scene over the board, cards BELOW the canvas */
@media (max-width: 820px) and (orientation: portrait) {
  body { height: auto; min-height: 100dvh; overflow-y: auto; }
  .app { display: flex; flex-direction: column; gap: 10px; padding: 10px 10px 4px; flex: none; }
  .stage-wrap { height: auto; display: flex; flex-direction: column; gap: 8px; }
  .np-name { font-size: 19px; }
  /* unfloat the full-bleed overlays back into normal flow on phones */
  .nameplate { position: static; background: none; padding: 2px 4px 0; }
  .stage { position: relative; inset: auto; height: 46dvh; min-height: 260px; max-height: 420px; flex: none; }
  .controls { position: static; left: auto; right: auto; bottom: auto; }
  .info-panels { position: static; width: auto; flex-direction: row; flex-wrap: wrap; pointer-events: auto; }
  .info-panels .info-panel { display: block; }      /* phones have room below the canvas — show them all */
  .sky-phase { width: 100%; margin-left: 0; order: 5; font-size: 12px; }

  .info-panel { flex: 1 1 0; min-width: 0; }
  /* cards flow in a horizontal scroll strip below the canvas */
  .comic-strip {
    position: static; left: auto; right: auto; top: auto; bottom: auto; z-index: auto; max-width: none;
    flex-direction: row; align-items: stretch; padding: 2px 10px 0; flex-wrap: nowrap;
    overflow-x: auto; overflow-y: hidden; pointer-events: auto; -webkit-overflow-scrolling: touch;
  }
  .comic-panel { width: 220px; flex: 0 0 auto; }

  .deckbar { position: sticky; bottom: 0; height: 54px; z-index: 5; }
  .deckbar-clock { min-width: 132px; padding: 4px 12px; }
  .deckbar-clock .clock { font-size: 22px; }
}
/* LANDSCAPE phones: full-bleed scene with slim chrome and a slim departures rail. */
@media (orientation: landscape) and (max-height: 560px) {
  body { height: 100dvh; overflow: hidden; }
  .app { padding: 0; }
  .nameplate { padding: 6px 10px 10px; }
  .np-name { font-size: 15px; }
  .info-panels { top: 42px; }
  .comic-strip { top: 42px; max-width: 230px; }
  .comic-panel { width: 200px; }
  .controls { display: none; }            /* dev/scene controls don't fit — scene fills the space */
  .deckbar { height: 46px; }
  .deckbar-clock { min-width: 120px; padding: 4px 12px; }
  .deckbar-clock .clock { font-size: 20px; }
  .deckbar-clock .clock-date, .deckbar-clock .board-foot { display: none; }
}
@media (max-width: 380px) {
  .deckbar-clock .clock { font-size: 19px; }
}

/* ============================================================================
   Always-on departures panel (top-right of the stage).
   The diegetic VERTREK sign stays as scenery; this is the readable instrument.
   Sits opposite the glance cards so the two never collide, and unlike them it is
   never rotated away — a departures board that disappears is not a departures board.
   ========================================================================== */
/* HIDDEN ON DESKTOP. The enlarged VERTREK board carries the same eight rows in-world,
   and two identical lists stacked in one corner read as duplication — the board has the
   character, so it wins the frame. The panel survives for narrow screens (below), where
   the 3D board is far too small to read and a flat list is the only way to answer
   "when is my train?". */
.dep-panel {
  display: none;
  position: absolute; top: 52px; right: 14px; z-index: 3;
  width: 272px; pointer-events: none;
  background: var(--glass);
  border: 1px solid var(--line-2);
  border-radius: var(--r);
  overflow: hidden;
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px) saturate(1.2);
}
.dep-list { list-style: none; margin: 0; padding: 6px 0 7px; }
.dep-list li {
  /* time | destination | platform | countdown — platform stays visible on every row */
  display: grid; grid-template-columns: 46px 1fr 16px 30px;
  align-items: baseline; gap: 7px;
  padding: 5px 12px;
  font-size: 12.5px; line-height: 1.25; color: var(--ink);
}
.dep-list li + li { border-top: 1px solid var(--line); }
.dep-t { font-variant-numeric: tabular-nums; font-weight: 700; letter-spacing: .2px; }
.dep-d { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dep-p { font-size: 11px; font-weight: 700; color: var(--muted); font-variant-numeric: tabular-nums; text-align: center; }
.dep-c { font-size: 11px; font-weight: 700; color: var(--muted); font-variant-numeric: tabular-nums; text-align: right; }
.dep-list li.soon .dep-c { color: var(--ns-yellow); }
/* a delay replaces the clock time with struck-through planned + the real one */
.dep-t .was { text-decoration: line-through; opacity: .5; font-weight: 600; margin-right: 4px; }
.dep-t.late { color: #ff9a6b; }
.dep-list li.soon .dep-t { color: var(--ns-yellow); }
.dep-list li.cancelled { opacity: .55; }
.dep-list li.cancelled .dep-d { text-decoration: line-through; }
/* NB the selector must out-specify `.dep-list li` (0,1,1) or `display:grid` wins and
   the text lands in the 46px time column, wrapping one word per line. */
.dep-list li.dep-empty {
  display: block; padding: 9px 12px 11px; color: var(--muted); font-size: 12px;
}
@media (max-width: 900px) {
  /* phones flow the panels below the canvas; departures leads because it is the point,
     and it is the ONLY readable departures list at this size */
  .dep-panel { display: block; position: static; width: auto; margin: 10px 0 0; }
}
/* "DEPARTURES · AMSTERDAM ZUID" wrapped to two lines at this width — the station name
   drops to a lighter right-aligned tail so the header stays one line. */
.dep-hdr { justify-content: space-between; }
.dep-hdr-at { margin-left: auto; font-weight: 600; letter-spacing: .3px; color: var(--muted); text-transform: none; font-size: 10px; }
