@font-face {
  font-family:"DM Sans";
  src:url("/_a/dm-sans.9fea608a94.woff2") format("woff2");
  font-style:normal;
  font-weight:100 900;
  font-display:swap;
}

:root {
  color-scheme:dark;
  --night:#100e1c;
  --ink:#f7f4ff;
  --muted:#c5bed6;
  --panel:#1a1729;
  --lime:#d7fa76;
  --ice:#a8ddff;
  --rose:#ffbba4;
  --district:#e3b3fc;
  --mono:"IBM Plex Mono",ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;
  --sans:"DM Sans",sans-serif;
}

* { box-sizing:border-box; }
html,body { margin:0;min-height:100%; }
body {
  color:var(--ink);
  background:
    radial-gradient(ellipse 72rem 36rem at 72% -15rem,#492d86 0%,transparent 86%),
    linear-gradient(154deg,#1a1429 0%,var(--night) 54%,#0f1220 100%);
  font:16px/1.45 var(--sans);
  -webkit-font-smoothing:antialiased;
}
h1,h2,p { margin:0; }
button {
  font:inherit;
  color:inherit;
  touch-action:manipulation;
  cursor:pointer;
  -webkit-tap-highlight-color:transparent;
}
button:focus-visible,select:focus-visible {
  outline:3px solid var(--ice);
  outline-offset:3px;
}
[hidden] { display:none !important; }
.wrap { width:min(1060px,calc(100% - 80px));margin-inline:auto; }
.sr-only {
  position:absolute;
  width:1px;height:1px;
  padding:0;margin:-1px;
  overflow:hidden;
  clip:rect(0,0,0,0);
  white-space:nowrap;border:0;
}

.mast { border-bottom:1px solid #373045;background:#151124c9; }
.mast-in,.brand,.settings,.setting { display:flex;align-items:center; }
.mast-in { min-height:61px;justify-content:space-between; }
.brand { gap:9px;font-size:17px;font-weight:890;letter-spacing:-.055em; }
.brand b { font-weight:550;color:#d1c5e4; }
.brand-icon {
  display:grid;
  place-items:center;
  width:30px;height:30px;
  border-radius:9px 9px 9px 3px;
  color:#18112a;
  background:#bda1f8;
  box-shadow:inset 0 1px #e0cdff;
}
.brand-icon svg { width:21px;height:21px; }
.settings { gap:8px; }
.setting {
  justify-content:center;
  gap:7px;
  min-height:44px;min-width:44px;
  padding:0 8px;
  color:#e2daf1;
  background:transparent;
  border:1px solid transparent;
  border-radius:9px;
  font-size:14px;
}
.setting:hover,.setting:focus-visible { background:#2d2440;border-color:#4a3d60; }
.setting svg {
  width:18px;height:18px;
  fill:none;stroke:currentColor;
  stroke-linecap:round;stroke-linejoin:round;stroke-width:1.7;
}
#sound[aria-pressed=false] .on-sound,#sound[aria-pressed=true] .muted-sound { display:none; }
.help-icon b {
  display:grid;place-items:center;
  width:20px;height:20px;
  border:1px solid #b8a9d0;
  border-radius:50%;
  font:700 13px var(--mono);
}

.heading {
  position:relative;
  isolation:isolate;
  display:flex;
  align-items:flex-end;
  justify-content:space-between;
  gap:20px;
  padding:24px 0 20px;
}
.heading::before {
  content:"";
  position:absolute;
  z-index:-1;
  inset:10px 16% 12px 36%;
  background:repeating-linear-gradient(128deg,transparent 0 22px,#a78ce814 22px 24px);
  mask-image:linear-gradient(90deg,transparent,#000 35%,#000 60%,transparent);
  pointer-events:none;
}
.heading h1 {
  width:max-content;
  padding-right:.18em;
  letter-spacing:-.091em;
  word-spacing:.035em;
  font-size:clamp(53px,6.8vw,91px);
  font-weight:900;
  line-height:.93;
  text-transform:uppercase;
  transform:skew(-8deg);
  transform-origin:left bottom;
}
.heading h1 em {
  color:#d4bafa;
  font-style:normal;
}
.heading p {
  margin-top:10px;
  color:var(--muted);
  font-size:16px;
}
.ticket {
  position:relative;
  flex-shrink:0;
  min-width:122px;
  margin-bottom:5px;
  padding:8px 29px 8px 12px;
  background:#241934;
  border:1px solid #554264;
  border-left:3px solid var(--district);
  border-radius:2px 9px 9px 2px;
  color:#f6ebff;
}
.ticket>span {
  display:block;
  color:#c5b2df;
  font:650 10px var(--mono);
  letter-spacing:.12em;
}
.ticket strong {
  display:block;
  font:750 25px/1.21 var(--mono);
  letter-spacing:-.065em;
}
.ticket small { color:#c1afd5;font-size:.55em;letter-spacing:0; }
.ticket i {
  position:absolute;
  inset:10px 9px 10px auto;
  width:9px;
  opacity:.66;
  background:repeating-linear-gradient(0deg,var(--district) 0 1px,transparent 1px 3px,var(--district) 3px 5px,transparent 5px 8px);
}

.cab {
  --signal-color:#d3bbf7;
  overflow:hidden;
  background:var(--panel);
  border:1px solid #58436f;
  border-radius:19px;
  box-shadow:0 23px 54px #0605127d,0 0 34px #9170ee16;
}
.cab[data-phase=drive],.cab[data-phase=brake] { --signal-color:var(--lime); }
.cab[data-phase=result][data-passed=true] { --signal-color:var(--lime); }
.cab[data-phase=result][data-passed=false] { --signal-color:var(--rose); }
.monitor {
  padding:0 9px 9px;
  background:linear-gradient(118deg,#2b2043,#1c1830 60%);
}
.statusbar,.statusbar>div {
  display:flex;
  align-items:center;
}
.statusbar {
  justify-content:space-between;
  min-height:38px;
  gap:10px;
  padding:0 6px;
  font:650 11px/1.2 var(--mono);
  letter-spacing:.065em;
  text-transform:uppercase;
}
.statusbar>div { gap:7px; }
.signal { color:var(--signal-color); }
.lamp {
  flex:none;
  width:7px;height:7px;
  border-radius:50%;
  background:var(--signal-color);
  box-shadow:0 0 9px color-mix(in srgb,var(--signal-color) 47%,transparent);
}
.speed { color:#e0d6ee;letter-spacing:.03em; }
#direction { padding-right:8px;border-right:1px solid #6b577f; }

.scene {
  position:relative;
  isolation:isolate;
  height:clamp(218px,27vw,332px);
  overflow:hidden;
  border:1px solid #100b1d;
  border-radius:10px;
  background:#241a3e;
  box-shadow:0 0 0 1px #67537b;
}
#yard { display:block;width:100%;height:100%;image-rendering:pixelated; }
.platform-board {
  position:absolute;
  top:11px;left:12px;
  display:flex;
  align-items:center;
  gap:8px;
  padding:4px 9px 4px 5px;
  background:#191327ed;
  border:1px solid #a487ca86;
  border-radius:6px;
  color:#f6ebfa;
  font:650 11px var(--mono);
  pointer-events:none;
}
.platform-board span:first-child {
  padding:3px 5px;
  border-radius:3px;
  background:var(--district);
  color:#21152c;
}
#assigned-bay {
  margin-left:1px;
  padding:3px 4px;
  color:#e4fbd6;
  border-left:1px solid #6a826d;
  white-space:nowrap;
}
.track-sign {
  position:absolute;
  display:flex;
  align-items:center;
  gap:4px;
  top:41.1%;
  transform:translate(-50%,-50%);
  padding:3px 8px;
  color:#e9ffcb;
  background:#223628;
  border:1px solid #d6f3aa;
  border-radius:3px;
  box-shadow:0 0 0 2px #1a2325,0 0 14px #d0fb8c2b;
  font:750 12px/1 var(--mono);
  letter-spacing:.045em;
  white-space:nowrap;
  pointer-events:none;
}
.closed-sign {
  top:28%;
  color:#d0c8d8;
  background:#292433;
  border-color:#6c647b;
  box-shadow:none;
  font-size:10px;
}
#target-bay {
  padding:1px 3px;
  border-radius:2px;
  color:#172820;
  background:#dcf8c9;
  font-size:1.05em;
}
.blackout {
  position:absolute;
  inset:40% auto auto 50%;
  transform:translate(-50%,-50%);
  display:flex;
  align-items:center;
  gap:8px;
  padding:8px 12px;
  color:#ede6fa;
  background:#181323f5;
  border:1px solid #776589;
  border-radius:6px;
  font:650 13px var(--mono);
  letter-spacing:.045em;
  white-space:nowrap;
  pointer-events:none;
}
.blackout i {
  width:8px;height:8px;
  transform:rotate(45deg);
  background:var(--district);
}
.track-brake {
  position:absolute;
  z-index:2;
  inset:0;
  background:transparent;
  border:0;
  touch-action:none;
  cursor:crosshair;
}
.pause-run {
  position:absolute;
  z-index:3;
  top:6px;right:7px;
  display:grid;
  place-items:center;
  width:44px;height:44px;
  padding:0;
  color:#f0e7ff;
  background:#191327ee;
  border:1px solid #9c83bb;
  border-radius:8px;
}
.pause-run:hover { background:#3a2952; }
.pause-run i {
  width:12px;height:14px;
  border:solid currentColor;
  border-width:0 4px;
}
[data-phase=paused] .pause-run i {
  width:13px;height:15px;
  border:0;
  background:currentColor;
  clip-path:polygon(12% 0,100% 50%,12% 100%);
}
.stamp {
  position:absolute;
  top:12px;right:12px;
  padding:5px 9px;
  transform:rotate(-5deg);
  color:#1b2320;
  background:#e4ffa0;
  border:1px solid #f3ffc9;
  border-radius:4px;
  box-shadow:3px 3px 0 #303844;
  font:850 13px var(--mono);
  letter-spacing:.015em;
  text-transform:uppercase;
  pointer-events:none;
  animation:arrive .38s cubic-bezier(.18,.9,.32,1.3) both;
}
.stop-pulse {
  position:absolute;
  left:var(--platform-x,66%);
  top:85%;
  width:39px;height:15px;
  opacity:0;
  transform:translate(-50%,-50%) scale(.5);
  border:1px solid #e1ffd2;
  border-radius:50%;
  pointer-events:none;
}
[data-phase=result][data-passed=true] .stop-pulse { animation:platform-light .33s ease-out both; }
[data-phase=result][data-perfect=true] .stop-pulse { box-shadow:0 0 5px #caed9a; }
@keyframes platform-light {
  from { opacity:.62;transform:translate(-50%,-50%) scale(.64); }
  to { opacity:0;transform:translate(-50%,-50%) scale(1.32); }
}
@keyframes arrive {
  from { opacity:.25;transform:translateY(-4px) scale(1.17) rotate(-11deg); }
  to { opacity:1;transform:rotate(-5deg); }
}

.desk {
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  grid-template-areas:"instruction action" "instruction followup";
  column-gap:20px;
  min-height:121px;
  padding:17px 20px 19px;
  border-top:1px solid #544267;
  background:linear-gradient(103deg,#251c36,#1d182b 72%);
}
.instruction { grid-area:instruction;min-width:0;align-self:center; }
.station-label {
  display:flex;
  align-items:center;
  gap:7px;
  color:var(--signal-color);
  font:650 11px/1.2 var(--mono);
  letter-spacing:.085em;
}
.route-emblem {
  display:grid;place-items:center;
  width:16px;height:16px;
  border:1px solid currentColor;
  border-radius:3px;
  font:750 10px var(--mono);
}
.instruction h2 {
  margin:6px 0 4px;
  font-size:clamp(24px,3.4vw,35px);
  font-weight:850;
  line-height:1.04;
  letter-spacing:-.062em;
  font-variant-numeric:tabular-nums;
}
.instruction p { color:var(--muted);font-size:15px; }
[data-phase=result] .instruction h2 { color:var(--signal-color); }
.instruction .brake-report,.instruction .next-preview {
  margin-top:7px;
  font-size:13px;
}
.instruction .brake-report {
  display:flex;
  align-items:baseline;
  gap:7px;
  color:var(--ice);
}
.brake-report::before {
  flex:none;
  content:"";
  width:9px;height:6px;
  border:solid currentColor;
  border-width:0 0 2px 3px;
}
.instruction .next-preview { color:#dec5f5; }
.controls { grid-area:action;align-self:end;width:236px; }
.controls:has(+ .followup[hidden]) { align-self:center; }
.followup { grid-area:followup;align-self:start; }

#action {
  position:relative;
  display:flex;
  align-items:center;
  justify-content:center;
  gap:10px;
  width:100%;
  min-height:54px;
  padding:9px 13px;
  color:#141b11;
  background:#ddf59e;
  border:1px solid #ebffa4;
  border-bottom:3px solid #9dbd46;
  border-radius:10px;
  box-shadow:0 4px 0 #0f1011;
  font-size:19px;
  font-weight:900;
  line-height:1.12;
  letter-spacing:-.033em;
  touch-action:none;
}
#action:hover { background:#e7fbb6; }
#action:active {
  transform:translateY(1px);
  box-shadow:0 2px 0 #0f1011;
}
[data-phase=drive] #action {
  background:#c3de86;
}
#action[aria-disabled=true] {
  color:#e1d3ed;
  background:#362c47;
  border-color:#695683;
  box-shadow:none;
  cursor:default;
  transform:none;
}
#action-text { min-width:0;text-wrap:balance; }
kbd {
  flex:none;
  margin-left:auto;
  padding:3px 5px;
  border:1px solid #758743;
  border-radius:4px;
  font:650 11px var(--mono);
}
#action[aria-disabled=true] kbd { visibility:hidden; }
.action-symbol {
  flex:none;
  width:15px;height:15px;
  background:currentColor;
  clip-path:polygon(12% 0,96% 50%,12% 100%);
}
[data-phase=drive] .action-symbol,[data-phase=brake] .action-symbol {
  clip-path:inset(1px 1px 1px round 2px);
}
#action[data-retry=true] .action-symbol {
  position:relative;
  clip-path:none;
  width:14px;height:14px;
  background:none;
  border:2px solid currentColor;
  border-right-color:transparent;
  border-radius:50%;
}
#action[data-retry=true] .action-symbol::after {
  position:absolute;
  top:-2px;right:-3px;
  content:"";
  border-bottom:5px solid currentColor;
  border-left:5px solid transparent;
}

.secondary-action,.small-button {
  color:#f2e9fd;
  background:#2c233d;
  border:1px solid #5a486d;
  border-radius:8px;
  font-size:14px;
  font-weight:690;
}
.secondary-action {
  display:block;
  width:100%;
  min-height:44px;
  margin-top:8px;
  padding:5px 10px;
}
.secondary-action:hover,.small-button:hover { background:#3d2c52; }
.small-button {
  display:flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  min-height:44px;
  padding:0 12px;
}
.book-icon {
  width:16px;height:14px;
  border:1px solid currentColor;
  border-radius:2px;
  background:linear-gradient(90deg,transparent 45%,currentColor 46% 54%,transparent 55%);
}

.line-map {
  margin:16px 0 27px;
  padding:14px 18px 12px;
  background:#1c172b;
  border:1px solid #4a3a5b;
  border-radius:15px;
}
.line-head,.ledger,.sheet-head {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
}
.section-label,.book-body label {
  color:var(--district);
  font:650 11px/1.3 var(--mono);
  letter-spacing:.09em;
  text-transform:uppercase;
}
.line-head h2 {
  margin:2px 0 0;
  font-size:23px;
  line-height:1.1;
  letter-spacing:-.053em;
}
#stations {
  position:relative;
  isolation:isolate;
  display:grid;
  grid-template-columns:repeat(6,minmax(0,1fr));
  list-style:none;
  margin:12px 0 10px;
  padding:0;
}
#stations::before {
  position:absolute;
  z-index:-1;
  top:14px;left:7%;right:7%;
  height:2px;
  background:#77648c;
  content:"";
}
#stations li { min-width:0; }
.stop-button {
  display:flex;
  align-items:center;
  flex-direction:column;
  gap:5px;
  width:100%;
  min-height:48px;
  padding:0 3px;
  color:#e0d4ef;
  background:none;
  border:0;
}
.node {
  display:grid;
  place-items:center;
  width:28px;height:28px;
  border:2px solid #7b6890;
  border-radius:9px 9px 9px 3px;
  background:#2d213f;
  box-shadow:0 0 0 3px #1c172b;
  font:700 11px var(--mono);
}
.stop-name { font-size:13px;line-height:1.2;text-wrap:balance; }
.stop-button[aria-current=step] .node {
  color:#221531;
  background:var(--district);
  border-color:var(--district);
}
.stop-button.cleared .node {
  color:#1c2317;
  background:#d9eeaa;
  border-color:#d9eeaa;
}
.stop-button:hover .node,.stop-button[aria-current=step] .node {
  outline:1px solid var(--district);
  outline-offset:2px;
}
.ledger {
  padding-top:8px;
  border-top:1px solid #473750;
  color:var(--muted);
  font-size:13px;
}
#cleared { color:#e0d4ef;font:650 12px var(--mono);white-space:nowrap; }
#shift-progress-stops {
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:8px;
  list-style:none;
  margin:12px 0 2px;
  padding:0;
}
#shift-progress-stops li {
  min-width:0;
  padding:8px 10px;
  background:#292038;
  border-top:2px solid #6f5b85;
  border-radius:3px 3px 7px 7px;
}
#shift-progress-stops li[aria-current=step] { border-color:var(--district); }
#shift-progress-stops b,#shift-progress-stops span { display:block; }
#shift-progress-stops b { font-size:14px; }
#shift-progress-stops span { margin-top:3px;color:#d4c7e2;font-size:13px; }

.sheet {
  width:min(470px,calc(100% - 24px));
  max-height:88dvh;
  padding:20px 22px;
  color:var(--ink);
  background:linear-gradient(145deg,#302143,#1d172b 61%);
  border:1px solid #82679b;
  border-radius:16px;
  box-shadow:0 20px 65px #050411c9;
  overscroll-behavior:contain;
}
.sheet::backdrop { background:#100a1bd7; }
.sheet[open] { animation:sheet-in .2s ease-out both; }
@keyframes sheet-in {
  from { opacity:0;transform:translateY(8px) scale(.98); }
  to { opacity:1;transform:translateY(0) scale(1); }
}
.sheet-head { padding-bottom:10px;border-bottom:1px solid #59446e; }
.sheet-head h2 {
  font-size:30px;
  font-weight:850;
  line-height:1.04;
  letter-spacing:-.052em;
}
.close {
  flex:none;
  min-height:44px;min-width:44px;
  padding:0;
  color:#f2e9ff;
  background:none;
  border:0;
  border-radius:7px;
  font-size:25px;
}
.close:hover { background:#413153; }
.sheet-primary {
  width:100%;
  min-height:44px;
  padding:6px 10px;
  color:#1a2413;
  background:var(--lime);
  border:1px solid #efffb9;
  border-radius:8px;
  font-weight:850;
}
.sheet-primary:hover { background:#eaffb0; }
.sheet-primary.sheet-secondary,#ticket-book {
  color:#f2e9fd;
  background:#2c233d;
  border-color:#5a486d;
}
.sheet-primary.sheet-secondary:hover,#ticket-book:hover { background:#3d2c52; }
.sheet-note,#book-brief,.guide-list p,.driver-card { color:#dfd2eb;font-size:14px; }
.sheet-note { margin:13px 0; }
.book-body { padding-top:13px; }
.book-body label { display:block;margin-bottom:4px; }
#district-select,#shift-start {
  width:100%;
  min-height:44px;
  padding:8px;
  color:#f6edf9;
  background:#332744;
  border:1px solid #7b6191;
  border-radius:7px;
  font:650 16px var(--sans);
}
#shift-start { margin-top:5px; }
#book-brief { margin:9px 0 12px; }
.book-row {
  display:grid;
  grid-template-columns:30px 1fr auto;
  align-items:center;
  gap:8px;
  width:100%;
  min-height:47px;
  padding:5px 3px;
  text-align:left;
  color:#f5ebfc;
  background:none;
  border:0;
  border-top:1px solid #503a62;
}
.book-row:hover { background:#3b2b4f; }
.book-row span:first-child { color:var(--district);font:700 12px var(--mono); }
.book-row small { color:#d5c8e0;font:650 11px var(--mono); }
.book-actions { display:grid;gap:8px; }
.stamp-strip {
  display:grid;
  grid-template-columns:repeat(9,1fr);
  gap:4px;
  margin-top:13px;
}
.stamp-strip i {
  height:6px;
  background:linear-gradient(90deg,var(--stamp-color) var(--extent),#3b2d4e var(--extent));
  border:1px solid #776086;
  border-radius:2px;
}
#driver-card,.driver-card {
  margin:12px 0;
  padding:8px 10px;
  background:#302341;
  border-left:3px solid var(--district);
}
#driver-card { color:#eadbf5;font:650 12px/1.55 var(--mono); }
.guide-list {
  list-style:none;
  margin:16px 0;
  padding:0;
  counter-reset:steps;
}
.guide-list li {
  position:relative;
  margin:14px 0;
  padding-left:33px;
  counter-increment:steps;
}
.guide-list li::before {
  position:absolute;
  left:0;top:0;
  width:22px;
  background:#cfb0f9;
  color:#21162b;
  border-radius:5px 5px 5px 1px;
  content:counter(steps);
  text-align:center;
  font:750 13px/22px var(--mono);
}

.finish-ticket {
  position:relative;
  isolation:isolate;
  margin:15px 0;
  padding:24px 15px 17px;
  overflow:hidden;
  border-radius:9px;
  color:#270f3e;
  background:
    radial-gradient(circle at 0 47%,#2a1d3d 0 6px,transparent 7px),
    radial-gradient(circle at 100% 47%,#2a1d3d 0 6px,transparent 7px),
    linear-gradient(150deg,#e8cbff,#c8acf2);
  text-align:center;
}
.finish-ticket::before {
  position:absolute;
  z-index:-1;
  inset:0 0 auto;
  height:7px;
  content:"";
  background:repeating-linear-gradient(120deg,#a381d4 0 9px,#dcc5fb 9px 15px);
}
.finish-ticket strong,.finish-ticket span { display:block; }
.finish-ticket strong {
  margin-block:2px;
  font-size:clamp(46px,11vw,68px);
  font-weight:900;
  line-height:1;
  letter-spacing:-.09em;
}
.finish-ticket p { margin-top:9px;font:700 13px/1.32 var(--mono); }
#ticket-stamps,#shift-results {
  list-style:none;
  margin:11px 0 0;
  padding:10px 0 0;
  border-top:1px dashed #8e62b0;
}
#ticket-stamps {
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:5px;
}
#ticket-stamps li {
  padding:4px 2px;
  background:#ffffff30;
  border:1px solid #906aab;
  border-radius:4px;
  font:650 10px/1.3 var(--mono);
}
#shift-results { padding-top:0; }
#shift-results li {
  display:flex;
  justify-content:space-between;
  gap:6px;
  padding:6px 0;
  border-bottom:1px dashed #9d7bb9;
  text-align:left;
  font-size:13px;
}
#shift-results b { text-align:right; }

@media(max-width:700px) {
  .wrap { width:calc(100% - 32px); }
  .mast-in { min-height:53px; }
  .heading { padding:18px 0 16px; }
  .heading h1 { font-size:clamp(45px,8.7vw,62px); }
  .ticket { min-width:90px;padding-right:12px; }
  .ticket i,kbd { display:none; }
  .desk { padding:14px 15px 15px;column-gap:14px; }
  .controls { width:167px; }
  .line-map { padding:13px; }
  .stop-name { font-size:12px; }
}

@media(max-width:520px) {
  .wrap { width:calc(100% - 24px); }
  .brand { font-size:15px; }
  .brand-icon { width:27px;height:27px; }
  .settings { gap:2px; }
  .setting { padding:0 6px;font-size:13px; }
  .heading { display:block;padding:17px 0 14px; }
  .heading h1 { font-size:clamp(35px,11.65vw,55px); }
  .heading p { margin-top:8px;font-size:14px; }
  .ticket {
    position:absolute;
    top:20px;right:0;
    min-width:0;
    margin:0;
    padding:3px 5px 2px 7px;
  }
  .ticket>span { font-size:8px; }
  .ticket strong { font-size:16px; }
  .cab { border-radius:13px; }
  .monitor { padding:0 5px 5px; }
  .statusbar {
    min-height:30px;
    gap:5px;
    padding:0 3px;
    font-size:10px;
    letter-spacing:.035em;
  }
  .statusbar>div { gap:5px; }
  #direction { padding-right:5px; }
  .scene { height:clamp(162px,49vw,212px);border-radius:7px; }
  .platform-board { top:6px;left:6px;gap:5px;padding:3px 6px 3px 3px;font-size:10px; }
  .pause-run { top:5px;right:5px; }
  .track-sign { padding:2px 6px;font-size:11px; }
  .closed-sign { font-size:9px; }
  .stamp { top:7px;right:9px;font-size:10px; }
  .desk {
    grid-template-columns:minmax(0,1fr);
    grid-template-areas:"action" "instruction" "followup";
    gap:9px;
    min-height:0;
    padding:10px 12px 12px;
  }
  .controls { width:100%;align-self:auto; }
  #action { min-height:50px;font-size:18px; }
  .station-label { font-size:10px; }
  .instruction h2 { margin:4px 0;font-size:27px; }
  .instruction p { font-size:15px; }
  .instruction .brake-report,.instruction .next-preview { font-size:12px; }
  .followup .secondary-action { margin-top:0; }
  .followup .secondary-action + .secondary-action { margin-top:7px; }
  .line-map { margin-top:12px; }
  .line-head h2 { font-size:20px; }
  .section-label { font-size:10px; }
  .small-button { padding-inline:8px;font-size:13px; }
  #stations { margin:4px 0; }
  #stations::before { top:21px; }
  .stop-button { justify-content:center;min-height:44px; }
  .node { width:26px;height:26px; }
  .stop-name,#district-brief { display:none; }
  #shift-progress-stops { grid-template-columns:1fr;gap:4px; }
  #shift-progress-stops li {
    display:flex;
    justify-content:space-between;
    align-items:baseline;
    gap:7px;
    border-top:0;
    border-left:2px solid #6f5b85;
  }
  #shift-progress-stops span { margin:0;text-align:right; }
  .sheet { padding:15px; }
}

@media(max-width:360px) {
  .statusbar { font-size:9px; }
}

@media(max-height:500px) and (orientation:landscape) {
  .mast-in { min-height:42px; }
  .heading { padding:7px 0 9px;gap:10px; }
  .heading h1 { font-size:35px; }
  .heading p { margin-top:3px;font-size:13px; }
  .ticket { display:none; }
  .statusbar { min-height:27px; }
  .scene { height:123px; }
  .desk { min-height:70px;padding:8px 12px; }
  .instruction h2 { margin:3px 0;font-size:22px; }
  .instruction p { font-size:13px; }
  .line-map { margin-top:9px; }
  .sheet { max-height:92dvh; }
}

@media(prefers-reduced-motion:reduce) {
  *,*::before,*::after { animation:none !important;transition:none !important;scroll-behavior:auto !important; }
}

.game-public .heading h1 {
  width:auto;
  padding-right:0;
  transform:none;
}
.game-public .display-name {
  display:block;
  width:max-content;
  padding-right:.18em;
  transform:skew(-8deg);
  transform-origin:left bottom;
}
.game-public .title-detail {
  display:block;
  margin-top:8px;
  color:#e2d0fa;
  font:750 17px/1.2 var(--sans);
  letter-spacing:-.025em;
  text-transform:none;
}
.game-public .heading p { margin-top:6px; }
.site-main-links {
  display:flex;
  align-items:center;
  gap:5px;
}
.site-main-links a,.site-footer a {
  display:inline-flex;
  align-items:center;
  min-height:44px;
  padding:3px 10px;
  color:#e7d7f7;
  font-size:14px;
  font-weight:700;
  text-decoration:none;
}
.site-main-links a[aria-current=page] { color:var(--lime); }
.site-main-links a:hover,.site-footer a:hover,.text-link:hover { color:var(--lime); }
body a:focus-visible,summary:focus-visible,input:focus-visible,textarea:focus-visible {
  outline:3px solid var(--ice);
  outline-offset:3px;
  border-radius:4px;
}
body a { color:#d8c2fb; }
.site-mast .brand { color:var(--ink);text-decoration:none; }
.site-section {
  margin-block:28px;
  padding-top:25px;
  border-top:1px solid #493b58;
}
.site-section h2,.page-heading h1 {
  color:var(--ink);
  letter-spacing:-.052em;
  font-weight:850;
  line-height:1.08;
}
.site-section h2 { margin-bottom:11px;font-size:clamp(23px,4vw,33px); }
.site-section h3 {
  margin:8px 0 4px;
  color:#ecdcff;
  font-size:18px;
  line-height:1.16;
}
.site-section p,.site-section dd,.site-section li,.page-lead { color:var(--muted); }
.site-section p { margin:8px 0 14px;max-width:76ch; }
.guide-intro {
  display:grid;
  grid-template-columns:1.16fr 1fr;
  align-items:start;
  gap:25px;
}
.guide-shot { min-width:0;margin:4px 0 0; }
.guide-shot img {
  display:block;
  width:100%;height:auto;
  border:1px solid #634c79;
  border-radius:12px;
  box-shadow:0 13px 28px #08061373;
}
.guide-shot figcaption {
  margin:8px 0 0;
  color:#c8bcd8;
  font-size:13px;
}
.play-steps { margin:14px 0 16px;padding-left:23px; }
.play-steps li { margin:8px 0;padding-left:4px; }
.play-steps li::marker { color:var(--lime);font-weight:800; }
.play-steps strong { color:var(--ink); }
.play-steps kbd {
  display:inline;
  margin:0;
  padding:1px 4px;
  border-color:#827194;
}
.text-link { color:#e1caff;font-weight:750;text-underline-offset:3px; }
.stop-examples,.feature-columns,.district-cards {
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:10px;
  margin:16px 0;
}
.stop-examples div,.feature-columns div,.district-card {
  min-width:0;
  padding:13px;
  border:1px solid #503d65;
  border-radius:9px;
  background:#221a30;
}
.stop-examples dt { color:#edd9ff;font-weight:800; }
.stop-examples dd { margin:5px 0 0;font-size:14px; }
.feature-columns p,.district-card p { margin:5px 0 0;font-size:14px; }
.district-card {
  display:grid;
  align-content:start;
  color:var(--ink);
  border-top:2px solid var(--stop-color);
  text-decoration:none;
}
.district-card:hover { background:#30213e;border-color:var(--stop-color); }
.district-card span {
  color:var(--stop-color);
  font:700 11px var(--mono);
  letter-spacing:.06em;
  text-transform:uppercase;
}
.district-card strong { margin:5px 0 0;font-size:17px; }
.section-intro { display:flex;align-items:flex-start;justify-content:space-between;gap:14px; }
.section-intro>a { flex:none;min-height:44px;display:inline-flex;align-items:center; }
.site-faq { border-bottom:1px solid #4a3a5a; }
.site-faq details { padding:4px 0;border-top:1px solid #4a3a5a; }
.site-faq summary {
  min-height:44px;
  padding:9px 2px;
  font-weight:750;
  cursor:pointer;
}
.site-faq p { padding-inline:15px; }
.site-cta,.feedback-draft button {
  display:inline-flex;
  justify-content:center;
  align-items:center;
  min-height:44px;
  padding:8px 14px;
  border:0;
  border-radius:8px;
  color:#212811;
  background:#d9f499;
  font-weight:850;
  text-decoration:none;
}
.site-cta:hover,.feedback-draft button:hover { background:#e9ffc3; }
.site-section .back-to-cab { margin-top:19px; }
.site-footer {
  margin-top:35px;
  border-top:1px solid #4b3b5e;
  background:#151020;
}
.site-footer .wrap {
  display:flex;
  align-items:center;
  justify-content:space-between;
  flex-wrap:wrap;
  gap:6px;
  padding:12px 0;
}
.site-footer p { color:#d5c6e6;font-weight:750; }
.site-footer nav { display:flex;flex-wrap:wrap; }
.site-content { max-width:850px; }
.page-heading { padding:28px 0 5px; }
.page-heading h1 { margin:10px 0 0;font-size:clamp(35px,6vw,60px); }
.page-lead { margin:12px 0;font-size:18px;max-width:66ch; }
.guide-toc {
  display:flex;
  flex-wrap:wrap;
  gap:7px;
  margin:18px 0 6px;
}
.guide-toc a {
  display:inline-flex;
  align-items:center;
  min-height:44px;
  padding:6px 11px;
  border:1px solid #59466e;
  border-radius:7px;
  background:#251b34;
  font-size:14px;
  text-decoration:none;
}
.guide-toc a:hover { color:var(--lime);border-color:var(--lime); }
.station-group { scroll-margin-top:12px; }
.station-group ol { margin:12px 0 0;padding-left:29px; }
.station-group li { padding:5px 0 8px 2px;border-top:1px solid #42314f; }
.station-group li::marker { color:#d8c2fb;font:700 13px var(--mono); }
.station-group li>a {
  display:inline-flex;
  align-items:center;
  min-height:44px;
  color:#ecdbff;
  font-weight:800;
}
.station-group li>span { color:#c4aaf0;font-size:13px; }
.station-group li>p { margin:0; }
.feedback-draft { display:grid;gap:7px;max-width:580px;margin:17px 0; }
.feedback-draft label { margin-top:7px;font-weight:750; }
.feedback-draft label span { color:var(--muted);font-weight:450; }
.feedback-draft input,.feedback-draft textarea {
  width:100%;
  min-height:44px;
  padding:9px 11px;
  color:var(--ink);
  background:#2c223b;
  border:1px solid #77638a;
  border-radius:7px;
  font:inherit;
}
.feedback-draft textarea { resize:vertical; }
.feedback-draft button { justify-self:start;margin-top:6px; }
.feedback-draft #feedback-status { margin:1px 0;color:var(--lime); }
@media(max-width:700px) {
  .game-public .mast-in { flex-wrap:wrap; }
  .game-public .site-main-links {
    order:1;
    width:100%;
    border-top:1px solid #373045;
  }
  .guide-intro { grid-template-columns:1fr;gap:14px; }
  .guide-shot { max-width:470px; }
  .stop-examples,.feature-columns,.district-cards { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .section-intro { flex-direction:column;gap:0; }
}
@media(max-width:420px) {
  .game-public .title-detail { margin-top:6px;font-size:15px; }
  .game-public .heading p { margin-top:3px; }
  .site-main-links { gap:1px; }
  .site-main-links a { padding-inline:6px;font-size:12px; }
  .site-mast .brand b { display:none; }
  .stop-examples,.feature-columns { grid-template-columns:1fr; }
  .district-card { padding:10px; }
  .site-footer .wrap { gap:2px; }
  .site-footer a { padding:3px 7px; }
}
@media(max-height:500px) and (orientation:landscape) {
  .game-public .title-detail { margin-top:4px;font-size:13px; }
  .game-public .heading p { margin-top:2px; }
}
