/* ==========================================================================
   NOMNOW: MANUAL MODE — styles
   A warm, typographic war room: ink panels, menu-paper type, one loud orange.
   ========================================================================== */

@font-face {
  font-family: 'Bricolage Grotesque';
  src: url('fonts/bricolage-grotesque-var.woff2') format('woff2');
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'DM Sans';
  src: url('fonts/dm-sans-var.woff2') format('woff2');
  font-weight: 100 1000;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'IBM Plex Mono';
  src: url('fonts/ibm-plex-mono-500.woff2') format('woff2');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #0a0c0f;
  --bg-2: #0f1218;
  --panel: #151a22;
  --panel-2: #1a202a;
  --panel-3: #222a36;
  --line: rgba(246, 237, 223, 0.1);
  --line-2: rgba(246, 237, 223, 0.2);
  --line-3: rgba(246, 237, 223, 0.34);
  --cream: #f6eddf;
  --cream-soft: rgba(246, 237, 223, 0.78);
  --muted: #8e9aa8;
  --muted-2: #64707d;
  --ink: #140d09;

  --orange: #ff6b2c;
  --orange-hot: #ff8654;
  --orange-deep: #bb3f11;
  --yellow: #ffd447;
  --lime: #b8f26a;
  --pink: #ff4f72;
  --cyan: #74d8e6;
  --violet: #f0abfc;

  --good: var(--lime);
  --tight: var(--yellow);
  --late: var(--pink);

  --font-display: 'Bricolage Grotesque', 'Trebuchet MS', 'Arial Black', sans-serif;
  --font-body: 'DM Sans', 'Avenir Next', 'Segoe UI', sans-serif;
  --font-mono: 'IBM Plex Mono', 'SFMono-Regular', Consolas, monospace;

  --wire-h: 36px;
  --radius: 16px;
  --shadow-panel: 0 22px 60px rgba(0, 0, 0, 0.22);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
  margin: 0;
  overflow: hidden;
  background: var(--bg);
}

body {
  color: var(--cream);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overscroll-behavior: none;
}

button {
  font: inherit;
  color: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button:focus-visible,
a:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid var(--yellow);
  outline-offset: 3px;
}

::selection {
  background: var(--orange);
  color: var(--ink);
}

[hidden] {
  display: none !important;
}

kbd {
  font-family: var(--font-mono);
  font-size: 0.86em;
  font-weight: 500;
  border: 1px solid var(--line-2);
  border-bottom-width: 2px;
  border-radius: 4px;
  padding: 1px 5px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--cream);
  white-space: nowrap;
}

/* Film grain + ambient light across everything */
.grain {
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: none;
  opacity: 0.05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 180px 180px;
  mix-blend-mode: overlay;
}

#app {
  position: relative;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
  background: var(--bg);
  isolation: isolate;
}

.screen {
  height: 100%;
}

/* Shared bits ------------------------------------------------------------- */

.wordmark {
  display: inline-flex;
  align-items: baseline;
  font-family: var(--font-display);
  font-weight: 800;
  line-height: 0.8;
  letter-spacing: -0.065em;
  color: var(--cream);
  position: relative;
  white-space: nowrap;
  user-select: none;
}
.wordmark-dot {
  display: inline-block;
  width: 0.17em;
  height: 0.17em;
  border-radius: 50%;
  background: var(--orange);
  margin-left: 0.09em;
  box-shadow: 0 0 0.4em rgba(255, 107, 44, 0.6);
}
.wordmark--small {
  font-size: 36px;
  padding-right: 0.18em;
}
.wordmark--hud {
  font-size: 31px;
  padding-right: 0.18em;
}

.pulse-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--pink);
  box-shadow: 0 0 0 3px rgba(255, 79, 114, 0.16);
  display: inline-block;
  animation: pulse 1.6s ease-in-out infinite;
}

.icon {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  display: block;
}
.icon-play {
  display: none;
}

/* Buttons ----------------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 46px;
  padding: 0 22px;
  border-radius: 13px;
  border: 1px solid transparent;
  background: transparent;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 13.5px;
  letter-spacing: 0.055em;
  line-height: 1;
  cursor: pointer;
  user-select: none;
  text-align: center;
  transition: transform 0.12s ease, box-shadow 0.12s ease, background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.btn:hover {
  transform: translateY(-2px);
}
.btn:active {
  transform: translateY(1px);
}
.btn-primary {
  color: #1b0d06;
  background: linear-gradient(180deg, var(--orange-hot), var(--orange) 55%, #f35a1b);
  border-color: #2a1208;
  box-shadow: 0 4px 0 #9a340f, 0 18px 38px rgba(255, 107, 44, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.35);
}
.btn-primary:hover {
  box-shadow: 0 6px 0 #9a340f, 0 24px 46px rgba(255, 107, 44, 0.36), inset 0 1px 0 rgba(255, 255, 255, 0.35);
}
.btn-primary:active {
  box-shadow: 0 1px 0 #9a340f, 0 8px 18px rgba(255, 107, 44, 0.24), inset 0 1px 0 rgba(255, 255, 255, 0.35);
}
.btn-outline {
  color: var(--cream);
  background: rgba(255, 255, 255, 0.025);
  border-color: var(--line-2);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}
.btn-outline:hover {
  background: rgba(255, 255, 255, 0.065);
  border-color: var(--line-3);
}
.btn-quiet {
  color: var(--muted);
  border-color: transparent;
  min-height: 40px;
  padding: 0 12px;
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 10px;
  letter-spacing: 0.1em;
  text-decoration: underline;
  text-underline-offset: 4px;
  text-decoration-color: rgba(246, 237, 223, 0.25);
}
.btn-quiet:hover {
  color: var(--cream);
}
.btn-xl {
  min-height: 58px;
  padding: 0 30px;
  font-size: 18px;
  letter-spacing: 0.07em;
  border-radius: 15px;
}
.btn-outline.btn-xl {
  font-size: 15px;
  letter-spacing: 0.09em;
}

/* ==========================================================================
   SPLASH / TITLE
   ========================================================================== */

.splash {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 0 clamp(20px, 3.4vw, 58px);
  overflow-x: hidden;
  overflow-y: auto;
  background:
    radial-gradient(1000px 620px at 78% 24%, rgba(255, 107, 44, 0.17), transparent 62%),
    radial-gradient(900px 640px at 6% 104%, rgba(116, 216, 230, 0.06), transparent 58%),
    linear-gradient(180deg, #0b0d10 0%, #0b0d10 70%, #090b0d 100%);
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.18) transparent;
}
.splash::before {
  content: '';
  position: absolute;
  inset: 0 0 auto 0;
  height: 82%;
  background-image: radial-gradient(rgba(246, 237, 223, 0.1) 1px, transparent 1px);
  background-size: 28px 28px;
  -webkit-mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.85), transparent 92%);
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.85), transparent 92%);
  pointer-events: none;
  z-index: 0;
}
.splash::after {
  content: 'ORDER 404';
  position: absolute;
  left: -2vw;
  bottom: 4vh;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(140px, 25vw, 380px);
  letter-spacing: -0.07em;
  line-height: 0.7;
  color: transparent;
  -webkit-text-stroke: 1px rgba(246, 237, 223, 0.035);
  pointer-events: none;
  z-index: 0;
  white-space: nowrap;
}
.splash > * {
  position: relative;
  z-index: 1;
}

.splash-bar {
  flex: none;
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  border-bottom: 1px solid var(--line);
}
.splash-status {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 8px 14px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.13em;
  color: var(--cream-soft);
  background: rgba(255, 79, 114, 0.06);
  border: 1px solid rgba(255, 79, 114, 0.26);
  border-radius: 999px;
  white-space: nowrap;
}
.splash-chip {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.11em;
  color: #1a0e08;
  background: var(--yellow);
  padding: 9px 13px;
  border-radius: 4px;
  transform: rotate(-1.4deg);
  box-shadow: 4px 4px 0 rgba(0, 0, 0, 0.42);
  white-space: nowrap;
}

.splash-main {
  width: 100%;
  max-width: 1480px;
  margin: 0 auto;
  flex: 1 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1.07fr) minmax(0, 0.93fr);
  align-items: center;
  gap: clamp(24px, 4vw, 72px);
  padding: clamp(16px, 2.6vh, 32px) 0 clamp(13px, 2.1vh, 24px);
}

.hero-copy {
  min-width: 0;
  padding-bottom: 4px;
}
.eyebrow {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 11px;
  margin: 0 0 clamp(12px, 2vh, 22px);
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 10.5px;
  letter-spacing: 0.15em;
  color: var(--muted);
}
.eyebrow span {
  color: var(--orange);
  background: rgba(255, 107, 44, 0.1);
  border: 1px solid rgba(255, 107, 44, 0.28);
  padding: 5px 8px;
  border-radius: 4px;
  line-height: 1;
}

.hero-title {
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  width: fit-content;
  max-width: 100%;
}
.hero-logo {
  display: inline-block;
  position: relative;
  padding-right: 0.16em;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(82px, 9vw, 144px);
  line-height: 0.76;
  letter-spacing: -0.078em;
  color: var(--cream);
  text-shadow: 0 20px 50px rgba(0, 0, 0, 0.4);
  white-space: nowrap;
}
.hero-logo .wordmark-dot {
  position: absolute;
  right: 0.01em;
  bottom: 0.075em;
  width: 0.155em;
  height: 0.155em;
  margin: 0;
  box-shadow: 0 0 0.5em rgba(255, 107, 44, 0.7);
  animation: dotPulse 3.4s ease-in-out infinite;
}
.hero-mode {
  display: inline-block;
  margin-top: clamp(10px, 1.5vh, 18px);
  margin-left: clamp(2px, 0.6vw, 9px);
  padding: 0.035em 0.25em 0.12em 0.22em;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(35px, 4.2vw, 64px);
  line-height: 1;
  letter-spacing: -0.018em;
  color: #1a0d07;
  background: linear-gradient(180deg, #ff8250, var(--orange) 58%, #f35a1b);
  border-radius: 3px;
  transform: rotate(-1.7deg);
  box-shadow: 7px 7px 0 var(--cream), 14px 14px 0 rgba(0, 0, 0, 0.38);
  white-space: nowrap;
}

.hero-tag {
  margin: clamp(18px, 2.6vh, 30px) 0 clamp(10px, 1.4vh, 14px);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(22px, 2.25vw, 33px);
  line-height: 1.12;
  letter-spacing: -0.025em;
  color: var(--cream);
}
.hero-tag em {
  font-style: normal;
  color: var(--orange);
  display: inline-block;
  position: relative;
}
.hero-tag em::after {
  content: '';
  position: absolute;
  left: 0;
  right: -0.06em;
  bottom: -0.08em;
  height: 0.1em;
  border-radius: 99px;
  background: var(--orange);
  opacity: 0.65;
  transform: rotate(-1deg);
}
.hero-lede {
  max-width: 60ch;
  margin: 0;
  font-size: clamp(14.5px, 1.08vw, 16.5px);
  line-height: 1.64;
  color: #b6c0ca;
}
.hero-lede strong {
  display: inline;
  color: var(--cream);
  font-weight: 700;
  background: linear-gradient(transparent 62%, rgba(255, 107, 44, 0.3) 62%);
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 13px;
  margin: clamp(18px, 2.6vh, 28px) 0 clamp(14px, 2vh, 22px);
}
.hero-actions .icon {
  width: 22px;
  height: 22px;
  stroke-width: 2.4;
  transition: transform 0.18s ease;
}
.hero-actions .btn-primary:hover .icon {
  transform: translateX(4px);
}

.hero-meta {
  max-width: 600px;
  border-top: 1px solid var(--line);
  padding-top: clamp(10px, 1.4vh, 14px);
}
.mode-picker {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  max-width: 490px;
}
.mode-btn {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  min-height: 48px;
  padding: 8px 11px 7px;
  text-align: left;
  cursor: pointer;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.022);
  border: 1px solid var(--line);
  border-radius: 10px;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}
.mode-btn:hover {
  border-color: var(--line-3);
  background: rgba(255, 255, 255, 0.04);
}
.mode-name {
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 11px;
  letter-spacing: 0.09em;
  color: var(--cream-soft);
  line-height: 1.2;
}
.mode-blurb {
  font-size: 10.5px;
  line-height: 1.3;
  color: var(--muted);
}
.mode-btn.is-active {
  color: var(--cream);
  background: rgba(255, 107, 44, 0.12);
  border-color: rgba(255, 107, 44, 0.7);
  box-shadow: inset 0 0 0 1px rgba(255, 107, 44, 0.22), 0 10px 26px rgba(255, 107, 44, 0.08);
}
.mode-btn.is-active .mode-name {
  color: var(--orange);
}
.mode-btn.is-active .mode-blurb {
  color: var(--cream-soft);
}
.best-line {
  margin: 9px 0 0;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  line-height: 1.5;
  color: var(--muted-2);
}
.best-line b {
  color: var(--cream);
  font-weight: 500;
}

