/* Felt & Fold */
:root {
  --bg: #0b1812; --panel: #13251c; --panel2: #1a3125; --line: #2a4536; --text: #e7efe9; --muted: #9db3a6;
  --gold: #d9b44a; --gold2: #f0cf6a; --red: #c94a3d; --green: #3fa66b;
  --felt1: #1f6b45; --felt2: #134a2f; --rail: #3a2416;
  --math: #7fd0e0; --c-c: #1d7a3a; --c-d: #1f5fbf; --c-h: #c62828; --c-s: #161616;
  --g-good: #3fa66b; --g-inacc: #d4b13c; --g-mistake: #e07b30; --g-blunder: #d23d3d;
  /* action colours share nothing with the grade colours: check slate, call blue, bet and raise violet, all in deep violet, fold dark grey */
  --coach-bar: #c2b59b; --m-fold: #4a5059; --m-check: #7c9ca6; --m-call: #3d7fd6; --m-bet: #a98bec; --m-raise: #8a66dd; --m-allin: #5b35a8;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { background: var(--bg); color: var(--text); font: 15px/1.45 var(--font); overflow-x: hidden; -webkit-tap-highlight-color: transparent; }
body:not(.four-color) { --c-d: #c62828; --c-c: #161616; }
h1, h2, h3, h4 { margin: 0; font-weight: 700; }
p { margin: 0 0 .7em; }
.muted { color: var(--muted); }
.small { font-size: 13px; }

/* buttons */
.btn { font: inherit; color: var(--text); background: var(--panel2); border: 1px solid var(--line); border-radius: 10px; padding: 9px 16px; cursor: pointer; min-height: 40px; }
.btn:hover:not(:disabled) { border-color: #4b7560; background: #21402f; }
.btn:disabled { opacity: .45; cursor: default; }
.btn.primary { background: var(--gold); color: #1b1408; border-color: var(--gold); font-weight: 700; }
.btn.primary:hover:not(:disabled) { background: var(--gold2); border-color: var(--gold2); }
.btn.danger { background: #7d2a22; border-color: #a5392d; }
.btn.big { font-size: 18px; padding: 14px 20px; min-height: 54px; }
.btn.sm { padding: 5px 11px; min-height: 34px; font-size: 14px; }
.btn.link { background: none; border: none; color: var(--gold); padding: 2px 4px; min-height: 0; text-decoration: underline; }
.btn.icon { font-size: 18px; padding: 3px 10px; }

/* screens */
#app { min-height: 100%; }
.screen { display: none; min-height: 100vh; min-height: 100dvh; }
.screen.on { display: block; }
#scr-table.on { display: flex; flex-direction: column; height: 100vh; height: 100dvh; }

/* title */
.title-wrap { max-width: 460px; margin: 0 auto; padding: 12vh 18px 30px; text-align: center; }
.logo { display: flex; align-items: center; justify-content: center; gap: 14px; }
.logo h1 { font-size: 40px; letter-spacing: .5px; font-family: Georgia, "Times New Roman", serif; color: var(--gold2); }
.logo .suit { font-size: 30px; }
.logo .suit.s { color: #cfd8d2; } .logo .suit.h { color: #d0463a; }
.tag { color: var(--muted); margin: 10px 0 30px; }
.menu { display: flex; flex-direction: column; gap: 12px; }
.menu-row { display: flex; gap: 12px; } .menu-row .btn { flex: 1; }
.title-session { margin-top: 22px; }

/* lobbies */
.lobby-head { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border-bottom: 1px solid var(--line); background: var(--panel); position: sticky; top: 0; z-index: 2; }
.lobby-head h2 { font-size: 20px; }
.lobby { max-width: 760px; margin: 0 auto; padding: 18px 16px 40px; }
.lobby h4 { margin: 18px 0 8px; color: var(--gold2); font-size: 15px; }
.prose p, .prose dd { color: #d5e1d9; }
.bankroll { font-size: 18px; margin-bottom: 16px; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.bankroll b { color: var(--gold2); font-size: 22px; }
.stakes { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 12px; }
.stake { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 14px; display: flex; flex-direction: column; gap: 4px; }
.stake.locked { opacity: .55; }
.stake .sname { font-weight: 700; font-size: 17px; }
.stake .sblinds { color: var(--gold2); font-size: 20px; font-weight: 700; }
.stake .sbuy { color: var(--muted); font-size: 13px; margin-bottom: 8px; }
.pick { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 6px; }
.pick h4 { width: 100%; }
.btn.opt { flex: 1 1 140px; text-align: left; }
.btn.opt small { display: block; color: var(--muted); font-size: 12px; }
.btn.opt.on { border-color: var(--gold); background: #2c3a1c; box-shadow: inset 0 0 0 1px var(--gold); }
#tour-go, #custom-go { width: 100%; margin-top: 18px; }
.record { margin-top: 14px; color: var(--muted); text-align: center; }
.cseat { display: flex; align-items: center; gap: 8px; padding: 8px 0; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.cs-n { width: 56px; color: var(--muted); }
select, input[type=checkbox] { font: inherit; }
select { background: var(--panel2); color: var(--text); border: 1px solid var(--line); border-radius: 8px; padding: 7px 8px; min-height: 38px; }
.crow { display: flex; gap: 14px; flex-wrap: wrap; margin: 14px 0 8px; }
.settings .srow { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.settings input[type=checkbox] { width: 24px; height: 24px; accent-color: var(--gold); }
dl.labels { display: grid; grid-template-columns: auto 1fr; gap: 8px 12px; align-items: baseline; }
dl.labels dd { margin: 0; }
.buyin { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.buyin input { flex: 1; min-width: 160px; accent-color: var(--gold); }
.finish { text-align: center; padding-top: 8vh; }
.finish h2 { font-size: 30px; color: var(--gold2); margin-bottom: 8px; }
.finish .lead { color: var(--muted); }
table.results { margin: 18px auto; border-collapse: collapse; min-width: 260px; }
table.results th, table.results td { padding: 6px 14px; border-bottom: 1px solid var(--line); text-align: left; }
table.results tr.me td { color: var(--gold2); font-weight: 700; }
.btnrow { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }

/* table top bar */
.tbar { display: flex; align-items: center; gap: 10px; padding: 6px 10px; background: var(--panel); border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.tinfo { flex: 1; display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 13px; color: var(--muted); min-width: 0; }
.tinfo b { color: var(--text); font-size: 14px; }
.tbtns { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
#tctl { display: contents; }

/* felt */
.table-wrap { flex: 1; min-height: 0; display: flex; align-items: center; justify-content: center; padding: 8px 12px; }
.felt { position: relative; width: 100%; height: 100%; max-width: 1100px; max-height: 640px; }
.felt::before { content: ""; position: absolute; inset: 9% 7%; border-radius: 999px; background: radial-gradient(ellipse at 50% 45%, var(--felt1) 0%, var(--felt2) 75%);
  box-shadow: 0 0 0 10px var(--rail), 0 0 0 12px #5a3a22, 0 18px 40px rgba(0,0,0,.5), inset 0 0 60px rgba(0,0,0,.35); }
.seat, .bet, .dealer, .center { position: absolute; transform: translate(-50%, -50%); }
.seat { display: flex; flex-direction: column; align-items: center; width: 132px; z-index: 3; }
.slot-0.seat { left: 50%; top: 88%; } .slot-1.seat { left: 11%; top: 69%; } .slot-2.seat { left: 11%; top: 28%; }
.slot-3.seat { left: 50%; top: 10%; } .slot-4.seat { left: 89%; top: 28%; } .slot-5.seat { left: 89%; top: 69%; }
/* desktop: past 1100x640 the felt keeps that shape and grows to fill the space between the bars; seats, cards,
   pot and bets scale with it (--s = felt height / 640, held between 1 and 1.5), so 1280x720 and smaller look as before */
@media (min-width: 641px) {
  .table-wrap { container-type: size; }
  .felt { max-width: max(1100px, 100cqh * 1100 / 640); max-height: max(640px, 100cqw * 640 / 1100); }
  @supports (width: calc(1px * tan(atan2(1cqh, 640px)))) {
    .felt { --s: clamp(1, tan(atan2(min(100cqh, 100cqw * 640 / 1100), 640px)), 1.5); }
    .seat, .bet, .dealer, .center { transform: translate(-50%, -50%) scale(var(--s)); }
  }
}
.slot-0.bet { left: 50%; top: 66%; } .slot-1.bet { left: 27%; top: 61%; } .slot-2.bet { left: 27%; top: 38%; }
.slot-3.bet { left: 50%; top: 30%; } .slot-4.bet { left: 73%; top: 38%; } .slot-5.bet { left: 73%; top: 61%; }
/* the button disc hugs its own seat's plate on the felt side (beside the plate, nudged toward the pot), so it never
   sits between two seats or on the bet chips; offsets grow with the table (--s) */
.dealer { --ds: var(--s, 1); }
.slot-0.dealer { left: calc(50% + 100px * var(--ds)); top: calc(88% + 14px * var(--ds)); }
.slot-3.dealer { left: calc(50% + 100px * var(--ds)); top: calc(10% + 30px * var(--ds)); }
.slot-1.dealer { left: calc(11% + 102px * var(--ds)); top: calc(69% + 16px * var(--ds)); }
.slot-2.dealer { left: calc(11% + 102px * var(--ds)); top: calc(28% + 28px * var(--ds)); }
.slot-4.dealer { left: calc(89% - 102px * var(--ds)); top: calc(28% + 28px * var(--ds)); }
.slot-5.dealer { left: calc(89% - 102px * var(--ds)); top: calc(69% + 16px * var(--ds)); }
.hole { display: flex; gap: 3px; height: 50px; margin-bottom: -10px; position: relative; z-index: 1; }
.seat.hero .hole { height: 66px; margin-bottom: -12px; }
.plate { position: relative; z-index: 2; display: flex; align-items: center; gap: 7px; background: rgba(10,22,16,.92); border: 1px solid #2f4d3d; border-radius: 30px; padding: 4px 12px 4px 4px; min-width: 120px; box-shadow: 0 4px 12px rgba(0,0,0,.35); }
.av { width: 34px; height: 34px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 12px; color: #fff; flex: none; text-shadow: 0 1px 1px rgba(0,0,0,.4); }
.seat.hero .av { color: #1b1408; text-shadow: none; font-size: 11px; }
.pinfo { min-width: 0; line-height: 1.15; }
/* the name truncates; the position badge after it never does */
.pname { font-size: 13px; white-space: nowrap; max-width: 92px; display: flex; align-items: baseline; gap: 4px; min-width: 0; }
.pname .pn { overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.pname .pos { color: var(--gold); font-size: 11px; font-weight: 700; flex: none; }
.pstack { font-weight: 700; font-size: 14px; color: #f2f6f3; white-space: nowrap; }
.plabel { margin-top: 4px; background: rgba(0,0,0,.55); border-radius: 8px; padding: 1px 8px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.hudline { font-size: 10px; color: #b8cbbf; margin-top: 2px; white-space: nowrap; }
/* player read: a tag under the plate once a read is established; tap or hover for the numbers */
.readtag { margin-top: 3px; font: inherit; font-size: 10.5px; line-height: 1.3; color: #e9dfc0; background: rgba(40,30,8,.82); border: 1px solid rgba(217,180,74,.45);
  border-radius: 9px; padding: 1px 7px; white-space: nowrap; cursor: pointer; max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
.readtag .rn { color: #b8a978; }
.readtag.tell { white-space: normal; max-width: 130px; border-color: rgba(232,150,70,.75); } /* a beginner's open-size tell, this hand only */
.readtag:hover, .readtag[aria-expanded="true"] { border-color: var(--gold); }
.readpop { display: none; position: absolute; top: 100%; left: 50%; transform: translate(-50%, 4px); width: 200px; background: #f4f1e6; color: #222; font-size: 11.5px;
  line-height: 1.35; padding: 6px 9px; border-radius: 8px; z-index: 8; box-shadow: 0 3px 10px rgba(0,0,0,.45); text-align: left; }
.seat.readopen { z-index: 7; }
.seat.readopen .readpop { display: block; }
.slot-1.seat .readpop, .slot-2.seat .readpop { left: 0; transform: translate(0, 4px); }
.slot-4.seat .readpop, .slot-5.seat .readpop { left: auto; right: 0; transform: translate(0, 4px); }
.bubble { position: absolute; bottom: 100%; left: 50%; transform: translate(-50%, -4px); background: #f4f1e6; color: #222; font-size: 12px; padding: 4px 9px; border-radius: 10px; white-space: nowrap; z-index: 6; box-shadow: 0 2px 6px rgba(0,0,0,.4); }
.seat.folded .plate, .seat.folded .hole { opacity: .45; }
.seat.idle .plate { opacity: .6; }
.seat.acting .plate { border-color: var(--gold); box-shadow: 0 0 0 2px rgba(217,180,74,.35), 0 4px 12px rgba(0,0,0,.35); animation: pulse 1s ease-in-out infinite alternate; }
.seat.to-act .plate { border-color: var(--gold); }
.seat.winner .plate { border-color: var(--gold2); box-shadow: 0 0 0 3px rgba(240,207,106,.6), 0 0 22px rgba(240,207,106,.35); }
.seat.winner .plabel { background: var(--gold); color: #1b1408; }
@keyframes pulse { from { box-shadow: 0 0 0 2px rgba(217,180,74,.25); } to { box-shadow: 0 0 0 5px rgba(217,180,74,.45); } }
.bet { display: flex; align-items: center; gap: 5px; font-size: 13px; font-weight: 700; background: rgba(0,0,0,.35); padding: 1px 8px 1px 3px; border-radius: 12px; z-index: 2; white-space: nowrap; }
.chip { width: 14px; height: 14px; border-radius: 50%; background: radial-gradient(circle, #e9d9a0 0 35%, #b8452f 36% 100%); border: 2px dashed #f3e7c4; display: inline-block; }
.dealer { width: 30px; height: 30px; border-radius: 50%; background: #f4f1e6; color: #222; font-weight: 800; font-size: 10px; letter-spacing: .3px; line-height: 1; display: flex; align-items: center; justify-content: center; box-shadow: 0 2px 4px rgba(0,0,0,.5); z-index: 2; }
.center { left: 50%; top: 48%; display: flex; flex-direction: column; align-items: center; gap: 6px; z-index: 1; }
.pot { font-weight: 700; font-size: 15px; min-height: 20px; color: #f4ecd0; }
.pot .tot { color: var(--muted); font-weight: 500; font-size: 13px; }
.board { display: flex; gap: 5px; min-height: 70px; }
.msg { font-size: 14px; color: #dfe9e3; min-height: 18px; text-align: center; }

/* cards */
.card { width: 50px; height: 70px; border-radius: 6px; background: #fbfaf6; box-shadow: 0 2px 4px rgba(0,0,0,.45); position: relative; display: flex; flex-direction: column; align-items: flex-start; padding: 2px 0 0 5px; line-height: 1; user-select: none; }
.card.sm { width: 36px; height: 50px; padding: 2px 0 0 4px; }
.seat.hero .card.sm { width: 46px; height: 64px; }
.card.back { background: repeating-linear-gradient(45deg, #7a2430 0 4px, #8d2f3b 4px 8px); border: 2px solid #f1e9e0; }
.s-c { color: var(--c-c); } .s-d { color: var(--c-d); } .s-h { color: var(--c-h); } .s-s { color: var(--c-s); }
.ct { display: inline-block; background: #fbfaf6; border-radius: 4px; padding: 0 3px; margin: 0 1px; font-weight: 800; font-size: 14px; line-height: 1.35; }

/* action bar */
.actionbar { padding: 8px 12px calc(10px + env(safe-area-inset-bottom)); background: var(--panel); border-top: 1px solid var(--line); min-height: 64px; }
.bar-wait { color: var(--muted); text-align: center; font-size: 14px; padding: 12px 0; }
.actionbar.live { background: #172d22; }
/* desktop: the bar always keeps room for its tallest state (sizer + buttons), so the felt above it does not resize between turns */
@media (min-width: 641px) {
  .actionbar { flex: none; min-height: 156px; display: flex; flex-direction: column; justify-content: center; }
  .actionbar > * { width: 100%; }
}
.sizer { max-width: 640px; margin: 0 auto 8px; }
.presets { display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; }
.preset { flex: 1 1 0; min-width: 48px; }
.preset.on { border-color: var(--gold); color: var(--gold2); }
.slider-row { display: flex; align-items: center; gap: 10px; margin-top: 8px; }
.slider-row input { flex: 1; accent-color: var(--gold); height: 28px; }
.szval { display: flex; align-items: center; gap: 3px; flex: none; font-weight: 700; cursor: text; }
.szval input { width: 72px; height: 30px; padding: 2px 6px; text-align: right; font: inherit; font-weight: 700; color: inherit; background: rgba(0, 0, 0, .28); border: 1px solid rgba(255, 255, 255, .22); border-radius: 6px; }
.szval input:focus { outline: 2px solid var(--gold); outline-offset: 0; }
.szunit:empty, .szpre:empty { display: none; }
.acts { display: flex; gap: 10px; max-width: 640px; margin: 0 auto; }
.act { flex: 1 1 0; min-height: 54px; font-size: 17px; font-weight: 700; white-space: nowrap; }
.act.fold { background: #4a2a26; border-color: #7a3a32; }
.act.check, .act.call { background: #1f5a3c; border-color: #2f8a5a; }
.act.raise { background: var(--gold); color: #1b1408; border-color: var(--gold); }

/* review sheet and drawers */
.review { position: fixed; top: 0; right: 0; bottom: 0; width: 440px; max-width: 100%; background: #10201a; border-left: 1px solid var(--line); z-index: 40; transform: translateX(105%); transition: transform .22s ease, visibility 0s linear .22s; visibility: hidden; display: flex; box-shadow: -10px 0 30px rgba(0,0,0,.45); }
.review.open { transform: none; visibility: visible; transition: transform .22s ease; } /* a closed sheet keeps no focusable buttons */
.review.drawer { z-index: 35; }
.review .sheet { display: flex; flex-direction: column; width: 100%; height: 100%; }
.rv-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.rv-head h3 { font-size: 18px; }
.rv-sub { color: var(--muted); font-size: 13px; }
.close-x { min-height: 36px; padding: 4px 12px; }
.rv-sum { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 8px; padding: 10px 14px 4px; }
.rv-sum .net { margin-left: auto; font-weight: 700; }
.pos-net { color: #6fd39a; } .neg-net { color: #ec7b6e; }
.rv-grade { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: 6px 14px 10px; border-bottom: 1px solid var(--line); }
.rv-body { flex: 1 1 0; min-height: 0; overflow-y: auto; padding: 10px 14px 20px; -webkit-overflow-scrolling: touch; }
/* Firefox Android: at the very bottom of the review the swipe used to chain out of .rv-body to the page. That moved the
   dynamic toolbar and resized the viewport under the fixed sheet, and the footer button lost its label. The scroll now
   stops at the sheet's edge, the head and footer never shrink, and the footer paints on its own opaque layer. */
.rv-body { overscroll-behavior: contain; }
.rv-head, .rv-sum, .rv-grade, .rv-foot { flex: none; }
.rv-foot { position: relative; z-index: 1; background: #10201a; padding: 10px 14px calc(10px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); }
.rv-foot .btn { width: 100%; min-height: 50px; font-size: 17px; }
/* pinned footer buttons centre their label with flex and keep a fixed line box, so a viewport resize cannot push it out */
.rv-foot .btn, .dnext .btn { display: flex; align-items: center; justify-content: center; line-height: 1.2; white-space: nowrap; }
.pos { color: var(--gold); font-weight: 700; font-size: 13px; }
.grade { display: inline-block; padding: 1px 9px; border-radius: 10px; font-size: 12px; font-weight: 700; color: #111; }
.g-good { background: var(--g-good); } .g-inacc { background: var(--g-inacc); } .g-mistake { background: var(--g-mistake); } .g-blunder { background: var(--g-blunder); color: #fff; }
.evlost { color: #f0a59a; font-weight: 700; font-size: 13px; }
.src { display: inline-block; padding: 0 7px; border-radius: 6px; font-size: 11px; font-weight: 700; letter-spacing: .3px; border: 1px solid; cursor: help; }
.src-solved { color: #b79cff; border-color: #6e55c4; background: rgba(110,85,196,.15); }
.src-library { color: #7fc4ff; border-color: #2f74b4; background: rgba(47,116,180,.15); }
.src-estimate { color: #b3bcb6; border-color: #57625b; }
.src-chart { color: #e6cf8a; border-color: #8a7330; background: rgba(217,180,74,.12); }
.src-nash { color: #f0a98a; border-color: #a5573a; background: rgba(201,110,74,.14); }
.solving { color: var(--gold2); font-size: 12px; animation: blink 1.2s ease-in-out infinite alternate; }
@keyframes blink { from { opacity: .45; } to { opacity: 1; } }
.decision { padding: 10px 0 12px; border-bottom: 1px solid #22392d; }
.dhead { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; margin-bottom: 4px; }
.street { font-weight: 800; }
.dspot { color: var(--muted); font-size: 13px; }
.ddid { margin: 3px 0 6px; }
.mixrow { display: flex; align-items: flex-end; gap: 8px; }
.mixlab { font-size: 12px; color: var(--muted); line-height: 12px; flex: none; }
.mixcol { flex: 1; position: relative; min-width: 0; }
.mixcol.marked { padding-top: 15px; }
.youmark { position: absolute; top: 0; transform: translateX(-50%); font-size: 10.5px; font-weight: 800; line-height: 12px; color: #fff; white-space: nowrap; }
.youcaret { position: absolute; top: 12px; margin-left: -4px; border: 4px solid transparent; border-top-color: #fff; border-bottom: 0; }
.mixbar { display: flex; height: 12px; border-radius: 6px; overflow: hidden; background: #22392d; }
.mixbar i { display: block; height: 100%; }
.mixbar i + i { box-shadow: inset 1px 0 0 rgba(0,0,0,.45); }
.mixbar i.you { box-shadow: inset 0 0 0 2px #fff; }
.mixlegend .you { color: #fff; font-weight: 700; }
.dot-you { background: transparent; border: 2px solid #fff; width: 9px; height: 9px; box-sizing: border-box; }
.tbar .btn.units { min-width: 44px; font-weight: 700; }
#tb-more { display: none; }
.m-fold { background: var(--m-fold); } .m-check { background: var(--m-check); } .m-call { background: var(--m-call); }
.m-bet { background: var(--m-bet); } .m-raise { background: var(--m-raise); } .m-allin { background: var(--m-allin); }
.mixlegend { display: flex; flex-wrap: wrap; gap: 2px 12px; font-size: 12px; color: #c9d6ce; margin: 4px 0 6px; }
.dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 4px; }
.dtext { font-size: 14px; color: #dde7e1; margin: 4px 0 0; }
.dlater { font-size: 13px; color: #b8cbbf; font-style: italic; margin: 4px 0 0; }
.term { font: inherit; color: var(--gold2); background: none; border: none; padding: 0; margin: 0; cursor: pointer;
  text-decoration: underline dotted; text-underline-offset: 3px; -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
.term[aria-expanded="true"] { text-decoration-style: solid; }
.term:focus-visible { outline: 2px solid var(--gold); outline-offset: 1px; border-radius: 3px; }
.termdef { display: block; margin: 5px 0 6px; padding: 6px 9px; font-size: 13px; font-style: normal; color: var(--text); background: var(--panel2);
  border: 1px solid var(--line); border-left: 3px solid var(--gold); border-radius: 6px; }
.termdef b { color: var(--gold2); }
.num { font: inherit; color: var(--math); background: none; border: none; padding: 0; margin: 0; cursor: pointer; white-space: nowrap;
  text-decoration: underline dotted; text-decoration-color: var(--math); text-underline-offset: 3px; -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
.num[aria-expanded="true"] { text-decoration-style: solid; }
.num:focus-visible { outline: 2px solid var(--math); outline-offset: 1px; border-radius: 3px; }
.mathpop { display: block; margin: 5px 0 6px; padding: 7px 9px; font-size: 13px; font-style: normal; color: var(--text); background: var(--panel2); max-width: 100%;
  border: 1px solid var(--line); border-left: 3px solid var(--math); border-radius: 6px; overflow-wrap: anywhere; }
.mathpop b { color: var(--math); }
.mathpop .mwords { color: var(--muted); font-size: 12px; margin-top: 2px; }
.mathpop .mform { font-family: ui-monospace, Consolas, monospace; font-size: 13px; color: #f2f7f4; margin: 3px 0; }
.mathpop .msrc, .mathpop .mnote { color: #b8cbbf; font-size: 12px; margin-top: 3px; }
.mathpop .mmean { margin-top: 4px; }
.recap { margin-top: 14px; }
/* live coach: one line above the action bar; open, a fixed-height body that scrolls inside, so the felt keeps its size between turns */
.livecoach { flex: none; background: #102219; border-top: 1px solid var(--line); padding: 3px 12px; font-size: 13px; color: #dde7e1; }
.livecoach[hidden] { display: none; }
.lc-head { display: flex; align-items: center; gap: 8px; min-height: 30px; }
.lc-tog { font: inherit; font-weight: 700; color: var(--gold2); background: none; border: none; padding: 4px 2px; cursor: pointer; white-space: nowrap; min-height: 30px; }
.lc-car { display: inline-block; width: 1em; }
.lc-sum { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #c9d6ce; cursor: pointer; }
.livecoach .lc-hint { min-height: 30px; padding: 2px 10px; font-size: 13px; }
.livecoach .lc-hint:disabled { opacity: .45; cursor: default; }
.livecoach .lc-off { min-height: 30px; min-width: 34px; padding: 2px 8px; font-size: 13px; }
.lc-body { height: 150px; overflow-y: auto; overscroll-behavior: contain; padding: 0 2px 4px; }
.lc-body p { margin: 2px 0 4px; line-height: 1.35; }
.lc-body p b:first-child { color: var(--gold2); font-weight: 700; }
.lc-body .lc-ask { font-style: italic; }
.lc-body .lc-hinttxt { border-top: 1px dashed var(--line); padding-top: 4px; }
.lc-idle { color: var(--muted); }
.lc-solving { color: var(--gold2); font-size: 12px; }
.livecoach .termdef, .livecoach .mathpop { font-size: 12px; margin: 3px 0 4px; padding: 4px 7px; }
.hintused { display: inline-block; padding: 0 7px; border-radius: 6px; font-size: 11px; font-weight: 700; color: #f0cf6a; border: 1px dashed #b8963c; }
.recap h4 { color: var(--gold2); margin-bottom: 6px; }
.villain { padding: 8px 0; border-bottom: 1px solid #22392d; font-size: 14px; }
.villain p { margin: 4px 0 0; color: #cbd8d0; }
.villain .thinking { font-style: italic; color: #b7c8be; }
.made { color: var(--muted); font-size: 13px; }
.clean-line { padding: 16px 0; color: #cfe0d5; }
.hrow { display: flex; align-items: center; gap: 10px; width: 100%; background: none; border: none; border-bottom: 1px solid #22392d; color: var(--text); font: inherit; padding: 10px 2px; cursor: pointer; text-align: left; }
.hrow:hover { background: #18301f; }
.hrow .hn { width: 30px; color: var(--muted); }
.hrow .net { margin-left: auto; font-weight: 700; }
.hrow .vcards, .hrow .net, .hrow .grade, .hrow .pos { white-space: nowrap; flex-shrink: 0; }
.hrow .bl-short { display: none; }
/* a hand left out of Stats and the Coach: dimmed in History, with a small tag */
.hrow.hx > :not(.xtag) { opacity: .45; }
.hrow .xtag { flex-shrink: 0; white-space: nowrap; font-size: 11px; color: var(--muted); border: 1px solid var(--line); border-radius: 6px; padding: 1px 5px; }
.rv-excl { margin-left: auto; padding: 5px 11px; min-height: 34px; font-size: 14px; }
.rv-exnote { flex-basis: 100%; text-align: right; }
.stats-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.stats-grid div { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 10px; display: flex; flex-direction: column; }
.stats-grid b { font-size: 22px; } .stats-grid span { color: var(--muted); font-size: 12px; }
.gradecount { display: flex; flex-wrap: wrap; gap: 6px; margin: 12px 0; }
.leaks { padding-left: 20px; } .leaks li { margin-bottom: 6px; }
/* stats switch and the Coach (bars use one neutral sand colour, never a grade or baseline colour) */
.seg { display: flex; gap: 0; margin: 0 0 12px; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.seg .segb { flex: 1 1 50%; border: none; border-radius: 0; margin: 0; padding: 8px 6px; min-height: 40px; background: transparent; color: var(--muted); font-size: 13px; }
.seg .segb.on { background: var(--panel); color: var(--text, #eee); font-weight: 700; }
.coach h4 { margin: 18px 0 8px; } .coach h5 { margin: 10px 0 4px; font-size: 12px; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }
.coach-focus { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; }
.coach-focus p { margin: 6px 0; } .coach-focus .ctitle { font-size: 16px; } .crule { border-left: 3px solid var(--coach-bar); padding-left: 8px; }
.cex { margin-top: 8px; } .cex .hrow { margin-top: 4px; } .cex .cst { color: var(--muted); font-size: 12px; white-space: nowrap; }
.cbar { display: flex; align-items: center; gap: 8px; margin: 3px 0; font-size: 13px; }
.cbar .cl { flex: 0 0 104px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cbar .ct { flex: 1 1 auto; height: 10px; background: rgba(255,255,255,.06); border-radius: 5px; overflow: hidden; }
.cbar .ct i { display: block; height: 100%; background: var(--coach-bar); border-radius: 5px; }
.cbar .cv { flex: 0 0 auto; min-width: 52px; text-align: right; white-space: nowrap; color: var(--muted); }
.habit { margin: 8px 0; } .habit p { margin: 2px 0 0; } .habit .hv { font-weight: 700; }
.hok, .hoff { font-size: 11px; padding: 1px 6px; border-radius: 8px; border: 1px solid var(--line); color: var(--muted); }
.hoff { border-color: var(--coach-bar); color: var(--coach-bar); }

/* modal and toasts */
.modal-back { position: fixed; inset: 0; background: rgba(0,0,0,.55); display: flex; align-items: center; justify-content: center; z-index: 60; padding: 16px; }
.modal { background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 18px; width: 100%; max-width: 420px; max-height: 90vh; overflow-y: auto; box-shadow: 0 20px 50px rgba(0,0,0,.6); }
.modal h3 { margin-bottom: 10px; font-size: 19px; }
.modal-btns { display: flex; gap: 10px; justify-content: flex-end; margin-top: 14px; }
.modal-btns .btn { min-width: 96px; min-height: 46px; }
.toasts { position: fixed; top: 54px; left: 50%; transform: translateX(-50%); z-index: 70; display: flex; flex-direction: column; gap: 6px; align-items: center; pointer-events: none; width: max-content; max-width: calc(100% - 24px); }
.toast { background: rgba(14,30,22,.95); border: 1px solid var(--gold); color: var(--text); border-radius: 10px; padding: 7px 14px; font-size: 14px; transition: opacity .35s; text-align: center; }
.toast.out { opacity: 0; }

/* wide screens: the review sits beside the table */
@media (min-width: 1100px) {
  body:has(#review.open) #scr-table, body:has(#drawer.open) #scr-table { padding-right: 440px; }
}

/* painted art (art/): each block applies only once its group has loaded (body.art-*); the drawn look above is the fallback */
body.art-title #scr-title { background: linear-gradient(180deg, rgba(8,14,11,.35) 0%, rgba(8,14,11,.72) 38%, rgba(8,14,11,.84) 100%), url(../art/title.webp) center 30% / cover no-repeat var(--bg); }
body.art-title .title-wrap { padding-top: 30vh; }
body.art-title .logo h1, body.art-title .tag { text-shadow: 0 2px 10px rgba(0,0,0,.85); }
body.art-title .tag { color: #c4d3ca; }
/* painted rail: UI.Art.rail() sweeps art/rail.webp around the felt into #felt's background */
#felt { background-position: 0 0; background-size: 100% 100%; background-repeat: no-repeat; }
body.art-rail .felt::before { box-shadow: inset 0 0 60px rgba(0,0,0,.35); }
body.art-felt .felt::before { background: radial-gradient(ellipse at 50% 45%, rgba(40,140,90,.10) 0%, rgba(8,40,24,.0) 45%, rgba(6,30,18,.55) 100%), url(../art/felt.webp) center / 384px 384px repeat var(--felt2); }
body.art-backs .card.back { border: none; background: url(../art/backs/oxblood.webp) center / 100% 100% no-repeat #7a2430; box-shadow: 0 2px 4px rgba(0,0,0,.5); }
body.art-backs[data-back="vines"] .card.back { background-image: url(../art/backs/vines.webp); background-color: #22402a; }
body.art-backs[data-back="rosette"] .card.back { background-image: url(../art/backs/rosette.webp); background-color: #1d2a4a; }
body.art-backs[data-back="deco"] .card.back { background-image: url(../art/backs/deco.webp); background-color: #222; }
/* the marker art has a baked-in D, so the disc is drawn here in its colours and reads BTN like the seat tags */
body.art-markers .dealer { width: 32px; height: 32px; color: #3b2a12; font-family: Georgia, 'Times New Roman', serif; font-size: 10.5px; background: radial-gradient(circle, #f6edd6 0 58%, #e9dcb8 70%); border: 2.5px solid #b08a4a; box-shadow: inset 0 0 0 1.5px #f6edd6, inset 0 0 0 2.5px #c9a463, 0 2px 4px rgba(0,0,0,.55); }
.chips { display: inline-flex; align-items: center; padding-left: 2px; }
.chips img { width: 28px; height: 28px; margin-left: -18px; filter: drop-shadow(0 1px 1px rgba(0,0,0,.6)); }
.chips img:first-child { margin-left: 0; }
.bet:has(.chips) { padding-left: 2px; }
.pot { display: flex; align-items: center; gap: 6px; }
.pot .pile { height: 54px; width: auto; flex: none; filter: drop-shadow(0 2px 3px rgba(0,0,0,.5)); }
/* one chip is ~22px wide in every pot pile (chip widths in the art: s 58px, m 56px, l 56px); each pile sits on the same baseline in a 57x54 slot (the large one rises 9px above it) so the pot line never jumps */
.pot .pile-s { height: 42px; margin: 12px 6.5px 0; }
.pot .pile-m { height: 54px; margin: 0 2px; }
.pot .pile-l { height: 63px; margin: -9px 0 0; }
.av { position: relative; overflow: hidden; }
.av .portrait { position: absolute; inset: 0; width: 100%; height: 100%; border-radius: 50%; }
.pstk { width: 28px; height: auto; flex: none; margin-left: auto; filter: drop-shadow(0 1px 2px rgba(0,0,0,.6)); }
/* the stack art is one chip wide (~104px) at every height, so a fixed width keeps each chip 28px; tall stacks borrow the plate padding instead of growing it */
.pstk-7 { margin-block: -1px; }
.pstk-10 { margin-block: -5px; }
.ico { width: 16px; height: 16px; vertical-align: -3px; margin-right: 4px; }
.fin-star { width: 64px; height: 64px; display: block; margin: 0 auto 10px; }

/* phones in portrait */
@media (max-width: 640px) {
  body { font-size: 14px; }
  .hrow { gap: 8px; }
  .hrow .net { display: flex; flex-direction: column; align-items: flex-end; line-height: 1.15; }
  .hrow .bl-long { display: none; }
  .hrow .bl-short { display: block; font-size: 10.5px; font-weight: 400; }
  .logo h1 { font-size: 32px; }
  /* one slim strip: "←", the table and bankroll, "☰". Sit out, Top up, units, History, Stats, Settings and the
     hand count live in the ☰ menu (ui-modes.js openTableMenu); every tap target is at least 40px */
  .tbar { padding: 2px 4px; gap: 6px; flex-wrap: nowrap; }
  .tinfo { flex: 1 1 auto; flex-wrap: nowrap; align-items: baseline; gap: 8px; font-size: 11.5px; white-space: nowrap; overflow: hidden; }
  .tinfo b { font-size: 13px; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
  .tinfo span { flex: none; }
  .tinfo span ~ span { display: none; }
  .tbtns { margin-left: auto; gap: 4px; flex-wrap: nowrap; flex: none; }
  .tbar .btn.sm { padding: 3px 8px; min-height: 40px; min-width: 40px; font-size: 13px; }
  .tbar .btn.icon { padding: 3px 6px; font-size: 18px; }
  #tctl, #tb-units, #tb-hist, #tb-stats, #tb-coach, #tb-set { display: none; }
  #tb-more { display: inline-block; font-weight: 700; }
  #tb-menu .tb-word { display: none; } /* "←" alone; its aria-label says Leave table */
  #tb-menu { font-size: 18px; padding: 3px 6px; }
  .tmenu-back { position: fixed; inset: 0; z-index: 55; }
  .tmenu { position: absolute; top: 46px; right: 6px; width: min(240px, calc(100vw - 12px)); display: flex; flex-direction: column; gap: 4px; padding: 6px;
    background: var(--panel); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 12px 30px rgba(0,0,0,.6); }
  .tmenu .tmi { min-height: 44px; justify-content: flex-start; text-align: left; }
  .tmenu-info { padding: 6px 8px 2px; font-size: 12.5px; color: var(--muted); }
  .table-wrap { padding: 4px 2px; }
  .felt { max-height: none; }
  .felt::before { inset: 11% 13% 13%; border-radius: 46% / 32%; }
  /* the table screen is pinned to the visible viewport and never scrolls: a scrollable page let Firefox Android
     hide its toolbar, the viewport grew and the felt grew past the screen */
  html:has(#scr-table.on), html:has(#scr-table.on) body { overflow: hidden; overscroll-behavior: none; }
  #scr-table.on { position: fixed; inset: 0; height: auto; overflow: hidden; }
  /* the bar keeps room for its tallest state, so the felt does not resize between turns */
  .actionbar { flex: none; min-height: 138px; display: flex; flex-direction: column; justify-content: center; }
  .actionbar > * { width: 100%; }
  /* phone seats are anchored by the plate's centre (cards above, label and tags below), so bets and the dealer
     button sit at fixed pixel offsets from the plate and never land on a seat's cards, plate or label */
  .seat { width: 96px; transform: translate(-50%, -52px); }
  .seat.hero { transform: translate(-50%, -68px); }
  /* side seats sit at 15% / 85% but never closer than 62px to the edge, so a long name's plate stays on screen */
  .felt { --sxl: max(15%, 62px); --sxr: min(85%, calc(100% - 62px)); }
  .slot-0.seat { left: 50%; top: calc(86% + 10px); } .slot-1.seat { left: var(--sxl); top: 72%; } .slot-2.seat { left: var(--sxl); top: 31%; }
  .slot-3.seat { left: 50%; top: max(9%, 52px); } .slot-4.seat { left: var(--sxr); top: 31%; } .slot-5.seat { left: var(--sxr); top: 72%; }
  /* each seat's bet has its own spot on the line from its plate to the pot. hero: above the cards. top seat: below
     its label (and HUD line or read tag) */
  .slot-0.bet { left: 50%; top: calc(86% - 75px); }
  .slot-3.bet { left: 50%; top: calc(max(9%, 52px) + 55px); }
  .felt:has(.slot-3.seat .hudline) .slot-3.bet { top: calc(max(9%, 52px) + 68px); }
  .felt:has(.slot-3.seat .readtag) .slot-3.bet { top: calc(max(9%, 52px) + 71px); }
  .felt:has(.slot-3.seat .hudline):has(.slot-3.seat .readtag) .slot-3.bet { top: calc(max(9%, 52px) + 84px); }
  /* lower side seats: level with the cards, toward the pot. upper side seats: level with the plate, past its edge,
     so they stay clear of the top seat's bet and label. ui-table.js tidyPhone() slides any bet that still touches
     something along its line to the pot. */
  .slot-1.bet { left: calc(var(--sxl) + 46px); transform: translate(0, -50%); } .slot-5.bet { left: calc(var(--sxr) - 46px); transform: translate(-100%, -50%); }
  .slot-2.bet { left: calc(var(--sxl) + 66px); transform: translate(0, -50%); } .slot-4.bet { left: calc(var(--sxr) - 66px); transform: translate(-100%, -50%); }
  .slot-1.bet, .slot-5.bet { top: calc(72% - 40px); } .slot-2.bet, .slot-4.bet { top: 31%; }
  /* the button disc: beside the plate on the pot side. ui-table.js tidyPhone() moves a side seat's disc onto its
     plate's top inner corner; these spots are the start before it runs */
  .slot-0.dealer { left: calc(50% + 80px); top: calc(86% + 10px); } .slot-3.dealer { left: calc(50% + 80px); top: max(9%, 52px); }
  .slot-2.dealer { left: calc(var(--sxl) + 52px); top: calc(31% - 34px); } .slot-4.dealer { left: calc(var(--sxr) - 52px); top: calc(31% - 34px); }
  .slot-1.dealer { left: calc(var(--sxl) + 80px); top: 72%; } .slot-5.dealer { left: calc(var(--sxr) - 80px); top: 72%; }
  .bet { font-size: 12px; gap: 4px; }
  .center { top: 55%; width: max-content; gap: 4px; }
  .msg { max-width: calc(100vw - 210px); font-size: 13px; } /* wraps between the side seats' cards */
  .pot { white-space: nowrap; flex-wrap: wrap; justify-content: center; column-gap: 0; }
  .pot .tot { flex-basis: 100%; text-align: center; font-size: 11.5px; } /* phone: "(x in the middle)" on its own line keeps the pot line narrow */
  .plate { min-width: 0; padding: 3px 8px 3px 3px; gap: 5px; }
  .av { width: 28px; height: 28px; font-size: 10.5px; }
  .seat.hero .av { font-size: 9px; }
  .pstk { display: none; } /* phone: the stack number is enough */
  .pot .pile { display: none; } /* phone: the pot line stays narrow so bets beside it never overlap */
  .chips img { width: 16px; height: 16px; margin-left: -10px; }
  .dealer, body.art-markers .dealer { width: 28px; height: 28px; font-size: 9.5px; }
  body.art-title .title-wrap { padding-top: 24vh; }
  body.art-title #scr-title { background: linear-gradient(180deg, rgba(11,24,18,.35) 0%, rgba(11,24,18,.75) 60%, var(--bg) 100%) 50% 0 / 100% 64vh no-repeat,
    url(../art/title.webp) 50% 0 / auto 64vh no-repeat var(--bg); }
  .pname { font-size: 11.5px; max-width: 78px; gap: 3px; } /* fits the longest first name (Rosamund) with a position badge */
  .pname .pos { font-size: 10px; }
  .pstack { font-size: 12.5px; }
  .plabel { font-size: 11px; padding: 0 6px; white-space: normal; width: max-content; max-width: 112px; text-align: center; line-height: 1.3; } /* long showdown labels wrap */
  .seat.hero .plabel { max-width: 240px; } /* the hero's has the width of the table */
  .hole { height: 42px; margin-bottom: -8px; }
  .card.sm { width: 30px; height: 42px; padding: 1px 0 0 3px; }
  .seat.hero .hole { height: 62px; }
  .seat.hero .card.sm { width: 44px; height: 62px; }
  .card { width: 38px; height: 53px; padding: 2px 0 0 4px; }
  .board { gap: 3px; min-height: 53px; }
  .bubble { font-size: 11px; white-space: normal; width: max-content; max-width: 120px; }
  .hudline { font-size: 9px; }
  .readtag { font-size: 9.5px; padding: 0 5px; margin-top: 2px; }
  .readtag .rh { display: none; } /* phone: "calls a lot · 32" */
  .readpop { width: 160px; font-size: 11px; }
  /* phone: the bar is kept short (every tap target still 40px or more), so the felt gets the height */
  .actionbar { padding: 4px 8px calc(6px + env(safe-area-inset-bottom)); }
  .livecoach { padding: 1px 8px; font-size: 12px; }
  .lc-head { min-height: 28px; gap: 6px; }
  .lc-body { height: 118px; }
  .lc-body p { margin: 1px 0 3px; line-height: 1.3; }
  .sizer { margin-bottom: 4px; }
  .act { flex: 1 1 auto; min-height: 46px; font-size: 15px; padding: 6px 8px; min-width: 0; overflow: hidden; text-overflow: ellipsis; } /* labels stay on one line */
  .acts { gap: 8px; }
  .btn.preset { padding: 4px; min-height: 40px; } /* .btn.sm would hold it at 34px */
  .slider-row { gap: 8px; margin-top: 4px; }
  .slider-row input[type=range] { height: 26px; }
  .szval input { width: 64px; height: 28px; font-size: 16px; } /* 16px keeps phones from zooming in on focus */
  .review { width: 100%; border-left: none; }
  .stats-grid b { font-size: 19px; }
  .modal-btns .btn { flex: 1; }
}
@media (prefers-reduced-motion: reduce) { .seat.acting .plate, .solving { animation: none; } .review { transition: none; } }

/* ---------------------------------------------------------------- preflop drill (js/ui-drill.js) */
.drill { padding-top: 10px; padding-bottom: 24px; }
.drill-head-score { margin-left: auto; color: var(--gold2); font-weight: 700; font-size: 15px; }
.drill details { margin: 0 0 10px; }
.drill summary { cursor: pointer; color: var(--muted); font-size: 14px; padding: 6px 0; min-height: 32px; }
.dchips { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 6px; }
.dchips .btn.opt { flex: 0 1 auto; text-align: center; min-height: 36px; padding: 6px 11px; }
.dspotcard { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 10px; }
.dtop { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.dtop .muted { margin-left: auto; }
.dtype { font-weight: 700; color: var(--gold2); font-size: 15px; }
.dagain { font-size: 11px; font-weight: 700; color: #111; background: var(--gold); border-radius: 8px; padding: 1px 7px; }
.dseats { display: grid; grid-template-columns: repeat(6, 1fr); gap: 4px; }
.dseat { background: var(--panel2); border: 1px solid var(--line); border-radius: 8px; padding: 4px 2px; text-align: center; line-height: 1.2; min-width: 0; }
.dseat b { display: block; font-size: 12px; }
.dseat span { display: block; font-size: 11px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dseat em { display: block; font-style: normal; font-size: 12px; font-weight: 700; color: var(--text); }
.dseat.folded { opacity: .45; }
.dseat.in { border-color: #6d5bb0; }
.dseat.hero { border-color: var(--gold); box-shadow: inset 0 0 0 1px var(--gold); }
.dseat.hero span { color: var(--gold2); font-weight: 700; }
.dhand { display: flex; align-items: center; gap: 12px; margin-top: 10px; }
.dcards { display: flex; gap: 4px; flex: none; }
.dinfo { min-width: 0; }
.dline { font-size: 15px; margin: 0 0 4px; }
.dprice { font-size: 13px; color: var(--muted); margin: 0; }
.dacts { display: flex; gap: 8px; margin: 10px 0; }
.dact { flex: 1 1 0; min-width: 0; min-height: 54px; padding: 8px 6px; font-size: 16px; line-height: 1.2; font-weight: 700; position: relative; }
.dact.fold { background: #2c3236; } .dact.call { background: #1f3a5e; } .dact.raise { background: #3b2a66; }
.dact[aria-pressed="true"] { box-shadow: inset 0 0 0 2px #fff; }
.dact:disabled { cursor: default; opacity: .7; }
.dact[aria-pressed="true"]:disabled { opacity: 1; }
.drill kbd { display: none; }
@media (hover: hover) and (pointer: fine) {
  .drill kbd { display: inline-block; margin-left: 6px; font: 11px/1 inherit; padding: 2px 4px; border: 1px solid rgba(255,255,255,.3); border-radius: 4px; color: var(--muted); vertical-align: 1px; }
}
.dresult { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 10px; scroll-margin-top: 64px; }
.dresult.ok { border-color: #2f7a4f; } .dresult.miss { border-color: #8a4a2d; }
.dgrade { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.dgrade .grade { font-size: 14px; padding: 2px 11px; }
.dyou { font-weight: 700; }
.dsplit { margin: 0 0 8px; font-size: 14px; }
.dreason { font-size: 14px; line-height: 1.45; margin: 4px 0 10px; }
.dgrid { display: grid; grid-template-columns: repeat(13, 1fr); gap: 1px; background: #0a120e; border: 1px solid var(--line); border-radius: 6px; overflow: hidden; max-width: 460px; margin: 0 auto; }
.dcell { aspect-ratio: 1; display: flex; align-items: center; justify-content: center; font-size: 10px; font-weight: 700; color: #fff; text-shadow: 0 1px 1px rgba(0,0,0,.8); min-width: 0; overflow: hidden; }
.dcell.dead { opacity: .3; }
.dcell.me { outline: 2px solid #fff; outline-offset: -2px; box-shadow: inset 0 0 0 3px #000; position: relative; z-index: 1; opacity: 1; }
.dresult .mixlegend { justify-content: center; }
.dnext { position: sticky; bottom: 0; padding: 10px 0 calc(8px + env(safe-area-inset-bottom)); background: linear-gradient(to bottom, transparent, var(--bg) 30%); z-index: 3; }
.dnext .btn { width: 100%; min-height: 50px; }
.dempty { background: var(--panel); border: 1px dashed var(--line); border-radius: 14px; padding: 16px; text-align: center; }
.dscore { margin-top: 16px !important; }
.dtable { width: 100%; border-collapse: collapse; font-size: 13px; margin: 4px 0 8px; }
.dtable th { text-align: right; color: var(--muted); font-weight: 400; padding: 3px 6px; }
.dtable td { padding: 4px 6px; border-top: 1px solid var(--line); text-align: right; white-space: nowrap; }
.dtable td:first-child { text-align: left; white-space: normal; }
.dtable td small { color: var(--muted); }
.dtable tr.dall td { font-weight: 700; }
.dtable tr.dsep td { color: var(--gold2); text-align: left; padding-top: 10px; }
@media (max-width: 640px) {
  .drill { padding-left: 12px; padding-right: 12px; }
  .dcell { font-size: 8px; letter-spacing: -.3px; }
  .dline { font-size: 14px; }
}
@media (max-width: 360px) { .dcell { font-size: 7px; } .dact { font-size: 14px; } }
.btn.primary kbd { color: inherit !important; border-color: rgba(0,0,0,.35) !important; }
