/* ==========================================================================
   1. Reset & Base
   ========================================================================== */
:root, .theme-pavilion {
  --bg: #f5f0e8;
  --bg-alt: #ede8df;
  --surface: #ffffff;
  --surface-raised: #faf8f4;
  --primary: #1a6b3c;
  --primary-light: #2d8a4e;
  --primary-glow: rgba(26,107,60,0.2);
  --accent: #d4a843;
  --accent-light: #e8c060;
  --text: #1a1a1a;
  --text-muted: #6b6b6b;
  --text-faint: #9b9b9b;
  --ink: rgba(26,26,26,0.12);
  --ink-strong: rgba(26,26,26,0.22);
  --card-shadow: 0 2px 8px rgba(0,0,0,0.07), 0 1px 2px rgba(0,0,0,0.04);
  --card-shadow-hover: 0 8px 24px rgba(0,0,0,0.12), 0 2px 6px rgba(0,0,0,0.07);
  --chip-bg: rgba(26,26,26,0.07);
  --chip-border: rgba(26,26,26,0.12);
  --chip-active-bg: var(--primary);
  --chip-active-text: #fff;
  --disc-empty: rgba(26,26,26,0.06);
  --disc-empty-border: rgba(26,26,26,0.2);
  --disc-filled: var(--primary);
  --disc-filled-text: #fff;
  --pitch-outer: #3a8a3a;
  --pitch-inner: #2d7a2d;
  --pitch-strip: #c8b86a;
  --pitch-line: rgba(255,255,255,0.4);
  --sticker-bg: #fff;
  --sticker-border: rgba(26,26,26,0.12);
  --sticker-rotate: 0.4deg;
  --mode-hint: var(--text-muted);
  --tier-legend-color: #b8860b;
  --tier-legend-bg: #fff8e1;
  --tier-legend-border: #f0c14b;
  --tier-gold-color: #c07000;
  --tier-gold-bg: #fff3cd;
  --tier-gold-border: #e8a800;
  --tier-silver-color: #4a5568;
  --tier-silver-bg: #f0f4f8;
  --tier-silver-border: #a0aec0;
  --tier-bronze-color: #7b4012;
  --tier-bronze-bg: #fef3e2;
  --tier-bronze-border: #d4845a;
  --tier-decent-color: #2d6a4f;
  --tier-decent-bg: #e8f5e9;
  --tier-decent-border: #81c784;
  --tier-squad-color: #555;
  --tier-squad-bg: #f0f0f0;
  --tier-squad-border: #ccc;
}

.theme-floodlight {
  --bg: #0c1117;
  --bg-alt: #111820;
  --surface: #161d27;
  --surface-raised: #1c2535;
  --primary: #34d67b;
  --primary-light: #4fe090;
  --primary-glow: rgba(52,214,123,0.25);
  --accent: #f0c54d;
  --accent-light: #f5d470;
  --text: #e8e8e8;
  --text-muted: #8a9ab0;
  --text-faint: #566272;
  --ink: rgba(255,255,255,0.07);
  --ink-strong: rgba(255,255,255,0.14);
  --card-shadow: 0 2px 10px rgba(0,0,0,0.35), 0 1px 3px rgba(0,0,0,0.25);
  --card-shadow-hover: 0 8px 28px rgba(0,0,0,0.55), 0 2px 8px rgba(0,0,0,0.35);
  --chip-bg: rgba(255,255,255,0.06);
  --chip-border: rgba(255,255,255,0.1);
  --chip-active-bg: var(--primary);
  --chip-active-text: #0c1117;
  --disc-empty: rgba(255,255,255,0.05);
  --disc-empty-border: rgba(255,255,255,0.2);
  --disc-filled: var(--primary);
  --disc-filled-text: #0c1117;
  --pitch-outer: #1a4a1a;
  --pitch-inner: #143514;
  --pitch-strip: #8a7840;
  --pitch-line: rgba(255,255,255,0.25);
  --sticker-bg: var(--surface);
  --sticker-border: rgba(255,255,255,0.1);
  --sticker-rotate: 0.4deg;
  --mode-hint: var(--text-muted);
  --tier-legend-color: #f0c54d;
  --tier-legend-bg: rgba(240,197,77,0.12);
  --tier-legend-border: #c49a00;
  --tier-gold-color: #e0a800;
  --tier-gold-bg: rgba(224,168,0,0.1);
  --tier-gold-border: #a07800;
  --tier-silver-color: #94a3b8;
  --tier-silver-bg: rgba(148,163,184,0.1);
  --tier-silver-border: #64748b;
  --tier-bronze-color: #c97316;
  --tier-bronze-bg: rgba(201,115,22,0.1);
  --tier-bronze-border: #92400e;
  --tier-decent-color: #4ade80;
  --tier-decent-bg: rgba(74,222,128,0.1);
  --tier-decent-border: #166534;
  --tier-squad-color: #9ca3af;
  --tier-squad-bg: rgba(156,163,175,0.08);
  --tier-squad-border: #374151;
}

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

html, body {
  margin: 0;
  padding: 0;
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background-color: var(--bg);
  color: var(--text);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  scroll-behavior: smooth;
}

::selection {
  background-color: var(--primary-glow);
  color: var(--primary);
}

::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: var(--bg-alt);
}

::-webkit-scrollbar-thumb {
  background: var(--chip-border);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--text-muted);
}

.scroll-x {
  overflow-x: auto;
  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none; /* IE/Edge */
}

.scroll-x::-webkit-scrollbar {
  display: none; /* Chrome/Safari */
}

/* ==========================================================================
   2. Typography System
   ========================================================================== */
.num {
  font-family: 'Outfit', sans-serif;
  font-variant-numeric: tabular-nums;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Outfit', sans-serif;
  line-height: 1.2;
  margin: 0 0 0.5em 0;
  font-weight: 700;
}

.eyebrow {
  display: inline-block;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 700;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

a {
  color: var(--primary);
  text-decoration: none;
}

p {
  margin-top: 0;
  margin-bottom: 1rem;
}

/* ==========================================================================
   3. Navigation
   ========================================================================== */
.home-nav {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 2rem;
  background: var(--surface);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--ink);
}

