:root {
  /* Felt — richer emerald with depth */
  --felt-0: #1f6e4f;
  --felt-1: #134d36;
  --felt-2: #0a2c1f;
  --felt-3: #051a13;
  --felt-deep: #03110b;

  /* Gold — full brass spectrum */
  --gold-shine: #fff5d6;
  --gold-soft:  #f0d999;
  --gold:       #d9b46a;
  --brass:      #b08945;
  --gold-deep:  #6e4f12;
  --gold-shadow:#3a2807;

  /* Accents */
  --burgundy: #4a0e1a;
  --ruby:     #c8323a;
  --velvet:   #1a0d1e;

  /* Ink */
  --ink:      #f6f1e6;
  --ink-dim:  #b9b09c;
  --ink-mute: #7d7666;
  --ink-soft: #d6cbb0;

  /* Card stock */
  --card-bg:    #fbf9f3;
  --card-edge:  #e8e2cf;
  --card-shine: #ffffff;

  /* Suits */
  --red:   #b8262d;
  --black: #1a1a1a;

  /* Status */
  --good: #6ee08a;
  --bad:  #ff7a7a;
  --warn: #f0c24b;

  /* Surfaces */
  --panel:        rgba(255, 255, 255, 0.04);
  --panel-line:   rgba(255, 255, 255, 0.08);
  --panel-strong: rgba(0, 0, 0, 0.32);
  --gold-trim:    rgba(217, 180, 106, 0.22);

  /* Shadows */
  --shadow-card: 0 22px 50px rgba(0, 0, 0, 0.55), 0 6px 12px rgba(0, 0, 0, 0.4);
  --shadow-soft: 0 14px 40px rgba(0, 0, 0, 0.45);
  --shadow-deep: 0 30px 60px rgba(0, 0, 0, 0.5), 0 10px 20px rgba(0, 0, 0, 0.35);
  --glow-gold:   0 0 24px rgba(217, 180, 106, 0.25);
}

* { box-sizing: border-box; }
html, body { height: 100%; }
html { -webkit-text-size-adjust: 100%; }

* { -webkit-tap-highlight-color: transparent; }

button, .he-slot, .tab, .chip, label.check, .he-mini-btn, .he-picker-cell, .bj-card, .bj-stat {
  touch-action: manipulation;
}
button, .tab, .chip, label.check, .he-mini-btn, .he-picker-cell {
  -webkit-user-select: none;
  user-select: none;
}

body {
  margin: 0;
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  color: var(--ink);
  background:
    /* Warm spotlight from above */
    radial-gradient(800px 500px at 50% -8%, rgba(255, 220, 160, 0.08) 0%, transparent 60%),
    /* Subtle gold haze at top corners */
    radial-gradient(600px 400px at 0% 5%, rgba(217, 180, 106, 0.06) 0%, transparent 50%),
    radial-gradient(600px 400px at 100% 5%, rgba(217, 180, 106, 0.06) 0%, transparent 50%),
    /* Main felt gradient */
    radial-gradient(1400px 900px at 50% 0%, var(--felt-0) 0%, var(--felt-1) 28%, var(--felt-2) 65%, var(--felt-3) 88%, var(--felt-deep) 100%);
  background-attachment: fixed;
  min-height: 100%;
  /* Safe-area aware padding for notch / home indicator */
  padding:
    calc(28px + env(safe-area-inset-top, 0px))
    calc(18px + env(safe-area-inset-right, 0px))
    calc(80px + env(safe-area-inset-bottom, 0px))
    calc(18px + env(safe-area-inset-left, 0px));
  overflow-x: hidden;
  position: relative;
}

/* Subtle suit pattern overlay across the whole page — barely there but adds richness */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: 0.05;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='120' height='120' viewBox='0 0 120 120'><g fill='%23ffffff' font-family='serif' font-size='24' text-anchor='middle'><text x='30' y='38'>♠</text><text x='90' y='38'>♥</text><text x='30' y='98'>♦</text><text x='90' y='98'>♣</text></g></svg>");
  background-size: 200px 200px;
  mix-blend-mode: overlay;
}

.vignette {
  position: fixed; inset: 0; pointer-events: none; z-index: 0;
  background: radial-gradient(ellipse at 50% 30%, transparent 0%, transparent 40%, rgba(0,0,0,0.45) 100%);
}
.grain {
  position: fixed; inset: 0; pointer-events: none; z-index: 0;
  opacity: 0.06; mix-blend-mode: overlay;
  background-image:
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0  0 0 0 0 0  0 0 0 0 0  0 0 0 0.5 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}

header, nav, main, footer { position: relative; z-index: 1; }

header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1080px;
  margin: 0 auto 18px;
  gap: 20px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--gold-trim);
  position: relative;
}
.header-btn {
  width: 40px; height: 40px;
  border-radius: 50%;
  font-family: "Fraunces", serif;
  font-weight: 700;
  font-size: 22px;
  background: linear-gradient(180deg, rgba(217, 180, 106, 0.12), rgba(0, 0, 0, 0.4));
  border: 1px solid rgba(217, 180, 106, 0.35);
  color: var(--gold-soft);
  padding: 0;
  cursor: pointer;
  flex-shrink: 0;
  box-shadow:
    inset 0 1px 0 rgba(217, 180, 106, 0.25),
    0 4px 10px rgba(0, 0, 0, 0.35);
}
/* Permanent Upgrade to Pro button — visible on every screen so the IAP is
   always discoverable (App Review 2.1(b) requirement). Hidden once the user
   activates Pro. */
.header-upgrade {
  display: inline-flex; align-items: center; gap: 6px;
  height: 40px; padding: 0 16px;
  border-radius: 999px;
  font: inherit;
  font-weight: 800; font-size: 13px;
  letter-spacing: 0.02em;
  background: linear-gradient(135deg, #fff5d6 0%, #d9b46a 50%, #b08945 100%);
  color: #1a1208;
  border: 1px solid #d9b46a;
  cursor: pointer;
  flex-shrink: 0;
  box-shadow:
    0 4px 14px rgba(217, 180, 106, 0.45),
    inset 0 1px 0 rgba(255, 255, 255, 0.5);
  transition: transform 0.12s ease, box-shadow 0.18s ease;
  margin-right: 6px;
}
.header-upgrade:hover {
  transform: translateY(-1px);
  box-shadow:
    0 6px 22px rgba(217, 180, 106, 0.6),
    inset 0 1px 0 rgba(255, 255, 255, 0.6);
}
/* Hide the Upgrade button once Pro is active (pro.js adds .is-pro to html) */
html.is-pro .header-upgrade { display: none; }
@media (max-width: 380px) {
  /* On narrow screens, shrink to icon-only to avoid overflow */
  .header-upgrade { font-size: 0; padding: 0 12px; }
  .header-upgrade::before { content: "⭐ Pro"; font-size: 13px; }
}
.header-btn:hover {
  background: linear-gradient(180deg, rgba(217, 180, 106, 0.22), rgba(0, 0, 0, 0.4));
  color: var(--gold-shine);
  border-color: rgba(217, 180, 106, 0.55);
}
/* Double-line gold trim under header — Vegas plaque feel */
header::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -3px;
  height: 1px;
  background: linear-gradient(90deg,
    transparent 0%,
    var(--gold-trim) 15%,
    rgba(217, 180, 106, 0.35) 50%,
    var(--gold-trim) 85%,
    transparent 100%);
}

.brand {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
}
/* Wordmark logo (logo.svg). Built-in viewBox is 960×280 so it scales fluidly.
   Keep it constrained on small screens via clamp + max-width. */
.brand-logo {
  display: block;
  width: clamp(180px, 32vw, 280px);
  height: auto;
  filter:
    drop-shadow(0 6px 14px rgba(0, 0, 0, 0.55))
    drop-shadow(0 0 22px rgba(217, 180, 106, 0.18));
}
/* Old inline-SVG mark — keep the rule for any stragglers, but we no longer use it */
.brand-mark {
  width: 56px; height: 56px;
  filter:
    drop-shadow(0 8px 14px rgba(0, 0, 0, 0.5))
    drop-shadow(0 0 20px rgba(217, 180, 106, 0.18));
}
h1 {
  margin: 0 0 2px;
  font-family: "Fraunces", "Times New Roman", serif;
  font-weight: 900;
  font-size: clamp(24px, 3.4vw, 36px);
  letter-spacing: -0.015em;
  background: linear-gradient(180deg,
    var(--gold-shine) 0%,
    var(--gold-soft) 40%,
    var(--gold) 70%,
    var(--brass) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.5)) drop-shadow(0 0 16px rgba(217, 180, 106, 0.15));
}
.kicker {
  margin: 0;
  color: var(--ink-soft);
  font-size: 13px;
  font-style: italic;
  font-family: "Fraunces", serif;
  font-weight: 500;
  letter-spacing: 0.01em;
  opacity: 0.7;
}

nav.tabs {
  max-width: 1080px;
  margin: 0 auto 22px;
  display: flex;
  gap: 4px;
  /* Polished brass trim with inset felt */
  background:
    linear-gradient(180deg, rgba(8, 30, 22, 0.85) 0%, rgba(3, 17, 11, 0.95) 100%);
  border: 1px solid rgba(217, 180, 106, 0.18);
  border-radius: 14px;
  padding: 5px;
  position: relative;
  box-shadow:
    inset 0 1px 0 rgba(217, 180, 106, 0.18),
    inset 0 -1px 0 rgba(0, 0, 0, 0.4),
    0 8px 22px rgba(0, 0, 0, 0.35);
}
nav.tabs .tab {
  flex: 1;
  background: transparent;
  border: none;
  padding: 11px 16px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 14px;
  letter-spacing: 0.04em;
  color: var(--ink-dim);
  cursor: pointer;
  transition: background 0.18s ease, color 0.18s ease, transform 0.08s ease;
  position: relative;
}
nav.tabs .tab:hover { color: var(--ink-soft); background: rgba(217, 180, 106, 0.04); }
nav.tabs .tab.active {
  background:
    linear-gradient(180deg, #3a2a10 0%, #2c1f08 50%, #15100a 100%);
  color: var(--gold-soft);
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.6);
  box-shadow:
    inset 0 1px 0 rgba(217, 180, 106, 0.35),
    inset 0 -1px 0 rgba(0, 0, 0, 0.5),
    0 0 16px rgba(217, 180, 106, 0.18),
    0 6px 14px rgba(0, 0, 0, 0.4);
}
/* Marquee bulb under active tab — soft glow */
nav.tabs .tab.active::before {
  content: "";
  position: absolute;
  top: 5px;
  left: 50%;
  transform: translateX(-50%);
  width: 24px;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--gold-shine), transparent);
  border-radius: 999px;
  box-shadow: 0 0 8px rgba(240, 217, 153, 0.6);
  opacity: 0.8;
}

main {
  max-width: 1080px;
  margin: 0 auto;
  display: block;
}

main > section[data-view] {
  display: grid;
  gap: 16px;
}
main > section[hidden] { display: none; }

.view-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 14px;
  margin-bottom: -8px;
}
.view-head h2 {
  font-family: "Fraunces", serif;
  font-weight: 700;
  font-size: 22px;
  margin: 0;
  color: var(--gold-soft);
  letter-spacing: -0.01em;
}

.tagline { margin: 0 0 4px; color: var(--ink-dim); font-size: 13px; font-variant-numeric: tabular-nums; }
.tagline b { color: var(--gold); font-weight: 600; }

.badge {
  background: linear-gradient(180deg, #2c1f08, #1a1305);
  color: var(--gold-soft);
  border: 1px solid rgba(217, 180, 106, 0.4);
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 12px; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.12em;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
  white-space: nowrap;
}

.panel {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.05) 0%, rgba(255, 255, 255, 0.02) 100%),
    rgba(8, 25, 18, 0.4);
  border: 1px solid var(--panel-line);
  border-radius: 16px;
  padding: 18px;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  position: relative;
  box-shadow:
    inset 0 1px 0 rgba(217, 180, 106, 0.12),
    inset 0 -1px 0 rgba(0, 0, 0, 0.35),
    0 24px 48px rgba(0, 0, 0, 0.32);
}
/* Subtle gold corner trim — brass plaque feel */
.panel::before, .panel::after {
  content: "";
  position: absolute;
  width: 18px; height: 18px;
  border: 1px solid rgba(217, 180, 106, 0.22);
  pointer-events: none;
  border-radius: 2px;
}
.panel::before {
  top: 6px; left: 6px;
  border-right: none; border-bottom: none;
  border-top-left-radius: 14px;
}
.panel::after {
  bottom: 6px; right: 6px;
  border-left: none; border-top: none;
  border-bottom-right-radius: 14px;
}

.row { display: flex; flex-wrap: wrap; gap: 12px 14px; align-items: end; }
.row.actions { margin-top: 14px; align-items: center; }
.row.presets { margin-top: 12px; align-items: center; gap: 8px; }
.preset-label { color: var(--ink-dim); font-size: 12px; text-transform: uppercase; letter-spacing: 0.1em; }

label {
  display: flex; flex-direction: column; gap: 6px;
  font-size: 11px; color: var(--ink-dim);
  text-transform: uppercase; letter-spacing: 0.1em;
}
label.check {
  flex-direction: row; align-items: center;
  text-transform: none; letter-spacing: 0;
  font-size: 13px; color: var(--ink);
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid var(--panel-line);
  padding: 8px 12px; border-radius: 10px;
  cursor: pointer; user-select: none;
}
label.check:hover { background: rgba(255, 255, 255, 0.06); }

select, input[type="number"] {
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0.5) 0%, rgba(0, 0, 0, 0.35) 100%);
  color: var(--ink);
  border: 1px solid rgba(217, 180, 106, 0.18);
  padding: 9px 11px; border-radius: 10px;
  font-family: "JetBrains Mono", ui-monospace, Menlo, monospace;
  font-size: 14px; font-weight: 500;
  min-width: 130px; outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
  box-shadow:
    inset 0 1px 2px rgba(0, 0, 0, 0.5),
    inset 0 0 0 1px rgba(255, 255, 255, 0.02);
}
select:focus, input[type="number"]:focus {
  border-color: var(--gold);
  box-shadow:
    inset 0 1px 2px rgba(0, 0, 0, 0.4),
    0 0 0 3px rgba(217, 180, 106, 0.22),
    0 0 16px rgba(217, 180, 106, 0.15);
}
input[type="number"] {
  font-size: 28px; font-weight: 700; text-align: center; width: 130px; min-width: 0;
  font-variant-numeric: tabular-nums;
}

button {
  font: inherit; font-weight: 600;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.06) 0%, rgba(0, 0, 0, 0.18) 100%);
  color: var(--ink);
  border: 1px solid rgba(217, 180, 106, 0.14);
  padding: 10px 16px; border-radius: 10px;
  cursor: pointer;
  letter-spacing: 0.02em;
  transition: transform 0.08s ease, background 0.18s ease, border-color 0.18s ease, color 0.18s ease, box-shadow 0.18s ease;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    inset 0 -1px 0 rgba(0, 0, 0, 0.2);
}
button:hover:not(:disabled) {
  background: linear-gradient(180deg, rgba(217, 180, 106, 0.1) 0%, rgba(0, 0, 0, 0.18) 100%);
  border-color: rgba(217, 180, 106, 0.32);
  color: var(--gold-soft);
}
button:active:not(:disabled) { transform: translateY(1px); }
button:disabled { opacity: 0.35; cursor: not-allowed; }

button.primary {
  /* Polished brass — multi-stop gradient for that real-metal feel */
  background:
    linear-gradient(180deg,
      var(--gold-shine) 0%,
      #f0d186 8%,
      #d9b46a 32%,
      var(--brass) 60%,
      #8e6618 92%,
      var(--gold-deep) 100%);
  color: #2a1a02;
  border: 1px solid var(--gold-shadow);
  letter-spacing: 0.02em;
  font-weight: 700;
  text-shadow:
    0 1px 0 rgba(255, 255, 255, 0.45),
    0 -1px 0 rgba(0, 0, 0, 0.12);
  box-shadow:
    inset 0 1.5px 0 rgba(255, 255, 255, 0.6),
    inset 0 -1.5px 0 rgba(0, 0, 0, 0.18),
    inset 0 0 0 1px rgba(255, 240, 200, 0.18),
    0 8px 22px rgba(184, 143, 58, 0.4),
    0 2px 4px rgba(0, 0, 0, 0.3);
  transition: transform 0.08s ease, box-shadow 0.18s ease, filter 0.18s ease;
}
button.primary:hover:not(:disabled) {
  filter: brightness(1.08);
  box-shadow:
    inset 0 1.5px 0 rgba(255, 255, 255, 0.7),
    inset 0 -1.5px 0 rgba(0, 0, 0, 0.18),
    inset 0 0 0 1px rgba(255, 240, 200, 0.3),
    0 12px 28px rgba(217, 180, 106, 0.5),
    0 0 32px rgba(217, 180, 106, 0.25);
}
button.big { font-size: 16px; padding: 14px 22px; margin-top: 14px; letter-spacing: 0.05em; }
button.ghost {
  background: transparent;
  border-color: rgba(217, 180, 106, 0.22);
  color: var(--ink-soft);
}
button.ghost:hover:not(:disabled) {
  background: rgba(217, 180, 106, 0.06);
  border-color: rgba(217, 180, 106, 0.35);
  color: var(--gold-soft);
}
button.chip {
  padding: 6px 14px;
  font-size: 13px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.3);
  border-color: rgba(217, 180, 106, 0.15);
}
button.chip:hover:not(:disabled) {
  background: rgba(217, 180, 106, 0.08);
  border-color: rgba(217, 180, 106, 0.3);
}
button.chip.active {
  background: linear-gradient(180deg, #3a2a10 0%, #2c1f08 60%, #15100a 100%);
  color: var(--gold-soft);
  border-color: rgba(217, 180, 106, 0.5);
  box-shadow:
    inset 0 1px 0 rgba(217, 180, 106, 0.3),
    0 0 12px rgba(217, 180, 106, 0.18);
}

/* ============= TRAINER ============= */
.table {
  position: relative;
  display: flex; flex-direction: column; align-items: center;
  gap: 18px;
  padding: 30px 18px 24px;
  background:
    /* Top spotlight */
    radial-gradient(ellipse 600px 300px at 50% 0%, rgba(255, 230, 180, 0.07) 0%, transparent 60%),
    /* Center warm glow */
    radial-gradient(ellipse 600px 380px at 50% 38%, rgba(255, 220, 160, 0.05) 0%, transparent 65%),
    /* Felt base */
    linear-gradient(180deg, rgba(15, 60, 42, 0.55) 0%, rgba(8, 35, 25, 0.7) 100%);
  border-radius: 20px;
  border: 1px solid var(--gold-trim);
  box-shadow:
    inset 0 0 0 1px rgba(217, 180, 106, 0.12),
    inset 0 0 0 7px rgba(8, 30, 22, 0.6),
    inset 0 0 100px rgba(0, 0, 0, 0.4),
    0 30px 70px rgba(0, 0, 0, 0.45),
    0 10px 24px rgba(0, 0, 0, 0.3);
  min-height: 360px;
  overflow: hidden;
}
/* Felt micro-texture noise — adds richness */
.table::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.18;
  mix-blend-mode: overlay;
  background-image:
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='200' height='200'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='1.2' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0  0 0 0 0 0  0 0 0 0 0  0 0 0 0.6 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
  border-radius: 20px;
}
/* Dashed gold inner border — like real casino felt rails */
.table::before {
  content: "";
  position: absolute;
  inset: 14px;
  border-radius: 14px;
  border: 1px dashed rgba(217, 180, 106, 0.25);
  pointer-events: none;
  z-index: 1;
}
.table > * { position: relative; z-index: 2; }

