/* P0 runtime art integration. Semantic text and values remain in the DOM. */
:root {
  --art-overlay: linear-gradient(180deg, rgba(10, 8, 20, .38), rgba(10, 8, 20, .76));
}

body {
  min-height: 100vh;
  background-color: var(--ink);
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
  background-attachment: fixed;
}

body[data-visual-context="login"] {
  background-image: linear-gradient(180deg, rgba(10, 8, 20, .1), rgba(10, 8, 20, .34)), var(--holdem-bg-login);
  background-position: center;
}
body[data-visual-context="lobby"],
body[data-visual-context="room"] { background-image: var(--art-overlay), var(--holdem-bg-lobby); }
body[data-visual-context="table"] { background-image: linear-gradient(180deg, rgba(10, 8, 20, .28), rgba(10, 8, 20, .62)), var(--holdem-bg-table-stage); }

.topbar { background: rgba(21, 18, 31, .9); }
.app-shell { position: relative; z-index: 1; }

.brand { min-width: 190px; }
.brand-mark {
  width: 34px;
  height: 34px;
}
.brand-lockup {
  width: 142px;
  height: 38px;
}
.login-brand-art {
  width: min(320px, 72vw);
  height: clamp(52px, 7vw, 78px);
  background-position: left center;
}

/* MK-001 login composition. The mockup guides layout; visible copy and form
   state remain accessible runtime DOM content. */
body[data-visual-context="login"] { overflow: hidden; }
body[data-visual-context="login"] .topbar { display: none; }
body[data-visual-context="login"] .app-shell {
  width: 100%;
  min-height: 100dvh;
  padding: 0;
}
.login-layout {
  position: relative;
  min-height: 100dvh;
  display: grid;
  grid-template-columns: 1fr;
  place-items: center;
  padding: clamp(112px, 14vh, 154px) max(24px, env(safe-area-inset-right)) max(32px, env(safe-area-inset-bottom)) max(24px, env(safe-area-inset-left));
}
.login-brand-block {
  position: absolute;
  top: max(28px, env(safe-area-inset-top));
  left: max(clamp(28px, 5vw, 72px), env(safe-area-inset-left));
  display: grid;
  gap: 2px;
}
.login-brand-block p {
  margin: 0 0 0 3px;
  color: rgba(242, 230, 204, .72);
  font: 700 10px/1.4 monospace;
  letter-spacing: .18em;
}
.login-layout .auth-panel {
  width: min(410px, 100%);
  padding: 26px 24px 24px;
  border: 2px solid var(--cyan);
  border-image: none;
  border-radius: 1px;
  background: rgba(16, 13, 29, .94);
  box-shadow: 7px 7px 0 rgba(240, 90, 166, .2), 0 22px 60px rgba(0, 0, 0, .48);
  image-rendering: pixelated;
}
.login-panel-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 22px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(242, 230, 204, .18);
}
.login-panel-heading h1 {
  margin: 0;
  color: var(--paper);
  font-size: 17px;
  line-height: 1.35;
  letter-spacing: .02em;
}
.login-panel-heading p {
  flex: none;
  margin: 0;
  color: var(--cyan);
  font: 800 8px/1.3 monospace;
  letter-spacing: .12em;
}
.auth-panel label {
  gap: 7px;
  margin-bottom: 14px;
  color: var(--paper);
  font-size: 12px;
}
.auth-panel input {
  min-height: 44px;
  border: 1px solid rgba(242, 230, 204, .55);
  border-radius: 0;
  background-color: rgba(19, 17, 36, .95);
}
.auth-panel input:focus {
  border-color: var(--cyan);
  box-shadow: 0 0 0 2px rgba(84, 229, 208, .18);
}
.auth-panel input[aria-invalid="true"] { border-color: var(--red); }
.auth-panel .primary-button {
  min-height: 46px;
  margin-top: 4px;
  color: var(--paper);
  border: 2px solid var(--cyan);
  border-radius: 2px;
  background-color: rgba(8, 20, 28, .86);
  background-image: none;
  box-shadow: none;
}
.auth-panel .primary-button:hover,
.auth-panel .primary-button:focus-visible {
  color: var(--ink);
  border-color: var(--cyan);
  background-color: var(--cyan);
  background-image: none;
}
.auth-panel .primary-button:disabled {
  color: var(--muted);
  border-color: rgba(84, 229, 208, .36);
  background-image: none;
}
.login-error {
  min-height: 34px;
  margin: -2px 0 12px;
  padding: 8px 10px;
  color: var(--red);
  text-align: center;
  border: 1px solid var(--red);
  background: rgba(241, 109, 112, .08);
  font-size: 12px;
  line-height: 1.35;
}

@media (max-width: 1023px) and (orientation: portrait) {
  body[data-visual-context="login"] { background-position: center top; }
  .login-layout {
    padding: max(122px, calc(env(safe-area-inset-top) + 108px)) max(16px, env(safe-area-inset-right)) max(24px, env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left));
  }
  .login-brand-block {
    top: max(18px, env(safe-area-inset-top));
    left: max(18px, env(safe-area-inset-left));
  }
  .login-brand-art { width: min(280px, 74vw); height: 64px; }
  .login-layout .auth-panel { width: min(390px, 100%); padding: 22px 16px 18px; }
  .login-panel-heading { align-items: flex-start; flex-direction: column; gap: 5px; margin-bottom: 18px; }
  .login-panel-heading h1 { font-size: 16px; }
}

/* Approved card-face redesign v2: one large top-left rank/suit index and an
   intentionally blank body. Runtime state still selects the exact card. */
.card.v8-card-face {
  background-image: var(--holdem-card-face);
  background-position: center;
  background-repeat: no-repeat;
  background-size: 100% 100%;
}
.card.v8-card-face > .card-index {
  opacity: 0 !important;
}
.card.v8-card-face.face-card::after {
  display: none;
}

/* Approved cartoon-pixel card-face package v9. The visible rank and both suit
   marks are baked into the exact WebP selected from authoritative card state. */
.card.v9-card-face {
  background-image: var(--holdem-card-face);
  background-position: center;
  background-repeat: no-repeat;
  background-size: 100% 100%;
}
.card.v9-card-face > .card-index {
  opacity: 0 !important;
}
.card.v9-card-face.face-card::after {
  display: none;
}

@media (max-width: 1023px) and (orientation: landscape) and (max-height: 600px) {
  .login-layout { padding: 64px 20px 12px; }
  .login-brand-block { top: max(8px, env(safe-area-inset-top)); left: max(18px, env(safe-area-inset-left)); }
  .login-brand-art { width: 220px; height: 44px; }
  .login-brand-block p { display: none; }
  .login-layout .auth-panel { width: min(370px, 52vw); padding: 16px 18px 14px; }
  .login-panel-heading { margin-bottom: 10px; padding-bottom: 8px; }
  .auth-panel label { margin-bottom: 8px; }
  .auth-panel input { min-height: 38px; padding-block: 8px; }
  .auth-panel .primary-button { min-height: 40px; }
  .login-error { min-height: 30px; margin-bottom: 8px; padding: 6px 8px; }
}

.panel,
.table-menu,
.action-dock {
  border-image-source: var(--holdem-ui-001-standard);
  border-image-slice: 24 fill;
  border-image-width: 16px;
  image-rendering: pixelated;
}

.primary-button,
.action-button {
  background-color: var(--cyan);
  background-image: var(--holdem-ui-002-default);
  background-position: center;
  background-repeat: no-repeat;
  background-size: 100% 100%;
  image-rendering: pixelated;
}

.primary-button:hover,
.action-button:hover { background-image: var(--holdem-ui-002-hover); }
.primary-button:active,
.action-button:active { background-image: var(--holdem-ui-002-pressed); }
.primary-button:focus-visible,
.action-button:focus-visible { background-image: var(--holdem-ui-002-focus); }
.primary-button:disabled,
.action-button:disabled { background-image: var(--holdem-ui-002-disabled); }

.ghost-button,
.chip-button {
  background-image: var(--holdem-ui-003-default);
  background-position: center;
  background-repeat: no-repeat;
  background-size: 100% 100%;
  image-rendering: pixelated;
}
.ghost-button:hover,
.chip-button:hover { background-image: var(--holdem-ui-003-hover); }
.ghost-button:active,
.chip-button:active { background-image: var(--holdem-ui-003-pressed); }
.ghost-button:focus-visible,
.chip-button:focus-visible { background-image: var(--holdem-ui-003-focus); }
.ghost-button:disabled,
.chip-button:disabled { background-image: var(--holdem-ui-003-disabled); }

input,
select {
  background-color: rgba(8, 7, 13, .78);
  background-image: var(--holdem-ui-005-default);
  background-position: center;
  background-repeat: no-repeat;
  background-size: 100% 100%;
  image-rendering: pixelated;
}
input:focus,
select:focus { background-image: var(--holdem-ui-005-focus); }
input:disabled,
select:disabled { background-image: var(--holdem-ui-005-disabled); }

.art-icon {
  display: inline-block;
  flex: 0 0 auto;
  width: 20px;
  height: 20px;
  vertical-align: middle;
  pointer-events: none;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.status-dot.holdem-ic-net-001-skin,
.status-dot.holdem-ic-net-003-skin,
.status-dot.holdem-ic-net-004-skin,
.status-dot.holdem-ic-net-005-skin { background-image: none; }
.status-dot::before {
  width: 18px;
  height: 18px;
  border-radius: 0;
  background-color: transparent;
  background-position: center;
  background-repeat: no-repeat;
  background-size: contain;
  box-shadow: none;
  image-rendering: pixelated;
}
.status-dot.holdem-ic-net-001-skin::before { background-image: var(--holdem-ic-net-001-default); }
.status-dot.holdem-ic-net-003-skin::before { background-image: var(--holdem-ic-net-003-default); }
.status-dot.holdem-ic-net-004-skin::before { background-image: var(--holdem-ic-net-004-emphasis); }
.status-dot.holdem-ic-net-005-skin::before { background-image: var(--holdem-ic-net-005-emphasis); }

.toast {
  isolation: isolate;
  min-width: min(420px, calc(100vw - 28px));
  min-height: 64px;
  padding: 20px 24px 20px 86px;
  background-color: rgba(21, 18, 31, .96);
  image-rendering: pixelated;
}
.toast[data-a11y-state="error"] { background-image: var(--holdem-a11y-004-error); }
.toast[data-a11y-state="reconnecting"] { background-image: var(--holdem-a11y-004-reconnecting); }
.toast::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0;
  opacity: .35;
  background: var(--holdem-fx-019-static) center / 100% 100% no-repeat;
  pointer-events: none;
}

.quick-start-panel,
.waiting-room-panel { backdrop-filter: blur(8px); }

.waiting-seat {
  position: relative;
  isolation: isolate;
  padding-left: 54px;
  background-color: rgba(8, 7, 13, .62);
}
.waiting-seat.available { padding-left: 12px; }
.waiting-seat .player-avatar-art {
  position: absolute;
  left: 10px;
  top: 50%;
  width: 36px;
  height: 48px;
  transform: translateY(-50%);
}

.player-avatar-art {
  display: block;
  background-position: center bottom;
  background-repeat: no-repeat;
  background-size: contain;
  image-rendering: pixelated;
}

.poker-table.holdem-table-sprite {
  border-color: transparent;
  background-color: var(--felt);
  background-image: var(--holdem-felt-tile);
  background-position: center;
  background-repeat: repeat;
  background-size: 256px 256px;
  box-shadow: 0 24px 80px rgba(0, 0, 0, .62), 0 0 36px rgba(84, 229, 208, .22);
}
.table-frame-segments {
  position: absolute;
  z-index: 0;
  inset: calc(-1 * clamp(14px, 2vw, 26px));
  display: grid;
  grid-template-columns: 17.97% 64.06% 17.97%;
  grid-template-rows: 25% 50% 25%;
  pointer-events: none;
}
.table-frame-segments > span {
  background-position: center;
  background-repeat: no-repeat;
  background-size: 100% 100%;
  image-rendering: pixelated;
}
.table-frame-segments [data-segment="0-0"] { background-image: url("/assets/v7/table/tb-003/segment-0-0.webp"); }
.table-frame-segments [data-segment="0-1"] { background-image: url("/assets/v7/table/tb-003/segment-0-1.webp"); }
.table-frame-segments [data-segment="0-2"] { background-image: url("/assets/v7/table/tb-003/segment-0-2.webp"); }
.table-frame-segments [data-segment="1-0"] { background-image: url("/assets/v7/table/tb-003/segment-1-0.webp"); }
.table-frame-segments [data-segment="1-1"] { background-image: url("/assets/v7/table/tb-003/segment-1-1.webp"); }
.table-frame-segments [data-segment="1-2"] { background-image: url("/assets/v7/table/tb-003/segment-1-2.webp"); }
.table-frame-segments [data-segment="2-0"] { background-image: url("/assets/v7/table/tb-003/segment-2-0.webp"); }
.table-frame-segments [data-segment="2-1"] { background-image: url("/assets/v7/table/tb-003/segment-2-1.webp"); }
.table-frame-segments [data-segment="2-2"] { background-image: url("/assets/v7/table/tb-003/segment-2-2.webp"); }
.poker-table > :not(.table-frame-segments) { z-index: 1; }
.poker-table > .motion-layer { z-index: 8; }