/* ---- Splash artwork: a tiny diorama of the worst Friday ever ------------ */

.hero-art {
  min-width: 0;
  display: flex;
  justify-content: center;
  align-items: center;
}
.art-stage {
  position: relative;
  width: min(100%, 526px);
  aspect-ratio: 1 / 1.03;
  border-radius: 30px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  background:
    radial-gradient(95% 80% at 72% 18%, rgba(255, 107, 44, 0.24), transparent 55%),
    radial-gradient(80% 75% at 10% 100%, rgba(116, 216, 230, 0.1), transparent 56%),
    linear-gradient(165deg, #151b23 0%, #0c1015 100%);
  box-shadow: 0 46px 110px rgba(0, 0, 0, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  overflow: hidden;
  isolation: isolate;
  transform: rotate(0.4deg);
}
.art-sun {
  position: absolute;
  width: 72%;
  aspect-ratio: 1;
  right: -24%;
  top: -28%;
  border-radius: 50%;
  background: radial-gradient(circle at 40% 45%, #ff8a57 0%, #f65e22 34%, #a93810 58%, rgba(80, 20, 5, 0) 73%);
  filter: blur(10px);
  opacity: 0.6;
  z-index: 0;
}
.art-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(246, 237, 223, 0.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(246, 237, 223, 0.055) 1px, transparent 1px);
  background-size: 30px 30px;
  -webkit-mask-image: radial-gradient(95% 85% at 55% 45%, rgba(0, 0, 0, 0.95), transparent 85%);
  mask-image: radial-gradient(95% 85% at 55% 45%, rgba(0, 0, 0, 0.95), transparent 85%);
  z-index: 0;
}
.art-word {
  position: absolute;
  right: -12px;
  bottom: -58px;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(180px, 21vw, 300px);
  line-height: 0.8;
  letter-spacing: -0.08em;
  color: transparent;
  -webkit-text-stroke: 1.5px rgba(246, 237, 223, 0.075);
  z-index: 0;
  pointer-events: none;
  user-select: none;
}

.ticket-card {
  position: absolute;
  top: 9%;
  left: 8%;
  width: 64%;
  z-index: 2;
  padding: clamp(14px, 2vw, 20px) clamp(15px, 2.2vw, 23px) clamp(12px, 1.7vw, 17px);
  color: #17110b;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.36), rgba(255, 255, 255, 0) 22%),
    repeating-linear-gradient(0deg, rgba(23, 17, 11, 0.022) 0 1px, transparent 1px 3px),
    #f1e6d2;
  border-radius: 5px;
  transform: rotate(-4.6deg);
  box-shadow: 0 28px 50px rgba(0, 0, 0, 0.55), 0 2px 0 rgba(255, 255, 255, 0.45) inset, -6px 0 0 rgba(221, 206, 182, 0.7);
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: clamp(9px, 0.84vw, 11.5px);
}
.ticket-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}
.ticket-brand {
  display: inline-flex;
  align-items: baseline;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(17px, 1.8vw, 25px);
  letter-spacing: -0.06em;
  line-height: 1;
}
.ticket-brand i {
  width: 0.17em;
  height: 0.17em;
  border-radius: 50%;
  background: var(--orange);
  margin-left: 0.08em;
  display: inline-block;
}
.ticket-order {
  font-size: 0.8em;
  letter-spacing: 0.05em;
  text-align: right;
  line-height: 1.25;
  color: #5c4d3f;
}
.ticket-order b {
  display: block;
  color: #17110b;
  font-size: 1.1em;
  letter-spacing: 0;
}
.ticket-status {
  display: flex;
  align-items: center;
  gap: 7px;
  margin: clamp(8px, 1.2vw, 12px) 0 clamp(8px, 1.2vw, 12px);
  padding: 5px 8px;
  color: var(--lime);
  background: #17120d;
  border-radius: 3px;
  font-size: 0.82em;
  letter-spacing: 0.1em;
}
.blink-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--orange);
  display: inline-block;
  flex: none;
  animation: blink 1.05s steps(2, end) infinite;
}
.ticket-items {
  display: flex;
  flex-direction: column;
  gap: clamp(3px, 0.5vw, 5px);
}
.ticket-items div {
  display: flex;
  align-items: baseline;
  gap: 8px;
  font-size: 0.98em;
  line-height: 1.25;
}
.ticket-items span {
  font-size: 0.86em;
  color: #7b6a57;
  flex: none;
  width: 3.3em;
}
.ticket-items em {
  font-style: normal;
  font-size: 0.84em;
  color: #ae3c1a;
  margin-left: auto;
}
.ticket-dash {
  height: 1px;
  margin: clamp(8px, 1.2vw, 12px) 0 clamp(7px, 1vw, 10px);
  background: repeating-linear-gradient(90deg, #9d8d79 0 5px, transparent 5px 9px);
  opacity: 0.65;
}
.ticket-tracker {
  padding: 5px 7px;
  font-size: 0.8em;
  letter-spacing: 0.05em;
  color: #5b4b3b;
  border: 1px dashed #a5947e;
  border-radius: 2px;
  background: rgba(222, 206, 181, 0.45);
  white-space: nowrap;
  overflow: hidden;
}
.glitch-line {
  display: inline-block;
  color: #bd3d17;
  font-weight: 600;
  letter-spacing: 0.08em;
  animation: glitch 3.8s steps(1, end) infinite;
}
.ticket-bottom {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 10px;
  margin-top: clamp(8px, 1.2vw, 12px);
}
.ticket-bottom small {
  display: block;
  font-size: 0.72em;
  letter-spacing: 0.12em;
  color: #7b6a57;
}
.ticket-bottom b {
  display: block;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(21px, 2.4vw, 33px);
  line-height: 0.95;
  letter-spacing: -0.04em;
}
.ticket-barcode {
  width: clamp(62px, 7vw, 100px);
  height: clamp(22px, 2.5vw, 31px);
  flex: none;
  background: repeating-linear-gradient(90deg, #17110b 0 2px, transparent 2px 4px, #17110b 4px 5px, transparent 5px 8px, #17110b 8px 11px, transparent 11px 12px);
}
.ticket-stamp {
  position: absolute;
  left: -13%;
  right: auto;
  bottom: -1%;
  padding: 5px 10px 5px;
  border: 2.5px solid #b53527;
  border-radius: 5px;
  color: #b53527;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(17px, 2.05vw, 29px);
  line-height: 0.86;
  letter-spacing: -0.01em;
  text-align: center;
  transform: rotate(-8deg);
  opacity: 0.9;
  background: rgba(241, 230, 210, 0.82);
}
.ticket-stamp small {
  display: block;
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 0.42em;
  letter-spacing: 0.22em;
  margin-top: 2px;
}

.tag-down {
  position: absolute;
  top: 4.5%;
  right: 3.5%;
  z-index: 4;
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 8px 12px 8px 8px;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(10.5px, 1.07vw, 14.5px);
  letter-spacing: 0.025em;
  line-height: 1;
  color: #18070c;
  background: var(--pink);
  border-radius: 4px;
  transform: rotate(4.5deg);
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.42), 4px 4px 0 #140a07;
  white-space: nowrap;
}
.tag-down span {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #18070c;
  color: var(--pink);
  display: grid;
  place-items: center;
  font-family: var(--font-mono);
  font-size: 11px;
  flex: none;
}

.eta-ticket {
  position: absolute;
  right: 3%;
  top: 35%;
  z-index: 3;
  width: clamp(104px, 10.8vw, 148px);
  padding: clamp(9px, 1.15vw, 13px) clamp(10px, 1.25vw, 15px) clamp(7px, 0.9vw, 10px);
  color: #1b1409;
  background:
    linear-gradient(165deg, rgba(255, 255, 255, 0.35), rgba(255, 255, 255, 0) 45%),
    var(--yellow);
  border-radius: 11px;
  transform: rotate(4deg);
  box-shadow: 0 18px 34px rgba(0, 0, 0, 0.48), 5px 5px 0 rgba(0, 0, 0, 0.36);
  font-family: var(--font-mono);
  font-weight: 500;
}
.eta-ticket small {
  display: block;
  font-size: 0.55rem;
  letter-spacing: 0.11em;
  line-height: 1.25;
  color: rgba(27, 20, 9, 0.68);
}
.eta-ticket strong {
  display: block;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(40px, 4.5vw, 62px);
  line-height: 0.82;
  letter-spacing: -0.055em;
  margin: 3px 0 1px;
}
.eta-ticket span {
  display: block;
  text-align: right;
  font-size: 0.66rem;
  letter-spacing: 0.06em;
  color: rgba(27, 20, 9, 0.7);
}

.bubble {
  position: absolute;
  z-index: 5;
  display: flex;
  align-items: flex-start;
  gap: 8px;
  max-width: 47%;
  padding: 8px 12px 8px 8px;
  border-radius: 14px;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.38);
  font-size: clamp(9.5px, 0.88vw, 12px);
  line-height: 1.25;
}
.bubble-ava {
  width: 25px;
  height: 25px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  flex: none;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 12px;
  letter-spacing: -0.03em;
}
.bubble b {
  display: block;
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0.66;
  margin-bottom: 1px;
}
.bubble p {
  margin: 0;
  font-weight: 600;
}
.bubble-eng {
  left: 4%;
  bottom: 21%;
  color: #071418;
  background: var(--cyan);
  border-radius: 15px 15px 15px 4px;
  transform: rotate(-2.4deg);
}
.bubble-eng .bubble-ava {
  color: #071418;
  background: #0b1f24;
  color: var(--cyan);
}
.bubble-kitchen {
  right: 5%;
  bottom: 5%;
  color: #17100a;
  background: var(--cream);
  border-radius: 15px 15px 4px 15px;
  transform: rotate(2.2deg);
}
.bubble-kitchen .bubble-ava {
  color: var(--orange);
  background: #25170f;
}

.float-emoji {
  position: absolute;
  z-index: 3;
  line-height: 1;
  filter: drop-shadow(0 12px 10px rgba(0, 0, 0, 0.45));
  user-select: none;
  animation: floaty 5.4s ease-in-out infinite alternate;
}
.fe-1 {
  top: 4%;
  left: 46%;
  font-size: clamp(28px, 3.1vw, 44px);
  transform: rotate(-14deg);
}
.fe-2 {
  bottom: 3%;
  left: 35%;
  font-size: clamp(34px, 4vw, 56px);
  transform: rotate(9deg);
  animation-delay: -2.4s;
}
.fe-3 {
  top: 63%;
  left: 2.5%;
  font-size: clamp(27px, 3vw, 42px);
  transform: rotate(-9deg);
  animation-delay: -1.1s;
}

.tape {
  position: absolute;
  z-index: 6;
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: clamp(7px, 0.7vw, 9.5px);
  letter-spacing: 0.14em;
  line-height: 1;
  color: #1b1409;
  background: var(--yellow);
  padding: 7px 18px;
  white-space: nowrap;
  text-align: center;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.35);
}
.tape-a {
  top: 62%;
  left: -9%;
  width: 86%;
  transform: rotate(-5deg);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.32), rgba(255, 255, 255, 0) 55%),
    var(--yellow);
}
.tape-b {
  bottom: 2%;
  right: -11%;
  width: 86%;
  transform: rotate(-5deg);
  background: var(--cream);
  color: #2a1a0c;
  opacity: 0.9;
  z-index: 1;
}

/* ---- Splash lower section ------------------------------------------------ */

.handbook {
  width: 100%;
  max-width: 1480px;
  margin: 0 auto;
  flex: none;
  border-top: 1px solid var(--line);
  padding: clamp(8px, 1.2vh, 14px) 0 clamp(6px, 0.9vh, 10px);
}
.handbook-head {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.16em;
  color: var(--muted);
}
.handbook-head i {
  flex: 1;
  height: 1px;
  background: var(--line);
}
.handbook-head span:last-child {
  color: var(--orange);
}
.handbook-cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(16px, 2.4vw, 38px);
  margin-top: clamp(6px, 0.9vh, 10px);
}
.hb-card {
  display: flex;
  align-items: flex-start;
  gap: clamp(10px, 1vw, 15px);
  min-width: 0;
  padding: 0;
}
.hb-num {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(30px, 2.7vw, 40px);
  line-height: 0.86;
  letter-spacing: -0.05em;
  color: var(--orange);
  flex: none;
  width: 1.35em;
  padding-top: 2px;
}
.hb-card h2 {
  margin: 0 0 4px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 14px;
  line-height: 1.1;
  letter-spacing: 0.065em;
  color: var(--cream);
}
.hb-card p {
  margin: 0;
  font-size: 12.3px;
  line-height: 1.52;
  color: #9aa7b4;
  max-width: 40ch;
}
.hb-card p b {
  color: var(--cream);
  font-weight: 700;
}

