/* 82-0 Hockey — Cohere-style design system (see DESIGN.md).
   White editorial canvas, near-black ink, deep enterprise green as the
   product-band color, coral for taxonomy accents only. Flat surfaces with
   hairline borders — no heavy drop shadows. Pill CTAs in near-black.
   Display type is large, tight, weight 400 (CohereText → Space Grotesk);
   UI text is Unica77 → Inter; technical labels are mono, uppercase.
   The rink is the one media card that carries color. */

:root {
  /* colors (DESIGN.md tokens) */
  --primary: #17171c;
  --ink: #212121;
  --deep-green: #003c33;
  --dark-navy: #071829;
  --canvas: #ffffff;
  --soft-stone: #eeece7;
  --pale-green: #edfce9;
  --pale-blue: #f1f5ff;
  --hairline: #d9d9dd;
  --border-light: #e5e7eb;
  --card-border: #f2f2f2;
  --muted: #93939f;
  --slate: #75758a;
  --body-muted: #616161;
  --action-blue: #1863dc;
  --focus-blue: #4c6ee6;
  --coral: #ff7759;
  --coral-soft: #ffad9b;
  --on-primary: #ffffff;
  --on-dark: #ffffff;
  /* rink ice (media content, not UI chrome) */
  --ice: #eaf2f9;
  --ice-dark: #dbe8f3;
  --rink-red: #d23b54;
  --rink-blue: #2f6fc1;
  /* type */
  --font-display: "CohereText", "Space Grotesk", Inter, ui-sans-serif, system-ui, sans-serif;
  --font-body: "Unica77 Cohere Web", Inter, Arial, ui-sans-serif, system-ui, sans-serif;
  --font-mono: "CohereMono", ui-monospace, "SF Mono", Menlo, monospace;
  /* radii (DESIGN.md scale) */
  --r-xs: 4px;
  --r-sm: 8px;
  --r-md: 16px;
  --r-lg: 22px;
  --r-xl: 30px;
  --r-pill: 32px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { background: var(--canvas); }

body {
  font-family: var(--font-body);
  background: var(--canvas);
  min-height: 100vh;
  min-height: 100dvh;
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  overscroll-behavior-y: none; /* no pull-to-refresh mid-draft */
}

button {
  font-family: inherit;
  touch-action: manipulation; /* kill double-tap zoom delay on game controls */
  -webkit-user-select: none;
  user-select: none;
}

#app {
  margin: 0 auto;
  padding: 0 16px;
  padding-left: max(16px, env(safe-area-inset-left));
  padding-right: max(16px, env(safe-area-inset-right));
}
.screen { max-width: 560px; margin: 0 auto; }

/* ---- draft columns: selection left, rink right (desktop) ---- */
.draft-columns { display: flex; flex-direction: column; }
.draft-right { order: -1; } /* mobile: rink on top */
.draft-right .pitch { max-width: 360px; margin-left: auto; margin-right: auto; }

@media (min-width: 860px) {
  #screen-draft { max-width: 1020px; }
  .draft-columns {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 400px;
    gap: 32px;
    align-items: start;
  }
  .draft-right {
    order: 0;
    position: sticky;
    top: 16px;
  }
  .draft-right .pitch { max-width: none; }
}

.screen {
  display: none;
  padding: 24px 0 48px;
  padding-top: max(24px, env(safe-area-inset-top));
  padding-bottom: max(48px, env(safe-area-inset-bottom));
}
.screen.active { display: block; animation: fadeIn 0.25s ease; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; } }

.hidden { display: none !important; }

/* ============ MODE SELECT ============ */
.hero { text-align: center; padding: 52px 0 36px; }
/* mono uppercase technical label — the Cohere category marker */
.hero-badge {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 400;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--deep-green);
  margin-bottom: 22px;
}
/* monumental display: weight 400, tight line height, negative tracking */
.hero h1 {
  font-family: var(--font-display);
  font-size: 84px;
  font-weight: 400;
  line-height: 1;
  letter-spacing: -1.92px;
  color: var(--ink);
}
.hero .gold { color: var(--deep-green); }
.tagline { margin-top: 18px; color: var(--body-muted); font-size: 18px; line-height: 1.4; }