.game-status-bar { align-items: center; }
.game-status-skin {
  position: relative;
  flex: 0 1 492px;
  width: min(492px, 72vw);
  aspect-ratio: 492 / 188;
  background-size: 100% 100%;
  image-rendering: pixelated;
}
.game-status-copy {
  position: absolute;
  inset: 19% 6% 12% 23%;
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto auto;
  align-content: center;
  gap: 5px;
}
.game-status-copy h1 {
  grid-row: 1;
  align-self: center;
  overflow: hidden;
  font-size: clamp(20px, 2.4vw, 32px);
  text-overflow: ellipsis;
  white-space: nowrap;
}
.game-status-copy .game-head-stats { grid-row: 2; margin: 0; }
.game-status-copy .betting-street { grid-row: 3; }
.game-status-bar .room-code { font-size: clamp(28px, 4vw, 48px); }
.betting-street {
  display: inline-flex;
  min-height: 30px;
  align-items: center;
  padding: 5px 14px;
  background-size: 100% 100%;
}

.board-area {
  position: absolute;
  z-index: 1;
  top: 36%;
  left: 50%;
  width: min(492px, 66%);
  aspect-ratio: 492 / 188;
  transform: translate(-50%, -50%);
  pointer-events: none;
}
.board-area .board {
  inset: 27% 8% auto;
  align-items: center;
}

.pot-label {
  z-index: 3;
  top: 22%;
  left: 50%;
  width: min(310px, 64%);
  min-height: 70px;
  padding: 18px 24px;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  background-size: 100% 100%;
  image-rendering: pixelated;
}
.pot-chip-helper {
  width: 54px;
  height: 38px;
  margin-left: -10px;
}

.seat {
  min-width: 158px;
  min-height: 112px;
  padding: 12px 10px 9px 54px;
  display: grid;
  align-content: center;
  gap: 3px;
  background-color: rgba(21, 18, 31, .92);
  background-size: 100% 100%;
  image-rendering: pixelated;
}
.seat-avatar {
  position: absolute;
  left: 8px;
  top: 50%;
  width: 44px;
  height: 58px;
  transform: translateY(-50%);
  background-size: 100% 100%;
}
.seat-avatar .player-avatar-art { width: 100%; height: 100%; }
.seat-name {
  position: relative;
  min-height: 25px;
  padding: 4px 52px 4px 7px;
  justify-content: flex-start;
  background-size: 100% 100%;
}
.seat-name > strong {
  overflow: hidden;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.seat-status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
}
.seat-status .art-icon { width: 16px; height: 16px; }
.seat-wager {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 32px;
  padding: 5px 10px 5px 36px;
  background-size: 100% 100%;
}
.seat-chip-helper {
  position: absolute;
  left: 2px;
  width: 38px;
  height: 28px;
}
.seat-roles {
  position: absolute;
  top: 50%;
  right: 4px;
  display: inline-flex;
  align-items: center;
  gap: 2px;
  transform: translateY(-50%);
}
.seat-role-marker {
  display: inline-block;
  flex: 0 0 auto;
  background-repeat: no-repeat;
  image-rendering: pixelated;
}
.opponent-card-backs {
  position: absolute;
  z-index: 0;
  top: -36px;
  right: 4px;
  display: block;
  width: 48px;
  height: 52px;
  background-size: 220%;
  pointer-events: none;
  filter: drop-shadow(0 3px 2px rgba(0, 0, 0, .55));
}
.dealer-marker {
  width: 20px;
  height: 20px;
  background-size: 410% 162%;
  background-position: 50% 50%;
}
.blind-marker {
  width: 30px;
  height: 17px;
  background-size: 205% 174%;
  background-position: 50% 50%;
}

.turn-clock {
  min-width: 50px;
  min-height: 36px;
  display: inline-grid;
  place-items: center;
  padding: 8px;
  background-size: 100% 100%;
  image-rendering: pixelated;
}

.current-hand {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 28px;
  background-size: 100% 100%;
}
.current-hand .art-icon { width: 15px; height: 15px; }
.hole-cards { bottom: 22%; }

.action-dock {
  isolation: isolate;
  position: relative;
  background-color: rgba(21, 18, 31, .92);
  backdrop-filter: blur(10px);
}
.action-dock > :not(.turn-feedback-layer) { position: relative; z-index: 1; }
.turn-feedback-layer {
  position: absolute;
  z-index: 0;
  inset: 0;
  opacity: .22;
  pointer-events: none;
}
body[data-turn-art-state="timer-warning"] .turn-feedback-layer { background-image: var(--holdem-fx-002-full); opacity: .42; }
body[data-action-pending="true"] .turn-feedback-layer { background-image: var(--holdem-fx-018-full); opacity: .48; }
body[data-action-pending="true"] .action-dock::after {
  content: "正在提交…";
  position: absolute;
  z-index: 12;
  inset: 8px;
  display: grid;
  place-items: center;
  color: var(--paper);
  background: var(--holdem-fx-018-static) center / 100% 100% no-repeat;
  font-weight: 900;
  image-rendering: pixelated;
}
.your-turn-summary {
  min-height: 70px;
  padding: 10px 4% 10px 28%;
  background-size: 100% 100%;
}
.action-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
}
.action-button.holdem-ui-tbl-007-skin { background-size: 100% 100%; }
.raise-controls {
  min-height: 138px;
  padding: 14px 14px 14px 24px;
  background-size: 100% 100%;
}
.raise-head label,
.raise-slider-row,
.raise-shortcuts .chip-button {
  display: flex;
  align-items: center;
  gap: 5px;
}
.raise-slider-row .art-raise-slider { flex: 1; min-width: 0; }
.raise-slider-row { grid-column: 1; width: 100%; }
.v7-control-icon {
  display: inline-block;
  flex: 0 0 auto;
  width: 20px;
  height: 20px;
  background-position: center;
  background-repeat: no-repeat;
  background-size: contain;
  image-rendering: pixelated;
}
.v7-control-icon[data-control-icon="001"] { background-image: var(--holdem-ic-ctl-001-default); }
.v7-control-icon[data-control-icon="002"] { background-image: var(--holdem-ic-ctl-002-default); }
.v7-control-icon[data-control-icon="005"] { background-image: var(--holdem-ic-ctl-005-default); }
.v7-control-icon[data-control-icon="006"] { background-image: var(--holdem-ic-ctl-006-default); }
.v7-control-icon[data-control-icon="008"] { background-image: var(--holdem-ic-ctl-008-default); }
.v7-control-icon[data-control-icon="009"] { background-image: var(--holdem-ic-ctl-009-default); }
.v7-control-icon[data-control-icon="005"][data-art-state="emphasis"] { background-image: var(--holdem-ic-ctl-005-emphasis); }
.art-raise-slider {
  appearance: none;
  height: 20px;
  border: 0;
  background: var(--holdem-ui-007-track) center / 100% 100% no-repeat;
}
.art-raise-slider::-webkit-slider-thumb {
  appearance: none;
  width: 28px;
  height: 32px;
  border: 0;
  background: var(--holdem-ui-007-thumb) center / contain no-repeat;
  image-rendering: pixelated;
}

.card {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background-color: var(--paper);
  background-image: var(--holdem-cd-001-standard);
  background-position: 50% 50%;
  background-repeat: no-repeat;
  background-size: 473.1% 128.8%;
  image-rendering: pixelated;
}
.card[data-card-state]::before {
  content: "";
  position: absolute;
  z-index: 0;
  inset: 0;
  background-position: 50% 50%;
  background-repeat: no-repeat;
  background-size: 984% 268.6%;
  pointer-events: none;
}
.card[data-card-state="self"]::before { background-image: var(--holdem-cd-009-self); }
.card[data-card-state="community"]::before { background-image: var(--holdem-cd-009-community); }
.card[data-card-state="showdown"]::before { background-image: var(--holdem-cd-009-showdown); }
.card[data-card-state="winning-five"]::before { background-image: var(--holdem-cd-009-winning-five); }
.card[data-card-state="self"][data-card-index="0"]::before,
.card[data-card-state="showdown"][data-card-index="0"]::before { background-position: 43.21% 50%; }
.card[data-card-state="self"][data-card-index="1"]::before,
.card[data-card-state="showdown"][data-card-index="1"]::before { background-position: 56.56% 50%; }
.card[data-card-state="community"][data-card-index="0"]::before,
.card[data-card-state="winning-five"][data-card-index="0"]::before { background-position: 23.3% 50%; }
.card[data-card-state="community"][data-card-index="1"]::before,
.card[data-card-state="winning-five"][data-card-index="1"]::before { background-position: 36.65% 50%; }
.card[data-card-state="community"][data-card-index="2"]::before,
.card[data-card-state="winning-five"][data-card-index="2"]::before { background-position: 50% 50%; }
.card[data-card-state="community"][data-card-index="3"]::before,
.card[data-card-state="winning-five"][data-card-index="3"]::before { background-position: 63.35% 50%; }
.card[data-card-state="community"][data-card-index="4"]::before,
.card[data-card-state="winning-five"][data-card-index="4"]::before { background-position: 76.7% 50%; }
.card > span { position: relative; z-index: 2; align-self: start; justify-self: start; padding: 7px; text-shadow: 0 1px rgba(255,255,255,.7); }
.card.v7-card-face {
  background-image: var(--holdem-card-face);
  background-position: center;
  background-size: 100% 100%;
}
.card.v7-card-face > span { opacity: 0; }
.card.face-card::after {
  content: "";
  position: absolute;
  z-index: 1;
  inset: 19% 4% 3%;
  background-position: center;
  background-repeat: no-repeat;
  background-size: contain;
}
.card[data-rank="J"][data-suit="s"]::after { background-image: url("/assets/v1/cards/faces/cd-005-jack-spades.webp"); }
.card[data-rank="J"][data-suit="h"]::after { background-image: url("/assets/v1/cards/faces/cd-005-jack-hearts.webp"); }
.card[data-rank="J"][data-suit="c"]::after { background-image: url("/assets/v1/cards/faces/cd-005-jack-clubs.webp"); }
.card[data-rank="J"][data-suit="d"]::after { background-image: url("/assets/v1/cards/faces/cd-005-jack-diamonds.webp"); }
.card[data-rank="Q"][data-suit="s"]::after { background-image: url("/assets/v1/cards/faces/cd-005-queen-spades.webp"); }
.card[data-rank="Q"][data-suit="h"]::after { background-image: url("/assets/v1/cards/faces/cd-005-queen-hearts.webp"); }
.card[data-rank="Q"][data-suit="c"]::after { background-image: url("/assets/v1/cards/faces/cd-005-queen-clubs.webp"); }
.card[data-rank="Q"][data-suit="d"]::after { background-image: url("/assets/v1/cards/faces/cd-005-queen-diamonds.webp"); }
.card[data-rank="K"][data-suit="s"]::after { background-image: url("/assets/v1/cards/faces/cd-005-king-spades.webp"); }
.card[data-rank="K"][data-suit="h"]::after { background-image: url("/assets/v1/cards/faces/cd-005-king-hearts.webp"); }
.card[data-rank="K"][data-suit="c"]::after { background-image: url("/assets/v1/cards/faces/cd-005-king-clubs.webp"); }
.card[data-rank="K"][data-suit="d"]::after { background-image: url("/assets/v1/cards/faces/cd-005-king-diamonds.webp"); }

