/* ══════════════════════════════════════════════════════════════════
   NOMNOW: MANUAL MODE
   A control room for dinner.
   ══════════════════════════════════════════════════════════════════ */

/* ── Fonts ───────────────────────────────────────────────────────── */
@font-face {
  font-family: "Bricolage Grotesque";
  src: url("assets/fonts/bricolage.woff2") format("woff2");
  font-weight: 400 800;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "DM Sans";
  src: url("assets/fonts/dmsans.woff2") format("woff2");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "DM Mono";
  src: url("assets/fonts/dmmono-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "DM Mono";
  src: url("assets/fonts/dmmono-500.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

/* ── Tokens ──────────────────────────────────────────────────────── */
:root {
  --ink: #0c0b12;
  --ink-2: #111019;
  --panel: #191720;
  --panel-2: #211e2b;
  --line: rgba(255, 244, 222, 0.11);
  --line-strong: rgba(255, 244, 222, 0.2);

  --cream: #fff3df;
  --cream-soft: #e8d8c4;
  --muted: #9c9184;
  --muted-2: #776e64;

  --paper: #fff4de;
  --paper-2: #f4e2c4;
  --paper-ink: #241b17;
  --paper-muted: #806754;

  --coral: #ff5c39;
  --coral-2: #ff7a57;
  --coral-dark: #a6321c;
  --yellow: #ffc857;
  --mint: #63e6b0;
  --mint-dark: #2a9f74;
  --blue: #65b5ff;
  --violet: #c3a4ff;
  --pink: #ff8fb3;
  --red: #ff415c;

  --font-display: "Bricolage Grotesque", "Trebuchet MS", sans-serif;
  --font-body: "DM Sans", "Helvetica Neue", Arial, sans-serif;
  --font-mono: "DM Mono", "Courier New", monospace;

  --radius-panel: 20px;
  --ease-pop: cubic-bezier(0.2, 0.9, 0.3, 1.15);
  --ease-out: cubic-bezier(0.2, 0.8, 0.2, 1);
}

/* ── Base ────────────────────────────────────────────────────────── */
*,
*::before,
*::after {
  box-sizing: border-box;
}
html,
body {
  height: 100%;
}
body {
  margin: 0;
  overflow: hidden;
  background:
    radial-gradient(1100px 700px at 96% -10%, rgba(255, 92, 57, 0.1), transparent 62%),
    radial-gradient(900px 700px at 0% 110%, rgba(99, 230, 176, 0.055), transparent 60%),
    var(--ink);
  color: var(--cream);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.4;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.55;
  background-image:
    linear-gradient(rgba(255, 244, 222, 0.024) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 244, 222, 0.024) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse at 50% 40%, #000 20%, transparent 80%);
}
button {
  font: inherit;
  color: inherit;
}
::selection {
  background: var(--yellow);
  color: var(--paper-ink);
}
[hidden] {
  display: none !important;
}
.sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}
.ico {
  width: 1.15em;
  height: 1.15em;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  vertical-align: middle;
}
:focus-visible {
  outline: 2px solid var(--yellow);
  outline-offset: 3px;
}

/* ══════════════════════════════════════════════════════════════════
   APP SHELL
   ══════════════════════════════════════════════════════════════════ */
.app {
  position: relative;
  z-index: 2;
  height: 100dvh;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: 12px;
  padding: 12px 16px;
}
.app.is-shaking {
  animation: appShake 0.5s var(--ease-out) both;
}

/* ── Top bar ─────────────────────────────────────────────────────── */
.topbar {
  display: grid;
  grid-template-columns: auto minmax(230px, 1fr) auto auto;
  align-items: center;
  gap: clamp(14px, 2vw, 28px);
  min-height: 72px;
  padding: 10px 16px;
  border-radius: var(--radius-panel);
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(31, 28, 41, 0.96), rgba(18, 17, 25, 0.97));
  box-shadow: 0 24px 50px -34px #000, inset 0 1px 0 rgba(255, 244, 222, 0.06);
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.logo-svg {
  width: 40px;
  height: 40px;
  flex: none;
  filter: drop-shadow(0 8px 16px rgba(255, 92, 57, 0.28));
}
.logo-word {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 27px;
  line-height: 0.9;
  letter-spacing: -0.06em;
  color: var(--cream);
  white-space: nowrap;
}
.logo-word span {
  color: var(--coral);
}
.brand-text {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}
.brand-sub {
  font-family: var(--font-mono);
  font-size: 8px;
  font-weight: 500;
  letter-spacing: 0.19em;
  color: var(--coral-2);
  white-space: nowrap;
}

.incident {
  width: 100%;
  max-width: 430px;
  justify-self: center;
  display: flex;
  flex-direction: column;
  gap: 7px;
  min-width: 0;
}
.incident-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: 0.12em;
  color: var(--muted);
  white-space: nowrap;
}
.incident-id {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #ff9f87;
  font-weight: 500;
}
.incident-eta b {
  color: var(--yellow);
  font-weight: 500;
}
.live-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--coral);
  flex: none;
  animation: pulseDot 1.5s ease-out infinite;
}
.restore-row {
  display: flex;
  align-items: center;
  gap: 8px;
}
.restore-label {
  font-family: var(--font-mono);
  font-size: 8px;
  letter-spacing: 0.16em;
  color: var(--muted-2);
}
.restore-bar {
  position: relative;
  flex: 1;
  min-width: 80px;
  height: 11px;
  border-radius: 6px;
  background: #0a0910;
  border: 1px solid var(--line);
  overflow: hidden;
}
.restore-bar > i {
  display: block;
  height: 100%;
  width: 3%;
  border-radius: 4px;
  background: repeating-linear-gradient(135deg, var(--mint) 0 5px, #3dbb8a 5px 10px);
  transition: width 0.25s linear;
  position: relative;
  z-index: 2;
}
.restore-scan {
  position: absolute;
  z-index: 3;
  inset: 0;
  width: 34%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.35), transparent);
  animation: scanAcross 2.8s linear infinite;
  pointer-events: none;
}
.restore-pct {
  min-width: 34px;
  text-align: right;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  color: var(--mint);
}
.incident.is-wobbly .restore-pct {
  color: var(--yellow);
}