.splash-foot {
  width: 100%;
  max-width: 1480px;
  margin: 0 auto;
  flex: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  border-top: 1px solid var(--line);
  padding: 9px 0 11px;
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.13em;
  color: var(--muted-2);
  text-transform: uppercase;
}

/* ==========================================================================
   GAME
   ========================================================================== */

.game {
  position: relative;
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 0 clamp(10px, 1.4vw, 22px);
  background:
    radial-gradient(1100px 500px at 70% -10%, rgba(255, 107, 44, 0.1), transparent 62%),
    radial-gradient(800px 500px at 0% 110%, rgba(116, 216, 230, 0.045), transparent 60%),
    #0a0c0f;
}

/* ---- HUD ---------------------------------------------------------------- */

.hud {
  position: relative;
  z-index: 12;
  flex: none;
  display: grid;
  grid-template-columns: minmax(170px, 1.02fr) auto minmax(140px, 0.84fr) minmax(220px, 1.14fr) auto;
  align-items: center;
  gap: clamp(12px, 2vw, 34px);
  min-height: 80px;
  padding: 11px 0 10px;
  border-bottom: 1px solid var(--line);
}
.hud-brand {
  display: flex;
  align-items: center;
  gap: clamp(9px, 1vw, 15px);
  min-width: 0;
}
.hud-live {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 9.5px;
  letter-spacing: 0.1em;
  line-height: 1.2;
  color: #aab4c0;
  white-space: nowrap;
}
.live-row {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.live-row b {
  color: var(--pink);
  font-weight: 500;
}
.live-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--pink);
  box-shadow: 0 0 0 3px rgba(255, 79, 114, 0.15);
  flex: none;
  animation: pulse 1.5s ease-in-out infinite;
}
.hud-mode {
  font-size: 8px;
  letter-spacing: 0.15em;
  color: var(--muted-2);
}

.hud-clock {
  position: relative;
  display: grid;
  grid-template-columns: auto auto;
  align-items: center;
  column-gap: 11px;
  padding: 7px 15px 7px 14px;
  border: 1px solid rgba(255, 212, 71, 0.36);
  border-radius: 12px;
  background: linear-gradient(180deg, rgba(255, 212, 71, 0.105), rgba(255, 212, 71, 0.025));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06), 0 10px 30px rgba(0, 0, 0, 0.16);
  transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
  white-space: nowrap;
}
.clock-kicker {
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 8.5px;
  letter-spacing: 0.14em;
  color: var(--yellow);
  opacity: 0.82;
  align-self: end;
  line-height: 1;
}
#etaTime {
  grid-column: 2;
  grid-row: 1 / span 2;
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 27px;
  line-height: 0.95;
  letter-spacing: -0.045em;
  color: var(--cream);
  font-variant-numeric: tabular-nums;
}
.clock-note {
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 8px;
  letter-spacing: 0.02em;
  color: rgba(246, 237, 223, 0.52);
  align-self: start;
  line-height: 1.2;
  max-width: 120px;
  overflow: hidden;
  text-overflow: ellipsis;
}
.eta-delta {
  position: absolute;
  top: -11px;
  right: 9px;
  padding: 3px 7px 2px;
  border-radius: 5px;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 13px;
  line-height: 1.1;
  color: #1b070d;
  transform: translateY(5px) rotate(3deg);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.18s ease, transform 0.18s ease;
  z-index: 2;
}
.eta-delta:not(:empty) {
  opacity: 1;
  transform: rotate(3deg);
}
.eta-delta.is-bad {
  background: var(--pink);
}
.eta-delta.is-good {
  background: var(--lime);
}
.hud-clock.is-bumped {
  animation: shake 0.5s ease both;
  border-color: rgba(255, 79, 114, 0.7);
  background: linear-gradient(180deg, rgba(255, 79, 114, 0.19), rgba(255, 79, 114, 0.05));
}
.hud-clock.is-bumped-good {
  animation: bumpGood 0.55s ease both;
  border-color: rgba(184, 242, 106, 0.75);
  background: linear-gradient(180deg, rgba(184, 242, 106, 0.15), rgba(184, 242, 106, 0.04));
}
.hud-clock.is-imminent:not(.is-bumped):not(.is-bumped-good) {
  border-color: rgba(255, 79, 114, 0.5);
  animation: imminent 1s ease-in-out infinite;
}

.hud-stage {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.stage-kicker {
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 8.5px;
  letter-spacing: 0.13em;
  color: var(--muted);
  line-height: 1.2;
}
.stage-kicker b {
  color: var(--orange);
  font-weight: 500;
}
.stage-kicker span {
  color: var(--muted-2);
}
#stageName {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 16.5px;
  line-height: 1.08;
  letter-spacing: 0.01em;
  color: var(--cream);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.stage-tag {
  font-size: 10.5px;
  line-height: 1.3;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 250px;
}

.hud-meters {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: end;
  gap: clamp(14px, 1.8vw, 28px);
  min-width: 0;
}
.meter {
  min-width: 0;
}
.meter-top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 5px;
}
.meter-label {
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 9px;
  letter-spacing: 0.13em;
  color: var(--muted);
  white-space: nowrap;
}
.meter-top strong {
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 20px;
  line-height: 0.9;
  letter-spacing: -0.04em;
  color: var(--cream);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.meter-track {
  height: 7px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.075);
  overflow: hidden;
}
.meter-track i {
  display: block;
  height: 100%;
  width: 60%;
  border-radius: 99px;
  background: linear-gradient(90deg, #ffc93c, var(--lime));
  transition: width 0.25s ease, background 0.25s ease;
}
.meter.is-low .meter-top strong {
  color: var(--pink);
}
.meter.is-low .meter-track i {
  background: linear-gradient(90deg, #ff2e5b, var(--pink));
}
.cash-burn {
  display: block;
  margin-top: 5px;
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 8px;
  letter-spacing: 0.035em;
  color: var(--muted-2);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.hud-controls {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
}
.icon-btn {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  flex: none;
  cursor: pointer;
  color: var(--cream);
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.028);
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 13px;
  transition: background 0.14s ease, border-color 0.14s ease, color 0.14s ease, transform 0.1s ease;
}
.icon-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--line-3);
}
.icon-btn:active {
  transform: translateY(1px);
}
.icon-btn .icon {
  width: 18px;
  height: 18px;
}
.speed-btn {
  font-size: 14px;
  letter-spacing: -0.03em;
}
.speed-btn.is-fast {
  color: #1b1307;
  background: var(--yellow);
  border-color: var(--yellow);
  box-shadow: 0 0 18px rgba(255, 212, 71, 0.25);
}
.help-btn {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 18px;
}
#btnMute .icon-muted {
  display: none;
}
#btnMute.is-muted {
  color: var(--muted);
}
#btnMute.is-muted .icon-sound {
  display: none;
}
#btnMute.is-muted .icon-muted {
  display: block;
}

/* ---- Mobile tabs (hidden on desktop) ----------------------------------- */

.mobile-tabs {
  display: none;
}

/* ---- The floor ---------------------------------------------------------- */

.floor {
  position: relative;
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(0, 1.04fr) minmax(0, 0.92fr) minmax(0, 1.04fr);
  gap: clamp(8px, 0.95vw, 15px);
  padding: 12px 0 10px;
}

.panel {
  --accent: var(--orange);
  position: relative;
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(25, 31, 41, 0.94), rgba(16, 20, 27, 0.97));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.045), var(--shadow-panel);
}
.orders-panel {
  --accent: var(--orange);
}
.drivers-panel {
  --accent: var(--cyan);
}
.tickets-panel {
  --accent: var(--pink);
}

.panel-head {
  position: relative;
  flex: none;
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 12px 14px 11px;
  border-bottom: 1px solid var(--line);
}
.panel-head::before {
  content: '';
  position: absolute;
  top: -1px;
  left: 14px;
  width: 54px;
  height: 2px;
  border-radius: 0 0 3px 3px;
  background: var(--accent);
}
.ph-icon {
  width: 34px;
  height: 34px;
  flex: none;
  display: grid;
  place-items: center;
  color: var(--cream);
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.045);
}
.orders-panel .ph-icon {
  color: var(--orange);
  border-color: rgba(255, 107, 44, 0.3);
  background: rgba(255, 107, 44, 0.075);
}
.drivers-panel .ph-icon {
  color: var(--cyan);
  border-color: rgba(116, 216, 230, 0.28);
  background: rgba(116, 216, 230, 0.065);
}
.tickets-panel .ph-icon {
  color: var(--pink);
  border-color: rgba(255, 79, 114, 0.3);
  background: rgba(255, 79, 114, 0.07);
}
.ph-icon svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  display: block;
}
.ph-titles {
  flex: 1;
  min-width: 0;
}
.ph-titles h2 {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 7px;
  margin: 0;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 15.5px;
  line-height: 1.05;
  letter-spacing: 0.035em;
  color: var(--cream);
  white-space: nowrap;
}
.ph-count {
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 9px;
  letter-spacing: 0.045em;
  text-transform: none;
  color: var(--muted);
  padding: 3px 6px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: rgba(0, 0, 0, 0.16);
  white-space: nowrap;
}
.ph-titles p {
  margin: 4px 0 0;
  font-size: 11.5px;
  line-height: 1.25;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.live-pill {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 7px 3px;
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 8.5px;
  letter-spacing: 0.11em;
  color: var(--orange);
  border: 1px solid rgba(255, 107, 44, 0.3);
  border-radius: 99px;
  background: rgba(255, 107, 44, 0.065);
  line-height: 1;
}
.live-pill i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--orange);
  display: inline-block;
  animation: blink 1.2s steps(2, end) infinite;
}

.panel.is-nudged,
.floor > .panel.is-nudged,
.game.is-nudged .tickets-panel {
  animation: nudge 0.5s ease;
}

/* ---- Order board -------------------------------------------------------- */

.order-list {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  display: flex;
  flex-direction: column;
  gap: 9px;
  padding: 10px 10px 15px;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.17) transparent;
}
.order-list::-webkit-scrollbar,
.driver-list::-webkit-scrollbar,
.ticket-area::-webkit-scrollbar,
.modal-card::-webkit-scrollbar {
  width: 8px;
}
.order-list::-webkit-scrollbar-thumb,
.driver-list::-webkit-scrollbar-thumb,
.ticket-area::-webkit-scrollbar-thumb,
.modal-card::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.14);
  border-radius: 99px;
  border: 2px solid transparent;
  background-clip: padding-box;
}

.order-card {
  --kind-color: rgba(246, 237, 223, 0.3);
  position: relative;
  flex: 0 0 auto;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: linear-gradient(180deg, rgba(32, 39, 51, 0.97), rgba(25, 31, 41, 0.97));
  transition: border-color 0.15s ease, background 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}
.order-card.is-new {
  animation: cardIn 0.34s ease both;
}
.order-card::before {
  content: '';
  position: absolute;
  left: 0;
  top: 9px;
  bottom: 9px;
  width: 3px;
  border-radius: 0 3px 3px 0;
  background: var(--kind-color);
  z-index: 2;
  transition: background 0.15s ease;
}
.order-card:hover {
  border-color: rgba(246, 237, 223, 0.25);
  background: linear-gradient(180deg, rgba(37, 45, 58, 0.98), rgba(28, 34, 45, 0.98));
  transform: translateY(-1px);
}
.order-card.is-selected {
  border-color: var(--orange);
  background: linear-gradient(180deg, rgba(58, 39, 27, 0.98), rgba(33, 26, 24, 0.98));
  box-shadow: 0 0 0 1px rgba(255, 107, 44, 0.44), 0 14px 30px rgba(255, 107, 44, 0.13);
}
.order-card.is-selected::before {
  background: var(--orange);
}
.order-card.kind-plus {
  --kind-color: var(--yellow);
}
.order-card.kind-feast {
  --kind-color: var(--violet);
}
.order-card.kind-critic {
  --kind-color: var(--cyan);
  border-color: rgba(116, 216, 230, 0.35);
  background: linear-gradient(180deg, rgba(22, 43, 49, 0.97), rgba(17, 28, 35, 0.97));
}
.order-card.kind-critic:hover {
  border-color: rgba(116, 216, 230, 0.6);
}
.order-card.is-hurry {
  border-color: rgba(255, 212, 71, 0.32);
}
.order-card.is-critical {
  border-color: rgba(255, 79, 114, 0.55);
}
.order-card.is-critical::before {
  background: var(--pink);
}
.order-card.is-critical .oc-bar i {
  background: var(--pink);
}