.rail-top { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; width: 100%; max-width: 720px; }
.meta-item {
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  font-variant-numeric: tabular-nums;
}
.meta-item .lbl { font-size: 10px; color: var(--ink-dim); text-transform: uppercase; letter-spacing: 0.14em; }
.meta-item span:not(.lbl) { font-size: 22px; font-weight: 700; font-family: "JetBrains Mono", monospace; }
.meta-item .muted-num { font-size: 11px; color: var(--ink-mute); font-weight: 500; }
.meta-item.live span:not(.lbl) { color: var(--gold-soft); }

.pen-bar { width: 90%; max-width: 140px; height: 6px; background: rgba(0,0,0,0.4); border-radius: 999px; overflow: hidden; border: 1px solid rgba(255,255,255,0.05); }
.pen-fill { height: 100%; width: 0%; background: linear-gradient(90deg, var(--gold), var(--gold-soft)); transition: width 0.25s ease; }

.card-stage {
  position: relative;
  width: 180px;
  height: 252px;
  perspective: 1200px;
}
/* Spotlight cone — pure Vegas */
.card-stage::before {
  content: "";
  position: absolute;
  top: -60px;
  left: 50%;
  transform: translateX(-50%);
  width: 320px;
  height: 320px;
  background: radial-gradient(circle, rgba(255, 230, 180, 0.06) 0%, transparent 60%);
  pointer-events: none;
  z-index: -1;
  filter: blur(8px);
}
.card {
  position: absolute; inset: 0; width: 180px; height: 252px;
  border-radius: 14px;
  background:
    linear-gradient(180deg, var(--card-shine) 0%, var(--card-bg) 8%, var(--card-bg) 92%, #f0eadb 100%);
  border: 1px solid var(--card-edge);
  box-shadow:
    var(--shadow-card),
    inset 0 1px 0 rgba(255, 255, 255, 0.9),
    inset 0 -1px 0 rgba(0, 0, 0, 0.05);
  user-select: none; transform-style: preserve-3d;
  transition: transform 0.45s cubic-bezier(.2,.7,.3,1);
}
.card.placeholder { background: transparent; border: none; box-shadow: none; }
.card .back {
  width: 100%; height: 100%; border-radius: 14px;
  border: 6px solid var(--card-bg);
  background:
    radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.12) 0%, transparent 50%),
    repeating-linear-gradient(45deg, #8a1f24 0 10px, #6a1418 10px 20px),
    repeating-linear-gradient(-45deg, transparent 0 10px, rgba(0,0,0,0.15) 10px 20px);
  background-blend-mode: normal, normal, multiply;
  box-shadow: var(--shadow-card); position: relative;
}
.card .back::after {
  content: ""; position: absolute; inset: 12px;
  border: 1.5px solid rgba(255, 255, 255, 0.2); border-radius: 8px;
}

.card-face {
  position: absolute; inset: 0; padding: 10px 12px;
  display: grid; grid-template-columns: auto 1fr auto; grid-template-rows: auto 1fr auto;
  font-family: "Fraunces", "Times New Roman", serif;
}
.card-face .corner { display: flex; flex-direction: column; align-items: center; line-height: 0.95; font-weight: 700; }
.card-face .corner.tl { grid-row: 1; grid-column: 1; }
.card-face .corner.br { grid-row: 3; grid-column: 3; transform: rotate(180deg); }
.card-face .corner .rank { font-size: 26px; }
.card-face .corner .suit-sm { font-size: 22px; line-height: 1; margin-top: 1px; }
.card-face .pips { grid-row: 1 / 4; grid-column: 2; display: grid; align-items: stretch; justify-items: center; padding: 8px 0; }
.card-face .pips.center { place-items: center; }
.card-face .pips.center .big-suit { font-size: 78px; line-height: 1; }
.card-face .pips .pip { line-height: 1; font-size: 26px; }
.card-face .pips.face-art { place-items: center; font-family: "Fraunces", serif; font-weight: 900; }
.card-face .pips.face-art .glyph { font-size: 110px; line-height: 1; letter-spacing: -0.05em; text-shadow: 0 2px 0 rgba(0,0,0,0.05); }
.card.red  .card-face { color: var(--red); }
.card.black .card-face { color: var(--black); }

.card.deal-in { animation: dealFlip 0.45s cubic-bezier(.2,.7,.3,1.05); }
@keyframes dealFlip {
  0%   { transform: translate(-180px, -160px) rotate(-18deg) rotateY(180deg); opacity: 0; }
  60%  { opacity: 1; }
  100% { transform: translate(0,0) rotate(0) rotateY(0); opacity: 1; }
}

.card .value-pop {
  position: absolute; right: -10px; top: -12px;
  background: linear-gradient(180deg, #f0d186, #c89a40);
  color: #261800; font-weight: 800; font-size: 13px;
  padding: 4px 9px; border-radius: 999px;
  border: 1px solid #6e4f12;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
  font-family: "JetBrains Mono", monospace;
  animation: popIn 0.4s ease;
}
@keyframes popIn { from { transform: scale(0.4); opacity: 0; } to { transform: scale(1); opacity: 1; } }

.trail { display: flex; gap: 4px; flex-wrap: wrap; justify-content: center; min-height: 32px; max-width: 720px; }
.trail .pip {
  width: 24px; height: 32px; border-radius: 4px; background: var(--card-bg);
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700; font-family: "Fraunces", serif;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.35);
  border: 1px solid var(--card-edge);
  animation: trailIn 0.25s ease;
}
@keyframes trailIn { from { opacity: 0; transform: translateY(-4px) scale(0.85); } to { opacity: 1; transform: none; } }
.trail .pip.red { color: var(--red); } .trail .pip.black { color: var(--black); }

.answer { text-align: center; }
.answer h2 { margin: 0 0 16px; font-size: 18px; color: var(--gold-soft); font-family: "Fraunces", serif; font-weight: 700; }
.answer h3 { margin: 22px 0 10px; font-size: 13px; color: var(--ink-dim); font-weight: 500; text-transform: uppercase; letter-spacing: 0.1em; }
.answer-controls { display: inline-flex; align-items: center; gap: 12px; }
.answer-controls .step { width: 48px; height: 48px; font-size: 24px; border-radius: 50%; padding: 0; font-weight: 700; }
.quick-row { margin-top: 14px; display: flex; gap: 6px; justify-content: center; flex-wrap: wrap; }
.quick-row button { padding: 6px 12px; font-size: 13px; font-family: "JetBrains Mono", monospace; }

.result { text-align: center; }
.verdict {
  font-family: "Fraunces", serif;
  font-size: 38px;
  font-weight: 900;
  margin-bottom: 16px;
  letter-spacing: -0.02em;
  text-transform: uppercase;
  position: relative;
  display: inline-block;
}
.verdict.good {
  background: linear-gradient(180deg, #d3ffe1 0%, #6ee08a 50%, #3aa356 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 0 30px rgba(110, 224, 138, 0.5)) drop-shadow(0 2px 6px rgba(0, 0, 0, 0.4));
}
.verdict.bad {
  background: linear-gradient(180deg, #ffd4d4 0%, #ff7a7a 50%, #c84040 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 0 30px rgba(255, 122, 122, 0.4)) drop-shadow(0 2px 6px rgba(0, 0, 0, 0.4));
}

.bet-hint { margin-top: 6px; margin-bottom: 4px; color: var(--ink-dim); font-size: 13px; font-style: italic; }
.bet-hint b { color: var(--gold-soft); font-style: normal; font-weight: 600; }

.result-grid, .stats-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 12px; margin-bottom: 4px;
}
.result-grid > div, .stats-grid > div {
  background:
    linear-gradient(180deg, rgba(217, 180, 106, 0.04) 0%, rgba(0, 0, 0, 0.4) 100%);
  border: 1px solid rgba(217, 180, 106, 0.15);
  padding: 12px 10px; border-radius: 12px;
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  box-shadow:
    inset 0 1px 0 rgba(217, 180, 106, 0.18),
    inset 0 -1px 0 rgba(0, 0, 0, 0.3),
    0 4px 12px rgba(0, 0, 0, 0.2);
}
.result-grid .lbl, .stats-grid .lbl { font-size: 10px; color: var(--ink-dim); text-transform: uppercase; letter-spacing: 0.14em; }
.result-grid span:not(.lbl), .stats-grid span:not(.lbl) {
  font-size: 22px; font-weight: 700; font-family: "JetBrains Mono", monospace;
  font-variant-numeric: tabular-nums;
}

.stats-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; gap: 14px; }
.stats h2 { margin: 0; font-family: "Fraunces", serif; font-size: 18px; color: var(--gold-soft); font-weight: 700; }
.spark-wrap { background: var(--panel-strong); padding: 6px 8px; border-radius: 8px; border: 1px solid var(--panel-line); }
#spark { display: block; }

footer { text-align: center; color: var(--ink-mute); font-size: 12px; margin-top: 28px; font-family: "JetBrains Mono", monospace; }

#confetti { position: fixed; inset: 0; pointer-events: none; z-index: 5; }

/* 3D character canvas — fixed overlay, doesn't intercept pointer events */
#hg3DCanvas {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 3; /* above table felt, below modals/picker */
}

/* =============================================================
   HOLD'EM CAREER MODE — venues, bankroll, cash out
   ============================================================= */

.hg-career-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  padding: 14px 16px;
}
.hg-career-stat {
  display: flex; flex-direction: column; align-items: flex-start; gap: 2px;
  font-variant-numeric: tabular-nums;
  flex: 1 1 80px;
  min-width: 0;
}
.hg-career-bar button {
  flex: 0 0 auto;
  white-space: nowrap;
  font-size: 12px;
  padding: 8px 12px;
  min-height: 36px;
}
#hgStatsBtn { font-weight: 700; color: var(--gold-soft); }
#hgResetCareer { font-size: 11px; opacity: 0.7; padding: 6px 10px; }
#hgResetCareer:hover { opacity: 1; }
.hg-career-stat .lbl {
  font-size: 10px; color: var(--ink-dim);
  text-transform: uppercase; letter-spacing: 0.16em;
}
.hg-career-stat span:not(.lbl) {
  font-size: 22px; font-weight: 800; font-family: "JetBrains Mono", monospace;
  color: var(--ink);
}
.hg-bankroll-num {
  background: linear-gradient(180deg, var(--gold-shine), var(--gold) 70%, var(--brass));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hg-venue-panel { padding: 22px; }
.hg-venue-panel h3 {
  margin: 0 0 8px;
  font-family: "Fraunces", serif;
  font-weight: 800;
  font-size: 22px;
  color: var(--gold-soft);
  letter-spacing: -0.01em;
}
.hg-venue-help {
  margin: 0 0 18px;
  color: var(--ink-soft);
  font-size: 13px;
  line-height: 1.5;
}

.hg-venue-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 14px;
}

.hg-venue-card {
  --venue-accent: #5a7a3a;
  --venue-image: none;
  background-color: #14110a;
  /* Photo (if set) → dark gradient on top so text is readable → fallback dim */
  background-image:
    linear-gradient(180deg, rgba(8, 6, 4, 0.55) 0%, rgba(8, 6, 4, 0.78) 55%, rgba(0, 0, 0, 0.92) 100%),
    var(--venue-image);
  background-size: cover, cover;
  background-position: center, center;
  background-repeat: no-repeat, no-repeat;
  border: 1px solid var(--panel-line);
  border-radius: 14px;
  padding: 16px 14px 12px;
  text-align: left;
  cursor: pointer;
  font: inherit;
  color: var(--ink);
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 10px;
  overflow: hidden;
  min-height: 320px;
  transition: transform 0.12s ease, border-color 0.18s ease, box-shadow 0.18s ease;
  letter-spacing: 0;
}
.hg-venue-card::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0; height: 4px;
  background: linear-gradient(90deg, var(--venue-accent), transparent);
  pointer-events: none;
  /* No z-index — natural stacking puts ::before behind content,
     and background-image is always painted under both. */
}
.hg-venue-card:hover:not(:disabled) {
  transform: translateY(-3px);
  border-color: var(--gold);
  box-shadow:
    inset 0 1px 0 rgba(217, 180, 106, 0.2),
    0 0 24px rgba(217, 180, 106, 0.18),
    0 14px 30px rgba(0, 0, 0, 0.4);
}
.hg-venue-card:disabled { cursor: not-allowed; }
/* Locked: hide the photo (preserve unlock surprise) + dim */
.hg-venue-card.locked {
  background-image: linear-gradient(180deg, rgba(255, 255, 255, 0.04) 0%, rgba(0, 0, 0, 0.55) 100%);
  opacity: 0.55;
}
.hg-venue-card.broke { opacity: 0.7; }
/* Cleared: keep photo, add green-tinted overlay above the standard dark gradient.
   IMPORTANT: use background-image (longhand), not background (shorthand),
   so we don't wipe the photo set on .hg-venue-card. */
.hg-venue-card.cleared {
  background-image:
    linear-gradient(180deg, rgba(110, 224, 138, 0.18) 0%, rgba(8, 30, 14, 0.7) 55%, rgba(0, 14, 6, 0.92) 100%),
    var(--venue-image);
}

.hg-venue-head {
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 4px;
}
.hg-venue-icon {
  font-size: 36px;
  line-height: 1;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.5));
}
.hg-venue-num {
  font-family: "JetBrains Mono", monospace;
  font-weight: 700; font-size: 12px;
  color: var(--ink-dim);
  background: rgba(0, 0, 0, 0.4);
  padding: 3px 9px;
  border-radius: 999px;
  border: 1px solid var(--panel-line);
}
.hg-venue-cleared-tag {
  margin-left: auto;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--good);
  background: rgba(110, 224, 138, 0.15);
  padding: 3px 9px;
  border-radius: 999px;
  border: 1px solid rgba(110, 224, 138, 0.3);
}
.hg-venue-name {
  font-family: "Fraunces", serif;
  font-weight: 800;
  font-size: 19px;
  letter-spacing: -0.01em;
  color: var(--ink);
}
.hg-venue-sub {
  font-size: 11px;
  color: var(--ink-dim);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-weight: 600;
  margin-top: -4px;
}
.hg-venue-desc {
  font-size: 12px;
  color: var(--ink-soft);
  line-height: 1.45;
  font-style: italic;
}

.hg-venue-stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 6px;
  margin-top: auto;
}
.hg-venue-stat {
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(217, 180, 106, 0.12);
  border-radius: 8px;
  padding: 6px 8px;
  display: flex; flex-direction: column; align-items: flex-start; gap: 1px;
}
.hg-venue-stat .lbl {
  font-size: 11px; color: var(--ink-dim);
  text-transform: uppercase; letter-spacing: 0.12em;
  font-weight: 600;
}
.hg-venue-stat span:not(.lbl) {
  font-size: 13px;
  font-family: "JetBrains Mono", monospace;
  font-weight: 700;
  color: var(--ink);
}

.hg-venue-cta {
  text-align: center;
  font-family: "Fraunces", serif;
  font-weight: 800;
  font-size: 15px;
  color: var(--gold-soft);
  padding: 8px;
  margin-top: 4px;
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(217, 180, 106, 0.15), rgba(0, 0, 0, 0.3));
  border: 1px solid rgba(217, 180, 106, 0.35);
  letter-spacing: 0.04em;
}
.hg-venue-card:hover:not(:disabled) .hg-venue-cta {
  background: linear-gradient(180deg, rgba(217, 180, 106, 0.3), rgba(0, 0, 0, 0.35));
  color: var(--gold-shine);
}
.hg-venue-locked-msg {
  text-align: center;
  font-size: 12px;
  color: var(--ink-dim);
  font-style: italic;
  padding: 8px;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.3);
  border: 1px dashed rgba(255, 255, 255, 0.1);
  margin-top: 4px;
}
.hg-venue-locked-msg b { color: var(--ink-soft); font-style: normal; }

/* Venue progress / cash-out bar (shown during play) */
.hg-venue-status { display: flex; flex-direction: column; gap: 12px; padding: 14px; }
.hg-venue-target-row {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 14px;
  align-items: center;
}
.hg-venue-target-info { display: flex; flex-direction: column; gap: 1px; }
.hg-venue-target-info .lbl {
  font-size: 10px; color: var(--ink-dim);
  text-transform: uppercase; letter-spacing: 0.14em;
}
.hg-venue-target-amt {
  font-family: "JetBrains Mono", monospace;
  font-weight: 800; font-size: 18px;
  background: linear-gradient(180deg, var(--gold-shine), var(--gold), var(--brass));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.hg-progress-bar {
  position: relative;
  height: 26px;
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(217, 180, 106, 0.18);
  border-radius: 999px;
  overflow: hidden;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.4);
}
.hg-progress-fill {
  position: absolute;
  top: 0; left: 0; bottom: 0;
  width: 0%;
  background: linear-gradient(90deg, var(--brass), var(--gold), var(--gold-soft));
  transition: width 0.5s cubic-bezier(.2, .7, .3, 1);
  box-shadow: 0 0 12px rgba(217, 180, 106, 0.4);
}
.hg-progress-label {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: "JetBrains Mono", monospace;
  font-weight: 700;
  font-size: 12px;
  color: var(--ink);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.7);
}
.hg-venue-actions {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
}
.hg-cash-out {
  font-family: "Fraunces", serif;
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.04em;
}
.hg-cash-out.ready {
  background: linear-gradient(180deg,
    var(--gold-shine) 0%, #f0d186 8%, var(--gold) 32%, var(--brass) 60%, #8e6618 92%, var(--gold-deep) 100%);
  color: #2a1a02;
  border-color: var(--gold-shadow);
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.4);
  animation: hgCashReady 1.2s ease-in-out infinite;
}
@keyframes hgCashReady {
  0%, 100% { box-shadow:
    inset 0 1.5px 0 rgba(255, 255, 255, 0.6),
    0 8px 22px rgba(184, 143, 58, 0.4),
    0 0 18px rgba(217, 180, 106, 0.4); }
  50%      { box-shadow:
    inset 0 1.5px 0 rgba(255, 255, 255, 0.7),
    0 12px 28px rgba(217, 180, 106, 0.5),
    0 0 38px rgba(217, 180, 106, 0.7); }
}

