/* 산중야회 • private Hold’em table. Load after the shared table styles. */
body[data-screen="game"] {
  --poker-edge: clamp(14px, 2.1vw, 34px);
  --poker-muted: #b8bcb9;
  --poker-white: #f9faf9;
  background: #202120;
  color: var(--poker-white);
}
body[data-screen="game"]::before {
  background: var(--felt-grain) center / 150px 150px repeat, radial-gradient(ellipse at 50% 32%, #303230, #232423 54%, #1a1b1a 100%);
  background-blend-mode: soft-light, normal;
  filter: none;
}
body[data-screen="game"]::after { content: none; }
body[data-screen="game"] .site-header {
  min-height: 55px;
  padding: max(4px, env(safe-area-inset-top)) max(var(--poker-edge), env(safe-area-inset-right)) 4px max(var(--poker-edge), env(safe-area-inset-left));
  gap: 8px;
  background: #181a187a;
  box-shadow: inset 0 -1px #ffffff0b;
}
body[data-screen="game"] .brand { gap: 5px; color: #f5f6f4; text-shadow: none; }
body[data-screen="game"] .brand-seal { width: 29px; height: 29px; color: #dcdfdc; }
body[data-screen="game"] .brand-ko { font: 850 clamp(17px, 1.7vw, 23px)/1 var(--sans); letter-spacing: -.065em; }
body[data-screen="game"] .header-tools { gap: clamp(5px, 1vw, 15px); }
body[data-screen="game"] .header-tools :is(.hu-guide-button, #admin-open, #invite) { color: #c8ccc8; text-shadow: none; }
body[data-screen="game"] .header-tools svg { color: currentColor; }
body[data-screen="game"] #audio-toggle {
  min-height: 39px;
  padding-inline: 9px;
  color: #bfc2bf;
  background: #222422;
  border-color: #ffffff23;
  border-radius: 6px;
  box-shadow: 0 2px #ffffff12;
}
body[data-screen="game"] #audio-toggle[aria-pressed="true"] { color: #f5f8f5; background: #343b35; }
body[data-screen="game"] #audio-toggle:not(:has(svg))::before {
  content: "";
  display: block;
  width: 15px;
  height: 15px;
  flex: none;
  background: currentColor;
  mask: center / contain no-repeat url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-linecap='round' stroke-linejoin='round' stroke-width='2'%3E%3Cpath d='M3 9h4l5-4v14l-5-4H3z' fill='black'/%3E%3Cpath d='M16 9a4 4 0 0 1 0 6m3-9a8 8 0 0 1 0 12'/%3E%3C/svg%3E");
}
body[data-screen="game"] :focus-visible { outline-color: #a5e0ba; outline-offset: 3px; }

/* Table and rack stay in flow. The outside seats may extend past the felt. */
.game {
  --linen: #f4f6f4;
  --light-ink: #cfd3cf;
  --cool-ink: #bac6be;
  --card-width: clamp(44px, min(7.25vw, 13svh), 135px);
  --seat-card-width: clamp(29px, min(3.82vw, 8svh), 78px);
  --own-card-width: clamp(35px, min(4.65vw, 9svh), 88px);
  --rack-width: 510px;
  --game-gutter: max(var(--poker-edge), env(safe-area-inset-left), env(safe-area-inset-right));
  --layout-top: clamp(62px, 10svh, 127px);
  --layout-bottom: max(19px, env(safe-area-inset-bottom));
  --back-ink: url('/ridge.svg') center / 74% auto no-repeat,
    repeating-linear-gradient(135deg, #f9b1ad30 0 2px, #761b2112 2px 4px, transparent 4px 6px),
    linear-gradient(150deg, #d97b77, #b95b59);
  width: 100%;
  max-width: 1800px;
  padding: var(--layout-top) var(--game-gutter) var(--layout-bottom);
  align-content: space-between;
  gap: 0;
  color: var(--linen);
  font-variant-numeric: tabular-nums;
}
.game .table-meta {
  position: absolute;
  inset: 9px var(--game-gutter) auto auto;
  width: auto;
  min-height: 0;
  margin: 0;
  align-items: flex-end;
  justify-content: flex-end;
  gap: 2px 12px;
  color: var(--poker-muted);
  font: 600 11px/1.3 var(--sans);
  text-align: right;
  text-shadow: none;
}
.game .table-meta :is(.meta-blinds,.meta-count) { color: inherit; padding: 0; border: 0; background: none; font-weight: inherit; }
.game .table-meta .meta-blinds { color: #e3e7e3; font-size: clamp(13px, 1.34vw, 20px); font-weight: 770; line-height: 1.15; letter-spacing: -.025em; }

.game .table {
  --rail: clamp(13px, 1.5vw, 31px);
  --curve: 50%;
  --board-y: 46%;
  width: min(74vw, 1370px);
  height: clamp(315px, min(54svh, 37.5vw), 675px);
  overflow: visible;
  border: 1px solid #151716;
  border-radius: var(--curve);
  background: linear-gradient(173deg, #343634 0%, #252625 34%, #131413 100%);
  box-shadow: inset 0 1px 1px #ffffff16, inset 0 -2px 0 #080a08, 0 4px 0 #101210, 0 18px 32px #080a08a6;
}
.game .table::before {
  inset: var(--rail) var(--rail) calc(var(--rail) * 1.34);
  border: 1px solid #192c20;
  border-radius: inherit;
  background: var(--felt-grain) 50% 50% / 130px 130px, radial-gradient(ellipse at 49% 37%, #449467 0%, #377e55 64%, #286443 100%);
  background-blend-mode: soft-light, normal;
  box-shadow: 0 1px 2px #090c0a8a, inset 0 1px 4px #162e219c, inset 0 0 0 3px #c1eaca0f, inset 0 -6px 15px #142a1a50;
}
.game .table::after {
  content: '산중야회';
  inset: auto auto 17% 50%;
  width: max-content;
  display: block;
  padding-top: clamp(13px, 2.25vw, 39px);
  transform: translateX(-50%);
  border: 0;
  border-radius: 0;
  background: url('/ridge.svg') center -2px / clamp(44px, 5.5vw, 91px) auto no-repeat;
  color: #d9ebd9;
  opacity: .22;
  text-align: center;
  font: 880 clamp(14px, 2vw, 31px)/1 var(--sans);
  letter-spacing: -.08em;
}
.game .felt-shine { display: none; }

/* A consistent five-card strip prevents re-centering as the board is dealt. */
.game .board, .game .board:has(.pot) { inset: var(--board-y) auto auto 50%; max-width: 90%; gap: 0; }
.game .board .board-label, .game .board:has(.pot) .board-label {
  margin: 0 0 5px;
  color: #eff8f0;
  font: 650 clamp(10px, 1vw, 14px)/1.15 var(--sans);
  letter-spacing: .03em;
  text-shadow: 0 1px 2px #143a27;
}
.game .table[data-phase="lobby"] .board .board-label { color: #f4fbf5; font: 790 clamp(18px, 2vw, 27px)/1.2 var(--sans); letter-spacing: -.04em; }
.game .table .pot {
  display: flex;
  justify-content: center;
  align-items: center;
  min-width: clamp(78px, 11vw, 178px);
  min-height: clamp(25px, 3.1vw, 46px);
  margin: 0 0 clamp(9px, 1.15vw, 20px);
  padding: 3px 13px;
  gap: 5px;
  border: 1px solid #15332126;
  border-radius: 999px;
  background: #15382260;
  box-shadow: inset 0 1px 2px #173c264a;
  color: #e6f2e9;
  font: 650 clamp(10px, 1.15vw, 15px)/1 var(--sans);
}
.game .table .pot:empty { display: block; min-width: 0; min-height: 0; width: 1px; height: 1px; margin: 0; padding: 0; border: 0; background: none; }
.game .pot :is(strong,b,.pot-amount) { color: #fff; font: 850 clamp(18px, 2.4vw, 36px)/1 var(--sans); letter-spacing: -.035em; }
.game .pot .chip-stack { max-width: clamp(23px, 3.5vw, 56px); max-height: 27px; }
.game .board-cards { display: flex; justify-content: center; gap: clamp(4px, .72vw, 12px); }
.game .card {
  aspect-ratio: .8;
  padding: calc(var(--w) * .11);
  border: 1px solid #eff0ee;
  border-radius: max(3px, calc(var(--w) * .075));
  background: #fff;
  color: #202223;
  box-shadow: 0 2px 5px #142a205c, inset 0 -1px #00000009;
  font-family: Georgia, 'Times New Roman', serif;
}
.game .card.red { color: #c63836; }
.game .card .rank { font-size: calc(var(--w) * .44); line-height: .96; letter-spacing: -.095em; }
.game .card .suit { display: none; }
.game .card .card-mark { inset: auto 8% 7% auto; font-size: calc(var(--w) * .66); line-height: .85; opacity: 1; transform: none; }
.game :is(.card.empty,.board-cards > .empty-board) {
  display: block;
  flex: 0 0 auto;
  width: var(--w, var(--card-width));
  aspect-ratio: .8;
  border: 1px solid #eff8f275;
  border-radius: max(3px, calc(var(--card-width) * .075));
  background: linear-gradient(150deg, #effcf22d, #e4f7e31a);
  box-shadow: inset 0 0 0 2px #163b2717;
}
.game .card.empty::before { content: none; }
.game .card.back { border: max(2px, calc(var(--w) * .05)) solid #fff4f2; background: var(--back-ink); box-shadow: 0 2px 5px #121d18a3; }
.game .card.motion-board-on::after, .game .card.motion-show-on::after, .game .card.motion-hole-on:not(.back)::after { background: var(--back-ink); }
.game .table-outcome { padding: 7px 0 1px; color: #f5faf5; }
.game .table:has(.table-outcome:not(:empty)) { --board-y: 45%; }

/* Clockwise coordinates beginning with the local player at six o’clock. */
.game .seat {
  --pocket-width: calc(var(--seat-card-width) * 1.72);
  --identity-width: clamp(63px, 7.05vw, 145px);
  --plaque-height: clamp(35px, calc(var(--seat-card-width) * 1.05), 80px);
  --plaque-gap: clamp(5px, .72vw, 12px);
  --bank-w: clamp(24px, 3.6vw, 60px);
  --bet-x: 50%;
  --bet-y: calc(100% + 6px);
  --bet-pull: -50%;
  width: calc(var(--pocket-width) + var(--identity-width));
  min-height: var(--plaque-height);
  grid-template-columns: var(--pocket-width) minmax(0, 1fr);
  grid-template-rows: auto;
  justify-items: stretch;
  gap: 0;
  color: #f3f4f3;
  text-align: left;
  text-shadow: none;
}
.game .seat.pos0 { --seat-x: 50%; --seat-y: 103%; --bet-y: -29px; }
.game .seat.pos1 { --seat-x: 20%; --seat-y: 93%; --bet-y: -24px; }
.game .seat.pos2 { --seat-x: 0%; --seat-y: 67%; --bet-x: calc(100% + 6px); --bet-y: 34%; --bet-pull: 0%; }
.game .seat.pos3 { --seat-x: 0%; --seat-y: 33%; --bet-x: calc(100% + 6px); --bet-y: 54%; --bet-pull: 0%; }
.game .seat.pos4 { --seat-x: 20%; --seat-y: 7%; }
.game .seat.pos5 { --seat-x: 50%; --seat-y: -3%; }
.game .seat.pos6 { --seat-x: 80%; --seat-y: 7%; }
.game .seat.pos7 { --seat-x: 100%; --seat-y: 33%; --bet-x: -6px; --bet-y: 54%; --bet-pull: -100%; }
.game .seat.pos8 { --seat-x: 100%; --seat-y: 67%; --bet-x: -6px; --bet-y: 34%; --bet-pull: -100%; }
.game .seat.pos9 { --seat-x: 80%; --seat-y: 93%; --bet-y: -24px; }
.game .seat.own { --pocket-width: calc(var(--own-card-width) * 1.77); --identity-width: clamp(72px, 7.95vw, 155px); --plaque-height: calc(var(--own-card-width) * 1.06); }
.game .seat:is(.pos2,.pos3,.pos7,.pos8):not(.own) { --identity-width: clamp(63px, 6.6vw, 133px); }
.game .seat .pocket, .game .seat.own .pocket {
  z-index: 2;
  grid-area: 1 / 1;
  width: max-content;
  max-width: 100%;
  margin: 0;
  justify-self: center;
  gap: 0;
}
.game .pocket .card { aspect-ratio: .78; }
.game .pocket .card + .card { margin-left: calc(var(--seat-card-width) * -.3); }
.game .own .pocket .card + .card { margin-left: calc(var(--own-card-width) * -.23); }
.game .pocket .card:nth-child(1):not(.empty) { transform: rotate(-7deg); }
.game .pocket .card:nth-child(2):not(.empty) { transform: rotate(7deg); }
.game .seat .seat-identity {
  position: relative;
  grid-area: 1 / 1 / 2 / 3;
  align-self: center;
  justify-self: stretch;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-content: center;
  justify-content: start;
  justify-items: start;
  width: auto;
  min-height: var(--plaque-height);
  padding: 4px var(--plaque-gap) 4px calc(var(--pocket-width) + var(--plaque-gap));
  gap: 2px 0;
  border-radius: clamp(5px, .55vw, 10px);
  border: 1px solid #ffffff0c;
  background: #252726f5;
  box-shadow: 0 3px 9px #0b0d0b59, inset 0 1px #ffffff07;
  color: #f5f6f5;
  text-align: left;
}
.game .seat:not(.folded):has(.pocket:empty) .seat-identity {
  width: var(--identity-width);
  justify-self: center;
  padding-left: var(--plaque-gap);
  justify-items: center;
  text-align: center;
}
.game .seat .player-name, .game .seat .stack {
  grid-column: 1;
  display: block;
  width: 100%;
  min-width: 0;
  margin: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  color: inherit;
  letter-spacing: -.03em;
}
.game .seat .player-name { grid-row: 1; font: 660 clamp(11px, 1.27vw, 23px)/1.1 var(--sans); }
.game .seat .stack { grid-row: 2; font: 830 clamp(13px, 1.39vw, 25px)/1.1 var(--sans); }
.game .seat .stack::before, .game .seat .wager::before { content: none; }
.game .seat .dealer-mark {
  position: absolute;
  z-index: 3;
  inset: calc(100% + 5px) auto auto calc(50% - 33px);
  grid-area: auto;
  display: grid;
  place-content: center;
  width: clamp(17px, 1.55vw, 25px);
  height: auto;
  aspect-ratio: 1;
  border: 1px solid #dce8dd;
  border-radius: 50%;
  background: #e0eae0;
  color: #26523e;
  text-indent: 0;
  font: 850 clamp(10px, 1.06vw, 15px)/1 var(--sans);
  box-shadow: 0 2px 4px #102c1c80;
}
.game .seat:is(.pos0,.pos1,.pos2,.pos8,.pos9) .dealer-mark { top: auto; bottom: calc(100% + 5px); }
.game .seat .bank-stack, .game .seat.own .bank-stack, .game .seat:has(.pocket:empty) .bank-stack {
  z-index: 2;
  position: absolute;
  grid-area: auto;
  top: auto;
  bottom: calc(var(--plaque-height) - 11px);
  left: auto;
  right: -3px;
  width: max-content;
  max-width: var(--bank-w);
  transform: none;
  opacity: .78;
  filter: drop-shadow(0 1px 2px #10151175);
}
.game .seat:not(.folded):has(.pocket:empty) .bank-stack { right: calc((100% - var(--identity-width)) / 2 - 3px); }
.game .seat .bank-stack:empty, .game .seat .wager:empty { position: absolute; display: block; width: 1px; height: 1px; visibility: hidden; }
.game .seat.acting { z-index: 4; }
.game .seat.acting .seat-identity {
  border-color: #fff;
  background: #fff;
  color: #1c211e;
  box-shadow: 0 0 10px #ecfff4a1, 0 0 33px #f4fff4a6, 0 3px 9px #0b0d0b65;
}
.game .seat.acting .player-name { text-decoration: none; }
.game .seat.acting .pocket > .card { outline: 0; }
.game .seat.own.acting .pocket > .card { box-shadow: 0 2px 7px #25342a75; }
.game .acting-flag {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.game .turn-track {
  position: absolute;
  z-index: 1;
  right: 1px;
  bottom: 1px;
  left: 1px;
  display: block;
  height: clamp(3px, .43vw, 6px);
  margin: 0;
  overflow: hidden;
  border: 0;
  border-radius: 0 0 5px 5px;
  background: #dfe4df;
  color: #399761;
  pointer-events: none;
}
.game .turn-track:not(progress)::before {
  content: '';
  display: block;
  width: var(--turn-progress, calc(var(--turn-fraction, 1) * 100%));
  height: 100%;
  background: linear-gradient(90deg, #298a56, #69c688);
  transition: width .24s linear;
}
.game .turn-track:has(> :is(span,i,b))::before { display: none; }
.game .turn-track > :is(span,i,b) {
  display: block;
  width: calc(var(--turn-fraction, 1) * 100%);
  height: 100%;
  background: linear-gradient(90deg, #298a56, #69c688);
  transition: width .24s linear;
}
.game .turn-track.urgent :is(span,i,b), .game .turn-track.urgent::before { background: #c24c49; }
.game progress.turn-track { appearance: none; width: calc(100% - 2px); }
.game progress.turn-track::-webkit-progress-bar { background: #dfe4df; }
.game progress.turn-track::-webkit-progress-value { background: linear-gradient(90deg, #298a56, #69c688); }
.game progress.turn-track::-moz-progress-bar { background: #399761; }
.game .seat.acting:has(.pocket:empty) > .turn-track { inset-inline: calc((100% - var(--identity-width)) / 2 + 1px); }
.game .seat.folded .seat-identity { color: #b5bcb7; background: #272927e8; }
.game .seat.folded .player-name { color: inherit; }
.game .seat.folded .pocket:not(:empty) { opacity: .42; }
.game .seat.folded .pocket:empty { display: grid; place-items: center; width: 100%; height: var(--plaque-height); }
.game .seat.folded .pocket:empty::before { content: '×'; color: #747a75; font: 850 clamp(21px, 3.2vw, 52px)/1 var(--sans); }
.game .seat .last-action, .game .seat.own .last-action, .game .seat .hand-caption {
  grid-area: auto;
  position: absolute;
  z-index: 3;
  top: calc(100% + 4px);
  left: 50%;
  width: max-content;
  max-width: 130%;
  margin: 0;
  padding: 2px 6px;
  transform: translateX(-50%);
  border-radius: 4px;
  background: #1c211eea;
  color: #e5eae6;
  font: 650 clamp(9px, .91vw, 13px)/1.15 var(--sans);
  text-align: center;
}
.game .seat.own .hand-caption { color: #f4fbf6; }
.game .seat.own:has(.hand-caption) .last-action { top: auto; bottom: calc(100% + 4px); }
.game .seat.vacant {
  display: grid;
  place-items: center;
  min-width: 0;
  min-height: 0;
  padding: 6px 11px;
  border: 1px dashed #d9e8dc50;
  border-radius: 5px;
  background: #202421b0;
  color: #d4ddd6;
  opacity: .85;
  font: 550 clamp(9px, .9vw, 12px)/1.1 var(--sans);
  white-space: nowrap;
}
.game .seat .wager, .game .seat:is(.pos0,.pos1,.pos2,.pos3,.pos4,.pos5,.pos6,.pos7,.pos8,.pos9) .wager {
  position: absolute;
  z-index: 4;
  top: var(--bet-y);
  left: var(--bet-x);
  right: auto;
  bottom: auto;
  grid-area: auto;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 4px;
  margin: 0;
  padding: 2px 5px;
  transform: translateX(var(--bet-pull));
  border: 1px solid #6ea18454;
  border-radius: 999px;
  background: #1a3729e8;
  color: #f1f6f2;
  box-shadow: 0 2px 4px #09271850;
  font: 730 clamp(10px, 1.07vw, 15px)/1 var(--sans);
}
.game .seat .wager:empty { display: block; padding: 0; border: 0; }
.game .seat .wager :is(svg,img) { width: auto; max-width: clamp(29px, 3.6vw, 50px); max-height: clamp(16px, 2vw, 28px); }
.game .seat > .motion-action { left: 50%; top: -5px; padding: 4px 8px; border: 0; border-radius: 999px; background: #f8faf8; color: #232624; box-shadow: 0 2px 6px #0b170f61; }
.game .seat.pos3 > .motion-action { left: 50%; }

/* The game rail is a small independent cluster, not another dashboard. */
.game .poker-tools {
  position: absolute;
  z-index: 5;
  inset: 10px auto auto var(--game-gutter);
  display: flex;
  flex-direction: column;
  align-items: stretch;
  width: max-content;
  padding: 2px;
  gap: 1px;
  border: 1px solid #ffffff26;
  border-radius: 6px;
  background: #191b19a6;
}
.game .poker-tools :is(#table-options,#away-toggle,#stand-toggle) {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 4px;
  min-width: clamp(47px, 4.9vw, 78px);
  min-height: clamp(50px, 4.85vw, 76px);
  padding: 5px 4px;
  border: 1px solid transparent;
  border-radius: 4px;
  background: transparent;
  box-shadow: none;
  color: #c2c6c3;
  cursor: pointer;
  font: 650 clamp(9px, .94vw, 12px)/1.15 var(--sans);
  white-space: nowrap;
}
.game .poker-tools :is(#table-options,#away-toggle,#stand-toggle):is(:hover,:focus-visible,[aria-pressed="true"],[aria-expanded="true"]) { background: #393d39; color: #fff; border-color: #ffffff1f; }
.game .poker-tools button:disabled { opacity: .48; cursor: not-allowed; }
.game .poker-tools button svg { width: clamp(17px, 2vw, 30px); height: auto; color: currentColor; }
.game .poker-tools :is(#table-options,#away-toggle,#stand-toggle):not(:has(svg,[aria-hidden="true"]))::before {
  content: '';
  display: block;
  width: clamp(16px, 2vw, 28px);
  height: clamp(16px, 2vw, 28px);
  background: currentColor;
  mask: var(--tool-icon) center / contain no-repeat;
}
.game #table-options { --tool-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-linecap='round' stroke-width='2.6'%3E%3Cpath d='M4 6h16M4 12h16M4 18h16'/%3E%3C/svg%3E"); }
.game #away-toggle { --tool-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-linecap='round' stroke-linejoin='round' stroke-width='2'%3E%3Ccircle cx='12' cy='4.5' r='1.8' fill='black'/%3E%3Cpath d='M7 14v-2c0-2 2.2-3 5-3s5 1 5 3v2m-8 7v-8m6 8v-8m-3 2v6'/%3E%3C/svg%3E"); }
.game #stand-toggle { --tool-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-linecap='round' stroke-linejoin='round' stroke-width='2.1'%3E%3Cpath d='M10 5H4v14h6m-1-7h12m-5-5 5 5-5 5'/%3E%3C/svg%3E"); }

/* Desktop action buttons sit in the lower right; the bet editor grows upward in the rack. */
.game .controls {
  justify-self: end;
  justify-items: end;
  align-self: end;
  width: min(100%, var(--rack-width));
  margin-top: clamp(57px, 6.4vw, 115px);
  padding: 0;
  gap: 7px;
  color: #e8ece8;
  text-align: right;
}
.game .decision-heading, .game .turn-copy {
  justify-content: flex-end;
  color: #e2e8e3;
  font: 750 clamp(13px, 1.3vw, 18px)/1.25 var(--sans);
  text-shadow: none;
  letter-spacing: -.025em;
}
.game #clock { min-width: 3.4em; padding: 3px 6px; border-radius: 4px; background: #343a35; color: #e4eee5; font-weight: 730; text-align: center; }
.game #clock.urgent { color: #ffcbc9; background: #542e2e; }
.game .action-row { justify-content: end; gap: 7px; }
.game .action-row > .btn { min-height: clamp(47px, 4.45vw, 67px); padding: 8px 7px; font-size: clamp(15px, 1.55vw, 22px); }
.game .action-row > .btn:only-child { flex-basis: min(100%, 275px); }
.game .controls .btn, .game .controls .btn.primary {
  border: 1px solid #f3f4f3;
  border-bottom: 3px solid #b9bdb9;
  border-radius: 6px;
  background: #f8f9f8;
  box-shadow: 0 2px 4px #10151076;
  color: #242725;
  font-family: var(--sans);
  font-weight: 800;
  letter-spacing: -.035em;
  text-shadow: none;
}
.game .controls .btn.primary { background: #fff; color: #131a15; border-bottom-color: #91b79e; }
.game .controls .btn:not(.quiet):not(:disabled):not([aria-disabled="true"]):hover { border-color: #e3f4e8; border-bottom-color: #a5cbb0; background: #ebf6ee; color: #16261c; box-shadow: 0 2px 5px #111b1376; }
.game .controls .btn:not(.quiet):not(:disabled):active { transform: translateY(1px); }
.game .controls .btn.quiet { border-color: #ffffff27; border-bottom-width: 1px; background: #242624; color: #cbd1cc; box-shadow: none; }
.game .controls .btn:disabled { opacity: .48; }
.game .controls :is(.secondary-row,.show-below) { justify-content: flex-end; }
.game .raise-panel {
  grid-row: 2;
  justify-content: flex-end;
  gap: 6px;
  padding: 8px;
  border: 1px solid #ffffff22;
  border-radius: 6px;
  background: #282c29;
  color: #e4eae5;
}
.game .controls:has(.raise-panel) > .action-row { grid-row: 3; }
.game .raise-panel .btn { padding: 5px 12px; font-size: 13px; }
.game .raise-panel input[type="number"] { width: 88px; border-color: #9ba89e; background: #1b211d; color: #fff; font-size: 16px; }
.game .raise-panel input[type="range"] { width: 100%; min-width: 0; min-height: 32px; margin: 0; accent-color: #83cf9e; }
.game .raise-panel > input.raise-range { flex-basis: 100%; }
.game .raise-range:not(input) { display: flex; align-items: center; gap: 6px; width: 100%; }
.game .raise-entry { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 5px 7px; width: 100%; }
.game .bet-shortcuts { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 4px; flex: 1 0 100%; }
.game .controls .bet-shortcuts button {
  min-width: 42px;
  min-height: 36px;
  padding: 3px 8px;
  border: 1px solid #b2bdb499;
  border-radius: 4px;
  background: #343e37;
  color: #f2f6f3;
  cursor: pointer;
  font: 700 12px/1 var(--sans);
}
.game .controls .bet-shortcuts button:not(:disabled):hover { background: #4b6051; color: #fff; border-color: #b2bdb4; }
.game .controls .bet-shortcuts button:disabled { opacity: .55; cursor: not-allowed; }

/* Portrait uses staggered positions, leaving the entire center band for the board. */
@media (max-width: 650px), (max-width: 900px) and (orientation: portrait) {
  body[data-screen="game"] { --poker-edge: 10px; }
  body[data-screen="game"] .site-header { min-height: 51px; }
  body[data-screen="game"] .brand-seal { width: 24px; height: 24px; }
  body[data-screen="game"] #audio-toggle { min-height: 36px; padding-inline: 5px; }
  body[data-screen="game"] #audio-toggle:not(:has(svg))::before { width: 13px; height: 13px; }
  .game {
    --card-width: clamp(35px, 11.9vw, 74px);
    --seat-card-width: clamp(19px, 5.5vw, 38px);
    --own-card-width: clamp(27px, 8vw, 48px);
    --rack-width: 560px;
    --layout-top: 71px;
    --layout-bottom: max(12px, env(safe-area-inset-bottom));
  }
  .game .table-meta { top: 13px; flex-direction: column; gap: 2px; font-size: 10px; }
  .game .table-meta .meta-blinds { font-size: clamp(12px, 3.7vw, 17px); }
  .game .table { --rail: clamp(9px, 2.9vw, 19px); --board-y: 46.5%; width: min(100%, 86vw, 570px); height: clamp(330px, 56svh, 590px); }
  .game .table::after { bottom: 23%; font-size: clamp(15px, 5vw, 33px); }
  .game .poker-tools { top: 6px; flex-direction: row; }
  .game .poker-tools :is(#table-options,#away-toggle,#stand-toggle) { min-width: 46px; min-height: 43px; padding: 3px 4px; gap: 2px; }
  .game .seat { --identity-width: clamp(53px, 14vw, 99px); --plaque-height: clamp(32px, 8.5vw, 47px); --plaque-gap: 4px; --bank-w: clamp(19px, 5.25vw, 31px); }
  .game .seat.own { --identity-width: clamp(68px, 18vw, 115px); --plaque-height: clamp(35px, 9vw, 52px); }
  .game .seat:is(.pos2,.pos3,.pos7,.pos8):not(.own) { --identity-width: clamp(53px, 14vw, 99px); }
  .game .seat .player-name { font-size: clamp(10px, 2.8vw, 16px); }
  .game .seat .stack { font-size: clamp(12px, 3.25vw, 18px); }
  .game .seat.pos0 { --seat-y: 99%; --bet-y: -22px; }
  .game .seat.pos1 { --seat-x: 20%; --seat-y: 85%; --bet-y: -20px; }
  .game .seat.pos2 { --seat-x: 11%; --seat-y: 68.5%; --bet-y: 35%; }
  .game .seat.pos3 { --seat-x: 11%; --seat-y: 28%; --bet-y: 43%; }
  .game .seat.pos4 { --seat-x: 19%; --seat-y: 12.5%; }
  .game .seat.pos5 { --seat-y: 0%; }
  .game .seat.pos6 { --seat-x: 81%; --seat-y: 12.5%; }
  .game .seat.pos7 { --seat-x: 89%; --seat-y: 28%; --bet-y: 43%; }
  .game .seat.pos8 { --seat-x: 89%; --seat-y: 68.5%; --bet-y: 35%; }
  .game .seat.pos9 { --seat-x: 80%; --seat-y: 85%; --bet-y: -20px; }
  .game .seat .dealer-mark { left: calc(50% - 23px); }
  .game .board, .game .board:has(.pot) { max-width: 93%; }
  .game .board-cards { gap: clamp(4px, 1.25vw, 8px); }
  .game .controls { justify-self: center; margin-top: 36px; gap: 6px; }
  .game .action-row { gap: 5px; }
  .game .controls .decision-heading, .game .controls .turn-copy { font-size: 13px; }
  .game .controls .bet-shortcuts button { min-height: 43px; }
}
@media (min-width: 651px) and (max-height: 590px) and (orientation: landscape) {
  .game { --layout-top: 48px; --layout-bottom: 13px; }
  .game .table { height: clamp(238px, 57svh, 334px); }
  .game .controls { margin-top: 46px; }
}
@media (max-width: 365px) {
  body[data-screen="game"] .header-tools :is(.hu-guide-button,#admin-open,#invite) { padding-inline: 3px; font-size: 11px; }
  body[data-screen="game"] .header-tools { gap: 2px; }
  body[data-screen="game"] #audio-toggle { padding-inline: 3px; }
  .game .poker-tools :is(#table-options,#away-toggle,#stand-toggle) { min-width: 43px; }
}
@media (prefers-reduced-motion: reduce) {
  .game .turn-track::before, .game .turn-track > :is(span,i,b) { transition: none; }
}
