/* V3 (#225): the whole site is the "Felt Room": felt green, cream and brick
   red, in every theme. --teal is kept as the accent's name (it's used all
   over); it's brick red now. --red, --blue and --green are the suit colours
   on card faces, dark enough for white cards and still readable on felt. */
:root {
  --bg: #1d3a2c;
  --bg-raised: #24472f;
  --bg-inset: #15301f;
  --fg: #e4d9b9;
  --fg-muted: #a9b8a6;
  --fg-strong: #f6ecd2;
  --teal: #d9573c;
  --teal-hover: #e8705a;
  --teal-faint: rgba(217,87,60,0.18);
  --red: #c8403a;
  --blue: #2463c9;
  --green: #1f8a40;
  --amber: #e8b04a;
  --amber-faint: rgba(232,176,74,0.14);
  --border: #3d6650;
  --card-face: #fbf8ef;
  --card-ink: #12261c;
  --felt: #2c5a43;
  --felt-border: #5a3624;
  --radius: 6px;
  --font-ui: 'Work Sans', system-ui, sans-serif;
  --font-data: 'Overpass Mono', monospace;
  --font-display: 'Alfa Slab One', Georgia, serif;
  --card-w: 42px;
  color-scheme: dark;
}

* { box-sizing: border-box; margin: 0; }
a { color: var(--teal); }
a:hover { color: var(--teal-hover); }
body { background: var(--bg); color: var(--fg); font-family: var(--font-ui); padding: 0; }
/* Until main.js has opened the first page: nothing, just the felt. If the
   script never runs, the page shows anyway after a few seconds. */
body.booting > * { visibility: hidden; animation: boot-reveal 0s 6s forwards; }
@keyframes boot-reveal { to { visibility: visible; } }

.topbar {
  display: flex; align-items: center; height: 48px; padding: 0 20px;
  border-bottom: 1px solid var(--border); background: var(--bg-raised); gap: 24px;
}
.wordmark { font-family: var(--font-display); font-size: 20px; font-weight: 400; color: var(--fg-strong); letter-spacing: 0.04em; }
.wasm-status {
  margin-left: auto; font-family: var(--font-data); font-size: 11px; color: var(--fg-muted);
}
/* Beta notice: every page except the equity calculator. */
.beta-notice {
  display: none; margin: 0; padding: 8px 20px; font-size: 12px; line-height: 1.45;
  color: var(--amber); background: var(--amber-faint); border-bottom: 1px solid var(--border);
}
.beta-notice strong { font-weight: 700; }
.beta-notice { position: relative; padding-right: 40px; }
.beta-notice.closed { display: none !important; }
.notice-close { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); background: none; border: 0; color: inherit; font: inherit; font-size: 13px; cursor: pointer; padding: 4px 6px; opacity: 0.8; }
.notice-close:hover { opacity: 1; }
body:is(.mode-trainer, .mode-play) .beta-notice { display: block; }
body .beta-notice.clubs-notice { display: none; }
/* The clubs' testing note: on Join, Host and My clubs, and at a club table. */
body.mode-play:is(.tab-join, .tab-clubs, .club-table) .clubs-notice { display: block; }
.wasm-status.ok { color: var(--teal); }
.wasm-status.err { color: var(--red); }

/* Mode switch: equity calculator or range trainer */
.mode-tabs { display: flex; gap: 2px; }
.mode-tab {
  font-family: var(--font-ui); font-size: 13px; font-weight: 600; padding: 6px 12px; cursor: pointer;
  border: none; border-radius: var(--radius); background: transparent; color: var(--fg-muted);
}
.mode-tab:hover { color: var(--fg); }
.mode-tab.on { background: var(--bg-inset); color: var(--fg-strong); }
/* Things waiting for you in the Play section (#145). */
.mode-tab[data-badge]:not([data-badge=""])::after {
  content: attr(data-badge); margin-left: 5px; padding: 0 5px; border-radius: 8px;
  font-size: 10px; line-height: 15px; display: inline-block; background: var(--amber); color: #1a1a1a;
}
.trainer { display: none; }
body.mode-trainer .trainer { display: block; }
body.mode-trainer :is(.toolbar, .table-wrap, .eq-layout) { display: none; }