.home-brand {
  font-family: 'Outfit', sans-serif;
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.02em;
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.theme-toggle {
  background: var(--surface);
  border: 1px solid var(--ink);
  border-radius: 50px;
  width: 56px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 4px;
  cursor: pointer;
  position: relative;
  transition: all 0.3s ease;
}

.theme-toggle:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

.tt-sun, .tt-moon {
  font-size: 0.8rem;
  line-height: 1;
  z-index: 1;
}

/* ==========================================================================
   4. Hero Layout
   ========================================================================== */
.home-wrap {
  padding: 2.5rem 1.5rem;
  max-width: 1400px;
  margin: 0 auto;
}

.home-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.5rem;
  align-items: center;
  margin-top: 2rem;
}

.rule-ink {
  border: 0;
  border-top: 1px solid var(--ink-strong);
  margin: 0;
}

/* ==========================================================================
   5. Hero Mark
   ========================================================================== */
.home-mark {
  margin-bottom: 0.75rem;
}

.mark-freehit {
  font-family: 'Outfit', sans-serif;
  font-size: clamp(2.5rem, 6vw, 5rem);
  font-weight: 900;
  letter-spacing: 0.05em;
  color: var(--accent);
  text-shadow: 0 4px 12px rgba(0,0,0,0.1);
  display: inline-block;
  line-height: 1;
}

.mark-free {
  color: var(--text);
}

.mark-dot {
  color: var(--primary);
}

/* ==========================================================================
   6. Headline & Sub
   ========================================================================== */
