:root {
  --bg: #0d1210;
  --panel: #151c19;
  --panel-2: #1c2521;
  --line: #2a3530;
  --text: #e8efe9;
  --muted: #8a9a91;
  --accent: #e3b341;
  --felt: #1d6b47;
  --felt-dark: #114a30;
  --rail: #3a2618;
  --hero: #e3b341;
  --check: #5aa0e6;
  --bet: #e07a3f;
  --fold: #8a9a91;
  --call: #4fbf7f;
  --raise: #d9534f;
  --s: #1b1b1b; --h: #d22f2f; --d: #2a6fd6; --c: #24914a;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--text);
  font: 14px/1.45 "Segoe UI", system-ui, -apple-system, sans-serif; }
#app { height: 100%; }
button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; }
button:disabled { cursor: default; opacity: .5; }
h1, h2, h3 { margin: 0 0 .5em; font-weight: 600; }
h3 { font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin-top: 18px; }
kbd { font: 11px ui-monospace, Consolas, monospace; padding: 1px 5px; border-radius: 4px; background: #0006; border: 1px solid #fff2; }
code { background: #0005; padding: 1px 5px; border-radius: 4px; }
.note { color: var(--muted); font-size: 13px; }
.desc { color: var(--muted); max-width: 70ch; }

.primary { background: var(--accent); color: #1b1405; font-weight: 600; padding: 9px 18px; border-radius: 8px; }
.primary:hover { filter: brightness(1.08); }
.primary.big { padding: 12px 26px; font-size: 15px; margin-top: 8px; }
.ghost { border: 1px solid var(--line); padding: 8px 14px; border-radius: 8px; }
.ghost:hover { background: var(--panel-2); }
.ghost.sm { padding: 3px 8px; font-size: 12px; margin-left: 4px; }

/* ---------- home ---------- */
.home { display: grid; grid-template-columns: 290px 1fr; height: 100%; }
.sidebar { background: var(--panel); border-right: 1px solid var(--line); padding: 18px 14px; overflow: auto; }
.brand { display: flex; align-items: center; gap: 9px; font-size: 18px; font-weight: 700; color: var(--accent); margin: 0 4px 18px; letter-spacing: .02em; }
.brand img { flex: none; }
.side-head { display: flex; justify-content: space-between; align-items: center; color: var(--muted);
  font-size: 12px; text-transform: uppercase; letter-spacing: .08em; margin: 0 4px 8px; }
.cfg-item { display: block; width: 100%; text-align: left; padding: 10px 12px; border-radius: 8px; margin-bottom: 4px; border: 1px solid transparent; }
.cfg-item:hover { background: var(--panel-2); }
.cfg-item.sel { background: var(--panel-2); border-color: var(--accent); }
.cfg-item.bad .cfg-file { color: var(--raise); }
.cfg-name { font-weight: 600; }
.cfg-file { font-size: 12px; color: var(--muted); }
.detail { padding: 28px 36px; overflow: auto; }
.facts { display: flex; flex-wrap: wrap; gap: 10px; margin: 16px 0 6px; }
.facts > div { background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 8px 12px; }
.facts span { display: block; font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.detail-cols { display: grid; grid-template-columns: auto 1fr; gap: 40px; align-items: start; }
.grid { display: grid; grid-template-columns: repeat(13, 34px); gap: 2px; }
.gc { height: 26px; font-size: 10.5px; display: grid; place-items: center; border-radius: 3px; background: #1a2320; color: #56655d; }
.gc.on { background: #2f7a52; color: #fff; }
.gc.on.pair { background: #3c9566; }
.script { padding-left: 18px; margin: 0; }
.script li { margin: 6px 0; }
.street-tag { display: inline-block; font-size: 10.5px; text-transform: uppercase; letter-spacing: .06em; background: var(--panel-2);
  border: 1px solid var(--line); color: var(--muted); padding: 1px 7px; border-radius: 10px; margin-right: 8px; }
.reps { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; }
.reps input { width: 90px; background: var(--panel); border: 1px solid var(--line); color: var(--text); padding: 7px 9px; border-radius: 6px; font: inherit; }
.errors { background: #3a1616; border: 1px solid #6b2525; padding: 12px 16px; border-radius: 8px; }
.empty { color: var(--muted); margin-top: 40px; }

/* ---------- table ---------- */
.table-screen { display: flex; flex-direction: column; height: 100%; }
.topbar { display: flex; align-items: center; gap: 20px; padding: 12px 20px; background: var(--panel); border-bottom: 1px solid var(--line); }
.tb-left { flex: 1; min-width: 0; }
.tb-title { font-weight: 600; margin-bottom: 6px; }
.progress { height: 5px; background: #0006; border-radius: 3px; overflow: hidden; max-width: 520px; }
.progress div { height: 100%; background: var(--accent); transition: width .25s; }
.tb-count { color: var(--muted); }
.tb-count b { color: var(--text); font-size: 16px; }
.table-body { flex: 1; display: grid; grid-template-columns: 1fr 300px; min-height: 0; }
.felt-wrap { display: flex; flex-direction: column; padding: 22px 26px 18px; min-width: 0; }
.felt { position: relative; flex: 1; min-height: 360px; }
.rail { position: absolute; inset: 7% 9%; border-radius: 50% / 50%;
  background: radial-gradient(ellipse at 50% 40%, var(--felt) 0%, var(--felt-dark) 75%);
  box-shadow: 0 0 0 14px var(--rail), 0 0 0 16px #000, 0 20px 50px #000a, inset 0 0 60px #0007; }
.center { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); text-align: center; }
.pot { display: inline-block; background: #0007; padding: 4px 14px; border-radius: 14px; margin-bottom: 10px; font-size: 13px; }
.pot b { color: var(--accent); font-size: 15px; }
.board { display: flex; gap: 6px; }

/* Cards size themselves from --cw (card width) set by their container. */
.card { width: 100%; height: 100%; border-radius: calc(var(--cw) * .11); background: #fbfbf7; display: flex; flex-direction: column;
  align-items: center; justify-content: center; box-shadow: 0 2px 6px #0008; font-weight: 700; line-height: 1; }
.card .r { font-size: calc(var(--cw) * .46); }
.card .s { font-size: calc(var(--cw) * .38); margin-top: 2px; }
.card.suit-s { color: var(--s); } .card.suit-h { color: var(--h); } .card.suit-d { color: var(--d); } .card.suit-c { color: var(--c); }
.card.back { background: repeating-linear-gradient(45deg, #7a1f2b 0 5px, #8f2a37 5px 10px); border: 3px solid #f2ebe0; }

.bslot { --cw: 54px; width: var(--cw); height: calc(var(--cw) * 1.4); border-radius: 6px; background: #0002; box-shadow: inset 0 0 0 1px #fff2; }
.bslot:has(.card) { background: none; box-shadow: none; }
.deck { position: absolute; left: 50%; top: 27%; transform: translate(-50%, -50%); --cw: 30px; width: 30px; height: 42px; z-index: 1; }
.deck .card { position: absolute; inset: 0; border-width: 2px; }
.deck .card:nth-child(2) { transform: translate(2px, -2px); }
.deck .card:nth-child(3) { transform: translate(4px, -4px); }
.fly { position: absolute; transform: translate(-50%, -50%); z-index: 20; pointer-events: none; display: flex; gap: 2px; }
.fly > .card { flex: none; }

.seat { position: absolute; transform: translate(-50%, -50%); display: flex; flex-direction: column; align-items: center; z-index: 2; transition: opacity .25s; }
.seat .hole { display: flex; gap: 3px; margin-bottom: -10px; z-index: 1; height: calc(var(--cw) * 1.4); }
.seat .slot { width: var(--cw); height: calc(var(--cw) * 1.4); }
.seat.hero { --cw: 58px; }
.seat.villain { --cw: 38px; }
.seat.bystander { --cw: 26px; }
.seat.bystander .hole { margin-bottom: -6px; }
.seat.bystander .card.back { border-width: 2px; }
.plate { background: #101614; border: 1px solid var(--line); border-radius: 10px; padding: 5px 14px; text-align: center; min-width: 96px; position: relative; z-index: 2; transition: box-shadow .2s, border-color .2s; }
.seat.bystander .plate { min-width: 74px; padding: 3px 10px; }
.plate .pos { font-size: 12px; font-weight: 700; letter-spacing: .04em; }
.plate .stack { font-size: 12px; color: var(--muted); }
.seat.hero .plate { border-color: var(--hero); }
.seat.hero .pos { color: var(--hero); }
.seat.turn .plate { border-color: #fff; box-shadow: 0 0 0 2px #fff6, 0 0 22px #ffffff44; }
.seat.hero.turn .plate { border-color: var(--hero); box-shadow: 0 0 0 2px var(--hero), 0 0 26px #e3b34177; animation: pulse 1.4s ease-in-out infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 2px var(--hero), 0 0 8px #e3b34133; } }
.seat.folded { opacity: .38; }
.seat.folded.hero, .seat.folded.villain { opacity: .5; }

.bubble { position: absolute; top: -14px; left: 50%; transform: translate(-50%, 0) scale(.8); opacity: 0; z-index: 5;
  background: #f4f1e8; color: #151515; font-weight: 700; font-size: 12px; padding: 3px 10px; border-radius: 12px; white-space: nowrap;
  box-shadow: 0 3px 10px #0008; transition: opacity .15s, transform .15s; pointer-events: none; }
.bubble.show { opacity: 1; transform: translate(-50%, -100%) scale(1); }
.seat.hero .bubble { top: -6px; }

.chip { display: inline-block; width: 14px; height: 14px; border-radius: 50%; flex: none;
  background: radial-gradient(circle, #e3b341 0 35%, #fff 36% 45%, #c0392b 46%); box-shadow: 0 1px 2px #000a; }
.bet { position: absolute; transform: translate(-50%, -50%); display: flex; visibility: hidden; min-width: 20px; min-height: 18px; align-items: center; gap: 5px; background: #000a; color: var(--accent);
  font-size: 12px; font-weight: 600; padding: 2px 9px 2px 3px; border-radius: 10px; z-index: 3; }
.bet.show { visibility: visible; }
.dealer { position: absolute; transform: translate(-50%, -50%); width: 22px; height: 22px; border-radius: 50%; background: #fff;
  color: #111; font-size: 11px; font-weight: 800; display: grid; place-items: center; box-shadow: 0 1px 4px #0009; z-index: 3; }
.pot-total { color: var(--muted); font-size: 12px; }

.decision { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; margin-top: 14px; }
.prompt { display: flex; align-items: center; gap: 4px; margin-bottom: 12px; }
.prompt .eff { margin-left: auto; color: var(--muted); font-size: 13px; }
.actions { display: flex; gap: 10px; flex-wrap: wrap; min-height: 58px; }
.act { flex: 1; min-width: 120px; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 10px 12px;
  border-radius: 10px; background: var(--panel-2); border: 1px solid var(--line); position: relative; transition: transform .06s, background .15s; }
.act:hover:not(:disabled) { transform: translateY(-1px); background: #24302b; }
.act kbd { position: absolute; top: 6px; left: 8px; opacity: .6; }
.act .lbl { font-weight: 700; font-size: 15px; }
.act .amt { font-size: 12px; color: var(--muted); }
.act-check { border-bottom: 3px solid var(--check); }
.act-bet { border-bottom: 3px solid var(--bet); }
.act-fold { border-bottom: 3px solid var(--fold); }
.act-call { border-bottom: 3px solid var(--call); }
.act-raise, .act-allin { border-bottom: 3px solid var(--raise); }
.act.chosen { background: #33402f; border-color: var(--accent); opacity: 1; outline: 2px solid var(--accent); }

.side { background: var(--panel); border-left: 1px solid var(--line); padding: 4px 16px 16px; overflow: auto; }
.log { font-size: 13px; }
.log-street { margin: 10px 0 4px; color: var(--accent); font-weight: 600; font-size: 12px; }
.log-line { padding: 2px 0; color: #c8d3cc; }
.log-line span { font-weight: 600; color: var(--text); }
.log-line.me span { color: var(--hero); }
.log-line.dead { color: var(--muted); }
.tally-row { display: grid; grid-template-columns: 1fr auto 44px; gap: 8px; padding: 3px 0; font-size: 13px; }
.tally-row i { color: var(--muted); font-style: normal; text-align: right; }

/* ---------- summary ---------- */
.summary { padding: 28px 36px; height: 100%; overflow: auto; }
.sum-cols { display: grid; grid-template-columns: 380px 1fr; gap: 24px; align-items: start; margin-top: 18px; }
.card-panel { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 4px 18px 18px; }
.freq { display: grid; grid-template-columns: 90px 1fr 40px 30px; align-items: center; gap: 10px; margin: 8px 0; }
.freq .bar { height: 10px; background: #0006; border-radius: 5px; overflow: hidden; }
.freq .bar div { height: 100%; background: var(--accent); }
.freq i { color: var(--muted); font-style: normal; font-size: 12px; text-align: right; }
.sum-buttons { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.hands table { width: 100%; border-collapse: collapse; font-size: 13px; }
.hands th { text-align: left; color: var(--muted); font-weight: 500; padding: 6px 8px; border-bottom: 1px solid var(--line); }
.hands td { padding: 5px 8px; border-bottom: 1px solid #ffffff08; }
.mini { display: inline-block; background: #f5f3ec; border-radius: 3px; padding: 0 4px; margin-right: 2px; font-weight: 700; font-size: 12px; }
.mini.suit-s { color: var(--s); } .mini.suit-h { color: var(--h); } .mini.suit-d { color: var(--d); } .mini.suit-c { color: var(--c); }
.act-cell { font-weight: 600; border-bottom: 1px solid #ffffff08 !important; }
td.act-check { color: var(--check); } td.act-bet { color: var(--bet); } td.act-fold { color: var(--fold); }
td.act-call { color: var(--call); } td.act-raise, td.act-allin { color: var(--raise); }

.speed { display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: 13px; }
.speed select { background: var(--panel-2); color: var(--text); border: 1px solid var(--line); border-radius: 6px; padding: 4px 6px; font: inherit; }
.push { margin-left: auto !important; }
.muted { color: var(--muted); }
.prompt #replay { margin-left: 10px; }
.actions-wait { flex: 1; height: 58px; border-radius: 10px; border: 1px dashed var(--line); }
.log .new { animation: logIn .25s ease-out; }
@keyframes logIn { from { opacity: 0; transform: translateX(6px); } }
.log-street .mini { font-size: 11px; }
.log-street span { color: var(--muted); font-weight: 400; }

/* ---------- hand end ---------- */
.banner { margin-top: 10px; min-height: 26px; font-weight: 700; font-size: 14px; opacity: 0; transition: opacity .2s; }
.banner.show { opacity: 1; display: inline-block; padding: 4px 14px; border-radius: 14px; background: #000a; }
.banner.won { color: #7be3a4; }
.banner.lost { color: #f0a0a0; }
.seat.winner .plate { border-color: #7be3a4; box-shadow: 0 0 0 2px #7be3a477, 0 0 22px #7be3a455; }

/* ---------- custom sizing ---------- */
.decision-row { display: grid; grid-template-columns: minmax(0, 1fr) 270px; gap: 10px; align-items: stretch; }
.decision-row .actions { flex-wrap: nowrap; min-width: 0; }
.decision-row .act { min-width: 0; padding: 10px 4px; }
.decision-row .act .lbl { font-size: 14px; white-space: nowrap; }
.custom { min-width: 0; display: grid; grid-template-columns: 1fr auto; gap: 6px 8px; align-items: center;
  background: var(--panel-2); border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; }
.custom input[type=range] { grid-column: 1 / 3; width: 100%; accent-color: var(--bet); }
.custom .cs-num { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); }
.custom .cs-num input { width: 74px; background: var(--panel); color: var(--text); border: 1px solid var(--line); border-radius: 6px; padding: 5px 7px; font: inherit; font-weight: 600; }
.custom .cs-go { padding: 7px 12px; border-radius: 8px; background: #3a2a1f; border: 1px solid var(--bet); font-weight: 700; white-space: nowrap; }
.custom .cs-go:hover { background: #4a3424; }
.custom.cs-raise .cs-go { background: #3a1f1f; border-color: var(--raise); }
.custom.cs-raise input[type=range] { accent-color: var(--raise); }
.chosen-note { margin-left: 6px; color: var(--accent); font-weight: 600; }
.result-line { font-weight: 700; }
.result-line.won { color: #7be3a4; } .result-line.lost { color: #f0a0a0; }

/* ---------- spot tallies ---------- */
.spot { margin: 8px 0 10px; }
.spot-name { font-size: 12px; color: var(--accent); font-weight: 600; margin-bottom: 2px; }
.spot-name i { color: var(--muted); font-style: normal; font-weight: 400; }
.spot-block { margin-bottom: 14px; }
.spot-block h4 { margin: 10px 0 4px; font-size: 13px; color: var(--accent); }
.spot-block h4 i { color: var(--muted); font-style: normal; font-weight: 400; }
.line-cell { font-size: 12px; color: #c8d3cc; }
.line-cell b { color: var(--muted); font-weight: 600; }
.net-pos { color: #7be3a4; font-weight: 600; } .net-neg { color: #f0a0a0; font-weight: 600; }
.sum-stats { display: flex; gap: 10px; flex-wrap: wrap; margin: 6px 0 4px; }
.sum-stats div { background: var(--panel-2); border: 1px solid var(--line); border-radius: 8px; padding: 6px 10px; font-size: 13px; }
.sum-stats span { display: block; font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.decision-row .act { padding-top: 16px; }
.decision-row .act kbd { top: 4px; left: 5px; font-size: 9.5px; padding: 0 4px; }
.custom:hover { border-color: #ffffff33; }
.banner.neutral { color: var(--text); }
.ptag { display: inline-block; margin: 1px 0 2px; padding: 0 7px; border-radius: 8px; font-size: 10px; font-weight: 700;
  letter-spacing: .05em; text-transform: uppercase; background: #5aa0e633; color: #9cc8f2; border: 1px solid #5aa0e655; }
.cfg-group { margin: 14px 4px 6px; font-size: 11px; color: var(--accent); text-transform: uppercase; letter-spacing: .08em; font-weight: 600; }
.cfg-group:first-child { margin-top: 0; }
.vpickers { display: grid; gap: 6px; margin-bottom: 14px; }
.vpick-row { display: flex; align-items: center; gap: 10px; }
.vpick-row span { width: 72px; flex: none; font-weight: 700; font-size: 13px; }
.vpick { background: var(--panel); color: var(--text); border: 1px solid var(--line); border-radius: 6px; padding: 6px 8px; font: inherit; min-width: 260px; max-width: 100%; }
.hands .ptag { margin: 0; }
.ptag-station { background: #4fbf7f33; color: #8fe0b0; border-color: #4fbf7f55; }
.ptag-nit { background: #8a9a9133; color: #c5d0ca; border-color: #8a9a9155; }
.ptag-aggro { background: #e07a3f33; color: #f2b08a; border-color: #e07a3f66; }
.ptag-maniac { background: #d9534f33; color: #f2a09e; border-color: #d9534f66; }
.ptag-trapper { background: #9b6fd633; color: #cbb3ef; border-color: #9b6fd666; }
.tb-sub { color: var(--muted); font-weight: 500; }
.mix-list { list-style: none; padding: 0; margin: 0; }
.mix-list li { padding: 3px 0; }
.mix-list .mix-group { margin-top: 10px; font-size: 11px; color: var(--accent); text-transform: uppercase; letter-spacing: .08em; font-weight: 600; }
.hands td { white-space: nowrap; }
.hands td.line-cell { white-space: normal; min-width: 90px; }
/* Fixed-height action bar: buttons appearing/disappearing must not resize the table. */
.decision { height: 150px; flex: none; box-sizing: border-box; overflow: hidden; }
.actions-wait { border: none; }

/* ---------- Claude coach ---------- */
.coach { margin-top: 24px; }
.coach-head { display: flex; align-items: baseline; gap: 10px; }
.coach-head .muted { font-size: 12px; }
.coach-log { display: flex; flex-direction: column; gap: 10px; margin: 6px 0 12px; }
.coach-msg { border-radius: 10px; padding: 10px 14px; line-height: 1.5; }
.coach-msg.user { align-self: flex-end; background: #2a2416; border: 1px solid #e3b34155; color: #f1dca6; max-width: 70%; }
.coach-msg.bot { background: var(--panel-2); border: 1px solid var(--line); }
.coach-msg.bot.error { border-color: #6b2525; background: #3a1616; }
.coach-msg.streaming { border-style: dashed; }
.coach-msg h3, .coach-msg h4, .coach-msg h5 { margin: 12px 0 4px; color: var(--accent); text-transform: none; letter-spacing: 0; font-size: 14px; }
.coach-msg h3:first-child, .coach-msg h4:first-child, .coach-msg h5:first-child { margin-top: 0; }
.coach-msg p { margin: 6px 0; }
.coach-msg ul, .coach-msg ol { margin: 4px 0; padding-left: 20px; }
.coach-msg li { margin: 3px 0; }
.coach-msg table { border-collapse: collapse; margin: 8px 0; font-size: 13px; }
.coach-msg th, .coach-msg td { border: 1px solid var(--line); padding: 4px 8px; text-align: left; }
.coach-msg code { font-size: 12px; }
.coach-msg hr { border: none; border-top: 1px solid var(--line); margin: 10px 0; }
.hand-ref { color: var(--accent); font-weight: 600; cursor: pointer; text-decoration: underline dotted; }
.coach-bar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.coach-form { flex: 1; display: flex; gap: 8px; min-width: 280px; }
.coach-form input { flex: 1; background: var(--panel); color: var(--text); border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; font: inherit; }
.coach-note { margin-top: 6px; font-size: 12px; }
.ask-hand { margin-left: 4px; font-size: 10px; padding: 1px 6px; border-radius: 6px; border: 1px solid var(--line); color: var(--accent); }
.ask-hand:hover:not(:disabled) { background: var(--panel-2); }
tr.flash td { animation: rowflash 1.6s ease-out; }
@keyframes rowflash { 0%, 30% { background: #e3b34133; } }

/* ---------- saved sessions ---------- */
.sessions-table { margin: 14px 0; padding-top: 10px; }
.sessions-table td { vertical-align: middle; }
.sm-btn { padding: 4px 12px; font-size: 13px; }
.coached { font-size: 11px; font-weight: 700; color: #9cc8f2; background: #5aa0e622; border: 1px solid #5aa0e655; border-radius: 8px; padding: 1px 7px; }
.sessions-entry { margin-bottom: 12px; border-color: var(--line); }
.sessions-entry .cfg-name::before { content: '\21BA  '; color: var(--accent); }
.vs-villain { display: flex; align-items: center; gap: 4px; margin: 2px 0; white-space: nowrap; }
.vcards .mini { font-size: 11px; }
.vcards.unseen { opacity: 0.55; }
.notes-label { display: block; margin-top: 14px; font-size: 12px; color: var(--muted); }
.notes-label textarea { display: block; width: 100%; box-sizing: border-box; margin-top: 4px; background: var(--panel); color: var(--text); border: 1px solid var(--line); border-radius: 6px; padding: 6px 8px; font: inherit; font-size: 13px; resize: vertical; }
.replay-tag { font-size: 11px; font-weight: 700; color: #cbb3ef; background: #9b6fd622; border: 1px solid #9b6fd655; border-radius: 8px; padding: 1px 7px; margin-left: 4px; }
.session-note { font-size: 12px; margin-top: 2px; }
.ai-ev { font-size: 11px; color: var(--muted); white-space: nowrap; margin-top: 2px; }
/* PLO: four hole cards per seat, smaller cards. Double board: two board rows. */
.felt.omaha .seat.hero { --cw: 44px; }
.felt.omaha .seat.villain { --cw: 29px; }
.felt.omaha .seat.bystander { --cw: 19px; }
.felt.omaha .seat .hole { gap: 2px; }
.felt.double-board .bslot { --cw: 42px; }
.felt.double-board .board.b2 { margin-top: 6px; }
.board2-mini { margin-top: 3px; }
.family-pick { display: flex; align-items: center; gap: 10px; margin: 0 4px 16px; font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; }
.family-pick select { flex: 1; background: var(--panel-2); color: var(--text); border: 1px solid var(--line); border-radius: 6px; padding: 6px 8px; font: inherit; font-size: 14px; text-transform: none; letter-spacing: 0; }
/* "Review later" marks */
.flag-btn { margin-left: auto; margin-right: 14px; background: none; border: 1px solid var(--line); color: var(--muted); border-radius: 16px; padding: 5px 12px; font-size: 13px; cursor: pointer; white-space: nowrap; }
.flag-btn:hover { color: var(--text); border-color: var(--muted); }
.flag-btn kbd { font-size: 10px; opacity: .7; margin-left: 4px; }
.flag-btn.on { color: #1a1406; background: var(--accent); border-color: var(--accent); font-weight: 700; }
.hands tr.flagged td { background: #e3b34118; }
.hands tr.flagged td:first-child { box-shadow: inset 3px 0 0 var(--accent); }
.flag-toggle { background: none; border: none; color: var(--muted); font-size: 15px; padding: 0 6px 0 0; cursor: pointer; line-height: 1; }
.hands tr.flagged .flag-toggle { color: var(--accent); }
.flag-toggle:hover { color: var(--accent); }
.hands-head { display: flex; align-items: center; gap: 12px; }
.flag-chip { font-size: 12px; text-transform: none; letter-spacing: 0; color: var(--accent); background: #e3b34118; border: 1px solid #e3b34166; border-radius: 12px; padding: 2px 10px; cursor: pointer; font-weight: 600; }
.flag-chip.on { background: var(--accent); color: #1a1406; }
.hands table.only-flagged tbody tr:not(.flagged) { display: none; }
/* Tiers */
.tier-box { margin: -6px 4px 16px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; font-size: 12px; color: var(--muted); line-height: 1.5; }
.tier-box b { color: var(--text); }
.tier-box.dev { border-style: dashed; border-color: #9b6fd688; }
.tier-box .sm { margin-left: 6px; }
.tier-pick { display: flex; flex-direction: column; align-items: stretch; gap: 4px; text-transform: uppercase; letter-spacing: .06em; font-size: 11px; color: #cbb3ef; }
.tier-pick select { min-width: 0; width: 100%; background: var(--panel-2); color: var(--text); border: 1px solid var(--line); border-radius: 6px; padding: 4px 6px; font: inherit; font-size: 12px; text-transform: none; letter-spacing: 0; }
.tier-usage { margin-top: 6px; }
.linkish { background: none; border: none; color: #cbb3ef; text-decoration: underline; cursor: pointer; padding: 0 2px; font-size: 12px; }
.upgrade-box { border: 1px solid #e3b34166; background: #e3b3410f; border-radius: 10px; padding: 12px 14px; margin: 6px 0 10px; }
.upgrade-box b { color: var(--accent); }
.upgrade-box p { margin: 6px 0 10px; color: var(--muted); font-size: 13px; }
.upgrade-box.inline { margin: 0 0 14px; font-size: 13px; }
.upgrade-box.inline .sm { margin-left: 8px; }
.credit-cost { font-size: 11px; font-weight: 500; opacity: .75; margin-left: 6px; }
.credits-left { font-size: 12px; color: var(--accent); }

/* ---------- account (sidebar) and dialogs ---------- */
.tier-account { display: flex; justify-content: space-between; gap: 6px; margin-top: 6px; padding-top: 6px; border-top: 1px solid var(--line); }
.tier-account > span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.tier-account > span:last-child { white-space: nowrap; }
.tier-box .linkish { color: var(--accent); }
.tier-box.dev .linkish { color: #cbb3ef; }
.tier-offline { margin-top: 4px; color: var(--bet); }
.modal-back { position: fixed; inset: 0; background: #000a; display: flex; align-items: center; justify-content: center; z-index: 100; padding: 16px; }
.modal { position: relative; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 22px 24px 18px; width: min(420px, 100%); max-height: calc(100vh - 32px); overflow: auto; box-shadow: 0 20px 60px #000c; }
.modal:has(.plans) { width: min(720px, 100%); }
.modal h2 { margin: 0 0 8px; font-size: 20px; }
.modal-x { position: absolute; top: 10px; right: 12px; background: none; border: none; color: var(--muted); font-size: 22px; cursor: pointer; line-height: 1; }
.modal-x:hover { color: var(--text); }
.modal form { display: flex; flex-direction: column; gap: 10px; margin-top: 12px; }
.modal form .primary { align-self: flex-start; }
.field { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: var(--muted); }
.field input { background: var(--panel-2); border: 1px solid var(--line); color: var(--text); padding: 8px 10px; border-radius: 6px; font: inherit; font-size: 14px; }
.field input:focus { outline: none; border-color: var(--accent); }
.field-hint { margin: -4px 0 0; font-size: 12px; color: var(--muted); }
.form-err { min-height: 1em; font-size: 13px; color: var(--raise); }
.modal-links { margin: 12px 0 0; font-size: 13px; color: var(--muted); }
.modal-links .linkish, .coach-msg.error .linkish { color: var(--accent); font-size: 13px; }
.plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 10px; margin: 14px 0 8px; }
.plan { border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; display: flex; flex-direction: column; gap: 6px; }
.plan.current { border-color: var(--accent); }
.plan-name { font-weight: 700; }
.plan-price { font-size: 22px; font-weight: 700; color: var(--accent); }
.plan-price span { font-size: 12px; font-weight: 400; color: var(--muted); }
.plan ul { margin: 0 0 6px; padding-left: 18px; font-size: 13px; color: var(--muted); flex: 1; }
.plan .primary { align-self: flex-start; }
.plan-tag { font-size: 12px; color: var(--accent); }

/* ---------- range editor ---------- */
.range-head { display: flex; align-items: center; gap: 8px; margin-top: 18px; }
.range-head h3 { margin: 0; }
.range-head + .grid { margin-top: 8px; }
.range-stats { font-size: 12px; color: var(--accent); }
.range-block.editing { border: 1px solid #e3b34155; border-radius: 10px; padding: 4px 12px 10px; margin: 10px -13px 0; background: #e3b34108; }
.range-block.editing .grid { user-select: none; }
.range-block.editing .gc { cursor: pointer; transition: none; }
.range-block.editing .gc:hover { outline: 1px solid var(--accent); }
.range-field { display: flex; flex-direction: column; gap: 4px; margin-top: 8px; font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); max-width: 470px; }
.range-field input, .range-field textarea { background: var(--panel); border: 1px solid var(--line); color: var(--text); padding: 6px 8px; border-radius: 6px; font: inherit; font-size: 12.5px; text-transform: none; letter-spacing: 0; resize: vertical; }
.range-field input:focus, .range-field textarea:focus { outline: none; border-color: var(--accent); }
.range-actions { display: flex; align-items: center; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.range-err { color: var(--raise); font-size: 12.5px; }
.range-summary { margin-top: 8px; font-size: 12.5px; color: var(--muted); line-height: 1.55; max-width: 470px; }
.range-summary b { color: var(--text); }
.range-summary span { display: inline-block; min-width: 58px; font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: #6f8077; }
.range-note-text { margin-top: 6px; font-style: italic; }
.custom-tag { color: var(--accent); font-weight: 600; }
.custom-bar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: -4px 0 12px; font-size: 13px; color: var(--muted); }
.custom-bar .custom-tag { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; border: 1px solid #e3b34166; border-radius: 10px; padding: 1px 8px; }
.startup-error { max-width: 560px; margin: 80px auto; padding: 0 24px; }
.home .sidebar { display: flex; flex-direction: column; }
.home .sidebar .cfg-list { flex: 1; }
.side-foot { display: flex; align-items: center; gap: 10px; margin: 16px 4px 0; padding-top: 12px; border-top: 1px solid var(--line); font-size: 12px; color: var(--muted); }
.side-foot .linkish { color: var(--muted); font-size: 12px; }
.side-foot .linkish:hover { color: var(--accent); }
.side-foot span { margin-left: auto; }
.update-banner { margin: 14px 0 0; padding: 10px 12px; border: 1px solid #e3b34188; background: #e3b34112; border-radius: 10px; font-size: 12.5px; display: flex; flex-direction: column; gap: 6px; }
.update-banner b { color: var(--accent); }
.update-banner span { color: var(--muted); }
.update-banner .primary { align-self: flex-start; }
.update-banner.quiet { border-color: var(--line); background: none; color: var(--muted); }

/* ---------- welcome screen (start-up) ---------- */
.splash { min-height: 100%; display: grid; place-items: center; padding: 32px 24px; overflow: auto;
  background: radial-gradient(ellipse 70% 60% at 50% 38%, #1d6b4733, transparent 70%), var(--bg); }
.splash-inner { max-width: 760px; text-align: center; display: flex; flex-direction: column; align-items: center; }
.splash-icon { width: 148px; height: 148px; animation: bob 4s ease-in-out infinite; filter: drop-shadow(0 14px 30px #0009); }
@keyframes bob { 0%, 100% { transform: translateY(0) rotate(-1deg); } 50% { transform: translateY(-8px) rotate(1deg); } }
@media (prefers-reduced-motion: reduce) { .splash-icon { animation: none; } }
.splash h1 { margin: 18px 0 6px; font-size: 38px; color: var(--accent); letter-spacing: -0.01em; }
.splash-tag { margin: 0; color: var(--muted); font-size: 17px; max-width: 560px; }
.splash-steps { list-style: none; counter-reset: step; padding: 0; margin: 30px 0 30px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; text-align: left; }
.splash-steps li { counter-increment: step; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 16px 16px 16px 52px; position: relative; }
.splash-steps li::before { content: counter(step); position: absolute; left: 14px; top: 14px; width: 26px; height: 26px; border-radius: 50%;
  background: var(--accent); color: #1b1405; font-weight: 700; font-size: 14px; display: grid; place-items: center; }
.splash-steps b { display: block; margin-bottom: 4px; }
.splash-steps span { color: var(--muted); font-size: 13.5px; line-height: 1.45; }
.splash-start { min-width: 200px; }
.splash-start.waiting { opacity: .75; cursor: progress; }
.splash-status { margin-top: 14px; color: var(--muted); font-size: 13px; display: flex; align-items: center; gap: 8px; }
.splash-status .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--muted); animation: pulse 1.2s ease-in-out infinite; }
.splash-status .dot.ok { background: var(--call); animation: none; }
.splash-status .dot.warn { background: var(--bet); animation: none; }
@keyframes pulse { 50% { opacity: .3; } }
.splash-skip { margin-top: 18px; color: var(--muted); font-size: 12.5px; display: flex; align-items: center; gap: 6px; cursor: pointer; }
@media (max-width: 760px) { .splash-steps { grid-template-columns: 1fr; } }
.gate-actions { display: flex; gap: 12px; margin: 26px 0 14px; flex-wrap: wrap; justify-content: center; }

/* ---------- phones and narrow windows ----------
   Wider than 700px nothing here applies. Below it: the home screen shows the spot list or one spot at a
   time (ui.homePane), the page scrolls instead of each panel, the table is taller than wide, and the
   hand log slides over the table from the Log button. */
.back-btn, .log-toggle, .side-close { display: none; }
@media (hover: none) { .keys-note, button kbd { display: none; } }
@media (max-width: 700px) {
  html, body { height: auto; min-height: 100%; }
  #app { height: auto; min-height: 100%; }
  .ghost.sm { padding: 6px 10px; }

  /* home */
  .home { display: block; height: auto; }
  .home.pane-list .detail, .home.pane-detail .sidebar { display: none; }
  .sidebar { border-right: none; padding: 16px 12px 20px; overflow: visible; min-height: 100vh; min-height: 100dvh; }
  .cfg-item { padding: 12px; }
  .detail { padding: 12px 16px 32px; overflow: visible; }
  .back-btn { display: inline-block; margin: 0 0 14px; padding: 8px 12px; }
  .detail h2 { font-size: 20px; }
  .detail-cols { grid-template-columns: minmax(0, 1fr); gap: 8px; }
  .grid { grid-template-columns: repeat(13, minmax(0, 1fr)); gap: 1px; max-width: 470px; }
  .gc { height: 25px; font-size: 8.5px; letter-spacing: -0.02em; border-radius: 2px; }
  .range-block.editing { margin: 10px -8px 0; padding: 4px 8px 10px; }
  .range-block.editing .grid { touch-action: none; }
  .vpick { min-width: 0; width: 100%; }
  .vpick-row span { width: 56px; }
  .reps input { width: 110px; }
  #start { width: 100%; }
  .sessions-table, .hands { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  #sessions-view table { display: block; overflow-x: auto; }

  /* table */
  /* Fills the screen; on short phones the page scrolls a little rather than squashing the table. */
  .table-screen { height: 100vh; height: 100dvh; min-height: 600px; position: relative; }
  .topbar { flex-wrap: wrap; gap: 8px 8px; padding: 8px 10px; }
  .tb-left { flex: 1 1 calc(100% - 90px); min-width: 0; display: flex; align-items: center; gap: 10px; }
  .tb-title { flex: 1; min-width: 0; margin: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 13px; }
  .tb-left .progress { flex: 0 0 70px; }
  .flag-btn { margin: 0; padding: 5px 10px; font-size: 12px; }
  .speed { font-size: 0; margin-left: auto; } /* just the dropdown: "Speed" doesn't fit */
  .speed select { font-size: 12px; padding: 4px 2px; }
  .tb-left + .flag-btn { order: 1; }
  .speed, .log-toggle, #end { order: 2; }
  .tb-count { font-size: 12px; flex: none; }
  .wide-only { display: none; }
  .tb-count b { font-size: 13px; }
  .topbar .ghost { padding: 5px 10px; font-size: 12px; }
  .log-toggle { display: inline-block; }
  .table-body { display: flex; flex-direction: column; }
  .felt-wrap { flex: 1; padding: 6px 6px 8px; min-height: 0; }
  .felt { min-height: 290px; }
  .rail { inset: 5% 11%; box-shadow: 0 0 0 9px var(--rail), 0 0 0 10px #000, 0 12px 30px #000a, inset 0 0 40px #0007; }
  .seat.hero { --cw: 44px; }
  .seat.villain { --cw: 28px; }
  .seat.bystander { --cw: 18px; }
  .seat .hole { margin-bottom: -7px; }
  .plate { min-width: 58px; padding: 2px 6px; border-radius: 8px; }
  .seat.bystander .plate { min-width: 48px; padding: 1px 5px; }
  .plate .pos, .plate .stack { font-size: 10.5px; }
  .ptag { font-size: 8.5px; padding: 0 4px; margin: 0; }
  .bubble { font-size: 10.5px; padding: 2px 7px; }
  .bet { font-size: 10.5px; padding: 1px 6px 1px 2px; }
  .chip { width: 11px; height: 11px; }
  .dealer { width: 17px; height: 17px; font-size: 9px; }
  .deck { --cw: 22px; width: 22px; height: 31px; top: 24%; }
  .bslot { --cw: 38px; }
  .board { gap: 4px; }
  .pot { font-size: 12px; padding: 2px 10px; margin-bottom: 6px; }
  .pot b { font-size: 13px; }
  .banner { font-size: 12.5px; margin-top: 6px; }
  .felt.omaha .seat.hero { --cw: 31px; }
  .felt.omaha .seat.villain { --cw: 17px; }
  .felt.omaha .seat.bystander { --cw: 13px; }
  .felt.omaha .seat .hole { gap: 1px; }
  .felt.omaha .seat.villain .card.back { border-width: 2px; }
  .felt.double-board .bslot { --cw: 32px; }

  .decision { height: 250px; margin-top: 6px; padding: 8px 8px; border-radius: 10px; }
  .prompt { margin-bottom: 8px; font-size: 13px; flex-wrap: wrap; }
  .prompt .eff { font-size: 11.5px; }
  .decision-row { grid-template-columns: minmax(0, 1fr); gap: 6px; }
  .actions, .decision-row .actions { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; min-height: 0; }
  .act, .decision-row .act { min-width: 0; padding: 5px 2px; border-radius: 8px; gap: 0; }
  .decision-row .act { padding-top: 5px; }
  .prompt #replay { padding: 3px 9px; margin-left: 6px; }
  .act .lbl, .decision-row .act .lbl { font-size: 13px; }
  .act .amt { font-size: 11px; }
  .actions-wait { height: 100px; grid-column: 1 / -1; }
  .custom { padding: 5px 8px; grid-template-columns: auto 1fr auto; }
  .custom input[type=range] { grid-column: 1 / -1; }
  .custom .cs-num input { width: 64px; }

  .side { position: absolute; z-index: 50; top: 0; right: 0; bottom: 0; width: min(330px, 88vw); border-left: 1px solid var(--line);
    box-shadow: -20px 0 50px #000c; transform: translateX(105%); transition: transform .2s ease-out; padding-top: 10px; }
  .table-screen.show-log .side { transform: none; }
  .side-close { display: block; margin: 0 0 4px auto; padding: 5px 12px; font-size: 12px; }

  /* summary */
  .summary { height: auto; padding: 16px 14px 32px; overflow: visible; }
  .summary h1 { font-size: 24px; }
  .sum-cols { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .card-panel { padding: 4px 12px 14px; }
  .freq { grid-template-columns: 76px 1fr 38px 26px; gap: 6px; font-size: 13px; }
  .hands table { min-width: 720px; }
  .coach-form { min-width: 0; flex: 1 1 100%; }
  .coach-form input { min-width: 0; }
  .coach-bar .coach-form button { flex: none; }
  .coach-msg.user { max-width: 88%; }
  .coach-bar .primary, .coach-bar .ghost { flex: 1 1 auto; }

  /* dialogs and the welcome screen */
  .modal { padding: 18px 16px 14px; }
  .splash { padding: 24px 16px; }
  .splash-icon { width: 112px; height: 112px; }
  .splash h1 { font-size: 30px; }
  .splash-tag { font-size: 15px; }
  .splash-steps { margin: 22px 0; }
  .gate-actions { flex-direction: column; align-items: stretch; width: 100%; max-width: 320px; }
}
/* A phone held sideways is too short for the table: ask for portrait instead of showing a squashed one. */
@media (hover: none) and (orientation: landscape) and (max-height: 500px) {
  .table-screen::after { content: 'Turn your phone upright to play.'; position: fixed; inset: 0; z-index: 200; display: grid; place-items: center;
    background: var(--bg); color: var(--muted); font-size: 16px; }
}

/* ---------- logo pressed into the felt ----------
   A shade darker than the felt, with a thin light edge below and a dark one above: reads as stamped
   into the cloth rather than printed on it. Sits under the board, bets and seats. */
.felt-logo { position: absolute; left: 50%; top: 69%; width: 30%; max-width: 300px; aspect-ratio: 1800 / 470; transform: translate(-50%, -50%);
  color: #0c3a25; opacity: .6; pointer-events: none; z-index: 0;
  filter: drop-shadow(0 1.5px 0 #ffffff1f) drop-shadow(0 -1px 0 #00000059); }
@media (max-width: 700px) { .felt-logo { width: 44%; top: 68.5%; } }