/* Range trainer */
.tr-wrap { max-width: 880px; margin: 0 auto; padding: 20px; display: flex; flex-direction: column; gap: 16px; }
.tr-head h1 { font-family: var(--font-display); font-size: 34px; font-weight: 400; line-height: 1.05; color: var(--fg-strong); text-wrap: balance; }
.tr-head p { font-size: 14px; color: var(--fg-muted); margin-top: 6px; max-width: 62ch; line-height: 1.45; }
.tr-setup { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 340px); gap: 24px; align-items: start; }
.tr-group { font-size: 12px; font-weight: 600; color: var(--fg-muted); margin: 12px 0 6px; }
.tr-group:first-child { margin-top: 0; }
.tr-options { display: flex; flex-wrap: wrap; gap: 4px; }
.tr-opt {
  font-family: var(--font-ui); font-size: 13px; padding: 6px 11px; cursor: pointer; max-width: 100%;
  border: 1px solid var(--border); border-radius: var(--radius); background: var(--bg-raised); color: var(--fg);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.tr-opt:hover { border-color: var(--teal); }
.tr-opt.on { background: var(--teal); border-color: var(--teal); color: #fff; }
.tr-preview {
  background: var(--bg-raised); border: 1px solid var(--border); border-radius: 8px; padding: 14px;
  display: flex; flex-direction: column; gap: 10px;
}
.tr-preview-name { font-size: 15px; font-weight: 700; color: var(--fg-strong); }
.tr-preview-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.tr-new { border-style: dashed; color: var(--teal); }
.tr-edit-grid .tr-cell { border: none; padding: 0; font: inherit; cursor: pointer; }
.tr-edit-grid .tr-cell.out:hover { background: var(--teal-faint); color: var(--fg); }
.tr-edit-grid .tr-cell.value:hover { background: var(--teal-hover); }
.tr-editor .range-text { margin-top: 0; }
.tr-edit-actions { display: flex; justify-content: flex-end; gap: 6px; }
.tr-del { margin-right: auto; color: var(--red); }
.tr-del.confirm { background: var(--red); border-color: var(--red); color: #fff; }
.tr-preview-meta { font-size: 12px; color: var(--fg-muted); margin-top: 2px; }
.tr-grid {
  display: grid; grid-template-columns: repeat(13, minmax(0, 1fr)); gap: 1px;
  font-family: var(--font-data); font-size: 8px; font-weight: 600;
}
.tr-cell {
  aspect-ratio: 1; display: flex; align-items: center; justify-content: center; border-radius: 2px;
  overflow: hidden; white-space: nowrap; letter-spacing: -0.04em;
}
.tr-cell.out { background: var(--bg-inset); color: var(--fg-muted); }
.tr-cell.value { background: var(--teal); color: #fff; }
.tr-cell.bluff { background: #c08a2e; color: #fff; }
.tr-cell.miss-in, .tr-cell.miss-out { box-shadow: inset 0 0 0 2px var(--red); }
.tr-cell.miss-out { box-shadow: inset 0 0 0 2px var(--red), inset 0 0 0 4px rgba(255,255,255,0.65); }
.tr-legend { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; font-size: 11px; color: var(--fg-muted); }
.tr-key { display: inline-block; width: 11px; height: 11px; border-radius: 2px; margin-right: -6px; vertical-align: -1px; }
.tr-key.value { background: var(--teal); }
.tr-key.bluff { background: #c08a2e; }
.tr-key.miss-in { background: var(--bg-inset); box-shadow: inset 0 0 0 2px var(--red); }
.tr-key.miss-out { background: var(--teal); box-shadow: inset 0 0 0 2px var(--red); }
.tr-count { display: flex; align-items: center; gap: 4px; font-size: 13px; color: var(--fg-muted); }
.tr-start, .tr-btn {
  font-family: var(--font-ui); font-size: 15px; font-weight: 700; padding: 12px 18px; cursor: pointer;
  border: 1px solid var(--border); border-radius: 6px; background: var(--bg-raised); color: var(--fg-strong);
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
}
.tr-start, .tr-btn.yes { background: var(--teal); border-color: var(--teal); color: #fff; }
.tr-start:hover, .tr-btn.yes:hover { background: var(--teal-hover); border-color: var(--teal-hover); }
.tr-btn:hover { border-color: var(--fg-muted); }
.tr-btn kbd, .pl-sizes kbd {
  font-family: var(--font-data); font-size: 10px; font-weight: 600; padding: 1px 5px; border-radius: 3px;
  border: 1px solid currentColor; opacity: 0.6;
}
.tr-bar { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.tr-progress {
  display: flex; flex-direction: column; align-items: flex-end; gap: 2px; margin-left: auto;
  font-family: var(--font-data); font-size: 12px; color: var(--fg-muted); font-variant-numeric: tabular-nums;
}
.tr-meter { height: 4px; background: var(--bg-inset); border-radius: 2px; overflow: hidden; }
.tr-meter div { height: 100%; background: var(--teal); transition: width 0.2s; }
.tr-felt {
  background: linear-gradient(170deg, #313b38, #2a3430); border: 3px solid var(--felt-border); border-radius: 120px;
  min-height: 200px; display: flex; align-items: center; justify-content: center; padding: 24px;
}
.tr-cards { display: flex; gap: 10px; }
.tr-card {
  width: 76px; height: 106px; background: var(--card-face); border-radius: 7px; border: 1px solid rgba(0,0,0,0.15);
  display: flex; align-items: center; justify-content: center; box-shadow: 0 4px 12px rgba(0,0,0,0.25);
  font-family: var(--font-data); font-size: 30px; font-weight: 700;
}
.tr-card.r { color: var(--red); }
.tr-card.bk { color: var(--card-ink); }
.tr-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.tr-actions .tr-btn { min-width: 150px; }
.tr-cards[data-deal] .tr-card { animation: tr-deal 0.16s ease-out both; }
.tr-cards[data-deal] .tr-card + .tr-card { animation-delay: 0.04s; }
@keyframes tr-deal { from { opacity: 0; transform: translateY(-10px) scale(0.96); } }
@media (prefers-reduced-motion: reduce) { .tr-cards[data-deal] .tr-card { animation: none; } }
.tr-summary { display: flex; flex-direction: column; gap: 14px; }
.tr-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.tr-stat {
  background: var(--bg-raised); border: 1px solid var(--border); border-radius: 6px; padding: 10px 12px;
  display: flex; flex-direction: column; gap: 2px;
}
.tr-stat b { font-family: var(--font-data); font-size: 22px; color: var(--fg-strong); font-variant-numeric: tabular-nums; }
.tr-stat span { font-size: 12px; color: var(--fg-muted); }
.tr-stat.bad b { color: var(--red); }
.tr-mistakes .tr-group { margin-top: 0; }
.tr-chip {
  display: inline-block; font-family: var(--font-data); font-size: 12px; font-weight: 600; margin: 0 4px 4px 0;
  padding: 3px 7px; border-radius: 3px; background: var(--bg-inset); color: var(--fg-strong);
}
.tr-chip em { font-style: normal; font-weight: 400; color: var(--fg-muted); }
.tr-none { font-size: 12px; color: var(--fg-muted); }
.tr-summary .tr-preview { max-width: 420px; }

/* Omaha trainer */
.tr-game-tabs { align-self: flex-start; }
.tr-game-tabs .cc-btn { padding: 6px 12px; font-size: 13px; font-family: var(--font-ui); font-weight: 600; }
.tr-custom-pct { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--fg-muted); margin-left: 4px; }
.tr-custom-pct input {
  width: 64px; font-family: var(--font-data); font-size: 13px; padding: 5px 8px;
  border: 1px solid var(--border); border-radius: var(--radius); background: var(--bg-raised); color: var(--fg);
}
.tr-lookup {
  width: 100%; max-width: 320px; font-family: var(--font-data); font-size: 14px; padding: 7px 10px;
  border: 1px solid var(--border); border-radius: var(--radius); background: var(--bg-raised); color: var(--fg);
}
.tr-lookup-out { max-width: 320px; margin-top: 8px; min-height: 52px; display: flex; flex-direction: column; gap: 4px; }
.tr-lookup-err { font-size: 13px; color: var(--red); }
.tr-lookup-bar { height: 6px; border-radius: 3px; background: var(--bg-inset); overflow: hidden; }
.tr-lookup-bar span { display: block; height: 100%; background: var(--teal); }
.tr-note { font-size: 12px; color: var(--fg-muted); line-height: 1.5; margin-top: 14px; max-width: 60ch; }
.tr-ex { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 3px 0; }
.tr-mistakes .tr-ex { max-width: 360px; border-bottom: 1px solid var(--border); padding: 5px 0; }
.tr-hand { font-family: var(--font-data); font-size: 15px; font-weight: 700; letter-spacing: 0.02em; display: inline-flex; gap: 3px; }
.tr-hc.r { color: var(--red); }
.tr-hc.bk { color: var(--fg-strong); }
.four-color .tr-hc.s-d { color: var(--blue); }
.four-color .tr-hc.s-c { color: var(--green); }
.tr-pct { font-family: var(--font-data); font-size: 12px; color: var(--fg-muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.tr-cards.omaha { gap: 8px; flex-wrap: wrap; justify-content: center; }
.tr-cards.omaha .tr-card { width: 64px; height: 90px; font-size: 26px; }
.tr-strip { position: relative; height: 34px; margin: 18px 6px 0; border-top: 2px solid var(--border); }
.tr-cut { position: absolute; top: -14px; bottom: -4px; border-left: 2px dashed var(--fg-muted); }
.tr-cut em { position: absolute; top: -16px; left: 4px; font-style: normal; font-size: 11px; color: var(--fg-muted); white-space: nowrap; }
.tr-dot { position: absolute; width: 9px; height: 9px; margin-left: -4.5px; border-radius: 50%; }
.tr-dot.ok, .tr-key.ok { background: var(--teal); }
.tr-dot.miss-in { background: var(--red); }
.tr-dot.miss-out { background: #c08a2e; }
.tr-legend.dots .tr-key.miss-out { background: #c08a2e; box-shadow: none; }
.tr-legend.dots .tr-key.miss-in { background: var(--red); box-shadow: none; }
.tr-strip-scale { display: flex; justify-content: space-between; font-size: 11px; color: var(--fg-muted); }

/* Adaptive practice */
.tr-mode { border-top: 1px solid var(--border); padding-top: 12px; display: flex; flex-direction: column; gap: 8px; }
.tr-mode-row { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.tr-mode-row b { display: block; font-size: 14px; color: var(--fg-strong); }
.tr-mode-row span { font-size: 12px; color: var(--fg-muted); }
.tr-start.secondary { background: var(--bg-raised); border-color: var(--border); color: var(--fg-strong); }
.tr-start.secondary:hover { background: var(--bg-inset); border-color: var(--fg-muted); }
.tr-level {
  font-family: var(--font-data); font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 10px;
  white-space: nowrap; background: var(--bg-inset); color: var(--fg-strong);
}
.tr-mode-row .tr-level { font-size: 11px; color: var(--fg-strong); }
.tr-level.lvl-easy { background: rgba(46,122,60,0.16); color: var(--green); }
.tr-level.lvl-medium { background: var(--teal-faint); color: var(--teal); }
.tr-level.lvl-hard { background: rgba(192,138,46,0.18); color: #a2721f; }
.tr-level.lvl-challenge { background: rgba(198,88,88,0.16); color: var(--red); }
.tr-level.lvl-mastered { background: rgba(46,122,60,0.22); color: var(--green); }
.tr-skills { border-top: 1px solid var(--border); padding-top: 12px; }
.tr-skills > summary { cursor: pointer; font-size: 14px; }
.tr-skills > summary b { color: var(--fg-strong); }
.tr-skills > summary span { font-size: 12px; color: var(--fg-muted); margin-left: 6px; }
.tr-skill-table { border-collapse: collapse; margin-top: 8px; font-size: 12px; width: 100%; max-width: 360px; }
.tr-skill-table th { font-weight: 600; color: var(--fg-muted); text-align: center; padding: 3px 4px; }
.tr-skill-table tbody th { text-align: right; font-family: var(--font-data); }
.tr-skill-table td { padding: 2px; text-align: center; }
.tr-skill {
  font: inherit; font-family: var(--font-data); width: 100%; min-width: 44px; padding: 4px 2px; border-radius: 6px;
  border: 1px solid var(--border); background: var(--bg); color: var(--fg-muted); cursor: pointer;
}
.tr-skill.started { color: var(--fg-strong); }
.tr-skill.mastered { background: rgba(46,122,60,0.16); border-color: var(--green); color: var(--green); font-weight: 700; }
.tr-skill.on { box-shadow: 0 0 0 2px var(--teal); }
.tr-score { display: flex; flex-direction: column; gap: 4px; }
.tr-score-num { display: flex; align-items: baseline; gap: 6px; font-family: var(--font-data); }
.tr-score-num b { font-size: 30px; color: var(--fg-strong); font-variant-numeric: tabular-nums; }
.tr-score-num span { font-size: 13px; color: var(--fg-muted); }
.tr-score-num em { font-style: normal; font-size: 15px; font-weight: 700; animation: tr-pop 0.9s ease-out both; }
.tr-score-num em.up { color: var(--green); }
.tr-score-num em.down { color: var(--red); }
@keyframes tr-pop { 0% { opacity: 0; transform: translateY(6px); } 20% { opacity: 1; transform: none; } 100% { opacity: 0.35; } }
.tr-score-bar { position: relative; height: 10px; background: var(--bg-inset); border-radius: 5px; overflow: hidden; }
.tr-score-fill { height: 100%; background: linear-gradient(90deg, var(--green), var(--teal)); border-radius: 5px; transition: width 0.35s ease-out; }
.tr-score-mark { position: absolute; top: 0; bottom: 0; width: 2px; margin-left: -1px; background: var(--bg-raised); }
.tr-score-labels { position: relative; height: 14px; font-size: 10px; color: var(--fg-muted); }
.tr-score-labels span { position: absolute; transform: translateX(2px); white-space: nowrap; }
.tr-score-labels span[style^="right"] { transform: none; }
.tr-feedback { text-align: center; font-size: 15px; padding: 10px 14px; border-radius: 6px; color: var(--fg-strong); }
.tr-feedback.bad { background: rgba(198,88,88,0.15); }
.tr-feedback strong { color: var(--red); }
.tr-feedback.close { background: rgba(192,138,46,0.16); }
.tr-feedback.close strong { color: #a87523; }
.tr-pattern { font-size: 13px; color: var(--fg-strong); margin-top: 6px; line-height: 1.4; }
.tr-mistakes .tr-pattern { padding: 8px 10px; background: rgba(192,138,46,0.12); border-radius: 6px; margin: 0 0 6px; max-width: 62ch; }
.tr-mistakes .tr-pattern strong { display: block; margin-bottom: 4px; }
.tr-mistakes .tr-pattern div { margin-top: 3px; color: var(--fg); }
.tr-ex.major .tr-pct { color: var(--red); font-weight: 600; }
.tr-mastered { background: var(--teal-faint); border-radius: 8px; padding: 22px; text-align: center; display: flex; flex-direction: column; gap: 10px; }
.tr-mastered strong { font-size: 22px; color: var(--teal); }
.tr-mastered p { font-size: 14px; color: var(--fg); max-width: 50ch; margin: 0 auto; line-height: 1.45; }
@media (prefers-reduced-motion: reduce) { .tr-score-fill { transition: none; } .tr-score-num em { animation: none; } }
@media (max-width: 640px) {
  .topbar { gap: 12px; padding: 0 12px; }
  .tr-wrap { padding: 14px 12px; }
  .tr-setup { grid-template-columns: minmax(0, 1fr); }
  .tr-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tr-card { width: 64px; height: 90px; font-size: 26px; }
  .tr-felt { padding: 16px 12px; }
  .tr-cards.omaha { gap: 5px; flex-wrap: nowrap; }
  .tr-cards.omaha .tr-card { width: 46px; height: 66px; font-size: 19px; border-radius: 6px; }
  .tr-actions .tr-btn { flex: 1; min-width: 0; }
}

.toolbar {
  display: flex; align-items: center; gap: 10px; padding: 10px 20px; flex-wrap: wrap;
}
.toolbar-right {
  margin-left: auto; display: flex; align-items: center; gap: 10px;
}
.btn {
  font-family: var(--font-ui); font-size: 13px; font-weight: 600;
  padding: 8px 18px; border: none; border-radius: var(--radius); cursor: pointer;
}
.btn-ghost { background: transparent; border: 1px solid var(--border); color: var(--fg); }
.btn-ghost:hover { border-color: var(--fg-muted); }
.btn-icon { display: inline-flex; align-items: center; padding-left: 9px; padding-right: 9px; }
.timer { font-family: var(--font-data); font-size: 11px; color: var(--fg-muted); margin-left: auto; }
.rerun-btn { background: none; border: 1px solid var(--fg-muted); color: var(--fg-muted); border-radius: 4px; padding: 1px 6px; font-size: 12px; cursor: pointer; margin-left: 4px; }
.rerun-btn:hover { border-color: var(--teal); color: var(--teal); }

.game-sel {
  display: flex; align-items: start; gap: 6px; flex-wrap: wrap;
}
.game-group {
  display: flex; flex-direction: column; gap: 3px;
  min-height: 52px;
}
.game-btn {
  font-family: var(--font-ui); font-size: 13px; font-weight: 600;
  padding: 7px 16px; border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--bg-raised); color: var(--fg-muted); cursor: pointer;
  transition: all 0.12s;
}
.game-btn:hover { border-color: var(--fg-muted); color: var(--fg); }
.game-btn.on { background: var(--teal); border-color: var(--teal); color: #fff; }
.card-count {
  display: flex; gap: 2px; justify-content: center;
  transition: opacity 0.15s;
}
.card-count.dim { opacity: 0.25; pointer-events: none; }
.cc-btn {
  font-family: var(--font-data); font-size: 11px; font-weight: 600;
  padding: 3px 8px; border: 1px solid var(--border); border-radius: 3px;
  background: transparent; color: var(--fg-muted); cursor: pointer;
  transition: all 0.12s;
}
.cc-btn:hover { border-color: var(--fg-muted); color: var(--fg); }
.cc-btn.on { background: var(--teal); border-color: var(--teal); color: #fff; }
/* Option buttons in the play and clubs settings rows are words, not numbers: the page font. */
.pl-opts .cc-btn { font-family: inherit; font-size: 12px; padding: 4px 10px; }
#bp-random { margin-left: 10px; justify-content: space-between; }
#bp-random[hidden] { display: none; }
.group-label { font-family: var(--font-data); font-size: 11px; font-weight: 600; color: var(--fg-muted); padding: 7px 0; }

.table-wrap {
  position: relative; width: 100%; max-width: 880px;
  aspect-ratio: 1.45; margin: 4px auto 20px; padding: 0 12px;
}
.felt {
  position: absolute; top: 20%; left: 18%; right: 18%; bottom: 20%;
  background: radial-gradient(ellipse at 50% 40%, #33694e 0%, #23503a 75%);
  border: 8px solid var(--felt-border); border-radius: 45%;
  box-shadow: inset 0 2px 12px rgba(0,0,0,0.25), 0 4px 16px rgba(0,0,0,0.06);
  display: flex; align-items: center; justify-content: center;
}

.board-area { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.boards-wrap { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.board-col { display: flex; flex-direction: column; align-items: center; }
.board-label {
  font-family: var(--font-data); font-size: 9px; font-weight: 700;
  color: rgba(255,255,255,0.4); letter-spacing: 0.08em; text-transform: uppercase;
  margin-bottom: 2px; text-align: center;
}
.board { display: flex; align-items: center; gap: 4px; }
.board-gap { width: 8px; }
.dead-row { display: flex; align-items: center; gap: 6px; }
.dead-label {
  font-family: var(--font-data); font-size: 10px; font-weight: 600;
  color: rgba(255,255,255,0.5); letter-spacing: 0.06em; text-transform: uppercase;
}
.dead-cards { display: flex; gap: 3px; flex-wrap: wrap; }
.dead-cards .dc {
  width: 34px; height: 46px; background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.2); border-radius: 3px;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-data); font-size: 14px; font-weight: 600;
  cursor: pointer;
}
.dead-cards .dc.r { color: #d06060; }
.dead-cards .dc.bk { color: rgba(255,255,255,0.8); }
.dead-add {
  width: 34px; height: 46px; border-radius: 3px;
  border: 1px dashed rgba(255,255,255,0.3); background: transparent;
  color: rgba(255,255,255,0.4); font-size: 16px; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}
.dead-add:hover { border-color: rgba(255,255,255,0.5); color: rgba(255,255,255,0.7); }
.board .bc {
  width: 38px; height: 53px; background: var(--card-face);
  border: 1px solid rgba(255,255,255,0.15); border-radius: 4px;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-data); font-size: 14px; font-weight: 600;
  cursor: pointer;
}
.board .bc:hover { border-color: rgba(255,255,255,0.4); }
.board .bc.empty { background: rgba(255,255,255,0.08); border-style: dashed; border-color: rgba(255,255,255,0.18); color: rgba(255,255,255,0.3); font-size: 16px; }
.board .bc.r { color: var(--red); }
.board .bc.bk { color: #333; }

.seat {
  position: absolute; transform: translate(-50%, -50%); z-index: 10;
  display: flex; flex-direction: column; align-items: center;
}
.seat-panel {
  background: var(--bg-raised); border: 1px solid var(--border); border-radius: 6px;
  padding: 7px 10px 6px; display: flex; flex-direction: column; align-items: center; gap: 4px;
  position: relative; box-shadow: 0 2px 6px rgba(0,0,0,0.06);
  cursor: default;
}
.seat-cards { display: flex; gap: 3px; }
.seat-cards .sc {
  width: var(--card-w); height: calc(var(--card-w) * 1.38);
  background: var(--card-face); border: 1.5px solid var(--border); border-radius: 4px;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-data); font-size: calc(var(--card-w) * 0.36); font-weight: 600;
  cursor: pointer; transition: border-color 0.1s;
}
.seat-cards .sc:hover { border-color: var(--teal); }
.seat-cards .sc.empty { border-style: dashed; color: var(--fg-muted); font-size: calc(var(--card-w) * 0.42); }
.seat-cards .sc.r { color: var(--red); }
.seat-cards .sc.bk { color: var(--card-ink); }
.seat-range {
  background: var(--teal-faint); border: 1.5px solid var(--teal); border-radius: 4px;
  padding: 6px 12px; cursor: pointer; text-align: center; min-width: 80px;
}
.seat-range:hover { background: rgba(46,120,136,0.18); }
.seat-range-label { font-family: var(--font-data); font-size: 11px; font-weight: 600; color: var(--teal); }
.seat-range-count { font-family: var(--font-data); font-size: 10px; color: var(--fg-muted); margin-top: 2px; }
.seat-random {
  background: var(--teal-faint); border: 1.5px solid var(--teal); border-radius: 4px;
  padding: 10px 16px; text-align: center; min-width: 80px;
}
.seat-random-label { font-family: var(--font-data); font-size: 11px; font-weight: 600; color: var(--teal); }
.seat-bp-stats {
  display: grid; grid-template-columns: auto auto auto auto; column-gap: 4px; row-gap: 1px;
  font-family: var(--font-data); font-size: 9px; font-weight: 600; font-variant-numeric: tabular-nums;
  color: var(--fg-muted); white-space: nowrap; margin-top: 1px;
}
.seat-bp-stats .bp-k { text-align: right; cursor: help; }
.seat-bp-stats .bp-v { color: var(--fg); text-align: left; }
.seat-bp-stats .bp-v:nth-child(4n+2) { margin-right: 4px; }
.seat-mode-picker {
  display: flex; gap: 8px; padding: 8px 0;
}
.seat-mode-btn {
  font-family: var(--font-ui); font-size: 13px; font-weight: 600;
  padding: 12px 20px; border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--bg-raised); color: var(--fg); cursor: pointer;
  transition: all 0.12s;
}
.seat-mode-btn:hover { border-color: var(--teal); color: var(--teal); }
.seat-eq {
  font-family: var(--font-data); font-size: 13px; font-weight: 700; font-variant-numeric: tabular-nums;
}
.seat-x {
  position: absolute; top: -7px; right: -7px; width: 18px; height: 18px; border-radius: 50%;
  border: 1px solid var(--border); background: var(--bg); color: var(--fg-muted);
  font-size: 11px; line-height: 1;
  display: none; align-items: center; justify-content: center; cursor: pointer;
}
.seat-panel:hover .seat-x { display: flex; }
.seat-x:hover { color: var(--red); border-color: var(--red); }

.seat-add {
  width: 42px; height: 42px; border-radius: 50%;
  border: 2px dashed var(--border); background: var(--bg-raised);
  color: var(--fg-muted); font-size: 20px; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  opacity: 0.7; transition: all 0.15s;
  box-shadow: 0 1px 4px rgba(0,0,0,0.05);
}
.seat-add:hover { opacity: 1; border-color: var(--teal); color: var(--teal); background: var(--card-face); }

/* Picker modal */
.modal-bg {
  position: fixed; inset: 0; z-index: 100; background: rgba(0,0,0,0.22);
  display: flex; align-items: center; justify-content: center;
}
.modal-bg[hidden] { display: none !important; }
.modal {
  background: var(--bg-raised); border: 1px solid var(--border);
  border-radius: 8px; padding: 16px; box-shadow: 0 10px 40px rgba(0,0,0,0.15);
  max-width: 92vw; max-height: 90vh; overflow-y: auto;
}
.modal-tabs {
  display: flex; gap: 2px; margin-bottom: 12px;
}
.mtab {
  font-family: var(--font-ui); font-size: 12px; font-weight: 600;
  padding: 5px 14px; border: 1px solid var(--border); border-radius: var(--radius);
  background: transparent; color: var(--fg-muted); cursor: pointer;
}
.mtab.on { background: var(--fg-strong); color: var(--bg-raised); border-color: var(--fg-strong); }
.modal-header {
  font-size: 12px; font-weight: 600; color: var(--fg-muted); margin-bottom: 10px;
  display: flex; align-items: center; justify-content: space-between;
}
.modal-clear {
  font-family: var(--font-ui); font-size: 11px; font-weight: 600;
  color: var(--red); background: none; border: none; cursor: pointer; padding: 2px 6px;
}

/* Equity's seat picker (range-selection design, #244): exact cards, standard
   ranges a tap below them, and Custom range with the chart and How wide. */
.modal-header > span:first-child { font-size: 15px; color: var(--fg-strong); }
.modal-x { background: none; border: 0; color: var(--fg-muted); font-size: 22px; line-height: 1; width: 36px; height: 36px; cursor: pointer; }
.modal-x:hover { color: var(--fg-strong); }
.eq-head-acts { display: flex; align-items: center; gap: 8px; }
.eq-quick { width: 520px; max-width: 100%; margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--border); display: flex; flex-direction: column; gap: 8px; }
.eq-quick-label, .eq-label { font-size: 12px; font-weight: 600; color: var(--fg-muted); }
.eq-quick-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.eq-chip { border: 1px solid var(--border); background: var(--bg-inset); color: var(--fg); border-radius: 999px; padding: 7px 13px; font: 600 13px var(--font-ui); cursor: pointer; }
.eq-chip:hover, .eq-chip.on { background: #f3e7c9; border-color: #f3e7c9; color: #1d3a2c; }
.eq-foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 14px; }
.eq-custom { font-size: 14px; }
.eq-done { padding: 8px 18px; font-size: 14px; }
.range-picker.eq-range { width: min(820px, 86vw); display: flex; gap: 20px; flex-wrap: wrap; align-items: flex-start; }
.eq-range-chart { flex: 1 1 340px; min-width: 0; }
.eq-range-chart .range-info { display: flex; justify-content: space-between; align-items: center; }
.eq-range-tools { flex: 1 1 300px; min-width: 0; display: flex; flex-direction: column; gap: 10px; }
.eq-wide { display: grid; grid-template-columns: repeat(9, minmax(0, 1fr)); gap: 4px; }
.eq-wide-btn { border: 1px solid var(--border); background: var(--bg-inset); color: var(--fg); border-radius: 8px; padding: 6px 0 4px; font: 600 12px var(--font-ui); display: flex; flex-direction: column; align-items: center; gap: 1px; cursor: pointer; }
.eq-wide-btn small { font-size: 9px; font-weight: 500; color: var(--fg-muted); min-height: 11px; }
.eq-wide-btn:hover { border-color: var(--fg-muted); }
.eq-wide-btn.on { background: #f3e7c9; border-color: #f3e7c9; color: #1d3a2c; }
.eq-wide-btn.on small { color: #5d6b55; }
.eq-more > summary { cursor: pointer; font-size: 13px; font-weight: 600; color: var(--fg); padding: 9px 0 6px; border-top: 1px solid var(--border); }
.eq-more[open] > summary { margin-bottom: 6px; }
.eq-more .range-text { width: 100%; box-sizing: border-box; }
/* Presets read like the other sections in Custom range. */
.presets.eq-more { margin-top: 0; padding-top: 0; border-top: 0; }
.presets.eq-more > summary { list-style: revert; font: 600 13px var(--font-ui); text-transform: none; letter-spacing: 0; color: var(--fg); }
.presets.eq-more > summary::before { content: '\25B6'; font-size: 10px; margin-right: 8px; }
.eq-range .saved-ranges { margin-top: 0; padding-top: 0; border-top: 0; }
@media (max-width: 640px) { .eq-wide { grid-template-columns: repeat(5, minmax(0, 1fr)); } .eq-quick { width: auto; } }

/* Card picker */
.card-picker { width: 520px; }
.psuit { display: flex; align-items: center; gap: 0; margin-bottom: 6px; }
.psuit:last-child { margin-bottom: 0; }
.sicon { width: 30px; text-align: center; font-size: 22px; flex-shrink: 0; }
.sicon.rd { color: var(--red); }
.sicon.bl { color: var(--fg-strong); }
.pk {
  font-family: var(--font-data); font-size: 17px; font-weight: 600;
  width: 37px; height: 37px; border: none; border-radius: 4px;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  background: transparent; transition: background 0.08s;
}
.pk:hover:not(.used) { background: var(--teal-faint); }
.pk.rd { color: var(--red); }
.pk.bl { color: var(--fg-strong); }
/* A card already in use elsewhere: still readable, but clearly taken, in light and dark. */
.pk.used { background: var(--bg-inset); color: var(--fg-muted); opacity: 0.45; text-decoration: line-through; cursor: default; }
.picker-hand {
  display: flex; gap: 4px; align-items: center; margin-bottom: 10px;
}
.picker-hand .ph-card {
  width: 40px; height: 56px; background: var(--card-face);
  border: 1.5px solid var(--border); border-radius: 4px;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-data); font-size: 14px; font-weight: 600;
  cursor: pointer; transition: border-color 0.1s;
}
.picker-hand .ph-card:hover { border-color: var(--red); }
.picker-hand .ph-card.active { border: 2px solid var(--teal); box-shadow: 0 0 0 3px var(--teal-faint), 0 0 10px var(--teal); transform: translateY(-3px); }
/* Empty slots other than the one being filled step back. */
.picker-hand .ph-card.empty:not(.active) { opacity: 0.5; }
.picker-hand .ph-card.empty { border-style: dashed; color: var(--fg-muted); cursor: pointer; }
.picker-hand .ph-card.empty.active { border-style: solid; }
.picker-board-label {
  font-family: var(--font-data); font-size: 10px; font-weight: 600;
  color: var(--fg-muted); letter-spacing: 0.06em; text-transform: uppercase;
  margin-bottom: 2px; margin-top: 6px;
}
.picker-board-label:first-child { margin-top: 0; }
.picker-hand .ph-card.r { color: var(--red); }
.picker-hand .ph-card.bk { color: var(--card-ink); }

/* Range picker */
.range-picker { width: 380px; }
.rgrid {
  display: grid; grid-template-columns: repeat(13, 1fr); gap: 2px;
  font-family: var(--font-data); margin-bottom: 10px;
}
.rgrid .rc {
  aspect-ratio: 1; display: flex; align-items: center; justify-content: center;
  border-radius: 3px; font-size: 10px; font-weight: 600; cursor: pointer;
  transition: background 0.08s; user-select: none;
}
.rgrid .rc.on { background: var(--teal); color: #fff; }
.rgrid .rc.off { background: var(--bg-inset); color: var(--fg-muted); }
.rgrid .rc.off:hover { background: var(--teal-faint); color: var(--fg); }
.rgrid .rc.on:hover { background: var(--teal-hover); }
.range-info {
  font-family: var(--font-data); font-size: 11px; color: var(--fg-muted);
  display: flex; justify-content: space-between; align-items: center;
}
/* "Top X%" slider in the Hold'em range picker */
.range-top {
  display: flex; align-items: center; gap: 10px; margin-top: 8px;
  font-size: 12px; color: var(--fg-muted);
}
.range-top input { flex: 1; min-width: 0; accent-color: var(--teal); }
.range-top b { font-family: var(--font-data); font-size: 12px; color: var(--fg); min-width: 3.5em; text-align: right; }
.range-text {
  font-family: var(--font-data); font-size: 12px; padding: 8px 10px;
  border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--bg-raised); color: var(--fg); width: 100%;
  margin-top: 8px; resize: none; min-height: 36px;
}
.range-text:focus { outline: none; border-color: var(--teal); }

/* Range presets */
.presets { margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--border); }
.presets > summary { cursor: pointer; list-style: none; margin-bottom: 0; user-select: none; }
.presets > summary::-webkit-details-marker { display: none; }
.presets > summary::before { content: '\25B8'; margin-right: 6px; display: inline-block; transition: transform 0.12s; }
.presets[open] > summary::before { transform: rotate(90deg); }
.presets[open] > summary { margin-bottom: 4px; }
.presets > summary > span:first-child { flex: 1; }
.presets-note { font-weight: 600; letter-spacing: 0; text-transform: none; font-family: var(--font-ui); font-size: 11px; }
.preset-group { font-size: 11px; font-weight: 600; color: var(--fg-muted); margin: 8px 0 4px; }
.preset-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 3px; }
.preset {
  min-width: 0; display: flex; justify-content: space-between; align-items: center; gap: 8px;
  font-family: var(--font-ui); font-size: 12px; text-align: left; padding: 5px 8px; cursor: pointer;
  border: 1px solid transparent; border-radius: var(--radius); background: var(--bg-inset); color: var(--fg);
}
.preset:hover { border-color: var(--teal); }
.preset.current { border-color: var(--teal); background: var(--teal-faint); }
.presets-foot { font-size: 11px; color: var(--fg-muted); margin-top: 8px; line-height: 1.4; }

/* Saved ranges */
.saved-ranges { margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--border); }
.saved-head {
  display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px;
  font-family: var(--font-data); font-size: 10px; font-weight: 700; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--fg-muted);
}
.link-btn {
  font-family: var(--font-ui); font-size: 11px; font-weight: 600; letter-spacing: 0;
  text-transform: none; color: var(--teal); background: none; border: none; cursor: pointer; padding: 2px 4px;
}
.link-btn:hover { text-decoration: underline; }
.saved-save { display: flex; gap: 6px; }
.range-name {
  flex: 1; min-width: 0; font-family: var(--font-ui); font-size: 12px; padding: 6px 9px;
  border: 1px solid var(--border); border-radius: var(--radius); background: var(--bg-raised); color: var(--fg);
}
.range-name:focus { outline: none; border-color: var(--teal); }
.btn-small {
  font-family: var(--font-ui); font-size: 12px; font-weight: 600; padding: 6px 12px; cursor: pointer;
  border: 1px solid var(--border); border-radius: var(--radius); background: transparent; color: var(--fg);
  display: inline-flex; align-items: center;
}
.btn-small:hover:not(:disabled) { border-color: var(--fg-muted); }
.btn-small:disabled { opacity: 0.45; cursor: default; }
.btn-small.primary { background: var(--teal); border-color: var(--teal); color: #fff; }
.btn-small.primary:hover { background: var(--teal-hover); border-color: var(--teal-hover); }
.saved-empty { font-size: 12px; color: var(--fg-muted); margin-top: 8px; line-height: 1.4; }
.saved-list { margin-top: 8px; max-height: 168px; overflow-y: auto; display: flex; flex-direction: column; gap: 2px; }
.saved-row { display: flex; align-items: stretch; gap: 2px; }
.saved-load {
  flex: 1; min-width: 0; display: flex; justify-content: space-between; align-items: center; gap: 10px;
  font-family: var(--font-ui); font-size: 12px; text-align: left; padding: 6px 9px; cursor: pointer;
  border: 1px solid transparent; border-radius: var(--radius); background: var(--bg-inset); color: var(--fg);
}
.saved-load:hover { border-color: var(--teal); }
.saved-row.current .saved-load { border-color: var(--teal); background: var(--teal-faint); }
.saved-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.saved-meta { font-family: var(--font-data); font-size: 10px; color: var(--fg-muted); flex-shrink: 0; font-variant-numeric: tabular-nums; }
.saved-del {
  font-family: var(--font-ui); font-size: 14px; line-height: 1; padding: 0 9px; cursor: pointer;
  border: none; border-radius: var(--radius); background: transparent; color: var(--fg-muted);
}
.saved-del:hover { color: var(--red); }
.saved-del.confirm { font-size: 11px; font-weight: 600; color: #fff; background: var(--red); }
.saved-msg { font-size: 11px; color: var(--fg-muted); min-height: 15px; margin-top: 6px; }
.lib-label {
  font-family: var(--font-data); font-size: 10px; font-weight: 700; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--fg-muted); margin-top: 10px;
}
.lib-label:first-child { margin-top: 0; }
.lib-text { margin-top: 6px; min-height: 90px; resize: vertical; }
.lib-actions { display: flex; gap: 6px; justify-content: flex-end; margin-top: 6px; }
.file-btn input { display: none; }

.calc-overlay {
  position: absolute; inset: 0; z-index: 5;
  display: flex; align-items: center; justify-content: center;
  background: rgba(0,0,0,0.08); border-radius: 45%; pointer-events: none;
}
.calc-overlay span {
  font-family: var(--font-data); font-size: 14px; font-weight: 600;
  color: var(--fg-strong); background: var(--bg-raised);
  padding: 8px 20px; border-radius: 6px; box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

/* Four-color deck: diamonds blue, clubs green */
.four-color :is(.board .bc, .seat-cards .sc, .picker-hand .ph-card, .pk, .sicon, .tr-card).s-d { color: var(--blue); }
.four-color :is(.board .bc, .seat-cards .sc, .picker-hand .ph-card, .pk, .sicon, .tr-card).s-c { color: var(--green); }
.four-color .dead-cards .dc.s-d { color: #7fa6e6; }
.four-color .dead-cards .dc.s-c { color: #72c282; }

.settings { display: flex; flex-direction: column; gap: 8px; min-width: 300px; }
.settings-section {
  font-family: var(--font-data); font-size: 10px; font-weight: 700; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--fg-muted); margin-top: 6px;
}
.settings-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.settings-label { font-size: 13px; color: var(--fg); }
.settings-note { font-size: 11px; color: var(--fg-muted); margin-top: 8px; max-width: 320px; line-height: 1.4; }

@media (max-width: 640px) {
  /* Tall table: side seats sit in columns at 18%/82% (seatPosNarrow), each
     with ~36% of the width, and hole cards wrap to two rows to fit it. */
  .table-wrap { aspect-ratio: 0.55; margin-top: 8px; }
  .table-wrap.multi-board { aspect-ratio: 0.47; }
  .felt { top: 13%; left: 21%; right: 21%; bottom: 13%; border-radius: 48% / 36%; }
  .seat-cards { display: grid; grid-template-columns: repeat(var(--card-cols), var(--card-w)); justify-content: center; }
  .seat-cards .sc { font-size: calc(var(--card-w) * 0.42); }
  .seat-panel { padding: 6px 8px 5px; }
  .board .bc { width: 30px; height: 42px; font-size: 11px; }
  .toolbar { padding: 10px 12px; }
  .card-picker { width: 92vw; }
  /* The modal is max 92vw including 16px padding and a 1px border. */
  .range-picker { width: calc(92vw - 34px); }
}

@media (max-width: 340px) {
  .board .bc { width: 26px; height: 36px; font-size: 10px; }
}

/* Omaha shorthand ranges */
.seat-range.bad { border-color: var(--red); background: rgba(198,88,88,0.1); }
.seat-range.bad .seat-range-label, #ocov.bad { color: var(--red); }
.presets-foot code { font-family: var(--font-data); font-size: 11px; background: var(--bg-inset); padding: 0 3px; border-radius: 2px; }
.preset.oex { flex-direction: column; align-items: flex-start; gap: 1px; }
.preset.oex .saved-name { font-family: var(--font-data); font-weight: 600; }
.preset.oex .saved-meta { white-space: normal; text-align: left; }

/* Practice drills: one chip per kind of hand, with its own score. */
.tr-drills { display: flex; flex-wrap: wrap; gap: 6px; }
.tr-drill { font: inherit; font-size: 12px; padding: 4px 9px; border-radius: 999px; border: 1px solid var(--border); background: var(--bg); color: var(--fg); cursor: pointer; }
.tr-drill em { font-style: normal; font-family: var(--font-data); font-size: 11px; opacity: 0.7; margin-left: 2px; }
.tr-drill.on { background: var(--teal); border-color: var(--teal); color: #fff; }
.tr-drill.weak:not(.on) { border-color: var(--red); box-shadow: inset 0 0 0 1px var(--red); }
.tr-weak { font-size: 12px; color: var(--fg-muted); line-height: 1.5; }
.tr-weak .link-btn { font-size: 12px; padding: 0; }
.tr-next-drill { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; font-size: 13px; padding: 10px 12px; border-radius: 8px; background: var(--bg-inset); color: var(--fg); }

/* The Play section (#138): tabs, then each tab's parts (play-section.js). */
.psec { display: none; }
body.mode-play .psec { display: block; }
body.mode-play :is(.toolbar, .table-wrap, .eq-layout) { display: none; }
.psec [hidden] { display: none !important; }
.pt-tabs { max-width: 980px; margin: 0 auto; padding: 8px 20px 0; }
.pt-tabs .pl-tab { text-decoration: none; display: inline-flex; align-items: center; gap: 6px; }
.pt-tabs { display: flex; align-items: center; }
.pt-me { margin-left: auto; font: inherit; font-size: 13px; color: var(--fg-muted); background: none; border: 0; padding: 8px 4px; cursor: pointer; max-width: 40%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pt-me:hover { color: var(--fg-strong); }
@media (max-width: 480px) {
  .pt-tabs { padding: 8px 8px 0; }
  .pt-tabs .pl-tab { padding: 8px 9px; }
  .pt-me-name { display: none; }
}
.ps .pl-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.ps-check { font-size: 13px; color: var(--fg); }
/* The avatar picker: the player avatars as they look at the table. */
.ps .ps-avrow { align-items: flex-start; }
.ps-avrow .pl-label { padding-top: 12px; }
.ps-avatars { display: flex; flex-wrap: wrap; gap: 6px; flex: 1; min-width: 0; }
.ps-av { width: 44px; height: 44px; padding: 0; border: 0; border-radius: 50%; overflow: hidden; cursor: pointer; background: var(--felt-border); box-shadow: 0 0 0 2px var(--border); }
.ps-av img { display: block; width: 100%; height: 100%; }
.ps-av.none { font: 700 18px var(--font-body, inherit); color: #e9ecef; }
.ps-av:hover { box-shadow: 0 0 0 2px var(--teal-faint), 0 0 0 4px var(--teal); }
.ps-av.on { box-shadow: 0 0 0 3px var(--teal); }
.ps-av:focus-visible { outline: 2px solid var(--teal); outline-offset: 3px; }
.pt-badge { min-width: 18px; padding: 0 5px; border-radius: 9px; background: var(--amber); color: #1a1a1a; font-size: 11px; line-height: 18px; text-align: center; }
.pt-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--teal); }
.pt-body { display: flex; flex-direction: column; }
/* Order within a tab: Play lists your clubs, then the bots; Join has its
   form, then why joining a table didn't work, then your requests. */
.psec[data-tab="join"] .pt-join { order: 0; }
.psec[data-tab="join"] .play { order: 1; }
.psec[data-tab="join"] .clubs { order: 2; }
.psec[data-tab="host"] .play { order: 0; }
.psec[data-tab="host"] .clubs { order: 1; }
/* At a table, the Play tab is the table. */
body.pl-seated .psec[data-tab="play"] .clubs { display: none; }
/* Start a game (V3, #225): one page, its form and invite panel side by side. */
.psec[data-tab="host"] .pl-wrap { max-width: 1040px; }
/* Play the Regulars (V3, #225): the same cream form, with choosing opponents
   folded away inside it. */
.sg-form.rg-form { flex: none; max-width: 640px; }
.cl-clubs:empty { display: none; }
.rg-go { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.rg-note { font-size: 14px; color: #5d6b55; }
.rg-form .tf-more > summary { color: #5d6b55; font-weight: 600; cursor: pointer; }
.rg-form .pl-label { color: #1d3a2c; font-weight: 600; }
.rg-form .pl-desc, .rg-form .pl-seatno { color: #5d6b55; }
.rg-form .cc-btn { border: 1px solid #c9b98f; background: #fffaf0; color: #1d3a2c; border-radius: 999px; padding: 6px 12px; }
.rg-form .cc-btn.on { background: #1d3a2c; border-color: #1d3a2c; color: #f3e7c9; }
.rg-form select, .rg-form .pl-bot select { background: #fffaf0; color: #1d3a2c; border: 1px solid #c9b98f; border-radius: 8px; padding: 6px 8px; }
.rg-form .btn-small { background: #fffaf0; color: #1d3a2c; border-color: #c9b98f; }
.rg-form .cl-more { display: flex; flex-direction: column; gap: 12px; margin-top: 12px; }

/* Join a game (V3, #225): Start a game's cream form (.sg-form). */
.sg-form.pj-form { flex: none; max-width: 480px; }
.pj-field { display: flex; flex-direction: column; gap: 8px; }
.pj-field .pl-text { width: 100%; box-sizing: border-box; }
.sg-form .pl-text.pj-code { font: 600 22px var(--font-data); letter-spacing: 0.04em; padding: 12px 14px; text-transform: none; }
.pj-meta { margin: 0; font-size: 14px; color: #5d6b55; }
.pj-meta .link-btn { color: #b0391f; }
/* A club invite: what you're joining (#185) */
.pj-invite { display: flex; flex-direction: column; gap: 4px; padding: 14px 16px; border-radius: 14px; background: #1d3a2c; color: #f3e7c9; }
.pj-invite .pj-meta { color: #c4b893; }
.pj-club { font: 400 24px var(--font-display); }
.pj-field[hidden] { display: none; }
.pl-elsewhere { max-width: 640px; }
.cl-wrap { max-width: 760px; }
.cl-card { border: 1px solid var(--border); border-radius: var(--radius); background: var(--bg-raised); padding: 16px; display: flex; flex-direction: column; gap: 10px; }
.cl-card h2 { font-size: 16px; color: var(--fg-strong); margin: 0; }
.cl-card h3 { font-size: 13px; color: var(--fg); margin: 6px 0 0; }
.cl-invite { border-color: var(--teal); }
.cl-title { display: flex; align-items: center; gap: 10px; }
.cl-badge { font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: 999px; background: var(--bg-inset); color: var(--fg-muted); }
.cl-badge.on { background: var(--teal); color: #fff; }
/* Restoring a club from the Create card (#191) */
.cl-restore .link-btn { cursor: pointer; display: inline; }
.cl-link { flex: 1; min-width: 0; }
.cl-link .pl-text { flex: 1; min-width: 0; width: auto; font-size: 12px; }
.cl-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.cl-list li { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 8px 0; border-top: 1px solid var(--border); font-size: 13px; }
.cl-list li:first-child { border-top: 0; }
.cl-list code { font-family: var(--font-data); font-size: 12px; color: var(--fg-muted); }
.cl-name { font-weight: 600; color: var(--fg-strong); }
.cl-acts { margin-left: auto; display: flex; flex-wrap: wrap; gap: 6px; }
.cl-status { color: var(--fg-muted); }
.cl-err { flex-basis: 100%; font-size: 12px; }
.cl-tableform { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px 12px; padding: 10px 0; }
.cl-tableform label { display: flex; flex-direction: column; gap: 4px; font-size: 12px; font-weight: 600; color: var(--fg); }
.cl-tableform .pl-text { width: 100%; }
.cl-formacts { grid-column: 1 / -1; display: flex; gap: 6px; }
/* The quick New table form (#113): choices as buttons, the rest under More options. */
.cl-tableform.tf { display: flex; flex-direction: column; gap: 10px; }
.tf .pl-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.tf-opt { position: relative; cursor: pointer; }
.tf-opt input { position: absolute; opacity: 0; pointer-events: none; }
.tf-opt:has(input:checked) { background: var(--teal); border-color: var(--teal); color: #fff; }
.tf-opt:has(input:focus-visible) { outline: 2px solid var(--teal); outline-offset: 2px; }
.tf-other { display: none !important; }
.tf:has([name=blinds][value=other]:checked) .tf-other-blinds,
.tf:has([name=seatsPick][value=other]:checked) .tf-other-seats { display: flex !important; }
.tf-other label { display: flex; flex-direction: column; gap: 4px; font-size: 12px; font-weight: 600; }
.tf-more summary, .cl-card details.tf-more summary { cursor: pointer; font-size: 13px; color: var(--fg-muted); }
.tf-fields { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px 12px; padding-top: 8px; }
.tf-fields label { display: flex; flex-direction: column; gap: 4px; font-size: 12px; font-weight: 600; color: var(--fg); }
.tf-fields .pl-text { width: 100%; }
.cl-more { display: flex; flex-direction: column; gap: 8px; padding-top: 8px; }
/* My clubs (#143): what needs you, the sub-tabs, ⋯ menus and the settings dialog. */
.cl-needs { border: 1px solid var(--amber); border-radius: var(--radius); padding: 8px 12px; background: var(--amber-faint); }
.cl-needs h3 { margin: 0 0 4px; color: var(--amber); }
.cl-dash-tabs { margin-top: 4px; }
.cl-menu { position: relative; display: inline-block; }
.cl-menu > summary { list-style: none; cursor: pointer; }
.cl-menu > summary::-webkit-details-marker { display: none; }
.cl-menu-items { position: absolute; right: 0; top: calc(100% + 4px); z-index: 20; min-width: 200px; display: flex; flex-direction: column; background: var(--bg-raised); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: 0 6px 24px rgba(0,0,0,0.25); padding: 4px; }
.cl-menu-item { font: inherit; font-size: 13px; text-align: left; background: none; border: 0; color: var(--fg); padding: 7px 10px; border-radius: 4px; cursor: pointer; }
.cl-menu-item:hover, .cl-menu-item:focus-visible { background: var(--bg-inset); color: var(--fg-strong); }
.cl-title .cl-menu { margin-left: auto; }
.cl-dialog h3 { font-size: 13px; margin: 4px 0 0; }
.cl-hands { display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }
.cl-handfilter { width: auto; }
.cl-handlist { width: 100%; }
.cl-up { color: var(--green); font-weight: 600; }
.cl-down { color: var(--red); font-weight: 600; }
.cl-results { list-style: none; margin: 6px 0; padding: 0; display: grid; grid-template-columns: max-content max-content; gap: 2px 16px; font-size: 13px; }
.cl-results li { display: contents; }
.cl-pc { display: inline-flex; align-items: center; justify-content: center; min-width: 26px; height: 34px; padding: 0 3px; border: 1px solid var(--border); border-radius: 4px; background: var(--card-face); color: var(--card-ink); font-family: var(--font-data); font-size: 13px; font-weight: 600; }
.cl-pc.s-h, .cl-pc.s-d { color: var(--red); }
.four-color .cl-pc.s-d { color: var(--blue); }
.four-color .cl-pc.s-c { color: var(--green); }
.cl-pc.back { background: repeating-linear-gradient(45deg, var(--teal) 0 4px, var(--teal-hover) 4px 8px); border-color: var(--teal); }
.cl-pc.slot { background: transparent; border-style: dashed; }
.cl-replay-bg { position: fixed; inset: 0; background: rgba(0,0,0,0.45); z-index: 50; }
.cl-replay { position: fixed; z-index: 51; left: 50%; top: 50%; transform: translate(-50%, -50%); width: min(560px, calc(100vw - 32px)); max-height: calc(100vh - 32px); overflow: auto; background: var(--bg-raised); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; display: flex; flex-direction: column; gap: 12px; box-shadow: 0 10px 40px rgba(0,0,0,0.3); }
.cl-replay-head { display: flex; flex-wrap: wrap; gap: 8px; align-items: baseline; }
.cl-replay-head .link-btn { margin-left: auto; }
.cl-replay-board { display: flex; gap: 4px; align-items: center; flex-wrap: wrap; }
.cl-replay-board .cl-chips { margin-left: 10px; font-size: 14px; font-weight: 600; }
.cl-replay-seats { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.cl-replay-seats li { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 6px 8px; border-radius: var(--radius); border: 1px solid transparent; font-size: 13px; }
.cl-replay-seats li.acting { border-color: var(--teal); background: var(--teal-faint); }
.cl-replay-seats li.folded { opacity: 0.5; }
.cl-hole { display: inline-flex; gap: 2px; }
.cl-bet { font-family: var(--font-data); font-size: 12px; color: var(--teal); }
.cl-replay-text { margin: 0; font-weight: 600; min-height: 1.4em; }
.cl-replay-controls { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.cl-list li.cl-under { padding-left: 20px; border-left: 2px solid var(--border); }
.cl-assign { display: inline-flex; align-items: center; gap: 6px; }
.cl-assign .pl-text { width: auto; padding: 2px 6px; }
.cl-offer { border-left-color: var(--teal); flex-direction: row; flex-wrap: wrap; align-items: center; justify-content: space-between; }
.cl-admin { border-left-color: var(--teal); }
.cl-admin .cl-list li { padding: 6px 0; }
.cl-tables { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.cl-tables li { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 13px; }
.cl-tables li .btn-small { margin-left: auto; }
.cl-chips { font-family: var(--font-data); font-size: 12px; color: var(--fg-strong); }
.cl-account { flex-basis: 100%; display: flex; flex-direction: column; gap: 8px; padding: 8px 0 0 12px; border-left: 2px solid var(--border); }
.cl-balance { display: flex; gap: 10px; align-items: baseline; }
.cl-balance .cl-chips { font-size: 15px; font-weight: 600; }
.cl-chipform { flex-basis: 100%; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 8px 10px; background: var(--bg-inset); border-radius: var(--radius); }
.cl-chipform .pl-text { width: 120px; }
.cl-chipform .pl-text[name="note"] { width: 200px; }
.cl-chipform .pl-text:invalid:not(:placeholder-shown) { border-color: var(--red); }
.cl-formlabel { font-size: 12px; font-weight: 600; color: var(--fg); }
.cl-ask .pl-text { width: 120px; }
.cl-ask .pl-text[data-ask-note] { width: 200px; }
.cl-history summary { cursor: pointer; font-size: 12px; color: var(--fg-muted); }
.cl-history ul { list-style: none; margin: 6px 0 0; padding: 0; font-size: 12px; display: flex; flex-direction: column; gap: 3px; }
.cl-status.cl-member { color: var(--teal); font-weight: 600; }
.cl-status.cl-declined, .cl-status.cl-removed, .cl-status.cl-bad_invite { color: var(--red, #c0392b); }
.pl-wrap { max-width: 980px; margin: 0 auto; padding: 20px; display: flex; flex-direction: column; gap: 14px; }
.pl-head h1 { font-family: var(--font-display); font-size: 34px; font-weight: 400; line-height: 1.05; color: var(--fg-strong); margin: 0 0 6px; }
.pl-head p, .pl-meta { color: var(--fg-muted); font-size: 13px; margin: 0; }
.pl-setup { display: flex; flex-direction: column; gap: 12px; max-width: 640px; }
.pl-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.pl-label { width: 90px; font-size: 13px; font-weight: 600; color: var(--fg); }
.pl-opts { display: flex; gap: 4px; flex-wrap: wrap; }
.pl-bots { display: flex; flex-direction: column; gap: 6px; }
.pl-bot { display: grid; grid-template-columns: 56px minmax(0, 190px) minmax(0, 1fr); gap: 10px; align-items: center; font-size: 12px; }
.pl-bot select { font: inherit; padding: 4px 6px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--bg-raised); color: var(--fg); min-width: 0; }
.pl-seatno { color: var(--fg-muted); font-family: var(--font-data); }
.pl-desc { color: var(--fg-muted); min-width: 0; }
.pl-actions { display: flex; gap: 10px; align-items: center; }
.pl-bar { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 8px; }

/* An explicit width, not a stretched one: Safari sized a stretched flex item
   with an aspect ratio past its side margins, pushing the table off-centre. */
.pl-felt {
  position: relative; box-sizing: border-box; width: calc(100% - 80px); align-self: center;
  aspect-ratio: 2 / 1; margin: 28px 40px 40px;
  background: var(--felt); border: 6px solid var(--felt-border); border-radius: 999px;
}
/* Above the seats, so a side seat's labels never cover the board on a phone. */
.pl-center { position: absolute; left: 50%; top: 46%; transform: translate(-50%, -50%); z-index: 3; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.pl-board { display: flex; gap: 6px; }
/* Running it twice: the second board, a little smaller, under the first. */
.pl-board2 { transform: scale(0.85); margin-top: -6px; opacity: 0.95; }
.pl-pot { display: flex; flex-direction: column; align-items: center; gap: 3px; }
.pl-pot > .pl-amt { font-family: var(--font-data); font-size: 13px; font-weight: 700; color: #e9ecef; background: rgba(0,0,0,0.25); padding: 2px 10px; border-radius: 999px; }
.pl-pot > .pl-total { font-family: var(--font-data); font-size: 11px; font-weight: 700; color: rgba(233,236,239,0.75); text-align: center; max-width: 220px; }
/* Chips (chips.js): stacks seen from the side, 2px a chip, a stack of 20
   at most. Each colour has an edge stripe of white inserts. */
.ch-row { display: inline-flex; align-items: flex-end; gap: 2px; pointer-events: none; }
/* Seen from above at a slant: the top chip's face (an oval with edge spots
   and an inlay ring) on a thin side that grows 1.2px a chip. */
.ch-stack { --chip: #f1efe8; --insert: rgba(255,255,255,0.85); --w: 18px; --face: 11px;
  position: relative; width: var(--w); height: calc(var(--n) * 1.2px + var(--face));
  border-radius: calc(var(--w) / 2) / calc(var(--face) / 2);
  background: repeating-linear-gradient(to top, var(--chip) 0 0.8px, rgba(0,0,0,0.4) 0.8px 1.2px);
  background-color: var(--chip); box-shadow: 0 1px 2px rgba(0,0,0,0.5); }
.ch-stack::before { content: ''; position: absolute; left: 0; top: 0; width: 100%; height: var(--face); border-radius: 50%;
  background:
    radial-gradient(closest-side, var(--chip) 0 52%, var(--insert) 52% 60%, transparent 60%),
    repeating-conic-gradient(var(--insert) 0 18deg, var(--chip) 18deg 60deg);
  box-shadow: inset 0 0 0 0.6px rgba(0,0,0,0.35); }
/* A mixed stack (a deep stack's loose big chips): segments on top of each
   other, the highest value on top, only the top one showing its face. */
.ch-mix { display: inline-flex; flex-direction: column; }
.ch-mix > .ch-stack { box-shadow: none; }
.ch-mix > .ch-stack + .ch-stack { height: calc(var(--n) * 1.2px); border-radius: 0; }
.ch-mix > .ch-stack:not(:last-child) { border-bottom-left-radius: 0; border-bottom-right-radius: 0; }
.ch-mix > .ch-stack:last-child:not(:first-child) { border-radius: 0 0 calc(var(--w) / 2) calc(var(--w) / 2) / 0 0 calc(var(--face) / 2) calc(var(--face) / 2); }
.ch-mix > .ch-stack + .ch-stack::before { display: none; }
.ch-mix > .ch-stack:last-child { box-shadow: 0 1px 2px rgba(0,0,0,0.5); }
.ch-white { --chip: #ecebe6; --insert: rgba(47,109,179,0.85); }
.ch-red { --chip: #c8322b; }
.ch-green { --chip: #2e8b57; }
.ch-black { --chip: #2a2a2a; }
.ch-purple { --chip: #6b3fa0; }
.ch-yellow { --chip: #e3b836; }
.ch-pink { --chip: #e57fae; }
.ch-orange { --chip: #ec7a1c; }
.ch-blue { --chip: #2f5fb3; }
.ch-red-500k { --chip: #c8322b; --insert: rgba(240,200,80,0.95); }
.ch-green-1m { --chip: #2e8b57; --insert: rgba(240,200,80,0.95); }
.ch-pot .ch-stack { --w: 20px; --face: 12px; }
/* A seat's stack sits beside its plate, on the side facing the table. */
.pl-plate { position: relative; }
.ch-seat { position: absolute; bottom: 0; }
.ch-seat.ch-left { right: calc(100% + 5px); flex-direction: row-reverse; }
.ch-seat.ch-right { left: calc(100% + 5px); }
.ch-bet .ch-stack { --w: 16px; --face: 10px; }
.pl-card {
  width: 40px; height: 56px; border-radius: 5px; background: var(--card-face); color: var(--card-ink);
  display: inline-flex; align-items: center; justify-content: center; font-family: var(--font-data); font-weight: 700; font-size: 16px;
  border: 1px solid rgba(0,0,0,0.15); box-shadow: 0 2px 6px rgba(0,0,0,0.25);
}
.pl-card.r { color: var(--red); }
.four-color .pl-card.s-d { color: var(--blue); }
.four-color .pl-card.s-c { color: var(--green); }
.pl-card.back { background: repeating-linear-gradient(45deg, #4b6f78, #4b6f78 4px, #3e5f67 4px, #3e5f67 8px); border-color: rgba(255,255,255,0.25); }
.pl-card.slot { background: transparent; border: 1px dashed rgba(255,255,255,0.18); box-shadow: none; }
/* All-in runout: the slots about to be dealt pulse while everyone waits. */
.pl-card.slot.next { border: 1px solid rgba(243,231,201,0.6); animation: pl-next-card 1.1s ease-in-out infinite; }
@keyframes pl-next-card {
  0%, 100% { background: rgba(243,231,201,0.04); box-shadow: 0 0 0 0 rgba(243,231,201,0); }
  50% { background: rgba(243,231,201,0.16); box-shadow: 0 0 10px 2px rgba(243,231,201,0.35); }
}
@media (prefers-reduced-motion: reduce) { .pl-card.slot.next { animation: none; background: rgba(243,231,201,0.12); } }
.pl-seat { position: absolute; transform: translate(-50%, -50%); display: flex; flex-direction: column; align-items: center; gap: 3px; width: 112px; }
/* A bot's table talk (bot-chat.js): a speech bubble over its seat, placed
   at the seat's centre on the felt and raised above its avatar. */
.pl-say { position: absolute; transform: translate(-50%, calc(-100% - 46px)); z-index: 6; width: max-content; max-width: 180px;
  background: #fffdf6; color: #1d2a24; font-size: 12px; line-height: 1.3; font-weight: 600; padding: 5px 9px; border-radius: 10px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.35); text-align: center; pointer-events: none; }
/* Only a new line fades in (play.js marks it fresh once): the table is
   redrawn on every action, and a replayed fade would flash. */
.pl-say.fresh { animation: pl-say-in 0.2s ease-out; }
.pl-say::after { content: ''; position: absolute; top: 100%; left: 50%; transform: translateX(-50%); border: 6px solid transparent; border-top-color: #fffdf6; }
@keyframes pl-say-in { from { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .pl-say.fresh { animation: none; } }
@media (max-width: 640px) { .pl-say { max-width: 130px; font-size: 11px; } }
/* Seat avatars (avatars.js): a bot's main look, or the one you picked. */
.pl-av { width: 56px; height: 56px; flex: none; border-radius: 50%; overflow: hidden; background: var(--felt-border); box-shadow: 0 0 0 2px var(--felt-border); }
.pl-av img { display: block; width: 100%; height: 100%; }
.pl-av.none { display: flex; align-items: center; justify-content: center; font-size: 22px; font-weight: 700; color: #e9ecef; }
.pl-seat.acting .pl-av { box-shadow: 0 0 0 3px var(--teal); }
.pl-seat.winner .pl-av { box-shadow: 0 0 0 3px var(--green); }
/* The cards sit in front of the avatar, over its lower edge, which keeps the
   seat short enough not to run into its neighbours. */
.pl-av + .pl-hole { margin-top: -20px; position: relative; }
/* Climb the ladder (#212, V3 #225): the next series on a cream card, then
   every rung as a tile, easiest first, with a spade filled for each one
   beaten and yours outlined in red. */
.ld-av { width: 40px; height: 40px; flex: none; border-radius: 50%; overflow: hidden; background: var(--felt-border); display: inline-flex; align-items: center; justify-content: center; font-weight: 700; color: #e9ecef; }
.ld-av img { display: block; width: 100%; height: 100%; }
.ld-next { background: #f3e7c9; color: #1d3a2c; border-radius: 20px; padding: 22px; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 16px 24px; align-items: center; box-shadow: 0 8px 0 #0f2219; margin-bottom: 24px; }
.ld-next .ld-av { width: 84px; height: 84px; font-size: 32px; background: #1d3a2c; color: #f3e7c9; }
.ld-who { display: flex; gap: 16px; align-items: center; min-width: 0; }
.ld-rungno { font-size: 13px; font-weight: 600; color: #5d6b55; }
.ld-who h2 { margin: 2px 0 4px; font: 400 28px/1.1 var(--font-display); color: #1d3a2c; }
.ld-desc { margin: 0; font-size: 14px; color: #5d6b55; }
.ld-series { display: flex; flex-direction: column; align-items: center; gap: 2px; text-align: center; }
.ld-game { font-size: 13px; font-weight: 600; color: #5d6b55; }
.ld-tally { font: 400 34px var(--font-display); }
.ld-sides, .ld-before { font-size: 13px; color: #5d6b55; }
.ld-paused { grid-column: 1 / -1; }
.ld-go { grid-column: 1 / -1; display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.ld-go .tr-start { margin: 0; }
.ld-rules { font-size: 13px; color: #5d6b55; }
.ld-note { border-left: 3px solid var(--teal); padding-left: 10px; color: var(--fg); }
/* A ladder game's review (#284): its costliest decisions, hand by hand. */
.ld-review p { margin: 0; }
.ld-review-lead { color: var(--fg-strong); }
.ld-lessons { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.ld-lesson-hand { padding: 0 8px 2px; }
.ld-lesson-hand b { font-family: var(--font-data); font-weight: 600; color: var(--fg-strong); }
.ld-last { margin: 0 0 14px; }
.ld-last > summary { cursor: pointer; font-weight: 600; color: var(--fg-strong); padding: 4px 0; }
.ld-last .ld-review { margin-top: 6px; }
.ld-rungs { list-style: none; margin: 0 0 14px; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 10px; }
.ld-rung { position: relative; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 12px 6px 10px; border-radius: 14px; background: #24472f; color: #f3e7c9; min-width: 0; text-align: center; }
.ld-rung .ld-spade { position: absolute; top: 6px; right: 6px; }
.ld-rung .ld-spade path { fill: none; stroke: #7d8a72; stroke-width: 1.6; stroke-dasharray: 2 1.4; }
.ld-rung.below .ld-spade path, .ld-rung.reached .ld-spade path { fill: #f3e7c9; stroke: none; }
.ld-rung .ld-num { font-size: 12px; color: #a9b8a6; }
.ld-rung .ld-name { max-width: 100%; font-size: 13px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ld-rung.ahead { background: #12261c; opacity: 0.75; }
.ld-rung.here { background: #f3e7c9; color: #1d3a2c; box-shadow: 0 0 0 3px #c9472f; }
.ld-rung.here .ld-num { color: #5d6b55; }
.ld-rung.here .ld-spade path { fill: #c9472f; stroke: none; }
.ld-foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
@media (max-width: 640px) {
  .ld-next { grid-template-columns: minmax(0, 1fr); padding: 18px; }
  .ld-next .ld-av { width: 64px; height: 64px; }
  .ld-series { flex-direction: row; gap: 10px; justify-content: flex-start; }
  .ld-rungs { grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); }
}
.ld-over { display: block; margin-top: 4px; font-weight: 600; }
.ld-over.won { color: var(--green); }
.ld-over.lost { color: var(--red); }
.pl-hole { display: flex; gap: 3px; }
.pl-hole .pl-card { width: 32px; height: 45px; font-size: 13px; }
.pl-seat.hero .pl-hole .pl-card { width: 40px; height: 56px; font-size: 16px; }
/* Omaha: bots' 4-6 cards overlap like a fanned hand; yours stay side by side. */
.pl-seat:not(.hero) .pl-hole.n4 .pl-card + .pl-card { margin-left: -12px; }
.pl-seat:not(.hero) .pl-hole.n5 .pl-card + .pl-card { margin-left: -16px; }
.pl-seat:not(.hero) .pl-hole.n6 .pl-card + .pl-card { margin-left: -19px; }
.pl-seat.hero .pl-hole.n5 .pl-card, .pl-seat.hero .pl-hole.n6 .pl-card { width: 36px; height: 50px; font-size: 15px; }
.pl-plate {
  display: flex; flex-direction: column; align-items: center; background: var(--bg-raised); border: 1px solid var(--border);
  border-radius: 6px; padding: 3px 8px; min-width: 96px; box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}
.pl-plate b { font-size: 11px; color: var(--fg-strong); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 104px; }
.pl-plate span { font-family: var(--font-data); font-size: 12px; color: var(--fg); }
.pl-seat.acting .pl-plate { border-color: var(--teal); box-shadow: 0 0 0 2px var(--teal-faint), 0 2px 6px rgba(0,0,0,0.2); }
.pl-seat.folded { opacity: 0.45; }
.pl-seat.prefold .pl-hole { opacity: 0.45; }
.pl-seat.winner .pl-plate { border-color: var(--green); }
.pl-note { font-size: 10px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; color: #e9ecef; background: rgba(0,0,0,0.35); padding: 1px 6px; border-radius: 3px; }
.pl-seat.winner .pl-note { background: var(--green); }
/* Your hand in words, under your seat. */
.pl-handname { font-size: 11px; font-weight: 600; color: #fff; background: rgba(0,0,0,0.45); padding: 1px 7px; border-radius: 3px; white-space: nowrap; }
/* Live feedback: your latest decision's grade beside your cards, out of the
   seat's flow so nothing moves; the full list sits under the action bar. */
.pl-live-badge {
  position: absolute; left: calc(100% + 6px); top: 8px; z-index: 2; white-space: nowrap;
  font-size: 11px; font-weight: 700; padding: 2px 7px; border-radius: 10px; color: #fff; background: rgba(0,0,0,0.45);
}
.pl-live-badge.g-fine { color: var(--green); background: rgba(0,0,0,0.35); }
.pl-live-badge.g-inaccuracy { background: var(--amber); }
.pl-live-badge.g-mistake, .pl-live-badge.g-blunder { background: var(--red); }
.pl-live-badge.g-deviation { background: var(--blue); }
.pl-live { border-top: none; padding-top: 0; }
.pl-live-wait { display: block; padding: 4px 8px; }
/* The hand's summary: beside the table on a wide screen (outside the
   column, so the table keeps its size), under it between hands otherwise. */
.pl-play { position: relative; }
.pl-summary {
  display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--fg);
  background: var(--bg-raised); border: 1px solid var(--border); border-radius: var(--radius); padding: 10px 12px;
}
.pl-summary ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 3px; }
.pl-sum-head { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; color: var(--fg-strong); }
.pl-sum-boardrow { display: flex; align-items: center; gap: 8px; }
.pl-sum-boardrow .pl-sum-label { min-width: 3.5em; margin: 0; }
.pl-sum-board { display: inline-flex; gap: 3px; }
.pl-sum-board .pl-sc { font-size: 14px; padding: 1px 4px; }
.pl-sum-cards { display: inline-flex; gap: 2px; }
.pl-sc { font-family: var(--font-data); font-size: 12px; font-weight: 700; padding: 0 3px; border: 1px solid var(--border); border-radius: 3px; background: #fff; color: #1a1a1a; }
.pl-sc.r { color: #c0392b; }
.four-color .pl-sc.s-d { color: var(--blue); }
.four-color .pl-sc.s-c { color: var(--green); }
/* A hand shown down: name and cards, what they made under them. */
.pl-summary ul.pl-sum-shown { gap: 6px; }
.pl-sum-shown li { display: grid; grid-template-columns: 1fr auto; align-items: center; column-gap: 6px; }
.pl-sum-shown li .pl-sum-hand { grid-column: 1 / -1; font-size: 12px; }
.pl-sum-shown li.won .pl-sum-who, .pl-sum-shown li.won .pl-sum-hand { color: var(--fg-strong); font-weight: 700; }
.pl-sum-won { color: var(--green); font-weight: 700; }
.pl-sum-who { min-width: 5em; font-weight: 600; }
.pl-sum-hand { color: var(--fg-muted); }
.pl-sum-nets { display: flex; flex-wrap: wrap; gap: 4px 12px; font-family: var(--font-data); font-size: 12px; border-top: 1px solid var(--border); padding-top: 6px; }
.pl-sum-nets .up { color: var(--green); }
.pl-sum-nets .down { color: var(--red); }
.pl-sum-label { font-size: 11px; text-transform: uppercase; letter-spacing: 0.04em; color: var(--fg-muted); margin-bottom: 2px; }
.pl-sum-full { display: flex; flex-direction: column; gap: 6px; }
.pl-sum-compact > summary { cursor: pointer; }
.pl-sum-compact[open] > summary { margin-bottom: 6px; }
.pl-sum-compact { display: flex; flex-direction: column; gap: 6px; }
@media (min-width: 1500px) {
  .pl-summary { position: absolute; left: calc(100% + 8px); top: 60px; width: 240px; }
  .pl-summary.last .pl-sum-compact { display: none; }
}
/* Narrow screens: during the next hand, one line that opens to the rest. */
@media (max-width: 1499px) {
  .pl-summary.last { padding: 6px 12px; }
  .pl-summary.last .pl-sum-full { display: none; }
}
/* Beside the avatar's shoulder, clear of its face. */
/* A bet sits on the felt between its seat and the middle (play.js places it). */
.pl-bet { position: absolute; left: var(--bx); top: var(--by); transform: translate(-50%, -50%); z-index: 2; display: flex; align-items: flex-end; gap: 3px; pointer-events: none; }
.pl-bet > .pl-amt { font-family: var(--font-data); font-size: 11px; font-weight: 700; color: #1a1a1a; background: #e8c95a; border-radius: 999px; padding: 0 7px; }
/* On the felt beside the name plate, on its chips' side: below the chips, or
   above them along the bottom rail (play.js buttonHtml). */
.pl-button { position: absolute; top: calc(100% + 6px); z-index: 2; pointer-events: none; width: 20px; height: 20px; border-radius: 50%; background: #fff; color: #222; font-size: 11px; font-weight: 700; display: flex; align-items: center; justify-content: center; box-shadow: 0 1px 3px rgba(0,0,0,0.4); }
.pl-button.b-right { left: calc(100% + 30px); }
.pl-button.b-left { right: calc(100% + 30px); }
.pl-button.b-up { top: auto; bottom: calc(100% + 10px); }

.pl-controls {
  display: grid; grid-template-columns: repeat(3, 170px);
  grid-template-areas: "status status status" "fold call raise" "sizes sizes sizes" "amount amount amount";
  grid-template-rows: 20px 42px 30px 24px;
  gap: 8px 10px; justify-content: center; align-items: center;
}
.pl-status { grid-area: status; text-align: center; color: var(--fg-muted); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* The time bank, on your turn. */
.pl-status .pl-bank { margin-left: 6px; }
.pl-status .pl-bank.on { color: var(--red); }
.pl-result { color: var(--fg-strong); font-weight: 600; }
.pl-swaps { display: block; margin-top: 4px; font-size: 13px; }
.pl-act-fold { grid-area: fold; }
.pl-act-call { grid-area: call; }
.pl-act-raise { grid-area: raise; }
.pl-act-sizes { grid-area: sizes; }
.pl-act-amount { grid-area: amount; display: flex; align-items: center; }
/* Every slot is the same size whether it holds a control or not. */
.pl-act-fold, .pl-act-call, .pl-act-raise { height: 42px; }
.pl-act-sizes { height: 30px; }
.pl-act-amount { height: 24px; }
.pl-act-fold .tr-btn, .pl-act-call .tr-btn, .pl-act-raise .tr-btn, .pl-act-raise .tr-start {
  width: 100%; height: 42px; min-width: 0; padding: 0 10px; white-space: nowrap; font-size: 14px;
}
.pl-slot { display: block; width: 100%; height: 100%; }
.pl-controls .btn-small { gap: 6px; }
.pl-act-amount { gap: 8px; }
.pl-act-amount input[type=range] { flex: 1; min-width: 0; accent-color: var(--teal); }
.pl-act-amount .pl-amtbox { width: 6.5em; flex: none; height: 24px; padding: 0 6px; font-size: 13px; }
.pl-sizes { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; height: 100%; }
.pl-sizes .btn-small { justify-content: center; padding: 4px 6px; }
.pl-size-slot { display: block; }
/* At the right even when the bar wraps on a phone; the ⋯ menu opens under
   it, lined up with its right edge (Leave's), so it stays on screen. */
.pl-tools { position: relative; display: flex; gap: 8px; align-items: center; margin-left: auto; }
.pl-tools .link-btn { margin-left: 6px; }
/* The table's ⋯ menu and Leave (V3, #225). */
.pl-menu { position: static; }
.pl-menu > summary { list-style: none; cursor: pointer; font-weight: 700; font-size: 18px; line-height: 1; padding: 7px 14px; border-radius: 10px; background: var(--bg-raised); border: 1px solid var(--border); color: var(--fg-strong); user-select: none; }
.pl-menu > summary::-webkit-details-marker { display: none; }
.pl-menu[open] > summary { background: var(--bg-inset); }
.pl-menu-list { position: absolute; right: 0; top: calc(100% + 6px); z-index: 20; min-width: min(230px, calc(100vw - 32px)); max-width: calc(100vw - 32px); display: flex; flex-direction: column; padding: 6px; border-radius: 12px; background: var(--bg-raised); border: 1px solid var(--border); box-shadow: 0 10px 24px rgba(0,0,0,0.25); }
.pl-menu-item { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 10px 12px; border: 0; border-radius: 8px; background: none; color: var(--fg-strong); font: 600 14px var(--font-ui); cursor: pointer; text-align: left; }
.pl-menu-item:hover, .pl-menu-item:focus-visible { background: var(--bg-inset); }
.pl-menu-item b { font-weight: 600; color: var(--fg-muted); }
.pl-menu-item[aria-pressed="true"] b { color: var(--teal); }
.pl-leave { font: 600 14px var(--font-ui); padding: 7px 14px; border-radius: 10px; border: 1px solid var(--border); background: none; color: var(--fg-strong); cursor: pointer; }
.pl-leave:hover { background: var(--bg-inset); }
.pl-hud { font-family: var(--font-data); font-size: 10px; color: #e9ecef; background: rgba(0,0,0,0.35); padding: 0 6px; border-radius: 3px; white-space: nowrap; }
.pl-stats { display: flex; flex-direction: column; gap: 8px; border-top: 1px solid var(--border); padding-top: 10px; }
.pl-stats-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; font-size: 13px; color: var(--fg-strong); }
.pl-stats-head .link-btn { margin-left: auto; }
.pl-stats-scroll { overflow-x: auto; max-width: 100%; }
.pl-stats-table { border-collapse: collapse; font-size: 12px; width: 100%; white-space: nowrap; }
.pl-stats-table th, .pl-stats-table td { padding: 4px 8px; text-align: right; border-bottom: 1px solid var(--border); }
.pl-stats-table td { font-family: var(--font-data); color: var(--fg); }
.pl-stats-table thead th { color: var(--fg-muted); font-weight: 600; cursor: pointer; user-select: none; }
.pl-stats-table thead th:hover { color: var(--fg-strong); }
.pl-stats-table th:first-child { text-align: left; position: sticky; left: 0; background: var(--bg); }
.pl-stats-table tbody th { font-weight: 600; color: var(--fg-strong); }
.pl-stats-table tbody th small { display: block; font-weight: 400; color: var(--fg-muted); font-size: 10px; }
.pl-stats-table td small { color: var(--fg-muted); }
.pl-stats-table tr.hero th { color: var(--teal); }
.pl-log { max-height: 140px; overflow-y: auto; font-family: var(--font-data); font-size: 11px; color: var(--fg-muted); border-top: 1px solid var(--border); padding-top: 8px; }
/* Chat at a friends table (play.js): after the table on a phone, floating at
   the bottom right on a wide screen. */
.pl-chat { max-width: 980px; margin: 0 auto 20px; padding: 0 20px; box-sizing: border-box; }
.pl-chat[hidden] { display: none; }
.pl-chat-head { all: unset; box-sizing: border-box; cursor: pointer; display: block; width: 100%; padding: 8px 12px; font-size: 13px; font-weight: 600; color: var(--fg-strong); background: var(--bg-raised); border: 1px solid var(--border); border-radius: var(--radius) var(--radius) 0 0; }
.pl-chat-head::after { content: ' ▾'; color: var(--fg-muted); }
.pl-chat.shut .pl-chat-head { border-radius: var(--radius); }
.pl-chat.shut .pl-chat-head::after { content: ' ▴'; }
.pl-chat-head.unread { border-color: var(--teal); color: var(--teal); }
.pl-chat-head:focus-visible { outline: 2px solid var(--teal); outline-offset: 2px; }
.pl-chat-body { border: 1px solid var(--border); border-top: none; border-radius: 0 0 var(--radius) var(--radius); background: var(--bg-raised); padding: 8px 10px; display: flex; flex-direction: column; gap: 8px; }
.pl-chat.shut .pl-chat-body { display: none; }
.pl-chat-log { height: 140px; overflow-y: auto; font-size: 13px; line-height: 1.4; overflow-wrap: anywhere; display: flex; flex-direction: column; gap: 2px; }
.pl-chat-log b { color: var(--fg-strong); font-weight: 600; }
.pl-chat-empty { color: var(--fg-muted); }
.pl-chat-send { display: flex; gap: 6px; }
.pl-chat-send input { flex: 1; min-width: 0; font: inherit; font-size: 16px; padding: 5px 8px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--bg); color: var(--fg); }
.pl-chat-note { margin: 0; font-size: 12px; color: var(--amber); }
@media (min-width: 1100px) {
  .pl-chat { position: fixed; right: 16px; bottom: 16px; z-index: 30; width: 300px; margin: 0; padding: 0; box-shadow: 0 6px 24px rgba(0,0,0,0.2); }
  .pl-chat-send input { font-size: 13px; }
  /* Room to scroll the table's last controls clear of the panel. */
  body.pl-chat-on .pl-play { padding-bottom: 280px; }
  body.pl-chat-on.pl-chat-shut .pl-play { padding-bottom: 64px; }
}
.pl-multi { border-top: 1px solid var(--border); padding-top: 14px; }
.pl-multi h2 { font-size: 16px; color: var(--fg-strong); margin: 0; }
.pl-text { font: inherit; font-size: 13px; padding: 5px 8px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--bg-raised); color: var(--fg); width: 180px; max-width: 100%; }
.pl-bar { gap: 12px; flex-wrap: wrap; }
.pl-neterr { color: var(--red); }
.pl-clock { font-family: var(--font-data); font-size: 11px; font-weight: 700; color: #1a1a1a; background: #e9ecef; border-radius: 999px; padding: 0 7px; }

@media (max-width: 640px) {
  .pl-controls { grid-template-columns: repeat(3, 1fr); }
  .pl-act-fold .tr-btn, .pl-act-call .tr-btn, .pl-act-raise .tr-btn, .pl-act-raise .tr-start { font-size: 13px; padding: 0 6px; }
  .pl-act-raise kbd, .pl-act-call kbd, .pl-act-fold kbd { display: none; }
  .pl-felt { width: calc(100% - 60px); aspect-ratio: 3 / 4; margin: 24px 30px 34px; border-radius: 120px; }
  .pl-seat { width: 84px; }
  .pl-av { width: 40px; height: 40px; }
  .pl-av.none { font-size: 16px; }
  .pl-av + .pl-hole { margin-top: -14px; }
  /* Phones: no chips at all, too little room; stacks, bets and the pot are
     just their amounts. Bets sit nearer their seats, clear of the board. */
  .pl-felt .ch-row { display: none; }
  .pl-bet { left: var(--px); top: var(--py); }
  /* No chips here: just off the plate's top corner, clear of its bet. */
  .pl-button, .pl-button.b-up { top: -14px; bottom: auto; }
  .pl-button.b-right { left: calc(100% + 2px); }
  .pl-button.b-left { right: calc(100% + 2px); }
  .pl-plate { min-width: 76px; padding: 2px 4px; }
  .pl-plate b { max-width: 78px; font-size: 10px; }
  .pl-card { width: 28px; height: 40px; font-size: 12px; }
  .pl-board { gap: 4px; }
  .pl-seat.hero .pl-hole .pl-card { width: 36px; height: 50px; font-size: 15px; }
  .pl-hole .pl-card { width: 26px; height: 37px; font-size: 11px; }
  .pl-seat:not(.hero) .pl-hole.n4 .pl-card + .pl-card { margin-left: -10px; }
  .pl-seat:not(.hero) .pl-hole.n5 .pl-card + .pl-card { margin-left: -13px; }
  .pl-seat:not(.hero) .pl-hole.n6 .pl-card + .pl-card { margin-left: -15px; }
  .pl-seat.hero .pl-hole.n5 .pl-card, .pl-seat.hero .pl-hole.n6 .pl-card { width: 30px; height: 42px; font-size: 13px; }
  .pl-seat.hero .pl-hole.n6 .pl-card + .pl-card { margin-left: -5px; }
  .pl-bot { grid-template-columns: 48px minmax(0, 1fr); }
  .pl-bot .pl-desc { grid-column: 2; }
}
/* 8 or 9 seats (play.js CROWDED): smaller seats, so neighbours don't run
   into each other; yours keeps its size. */
.pl-felt.crowded .pl-seat:not(.hero) { width: 92px; gap: 2px; }
.pl-felt.crowded .pl-seat:not(.hero) .pl-av { width: 42px; height: 42px; }
.pl-felt.crowded .pl-seat:not(.hero) .pl-av + .pl-hole { margin-top: -14px; }
.pl-felt.crowded .pl-seat:not(.hero) .pl-hole .pl-card { width: 26px; height: 37px; font-size: 11px; }
.pl-felt.crowded .pl-seat:not(.hero) .pl-hole.n4 .pl-card + .pl-card { margin-left: -10px; }
.pl-felt.crowded .pl-seat:not(.hero) .pl-hole.n5 .pl-card + .pl-card { margin-left: -13px; }
.pl-felt.crowded .pl-seat:not(.hero) .pl-hole.n6 .pl-card + .pl-card { margin-left: -15px; }
.pl-felt.crowded .pl-seat:not(.hero) .pl-plate { min-width: 80px; padding: 2px 5px; }
.pl-felt.crowded .pl-seat:not(.hero) .pl-plate b { max-width: 82px; font-size: 10px; }
.pl-felt.crowded .pl-seat:not(.hero) .pl-plate span { font-size: 11px; }
.pl-felt.crowded .pl-seat:not(.hero) :is(.pl-note, .pl-hud) { font-size: 9px; }
/* A bomb pot's two boards are equal: the second isn't a smaller second run. */
.pl-felt.two-boards .pl-board2 { transform: none; margin-top: 0; opacity: 1; }
.pl-felt.two-boards .pl-center { gap: 5px; }
.pl-felt.crowded.two-boards .pl-board .pl-card { width: 34px; height: 48px; font-size: 14px; }
@media (max-width: 640px) {
  /* A little taller, for the side columns of four (play.js crowdedPos). */
  .pl-felt.crowded { aspect-ratio: 2 / 3; }
  .pl-felt.crowded .pl-seat:not(.hero) { width: 70px; gap: 1px; }
  .pl-felt.crowded .pl-seat:not(.hero) .pl-av { width: 28px; height: 28px; }
  .pl-felt.crowded .pl-seat:not(.hero) .pl-av.none { font-size: 13px; }
  .pl-felt.crowded .pl-seat:not(.hero) .pl-av + .pl-hole { margin-top: -10px; }
  .pl-felt.crowded .pl-seat:not(.hero) .pl-hole .pl-card { width: 20px; height: 28px; font-size: 9px; }
  .pl-felt.crowded .pl-seat:not(.hero) .pl-hole.n4 .pl-card + .pl-card { margin-left: -8px; }
  .pl-felt.crowded .pl-seat:not(.hero) .pl-hole.n5 .pl-card + .pl-card { margin-left: -10px; }
  .pl-felt.crowded .pl-seat:not(.hero) .pl-hole.n6 .pl-card + .pl-card { margin-left: -12px; }
  .pl-felt.crowded .pl-seat:not(.hero) .pl-plate { min-width: 62px; padding: 1px 3px; }
  .pl-felt.crowded .pl-seat:not(.hero) .pl-plate b { max-width: 64px; font-size: 9px; }
  .pl-felt.crowded .pl-seat:not(.hero) .pl-plate span { font-size: 10px; }
  .pl-felt.crowded .pl-seat:not(.hero) :is(.pl-note, .pl-hud) { font-size: 8px; padding: 0 3px; }
  .pl-felt.crowded.two-boards .pl-board .pl-card { width: 24px; height: 34px; font-size: 10px; }
  .pl-felt.crowded.two-boards .pl-board { gap: 3px; }
}
/* Your Omaha hand fans out (V3, #225): the cards overlap and tilt, each
   showing its rank and suit in the corner. */
.pl-seat.hero .pl-hole:is(.n4, .n5, .n6) { align-items: flex-end; padding-top: 6px; }
/* position: relative stacks every card in order, each over the last, so the
   untilted middle card of five isn't drawn under its tilted neighbour. */
.pl-seat.hero .pl-hole:is(.n4, .n5, .n6) .pl-card { position: relative; align-items: flex-start; justify-content: flex-start; padding: 3px 4px; box-shadow: -2px 1px 3px rgba(0,0,0,0.25); transform-origin: 50% 100%; }
.pl-seat.hero .pl-hole:is(.n4, .n5, .n6) .pl-card + .pl-card { margin-left: -12px; }
.pl-seat.hero .pl-hole.n4 .pl-card:nth-child(1) { transform: rotate(-7deg) translateY(2px); }
.pl-seat.hero .pl-hole.n4 .pl-card:nth-child(2) { transform: rotate(-2deg); }
.pl-seat.hero .pl-hole.n4 .pl-card:nth-child(3) { transform: rotate(2deg); }
.pl-seat.hero .pl-hole.n4 .pl-card:nth-child(4) { transform: rotate(7deg) translateY(2px); }
.pl-seat.hero .pl-hole.n5 .pl-card:nth-child(1) { transform: rotate(-9deg) translateY(4px); }
.pl-seat.hero .pl-hole.n5 .pl-card:nth-child(2) { transform: rotate(-4deg) translateY(1px); }
.pl-seat.hero .pl-hole.n5 .pl-card:nth-child(4) { transform: rotate(4deg) translateY(1px); }
.pl-seat.hero .pl-hole.n5 .pl-card:nth-child(5) { transform: rotate(9deg) translateY(4px); }
.pl-seat.hero .pl-hole.n6 .pl-card:nth-child(1) { transform: rotate(-11deg) translateY(6px); }
.pl-seat.hero .pl-hole.n6 .pl-card:nth-child(2) { transform: rotate(-6deg) translateY(2px); }
.pl-seat.hero .pl-hole.n6 .pl-card:nth-child(3) { transform: rotate(-2deg); }
.pl-seat.hero .pl-hole.n6 .pl-card:nth-child(4) { transform: rotate(2deg); }
.pl-seat.hero .pl-hole.n6 .pl-card:nth-child(5) { transform: rotate(6deg) translateY(2px); }
.pl-seat.hero .pl-hole.n6 .pl-card:nth-child(6) { transform: rotate(11deg) translateY(6px); }
@media (max-width: 640px) {
  .pl-seat.hero .pl-hole:is(.n4, .n5, .n6) .pl-card + .pl-card { margin-left: -14px; }
  .pl-seat.hero .pl-hole:is(.n4, .n5, .n6) .pl-card { padding: 2px 3px; }
}

/* Setup tabs: play the bots, or host a table for friends. */
.pl-tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border); margin-bottom: 4px; }
.pl-tab { font: inherit; font-size: 14px; font-weight: 600; color: var(--fg-muted); background: none; border: 0; border-bottom: 2px solid transparent; padding: 8px 12px; margin-bottom: -1px; cursor: pointer; }
.pl-tab:hover { color: var(--fg-strong); }
.pl-tab.on { color: var(--teal); border-bottom-color: var(--teal); }
.pl-tab:focus-visible { outline: 2px solid var(--teal); outline-offset: 2px; }
.pl-multi h2 { margin-top: 8px; }

/* Friends tables: empty seats and people sitting out. */
.pl-seat.empty .pl-plate { background: transparent; border: 1px dashed var(--felt-border); color: var(--fg-muted); box-shadow: none; }
.pl-seat.empty .pl-plate b { color: var(--fg-muted); font-weight: 500; }
.pl-seat.out { opacity: 0.6; }

/* Chips at a friends table: requests, players, top-ups. */
.pl-sitout { display: flex; flex-direction: column; gap: 6px; font-size: 13px; }
.pl-sitout.on { border: 1px solid var(--amber); background: var(--amber-faint); border-radius: var(--radius); padding: 10px; }
.pl-sitout-acts { display: flex; gap: 8px; flex-wrap: wrap; }
.pl-chips { display: flex; flex-direction: column; gap: 6px; border-top: 1px solid var(--border); padding-top: 10px; font-size: 13px; }
.pl-chips-head { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; color: var(--fg-strong); }
.pl-chip-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.pl-chip-list li { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; padding: 4px 8px; background: var(--bg-raised); border-radius: var(--radius); }
.pl-chip-acts { display: flex; gap: 6px; }
.pl-chip-acts .tr-btn { padding: 4px 12px; font-size: 13px; }
.pl-chip-ask { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.pl-chip-ask .pl-text { width: 110px; }
.pl-pid { font-family: var(--font-data); font-size: 13px; letter-spacing: 0.06em; padding: 5px 8px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--bg-raised); color: var(--fg); user-select: all; }
/* Locking and opening an identity backup with a password */
.pl-idform { display: flex; flex-direction: column; gap: 6px; max-width: 360px; margin: 4px 0 8px; }
.pl-idform label { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: 13px; color: var(--fg); }
.pl-chip-ask .tr-btn { padding: 4px 12px; font-size: 13px; }

/* Hand review against the GTO bot, under the action bar. */
.pl-review { display: flex; flex-direction: column; gap: 6px; border-top: 1px solid var(--border); padding-top: 10px; font-size: 13px; }
.pl-review-head { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; color: var(--fg-strong); }
.pl-rev-total { font-family: var(--font-data); font-size: 12px; color: var(--green); }
.pl-rev-total.bad { color: var(--red); }
.pl-rev-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.pl-rev-line { all: unset; box-sizing: border-box; cursor: pointer; width: 100%; display: grid; grid-template-columns: 14em minmax(0, 1fr) minmax(0, 1fr) 11em; gap: 8px; align-items: baseline; padding: 4px 8px; border-radius: var(--radius); }
.pl-rev-line:hover, .pl-rev-line:focus-visible { background: var(--bg-inset); }
.pl-rev-line:focus-visible { outline: 2px solid var(--teal); outline-offset: -2px; }
.pl-rev-street { color: var(--fg-muted); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pl-rev-board { font-family: var(--font-data); font-size: 11px; }
.pl-rev-act { color: var(--fg-strong); }
.pl-rev-best { color: var(--fg-muted); font-size: 12px; }
.pl-rev-grade { font-size: 12px; font-weight: 600; white-space: nowrap; text-align: right; color: var(--fg-muted); }
.pl-rev-grade b { font-family: var(--font-data); }
/* What a mixed play gave up: shown, not charged. */
.pl-rev-mixcost { font-family: var(--font-data); font-weight: 400; color: var(--amber); }
.pl-rev-mixnote { color: var(--amber); }
/* Fine decisions stay quiet; the rest stand out by how much they cost. */
.pl-rev-row.g-fine .pl-rev-act { color: var(--fg); }
.pl-rev-row.g-inaccuracy .pl-rev-grade { color: var(--amber); }
.pl-rev-row.g-mistake .pl-rev-grade, .pl-rev-row.g-blunder .pl-rev-grade { color: var(--red); }
.pl-rev-row.g-deviation .pl-rev-grade { color: var(--blue); }
.pl-rev-row.g-mistake, .pl-rev-row.g-blunder { box-shadow: inset 3px 0 0 var(--red); border-radius: var(--radius); }
.pl-rev-row.g-inaccuracy { box-shadow: inset 3px 0 0 var(--amber); border-radius: var(--radius); }
.pl-rev-row.g-blunder .pl-rev-line { background: rgba(160, 64, 64, 0.08); }
.pl-rev-more { display: flex; flex-direction: column; gap: 3px; padding: 2px 8px 8px 16px; font-size: 12px; color: var(--fg); }
/* The bot's plays with your hand: one row each, numbers in their own columns. */
.pl-rev-mix { align-self: flex-start; border-collapse: collapse; margin: 2px 0; font-size: 12px; }
.pl-rev-mix th { text-align: left; font-weight: 600; color: var(--fg-muted); padding: 2px 18px 2px 0; border-bottom: 1px solid var(--border); white-space: nowrap; }
.pl-rev-mix td { padding: 2px 18px 2px 0; color: var(--fg); white-space: nowrap; }
.pl-rev-mix th:nth-child(n+2) { text-align: right; }
.pl-rev-mix td:nth-child(n+2) { text-align: right; font-family: var(--font-data); }
.pl-rev-mix tr.yours td { color: var(--fg-strong); font-weight: 600; }
.pl-rev-caveat { font-size: 11px; }
.pl-rev-totals { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: baseline; font-size: 12px; color: var(--fg); }
.pl-rev-totals b { color: var(--fg-strong); }

@media (max-width: 640px) {
  .pl-rev-line { grid-template-columns: 1fr auto; row-gap: 0; }
  .pl-rev-act { grid-column: 1; }
  .pl-rev-best { grid-column: 1 / -1; }
  .pl-rev-street { grid-column: 1; }
  .pl-rev-grade { grid-row: 1; grid-column: 2; }
}

/* Tournament blind structure editor (#78) */
.ts-editor { display: flex; flex-direction: column; gap: 10px; }
.ts-levels { border-collapse: collapse; font-size: 13px; }
.ts-levels th { text-align: left; font-size: 11px; font-weight: 600; color: var(--fg-muted); padding: 0 6px 4px; }
.ts-levels td { padding: 2px 6px; font-variant-numeric: tabular-nums; }
.ts-levels .pl-text { width: 90px; padding: 3px 6px; }
.ts-levels .ts-break td:first-child { color: var(--fg-muted); font-style: italic; }
.ts-errors { margin: 0; padding-left: 18px; color: var(--red); font-size: 13px; }
.ts-estimate table { border-collapse: collapse; font-size: 13px; margin: 4px 0; }
.ts-estimate td { padding: 2px 12px 2px 0; font-variant-numeric: tabular-nums; }
@media (max-width: 560px) {
  .ts-levels .pl-text { width: 64px; }
  .ts-levels th, .ts-levels td { padding: 2px 3px; }
}

/* The Host tab's two choices (#152) */
.ph-choices { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; }
.ph-choice {
  display: flex; flex-direction: column; gap: 6px; text-align: left; font: inherit; cursor: pointer;
  padding: 16px; border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--bg-raised); color: var(--fg);
}
.ph-choice b { font-size: 15px; color: var(--fg-strong); }
.ph-choice span { font-size: 13px; color: var(--fg-muted); }
.ph-choice:hover, .ph-choice:focus-visible { border-color: var(--teal); background: var(--teal-faint); }
.ph-back { margin: 0; }
/* Start a game's number fields (blinds, buy-in) */
.pf-num { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--fg-muted); }
.pf-num .pl-text { width: 96px; }
/* A new request, on whichever tab is showing (#152) */
.pt-toast {
  position: fixed; z-index: 60; left: 50%; bottom: 16px; transform: translateX(-50%);
  width: max-content; max-width: calc(100vw - 32px);
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 10px 14px; border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--bg-raised); color: var(--fg); font-size: 13px; box-shadow: 0 6px 24px rgba(0,0,0,0.25);
}
.pt-toast[hidden] { display: none; }
/* A player's session (#187): why you can't sit, your last session, the way back to your table */
.cl-why { flex-basis: 100%; }
.cl-last { margin: 4px 0; }
.cl-seated { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 0 0 12px; padding: 8px 12px; border: 1px solid var(--teal); border-radius: var(--radius); background: var(--teal-faint); font-size: 13px; }
/* Chip requests and the ledger (#188) */
.cl-askd > summary { display: inline-flex; list-style: none; cursor: pointer; }
.cl-askd > summary::-webkit-details-marker { display: none; }
.cl-askd[open] > summary { margin-bottom: 6px; }
.cl-answer { margin: 2px 0; }
.cl-ledger-filters { gap: 6px; margin: 6px 0; }
/* A host's first night (#186): the checklist, the backup reminder, asking on the row */
.cl-checklist { display: flex; flex-direction: column; gap: 4px; margin: 8px 0 12px; padding: 10px 14px; border: 1px solid var(--teal); border-radius: var(--radius); background: var(--teal-faint); font-size: 13px; }
.cl-checklist ol { margin: 0; padding-left: 20px; }
.cl-checklist li.done { color: var(--fg-muted); }
.cl-checklist > .link-btn { align-self: flex-start; }
.cl-nag { margin: 6px 0; }
.cl-confirm { flex-basis: 100%; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 13px; }
/* A tournament calling you (#189): stays until you sit down or close it */
.cl-callbar { border-color: var(--teal); }
body.has-callbar .pt-toast:not(.cl-callbar) { bottom: 76px; }
/* A tournament's lobby, under its row (#189) */
.cl-tdetails { flex-basis: 100%; font-size: 13px; }
.cl-tdetails summary { cursor: pointer; color: var(--teal); }
.cl-tlobby { display: flex; flex-direction: column; gap: 6px; margin-top: 6px; }
.cl-tlobby .cl-acct { min-width: 0; }
.cl-tlive { flex-basis: 100%; }
/* A fair deal's check (#136) */
.cl-fair { font-size: 12px; color: var(--green); white-space: nowrap; }
.cl-fair.bad { color: var(--red); white-space: normal; }
/* A club's Accounting tab */
.cl-acct { border-collapse: collapse; font-size: 13px; min-width: min(420px, 100%); }
.cl-acct th, .cl-acct td { padding: 4px 10px; border-bottom: 1px solid var(--border); }
.cl-acct th { text-align: left; font-weight: 500; color: var(--fg); }
.cl-acct td { text-align: right; font-family: var(--font-data); color: var(--fg-strong); }
.cl-acct thead th { color: var(--fg-muted); font-weight: 500; }
.cl-acct thead th:not(:first-child) { text-align: right; }
.cl-acct-sum th, .cl-acct-sum td { font-weight: 700; }

/* A local test profile (?as=, #146) */
.profile-badge {
  position: fixed; left: 8px; bottom: 8px; z-index: 1000;
  padding: 2px 8px; border-radius: 4px;
  font: 600 12px/1.6 'Overpass Mono', monospace;
  background: var(--teal); color: #fff; opacity: 0.9; pointer-events: none;
}

/* What a role means, on its offer and for the host making it (#190) */
.cl-role { display: flex; flex-direction: column; gap: 2px; font-size: 13px; }
.cl-role ul { margin: 0 0 4px; padding-left: 20px; }
.cl-offer-confirm { flex-basis: 100%; display: flex; flex-direction: column; gap: 6px; margin-top: 6px; padding: 8px 12px; border: 1px solid var(--teal); border-radius: var(--radius); background: var(--teal-faint); }
.cl-chipform .cl-role { flex-basis: 100%; }

/* Help requests (#192) */
.cl-help { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; margin-top: 6px; }
.cl-help .cl-chipform { align-self: stretch; }
.cl-help-mine { font-size: 13px; }
.cl-help-text { flex-basis: 100%; }
.cl-helpreqs .cl-chipform { flex-basis: 100%; }

/* Across the clubs pages (#193): member tabs, empty states, the agent picker in the menu, phones */
.cl-member-tabs { margin: 8px 0 4px; }
.cl-empty .btn-small { margin-left: 6px; }
.cl-ledger { list-style: none; margin: 0; padding: 0; font-size: 13px; }
.cl-ledger li { padding: 3px 0; }
.cl-menu-items .cl-assign { display: flex; gap: 6px; align-items: center; padding: 6px 10px; font-size: 13px; }
time[title] { cursor: help; }
/* A club's tabs stay on one line: on a phone the host's six scroll sideways
   within the card rather than running past it. */
.cl-dash-tabs { overflow-x: auto; scrollbar-width: none; }
.cl-dash-tabs::-webkit-scrollbar { display: none; }
.cl-dash-tabs .pl-tab { white-space: nowrap; flex: none; }
@media (max-width: 480px) {
  .cl-list li { gap: 6px; }
  .cl-list li .cl-acts { margin-left: 0; flex-basis: 100%; }
  .cl-member-tabs .pl-tab, .cl-dash-tabs .pl-tab { padding-left: 8px; padding-right: 8px; }
}

/* Train · Play · Clubs (#209): a table opened in a club, and each section's tabs under the top bar */
.mode-tab[data-dot="1"]::after { content: ""; display: inline-block; width: 7px; height: 7px; margin-left: 5px; border-radius: 50%; background: var(--teal); vertical-align: middle; }
.sub-tabs { border-bottom: 1px solid var(--border); margin-bottom: 4px; }
.sub-tabs .pl-tab { text-decoration: none; }

/* The activity log: big chip moves stand out, with filters above (#190). */
.cl-activity-filters { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; }
.cl-big { color: var(--amber); font-weight: 600; }
.cl-bigmove { background: var(--amber-faint); border-left: 3px solid var(--amber); padding-left: 6px; }

/* Player settings: a heading where a named avatar set (e.g. Bitcoin) starts. */
.ps-avset { flex-basis: 100%; margin: 6px 0 0; font-size: 12px; font-weight: 600; color: var(--fg-muted); text-transform: uppercase; letter-spacing: .04em; }

/* ---- V3 (#225) ----
   The spade in the top bar goes home; a breadcrumb under it leads back to
   Study or Play. The front pages (home.js) are the "Felt Room": felt green,
   cream and brick red, the same in light and dark. */
.wordmark { display: inline-flex; align-items: center; gap: 8px; text-decoration: none; }
.wordmark:hover { color: var(--teal); }
.wordmark[data-badge]:not([data-badge=""])::after {
  content: attr(data-badge); padding: 0 5px; border-radius: 8px;
  font-size: 10px; line-height: 15px; display: inline-block; background: var(--amber); color: #1a1a1a;
}
.wordmark[data-dot="1"]::after { content: ""; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--teal); }
.v3-crumbs { display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 600; padding: 8px 0; min-width: 0; }
.v3-crumbs a { color: var(--teal); text-decoration: none; }
.v3-crumbs a:hover { text-decoration: underline; }
.v3-crumbs [aria-current] { color: var(--fg-strong); }
.v3-crumb-sep { color: var(--fg-muted); }

.v3 {
  --v3-felt: #1d3a2c; --v3-felt-hi: #2c5a43; --v3-felt-dark: #12261c; --v3-shadow: #0f2219;
  --v3-cream: #f3e7c9; --v3-cream-dim: #c4b893; --v3-red: #c9472f; --v3-red-ink: #fff4e8;
  --v3-wood: #5a3624; --v3-muted: #8fa596;
  --v3-display: 'Alfa Slab One', Georgia, serif;
  --v3-text: 'Work Sans', system-ui, sans-serif;
  color-scheme: dark;
}
body.mode-v3 { background: #1d3a2c; }
body.mode-v3 :is(.topbar, .sub-tabs, .toolbar, .table-wrap, .eq-layout, .trainer, .psec, .beta-notice) { display: none !important; }
.v3 {
  min-height: 100vh; background: radial-gradient(ellipse at 50% 0%, var(--v3-felt-hi) 0%, var(--v3-felt) 65%);
  color: var(--v3-cream); font-family: var(--v3-text); padding: 28px 20px 64px;
}
.v3 a { color: inherit; }
.v3-page { max-width: 1120px; margin: 0 auto; display: flex; flex-direction: column; gap: 26px; }
.v3 h1, .v3-h2 { font-family: var(--v3-display); font-weight: 400; margin: 0; line-height: 1; text-wrap: balance; }
.v3-head { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.v3-head h1 { font-size: 46px; }
/* Study or Play (#225): across to the other side, from any page. */
.v3-switch { margin-left: auto; display: inline-flex; padding: 3px; gap: 2px; border-radius: 999px; background: #12261c; flex: none; }
.v3-switch a { padding: 6px 14px; border-radius: 999px; font: 600 14px var(--font-ui); color: #c4b893; text-decoration: none; }
.v3-switch a:hover { color: #fff; }
.v3-switch a[aria-current] { background: #f3e7c9; color: #1d3a2c; }
.sub-tabs .v3-switch a { padding: 4px 12px; font-size: 13px; }
.sub-tabs .v3-switch + .pt-me { margin-left: 8px; }
@media (max-width: 640px) { .sub-tabs .v3-switch a { padding: 4px 9px; } }
.v3-home-link { display: flex; }
.v3-spade path { fill: currentColor; }
.v3-back { text-decoration: none; font-weight: 600; color: var(--v3-cream-dim) !important; }
.v3-back:hover { color: var(--v3-cream) !important; }
.v3-h2 { font-size: 30px; }
.v3-note { margin: -16px 0 0; color: var(--v3-cream-dim); }
.v3-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* The landing page */
.v3-hero { display: flex; flex-wrap: wrap; align-items: center; gap: 40px; }
.v3-hero-art { flex: 1 1 300px; display: flex; justify-content: center; position: relative; }
.v3-bigspade { width: min(300px, 70vw); height: auto; }
.v3-bigspade-shadow { fill: var(--v3-shadow); }
.v3-bigspade-face { fill: var(--v3-cream); }
.v3-bigspade-stitch { fill: none; stroke: var(--v3-felt-hi); stroke-width: .35; stroke-dasharray: .7 .5; stroke-linecap: round; }
.v3-peek { position: absolute; left: calc(50% + 70px); bottom: 6px; width: 96px; height: 96px; border-radius: 50%; border: 4px solid var(--v3-felt); transform: rotate(8deg); }
.v3-hero-text { flex: 1 1 420px; display: flex; flex-direction: column; gap: 14px; }
.v3-word { font-family: var(--v3-display); font-size: 30px; letter-spacing: .06em; }
.v3-hero h1 { font-size: clamp(52px, 8vw, 84px); line-height: .95; }
.v3-doors { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px; }
.v3-door { text-decoration: none; border-radius: 18px; padding: 28px; display: flex; flex-direction: column; gap: 16px; box-shadow: 0 10px 0 var(--v3-shadow); transition: transform .15s; }
.v3-door-study { background: var(--v3-red); color: var(--v3-red-ink) !important; transform: rotate(-1.2deg); }
.v3-door-play { background: var(--v3-cream); color: var(--v3-felt) !important; transform: rotate(1.4deg); }
/* Quest's door (#299): across both columns, the road from $1,000 to $1,000,000. */
.v3-door-quest { grid-column: 1 / -1; background: var(--v3-felt-dark); color: var(--v3-cream) !important; box-shadow: 0 10px 0 var(--v3-shadow), inset 0 0 0 3px var(--amber); transform: rotate(-0.4deg); }
.v3-quest-line { display: flex; align-items: center; gap: 14px; font: 400 clamp(20px, 4vw, 34px) var(--v3-display); }
.v3-quest-line b { font-weight: 400; color: var(--amber); white-space: nowrap; }
.v3-quest-road { flex: 1; height: 6px; border-radius: 3px; background: repeating-linear-gradient(90deg, var(--v3-cream) 0 18px, transparent 18px 30px); opacity: .6; min-width: 30px; }
.v3-quest-sub { font-size: 17px; color: var(--v3-cream-dim); }
.v3-door:hover, .v3-door:focus-visible { transform: rotate(0deg) translateY(-3px); }
.v3-door-head { display: flex; justify-content: space-between; align-items: center; font-size: 30px; }
.v3-door-name { font-family: var(--v3-display); font-size: 44px; }
.v3-door-art { display: block; aspect-ratio: 16 / 10; background: var(--v3-felt-dark); border-radius: 12px; overflow: hidden; padding: 12px; }
.v3-door-text { font-size: 17px; line-height: 1.5; }
.v3-chart { height: 100%; aspect-ratio: 1; margin: 0 auto; display: grid; grid-template-columns: repeat(13, minmax(0, 1fr)); gap: 1px; }
.v3-chart span { background: #24402f; color: #5f7d6c; font-size: 7px; font-weight: 600; display: flex; align-items: center; justify-content: center; overflow: hidden; border-radius: 1px; }
.v3-chart span.in { background: var(--v3-cream); color: var(--v3-felt-dark); }
.v3-minitable { position: relative; display: block; width: 100%; height: 100%; min-height: 120px; }
.v3-minitable-felt { position: absolute; left: 18%; top: 22%; width: 64%; height: 56%; border-radius: 999px; background: var(--v3-felt-hi); border: 6px solid var(--v3-wood); box-sizing: border-box; }
.v3-seat { position: absolute; width: 17%; max-width: 64px; border-radius: 50%; border: 3px solid var(--v3-felt-dark); }
.v3-seat-0 { left: 50%; top: 0; transform: translateX(-50%); }
.v3-seat-1 { left: 2%; top: 30%; }
.v3-seat-2 { right: 2%; top: 30%; }
.v3-seat-3 { left: 22%; bottom: 0; }
.v3-seat-4 { right: 22%; bottom: 0; }

/* Study, Play and Heads-up training: tiles */
.v3-games { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.v3-label { font-size: 13px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--v3-cream-dim); }
.v3-chip { background: var(--v3-cream); color: var(--v3-felt); border-radius: 999px; padding: 7px 14px; font-weight: 600; font-size: 14px; }
.v3-tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 26px; }
.v3-tiles-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.v3-tile { text-decoration: none; border-radius: 20px; padding: 26px; display: flex; flex-direction: column; gap: 12px; box-shadow: 0 8px 0 var(--v3-shadow); font-size: 16px; line-height: 1.45; }
a.v3-tile:hover, a.v3-tile:focus-visible { transform: translateY(-3px); }
.v3-tile-wide { flex-direction: row; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 22px; }
.v3-tile-text { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.v3-tile-name { font-family: var(--v3-display); font-size: 30px; line-height: 1.1; }
.v3-tile-cream { background: var(--v3-cream); color: var(--v3-felt) !important; }
.v3-tile-red { background: var(--v3-red); color: var(--v3-red-ink) !important; }
.v3-tile-dark { background: var(--v3-felt-dark); border: 2px solid var(--v3-cream); box-shadow: none; }
.v3-tile-av { width: 64px; height: 64px; border-radius: 50%; border: 3px solid var(--v3-cream); }
.v3-tile-cream:has(.v3-ring) { flex-direction: row; align-items: center; gap: 24px; }
.v3-ring { --pct: 0%; flex: none; width: 130px; height: 130px; border-radius: 50%; background: conic-gradient(var(--v3-felt) 0 var(--pct), #ddd0ac var(--pct) 100%); display: flex; align-items: center; justify-content: center; }
.v3-ring span { width: 98px; height: 98px; border-radius: 50%; background: var(--v3-cream); display: flex; align-items: center; justify-content: center; font-family: var(--v3-display); font-size: 36px; }
.v3-bars { display: flex; align-items: flex-end; gap: 6px; height: 80px; }
.v3-bars span { width: 40px; border-radius: 6px 6px 0 0; background: var(--v3-cream); }
.v3-bars span + span { background: var(--v3-red); }
.v3-versus { display: flex; align-items: center; gap: 14px; font-family: var(--v3-display); font-size: 26px; }
.v3-versus img { width: 72px; height: 72px; border-radius: 50%; border: 4px solid var(--v3-red-ink); }
.v3-rungs { display: flex; flex-wrap: wrap; gap: 4px; max-width: 640px; }
.v3-rungs .v3-spade.won path { fill: var(--v3-felt); }
.v3-rungs .v3-spade.next path { fill: var(--v3-red); }
.v3-rungs .v3-spade.open path { fill: none; stroke: #7d8a72; stroke-width: 1.6; stroke-dasharray: 2 1.4; }
.v3-tile-red .v3-minitable { height: 170px; }
.v3-members { display: flex; padding-block: 18px; }
.v3-members img { width: 72px; height: 72px; border-radius: 50%; border: 4px solid var(--v3-cream); }
.v3-members img + img { margin-left: -16px; }
.v3-tile-red .v3-minitable-felt { border-color: var(--v3-wood); }
.v3-join { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.v3-join input { background: var(--v3-cream); color: var(--v3-felt); border: 0; border-radius: 12px; padding: 14px 16px; font: 500 17px var(--v3-text); width: 180px; }
.v3-join button, .v3-btn-red { border: 0; border-radius: 12px; padding: 14px 20px; font: 600 16px var(--v3-text); cursor: pointer; text-decoration: none; }
.v3-join button { background: var(--v3-cream); color: var(--v3-felt); }
.v3-btn-red { background: var(--v3-red); color: var(--v3-red-ink) !important; }
.v3-or { color: var(--v3-muted); }
.v3-record { font-family: var(--v3-display); font-size: 28px; line-height: 1.1; }
.v3-record.down { color: #e9836f; }
.v3-record.none { font-size: 20px; color: var(--v3-muted); }
.v3-dim { color: var(--v3-muted); font-size: 14px; }
.v3 :focus-visible { outline: 3px solid #e3a23b; outline-offset: 3px; }
@media (max-width: 760px) {
  .v3 { padding: 20px 16px 48px; }
  .v3-doors, .v3-tiles, .v3-tiles-3 { grid-template-columns: minmax(0, 1fr); }
  .v3-door-study, .v3-door-play, .v3-door-quest { transform: none; }
  .v3-hero { gap: 20px; }
  .v3-bigspade { width: 180px; }
  .v3-peek { width: 72px; height: 72px; left: calc(50% + 40px); }
  .v3-chart span { font-size: 0; }
  .v3-head h1 { font-size: 36px; }
  .v3-tile-name { font-size: 26px; }
  .v3-ring { width: 104px; height: 104px; }
  .v3-ring span { width: 78px; height: 78px; font-size: 28px; }
}
@media (prefers-reduced-motion: reduce) { .v3-door, .v3-tile { transition: none; } }

/* Pre-flop ranges' overview (ranges-overview.js): the felt inside the trainer. */
.v3-embed { min-height: auto; margin-top: 4px; }
.v3-headline { display: flex; flex-direction: column; gap: 8px; }
.v3-headline h1 { font-size: 44px; }
.v3-headline p { margin: 0; color: var(--v3-cream-dim); font-size: 18px; }
.v3-areas { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.v3-area { display: flex; align-items: center; gap: 14px; padding: 16px 18px; border-radius: 16px; border: 0; cursor: pointer; text-align: left; font: inherit; background: var(--v3-felt-hi); color: var(--v3-cream); box-shadow: 0 6px 0 var(--v3-shadow); }
.v3-area.on { background: var(--v3-cream); color: var(--v3-felt); }
.v3-area-text { display: flex; flex-direction: column; gap: 2px; font-size: 13px; }
.v3-area-text b { font-size: 17px; }
.v3-ring-sm { width: 64px; height: 64px; }
.v3-ring-sm span { width: 48px; height: 48px; font-size: 18px; }
.v3-area:not(.on) .v3-ring { background: conic-gradient(var(--v3-cream) 0 var(--pct), #24402f var(--pct) 100%); }
.v3-area:not(.on) .v3-ring span { background: var(--v3-felt-hi); }
.v3-skillcard { background: var(--v3-cream); color: var(--v3-felt); border-radius: 18px; padding: 8px 26px 18px; box-shadow: 0 8px 0 var(--v3-shadow); }
.v3-skillcard-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; padding-block: 14px; border-bottom: 1px solid #d9caa3; font-size: 14px; color: #5d6b55; }
.v3-skillcard-head .v3-tile-name { font-size: 24px; color: var(--v3-felt); }
.v3-subsection { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 16px; align-items: center; padding-block: 14px; border-bottom: 1px solid #e5d8b6; }
.v3-subsection:last-child { border-bottom: 0; }
.v3-sub-name { font-weight: 600; font-size: 16px; }
.v3-skillrow, .v3-chiprow { display: flex; flex-wrap: wrap; gap: 8px 12px; }
.v3-skill { display: flex; flex-direction: column; align-items: center; gap: 2px; width: 62px; padding: 4px 0; border: 0; background: none; cursor: pointer; font: inherit; color: var(--v3-felt); border-radius: 10px; }
.v3-skill:hover { background: #e9dcb8; }
.v3-skill span { font-size: 11px; }
.v3-skill b { font-size: 12px; }
.v3-skill .v3-spade.won path { fill: var(--v3-felt); }
/* The track (#244): the next skill ringed in red, the button to practise it,
   and what comes later beside it. */
.v3-track { display: flex; gap: 22px; flex-wrap: wrap; align-items: stretch; }
.v3-track .v3-skillcard { flex: 999 1 520px; min-width: 0; display: flex; flex-direction: column; gap: 16px; }
.v3-trackrow { padding-top: 6px; justify-content: space-between; }
.v3-trackrow .v3-skill { width: 72px; padding: 8px 0; }
.v3-trackrow .v3-skill span { font-size: 13px; font-weight: 600; }
.v3-skill.next { background: #fffaf0; box-shadow: 0 0 0 3px var(--v3-red); }
.v3-track-go { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; font-size: 14px; color: #5d6b55; }
.v3-track-go .tr-start { margin: 0; padding: 14px 26px; font-size: 17px; border-radius: 14px; }
/* Custom range, under the track: every other option. */
.v3-track-custom { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 18px; font-size: 13px; color: #c8bfa8; }
/* A skill's own screen: Practice and Start test, stacked. */
.tr-skill-page { max-width: 560px; }
.tr-skill-main { display: flex; flex-direction: column; gap: 10px; }
.tr-skill-main .tr-start { margin: 0 0 8px; }
.v3-skill .v3-spade.open path { fill: none; stroke: #7d8a72; stroke-width: 1.4; stroke-dasharray: 2 1.4; }
.v3-chipbtn { border: 1px solid #c9b98f; background: #fffaf0; color: var(--v3-felt); border-radius: 999px; padding: 6px 12px; font: 600 13px var(--v3-text); cursor: pointer; }
.v3-chipbtn:hover { background: #fff; }
.tr-back { display: block; margin-bottom: 6px; font-size: 14px; }
@media (max-width: 760px) {
  .v3-areas { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .v3-subsection { grid-template-columns: minmax(0, 1fr); gap: 8px; }
  .v3-headline h1 { font-size: 34px; }
  .v3-area { padding: 12px; gap: 10px; }
  .v3-ring-sm { width: 46px; height: 46px; }
  .v3-ring-sm span { width: 34px; height: 34px; font-size: 14px; }
}

/* You (player-settings.js, V3 #225): you on a cream card, then At the table
   and Your data. */
.ps.cl-dialog { width: min(760px, calc(100vw - 32px)); max-height: calc(100vh - 48px); overflow: auto; display: flex; flex-direction: column; gap: 18px; }
.ps-title { font-family: var(--font-display); font-weight: 400; font-size: 30px; color: var(--fg-strong); }
.ps-top { background: #f3e7c9; color: #1d3a2c; border-radius: 18px; padding: 20px; display: flex; gap: 20px; align-items: center; flex-wrap: wrap; box-shadow: 0 6px 0 #0f2219; }
.ps-me { width: 92px; height: 92px; border-radius: 50%; flex: none; }
.ps-me.none { display: flex; align-items: center; justify-content: center; background: #1d3a2c; color: #f3e7c9; font: 400 38px var(--font-display); }
.ps-me-text { flex: 1 1 240px; min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.ps-name { display: flex; flex-direction: column; gap: 6px; font-weight: 600; font-size: 14px; }
.ps-name-row { display: flex; gap: 8px; flex-wrap: wrap; }
.ps-name .pl-text { background: #fffaf0; color: #1d3a2c; border: 1px solid #c9b98f; border-radius: 10px; padding: 9px 12px; font: 500 17px var(--font-ui); max-width: 260px; }
.ps-name .btn-small { background: #1d3a2c; color: #f3e7c9; border-color: #1d3a2c; }
.ps-change { align-self: flex-start; color: #b0391f !important; font-weight: 600; }
.ps-spades { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 0 10px; }
.ps-spades svg path { fill: #1d3a2c; }
.ps-spades b { font: 400 30px var(--font-display); }
.ps-spades span { font-size: 13px; color: #5d6b55; }
.ps-sections { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.ps-section { background: var(--bg-inset); border-radius: 16px; padding: 16px 18px; display: flex; flex-direction: column; min-width: 0; }
.ps-section-title { font-family: var(--font-display); font-size: 22px; color: var(--fg-strong); padding-bottom: 6px; }
.ps-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding-block: 10px; border-top: 1px solid var(--border); color: var(--fg); }
.ps-val { background: none; border: 0; padding: 4px 0; font: 600 15px var(--font-ui); color: var(--teal); cursor: pointer; }
.ps-val:hover { color: var(--teal-hover); }
.ps-val[disabled] { color: var(--fg-muted); cursor: default; }
.ps-opts { display: flex; gap: 4px; }
.ps-row .pl-pid { font-size: 13px; }
@media (max-width: 640px) { .ps-sections { grid-template-columns: minmax(0, 1fr); } .ps-me { width: 72px; height: 72px; } }

/* Private clubs (clubs.js, V3 #225): a card per club, then Join a club and
   Start a club side by side. */
.cl-clubs { display: flex; flex-direction: column; gap: 14px; margin-bottom: 22px; }
.cl-club { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; padding: 18px 22px; border-radius: 18px; background: #24472f; color: #f3e7c9; text-decoration: none; box-shadow: 0 6px 0 #0f2219; }
.cl-club:hover { color: #fff; filter: brightness(1.06); }
.cl-club.cream { background: #f3e7c9; color: #1d3a2c; }
.cl-club.cream:hover { color: #1d3a2c; }
.cl-club-text { flex: 1 1 220px; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.cl-club-name { font: 400 26px/1.1 var(--font-display); overflow-wrap: anywhere; }
.cl-club-who { font-size: 14px; color: #a9b8a6; }
.cl-club.cream .cl-club-who { color: #5d6b55; }
.cl-pill { border-radius: 999px; padding: 5px 12px; font-weight: 600; font-size: 13px; background: #1d3a2c; color: #f3e7c9; }
.cl-club:not(.cream) .cl-pill { background: #12261c; }
.cl-pill.hot, .cl-club:not(.cream) .cl-pill.hot { background: #c9472f; color: #fff4e8; }
.cl-club-quiet { font-size: 14px; color: #a9b8a6; }
.cl-club.cream .cl-club-quiet { color: #5d6b55; }
.cl-club-go { font-weight: 600; }
.cl-club-acts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; align-items: start; }
.cl-act-card { background: #12261c; border: 2px solid #f3e7c9; border-radius: 18px; padding: 20px; display: flex; flex-direction: column; gap: 10px; min-width: 0; color: #f3e7c9; }
.cl-act-title { font: 400 22px var(--font-display); }
.cl-act-desc { font-size: 15px; color: #c4b893; }
.cl-act-row { display: flex; gap: 8px; flex-wrap: wrap; }
.cl-act-row .pl-text { flex: 1 1 160px; min-width: 0; background: #f3e7c9; color: #1d3a2c; border: 0; border-radius: 10px; padding: 10px 12px; font: 500 15px var(--font-ui); }
.cl-act-row .pl-text::placeholder { color: #7d7a63; }
.cl-act-card .btn-small { background: #f3e7c9; color: #1d3a2c; border-color: #f3e7c9; padding: 9px 16px; font-size: 14px; }
.cl-act-card .tr-start { margin: 0; }
.cl-act-card .cl-restore { font-size: 13px; }
@media (max-width: 640px) { .cl-club-acts { grid-template-columns: minmax(0, 1fr); } .cl-club { padding: 16px; } .cl-club-name { font-size: 22px; } }

/* Club home for a member (clubs.js, V3 #225): the name and your chips, then
   tables beside You here. */
.cl-home-head { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin-bottom: 14px; }
.cl-home-name { margin: 0; font: 400 40px/1.05 var(--font-display); color: var(--fg-strong); overflow-wrap: anywhere; }
.cl-home-chips { margin-left: auto; background: #f3e7c9; color: #1d3a2c; border-radius: 999px; padding: 8px 14px; font-weight: 600; }
.cl-manage { margin-bottom: 18px; }
.cl-home { display: flex; flex-wrap: wrap; gap: 24px; align-items: flex-start; }
.cl-home h2 { margin: 0; font: 400 26px var(--font-display); color: var(--fg-strong); }
.cl-home-main { flex: 999 1 520px; min-width: 0; display: flex; flex-direction: column; gap: 14px; }
.cl-home-side { flex: 1 1 280px; min-width: 0; display: flex; flex-direction: column; gap: 12px; }
.cl-home-title { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.cl-tcards { gap: 12px; }
.cl-tables li.cl-tcard { gap: 14px; padding: 16px 18px; border-radius: 16px; background: #24472f; color: #f3e7c9; box-shadow: 0 6px 0 #0f2219; font-size: 14px; }
.cl-tables li.cl-tcard.cream { background: #f3e7c9; color: #1d3a2c; }
.cl-tcard-text { flex: 1 1 220px; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.cl-tcard-text .cl-name { font-size: 18px; }
.cl-tcard-meta { color: #a9b8a6; }
.cl-tcard.cream .cl-tcard-meta, .cl-tcard.cream .cl-why { color: #5d6b55; }
.cl-tcard .btn-small { padding: 9px 16px; font-size: 14px; border-radius: 10px; }
.cl-tcard .btn-small:not(.primary) { background: transparent; color: inherit; border-color: currentColor; }
.cl-side-card { background: #f3e7c9; color: #1d3a2c; border-radius: 16px; padding: 14px 18px; display: flex; flex-direction: column; gap: 10px; box-shadow: 0 6px 0 #0f2219; }
.cl-side-card .cl-next, .cl-side-note { margin: 0; font-size: 14px; }
.cl-side-card .cl-ask { display: flex; flex-wrap: wrap; gap: 6px; }
.cl-side-card .cl-ask .pl-text { flex: 1 1 100px; width: auto; background: #fffaf0; color: #1d3a2c; border: 1px solid #c9b98f; }
.cl-side-row { display: flex; justify-content: space-between; gap: 10px; padding: 10px 0 0; border: 0; border-top: 1px solid #d9caa3; background: none; color: inherit; font: 500 15px var(--font-ui); cursor: pointer; text-align: left; }
.cl-side-row.on, .cl-side-row:hover { color: #b0391f; }
.cl-forget { align-self: flex-start; font-size: 13px; }
.cl-side-ask { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; padding-bottom: 10px; border-bottom: 1px solid #d9caa3; font-size: 15px; }
.cl-side-btns { display: flex; gap: 6px; }
.cl-side-card .btn-small:not(.primary) { background: #fffaf0; color: #1d3a2c; border-color: #c9b98f; }
.cl-side-card .cl-side-row:first-child, .cl-side-ask + .cl-side-row { border-top: 0; padding-top: 0; }
.cl-home-main > .pl-actions { margin: 0; }
/* The lobby (club-lobby.js): who's online, and the chat. */
.cl-lobby .pl-meta { color: #5d6b55; }
.cl-lobby-who, .cl-lobby-log { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; font-size: 14px; }
.cl-lobby-who { gap: 4px; }
.cl-lobby-who li { display: flex; align-items: baseline; gap: 6px; min-width: 0; }
.cl-lobby-dot { width: 8px; height: 8px; border-radius: 50%; background: #2f8f4e; flex: none; align-self: center; }
.cl-lobby-at { margin-left: auto; white-space: nowrap; }
.cl-lobby-log { gap: 3px; max-height: 220px; overflow-y: auto; border-top: 1px solid #d9caa3; padding-top: 8px; overflow-wrap: anywhere; }
.cl-lobby-host { color: #b0391f; }
.cl-lobby-form { display: flex; gap: 6px; }
.cl-lobby-form .pl-text { flex: 1 1 auto; min-width: 0; width: auto; background: #fffaf0; color: #1d3a2c; border: 1px solid #c9b98f; }
.cl-tcard .cl-acts { margin-left: auto; display: flex; gap: 6px; }
.cl-home-head .cl-badge { align-self: center; }
@media (max-width: 640px) { .cl-home-name { font-size: 30px; } .cl-home-chips { margin-left: 0; } }

/* Equity (main.js, V3 #225): round game buttons, cream when picked, and Who's
   ahead beside the table (under it on a phone). */
.toolbar { max-width: 1180px; margin: 0 auto; box-sizing: border-box; }
.game-btn { border-radius: 999px; border: 0; background: #2c5a43; color: #f3e7c9; padding: 9px 16px; font-size: 14px; }
.game-btn:hover { color: #fff; filter: brightness(1.1); }
.game-btn.on { background: #f3e7c9; color: #1d3a2c; }
.game-group .card-count { margin-top: 2px; }
.eq-layout { display: flex; flex-wrap: wrap; gap: 20px; align-items: flex-start; justify-content: center; max-width: 1180px; margin: 0 auto; padding: 0 16px 24px; box-sizing: border-box; }
.eq-layout .table-wrap { flex: 999 1 560px; min-width: 0; margin: 4px 0 0; }
.eq-side { flex: 1 1 260px; max-width: 360px; background: #f3e7c9; color: #1d3a2c; border-radius: 20px; padding: 22px; display: flex; flex-direction: column; gap: 14px; box-shadow: 0 8px 0 #0f2219; margin-top: 24px; }
.eq-side-title { font: 400 24px var(--font-display); }
.eq-side-empty, .eq-side-hint { margin: 0; font-size: 14px; color: #5d6b55; }
.eq-bars { display: flex; flex-direction: column; gap: 8px; }
.eq-row { display: flex; justify-content: space-between; gap: 10px; font-size: 15px; }
.eq-row span { font-family: var(--font-data); font-weight: 600; }
.eq-c { font-weight: 700; }
.eq-c.s-s { color: #12261c; } .eq-c.s-h { color: #c8403a; } .eq-c.s-d { color: #2463c9; } .eq-c.s-c { color: #1f8a40; }
html:not(.four-color) .eq-c.s-d { color: #c8403a; } html:not(.four-color) .eq-c.s-c { color: #12261c; }
.eq-bar { height: 12px; background: #ddd0ac; border-radius: 99px; overflow: hidden; margin-bottom: 4px; }
.eq-bar > div { height: 100%; background: #1d3a2c; transition: width 0.3s; }
.eq-bar > div.lead { background: #c9472f; }
@media (max-width: 640px) { .eq-layout { padding: 0 12px 20px; } .eq-side { max-width: none; margin-top: 0; } .game-btn { padding: 8px 13px; font-size: 13px; } }

/* Start a game (play.js, V3 #225): one cream form, the invite panel beside it. */
.sg-wrap { display: flex; flex-wrap: wrap; gap: 24px; align-items: flex-start; }
.sg-form { flex: 1 1 420px; min-width: 0; background: #f3e7c9; color: #1d3a2c; border-radius: 20px; padding: 24px 26px; display: flex; flex-direction: column; gap: 18px; box-shadow: 0 8px 0 #0f2219; }
.sg-field { display: flex; flex-direction: column; gap: 8px; }
.sg-label { font-weight: 600; }
.sg-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.sg-chip { border: 1px solid #c9b98f; background: #fffaf0; color: #1d3a2c; border-radius: 999px; padding: 8px 16px; font: 600 14px var(--font-ui); cursor: pointer; }
.sg-chip.on { background: #1d3a2c; border-color: #1d3a2c; color: #f3e7c9; }
.sg-nums { display: flex; flex-wrap: wrap; gap: 14px; }
.sg-form .pf-num { color: #1d3a2c; font-weight: 600; display: flex; align-items: center; gap: 8px; }
.sg-form .pl-text { background: #fffaf0; color: #1d3a2c; border: 1px solid #c9b98f; border-radius: 10px; padding: 9px 12px; font: 500 16px var(--font-ui); }
.sg-form .pl-text[type=number] { width: 7em; }
.sg-form .pl-neterr { color: #9b2a1c; }
.sg-open { align-self: flex-start; padding: 14px 26px; font-size: 17px; border-radius: 14px; }
.sg-invite { flex: 1 1 300px; min-width: 0; background: var(--bg-inset); border: 2px solid var(--fg-strong); border-radius: 20px; padding: 22px; display: flex; flex-direction: column; gap: 12px; color: var(--fg-muted); }
.sg-invite-title { font-family: var(--font-display); font-size: 24px; color: var(--fg-strong); }
.sg-code { font-family: var(--font-display); font-size: 28px; letter-spacing: 0.08em; color: var(--fg-muted); background: var(--bg); border: 2px dashed var(--border); border-radius: 12px; padding: 12px 16px; text-align: center; }
.sg-note { font-size: 14px; }

/* Practice (trainer.js, V3 #225): score bar marked at 90, the spade, the
   question over the hand, and the last hand's line. */
.tr-v3 { max-width: 820px; gap: 22px; }
.tr-v3-head { display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap; }
.tr-v3-head .tr-back { margin: 0; font-weight: 600; }
.tr-v3-head h1 { font-family: var(--font-display); font-weight: 400; font-size: 32px; line-height: 1.05; color: var(--fg-strong); margin: 0; }
.tr-v3-score { display: flex; align-items: center; gap: 14px; position: relative; }
.tr-v3-bar { flex: 1; height: 14px; background: var(--bg-inset); border-radius: 99px; position: relative; }
.tr-v3-fill { height: 100%; background: var(--fg-strong); border-radius: 99px; transition: width .25s; }
.tr-v3-goal { position: absolute; top: -4px; bottom: -4px; width: 3px; background: var(--teal); border-radius: 2px; }
.tr-v3-num { font-family: var(--font-display); font-weight: 400; font-size: 28px; color: var(--fg-strong); min-width: 2ch; text-align: right; }
.tr-v3-delta { font-style: normal; font-weight: 700; font-size: 14px; position: absolute; right: 44px; top: -18px; animation: tr-pop .9s ease-out both; }
.tr-v3-delta.up { color: #7fd38f; }
.tr-v3-delta.down { color: var(--red); }
.tr-v3-spade path { fill: none; stroke: var(--fg-muted); stroke-width: 1.4; stroke-dasharray: 2 1.4; }
.tr-v3-spade.won path { fill: var(--fg-strong); stroke: none; }
.tr-v3 .tr-felt { background: var(--bg-inset); border: 0; border-radius: 22px; flex-direction: column; gap: 22px; padding: 34px 20px; }
.tr-v3-ask { font-size: 18px; color: var(--fg-muted); }
.tr-v3 .tr-actions .tr-btn { min-width: 170px; padding: 16px 24px; font-size: 19px; border-radius: 14px; }
.tr-v3 .tr-btn.no { background: var(--felt); border-color: var(--felt); color: var(--fg-strong); }
.tr-v3-last { background: #f3e7c9; color: #1d3a2c; border-radius: 16px; padding: 14px 18px; display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.tr-v3-last b { color: #1f7a3a; }
.tr-v3-foot { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; color: var(--fg-muted); font-size: 14px; }
@media (prefers-reduced-motion: reduce) { .tr-v3-fill { transition: none; } .tr-v3-delta { animation: none; } }

/* High Hand promotions (#278): members' panel and the manager's part. */
.cl-promos, .cl-promos-host { display: flex; flex-direction: column; gap: 10px; }
.cl-promo { border: 1px solid var(--border); border-radius: var(--radius); background: var(--bg-raised); padding: 12px 14px; display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.cl-promo-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.cl-promo-head b { color: var(--fg-strong); }
.cl-promo .pl-desc { margin: 0; }
.cl-promo-board { display: flex; flex-direction: column; gap: 2px; }
.cl-promo-board ol, .cl-promo-recent ul, .cl-promo-caps { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 3px; font-size: 14px; }
.cl-promo-recent ul { list-style: none; padding-left: 0; }
.cl-promo-cards { display: inline-flex; gap: 2px; vertical-align: middle; flex-wrap: wrap; }
.cl-promo-card { display: inline-block; min-width: 26px; padding: 1px 3px; border-radius: 4px; background: #fffaf0; color: #1d2a24; font: 600 12px/1.4 var(--font-ui); text-align: center; border: 1px solid #c9b98f; }
.cl-promo-card.red { color: #b0391f; }
.cl-promo-form { display: flex; flex-direction: column; gap: 8px; border: 1px solid var(--teal); border-radius: var(--radius); padding: 12px 14px; }
.cl-promo-form fieldset { border: 0; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 4px 12px; }
.cl-promo-form .pl-row { display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: center; }
.cl-promo-form .cl-num { width: 6em; }
.cl-promo-awards li { flex-wrap: wrap; }
@media (max-width: 640px) { .cl-promo-form .cl-num { width: 5em; } }
/* At a club table (#278): the promotions in a line above the felt, never
   over cards or seats; a prize or a new high hand takes the line for a moment. */
.pl-promo-line { align-self: center; max-width: 100%; padding: 4px 12px; border-radius: 999px; background: rgba(243, 231, 201, 0.12); color: var(--fg); font-size: 13px; text-align: center; overflow-wrap: anywhere; }
.pl-promo-line.celebrate { background: #f3e7c9; color: #1d3a2c; font-weight: 600; box-shadow: 0 0 0 2px #d9a441; animation: pl-promo-pop 0.6s ease-out; }
@keyframes pl-promo-pop { 0% { transform: scale(0.85); opacity: 0; } 60% { transform: scale(1.05); opacity: 1; } 100% { transform: scale(1); } }
@media (prefers-reduced-motion: reduce) { .pl-promo-line.celebrate { animation: none; } }
/* A quest table's bar: the room, clock and bankroll, with Top up and its choice of stacks. */
.qt-tablebar { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 4px 10px; }
.qt-tablebar .tr-btn { font-size: 12px; padding: 3px 10px; }
.qt-topup-next { display: inline-flex; align-items: center; gap: 8px; color: var(--fg-muted); }
/* The room's other games, from a quest table. */
.qt-roompanel { align-self: center; display: flex; flex-direction: column; gap: 6px; width: min(100%, 520px); padding: 10px 12px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--bg-raised); font-size: 13px; }
.qt-roompanel > .tr-btn { align-self: flex-end; font-size: 12px; padding: 3px 10px; }
.qt-roomgames { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.qt-roomgames li { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; }
.qt-roomgames .cc-btn { margin-left: auto; font-size: 12px; padding: 3px 10px; }
.qt-topup-choices { align-self: center; display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; max-width: 100%; }
.qt-topup-choices .tr-btn { font-size: 13px; padding: 5px 12px; }

/* Pre-flop charts (#charts, charts.js): a 13 × 13 grid of hands, each cell
   split into how often the hand folds, calls, raises and goes all-in. */
.charts { display: none; }
body.mode-charts .charts { display: block; }
body.mode-charts :is(.toolbar, .table-wrap, .eq-layout) { display: none; }
.pfc-wrap { max-width: 880px; margin: 0 auto; padding: 20px 16px; display: flex; flex-direction: column; gap: 12px; }
.pfc-head h1 { font-family: var(--font-display); font-size: 34px; font-weight: 400; line-height: 1.05; color: var(--fg-strong); }
.pfc-head p { font-size: 14px; color: var(--fg-muted); margin-top: 6px; max-width: 62ch; line-height: 1.45; }
.pfc-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.pfc-label { font-size: 12px; font-weight: 600; color: var(--fg-muted); min-width: 72px; }
.pfc-who { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 4px; max-width: 100%; flex: 1; min-width: 0; }
.pfc-person { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 6px; border: 1px solid var(--border); border-radius: var(--radius); background: transparent; color: var(--fg-muted); font: 600 11px var(--font-ui); cursor: pointer; flex: 0 0 76px; }
.pfc-person img { width: 40px; height: 40px; border-radius: 50%; background: var(--bg-inset); }
.pfc-person span { text-align: center; line-height: 1.2; }
.pfc-person.on { border-color: var(--teal); color: var(--fg-strong); background: var(--teal-faint); }
.pfc-title { font-size: 15px; color: var(--fg); }
.pfc-title b { color: var(--fg-strong); }
.pfc-legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 13px; color: var(--fg); }
.pfc-key { display: inline-flex; align-items: center; gap: 6px; }
.pfc-swatch { width: 12px; height: 12px; border-radius: 2px; display: inline-block; }
.pfc-note { font-size: 13px; color: var(--fg-muted); margin: 0; }
.pfc-grid { display: grid; grid-template-columns: repeat(13, minmax(0, 1fr)); gap: 2px; width: 100%; max-width: 640px; }
.pfc-cell { position: relative; aspect-ratio: 1; padding: 0; border: 0; border-radius: 3px; background: #3a4a42; overflow: hidden; cursor: pointer; }
.pfc-cell.none { background: repeating-linear-gradient(45deg, #2a3a32 0 4px, #33443b 4px 8px); }
.pfc-cell.on { outline: 2px solid var(--fg-strong); outline-offset: -2px; }
.pfc-bars, .pfc-part { position: absolute; top: 0; bottom: 0; }
.pfc-bars { left: 0; right: 0; }
.pfc-hand { position: absolute; inset: 0; display: grid; place-items: center; font: 600 clamp(7px, 1.7vw, 12px) var(--font-data); color: #fff; text-shadow: 0 1px 2px rgba(0,0,0,0.6); }
/* fold, call, raise, all-in */
:is(.pfc-part, .pfc-swatch).a0 { background: #3a4a42; }
:is(.pfc-part, .pfc-swatch).a1 { background: #2f8a55; }
:is(.pfc-part, .pfc-swatch).a2 { background: #c9472f; }
:is(.pfc-part, .pfc-swatch).a3 { background: #7d1d14; }
.pfc-swatch.a0 { box-shadow: inset 0 0 0 1px var(--border); }
.pfc-detail { font-size: 14px; color: var(--fg); }
.pfc-detail b { color: var(--fg-strong); margin-right: 6px; font-family: var(--font-data); }

/* Pre-flop ranges: Ducybot's ranges (#249, chart-trainer.js). Its track on
   the overview, and practising a spot: action buttons (fixed hands) or
   sliders (mixed strategies), and his mix shown as a bar in the charts' colours. */
.ct-intro, .ct-note { font-size: 13px; color: #4f6155; margin: 0 0 10px; max-width: 62ch; line-height: 1.45; }
.ct-note { margin: 10px 0 0; }
.ct-opts { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-bottom: 12px; }
.ct-track .cc-btn:not(.on) { color: #1d3a2c; border-color: #bcae8a; }
/* Heads-up or 6-max: the track's first choice, a big two-way switch. */
.ct-table { display: inline-flex; align-self: flex-start; padding: 4px; gap: 4px; background: #e4d6b2; border-radius: 999px; }
.v3-track .v3-track-custom { flex-basis: 100%; }
.ct-lesson .v3-trackrow { justify-content: flex-start; gap: 8px 18px; }
.ct-table-btn { border: 0; border-radius: 999px; padding: 8px 20px; background: transparent; color: #1d3a2c; font: 700 15px var(--font-ui); cursor: pointer; }
.ct-table-btn.on { background: #1d3a2c; color: #f3e7c9; }
/* Hold'em's lesson path (#249, the ranges workshop's layout C): the table
   switch, then the spots down a line, the next one with its Practice button;
   Settings closed at the bottom. */
.ct-path { display: flex; flex-direction: column; gap: 14px; max-width: 560px; }
.ct-path > .ct-table { background: #e4d6b2; }
.ct-path-lesson { margin: 10px 0 0; font: 600 12px var(--font-data); letter-spacing: .08em; text-transform: uppercase; color: var(--amber); }
.ct-path-lesson.soon { color: var(--fg-muted); }
.ct-path .ct-note { color: var(--fg-muted); margin: 0; }
.ct-steps { list-style: none; margin: 0; padding: 0 0 0 4px; display: flex; flex-direction: column; }
.ct-step { display: grid; grid-template-columns: 26px minmax(0, 1fr); gap: 14px; position: relative; padding-bottom: 16px; }
.ct-step::before { content: ''; position: absolute; left: 12px; top: 26px; bottom: 0; width: 2px; background: #3f6b55; }
.ct-step:last-child::before { display: none; }
.ct-step > i { width: 26px; height: 26px; border-radius: 50%; border: 2px solid var(--v3-cream-dim, #c4b893); background: var(--bg); display: grid; place-items: center; font: 700 13px var(--font-ui); font-style: normal; color: var(--bg); z-index: 1; }
.ct-step.done > i { background: var(--v3-cream, #f3e7c9); border-color: var(--v3-cream, #f3e7c9); }
.ct-step.now > i { background: var(--teal); border-color: var(--teal); box-shadow: 0 0 0 4px rgba(217, 87, 60, .25); }
.ct-step.started > i { border-color: var(--teal); }
.ct-step-body { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; min-width: 0; padding-top: 1px; }
.ct-step-name { background: none; border: 0; padding: 0; font: 600 17px var(--font-ui); color: var(--fg-strong); cursor: pointer; text-align: left; }
.ct-step-name:hover { text-decoration: underline; }
.ct-step-name:focus-visible { outline: 2px solid var(--amber); outline-offset: 2px; }
.ct-step.todo .ct-step-name { color: var(--fg); }
.ct-step-what { font-size: 13px; color: var(--fg-muted); }
.ct-go { margin-top: 8px; }
.ct-mixed { font-size: 13px; }
.ct-settings { margin-top: 18px; border-top: 1px solid #2f5341; padding-top: 10px; }
.ct-settings > summary { cursor: pointer; color: var(--fg-muted); font-size: 13px; font-weight: 600; width: max-content; }
.ct-settings-body { display: flex; flex-direction: column; gap: 10px; margin-top: 10px; }
.ct-set-row { display: flex; align-items: center; gap: 10px 14px; flex-wrap: wrap; }
.ct-set-row > span { font-size: 13px; color: var(--fg-muted); min-width: 84px; }
/* Practice at a table: the oval, its seats and the action before you. */
.ct-felt { display: flex; flex-direction: column; align-items: center; gap: 10px; background: var(--bg-inset); border-radius: 22px; padding: 16px 12px 22px; }
.ct-board { position: relative; width: 100%; max-width: 440px; aspect-ratio: 1 / 0.82; }
.ct-board.hu { aspect-ratio: 1 / 0.7; }
.ct-oval { position: absolute; inset: 16% 13% 18%; border-radius: 48% / 42%; background: radial-gradient(circle at 50% 40%, #2f6a4d, #1f4a36 70%); border: 8px solid #5a3624; box-shadow: inset 0 0 0 2px #7a4c33; }
.ct-pot { position: absolute; left: 50%; top: 44%; transform: translate(-50%, -50%); font: 600 12px var(--font-data); color: #f3e7c9; background: rgba(0,0,0,.28); padding: 3px 10px; border-radius: 999px; white-space: nowrap; }
.ct-seat { position: absolute; transform: translate(-50%, -50%); display: flex; flex-direction: column; align-items: center; gap: 3px; text-align: center; }
.ct-plate { background: #f3e7c9; color: #1d3a2c; border-radius: 10px; padding: 3px 9px; font: 700 12px var(--font-ui); white-space: nowrap; box-shadow: 0 2px 0 #0f2219; }
.ct-seat.hero .ct-plate { background: var(--amber); }
.ct-seat.waiting .ct-plate { background: #c4b893; }
.ct-seat.fold { opacity: .45; }
.ct-act { font: 600 11px var(--font-data); border-radius: 999px; padding: 1px 8px; color: #fff; white-space: nowrap; }
.ct-act.fold { background: #3a4a42; color: #c4b893; }
.ct-act.raise { background: #c9472f; }
.ct-act.call { background: #2f8a55; }
.ct-act.blind, .ct-act.hero { background: #6b5a2d; }
.ct-button { position: absolute; transform: translate(-50%, -50%); width: 20px; height: 20px; border-radius: 50%; background: #fff; color: #111; font: 700 11px/20px var(--font-ui); text-align: center; box-shadow: 0 1px 2px rgba(0,0,0,.5); }
.ct-cards { gap: 4px; }
.ct-cards .tr-card { width: 44px; height: 62px; font-size: 20px; }
.ct-story { margin: 0; font: 500 13px var(--font-data); color: var(--fg-muted); text-align: center; }
@media (max-width: 520px) {
  .ct-plate { font-size: 11px; padding: 2px 6px; }
  .ct-cards .tr-card { width: 36px; height: 50px; font-size: 17px; }
}
/* Lessons in order, each a row of spots. */
.ct-lesson { border-top: 1px solid #ddcfa9; padding-top: 12px; }
.ct-lesson-head { display: flex; align-items: baseline; gap: 10px; color: #1d3a2c; font-size: 14px; margin-bottom: 6px; }
.ct-done { color: #1f7a3a; font-weight: 700; font-size: 13px; }
.ct-lesson.soon .ct-lesson-head b { color: #7a8a7f; }
.ct-track .v3-skill span { white-space: normal; text-align: center; line-height: 1.2; }
.ct-sub { color: var(--fg-muted); font-size: 14px; }
.ct-actions .tr-btn { min-width: 0; flex: 1 1 140px; max-width: 220px; }
.ct-play .tr-btn.ct-a3 { background: #7d1d14; border-color: #7d1d14; }
.ct-play .tr-btn.ct-a1 { background: #2f8a55; border-color: #2f8a55; }
.ct-feedback { display: flex; flex-direction: column; gap: 8px; text-align: left; }
.ct-feedback p { margin: 0; }
.ct-feedback.good { background: rgba(47,138,85,0.16); }
.ct-feedback.good strong { color: #2f8a55; }
.ct-mixrow { display: flex; align-items: center; gap: 10px; }
.ct-mixlabel { font-size: 12px; font-weight: 600; color: var(--fg-muted); min-width: 64px; }
.ct-mix { flex: 1; display: flex; height: 16px; border-radius: 4px; overflow: hidden; background: var(--bg-inset); }
.ct-mix .pfc-part { position: static; height: 100%; }
.ct-words { font-size: 14px; color: var(--fg); }
.ct-sliders { display: flex; flex-direction: column; gap: 10px; background: var(--bg-raised); border: 1px solid var(--border); border-radius: 14px; padding: 14px 16px; }
.ct-slider { display: grid; grid-template-columns: 170px 1fr 3.5em; align-items: center; gap: 12px; }
.ct-verb { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; color: var(--fg-strong); }
.ct-slider input[type=range] { width: 100%; accent-color: var(--teal); }
.ct-share { font-family: var(--font-data); text-align: right; color: var(--fg-strong); }
.ct-quick { display: flex; flex-wrap: wrap; gap: 6px; }
.ct-grid { max-width: 520px; }
.ct-grid .pfc-cell { cursor: default; }
.ct-grid .pfc-cell.ct-missed::after { content: ''; position: absolute; inset: 0; border: 2px solid #f0c24a; border-radius: 3px; z-index: 2; }
.pfc-swatch.ct-missed-key { background: transparent; box-shadow: inset 0 0 0 2px #f0c24a; }
@media (max-width: 520px) {
  .ct-slider { grid-template-columns: 1fr 3em; }
  .ct-slider input[type=range] { grid-column: 1 / -1; grid-row: 2; }
}

/* The club manager (manage.html, manage.js): running a club, a page apart
   from the player app. Its badge in the top bar, and the clubs part shown on
   its own. On the player app, the cards that send you there. */
.mg-badge { margin-left: 10px; padding: 2px 10px; border-radius: 999px; background: var(--teal); color: #fff; font: 600 12px var(--font-ui); letter-spacing: 0.02em; }
body.mode-manage .mg-main { display: block; }
body.mode-manage .mg-main .cl-wrap { max-width: 1100px; margin: 0 auto; }
.cl-elsewhere { display: flex; flex-direction: column; gap: 10px; align-items: flex-start; }

/* Bankroll quest's lobby (#303, quest-ui.js): cream cards on the felt. */
body.pl-seated .psec[data-tab="quest"] .clubs { display: none; }
.qt-head { display: grid; grid-template-columns: auto auto minmax(0, 1fr); gap: 16px 24px; align-items: end; background: #f3e7c9; color: #1d3a2c; border-radius: 12px; padding: 16px 18px; box-shadow: 0 3px 0 #0f2219; }
.qt-stat { display: flex; flex-direction: column; gap: 2px; }
.qt-label { font-size: 12px; font-weight: 600; color: #5a6b5f; }
.qt-big { font-family: var(--font-display); font-size: 30px; font-weight: 400; line-height: 1; }
.qt-goal { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.qt-bar { display: block; height: 10px; border-radius: 999px; background: #d9cba6; overflow: hidden; }
.qt-bar span { display: block; height: 100%; background: #c9472f; border-radius: 999px; min-width: 4px; }
.qt-meta { font-size: 12px; color: var(--fg-muted); }
.qt-head .qt-meta { color: #5a6b5f; }
.qt-room h2, .qt-rooms h2, .qt-runs h2 { font-family: var(--font-display); font-weight: 400; font-size: 22px; color: var(--fg-strong); margin: 18px 0 2px; }
.qt-tables { list-style: none; padding: 0; margin: 10px 0 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; }
.qt-table { background: var(--bg-raised); border: 1px solid var(--border); border-radius: 10px; padding: 12px; display: flex; flex-direction: column; gap: 8px; }
.qt-table.qt-off { opacity: 0.55; }
.qt-top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.qt-stakes { font-family: var(--font-display); font-size: 22px; color: var(--fg-strong); }
.qt-faces { display: flex; margin-left: auto; }
.qt-faces img { width: 26px; height: 26px; border-radius: 50%; background: var(--bg-inset); border: 2px solid var(--bg-raised); margin-left: -6px; }
.qt-note { font-size: 13px; color: var(--fg); margin: 0; }
.qt-open-btn { align-self: flex-start; font-family: var(--font-ui); font-size: 12px; padding: 5px 12px; }
/* An open table: who's there with their chips, and your buy-in. */
.qt-open-bg { position: fixed; inset: 0; background: rgba(0,0,0,0.45); z-index: 50; }
.qt-open { position: fixed; z-index: 51; left: 50%; top: 50%; transform: translate(-50%, -50%); width: min(460px, calc(100vw - 32px)); max-height: calc(100vh - 32px); overflow: auto; background: #f3e7c9; color: #1d3a2c; border-radius: 12px; padding: 18px; display: flex; flex-direction: column; gap: 14px; box-shadow: 0 10px 40px rgba(0,0,0,0.35); }
.qt-open .qt-meta, .qt-open .qt-label { color: #5a6b5f; }
.qt-open .qt-stakes { color: #1d3a2c; }
.qt-open-head { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.qt-seats { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 6px; }
.qt-seats li { display: flex; align-items: center; gap: 10px; background: rgba(29,58,44,0.07); border-radius: 8px; padding: 6px 10px; }
.qt-seats img, .qt-noface { width: 30px; height: 30px; border-radius: 50%; background: #d9cba6; flex-shrink: 0; }
.qt-seat-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.qt-seat-chips { font-family: var(--font-data, inherit); font-variant-numeric: tabular-nums; font-weight: 600; }
.qt-buyin { display: flex; flex-direction: column; gap: 6px; }
.qt-buyin .qt-label { font-size: 14px; font-weight: 600; color: #1d3a2c; }
.qt-buyin-row { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.qt-dollar { font-size: 18px; font-weight: 600; }
.qt-buyin-row input { width: 8.5em; font-size: 16px; }
.qt-buyin-row .cc-btn { font-family: var(--font-ui); font-size: 12px; padding: 5px 10px; }
.qt-open-acts { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.qt-open .cc-btn { color: #1d3a2c; border-color: rgba(29,58,44,0.35); background: transparent; font-family: var(--font-ui); }
.qt-open .cc-btn:hover { background: rgba(29,58,44,0.08); }
.qt-open-acts .cc-btn { font-size: 14px; padding: 8px 14px; }
.qt-rooms ul, .qt-runs ul { list-style: none; padding: 0; margin: 8px 0 0; display: flex; flex-direction: column; gap: 8px; }
.qt-other { display: flex; align-items: center; gap: 10px; justify-content: space-between; background: var(--bg-inset); border-radius: 8px; padding: 10px 12px; }
.qt-other-name { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.qt-other-name b { color: var(--fg-strong); }
.qt-other .cc-btn { font-family: var(--font-ui); font-size: 12px; padding: 5px 10px; flex-shrink: 0; }
.qt-runs li { font-size: 13px; color: var(--fg); }
.qt-end { background: #f3e7c9; color: #1d3a2c; border-radius: 12px; padding: 18px; margin-top: 14px; }
.qt-end h2 { font-family: var(--font-display); font-weight: 400; font-size: 28px; margin: 0 0 6px; }
@media (max-width: 600px) {
  .qt-head { grid-template-columns: 1fr 1fr; }
  .qt-goal { grid-column: 1 / -1; }
  .qt-other { flex-direction: column; align-items: flex-start; }
}

/* Bankroll challenge: where to start, the trip, the games and their
   waitlists, a seat ready, and study while you travel or wait (quest-ui.js). */
.qw-regions, .qw-games { list-style: none; padding: 0; margin: 10px 0 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 10px; }
.qw-region, .qw-game { background: var(--bg-raised); border: 1px solid var(--border); border-radius: 10px; padding: 12px; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.qw-region .tr-start { align-self: flex-start; }
.qw-game.qt-off { opacity: 0.55; }
.qw-you { margin: 0; font-size: 13px; font-weight: 600; color: var(--amber); }
.qw-you b, .qw-called b[data-qcount], .qw-left b { font-variant-numeric: tabular-nums; }
.qw-called { margin-top: 12px; background: #f3e7c9; color: #1d3a2c; border-radius: 12px; padding: 14px 16px; display: flex; flex-direction: column; gap: 8px; box-shadow: 0 3px 0 #0f2219; }
.qw-called .qt-meta { color: #5a6b5f; }
/* Home (#299): the room you're in, when it's in your home town, says so. */
.qw-at-home { box-shadow: inset 4px 0 0 var(--amber); padding-left: 14px; }
.qw-home-badge { display: inline-block; margin-bottom: 6px; padding: 3px 10px; border-radius: 999px; background: var(--amber); color: #1d3a2c; font: 700 12px var(--font-ui); letter-spacing: .06em; text-transform: uppercase; }
.qw-gohome { margin: 6px 0 4px; }
.qw-called .cc-btn { color: #1d3a2c; border-color: rgba(29,58,44,0.35); background: transparent; }
.qw-region-name { font: 600 12px var(--font-ui); letter-spacing: 0.06em; text-transform: uppercase; color: var(--fg-muted); margin: 14px 0 0; }
.qw-trip { margin-top: 14px; background: #f3e7c9; color: #1d3a2c; border-radius: 12px; padding: 18px; display: flex; flex-direction: column; gap: 6px; box-shadow: 0 3px 0 #0f2219; }
.qw-trip h2 { font-family: var(--font-display); font-weight: 400; font-size: 28px; margin: 0; }
.qw-trip .qt-meta { color: #5a6b5f; margin: 0; }
/* Rest and home (#351): a quiet card, amber when played out. */
.qw-rest { margin-top: 14px; background: var(--bg-raised); border: 1px solid var(--border); border-radius: 10px; padding: 12px 14px; display: flex; flex-direction: column; gap: 8px; }
.qw-rest h3 { margin: 0; font-size: 15px; color: var(--fg-strong); }
.qw-rest .qt-meta { margin: 0; }
.qw-rest .cc-btn { font-family: var(--font-ui); font-size: 12px; padding: 5px 10px; align-self: flex-start; }
.qw-rest-tired { border-color: var(--amber); }
.qw-rest-tired h3, .qw-tired { color: var(--amber); }
.qw-road { position: relative; height: 34px; margin: 10px 14px 4px; border-bottom: 3px dashed rgba(29,58,44,0.35); }
.qw-car { position: absolute; bottom: 2px; width: 28px; height: 14px; margin-left: -14px; border-radius: 6px 9px 3px 3px; background: #c9472f; transition: left 1s linear; }
.qw-car::before, .qw-car::after { content: ''; position: absolute; bottom: -5px; width: 8px; height: 8px; border-radius: 50%; background: #1d3a2c; }
.qw-car::before { left: 3px; }
.qw-car::after { right: 3px; }
.qw-car.qw-plane { bottom: 14px; height: 8px; border-radius: 4px 10px 10px 4px; background: #1d3a2c; }
.qw-car.qw-plane::before { left: 9px; bottom: -6px; width: 6px; height: 14px; border-radius: 2px; background: #1d3a2c; }
.qw-car.qw-plane::after { display: none; }
@media (prefers-reduced-motion: reduce) { .qw-car { transition: none; } }
.qw-left { margin: 0; font-size: 15px; }
.qw-study { margin-top: 14px; background: var(--bg-raised); border: 1px solid var(--border); border-radius: 10px; padding: 14px 16px; display: flex; flex-direction: column; gap: 8px; }
.qw-study h2 { font-family: var(--font-display); font-weight: 400; font-size: 20px; color: var(--fg-strong); margin: 0; }
.qw-q { margin: 0; color: var(--fg-strong); max-width: 62ch; }
.qw-choices { display: flex; flex-wrap: wrap; gap: 6px; }
.qw-choices .cc-btn { font-family: var(--font-ui); font-size: 14px; padding: 6px 14px; }
.qw-right, .qw-wrong { margin: 0; font-size: 13px; padding: 6px 10px; border-radius: 8px; max-width: 62ch; }
.qw-right { background: var(--green-faint, rgba(60,140,90,0.15)); color: var(--fg-strong); }
.qw-wrong { background: var(--amber-faint); color: var(--fg-strong); }

/* Bankroll challenge: the run's stats (quest-stats.js), the session's reads
   and the read menu at a table (quest-reads.js, #304, #306). */
.qt-stats h2, .qt-review h2 { font-family: var(--font-display); font-weight: 400; font-size: 22px; color: var(--fg-strong); margin: 18px 0 8px; }
.qs-box { background: var(--bg-inset); border-radius: 10px; padding: 10px 12px; }
.qs-chart { display: block; max-width: 100%; height: auto; }
.qs-line { stroke: var(--amber); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.qs-area { fill: var(--amber-faint); }
.qs-dot { fill: var(--amber); }
.qs-grid { stroke: var(--border); stroke-width: 1; }
.qs-label { fill: var(--fg-muted); font: 11px var(--font-data); }
.qs-scroll { overflow-x: auto; margin-top: 10px; }
.qs-table { border-collapse: collapse; font-size: 13px; font-variant-numeric: tabular-nums; min-width: 100%; }
.qs-table th, .qs-table td { text-align: right; padding: 5px 10px; border-bottom: 1px solid var(--border); white-space: nowrap; }
.qs-table th:first-child, .qs-table td:first-child { text-align: left; }
.qs-table th { color: var(--fg-muted); font-weight: 600; font-size: 12px; }
.qt-stats .qt-meta { margin: 8px 0 0; }
.qt-review ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 6px; }
.qt-review li { font-size: 14px; color: var(--fg); padding-left: 14px; position: relative; }
.qt-review li::before { content: ''; position: absolute; left: 0; top: 0.5em; width: 6px; height: 6px; border-radius: 50%; background: var(--fg-muted); }
.qt-review li.qr-right::before { background: var(--green); }
.qt-review li.qr-wrong::before { background: var(--red); }
/* A backer's test (#356): one hand at a time on a cream card; then the result. */
.qb-test { background: #f3e7c9; color: #1d3a2c; border-radius: 14px; padding: 18px; display: flex; flex-direction: column; gap: 10px; box-shadow: 0 4px 0 #0f2219; margin: 14px 0; }
.qb-test h2 { font-family: var(--font-display); font-weight: 400; font-size: 24px; margin: 0; color: #1d3a2c; }
.qb-test .qt-label, .qb-test .qt-meta { color: #5a6b5f; }
.qb-ask { margin: 0; font-size: 16px; }
.qb-cards { display: flex; gap: 8px; }
.qb-card { width: 54px; height: 76px; border-radius: 8px; background: #fffaf0; border: 1px solid #c9b98f; display: grid; place-items: center; font: 700 22px var(--font-ui); color: #1d2a24; }
.qb-card.r { color: #b0391f; }
.qb-test .cc-btn { color: #1d3a2c; border-color: #bcae8a; }
.qb-test .qt-open-acts { flex-wrap: wrap; }
.qb-result { border-radius: 12px; padding: 14px 16px; margin: 14px 0; background: rgba(243, 231, 201, 0.06); border-left: 4px solid var(--fg-muted); display: flex; flex-direction: column; gap: 8px; }
.qb-result.qr-right { border-left-color: var(--green); }
.qb-result.qr-wrong { border-left-color: var(--red); }
.qb-result h2 { font-family: var(--font-display); font-weight: 400; font-size: 22px; color: var(--fg-strong); margin: 0; }
.qb-result ul { margin: 0; padding-left: 18px; font-size: 14px; display: flex; flex-direction: column; gap: 4px; }
.qb-result .cc-btn { align-self: flex-start; }
.qb-backed { font-size: 14px; color: var(--fg); background: rgba(232, 176, 74, 0.12); border-radius: 10px; padding: 10px 14px; }
/* The inbox (#355): offers to answer on cream cards, news below. */
.qs-inbox h2 { font-family: var(--font-display); font-weight: 400; font-size: 22px; color: var(--fg-strong); margin: 18px 0 8px; display: flex; align-items: center; gap: 10px; }
.qs-new { font: 700 12px var(--font-ui); background: var(--amber); color: #1d2a24; border-radius: 999px; padding: 2px 9px; }
.qs-inbox ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; }
.qs-inbox li { font-size: 14px; color: var(--fg); padding: 8px 12px; border-left: 3px solid transparent; }
.qs-inbox li p { margin: 0 0 4px; }
.qs-inbox li.qs-unread { border-left-color: var(--amber); background: rgba(243, 231, 201, 0.06); }
.qs-inbox li.qs-offer { background: #f3e7c9; color: #1d3a2c; border-radius: 12px; padding: 14px 16px; box-shadow: 0 3px 0 #0f2219; }
.qs-offer p { font-size: 15px; }
.qs-offer .qt-meta { color: #5a6b5f; }
.qs-offer .cc-btn { color: #1d3a2c; border-color: #bcae8a; }
.qs-offer .qt-open-acts { flex-wrap: wrap; margin: 8px 0 6px; }
.qr-chip { display: block; font: 600 10px var(--font-ui); letter-spacing: 0.03em; color: var(--amber); }
.qr-hint { margin: 6px 0 0; }
.qr-milestone { margin: 8px 0 0; padding: 8px 12px; border-radius: 8px; background: var(--amber-faint); color: var(--fg-strong); font-weight: 600; }
.qr-menu { margin-top: 8px; background: var(--bg-raised); border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px; display: flex; flex-direction: column; gap: 6px; }
.qr-menu b { color: var(--fg-strong); }
.qr-tags { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.qr-tags .cc-btn { font-family: var(--font-ui); font-size: 12px; padding: 5px 10px; }
.qr-tags .cc-btn.on { outline: 2px solid var(--amber); }