/* mode cards: Regular = warm stone product card, Blind = deep green band */
.mode-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 16px;
}
.mode-card {
  border-radius: var(--r-lg);
  padding: 0;
  text-align: left;
  cursor: pointer;
  overflow: hidden;
  border: 1px solid var(--border-light);
  transition: transform 0.18s ease, border-color 0.18s ease;
  position: relative;
}
.mode-card:hover, .mode-card:active {
  transform: translateY(-3px);
  border-color: var(--hairline);
}
.card-dark {
  background: var(--soft-stone);
  color: var(--ink);
}
/* Blind is the featured tier: the dark product band */
.mode-card.featured {
  background: var(--deep-green);
  color: var(--on-dark);
  border-color: var(--deep-green);
}
.featured-badge {
  position: absolute;
  top: 12px; right: 12px;
  z-index: 2;
  background: var(--coral);
  color: var(--primary);
  font-family: var(--font-mono);
  font-size: 10px; font-weight: 400; letter-spacing: 1px;
  text-transform: uppercase;
  border-radius: var(--r-pill);
  padding: 4px 10px;
}

/* mini rink board — media content keeps its ice color on every surface */
.mini-pitch {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: linear-gradient(180deg, var(--ice) 0%, var(--ice-dark) 100%);
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}
.mini-line {
  position: absolute; left: 0; right: 0; top: 50%;
  border-top: 2px solid var(--rink-red);
  opacity: 0.55;
}
.mini-line.red { top: 50%; border-color: var(--rink-red); }
.mini-line.blue { border-color: var(--rink-blue); }
.mini-line.b1 { top: 31%; }
.mini-line.b2 { top: 69%; }
.mini-circle {
  position: absolute; left: 50%; top: 50%;
  width: 14%; aspect-ratio: 1;
  transform: translate(-50%, -50%);
  border: 1.5px solid var(--rink-blue);
  border-radius: 50%;
  opacity: 0.55;
}
.mini-dot {
  position: absolute;
  width: 13%;
  aspect-ratio: 1;
  transform: translate(-50%, -50%);
  background: var(--primary);
  color: #fff;
  font-size: 8px;
  font-weight: 500;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
}
.mode-card:hover .mini-dot { animation: dotPop 0.45s ease; }
@keyframes dotPop { 0% { transform: translate(-50%, -50%) scale(1); } 40% { transform: translate(-50%, -50%) scale(1.25); } 100% { transform: translate(-50%, -50%) scale(1); } }
.mini-dot.mystery {
  background: rgba(23, 23, 28, 0.45);
  border: 1.5px dashed rgba(23, 23, 28, 0.85);
  color: #fff;
  font-size: 10px;
}

.mode-card-body { padding: 18px 20px 20px; }
.mode-name { font-family: var(--font-display); font-size: 22px; font-weight: 400; letter-spacing: -0.22px; }
.mode-desc { font-size: 14px; margin-top: 5px; line-height: 1.4; color: var(--body-muted); }
.mode-card.featured .mode-desc { color: rgba(255, 255, 255, 0.72); }
.mode-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 14px; align-items: center; }
.pill-stats {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 10px; font-weight: 400; letter-spacing: 1px;
  text-transform: uppercase;
  border-radius: var(--r-pill); padding: 4px 10px;
}
.pill-on { background: var(--primary); color: var(--on-primary); }
.pill-hidden { background: transparent; color: var(--coral-soft); border: 1px solid var(--coral-soft); }
.mode-meta {
  display: inline-block;
  font-size: 12px; font-weight: 400;
  color: inherit;
  border: 1px solid currentColor;
  opacity: 0.75;
  border-radius: var(--r-pill); padding: 3px 10px;
}

/* outlined pill tag — mono, uppercase (mode markers on draft/result) */
.mode-tag {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--body-muted);
  background: transparent;
  border: 1px solid var(--hairline);
  border-radius: var(--r-pill);
  padding: 4px 11px;
  margin-left: 8px;
}

