/* V3 (#225): the whole site is the "Felt Room": felt green, cream and gold
   (#726, the Card room table's gold), in every theme. --teal is kept as the
   accent's name (it's used all over); it's gold now, and what sits on it is
   --on-accent, dark. --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: #c9a45c;
  --teal-hover: #dcbb76;
  --teal-faint: rgba(201,164,92,0.18);
  --on-accent: #1d1712;
  --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 { background: #1d3a2c; }
body.booting > * { visibility: hidden; animation: boot-reveal 0s 6s forwards; }
@keyframes boot-reveal { to { visibility: visible; } }
/* The update screen (browser-check.js, #442), on browsers too old for the
   site: nothing else on the page shows. */
html.browser-old body > :not(.browser-update) { display: none !important; }
.browser-update { max-width: 440px; margin: 20vh auto 0; padding: 0 16px; text-align: center; }
.browser-update h1 { font-family: var(--font-display); font-size: 28px; font-weight: 400; line-height: 1.15; color: var(--fg-strong); margin-bottom: 14px; }
.browser-update p { color: var(--fg-muted); line-height: 1.45; }

.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 play money 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; }
/* The link to the privacy policy (#554): under every page but a table in play.
   The landing page fills the screen, so there it sits in the page's own margin. */
.site-foot { padding: 14px 20px; font-size: 12px; text-align: center; }
.site-foot a { color: var(--fg-muted); }
body.mode-v3 .site-foot { position: relative; margin-top: -46px; }
body.pl-seated .site-foot { display: none; }
/* The privacy policy (privacy.html). */
.legal { max-width: 720px; margin: 0 auto; padding: 32px 20px 64px; line-height: 1.55; }
.legal h1 { font-family: var(--font-display); font-size: 32px; font-weight: 400; line-height: 1.15; color: var(--fg-strong); }
.legal h2 { margin: 32px 0 10px; font-size: 18px; font-weight: 600; color: var(--fg-strong); }
.legal p + p { margin-top: 10px; }
.legal-date { margin-top: 6px; font-size: 13px; color: var(--fg-muted); }
.legal-table { margin-bottom: 14px; }
.legal table { width: 100%; border-collapse: collapse; font-size: 14px; overflow-wrap: anywhere; }
.legal :is(th, td) { padding: 8px 12px 8px 0; border-bottom: 1px solid var(--border); text-align: left; vertical-align: top; }
.legal th { font-weight: 600; color: var(--fg-strong); }
.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: var(--on-accent); }
.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: var(--on-accent); }
.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: var(--on-accent); }
.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: var(--on-accent); }
.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: var(--on-accent); }
/* 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; -webkit-user-select: none; user-select: none;
}
.rgrid .rc.on { background: var(--teal); color: var(--on-accent); }
.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; -webkit-user-select: none; 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: var(--on-accent); }
.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); }

@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: var(--on-accent); }
.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; }
/* At a table, the Play tab is the table. */
body.pl-seated .psec[data-tab="play"] .clubs { display: none; }
/* 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): the 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; }
.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: var(--on-accent); }
.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: var(--on-accent); }
.tf-opt:has(input:focus-visible) { outline: 2px solid var(--teal); outline-offset: 2px; }
.tf-other { display: none !important; }
.tf:has([name=seatsPick][value=other]:checked) .tf-other-seats { display: inline-block !important; }
/* Other blinds: the small and big blind typed (#655). */
.tf:has([name=blinds][value=other]:checked) .tf-other-blinds { display: inline-flex !important; align-items: center; gap: 4px; }
.tf .tf-other-blinds .pl-text { width: 5.5em; }
/* Other's list beside the buttons (#476). */
.tf .pl-opts select.tf-other { width: auto; min-width: 7em; }
/* Mixed (#69): the games, shown once Mixed is picked; a picked game's hands
   box beside it. */
.tf .tf-mixed { display: none; }
.tf:has([name=game][value=mixed]:checked) .tf-mixed { display: flex; }
.tf .tf-hands { display: inline-flex; align-items: center; gap: 4px; }
.tf .tf-hands .pl-text { width: 3.5em; text-align: center; }
/* Amounts are typed, never stepped: no up/down arrows on number boxes. */
input[type=number] { -moz-appearance: textfield; appearance: textfield; }
input[type=number]::-webkit-inner-spin-button, input[type=number]::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.tf-more summary, .cl-card details.tf-more summary { cursor: pointer; font-size: 13px; color: var(--fg-muted); }
/* Every field fits its cell, however long its label (#476). */
.tf-fields { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(150px, 100%), 1fr)); gap: 8px 12px; padding-top: 8px; }
.tf-fields label { display: flex; flex-direction: column; gap: 4px; min-width: 0; font-size: 12px; font-weight: 600; color: var(--fg); }
.tf-fields .pl-text { width: 100%; min-width: 0; max-width: 100%; box-sizing: border-box; }
/* Rake or time (#449): only the house's pick shows its settings. */
.tf-fields label[hidden] { display: none; }
.tf-fields label.tf-check { flex-direction: row; align-items: center; align-self: end; min-height: 32px; }
.cl-rake-table td { text-align: right; }
/* Players (#661): the table scrolls sideways on a phone, the names staying. */
.pp-tools { align-items: center; margin-bottom: 10px; }
.pp-periods { display: flex; gap: 6px; flex-wrap: wrap; }
.pp-wrap { overflow-x: auto; max-width: 100%; }
.pp-table { width: 100%; white-space: nowrap; }
.pp-table th:first-child { position: sticky; left: 0; background: var(--bg, #fff); z-index: 1; }
.pp-table td.pp-text { font-family: inherit; }
.pp-sort { background: none; border: 0; padding: 0; font: inherit; color: inherit; cursor: pointer; }
.pp-sort.on { color: var(--fg-strong); font-weight: 600; }
.pp-agent { margin-top: 12px; }
.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%; }
/* A hand's seat and location flags, the owner's (#581). */
.cl-handflags { color: var(--amber); font-size: 12px; }
.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-replay-hands { display: flex; gap: 8px; align-items: center; justify-content: space-between; }
.cl-replay-tools { display: flex; flex-wrap: wrap; gap: 6px; }
.cl-replay-tools a.btn-small { text-decoration: none; display: inline-flex; align-items: center; }
.cl-replay-copytext { width: 100%; box-sizing: border-box; font-family: var(--font-data); font-size: 12px; resize: vertical; }
.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; }
/* An agent's account and players (#428). */
.cl-agent-stats { margin: 4px 0; }
.cl-agent-stats .mg-stat-val { font-size: 22px; }
.cl-at { font-size: 12px; color: var(--teal); font-weight: 600; }
.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); }
/* Asking to join after being removed (#488). */
.cl-flag { font-size: 12px; font-weight: 600; color: var(--red); white-space: nowrap; }
.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): each stack an SVG cylinder, placed in a box (.ch-box)
   back ones first; the amount (.ch-amt) over the chips. */
.ch-defs { position: absolute; width: 0; height: 0; }
.ch-box { position: relative; display: block; flex: none; pointer-events: none; }
.ch-stack { position: absolute; display: block; overflow: visible; filter: drop-shadow(0 2px 1.5px rgba(0,0,0,0.5)); }
.ch-amt { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); z-index: 1; white-space: nowrap;
  font-family: var(--font-data); font-size: 13px; font-weight: 700; color: #fffdf7; background: rgba(0,0,0,0.6); padding: 1px 9px; border-radius: 999px; }
.ch-box:not([style]) > .ch-amt { position: static; transform: none; }
.ch-heap .ch-amt { font-size: 15px; padding: 2px 10px; }
/* A few chips: the amount above them, so it doesn't hide them. */
.ch-small > .ch-amt { top: auto; bottom: 100%; transform: translate(-50%, -3px); }
/* Room for that amount under the board. */
.ch-heap.ch-small { margin-top: 20px; }
/* A seat's chips: on the felt beside it, the box's bottom at the point. */
.pl-pile { position: absolute; left: var(--kx); top: var(--ky); transform: translate(-50%, -100%); z-index: 1; pointer-events: none; }
.pl-pile.folded { opacity: 0.75; }
.pl-plate { position: relative; }
.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); }
/* A club seat's flags from the relay (#581), on the avatar's top corners:
   a group's letter in its colour on the left (players near each other or
   on one network), a flag on the right (red: location not shared, a VPN,
   a location that may be faked; grey: a private relay). Each colour has a
   letter too, and reads at least 3:1 against the felt and the page. Tapped
   or hovered, .pl-fpop says what they mean. --avh: half the avatar. */