.oc-select {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
  width: 100%;
  padding: 10px 46px 10px 14px;
  text-align: left;
  color: inherit;
  border: 0;
  border-radius: 12px;
  background: none;
  cursor: pointer;
  font: inherit;
}
.oc-select:focus-visible {
  outline-offset: -3px;
}
.oc-top {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
}
.oc-emoji {
  width: 25px;
  height: 25px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.06);
  font-size: 15px;
  line-height: 1;
}
.oc-code {
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 10px;
  letter-spacing: 0.03em;
  color: var(--muted);
  white-space: nowrap;
}
.oc-tag {
  padding: 2px 5px 1px;
  border: 1px solid transparent;
  border-radius: 4px;
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 8px;
  line-height: 1.35;
  letter-spacing: 0.07em;
  white-space: nowrap;
}
.oc-tag--plus {
  color: var(--yellow);
  border-color: rgba(255, 212, 71, 0.34);
  background: rgba(255, 212, 71, 0.1);
}
.oc-tag--feast {
  color: var(--violet);
  border-color: rgba(240, 171, 252, 0.34);
  background: rgba(240, 171, 252, 0.09);
}
.oc-tag--critic {
  color: #07161a;
  background: var(--cyan);
  border-color: var(--cyan);
}
.oc-tag--car {
  color: var(--cyan);
  border-color: rgba(116, 216, 230, 0.32);
  background: rgba(116, 216, 230, 0.08);
}
.oc-route {
  display: block;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 15px;
  line-height: 1.2;
  color: var(--cream);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.oc-route i {
  font-style: normal;
  font-weight: 500;
  color: var(--orange);
  margin: 0 4px;
}
.oc-items {
  display: block;
  font-size: 11.5px;
  line-height: 1.3;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.oc-meta {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-top: 2px;
  min-width: 0;
}
.oc-pay {
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 12.5px;
  letter-spacing: -0.02em;
  color: var(--lime);
  white-space: nowrap;
}
.oc-trust {
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 9.5px;
  letter-spacing: 0.01em;
  color: rgba(246, 237, 223, 0.66);
  white-space: nowrap;
}
.oc-ready {
  margin-left: auto;
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 8.5px;
  letter-spacing: 0.055em;
  color: var(--yellow);
  white-space: nowrap;
}
.order-card.is-ready .oc-ready {
  color: var(--lime);
}
.oc-time {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-top: 3px;
}
.oc-bar {
  flex: 1;
  height: 4px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.075);
  overflow: hidden;
}
.oc-bar i {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 99px;
  background: var(--lime);
  transition: width 0.2s linear, background 0.2s ease;
}
.oc-left {
  flex: none;
  width: 35px;
  text-align: right;
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 10px;
  letter-spacing: -0.02em;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.order-card.is-hurry .oc-bar i {
  background: var(--yellow);
}
.order-card.is-hurry .oc-left {
  color: var(--yellow);
}
.order-card.is-critical .oc-left {
  color: var(--pink);
}
.oc-void {
  position: absolute;
  z-index: 3;
  top: 9px;
  right: 9px;
  width: 32px;
  height: 28px;
  display: grid;
  place-items: center;
  cursor: pointer;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.2);
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 9.5px;
  letter-spacing: 0.02em;
  transition: background 0.13s ease, color 0.13s ease, border-color 0.13s ease, transform 0.1s ease;
}
.oc-void:hover {
  color: #1b0610;
  background: var(--pink);
  border-color: var(--pink);
}
.oc-void:active {
  transform: scale(0.94);
}

.empty-state {
  --accent: var(--orange);
  margin: auto;
  padding: 28px 24px;
  max-width: 300px;
  text-align: center;
}
.empty-state--inbox {
  --accent: var(--pink);
}
.empty-glyph {
  width: 58px;
  height: 58px;
  margin: 0 auto 14px;
  display: grid;
  place-items: center;
  border: 1px dashed rgba(246, 237, 223, 0.24);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.022);
  font-size: 23px;
  line-height: 1;
  color: var(--accent);
}
.empty-state h3 {
  margin: 0 0 6px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 20px;
  letter-spacing: -0.015em;
  color: var(--cream);
}
.empty-state p {
  margin: 0;
  font-size: 12.5px;
  line-height: 1.55;
  color: var(--muted);
}

/* ---- Map ---------------------------------------------------------------- */

.map-wrap {
  position: relative;
  flex: none;
  margin: 10px 10px 0;
  aspect-ratio: 100 / 64;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #0b1218;
}
.city-map {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 11px;
  overflow: hidden;
  background: #0b1218;
}
.district-label {
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 1.65px;
  letter-spacing: 0.28px;
  fill: rgba(246, 237, 223, 0.26);
}
.map-park-label {
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 1.15px;
  letter-spacing: 0.24px;
  fill: rgba(184, 242, 106, 0.42);
}
.road-minor path {
  fill: none;
  stroke: #8aa0b5;
  stroke-opacity: 0.14;
  stroke-width: 0.34;
  stroke-linecap: round;
}
.road-major path {
  fill: none;
  stroke: #1b2838;
  stroke-width: 1.9;
  stroke-linecap: round;
}
.rail {
  fill: none;
  stroke: #d5b26c;
  stroke-opacity: 0.25;
  stroke-width: 0.26;
  stroke-dasharray: 0.8 1.1;
}
.map-stamps circle {
  fill: var(--cyan);
  fill-opacity: 0.45;
}
.map-order .mo-dot {
  fill: var(--yellow);
  stroke: #0a1016;
  stroke-width: 0.42;
  transition: fill 0.2s ease;
}
.map-order.is-soon .mo-dot {
  fill: var(--orange);
}
.map-order.is-urgent .mo-dot {
  fill: var(--pink);
}
.map-order.is-selected .mo-dot {
  fill: var(--cream);
}
.map-order .mo-ring {
  fill: none;
  stroke: var(--orange);
  stroke-width: 0.42;
  stroke-dasharray: 1.1 1.0;
  transform-box: fill-box;
  transform-origin: center;
  animation: spin 9s linear infinite;
}
.map-route {
  fill: none;
  stroke: var(--orange);
  stroke-width: 0.5;
  stroke-linecap: round;
  stroke-dasharray: 1.6 1.2;
  animation: dashmove 1.25s linear infinite;
}
.map-route--glow {
  stroke-width: 1.9;
  stroke-opacity: 0.15;
  stroke-dasharray: none;
  animation: none;
}
.map-rest-pin circle {
  fill: #2a1d13;
  stroke: var(--orange);
  stroke-width: 0.4;
}
.map-dest-pin .dest-ring {
  fill: none;
  stroke: var(--cream);
  stroke-opacity: 0.75;
  stroke-width: 0.32;
  stroke-dasharray: 0.85 0.85;
  transform-box: fill-box;
  transform-origin: center;
  animation: spin 7s linear infinite;
}
.map-rest-pin text,
.map-dest-pin text {
  font-size: 2.45px;
}
.map-driver .md-body {
  stroke: #080b0e;
  stroke-width: 0.72;
}
.map-driver .md-pulse {
  fill: var(--lime);
  opacity: 0;
}
.map-driver.is-busy .md-pulse {
  fill: var(--orange);
  opacity: 0.25;
  transform-box: fill-box;
  transform-origin: center;
  animation: mapPulse 1.7s ease-out infinite;
}
.md-initials {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 2.25px;
  letter-spacing: -0.05px;
  fill: #0a0e12;
  pointer-events: none;
}
.md-name {
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 1.55px;
  fill: rgba(246, 237, 223, 0.8);
  paint-order: stroke;
  stroke: #0a1117;
  stroke-width: 0.55px;
  stroke-linejoin: round;
  pointer-events: none;
}
.map-legend {
  position: absolute;
  left: 9px;
  bottom: 8px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 4px 7px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 6px;
  background: rgba(7, 11, 15, 0.66);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 8px;
  letter-spacing: 0.04em;
  color: rgba(246, 237, 223, 0.64);
  pointer-events: none;
  z-index: 3;
}
.map-legend span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
}
.lg-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  display: inline-block;
}
.lg-idle {
  background: var(--lime);
}
.lg-busy {
  background: var(--orange);
}
.lg-order {
  background: var(--yellow);
}

/* ---- Dispatch banner / driver list ------------------------------------- */