.hud {
  display: flex;
  align-items: stretch;
  gap: 7px;
}
.hud-stat {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 104px;
  padding: 8px 11px;
  border-radius: 14px;
  background: rgba(255, 244, 222, 0.038);
  border: 1px solid rgba(255, 244, 222, 0.08);
  overflow: hidden;
}
.hud-ico {
  width: 29px;
  height: 29px;
  flex: none;
  border-radius: 9px;
  display: grid;
  place-items: center;
}
.hud-ico .ico {
  width: 16px;
  height: 16px;
}
.hud-ico--money {
  background: rgba(255, 200, 87, 0.13);
  color: var(--yellow);
}
.hud-ico--heart {
  background: rgba(255, 92, 57, 0.14);
  color: #ff8c6d;
}
.hud-ico--bag {
  background: rgba(99, 230, 176, 0.12);
  color: var(--mint);
}
.hud-copy {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.hud-label {
  font-family: var(--font-mono);
  font-size: 8px;
  letter-spacing: 0.14em;
  color: var(--muted);
  line-height: 1.1;
  white-space: nowrap;
}
.hud-copy strong {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 21px;
  line-height: 1;
  letter-spacing: -0.035em;
  color: var(--cream);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.hud-stat--trust {
  padding-bottom: 11px;
}
.trust-mini {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 3px;
  background: rgba(255, 255, 255, 0.07);
}
.trust-mini i {
  display: block;
  height: 100%;
  width: 80%;
  border-radius: 0 3px 3px 0;
  background: linear-gradient(90deg, #ff8e5f, var(--yellow));
  transition: width 0.3s var(--ease-out), background 0.3s;
}
.hud-stat--trust.is-low {
  border-color: rgba(255, 65, 92, 0.58);
  background: rgba(255, 65, 92, 0.09);
  animation: lowPulse 1.1s ease-in-out infinite;
}
.hud-stat--trust.is-low .trust-mini i {
  background: var(--red);
}
.hud-stat.is-bumping {
  animation: bumpStat 0.4s var(--ease-out);
}
.top-controls {
  display: flex;
  align-items: center;
  gap: 6px;
}
.icon-btn {
  width: 38px;
  height: 38px;
  flex: none;
  border-radius: 12px;
  border: 1px solid rgba(255, 244, 222, 0.12);
  background: rgba(255, 244, 222, 0.035);
  color: #d9c9b7;
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s, transform 0.15s;
}
.icon-btn:hover {
  background: rgba(255, 244, 222, 0.1);
  color: var(--cream);
  border-color: rgba(255, 244, 222, 0.25);
}
.icon-btn:active {
  transform: scale(0.94);
}
.icon-btn .ico {
  width: 18px;
  height: 18px;
}
.icon-btn--pause {
  background: var(--cream);
  color: #1a1110;
  border-color: var(--cream);
}
.icon-btn--pause:hover {
  background: var(--yellow);
  border-color: var(--yellow);
  color: #1a1110;
}
.ico-sound-off {
  display: none;
}
.icon-btn.is-muted .ico-sound-on {
  display: none;
}
.icon-btn.is-muted .ico-sound-off {
  display: block;
}

/* ══════════════════════════════════════════════════════════════════
   DASHBOARD PANELS
   ══════════════════════════════════════════════════════════════════ */
.dashboard {
  display: grid;
  grid-template-columns: minmax(300px, 0.95fr) minmax(400px, 1.35fr) minmax(310px, 0.95fr);
  gap: 12px;
  min-height: 0;
}
.mobile-tabs {
  display: none;
}
.panel {
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  border-radius: var(--radius-panel);
  border: 1px solid var(--line);
  background: linear-gradient(180deg, #1b1923 0%, #14131b 100%);
  box-shadow: 0 26px 55px -38px #000, inset 0 1px 0 rgba(255, 244, 222, 0.05);
  overflow: hidden;
}
.panel-head {
  flex: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  min-height: 60px;
  padding: 12px 15px 10px;
}
.panel-heading {
  min-width: 0;
}
.panel-kicker {
  display: block;
  margin-bottom: 4px;
  font-family: var(--font-mono);
  font-size: 8px;
  font-weight: 500;
  letter-spacing: 0.15em;
  color: #ff9478;
  text-transform: uppercase;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.panel-title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  font-family: var(--font-display);
  font-size: 21px;
  font-weight: 750;
  line-height: 1;
  letter-spacing: -0.03em;
  color: var(--cream);
  white-space: nowrap;
}
.panel-hint {
  flex: none;
  font-family: var(--font-mono);
  font-size: 8px;
  line-height: 1.55;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  text-align: right;
  color: #d6c7b6;
  opacity: 0.82;
  white-space: nowrap;
}
.panel-hint span {
  color: #897e73;
}
.pill-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 24px;
  height: 21px;
  padding: 0 7px;
  border-radius: 20px;
  background: var(--coral);
  color: #1a0c08;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  line-height: 1;
  letter-spacing: 0;
}
.pill-count--quiet {
  background: rgba(255, 244, 222, 0.1);
  color: var(--cream);
}
.pill-count--hot {
  background: rgba(255, 92, 57, 0.16);
  border: 1px solid rgba(255, 92, 57, 0.38);
  color: #ff9478;
}
.panel-scroll {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 4px 10px 12px 12px;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 244, 222, 0.17) transparent;
}
.panel-scroll::-webkit-scrollbar {
  width: 8px;
}
.panel-scroll::-webkit-scrollbar-thumb {
  background: rgba(255, 244, 222, 0.16);
  border-radius: 10px;
}
.panel-scroll::-webkit-scrollbar-track {
  background: transparent;
}

/* Empty states */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  min-height: 190px;
  margin-top: 2px;
  padding: 22px 16px;
  border: 1px dashed rgba(255, 244, 222, 0.13);
  border-radius: 16px;
  text-align: center;
  color: var(--muted);
}
.empty-illo {
  margin-bottom: 7px;
  font-size: 34px;
  line-height: 1;
  transform: rotate(-4deg);
  filter: saturate(0.8);
}
.empty-state p {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 17px;
  letter-spacing: -0.015em;
  color: #cbbcaa;
}
.empty-state small {
  font-size: 12px;
  color: var(--muted-2);
}
.empty-state--support {
  min-height: 170px;
}

/* ══════════════════════════════════════════════════════════════════
   BADGES
   ══════════════════════════════════════════════════════════════════ */
.badge {
  --bc: var(--yellow);
  display: inline-flex;
  align-items: center;
  gap: 3px;
  height: 21px;
  padding: 0 6px 0 5px;
  border-radius: 6px;
  border: 1px solid transparent;
  background: rgba(255, 244, 222, 0.07);
  color: var(--bc);
  font-family: var(--font-mono);
  font-size: 8.5px;
  font-weight: 500;
  line-height: 1;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  white-space: nowrap;
}
.badge .ico {
  width: 12px;
  height: 12px;
  stroke-width: 2.4;
}
.badge--hot {
  --bc: #ff8a68;
  background: rgba(255, 107, 74, 0.13);
  border-color: rgba(255, 107, 74, 0.24);
}
.badge--cold {
  --bc: #79c1ff;
  background: rgba(101, 181, 255, 0.12);
  border-color: rgba(101, 181, 255, 0.24);
}
.badge--xl {
  --bc: #cbb2ff;
  background: rgba(195, 164, 255, 0.12);
  border-color: rgba(195, 164, 255, 0.25);
}
.badge--care {
  --bc: #ff9dbe;
  background: rgba(255, 143, 179, 0.12);
  border-color: rgba(255, 143, 179, 0.25);
}
/* badges printed on cream paper */
.order-card .badge,
.sheet .badge,
.end-panel .badge {
  background: rgba(37, 28, 23, 0.055);
  border-color: rgba(37, 28, 23, 0.13);
  color: #3b2a20;
}
.any-driver {
  display: inline-flex;
  align-items: center;
  height: 21px;
  padding: 0 7px;
  border-radius: 6px;
  border: 1px dashed rgba(65, 44, 30, 0.34);
  color: #7c6654;
  font-family: var(--font-mono);
  font-size: 8px;
  font-weight: 500;
  line-height: 1;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  white-space: nowrap;
}

/* ══════════════════════════════════════════════════════════════════
   ORDER CARDS
   ══════════════════════════════════════════════════════════════════ */
.orders-list {
  display: flex;
  flex-direction: column;
  gap: 9px;
}
.order-card {
  position: relative;
  flex: none;
  padding: 9px 11px 13px 14px;
  border-radius: 13px;
  border: 1px solid #d8c2a2;
  background-color: var(--paper);
  background-image: radial-gradient(rgba(95, 62, 38, 0.058) 0.7px, transparent 0.95px);
  background-size: 7px 7px;
  color: var(--paper-ink);
  box-shadow: 0 13px 22px -15px rgba(0, 0, 0, 0.9), inset 0 1px 0 rgba(255, 255, 255, 0.55);
  cursor: grab;
  user-select: none;
  -webkit-user-select: none;
  touch-action: manipulation;
  transition: transform 0.14s ease, box-shadow 0.14s ease, border-color 0.14s ease, opacity 0.14s ease;
  --accent: #2b211c;
}
.order-card::before {
  content: "";
  position: absolute;
  left: 0;
  top: 11px;
  bottom: 11px;
  width: 4px;
  border-radius: 0 4px 4px 0;
  background: var(--accent);
}
.order-card:hover {
  transform: translateY(-1.5px) rotate(-0.25deg);
  box-shadow: 0 17px 25px -15px rgba(0, 0, 0, 0.92), inset 0 1px 0 rgba(255, 255, 255, 0.55);
}
.order-card.is-entering {
  animation: orderIn 0.38s cubic-bezier(0.2, 0.9, 0.3, 1.14) both;
}
.order-card.selected {
  border-color: #ff6a44;
  outline: 2px solid #ff6a44;
  outline-offset: 1px;
  transform: translateY(-2px) rotate(-0.3deg);
  box-shadow: 0 18px 28px -14px rgba(0, 0, 0, 0.92), 0 0 0 5px rgba(255, 92, 57, 0.15);
}
.order-card.dragging {
  opacity: 0.4;
  transform: rotate(1.2deg) scale(0.98);
  cursor: grabbing;
}
.order-card.leaving {
  pointer-events: none;
}
.order-top {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 5px;
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: 0.03em;
  color: #7c6351;
}
.order-code {
  font-weight: 500;
}
.order-vip {
  display: inline-flex;
  align-items: center;
  height: 18px;
  padding: 0 6px;
  border-radius: 5px;
  background: #2b1f16;
  color: var(--yellow);
  font-size: 8px;
  font-weight: 500;
  letter-spacing: 0.12em;
}
.order-timer {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: #47342a;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}
.order-timer .ico {
  width: 12px;
  height: 12px;
  stroke-width: 2.2;
}
.order-main {
  display: flex;
  align-items: center;
  gap: 8px;
}
.order-food {
  flex: none;
  font-size: 25px;
  line-height: 1;
  filter: drop-shadow(0 2px 0 rgba(50, 30, 15, 0.1));
}
.order-dishwrap {
  flex: 1;
  min-width: 0;
}
.order-dish {
  display: block;
  font-family: var(--font-display);
  font-size: 16.5px;
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.02em;
  color: #201714;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.order-sub {
  display: block;
  margin-top: 2px;
  font-size: 11.5px;
  line-height: 1.25;
  color: #745b48;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.order-pay {
  flex: none;
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.035em;
  color: #1c2a20;
  font-variant-numeric: tabular-nums;
}
.order-pay.is-zero {
  color: #c23b22;
}
.order-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  min-height: 22px;
  margin-top: 7px;
}
.order-badges {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px;
  min-width: 0;
}
.reject-btn {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  height: 22px;
  padding: 0 7px 0 5px;
  border-radius: 7px;
  border: 1px solid rgba(170, 55, 31, 0.26);
  background: rgba(203, 67, 40, 0.07);
  color: #8f3826;
  font-family: var(--font-mono);
  font-size: 8px;
  font-weight: 500;
  letter-spacing: 0.11em;
  line-height: 1;
  cursor: pointer;
  transition: background 0.13s, color 0.13s, border-color 0.13s;
}
.reject-btn .ico {
  width: 11px;
  height: 11px;
  stroke-width: 2.4;
}
.reject-btn:hover {
  background: #b33a25;
  border-color: #8f2b1c;
  color: var(--cream);
}
.order-progress {
  position: absolute;
  left: 14px;
  right: 11px;
  bottom: 5px;
  height: 3px;
  border-radius: 2px;
  background: rgba(60, 38, 24, 0.13);
  overflow: hidden;
}
.order-progress i {
  display: block;
  height: 100%;
  width: 100%;
  border-radius: 2px;
  background: #2f9a6f;
  transition: width 0.15s linear, background 0.3s;
}
.order-card.urgent .order-progress i {
  background: #e0a020;
}
.order-card.critical .order-progress i {
  background: #d9432d;
}
.order-card.urgent .order-timer {
  color: #a36d0d;
}
.order-card.critical .order-timer {
  color: #c32a1b;
}
.order-card.critical .order-timer .ico {
  animation: blink 0.55s steps(2, start) infinite;
}

/* ══════════════════════════════════════════════════════════════════
   MAP
   ══════════════════════════════════════════════════════════════════ */
.map {
  position: relative;
  container-type: inline-size;
  flex: none;
  aspect-ratio: 560 / 276;
  margin: 0 12px;
  border-radius: 16px;
  border: 1px solid rgba(255, 244, 222, 0.09);
  background: #0c171c;
  overflow: hidden;
  box-shadow: inset 0 0 44px rgba(0, 0, 0, 0.45);
  isolation: isolate;
}
.map-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  transition: filter 0.4s;
}
.map-tokens {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 3;
}
.map-pops {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 5;
  border-radius: inherit;
}
.map::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 4;
  pointer-events: none;
  background: repeating-linear-gradient(180deg, rgba(255, 255, 255, 0.03) 0 1px, transparent 1px 3px);
  opacity: 0.35;
  border-radius: inherit;
}
.map.is-glitching .map-svg {
  filter: hue-rotate(-32deg) saturate(1.5) contrast(1.07);
}
.map.is-glitching {
  border-color: rgba(255, 92, 57, 0.5);
  box-shadow: inset 0 0 60px rgba(255, 65, 40, 0.28);
}
.map.is-glitching::after {
  opacity: 0.7;
  background:
    linear-gradient(90deg, rgba(255, 65, 92, 0.1), transparent 18%, transparent 80%, rgba(101, 181, 255, 0.12)),
    repeating-linear-gradient(180deg, rgba(255, 255, 255, 0.05) 0 1px, transparent 1px 3px);
  animation: glitchShift 0.45s steps(2) infinite;
}
.map-chip {
  position: absolute;
  z-index: 6;
  top: 8px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 24px;
  padding: 0 8px;
  border-radius: 7px;
  border: 1px solid rgba(255, 255, 255, 0.11);
  background: rgba(8, 14, 17, 0.78);
  backdrop-filter: blur(5px);
  color: #c6d0cf;
  font-family: var(--font-mono);
  font-size: 7.5px;
  font-weight: 500;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  white-space: nowrap;
  pointer-events: none;
}
.map-chip--tl {
  left: 8px;
}
.map-chip--tr {
  right: 8px;
  color: #e9d9c4;
}
.map-chip .map-live-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--mint);
  box-shadow: 0 0 8px rgba(99, 230, 176, 0.9);
}
.map.is-glitching .map-chip--tr {
  color: #ff9c83;
  border-color: rgba(255, 92, 57, 0.45);
}
.map-token {
  position: absolute;
  width: 24px;
  width: clamp(16px, 4.35cqw, 25px);
  height: 24px;
  height: clamp(16px, 4.35cqw, 25px);
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 2px solid var(--c, #fff);
  background: #13121a;
  font-size: 11.5px;
  font-size: clamp(8px, 2.25cqw, 12px);
  line-height: 1;
  transform: translate(-50%, -50%);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.5);
  transition: opacity 0.25s, filter 0.25s;
  will-change: left, top;
  z-index: 2;
}
.map-token.is-active {
  z-index: 4;
  box-shadow: 0 0 0 5px color-mix(in srgb, var(--c) 22%, transparent), 0 8px 14px rgba(0, 0, 0, 0.55);
}
.map-token.is-offline {
  opacity: 0.45;
  filter: grayscale(1);
}
.map-empty-note {
  position: absolute;
  z-index: 6;
  left: 8px;
  bottom: 7px;
  font-family: var(--font-mono);
  font-size: 7.5px;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: #6e8b92;
  white-space: nowrap;
  pointer-events: none;
}
.map.is-glitching .map-empty-note {
  color: #ff9b80;
}
/* svg map internals */
.map-svg .zone-pin {
  fill: #102229;
  stroke: #7ea6b0;
  stroke-width: 1.6;
}
.map-svg .zone-dot {
  fill: #7ea6b0;
}
.map-svg .zone-label {
  fill: #b4c8ca;
  font-family: var(--font-mono);
  font-size: 7.4px;
  font-weight: 500;
  letter-spacing: 0.13em;
}
.map-svg .rest-pin {
  fill: #1a1f25;
  stroke: #ff7d5b;
  stroke-width: 1.5;
}
.map-svg .rest-label {
  fill: #dccab7;
  font-family: var(--font-body);
  font-size: 8.4px;
  font-weight: 600;
  letter-spacing: 0.01em;
}
.map-svg .rest-emoji {
  font-size: 11px;
}
.map-svg .hub-label {
  fill: #6e8b92;
  font-family: var(--font-mono);
  font-size: 6.3px;
  font-weight: 500;
  letter-spacing: 0.16em;
}
.map-svg .map-water-label {
  fill: #4e7a83;
  font-family: var(--font-mono);
  font-size: 6px;
  letter-spacing: 0.2em;
}
.map-svg .route-live {
  fill: none;
  stroke-width: 2.1;
  stroke-linecap: round;
  stroke-dasharray: 3 6;
  opacity: 0.92;
  animation: dashTravel 1.1s linear infinite;
}
.map-svg .route-preview {
  fill: none;
  stroke: var(--yellow);
  stroke-width: 2.1;
  stroke-linecap: round;
  stroke-dasharray: 3 6;
  opacity: 0.95;
  animation: dashTravel 0.9s linear infinite;
}
.map-svg .route-ring {
  fill: none;
  stroke: var(--yellow);
  stroke-width: 1.5;
  transform-box: fill-box;
  transform-origin: center;
  animation: routeRing 1.6s ease-out infinite;
  opacity: 0;
}
.map-svg .route-ring--live {
  stroke-width: 1.3;
  animation: routeRing 1.9s ease-out infinite;
}
.map-svg .route-dot {
  fill: var(--yellow);
}
.map-svg .route-dot--live {
  fill: currentColor;
}
.map-pop {
  position: absolute;
  z-index: 5;
  transform: translate(-50%, -50%);
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.02em;
  color: var(--mint);
  text-shadow: 0 2px 0 rgba(0, 0, 0, 0.55), 0 0 12px rgba(0, 0, 0, 0.5);
  white-space: nowrap;
  animation: mapPop 1.25s var(--ease-out) forwards;
  white-space: nowrap;
}
.map-pop.is-bad {
  color: #ff8a74;
}
.map-pop.is-tip {
  color: var(--yellow);
  font-size: 13px;
}
.map-pop.is-ghost {
  color: #f0e6ff;
  font-size: 13px;
}

/* ══════════════════════════════════════════════════════════════════
   DISPATCH CONTEXT + ROSTER
   ══════════════════════════════════════════════════════════════════ */
.dispatch-context {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 36px;
  margin: 9px 12px 7px;
  padding: 7px 10px;
  border-radius: 12px;
  border: 1px dashed rgba(255, 244, 222, 0.12);
  background: rgba(255, 244, 222, 0.03);
  color: #94897d;
  font-size: 12px;
  line-height: 1.2;
}
.dispatch-context.has-selection {
  border-style: solid;
  border-color: rgba(255, 122, 87, 0.45);
  background: linear-gradient(90deg, rgba(255, 92, 57, 0.15), rgba(255, 200, 87, 0.055));
  color: var(--cream);
}
.dc-inner {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 5px 7px;
  min-width: 0;
}
.dc-inner > .ico {
  width: 14px;
  height: 14px;
  color: #b4a696;
}
.dc-code {
  font-family: var(--font-mono);
  font-size: 9.5px;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--yellow);
}
.dc-dish {
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: -0.01em;
  white-space: nowrap;
}
.dc-hint {
  font-family: var(--font-mono);
  font-size: 8px;
  font-weight: 500;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: #ffd196;
  white-space: nowrap;
}
.dispatch-context.has-selection .any-driver {
  border-color: rgba(255, 244, 222, 0.4);
  color: #f4e4cf;
}
.dispatch-context.has-selection .badge {
  color: var(--bc);
  background: rgba(255, 244, 222, 0.07);
  border-color: rgba(255, 244, 222, 0.14);
}
.dc-cancel {
  flex: none;
  padding: 5px 7px;
  border: 0;
  border-radius: 6px;
  background: none;
  color: #d0c0ae;
  font-family: var(--font-mono);
  font-size: 8px;
  font-weight: 500;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  cursor: pointer;
}
.dc-cancel:hover {
  background: rgba(255, 255, 255, 0.09);
  color: #fff;
}

