.poker-page main { max-width: 1540px; }
.poker-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(265px, 315px); align-items: start; gap: 22px; }
.poker-table, .poker-sidebar { min-width: 0; }
.poker-table { padding: 22px; }
.poker-heading { align-items: center; }
.poker-heading h2 { margin-top: 4px; }
.poker-subtitle { margin: 3px 0 0; color: var(--muted); font-size: 13px; }
.poker-mobile-play { display: none; }
.poker-page button:focus-visible, .poker-page a:focus-visible, .poker-page input:focus-visible, .poker-page select:focus-visible, .poker-page summary:focus-visible { outline: 3px solid #e9b832; outline-offset: 3px; }

/* A future table style can override these arena-scoped colors through
   data-poker-table-style without changing the page or game controller. */
.poker-arena {
  --poker-side-seat-max: 245px;
  --poker-side-seat-overhang: 0px;
  --poker-table-felt-light: #36788d;
  --poker-table-felt: #33758b;
  --poker-table-felt-deep: #2e6e85;
  --poker-table-felt-grain: #e6f2ee0a;
  --poker-table-felt-grain-deep: #123b4c0d;
  --poker-table-rail-light: #285368;
  --poker-table-rail: #153c52;
  --poker-table-rail-shadow: #09283b;
  --poker-table-gold: #f5d878;
  --poker-table-gold-deep: #9f7d43;
  --poker-table-trim: #c6a568;
  --poker-table-stitch: #e4cc9299;
  --poker-table-seat: #0a3453ef;
  --poker-table-seat-deep: #082b48f2;
  --poker-table-seat-border: #bde6f97a;
  --poker-table-ink: #f7fbff;
  --poker-table-soft-ink: #f4f9fa;
  --poker-table-bubble: #fff6d9;
  --poker-table-bubble-ink: #163e5b;
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(326px, 1.45fr) minmax(0, 1fr);
  grid-template-rows: auto minmax(190px, auto) auto;
  gap: 14px 12px;
  padding: 48px;
  margin-top: 20px;
  min-width: 0;
  color: var(--poker-table-ink);
}
.poker-arena::before {
  content: "";
  position: absolute;
  z-index: -2;
  inset: 0;
  border: 22px solid transparent;
  border-radius: 25% / 120px;
  background:
    linear-gradient(155deg, var(--poker-table-felt-light), var(--poker-table-felt) 55%, var(--poker-table-felt-deep)) padding-box,
    linear-gradient(180deg, var(--poker-table-rail-light), var(--poker-table-rail) 48%, var(--poker-table-rail-shadow)) border-box;
  box-shadow: 0 0 0 2px var(--poker-table-gold-deep), 0 5px 0 2px var(--poker-table-rail-shadow), 0 12px 18px #0c2e4833, inset 0 0 0 2px var(--poker-table-trim), inset 0 0 0 4px var(--poker-table-gold-deep);
}
.poker-arena::after {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 31px;
  border: 1px solid var(--poker-table-stitch);
  border-radius: calc(25% - 15.5px) / 89px;
  pointer-events: none;
}
.poker-overhead {
  position: absolute;
  z-index: -1;
  inset: 22px;
  border-radius: calc(25% - 11px) / 98px;
  pointer-events: none;
  background:
    repeating-linear-gradient(12deg, transparent 0 3px, var(--poker-table-felt-grain) 3px 4px),
    repeating-linear-gradient(101deg, transparent 0 4px, var(--poker-table-felt-grain-deep) 4px 5px);
}
.poker-seats { display: contents; }
.poker-seat {
  grid-row: 2;
  min-width: 0;
  width: min(100%, var(--poker-side-seat-max));
  justify-self: center;
  align-self: center;
  padding: 9px;
  border: 1px solid var(--poker-table-seat-border);
  border-radius: 15px;
  background: linear-gradient(155deg, var(--poker-table-seat), var(--poker-table-seat-deep));
  box-shadow: 0 4px 12px #061e346b, inset 0 1px #ffffff33;
  transition: border-color .2s, box-shadow .2s, opacity .2s;
}
.poker-seat[data-seat="1"] { grid-column: 1; justify-self: start; }
/* The end seats stay between the rail curves; side seats sit in the straight middle. */
.poker-seat[data-seat="2"] { grid-column: 1 / -1; grid-row: 1; width: min(245px, 50%); }
.poker-seat[data-seat="3"] { grid-column: 3; justify-self: end; }
.poker-seat[data-seat="0"] { grid-column: 1 / -1; grid-row: 3; width: min(265px, 50%); }
.poker-seat[data-turn="true"], .poker-seat.is-turn { border-color: var(--poker-table-gold); box-shadow: 0 0 0 2px var(--poker-table-gold-deep), 0 4px 8px #061e346b; }
.poker-seat[data-folded="true"], .poker-seat.is-folded { opacity: .68; }
.poker-seat-top { display: flex; align-items: flex-start; gap: 8px; }
.poker-portrait { flex: none; width: 47px; height: 47px; object-fit: contain; clip-path: var(--character-cutout, none); }
.poker-seat-info { flex: 1; min-width: 0; }
.poker-name { display: block; font-size: 13px; line-height: 1.15; overflow-wrap: anywhere; color: var(--poker-table-ink); }
.poker-seat-status { min-height: 15px; margin-top: 3px; color: var(--poker-table-gold); font-size: 10px; line-height: 1.25; font-weight: 750; overflow-wrap: anywhere; }
.poker-count { display: flex; justify-content: space-between; align-items: baseline; gap: 4px; margin-top: 3px; font-size: 10px; line-height: 1.2; }
.poker-count span { color: var(--poker-table-soft-ink); white-space: nowrap; }
.poker-count b { min-width: 0; color: white; text-align: right; font-size: 11px; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.poker-hole { display: flex; justify-content: center; align-items: center; gap: 4px; min-height: 50px; margin-top: 6px; }
.poker-hole:empty::before { content: "Awaiting cards"; color: var(--poker-table-soft-ink); font-size: 10px; letter-spacing: .02em; text-align: center; }
.poker-bubble { position: relative; min-width: 0; margin-top: 8px; padding: 8px 10px; border-radius: 10px; background: var(--poker-table-bubble); color: var(--poker-table-bubble-ink); font-size: 12px; font-weight: 650; line-height: 1.35; overflow-wrap: anywhere; box-shadow: 0 3px 8px #061e3440; }
.poker-bubble::before { content: ""; position: absolute; top: -6px; left: 19px; border: 7px solid transparent; border-top: 0; border-bottom-color: var(--poker-table-bubble); }
.poker-bubble:empty { display: none; }
.poker-center { grid-column: 2; grid-row: 2; justify-self: center; align-self: center; width: min(100%, 530px); min-width: 0; text-align: center; }
.poker-street { color: var(--poker-table-soft-ink); font-size: 11px; font-weight: 800; letter-spacing: .13em; text-transform: uppercase; overflow-wrap: anywhere; }
.poker-board { display: flex; justify-content: center; align-items: center; gap: 6px; min-height: 100px; margin: 8px 0; }
.poker-board:empty::before { content: "COMMUNITY CARDS"; display: grid; place-items: center; min-height: 70px; width: min(100%, 325px); color: var(--poker-table-soft-ink); font-size: 10px; font-weight: 750; letter-spacing: .12em; overflow-wrap: anywhere; }
.poker-card { position: relative; display: block; flex: none; width: 58px; height: 82px; border: 1px solid #e4dbc9; border-radius: 6px; color: #1b2831; background: linear-gradient(148deg, #fff 0%, #fffdf5 65%, #e4dfd3 100%); box-shadow: 0 3px 6px #061c1770, inset 0 1px #fff; font-family: Georgia, serif; }
.poker-card[data-suit="♥"], .poker-card[data-suit="♦"], .poker-card[data-suit="h"], .poker-card[data-suit="d"], .poker-card[data-suit="H"], .poker-card[data-suit="D"], .poker-card[data-suit="hearts"], .poker-card[data-suit="diamonds"] { color: #bb2632; }
.poker-board .poker-card { width: min(68px, calc((100% - 24px) / 5)); height: auto; aspect-ratio: 53 / 75; }
.poker-hole .poker-card { width: min(48px, calc((100% - 4px) / 2)); height: auto; aspect-ratio: 53 / 75; border-radius: 5px; }
.poker-player .poker-hole .poker-card { width: min(64px, calc((100% - 4px) / 2)); }
/* A fine printed lattice and brass frame leave the original portrait prominent,
   even on the small face-down cards in the side seats. */
.poker-card.is-hidden {
  --poker-card-back-photo: url("assets/photo3.jpg");
  overflow: hidden;
  border: 2px solid #f5ecd6;
  background:
    repeating-linear-gradient(45deg, transparent 0 4px, #e6ca862b 4px 5px),
    repeating-linear-gradient(-45deg, transparent 0 4px, #e6ca862b 4px 5px),
    #17465f;
}
.poker-card.is-hidden::before {
  content: "";
  position: absolute;
  z-index: 1;
  top: 50%;
  left: 50%;
  width: 72%;
  aspect-ratio: 1;
  box-sizing: border-box;
  transform: translate(-50%, -50%);
  border: 1px solid #e2c37b;
  border-radius: 50%;
  background: #fff var(--poker-card-back-photo) center / cover no-repeat;
  box-shadow: 0 0 0 1px #163c53;
}
.poker-card.is-hidden::after {
  content: "";
  position: absolute;
  inset: 2px;
  border: 1px solid #d8bd7f;
  border-radius: 2px;
  pointer-events: none;
}
body[data-cardback="back-blue"] .poker-card.is-hidden {
  border-color: #f2d78e;
  background:
    repeating-linear-gradient(60deg, #e9d09142 0 1px, transparent 1px 7px),
    repeating-linear-gradient(-60deg, #e9d09142 0 1px, transparent 1px 7px),
    #2f7da1;
}
.poker-card.is-winning { border-color: #ffdf65; box-shadow: 0 0 0 3px #ffe66c, 0 3px 6px #061c1770; }
.poker-card.is-new { animation: pokerDeal var(--poker-deal-time, 260ms) cubic-bezier(.2,.75,.3,1) var(--poker-card-delay,0ms) both; }
.poker-card.is-turning { animation: pokerTurn var(--poker-deal-time, 260ms) cubic-bezier(.2,.75,.3,1) var(--poker-card-delay,0ms) both; }
body[data-poker-motion="off"] .poker-card:is(.is-new,.is-turning) { animation: none; }
.cosmetic-still .poker-seat { transition: none; }
@keyframes pokerDeal { from { opacity: 0; transform: translateY(-12px) rotate(-4deg); } to { opacity: 1; transform: none; } }
@keyframes pokerTurn { from { opacity: .36; transform: perspective(400px) rotateY(-82deg); } to { opacity: 1; transform: none; } }
.poker-pot-heading { display: flex; align-items: center; justify-content: center; gap: 8px; margin-top: 9px; }
.poker-pot-heading>div { display: flex; flex-direction: column; align-items: flex-start; min-width: 0; }
.poker-pot-heading span:not(.poker-chip-stack) { color: var(--poker-table-soft-ink); font-size: 9px; font-weight: 800; letter-spacing: .1em; }
.poker-pot-heading strong { font-size: 20px; line-height: 1.1; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.poker-chip-stack { position: relative; flex: none; width: 32px; height: 24px; }
.poker-chip-stack i { position: absolute; display: block; width: 25px; height: 10px; border: 2px dashed #fff1c8; border-radius: 50%; background: var(--poker-table-gold); box-shadow: 0 2px var(--poker-table-gold-deep); }
.poker-chip-stack i:nth-child(1) { left: 0; top: 12px; }.poker-chip-stack i:nth-child(2) { left: 4px; top: 6px; background: #72c8ed; }.poker-chip-stack i:nth-child(3) { left: 8px; top: 0; }
.poker-pots { display: grid; gap: 5px; margin-top: 9px; font-size: 11px; line-height: 1.35; }
.poker-pot { display: flex; justify-content: center; flex-wrap: wrap; gap: 3px 6px; padding: 6px 9px; border: 1px solid var(--poker-table-seat-border); border-radius: 8px; background: var(--poker-table-seat); overflow-wrap: anywhere; }
.poker-pot strong { color: var(--poker-table-gold); }.poker-pot span { color: var(--poker-table-ink); }
.poker-pending-bet { margin: 5px 0 0; color: var(--poker-table-soft-ink); font-size: 11px; line-height: 1.35; overflow-wrap: anywhere; }
.poker-pending-bet:empty { display: none; }
.poker-message { margin: 22px 0 8px; font-weight: 750; line-height: 1.5; text-align: center; overflow-wrap: anywhere; }
.poker-reward { margin: 5px 0 8px; color: var(--muted); text-align: center; font-size: 13px; line-height: 1.5; overflow-wrap: anywhere; }.poker-reward:empty { display: none; }
.poker-action-panel { margin-top: 15px; padding: 16px; border: 1px solid var(--line); border-radius: 17px; background: var(--card); }
.poker-action-intro { display: flex; align-items: center; justify-content: space-between; gap: 12px; }.poker-action-intro h3 { margin: 3px 0 0; font-size: 18px; }.poker-action-note { max-width: 270px; color: var(--muted); font-size: 12px; line-height: 1.35; text-align: right; }
.poker-bet-row { display: grid; grid-template-columns: minmax(125px, 1fr) minmax(150px, 2fr); gap: 3px 12px; align-items: center; margin-top: 13px; }.poker-bet-row label { font-size: 14px; font-weight: 750; }.poker-bet-row label span { display: block; color: var(--muted); font-size: 11px; font-weight: 500; }.poker-bet-input { display: flex; gap: 7px; min-width: 0; }.poker-bet-input input { width: 100%; min-width: 0; background: var(--panel); }.poker-bet-input button { flex: none; min-width: 65px; }.poker-bet-row small { grid-column: 2; min-width: 0; color: var(--muted); font-size: 11px; overflow-wrap: anywhere; }
.poker-actions { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 7px; margin-top: 13px; }.poker-actions button { min-width: 0; padding: 8px 5px; font-size: 13px; overflow-wrap: anywhere; background: var(--panel); }.poker-actions .poker-raise { color: #45370a; border-color: #be9a2d; background: linear-gradient(#fff0ad, #ffda57); }.poker-actions .poker-allin { color: #fff9ee; border-color: #78513f; background: #865541; }
.poker-sidebar { display: flex; flex-direction: column; gap: 16px; padding: 22px; }.poker-wallet .balance { margin: 5px 0 0; font-size: clamp(32px, 3vw, 44px); font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }.poker-wallet>span:not(.eyebrow) { font-size: 14px; }.poker-wallet .muted { margin: 5px 0; }.poker-wallet-note { margin: 9px 0 0; color: var(--muted); font-size: 12px; line-height: 1.5; }.poker-table-settings { padding: 16px 0 5px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }.poker-table-settings h3 { margin: 0 0 12px; font-size: 17px; }.poker-table-settings label { display: block; margin: 12px 0 5px; font-size: 13px; font-weight: 750; }.poker-table-settings select, .poker-table-settings input { width: 100%; min-width: 0; background: var(--card); }.poker-table-settings small { display: block; margin-top: 5px; color: var(--muted); font-size: 11px; }.poker-table-settings .primary { margin: 17px 0 9px; }.poker-secondary, .poker-reset { width: 100%; }.poker-table-settings .muted { margin: 8px 0; }.poker-guide { margin: 0; padding: 14px; border: 1px solid var(--line); border-radius: 13px; background: var(--card); }.poker-guide summary { font-size: 14px; line-height: 1.4; }.poker-guide-content { font-size: 13px; line-height: 1.55; }.poker-guide-content h3 { margin: 16px 0 6px; font-size: 15px; }.poker-guide-content p { margin: 8px 0; }.poker-guide-content ol { padding-left: 20px; }.poker-guide-content li { margin-bottom: 6px; }.poker-reset { margin-top: 0; }
.poker-custom-blinds { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.poker-custom-blinds[hidden] { display: none; }
.poker-custom-blinds label { margin: 12px 0 5px; font-size: 11px; }
.poker-custom-blinds input { padding: 9px; }
.poker-custom-blinds button, .poker-custom-blinds p { grid-column: 1 / -1; }
.poker-custom-blinds button { margin-top: 3px; }
.poker-custom-blinds p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.4; }
.poker-custom-blinds p:empty { display: none; }
.poker-challenges { grid-column: 1 / -1; }.poker-challenges h2 { font-size: 23px; }.poker-challenges>.muted { margin: 6px 0 12px; }#pokerChallenges { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }#pokerChallenges .bj-challenge { margin: 0; }
.poker-dialog-heading { display: flex; justify-content: space-between; align-items: center; gap: 12px; }.poker-dialog-heading h2 { margin: 0; }.poker-dialog-heading button { flex: none; width: 44px; }.poker-settings-actions { display: flex; gap: 8px; margin-top: 16px; }.poker-settings-actions button { flex: 1; }.poker-apply { border-color: #bc9a32; background: var(--gold); color: #45370a; }#pokerSettings form label { font-size: 14px; }#pokerSandboxError:empty, #pokerSandboxStatus:empty { display: none; }
@media (min-width: 851px) and (max-width: 1180px) {
  .poker-seat[data-seat="1"] .poker-seat-top, .poker-seat[data-seat="3"] .poker-seat-top { flex-direction: column; align-items: center; gap: 5px; }
  .poker-seat[data-seat="1"] .poker-seat-info, .poker-seat[data-seat="3"] .poker-seat-info { width: 100%; }
}
@media (max-width: 1050px) {
  .poker-layout { grid-template-columns: minmax(0, 1fr) 270px; }
  .poker-table { padding: 18px; }
  .poker-arena { grid-template-columns: minmax(0, 1fr) minmax(186px, 1.45fr) minmax(0, 1fr); gap: 12px 7px; padding: 40px; }
  .poker-seat { padding: 7px; }
  .poker-portrait { width: 39px; height: 39px; }
  .poker-name { font-size: 12px; }
  .poker-count { flex-wrap: wrap; }
  .poker-count span, .poker-count b { font-size: 10px; }
  .poker-board { flex-wrap: wrap; align-content: center; gap: 4px; min-height: 77px; }
  .poker-board .poker-card { width: clamp(42px, 5.2vw, 52px); }
}
@media (max-width: 850px) {
  .poker-layout { grid-template-columns: 1fr; }
  .poker-mobile-play { display: flex; align-items: center; gap: 12px; margin-top: 16px; }
  .poker-mobile-play .primary { flex: 0 0 165px; width: auto; min-height: 48px; margin: 0; }
  .poker-mobile-play p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.4; }
  .poker-sidebar { display: grid; grid-template-columns: 1fr 1fr; align-items: start; }
  .poker-sidebar>* { min-width: 0; }
  .poker-sidebar .paste-fries-dock, .poker-guide, .poker-sidebar .accolades-link, .poker-reset { grid-column: 1 / -1; }
  .poker-challenges { grid-column: auto; }
  .poker-table-settings { padding-top: 0; border-top: 0; }
  .poker-arena { grid-template-columns: minmax(0, 1fr) minmax(0, 1.45fr) minmax(0, 1fr); gap: 15px 12px; }
  .poker-seat { padding: 9px; }
  .poker-portrait { width: 47px; height: 47px; }
  .poker-name { font-size: 13px; }
  .poker-count { flex-wrap: wrap; }
}
@media (max-width: 700px) {
  .poker-arena { gap: 12px 6px; }
  .poker-seat[data-seat="1"] .poker-seat-top, .poker-seat[data-seat="3"] .poker-seat-top { flex-direction: column; align-items: center; gap: 5px; }
  .poker-seat[data-seat="1"] .poker-seat-info, .poker-seat[data-seat="3"] .poker-seat-info { width: 100%; }
  .poker-seat[data-seat="1"] .poker-hole .poker-card, .poker-seat[data-seat="3"] .poker-hole .poker-card { width: min(clamp(25px, 8.5vw, 42px), calc((100% - 4px) / 2)); }
  .poker-seat[data-seat="1"] .poker-bubble, .poker-seat[data-seat="3"] .poker-bubble { padding: 7px 6px; font-size: 11px; }
  .poker-board { --board-card-width: clamp(35px, 10vw, 50px); width: min(100%, calc(3 * var(--board-card-width) + 8px)); min-height: calc(2 * var(--board-card-width) * 75 / 53 + 4px); margin: 8px auto; }
  .poker-board .poker-card { width: min(var(--board-card-width), calc((100% - 8px) / 3)); }
}
@media (max-width: 560px) {
  .poker-page { padding: 20px 10px; }
  .poker-page nav { gap: 7px; margin: 18px 0; }
  .poker-page nav a { padding: 9px 10px; }
  .poker-table, .poker-sidebar, .poker-challenges { padding: 15px; border-radius: 20px; }
  .poker-heading { align-items: start; }
  .poker-heading .table-tools>button, .poker-heading .audio-control>button { width: 42px; height: 42px; min-width: 42px; min-height: 42px; }
  .poker-mobile-play .primary { flex-basis: 42%; padding: 8px; letter-spacing: .03em; }
  .poker-arena { --poker-side-seat-overhang: 10px; grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr) minmax(0, 1fr); grid-template-rows: auto minmax(190px, auto) auto; gap: 10px 4px; margin: 16px -6px 0; padding: 34px; }
  .poker-arena::before { border-width: 14px; border-radius: 20% / 80px; }
  .poker-arena::after { inset: 20px; border-radius: calc(20% - 12px) / 60px; }
  .poker-overhead { inset: 14px; border-radius: calc(20% - 8.4px) / 66px; }
  .poker-seat[data-seat="2"], .poker-seat[data-seat="0"] { width: min(245px, 60%); }
  .poker-seat[data-seat="1"], .poker-seat[data-seat="3"] { width: calc(100% + var(--poker-side-seat-overhang)); }
  .poker-seat[data-seat="1"] { margin-inline-start: calc(-1 * var(--poker-side-seat-overhang)); }
  .poker-seat[data-seat="3"] { margin-inline-end: calc(-1 * var(--poker-side-seat-overhang)); }
  .poker-seat { padding: 7px; }
  .poker-portrait { width: 38px; height: 38px; }
  .poker-name { font-size: 12px; }
  .poker-count { flex-wrap: wrap; }
  .poker-action-panel { padding: 12px; }
  .poker-action-note { max-width: 165px; }
  .poker-actions { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .poker-actions button { grid-column: span 2; }
  .poker-actions button:nth-last-child(-n+2) { grid-column: span 3; }
  .poker-bet-row { grid-template-columns: 1fr; }
  .poker-bet-row label span { display: inline; }
  .poker-bet-row small { grid-column: 1; }
  .poker-sidebar { grid-template-columns: 1fr; }
  .poker-sidebar>* { grid-column: 1!important; }
  .poker-table-settings { border-top: 1px solid var(--line); padding-top: 16px; }
  #pokerChallenges { grid-template-columns: 1fr; }
  .poker-settings-actions { flex-direction: column; }
}
@media (max-width: 360px) {
  .poker-arena { padding: 30px; }
  .poker-portrait { width: 31px; height: 31px; }
  .poker-seat-top { gap: 5px; }
  .poker-seat-status, .poker-count, .poker-count span, .poker-count b { font-size: 9px; }
  .poker-seat[data-seat="1"], .poker-seat[data-seat="3"] { padding: 5px; }
}

body[data-poker-motion="off"] .poker-card, body[data-poker-motion="off"] .poker-seat { animation: none; transition: none; }

/* Preserve the original seats around the community cards on portrait phones. */
@media (orientation: portrait) and (max-width: 850px) {
  .poker-page .poker-table { padding: clamp(5px, 1.7vw, 14px); }
  .poker-page .poker-heading :is(.eyebrow, .poker-subtitle) { display: none; }
  .poker-page .poker-arena {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.04fr) minmax(0, 1fr);
    grid-template-rows: auto minmax(clamp(140px, 25svh, 225px), auto) auto;
    padding: clamp(12px, 2.6svh, 25px) 7px; margin: 9px 0; gap: clamp(5px, 1.1svh, 12px) 3px;
  }
  .poker-page .poker-arena::before { border-width: 7px; }
  .poker-page .poker-arena::after, .poker-page .poker-overhead { inset: 8px; }
  .poker-page .poker-seat[data-seat] { padding: 5px; margin: 0; }
  .poker-page .poker-seat:is([data-seat="1"], [data-seat="3"]) { width: 100%; }
  .poker-page .poker-seat:is([data-seat="0"], [data-seat="2"]) {
    width: min(72%, 290px); display: grid; align-items: center;
    grid-template-columns: minmax(0,1fr) auto; gap: 4px;
  }
  .poker-page .poker-seat-top { gap: 3px; align-items: center; }
  .poker-page .poker-portrait { width: clamp(26px, 7.5vw, 43px); height: auto; aspect-ratio: 1; }
  .poker-page .poker-name { white-space: nowrap; font-size: clamp(11px, 3vw, 14px); }
  .poker-page .poker-seat-info { container-type: inline-size; }
  .poker-page .poker-name[data-long] { font-size: min(13px, 8.5cqw); }
  .poker-page .poker-player .poker-name[data-long] { font-size: min(13px, 6.8cqw); }
  .poker-page .poker-count { gap: 1px 3px; margin-top: 2px; }
  .poker-page .poker-count b, .poker-page .poker-pot-heading strong { white-space: nowrap; }
  .poker-page .poker-hole { min-height: 0; margin-top: 3px; gap: 2px; align-items: center; }
  .poker-page .poker-seat[data-seat] .poker-hole .poker-card {
    width: min(clamp(25px, 7.7vw, 43px), calc((100% - 2px) / 2)); height: auto; aspect-ratio: 53 / 75;
  }
  .poker-page .poker-seat:is([data-seat="0"], [data-seat="2"]) .poker-hole { width: clamp(64px, 20vw, 100px); }
  .poker-page .poker-seat:is([data-seat="0"], [data-seat="2"]) .poker-hole .poker-card { width: calc((100% - 2px) / 2); }
  .poker-page .poker-board { min-height: 40px; width: 100%; margin: 4px auto; gap: 3px; align-items: center; }
  .poker-page .poker-board:empty::before { min-height: 40px; }
  .poker-page .poker-board .poker-card { width: min(50px, calc((100% - 6px) / 3)); height: auto; aspect-ratio: 53 / 75; }
  .poker-page .poker-pot-heading { flex-wrap: wrap; gap: 3px; margin-top: 4px; }
  .poker-page .poker-pot-heading strong { font-size: 15px; }
  .poker-page .poker-draw-stack.card-deck { --draw-pile-width: clamp(21px, 5vw, 32px); margin-inline-end: 12%; }
  .poker-page .poker-mobile-play { margin: 5px 0; }
  .poker-page .poker-mobile-play p, .poker-page .poker-action-intro { display: none; }
  .poker-page .poker-mobile-play:has(button:disabled), .poker-page .poker-table:has(#pokerQuickPlay:enabled) .poker-action-panel { display: none; }
  .poker-page .poker-message, .poker-page .poker-reward { margin: 3px 0; font-size: 12px; line-height: 1.3; }
  .poker-page .poker-action-panel { margin: 5px 0 0; padding: 6px; }
  .poker-page .poker-bet-row { grid-template-columns: auto minmax(0,1fr); gap: 2px 6px; margin: 0; }
  .poker-page .poker-bet-row label { font-size: 12px; }
  .poker-page .poker-bet-row label span { display: block; }
  .poker-page .poker-bet-row small { grid-column: 1 / -1; }
  .poker-page .poker-bet-input :is(input,button) { min-height: 44px; padding: 4px; }
  .poker-page .poker-bet-input button { min-width: 44px; }
  .poker-page .poker-actions { display: grid; grid-template-columns: repeat(6,minmax(0,1fr)); gap: 4px; margin-top: 4px; }
  .poker-page .poker-actions button { grid-column: span 2; padding: 3px; min-height: 44px; font-size: 12px; overflow-wrap: normal; }
  .poker-page .poker-actions button:nth-last-child(-n+2) { grid-column: span 3; }
  .poker-table-notes details:not(:has(.poker-pot)) { display: none; }
  .poker-table-notes details { margin-top: 6px; }
  .poker-table-reactions .poker-bubble { background: var(--card); color: var(--text); }
  .poker-table-reactions .poker-bubble::before { position: static; content: attr(data-speaker) " · "; border: 0; }
}