.dispatch-banner {
  flex: none;
  margin: 8px 10px 0;
  min-height: 51px;
  display: flex;
  align-items: center;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 11px;
  position: relative;
}
.dispatch-banner.is-empty {
  gap: 9px;
  padding: 8px 12px;
  border-style: dashed;
  background: rgba(255, 255, 255, 0.016);
  color: var(--muted);
  font-size: 11.5px;
  line-height: 1.38;
}
.db-arrow {
  flex: none;
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 17px;
  line-height: 1;
  color: var(--orange);
  animation: nudgeLeft 1.9s ease-in-out infinite;
}
.db-hint-copy b {
  color: var(--cream);
  font-weight: 700;
}
.db-hint-copy small {
  display: block;
  margin-top: 1px;
  font-size: 10.5px;
  color: var(--muted-2);
}
.dispatch-banner.is-active {
  border-color: rgba(255, 107, 44, 0.55);
  background: linear-gradient(180deg, rgba(255, 107, 44, 0.17), rgba(255, 107, 44, 0.05));
  box-shadow: inset 0 0 0 1px rgba(255, 107, 44, 0.1);
  animation: bannerGlow 2.4s ease-in-out infinite;
}
.db-active {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 7px 8px 7px 12px;
}
.db-copy {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 1px;
}
.db-kicker {
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 8px;
  letter-spacing: 0.13em;
  color: var(--orange);
}
.db-copy strong {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 13.5px;
  line-height: 1.18;
  color: var(--cream);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.db-copy small {
  font-size: 10.5px;
  line-height: 1.35;
  color: #cbbfaf;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.db-copy small b {
  font-family: var(--font-mono);
  font-weight: 500;
  color: var(--yellow);
}
.db-cancel {
  flex: none;
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  cursor: pointer;
  color: var(--cream);
  border: 1px solid rgba(255, 107, 44, 0.45);
  border-radius: 9px;
  background: rgba(0, 0, 0, 0.16);
  font-family: var(--font-body);
  font-size: 21px;
  font-weight: 400;
  line-height: 1;
  transition: background 0.13s ease, transform 0.1s ease;
}
.db-cancel:hover {
  background: rgba(255, 107, 44, 0.3);
}
.db-cancel:active {
  transform: scale(0.94);
}

.driver-list {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 8px 10px 15px;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.17) transparent;
}
.driver-list-head {
  flex: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 1px 4px 2px;
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 8.5px;
  letter-spacing: 0.11em;
  color: var(--muted-2);
  white-space: nowrap;
}
.driver-row {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 55px;
  padding: 8px 10px 8px 9px;
  text-align: left;
  cursor: pointer;
  color: inherit;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.022);
  font: inherit;
  position: relative;
  transition: border-color 0.13s ease, background 0.13s ease, transform 0.1s ease;
}
.driver-row:hover:not(:disabled) {
  border-color: rgba(246, 237, 223, 0.28);
  background: rgba(255, 255, 255, 0.05);
}
.driver-row:active:not(:disabled) {
  transform: translateY(1px);
}
.driver-row:disabled {
  cursor: default;
}
.driver-row.is-busy {
  background: rgba(255, 255, 255, 0.016);
}
.driver-row.is-preview.is-good {
  border-color: rgba(184, 242, 106, 0.4);
  background: linear-gradient(90deg, rgba(184, 242, 106, 0.09), rgba(255, 255, 255, 0.02) 78%);
}
.driver-row.is-preview.is-good:hover {
  border-color: rgba(184, 242, 106, 0.7);
  background: linear-gradient(90deg, rgba(184, 242, 106, 0.16), rgba(255, 255, 255, 0.03) 80%);
}
.driver-row.is-preview.is-tight {
  border-color: rgba(255, 212, 71, 0.42);
  background: linear-gradient(90deg, rgba(255, 212, 71, 0.08), rgba(255, 255, 255, 0.02) 78%);
}
.driver-row.is-preview.is-tight:hover {
  border-color: rgba(255, 212, 71, 0.72);
  background: linear-gradient(90deg, rgba(255, 212, 71, 0.15), rgba(255, 255, 255, 0.03) 80%);
}
.driver-row.is-preview.is-late {
  border-color: rgba(255, 79, 114, 0.4);
  background: linear-gradient(90deg, rgba(255, 79, 114, 0.075), rgba(255, 255, 255, 0.02) 78%);
}
.driver-row.is-preview.is-late:hover {
  border-color: rgba(255, 79, 114, 0.7);
  background: linear-gradient(90deg, rgba(255, 79, 114, 0.14), rgba(255, 255, 255, 0.03) 80%);
}
.driver-row.is-blocked {
  opacity: 0.55;
  background: transparent;
  border-style: dashed;
}
.dr-avatar {
  flex: none;
  width: 37px;
  height: 37px;
  display: grid;
  place-items: center;
  border-radius: 11px;
  color: #0c1116;
  background: var(--accent, var(--orange));
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 12px;
  letter-spacing: -0.02em;
  box-shadow: inset 0 -2px 0 rgba(0, 0, 0, 0.16), 0 0 0 2px rgba(0, 0, 0, 0.22);
  user-select: none;
}
.dr-main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.dr-name {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 14px;
  line-height: 1.12;
  color: var(--cream);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.dr-role {
  flex: none;
  font-family: var(--font-mono);
  font-weight: 500;
  font-style: normal;
  font-size: 7.5px;
  letter-spacing: 0.085em;
  line-height: 1.15;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 2px 4px 1px;
  background: rgba(0, 0, 0, 0.16);
}
.dr-status {
  display: block;
  min-width: 0;
  font-size: 11px;
  line-height: 1.3;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.driver-row.is-busy .dr-status {
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 9.5px;
  letter-spacing: 0.005em;
  color: #a0acb8;
}
.dr-progress {
  display: block;
  height: 3px;
  margin-top: 4px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.075);
  overflow: hidden;
}
.dr-progress i {
  display: block;
  width: 0%;
  height: 100%;
  border-radius: 99px;
  background: var(--orange);
  transition: width 0.2s linear;
}
.dr-eta {
  flex: none;
  min-width: 77px;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
  text-align: right;
}
.dr-eta b {
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 10.5px;
  line-height: 1.15;
  letter-spacing: 0.055em;
  color: var(--muted);
  white-space: nowrap;
}
.dr-eta small {
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 8.5px;
  line-height: 1.25;
  letter-spacing: 0.01em;
  color: var(--muted);
  white-space: nowrap;
}
.dr-eta--good b {
  color: var(--lime);
}
.dr-eta--tight b {
  color: var(--yellow);
}
.dr-eta--late b {
  color: var(--pink);
}
.dr-eta--busy b {
  color: var(--orange);
}
.dr-eta--blocked b {
  color: var(--muted-2);
}
.dr-eta--idle b {
  color: rgba(246, 237, 223, 0.5);
}
.driver-row.is-preview .dr-eta small {
  color: rgba(246, 237, 223, 0.76);
}

/* ---- Tickets ------------------------------------------------------------ */

.ticket-area {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 12px 12px 16px;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.17) transparent;
}
.ticket {
  position: relative;
  flex: 0 0 auto;
  padding: 13px 14px 10px;
  overflow: hidden;
  border: 1px solid rgba(255, 79, 114, 0.24);
  border-radius: 14px;
  background:
    radial-gradient(120% 80% at 100% 0%, rgba(255, 79, 114, 0.075), transparent 55%),
    linear-gradient(180deg, rgba(37, 29, 37, 0.97), rgba(22, 20, 28, 0.97));
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.ticket.is-new-ticket {
  animation: ticketIn 0.3s ease both;
}
.ticket.is-urgent {
  border-color: rgba(255, 79, 114, 0.66);
  box-shadow: 0 0 0 1px rgba(255, 79, 114, 0.13), 0 0 30px rgba(255, 79, 114, 0.08);
}
.ticket.ticket--tracker,
.ticket.ticket--where {
  border-color: rgba(116, 216, 230, 0.26);
  background:
    radial-gradient(120% 80% at 100% 0%, rgba(116, 216, 230, 0.075), transparent 55%),
    linear-gradient(180deg, rgba(26, 33, 41, 0.97), rgba(19, 22, 29, 0.97));
}
.ticket.ticket--where.is-urgent {
  border-color: rgba(255, 79, 114, 0.66);
}
.tk-top {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
}
.tk-ava,
.mini-ava {
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: hsl(var(--h, 20) 88% 80%);
  background: hsl(var(--h, 20) 72% 58% / 0.2);
  border: 1px solid hsl(var(--h, 20) 72% 62% / 0.42);
  font-family: var(--font-body);
  font-weight: 700;
  letter-spacing: -0.02em;
  user-select: none;
}
.tk-ava {
  width: 34px;
  height: 34px;
  font-size: 11px;
}
.tk-who {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 1px;
}
.tk-who b {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 13.5px;
  line-height: 1.1;
  color: var(--cream);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.tk-who span {
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 8.5px;
  letter-spacing: 0.02em;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.tk-tag {
  flex: none;
  padding: 3px 5px 2px;
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 8px;
  letter-spacing: 0.045em;
  line-height: 1.2;
  color: var(--cyan);
  border: 1px solid rgba(116, 216, 230, 0.34);
  border-radius: 5px;
  background: rgba(116, 216, 230, 0.08);
  white-space: nowrap;
}
.tk-left {
  flex: none;
  margin-left: auto;
  min-width: 36px;
  text-align: right;
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 13px;
  line-height: 1;
  letter-spacing: -0.03em;
  color: var(--yellow);
  font-variant-numeric: tabular-nums;
}
.js-ticket-left {
  font-family: var(--font-mono);
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}
.js-ticket-left.is-low {
  color: var(--pink);
}
.tk-timer {
  height: 3px;
  margin: 9px 0 10px;
  overflow: hidden;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.08);
}
.tk-timer i {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 99px;
  background: linear-gradient(90deg, var(--pink) 0%, var(--yellow) 55%, var(--lime) 100%);
  transition: width 0.2s linear;
}
.tk-text {
  margin: 0;
  padding: 0;
  border: 0;
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 14px;
  line-height: 1.48;
  letter-spacing: -0.005em;
  color: #f0e9dd;
}
.tk-options {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 12px;
}
.reply {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  width: 100%;
  min-height: 41px;
  padding: 9px 10px;
  text-align: left;
  cursor: pointer;
  color: #e5ded3;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.03);
  font: inherit;
  font-size: 12px;
  line-height: 1.36;
  transition: background 0.12s ease, border-color 0.12s ease, transform 0.1s ease;
}
.reply:hover {
  border-color: rgba(246, 237, 223, 0.28);
  background: rgba(255, 255, 255, 0.07);
}
.reply:active {
  transform: translateY(1px);
}
.reply-key {
  flex: none;
  width: 20px;
  height: 20px;
  margin-top: 1px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 212, 71, 0.32);
  border-radius: 6px;
  background: rgba(255, 212, 71, 0.11);
  color: var(--yellow);
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 9.5px;
  line-height: 1;
}
.reply-label {
  flex: 1;
  min-width: 0;
}
.tk-foot {
  margin: 9px 0 0;
  text-align: center;
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 8px;
  letter-spacing: 0.1em;
  line-height: 1.4;
  color: rgba(246, 237, 223, 0.29);
  text-transform: uppercase;
}
.queue-head {
  flex: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 2px 3px 0;
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 8.5px;
  letter-spacing: 0.11em;
  line-height: 1.3;
  color: var(--muted-2);
}
.ticket-queue {
  flex: none;
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.mini-ticket {
  display: flex;
  align-items: center;
  gap: 9px;
  width: 100%;
  min-height: 45px;
  padding: 7px 9px;
  text-align: left;
  cursor: pointer;
  color: inherit;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.022);
  font: inherit;
  transition: background 0.12s ease, border-color 0.12s ease;
}
.mini-ticket:hover {
  background: rgba(255, 255, 255, 0.052);
  border-color: rgba(246, 237, 223, 0.25);
}
.mini-ava {
  width: 26px;
  height: 26px;
  font-size: 9px;
}
.mini-copy {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 1px;
}
.mini-copy b {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 11.5px;
  line-height: 1.15;
  color: var(--cream);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.mini-copy b em {
  margin-left: 4px;
  font-family: var(--font-mono);
  font-weight: 500;
  font-style: normal;
  font-size: 8px;
  letter-spacing: 0.035em;
  color: var(--cyan);
}
.mini-copy > span {
  display: block;
  font-size: 10.5px;
  line-height: 1.32;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.mini-left {
  flex: none;
  min-width: 33px;
  text-align: right;
  font-size: 10.5px;
  color: var(--muted);
}
.queue-clear {
  flex: none;
  margin: 2px 0 0;
  text-align: center;
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 8.5px;
  letter-spacing: 0.09em;
  line-height: 1.5;
  color: var(--muted-2);
  text-transform: uppercase;
}

/* ---- Wire ticker -------------------------------------------------------- */

.wire {
  position: relative;
  z-index: 9;
  flex: none;
  height: var(--wire-h);
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 12px;
  border-top: 1px solid var(--line);
  color: #a8b4c0;
}
.wire-label {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 8px 3px;
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 8.5px;
  letter-spacing: 0.12em;
  line-height: 1.1;
  color: var(--cyan);
  border: 1px solid rgba(116, 216, 230, 0.3);
  border-radius: 5px;
  background: rgba(116, 216, 230, 0.06);
}
.wire-icon {
  font-family: var(--font-body);
  font-size: 14px;
  line-height: 0.7;
  margin-top: -2px;
}
.wire-text {
  flex: 1;
  min-width: 0;
  display: block;
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 11px;
  letter-spacing: 0.005em;
  line-height: 1.3;
  color: #bdc7d1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.wire-text.wire-swap {
  animation: wireIn 0.45s ease both;
}
.wire-from {
  flex: none;
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 8px;
  letter-spacing: 0.13em;
  color: var(--muted-2);
}

/* ---- Stage banner ------------------------------------------------------- */

.stage-banner {
  position: absolute;
  z-index: 30;
  top: 12px;
  left: 50%;
  transform: translate(-50%, -12px);
  opacity: 0;
  pointer-events: none;
  display: flex;
  align-items: center;
  gap: 12px;
  max-width: calc(100% - 24px);
  padding: 10px 17px 9px;
  white-space: nowrap;
  border: 1px solid var(--orange);
  border-radius: 12px;
  background: #16100c;
  box-shadow: 0 22px 55px rgba(0, 0, 0, 0.65), 0 0 0 4px rgba(255, 107, 44, 0.12);
  transition: opacity 0.35s ease, transform 0.35s cubic-bezier(0.2, 0.9, 0.25, 1.1);
}
.stage-banner.is-show {
  opacity: 1;
  transform: translate(-50%, 0);
}
.sb-kicker {
  flex: none;
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 8.5px;
  letter-spacing: 0.13em;
  color: var(--orange);
  line-height: 1.2;
}
.stage-banner strong {
  flex: none;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 19px;
  line-height: 1;
  letter-spacing: 0.01em;
  color: var(--cream);
}
.sb-tag {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 11px;
  line-height: 1.3;
  color: var(--muted);
}

/* ---- Toasts (live over the map) ---------------------------------------- */

.toast-root {
  position: absolute;
  z-index: 7;
  top: 9px;
  right: 9px;
  width: min(76%, 322px);
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 5px;
  pointer-events: none;
}
.toast {
  --toast-color: var(--cyan);
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 8px 10px 8px 8px;
  color: var(--cream);
  border: 1px solid var(--line-2);
  border-left: 3px solid var(--toast-color);
  border-radius: 10px;
  background: rgba(11, 15, 21, 0.96);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.05);
  opacity: 0;
  transform: translateY(-6px) scale(0.98);
  transition: opacity 0.2s ease, transform 0.2s ease;
  animation: toastIn 0.24s ease both;
  pointer-events: none;
}
.toast.is-in {
  opacity: 1;
  transform: none;
}
.toast.is-out {
  opacity: 0;
  transform: translateY(-5px) scale(0.98);
}
.toast--good {
  --toast-color: var(--lime);
}
.toast--great {
  --toast-color: var(--yellow);
  background: linear-gradient(140deg, rgba(41, 34, 17, 0.97), rgba(11, 15, 21, 0.97));
}
.toast--warn {
  --toast-color: var(--yellow);
}
.toast--bad {
  --toast-color: var(--pink);
}
.toast--info {
  --toast-color: var(--cyan);
}
.toast--neutral {
  --toast-color: #9ea9b4;
}
.toast-icon {
  flex: none;
  width: 21px;
  height: 21px;
  margin-top: 1px;
  display: grid;
  place-items: center;
  border-radius: 6px;
  background: var(--toast-color);
  color: #0b0e12;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 12px;
  line-height: 1;
}
.toast-copy {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.toast-kicker {
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 7.8px;
  letter-spacing: 0.1em;
  line-height: 1.25;
  color: var(--toast-color);
}
.toast-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 12.5px;
  line-height: 1.2;
  color: var(--cream);
}
.toast-body {
  margin: 0;
  font-size: 10.8px;
  line-height: 1.38;
  color: #aeb8c2;
}
.toast-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 3px;
}
.toast-meta span {
  padding: 2px 5px 1px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.065);
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 8.5px;
  line-height: 1.3;
  color: var(--cream);
  white-space: nowrap;
}

/* ---- Chaos stages: the room slowly loses its composure ------------------ */