.roster {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 7px;
  padding: 0 10px 12px 12px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 244, 222, 0.17) transparent;
}
.roster::-webkit-scrollbar {
  width: 8px;
}
.roster::-webkit-scrollbar-thumb {
  background: rgba(255, 244, 222, 0.16);
  border-radius: 10px;
}
.driver-row {
  position: relative;
  flex: none;
  width: 100%;
  min-height: 58px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 14px;
  border: 1px solid rgba(255, 244, 222, 0.08);
  background: rgba(255, 244, 222, 0.035);
  color: var(--cream);
  text-align: left;
  cursor: pointer;
  overflow: hidden;
  font-family: inherit;
  transition: background 0.15s, border-color 0.15s, opacity 0.2s, filter 0.2s, transform 0.15s;
}
.driver-row:hover {
  background: rgba(255, 244, 222, 0.065);
  border-color: rgba(255, 244, 222, 0.17);
}
.driver-ava {
  width: 38px;
  height: 38px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: #211e2a;
  background: color-mix(in srgb, var(--dc) 22%, #17151e);
  border: 1.5px solid color-mix(in srgb, var(--dc) 60%, transparent);
  font-size: 19px;
  line-height: 1;
  box-shadow: inset 0 0 0 3px rgba(0, 0, 0, 0.12);
  transition: filter 0.2s, opacity 0.2s;
}
.driver-main {
  flex: 1;
  min-width: 0;
}
.driver-name {
  display: flex;
  align-items: baseline;
  gap: 6px;
  font-family: var(--font-display);
  font-size: 16.5px;
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.02em;
  white-space: nowrap;
}
.driver-vehicle {
  font-family: var(--font-mono);
  font-size: 8px;
  font-weight: 400;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: #8f8478;
}
.driver-badges {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
  margin-top: 4px;
}
.driver-badges .badge {
  height: 19px;
  padding: 0 5px 0 4px;
  font-size: 8px;
}
.driver-side {
  flex: none;
  min-width: 92px;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: center;
  gap: 4px;
  text-align: right;
  font-family: var(--font-mono);
}
.ds-ready {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 0.14em;
  color: var(--mint);
}
.ds-ready i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--mint);
  box-shadow: 0 0 9px rgba(99, 230, 176, 0.9);
  animation: pulseDot 2s ease-out infinite;
}
.ds-label {
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 0.1em;
  color: #c0b4a5;
  white-space: nowrap;
}
.ds-sub {
  font-family: var(--font-mono);
  font-size: 8.5px;
  letter-spacing: 0.03em;
  color: #8b8075;
  white-space: nowrap;
}
.ds-off {
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 0.11em;
  color: #ff8d70;
  white-space: nowrap;
}
.ds-miss {
  font-size: 8.5px;
  font-weight: 500;
  letter-spacing: 0.07em;
  color: #ff9b83;
  text-transform: uppercase;
  white-space: nowrap;
}
.ds-miss .ico {
  width: 11px;
  height: 11px;
  margin-right: 2px;
}
.ds-go {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  height: 26px;
  padding: 0 9px 0 11px;
  border-radius: 8px;
  background: var(--mint);
  color: #062018;
  font-family: var(--font-body);
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.015em;
  white-space: nowrap;
  box-shadow: 0 3px 0 #2aa377;
  text-transform: uppercase;
}
.ds-go .ico {
  width: 12px;
  height: 12px;
  stroke-width: 2.6;
}
.ds-eta {
  font-family: var(--font-mono);
  font-size: 8px;
  letter-spacing: 0.07em;
  color: #a8d9c4;
  white-space: nowrap;
}
.tripbar {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  background: rgba(255, 255, 255, 0.055);
}
.tripbar i {
  display: block;
  width: 0;
  height: 100%;
  border-radius: 0 2px 2px 0;
  background: var(--dc);
  transition: width 0.12s linear;
}
.driver-row.is-on-trip .driver-ava {
  box-shadow: inset 0 0 0 3px rgba(0, 0, 0, 0.12), 0 0 0 4px color-mix(in srgb, var(--dc) 18%, transparent);
}
.driver-row.is-offline .driver-ava {
  filter: grayscale(1);
  opacity: 0.55;
}
.driver-row.can-take {
  border-color: rgba(99, 230, 176, 0.42);
  background: linear-gradient(90deg, rgba(99, 230, 176, 0.095), rgba(99, 230, 176, 0.025) 58%, rgba(255, 244, 222, 0.03));
  box-shadow: inset 0 0 0 1px rgba(99, 230, 176, 0.1);
  animation: eligiblePulse 1.9s ease-in-out infinite;
}
.driver-row.can-take:hover {
  background: linear-gradient(90deg, rgba(99, 230, 176, 0.16), rgba(99, 230, 176, 0.05));
  border-color: rgba(99, 230, 176, 0.75);
}
.driver-row.cant-take {
  opacity: 0.44;
  filter: saturate(0.55);
  cursor: not-allowed;
}
.driver-row.cant-take:hover {
  background: rgba(255, 244, 222, 0.035);
  border-color: rgba(255, 244, 222, 0.08);
}
.driver-row.risky {
  border-color: rgba(255, 92, 57, 0.48);
  background: linear-gradient(90deg, rgba(255, 92, 57, 0.11), rgba(255, 92, 57, 0.025) 58%, rgba(255, 244, 222, 0.03));
  animation: none;
}
.driver-row.risky .ds-go {
  background: var(--coral);
  color: #1c0905;
  box-shadow: 0 3px 0 #a9351c;
}
.driver-row.risky .ds-eta {
  color: #ffb7a4;
}
.driver-row.drop-hover {
  outline: 2px dashed var(--yellow);
  outline-offset: -5px;
  background: rgba(255, 200, 87, 0.13);
  transform: scale(1.008);
}
.driver-row.is-shaking {
  animation: shake 0.34s ease;
}

/* ══════════════════════════════════════════════════════════════════
   SUPPORT / TICKETS
   ══════════════════════════════════════════════════════════════════ */