/* Cleared / Busted modals */
.hg-modal {
  position: fixed; inset: 0;
  background: rgba(0, 0, 0, 0.78);
  z-index: 200;
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  animation: hgFadeIn 0.25s ease;
}
.hg-modal[hidden] { display: none; }
.hg-modal-card {
  width: 100%; max-width: 460px;
  background:
    radial-gradient(ellipse at top, rgba(217, 180, 106, 0.15) 0%, transparent 60%),
    linear-gradient(180deg, #15392a 0%, #0c2419 100%);
  border: 1px solid rgba(217, 180, 106, 0.4);
  border-radius: 18px;
  padding: 32px 28px 24px;
  text-align: center;
  box-shadow:
    inset 0 1px 0 rgba(217, 180, 106, 0.35),
    0 30px 80px rgba(0, 0, 0, 0.6),
    0 0 40px rgba(217, 180, 106, 0.18);
  animation: hgPaywallIn 0.4s cubic-bezier(.2, .7, .3, 1.05);
}
.hg-modal-card.hg-modal-cleared {
  background:
    radial-gradient(ellipse at top, rgba(110, 224, 138, 0.18) 0%, transparent 60%),
    linear-gradient(180deg, #15392a 0%, #0c2419 100%);
  border-color: rgba(110, 224, 138, 0.5);
  box-shadow:
    inset 0 1px 0 rgba(110, 224, 138, 0.3),
    0 30px 80px rgba(0, 0, 0, 0.6),
    0 0 40px rgba(110, 224, 138, 0.25);
}
.hg-modal-card.hg-modal-busted {
  background:
    radial-gradient(ellipse at top, rgba(255, 122, 122, 0.16) 0%, transparent 60%),
    linear-gradient(180deg, #2a1218 0%, #1a0a0e 100%);
  border-color: rgba(255, 122, 122, 0.5);
}
.hg-modal-icon {
  font-size: 56px;
  margin-bottom: 8px;
  filter: drop-shadow(0 0 16px rgba(217, 180, 106, 0.4));
  animation: hgGemSpin 4s linear infinite;
}
.hg-modal-card h3 {
  margin: 0 0 8px;
  font-family: "Fraunces", serif;
  font-weight: 900;
  font-size: 26px;
  letter-spacing: -0.01em;
}
.hg-modal-cleared h3 {
  background: linear-gradient(180deg, #d3ffe1, #6ee08a 60%, #3aa356);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.hg-modal-busted h3 { color: var(--bad); }
.hg-modal-card p {
  margin: 0 0 12px;
  color: var(--ink-soft);
  font-size: 14px;
  line-height: 1.5;
}
.hg-modal-amount {
  font-family: "Fraunces", serif;
  font-weight: 900;
  font-size: 48px;
  letter-spacing: -0.02em;
  margin: 6px 0;
  background: linear-gradient(180deg, #d3ffe1, #6ee08a 60%, #3aa356);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.4));
}
.hg-modal-unlocked {
  font-size: 13px;
  color: var(--gold-soft);
  font-style: italic;
  margin: 8px 0 18px;
}
.hg-modal-unlocked b { color: var(--gold-shine); font-style: normal; font-weight: 700; }
.hg-modal-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 14px;
}
.hg-modal-actions button { min-height: 48px; }

/* Mobile venue grid */
@media (max-width: 760px) {
  .hg-venue-grid { grid-template-columns: 1fr; }
  .hg-venue-card { min-height: 0; padding: 14px; }
  .hg-career-bar { padding: 12px; gap: 10px; }
  .hg-career-stat { flex: 1 1 70px; }
  .hg-career-stat span:not(.lbl) { font-size: 17px; }
  .hg-career-bar button { font-size: 11px; padding: 6px 10px; }
  #hgStatsBtn .stats-label { display: none; } /* abbreviate to icon on small screens */
  .hg-venue-target-row { grid-template-columns: 1fr; gap: 8px; }
  .hg-venue-actions { grid-template-columns: 1fr; }
}

/* =============================================================
   HOLD'EM GAME — full-game UI: poker table, seats, actions
   ============================================================= */

.he-mode-toggle {
  display: inline-flex;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(217, 180, 106, 0.2);
  border-radius: 999px;
  padding: 4px;
  gap: 2px;
}
.he-mode-toggle button {
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 600;
  background: transparent;
  border: none;
  color: var(--ink-dim);
  border-radius: 999px;
  letter-spacing: 0.04em;
  min-height: 36px;
  box-shadow: none;
}
.he-mode-toggle button.active {
  background: linear-gradient(180deg, #3a2a10, #2c1f08, #15100a);
  color: var(--gold-soft);
  box-shadow:
    inset 0 1px 0 rgba(217, 180, 106, 0.3),
    inset 0 -1px 0 rgba(0, 0, 0, 0.5),
    0 0 14px rgba(217, 180, 106, 0.18);
}
.view-subhead { display: flex; align-items: center; justify-content: space-between; margin: -4px 0 6px; }

/* Setup panel */
.hg-setup-title {
  margin: 0 0 14px;
  font-family: "Fraunces", serif;
  font-weight: 700;
  font-size: 18px;
  color: var(--gold-soft);
}
.hg-level-label {
  flex: 1 1 100%;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.hg-level-num {
  display: inline-block;
  background: linear-gradient(180deg, var(--gold-shine), var(--gold-soft), var(--gold));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  font-family: "JetBrains Mono", monospace;
  font-weight: 800;
  font-size: 16px;
  margin-left: 4px;
}
.hg-level-desc {
  font-size: 13px;
  color: var(--ink-soft);
  margin-top: 4px;
  line-height: 1.5;
  padding: 8px 12px;
  background: linear-gradient(180deg, rgba(217, 180, 106, 0.06), rgba(0, 0, 0, 0.25));
  border: 1px solid rgba(217, 180, 106, 0.18);
  border-radius: 10px;
}
.hg-level-desc b {
  color: var(--gold-soft);
  font-family: "Fraunces", serif;
  font-weight: 700;
  font-size: 14px;
}
.hg-level-emoji {
  font-size: 20px;
  margin-right: 4px;
  vertical-align: middle;
}
.hg-level-tag {
  font-style: italic;
  color: var(--ink-dim);
  font-size: 12px;
}
input[type="range"] {
  width: 100%;
  height: 28px;
  -webkit-appearance: none;
  appearance: none;
  background: transparent;
}
input[type="range"]::-webkit-slider-runnable-track {
  height: 6px;
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.6), rgba(217, 180, 106, 0.4));
  border-radius: 999px;
  border: 1px solid rgba(217, 180, 106, 0.18);
}
input[type="range"]::-moz-range-track {
  height: 6px;
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.6), rgba(217, 180, 106, 0.4));
  border-radius: 999px;
  border: 1px solid rgba(217, 180, 106, 0.18);
}
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 22px; height: 22px;
  margin-top: -9px;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, var(--gold-shine), var(--gold) 60%, var(--brass));
  border: 1px solid var(--gold-shadow);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.5);
  cursor: pointer;
}
input[type="range"]::-moz-range-thumb {
  width: 22px; height: 22px;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, var(--gold-shine), var(--gold) 60%, var(--brass));
  border: 1px solid var(--gold-shadow);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.5);
}

/* Info bar (mini-strip showing key stats) */
.hg-info-bar {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 12px;
  padding: 14px;
}
.hg-stat {
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  font-variant-numeric: tabular-nums;
  padding: 6px 4px;
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(217, 180, 106, 0.04) 0%, rgba(0, 0, 0, 0.25) 100%);
  border: 1px solid rgba(217, 180, 106, 0.1);
  box-shadow:
    inset 0 1px 0 rgba(217, 180, 106, 0.12),
    inset 0 -1px 0 rgba(0, 0, 0, 0.3);
}
.hg-stat .lbl {
  font-size: 11px; color: var(--ink-dim);
  text-transform: uppercase; letter-spacing: 0.12em;
}
.hg-stat span:not(.lbl) {
  font-size: 16px; font-weight: 700;
  font-family: "JetBrains Mono", monospace;
}

/* Poker table — wrapped in a themed venue scene */
.hg-table-wrap {
  position: relative;
  width: 100%;
  margin-bottom: -8px;
  /* Extra vertical room so seats + bet chips don't get clipped at top/bottom */
  padding: 80px 30px 70px;
  border-radius: 22px;
  overflow: hidden;
  background:
    radial-gradient(ellipse 120% 60% at 50% 0%, rgba(255, 230, 180, 0.06) 0%, transparent 50%),
    linear-gradient(180deg, rgba(0, 0, 0, 0.45) 0%, rgba(0, 0, 0, 0.7) 100%);
  border: 1px solid var(--panel-line);
  box-shadow:
    inset 0 1px 0 rgba(217, 180, 106, 0.12),
    0 30px 60px rgba(0, 0, 0, 0.5);
  transition: background 0.6s ease;
}
/* Venue-specific scenery layered behind the table — rendered with CSS gradients/patterns */
.hg-table-wrap::before {
  content: "";
  position: absolute; inset: 0;
  pointer-events: none;
  background-image: var(--venue-bg, none);
  background-size: cover;
  background-position: center;
  opacity: 0.55;
  z-index: 0;
  transition: opacity 0.6s ease;
}
/* When a real venue photo is supplied, swap out the procedural gradient
   for the photo with a dim overlay so chips/cards/text stay readable. */
.hg-table-wrap.has-venue-image::before {
  background-image:
    linear-gradient(180deg, rgba(0, 0, 0, 0.55) 0%, rgba(0, 0, 0, 0.7) 100%),
    var(--venue-image, none);
  opacity: 0.85;
}
.hg-table-wrap::after {
  /* subtle vignette for depth */
  content: "";
  position: absolute; inset: 0;
  pointer-events: none;
  background: radial-gradient(ellipse at center, transparent 40%, rgba(0,0,0,0.55) 95%);
  z-index: 1;
}
.hg-table-wrap > * { position: relative; z-index: 2; }

