/* Texas Hold'em. Everything is laid out against the game's own box (#th), never the window; game.js sets the card
   sizes (--hw mine, --bw board, --ow other seats) on .th-table from the table's measured size. */
.th { max-width: 1040px; margin: 0 auto; }
.th-sr { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.th [hidden] { display: none !important; }

/* ---- top bar ---- */
.th-top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 8px; margin: 0 0 8px; }
.th-opts { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; flex: 1 1 320px; min-width: 0; }
.th-tools { display: flex; flex-wrap: wrap; gap: 6px; }
.th-tools .ck-btn { min-height: 44px; }
.th-tools .ck-btn-icon { width: 44px; }
.th-seg { display: inline-flex; padding: 3px; gap: 3px; border-radius: 12px; background: #0b1328; border: 1px solid #1c2b4a; }
.th-segb { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 40px; padding: 0 13px; border: 0; border-radius: 9px; background: transparent; color: #8aa3c4; font: inherit; font-size: 13.5px; font-weight: 750; cursor: pointer; white-space: nowrap; touch-action: manipulation; }
.th-segb svg { width: 16px; height: 16px; flex: none; }
.th-segb[aria-pressed="true"] { background: #1a2a4d; color: #fff; box-shadow: inset 0 0 0 1px #33508a; }
.th-segb:focus-visible, .th-sel:focus-visible, .th-q:focus-visible, .th-nudge:focus-visible, .th-act:focus-visible, .th-amt:focus-visible, .th-range:focus-visible, .th-tier:focus-visible { outline: 2px solid #55d6ff; outline-offset: 2px; }
.th-sel { min-height: 44px; padding: 0 30px 0 12px; border-radius: 10px; border: 1px solid #1c2b4a; background: #0b1328 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%238aa3c4' stroke-width='1.8' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat right 10px center / 11px; color: #dfe9ff; font: inherit; font-size: 13.5px; font-weight: 700; -webkit-appearance: none; appearance: none; cursor: pointer; }
.th-cs { display: none; }
@media (max-width: 620px) {
  .th-top { gap: 6px; justify-content: flex-end; }
  .th-opts, .th-tools { display: contents; }
  .th-seg { order: 1; flex: 1 1 calc(100% - 110px); }
  .th-segb { flex: 1 1 auto; padding: 0 8px; }
  #th-help { order: 2; } #th-mute { order: 3; }
  #th-game { order: 4; flex: 1 1 120px; min-width: 0; }
  #th-new { order: 6; } #th-leave { order: 6; flex: 1 1 auto; } #th-hist { order: 7; } #th-rank { order: 8; }
  .th-top .ck-btn { min-height: 44px; } .th-top .ck-btn-icon { width: 44px; }
}

/* ---- stage: the table, then the action bar ---- */
.th-stage { position: relative; display: flex; flex-direction: column; gap: 6px; height: clamp(600px, 82vh, 900px); outline: none; touch-action: manipulation; -webkit-tap-highlight-color: transparent; user-select: none; -webkit-user-select: none; }
/* narrow phones: the picker keeps its whole label, the tools stay in two rows */
@media (max-width: 430px) { .th-ng { display: none; } #th-new { min-width: 48px; } }
@media (max-width: 380px) {
  .th-segb { padding: 0 6px; font-size: 13px; }
  .th-segb svg { display: none; }
  .th-sel { padding: 0 22px 0 10px; font-size: 12.5px; background-position: right 7px center; }
}
@media (max-width: 620px) { .th-stage { height: clamp(540px, calc(100vh - 176px), 760px); height: clamp(540px, calc(100dvh - 176px), 760px); } }
.th-table { position: relative; flex: 1 1 auto; min-height: 0; border-radius: 16px; overflow: hidden; border: 1px solid #16233f; background: radial-gradient(ellipse at 50% 40%, #0c1630 0%, #060b1a 70%, #04060f 100%); --hw: 60px; --bw: 50px; --ow: 36px; }
.th-felt { position: absolute; left: 7%; right: 7%; top: 6.5%; bottom: 9%; border-radius: 999px; border-width: 0; box-shadow: 0 0 0 7px #101b36, 0 0 0 8.5px #2a4274, 0 0 0 9.5px rgba(85,214,255,0.25), 0 18px 40px rgba(0,0,0,0.55), inset 0 0 60px rgba(0,0,0,0.45); }
.th-tall .th-felt { left: 9%; right: 9%; top: 5.5%; bottom: 7.5%; border-radius: 42% / 24%; }
.th-rail { position: absolute; inset: 9px; border-radius: inherit; border: 1.5px solid rgba(255,255,255,0.10); }

/* seats: the card pair tucked behind a name plate */
.th-seat { position: absolute; z-index: 4; width: 0; height: 0; --cw: var(--ow); --ch: calc(var(--ow) * 1.4); --fs: calc(var(--ow) * 0.36); --pw: calc(var(--ow) * 2 + 16px); }
.th-pod { position: absolute; left: 0; top: 0; width: var(--pw); transform: translate(-50%, -50%); transition: opacity .3s ease; }
.th-cards { position: relative; height: calc(var(--ch) * 0.72); width: calc(var(--cw) * 2 + 4px); margin: 0 auto; }
.th-cards .ck-card:nth-child(2) { left: calc(var(--cw) + 4px); }
.th-plate { position: relative; z-index: 2; min-height: 36px; padding: 3px 7px 6px; border-radius: 10px; border: 1px solid #2a3d66; background: linear-gradient(180deg, #18264a, #0c1530); box-shadow: 0 4px 12px rgba(0,0,0,0.45); text-align: center; overflow: hidden; transition: border-color .2s ease, box-shadow .2s ease; }
.th-name { display: flex; justify-content: center; align-items: baseline; font-size: 11.5px; line-height: 1.25; font-weight: 700; color: #9fb5d6; white-space: nowrap; overflow: hidden; }
.th-name .th-nt { min-width: 0; overflow: hidden; text-overflow: ellipsis; }   /* the name gives way; the CPU tag always shows */
.th-seat:not(.th-me) .th-pod { container-type: inline-size; }
.th-name .th-cpu { display: inline-block; margin-left: 4px; padding: 0 4px; border-radius: 4px; background: rgba(138,163,196,0.18); color: #8aa3c4; font-size: 9.5px; font-weight: 800; letter-spacing: 0.04em; vertical-align: 1px; flex: none; }
@container (max-width: 84px) {   /* a narrow seat: a smaller CPU tag and plate edges, so a four-letter name still shows in full */
  .th-plate { padding-left: 4px; padding-right: 4px; }
  .th-name { font-size: 10.5px; }
  .th-name .th-cpu { margin-left: 3px; padding: 0 2px; font-size: 8px; letter-spacing: 0; }
}
.th-stack { display: block; font-size: 13.5px; line-height: 1.25; font-weight: 800; color: #fff; font-variant-numeric: tabular-nums; white-space: nowrap; }
.th-timer { position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: rgba(255,255,255,0.08); display: none; }
.th-timer i { display: block; height: 100%; width: 100%; transform-origin: 0 50%; background: #55d6ff; }
.th-timed .th-timer { display: block; }
.th-big .th-seat:not(.th-me) .th-name { font-size: 12.5px; } .th-big .th-seat:not(.th-me) .th-stack { font-size: 15px; }
.th-big .th-seat:not(.th-me).th-out .th-stack { font-size: 13px; } .th-big .th-seat:not(.th-me).th-open .th-stack { font-size: 12.5px; }
.th-big .th-me .th-stack { font-size: 16.5px; }
.th-timed.th-late .th-timer i { background: #ff6b81; }
.th-turn .th-plate { border-color: #55d6ff; box-shadow: 0 0 0 2px rgba(85,214,255,0.35), 0 0 20px rgba(85,214,255,0.45); }
.th-turn .th-name { color: #dff6ff; }
.th-win .th-plate { border-color: #ffd166; box-shadow: 0 0 0 2px rgba(255,209,102,0.45), 0 0 24px rgba(255,209,102,0.5); }
.th-folded .th-pod { opacity: 0.5; }
.th-out .th-pod { opacity: 0.38; }
.th-out .th-stack { color: #8aa3c4; font-size: 12px; }
.th-off .th-name::after { content: '· away'; margin-left: 4px; flex: none; color: #ff9fae; }
.th-open .th-plate { border-style: dashed; background: rgba(11,19,40,0.6); }
.th-open .th-stack { color: #8aa3c4; font-size: 11.5px; font-weight: 700; }
.th-me { --cw: var(--hw); --ch: calc(var(--hw) * 1.4); --fs: calc(var(--hw) * 0.33); --pw: calc(var(--hw) * 2 + 22px); }
.th-me .th-cards { height: calc(var(--ch) * 0.86); width: calc(var(--cw) * 2 + 6px); }
.th-me .th-cards .ck-card:nth-child(2) { left: calc(var(--cw) + 6px); }
.th-me .th-plate { display: flex; align-items: baseline; justify-content: center; gap: 8px; min-height: 30px; padding: 5px 10px 7px; }
.th-me .th-name { font-size: 12.5px; flex: 0 1 auto; min-width: 0; }
.th-me .th-stack { font-size: 15px; flex: none; }
/* a small table: the plate is tighter so "You" is never cut by a five-figure stack */
.th-tight .th-me .th-plate { gap: 6px; padding: 5px 7px 7px; } .th-tight .th-me .th-stack { font-size: 14px; }
.th-tight .th-me.th-out .th-stack { font-size: 12.5px; }
.th-tag { position: absolute; left: 0; top: 0; z-index: 5; transform: translate(-50%, -50%) scale(0.6); padding: 3px 9px; border-radius: 999px; font-size: 11.5px; font-weight: 850; letter-spacing: 0.02em; white-space: nowrap; color: #06101f; background: #dfe9ff; box-shadow: 0 3px 10px rgba(0,0,0,0.5); opacity: 0; pointer-events: none; transition: opacity .16s ease, transform .2s cubic-bezier(.2,1.4,.4,1); margin-top: calc(var(--ch) * -0.52); }
.th-tag.on { opacity: 1; transform: translate(-50%, -50%) scale(1); }
/* side seats: the tag hugs the table edge so it is never cut off */
.th-sl .th-tag { left: calc(var(--pw) * -0.5); transform: translate(0, -50%) scale(0.6); transform-origin: 0 50%; }
.th-sl .th-tag.on { transform: translate(0, -50%) scale(1); }
.th-dl .th-tag { left: calc(var(--pw) * 0.5); transform: translate(-100%, -50%) scale(0.6); transform-origin: 100% 50%; }
.th-dl .th-tag.on { transform: translate(-100%, -50%) scale(1); }
.th-tag.t-fold { background: #5b6b86; color: #fff; } .th-tag.t-check { background: #9fd8ff; } .th-tag.t-call { background: #7be3a5; }
.th-tag.t-bet, .th-tag.t-raise { background: #ffd166; } .th-tag.t-allin { background: #ff6b81; color: #fff; } .th-tag.t-win { background: #ffd166; } .th-tag.t-muck { background: #5b6b86; color: #fff; }
.th-dealer { position: absolute; z-index: 6; left: 0; top: 0; width: 20px; height: 20px; margin: calc(var(--ch) * 0.36 - 40px) 0 0 calc(var(--pw) * 0.5 - 13px); border-radius: 50%; background: radial-gradient(circle at 35% 30%, #fff, #d9dfeb); color: #0b1328; font-size: 11px; font-weight: 900; line-height: 20px; text-align: center; box-shadow: 0 2px 5px rgba(0,0,0,0.55), inset 0 0 0 1.5px rgba(11,19,40,0.25); }
.th-seat .ck-card { transition: transform .25s ease, filter .25s ease, opacity .25s ease; }
.th-seat .ck-card.th-lift, .th-board .ck-card.th-lift { transform: translateY(-9%); box-shadow: 0 0 0 2px #ffd166, 0 6px 14px rgba(0,0,0,0.5); z-index: 3; }
.th-seat .ck-card.th-lift { z-index: 1; }   /* under the name plate: a lit card never hides the name */
.th-dimmed .ck-card:not(.th-lift) { filter: brightness(0.5) saturate(0.7); }
.th-seat.th-shown { z-index: 7; }

/* seats, bets, board and pot are placed in pixels by layout() in table.js */


.th-bet { position: absolute; z-index: 5; translate: var(--tx, -50%) -50%; display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px 2px 3px; border-radius: 999px; background: rgba(3,7,16,0.62); color: #fff; font-size: 12.5px; font-weight: 800; font-variant-numeric: tabular-nums; white-space: nowrap; }
.th-chip { width: 16px; height: 16px; flex: none; border-radius: 50%; background: #e8504f; box-shadow: inset 0 0 0 2px rgba(255,255,255,0.9), inset 0 0 0 3.5px #e8504f, inset 0 0 0 4.5px rgba(255,255,255,0.5), 0 1px 2px rgba(0,0,0,0.6); }
.th-chip.c2 { background: #2f8fe0; box-shadow: inset 0 0 0 2px rgba(255,255,255,0.9), inset 0 0 0 3.5px #2f8fe0, inset 0 0 0 4.5px rgba(255,255,255,0.5), 0 1px 2px rgba(0,0,0,0.6); }
.th-chip.c3 { background: #27a567; box-shadow: inset 0 0 0 2px rgba(255,255,255,0.9), inset 0 0 0 3.5px #27a567, inset 0 0 0 4.5px rgba(255,255,255,0.5), 0 1px 2px rgba(0,0,0,0.6); }
.th-chip.c4 { background: #1d2333; box-shadow: inset 0 0 0 2px rgba(255,209,102,0.95), inset 0 0 0 3.5px #1d2333, inset 0 0 0 4.5px rgba(255,209,102,0.5), 0 1px 2px rgba(0,0,0,0.6); }






/* the middle of the table */
.th-board { position: absolute; z-index: 3; left: 50%; top: 45%; --cw: var(--bw); --ch: calc(var(--bw) * 1.4); --fs: calc(var(--bw) * 0.34); width: calc(var(--bw) * 5 + 16px); height: var(--ch); transform: translate(-50%, -50%); }

.th-slot { position: absolute; top: 0; width: var(--cw); height: var(--ch); border-radius: calc(var(--cw) * 0.1); border: 1.5px dashed rgba(255,255,255,0.13); box-sizing: border-box; }
.th-board .ck-card { transition: transform .25s ease, filter .25s ease; }
.th-pot { position: absolute; z-index: 3; left: 50%; top: 30%; translate: -50% -100%; max-width: var(--potw, 60%); display: flex; flex-direction: column; align-items: center; gap: 1px; padding: 3px 12px 4px; border-radius: 12px; background: rgba(3,7,16,0.55); color: #fff; font-size: 14px; font-weight: 800; font-variant-numeric: tabular-nums; white-space: nowrap; text-align: center; }

.th-pot small { display: block; white-space: normal; line-height: 1.2; font-size: 11px; font-weight: 700; color: #b9c9e6; }
.th-pot1 small, .th-tight .th-pot small { display: none; }
.th-pot .th-potl { color: #ffd166; font-weight: 750; margin-right: 5px; }
.th-info { position: absolute; z-index: 2; left: 10px; right: 10px; top: 8px; display: flex; justify-content: space-between; gap: 8px; pointer-events: none; font-size: 11.5px; line-height: 1.35; color: #8aa3c4; font-variant-numeric: tabular-nums; }
.th-info b { display: block; color: #dfe9ff; font-size: calc(12.5px * var(--infs, 1)); font-weight: 800; }
.th-info i, .th-info em { font-style: normal; }
/* a corner too narrow for one line: the ante and the pool take a line of their own (table.js fitInfo) */
.th-info.th-wrap i { display: none; }
.th-info.th-wrap em { display: block; overflow: hidden; text-overflow: ellipsis; }
.th-info.th-wrap em::first-letter { text-transform: uppercase; }
.th-info.th-wrap > span > span { white-space: normal; text-wrap: balance; }
.th-info > span { max-width: var(--infow, 40%); min-width: 0; }
.th-info > span:last-child { text-align: right; }
.th-info b, .th-info > span > span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; }
.th-tight .th-info > span { font-size: 0; } .th-tight .th-info > span > span { display: none; }
.th-info .th-up { color: #ffd166; }
.th-mine { position: absolute; z-index: 6; left: 50%; bottom: 5px; transform: translateX(-50%); max-width: calc(100% - 16px); padding: 3px 12px; border-radius: 999px; background: #f4f7fb; color: #0b1328; font-size: 12.5px; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; box-shadow: 0 3px 10px rgba(0,0,0,0.5); }
.th-center { position: absolute; z-index: 8; left: 50%; top: 44%; transform: translate(-50%, -50%); width: min(92%, 380px); padding: 14px 16px; border-radius: 14px; border: 1px solid #2a3d66; background: rgba(8,14,32,0.94); color: #dfe9ff; text-align: center; font-size: 14px; line-height: 1.45; box-shadow: 0 14px 40px rgba(0,0,0,0.55); }

.th-center b { color: #fff; } .th-center .th-big { display: block; font-size: 30px; font-weight: 850; color: #ffd166; font-variant-numeric: tabular-nums; line-height: 1.15; margin: 2px 0 4px; }
.th-center p { margin: 0 0 8px; } .th-center p:last-child { margin: 0; }
.th-center .ck-btn { margin: 6px 3px 0; min-height: 44px; }
.th-fx { position: absolute; inset: 0; z-index: 9; pointer-events: none; overflow: hidden; }
.th-fly { position: absolute; left: 0; top: 0; width: 18px; height: 18px; margin: -9px 0 0 -9px; }
.th-fly .th-chip { width: 18px; height: 18px; }
.th-banner { position: absolute; z-index: 8; left: 50%; top: 60%; translate: -50% 0; width: max-content; max-width: calc(100% - 20px); padding: 5px 14px; border-radius: 999px; background: linear-gradient(90deg, #ffd166, #ffb86b); color: #1a1200; font-size: 13.5px; font-weight: 850; text-align: center; box-shadow: 0 6px 18px rgba(0,0,0,0.5); animation: th-pop .28s cubic-bezier(.2,1.4,.4,1); }
.th-tall .th-banner, .th-banner.th-fitw { white-space: normal; line-height: 1.25; border-radius: 14px; }
.th-banner.th-up { translate: -50% -100%; }
.th-banner.th-brief .th-bhand { display: none; }
.th-banner.th-brief { padding: 4px 13px; line-height: 1.2; }
@keyframes th-pop { from { opacity: 0; transform: scale(0.7); } }
@keyframes th-deal { from { transform: translate(var(--dx, 0), var(--dy, 0)) scale(0.5) rotate(-25deg); opacity: 0; } }
@keyframes th-flip { 0% { transform: rotateY(90deg) scale(1.06); } 100% { transform: none; } }
@keyframes th-in { from { opacity: 0; transform: scale(0.5); } }
.th-dealt { animation: th-deal .34s cubic-bezier(.2,.8,.3,1) backwards; }
.th-flipin { animation: th-flip .26s ease-out backwards; }
.th-bet.th-new { animation: th-in .22s cubic-bezier(.2,1.4,.4,1); }

/* ---- action bar ---- */
.th-bar { flex: none; display: flex; flex-direction: column; gap: 6px; padding: 7px 8px 8px; border-radius: 14px; border: 1px solid #1c2b4a; background: #0b1328; }
.th-status { min-height: 20px; font-size: 13.5px; line-height: 20px; font-weight: 700; color: #8aa3c4; text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.th-status b { color: #fff; } .th-status.hot { color: #ffd166; }
.th-size { display: flex; flex-direction: column; gap: 6px; transition: opacity .15s ease; }
.th-size.th-dis { opacity: 0.35; pointer-events: none; }
.th-quick { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.th-q { min-height: 40px; border-radius: 9px; border: 1px solid #24375e; background: #111d3a; color: #dfe9ff; font: inherit; font-size: 13.5px; font-weight: 750; cursor: pointer; touch-action: manipulation; }
.th-q:active { transform: scale(0.96); } .th-q.on { border-color: #ffd166; color: #ffd166; }
.th-slide { display: flex; align-items: center; gap: 6px; }
.th-nudge { width: 44px; height: 44px; flex: none; border-radius: 10px; border: 1px solid #24375e; background: #111d3a; color: #fff; font: inherit; font-size: 22px; font-weight: 700; line-height: 1; cursor: pointer; touch-action: manipulation; }
.th-nudge:active { transform: scale(0.94); }
.th-range { flex: 1 1 auto; min-width: 0; height: 44px; margin: 0; background: transparent; -webkit-appearance: none; appearance: none; cursor: pointer; touch-action: pan-y; }
.th-range::-webkit-slider-runnable-track { height: 8px; border-radius: 999px; background: linear-gradient(90deg, #ffd166 var(--fill, 0%), #24375e var(--fill, 0%)); }
.th-range::-moz-range-track { height: 8px; border-radius: 999px; background: #24375e; }
.th-range::-moz-range-progress { height: 8px; border-radius: 999px; background: #ffd166; }
.th-range::-webkit-slider-thumb { -webkit-appearance: none; width: 30px; height: 30px; margin-top: -11px; border-radius: 50%; border: 3px solid #0b1328; background: #ffd166; box-shadow: 0 2px 6px rgba(0,0,0,0.6); }
.th-range::-moz-range-thumb { width: 26px; height: 26px; border-radius: 50%; border: 3px solid #0b1328; background: #ffd166; box-shadow: 0 2px 6px rgba(0,0,0,0.6); }
.th-amt { width: 86px; height: 44px; flex: none; box-sizing: border-box; padding: 0 8px; border-radius: 10px; border: 1px solid #24375e; background: #060b18; color: #fff; font: inherit; font-size: 16px; font-weight: 800; text-align: center; font-variant-numeric: tabular-nums; user-select: text; -webkit-user-select: text; }
.th-acts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.th-acts.th-two { grid-template-columns: repeat(2, 1fr); }
.th-act { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0; min-height: 54px; padding: 4px 6px; border-radius: 12px; border: 1px solid transparent; font: inherit; font-size: 16px; font-weight: 850; line-height: 1.15; cursor: pointer; touch-action: manipulation; transition: transform .08s ease, opacity .15s ease, filter .15s ease; }
.th-act small { font-size: 11.5px; font-weight: 750; opacity: 0.85; }
.th-act:active:not(:disabled) { transform: scale(0.97); }
.th-act:disabled { opacity: 0.32; cursor: default; }
.th-fold { background: #1a2238; color: #ffb3bf; border-color: #4a2a3d; }
.th-call { background: #1f7a4d; color: #fff; border-color: #2c9c64; }
.th-raise { background: #ffd166; color: #1a1200; border-color: #ffd166; }
.th-raise.th-shove { background: #ff6b81; border-color: #ff6b81; color: #fff; }
.th-next { background: #ffd166; color: #1a1200; width: 100%; position: relative; overflow: hidden; }
.th-next i { position: absolute; left: 0; bottom: 0; height: 4px; width: 100%; transform-origin: 0 50%; background: rgba(26,18,0,0.35); }
.th-nextrow { display: flex; }
@media (hover: hover) { .th-q:hover, .th-nudge:hover { border-color: #55d6ff; } .th-act:hover:not(:disabled) { filter: brightness(1.1); } .th-segb:hover { color: #fff; } .th-sel:hover { border-color: #55d6ff; } }
/* a wide bar: the sizing tools beside the three buttons */
.th-roomy .th-bar { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); grid-template-areas: "status status" "size acts"; align-items: center; gap: 6px 14px; padding: 8px 12px 10px; }
.th-roomy .th-status { grid-area: status; } .th-roomy .th-size { grid-area: size; flex-direction: row; align-items: center; gap: 8px; } .th-roomy .th-acts, .th-roomy .th-nextrow { grid-area: acts; }
.th-roomy .th-quick { flex: 0 0 auto; grid-template-columns: repeat(4, auto); } .th-roomy .th-q { padding: 0 11px; min-height: 44px; } .th-roomy .th-slide { flex: 1 1 auto; min-width: 0; }
.th-roomy .th-act { min-height: 56px; }
.th-roomy .th-nudge { display: none; }

/* ---- coin lobby (covers the table) ---- */
.th-lobbying .th-bar { display: none; }
.th-lobby { position: absolute; inset: 0; z-index: 20; display: flex; flex-direction: column; align-items: center; padding: 14px 12px 16px; overflow: auto; overscroll-behavior: contain; background: radial-gradient(ellipse at 50% 0%, #13224a 0%, #080e20 60%, #04060f 100%); color: #dfe9ff; text-align: center; }
.th-lobby h3 { margin: auto 0 2px; font-size: 21px; font-weight: 850; color: #fff; letter-spacing: -0.01em; }
.th-lobby h3 + p { margin: 0 0 12px; font-size: 13.5px; line-height: 1.45; color: #8aa3c4; max-width: 520px; }
.th-lobby .th-foot { margin: 12px 0 auto; font-size: 12.5px; line-height: 1.5; color: #8aa3c4; max-width: 520px; }
.th-lobby .th-foot b { color: #dfe9ff; }
.th-tiers { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; width: 100%; max-width: 640px; }
.th-narrow .th-tiers { grid-template-columns: 1fr; gap: 8px; max-width: 360px; }
.th-tier { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 12px 10px 12px; border-radius: 14px; border: 1px solid #2a3d66; background: linear-gradient(180deg, #14224a, #0b1430); color: #dfe9ff; font: inherit; cursor: pointer; touch-action: manipulation; transition: transform .1s ease, border-color .15s ease; }
.th-tier:active:not(:disabled) { transform: scale(0.98); }
@media (hover: hover) { .th-tier:hover:not(:disabled) { border-color: #ffd166; } }
.th-tier:disabled { opacity: 0.45; cursor: default; }
.th-tier .th-buy { font-size: 12px; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; color: #8aa3c4; }
.th-tier .th-cost { display: inline-flex; align-items: center; gap: 6px; font-size: 26px; font-weight: 850; color: #fff; line-height: 1.1; }
.th-coin { display: inline-block; width: 0.78em; height: 0.78em; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #ffe9a8, #ffd166 55%, #d79a2b); box-shadow: inset 0 0 0 0.09em rgba(150,98,10,0.55); vertical-align: -0.06em; flex: none; }
.th-tier .th-prz { font-size: 12.5px; color: #b9c9e6; line-height: 1.45; }
.th-tier .th-prz b { color: #ffd166; }
.th-tier .th-go { margin-top: 6px; padding: 7px 16px; border-radius: 999px; background: #ffd166; color: #1a1200; font-size: 13.5px; font-weight: 850; }
.th-narrow .th-tier { flex-direction: row; flex-wrap: wrap; justify-content: space-between; text-align: left; padding: 10px 12px; gap: 2px 10px; }
.th-narrow .th-tier .th-buy { flex: 1 1 100%; } .th-narrow .th-tier .th-prz { flex: 1 1 100%; order: 3; } .th-narrow .th-tier .th-go { margin: 0; }
.th-wallet { display: inline-flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 4px 14px; margin: 0 0 12px; padding: 6px 14px; border-radius: 999px; background: rgba(255,255,255,0.05); font-size: 13px; color: #b9c9e6; }
.th-wallet b { color: #fff; }
.th-lobby .ck-btn { min-height: 44px; margin: 4px 3px 0; }
.th-note { width: 100%; max-width: 640px; box-sizing: border-box; margin: 0 0 12px; padding: 10px 14px; border-radius: 12px; border: 1px solid #5a4a1c; background: rgba(255,209,102,0.08); color: #ffe5a3; font-size: 13.5px; line-height: 1.45; }
.th-note.bad { border-color: #6a2c3a; background: rgba(255,107,129,0.08); color: #ffc2cb; }

/* ---- sheets ---- */
.th-scrim .ck-sheet { max-width: 460px; }
.th-scrim .ck-sheet.th-widesheet { max-width: 560px; }
.th-sheet-btns { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.th-sheet-btns .ck-btn { flex: 1 1 130px; min-height: 46px; font-size: 14.5px; }
.th-place { display: flex; align-items: center; gap: 14px; margin: 4px 0 12px; }
.th-place svg { width: 64px; height: 64px; flex: none; }
.th-place > div { min-width: 0; }
.th-place b { display: block; font-size: 26px; font-weight: 850; color: #fff; line-height: 1.1; padding-right: 30px; overflow-wrap: anywhere; }
.th-place span { display: block; color: #8aa3c4; font-size: 13.5px; margin-top: 3px; }
@media (max-width: 400px) { .th-place { gap: 12px; } .th-place svg { width: 56px; height: 56px; } .th-place b { font-size: 22px; } }
.th-prize { display: flex; align-items: center; justify-content: center; gap: 8px; margin: 0 0 12px; padding: 10px; border-radius: 12px; background: rgba(255,209,102,0.1); border: 1px solid #5a4a1c; color: #ffd166; font-size: 20px; font-weight: 850; }
.th-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 0 0 4px; }
.th-stats div { padding: 8px 4px; border-radius: 10px; background: rgba(255,255,255,0.04); text-align: center; font-size: 11.5px; color: #8aa3c4; }
.th-stats b { display: block; font-size: 17px; color: #fff; font-variant-numeric: tabular-nums; }
.th-finish { margin: 0 0 4px; padding: 0; list-style: none; font-size: 13.5px; }
.th-finish li { display: flex; justify-content: space-between; gap: 10px; padding: 5px 2px; border-bottom: 1px solid rgba(255,255,255,0.06); color: #b9c9e6; }
.th-finish li.me { color: #fff; font-weight: 800; }
.th-finish li span:last-child { color: #ffd166; font-weight: 800; white-space: nowrap; }
.th-ranks { margin: 8px 0 0; padding: 0; list-style: none; }
.th-ranks li { display: flex; align-items: center; gap: 10px; padding: 6px 0; border-bottom: 1px solid rgba(255,255,255,0.06); }
.th-ranks li:last-child { border-bottom: 0; }
.th-ranks .th-rk { flex: 1 1 auto; min-width: 0; font-size: 13.5px; font-weight: 800; color: #fff; line-height: 1.25; }
.th-ranks .th-rk small { display: block; font-size: 12px; font-weight: 500; color: #8aa3c4; }
.th-mini { position: relative; flex: none; --cw: 26px; --ch: 36px; --fs: 12.5px; width: calc(26px * 5 + 8px); height: 36px; }
.th-mini .ck-card .ck-big, .th-mini .ck-card .ck-court { display: none; }
.th-mini .ck-ix { flex-direction: column; height: auto; top: 3px; left: 0; right: 0; gap: 1px; justify-content: flex-start; }
.th-mini .ck-card.th-fade { opacity: 0.4; }
.th-howto { margin: 6px 0 0; padding-left: 20px; color: #b9c9e6; font-size: 14px; line-height: 1.5; }
.th-howto li { margin: 0 0 7px; } .th-howto b { color: #fff; }
.th-hands { margin: 8px 0 0; padding: 0; list-style: none; }
.th-hands > li { padding: 9px 0; border-bottom: 1px solid rgba(255,255,255,0.07); font-size: 13px; line-height: 1.5; color: #b9c9e6; }
.th-hands > li:last-child { border-bottom: 0; }
.th-hands h4 { margin: 0 0 2px; font-size: 13.5px; color: #fff; display: flex; justify-content: space-between; gap: 8px; }
.th-hands h4 span { color: #ffd166; font-weight: 800; white-space: nowrap; } .th-hands h4 span.lost { color: #ff9fae; } .th-hands h4 span.flat { color: #8aa3c4; }
.th-hands i { font-style: normal; color: #dfe9ff; font-weight: 700; }
.th-c { display: inline-block; padding: 0 3px; margin: 0 1px; border-radius: 4px; background: #f4f7fb; color: #10141f; font-weight: 800; font-size: 12.5px; line-height: 1.45; white-space: nowrap; }
.th-c.r { color: #cf1d31; }
.th-empty { color: #8aa3c4; font-size: 14px; margin: 10px 0 0; }

/* ---- full screen: fill the box the site gives us ---- */
.th.th-fit { max-width: none; height: 100%; margin: 0; padding: 6px 8px 8px; display: flex; flex-direction: column; overflow: hidden; box-sizing: border-box; }
.th-fit .th-top { flex: none; margin-bottom: 6px; }
.th-fit .th-stage { flex: 1 1 auto; height: auto; min-height: 0; }
.th-fit .th-help { display: none; }
.th-help .hint-touch { display: none; }
@media (hover: none) and (pointer: coarse) { .th-help .hint-kb { display: none; } .th-help .hint-touch { display: inline; } }
/* a phone on its side: the table on the left, the action bar as a column on the right */
.th-short .th-top { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; gap: 6px; }
.th-short .th-opts, .th-short .th-tools { display: flex; flex-wrap: nowrap; flex: none; gap: 6px; }
.th-short .th-segb { padding: 0 9px; }
.th-short .th-ng { display: none; }
@media (max-width: 800px) { .th-short .th-cl { display: none; } .th-short .th-cs { display: inline; } }
.th-short .th-stage { flex-direction: row; }
.th-short .th-bar { width: 216px; justify-content: flex-end; box-sizing: border-box; }
.th-short .th-quick { grid-template-columns: repeat(2, 1fr); }
.th-short .th-acts, .th-short .th-acts.th-two { grid-template-columns: 1fr; }
.th-short .th-act { min-height: 44px; flex-direction: row; gap: 6px; }
.th-short .th-nudge { display: none; }
.th-short .th-amt { width: 76px; }
.th-short .th-status { white-space: normal; line-height: 1.25; flex: none; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
/* a shorter phone on its side: the bet sizes share one row, so the column never grows past the screen */
@media (max-height: 400px) { .th-short .th-quick { grid-template-columns: repeat(4, 1fr); gap: 4px; } .th-short .th-q { padding: 0; font-size: 12.5px; } }
@media (max-height: 350px) { .th-short .th-act { min-height: 40px; } .th-short .th-status { -webkit-line-clamp: 1; } }
@media (min-height: 380px) { .th-short .th-status { -webkit-line-clamp: 3; } }   /* room for a 20-letter name and the hand */
@media (prefers-reduced-motion: reduce) {
  .th-dealt, .th-flipin, .th-bet.th-new, .th-banner { animation: none; }
  .th-tag, .th-seat .ck-card, .th-board .ck-card, .th-pod { transition: none; }
}

/* ---- tag and dealer-disc placement ---- */
.th-seat.th-dl .th-dealer { margin-left: calc(var(--pw) * -0.5 - 7px); }
.th-me .th-dealer { margin: calc(var(--ch) * 0.43 - 34px) 0 0 calc(var(--pw) * -0.5 - 7px); }
.th-tag.t-under { margin-top: calc(var(--ch) * 0.36 + 36px); }
.th-me .th-tag, .th-me .th-tag.t-under { margin-top: calc(var(--ch) * -0.43 - 32px); }
.th-me.th-folded .th-pod { opacity: 1; }
.th-me.th-folded .ck-card { filter: brightness(0.5) saturate(0.6); }
.th-timer i { transition: transform .2s linear; }
.th-pot.th-bump { animation: th-bump .3s ease; }
@keyframes th-bump { 40% { transform: scale(1.14); } }
.th-stack.th-up { color: #ffd166; }
@media (prefers-reduced-motion: reduce) { .th-pot.th-bump { animation: none; } .th-timer i { transition: none; } }