.book-btn {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 31px;
  padding: 0 10px 0 8px;
  border-radius: 9px;
  border: 1px solid rgba(255, 244, 222, 0.16);
  background: rgba(255, 244, 222, 0.05);
  color: #f0e2ce;
  font-family: var(--font-mono);
  font-size: 8.5px;
  font-weight: 500;
  letter-spacing: 0.11em;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s, color 0.15s, border-color 0.15s, transform 0.15s;
}
.book-btn .ico {
  width: 14px;
  height: 14px;
}
.book-btn:hover {
  background: var(--yellow);
  border-color: var(--yellow);
  color: #201608;
  transform: translateY(-1px);
}
.tickets-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.ticket {
  --accent: var(--yellow);
  position: relative;
  flex: none;
  padding: 11px 11px 13px;
  border-radius: 15px;
  border: 1px solid rgba(255, 244, 222, 0.11);
  background: linear-gradient(180deg, #25212e, #1c1925);
  box-shadow: 0 14px 26px -20px #000;
  overflow: hidden;
  animation: ticketIn 0.34s cubic-bezier(0.2, 0.9, 0.3, 1.08) both;
}
.ticket::before {
  content: "";
  position: absolute;
  left: 0;
  top: 13px;
  bottom: 13px;
  width: 3px;
  border-radius: 0 3px 3px 0;
  background: var(--accent);
  opacity: 0.95;
}
.ticket.urgent {
  border-color: rgba(255, 92, 57, 0.3);
}
.ticket.critical {
  border-color: rgba(255, 65, 92, 0.6);
  animation: ticketIn 0.34s cubic-bezier(0.2, 0.9, 0.3, 1.08) both, criticalGlow 0.9s 0.4s ease-in-out infinite alternate;
}
.ticket.resolved {
  border-color: rgba(99, 230, 176, 0.55);
  animation: none;
}
.ticket.wrong {
  border-color: rgba(255, 65, 92, 0.55);
  animation: ticketShudder 0.36s ease both;
}
.ticket.timedout {
  border-color: rgba(255, 244, 222, 0.08);
  animation: none;
  filter: saturate(0.5);
  opacity: 0.7;
}
.ticket-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 7px;
}
.ticket-ava {
  width: 30px;
  height: 30px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--av, var(--blue));
  color: #17110e;
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 800;
  line-height: 1;
  text-transform: uppercase;
  box-shadow: inset 0 0 0 2px rgba(0, 0, 0, 0.12);
}
.ticket-who {
  flex: 1;
  min-width: 0;
}
.ticket-who b {
  display: block;
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.01em;
  color: var(--cream);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ticket-who small {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-top: 3px;
  font-family: var(--font-mono);
  font-size: 7.5px;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: #968b7f;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ticket-who small.is-gold {
  color: #e8bf69;
}
.ticket-who small .ico {
  width: 10px;
  height: 10px;
}
.ticket-timer {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 6px;
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.055);
  color: #d6c7b5;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}
.ticket-timer .ico {
  width: 12px;
  height: 12px;
  stroke-width: 2.2;
}
.ticket-msg {
  margin: 0 0 8px;
  padding: 8px 10px;
  border-left: 2px solid rgba(255, 255, 255, 0.1);
  border-radius: 4px 11px 11px 4px;
  background: rgba(255, 255, 255, 0.038);
  color: #efe1cf;
  font-size: 13.2px;
  line-height: 1.42;
}
.ticket-opts {
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.opt {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  min-height: 32px;
  padding: 6px 9px 6px 7px;
  border-radius: 9px;
  border: 1px solid rgba(255, 244, 222, 0.1);
  background: rgba(255, 244, 222, 0.045);
  color: #f2e5d4;
  font-family: var(--font-body);
  font-size: 12.3px;
  font-weight: 500;
  line-height: 1.2;
  text-align: left;
  cursor: pointer;
  transition: background 0.12s, border-color 0.12s, transform 0.12s, color 0.12s;
}
.opt .key {
  width: 20px;
  height: 20px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 6px;
  background: rgba(255, 244, 222, 0.1);
  color: #e5d4c0;
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 500;
  transition: background 0.12s, color 0.12s;
}
.opt .opt-label {
  min-width: 0;
}
.opt:not(:disabled):hover {
  background: rgba(255, 200, 87, 0.15);
  border-color: rgba(255, 200, 87, 0.48);
  color: #fff8ec;
  transform: translateX(2px);
}
.opt:not(:disabled):hover .key {
  background: var(--yellow);
  color: #1d1508;
}
.opt:disabled {
  cursor: default;
}
.opt.is-correct {
  background: rgba(99, 230, 176, 0.18);
  border-color: rgba(99, 230, 176, 0.7);
  color: #eafff6;
}
.opt.is-correct .key {
  background: var(--mint);
  color: #062018;
}
.opt.is-picked-wrong {
  background: rgba(255, 65, 92, 0.22);
  border-color: rgba(255, 65, 92, 0.72);
  color: #ffeae7;
}
.opt.is-picked-wrong .key {
  background: var(--red);
  color: #26070b;
}
.opt.is-dimmed {
  opacity: 0.42;
}
.ticket.timedout .opt {
  opacity: 0.45;
}
.ticket-timerbar {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 3px;
  background: rgba(255, 255, 255, 0.055);
}
.ticket-timerbar i {
  display: block;
  width: 100%;
  height: 100%;
  background: var(--accent);
  opacity: 0.92;
  transition: width 0.14s linear, background 0.3s;
}
.ticket.urgent .ticket-timerbar i {
  background: var(--yellow);
}
.ticket.critical .ticket-timerbar i {
  background: var(--red);
}
.ticket.urgent .ticket-timer {
  color: #ffd98a;
}
.ticket.critical .ticket-timer {
  color: #ff8f9f;
  background: rgba(255, 65, 92, 0.14);
  animation: blink 0.7s steps(2, start) infinite;
}

/* ══════════════════════════════════════════════════════════════════
   TECH TICKER
   ══════════════════════════════════════════════════════════════════ */
.ticker {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 48px;
  padding: 7px 13px;
  border-radius: 17px;
  border: 1px solid var(--line);
  background: linear-gradient(90deg, #1a1922, #121118);
  cursor: pointer;
  overflow: hidden;
  user-select: none;
  transition: border-color 0.15s;
}
.ticker:hover {
  border-color: var(--line-strong);
}
.ticker::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: var(--coral);
  opacity: 0.9;
}
.ticker-who {
  flex: none;
  display: flex;
  align-items: center;
  gap: 8px;
}
.tech-avatar {
  width: 30px;
  height: 30px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(135deg, #ffd36e, #ff9a4a);
  color: #2a1708;
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 800;
  line-height: 1;
  box-shadow: inset 0 0 0 2px rgba(0, 0, 0, 0.12);
}
.ticker-who-text b {
  display: block;
  font-family: var(--font-mono);
  font-size: 8.5px;
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: 0.13em;
  color: var(--cream);
}
.ticker-who-text b span {
  color: #8e8377;
  font-weight: 400;
}
.ticker-who-text small {
  display: block;
  margin-top: 1px;
  font-family: var(--font-mono);
  font-size: 8px;
  letter-spacing: 0.05em;
  color: #8e8377;
}
.ticker-msg {
  flex: 1;
  min-width: 0;
  color: #e9dac6;
  font-size: 13px;
  line-height: 1.35;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ticker-msg.is-flashing {
  animation: tickerFlash 0.55s var(--ease-out);
}
.ticker-cursor {
  margin-left: 2px;
  color: var(--coral);
  animation: blink 1s steps(2, start) infinite;
}
.ticker-msg.has-msg .ticker-cursor {
  display: none;
}
.active-effects {
  flex: none;
  display: flex;
  gap: 5px;
  max-width: 44%;
  overflow: hidden;
}
.effect-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 25px;
  padding: 0 8px 0 6px;
  border-radius: 8px;
  border: 1px solid rgba(255, 90, 80, 0.42);
  background: rgba(255, 65, 92, 0.13);
  color: #ffb8a6;
  font-family: var(--font-mono);
  font-size: 8px;
  font-weight: 500;
  letter-spacing: 0.09em;
  line-height: 1;
  text-transform: uppercase;
  white-space: nowrap;
  animation: chipIn 0.28s var(--ease-pop) both;
}
.effect-chip.is-quiet {
  border-color: rgba(255, 200, 87, 0.4);
  background: rgba(255, 200, 87, 0.11);
  color: #ffdf9d;
}
.ticker-open {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 1px;
  padding: 6px 7px 6px 9px;
  border-radius: 8px;
  border: 1px solid rgba(255, 244, 222, 0.12);
  color: #b5a897;
  font-family: var(--font-mono);
  font-size: 8px;
  font-weight: 500;
  letter-spacing: 0.12em;
  white-space: nowrap;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.ticker-open .ico {
  width: 12px;
  height: 12px;
}
.ticker:hover .ticker-open {
  background: var(--coral);
  border-color: var(--coral);
  color: #1c0c07;
}

/* ══════════════════════════════════════════════════════════════════
   CHAOS FX, TOASTS, COACH
   ══════════════════════════════════════════════════════════════════ */
.chaos-veil {
  position: fixed;
  inset: 0;
  z-index: 45;
  pointer-events: none;
  opacity: 0;
  box-shadow: inset 0 0 150px 18px rgba(255, 65, 40, 0.6);
  transition: opacity 0.7s ease;
}
.chaos-veil.is-on {
  opacity: var(--chaos-strength, 0.3);
  animation: veilPulse 2.4s ease-in-out infinite;
}
.chaos-banner {
  position: fixed;
  z-index: 80;
  left: 50%;
  top: 98px;
  width: min(570px, calc(100vw - 28px));
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 16px 16px 14px 15px;
  border-radius: 17px;
  border: 1px solid rgba(255, 92, 57, 0.62);
  background: linear-gradient(135deg, #271419, #150f15 78%);
  box-shadow: 0 28px 65px -22px rgba(0, 0, 0, 0.92), inset 0 0 0 1px rgba(255, 200, 87, 0.06);
  overflow: hidden;
  opacity: 0;
  transform: translate(-50%, -16px) scale(0.96);
  pointer-events: none;
  transition: opacity 0.22s ease, transform 0.32s cubic-bezier(0.2, 0.9, 0.3, 1.25);
}
.chaos-banner.is-show {
  opacity: 1;
  transform: translate(-50%, 0) scale(1);
}
.chaos-banner::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 5px;
  background: repeating-linear-gradient(135deg, var(--yellow) 0 8px, #1a1014 8px 16px);
}
.cb-icon {
  flex: none;
  width: 46px;
  height: 46px;
  margin-top: 4px;
  display: grid;
  place-items: center;
  border-radius: 13px;
  border: 1px solid rgba(255, 200, 87, 0.3);
  background: rgba(255, 200, 87, 0.11);
  font-size: 24px;
  line-height: 1;
}
.cb-main {
  flex: 1;
  min-width: 0;
  margin-top: 2px;
}
.cb-kicker {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 4px;
  font-family: var(--font-mono);
  font-size: 8px;
  font-weight: 500;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--yellow);
}
.cb-kicker i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--red);
  animation: blink 0.5s steps(2, start) infinite;
}
.cb-title {
  margin: 0 0 5px;
  font-family: var(--font-display);
  font-size: 21px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.025em;
  color: var(--cream);
}
.cb-desc {
  margin: 0;
  font-size: 12.3px;
  line-height: 1.38;
  color: #d9c5b4;
}

.toasts {
  position: fixed;
  z-index: 86;
  left: 50%;
  bottom: 76px;
  width: min(92vw, 600px);
  display: flex;
  flex-direction: column-reverse;
  align-items: center;
  gap: 7px;
  transform: translateX(-50%);
  pointer-events: none;
}
.toast {
  display: flex;
  align-items: center;
  gap: 8px;
  max-width: 100%;
  padding: 8px 13px 8px 8px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #17151e;
  color: var(--cream);
  font-size: 12.4px;
  font-weight: 500;
  line-height: 1.28;
  box-shadow: 0 16px 36px -14px #000;
  animation: toastIn 0.28s var(--ease-pop) both;
}
.toast.is-leaving {
  animation: toastOut 0.2s ease both;
}
.toast .t-ico {
  width: 23px;
  height: 23px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.07);
  color: var(--cream);
  font-size: 12px;
  line-height: 1;
}
.toast .t-ico .ico {
  width: 13px;
  height: 13px;
  stroke-width: 2.4;
}
.toast b,
.toast strong {
  font-weight: 700;
  color: #fff;
}
.toast.is-good {
  border-color: rgba(99, 230, 176, 0.34);
}
.toast.is-good .t-ico {
  background: rgba(99, 230, 176, 0.15);
  color: var(--mint);
}
.toast.is-bad {
  border-color: rgba(255, 65, 92, 0.5);
}
.toast.is-bad .t-ico {
  background: rgba(255, 65, 92, 0.18);
  color: #ff8b8b;
}
.toast.is-cash {
  border-color: rgba(255, 200, 87, 0.4);
}
.toast.is-cash .t-ico {
  background: rgba(255, 200, 87, 0.16);
  color: var(--yellow);
}
.toast.is-info .t-ico {
  background: rgba(101, 181, 255, 0.15);
  color: var(--blue);
}

.coach {
  position: fixed;
  z-index: 84;
  left: 22px;
  bottom: 76px;
  max-width: 330px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 11px 13px 11px 11px;
  border-radius: 14px;
  border: 1px solid rgba(120, 85, 55, 0.26);
  background: var(--paper);
  color: #251b17;
  font-size: 12.4px;
  line-height: 1.4;
  box-shadow: 0 22px 45px -18px rgba(0, 0, 0, 0.9);
  opacity: 0;
  transform: translateY(9px) rotate(-0.6deg);
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s var(--ease-pop);
}
.coach.is-show {
  opacity: 1;
  transform: translateY(0) rotate(-0.6deg);
}
.coach-icon {
  flex: none;
  width: 27px;
  height: 27px;
  display: grid;
  place-items: center;
  border-radius: 9px;
  background: #251b17;
  color: var(--yellow);
  font-size: 13px;
  line-height: 1;
}
.coach small {
  display: block;
  margin-bottom: 2px;
  font-family: var(--font-mono);
  font-size: 7.5px;
  font-weight: 500;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: #8a6a52;
}
.coach b {
  font-weight: 700;
  color: #140d0a;
}

/* ══════════════════════════════════════════════════════════════════
   HERO / TITLE SCREEN
   ══════════════════════════════════════════════════════════════════ */
.hero {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  min-height: 100dvh;
  padding: 24px clamp(20px, 4.5vw, 68px) 0;
  overflow-x: hidden;
  overflow-y: auto;
  color: var(--cream);
  background:
    radial-gradient(900px 620px at 12% 88%, rgba(255, 92, 57, 0.2), transparent 62%),
    radial-gradient(720px 540px at 94% 6%, rgba(99, 230, 176, 0.1), transparent 62%),
    #0b0a11;
  isolation: isolate;
}
.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}
.hero-gridlines {
  position: absolute;
  inset: 0;
  opacity: 0.8;
  background-image:
    linear-gradient(rgba(255, 244, 222, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 244, 222, 0.035) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse at 46% 46%, #000 20%, transparent 82%);
  -webkit-mask-image: radial-gradient(ellipse at 46% 46%, #000 20%, transparent 82%);
}
.hero-glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.55;
}
.hero-glow--one {
  width: 38vw;
  height: 38vw;
  left: -12vw;
  bottom: -16vw;
  background: rgba(255, 92, 57, 0.42);
}
.hero-glow--two {
  width: 28vw;
  height: 28vw;
  right: -8vw;
  top: -10vw;
  background: rgba(99, 230, 176, 0.2);
}
.hero-scribble {
  position: absolute;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.22em;
  color: rgba(255, 244, 222, 0.14);
  white-space: nowrap;
}
.hero-scribble--one {
  left: 4vw;
  top: 20vh;
  transform: rotate(-90deg);
  transform-origin: left top;
}
.hero-scribble--two {
  right: 4vw;
  bottom: 16vh;
  transform: rotate(6deg);
}
.hero-watermark {
  display: none;
}
.hero-top {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding-top: 2px;
}
.logo {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  min-width: 0;
}
.logo--hero .logo-svg {
  width: 48px;
  height: 48px;
}
.logo--hero .logo-word {
  font-size: 34px;
}
.hero-ribbon {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 13px;
  border-radius: 999px;
  border: 1px solid rgba(255, 244, 222, 0.18);
  background: rgba(255, 244, 222, 0.045);
  color: #e8d9c8;
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 0.14em;
  line-height: 1.3;
  text-align: center;
  text-transform: uppercase;
}
.hero-ribbon .ribbon-short {
  display: none;
}
.hero-ribbon > b {
  color: var(--muted-2);
  font-weight: 400;
}
.hero-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(380px, 0.92fr);
  align-items: center;
  gap: clamp(10px, 2vw, 46px);
  width: 100%;
  max-width: 1320px;
  min-height: 0;
  margin: 0 auto;
  padding: 16px 0 8px;
}
.hero-copy {
  max-width: 720px;
  min-width: 0;
}
.hero-eyebrow {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 12px;
  margin: 0 0 clamp(13px, 2vh, 20px);
  font-family: var(--font-mono);
  font-size: 9.5px;
  font-weight: 500;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: #ae9f91;
}
.eyebrow-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255, 92, 57, 0.46);
  background: rgba(255, 92, 57, 0.14);
  color: #ffb29d;
}
.hero h1 {
  margin: 0 0 clamp(16px, 2.5vh, 27px);
  font-family: var(--font-display);
  font-size: clamp(50px, min(7.7vw, 10.4vh), 104px);
  font-weight: 800;
  line-height: 0.86;
  letter-spacing: -0.055em;
  color: var(--cream);
}
.hero-accent {
  display: inline-block;
  color: var(--coral);
  text-decoration: underline;
  text-decoration-color: var(--yellow);
  text-decoration-thickness: 0.055em;
  text-underline-offset: 0.075em;
}
.hero-lead {
  max-width: 575px;
  margin: 0 0 clamp(20px, 3vh, 31px);
  color: #c9bbaa;
  font-size: clamp(15px, 1.18vw, 17.5px);
  line-height: 1.56;
}
.hero-lead strong {
  color: var(--cream);
  font-weight: 600;
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 48px;
  padding: 0 20px;
  border-radius: 13px;
  border: 1.5px solid transparent;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 14px;
  line-height: 1;
  letter-spacing: 0.01em;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.btn .ico {
  width: 18px;
  height: 18px;
  stroke-width: 2.2;
}
.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
.btn--hero {
  min-height: 60px;
  padding: 0 25px;
  border-color: transparent;
  background: var(--coral);
  color: #1a0905;
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 800;
  letter-spacing: -0.01em;
  text-transform: uppercase;
  box-shadow: 0 6px 0 var(--coral-dark), 0 22px 42px -16px rgba(255, 92, 57, 0.66);
}
.btn--hero:hover {
  background: #ff6c49;
  transform: translateY(-2px);
  box-shadow: 0 8px 0 var(--coral-dark), 0 27px 46px -16px rgba(255, 92, 57, 0.78);
}
.btn--hero:active {
  transform: translateY(3px);
  box-shadow: 0 2px 0 var(--coral-dark), 0 12px 24px -14px rgba(255, 92, 57, 0.6);
}
.btn--ghost {
  min-height: 60px;
  padding: 0 20px;
  border-color: rgba(255, 244, 222, 0.22);
  background: rgba(255, 244, 222, 0.04);
  color: #f3e6d5;
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}
.btn--ghost:hover {
  background: rgba(255, 244, 222, 0.1);
  border-color: rgba(255, 244, 222, 0.45);
  transform: translateY(-1px);
}
.hero-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 7px 0;
  margin-top: clamp(18px, 2.7vh, 29px);
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #8f8478;
}
.hero-facts span {
  padding: 0 14px;
  border-left: 1px solid rgba(255, 244, 222, 0.15);
  white-space: nowrap;
}
.hero-facts span:first-child {
  padding-left: 0;
  border-left: 0;
}
.hero-facts b {
  color: #f6e8d6;
  font-weight: 500;
}
.hero-best {
  min-height: 15px;
  margin-top: 14px;
  font-family: var(--font-mono);
  font-size: 9.5px;
  font-weight: 500;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: var(--yellow);
}
.hero-best b {
  color: #fff6e8;
  font-weight: 500;
}
.hero-marquee {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  height: 38px;
  margin: 0 calc(clamp(20px, 4.5vw, 68px) * -1);
  border-top: 1px solid rgba(255, 244, 222, 0.1);
  background: rgba(5, 4, 8, 0.58);
  overflow: hidden;
}
.marquee-track {
  display: flex;
  align-items: center;
  gap: 22px;
  padding-left: 22px;
  white-space: nowrap;
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #c9b9a7;
  animation: marquee 38s linear infinite;
}
.marquee-track i {
  color: var(--coral);
  font-size: 11px;
  font-style: normal;
}

/* entrance animations */
.hero-copy > * {
  animation: riseIn 0.7s cubic-bezier(0.2, 0.9, 0.3, 1) both;
}
.hero-copy > *:nth-child(1) { animation-delay: 0.05s; }
.hero-copy > *:nth-child(2) { animation-delay: 0.12s; }
.hero-copy > *:nth-child(3) { animation-delay: 0.2s; }
.hero-copy > *:nth-child(4) { animation-delay: 0.28s; }
.hero-copy > *:nth-child(5) { animation-delay: 0.36s; }
.hero-copy > *:nth-child(6) { animation-delay: 0.44s; }

/* ── Hero art ────────────────────────────────────────────────────── */
.hero-art {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
}
.art-stage {
  position: relative;
  width: min(100%, 560px);
  aspect-ratio: 560 / 500;
  font-size: clamp(12px, 1.09vw, 16px);
  isolation: isolate;
  animation: heroArtIn 0.8s 0.25s cubic-bezier(0.2, 0.9, 0.3, 1) both;
}
.art-stage::before {
  content: "";
  position: absolute;
  z-index: 0;
  inset: 8% 0 5% 6%;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(255, 92, 57, 0.26), rgba(255, 92, 57, 0.06) 58%, transparent 76%);
  filter: blur(24px);
}
.art-stage::after {
  content: "";
  position: absolute;
  z-index: 0;
  inset: 16% 8% 12% 8%;
  border-radius: 24px;
  border: 1px dashed rgba(255, 244, 222, 0.1);
  transform: rotate(4deg);
}
.art-spark {
  position: absolute;
  z-index: 7;
  color: var(--yellow);
  font-size: 1.25em;
  line-height: 1;
  animation: twinkle 2.8s ease-in-out infinite;
}
.art-spark.s1 { right: 5%; top: 42%; animation-delay: -0.4s; }
.art-spark.s2 { left: 48%; bottom: 2%; font-size: 0.9em; animation-delay: -1.4s; }
.art-spark.s3 { left: 95%; top: 53%; font-size: 0.7em; animation-delay: -2.1s; color: var(--mint); }