/* === 10 themed venues === */
.hg-venue-1  { /* Friend's Basement: warm wood, low ceiling, beer */
  --venue-bg:
    radial-gradient(ellipse at 50% 0%, rgba(255, 200, 120, 0.25) 0%, transparent 40%),
    radial-gradient(ellipse at 15% 80%, rgba(70, 40, 20, 0.5) 0%, transparent 50%),
    repeating-linear-gradient(90deg, #5a3a1a 0px, #6a4524 14px, #5a3a1a 28px),
    linear-gradient(180deg, #2a1a08 0%, #3e2a14 60%, #1a0e04 100%);
}
.hg-venue-2  { /* College Dorm: purple LEDs, posters, neon */
  --venue-bg:
    radial-gradient(ellipse at 30% 20%, rgba(160, 80, 200, 0.35) 0%, transparent 45%),
    radial-gradient(ellipse at 70% 80%, rgba(80, 40, 160, 0.4) 0%, transparent 45%),
    linear-gradient(180deg, #2a1840 0%, #1a0e2a 60%, #0a0418 100%);
}
.hg-venue-3  { /* Dive Bar: nicotine yellow + dim red */
  --venue-bg:
    radial-gradient(ellipse at 50% 10%, rgba(220, 130, 60, 0.3) 0%, transparent 45%),
    radial-gradient(ellipse at 80% 70%, rgba(180, 40, 30, 0.35) 0%, transparent 50%),
    linear-gradient(180deg, #3a1a14 0%, #20100a 60%, #100804 100%);
}
.hg-venue-4  { /* Underground: cool marble, no cameras */
  --venue-bg:
    radial-gradient(ellipse at 50% 20%, rgba(180, 200, 230, 0.2) 0%, transparent 45%),
    radial-gradient(ellipse at 50% 80%, rgba(40, 50, 80, 0.4) 0%, transparent 50%),
    linear-gradient(180deg, #1a1f2e 0%, #0c1018 60%, #050810 100%);
}
.hg-venue-5  { /* Riverboat: vintage brass + blue lamps */
  --venue-bg:
    radial-gradient(ellipse at 50% 0%, rgba(255, 200, 120, 0.3) 0%, transparent 45%),
    radial-gradient(ellipse at 20% 70%, rgba(70, 130, 200, 0.3) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 70%, rgba(200, 150, 80, 0.25) 0%, transparent 50%),
    linear-gradient(180deg, #2a2018 0%, #1a1410 60%, #0a0804 100%);
}
.hg-venue-6  { /* Vegas Off-Strip: neon haze + smoke */
  --venue-bg:
    radial-gradient(ellipse at 30% 10%, rgba(255, 80, 140, 0.35) 0%, transparent 45%),
    radial-gradient(ellipse at 70% 30%, rgba(120, 220, 255, 0.3) 0%, transparent 45%),
    radial-gradient(ellipse at 50% 80%, rgba(255, 180, 60, 0.25) 0%, transparent 55%),
    linear-gradient(180deg, #1a0820 0%, #100410 50%, #050208 100%);
}
.hg-venue-7  { /* Bellagio: crystal chandelier, marble */
  --venue-bg:
    radial-gradient(ellipse at 50% 0%, rgba(255, 245, 220, 0.45) 0%, transparent 35%),
    radial-gradient(ellipse at 50% 100%, rgba(200, 180, 150, 0.2) 0%, transparent 60%),
    repeating-linear-gradient(0deg, transparent 0px, rgba(255, 235, 200, 0.04) 2px, transparent 4px),
    linear-gradient(180deg, #2a2418 0%, #1a1610 60%, #100c08 100%);
}
.hg-venue-8  { /* Atlantis: ocean blue, palm shadows */
  --venue-bg:
    radial-gradient(ellipse at 50% 0%, rgba(120, 230, 255, 0.35) 0%, transparent 50%),
    radial-gradient(ellipse at 20% 80%, rgba(40, 100, 180, 0.4) 0%, transparent 55%),
    radial-gradient(ellipse at 80% 80%, rgba(100, 200, 220, 0.3) 0%, transparent 50%),
    linear-gradient(180deg, #051828 0%, #03101a 60%, #01080f 100%);
}
.hg-venue-9  { /* Monaco: red velvet + gold */
  --venue-bg:
    radial-gradient(ellipse at 50% 0%, rgba(255, 220, 150, 0.4) 0%, transparent 40%),
    radial-gradient(ellipse at 30% 80%, rgba(140, 30, 50, 0.5) 0%, transparent 55%),
    radial-gradient(ellipse at 70% 80%, rgba(180, 140, 60, 0.3) 0%, transparent 55%),
    linear-gradient(180deg, #2a0a14 0%, #180408 60%, #0a0204 100%);
}
.hg-venue-10 { /* Macau VIP: red lacquer + gold dragons */
  --venue-bg:
    radial-gradient(ellipse at 50% 0%, rgba(255, 200, 100, 0.4) 0%, transparent 40%),
    radial-gradient(ellipse at 20% 50%, rgba(220, 40, 60, 0.5) 0%, transparent 55%),
    radial-gradient(ellipse at 80% 50%, rgba(200, 30, 40, 0.5) 0%, transparent 55%),
    radial-gradient(ellipse at 50% 100%, rgba(180, 140, 60, 0.35) 0%, transparent 50%),
    linear-gradient(180deg, #200408 0%, #100204 60%, #000000 100%);
}
.hg-table {
  position: relative;
  aspect-ratio: 16 / 10;
  width: 100%;
  max-width: 760px;
  margin: 0 auto;
  border-radius: 50% / 38%;
  background:
    radial-gradient(ellipse at 50% 35%, rgba(255, 230, 180, 0.1) 0%, transparent 55%),
    radial-gradient(ellipse at 50% 50%, var(--felt-1) 0%, var(--felt-2) 70%, var(--felt-3) 100%);
  border: 8px solid #2a1a08;
  box-shadow:
    inset 0 0 0 4px var(--gold-deep),
    inset 0 0 80px rgba(0, 0, 0, 0.6),
    0 30px 60px rgba(0, 0, 0, 0.5),
    0 10px 24px rgba(0, 0, 0, 0.3);
}
.hg-table::before {
  content: "";
  position: absolute;
  inset: 12px;
  border-radius: 50% / 38%;
  border: 1px dashed rgba(217, 180, 106, 0.22);
  pointer-events: none;
}
.hg-table::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50% / 38%;
  pointer-events: none;
  opacity: 0.15;
  mix-blend-mode: overlay;
  background-image:
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='200' height='200'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='1.2' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0  0 0 0 0 0  0 0 0 0 0  0 0 0 0.6 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}

/* Center board area */
.hg-board-area {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  z-index: 1;
}
.hg-pot {
  font-family: "JetBrains Mono", monospace;
  font-size: 18px;
  font-weight: 800;
  background: linear-gradient(180deg, var(--gold-shine), var(--gold-soft), var(--gold));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
  filter: drop-shadow(0 0 8px rgba(217, 180, 106, 0.3));
  min-height: 22px;
}
.hg-board {
  display: flex;
  gap: 4px;
  min-height: 60px;
  align-items: center;
}
.hg-mini-card {
  width: 38px; height: 54px;
  border-radius: 5px;
  background: linear-gradient(180deg, var(--card-shine) 0%, var(--card-bg) 8%, var(--card-bg) 92%, #f0eadb 100%);
  border: 1px solid var(--card-edge);
  box-shadow:
    0 6px 14px rgba(0, 0, 0, 0.5),
    inset 0 1px 0 rgba(255, 255, 255, 0.85);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-family: "Fraunces", serif;
  font-weight: 700;
  line-height: 1;
}
/* Only NEW cards animate. JS adds .deal-in just for newly-revealed cards. */
.hg-mini-card.deal-in { animation: hgDealFlip 0.35s cubic-bezier(.2, .7, .3, 1.05); }
@keyframes hgDealFlip {
  from { transform: rotateY(180deg) scale(0.8); opacity: 0; }
  to   { transform: rotateY(0) scale(1); opacity: 1; }
}
.hg-mini-card.red { color: var(--red); }
.hg-mini-card.black { color: var(--black); }
.hg-mini-card .hg-mini-r { font-size: 16px; }
.hg-mini-card .hg-mini-s { font-size: 14px; line-height: 1; }
.hg-card-back {
  width: 26px; height: 38px;
  border-radius: 4px;
  border: 2px solid var(--card-bg);
  background:
    radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.1), transparent 50%),
    repeating-linear-gradient(45deg, #8a1f24 0 4px, #6a1418 4px 8px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.5);
}
.hg-street-tag {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--ink-dim);
  font-family: "JetBrains Mono", monospace;
  font-weight: 600;
}

/* Player seats around the table */
.hg-seat {
  position: absolute;
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  width: 130px;
  z-index: 2;
}
.hg-seat-cards {
  display: flex;
  gap: 2px;
  margin-bottom: 2px;
  min-height: 38px;
  align-items: center;
}

/* Portrait: stylized circular avatar (gradient chip + emoji, replaceable with <img>) */
.hg-portrait {
  width: 92px; height: 92px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--portrait-c1, #3a3a3a), var(--portrait-c2, #1a1a1a));
  display: flex; align-items: center; justify-content: center;
  font-size: 38px;
  margin: 0 auto 6px;
  position: relative;
  overflow: hidden;
  border: 2px solid var(--gold);
  box-shadow:
    inset 0 2px 0 rgba(255, 255, 255, 0.25),
    inset 0 -2px 0 rgba(0, 0, 0, 0.45),
    0 6px 16px rgba(0, 0, 0, 0.55),
    0 0 18px rgba(217, 180, 106, 0.3);
  transition: box-shadow 0.18s ease, transform 0.18s ease;
}
/* When 3D character is active, dark backdrop showcases the rendered character */
.hg-seat.has-3d .hg-portrait {
  background:
    radial-gradient(circle at 50% 30%, rgba(217, 180, 106, 0.18), transparent 65%),
    radial-gradient(circle at 50% 80%, rgba(0,0,0,0.7), rgba(0,0,0,0.95));
}
.hg-seat.has-3d .hg-portrait > * { opacity: 0; }

/* When a PNG portrait is loaded, it overrides everything else */
.hg-portrait.has-png { background-color: transparent !important; }
.hg-portrait.has-png > * { opacity: 0; }

/* === Photo "alive" animations — reactions & idle ===
   Each personality gets a different breathing phase so they don't all sync. */
@keyframes hgPhotoIdle {
  0%, 100% { transform: scale(1); filter: brightness(1) saturate(1); }
  50%      { transform: scale(1.018); filter: brightness(1.05) saturate(1.05); }
}
.hg-portrait.has-png {
  animation: hgPhotoIdle 4.2s ease-in-out infinite;
  will-change: transform, filter;
}
.hg-seat[data-seat="1"] .hg-portrait.has-png { animation-delay: -0.3s; }
.hg-seat[data-seat="2"] .hg-portrait.has-png { animation-delay: -0.8s; }
.hg-seat[data-seat="3"] .hg-portrait.has-png { animation-delay: -1.5s; }
.hg-seat[data-seat="4"] .hg-portrait.has-png { animation-delay: -2.1s; }
.hg-seat[data-seat="5"] .hg-portrait.has-png { animation-delay: -2.8s; }
.hg-seat[data-seat="6"] .hg-portrait.has-png { animation-delay: -3.4s; }
.hg-seat[data-seat="7"] .hg-portrait.has-png { animation-delay: -1.1s; }
.hg-seat[data-seat="8"] .hg-portrait.has-png { animation-delay: -2.5s; }

/* Active turn — brighter glow + scale pop, breathing pauses for focus */
.hg-seat.active .hg-portrait.has-png {
  animation: hgPhotoActive 1.8s ease-in-out infinite;
  box-shadow:
    inset 0 2px 0 rgba(255, 255, 255, 0.3),
    0 0 0 3px rgba(217, 180, 106, 0.5),
    0 0 28px rgba(217, 180, 106, 0.55),
    0 8px 18px rgba(0, 0, 0, 0.55);
}
@keyframes hgPhotoActive {
  0%, 100% { transform: scale(1.04); filter: brightness(1.08); }
  50%      { transform: scale(1.07); filter: brightness(1.15); }
}

/* Folded — desaturate, dim, no breathing */
.hg-seat.folded .hg-portrait.has-png {
  animation: none;
  filter: grayscale(0.7) brightness(0.55) saturate(0.7);
  transform: scale(0.96);
}

/* Reaction animations — triggered by .react-* classes from JS, ~1.2s long */
@keyframes hgPhotoFold {
  0%   { transform: scale(1) rotate(0); filter: brightness(1) saturate(1); }
  15%  { transform: scale(1) rotate(-4deg) translateX(-3px); }
  30%  { transform: scale(0.98) rotate(3deg) translateX(3px); filter: brightness(0.9) saturate(0.7); }
  45%  { transform: scale(0.97) rotate(-2deg) translateX(-2px); }
  60%  { transform: scale(0.96) rotate(1deg) translateX(1px); filter: brightness(0.85) saturate(0.6); }
  100% { transform: scale(0.96) rotate(0) translateX(0); filter: grayscale(0.7) brightness(0.55) saturate(0.7); }
}
.hg-seat.react-fold .hg-portrait.has-png {
  animation: hgPhotoFold 0.9s ease-out forwards !important;
}

@keyframes hgPhotoRaise {
  0%   { transform: scale(1); filter: brightness(1) saturate(1); box-shadow: var(--hg-shadow-base); }
  25%  { transform: scale(1.18); filter: brightness(1.25) saturate(1.4); }
  50%  { transform: scale(1.08); filter: brightness(1.15) saturate(1.2); }
  100% { transform: scale(1.04); filter: brightness(1.05); }
}
.hg-seat.react-raise .hg-portrait.has-png,
.hg-seat.react-bet .hg-portrait.has-png {
  animation: hgPhotoRaise 0.8s cubic-bezier(.2, .7, .3, 1.05) !important;
  box-shadow:
    inset 0 2px 0 rgba(255, 255, 255, 0.35),
    0 0 0 3px rgba(255, 122, 80, 0.55),
    0 0 38px rgba(255, 100, 60, 0.6),
    0 8px 18px rgba(0, 0, 0, 0.6) !important;
}

@keyframes hgPhotoCall {
  0%   { transform: scale(1) translateY(0); }
  35%  { transform: scale(1.05) translateY(4px); filter: brightness(1.08); }
  70%  { transform: scale(1.02) translateY(-1px); }
  100% { transform: scale(1) translateY(0); }
}
.hg-seat.react-call .hg-portrait.has-png {
  animation: hgPhotoCall 0.6s ease-out !important;
}

@keyframes hgPhotoCheck {
  0%   { transform: scale(1) translateY(0); }
  50%  { transform: scale(1.02) translateY(2px); }
  100% { transform: scale(1) translateY(0); }
}
.hg-seat.react-check .hg-portrait.has-png {
  animation: hgPhotoCheck 0.4s ease-out !important;
}

@keyframes hgPhotoWin {
  0%   { transform: scale(1) rotate(0); filter: brightness(1) saturate(1) hue-rotate(0); }
  15%  { transform: scale(1.22) rotate(-4deg); filter: brightness(1.3) saturate(1.5); }
  30%  { transform: scale(1.18) rotate(4deg); }
  45%  { transform: scale(1.20) rotate(-3deg); filter: brightness(1.35) saturate(1.6); }
  60%  { transform: scale(1.15) rotate(2deg); }
  80%  { transform: scale(1.12) rotate(-1deg); filter: brightness(1.2) saturate(1.3); }
  100% { transform: scale(1.05) rotate(0); filter: brightness(1.08) saturate(1.1); }
}
.hg-seat.react-win .hg-portrait.has-png {
  animation: hgPhotoWin 1.3s cubic-bezier(.2, .7, .3, 1.1) !important;
  box-shadow:
    inset 0 2px 0 rgba(255, 255, 255, 0.45),
    0 0 0 4px rgba(255, 220, 120, 0.7),
    0 0 50px rgba(255, 200, 80, 0.85),
    0 8px 22px rgba(0, 0, 0, 0.55) !important;
}
.hg-portrait::before {
  /* Subtle inner highlight */
  content: "";
  position: absolute;
  top: 4%; left: 12%;
  width: 36%; height: 30%;
  border-radius: 50%;
  background: radial-gradient(ellipse, rgba(255, 255, 255, 0.35), transparent 70%);
  pointer-events: none;
}
.hg-portrait img {
  width: 100%; height: 100%;
  object-fit: cover;
  border-radius: 50%;
}
.hg-portrait-fallback {
  filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.5));
  z-index: 1;
}
.hg-seat.active .hg-portrait {
  box-shadow:
    inset 0 1.5px 0 rgba(255, 255, 255, 0.3),
    0 0 0 3px rgba(217, 180, 106, 0.5),
    0 0 24px rgba(217, 180, 106, 0.55),
    0 4px 10px rgba(0, 0, 0, 0.5);
  transform: scale(1.06);
}
.hg-seat.folded .hg-portrait { filter: grayscale(0.7) brightness(0.6); }
.hg-seat.all-in .hg-portrait {
  box-shadow:
    inset 0 1.5px 0 rgba(255, 255, 255, 0.3),
    0 0 0 2px rgba(255, 122, 122, 0.5),
    0 0 18px rgba(255, 122, 122, 0.4),
    0 4px 10px rgba(0, 0, 0, 0.5);
}
.hg-seat-cards .hg-mini-card {
  width: 28px; height: 40px;
  /* No default animation; only deal-in cards animate */
  animation: none;
}
.hg-seat-cards .hg-mini-card.deal-in { animation: hgDealHole 0.3s ease; }
.hg-seat-cards .hg-mini-card .hg-mini-r { font-size: 12px; }
.hg-seat-cards .hg-mini-card .hg-mini-s { font-size: 11px; }
@keyframes hgDealHole {
  from { transform: translateY(-12px) scale(0.8); opacity: 0; }
  to   { transform: translateY(0) scale(1); opacity: 1; }
}
.hg-seat-info {
  display: flex; flex-direction: column; align-items: center; gap: 0;
  padding: 6px 10px 5px;
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(20, 14, 4, 0.85), rgba(8, 5, 2, 0.95));
  border: 1px solid rgba(217, 180, 106, 0.22);
  min-width: 86px;
  box-shadow:
    inset 0 1px 0 rgba(217, 180, 106, 0.18),
    0 4px 10px rgba(0, 0, 0, 0.45);
}
.hg-seat-name {
  font-size: 11px;
  font-weight: 700;
  color: var(--ink-soft);
  letter-spacing: 0.04em;
  display: flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
}
.hg-avatar {
  font-size: 14px;
  line-height: 1;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.5));
}
.hg-pos-tag {
  font-size: 9px;
  background: linear-gradient(180deg, var(--gold-shine), var(--gold) 70%, var(--brass));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  font-weight: 800;
  letter-spacing: 0.06em;
}
.hg-seat-stack {
  font-family: "JetBrains Mono", monospace;
  font-weight: 700;
  font-size: 13px;
  color: var(--gold-soft);
}
.hg-seat-action {
  font-size: 10px;
  font-weight: 600;
  margin-top: 4px;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--ink-soft);
  letter-spacing: 0.04em;
  white-space: nowrap;
}
.hg-seat-bet {
  /* Polished gold poker chip — positioned absolutely between seat and pot */
  position: absolute;
  left: 50%;
  font-family: "JetBrains Mono", monospace;
  font-size: 13px;
  font-weight: 800;
  padding: 6px 14px;
  border-radius: 999px;
  background: linear-gradient(180deg,
    var(--gold-shine) 0%, var(--gold-soft) 25%, var(--gold) 65%, var(--brass) 100%);
  color: #2a1a02;
  border: 2px solid var(--gold-deep);
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.4);
  box-shadow:
    inset 0 1.5px 0 rgba(255, 255, 255, 0.55),
    inset 0 -1.5px 0 rgba(0, 0, 0, 0.18),
    0 4px 10px rgba(0, 0, 0, 0.5),
    0 0 14px rgba(217, 180, 106, 0.45);
  white-space: nowrap;
  z-index: 4;
}
.hg-seat-bet.just-popped { animation: hgBetPop 0.3s cubic-bezier(.2, .7, .3, 1.1); }
@keyframes hgBetPop {
  from { transform: translate(-50%, var(--bet-y, 0)) scale(0.5); opacity: 0; }
  to   { transform: translate(-50%, var(--bet-y, 0)) scale(1); opacity: 1; }
}
/* Seats in the bottom half of the table → bet chip sits ABOVE the seat (toward pot) */
.hg-seat.seat-bottom-half .hg-seat-bet {
  bottom: 100%;
  margin-bottom: 14px;
  --bet-y: 0;
  transform: translate(-50%, 0);
}
/* Seats in the top half → bet chip sits BELOW the seat (toward pot) */
.hg-seat.seat-top-half .hg-seat-bet {
  top: 100%;
  margin-top: 14px;
  --bet-y: 0;
  transform: translate(-50%, 0);
}
.hg-seat.active .hg-seat-info {
  border-color: var(--gold);
  box-shadow:
    inset 0 1px 0 rgba(217, 180, 106, 0.4),
    0 0 0 2px rgba(217, 180, 106, 0.4),
    0 0 24px rgba(217, 180, 106, 0.45),
    0 4px 10px rgba(0, 0, 0, 0.5);
  animation: hgActivePulse 1.6s ease-in-out infinite;
}
@keyframes hgActivePulse {
  0%, 100% { box-shadow:
    inset 0 1px 0 rgba(217, 180, 106, 0.4),
    0 0 0 2px rgba(217, 180, 106, 0.4),
    0 0 24px rgba(217, 180, 106, 0.35),
    0 4px 10px rgba(0, 0, 0, 0.5); }
  50%      { box-shadow:
    inset 0 1px 0 rgba(217, 180, 106, 0.5),
    0 0 0 2px rgba(217, 180, 106, 0.6),
    0 0 36px rgba(217, 180, 106, 0.55),
    0 4px 10px rgba(0, 0, 0, 0.5); }
}
.hg-seat.folded {
  opacity: 0.45;
  filter: grayscale(0.5);
}
.hg-seat.folded .hg-seat-cards { opacity: 0.4; }
.hg-seat.all-in .hg-seat-stack {
  color: var(--bad);
  text-shadow: 0 0 6px rgba(255, 122, 122, 0.5);
}

/* Dealer button chip */
.hg-button-chip {
  position: absolute;
  top: 0; right: -8px;
  width: 22px; height: 22px;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, var(--gold-shine), var(--card-bg) 50%, #d4cdb8);
  border: 2px solid var(--gold-deep);
  font-family: "Fraunces", serif;
  font-weight: 900;
  font-size: 12px;
  color: #2a1a02;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 3px 6px rgba(0, 0, 0, 0.5);
}

/* GTO Hint button */
.hg-hint-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  font-size: 13px;
  font-weight: 600;
  border-radius: 999px;
  background:
    linear-gradient(180deg, rgba(217, 180, 106, 0.16), rgba(20, 14, 4, 0.5));
  border: 1px solid rgba(217, 180, 106, 0.35);
  color: var(--gold-soft);
  letter-spacing: 0.04em;
  align-self: flex-start;
  min-height: 40px;
  box-shadow:
    inset 0 1px 0 rgba(217, 180, 106, 0.25),
    inset 0 -1px 0 rgba(0, 0, 0, 0.4),
    0 0 16px rgba(217, 180, 106, 0.12);
}
.hg-hint-btn:hover:not(:disabled) {
  background: linear-gradient(180deg, rgba(217, 180, 106, 0.26), rgba(20, 14, 4, 0.5));
  border-color: rgba(217, 180, 106, 0.55);
  color: var(--gold-shine);
  box-shadow:
    inset 0 1px 0 rgba(217, 180, 106, 0.35),
    0 0 24px rgba(217, 180, 106, 0.25);
}
.hg-hint-icon { font-size: 16px; line-height: 1; }
.hg-hint-text { font-family: "Fraunces", serif; font-weight: 700; }
.hg-hint-count {
  font-size: 11px;
  font-family: "JetBrains Mono", monospace;
  font-weight: 600;
  background: rgba(0, 0, 0, 0.4);
  padding: 3px 8px;
  border-radius: 999px;
  border: 1px solid rgba(217, 180, 106, 0.25);
  color: var(--ink-soft);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.hg-hint-btn.hg-hint-empty .hg-hint-count {
  background: linear-gradient(180deg, var(--gold-soft), var(--gold), var(--brass));
  color: #2a1a02;
  border-color: var(--gold-deep);
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.3);
}

/* Hint panel — the GTO recommendation */
.hg-hint-panel {
  background:
    radial-gradient(ellipse at top, rgba(217, 180, 106, 0.12) 0%, transparent 60%),
    linear-gradient(180deg, rgba(20, 14, 4, 0.85) 0%, rgba(8, 5, 2, 0.95) 100%);
  border: 1px solid rgba(217, 180, 106, 0.45);
  border-radius: 14px;
  padding: 14px 16px;
  position: relative;
  box-shadow:
    inset 0 1px 0 rgba(217, 180, 106, 0.4),
    inset 0 -1px 0 rgba(0, 0, 0, 0.5),
    0 0 24px rgba(217, 180, 106, 0.15),
    0 8px 20px rgba(0, 0, 0, 0.4);
  animation: hgHintIn 0.3s cubic-bezier(.2, .7, .3, 1);
}
@keyframes hgHintIn {
  from { transform: translateY(-6px); opacity: 0; }
  to   { transform: translateY(0); opacity: 1; }
}
.hg-hint-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
  gap: 12px;
}
.hg-hint-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-weight: 600;
  color: var(--ink-dim);
}
.hg-hint-action-tag {
  font-family: "Fraunces", serif;
  font-weight: 900;
  font-size: 18px;
  letter-spacing: 0.04em;
  padding: 4px 14px;
  border-radius: 999px;
  border: 1px solid rgba(217, 180, 106, 0.4);
  background: rgba(0, 0, 0, 0.5);
  color: var(--gold-soft);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6);
}
.hg-hint-action-tag.tag-fold { color: var(--bad); border-color: rgba(255, 122, 122, 0.45); background: rgba(40, 8, 8, 0.5); }
.hg-hint-action-tag.tag-check { color: var(--ink-soft); border-color: rgba(255, 255, 255, 0.18); }
.hg-hint-action-tag.tag-call { color: var(--gold-soft); border-color: rgba(217, 180, 106, 0.5); }
.hg-hint-action-tag.tag-bet,
.hg-hint-action-tag.tag-raise { color: var(--good); border-color: rgba(110, 224, 138, 0.45); background: rgba(8, 30, 16, 0.5); }
.hg-hint-reason {
  font-size: 13px;
  line-height: 1.5;
  color: var(--ink-soft);
}
.hg-hint-reason b {
  color: var(--gold-soft);
  font-weight: 600;
}
.hg-hint-reason i { color: var(--ink); font-style: italic; }

/* Suggested action button — gold ring on the recommended action */
.hg-action-row .hg-suggested {
  position: relative;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.1),
    inset 0 0 0 2px var(--gold-soft),
    0 0 24px rgba(217, 180, 106, 0.45),
    0 4px 12px rgba(0, 0, 0, 0.4);
  animation: hgSuggestPulse 1.6s ease-in-out infinite;
}
@keyframes hgSuggestPulse {
  0%, 100% { box-shadow:
    inset 0 0 0 2px var(--gold-soft),
    0 0 22px rgba(217, 180, 106, 0.35); }
  50%      { box-shadow:
    inset 0 0 0 2px var(--gold-shine),
    0 0 38px rgba(217, 180, 106, 0.6); }
}

/* Paywall modal */
.hg-paywall {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.78);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  animation: hgFadeIn 0.25s ease;
}
.hg-paywall[hidden] { display: none; }
@keyframes hgFadeIn { from { opacity: 0; } to { opacity: 1; } }

.hg-paywall-card {
  width: 100%;
  max-width: 420px;
  background:
    radial-gradient(ellipse at top, rgba(217, 180, 106, 0.15) 0%, transparent 60%),
    linear-gradient(180deg, #15392a 0%, #0c2419 100%);
  border: 1px solid rgba(217, 180, 106, 0.4);
  border-radius: 18px;
  padding: 28px 24px 22px;
  text-align: center;
  box-shadow:
    inset 0 1px 0 rgba(217, 180, 106, 0.35),
    inset 0 -1px 0 rgba(0, 0, 0, 0.5),
    0 30px 80px rgba(0, 0, 0, 0.6),
    0 0 40px rgba(217, 180, 106, 0.18);
  animation: hgPaywallIn 0.35s cubic-bezier(.2, .7, .3, 1.05);
  position: relative;
}
@keyframes hgPaywallIn {
  from { transform: translateY(20px) scale(0.95); opacity: 0; }
  to   { transform: translateY(0) scale(1); opacity: 1; }
}
.hg-paywall-icon {
  font-size: 48px;
  margin-bottom: 8px;
  filter: drop-shadow(0 0 16px rgba(217, 180, 106, 0.5));
  animation: hgGemSpin 4s linear infinite;
}
@keyframes hgGemSpin {
  0%, 100% { transform: rotate(0deg) scale(1); }
  50%      { transform: rotate(8deg) scale(1.05); }
}
.hg-paywall-card h3 {
  margin: 0 0 8px;
  font-family: "Fraunces", serif;
  font-weight: 900;
  font-size: 24px;
  letter-spacing: -0.01em;
  background: linear-gradient(180deg, var(--gold-shine), var(--gold-soft) 60%, var(--gold));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.hg-paywall-sub {
  margin: 0 0 20px;
  color: var(--ink-soft);
  font-size: 14px;
  line-height: 1.5;
}
.hg-paywall-offer {
  position: relative;
  background: linear-gradient(180deg, rgba(217, 180, 106, 0.12), rgba(0, 0, 0, 0.4));
  border: 1px solid rgba(217, 180, 106, 0.3);
  border-radius: 14px;
  padding: 18px 16px;
  margin-bottom: 18px;
  box-shadow:
    inset 0 1px 0 rgba(217, 180, 106, 0.25),
    0 8px 20px rgba(0, 0, 0, 0.3);
}
.hg-offer-deal {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
}
.hg-offer-qty {
  font-family: "Fraunces", serif;
  font-weight: 700;
  font-size: 22px;
  color: var(--ink);
}
.hg-offer-price {
  font-family: "Fraunces", serif;
  font-weight: 900;
  font-size: 36px;
  letter-spacing: -0.02em;
  background: linear-gradient(180deg, var(--gold-shine), var(--gold), var(--brass));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.4));
}
.hg-offer-price small { font-size: 18px; }
.hg-offer-best {
  position: absolute;
  top: -10px;
  right: 14px;
  background: linear-gradient(180deg, var(--good), #4faf6c);
  color: #0a1f10;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.4);
}
.hg-paywall-actions {
  display: grid;
  grid-template-columns: 1fr 1.6fr;
  gap: 10px;
  margin-bottom: 12px;
}
.hg-paywall-actions button { min-height: 48px; }
.hg-paywall-fineprint {
  font-size: 11px;
  color: var(--ink-mute);
  font-style: italic;
  margin-top: 4px;
}

/* Action bar */
.hg-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.hg-action-row {
  display: grid;
  grid-template-columns: 1fr 1.4fr 1fr;
  gap: 10px;
}
.hg-action-row button {
  min-height: 56px;
  font-family: "Fraunces", serif;
  font-weight: 700;
  font-size: 17px;
  letter-spacing: 0.04em;
}
.hg-act-fold {
  background: linear-gradient(180deg, rgba(255, 122, 122, 0.18), rgba(70, 16, 16, 0.4));
  border-color: rgba(255, 122, 122, 0.3);
  color: #ffd0d0;
}
.hg-act-fold:hover:not(:disabled) {
  background: linear-gradient(180deg, rgba(255, 122, 122, 0.28), rgba(70, 16, 16, 0.5));
  border-color: rgba(255, 122, 122, 0.5);
  color: #fff5f5;
}
.hg-act-raise {
  background: linear-gradient(180deg, rgba(110, 224, 138, 0.16), rgba(8, 50, 22, 0.4));
  border-color: rgba(110, 224, 138, 0.3);
  color: #d8ffe1;
}
.hg-act-raise:hover:not(:disabled) {
  background: linear-gradient(180deg, rgba(110, 224, 138, 0.26), rgba(8, 50, 22, 0.5));
  border-color: rgba(110, 224, 138, 0.55);
  color: #f5fff8;
}

/* Bet sizing UI */
.hg-bet-sizing {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--gold-trim);
}