/* how it works — quiet editorial block, rule-driven not card-driven */
.how-it-works {
  margin-top: 30px;
  border-top: 1px solid var(--hairline);
  padding: 20px 4px 0;
}
.how-title {
  font-family: var(--font-mono);
  font-size: 12px; font-weight: 400; letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--body-muted); margin-bottom: 12px;
}
.how-it-works ol { margin-left: 18px; display: flex; flex-direction: column; gap: 7px; }
.how-it-works li { font-size: 15px; color: var(--body-muted); line-height: 1.45; }

.footnote {
  text-align: center;
  font-family: var(--font-mono);
  color: var(--body-muted); font-size: 12px; letter-spacing: 0.28px;
  margin-top: 28px;
}

/* ============ DRAFT ============ */
.draft-header { display: flex; align-items: center; gap: 14px; padding: 8px 0 4px; }
.draft-progress { flex: 1; }
#draft-slot-count {
  font-family: var(--font-mono);
  font-size: 12px; font-weight: 400; color: var(--body-muted);
  letter-spacing: 1.5px; text-transform: uppercase;
}
.progress-bar {
  height: 3px; background: var(--border-light);
  border-radius: 2px; margin-top: 8px; overflow: hidden;
}
#progress-fill { height: 100%; width: 0; background: var(--deep-green); border-radius: 2px; transition: width 0.3s ease; }

.btn-ghost {
  background: none; border: none; color: var(--slate);
  font-size: 18px; cursor: pointer;
  min-width: 44px; min-height: 44px; /* comfortable thumb target */
}
.btn-ghost:hover { color: var(--ink); }

.draft-status {
  text-align: center;
  font-size: 14px;
  color: var(--body-muted);
  padding: 12px 8px 6px;
  line-height: 1.45;
}
.draft-status.placing { color: var(--ink); }
.draft-status strong { font-weight: 500; }
/* animated pointer toward the rink: above on mobile, right on desktop */
.draft-status.placing::before {
  content: "☝️ ";
  display: inline-block;
  animation: nudgeUp 1s ease-in-out infinite;
}
@keyframes nudgeUp {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-3px); }
}
@media (min-width: 860px) {
  .draft-status.placing::before {
    content: "👉 ";
    animation: nudgeRight 1s ease-in-out infinite;
  }
  @keyframes nudgeRight {
    0%, 100% { transform: translateX(0); }
    50% { transform: translateX(4px); }
  }
}

/* spin — warm stone product card */
#spin-stage { text-align: center; padding: 6px 0; }
.spin-wheel {
  background: var(--soft-stone);
  border: 1px solid var(--border-light);
  border-radius: var(--r-lg);
  min-height: 124px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 6px 0 14px;
  transition: border-color 0.2s, background 0.2s;
}
.spin-wheel.spinning { border-color: var(--hairline); }
.spin-wheel.landed {
  border: 1px solid var(--deep-green);
  background: var(--pale-green);
  animation: pop 0.45s ease;
}
@keyframes pop { 0% { transform: scale(1); } 40% { transform: scale(1.03); } 100% { transform: scale(1); } }

.spin-display { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 16px; }
.spin-q { font-family: var(--font-display); font-size: 48px; font-weight: 400; color: var(--muted); }
.spin-year { font-family: var(--font-display); font-size: 26px; font-weight: 400; letter-spacing: -0.4px; color: var(--ink); line-height: 1.2; }
.spin-country { font-size: 16px; font-weight: 400; color: var(--body-muted); }

/* team crest: official logo on a white chip ringed in team color
   (fallback: abbreviation on team colors, set inline by ui.js) */
.crest {
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 50%;
  font-weight: 600;
  color: #fff;
  background: #fff;
  border: 2px solid;
  flex-shrink: 0;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.45);
  -webkit-user-select: none;
  user-select: none;
}
.crest img {
  width: 76%; height: 76%;
  object-fit: contain;
  -webkit-user-drag: none;
}
.spin-crest { width: 46px; height: 46px; font-size: 13px; }
.banner-crest { width: 42px; height: 42px; font-size: 12px; }