.art-ticket {
  position: absolute;
  z-index: 2;
  left: 5%;
  top: 23%;
  width: 67%;
  padding: 0.9em 1.05em 1.3em 1.35em;
  border-radius: 1em;
  border: 1px solid #d7c09f;
  background-color: var(--paper);
  background-image: radial-gradient(rgba(95, 62, 38, 0.06) 0.7px, transparent 0.95px);
  background-size: 0.45em 0.45em;
  color: #251c18;
  box-shadow: 0 2.8em 4em -1.6em rgba(0, 0, 0, 0.88), inset 0 0.12em 0 rgba(255, 255, 255, 0.6);
  transform: rotate(-5.5deg);
  animation: floatA 6.5s ease-in-out infinite;
}
.art-ticket::before {
  content: "";
  position: absolute;
  left: 0;
  top: 1em;
  bottom: 1em;
  width: 0.32em;
  border-radius: 0 0.3em 0.3em 0;
  background: linear-gradient(180deg, var(--coral) 0 38%, var(--yellow) 38% 56%, var(--mint) 56% 75%, #2b211c 75%);
}
.at-top {
  display: flex;
  align-items: center;
  gap: 0.5em;
  margin-bottom: 0.5em;
  font-family: var(--font-mono);
  font-size: 0.65em;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: #7c6351;
}
.at-vip {
  display: inline-flex;
  align-items: center;
  height: 1.8em;
  padding: 0 0.6em;
  border-radius: 0.45em;
  background: #2b1f16;
  color: var(--yellow);
  font-size: 0.9em;
  letter-spacing: 0.12em;
}
.at-time {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 0.3em;
  color: #47342a;
  font-weight: 500;
}
.at-time .ico {
  width: 1.35em;
  height: 1.35em;
  stroke-width: 2.2;
}
.at-main {
  display: flex;
  align-items: center;
  gap: 0.55em;
}
.at-food {
  flex: none;
  font-size: 2.1em;
  line-height: 1;
  filter: drop-shadow(0 0.08em 0 rgba(50, 30, 15, 0.1));
}
.at-dish {
  flex: 1;
  min-width: 0;
}
.at-dish b {
  display: block;
  font-family: var(--font-display);
  font-size: 1.24em;
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.025em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.at-dish small {
  display: block;
  margin-top: 0.2em;
  color: #745b48;
  font-size: 0.72em;
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.at-pay {
  flex: none;
  font-family: var(--font-display);
  font-size: 1.55em;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.04em;
  color: #1c2a20;
}
.at-foot {
  display: flex;
  align-items: center;
  gap: 0.35em;
  margin-top: 0.6em;
}
.art-ticket .badge {
  height: 1.75em;
  padding: 0 0.5em 0 0.42em;
  font-size: 0.64em;
}
.art-ticket .badge .ico {
  width: 1.3em;
  height: 1.3em;
}
.at-reject {
  margin-left: auto;
  padding: 0.35em 0.6em;
  border-radius: 0.5em;
  border: 1px solid rgba(170, 55, 31, 0.26);
  background: rgba(203, 67, 40, 0.07);
  color: #8f3826;
  font-family: var(--font-mono);
  font-size: 0.6em;
  font-weight: 500;
  letter-spacing: 0.12em;
}
.at-bar {
  position: absolute;
  left: 1.35em;
  right: 1.05em;
  bottom: 0.5em;
  height: 0.2em;
  border-radius: 2px;
  background: rgba(60, 38, 24, 0.13);
  overflow: hidden;
}
.at-bar i {
  display: block;
  width: 68%;
  height: 100%;
  border-radius: 2px;
  background: #2f9a6f;
}

.art-chat {
  position: absolute;
  z-index: 3;
  right: -1%;
  top: 2%;
  width: 53%;
  padding: 0.85em 0.95em 0.9em;
  border-radius: 1.1em;
  border: 1px solid rgba(255, 244, 222, 0.15);
  background: linear-gradient(180deg, #292431, #1c1925);
  box-shadow: 0 2.2em 3.6em -1.4em rgba(0, 0, 0, 0.86);
  transform: rotate(3.5deg);
  animation: floatB 7.2s -0.8s ease-in-out infinite;
  overflow: hidden;
}
.art-chat::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.9em;
  bottom: 0.9em;
  width: 0.2em;
  border-radius: 0 3px 3px 0;
  background: var(--yellow);
}
.ac-head {
  display: flex;
  align-items: center;
  gap: 0.55em;
  margin-bottom: 0.55em;
}
.ac-ava {
  flex: none;
  width: 2.15em;
  height: 2.15em;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #ffb38d;
  color: #1a110d;
  font-family: var(--font-display);
  font-size: 0.94em;
  font-weight: 800;
  line-height: 1;
}
.ac-head div {
  flex: 1;
  min-width: 0;
}
.ac-head b {
  display: block;
  color: var(--cream);
  font-family: var(--font-display);
  font-size: 0.95em;
  font-weight: 700;
  line-height: 1.05;
}
.ac-head small {
  display: block;
  margin-top: 0.22em;
  color: #e8bf69;
  font-family: var(--font-mono);
  font-size: 0.53em;
  font-weight: 500;
  letter-spacing: 0.12em;
  white-space: nowrap;
}
.ac-timer {
  flex: none;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.25em;
  font-family: var(--font-mono);
  font-size: 0.68em;
  color: #ffcd85;
}
.ac-timer i {
  display: block;
  width: 3.2em;
  height: 0.22em;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.1);
  position: relative;
  overflow: hidden;
}
.ac-timer i::after {
  content: "";
  position: absolute;
  inset: 0;
  width: 58%;
  background: var(--yellow);
  border-radius: 2px;
}
.ac-msg {
  margin: 0 0 0.65em;
  padding: 0.6em 0.75em;
  border-left: 0.14em solid rgba(255, 255, 255, 0.1);
  border-radius: 0.25em 0.8em 0.8em 0.25em;
  background: rgba(255, 255, 255, 0.04);
  color: #efe1cf;
  font-size: 0.82em;
  line-height: 1.42;
}
.ac-opts {
  display: flex;
  flex-direction: column;
  gap: 0.32em;
}
.ac-opts span {
  display: flex;
  align-items: center;
  gap: 0.5em;
  min-height: 2.1em;
  padding: 0.28em 0.55em;
  border-radius: 0.62em;
  border: 1px solid rgba(255, 244, 222, 0.1);
  background: rgba(255, 244, 222, 0.045);
  color: #f2e5d4;
  font-size: 0.7em;
  font-weight: 500;
  line-height: 1.15;
  white-space: nowrap;
}
.ac-opts span i {
  flex: none;
  width: 1.85em;
  height: 1.85em;
  display: grid;
  place-items: center;
  border-radius: 0.5em;
  background: rgba(255, 244, 222, 0.1);
  font-family: var(--font-mono);
  font-size: 0.86em;
  font-style: normal;
}
.ac-opts span:first-child {
  border-color: rgba(255, 200, 87, 0.48);
  background: rgba(255, 200, 87, 0.15);
}
.ac-opts span:first-child i {
  background: var(--yellow);
  color: #1d1508;
}

.art-driver {
  position: absolute;
  z-index: 4;
  left: 0;
  bottom: 6.5%;
  width: 57%;
  display: flex;
  align-items: center;
  gap: 0.55em;
  padding: 0.65em 0.7em;
  border-radius: 1em;
  border: 1px solid rgba(99, 230, 176, 0.36);
  background: linear-gradient(180deg, #24212d, #18161f);
  box-shadow: 0 2em 3.4em -1.5em rgba(0, 0, 0, 0.86);
  transform: rotate(-3deg);
  animation: floatA 6s -1.8s ease-in-out infinite;
}
.ad-ava {
  flex: none;
  width: 2.45em;
  height: 2.45em;
  display: grid;
  place-items: center;
  border-radius: 0.78em;
  background: rgba(255, 107, 74, 0.16);
  border: 1.5px solid rgba(255, 138, 104, 0.55);
  font-size: 1em;
  line-height: 1;
}
.ad-copy {
  flex: 1;
  min-width: 0;
}
.ad-copy small {
  display: block;
  color: #8f8478;
  font-family: var(--font-mono);
  font-size: 0.53em;
  font-weight: 500;
  letter-spacing: 0.11em;
  white-space: nowrap;
}
.ad-copy b {
  display: block;
  color: var(--cream);
  font-family: var(--font-display);
  font-size: 1.08em;
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.02em;
}
.art-driver .badge {
  height: 1.8em;
  padding: 0 0.5em 0 0.4em;
  font-size: 0.64em;
}
.art-driver .badge .ico {
  width: 1.3em;
  height: 1.3em;
}
.ad-ready {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 0.35em;
  font-family: var(--font-mono);
  font-size: 0.62em;
  font-weight: 500;
  letter-spacing: 0.11em;
  color: var(--mint);
  white-space: nowrap;
}
.ad-ready i {
  width: 0.55em;
  height: 0.55em;
  border-radius: 50%;
  background: var(--mint);
  box-shadow: 0 0 8px rgba(99, 230, 176, 0.8);
}

.art-tech {
  position: absolute;
  z-index: 3;
  right: -1%;
  bottom: 0;
  width: 61%;
  display: flex;
  align-items: flex-start;
  gap: 0.65em;
  padding: 0.78em 0.9em;
  border-radius: 1.1em 1.1em 1.1em 0.32em;
  background: linear-gradient(135deg, #ffd976, #ffa04e);
  color: #241509;
  box-shadow: 0 2.2em 3.5em -1.4em rgba(0, 0, 0, 0.82);
  transform: rotate(1.6deg);
  animation: floatB 6.4s -2.2s ease-in-out infinite;
}
.art-tech .tech-avatar {
  width: 2.15em;
  height: 2.15em;
  font-size: 1em;
  color: var(--yellow);
  background: #1a1110;
  box-shadow: none;
}
.art-tech div {
  min-width: 0;
  padding-top: 0.1em;
}
.art-tech small {
  display: block;
  margin-bottom: 0.28em;
  color: rgba(36, 21, 9, 0.64);
  font-family: var(--font-mono);
  font-size: 0.53em;
  font-weight: 500;
  letter-spacing: 0.13em;
  white-space: nowrap;
}
.art-tech p {
  margin: 0;
  font-family: var(--font-display);
  font-size: 0.86em;
  font-weight: 650;
  line-height: 1.18;
  letter-spacing: -0.01em;
}
.art-tech em {
  color: #a23219;
  font-style: normal;
}
.art-sticker {
  position: absolute;
  z-index: 6;
  left: 3%;
  top: 1%;
  width: 6.4em;
  height: 6.4em;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--yellow);
  color: #1a1206;
  text-align: center;
  transform: rotate(-11deg);
  box-shadow: 0 0.8em 1.7em -0.6em rgba(0, 0, 0, 0.75), inset 0 0 0 0.23em var(--yellow), inset 0 0 0 0.34em #1a1206;
  animation: wobble 8s ease-in-out infinite;
}
.art-sticker span {
  margin-bottom: 0.1em;
  font-family: var(--font-mono);
  font-size: 0.6em;
  font-weight: 500;
  letter-spacing: 0.2em;
}
.art-sticker b {
  font-family: var(--font-display);
  font-size: 1.17em;
  font-weight: 800;
  line-height: 0.9;
  letter-spacing: -0.035em;
}
.art-sticker sup {
  font-size: 0.45em;
}
.art-tape {
  position: absolute;
  z-index: 7;
  left: 11%;
  top: 19.5%;
  width: 6.6em;
  height: 1.5em;
  background: rgba(255, 219, 139, 0.64);
  transform: rotate(-16deg);
  opacity: 0.9;
  box-shadow: 0 0.1em 0.3em rgba(0, 0, 0, 0.22);
  mix-blend-mode: multiply;
  pointer-events: none;
}

/* ══════════════════════════════════════════════════════════════════
   OVERLAYS
   ══════════════════════════════════════════════════════════════════ */
.overlay-root {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: none;
  align-items: flex-start;
  justify-content: center;
  padding: 18px;
  overflow-y: auto;
  background: rgba(7, 6, 11, 0.76);
  backdrop-filter: blur(7px);
  -webkit-backdrop-filter: blur(7px);
}
.overlay-root.is-open {
  display: flex;
  animation: overlayFade 0.2s ease both;
}
.overlay-shell {
  width: 100%;
  margin: auto;
  display: flex;
  justify-content: center;
}
.x-btn {
  flex: none;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid rgba(255, 244, 222, 0.2);
  background: transparent;
  color: inherit;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s, transform 0.15s;
}
.x-btn .ico {
  width: 16px;
  height: 16px;
  stroke-width: 2.2;
}
.x-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  transform: rotate(5deg);
}

/* dark modal */
.modal {
  width: min(100%, 470px);
  padding: 25px 25px 22px;
  border-radius: 23px;
  border: 1px solid rgba(255, 244, 222, 0.16);
  background: linear-gradient(180deg, #221f2c, #16151d);
  color: var(--cream);
  box-shadow: 0 44px 90px -34px #000, inset 0 1px 0 rgba(255, 244, 222, 0.08);
  animation: overlayPop 0.34s cubic-bezier(0.2, 0.9, 0.3, 1.12) both;
}
.modal-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}
.modal-kicker {
  display: block;
  margin-bottom: 7px;
  font-family: var(--font-mono);
  font-size: 8.5px;
  font-weight: 500;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--coral-2);
}
.modal h2 {
  margin: 0 0 8px;
  font-family: var(--font-display);
  font-size: clamp(36px, 7vw, 48px);
  font-weight: 800;
  line-height: 0.9;
  letter-spacing: -0.045em;
  color: var(--cream);
}
.modal-sub {
  margin: 0 0 18px;
  color: #c4b6a5;
  font-size: 13.5px;
  line-height: 1.5;
}
.modal-actions {
  display: flex;
  flex-direction: column;
  gap: 9px;
}
.modal-actions .btn {
  width: 100%;
}
.btn--primary {
  min-height: 52px;
  background: var(--coral);
  border-color: transparent;
  color: #1a0905;
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.01em;
  text-transform: uppercase;
  box-shadow: 0 5px 0 var(--coral-dark);
}
.btn--primary:hover {
  background: #ff6c49;
  transform: translateY(-2px);
  box-shadow: 0 7px 0 var(--coral-dark);
}
.btn--primary:active {
  transform: translateY(2px);
  box-shadow: 0 2px 0 var(--coral-dark);
}
.btn--outline {
  min-height: 46px;
  border-color: rgba(255, 244, 222, 0.2);
  background: rgba(255, 244, 222, 0.04);
  color: var(--cream);
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.btn--outline:hover {
  background: rgba(255, 244, 222, 0.1);
  border-color: rgba(255, 244, 222, 0.4);
  transform: translateY(-1px);
}
.btn--ghost.small,
.btn.small {
  min-height: 38px;
  padding: 0 13px;
  font-size: 10px;
}
.modal-foot {
  margin-top: 15px;
  text-align: center;
  font-family: var(--font-mono);
  font-size: 8px;
  line-height: 1.6;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted-2);
}
.modal-foot kbd,
.kbd {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 19px;
  padding: 0 5px;
  margin: 0 2px;
  border-radius: 5px;
  border: 1px solid rgba(255, 244, 222, 0.2);
  background: rgba(255, 244, 222, 0.08);
  color: #eadccc;
  font-family: var(--font-mono);
  font-size: 8.5px;
  letter-spacing: 0;
}
.modal .pause-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
  margin-top: 18px;
}
.modal .pause-actions .btn--primary {
  grid-column: 1 / -1;
}