/* Single horizontal bar: ✕ | $amount | ✓ */
.hg-bet-bar {
  display: grid;
  grid-template-columns: 80px 1fr 80px;
  height: 80px;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid rgba(217, 180, 106, 0.4);
  box-shadow:
    inset 0 1px 0 rgba(217, 180, 106, 0.18),
    inset 0 -1px 0 rgba(0, 0, 0, 0.4),
    0 8px 22px rgba(0, 0, 0, 0.45),
    0 0 18px rgba(217, 180, 106, 0.12);
}
.hg-bet-side {
  border: none;
  border-radius: 0;
  font-size: 32px;
  font-weight: 800;
  padding: 0;
  margin: 0;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: filter 0.12s ease, transform 0.08s ease;
  min-height: 0;
  letter-spacing: 0;
}
.hg-bet-side:hover:not(:disabled) { filter: brightness(1.12); }
.hg-bet-side:active:not(:disabled) { transform: scale(0.97); }
.hg-bet-side.cancel {
  background: linear-gradient(180deg, #4a121a 0%, #2a0810 100%);
  color: #ff6464;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6);
  box-shadow:
    inset 0 1px 0 rgba(255, 100, 100, 0.18),
    inset -1px 0 0 rgba(0, 0, 0, 0.5);
}
.hg-bet-side.confirm {
  background: linear-gradient(180deg, #6ee08a 0%, #4faf6c 50%, #2a8048 100%);
  color: #08200f;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.3);
  box-shadow:
    inset 0 1.5px 0 rgba(255, 255, 255, 0.45),
    inset 0 -1px 0 rgba(0, 0, 0, 0.2),
    inset 1px 0 0 rgba(0, 0, 0, 0.3);
}
.hg-bet-display {
  background: linear-gradient(180deg, #0e2418 0%, #050d09 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
}
.hg-bet-display .lbl {
  font-size: 10px;
  color: var(--ink-dim);
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-weight: 600;
}
.hg-bet-amount {
  font-family: "Fraunces", serif;
  font-weight: 900;
  font-size: 38px;
  letter-spacing: -0.02em;
  background: linear-gradient(180deg, var(--gold-shine), var(--gold-soft) 60%, var(--gold));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.5));
  line-height: 1;
}

/* Compact quick presets — no "pot" word, single-line */
.hg-bet-quick {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 6px;
}
.hg-bet-quick button {
  min-height: 42px;
  font-size: 14px;
  font-weight: 700;
  padding: 8px 4px;
  letter-spacing: 0.02em;
}

/* Result panel */
.hg-result {
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: center;
  padding: 12px 18px !important;
  cursor: pointer;
  transition: background 0.15s ease;
}
.hg-result:hover {
  background: linear-gradient(180deg, rgba(217, 180, 106, 0.05) 0%, rgba(0, 0, 0, 0.32) 100%);
}
.hg-result-text {
  font-size: 17px;
  font-family: "Fraunces", serif;
  font-weight: 700;
  letter-spacing: -0.01em;
}
.hg-result-text b {
  background: linear-gradient(180deg, var(--gold-shine), var(--gold-soft), var(--gold));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  font-weight: 900;
}
.hg-next-countdown {
  display: flex; flex-direction: column; align-items: center;
  gap: 4px; width: 100%; max-width: 280px;
}
.hg-next-bar {
  width: 100%; height: 4px;
  background: rgba(0, 0, 0, 0.45);
  border-radius: 999px;
  overflow: hidden;
}
.hg-next-fill {
  height: 100%; width: 0%;
  background: linear-gradient(90deg, var(--brass), var(--gold-soft));
  border-radius: 999px;
}
.hg-next-hint {
  font-size: 10px;
  color: var(--ink-mute);
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-weight: 600;
}

/* Hand log */
.hg-log {
  max-height: 240px;
  overflow-y: auto;
  font-family: "JetBrains Mono", monospace;
  font-size: 12px;
}
.hg-log-row {
  padding: 5px 8px;
  border-bottom: 1px solid var(--panel-line);
  color: var(--ink-soft);
}
.hg-log-row:last-child { border-bottom: none; }
.hg-log-row b { color: var(--gold-soft); font-weight: 700; }
.hg-log-row i { color: var(--ink-dim); font-style: italic; }

/* Mobile tweaks */
@media (max-width: 760px) {
  .hg-info-bar { grid-template-columns: repeat(3, 1fr); }
  .hg-info-bar .hg-stat:nth-child(n+4) { display: none; }
  .hg-table { aspect-ratio: 11 / 12; max-width: 100%; }
  .hg-seat { width: 92px; }
  .hg-seat-cards .hg-mini-card { width: 22px; height: 32px; }
  .hg-seat-cards .hg-mini-card .hg-mini-r { font-size: 10px; }
  .hg-seat-cards .hg-mini-card .hg-mini-s { font-size: 9px; }
  .hg-seat-info { min-width: 70px; padding: 4px 8px; }
  .hg-seat-name { font-size: 10px; }
  .hg-seat-stack { font-size: 11px; }
  .hg-seat-action { font-size: 9px; padding: 2px 6px; }
  .hg-seat-bet { font-size: 10px; padding: 2px 6px; }
  .hg-portrait { width: 64px; height: 64px; font-size: 26px; border-width: 1.5px; margin-bottom: 4px; }
  .hg-seat { width: 100px; }
  .hg-board { gap: 2px; min-height: 50px; }
  .hg-mini-card { width: 30px; height: 44px; }
  .hg-board-area { gap: 4px; }
  .hg-pot { font-size: 14px; }

  .hg-action-row button { min-height: 52px; font-size: 15px; }
  .hg-bet-amount { font-size: 28px; }
  .hg-bet-quick button { font-size: 11px; min-height: 38px; padding: 4px 2px; }
}

@media (max-width: 480px) {
  .hg-info-bar { grid-template-columns: repeat(2, 1fr); padding: 10px; }
  .hg-info-bar .hg-stat:nth-child(n+3) { display: none; }
  .hg-info-bar .hg-stat:nth-child(1) { display: flex; }
  .hg-info-bar .hg-stat:nth-child(2) { display: flex; } /* keep blinds + pot */
  .hg-seat { width: 78px; }
  .hg-seat-info { min-width: 62px; padding: 3px 6px; }
  .hg-portrait { width: 54px; height: 54px; font-size: 22px; }
  .hg-seat { width: 84px; }
  .hg-seat-cards .hg-mini-card { width: 20px; height: 28px; }
  .hg-seat-cards .hg-mini-card .hg-mini-r { font-size: 9px; }
  .hg-seat-cards .hg-mini-card .hg-mini-s { font-size: 8px; }
  .hg-mini-card { width: 26px; height: 38px; }
  .hg-board-area { gap: 3px; }
  .hg-bet-quick { grid-template-columns: repeat(3, 1fr); }
  .hg-bet-quick button:nth-child(n+4) { grid-column: span 1; }
}

/* =============================================================
   APP MODALS — age gate, about / how-to-play
   ============================================================= */

.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
  background: rgba(0, 0, 0, 0.78);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  animation: hgFadeIn 0.3s ease;
}
.modal-overlay[hidden] { display: none; }
.modal-card {
  width: 100%;
  max-width: 480px;
  max-height: calc(100vh - 60px);
  overflow-y: auto;
  background:
    radial-gradient(ellipse at top, rgba(217, 180, 106, 0.16) 0%, transparent 65%),
    linear-gradient(180deg, #15392a 0%, #0c2419 100%);
  border: 1px solid rgba(217, 180, 106, 0.45);
  border-radius: 18px;
  padding: 28px 26px 22px;
  box-shadow:
    inset 0 1px 0 rgba(217, 180, 106, 0.4),
    0 30px 80px rgba(0, 0, 0, 0.65),
    0 0 50px rgba(217, 180, 106, 0.18);
  animation: hgPaywallIn 0.35s cubic-bezier(.2, .7, .3, 1.05);
  text-align: left;
}
.modal-icon {
  font-size: 52px;
  text-align: center;
  margin-bottom: 6px;
  filter: drop-shadow(0 0 18px rgba(217, 180, 106, 0.4));
}
.modal-card h2 {
  margin: 0 0 12px;
  font-family: "Fraunces", serif;
  font-weight: 900;
  font-size: 26px;
  letter-spacing: -0.01em;
  text-align: center;
  background: linear-gradient(180deg, var(--gold-shine), var(--gold-soft) 60%, var(--gold));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.modal-card p {
  color: var(--ink-soft);
  line-height: 1.55;
  font-size: 14px;
  margin: 0 0 12px;
}
.modal-card a {
  color: var(--gold-soft);
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* Age gate */
.modal-age-gate { text-align: center; }
.age-gate-list {
  list-style: none;
  padding: 0;
  margin: 16px 0 18px;
  text-align: left;
  display: grid;
  gap: 10px;
}
.age-gate-list li {
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(217, 180, 106, 0.18);
  border-radius: 10px;
  padding: 10px 14px;
  color: var(--ink-soft);
  font-size: 13px;
  line-height: 1.4;
}
.age-gate-list li b { color: var(--gold-soft); font-weight: 600; }
.age-gate-actions { margin-bottom: 10px; }
.age-gate-actions button { width: 100%; }
.age-gate-fine {
  font-size: 11px;
  color: var(--ink-mute);
  text-align: center;
  margin: 6px 0 0;
}

/* About modal */
.modal-about { max-width: 560px; }
.modal-head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 14px;
}
.modal-head h2 { margin: 0; text-align: left; }
.modal-close {
  width: 36px; height: 36px;
  border-radius: 50%;
  font-size: 22px;
  font-weight: 700;
  padding: 0;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid var(--panel-line);
  color: var(--ink);
}
.about-tabs {
  display: flex;
  gap: 4px;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(217, 180, 106, 0.18);
  border-radius: 12px;
  padding: 4px;
  margin-bottom: 18px;
}
.about-tab {
  flex: 1;
  background: transparent;
  border: none;
  padding: 10px 8px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-dim);
  cursor: pointer;
  min-height: 40px;
}
.about-tab.active {
  background: linear-gradient(180deg, #3a2a10, #2c1f08);
  color: var(--gold-soft);
  box-shadow: inset 0 1px 0 rgba(217, 180, 106, 0.3);
}
.about-pane { display: none; }
.about-pane.active { display: block; }
.about-pane h3 {
  margin: 0 0 10px;
  font-family: "Fraunces", serif;
  font-weight: 700;
  font-size: 18px;
  color: var(--gold-soft);
}
.about-pane h3:not(:first-child) { margin-top: 18px; }
.about-pane p { font-size: 13px; line-height: 1.55; }
.about-pane ul {
  margin: 8px 0 12px;
  padding-left: 22px;
  color: var(--ink-soft);
  font-size: 13px;
  line-height: 1.6;
}
.about-pane ul li { margin-bottom: 4px; }
.about-pane b { color: var(--ink); font-weight: 600; }

@media (max-width: 560px) {
  .modal-card { padding: 22px 18px 18px; }
  .modal-card h2 { font-size: 22px; }
  .about-tab { font-size: 11px; padding: 8px 4px; }
}

/* Stats modal — bigger */
.hg-stats-card { max-width: 720px; }

/* Small-sample banner — sits above the stats grid when n < 50ish */
.hg-stats-banner {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px;
  margin: 0 0 16px;
  background: linear-gradient(90deg, rgba(240, 192, 96, 0.10) 0%, rgba(0, 0, 0, 0.25) 80%);
  border: 1px solid rgba(240, 192, 96, 0.35);
  border-left: 3px solid #f0c060;
  border-radius: 10px;
  font-size: 13px;
  line-height: 1.5;
  color: var(--ink-soft);
}
.hg-stats-banner-icon {
  font-size: 18px;
  line-height: 1;
  flex-shrink: 0;
}
.hg-stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-bottom: 22px;
}
.hg-stat-tile {
  background: linear-gradient(180deg, rgba(217, 180, 106, 0.06), rgba(0, 0, 0, 0.4));
  border: 1px solid rgba(217, 180, 106, 0.18);
  border-radius: 10px;
  padding: 10px 8px;
  display: flex; flex-direction: column; align-items: center;
  text-align: center;
  box-shadow:
    inset 0 1px 0 rgba(217, 180, 106, 0.15),
    inset 0 -1px 0 rgba(0, 0, 0, 0.3);
}
.hg-stat-tile.primary {
  background: linear-gradient(180deg, rgba(217, 180, 106, 0.16), rgba(20, 14, 4, 0.5));
  border-color: rgba(217, 180, 106, 0.4);
}
.hg-stat-tile .lbl {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--ink-dim);
  font-weight: 600;
}
.hg-stat-tile .num {
  font-family: "JetBrains Mono", monospace;
  font-weight: 800;
  font-size: 20px;
  color: var(--ink);
  margin-top: 2px;
  letter-spacing: -0.02em;
}
.hg-stat-tile.primary .num {
  background: linear-gradient(180deg, var(--gold-shine), var(--gold-soft) 60%, var(--gold));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.hg-stat-tile .hint {
  font-size: 11px;
  color: var(--ink-mute);
  margin-top: 2px;
}
.hg-stat-tile .num.positive {
  color: var(--good);
  background: none;
  -webkit-text-fill-color: var(--good);
}
.hg-stat-tile .num.negative {
  color: var(--bad);
  background: none;
  -webkit-text-fill-color: var(--bad);
}

.hg-stats-section {
  margin: 16px 0 6px;
  font-family: "Fraunces", serif;
  font-weight: 700;
  font-size: 16px;
  color: var(--gold-soft);
}
.hg-stats-explainer {
  font-size: 12px;
  color: var(--ink-dim);
  margin: 0 0 12px;
  line-height: 1.5;
}

.hg-leaks-list {
  display: grid;
  gap: 8px;
  margin-bottom: 12px;
}
.hg-leak-empty {
  text-align: center;
  font-size: 13px;
  color: var(--ink-dim);
  padding: 24px 14px;
  background: rgba(0, 0, 0, 0.2);
  border: 1px dashed rgba(255, 255, 255, 0.08);
  border-radius: 10px;
}
.hg-leak-row {
  display: grid;
  grid-template-columns: 36px 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 10px 12px;
  background: linear-gradient(180deg, rgba(255, 122, 122, 0.06), rgba(0, 0, 0, 0.3));
  border: 1px solid rgba(255, 122, 122, 0.18);
  border-radius: 10px;
}
.hg-leak-rank {
  font-family: "Fraunces", serif;
  font-weight: 900;
  font-size: 18px;
  color: var(--bad);
  text-align: center;
}
.hg-leak-body { display: flex; flex-direction: column; gap: 4px; }
.hg-leak-label {
  font-weight: 700;
  font-size: 14px;
  color: var(--ink);
}
.hg-leak-desc {
  font-size: 12px;
  color: var(--ink-dim);
  line-height: 1.4;
}
.hg-leak-bar {
  height: 4px;
  background: rgba(0, 0, 0, 0.4);
  border-radius: 999px;
  overflow: hidden;
  margin-top: 4px;
}
.hg-leak-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--bad), #ff5050);
  transition: width 0.5s ease;
}
.hg-leak-count {
  display: flex; flex-direction: column; align-items: center;
  font-family: "JetBrains Mono", monospace;
}
.hg-leak-count .num {
  font-weight: 800;
  font-size: 22px;
  color: var(--bad);
}
.hg-leak-count .lbl {
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--ink-mute);
}

.hg-hands-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
  max-height: 280px;
  overflow-y: auto;
  background: rgba(0, 0, 0, 0.25);
  border-radius: 10px;
  padding: 4px;
  border: 1px solid var(--panel-line);
  margin-bottom: 14px;
}
.hg-hand-row {
  display: grid;
  grid-template-columns: 50px 60px 1fr 80px 50px;
  gap: 8px;
  align-items: center;
  padding: 8px 10px;
  font-family: "JetBrains Mono", monospace;
  font-size: 12px;
  border-radius: 6px;
}
.hg-hand-row:nth-child(odd) { background: rgba(255, 255, 255, 0.02); }
.hg-hand-num { color: var(--ink-mute); font-weight: 700; }
.hg-hand-pos { color: var(--gold-soft); font-weight: 700; font-size: 11px; }
.hg-hand-cards { color: var(--ink); font-family: "Fraunces", serif; font-size: 13px; font-weight: 600; }
.hg-hand-result { font-weight: 700; text-align: right; }
.hg-hand-result.win { color: var(--good); }
.hg-hand-result.lose { color: var(--bad); }
.hg-hand-result.push { color: var(--ink-dim); }
.hg-hand-devs {
  text-align: center;
  font-weight: 700;
  font-size: 11px;
  padding: 3px 6px;
  border-radius: 999px;
  color: var(--good);
}
.hg-hand-devs.has-devs {
  color: var(--warn);
  background: rgba(240, 194, 75, 0.1);
}

.hg-stats-actions {
  display: flex; justify-content: flex-end; gap: 8px;
  margin-top: 12px;
}
.hg-stats-actions button.danger:hover {
  color: var(--bad);
  border-color: rgba(255, 122, 122, 0.4);
}

/* === Session review block (used inside cleared / busted modals) === */
.hg-review {
  margin: 14px 0 6px;
  padding-top: 14px;
  border-top: 1px solid rgba(217, 180, 106, 0.18);
  text-align: left;
}
.hg-review-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  margin-bottom: 14px;
}
.hg-review-stat {
  display: flex; flex-direction: column; align-items: center;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(217, 180, 106, 0.14);
  border-radius: 8px;
  padding: 6px 4px;
  font-variant-numeric: tabular-nums;
}
.hg-review-stat .lbl {
  font-size: 9px;
  color: var(--ink-dim);
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-weight: 600;
}
.hg-review-stat .num {
  font-family: "JetBrains Mono", monospace;
  font-weight: 800;
  font-size: 16px;
  color: var(--ink);
  margin-top: 1px;
}
.hg-review-stat .num.positive { color: var(--good); }
.hg-review-stat .num.negative { color: var(--bad); }

