/* CPH Train Dispatcher: København H. DW Innovation.
   Mobile first. Top bar, buttons, colours and the station board match the DSB game pages
   (/dsb/journeys/ and the landing page /dsb/train-journey/). */

@font-face { font-family: "CPH Board"; src: url("fonts/barlow-semi-condensed-latin-500-normal.woff2") format("woff2"); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: "CPH Board"; src: url("fonts/barlow-semi-condensed-latin-700-normal.woff2") format("woff2"); font-weight: 700; font-style: normal; font-display: swap; }

:root {
  --bg: #0d0e11;
  --bg-2: #14161b;
  --bg-3: #1b1e25;
  --line: rgba(255, 255, 255, .09);
  --line-2: rgba(255, 255, 255, .16);
  --text: #eef0f3;
  --muted: #a5abb6;
  --faint: #79808c;
  --red: #d2122e;
  --red-2: #ef3349;
  --red-glow: rgba(210, 18, 46, .35);
  --amber: #f2b33d;
  --green: #2fbf71;
  --yellow: #ffe94a;
  --radius: 14px;
  --radius-sm: 9px;
  --wrap: 1120px;
  --gutter: 16px;
  --top: 60px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  --board: "CPH Board", "Barlow Semi Condensed", "Arial Narrow", "Roboto Condensed", "Helvetica Neue", Arial, sans-serif;
  --ease: cubic-bezier(.2, .7, .2, 1);
  --panel: #0a0c0f;
  --cb-band-1: #2178c8;
  --cb-band-2: #1a68ac;
  --cb-bar: #155a94;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--top) + 8px); scrollbar-gutter: stable; background: var(--bg); }
body { margin: 0; background: var(--bg); color: var(--text); font: 400 16px/1.6 var(--font); -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; overflow-x: hidden; }
img, svg { display: block; max-width: 100%; }
a { color: inherit; }
button { font: inherit; color: inherit; }
h1, h2, h3 { line-height: 1.1; margin: 0; letter-spacing: -.015em; }
p { margin: 0; }
:focus-visible { outline: 2px solid var(--amber); outline-offset: 3px; border-radius: 4px; }
[hidden] { display: none !important; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 100; background: var(--amber); color: #111; padding: 10px 14px; border-radius: 8px; font-weight: 700; text-decoration: none; }
.skip:focus { top: 12px; }
.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding-left: max(var(--gutter), env(safe-area-inset-left)); padding-right: max(var(--gutter), env(safe-area-inset-right)); }
.i { width: 20px; height: 20px; flex: none; fill: currentColor; }

/* ---------- Buttons (same as the game) ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 12px 22px; border-radius: 999px; font-weight: 650; font-size: 15px; line-height: 1.2; text-decoration: none; cursor: pointer; border: 1px solid transparent; transition: transform .2s var(--ease), background-color .2s, border-color .2s, box-shadow .2s; -webkit-tap-highlight-color: transparent; touch-action: manipulation; text-align: center; }
.btn--primary { background: var(--red); color: #fff; box-shadow: 0 8px 24px -10px var(--red-glow); }
.btn--ghost { background: rgba(255, 255, 255, .08); border-color: var(--line-2); color: var(--text); }
.btn--dark { background: #3a3f49; color: #fff; border: 1px solid rgba(255, 255, 255, .12); }
.btn--big { min-height: 56px; padding: 14px 28px; font-size: 17px; }
.btn--small { min-height: 44px; padding: 8px 16px; font-size: 14px; }
.btn--small .i { width: 18px; height: 18px; }
.btn[disabled] { opacity: .45; cursor: default; }
@media (hover: hover) {
  .btn--primary:hover { background: var(--red-2); transform: translateY(-1px); }
  .btn--ghost:hover { background: rgba(255, 255, 255, .14); }
  .btn--dark:not([disabled]):hover { background: #474d59; }
}

/* ---------- Top bar (same as the game) ---------- */
.topbar { position: fixed; inset: 0 0 auto 0; z-index: 50; background: rgba(13, 14, 17, .72); -webkit-backdrop-filter: saturate(160%) blur(14px); backdrop-filter: saturate(160%) blur(14px); border-bottom: 1px solid var(--line); }
@supports not ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) { .topbar { background: rgba(13, 14, 17, .96); } }
.topbar__in { height: var(--top); display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.brand { display: inline-flex; align-items: center; gap: 10px; min-width: 0; white-space: nowrap; text-decoration: none; font-weight: 700; letter-spacing: .01em; }
.brand__mark { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 9px; background: var(--red); color: #fff; font-size: 13px; font-weight: 800; letter-spacing: .02em; }
.brand__text { font-size: 15px; }
.so-bar { display: flex; align-items: center; gap: 8px; min-width: 0; }
.tb-link { min-height: 40px; padding: 0 14px; font-size: 14px; white-space: nowrap; }
@media (max-width: 399px) { .brand__text { display: none; } }

/* ---------- Shared bits ---------- */
.plate { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line-2); border-radius: 999px; padding: 5px 12px; font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); background: rgba(13, 14, 17, .45); }
.plate b { width: 6px; height: 6px; border-radius: 50%; background: var(--green); }
.plate--preview { color: var(--amber); border-color: rgba(242, 179, 61, .45); font-size: 11px; padding: 4px 10px; }
.eyebrow { display: inline-block; font-size: 12px; font-weight: 750; letter-spacing: .16em; text-transform: uppercase; color: var(--red-2); margin-bottom: 12px; }
.eyebrow--amber { color: var(--amber); }
.sec { position: relative; padding: 48px 0; }
.sec-head { margin-bottom: 28px; }
.h2 { font-size: clamp(28px, 7vw, 44px); font-weight: 800; letter-spacing: -.025em; text-wrap: balance; }
.h2 em { font-style: normal; color: var(--red-2); }
.lead { margin-top: 14px; font-size: 17px; color: var(--muted); max-width: 680px; text-wrap: pretty; }

