/* ============================================
   baccarat.global — Design System
   Dark Luxury + Asian Accents
   ============================================ */

:root {
  /* Fonts */
  --font-display: 'Cormorant Garamond', Georgia, serif;
  --font-body: 'Inter', system-ui, sans-serif;

  /* Type Scale */
  --text-xs: clamp(0.75rem, 0.7rem + 0.25vw, 0.875rem);
  --text-sm: clamp(0.875rem, 0.8rem + 0.35vw, 1rem);
  --text-base: clamp(1rem, 0.95rem + 0.25vw, 1.125rem);
  --text-lg: clamp(1.125rem, 1rem + 0.75vw, 1.5rem);
  --text-xl: clamp(1.5rem, 1.2rem + 1.25vw, 2.25rem);
  --text-2xl: clamp(2rem, 1.2rem + 2.5vw, 3.5rem);
  --text-3xl: clamp(2.5rem, 1rem + 4vw, 5rem);
  --text-hero: clamp(3rem, 0.5rem + 7vw, 7rem);

  /* Colors — Dark Luxury Casino */
  --color-bg: #0a0b10;
  --color-surface: #12141c;
  --color-surface-2: #1a1d28;
  --color-surface-3: #222636;
  --color-border: rgba(201,168,76,0.15);
  --color-border-strong: rgba(201,168,76,0.3);
  --color-text: #e8e4dc;
  --color-text-muted: #8a8678;
  --color-text-faint: #5a5850;
  --color-gold: #c9a84c;
  --color-gold-bright: #e4c76b;
  --color-gold-dim: #a08838;
  --color-red: #c41e3a;
  --color-red-bright: #ef4444;
  --color-player: #3b82f6;
  --color-player-bg: rgba(59,130,246,0.12);
  --color-banker: #dc2626;
  --color-banker-bg: rgba(220,38,38,0.12);
  --color-tie: #16a34a;
  --color-tie-bg: rgba(22,163,74,0.12);
  --color-felt: #0d1f15;

  /* Spacing */
  --space-1: 0.25rem; --space-2: 0.5rem; --space-3: 0.75rem;
  --space-4: 1rem; --space-5: 1.25rem; --space-6: 1.5rem;
  --space-8: 2rem; --space-10: 2.5rem; --space-12: 3rem;
  --space-16: 4rem; --space-20: 5rem; --space-24: 6rem;

  /* Radius */
  --radius-sm: 4px; --radius-md: 8px; --radius-lg: 12px; --radius-xl: 16px;

  /* Shadows */
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.3);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.4);
  --shadow-lg: 0 12px 32px rgba(0,0,0,0.5);
  --shadow-gold: 0 0 20px rgba(201,168,76,0.25);
  --shadow-card: 0 4px 16px rgba(0,0,0,0.6), 0 1px 4px rgba(0,0,0,0.4);

  /* Transition */
  --transition: 180ms cubic-bezier(0.16, 1, 0.3, 1);
}

/* ============================================
   LIGHT MODE
   ============================================ */
html.light-mode {
  --color-bg: #f4f2ed;
  --color-surface: #ffffff;
  --color-surface-2: #f0ede6;
  --color-surface-3: #e8e4db;
  --color-border: rgba(120,100,60,0.18);
  --color-border-strong: rgba(120,100,60,0.3);
  --color-text: #1a1814;
  --color-text-muted: #6b6458;
  --color-text-faint: #9c9585;
  --color-gold: #a08030;
  --color-gold-bright: #c9a84c;
  --color-gold-dim: #7a6225;
  --color-felt: #1a3828;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.1);
  --shadow-lg: 0 12px 32px rgba(0,0,0,0.12);
  --shadow-gold: 0 0 20px rgba(160,128,48,0.15);
  --shadow-card: 0 2px 8px rgba(0,0,0,0.15), 0 1px 3px rgba(0,0,0,0.08);
}
html.light-mode .site-header {
  background: rgba(244,242,237,0.94);
  border-bottom-color: rgba(120,100,60,0.15);
}
html.light-mode .hero-bg {
  background: linear-gradient(135deg, #e8e4db 0%, #d4cfc2 50%, #c9c0b0 100%);
}
html.light-mode .hero {
  background: linear-gradient(180deg, #f4f2ed, #e8e4db);
}
html.light-mode .hero-quote {
  color: #7a6a4a;
  text-shadow: none;
}
html.light-mode .game-card {
  background: var(--color-surface);
  border-color: rgba(120,100,60,0.12);
}
html.light-mode .btn-outline {
  border-color: rgba(120,100,60,0.25);
  color: var(--color-text);
}
html.light-mode .btn-outline:hover {
  background: rgba(120,100,60,0.08);
}
html.light-mode .page-play,
html.light-mode .page-home,
html.light-mode .page {
  background: var(--color-bg);
}
html.light-mode .stats-bar {
  background: var(--color-surface);
  border-color: var(--color-border);
}
html.light-mode .bet-zone {
  background: var(--color-surface);
  border-color: var(--color-border);
}
html.light-mode .shoe-stats,
html.light-mode .hand-history {
  background: var(--color-surface);
  border-color: var(--color-border);
}
html.light-mode .card-face {
  background: #fff;
  box-shadow: 0 2px 8px rgba(0,0,0,0.12);
}
html.light-mode .card-face-down {
  background: linear-gradient(135deg, #8B0000, #B22222);
}
html.light-mode .result-banner {
  text-shadow: 0 2px 12px rgba(0,0,0,0.15);
}
html.light-mode .feature-card,
html.light-mode .content-section,
html.light-mode .sim-card,
html.light-mode .trainer-card,
html.light-mode .challenge-card {
  background: var(--color-surface);
  border-color: var(--color-border);
}
html.light-mode .section-title { color: var(--color-text); }
html.light-mode footer {
  background: #e8e4db;
  border-top-color: var(--color-border);
}
html.light-mode .mobile-nav-overlay {
  background: rgba(244,242,237,0.98);
}
html.light-mode .mobile-nav-link {
  color: var(--color-text);
  border-bottom-color: var(--color-border);
}
html.light-mode .nav-link {
  color: var(--color-text-muted);
}
html.light-mode .nav-link:hover {
  color: var(--color-text);
  background: rgba(0,0,0,0.04);
}
html.light-mode .nav-link.active {
  color: var(--color-gold);
  background: rgba(160,128,48,0.08);
}
html.light-mode .chip {
  box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}
html.light-mode .odds-table th { background: var(--color-surface-2); color: var(--color-text); }
html.light-mode .odds-table td { border-color: var(--color-border); }
html.light-mode .house-callout {
  background: rgba(160,128,48,0.06);
  border-left-color: var(--color-gold);
}
html.light-mode .dropdown-menu {
  background: #fff;
  border-color: rgba(120,100,60,0.15);
  box-shadow: 0 8px 24px rgba(0,0,0,0.12);
}
html.light-mode .dropdown-item:hover { background: rgba(0,0,0,0.04); }
html.light-mode .dropdown-title { color: var(--color-text); }
html.light-mode .mobile-nav-group-label { color: var(--color-text-faint); }

/* Theme toggle icon visibility */
.theme-icon-dark { display: none; }
.theme-icon-light { display: block; }
html.light-mode .theme-icon-dark { display: block; }
html.light-mode .theme-icon-light { display: none; }

/* ============================================
   HEADER
   ============================================ */
.site-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  background: rgba(10,11,16,0.94); backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--color-border);
}
.header-inner {
  max-width: 1400px; margin: 0 auto; padding: 0 var(--space-6);
  display: flex; align-items: center; justify-content: space-between;
  height: 64px;
}
.logo { display: flex; align-items: center; text-decoration: none; color: var(--color-text); }
.logo svg { height: 34px; width: auto; }
.main-nav { display: flex; gap: var(--space-1); }
.nav-link {
  display: flex; align-items: center; gap: var(--space-2);
  padding: var(--space-2) var(--space-3); border-radius: var(--radius-md);
  font-size: var(--text-xs); font-weight: 500; color: var(--color-text-muted);
  text-decoration: none; transition: all var(--transition); white-space: nowrap;
}
.nav-link:hover { color: var(--color-text); background: rgba(255,255,255,0.05); }
.nav-link.active { color: var(--color-gold); background: rgba(201,168,76,0.08); }
.nav-icon { width: 16px; height: 16px; }

/* Dropdown Nav */
.nav-dropdown { position: relative; }
.nav-link-dropdown { cursor: pointer; border: none; background: none; }
.nav-chevron { width: 14px; height: 14px; opacity: 0.5; transition: transform 0.2s ease; }
.nav-dropdown:hover .nav-chevron { transform: rotate(180deg); }
.dropdown-menu {
  display: none; position: absolute; top: calc(100% + 4px); left: 50%; transform: translateX(-50%);
  background: var(--color-surface-2); border: 1px solid var(--color-border);
  border-radius: var(--radius-lg); padding: var(--space-2);
  min-width: 260px; box-shadow: var(--shadow-lg); z-index: 200;
}
.dropdown-menu.open { display: block; }
.dropdown-item {
  display: flex; align-items: flex-start; gap: var(--space-3);
  padding: var(--space-3) var(--space-4); border-radius: var(--radius-md);
  text-decoration: none; color: var(--color-text-muted);
  transition: all var(--transition);
}
.dropdown-item:hover { background: rgba(255,255,255,0.05); color: var(--color-text); }
.dropdown-item.active { color: var(--color-gold); }
.dropdown-icon { width: 18px; height: 18px; margin-top: 2px; flex-shrink: 0; }
.dropdown-title { display: block; font-size: var(--text-sm); font-weight: 500; color: var(--color-text); }
.dropdown-item:hover .dropdown-title { color: var(--color-text); }
.dropdown-item.active .dropdown-title { color: var(--color-gold); }
.dropdown-desc { display: block; font-size: var(--text-xs); color: var(--color-text-faint); margin-top: 2px; }

.header-actions { display: flex; align-items: center; gap: var(--space-3); }

/* Icon buttons (theme toggle, mute) */
.icon-btn, .mute-btn {
  display: flex; align-items: center; justify-content: center;
  width: 34px; height: 34px; border-radius: var(--radius-md);
  color: var(--color-text-muted); transition: all var(--transition);
  border: 1px solid transparent;
}
.mute-btn:hover { color: var(--color-text); border-color: var(--color-border); background: rgba(255,255,255,0.05); }
.mute-btn svg { width: 16px; height: 16px; }

/* Subtle real-money link */
.header-real-link {
  font-size: var(--text-xs); color: var(--color-text-muted);
  text-decoration: none; padding: var(--space-1) var(--space-2);
  border-radius: var(--radius-sm); transition: color var(--transition);
  white-space: nowrap;
}
.header-real-link:hover { color: var(--color-gold); }

.mobile-menu-btn { display: none; color: var(--color-text); padding: var(--space-2); }

/* Language Selector */
.lang-selector { position: relative; }
.lang-btn {
  display: flex; align-items: center; gap: var(--space-1);
  padding: var(--space-1) var(--space-2); border-radius: var(--radius-sm);
  font-size: var(--text-xs); color: var(--color-text-muted); font-weight: 500;
  transition: color var(--transition);
}
.lang-btn:hover { color: var(--color-text); }
.lang-dropdown {
  display: none; position: absolute; top: 100%; right: 0;
  background: var(--color-surface-2); border: 1px solid var(--color-border);
  border-radius: var(--radius-md); padding: var(--space-1);
  min-width: 140px; box-shadow: var(--shadow-lg); z-index: 200;
}
.lang-dropdown.open { display: block; }
.lang-option {
  display: block; width: 100%; padding: var(--space-2) var(--space-3);
  text-align: left; font-size: var(--text-sm); color: var(--color-text-muted);
  border-radius: var(--radius-sm); transition: all var(--transition);
}
.lang-option:hover { background: rgba(255,255,255,0.05); color: var(--color-text); }
.lang-option.active { color: var(--color-gold); }

/* Mobile Nav */
.mobile-nav-overlay {
  display: none; position: fixed; inset: 0; z-index: 150;
  background: rgba(0,0,0,0.8); backdrop-filter: blur(8px);
}
.mobile-nav-overlay.open { display: flex; }
.mobile-nav-content {
  width: 300px; height: 100%; background: var(--color-surface);
  border-right: 1px solid var(--color-border); padding: var(--space-6);
  display: flex; flex-direction: column; gap: var(--space-6);
  animation: slideInLeft 0.3s ease;
}
@keyframes slideInLeft { from { transform: translateX(-100%); } to { transform: translateX(0); } }
.mobile-nav-close { align-self: flex-end; color: var(--color-text-muted); padding: var(--space-2); }
.mobile-nav-links { display: flex; flex-direction: column; gap: var(--space-2); }
.mobile-nav-link {
  display: flex; align-items: center; gap: var(--space-3);
  padding: var(--space-3) var(--space-4); border-radius: var(--radius-md);
  font-size: var(--text-base); color: var(--color-text-muted); text-decoration: none;
  transition: all var(--transition);
}
.mobile-nav-link:hover { color: var(--color-text); background: rgba(255,255,255,0.05); }

/* Subtle mobile footer CTA — text only */
.mobile-real-link {
  display: block; text-align: center; padding: var(--space-3);
  color: var(--color-text-muted); font-size: var(--text-sm);
  text-decoration: none; border-top: 1px solid var(--color-border);
  margin-top: auto;
}
.mobile-real-link:hover { color: var(--color-gold); }

/* Mobile nav groups */
.mobile-nav-group { margin-top: var(--space-2); }
.mobile-nav-group-label {
  display: block; padding: var(--space-2) var(--space-4) var(--space-1);
  font-size: var(--text-xs); font-weight: 600; color: var(--color-text-faint);
  text-transform: uppercase; letter-spacing: 0.08em;
}
.mobile-nav-link.sub { padding-left: var(--space-8); font-size: var(--text-sm); }

/* ============================================
   HERO
   ============================================ */
.hero {
  position: relative; min-height: 100vh; display: flex; align-items: center;
  justify-content: center; padding: calc(64px + var(--space-8)) var(--space-6) var(--space-8);
  overflow: hidden;
}
.hero-bg {
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 50% 40%, rgba(201,168,76,0.06), transparent),
    radial-gradient(ellipse 60% 80% at 20% 80%, rgba(13,31,21,0.5), transparent),
    radial-gradient(ellipse 60% 80% at 80% 80%, rgba(196,30,58,0.04), transparent),
    var(--color-bg);
}
.hero-bg::before {
  content: ''; position: absolute; inset: 0;
  background: repeating-linear-gradient(
    0deg, transparent, transparent 40px,
    rgba(201,168,76,0.015) 40px, rgba(201,168,76,0.015) 41px
  );
}
.hero-content {
  position: relative; text-align: center; max-width: 820px;
}
.hero-badge {
  display: inline-block; padding: var(--space-2) var(--space-4);
  border: 1px solid var(--color-border-strong); border-radius: 999px;
  font-size: var(--text-xs); color: var(--color-gold); font-weight: 500;
  letter-spacing: 0.05em; text-transform: uppercase; margin-bottom: var(--space-6);
  animation: fadeInUp 0.6s ease both;
}
.hero-title {
  font-family: var(--font-display); font-size: var(--text-hero);
  font-weight: 700; color: var(--color-text); line-height: 1.05;
  margin-bottom: var(--space-6); animation: fadeInUp 0.6s ease 0.1s both;
}
.hero-subtitle {
  font-size: var(--text-lg); color: var(--color-text-muted);
  margin-bottom: var(--space-8); max-width: 620px; margin-left: auto; margin-right: auto;
  animation: fadeInUp 0.6s ease 0.2s both; line-height: 1.6;
}
.hero-actions {
  display: flex; gap: var(--space-4); justify-content: center; flex-wrap: wrap;
  margin-bottom: var(--space-12); animation: fadeInUp 0.6s ease 0.3s both;
}
.hero-quote {
  font-family: var(--font-display); font-style: italic; font-size: var(--text-lg);
  color: var(--color-gold-dim); margin-top: var(--space-8);
  animation: fadeInUp 0.6s ease 0.4s both;
  text-shadow: 0 1px 8px rgba(0,0,0,0.4);
  opacity: 0.85;
}
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ============================================
   BUTTONS
   ============================================ */