/* cream sheet modal */
.sheet {
  position: relative;
  width: min(100%, 780px);
  padding: 29px 28px 23px;
  border-radius: 21px;
  border: 1px solid #d6be9d;
  background-color: var(--paper);
  background-image: radial-gradient(rgba(95, 62, 38, 0.06) 0.7px, transparent 0.95px);
  background-size: 8px 8px;
  color: var(--paper-ink);
  box-shadow: 0 44px 95px -34px #000, inset 0 1px 0 rgba(255, 255, 255, 0.55);
  animation: overlayPop 0.34s cubic-bezier(0.2, 0.9, 0.3, 1.12) both;
}
.sheet::before {
  content: "";
  position: absolute;
  left: 22px;
  right: 22px;
  top: 11px;
  height: 4px;
  background: radial-gradient(circle, rgba(55, 33, 18, 0.24) 1.15px, transparent 1.55px) 0 0 / 13px 4px repeat-x;
  pointer-events: none;
}
.sheet-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}
.sheet-kicker {
  display: block;
  margin-bottom: 7px;
  font-family: var(--font-mono);
  font-size: 8.5px;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #9a4b2e;
}
.sheet h2 {
  margin: 0 0 8px;
  font-family: var(--font-display);
  font-size: clamp(33px, 4.8vw, 48px);
  font-weight: 800;
  line-height: 0.92;
  letter-spacing: -0.045em;
  color: #1c1411;
}
.sheet-intro {
  max-width: 620px;
  margin: 0 0 18px;
  color: #5d4637;
  font-size: 13.5px;
  line-height: 1.52;
}
.sheet .x-btn {
  border-color: rgba(50, 30, 20, 0.24);
  color: #2b1e17;
}
.sheet .x-btn:hover {
  background: #251b16;
  border-color: #251b16;
  color: var(--cream);
}
.sheet-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 18px;
  padding-top: 15px;
  border-top: 1.5px dashed rgba(70, 45, 28, 0.25);
}
.sheet-footnote {
  font-family: var(--font-mono);
  font-size: 8.5px;
  font-weight: 500;
  line-height: 1.5;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #8a6a52;
}
.btn--dark {
  flex: none;
  min-height: 47px;
  padding: 0 18px;
  border-color: transparent;
  background: #1d1714;
  color: var(--cream);
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  box-shadow: 0 4px 0 #090706;
}
.btn--dark:hover {
  background: #30231c;
  transform: translateY(-2px);
  box-shadow: 0 6px 0 #090706;
}
.btn--dark:active {
  transform: translateY(2px);
  box-shadow: 0 1px 0 #090706;
}
.btn--paper-ghost {
  flex: none;
  min-height: 47px;
  padding: 0 18px;
  border-color: rgba(50, 32, 22, 0.28);
  background: transparent;
  color: #2a1d16;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.btn--paper-ghost:hover {
  background: rgba(40, 25, 15, 0.07);
  transform: translateY(-1px);
}

/* playbook */
.playbook-legend {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 5px 13px;
  margin-bottom: 14px;
  font-family: var(--font-mono);
  font-size: 8.5px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #7e604c;
}
.playbook-legend span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.legend-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--mint);
}
.legend-dot.is-red {
  background: var(--red);
}
.policy-grid {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 15px;
}
.policy-row {
  display: grid;
  grid-template-columns: minmax(206px, 0.92fr) 16px minmax(0, 1.3fr) auto;
  align-items: center;
  gap: 9px;
  padding: 9px 11px;
  border-radius: 11px;
  border: 1px solid rgba(80, 50, 30, 0.13);
  background: rgba(38, 25, 18, 0.045);
  --pc: #9a4b2e;
}
.policy-cat {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.2;
  color: #2c1d16;
}
.policy-cat .ico {
  width: 16px;
  height: 16px;
  flex: none;
  color: var(--pc);
  stroke-width: 2.2;
}
.policy-arrow {
  color: #b0927c;
  font-family: var(--font-mono);
  font-size: 13px;
  text-align: center;
}
.policy-act {
  font-family: var(--font-display);
  font-size: 14.5px;
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.015em;
  color: #17100e;
}
.policy-note {
  font-family: var(--font-mono);
  font-size: 7.5px;
  font-weight: 500;
  line-height: 1.35;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-align: right;
  color: #94745e;
  white-space: nowrap;
}
.ghost-note {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 11px 12px;
  border-radius: 12px;
  border: 1.5px dashed rgba(70, 42, 24, 0.36);
  background: rgba(255, 200, 87, 0.22);
  color: #38261b;
  font-size: 12.4px;
  line-height: 1.46;
}
.ghost-note .gn-ico {
  flex: none;
  width: 27px;
  height: 27px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: #241b16;
  color: var(--yellow);
  font-size: 14px;
}
.ghost-note b {
  font-weight: 700;
  color: #1c120d;
}
.ghost-note code {
  padding: 1px 4px;
  border-radius: 4px;
  background: rgba(50, 30, 15, 0.09);
  font-family: var(--font-mono);
  font-size: 0.92em;
}

/* how-to guide */
.guide-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 11px;
  margin: 16px 0 14px;
}
.guide-card {
  display: flex;
  flex-direction: column;
  padding: 13px 13px 12px;
  border-radius: 14px;
  border: 1px solid rgba(70, 45, 28, 0.18);
  background: rgba(255, 255, 255, 0.24);
}
.guide-num {
  width: 27px;
  height: 27px;
  display: grid;
  place-items: center;
  margin-bottom: 9px;
  border-radius: 9px;
  background: #251b17;
  color: var(--yellow);
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 800;
  line-height: 1;
}
.guide-card h3 {
  margin: 0 0 5px;
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.025em;
  color: #1b1310;
}
.guide-card p {
  flex: 1;
  margin: 0 0 10px;
  color: #503c2f;
  font-size: 12.2px;
  line-height: 1.48;
}
.guide-card p b {
  color: #1c120e;
  font-weight: 700;
}
.guide-mini {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: auto;
}
.guide-trust {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: auto;
  font-family: var(--font-mono);
  font-size: 8px;
  font-weight: 500;
  line-height: 1.4;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: #7b5f4b;
}
.mini-trustbar {
  flex: 1;
  height: 7px;
  border-radius: 4px;
  background: rgba(50, 30, 15, 0.13);
  overflow: hidden;
}
.mini-trustbar i {
  display: block;
  width: 72%;
  height: 100%;
  border-radius: 4px;
  background: linear-gradient(90deg, var(--coral), var(--yellow));
}
.guide-keys {
  display: flex;
  flex-wrap: wrap;
  gap: 7px 13px;
  margin-top: auto;
  font-family: var(--font-mono);
  font-size: 8px;
  font-weight: 500;
  line-height: 1.5;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: #7b5f4b;
}
.guide-keys .kbd {
  border-color: rgba(50, 32, 22, 0.24);
  background: rgba(40, 25, 15, 0.08);
  color: #2a1d16;
}
.guide-strip {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px 10px;
  padding: 10px 12px;
  border-radius: 11px;
  background: #251b17;
  color: #eadccc;
  font-size: 12px;
  line-height: 1.4;
}
.guide-strip b {
  color: var(--yellow);
  font-weight: 600;
}
.guide-strip .dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #69584c;
}

/* tech log modal */
.log-modal {
  width: min(100%, 700px);
  padding: 24px 24px 20px;
  border-radius: 22px;
  border: 1px solid rgba(255, 244, 222, 0.15);
  background: linear-gradient(180deg, #1d1b25, #121118);
  color: var(--cream);
  box-shadow: 0 44px 90px -34px #000;
  animation: overlayPop 0.32s cubic-bezier(0.2, 0.9, 0.3, 1.1) both;
}
.log-modal .modal-sub {
  margin-bottom: 14px;
}
.log-list {
  display: flex;
  flex-direction: column;
  gap: 9px;
  max-height: min(56vh, 470px);
  padding: 2px 7px 2px 1px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 244, 222, 0.17) transparent;
}
.log-list::-webkit-scrollbar {
  width: 8px;
}
.log-list::-webkit-scrollbar-thumb {
  background: rgba(255, 244, 222, 0.16);
  border-radius: 10px;
}
.log-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  color: #dccdbb;
  font-size: 13px;
  line-height: 1.48;
}
.log-time {
  flex: none;
  width: 57px;
  padding-top: 3px;
  color: #857b70;
  font-family: var(--font-mono);
  font-size: 8.5px;
  letter-spacing: 0.04em;
}
.log-avatar {
  flex: none;
  width: 25px;
  height: 25px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(135deg, #ffd36e, #ff9a4a);
  color: #2a1708;
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
}
.log-item.is-chaos {
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid rgba(255, 92, 57, 0.28);
  background: rgba(255, 92, 57, 0.08);
}
.log-item.is-chaos .log-avatar {
  border-radius: 8px;
  background: rgba(255, 200, 87, 0.15);
  color: var(--yellow);
}
.log-item.is-chaos b {
  color: #ffd0a1;
  font-weight: 600;
}

/* end screen */
.end-panel {
  position: relative;
  width: min(100%, 860px);
  border-radius: 24px;
  border: 1px solid #d6be9d;
  background-color: var(--paper);
  background-image: radial-gradient(rgba(95, 62, 38, 0.06) 0.7px, transparent 0.95px);
  background-size: 8px 8px;
  color: var(--paper-ink);
  box-shadow: 0 50px 110px -38px #000, inset 0 1px 0 rgba(255, 255, 255, 0.55);
  overflow: hidden;
  animation: overlayPop 0.4s cubic-bezier(0.2, 0.9, 0.3, 1.1) both;
}
.end-hero {
  position: relative;
  padding: 28px 30px 21px;
  border-bottom: 1.5px dashed rgba(70, 45, 28, 0.25);
}
.end-kicker {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 7px 11px;
  margin-bottom: 11px;
  font-family: var(--font-mono);
  font-size: 8.5px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #9a4b2e;
}
.end-kicker span + span::before {
  content: "✦";
  margin-right: 11px;
  color: #bc8e67;
}
.end-title {
  max-width: 600px;
  margin: 0 0 11px;
  font-family: var(--font-display);
  font-size: clamp(44px, 6.5vw, 78px);
  font-weight: 800;
  line-height: 0.86;
  letter-spacing: -0.055em;
  color: #1b1411;
}
.end-title .accent {
  color: var(--coral-dark);
}
.end-sub {
  max-width: 610px;
  margin: 0;
  color: #5e4636;
  font-size: 14px;
  line-height: 1.52;
}
.end-title sup {
  font-size: 0.5em;
  vertical-align: top;
  letter-spacing: 0;
  color: var(--coral-dark);
}
.end-asterisk {
  display: block;
  margin-top: 8px;
  font-family: var(--font-mono);
  font-size: 8.5px;
  line-height: 1.4;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: #8a6a52;
}
.end-stamp {
  position: absolute;
  right: 28px;
  top: 25px;
  padding: 8px 11px 7px;
  border: 2.5px solid #b13b21;
  border-radius: 9px;
  color: #b13b21;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 500;
  line-height: 1.25;
  letter-spacing: 0.13em;
  text-align: center;
  text-transform: uppercase;
  transform: rotate(6deg);
  opacity: 0.88;
  background: rgba(255, 244, 222, 0.4);
}
.end-stamp b {
  display: block;
  font-size: 16px;
  letter-spacing: 0.09em;
}
.end-panel.is-lose .end-stamp {
  border-color: #59504a;
  color: #59504a;
}
.end-body {
  display: grid;
  gap: 17px;
  padding: 19px 30px 25px;
}
.end-topline {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 13px;
  align-items: stretch;
}
.end-scorecard {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  padding: 14px 16px 12px;
  border-radius: 15px;
  background: #211914;
  color: var(--cream);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}
.end-scorecard span {
  font-family: var(--font-mono);
  font-size: 8px;
  font-weight: 500;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: #ae9d8b;
}
.end-scorecard strong {
  font-family: var(--font-display);
  font-size: clamp(40px, 5.4vw, 60px);
  font-weight: 800;
  line-height: 0.9;
  letter-spacing: -0.05em;
  color: var(--yellow);
  font-variant-numeric: tabular-nums;
}
.end-scorecard small {
  font-family: var(--font-mono);
  font-size: 8px;
  line-height: 1.45;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #ab9b89;
}
.end-rank {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 7px;
  padding: 14px 16px;
  border-radius: 15px;
  border: 1px solid rgba(80, 50, 30, 0.15);
  background: rgba(255, 255, 255, 0.23);
}
.end-stars {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 25px;
  line-height: 1;
  letter-spacing: 0.02em;
  color: #d8c3a8;
}
.end-stars .is-on {
  color: var(--coral);
}
.end-rank-label {
  font-family: var(--font-mono);
  font-size: 8px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #9a7b62;
}
.end-rank-name {
  font-family: var(--font-display);
  font-size: clamp(19px, 2.2vw, 25px);
  font-weight: 800;
  line-height: 1.02;
  letter-spacing: -0.03em;
  color: #1c1411;
}
.end-best {
  margin-top: 1px;
  font-family: var(--font-mono);
  font-size: 8px;
  font-weight: 500;
  letter-spacing: 0.09em;
  line-height: 1.4;
  text-transform: uppercase;
  color: #8a6a52;
}
.end-best.is-new {
  color: #b13b21;
}
.end-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}
.end-stat {
  padding: 10px 11px 9px;
  border-radius: 12px;
  border: 1px solid rgba(80, 50, 30, 0.13);
  background: rgba(255, 255, 255, 0.22);
}
.end-stat span {
  display: block;
  margin-bottom: 4px;
  font-family: var(--font-mono);
  font-size: 7.5px;
  font-weight: 500;
  line-height: 1.3;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #94745e;
}
.end-stat strong {
  display: block;
  font-family: var(--font-display);
  font-size: 25px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.04em;
  color: #1b1310;
  font-variant-numeric: tabular-nums;
}
.end-stat small {
  display: block;
  margin-top: 3px;
  color: #836855;
  font-family: var(--font-mono);
  font-size: 7.5px;
  line-height: 1.35;
  letter-spacing: 0.02em;
}
.end-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}
.end-actions .btn--primary {
  min-width: 200px;
}
.end-footnote {
  margin-left: auto;
  max-width: 245px;
  font-family: var(--font-mono);
  font-size: 7.5px;
  line-height: 1.55;
  letter-spacing: 0.06em;
  text-align: right;
  text-transform: uppercase;
  color: #94745e;
}
.confetti {
  position: absolute;
  inset: 0;
  z-index: 4;
  pointer-events: none;
  overflow: hidden;
  border-radius: inherit;
}
.confetti span {
  position: absolute;
  top: -18px;
  width: 8px;
  height: 14px;
  border-radius: 2px;
  opacity: 0.95;
  animation: confettiFall linear both;
}