.flying-chips { padding-left: 30px; }
.flying-chips::before {
  content: "";
  position: absolute;
  left: 3px;
  width: 32px;
  height: 27px;
  background: url("/assets/v7/chips/ch-004/stack-1.webp") center / contain no-repeat;
  image-rendering: pixelated;
}
.flying-chips[data-stack-level="5"]::before { background-image: url("/assets/v7/chips/ch-004/stack-5.webp"); }
.flying-chips[data-stack-level="10"]::before { background-image: url("/assets/v7/chips/ch-004/stack-10.webp"); }
.flying-chips[data-stack-level="20"]::before { background-image: url("/assets/v7/chips/ch-004/stack-20.webp"); }

.hand-result,
.result-pots,
.result-player {
  background-color: rgba(21, 18, 31, .92);
  background-size: 100% 100%;
  image-rendering: pixelated;
}
.hand-result { position: relative; isolation: isolate; }
.hand-result > :not(.settlement-feedback-layer) { position: relative; z-index: 1; }
.settlement-feedback-layer {
  position: absolute;
  z-index: 0;
  inset: 0;
  opacity: .2;
  pointer-events: none;
}
.compact-result > summary { display: flex; align-items: center; gap: 8px; }
.compact-result > summary > strong { margin-left: auto; }
.result-pots { padding: 12px; }
.result-player { padding: 13px 15px; }

.history-list > li {
  min-height: 42px;
  padding: 9px 12px;
  background-size: 100% 100%;
}

.art-confirm-dialog {
  width: min(460px, calc(100vw - 28px));
  padding: 30px;
  color: var(--paper);
  border: 1px solid var(--line);
  background-color: rgba(21, 18, 31, .98);
  background-size: 100% 100%;
  image-rendering: pixelated;
}
.art-confirm-dialog::backdrop { background: rgba(8, 7, 13, .78); backdrop-filter: blur(5px); }
.art-confirm-message { min-height: 52px; color: var(--paper); line-height: 1.6; }

@media (max-width: 1023px) {
  body { background-attachment: scroll; }
  .game-status-bar { min-height: 0; padding: 0 4px; }
  .game-status-skin { flex-basis: min(310px, 72vw); width: min(310px, 72vw); aspect-ratio: 492 / 126; }
  .game-status-copy { inset: 13% 6% 10% 23%; gap: 2px; }
  .game-status-copy h1 { font-size: 17px; }
  .game-status-copy .game-head-stats { font-size: 9px; }
  .betting-street { min-height: 22px; padding: 3px 8px; }
  .board-area { top: 37%; width: min(410px, 76%); }
  .seat { min-width: 112px; min-height: 82px; padding: 8px 7px 7px 38px; }
  .seat-avatar { left: 5px; width: 32px; height: 42px; }
  .seat-name { padding: 3px 38px 3px 5px; }
  .dealer-marker { width: 16px; height: 16px; }
  .blind-marker { width: 24px; height: 14px; }
  .pot-label { min-height: 54px; padding: 12px; }
  .pot-chip-helper { width: 40px; height: 28px; }
  .your-turn-summary { min-height: 56px; padding-left: 26%; }
  .action-button .art-icon { width: 17px; height: 17px; }
  .brand { min-width: 0; }
  .brand-lockup { width: 108px; height: 31px; }
  .opponent-card-backs { top: -30px; width: 36px; height: 42px; }
}

@media (orientation: portrait) and (max-width: 1023px) {
  .poker-table.holdem-table-sprite { background-size: 112% 100%, 192px 192px; }
  .game-status-skin { background-image: var(--holdem-ui-tbl-014-portrait-compact); }
  .raise-controls { background-image: var(--holdem-ui-tbl-008-compact); }
}

@media (orientation: landscape) and (max-width: 1023px) {
  .game-status-skin { background-image: var(--holdem-ui-tbl-014-landscape-compact); }
}

@media (prefers-reduced-motion: reduce) {
  .flying-chips { display: none; }
  .seat.just-acted,
  .seat.just-won,
  .card.deal-card { animation: none !important; }
}

/* Layout revision v2: derived from the approved visual language and the
   responsive triptych reference. Runtime text and values remain DOM content. */
body.in-game {
  height: 100dvh;
  overflow: hidden;
}
body.in-game .topbar {
  height: 54px;
  padding-block: 0;
}
body.in-game .app-shell {
  width: 100%;
  max-width: none;
  height: calc(100dvh - 54px);
  min-height: 0;
  padding: 8px clamp(12px, 2vw, 28px) 10px;
  display: grid;
  grid-template-rows: 58px 520px 92px;
  align-content: start;
  gap: 8px;
  overflow: hidden;
}
body.in-game .game-status-bar {
  width: min(1120px, 100%);
  height: 58px;
  min-height: 0;
  margin: 0 auto;
  padding: 5px 12px;
  align-items: center;
  border: 1px solid rgba(84, 229, 208, .3);
  background: rgba(13, 11, 24, .82);
  box-shadow: 0 8px 24px rgba(0, 0, 0, .25);
}
body.in-game .game-status-skin {
  flex: 1 1 auto;
  width: auto;
  height: 100%;
  aspect-ratio: auto;
  background-image: none !important;
}
body.in-game .game-status-copy {
  position: static;
  height: 100%;
  display: flex;
  align-items: center;
  gap: 14px;
}
body.in-game .game-status-copy .betting-street {
  order: 0;
  flex: 0 0 auto;
  min-height: 32px;
  margin: 0;
  padding: 5px 12px;
  font-size: 11px;
}
body.in-game .game-status-copy h1 {
  order: 1;
  min-width: 0;
  margin: 0;
  font-size: clamp(16px, 1.6vw, 22px);
}
body.in-game .game-head-stats {
  order: 2;
  flex: 0 0 auto;
  margin: 0;
  padding-left: 14px;
  border-left: 1px solid var(--line);
}
body.in-game .game-status-bar .room-code {
  font-size: clamp(20px, 2vw, 28px);
}
body.in-game .table-stage {
  width: 100%;
  height: 520px;
  min-height: 0;
  padding: 24px 0 0;
  display: grid;
  place-items: start center;
  overflow: visible;
}
body.in-game .poker-table {
  width: min(1080px, 76vw);
  max-height: none;
  margin: 0;
  aspect-ratio: 1558 / 736;
  border-width: clamp(12px, 1.4vw, 20px);
}
body.in-game .board-area {
  top: 45%;
  width: min(430px, 52%);
  height: 108px;
  aspect-ratio: auto;
  background-image: none !important;
}
body.in-game .board-area .board {
  position: static;
  height: 100%;
  display: flex;
  align-items: center;
  gap: 7px;
}
body.in-game .card {
  width: clamp(46px, 4vw, 62px);
  border-radius: 6px;
  font-size: clamp(18px, 2vw, 26px);
}
body.in-game .pot-label {
  top: 27%;
  width: min(230px, 46%);
  min-height: 42px;
  padding: 8px 14px;
  font-size: 12px;
}
body.in-game .pot-chip-helper {
  width: 38px;
  height: 26px;
}
body.in-game .seat {
  width: 134px;
  min-width: 134px;
  min-height: 76px;
  padding: 8px 7px 6px 42px;
  gap: 1px;
}
body.in-game .seat-avatar {
  left: 6px;
  width: 34px;
  height: 44px;
}
body.in-game .seat-name {
  min-height: 20px;
  padding: 3px 40px 3px 5px;
}
body.in-game .seat-name > strong { font-size: 11px; }
body.in-game .seat-stack { margin-top: 1px; font-size: 15px; }
body.in-game .seat-status { min-height: 13px; margin-top: 1px; font-size: 8px; }
body.in-game .seat-wager { bottom: -22px; min-height: 26px; padding-block: 3px; }
body.in-game .opponent-card-backs {
  top: -23px;
  right: 5px;
  width: 28px;
  height: 32px;
  background-size: 220%;
}
body.in-game .seat[data-seat="0"] { bottom: -15%; }
body.in-game .seat[data-seat="1"] { left: -3%; bottom: 15%; }
body.in-game .seat[data-seat="2"] { left: -1%; top: 8%; }
body.in-game .seat[data-seat="3"] { top: -8%; }
body.in-game .seat[data-seat="4"] { right: -1%; top: 8%; }
body.in-game .seat[data-seat="5"] { right: -3%; bottom: 15%; }
body.in-game .hole-cards {
  bottom: 2%;
  gap: 3px;
}
body.in-game .current-hand { min-height: 22px; padding: 2px 7px; font-size: 9px; }
body.in-game .action-dock {
  position: relative;
  width: min(1080px, 100%);
  height: 92px;
  min-height: 0;
  margin: 0 auto;
  padding: 9px 12px;
  display: grid;
  grid-template-columns: minmax(220px, 280px) minmax(0, 1fr);
  grid-template-rows: 1fr;
  align-items: stretch;
  gap: 10px;
}
body.in-game .action-summary {
  grid-column: 1;
  min-height: 0;
  padding: 7px 12px 7px 22%;
}
body.in-game .your-turn-label { gap: 6px; flex-direction: column; align-items: flex-start; }
body.in-game .your-turn-label b { font-size: 15px; }
body.in-game .action-main {
  grid-column: 2;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}
body.in-game .action-main .action-button {
  min-height: 48px;
  padding: 8px;
  font-size: 14px;
}
body.in-game .raise-controls {
  position: absolute !important;
  z-index: 20 !important;
  right: 0;
  bottom: calc(100% + 8px);
  width: min(560px, calc(100vw - 24px));
  min-height: 150px;
  padding: 14px 16px;
  border: 1px solid rgba(84, 229, 208, .55);
  background-color: rgba(13, 11, 24, .98);
  box-shadow: 0 18px 48px rgba(0, 0, 0, .55);
}

@media (max-width: 1023px) {
  body.in-game .topbar { height: 48px; }
  body.in-game .brand-mark { width: 25px; height: 29px; }
  body.in-game .brand-lockup { width: 92px; height: 27px; }
  body.in-game .app-shell {
    height: calc(100dvh - 48px);
    padding: 4px 7px max(5px, env(safe-area-inset-bottom));
    grid-template-rows: 44px minmax(0, 1fr) 112px;
    gap: 4px;
  }
  body.in-game .game-status-bar {
    width: 100%;
    height: 44px;
    padding: 3px 7px;
  }
  body.in-game .game-status-skin { flex-basis: auto; width: auto; }
  body.in-game .game-status-copy { gap: 7px; }
  body.in-game .game-status-copy .betting-street { min-height: 26px; padding: 3px 7px; font-size: 8px; }
  body.in-game .game-status-copy h1 { display: block; max-width: 26vw; font-size: 13px; }
  body.in-game .game-head-stats { gap: 5px; padding-left: 7px; font-size: 8px; }
  body.in-game .game-head-stats strong { font-size: 9px; }
  body.in-game .game-status-bar .room-code { font-size: 17px; }
  body.in-game .table-stage { height: 100%; padding: 12px 0 0; overflow: visible; }
  body.in-game .poker-table { border-width: 9px; }
  body.in-game .board-area { top: 45%; width: 58%; height: 78px; }
  body.in-game .board-area .board { gap: 4px; }
  body.in-game .card { width: clamp(36px, 10vw, 46px); font-size: 17px; }
  body.in-game .pot-label { top: 27%; min-height: 34px; padding: 5px 8px; font-size: 9px; }
  body.in-game .pot-chip-helper { width: 30px; height: 22px; }
  body.in-game .seat {
    width: 92px;
    min-width: 92px;
    min-height: 58px;
    padding: 6px 4px 4px 31px;
  }
  body.in-game .seat-avatar { left: 4px; width: 26px; height: 34px; }
  body.in-game .seat-name { min-height: 17px; padding: 2px 31px 2px 3px; }
  body.in-game .seat-name > strong { max-width: 48px; font-size: 9px; }
  body.in-game .seat-stack { font-size: 11px; }
  body.in-game .seat-status { min-height: 10px; font-size: 7px; }
  body.in-game .seat-wager { bottom: -17px; min-height: 20px; padding: 2px 5px 2px 24px; font-size: 7px; }
  body.in-game .seat-chip-helper { width: 27px; height: 20px; }
  body.in-game .opponent-card-backs { top: -18px; width: 22px; height: 26px; }
  body.in-game .hole-cards { bottom: 2%; }
  body.in-game .current-hand { min-height: 18px; font-size: 7px; }
  body.in-game .action-dock {
    width: 100%;
    height: 112px;
    padding: 7px;
    grid-template-columns: 1fr;
    grid-template-rows: 38px minmax(0, 1fr);
    gap: 5px;
  }
  body.in-game .action-summary {
    grid-column: 1;
    grid-row: 1;
    padding: 4px 7px 4px 20%;
  }
  body.in-game .your-turn-label { flex-direction: row; align-items: baseline; }
  body.in-game .your-turn-label b { font-size: 12px; }
  body.in-game .action-main { grid-column: 1; grid-row: 2; gap: 5px; }
  body.in-game .action-main .action-button { min-height: 48px; padding: 6px 4px; font-size: 11px; }
  body.in-game .raise-controls { width: min(520px, calc(100vw - 14px)); }
}