.btn {
  display: inline-flex; align-items: center; gap: var(--space-2);
  padding: var(--space-3) var(--space-6); border-radius: var(--radius-md);
  font-weight: 600; font-size: var(--text-sm); cursor: pointer;
  transition: all var(--transition); text-decoration: none; border: none;
  white-space: nowrap;
}
.btn-primary {
  background: linear-gradient(135deg, var(--color-gold), var(--color-gold-bright));
  color: #0a0b10;
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: var(--shadow-gold); }
.btn-primary:disabled { opacity: 0.4; cursor: not-allowed; transform: none; }
.btn-outline {
  background: transparent; color: var(--color-text);
  border: 1px solid var(--color-border-strong);
}
.btn-outline:hover { background: rgba(255,255,255,0.05); border-color: var(--color-gold); }
.btn-gold {
  background: linear-gradient(135deg, var(--color-gold), var(--color-gold-bright));
  color: #0a0b10;
}
.btn-gold:hover { transform: translateY(-1px); box-shadow: var(--shadow-gold); color: #0a0b10; }
.btn-ghost { background: transparent; color: var(--color-text-muted); }
.btn-ghost:hover { color: var(--color-text); background: rgba(255,255,255,0.05); }
.btn-lg { padding: var(--space-4) var(--space-8); font-size: var(--text-base); }
.btn-sm { padding: var(--space-2) var(--space-4); font-size: var(--text-xs); }

/* Subtle affiliate/real-money CTA */
.cta-subtle {
  text-align: center; padding: var(--space-8) var(--space-6);
  border-top: 1px solid var(--color-border);
}
.cta-subtle p { color: var(--color-text-muted); font-size: var(--text-sm); margin-bottom: var(--space-3); }
.cta-subtle a { color: var(--color-gold); font-size: var(--text-sm); text-decoration: none; }
.cta-subtle a:hover { text-decoration: underline; }
.cta-subtle small { display: block; margin-top: var(--space-2); color: var(--color-text-faint); font-size: var(--text-xs); }

/* ============================================
   SECTIONS
   ============================================ */
.section {
  padding: clamp(var(--space-12), 6vw, var(--space-24)) var(--space-6);
  max-width: 1200px; margin: 0 auto;
}
.section-dark {
  background: var(--color-surface); border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
  max-width: 100%; padding-left: var(--space-6); padding-right: var(--space-6);
}
.section-dark > * { max-width: 1200px; margin-left: auto; margin-right: auto; }
.section-title {
  font-family: var(--font-display); font-size: var(--text-2xl); font-weight: 700;
  text-align: center; margin-bottom: var(--space-3); color: var(--color-text);
}
.section-subtitle {
  text-align: center; color: var(--color-text-muted); font-size: var(--text-base);
  margin-bottom: var(--space-10);
}

/* ============================================
   GAME MODE CARDS
   ============================================ */
.game-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--space-4);
}
.game-card {
  background: var(--color-surface-2); border: 1px solid var(--color-border);
  border-radius: var(--radius-lg); padding: var(--space-6);
  text-align: center; cursor: pointer; transition: all var(--transition);
  position: relative; overflow: hidden;
}
.game-card:hover {
  border-color: var(--color-gold); transform: translateY(-4px);
  box-shadow: var(--shadow-gold);
}
.game-card-icon { font-size: 2.5rem; margin-bottom: var(--space-3); }
.game-card h3 { font-family: var(--font-display); font-size: var(--text-lg); margin-bottom: var(--space-2); color: var(--color-text); }
.game-card p { font-size: var(--text-xs); color: var(--color-text-muted); line-height: 1.5; }
.game-card-tag {
  position: absolute; top: var(--space-3); right: var(--space-3);
  padding: 2px var(--space-2); background: rgba(201,168,76,0.15);
  color: var(--color-gold); font-size: 10px; font-weight: 600;
  border-radius: 999px; text-transform: uppercase; letter-spacing: 0.05em;
}

/* ============================================
   FEATURES GRID
   ============================================ */