#app[data-stage='3'] .panel-head,
#app[data-stage='4'] .panel-head {
  background-image: repeating-linear-gradient(-45deg, rgba(255, 107, 44, 0.045) 0 8px, transparent 8px 16px);
}
#app[data-stage='3'] .stripe-mark,
#app[data-stage='4'] .stripe-mark {
  display: block;
}
#app[data-stage='4'] .game::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 25;
  pointer-events: none;
  background-image: repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.035) 0 1px, transparent 1px 3px);
  mix-blend-mode: overlay;
  opacity: 0.55;
}
#app[data-stage='4'] .hud {
  border-bottom-color: rgba(255, 79, 114, 0.42);
}
#app[data-stage='4'] .wordmark--hud {
  animation: logoFlicker 5s steps(1, end) infinite;
}
#app[data-stage='2'] .hud-stage #stageName {
  color: var(--yellow);
}
#app[data-stage='3'] .hud-stage #stageName {
  color: #ffb26b;
}
#app[data-stage='4'] .hud-stage #stageName {
  color: var(--pink);
}

/* ==========================================================================
   OVERLAYS / MODALS
   ========================================================================== */

.overlay-root {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(12px, 3vw, 42px);
  overflow-y: auto;
  background: rgba(5, 7, 10, 0.76);
  -webkit-backdrop-filter: blur(9px) saturate(0.88);
  backdrop-filter: blur(9px) saturate(0.88);
  overscroll-behavior: contain;
}
.modal {
  width: 100%;
  min-height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2px 0;
}
.modal-card {
  position: relative;
  width: min(100%, 560px);
  max-height: calc(100dvh - clamp(24px, 6vw, 84px));
  overflow-y: auto;
  outline: none;
  padding: clamp(20px, 2.7vw, 34px);
  color: var(--cream);
  border: 1px solid var(--line-2);
  border-radius: 19px;
  background: linear-gradient(180deg, #1b212c, #121720 82%);
  box-shadow: 0 44px 130px rgba(0, 0, 0, 0.68), inset 0 1px 0 rgba(255, 255, 255, 0.07);
  animation: modalPop 0.34s cubic-bezier(0.2, 0.9, 0.25, 1.08) both;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.18) transparent;
}
.modal-card--help {
  width: min(100%, 830px);
}
.modal-topline,
.result-topline {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
  padding-bottom: 13px;
  border-bottom: 1px solid var(--line);
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 9px;
  letter-spacing: 0.13em;
  line-height: 1.4;
  color: var(--orange);
}
.modal-stamp {
  flex: none;
  padding: 3px 7px 2px;
  color: var(--muted);
  border: 1px solid var(--line-2);
  border-radius: 5px;
  transform: rotate(2deg);
  font-size: 8.5px;
  letter-spacing: 0.1em;
  white-space: nowrap;
}
.modal-stamp--cyan {
  color: var(--cyan);
  border-color: rgba(116, 216, 230, 0.35);
  transform: rotate(-2deg);
}
.modal-title {
  margin: 0 0 14px;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(33px, 4.2vw, 49px);
  line-height: 0.95;
  letter-spacing: -0.038em;
  color: var(--cream);
}
.modal-title em {
  font-style: normal;
  color: var(--orange);
}
.modal-copy {
  max-width: 48ch;
  margin: 0 0 18px;
  font-size: 14px;
  line-height: 1.62;
  color: #b2bcc7;
}
.pause-facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: 6px 0 4px;
}
.pause-facts div {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 9px 10px 8px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.16);
}
.pause-facts small {
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 7.8px;
  letter-spacing: 0.09em;
  color: var(--muted-2);
  white-space: nowrap;
}
.pause-facts b {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 14px;
  line-height: 1.1;
  color: var(--cream);
  white-space: nowrap;
}
.modal-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 9px;
  margin-top: 22px;
}
.modal-actions--stack {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
}
.modal-actions--stack .btn:first-child {
  grid-column: 1 / -1;
}
.modal-actions--stack .btn {
  width: 100%;
}
.modal-foot {
  margin: 14px 0 0;
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 9px;
  letter-spacing: 0.035em;
  line-height: 1.65;
  color: var(--muted-2);
}

/* Help ------------------------------------------------------------------- */

.help-lede {
  max-width: 70ch;
  margin: 0 0 18px;
  font-size: 14px;
  line-height: 1.62;
  color: #b7c1cb;
}
.help-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 11px;
}
.help-card {
  padding: 13px 15px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.022);
}
.help-num {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 13px;
  letter-spacing: 0.06em;
  line-height: 1;
  color: var(--orange);
}
.help-card h3 {
  margin: 2px 0 7px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 17.5px;
  line-height: 1.1;
  letter-spacing: -0.01em;
  color: var(--cream);
}
.help-card p {
  margin: 0 0 7px;
  font-size: 12.3px;
  line-height: 1.56;
  color: #aeb8c3;
}
.help-card p:last-child {
  margin-bottom: 0;
}
.help-card b {
  color: var(--cream);
  font-weight: 700;
}
.legend {
  list-style: none;
  margin: 6px 0 9px;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.legend li {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  line-height: 1.3;
  color: #aeb8c3;
}
.legend b {
  flex: none;
  width: 58px;
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 8.5px;
  letter-spacing: 0.08em;
}
.lg {
  width: 8px;
  height: 8px;
  flex: none;
  display: inline-block;
  border-radius: 50%;
}
.lg-good {
  background: var(--lime);
}
.lg-tight {
  background: var(--yellow);
}
.lg-late {
  background: var(--pink);
}
.help-rule {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 11px;
  margin: 14px 0 2px;
}
.help-rule div {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 2px 0 2px 10px;
  border-left: 2px solid var(--pink);
}
.help-rule div:nth-child(2) {
  border-color: var(--yellow);
}
.help-rule div:nth-child(3) {
  border-color: var(--cyan);
}
.help-rule small {
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 8px;
  letter-spacing: 0.09em;
  color: var(--muted);
  line-height: 1.4;
}
.help-rule b {
  font-size: 12.5px;
  font-weight: 600;
  line-height: 1.38;
  color: var(--cream);
}
.help-keys {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px 15px;
  margin-top: 16px;
  padding-top: 13px;
  border-top: 1px solid var(--line);
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 9.5px;
  line-height: 1.4;
  color: var(--muted);
}
.help-keys span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
}

/* Event call-in ---------------------------------------------------------- */

.event-card {
  width: min(100%, 900px);
}
.modal-card.event-card {
  padding: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden auto;
  width: min(100%, 900px);
  background: linear-gradient(155deg, #1d2430 0%, #121720 65%, #100e10 100%);
}
.event-topline {
  flex: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 15px clamp(17px, 3vw, 34px) 13px;
  border-bottom: 1px solid var(--line);
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 9px;
  letter-spacing: 0.13em;
  line-height: 1.3;
  color: var(--orange);
}
.event-topline span:first-child {
  white-space: nowrap;
}
.event-topline span:last-child {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--muted);
  letter-spacing: 0.06em;
}
.event-content {
  flex: none;
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  align-items: center;
  gap: clamp(18px, 3vw, 36px);
  padding: clamp(18px, 2.7vw, 30px) clamp(17px, 3vw, 34px) 20px;
}
.event-art {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 20px 14px 14px;
  border: 1px solid rgba(255, 107, 44, 0.3);
  border-radius: 16px;
  background:
    repeating-linear-gradient(-45deg, rgba(255, 107, 44, 0.06) 0 9px, transparent 9px 18px),
    radial-gradient(80% 80% at 50% 45%, rgba(255, 107, 44, 0.32), transparent 70%),
    #0f1218;
  text-align: center;
  user-select: none;
}
.event-art--critic {
  border-color: rgba(255, 212, 71, 0.36);
  background:
    repeating-linear-gradient(-45deg, rgba(255, 212, 71, 0.055) 0 9px, transparent 9px 18px),
    radial-gradient(80% 80% at 50% 45%, rgba(255, 212, 71, 0.2), transparent 70%),
    #12120f;
}
.event-art--switch {
  border-color: rgba(255, 79, 114, 0.4);
  background:
    repeating-linear-gradient(-45deg, rgba(255, 79, 114, 0.06) 0 9px, transparent 9px 18px),
    radial-gradient(80% 80% at 50% 45%, rgba(255, 79, 114, 0.22), transparent 70%),
    #131014;
}
.ea-kicker {
  position: absolute;
  top: 13px;
  left: 0;
  right: 0;
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 8px;
  letter-spacing: 0.15em;
  color: rgba(246, 237, 223, 0.58);
  line-height: 1.3;
}
.ea-big {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(72px, 8vw, 98px);
  line-height: 0.75;
  letter-spacing: -0.08em;
  color: var(--orange);
  text-shadow: 4px 4px 0 rgba(0, 0, 0, 0.38);
}
.ea-small {
  margin-top: 12px;
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 9.5px;
  letter-spacing: 0.13em;
  line-height: 1.5;
  color: var(--cream);
}
.ea-scooter {
  display: block;
  margin-top: 7px;
  font-size: 40px;
  line-height: 1;
  transform: rotate(-8deg);
  filter: drop-shadow(0 10px 12px rgba(0, 0, 0, 0.45));
}
.ea-stars {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: clamp(23px, 2.6vw, 32px);
  letter-spacing: 0.04em;
  line-height: 1;
  color: var(--yellow);
  text-shadow: 0 0 26px rgba(255, 212, 71, 0.35);
}
.event-art--critic .ea-small {
  margin-top: 10px;
}
.event-art--critic .ea-scooter {
  font-size: 36px;
  margin-top: 5px;
}
.switch-ill {
  position: relative;
  width: 92px;
  height: 132px;
  margin-top: 9px;
  padding: 12px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 17px;
  background: #1b2129;
  box-shadow: inset 0 4px 0 rgba(255, 255, 255, 0.06), 0 18px 32px rgba(0, 0, 0, 0.5);
}
.switch-ill::before {
  content: '';
  position: absolute;
  inset: 13px;
  border-radius: 11px;
  background: #0a0d11;
  box-shadow: inset 0 2px 9px rgba(0, 0, 0, 0.65);
}
.switch-ill i {
  position: relative;
  z-index: 1;
  display: block;
  width: 44px;
  height: 86px;
  border-radius: 10px;
  background: linear-gradient(180deg, #ff6f8e, #b42243 70%, #74112a);
  box-shadow: 0 0 34px rgba(255, 79, 114, 0.5), inset 0 2px 0 rgba(255, 255, 255, 0.28);
  transform: rotate(12deg) translateY(-4px);
  transform-origin: bottom center;
}
.event-art--switch .ea-small {
  margin-top: 12px;
}
.event-copy {
  min-width: 0;
}
.event-kicker {
  margin: 0 0 8px;
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 9px;
  letter-spacing: 0.15em;
  line-height: 1.4;
  color: var(--orange);
}
.event-title {
  margin: 0 0 13px;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(34px, 4vw, 54px);
  line-height: 0.92;
  letter-spacing: -0.04em;
  color: var(--cream);
}
.event-body {
  max-width: 56ch;
  margin: 0 0 12px;
  font-size: 14px;
  line-height: 1.62;
  color: #c1cad3;
}
.event-aside {
  margin: 0;
  padding-left: 10px;
  border-left: 2px solid var(--line-2);
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 9.5px;
  letter-spacing: 0.03em;
  line-height: 1.55;
  color: var(--muted);
}
.event-choices {
  flex: none;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  padding: 0 clamp(17px, 3vw, 34px) clamp(18px, 2.4vw, 26px);
}
.choice {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 66px;
  padding: 12px 14px;
  text-align: left;
  cursor: pointer;
  color: inherit;
  border: 1px solid var(--line-2);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.032);
  font: inherit;
  transition: background 0.14s ease, border-color 0.14s ease, transform 0.12s ease;
}
.choice:hover {
  background: rgba(255, 255, 255, 0.072);
  border-color: rgba(246, 237, 223, 0.36);
  transform: translateY(-1px);
}
.choice--primary {
  border-color: rgba(255, 107, 44, 0.58);
  background: rgba(255, 107, 44, 0.1);
}
.choice--primary:hover {
  background: rgba(255, 107, 44, 0.19);
  border-color: rgba(255, 107, 44, 0.85);
}
.choice--danger {
  border-color: rgba(255, 79, 114, 0.56);
  background: rgba(255, 79, 114, 0.085);
}
.choice--danger:hover {
  background: rgba(255, 79, 114, 0.17);
  border-color: rgba(255, 79, 114, 0.85);
}
.choice.is-disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
}
.choice-copy {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.choice-label {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 16px;
  line-height: 1.1;
  letter-spacing: -0.01em;
  color: var(--cream);
}
.choice-detail {
  font-size: 11.5px;
  line-height: 1.46;
  color: #aeb8c3;
}
.choice-arrow {
  flex: none;
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 17px;
  line-height: 1;
  color: var(--muted);
  transition: transform 0.15s ease, color 0.15s ease;
}
.choice:hover .choice-arrow {
  transform: translateX(3px);
  color: var(--cream);
}
.event-foot {
  flex: none;
  margin: 0;
  padding: 11px clamp(17px, 3vw, 34px) 13px;
  border-top: 1px solid var(--line);
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 8.5px;
  letter-spacing: 0.045em;
  line-height: 1.55;
  color: var(--muted-2);
}

/* Results ---------------------------------------------------------------- */

.result-card {
  --stamp: var(--orange);
  width: min(100%, 900px);
  background:
    radial-gradient(105% 90% at 100% 0%, rgba(255, 107, 44, 0.13), transparent 55%),
    linear-gradient(160deg, #1d2430 0%, #121720 68%);
}
.result-card--S {
  --stamp: var(--yellow);
}
.result-card--A {
  --stamp: var(--lime);
}
.result-card--B {
  --stamp: var(--cyan);
}
.result-card--C {
  --stamp: var(--orange);
}
.result-card--D {
  --stamp: #ff9a6d;
}
.result-card.is-loss {
  --stamp: var(--pink);
  background:
    radial-gradient(105% 90% at 100% 0%, rgba(255, 79, 114, 0.14), transparent 55%),
    linear-gradient(160deg, #22202b 0%, #12141b 68%);
}
.result-card.is-loss .result-topline {
  color: var(--pink);
}
.result-topline {
  margin-bottom: 0;
  padding-bottom: 13px;
}
.result-topline span:last-child {
  color: var(--muted-2);
  white-space: nowrap;
}
.result-hero {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: clamp(14px, 2.4vw, 26px);
  margin: 20px 0 17px;
}
.result-headline {
  min-width: 0;
}
.result-kicker {
  margin: 0 0 8px;
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 9px;
  letter-spacing: 0.13em;
  line-height: 1.3;
  color: var(--muted);
}
.result-title {
  max-width: 13ch;
  margin: 0 0 12px;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(36px, 5vw, 66px);
  line-height: 0.9;
  letter-spacing: -0.045em;
  color: var(--cream);
  text-wrap: balance;
}
.result-sub {
  max-width: 56ch;
  margin: 0;
  font-size: 14px;
  line-height: 1.62;
  color: #b7c1cc;
}
.grade-stamp {
  flex: none;
  width: clamp(116px, 15vw, 156px);
  aspect-ratio: 1;
  margin-top: 5px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
  text-align: center;
  border: 2px solid var(--stamp);
  border-radius: 16px;
  background: radial-gradient(circle at 50% 32%, color-mix(in srgb, var(--stamp) 22%, transparent), color-mix(in srgb, var(--stamp) 4%, transparent) 72%);
  box-shadow: 0 0 0 5px color-mix(in srgb, var(--stamp) 8%, transparent), 0 18px 36px rgba(0, 0, 0, 0.36);
  transform: rotate(3.5deg);
  color: var(--stamp);
}
.grade-stamp small {
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 8px;
  letter-spacing: 0.14em;
  line-height: 1.4;
  color: rgba(246, 237, 223, 0.7);
}
.grade-stamp strong {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(62px, 8.6vw, 102px);
  line-height: 0.78;
  letter-spacing: -0.07em;
  color: var(--stamp);
}
.grade-stamp span {
  max-width: 92%;
  margin-top: 5px;
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 7.2px;
  letter-spacing: 0.06em;
  line-height: 1.4;
  color: rgba(246, 237, 223, 0.62);
}
.result-push,
.result-warning {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 0 0 14px;
  padding: 10px 12px;
  border: 1px solid rgba(184, 242, 106, 0.25);
  border-radius: 12px;
  background: rgba(184, 242, 106, 0.055);
}
.result-warning {
  border-color: rgba(255, 79, 114, 0.3);
  background: rgba(255, 79, 114, 0.07);
}
.push-app {
  flex: none;
  width: 36px;
  height: 34px;
  display: flex;
  align-items: baseline;
  justify-content: center;
  padding: 8px 0 0 1px;
  color: #1a0c06;
  background: var(--orange);
  border-radius: 9px;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 12px;
  letter-spacing: -0.06em;
  line-height: 1;
}
.push-app i {
  width: 5px;
  height: 5px;
  margin-left: 1px;
  display: inline-block;
  border-radius: 50%;
  background: #1a0c06;
}
.result-push > div,
.result-warning > div {
  flex: 1;
  min-width: 0;
}
.result-push b,
.result-warning b {
  display: block;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 12.5px;
  line-height: 1.2;
  color: var(--cream);
}
.result-warning b {
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 9px;
  letter-spacing: 0.12em;
  color: var(--pink);
}
.result-push p,
.result-warning p {
  margin: 2px 0 0;
  font-size: 11.5px;
  line-height: 1.45;
  color: #b7c0ca;
}
.push-time {
  flex: none;
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 8.5px;
  color: var(--muted-2);
}
.result-warning > span {
  flex: none;
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--pink);
  color: #1a0710;
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 13px;
  line-height: 1;
}
.result-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: 0 0 14px;
}
.result-stat {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 10px 12px 9px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.022);
}
.rs-label {
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 8px;
  letter-spacing: 0.105em;
  line-height: 1.3;
  color: var(--muted);
  white-space: nowrap;
}
.rs-value {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 23px;
  line-height: 1.06;
  letter-spacing: -0.025em;
  color: var(--cream);
  white-space: nowrap;
}
.rs-note {
  font-size: 10.5px;
  line-height: 1.38;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.result-score {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 14px;
  margin-bottom: 16px;
  padding: 12px 14px 11px;
  border: 1px solid var(--line-2);
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.2);
}
.result-score > div:first-child {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.result-score small {
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 8.5px;
  letter-spacing: 0.13em;
  line-height: 1.4;
  color: var(--muted);
}
.result-score strong {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(34px, 4vw, 48px);
  line-height: 0.88;
  letter-spacing: -0.045em;
  color: var(--cream);
  font-variant-numeric: tabular-nums;
}
.score-side {
  flex: none;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
}
.new-best {
  display: inline-block;
  padding: 4px 7px 3px;
  border-radius: 5px;
  background: var(--yellow);
  color: #1b1307;
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 8.5px;
  letter-spacing: 0.09em;
  line-height: 1.2;
  transform: rotate(2deg);
  box-shadow: 2px 2px 0 rgba(0, 0, 0, 0.35);
}
.result-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 9px;
}