@media (max-width: 1023px) and (orientation: landscape) and (max-height: 600px) {
  body.in-game .app-shell {
    grid-template-columns: minmax(0, 61fr) minmax(280px, 39fr);
    grid-template-rows: 44px minmax(0, 1fr);
    gap: 4px 7px;
  }
  body.in-game .dashboard-head { grid-column: 1 / -1; grid-row: 1; }
  body.in-game .table-stage { grid-column: 1; grid-row: 2; padding: 8px 0 0; }
  body.in-game .poker-table {
    width: min(58vw, 560px);
    max-width: 100%;
    margin: 0;
    aspect-ratio: 1558 / 736;
  }
  body.in-game .action-dock,
  body.in-game .hand-result {
    grid-column: 2;
    grid-row: 2;
    align-self: center;
    width: 100%;
    height: auto;
    max-height: 100%;
    padding: 8px;
    grid-template-rows: 46px minmax(0, 1fr);
    overflow: visible;
  }
  body.in-game .action-main { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  body.in-game .action-main .action-button { min-height: 50px; }
  body.in-game .raise-controls { right: 0; bottom: 0; width: 100%; max-height: 100%; overflow-y: auto; }
}

@media (max-width: 1023px) and (orientation: portrait) {
  body.in-game .poker-table {
    width: min(94vw, 520px);
    max-height: calc(100% - 28px);
    /* The portrait composition needs a vertically extended stage. Keeping the
       desktop oval ratio here stranded the action dock below a large empty
       band; the nine-slice table frame is designed to tolerate this stretch. */
    aspect-ratio: .82;
  }
  body.in-game .seat[data-seat="0"] { bottom: -5%; }
  body.in-game .seat[data-seat="1"] { left: -1%; bottom: 21%; }
  body.in-game .seat[data-seat="2"] { left: 0; top: 9%; }
  body.in-game .seat[data-seat="3"] { top: -4%; }
  body.in-game .seat[data-seat="4"] { right: 0; top: 9%; }
  body.in-game .seat[data-seat="5"] { right: -1%; bottom: 21%; }
  body.in-game .hole-cards { bottom: 3%; }
  body.in-game .raise-controls {
    left: 0;
    right: 0;
    width: auto;
    max-width: none;
  }
}

/* Layout revision v3: one continuous table stage. The action controls now
   follow the player's seat instead of competing with the table as a second
   panel. Responsive variants change composition only, not visual semantics. */
body.in-game .app-shell {
  grid-template-rows: 52px minmax(0, 1fr) 78px;
  gap: 6px;
}
body.in-game .game-status-bar {
  height: 52px;
}
body.in-game .table-stage {
  height: 100%;
  padding: 6px 0;
  place-items: center;
}
body.in-game .poker-table {
  width: min(1120px, 82vw, calc((100dvh - 214px) * 2.1168));
}
body.in-game .action-dock {
  width: min(980px, 92vw);
  height: 78px;
  padding: 7px 10px;
  grid-template-columns: minmax(180px, 238px) minmax(0, 1fr);
  gap: 8px;
}
body.in-game .action-summary {
  padding: 5px 8px 5px 18%;
}
body.in-game .action-main .action-button {
  min-height: 44px;
}
body.in-game .opponent-card-backs {
  opacity: .78;
}

@media (max-width: 1023px) {
  body.in-game .app-shell {
    grid-template-rows: 40px auto 96px;
    align-content: start;
    gap: 4px;
  }
  body.in-game .game-status-bar {
    height: 40px;
  }
  body.in-game .game-status-copy .betting-street {
    min-height: 24px;
  }
  body.in-game .table-stage {
    height: auto;
    padding: 4px 0 0;
  }
  body.in-game .action-dock {
    width: min(720px, 100%);
    height: 96px;
    padding: 5px;
    grid-template-rows: 30px minmax(0, 1fr);
    gap: 4px;
  }
  body.in-game .action-summary {
    padding: 3px 7px 3px 17%;
  }
  body.in-game .action-main .action-button {
    min-height: 42px;
  }
}

@media (max-width: 1023px) and (orientation: landscape) and (max-height: 600px) {
  body.in-game .app-shell {
    grid-template-columns: 1fr;
    grid-template-rows: 40px minmax(0, 1fr) 58px;
    gap: 3px;
  }
  body.in-game .dashboard-head {
    grid-column: 1;
    grid-row: 1;
  }
  body.in-game .table-stage {
    grid-column: 1;
    grid-row: 2;
    min-height: 0;
    padding: 2px 0;
  }
  body.in-game .poker-table {
    width: min(720px, 78vw, calc((100dvh - 154px) * 2.1168));
    max-width: none;
    margin: 0 auto;
  }
  body.in-game .action-dock,
  body.in-game .hand-result {
    grid-column: 1;
    grid-row: 3;
    align-self: stretch;
    width: min(720px, 96vw);
    height: 58px;
    max-height: none;
    margin: 0 auto;
    padding: 4px 6px;
    grid-template-columns: minmax(145px, 190px) minmax(0, 1fr);
    grid-template-rows: 1fr;
    gap: 5px;
  }
  body.in-game .action-summary {
    grid-column: 1;
    grid-row: 1;
    padding: 3px 5px 3px 17%;
  }
  body.in-game .your-turn-label {
    align-items: flex-start;
    flex-direction: column;
    gap: 1px;
  }
  body.in-game .your-turn-label b {
    font-size: 11px;
  }
  body.in-game .action-main {
    grid-column: 2;
    grid-row: 1;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 4px;
  }
  body.in-game .action-main .action-button {
    min-height: 46px;
    padding: 4px 3px;
  }
  body.in-game .raise-controls {
    right: 0;
    bottom: calc(100% + 4px);
    width: min(640px, 96vw);
    max-height: calc(100dvh - 112px);
  }
}

@media (max-width: 1023px) and (orientation: portrait) {
  body.in-game {
    overflow-y: auto;
  }
  body.in-game .app-shell {
    height: auto;
    min-height: calc(100dvh - 48px);
    grid-template-rows: 40px auto 96px;
    overflow: visible;
  }
  body.in-game .poker-table {
    width: min(92vw, 430px);
    max-height: none;
    aspect-ratio: .88;
  }
  body.in-game .seat[data-seat="0"] { bottom: -4%; }
  body.in-game .seat[data-seat="1"] { left: 0; bottom: 20%; }
  body.in-game .seat[data-seat="2"] { left: 1%; top: 10%; }
  body.in-game .seat[data-seat="3"] { top: -3%; }
  body.in-game .seat[data-seat="4"] { right: 1%; top: 10%; }
  body.in-game .seat[data-seat="5"] { right: 0; bottom: 20%; }
  body.in-game .action-dock {
    margin-top: 2px;
  }
  body.in-game .raise-controls {
    bottom: calc(100% + 4px);
    max-height: min(360px, calc(100dvh - 120px));
    overflow-y: auto;
  }
}

/* Layout revision v4: approved MK composition with collision-safe zones. */
body[data-visual-context="lobby"] .app-shell {
  width: min(1180px, calc(100% - 32px));
  padding-block: clamp(28px, 4vw, 56px);
}
.lobby-grid {
  display: grid;
  grid-template-columns: minmax(340px, .85fr) minmax(420px, 1.45fr);
  grid-template-areas:
    "create join"
    "create records";
  align-items: start;
  gap: 18px;
}
.lobby-grid > * { min-width: 0; }
.lobby-create-panel { grid-area: create; }
.lobby-join-panel { grid-area: join; }
.lobby-grid .match-records-panel {
  grid-area: records;
  min-width: 0;
  margin: 0;
}
.lobby-grid .admin-console { grid-column: 1 / -1; }
.lobby-create-panel .inline-form {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
body[data-visual-context="room"] .app-shell {
  width: min(960px, calc(100% - 32px));
}
body[data-visual-context="room"] .dashboard-head { align-items: flex-end; }
body[data-visual-context="room"] .quick-start-panel,
body[data-visual-context="room"] .waiting-room-panel { width: 100%; }

body.in-game .app-shell {
  grid-template-rows: 52px minmax(0, 1fr) 84px;
  gap: 6px;
  isolation: isolate;
}
body.in-game .game-status-bar {
  position: relative;
  z-index: 40;
  min-width: 0;
}
body.in-game .table-stage {
  position: relative;
  z-index: 1;
  grid-column: 1;
  grid-row: 2;
  min-width: 0;
  min-height: 0;
  overflow: visible;
}
body.in-game .poker-table {
  width: min(1080px, 80vw, calc((100dvh - 220px) * 2.1168));
}
body.in-game .seat {
  width: 124px;
  min-width: 124px;
  min-height: 72px;
}
body.in-game[data-table-size="2"] .seat {
  width: 138px;
  min-width: 138px;
}
body.in-game[data-table-size="2"] .seat[data-seat="0"] { bottom: -13%; }
body.in-game[data-table-size="2"] .seat[data-seat="3"] { top: -10%; }
body.in-game[data-table-size="6"] .seat[data-seat="0"] { bottom: -11%; }
body.in-game[data-table-size="6"] .seat[data-seat="1"] { left: -4%; bottom: 14%; }
body.in-game[data-table-size="6"] .seat[data-seat="2"] { left: -4%; top: 12%; }
body.in-game[data-table-size="6"] .seat[data-seat="3"] { top: -9%; }
body.in-game[data-table-size="6"] .seat[data-seat="4"] { right: -4%; top: 12%; }
body.in-game[data-table-size="6"] .seat[data-seat="5"] { right: -4%; bottom: 14%; }
body.in-game .opponent-card-backs { top: -20px; right: 8px; }
body.in-game .seat-wager {
  bottom: -20px;
  max-width: 110px;
}
body.in-game .action-dock {
  position: relative;
  z-index: 35;
  grid-column: 1;
  grid-row: 3;
  width: min(980px, calc(100vw - 32px));
  height: 84px;
  min-width: 0;
}
body.in-game .action-main,
body.in-game .action-main .action-button { min-width: 0; }
body.in-game .action-main .action-button {
  white-space: nowrap;
  overflow: hidden;
}
body.in-game .action-main .action-button span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body.in-game .raise-controls {
  z-index: 60 !important;
  width: min(620px, calc(100vw - 28px));
  min-height: 0;
  max-height: min(410px, calc(100dvh - 150px));
  padding: 18px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(180px, .46fr);
  grid-template-areas:
    "head head"
    "slider slider"
    "shortcuts shortcuts"
    "adjustments submit";
  gap: 10px 12px;
  overflow-y: auto;
  border: 1px solid rgba(84, 229, 208, .55);
  border-radius: 12px;
  background-color: rgba(13, 11, 24, .98);
  background-image: none !important;
  box-shadow: 0 18px 48px rgba(0, 0, 0, .58), 0 0 26px rgba(84, 229, 208, .1);
}
body.in-game .raise-controls[hidden] { display: none; }
body.in-game .raise-head {
  grid-area: head;
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 14px;
}
body.in-game .raise-head > div { display: grid; gap: 3px; }
body.in-game .raise-head label {
  margin: 0;
  color: var(--paper);
  font-weight: 900;
}
body.in-game .raise-head small {
  color: var(--muted);
  font: 10px/1.2 ui-monospace, SFMono-Regular, Menlo, monospace;
}
body.in-game .raise-head input {
  width: 150px;
  min-height: 42px;
}
body.in-game .raise-slider-row { grid-area: slider; }
body.in-game .art-raise-slider {
  background: linear-gradient(90deg, rgba(84, 229, 208, .92), rgba(84, 229, 208, .28)) center / 100% 6px no-repeat;
}
body.in-game .raise-shortcuts {
  grid-area: shortcuts;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
}
body.in-game .raise-adjustments {
  grid-area: adjustments;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
}
body.in-game .raise-adjustments .chip-button,
body.in-game .raise-shortcuts .chip-button {
  min-width: 0;
  justify-content: center;
}
body.in-game .raise-submit {
  grid-area: submit;
  grid-column: auto;
  grid-row: auto;
  min-width: 0;
  min-height: 44px;
  color: var(--ink);
  border-color: var(--cyan);
  background-color: var(--cyan);
  background-image: none !important;
}

body.in-game .hand-result {
  position: relative;
  z-index: 50;
  grid-column: 1;
  grid-row: 2;
  justify-self: center;
  align-self: center;
  width: min(700px, calc(100vw - 40px));
  height: auto;
  max-height: min(520px, calc(100dvh - 180px));
  margin: 0;
  padding: 20px;
  overflow-y: auto;
  border: 2px solid rgba(255, 209, 102, .78);
  background-color: rgba(13, 11, 24, .97);
  box-shadow: 0 24px 70px rgba(0, 0, 0, .68), 0 0 38px rgba(255, 209, 102, .13);
  background-image: none !important;
}
body.in-game .hand-result .settlement-feedback-layer { display: none; }
body.in-game .hand-result .result-player { background-image: none !important; }
body.in-game .settlement-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
}
body.in-game .settlement-heading h2 { margin: 2px 0 0; }
body.in-game .settlement-heading > strong {
  flex: 0 0 auto;
  color: var(--gold);
  font-size: clamp(16px, 2vw, 24px);
}
body.in-game .compact-result > summary {
  min-height: 44px;
  padding: 9px 12px;
  display: flex;
  align-items: center;
  gap: 9px;
  border: 1px solid rgba(84, 229, 208, .3);
  background: rgba(84, 229, 208, .07);
  cursor: pointer;
}
body.in-game .compact-result > summary span {
  min-width: 0;
  flex: 1;
}
body.in-game .compact-result > summary small {
  flex: 0 0 auto;
  color: var(--cyan);
}
body.in-game .compact-result[open] > summary { margin-bottom: 10px; }
body.in-game .result-players {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
body.in-game .result-player,
body.in-game .result-hand,
body.in-game .result-hand > div { min-width: 0; }
body.in-game .result-player .card.mini-card {
  width: 38px;
  font-size: 16px;
}
body.in-game .result-player .card.micro-card {
  width: 25px;
  font-size: 11px;
}
body.in-game .hand-result .table-quick-actions {
  position: static;
  width: 100%;
  margin-top: 12px;
  padding: 10px 0 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  border: 0;
  border-top: 1px solid var(--line);
  background: none;
  box-shadow: none;
  backdrop-filter: none;
}
body.in-game .hand-result .table-quick-actions span { grid-column: 1 / -1; }

@media (max-width: 1023px) {
  .lobby-grid {
    grid-template-columns: 1fr;
    grid-template-areas: "create" "join" "records";
  }
  .lobby-create-panel .inline-form {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  body[data-visual-context="lobby"] .dashboard-head,
  body[data-visual-context="room"] .dashboard-head { flex-wrap: wrap; }
  body.in-game .app-shell {
    grid-template-rows: 40px minmax(0, 1fr) 100px;
  }
  body.in-game .poker-table {
    width: min(720px, 88vw, calc((100dvh - 176px) * 2.1168));
  }
  body.in-game .seat {
    width: 90px;
    min-width: 90px;
    min-height: 56px;
  }
  body.in-game[data-table-size="2"] .seat {
    width: 104px;
    min-width: 104px;
  }
  body.in-game .action-dock { height: 100px; }
  body.in-game .hand-result {
    width: min(660px, calc(100vw - 24px));
    max-height: calc(100dvh - 150px);
    padding: 14px;
  }
}

@media (max-width: 1023px) and (orientation: landscape) and (max-height: 600px) {
  body.in-game .poker-table {
    width: min(700px, 82vw, calc((100dvh - 144px) * 2.1168));
  }
  body.in-game .action-dock {
    width: min(720px, 96vw);
    height: 62px;
  }
  body.in-game .raise-controls {
    width: min(600px, 96vw);
    max-height: calc(100dvh - 106px);
    padding: 10px;
    gap: 6px;
  }
  body.in-game .raise-shortcuts,
  body.in-game .raise-adjustments { gap: 4px; }
  body.in-game .raise-shortcuts .chip-button,
  body.in-game .raise-adjustments .chip-button { font-size: 10px; }
  body.in-game .hand-result {
    grid-column: 1;
    grid-row: 2;
    align-self: center;
    width: min(640px, 86vw);
    height: auto;
    max-height: calc(100dvh - 108px);
    padding: 12px;
    overflow-y: auto;
  }
  body.in-game .settlement-heading h2 { font-size: 18px; }
}

@media (max-width: 640px) {
  body[data-visual-context="lobby"] .app-shell,
  body[data-visual-context="room"] .app-shell {
    width: min(100% - 20px, 960px);
    padding-block: 20px;
  }
  .lobby-create-panel .inline-form { grid-template-columns: 1fr; }
  body[data-visual-context="lobby"] .dashboard-head,
  body[data-visual-context="room"] .dashboard-head {
    align-items: flex-start;
    flex-direction: column;
  }
  .home-account-meta {
    max-width: none;
    justify-items: start;
    text-align: left;
  }
  .waiting-seat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .quick-start-panel {
    position: static;
    grid-template-columns: 1fr;
  }
}

@media (max-width: 1023px) and (orientation: portrait) {
  body.in-game .poker-table {
    width: min(94vw, 430px);
    aspect-ratio: .88;
  }
  body.in-game .board-area { top: 45%; }
  body.in-game .pot-label { top: 29%; }
  body.in-game .hole-cards { bottom: 4%; }
  body.in-game[data-table-size="2"] .seat[data-seat="0"] { bottom: -4%; }
  body.in-game[data-table-size="2"] .seat[data-seat="3"] { top: -4%; }
  body.in-game .raise-controls {
    left: 0;
    right: 0;
    bottom: calc(100% + 6px);
    width: auto;
    max-width: none;
    max-height: calc(100dvh - 150px);
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas:
      "head"
      "slider"
      "shortcuts"
      "adjustments"
      "submit";
  }
  body.in-game .raise-shortcuts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  body.in-game .raise-adjustments { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  body.in-game .hand-result {
    grid-row: 2;
    width: calc(100% - 24px);
    max-height: calc(100dvh - 160px);
    padding: 14px;
  }
  body.in-game .result-players { grid-template-columns: 1fr; }
  body.in-game .result-player .card.mini-card {
    width: 29px;
    font-size: 12px;
  }
  body.in-game .result-player .card.micro-card {
    width: 20px;
    font-size: 9px;
  }
}

/* Layout revision v4.1: measured separation between adjacent gameplay zones. */
body.in-game .pot-label { top: 23%; }
body.in-game[data-table-size="2"] .seat[data-seat="0"] { bottom: -20%; }
body.in-game[data-table-size="6"] .seat[data-seat="0"] { bottom: -20%; }
body.in-game .raise-controls { bottom: calc(100% + 26px); }
body.in-game .hand-result { max-height: min(680px, calc(100dvh - 180px)); }

@media (max-width: 1023px) and (orientation: landscape) and (max-height: 600px) {
  body.in-game .raise-controls { bottom: calc(100% + 18px); }
  body.in-game .hand-result { max-height: calc(100dvh - 108px); }
}

@media (max-width: 1023px) and (orientation: portrait) {
  body.in-game .pot-label { top: 23%; }
  body.in-game[data-table-size="2"] .seat[data-seat="0"],
  body.in-game[data-table-size="6"] .seat[data-seat="0"] { bottom: -12%; }
  body.in-game .raise-controls { bottom: calc(100% + 26px); }
  body.in-game .hand-result { max-height: calc(100dvh - 160px); }
}

/* Mobile landscape uses a side control rail. A desktop-style bottom dock does
   not leave enough vertical room for the table at short app-window heights. */
@media (max-width: 1023px) and (orientation: landscape) and (max-height: 600px) {
  body.in-game .app-shell {
    grid-template-columns: minmax(0, 1fr) minmax(260px, 34vw);
    grid-template-rows: 40px minmax(0, 1fr);
    gap: 4px 7px;
  }
  body.in-game .dashboard-head {
    grid-column: 1 / -1;
    grid-row: 1;
  }
  body.in-game .table-stage {
    grid-column: 1;
    grid-row: 2;
    height: 100%;
    padding: 8px 0;
    place-items: center;
  }
  body.in-game .poker-table {
    width: min(92%, 600px, calc((100dvh - 112px) * 2.1168));
  }
  body.in-game .pot-label { top: 10%; }
  body.in-game .board-area { top: 52%; }
  body.in-game .hole-cards { bottom: 10%; }
  body.in-game .seat {
    width: 82px;
    min-width: 82px;
    min-height: 50px;
  }
  body.in-game[data-table-size="2"] .seat,
  body.in-game[data-table-size="6"] .seat {
    width: 86px;
    min-width: 86px;
  }
  body.in-game[data-table-size="2"] .seat[data-seat="0"],
  body.in-game[data-table-size="6"] .seat[data-seat="0"] { bottom: -16%; }
  body.in-game .action-dock {
    grid-column: 2;
    grid-row: 2;
    align-self: center;
    width: 100%;
    height: min(250px, 100%);
    max-height: 100%;
    margin: 0;
    padding: 8px;
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: 44px minmax(0, 1fr);
    gap: 7px;
  }
  body.in-game .action-summary {
    grid-column: 1;
    grid-row: 1;
    padding: 5px 8px 5px 19%;
  }
  body.in-game .your-turn-label {
    align-items: flex-start;
    flex-direction: column;
    gap: 1px;
  }
  body.in-game .action-main {
    grid-column: 1;
    grid-row: 2;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 5px;
  }
  body.in-game .action-main .action-button {
    min-height: 48px;
    padding: 5px 3px;
  }
  body.in-game .action-dock:has(.raise-controls:not([hidden])) > .action-summary,
  body.in-game .action-dock:has(.raise-controls:not([hidden])) > .action-main {
    visibility: hidden;
  }
  body.in-game .raise-controls {
    inset: 0;
    width: auto;
    height: auto;
    max-height: 100%;
    margin: 0;
    padding: 9px;
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas:
      "head"
      "slider"
      "shortcuts"
      "adjustments"
      "submit";
    gap: 5px;
  }
  body.in-game .raise-head input { width: 104px; min-height: 36px; }
  body.in-game .raise-shortcuts { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  body.in-game .raise-adjustments { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  body.in-game .raise-shortcuts .chip-button,
  body.in-game .raise-adjustments .chip-button {
    min-height: 34px;
    padding-inline: 3px;
    font-size: 9px;
  }
  body.in-game .raise-shortcuts .chip-button { min-height: 22px; }
  body.in-game .raise-submit { min-height: 38px; }
  body.in-game .hand-result {
    grid-column: 1 / -1;
    grid-row: 2;
    align-self: center;
    width: min(800px, calc(100vw - 18px));
    height: auto;
    max-height: 100%;
    padding: 9px;
  }
  body.in-game .settlement-heading {
    min-height: 48px;
    margin-bottom: 6px;
  }
  body.in-game .settlement-heading h2 { font-size: 17px; }
  body.in-game .compact-result > summary {
    min-height: 36px;
    padding: 6px 9px;
  }
  body.in-game .compact-result[open] > summary { margin-bottom: 6px; }
  body.in-game .result-players {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 5px;
  }
  body.in-game .result-player { padding: 7px; }
  body.in-game .result-player-head { margin-bottom: 4px; }
  body.in-game .result-player .card.mini-card { width: 26px; }
  body.in-game .result-player .card.micro-card { width: 17px; }
  body.in-game .hand-result .table-quick-actions {
    min-height: 42px;
    margin-top: 6px;
    padding-top: 6px;
  }
}

/* Table readability revision v5: runtime information uses clean DOM cards.
   Generated skins remain decorative and never frame dynamic text. */
body.in-game .app-shell {
  grid-template-rows: 60px minmax(0, 1fr) 102px;
}
body.in-game .game-status-bar {
  height: 60px;
  padding: 6px 12px;
}
body.in-game .game-status-skin { background-image: none !important; }
body.in-game .game-status-copy { gap: 16px; }
body.in-game .betting-street {
  flex: 0 0 auto;
  min-width: 142px;
  min-height: 38px;
  margin: 0;
  padding: 6px 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: var(--paper);
  border: 1px solid rgba(84, 229, 208, .72);
  border-radius: 6px;
  background: rgba(8, 28, 34, .9);
  box-shadow: inset 0 0 0 2px rgba(84, 229, 208, .08);
  font: 800 12px/1 ui-monospace, SFMono-Regular, Menlo, monospace;
  letter-spacing: .02em;
}
body.in-game .betting-street strong {
  padding-left: 8px;
  color: var(--cyan);
  border-left: 1px solid rgba(84, 229, 208, .35);
  font-size: 12px;
}
body.in-game .game-status-copy h1 {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body.in-game .action-dock {
  height: 102px;
  padding: 10px 12px;
  grid-template-columns: minmax(210px, 252px) minmax(0, 1fr);
  gap: 12px;
  border: 1px solid rgba(84, 229, 208, .55);
  border-radius: 14px;
  background-color: rgba(13, 11, 24, .96);
  background-image: none !important;
}
body.in-game .action-summary {
  min-width: 0;
  padding: 8px 12px;
  border: 1px solid rgba(84, 229, 208, .2);
  border-radius: 9px;
  background: rgba(84, 229, 208, .06);
}
body.in-game .action-main {
  grid-template-columns: repeat(4, minmax(112px, 1fr));
  gap: 8px;
}
body.in-game .action-main .action-button {
  min-width: 0;
  min-height: 62px;
  padding: 8px 10px;
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  color: var(--paper);
  border: 1px solid rgba(242, 230, 204, .28);
  border-radius: 9px;
  background: rgba(31, 27, 45, .96) !important;
  background-image: none !important;
  box-shadow: 0 4px 0 rgba(0, 0, 0, .35);
}
body.in-game .action-main .action-button[data-art-state="fold"] {
  border-color: rgba(241, 109, 112, .76);
  background: rgba(88, 34, 45, .94) !important;
}
body.in-game .action-main .action-button[data-art-state="check"],
body.in-game .action-main .action-button[data-art-state="call"] {
  color: #071d1b;
  border-color: var(--cyan);
  background: var(--cyan) !important;
}
body.in-game .action-main .action-button[data-art-state="raise"] {
  border-color: rgba(255, 209, 102, .82);
  background: rgba(94, 70, 24, .95) !important;
}
body.in-game .action-main .action-button[data-art-state="all-in"] {
  border-color: rgba(240, 90, 166, .82);
  background: rgba(91, 30, 69, .96) !important;
}
body.in-game .action-glyph {
  display: inline-grid;
  width: 30px;
  height: 30px;
  place-items: center;
  color: inherit;
  border: 1px solid currentColor;
  border-radius: 5px;
  font: 900 15px/1 ui-monospace, SFMono-Regular, Menlo, monospace;
}
body.in-game .action-copy {
  min-width: 0;
  overflow: visible;
  color: inherit;
  font-size: 14px;
  font-weight: 900;
  text-align: center;
  text-overflow: clip;
  white-space: nowrap;
}
body.in-game .action-copy strong { font: 900 15px/1 ui-monospace, SFMono-Regular, Menlo, monospace; }

body.in-game .seat {
  width: 168px;
  min-width: 168px;
  min-height: 92px;
  padding: 12px 10px 10px 62px;
  display: block;
  color: var(--paper);
  text-align: left;
  border: 1px solid rgba(242, 230, 204, .3);
  border-radius: 10px;
  background: rgba(16, 14, 27, .96) !important;
  background-image: none !important;
  box-shadow: 0 8px 22px rgba(0, 0, 0, .48);
}
body.in-game[data-table-size="2"] .seat {
  width: 184px;
  min-width: 184px;
}
body.in-game .seat.active {
  border-color: var(--cyan);
  box-shadow: 0 0 0 2px rgba(84, 229, 208, .16), 0 8px 24px rgba(0, 0, 0, .5);
}
body.in-game .seat-avatar {
  top: 18px;
  left: 9px;
  width: 46px;
  height: 58px;
  transform: none;
  overflow: hidden;
  border: 1px solid rgba(84, 229, 208, .48);
  border-radius: 6px;
  background: #0c1d25 !important;
  background-image: none !important;
}
body.in-game .seat-copy {
  min-width: 0;
  display: grid;
  gap: 6px;
}
body.in-game .seat-name {
  min-width: 0;
  min-height: 22px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  background: none !important;
}
body.in-game .seat-name > strong {
  min-width: 0;
  max-width: none;
  overflow: hidden;
  color: var(--paper);
  font-size: 13px;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}
body.in-game .seat-roles {
  position: static;
  flex: 0 0 auto;
  transform: none;
  gap: 3px;
}
body.in-game .seat-role-marker {
  width: auto;
  min-width: 22px;
  height: 18px;
  padding: 0 4px;
  display: inline-grid;
  place-items: center;
  color: #17121f;
  border: 1px solid #fff0b6;
  border-radius: 4px;
  background: var(--gold) !important;
  background-image: none !important;
  font: 900 9px/1 ui-monospace, SFMono-Regular, Menlo, monospace;
}
body.in-game .seat-role-marker.blind-marker { color: var(--paper); border-color: rgba(84, 229, 208, .7); background: #164b49 !important; }
body.in-game .seat-stack {
  margin: 0;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}
body.in-game .seat-stack small {
  color: var(--muted);
  font-size: 9px;
  font-weight: 700;
}
body.in-game .seat-stack strong {
  color: var(--gold);
  font: 900 16px/1 ui-monospace, SFMono-Regular, Menlo, monospace;
}
body.in-game .seat-status {
  min-width: 0;
  min-height: 20px;
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 5px;
  color: var(--muted);
  font-size: 10px;
  white-space: nowrap;
}
body.in-game .seat-status > span:not(.art-icon):not(.turn-clock) {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}
body.in-game .seat-status .art-icon { width: 14px; height: 14px; }
body.in-game .seat-status-dot {
  width: 8px;
  height: 8px;
  flex: 0 0 auto;
  border: 1px solid rgba(242, 230, 204, .72);
  border-radius: 50%;
  background: var(--muted);
}
body.in-game .seat-status-dot[data-status="winner"] { background: var(--gold); box-shadow: 0 0 8px rgba(255, 209, 102, .62); }
body.in-game .seat-status-dot[data-status="current"] { background: var(--cyan); box-shadow: 0 0 8px rgba(84, 229, 208, .62); }
body.in-game .seat-status-dot[data-status="all-in"] { background: var(--pink); }
body.in-game .seat-status-dot[data-status="folded"] { background: #80758a; }
body.in-game .seat-status-dot[data-status="disconnected"],
body.in-game .seat-status-dot[data-status="reconnecting"] { background: var(--red); }
body.in-game .seat-status .turn-clock {
  min-width: 34px;
  min-height: 20px;
  margin-left: auto;
  padding: 2px 5px;
  font-size: 9px;
  background-image: none !important;
}
body.in-game .seat-index {
  top: -11px;
  left: 9px;
  padding: 3px 7px;
  font-size: 9px;
}
body.in-game .opponent-card-backs {
  z-index: 2;
  top: -25px;
  right: 10px;
  width: 36px;
  height: 36px;
  opacity: 1;
  background: none !important;
  background-image: none !important;
}
body.in-game .opponent-card-backs::before,
body.in-game .opponent-card-backs::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 8px;
  width: 19px;
  height: 27px;
  border: 1px solid rgba(242, 230, 204, .78);
  border-radius: 3px;
  background: repeating-linear-gradient(135deg, #241934 0 3px, #a93f7c 3px 5px);
  box-shadow: 0 2px 5px rgba(0, 0, 0, .38);
  transform: rotate(-7deg);
  transform-origin: 50% 100%;
}
body.in-game .opponent-card-backs::after {
  left: 12px;
  transform: rotate(7deg);
}
body.in-game .seat-wager {
  left: 50%;
  bottom: -29px;
  min-height: 25px;
  max-width: none;
  padding: 4px 9px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--paper);
  border: 1px solid rgba(255, 209, 102, .72);
  border-radius: 6px;
  background: rgba(22, 17, 31, .97) !important;
  background-image: none !important;
  font-size: 9px;
}
body.in-game .seat-wager strong { color: var(--gold); font: 900 10px/1 ui-monospace, SFMono-Regular, Menlo, monospace; }
body.in-game .wager-dot {
  width: 11px;
  height: 11px;
  border: 3px solid var(--gold);
  border-radius: 50%;
  box-shadow: inset 0 0 0 2px #6d3d11;
}
body.in-game[data-table-size="2"] .seat[data-seat="0"],
body.in-game[data-table-size="6"] .seat[data-seat="0"] { bottom: -22%; }
body.in-game[data-table-size="2"] .seat[data-seat="3"],
body.in-game[data-table-size="6"] .seat[data-seat="3"] { top: -12%; }
body.in-game[data-table-size="6"] .seat[data-seat="1"] { left: -7%; bottom: 13%; }
body.in-game[data-table-size="6"] .seat[data-seat="2"] { left: -7%; top: 11%; }
body.in-game[data-table-size="6"] .seat[data-seat="4"] { right: -7%; top: 11%; }
body.in-game[data-table-size="6"] .seat[data-seat="5"] { right: -7%; bottom: 13%; }

body.in-game .pot-label {
  top: 21%;
  width: auto;
  min-width: 176px;
  max-width: 260px;
  min-height: 50px;
  padding: 7px 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: var(--paper);
  border: 1px solid rgba(255, 209, 102, .72);
  border-radius: 8px;
  background: rgba(18, 14, 27, .96) !important;
  background-image: none !important;
  box-shadow: 0 7px 20px rgba(0, 0, 0, .4);
}
body.in-game .pot-symbol {
  position: relative;
  width: 34px;
  height: 28px;
  flex: 0 0 auto;
}
body.in-game .pot-symbol i {
  position: absolute;
  width: 22px;
  height: 8px;
  left: 6px;
  border: 2px solid #fff0b6;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: inset 0 -2px #9f6417;
}
body.in-game .pot-symbol i:nth-child(1) { bottom: 2px; }
body.in-game .pot-symbol i:nth-child(2) { bottom: 9px; }
body.in-game .pot-symbol i:nth-child(3) { bottom: 16px; }
body.in-game .pot-copy {
  min-width: 0;
  display: grid;
  grid-template-columns: auto auto;
  align-items: baseline;
  gap: 3px 8px;
}
body.in-game .pot-copy > small {
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
}
body.in-game .pot-copy > strong {
  color: var(--gold);
  font: 900 20px/1 ui-monospace, SFMono-Regular, Menlo, monospace;
}
body.in-game .pot-copy .pot-breakdown {
  grid-column: 1 / -1;
  margin: 1px 0 0;
  color: var(--paper);
  font-size: 8px;
}

@media (max-width: 1023px) {
  body.in-game .app-shell { grid-template-rows: 44px minmax(0, 1fr) 108px; }
  body.in-game .game-status-bar { height: 44px; padding: 3px 6px; }
  body.in-game .game-status-copy { gap: 7px; }
  body.in-game .betting-street {
    min-width: 104px;
    min-height: 30px;
    padding: 4px 6px;
    gap: 5px;
    font-size: 9px;
  }
  body.in-game .betting-street strong { padding-left: 5px; font-size: 9px; }
  body.in-game .action-dock {
    height: 108px;
    padding: 6px;
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: 34px minmax(0, 1fr);
    gap: 5px;
  }
  body.in-game .action-summary { padding: 4px 7px 4px 18%; }
  body.in-game .action-main { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 4px; }
  body.in-game .action-main .action-button {
    min-height: 54px;
    padding: 5px 3px;
    grid-template-columns: 22px minmax(0, 1fr);
    gap: 3px;
  }
  body.in-game .action-glyph { width: 22px; height: 22px; font-size: 11px; }
  body.in-game .action-copy { font-size: 10px; }
  body.in-game .action-copy strong { font-size: 10px; }
  body.in-game .seat,
  body.in-game[data-table-size="2"] .seat,
  body.in-game[data-table-size="6"] .seat {
    width: 112px;
    min-width: 112px;
    min-height: 66px;
    padding: 8px 6px 7px 42px;
  }
  body.in-game .seat-avatar { top: 13px; left: 6px; width: 31px; height: 40px; }
  body.in-game .seat-copy { gap: 3px; }
  body.in-game .seat-name { min-height: 17px; gap: 3px; }
  body.in-game .seat-name > strong { font-size: 10px; }
  body.in-game .seat-role-marker { min-width: 17px; height: 14px; padding-inline: 2px; font-size: 7px; }
  body.in-game .seat-stack small { font-size: 7px; }
  body.in-game .seat-stack strong { font-size: 12px; }
  body.in-game .seat-status { min-height: 14px; gap: 3px; font-size: 7px; }
  body.in-game .seat-status .art-icon { width: 10px; height: 10px; }
  body.in-game .seat-status .turn-clock { min-width: 27px; min-height: 15px; padding: 1px 3px; font-size: 7px; }
  body.in-game .opponent-card-backs { top: -23px; right: 7px; width: 29px; height: 34px; }
  body.in-game .seat-wager { bottom: -23px; min-height: 21px; padding: 3px 6px; font-size: 7px; }
  body.in-game .seat-wager strong { font-size: 8px; }
  body.in-game .wager-dot { width: 9px; height: 9px; border-width: 2px; }
  body.in-game .pot-label { min-width: 142px; min-height: 40px; padding: 5px 8px; gap: 6px; }
  body.in-game .pot-symbol { width: 27px; height: 23px; }
  body.in-game .pot-symbol i { left: 4px; width: 18px; height: 7px; }
  body.in-game .pot-symbol i:nth-child(1) { bottom: 1px; }
  body.in-game .pot-symbol i:nth-child(2) { bottom: 7px; }
  body.in-game .pot-symbol i:nth-child(3) { bottom: 13px; }
  body.in-game .pot-copy > small { font-size: 8px; }
  body.in-game .pot-copy > strong { font-size: 15px; }
}

@media (max-width: 1023px) and (orientation: portrait) {
  body.in-game[data-table-size="2"] .seat[data-seat="0"],
  body.in-game[data-table-size="6"] .seat[data-seat="0"] { bottom: -14%; }
  body.in-game[data-table-size="2"] .seat[data-seat="3"],
  body.in-game[data-table-size="6"] .seat[data-seat="3"] { top: -7%; }
}

@media (max-width: 1023px) and (orientation: landscape) and (max-height: 600px) {
  body.in-game .app-shell {
    grid-template-columns: minmax(0, 1fr) minmax(280px, 35vw);
    grid-template-rows: 40px minmax(0, 1fr);
  }
  body.in-game .seat,
  body.in-game[data-table-size="2"] .seat,
  body.in-game[data-table-size="6"] .seat {
    width: 100px;
    min-width: 100px;
    min-height: 58px;
    padding: 7px 5px 6px 38px;
  }
  body.in-game .seat-avatar { top: 11px; left: 5px; width: 28px; height: 36px; }
  body.in-game[data-table-size="2"] .seat[data-seat="0"],
  body.in-game[data-table-size="6"] .seat[data-seat="0"] { bottom: -20%; }
  body.in-game .hole-cards { bottom: 12%; }
  body.in-game .pot-label { top: 8%; }
  body.in-game .action-dock {
    width: 100%;
    height: min(260px, 100%);
    grid-template-rows: 48px minmax(0, 1fr);
  }
  body.in-game .action-summary { padding-left: 22%; }
  body.in-game .action-main { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* Overlay readability revision v6: dynamic settlement, history and confirmation
   content is rendered by DOM/CSS instead of placeholder-bearing art skins. */
body.in-game .hand-result {
  width: min(1120px, calc(100vw - 56px));
  max-height: min(760px, calc(100dvh - 116px));
  padding: 28px;
  border-radius: 18px;
}
body.in-game .settlement-heading {
  align-items: center;
  margin-bottom: 18px;
}
body.in-game .settlement-heading .panel-kicker { font-size: 13px; }
body.in-game .settlement-heading h2 {
  margin-top: 5px;
  font-size: clamp(30px, 3.2vw, 44px);
  line-height: 1.05;
}
body.in-game .settlement-heading > strong {
  font-size: clamp(24px, 2.8vw, 36px);
}
body.in-game .compact-result > summary {
  min-height: 58px;
  padding: 12px 16px;
  font-size: 16px;
}
body.in-game .compact-result > summary .art-icon { width: 28px; height: 28px; }
body.in-game .compact-result > summary small { font-size: 13px; }
body.in-game .result-pots {
  margin: 14px 0;
  font-size: 14px;
}
body.in-game .result-pots > div { min-height: 42px; padding: 9px 12px; }
body.in-game .result-players { gap: 16px; }
body.in-game .result-player {
  min-height: 188px;
  padding: 18px;
  border-radius: 12px;
}
body.in-game .result-player-head {
  min-height: 30px;
  margin-bottom: 14px;
  font-size: 18px;
}
body.in-game .result-player-head > strong { font-size: 18px; }
body.in-game .result-player-head span { font-size: 14px; }
body.in-game .result-hand {
  grid-template-columns: auto minmax(0, 1fr);
  gap: 18px;
  font-size: 18px;
}
body.in-game .result-hole,
body.in-game .best-five { gap: 7px; }
body.in-game .best-five { margin-top: 10px; }
body.in-game .result-player .card.mini-card {
  width: 58px;
  border-radius: 6px;
  font-size: 22px;
}
body.in-game .result-player .card.micro-card {
  width: 38px;
  border-radius: 5px;
  font-size: 15px;
}
body.in-game .hand-result .table-quick-actions {
  min-height: 78px;
  margin-top: 18px;
  padding-top: 14px;
  gap: 10px;
}
body.in-game .hand-result .table-quick-actions button {
  min-height: 52px;
  font-size: 16px;
}
body.in-game .hand-result .table-quick-actions span { font-size: 12px; }

.history-list > .history-event {
  min-height: 52px;
  padding: 11px 12px;
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr);
  align-items: center;
  gap: 14px;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: none !important;
  background-image: none !important;
  box-shadow: none;
}
.history-list > .history-event:last-child { border-bottom: 0; }
.history-event .history-sequence {
  min-width: 42px;
  padding: 5px 7px;
  color: var(--pink);
  border: 1px solid rgba(240, 90, 166, .38);
  border-radius: 5px;
  background: rgba(240, 90, 166, .08);
  font-size: 12px;
  text-align: center;
}
.history-event .history-event-copy {
  min-width: 0;
  overflow-wrap: anywhere;
  color: var(--paper);
  font-size: 14px;
  line-height: 1.5;
}
.history-event[data-action-state="all-in"] { border-left: 3px solid var(--pink); }
.history-event[data-action-state="timeout-fold"],
.history-event[data-action-state="operation-rejected"] { border-left: 3px solid var(--red); }
.history-event[data-action-state="unmatched-return"] { border-left: 3px solid var(--gold); }

.table-menu { box-sizing: border-box; }
.dialog-actions {
  min-width: 0;
  flex-wrap: wrap;
}
.dialog-actions > button { min-width: 112px; }
.art-confirm-dialog {
  width: min(560px, calc(100vw - 32px));
  max-height: calc(100dvh - 32px);
  padding: 28px;
  overflow: auto;
  border: 2px solid rgba(241, 109, 112, .82);
  border-radius: 16px;
  background: linear-gradient(155deg, rgba(39, 26, 52, .99), rgba(15, 13, 24, .99)) !important;
  background-image: none !important;
  box-shadow: 0 22px 70px rgba(0, 0, 0, .68), 0 0 28px rgba(241, 109, 112, .14);
  image-rendering: auto;
}
.art-confirm-dialog > * {
  position: relative;
  z-index: 1;
}
.confirm-heading {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  align-items: center;
  gap: 16px;
}
.confirm-heading .panel-kicker { margin: 0 0 5px; }
.art-confirm-dialog .confirm-heading h2 {
  margin: 0;
  font-size: 28px;
  line-height: 1.15;
}
.confirm-symbol {
  position: relative;
  width: 54px;
  height: 54px;
  border: 1px solid rgba(241, 109, 112, .76);
  border-radius: 10px;
  background: rgba(241, 109, 112, .1);
}
.confirm-symbol::before,
.confirm-symbol::after {
  content: "";
  position: absolute;
  top: 25px;
  left: 12px;
  width: 30px;
  height: 3px;
  border-radius: 2px;
  background: var(--red);
  transform: rotate(45deg);
}
.confirm-symbol::after { transform: rotate(-45deg); }
.art-confirm-dialog[data-art-state="all-in-confirm"] .confirm-symbol {
  border-color: rgba(240, 90, 166, .76);
  background: rgba(240, 90, 166, .1);
}
.art-confirm-dialog[data-art-state="all-in-confirm"] .confirm-symbol::before {
  top: 12px;
  left: 16px;
  width: 20px;
  height: 20px;
  border: 4px solid var(--pink);
  border-radius: 50%;
  background: transparent;
  transform: none;
}
.art-confirm-dialog[data-art-state="all-in-confirm"] .confirm-symbol::after {
  top: 38px;
  left: 12px;
  width: 30px;
  background: var(--pink);
  transform: none;
}
.art-confirm-message {
  min-height: 0;
  margin: 24px 0 0;
  padding: 16px;
  color: var(--paper);
  border: 1px solid rgba(242, 230, 204, .16);
  border-radius: 9px;
  background: rgba(255, 255, 255, .035);
  font-size: 16px;
  line-height: 1.6;
}
.art-confirm-dialog .dialog-actions {
  margin-top: 22px;
  justify-content: flex-end;
  gap: 10px;
}
.art-confirm-dialog .dialog-actions button {
  min-width: 128px;
  min-height: 48px;
  padding: 10px 18px;
}
.art-confirm-dialog #player-confirm-submit {
  color: #071d1b;
  border-color: var(--cyan);
  background: var(--cyan);
  box-shadow: 3px 3px 0 #227a76;
}

@media (max-width: 1023px) {
  body.in-game .hand-result {
    width: min(760px, calc(100vw - 24px));
    max-height: calc(100dvh - 106px);
    padding: 18px;
  }
  body.in-game .settlement-heading h2 { font-size: 26px; }
  body.in-game .settlement-heading > strong { font-size: 22px; }
  body.in-game .result-player { min-height: 150px; padding: 13px; }
  body.in-game .result-player .card.mini-card { width: 45px; font-size: 18px; }
  body.in-game .result-player .card.micro-card { width: 30px; font-size: 12px; }
}

@media (max-width: 640px) {
  body.in-game .hand-result {
    width: calc(100vw - 16px);
    max-height: calc(100dvh - 76px);
    padding: 14px;
  }
  body.in-game .settlement-heading { margin-bottom: 12px; }
  body.in-game .settlement-heading .panel-kicker { font-size: 9px; }
  body.in-game .settlement-heading h2 { font-size: 23px; }
  body.in-game .settlement-heading > strong { font-size: 19px; }
  body.in-game .compact-result > summary { min-height: 48px; padding: 9px; font-size: 13px; }
  body.in-game .result-players { grid-template-columns: 1fr; gap: 9px; }
  body.in-game .result-player { min-height: 132px; padding: 11px; }
  body.in-game .result-player-head,
  body.in-game .result-player-head > strong { font-size: 15px; }
  body.in-game .result-hand { gap: 10px; font-size: 15px; }
  body.in-game .result-player .card.mini-card { width: 40px; font-size: 16px; }
  body.in-game .result-player .card.micro-card { width: 27px; font-size: 11px; }
  .history-list > .history-event {
    min-height: 48px;
    grid-template-columns: 44px minmax(0, 1fr);
    gap: 9px;
    padding: 9px 6px;
  }
  .history-event .history-sequence { min-width: 38px; padding-inline: 4px; }
  .history-event .history-event-copy { font-size: 12px; }
  .art-confirm-dialog { padding: 20px; }
  .confirm-heading { grid-template-columns: 46px minmax(0, 1fr); gap: 12px; }
  .confirm-symbol { width: 44px; height: 44px; }
  .confirm-symbol::before,
  .confirm-symbol::after { top: 20px; left: 9px; width: 26px; }
  .art-confirm-dialog .confirm-heading h2 { font-size: 23px; }
  .art-confirm-message { margin-top: 18px; padding: 13px; font-size: 14px; }
  .art-confirm-dialog .dialog-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .art-confirm-dialog .dialog-actions button { min-width: 0; width: 100%; }
}

/* Waiting room and slider-only raise controls readability revision v7. */
body[data-visual-context="room"] .app-shell {
  width: min(1120px, calc(100% - 32px));
}

.waiting-seat-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.waiting-seat {
  min-width: 0;
  min-height: 118px;
  padding: 14px;
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr);
  align-items: center;
  align-content: center;
  justify-items: stretch;
  gap: 14px;
  overflow: hidden;
  color: var(--paper);
  text-align: left;
  border: 1px solid rgba(242, 230, 204, .2);
  border-radius: 10px;
  background: rgba(10, 8, 17, .82) !important;
  background-image: none !important;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .025);
}

.waiting-seat.available {
  padding-left: 14px;
  border-style: dashed;
  border-color: rgba(84, 229, 208, .32);
  background: rgba(8, 7, 13, .58) !important;
}

.waiting-seat.occupied {
  border-color: rgba(84, 229, 208, .28);
}

.waiting-seat.self {
  border-color: var(--gold);
  background: linear-gradient(90deg, rgba(255, 209, 102, .11), rgba(10, 8, 17, .86)) !important;
  box-shadow: inset 4px 0 0 var(--gold);
}

.waiting-seat.available:hover {
  border-color: var(--cyan);
  background: rgba(84, 229, 208, .08) !important;
}

.waiting-seat-visual {
  position: relative;
  width: 76px;
  height: 88px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px solid rgba(242, 230, 204, .2);
  border-radius: 8px;
  background: rgba(21, 18, 31, .96);
  box-shadow: inset 0 -3px 0 rgba(84, 229, 208, .16);
}

.waiting-seat .player-avatar-art {
  position: static;
  width: 100%;
  height: 100%;
  transform: none;
  background-position: center bottom;
  background-size: contain;
}

.waiting-seat-copy {
  min-width: 0;
  display: grid;
  align-content: center;
  gap: 8px;
}

.waiting-seat-topline {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.waiting-seat .waiting-seat-number {
  flex: 0 0 auto;
  color: var(--cyan);
  font: 900 13px/1 ui-monospace, SFMono-Regular, Menlo, monospace;
  letter-spacing: .04em;
}

.waiting-seat-badges {
  min-width: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 4px;
}

.waiting-seat .waiting-seat-badge {
  padding: 4px 6px;
  color: var(--paper);
  border: 1px solid rgba(242, 230, 204, .18);
  border-radius: 999px;
  background: rgba(255, 255, 255, .05);
  font: 800 10px/1 ui-monospace, SFMono-Regular, Menlo, monospace;
  white-space: nowrap;
}

.waiting-seat .self-badge,
.waiting-seat .owner-badge {
  color: var(--gold);
  border-color: rgba(255, 209, 102, .36);
}

.waiting-seat .ready-badge {
  color: var(--cyan);
  border-color: rgba(84, 229, 208, .36);
}

.waiting-seat strong,
.waiting-seat small {
  width: 100%;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.waiting-seat strong {
  color: var(--paper);
  font-size: 18px;
  line-height: 1.25;
}

.waiting-seat small {
  min-height: 15px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.25;
}

.empty-seat-symbol {
  position: relative;
  width: 42px;
  height: 48px;
  display: block;
  color: var(--cyan);
  border: 2px solid currentColor;
  border-radius: 9px 9px 6px 6px;
  background: rgba(84, 229, 208, .05);
  box-shadow: 0 9px 0 -5px rgba(84, 229, 208, .2);
}

.empty-seat-symbol::before {
  content: "";
  position: absolute;
  top: 8px;
  left: 50%;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: currentColor;
  transform: translateX(-50%);
}

.empty-seat-symbol i {
  position: absolute;
  left: 50%;
  bottom: 8px;
  width: 24px;
  height: 15px;
  border-radius: 12px 12px 4px 4px;
  background: currentColor;
  transform: translateX(-50%);
}

.raise-title {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--paper);
  font-weight: 900;
}

.control-glyph {
  flex: 0 0 auto;
  width: 24px;
  height: 24px;
  display: inline-grid;
  place-items: center;
  color: currentColor;
  border: 1px solid currentColor;
  border-radius: 5px;
  background: rgba(255, 255, 255, .035) !important;
  background-image: none !important;
  font: 900 15px/1 ui-monospace, SFMono-Regular, Menlo, monospace;
  image-rendering: auto;
}

body.in-game .raise-controls {
  width: min(760px, calc(100vw - 28px));
  grid-template-columns: minmax(0, 1fr) minmax(210px, .45fr);
  background-image: none !important;
}

body.in-game .raise-head output {
  flex: 0 0 auto;
  width: 150px;
  min-height: 54px;
  padding: 10px 14px;
  display: grid;
  place-items: center end;
  color: var(--paper);
  border: 1px solid rgba(242, 230, 204, .28);
  border-radius: 9px;
  background: rgba(255, 255, 255, .045);
  font: 900 28px/1 ui-monospace, SFMono-Regular, Menlo, monospace;
  font-variant-numeric: tabular-nums;
}

body.in-game .raise-slider-row {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  min-height: 42px;
}

body.in-game .art-raise-slider {
  grid-column: 2;
  min-width: 0;
  width: 100%;
  height: 34px;
  margin: 0;
  appearance: none;
  cursor: pointer;
  border: 0;
  outline-offset: 4px;
  background: linear-gradient(90deg, var(--cyan), rgba(84, 229, 208, .3)) center / 100% 8px no-repeat;
}

body.in-game .art-raise-slider::-webkit-slider-thumb {
  width: 28px;
  height: 34px;
  appearance: none;
  border: 3px solid var(--paper);
  border-radius: 8px;
  background: var(--cyan) !important;
  background-image: none !important;
  box-shadow: 3px 3px 0 #227a76;
}

body.in-game .art-raise-slider::-moz-range-thumb {
  width: 24px;
  height: 30px;
  border: 3px solid var(--paper);
  border-radius: 8px;
  background: var(--cyan) !important;
  background-image: none !important;
  box-shadow: 3px 3px 0 #227a76;
}

body.in-game .raise-shortcuts .chip-button,
body.in-game .raise-adjustments .chip-button {
  min-height: 48px;
  padding: 8px 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  color: var(--paper);
  border: 1px solid rgba(242, 230, 204, .24);
  background: rgba(255, 255, 255, .035) !important;
  background-image: none !important;
  font-size: 13px;
}

body.in-game .raise-shortcuts .chip-button:hover,
body.in-game .raise-adjustments .chip-button:hover {
  border-color: var(--cyan);
  background: rgba(84, 229, 208, .08) !important;
}

body.in-game .raise-submit {
  min-height: 58px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  font-size: 16px;
}

body.in-game .raise-submit .control-glyph {
  color: #071d1b;
}

@media (max-width: 640px) {
  body[data-visual-context="room"] .app-shell {
    width: calc(100% - 16px);
  }

  .waiting-seat-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .waiting-seat,
  .waiting-seat.available {
    min-height: 98px;
    padding: 8px;
    grid-template-columns: 46px minmax(0, 1fr);
    gap: 8px;
    border-radius: 8px;
  }

  .waiting-seat-visual {
    width: 46px;
    height: 60px;
    border-radius: 6px;
  }

  .waiting-seat-copy { gap: 5px; }
  .waiting-seat-topline { align-items: flex-start; }
  .waiting-seat .waiting-seat-number { font-size: 10px; }
  .waiting-seat-badges { gap: 2px; }
  .waiting-seat .waiting-seat-badge { padding: 3px 4px; font-size: 8px; }
  .waiting-seat strong { font-size: 13px; }
  .waiting-seat small { font-size: 9px; }
  .empty-seat-symbol { width: 30px; height: 36px; }
  .empty-seat-symbol::before { top: 6px; width: 8px; height: 8px; }
  .empty-seat-symbol i { bottom: 6px; width: 18px; height: 12px; }

  body.in-game .raise-head output {
    width: 108px;
    min-height: 44px;
    padding: 8px 10px;
    font-size: 22px;
  }
}

@media (max-width: 1023px) and (orientation: landscape) and (max-height: 600px) {
  body.in-game .raise-controls {
    width: min(700px, 96vw);
    grid-template-columns: minmax(0, 1fr) minmax(190px, .42fr);
  }
  body.in-game .raise-head output { min-height: 40px; font-size: 21px; }
  body.in-game .raise-shortcuts .chip-button,
  body.in-game .raise-adjustments .chip-button { min-height: 36px; }
  body.in-game .raise-submit { min-height: 42px; }
}

/* In-game card readability revision v8. Runtime rank/suit labels remain above
   decorative face art so card identity never depends on tiny artwork text. */
body.in-game .board-area {
  top: 45%;
  width: min(520px, 58%);
  height: 132px;
}

body.in-game .board-area .board {
  gap: 10px;
}

body.in-game .card {
  flex: 0 0 auto;
  width: clamp(72px, 5.4vw, 86px);
  border: 2px solid rgba(84, 229, 208, .9);
  border-radius: 8px;
  background-color: var(--paper);
  box-shadow: 0 6px 0 #aa9c81, 0 10px 18px rgba(0, 0, 0, .22);
}

body.in-game .hole-card-row .card {
  width: clamp(78px, 6vw, 92px);
}

body.in-game .hole-card-row {
  gap: 10px;
}

body.in-game .hole-cards {
  bottom: 1%;
  gap: 5px;
}

.card > .card-index,
.card.v7-card-face > .card-index {
  position: absolute;
  z-index: 4;
  width: auto;
  min-width: 0;
  height: auto;
  margin: 0;
  opacity: 1;
  color: #15121f;
  border-radius: 4px;
  background: rgba(242, 230, 204, .94);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-weight: 1000;
  font-variant-numeric: tabular-nums;
  letter-spacing: -.09em;
  line-height: 1;
  text-shadow: 0 1px 0 #fff;
  white-space: nowrap;
}

.card.red > .card-index { color: #c52f51; }

.card > .card-index-primary {
  top: 5px;
  left: 5px;
  padding: 3px 5px 4px 3px;
  font-size: clamp(22px, 2.25vw, 31px);
}

.card > .card-index-secondary {
  right: 4px;
  bottom: 5px;
  padding: 2px 4px 3px 2px;
  font-size: clamp(14px, 1.35vw, 19px);
  transform: rotate(180deg);
}

.card.v7-card-face > .card-index-secondary {
  display: none;
}

body.in-game .card.face-card::after {
  inset: 23% 6% 12%;
}

@media (max-width: 1023px) {
  body.in-game .board-area {
    width: min(340px, 82%);
    height: 88px;
  }

  body.in-game .board-area .board { gap: 5px; }
  body.in-game .card { width: clamp(48px, 13vw, 56px); }
  body.in-game .hole-card-row .card { width: clamp(54px, 14.5vw, 62px); }
  body.in-game .hole-card-row { gap: 7px; }
  .card > .card-index-primary { top: 3px; left: 3px; padding: 2px 3px 3px 2px; font-size: clamp(17px, 5.4vw, 23px); }
  .card > .card-index-secondary { right: 2px; bottom: 3px; padding: 2px; font-size: clamp(11px, 3.5vw, 15px); }
}

@media (max-width: 1023px) and (orientation: portrait) {
  body.in-game .board-area { top: 42%; }
  body.in-game .hole-cards { bottom: 3%; }
}

@media (max-width: 1023px) and (orientation: landscape) and (max-height: 600px) {
  body.in-game .board-area {
    top: 37%;
    width: min(310px, 62%);
    height: 80px;
  }
  body.in-game .card { width: clamp(45px, 6.1vw, 52px); }
  body.in-game .hole-card-row .card { width: clamp(50px, 6.8vw, 58px); }
  body.in-game .hole-cards { bottom: -2%; }
  body.in-game .pot-label { top: -1%; }
  .card > .card-index-primary { font-size: clamp(16px, 2.5vw, 20px); }
  .card > .card-index-secondary { font-size: clamp(10px, 1.8vw, 13px); }
}
