/* Barlow Condensed, Copyright 2017 The Barlow Project Authors, SIL OFL1.1.
   Bundled font and complete license: fonts/. No remote font request. */
@font-face {
  font-family: 'DC Barlow Condensed';
  src: url('./fonts/barlow-condensed-bold-italic.ttf') format('truetype');
  font-style: italic;
  font-weight: 700;
  font-display: swap;
}
:root {
  color-scheme: dark;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  color: #f2eff0;
  background: #0d0c0e;
  --text: #f2eff0;
  --muted: #999297;
  --line: #413a3e;
  --red: #b93648;
  --gold: #e4b558;
  --felt: #651c32;
  --dock-height: 128px;
}
* { box-sizing: border-box; }
body { margin: 0; min-width: 0; overscroll-behavior: none; }
button, input, select { font: inherit; }
button { color: inherit; border: 0; padding: 0; background: none; cursor: pointer; touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
button:disabled { opacity: .38; cursor: default; }
button:active:not(:disabled) { filter: brightness(.85); }
button:focus-visible, input:focus-visible, select:focus-visible { outline: 2px solid #e1bd69; outline-offset: 3px; }
button svg { width: 20px; height: 20px; vertical-align: middle; }
input { min-width: 0; }
h1, h2, h3, p { margin: 0; }
[hidden], .hidden { display: none !important; }
.muted { color: var(--muted); }
.mono { font-variant-numeric: tabular-nums; }
.poker-app { height: 100dvh; max-width: 540px; margin: auto; display: grid; grid-template-rows: auto minmax(0, 1fr); overflow: hidden; background: #141114; }
.game-header { display: flex; align-items: center; gap: 5px; height: calc(34px + env(safe-area-inset-top, 0px)); padding: env(safe-area-inset-top, 0px) 8px 0; background: linear-gradient(#272328, #1c191d); border-bottom: 1px solid #373037; z-index: 10; }
.header-icon { width: 29px; height: 32px; display: grid; place-items: center; flex-shrink: 0; color: #b3acb3; }
.header-icon svg { width: 18px; height: 18px; }
.header-icon:hover { color: #fff; }
.header-title { display: flex; align-items: baseline; flex: 1; gap: 7px; min-width: 0; line-height: 1; }
.header-title strong { display: block; color: #eee8e2; font-family: 'DC Barlow Condensed', 'Arial Narrow', Arial, sans-serif; font-size: 13px; font-style: italic; font-weight: 700; letter-spacing: .9px; white-space: nowrap; }
.header-title > span { display: block; min-width: 0; color: #8f858e; font-size: 9px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.unit-toggle { display: grid; place-items: center; flex: 0 0 42px; width: 42px; height: 22px; padding: 0; text-align: center; border: 1px solid #51464e; border-radius: 3px; color: #bdb2b9; background: #2a242a; font-size: 10px; line-height: 1; font-weight: 600; }
.unit-toggle[aria-pressed='true'] { color: #e5cc83; border-color: #837044; }
.header-stakes { font-size: 12px; font-weight: 650; font-variant-numeric: tabular-nums; white-space: nowrap; color: #e6dee3; padding: 3px 5px; }
.table-view { background: #100e11; display: grid; grid-template-rows: 22px minmax(0, 1fr) calc(var(--dock-height) + env(safe-area-inset-bottom, 0px)); min-height: 0; }
.table-toolbar { display: flex; align-items: center; gap: 7px; padding: 0 10px; background: #161216; border-bottom: 1px solid #21191f; }
.game-switch { display: inline-flex; align-items: center; gap: 5px; min-height: 22px; color: #c9bdc4; }
.game-switch strong { font-size: 10px; font-weight: 550; }
.game-switch small { color: #8d7e87; font-size: 9px; font-variant-numeric: tabular-nums; }
.mode-led { width: 4px; height: 4px; background: #9aadb0; border-radius: 50%; }
.switch-chevron { color: #81717a; font-size: 12px; line-height: 1; margin-left: 2px; }
.game-switch.choice-active .mode-led, .game-switch.queued .mode-led { background: #d6a857; }
.game-switch.choice-active strong { color: #dbbc7e; }
.hand-number { font-size: 9px; color: #776670; margin-left: auto; font-variant-numeric: tabular-nums; }
.meta-info { color: #8b7883; width: 18px; height: 21px; display: grid; place-items: center; }
.meta-info svg { width: 12px; height: 12px; }
.table-scene { position: relative; min-height: 0; width: 100%; isolation: isolate; background: radial-gradient(ellipse at 50% 48%, #272025 0, #171317 66%, #100e11 100%); }
/* A narrower head and broad lower curve give the table the mobile client's perspective. */
.table-surface { position: absolute; top: 5%; left: 6.5%; width: 87%; height: 89%; padding: 11px; border-radius: 49% 49% 42% 42% / 27% 27% 37% 37%; border: 1px solid #64575b; background: linear-gradient(100deg, #09080a 0, #2e282d 18%, #0d0b0e 34%, #1f191e 72%, #09080a); box-shadow: 0 9px 15px #000b, inset 0 0 0 3px #080709, inset 0 0 0 5px #32272d, 0 0 0 2px #080608; }
.felt-inner { position: relative; width: 100%; height: 100%; border-radius: inherit; overflow: hidden; border: 1px solid #af667352; background-color: var(--felt); background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 150 150' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' opacity='.1' filter='url(%23n)'/%3E%3C/svg%3E"), radial-gradient(ellipse at 50% 40%, #8e2d4655, #3c102a55); box-shadow: inset 0 0 28px #250719a6; }
.felt-inner { background-size: 150px 150px, 100% 100%; }
.felt-inner::after { content: ''; position: absolute; inset: 6px; border-radius: inherit; border: 1px solid #d992a019; pointer-events: none; }
.felt-brand { position: absolute; left: 0; right: 0; top: 19%; color: #e5b8c31c; font-family: 'DC Barlow Condensed', 'Arial Narrow', Arial, sans-serif; font-size: 25px; line-height: 1; font-style: italic; font-weight: 700; text-align: center; letter-spacing: 1.1px; pointer-events: none; }
.game-label { display: none; }
.pot-area { position: absolute; top: 33.5%; left: 0; right: 0; display: flex; flex-direction: column; align-items: center; gap: 2px; z-index: 2; text-shadow: 0 1px 2px #0008; }
.pot-caption { font-size: 10px; line-height: 12px; color: #d6b4c0; }
.pot-value { font-size: 17px; line-height: 18px; font-weight: 600; color: #f4e9be; font-variant-numeric: tabular-nums; }
.pot-chips { position: absolute; left: 50%; bottom: calc(100% + 8px); transform: translateX(-50%); display: flex; align-items: flex-end; gap: 2px; min-height: 12px; }
.street-pill { position: absolute; left: 0; right: 0; top: 41%; text-align: center; font-size: 9px; line-height: 1; letter-spacing: .7px; color: #cda1b0b3; }
.community-cards { position: absolute; top: 45%; left: 50%; transform: translateX(-50%); display: flex; gap: 3px; z-index: 2; }
@font-face { font-family: 'DC Deck'; src: url('./fonts/barlow-condensed-bold.ttf') format('truetype'); font-style: normal; font-weight: 700; font-display: swap; }
:root { --deck-back-fill: repeating-linear-gradient(45deg, #ffffff05 0 1px, transparent 1px 5px), linear-gradient(155deg, #5b3541, #30222b); --deck-back-border: #e6dfd5; --deck-back-ink: #d8c7a4; --deck-back-shadow: inset 0 0 0 2px #eee7db, inset 0 0 0 3px #9d8277, 0 2px 4px #0007; }
.playing-card, .card-slot { width: 49px; height: 70px; flex-shrink: 0; border-radius: 4px; }
.card-slot { display: grid; place-items: center; }
.card-slot:empty { visibility: hidden; }
.playing-card { --card-ink: #182127; --corner-suit-size: 14px; --large-suit-size: 23px; --card-suit-mask: url('./cards/suit-spades.svg'); position: relative; overflow: hidden; color: var(--card-ink); background: linear-gradient(135deg, #fff 0%, #fff 58%, #f1f1ee 100%); border: 1px solid #e4e4df; box-shadow: 0 1px 1px #0003, 0 2px 4px #0006; font-family: 'DC Deck', 'Arial Narrow', Arial, sans-serif; font-style: normal; animation: deal-card .14s ease-out both; }
@keyframes deal-card { from { opacity: .35; } to { opacity: 1; } }
.playing-card.red, .playing-card.suit-hearts { --card-ink: #c3293b; --card-suit-mask: url('./cards/suit-hearts.svg'); }
.playing-card.suit-clubs { --card-ink: #14764e; --card-suit-mask: url('./cards/suit-clubs.svg'); }
.playing-card.suit-diamonds { --card-ink: #286eaf; --card-suit-mask: url('./cards/suit-diamonds.svg'); }
/* One bundled condensed face gives 8 and 10 identical cap height on both OSes.
   The entire two-digit index sits inside the exposed fan edge. */
.card-corner { position: absolute; top: 3px; left: 3px; width: .8em; display: flex; align-items: center; flex-direction: column; gap: 2px; font-size: 30px; line-height: .9; font-weight: 700; letter-spacing: -.025em; text-align: center; font-kerning: none; font-variant-numeric: lining-nums proportional-nums; }
/* Local vector silhouettes avoid platform-dependent suit/emoji glyphs. */
.card-corner small, .card-suit { display: block; color: transparent; font-size: 0; line-height: 0; background: var(--card-ink); -webkit-mask: var(--card-suit-mask) center / contain no-repeat; mask: var(--card-suit-mask) center / contain no-repeat; }
.card-corner small { flex: 0 0 auto; width: var(--corner-suit-size); height: var(--corner-suit-size); }
.card-suit { position: absolute; right: 3px; bottom: 4px; width: var(--large-suit-size); height: var(--large-suit-size); }
/* Older cached card nodes remain upright until their next deal. */
.card-bottom { display: none !important; }
.playing-card.back { color: var(--deck-back-ink); border-color: var(--deck-back-border); background: var(--deck-back-fill); box-shadow: var(--deck-back-shadow); }
.playing-card.back > * { display: none; }
.playing-card.back::after { content: 'DC'; position: absolute; inset: 0; display: grid; place-items: center; color: var(--deck-back-ink); font: 700 15px / 1 'DC Deck', 'Arial Narrow', Arial, sans-serif; letter-spacing: 1px; opacity: .85; }
.playing-card.empty { visibility: hidden; }
#seats { position: absolute; inset: 0; z-index: 3; }
/* Centered portrait behind a compact hand; nameplate stays fixed on fold. */
.seat { --avatar-size: 60px; --feedback-rise: 4px; position: absolute; width: 94px; height: 72px; text-align: center; }
.seat-0 { left: 10%; bottom: 6px; }
.seat-1 { left: 10px; top: 64%; }
.seat-2 { left: 10px; top: 25%; }
.seat-3 { left: 50%; top: 8px; transform: translateX(-50%); }
.seat-4 { right: 10px; top: 25%; }
.seat-5 { right: 10px; top: 64%; }
.player-box { position: absolute; bottom: 0; left: 0; right: 0; height: 35px; z-index: 3; }
.avatar { position: absolute; left: calc(50% - var(--avatar-size) / 2); bottom: 12px; width: var(--avatar-size); height: var(--avatar-size); border: 2px solid #a79b90; border-radius: 50%; display: grid; place-items: center; background: #454049; color: #e5e1dc; font-size: 24px; font-weight: 600; font-family: Georgia, serif; box-shadow: 0 2px 4px #000b; z-index: 1; }
.avatar-art { display: block; width: 100%; height: 100%; border-radius: inherit; overflow: hidden; }
.avatar svg, .avatar img { display: block; width: 100%; height: 100%; border-radius: 50%; object-fit: cover; }
.avatar-0 { background: radial-gradient(circle at 35% 25%, #9a8d7a, #3f4f53); }
.avatar-1 { background: radial-gradient(circle at 35% 25%, #a29679, #53503e); }
.avatar-2 { background: radial-gradient(circle at 35% 25%, #9f8c89, #52444e); }
.avatar-3 { background: radial-gradient(circle at 35% 25%, #8f929b, #353e50); }
.avatar-4 { background: radial-gradient(circle at 35% 25%, #9f9a74, #404638); }
.avatar-5 { background: radial-gradient(circle at 35% 25%, #929b91, #414550); }
.player-info > .turn-ring { position: absolute; inset: -3px; padding: 2px; border-radius: 6px; background: conic-gradient(#f1c45f calc(var(--turn-progress, 1) * 1turn), #675d3b55 0); -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; opacity: 0; pointer-events: none; z-index: 5; }
.seat.active .turn-ring { opacity: 1; }
.player-info { position: relative; width: 100%; height: 35px; padding: 2px 4px; border-radius: 4px; background: linear-gradient(180deg, #37323af7 0%, #28242cf7 44%, #1d1921fa 45%, #131116fc 100%); border: 1px solid #62535e; box-shadow: inset 0 1px 0 #ffffff14, inset 0 -1px 0 #0006, 0 2px 3px #0009; }
.player-name { display: block; min-width: 0; max-width: 100%; padding: 0 2px; color: #ede5eb; text-align: center; font-size: 11px; line-height: 12px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.player-stack { display: block; min-width: 0; max-width: 100%; margin-top: 2px; padding-top: 2px; border-top: 1px solid #88778055; font-size: 10px; font-weight: 500; line-height: 12px; color: #a5c8dd; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.player-name small { display: none; }
.player-action, .seat-status, .draw-declaration { position: absolute; top: auto; bottom: calc(100% + var(--feedback-rise)); left: 50%; transform: translateX(-50%); width: max-content; max-width: 94px; min-height: 18px; padding: 2px 6px; border: 1px solid #786565; border-radius: 3px; color: #ead8b0; background: #282025f2; font-size: 10px; line-height: 12px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; z-index: 6; pointer-events: none; }
.player-action:empty, .seat-status:empty, .draw-declaration:empty { display: none; }
.seat.has-draw-declaration .player-action { visibility: hidden; }
.seat.active .player-info { border-color: #d4ad59; background: linear-gradient(#393024, #1c1714); }
.seat.active .avatar { border-color: #d0b36e; }
.seat.folded .player-info { filter: brightness(.8); }
.seat.folded .hole-cards { filter: grayscale(1); opacity: .52; }
.seat.sitting-out .avatar { filter: grayscale(.6) brightness(.85); }
.seat.sitting-out .player-info { opacity: .8; }
.seat.winner .player-info { border-color: #e6c363; box-shadow: 0 0 6px #d0a94344; }
/* Empty remote places have a real keyboard-operable join button, not a ghost. */
.take-seat { position: absolute; inset: 0; width: 100%; min-height: 64px; padding: 0 0 2px; display: flex; flex-direction: column; align-items: center; justify-content: flex-start; gap: 4px; border: 0; background: transparent; color: #c9b6c0; font: inherit; cursor: pointer; z-index: 4; }
.take-seat-symbol { display: grid; place-items: center; width: 46px; height: 46px; border: 1px dashed #a8919f; border-radius: 50%; color: #e0c88f; background: #181318c7; font-size: 28px; line-height: 1; font-weight: 300; box-shadow: inset 0 1px 0 #ffffff07, 0 2px 5px #0004; }
.take-seat-label { display: block; font-size: 10px; line-height: 12px; font-weight: 600; white-space: nowrap; }
.take-seat:hover:enabled .take-seat-symbol { border-color: #e6cc91; background: #30232b; }
.take-seat:focus-visible { outline: 2px solid #e6cc91; outline-offset: 4px; border-radius: 8px; }
.take-seat:disabled { opacity: .45; cursor: default; }
.take-seat:disabled .take-seat-symbol { color: #b8a3ac; border-color: #796772; }
.seat.empty-seat .avatar { display: none; }
.seat.hero .take-seat { gap: 5px; }
.seat.hero .take-seat-symbol { width: 58px; height: 58px; font-size: 32px; }
.seat.hero .take-seat-label { font-size: 11px; }
.hole-cards { position: absolute; top: 4px; left: 50%; transform: translateX(-50%); display: flex; gap: 0; z-index: 2; }
.hole-cards .card-slot, .hole-cards .playing-card { width: 28px; height: 40px; border-radius: 3px; }
.hole-cards .card-slot + .card-slot { margin-left: -7px; }
/* The slot owns discard selection, card-motion owns dealing, and the face owns the static fan. */
.hole-cards .card-motion { width: 100%; height: 100%; }
.hole-cards .card-slot { position: relative; --card-angle: 0deg; --card-rise: 0px; z-index: var(--card-layer, 1); }
/* The destination layer is permanent, including before/during a replacement. */
.hole-cards .card-slot:nth-child(1) { --card-layer: 1; }
.hole-cards .card-slot:nth-child(2) { --card-layer: 2; }
.hole-cards .card-slot:nth-child(3) { --card-layer: 3; }
.hole-cards .card-slot:nth-child(4) { --card-layer: 4; }
.hole-cards .card-slot:nth-child(5) { --card-layer: 5; }
.hole-cards .playing-card { animation: none; transform: translateY(calc(var(--card-rise) + var(--winning-lift, 0px))) rotate(var(--card-angle)); transform-origin: 50% 100%; }
.hole-cards[data-card-count="2"] .card-slot:nth-child(1) { --card-angle: -2.5deg; }
.hole-cards[data-card-count="2"] .card-slot:nth-child(2) { --card-angle: 2.5deg; }
.hole-cards[data-card-count="4"] .card-slot:nth-child(1) { --card-angle: -3deg; }
.hole-cards[data-card-count="4"] .card-slot:nth-child(2) { --card-angle: -1deg; --card-rise: -1px; }
.hole-cards[data-card-count="4"] .card-slot:nth-child(3) { --card-angle: 1deg; --card-rise: -1px; }
.hole-cards[data-card-count="4"] .card-slot:nth-child(4) { --card-angle: 3deg; }
.hole-cards[data-card-count="5"] .card-slot:nth-child(1) { --card-angle: -3deg; }
.hole-cards[data-card-count="5"] .card-slot:nth-child(2) { --card-angle: -1.5deg; --card-rise: -1px; }
.hole-cards[data-card-count="5"] .card-slot:nth-child(3) { --card-rise: -1.5px; }
.hole-cards[data-card-count="5"] .card-slot:nth-child(4) { --card-angle: 1.5deg; --card-rise: -1px; }
.hole-cards[data-card-count="5"] .card-slot:nth-child(5) { --card-angle: 3deg; }
.hole-cards .playing-card { --corner-suit-size: 9px; }
.hole-cards .card-corner { font-size: 18px; top: 2px; left: 1px; gap: 1px; }
.hole-cards .playing-card.back::after { font-size: 10px; letter-spacing: .6px; }
.hole-cards .card-suit { display: none; }
.seat.hero { --avatar-size: 72px; --feedback-rise: 17px; width: 98px; height: 100px; }
.seat.hero .player-box { height: 35px; }
.seat.hero .player-info { height: 35px; padding-top: 2px; }
.seat.hero .player-name { font-size: 11px; line-height: 12px; }
.seat.hero .player-stack { font-size: 10px; line-height: 12px; }
.seat.hero .hole-cards { top: 0; left: 50%; gap: 0; }
.seat.hero .hole-cards .card-slot + .card-slot { margin-left: -12px; }
.seat.hero .hole-cards .card-slot, .seat.hero .hole-cards .playing-card { width: 55px; height: 78px; border-radius: 4px; }
.seat.hero .playing-card { --corner-suit-size: 17px; --large-suit-size: 26px; }
.seat.hero .card-corner { font-size: 35px; top: 3px; left: 3px; gap: 2px; }
.seat.hero .card-suit { display: block; right: 3px; bottom: 4px; }
.seat.hero .playing-card.back::after { font-size: 18px; }
.seat-bet { position: absolute; width: 62px; display: flex; flex-direction: column; align-items: center; gap: 1px; font-size: 12px; font-weight: 550; line-height: 14px; color: #f4e6cb; text-shadow: 0 1px 2px #000b; white-space: nowrap; font-variant-numeric: tabular-nums; z-index: 3; }
.chip-stack { --chip-size: 19px; --chip-depth: 8px; display: inline-flex; align-items: flex-end; gap: 2px; min-height: 13px; }
.chip-column { --chip-color: #a03135; --chip-edge: #ecdcc4; --chip-ink: #fff9e9; display: flex; flex-direction: column-reverse; width: var(--chip-size, 19px); padding-bottom: 2px; }
.chip-column i, .chip-stack > i, .pot-chips > i { position: relative; display: block; width: var(--chip-size, 19px); height: var(--chip-depth, 8px); border-radius: 50%; border: 1px solid #201b21; background: repeating-conic-gradient(from 12deg, var(--chip-edge, #ecdcc4) 0deg 15deg, var(--chip-color, #a03135) 15deg 60deg); box-shadow: 0 2px 0 var(--chip-color, #a03135), 0 3px 1px #000a; flex-shrink: 0; }
.chip-column i::before { content: ''; position: absolute; inset: 1px 2px; border: 1px solid var(--chip-edge); border-radius: 50%; background: var(--chip-color); box-shadow: inset 0 1px 1px #ffffff55; }
.chip-column i:last-child::after { content: none; }
.chip-column i + i { margin-bottom: -5px; }
.chip-red { --chip-color: #b02d34; --chip-edge: #f1dfd3; }
.chip-green { --chip-color: #28764c; --chip-edge: #e4e4c7; }
.chip-white { --chip-color: #eee9d7; --chip-edge: #40546e; --chip-ink: #243143; }
.chip-black { --chip-color: #262c2b; --chip-edge: #e4dfc7; }
.chip-purple { --chip-color: #735178; --chip-edge: #e5cbdc; }
.chip-gold { --chip-color: #c99b3e; --chip-edge: #f1deab; }
.pot-chips { --chip-size: 22px; --chip-depth: 9px; }
.seat-0 .seat-bet { top: 15px; left: calc(100% + 15px); }
.seat-1 .seat-bet { top: -32px; left: calc(100% + 10px); }
.seat-2 .seat-bet { top: 49px; left: calc(100% + 10px); }
.seat-3 .seat-bet { top: calc(100% + 8px); left: calc(50% + 55px); transform: translateX(-50%); }
.seat-4 .seat-bet { top: 49px; right: calc(100% + 10px); }
.seat-5 .seat-bet { top: -32px; right: calc(100% + 10px); }
/* Dealer markers are table objects outside the HUD. Their presence never
   changes the nameplate's width, padding or text alignment. */
.seat { --nameplate-half:47px; }
.seat.hero { --nameplate-half:49px; }
.dealer-token { position: absolute; left:calc(50% + var(--nameplate-half) + 13px); top:12px; width: 18px; height: 18px; transform: translate(-50%, -50%); border-radius: 50%; display: grid; place-items: center; color: #272323; background: #efede1; border: 1.5px solid #b0a99c; box-shadow: 0 1px 2px #0009; font-size: 10px; line-height: 1; font-weight: 750; z-index: 5; pointer-events: none; }
.seat-4 .dealer-token,.seat-5 .dealer-token { left:calc(50% - var(--nameplate-half) - 13px); }
.seat-3 .dealer-token { top:calc(100% - 17.5px); }
.seat.hero .dealer-token { left:calc(50% - var(--nameplate-half) - 13px); top:calc(100% - 17.5px); }
.choice-token { color: #30200d; border-color: #ebcb88; background: #d5a049; font-size: 7px; }
.seat.dual-buttons .holdem-token { margin-top: -10px; }
.seat.dual-buttons .choice-token { margin-top: 10px; }
.token-inactive { opacity: .55; filter: grayscale(.45); }
.table-status { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
/* The betting controls float over the table, with no footer strip. */
.action-panel { --dock-padding: 16px; --action-row-height: 52px; --action-column: calc((100% - var(--dock-padding) * 2 - 28px) / 3); position: relative; z-index: 8; min-height: 0; height: 100%; padding: 5px var(--dock-padding) calc(8px + env(safe-area-inset-bottom, 0px)); background: linear-gradient(#242426, #141416); border-top: 1px solid #393739; overflow: visible; }
.action-panel:has(.action-buttons) { display: block; height: 100%; align-self: stretch; padding: 0; background: transparent; border: 0; }
.dock-strip { display: flex; align-items: center; justify-content: center; gap: 7px; min-width: 0; min-height: 18px; }
.hand-label { display: block; min-width: 0; text-align: center; color: #c8bc95; font-size: 10px; line-height: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dock-clock, [data-turn-time] { color: #aaa994; font-size: 9px; line-height: 14px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.time-bank-btn { height: 18px; min-width: 29px; padding: 1px 4px; border: 1px solid #686249; border-radius: 3px; color: #d7c77b; background: #252720; font-size: 9px; line-height: 14px; white-space: nowrap; }
.action-context { flex: 1; min-width: 0; }
.action-message { color: #d0cbcd; font-size: 11px; line-height: 1.2; font-weight: 500; }
.action-hint { margin-top: 3px; color: #8f8b8d; font-size: 10px; line-height: 1.2; }
.action-buttons { position: absolute; left: var(--dock-padding); right: var(--dock-padding); bottom: calc(8px + env(safe-area-inset-bottom, 0px)); display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; height: var(--action-row-height); }
.action-buttons .action-fold { grid-column: 1; }
.action-buttons .action-call { grid-column: 2; }
.action-buttons button, .custom-raise-editor .action-confirm, .ladder-option { position: relative; min-width: 0; height: var(--action-row-height); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; padding: 4px 6px; border: 1px solid #434547; border-radius: 3px; color: #f1f1ee; background: linear-gradient(#303436, #212628); text-shadow: 0 1px 1px #0008; box-shadow: inset 0 1px 0 #ffffff0d, 0 3px 0 #080b0c, 0 4px 3px #0009; }
.action-buttons button:hover:not(:disabled), .custom-raise-editor .action-confirm:hover:not(:disabled), .ladder-option:hover:not(:disabled) { filter: brightness(1.12); }
.action-buttons button:active:not(:disabled), .custom-raise-editor .action-confirm:active:not(:disabled), .custom-raise-editor .raise-pressed, .ladder-option:active:not(:disabled) { transform: translateY(2px); box-shadow: inset 0 1px 0 #ffffff0d, 0 1px 0 #080b0c, 0 2px 2px #0008; }
.action-label { color: #f4f4f0; font-size: 16px; line-height: 18px; font-weight: 600; }
.action-fold .action-label { font-size: 18px; }
.action-value { color: #f7d94f; font-size: 20px; line-height: 23px; font-weight: 650; white-space: nowrap; font-variant-numeric: tabular-nums; }
.raise-presets, .custom-raise-editor { position: absolute; right: var(--dock-padding); bottom: calc(8px + env(safe-area-inset-bottom, 0px)); width: var(--action-column); z-index: 11; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.preset-caption { position: absolute; top: 3px; left: 7px; color: #f3f2ec; font-size: 11px; line-height: 12px; font-weight: 600; }
.preset-amount { display: block; max-width: 100%; padding-top: 10px; color: #f7d94f; font-size: 21px; line-height: 25px; font-weight: 650; white-space: nowrap; font-variant-numeric: tabular-nums; }
.preset-amount.amount-long { min-width: 0; overflow: hidden; text-overflow: ellipsis; font-size: clamp(11px, 3.7vw, 16px); }
.player-stack.amount-long, .seat.hero .player-stack.amount-long { font-family: 'DC Deck', 'Arial Narrow', Arial, sans-serif; font-size: 10.5px; font-weight: 700; }
.action-value.amount-long { min-width: 0; max-width: 100%; overflow: hidden; text-overflow: ellipsis; font-size: clamp(13px, 3.7vw, 16px); }
.dock-utilities { position: absolute; z-index: 12; left: calc(var(--dock-padding) + var(--action-column) + 14px); bottom: calc(var(--action-row-height) + 14px + env(safe-area-inset-bottom, 0px)); width: var(--action-column); display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; height: 34px; }
.sizing-arrow-anchor { position: relative; min-width: 0; height: 34px; }
.sizing-utility { display: grid; place-items: center; width: 100%; height: 34px; border: 1px solid #434547; border-radius: 3px; color: #efefea; background: linear-gradient(#303436, #212628); box-shadow: 0 3px 0 #090b0d; touch-action: none; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; }
.sizing-utility svg { display: block; width: 23px; height: 23px; fill: currentColor; }
.slider-utility { color: #f3d453; }
.sizing-utility[aria-pressed='true'] { border-color: #a89558; }
.slider-popover { position: absolute; z-index: 13; left: 50%; bottom: calc(100% + 8px); transform: translateX(-50%); width: 96px; height: 252px; max-height: calc(100dvh - 160px); display: grid; grid-template-rows: 18px 24px minmax(0, 1fr); gap: 4px; padding: 6px; border: 1px solid #71695a; border-radius: 3px; color: #d3c495; background: transparent; box-shadow: none; border-color: transparent; }
.slider-popover-toolbar, .slider-popover .custom-slider-value { background: #242326f5; border-radius: 3px; }
.slider-popover .raise-limit { padding: 1px 4px; border-radius: 2px; background: #242326ed; }
.custom-sizing-shell { align-self: flex-end; width: 100%; min-width: 0; display: flex; flex-direction: column; gap: 4px; padding: 6px; border: 1px solid #71695a; border-radius: 3px; color: #d3c495; background: #242326f5; box-shadow: 0 2px 8px #0007; }
.custom-slider-value { display: block; min-width: 0; overflow: hidden; text-overflow: ellipsis; color: #f3d466; font-size: 16px; line-height: 24px; text-align: center; white-space: nowrap; font-variant-numeric: tabular-nums; }
.custom-slider-value.amount-long { font-size: 12px; }
.custom-mode-number .custom-sizing-shell { width: calc(200% - 8px); max-width: 232px; }
.custom-keypad-body { min-width: 0; display: grid; gap: 4px; }
.custom-editor-toolbar { display: flex; align-items: center; gap: 3px; min-width: 0; }
.custom-editor-close { display: grid; place-items: center; flex-shrink: 0; width: 20px; height: 18px; margin-left: auto; color: #ccc3c9; font-size: 20px; line-height: 1; }
.keypad-clear-all { display: grid; place-items: center; flex-shrink: 0; min-width: 32px; height: 24px; padding: 0 5px; border: 1px solid #756750; border-radius: 3px; color: #dcc58d; background: #302b27; font-size: 10px; line-height: 14px; }
.custom-amount { display: flex; align-items: center; gap: 5px; min-width: 0; height: 30px; padding: 0 6px; border: 1px solid #68615d; border-radius: 2px; background: #151517; }
.custom-amount > span { color: #b6ada8; font-size: 9px; line-height: 11px; }
.custom-amount input { width: 100%; min-width: 0; height: 28px; padding: 0; border: 0; color: #edda98; background: transparent; font-size: 18px; line-height: 28px; text-align: right; font-variant-numeric: tabular-nums; -moz-appearance: textfield; cursor: default; }
.custom-amount input::-webkit-inner-spin-button { -webkit-appearance: none; }
.custom-amount:has(input[aria-invalid='true']) { border-color: #d08779; }
.custom-input-error { min-width: 0; max-height: 26px; overflow: hidden; color: #e7a698; font-size: 10px; line-height: 13px; }
.bet-keypad { display: grid; grid-template-columns: repeat(3, minmax(40px, 1fr)); gap: 3px; }
.bet-keypad button { display: grid; place-items: center; min-width: 40px; min-height: 40px; height: 40px; padding: 0; border: 1px solid #555052; border-radius: 3px; color: #f3eee8; background: linear-gradient(#393438, #272528); font-size: 18px; line-height: 1; font-variant-numeric: tabular-nums; touch-action: manipulation; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; }
.bet-keypad button:active:not(:disabled) { background: #5a4c3d; border-color: #b5a06c; }
.bet-keypad .keypad-clear { color: #d9c28b; font-size: 14px; }
.bet-keypad .keypad-decimal { color: #d9c28b; font-size: 22px; }
.bet-keypad .keypad-backspace { color: #d9c28b; font-size: 22px; }
.custom-rail { display: flex; flex-direction: column; align-items: center; min-height: 0; gap: 2px; }
.raise-limit { color: #a69d9d; font-size: 9px; line-height: 10px; font-variant-numeric: tabular-nums; }
.raise-meter { position: relative; flex: 1; min-height: 0; width: 34px; }
.raise-meter::before, .raise-meter-fill { content: ''; position: absolute; bottom: 0; left: calc(50% - 2px); width: 4px; height: 100%; border-radius: 2px; background: #5b5159; }
.raise-meter-fill { height: calc(var(--raise-progress, 0) * 100%); background: #d3b562; }
.raise-meter-thumb { position: absolute; z-index: 1; bottom: calc(var(--raise-progress, 0) * (100% - 16px)); left: 50%; transform: translateX(-50%); width: 25px; height: 16px; display: grid; place-items: center; border: 1px solid #f0dba0; border-radius: 3px; color: #382d1e; background: #d2b56b; font-size: 13px; line-height: 1; }
#raise-slider { position: absolute; z-index: 2; inset: 0; width: 100%; height: 100%; margin: 0; opacity: .001; writing-mode: vertical-lr; direction: rtl; touch-action: none; cursor: ns-resize; }
.action-raise { touch-action: none; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; }
.raise-hold-hint { position: absolute; top: 4px; right: 5px; color: #c1b6a1; font-size: 11px; line-height: 1; }
.custom-raise-editor .raise-dragging { border-color: #d3b96c; }
/* Pointer sizing hides only the other betting controls; table and captured arrow stay visible. */
.action-panel.sizing-focus > :not(.dock-utilities),
.poker-app.sizing-focus .action-panel > :not(.dock-utilities),
.action-panel.sizing-focus :is(.keypad-utility, .slider-popover-toolbar),
.poker-app.sizing-focus .action-panel :is(.keypad-utility, .slider-popover-toolbar) { visibility: hidden; pointer-events: none; }
.action-panel:has(.result-row), .action-panel:has(.waiting-state) { display: flex; flex-direction: column; justify-content: flex-end; gap: 5px; }
/* Off-turn controls leave the table geometry untouched and clear the whole dock. */
.action-panel.is-collapsed, .dock-collapsed .action-panel { height: 100%; background: transparent; border-color: transparent; box-shadow: none; }
:is(.action-panel.is-collapsed, .dock-collapsed .action-panel) > :not([data-preaction]) { display: none !important; }
.action-panel [data-preaction] { position: absolute; left: calc(var(--dock-padding) + var(--action-column) + 14px); bottom: calc(8px + env(safe-area-inset-bottom, 0px)); display: flex; align-items: center; justify-content: center; gap: 6px; width: var(--action-column); height: var(--action-row-height); min-height: var(--action-row-height); max-width: none; padding: 4px 3px; border: 1px solid #5f535d; border-radius: 3px; color: #cfc4cb; background: linear-gradient(#303436, #212628); box-shadow: inset 0 1px 0 #ffffff0d, 0 3px 0 #080b0c; font-size: clamp(11px, 3.2vw, 14px); line-height: 16px; white-space: nowrap; }
.action-panel [data-preaction]::before { content: ''; display: grid; place-items: center; width: 12px; height: 12px; flex-shrink: 0; border: 1px solid #8e7c88; border-radius: 2px; color: #e5ca7d; font-size: 11px; line-height: 1; }
.action-panel [data-preaction]:is(.selected, [aria-pressed='true'], [aria-checked='true']) { color: #e3cc92; border-color: #a88e56; }
.action-panel [data-preaction]:is(.selected, [aria-pressed='true'], [aria-checked='true'])::before { content: '✓'; border-color: #c4a669; }
.sit-out-btn, .resume-btn { min-height: 23px; font-size: 11px; color: #aaa4a7; padding: 2px 7px; }
.resume-btn { color: #e7c88a; }
.result-row { min-height: 0; flex: 1; display: flex; align-items: center; gap: 9px; }
.result-icon { color: #e7c06b; font-size: 24px; }
.result-row .action-message { font-size: 12px; }
.result-row .action-hint { font-size: 10px; color: #aaa4a7; }
.result-countdown { color: #aaa4a7; font-size: 10px; line-height: 14px; font-variant-numeric: tabular-nums; }
.next-hand-btn { min-height: 43px; width: 100%; }
.action-panel:has(.next-hand-btn) { gap: 4px; }
/* The physical dock slot stays stable; its visible result sheet occupies only
   the lower portion, leaving a caption gutter below the hero nameplate. */
.action-panel:has(.result-row) { align-self: end; height: calc(clamp(48px, calc(106px - var(--hero-result-note-height, 38px)), 76px) + env(safe-area-inset-bottom, 0px)); max-height: 100%; padding-top: 4px; padding-bottom: calc(4px + env(safe-area-inset-bottom, 0px)); gap: 3px; }
.action-panel:has(.result-row) .dock-strip { display: none; }
.action-panel:has(.result-row) .result-row { gap: 6px; }
.action-panel:has(.result-row) .result-icon { font-size: 18px; }
.action-panel:has(.result-row) .action-message { font-size: 11px; line-height: 14px; }
.action-panel:has(.result-row) .action-hint { font-size: 10px; line-height: 12px; -webkit-line-clamp: 1; }
.action-panel:has(.next-hand-btn:not([hidden])) .result-row { display: none; }
.action-panel:has(.next-hand-btn) .dock-strip { min-height: 14px; height: 14px; flex: 0 0 14px; }
.action-panel:has(.next-hand-btn) .next-hand-btn { min-height: 35px; height: 35px; flex-shrink: 0; }
.action-panel:has(.next-hand-btn) .action-message, .action-panel:has(.next-hand-btn) .action-hint { white-space: normal; overflow: hidden; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.waiting-state { display: flex; align-items: center; gap: 9px; flex: 1; min-height: 0; }
.thinking-dots { display: flex; gap: 3px; }
.dealing-status { width: 100%; color: var(--muted); font-size: 11px; line-height: 16px; text-align: center; }
.thinking-dots i { width: 4px; height: 4px; background: #aaa3a6; border-radius: 50%; animation: thinking 1.4s infinite; }
.thinking-dots i:nth-child(2) { animation-delay: .15s; }
.thinking-dots i:nth-child(3) { animation-delay: .3s; }
@keyframes thinking { 0%, 80%, 100% { opacity: .3; } 40% { opacity: 1; } }
@media (min-width: 651px) {
  .poker-app { border-left: 1px solid #30272d; border-right: 1px solid #30272d; }
  .game-header { padding-left: 13px; padding-right: 13px; }
  .table-surface { left: 10%; width: 80%; }
  .seat-1, .seat-2 { left: 24px; }
  .seat-4, .seat-5 { right: 24px; }
  .action-panel { --dock-padding: 20px; }
}
@media (max-width: 370px) {
  .game-header { padding-left: 5px; padding-right: 5px; gap: 3px; }
  .header-title { gap: 4px; }
  .header-title > span { max-width: 99px; font-size: 8px; }
  .header-stakes { font-size: 11px; padding-left: 3px; padding-right: 3px; }
  .header-icon { width: 25px; }
  .seat { --avatar-size: 56px; --nameplate-half: 45px; width: 90px; }
  .seat-1, .seat-2 { left: 8px; }
  .seat-4, .seat-5 { right: 8px; }
  .seat-bet { width: 56px; font-size: 11px; }
  .seat-3 .seat-bet { left: calc(50% + 32px); }
  .community-cards .playing-card, .community-cards .card-slot { width: 44px; height: 64px; }
  .community-cards .card-corner { font-size: 23px; }
  .community-cards .playing-card { --corner-suit-size: 12px; --large-suit-size: 21px; }
  .seat.hero { left: 9%; width: 92px; --nameplate-half:46px; }
  .seat.hero .hole-cards .card-slot, .seat.hero .hole-cards .playing-card { width: 52px; height: 75px; }
  .seat-0 .seat-bet { left: calc(100% + 12px); }
  .action-panel { --dock-padding: 14px; }
  .action-value, .preset-amount { font-size: 19px; }
}
@media (max-height: 740px) {
  .table-surface { top: 5%; height: 89%; }
  .felt-brand { top: 13%; font-size: 20px; }
  .pot-area { top: 28%; }
  .street-pill { top: 36.5%; }
  .community-cards { top: 40%; }
  .seat-2, .seat-4 { top: 25%; }
  .seat-1, .seat-5 { top: 56.5%; }
  .seat-1 .seat-bet, .seat-5 .seat-bet { top: 5px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