.features-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: var(--space-6);
}
.feature-card {
  background: var(--color-surface-2); border: 1px solid var(--color-border);
  border-radius: var(--radius-lg); padding: var(--space-6);
}
.feature-icon {
  width: 48px; height: 48px; display: flex; align-items: center; justify-content: center;
  background: rgba(201,168,76,0.1); border-radius: var(--radius-md);
  color: var(--color-gold); margin-bottom: var(--space-4);
}
.feature-card h3 { font-family: var(--font-display); font-size: var(--text-lg); margin-bottom: var(--space-2); color: var(--color-text); }
.feature-card p { font-size: var(--text-sm); color: var(--color-text-muted); margin-bottom: var(--space-3); line-height: 1.6; }
.feature-link { font-size: var(--text-sm); font-weight: 500; color: var(--color-gold); text-decoration: none; }
.feature-link:hover { text-decoration: underline; }

/* ============================================
   GAME TABLE
   ============================================ */
.game-table-container {
  max-width: 920px; margin: 0 auto;
  padding: calc(64px + var(--space-4)) var(--space-4) var(--space-16);
}

/* Variant selector */
.variant-bar {
  display: flex; gap: var(--space-1); margin-bottom: var(--space-4);
  overflow-x: auto; -webkit-overflow-scrolling: touch; padding-bottom: var(--space-2);
}
.variant-btn {
  padding: var(--space-2) var(--space-4); border-radius: var(--radius-md);
  font-size: var(--text-xs); font-weight: 600; color: var(--color-text-muted);
  border: 1px solid var(--color-border); white-space: nowrap;
  transition: all var(--transition);
}
.variant-btn:hover { color: var(--color-text); border-color: rgba(255,255,255,0.2); }
.variant-btn.active { color: var(--color-gold); border-color: var(--color-gold); background: rgba(201,168,76,0.08); }

/* Stats bar */
.stats-bar {
  display: flex; gap: var(--space-2); margin-bottom: var(--space-4);
  overflow-x: auto; padding: var(--space-3); background: var(--color-surface);
  border-radius: var(--radius-md); border: 1px solid var(--color-border);
}
.stat-item { flex: 1; text-align: center; min-width: 60px; }
.stat-label { display: block; font-size: 10px; color: var(--color-text-faint); text-transform: uppercase; letter-spacing: 0.05em; }
.stat-value { display: block; font-size: var(--text-sm); font-weight: 600; color: var(--color-text); font-variant-numeric: tabular-nums lining-nums; }
.stat-player .stat-value { color: var(--color-player); }
.stat-banker .stat-value { color: var(--color-banker); }
.stat-tie .stat-value { color: var(--color-tie); }

/* ============================================
   TABLE FELT — Casino Realistic
   ============================================ */
