/* Waggle — Clubhouse Meets Sportsbook */
/* Design system: DESIGN.md | Fonts loaded via <link> in index.html */

:root {
  --mg-touch-target: 56px;
  /* ============================================================
     Waggle Design System — Navy / Gold / Ivory
     Clubhouse authority + sportsbook energy
     ============================================================ */

  /* Backgrounds — The Ledger warm ivory palette */
  --bg-primary: #FAF9F5;           /* Surface — warm ivory base */
  --bg-secondary: #FFFFFF;         /* Surface container lowest */
  --bg-tertiary: #F4F4F0;          /* Surface container low */
  --bg-hover: #EFEEEA;             /* Surface container */
  --card-bg: #FFFFFF;

  /* Navy — The Ledger primary palette */
  --green-primary: #002046;        /* Primary (deep navy) */
  --green-muted: #1B365D;          /* Primary container */
  --green-bright: #775A19;         /* Secondary (heritage gold) */

  /* Gold — Heritage champagne accents */
  --gold-primary: #775A19;
  --gold-bright: #FED488;
  --gold-muted: rgba(119,90,25,0.12);

  /* Text — near-black on ivory, never pure black */
  --text-primary: #1A202C;
  --text-secondary: #718096;
  --text-tertiary: #A0AEC0;

  /* Page text — legacy compat */
  --page-text: #1A202C;
  --page-text-secondary: #2D3748;
  --page-text-muted: #718096;

  /* Semantic — scoring colors are the most important */
  --win: #22C55E;                  /* Electric green — DraftKings energy for +$ amounts */
  --win-dim: #16A34A;              /* Subdued green for backgrounds */
  --loss: #EF4444;                 /* Red — unmistakable for -$ amounts */
  --loss-dim: #E8735A;             /* Coral — softer, for bogey indicators */
  --live: #22C55E;                 /* Live indicator (bright green dot) */
  --odds: #C4A35A;
  --eagle: #C4A35A;                /* Gold for eagle */
  --birdie: #22C55E;               /* Electric green for birdie */
  --bogey: #E8735A;                /* Coral for bogey */
  --double-plus: #DC2626;          /* Bright red for double+ */
  --money-green: #22C55E;          /* THE money color — +$203 should glow */
  --money-red: #EF4444;            /* -$45 — unmistakable loss */

  /* Borders — ghost borders per DESIGN.md "No-Line Rule" */
  --border: rgba(196,198,207,0.15);
  --border-strong: rgba(196,198,207,0.3);

  /* Fonts — The Ledger design system */
  --font-display: 'Noto Serif', Georgia, serif;
  --font-sans: 'Manrope', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'SF Mono', 'Fira Code', monospace;
  --font-data: 'SF Mono', 'Fira Code', monospace;

  /* Type scale */
  --text-xs: 11px;
  --text-sm: 13px;
  --text-base: 15px;
  --text-lg: 18px;
  --text-xl: 22px;
  --text-2xl: 28px;
  --text-3xl: 36px;

  /* Spacing (8px grid) */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-6: 24px;
  --space-8: 32px;

  /* Radii */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;

  /* Shadows — tinted forest green, not black */
  --shadow-sm: 0 2px 8px rgba(27,48,34,0.04);
  --shadow-md: 0 4px 16px rgba(27,48,34,0.06);
  --shadow-lg: 0 12px 40px rgba(27,48,34,0.06);

  /* Legacy variable mappings (so existing code doesn't break) */
  --mg-bg: var(--bg-primary);
  --mg-green: var(--green-primary);
  --mg-green-light: var(--green-bright);
  --mg-gold: var(--gold-primary);
  --mg-gold-dim: var(--gold-muted);
  --mg-text: var(--text-primary);
  --mg-text-secondary: var(--text-secondary);
  --mg-text-muted: var(--text-secondary);
  --mg-border: var(--border);
  --mg-surface: var(--card-bg);
  --mg-win: var(--win);
  --mg-loss: var(--loss);
  --mg-live: var(--live);
  --mg-odds-bg: var(--bg-tertiary);
  --mg-odds-selected: #2563EB;
  --mg-shadow: var(--shadow-sm);
  --mg-card-bg: var(--bg-secondary);
  --mg-shadow-lg: var(--shadow-lg);
  --mg-gold-accent: rgba(212,160,23,0.15);
  --mg-radius: 10px;
  --mg-nav-height: 64px;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

body.dark-mode,
:root.dark-mode {
  --bg-primary: #002046;
  --bg-secondary: #1B365D;
  --bg-tertiary: #1B365D;
  --bg-hover: #2E476F;
  --card-bg: #1B365D;
  --text-primary: #FAF9F5;
  --text-secondary: rgba(250,249,245,0.6);
  --text-tertiary: rgba(250,249,245,0.5);
  --page-text: #FAF9F5;
  --page-text-secondary: rgba(250,249,245,0.76);
  --page-text-muted: rgba(250,249,245,0.6);
  --border: rgba(196,198,207,0.2);
  --border-strong: rgba(196,198,207,0.34);
  --mg-bg: var(--bg-primary);
  --mg-card-bg: var(--card-bg);
  --mg-surface: var(--card-bg);
  --mg-text: var(--text-primary);
  --mg-text-secondary: var(--text-secondary);
  --mg-text-muted: var(--text-tertiary);
  --mg-border: var(--border);
  --mg-shadow: 0 2px 8px rgba(0,0,0,0.3);
  --mg-shadow-lg: 0 12px 40px rgba(0,0,0,0.38);
  --mg-odds-bg: var(--bg-tertiary);
}

.theme-toggle {
  background: transparent;
  border: 1px solid rgba(197,160,89,0.5);
  border-radius: 999px;
  min-height: var(--mg-touch-target);
  padding: 0 12px;
  color: #FCF9F4;
  font-size: 12px;
  font-weight: 700;
  font-family: var(--font-sans);
  letter-spacing: 0.02em;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  -webkit-tap-highlight-color: transparent;
  transition: border-color 0.2s ease, background-color 0.2s ease, color 0.2s ease;
}
.theme-toggle:hover {
  border-color: var(--gold-bright);
  color: var(--gold-bright);
}
body.dark-mode .theme-toggle {
  background: rgba(197,160,89,0.16);
  border-color: rgba(197,160,89,0.64);
}
/* Dark mode header */
body.dark-mode header[style*="sticky"] {
  background: #002046 !important;
}
body.dark-mode header[style*="sticky"] a[style*="Playfair"] {
  color: #fff !important;
}
body.dark-mode header[style*="sticky"] button { color: rgba(255,255,255,.7) !important; }
body.dark-mode nav[style*="backdrop-filter"] {
  background: rgba(15,26,46,.85) !important;
  border-color: rgba(197,160,89,.15) !important;
}
body.dark-mode nav[style*="backdrop-filter"] a { color: rgba(255,255,255,.4) !important; }
body.dark-mode nav[style*="backdrop-filter"] a.active { color: var(--gold-primary) !important; background: rgba(197,160,89,.1) !important; }

/* Score change animations */
@keyframes score-flash-green {
  0% { background: rgba(22,163,74,0.25); }
  100% { background: transparent; }
}
@keyframes score-flash-red {
  0% { background: rgba(220,38,38,0.2); }
  100% { background: transparent; }
}
@keyframes score-flash-gold {
  0% { background: rgba(197,160,89,0.25); }
  100% { background: transparent; }
}
@keyframes slide-up {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}
.flash-green { animation: score-flash-green 1.2s ease-out; }
.flash-red { animation: score-flash-red 1.2s ease-out; }
.flash-gold { animation: score-flash-gold 1.2s ease-out; }
.slide-up { animation: slide-up 0.3s ease-out; }

/* Leaderboard position change transitions */
.mg-leaderboard-row { transition: transform 0.4s ease-out, opacity 0.3s; }

/* Identity picker overlay (first visit) */
.wg-identity-overlay {
  position: fixed;
  inset: 0;
  z-index: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(6, 20, 12, 0.76);
  backdrop-filter: blur(4px);
  animation: wgIdentityOverlayIn 0.28s ease-out;
}
.wg-identity-overlay.is-closing {
  opacity: 0;
  transition: opacity 0.22s ease-out;
}
.wg-identity-card {
  width: 100%;
  max-width: 380px;
  border-radius: 12px;
  padding: 20px 16px 16px;
  background: #002046;
  border: 1px solid rgba(197, 160, 89, 0.32);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
  color: #F4F8F5;
  opacity: 0;
  animation: wgIdentityCardIn 0.34s ease-out forwards;
  transform: translateY(0) scale(1);
  transition: transform 0.22s ease-out, opacity 0.22s ease-out;
}
.wg-identity-overlay.is-closing .wg-identity-card {
  transform: translateY(8px) scale(0.98);
  opacity: 0;
}
.wg-identity-title {
  font-size: 24px;
  font-weight: 700;
  line-height: 1.1;
  margin-bottom: 8px;
  color: #775A19;
}
.wg-identity-subtitle {
  font-size: 13px;
  color: rgba(244, 248, 245, 0.82);
  margin-bottom: 14px;
}
.wg-identity-list {
  max-height: min(54vh, 380px);
  overflow-y: auto;
  display: grid;
  gap: 10px;
  padding-right: 2px;
}
.wg-identity-option {
  width: 100%;
  min-height: 56px;
  padding: 12px;
  border-radius: 12px;
  border: 1px solid rgba(197, 160, 89, 0.6);
  background: rgba(13, 40, 24, 0.7);
  color: #F4F8F5;
  font-family: var(--font-sans);
  font-size: 15px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: border-color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}
.wg-identity-option:hover,
.wg-identity-option:focus-visible {
  border-color: #775A19;
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.3);
  outline: none;
}
.wg-identity-player {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  min-width: 0;
}
.wg-identity-name {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.wg-identity-handicap {
  font-size: 12px;
  color: rgba(244, 248, 245, 0.72);
  font-weight: 500;
}
.wg-identity-hi {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: #775A19;
  background: rgba(197, 160, 89, 0.13);
  border: 1px solid rgba(197, 160, 89, 0.35);
  border-radius: 999px;
  padding: 4px 8px;
  white-space: nowrap;
}
.wg-identity-skip {
  margin-top: 10px;
  width: 100%;
  min-height: 56px;
  padding: 12px;
  border-radius: 8px;
  border: 1px solid rgba(244, 248, 245, 0.2);
  background: transparent;
  color: rgba(244, 248, 245, 0.88);
  font-size: 14px;
  font-weight: 600;
  font-family: var(--font-sans);
  cursor: pointer;
}
.wg-identity-skip:hover,
.wg-identity-skip:focus-visible {
  border-color: #775A19;
  color: #775A19;
  outline: none;
}
@keyframes wgIdentityOverlayIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes wgIdentityCardIn {
  from { opacity: 0; transform: translateY(10px) scale(0.985); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
@media (max-width: 390px) {
  .wg-identity-card {
    padding: 18px 14px 14px;
  }
  .wg-identity-title {
    font-size: 22px;
  }
}

.material-symbols-outlined {
  font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
}
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  -webkit-text-size-adjust: 100%;
  -webkit-tap-highlight-color: rgba(240,246,252,0.1);
}

body {
  font-family: var(--font-sans);
  background: var(--bg-primary);
  color: var(--page-text);
  min-height: 100vh;
  min-height: 100dvh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overscroll-behavior: none;
  /* Subtle paper grain — country club scorecard texture */
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.025'/%3E%3C/svg%3E");
  background-size: 256px 256px;
}

#app {
  max-width: 640px;
  margin: 0 auto;
  padding-bottom: calc(var(--mg-nav-height) + var(--safe-bottom) + 16px);
  min-height: 100vh;
  min-height: 100dvh;
}

/* Header — The Ledger warm ivory with serif branding */
.mg-header {
  background: var(--bg-primary);
  display: flex;
  flex-direction: column;
  padding: 14px 20px 12px;
  padding-top: calc(14px + env(safe-area-inset-top, 0px));
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: none;
}
.mg-header::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 20px;
  right: 20px;
  height: 1px;
  background: rgba(27,54,93,0.08);
}
.mg-header-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}
.mg-brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.mg-brand-logo {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  object-fit: cover;
  border: 1px solid rgba(197,160,89,0.45);
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}
.mg-brand-text {
  line-height: 1;
}
.mg-header h1 {
  font-family: 'Noto Serif', Georgia, serif;
  font-size: 22px;
  color: var(--gold-primary);
  font-weight: 700;
  letter-spacing: 0.4px;
  margin: 0;
}
.mg-header .mg-subtitle {
  font-family: var(--font-sans);
  font-size: 12px;
  color: rgba(252,249,244,0.5);
  letter-spacing: 0.3px;
  margin-top: 2px;
}
.mg-header-tabs {
  display: flex;
  align-items: center;
  gap: 24px;
}
.mg-header-tabs button {
  background: none;
  border: none;
  cursor: pointer;
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: rgba(252,249,244,0.62);
  min-height: var(--mg-touch-target);
  padding: 8px 0;
  border-bottom: 2px solid transparent;
  transition: color .15s, border-color .15s;
  display: inline-flex;
  align-items: center;
}
.mg-header-tabs button.active {
  color: var(--gold-primary);
  border-bottom-color: var(--gold-primary);
  text-shadow: 0 0 10px rgba(197,160,89,0.35);
}