/* ══════════════════════════════════════════════════════════════════
   RESPONSIVE
   ══════════════════════════════════════════════════════════════════ */
@media (max-width: 1280px) {
  .topbar {
    gap: 15px;
    padding-left: 13px;
    padding-right: 13px;
  }
  .hud-stat {
    min-width: 94px;
    padding-left: 9px;
    padding-right: 9px;
    gap: 7px;
  }
  .hud-ico {
    width: 26px;
    height: 26px;
  }
  .panel-hint {
    display: none;
  }
  .hero-grid {
    grid-template-columns: minmax(0, 1.1fr) minmax(360px, 0.9fr);
    gap: 8px;
  }
}
@media (max-width: 1180px) {
  .brand-sub {
    display: none;
  }
  .hud-label {
    letter-spacing: 0.09em;
  }
  .hud-stat {
    min-width: 86px;
  }
  .logo-svg {
    width: 36px;
    height: 36px;
  }
  .logo-word {
    font-size: 24px;
  }
  .driver-side {
    min-width: 82px;
  }
}

/* Tabbed dashboard on smaller screens */
@media (max-width: 1080px) {
  .dashboard {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto minmax(0, 1fr);
    gap: 9px;
  }
  .mobile-tabs {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 5px;
    padding: 5px;
    border-radius: 15px;
    border: 1px solid var(--line);
    background: linear-gradient(180deg, #1b1923, #14131b);
    min-height: 48px;
  }
  .m-tab {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    min-width: 0;
    padding: 7px 9px;
    border: 1px solid transparent;
    border-radius: 10px;
    background: transparent;
    color: #a99d90;
    font-family: var(--font-body);
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.01em;
    cursor: pointer;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
  }
  .m-tab .ico {
    width: 16px;
    height: 16px;
  }
  .m-tab.is-active {
    border-color: rgba(255, 244, 222, 0.12);
    background: rgba(255, 244, 222, 0.085);
    color: var(--cream);
  }
  .m-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 21px;
    height: 19px;
    padding: 0 5px;
    border-radius: 10px;
    background: var(--coral);
    color: #1a0c08;
    font-family: var(--font-mono);
    font-size: 9.5px;
    font-weight: 500;
    line-height: 1;
  }
  .m-count--quiet {
    background: rgba(255, 244, 222, 0.11);
    color: var(--cream);
  }
  .panel {
    grid-column: 1;
    grid-row: 2;
    display: none;
    height: 100%;
  }
  .panel.mobile-active {
    display: flex;
  }
  .panel-head {
    min-height: 56px;
  }
  .orders-panel .panel-scroll,
  .support-panel .panel-scroll {
    max-width: 760px;
    width: 100%;
    margin: 0 auto;
  }
  .crew-panel .map,
  .crew-panel .dispatch-context,
  .crew-panel .roster {
    width: auto;
  }
  .crew-panel .map {
    max-width: 740px;
    width: calc(100% - 24px);
    margin-left: auto;
    margin-right: auto;
  }
  .crew-panel .roster {
    max-width: 760px;
    width: 100%;
    margin: 0 auto;
  }
  .crew-panel .dispatch-context {
    max-width: 740px;
    width: calc(100% - 24px);
    margin-left: auto;
    margin-right: auto;
  }
  .hero-grid {
    grid-template-columns: minmax(0, 1.15fr) minmax(330px, 0.85fr);
  }
  .hero h1 {
    font-size: clamp(48px, 7.5vw, 82px);
  }
}

@media (max-width: 920px) {
  .topbar {
    grid-template-columns: auto minmax(0, 1fr) auto;
    grid-template-areas:
      "brand incident controls"
      "hud hud hud";
    row-gap: 8px;
    column-gap: 14px;
    padding: 10px 13px;
  }
  .brand {
    grid-area: brand;
  }
  .incident {
    grid-area: incident;
    max-width: none;
  }
  .top-controls {
    grid-area: controls;
  }
  .hud {
    grid-area: hud;
    width: 100%;
  }
  .hud-stat {
    flex: 1;
    min-width: 0;
    padding: 7px 10px;
  }
  .hud-copy strong {
    font-size: 19px;
  }
  .hero-art {
    display: none;
  }
  .hero-grid {
    display: block;
    max-width: 760px;
    padding-top: 28px;
  }
  .hero-copy {
    max-width: 680px;
  }
  .hero h1 {
    font-size: clamp(50px, 10.5vw, 92px);
  }
  .hero-lead {
    max-width: 600px;
    font-size: 16px;
  }
}

@media (max-width: 920px) {
  .hero-watermark {
    display: block;
    position: absolute;
    right: -0.035em;
    bottom: -0.12em;
    font-family: var(--font-display);
    font-size: clamp(200px, 52vw, 440px);
    font-weight: 800;
    line-height: 0.7;
    letter-spacing: -0.09em;
    color: rgba(255, 244, 222, 0.04);
    pointer-events: none;
    user-select: none;
    z-index: 0;
  }
}

@media (max-width: 720px) {
  .app {
    gap: 9px;
    padding: 9px 10px;
  }
  .topbar {
    border-radius: 17px;
  }
  .panel,
  .mobile-tabs,
  .ticker {
    border-radius: 16px;
  }
  .dashboard {
    gap: 8px;
  }
  .panel-scroll {
    padding: 3px 9px 10px 10px;
  }
  .panel-head {
    padding: 10px 12px 8px;
  }
  .panel-title {
    font-size: 19px;
  }
  .panel-kicker {
    font-size: 7.3px;
    letter-spacing: 0.12em;
  }
  .map {
    margin: 0 9px;
  }
  .crew-panel .map {
    width: calc(100% - 18px);
  }
  .dispatch-context {
    margin: 7px 9px 6px;
  }
  .crew-panel .dispatch-context {
    width: calc(100% - 18px);
  }
  .roster {
    padding: 0 8px 9px 9px;
    gap: 6px;
  }
  .driver-row {
    min-height: 55px;
    padding: 7px 9px;
    gap: 8px;
  }
  .driver-ava {
    width: 35px;
    height: 35px;
    font-size: 17px;
    border-radius: 11px;
  }
  .driver-side {
    min-width: 82px;
  }
  .ticker {
    gap: 8px;
    padding: 7px 10px 7px 12px;
  }
  .ticker-who-text b span {
    display: none;
  }
  .ticker-who-text small {
    display: none;
  }
  .active-effects {
    display: none;
  }
  .ticker-open {
    padding: 6px 7px;
    font-size: 0;
    gap: 0;
  }
  .ticker-open .ico {
    width: 14px;
    height: 14px;
  }
  .chaos-banner {
    top: 86px;
    padding: 14px 13px 12px 12px;
    gap: 10px;
  }
  .cb-icon {
    width: 40px;
    height: 40px;
    font-size: 21px;
  }
  .cb-title {
    font-size: 19px;
  }
  .cb-desc {
    font-size: 11.8px;
  }
  .toasts {
    bottom: 67px;
    width: calc(100vw - 22px);
  }
  .coach {
    left: 11px;
    right: 11px;
    bottom: 67px;
    max-width: none;
  }
  .hero {
    padding: 18px 18px 0;
  }
  .hero-ribbon {
    padding: 7px 10px;
    font-size: 8px;
    letter-spacing: 0.1em;
  }
  .hero-ribbon .ribbon-wide {
    display: none;
  }
  .hero-ribbon .ribbon-short {
    display: inline;
  }
  .logo--hero .logo-svg {
    width: 40px;
    height: 40px;
  }
  .logo--hero .logo-word {
    font-size: 29px;
  }
  .hero-grid {
    padding-top: 22px;
    padding-bottom: 22px;
  }
  .hero h1 {
    font-size: clamp(44px, 11.8vw, 72px);
  }
  .hero-actions {
    align-items: stretch;
  }
  .hero-actions .btn {
    flex: 1 1 200px;
  }
  .hero-marquee {
    margin: 0 -18px;
  }
  .overlay-root {
    padding: 10px;
  }
  .sheet {
    padding: 27px 17px 17px;
    border-radius: 18px;
  }
  .sheet::before {
    left: 16px;
    right: 16px;
  }
  .policy-row {
    grid-template-columns: minmax(0, 1fr) 15px minmax(0, 1.25fr);
    gap: 7px;
    padding: 8px 9px;
  }
  .policy-note {
    display: none;
  }
  .policy-cat {
    font-size: 12px;
    gap: 6px;
  }
  .policy-act {
    font-size: 13px;
  }
  .guide-grid {
    grid-template-columns: 1fr;
  }
  .end-hero {
    padding: 24px 18px 17px;
  }
  .end-body {
    padding: 16px 18px 19px;
    gap: 14px;
  }
  .end-title {
    font-size: clamp(40px, 11.5vw, 64px);
    max-width: 78%;
  }
  .end-stamp {
    right: 16px;
    top: 20px;
    padding: 6px 8px 5px;
    font-size: 8px;
  }
  .end-stamp b {
    font-size: 13px;
  }
  .end-sub {
    font-size: 13px;
  }
  .end-topline {
    grid-template-columns: 1fr;
    gap: 9px;
  }
  .end-scorecard strong {
    font-size: 48px;
  }
  .end-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .end-actions .btn--primary {
    width: 100%;
    min-width: 0;
  }
  .end-actions .btn--paper-ghost {
    flex: 1;
  }
  .end-footnote {
    margin-left: 0;
    max-width: none;
    text-align: left;
  }
  .modal {
    padding: 21px 18px 18px;
    border-radius: 20px;
  }
  .log-modal {
    padding: 20px 15px 16px;
  }
  .log-time {
    width: 48px;
  }
}

@media (max-width: 520px) {
  .topbar {
    column-gap: 8px;
    padding: 8px 10px;
  }
  .brand {
    gap: 7px;
  }
  .logo-svg {
    width: 32px;
    height: 32px;
  }
  .logo-word {
    font-size: 21px;
  }
  .icon-btn {
    width: 34px;
    height: 34px;
    border-radius: 10px;
  }
  .top-controls {
    gap: 4px;
  }
  .incident-row {
    font-size: 8px;
    letter-spacing: 0.08em;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 2px 8px;
  }
  .restore-label {
    display: none;
  }
  .hud-stat {
    padding: 6px 7px;
    gap: 6px;
    border-radius: 12px;
  }
  .hud-ico {
    width: 23px;
    height: 23px;
    border-radius: 7px;
  }
  .hud-ico .ico {
    width: 14px;
    height: 14px;
  }
  .hud-label {
    font-size: 7px;
    letter-spacing: 0.06em;
  }
  .hud-copy strong {
    font-size: 17px;
  }
  .m-tab {
    gap: 5px;
    padding: 7px 5px;
    font-size: 12px;
  }
  .m-tab .ico {
    width: 14px;
    height: 14px;
  }
  .hero {
    padding: 16px 16px 0;
  }
  .hero-ribbon {
    font-size: 7px;
    padding: 6px 8px;
    letter-spacing: 0.07em;
  }
  .hero-scribble {
    display: none;
  }
  .hero h1 {
    font-size: clamp(40px, 12.5vw, 62px);
  }
  .hero-lead {
    font-size: 14.5px;
    line-height: 1.52;
  }
  .hero-facts {
    font-size: 8px;
    letter-spacing: 0.05em;
  }
  .hero-facts span {
    padding: 0 9px;
  }
  .btn--hero {
    min-height: 56px;
    font-size: 17px;
  }
  .btn--ghost {
    min-height: 50px;
  }
  .hero-marquee {
    margin: 0 -16px;
    height: 34px;
  }
  .art-stage {
    display: none;
  }
  .end-title {
    max-width: 70%;
  }
  .end-stamp {
    top: 17px;
    right: 13px;
  }
  .order-dish {
    font-size: 15.5px;
  }
  .book-btn span {
    display: none;
  }
  .book-btn {
    width: 34px;
    padding: 0;
    justify-content: center;
  }
  .dispatch-context {
    font-size: 11.5px;
  }
  .dc-hint {
    display: none;
  }
  .dc-dish {
    font-size: 13px;
  }
  .policy-row {
    grid-template-columns: 1fr;
    gap: 3px;
  }
  .policy-arrow {
    display: none;
  }
  .policy-act {
    padding-left: 22px;
    font-size: 13.5px;
  }
  .sheet-footer {
    align-items: stretch;
    flex-direction: column;
  }
  .sheet-footer .btn {
    width: 100%;
  }
  .guide-card p {
    font-size: 12px;
  }
  .modal .pause-actions {
    grid-template-columns: 1fr;
  }
  .log-avatar {
    display: none;
  }
}