.table-felt {
  background:
    radial-gradient(ellipse 80% 60% at 50% 50%, #0f2418, #0a1a10),
    repeating-linear-gradient(
      45deg,
      transparent,
      transparent 2px,
      rgba(255,255,255,0.005) 2px,
      rgba(255,255,255,0.005) 4px
    );
  border: 3px solid var(--color-gold-dim);
  border-radius: var(--radius-xl);
  box-shadow:
    inset 0 0 40px rgba(0,0,0,0.6),
    inset 0 0 80px rgba(0,0,0,0.3),
    0 0 0 6px #0a1610,
    0 0 0 8px rgba(201,168,76,0.12),
    0 8px 32px rgba(0,0,0,0.8);
  padding: var(--space-6) var(--space-6) var(--space-4);
  position: relative; overflow: visible;
  min-height: 300px;
}
.table-felt::before {
  content: ''; position: absolute; inset: 0; border-radius: calc(var(--radius-xl) - 2px);
  background: radial-gradient(ellipse 70% 40% at 50% 50%, rgba(201,168,76,0.03), transparent);
  pointer-events: none;
}

/* Gold trim rail */
.table-rail {
  position: absolute; inset: -6px; border-radius: calc(var(--radius-xl) + 2px);
  border: 2px solid rgba(201,168,76,0.2); pointer-events: none;
}

/* "No More Bets" overlay — brief flash only, fades before cards arrive */
.no-more-bets-text {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  font-family: var(--font-display); font-size: var(--text-lg); font-weight: 700;
  color: var(--color-gold); letter-spacing: 0.15em; text-transform: uppercase;
  text-shadow: 0 0 30px rgba(201,168,76,0.6), 0 0 60px rgba(201,168,76,0.3);
  z-index: 10;
  display: none; opacity: 0; transition: opacity 0.3s;
  white-space: nowrap; pointer-events: none;
}

/* Particle container */
.particle-container {
  position: absolute; inset: 0; overflow: hidden;
  border-radius: var(--radius-xl); pointer-events: none; z-index: 6;
}

@keyframes particleFly {
  0% { transform: translate(0, 0) rotate(0deg); opacity: 1; }
  100% { transform: translate(calc(var(--tx, 0) * 1px), -200px) rotate(720deg); opacity: 0; }
}
.particle {
  position: absolute; pointer-events: none;
  --tx: calc((var(--rand, 0.5) - 0.5) * 200);
}
@keyframes particleFly {
  0% { transform: translateY(0) rotate(0deg) scale(1); opacity: 1; }
  80% { opacity: 0.8; }
  100% { transform: translateY(-160px) translateX(calc((random() - 0.5) * 100px)) rotate(540deg) scale(0); opacity: 0; }
}

/* Result strip — sits between felt and betting area */
.result-strip {
  min-height: 56px;
  display: flex; align-items: center; justify-content: center;
  position: relative;
}

/* Result banner — inside the strip, never overlaps cards */
.result-banner {
  font-family: var(--font-display); font-size: clamp(1.4rem, 3.5vw, 2.2rem); font-weight: 700;
  text-shadow: 0 2px 16px rgba(0,0,0,0.7);
  opacity: 0; transition: opacity 0.4s ease; pointer-events: none;
  text-align: center; line-height: 1.3;
}
.result-banner.show { opacity: 1; }
.result-banner.player-wins { color: var(--color-player); }
.result-banner.banker-wins { color: var(--color-banker); }
.result-banner.tie-wins { color: var(--color-tie); }
.result-banner.natural-win {
  animation: naturalPulse 0.6s ease-in-out 3;
}
@keyframes naturalPulse {
  0%, 100% { text-shadow: 0 2px 16px rgba(0,0,0,0.7); }
  50% { text-shadow: 0 0 40px rgba(201,168,76,0.8), 0 0 80px rgba(201,168,76,0.4); }
}
.payout-display {
  display: inline; font-size: 0.65em; opacity: 0.9; margin-left: 8px;
}

/* Felt animations */
.table-felt.felt-loss {
  animation: feltLossFlash 0.5s ease;
}
@keyframes feltLossFlash {
  0%, 100% { box-shadow: inset 0 0 40px rgba(0,0,0,0.6), 0 0 0 6px #0a1610, 0 0 0 8px rgba(201,168,76,0.12); }
  50% { box-shadow: inset 0 0 60px rgba(220,38,38,0.3), 0 0 0 6px #0a1610, 0 0 0 8px rgba(220,38,38,0.2); }
}

/* Hands display */
.hands-display {
  display: flex; justify-content: center; align-items: flex-start;
  gap: var(--space-4); position: relative; z-index: 1;
  min-height: 200px;
}
.hand-area { flex: 1; max-width: 300px; text-align: center; }
.hand-label {
  font-family: var(--font-display); font-size: var(--text-sm); font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.15em; margin-bottom: var(--space-3);
  color: var(--color-text-muted);
}
.player-hand .hand-label { color: var(--color-player); }
.banker-hand .hand-label { color: var(--color-banker); }
.hand-cards {
  display: flex; justify-content: center; gap: 8px;
  margin-bottom: var(--space-3); min-height: 120px; align-items: center;
}
.hand-total {
  font-size: var(--text-2xl); font-weight: 700; font-family: var(--font-display);
  color: var(--color-text); min-height: 44px;
}
.vs-divider {
  display: flex; align-items: center; padding-top: var(--space-10);
}
.vs-text {
  font-family: var(--font-display); font-size: var(--text-lg); font-weight: 700;
  color: var(--color-text-faint);
}

/* ============================================
   CASINO PLAYING CARDS — Realistic
   ============================================ */
.card-wrapper {
  display: inline-block; perspective: 600px;
  animation: cardSlideIn 0.3s ease both;
}
.card-wrapper.third-card { animation-delay: 0.1s; }

@keyframes cardSlideIn {
  from { opacity: 0; transform: translateY(-20px) scale(0.9); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.card-inner {
  width: 64px; height: 90px;
  position: relative; transform-style: preserve-3d;
  transition: transform 0.45s cubic-bezier(0.4, 0, 0.2, 1);
}

.card-wrapper.flipping .card-inner {
  transform: rotateY(180deg);
}

/* Card back */
.card-face-down {
  position: absolute; inset: 0;
  backface-visibility: hidden; -webkit-backface-visibility: hidden;
  border-radius: 7px;
  background:
    repeating-linear-gradient(
      45deg,
      rgba(201,168,76,0.15) 0px, rgba(201,168,76,0.15) 2px,
      transparent 2px, transparent 8px
    ),
    repeating-linear-gradient(
      -45deg,
      rgba(201,168,76,0.1) 0px, rgba(201,168,76,0.1) 2px,
      transparent 2px, transparent 8px
    ),
    linear-gradient(135deg, #4a1020 0%, #2d0a14 50%, #4a1020 100%);
  border: 2px solid rgba(201,168,76,0.4);
  box-shadow: var(--shadow-card);
}
.card-face-down::after {
  content: ''; position: absolute; inset: 4px;
  border: 1px solid rgba(201,168,76,0.25); border-radius: 4px;
}

/* Card face */
.card-face {
  position: absolute; inset: 0;
  backface-visibility: hidden; -webkit-backface-visibility: hidden;
  transform: rotateY(180deg);
  border-radius: 7px;
  background: #fff;
  border: 1px solid rgba(0,0,0,0.12);
  box-shadow: var(--shadow-card);
  display: flex; align-items: center; justify-content: center;
  flex-direction: column; overflow: hidden;
}
.card-face.red { color: #c41e3a; }
.card-face.black { color: #1a1a2e; }

.card-corner {
  position: absolute; display: flex; flex-direction: column;
  align-items: center; line-height: 1; padding: 3px 4px;
}
.card-corner.top-left { top: 2px; left: 3px; }
.card-corner.bottom-right {
  bottom: 2px; right: 3px;
  transform: rotate(180deg);
}
.card-rank { font-size: 13px; font-weight: 700; font-family: 'Georgia', serif; }
.card-suit-small { font-size: 10px; line-height: 1.2; }
.card-center-suit { font-size: 28px; line-height: 1; }

/* Mini road */
.mini-road {
  margin-top: var(--space-4); display: flex; gap: 3px; flex-wrap: wrap;
  justify-content: center; min-height: 14px;
}
.mini-road .road-dot {
  width: 12px; height: 12px; border-radius: 50%;
}
.road-dot.P { background: var(--color-player); }
.road-dot.B { background: var(--color-banker); }
.road-dot.T { background: var(--color-tie); width: 6px; height: 6px; margin: 3px 0; }

/* ============================================
   BETTING AREA
   ============================================ */
.betting-area { margin-top: var(--space-4); }
.bet-zones {
  display: grid; grid-template-columns: 1fr auto 1fr; gap: var(--space-3);
  margin-bottom: var(--space-3);
}
.bet-zone {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: var(--space-4); border-radius: var(--radius-lg);
  border: 2px solid var(--color-border); cursor: pointer;
  transition: all var(--transition); min-height: 80px; position: relative;
}
.bet-zone:hover { border-color: rgba(255,255,255,0.3); background: rgba(255,255,255,0.03); }
.bet-zone.active { transform: scale(1.02); }
.bet-zone-name { font-weight: 700; font-size: var(--text-sm); letter-spacing: 0.05em; }
.bet-zone-pays { font-size: 10px; color: var(--color-text-muted); margin-top: 2px; }
.bet-zone-shortcut {
  position: absolute; bottom: 4px; font-size: 9px;
  color: var(--color-text-faint); letter-spacing: 0.05em;
}
.bet-zone-amount {
  position: absolute; top: -10px; right: -8px;
  background: var(--color-gold); color: #0a0b10; font-size: 11px;
  font-weight: 700; padding: 2px 8px; border-radius: 999px;
  display: none; font-variant-numeric: tabular-nums;
  box-shadow: 0 2px 8px rgba(0,0,0,0.4);
}
.bet-zone-amount.show { display: block; }

.bet-player { border-color: rgba(59,130,246,0.3); }
.bet-player.active { border-color: var(--color-player); background: var(--color-player-bg); box-shadow: 0 0 20px rgba(59,130,246,0.2); }
.bet-player .bet-zone-name { color: var(--color-player); }

.bet-tie { border-color: rgba(22,163,74,0.3); }
.bet-tie.active { border-color: var(--color-tie); background: var(--color-tie-bg); box-shadow: 0 0 20px rgba(22,163,74,0.2); }
.bet-tie .bet-zone-name { color: var(--color-tie); }

.bet-banker { border-color: rgba(220,38,38,0.3); }
.bet-banker.active { border-color: var(--color-banker); background: var(--color-banker-bg); box-shadow: 0 0 20px rgba(220,38,38,0.2); }
.bet-banker .bet-zone-name { color: var(--color-banker); }

.side-bets {
  display: flex; gap: var(--space-3); justify-content: center; margin-bottom: var(--space-3);
}
.bet-side { flex: 1; max-width: 140px; min-height: 50px; padding: var(--space-2); }
.bet-side .bet-zone-name { font-size: var(--text-xs); }
.bet-side.active { border-color: var(--color-gold); background: rgba(201,168,76,0.08); }

/* ============================================
   CASINO CHIPS — Realistic
   ============================================ */
.chip-selector {
  display: flex; justify-content: center; gap: var(--space-3);
  margin-bottom: var(--space-4); padding: var(--space-3) 0;
}
.chip {
  width: 56px; height: 56px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  position: relative; cursor: pointer; transition: all var(--transition);
  /* Base chip */
  background: var(--color-surface-2);
  box-shadow:
    0 4px 8px rgba(0,0,0,0.5),
    inset 0 1px 0 rgba(255,255,255,0.1),
    inset 0 -1px 0 rgba(0,0,0,0.3);
}
/* Edge pattern — inner ring */
.chip::before {
  content: ''; position: absolute; inset: 4px;
  border-radius: 50%; border: 2px dashed rgba(255,255,255,0.15);
}
/* Outer ring */
.chip::after {
  content: ''; position: absolute; inset: -3px;
  border-radius: 50%; border: 3px solid currentColor;
  opacity: 0.4;
}
.chip span {
  font-size: 10px; font-weight: 700; color: var(--color-text);
  font-variant-numeric: tabular-nums; position: relative; z-index: 1;
}
.chip:hover { transform: scale(1.12) translateY(-2px); }
.chip.active {
  transform: scale(1.08) translateY(-2px);
  box-shadow: 0 8px 20px rgba(0,0,0,0.5), 0 0 0 2px currentColor, inset 0 1px 0 rgba(255,255,255,0.15);
}

/* Chip colors */
.chip[data-value="5"] { color: var(--color-player); background: rgba(59,130,246,0.15); }
.chip[data-value="25"] { color: var(--color-tie); background: rgba(22,163,74,0.15); }
.chip[data-value="100"] { color: var(--color-text-muted); background: var(--color-surface-2); }
.chip[data-value="500"] { color: var(--color-banker); background: rgba(220,38,38,0.15); }
.chip[data-value="1000"] { color: var(--color-gold); background: rgba(201,168,76,0.15); }

/* Action bar */
.action-bar {
  display: flex; justify-content: center; gap: var(--space-3); flex-wrap: wrap;
}
.deal-btn { min-width: 160px; justify-content: center; font-size: var(--text-lg); }

/* Keyboard hint on deal btn */
.deal-btn-hint { font-size: 10px; opacity: 0.6; font-weight: 400; }

/* ============================================
   SHOE STATS PANEL
   ============================================ */
.shoe-stats-section {
  margin-top: var(--space-4);
  background: var(--color-surface); border: 1px solid var(--color-border);
  border-radius: var(--radius-md); overflow: hidden;
}
.shoe-stats-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: var(--space-3) var(--space-4); cursor: pointer;
  font-size: var(--text-xs); font-weight: 600;
  color: var(--color-text-muted); text-transform: uppercase; letter-spacing: 0.05em;
  transition: color var(--transition);
}
.shoe-stats-header:hover { color: var(--color-text); }
.shoe-stats-header .toggle-icon {
  width: 16px; height: 16px; transition: transform var(--transition);
}
.shoe-stats-header.open .toggle-icon { transform: rotate(180deg); }
.shoe-stats-content { padding: var(--space-3) var(--space-4); }
.shoe-stat-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: var(--space-2) 0; border-bottom: 1px solid rgba(255,255,255,0.04);
  font-size: var(--text-xs); color: var(--color-text-muted);
}
.shoe-stat-row:last-child { border-bottom: none; }
.shoe-stat-row strong { color: var(--color-text); font-variant-numeric: tabular-nums; }
.shoe-stat-divider { border-top: 1px solid var(--color-border); margin: var(--space-2) 0; }
.shoe-value-grid { display: flex; flex-direction: column; gap: 4px; margin-top: var(--space-2); }
.shoe-value-item { display: flex; align-items: center; gap: 8px; font-size: 10px; }
.shoe-value-label { width: 50px; color: var(--color-text-muted); font-variant-numeric: tabular-nums; }
.shoe-value-bar { flex: 1; height: 4px; background: rgba(255,255,255,0.06); border-radius: 2px; }
.shoe-value-fill { height: 100%; background: var(--color-gold-dim); border-radius: 2px; }
.shoe-value-count { width: 28px; text-align: right; color: var(--color-text-faint); font-variant-numeric: tabular-nums; }

/* ============================================
   HAND HISTORY LOG
   ============================================ */
.hand-history-section {
  margin-top: var(--space-4);
  background: var(--color-surface); border: 1px solid var(--color-border);
  border-radius: var(--radius-md); overflow: hidden;
}
.hand-history-header {
  padding: var(--space-3) var(--space-4);
  border-bottom: 1px solid var(--color-border);
  font-size: var(--text-xs); font-weight: 600;
  color: var(--color-text-muted); text-transform: uppercase; letter-spacing: 0.05em;
  display: flex; align-items: center; justify-content: space-between;
}
.hand-history-list {
  max-height: 240px; overflow-y: auto; padding: var(--space-1) 0;
}
.hand-history-list::-webkit-scrollbar { width: 4px; }
.hand-history-list::-webkit-scrollbar-track { background: transparent; }
.hand-history-list::-webkit-scrollbar-thumb { background: var(--color-border); border-radius: 2px; }
.history-empty {
  padding: var(--space-4); text-align: center; color: var(--color-text-faint);
  font-size: var(--text-xs); font-style: italic;
}
.history-row {
  display: grid; grid-template-columns: 40px 1fr 30px 60px 70px;
  gap: 8px; align-items: center;
  padding: 6px var(--space-4); font-size: 12px;
  border-bottom: 1px solid rgba(255,255,255,0.03);
  transition: background var(--transition);
}
.history-row:hover { background: rgba(255,255,255,0.02); }
.history-hand { color: var(--color-text-faint); font-variant-numeric: tabular-nums; }
.history-scores { color: var(--color-text-muted); font-variant-numeric: tabular-nums; text-align: center; }
.history-result { font-weight: 700; text-align: center; }
.history-result.player { color: var(--color-player); }
.history-result.banker { color: var(--color-banker); }
.history-result.tie { color: var(--color-tie); }
.history-bet { color: var(--color-text-muted); text-align: right; font-variant-numeric: tabular-nums; }
.history-pl { text-align: right; font-weight: 600; font-variant-numeric: tabular-nums; }
.history-pl.profit { color: var(--color-tie); }
.history-pl.loss { color: var(--color-red-bright); }
.history-pl.push { color: var(--color-gold); }

/* ============================================
   STRATEGY TRAINER
   ============================================ */
.trainer-container {
  max-width: 700px; margin: 0 auto;
  padding: calc(64px + var(--space-8)) var(--space-6) var(--space-16);
}
.trainer-header { text-align: center; margin-bottom: var(--space-8); }
.trainer-header h1 { font-family: var(--font-display); font-size: var(--text-2xl); margin-bottom: var(--space-2); }
.trainer-header p { color: var(--color-text-muted); }
.trainer-stats {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--space-3);
  margin-bottom: var(--space-8);
}
.trainer-stat {
  text-align: center; padding: var(--space-4);
  background: var(--color-surface); border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
}
.trainer-stat-value { display: block; font-size: var(--text-xl); font-weight: 700; color: var(--color-gold); font-variant-numeric: tabular-nums; }
.trainer-stat-label { font-size: var(--text-xs); color: var(--color-text-muted); }
.trainer-question-card {
  background: var(--color-surface); border: 1px solid var(--color-border);
  border-radius: var(--radius-lg); padding: var(--space-8);
}
.question-text {
  font-family: var(--font-display); font-size: var(--text-lg); font-weight: 600;
  margin-bottom: var(--space-6); line-height: 1.4;
}
.question-options { display: flex; flex-direction: column; gap: var(--space-3); }
.question-option {
  padding: var(--space-4); border: 1px solid var(--color-border);
  border-radius: var(--radius-md); cursor: pointer; font-size: var(--text-sm);
  color: var(--color-text); transition: all var(--transition); text-align: left;
  width: 100%;
}
.question-option:hover { border-color: var(--color-gold); background: rgba(201,168,76,0.05); }
.question-option.correct { border-color: var(--color-tie); background: rgba(22,163,74,0.1); color: var(--color-tie); }
.question-option.wrong { border-color: var(--color-banker); background: rgba(220,38,38,0.1); color: var(--color-banker); }
.question-option.disabled { pointer-events: none; opacity: 0.6; }
.question-feedback {
  margin-top: var(--space-4); padding: var(--space-4);
  border-radius: var(--radius-md); font-size: var(--text-sm);
}
.question-feedback.correct { background: rgba(22,163,74,0.1); border: 1px solid rgba(22,163,74,0.3); color: var(--color-tie); }
.question-feedback.wrong { background: rgba(220,38,38,0.1); border: 1px solid rgba(220,38,38,0.3); color: var(--color-red-bright); }
.trainer-actions { display: flex; gap: var(--space-3); justify-content: center; margin-top: var(--space-6); }


/* ============================================
   GUIDE TABLE OF CONTENTS
   ============================================ */
.guide-layout {
  display: flex;
  gap: var(--space-8);
  align-items: flex-start;
}
.guide-toc {
  position: sticky;
  top: calc(64px + var(--space-4));
  width: 220px;
  flex-shrink: 0;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: var(--space-3) var(--space-3);
  max-height: calc(100vh - 100px);
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--color-border) transparent;
}
.toc-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-2);
}
.toc-title {
  font-family: var(--font-display);
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-gold);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.toc-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--color-text-muted);
  cursor: pointer;
  padding: 2px;
}
.toc-list {
  list-style: none;
  padding: 0;
  margin: 0;
  counter-reset: toc;
}
.toc-list li {
  counter-increment: toc;
}
.toc-link {
  display: block;
  padding: 3px 0 3px 0;
  font-size: 11.5px;
  line-height: 1.35;
  color: var(--color-text-muted);
  text-decoration: none;
  border-left: 2px solid transparent;
  padding-left: var(--space-2);
  transition: color 0.2s, border-color 0.2s;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
.toc-link:hover {
  color: var(--color-text);
  border-left-color: var(--color-gold);
}
.toc-link.active {
  color: var(--color-gold);
  border-left-color: var(--color-gold);
}
.guide-body {
  flex: 1;
  min-width: 0;
}

@media (max-width: 1024px) {
  .guide-layout { flex-direction: column; gap: 0; }
  .guide-toc {
    position: relative;
    top: auto;
    width: 100%;
    margin-bottom: var(--space-6);
    max-height: none;
    overflow: visible;
  }
  .toc-toggle { display: block; }
  .guide-toc.collapsed .toc-list { display: none; }
}

/* ============================================
   DAILY CHALLENGE
   ============================================ */
.challenge-container {
  max-width: 700px; margin: 0 auto;
  padding: calc(64px + var(--space-4)) var(--space-4) var(--space-6);
}
.challenge-header { text-align: center; margin-bottom: var(--space-3); }
.challenge-header h1 { font-family: var(--font-display); font-size: var(--text-xl); margin-bottom: var(--space-1); }
.challenge-header p { color: var(--color-text-muted); font-size: var(--text-sm); }
.challenge-timer {
  margin-top: var(--space-2); font-size: var(--text-xs); color: var(--color-gold);
  font-variant-numeric: tabular-nums;
}
.challenge-info { margin-bottom: var(--space-3); }
.challenge-rule {
  display: flex; align-items: center; gap: var(--space-2);
  padding: var(--space-2) var(--space-3); background: var(--color-surface);
  border: 1px solid var(--color-border); border-radius: var(--radius-md);
  font-size: var(--text-xs); color: var(--color-text-muted);
}
.challenge-rule i { color: var(--color-gold); flex-shrink: 0; }
.challenge-start-screen { text-align: center; padding: var(--space-6) 0; }

/* Name Entry */
.name-entry {
  max-width: 360px; margin: 0 auto var(--space-6);
  text-align: center;
}
.name-entry label {
  display: block;
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  margin-bottom: var(--space-2);
}
.name-entry input {
  width: 100%;
  padding: var(--space-3) var(--space-4);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  color: var(--color-text);
  font-size: var(--text-base);
  text-align: center;
  font-family: var(--font-body);
  outline: none;
  transition: border-color 0.2s;
}
.name-entry input:focus {
  border-color: var(--color-gold);
}
.name-entry input::placeholder {
  color: var(--color-text-muted);
  opacity: 0.5;
}
.name-entry .name-preview {
  margin-top: var(--space-2);
  font-size: var(--text-xs);
  color: var(--color-text-muted);
}
.name-entry .name-preview span {
  color: var(--color-gold);
  font-weight: 600;
}

/* Active game — viewport-fitting */
.challenge-game-active {
  display: flex;
  flex-direction: column;
  min-height: 0;
}
.challenge-progress {
  display: flex; justify-content: space-between; padding: var(--space-2) var(--space-3);
  background: var(--color-surface); border-radius: var(--radius-md);
  margin-bottom: var(--space-2); font-size: var(--text-xs); color: var(--color-text-muted);
}
.challenge-progress strong { color: var(--color-gold); }

.challenge-result-flash {
  text-align: center; padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-md); font-weight: 600;
  font-size: var(--text-sm);
  background: rgba(255,255,255,0.04);
  transition: opacity 0.3s;
  min-height: 36px;
  display: flex; align-items: center; justify-content: center;
}