/* Bottom Nav — Glassmorphic "The Ledger" style */
.mg-nav { display: none; /* replaced by inline nav in worker.js */ }
nav[style*="backdrop-filter"] a.active {
  color: #FFFFFF !important;
  background: #002046;
  border-radius: 12px;
}
nav[style*="backdrop-filter"] a.active .material-symbols-outlined {
  font-variation-settings: 'FILL' 1;
}

/* Content area — generous padding for premium feel */
.mg-content { background: var(--bg-primary); padding: 20px; }

/* Cards — The Ledger tonal layering (no borders, surface shifts) */
.mg-card {
  background: var(--bg-tertiary);
  border: none;
  border-radius: 16px;
  box-shadow: 0 20px 40px rgba(27,28,26,0.03);
  padding: 20px 22px;
  margin-bottom: 14px;
}
.mg-card-header {
  font-family: 'Noto Serif', Georgia, serif;
  font-size: 17px;
  font-weight: 700;
  margin-bottom: 14px;
  color: var(--text-primary);
  letter-spacing: 0.2px;
}

/* Light theme cards — cream/white with gold top accent */
.mg-card-light {
  background: var(--card-bg);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  padding: 20px 22px;
  margin-bottom: 14px;
  border: 1px solid var(--border);
  border-top: 2px solid var(--gold-primary);
}
.mg-card-light .mg-card-header-light {
  font-family: 'Noto Serif', Georgia, serif;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.2px;
  text-transform: none;
  color: var(--text-primary);
  margin-bottom: 12px;
}
.mg-card-light .light-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: var(--text-secondary);
}
.mg-card-light .light-value {
  font-family: 'SF Mono', 'Menlo', 'Courier New', monospace;
  font-weight: 800;
  color: var(--text-primary);
}
.mg-card-light .light-value-green {
  font-family: 'SF Mono', 'Menlo', 'Courier New', monospace;
  font-weight: 800;
  color: var(--mg-green);
}
.mg-card-light .light-money {
  font-family: 'SF Mono', 'Menlo', 'Courier New', monospace;
  font-weight: 700;
  color: var(--win);
}
.mg-card-light .light-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
}
.mg-card-light .light-row:last-child {
  border-bottom: none;
}
.mg-card-light .light-muted {
  font-size: 12px;
  color: var(--text-secondary);
}
.mg-card-light .light-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
  flex-shrink: 0;
}
.mg-card-light .light-dot.active { background: var(--win); }
.mg-card-light .light-dot.carried { background: #D1D5DB; }

/* ── Game Card System ── */
/* Gold top accent per DESIGN.md — the Waggle card signature */
.game-card {
  background: var(--card-bg);
  border-radius: 16px;
  border: none;
  box-shadow: 0 20px 40px rgba(27,28,26,0.03);
  padding: 18px 20px;
  margin-bottom: 14px;
}
.game-card-title {
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 700;
  color: var(--gold-primary);
  letter-spacing: 0.5px;
  text-transform: uppercase;
  margin-bottom: 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.game-card-title .hole-count {
  font-family: var(--font-sans);
  font-weight: 400;
  color: var(--text-secondary);
  letter-spacing: 0;
  text-transform: none;
  font-size: 12px;
}
.game-card .stat-row {
  display: flex;
  gap: 20px;
  margin-bottom: 12px;
}
.game-card .stat-box {
  display: flex;
  flex-direction: column;
}
.game-card .stat-label {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: var(--text-secondary);
  margin-bottom: 2px;
}
.game-card .stat-value {
  font-size: 28px;
  font-weight: 800;
  font-family: var(--font-data);
  color: var(--text-primary);
}
.game-card .stat-value.gold { color: var(--gold-primary); }
.game-card .stat-value.win { color: var(--win); }
.game-card .stat-value.loss { color: var(--loss); }

/* Grid layout for Nassau-style player rows */
.game-card .player-grid {
  display: grid;
  gap: 4px;
  font-size: 14px;
}
.game-card .player-grid-header {
  display: grid;
  gap: 4px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: var(--text-secondary);
  padding: 0 4px;
  margin-bottom: 4px;
}
.game-card .player-row {
  display: grid;
  gap: 4px;
  padding: 8px 4px;
  border-top: 1px solid var(--border);
  align-items: center;
}
.game-card .player-name {
  font-weight: 600;
  color: var(--text-primary);
}
.game-card .score-cell {
  text-align: center;
  font-family: var(--font-data);
  font-weight: 600;
}
.game-card .score-cell.winning { color: var(--win); }
.game-card .score-cell.losing { color: var(--loss); }
.game-card .score-cell.even { color: var(--text-primary); }
.game-card .score-cell.bold { font-weight: 800; }

/* Hole-by-hole result row (skins, wolf) */
/* ── Score Picker (par-relative tap buttons) ── */
.score-picker { margin-top: 8px; }
.score-picker-player {
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}
.score-picker-player:last-child { border-bottom: none; }
.score-picker-player.active { background: rgba(196,163,90,0.04); border-radius: 8px; padding: 12px 8px; }
.score-picker-name {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 8px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.score-picker-name .sp-hi { font-size: 11px; color: var(--text-secondary); font-weight: 500; }
.score-picker-name .sp-selected {
  font-family: var(--font-data);
  font-size: 14px;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 4px;
}
.score-picker-btns {
  display: flex;
  gap: 6px;
  justify-content: center;
  flex-wrap: wrap;
}
.score-picker-btn {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 2px solid var(--border);
  background: var(--card-bg);
  font-family: var(--font-data);
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.12s;
  -webkit-tap-highlight-color: transparent;
}
@media (min-width: 400px) {
  .score-picker-btn { width: 52px; height: 52px; font-size: 17px; }
}
.score-picker-btn.par { border-color: var(--gold-primary); color: var(--gold-primary); background: rgba(196,163,90,0.08); }
.score-picker-btn.selected { transform: scale(1.1); }
.score-picker-btn.selected.eagle { background: var(--eagle); color: #fff; border-color: var(--eagle); }
.score-picker-btn.selected.birdie { background: var(--birdie); color: #fff; border-color: var(--birdie); }
.score-picker-btn.selected.par-score { background: var(--gold-primary); color: #fff; border-color: var(--gold-primary); }
.score-picker-btn.selected.bogey { background: var(--loss-dim); color: #fff; border-color: var(--loss-dim); }
.score-picker-btn.selected.double { background: var(--double-plus); color: #fff; border-color: var(--double-plus); }
.score-picker-btn:active { transform: scale(0.92); }

@keyframes birdie-flash { 0% { box-shadow: 0 0 0 0 rgba(34,197,94,0.5); } 100% { box-shadow: 0 0 0 12px rgba(34,197,94,0); } }
@keyframes eagle-flash { 0% { box-shadow: 0 0 0 0 rgba(196,163,90,0.6); } 100% { box-shadow: 0 0 0 16px rgba(196,163,90,0); } }
.score-picker-btn.flash-birdie { animation: birdie-flash 0.5s ease-out; }
.score-picker-btn.flash-eagle { animation: eagle-flash 0.6s ease-out; }

.game-card .hole-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
}
.game-card .hole-row:last-child { border-bottom: none; }
.game-card .hole-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}
.game-card .hole-dot.won { background: var(--win); }
.game-card .hole-dot.carried { background: #D1D5DB; }
.game-card .hole-dot.lost { background: var(--loss); }

/* Press badge */
.game-card .press-badge {
  font-size: 9px;
  background: var(--gold-primary);
  color: white;
  border-radius: 3px;
  padding: 1px 5px;
  font-weight: 700;
  letter-spacing: 0.3px;
}
.game-card .press-btn {
  font-size: 10px;
  padding: 4px 8px;
  border: 1px solid var(--gold-primary);
  border-radius: 6px;
  background: rgba(196,163,90,0.08);
  color: var(--gold-primary);
  cursor: pointer;
  white-space: nowrap;
  font-weight: 600;
  min-height: 32px;
}
.game-card .press-btn:active { background: rgba(196,163,90,0.2); }

/* Section divider inside cards */
.game-card .card-section {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--border);
}
.game-card .card-section-title {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: var(--text-secondary);
  margin-bottom: 6px;
}

/* ── TRADING FLOOR MODE ── */
/* Dark cards for live action — odds, money, scores that POP */
/* Game cards dark variant — Ledger primary container style */
.game-card.dark {
  background: #1B365D;
  border: none;
  color: #FAF9F5;
}
.game-card.dark .game-card-title { color: #FED488; }
.game-card.dark .stat-label { color: rgba(250,249,245,0.5); }
.game-card.dark .stat-value { color: #FAF9F5; }
.game-card.dark .stat-value.gold { color: #FED488; }
.game-card.dark .stat-value.win { color: var(--money-green); }
.game-card.dark .stat-value.loss { color: var(--money-red); }
.game-card.dark .player-name { color: #FAF9F5; }
.game-card.dark .score-cell.winning { color: var(--money-green); }
.game-card.dark .score-cell.losing { color: var(--money-red); }
.game-card.dark .hole-row { border-bottom-color: rgba(250,249,245,0.08); }
.game-card.dark .hole-count { color: rgba(250,249,245,0.4); }

/* Money amounts — always high contrast */
.money-pos { color: var(--money-green); font-family: var(--font-data); font-weight: 800; }
.money-neg { color: var(--money-red); font-family: var(--font-data); font-weight: 800; }
.money-even { color: var(--text-secondary); font-family: var(--font-data); font-weight: 600; }

/* Betting slip — Ledger style */
.bet-slip {
  background: #1B365D;
  border: none;
  border-radius: 16px;
  padding: 14px 16px;
  margin-bottom: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15), inset 0 1px 0 rgba(255,255,255,0.03);
  cursor: pointer;
  transition: transform 0.1s, box-shadow 0.15s;
  -webkit-tap-highlight-color: transparent;
}
.bet-slip:active {
  transform: scale(0.98);
  box-shadow: 0 1px 4px rgba(0,0,0,0.2);
}

/* Ledger — financial precision */
.ledger-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
}
.ledger-row:last-child { border-bottom: none; }
.ledger-amount {
  font-family: var(--font-data);
  font-weight: 800;
  font-size: 16px;
  letter-spacing: -0.02em;
}
.ledger-amount.pos { color: var(--money-green); }
.ledger-amount.neg { color: var(--money-red); }

/* Odds button — DraftKings pressable feel */
.odds-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 12px 8px;
  background: linear-gradient(135deg, #002046, #1B365D);
  border: 1.5px solid rgba(196,163,90,0.2);
  border-radius: 8px;
  color: #FAF8F5;
  cursor: pointer;
  min-height: 56px;
  min-width: 56px;
  transition: all 0.15s;
  -webkit-tap-highlight-color: transparent;
}
.odds-btn:active {
  background: var(--gold-primary);
  color: #002046;
  border-color: var(--gold-primary);
  transform: scale(0.96);
}
.odds-btn .odds-value {
  font-family: var(--font-data);
  font-size: 16px;
  font-weight: 800;
  color: var(--gold-primary);
}
.odds-btn .odds-label {
  font-size: 11px;
  color: rgba(250,248,245,0.5);
  margin-top: 2px;
}

/* Vegas matchup layout */
.game-card .vs-layout {
  display: flex;
  justify-content: space-around;
  text-align: center;
  padding: 8px 0;
}
.game-card .vs-team-label {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: var(--text-secondary);
  margin-bottom: 4px;
}
.game-card .vs-team-names {
  font-size: 12px;
  color: var(--text-secondary);
  margin-bottom: 4px;
}
.game-card .vs-score {
  font-size: 36px;
  font-weight: 800;
  font-family: var(--font-data);
}
.game-card .vs-divider {
  font-size: 14px;
  color: var(--text-tertiary);
  align-self: center;
  font-weight: 600;
}

/* Light leaderboard card */
.mg-lb-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px 16px;
  margin-bottom: 8px;
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.mg-lb-card.leader {
  border: 1.5px solid var(--gold-primary);
}

/* Flight grid */
.mg-flight-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.mg-flight-card {
  background: var(--card-bg);
  border-radius: var(--mg-radius);
  box-shadow: var(--shadow-sm);
  padding: 14px;
  border: 1px solid var(--border);
  cursor: pointer;
  transition: box-shadow .12s ease;
  text-decoration: none;
  color: inherit;
  display: block;
  -webkit-tap-highlight-color: transparent;
}
.mg-flight-card:active { box-shadow: 0 2px 8px rgba(0,0,0,0.12); }
.mg-flight-card .flight-name {
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 6px;
}
.mg-flight-card .flight-leader {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.mg-flight-card .flight-pts {
  font-size: 13px;
  font-weight: 700;
  color: var(--gold-primary);
}
.mg-flight-card .flight-status {
  display: flex;
  gap: 4px;
  margin-top: 8px;
}

/* Status dots */
.status-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: #D1D5DB;
}
.status-dot.live {
  background: #B8962E;
  animation: pulse 1.5s ease-in-out infinite;
}
.status-dot.final { background: #16A34A; }

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

@keyframes slideUpSlip {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}

/* Match card */
.mg-match {
  background: var(--card-bg);
  border-radius: var(--mg-radius);
  box-shadow: var(--shadow-sm);
  padding: 12px 14px;
  margin-bottom: 8px;
  border: 1px solid var(--border);
}
.mg-match.live { border-left: 4px solid #B8962E; background: rgba(184,150,46,0.03); }
.mg-match.final { border-left: 4px solid #16A34A; }
.mg-match-round {
  font-size: 10px;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
}
.mg-match-teams {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 4px;
}
.mg-match-team {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-primary);
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.mg-match-team.winner { font-weight: 700; color: var(--mg-green); }
.mg-match-score {
  font-size: 20px;
  font-weight: 800;
  color: var(--text-primary);
  min-width: 50px;
  text-align: center;
  flex-shrink: 0;
}
.mg-match-score.pending { color: #9CA3AF; font-size: 11px; }
.mg-match-live-badge {
  display: inline-block;
  background: #B8962E;
  color: #FFFFFF;
  font-size: 9px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Standings table — scrollable on mobile */
.mg-standings-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 0 -4px;
  padding: 0 4px;
}
.mg-standings {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  min-width: 340px;
}
.mg-standings th {
  text-align: left;
  font-weight: 600;
  color: var(--text-secondary);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 6px 4px;
  border-bottom: 2px solid var(--border);
  white-space: nowrap;
}
.mg-standings th:not(:first-child):not(:nth-child(2)) { text-align: center; }
.mg-standings td {
  padding: 8px 4px;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
  color: var(--text-secondary);
}
.mg-standings td:not(:first-child):not(:nth-child(2)) { text-align: center; }
.mg-standings tr:first-child td { font-weight: 600; color: var(--mg-green); }
.mg-standings .rank-cell { font-weight: 700; color: var(--gold-primary); width: 22px; }

/* Admin */
.mg-admin-pin {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 40px 20px;
}
.mg-admin-pin input {
  font-size: 24px;
  text-align: center;
  width: 160px;
  padding: 12px;
  border: 2px solid var(--mg-border);
  border-radius: var(--mg-radius);
  letter-spacing: 8px;
  background: var(--mg-surface);
  color: var(--mg-text);
}
.mg-admin-pin input:focus { border-color: var(--mg-green); outline: none; }

/* Score entry buttons */
.mg-score-buttons {
  display: flex;
  gap: 4px;
  margin-top: 8px;
}
.mg-score-btn {
  flex: 1;
  min-width: 0;
  min-height: var(--mg-touch-target);
  border: 2px solid var(--mg-border);
  border-radius: 8px;
  background: var(--mg-surface);
  color: var(--mg-text);
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  transition: all .1s;
  padding: 4px 2px;
  -webkit-tap-highlight-color: transparent;
}
.mg-score-btn:active { transform: scale(0.95); }
.mg-score-btn.selected {
  background: var(--mg-gold);
  color: #fff;
  border-color: var(--mg-gold-dim);
}
.mg-score-btn .score-val { font-size: 14px; font-weight: 700; }
.mg-score-btn .score-label { font-size: 8px; color: var(--mg-text-secondary); margin-top: 1px; overflow: hidden; text-overflow: ellipsis; max-width: 100%; white-space: nowrap; }
.mg-score-btn.selected .score-label { color: rgba(255,255,255,0.8); }

/* Admin match entry */
.mg-admin-match {
  background: var(--mg-surface);
  border-radius: var(--mg-radius);
  padding: 12px;
  margin-bottom: 10px;
  border: 1px solid var(--mg-border);
}
.mg-admin-match-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
  gap: 8px;
}
.mg-admin-match-teams {
  font-size: 14px;
  font-weight: 600;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.mg-admin-status {
  font-size: 10px;
  padding: 3px 8px;
  border-radius: 12px;
  font-weight: 600;
  flex-shrink: 0;
}
.mg-admin-status.scheduled { background: var(--bg-tertiary); color: var(--text-secondary); }
.mg-admin-status.live { background: rgba(248,81,73,0.15); color: var(--mg-live); }
.mg-admin-status.final { background: rgba(63,185,80,0.15); color: var(--mg-win); }

/* Betting */
.mg-tabs {
  display: flex;
  background: var(--mg-surface);
  border-radius: var(--mg-radius);
  padding: 4px;
  margin-bottom: 16px;
  box-shadow: var(--mg-shadow);
}
.mg-tab {
  flex: 1;
  min-height: var(--mg-touch-target);
  padding: 10px 6px;
  text-align: center;
  font-size: 13px;
  font-weight: 600;
  color: var(--mg-text-secondary);
  border-radius: 8px;
  cursor: pointer;
  border: none;
  background: transparent;
  transition: all .12s;
  -webkit-tap-highlight-color: transparent;
}
.mg-tab.active {
  background: var(--mg-green);
  color: #fff;
}

.mg-odds-btn {
  background: var(--bg-tertiary);
  border: 2px solid var(--border-strong);
  border-radius: 8px;
  cursor: pointer;
  text-align: center;
  padding: 12px 12px;
  min-width: 56px;
  min-height: var(--mg-touch-target) !important;
  transition: transform .12s ease-out, border-color .15s ease-out, background-color .15s ease-out, box-shadow .15s ease-out;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  position: relative;
  font-family: var(--font-sans);
}
.mg-odds-btn:active {
  transform: scale(0.96);
  background: var(--bg-hover);
}
.mg-odds-btn.odds-pressed {
  transform: scale(0.97);
  background: var(--bg-hover);
  border-color: var(--gold-bright);
  box-shadow: 0 0 0 1px rgba(212, 175, 55, 0.35), 0 8px 16px rgba(0, 0, 0, 0.32);
}
.mg-odds-btn:focus-visible {
  outline: 2px solid var(--gold-bright);
  outline-offset: 2px;
}
.mg-odds-btn:hover {
  border-color: var(--gold-bright);
  background: var(--bg-hover);
}
.mg-odds-btn.selected {
  border-color: var(--gold-bright);
  background: var(--gold-bright);
  border-width: 2px;
  transform: translateY(-1px);
  box-shadow: 0 0 0 1px rgba(212, 175, 55, 0.35), 0 10px 20px rgba(0, 0, 0, 0.35);
}
.mg-odds-btn.selected .odds-line {
  color: var(--green-primary);
}
.mg-odds-btn.selected .odds-label {
  color: var(--green-primary);
}
.mg-odds-btn.selected .odds-pays {
  color: var(--green-primary);
}
.mg-odds-btn.selected::after {
  content: '\2713';
  position: absolute;
  top: 6px;
  right: 6px;
  width: 16px;
  height: 16px;
  border-radius: 999px;
  background: var(--green-primary);
  color: var(--gold-bright);
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 0 1px rgba(212, 175, 55, 0.6);
}
.mg-odds-btn .odds-line {
  font-size: 22px;
  font-weight: 800;
  color: var(--gold-bright);
  font-family: var(--font-sans);
  letter-spacing: 0.5px;
  margin-bottom: 2px;
}
.mg-odds-btn .odds-label {
  font-size: 12px;
  color: var(--text-primary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 600;
  margin-bottom: 4px;
}
.mg-odds-btn .odds-pays {
  font-size: 12px;
  color: var(--text-secondary);
  font-weight: 500;
}

.mg-odds-btn--compact {
  min-height: 56px;
  min-width: 84px;
  padding: 10px 14px;
  line-height: 1;
  font-size: 17px;
  font-weight: 800;
  letter-spacing: 0.2px;
}

.mg-odds-btn--premium-chip {
  background: rgba(212, 175, 55, 0.1);
  border-color: rgba(212, 175, 55, 0.5);
  color: #775A19;
  min-height: 56px;
}
.mg-odds-btn--premium-chip:hover {
  border-color: #775A19;
  background: rgba(212, 175, 55, 0.18);
}
.mg-odds-btn--premium-chip.selected {
  background: #775A19;
  border-color: #775A19;
  color: #002046;
}
.mg-odds-btn--premium-chip.selected .odds-line,
.mg-odds-btn--premium-chip.selected .odds-label,
.mg-odds-btn--premium-chip.selected .odds-pays {
  color: #002046;
}

.mg-bar-match-card {
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid #2D5A3D;
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 12px;
  position: relative;
  overflow: hidden;
}

.mg-bar-match-card.live {
  background: rgba(22, 163, 74, 0.05);
  border-color: #16A34A;
}

.mg-bar-match-meta {
  color: #775A19;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 12px;
}

.mg-bar-matchup {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}

.mg-bar-team-name {
  font-family: var(--font-display);
  font-size: 18px;
  color: #FFFFFF;
  line-height: 1.05;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mg-bar-team-name.right {
  text-align: right;
}

.mg-bar-vs {
  font-size: 10px;
  color: rgba(212, 175, 55, 0.8);
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.mg-bar-odds-grid {
  display: flex;
  gap: 8px;
  justify-content: space-between;
}

.mg-bar-odds-chip {
  flex: 1;
  min-height: 64px;
  border-width: 2px;
  border-color: #2D5A3D;
  background: rgba(212, 175, 55, 0.08);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.mg-bar-odds-chip:hover {
  border-color: #775A19;
  background: rgba(212, 175, 55, 0.18);
}

.mg-bar-odds-chip .odds-label {
  font-family: var(--font-display);
  text-transform: none;
  letter-spacing: 0;
}

.mg-bar-odds-chip.selected {
  background: #775A19;
  border-color: #775A19;
}

.mg-bar-odds-chip.selected .odds-label,
.mg-bar-odds-chip.selected .odds-line,
.mg-bar-odds-chip.selected .odds-pays {
  color: #002046;
}

.mg-premium-player-row {
  background: #002046;
  border: 1px solid rgba(197, 160, 89, 0.15);
  border-radius: 12px;
  padding: 14px;
  margin-bottom: 10px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
  will-change: transform;
}
.mg-premium-player-row.is-favorite {
  border-top: 2px solid #775A19;
}
.mg-premium-player-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.mg-premium-player-left {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  flex: 1;
}
.mg-premium-player-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.4);
  flex-shrink: 0;
}
.mg-premium-player-row.is-favorite .mg-premium-player-dot {
  background: #775A19;
}
.mg-premium-player-name {
  font-size: 16px;
  font-weight: 600;
  color: #FFFFFF;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.mg-premium-hi-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px 9px;
  border-radius: 999px;
  background: rgba(212, 175, 55, 0.15);
  border: 1px solid rgba(212, 175, 55, 0.35);
  font-size: 12px;
  line-height: 1;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: #775A19;
  flex-shrink: 0;
}
.mg-premium-fav-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 5px 9px;
  border-radius: 999px;
  background: #775A19;
  color: #002046;
  font-size: 12px;
  line-height: 1;
  font-weight: 800;
  letter-spacing: 0.08em;
  flex-shrink: 0;
}
.mg-premium-player-money {
  font-family: var(--font-mono);
  font-size: 16px;
  font-weight: 700;
}
.mg-premium-player-skins {
  font-size: 20px;
  font-weight: 700;
  color: #FFFFFF;
  min-width: 24px;
  text-align: right;
}
.mg-premium-player-sub {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 6px;
  padding-left: 18px;
  gap: 10px;
}
.mg-premium-player-sub-left {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.mg-premium-player-to-par {
  font-family: var(--font-mono);
  font-size: 20px;
  font-weight: 800;
}
.mg-premium-player-row.demo-row-hot {
  animation: demoRowHotPulse 0.72s ease-out;
}
.mg-premium-player-row,
.mg-leaderboard-row,
.tv-row {
  transition: transform 0.52s cubic-bezier(0.2, 0.85, 0.2, 1), box-shadow 0.22s ease;
  will-change: transform;
}
.mg-premium-player-row.demo-leaderboard-moving {
  z-index: 2;
}
.mg-premium-player-to-par.demo-score-tick {
  animation: demoScoreTick 0.55s ease-out;
}
.mg-premium-player-meta {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.65);
}
.mg-bet-card.odds-impact {
  animation: oddsImpactPulse 0.78s ease-out;
}

@keyframes demoScoreTick {
  0% { transform: translateY(0) scale(1); opacity: 0.88; }
  45% { transform: translateY(-3px) scale(1.09); opacity: 1; }
  100% { transform: translateY(0) scale(1); opacity: 1; }
}

@keyframes demoRowHotPulse {
  0% { box-shadow: 0 4px 10px rgba(0,0,0,0.3); border-color: rgba(197,160,89,0.15); }
  45% { box-shadow: 0 9px 20px rgba(0,0,0,0.4), 0 0 0 2px rgba(212,175,55,0.22); border-color: rgba(212,175,55,0.58); }
  100% { box-shadow: 0 4px 10px rgba(0,0,0,0.3); border-color: rgba(197,160,89,0.15); }
}

@keyframes oddsImpactPulse {
  0% { transform: scale(1); box-shadow: 0 0 0 rgba(0,0,0,0.3); }
  35% { transform: scale(1.015); box-shadow: 0 0 0 2px rgba(212,175,55,0.2), 0 10px 20px rgba(0,0,0,0.35); }
  100% { transform: scale(1); box-shadow: 0 0 0 rgba(0,0,0,0.3); }
}

/* Enhanced tap feedback for DraftKings-style interaction */
.mg-odds-btn:hover:not(:active) {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}

.mg-odds-btn:active {
  transform: scale(0.96) translateY(0px);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* Pulse animation for odds that have just updated */
@keyframes odds-pulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.05); }
  100% { transform: scale(1); }
}

.mg-odds-btn.odds-updated {
  animation: odds-pulse 0.3s ease-out;
}

/* Heritage betting animations */
@keyframes pulse {
  0% { opacity: 1; }
  50% { opacity: 0.5; }
  100% { opacity: 1; }
}

@keyframes shimmer {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

/* Heritage betting enhancements */
.heritage-betting-header {
  position: relative;
}

.heritage-betting-header::before {
  content: '';
  position: absolute;
  top: -2px;
  left: -2px;
  right: -2px;
  bottom: -2px;
  background: linear-gradient(45deg, #775A19, #002046, #775A19);
  border-radius: 14px;
  z-index: -1;
  opacity: 0.6;
}

.heritage-odds-chip:hover .odds-line {
  text-shadow: 0 0 8px currentColor;
}

.heritage-odds-chip:active {
  transform: scale(0.97) translateY(1px);
}

/* Enhanced haptic feedback styling */
.heritage-odds-chip.bet-placed {
  animation: bet-confirm 0.5s ease-out;
}

@keyframes bet-confirm {
  0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(212, 175, 55, 0.7); }
  25% { transform: scale(1.05); box-shadow: 0 0 0 8px rgba(212, 175, 55, 0.4); }
  50% { transform: scale(1.02); box-shadow: 0 0 0 16px rgba(212, 175, 55, 0.2); }
  100% { transform: scale(1); box-shadow: 0 0 0 24px rgba(212, 175, 55, 0); }
}

/* Bet placed ceremony animations */
.bet-placed {
  animation: bet-ceremony 0.6s ease-out !important;
}

@keyframes bet-ceremony {
  0% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(212, 175, 55, 0.8);
    background: var(--gold-bright);
  }
  30% {
    transform: scale(1.08);
    box-shadow: 0 0 0 12px rgba(212, 175, 55, 0.5);
  }
  60% {
    transform: scale(1.02);
    box-shadow: 0 0 0 20px rgba(212, 175, 55, 0.2);
  }
  100% {
    transform: scale(1);
    box-shadow: 0 0 0 28px rgba(212, 175, 55, 0);
    background: var(--gold-primary);
  }
}

/* Ticket stamp animation */
@keyframes ticket-stamp {
  0% {
    opacity: 0;
    transform: scale(0.3) rotate(-15deg);
  }
  30% {
    opacity: 1;
    transform: scale(1.2) rotate(-5deg);
  }
  60% {
    opacity: 1;
    transform: scale(0.95) rotate(-2deg);
  }
  100% {
    opacity: 1;
    transform: scale(1) rotate(0deg);
  }
}

.ticket-stamp {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 9999;
  background: var(--gold-bright);
  color: var(--green-primary);
  padding: 12px 24px;
  border-radius: 8px;
  border: 3px solid var(--green-primary);
  font-weight: 800;
  font-size: 18px;
  letter-spacing: 1px;
  text-align: center;
  box-shadow: 0 4px 20px rgba(0,0,0,0.3);
  animation: ticket-stamp 0.8s ease-out;
  pointer-events: none;
}

.ticket-stamp::before {
  content: "🎫";
  display: block;
  font-size: 24px;
  margin-bottom: 4px;
}

/* Bet tally counter */
.bet-tally-counter {
  position: fixed;
  top: 20px;
  right: 20px;
  background: var(--green-primary);
  color: var(--gold-bright);
  border: 2px solid var(--gold-primary);
  border-radius: 12px;
  padding: 8px 16px;
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 14px;
  z-index: 1000;
  box-shadow: 0 2px 10px rgba(0,0,0,0.2);
  transition: transform 0.3s ease;
}

.bet-tally-counter.animate {
  animation: tally-increment 0.6s ease-out;
}

@keyframes tally-increment {
  0% {
    transform: scale(1);
    background: var(--green-primary);
  }
  50% {
    transform: scale(1.15);
    background: var(--gold-bright);
    color: var(--green-primary);
  }
  100% {
    transform: scale(1);
    background: var(--green-primary);
    color: var(--gold-bright);
  }
}

/* Enhanced selected state with glow effect */
.mg-odds-btn.selected {
  box-shadow: 0 0 0 2px var(--gold-bright), 0 4px 16px rgba(212, 175, 55, 0.3);
}

/* Kill casino pill backgrounds on fav/dog indicators */
.odds-fav, .odds-dog {
  background: none;
  padding: 0;
  border-radius: 0;
}
.odds-fav { color: var(--text-primary); font-weight: 700; }
.odds-dog { color: var(--text-secondary); font-weight: 600; }

/* Bet slip */
.mg-betslip {
  position: fixed;
  bottom: 0;
  left: 0; right: 0;
  background: var(--bg-secondary);
  border-top: 2px solid var(--gold-bright);
  box-shadow: 0 -10px 24px rgba(0,0,0,0.3);
  max-height: 50vh;
  max-height: 50dvh;
  overflow-y: auto;
  z-index: 90;
  max-width: 480px;
  margin: 0 auto;
  border-radius: 12px 12px 0 0;
  padding-bottom: calc(var(--safe-bottom) + 6px);
  color: var(--text-primary);
  transform: translateY(100%);
  transition: transform .15s ease;
}
.mg-betslip.open {
  transform: translateY(0);
  animation: slideUpSlip 0.24s ease-out;
}
.mg-betslip-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-strong);
  position: sticky;
  top: 0;
  background: var(--bg-secondary);
  z-index: 1;
}
.mg-betslip-header h3 {
  font-family: var(--font-sans);
  font-size: 16px;
  color: var(--gold-bright);
}
.mg-betslip-content { padding: 16px; }
.mg-betslip-item {
  margin-bottom: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}
.mg-betslip-item:last-child { border-bottom: none; margin-bottom: 0; padding-bottom: 0; }
.mg-betslip .text-muted { color: var(--text-secondary); }
.mg-betslip .mg-slip-total { color: var(--gold-bright); }
.mg-betslip .mg-btn-primary {
  background: var(--gold-bright);
  color: var(--green-primary);
}
.mg-betslip-remove {
  font-size: 22px;
  color: var(--gold-bright);
  cursor: pointer;
  background: none;
  border: none;
  padding: 8px;
  min-width: 44px;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.mg-stake-input {
  width: 100%;
  padding: 10px 12px;
  border: 2px solid var(--border-strong);
  border-radius: 8px;
  font-size: 16px;
  font-weight: 600;
  text-align: right;
  background: var(--bg-tertiary);
  color: var(--text-primary);
  /* Prevent iOS zoom on focus */
  font-size: max(16px, 1em);
}
.mg-stake-input:focus { border-color: var(--gold-bright); outline: none; }

.mg-payout {
  font-size: 14px;
  font-weight: 600;
  color: #16A34A;
  text-align: right;
  margin-top: 4px;
}

/* Buttons */
.mg-btn {
  width: 100%;
  min-height: var(--mg-touch-target);
  padding: 14px;
  border: none;
  border-radius: var(--mg-radius);
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: all .1s;
  -webkit-tap-highlight-color: transparent;
}
.mg-btn:active { transform: scale(0.98); transition: transform .08s; }
.mg-btn-primary {
  background: var(--mg-green);
  color: #fff;
}
.mg-btn-gold {
  background: var(--mg-gold);
  color: #fff;
}
.mg-btn-danger {
  background: var(--mg-live);
  color: #fff;
}
.mg-btn-outline {
  background: transparent;
  border: 2px solid var(--mg-green);
  color: var(--mg-green);
}
.mg-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

/* My Bets */
.mg-bet-card {
  background: var(--mg-surface);
  border-radius: var(--mg-radius);
  box-shadow: var(--mg-shadow);
  padding: 14px 16px;
  margin-bottom: 10px;
  border: 1px solid var(--mg-border);
}
.mg-bet-type {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--mg-text-secondary);
}
.mg-bet-desc {
  font-size: 14px;
  font-weight: 600;
  margin: 4px 0;
}
.mg-bet-details {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 4px;
  font-size: 13px;
  color: var(--mg-text-secondary);
}
.mg-bet-result {
  font-weight: 700;
  font-size: 14px;
}
.mg-bet-result.win { color: var(--mg-win); }
.mg-bet-result.loss { color: var(--mg-loss); }
.mg-bet-result.push { color: var(--mg-text-secondary); }
.mg-bet-result.voided { color: var(--mg-text-muted); font-style: italic; }

/* Balance bar */
.mg-balance {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 16px;
  background: var(--mg-surface);
  border-radius: var(--mg-radius);
  box-shadow: var(--mg-shadow);
  margin-bottom: 16px;
  border: 1px solid var(--mg-border);
}
.mg-balance-label {
  font-size: 12px;
  color: var(--mg-text-secondary);
  font-weight: 500;
}
.mg-balance-amount {
  font-size: 22px;
  font-weight: 800;
  color: var(--mg-green);
}

/* Section headers */
.mg-section-title {
  font-family: 'Noto Serif', Georgia, serif;
  font-size: 20px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 16px;
  text-wrap: balance;
}

/* Hot matches ticker */
.mg-ticker {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding: 2px 0 12px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.mg-ticker::-webkit-scrollbar { display: none; }
.mg-ticker-item {
  flex-shrink: 0;
  background: #FFFFFF;
  border-radius: var(--mg-radius);
  padding: 10px 14px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
  border: 1px solid #E5E0D8;
  min-width: 200px;
  cursor: pointer;
  color: #1A1A1A;
}
.mg-ticker-item.live { border-top: 2px solid #B8962E; }

/* Announcements */
.mg-announcement {
  background: #FFFFFF;
  color: #374151;
  border-radius: var(--mg-radius);
  padding: 16px 18px;
  margin-bottom: 16px;
  border: 1px solid #E5E0D8;
  border-left: 3px solid #B8962E;
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}
.mg-announcement p {
  font-size: 14px;
  font-weight: 500;
}

/* Toast */
.mg-toast {
  position: fixed;
  top: 80px;
  left: 50%;
  transform: translateX(-50%) translateY(-20px);
  background: var(--bg-tertiary);
  color: var(--text-primary);
  border: 1px solid var(--border);
  padding: 10px 20px;
  border-radius: var(--mg-radius);
  font-size: 13px;
  font-weight: 700;
  z-index: 200;
  opacity: 0;
  transition: all .15s;
  box-shadow: var(--shadow-md);
  max-width: 90%;
  text-align: center;
  pointer-events: none;
}
.mg-toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* Team detail */
.mg-team-header {
  text-align: center;
  padding: 20px 12px;
}
.mg-team-names {
  font-family: var(--font-sans);
  font-size: 20px;
  font-weight: 700;
  color: #1A1A1A;
  word-break: break-word;
}
.mg-team-handicaps {
  font-size: 13px;
  color: #6B7280;
  margin-top: 4px;
}
.mg-house-badge {
  display: inline-block;
  background: linear-gradient(135deg, var(--mg-gold), var(--mg-gold-dim));
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 12px;
  margin-top: 8px;
  letter-spacing: 0.5px;
}

/* Calcutta */
.mg-calcutta-input {
  display: flex;
  gap: 8px;
  margin-top: 8px;
}
.mg-calcutta-input input {
  flex: 1;
  padding: 8px 10px;
  border: 2px solid var(--mg-border);
  border-radius: 8px;
  font-size: 16px;
}
.mg-calcutta-input input:focus { border-color: var(--mg-green); outline: none; }

/* Round selector — wraps on mobile for 8 flights */
.mg-round-selector {
  display: flex;
  gap: 4px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}
.mg-round-btn {
  flex: 1 1 auto;
  min-width: 0;
  min-height: var(--mg-touch-target);
  padding: 7px 2px;
  border: 2px solid var(--mg-border);
  border-radius: 8px;
  background: var(--mg-surface);
  font-size: 11px;
  font-weight: 600;
  color: var(--mg-text-secondary);
  cursor: pointer;
  text-align: center;
  -webkit-tap-highlight-color: transparent;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.mg-round-btn.active {
  border-color: var(--green-primary);
  color: var(--green-bright);
  background: var(--green-muted);
}

/* Shootout */
.mg-shootout-hole {
  background: var(--mg-surface);
  border-radius: var(--mg-radius);
  padding: 14px;
  margin-bottom: 10px;
  border: 1px solid var(--mg-border);
}
.mg-eliminated {
  opacity: 0.4;
  text-decoration: line-through;
}

/* Text inputs — prevent iOS zoom */
input[type="text"],
input[type="tel"],
input[type="number"] {
  font-size: max(16px, 1em);
}

input[type="text"],
input[type="tel"],
input[type="number"],
textarea,
select {
  background: var(--card-bg);
  color: var(--text-primary);
  border-color: var(--border);
}
input::placeholder,
textarea::placeholder {
  color: var(--text-secondary);
}

/* Utility */
.text-center { text-align: center; }
.text-muted { color: var(--mg-text-secondary); }
.text-sm { font-size: 13px; }
.text-xs { font-size: 11px; }
.mt-2 { margin-top: 8px; }
.mt-4 { margin-top: 16px; }
.mb-2 { margin-bottom: 8px; }
.mb-4 { margin-bottom: 16px; }
.flex { display: flex; }
.flex-between { display: flex; justify-content: space-between; align-items: center; }
.gap-2 { gap: 8px; }
.fw-bold { font-weight: 700; }
.hidden { display: none !important; }

/* Fix for nested .mg-content padding doubling */
.mg-content .mg-content { padding: 0; }

/* #5: Loading skeleton */
.skeleton-pulse {
  background: linear-gradient(90deg, var(--bg-tertiary) 25%, var(--bg-hover) 50%, var(--bg-tertiary) 75%);
  background-size: 200% 100%;
  animation: skeleton-shimmer 1.5s infinite;
  border-radius: var(--mg-radius);
}
@keyframes skeleton-shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* #13: Quick-bet preset buttons */
.mg-preset-amounts {
  display: flex;
  gap: 6px;
  margin-top: 6px;
}
.mg-preset-btn {
  flex: 1;
  min-height: var(--mg-touch-target);
  padding: 6px 4px;
  border: 1px solid var(--mg-border);
  border-radius: 6px;
  background: var(--mg-odds-bg);
  font-size: 12px;
  font-weight: 600;
  color: var(--mg-text-secondary);
  cursor: pointer;
  text-align: center;
  -webkit-tap-highlight-color: transparent;
}
.mg-preset-btn:active, .mg-preset-btn.active { background: var(--mg-gold); color: #fff; border-color: var(--mg-gold-dim); }

/* ─── Scenario / What-If ──────────────────────────────── */
.mg-scenario-flights {
  display: flex;
  gap: 6px;
  margin-bottom: 12px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 2px;
}
.mg-scenario-flight-btn {
  min-height: var(--mg-touch-target);
  padding: 6px 14px;
  border: 1px solid var(--mg-border);
  border-radius: 20px;
  background: var(--mg-surface);
  font-size: 11px;
  font-weight: 600;
  color: var(--mg-text-secondary);
  cursor: pointer;
  white-space: nowrap;
  transition: all .12s;
  -webkit-tap-highlight-color: transparent;
}
.mg-scenario-flight-btn.active {
  background: var(--mg-green);
  color: #fff;
  border-color: var(--mg-green);
}
.mg-scenario-layout {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
@media (min-width: 768px) {
  .mg-scenario-layout {
    flex-direction: row;
  }
  .mg-scenario-sim { flex: 0 0 40%; }
  .mg-scenario-standings { flex: 1; }
}
.mg-score-btn {
  width: var(--mg-touch-target);
  height: var(--mg-touch-target);
  min-width: var(--mg-touch-target);
  min-height: var(--mg-touch-target);
  border-radius: 6px;
  border: 1px solid var(--mg-border);
  background: var(--mg-surface);
  font-size: 12px;
  font-weight: 700;
  color: var(--mg-text);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s;
  -webkit-tap-highlight-color: transparent;
}
.mg-score-btn:hover {
  background: var(--mg-gold);
  color: #fff;
  border-color: var(--mg-gold);
}
.mg-score-btn.selected {
  background: var(--mg-gold);
  color: var(--mg-green);
  border-color: var(--mg-gold);
  font-weight: 800;
}
.mg-scenario-match.simulated {
  border-left: 3px solid var(--mg-gold) !important;
  background: rgba(212,175,55,0.04);
}

body.dark-mode .mg-header,
:root.dark-mode .mg-header {
  background: #002046;
}
body.dark-mode .mg-nav,
:root.dark-mode .mg-nav {
  background: #002046;
  border-top-color: rgba(196,163,90,0.15);
}
body.dark-mode .mg-content,
:root.dark-mode .mg-content {
  color: var(--text-primary);
}

/* ─── ACTIVITY FEED ──────────────────────────────────── */
.feed-section {
  margin-top: 16px;
}
.feed-list {
  max-height: 300px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
.feed-item {
  display: flex;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--mg-border);
  align-items: baseline;
}
.feed-item:last-child { border-bottom: none; }
.feed-avatar {
  display: none;  /* Hide circle avatars — ticker style */
}
.feed-item.auto .feed-avatar {
  display: none;
}
.feed-item.auto {
  padding-left: 12px;
  border-left: 2px solid var(--mg-gold);
  background: none;
  border-radius: 0;
  margin: 0;
}
.feed-body {
  flex: 1;
  min-width: 0;
}
.feed-text {
  font-size: 14px;
  font-weight: 400;
  color: var(--mg-text);
  line-height: 1.5;
  font-family: 'Inter', -apple-system, sans-serif;
}
.feed-text strong {
  font-weight: 600;
}
.feed-time {
  font-size: 11px;
  color: var(--mg-text-muted);
  font-family: 'SF Mono', monospace;
  white-space: nowrap;
  min-width: 52px;
}
.feed-emoji {
  font-size: 20px;
  flex-shrink: 0;
}
.feed-input-bar {
  display: flex;
  gap: 6px;
  padding: 10px 0;
  align-items: center;
}
.feed-input {
  flex: 1;
  padding: 10px 14px;
  border: 2px solid var(--mg-border);
  border-radius: 20px;
  font-size: 14px;
  background: var(--mg-surface);
  color: var(--mg-text);
  outline: none;
}
.feed-input:focus { border-color: var(--mg-green); }
.feed-input::placeholder { color: var(--mg-text-muted); }
.feed-send-btn {
  width: var(--mg-touch-target);
  height: var(--mg-touch-target);
  border-radius: 50%;
  background: var(--mg-green);
  color: #fff;
  border: none;
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  -webkit-tap-highlight-color: transparent;
}
.feed-send-btn:active { transform: scale(0.9); }
.feed-emoji-bar {
  display: flex;
  gap: 4px;
  padding: 4px 0;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.feed-emoji-btn {
  width: var(--mg-touch-target);
  height: var(--mg-touch-target);
  border-radius: 12px;
  border: 1px solid var(--mg-border);
  background: var(--mg-surface);
  font-size: 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  -webkit-tap-highlight-color: transparent;
  transition: all 0.15s;
}
.feed-emoji-btn:hover { background: var(--mg-odds-bg); border-color: var(--mg-gold); }
.feed-emoji-btn:active { background: rgba(212,175,55,0.1); transform: scale(0.9); }

/* ─── CONNECTIVITY INDICATOR ─────────────────────────── */
.sync-indicator {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 10px;
  font-weight: 600;
  color: var(--mg-text-muted);
}
.sync-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--mg-win);
  animation: pulse 1.5s ease-in-out infinite;
}
.sync-dot.pending {
  background: #F59E0B;
  animation: pulse 1s ease-in-out infinite;
}
.sync-dot.offline {
  background: var(--mg-loss);
  animation: none;
}

/* ─── DISPUTE RESOLUTION ─────────────────────────────── */
.dispute-banner {
  background: var(--bg-tertiary);
  border: 2px solid #F59E0B;
  border-radius: var(--mg-radius);
  padding: 14px 16px;
  margin-bottom: 12px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
}
.dispute-icon {
  font-size: 20px;
  flex-shrink: 0;
  line-height: 1;
}
.dispute-body {
  flex: 1;
  min-width: 0;
}
.dispute-title {
  font-size: 13px;
  font-weight: 700;
  color: #92400E;
}
.dispute-desc {
  font-size: 12px;
  color: #78350F;
  margin-top: 2px;
}
.dispute-actions {
  display: flex;
  gap: 8px;
  margin-top: 8px;
}
.dispute-btn {
  min-height: var(--mg-touch-target);
  padding: 8px 16px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  border: none;
  -webkit-tap-highlight-color: transparent;
}
.dispute-btn.accept {
  background: var(--mg-green);
  color: #fff;
}
.dispute-btn.override {
  background: var(--mg-surface);
  border: 2px solid var(--mg-border);
  color: var(--mg-text);
}

/* ─── COUNTRY CLUB POLISH ───────────────────────────── */

/* Gold section divider — use between major sections */
.mg-section-divider,
hr.mg-divider {
  border: none;
  border-top: 1px solid var(--mg-gold-accent);
  margin: 20px 0;
}

/* Settlement payment amounts — huge and bold */
.settlement-amount,
.mg-payment-amount {
  font-size: 32px;
  font-weight: 800;
  letter-spacing: -0.5px;
}

/* Venmo/CashApp buttons — subtle depth */
.mg-payment-btn,
.venmo-btn,
.cashapp-btn {
  box-shadow: 0 2px 6px rgba(0,0,0,0.08);
  transition: box-shadow 0.15s, transform 0.15s;
}
.mg-payment-btn:active,
.venmo-btn:active,
.cashapp-btn:active {
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
  transform: scale(0.98);
}

/* Powered by footer — gold accent line above */
.mg-footer,
.powered-by {
  border-top: 1px solid var(--mg-gold);
  padding-top: 12px;
  margin-top: 16px;
}

/* Scorecard birdie circles — larger */
.birdie,
.score-birdie {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 2px solid var(--mg-green);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
}

/* Eagle double-circle — gold premium look */
.eagle,
.score-eagle {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 2px solid var(--mg-gold);
  box-shadow: 0 0 0 2px var(--mg-surface), 0 0 0 4px var(--mg-gold);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  color: var(--mg-gold-dim);
}

/* Scorecard even-column subtle tint for visual rhythm */
.scorecard th:nth-child(even),
.scorecard td:nth-child(even) {
  background: rgba(240,246,252,0.02);
}

/* Bet result amounts — prominent */
.mg-bet-result {
  font-weight: 800;
  font-size: 15px;
}

/* Match card padding bump */
.mg-match {
  padding: 14px 16px;
  margin-bottom: 10px;
}

/* Admin match entry cards — breathing room */
.mg-admin-match {
  padding: 14px;
  margin-bottom: 12px;
}

/* ─── AUTO-PRESS INDICATOR ───────────────────────────── */
.auto-press-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: var(--mg-loss);
  font-size: 10px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 12px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}
.auto-press-badge::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--mg-loss);
  animation: pulse 1s ease-in-out infinite;
}

/* ─── INLINE LEDGER UPDATES ──────────────────────────── */
/* Replaces floating toasts — ink-drying-on-paper feel */
@keyframes ledgerFadeIn {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes ledgerFadeOut {
  from { opacity: 1; }
  to { opacity: 0; }
}
.ledger-update {
  font-size: 12px;
  font-weight: 600;
  color: var(--mg-win);
  padding: 4px 0;
  animation: ledgerFadeIn .2s ease-out, ledgerFadeOut .3s ease-in 2.5s forwards;
  font-family: 'SF Mono', 'Menlo', monospace;
  letter-spacing: .02em;
}
.ledger-update.loss {
  color: var(--mg-loss);
}
.ledger-update.neutral {
  color: var(--mg-text-muted);
}

/* ─── 3-PLAYER 9s ────────────────────────────────────── */
.nines-points {
  font-family: 'SF Mono', 'Menlo', monospace;
  font-size: 16px;
  font-weight: 800;
  color: var(--mg-gold);
}

/* ─── SCRAMBLE LEADERBOARD ───────────────────────────── */
.scramble-position {
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 700;
  color: var(--mg-text-muted);
  min-width: 24px;
}
.scramble-position:first-child {
  color: var(--mg-gold);
}
.scramble-total {
  font-family: 'SF Mono', 'Menlo', monospace;
  font-size: 16px;
  font-weight: 800;
}
.scramble-whatif {
  font-size: 11px;
  color: var(--mg-gold-dim);
  font-style: italic;
}

/* ─── BOARD CARDS — Progressive Disclosure ────────── */
.board-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  margin-bottom: 10px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: border-color 0.15s ease;
}
.board-card-header {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  background: none;
  border: none;
  cursor: pointer;
  text-align: left;
  -webkit-tap-highlight-color: transparent;
}
.board-card-title {
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: var(--text-sm);
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: var(--text-secondary);
  min-width: 60px;
  flex-shrink: 0;
}
.board-card-summary {
  flex: 1;
  font-size: 13px;
  font-weight: 600;
  color: var(--mg-text);
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
.board-card-chev {
  flex-shrink: 0;
  color: var(--mg-text-muted);
  transition: transform .15s ease;
}
.board-card.open .board-card-chev {
  transform: rotate(180deg);
}
.board-card-body {
  display: none;
  padding: 8px 12px;
  border-top: 1px solid var(--mg-border);
}
.board-card.open .board-card-body {
  display: block;
}

/* Score FAB */
.score-fab {
  position: fixed;
  bottom: calc(var(--mg-nav-height) + var(--safe-bottom) + 16px);
  right: 16px;
  z-index: 90;
  background: var(--gold-primary);
  color: var(--bg-primary);
  border: none;
  border-radius: 28px;
  padding: 14px 20px;
  font-size: 14px;
  font-weight: 700;
  box-shadow: 0 4px 20px rgba(212,160,23,.4), 0 2px 8px rgba(0,0,0,.3);
  cursor: pointer;
  display: flex;
  align-items: center;
  min-width: 56px;
  min-height: 56px;
  gap: 8px;
  -webkit-tap-highlight-color: transparent;
  letter-spacing: .02em;
}
.score-fab:active {
  transform: scale(0.95);
}

/* Board card open state */
.board-card.open {
  border-color: var(--border-strong);
}

/* Board card title when open — gold instead of muted */
.board-card.open .board-card-title {
  color: var(--mg-gold-dim);
}

/* Action bar responsive */
@media (max-width: 375px) {
  .score-fab {
    right: 10px;
    padding: 12px 16px;
    font-size: 13px;
  }
}

/* Leader highlight in standings */
.board-standings-leader {
  border-left: 3px solid var(--gold-primary);
  background: rgba(212,160,23,.06);
}

/* Red Zone pulse for close finishes */
@keyframes redZonePulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(212,175,55,0); }
  50% { box-shadow: 0 0 20px 4px rgba(212,175,55,.3); }
}

/* ─── INLINE SCORE CARD ────────── */
.inline-score-card {
  background: var(--bg-secondary);
  border: 1.5px solid var(--mg-gold);
  border-radius: var(--radius-md);
  padding: 12px;
  margin-bottom: 10px;
}
.inline-score-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}
.inline-score-hole {
  font-family: var(--font-sans);
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
}
.inline-score-nav {
  display: flex;
  gap: 8px;
}
.inline-score-nav button {
  width: var(--mg-touch-target);
  height: var(--mg-touch-target);
  min-width: var(--mg-touch-target);
  min-height: var(--mg-touch-target);
  border-radius: 50%;
  border: 1.5px solid var(--mg-border);
  background: transparent;
  color: var(--mg-text);
  font-size: 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.inline-score-nav button:active {
  background: var(--mg-gold);
  color: var(--mg-green);
  border-color: var(--mg-gold);
}

/* Sprint 3: enforce Waggle touch target minimum for mobile inline score inputs */
@media (max-width: 768px) {
  [data-inline-score-input="1"] {
    width: 56px !important;
    height: 56px !important;
    min-width: 56px !important;
    min-height: 56px !important;
    font-size: 16px !important;
    touch-action: manipulation;
  }
}

.mg-inline-score-pill {
  width: 64px;
  height: 64px;
  min-width: 56px;
  min-height: 56px;
  border-radius: 50%;
  border: 3px solid #D1D5DB;
  background: #F8F8F1;
  color: #1A1A1A;
  font-family: var(--font-sans);
  font-size: 18px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
  transition: transform 0.14s ease, box-shadow 0.18s ease, filter 0.18s ease;
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

.mg-inline-score-pill__value {
  font-size: 20px;
  font-weight: 800;
  line-height: 1;
}

.mg-inline-score-pill__label {
  font-size: 8px;
  font-weight: 700;
  text-transform: uppercase;
  line-height: 1;
  letter-spacing: 0.4px;
}

.mg-inline-score-pill:active {
  transform: scale(0.94);
}

.mg-inline-score-pill.selected {
  transform: translateY(-1px);
  box-shadow: 0 0 0 2px rgba(13, 40, 24, 0.7), 0 6px 14px rgba(0,0,0,0.35);
}

.mg-inline-score-pill--eagle {
  background: #775A19;
  border-color: #775A19;
  color: #002046;
  box-shadow: 0 2px 8px rgba(0,0,0,0.3), 0 0 0 1px rgba(197,160,89,0.55), 0 0 12px rgba(212,175,55,0.28);
}

.mg-inline-score-pill--birdie {
  background: #16A34A;
  border-color: #16A34A;
  color: #FFFFFF;
}

.mg-inline-score-pill--par {
  background: #F8F8F1;
  border-color: #D9D4C5;
  color: #1A1A1A;
}

.mg-inline-score-pill--bogey {
  background: rgba(220,38,38,0.10);
  border-color: rgba(220,38,38,0.45);
  color: #DC2626;
}

.mg-inline-score-pill--double {
  background: rgba(153,27,27,0.18);
  border-color: rgba(127,29,29,0.75);
  color: #7F1D1D;
}

.mg-inline-score-pill--other {
  width: 56px;
  height: 56px;
  min-width: 56px;
  min-height: 56px;
  border-radius: 12px;
  border-color: #D1D5DB;
  background: #F3F4F6;
  color: #6B7280;
  font-size: 22px;
  font-weight: 700;
  font-family: var(--font-sans);
}

.mg-inline-score-pill--other.selected {
  background: #775A19;
  border-color: #775A19;
  color: #002046;
}

.score-btn {
  flex: 1;
  min-height: var(--mg-touch-target);
  border-radius: 6px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  border: 1.5px solid var(--mg-border);
  background: transparent;
  color: var(--mg-text);
  font-family: 'SF Mono', SFMono-Regular, monospace;
  -webkit-tap-highlight-color: transparent;
  transition: all 0.1s ease;
}
.score-btn.selected {
  border-color: var(--mg-gold);
  background: var(--mg-gold);
  color: var(--bg-primary);
}
.score-btn:active {
  transform: scale(0.95);
}

@keyframes scoreSaved {
  0% { background: rgba(22,163,74,0.15); }
  100% { background: transparent; }
}
.score-saved-flash {
  animation: scoreSaved 0.5s ease-out;
}

/* ─── SCORE NOTIFICATION BANNER ────────── */
.score-notification {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: var(--mg-gold);
  color: var(--bg-primary);
  text-align: center;
  font-size: 13px;
  font-weight: 700;
  padding: 10px;
  z-index: 200;
  transform: translateY(-100%);
  transition: transform 0.3s ease;
}
.score-notification.show {
  transform: translateY(0);
}

/* Data freshness pulse */
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

@keyframes livePulse {
  0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(248,81,73,0.4); }
  50% { opacity: 0.8; box-shadow: 0 0 0 6px rgba(248,81,73,0); }
}

@keyframes tickerBorderPulse {
  0%, 100% { border-left-color: var(--gold-primary, #d4a017); }
  50% { border-left-color: var(--gold-bright, #f0c040); }
}

/* Row flash for data changes */
@keyframes rowFlash {
  0% { background: rgba(212,175,55,0.15); }
  100% { background: transparent; }
}
.board-row-flash {
  animation: rowFlash 1.5s ease-out;
}

/* Press button glow */
@keyframes pressGlow {
  0%, 100% { box-shadow: 0 0 0 0 rgba(212,175,55,0); }
  50% { box-shadow: 0 0 12px 3px rgba(212,175,55,0.3); }
}

/* Ticker slide animation */
@keyframes tickerSlide {
  0% { transform: translateY(100%); opacity: 0; }
  10% { transform: translateY(0); opacity: 1; }
  90% { transform: translateY(0); opacity: 1; }
  100% { transform: translateY(-100%); opacity: 0; }
}
.board-ticker-item {
  animation: tickerSlide 4s ease-in-out;
}

/* Flash out (referenced in app.js) */
@keyframes flashOut {
  from { opacity: 1; }
  to { opacity: 0; }
}

/* ===== TV / SPECTATOR MODE ===== */
body.tv-mode {
  background: #0C0F14;
  overflow: hidden;
  margin: 0;
  padding: 0;
}
body.tv-mode .mg-nav { display: none !important; }
body.tv-mode .mg-header { display: none !important; }
body.tv-mode #app {
  max-width: 100%;
  padding-bottom: 0;
  min-height: 100vh;
}

.tv-container {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  background: #0C0F14;
  color: #fff;
  font-family: 'Inter', -apple-system, sans-serif;
}

.tv-header {
  padding: 24px 40px 16px;
  text-align: center;
  border-bottom: 2px solid var(--gold-primary);
  background: linear-gradient(180deg, #0C0F14 0%, #161B22 100%);
}
.tv-event-name {
  font-family: var(--font-sans);
  font-size: 36px;
  font-weight: 700;
  color: var(--gold-bright);
  letter-spacing: 1px;
}
.tv-event-meta {
  font-size: 16px;
  color: rgba(255,255,255,0.5);
  margin-top: 4px;
  font-weight: 500;
  letter-spacing: 0.5px;
}

.tv-leaderboard {
  flex: 1;
  padding: 8px 40px;
  overflow: hidden;
}

.tv-row {
  display: grid;
  grid-template-columns: 80px 1fr 100px 100px 120px;
  align-items: center;
  padding: 12px 16px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  transition: background 0.3s;
}
.tv-row-header {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: rgba(255,255,255,0.3);
  border-bottom: 1px solid rgba(255,255,255,0.1);
  padding: 16px;
}
.tv-row-leader {
  background: rgba(255,215,0,0.08);
  padding: 18px 16px;
}
.tv-row-top3 {
  background: rgba(255,255,255,0.02);
}

.tv-col-pos { text-align: center; }
.tv-col-team { padding-left: 8px; }
.tv-col-thru { text-align: center; font-family: 'SF Mono', 'Menlo', monospace; font-size: 20px; color: rgba(255,255,255,0.4); }
.tv-col-score { text-align: center; font-family: 'SF Mono', 'Menlo', monospace; font-size: 24px; font-weight: 700; }
.tv-col-topar { text-align: center; font-family: 'SF Mono', 'Menlo', monospace; font-size: 36px; font-weight: 900; }

.tv-pos-badge {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255,255,255,0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: 800;
  color: rgba(255,255,255,0.5);
  margin: 0 auto;
}
.tv-pos-leader {
  background: var(--gold-bright);
  color: #0C0F14;
}

.tv-team-name {
  font-size: 24px;
  font-weight: 600;
  color: #fff;
}
.tv-row-leader .tv-team-name {
  font-size: 28px;
  font-weight: 700;
}
.tv-team-owner {
  font-size: 14px;
  color: rgba(255,215,0,0.5);
  margin-left: 8px;
}

.tv-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 40px;
  border-top: 2px solid var(--gold-primary);
  background: rgba(0,0,0,0.2);
}
.tv-footer-left {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
}
.tv-footer-item {
  font-size: 16px;
  font-weight: 600;
  color: rgba(255,255,255,0.6);
}
.tv-footer-right {
  font-family: var(--font-sans);
  font-size: 20px;
  font-weight: 700;
  color: var(--gold-primary);
}

/* Sponsor ticker */
.tv-sponsor-ticker {
  overflow: hidden;
  padding: 8px 0;
  background: rgba(0,0,0,0.3);
  border-top: 1px solid rgba(255,255,255,0.05);
}
.tv-sponsor-ticker-inner {
  display: flex;
  gap: 48px;
  animation: tvTickerScroll 30s linear infinite;
  white-space: nowrap;
}
.tv-sponsor-item {
  font-size: 14px;
  color: rgba(255,255,255,0.4);
  font-weight: 500;
}
@keyframes tvTickerScroll {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* Responsive: smaller screens still usable */
@media (max-width: 1200px) {
  .tv-event-name { font-size: 28px; }
  .tv-col-topar { font-size: 28px; }
  .tv-col-score { font-size: 20px; }
  .tv-team-name { font-size: 20px; }
  .tv-row-leader .tv-team-name { font-size: 22px; }
  .tv-leaderboard { padding: 8px 20px; }
  .tv-header { padding: 16px 20px 12px; }
  .tv-footer { padding: 12px 20px; }
  .tv-row { grid-template-columns: 60px 1fr 80px 80px 100px; }
}
@media (max-width: 768px) {
  .tv-event-name { font-size: 22px; }
  .tv-col-topar { font-size: 22px; }
  .tv-col-score { font-size: 16px; }
  .tv-col-thru { font-size: 14px; }
  .tv-team-name { font-size: 16px; }
  .tv-row-leader .tv-team-name { font-size: 18px; }
  .tv-row { grid-template-columns: 40px 1fr 60px 60px 80px; padding: 8px 8px; }
  .tv-pos-badge { width: 28px; height: 28px; font-size: 13px; }
}

/* ============================================================
   SETTLEMENT ANIMATIONS — Staggered Reveal & Confetti
   ============================================================ */

/* Settlement player card reveal animations */
@keyframes settlementFlipIn {
  0% {
    opacity: 0.2;
    transform: perspective(900px) rotateY(-88deg) translateY(10px);
  }
  100% {
    opacity: 1;
    transform: perspective(900px) rotateY(0deg) translateY(0);
  }
}

@keyframes settlementWinnerGlow {
  0% {
    box-shadow: 0 0 0 rgba(212,175,55,0);
    background: rgba(26,71,42,0.82);
  }
  50% {
    box-shadow: 0 0 24px rgba(212,175,55,0.42);
    background: linear-gradient(135deg,rgba(212,175,55,0.2),rgba(212,175,55,0.08));
  }
  100% {
    box-shadow: 0 0 12px rgba(212,175,55,0.22);
    background: linear-gradient(135deg,rgba(212,175,55,0.16),rgba(212,175,55,0.07));
  }
}

/* Settlement card animation classes */
.settlement-card-reveal {
  animation: settlementFlipIn 0.72s cubic-bezier(0.2, 0.85, 0.2, 1) forwards;
}

.settlement-winner-card {
  animation: settlementFlipIn 0.72s cubic-bezier(0.2, 0.85, 0.2, 1) forwards,
             settlementWinnerGlow 2s ease-out 0.6s forwards;
}

/* Initial hidden state for staggered reveal */
.settlement-card-hidden {
  opacity: 0.2;
  transform: perspective(900px) rotateY(-88deg) translateY(10px);
}

.settlement-money-value {
  will-change: contents, transform;
  display: inline-block;
  transition: color 0.25s ease, transform 0.25s ease;
}

.settlement-confetti-canvas {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 10010;
}

/* Confetti Celebration System */
.confetti-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 1000;
  overflow: hidden;
}

.confetti-piece {
  position: absolute;
  width: 10px;
  height: 10px;
  border-radius: 2px;
  pointer-events: none;
}

/* Confetti colors matching Waggle design system */
.confetti-gold {
  background: var(--gold-primary);
  box-shadow: 0 0 6px rgba(212,175,55,0.8);
}

.confetti-green {
  background: var(--green-primary);
  box-shadow: 0 0 6px rgba(27,48,34,0.6);
}

.confetti-win {
  background: var(--win);
  box-shadow: 0 0 6px rgba(22,163,74,0.6);
}

.confetti-ivory {
  background: var(--bg-tertiary);
  box-shadow: 0 0 4px rgba(252,249,244,0.8);
}

/* Confetti animation keyframes */
@keyframes confettiFall1 {
  0% {
    transform: translateY(-100vh) rotateZ(0deg) rotateY(0deg);
    opacity: 1;
  }
  100% {
    transform: translateY(100vh) rotateZ(720deg) rotateY(180deg);
    opacity: 0;
  }
}

@keyframes confettiFall2 {
  0% {
    transform: translateY(-100vh) rotateZ(0deg) rotateY(0deg);
    opacity: 1;
  }
  100% {
    transform: translateY(100vh) rotateZ(900deg) rotateY(360deg);
    opacity: 0;
  }
}

@keyframes confettiFall3 {
  0% {
    transform: translateY(-100vh) rotateZ(0deg) rotateY(0deg);
    opacity: 1;
  }
  100% {
    transform: translateY(100vh) rotateZ(540deg) rotateY(270deg);
    opacity: 0;
  }
}

@keyframes confettiFall4 {
  0% {
    transform: translateY(-100vh) rotateZ(0deg) rotateY(0deg);
    opacity: 1;
  }
  100% {
    transform: translateY(100vh) rotateZ(810deg) rotateY(90deg);
    opacity: 0;
  }
}

@keyframes confettiFall5 {
  0% {
    transform: translateY(-100vh) rotateZ(0deg) rotateY(0deg);
    opacity: 1;
  }
  100% {
    transform: translateY(100vh) rotateZ(630deg) rotateY(450deg);
    opacity: 0;
  }
}

/* Confetti animation classes (assigned randomly) */
.confetti-anim-1 { animation: confettiFall1 3s ease-in forwards; }
.confetti-anim-2 { animation: confettiFall2 3.2s ease-in forwards; }
.confetti-anim-3 { animation: confettiFall3 2.8s ease-in forwards; }
.confetti-anim-4 { animation: confettiFall4 3.4s ease-in forwards; }
.confetti-anim-5 { animation: confettiFall5 3.1s ease-in forwards; }

/* Share card screenshot-friendly layout */
#settlement-share-card {
  -webkit-print-color-adjust: exact;
  print-color-adjust: exact;
}

/* Payment pair "sent" visual state */
.pay-pair-sent .pay-amount {
  opacity: 0.4;
  text-decoration: line-through;
}

/* ============================================================
   ODDS MOVEMENT ANIMATIONS — DraftKings-Style Live Updates
   ============================================================ */

/* Odds number slide animations */
@keyframes oddsSlideUp {
  0% {
    transform: translateY(0);
    opacity: 1;
  }
  50% {
    transform: translateY(-20px);
    opacity: 0;
  }
  51% {
    transform: translateY(20px);
    opacity: 0;
  }
  100% {
    transform: translateY(0);
    opacity: 1;
  }
}

@keyframes oddsSlideDown {
  0% {
    transform: translateY(0);
    opacity: 1;
  }
  50% {
    transform: translateY(20px);
    opacity: 0;
  }
  51% {
    transform: translateY(-20px);
    opacity: 0;
  }
  100% {
    transform: translateY(0);
    opacity: 1;
  }
}

/* Background flash animations for odds improvement/deterioration */
@keyframes oddsFlashGreen {
  0% {
    background: #002046;
    border-color: #2D5A3D;
  }
  30% {
    background: rgba(34, 197, 94, 0.2);
    border-color: #22C55E;
    box-shadow: 0 0 16px rgba(34, 197, 94, 0.4);
  }
  100% {
    background: #002046;
    border-color: #2D5A3D;
    box-shadow: none;
  }
}

@keyframes oddsFlashRed {
  0% {
    background: #002046;
    border-color: #2D5A3D;
  }
  30% {
    background: rgba(239, 68, 68, 0.2);
    border-color: #EF4444;
    box-shadow: 0 0 16px rgba(239, 68, 68, 0.4);
  }
  100% {
    background: #002046;
    border-color: #2D5A3D;
    box-shadow: none;
  }
}

/* Arrow indicator animations */
@keyframes arrowFadeIn {
  0% {
    opacity: 0;
    transform: scale(0.8);
  }
  50% {
    opacity: 1;
    transform: scale(1.1);
  }
  100% {
    opacity: 0.8;
    transform: scale(1);
  }
}

/* Odds movement animation classes */
.odds-slide-up .odds-line {
  animation: oddsSlideUp 0.6s ease-out forwards;
}

.odds-slide-down .odds-line {
  animation: oddsSlideDown 0.6s ease-out forwards;
}

.odds-flash-green {
  animation: oddsFlashGreen 1s ease-out forwards;
}

.odds-flash-red {
  animation: oddsFlashRed 1s ease-out forwards;
}

/* Compact odds chips render line text directly on the button. */
@keyframes oddsBtnSlideUp {
  0% { transform: translateY(0); }
  50% { transform: translateY(-3px); }
  100% { transform: translateY(0); }
}

@keyframes oddsBtnSlideDown {
  0% { transform: translateY(0); }
  50% { transform: translateY(3px); }
  100% { transform: translateY(0); }
}

@keyframes oddsBtnFlashGreen {
  0% { box-shadow: 0 0 0 rgba(0,0,0,0); border-color: #2D5A3D; }
  35% { box-shadow: 0 0 0 2px rgba(34,197,94,0.35), 0 0 14px rgba(34,197,94,0.35); border-color: #22C55E; }
  100% { box-shadow: 0 0 0 rgba(0,0,0,0); border-color: #2D5A3D; }
}

@keyframes oddsBtnFlashRed {
  0% { box-shadow: 0 0 0 rgba(0,0,0,0); border-color: #2D5A3D; }
  35% { box-shadow: 0 0 0 2px rgba(239,68,68,0.35), 0 0 14px rgba(239,68,68,0.35); border-color: #EF4444; }
  100% { box-shadow: 0 0 0 rgba(0,0,0,0); border-color: #2D5A3D; }
}

.mg-odds-btn.odds-slide-up {
  animation: oddsBtnSlideUp 0.45s ease-out;
}

.mg-odds-btn.odds-slide-down {
  animation: oddsBtnSlideDown 0.45s ease-out;
}

.mg-odds-btn.odds-flash-green {
  animation: oddsBtnFlashGreen 0.95s ease-out;
}

.mg-odds-btn.odds-flash-red {
  animation: oddsBtnFlashRed 0.95s ease-out;
}

.mg-odds-btn.odds-move-pulse {
  box-shadow: 0 8px 18px rgba(0,0,0,0.34);
}

/* Arrow indicators */
.odds-arrow {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 0;
  height: 0;
  border-left: 6px solid transparent;
  border-right: 6px solid transparent;
  pointer-events: none;
  z-index: 10;
}

.odds-arrow-up {
  border-bottom: 9px solid #22C55E;
  animation: arrowFadeIn 0.8s ease-out forwards;
}

.odds-arrow-down {
  border-top: 9px solid #EF4444;
  animation: arrowFadeIn 0.8s ease-out forwards;
}

/* Smooth transitions for odds buttons */
.mg-odds-btn .odds-line {
  transition: none; /* Override normal transitions during animation */
}

/* Arrow auto-hide after animation */
.odds-arrow.fade-out {
  animation: arrowFadeIn 0.8s ease-out forwards,
             fadeOut 0.3s ease-in 2s forwards;
}

@keyframes fadeOut {
  from { opacity: 0.8; }
  to { opacity: 0; }
}

/* BET-480: DraftKings-style odds affordance polish */
.mg-odds-btn,
.heritage-odds-chip,
.mg-bar-odds-chip {
  min-width: var(--mg-touch-target);
  min-height: var(--mg-touch-target);
  border-radius: 8px;
  touch-action: manipulation;
}

.mg-odds-btn {
  background: #002046;
  border-color: rgba(212, 175, 55, 0.34);
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.3);
  transition: transform 120ms ease-out, border-color 150ms ease-out, background-color 150ms ease-out, box-shadow 150ms ease-out;
}

.mg-odds-btn:hover:not(:active) {
  background: rgba(212, 175, 55, 0.14);
  border-color: #775A19;
  box-shadow: 0 9px 18px rgba(0, 0, 0, 0.32);
  transform: translateY(-1px);
}

.mg-odds-btn:active,
.mg-odds-btn.odds-pressed {
  transform: scale(0.96);
  background: rgba(212, 175, 55, 0.2);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.26);
}

.mg-odds-btn:focus-visible {
  outline: 2px solid #775A19;
  outline-offset: 2px;
}

.mg-odds-btn.selected {
  background: #775A19;
  border-color: #775A19;
  box-shadow: 0 0 0 1px rgba(212, 175, 55, 0.45), 0 10px 22px rgba(0, 0, 0, 0.34);
  transform: translateY(-1px);
}

.mg-odds-btn.selected .odds-line,
.mg-odds-btn.selected .odds-label,
.mg-odds-btn.selected .odds-pays {
  color: #002046;
}

.mg-odds-btn.selected::after {
  background: #002046;
  color: #775A19;
  box-shadow: 0 0 0 1px rgba(13, 40, 24, 0.45);
}

/* BET-553: hard guardrail for mobile odds touch targets. */
.mg-odds-btn,
.mg-odds-btn--compact,
.mg-odds-btn--premium-chip,
.heritage-odds-chip,
.mg-bar-odds-chip {
  min-width: var(--mg-touch-target) !important;
  min-height: var(--mg-touch-target) !important;
  touch-action: manipulation;
}

/* Fixed utility toggle for optional sound effects (muted by default) */
.waggle-sfx-toggle {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 210;
  width: 56px;
  height: 56px;
  border-radius: 12px;
  border: 2px solid rgba(212,175,55,0.55);
  background: rgba(26,71,42,0.9);
  color: #775A19;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.4px;
  line-height: 1.1;
  cursor: pointer;
  box-shadow: 0 8px 18px rgba(0,0,0,0.3);
  font-family: Inter, sans-serif;
  letter-spacing: 0.06em;
}

.waggle-sfx-toggle.is-on {
  background: #775A19;
  color: #002046;
  border-color: #775A19;
}

/* Score Entry UX Animations */
@keyframes scoreFlashEagle {
  0% { background: var(--mg-surface); border-color: var(--mg-border); transform: scale(1); }
  30% { background: #775A19; border-color: #775A19; color: #1C1C19; transform: scale(1.05); }
  100% { background: var(--mg-surface); border-color: var(--mg-border); transform: scale(1); }
}

@keyframes scoreFlashBirdie {
  0% { background: var(--mg-surface); border-color: var(--mg-border); transform: scale(1); }
  30% { background: #16A34A; border-color: #16A34A; color: white; transform: scale(1.05); }
  100% { background: var(--mg-surface); border-color: var(--mg-border); transform: scale(1); }
}

@keyframes scoreFlashPar {
  0% { background: var(--mg-surface); border-color: var(--mg-border); transform: scale(1); }
  30% { background: var(--mg-green); border-color: var(--mg-green); transform: scale(1.02); }
  100% { background: var(--mg-surface); border-color: var(--mg-border); transform: scale(1); }
}

@keyframes scoreFlashBogey {
  0% { background: var(--mg-surface); border-color: var(--mg-border); transform: scale(1); }
  30% { background: #DC2626; border-color: #DC2626; color: white; transform: scale(1.05); }
  100% { background: var(--mg-surface); border-color: var(--mg-border); transform: scale(1); }
}

.score-flash-eagle {
  animation: scoreFlashEagle 0.6s ease-out;
}

.score-flash-birdie {
  animation: scoreFlashBirdie 0.6s ease-out;
}

.score-flash-par {
  animation: scoreFlashPar 0.6s ease-out;
}

.score-flash-bogey {
  animation: scoreFlashBogey 0.6s ease-out;
}