/* Shorter desktop windows get a tighter dashboard */
@media (max-height: 790px) and (min-width: 1081px) {
  .app {
    gap: 9px;
    padding: 9px 12px;
  }
  .topbar {
    min-height: 64px;
    padding-top: 8px;
    padding-bottom: 8px;
    border-radius: 17px;
  }
  .dashboard {
    gap: 10px;
  }
  .panel {
    border-radius: 17px;
  }
  .panel-head {
    min-height: 52px;
    padding: 10px 13px 8px;
  }
  .panel-title {
    font-size: 19px;
  }
  .orders-list {
    gap: 8px;
  }
  .order-card {
    padding-top: 8px;
    padding-bottom: 12px;
  }
  .map {
    margin: 0 10px;
    border-radius: 13px;
  }
  .dispatch-context {
    min-height: 33px;
    margin: 8px 10px 6px;
    padding: 6px 9px;
  }
  .roster {
    gap: 6px;
    padding: 0 8px 9px 10px;
  }
  .driver-row {
    min-height: 51px;
    padding: 6px 9px;
    gap: 8px;
    border-radius: 12px;
  }
  .driver-ava {
    width: 34px;
    height: 34px;
    font-size: 16px;
    border-radius: 10px;
  }
  .driver-name {
    font-size: 15.5px;
  }
  .driver-badges {
    margin-top: 3px;
  }
  .ticket {
    padding-top: 9px;
    padding-bottom: 11px;
  }
  .ticket-msg {
    margin-bottom: 6px;
    padding-top: 6px;
    padding-bottom: 6px;
    line-height: 1.38;
  }
  .ticker {
    min-height: 42px;
    padding-top: 5px;
    padding-bottom: 5px;
    border-radius: 15px;
  }
  .toasts {
    bottom: 65px;
  }
  .coach {
    bottom: 65px;
  }
  .modal h2 {
    font-size: 40px;
  }
  .sheet h2 {
    font-size: 40px;
  }
  .policy-row {
    padding-top: 7px;
    padding-bottom: 7px;
  }
  .guide-card p {
    font-size: 11.8px;
  }
}
@media (max-height: 700px) and (min-width: 1081px) {
  .hero {
    padding-top: 16px;
  }
  .hero h1 {
    font-size: clamp(48px, min(7.2vw, 9.6vh), 86px);
  }
  .hero-lead {
    font-size: 14.6px;
    line-height: 1.48;
    margin-bottom: 17px;
  }
  .hero-facts {
    margin-top: 14px;
  }
  .art-stage {
    font-size: clamp(11px, 0.98vw, 13.4px);
  }
  .hero-grid {
    padding-top: 8px;
    padding-bottom: 4px;
  }
}


/* Tiny screens: give the incident strip and HUD their own rows so nothing crowds the logo */
@media (max-width: 520px) {
  .topbar {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
      "brand controls"
      "incident incident"
      "hud hud";
    row-gap: 7px;
  }
  .brand { grid-area: brand; }
  .top-controls { grid-area: controls; justify-self: end; }
  .incident { grid-area: incident; max-width: none; gap: 5px; }
  .incident-row {
    flex-wrap: nowrap;
    justify-content: space-between;
    gap: 8px;
    font-size: 8.5px;
  }
  .restore-row { width: 100%; }
  .hud { grid-area: hud; }
}

/* Short laptop screens: keep the whole five-driver roster visible by making each row single-line */
@media (min-width: 721px) and (max-width: 1080px), (min-width: 1081px) and (max-height: 890px) {
  .crew-panel .panel-head {
    min-height: 47px;
    padding-bottom: 6px;
  }
  .dispatch-context {
    min-height: 31px;
    margin: 6px 10px 5px;
    padding: 5px 9px;
  }
  .roster {
    gap: 3px;
    padding-bottom: 7px;
  }
  .driver-row {
    min-height: 42px;
    padding: 4px 9px;
    gap: 7px;
    border-radius: 12px;
  }
  .driver-ava {
    width: 32px;
    height: 32px;
    border-radius: 9px;
    border-width: 1.2px;
    font-size: 15px;
  }
  .driver-main {
    display: flex;
    align-items: center;
    gap: 7px;
    overflow: hidden;
  }
  .driver-name {
    flex: none;
    gap: 5px;
    font-size: 15px;
  }
  .driver-vehicle {
    font-size: 7px;
    letter-spacing: 0.08em;
  }
  .driver-badges {
    flex: none;
    flex-wrap: nowrap;
    gap: 3px;
    margin-top: 0;
  }
  .driver-badges .badge {
    height: 18px;
    padding: 0 4px 0 3px;
    gap: 2px;
    font-size: 7.5px;
  }
  .driver-badges .badge .ico {
    width: 10px;
    height: 10px;
  }
  .driver-side {
    flex-direction: row;
    align-items: center;
    gap: 7px;
    min-width: 0;
  }
  .ds-sub {
    display: none;
  }
  .ds-go {
    height: 24px;
    padding: 0 8px 0 9px;
    font-size: 10.5px;
    box-shadow: 0 2px 0 #2aa377;
  }
  .driver-row.risky .ds-go {
    box-shadow: 0 2px 0 #a9351c;
  }
  .ds-ready,
  .ds-label,
  .ds-off,
  .ds-miss {
    font-size: 8.5px;
    white-space: nowrap;
  }
  .ds-eta {
    font-size: 7.5px;
    white-space: nowrap;
  }
  .driver-row.can-take .driver-vehicle,
  .driver-row.cant-take .driver-vehicle {
    display: none;
  }
  .tripbar {
    height: 2px;
  }
}

/* Tablet landscape: cap the map so the single visible panel keeps the full crew on screen */
@media (min-width: 721px) and (max-width: 1080px) and (max-height: 900px) {
  .crew-panel .map {
    max-width: 390px;
  }
  .crew-panel .dispatch-context {
    max-width: 390px;
  }
}

/* Small-screen end report: let the headline breathe and drop the decorative stamp if space is tight */
@media (max-width: 720px) {
  .end-kicker {
    padding-right: 122px;
  }
}
@media (max-width: 520px) {
  .end-kicker {
    padding-right: 0;
  }
  .end-title {
    max-width: 100%;
  }
  .end-stamp {
    display: none;
  }
}

/* Small phones: keep all five crew rows on screen without giving up the two-line layout */
@media (max-width: 520px) {
  .roster {
    gap: 5px;
  }
  .driver-row {
    min-height: 47px;
    padding: 4px 8px;
    gap: 8px;
    border-radius: 12px;
  }
  .driver-ava {
    width: 32px;
    height: 32px;
    border-radius: 9px;
    font-size: 16px;
  }
  .driver-name {
    font-size: 15.5px;
    gap: 5px;
  }
  .driver-badges {
    margin-top: 2px;
    gap: 3px;
  }
  .driver-badges .badge {
    height: 18px;
  }
}

/* ══════════════════════════════════════════════════════════════════
   KEYFRAMES
   ══════════════════════════════════════════════════════════════════ */
@keyframes pulseDot {
  0% { box-shadow: 0 0 0 0 rgba(255, 92, 57, 0.55); }
  70% { box-shadow: 0 0 0 7px rgba(255, 92, 57, 0); }
  100% { box-shadow: 0 0 0 0 rgba(255, 92, 57, 0); }
}
@keyframes scanAcross {
  0% { transform: translateX(-110%); }
  100% { transform: translateX(320%); }
}
@keyframes blink {
  0%, 49% { opacity: 1; }
  50%, 100% { opacity: 0.28; }
}
@keyframes bumpStat {
  0% { transform: translateY(0); }
  35% { transform: translateY(-3px); border-color: rgba(255, 200, 87, 0.55); }
  100% { transform: translateY(0); }
}
@keyframes lowPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(255, 65, 92, 0); }
  50% { box-shadow: 0 0 0 3px rgba(255, 65, 92, 0.18); }
}
@keyframes orderIn {
  from { opacity: 0; transform: translateY(-12px) rotate(-1.2deg) scale(0.97); }
  to { opacity: 1; transform: translateY(0) rotate(0) scale(1); }
}
@keyframes ticketIn {
  from { opacity: 0; transform: translateX(14px) scale(0.98); }
  to { opacity: 1; transform: translateX(0) scale(1); }
}
@keyframes ticketShudder {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-4px); }
  55% { transform: translateX(4px); }
  80% { transform: translateX(-2px); }
}
@keyframes criticalGlow {
  from { box-shadow: 0 14px 26px -20px #000, 0 0 0 0 rgba(255, 65, 92, 0); }
  to { box-shadow: 0 14px 26px -20px #000, 0 0 0 3px rgba(255, 65, 92, 0.16); }
}
@keyframes eligiblePulse {
  0%, 100% { box-shadow: inset 0 0 0 1px rgba(99, 230, 176, 0.1), 0 0 0 0 rgba(99, 230, 176, 0); }
  50% { box-shadow: inset 0 0 0 1px rgba(99, 230, 176, 0.22), 0 0 0 3px rgba(99, 230, 176, 0.07); }
}
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-5px); }
  40% { transform: translateX(5px); }
  60% { transform: translateX(-3px); }
  80% { transform: translateX(3px); }
}
@keyframes appShake {
  0%, 100% { transform: translate3d(0, 0, 0); }
  15% { transform: translate3d(-4px, 2px, 0) rotate(-0.12deg); }
  30% { transform: translate3d(4px, -2px, 0) rotate(0.1deg); }
  50% { transform: translate3d(-3px, -1px, 0); }
  70% { transform: translate3d(2px, 1px, 0); }
  88% { transform: translate3d(-1px, 0, 0); }
}
@keyframes toastIn {
  from { opacity: 0; transform: translateY(9px) scale(0.96); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes toastOut {
  from { opacity: 1; transform: translateY(0) scale(1); }
  to { opacity: 0; transform: translateY(6px) scale(0.96); }
}
@keyframes tickerFlash {
  0% { color: var(--yellow); transform: translateX(-3px); opacity: 0.3; }
  100% { color: #e9dac6; transform: translateX(0); opacity: 1; }
}
@keyframes chipIn {
  from { opacity: 0; transform: translateY(5px) scale(0.94); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes dashTravel {
  to { stroke-dashoffset: -18; }
}
@keyframes routeRing {
  0% { transform: scale(0.5); opacity: 0.85; }
  100% { transform: scale(2.2); opacity: 0; }
}
@keyframes mapPop {
  0% { opacity: 0; transform: translate(-50%, -35%) scale(0.74); }
  15% { opacity: 1; transform: translate(-50%, -60%) scale(1.06); }
  35% { transform: translate(-50%, -80%) scale(1); }
  100% { opacity: 0; transform: translate(-50%, -210%) scale(0.94); }
}
@keyframes glitchShift {
  0%, 100% { transform: translateX(0); opacity: 0.62; }
  50% { transform: translateX(2px); opacity: 0.82; }
}
@keyframes veilPulse {
  0%, 100% { opacity: var(--chaos-strength, 0.3); }
  50% { opacity: calc(var(--chaos-strength, 0.3) * 0.62); }
}
@keyframes ticketGlow {
  to { box-shadow: inset 0 0 40px rgba(255, 200, 87, 0.2); }
}
@keyframes twinkle {
  0%, 100% { opacity: 0.25; transform: scale(0.8) rotate(0); }
  50% { opacity: 1; transform: scale(1.12) rotate(18deg); }
}
@keyframes floatA {
  0%, 100% { translate: 0 0; rotate: 0deg; }
  50% { translate: 0 -9px; rotate: 0.6deg; }
}
@keyframes floatB {
  0%, 100% { translate: 0 0; }
  50% { translate: 0 10px; }
}
@keyframes wobble {
  0%, 100% { transform: rotate(-11deg) scale(1); }
  50% { transform: rotate(-7deg) scale(1.03); }
}
@keyframes marquee {
  from { transform: translateX(0); }
  to { transform: translateX(-33.333%); }
}
@keyframes riseIn {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes heroArtIn {
  from { opacity: 0; transform: translateY(22px) scale(0.96) rotate(1.5deg); }
  to { opacity: 1; transform: translateY(0) scale(1) rotate(0); }
}
@keyframes overlayFade {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes overlayPop {
  from { opacity: 0; transform: translateY(16px) scale(0.965); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes confettiFall {
  0% { transform: translate3d(0, -20px, 0) rotate(0deg); opacity: 1; }
  85% { opacity: 1; }
  100% { transform: translate3d(var(--dx, 40px), 860px, 0) rotate(var(--rot, 540deg)); opacity: 0; }
}

/* Important: remove rotate/translate double-application on floating art cards */
.art-ticket { animation-name: ticketFloat; }
.art-chat { animation-name: chatFloat; }
.art-driver { animation-name: driverFloat; }
.art-tech { animation-name: techFloat; }
@keyframes ticketFloat {
  0%, 100% { transform: rotate(-5.5deg) translateY(0); }
  50% { transform: rotate(-4.7deg) translateY(-9px); }
}
@keyframes chatFloat {
  0%, 100% { transform: rotate(3.5deg) translateY(0); }
  50% { transform: rotate(3.9deg) translateY(10px); }
}
@keyframes driverFloat {
  0%, 100% { transform: rotate(-3deg) translateY(0); }
  50% { transform: rotate(-2.3deg) translateY(-7px); }
}
@keyframes techFloat {
  0%, 100% { transform: rotate(1.6deg) translateY(0); }
  50% { transform: rotate(1.1deg) translateY(8px); }
}

/* ── Reduced motion ──────────────────────────────────────────────── */
@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;
  }
  .marquee-track {
    animation: none !important;
  }
  .map-token {
    transition: none !important;
  }
  .hero-copy > *,
  .art-stage {
    animation: none !important;
  }
}