/* Bet UI — compact */
.challenge-bet-ui {
  display: flex; flex-direction: column; gap: var(--space-2);
}
.ch-chips {
  display: flex; gap: 6px; justify-content: center; align-items: center;
}
.ch-chips span { font-size: 11px; color: var(--color-text-muted); }
.ch-chip {
  padding: 4px 10px !important; font-size: 12px !important;
  min-height: 28px !important; border-radius: 14px !important;
}
.ch-chip.active { border-color: var(--color-gold) !important; color: var(--color-gold) !important; }
.ch-bet-zones {
  display: flex; gap: 6px;
}
.ch-bet-zones .bet-zone {
  flex: 1; min-height: 52px;
}
.ch-bet-zones .bet-zone.bet-tie { flex: 0 0 70px; }

/* Live leaderboard sidebar during game */
.challenge-live-lb {
  margin-top: var(--space-2);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  overflow: hidden;
}
.challenge-live-lb .llb-title {
  padding: var(--space-2) var(--space-3);
  font-size: 11px;
  font-weight: 600;
  color: var(--color-gold);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-bottom: 1px solid var(--color-border);
  display: flex; justify-content: space-between; align-items: center;
}
.llb-live {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 10px; color: var(--color-text-muted); font-weight: 400;
  text-transform: none; letter-spacing: 0;
}
.llb-live-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: #16a34a;
  animation: llb-pulse 2s ease-in-out infinite;
}
@keyframes llb-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}
.llb-row {
  display: flex; padding: 4px var(--space-3);
  font-size: 11px; align-items: center; gap: 6px;
  border-bottom: 1px solid rgba(255,255,255,0.03);
}
.llb-row:last-child { border-bottom: none; }
.llb-row.you { background: rgba(201,168,76,0.08); }
.llb-rank { width: 20px; font-weight: 600; color: var(--color-text-muted); font-variant-numeric: tabular-nums; }
.llb-rank.gold { color: var(--color-gold); }
.llb-name { flex: 1; color: var(--color-text-muted); }
.llb-row.you .llb-name { color: var(--color-text); font-weight: 500; }
.llb-score { font-weight: 600; font-variant-numeric: tabular-nums; color: var(--color-text-muted); }
.llb-row.you .llb-score { color: var(--color-gold); }
.llb-status {
  font-size: 10px; color: var(--color-text-muted); opacity: 0.6;
  width: 64px; text-align: right;
}
.llb-status.playing { color: #16a34a; opacity: 1; }

/* Result screen */
.challenge-result {
  text-align: center; padding: var(--space-6);
  background: var(--color-surface); border: 1px solid var(--color-border-strong);
  border-radius: var(--radius-lg); margin-bottom: var(--space-4);
}
.challenge-result h2 { font-family: var(--font-display); font-size: var(--text-lg); margin-bottom: var(--space-3); }
.challenge-score {
  font-size: var(--text-xl); font-weight: 700; color: var(--color-gold);
  margin-bottom: var(--space-3); font-variant-numeric: tabular-nums;
}
.challenge-rank-badge {
  display: inline-flex; align-items: center; gap: var(--space-2);
  padding: var(--space-2) var(--space-4);
  background: rgba(201,168,76,0.1);
  border: 1px solid rgba(201,168,76,0.3);
  border-radius: 20px;
  font-size: var(--text-sm);
  color: var(--color-gold);
  margin-bottom: var(--space-4);
}

/* Full leaderboard */
.leaderboard { margin-top: var(--space-4); }
.leaderboard h3 { font-family: var(--font-display); font-size: var(--text-base); margin-bottom: var(--space-3); }
.leaderboard-table {
  background: var(--color-surface); border: 1px solid var(--color-border);
  border-radius: var(--radius-md); overflow: hidden;
}
.lb-row {
  display: flex; padding: var(--space-2) var(--space-3);
  border-bottom: 1px solid var(--color-border); font-size: var(--text-sm);
  align-items: center;
}
.lb-row:last-child { border-bottom: none; }
.lb-row.header { font-weight: 600; color: var(--color-text-muted); font-size: var(--text-xs); text-transform: uppercase; }
.lb-row.you { background: rgba(201,168,76,0.1); border-left: 3px solid var(--color-gold); }
.lb-rank { width: 32px; font-weight: 600; font-variant-numeric: tabular-nums; }
.lb-rank.gold { color: var(--color-gold); }
.lb-medal { margin-right: 4px; }
.lb-name { flex: 1; }
.lb-row.you .lb-name { color: var(--color-gold); font-weight: 600; }
.lb-score { width: 90px; text-align: right; font-weight: 600; font-variant-numeric: tabular-nums; color: var(--color-gold); }
.lb-status-col {
  width: 70px; text-align: right; font-size: 10px; color: var(--color-text-muted);
}
.lb-status-col.playing { color: #16a34a; }

@media (max-width: 600px) {
  .challenge-container {
    padding: calc(56px + var(--space-2)) var(--space-3) var(--space-4);
  }
  .challenge-header h1 { font-size: var(--text-lg); }
  .ch-bet-zones .bet-zone { min-height: 46px; }
  .ch-bet-zones .bet-zone.bet-tie { flex: 0 0 60px; }
  .llb-status { display: none; }
}

/* ============================================
   SCORECARD / TRACKER
   ============================================ */
.tracker-container {
  max-width: 800px; margin: 0 auto;
  padding: calc(64px + var(--space-8)) var(--space-4) var(--space-16);
}
.tracker-header { text-align: center; margin-bottom: var(--space-4); }
.tracker-header h1 { font-family: var(--font-display); font-size: var(--text-2xl); margin-bottom: var(--space-2); }
.tracker-header p { color: var(--color-text-muted); margin-bottom: var(--space-4); }
.tracker-actions-bar {
  display: flex; gap: var(--space-2); justify-content: center; flex-wrap: wrap;
}
.dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 4px; }
.dot-player { background: var(--color-player); }
.dot-banker { background: var(--color-banker); }
.dot-tie { background: var(--color-tie); }

.tracker-stats-bar {
  display: flex; gap: var(--space-4); justify-content: center;
  padding: var(--space-3); margin-bottom: var(--space-4);
  font-size: var(--text-sm); color: var(--color-text-muted);
}
.tracker-stats-bar span { font-variant-numeric: tabular-nums; }

.road-maps { display: flex; flex-direction: column; gap: var(--space-4); }
.road-map-card {
  background: var(--color-surface); border: 1px solid var(--color-border);
  border-radius: var(--radius-md); padding: var(--space-4); overflow-x: auto;
}
.road-map-card h3 {
  font-family: var(--font-display); font-size: var(--text-sm); color: var(--color-text-muted);
  margin-bottom: var(--space-3);
}
.road-map-card canvas { width: 100%; height: auto; }
.road-derived { display: inline-flex; flex-direction: column; width: calc(50% - var(--space-2)); }

/* ============================================
   STRATEGY LAB / SIMULATOR
   ============================================ */
.simulator-container {
  max-width: 900px; margin: 0 auto;
  padding: calc(64px + var(--space-8)) var(--space-6) var(--space-16);
}
.simulator-header { text-align: center; margin-bottom: var(--space-8); }
.simulator-header h1 { font-family: var(--font-display); font-size: var(--text-2xl); margin-bottom: var(--space-2); }
.simulator-header p { color: var(--color-text-muted); max-width: 600px; margin: 0 auto; line-height: 1.6; }

.sim-controls {
  background: var(--color-surface); border: 1px solid var(--color-border);
  border-radius: var(--radius-lg); padding: var(--space-6); margin-bottom: var(--space-6);
}
.sim-controls-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: var(--space-4); margin-bottom: var(--space-4);
}
.sim-field { display: flex; flex-direction: column; gap: var(--space-1); }
.sim-field label {
  font-size: var(--text-xs); color: var(--color-text-muted);
  font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em;
}
.sim-field select,
.sim-field input {
  padding: var(--space-2) var(--space-3); background: var(--color-surface-2);
  border: 1px solid var(--color-border); border-radius: var(--radius-md);
  color: var(--color-text); font-size: var(--text-sm); font-family: var(--font-body);
  transition: border-color var(--transition);
}
.sim-field select:focus,
.sim-field input:focus {
  outline: none; border-color: var(--color-gold);
}
.sim-compare-row {
  display: flex; align-items: center; gap: var(--space-3);
  padding: var(--space-3) 0; border-top: 1px solid var(--color-border);
  font-size: var(--text-sm); color: var(--color-text-muted);
}
.sim-compare-row input[type="checkbox"] { accent-color: var(--color-gold); }
.sim-strategy2-row {
  display: none; gap: var(--space-4); padding-top: var(--space-4);
}
.sim-actions { display: flex; gap: var(--space-3); }