/* the ONE near-black pill CTA per viewport */
.btn-primary {
  background: var(--primary);
  color: var(--on-primary);
  border: none;
  border-radius: var(--r-pill);
  padding: 12px 24px;
  min-height: 44px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: opacity 0.15s;
}
.btn-primary:hover { opacity: 0.85; }
.btn-primary:disabled { background: var(--border-light); color: var(--muted); cursor: default; opacity: 1; }
.btn-primary.big { width: 100%; padding: 15px; font-size: 16px; }

/* outlined pill — the secondary action voice */
.btn-secondary {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--primary);
  border-radius: var(--r-xl);
  padding: 11px 20px;
  min-height: 44px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
}
.btn-secondary:hover { background: var(--soft-stone); }

/* pick stage — compact cards: more options on screen */
.spun-squad {
  display: flex; align-items: center; gap: 12px;
  background: var(--soft-stone);
  border: 1px solid var(--border-light);
  border-radius: var(--r-sm);
  padding: 10px 14px;
  margin-bottom: 10px;
}
.banner-title { font-family: var(--font-display); font-size: 17px; font-weight: 400; letter-spacing: -0.17px; color: var(--ink); }
.banner-sub { font-size: 11px; color: var(--body-muted); font-weight: 400; margin-top: 1px; }

.player-options { display: flex; flex-direction: column; gap: 8px; margin-bottom: 12px; }
.player-card {
  display: flex; align-items: center; gap: 11px;
  background: var(--canvas);
  border: 1px solid var(--hairline);
  border-radius: var(--r-sm);
  padding: 10px 12px;
  color: var(--ink);
  cursor: pointer;
  text-align: left;
  transition: border-color 0.12s ease, background 0.12s ease;
  width: 100%;
}
.player-card:hover { border-color: var(--ink); }
.player-card.selected {
  border: 2px solid var(--primary);
  background: var(--pale-blue);
  padding: 9px 11px; /* keep size stable with the thicker border */
}
.pc-ovr {
  font-family: var(--font-mono);
  font-size: 16px; font-weight: 400; color: var(--ink);
  min-width: 40px; text-align: center;
  background: var(--soft-stone);
  border: 1px solid var(--border-light);
  border-radius: var(--r-xs); padding: 5px 6px;
}
.pc-main { flex: 1; min-width: 0; padding-right: 4px; }
.pc-name { font-size: 15px; font-weight: 500; letter-spacing: -0.15px; }
.player-card.balleriq .pc-name { font-size: 16px; }
.pc-pos {
  font-family: var(--font-mono);
  font-size: 10.5px; color: var(--body-muted); font-weight: 400;
  letter-spacing: 0.28px; margin-top: 3px;
}
.pc-poslabel { color: var(--body-muted); }

/* tap-to-select affordance: + flips to ✓ when the player is selected */
.pc-cta {
  display: inline-flex; align-items: center; justify-content: center;
  width: 26px; height: 26px; flex-shrink: 0;
  border: 1px solid var(--hairline);
  border-radius: 50%;
  font-size: 15px; font-weight: 500; color: var(--slate);
  transition: all 0.12s ease;
}
.player-card:hover .pc-cta { border-color: var(--ink); color: var(--ink); }
.player-card.selected .pc-cta {
  background: var(--primary); border-color: var(--primary);
  color: var(--on-primary); font-weight: 600;
}

#btn-skip { width: 100%; }

/* ============ RINK VIEW ============ */
/* The rink is the page's media card — the one element that carries color.
   Flat per the system: hairline boards, soft inner shadow only. */
