/* Direction: Night Shift Metro — midnight-blue city, warm amber station light,
   striped-orange hazards, cyan Express Line, technical signage display face. */
/* Completed by the platform from the short form: both modes, every
   palette token, each text-on-ground pair at its floor. To restyle, write the
   short form again (the decisions in one :root) and it is completed again. */

:root {
  color-scheme: dark;
  --canvas: #060a16;
  --surface: #0f1832;
  --surface-2: #17224a;
  --border: #283463;
  --border-strong: #51545c;
  --ink: #e9efff;
  --muted: #9aa8cf;
  --accent: #f4a737;
  --accent-hover: #f6b455;
  --accent-ink: #060a16;
  --accent-text: #ffc271;
  --accent-strong: #ffc271;
  --accent-soft: #3a2a12;
  --accent-border: #715125;
  --success: #3ddc97;
  --success-ink: #ffffff;
  --success-soft: #123832;
  --success-strong: #3ddc97;
  --warning: #ffb020;
  --warning-ink: #ffffff;
  --warning-soft: #3d2f18;
  --warning-strong: #ffb020;
  --danger: #ff6b6b;
  --danger-ink: #ffffff;
  --danger-soft: #3d1f29;
  --danger-strong: #ff6b6b;
  --chart-1: #f4a737;
  --chart-2: #9ad166;
  --chart-3: #1cb7b2;
  --chart-4: #8ec2fc;
  --chart-5: #bb7fe0;
  --chart-6: #faa0ac;

  --x-cyan: #39e0ff;
  --x-hazard: #ff7a1a;
  --x-on-photo: #ffffff;
  --font-display: "Chakra Petch", "Inter", system-ui, sans-serif;
  --font-body: "Inter", system-ui, sans-serif;
  --display-weight: 700;
  --display-tracking: -0.01em;
  --radius-card: 16px;
  --radius-btn: 12px;
  --radius-input: 12px;
  --font-mono: "JetBrains Mono Variable", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --font-sans: "Inter", system-ui, sans-serif;
  --eyebrow-tracking: 0.08em;
}

html[data-theme="light"] {
  color-scheme: light;
  --canvas: #ffffff;
  --surface: #ffffff;
  --surface-2: #f3f3f3;
  --border: #dcddde;
  --border-strong: #b4b6b9;
  --ink: #060a16;
  --muted: #6a6c73;
  --accent: #f4a737;
  --accent-hover: #cf8e2f;
  --accent-ink: #060a16;
  --accent-text: #946622;
  --accent-strong: #946622;
  --accent-soft: #fdf3e3;
  --accent-border: #fad7a5;
  --success: #3ddc97;
  --success-ink: #060a16;
  --success-soft: #e8fbf3;
  --success-strong: #227955;
  --warning: #ffb020;
  --warning-ink: #060a16;
  --warning-soft: #fff6e4;
  --warning-strong: #8f6211;
  --danger: #ff6b6b;
  --danger-ink: #060a16;
  --danger-soft: #ffeded;
  --danger-strong: #a84646;
  --chart-1: #c78313;
  --chart-2: #6c9c3c;
  --chart-3: #098e8a;
  --chart-4: #4c96e3;
  --chart-5: #935eb3;
  --chart-6: #df7182;
}

/* Metro Rush — the chrome around the 3D canvas */

#game {
  touch-action: none;
  -webkit-tap-highlight-color: transparent;
}

#stage canvas {
  display: block;
  width: 100%;
  height: 100%;
}

.screen {
  position: absolute;
  inset: 0;
  z-index: 30;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.1rem;
  padding: 1.5rem;
  text-align: center;
  overflow-y: auto;
  background:
    radial-gradient(130% 90% at 50% 0%, rgba(57, 224, 255, 0.12), transparent 62%),
    linear-gradient(180deg, rgba(3, 6, 14, 0.86), rgba(3, 6, 14, 0.96));
  -webkit-backdrop-filter: blur(7px);
  backdrop-filter: blur(7px);
}

.is-hidden {
  display: none !important;
}

/* Amber departure board */
.board {
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  background: linear-gradient(180deg, var(--surface-2), var(--surface));
  padding: 0.5rem 1.1rem;
  font-family: var(--font-display);
  letter-spacing: 0.24em;
  color: var(--accent-strong);
  text-transform: uppercase;
}
.board-flash {
  animation: boardFlash 1.15s steps(1, end) infinite;
}
@keyframes boardFlash {
  0%, 56% { opacity: 1; text-shadow: 0 0 18px var(--accent); }
  57%, 100% { opacity: 0.3; text-shadow: none; }
}

.hud-pill {
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(6, 10, 22, 0.6);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  padding: 0.3rem 0.8rem;
  font-family: var(--font-display);
  line-height: 1.1;
}

/* Three ticket-shaped slots on the HUD */
.ticket-slot {
  width: 2.1rem;
  height: 1.25rem;
  border: 1px solid var(--border);
  background: rgba(6, 10, 22, 0.6);
  clip-path: polygon(0 0, 100% 0, 100% 34%, 88% 50%, 100% 66%, 100% 100%, 0 100%, 0 66%, 12% 50%, 0 34%);
  position: relative;
}
.ticket-slot::after {
  content: "";
  position: absolute;
  inset: 0.26rem 0.48rem;
  border-top: 2px dotted var(--border);
}
.ticket-slot.is-on {
  background: var(--x-cyan);
  border-color: var(--x-cyan);
  box-shadow: 0 0 14px var(--x-cyan);
}
.ticket-slot.is-on::after {
  border-top-color: rgba(0, 0, 0, 0.5);
}

.hint-wrap {
  animation: hintIn 0.26s ease-out;
}
@keyframes hintIn {
  from { transform: translateY(12px); }
  to { transform: translateY(0); }
}

.express-flag {
  animation: expressPulse 0.9s ease-in-out infinite alternate;
}
@keyframes expressPulse {
  from { box-shadow: 0 0 0 0 rgba(57, 224, 255, 0.45); }
  to { box-shadow: 0 0 22px 2px rgba(57, 224, 255, 0.45); }
}

html.reduced-motion .board-flash,
html.reduced-motion .express-flag,
html.reduced-motion .hint-wrap {
  animation: none;
}