.sim-results {
  display: none;
  background: var(--color-surface); border: 1px solid var(--color-border);
  border-radius: var(--radius-lg); padding: var(--space-6);
}
.sim-chart-container {
  position: relative; margin-bottom: var(--space-4);
  border-radius: var(--radius-md); overflow: hidden;
}
.sim-chart-container canvas {
  display: block; width: 100%; border-radius: var(--radius-md);
}
.sim-stats-row {
  display: flex; gap: var(--space-4); flex-wrap: wrap;
  margin-top: var(--space-4);
}
.sim-stat-group {
  flex: 1; min-width: 200px;
  background: var(--color-surface-2); border: 1px solid var(--color-border);
  border-radius: var(--radius-md); padding: var(--space-4);
}
.sim-stat-label {
  font-family: var(--font-display); font-size: var(--text-base); font-weight: 600;
  color: var(--color-text); margin-bottom: var(--space-3);
  padding-bottom: var(--space-2); border-bottom: 1px solid var(--color-border);
}
.sim-stat-item {
  display: flex; justify-content: space-between; align-items: center;
  padding: var(--space-2) 0; font-size: var(--text-xs);
  color: var(--color-text-muted); border-bottom: 1px solid rgba(255,255,255,0.04);
}
.sim-stat-item:last-child { border-bottom: none; }
.sim-stat-item strong { font-size: var(--text-sm); }

.sim-note {
  margin-top: var(--space-4); padding: var(--space-4) var(--space-5);
  border-left: 3px solid var(--color-gold); background: rgba(201,168,76,0.05);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  font-size: var(--text-xs); color: var(--color-text-muted); line-height: 1.6;
}

/* ============================================
   CONTENT PAGES (Strategy/Learn)
   ============================================ */
.content-container {
  max-width: 820px; margin: 0 auto;
  padding: calc(64px + var(--space-8)) var(--space-6) var(--space-16);
}
.content-container h1 {
  font-family: var(--font-display); font-size: var(--text-2xl); text-align: center;
  margin-bottom: var(--space-2);
}
.content-subtitle {
  text-align: center; color: var(--color-text-muted); margin-bottom: var(--space-8);
  font-size: var(--text-base); max-width: 600px; margin-left: auto; margin-right: auto;
  line-height: 1.6;
}
.content-nav {
  display: flex; gap: var(--space-2); flex-wrap: wrap; justify-content: center;
  margin-bottom: var(--space-10); padding: var(--space-3);
  background: var(--color-surface); border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
}
.content-nav a {
  padding: var(--space-2) var(--space-4); border-radius: var(--radius-sm);
  font-size: var(--text-xs); font-weight: 500; color: var(--color-text-muted);
  transition: all var(--transition); text-decoration: none;
}
.content-nav a:hover { background: rgba(255,255,255,0.05); color: var(--color-text); }

.content-article {
  margin-bottom: var(--space-12); padding-bottom: var(--space-12);
  border-bottom: 1px solid var(--color-border);
}
.content-article:last-of-type { border-bottom: none; }
.content-article h2 {
  font-family: var(--font-display); font-size: var(--text-xl); margin-bottom: var(--space-4);
  color: var(--color-text);
}
.content-article h3 {
  font-family: var(--font-display); font-size: var(--text-lg);
  margin: var(--space-6) 0 var(--space-3); color: var(--color-text);
}
.content-article p { color: var(--color-text-muted); margin-bottom: var(--space-4); line-height: 1.7; }
.content-article ul, .content-article ol {
  color: var(--color-text-muted); padding-left: var(--space-6);
  margin-bottom: var(--space-4); line-height: 1.7;
}
.content-article li { margin-bottom: var(--space-2); }

/* Odds/Rules tables */
.odds-table, .rules-table { overflow-x: auto; margin: var(--space-4) 0; }
table {
  width: 100%; background: var(--color-surface); border-radius: var(--radius-md);
  font-size: var(--text-sm); border-collapse: collapse;
}
thead th {
  background: var(--color-surface-2); padding: var(--space-3) var(--space-4);
  font-weight: 600; text-align: left; color: var(--color-text-muted);
  font-size: var(--text-xs); text-transform: uppercase; letter-spacing: 0.05em;
}
tbody td { padding: var(--space-3) var(--space-4); border-top: 1px solid var(--color-border); }
.highlight-row td { background: rgba(201,168,76,0.06); }
.danger-row td { background: rgba(220,38,38,0.06); color: var(--color-red-bright); }
.good-row td { background: rgba(22,163,74,0.06); color: var(--color-tie); }

.insight-box {
  padding: var(--space-4) var(--space-6); border-left: 3px solid var(--color-gold);
  background: rgba(201,168,76,0.05); border-radius: 0 var(--radius-md) var(--radius-md) 0;
  margin: var(--space-6) 0; font-size: var(--text-sm); color: var(--color-text-muted);
  line-height: 1.6;
}
.insight-box strong { color: var(--color-gold); }
.insight-box.warning { border-left-color: var(--color-red); }
.insight-box.warning strong { color: var(--color-red-bright); }

/* Strategy example */
.strategy-example {
  padding: var(--space-4); background: var(--color-surface);
  border-radius: var(--radius-md); margin: var(--space-4) 0;
  border: 1px solid var(--color-border);
}
.strategy-example h4 { font-size: var(--text-sm); margin-bottom: var(--space-3); color: var(--color-text-muted); }
.sequence { display: flex; gap: var(--space-2); flex-wrap: wrap; }
.seq-item {
  padding: var(--space-2) var(--space-3); border-radius: var(--radius-sm);
  font-size: var(--text-xs); font-weight: 600; font-variant-numeric: tabular-nums;
  background: var(--color-surface-2); color: var(--color-text-muted);
}
.seq-item.win { background: rgba(22,163,74,0.1); color: var(--color-tie); }
.seq-item.loss { background: rgba(220,38,38,0.1); color: var(--color-red-bright); }
.seq-item.result { background: rgba(201,168,76,0.1); color: var(--color-gold); }