.hg-review-h {
  margin: 4px 0 8px;
  font-family: "Fraunces", serif;
  font-size: 15px;
  color: var(--gold-soft);
  font-weight: 700;
}
.hg-review-clean {
  text-align: center;
  font-size: 14px;
  color: var(--good);
  background: rgba(110, 224, 138, 0.06);
  border: 1px solid rgba(110, 224, 138, 0.25);
  border-radius: 10px;
  padding: 14px;
}
.hg-review-list { display: grid; gap: 8px; }
.hg-review-item {
  background: linear-gradient(180deg, rgba(255, 122, 122, 0.04), rgba(0, 0, 0, 0.3));
  border: 1px solid rgba(255, 122, 122, 0.18);
  border-radius: 10px;
  padding: 10px 12px;
}
.hg-review-head {
  display: flex; justify-content: space-between; align-items: center;
  gap: 10px; margin-bottom: 6px;
}
.hg-review-tag {
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--bad);
  background: rgba(255, 122, 122, 0.1);
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid rgba(255, 122, 122, 0.25);
}
.hg-review-meta {
  font-size: 11px;
  color: var(--ink-dim);
  font-family: "JetBrains Mono", monospace;
}
.hg-review-cards {
  font-family: "Fraunces", serif;
  font-weight: 700;
  font-size: 18px;
  color: var(--gold-soft);
  letter-spacing: 0.04em;
  margin-bottom: 4px;
}
.hg-review-narrative {
  font-size: 13px;
  color: var(--ink);
  line-height: 1.4;
  margin-bottom: 4px;
}
.hg-review-reason {
  font-size: 12px;
  color: var(--ink-dim);
  font-style: italic;
  line-height: 1.45;
}

@media (max-width: 720px) {
  .hg-stats-grid { grid-template-columns: repeat(2, 1fr); }
  .hg-hand-row { grid-template-columns: 36px 50px 1fr 70px 40px; font-size: 11px; }
}

/* =============================================================
   VEGAS FX — chip burst, floating text, sparkles, pulse glow
   ============================================================= */

/* Floating $ text indicators */
.cc-float {
  position: fixed;
  z-index: 1000;
  pointer-events: none;
  font-family: "Fraunces", "Times New Roman", serif;
  font-weight: 900;
  font-size: 28px;
  letter-spacing: -0.02em;
  white-space: nowrap;
  transform: translate(-50%, -10px);
  animation: ccFloatUp 1.6s cubic-bezier(.2, .7, .2, 1) forwards;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.6);
  font-variant-numeric: tabular-nums;
}
.cc-float-good {
  background: linear-gradient(180deg, #d3ffe1 0%, #6ee08a 60%, #3aa356 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 0 14px rgba(110, 224, 138, 0.6));
}
.cc-float-bad {
  background: linear-gradient(180deg, #ffd4d4 0%, #ff7a7a 60%, #c84040 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 0 12px rgba(255, 122, 122, 0.5));
}
.cc-float-neutral {
  color: var(--gold-soft);
  filter: drop-shadow(0 0 12px rgba(217, 180, 106, 0.4));
}
@keyframes ccFloatUp {
  0%   { transform: translate(-50%, 0px) scale(0.7); opacity: 0; }
  15%  { transform: translate(-50%, -8px) scale(1.1); opacity: 1; }
  30%  { transform: translate(-50%, -16px) scale(1); opacity: 1; }
  100% { transform: translate(-50%, -90px) scale(0.95); opacity: 0; }
}

/* Chip particles bursting outward */
.cc-chip {
  position: fixed;
  width: 16px; height: 16px;
  border-radius: 50%;
  z-index: 999;
  pointer-events: none;
  transform: translate(-50%, -50%);
  animation: ccChipFly 1.1s cubic-bezier(.25, .7, .3, 1) forwards;
  box-shadow:
    0 4px 8px rgba(0, 0, 0, 0.5),
    inset 0 -2px 0 rgba(0, 0, 0, 0.25),
    inset 0 1px 0 rgba(255, 255, 255, 0.4);
  border: 2px dashed rgba(255, 255, 255, 0.55);
  background-clip: padding-box;
}
.cc-chip.chip-gold {
  background: radial-gradient(circle at 30% 30%, var(--gold-shine), var(--gold) 55%, var(--brass));
}
.cc-chip.chip-red {
  background: radial-gradient(circle at 30% 30%, #ff8a8a, #c8323a 55%, #6e1a1f);
}
.cc-chip.chip-black {
  background: radial-gradient(circle at 30% 30%, #555, #1a1a1a 55%, #000);
}
@keyframes ccChipFly {
  0%   { transform: translate(-50%, -50%) scale(0.3) rotate(0deg); opacity: 0; }
  10%  { transform: translate(-50%, -50%) scale(1) rotate(20deg); opacity: 1; }
  100% {
    transform:
      translate(calc(-50% + var(--dx)), calc(-50% + var(--dy)))
      scale(0.5) rotate(360deg);
    opacity: 0;
  }
}

/* Gold sparkles for jackpot moments */
.cc-sparkle {
  position: fixed;
  width: 6px; height: 6px;
  z-index: 998;
  pointer-events: none;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle, var(--gold-shine) 0%, var(--gold) 50%, transparent 80%);
  border-radius: 50%;
  animation: ccSparkle 1.2s ease-out forwards;
  filter: drop-shadow(0 0 4px var(--gold));
}
@keyframes ccSparkle {
  0%   { transform: translate(-50%, -50%) scale(0) rotate(0deg); opacity: 0; }
  20%  { transform: translate(-50%, -50%) scale(1.2); opacity: 1; }
  100% {
    transform:
      translate(calc(-50% + var(--dx)), calc(-50% + var(--dy)))
      scale(0) rotate(180deg);
    opacity: 0;
  }
}

/* Pulse glow on key elements (e.g. bankroll on win) */
.cc-pulse-gold {
  animation: ccPulseGold 0.9s ease-out;
}
@keyframes ccPulseGold {
  0%   { filter: drop-shadow(0 0 0 rgba(217, 180, 106, 0)); }
  30%  { filter: drop-shadow(0 0 18px rgba(240, 217, 153, 0.8)) drop-shadow(0 0 30px rgba(217, 180, 106, 0.5)); }
  100% { filter: drop-shadow(0 0 0 rgba(217, 180, 106, 0)); }
}
.cc-pulse-good {
  animation: ccPulseGood 0.9s ease-out;
}
@keyframes ccPulseGood {
  0%, 100% { filter: drop-shadow(0 0 0 transparent); }
  40%      { filter: drop-shadow(0 0 24px rgba(110, 224, 138, 0.7)); }
}

/* Neon outline pulse — key recommendation states (idle pulse, very subtle) */
.he-rec.raise { animation: ccNeonPulseGreen 2.4s ease-in-out infinite; }
.he-rec.fold  { animation: ccNeonPulseRed 2.4s ease-in-out infinite; }
@keyframes ccNeonPulseGreen {
  0%, 100% { box-shadow:
    inset 0 1px 0 rgba(110, 224, 138, 0.25),
    inset 0 -1px 0 rgba(0, 0, 0, 0.4),
    0 0 22px rgba(110, 224, 138, 0.15),
    0 8px 20px rgba(0, 0, 0, 0.4); }
  50%      { box-shadow:
    inset 0 1px 0 rgba(110, 224, 138, 0.45),
    inset 0 -1px 0 rgba(0, 0, 0, 0.4),
    0 0 38px rgba(110, 224, 138, 0.35),
    0 8px 20px rgba(0, 0, 0, 0.4); }
}
@keyframes ccNeonPulseRed {
  0%, 100% { box-shadow:
    inset 0 1px 0 rgba(255, 122, 122, 0.18),
    inset 0 -1px 0 rgba(0, 0, 0, 0.4),
    0 0 18px rgba(255, 122, 122, 0.12),
    0 8px 20px rgba(0, 0, 0, 0.4); }
  50%      { box-shadow:
    inset 0 1px 0 rgba(255, 122, 122, 0.3),
    inset 0 -1px 0 rgba(0, 0, 0, 0.4),
    0 0 30px rgba(255, 122, 122, 0.25),
    0 8px 20px rgba(0, 0, 0, 0.4); }
}

/* Advice plate gentle gold pulse */
.bj-advice {
  animation: ccAdvicePulse 3.2s ease-in-out infinite;
}
@keyframes ccAdvicePulse {
  0%, 100% { box-shadow:
    inset 0 1px 0 rgba(217, 180, 106, 0.4),
    inset 0 -1px 0 rgba(0, 0, 0, 0.5),
    0 0 24px rgba(217, 180, 106, 0.12),
    0 8px 20px rgba(0, 0, 0, 0.4); }
  50%      { box-shadow:
    inset 0 1px 0 rgba(217, 180, 106, 0.55),
    inset 0 -1px 0 rgba(0, 0, 0, 0.5),
    0 0 36px rgba(217, 180, 106, 0.22),
    0 8px 20px rgba(0, 0, 0, 0.4); }
}

/* ============= BLACKJACK ============= */
.bj-meta {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 12px;
  align-items: center;
}
.bj-stat {
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  font-variant-numeric: tabular-nums;
  padding: 8px 6px;
  border-radius: 10px;
  background: linear-gradient(180deg, rgba(217, 180, 106, 0.04) 0%, rgba(0, 0, 0, 0.25) 100%);
  border: 1px solid rgba(217, 180, 106, 0.1);
  box-shadow:
    inset 0 1px 0 rgba(217, 180, 106, 0.12),
    inset 0 -1px 0 rgba(0, 0, 0, 0.3);
}
.bj-stat .lbl { font-size: 10px; color: var(--ink-dim); text-transform: uppercase; letter-spacing: 0.14em; }
.bj-stat span:not(.lbl) {
  font-size: 20px;
  font-weight: 700;
  font-family: "JetBrains Mono", monospace;
}
#bjBank {
  background: linear-gradient(180deg, var(--gold-shine), var(--gold) 70%, var(--brass));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  font-weight: 800;
  letter-spacing: 0.01em;
}

.bj-bet { display: flex; align-items: center; gap: 6px; }
.bj-bet button { padding: 4px 10px; font-size: 14px; min-width: 0; border-radius: 8px; }
.bj-bet input { font-size: 18px; width: 90px; padding: 6px 10px; }

.bj-table {
  position: relative;
  display: grid;
  grid-template-rows: 1fr auto 1fr;
  gap: 14px;
  padding: 32px 24px;
  background:
    /* Top spotlight */
    radial-gradient(ellipse 700px 360px at 50% 0%, rgba(255, 230, 180, 0.08) 0%, transparent 60%),
    /* Center glow */
    radial-gradient(ellipse 700px 460px at 50% 50%, rgba(255, 220, 160, 0.06) 0%, transparent 65%),
    /* Felt base */
    linear-gradient(180deg, rgba(15, 60, 42, 0.55) 0%, rgba(8, 35, 25, 0.72) 100%);
  border-radius: 24px;
  border: 1px solid var(--gold-trim);
  box-shadow:
    inset 0 0 0 1px rgba(217, 180, 106, 0.14),
    inset 0 0 0 8px rgba(8, 30, 22, 0.6),
    inset 0 0 110px rgba(0, 0, 0, 0.45),
    0 30px 80px rgba(0, 0, 0, 0.5),
    0 10px 24px rgba(0, 0, 0, 0.3);
  min-height: 460px;
  overflow: hidden;
}
/* Felt noise */
.bj-table::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.18;
  mix-blend-mode: overlay;
  background-image:
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='200' height='200'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='1.2' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0  0 0 0 0 0  0 0 0 0 0  0 0 0 0.6 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
  border-radius: 24px;
}
.bj-table::before {
  content: "";
  position: absolute;
  inset: 16px;
  border-radius: 16px;
  border: 1px dashed rgba(217, 180, 106, 0.28);
  pointer-events: none;
  z-index: 1;
}
.bj-table > * { position: relative; z-index: 2; }

.bj-side { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.bj-side-head { display: flex; align-items: center; gap: 14px; font-family: "Fraunces", serif; font-size: 16px; }
.bj-side-head .lbl { color: var(--gold-soft); font-weight: 700; text-transform: uppercase; font-size: 12px; letter-spacing: 0.18em; font-family: "Inter", sans-serif; }
.bj-side-head span:last-child { font-family: "JetBrains Mono", monospace; font-weight: 700; font-size: 18px; color: var(--ink); padding: 2px 10px; background: rgba(0,0,0,0.4); border: 1px solid var(--panel-line); border-radius: 999px; }

.bj-cards { display: flex; min-height: 130px; align-items: center; justify-content: center; }
.bj-cards .bj-card-wrap { margin-left: -42px; }
.bj-cards .bj-card-wrap:first-child { margin-left: 0; }

.bj-card {
  width: 92px; height: 130px; border-radius: 10px;
  background:
    linear-gradient(180deg, var(--card-shine) 0%, #fefdf8 6%, #f4eeda 94%, #ebe3c9 100%);
  border: 1px solid var(--card-edge);
  box-shadow:
    0 14px 30px rgba(0, 0, 0, 0.5),
    0 4px 10px rgba(0, 0, 0, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.85),
    inset 0 -1px 0 rgba(0, 0, 0, 0.06);
  font-family: "Fraunces", serif;
  display: grid;
  grid-template-columns: auto 1fr auto;
  grid-template-rows: auto 1fr auto;
  padding: 6px 8px;
  position: relative;
  overflow: hidden;
}
.bj-cards .bj-card-wrap:last-child .bj-card { animation: bjDeal 0.32s cubic-bezier(.2,.7,.3,1.05); }
@keyframes bjDeal {
  from { transform: translate(-60px, -40px) rotate(-10deg); opacity: 0; }
  to   { transform: none; opacity: 1; }
}
.bj-card.red  { color: var(--red); }
.bj-card.black { color: var(--black); }

.bj-card .bj-corner {
  display: flex; flex-direction: column; align-items: center;
  font-weight: 700; line-height: 0.95;
}
.bj-card .bj-corner.tl { grid-row: 1; grid-column: 1; }
.bj-card .bj-corner.br { grid-row: 3; grid-column: 3; transform: rotate(180deg); }
.bj-card .bj-rank { font-size: 16px; line-height: 1; }
.bj-card .bj-rank-suit { font-size: 12px; line-height: 1; margin-top: 1px; }

.bj-card .bj-pips {
  grid-row: 1 / 4; grid-column: 2;
  display: grid; align-items: stretch; justify-items: center;
  padding: 4px 0;
}
.bj-card .bj-pips.center { place-items: center; }
.bj-card .bj-pips.center .bj-big-suit { font-size: 44px; line-height: 1; }
.bj-card .bj-pips.face-art {
  place-items: center; font-family: "Fraunces", serif; font-weight: 900; gap: 2px;
}
.bj-card .bj-pips.face-art .bj-glyph {
  font-size: 50px; line-height: 1; letter-spacing: -0.04em;
}
.bj-card .bj-pips.face-art .bj-face-suit {
  font-size: 16px; line-height: 1; font-weight: 700;
}
.bj-card .bj-pip { line-height: 1; font-size: 13px; }

.bj-card.hole {
  background:
    radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.12) 0%, transparent 50%),
    repeating-linear-gradient(45deg, #8a1f24 0 8px, #6a1418 8px 16px),
    repeating-linear-gradient(-45deg, transparent 0 8px, rgba(0,0,0,0.18) 8px 16px);
  background-blend-mode: normal, normal, multiply;
  border-color: rgba(0,0,0,0.35);
  display: block; padding: 0;
}
.bj-card.hole::after {
  content: ""; position: absolute; inset: 8px;
  border: 1.5px solid rgba(255,255,255,0.22); border-radius: 6px;
}

.bj-hands { display: flex; gap: 24px; flex-wrap: wrap; justify-content: center; }
.bj-hand {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  padding: 10px 14px;
  border: 1px dashed rgba(255,255,255,0.15);
  border-radius: 14px;
  background: rgba(0,0,0,0.2);
  min-width: 220px;
}
.bj-hand.active { border-color: var(--gold); box-shadow: 0 0 0 2px rgba(217, 180, 106, 0.2); background: rgba(217, 180, 106, 0.04); }
.bj-hand .bj-hand-meta { font-size: 12px; color: var(--ink-dim); display: flex; gap: 12px; }
.bj-hand .bj-hand-meta b { color: var(--ink); font-weight: 600; font-family: "JetBrains Mono", monospace; }
.bj-hand .bj-hand-result { font-weight: 700; font-size: 14px; padding: 4px 10px; border-radius: 999px; }
.bj-hand .bj-hand-result.win  { background: rgba(110, 224, 138, 0.15); color: var(--good); border: 1px solid rgba(110, 224, 138, 0.3); }
.bj-hand .bj-hand-result.lose { background: rgba(255, 122, 122, 0.12); color: var(--bad);  border: 1px solid rgba(255, 122, 122, 0.3); }
.bj-hand .bj-hand-result.push { background: rgba(255,255,255,0.06); color: var(--ink-dim); border: 1px solid var(--panel-line); }

.bj-advice {
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  padding: 14px 22px;
  background:
    radial-gradient(ellipse at top, rgba(217, 180, 106, 0.1) 0%, transparent 60%),
    linear-gradient(180deg, rgba(20, 14, 4, 0.85) 0%, rgba(8, 5, 2, 0.95) 100%);
  border: 1px solid rgba(217, 180, 106, 0.45);
  border-radius: 14px;
  align-self: center;
  min-width: 320px;
  box-shadow:
    inset 0 1px 0 rgba(217, 180, 106, 0.4),
    inset 0 -1px 0 rgba(0, 0, 0, 0.5),
    0 0 24px rgba(217, 180, 106, 0.12),
    0 8px 20px rgba(0, 0, 0, 0.4);
}
.bj-advice-action {
  font-family: "Fraunces", serif;
  font-size: 28px;
  font-weight: 900;
  color: var(--gold-soft);
  letter-spacing: 0.01em;
  text-transform: uppercase;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.6);
}
.bj-advice-action.action-hit { color: #74cef0; }
.bj-advice-action.action-stand { color: var(--good); }
.bj-advice-action.action-double { color: var(--gold-soft); }
.bj-advice-action.action-split { color: #d8a0ff; }
.bj-advice-action.action-surrender { color: var(--bad); }
.bj-advice-reason { font-size: 12px; color: var(--ink-dim); font-style: italic; }
.bj-advice-reason b { color: var(--gold); font-style: normal; font-weight: 600; }

.bj-bet-hint { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 12px 18px; }
.bj-bet-hint .lbl { font-size: 12px; color: var(--ink-dim); text-transform: uppercase; letter-spacing: 0.14em; }
.bj-bet-hint .val { font-family: "JetBrains Mono", monospace; font-size: 16px; font-weight: 700; color: var(--gold-soft); }
.bj-bet-hint button { font-size: 12px; padding: 6px 12px; }

.bj-actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.bj-actions button { min-width: 110px; }

.bj-log { max-height: 320px; overflow-y: auto; }
.bj-log-empty { color: var(--ink-mute); font-style: italic; text-align: center; padding: 14px; }
.bj-log-row {
  display: grid;
  grid-template-columns: 38px 1fr 1fr 80px 80px;
  gap: 10px;
  padding: 8px 10px;
  border-bottom: 1px solid var(--panel-line);
  font-family: "JetBrains Mono", monospace;
  font-size: 12px;
  align-items: center;
}
.bj-log-row:last-child { border-bottom: none; }
.bj-log-row .num { color: var(--ink-mute); }
.bj-log-row .res { font-weight: 700; }
.bj-log-row .res.win { color: var(--good); }
.bj-log-row .res.lose { color: var(--bad); }
.bj-log-row .res.push { color: var(--ink-dim); }
.bj-log-row .delta.up { color: var(--good); }
.bj-log-row .delta.down { color: var(--bad); }
.bj-log-row .bal { color: var(--gold-soft); text-align: right; }

/* ============= HOLD'EM ============= */
.he-board-panel { padding: 22px; }
.he-step + .he-step { margin-top: 22px; padding-top: 22px; border-top: 1px solid var(--panel-line); }
.he-step-head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 12px; gap: 10px; flex-wrap: wrap;
}
.he-step-label {
  font-size: 11px; color: var(--ink-dim);
  text-transform: uppercase; letter-spacing: 0.14em;
}
.he-step-meta {
  margin-left: 8px; font-size: 11px; color: var(--ink-mute);
  text-transform: none; letter-spacing: 0;
  font-family: "JetBrains Mono", monospace;
}
.he-deal-buttons { display: flex; gap: 6px; flex-wrap: wrap; }
.he-mini-btn {
  padding: 6px 12px; font-size: 12px; font-weight: 600;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.3);
  color: var(--ink-dim);
  border: 1px solid var(--panel-line);
}
.he-mini-btn:hover:not(:disabled) {
  color: var(--gold-soft); background: rgba(217, 180, 106, 0.08);
  border-color: rgba(217, 180, 106, 0.25);
}
.he-mini-btn:disabled { opacity: 0.3; }
.he-mini-btn.primary-mini {
  background: linear-gradient(180deg, #2c1f08, #1a1305);
  color: var(--gold-soft);
  border-color: rgba(217, 180, 106, 0.4);
}
.he-mini-btn.primary-mini:hover:not(:disabled) {
  background: linear-gradient(180deg, #3a2a10, #25190a);
}

.he-opponents-list { display: grid; gap: 8px; }
.he-opp {
  display: flex; align-items: center; gap: 12px;
  padding: 8px 12px;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid var(--panel-line);
  border-radius: 12px;
  flex-wrap: wrap;
}
.he-opp-label {
  font-family: "JetBrains Mono", monospace;
  font-weight: 700; font-size: 13px;
  color: var(--ink-dim);
  min-width: 32px;
}
.he-opp .he-slots.small { gap: 4px; }
.he-slot.small { width: 52px; height: 72px; }
.he-slot.small .he-slot-empty { font-size: 20px; }
.he-slot.small.filled .he-mini-rank { font-size: 18px; }
.he-slot.small.filled .he-mini-suit { font-size: 20px; }
.he-slot.small.filled .he-mini-x { width: 14px; height: 14px; font-size: 10px; top: 2px; right: 2px; }
.he-range {
  background: rgba(0, 0, 0, 0.4);
  color: var(--ink);
  border: 1px solid var(--panel-line);
  padding: 6px 10px;
  border-radius: 8px;
  font-family: "Inter", sans-serif;
  font-size: 12px;
  font-weight: 500;
  min-width: 0;
  width: auto;
  max-width: 180px;
}
.he-range:disabled { opacity: 0.4; cursor: not-allowed; }
.he-range:focus-visible { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(217, 180, 106, 0.18); }

.he-opp-status {
  font-size: 10px; text-transform: uppercase; letter-spacing: 0.12em;
  font-weight: 600;
  padding: 3px 8px; border-radius: 999px;
  background: rgba(0,0,0,0.3);
  color: var(--ink-mute);
  margin-left: auto;
}
.he-opp-status.set { color: var(--good); background: rgba(110, 224, 138, 0.1); }
.he-opp-status.incomplete { color: var(--warn); background: rgba(240, 194, 75, 0.1); }
.he-opp-status.range { color: var(--gold-soft); background: rgba(217, 180, 106, 0.1); }

/* Loading state */
.he-equity-num span.loading { color: var(--ink-mute); animation: pulse 1s ease-in-out infinite; }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.4; } }
.loading-text { color: var(--ink-mute); animation: pulse 1s ease-in-out infinite; }

/* Global focus styles */
:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
  border-radius: 4px;
}
button:focus-visible { outline-offset: 3px; }
.he-slot:focus-visible { outline-offset: 4px; }
.he-picker-cell:focus-visible { outline-offset: 1px; }