/* ---------- Intro ---------- */
.intro { position: relative; overflow: hidden; isolation: isolate; padding: calc(var(--top) + 28px) 0 24px; background: radial-gradient(120% 90% at 85% 0%, #14263a 0%, rgba(13, 14, 17, 0) 60%), var(--bg); }
.intro__lines { position: absolute; inset: 0; z-index: -1; opacity: .5; pointer-events: none;
  background:
    linear-gradient(transparent 0 calc(50% - 1px), rgba(255, 255, 255, .06) calc(50% - 1px) calc(50% + 1px), transparent calc(50% + 1px)) 0 0 / 100% 34px;
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 55%, #000 100%); mask-image: linear-gradient(90deg, transparent 0%, #000 55%, #000 100%); }
.intro__h { font-size: clamp(34px, 9vw, 64px); font-weight: 850; letter-spacing: -.03em; }
.intro__lede { margin-top: 12px; max-width: 640px; font-size: 17px; color: #d5d9df; text-wrap: pretty; }
.intro__lede b { color: #fff; }
.intro__chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.intro__chips .plate { font-size: 11px; color: #d0d4da; }

/* ---------- Game ---------- */
.game { padding: 8px 0 8px; scroll-margin-top: var(--top); }

/* HUD: the station clock and the shift counters */
.hud { display: grid; grid-template-columns: auto 1fr 1fr auto; align-items: stretch; gap: 0; background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--radius) var(--radius) 0 0; overflow: hidden; }
.hud__clock { display: flex; align-items: center; gap: 8px; padding: 8px 12px; background: var(--cb-band-1); color: #fff; font-style: normal; font-variant: normal; font-weight: 700; font-stretch: normal; font-size: 26px; line-height: 1; font-family: var(--board); font-variant-numeric: tabular-nums; }
.hud__clock small { font-size: 16px; font-weight: 500; opacity: .85; margin-left: -6px; align-self: flex-end; padding-bottom: 2px; }
.hud__sq { width: 12px; height: 12px; background: var(--yellow); flex: none; }
.hud__stat { display: flex; flex-direction: column; justify-content: center; padding: 6px 10px; border-left: 1px solid var(--line); min-width: 0; }
.hud__stat--wide { display: none; }
.hud__l { font-size: 10.5px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--faint); line-height: 1.2; }
.hud__v { font-style: normal; font-variant: normal; font-weight: 700; font-stretch: normal; font-size: 21px; line-height: 1.1; font-family: var(--board); font-variant-numeric: tabular-nums; color: var(--text); white-space: nowrap; }
.hud__v small { font-size: 15px; font-weight: 500; color: var(--muted); }
.hud__btns { display: flex; align-items: center; gap: 2px; padding: 0 4px; border-left: 1px solid var(--line); }
.hbtn { display: inline-grid; grid-auto-flow: column; place-items: center; gap: 2px; min-width: 40px; height: 44px; padding: 0 6px; border: 0; border-radius: 10px; background: transparent; color: var(--text); cursor: pointer; -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
.hbtn .i { width: 20px; height: 20px; }
.hbtn--speed span { font: 700 15px/1 var(--board); }
.hbtn[disabled] { opacity: .35; cursor: default; }
@media (hover: hover) { .hbtn:not([disabled]):hover { background: rgba(255, 255, 255, .08); } }
.hbtn.is-on { background: rgba(255, 255, 255, .1); }
.hud.is-flash .hud__v#score { color: var(--red-2); }
#score.is-up { color: var(--green); }
#score.is-down { color: var(--red-2); }
@media (max-width: 599.98px) {
  .hud__clock { font-size: 24px; padding: 8px 10px; gap: 6px; }
  .hud__clock small { display: none; }
  .hud__stat { padding: 6px 8px; }
  .hud__l { font-size: 9.5px; letter-spacing: .1em; }
}
@media (max-width: 379.98px) {
  .hud__clock { font-size: 22px; padding: 8px 9px; gap: 6px; }
  .hud__stat { padding: 6px 7px; }
  .hud__v { font-size: 19px; }
  .hbtn { min-width: 36px; padding: 0 4px; }
}

/* The desk: plan + selected train */
.desk { background: var(--panel); border: 1px solid var(--line); border-top: 0; border-radius: 0 0 var(--radius) var(--radius); overflow: hidden; }
.plan { position: relative; width: 100%; background: radial-gradient(90% 70% at 50% 45%, #10141a 0%, var(--panel) 100%); touch-action: manipulation; -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
.plan #svg { width: 100%; height: auto; display: block; margin: 0 auto; }
.plan #svg text { font-family: var(--board); }
.plan.is-hot { cursor: pointer; }

.toasts { position: absolute; left: 8px; right: 8px; top: calc(100% + 8px); display: flex; flex-direction: column; align-items: center; gap: 6px; pointer-events: none; z-index: 32; transition: transform .25s var(--ease); }
.toast { max-width: 520px; padding: 8px 12px; border-radius: 10px; background: rgba(20, 22, 27, .94); border: 1px solid var(--line-2); box-shadow: 0 10px 30px -12px rgba(0, 0, 0, .9); font-size: 14px; line-height: 1.35; color: var(--text); text-align: center; animation: tin .25s var(--ease) both; }
.toast b { color: #fff; }
.toast--bad { border-color: rgba(239, 51, 73, .65); }
.toast--good { border-color: rgba(47, 191, 113, .6); }
.toast--warn { border-color: rgba(242, 179, 61, .6); }
.toast.is-out { animation: tout .3s ease both; }
@keyframes tin { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
@keyframes tout { to { opacity: 0; transform: translateY(-6px); } }

.start, .pausecard { position: absolute; inset: 0; z-index: 4; display: grid; place-items: center; padding: 16px; background: rgba(8, 9, 11, .74); -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); }
.start__card { width: 100%; max-width: 480px; padding: 22px 20px; border-radius: var(--radius); background: rgba(20, 22, 27, .96); border: 1px solid var(--line-2); box-shadow: 0 30px 60px -30px #000; }
.start__h { font-size: 26px; font-weight: 800; letter-spacing: -.02em; }
.start__p { margin-top: 8px; color: var(--muted); font-size: 15px; }
.start__steps { margin: 14px 0 0; padding: 0 0 0 20px; color: #d5d9df; font-size: 15px; }
.start__steps li + li { margin-top: 4px; }
.start__steps b { color: #fff; }
.start__go { width: 100%; margin-top: 18px; }
.start__note { margin-top: 10px; font-size: 13px; color: var(--faint); text-align: center; }
.pausecard__in { display: grid; justify-items: center; gap: 12px; }
.pausecard__h { font: 700 30px/1 var(--board); letter-spacing: .04em; text-transform: uppercase; }

/* Selected train strip */
.sel { display: grid; gap: 10px; padding: 12px; border-top: 1px solid var(--line); background: var(--bg-2); }
.sel__head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; }
.sel__tag { font-size: 11px; font-weight: 750; letter-spacing: .14em; text-transform: uppercase; color: var(--amber); }
.sel__num { font: 700 22px/1.1 var(--board); }
.sel__type { font-size: 14px; color: var(--muted); }
.sel__line { margin-top: 2px; font-size: 15px; color: #d5d9df; }
.sel__step { margin-top: 6px; padding: 7px 10px; border-left: 3px solid var(--yellow); background: rgba(255, 233, 74, .06); border-radius: 0 8px 8px 0; font-size: 14.5px; line-height: 1.4; color: #e9ecef; }
.sel__step b { color: var(--yellow); }
.sel__act { display: flex; flex-wrap: wrap; gap: 8px; }
.sel__act .btn { flex: 1 1 150px; }

/* Legend */
.legend { display: flex; flex-wrap: wrap; gap: 6px 16px; padding: 12px 2px 0; font-size: 13px; color: var(--muted); }
.lg { display: inline-flex; align-items: center; gap: 7px; white-space: nowrap; }
.lg__k { width: 22px; height: 4px; border-radius: 2px; background: #5b6372; }
.lg__k--set { background: var(--green); }
.lg__k--occ { background: var(--red-2); }
.lg__k--help { background: repeating-linear-gradient(90deg, var(--yellow) 0 6px, transparent 6px 10px); }
.lg__k--closed { background: repeating-linear-gradient(90deg, var(--amber) 0 4px, #3a3020 4px 8px); }
.lg__wk { display: inline-block; width: 14px; height: 14px; margin: 0 2px 0 -2px; flex: none; background: url(dw_repair.svg?v=1) center / contain no-repeat; }
.lg__dot { width: 9px; height: 9px; border-radius: 50%; margin-right: -3px; }
.lg__dot--red { background: #ff3b3b; }
.lg__dot--green { background: #3dff8b; margin-right: 0; }

/* ---------- Boards (Copenhagen H style, same as the landing page) ---------- */
.boards { display: grid; gap: 14px; margin-top: 16px; align-items: start; }
.board { --cb-band-1: #2178c8; --cb-band-2: #1a68ac; --cb-bar: #155a94; --cb-hover: #2c86da; --cb-label: rgba(255, 255, 255, .78); --cb-soft: rgba(255, 255, 255, .86); --cb-frame: #050607;
  position: relative; margin: 0; border: 6px solid var(--cb-frame); border-radius: 12px; overflow: hidden; background: var(--cb-band-1); color: #fff; font-family: var(--board); font-weight: 500; box-shadow: 0 0 0 1px #24272c, 0 28px 60px -34px rgba(0, 0, 0, .95); }
.board::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(165deg, rgba(255, 255, 255, .07) 0%, rgba(255, 255, 255, 0) 38%); }
.board__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 12px 9px; background: var(--cb-band-1); }
.board__title { display: flex; align-items: center; gap: 9px; min-width: 0; font: 500 21px/1.05 var(--board); }
.board__title b { font-weight: 700; }
.board__sq { flex: none; width: 14px; height: 14px; background: var(--yellow); border-radius: 1px; }
.board__clock { flex: none; font-style: normal; font-variant: normal; font-weight: 700; font-stretch: normal; font-size: 21px; line-height: 1; font-family: var(--board); font-variant-numeric: tabular-nums; }
.board__cols { display: none; }
.board__rows { margin: 0; padding: 0; list-style: none; min-height: 60px; }
.brow { list-style: none; margin: 0; background: var(--cb-band-1); }
.brow:nth-child(even) { background: var(--cb-band-2); }
.brow__a { display: grid; width: 100%; grid-template-columns: 48px minmax(0, 1fr) 40px; grid-template-areas: "t n sp" "nt m sp" ". info sp"; column-gap: 10px; row-gap: 1px; align-items: center; padding: 8px 12px 9px; border: 0; background: transparent; color: inherit; text-align: left; font: inherit; cursor: pointer; -webkit-tap-highlight-color: transparent; touch-action: manipulation; transition: background-color .15s; }
.brow__t { grid-area: t; align-self: start; font-style: normal; font-variant: normal; font-weight: 700; font-stretch: normal; font-size: 19px; line-height: 1.15; font-family: var(--board); font-variant-numeric: tabular-nums; }
.brow__new { grid-area: nt; align-self: start; font-style: normal; font-variant: normal; font-weight: 700; font-stretch: normal; font-size: 17px; line-height: 1.1; font-family: var(--board); font-variant-numeric: tabular-nums; color: var(--yellow); }
.brow__n { grid-area: n; font: 700 18px/1.2 var(--board); overflow-wrap: anywhere; }
.brow__n small { font-weight: 500; font-size: 15px; color: var(--cb-soft); margin-left: 6px; }
.brow__m { grid-area: m; font: 500 15px/1.3 var(--board); color: var(--cb-soft); }
.brow__info { grid-area: info; font: 700 15px/1.3 var(--board); color: var(--yellow); }
.brow__info:empty { display: none; }
.brow__sp { grid-area: sp; align-self: start; display: flex; flex-direction: column; align-items: center; font-style: normal; font-variant: normal; font-weight: 700; font-stretch: normal; font-size: 20px; line-height: 1.1; font-family: var(--board); font-variant-numeric: tabular-nums; }
.brow__sp::before { content: "Spor"; font: 500 11px/1.2 var(--board); letter-spacing: .04em; text-transform: uppercase; color: var(--cb-label); }
.brow.is-track-changed .brow__sp { color: var(--yellow); }
.brow.is-sel { box-shadow: inset 4px 0 0 var(--yellow); }
.brow.is-done { opacity: .55; }
@media (hover: hover) { .brow__a:hover { background: var(--cb-hover); } }
.brow__a:active { background: var(--cb-hover); }
.brow__a:focus { outline: none; }
.brow__a:focus-visible { outline: 3px solid var(--yellow); outline-offset: -3px; }
.brow--empty { padding: 14px 12px; font: 500 16px/1.3 var(--board); color: var(--cb-soft); }
.board__foot { margin: 0; padding: 9px 12px 10px; background: var(--cb-bar); font: 500 15px/1.4 var(--board); color: var(--yellow); }
.board--arr { --cb-band-1: #2a5c7c; --cb-band-2: #1f4a63; --cb-bar: #173a4e; --cb-hover: #33698b; background: var(--cb-band-1); }
.board--arr .board__head { background: var(--cb-frame); padding: 9px 12px 10px; }
.board--arr .board__clock { padding: 3px 7px 4px; border: 1px solid rgba(255, 255, 255, .55); border-radius: 3px; font-size: 18px; }

/* ---------- How to play ---------- */
.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.step { position: relative; padding: 18px 18px 18px 64px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg-2); }
.step__n { position: absolute; left: 18px; top: 18px; display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: #3a3f49; font: 700 18px/1 var(--board); }
.step__h { font-size: 18px; font-weight: 750; }
.step__p { margin-top: 6px; color: var(--muted); font-size: 15px; }
.rules { display: grid; gap: 12px; margin-top: 20px; }
.rules__col { padding: 18px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg-2); }
.rules__h { font-size: 18px; font-weight: 750; margin-bottom: 10px; }
.pts, .notes { list-style: none; margin: 0; padding: 0; font-size: 15px; }
.pts li { display: flex; justify-content: space-between; gap: 12px; padding: 7px 0; border-top: 1px solid var(--line); color: #d5d9df; }
.pts li:first-child { border-top: 0; }
.pts b { font: 700 18px/1.2 var(--board); white-space: nowrap; }
.pts__p { color: var(--green); }
.pts__m { color: var(--red-2); }
.notes li { position: relative; padding: 6px 0 6px 18px; color: #d5d9df; }
.notes li::before { content: ""; position: absolute; left: 2px; top: 15px; width: 6px; height: 6px; border-radius: 50%; background: var(--amber); }
.aboutnote { margin-top: 20px; padding: 14px 16px; border: 1px solid rgba(255, 255, 255, .16); border-radius: 10px; background: rgba(255, 255, 255, .04); font-size: 14.5px; color: var(--muted); max-width: 860px; }
.aboutnote b { color: var(--text); }

/* ---------- Sheet (designed dialog, never the browser's own) ---------- */
.sheet { position: fixed; inset: 0; z-index: 80; display: flex; align-items: flex-end; justify-content: center; }
.sheet__scrim { position: absolute; inset: 0; background: rgba(5, 6, 8, .7); }
.sheet__card { position: relative; width: 100%; max-width: 520px; max-height: 90vh; max-height: 90dvh; overflow: auto; padding: 22px 18px calc(20px + env(safe-area-inset-bottom)); border-radius: 18px 18px 0 0; background: var(--bg-2); border: 1px solid var(--line-2); border-bottom: 0; box-shadow: 0 -20px 60px -20px #000; animation: sheetin .28s var(--ease) both; }
@keyframes sheetin { from { transform: translateY(30px); opacity: 0; } to { transform: none; opacity: 1; } }
.sheet__x { position: absolute; right: 10px; top: 10px; width: 44px; height: 44px; display: grid; place-items: center; border: 0; border-radius: 50%; background: transparent; color: var(--muted); cursor: pointer; }
.sheet__x:hover { color: var(--text); background: rgba(255, 255, 255, .06); }
.sheet__h { font-size: 22px; font-weight: 800; padding-right: 44px; }
.sheet__body { margin-top: 10px; color: var(--muted); font-size: 15px; }
.sheet__body p + p { margin-top: 8px; }
.sheet__body b { color: var(--text); }
.chips { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 14px; }
.chip { min-height: 52px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; border: 1px solid var(--line-2); border-radius: 12px; background: rgba(255, 255, 255, .05); color: var(--text); cursor: pointer; font: 700 20px/1 var(--board); -webkit-tap-highlight-color: transparent; }
.chip small { font: 500 11.5px/1.2 var(--font); color: var(--muted); }
.chip.is-now { background: #3a3f49; border-color: rgba(255, 255, 255, .3); }
.chip[disabled] { opacity: .38; cursor: default; }
@media (hover: hover) { .chip:not([disabled]):hover { border-color: rgba(255, 255, 255, .4); } }
.sheet__row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.sheet__row .btn { flex: 1 1 160px; }
.res { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-top: 14px; }
.res__c { padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: rgba(255, 255, 255, .03); }
.res__l { display: block; font-size: 11px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--faint); }
.res__v { display: block; font-style: normal; font-variant: normal; font-weight: 700; font-stretch: normal; font-size: 26px; line-height: 1.1; font-family: var(--board); color: var(--text); font-variant-numeric: tabular-nums; }
.res__big { grid-column: 1 / -1; background: rgba(33, 120, 200, .14); border-color: rgba(33, 120, 200, .45); }
.res__big .res__v { font-size: 40px; }

/* ---------- Footer ---------- */
.foot { border-top: 1px solid var(--line); padding: 28px 0 calc(28px + env(safe-area-inset-bottom)); background: #0a0b0d; font-size: 13.5px; color: var(--muted); }
.foot__credit { color: #c9cdd3; line-height: 1.6; }
.foot__credit a { color: #fff; font-weight: 700; text-underline-offset: 3px; white-space: nowrap; }
.foot__tm { margin-top: 14px; padding: 12px 14px; border: 1px solid rgba(255, 255, 255, .16); border-radius: 10px; background: rgba(255, 255, 255, .04); color: #c9cdd3; line-height: 1.6; }
.foot__links { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-top: 16px; }
.foot__links a { color: var(--muted); text-underline-offset: 3px; }
@media (hover: hover) { .foot__links a:hover { color: var(--text); } }

/* ---------- Tablet and desktop ---------- */
@media (min-width: 600px) {
  .hud { grid-template-columns: auto 1fr 1fr auto; }
  .hud__stat { padding: 6px 16px; }
  .hud__clock { padding: 8px 16px; font-size: 30px; }
  .sel { grid-template-columns: minmax(0, 1fr) auto; align-items: center; padding: 14px 16px; gap: 16px; }
  .sel__act { flex-direction: column; }
  .sel__act .btn { flex: none; min-width: 190px; }
  .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .chips { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .sheet { align-items: center; padding: 16px; }
  .sheet__card { border-radius: 18px; border-bottom: 1px solid var(--line-2); padding-bottom: 22px; }
  .res { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (min-width: 760px) {
  .board { border-width: 9px; border-radius: 14px; }
  .board__head { padding: 12px 16px 10px; }
  .board__title { font-size: 25px; }
  .board__clock { font-size: 25px; }
  .board--arr .board__clock { font-size: 20px; }
  .board__cols, .brow__a { grid-template-columns: 56px minmax(0, 1fr) 46px 74px minmax(90px, 150px); column-gap: 14px; }
  .board__cols { display: grid; padding: 6px 16px; background: var(--cb-bar); font: 500 14px/1.2 var(--board); color: var(--cb-label); }
  .board__cols span:nth-child(3) { text-align: center; }
  .board__cols span:nth-child(4) { text-align: right; }
  .brow__a { grid-template-areas: "t n sp nt info" "t m sp nt info"; padding: 8px 16px; row-gap: 1px; }
  .brow__t { font-size: 21px; }
  .brow__new { align-self: center; text-align: right; font-size: 20px; }
  .brow__sp { align-self: center; font-size: 22px; }
  .brow__sp::before { content: none; }
  .brow__info { align-self: center; font-size: 16px; line-height: 1.2; }
  .brow__info:empty { display: block; }
  .board__foot { padding: 10px 16px 12px; }
}
@media (min-width: 960px) {
  .sec { padding: 64px 0; }
  .sec-head { margin-bottom: 32px; }
  .intro { padding: calc(var(--top) + 40px) 0 28px; }
  .game { padding-bottom: 16px; }
  .boards { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
  .boards .board__cols, .boards .brow__a { grid-template-columns: 52px minmax(0, 1fr) 42px 64px minmax(84px, 118px); column-gap: 12px; }
  .steps { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .rules { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .toast, .sheet__card { animation: none; }
}

/* pulsing hint rings on the plan */
.plan .pulse { animation: pulse 1.3s ease-in-out infinite; }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: .25; } }
@media (prefers-reduced-motion: reduce) { .plan .pulse { animation: none; } }

/* phones: the next step sits right above the plan, so the plan and the guidance fit one screen */
.stepbar { display: none; }
.desk.is-v .stepbar { display: block; margin: 0; padding: 8px 12px; min-height: 52px; border-bottom: 1px solid var(--line); background: rgba(255, 233, 74, .06); box-shadow: inset 3px 0 0 var(--yellow); font-size: 14px; line-height: 1.35; color: #e9ecef; }
.desk.is-v .stepbar b { color: var(--yellow); font-family: var(--board); font-size: 16px; margin-right: 4px; }
.desk.is-v .sel__step { display: none; }
.hud__l { white-space: nowrap; }

/* landscape phones: the top bar scrolls away so the panel can use the whole screen height */
@media (max-height: 499.98px) and (orientation: landscape) {
  .topbar { position: absolute; }
  html { scroll-padding-top: 0; }
  .game { scroll-margin-top: 0; }
}

/* 3D train preview (fixed green for everything 3D, as on the DSB page) */
.btn--3d { background: #0f7b6c; color: #fff; border: 1px solid rgba(255, 255, 255, .12); }
@media (hover: hover) { .btn--3d:not([disabled]):hover { background: #0b5e53; } }
.mv { position: relative; margin-top: 12px; border-radius: 12px; overflow: hidden; border: 1px solid var(--line); background: radial-gradient(80% 70% at 50% 40%, #2a2f38 0%, #121418 100%); aspect-ratio: 16 / 11; }
@supports not (aspect-ratio: 1) { .mv { height: 300px; } }
.mv__host { position: absolute; inset: 0; }
.mv__host canvas { cursor: grab; }
.mv__host canvas:active { cursor: grabbing; }
.mv__msg { position: absolute; inset: 0; display: grid; place-items: center; padding: 16px; text-align: center; font-size: 14px; color: var(--muted); pointer-events: none; }
.mv__hint { margin-top: 8px; font-size: 13px; color: var(--faint); }
.mv-dep { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; margin: 0 0 12px; padding: 10px 14px; border: 1px solid var(--line, #2a2e37); border-left: 3px solid #fac828; border-radius: 10px; background: rgba(250, 200, 40, .06); font-size: 14px; }
.mv-dep__l { text-transform: uppercase; letter-spacing: .06em; font-size: 12px; font-weight: 700; opacity: .75; }
.mv-dep__t { font-family: var(--board); font-size: 22px; color: #fac828; line-height: 1; }
.mv-dep__r { color: var(--text); }
.mv-dep__c { margin-left: auto; font-family: var(--board); font-size: 16px; color: var(--text); white-space: nowrap; }
.mv-dep--warn { border-left-color: #e8a33a; }
@media (max-width: 520px) { .mv-dep__c { margin-left: 0; flex-basis: 100%; white-space: normal; } }
.mv-facts { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 10px; font-size: 14px; }
.mv-facts span b { color: var(--text); font-family: var(--board); font-size: 16px; }
@media (min-width: 600px) { .sheet__card--wide { max-width: 760px; } }

/* ---------- Platform cameras (copy 2): stills of Darren's København H with live 3D trains ---------- */
.sel { grid-template-areas: "main" "cam" "act"; }
.sel__main { grid-area: main; min-width: 0; }
.sel__act { grid-area: act; }
.cam { grid-area: cam; min-width: 0; }
.cam__scr { position: relative; aspect-ratio: 16 / 9; border-radius: 10px; overflow: hidden; background: #050607; border: 1px solid var(--line-2); isolation: isolate; }
@supports not (aspect-ratio: 16 / 9) { .cam__scr { height: 0; padding-top: 56.25%; } }
.cam__poster, .cam__host, .cam__cv { position: absolute; inset: 0; width: 100%; height: 100%; }
.cam__poster { object-fit: cover; filter: saturate(.86) brightness(.82); }
.cam__cv { display: block; filter: saturate(.9) contrast(1.04); }
.cam__glitch { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; pointer-events: none; z-index: 1; image-rendering: pixelated; }
.cam__host:empty { display: none; }
.cam__scr::after { content: ""; position: absolute; inset: 0; pointer-events: none; z-index: 2;
  background: repeating-linear-gradient(to bottom, rgba(0, 0, 0, .10) 0 1px, transparent 1px 3px), radial-gradient(ellipse at center, transparent 55%, rgba(0, 0, 0, .38) 100%); }
.cam__osd { position: absolute; left: 0; right: 0; top: 0; z-index: 3; display: flex; justify-content: space-between; gap: 8px; padding: 6px 9px;
  font: 700 11px/1.2 ui-monospace, "SFMono-Regular", Menlo, Consolas, "Liberation Mono", monospace; letter-spacing: .06em; color: rgba(255, 255, 255, .88); text-shadow: 0 1px 2px rgba(0, 0, 0, .9); pointer-events: none; white-space: nowrap; }
.cam__osd--b { top: auto; bottom: 0; }
.cam__osd--b { padding-right: 84px; }
.cam__osd--b > span { overflow: hidden; text-overflow: ellipsis; }
.cam__rec { display: inline-flex; align-items: center; gap: 5px; }
.cam__rec i { width: 7px; height: 7px; border-radius: 50%; background: #e0302c; box-shadow: 0 0 6px rgba(224, 48, 44, .8); animation: camrec 1.6s steps(1) infinite; }
@keyframes camrec { 50% { opacity: .25; } }
.cam__on { position: absolute; z-index: 4; left: 50%; top: 50%; transform: translate(-50%, -50%); display: grid; justify-items: center; gap: 2px; max-width: calc(100% - 24px);
  padding: 10px 16px; border-radius: 12px; border: 1px solid rgba(255, 255, 255, .16); background: #0f7b6c; color: #fff; font: 700 15px/1.25 var(--font); cursor: pointer; box-shadow: 0 8px 24px rgba(0, 0, 0, .45); }
.cam__on .i { width: 22px; height: 22px; fill: currentColor; }
.cam__on small { font-weight: 500; font-size: 12.5px; color: rgba(255, 255, 255, .85); }
@media (hover: hover) { .cam__on:hover { background: #0b5e53; } }
.cam__msg { position: absolute; z-index: 4; left: 50%; bottom: 30px; transform: translateX(-50%); margin: 0; max-width: calc(100% - 20px); padding: 5px 10px; border-radius: 8px;
  background: rgba(8, 10, 13, .82); color: #e9ecef; font-size: 12.5px; line-height: 1.35; text-align: center; }
.cam__msg button { margin-left: 6px; padding: 2px 8px; border-radius: 6px; border: 1px solid rgba(255, 255, 255, .3); background: transparent; color: #fff; font: inherit; font-weight: 700; cursor: pointer; }
.cam__tools { position: absolute; z-index: 4; right: 6px; bottom: 6px; display: flex; gap: 6px; }
.cam__tools[hidden] { display: none; }
.cam__ic { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 9px; border: 1px solid rgba(255, 255, 255, .2); background: rgba(8, 10, 13, .62); color: #fff; cursor: pointer; }
.cam__ic .i { width: 18px; height: 18px; fill: currentColor; }
.cam__ic[aria-pressed="false"]#cam-snd { color: var(--muted); }
@media (hover: hover) { .cam__ic:hover { background: rgba(8, 10, 13, .85); border-color: rgba(255, 255, 255, .4); } }
.cam__bar { display: flex; gap: 6px; margin-top: 8px; }
.cam__tab { flex: 1 1 0; min-width: 0; height: 36px; padding: 0 6px; border-radius: 9px; border: 1px solid var(--line-2); background: var(--bg-3); color: var(--muted);
  font: 700 13px/1 var(--font); cursor: pointer; white-space: nowrap; }
.cam__tab.is-on { background: #0f7b6c; border-color: #0f7b6c; color: #fff; }
@media (hover: hover) { .cam__tab:not(.is-on):hover { border-color: rgba(255, 255, 255, .34); color: #fff; } }
.cam__tab:focus-visible, .cam__ic:focus-visible, .cam__on:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
/* larger view: the same screen, lifted over the page; the shift keeps running */
.cam-back { position: fixed; inset: 0; z-index: 70; background: rgba(4, 5, 7, .78); }
.cam.is-big .cam__scr { position: fixed; z-index: 71; left: 50%; top: 50%; transform: translate(-50%, -50%);
  width: min(calc(100vw - 24px - env(safe-area-inset-left) - env(safe-area-inset-right)), calc((100vh - 120px) * 16 / 9), 1100px); height: auto; box-shadow: 0 20px 60px rgba(0, 0, 0, .6); }
.cam.is-big .cam__scr { top: calc(50% - 30px); }
.cam.is-big .cam__osd { font-size: 13px; padding: 9px 12px; }
.cam.is-big .cam__bar { position: fixed; z-index: 71; left: 50%; transform: translateX(-50%); bottom: max(14px, env(safe-area-inset-bottom)); width: min(520px, calc(100vw - 24px)); flex-direction: row; margin: 0; gap: 6px; display: flex; }
.cam.is-big .cam__tab { height: 40px; font-size: 14px; }
@media (min-width: 600px) {
  .sel { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "main act" "cam cam"; }
}
@media (min-width: 960px) {
  .sel { grid-template-columns: minmax(0, 1fr) 352px auto; grid-template-areas: "main cam act"; align-items: center; }
  .cam { display: grid; grid-template-columns: minmax(0, 1fr) 50px; gap: 6px; align-items: stretch; }
  .cam__bar { flex-direction: column; margin-top: 0; gap: 4px; }
  .cam__tab { height: auto; min-height: 0; font-size: 12.5px; padding: 0 4px; }
}
@media (prefers-reduced-motion: reduce) { .cam__rec i { animation: none; } }
/* short landscape phones: the camera never taller than the screen */
@media (max-height: 499.98px) and (orientation: landscape) {
  .cam__scr { max-width: calc((100vh - 76px) * 16 / 9); margin: 0 auto; }
  .cam__bar { max-width: calc((100vh - 76px) * 16 / 9); margin-left: auto; margin-right: auto; }
  .cam.is-big .cam__scr { top: calc(50% - 26px); width: min(calc(100vw - 24px - env(safe-area-inset-left) - env(safe-area-inset-right)), calc((100vh - 84px) * 16 / 9)); }
  .cam.is-big .cam__tab { height: 34px; }
}

/* ---------- language switch (same as the DSB page and the landing page) ---------- */
.sr { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.so-lang { flex: none; display: inline-flex; padding: 3px; border: 1px solid var(--line-2); border-radius: 999px; }
.so-lang button { position: relative; min-width: 40px; min-height: 34px; padding: 0 9px; border: 0; border-radius: 999px; background: transparent; color: var(--muted); font: inherit; font-size: 13px; font-weight: 700; letter-spacing: .06em; cursor: pointer; -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
.so-lang button::after { content: ""; position: absolute; inset: -4px 0; }
.so-lang button[aria-pressed="true"] { background: var(--text); color: var(--bg); }
.so-lang button:focus-visible { outline: 2px solid var(--red-2); outline-offset: 2px; }
@media (hover: hover) { .so-lang button:not([aria-pressed="true"]):hover { color: var(--text); } }
@media (max-width: 479px) { .tb-link { padding: 0 11px; font-size: 13px; } .so-lang button { min-width: 36px; padding: 0 7px; } }
@media (max-width: 389px) { .plate--preview { display: none; } }

/* the guided first train: a card at the foot of the screen, the part it talks about outlined in yellow */
.btn--light { background: #f2f4f7; color: #0c0e12; border: 1px solid #f2f4f7; }
@media (hover: hover) { .btn--light:hover { background: #fff; } }
.start__guide { width: 100%; margin-top: 10px; }
.tut { position: fixed; z-index: 60; left: 12px; right: 12px; bottom: calc(12px + env(safe-area-inset-bottom, 0px)); margin: 0 auto; max-width: 480px; padding: 14px 16px 12px; border-radius: 14px; background: rgba(18, 20, 25, .97); border: 1px solid rgba(255, 233, 74, .55); box-shadow: 0 18px 50px -12px rgba(0, 0, 0, .95); color: #e9ecef; animation: tin .25s var(--ease) both; }
.tut[hidden] { display: none; }
.tut__e { margin: 0 0 4px; font-size: 11.5px; font-weight: 750; letter-spacing: .14em; text-transform: uppercase; color: var(--yellow); }
.tut__t { margin: 0; font-size: 15px; line-height: 1.45; }
.tut__t b { color: #fff; }
.tut__row { display: flex; align-items: center; gap: 14px; margin-top: 10px; }
.tut__row .btn[hidden] { display: none; }
.tut__skip { margin-left: auto; padding: 8px 2px; background: none; border: 0; color: var(--muted); font: inherit; font-size: 13.5px; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; min-height: 40px; }
.tut__skip[hidden] { display: none; }
.tut.is-small .tut__t { font-size: 14px; }
.tut-hi { outline: 3px solid var(--yellow); outline-offset: 3px; border-radius: 10px; transition: outline-color .2s; }
@media (min-width: 1100px) { .tut { left: auto; right: 24px; margin: 0; } }
@media (max-width: 520px) { .tut { padding: 12px 14px 8px; } .tut__t { font-size: 14.5px; line-height: 1.4; } .tut__row { margin-top: 6px; } }
/* the top bar's "needs you" strip: the trains waiting for you, most urgent first, each with its countdown.
   One colour language everywhere: red = it needs you now, amber = soon, green or grey = in hand. Calm when nothing waits. */
.hud__nx { grid-column: 1 / -1; display: flex; align-items: stretch; min-width: 0; border-top: 1px solid var(--line); background: #0f1115; }
.hud__nx:empty { display: none; }
.nd__h { flex: none; display: flex; align-items: center; padding: 0 10px; font-size: 10.5px; font-weight: 750; letter-spacing: .12em; text-transform: uppercase; color: var(--faint); border-right: 1px solid var(--line); white-space: nowrap; }
.nd__h.is-need { color: #ff6b7d; }
.nd { position: relative; flex: 1 1 0; min-width: 0; display: flex; align-items: center; gap: 8px; min-height: 40px; padding: 4px 10px 4px 13px; border: 0; background: transparent; color: var(--text); text-align: left; cursor: pointer; -webkit-tap-highlight-color: transparent; touch-action: manipulation; font: inherit; }
.nd::before { content: ""; position: absolute; left: 0; top: 7px; bottom: 7px; width: 3px; border-radius: 2px; background: var(--line-2); }
.nd.is-red::before { background: var(--red-2); }
.nd.is-amber::before { background: var(--amber); }
.nd.is-calm::before { background: var(--green); opacity: .7; }
.nd + .nd { border-left: 1px solid var(--line); }
.nd:nth-of-type(n+2) { display: none; }
.nd.is-sel { box-shadow: inset 0 -3px 0 var(--yellow); }
@media (hover: hover) { .nd:hover { background: rgba(255, 255, 255, .05); } }
.nd:focus-visible, .nd__more:focus-visible { outline: 3px solid var(--yellow); outline-offset: -3px; }
.nd__n { flex: none; font: 700 16px/1 var(--board); color: #fff; white-space: nowrap; }
.nd__a { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font: 500 15px/1.1 var(--board); color: var(--muted); }
.nd__c { flex: none; margin-left: auto; font-style: normal; font-variant: normal; font-weight: 700; font-stretch: normal; font-size: 16px; line-height: 1; font-family: var(--board); font-variant-numeric: tabular-nums; color: #fff; }
.nd.is-red .nd__c { color: #ff6b7d; }
.nd.is-amber .nd__c { color: var(--amber); }
.nd__none { display: flex; align-items: center; padding: 4px 12px; min-height: 40px; font: 500 15px/1.2 var(--board); color: var(--faint); }
.nd__more { flex: none; display: flex; align-items: center; justify-content: center; min-width: 44px; padding: 0 10px; border: 0; border-left: 1px solid var(--line); background: transparent; color: #ff6b7d; font: 700 15px/1 var(--board); cursor: pointer; -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
.nd__more[hidden] { display: none; }
@media (min-width: 700px) { .nd:nth-of-type(2) { display: flex; } }
@media (min-width: 1100px) { .nd:nth-of-type(3) { display: flex; } }
@media (max-width: 599.98px) { .nd { gap: 7px; padding: 4px 8px 4px 11px; } .nd__h { padding: 0 8px; font-size: 9.5px; } }
/* during the shift the bar stays under the site's top bar while the page scrolls */
.game.is-live .hud { position: -webkit-sticky; position: sticky; top: var(--tbh, 61px); z-index: 30; box-shadow: 0 10px 24px -18px #000; }
@media (max-width: 599.98px) {
  .hud__btns { padding: 0 2px; gap: 0; }
  .hbtn { min-width: 34px; padding: 0 3px; }
  .hbtn .i { width: 18px; height: 18px; }
  .hbtn--speed span { font-size: 13px; }
}
@media (max-width: 359.98px) { .hud__stat { padding: 6px 5px; } .hud__v { font-size: 17px; } .hud__v small { font-size: 13px; } .hud__clock { font-size: 20px; padding: 8px 7px; } }

/* phones: restart lives on the pause card, so the bar keeps clock, score, on time, pause, speed and sound readable */
@media (max-width: 599.98px) {
  #b-restart { display: none; }
  .hud__l { letter-spacing: .06em; }
  .hud__stat { padding: 6px 6px; }
  .hud__clock { padding: 8px 8px; }
}
@media (max-width: 379.98px) { .hud__sq { display: none; } .hud__l { font-size: 9px; letter-spacing: .04em; } }
@media (min-width: 840px) { .hud { grid-template-columns: auto 1fr 1fr 1fr auto; } .hud__stat--wide { display: flex; } }
@media (max-width: 339.98px) { .hud__l { font-size: 8.5px; letter-spacing: 0; } .hud__stat { padding: 6px 4px; } }

/* station announcements: under the shift bar, over the top of the plan, so they are seen wherever the page is scrolled */
.hud { position: relative; overflow: visible; }
.hud__clock { border-top-left-radius: calc(var(--radius) - 1px); }
.pa { position: absolute; left: 10px; right: 10px; top: calc(100% + 8px); z-index: 31; display: flex; align-items: flex-start; gap: 10px; max-width: 640px; margin: 0 auto; padding: 9px 14px 10px; border-radius: 10px; background: #155a94; border: 1px solid #2c86da; box-shadow: 0 14px 34px -14px rgba(0, 0, 0, .9); color: #fff; pointer-events: none; }
.pa[hidden] { display: none; }
.pa .i { flex: none; width: 20px; height: 20px; margin-top: 2px; color: var(--yellow); }
.pa__t { margin: 0; font: 500 16px/1.3 var(--board); }
.pa__e { display: block; font: 700 11px/1.3 var(--font); letter-spacing: .14em; text-transform: uppercase; color: rgba(255, 255, 255, .78); margin-bottom: 1px; }
.pa.is-in { animation: tin .3s var(--ease) both; }
.pa.is-out { animation: tout .3s ease both; }
@media (prefers-reduced-motion: reduce) { .pa.is-in, .pa.is-out { animation: none; } }
@media (max-height: 500px) { .game.is-live .hud { position: relative; top: auto; } } /* landscape phones: the bar scrolls with the page, the plan keeps the room */

/* ---------- Boards: black, like the screens in a signal box ---------- */
.board, .board--arr { --cb-band-1: #050505; --cb-band-2: #0d0e10; --cb-bar: #000; --cb-hover: #1a1d22; --cb-label: rgba(255, 255, 255, .62); --cb-soft: rgba(255, 255, 255, .8); --cb-frame: #000; background: #050505; }
.board::after { display: none; }
.board .board__head, .board--arr .board__head { background: #000; border-bottom: 1px solid #1f2227; }
.board__foot { border-top: 1px solid #1f2227; }
.brow + .brow { border-top: 1px solid #16181c; }

/* the button that opens the full timetable */
.ttopen { display: flex; align-items: center; gap: 12px; width: 100%; margin: 16px 0 0; padding: 12px 14px; min-height: 56px; border: 1px solid #2a2e35; border-radius: 12px; background: #000; color: #fff; text-align: left; cursor: pointer; font: inherit; -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
.ttopen > .i { flex: none; width: 24px; height: 24px; color: var(--yellow); }
.ttopen span { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.ttopen b { font: 700 18px/1.15 var(--board); }
.ttopen small { font-size: 13px; line-height: 1.35; color: var(--muted); }
.ttopen__chev { flex: none; width: 20px; height: 20px; color: var(--muted); }
@media (hover: hover) { .ttopen:hover { border-color: #4a505a; background: #08090b; } }
.ttopen:focus-visible { outline: 3px solid var(--yellow); outline-offset: 2px; }

/* ---------- Timetable: full screen, black ---------- */
html.tt-on, html.tt-on body { overflow: hidden; }
.tt { position: fixed; inset: 0; z-index: 200; display: flex; flex-direction: column; background: #000; color: #f2f3f5; font-family: var(--board);
  padding: env(safe-area-inset-top, 0px) env(safe-area-inset-right, 0px) env(safe-area-inset-bottom, 0px) env(safe-area-inset-left, 0px); overscroll-behavior: contain; }
.tt[hidden] { display: none; }
.tt__top { flex: none; display: flex; align-items: center; gap: 12px; padding: 10px 8px 10px 16px; border-bottom: 1px solid #1f2227; }
.tt__title { flex: 1; min-width: 0; display: flex; align-items: center; gap: 9px; }
.tt__title h2 { margin: 0; font: 700 22px/1.1 var(--board); letter-spacing: .01em; }
.tt__sub { font: 500 16px/1 var(--board); color: #8b919b; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tt__clock { flex: none; padding: 4px 8px; border: 1px solid rgba(255, 255, 255, .5); border-radius: 3px; font-style: normal; font-variant: normal; font-weight: 700; font-stretch: normal; font-size: 20px; line-height: 1; font-family: var(--board); font-variant-numeric: tabular-nums; }
.tt__x { flex: none; display: grid; place-items: center; width: 44px; height: 44px; border: 0; border-radius: 10px; background: transparent; color: #fff; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.tt__x .i { width: 24px; height: 24px; }
@media (hover: hover) { .tt__x:hover { background: #15171b; } }
.tt__x:focus-visible, .tt__tab:focus-visible, .ttr__a:focus-visible, .ttp:focus-visible { outline: 3px solid var(--yellow); outline-offset: -3px; }
.tt__sum { flex: none; display: flex; flex-wrap: wrap; gap: 6px 16px; padding: 9px 16px; border-bottom: 1px solid #1f2227; font: 500 15px/1.2 var(--board); color: #b9bec6; }
.tts b { font-weight: 700; color: #fff; font-variant-numeric: tabular-nums; }
.tts.is-act { color: #ff5a67; } .tts.is-act b { color: #ff5a67; }
.tts.is-ok { color: var(--green); } .tts.is-ok b { color: var(--green); }
/* the platforms at a glance: who stands where */
.tt__plats { flex: none; display: grid; grid-auto-flow: column; grid-auto-columns: minmax(64px, 1fr); gap: 6px; padding: 10px 16px; overflow-x: auto; scrollbar-width: none; border-bottom: 1px solid #1f2227; }
.tt__plats::-webkit-scrollbar { display: none; }
.ttp { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; min-height: 58px; padding: 6px 8px; border: 1px solid #23262c; border-radius: 6px; background: #08090b; color: #8b919b; font: inherit; text-align: left; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.ttp[disabled] { cursor: default; }
.ttp__sp { min-width: 24px; padding: 2px 5px 1px; border-radius: 3px; background: #dfe4ea; color: #0c0e12; font: 800 14px/1 var(--board); text-align: center; }
.ttp__t { display: flex; flex-direction: column; font: 700 14px/1.15 var(--board); color: #fff; white-space: nowrap; }
.ttp__t small { font-style: normal; font-variant: normal; font-weight: 500; font-stretch: normal; font-size: 12.5px; line-height: 1.2; font-family: var(--board); color: #9aa0a9; font-variant-numeric: tabular-nums; }
.ttp.is-free .ttp__t { color: #6d737c; font-weight: 500; }
.ttp.is-occ { border-color: #3a3f47; background: #111317; }
.ttp.is-inc { border-color: rgba(47, 191, 113, .55); }
.ttp.is-inc small { color: var(--green); }
.ttp.is-act { border-color: #ff5a67; background: rgba(255, 90, 103, .12); }
.ttp.is-act small { color: #ff5a67; }
.ttp.is-closed { border-style: dashed; border-color: rgba(242, 179, 61, .6); }
.ttp.is-closed .ttp__sp { background: var(--amber); }
.ttp.is-closed .ttp__t { color: var(--amber); }
.tt__tabs { flex: none; display: grid; grid-template-columns: 1fr 1fr; border-bottom: 1px solid #1f2227; }
.tt__tab { position: relative; min-height: 48px; border: 0; background: transparent; color: #8b919b; font: 700 17px/1 var(--board); letter-spacing: .02em; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.tt__tab b { display: inline-block; min-width: 22px; margin-left: 4px; padding: 3px 5px 2px; border-radius: 10px; background: #1b1e23; color: #d4d8de; font-size: 13px; font-variant-numeric: tabular-nums; }
.tt__tab[aria-selected="true"] { color: #fff; box-shadow: inset 0 -3px 0 var(--yellow); }
.tt__tab.is-act::after { content: ""; position: absolute; top: 10px; right: 12px; width: 8px; height: 8px; border-radius: 50%; background: #ff5a67; box-shadow: 0 0 0 3px rgba(255, 90, 103, .25); }
.tt__body { flex: 1; min-height: 0; overflow-y: auto; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; }
.tt__pane { display: none; }
.tt__pane.is-on { display: block; }
.tt__ph { display: none; }
.tt__cols { display: none; }
.tt__rows { margin: 0; padding: 0; list-style: none; }
.ttr { position: relative; border-bottom: 1px solid #15171a; }
.ttr__a { display: grid; width: 100%; grid-template-columns: 50px minmax(0, 1fr) 38px; grid-template-areas: "t n sp" "t2 m sp" ". l l" ". st st"; column-gap: 10px; row-gap: 2px; padding: 10px 16px 11px; border: 0; background: transparent; color: inherit; text-align: left; font: inherit; cursor: pointer; -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
@media (hover: hover) { .ttr__a:hover { background: #0e1013; } }
.ttr__a:active { background: #14171b; }
.ttr__t { grid-area: t; font-style: normal; font-variant: normal; font-weight: 700; font-stretch: normal; font-size: 19px; line-height: 1.15; font-family: var(--board); font-variant-numeric: tabular-nums; }
.ttr__t2 { grid-area: t2; font-style: normal; font-variant: normal; font-weight: 700; font-stretch: normal; font-size: 16px; line-height: 1.1; font-family: var(--board); font-variant-numeric: tabular-nums; color: var(--yellow); }
.ttr__n { grid-area: n; font: 700 18px/1.2 var(--board); }
.ttr__m { grid-area: m; font: 500 15px/1.3 var(--board); color: #c9cdd3; }
.ttr__l { grid-area: l; font: 500 13.5px/1.3 var(--board); color: #7d838c; }
.ttr__sp { grid-area: sp; align-self: start; justify-self: center; min-width: 32px; padding: 4px 5px 3px; border-radius: 4px; background: #dfe4ea; color: #0c0e12; font-style: normal; font-variant: normal; font-weight: 800; font-stretch: normal; font-size: 18px; line-height: 1; font-family: var(--board); text-align: center; font-variant-numeric: tabular-nums; }
.ttr__st { grid-area: st; margin-top: 3px; font: 700 15px/1.3 var(--board); color: #d4d8de; }
.ttr.is-ch .ttr__sp { background: var(--yellow); }
.ttr.is-warn .ttr__st { color: var(--yellow); }
.ttr.is-ok .ttr__st { color: var(--green); }
.ttr.is-act { background: rgba(255, 90, 103, .07); }
.ttr.is-act::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: #ff5a67; }
.ttr.is-act .ttr__st { color: #ff5a67; }
.ttr.is-done { opacity: .5; }
.ttr.is-done .ttr__sp { background: #5a6069; }
.ttr.is-bad .ttr__st { color: #ff5a67; }
.ttr.is-sel .ttr__a { box-shadow: inset 0 0 0 2px var(--yellow); }
.tt__foot { flex: none; margin: 0; padding: 10px 16px; border-top: 1px solid #1f2227; font: 500 14px/1.35 var(--board); color: #8b919b; }
@media (prefers-reduced-motion: no-preference) { .tt:not([hidden]) { animation: ttIn .16s var(--ease); } @keyframes ttIn { from { opacity: 0; } to { opacity: 1; } } }
/* tablets and PCs: inbound and outbound side by side, each with its own columns */
@media (min-width: 900px) {
  .tt__top { padding: 14px 16px 14px 24px; }
  .tt__title h2 { font-size: 26px; }
  .tt__sum, .tt__plats, .tt__foot { padding-left: 24px; padding-right: 24px; }
  .tt__plats { grid-auto-flow: row; grid-template-columns: repeat(9, minmax(0, 1fr)); overflow: visible; }
  .tt__tabs { display: none; }
  .tt__body { display: grid; grid-template-columns: 1fr 1fr; overflow: hidden; }
  .tt__pane, .tt__pane.is-on { display: flex; flex-direction: column; min-height: 0; overflow-y: auto; overscroll-behavior: contain; }
  .tt__pane + .tt__pane { border-left: 1px solid #23262c; }
  .tt__ph { display: flex; align-items: baseline; gap: 10px; position: sticky; top: 0; z-index: 2; margin: 0; padding: 12px 24px 6px; background: #000; font: 700 21px/1 var(--board); }
  .tt__ph small { font: 500 15px/1 var(--board); color: #8b919b; }
  .tt__cols { display: grid; position: sticky; top: 39px; z-index: 2; grid-template-columns: 54px minmax(0, 1fr) 40px minmax(120px, .8fr); column-gap: 12px; padding: 6px 24px 7px; background: #000; border-bottom: 1px solid #23262c; font: 500 13px/1.2 var(--board); color: #7d838c; text-transform: uppercase; letter-spacing: .06em; }
  .tt__cols span:nth-child(3) { text-align: center; }
  .ttr__a { grid-template-columns: 54px minmax(0, 1fr) 40px minmax(120px, .8fr); grid-template-areas: "t n sp st" "t2 m sp st" ". l sp st"; column-gap: 12px; padding: 10px 24px 11px; }
  .ttr__st { margin-top: 0; align-self: start; }
}
@media (min-width: 1400px) { .tt__body { max-width: 1600px; width: 100%; margin: 0 auto; } }

/* ---------- Shift picker on the start card ---------- */
.shifts { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 14px; }
.shift { position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 2px; min-height: 84px; padding: 10px 11px 10px; border: 1px solid var(--line-2); border-radius: 11px; background: rgba(255, 255, 255, .03); color: var(--text); text-align: left; font: inherit; cursor: pointer; -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
.shift__t { font-style: normal; font-variant: normal; font-weight: 700; font-stretch: normal; font-size: 15px; line-height: 1; font-family: var(--board); color: var(--muted); font-variant-numeric: tabular-nums; }
.shift__n { font: 700 18px/1.1 var(--board); }
.shift__d { font-size: 12.5px; line-height: 1.3; color: var(--muted); }
.shift__b { margin-top: 2px; font: 700 12.5px/1 var(--board); color: var(--green); }
.shift.is-on { border-color: var(--yellow); background: rgba(255, 233, 74, .08); box-shadow: inset 0 0 0 1px var(--yellow); }
.shift.is-on .shift__t { color: var(--yellow); }
@media (hover: hover) { .shift:not(.is-on):hover { border-color: #4a505a; background: rgba(255, 255, 255, .06); } }
.shift:focus-visible { outline: 3px solid var(--yellow); outline-offset: 2px; }
@media (min-width: 560px) { .start__card { max-width: 560px; } .shifts { gap: 10px; } .shift { min-height: 96px; padding: 12px 14px; } } /* two by two: room for the name, the line and the record (Darren 19-11: four across was too tight) */
/* HUD: on time and level */
#ontime.is-amber { color: var(--amber); }
#ontime.is-red { color: var(--red-2); }
.res__share { margin: 14px 0 0; padding: 12px 14px; border-left: 3px solid var(--yellow); background: rgba(255, 255, 255, .04); border-radius: 0 8px 8px 0; font-size: 14.5px; line-height: 1.45; color: #dfe3e8; }
/* three counters on every screen (score, on time, level); trains sent joins them on wide screens */
.hud { grid-template-columns: auto 1fr 1fr .8fr auto; }
@media (min-width: 840px) { .hud { grid-template-columns: auto 1fr 1fr 1fr 1fr auto; } }
@media (max-width: 419.98px) { .hud__stat { padding: 6px 6px; } .hud__stat--lv .hud__l { letter-spacing: .04em; } }
@media (max-width: 419.98px) {
  .hud__sq { display: none; }
  .hud__clock { padding: 8px 8px; font-size: 22px; }
  .hud__l { font-size: 9px; letter-spacing: .05em; white-space: nowrap; overflow: hidden; text-overflow: clip; }
  .hud__v { font-size: 18px; }
}
.hud__lvm { display: none; }
@media (max-width: 419.98px) {
  .hud { grid-template-columns: auto 1fr 1fr auto; }
  .hud__stat--lv { display: none; }
  .hud__clock { position: relative; flex-direction: column; align-items: flex-start; justify-content: center; gap: 2px; }
  .hud__clock #clock { line-height: 1; }
  .hud__lvm { display: block; font: 700 10px/1 var(--font); letter-spacing: .08em; text-transform: uppercase; color: rgba(255, 255, 255, .85); }
  .hud__lvm b { font: 700 12px/1 var(--board); color: #fff; letter-spacing: 0; }
  .hud__l { font-size: 9.5px; letter-spacing: .08em; }
}
/* how many trains need the dispatcher now, on the timetable button */
#b-tt { position: relative; }
.hbtn__n { position: absolute; top: 4px; right: 1px; min-width: 17px; height: 17px; padding: 0 4px; border-radius: 9px; background: #e5293b; color: #fff; font: 800 11px/17px var(--board); text-align: center; box-shadow: 0 0 0 2px var(--bg-2); pointer-events: none; }
.tts.is-warn { color: var(--amber); }
.tts--lv { margin-left: auto; color: #8b919b; }
@media (max-width: 899.98px) { .tts--lv { margin-left: 0; } }
/* phones on their side: the lists keep the room */
@media (max-height: 520px) {
  .tt__top { padding: 4px 8px 4px 16px; }
  .tt__title h2 { font-size: 18px; }
  .tt__clock { font-size: 16px; padding: 3px 6px; }
  .tt__x { width: 40px; height: 40px; }
  .tt__sum { padding: 5px 16px; font-size: 14px; }
  .tt__plats { padding: 6px 16px; gap: 5px; grid-auto-columns: minmax(84px, 1fr); }
  .ttp { flex-direction: row; align-items: center; gap: 6px; min-height: 36px; padding: 4px 6px; }
  .ttp__t { font-size: 13px; }
  .tt__tabs { display: none; }
  .tt__body { display: grid; grid-template-columns: 1fr 1fr; overflow: hidden; }
  .tt__pane, .tt__pane.is-on { display: block; min-height: 0; overflow-y: auto; overscroll-behavior: contain; }
  .tt__pane + .tt__pane { border-left: 1px solid #23262c; }
  .tt__ph { display: flex; position: sticky; top: 0; z-index: 2; margin: 0; padding: 6px 12px; background: #000; font: 700 16px/1 var(--board); border-bottom: 1px solid #23262c; }
  .ttr__a { padding: 7px 12px 8px; grid-template-columns: 46px minmax(0, 1fr) 34px; }
  .ttr__l { display: none; }
  .tt__foot { display: none; }
}

/* copy 14: one colour language for every message (red: needs you now, amber: watch it, green: done well), and on phones
   one slim message line over the plan instead of stacked boxes */
.toast { border-left-width: 4px; }
.toast--bad { border-left-color: var(--red-2); }
.toast--warn { border-left-color: var(--amber); }
.toast--good { border-left-color: var(--green); }
#ontime.is-none { font-size: 14px; font-weight: 600; color: var(--muted); white-space: nowrap; }
@media (max-width: 599.98px) {
  .toasts { left: 6px; right: 6px; top: calc(100% + 6px); transform: none !important; }
  .toast { width: 100%; max-width: none; padding: 7px 10px; border-radius: 8px; font-size: 13.5px; line-height: 1.3; text-align: left; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
  .toast:not(:last-child) { display: none; }
  .pa { left: 6px; right: 6px; top: calc(100% + 6px); padding: 7px 10px; gap: 8px; border-radius: 8px; }
  .pa .i { width: 16px; height: 16px; margin-top: 1px; }
  .pa__t { font-size: 14px; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
  .pa__e { display: none; }
  .game.toast-on .pa { visibility: hidden; }
  #ontime.is-none { font-size: 12px; }
}

/* copy 14 timetable: one colour language (amber = watch it), the need-you count in words on each tab,
   phones in portrait: two-line rows (8 to 9 trains in sight) and all nine platforms on two rows of tiles */
.ttr.is-warn .ttr__st { color: var(--amber); }
.ttr__f { display: none; }
.tt__tab.is-act::after { display: none; }
.tt__need { font: 700 14px/1 var(--board); color: #ff5a67; letter-spacing: 0; }
.tt__need[hidden] { display: none; }
@media (max-width: 899.98px) and (orientation: portrait), (max-width: 599.98px) {
  .tt__top { padding: 6px 6px 6px 14px; }
  .tt__title h2 { font-size: 20px; }
  .tt__sum { padding: 6px 14px; gap: 4px 12px; font-size: 14px; }
  .tt__plats { display: grid; grid-auto-flow: row; grid-template-columns: repeat(5, minmax(0, 1fr)); grid-auto-columns: auto; gap: 5px; padding: 8px 14px; overflow: visible; }
  .ttp { flex-direction: column; align-items: flex-start; gap: 3px; min-height: 46px; padding: 4px 5px; min-width: 0; }
  .ttp__t, .ttp__t small { max-width: 100%; text-overflow: ellipsis; }
  .ttp__sp { min-width: 22px; font-size: 13px; padding: 2px 4px 1px; }
  .ttp__t { min-width: 0; font-size: 12.5px; overflow: hidden; }
  .ttp__t small { font-size: 11.5px; }
  .tt__tab { min-height: 44px; font-size: 16px; }
  .ttr__a { grid-template-columns: 46px auto minmax(0, 1fr) 34px; grid-template-areas: "t n f sp" "t2 st st sp"; column-gap: 8px; row-gap: 3px; padding: 7px 14px 8px; }
  .ttr__m, .ttr__l { display: none; }
  .ttr__f { display: block; grid-area: f; align-self: center; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font: 500 15px/1.2 var(--board); color: #c9cdd3; }
  .ttr__t { font-size: 18px; }
  .ttr__n { font-size: 17px; white-space: nowrap; }
  .ttr__st { margin-top: 0; font-size: 14.5px; line-height: 1.25; }
  .ttr__sp { font-size: 17px; min-width: 30px; }
  .tt__foot { padding: 8px 14px; font-size: 13px; }
}

/* copy 14 change platform: every spor says what matters (free until, taken by, closed); Recommended marked in green */
.chip { position: relative; min-height: 64px; padding: 8px 6px; gap: 3px; }
.chip b { font: 700 17px/1 var(--board); }
.chip small { font: 500 12.5px/1.2 var(--board); text-align: center; }
.chip.is-bad small { color: var(--muted); }
.chip.is-rec { border-color: var(--green); background: rgba(47, 191, 113, .1); }
.chip.is-rec small { color: #7fe0a8; }
.chip__rec { position: absolute; top: -9px; left: 50%; transform: translateX(-50%); padding: 2px 7px 1px; border-radius: 999px; background: var(--green); color: #05140b; font-style: normal; font-variant: normal; font-weight: 700; font-stretch: normal; font-size: 10.5px; line-height: 1.3; font-family: var(--font); font-style: normal; letter-spacing: .04em; text-transform: uppercase; white-space: nowrap; }
.chips { row-gap: 14px; padding-top: 4px; }
@media (min-width: 600px) { .chips { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
/* copy 14: the 3D view is shaped like a train, so the train fills it */
.mv { aspect-ratio: 16 / 9; }
@media (max-width: 599.98px) { .mv { aspect-ratio: 4 / 3; } }

/* copy 14 start card: how busy each shift is (lit lamps) and your best on it; the end rules folded; Start always in reach */
.shift__f { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; margin-top: auto; padding-top: 6px; }
.shift__lamps { display: inline-flex; gap: 3px; }
.shift__lamps i { width: 8px; height: 8px; border-radius: 50%; background: #2b3038; box-shadow: inset 0 0 0 1px #3a404a; }
.shift__lamps i.is-on { background: var(--amber); box-shadow: 0 0 6px rgba(242, 179, 61, .55); }
.shift__b { margin-top: 0; }
.shift__b.is-none { color: var(--faint); font-weight: 500; }
.start__rules { margin-top: 12px; border-top: 1px solid var(--line); padding-top: 4px; }
.start__rules summary { display: flex; align-items: center; gap: 8px; min-height: 40px; cursor: pointer; list-style: none; font-size: 14px; font-weight: 600; color: var(--muted); -webkit-tap-highlight-color: transparent; }
.start__rules summary::-webkit-details-marker { display: none; }
.start__rules summary::after { content: ""; width: 7px; height: 7px; margin-left: 2px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg) translateY(-2px); transition: transform .2s; }
.start__rules[open] summary::after { transform: rotate(-135deg) translateY(-1px); }
.start__rules summary:focus-visible { outline: 2px solid var(--yellow); outline-offset: 2px; border-radius: 6px; }
.start__rules .start__note { margin: 0 0 4px; text-align: left; font-size: 13.5px; line-height: 1.45; color: var(--muted); }
.start__go { margin-top: 14px; }
@media (max-width: 559.98px) {
  .start { place-items: start center; }
  .start__go { position: -webkit-sticky; position: sticky; bottom: calc(12px + env(safe-area-inset-bottom, 0px)); z-index: 2; box-shadow: 0 10px 30px -6px rgba(0, 0, 0, .9), 0 8px 24px -10px var(--red-glow); }
}

/* copy 14 result card: the score with the record in gold beside it, four tiles (never an empty one), where the points
   came from, and one tip taken from the shift itself */
.res__why { margin: 0; font-size: 15px; font-weight: 600; color: #fff; }
.res__top { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 14px; margin-top: 14px; padding: 12px 14px; border: 1px solid rgba(33, 120, 200, .45); border-radius: 12px; background: rgba(33, 120, 200, .14); }
.res__top .res__l { flex-basis: 100%; }
.res__score { font-style: normal; font-variant: normal; font-weight: 700; font-stretch: normal; font-size: 42px; line-height: 1; font-family: var(--board); color: #fff; font-variant-numeric: tabular-nums; }
.res__score.is-rec { color: #f5c542; text-shadow: 0 0 24px rgba(245, 197, 66, .35); }
.res__rec { padding: 5px 10px 4px; border-radius: 999px; background: #f5c542; color: #1a1405; font: 700 13px/1 var(--font); letter-spacing: .06em; text-transform: uppercase; }
.res__best { font: 600 15px/1 var(--board); color: var(--muted); }
.res { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
@media (min-width: 600px) { .res { grid-template-columns: repeat(4, minmax(0, 1fr)) !important; } }
.res__v { font-size: 24px; }
.res__bd { margin-top: 12px; border: 1px solid var(--line); border-radius: 10px; background: rgba(255, 255, 255, .02); }
.res__bd summary { display: flex; align-items: center; justify-content: space-between; min-height: 44px; padding: 0 12px; cursor: pointer; list-style: none; font-size: 14px; font-weight: 600; color: var(--muted); }
.res__bd summary::-webkit-details-marker { display: none; }
.res__bd summary::after { content: ""; width: 7px; height: 7px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg); transition: transform .2s; }
.res__bd[open] summary::after { transform: rotate(-135deg); }
.res__bd ul { margin: 0; padding: 0 12px 8px; list-style: none; }
.res__bd li { display: flex; justify-content: space-between; gap: 12px; padding: 5px 0; font-size: 14px; color: #d5d9df; border-top: 1px solid rgba(255, 255, 255, .05); }
.res__bd b { font-style: normal; font-variant: normal; font-weight: 700; font-stretch: normal; font-size: 15px; line-height: 1.2; font-family: var(--board); font-variant-numeric: tabular-nums; }
.res__bd b.is-p { color: var(--green); }
.res__bd b.is-m { color: #ff6b7d; }
.res__bd .res__sum { border-top: 1px solid var(--line-2); font-weight: 700; color: #fff; }
.res__tip { margin: 12px 0 0; padding: 10px 12px; border-left: 3px solid var(--green); border-radius: 0 8px 8px 0; background: rgba(47, 191, 113, .07); font-size: 14px; line-height: 1.45; color: #dfe3e8; }
.res__tip b { color: #fff; }
@media (max-width: 599.98px) {
  .toast { background: #15171c; }
  .game.nx-on .toast:not(.toast--bad) { display: none; }
}
@media (max-width: 599.98px) {
  .toast { padding-bottom: 0; border-bottom: 7px solid #15171c; box-shadow: 0 1px 0 0 var(--line-2), 0 10px 30px -12px rgba(0, 0, 0, .9); }
  .game.is-live.nx-on .desk.is-v .stepbar { position: -webkit-sticky; position: sticky; top: calc(var(--tbh, 61px) + var(--hudh, 96px)); z-index: 29; background: #1d1c14; }
  @supports (overflow: clip) { .game.is-live.nx-on .desk.is-v { overflow: clip; } }
}

/* copy 14: result tiles keep their numbers on one line even when a label wraps; buttons on one line */
.res__c { display: flex; flex-direction: column; }
.res__c .res__v { margin-top: auto; padding-top: 4px; }
.res__btns .btn { white-space: nowrap; }
@media (max-width: 419.98px) { .res__btns .btn { padding-left: 10px; padding-right: 10px; font-size: 15px; } }

/* ---------- copy 15: boards and timetable in dark grey, not black (Darren 19-11) ---------- */
.board, .board--arr { --cb-band-1: #16181c; --cb-band-2: #1b1e23; --cb-bar: #1d2025; --cb-hover: #23272d; --cb-frame: #1d2025; background: #16181c; }
.board .board__head, .board--arr .board__head { background: #1d2025; border-bottom: 1px solid #2a2e35; }
.board__foot { border-top-color: #2a2e35; }
.brow + .brow { border-top-color: #22252b; }
.ttopen { background: #16181c; }
@media (hover: hover) { .ttopen:hover { background: #1d2025; } }
.tt { background: #16181c; }
.tt__ph, .tt__cols { background: #16181c !important; }
.ttp { background: #1b1e23; }
.ttp.is-occ { background: #23262c; }
@media (hover: hover) { .ttr__a:hover { background: #1d2025; } }
.ttr__a:active { background: #23272d; }

/* ---------- copy 15: the result card leads with your shift as a card, and sharing it ---------- */
.rh { position: relative; overflow: hidden; isolation: isolate; margin-top: 14px; border: 1px solid rgba(255, 255, 255, .1); border-radius: 14px; background: #101216; }
.rh__ph { position: absolute; top: 0; right: 0; bottom: 0; left: 28%; z-index: -1; background: #101216 center / cover no-repeat; opacity: 0; transition: opacity .5s ease; }
.rh__ph.is-on { opacity: 1; }
.rh__ph::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, #101216 0%, rgba(16, 18, 22, .72) 38%, rgba(16, 18, 22, .3) 100%); }
.rh__in { padding: 16px 18px 14px; }
.rh__k { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; min-height: 24px; margin: 0; font: 700 13px/1.2 var(--board); letter-spacing: .16em; text-transform: uppercase; color: #f5b335; }
.rh__s { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 10px; margin: 4px 0 0; }
.rh__s b { font-style: normal; font-variant: normal; font-weight: 700; font-stretch: normal; font-size: 68px; line-height: .95; font-family: var(--board); color: #fff; font-variant-numeric: tabular-nums; }
.rh.is-rec .rh__s b { color: #f5c542; text-shadow: 0 0 24px rgba(245, 197, 66, .3); }
.rh__s > span:first-of-type { font-size: 17px; font-weight: 600; color: #9aa1ab; }
.rh__rec { padding: 5px 10px 4px; border-radius: 999px; background: #f5c542; color: #1a1405; font: 800 12px/1 var(--font); letter-spacing: .06em; text-transform: uppercase; }
.rh__best { font: 600 13px/1 var(--board); letter-spacing: .06em; color: #9aa1ab; }
.rh__d { margin: 6px 0 0; font-size: 16px; line-height: 1.35; color: #b4bac2; }
.rh__d b { color: #fff; }
.rh__c { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0 0; }
.rh__c span { padding: 4px 11px; border: 1px solid rgba(255, 255, 255, .16); border-radius: 999px; background: rgba(16, 18, 22, .65); font-size: 14px; line-height: 1.4; color: #c3c8cf; }
.rh__c b { color: #fff; font-weight: 700; }
.rh__l { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin-top: 12px; }
.rh__l > span:first-child { font: 700 11px/1 var(--board); letter-spacing: .14em; text-transform: uppercase; color: #8a919b; }
.rh__dots { display: flex; gap: 3px; }
.rh__dots i { width: 9px; height: 9px; border-radius: 2px; background: #2fbf71; }
.rh__dots i.is-late { background: #e8414f; }
.rh__t { margin: 10px 0 0; font-size: 14px; color: #9aa1ab; }
.rsh { margin-top: 12px; }
.rsh__go { width: 100%; min-height: 58px; gap: 10px; font-size: 18px; font-weight: 700; box-shadow: 0 14px 32px -14px rgba(214, 20, 44, .75); }
.rsh__go .i { width: 22px; height: 22px; flex: none; }
.rsh__sub { margin: 8px 0 0; font-size: 13.5px; line-height: 1.4; text-align: center; color: var(--muted); }
.rsh__to { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 10px; }
.rsh__to button { display: flex; align-items: center; justify-content: center; gap: 7px; min-height: 46px; padding: 8px 6px; border: 1px solid var(--line-2); border-radius: 12px; background: rgba(255, 255, 255, .04); color: #e6e9ed; font: 600 14px/1.2 var(--font); text-align: center; cursor: pointer; -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
.rsh__to .i { width: 18px; height: 18px; flex: none; fill: currentColor; }
.rsh__to [data-act="sh-fb"] .i { color: #4a90f5; }
@media (hover: hover) { .rsh__to button:hover { background: rgba(255, 255, 255, .08); border-color: #4a505a; } }
.rsh__to button:active { background: rgba(255, 255, 255, .1); }
.res__btns { margin-top: 14px; }
.res__btns .btn { flex: 1 1 140px; }
@media (max-width: 419.98px) {
  .rh__in { padding: 14px 14px 12px; }
  .rh__s b { font-size: 58px; }
  .rh__ph { left: 0; }
  .rh__ph::after { background: linear-gradient(90deg, #101216 0%, rgba(16, 18, 22, .8) 55%, rgba(16, 18, 22, .5) 100%); }
  .rsh__to button { flex-direction: column; gap: 4px; padding: 7px 4px; font-size: 12.5px; }
}
/* copy 18: the 2 x 2 shift tiles make the card taller, so Start stays in reach on every screen, not only on phones */
.start__go { position: -webkit-sticky; position: sticky; bottom: calc(12px + env(safe-area-inset-bottom, 0px)); z-index: 2; }
.start__go { box-shadow: 0 10px 30px -6px rgba(0, 0, 0, .9), 0 8px 24px -10px var(--red-glow); }
@supports (overflow: clip) { .desk { overflow: clip; } } /* overflow: hidden made the desk a scroll box, which stops position: sticky inside it */
.shifts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 419.98px) { .shift__n { font-size: 16px; } .shift { padding: 10px 10px; } }
@media (max-width: 369.98px) { .shift__n { font-size: 15px; } }
/* copy 18: "No trains yet" / "Ingen tog endnu" wraps to two short lines on narrow phones instead of running under the buttons */
@media (max-width: 599.98px) { #ontime.is-none { display: block; white-space: normal; font-size: 12px; line-height: 1.1; } }
@media (max-width: 379.98px) { .hud__l { letter-spacing: .03em; } .hud__stat { padding-left: 6px; padding-right: 6px; } #ontime.is-none { font-size: 11px; } }
@media (max-width: 599.98px) { .game.toast-on:not(.nx-on) .desk.is-v .stepbar { visibility: hidden; } } /* the message covers the step line for its few seconds, no half-hidden text at the edges */

/* ---------- copy 20: today's shift, the Christmas shift and the top ten ---------- */
.shift__top { display: flex; align-items: center; gap: 8px; width: 100%; }
.shift__tag { display: inline-flex; align-items: center; gap: 5px; margin-left: auto; padding: 3px 8px; border-radius: 999px; background: rgba(255, 255, 255, .07); color: #d5d9df; font: 600 11.5px/1.2 var(--font); white-space: nowrap; }
.shift--day .shift__tag { background: rgba(47, 191, 113, .14); color: #7fe0aa; }
.shift__tag--x { background: rgba(210, 18, 46, .16); color: #ff9aa6; }
.shift__ic { width: 13px; height: 13px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.shift--wide { grid-column: 1 / -1; }
.shift--day { border-color: rgba(47, 191, 113, .45); background: linear-gradient(180deg, rgba(47, 191, 113, .08), rgba(47, 191, 113, .02)); }
.shift--xmas { border-color: rgba(210, 18, 46, .5); background: linear-gradient(180deg, rgba(210, 18, 46, .1), rgba(210, 18, 46, .02)); }
.shift--xmas::before { content: ""; position: absolute; left: 12px; right: 12px; top: -1px; height: 2px; border-radius: 0 0 2px 2px; background: var(--red); }
.shift--day.is-on, .shift--xmas.is-on { border-color: var(--yellow); background: rgba(255, 233, 74, .08); }
.shift__cd { font-style: normal; font-variant: normal; font-weight: 600; font-stretch: normal; font-size: 12.5px; line-height: 1; font-family: var(--font); color: #7fe0aa; font-variant-numeric: tabular-nums; }
.shift--wide .shift__d { max-width: 44ch; }
.start__tt { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.start__tt:empty { display: none; }
.ttl { display: inline-flex; align-items: center; gap: 7px; min-height: 40px; padding: 7px 14px 7px 11px; border: 1px solid var(--line-2); border-radius: 999px; background: rgba(255, 255, 255, .04); color: #e6e9ed; font: 600 13.5px/1.2 var(--font); cursor: pointer; -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
.ttl .i { width: 17px; height: 17px; fill: var(--amber); flex: none; }
.ttl--x .i { fill: #ff8e9c; }
@media (hover: hover) { .ttl:hover { background: rgba(255, 255, 255, .08); border-color: #4a505a; } }
.ttl:focus-visible, .seg button:focus-visible, .lnk:focus-visible { outline: 3px solid var(--yellow); outline-offset: 2px; }
/* the result card's top ten block */
.rtt { margin-top: 12px; padding: 12px 14px; border: 1px solid rgba(242, 179, 61, .35); border-radius: 14px; background: rgba(242, 179, 61, .06); }
.rtt__h { display: flex; align-items: center; gap: 8px; margin: 0; font: 700 16px/1.3 var(--font); color: #fff; }
.rtt__h .i { width: 20px; height: 20px; flex: none; fill: var(--amber); }
.rtt__p { margin: 4px 0 0; font-size: 14px; line-height: 1.45; color: #cfd4da; }
.rtt .btn--small, .rtt .gs { margin-top: 10px; }
.rtt .btn--small + .btn--small { margin-left: 6px; }
.rtt__see .i { fill: var(--amber); }
/* sign-in, as in The Danish Train Journey */
.gs { display: grid; gap: 8px; }
.gs__google { display: flex; align-items: center; justify-content: center; gap: 10px; min-height: 48px; padding: 10px 18px; border-radius: 999px; background: #fff; color: #1f1f1f; font: 600 15px/1.2 var(--font); text-decoration: none; }
.gs__google svg { width: 20px; height: 20px; flex: none; }
.gs__mail { width: 100%; }
.gs__mail .i { width: 18px; height: 18px; fill: currentColor; }
.gs__inapp { margin: 0; padding: 8px 10px; border-radius: 10px; background: rgba(255, 255, 255, .05); font-size: 13.5px; line-height: 1.4; color: #cfd4da; }
.gs__terms { margin: 2px 0 0; font-size: 12.5px; line-height: 1.45; color: var(--faint); }
.gs__terms a { color: #c9ced6; }
/* the list */
.tt10__msg { margin-bottom: 12px; padding: 12px 14px; border: 1px solid rgba(242, 179, 61, .35); border-radius: 14px; background: rgba(242, 179, 61, .06); }
.seg { display: inline-flex; padding: 3px; border: 1px solid var(--line-2); border-radius: 999px; background: rgba(255, 255, 255, .03); }
.seg button { min-height: 36px; padding: 6px 16px; border: 0; border-radius: 999px; background: transparent; color: var(--muted); font: 600 14px/1 var(--font); cursor: pointer; -webkit-tap-highlight-color: transparent; }
.seg button[aria-pressed="true"] { background: #3a3f49; color: #fff; }
.tt10__sub { margin: 8px 0 0; font-size: 13.5px; line-height: 1.4; color: var(--muted); }
.tt10 { margin-top: 10px; }
.tt10__load, .tt10__empty { margin: 0; padding: 18px 12px; border: 1px dashed var(--line-2); border-radius: 12px; text-align: center; font-size: 14px; color: var(--muted); }
.tt10__list { margin: 0; padding: 0; list-style: none; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.tt10__list--you { margin-top: 8px; }
.tr { display: grid; grid-template-columns: 28px 34px minmax(0, 1fr) auto; align-items: center; gap: 10px; min-height: 54px; padding: 7px 12px; border-top: 1px solid var(--line); }
.tr:first-child { border-top: 0; }
.tr.is-you { background: rgba(255, 233, 74, .07); box-shadow: inset 3px 0 0 var(--yellow); }
.tr__rk { font-style: normal; font-variant: normal; font-weight: 700; font-stretch: normal; font-size: 18px; line-height: 1; font-family: var(--board); color: var(--muted); text-align: center; font-variant-numeric: tabular-nums; }
.tr__rk--1 { color: #f5c542; } .tr__rk--2 { color: #cfd6de; } .tr__rk--3 { color: #d89a62; }
.tr__av { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: hsl(var(--h) 32% 30%); color: hsl(var(--h) 60% 86%); font: 700 13px/1 var(--font); }
.tr__who { min-width: 0; display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 8px; font-size: 15px; line-height: 1.25; }
.tr__who a, .tr__who b { color: #fff; font-weight: 650; text-decoration: none; overflow-wrap: anywhere; }
.tr__who a:hover { text-decoration: underline; }
.tr__who small { flex-basis: 100%; font-size: 12.5px; color: var(--muted); }
.tr__you { padding: 2px 7px; border-radius: 999px; background: var(--yellow); color: #1a1405; font: 700 11px/1.2 var(--font); }
.tr__sc { font-style: normal; font-variant: normal; font-weight: 700; font-stretch: normal; font-size: 22px; line-height: 1; font-family: var(--board); color: #fff; font-variant-numeric: tabular-nums; }
.tt10__me { margin: 12px 0 0; font-size: 14px; color: #cfd4da; }
.tt10__me b { color: #fff; }
.tt10__in { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); }
.tt10__in .gs { margin-top: 8px; }
.tt10__btns { margin-top: 14px; }
.lnk { padding: 4px 2px; border: 0; background: none; color: var(--amber); font: 600 14px/1.2 var(--font); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.nm { display: grid; gap: 6px; font-size: 13.5px; color: var(--muted); }
.nm input { min-height: 46px; padding: 10px 12px; border: 1px solid var(--line-2); border-radius: 10px; background: #0f1115; color: #fff; font: 500 16px/1.2 var(--font); }
.nm input:focus { outline: 2px solid var(--yellow); outline-offset: 1px; }
.nm__row { display: flex; gap: 8px; margin-top: 8px; }
.nm__note { display: block; margin-top: 6px; font-size: 12.5px; color: var(--faint); }
.nm__note.is-bad { color: #ff8e9c; }
/* ---------- copy 20: the 3D window ---------- */
.mv__title { margin: 0; font-size: 15px; }
.mv { background: #0b0d11; }
.mv__how { position: absolute; left: 50%; top: 10px; transform: translateX(-50%); max-width: calc(100% - 20px); margin: 0; padding: 6px 12px; border-radius: 999px; background: rgba(10, 12, 15, .62); color: #e6e9ed; font-size: 12.5px; line-height: 1.3; text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; pointer-events: none; transition: opacity .5s; -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.mv__how.is-gone { opacity: 0; }
.mv__views { position: absolute; left: 10px; bottom: 12px; display: flex; flex-wrap: wrap; gap: 6px; max-width: calc(100% - 70px); }
.mv__views button, .mv__full { min-height: 36px; padding: 6px 12px; border: 1px solid rgba(255, 255, 255, .18); border-radius: 999px; background: rgba(10, 12, 15, .62); color: #eef0f3; font: 600 13px/1.1 var(--font); cursor: pointer; -webkit-tap-highlight-color: transparent; touch-action: manipulation; -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.mv__views button[aria-pressed="true"] { background: #f2f4f7; border-color: #f2f4f7; color: #0c0e12; }
.mv__full { position: absolute; right: 10px; bottom: 12px; display: grid; place-items: center; width: 40px; height: 40px; padding: 0; }
.mv__full .i { width: 20px; height: 20px; fill: currentColor; }
@media (hover: hover) { .mv__views button:not([aria-pressed="true"]):hover, .mv__full:hover { background: rgba(40, 44, 52, .8); } }
.mv__views button:focus-visible, .mv__full:focus-visible, .mv-car:focus-visible { outline: 3px solid var(--yellow); outline-offset: 2px; }
.mv__turn { display: none; }
@media (max-width: 559.98px) { .mv { aspect-ratio: 4 / 5; } .mv__views { right: 58px; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; } .mv__views::-webkit-scrollbar { display: none; } .mv__views button { flex: none; padding: 6px 11px; font-size: 12.5px; } }
/* full screen: the browser's own, or the whole window where there is none (iPhone) */
.mv:fullscreen { aspect-ratio: auto; width: 100%; height: 100%; border: 0; border-radius: 0; }
.mv:-webkit-full-screen { aspect-ratio: auto; width: 100%; height: 100%; border: 0; border-radius: 0; }
.mv.is-full { position: fixed; inset: 0; z-index: 1000; margin: 0; aspect-ratio: auto; width: auto; height: auto; border: 0; border-radius: 0; }
.mv.is-full .mv__views, .mv:fullscreen .mv__views { left: calc(12px + env(safe-area-inset-left)); bottom: calc(14px + env(safe-area-inset-bottom)); }
.mv.is-full .mv__full, .mv:fullscreen .mv__full { right: calc(12px + env(safe-area-inset-right)); bottom: calc(14px + env(safe-area-inset-bottom)); }
@media (orientation: portrait) and (pointer: coarse) { .mv.is-full .mv__turn { display: block; position: absolute; left: 50%; top: calc(54px + env(safe-area-inset-top)); transform: translateX(-50%); margin: 0; padding: 6px 12px; border-radius: 999px; background: rgba(10, 12, 15, .62); color: #e6e9ed; font-size: 12.5px; white-space: nowrap; pointer-events: none; } }
html.mv-fs, html.mv-fs body { overflow: hidden; }
/* the formation strip */
.mv-cars { display: flex; align-items: center; gap: 4px; margin-top: 10px; padding-bottom: 4px; overflow-x: auto; scrollbar-width: thin; -webkit-overflow-scrolling: touch; }
.mv-cars:empty { display: none; }
.mv-cars__dir { flex: none; margin-right: 4px; font: 700 11px/1 var(--board); letter-spacing: .08em; text-transform: uppercase; color: var(--faint); }
.mv-car { flex: none; display: inline-flex; flex-direction: column; align-items: center; justify-content: center; min-width: 46px; min-height: 40px; padding: 4px 9px; border: 1px solid var(--line-2); border-radius: 7px; background: rgba(255, 255, 255, .04); color: #e6e9ed; font: 700 13.5px/1.05 var(--board); cursor: pointer; -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
.mv-car small { font: 500 10.5px/1.1 var(--font); color: var(--muted); }
.mv-car--loco { border-radius: 12px 7px 7px 12px; background: rgba(210, 18, 46, .14); border-color: rgba(210, 18, 46, .5); }
.mv-car[aria-pressed="true"] { background: #f2f4f7; border-color: #f2f4f7; color: #0c0e12; }
.mv-car[aria-pressed="true"] small { color: #3a3f49; }
.mv-cars__cp { flex: none; width: 8px; height: 2px; background: var(--line-2); }
@media (hover: hover) { .mv-car:not([aria-pressed="true"]):hover { background: rgba(255, 255, 255, .09); } }
/* the facts as chips */
.mv-facts { gap: 6px; }
.mv-facts span { display: inline-flex; flex-direction: column; gap: 2px; padding: 7px 11px; border: 1px solid var(--line); border-radius: 10px; background: rgba(255, 255, 255, .03); line-height: 1.15; }
.mv-facts span small { font-size: 11.5px; color: var(--muted); }
/* phones: the four viewpoints share the bottom edge evenly, full screen moves to the top corner */
@media (max-width: 559.98px) {
  .mv__views { left: 8px; right: 8px; bottom: 8px; max-width: none; display: flex; flex-wrap: nowrap; gap: 4px; overflow: visible; }
  .mv__views button { flex: 1 1 auto; min-width: 0; padding: 6px 7px; font-size: 12px; letter-spacing: -0.1px; white-space: nowrap; overflow: visible; text-overflow: clip; }
  .mv__full { top: 8px; bottom: auto; right: 8px; width: 38px; height: 38px; }
  .mv__how { max-width: calc(100% - 104px); }
  .mv.is-full .mv__views { left: calc(10px + env(safe-area-inset-left)); right: calc(10px + env(safe-area-inset-right)); bottom: calc(10px + env(safe-area-inset-bottom)); }
  .mv.is-full .mv__full { top: calc(10px + env(safe-area-inset-top)); bottom: auto; right: calc(10px + env(safe-area-inset-right)); }
}

/* ---- loaders (copy 23): one look for the sound, the cameras and the 3D trains. A short piece of track, rails and
   sleepers, that fills in DSB red with a head lamp at the front. While the size is not known the sleepers run. ---- */
.ld { position: relative; height: 8px; min-width: 60px; border-radius: 2px; overflow: hidden; background-color: #22252c;
  background-image: repeating-linear-gradient(90deg, rgba(255, 255, 255, .14) 0 2px, transparent 2px 8px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .32), inset 0 -1px 0 rgba(255, 255, 255, .32); }
.ld__fill { position: absolute; left: 0; top: 0; bottom: 0; width: 0; background: var(--red); transition: width .25s var(--ease); }
.ld__fill::after { content: ""; position: absolute; right: 1px; top: 50%; width: 4px; height: 4px; margin-top: -2px; border-radius: 50%; background: #fff6dc; box-shadow: 0 0 6px 2px rgba(255, 238, 190, .75); }
.ld.is-wait { animation: ld-run .8s linear infinite; }
.ld.is-wait .ld__fill { width: 26%; animation: ld-slide 1.4s var(--ease) infinite; transition: none; }
@keyframes ld-run { to { background-position: 8px 0; } }
@keyframes ld-slide { from { transform: translateX(-100%); } to { transform: translateX(400%); } }
@media (prefers-reduced-motion: reduce) { .ld.is-wait, .ld.is-wait .ld__fill { animation: none; } .ld.is-wait .ld__fill { width: 100%; opacity: .35; } .ld__fill { transition: none; } }

/* the platform cameras: a card while the cameras start, then a slim strip at the foot of the live picture */
.cam__load { position: absolute; z-index: 5; left: 50%; top: 50%; transform: translate(-50%, -50%); width: min(340px, calc(100% - 24px)); box-sizing: border-box;
  display: grid; gap: 8px; padding: 12px 14px; border-radius: 12px; background: rgba(10, 12, 15, .84); border: 1px solid var(--line-2); color: #fff;
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); transition: opacity .5s; }
.cam__load[hidden] { display: none; }
.cam__load-t { margin: 0; font-weight: 700; font-size: 14px; }
.cam__load-m { margin: 0; display: flex; justify-content: space-between; gap: 10px; font-size: 12.5px; color: var(--muted); }
.cam__load-b, .snd-ld__b, .mv__ld-b, .start__wait { font-variant-numeric: tabular-nums; }
.cam__load-b { color: #fff; white-space: nowrap; }
.cam__load-s { margin: 0; padding: 0; list-style: none; display: flex; flex-wrap: wrap; gap: 5px; }
.cam__load-s:empty { display: none; }
.cam__load:not(.is-wide) .cam__load-s { display: none; }
.cam__load-s li { display: inline-flex; align-items: center; gap: 5px; padding: 2px 8px 2px 7px; border-radius: 999px; border: 1px solid var(--line-2); font-size: 11.5px; color: var(--faint); }
.cam__load-s li::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .6; }
.cam__load-s li.is-done { color: #bfe8d1; border-color: rgba(47, 191, 113, .5); }
.cam__load-s li.is-done::before { background: var(--green); opacity: 1; }
.cam__load-s li.is-now { color: #fff; border-color: var(--red-2); }
.cam__load-s li.is-now::before { background: var(--red-2); opacity: 1; animation: ld-blink 1s steps(2, start) infinite; }
@keyframes ld-blink { to { visibility: hidden; } }
.cam__load.is-dock { top: 38px; transform: translateX(-50%); width: min(420px, calc(100% - 20px)); grid-template-columns: auto 1fr auto; align-items: center; gap: 10px; padding: 7px 10px; border-radius: 10px; }
.cam__load.is-dock .cam__load-t, .cam__load.is-dock .cam__load-s { display: none; }
.cam__load.is-dock .cam__load-m { display: contents; }
.cam__load.is-dock .cam__load-w { order: 1; color: #fff; font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cam__load.is-dock .ld { order: 2; }
.cam__load.is-dock .cam__load-b { order: 3; font-size: 12.5px; }
.cam__load.is-done { opacity: 0; transition-delay: .7s; }
@media (prefers-reduced-motion: reduce) { .cam__load-s li.is-now::before { animation: none; } }

/* the 3D train window */
.mv__msg { transition: opacity .35s; }
.mv__msg.is-gone { opacity: 0; }
.mv__ld { display: grid; gap: 8px; width: min(320px, 82%); box-sizing: border-box; padding: 12px 16px; border-radius: 12px; text-align: center; background: rgba(10, 12, 15, .84); border: 1px solid var(--line-2); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.mv__ld-t { font-size: 14px; color: var(--text); font-weight: 600; }
.mv__ld-b { font-size: 12.5px; color: var(--muted); min-height: 1.3em; }

/* the station sound on the start card */
.snd-ld { display: flex; align-items: center; gap: 8px; margin-top: 14px; font-size: 13px; color: var(--muted); }
.snd-ld[hidden] { display: none; }
.snd-ld .i { width: 16px; height: 16px; flex: none; fill: currentColor; }
.snd-ld .ld { flex: 1 1 auto; max-width: 180px; height: 6px; }
.snd-ld__t { white-space: nowrap; }
.snd-ld__b { margin-left: auto; white-space: nowrap; }
.snd-ld.is-ok { color: var(--text); }
.snd-ld.is-ok .i { fill: var(--green); }
.snd-ld.is-ok .ld { display: none; }
.snd-ld + .start__go { margin-top: 10px; }
.start__go.is-wait { position: relative; overflow: hidden; --fill: 0%; }
.start__go.is-wait::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: var(--fill); background: rgba(255, 255, 255, .2); transition: width .25s var(--ease); }
.start__go.is-wait > svg, .start__go.is-wait > span:not(.start__wait) { display: none; }
.start__wait { position: relative; }

/* ---------- tap to explain: the info marks and their note (copy 25) ---------- */
.im { position: relative; flex: none; display: inline-grid; place-items: center; width: 17px; height: 17px; margin: 0 0 0 6px; padding: 0; border-radius: 50%; border: 1.5px solid rgba(255, 255, 255, .34); background: transparent; color: rgba(255, 255, 255, .72);
  font: italic 700 11px/1 Georgia, "Times New Roman", serif; cursor: pointer; vertical-align: middle; -webkit-tap-highlight-color: transparent; transition: border-color .15s, color .15s, background .15s; }
.im > span { transform: translateY(.5px); }
.im::before { content: ""; position: absolute; inset: -8px; border-radius: 50%; }
.im.is-on { border-color: var(--yellow); color: #111; background: var(--yellow); }
@media (hover: hover) { .im:not(.is-on):hover { border-color: var(--yellow); color: var(--yellow); } }
.im:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.board__title .im { margin-left: 2px; }
.im--plan { position: absolute; z-index: 3; top: 8px; right: 8px; width: 24px; height: 24px; margin: 0; font-size: 13px; background: rgba(10, 12, 15, .72); border-color: rgba(255, 255, 255, .28); }
.im--plan::before { inset: -6px; }
.hud__stat { position: relative; }
/* score, on time and level: the whole box is the tap target (the boxes are too narrow on phones for a mark beside the
   label); the small mark shows where there is room for it */
.im--hud { position: absolute; inset: 0; z-index: 1; width: auto; height: auto; margin: 0; border: 0; border-radius: 0; background: transparent; color: rgba(255, 255, 255, .6); font-size: 9.5px; }
.im--hud::before { display: none; }
.im--hud > span { position: absolute; top: 5px; right: 5px; display: none; place-items: center; width: 15px; height: 15px; border-radius: 50%; border: 1.25px solid rgba(255, 255, 255, .26); transform: none; line-height: 1; }
@media (min-width: 768px) { .im--hud > span { display: grid; } }
.im--hud.is-on, .im--lvm.is-on { background: rgba(255, 233, 74, .1); box-shadow: inset 0 0 0 1.5px rgba(255, 233, 74, .7); color: #111; }
.im--hud.is-on > span { background: var(--yellow); border-color: var(--yellow); }
@media (hover: hover) { .im--hud:not(.is-on):hover > span { border-color: var(--yellow); color: var(--yellow); } .im--hud:not(.is-on):hover { color: rgba(255, 255, 255, .6); border-color: transparent; } }
.im--hud:focus-visible, .im--lvm:focus-visible { outline: 2px solid #fff; outline-offset: -2px; }
.hud__lvm { position: relative; }
.im--lvm { position: absolute; inset: -9px -6px; z-index: 1; width: auto; height: auto; margin: 0; border: 0; border-radius: 6px; background: transparent; }
.im--lvm::before, .im--lvm > span { display: none; }
.legend .im { margin-left: 0; }
.lg__sw { width: 22px; height: 12px; fill: none; stroke: #fff; stroke-width: 2; stroke-linecap: round; }
.im--cam { flex: 0 0 36px; min-width: 0; display: grid; width: auto; height: 36px; margin: 0; border-radius: 9px; border: 1px solid var(--line-2); background: var(--bg-3); color: var(--muted); font-size: 15px; }
.im--cam::before { display: none; }
.im--cam.is-on { background: var(--yellow); border-color: var(--yellow); color: #111; }
.cam.is-big .im--cam { height: 40px; flex-basis: 40px; }
@media (min-width: 960px) { .im--cam { flex: 0 0 24px; height: auto; font-size: 12.5px; } }
.tt__title .im { width: 19px; height: 19px; margin-left: 2px; }
.ib { position: fixed; z-index: 210; left: 12px; top: 12px; width: min(340px, calc(100vw - 24px)); padding: 11px 12px 12px 14px; border-radius: 12px; background: rgba(18, 20, 25, .97); border: 1px solid rgba(255, 233, 74, .5);
  box-shadow: 0 18px 44px -12px rgba(0, 0, 0, .95); color: #e9ecef; opacity: 0; transform: translateY(-4px); transition: opacity .18s var(--ease), transform .18s var(--ease); }
.ib.is-up { transform: translateY(4px); }
.ib.is-in { opacity: 1; transform: none; }
.ib[hidden] { display: none; }
.ib::after { content: ""; position: absolute; left: calc(var(--ax, 28px) - 6px); top: -7px; width: 12px; height: 12px; background: rgba(18, 20, 25, .97); border-left: 1px solid rgba(255, 233, 74, .5); border-top: 1px solid rgba(255, 233, 74, .5); transform: rotate(45deg); }
.ib.is-up::after { top: auto; bottom: -7px; transform: rotate(225deg); }
.ib__h { display: flex; align-items: center; gap: 9px; }
.ib__t { flex: 1; min-width: 0; font: 700 17px/1.15 var(--board); color: var(--yellow); letter-spacing: .01em; }
.ib__x { flex: none; width: 30px; height: 30px; margin: -6px -6px -6px 0; display: grid; place-items: center; border: 0; border-radius: 8px; background: transparent; color: var(--muted); cursor: pointer; }
.ib__x .i { width: 16px; height: 16px; fill: currentColor; }
@media (hover: hover) { .ib__x:hover { color: #fff; background: rgba(255, 255, 255, .08); } }
.ib__x:focus-visible { outline: 2px solid #fff; outline-offset: 1px; }
.ib__p { margin: 6px 0 0; font-size: 14.5px; line-height: 1.45; }
.ib__eq { flex: none; display: inline-flex; align-items: flex-end; gap: 2px; height: 14px; }
.ib__eq i { width: 3px; height: 4px; border-radius: 1px; background: rgba(255, 233, 74, .45); }
.ib.is-talk .ib__eq i { background: var(--yellow); animation: ibeq .9s ease-in-out infinite; }
.ib.is-talk .ib__eq i:nth-child(2) { animation-delay: -.3s; }
.ib.is-talk .ib__eq i:nth-child(3) { animation-delay: -.6s; }
.ib.is-talk .ib__eq i:nth-child(4) { animation-delay: -.15s; }
@keyframes ibeq { 0%, 100% { height: 4px; } 50% { height: 14px; } }
@media (prefers-reduced-motion: reduce) { .ib, .ib.is-up { transition: none; transform: none; } .ib.is-talk .ib__eq i { animation: none; height: 10px; } }
@media (max-width: 359.98px) { .tt__sub { display: none; } } /* the smallest phones: the heading and its mark first */

/* copy 27: Darren's BONUS pop over the track plan (never takes a tap) */
.vh { position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.bonus { position: absolute; left: 50%; top: 50%; z-index: 6; width: min(58%, 400px); display: flex; flex-direction: column; align-items: center; pointer-events: none; opacity: 0; transform: translate(-50%, -50%) scale(.55); animation: bonusPop 1.6s cubic-bezier(.2, .8, .2, 1) forwards; will-change: transform, opacity; }
.bonus img { display: block; width: 100%; height: auto; filter: drop-shadow(0 6px 18px rgba(0, 0, 0, .6)); -webkit-user-drag: none; }
.bonus b { margin-top: -.12em; font-family: var(--board); font-weight: 700; font-size: clamp(36px, 7.5vw, 62px); line-height: 1; color: #f2fff6; font-variant-numeric: tabular-nums; letter-spacing: .02em;
  text-shadow: 0 0 2px #0b3d24, 0 2px 0 #0b3d24, 2px 0 0 #0b3d24, -2px 0 0 #0b3d24, 0 -2px 0 #0b3d24, 0 0 22px rgba(61, 255, 139, .55); }
@keyframes bonusPop { 0% { opacity: 0; transform: translate(-50%, -50%) scale(.55); } 16% { opacity: 1; transform: translate(-50%, -50%) scale(1.06); } 27% { opacity: 1; transform: translate(-50%, -50%) scale(1); } 72% { opacity: 1; transform: translate(-50%, -50%) scale(1.03); } 100% { opacity: 0; transform: translate(-50%, -50%) scale(1.16); } }
@keyframes bonusFade { 0% { opacity: 0; transform: translate(-50%, -50%); } 15%, 72% { opacity: 1; transform: translate(-50%, -50%); } 100% { opacity: 0; transform: translate(-50%, -50%); } }
@media (prefers-reduced-motion: reduce) { .bonus { animation-name: bonusFade; } }

/* copy 31: the invisible film that keeps the screen on during a shift in browsers without Screen Wake Lock (see sd.js wakeSync) */
.wakev { position: fixed; left: 0; top: 0; width: 100vw; height: 100vh; object-fit: cover; opacity: 0; pointer-events: none; z-index: -1; }

:where(body *) { max-height: 1000000px; } /* phones with large system text: a max-height on every block stops Android (WebView, Messenger, Facebook) from enlarging some text blocks and not others; it changes nothing else */