.pros-cons { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-4); margin: var(--space-4) 0; }
.pros, .cons {
  padding: var(--space-4); border-radius: var(--radius-md);
}
.pros { background: rgba(22,163,74,0.05); border: 1px solid rgba(22,163,74,0.15); }
.cons { background: rgba(220,38,38,0.05); border: 1px solid rgba(220,38,38,0.15); }
.pros h4, .cons h4 { font-size: var(--text-sm); margin-bottom: var(--space-2); }
.pros h4 { color: var(--color-tie); }
.cons h4 { color: var(--color-red-bright); }
.pros ul, .cons ul { list-style: none; padding: 0; }
.pros li, .cons li { font-size: var(--text-xs); color: var(--color-text-muted); padding: var(--space-1) 0; }
.pros li::before { content: '+ '; color: var(--color-tie); }
.cons li::before { content: '− '; color: var(--color-red-bright); }

/* Learn page */
.step-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-4); margin: var(--space-6) 0; }
.step-card {
  padding: var(--space-6); background: var(--color-surface);
  border: 1px solid var(--color-border); border-radius: var(--radius-lg); text-align: center;
}
.step-num {
  width: 40px; height: 40px; display: flex; align-items: center; justify-content: center;
  background: rgba(201,168,76,0.1); color: var(--color-gold);
  border-radius: 50%; font-weight: 700; font-size: var(--text-lg);
  margin: 0 auto var(--space-3);
}
.step-card h4 { font-size: var(--text-sm); margin-bottom: var(--space-2); color: var(--color-text); }
.step-card p { font-size: var(--text-xs); color: var(--color-text-muted); line-height: 1.5; }

.card-values-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--space-4);
  margin: var(--space-6) 0;
}
.card-value-item { text-align: center; }
.card-display {
  width: 64px; height: 88px; display: flex; align-items: center; justify-content: center;
  background: #fff; color: #1a1a2e; font-weight: 700; font-size: 1.1rem;
  border-radius: var(--radius-md); margin: 0 auto var(--space-2);
  box-shadow: var(--shadow-md); flex-direction: column; gap: 4px;
}
.card-display.red { color: #c41e3a; }
.card-value-item span { font-size: var(--text-xs); color: var(--color-text-muted); }

.bet-explained-grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-4); margin: var(--space-6) 0; }
.bet-explained {
  padding: var(--space-4); background: var(--color-surface);
  border: 1px solid var(--color-border); border-radius: var(--radius-md);
}
.bet-explained h4 { margin-bottom: var(--space-2); font-size: var(--text-sm); color: var(--color-text); }
.bet-explained p { font-size: var(--text-xs); color: var(--color-text-muted); margin: 0; line-height: 1.5; }

.glossary-grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-3); }
.glossary-item {
  padding: var(--space-3); background: var(--color-surface);
  border-radius: var(--radius-md); border: 1px solid var(--color-border);
}
.glossary-item dt { font-weight: 600; font-size: var(--text-sm); color: var(--color-gold); margin-bottom: var(--space-1); }
.glossary-item dd { font-size: var(--text-xs); color: var(--color-text-muted); line-height: 1.5; }

/* Bankroll rules */
.bankroll-rules { display: flex; flex-direction: column; gap: var(--space-4); }
.bankroll-rule {
  display: flex; gap: var(--space-4); align-items: flex-start;
  padding: var(--space-4); background: var(--color-surface);
  border: 1px solid var(--color-border); border-radius: var(--radius-md);
}
.rule-number {
  width: 36px; height: 36px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  background: rgba(201,168,76,0.1); color: var(--color-gold);
  border-radius: 50%; font-weight: 700;
}
.bankroll-rule h4 { font-size: var(--text-sm); margin-bottom: var(--space-1); color: var(--color-text); }
.bankroll-rule p { font-size: var(--text-xs); color: var(--color-text-muted); margin: 0; line-height: 1.5; }

/* ============================================
   SHARE MODAL
   ============================================ */
.modal {
  position: fixed; inset: 0; z-index: 200; display: flex;
  align-items: center; justify-content: center;
}
.modal-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,0.7); }
.modal-content {
  position: relative; background: var(--color-surface-2);
  border: 1px solid var(--color-border); border-radius: var(--radius-xl);
  padding: var(--space-8); max-width: 640px; width: 90%;
}
.modal-close {
  position: absolute; top: var(--space-3); right: var(--space-3);
  color: var(--color-text-muted); padding: var(--space-2);
}
.modal-content h3 { font-family: var(--font-display); font-size: var(--text-lg); margin-bottom: var(--space-4); }
.modal-content canvas { border-radius: var(--radius-md); margin-bottom: var(--space-4); }
.share-actions { display: flex; gap: var(--space-3); justify-content: center; }

/* ============================================
   FOOTER
   ============================================ */
.site-footer {
  background: var(--color-surface); border-top: 1px solid var(--color-border);
  padding: var(--space-12) var(--space-6) var(--space-8);
}
.footer-inner { max-width: 1200px; margin: 0 auto; }
.footer-brand { margin-bottom: var(--space-6); }
.footer-brand p { color: var(--color-text-muted); font-size: var(--text-sm); margin-top: var(--space-3); max-width: 440px; line-height: 1.6; }
.footer-links {
  display: flex; gap: var(--space-6); margin-bottom: var(--space-6);
  flex-wrap: wrap;
}
.footer-links a { color: var(--color-text-muted); font-size: var(--text-sm); text-decoration: none; }
.footer-links a:hover { color: var(--color-gold); }
.footer-legal { color: var(--color-text-faint); font-size: var(--text-xs); }
.footer-legal p { margin-bottom: var(--space-2); line-height: 1.6; }
.footer-computer-credit { font-size: var(--text-xs); color: var(--color-text-faint); }
.footer-computer-credit a { color: var(--color-text-faint); text-decoration: none; }
.footer-computer-credit a:hover { color: var(--color-text-muted); }
.age-badge {
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--color-red); color: #fff; font-weight: 700;
  width: 24px; height: 24px; border-radius: 50%; font-size: 10px;
  margin-right: var(--space-1); vertical-align: middle;
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 1024px) {
  .main-nav { display: none; }
  .mobile-menu-btn { display: flex; }
  .road-derived { width: 100%; }
}

@media (max-width: 768px) {
  .hero { min-height: auto; padding-top: calc(64px + var(--space-6)); padding-bottom: var(--space-6); }
  .hero-title { font-size: var(--text-2xl); }
  .game-grid { grid-template-columns: 1fr 1fr; }
  .step-cards { grid-template-columns: 1fr; }
  .card-values-grid { grid-template-columns: repeat(2, 1fr); }
  .bet-explained-grid { grid-template-columns: 1fr; }
  .glossary-grid { grid-template-columns: 1fr; }
  .pros-cons { grid-template-columns: 1fr; }
  .trainer-stats { grid-template-columns: repeat(2, 1fr); }
  .hands-display { gap: var(--space-2); }
  .card-inner { width: 52px; height: 74px; }
  .card-center-suit { font-size: 22px; }
  .card-rank { font-size: 11px; }
  .header-real-link { display: none; }
  .sim-controls-grid { grid-template-columns: 1fr 1fr; }
  .history-row { grid-template-columns: 36px 1fr 28px 55px 60px; font-size: 11px; }
}

@media (max-width: 480px) {
  .game-grid { grid-template-columns: 1fr; }
  .features-grid { grid-template-columns: 1fr; }
  .hero-actions { flex-direction: column; align-items: center; }
  .bet-zones { grid-template-columns: 1fr 1fr 1fr; gap: var(--space-2); }
  .bet-zone { padding: var(--space-3); min-height: 60px; }
  .chip-selector { gap: var(--space-2); }
  .chip { width: 46px; height: 46px; }
  .chip span { font-size: 9px; }
  .card-inner { width: 46px; height: 65px; }
  .card-center-suit { font-size: 18px; }
  .card-rank { font-size: 10px; }
  .card-suit-small { font-size: 8px; }
  .sim-controls-grid { grid-template-columns: 1fr; }
  .result-banner { font-size: 1.1rem; }
  .result-strip { min-height: 44px; }
  .no-more-bets-text { font-size: 0.85rem; }
  .hands-display { min-height: 160px; }
  .hand-cards { min-height: 80px; }
  .hand-total { font-size: var(--text-xl); }
  .coach-overlay { max-height: 100px; }
  .coach-text { font-size: 12px; max-height: 70px; }
}

/* ============================================
   VOICE TOGGLE BUTTON
   ============================================ */
.voice-toggle-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 20px;
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  color: var(--color-text-muted);
  font-size: 13px;
  font-family: 'Inter', sans-serif;
  cursor: pointer;
  transition: all 0.25s ease;
}
.voice-toggle-btn:hover {
  border-color: var(--color-gold);
  color: var(--color-gold);
}
.voice-toggle-btn.active {
  border-color: var(--color-gold);
  background: rgba(201, 168, 76, 0.12);
  color: var(--color-gold);
}
.voice-toggle-btn svg { width: 16px; height: 16px; }
.voice-icon-label { font-size: 12px; }

/* ============================================
   COACHING OVERLAY (Play page)
   ============================================ */
.coach-overlay {
  display: none;
  flex-direction: column;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-left: 3px solid var(--color-gold);
  border-radius: 8px;
  padding: 12px 16px;
  margin: 12px 0;
  max-height: 140px;
  transition: all 0.3s ease;
}
.coach-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--color-gold);
  font-family: 'Cormorant Garamond', serif;
  letter-spacing: 0.5px;
}
.coach-header svg { width: 16px; height: 16px; color: var(--color-gold); }
.coach-text {
  font-size: 13px;
  line-height: 1.5;
  color: var(--color-text);
  overflow-y: auto;
  max-height: 90px;
  scrollbar-width: thin;
}
.coach-text strong { color: var(--color-gold); }
.coach-line { display: block; margin-bottom: 4px; }