/* Tighter mobile layout for opponents */
@media (max-width: 720px) {
  .he-opp { gap: 8px; }
  .he-range { font-size: 11px; padding: 5px 8px; max-width: 130px; }
  .he-opp-status { display: none; }
}
.he-opp-actions { display: flex; gap: 4px; }
.he-opp-actions .he-mini-btn {
  padding: 4px 8px; font-size: 13px; min-width: 28px;
}
.he-opp-actions .he-mini-btn.danger:hover:not(:disabled) {
  color: var(--bad); background: rgba(255, 122, 122, 0.08); border-color: rgba(255, 122, 122, 0.25);
}
.he-slots { display: flex; gap: 8px; flex-wrap: wrap; }
.he-slot {
  width: 78px; height: 110px;
  border: 1.5px dashed rgba(255,255,255,0.18);
  background: rgba(0, 0, 0, 0.25);
  border-radius: 10px;
  padding: 0;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease, transform 0.08s;
  position: relative;
  overflow: hidden;
}
.he-slot:hover { border-color: var(--gold); background: rgba(217,180,106,0.06); }
.he-slot .he-slot-empty { font-size: 28px; color: var(--ink-mute); font-weight: 300; }
.he-slot.turn-river { border-color: rgba(255,255,255,0.1); }
.he-slot.filled {
  border-style: solid; border-color: var(--card-edge);
  background: var(--card-bg);
  font-family: "Fraunces", serif;
}
.he-slot.filled .he-mini-card {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  width: 100%; height: 100%; padding: 6px;
  font-weight: 700;
}
.he-slot.filled.red { color: var(--red); }
.he-slot.filled.black { color: var(--black); }
.he-slot.filled .he-mini-rank { font-size: 28px; line-height: 1; }
.he-slot.filled .he-mini-suit { font-size: 30px; line-height: 1; margin-top: 2px; }
.he-slot.filled .he-mini-x {
  position: absolute; top: 4px; right: 4px;
  width: 18px; height: 18px; border-radius: 50%;
  background: rgba(0,0,0,0.7); color: #fff;
  font-size: 12px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  opacity: 0.45;
  transition: opacity 0.15s ease;
}
.he-slot.filled:hover .he-mini-x { opacity: 1; }

.he-result { display: grid; gap: 18px; }
.he-equity-row {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 24px;
  align-items: center;
}
.he-equity-circle {
  position: relative;
  width: 200px;
  height: 200px;
}
/* Soft gold halo */
.he-equity-circle::before {
  content: "";
  position: absolute;
  inset: -10px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(217, 180, 106, 0.18) 0%, transparent 70%);
  pointer-events: none;
  filter: blur(4px);
}
.he-equity-circle svg { width: 100%; height: 100%; position: relative; z-index: 1; }
#heRing {
  transition: stroke-dashoffset 0.6s cubic-bezier(.2,.7,.3,1);
  filter: drop-shadow(0 0 8px rgba(217, 180, 106, 0.5));
}
.he-equity-num {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  z-index: 2;
}
.he-equity-num span {
  font-family: "Fraunces", serif;
  font-weight: 900;
  font-size: 48px;
  letter-spacing: -0.02em;
  background: linear-gradient(180deg, var(--gold-shine) 0%, var(--gold-soft) 50%, var(--gold) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.5));
}
.he-equity-num small {
  color: var(--ink-dim);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  margin-top: 2px;
}