.pitch {
  position: relative;
  margin-top: 14px;
  margin-bottom: 2px;
  aspect-ratio: 10 / 13;
  /* real rink corners: circular arcs, ~21% of the short side */
  border-radius: 21% / 16.2%;
  overflow: hidden;
  border: 2px solid var(--hairline); /* dasher boards */
  background:
    /* glass glare from the top of the sheet */
    radial-gradient(120% 55% at 50% -5%, rgba(255, 255, 255, 0.55), transparent 60%),
    /* faint diagonal skate sheen */
    repeating-linear-gradient(115deg, rgba(255, 255, 255, 0.22) 0 2px, transparent 2px 16px),
    linear-gradient(180deg, var(--ice) 0%, var(--ice-dark) 50%, var(--ice) 100%);
  box-shadow: inset 0 0 22px rgba(13, 42, 66, 0.14); /* boards' shadow */
}
/* rink markings (inline SVG rendered by ui.js) */
.rink-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.pitch-slot {
  position: absolute;
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  width: 27%;
  max-width: 96px;
  padding: 8px 6px;
  border-radius: var(--r-sm);
  text-align: center;
  color: var(--ink);
  background: none;
  border: none;
  font: inherit;
  cursor: pointer;
}
.pitch-slot.empty {
  border: 2px dashed rgba(33, 33, 33, 0.45);
  background: rgba(255, 255, 255, 0.5);
}
/* filled slot: the agent-console voice — near-black panel, white text */
.pitch-slot.filled {
  border: 1px solid var(--primary);
  background: var(--primary);
  color: var(--on-dark);
}
/* move mode: picked-up player goes deep green, legal slots glow blue */
.pitch-slot.move-source {
  border: 1px solid var(--deep-green);
  background: var(--deep-green);
  color: var(--on-dark);
  box-shadow: 0 0 0 4px rgba(0, 60, 51, 0.25);
}
.pitch-slot.move-target {
  border: 2px solid var(--action-blue);
  background: rgba(24, 99, 220, 0.22);
  animation: targetPulse 1.1s ease-in-out infinite;
}
.pitch-slot.filled.move-target { background: var(--action-blue); color: var(--on-dark); }
@keyframes targetPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(24, 99, 220, 0.5); }
  50% { box-shadow: 0 0 0 6px rgba(24, 99, 220, 0); }
}
/* placement mode: a spun player is selected. Strict eligibility — only the
   slots he genuinely plays glow; everything else is visibly blocked. */
.pitch-slot.place-eligible {
  border: 2px solid var(--action-blue);
  background: rgba(24, 99, 220, 0.25);
  animation: targetPulse 1.1s ease-in-out infinite;
}
.pitch-slot.place-blocked {
  opacity: 0.35;
  filter: grayscale(0.6);
  cursor: not-allowed;
}
.ps-fit {
  font-size: 10px; font-weight: 600;
  max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

.pitch-hint {
  text-align: center;
  font-size: 12px;
  color: var(--body-muted);
  margin: 10px 0 2px;
  line-height: 1.45;
}

.ps-pos { font-family: var(--font-mono); font-size: 13px; font-weight: 400; letter-spacing: 0.28px; }
.ps-help {
  font-size: 9px; font-weight: 500; opacity: 0.8;
  text-transform: uppercase; letter-spacing: 0.4px;
  max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.ps-name {
  font-size: 11px; font-weight: 600;
  max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.ps-ovr { font-family: var(--font-mono); font-size: 10px; font-weight: 400; color: var(--coral-soft); }

/* avatars (initials circles) */
.avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  font-weight: 600;
  color: #fff;
  border: 1px solid rgba(0, 0, 0, 0.12);
  flex-shrink: 0;
  -webkit-user-select: none;
  user-select: none;
}
.pc-avatar { width: 36px; height: 36px; font-size: 13px; }
.ps-avatar { width: 30px; height: 30px; font-size: 11px; }

/* ============ RESULT ============ */
/* the result is the page's dark product band: deep green, white type */
.result-card {
  background: var(--deep-green);
  color: var(--on-dark);
  border-radius: var(--r-lg);
  padding: 40px 26px 32px;
  text-align: center;
  margin-top: 16px;
}
.result-trophy { font-size: 52px; }
.result-outcome {
  font-family: var(--font-display);
  font-size: 44px; font-weight: 400; letter-spacing: -0.88px;
  margin-top: 10px; line-height: 1; color: var(--on-dark);
}
.result-outcome strong { font-weight: 400; color: var(--coral-soft); }
.result-rating { margin: 18px 0 24px; }
.rating-num {
  font-family: var(--font-display);
  font-size: 64px; font-weight: 400; letter-spacing: -1.28px;
  color: var(--on-dark); display: block; line-height: 1;
}
.rating-label {
  font-family: var(--font-mono);
  font-size: 11px; font-weight: 400; letter-spacing: 2px;
  color: rgba(255, 255, 255, 0.6);
}
.result-card .mode-tag { color: rgba(255, 255, 255, 0.7); border-color: rgba(255, 255, 255, 0.3); }

/* lineup: rule-separated research-table rows, not boxed cards */
.result-lineup { text-align: left; display: flex; flex-direction: column; }
.rl-row {
  display: flex; align-items: center; gap: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.16);
  padding: 12px 4px;
  font-size: 14px;
}
.rl-row:first-child { border-top: 1px solid rgba(255, 255, 255, 0.16); }
.rl-pos {
  font-family: var(--font-mono);
  color: var(--coral-soft); font-weight: 400; min-width: 36px;
  font-size: 12px; letter-spacing: 0.28px;
}
.rl-name { flex: 1; font-weight: 500; color: var(--on-dark); }
.rl-squad { color: rgba(255, 255, 255, 0.65); font-size: 12px; }
.rl-ovr { font-family: var(--font-mono); color: var(--on-dark); font-weight: 400; }
.rl-logo {
  width: 18px; height: 18px;
  object-fit: contain;
  vertical-align: -4px;
  margin-right: 5px;
  background: #fff;
  border-radius: 50%;
  padding: 1px;
}

/* breakdown: outlined pills on the dark band */
.result-breakdown {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 8px;
  margin-top: 22px;
}
.result-breakdown span {
  font-size: 12px; font-weight: 400; color: var(--on-dark);
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: var(--r-pill); padding: 5px 13px;
}
.result-verdict {
  margin-top: 20px;
  font-size: 14px;
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.78);
}
.result-verdict strong { color: var(--on-dark); font-weight: 500; }
.verdict-meta { font-size: 12px; color: rgba(255, 255, 255, 0.6); }
.result-brand {
  margin-top: 26px;
  font-family: var(--font-mono);
  font-size: 11px; font-weight: 400; color: rgba(255, 255, 255, 0.55);
  letter-spacing: 2px;
}