/* Coach toggle button on Play page */
.coach-toggle-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 8px 0;
}
.coach-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: 24px;
  border: 1px solid var(--color-gold);
  background: transparent;
  color: var(--color-gold);
  font-size: 13px;
  font-weight: 600;
  font-family: 'Inter', sans-serif;
  cursor: pointer;
  transition: all 0.25s ease;
}
.coach-btn:hover, .coach-btn.active {
  background: rgba(201, 168, 76, 0.15);
  box-shadow: 0 0 12px rgba(201, 168, 76, 0.15);
}
.coach-btn.active::after {
  content: ' (ON)';
  font-size: 11px;
  opacity: 0.7;
}
.coach-btn svg { width: 16px; height: 16px; }

/* Trainer voice controls */
.trainer-voice-controls {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}

/* ============================================
   GUIDE PAGES (Learn / Strategy sub-pages)
   ============================================ */
.guide-container {
  max-width: 800px;
  margin: 0 auto;
  padding: var(--space-8) var(--space-4);
}
.guide-header {
  text-align: center;
  margin-bottom: var(--space-8);
  padding-bottom: var(--space-6);
  border-bottom: 1px solid var(--color-border);
}
.guide-header h1 {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 700;
  color: var(--color-gold);
  margin-bottom: var(--space-2);
}
.guide-subtitle {
  font-size: 1.1rem;
  color: var(--color-text-muted);
  font-style: italic;
}
.guide-content,
.guide-container > section {
  font-family: 'Inter', sans-serif;
  font-size: 16px;
  line-height: 1.8;
  color: var(--color-text);
}

/* --- Headings: generous spacing above, breathing room below --- */
.guide-content h2,
.guide-container h2 {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.85rem;
  font-weight: 700;
  color: var(--color-gold);
  margin: var(--space-10, 3.5rem) 0 var(--space-5, 1.5rem);
  padding-bottom: var(--space-3);
  border-bottom: 1px solid var(--color-border);
  line-height: 1.3;
}
.guide-content h2:first-child,
.guide-container h2:first-child {
  margin-top: var(--space-4);
}
.guide-content h3,
.guide-container h3 {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--color-text);
  margin: var(--space-8, 2.5rem) 0 var(--space-4, 1rem);
  line-height: 1.35;
}

/* --- Paragraphs: clear separation --- */
.guide-content p,
.guide-container p {
  margin-bottom: var(--space-5, 1.5rem);
  line-height: 1.8;
}

/* --- Lists --- */
.guide-content ul, .guide-content ol,
.guide-container ul, .guide-container ol {
  margin: var(--space-4) 0 var(--space-5, 1.5rem);
  padding-left: var(--space-6);
}
.guide-content li,
.guide-container li {
  margin-bottom: var(--space-3);
  line-height: 1.7;
}

/* --- Bold text --- */
.guide-content strong,
.guide-container strong {
  color: var(--color-gold);
  font-weight: 600;
}

/* --- Links --- */
.guide-content a,
.guide-container a {
  color: var(--color-gold);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
}
.guide-content a:hover,
.guide-container a:hover {
  opacity: 0.8;
}

/* ---- Tables (both .guide-table and .data-table) ---- */
.guide-table,
.data-table,
.guide-container table {
  width: 100%;
  border-collapse: collapse;
  margin: var(--space-5, 1.5rem) 0 var(--space-6);
  font-size: 14px;
  font-family: 'Inter', sans-serif;
}
.guide-table caption,
.data-table caption,
.guide-container table caption {
  text-align: left;
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: var(--space-3);
  padding-bottom: var(--space-2);
}
.guide-table th,
.data-table th,
.guide-container table th {
  background: var(--color-surface-2, rgba(201, 168, 76, 0.06));
  color: var(--color-gold);
  font-weight: 600;
  text-align: left;
  padding: 12px 16px;
  border-bottom: 2px solid var(--color-gold);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.guide-table td,
.data-table td,
.guide-container table td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--color-border);
  vertical-align: top;
  line-height: 1.6;
}
.guide-table tr:hover td,
.data-table tr:hover td,
.guide-container table tr:hover td {
  background: rgba(201, 168, 76, 0.04);
}
.guide-table-container {
  overflow-x: auto;
  margin: var(--space-5, 1.5rem) 0 var(--space-6);
  -webkit-overflow-scrolling: touch;
}
.guide-table-container table {
  margin: 0;
}

/* ---- Callouts (all class variants) ---- */
.guide-tip, .guide-warning, .guide-example,
.house-tip, .example-box {
  padding: var(--space-5, 1.5rem);
  border-radius: 10px;
  margin: var(--space-6) 0;
  font-size: 15px;
  line-height: 1.7;
}
.guide-tip, .house-tip {
  background: rgba(201, 168, 76, 0.08);
  border-left: 4px solid var(--color-gold);
}
.guide-warning {
  background: rgba(220, 38, 38, 0.08);
  border-left: 4px solid #dc2626;
}
.guide-example, .example-box {
  background: rgba(59, 130, 246, 0.06);
  border-left: 4px solid #3b82f6;
}
.example-box h3 {
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--color-text);
  margin: 0 0 var(--space-3) 0;
  border-bottom: none;
  padding: 0;
}
.example-box p {
  margin-bottom: var(--space-2);
}

/* ---- FAQ sections ---- */
.guide-faq, .faq-section {
  margin-top: var(--space-10, 3.5rem);
  padding-top: var(--space-6);
  border-top: 2px solid var(--color-border);
}
.guide-faq h2, .faq-section h2 {
  border-bottom: none;
  margin-top: 0;
}
.guide-faq details {
  border-bottom: 1px solid var(--color-border);
  padding: var(--space-3) 0;
}
.faq-item {
  margin-bottom: var(--space-5, 1.5rem);
  padding-bottom: var(--space-4);
  border-bottom: 1px solid var(--color-border);
}
.faq-item:last-child {
  border-bottom: none;
}
.faq-item h3 {
  font-family: 'Inter', sans-serif;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--color-text);
  margin: 0 0 var(--space-2) 0;
}
.faq-item p {
  font-size: 15px;
  color: var(--color-text-muted);
  margin: 0;
  line-height: 1.7;
}
.guide-faq summary {
  cursor: pointer;
  font-weight: 600;
  color: var(--color-text);
  padding: var(--space-2) 0;
  list-style: none;
}
.guide-faq summary::before {
  content: '+';
  display: inline-block;
  width: 20px;
  color: var(--color-gold);
  font-weight: 700;
  font-size: 1.1em;
}
.guide-faq details[open] summary::before {
  content: '−';
}
.guide-faq details > div {
  padding: var(--space-2) 0 var(--space-3) 20px;
  color: var(--color-text-muted);
  line-height: 1.6;
}

/* Wider dropdown for Learn */
.dropdown-wide {
  min-width: 320px;
}
.dropdown-wide.open {
  display: block;
}
@media (min-width: 768px) {
  .dropdown-wide.open {
    display: grid;
    grid-template-columns: 1fr 1fr;
    min-width: 480px;
  }
}

/* Footer columns */
.footer-links {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-6);
  margin: var(--space-6) 0;
}
.footer-col h4 {
  font-family: 'Cormorant Garamond', serif;
  font-size: 14px;
  font-weight: 700;
  color: var(--color-gold);
  margin-bottom: var(--space-3);
  text-transform: uppercase;
  letter-spacing: 1px;
}
.footer-col a {
  display: block;
  font-size: 13px;
  color: var(--color-text-muted);
  text-decoration: none;
  padding: 3px 0;
  transition: color 0.2s;
}
.footer-col a:hover {
  color: var(--color-gold);
}
@media (max-width: 640px) {
  .footer-links {
    grid-template-columns: 1fr 1fr;
    gap: var(--space-4);
  }
  .guide-container {
    padding: var(--space-4) var(--space-3);
  }
  .guide-header h1 {
    font-size: 1.75rem;
  }
  .guide-content {
    font-size: 15px;
  }
  .guide-table {
    font-size: 12px;
  }
  .guide-table th, .guide-table td {
    padding: 8px 10px;
  }
}

/* ==================== NEWS SECTION ==================== */

.news-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: var(--space-6);
  margin-top: var(--space-6);
}

.news-card {
  display: flex;
  flex-direction: column;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 12px;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.news-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0,0,0,0.3);
}

.news-card-image {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 8;
}

.news-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.news-card:hover .news-card-image img {
  transform: scale(1.05);
}

.news-card-category {
  position: absolute;
  top: 12px;
  left: 12px;
  background: var(--color-gold);
  color: #0a0b10;
  font-family: 'Inter', sans-serif;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 4px 10px;
  border-radius: 4px;
}

.news-card-body {
  padding: var(--space-4) var(--space-5);
  flex: 1;
  display: flex;
  flex-direction: column;
}

.news-card-body h2 {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.4rem;
  font-weight: 600;
  line-height: 1.3;
  margin-bottom: var(--space-2);
  color: var(--color-text);
}

.news-card-body p {
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  line-height: 1.6;
  color: var(--color-text-muted);
  flex: 1;
}

.news-card-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: var(--space-3);
  padding-top: var(--space-3);
  border-top: 1px solid var(--color-border);
  font-family: 'Inter', sans-serif;
  font-size: 12px;
  color: var(--color-text-faint);
}

/* Article-specific styles */
.article-meta {
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  color: var(--color-text-faint);
  margin-bottom: var(--space-6);
  padding-bottom: var(--space-3);
  border-bottom: 1px solid var(--color-border);
}

.article-meta time {
  color: var(--color-gold);
}

.article-image {
  margin: var(--space-6) 0;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--color-border);
}

.article-image img {
  width: 100%;
  display: block;
}

.article-image figcaption {
  padding: var(--space-3) var(--space-4);
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  color: var(--color-text-faint);
  background: var(--color-surface);
}

/* Footer promo text */
.footer-promo {
  font-size: 12px;
  color: var(--color-text-faint);
  margin-top: 4px;
  line-height: 1.4;
}

/* Note style for article */
.guide-note {
  font-size: 13px;
  color: var(--color-text-faint);
  font-style: italic;
  margin-top: var(--space-2);
}

@media (max-width: 640px) {
  .news-grid {
    grid-template-columns: 1fr;
    gap: var(--space-4);
  }
  .news-card-body {
    padding: var(--space-3) var(--space-4);
  }
  .news-card-body h2 {
    font-size: 1.2rem;
  }
}