.pl-seat { --avh: 28px; }
.pl-mark {
  position: absolute; top: -3px; z-index: 3; width: 18px; height: 18px; padding: 0; border-radius: 50%;
  display: flex; align-items: center; justify-content: center; border: 2px solid #12261c; cursor: pointer;
  font: 700 10px/1 var(--font-ui); color: #12261c; box-shadow: 0 1px 3px rgba(0,0,0,0.4);
}
.pl-mark.l { left: calc(50% - var(--avh) - 5px); }
.pl-mark.r { left: calc(50% + var(--avh) - 13px); }
.pl-mark.g0 { background: #5aa9ff; }
.pl-mark.g1 { background: #f5c542; }
.pl-mark.g2 { background: #c58cff; }
.pl-mark.g3 { background: #ff9ac1; }
.pl-mark.g4 { background: #5fe0e6; }
.pl-mark.g5 { background: #f0f0f0; }
.pl-mark.red { background: #fff; color: #d62f2f; }
.pl-mark.grey { background: #9aa59f; color: #2a332e; }
/* The seat whose words are open sits above bets and the seats near it. */
.pl-seat:has(.pl-fpop) { z-index: 20; }
.pl-fpop {
  position: absolute; top: 18px; left: 50%; transform: translateX(-50%); z-index: 6; min-width: 120px; max-width: 170px;
  background: #12261c; color: var(--fg-strong); border: 1px solid var(--border); border-radius: 6px; padding: 5px 8px;
  font-size: 11px; line-height: 1.35; text-align: left; box-shadow: 0 3px 10px rgba(0,0,0,0.45);
}
@media (max-width: 640px) {
  .pl-seat { --avh: 20px; }
  .pl-mark { width: 15px; height: 15px; font-size: 8px; border-width: 1.5px; }
  .pl-mark.r { left: calc(50% + var(--avh) - 11px); }
  .pl-mark svg { width: 8px; height: 8px; }
}
.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 .ch-amt { font-size: 12px; padding: 0 8px; }
/* 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); -webkit-user-select: none; 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; -webkit-user-select: none; 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 bot 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); }
/* A name in the chat opens Mute (#616). */
.pl-chat-who { all: unset; cursor: pointer; color: var(--fg-strong); font-weight: 600; }
.pl-chat-who:hover, .pl-chat-who[aria-expanded="true"] { text-decoration: underline; }
.pl-chat-who:focus-visible { outline: 2px solid var(--teal); outline-offset: 1px; }
.pl-chat-log .pl-chat-mute { padding: 1px 8px; font-size: 12px; margin-left: 4px; }
/* A seat's Mute (#616), in the seat-flag popover's place; a folded seat's
   stays readable. */
.pl-mpop { top: auto; bottom: calc(100% + 2px); min-width: 0; padding: 4px; text-align: center; }
.pl-seat:has(.pl-mpop) { opacity: 1; }
.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); }
/* "Still here?" at a club table after 10 minutes idle (#421). */
.pl-idle { display: inline-flex; align-items: center; gap: 8px; }
.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. */
  /* Chips at about three quarters size, piles placed for the tall felt. */
  .pl-felt .ch-box { zoom: 0.75; }
  .pl-pile { left: var(--qx); top: var(--qy); }
  .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) { --avh: 21px; }
.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) { --avh: 14px; }
  .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; }
}

/* ---- The Card room (#721): a lit felt on a leather rail with a gold edge,
   seats on the rail, cards with a corner index, gold-ringed avatars whose
   ring counts the acting player's time down. Overrides the rules above. ---- */
.pl-felt {
  --room-gold: #c9a45c; --room-gold-hi: #f2d28a; --room-ink: #eadfc6; --room-glass: rgba(12,16,13,0.9); --room-edge: #5a4630;
  width: calc(100% - 150px); margin: 92px 75px 104px;
  border: 16px solid transparent; border-radius: 999px;
  background:
    radial-gradient(ellipse at 50% 38%, #3d8a5f 0%, #2b6e49 45%, #1d5236 100%) padding-box,
    linear-gradient(180deg, #4a3222 0%, #2c1c12 100%) border-box;
  box-shadow: inset 0 0 0 2px var(--room-gold), inset 0 10px 30px rgba(0,0,0,0.45), 0 30px 60px rgba(0,0,0,0.5);
}
.pl-felt::before { content: 'DUCY'; position: absolute; left: 50%; top: 27%; transform: translate(-50%, -50%); pointer-events: none;
  font-family: var(--font-display); font-size: clamp(18px, 3vw, 34px); letter-spacing: 0.08em; color: rgba(255,255,255,0.07); }
.pl-seat, .pl-say { left: var(--sx); top: var(--sy); }

/* Cards: rank over suit in the corner, a big suit in the other. */
.pl-card { position: relative; display: inline-block; flex: none; box-sizing: border-box; width: 54px; height: 76px; padding: 0;
  border: 0; border-radius: 6px; background: #fffdf7; color: #1d1d1b; box-shadow: 0 3px 8px rgba(0,0,0,0.4); font-family: var(--font-ui); }
.pl-card .ix { position: absolute; left: 5px; top: 4px; display: flex; flex-direction: column; align-items: center; font-size: 19px; font-weight: 700; line-height: 1; }
.pl-card .ix b { font-weight: 700; letter-spacing: -0.04em; }
.pl-card .ix i { font-style: normal; font-size: 14px; }
.pl-card .pip { position: absolute; right: 5px; bottom: 3px; font-size: 30px; line-height: 1; }
.pl-card.r { color: #b8261f; }
.four-color .pl-card.s-d { color: #2f6fd6; }
.four-color .pl-card.s-c { color: #2a7a4f; }
.pl-card.back { border: 2px solid #fffdf7; background:
  repeating-linear-gradient(45deg, rgba(255,255,255,0.12) 0 2px, transparent 2px 6px),
  repeating-linear-gradient(-45deg, rgba(255,255,255,0.12) 0 2px, transparent 2px 6px), #7a1f2b; }
/* Board slots stay for the layout, but only show while a card is coming. */
.pl-card.slot { background: transparent; border: 1px dashed rgba(255,255,255,0.18); box-shadow: none; }
.pl-card.slot:not(.next) { visibility: hidden; }
.pl-board { gap: 8px; }
.pl-hole .pl-card { width: 32px; height: 45px; border-radius: 4px; }
.pl-hole .pl-card .ix { left: 3px; top: 2px; font-size: 13px; }
.pl-hole .pl-card .ix i { font-size: 10px; }
.pl-hole .pl-card .pip { right: 3px; bottom: 2px; font-size: 17px; }

/* Your hand: a fan, each card turned a little further out and the outer ones
   a little lower, overlapping so every corner shows. */
.pl-seat.hero .pl-hole { align-items: flex-end; padding-top: 6px; }
.pl-seat.hero .pl-hole .pl-card { width: 62px; height: 86px; border-radius: 7px; transform-origin: 50% 120%; box-shadow: -2px 3px 8px rgba(0,0,0,0.4); }
.pl-seat.hero .pl-hole .pl-card .ix { left: 5px; top: 5px; font-size: 20px; }
.pl-seat.hero .pl-hole .pl-card .ix i { font-size: 15px; }
.pl-seat.hero .pl-hole .pl-card .pip { right: 6px; bottom: 4px; font-size: 34px; }
.pl-seat.hero .pl-hole.n2 .pl-card + .pl-card { margin-left: -14px; }
.pl-seat.hero .pl-hole:is(.n3, .n4) .pl-card + .pl-card { margin-left: -28px; }
.pl-seat.hero .pl-hole:is(.n5, .n6) .pl-card { width: 56px; height: 78px; }
.pl-seat.hero .pl-hole:is(.n5, .n6) .pl-card + .pl-card { margin-left: -32px; }
.pl-seat.hero .pl-hole.n2 .pl-card:nth-child(1) { transform: rotate(-5deg) translateY(1px); }
.pl-seat.hero .pl-hole.n2 .pl-card:nth-child(2) { transform: rotate(5deg) translateY(1px); }
.pl-seat.hero .pl-hole.n3 .pl-card:nth-child(1) { transform: rotate(-6deg) translateY(1px); }
.pl-seat.hero .pl-hole.n3 .pl-card:nth-child(3) { transform: rotate(6deg) translateY(1px); }
.pl-seat.hero .pl-hole.n4 .pl-card:nth-child(1) { transform: rotate(-9deg) translateY(3px); }
.pl-seat.hero .pl-hole.n4 .pl-card:nth-child(2) { transform: rotate(-3deg) translateY(0); }
.pl-seat.hero .pl-hole.n4 .pl-card:nth-child(3) { transform: rotate(3deg) translateY(0); }
.pl-seat.hero .pl-hole.n4 .pl-card:nth-child(4) { transform: rotate(9deg) translateY(3px); }
.pl-seat.hero .pl-hole.n5 .pl-card:nth-child(1) { transform: rotate(-10deg) translateY(6px); }
.pl-seat.hero .pl-hole.n5 .pl-card:nth-child(2) { transform: rotate(-5deg) translateY(1px); }
.pl-seat.hero .pl-hole.n5 .pl-card:nth-child(3) { transform: none; }
.pl-seat.hero .pl-hole.n5 .pl-card:nth-child(4) { transform: rotate(5deg) translateY(1px); }
.pl-seat.hero .pl-hole.n5 .pl-card:nth-child(5) { transform: rotate(10deg) translateY(6px); }
.pl-seat.hero .pl-hole.n6 .pl-card:nth-child(1) { transform: rotate(-12deg) translateY(9px); }
.pl-seat.hero .pl-hole.n6 .pl-card:nth-child(2) { transform: rotate(-7deg) translateY(3px); }
.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(7deg) translateY(3px); }
.pl-seat.hero .pl-hole.n6 .pl-card:nth-child(6) { transform: rotate(12deg) translateY(9px); }
/* Everyone else's cards, face down: a small fan tucked behind the avatar. */
.pl-seat:not(.hero) .pl-hole.down { position: absolute; left: calc(50% + 10px); top: -6px; margin: 0; z-index: -1; gap: 0; }
.pl-seat:not(.hero) .pl-hole.down .pl-card { width: 24px; height: 34px; border-width: 1.5px; border-radius: 3px; transform-origin: 50% 130%; box-shadow: 0 2px 4px rgba(0,0,0,0.4); }
.pl-seat:not(.hero) .pl-hole.down .pl-card + .pl-card { margin-left: -14px; }
.pl-seat:not(.hero) .pl-hole.down.n2 .pl-card:nth-child(1) { transform: rotate(-8deg); }
.pl-seat:not(.hero) .pl-hole.down.n2 .pl-card:nth-child(2) { transform: rotate(8deg); }
.pl-seat:not(.hero) .pl-hole.down:is(.n4, .n5, .n6) .pl-card + .pl-card { margin-left: -17px; }
.pl-seat:not(.hero) .pl-hole.down:is(.n4, .n5, .n6) .pl-card:nth-child(1) { transform: rotate(-12deg) translateY(2px); }
.pl-seat:not(.hero) .pl-hole.down:is(.n4, .n5, .n6) .pl-card:nth-child(2) { transform: rotate(-4deg); }
.pl-seat:not(.hero) .pl-hole.down:is(.n4, .n5, .n6) .pl-card:nth-child(3) { transform: rotate(4deg); }
.pl-seat:not(.hero) .pl-hole.down:is(.n4, .n5, .n6) .pl-card:nth-child(4) { transform: rotate(12deg) translateY(2px); }
.pl-seat:not(.hero) .pl-hole.down:is(.n5, .n6) .pl-card:nth-child(5) { transform: rotate(18deg) translateY(5px); }
.pl-seat:not(.hero) .pl-hole.down.n6 .pl-card:nth-child(6) { transform: rotate(24deg) translateY(9px); }

/* Seats: a gold ring, the acting player's counting down; a dark glass plate. */
.pl-av { box-sizing: border-box; width: 60px; height: 60px; padding: 3px; background: var(--room-gold); box-shadow: 0 6px 14px rgba(0,0,0,0.45); }
.pl-av img { border-radius: 50%; background: #e8dcc5; }
.pl-av.none { color: var(--room-gold-hi); background: radial-gradient(circle, #3b2a1c 0 64%, var(--room-gold) 66%); }
.pl-seat.acting .pl-av { background: conic-gradient(var(--room-gold-hi) calc(var(--left, 100) * 1%), #3a2a1c 0); box-shadow: 0 0 14px rgba(242,210,138,0.5), 0 6px 14px rgba(0,0,0,0.45); }
.pl-seat.winner .pl-av { background: #7fd19b; }
/* Whose turn it is: the seat glows, slowly, and its plate warms. Yours is
   the plate (your avatar gives way to your cards). */
@keyframes pl-turn { 0%, 100% { box-shadow: 0 0 0 0 rgba(242,210,138,0.65), 0 6px 14px rgba(0,0,0,0.45); } 50% { box-shadow: 0 0 0 9px rgba(242,210,138,0), 0 6px 14px rgba(0,0,0,0.45); } }
.pl-seat.acting .pl-av, .pl-seat.hero.acting .pl-plate { animation: pl-turn 1.6s ease-in-out infinite; }
.pl-seat.acting .pl-plate { background: linear-gradient(180deg, #3b2f17, #1f190d); border-color: var(--room-gold-hi); }
@media (prefers-reduced-motion: reduce) { .pl-seat.acting .pl-av, .pl-seat.hero.acting .pl-plate { animation: none; box-shadow: 0 0 0 4px rgba(242,210,138,0.6); } }
.pl-status b { color: #eadfc6; }
.pl-status .pl-yourturn { color: #f2d28a; font-size: 15px; }
.pl-av + .pl-hole:not(.down) { margin-top: -18px; }
/* Your own avatar would only peek out behind your cards: while you hold
   some, the plate stands for you (it lights up on your turn). */
.pl-seat.hero:has(.pl-hole) .pl-av { display: none; }
.pl-plate { background: var(--room-glass); border: 1px solid var(--room-edge); border-radius: 8px; box-shadow: 0 6px 14px rgba(0,0,0,0.4); }
.pl-plate b { color: var(--room-ink); }
.pl-plate span { color: var(--room-gold-hi); font-weight: 700; }
.pl-seat.acting .pl-plate { border-color: var(--room-gold); box-shadow: 0 0 0 1px var(--room-gold), 0 6px 14px rgba(0,0,0,0.4); }
.pl-seat.winner .pl-plate { border-color: #7fd19b; }
.pl-seat.folded { opacity: 1; }
.pl-seat.folded :is(.pl-av, .pl-plate, .pl-hole) { opacity: 0.5; filter: grayscale(0.6); }
.pl-note { background: none; color: var(--room-ink); font-weight: 700; letter-spacing: 0.08em; opacity: 0.85; }
.pl-seat.winner .pl-note { background: #2a7a4f; opacity: 1; }
.pl-clock { background: var(--room-gold-hi); color: #1d1712; }
.pl-button { width: 26px; height: 26px; font-size: 12px; background: #fffdf7; color: #1d1712; box-shadow: 0 3px 0 #b7ab92, 0 6px 10px rgba(0,0,0,0.45); }
/* The bomb pot button: red, beside the dealer's when they meet. */
.pl-button.pl-bombbtn { background: #b8322a; color: #fffdf7; box-shadow: 0 3px 0 #6f1a15, 0 6px 10px rgba(0,0,0,0.45); }
.pl-button.pl-bombbtn.b-pair.b-right { left: calc(100% + 60px); }
.pl-button.pl-bombbtn.b-pair.b-left { right: calc(100% + 60px); }
@media (max-width: 640px) {
  .pl-button.pl-bombbtn.b-pair.b-right { left: calc(100% + 30px); }
  .pl-button.pl-bombbtn.b-pair.b-left { right: calc(100% + 30px); }
}
.pl-pot > .pl-amt, .pl-pot > .pl-total { color: #fffdf7; }

/* The action buttons: dark leather, a gold raise. */
.pl-act-fold .tr-btn, .pl-act-call .tr-btn { background: #1d1712; border-color: var(--room-edge, #5a4630); color: #eadfc6; }
.pl-act-raise .tr-btn, .pl-act-raise .tr-start { background: #d9b25e; border-color: #d9b25e; color: #1d1712; }
.pl-act-raise .tr-start:hover, .pl-act-raise .tr-btn:hover { background: #e6c374; border-color: #e6c374; }
.pl-act-amount input[type=range] { accent-color: #d9b25e; }

/* Around the table (#728): the same room. The table's buttons are leather,
   the one to press gold; menus, panels and chat are dark glass. */
.pl-play, .pl-chat { --room-gold: #c9a45c; --room-gold-hi: #f2d28a; --room-ink: #eadfc6; --room-glass: rgba(12,16,13,0.9); --room-edge: #5a4630; --room-leather: #1d1712; --room-leather-hi: #2a2018; --room-press: #d9b25e; --room-press-hi: #e6c374; }
.pl-play :is(.pl-menu > summary, .pl-leave) { background: var(--room-leather); border-color: var(--room-edge); color: var(--room-ink); box-shadow: 0 2px 0 #0d0a07; }
.pl-play :is(.pl-menu > summary, .pl-leave):hover, .pl-play .pl-menu[open] > summary { background: var(--room-leather-hi); border-color: var(--room-gold); }
.pl-play :is(.pl-menu-list, .pl-seat-items) { background: var(--room-glass); border-color: var(--room-edge); box-shadow: 0 10px 24px rgba(0,0,0,0.5); }
.pl-play .pl-menu-item { color: var(--room-ink); }
.pl-play .pl-menu-item:hover, .pl-play .pl-menu-item:focus-visible { background: var(--room-leather-hi); }
.pl-play .pl-menu-item b { color: rgba(234,223,198,0.6); }
.pl-play .pl-menu-item[aria-pressed="true"] b { color: var(--room-gold-hi); }
.pl-play :is(.tr-btn, .cc-btn, .btn-small):not(.yes, .on, .primary), .pl-chat .cc-btn:not(.on) { background: var(--room-leather); border-color: var(--room-edge); color: var(--room-ink); }
.pl-play :is(.tr-btn, .cc-btn, .btn-small):not(.yes, .on, .primary):hover, .pl-chat .cc-btn:not(.on):hover { background: var(--room-leather-hi); border-color: var(--room-gold); color: var(--room-ink); }
.pl-play :is(.tr-btn.yes, .tr-start, .cc-btn.on, .btn-small.primary), .pl-play .pl-act-raise :is(.tr-btn, .tr-start), .pl-chat .cc-btn.on { background: var(--room-press); border-color: var(--room-press); color: #1d1712; }
.pl-play :is(.tr-btn.yes, .tr-start, .cc-btn.on, .btn-small.primary):hover, .pl-play .pl-act-raise :is(.tr-btn, .tr-start):hover { background: var(--room-press-hi); border-color: var(--room-press-hi); }
.pl-play .pl-text, .pl-chat .pl-chat-send input { background: #14110d; border-color: var(--room-edge); color: var(--room-ink); }
.pl-play .pl-text:focus, .pl-chat .pl-chat-send input:focus { outline: none; border-color: var(--room-gold); }
.pl-play .pl-amtbox { font-family: var(--font-data); }
.pl-play .pl-summary, .pl-chat :is(.pl-chat-head, .pl-chat-body) { background: var(--room-glass); border-color: var(--room-edge); color: var(--room-ink); }
.pl-chat .pl-chat-head.unread { border-color: var(--room-gold); color: var(--room-gold-hi); }
.pl-play :is(.pl-sum-head, .pl-chips-head, .pl-stats-head, .pl-review-head, .pl-result), .pl-chat .pl-chat-log b, .pl-chat .pl-chat-who { color: var(--room-ink); }
.pl-play :is(.pl-stats, .pl-chips, .pl-review, .pl-log, .pl-sum-nets), .pl-play .pl-stats-table :is(th, td) { border-color: var(--room-edge); }
.pl-play .pl-chip-list li { background: rgba(0,0,0,0.3); border: 1px solid var(--room-edge); }
.pl-play .pl-stats-table tr.hero th { color: var(--room-gold-hi); }
.pl-hud { background: none; color: var(--room-ink, #eadfc6); font-weight: 600; letter-spacing: 0.04em; opacity: 0.85; }

@media (max-width: 640px) {
  .pl-felt { width: calc(100% - 72px); margin: 64px 36px 84px; border-width: 10px; border-radius: 140px; }
  .pl-felt.crowded { border-radius: 120px; }
  .pl-felt::before { font-size: 18px; top: 24%; }
  .pl-seat, .pl-say { left: var(--tx); top: var(--ty); }
  /* Too little room for each seat's chips on a phone: bets and the pot only. */
  .pl-pile { display: none; }
  .pl-av { width: 44px; height: 44px; padding: 2px; }
  .pl-board { gap: 3px; }
  .pl-card { width: 32px; height: 45px; border-radius: 4px; }
  .pl-card .ix { left: 2px; top: 2px; font-size: 12px; }
  .pl-card .ix i { font-size: 9px; }
  .pl-card .pip { right: 2px; bottom: 2px; font-size: 16px; }
  .pl-hole .pl-card { width: 26px; height: 37px; }
  .pl-hole .pl-card .ix { font-size: 11px; }
  .pl-hole .pl-card .pip { font-size: 13px; }
  .pl-seat.hero .pl-hole .pl-card { width: 46px; height: 64px; }
  .pl-seat.hero .pl-hole .pl-card .ix { font-size: 16px; }
  .pl-seat.hero .pl-hole .pl-card .ix i { font-size: 12px; }
  .pl-seat.hero .pl-hole .pl-card .pip { font-size: 24px; }
  .pl-seat.hero .pl-hole:is(.n3, .n4) .pl-card { width: 40px; height: 56px; }
  .pl-seat.hero .pl-hole:is(.n5, .n6) .pl-card { width: 36px; height: 50px; }
  .pl-seat.hero .pl-hole:is(.n5, .n6) .pl-card .ix { font-size: 14px; }
  .pl-seat.hero .pl-hole:is(.n5, .n6) .pl-card .pip { font-size: 19px; }
  .pl-seat.hero .pl-hole:is(.n3, .n4) .pl-card + .pl-card { margin-left: -20px; }
  .pl-seat.hero .pl-hole:is(.n5, .n6) .pl-card + .pl-card { margin-left: -19px; }
  .pl-seat:not(.hero) .pl-hole.down { left: calc(50% + 6px); }
  .pl-seat:not(.hero) .pl-hole.down .pl-card { width: 18px; height: 26px; }
  .pl-seat:not(.hero) .pl-hole.down .pl-card + .pl-card { margin-left: -11px; }
  .pl-felt.crowded .pl-seat:not(.hero) .pl-av { width: 30px; height: 30px; padding: 2px; }
}

/* 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; }

/* Sitting out and chips at a club table. */
.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); -webkit-user-select: all; 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; }
}

/* Payout tables by entries (#424): the editor and the table */
.po-scroll { max-width: 100%; overflow-x: auto; }
.cl-payouts { flex-basis: 100%; display: flex; flex-direction: column; align-items: flex-start; gap: 4px; }
.cl-payouts > label { display: flex; align-items: center; gap: 8px; }
.cl-payouts select { width: auto; min-width: 9em; padding-right: 28px; }
.cl-payouts .cl-acct { min-width: min(320px, 100%); }
.po-rows .pl-text { width: 64px; }
.po-table { min-width: 0; }
.po-table .po-on :is(th, td) { background: var(--teal-faint); }
.cl-paytables { display: flex; flex-direction: column; gap: 10px; margin: 0 0 16px; }
.cl-paytable { display: flex; flex-direction: column; gap: 6px; padding: 10px 12px; border: 1px solid var(--border); border-radius: var(--radius); }
.cl-paytable-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.cl-paytable-head .cl-name { margin-right: auto; }
.pz-form .po-rows .pl-text { width: 60px; }

/* The New tournament wizard (#477): a panel, its steps, choices as tiles, the review by step */
.tw { display: flex; flex-direction: column; gap: 22px; max-width: 760px; padding: 20px 24px 24px; border: 1px solid var(--border); border-radius: 12px; background: var(--bg-raised); }
.tw-head { display: flex; align-items: center; gap: 12px; }
.tw-head h3 { margin: 0 auto 0 0; font-family: var(--font-display); font-weight: 400; font-size: 22px; color: var(--fg-strong); }
.tw-close { width: 32px; height: 32px; border: 1px solid var(--border); border-radius: 50%; background: none; color: var(--fg-muted); font-size: 13px; cursor: pointer; }
.tw-close:hover { color: var(--fg-strong); border-color: var(--fg-muted); }
/* The steps: dots on a line, done ones filled */
.tw-steps { display: grid; grid-template-columns: repeat(5, 1fr); list-style: none; margin: 0; padding: 0; }
.tw-steps li { position: relative; display: flex; justify-content: center; }
.tw-steps li + li::before { content: ""; position: absolute; top: 13px; right: 50%; width: 100%; height: 2px; background: var(--border); }
.tw-steps li.done + li::before { background: var(--teal); }
.tw-step { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 0 4px; border: 0; background: none; font: inherit; font-size: 12px; color: var(--fg-muted); text-align: center; }
button.tw-step { cursor: pointer; }
button.tw-step:hover .tw-name { color: var(--fg-strong); }
.tw-dot { display: grid; place-items: center; width: 28px; height: 28px; box-sizing: border-box; border: 2px solid var(--border); border-radius: 50%; background: var(--bg-raised); font-size: 12px; font-weight: 700; font-variant-numeric: tabular-nums; }
.tw-steps li.done .tw-dot { border-color: var(--teal); background: var(--teal); color: var(--on-accent); }
.tw-steps li.on .tw-dot { border-color: var(--teal); color: var(--fg-strong); box-shadow: 0 0 0 4px var(--teal-faint); }
.tw-steps li.on .tw-name { color: var(--fg-strong); font-weight: 600; }
/* A step's page: groups under small headings */
.tw-body { display: flex; flex-direction: column; gap: 22px; }
.tw-group { display: flex; flex-direction: column; gap: 12px; padding-top: 18px; border-top: 1px solid var(--border); }
.tw-body > .tw-group:first-child { padding-top: 0; border-top: 0; }
.tw-group h4, .tw-sum h4 { margin: 0; font-size: 11px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--fg-muted); }
.tw-fields { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(160px, 100%), 1fr)); gap: 14px 16px; }
.tw-fields.tw-trio { grid-template-columns: repeat(3, minmax(0, 1fr)); max-width: 560px; }
.tw-fields.tw-roomy { grid-template-columns: repeat(auto-fill, minmax(min(200px, 100%), 1fr)); }
.tw-field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.tw-wide { grid-column: 1 / -1; max-width: 420px; }
.tw-label { font-size: 12px; font-weight: 600; color: var(--fg); }
.tw-field .pl-text { width: 100%; box-sizing: border-box; padding: 8px 10px; font-size: 14px; font-variant-numeric: tabular-nums; }
.tw .pl-text { background: var(--bg-inset); }
.tw .pl-text:focus { outline: none; border-color: var(--teal); box-shadow: 0 0 0 3px var(--teal-faint); }
/* Choices as tiles */
.tw-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(130px, 100%), 1fr)); gap: 8px; }
.tw-tile { position: relative; display: flex; flex-direction: column; gap: 2px; padding: 12px 14px; border: 1px solid var(--border); border-radius: 8px; background: var(--bg-inset); cursor: pointer; transition: border-color 0.15s, background-color 0.15s; }
.tw-tile input { position: absolute; opacity: 0; pointer-events: none; }
.tw-tile:hover { border-color: var(--fg-muted); }
.tw-tile:has(input:checked) { border-color: var(--teal); background: var(--teal-faint); box-shadow: inset 0 0 0 1px var(--teal); }
.tw-tile:has(input:focus-visible) { outline: 2px solid var(--teal); outline-offset: 2px; }
.tw-tile-name { font-size: 14px; font-weight: 600; color: var(--fg-strong); }
.tw-tile-meta { font-size: 12px; color: var(--fg-muted); font-variant-numeric: tabular-nums; }
/* A short choice: segments in one bar */
.tw-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.tw-row > .tw-label { width: 72px; }
.tw-seg { display: inline-flex; flex-wrap: wrap; align-self: flex-start; gap: 2px; padding: 3px; border: 1px solid var(--border); border-radius: 8px; background: var(--bg-inset); }
.tw-seg .tw-tile { padding: 6px 14px; border: 0; border-radius: 6px; background: none; }
.tw-seg .tw-tile-name { font-size: 13px; color: var(--fg-muted); }
.tw-seg .tw-tile:hover .tw-tile-name { color: var(--fg-strong); }
.tw-seg .tw-tile:has(input:checked) { background: var(--teal); box-shadow: none; }
.tw-seg .tw-tile:has(input:checked) .tw-tile-name { color: var(--on-accent); }
/* Payout tables: one picked, shown open */
.tw-pays { display: flex; flex-direction: column; gap: 8px; }
.tw-pay { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 12px 14px; border: 1px solid var(--border); border-radius: 8px; background: var(--bg-inset); }
.tw-pay > label { display: flex; align-items: center; gap: 10px; margin-right: auto; cursor: pointer; }
.tw-pay input[type=radio] { width: 16px; height: 16px; margin: 0; accent-color: var(--teal); }
.tw-pay:has(> label input:checked) { border-color: var(--teal); box-shadow: inset 0 0 0 1px var(--teal); }
.tw-pay .po-scroll { flex-basis: 100%; }
.tw .ts-levels .pl-text { background: var(--bg-inset); }
.tw .ts-estimate .pl-desc { font-size: 12px; color: var(--fg-muted); }
/* The review: a card a step, each with Edit */
.tw-review { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr)); align-items: start; gap: 12px; }
.tw-sum { display: flex; flex-direction: column; gap: 10px; padding: 14px 16px; border: 1px solid var(--border); border-radius: 8px; background: var(--bg-inset); }
.tw-sum-head { display: flex; align-items: baseline; gap: 8px; }
.tw-sum-head h4 { margin-right: auto; }
.tw-edit { padding: 0; border: 0; background: none; font: inherit; font-size: 12px; font-weight: 600; color: var(--teal-hover); cursor: pointer; }
.tw-edit:hover { text-decoration: underline; }
.tw-sum dl { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; margin: 0; font-size: 14px; }
.tw-sum dt { color: var(--fg-muted); }
.tw-sum dd { margin: 0; min-width: 0; color: var(--fg-strong); font-variant-numeric: tabular-nums; }
/* Back and Next */
.tw-foot { display: flex; justify-content: flex-end; gap: 8px; padding-top: 18px; border-top: 1px solid var(--border); }
.tw-foot [data-cl=tw-back] { margin-right: auto; }
.tw-foot .btn-small { padding: 8px 20px; font-size: 14px; }
@media (max-width: 560px) {
  .tw { padding: 16px; gap: 18px; }
  .tw-steps { padding-bottom: 18px; }
  .tw-steps .tw-name { display: none; }
  .tw-steps li.on .tw-name { display: block; position: absolute; top: 34px; left: 50%; transform: translateX(-50%); white-space: nowrap; }
  .tw-steps li:first-child.on .tw-name { left: 4px; transform: none; }
  .tw-steps li:last-child.on .tw-name { left: auto; right: 4px; transform: none; }
}
.cl-ask { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; flex-basis: 100%; }
@media (max-width: 560px) {
  .po-rows .pl-text, .pz-form .po-rows .pl-text { width: 52px; }
}

/* 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; }
/* Number fields in a form (bomb pots) */
.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; }
/* An action's answer beside its control (#544): Saved ✓, or what went wrong */
.cl-saved { margin-left: 8px; color: var(--teal); }
.cl-acterr { display: block; flex-basis: 100%; grid-column: 1 / -1; margin: 4px 0; font-size: 13px; }
.tw-discard { flex-basis: auto; }
/* Setting up a club: "Step 1 of 4" above each step's heading */
.cl-step { display: block; margin-bottom: 2px; }
.cl-menu-items .cl-confirm { padding: 8px 10px; max-width: 260px; }
/* A button that can't be used now, with why beside it (#544) */
.cl-off { display: inline-flex; align-items: center; gap: 6px; }
.cl-off .pl-meta { font-size: 12px; }
/* Presets with Other (#544, amount-picks.js): the box beside them */
.pick-other { display: inline-flex; }
.pick-other[hidden] { display: none; }
.pick-other .pl-text { width: 110px; }
.mg-card .pl-row { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; }
.mg-card .pl-label { color: #1d3a2c; font-size: 13px; font-weight: 600; }
.mg-card .pl-opts { display: flex; flex-wrap: wrap; gap: 6px; }
.mg-card label.tf-opt { display: inline-flex; flex-direction: row; }
.mg-card .cc-btn { background: #fffaf0; color: #1d3a2c; border-color: #c9b98f; }
.mg-card .tf-opt:has(input:checked) { background: #1d3a2c; border-color: #1d3a2c; color: #f3e7c9; }
.mg-card .pick-other .pl-text { width: 140px; }
.mg-card .cl-saved { color: #2f6b4f; margin-left: 0; }
.cl-voidform { flex-basis: 100%; }
.cl-voidform .pl-text { flex: 1 1 160px; }
/* 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 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: var(--on-accent); opacity: 0.9; pointer-events: none;
}

/* Staging's player switcher (#671, player-slot-ui.js): a small tab hanging
   from the top edge, in the middle of the top bar, clear of the wordmark,
   the menus and a table's controls; its menu opens downward. */
.ps-slot {
  position: fixed; top: 0; left: 50%; transform: translateX(-50%); z-index: 1300;
  font: 500 12px var(--font-ui); color: #1d3a2c;
}
.ps-slot summary {
  list-style: none; cursor: pointer; max-width: 120px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  background: #f5c542; border: 1px solid #1d3a2c; border-top: 0; border-radius: 0 0 8px 8px; padding: 1px 8px 2px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}
.ps-slot summary::-webkit-details-marker { display: none; }
/* On a phone the tab is just the number (the menu names everyone), so it
   stays clear of the top bar's badge. */
@media (max-width: 520px) { .ps-slot-name { display: none; } }
.ps-slot ul {
  position: absolute; top: calc(100% + 4px); left: 50%; transform: translateX(-50%); width: max-content; max-width: calc(100vw - 16px);
  max-height: calc(100vh - 80px); overflow: auto; list-style: none; padding: 4px 0;
  background: #f3e7c9; border: 2px solid #1d3a2c; border-radius: 12px; box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}
.ps-slot li { display: flex; align-items: center; gap: 8px; padding: 6px 10px; }
.ps-slot li[aria-current] { background: #e8d9b0; }
.ps-slot-who { flex: 1; min-width: 0; max-width: 160px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ps-slot li button {
  flex: none; font: 600 12px var(--font-ui); color: #1d3a2c; background: transparent;
  border: 1px solid #1d3a2c; border-radius: 8px; padding: 4px 10px; cursor: pointer;
}
.ps-slot li button:hover { background: #1d3a2c; color: #f3e7c9; }

/* A demo club (#406, demo.js): the striped DEMO bar on every page, its
   person switcher and Simulate, and Demo over. */
.demo-bar {
  position: sticky; top: 0; z-index: 1200;
  background: repeating-linear-gradient(-45deg, #f2b632 0 14px, #e3a21b 14px 28px);
  color: #2a1d05; border-bottom: 2px solid #2a1d05;
  font: 500 14px var(--font-ui);
}
.demo-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; padding: 6px 16px; }
.demo-tag { font: 400 16px var(--font-display); letter-spacing: 0.08em; background: #2a1d05; color: #f2b632; padding: 1px 8px; border-radius: 4px; }
.demo-note { font-weight: 600; }
.demo-who { position: relative; }
.demo-who summary { list-style: none; cursor: pointer; background: #fff7e0; border: 1px solid #2a1d05; border-radius: 8px; padding: 3px 10px; }
.demo-who summary::-webkit-details-marker { display: none; }
.demo-menu {
  position: absolute; top: calc(100% + 4px); left: 0; min-width: 240px; max-width: calc(100vw - 32px);
  display: flex; flex-direction: column; background: #f3e7c9; color: #1d3a2c;
  border: 2px solid #1d3a2c; border-radius: 12px; overflow: hidden auto; box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
  /* Many people (the Agents club, #428): it scrolls within the screen. */
  max-height: calc(100vh - 64px);
}
.demo-menu button {
  display: flex; flex-direction: column; align-items: flex-start; gap: 1px; text-align: left;
  font: inherit; color: inherit; background: none; border: 0; border-bottom: 1px solid rgba(29, 58, 44, 0.2); padding: 8px 12px; cursor: pointer;
}
.demo-menu button:last-child { border-bottom: 0; font-weight: 600; }
.demo-menu button:hover:not(:disabled), .demo-menu button[aria-current] { background: #e8d9b0; }
.demo-menu button:disabled { opacity: 0.5; cursor: default; }
.demo-menu button span { font-size: 12px; color: #4b5a4f; }
.demo-acts { margin-left: auto; display: flex; gap: 8px; }
.demo-end { font: 600 13px var(--font-ui); background: #2a1d05; color: #f2b632; border: 0; border-radius: 8px; padding: 5px 12px; cursor: pointer; }
.demo-sim { border-top: 1px solid rgba(42, 29, 5, 0.35); background: rgba(255, 247, 224, 0.55); }
.demo-sim-title { font: 400 15px var(--font-display); }
.demo-sim .btn-small { background: #fff7e0; color: #2a1d05; border-color: #2a1d05; }
.demo-sim .btn-small:disabled { opacity: 0.5; }
.demo-sim-now { font-size: 13px; font-weight: 600; }
.demo-over { position: fixed; inset: 0; z-index: 1300; display: grid; place-items: center; padding: 16px; background: rgba(18, 38, 28, 0.85); }
.demo-over .cl-card { width: min(420px, 100%); background: #f3e7c9; color: #1d3a2c; border: 0; border-radius: 18px; padding: 24px; }
.demo-over .cl-card h2 { margin: 0; font: 400 30px var(--font-display); color: #1d3a2c; }
.demo-over .btn-small { background: transparent; color: #1d3a2c; border-color: #1d3a2c; }
.demo-list-head { display: flex; justify-content: space-between; align-items: center; }
.demo-list-head .link-btn { color: #1d3a2c; font-size: 18px; }
.demo-list ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.demo-list li { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 0; border-top: 1px solid rgba(29, 58, 44, 0.2); }
.demo-list li > span { display: flex; flex-direction: column; gap: 2px; font-size: 16px; }
.demo-list .pl-meta { color: #4b5a4f; font-size: 13px; }
.demo-list .tr-start { margin: 0; flex: none; }
@media (max-width: 640px) { .demo-row { padding: 6px 16px; gap: 6px 8px; } .demo-acts { margin-left: 0; } }
.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); }

/* 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; }
/* A chart beside a tile's name keeps its size, below it on a phone (#641). */
.v3-tile-wide > .v3-door-art { flex: none; width: 218px; max-width: 100%; }
/* The training site (#641): the top bar and breadcrumb on every page, and
   its front page's three tiles in a row, the same height, each picture
   filling the room under its tile's name. */
body.site-training.mode-v3 .topbar, body.site-training.mode-v3 .sub-tabs { display: flex !important; }
/* The odds site (#640): the top bar over its first visit's sign-in too. */
body.site-odds.mode-v3 .topbar { display: flex !important; }
@media (min-width: 761px) {
  .v3-training-tiles .v3-tile { min-height: 300px; }
  .v3-training-tiles .v3-tile-cream:has(.v3-ring) { flex-direction: column; align-items: stretch; }
  .v3-training-tiles .v3-ring { order: 1; margin: auto; }
  .v3-training-tiles .v3-versus { margin-block: auto; justify-content: center; }
  .v3-training-tiles .v3-door-art { flex: 1; aspect-ratio: auto; min-height: 170px; }
}
.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); }
/* Your clubs on the front page (#611): with none, the Regulars take the row;
   several, a row each. */
.v3-tiles > :only-child { grid-column: 1 / -1; }
.v3-tiles > :only-child .v3-minitable { max-width: 520px; margin-inline: auto; }
.v3-clubs { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.v3-clubs a { display: flex; align-items: baseline; gap: 12px; padding: 14px 16px; border-radius: 12px; background: #e9dcb8; color: var(--v3-felt); text-decoration: none; font-weight: 600; }
.v3-clubs a:hover, .v3-clubs a:focus-visible { background: #e2d2a8; }
.v3-club-name { font-family: var(--v3-display); font-size: 22px; line-height: 1.15; min-width: 0; overflow-wrap: anywhere; }
.v3-club-who { margin-left: auto; font-size: 14px; color: #55665a; white-space: nowrap; }
.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; }
/* The beta's front page (#551): Ducybot's games, and the play money note. */
.v3-bot-games { display: flex; flex-wrap: wrap; gap: 10px; }
.v3-fine { margin: 0; color: var(--v3-cream-dim); font-size: 14px; }
.v3-join button:disabled { opacity: .6; cursor: progress; }
/* What Enter a code found, when it can't go anywhere (#393). */
.v3-join-note { margin: 12px 0 0; color: var(--v3-cream); max-width: 40em; }
.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; }
.ps-pk { display: contents; }
.ps-hint { margin: -4px 0 10px; font-size: 13px; color: var(--fg-muted); }
/* This account's passkeys (#575), each removable. */
.ps-keys { list-style: none; margin: 0 0 10px; padding: 0; display: flex; flex-direction: column; gap: 6px; font-size: 14px; }
.ps-keys li { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
@media (max-width: 640px) { .ps-sections { grid-template-columns: minmax(0, 1fr); } .ps-me { width: 72px; height: 72px; } }

/* The club manager's list (clubs.js, V3 #225): a card per club, then the
   demo card when the beta has it, and Start a club from a grant's link
   (#clubs/start/<token>, #636). */
.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; }
@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; }
/* The card's own colour, not the page's light .cl-name, so it reads on cream too. */
.cl-tcard-text .cl-name { font-size: 18px; color: inherit; }
.cl-tcard-meta { color: #a9b8a6; }
.cl-tcard.cream .cl-tcard-meta, .cl-tcard.cream .cl-why, .cl-tcard.cream .pl-meta { 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; }
/* A member's thread with the club (#621): their message when joining, and the replies. */
.cl-thread { display: flex; flex-direction: column; gap: 8px; min-width: 0; flex-basis: 100%; }
.cl-thread-lines { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.cl-thread-lines li { font-size: 14px; overflow-wrap: anywhere; padding: 6px 10px; border-radius: 10px; background: rgba(127, 127, 127, .12); align-self: flex-start; max-width: 90%; display: block; }
.cl-thread-lines li.mine { align-self: flex-end; background: rgba(47, 107, 61, .16); }
.cl-thread-form { display: flex; gap: 6px; flex-wrap: wrap; }
.cl-thread-form .pl-text { flex: 1 1 160px; width: auto; min-width: 0; }
.cl-side-card .cl-thread-form .pl-text { background: #fffaf0; color: #1d3a2c; border: 1px solid #c9b98f; }
.cl-side-card h2 { margin: 0; font-size: 16px; color: #1d3a2c; }
.cl-said { display: block; font-size: 14px; overflow-wrap: anywhere; }
.cl-new { font-size: 11px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: #2f6b3d; }
.mg-note-tag.k-new { color: #2f6b3d; }
.mg-note-acts a.btn-small { text-decoration: none; }
.pj-intro { resize: vertical; font: inherit; }
/* 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; }
/* Who's at a table, each with a ⋯ to remove them (#414). */
.cl-at-table { flex-basis: 100%; list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 13px; }
.cl-list .cl-at-table li, .cl-at-table li { display: flex; align-items: center; gap: 6px; padding: 0; border: 0; }
.cl-tables .cl-at-table .btn-small { margin-left: 0; }
.cl-at-table .cl-menu > summary { padding: 2px 8px; font-size: 13px; }
.cl-at-table .link-btn { color: inherit; }
.cl-tcard .cl-at-table .cl-menu-item { color: var(--fg); }
.cl-at-table .cl-menu-items { left: 0; right: auto; }
/* Move to… a table (#425): the table names, as small as the seat's ⋯. */
.cl-move-to { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; }
.cl-at-table .cl-move-to .btn-small { padding: 2px 8px; font-size: 13px; }
.pl-seat-tools { position: relative; display: inline-block; }
.pl-seat-tools > summary { list-style: none; cursor: pointer; padding: 2px 8px; }
.pl-seat-tools > summary::-webkit-details-marker { display: none; }
.pl-seat-items { position: absolute; right: 0; top: calc(100% + 4px); z-index: 20; min-width: 180px; 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-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[hidden] { display: none; }
.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; } }

/* The cream form (play.js and play-section.js, V3 #225). */
.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; }

/* 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; }
/* A field inside its label: the label above it, as wide as the field. */
.cl-promo-form .pl-row > .pl-label { width: auto; display: flex; flex-direction: column; gap: 4px; }
.cl-promo-form .pl-row > .pl-label > .pl-text:not(.cl-num) { width: 13em; }
/* A select is as wide as its longest choice, so none is cut off. */
.cl-promo-form .pl-row > .pl-label > select.pl-text:not(.cl-num) { width: auto; min-width: 13em; max-width: 100%; }
.cl-promo-form .pl-row > .pl-label > .cl-time { width: 9em; }
.cl-promo-form input[name="capPerPlayer"] { width: 8em; }
.cl-promo-session { display: flex; flex-direction: column; gap: 8px; }
.cl-promo-form [hidden] { display: none; }
/* Bonuses: hand, prize and most per period, a row each. */
.cl-promo-tiers { display: grid; grid-template-columns: minmax(0, 13em) 7em 8em; gap: 6px 10px; align-items: center; justify-content: start; }
.cl-promo-tiers .pl-label { width: auto; }
.cl-promo-tiers .pl-text { width: 100%; }
.cl-promo-awards li { flex-wrap: wrap; }
@media (max-width: 640px) {
  .cl-promo-form .cl-num { width: 5em; }
  .cl-promo-tiers { grid-template-columns: minmax(0, 1fr) 5.5em 6em; }
}
/* 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(201, 164, 92, .3); }
.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: var(--on-accent); font: 600 12px var(--font-ui); letter-spacing: 0.02em; }
body.mode-manage .mg-main { display: block; }
/* Watching a table (#427): the table in place of the manager's pages, not below them. */
body.mode-manage .mg-main[hidden] { display: none; }
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; }

/* The club manager by task (#398): in the top bar the club switcher, Live,
   the bell and the account; a sidebar of pages (a drawer on a phone); the
   page; and the notifications beside it (full screen behind the bell on a
   phone). */
.mg-tools { display: contents; }
.mg-top { gap: 14px; position: relative; }
.mg-spacer { flex: 1; }
.mg-burger { order: -1; display: none; align-items: center; background: none; border: 0; color: var(--fg-strong); padding: 6px; margin-left: -6px; cursor: pointer; }
.mg-switch > summary { display: block; font: 400 18px var(--font-display); color: var(--fg-strong); padding: 4px 6px; white-space: nowrap; max-width: 46vw; overflow: hidden; text-overflow: ellipsis; }
.mg-switch .cl-menu-items { left: 0; right: auto; }
a.cl-menu-item { display: block; text-decoration: none; }
.mg-live { display: inline-flex; align-items: center; gap: 6px; font: 600 12px var(--font-ui); padding: 3px 10px; border-radius: 999px; background: var(--bg-inset); color: var(--fg-muted); white-space: nowrap; }
.mg-live.on { color: #d9f2df; }
.mg-live.on::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: #3fbf68; }
.mg-bell { position: relative; display: inline-flex; background: none; border: 0; color: var(--fg-strong); padding: 6px; cursor: pointer; border-radius: 8px; }
.mg-bell.on { background: var(--bg-inset); }
.mg-count { min-width: 18px; padding: 0 5px; border-radius: 9px; background: var(--teal); color: var(--on-accent); font: 600 11px/18px var(--font-ui); text-align: center; }
.mg-bell .mg-count { position: absolute; top: -2px; right: -6px; }
.mg-avatar { width: 30px; height: 30px; border-radius: 50%; background: #f3e7c9; color: #1d3a2c; display: grid; place-items: center; font-weight: 700; }
.mg-acct-id code { font-family: var(--font-data); color: var(--fg-muted); }
body.mode-manage .mg-main .cl-wrap:has(.mg-shell) { max-width: none; padding: 0; }
.mg-shell { display: grid; grid-template-columns: 210px minmax(0, 1fr); min-height: calc(100vh - 48px); align-items: stretch; }
.mg-side { border-right: 1px solid var(--border); background: #18331f; padding: 16px 10px; display: flex; flex-direction: column; gap: 14px; }
.mg-group { display: flex; flex-direction: column; gap: 2px; }
.mg-group-name { font: 600 11px var(--font-ui); letter-spacing: .06em; text-transform: uppercase; color: var(--fg-muted); padding: 0 10px 4px; }
.mg-link { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 8px; color: var(--fg); text-decoration: none; font: 500 15px var(--font-ui); }
.mg-link:hover { background: var(--bg-raised); color: var(--fg-strong); }
.mg-link.on { background: #f3e7c9; color: #1d3a2c; }
.mg-page { min-width: 0; padding: 20px 24px 48px; display: flex; flex-direction: column; gap: 14px; }
.mg-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.mg-h { margin: 0; font: 400 32px/1.1 var(--font-display); color: var(--fg-strong); overflow-wrap: anywhere; }
.mg-page h2 { margin: 8px 0 0; font: 400 22px var(--font-display); color: var(--fg-strong); }
.mg-sec { display: flex; flex-direction: column; gap: 8px; }
.mg-sec-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
/* What needs the manager, behind the bell on every page (#516). */
.mg-notes { display: none; position: fixed; top: var(--demo-h, 0px); right: 0; bottom: 0; width: min(380px, 100%); z-index: 1150; overflow-y: auto; background: #18331f; padding: 16px 14px; flex-direction: column; gap: 10px; min-width: 0; box-shadow: -8px 0 32px rgba(0, 0, 0, 0.4); }
.mg-shell.notes-open .mg-notes { display: flex; }
.mg-shell:is(.notes-open, .nav-open) .mg-scrim { display: block; position: fixed; inset: 0; z-index: 1140; background: rgba(0, 0, 0, 0.45); }
.mg-notes-head { display: flex; justify-content: space-between; align-items: center; }
.mg-notes-head h2 { margin: 0; font: 400 20px var(--font-display); color: var(--fg-strong); }
.mg-notes-x { font-size: 18px; }
.mg-quiet { padding: 6px 2px; }
/* What needs the manager: one panel, a row each (#516). */
.mg-note-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; background: #f3e7c9; color: #1d3a2c; border-radius: 14px; overflow: hidden; box-shadow: 0 4px 0 #0f2219; }
.mg-note { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; padding: 12px 16px; font-size: 14px; }
.mg-note + .mg-note { border-top: 1px solid #dccca3; }
.mg-note-tag { width: 50px; font-size: 11px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: #8a5a10; }
.mg-note-tag.k-help { color: #1f6a8a; }
.mg-note-tag.k-join { color: #2f6b3d; }
.mg-note-tag.k-stopped, .mg-note-tag.k-left_owing, .mg-note-tag.k-move, .mg-note-tag.k-cap_raise { color: #a33a22; }
.mg-note-text { flex: 1 1 240px; min-width: 0; overflow-wrap: anywhere; }
.mg-note time { width: 64px; text-align: right; font-family: var(--font-data); }
.mg-note > .mg-note-acts { width: 260px; justify-content: flex-end; }
@media (max-width: 760px) {
  .mg-note { display: grid; grid-template-columns: 1fr auto; }
  .mg-note time { grid-row: 1; grid-column: 2; }
  .mg-note-text, .mg-note > .mg-note-acts { grid-column: 1 / -1; width: auto; justify-content: flex-start; }
}
.mg-notes .mg-note { display: grid; grid-template-columns: 1fr auto; }
.mg-notes .mg-note time { grid-row: 1; grid-column: 2; }
.mg-notes .mg-note-text, .mg-notes .mg-note > .mg-note-acts { grid-column: 1 / -1; width: auto; justify-content: flex-start; }
.mg-split { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 22px; align-items: start; }
.mg-trow { display: flex; align-items: center; gap: 12px; background: #24472f; border-radius: 14px; padding: 12px 16px; color: #f6ecd2; text-decoration: none; }
.mg-trow > span:first-child { flex: 1; display: flex; flex-direction: column; }
.mg-trow:hover { background: #2c5a43; color: #fff; }
.mg-note a { color: inherit; }
.mg-note .pl-meta, .mg-note time { color: #5d6b55; font-size: 12px; }
.mg-note-acts { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.mg-note .btn-small:not(.primary) { background: #fffaf0; color: #1d3a2c; border-color: #c9b98f; }
.mg-note .pl-text { background: #fffaf0; color: #1d3a2c; border-color: #c9b98f; width: 110px; }
.mg-note .mg-note-wide { flex: 1 1 140px; width: auto; }
.mg-note-x { color: #5d6b55; }
.mg-scrim { display: none; }
.mg-lobby { display: flex; flex-direction: column; gap: 8px; }
.mg-lobby .cl-lobby-log { border-top: 0; padding-top: 0; }
.mg-rows { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; background: var(--bg-raised); border-radius: 12px; overflow: hidden; }
.mg-rows li + li { border-top: 1px solid var(--border); }
.mg-rows a, .mg-rows .mg-row { display: flex; align-items: center; gap: 4px 10px; flex-wrap: wrap; padding: 10px 14px; color: var(--fg); text-decoration: none; }
.mg-rows a:hover { background: var(--bg-inset); }
.mg-rows b { color: var(--fg-strong); font-weight: 600; }
.mg-row-end { margin-left: auto; font-family: var(--font-data); white-space: nowrap; }
.mg-dealing { color: #7fd69a; font-weight: 600; }
.mg-idle { color: var(--fg-muted); }
.mg-stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.mg-stat { background: #f3e7c9; color: #1d3a2c; border-radius: 14px; padding: 12px 14px; display: flex; flex-direction: column; gap: 4px; box-shadow: 0 4px 0 #0f2219; text-decoration: none; }
a.mg-stat:hover { color: #1d3a2c; filter: brightness(1.05); }
.mg-stat-label { font-size: 13px; color: #5d6b55; }
.mg-stat-val { font: 400 26px/1.1 var(--font-display); overflow-wrap: anywhere; }
.mg-stat .cl-down { color: #b0391f; }
button.mg-stat { font: inherit; text-align: left; border: 0; cursor: pointer; }
.mg-stat.green { background: #24472f; color: #f6ecd2; box-shadow: none; }
.mg-stat.green .mg-stat-label { color: #a9b8a6; }
button.mg-stat.green:hover, a.mg-stat.green:hover { color: #fff; background: #2c5a43; filter: none; }
.mg-of { font: 400 15px var(--font-ui); color: #a9b8a6; }
.mg-table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: 14px; }
.mg-table { width: 100%; border-collapse: collapse; min-width: 520px; font-size: 14px; }
.mg-table th, .mg-table td { padding: 10px 14px; text-align: left; border-top: 1px solid var(--border); white-space: nowrap; }
.mg-table thead th { border-top: 0; color: var(--fg-muted); font-size: 12px; font-weight: 600; }
.mg-table tbody th a { color: var(--fg-strong); text-decoration: none; }
.mg-num { font-family: var(--font-data); }
.mg-pill { border-radius: 999px; padding: 3px 10px; font-size: 12px; font-weight: 700; }
.mg-pill.on { background: #2f6b3d; color: #e3f4de; }
.mg-pill.idle { background: #e0a23a; color: #2a1d05; }
.cl-tcard.cream .mg-dealing { color: #2f7a43; }
.cl-tcard.cream .mg-idle { color: #8a5a10; }
.mg-notes-head .link-btn:not(.mg-notes-x) { margin-left: auto; margin-right: 8px; color: var(--fg-muted); }
.mg-tools-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.mg-search { flex: 1 1 200px; width: auto; font-size: 15px; padding: 8px 10px; }
.mg-filters { display: flex; gap: 6px; flex-wrap: wrap; }
/* The Tables board's filters, seats and stakes, side by side. */
.mg-filterbar { display: flex; flex-wrap: wrap; gap: 8px 24px; }
/* Members (#426): sorted by its column headings (a select on a phone), last
   active and balance at the row's end, and pages. */
.mg-members .mg-row-end { display: flex; align-items: baseline; gap: 16px; }
.mg-members .mg-active { min-width: 100px; text-align: right; font-family: var(--font-ui); }
.mg-members .mg-bal { min-width: 84px; text-align: right; }
.mg-members-head { background: none; margin-bottom: -8px; }
.mg-members-head .mg-row { padding-top: 0; padding-bottom: 0; }
.mg-members-head .mg-row-end { font-family: var(--font-ui); }
.mg-sort { display: inline-block; color: var(--fg-muted); font-size: 13px; font-weight: 600; text-decoration: none; }
.mg-sort:hover, .mg-sort.on { color: var(--fg-strong); }
.mg-members-head .mg-row-end .mg-sort:first-child { min-width: 100px; text-align: right; }
.mg-members-head .mg-row-end .mg-sort:last-child { min-width: 84px; text-align: right; }
.mg-sort-pick { display: none; align-items: center; gap: 8px; font-size: 14px; color: var(--fg-muted); }
.mg-sort-pick .pl-text { width: auto; font-size: 15px; padding: 6px 8px; }
.mg-filters .mg-agent-pick { width: auto; font-size: 13px; padding: 4px 8px; }
.mg-filters .mg-agent-pick.on { border-color: var(--teal); }
.mg-tags a { color: inherit; }
.mg-pager { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.mg-back { align-self: flex-start; }
.mg-id { font-family: var(--font-data); color: var(--fg-muted); }
.pl-actions.mg-acts { margin: 0; align-items: center; }
.cl-seated-list { overflow-wrap: anywhere; }
/* Club info (#398): the managers' editor; members' tab, its "updated" dot
   and line, the next event, Getting chips, and About on the invite. */
.mg-info-form { display: flex; flex-direction: column; gap: 14px; max-width: 720px; }
.mg-field { display: flex; flex-direction: column; gap: 6px; border: 0; padding: 0; margin: 0; font-weight: 600; color: var(--fg-strong); }
.mg-field legend { padding: 0 0 6px; }
.mg-field textarea { width: 100%; font: 400 15px/1.45 var(--font-ui); padding: 8px 10px; resize: vertical; }
.mg-event { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 6px; }
.mg-event .pl-text { width: auto; flex: 1 1 160px; font-size: 14px; }
.mg-event .pl-text[type=datetime-local] { flex: 0 1 220px; }
.cl-member-tabs { margin: 0 0 14px; }
.cl-dot { display: inline-block; width: 8px; height: 8px; margin-left: 6px; border-radius: 50%; background: var(--teal); vertical-align: middle; }
.cl-updated { margin: 0 0 8px; }
.cl-next-event { margin: 0; padding: 10px 14px; border-radius: 12px; background: var(--bg-raised); }
.cl-info { display: flex; flex-direction: column; gap: 6px; }
.cl-info-text { line-height: 1.5; overflow-wrap: anywhere; }
.cl-info-text p, .cl-info-text ul { margin: 0 0 8px; }
.cl-info-text ul { padding-left: 20px; }
.cl-getting { font-size: 14px; padding-bottom: 8px; border-bottom: 1px solid #d9caa3; }
.cl-getting a, .pj-about a { color: #b0391f; }
.pj-about { margin-top: 8px; font-size: 14px; }
/* Credit players (#404): a manager's Credit and Settle debt cards; a
   player's Sit down and Add chips panels, You left, and Debt settled. */
.mg-card, .cl-left, .cl-sitform { background: #f3e7c9; color: #1d3a2c; border-radius: 14px; padding: 14px 16px; display: flex; flex-direction: column; gap: 10px; box-shadow: 0 4px 0 #0f2219; max-width: 420px; }
.mg-card > b, .cl-left-title { font: 400 18px var(--font-display); }
.mg-card label, .cl-sitform label, .pl-chip-amt { display: flex; flex-direction: column; gap: 4px; font-size: 13px; font-weight: 600; }
.mg-card .pl-text, .cl-sitform .pl-text { width: 100%; font-size: 16px; padding: 8px 10px; background: #fffaf0; color: #1d3a2c; border-color: #c9b98f; }
.mg-card .btn-small:not(.primary), .cl-left .btn-small:not(.primary), .cl-sitform .btn-small:not(.primary) { background: #fffaf0; color: #1d3a2c; border-color: #c9b98f; }
.mg-card .btn-small.primary, .cl-left .btn-small, .cl-sitform .btn-small.primary { align-self: flex-start; }
.pl-avail { display: flex; justify-content: space-between; gap: 12px; font-size: 14px; }
.pl-avail b { font-family: var(--font-data); }
.cl-left-net { font: 400 34px var(--font-display); }
.cl-left .cl-down, .mg-card .cl-down, .cl-sitform .cl-down { color: #b0391f; }
.cl-left .cl-up { color: #2f7a43; }
/* A member's vault (#579), on My chips. */
.cl-vault { display: flex; flex-direction: column; gap: 10px; margin-bottom: 18px; max-width: 520px; }
.cl-vault-head { display: flex; align-items: baseline; gap: 12px; }
.cl-vault-head h2 { margin: 0; }
.cl-vault-chips { font: 400 24px var(--font-data); }
.cl-vault-forms { display: flex; flex-wrap: wrap; gap: 8px 16px; }
.cl-vault-form { display: flex; gap: 6px; align-items: center; }
.cl-vault-form .pl-text { width: 110px; }
.cl-vault-out { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 0; }
.cl-float-now { font-family: var(--font-data); margin-right: 8px; }
/* The passkey card (#575) in place of a club page until it's set up or used. */
.cl-pass .cl-backup-text { margin: 0; font-size: 14px; }
.cl-pass { margin: 16px 0; }
.cl-pass .cl-down { color: #b0391f; }
.cl-pass-acts { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; }
.cl-pass .link-btn { color: #7a5d28; }
.cl-settled { margin: 0; padding: 10px 14px; border-radius: 12px; background: #2f6b3d; color: #e3f4de; font-weight: 600; }
/* Changing a table (#736): the New table form in its card, in the card's colours. */
.cl-tcard .tf { flex-basis: 100%; }
.cl-tcard .tf .pl-label, .cl-tcard .tf label, .cl-tcard .tf-more summary { color: inherit; }
.cl-tcard .cl-sitform { flex-basis: 100%; box-shadow: none; padding: 10px 0 0; background: none; color: inherit; }
.cl-home-chips.owes { background: #c9472f; color: #fff4e8; }
.pl-addchips { display: flex; flex-direction: column; gap: 8px; }
.pl-addchips .pl-text { width: 140px; font-size: 15px; }
.pl-addchips .tr-btn { align-self: flex-start; }
@media (max-width: 1199px) {
  .mg-shell { grid-template-columns: 200px minmax(0, 1fr); }
}
@media (max-width: 760px) {
  .mg-shell { grid-template-columns: minmax(0, 1fr); }
  .mg-burger { display: inline-flex; }
  .mg-side { display: none; position: fixed; top: var(--demo-h, 0px); left: 0; bottom: 0; width: min(280px, 85%); z-index: 1150; overflow-y: auto; border-right: 0; box-shadow: 8px 0 32px rgba(0, 0, 0, 0.4); }
  .mg-shell.nav-open .mg-side { display: flex; }
  .mg-notes { width: 100%; }
  .mg-page { padding: 16px; }
  .mg-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .mg-h { font-size: 26px; }
  .mg-top { gap: 8px; padding: 0 12px; }
  .mg-top .wordmark { font-size: 0; gap: 0; }
  .mg-live.on { font-size: 0; gap: 0; padding: 6px; }
  .mg-switch > summary { font-size: 16px; max-width: 52vw; }
  .mg-members-head { display: none; }
  .mg-sort-pick { display: flex; }
  .mg-members .mg-active { min-width: 0; }
}

/* 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); }

/* The Tables page (#518): a row per game, opening to its tables. */
.mg-board { display: flex; flex-direction: column; background: #f3e7c9; color: #1d3a2c; border-radius: 14px; overflow: hidden; box-shadow: 0 4px 0 #0f2219; }
.mg-brow { display: grid; grid-template-columns: minmax(150px, 2fr) 70px 80px 60px 80px 70px minmax(150px, auto); align-items: center; gap: 8px; padding: 8px 14px; font-size: 14px; }
.mg-brow + .mg-brow { border-top: 1px solid #dccca3; }
.mg-bhead { font-size: 12px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: #4f5c48; }
.mg-bsub { background: #ebdcb8; }
.mg-bsub .mg-bgame { padding-left: 26px; }
.mg-bgame { display: flex; flex-direction: column; min-width: 0; }
.mg-bsub .mg-bgame { flex-direction: row; flex-wrap: wrap; align-items: center; gap: 6px; }
.mg-toggle { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; border: 0; background: none; padding: 0; font: 700 15px var(--font-ui); color: inherit; cursor: pointer; text-align: left; }
.mg-chev { width: 12px; font-size: 12px; color: #4f5c48; }
/* The chevron shows a game's tables; its name opens it (#544). */
.mg-bname { display: inline-flex; align-items: center; gap: 2px; }
.mg-chevbtn { display: inline-flex; align-items: center; justify-content: center; min-width: 28px; min-height: 36px; margin-left: -8px; border: 0; background: none; padding: 0; cursor: pointer; }
.mg-chevbtn:disabled { visibility: hidden; }
.mg-bname .mg-toggle { text-decoration: underline; text-decoration-color: #c9b98f; text-underline-offset: 3px; }
.mg-chain { font-family: var(--font-data); font-size: 12px; color: #4f5c48; }
.mg-num { font-family: var(--font-data); }
.mg-brow.waiting .mg-wait { color: #a33a22; font-weight: 700; }
.mg-bacts { display: flex; gap: 6px; justify-content: flex-end; flex-wrap: wrap; }
.mg-board .btn-small:not(.primary) { background: #fffaf0; color: #1d3a2c; border-color: #c9b98f; }
.mg-board .pl-meta { color: #5d6b55; }
.mg-sort { border: 0; background: none; padding: 0; min-height: 32px; font: inherit; color: inherit; letter-spacing: inherit; text-transform: inherit; cursor: pointer; }
.mg-sort.on::after { content: ' ▾'; }
.mg-tag { border-radius: 999px; padding: 2px 9px; font-size: 12px; font-weight: 700; white-space: nowrap; }
.mg-tag.main { background: #f3e7c9; color: #1d3a2c; border: 1px solid #c9b98f; }
.mg-tag.mm { background: #24472f; color: #f3c9a0; }
@media (max-width: 760px) {
  .mg-bhead { display: none; }
  .mg-brow { grid-template-columns: 1fr auto; }
  .mg-brow > :nth-child(n+2):not(.mg-bacts) { grid-column: auto; }
  .mg-brow > [data-label]::before { content: attr(data-label) ' '; font-family: var(--font-ui); color: #5d6b55; font-size: 12px; }
  .mg-bacts { grid-column: 1 / -1; justify-content: flex-start; }
  .mg-brow > span:empty { display: none; }
}
/* A game opened: its chain, its list and its tables. */
.mg-back { align-self: flex-start; min-height: 32px; }
.mg-chainrow { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.mg-chainrow .mg-chain { font-size: 14px; color: var(--fg-strong); }
.mg-game { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 22px; align-items: start; }
@media (max-width: 760px) { .mg-game { grid-template-columns: minmax(0, 1fr); } }
.mg-wl h3 { margin: 0 0 8px; font: 400 20px var(--font-display); color: var(--fg-strong); }
.mg-wlist { list-style: decimal inside; margin: 0; padding: 0; background: #f3e7c9; color: #1d3a2c; border-radius: 14px; overflow: hidden; }
.mg-wlist li { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 8px 8px 14px; }
.mg-wlist li + li { border-top: 1px solid #dccca3; }
.mg-wlist li.missed { opacity: .6; }
.mg-wlist .pl-meta { color: #5d6b55; font-size: 12px; }
.mg-wlist .btn-small { background: #fffaf0; color: #1d3a2c; border-color: #c9b98f; }
.mg-gtables { margin: 0; }
.cl-at-table.ordered { list-style: decimal inside; }
.cl-namemenu > summary { padding: 2px 6px; border-radius: 6px; }
.cl-namemenu > summary:hover, .cl-namemenu[open] > summary { background: rgba(0, 0, 0, 0.08); }
.cl-stack { font-family: var(--font-data); }
/* A game's Must move. */
.cl-mmform { display: flex; flex-direction: column; gap: 10px; background: #f3e7c9; color: #1d3a2c; border-radius: 14px; padding: 16px; max-width: 460px; }
.cl-mmform h3 { margin: 0; font: 400 20px var(--font-display); }
.cl-mmform label { display: flex; align-items: center; gap: 10px; min-height: 40px; }
.cl-mmform .pl-text { width: auto; background: #fffaf0; color: #1d3a2c; border-color: #c9b98f; }
.cl-mmform input[type=checkbox] { width: 18px; height: 18px; accent-color: #7a5d28; }
.cl-mm-more { display: flex; flex-direction: column; gap: 4px; }
.cl-mmform .btn-small:not(.primary) { background: #fffaf0; color: #1d3a2c; border-color: #c9b98f; }
.cl-mmform:has([name=on]:not(:checked)) .cl-mm-more { display: none; }
/* A member's games and the seat offered them (#518). */
.cl-game-head { flex-basis: 100%; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 2px 2px; list-style: none; }
.cl-game-head > span { display: flex; flex-direction: column; }
.cl-game-head .cl-mine { color: var(--amber); font-weight: 600; }
/* Games the club offers that aren't running: Join list, starting with how many. */
.cl-menu-head { margin: 18px 0 6px; font: 400 18px var(--font-display); color: var(--fg-strong); }
.cl-join-min { display: inline-flex; gap: 6px; align-items: center; }
.cl-join-min .pl-text { width: auto; }
/* A member's games (#741): one list, each Active or an interest list. */
.cl-games .cl-game-head { flex-wrap: wrap; }
.cl-games .cl-game-head + .cl-game-head, .cl-games .cl-tcard + .cl-game-head { margin-top: 10px; border-top: 1px solid var(--border); padding-top: 14px; }
.cl-game-head .cl-game-sub { display: flex; flex-direction: row; flex-wrap: wrap; align-items: center; gap: 4px 8px; margin-top: 2px; }
.cl-gtag { font-size: 11px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; padding: 2px 7px; border-radius: 999px; border: 1px solid var(--border); color: var(--fg); white-space: nowrap; }
.cl-gtag.on { border-color: #2f8f4e; background: #2f8f4e; color: #fff; }
/* Who's present (#741): a dot by a name, filled when they're here; the table someone's seated at. */
.cl-here { display: inline-block; width: 8px; height: 8px; margin-right: 6px; border-radius: 50%; border: 1.5px solid #9aa59a; vertical-align: middle; flex: none; box-sizing: border-box; }
.cl-here.on { background: #2f8f4e; border-color: #2f8f4e; }
.cl-seated { display: inline-block; margin-left: 6px; padding: 1px 7px; border-radius: 999px; background: #e7dcc0; color: #1d3a2c; font-size: 11px; font-weight: 600; vertical-align: middle; white-space: nowrap; max-width: 12em; overflow: hidden; text-overflow: ellipsis; }
.mg-who { display: inline-flex; align-items: center; min-width: 0; }
/* Scheduled games (#599): a member's Upcoming, the owner's Scheduled. */
.cl-sched-acts { display: inline-flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; }
.cl-sched-owner { margin: 16px 0; }
.cl-sched-owner .mg-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.cl-sched-owner h3 { margin: 0; }
.cl-sched-list { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 10px; }
.cl-sched-list > li { border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px; }
.cl-sched-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.cl-sched-row > span:first-child { display: flex; flex-direction: column; }
.cl-sched-roster { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-top: 8px; }
.cl-sched-roster h4 { margin: 0 0 4px; font-size: 13px; font-weight: 600; }
.cl-sched-roster ul { margin: 0; padding: 0; list-style: none; font-size: 13px; overflow-wrap: anywhere; }
.cl-schedform .tf-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 10px; }
.cl-schedform label { display: flex; flex-direction: column; gap: 4px; }
@media (max-width: 600px) { .cl-sched-roster { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.cl-offer { display: flex; align-items: center; gap: 12px; background: var(--teal); color: var(--on-accent); border-radius: 14px; padding: 12px 16px; margin-bottom: 10px; box-shadow: 0 4px 0 #7a5d28; }
.cl-offer > span:first-child { flex: 1; display: flex; flex-direction: column; }
.cl-offer .pl-meta { color: var(--on-accent); }
.cl-offer-time { font: 600 18px var(--font-data); }
.cl-offer .btn-small.primary { background: var(--on-accent); color: #f2d28a; border-color: var(--on-accent); }
/* At a must-move table: its tag opens the move order; moving up warns. */
.pl-promo-line.warn { background: #b23d26; color: #fff4e8; font-weight: 700; }
.pl-promo-line.mm-line { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.mm-tag { color: #f3c9a0; }
.mm-order { margin: 4px auto 0; max-width: 520px; background: #f3e7c9; color: #1d3a2c; border-radius: 12px; padding: 10px 14px; font-size: 13px; }
.mm-order ol { margin: 6px 0 0; padding: 0 0 0 20px; display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 2px 12px; }
.mm-order li.me { font-weight: 700; color: #7a5d28; }

/* The settlement site (settlement.html, settlement-view.js, #690): the club
   manager's page, rows and cards, one column. */
.st-main .st-page { max-width: 760px; margin: 0 auto; }
.st-main .site-signin { max-width: 420px; margin: 32px auto; }
.st-people a { flex-wrap: wrap; }
.st-limits { flex-basis: 100%; font-size: 12px; }
.st-over { color: #f0b04b; font-weight: 600; white-space: nowrap; }
.mg-stat .st-over { color: #a33a22; font-size: 13px; }
.st-totals-all { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.st-alerts h2 { display: flex; align-items: center; gap: 8px; }
.st-alerts li a { font-weight: 600; }
.st-alerts .cl-acts { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.st-me { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.st-myid { font-family: var(--font-data); font-size: 16px; color: var(--fg-strong); }
.st-row { display: flex; gap: 8px; flex-wrap: wrap; }
.st-row .pl-text { flex: 1 1 180px; min-width: 0; }
.st-field { display: flex; flex-direction: column; gap: 4px; }
.st-field .pl-text { width: 100%; }
.st-choice { display: flex; gap: 6px; flex-wrap: wrap; }
.st-choice .tf-opt input { position: absolute; opacity: 0; pointer-events: none; }
.st-choice .tf-opt:has(input:checked) { background: var(--teal); border-color: var(--teal); color: var(--on-accent); }
.st-limit:has([name=kind][value=unlimited]:checked) .st-amount { display: none; }
/* Club books (#706): an opening balance has a side, not a wallet. */
.st-club-record:has([name=kind][value=openingPlayer]:checked) .st-wallet,
.st-club-record:not(:has([name=kind][value=openingPlayer]:checked)) .st-direction { display: none; }
.st-player-form { display: flex; flex-direction: column; gap: 8px; }
.st-ref .pl-text { flex: 1; min-width: 0; }
.st-to-clubs { margin-left: auto; }
.st-clubs .mg-rows, .st-club .cl-list { margin-bottom: 8px; }
.st-history time, .st-history .cl-acts { white-space: nowrap; }
.st-back { align-self: flex-start; }
/* People not on ducy, and CSV import (#696). */
.st-local { opacity: 0.8; }
.st-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.st-csv a.btn-small { text-decoration: none; display: inline-flex; align-items: center; }
.st-imports time, .st-past time, .st-past .cl-acts { white-space: nowrap; }
.st-check { display: flex; align-items: center; gap: 6px; }
.st-scroll { overflow-x: auto; max-width: 100%; }
.st-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.st-table th, .st-table td { text-align: left; padding: 4px 6px; border-bottom: 1px solid var(--line, rgba(0,0,0,0.1)); vertical-align: middle; }
.st-table .pl-text { min-width: 90px; width: 100%; }
.st-table tr.st-bad { background: rgba(178, 61, 38, 0.08); }
.st-new { font-weight: 600; color: var(--teal); }
.st-total { border-top: 1px solid var(--line, rgba(0,0,0,0.15)); }
.st-paste { font-family: var(--font-data); }

/* One card face everywhere (#728): the card room table's. cardFace() in
   card-face.js draws rank over suit in the corner; the big suit is drawn here
   from data-suit, so a card's text stays "A♠". Each place keeps its own size
   and sets --cf, the rank's size; the rest scales from it. Empty slots,
   hovers and the picker's active card keep their own rules. */
:is(.tr-card, .board .bc, .seat-cards .sc, .picker-hand .ph-card, .dead-cards .dc, .pl-sc, .cl-pc, .qb-card, .cl-promo-card).cf {
  position: relative; display: inline-block; flex: none; box-sizing: border-box; min-width: 0; padding: 0; overflow: hidden;
  border-radius: 0.32em; background: #fffdf7; color: #1d1d1b; vertical-align: middle; text-align: left;
  font-family: var(--font-ui); font-size: var(--cf, 14px); font-weight: 700; line-height: 1;
}
:where(.cf) { box-shadow: 0 1px 4px rgba(0,0,0,0.3); }
:is(.tr-card, .board .bc, .seat-cards .sc, .picker-hand .ph-card, .dead-cards .dc, .pl-sc, .cl-pc, .qb-card, .cl-promo-card).cf.r { color: #b8261f; }
.four-color :is(.tr-card, .board .bc, .seat-cards .sc, .picker-hand .ph-card, .dead-cards .dc, .pl-sc, .cl-pc, .qb-card, .cl-promo-card).cf.s-d { color: #2f6fd6; }
.four-color :is(.tr-card, .board .bc, .seat-cards .sc, .picker-hand .ph-card, .dead-cards .dc, .pl-sc, .cl-pc, .qb-card, .cl-promo-card).cf.s-c { color: #2a7a4f; }
.cf .cf-ix { position: absolute; left: 0.26em; top: 0.21em; display: flex; flex-direction: column; align-items: center; }
.cf .cf-ix b { font-weight: 700; letter-spacing: -0.04em; }
/* A ten reads "10", as on the table; its text stays "T". */
.cf .cf-ix b[data-r] { font-size: 0; }
.cf .cf-ix b[data-r]::before { content: attr(data-r); font-size: var(--cf, 14px); letter-spacing: -0.04em; }
.cf .cf-ix i { font-style: normal; font-size: 0.74em; }
.cf::after { content: attr(data-suit); content: attr(data-suit) / ''; position: absolute; right: 0.26em; bottom: 0.16em; font-size: 1.55em; line-height: 1; }
/* Small cards: the corner alone. */
:is(.pl-sc, .cl-promo-card).cf::after { content: none; }

.tr-card { --cf: 26px; }
.tr-cards.omaha .tr-card { --cf: 22px; }
.ct-cards .tr-card { --cf: 15px; }
.board .bc { --cf: 13.5px; }
.seat-cards .sc { --cf: calc(var(--card-w) * 0.36); }
.picker-hand .ph-card { --cf: 14px; }
.dead-cards .dc { --cf: 12px; }
.qb-card { --cf: 19px; }
/* The replayer's: the table's hole card, its back and slot the same size. */
.cl-pc { --cf: 13px; width: 32px; min-width: 0; height: 45px; padding: 0; vertical-align: middle; }
.cl-pc.back { border: 2px solid #fffdf7; background:
  repeating-linear-gradient(45deg, rgba(255,255,255,0.12) 0 2px, transparent 2px 6px),
  repeating-linear-gradient(-45deg, rgba(255,255,255,0.12) 0 2px, transparent 2px 6px), #7a1f2b; }
.pl-sc, .cl-promo-card { --cf: 11px; width: 20px; height: 27px; margin: 0 1px; }
.pl-sum-board .pl-sc { --cf: 13px; width: 24px; height: 33px; }
@media (max-width: 640px) {
  .tr-card { --cf: 22px; }
  .tr-cards.omaha .tr-card { --cf: 16px; }
  .board .bc { --cf: 10.5px; }
}
@media (max-width: 520px) {
  .ct-cards .tr-card { --cf: 12.5px; }
}
@media (max-width: 340px) {
  .board .bc { --cf: 9px; }
}

/* ---- The rest of the site in the Card room style (#731): buttons are
   leather with the one to press in gold, as at the table; the felts drawn on
   Study pages are lit like the table's, on a leather rail with a gold edge,
   their seats on dark glass plates. Cream cards keep their own buttons. ---- */
:root { --leather: #1d1712; --leather-hi: #2a2018; --leather-edge: #5a4630; --leather-ink: #eadfc6; --room-glass-bg: rgba(12,16,13,0.9); }
.tr-btn, .tr-start.secondary, .game-btn { background: var(--leather); border-color: var(--leather-edge); color: var(--leather-ink); }
.tr-btn:hover, .tr-start.secondary:hover, .game-btn:hover { background: var(--leather-hi); border-color: var(--teal); color: var(--leather-ink); filter: none; }
.cc-btn, .btn-small { background: var(--leather); border-color: var(--leather-edge); color: var(--leather-ink); }
.cc-btn:hover, .btn-small:hover:not(:disabled) { border-color: var(--teal); }
.tr-btn.yes, .game-btn.on, .cc-btn.on, .btn-small.primary, .eq-chip.on, .eq-wide-btn.on { background: var(--teal); border-color: var(--teal); color: var(--on-accent); }
.tr-btn.yes:hover, .btn-small.primary:hover:not(:disabled) { background: var(--teal-hover); border-color: var(--teal-hover); }
.eq-wide-btn.on small { color: rgba(29,23,18,0.7); }
.tr-v3 .tr-btn.no { background: var(--leather); border-color: var(--leather-edge); color: var(--leather-ink); }
/* On cream cards these set only their text: keep them clear. */
.ct-track .cc-btn:not(.on), .qb-test .cc-btn:not(.on), .qs-offer .cc-btn:not(.on) { background: transparent; }

/* The felts: equity's, the practice table's and the trainers'. */
.felt, .ct-oval {
  border: 8px solid transparent;
  background:
    radial-gradient(ellipse at 50% 38%, #3d8a5f 0%, #2b6e49 45%, #1d5236 100%) padding-box,
    linear-gradient(180deg, #4a3222 0%, #2c1c12 100%) border-box;
  box-shadow: inset 0 0 0 2px #c9a45c, inset 0 8px 22px rgba(0,0,0,0.45), 0 16px 34px rgba(0,0,0,0.45);
}
.tr-felt:not(.tr-v3 .tr-felt) { background: radial-gradient(ellipse at 50% 38%, #3d8a5f 0%, #2b6e49 45%, #1d5236 100%); border-color: #4a3222; box-shadow: inset 0 0 0 2px #c9a45c, 0 10px 24px rgba(0,0,0,0.4); }
.seat-panel { background: var(--room-glass-bg); border-color: var(--leather-edge); box-shadow: 0 6px 14px rgba(0,0,0,0.4); }
.ct-plate { background: var(--room-glass-bg); color: var(--leather-ink); border: 1px solid var(--leather-edge); box-shadow: 0 4px 10px rgba(0,0,0,0.4); }
.ct-seat.hero .ct-plate { background: var(--room-glass-bg); color: #f2d28a; border-color: #c9a45c; }
.ct-seat.waiting .ct-plate { background: var(--room-glass-bg); color: rgba(234,223,198,0.6); }
.ct-button { background: #fffdf7; color: #1d1712; box-shadow: 0 2px 0 #b7ab92, 0 4px 8px rgba(0,0,0,0.45); }

/* Equity's side card: the leader in gold, suits as on the cards. */
.eq-bar > div.lead { background: #8a6420; }
.eq-c.s-s { color: #1d1d1b; } .eq-c.s-h { color: #b8261f; } .eq-c.s-d { color: #2f6fd6; } .eq-c.s-c { color: #2a7a4f; }

/* The club page redesign (#750): the balance chip, the chat button, sheets
   (Chips, Chat, a player, Invite), the Club tab, an agent's Players and the
   owner's Games board. */
.cl-bal { margin-left: auto; display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 6px 6px 6px 16px; border: 0; border-radius: 999px; background: #f3e7c9; color: #1d3a2c; font: 600 17px var(--font-ui); font-variant-numeric: tabular-nums; cursor: pointer; }
.cl-bal.owes { color: #a33a22; }
.cl-bal-plus { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--teal); color: var(--on-accent); font-size: 20px; line-height: 1; }
.cl-bal:hover .cl-bal-plus { background: var(--teal-hover); }
.cl-home-head .cl-bal { flex: none; }
@media (max-width: 640px) { .cl-home-head { flex-wrap: nowrap; } .cl-home-name { min-width: 0; } }
.cl-tab-n { display: inline-grid; place-items: center; min-width: 20px; height: 20px; margin-left: 6px; padding: 0 5px; border-radius: 10px; background: var(--teal); color: var(--on-accent); font-size: 12px; }
.cl-chat-btn { position: fixed; right: 20px; bottom: 24px; z-index: 900; width: 60px; height: 60px; border: 0; border-radius: 50%; background: var(--teal); color: var(--on-accent); display: grid; place-items: center; cursor: pointer; box-shadow: 0 6px 16px rgba(0, 0, 0, 0.35); }
.cl-chat-btn:hover { background: var(--teal-hover); }
.cl-chat-n { position: absolute; top: -4px; right: -4px; min-width: 24px; height: 24px; padding: 0 5px; border-radius: 12px; border: 2px solid var(--bg); background: #f3e7c9; color: #1d3a2c; font-size: 13px; font-weight: 700; display: grid; place-items: center; }
body.has-callbar .cl-chat-btn { bottom: 84px; }
/* Room under the page for the chat button. */
.cl-home { padding-bottom: 72px; }

.cl-sheet-wrap { position: fixed; inset: 0; z-index: 1160; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; }
.cl-scrim { position: absolute; inset: 0; background: rgba(10, 22, 16, 0.55); }
.cl-sheet { position: relative; width: min(560px, 100%); max-height: 92vh; overflow-y: auto; box-sizing: border-box; background: #f3e7c9; color: #1d3a2c; border-radius: 24px 24px 0 0; padding: 12px 24px 28px; display: flex; flex-direction: column; gap: 16px; box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.35); }
@media (min-width: 761px) { .cl-sheet-wrap:not(.full) { justify-content: center; } .cl-sheet-wrap:not(.full) .cl-sheet { border-radius: 24px; } }
.cl-grab { align-self: center; width: 44px; height: 5px; border-radius: 3px; background: #cdbb8e; }
.cl-sheet .pl-meta { color: #5d6b55; }
.cl-sheet .pl-text { width: 100%; min-width: 0; min-height: 48px; box-sizing: border-box; border: 1px solid #c9b98f; border-radius: 12px; padding: 0 14px; background: #fffaf0; color: #1d3a2c; font: 400 16px var(--font-ui); }
.cl-sheet .btn-small { min-height: 44px; justify-content: center; border-radius: 10px; font-size: 15px; padding: 0 14px; }
.cl-sheet .btn-small:not(.primary) { background: transparent; color: #1d3a2c; border-color: #c9b98f; }
.cl-sheet .btn-small.on { background: #1d3a2c; color: #f3e7c9; border-color: #1d3a2c; }
.cl-sheet .cl-sbig { min-height: 52px; font-size: 17px; }
.cl-sheet h2, .cl-sheet-h { margin: 0; font: 400 28px var(--font-display); color: #1d3a2c; }
.cl-sstats { display: grid; grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); gap: 10px; }
.cl-sstat { display: flex; flex-direction: column; gap: 2px; min-width: 0; background: #fffaf0; border-radius: 12px; padding: 12px 14px; }
.cl-sstat-label { font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: #5b5747; }
.cl-sstat-val { font-size: 24px; font-weight: 600; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.cl-sstat.owes .cl-sstat-val { color: #a33a22; }
.cl-slabel { font-size: 14px; font-weight: 600; color: #4a4636; }
.cl-askform { display: flex; flex-direction: column; gap: 10px; }
.cl-sheet .cl-ask-amt { font-size: 22px; font-weight: 600; min-height: 52px; }
.cl-asked { margin: 0; display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; font-size: 15px; }
.cl-answer { margin: 0; }
.cl-sacts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; border-top: 1px solid #e0d2ae; padding-top: 16px; }
.cl-sacts.two { grid-template-columns: repeat(2, minmax(0, 1fr)); border-top: 0; padding-top: 0; }
.cl-sheet .cl-vault-form { display: flex; gap: 10px; }
.cl-sheet .cl-vault-form .btn-small { flex: none; }
.cl-sheet .cl-getting { font-size: 14px; }

/* Chat: the whole screen on a phone, a panel on the right on a computer. */
.cl-sheet-wrap.full { justify-content: stretch; align-items: stretch; }
.cl-sheet-wrap.full .cl-sheet { width: 100%; height: 100%; max-height: none; border-radius: 0; background: var(--bg); color: var(--fg); padding: 16px 20px 20px; gap: 14px; }
@media (min-width: 761px) { .cl-sheet-wrap.full { align-items: flex-end; } .cl-sheet-wrap.full .cl-sheet { width: 420px; } }
.cl-chat-head { display: flex; align-items: center; justify-content: space-between; }
.cl-sheet-wrap.full h2 { color: var(--fg-strong); }
.cl-x { width: 44px; height: 44px; border: 0; background: none; color: var(--fg-strong); font-size: 22px; cursor: pointer; }
.cl-segs { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 4px; padding: 4px; background: var(--bg-inset); border-radius: 12px; }
.cl-segs.light { background: #e6d7b0; }
.cl-seg { min-height: 40px; border: 0; border-radius: 9px; background: transparent; color: var(--fg-muted); font: 600 15px var(--font-ui); cursor: pointer; }
.cl-seg.on { background: #f3e7c9; color: #1d3a2c; }
.cl-segs.light .cl-seg { color: #1d3a2c; }
.cl-segs.light .cl-seg.on { background: #1d3a2c; color: #f3e7c9; }
.cl-seg-n { color: #c8643a; }
.cl-segs:not(.light) .cl-seg.on .cl-seg-n { color: #a33a22; }
.cl-chat-body { flex: 1; min-height: 0; display: flex; flex-direction: column; gap: 12px; }
.cl-chat-status { margin: 0; align-self: center; display: flex; align-items: center; font-size: 13px; color: var(--fg-muted); }
.cl-chat-body .cl-thread { flex: 1; justify-content: flex-end; }
.cl-chat-body .cl-thread-lines li { background: #f3e7c9; color: #1d3a2c; border-radius: 16px 16px 16px 4px; padding: 10px 14px; font-size: 15px; max-width: 78%; }
.cl-chat-body .cl-thread-lines li.mine { background: var(--teal); color: var(--on-accent); border-radius: 16px 16px 4px 16px; }
.cl-chat-body .cl-thread-lines .pl-meta { color: inherit; opacity: .7; }
.cl-chat-body .cl-thread-form, .cl-chat-body .cl-lobby-form { margin-top: auto; flex-wrap: nowrap; }
.cl-chat-body .pl-text { background: var(--bg-inset); color: var(--fg); border-color: var(--border); min-height: 48px; font-size: 16px; border-radius: 12px; padding: 0 14px; }
.cl-chat-body .btn-small { min-height: 48px; padding: 0 18px; border-radius: 12px; font-size: 16px; }
.cl-lobby-chat { flex: 1; display: flex; flex-direction: column; gap: 10px; min-height: 0; }
.cl-lobby-chat .pl-meta { color: var(--fg-muted); }
.cl-lobby-chat .cl-lobby-log { max-height: none; flex: 1; border-top-color: var(--border); }
.cl-lobby-chat .cl-lobby-host { color: var(--teal); }

/* The Club tab. */
.cl-clubtab { display: flex; flex-direction: column; gap: 20px; }
.cl-csec { display: flex; flex-direction: column; }
.cl-home .cl-csec-h { margin: 0 0 6px; font: 600 13px var(--font-ui); letter-spacing: .08em; text-transform: uppercase; color: var(--fg-muted); }
.cl-crow { display: flex; justify-content: space-between; align-items: center; gap: 12px; min-height: 52px; border: 0; border-top: 1px solid var(--border); background: none; color: var(--fg-strong); font: 400 16px var(--font-ui); text-align: left; cursor: pointer; padding: 0; }
.cl-crow:hover { color: var(--teal-hover); }
.cl-chev { color: var(--teal); font-size: 22px; }
.cl-namerow { cursor: default; }
.cl-namerow:hover { color: var(--fg-strong); }
.cl-namerow-end { display: flex; align-items: center; gap: 12px; }
.cl-namerow .btn-small { min-height: 40px; font-size: 14px; border-radius: 10px; }
.cl-leave { align-self: flex-start; margin-top: 12px; min-height: 44px; font-size: 15px; color: #e89a84; padding: 0; }
.cl-clubsub { display: flex; flex-direction: column; gap: 12px; }
.cl-back { align-self: flex-start; min-height: 36px; font-size: 14px; padding: 0; }

/* An agent's Players. */
.cl-agent-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.cl-agent-owed { font-size: 15px; color: var(--fg-muted); }
.cl-agent-owed b { color: var(--fg-strong); }
.cl-agent-own { margin: 0; color: var(--fg-muted); }
.cl-agent-own b { color: var(--fg-strong); }
.cl-invite-btn { gap: 8px; min-height: 44px; padding: 0 14px; border-radius: 10px; border-color: var(--teal); font-size: 15px; color: var(--fg-strong); }
.cl-recruits { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.cl-recruit { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; background: var(--bg-raised); border-radius: 12px; padding: 10px 10px 10px 16px; }
.cl-recruit-who { display: flex; flex-direction: column; gap: 2px; min-width: 0; border: 0; background: none; padding: 0; color: var(--fg-strong); font: 600 16px var(--font-ui); text-align: left; cursor: pointer; }
.cl-recruit-who span { font-weight: 400; font-size: 14px; color: var(--fg-muted); overflow-wrap: anywhere; }
.cl-recruit .btn-small { min-height: 44px; border-radius: 10px; font-size: 15px; padding: 0 14px; }
.cl-recruit .cl-xbtn { width: 44px; justify-content: center; padding: 0; font-size: 18px; }
.cl-ptable { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.cl-phead, .cl-prow { display: grid; grid-template-columns: minmax(0, 1fr) 96px 80px; gap: 8px; align-items: center; padding: 0 4px; }
.cl-phead { padding-bottom: 8px; font-size: 13px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--fg-muted); }
.cl-phead span + span, .cl-prow > span + span { text-align: right; }
.cl-prow { width: 100%; min-height: 56px; border: 0; border-top: 1px solid var(--border); background: none; color: var(--fg-strong); font: 400 17px var(--font-ui); font-variant-numeric: tabular-nums; text-align: left; cursor: pointer; }
.cl-prow:hover { background: var(--bg-raised); }
.cl-pname { display: flex; align-items: center; gap: 2px; flex-wrap: wrap; min-width: 0; }
.cl-pname b { font-weight: 600; overflow-wrap: anywhere; }
.cl-pname .cl-new, .cl-pask { margin-left: 8px; }
.cl-pask { font-size: 13px; font-weight: 600; color: var(--teal); }
.cl-prow .cl-credit { color: var(--fg-muted); }
.cl-psheet-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.cl-psheet-head h2 { display: flex; align-items: center; gap: 4px; }
.cl-psheet-head .cl-here { width: 10px; height: 10px; }
.cl-moveform { display: flex; gap: 10px; }
.cl-moveform .pl-text { flex: 1; font-size: 22px; font-weight: 600; min-height: 52px; }
.cl-moveform .btn-small { flex: none; }
.cl-recent h3 { margin: 0 0 4px; font: 600 13px var(--font-ui); letter-spacing: .08em; text-transform: uppercase; color: #5b5747; }
.cl-recent ul { list-style: none; margin: 0; padding: 0; }
.cl-recent li { display: flex; justify-content: space-between; gap: 12px; min-height: 40px; align-items: center; border-top: 1px solid #e0d2ae; font-size: 15px; font-variant-numeric: tabular-nums; }
.cl-recent li span { color: #4a4636; }
.cl-sheet .cl-thread-lines li { background: #fffaf0; }
.cl-sheet .cl-thread-lines li.mine { background: #e6d7b0; }
.cl-qr { align-self: center; width: min(220px, 70vw); }
.cl-qr .qr { display: block; width: 100%; height: auto; border-radius: 16px; }

/* The owner's Games board: Game, Tables, Seated, Waitlist, Here, and Start or Open table. */
.mg-games .mg-brow { grid-template-columns: minmax(150px, 2fr) 70px 80px 80px 60px minmax(130px, auto); min-height: 56px; }
.mg-games .mg-num, .mg-games .mg-bhead span:nth-child(n+2):not(:last-child) { text-align: right; }
.mg-games .mg-bacts { align-items: center; }
.mg-games .mg-toggle { font-size: 16px; }
.mg-head-acts { margin-left: auto; display: flex; gap: 10px; }
.mg-head-acts .btn-small { min-height: 40px; padding: 0 16px; font-size: 14px; border-radius: 10px; }
.mg-head-acts .btn-small:not(.primary) { border-color: var(--teal); color: var(--fg-strong); }
@media (max-width: 760px) {
  .mg-games .mg-brow { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .mg-games .mg-bgame, .mg-games .mg-bacts { grid-column: 1 / -1; }
  .mg-games .mg-num { text-align: left; }
}
.cl-prow .cl-chips { font: inherit; color: inherit; }
/* A notice on a phone stays clear of the chat button. */
@media (max-width: 760px) { body:has(.cl-chat-btn) .pt-toast { left: 16px; transform: none; max-width: calc(100vw - 112px); } }
.mg-games .mg-num { white-space: nowrap; }
