:root {
  color-scheme: light;
  --bg: #f1f5f3;
  --surface: #ffffff;
  --surface-2: #e8efec;
  --surface-3: #dce7e2;
  --text: #12201b;
  --muted: #63726c;
  --border: #cfdbd6;
  --green: #087a52;
  --green-strong: #056140;
  --green-soft: #d9f3e8;
  --gold: #d5a436;
  --red: #c84545;
  --red-soft: #fbe7e7;
  --felt: #08724e;
  --felt-deep: #034b34;
  --focus: #55b9ff;
  --shadow: 0 18px 48px rgba(9, 31, 22, 0.1);
  --radius: 16px;
  --header-h: 72px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

html[data-theme="dark"] {
  color-scheme: dark;
  --bg: #07100d;
  --surface: #0e1a16;
  --surface-2: #14241e;
  --surface-3: #1a2e26;
  --text: #edf6f1;
  --muted: #93a79e;
  --border: #263b33;
  --green: #1ec98b;
  --green-strong: #48dfa5;
  --green-soft: #12382b;
  --gold: #edbd56;
  --red: #ff7878;
  --red-soft: #3b2020;
  --felt: #087452;
  --felt-deep: #023f2d;
  --shadow: 0 22px 60px rgba(0, 0, 0, 0.32);
}

* { box-sizing: border-box; }
html { min-width: 320px; scroll-behavior: smooth; }
body { margin: 0; min-height: 100vh; background: var(--bg); color: var(--text); }
button, input { font: inherit; }
button { color: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button:focus-visible, a:focus-visible, input:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
h1, h2, h3, p { margin-top: 0; }
h1 { margin-bottom: 8px; font-size: clamp(1.8rem, 4vw, 2.75rem); letter-spacing: -0.045em; line-height: 1.05; }
h2 { margin-bottom: 6px; font-size: 1.15rem; letter-spacing: -0.02em; }
small { color: var(--muted); }

.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.skip-link { position: fixed; z-index: 100; top: 8px; left: 8px; padding: 10px 14px; border-radius: 8px; background: var(--text); color: var(--bg); transform: translateY(-160%); }
.skip-link:focus { transform: none; }
.muted { color: var(--muted); }
.positive { color: var(--green-strong) !important; }
.negative { color: var(--red) !important; }
.full-width { width: 100%; }

.app-header {
  position: sticky;
  z-index: 30;
  top: 0;
  display: grid;
  grid-template-columns: minmax(180px, 1fr) auto minmax(300px, 1fr);
  align-items: center;
  min-height: var(--header-h);
  padding: 10px clamp(16px, 3vw, 40px);
  border-bottom: 1px solid var(--border);
  background: color-mix(in srgb, var(--surface) 90%, transparent);
  backdrop-filter: blur(18px);
}

.brand { display: inline-flex; width: max-content; align-items: center; gap: 10px; color: var(--text); text-decoration: none; }
.brand-mark { display: grid; width: 40px; height: 40px; place-items: center; border: 1px solid color-mix(in srgb, var(--green) 50%, transparent); border-radius: 12px; background: linear-gradient(145deg, var(--green), var(--felt-deep)); color: white; font-size: 0.75rem; font-weight: 900; letter-spacing: -0.04em; box-shadow: inset 0 1px rgba(255,255,255,.22); }
.brand > span:last-child { display: grid; line-height: 1; }
.brand strong { font-size: 0.98rem; letter-spacing: 0.12em; }
.brand small { margin-top: 4px; font-size: 0.65rem; letter-spacing: 0.32em; }

.primary-nav { display: flex; gap: 4px; padding: 4px; border: 1px solid var(--border); border-radius: 14px; background: var(--surface-2); }
.nav-link { display: flex; align-items: center; gap: 7px; padding: 9px 14px; border: 0; border-radius: 10px; background: transparent; color: var(--muted); cursor: pointer; }
.nav-link:hover { color: var(--text); }
.nav-link.is-active { background: var(--surface); color: var(--text); box-shadow: 0 2px 12px rgba(0,0,0,.08); }
.nav-link.is-active span:first-child { color: var(--green); }

.header-actions { display: flex; justify-content: flex-end; align-items: center; gap: 8px; }
.balance { display: grid; min-width: 110px; margin-right: 8px; line-height: 1.15; text-align: right; }
.balance span { color: var(--muted); font-size: .72rem; }
.balance strong { margin-top: 4px; font-size: .92rem; }
.balance .balance-stale { color: var(--muted); font-size: .66rem; font-style: italic; }
.balance .balance-stale[hidden] { display: none; }
.connection-chip, .icon-button, .language-button, .avatar-button { border: 1px solid var(--border); background: var(--surface-2); cursor: pointer; }
.connection-chip { display: flex; align-items: center; gap: 8px; min-height: 38px; padding: 7px 11px; border-radius: 11px; font-size: .78rem; }
.status-dot { width: 8px; height: 8px; flex: 0 0 auto; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 4px color-mix(in srgb, var(--green) 16%, transparent); }
.connection-chip[data-state="offline"] .status-dot, .dialog-heading [data-state="offline"] { background: var(--red); }
.connection-chip[data-state="reconnecting"] .status-dot { background: var(--gold); animation: pulse 1s infinite; }
.icon-button, .language-button, .avatar-button { display: grid; width: 38px; height: 38px; place-items: center; border-radius: 11px; }
.language-button { font-size: .72rem; font-weight: 800; }
.avatar-button { border-color: color-mix(in srgb, var(--green) 45%, var(--border)); background: var(--green-soft); color: var(--green-strong); font-size: .72rem; font-weight: 900; }
.avatar-button img { width: 100%; height: 100%; border: 2px solid hsl(var(--avatar-button-hue, 156) 60% 48%); border-radius: inherit; object-fit: cover; }

main { min-height: calc(100vh - var(--header-h)); }
.view { width: min(1560px, 100%); margin-inline: auto; padding: clamp(24px, 4vw, 52px) clamp(16px, 4vw, 56px) 72px; }
.view[hidden] { display: none !important; }
.lobby-heading, .history-heading { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; margin-bottom: 34px; }
.lobby-heading p:not(.eyebrow), .history-heading p:not(.eyebrow) { max-width: 680px; margin-bottom: 0; color: var(--muted); }
.eyebrow { margin-bottom: 10px; color: var(--green-strong); font-size: .72rem; font-weight: 800; letter-spacing: .15em; text-transform: uppercase; }

.primary-button, .secondary-button, .back-button, .text-button { border: 0; cursor: pointer; }
.primary-button { display: inline-flex; min-height: 46px; align-items: center; justify-content: center; gap: 10px; padding: 11px 18px; border-radius: 12px; background: var(--green); color: #fff; font-weight: 800; box-shadow: 0 10px 24px color-mix(in srgb, var(--green) 22%, transparent); }
.primary-button:hover { background: var(--green-strong); }
.primary-button:disabled, .secondary-button:disabled, .quick-seat:disabled { cursor: not-allowed; filter: grayscale(.45); opacity: .48; box-shadow: none; }
.secondary-button { min-height: 40px; padding: 9px 14px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface-2); font-weight: 700; }
.secondary-button:hover { border-color: var(--green); color: var(--green-strong); }
.text-button { padding: 4px; background: transparent; color: var(--green-strong); font-weight: 700; }
.quick-seat { min-width: 235px; justify-content: flex-start; }
.quick-seat > span:first-child { font-size: 1.25rem; }
.quick-seat > span:last-child { display: grid; text-align: left; }
.quick-seat small { margin-top: 2px; color: rgba(255,255,255,.75); }

.lobby-product-tabs { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; margin: -10px 0 12px; padding: 7px; border: 1px solid var(--border); border-radius: 16px; background: var(--surface); box-shadow: var(--shadow); }
.lobby-product-tabs button { display: grid; min-height: 54px; place-content: center; gap: 2px; border: 1px solid transparent; border-radius: 11px; background: transparent; color: var(--muted); cursor: pointer; text-align: center; }
.lobby-product-tabs button span { font-size: .62rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.lobby-product-tabs button strong { color: var(--text); font-size: .9rem; }
.lobby-product-tabs button:hover { border-color: var(--border); background: var(--surface-2); }
.lobby-product-tabs button.is-active { border-color: color-mix(in srgb, var(--green) 40%, var(--border)); background: var(--green-soft); }
.lobby-product-tabs button.is-active strong { color: var(--green-strong); }
.lobby-product-tabs button[data-available="false"]::after { color: var(--gold); content: "Non disponibile"; font-size: .52rem; font-weight: 800; letter-spacing: .04em; }
.product-status { display: flex; align-items: center; gap: 12px; margin: 0 0 12px; padding: 13px 15px; border: 1px solid color-mix(in srgb, var(--gold) 42%, var(--border)); border-radius: 13px; background: color-mix(in srgb, var(--gold) 8%, var(--surface)); }
.product-status[hidden] { display: none; }
.product-status-icon { display: grid; width: 30px; height: 30px; flex: 0 0 auto; place-items: center; border-radius: 50%; background: color-mix(in srgb, var(--gold) 18%, transparent); color: var(--gold); font-weight: 900; }
.product-status strong { display: block; font-size: .82rem; }.product-status p { margin: 3px 0 0; color: var(--muted); font-size: .75rem; line-height: 1.45; }
.lobby-live-strip { display: flex; flex-wrap: wrap; gap: 10px 24px; margin-bottom: 22px; padding: 10px 14px; border: 1px solid var(--border); border-radius: 12px; background: color-mix(in srgb, var(--surface) 90%, transparent); color: var(--muted); font-size: .72rem; }
.lobby-live-strip span { display: flex; align-items: center; gap: 5px; }
.lobby-live-strip i { width: 7px; height: 7px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 4px color-mix(in srgb, var(--green) 14%, transparent); }
.lobby-live-strip strong { color: var(--text); }

.lobby-layout { display: grid; grid-template-columns: 230px minmax(0, 1fr); gap: 32px; align-items: start; }
.filter-panel { position: sticky; top: calc(var(--header-h) + 20px); padding: 20px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); }
.panel-heading, .section-heading { display: flex; justify-content: space-between; align-items: center; gap: 18px; }
.panel-heading h2 { margin: 0; }
.filter-panel fieldset { display: grid; gap: 10px; margin: 20px 0 0; padding: 18px 0 0; border: 0; border-top: 1px solid var(--border); }
.filter-panel legend { padding: 0; font-size: .75rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.choice, .switch-row { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: .88rem; cursor: pointer; }
.choice input { width: 16px; height: 16px; accent-color: var(--green); }
.switch-row { justify-content: space-between; }
.switch-row input { position: relative; width: 36px; height: 20px; margin: 0; appearance: none; border-radius: 999px; background: var(--surface-3); cursor: pointer; transition: background .2s; }
.switch-row input::after { position: absolute; top: 3px; left: 3px; width: 14px; height: 14px; border-radius: 50%; background: white; content: ""; box-shadow: 0 1px 4px rgba(0,0,0,.25); transition: transform .2s; }
.switch-row input:checked { background: var(--green); }
.switch-row input:checked::after { transform: translateX(16px); }
.filter-panel .secondary-button { margin-top: 22px; }

.lobby-content { min-width: 0; }
.section-heading { margin-bottom: 16px; }
.section-heading .eyebrow { margin-bottom: 5px; }
.section-heading h2 { margin-bottom: 0; }
.table-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 210px), 1fr)); gap: 14px; }
.table-card { min-width: 0; padding: 18px; overflow: hidden; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); transition: transform .2s, border-color .2s; }
.table-card:hover { border-color: color-mix(in srgb, var(--green) 55%, var(--border)); transform: translateY(-2px); }
.table-card[hidden] { display: none; }
.card-topline { display: flex; justify-content: space-between; align-items: center; }
.game-badge { display: inline-flex; padding: 5px 8px; border-radius: 6px; background: var(--green-soft); color: var(--green-strong); font-size: .68rem; font-style: normal; font-weight: 900; letter-spacing: .08em; }
.game-rule-strip { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 6px; }
.rule-badge { display: inline-flex; align-items: center; min-height: 24px; padding: 4px 8px; border: 1px solid var(--border); border-radius: 999px; background: var(--surface-2); color: var(--muted); font-size: .65rem; font-weight: 750; }
.live-count { color: var(--muted); font-size: .76rem; }
.live-count i { display: inline-block; width: 6px; height: 6px; margin-right: 3px; border-radius: 50%; background: var(--green); }
.table-card h3 { margin: 19px 0 2px; font-size: 1.15rem; }
.stakes { color: var(--muted); font-size: .84rem; }
.mini-table { position: relative; width: 84%; height: 98px; margin: 30px auto 34px; border: 9px solid color-mix(in srgb, var(--felt-deep) 62%, #26180b); border-radius: 50%; background: radial-gradient(ellipse at 50% 42%, color-mix(in srgb, var(--felt) 84%, white), var(--felt-deep)); box-shadow: inset 0 0 0 2px rgba(255,255,255,.13), inset 0 0 32px rgba(0,0,0,.2), 0 12px 24px rgba(0,0,0,.28); }
.mini-table::after { position: absolute; top: 50%; left: 50%; color: rgba(255,255,255,.2); content: ""; width: 46px; height: 46px; background: url("./assets/brand/fivepk-mark-transparent-256.webp") center / contain no-repeat; opacity: .3; transform: translate(-50%,-50%); }
.mini-table > .mini-seat { position: absolute; z-index: 2; display: grid; width: 44px; height: 44px; overflow: hidden; place-items: center; border: 3px solid var(--surface); border-radius: 50%; background: var(--green); color: var(--muted); font-size: 1rem; font-weight: 900; box-shadow: 0 5px 12px rgba(0,0,0,.4); }
.mini-table > .mini-seat:nth-child(1) { top: -24px; left: 18%; }.mini-table > .mini-seat:nth-child(2) { top: -24px; right: 18%; }.mini-table > .mini-seat:nth-child(3) { top: 34%; right: -24px; }.mini-table > .mini-seat:nth-child(4) { bottom: -24px; right: 18%; }.mini-table > .mini-seat:nth-child(5) { bottom: -24px; left: 18%; }.mini-table > .mini-seat:nth-child(6) { top: 34%; left: -24px; }
.mini-table > .mini-seat.empty { border-style: dashed; background: var(--surface-3); }
.mini-table > .mini-seat .mini-avatar { grid-area: auto; width: 100%; height: 100%; border: 0; }
.virtual-note, .human-note { display: flex; min-height: 35px; align-items: center; gap: 7px; margin: 0 0 13px; font-size: .72rem; }
.virtual-note { color: var(--gold); }.human-note { color: var(--green-strong); }
.virtual-note span:last-child, .human-note span:last-child { color: var(--muted); }

.all-tables { margin-top: 34px; }
.section-heading.compact { align-items: center; }
.search-field { display: flex; width: min(260px, 100%); align-items: center; gap: 8px; padding: 9px 12px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); color: var(--muted); }
.search-field input { width: 100%; border: 0; outline: 0; background: transparent; color: var(--text); }
.table-list { overflow: hidden; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); }
.table-list-head, .table-row { display: grid; grid-template-columns: 54px minmax(150px, 1.5fr) minmax(110px, .9fr) 78px 76px 110px 28px; gap: 12px; align-items: center; }
.table-list-head { padding: 11px 16px; border-bottom: 1px solid var(--border); background: var(--surface-2); color: var(--muted); font-size: .68rem; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; }
.table-row { width: 100%; padding: 14px 16px; border: 0; border-bottom: 1px solid var(--border); background: transparent; text-align: left; cursor: pointer; }
.table-row:last-of-type { border-bottom: 0; }
.table-row:hover { background: var(--surface-2); }
.table-row[hidden] { display: none; }
.table-row span:first-child { display: grid; }
.table-row small { margin-top: 3px; }
.table-row em { font-style: normal; }
.tag { display: inline-flex; width: max-content; padding: 5px 8px; border-radius: 6px; font-size: .68rem; font-weight: 700; }
.tag.virtual { background: color-mix(in srgb, var(--gold) 13%, transparent); color: var(--gold); }
.tag.human { background: var(--green-soft); color: var(--green-strong); }
.empty-state { padding: 28px; color: var(--muted); text-align: center; }
.room-browser { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; align-items: start; }
.room-browser .table-list { max-height: 660px; overflow: auto; }
.room-inspector { position: sticky; top: calc(var(--header-h) + 12px); display: grid; grid-template-columns: 1fr; gap: 14px; align-items: center; min-width: 0; padding: 18px; border: 1px solid var(--border); border-radius: var(--radius); background: linear-gradient(145deg, var(--surface), var(--surface-2)); box-shadow: var(--shadow); }
.room-inspector-heading h3 { margin: 0; font-size: 1.1rem; }
.room-inspector-heading .eyebrow { margin-bottom: 5px; }
.room-inspector-heading .tag { margin-top: 9px; }
.room-seat-map { position: relative; min-height: 300px; margin: 10px 18px; border: 14px solid color-mix(in srgb, var(--felt-deep) 66%, #27180c); border-radius: 50%; background: radial-gradient(ellipse at 50% 43%, color-mix(in srgb, var(--felt) 86%, white), var(--felt-deep)); box-shadow: inset 0 0 0 2px rgba(255,255,255,.14), inset 0 0 46px rgba(0,0,0,.25), 0 14px 34px rgba(0,0,0,.32); }
.room-seat-map::after { position: absolute; top: 50%; left: 50%; color: rgba(255,255,255,.22); content: "FIVE  PK"; transform: translate(-50%,-50%); font-size: clamp(.75rem, 1.4vw, 1.05rem); font-weight: 950; letter-spacing: .16em; white-space: nowrap; }
.room-seat { position: absolute; z-index: 2; top: var(--room-seat-y); left: var(--room-seat-x); display: grid; grid-template-columns: 62px minmax(62px,1fr); width: 146px; min-height: 69px; align-items: center; gap: 7px; padding: 5px 7px; border: 2px solid color-mix(in srgb, var(--green) 42%, var(--surface)); border-radius: 15px; background: rgba(5,17,13,.95); color: #fff; box-shadow: 0 8px 18px rgba(0,0,0,.42); transform: translate(-50%,-50%); font-size: .62rem; font-weight: 900; }
.room-seat .room-avatar { grid-area: auto; width: 60px; height: 60px; border: 3px solid hsl(var(--avatar-hue) 64% 58% / .7); }
.room-seat-copy { display: grid; min-width: 0; }
.room-seat-copy strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.room-seat-copy small { margin-top: 3px; color: #86e9c4; font-size: .58rem; white-space: nowrap; }
.room-seat-copy em { margin-top: 3px; color: var(--gold); font-size: .48rem; font-style: normal; letter-spacing: .08em; }
.room-seat.is-empty { display: grid; grid-template-columns: 1fr; width: 86px; min-height: 42px; place-items: center; border-style: dashed; background: rgba(5,29,21,.76); color: #acd5c5; cursor: pointer; font: inherit; text-align: center; transition: border-color .16s ease, background .16s ease, box-shadow .16s ease, transform .16s ease; }
.room-seat.is-empty:hover, .room-seat.is-empty:focus-visible { border-color: var(--gold); background: rgba(27,77,57,.94); color: #fff; box-shadow: 0 0 0 4px rgba(242,198,98,.18), 0 10px 24px rgba(0,0,0,.38); }
.room-seat.is-empty.is-selected { border-style: solid; border-color: var(--gold); background: linear-gradient(145deg,#3b6e54,#173d2e); color: #fff7d0; box-shadow: 0 0 0 4px rgba(242,198,98,.22), 0 12px 26px rgba(0,0,0,.42); }
.room-seat-map[data-seat-count="8"] .room-seat, .room-seat-map[data-seat-count="9"] .room-seat, .room-seat-map[data-seat-count="10"] .room-seat { grid-template-columns: 41px minmax(34px,1fr); width: 92px; min-height: 54px; gap: 4px; padding: 3px; border-radius: 10px; font-size: .5rem; }
.room-seat-map[data-seat-count="8"] .room-avatar, .room-seat-map[data-seat-count="9"] .room-avatar, .room-seat-map[data-seat-count="10"] .room-avatar { grid-area: auto; width: 40px; height: 40px; border-width: 2px; }
.room-seat-map[data-seat-count="8"] .room-seat-copy small, .room-seat-map[data-seat-count="9"] .room-seat-copy small, .room-seat-map[data-seat-count="10"] .room-seat-copy small { margin-top: 1px; font-size: .45rem; }
.room-seat-map[data-seat-count="8"] .room-seat-copy em, .room-seat-map[data-seat-count="9"] .room-seat-copy em, .room-seat-map[data-seat-count="10"] .room-seat-copy em { margin-top: 1px; font-size: .38rem; }
.room-seat-map[data-seat-count="8"] .room-seat.is-empty, .room-seat-map[data-seat-count="9"] .room-seat.is-empty, .room-seat-map[data-seat-count="10"] .room-seat.is-empty { width: 58px; min-height: 34px; padding: 3px; }
.room-metrics { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 0; }
.room-metrics div { padding: 9px; border: 1px solid var(--border); border-radius: 9px; background: color-mix(in srgb, var(--surface) 74%, transparent); }
.room-metrics dt { color: var(--muted); font-size: .62rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.room-metrics dd { margin: 4px 0 0; font-size: .78rem; font-weight: 800; }
.room-disclosure { grid-column: 1 / -1; margin: 0; color: var(--muted); font-size: .72rem; }
.room-inspector .primary-button { min-height: 48px; }
.room-inspector.is-competition .room-seat-map, .room-inspector.is-competition .room-metrics { display: none; }
.competition-card { display: grid; gap: 12px; padding: 15px; border: 1px solid color-mix(in srgb, #4ca6ff 34%, var(--border)); border-radius: 14px; background: linear-gradient(145deg, color-mix(in srgb, #4ca6ff 9%, var(--surface)), var(--surface)); }
.competition-card[hidden] { display: none; }
.competition-identity { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-bottom: 11px; border-bottom: 1px solid var(--border); }
.competition-identity span { color: var(--muted); font-size: .62rem; font-weight: 900; letter-spacing: .09em; }
.competition-identity strong { color: #4ca6ff; font-size: .82rem; }
.competition-card dl { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin: 0; }
.competition-card dl div { min-width: 0; padding: 9px; border-radius: 9px; background: color-mix(in srgb, var(--surface-2) 85%, transparent); }
.competition-card dt { color: var(--muted); font-size: .58rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.competition-card dd { overflow: hidden; margin: 4px 0 0; font-size: .76rem; font-weight: 800; text-overflow: ellipsis; }
.competition-card p { margin: 0; color: var(--muted); font-size: .72rem; line-height: 1.5; }
.table-row.is-selected { background: var(--green-soft); box-shadow: inset 3px 0 var(--green); }
.table-row .room-id { color: var(--muted); font-variant-numeric: tabular-nums; }
.tag.registration { background: color-mix(in srgb, #4ca6ff 14%, transparent); color: #4ca6ff; }
.tag.running { background: color-mix(in srgb, var(--gold) 13%, transparent); color: var(--gold); }
.tag.scheduled { background: var(--surface-3); color: var(--muted); }

.leaderboard-panel { padding: 22px; border: 1px solid var(--border); border-radius: var(--radius); background: linear-gradient(145deg, var(--surface), var(--surface-2)); box-shadow: var(--shadow); }
.leaderboard-panel[hidden] { display: none; }
.leaderboard-intro { margin: -5px 0 17px; color: var(--muted); font-size: .78rem; }
.leaderboard-list { overflow: hidden; border: 1px solid var(--border); border-radius: 13px; }
.leaderboard-head, .leaderboard-row { display: grid; grid-template-columns: 44px minmax(140px, 1.4fr) repeat(3, minmax(70px, .55fr)) minmax(110px, .8fr); gap: 12px; align-items: center; padding: 12px 15px; }
.leaderboard-head { background: var(--surface-2); color: var(--muted); font-size: .64rem; font-weight: 900; letter-spacing: .06em; text-transform: uppercase; }
.leaderboard-row { border-top: 1px solid var(--border); font-size: .78rem; }
.leaderboard-row strong { display: block; }.leaderboard-row small { color: var(--muted); }
.leaderboard-row .leaderboard-rank { color: var(--gold); font-size: 1rem; font-weight: 950; }
.leaderboard-row .leaderboard-prize { color: var(--green-strong); font-weight: 900; }

@media (max-width: 700px) {
  .leaderboard-list { overflow-x: auto; }
  .leaderboard-head, .leaderboard-row { min-width: 650px; }
}

.table-view { width: 100%; max-width: none; padding: 0 24px 40px; }
.table-toolbar { display: grid; grid-template-columns: 1fr auto 1fr; min-height: 76px; align-items: center; border-bottom: 1px solid var(--border); }
.table-toolbar > div:nth-child(2) { text-align: center; }
.table-toolbar h1 { margin: 0; font-size: 1.15rem; letter-spacing: -.02em; }
.table-toolbar p { margin: 4px 0 0; color: var(--muted); font-size: .75rem; }
.back-button { display: flex; width: max-content; align-items: center; gap: 8px; padding: 8px; background: transparent; color: var(--muted); }
.table-toolbar-actions { display: flex; justify-content: flex-end; gap: 8px; }
.fullscreen-button[aria-pressed="true"] { border-color: var(--green); background: var(--green-soft); color: var(--green-strong); }
.disclosure-banner { display: flex; max-width: 1180px; align-items: center; gap: 12px; margin: 14px auto; padding: 10px 14px; border: 1px solid color-mix(in srgb, var(--gold) 38%, var(--border)); border-radius: 12px; background: color-mix(in srgb, var(--gold) 9%, var(--surface)); }
.disclosure-banner[hidden], .pot-chip-stack[hidden], .hero-cards[hidden] { display: none !important; }
.disclosure-banner .disclosure-icon, .dialog-heading .disclosure-icon { display: grid; width: 30px; height: 30px; flex: 0 0 auto; place-items: center; border-radius: 9px; background: color-mix(in srgb, var(--gold) 18%, transparent); color: var(--gold); font-weight: 900; }
.disclosure-banner div { min-width: 0; flex: 1; }
.disclosure-banner strong { display: block; font-size: .76rem; }
.disclosure-banner p { margin: 2px 0 0; color: var(--muted); font-size: .72rem; }
.disclosure-banner .text-button { font-size: .72rem; white-space: nowrap; }
.table-session-banner { display: flex; max-width: 1180px; align-items: center; justify-content: center; gap: 10px; margin: 10px auto; padding: 10px 14px; border: 1px solid color-mix(in srgb, var(--gold) 45%, var(--border)); border-radius: 12px; background: color-mix(in srgb, var(--gold) 11%, var(--surface)); text-align: center; }
.table-session-banner[hidden] { display: none; }
.table-session-banner strong { color: var(--gold); }
.table-session-banner span { color: var(--muted); font-size: .76rem; }

.game-layout { position: relative; display: grid; grid-template-columns: minmax(0, 1fr); gap: 0; width: 100%; max-width: 1840px; margin-inline: auto; }
.poker-shell { position: relative; min-width: 0; padding: 12px; border: 1px solid color-mix(in srgb, var(--green) 20%, var(--border)); border-radius: 22px; background: linear-gradient(155deg, color-mix(in srgb, var(--surface) 94%, #392617), var(--surface)); box-shadow: 0 24px 70px rgba(0,0,0,.26); }
.hand-meta { display: flex; justify-content: space-between; padding: 3px 7px 10px; color: var(--muted); font-size: .7rem; }
.poker-table { position: relative; min-height: clamp(540px, calc(100dvh - 280px), 760px); overflow: hidden; border: 1px solid rgba(255,255,255,.08); border-radius: 18px; background: radial-gradient(ellipse at 50% 44%, #23382f 0 34%, #121c18 68%, #080d0b 100%); box-shadow: inset 0 0 120px rgba(0,0,0,.58), 0 1px 0 rgba(255,255,255,.07); isolation: isolate; }
.poker-table::before { position: absolute; inset: 0; z-index: -1; opacity: .22; background: radial-gradient(circle at 50% 6%, rgba(255,244,205,.45), transparent 27%), repeating-linear-gradient(115deg, transparent 0 34px, rgba(255,255,255,.045) 35px, transparent 36px); content: ""; }
.poker-table::after { position: absolute; inset: 8% 5%; z-index: -1; border-radius: 50%; background: radial-gradient(ellipse at 50% 42%, #16966e 0%, #087653 55%, #04553c 100%); box-shadow: inset 0 0 70px rgba(0,0,0,.22); content: ""; }
.felt-ring { position: absolute; z-index: 0; inset: 7% 4%; border: clamp(16px, 2.4vw, 30px) solid transparent; border-radius: 50%; background: linear-gradient(#0b1813,#0b1813) padding-box, linear-gradient(145deg,#533925 0%,#161d19 28%,#6a4b30 52%,#131916 78%,#4c3423 100%) border-box; box-shadow: inset 0 0 0 2px rgba(255,255,255,.13), inset 0 0 34px rgba(0,0,0,.55), 0 18px 42px rgba(0,0,0,.58); }
.felt-ring::after { position: absolute; inset: 9px; border: 2px solid rgba(104,245,195,.18); border-radius: inherit; content: ""; box-shadow: 0 0 18px rgba(78,220,170,.12); }
.table-brand { position: absolute; z-index: 1; top: 54%; left: 50%; display: grid; color: rgba(255,255,255,.12); transform: translate(-50%,-50%); text-align: center; line-height: .78; letter-spacing: .04em; }
.table-brand span, .table-brand strong { font-size: clamp(1.4rem,4.6vw,4rem); font-weight: 950; }
.table-brand strong { margin-left: .55em; }
.pot-display { position: absolute; top: 30%; left: 50%; display: grid; transform: translateX(-50%); text-align: center; text-shadow: 0 2px 10px rgba(0,0,0,.6); }
.pot-display span { color: rgba(255,255,255,.68); font-size: .68rem; letter-spacing: .09em; text-transform: uppercase; }
.pot-display strong { margin-top: 4px; color: #fff; font-size: 1rem; }
.board { position: absolute; top: 43%; left: 50%; display: flex; gap: 5px; transform: translate(-50%, -50%); }
.showdown-banner { position: absolute; z-index: 12; top: 50%; left: 50%; display: grid; width: min(520px, calc(100% - 24px)); max-height: calc(100% - 24px); overflow-y: auto; gap: 6px; padding: 18px; border: 2px solid #f2c662; border-radius: 18px; background: linear-gradient(160deg, rgba(5,28,21,.98), rgba(9,16,14,.98)); color: #fff; box-shadow: 0 18px 60px rgba(0,0,0,.72), 0 0 0 999px rgba(0,0,0,.28); transform: translate(-50%, -50%); text-align: center; }
.showdown-banner[hidden] { display: none; }
.showdown-banner > span { color: #f2c662; font-size: .72rem; font-weight: 900; letter-spacing: .16em; text-transform: uppercase; }
.showdown-banner > strong { font-size: clamp(1.45rem, 4vw, 2.25rem); line-height: 1.05; text-transform: uppercase; }
.showdown-banner > b { color: #5ce0ae; font-size: clamp(1.05rem, 3vw, 1.45rem); }
.showdown-banner > small { color: #c4d5ce; font-size: .72rem; }
.showdown-hands { display: grid; gap: 7px; margin-top: 4px; }
.showdown-hand { display: grid; grid-template-columns: minmax(72px, 1fr) auto minmax(94px, 1fr); align-items: center; gap: 8px; padding: 7px 9px; border: 1px solid rgba(255,255,255,.13); border-radius: 10px; background: rgba(255,255,255,.05); text-align: left; }
.showdown-hand.is-winner { border-color: rgba(92,224,174,.72); background: rgba(92,224,174,.1); }
.showdown-hand > strong { overflow: hidden; font-size: .76rem; text-overflow: ellipsis; white-space: nowrap; }
.showdown-card-row { display: flex; gap: 3px; }
.showdown-card-row .playing-card { width: 29px; padding: 3px; border-radius: 5px; }
.showdown-card-row .playing-card b, .showdown-card-row .playing-card i { font-size: .68rem; }
.showdown-hand > small { color: #d7e4df; font-size: .66rem; text-align: right; }
.showdown-next { justify-self: center; min-width: 190px; margin-top: 4px; }
.playing-card { display: grid; width: clamp(34px, 4.2vw, 54px); aspect-ratio: .7; align-content: space-between; padding: 5px; border: 1px solid #d9dedc; border-radius: 7px; background: #f8faf9; color: #17221e; box-shadow: 0 5px 12px rgba(0,0,0,.25); font-style: normal; line-height: 1; }
.playing-card b { font-size: clamp(.78rem, 1.6vw, 1.15rem); }.playing-card i { font-size: clamp(.75rem, 1.6vw, 1.1rem); font-style: normal; }
.playing-card.red { color: #c8333f; }.playing-card.placeholder { opacity: .18; background: repeating-linear-gradient(45deg, #fff 0 3px, #c5d3ce 3px 6px); }

.table-seats { position: absolute; inset: 0; z-index: 3; pointer-events: none; }
.seat { position: absolute; z-index: 1; top: var(--seat-y); left: var(--seat-x); display: grid; grid-template-columns: 86px minmax(90px, 1fr); grid-template-areas: "avatar copy" "move move"; width: clamp(206px, 19vw, 236px); min-height: 98px; align-items: center; gap: 2px 10px; padding: 7px 10px; border: 1px solid rgba(255,255,255,.24); border-radius: 20px; background: linear-gradient(145deg,rgba(7,20,16,.97),rgba(2,10,8,.94)); color: #fff; box-shadow: 0 12px 28px rgba(0,0,0,.48), inset 0 1px rgba(255,255,255,.06); transform: translate(-50%, -50%); pointer-events: auto; }
.seat-avatar { position: relative; grid-area: avatar; display: grid; width: 84px; height: 84px; overflow: hidden; place-items: center; border: 4px solid hsl(var(--avatar-hue) 64% 58% / .72); border-radius: 50%; background: linear-gradient(145deg, hsl(var(--avatar-hue) 34% 38%), hsl(var(--avatar-hue) 38% 20%)); color: #fff; font-size: .82rem; font-weight: 900; box-shadow: 0 6px 19px rgba(0,0,0,.42); isolation: isolate; }
.seat-avatar .generated-avatar { position: absolute; z-index: 1; inset: 0; display: block; width: 100%; height: 100%; }
.seat-avatar.has-generated .avatar-fallback { opacity: 0; }
.seat-avatar picture, .seat-avatar img { position: absolute; inset: 0; width: 100%; height: 100%; }
.seat-avatar picture { z-index: 2; opacity: 0; transition: opacity .18s ease; }
.seat-avatar img { display: block; object-fit: cover; }
.seat-avatar.has-image picture { opacity: 1; }
.seat-avatar[data-avatar-frame="copper"] { border-color: #d68b54; box-shadow: 0 0 0 2px #f0c29b, 0 6px 19px rgba(0,0,0,.42); }
.seat-avatar[data-avatar-frame="emerald"] { border-color: #43a982; box-shadow: 0 0 0 2px #8bdfbd, 0 6px 19px rgba(0,0,0,.42); }
.seat-avatar[data-avatar-frame="platinum"] { border-color: #c4cecc; box-shadow: 0 0 0 2px #f4f8f7, 0 6px 19px rgba(0,0,0,.42); }
.seat-avatar[data-avatar-aura="pulse"]::after, .seat-avatar[data-avatar-aura="orbit"]::after { content: ""; position: absolute; z-index: -1; inset: -9px; border: 2px solid hsl(var(--avatar-hue) 64% 58% / .42); border-radius: 50%; pointer-events: none; }
.seat-avatar[data-avatar-aura="pulse"]::after { animation: avatar-pulse 2.8s ease-out infinite; }
.seat-avatar[data-avatar-aura="orbit"]::after { border-color: transparent hsl(var(--avatar-hue) 70% 58% / .75); animation: avatar-orbit 6s linear infinite; }
@keyframes avatar-pulse { 0%, 45% { transform: scale(.92); opacity: .7; } 100% { transform: scale(1.18); opacity: 0; } }
@keyframes avatar-orbit { to { transform: rotate(360deg); } }
.avatar-fallback { position: relative; z-index: 0; }
.seat-presence { position: absolute; z-index: 2; right: 2px; bottom: 2px; width: 9px; height: 9px; border: 2px solid #10251d; border-radius: 50%; background: #8d9c96; }
.seat-copy { grid-area: copy; display: grid; min-width: 0; }
.seat-copy strong { overflow: hidden; font-size: .88rem; line-height: 1.15; text-overflow: ellipsis; white-space: nowrap; }.seat-copy small { margin-top: 5px; color: #87e8c3; font-size: .76rem; font-variant-numeric: tabular-nums; white-space: nowrap; }
.seat em { grid-area: move; max-width: 100%; min-height: 16px; overflow: hidden; justify-self: center; color: #f2c662; font-size: .64rem; font-style: normal; text-overflow: ellipsis; white-space: nowrap; }
.seat.is-active { border-color: var(--gold); box-shadow: 0 0 0 2px rgba(237,189,86,.2), 0 8px 20px rgba(0,0,0,.3); }
.seat.is-folded { border-style: dashed; background: rgba(16, 27, 23, .92); }.seat.is-folded .seat-avatar { filter: grayscale(1); opacity: .62; }.seat.is-folded .seat-copy strong { color: #bdc8c3; }
.seat.is-hero { border-color: #43dfa8; background: rgba(3, 43, 31, .96); }
.seat.is-all-in { border-color: #e79062; box-shadow: 0 0 0 2px rgba(231,144,98,.18), 0 8px 20px rgba(0,0,0,.3); }.seat.is-all-in em { color: #ffb58d; font-weight: 800; }
.seat.is-offline .seat-avatar picture, .seat.is-offline .seat-avatar .generated-avatar { filter: grayscale(1); }.seat.is-offline:not(.is-active) { border-color: rgba(183,196,190,.35); }
.seat.is-auto-acting { border-color: #f2c662; box-shadow: 0 0 0 3px rgba(242,198,98,.3), 0 9px 26px rgba(0,0,0,.42); }
.seat-action-bubble { position: absolute; z-index: 5; bottom: -25px; left: 50%; min-width: max-content; padding: 5px 9px; border: 1px solid rgba(255,255,255,.28); border-radius: 999px; background: #f2c662; color: #182019; box-shadow: 0 5px 14px rgba(0,0,0,.32); transform: translateX(-50%); font-size: .65rem; font-weight: 900; animation: bot-action-pop .22s ease-out both; }
.seat-wager { position: absolute; z-index: 7; top: calc(100% + 7px); left: 50%; display: flex; min-width: max-content; align-items: center; gap: 5px; transform: translateX(-50%); color: #fff; filter: drop-shadow(0 4px 4px rgba(0,0,0,.65)); font-size: .66rem; font-variant-numeric: tabular-nums; pointer-events: none; }
.seat.is-lower-half .seat-wager { top: auto; bottom: calc(100% + 7px); }
.seat-wager b { padding: 2px 6px; border-radius: 999px; background: rgba(0,0,0,.68); font-size: inherit; white-space: nowrap; }
.chip-stack { position: relative; display: block; width: 27px; height: 24px; }
.chip-stack i { position: absolute; right: 2px; bottom: 0; width: 22px; height: 8px; border: 2px dashed rgba(255,255,255,.9); border-radius: 50%; background: radial-gradient(ellipse at 45% 38%, #f5d46d 0 22%, #c58b12 24% 62%, #724807 64%); box-shadow: 0 2px 1px rgba(0,0,0,.45); }
.chip-stack i:nth-child(2) { bottom: 5px; background: radial-gradient(ellipse at 45% 38%, #e9fff7 0 20%, #2ab88b 22% 62%, #07533e 64%); }
.chip-stack i:nth-child(3) { bottom: 10px; background: radial-gradient(ellipse at 45% 38%, #f7f7ff 0 20%, #4d76d1 22% 62%, #183064 64%); }
.chip-stack i:nth-child(4) { bottom: 15px; background: radial-gradient(ellipse at 45% 38%, #fff1f1 0 20%, #d54b55 22% 62%, #6d171e 64%); }
.seat.is-empty { display: grid; min-height: 60px; place-items: center; border-style: dashed; background: rgba(6, 39, 28, .5); }
.seat.is-empty button { width: 100%; min-height: 42px; border: 0; border-radius: 14px; background: transparent; color: #c7eadd; cursor: pointer; font-size: .72rem; font-weight: 800; }
.seat.is-empty button:hover, .seat.is-empty button:focus-visible { background: rgba(67,223,168,.14); color: #fff; outline: 2px solid var(--green); outline-offset: 2px; }
.seat.is-empty.is-unavailable { pointer-events: none; opacity: .62; }
.seat-empty-label { color: #a9c2b8; font-size: .7rem; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; }
.opponent-cards { position: absolute; z-index: 3; top: -23px; left: 50%; display: flex; align-items: flex-end; transform: translateX(-50%) rotate(-2deg); filter: drop-shadow(0 4px 5px rgba(0,0,0,.35)); }
.card-back { display: block; width: 21px; aspect-ratio: .7; border: 2px solid #eef5f2; border-radius: 4px; background-color: #183f65; background-image: linear-gradient(45deg, rgba(255,255,255,.18) 25%, transparent 25% 75%, rgba(255,255,255,.18) 75%), linear-gradient(-45deg, rgba(72,220,173,.28) 25%, transparent 25% 75%, rgba(72,220,173,.28) 75%); background-position: 0 0, 3px 3px; background-size: 6px 6px; box-shadow: inset 0 0 0 1px rgba(6,17,31,.65); }
.card-back + .card-back { margin-left: -9px; transform: rotate(8deg) translateY(-1px); }
.opponent-cards[data-card-count="4"] .card-back + .card-back { margin-left: -12px; }
.opponent-cards[data-card-count="4"] .card-back:nth-child(2) { transform: rotate(4deg) translateY(-2px); }
.opponent-cards[data-card-count="4"] .card-back:nth-child(3) { transform: rotate(8deg) translateY(-3px); }
.opponent-cards[data-card-count="4"] .card-back:nth-child(4) { transform: rotate(12deg) translateY(-1px); }
.dealer-button { position: absolute; top: -10px; left: -8px; display: grid; width: 20px; height: 20px; place-items: center; border: 2px solid #d9c58e; border-radius: 50%; background: #f5edd6; color: #3d3420; font-size: .6rem; font-weight: 900; }
.seat-timer { position: absolute; inset: -3px; z-index: -1; border: 2px solid var(--gold); border-radius: 13px; clip-path: inset(0 0 0 0); animation: timer var(--turn-duration, 30s) linear 1 both; pointer-events: none; }
.seat-turn-countdown { position: absolute; z-index: 9; right: -10px; bottom: -13px; min-width: 33px; padding: 3px 7px; border: 1px solid rgba(255,255,255,.42); border-radius: 999px; background: #17191d; color: #eff873; box-shadow: 0 4px 12px rgba(0,0,0,.48); font-size: .68rem; font-weight: 900; font-variant-numeric: tabular-nums; text-align: center; }
.table-seats[data-seat-count="8"] .seat, .table-seats[data-seat-count="9"] .seat, .table-seats[data-seat-count="10"] .seat { width: clamp(150px, 14vw, 176px); min-height: 74px; grid-template-columns: 60px minmax(64px, 1fr); gap: 0 7px; padding: 5px 7px; }
.table-seats[data-seat-count="8"] .seat-avatar, .table-seats[data-seat-count="9"] .seat-avatar, .table-seats[data-seat-count="10"] .seat-avatar { width: 58px; height: 58px; }
.hero-cards { position: absolute; top: 66%; left: 50%; display: flex; transform: translateX(-50%) rotate(-5deg); }
.hero-cards .playing-card { width: clamp(36px, 4.5vw, 50px); }.hero-cards .playing-card + .playing-card { margin-left: -18px; transform: rotate(8deg) translateY(-3px); }
.hero-cards .playing-card.is-selected-for-draw { outline: 3px solid #ffd45c; outline-offset: 2px; transform: translateY(-16px) rotate(0deg); cursor: pointer; }
.opponent-cards .stud-up-card { width: 22px; min-width: 22px; height: 31px; margin-left: -8px; font-size: .56rem; }
.hero-cards[data-card-count="4"] .playing-card + .playing-card { margin-left: -22px; }
.hero-cards[data-card-count="4"] .playing-card:nth-child(2) { transform: rotate(3deg) translateY(-4px); }
.hero-cards[data-card-count="4"] .playing-card:nth-child(3) { transform: rotate(8deg) translateY(-5px); }
.hero-cards[data-card-count="4"] .playing-card:nth-child(4) { transform: rotate(13deg) translateY(-3px); }

.action-panel { position: relative; padding: 14px 6px 2px; }
.action-panel.is-submitting::before { position: absolute; z-index: 8; top: 7px; right: 7px; max-width: calc(100% - 14px); padding: 6px 10px; border: 1px solid color-mix(in srgb, var(--green) 55%, var(--border)); border-radius: 999px; background: color-mix(in srgb, var(--surface) 90%, transparent); color: var(--green-strong); content: attr(data-pending-label); font-size: .66rem; font-weight: 850; box-shadow: var(--shadow); }
.action-context { display: flex; align-items: center; gap: 24px; margin-bottom: 12px; }
.action-context > span { display: grid; }
.action-context span span { color: var(--muted); font-size: .66rem; }
.action-context strong { margin-top: 2px; font-size: .78rem; }.action-context .turn-time { margin-left: auto; text-align: right; }.turn-time strong { color: var(--gold); }
.bet-control { display: grid; grid-template-columns: minmax(220px, 1fr) auto; gap: 16px; align-items: end; margin-bottom: 12px; }
.bet-control label { display: flex; justify-content: space-between; margin-bottom: 6px; color: var(--muted); font-size: .68rem; }
.bet-control output { color: var(--text); font-weight: 800; }
.bet-control input[type="range"] { width: 100%; accent-color: var(--green); }
.bet-presets { display: flex; gap: 5px; }
.bet-presets button { min-height: 32px; padding: 6px 9px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface-2); color: var(--muted); cursor: pointer; font-size: .67rem; }
.bet-presets button:hover { border-color: var(--green); color: var(--text); }
.action-buttons { display: grid; grid-template-columns: repeat(3, 1fr); gap: 9px; }
.action-button { position: relative; min-height: 58px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface-2); cursor: pointer; font-weight: 850; }
.action-button:hover { transform: translateY(-1px); filter: brightness(1.06); }
.action-button:disabled, .bet-presets button:disabled, .bet-control input:disabled { cursor: not-allowed; filter: grayscale(.55); opacity: .42; transform: none; }
.action-button.fold { border-color: color-mix(in srgb, var(--red) 45%, var(--border)); background: var(--red-soft); color: var(--red); }
.action-button.check { background: var(--surface-3); }.action-button.raise { border-color: var(--green); background: var(--green); color: white; }
.action-button > span { display: grid; }.action-button small { margin-top: 2px; color: currentColor; opacity: .72; }
.action-button kbd { position: absolute; top: 6px; right: 8px; opacity: .48; font: 600 .58rem/1 ui-monospace, monospace; }

.pre-action-panel { padding: 12px 6px 2px; }
.pre-action-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 9px; }
.pre-action-heading strong { color: var(--gold); font-size: .78rem; text-transform: uppercase; letter-spacing: .08em; }
.pre-action-heading span { color: var(--muted); font-size: .66rem; }
.pre-action-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 8px; }
.pre-action-grid button { min-height: 48px; padding: 8px; border: 1px solid color-mix(in srgb, var(--border) 80%, #fff); border-radius: 10px; background: linear-gradient(#44434d,#2c2b33); color: #f5f5f7; cursor: pointer; font-size: .75rem; font-weight: 800; box-shadow: inset 0 1px rgba(255,255,255,.08), 0 5px 14px rgba(0,0,0,.22); }
.pre-action-grid button:hover, .pre-action-grid button:focus-visible { border-color: var(--gold); outline: none; }
.pre-action-grid button.is-selected, .pre-action-grid button[aria-pressed="true"] { border-color: #5bd8a8; background: linear-gradient(#17694f,#0b4936); color: #dffff2; box-shadow: 0 0 0 2px rgba(91,216,168,.18); }

.table-side-panel { position: absolute; z-index: 12; bottom: 132px; left: 24px; display: none; width: clamp(235px, 19vw, 310px); max-height: 245px; overflow: hidden; border: 1px solid rgba(255,255,255,.2); border-radius: 13px; background: color-mix(in srgb, var(--surface) 91%, transparent); box-shadow: 0 18px 48px rgba(0,0,0,.5); backdrop-filter: blur(14px); }
.table-side-panel.is-open { display: block; }
.side-tabs { display: grid; grid-template-columns: 1fr 1fr auto; padding: 5px; border-bottom: 1px solid var(--border); background: var(--surface-2); }
.side-tabs button { padding: 9px; border: 0; border-radius: 9px; background: transparent; color: var(--muted); cursor: pointer; font-weight: 750; }
.side-tabs button[aria-selected="true"] { background: var(--surface); color: var(--text); }
.side-tabs .side-panel-close { width: 32px; padding: 4px; color: var(--muted); font-size: 1rem; }
.side-tab-panel { min-height: 0; max-height: 160px; overflow: auto; padding: 10px; }
.activity-feed { display: grid; gap: 0; margin: 0; padding: 0; list-style: none; }
.activity-feed li { display: grid; grid-template-columns: 58px 1fr; gap: 8px; padding: 12px 0; border-bottom: 1px solid var(--border); font-size: .75rem; line-height: 1.45; }
.activity-feed time { color: var(--muted); font: .65rem ui-monospace, monospace; }
.table-details { margin: 0; }.table-details div { display: flex; justify-content: space-between; padding: 11px 0; border-bottom: 1px solid var(--border); font-size: .76rem; }.table-details dt { color: var(--muted); }.table-details dd { margin: 0; font-weight: 700; }
.detail-disclosure { margin-top: 18px; padding: 12px; border: 1px solid color-mix(in srgb, var(--gold) 35%, var(--border)); border-radius: 10px; background: color-mix(in srgb, var(--gold) 8%, var(--surface)); }
.detail-disclosure strong { font-size: .72rem; }.detail-disclosure p { margin: 5px 0 0; color: var(--muted); font-size: .72rem; line-height: 1.45; }
.session-note { display: flex; align-items: center; gap: 11px; margin: 0 16px 16px; padding: 12px; border-radius: 11px; background: var(--surface-2); }
.session-note > span { color: var(--green); }.session-note p { display: grid; margin: 0; font-size: .72rem; }.session-note p span { margin-top: 3px; color: var(--muted); }

.history-view { max-width: 1260px; }
.history-layout { display: grid; grid-template-columns: 330px minmax(0, 1fr); gap: 20px; }
.history-list, .hand-detail { border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); }
.history-list { align-self: start; overflow: hidden; }
.history-list button { display: grid; grid-template-columns: 1fr auto; grid-template-areas: "meta cards" "meta result"; width: 100%; gap: 3px 12px; padding: 16px; border: 0; border-bottom: 1px solid var(--border); background: transparent; text-align: left; cursor: pointer; }
.history-list button:last-child { border-bottom: 0; }.history-list button:hover { background: var(--surface-2); }.history-list button[aria-selected="true"] { box-shadow: inset 3px 0 var(--green); background: var(--green-soft); }
.history-list button > span:first-child { grid-area: meta; display: grid; }.history-list small { margin-top: 5px; }.history-list em { grid-area: result; justify-self: end; font-size: .72rem; font-style: normal; font-weight: 800; }
.hand-cards { grid-area: cards; display: flex; gap: 3px; }.hand-cards i { display: grid; min-width: 26px; min-height: 34px; place-items: center; border: 1px solid var(--border); border-radius: 5px; background: var(--surface); font-size: .64rem; font-style: normal; }
.hand-detail { padding: clamp(18px, 3vw, 30px); }
.hand-detail-header { display: flex; justify-content: space-between; align-items: center; }.hand-detail-header > div { display: flex; align-items: center; gap: 10px; }.hand-detail-header h2 { margin: 0; }
.hand-summary { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin: 24px 0; padding: 14px; border-radius: 12px; background: var(--surface-2); }.hand-summary span { display: grid; }.hand-summary small { font-size: .65rem; }.hand-summary strong { margin-top: 4px; font-size: .78rem; }
.replay-board { display: grid; place-items: center; min-height: 190px; border-radius: 14px; background: radial-gradient(ellipse, var(--felt), var(--felt-deep)); color: #fff; }.replay-board > div { display: flex; gap: 5px; }.replay-board p { margin: 16px 0 0; font-size: .75rem; }
.hand-timeline { position: relative; display: grid; gap: 0; margin: 24px 0 0; padding: 0; list-style: none; }.hand-timeline::before { position: absolute; top: 18px; bottom: 18px; left: 27px; width: 1px; background: var(--border); content: ""; }.hand-timeline li { position: relative; display: grid; grid-template-columns: 55px 1fr auto; align-items: center; min-height: 48px; }.hand-timeline p { margin: 0; font-size: .78rem; }.hand-timeline small { font: .65rem ui-monospace, monospace; }.street { z-index: 1; display: grid; width: 42px; height: 24px; place-items: center; border: 1px solid var(--border); border-radius: 999px; background: var(--surface); color: var(--muted); font-size: .58rem; font-weight: 800; }

dialog { width: min(440px, calc(100% - 32px)); padding: 0; border: 1px solid var(--border); border-radius: 18px; background: var(--surface); color: var(--text); box-shadow: 0 30px 90px rgba(0,0,0,.45); }
dialog::backdrop { background: rgba(0, 8, 5, .7); backdrop-filter: blur(4px); }
dialog form { padding: 20px; }
.table-settings-dialog { width: min(940px, calc(100% - 28px)); max-height: min(760px, calc(100dvh - 28px)); overflow: auto; }
.table-settings-dialog form { display: grid; gap: 12px; padding: 18px; }
.table-settings-dialog .dialog-heading { margin-bottom: 0; padding-bottom: 12px; border-bottom: 1px solid var(--border); }
.table-settings-mark { display: grid; width: 42px; height: 42px; flex: 0 0 auto; place-items: center; border: 1px solid color-mix(in srgb, var(--green) 55%, var(--border)); border-radius: 14px; background: linear-gradient(145deg, color-mix(in srgb, var(--green) 18%, var(--surface-2)), var(--surface)); color: var(--green-strong); font-size: .72rem; font-weight: 950; letter-spacing: .08em; }
.settings-session-summary { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); overflow: hidden; border: 1px solid var(--border); border-radius: 13px; background: var(--surface-2); }
.settings-session-summary > span { display: grid; gap: 3px; padding: 10px 14px; border-right: 1px solid var(--border); }.settings-session-summary > span:last-child { border-right: 0; }.settings-session-summary small { color: var(--muted); font-size: .62rem; font-weight: 750; text-transform: uppercase; letter-spacing: .05em; }.settings-session-summary strong { color: var(--text); font-size: .78rem; }
.settings-section { display: grid; gap: 8px; }.settings-section-heading { display: flex; align-items: end; justify-content: space-between; padding-inline: 2px; }.settings-section-heading h3, .settings-section-heading p { margin: 0; }.settings-section-heading h3 { font-size: .82rem; }.settings-section-heading p { color: var(--muted); font-size: .64rem; }
.settings-avatar-studio { display: grid; grid-template-columns: minmax(0,1fr) 180px; gap: 12px; padding: 12px; border: 1px solid var(--border); border-radius: 14px; background: linear-gradient(145deg,color-mix(in srgb,var(--surface-2) 92%,var(--green) 8%),var(--surface)); }
.settings-avatar-grid { display: grid; grid-template-columns: repeat(12,minmax(44px,1fr)); gap: 7px; }
.settings-avatar-choice { position: relative; min-width: 0; aspect-ratio: 1; overflow: hidden; padding: 0; border: 2px solid transparent; border-radius: 50%; background: #10221c; cursor: pointer; transition: transform .16s ease,border-color .16s ease,box-shadow .16s ease; }
.settings-avatar-choice img { display: block; width: 100%; height: 100%; object-fit: cover; }
.settings-avatar-choice:hover { transform: translateY(-2px); border-color: color-mix(in srgb,var(--green) 55%,transparent); }
.settings-avatar-choice.is-selected { border-color: hsl(var(--avatar-choice-hue,156) 66% 54%); box-shadow: 0 0 0 3px hsl(var(--avatar-choice-hue,156) 62% 48% / .2),0 8px 20px rgba(0,0,0,.24); }
.settings-avatar-choice.is-selected::after { position: absolute; right: 1px; bottom: 1px; display: grid; width: 17px; height: 17px; place-items: center; border: 2px solid var(--surface); border-radius: 50%; background: var(--green); color: #fff; content: "✓"; font-size: .56rem; font-weight: 950; }
.settings-avatar-options { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.settings-avatar-options label { display: grid; align-content: center; gap: 5px; color: var(--muted); font-size: .58rem; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; }
.settings-avatar-options label:last-child { grid-column: 1 / -1; }
.settings-avatar-options select { min-width: 0; padding: 8px; border: 1px solid var(--border); border-radius: 9px; background: var(--surface); color: var(--text); font-size: .68rem; }
.settings-avatar-options input[type="range"] { width: 100%; accent-color: hsl(var(--avatar-choice-hue,156) 66% 48%); }
.table-settings-actions { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 9px; }
.settings-action-card, .settings-command-card { min-height: 100px; border: 1px solid var(--border); border-radius: 14px; background: linear-gradient(150deg, color-mix(in srgb, var(--surface-2) 90%, var(--green) 10%), var(--surface)); color: var(--text); box-shadow: inset 0 1px rgba(255,255,255,.04); }
.settings-action-card { grid-column: 1 / -1; display: grid; grid-template-columns: auto minmax(0,1fr) minmax(260px,.85fr); grid-template-areas: "icon title controls" "icon detail controls"; align-items: center; gap: 3px 12px; min-height: 84px; padding: 12px 14px; }
.settings-action-card h3, .settings-action-card p { margin: 0; }.settings-action-card h3 { grid-area: title; align-self: end; font-size: .84rem; }.settings-action-card p { grid-area: detail; align-self: start; color: var(--muted); font-size: .66rem; line-height: 1.4; }.settings-action-card label { position: absolute; overflow: hidden; width: 1px; height: 1px; clip: rect(0 0 0 0); }.settings-action-card input { width: 104px; min-width: 0; padding: 9px 10px; border: 1px solid var(--border); border-radius: 9px; background: var(--surface); color: var(--text); }.settings-action-card .primary-button { min-height: 38px; padding: 8px 13px; font-size: .7rem; white-space: nowrap; }.settings-top-up-controls { grid-area: controls; display: flex; justify-content: flex-end; gap: 8px; }
.settings-action-icon { grid-area: icon; display: grid; width: 30px; height: 30px; place-items: center; border-radius: 9px; background: var(--green-soft); color: var(--green-strong); font-size: 1.1rem; font-weight: 900; }
.settings-command-card { display: grid; grid-template-columns: 38px minmax(0,1fr); grid-template-rows: auto auto; align-content: center; gap: 3px 10px; padding: 12px; text-align: left; cursor: pointer; }.settings-command-card::before { grid-row: 1 / 3; display: grid; width: 36px; height: 36px; place-items: center; border-radius: 11px; background: color-mix(in srgb, var(--gold) 15%, var(--surface-2)); color: var(--gold); content: "Ⅱ"; font-weight: 900; }.settings-command-card.is-leave::before { background: color-mix(in srgb, #e4a65b 15%, var(--surface-2)); color: #f0b96f; content: "↑"; }.settings-command-card.is-exit::before { background: color-mix(in srgb, #d96a5d 16%, var(--surface-2)); color: #e88376; content: "↗"; }.settings-command-card strong { align-self: end; font-size: .78rem; }.settings-command-card span { align-self: start; color: var(--muted); font-size: .62rem; line-height: 1.35; }.settings-command-card:hover { border-color: color-mix(in srgb, var(--green) 55%, var(--border)); transform: translateY(-1px); }.settings-command-card:disabled { opacity: .55; cursor: progress; transform: none; }
.table-preferences { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 7px; margin: 2px 0 0; padding: 12px; border: 1px solid var(--border); border-radius: 14px; }.table-preferences legend { padding: 0 7px; color: var(--muted); font-size: .66rem; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; }
.table-preference-row, .table-theme-row { display: flex; min-height: 58px; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 12px; border-radius: 11px; background: var(--surface-2); cursor: pointer; }.table-preference-row > span, .table-theme-row > span { display: grid; gap: 3px; }.table-preference-row strong, .table-theme-row strong { font-size: .76rem; }.table-preference-row small, .table-theme-row small { color: var(--muted); font-size: .62rem; line-height: 1.35; }.table-preference-row input { width: 38px; height: 21px; flex: 0 0 auto; accent-color: var(--green); }.table-theme-row select { padding: 8px; border: 1px solid var(--border); border-radius: 9px; background: var(--surface); color: var(--text); }
.table-settings-status { min-height: 18px; margin: 0; padding: 1px 2px 0; color: var(--muted); font-size: .66rem; line-height: 1.4; }
.open-table-window { display: flex; align-items: center; justify-content: center; margin-top: 8px; text-decoration: none; }
.embedded-table-workspace { position: fixed; z-index: 190; inset: 8px; display: grid; grid-template-rows: auto minmax(0,1fr); gap: 8px; padding: 8px; border: 1px solid rgba(115,255,204,.42); border-radius: 18px; background: rgba(5,10,11,.98); box-shadow: 0 24px 80px rgba(0,0,0,.72); }
.embedded-table-workspace[hidden] { display: none; }
.embedded-table-workspace-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 48px; padding: 4px 8px; }
.embedded-table-workspace-heading strong { display: block; color: var(--text); }
.embedded-table-workspace-actions, .embedded-table-card-heading > div { display: flex; align-items: center; gap: 7px; }
.embedded-table-workspace-actions button, .embedded-table-card-heading a, .embedded-table-card-heading button { min-height: 36px; padding: 7px 12px; }
.embedded-table-grid { display: grid; grid-template-columns: repeat(auto-fit,minmax(min(620px,100%),1fr)); gap: 8px; min-height: 0; overflow: auto; }
.embedded-table-card { display: grid; grid-template-rows: 43px minmax(520px,1fr); min-width: 0; min-height: 0; overflow: hidden; border: 1px solid var(--border); border-radius: 13px; background: #050707; }
.embedded-table-card-heading { display: flex; align-items: center; justify-content: space-between; gap: 9px; padding: 4px 8px 4px 13px; background: linear-gradient(90deg,rgba(36,55,52,.96),rgba(13,19,19,.96)); }
.embedded-table-card iframe { width: 100%; height: 100%; min-height: 520px; border: 0; background: #050707; }
@media (max-width: 820px) {
  .embedded-table-workspace { inset: 3px; border-radius: 12px; }
  .embedded-table-workspace-heading { align-items: flex-start; }
  .embedded-table-workspace-heading > div:first-child strong { font-size: .76rem; }
  .embedded-table-workspace-actions .ghost-button { display: none; }
  .embedded-table-grid { grid-template-columns: 1fr; }
  .embedded-table-card { grid-template-rows: 42px minmax(620px,1fr); }
  .embedded-table-card iframe { min-height: 620px; }
}
html[data-table-animations="off"] *, html[data-table-animations="off"] *::before, html[data-table-animations="off"] *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
.dialog-heading { display: flex; justify-content: space-between; align-items: flex-start; gap: 18px; margin-bottom: 20px; }.dialog-heading > div { display: flex; gap: 11px; align-items: center; }.dialog-heading h2 { margin: 0; }.dialog-heading p { margin: 4px 0 0; color: var(--muted); font-size: .73rem; }
.connection-dialog dl { margin: 0 0 18px; }.connection-dialog dl div { display: flex; justify-content: space-between; padding: 11px 0; border-bottom: 1px solid var(--border); font-size: .76rem; }.connection-dialog dt { color: var(--muted); }.connection-dialog dd { margin: 0; font-weight: 700; }
.info-dialog > form > p { color: var(--muted); font-size: .85rem; line-height: 1.6; }.dialog-callout { display: grid; gap: 6px; margin: 18px 0; padding: 14px; border-radius: 12px; background: color-mix(in srgb, var(--gold) 10%, var(--surface-2)); }.dialog-callout strong { color: var(--gold); font-size: .82rem; }.dialog-callout span { color: var(--muted); font-size: .75rem; line-height: 1.45; }
.install-button { position: fixed; z-index: 25; right: max(20px, env(safe-area-inset-right)); bottom: 20px; display: flex; align-items: center; gap: 8px; padding: 11px 15px; border: 1px solid var(--green); border-radius: 12px; background: var(--surface); color: var(--green-strong); box-shadow: var(--shadow); cursor: pointer; font-weight: 800; }
.pwa-install-icon { display: grid; width: 38px; height: 38px; flex: 0 0 auto; place-items: center; border-radius: 12px; background: color-mix(in srgb, var(--green) 18%, var(--surface-2)); color: var(--green-strong); font-size: 1.3rem; font-weight: 900; }
.pwa-install-steps { display: grid; gap: 10px; margin: 18px 0; padding: 0; counter-reset: pwa-step; list-style: none; }
.pwa-install-steps li { display: grid; grid-template-columns: 30px 1fr; align-items: center; gap: 10px; color: var(--text); font-size: .82rem; line-height: 1.45; }
.pwa-install-steps li::before { display: grid; width: 30px; height: 30px; place-items: center; border: 1px solid color-mix(in srgb, var(--green) 45%, var(--border)); border-radius: 50%; background: color-mix(in srgb, var(--green) 10%, var(--surface-2)); color: var(--green-strong); content: counter(pwa-step); counter-increment: pwa-step; font-size: .72rem; font-weight: 900; }
@media (display-mode: standalone) { .install-button { display: none !important; } }
.toast { position: fixed; z-index: 90; bottom: 24px; left: 50%; max-width: min(460px, calc(100% - 32px)); padding: 12px 16px; border: 1px solid var(--border); border-radius: 11px; background: var(--text); color: var(--bg); box-shadow: var(--shadow); transform: translateX(-50%); font-size: .8rem; }
.mobile-nav { display: none; }

html.table-css-fullscreen, html.table-css-fullscreen body { height: 100%; overflow: hidden; }
html.table-css-fullscreen .app-header, html.table-css-fullscreen .mobile-nav { display: none !important; }
html.table-css-fullscreen body { padding: 0 !important; }
html.table-css-fullscreen #view-table.table-view.is-immersive { position: fixed; z-index: 80; inset: 0; }
.table-view.is-immersive { width: 100%; height: 100dvh; max-width: none; overflow: auto; padding: 0 14px 14px; background: var(--bg); }
.table-view.is-immersive .table-toolbar { position: sticky; z-index: 25; top: 0; min-height: 58px; padding-inline: max(4px, env(safe-area-inset-left)) max(4px, env(safe-area-inset-right)); background: color-mix(in srgb, var(--bg) 92%, transparent); backdrop-filter: blur(16px); }
.table-view.is-immersive .game-rule-strip { display: none; }
.table-view.is-immersive .disclosure-banner { max-width: none; margin: 8px 0; padding-block: 7px; }
.table-view.is-immersive .game-layout { max-width: none; }
.table-view.is-immersive .poker-table { min-height: clamp(480px, calc(100dvh - 265px), 820px); }
.table-view.is-immersive .table-side-panel { align-self: stretch; }

@keyframes pulse { 50% { opacity: .35; } }
@keyframes timer { to { clip-path: inset(0 100% 0 0); } }

@media (max-width: 1360px) and (min-width: 821px) {
  .room-browser .table-list-head, .room-browser .table-row { grid-template-columns: minmax(130px, 1.4fr) minmax(96px, .9fr) 64px 78px 22px; }
  .room-browser .table-list-head > :nth-child(1), .room-browser .table-row > :nth-child(1), .room-browser .table-list-head > :nth-child(5), .room-browser .table-row > :nth-child(5) { display: none; }
}

@media (max-width: 1180px) and (min-width: 821px) {
  .room-browser { grid-template-columns: 1fr; }
  .room-browser .table-list { max-height: 430px; }
  .room-inspector { position: static; }
}

@media (max-width: 1100px) {
  .app-header { grid-template-columns: 1fr auto; }.primary-nav { display: none; }.balance { display: none; }
  .game-layout { grid-template-columns: minmax(0, 1fr); }.table-side-panel { grid-template-columns: 1fr; }.table-side-panel.is-open { display: block; }.side-tab-panel { min-height: 0; }.activity-feed { grid-template-columns: 1fr; gap: 0; }.session-note { margin-top: 0; }
  .poker-table { min-height: 62vw; }
}

@media (max-width: 820px) {
  :root { --header-h: 62px; }
  body { padding-bottom: calc(64px + env(safe-area-inset-bottom)); }
  .app-header { padding: max(8px, env(safe-area-inset-top)) max(14px, env(safe-area-inset-right)) 8px max(14px, env(safe-area-inset-left)); }.brand-mark { width: 36px; height: 36px; }.brand > span:last-child { display: none; }.connection-chip span:last-child { display: none; }.connection-chip { width: 38px; justify-content: center; padding: 0; }.avatar-button { display: none; }
  .view { padding: 24px 14px 40px; }.lobby-heading, .history-heading { align-items: flex-start; flex-direction: column; margin-bottom: 24px; }.quick-seat { width: 100%; }
  .lobby-product-tabs { display: flex; overflow-x: auto; scroll-snap-type: x proximity; }.lobby-product-tabs button { min-width: 126px; flex: 1 0 126px; scroll-snap-align: start; }
  .lobby-layout { grid-template-columns: 1fr; }.filter-panel { position: static; display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; padding: 14px; }.filter-panel .panel-heading { grid-column: 1 / -1; }.filter-panel fieldset { margin: 0; padding: 12px; border: 1px solid var(--border); border-radius: 10px; }.filter-panel .secondary-button { grid-column: 1 / -1; margin: 0; }
  .table-cards { grid-template-columns: 1fr 1fr; }.table-card:nth-child(3) { display: none; }
  .table-list-head { display: none; }.table-row { grid-template-columns: 58px minmax(0, 1fr) auto; }.table-row > span:nth-child(3), .table-row > span:nth-child(4), .table-row > span:nth-child(5), .table-row > span:nth-child(6) { display: none; }
  .room-browser { grid-template-columns: 1fr; }.room-browser .table-list { max-height: 430px; }.room-inspector { position: static; }
  .room-inspector { grid-template-columns: 1fr 1.25fr; }.room-metrics { grid-column: 1 / -1; }.room-inspector .primary-button { grid-column: 1 / -1; grid-row: auto; }
  .table-view { padding: 0 10px 28px; }.table-toolbar { grid-template-columns: 1fr auto 1fr; min-height: 64px; }.table-toolbar p { display: none; }.back-button span:last-child { display: none; }.disclosure-banner { align-items: flex-start; margin: 10px 0; }.disclosure-banner .text-button { display: none; }
  .poker-shell { padding: 7px; }.poker-table { min-height: clamp(500px, 82vw, 660px); }.seat { width: 146px; min-width: 0; min-height: 64px; grid-template-columns: 50px minmax(66px, auto); padding: 5px 7px; }.seat-avatar { width: 48px; height: 48px; font-size: .66rem; }.seat-copy strong { font-size: .72rem; }.seat-copy small, .seat em { font-size: .6rem; }
  .hero-cards { left: 50%; }.action-context { gap: 14px; }.bet-control { grid-template-columns: 1fr; }.bet-presets { justify-content: stretch; }.bet-presets button { flex: 1; }.action-button { min-height: 54px; }
  .history-layout { grid-template-columns: 1fr; }.history-list { display: grid; grid-template-columns: repeat(3, 1fr); }.history-list button { border-right: 1px solid var(--border); border-bottom: 0; }.history-list button[aria-selected="true"] { box-shadow: inset 0 3px var(--green); }
  .mobile-nav { position: fixed; z-index: 35; right: 0; bottom: 0; left: 0; display: grid; grid-template-columns: repeat(3, 1fr); min-height: 62px; padding-bottom: env(safe-area-inset-bottom); border-top: 1px solid var(--border); background: color-mix(in srgb, var(--surface) 94%, transparent); backdrop-filter: blur(18px); }.mobile-nav button { display: grid; place-items: center; align-content: center; gap: 3px; border: 0; background: transparent; color: var(--muted); font-size: .63rem; cursor: pointer; }.mobile-nav button span:first-child { font-size: 1.05rem; }.mobile-nav button.is-active { color: var(--green-strong); }
  .install-button { bottom: calc(78px + env(safe-area-inset-bottom)); }
}

@media (max-width: 560px) {
  .header-actions { gap: 5px; }.icon-button, .language-button { width: 35px; height: 35px; }.app-header .icon-button { display: none; }
  .filter-panel { display: block; }.filter-panel fieldset { margin-top: 10px; }.filter-panel .secondary-button { margin-top: 12px; }
  .table-cards { grid-template-columns: 1fr; }.table-card:nth-child(3) { display: block; }
  .section-heading.compact { align-items: stretch; flex-direction: column; }.search-field { width: 100%; }
  .lobby-live-strip { display: grid; gap: 7px; }.lobby-product-tabs { margin-inline: -6px; }
  .table-row { grid-template-columns: minmax(0, 1fr) auto; padding: 13px 12px; font-size: .78rem; }.table-row > span:nth-child(1) { display: none; }.table-row > span:nth-child(2) { text-align: left; }
  .room-inspector { grid-template-columns: 1fr; }.room-seat-map, .room-metrics, .room-disclosure, .room-inspector .primary-button { grid-column: 1; }.room-seat-map { min-height: 250px; margin-inline: 5px; }.room-metrics { grid-template-columns: repeat(2,1fr); }.room-seat { grid-template-columns: 38px minmax(42px,1fr); width: 100px; min-height: 50px; padding: 3px 5px; }.room-seat .room-avatar { width: 36px; height: 36px; }.room-seat-copy small { font-size: .5rem; }.room-seat-copy em { display: none; }
  .disclosure-banner { padding: 9px; }.disclosure-banner strong { font-size: .7rem; }.disclosure-banner p { font-size: .66rem; }
  .poker-table { min-height: clamp(430px, 118vw, 560px); }.felt-ring { inset: 17% 8%; }.board { top: 42%; }.pot-display { top: 30%; }
  .seat { width: 108px; min-width: 0; min-height: 52px; grid-template-columns: 35px minmax(45px, auto); gap: 0 5px; padding: 4px 5px; border-radius: 14px; }.seat-avatar { width: 34px; height: 34px; border-width: 2px; }.hero-cards { top: 66%; left: 50%; }.opponent-cards { top: -19px; }.card-back { width: 18px; }
  .table-seats[data-seat-count="8"] .seat, .table-seats[data-seat-count="9"] .seat, .table-seats[data-seat-count="10"] .seat { width: 96px; grid-template-columns: 31px minmax(38px, 1fr); gap: 0 4px; padding: 4px 5px; }
  .table-seats[data-seat-count="8"] .seat-avatar, .table-seats[data-seat-count="9"] .seat-avatar, .table-seats[data-seat-count="10"] .seat-avatar { width: 30px; height: 30px; font-size: .54rem; }
  .table-seats[data-seat-count="8"] .seat-copy strong, .table-seats[data-seat-count="9"] .seat-copy strong, .table-seats[data-seat-count="10"] .seat-copy strong { font-size: .62rem; }
  .table-seats[data-seat-count="8"] .seat-copy small, .table-seats[data-seat-count="9"] .seat-copy small, .table-seats[data-seat-count="10"] .seat-copy small, .table-seats[data-seat-count="8"] .seat em, .table-seats[data-seat-count="9"] .seat em, .table-seats[data-seat-count="10"] .seat em { font-size: .53rem; }
  .action-context > span:nth-child(2) { display: none; }.action-context { margin-bottom: 8px; }.bet-control { margin-bottom: 8px; }.bet-presets button span { display: none; }.action-buttons { gap: 6px; }.action-button { min-height: 52px; font-size: .75rem; }
  .table-side-panel { display: none; }.table-side-panel.is-open { position: fixed; z-index: 70; inset: max(64px, env(safe-area-inset-top)) 8px calc(70px + env(safe-area-inset-bottom)); display: block; overflow: auto; box-shadow: 0 24px 80px rgba(0,0,0,.7); }.hand-summary { grid-template-columns: 1fr 1fr; }.history-list { grid-template-columns: 1fr; }.history-list button { border-right: 0; border-bottom: 1px solid var(--border); }.hand-timeline li { grid-template-columns: 50px 1fr; }.hand-timeline li small { display: none; }
  .table-settings-dialog { width: calc(100% - 16px); max-height: calc(100dvh - 16px); }
  .table-settings-dialog form { gap: 10px; padding: 12px; }
  .settings-session-summary > span { padding: 8px; }
  .settings-session-summary small { font-size: .54rem; }
  .settings-session-summary strong { overflow: hidden; font-size: .68rem; text-overflow: ellipsis; white-space: nowrap; }
  .settings-section-heading p { display: none; }
  .table-settings-actions, .table-preferences { grid-template-columns: 1fr; }
  .settings-avatar-studio { grid-template-columns: 1fr; padding: 10px; }
  .settings-avatar-grid { grid-template-columns: repeat(6,1fr); }
  .settings-action-card { grid-template-columns: auto minmax(0,1fr); grid-template-areas: "icon title" "detail detail" "controls controls"; min-height: auto; }
  .settings-action-card h3 { align-self: center; }
  .settings-top-up-controls { justify-content: stretch; }
  .settings-top-up-controls input { width: 100%; }
  .settings-command-card { min-height: 76px; }
  .table-preferences { padding: 10px; }
}

@media (max-height: 600px) and (orientation: landscape) and (max-width: 1000px) {
  body { padding: 0; overflow: hidden; }
  .app-header, .mobile-nav, .disclosure-banner, .install-button { display: none !important; }
  main { min-height: 100dvh; }
  .table-view { height: 100dvh; overflow: hidden; padding: 0 6px 6px; }
  .table-toolbar { min-height: 46px; border-bottom: 0; }
  .table-toolbar h1 { font-size: .9rem; }.table-toolbar p, .game-rule-strip { display: none; }
  .table-toolbar .icon-button { width: 34px; height: 34px; }
  .game-layout { display: block; height: calc(100dvh - 50px); }
  .poker-shell { display: grid; height: 100%; grid-template-columns: minmax(0, 1fr) clamp(220px, 32vw, 290px); grid-template-rows: 1fr; gap: 6px; padding: 5px; border-radius: 14px; }
  .hand-meta { display: none; }
  .poker-table { grid-column: 1; grid-row: 1; width: 100%; height: 100%; min-height: 0; border-radius: 12px; }
  .felt-ring { inset: 10% 5%; border-width: 14px; }
  .table-brand span, .table-brand strong { font-size: clamp(1.2rem, 4vw, 2.2rem); }
  .pot-display { top: 25%; }.board { top: 43%; gap: 3px; }.playing-card { width: clamp(27px, 4.1vw, 40px); padding: 3px; }
  .seat, .table-seats[data-seat-count="8"] .seat, .table-seats[data-seat-count="9"] .seat, .table-seats[data-seat-count="10"] .seat { width: 96px; min-height: 44px; grid-template-columns: 30px minmax(43px,1fr); gap: 0 4px; padding: 3px 4px; border-radius: 12px; }
  .seat-avatar, .table-seats[data-seat-count="8"] .seat-avatar, .table-seats[data-seat-count="9"] .seat-avatar, .table-seats[data-seat-count="10"] .seat-avatar { width: 29px; height: 29px; border-width: 2px; }
  .seat-copy strong { font-size: .58rem; }.seat-copy small, .seat em { margin-top: 1px; font-size: .5rem; }.seat-action-bubble { bottom: -18px; padding: 3px 6px; font-size: .52rem; }
  .opponent-cards { top: -14px; }.card-back { width: 15px; border-width: 1px; }.hero-cards { top: 65%; }.hero-cards .playing-card { width: 32px; }
  .action-panel, .pre-action-panel { grid-column: 2; grid-row: 1; min-height: 0; overflow: auto; padding: 5px 4px; border-left: 1px solid var(--border); }
  .pre-action-grid { grid-template-columns: 1fr 1fr; gap: 4px; }.pre-action-grid button { min-height: 38px; padding: 4px; font-size: .62rem; }.pre-action-heading { display: grid; gap: 2px; }
  .action-context { gap: 8px; margin-bottom: 5px; }.action-context > span:nth-child(2) { display: none; }.action-context strong { font-size: .7rem; }
  .bet-control { display: block; margin-bottom: 6px; }.bet-control label { margin-bottom: 2px; }.bet-presets { display: grid; grid-template-columns: repeat(3,1fr); margin-top: 3px; }.bet-presets button { min-height: 27px; padding: 3px; }.bet-presets button span { display: none; }
  .action-buttons { grid-template-columns: 1fr; gap: 4px; }.action-button { min-height: 42px; font-size: .7rem; }.action-button kbd { display: none; }
  .table-side-panel { display: none; }
  .table-side-panel.is-open { inset: 48px 6px 6px auto; width: min(340px, 48vw); }
  .table-view.is-immersive { height: 100dvh; padding: 0 6px 6px; }.table-view.is-immersive .table-toolbar { min-height: 46px; }.table-view.is-immersive .game-layout { height: calc(100dvh - 50px); }.table-view.is-immersive .poker-table { min-height: 0; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

@keyframes bot-action-pop {
  from { opacity: 0; transform: translate(-50%, 7px) scale(.92); }
  to { opacity: 1; transform: translate(-50%, 0) scale(1); }
}

/* Table-first experience -------------------------------------------------- */
.poker-shell {
  overflow: hidden;
  border-color: color-mix(in srgb, var(--green) 34%, var(--border));
  background:
    linear-gradient(145deg, color-mix(in srgb, var(--surface) 94%, #28170d), var(--surface));
  box-shadow: 0 24px 72px rgba(0,0,0,.34), inset 0 1px rgba(255,255,255,.06);
}

.poker-table {
  min-height: clamp(560px, calc(100dvh - 235px), 790px);
  border-color: rgba(255,255,255,.14);
  background:
    radial-gradient(circle at 19% 10%, rgba(255,255,255,.13), transparent 21%),
    radial-gradient(circle at 80% 16%, rgba(255,244,205,.08), transparent 24%),
    radial-gradient(ellipse at 50% 44%, #1d342a 0 34%, #101b16 67%, #050a08 100%);
  box-shadow: inset 0 0 150px rgba(0,0,0,.64), inset 0 1px rgba(255,255,255,.08);
}

.poker-table::before {
  opacity: .34;
  background:
    linear-gradient(104deg, transparent 0 13%, rgba(255,255,255,.07) 20%, transparent 29% 68%, rgba(255,255,255,.045) 77%, transparent 86%),
    repeating-linear-gradient(115deg, transparent 0 38px, rgba(255,255,255,.028) 39px, transparent 40px);
}

.poker-table::after {
  inset: 7.5% 4.5% 24%;
  background:
    radial-gradient(circle at 50% 38%, rgba(255,255,255,.12), transparent 30%),
    radial-gradient(ellipse at 50% 46%, #14936b 0%, #077854 54%, #034f37 100%);
  box-shadow: inset 0 0 88px rgba(0,0,0,.3), inset 0 1px 1px rgba(255,255,255,.25);
}

.felt-ring {
  inset: 6.5% 3.5% 23%;
  border-width: clamp(17px, 2.35vw, 32px);
  background:
    linear-gradient(#07110e,#07110e) padding-box,
    linear-gradient(150deg,#775235 0%,#1a211d 24%,#976d43 47%,#141a17 72%,#62432e 100%) border-box;
  box-shadow:
    inset 0 0 0 2px rgba(255,255,255,.15),
    inset 0 0 42px rgba(0,0,0,.64),
    0 22px 46px rgba(0,0,0,.68),
    0 0 28px rgba(73,220,168,.08);
}

.table-brand {
  top: 43%;
  color: rgba(255,255,255,.14);
  filter: drop-shadow(0 2px 1px rgba(0,0,0,.2));
}

.pot-display {
  z-index: 4;
  top: 24%;
  min-width: 112px;
  padding: 6px 12px;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 999px;
  background: rgba(1,20,14,.46);
  box-shadow: 0 7px 18px rgba(0,0,0,.2);
  backdrop-filter: blur(6px);
}

.pot-display strong { color: #f7d674; font-size: 1.08rem; }
.board { z-index: 4; top: 39%; gap: clamp(4px,.45vw,7px); }
.playing-card { border-color: rgba(255,255,255,.92); box-shadow: 0 7px 16px rgba(0,0,0,.38), inset 0 0 0 1px rgba(14,38,29,.08); }

.seat {
  border-color: rgba(255,255,255,.3);
  background: linear-gradient(145deg,rgba(8,20,16,.985),rgba(1,8,6,.965));
  box-shadow: 0 14px 32px rgba(0,0,0,.55), inset 0 1px rgba(255,255,255,.1);
}

.seat.is-active {
  border-color: #f1ca70;
  box-shadow: 0 0 0 3px rgba(241,202,112,.2), 0 13px 34px rgba(0,0,0,.55), 0 0 28px rgba(241,202,112,.15);
}

.seat.is-hero {
  border-color: #51dfac;
  background: linear-gradient(145deg,rgba(5,54,39,.985),rgba(2,24,17,.97));
  box-shadow: 0 0 0 3px rgba(81,223,172,.17), 0 14px 34px rgba(0,0,0,.55);
}

.seat-wager {
  gap: 7px;
  color: #fff;
  font-size: .72rem;
  font-weight: 900;
  text-shadow: 0 2px 4px rgba(0,0,0,.85);
}

.seat-wager b {
  padding: 3px 8px;
  border: 1px solid rgba(255,255,255,.2);
  background: rgba(1,11,8,.82);
  box-shadow: 0 4px 12px rgba(0,0,0,.42);
}

.chip-stack { width: 32px; height: 29px; filter: drop-shadow(0 5px 4px rgba(0,0,0,.58)); }
.chip-stack i { right: 2px; width: 27px; height: 9px; border-width: 2px; }
.chip-stack i:nth-child(2) { bottom: 6px; }
.chip-stack i:nth-child(3) { bottom: 12px; }
.chip-stack i:nth-child(4) { bottom: 18px; }

.seat-action-bubble {
  padding: 5px 10px;
  border-color: rgba(255,255,255,.45);
  background: linear-gradient(#ffe093,#e8b94e);
  box-shadow: 0 6px 16px rgba(0,0,0,.42);
}

.hero-cards { z-index: 8; top: 51%; filter: drop-shadow(0 8px 8px rgba(0,0,0,.46)); }

.action-panel,
.pre-action-panel {
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 16px;
  background: linear-gradient(160deg,rgba(10,18,16,.94),rgba(3,9,7,.92));
  box-shadow: 0 16px 44px rgba(0,0,0,.56), inset 0 1px rgba(255,255,255,.08);
  backdrop-filter: blur(16px);
}

.action-context { gap: 12px; margin-bottom: 5px; }
.action-context > span {
  min-width: 84px;
  padding: 3px 7px;
  border-radius: 8px;
  background: rgba(255,255,255,.045);
}
.action-context span span { color: #a9b8b2; }
.action-context strong { color: #fff; }
.action-context .turn-time { min-width: 65px; }
.turn-time strong { color: #f5cc6c; }

.bet-control { grid-template-columns: minmax(180px,1fr) auto; gap: 10px; margin-bottom: 5px; }
.bet-control label { margin-bottom: 2px; }
.bet-control input[type="range"] { height: 18px; accent-color: #45d6a2; cursor: pointer; }
.bet-presets button {
  min-height: 26px;
  padding-block: 3px;
  border-color: rgba(255,255,255,.16);
  background: rgba(255,255,255,.07);
  color: #d6dfdb;
}

.action-buttons { gap: 8px; }
.action-button {
  min-height: 48px;
  overflow: hidden;
  border-color: rgba(255,255,255,.22);
  border-radius: 13px;
  color: #fff;
  font-size: .86rem;
  text-shadow: 0 1px 2px rgba(0,0,0,.62);
  box-shadow: inset 0 1px rgba(255,255,255,.2), 0 8px 18px rgba(0,0,0,.32);
  transition: transform .15s ease, filter .15s ease, box-shadow .15s ease;
}

.action-button.fold {
  border-color: #b95656;
  background: linear-gradient(180deg,#a64040,#6c2023);
  color: #fff;
}

.action-button.check {
  border-color: #4f83c5;
  background: linear-gradient(180deg,#3d76bd,#214579);
}

.action-button.raise {
  border-color: #59b752;
  background: linear-gradient(180deg,#459f3e,#226e2a);
}

.action-button:hover:not(:disabled) { box-shadow: inset 0 1px rgba(255,255,255,.28), 0 10px 21px rgba(0,0,0,.42); }
.action-button:active:not(:disabled) { transform: translateY(1px); filter: brightness(.96); }

.pre-action-heading { margin-bottom: 5px; }
.pre-action-heading strong { color: #f4cf77; }
.pre-action-grid { grid-template-columns: repeat(3,minmax(0,1fr)); gap: 7px; }
.pre-action-grid button {
  min-height: 42px;
  padding-block: 5px;
  border-color: rgba(255,255,255,.2);
  border-radius: 11px;
  background: linear-gradient(180deg,#4a4b53,#292a30);
  color: #fff;
  font-size: .75rem;
  text-shadow: 0 1px 2px rgba(0,0,0,.65);
  box-shadow: inset 0 1px rgba(255,255,255,.13), 0 7px 15px rgba(0,0,0,.3);
}
.pre-action-grid button:nth-child(1),
.pre-action-grid button:nth-child(4) { border-color: rgba(201,91,91,.6); }
.pre-action-grid button:nth-child(2),
.pre-action-grid button:nth-child(5) { border-color: rgba(75,130,199,.58); }
.pre-action-grid button:nth-child(3),
.pre-action-grid button:nth-child(6) { border-color: rgba(82,180,85,.62); }

.table-side-panel {
  overflow: hidden;
  border-color: rgba(255,255,255,.18);
  background: linear-gradient(155deg,rgba(8,17,14,.93),rgba(3,9,7,.9));
  box-shadow: 0 18px 48px rgba(0,0,0,.56), inset 0 1px rgba(255,255,255,.07);
  backdrop-filter: blur(16px);
}
.side-tabs { padding: 4px; background: rgba(255,255,255,.045); }
.side-tabs button { min-height: 34px; padding: 7px; font-size: .7rem; }
.side-tabs button[aria-selected="true"] { background: rgba(255,255,255,.09); box-shadow: inset 0 -2px #49d8a4; }
.side-tab-panel { scrollbar-width: thin; scrollbar-color: rgba(91,216,168,.5) transparent; }
.activity-feed li { grid-template-columns: 50px 1fr; gap: 7px; padding: 7px 2px; font-size: .68rem; }
.activity-feed time { font-size: .58rem; }
.table-details div { padding: 7px 2px; font-size: .68rem; }
.detail-disclosure { margin-top: 9px; padding: 8px; }
.detail-disclosure strong, .detail-disclosure p { font-size: .64rem; }
.session-note { margin: 0 8px 8px; padding: 8px; }
.session-note p { font-size: .64rem; }

@media (min-width: 821px) {
  .poker-shell { padding: 8px; }
  .hand-meta {
    position: absolute;
    z-index: 14;
    top: 15px;
    right: 22px;
    left: 22px;
    padding: 4px 8px;
    color: rgba(255,255,255,.7);
    pointer-events: none;
  }
  .poker-shell > .action-panel,
  .poker-shell > .pre-action-panel {
    position: absolute;
    z-index: 18;
    right: 14px;
    bottom: 14px;
    width: min(650px, 55%);
    padding: 8px;
  }
  .table-side-panel,
  .table-side-panel.is-open {
    position: absolute;
    z-index: 19;
    bottom: 14px;
    left: 14px;
    display: none;
    width: min(286px, 25%);
    max-height: 176px;
  }
  .table-side-panel.is-open { display: block; }
  .side-tab-panel { max-height: 90px; padding: 6px 8px; }
}

html.table-css-fullscreen #view-table.table-view.is-immersive { overflow: hidden; }
html.table-css-fullscreen .install-button { display: none !important; }
.table-view.is-immersive .disclosure-banner,
.table-view.is-immersive .table-session-banner { display: none; }
.table-view.is-immersive .game-layout { height: calc(100dvh - 58px); }
.table-view.is-immersive .poker-shell { height: 100%; }
.table-view.is-immersive .poker-table { height: 100%; min-height: 0; }

@media (max-width: 1100px) and (min-width: 821px) {
  .poker-table { min-height: clamp(545px, 64vw, 680px); }
  .poker-shell > .action-panel,
  .poker-shell > .pre-action-panel { width: min(590px, 58%); }
  .table-side-panel,
  .table-side-panel.is-open { width: min(270px, 29%); }
  .seat { width: clamp(154px,19vw,190px); min-height: 76px; grid-template-columns: 62px minmax(72px,1fr); }
  .seat-avatar { width: 60px; height: 60px; }
}

@media (max-width: 820px) {
  .poker-shell { padding: 6px; border-radius: 15px; }
  .poker-table { min-height: clamp(500px, 86vw, 690px); }
  .action-panel, .pre-action-panel { margin-top: 7px; padding: 10px; }
  .pre-action-heading span { max-width: 62%; text-align: right; }
  .table-side-panel.is-open {
    right: 12px;
    bottom: 12px;
    left: 12px;
    width: auto;
    max-height: min(360px,calc(100dvh - 110px));
  }
  .side-tab-panel { max-height: min(250px,calc(100dvh - 205px)); }
}

@media (max-width: 560px) {
  .table-view { padding-inline: 5px; }
  .table-toolbar { min-height: 58px; }
  .table-toolbar-actions { gap: 4px; }
  .poker-table { min-height: clamp(450px, 118vw, 570px); }
  .felt-ring { inset: 15% 7%; border-width: 12px; }
  .pot-display { top: 29%; min-width: 88px; padding: 4px 8px; }
  .pot-display strong { font-size: .86rem; }
  .board { top: 42%; gap: 3px; }
  .seat-wager { gap: 3px; font-size: .56rem; }
  .seat-wager b { padding: 2px 4px; }
  .chip-stack { width: 24px; height: 22px; }
  .chip-stack i { width: 20px; height: 7px; border-width: 1px; }
  .chip-stack i:nth-child(2) { bottom: 4px; }
  .chip-stack i:nth-child(3) { bottom: 8px; }
  .chip-stack i:nth-child(4) { bottom: 12px; }
  .action-context { gap: 5px; }
  .action-context > span { min-width: 0; flex: 1; padding: 4px 5px; }
  .action-context .turn-time { min-width: 50px; }
  .bet-control { gap: 7px; }
  .bet-presets { display: grid; grid-template-columns: repeat(3,1fr); }
  .pre-action-heading { align-items: flex-start; }
  .pre-action-heading span { font-size: .58rem; line-height: 1.25; }
  .pre-action-grid { gap: 5px; }
  .pre-action-grid button { min-height: 46px; padding: 5px 3px; font-size: .66rem; }
  .action-button { min-height: 52px; }
  .table-side-panel.is-open {
    top: auto;
    right: auto;
    bottom: calc(70px + env(safe-area-inset-bottom));
    left: 8px;
    width: min(320px,calc(100% - 16px));
    max-height: min(300px,calc(100dvh - 90px));
  }
  html.table-css-fullscreen .table-side-panel.is-open { bottom: 8px; }
}

@media (max-width: 820px) and (orientation: portrait) {
  html.table-css-fullscreen #view-table.table-view.is-immersive { overflow-x: hidden; overflow-y: auto; }
  .table-view.is-immersive .game-layout { height: auto; min-height: calc(100dvh - 58px); }
  .table-view.is-immersive .poker-shell { height: auto; }
  .table-view.is-immersive .poker-table { height: auto; min-height: clamp(450px,118vw,650px); }
}

@media (max-height: 600px) and (orientation: landscape) and (max-width: 1000px) {
  .poker-shell {
    grid-template-columns: minmax(0,1fr) clamp(250px,34vw,330px);
    gap: 5px;
    overflow: hidden;
  }
  .poker-table { min-height: 0; }
  .poker-shell > .action-panel,
  .poker-shell > .pre-action-panel {
    position: static;
    right: auto;
    bottom: auto;
    width: auto;
    margin: 0;
    border-radius: 10px;
    background: linear-gradient(160deg,rgba(12,22,18,.98),rgba(3,9,7,.98));
    box-shadow: none;
  }
  .pre-action-grid { grid-template-columns: repeat(3,minmax(0,1fr)); gap: 4px; }
  .pre-action-grid button { min-height: 43px; }
  .action-context > span { min-width: 0; padding: 3px 4px; }
  .action-buttons { grid-template-columns: repeat(3,minmax(0,1fr)); }
  .action-button { min-height: 46px; padding: 4px; }
  .table-side-panel.is-open {
    position: fixed;
    z-index: 82;
    inset: auto auto 8px 8px;
    display: block;
    width: min(330px,45vw);
    max-height: min(230px,calc(100dvh - 60px));
  }
  .side-tab-panel { max-height: min(135px,calc(100dvh - 145px)); }
  .session-note { display: none; }
}

/* Open-table presentation: full viewport, readable rails and valued chips. */
body[data-route="table"] .app-header,
body[data-route="table"] .mobile-nav { display: none !important; }
body[data-route="table"] main { min-height: 100dvh; }
body[data-route="table"] .table-view {
  min-height: 100dvh;
  padding: 0 8px 8px;
  background:
    radial-gradient(circle at 50% -20%, rgba(90,105,111,.22), transparent 42%),
    #050607;
}
body[data-route="table"] .table-toolbar {
  min-height: 58px;
  padding-inline: 8px;
  border-color: rgba(255,255,255,.12);
  background: linear-gradient(180deg,#24262b,#17191d);
}
body[data-route="table"] .table-toolbar h1 { color: #fff; font-size: 1.08rem; }
body[data-route="table"] .table-toolbar p { color: #bbc0c6; }
body[data-route="table"] .disclosure-banner,
body[data-route="table"] .table-session-banner {
  max-width: none;
  margin: 5px 0;
  padding-block: 6px;
  border-radius: 7px;
}
body[data-route="table"] .disclosure-banner .disclosure-icon { width: 24px; height: 24px; }
body[data-route="table"] .game-layout { max-width: none; }
body[data-route="table"] .poker-shell { padding: 5px; border-radius: 5px; }
body[data-route="table"] .install-button { display: none !important; }
body[data-route="table"] .poker-table {
  min-height: clamp(520px,calc(100dvh - 182px),900px);
  border-radius: 3px;
}

.poker-shell {
  border-color: rgba(255,255,255,.16);
  background: linear-gradient(180deg,#191a1e,#070809);
}
.poker-table {
  background:
    radial-gradient(circle at 8% 84%,rgba(255,255,255,.1),transparent 12%),
    radial-gradient(circle at 92% 82%,rgba(255,255,255,.08),transparent 13%),
    linear-gradient(116deg,transparent 0 9%,rgba(255,255,255,.12) 18%,transparent 28% 72%,rgba(255,255,255,.1) 82%,transparent 91%),
    radial-gradient(ellipse at 50% 44%,#22262a 0 38%,#08090b 72%,#020303 100%);
}
.poker-table::before {
  opacity: .74;
  background:
    linear-gradient(101deg,transparent 0 8%,rgba(255,255,255,.12) 17%,transparent 28% 69%,rgba(255,255,255,.11) 79%,transparent 90%),
    radial-gradient(ellipse at 50% 0,rgba(255,255,255,.16),transparent 42%);
}
.poker-table::after {
  inset: 9% 5.5% 23%;
  background:
    radial-gradient(circle at 51% 36%,rgba(255,255,255,.15),transparent 31%),
    radial-gradient(ellipse at 50% 44%,#48a3a4 0%,#2d898d 48%,#17666c 100%);
  box-shadow: inset 0 0 110px rgba(0,32,37,.38), inset 0 1px 2px rgba(255,255,255,.54);
}
.felt-ring {
  inset: 7.6% 4.1% 21.5%;
  border-width: clamp(18px,2.2vw,33px);
  border-color: #24282c;
  background: transparent;
  box-shadow:
    inset 0 0 0 2px rgba(255,255,255,.18),
    inset 0 0 48px rgba(0,0,0,.78),
    0 22px 44px rgba(0,0,0,.82),
    0 -2px 18px rgba(143,231,236,.24);
}
.felt-ring::after { border-color: rgba(216,252,255,.52); box-shadow: 0 0 16px rgba(180,245,248,.35); }
.table-brand { top: 43%; color: rgba(236,255,255,.22); }
.table-brand span,
.table-brand strong { font-size: clamp(1.9rem,5.8vw,5.5rem); }

.pot-display {
  top: 52%;
  left: 42%;
  min-width: 138px;
  padding: 3px 12px 5px;
  border: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
}
.pot-display > .pot-label { color: #c9ffff; font-size: .66rem; font-weight: 800; }
.pot-display strong { margin-top: -1px; color: #fff; font-size: .88rem; }
.pot-chip-stack { width: 104px; height: 44px; margin: 2px auto 0; }
.board { top: 43%; gap: clamp(5px,.55vw,9px); }
.board .playing-card { width: clamp(43px,4.6vw,67px); border-width: 2px; border-radius: 8px; }
.board .playing-card b,
.board .playing-card i { font-size: clamp(1rem,1.8vw,1.45rem); }

.seat {
  grid-template-columns: minmax(110px,1fr) 86px;
  grid-template-areas: "copy avatar" "move move";
  width: clamp(220px,20vw,300px);
  min-height: 78px;
  gap: 0 4px;
  padding: 5px 8px 5px 18px;
  border: 3px solid rgba(177,184,189,.8);
  border-radius: 42px;
  background: linear-gradient(180deg,rgba(26,28,31,.99),rgba(1,2,3,.99));
  box-shadow: inset 0 1px rgba(255,255,255,.2),0 7px 17px rgba(0,0,0,.78);
}
.seat.is-left-half {
  grid-template-columns: 86px minmax(110px,1fr);
  grid-template-areas: "avatar copy" "move move";
  padding-right: 18px;
  padding-left: 8px;
}
.seat-copy { justify-items: center; text-align: center; }
.seat-copy strong { color: #f5f6f7; font-size: clamp(.86rem,1.18vw,1.12rem); font-weight: 500; }
.seat-copy small { margin-top: 4px; color: #72ff61; font-size: clamp(.76rem,1.12vw,1.04rem); font-weight: 700; text-shadow: 0 0 8px rgba(112,255,95,.25); }
.seat-avatar {
  width: 84px;
  height: 84px;
  border-width: 5px;
  border-color: rgba(197,202,207,.92);
  background: #30343a;
  box-shadow: 0 0 0 3px rgba(75,79,84,.96),0 8px 20px rgba(0,0,0,.65);
}
.seat:not(.is-left-half) .seat-avatar { margin-right: -24px; }
.seat.is-left-half .seat-avatar { margin-left: -24px; }
.seat em {
  position: absolute;
  top: -26px;
  left: 50%;
  grid-area: auto;
  min-height: 0;
  padding: 2px 12px;
  background: rgba(0,0,0,.62);
  color: #6cff6d;
  font-size: .78rem;
  transform: translateX(-50%);
}
.seat.is-active {
  border-color: #f3f4f5;
  box-shadow: 0 0 0 3px rgba(255,255,255,.2),0 0 34px rgba(255,255,255,.24),0 8px 21px rgba(0,0,0,.8);
}
.seat.is-hero { border-color: #e9ecee; background: linear-gradient(180deg,rgba(52,54,57,.98),rgba(5,6,7,.99)); }
.seat.is-folded { opacity: .62; }
.seat-timer { inset: -7px; border-width: 4px; border-color: #eef76c; border-radius: 47px; }
.dealer-button { top: auto; bottom: -10px; left: 13%; width: 24px; height: 24px; border-color: #f2b85a; background: #fff; color: #87520c; }
.opponent-cards { top: -29px; }
.card-back { width: 25px; }

.seat-wager {
  top: calc(100% + 8px);
  display: grid;
  min-width: 104px;
  justify-items: center;
  gap: 1px;
  font-size: .78rem;
}
.seat.is-lower-half .seat-wager { bottom: calc(100% + 8px); }
.seat.is-left-half .seat-wager {
  top: 50%;
  bottom: auto;
  left: calc(100% + 11px);
  transform: translateY(-50%);
}
.seat.is-right-half .seat-wager {
  top: 50%;
  right: calc(100% + 11px);
  bottom: auto;
  left: auto;
  transform: translateY(-50%);
}
.seat-wager b {
  padding: 0 5px;
  border: 0;
  background: transparent;
  box-shadow: none;
  color: #fff;
  font-size: .82rem;
  font-weight: 500;
  text-shadow: 0 2px 5px #000;
}
.chip-stack { position: relative; display: block; width: 98px; height: 42px; }
.chip-stack .chip-token {
  position: absolute;
  z-index: calc(10 - var(--chip-index));
  bottom: 3px;
  left: calc(var(--chip-index) * 12px);
  display: grid;
  width: 36px;
  height: 17px;
  place-items: center;
  border: 3px dashed rgba(255,255,255,.94);
  border-radius: 50%;
  background: radial-gradient(ellipse at 47% 44%,#fff5ad 0 18%,#d2a321 20% 62%,#704408 64%);
  box-shadow: 0 2px 1px rgba(0,0,0,.72),inset 0 0 0 2px rgba(255,255,255,.22);
  font-style: normal;
}
.chip-stack .chip-token:nth-child(even) { transform: translateY(-3px); }
.chip-stack .chip-token > span {
  color: #17110a;
  font: 900 .46rem/1 Arial,sans-serif;
  letter-spacing: -.04em;
  text-transform: none;
  text-shadow: 0 1px rgba(255,255,255,.4);
}
.chip-stack .chip-token::after {
  position: absolute;
  top: -10px;
  right: -7px;
  color: #fff;
  content: attr(data-count);
  font: 800 .48rem/1 Arial,sans-serif;
  text-shadow: 0 1px 3px #000;
}
.chip-stack .chip-tone-1 { background: radial-gradient(ellipse at 47% 44%,#f7fbff 0 18%,#e5e8eb 20% 62%,#717980 64%); }
.chip-stack .chip-tone-2 { background: radial-gradient(ellipse at 47% 44%,#d3fff3 0 18%,#36c999 20% 62%,#086245 64%); }
.chip-stack .chip-tone-3 { background: radial-gradient(ellipse at 47% 44%,#e4edff 0 18%,#4a75dc 20% 62%,#142e69 64%); }
.chip-stack .chip-tone-4 { background: radial-gradient(ellipse at 47% 44%,#ffe2e3 0 18%,#de535a 20% 62%,#77161b 64%); }
.chip-stack .chip-tone-5 { background: radial-gradient(ellipse at 47% 44%,#f8e6ff 0 18%,#a657d0 20% 62%,#492064 64%); }

.hero-cards { top: 59%; left: 73%; }
.hero-cards .playing-card { width: clamp(50px,5vw,72px); border-width: 2px; }
.seat.is-empty { z-index: 4; width: clamp(126px,12vw,168px); min-height: 48px; padding: 4px 9px; border-width: 2px; }
.seat.is-empty button { min-height: 36px; }

@media (max-width: 1100px) {
  .seat { width: clamp(164px,19vw,218px); min-height: 66px; grid-template-columns: minmax(76px,1fr) 68px; padding-left: 10px; }
  .seat.is-left-half { grid-template-columns: 68px minmax(76px,1fr); padding-right: 10px; }
  .seat-avatar { width: 66px; height: 66px; }
  .seat:not(.is-left-half) .seat-avatar { margin-right: -18px; }
  .seat.is-left-half .seat-avatar { margin-left: -18px; }
  .seat-copy strong { font-size: .8rem; }
  .seat-copy small { font-size: .72rem; }
  .chip-stack { width: 78px; transform: scale(.84); transform-origin: center bottom; }
}

@media (min-width: 821px) {
  .seat.is-hero,
  .seat.is-lower-half:not(.is-left-half):not(.is-right-half) { left: 62%; }
}

@media (max-width: 820px) {
  body[data-route="table"] .table-view { padding-inline: 4px; }
  body[data-route="table"] .poker-table { min-height: clamp(500px,88vw,680px); }
  .poker-table::after { inset: 12% 5% 25%; }
  .felt-ring { inset: 10% 3.8% 23%; border-width: 14px; }
  .seat { width: 132px; min-height: 54px; grid-template-columns: minmax(67px,1fr) 46px; padding: 3px 5px 3px 9px; border-width: 2px; }
  .seat.is-left-half { grid-template-columns: 46px minmax(67px,1fr); padding-right: 9px; padding-left: 5px; }
  .seat-avatar { width: 46px; height: 46px; border-width: 3px; }
  .seat-copy strong { font-size: .64rem; }
  .seat-copy small { margin-top: 2px; font-size: .59rem; }
  .seat em { top: -20px; padding-inline: 6px; font-size: .58rem; }
  .seat-wager { min-width: 74px; font-size: .58rem; }
  .seat-wager b { font-size: .59rem; }
  .chip-stack { width: 72px; height: 31px; transform: scale(.7); }
  .pot-chip-stack { margin-top: -2px; transform: scale(.72); }
  .pot-display { top: 26%; left: 50%; }
  .board .playing-card { width: clamp(31px,6.2vw,46px); }
  .hero-cards { top: 66%; left: 58%; }
  .hero-cards .playing-card { width: clamp(38px,7vw,52px); }
}

@media (max-width: 560px) {
  body[data-route="table"] .table-toolbar { min-height: 52px; }
  body[data-route="table"] .disclosure-banner { margin-block: 3px; }
  body[data-route="table"] .poker-table { min-height: clamp(470px,120vw,620px); }
  .poker-table::after { inset: 15% 4% 27%; }
  .felt-ring { inset: 13% 2.5% 25%; border-width: 10px; }
  .table-brand { top: 44%; }
  .pot-display { top: 27%; min-width: 78px; }
  .pot-display > .pot-label { font-size: .52rem; }
  .pot-display strong { font-size: .65rem; }
  .board { top: 44%; }
  .seat { width: 108px; min-height: 45px; grid-template-columns: minmax(56px,1fr) 38px; border-radius: 28px; }
  .seat.is-left-half { grid-template-columns: 38px minmax(56px,1fr); }
  .seat-avatar { width: 38px; height: 38px; }
  .seat:not(.is-left-half) .seat-avatar { margin-right: -12px; }
  .seat.is-left-half .seat-avatar { margin-left: -12px; }
  .seat-copy strong { font-size: .55rem; }
  .seat-copy small { font-size: .5rem; }
  .opponent-cards { top: -19px; }
  .card-back { width: 17px; border-width: 1px; }
  .seat-wager { top: calc(100% + 3px); transform: translateX(-50%) scale(.8); }
  .seat.is-lower-half .seat-wager { bottom: calc(100% + 3px); }
}

/* Stable desktop table geometry: one viewport, no stacked page bands. */
@media (min-width: 821px) {
  body[data-route="table"] { height: 100dvh; overflow: hidden; }
  body[data-route="table"] .table-view { height: 100dvh; min-height: 0; padding: 0 5px 5px; overflow: hidden; }
  body[data-route="table"] .table-toolbar { min-height: 54px; height: 54px; }
  body[data-route="table"] .table-toolbar p { margin-top: 1px; }
  body[data-route="table"] .game-rule-strip { margin-top: 2px; }
  body[data-route="table"] .rule-badge,
  body[data-route="table"] .game-badge { min-height: 19px; padding: 2px 7px; font-size: .56rem; }
  body[data-route="table"] .disclosure-banner { display: none; }
  body[data-route="table"] .table-session-banner {
    position: absolute;
    z-index: 28;
    top: 61px;
    left: 50%;
    width: max-content;
    max-width: min(720px,70vw);
    margin: 0;
    padding: 5px 13px;
    border-radius: 999px;
    background: rgba(10,12,12,.78);
    box-shadow: 0 5px 18px rgba(0,0,0,.42);
    transform: translateX(-50%);
    backdrop-filter: blur(9px);
  }
  body[data-route="table"] .table-session-banner strong,
  body[data-route="table"] .table-session-banner span { font-size: .64rem; }
  body[data-route="table"] .game-layout { height: calc(100dvh - 59px); }
  body[data-route="table"] .poker-shell { height: 100%; min-height: 0; box-sizing: border-box; }
  body[data-route="table"] .poker-table { height: 100%; min-height: 0; }
  body[data-route="table"] .hand-meta { top: 8px; }

  .seat {
    width: clamp(194px,18vw,248px);
    min-height: 70px;
    grid-template-columns: minmax(96px,1fr) 76px;
    padding-left: 14px;
  }
  .seat.is-left-half {
    grid-template-columns: 76px minmax(96px,1fr);
    padding-right: 14px;
  }
  .seat-avatar { width: 74px; height: 74px; }
  .seat:not(.is-left-half) .seat-avatar { margin-right: -20px; }
  .seat.is-left-half .seat-avatar { margin-left: -20px; }
  .seat-copy strong { font-size: clamp(.78rem,1vw,.96rem); }
  .seat-copy small { font-size: clamp(.7rem,.94vw,.88rem); }
  .seat.is-empty { width: 120px; min-height: 42px; padding: 3px 8px; }
  .seat.is-empty button { min-height: 32px; font-size: .66rem; }
  .poker-shell > .action-panel,
  .poker-shell > .pre-action-panel { right: 9px; bottom: 9px; width: min(650px,53%); }
  .table-side-panel,
  .table-side-panel.is-open { bottom: 9px; left: 9px; }
}

/* Lobby: room inspector lives in its own right column next to featured tables + "Tutti i tavoli",
   sticky under the header, so "Vedi room" / a row click shows the room at once instead of
   bottom-right below the fold. */
.lobby-content { display: grid; grid-template-columns: minmax(0, 1fr) minmax(330px, 370px); gap: 0 20px; align-items: start; }
.lobby-main-column { min-width: 0; }
.room-inspector .room-actions { grid-column: 1 / -1; }
.lobby-content > .room-inspector { position: sticky; top: calc(var(--header-h) + 12px); max-height: calc(100dvh - var(--header-h) - 24px); overflow: auto; overscroll-behavior: contain; scroll-margin-top: calc(var(--header-h) + 12px); }
.lobby-content > .room-inspector[hidden] { display: none; }
.room-actions { display: grid; gap: 10px; }
.room-actions .room-disclosure { margin: 0; }
.room-actions .secondary-button[hidden] { display: none; }
.room-inspector.is-competition .competition-card { order: 2; }
.room-inspector.is-competition .room-actions { order: 3; }
.room-inspector.is-revealed { animation: room-reveal 1.1s ease-out 1; }
@keyframes room-reveal { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--green) 70%, transparent), var(--shadow); } 100% { box-shadow: 0 0 0 14px transparent, var(--shadow); } }
.table-session-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.table-session-actions[hidden] { display: none; }
.table-session-actions a, .seat-gate-actions a { display: inline-flex; align-items: center; justify-content: center; text-decoration: none; }
.seat-gate-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 16px; }
.seat-gate-actions [hidden] { display: none; }
.seat-gate-actions .text-button { grid-column: 1 / -1; justify-self: center; }
.seat-gate-actions > :only-child { grid-column: 1 / -1; }
@media (max-width: 1180px) {
  .lobby-content { grid-template-columns: minmax(0, 1fr); }
  .lobby-content > .room-inspector { position: static; max-height: none; overflow: visible; margin-top: 18px; }
}
@media (max-width: 560px) {
  .seat-gate-actions { grid-template-columns: 1fr; }
}
@media (min-width: 1181px) and (max-height: 920px) {
  .lobby-content > .room-inspector { gap: 10px; padding: 14px; }
  .lobby-content > .room-inspector .room-seat-map { min-height: 236px; margin: 4px 12px; border-width: 10px; }
  .lobby-content > .room-inspector .room-metrics dd { font-size: .74rem; }
}

/* ---- Stadium table (2026-09-29): PokerStars-style pill. ----
   Straight top/bottom rails, semicircular ends (border-radius = half the short side), ~2:1 green
   felt inside a thick padded dark-grey rail. On phones the pill stands upright. app.js spreads the
   seats at equal arc length along this rail and points bets / dealer button toward the centre. */
.poker-table { --felt-top: 15%; --felt-height: 60%; --felt-ratio: 2.05; --felt-max-width: 78%; }
.felt-ring {
  top: var(--felt-top);
  bottom: auto;
  left: 50%;
  right: auto;
  height: var(--felt-height);
  width: auto;
  aspect-ratio: var(--felt-ratio);
  max-width: var(--felt-max-width);
  transform: translateX(-50%);
  border: clamp(18px, 2.3vw, 34px) solid transparent;
  border-radius: 9999px;
  background:
    radial-gradient(ellipse 70% 62% at 50% 42%, rgba(255,255,255,.13), transparent 70%) padding-box,
    radial-gradient(ellipse at 50% 48%, #3aa653 0%, #26873c 46%, #16612a 100%) padding-box,
    linear-gradient(180deg, #55595e 0%, #34373b 22%, #232528 60%, #151618 100%) border-box;
  box-shadow:
    0 0 0 2px #0c0d0e,
    0 22px 46px rgba(0,0,0,.85),
    inset 0 0 0 2px rgba(0,0,0,.55),
    inset 0 10px 38px rgba(0,0,0,.42),
    inset 0 -6px 26px rgba(0,0,0,.28);
}
/* Inner padded lip of the rail. */
.felt-ring::after {
  inset: -3px;
  border: 3px solid rgba(20,22,24,.95);
  border-radius: inherit;
  box-shadow: 0 0 0 1px rgba(255,255,255,.16), inset 0 2px 6px rgba(0,0,0,.5);
}
.poker-table::after { display: none; }
.table-brand { top: calc(var(--felt-top) + var(--felt-height) * .5); color: rgba(255,255,255,.1); transform: translate(-50%, -50%); }
.board { top: calc(var(--felt-top) + var(--felt-height) * .5); }
/* Pot label at the top centre of the felt, below the top rail. */
.pot-display { top: calc(var(--felt-top) + clamp(34px, 4.4vw, 64px)); left: 50%; transform: translateX(-50%); z-index: 2; }
.pot-display .pot-chip-stack { display: none; }
/* Bets in front of each player, toward the centre of the felt (offsets computed in app.js). */
.table-seats .seat.is-stadium .seat-wager,
.table-seats .seat.is-stadium.is-lower-half .seat-wager,
.table-seats .seat.is-stadium.is-left-half .seat-wager,
.table-seats .seat.is-stadium.is-right-half .seat-wager {
  top: calc(50% + var(--bet-dy, 0px));
  bottom: auto;
  left: calc(50% + var(--bet-dx, 0px));
  right: auto;
  transform: translate(-50%, -50%) scale(var(--bet-scale, 1));
}
.table-seats .seat.is-stadium .dealer-button {
  top: calc(50% + var(--dealer-dy, 0px));
  bottom: auto;
  left: calc(50% + var(--dealer-dx, 0px));
  z-index: 6;
  transform: translate(-50%, -50%);
  box-shadow: 0 3px 6px rgba(0,0,0,.6);
}
/* Hero hole cards rest on the hero seat, inside the felt. */
.hero-cards { top: var(--hero-cards-top, 59%); left: var(--hero-cards-x, 50%); }
@media (min-width: 821px) {
  .seat.is-hero,
  .seat.is-lower-half:not(.is-left-half):not(.is-right-half) { left: var(--seat-x); }
  .hero-cards { top: var(--hero-cards-top, 59%); left: var(--hero-cards-x, 50%); }
  .table-seats[data-seat-count="8"] .seat:not(.is-empty),
  .table-seats[data-seat-count="9"] .seat:not(.is-empty),
  .table-seats[data-seat-count="10"] .seat:not(.is-empty) { width: 176px; grid-template-columns: minmax(80px,1fr) 64px; }
  .table-seats[data-seat-count="8"] .seat.is-left-half:not(.is-empty),
  .table-seats[data-seat-count="9"] .seat.is-left-half:not(.is-empty),
  .table-seats[data-seat-count="10"] .seat.is-left-half:not(.is-empty) { grid-template-columns: 64px minmax(80px,1fr); }
  .table-seats[data-seat-count="8"] .seat-avatar,
  .table-seats[data-seat-count="9"] .seat-avatar,
  .table-seats[data-seat-count="10"] .seat-avatar { width: 64px; height: 64px; }
  .table-seats[data-seat-count="8"] .seat.is-empty,
  .table-seats[data-seat-count="9"] .seat.is-empty,
  .table-seats[data-seat-count="10"] .seat.is-empty { width: 140px; }
}
@media (max-width: 1100px) {
  .poker-table { --felt-max-width: 74%; }
}
@media (max-width: 820px) {
  .poker-table { --felt-top: 17%; --felt-height: 52%; --felt-ratio: 1.8; --felt-max-width: 70%; }
  .felt-ring { border-width: 14px; }
  .pot-display { top: calc(var(--felt-top) + 24px); }
}
/* Phones: upright pill. */
@media (max-width: 560px) {
  body[data-route="table"] .poker-table { min-height: clamp(520px, 138vw, 640px); }
  .poker-table { --felt-top: 11%; --felt-height: 72%; --felt-ratio: .56; --felt-max-width: 62%; }
  .felt-ring { border-width: 11px; }
  .pot-display { top: calc(var(--felt-top) + 52px); }
  .board .playing-card { width: clamp(24px, 7vw, 28px); }
  .seat.is-empty { width: 96px; min-height: 40px; padding: 3px 6px; }
  .table-seats[data-seat-count="8"] .seat.is-empty, .table-seats[data-seat-count="9"] .seat.is-empty, .table-seats[data-seat-count="10"] .seat.is-empty { width: 78px; min-height: 36px; }
  .board { gap: 3px; }
  .table-brand span, .table-brand strong { font-size: clamp(1.3rem, 7vw, 2rem); }
  .table-seats .seat.is-stadium { --bet-scale: .8; }
  .table-seats[data-seat-count="8"] .seat, .table-seats[data-seat-count="9"] .seat, .table-seats[data-seat-count="10"] .seat { width: 86px; }
  /* Crowded phone tables: compact one-line seat (small avatar + name/stack), avatar kept inside the pill. */
  .table-seats[data-seat-count="8"] .seat.is-stadium:not(.is-empty),
  .table-seats[data-seat-count="9"] .seat.is-stadium:not(.is-empty),
  .table-seats[data-seat-count="10"] .seat.is-stadium:not(.is-empty) { width: 100px; min-height: 42px; padding: 3px 6px; column-gap: 4px; grid-template-columns: minmax(0,1fr) 32px; }
  .table-seats[data-seat-count="8"] .seat.is-stadium.is-left-half:not(.is-empty),
  .table-seats[data-seat-count="9"] .seat.is-stadium.is-left-half:not(.is-empty),
  .table-seats[data-seat-count="10"] .seat.is-stadium.is-left-half:not(.is-empty) { grid-template-columns: 32px minmax(0,1fr); }
  .table-seats[data-seat-count="8"] .seat.is-stadium .seat-avatar,
  .table-seats[data-seat-count="9"] .seat.is-stadium .seat-avatar,
  .table-seats[data-seat-count="10"] .seat.is-stadium .seat-avatar { width: 32px; height: 32px; margin: 0 !important; border-width: 2px; }
  .table-seats[data-seat-count="8"] .seat.is-stadium .seat-copy strong,
  .table-seats[data-seat-count="9"] .seat.is-stadium .seat-copy strong,
  .table-seats[data-seat-count="10"] .seat.is-stadium .seat-copy strong { font-size: .58rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
}
/* An empty status label must not draw an empty dark pill above the seat. */
.seat em:empty { display: none; }

/* ---- Action bar (2026-09-29): PokerStars-style bottom bar on the hero's turn. ----
   Big red Fold / Check-Chiama / Punta-Rilancia buttons on the left, bet box with -/+ and slider on
   the right (step = big blind, min bet .. all-in), green Time Bank pill above the bar. */
.action-panel .action-context,
.action-panel .bet-control > label,
.action-panel .bet-presets { display: none; }
.action-panel {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(280px, 1fr);
  grid-template-areas: "buttons bet";
  align-items: stretch;
  gap: 12px;
  padding: 10px 12px !important;
  border-color: rgba(255,255,255,.12);
  background: linear-gradient(180deg, rgba(18,18,20,.9), rgba(4,4,5,.97));
}
.action-panel[hidden] { display: none; }
.action-panel .action-buttons { grid-area: buttons; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin: 0; }
.action-panel .action-button,
.action-panel .action-button.fold,
.action-panel .action-button.check,
.action-panel .action-button.raise {
  min-height: 66px;
  border: 2px solid #ff6a5f;
  border-radius: 14px;
  background: linear-gradient(180deg, #ea3b32 0%, #c21d17 55%, #8f0f0c 100%);
  color: #fff;
  box-shadow: inset 0 1px rgba(255,255,255,.45), 0 6px 16px rgba(0,0,0,.55);
  font-size: 1.12rem;
  font-weight: 800;
  text-shadow: 0 1px 2px rgba(0,0,0,.6);
}
.action-panel .action-button:hover:not(:disabled) { filter: brightness(1.1); }
.action-panel .action-button:disabled { opacity: .45; filter: grayscale(.4); }
.action-panel .action-button small { display: block; color: #fff; font-size: .9rem; font-weight: 700; opacity: .95; }
.action-panel .action-button kbd { opacity: .55; }
.action-panel .bet-control {
  grid-area: bet;
  display: grid;
  align-content: center;
  margin: 0;
  padding: 8px 10px;
  border: 2px solid #b8231d;
  border-radius: 14px;
  background: linear-gradient(180deg, #5a1411, #2b0907);
}
.action-panel .bet-control[hidden] { display: none; }
.bet-slider-row { display: grid; grid-template-columns: minmax(76px, 104px) 46px minmax(90px, 1fr) 46px; gap: 8px; align-items: center; }
.bet-amount-box {
  height: 46px;
  min-width: 0;
  padding: 0 8px;
  border: 1px solid #000;
  border-radius: 8px;
  background: #050505;
  color: #fff;
  font: 700 1rem/1 inherit;
  font-variant-numeric: tabular-nums;
  text-align: center;
}
.bet-step {
  height: 46px;
  border: 1px solid #6f7479;
  border-radius: 9px;
  background: linear-gradient(180deg, #5c6166, #2a2d30);
  color: #fff;
  cursor: pointer;
  font-size: 1.5rem;
  font-weight: 800;
  line-height: 1;
}
.bet-step:active { transform: translateY(1px); }
.bet-slider-row input[type="range"] { width: 100%; accent-color: #d8dcdf; }
.time-bank {
  position: absolute;
  z-index: 2;
  top: -42px;
  right: 10px;
  padding: 7px 14px;
  border: 1px solid #7ff08b;
  border-radius: 10px;
  background: linear-gradient(180deg, #2fbf4a, #178a2c);
  color: #fff;
  box-shadow: 0 4px 12px rgba(0,0,0,.55);
  font-size: .95rem;
  font-weight: 800;
  text-shadow: 0 1px 2px rgba(0,0,0,.5);
  pointer-events: none;
}
@media (min-width: 821px) {
  body[data-route="table"] .poker-shell > .action-panel { left: 9px; right: 9px; bottom: 9px; width: auto; z-index: 40; }
  body[data-route="table"] .poker-shell > .pre-action-panel { z-index: 40; }
}
@media (max-width: 820px) {
  .action-panel { grid-template-columns: 1fr; grid-template-areas: "bet" "buttons"; gap: 8px; padding: 8px !important; }
  .action-panel .action-button, .action-panel .action-button.fold, .action-panel .action-button.check, .action-panel .action-button.raise { min-height: 56px; font-size: 1rem; }
  .bet-slider-row { grid-template-columns: 84px 42px minmax(60px, 1fr) 42px; gap: 6px; }
  .bet-amount-box, .bet-step { height: 42px; }
  .time-bank { top: -36px; right: 8px; padding: 5px 10px; font-size: .8rem; }
  body[data-route="table"] .poker-shell > .action-panel { position: relative; overflow: visible; }
}

/* Top bar: LOBBY · AGGIUNGI · MENU · LASCIA. */
.table-quickbar { display: flex; gap: 6px; align-items: center; }
.table-toolbar > .table-quickbar { grid-column: 1; grid-row: 1; justify-self: start; margin-left: 8px; }
.table-toolbar > div:not([class]) { grid-column: 2; grid-row: 1; }
.table-toolbar > .table-toolbar-actions { grid-column: 3; grid-row: 1; }
.quickbar-button {
  min-height: 32px;
  padding: 5px 12px;
  border: 1px solid rgba(255,255,255,.22);
  border-radius: 8px;
  background: linear-gradient(180deg, #34383c, #151719);
  color: #f2f4f5;
  cursor: pointer;
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
}
.quickbar-button:hover { border-color: rgba(255,255,255,.45); }
.quickbar-button.is-leave { border-color: rgba(255,112,100,.6); background: linear-gradient(180deg, #7b1d18, #3b0c0a); }
.quickbar-button.is-leave[data-confirming="true"] { background: #d0271f; }
.table-toolbar > .back-button { display: none; }
@media (max-width: 560px) {
  .table-toolbar > .table-quickbar { grid-column: 1 / -1; grid-row: 2; width: auto; margin: 4px 6px 2px; justify-content: space-between; }
  .quickbar-button { flex: 1; padding: 5px 6px; font-size: .64rem; }
  /* Title never runs under the icon buttons on narrow phones. */
  body[data-route="table"] .table-toolbar > div:not([class]) { min-width: 0; padding-left: 8px; justify-self: stretch; text-align: left; }
  body[data-route="table"] .table-toolbar h1 { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: clamp(.84rem, 4.2vw, 1rem) !important; }
}

/* ---- Phones (2026-09-29): playable one-handed, installable PWA. ----
   Action bar pinned to the bottom above the home indicator, big tap targets, thumb-sized slider,
   notch-safe toolbar, no horizontal scrolling. */
html, body { max-width: 100%; overflow-x: hidden; }
@media (max-width: 820px) {
  body[data-route="table"] .poker-shell > .action-panel {
    position: fixed;
    z-index: 60;
    right: max(6px, env(safe-area-inset-right));
    bottom: 0;
    left: max(6px, env(safe-area-inset-left));
    width: auto;
    margin: 0;
    padding: 8px 8px calc(8px + env(safe-area-inset-bottom)) !important;
    border-radius: 16px 16px 0 0;
    box-shadow: 0 -10px 30px rgba(0,0,0,.6);
  }
  body[data-route="table"] .poker-shell:has(> .action-panel:not([hidden])) { padding-bottom: calc(158px + env(safe-area-inset-bottom)); }
  body[data-route="table"] .table-toolbar { padding-top: env(safe-area-inset-top); padding-left: max(4px, env(safe-area-inset-left)); padding-right: max(4px, env(safe-area-inset-right)); }
  .action-panel .action-button, .action-panel .action-button.fold, .action-panel .action-button.check, .action-panel .action-button.raise { min-height: 58px; touch-action: manipulation; }
  .bet-step { min-width: 46px; height: 46px; touch-action: manipulation; }
  .bet-amount-box { height: 46px; font-size: 16px; } /* 16px: no iOS zoom on focus */
  .bet-slider-row input[type="range"] { height: 46px; touch-action: none; }
  .bet-slider-row input[type="range"]::-webkit-slider-thumb { width: 30px; height: 30px; }
  .bet-slider-row input[type="range"]::-moz-range-thumb { width: 30px; height: 30px; }
  .quickbar-button { min-height: 38px; touch-action: manipulation; }
  .toast, .toast-region { bottom: calc(170px + env(safe-area-inset-bottom)); }
}
@media (max-width: 380px) {
  .bet-slider-row { grid-template-columns: 70px 42px minmax(48px, 1fr) 42px; gap: 5px; }
  .action-panel .action-button { font-size: .92rem; }
}
/* Phone landscape (short viewport): compact toolbar, action bar on the right edge. */
@media (orientation: landscape) and (max-height: 520px) {
  body[data-route="table"] { height: 100dvh; overflow: hidden; }
  body[data-route="table"] .table-toolbar { min-height: 44px; padding-top: 0; padding-left: max(6px, env(safe-area-inset-left)); padding-right: max(6px, env(safe-area-inset-right)); }
  body[data-route="table"] .table-toolbar p,
  body[data-route="table"] .game-rule-strip,
  body[data-route="table"] .disclosure-banner,
  body[data-route="table"] .table-side-panel { display: none !important; }
  body[data-route="table"] .table-toolbar h1 { font-size: .9rem; }
  body[data-route="table"] .game-layout { height: calc(100dvh - 46px); }
  body[data-route="table"] .poker-table { height: 100%; min-height: 0; }
  .poker-table { --felt-top: 16%; --felt-height: 62%; --felt-ratio: 2.05; --felt-max-width: 62%; }
  .seat { width: 128px; min-height: 44px; }
  .seat-avatar { width: 38px; height: 38px; }
  .seat-copy strong { font-size: .6rem; }
  .seat-copy small { font-size: .56rem; }
  .board .playing-card { width: clamp(26px, 4.2vw, 34px); }
  .hero-cards .playing-card { width: 38px; }
  body[data-route="table"] .poker-shell > .action-panel {
    position: fixed;
    z-index: 60;
    top: auto;
    right: max(6px, env(safe-area-inset-right));
    bottom: max(6px, env(safe-area-inset-bottom));
    left: auto;
    width: min(300px, 36vw);
    grid-template-columns: 1fr;
    grid-template-areas: "bet" "buttons";
    gap: 6px;
    padding: 6px !important;
    border-radius: 12px;
  }
  .action-panel .action-buttons { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 5px; }
  .action-panel .action-button, .action-panel .action-button.fold, .action-panel .action-button.check, .action-panel .action-button.raise { min-height: 48px; font-size: .82rem; }
  .action-panel .action-button small { font-size: .66rem; }
  .bet-slider-row { grid-template-columns: 58px 40px minmax(40px, 1fr) 40px; gap: 4px; }
  .bet-amount-box, .bet-step { height: 40px; min-width: 40px; }
  .time-bank { top: -32px; padding: 4px 9px; font-size: .72rem; }
}

/* Phone portrait: compact chrome, table sized to the free space above the pinned bar. */
@media (max-width: 560px) and (orientation: portrait) {
  body[data-route="table"] .table-toolbar .game-rule-strip,
  body[data-route="table"] .table-toolbar p,
  body[data-route="table"] .hand-meta span:first-child { display: none; }
  body[data-route="table"] .table-toolbar { min-height: 0; row-gap: 2px; }
  body[data-route="table"] .table-toolbar h1 { font-size: 1rem; }
  body[data-route="table"] .poker-shell { padding-bottom: calc(146px + env(safe-area-inset-bottom)) !important; }
  body[data-route="table"] .poker-table {
    height: max(360px, calc(100dvh - var(--table-top, 110px) - 150px - env(safe-area-inset-bottom)));
    min-height: 0;
  }
  .poker-table { --felt-top: 9%; --felt-height: 76%; --felt-ratio: .6; --felt-max-width: 60%; }
  .board .playing-card { width: clamp(22px, 6.4vw, 27px); }
  .board { gap: 2px; }
  body[data-route="table"] .poker-shell > .pre-action-panel:not([hidden]) {
    position: fixed; z-index: 55; right: max(6px, env(safe-area-inset-right)); bottom: 0; left: max(6px, env(safe-area-inset-left));
    margin: 0; padding: 8px 8px calc(8px + env(safe-area-inset-bottom)); border-radius: 16px 16px 0 0; max-height: calc(140px + env(safe-area-inset-bottom)); overflow: auto;
  }
  .pre-action-heading span { display: none; }
  .pre-action-grid { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; gap: 6px !important; }
  .pre-action-grid button { min-height: 42px; touch-action: manipulation; }
  .action-panel .bet-control { padding: 5px 8px; }
}
@media (orientation: landscape) and (max-height: 520px) {
  body[data-route="table"] .poker-shell { display: block !important; padding: 4px calc(min(300px, 36vw) + 14px) 4px 4px !important; }
  body[data-route="table"] .poker-table { height: calc(100dvh - var(--table-top, 60px) - 8px); min-height: 0; }
  body[data-route="table"] .hand-meta { display: none; }
  .poker-table { --felt-top: 17%; --felt-height: 58%; --felt-ratio: 2.05; --felt-max-width: 82%; }
  .seat, .table-seats .seat { width: 104px; min-height: 42px; grid-template-columns: minmax(52px, 1fr) 36px; padding: 2px 5px 2px 8px; border-width: 2px; border-radius: 24px; }
  .seat.is-left-half { grid-template-columns: 36px minmax(52px, 1fr); padding: 2px 8px 2px 5px; }
  .seat-avatar { width: 36px; height: 36px; border-width: 2px; }
  .seat:not(.is-left-half) .seat-avatar { margin-right: -10px; }
  .seat.is-left-half .seat-avatar { margin-left: -10px; }
  .seat.is-empty { width: 86px; min-height: 34px; }
  .seat em { top: -17px; font-size: .52rem; }
  .opponent-cards { top: -17px; }
  .card-back { width: 15px; }
  .hero-cards .playing-card { width: 32px; }
  .table-seats .seat.is-stadium { --bet-scale: .72; }
  .pot-display { top: calc(var(--felt-top) + 18px); }
  .pot-display > .pot-label { font-size: .5rem; }
  .pot-display strong { font-size: .62rem; }
  .table-brand span, .table-brand strong { font-size: 1.4rem; }
  .toast { bottom: 12px; left: 35%; }
}

/* Account logout ("Esci") in the lobby header and in the table MENU; "Accedi" link when anonymous. */
.header-logout-button, .header-login-link { display: inline-flex; flex: 0 0 auto; align-items: center; justify-content: center; min-height: 38px; padding: 0 14px; border: 1px solid color-mix(in srgb, #d96a5d 55%, var(--border)); border-radius: 11px; background: color-mix(in srgb, #d96a5d 14%, var(--surface-2)); color: var(--text); font-size: .78rem; font-weight: 800; letter-spacing: .02em; text-decoration: none; white-space: nowrap; cursor: pointer; }
.header-logout-button:hover { border-color: #e88376; background: color-mix(in srgb, #d96a5d 24%, var(--surface-2)); }
.header-logout-button:disabled { opacity: .55; cursor: progress; }
.header-login-link { border-color: color-mix(in srgb, var(--green) 55%, var(--border)); background: var(--green-soft); color: var(--green-strong); }
.header-logout-button[hidden], .header-login-link[hidden], .settings-command-card[hidden] { display: none !important; }
.settings-command-card.is-logout { grid-column: 1 / -1; min-height: 64px; border-color: color-mix(in srgb, #d96a5d 45%, var(--border)); }
.settings-command-card.is-logout::before { background: color-mix(in srgb, #d96a5d 18%, var(--surface-2)); color: #e88376; content: "⎋"; }
.logout-confirm-dialog h2 { margin: 0 0 8px; font-size: 1.05rem; }
.logout-confirm-dialog p { margin: 0 0 18px; color: var(--muted); font-size: .86rem; line-height: 1.5; }
.logout-confirm-actions { display: flex; justify-content: flex-end; gap: 10px; flex-wrap: wrap; }
.logout-confirm-actions .primary-button { background: #c75b4f; box-shadow: none; }
@media (max-width: 560px) {
  .header-logout-button, .header-login-link { min-height: 35px; padding: 0 10px; font-size: .72rem; }
}

/* ===== QA fixes 2026-09-29 (buy-in, rebuy, reconnect, time bank, presets, colours, mobile) ===== */
/* Lobby: loading state instead of demo rooms. */
.lobby-placeholder { margin: 0; padding: 18px; color: var(--muted); text-align: center; }
.filters-hidden-notice { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0 0 8px; color: var(--muted); font-size: .8rem; }
.filters-hidden-notice[hidden] { display: none; }
.filters-hidden-notice .text-button { padding: 0; font-weight: 800; }
/* Desktop list: last column never clipped. */
@media (min-width: 761px) {
  .table-list { overflow-x: auto; }
  .table-list-head, .table-row { grid-template-columns: minmax(70px, .7fr) minmax(150px, 2fr) minmax(90px, 1.1fr) minmax(70px, .8fr) minmax(60px, .7fr) minmax(80px, .9fr) 28px !important; }
  .table-row > span:last-child { justify-self: end; padding-right: 6px; }
}
/* Reconnect + turn alert banners. */
.reconnect-banner, .turn-alert-banner {
  position: fixed; z-index: 90; top: calc(env(safe-area-inset-top, 0px) + 8px); left: 50%; transform: translateX(-50%);
  display: flex; align-items: center; gap: 10px; max-width: calc(100vw - 20px); padding: 9px 14px;
  border-radius: 999px; box-shadow: 0 10px 30px rgba(0,0,0,.45); font-weight: 800; font-size: .86rem;
}
.reconnect-banner { border: 1px solid #f2c662; background: #3a2b08; color: #ffe9b0; }
.reconnect-banner[data-state="offline"] { border-color: #ff7b72; background: #3b1212; color: #ffd8d4; }
.reconnect-banner .secondary-button { min-height: 30px; padding: 4px 12px; }
.reconnect-banner[hidden], .turn-alert-banner[hidden] { display: none; }
.turn-alert-banner { top: auto; bottom: calc(env(safe-area-inset-bottom, 0px) + 76px); border: 2px solid #ffd35c; background: #c21d17; color: #fff; cursor: pointer; animation: turn-alert-pulse 1s ease-in-out infinite; }
@keyframes turn-alert-pulse { 50% { box-shadow: 0 0 0 6px rgba(255,211,92,.35), 0 10px 30px rgba(0,0,0,.45); } }
[data-route="table"].has-turn-alert, .has-turn-alert { position: relative; }
.has-turn-alert::after { content: ""; position: absolute; top: 4px; right: 8px; width: 10px; height: 10px; border-radius: 50%; background: #ff3b30; box-shadow: 0 0 0 2px #fff; }
/* Buy-in / rebuy window. */
.buy-in-dialog .buy-in-picker { display: grid; gap: 10px; margin: 8px 0 14px; }
.buy-in-dialog .buy-in-picker[hidden] { display: none; }
.buy-in-dialog label { display: flex; justify-content: space-between; align-items: baseline; font-weight: 800; }
.buy-in-dialog output { color: var(--gold); font-size: 1.5rem; font-variant-numeric: tabular-nums; }
.buy-in-dialog input[type="range"] { width: 100%; height: 34px; accent-color: #45d6a2; }
.buy-in-dialog .buy-in-quick { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.buy-in-dialog .buy-in-quick button { min-height: 36px; padding: 4px; }
.buy-in-dialog .buy-in-bounds { display: flex; justify-content: space-between; gap: 8px; margin: 0; flex-wrap: wrap; }
/* Time bank: separate reserve, highlighted while it runs. */
.time-bank.is-running { background: #c21d17 !important; color: #fff !important; animation: turn-alert-pulse 1s ease-in-out infinite; }
.turn-time.is-urgent strong { color: #ff6a5f; }
/* Bet presets visible on live tables. */
body .action-panel .bet-presets { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; margin-top: 6px; }
body .action-panel .bet-presets button { min-height: 34px; padding: 4px 6px; border: 1px solid rgba(255,255,255,.25); border-radius: 9px; background: rgba(255,255,255,.1); color: #fff; font-size: .78rem; font-weight: 800; }
body .action-panel .bet-presets button span { display: inline; }
/* Action colours like PokerStars: Fold neutral, Check/Call green, Bet/Raise orange. */
body .action-panel .action-button.fold { border-color: #8d949b; background: linear-gradient(180deg, #5d636a, #33373c); }
body .action-panel .action-button.fold[data-confirming="true"] { border-color: #ffb13d; background: linear-gradient(180deg, #7a5a1c, #4a340c); }
body .action-panel .action-button.check { border-color: #58d18c; background: linear-gradient(180deg, #2f9e5e, #1a6a3c); }
body .action-panel .action-button.raise { border-color: #ffb13d; background: linear-gradient(180deg, #ef8a1a, #b05a06); }
body .action-panel .action-button.raise.is-all-in { border-color: #ff6a5f; background: linear-gradient(180deg, #e0412f, #9c1a10); }
/* Touch devices: no keyboard hints. */
@media (hover: none) and (pointer: coarse) { .action-button kbd, .action-panel .action-button kbd { display: none !important; } }
/* Pre-actions: situational checkboxes. */
.pre-action-grid button[hidden] { display: none !important; }
body .pre-action-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
/* 4-colour deck. */
html[data-table-four-color="on"] .playing-card[data-suit="d"] { color: #1f6fe0 !important; }
html[data-table-four-color="on"] .playing-card[data-suit="c"] { color: #149447 !important; }
html[data-table-four-color="on"] .playing-card[data-suit="h"] { color: #d62b2b !important; }
html[data-table-four-color="on"] .playing-card[data-suit="s"] { color: #111 !important; }
/* Pot: collected pot + total; round bets sweep into the pot. */
.pot-display .pot-total { display: block; margin-top: 2px; color: rgba(255,255,255,.72); font-size: .66rem; letter-spacing: .04em; text-transform: none; }
.pot-display .pot-total[hidden] { display: none; }
.poker-table.is-sweeping .seat-wager { transition: transform .55s ease-in, opacity .55s ease-in; opacity: 0; }
/* Showdown: revealed cards at the seat; result strip under the board, never over it. */
.opponent-cards.is-revealed { z-index: 8; }
.opponent-cards.is-revealed .showdown-card { width: 30px; box-shadow: 0 0 0 2px #f2c662; }
body .showdown-banner {
  top: auto; bottom: 6%; left: 50%; width: min(420px, calc(100% - 24px)); max-height: 32%;
  padding: 8px 12px; gap: 2px; border-width: 1px; border-radius: 12px;
  background: rgba(5,20,15,.9); box-shadow: 0 8px 24px rgba(0,0,0,.5); transform: translateX(-50%); pointer-events: none;
}
body .showdown-banner > strong { font-size: clamp(.95rem, 2.4vw, 1.2rem); }
body .showdown-banner > b { font-size: clamp(.9rem, 2.2vw, 1.05rem); }
body .showdown-banner .showdown-hands { display: none; }
body .showdown-banner .showdown-next { pointer-events: auto; }
/* Install button: small and out of the way (never over "Siediti"). */
.install-button { right: 10px !important; bottom: calc(env(safe-area-inset-bottom, 0px) + 74px) !important; left: auto !important; padding: 6px 10px !important; font-size: .72rem !important; opacity: .92; }
.install-button span[data-i18n] { display: none; }
@media (min-width: 761px) { .install-button span[data-i18n] { display: inline; } .install-button { bottom: 16px !important; } }
/* Mobile table: title vs ⚙, bets vs pot, hole cards vs "Tu". */
@media (max-width: 520px) {
  #table-title { max-width: calc(100vw - 150px); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .pot-display { top: 29% !important; }
  .table-seats .seat.is-stadium .seat-wager { --bet-scale: .78; }
  .seat.is-hero .seat-wager { --bet-dy-extra: -6px; }
  .hero-cards { z-index: 4; }
  .seat.is-hero .seat-copy { position: relative; z-index: 5; }
  body .action-panel .bet-presets button { min-height: 32px; font-size: .72rem; }
  body .showdown-banner { bottom: 3%; }
}
@media (max-width: 380px) {
  .table-toolbar h1 { font-size: 1.05rem; }
  body .action-panel .bet-presets button span { display: none; }
}
.showdown-hand.is-mucked .showdown-card-row { opacity: .6; font-style: italic; font-size: .8em; }
/* QA fixes: mobile lobby rows keep blinds and seats visible next to the name. */
@media (max-width: 820px) {
  .table-row { grid-template-columns: minmax(0, 1fr) auto 42px 18px; gap: 8px; }
  .table-row > span:nth-child(3), .table-row > span:nth-child(4) { display: block !important; font-size: .78rem; color: var(--muted); text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
}
/* Bet presets on their own row under the amount / slider (no overlap with + / -). */
body .action-panel .bet-control { grid-template-columns: minmax(0, 1fr) !important; gap: 0; }
body .action-panel .bet-control > .bet-slider-row, body .action-panel .bet-control > .bet-presets { grid-column: 1 / -1; }
@media (max-width: 520px) { body .action-panel .bet-presets button span { display: none; } }
/* Winner strip: one compact line at the bottom edge of the felt, never over the board or the hero. */
body .showdown-banner { bottom: 1.5%; max-height: 64px; padding: 5px 12px; display: flex !important; flex-wrap: wrap; align-items: baseline; justify-content: center; column-gap: 8px; row-gap: 0; width: auto; max-width: calc(100% - 24px); }
body .showdown-banner[hidden] { display: none !important; }
body .showdown-banner > span { font-size: .62rem; }
body .showdown-banner > strong { font-size: .95rem; }
body .showdown-banner > b { font-size: .95rem; }
body .showdown-banner > small { flex-basis: 100%; text-align: center; font-size: .62rem; opacity: .8; }
body .showdown-banner #next-hand-button[hidden] { display: none !important; }
@media (max-width: 520px) { body .showdown-banner > small { display: none; } body .showdown-banner { bottom: auto; top: 53%; max-height: 52px; } }
/* Compact action panel on phones so the hero seat stays visible above it. */
@media (max-width: 520px) {
  body .action-panel .bet-control { padding: 5px 8px; }
  body .action-panel .bet-slider-row .bet-step { height: 38px; min-height: 38px; }
  body .action-panel .bet-slider-row .bet-amount-box { height: 38px; min-height: 38px; }
  body .action-panel .bet-slider-row input[type="range"] { height: 38px; }
  body .action-panel .bet-presets { margin-top: 4px; gap: 5px; }
  body .action-panel .bet-presets button { min-height: 28px; padding: 2px 4px; }
  body .action-panel .action-button { min-height: 50px; }
}

/* ===== Table visuals 2026-09-30: SVG card faces, larger opponent / showdown cards, compact hero
   cards in a row, compact nameplates, bets never under the cards (see layoutSeatWagers in app.js). ===== */
/* -- Card faces (card-faces.js): classic pips, corner indices, court panels; mini face on small cards. */
.playing-card.has-face { position: relative; display: block; overflow: hidden; padding: 0; container-type: inline-size; border: 1px solid #cfd6d3; border-radius: 9% / 6.5%; background: linear-gradient(160deg, #ffffff 0%, #f6f8f7 60%, #eceff0 100%); line-height: 1; }
.playing-card.has-face > b, .playing-card.has-face > i { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }
.playing-card .card-face { position: absolute; inset: 0; display: block; width: 100%; height: 100%; fill: currentColor; }
.card-face text { fill: currentColor; font-family: "Inter", "Segoe UI", system-ui, -apple-system, Arial, sans-serif; font-weight: 800; }
.card-face .cf-rank { font-size: 27px; letter-spacing: -1px; }
.card-face .cf-court { font-family: Georgia, "Times New Roman", serif; font-size: 34px; font-weight: 700; }
.card-face .cf-frame { fill: #f7f1e3; stroke: currentColor; stroke-width: 1.4; stroke-opacity: .55; }
.card-face .cf-rule { stroke: currentColor; stroke-width: 1; stroke-opacity: .28; }
.card-face .cf-crown { fill: #d9aa2f; stroke: #8a6414; stroke-width: 1.2; stroke-linejoin: round; }
.card-face .cf-mini { display: none; }
.card-face .cf-mini .cf-rank { font-size: 56px; letter-spacing: -3px; }
@container (max-width: 41px) {
  .card-face .cf-full { display: none; }
  .card-face .cf-mini { display: inline; }
}
.board .playing-card.has-face { border-width: 1px; }
.playing-card.has-face.is-winning-card { box-shadow: 0 0 0 2px #ffd35c, 0 0 14px rgba(255,211,92,.75), 0 6px 14px rgba(0,0,0,.45) !important; }
.playing-card.has-face.is-dim-card { filter: brightness(.72) saturate(.8); }

/* -- Compact nameplates: name + stack, avatar kept small; timer ring, countdown and dealer button stay. */
.table-seats .seat:not(.is-empty) { width: 168px; min-height: 50px; grid-template-columns: minmax(0,1fr) 44px; column-gap: 4px; padding: 3px 6px 3px 12px; border-width: 2px; border-radius: 28px; }
.table-seats .seat.is-left-half:not(.is-empty) { grid-template-columns: 44px minmax(0,1fr); padding: 3px 12px 3px 6px; }
.table-seats .seat:not(.is-empty) .seat-avatar { width: 44px; height: 44px; margin: 0 !important; border-width: 3px; box-shadow: 0 0 0 2px rgba(75,79,84,.96), 0 4px 10px rgba(0,0,0,.6); }
.table-seats .seat .seat-copy { min-width: 0; }
.table-seats .seat .seat-copy strong { max-width: 100%; overflow: hidden; font-size: .8rem; line-height: 1.12; text-overflow: ellipsis; white-space: nowrap; }
.table-seats .seat .seat-copy small { margin-top: 2px; font-size: .8rem; line-height: 1.1; }
.table-seats .seat .seat-timer { inset: -5px; border-width: 3px; border-radius: 32px; }
.table-seats .seat em { top: auto; bottom: -11px; z-index: 6; max-width: 92%; overflow: hidden; padding: 1px 8px; border-radius: 999px; background: rgba(0,0,0,.78); font-size: .62rem; line-height: 1.35; text-overflow: ellipsis; white-space: nowrap; }
.table-seats .seat .seat-turn-countdown { right: -12px; bottom: auto; top: -10px; }
.table-seats[data-seat-count="8"] .seat:not(.is-empty), .table-seats[data-seat-count="9"] .seat:not(.is-empty), .table-seats[data-seat-count="10"] .seat:not(.is-empty) { width: 142px; min-height: 44px; grid-template-columns: minmax(0,1fr) 38px; padding: 2px 5px 2px 10px; }
.table-seats[data-seat-count="8"] .seat.is-left-half:not(.is-empty), .table-seats[data-seat-count="9"] .seat.is-left-half:not(.is-empty), .table-seats[data-seat-count="10"] .seat.is-left-half:not(.is-empty) { grid-template-columns: 38px minmax(0,1fr); padding: 2px 10px 2px 5px; }
.table-seats[data-seat-count="8"] .seat:not(.is-empty) .seat-avatar, .table-seats[data-seat-count="9"] .seat:not(.is-empty) .seat-avatar, .table-seats[data-seat-count="10"] .seat:not(.is-empty) .seat-avatar { width: 38px; height: 38px; }
.table-seats[data-seat-count="8"] .seat .seat-copy strong, .table-seats[data-seat-count="9"] .seat .seat-copy strong, .table-seats[data-seat-count="10"] .seat .seat-copy strong,
.table-seats[data-seat-count="8"] .seat .seat-copy small, .table-seats[data-seat-count="9"] .seat .seat-copy small, .table-seats[data-seat-count="10"] .seat .seat-copy small { font-size: .72rem; }
.table-seats .seat.is-pending-seat { border-style: dashed; animation: seat-pending-pulse 1s ease-in-out infinite; }
@keyframes seat-pending-pulse { 50% { box-shadow: 0 0 0 4px rgba(67,223,168,.28), 0 7px 17px rgba(0,0,0,.78); } }
.table-seats .seat.is-winner { border-color: #ffd35c; box-shadow: 0 0 0 3px rgba(255,211,92,.35), 0 0 26px rgba(255,211,92,.35), 0 7px 17px rgba(0,0,0,.78); }

/* -- Opponents' cards: bigger backs above the nameplate; showdown cards large, face up, in a row. */
.table-seats .seat .opponent-cards { top: auto; bottom: calc(100% - 4px); z-index: 3; gap: 0; transform: translateX(-50%); }
.table-seats .seat .card-back { width: 32px; border-width: 2px; border-radius: 4px; background-size: 7px 7px; }
.table-seats .seat .card-back + .card-back { margin-left: -12px; transform: rotate(7deg) translateY(1px); }
.table-seats .seat .opponent-cards > .card-back:first-child { transform: rotate(-4deg); }
.table-seats .seat .opponent-cards[data-card-count="4"] .card-back + .card-back,
.table-seats .seat .opponent-cards[data-card-count="5"] .card-back + .card-back { margin-left: -18px; }
.table-seats .seat .opponent-cards .stud-up-card { width: 32px; min-width: 0; height: auto; margin-left: -6px; font-size: inherit; }
.table-seats .seat .opponent-cards.is-revealed { bottom: calc(100% + 1px); z-index: 8; gap: 3px; }
.table-seats .seat .opponent-cards.is-revealed .showdown-card { width: 48px; margin: 0; box-shadow: 0 6px 14px rgba(0,0,0,.55); }
.table-seats .seat .opponent-cards.is-revealed[data-card-count="3"] .showdown-card { width: 42px; }
.table-seats .seat .opponent-cards.is-revealed[data-card-count="4"] .showdown-card,
.table-seats .seat .opponent-cards.is-revealed[data-card-count="5"] .showdown-card { width: 38px; margin-left: -4px; }
.table-seats[data-seat-count="8"] .seat .card-back, .table-seats[data-seat-count="9"] .seat .card-back, .table-seats[data-seat-count="10"] .seat .card-back { width: 28px; }
.table-seats[data-seat-count="8"] .seat .opponent-cards.is-revealed .showdown-card, .table-seats[data-seat-count="9"] .seat .opponent-cards.is-revealed .showdown-card, .table-seats[data-seat-count="10"] .seat .opponent-cards.is-revealed .showdown-card { width: 42px; }

/* -- Hero cards: proportionate, side by side in one straight row (2, 4 or 5 cards). */
.poker-table .hero-cards { gap: 4px; transform: translateX(-50%); }
.poker-table .hero-cards .playing-card { width: 54px; margin: 0; transform: none; border-width: 1px; }
.poker-table .hero-cards .playing-card + .playing-card { margin-left: 0; transform: none; }
.poker-table .hero-cards[data-card-count="3"] .playing-card { width: 48px; }
.poker-table .hero-cards[data-card-count="4"] .playing-card { width: 46px; }
.poker-table .hero-cards[data-card-count="5"] .playing-card { width: 42px; }
.poker-table .hero-cards .playing-card.is-selected-for-draw { transform: translateY(-12px); }
.poker-table .seat-wager { z-index: 9; }

@media (max-width: 1100px) {
  .table-seats .seat:not(.is-empty) { width: 150px; }
  .poker-table .hero-cards .playing-card { width: 48px; }
}
@media (max-width: 820px) {
  .table-seats .seat:not(.is-empty) { width: 124px; min-height: 42px; grid-template-columns: minmax(0,1fr) 34px; padding: 2px 4px 2px 9px; }
  .table-seats .seat.is-left-half:not(.is-empty) { grid-template-columns: 34px minmax(0,1fr); padding: 2px 9px 2px 4px; }
  .table-seats .seat:not(.is-empty) .seat-avatar { width: 34px; height: 34px; border-width: 2px; }
  .table-seats .seat .seat-copy strong, .table-seats .seat .seat-copy small { font-size: .64rem; }
  .table-seats .seat .card-back { width: 24px; }
  .table-seats .seat .opponent-cards.is-revealed .showdown-card { width: 36px; }
  .poker-table .hero-cards .playing-card { width: 42px; }
  .poker-table .hero-cards[data-card-count="4"] .playing-card { width: 36px; }
  .poker-table .hero-cards[data-card-count="5"] .playing-card { width: 32px; }
}
@media (max-width: 560px) {
  .table-seats .seat:not(.is-empty),
  .table-seats[data-seat-count="8"] .seat.is-stadium:not(.is-empty), .table-seats[data-seat-count="9"] .seat.is-stadium:not(.is-empty), .table-seats[data-seat-count="10"] .seat.is-stadium:not(.is-empty) { width: 96px; min-height: 36px; grid-template-columns: minmax(0,1fr) 28px; column-gap: 3px; padding: 2px 3px 2px 8px; border-radius: 20px; }
  .table-seats .seat.is-left-half:not(.is-empty),
  .table-seats[data-seat-count="8"] .seat.is-stadium.is-left-half:not(.is-empty), .table-seats[data-seat-count="9"] .seat.is-stadium.is-left-half:not(.is-empty), .table-seats[data-seat-count="10"] .seat.is-stadium.is-left-half:not(.is-empty) { grid-template-columns: 28px minmax(0,1fr); padding: 2px 8px 2px 3px; }
  .table-seats .seat:not(.is-empty) .seat-avatar,
  .table-seats[data-seat-count="8"] .seat.is-stadium .seat-avatar, .table-seats[data-seat-count="9"] .seat.is-stadium .seat-avatar, .table-seats[data-seat-count="10"] .seat.is-stadium .seat-avatar { width: 28px; height: 28px; border-width: 2px; }
  .table-seats .seat .seat-copy strong, .table-seats .seat .seat-copy small,
  .table-seats[data-seat-count="8"] .seat.is-stadium .seat-copy strong, .table-seats[data-seat-count="9"] .seat.is-stadium .seat-copy strong, .table-seats[data-seat-count="10"] .seat.is-stadium .seat-copy strong,
  .table-seats[data-seat-count="8"] .seat .seat-copy small, .table-seats[data-seat-count="9"] .seat .seat-copy small, .table-seats[data-seat-count="10"] .seat .seat-copy small { font-size: .58rem; }
  .table-seats .seat .seat-copy small { margin-top: 1px; }
  .table-seats .seat em { bottom: -10px; padding: 0 5px; font-size: .5rem; }
  .table-seats .seat.is-active em { display: none; }
  .table-seats .seat .seat-timer { inset: -4px; border-width: 2px; border-radius: 24px; }
  .table-seats .seat .seat-turn-countdown { top: -9px; right: -9px; min-width: 26px; padding: 2px 5px; font-size: .56rem; }
  .table-seats .seat .card-back, .table-seats[data-seat-count="8"] .seat .card-back, .table-seats[data-seat-count="9"] .seat .card-back, .table-seats[data-seat-count="10"] .seat .card-back { width: 20px; border-width: 1px; }
  .table-seats .seat .card-back + .card-back { margin-left: -8px; }
  .table-seats .seat .opponent-cards[data-card-count="4"] .card-back + .card-back, .table-seats .seat .opponent-cards[data-card-count="5"] .card-back + .card-back { margin-left: -12px; }
  .table-seats .seat .opponent-cards { bottom: calc(100% - 3px); }
  .table-seats .seat .opponent-cards.is-revealed { bottom: calc(100% + 1px); }
  .table-seats .seat .opponent-cards.is-revealed { gap: 2px; }
  .table-seats .seat .opponent-cards.is-revealed .showdown-card, .table-seats[data-seat-count="8"] .seat .opponent-cards.is-revealed .showdown-card, .table-seats[data-seat-count="9"] .seat .opponent-cards.is-revealed .showdown-card, .table-seats[data-seat-count="10"] .seat .opponent-cards.is-revealed .showdown-card { width: 30px; }
  .table-seats .seat .opponent-cards.is-revealed[data-card-count="4"] .showdown-card, .table-seats .seat .opponent-cards.is-revealed[data-card-count="5"] .showdown-card { width: 24px; margin-left: -3px; }
  .poker-table .hero-cards { gap: 3px; }
  .poker-table .hero-cards .playing-card { width: 38px; }
  .poker-table .hero-cards[data-card-count="3"] .playing-card { width: 34px; }
  .poker-table .hero-cards[data-card-count="4"] .playing-card { width: 31px; }
  .poker-table .hero-cards[data-card-count="5"] .playing-card { width: 28px; }
}
@media (orientation: landscape) and (max-height: 520px) {
  .table-seats .seat:not(.is-empty) { width: 104px; min-height: 36px; grid-template-columns: minmax(0,1fr) 28px; }
  .table-seats .seat.is-left-half:not(.is-empty) { grid-template-columns: 28px minmax(0,1fr); }
  .table-seats .seat:not(.is-empty) .seat-avatar { width: 28px; height: 28px; }
  .poker-table .hero-cards .playing-card { width: 34px; }
}

/* FIVE PK brand (2026-10-01): logo mark in header, faint emblem watermark on the felt. */
.brand-mark.brand-logo-mark { display: block; padding: 0; overflow: hidden; border-color: rgba(242,198,109,.55); background: #000; object-fit: cover; box-shadow: 0 0 0 1px rgba(0,0,0,.25), 0 4px 14px rgba(212,166,74,.2); }
.brand strong .brand-pk { color: #e3262c; font-weight: inherit; }
.brand small { color: #d4a64a; letter-spacing: .2em; }
.table-brand.table-brand-logo { display: block; width: clamp(110px, 21%, 280px); color: transparent; line-height: 0; opacity: .17; filter: saturate(.85) drop-shadow(0 2px 2px rgba(0,0,0,.35)); pointer-events: none; }
.table-brand.table-brand-logo img { display: block; width: 100%; height: auto; }
.table-settings-mark { color: #d4a64a; }