.home-headline {
  font-size: clamp(1.5rem, 3vw, 2.5rem);
  font-weight: 800;
  background: linear-gradient(135deg, var(--text), var(--primary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 1.5rem;
}

.home-sub {
  font-size: 1rem;
  color: var(--text-muted);
  line-height: 1.7;
  max-width: 600px;
  margin-bottom: 1.5rem;
}

/* ==========================================================================
   7. CTAs & Buttons
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: #fff;
  box-shadow: 0 4px 12px var(--primary-glow);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px var(--primary-glow);
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-primary:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.btn-ghost {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--ink);
}

.btn-ghost:hover {
  background: var(--chip-bg);
  border-color: var(--chip-border);
}

.home-cta-main {
  font-size: 1.125rem;
  padding: 1rem 2rem;
  border-radius: 50px;
}

.home-ctas {
  margin-bottom: 1.5rem;
}

/* ==========================================================================
   8. Modes Section & Chips
   ========================================================================== */
.home-modes {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.modes-group {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.modes-hint {
  font-size: 0.85rem;
  color: var(--mode-hint);
  margin-top: 0.25rem;
}

.chip {
  background: var(--chip-bg);
  border: 1px solid var(--chip-border);
  color: var(--text);
  padding: 6px 14px;
  border-radius: 50px;
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.18s ease;
  white-space: nowrap;
}

.chip:hover {
  background: var(--ink);
}

.chip.is-active {
  background: var(--chip-active-bg);
  color: var(--chip-active-text);
  border-color: transparent;
}

.filter-chip {
  background: var(--chip-bg);
  border: 1px solid var(--chip-border);
  color: var(--text);
  padding: 4px 12px;
  border-radius: 50px;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.filter-chip.is-active {
  background: var(--primary);
  color: #fff;
  border-color: transparent;
}

/* ==========================================================================
   9. Hero Foot
   ========================================================================== */
.home-foot {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-top: 1rem;
  border-top: 1px solid var(--ink);
  padding-top: 1.5rem;
}

.home-foot .num {
  color: var(--accent);
  font-weight: 700;
  font-size: 1.1rem;
}

.foot-dot {
  color: var(--ink-strong);
}

/* ==========================================================================
   10. Hero Pitch (Preview)
   ========================================================================== */
.home-preview {
  position: relative;
  width: 100%;
  max-width: 500px;
  margin: 0 auto;
}

.home-pitch {
  width: 100%;
  min-height: 420px;
  border-radius: 1rem;
  border: 1px solid var(--ink);
  overflow: hidden;
  position: relative;
  background: radial-gradient(circle, var(--pitch-inner) 0%, var(--pitch-outer) 100%);
  box-shadow: var(--card-shadow);
}

/* These preview discs will be populated via JS later if needed, providing basic styles */
.hp-disc {
  position: absolute;
  transform: translate(-50%, -50%);
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(4px);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 8px;
  padding: 6px 10px;
  text-align: center;
  font-size: 0.72rem;
  color: white;
  animation: fade-up 0.4s ease-out forwards;
}

.hp-disc.tier-legend {
  background: rgba(240, 197, 77, 0.25);
  border-color: rgba(240, 197, 77, 0.5);
}

.hp-c {
  display: block;
  font-size: 0.6rem;
  opacity: 0.7;
}

.hp-n {
  display: block;
  font-weight: 700;
}

/* ==========================================================================
   11. Game Section & Draft Layout
   ========================================================================== */
.game-section {
  padding: 2rem 1rem;
  border-top: 1px solid var(--ink);
  background-color: var(--bg-alt);
}

.game-section-head {
  text-align: center;
  margin-bottom: 1.5rem;
}
.game-section-head h2 {
  font-size: 1.5rem;
  margin: 0;
}
.game-section-head .eyebrow {
  margin-bottom: 0.25rem;
}

.draft-layout {
  display: grid;
  grid-template-columns: 340px 1fr 300px;
  gap: 1.5rem;
  max-width: 1400px;
  margin: 0 auto;
}

/* ==========================================================================
   12. Col 1: Setup & Roll Panel
   ========================================================================== */
.col-roll {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.setup-panel {
  background: var(--sticker-bg);
  border: 1px solid var(--sticker-border);
  box-shadow: var(--card-shadow);
  border-radius: 12px;
  padding: 1.5rem;
  transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.3s ease;
}

.setup-panel.sticker:hover {
  transform: rotate(var(--sticker-rotate)) translateY(-2px);
  box-shadow: var(--card-shadow-hover);
}

.setup-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
}

.formation-info {
  background: var(--bg);
  padding: 0.75rem;
  border-radius: 8px;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.formation-tagline {
  display: block;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0.25rem;
}

.formation-example {
  display: block;
}

.roll-panel {
  background: var(--surface);
  border: 1px solid var(--ink);
  border-radius: 12px;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  box-shadow: var(--card-shadow);
}

.roll-idle {
  text-align: center;
  padding: 3rem 1rem;
  border: 2px dashed var(--ink);
  border-radius: 12px;
  color: var(--text-muted);
}

.roll-idle-art {
  font-size: 4rem;
  margin-bottom: 1rem;
}

.squad-display {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.squad-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--ink);
}

.squad-flag {
  font-size: 2.5rem;
}

.squad-nation {
  font-size: 1.1rem;
  font-weight: 700;
}

.squad-year {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 700;
  margin-top: 4px;
}

.squad-filters {
  display: flex;
  gap: 0.5rem;
  overflow-x: auto;
  padding-bottom: 0.5rem;
}

.squad-cards {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  max-height: 380px;
  overflow-y: auto;
  padding-right: 4px;
}

/* ─── Drawn Card ─────────────────────────────────────────────────────────── */
.drawn-card {
  background: var(--surface-raised);
  border: 1px solid var(--ink);
  border-radius: 12px;
  padding: 1rem 1.1rem;
  margin-bottom: 0.75rem;
}

.drawn-eyebrow {
  display: block;
  margin-bottom: 0.35rem;
}

.drawn-nation-row {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  margin-bottom: 0.1rem;
}

.squad-flag {
  font-size: 2rem;
  line-height: 1;
}

.drawn-name {
  font-family: 'Outfit', sans-serif;
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--text);
  line-height: 1.2;
}

.drawn-year {
  font-family: 'Outfit', sans-serif;
  font-size: 1.55rem;
  font-weight: 900;
  color: var(--primary);
  line-height: 1.1;
  margin-top: 0.1rem;
}

/* ─── Reroll Section ─────────────────────────────────────────────────────── */
.reroll-section {
  margin-bottom: 0.85rem;
}

.reroll-hint {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  color: var(--text-muted);
  text-transform: uppercase;
  margin-bottom: 0.45rem;
}

.reroll-hint.exhausted {
  opacity: 0.45;
}

.reroll-btns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
}

.reroll-sub-btn {
  font-size: 0.78rem;
  padding: 8px 10px;
  text-align: center;
  border: 1.5px solid var(--ink-strong);
  border-radius: 8px;
  background: transparent;
  color: var(--text);
  cursor: pointer;
  font-family: 'Inter', inherit;
  font-weight: 600;
  transition: border-color 0.15s ease, color 0.15s ease, opacity 0.15s ease;
  line-height: 1.3;
}

.reroll-sub-btn:hover:not(:disabled) {
  border-color: var(--primary);
  color: var(--primary);
}

.reroll-sub-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.pick-section-label {
  display: block;
  margin-bottom: 0.4rem;
}

.roll-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
}

.roll-btn {
  width: 100%;
  font-size: 1.1rem;
  padding: 1rem;
}

.roll-dice {
  font-size: 1.25rem;
  display: inline-block;
}

.roll-btn:active .roll-dice {
  animation: dice-roll 0.4s ease-in-out;
}

.reroll-btn {
  padding: 1rem;
  white-space: nowrap;
}

.reroll-info {
  text-align: center;
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* ==========================================================================
   13. Player Cards
   ========================================================================== */
.player-card {
  display: flex;
  align-items: center;
  background: #ffffff; /* always white as requested */
  color: #000000; /* always black as requested */
  border: 1px solid var(--ink);
  border-left-width: 4px;
  border-left-color: transparent;
  border-radius: 10px;
  padding: 10px 12px;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
  /* No overflow:hidden — it clips text vertically with align-items:center */
}

.player-card:hover {
  transform: translateY(-1px);
  box-shadow: var(--card-shadow-hover);
}

.player-card.selectable {
  border-left-color: currentColor;
}

.player-card.unavailable {
  opacity: 0.4;
  cursor: not-allowed;
  pointer-events: none;
}

.player-card.selected {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
  border-left-color: rgba(0,0,0,0.25);
}

/* Left stripe color via border-left on the card itself */
.player-card.role-bat  { border-left-color: #2563eb; }
.player-card.role-wk   { border-left-color: #d97706; }
.player-card.role-ar   { border-left-color: #7c3aed; }
.player-card.role-fast { border-left-color: #dc2626; }
.player-card.role-spin { border-left-color: #0891b2; }

/* card-left no longer rendered — hidden safely */
.card-left { display: none; }

.card-body {
  display: flex;
  flex-direction: column;
  flex-grow: 1;
  min-width: 0;
  padding-left: 4px;
}

.card-name {
  font-weight: 700;
  font-size: 0.88rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.card-meta {
  color: #555555;
  font-size: 0.75rem;
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.player-card.selected .card-meta {
  color: rgba(255,255,255,0.8);
}

.card-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.25rem;
}

.role-badge {
  font-size: 0.65rem;
  padding: 2px 6px;
  border-radius: 50px;
  font-weight: 700;
  text-transform: uppercase;
  color: #fff;
}

.rating-badge {
  font-weight: 800;
  font-size: 0.85rem;
  padding: 2px 8px;
  border-radius: 4px;
  font-family: 'Outfit', sans-serif;
  position: relative;
  overflow: hidden;
}

.card-stats {
  font-size: 0.7rem;
  color: var(--text-faint);
}

.player-card.selected .card-stats {
  color: rgba(255,255,255,0.7);
}

/* ==========================================================================
   14. Role Colors & Rating Tiers
   ========================================================================== */
.role-badge.role-bat { background-color: #2563eb; }
.role-badge.role-wk { background-color: #d97706; }
.role-badge.role-ar { background-color: #7c3aed; }
.role-badge.role-fast { background-color: #dc2626; }
.role-badge.role-spin { background-color: #0891b2; }

/* Stripe colors match role badges */
.card-left.role-bat { background-color: #2563eb; }
.card-left.role-wk { background-color: #d97706; }
.card-left.role-ar { background-color: #7c3aed; }
.card-left.role-fast { background-color: #dc2626; }
.card-left.role-spin { background-color: #0891b2; }

/* Tiers */
.tier-legend {
  color: var(--tier-legend-color);
  background-color: var(--tier-legend-bg);
  border: 1px solid var(--tier-legend-border);
}
.tier-legend::after {
  content: '';
  position: absolute;
  top: 0; left: -100%; width: 50%; height: 100%;
  background: linear-gradient(to right, transparent, rgba(255,255,255,0.8), transparent);
  animation: shimmer 2.5s infinite;
}
.tier-gold {
  color: var(--tier-gold-color);
  background-color: var(--tier-gold-bg);
  border: 1px solid var(--tier-gold-border);
}
.tier-silver {
  color: var(--tier-silver-color);
  background-color: var(--tier-silver-bg);
  border: 1px solid var(--tier-silver-border);
}
.tier-bronze {
  color: var(--tier-bronze-color);
  background-color: var(--tier-bronze-bg);
  border: 1px solid var(--tier-bronze-border);
}
.tier-decent {
  color: var(--tier-decent-color);
  background-color: var(--tier-decent-bg);
  border: 1px solid var(--tier-decent-border);
}
.tier-squad {
  color: var(--tier-squad-color);
  background-color: var(--tier-squad-bg);
  border: 1px solid var(--tier-squad-border);
}

/* ==========================================================================
   15. Col 2: Cricket Pitch
   ========================================================================== */
.pitch-wrap {
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--ink);
  box-shadow: var(--card-shadow);
  background: var(--surface);
}

.pitch-container {
  position: relative;
  width: 100%;
  aspect-ratio: 3/4;
  background: radial-gradient(circle, var(--pitch-inner) 0%, var(--pitch-outer) 100%);
  overflow: hidden;
}

.pitch-ground {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none; /* Let clicks pass to discs */
}

.boundary-oval {
  fill: var(--pitch-outer);
  stroke: var(--pitch-line);
  stroke-width: 2;
  opacity: 0.5;
}

.inner-circle {
  fill: none;
  stroke: var(--pitch-line);
  stroke-width: 1.5;
  stroke-dasharray: 4,4;
  opacity: 0.6;
}

.pitch-strip {
  fill: var(--pitch-strip);
}

.crease-line {
  stroke: var(--pitch-line);
  stroke-width: 1.5;
}

.stumps {
  stroke: #ffffff;
  stroke-width: 2;
}

/* ==========================================================================
   16. Player Discs
   ========================================================================== */
.disc {
  position: absolute;
  transform: translate(-50%, -50%);
  width: 52px;
  height: 52px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: center;
  z-index: 10;
  animation: disc-appear 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.disc:hover {
  transform: translate(-50%, -50%) scale(1.1);
  z-index: 20;
}

.disc.slot-empty {
  background: var(--disc-empty);
  border: 2px dashed var(--disc-empty-border);
  color: var(--text-faint);
  font-weight: 600;
  font-size: 0.75rem;
}

.disc.slot-empty:hover {
  background: rgba(255,255,255,0.2);
  border-color: rgba(255,255,255,0.5);
  color: #fff;
}

.disc.slot-filled {
  background: var(--disc-filled);
  color: var(--disc-filled-text);
  border: none;
  box-shadow: 0 0 0 3px var(--primary-glow), 0 4px 12px rgba(0,0,0,0.2);
}

.disc.slot-filled.tier-legend { box-shadow: 0 0 0 3px rgba(240, 197, 77, 0.5), 0 4px 12px rgba(0,0,0,0.3); }
.disc.slot-filled.tier-gold { box-shadow: 0 0 0 3px rgba(224, 168, 0, 0.4), 0 4px 10px rgba(0,0,0,0.2); }
.disc.slot-filled.tier-silver { box-shadow: 0 0 0 3px rgba(148, 163, 184, 0.4), 0 4px 10px rgba(0,0,0,0.2); }

.disc-circle {
  display: flex;
  flex-direction: column;
  align-items: center;
  line-height: 1.1;
  width: 100%;
}

.disc-num {
  font-size: 0.55rem;
  opacity: 0.8;
}

.disc-name {
  font-size: 0.62rem;
  font-weight: 700;
  max-width: 44px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.disc-rating {
  font-size: 0.55rem;
  opacity: 0.9;
  font-family: 'Outfit', sans-serif;
  font-weight: 800;
}

.pitch-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  padding: 16px 0;
}

/* ==========================================================================
   17. Col 3: Side Panel (XI List)
   ========================================================================== */
.col-box {
  background: var(--surface);
  border: 1px solid var(--ink);
  border-radius: 12px;
  box-shadow: var(--card-shadow);
  overflow: hidden;
}

.side-panel {
  display: flex;
  flex-direction: column;
  height: 100%;
  max-height: 800px;
}

.side-tabs {
  display: flex;
  border-bottom: 1px solid var(--ink);
  background: var(--surface-raised);
}

.side-tab {
  flex: 1;
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  padding: 12px;
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.2s ease;
}

.side-tab:hover {
  color: var(--text);
  background: var(--chip-bg);
}

.side-tab.is-active {
  border-bottom-color: var(--primary);
  color: var(--primary);
  background: var(--surface);
}

.tab-content {
  padding: 16px;
  flex-grow: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}

.xi-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex-grow: 1;
}

.xi-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px dashed var(--ink-strong);
  font-size: 0.85rem;
  transition: all 0.2s ease;
  background: var(--surface);
}

.xi-item.filled {
  border: 1px solid rgba(26,107,60,0.3); /* Uses primary color base roughly */
  background: var(--primary-glow);
}

.theme-floodlight .xi-item.filled {
  border-color: rgba(52,214,123,0.3);
}

.xi-slot-num {
  color: var(--text-muted);
  font-size: 0.75rem;
  min-width: 20px;
  font-weight: 600;
}

.xi-player-name {
  font-weight: 700;
  flex-grow: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  padding: 0 8px;
}

.xi-player-rating {
  font-weight: 800;
  font-family: 'Outfit', sans-serif;
}

.xi-footer {
  border-top: 1px solid var(--ink);
  padding: 16px 0 0 0;
  margin-top: 16px;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
}

.xi-rating-value {
  font-size: 2rem;
  font-weight: 800;
  color: var(--accent);
  line-height: 1;
}

.scorecard-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  color: var(--text-muted);
  text-align: center;
  gap: 1rem;
}

.scorecard-placeholder span {
  font-size: 3rem;
  opacity: 0.5;
}

/* ==========================================================================
   18. SEO & Guide Sections
   ========================================================================== */
.seo-home {
  padding: 3rem 1.5rem;
  border-top: 1px solid var(--ink);
}
.seo-inner {
  max-width: 1200px;
  margin: 0 auto;
}
.seo-section {
  margin-bottom: 3rem;
}
.seo-section h2 {
  font-size: 1.75rem;
  margin-bottom: 1.5rem;
}

.seo-copy {
  max-width: 600px;
  margin-bottom: 3rem;
}

.seo-copy h2 {
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

.seo-copy p {
  color: var(--text-muted);
  font-size: 1.1rem;
  line-height: 1.6;
}

.seo-steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
}

.seo-steps article {
  background: var(--surface);
  padding: 2rem;
  border-radius: 16px;
  border: 1px solid var(--ink);
  box-shadow: var(--card-shadow);
}

.step-no {
  font-size: 3rem;
  color: var(--accent);
  opacity: 0.3;
  font-weight: 900;
  display: block;
  margin-bottom: 1rem;
  line-height: 1;
}

.seo-steps h3 {
  font-size: 1.25rem;
  margin-bottom: 0.75rem;
}

.seo-steps p {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin: 0;
}

.seo-tips {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem;
}

.seo-tips article {
  background: var(--surface-raised);
  padding: 1.5rem;
  border-radius: 12px;
  border: 1px solid var(--ink);
}

.seo-tips h3 {
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
}

.seo-tips p {
  color: var(--text-faint);
  font-size: 0.9rem;
  margin: 0;
}

.seo-faq {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
  gap: 2rem;
}

.seo-faq article {
  border-bottom: 1px solid var(--ink);
  padding-bottom: 1.5rem;
}

.seo-faq h3 {
  font-size: 1.2rem;
  margin-bottom: 0.75rem;
}

.seo-faq p {
  color: var(--text-muted);
  line-height: 1.6;
  margin: 0;
}

/* ==========================================================================
   19. Footer
   ========================================================================== */
.site-footer {
  border-top: 1px solid var(--ink);
  padding: 3rem 2rem;
  text-align: center;
  background-color: var(--surface);
}

.footer-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}

.footer-brand {
  font-family: 'Outfit', sans-serif;
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text);
}

.footer-desc {
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* ==========================================================================
   20. Modals (Result & Slot Picker)
   ========================================================================== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(4px);
  z-index: 90;
}

.result-modal {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: min(90vw, 900px);
  max-height: 85vh;
  overflow-y: auto;
  background: var(--surface);
  border-radius: 16px;
  padding: 1.5rem;
  box-shadow: 0 20px 40px rgba(0,0,0,0.3);
  z-index: 100;
}

.result-modal-inner {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.result-header {
  text-align: center;
  border-bottom: 1px solid var(--ink);
  padding-bottom: 1.5rem;
}

.result-header h2 {
  font-size: 2rem;
  margin: 0;
}

.result-body {
  min-height: 150px;
}

/* ─── Simulation Modal Specifics ─── */
.sim-layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 1.5rem;
  align-items: flex-start;
}
@media(max-width: 768px) {
  .sim-layout {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto;
  }
}

.sim-sidebar {
  border-right: 1px solid var(--ink);
  padding-right: 1rem;
}
@media(max-width: 768px) {
  .sim-sidebar {
    border-right: none;
    border-bottom: 1px solid var(--ink);
    padding-right: 0;
    padding-bottom: 1rem;
    display: flex;
    overflow-x: auto;
    gap: 0.5rem;
  }
}

.timeline-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
@media(max-width: 768px) {
  .timeline-list { flex-direction: row; }
}

.timeline-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem 0.75rem;
  border-radius: 8px;
  background: var(--surface-raised);
  border: 1px solid transparent;
  transition: all 0.2s;
  cursor: pointer;
}
.timeline-item:hover {
  background: var(--surface-hover);
}
.timeline-item.locked {
  opacity: 0.5;
  cursor: not-allowed;
}
.timeline-item.current {
  border-color: var(--primary);
  background: var(--primary-glow);
}
.timeline-item.active-selection {
  border: 1px solid var(--ink-strong);
  box-shadow: 0 0 0 1px var(--ink-strong);
}
.tl-content {
  display: flex;
  flex-direction: column;
}
.tl-name {
  font-weight: 700;
  font-size: 0.85rem;
}
.tl-vs {
  font-size: 0.7rem;
  color: var(--text-muted);
}
.tl-badge {
  font-weight: 800;
  font-size: 0.8rem;
  padding: 2px 6px;
  border-radius: 4px;
}
.tl-won { background: rgba(16, 185, 129, 0.2); color: #059669; }
.tl-lost { background: rgba(239, 68, 68, 0.2); color: #dc2626; }

/* Scorecard display */
.sim-main {
  display: flex;
  flex-direction: column;
}

.sc-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 3rem;
  color: var(--text-muted);
  text-align: center;
  height: 100%;
}
.sc-empty-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
  opacity: 0.5;
}

.scorecard-wrap {
  border: 1px solid var(--ink);
  border-radius: 12px;
  overflow: hidden;
  background: var(--surface-raised);
}

.scorecard-header {
  padding: 1rem;
  background: var(--surface-hover);
  border-bottom: 1px solid var(--ink);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.sc-match-name {
  font-weight: 800;
  font-size: 1.1rem;
  margin-bottom: 0.25rem;
}
.sc-summary {
  font-size: 0.9rem;
  color: var(--text-muted);
}

.scorecard-wrap.won .scorecard-header { border-top: 4px solid #10b981; }
.scorecard-wrap.lost .scorecard-header { border-top: 4px solid #ef4444; }

.sc-teams {
  padding: 1.5rem;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 1rem;
  align-items: center;
}

.sc-vs {
  font-weight: 800;
  color: var(--text-faint);
  font-size: 1.5rem;
}

.sc-team {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.sc-team-name {
  font-weight: 700;
  font-size: 1rem;
  margin-bottom: 0.5rem;
}

.sc-team-score {
  font-family: 'Outfit', sans-serif;
  font-weight: 800;
  font-size: 1.75rem;
  line-height: 1;
  margin-bottom: 0.75rem;
}

.sc-overs {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-muted);
}

.sc-top-performer {
  font-size: 0.85rem;
  background: var(--surface);
  padding: 0.5rem 0.75rem;
  border-radius: 6px;
  border: 1px solid var(--ink);
  width: 100%;
}
.sc-tp-label {
  color: var(--text-muted);
  font-size: 0.75rem;
  text-transform: uppercase;
  display: block;
  margin-bottom: 0.25rem;
}
.sc-tp-stat {
  font-weight: 700;
  color: var(--primary);
}

/* Group Table */
.group-table-wrap {
  margin-top: 1rem;
  background: var(--surface-raised);
  border: 1px solid var(--ink);
  border-radius: 8px;
  overflow: hidden;
}
.group-table-header {
  padding: 0.75rem 1rem;
  background: var(--surface-hover);
  border-bottom: 1px solid var(--ink);
  font-weight: 700;
  font-size: 0.9rem;
  text-align: center;
}
.group-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
  text-align: center;
}
.group-table th {
  padding: 0.5rem;
  color: var(--text-muted);
  font-weight: 600;
  border-bottom: 1px solid var(--ink);
}
.group-table td {
  padding: 0.5rem;
  border-bottom: 1px solid var(--ink);
}
.group-table tr:last-child td {
  border-bottom: none;
}
.group-table tr.qualifies {
  background: rgba(16, 185, 129, 0.05); /* subtle green */
}
.group-table tr.is-me {
  font-weight: 800;
  background: var(--primary-glow);
}
.group-table .gt-name {
  text-align: left;
  padding-left: 1rem;
}

.result-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  padding-top: 1rem;
}

/* ─── Summary Card Modal ─── */
.card-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(0,0,0,0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  overflow-y: auto;
}

.card-modal-box {
  position: relative;
  width: 100%;
  max-width: 400px;
  max-height: 90vh;
  overflow-y: auto;
  border-radius: 4px;
  flex-shrink: 0;
  margin: auto;
}

.card-close-x {
  position: sticky;
  top: 0;
  float: right;
  z-index: 10;
  background: #1a1a1a;
  color: #fff;
  border: none;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 6px 6px 0 0;
  transition: background 0.2s;
}
.card-close-x:hover { background: #333; }

.summary-card {
  background: #fbf5eb;
  border: 2px solid #d4af37;
  padding: 6px;
  box-shadow: 0 20px 40px rgba(0,0,0,0.5);
  color: #111;
  font-family: 'Outfit', sans-serif;
  width: 100%;
  clear: both;
}

.summary-card-content {
  border: 1px solid #d4af37;
  padding: 1rem 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  background: #fbf5eb;
}

.card-header-banner {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}

.card-record {
  font-size: 2rem;
  font-weight: 900;
  line-height: 1.1;
  text-transform: uppercase;
  color: #1a1a1a;
  text-shadow: 1px 1px 0px rgba(0,0,0,0.1);
  text-align: center;
}
.card-record.status-won { color: #d4af37; }
.card-record.status-eliminated { color: #1a1a1a; }

.card-stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border: 2px solid #1a1a1a;
  background: #fbf5eb;
}

.c-stat-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 0.25rem;
  border-right: 1px solid #1a1a1a;
  text-align: center;
}
.c-stat-box:last-child {
  border-right: none;
}

.c-stat-val {
  font-size: 1.5rem;
  font-weight: 900;
  line-height: 1;
  color: #1a1a1a;
}

.c-stat-lbl {
  font-size: 0.55rem;
  font-weight: 700;
  color: #1a1a1a;
  margin-top: 0.25rem;
  text-transform: uppercase;
}

.card-players-list {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.card-player-row {
  display: flex;
  align-items: center;
  background: #fff;
  border: 1px solid #e0d5c1;
  border-radius: 4px;
  padding: 0.25rem 0.4rem;
  font-size: 0.85rem;
  gap: 0.5rem;
}

.card-p-num {
  font-weight: 800;
  color: #1a1a1a;
  width: 20px;
}
.card-p-rating {
  font-weight: 900;
  font-size: 1rem;
  width: 28px;
  text-align: center;
  border-radius: 4px;
}
.card-p-rating.tier-legend { color: #b8860b; }
.card-p-rating.tier-gold { color: #d4af37; }
.card-p-rating.tier-silver { color: #94a3b8; }
.card-p-rating.tier-bronze { color: #b45309; }
.card-p-rating.tier-decent { color: #2d6a4f; }
.card-p-rating.tier-squad { color: #1a1a1a; }

.card-p-name {
  font-weight: 700;
  color: #1a1a1a;
  flex: 1;
}
.card-p-nation {
  color: #555;
  font-size: 0.75rem;
  font-weight: 600;
  text-align: right;
}

.card-footer {
  text-align: center;
  font-size: 0.75rem;
  color: #888;
  padding-top: 0.5rem;
  border-top: 1px solid #e0d5c1;
}

.card-actions-bar {
  display: flex;
  justify-content: center;
  padding: 0.75rem 0 0;
  background: rgba(0,0,0,0.6);
  border-radius: 0 0 8px 8px;
  gap: 0.5rem;
}
.card-actions-bar .btn {
  background: rgba(255,255,255,0.15);
  color: #fff;
  border-color: rgba(255,255,255,0.3);
}
.card-actions-bar .btn:hover {
  background: rgba(255,255,255,0.25);
}

.slot-picker-modal {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 90%;
  max-width: 380px;
  background: var(--surface);
  border-radius: 16px;
  padding: 1.5rem;
  box-shadow: 0 10px 30px rgba(0,0,0,0.25);
  z-index: 100;
  animation: scale-in 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

.slot-picker-header {
  margin-bottom: 1rem;
}

.slot-picker-header h3 {
  font-size: 1.25rem;
  margin: 0;
  color: var(--primary);
}

.slot-picker-inner p {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 1.5rem;
}

.slot-picker-options {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 1.5rem;
}

.slot-option-btn {
  background: var(--chip-bg);
  border: 1px solid var(--chip-border);
  color: var(--text);
  padding: 8px 16px;
  border-radius: 50px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.slot-option-btn:hover {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

#slot-picker-cancel {
  width: 100%;
}

/* ==========================================================================
   21. Animations
   ========================================================================== */
@keyframes disc-appear {
  0% { transform: translate(-50%, -50%) scale(0.3); opacity: 0; }
  70% { transform: translate(-50%, -50%) scale(1.05); }
  100% { transform: translate(-50%, -50%) scale(1); opacity: 1; }
}

@keyframes shimmer {
  0% { left: -100%; }
  100% { left: 200%; }
}

@keyframes fade-up {
  0% { opacity: 0; transform: translate(-50%, calc(-50% + 20px)); }
  100% { opacity: 1; transform: translate(-50%, -50%); }
}

@keyframes slide-up {
  0% { opacity: 0; transform: translate(-50%, calc(-50% + 40px)); }
  100% { opacity: 1; transform: translate(-50%, -50%); }
}

@keyframes scale-in {
  0% { opacity: 0; transform: translate(-50%, -50%) scale(0.8); }
  100% { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}

@keyframes dice-roll {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* ==========================================================================
   22. Responsive
   ========================================================================== */
@media (max-width: 1100px) {
  .draft-layout {
    grid-template-columns: 320px 1fr;
  }
  
  .col-box.side-panel {
    grid-column: 1 / -1;
    max-height: 500px;
  }
  
  .xi-list {
    flex-direction: row;
    flex-wrap: wrap;
  }
  
  .xi-item {
    flex: 1 1 calc(50% - 6px);
  }
}

@media (max-width: 768px) {
  .home-grid {
    grid-template-columns: 1fr;
    gap: 3rem;
  }
  
  .home-mark {
    text-align: center;
  }
  
  .mark-freehit {
    font-size: clamp(3rem, 12vw, 5rem);
  }
  
  .home-headline, .home-sub {
    text-align: center;
    margin-left: auto;
    margin-right: auto;
  }
  
  .home-ctas {
    display: flex;
    justify-content: center;
  }
  
  .draft-layout {
    grid-template-columns: 1fr;
  }
  
  .seo-faq {
    grid-template-columns: 1fr;
  }
  
  .xi-item {
    flex: 1 1 100%;
  }
}

/* ─── App Dynamic UI Styles ──────────────────────────────────────────────── */

.card-stripe {
  width: 4px;
  border-radius: 4px 0 0 4px;
  flex-shrink: 0;
  margin-right: 10px;
  align-self: stretch;
}

.role-bat .card-stripe, .card-stripe.role-bat { background: #2563eb; }
.role-wk .card-stripe, .card-stripe.role-wk { background: #d97706; }
.role-ar .card-stripe, .card-stripe.role-ar { background: #7c3aed; }
.role-fast .card-stripe, .card-stripe.role-fast { background: #dc2626; }
.role-spin .card-stripe, .card-stripe.role-spin { background: #0891b2; }

.role-badge {
  display: inline-block;
  padding: 2px 7px;
  border-radius: 20px;
  font-size: 0.68rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: white;
}
.role-badge.role-bat { background: #2563eb; }
.role-badge.role-wk { background: #d97706; }
.role-badge.role-ar { background: #7c3aed; }
.role-badge.role-fast { background: #dc2626; }
.role-badge.role-spin { background: #0891b2; }

.captain-badge {
  display: inline-block;
  background: var(--accent);
  color: #000;
  padding: 1px 6px;
  border-radius: 12px;
  font-size: 0.68rem;
  font-weight: 700;
}

.rating-badge {
  font-size: 0.82rem;
  font-weight: 800;
  font-family: 'Outfit', sans-serif;
  padding: 3px 8px;
  border-radius: 8px;
  border: 1.5px solid transparent;
  white-space: nowrap;
}
.rating-badge.tier-legend {
  color: var(--tier-legend-color);
  background: var(--tier-legend-bg);
  border-color: var(--tier-legend-border);
  position: relative;
  overflow: hidden;
}
.rating-badge.tier-legend::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent 0%, rgba(255,255,255,0.4) 50%, transparent 100%);
  background-size: 200% 100%;
  animation: shimmer 2.5s infinite;
}
.rating-badge.tier-gold { color: var(--tier-gold-color); background: var(--tier-gold-bg); border-color: var(--tier-gold-border); }
.rating-badge.tier-silver { color: var(--tier-silver-color); background: var(--tier-silver-bg); border-color: var(--tier-silver-border); }
.rating-badge.tier-bronze { color: var(--tier-bronze-color); background: var(--tier-bronze-bg); border-color: var(--tier-bronze-border); }
.rating-badge.tier-decent { color: var(--tier-decent-color); background: var(--tier-decent-bg); border-color: var(--tier-decent-border); }
.rating-badge.tier-squad { color: var(--tier-squad-color); background: var(--tier-squad-bg); border-color: var(--tier-squad-border); }

/* XI List items */
.xi-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid var(--ink);
  font-size: 0.82rem;
  transition: all 0.18s ease;
}
.xi-item.filled {
  background: color-mix(in srgb, var(--primary) 10%, transparent);
  border-color: color-mix(in srgb, var(--primary) 30%, transparent);
}
.xi-slot-num { color: var(--text-muted); font-size: 0.72rem; min-width: 18px; font-family: 'Outfit', sans-serif; }
.xi-slot-label { color: var(--text-muted); flex-grow: 1; }
.xi-slot-pos { font-size: 0.7rem; color: var(--text-faint); }
.xi-player-name { font-weight: 600; flex-grow: 1; }
.xi-player-meta { font-size: 0.72rem; color: var(--text-muted); }
.xi-player-rating { font-weight: 700; font-size: 0.82rem; font-family: 'Outfit', sans-serif; padding: 2px 7px; border-radius: 6px; }
.xi-player-rating.tier-legend { color: var(--tier-legend-color); }
.xi-player-rating.tier-gold { color: var(--tier-gold-color); }
.xi-player-rating.tier-silver { color: var(--tier-silver-color); }
.xi-player-rating.tier-bronze { color: var(--tier-bronze-color); }
.xi-player-rating.tier-decent { color: var(--tier-decent-color); }

/* Squad year badge */
.squad-year {
  display: inline-block;
  background: var(--accent);
  color: #000;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 2px 10px;
  border-radius: 12px;
  font-family: 'Outfit', sans-serif;
}

/* No players message */
.no-players {
  text-align: center;
  color: var(--text-muted);
  padding: 20px;
  font-size: 0.85rem;
}

/* Result modal styles */
.result-summary { text-align: center; }
.result-trophy { font-size: 4rem; line-height: 1; margin-bottom: 8px; }
.result-headline { font-size: 1.4rem; font-weight: 800; font-family: 'Outfit', sans-serif; margin-bottom: 8px; }
.result-stats { display: flex; gap: 8px; justify-content: center; color: var(--text-muted); font-size: 0.9rem; }
.result-sep { opacity: 0.5; }

.result-mvp { padding: 12px; background: var(--bg-alt); border-radius: 12px; }
.result-mvp .eyebrow { display: block; margin-bottom: 8px; }
.mvp-card { display: flex; align-items: center; gap: 10px; }
.mvp-name { font-weight: 700; flex-grow: 1; }
.mvp-meta { font-size: 0.8rem; color: var(--text-muted); }
.mvp-rating { padding: 3px 10px; border-radius: 8px; font-weight: 700; }

.result-log .eyebrow { display: block; margin-bottom: 8px; }
.log-entries { display: flex; flex-direction: column; gap: 4px; max-height: 280px; overflow-y: auto; }
.log-entry { display: flex; gap: 8px; align-items: center; padding: 6px 10px; border-radius: 6px; font-size: 0.78rem; border: 1px solid var(--ink); }
.log-win { background: color-mix(in srgb, #22c55e 8%, transparent); border-color: color-mix(in srgb, #22c55e 25%, transparent); }
.log-loss { background: color-mix(in srgb, #ef4444 8%, transparent); border-color: color-mix(in srgb, #ef4444 25%, transparent); }
.log-match { font-weight: 600; min-width: 140px; }
.log-score { font-family: 'Outfit', sans-serif; font-weight: 700; }
.log-hero { color: var(--text-muted); flex-grow: 1; }

/* Slot option buttons */
.slot-option-btn {
  background: var(--chip-bg);
  border: 1.5px solid var(--chip-border);
  border-radius: 10px;
  padding: 10px 16px;
  font-size: 0.88rem;
  cursor: pointer;
  color: var(--text);
  transition: all 0.18s ease;
  font-family: inherit;
}
.slot-option-btn:hover {
  background: var(--primary);
  color: white;
  border-color: transparent;
  transform: translateY(-1px);
}

/* ==========================================================================
   Responsive — 1024px Tablet
   ========================================================================== */
@media (max-width: 1024px) {
  .draft-layout {
    grid-template-columns: 1fr 1fr;
  }
  .col-box.side-panel {
    grid-column: 1 / -1;
  }
}

/* ==========================================================================
   Responsive — 480px Small Mobile
   ========================================================================== */
@media (max-width: 480px) {
  .home-nav {
    padding: 0.6rem 1rem;
  }
  .mark-freehit {
    font-size: 2.5rem;
  }
  .home-headline {
    font-size: 1.4rem;
  }
  .home-sub {
    font-size: 0.9rem;
  }
  .sc-teams {
    grid-template-columns: 1fr;
    gap: 0.5rem;
  }
  .sc-vs {
    display: none;
  }
  .result-modal {
    max-height: 90vh;
    padding: 1rem;
    border-radius: 12px;
  }
  .card-stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .card-record {
    font-size: 1.5rem;
  }
  .result-actions {
    flex-wrap: wrap;
    gap: 0.5rem;
  }
  .result-actions .btn {
    font-size: 0.85rem;
    padding: 0.6rem 1rem;
  }
  .timeline-item {
    min-width: 80px;
    font-size: 0.68rem;
    padding: 0.35rem 0.5rem;
  }
  .squad-cards {
    max-height: 240px;
  }
  .game-section {
    padding: 1rem 0.75rem;
  }
  .draft-layout {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  .card-modal-box {
    max-height: 95vh;
  }
}

/* Formation info */
.formation-info { padding-top: 8px; border-top: 1px solid var(--ink); }
.formation-tagline { display: block; font-weight: 600; font-size: 0.85rem; color: var(--primary); }
.formation-example { display: block; font-size: 0.78rem; color: var(--text-muted); margin-top: 3px; }

/* Disc pop animation */
@keyframes disc-pop {
  0% { transform: translate(-50%, -50%) scale(0.5); opacity: 0; }
  70% { transform: translate(-50%, -50%) scale(1.1); }
  100% { transform: translate(-50%, -50%) scale(1); opacity: 1; }
}
.disc.disc-pop { animation: disc-pop 0.4s ease-out; }

/* Hero pitch discs */
.hp-disc {
  position: absolute;
  transform: translate(-50%, -50%);
  background: rgba(255,255,255,0.12);
  backdrop-filter: blur(6px);
  border: 1px solid rgba(255,255,255,0.25);
  border-radius: 8px;
  padding: 5px 9px;
  text-align: center;
  font-size: 0.7rem;
  color: rgba(255,255,255,0.9);
  pointer-events: none;
  z-index: 2;
}
.hp-disc.tier-legend { background: rgba(240,197,77,0.22); border-color: rgba(240,197,77,0.5); }
.hp-num { display: block; font-size: 0.58rem; opacity: 0.7; }
.hp-name { display: block; font-weight: 700; }

/* Pitch SVG elements */
.pitch-ground { position: absolute; inset: 0; width: 100%; height: 100%; }
.boundary-oval { fill: var(--pitch-outer); stroke: var(--pitch-line); stroke-width: 2; }
.inner-circle { fill: none; stroke: var(--pitch-line); stroke-width: 1.5; stroke-dasharray: 4 4; }
.pitch-strip { fill: var(--pitch-strip); }
.crease-line { stroke: var(--pitch-line); stroke-width: 1.5; }
.stumps { stroke: rgba(255,255,255,0.8); stroke-width: 2; stroke-linecap: round; }

/* ─── Keyframes ──────────────────────────────────────────────────────────── */
@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}