.he-bars { display: flex; flex-direction: column; gap: 10px; }
.he-bar { display: grid; grid-template-columns: 60px 1fr 60px; gap: 12px; align-items: center; }
.he-bar .lbl { font-size: 12px; color: var(--ink-dim); text-transform: uppercase; letter-spacing: 0.12em; }
.he-bar .bar { height: 14px; background: rgba(0,0,0,0.4); border-radius: 999px; overflow: hidden; border: 1px solid var(--panel-line); }
.he-bar .fill { height: 100%; width: 0%; transition: width 0.5s cubic-bezier(.2,.7,.3,1); border-radius: 999px; }
.he-bar .fill.win  { background: linear-gradient(90deg, #4faf6c, #6ee08a); }
.he-bar .fill.tie  { background: linear-gradient(90deg, #b59740, #d9b46a); }
.he-bar .fill.lose { background: linear-gradient(90deg, #b53d44, #ff7a7a); }
.he-bar .val { font-family: "JetBrains Mono", monospace; font-weight: 700; font-size: 14px; text-align: right; }

.he-info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
}
.he-info-grid > div {
  background: var(--panel-strong); border: 1px solid var(--panel-line);
  padding: 12px 10px; border-radius: 12px;
  display: flex; flex-direction: column; align-items: center; gap: 4px;
}
.he-info-grid .lbl { font-size: 10px; color: var(--ink-dim); text-transform: uppercase; letter-spacing: 0.14em; }
.he-info-grid span:not(.lbl) { font-size: 18px; font-weight: 700; font-family: "JetBrains Mono", monospace; font-variant-numeric: tabular-nums; }

.he-rec {
  text-align: center;
  font-family: "Fraunces", serif;
  font-size: 36px;
  font-weight: 900;
  letter-spacing: 0.02em;
  padding: 18px;
  border-radius: 14px;
  border: 1px solid var(--panel-line);
  background: rgba(0, 0, 0, 0.3);
  text-transform: uppercase;
  position: relative;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.5);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    inset 0 -1px 0 rgba(0, 0, 0, 0.4),
    0 8px 20px rgba(0, 0, 0, 0.3);
}
.he-rec.fold {
  color: var(--bad);
  border-color: rgba(255, 122, 122, 0.4);
  background:
    radial-gradient(ellipse at top, rgba(255, 122, 122, 0.12) 0%, transparent 70%),
    rgba(40, 8, 8, 0.4);
  box-shadow:
    inset 0 1px 0 rgba(255, 122, 122, 0.2),
    inset 0 -1px 0 rgba(0, 0, 0, 0.4),
    0 0 24px rgba(255, 122, 122, 0.15),
    0 8px 20px rgba(0, 0, 0, 0.4);
}
.he-rec.call {
  color: var(--gold-soft);
  border-color: rgba(217, 180, 106, 0.4);
  background:
    radial-gradient(ellipse at top, rgba(217, 180, 106, 0.12) 0%, transparent 70%),
    rgba(30, 22, 6, 0.4);
  box-shadow:
    inset 0 1px 0 rgba(217, 180, 106, 0.3),
    inset 0 -1px 0 rgba(0, 0, 0, 0.4),
    0 0 24px rgba(217, 180, 106, 0.15),
    0 8px 20px rgba(0, 0, 0, 0.4);
}
.he-rec.raise {
  color: var(--good);
  border-color: rgba(110, 224, 138, 0.4);
  background:
    radial-gradient(ellipse at top, rgba(110, 224, 138, 0.12) 0%, transparent 70%),
    rgba(8, 30, 16, 0.4);
  box-shadow:
    inset 0 1px 0 rgba(110, 224, 138, 0.25),
    inset 0 -1px 0 rgba(0, 0, 0, 0.4),
    0 0 28px rgba(110, 224, 138, 0.2),
    0 8px 20px rgba(0, 0, 0, 0.4);
}
.he-rec.check {
  color: var(--ink-soft);
  border-color: rgba(217, 180, 106, 0.2);
  background: rgba(255, 255, 255, 0.03);
}

.he-note { text-align: center; color: var(--ink-dim); font-size: 13px; font-style: italic; margin-top: -6px; }
.he-note b { color: var(--gold-soft); font-style: normal; font-weight: 600; }

.he-picker {
  position: fixed; inset: 0;
  background: rgba(0, 0, 0, 0.7);
  z-index: 100;
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
  backdrop-filter: blur(4px);
}
.he-picker[hidden] { display: none; }
.he-picker-card {
  width: 100%; max-width: 540px;
  background: linear-gradient(180deg, #15392a, #0c2419);
  border: 1px solid var(--panel-line);
  border-radius: 16px;
  padding: 18px;
  box-shadow: 0 30px 80px rgba(0,0,0,0.6);
}
.he-picker-head {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 14px;
}
.he-picker-head span { font-family: "Fraunces", serif; font-size: 16px; color: var(--gold-soft); font-weight: 700; }
.he-picker-head button {
  width: 32px; height: 32px; border-radius: 50%;
  font-size: 18px; font-weight: 700; padding: 0;
}
.he-picker-grid {
  display: grid;
  grid-template-columns: repeat(13, 1fr);
  gap: 4px;
}
.he-picker-cell {
  aspect-ratio: 0.7;
  border: 1px solid var(--card-edge);
  background: var(--card-bg);
  border-radius: 6px;
  cursor: pointer;
  font-family: "Fraunces", serif;
  font-weight: 700;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 0; gap: 0;
  transition: transform 0.08s, border-color 0.15s, opacity 0.15s;
}
.he-picker-cell.red { color: var(--red); }
.he-picker-cell.black { color: var(--black); }
.he-picker-cell:hover:not(:disabled) { transform: translateY(-2px); border-color: var(--gold); }
.he-picker-cell:disabled { opacity: 0.18; cursor: not-allowed; }
.he-picker-cell .pr { font-size: 13px; line-height: 1; }
.he-picker-cell .ps { font-size: 14px; line-height: 1; margin-top: 1px; }

/* =============================================================
   MOBILE / APP-LIKE EXPERIENCE
   - Touch targets ≥ 44px
   - Inputs ≥ 16px to prevent iOS zoom
   - Compact, thumb-friendly layouts
   - PWA-ready spacing with safe-area insets
   ============================================================= */

@media (max-width: 760px) {
  /* Header — compact */
  header {
    margin-bottom: 12px;
  }
  .brand { gap: 4px; }
  .brand-mark { width: 42px; height: 42px; }
  .brand-logo { width: clamp(160px, 50vw, 220px); }
  h1 { font-size: 22px; }
  .kicker { font-size: 12px; }

  /* Tabs — bigger targets, FULLY OPAQUE so scrolled content doesn't bleed through */
  nav.tabs {
    margin-bottom: 14px;
    padding: 4px;
    border-radius: 12px;
    position: sticky;
    top: env(safe-area-inset-top, 0px);
    z-index: 10;
    background:
      linear-gradient(180deg, #0e3b2a 0%, #082319 100%);
    box-shadow:
      inset 0 1px 0 rgba(217, 180, 106, 0.18),
      0 8px 18px rgba(0, 0, 0, 0.45),
      0 14px 22px -8px rgba(0, 0, 0, 0.55);
  }
  nav.tabs .tab {
    padding: 12px 8px;
    font-size: 13px;
    min-height: 44px;
  }

  /* Section heads */
  .view-head h2 { font-size: 18px; }
  .badge { font-size: 11px; padding: 5px 10px; letter-spacing: 0.08em; }

  /* Panels */
  .panel { padding: 14px; border-radius: 14px; }

  /* Inputs — prevent iOS zoom + bigger */
  select, input[type="number"] {
    font-size: 16px;
    padding: 10px 12px;
    min-height: 44px;
    min-width: 0;
    width: 100%;
  }
  input[type="number"] {
    font-size: 24px;
    text-align: center;
  }
  label { gap: 6px; flex: 1 1 calc(50% - 7px); }
  label.check {
    flex: 1 1 100%;
    padding: 12px 14px;
    min-height: 44px;
  }
  .row { gap: 10px; }

  /* Buttons */
  button { min-height: 44px; }
  button.big { font-size: 15px; padding: 14px 20px; }
  button.chip { min-height: 36px; padding: 8px 14px; }
  .answer-controls .step { width: 56px; height: 56px; font-size: 26px; }

  /* ===== Trainer ===== */
  .table { padding: 18px 12px 16px; min-height: 0; }
  .rail-top { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .card-stage, .card { width: 156px; height: 218px; }
  .card-face .corner .rank { font-size: 22px; }
  .card-face .corner .suit-sm { font-size: 18px; }
  .card-face .pips.center .big-suit { font-size: 64px; }
  .card-face .pips.face-art .glyph { font-size: 90px; }
  .card-face .pips .pip { font-size: 22px; }
  .quick-row button { min-height: 38px; }

  /* ===== Blackjack ===== */
  .bj-meta {
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    padding: 14px;
  }
  .bj-stat span:not(.lbl) { font-size: 18px; }
  .bj-stat .lbl { font-size: 9px; }
  #bjBank { font-size: 22px; }
  .bj-bet { gap: 4px; }
  .bj-bet button { padding: 0; width: 36px; height: 36px; font-size: 18px; min-height: 36px; min-width: 36px; }
  .bj-bet input { font-size: 18px; width: 76px; padding: 8px 6px; min-height: 36px; }

  .bj-table { padding: 16px 10px; min-height: 360px; gap: 10px; }
  .bj-table::before { inset: 6px; }
  .bj-side-head { font-size: 14px; gap: 10px; }
  .bj-side-head .lbl { font-size: 11px; }
  .bj-side-head span:last-child { font-size: 16px; padding: 2px 8px; }

  .bj-cards { min-height: 110px; }
  .bj-cards .bj-card-wrap { margin-left: -36px; }
  .bj-card { width: 78px; height: 110px; padding: 5px 7px; }
  .bj-card .bj-rank { font-size: 14px; }
  .bj-card .bj-rank-suit { font-size: 11px; }
  .bj-card .bj-pips.center .bj-big-suit { font-size: 36px; }
  .bj-card .bj-pips.face-art .bj-glyph { font-size: 42px; }
  .bj-card .bj-pips.face-art .bj-face-suit { font-size: 13px; }
  .bj-card .bj-pip { font-size: 11px; }

  .bj-hand { padding: 8px 12px; min-width: 0; gap: 6px; }
  .bj-hand .bj-hand-meta { font-size: 11px; gap: 8px; flex-wrap: wrap; justify-content: center; }
  .bj-hand .bj-hand-result { font-size: 12px; padding: 3px 8px; }

  .bj-advice {
    padding: 10px 14px;
    min-width: 0;
    width: 100%;
  }
  .bj-advice-action { font-size: 22px; }

  .bj-actions {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
  }
  .bj-actions button {
    min-width: 0;
    padding: 12px 8px;
    font-size: 14px;
  }
  .bj-actions button.primary.big {
    grid-column: 1 / -1;
    margin-top: 0;
    padding: 16px;
    font-size: 16px;
  }

  .bj-bet-hint { padding: 10px 14px; flex-wrap: wrap; gap: 8px; }
  .bj-log { max-height: 240px; }
  .bj-log-row { grid-template-columns: 32px 1fr 70px 60px 70px; gap: 6px; font-size: 11px; }

  /* ===== Hold'em ===== */
  .he-slots { gap: 8px; flex-wrap: wrap; }
  .he-slot { width: 72px; height: 100px; }
  .he-slot .he-slot-empty { font-size: 26px; }
  .he-slot.filled .he-mini-rank { font-size: 22px; }
  .he-slot.filled .he-mini-suit { font-size: 24px; }

  .he-step + .he-step { margin-top: 18px; padding-top: 16px; }

  .he-deal-buttons { width: 100%; justify-content: flex-start; }
  .he-mini-btn { min-height: 36px; padding: 8px 12px; font-size: 12px; }
  .he-mini-btn.primary-mini { padding: 8px 14px; }

  .he-opp {
    flex-wrap: wrap;
    gap: 8px;
    padding: 10px;
  }
  .he-opp-label { min-width: 28px; }
  .he-opp .he-slots.small { gap: 6px; }
  .he-slot.small { width: 50px; height: 70px; min-height: 0; }
  .he-slot.small .he-slot-empty { font-size: 18px; }
  .he-slot.small.filled .he-mini-rank { font-size: 16px; }
  .he-slot.small.filled .he-mini-suit { font-size: 18px; }
  .he-range {
    flex: 1 1 100%;
    width: 100%;
    max-width: 100%;
    min-height: 36px;
    font-size: 13px;
  }
  .he-opp-status {
    order: -1;
    margin-left: 0;
  }
  .he-opp-actions { gap: 6px; }
  .he-opp-actions .he-mini-btn { min-width: 36px; min-height: 36px; padding: 0 8px; }

  .he-equity-row {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  .he-equity-circle { width: 180px; height: 180px; margin: 0 auto; }
  .he-equity-num span { font-size: 40px; }
  .he-bar { grid-template-columns: 50px 1fr 56px; gap: 8px; }
  .he-bar .lbl { font-size: 11px; }
  .he-bar .val { font-size: 13px; }

  .he-info-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .he-info-grid > div { padding: 10px 8px; }
  .he-info-grid span:not(.lbl) { font-size: 16px; }

  .he-rec { font-size: 26px; padding: 14px; }

  /* Picker — bottom sheet on mobile */
  .he-picker {
    padding: 0;
    align-items: flex-end;
    background: rgba(0, 0, 0, 0.55);
  }
  .he-picker-card {
    width: 100%;
    max-width: 100%;
    border-radius: 18px 18px 0 0;
    max-height: 88vh;
    padding: 14px 12px calc(14px + env(safe-area-inset-bottom, 0px));
    animation: heSheetUp 0.28s cubic-bezier(.2, .8, .2, 1);
    display: flex;
    flex-direction: column;
    overflow: hidden;
  }
  @keyframes heSheetUp {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
  }
  .he-picker-card::before {
    content: "";
    display: block;
    width: 40px;
    height: 4px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.25);
    margin: 0 auto 10px;
  }
  .he-picker-head {
    margin-bottom: 12px;
    padding: 0 4px;
  }
  .he-picker-head span { font-size: 15px; }
  .he-picker-head button {
    width: 36px; height: 36px;
    font-size: 22px;
  }
  .he-picker-grid {
    grid-template-columns: repeat(13, 1fr);
    gap: 3px;
    overflow-y: auto;
    padding-bottom: 4px;
  }
  .he-picker-cell {
    aspect-ratio: 0.65;
    border-radius: 5px;
  }
  .he-picker-cell .pr { font-size: 12px; }
  .he-picker-cell .ps { font-size: 13px; }
  .he-picker-cell:hover:not(:disabled) { transform: none; }

  /* Result/answer/stats */
  .answer h2 { font-size: 16px; }
  .verdict { font-size: 26px; }
  .result-grid, .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .result-grid > div, .stats-grid > div { padding: 10px 8px; }
  .result-grid span:not(.lbl), .stats-grid span:not(.lbl) { font-size: 18px; }

  footer { font-size: 11px; margin-top: 18px; }
}

/* ===== Smaller phones ===== */
@media (max-width: 480px) {
  body {
    padding:
      calc(18px + env(safe-area-inset-top, 0px))
      calc(12px + env(safe-area-inset-right, 0px))
      calc(60px + env(safe-area-inset-bottom, 0px))
      calc(12px + env(safe-area-inset-left, 0px));
  }
  .kicker { display: none; }
  h1 { font-size: 20px; }

  /* Trainer */
  .card-stage, .card { width: 140px; height: 196px; }
  .card-face .corner .rank { font-size: 20px; }
  .card-face .pips.center .big-suit { font-size: 56px; }
  .card-face .pips.face-art .glyph { font-size: 78px; }
  .quick-row { gap: 4px; }
  .quick-row button { padding: 6px 10px; font-size: 12px; min-width: 0; }

  /* Blackjack */
  .bj-meta { grid-template-columns: repeat(2, 1fr); }
  .bj-meta .bj-stat:nth-child(6) { display: none; } /* hide penetration on tiny screens */
  .bj-actions { grid-template-columns: repeat(2, 1fr); }
  .bj-card { width: 68px; height: 96px; padding: 4px 6px; }
  .bj-cards .bj-card-wrap { margin-left: -32px; }
  .bj-card .bj-rank { font-size: 12px; }
  .bj-card .bj-pips.center .bj-big-suit { font-size: 30px; }
  .bj-card .bj-pips.face-art .bj-glyph { font-size: 36px; }
  .bj-log-row { grid-template-columns: 28px 1fr 60px; gap: 6px; }
  .bj-log-row .delta, .bj-log-row .bal { display: none; }

  /* Hold'em */
  .he-slot { width: 64px; height: 90px; }
  .he-slot .he-slot-empty { font-size: 22px; }
  .he-slot.small { width: 46px; height: 64px; }
  .he-slot.small .he-slot-empty { font-size: 16px; }
  .he-slot.small.filled .he-mini-rank { font-size: 14px; }
  .he-slot.small.filled .he-mini-suit { font-size: 16px; }
  .he-equity-circle { width: 160px; height: 160px; }
  .he-equity-num span { font-size: 36px; }

  .he-picker-grid { gap: 2px; }
  .he-picker-cell .pr { font-size: 11px; }
  .he-picker-cell .ps { font-size: 12px; }
}

/* ===== Tiny phones ===== */
@media (max-width: 360px) {
  .he-picker-grid { gap: 1px; }
  .bj-cards .bj-card-wrap { margin-left: -28px; }
  .bj-card { width: 60px; height: 86px; }
  .bj-card .bj-pips.center .bj-big-suit { font-size: 26px; }
}

/* ===== PWA standalone tweaks ===== */
@media (display-mode: standalone) {
  body {
    /* In standalone, status bar overlap is handled by safe-area-inset-top.
       Add a touch more breathing room for app feel. */
    padding-top: calc(env(safe-area-inset-top, 0px) + 12px);
  }
  /* Hide the desktop-only footer hint in standalone */
  footer { display: none; }
}

/* =========================================================================
   LEAK REPORT — analyzes hands played in-app, with optional external import
   ========================================================================= */
.analyzer-badge {
  background: linear-gradient(135deg, var(--gold) 0%, var(--brass) 100%);
  color: #1a1208;
  font-weight: 700;
}

/* Empty state — zero hands played yet */
.an-empty {
  text-align: center;
  padding: 50px 30px;
}
.an-empty-icon {
  font-size: 64px;
  line-height: 1;
  margin-bottom: 12px;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.4));
}
.an-empty-headline {
  font-family: "Fraunces", serif;
  font-weight: 800;
  font-size: 26px;
  color: var(--gold-soft);
  letter-spacing: -0.01em;
  margin-bottom: 10px;
}
.an-empty-body {
  font-size: 14px;
  line-height: 1.6;
  color: var(--ink-soft);
  max-width: 480px;
  margin: 0 auto 24px;
}
.an-empty-cta-row {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
}

/* Source tag — shown when results are from imported data instead of in-app */
.an-source-tag {
  margin-top: 8px;
  font-size: 12px;
  color: var(--ink-dim);
  font-style: italic;
}
.an-source-tag a {
  color: var(--gold-soft);
  text-decoration: underline;
  cursor: pointer;
}

/* Small-sample banner */
.an-sample-banner {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px;
  margin: 0 0 18px;
  background: linear-gradient(90deg, rgba(240, 192, 96, 0.10) 0%, rgba(0, 0, 0, 0.25) 80%);
  border: 1px solid rgba(240, 192, 96, 0.35);
  border-left: 3px solid #f0c060;
  border-radius: 10px;
  font-size: 13px;
  line-height: 1.5;
  color: var(--ink-soft);
}
.an-sample-banner-icon {
  font-size: 18px;
  line-height: 1;
  flex-shrink: 0;
}

/* Import accordion (collapsed by default) */
.an-import-panel {
  margin-top: 20px;
}
.an-import-summary {
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  padding: 4px 0;
  user-select: none;
  list-style: none;
}
.an-import-summary::-webkit-details-marker { display: none; }
.an-import-summary::after {
  content: "▾";
  margin-left: auto;
  color: var(--ink-dim);
  font-size: 12px;
  transition: transform 0.18s ease;
}
.an-import-panel[open] .an-import-summary::after { transform: rotate(180deg); }
.an-import-icon { font-size: 22px; line-height: 1; }
.an-import-label {
  font-family: "Fraunces", serif;
  font-weight: 700;
  font-size: 16px;
  color: var(--ink);
}
.an-import-sub {
  font-size: 11px;
  color: var(--ink-dim);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-weight: 600;
}
.an-import-body {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--panel-line);
}
@media (max-width: 600px) {
  .an-import-sub { display: none; }
}
.an-pitch {
  margin-bottom: 18px;
}
.an-pitch-headline {
  font-family: "Fraunces", serif;
  font-size: 22px;
  font-weight: 800;
  color: var(--gold-soft);
  letter-spacing: -0.01em;
  margin-bottom: 6px;
}
.an-pitch-sub {
  font-size: 13px;
  line-height: 1.6;
  color: var(--ink-soft);
  max-width: 620px;
}
.an-source-row {
  display: flex; align-items: center; gap: 12px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}
.an-source-label {
  font-size: 11px;
  color: var(--ink-dim);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-weight: 600;
}
.an-source-buttons { display: flex; gap: 6px; }
.an-src {
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid var(--panel-line);
  color: var(--ink-soft);
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.12s ease;
}
.an-src:hover { color: var(--ink); border-color: var(--gold-soft); }
.an-src.active {
  background: linear-gradient(135deg, var(--gold) 0%, var(--brass) 100%);
  color: #1a1208;
  border-color: var(--gold);
}
.an-textarea {
  width: 100%;
  min-height: 220px;
  font-family: "JetBrains Mono", "SF Mono", monospace;
  font-size: 12px;
  line-height: 1.5;
  background: rgba(0, 0, 0, 0.45);
  color: var(--ink);
  border: 1px solid var(--panel-line);
  border-radius: 10px;
  padding: 12px 14px;
  resize: vertical;
  outline: none;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
  box-sizing: border-box;
}
.an-textarea:focus {
  border-color: var(--gold-soft);
  box-shadow: 0 0 0 3px rgba(217, 180, 106, 0.12);
}
.an-textarea::placeholder { color: var(--ink-mute); }
.an-hero-row {
  display: flex; flex-direction: column; gap: 6px;
  margin-top: 12px;
}
.an-hero-label {
  font-size: 11px;
  color: var(--ink-dim);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-weight: 600;
}
.an-hero-input {
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid var(--panel-line);
  color: var(--ink);
  font: inherit;
  padding: 8px 12px;
  border-radius: 8px;
  outline: none;
  max-width: 320px;
}
.an-hero-input:focus { border-color: var(--gold-soft); }
.an-action-row {
  display: flex; align-items: center; gap: 12px;
  margin-top: 14px;
  flex-wrap: wrap;
}
.an-status {
  font-size: 12px;
  color: var(--ink-dim);
  font-weight: 600;
}
.an-status.ok { color: #6ee08a; }
.an-status.warn { color: #f0c060; }
.an-status.err { color: #ff7b6b; }

/* RESULTS */
.an-results {
  margin-top: 20px;
}
.an-summary {
  text-align: center;
  margin-bottom: 22px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--panel-line);
}
.an-summary-headline {
  font-family: "Fraunces", serif;
  font-size: 26px;
  font-weight: 800;
  color: var(--gold-shine);
  letter-spacing: -0.01em;
}
.an-summary-sub {
  font-size: 13px;
  color: var(--ink-soft);
  margin-top: 6px;
}
.an-stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 10px;
  margin-bottom: 22px;
}
.an-tile {
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--panel-line);
  border-radius: 10px;
  padding: 12px 10px;
  text-align: center;
}
.an-tile-val {
  font-family: "JetBrains Mono", monospace;
  font-size: 22px;
  font-weight: 700;
  color: var(--ink);
}
.an-tile.good .an-tile-val { color: #6ee08a; }
.an-tile.bad .an-tile-val { color: #ff7b6b; }
.an-tile-lbl {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-weight: 700;
  color: var(--gold-soft);
  margin-top: 4px;
}
.an-tile-sub {
  font-size: 10px;
  color: var(--ink-dim);
  margin-top: 2px;
}
.an-h {
  font-family: "Fraunces", serif;
  font-size: 18px;
  font-weight: 800;
  color: var(--gold-soft);
  margin: 22px 0 10px;
}
.an-leaks-list { display: flex; flex-direction: column; gap: 10px; }
.an-leak {
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid var(--panel-line);
  background: rgba(0, 0, 0, 0.3);
}
.an-leak.an-leak-high {
  border-left: 3px solid #ff7b6b;
  background: linear-gradient(90deg, rgba(255, 123, 107, 0.08) 0%, rgba(0, 0, 0, 0.3) 50%);
}
.an-leak.an-leak-med {
  border-left: 3px solid #f0c060;
  background: linear-gradient(90deg, rgba(240, 192, 96, 0.06) 0%, rgba(0, 0, 0, 0.3) 50%);
}
.an-leak.an-leak-good {
  border-left: 3px solid #6ee08a;
  background: linear-gradient(90deg, rgba(110, 224, 138, 0.06) 0%, rgba(0, 0, 0, 0.3) 50%);
}
.an-leak-rank {
  font-family: "JetBrains Mono", monospace;
  font-size: 18px;
  font-weight: 700;
  color: var(--gold-soft);
  text-align: center;
  align-self: start;
  padding-top: 2px;
}
.an-leak-title {
  font-family: "Fraunces", serif;
  font-size: 16px;
  font-weight: 800;
  color: var(--ink);
  letter-spacing: -0.005em;
  margin-bottom: 4px;
}
.an-leak-desc {
  font-size: 13px;
  line-height: 1.5;
  color: var(--ink-soft);
}
.an-leak-impact {
  margin-top: 6px;
  font-size: 11px;
  color: var(--ink-dim);
  font-family: "JetBrains Mono", monospace;
  font-weight: 600;
}
.an-leak-empty {
  padding: 22px;
  text-align: center;
  color: var(--ink-dim);
  font-style: italic;
  background: rgba(0, 0, 0, 0.25);
  border-radius: 10px;
}
.an-worst-list { display: flex; flex-direction: column; gap: 6px; }
.an-hand {
  display: grid;
  grid-template-columns: 60px 1fr 100px;
  gap: 10px;
  align-items: center;
  padding: 8px 12px;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid var(--panel-line);
  border-radius: 8px;
  font-family: "JetBrains Mono", monospace;
  font-size: 12px;
}
.an-hand.lose { border-left: 2px solid #ff7b6b; }
.an-hand.win  { border-left: 2px solid #6ee08a; }
.an-hand-id { color: var(--ink-dim); font-weight: 700; }
.an-hand-cards { color: var(--ink); }
.an-hand-delta { text-align: right; font-weight: 700; }
.an-hand.lose .an-hand-delta { color: #ff7b6b; }
.an-hand.win  .an-hand-delta { color: #6ee08a; }
.an-cta-row {
  display: flex; justify-content: center; margin-top: 22px;
}

/* =========================================================================
   GTOPULSE PRO — paywall modal + Pro-gated UI states
   ========================================================================= */

/* Pro-gated venue card (Macau when not Pro). Show the photo + a gold star
   crown to signal unlockable, not blocked. */
.hg-venue-card.pro-gated {
  border-color: var(--gold);
  box-shadow: 0 0 0 1px rgba(217, 180, 106, 0.35), inset 0 0 24px rgba(217, 180, 106, 0.06);
  cursor: pointer;
}
.hg-venue-card.pro-gated:hover {
  transform: translateY(-3px);
  box-shadow: 0 0 0 1px var(--gold), 0 0 32px rgba(217, 180, 106, 0.3), inset 0 0 24px rgba(217, 180, 106, 0.1);
}
.hg-venue-card.pro-gated::after {
  content: "⭐ PRO";
  position: absolute;
  top: 12px;
  right: 12px;
  font-family: "JetBrains Mono", monospace;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.16em;
  background: linear-gradient(135deg, var(--gold-shine) 0%, var(--gold) 60%, var(--brass) 100%);
  color: #1a1208;
  padding: 4px 10px;
  border-radius: 999px;
  pointer-events: none;
  z-index: 3;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
}
.hg-venue-pro-msg {
  margin-top: 8px;
  padding: 10px 12px;
  background: linear-gradient(90deg, rgba(217, 180, 106, 0.18) 0%, rgba(217, 180, 106, 0.05) 100%);
  border: 1px solid rgba(217, 180, 106, 0.4);
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  color: var(--gold-soft);
  text-align: center;
}
.hg-venue-pro-msg b { color: var(--gold-shine); }

/* Paywall modal — gold-accented, premium feel */
.pro-paywall .modal-card.pro-paywall-card {
  max-width: 460px;
  padding: 36px 32px 28px;
  position: relative;
  background:
    radial-gradient(ellipse 100% 50% at 50% 0%, rgba(217, 180, 106, 0.18) 0%, transparent 60%),
    linear-gradient(180deg, #1a1610 0%, #0a0805 100%);
  border: 1px solid rgba(217, 180, 106, 0.45);
}
.pro-paywall-close {
  position: absolute;
  top: 14px;
  right: 14px;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid var(--panel-line);
  color: var(--ink-soft);
  width: 32px; height: 32px;
  border-radius: 50%;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  padding: 0;
}
.pro-paywall-close:hover { color: var(--ink); border-color: var(--gold-soft); }
.pro-paywall-tag {
  display: inline-block;
  font-family: "JetBrains Mono", monospace;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.22em;
  color: var(--gold);
  background: rgba(217, 180, 106, 0.12);
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid rgba(217, 180, 106, 0.3);
  margin-bottom: 14px;
}
.pro-paywall-title {
  font-family: "Fraunces", serif;
  font-weight: 900;
  font-size: 36px;
  letter-spacing: -0.02em;
  color: var(--ink);
  margin: 0 0 16px;
}
.pro-paywall-title .pro-gold {
  background: linear-gradient(135deg, var(--gold-shine) 0%, var(--gold) 50%, var(--brass) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.pro-paywall-reason {
  font-size: 14px;
  color: var(--ink-soft);
  line-height: 1.5;
  margin-bottom: 20px;
  white-space: pre-line;
  padding: 12px 14px;
  background: rgba(0, 0, 0, 0.35);
  border-left: 3px solid var(--gold);
  border-radius: 8px;
}
.pro-paywall-reason:empty { display: none; }
.pro-paywall-list {
  list-style: none;
  padding: 0;
  margin: 0 0 24px;
}
.pro-paywall-list li {
  font-size: 14px;
  color: var(--ink);
  margin-bottom: 10px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  line-height: 1.5;
}
.pro-check {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  background: linear-gradient(135deg, var(--gold) 0%, var(--brass) 100%);
  color: #1a1208;
  border-radius: 50%;
  font-size: 12px;
  font-weight: 800;
}
.pro-paywall-price-row {
  text-align: center;
  margin: 8px 0 18px;
  padding: 14px 0;
  border-top: 1px solid var(--panel-line);
  border-bottom: 1px solid var(--panel-line);
}
.pro-paywall-price {
  font-family: "Fraunces", serif;
  font-weight: 900;
  font-size: 44px;
  letter-spacing: -0.02em;
  color: var(--gold-shine);
  line-height: 1;
}
.pro-paywall-price-sub {
  font-size: 12px;
  color: var(--ink-dim);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-weight: 600;
  margin-top: 6px;
}
.pro-paywall-buy {
  width: 100%;
  padding: 16px;
  font-size: 16px;
  font-family: inherit;
  font-weight: 800;
  background: linear-gradient(135deg, var(--gold-shine) 0%, var(--gold) 50%, var(--brass) 100%);
  color: #1a1208;
  border: 1px solid var(--gold);
  border-radius: 12px;
  cursor: pointer;
  margin-bottom: 16px;
  letter-spacing: 0.01em;
  box-shadow: 0 4px 14px rgba(217, 180, 106, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.4);
  transition: transform 0.12s ease, box-shadow 0.18s ease;
}
.pro-paywall-buy:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 22px rgba(217, 180, 106, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.5);
}
.pro-paywall-meta {
  text-align: center;
  font-size: 12px;
  color: var(--ink-dim);
}
.pro-paywall-meta a {
  color: var(--gold-soft);
  text-decoration: underline;
  cursor: pointer;
}
.pro-paywall-fineprint {
  margin-top: 14px;
  font-size: 11px;
  color: var(--ink-mute);
  text-align: center;
  line-height: 1.5;
}

/* ===== Reduced motion ===== */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