/* ==========================================================================
   ANIMATIONS
   ========================================================================== */

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.55; transform: scale(0.82); }
}
@keyframes blink {
  0%, 55% { opacity: 1; }
  56%, 100% { opacity: 0.25; }
}
@keyframes dotPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.14); }
}
@keyframes glitch {
  0%, 86%, 100% { transform: translate(0, 0); opacity: 1; }
  88% { transform: translate(-1.5px, 1px) skewX(-4deg); opacity: 0.7; }
  90% { transform: translate(2px, -1px); opacity: 0.95; }
  92% { transform: translate(-1px, 0); opacity: 0.75; }
  94% { transform: translate(0, 0); }
}
@keyframes floaty {
  from { translate: 0 0; }
  to { translate: 0 -9px; }
}
@keyframes spin {
  to { transform: rotate(360deg); }
}
@keyframes dashmove {
  to { stroke-dashoffset: -2.8; }
}
@keyframes mapPulse {
  0% { transform: scale(0.75); opacity: 0.38; }
  100% { transform: scale(1.75); opacity: 0; }
}
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  18% { transform: translateX(-5px) rotate(-0.4deg); }
  36% { transform: translateX(4px) rotate(0.4deg); }
  54% { transform: translateX(-3px); }
  72% { transform: translateX(2px); }
}
@keyframes bumpGood {
  0%, 100% { transform: translateY(0) scale(1); }
  35% { transform: translateY(-2px) scale(1.025); }
  65% { transform: translateY(0) scale(0.995); }
}
@keyframes imminent {
  0%, 100% { box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06), 0 0 0 0 rgba(255, 79, 114, 0.0); }
  50% { box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06), 0 0 0 5px rgba(255, 79, 114, 0.09); }
}
@keyframes cardIn {
  from { opacity: 0; transform: translateY(-6px) scale(0.985); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes ticketIn {
  from { opacity: 0; transform: translateX(7px); }
  to { opacity: 1; transform: translateX(0); }
}
@keyframes toastIn {
  from { opacity: 0; transform: translateY(-7px) scale(0.97); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes wireIn {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes nudge {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-5px); }
  40% { transform: translateX(4px); }
  60% { transform: translateX(-3px); }
  80% { transform: translateX(2px); }
}
@keyframes nudgeLeft {
  0%, 100% { transform: translateX(0); }
  50% { transform: translateX(-4px); }
}
@keyframes bannerGlow {
  0%, 100% { box-shadow: inset 0 0 0 1px rgba(255, 107, 44, 0.1), 0 0 0 0 rgba(255, 107, 44, 0); }
  50% { box-shadow: inset 0 0 0 1px rgba(255, 107, 44, 0.12), 0 8px 26px rgba(255, 107, 44, 0.12); }
}
@keyframes modalPop {
  from { opacity: 0; transform: translateY(14px) scale(0.975); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes logoFlicker {
  0%, 92%, 100% { opacity: 1; transform: translateX(0); }
  92.5% { opacity: 0.5; transform: translateX(1.5px); }
  93.5% { opacity: 1; transform: translateX(-1px); }
  94.5% { opacity: 0.7; transform: translateX(1px); }
  95.5% { opacity: 1; transform: translateX(0); }
}

.stripe-mark {
  display: none;
}

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */

@media (min-width: 1101px) and (max-width: 1320px) {
  .hud {
    grid-template-columns: minmax(205px, 1fr) auto minmax(150px, 0.82fr) minmax(215px, 1.05fr) auto;
    gap: clamp(10px, 1.5vw, 22px);
  }
  .wordmark--hud {
    font-size: 28px;
  }
  .hud-live {
    font-size: 9px;
    letter-spacing: 0.07em;
  }
  .clock-note {
    max-width: 98px;
  }
  .stage-tag,
  .hud-mode {
    display: none;
  }
  .cash-burn {
    font-size: 7.5px;
    letter-spacing: 0.01em;
  }
}

@media (min-width: 1101px) and (max-width: 1220px) {
  .ph-titles p {
    display: none;
  }
  .panel-head {
    padding: 11px 12px 10px;
  }
  .db-hint-copy small {
    display: none;
  }
}

/* ---- Tablet / phone layout --------------------------------------------- */

@media (max-width: 1100px) {
  html,
  body {
    overflow: hidden;
  }

  .splash {
    padding: 0 20px;
  }
  .splash-bar {
    min-height: 60px;
    gap: 10px;
  }
  .wordmark--small {
    font-size: 30px;
  }
  .splash-status {
    display: none;
  }
  .splash-chip {
    font-size: 8.5px;
    padding: 7px 9px;
    letter-spacing: 0.09em;
  }
  .splash-main {
    grid-template-columns: minmax(0, 1fr);
    gap: 30px;
    padding: 24px 0 22px;
  }
  .eyebrow {
    font-size: 9px;
    letter-spacing: 0.11em;
    gap: 8px;
    margin-bottom: 16px;
  }
  .eyebrow span {
    padding: 4px 6px;
  }
  .hero-logo {
    font-size: clamp(72px, 21.5vw, 118px);
  }
  .hero-mode {
    font-size: clamp(35px, 10.2vw, 58px);
    margin-top: 15px;
    box-shadow: 5px 5px 0 var(--cream), 10px 10px 0 rgba(0, 0, 0, 0.38);
  }
  .hero-tag {
    margin-top: 29px;
    font-size: clamp(22px, 6.2vw, 30px);
  }
  .hero-lede {
    font-size: 14.5px;
    line-height: 1.62;
    max-width: none;
  }
  .hero-actions {
    gap: 10px;
    margin: 23px 0 22px;
  }
  .hero-actions .btn-xl {
    flex: 1 1 150px;
    min-height: 54px;
    padding: 0 14px;
    font-size: 16px;
  }
  .hero-actions .btn-outline.btn-xl {
    font-size: 13px;
  }
  .hero-meta {
    max-width: none;
  }
  .mode-picker {
    max-width: none;
  }
  .hero-art {
    order: 3;
    justify-content: center;
  }
  .art-stage {
    width: min(100%, 520px);
    aspect-ratio: 1 / 1.04;
    border-radius: 24px;
  }
  .art-word {
    font-size: 220px;
  }
  .handbook {
    padding-top: 16px;
  }
  .handbook-cards {
    grid-template-columns: 1fr;
    gap: 0;
    margin-top: 5px;
  }
  .hb-card {
    padding: 13px 0 13px;
    border-bottom: 1px solid var(--line);
  }
  .hb-card:last-child {
    border-bottom: 0;
  }
  .hb-num {
    font-size: 34px;
  }
  .hb-card h2 {
    font-size: 14.5px;
  }
  .hb-card p {
    max-width: none;
    font-size: 12.5px;
    line-height: 1.55;
  }
  .splash-foot {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    padding: 12px 0 18px;
    font-size: 8px;
    line-height: 1.5;
  }

  /* Game: compact HUD + tabs + one panel at a time */
  .game {
    padding: 0 9px;
  }
  .hud {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
      'brand controls'
      'clock meters'
      'stage stage';
    gap: 7px 10px;
    min-height: 0;
    padding: 8px 0 9px;
  }
  .hud-brand {
    grid-area: brand;
    gap: 9px;
  }
  .wordmark--hud {
    font-size: 26px;
  }
  .hud-live {
    font-size: 8.5px;
    letter-spacing: 0.08em;
    gap: 2px;
  }
  .hud-mode {
    display: none;
  }
  .live-dot {
    width: 6px;
    height: 6px;
  }
  .hud-controls {
    grid-area: controls;
    gap: 5px;
  }
  .icon-btn {
    width: 34px;
    height: 34px;
    border-radius: 9px;
  }
  .hud-clock {
    grid-area: clock;
    justify-self: start;
    column-gap: 8px;
    padding: 6px 11px 6px 10px;
    border-radius: 10px;
  }
  #etaTime {
    font-size: 24px;
  }
  .clock-kicker {
    font-size: 7.8px;
  }
  .clock-note {
    max-width: 106px;
    font-size: 7.5px;
  }
  .hud-stage {
    grid-area: stage;
    flex-direction: row;
    align-items: center;
    gap: 8px;
    width: 100%;
    min-width: 0;
    padding-top: 7px;
    border-top: 1px solid var(--line);
    overflow: hidden;
  }
  .stage-kicker {
    flex: none;
    font-size: 8px;
    letter-spacing: 0.1em;
  }
  #stageName {
    flex: none;
    max-width: 46vw;
    font-size: 13px;
    letter-spacing: 0.02em;
  }
  .stage-tag {
    flex: 1;
    min-width: 0;
    max-width: none;
    text-align: right;
    font-size: 10px;
  }
  .hud-meters {
    grid-area: meters;
    justify-self: stretch;
    gap: 12px;
    align-items: center;
  }
  .meter-top {
    margin-bottom: 4px;
    gap: 6px;
  }
  .meter-label {
    font-size: 8px;
    letter-spacing: 0.1em;
  }
  .meter-top strong {
    font-size: 17px;
  }
  .meter-track {
    height: 5px;
  }
  .cash-burn {
    display: none;
  }

  .mobile-tabs {
    display: flex;
    flex: none;
    gap: 5px;
    padding: 8px 0 8px;
    border-bottom: 1px solid var(--line);
    overflow: hidden;
  }
  .tab {
    flex: 1;
    min-width: 0;
    min-height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 0 6px;
    opacity: 0.58;
    cursor: pointer;
    color: var(--cream);
    border: 1px solid transparent;
    border-radius: 9px;
    background: transparent;
    font-family: var(--font-mono);
    font-weight: 500;
    font-size: 9.5px;
    letter-spacing: 0.1em;
    white-space: nowrap;
    transition: background 0.14s ease, border-color 0.14s ease, color 0.14s ease, opacity 0.14s ease;
  }
  .tab.is-active {
    opacity: 1;
    color: #1a0d07;
    background: var(--orange);
    border-color: #2a1208;
    box-shadow: 0 3px 0 #9a340f;
  }
  .tab-badge {
    display: inline-grid;
    place-items: center;
    min-width: 18px;
    height: 17px;
    padding: 0 5px;
    border-radius: 99px;
    color: var(--cream);
    background: rgba(255, 255, 255, 0.12);
    font-family: var(--font-mono);
    font-weight: 500;
    font-size: 9px;
    line-height: 1;
    letter-spacing: 0;
  }
  .tab.is-active .tab-badge {
    color: var(--orange);
    background: #1a0d07;
  }
  .tab.has-tickets:not(.is-active) .tab-badge--hot {
    color: #1b0610;
    background: var(--pink);
  }
  .tab.has-tickets:not(.is-active) {
    opacity: 0.9;
  }

  .floor {
    display: block;
    flex: 1;
    min-height: 0;
    overflow: hidden;
    padding: 9px 0 8px;
  }
  .floor > .panel {
    display: none;
    height: 100%;
  }
  #game[data-tab='orders'] .orders-panel,
  #game[data-tab='drivers'] .drivers-panel,
  #game[data-tab='tickets'] .tickets-panel {
    display: flex;
  }
  .order-list,
  .driver-list,
  .ticket-area {
    padding-left: 8px;
    padding-right: 8px;
    padding-bottom: 12px;
  }
  .order-list {
    gap: 8px;
    padding-top: 9px;
  }
  .order-card {
    animation: none;
  }
  .ticket {
    animation: none;
  }
  .oc-select {
    min-height: 98px;
    padding-top: 11px;
    padding-bottom: 11px;
    gap: 5px;
  }
  .oc-route {
    font-size: 16px;
  }
  .oc-items {
    font-size: 12px;
  }
  .oc-void {
    width: 38px;
    height: 32px;
    top: 10px;
    right: 10px;
    font-size: 10px;
  }
  .oc-select {
    padding-right: 54px;
  }
  .map-wrap {
    margin: 8px 8px 0;
    max-height: none;
  }
  .dispatch-banner {
    margin: 7px 8px 0;
    min-height: 55px;
  }
  .driver-row {
    min-height: 60px;
    padding: 9px 11px 9px 10px;
  }
  .dr-avatar {
    width: 39px;
    height: 39px;
  }
  .dr-status {
    font-size: 11.5px;
  }
  .reply {
    min-height: 48px;
    padding: 11px 11px;
    font-size: 12.5px;
    line-height: 1.42;
  }
  .reply-key {
    width: 22px;
    height: 22px;
    font-size: 10px;
  }
  .tk-text {
    font-size: 15px;
    line-height: 1.52;
  }
  .mini-ticket {
    min-height: 50px;
    padding: 8px 10px;
  }
  .toast-root {
    top: 7px;
    right: 7px;
    width: min(82%, 310px);
    gap: 4px;
  }
  .toast {
    padding: 7px 9px 7px 7px;
    border-radius: 9px;
  }
  .toast-body {
    font-size: 10.5px;
    line-height: 1.34;
  }
  .map-legend {
    left: 7px;
    bottom: 6px;
    font-size: 7.5px;
    gap: 8px;
  }
  .wire {
    height: 34px;
    gap: 8px;
  }
  .wire-label {
    font-size: 8px;
    padding: 3px 6px 2px;
  }
  .wire-text {
    font-size: 10px;
  }
  .wire-from {
    display: none;
  }
  .stage-banner {
    top: 8px;
    gap: 8px;
    padding: 9px 12px 8px;
    border-radius: 10px;
  }
  .stage-banner strong {
    font-size: 16px;
  }
  .sb-tag {
    display: none;
  }
  .sb-kicker {
    font-size: 8px;
  }

  /* Modals */
  .overlay-root {
    padding: 10px;
    align-items: flex-start;
  }
  .modal {
    align-items: flex-start;
    min-height: auto;
    padding: 4vh 0 8vh;
  }
  .modal-card {
    max-height: none;
    width: 100%;
    padding: 20px 17px 18px;
    border-radius: 17px;
    overflow-y: visible;
  }
  .modal-topline,
  .result-topline {
    font-size: 8px;
    letter-spacing: 0.1em;
    margin-bottom: 15px;
    padding-bottom: 11px;
  }
  .modal-title {
    font-size: clamp(34px, 9.4vw, 47px);
    margin-bottom: 13px;
  }
  .modal-copy {
    font-size: 13.5px;
  }
  .pause-facts {
    gap: 6px;
  }
  .pause-facts div {
    padding: 8px 8px 7px;
  }
  .pause-facts b {
    font-size: 12.5px;
  }
  .pause-facts small {
    font-size: 7.2px;
    letter-spacing: 0.06em;
  }
  .modal-actions--stack {
    grid-template-columns: 1fr;
  }
  .modal-actions .btn {
    flex: 1 1 auto;
  }

  .help-grid {
    grid-template-columns: 1fr;
    gap: 9px;
  }
  .help-card {
    padding: 12px 13px 11px;
  }
  .help-rule {
    grid-template-columns: 1fr;
    gap: 9px;
    margin-top: 12px;
  }
  .help-rule div {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 4px 8px;
    padding-left: 10px;
  }
  .help-rule small {
    flex: none;
  }
  .help-rule b {
    flex: 1 1 160px;
  }
  .help-keys {
    gap: 7px 12px;
    font-size: 9px;
  }

  .modal-card.event-card {
    overflow-y: visible;
    max-height: none;
  }
  .event-topline {
    font-size: 8px;
    letter-spacing: 0.09em;
    padding: 13px 15px 11px;
  }
  .event-content {
    grid-template-columns: 1fr;
    gap: 16px;
    padding: 18px 15px 16px;
    align-items: start;
  }
  .event-art {
    width: 100%;
    max-width: none;
    aspect-ratio: 2.2 / 1;
    padding: 24px 12px 10px;
    min-height: 138px;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 4px 12px;
    align-content: center;
  }
  .ea-kicker {
    top: 11px;
  }
  .ea-big {
    font-size: 72px;
  }
  .ea-small {
    margin-top: 0;
    text-align: left;
  }
  .ea-scooter {
    margin-top: 0;
    font-size: 34px;
  }
  .switch-ill {
    width: 66px;
    height: 96px;
    margin-top: 0;
    padding: 9px;
  }
  .switch-ill::before {
    inset: 10px;
  }
  .switch-ill i {
    width: 32px;
    height: 62px;
  }
  .event-art--switch .ea-small {
    margin-top: 0;
    margin-left: 6px;
  }
  .event-title {
    font-size: clamp(35px, 9.5vw, 48px);
    margin-bottom: 11px;
  }
  .event-body {
    font-size: 13.5px;
    line-height: 1.6;
  }
  .event-choices {
    grid-template-columns: 1fr;
    gap: 8px;
    padding: 0 15px 17px;
  }
  .choice {
    min-height: 62px;
    padding: 11px 13px;
  }
  .choice-label {
    font-size: 16.5px;
  }
  .event-foot {
    padding: 10px 15px 12px;
    font-size: 8px;
  }

  .result-card {
    width: 100%;
  }
  .result-hero {
    flex-direction: row;
    align-items: flex-start;
    gap: 12px;
    margin: 17px 0 14px;
  }
  .result-title {
    font-size: clamp(36px, 10.2vw, 54px);
    max-width: 11ch;
  }
  .result-sub {
    font-size: 13.5px;
    line-height: 1.58;
  }
  .grade-stamp {
    width: 96px;
    border-radius: 13px;
    margin-top: 2px;
    transform: rotate(3deg) translateY(2px);
  }
  .grade-stamp strong {
    font-size: 56px;
  }
  .grade-stamp small {
    font-size: 6.8px;
    letter-spacing: 0.1em;
  }
  .grade-stamp span {
    max-width: 90%;
    font-size: 6px;
    letter-spacing: 0.04em;
  }
  .result-stats {
    grid-template-columns: 1fr 1fr;
    gap: 6px;
  }
  .result-stat {
    padding: 9px 10px 8px;
  }
  .rs-value {
    font-size: 22px;
  }
  .rs-note {
    font-size: 10px;
  }
  .result-score {
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 8px 12px;
    padding: 11px 12px 10px;
  }
  .result-actions {
    gap: 8px;
  }
  .result-actions .btn {
    flex: 1 1 140px;
  }
  .result-actions .btn-quiet {
    flex-basis: 100%;
    justify-content: flex-start;
    padding-left: 2px;
  }
}

@media (max-width: 380px) {
  .hero-actions .btn-xl {
    flex-basis: 100%;
  }
  .hero-logo {
    font-size: 70px;
  }
  .hud-clock {
    padding-right: 9px;
  }
  #etaTime {
    font-size: 22px;
  }
  .clock-note {
    max-width: 92px;
  }
  .tab {
    font-size: 8.5px;
    letter-spacing: 0.07em;
    gap: 4px;
    padding: 0 3px;
  }
  .toast-root {
    width: min(88%, 300px);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
  .float-emoji,
  .hero-logo .wordmark-dot {
    animation: none !important;
  }
}

.noscript {
  position: fixed;
  inset: 0;
  z-index: 100000;
  display: grid;
  place-items: center;
  padding: 30px;
  background: #0a0c0f;
  color: #f6eddf;
  font-family: var(--font-body);
  text-align: center;
}