.result-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.result-actions button { flex: 1 1 40%; }

/* toast — announcement-bar voice: black strip, white microcopy */
#toast {
  position: fixed; bottom: 28px; left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: #000000; color: var(--on-dark);
  font-weight: 400; font-size: 13px;
  padding: 10px 18px; border-radius: var(--r-xs);
  opacity: 0; pointer-events: none;
  transition: all 0.25s ease;
  z-index: 99;
  max-width: 90vw;
  text-align: center;
}
#toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ============ RESPONSIVE ============ */
@media (max-width: 460px) {
  /* one big card per row — each mode gets its moment */
  .mode-cards { grid-template-columns: 1fr; gap: 14px; }
  .mini-pitch { aspect-ratio: 21 / 9; }
}

@media (max-width: 420px) {
  .hero { padding-top: 32px; }
  .hero h1 { font-size: 60px; letter-spacing: -1.2px; }
  .draft-right .pitch { max-width: 320px; }

  /* Player cards: tighten while keeping breathing room. */
  .player-card { padding: 9px 11px; gap: 10px; }
  .player-card.selected { padding: 8px 10px; }
  .pc-main { flex: 1 1 0; min-width: 0; }
  .pc-name { font-size: 14px; }
  .player-card.balleriq .pc-name { font-size: 15px; }
  .pc-ovr { font-size: 15px; min-width: 38px; }
  .pc-avatar { width: 32px; height: 32px; font-size: 11px; }
  .ps-avatar { width: 24px; height: 24px; font-size: 9px; }
  .ps-name { font-size: 10px; }
  .ps-help { display: none; }
  .ps-fit { font-size: 9px; }

  .spun-squad { padding: 9px 12px; }
  .banner-title { font-size: 15px; }
  .result-card { padding: 30px 18px 26px; }
  .result-outcome { font-size: 34px; }
  .rl-row { padding: 10px 2px; gap: 9px; font-size: 13px; }
  .rl-squad { font-size: 11px; }
  .result-actions button { flex: 1 1 45%; padding: 13px 10px; }
}

@media (max-width: 350px) {
  .hero h1 { font-size: 48px; }
}
