

:root {
    --ink: #030707;
    --ink-2: #081010;
    --panel: #101919;
    --panel-soft: #142020;
    --line: rgba(236, 246, 241, .12);
    --line-bright: rgba(157, 255, 34, .34);
    --text: #f5f7f5;
    --muted: #9aa8a2;
    --green: #9dff22;
    --green-soft: rgba(157, 255, 34, .12);
    --silver: #d6ddd9;
    --gold: #f2c45c;
    --red: #f17d7d;
    --display: 'Chakra Petch', 'Arial Narrow', sans-serif;
    --body: 'Space Grotesk', Inter, system-ui, sans-serif;
}

* { box-sizing: border-box; }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
html { background: var(--ink); scroll-behavior: smooth; overscroll-behavior-y: contain; }
body {
    margin: 0;
    min-width: 320px;
    color: var(--text);
    background: radial-gradient(circle at 50% -10%, #15251b 0, var(--ink) 47rem), var(--ink);
    font-family: var(--body);
    line-height: 1.45;
    -webkit-font-smoothing: antialiased;
    overscroll-behavior-y: contain;
}
a { color: inherit; text-decoration: none; }
button { color: inherit; font: inherit; }
.skip-link { position: fixed; left: 1rem; top: -5rem; z-index: 10; padding: .7rem 1rem; background: var(--green); color: var(--ink); font-weight: 600; }
.skip-link:focus { top: 1rem; }

.site-header { height: 76px; padding: 0 clamp(1rem, 4vw, 4rem); display: flex; align-items: center; gap: clamp(1rem, 3.4vw, 3.5rem); border-bottom: 1px solid var(--line); background: rgba(3, 7, 7, .84); backdrop-filter: blur(14px); position: sticky; top: 0; z-index: 5; }
.brand-lockup { display: inline-flex; align-items: center; gap: .7rem; letter-spacing: -.02em; }
.brand-lockup img { width: 34px; height: 34px; }
.brand-copy { display: grid; gap: .12rem; line-height: 1; }
.brand-copy strong { font: 600 1rem var(--display); }
.brand-copy small { color: var(--muted); font: 500 .53rem var(--body); letter-spacing: .13em; text-transform: uppercase; }
.header-context { display: flex; align-items: center; gap: .65rem; color: var(--muted); font-size: .83rem; white-space: nowrap; }
.header-kicker { color: var(--green); font: 600 .68rem var(--display); letter-spacing: .1em; }
.header-divider { width: 28px; height: 1px; background: var(--line); }
.back-link { margin-left: auto; color: var(--silver); font-size: .8rem; transition: color .2s ease; }
.back-link:hover, .back-link:focus-visible { color: var(--green); }

main { width: min(1440px, 100%); margin: 0 auto; padding: clamp(3.5rem, 7vw, 6.5rem) clamp(1rem, 4vw, 4rem) 4rem; }
.hero { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(320px, .7fr); gap: clamp(2rem, 5vw, 6rem); align-items: end; margin-bottom: 2.75rem; }
.hero-copy { min-width: 0; max-width: none; }
.eyebrow { margin: 0 0 1rem; color: var(--green); font: 600 .68rem var(--display); text-transform: uppercase; letter-spacing: .14em; }
.eyebrow-slash { color: rgba(157,255,34,.42); padding: 0 .15em; }
.signal-dot, .live-pip, .action-pip { display: inline-block; width: .45rem; height: .45rem; margin-right: .45rem; border-radius: 50%; background: var(--green); box-shadow: 0 0 13px var(--green); vertical-align: .06rem; }
h1, h2, h3 { margin: 0; font-family: var(--display); letter-spacing: -.055em; }
h1 { max-width: none; color: var(--text); font-size: clamp(3.6rem, 7.2vw, 7.2rem); line-height: .84; font-weight: 600; letter-spacing: -.075em; white-space: nowrap; }
h1 span:first-child { color: var(--silver); }
h1 span:last-child { color: var(--green); }
.hero-lede { max-width: 50ch; margin: 1.65rem 0 0; color: var(--muted); font-size: clamp(1rem, 1.4vw, 1.2rem); }
.coin-context { display: inline-flex; align-items: center; gap: .7rem; max-width: 100%; margin-top: 1.25rem; padding: .45rem .75rem .45rem .45rem; border: 1px solid rgba(157,255,34,.25); border-radius: 999px; background: rgba(8,16,16,.72); box-shadow: 0 0 0 1px rgba(255,255,255,.02), 0 10px 26px rgba(0,0,0,.2); transition: border-color .2s ease, transform .2s ease, background .2s ease; }
.coin-context:hover, .coin-context:focus-visible { border-color: var(--green); background: rgba(20,32,32,.95); transform: translateY(-2px); outline: none; }
.coin-context-mark { display: grid; place-items: center; width: 32px; height: 32px; overflow: hidden; flex: 0 0 32px; border-radius: 50%; background: #fff; box-shadow: 0 0 0 2px rgba(157,255,34,.18), 0 0 18px rgba(157,255,34,.15); }
.coin-context-mark img { display: block; width: 32px; height: 32px; object-fit: cover; }
.coin-context-copy { display: grid; gap: .05rem; min-width: 0; }
.coin-context-copy strong { color: var(--silver); font: 600 .8rem var(--display); letter-spacing: .03em; }
.coin-context-copy small { overflow: hidden; color: var(--muted); font-size: .62rem; text-overflow: ellipsis; white-space: nowrap; }
.coin-context-arrow { margin-left: .25rem; color: var(--green); font-size: .95rem; }
.hero-facts { display: grid; grid-template-columns: repeat(2, minmax(100px, 1fr)); gap: 1.2rem 1.6rem; padding: .25rem 0 .35rem clamp(1.2rem, 2.5vw, 2.5rem); border-left: 1px solid var(--line-bright); }
.hero-facts div { display: grid; gap: .2rem; min-width: 0; }
.hero-facts span, .rail-label, .rail-note { color: var(--muted); font-size: .68rem; text-transform: uppercase; letter-spacing: .12em; }
.hero-facts strong { color: var(--silver); font: 600 1.25rem var(--display); }

.status-banner { display: flex; align-items: center; gap: .8rem; margin-bottom: 1rem; padding: .85rem 1rem; border: 1px solid rgba(242, 196, 92, .3); background: rgba(242, 196, 92, .07); color: var(--silver); }
.status-icon { color: var(--gold); font-size: 1.1rem; }
.status-banner div { display: flex; align-items: baseline; gap: .6rem; flex-wrap: wrap; font-size: .8rem; }
.status-banner strong { color: var(--gold); font: 600 .72rem var(--display); text-transform: uppercase; letter-spacing: .13em; }
.status-banner div span { color: var(--muted); }

.workspace { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 1px; border: 1px solid var(--line); background: var(--line); }
.table-column, .side-rail { background: var(--ink-2); }
.table-toolbar { min-height: 66px; padding: .7rem 1.2rem; display: flex; align-items: center; justify-content: space-between; gap: .8rem; border-bottom: 1px solid var(--line); }
.table-heading { display: grid; gap: .2rem; min-width: 0; }
.table-status { color: var(--silver); font: 600 .73rem var(--display); text-transform: uppercase; letter-spacing: .09em; }
.table-id { color: var(--muted); font-size: .7rem; }
.toolbar-actions { display: flex; align-items: center; justify-content: end; gap: .55rem; flex-wrap: wrap; }
.mode-badge { padding: .27rem .42rem; border: 1px solid var(--line-bright); border-radius: 2px; color: var(--green); font: 600 .57rem var(--display); letter-spacing: .1em; white-space: nowrap; }
.mode-badge-gold { border-color: rgba(242,196,92,.45); color: var(--gold); }
.toolbar-button, .text-button { border: 0; background: transparent; cursor: pointer; color: var(--green); font-size: .78rem; }
.toolbar-button:hover, .text-button:hover, .toolbar-button:focus-visible, .text-button:focus-visible { color: var(--text); }
.mobile-game-toggle { display: none; }
.table-wrap { padding: clamp(1rem, 3vw, 2.4rem); background: linear-gradient(145deg, rgba(255,255,255,.02), transparent 40%); }
.poker-table { position: relative; min-height: 620px; overflow: hidden; border: 12px solid #252d2a; border-radius: 50% / 38%; background: radial-gradient(ellipse at 50% 45%, #185331, #0a2a1a 57%, #06170e 100%); box-shadow: inset 0 0 0 2px rgba(0,0,0,.5), inset 0 0 80px rgba(0,0,0,.6), 0 18px 40px rgba(0,0,0,.3); isolation: isolate; }
.poker-table::before { content: ''; position: absolute; inset: 9%; z-index: -1; border: 1px solid rgba(157,255,34,.16); border-radius: 50%; box-shadow: 0 0 40px rgba(157,255,34,.08); }
.table-ring { position: absolute; inset: 0; border-radius: inherit; background: repeating-linear-gradient(105deg, transparent 0 70px, rgba(255,255,255,.018) 72px 73px); mix-blend-mode: overlay; pointer-events: none; }
.table-brand { position: absolute; left: 50%; top: 27%; transform: translate(-50%, -50%) rotate(-8deg); display: grid; gap: .1rem; color: rgba(245,247,245,.17); text-align: center; font: 600 clamp(2rem, 4vw, 3.8rem)/.8 var(--display); letter-spacing: -.08em; }
.table-brand small { font: 600 .52rem var(--display); letter-spacing: .32em; }
.table-copy { position: absolute; left: 50%; bottom: 21%; transform: translateX(-50%); color: rgba(157,255,34,.3); font: 600 .6rem var(--display); letter-spacing: .26em; white-space: nowrap; }
.board { position: absolute; left: 50%; top: 47%; transform: translate(-50%, -50%); display: grid; justify-items: center; gap: .45rem; }
.board-label { color: rgba(245,247,245,.48); font: .6rem var(--display); letter-spacing: .13em; text-transform: uppercase; }
.board-cards { display: flex; gap: .35rem; }
.playing-card { width: 51px; height: 72px; display: grid; align-content: start; justify-items: center; padding-top: .33rem; border-radius: 5px; background: #f5f7f5; color: #15201c; box-shadow: 0 4px 9px rgba(0,0,0,.3); font: 600 1.3rem/1 var(--display); }
.playing-card span { font-size: 1.45rem; line-height: 1; }
.card-red { color: #c44f5e; }
.card-hidden { background: #18302a; color: var(--green); border: 1px solid rgba(157,255,34,.26); font-size: 1rem; align-content: center; padding: 0; }
.pot-marker { position: absolute; left: 50%; top: 65%; transform: translateX(-50%); display: grid; justify-items: center; gap: .1rem; color: rgba(245,247,245,.5); font: .6rem var(--display); letter-spacing: .1em; text-transform: uppercase; }
.pot-marker strong { color: var(--silver); font: 600 1.05rem var(--display); letter-spacing: -.02em; }

.seat { position: absolute; display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; gap: .42rem .55rem; min-width: 176px; padding: .55rem .65rem; border: 1px solid rgba(255,255,255,.14); border-radius: 4px; background: rgba(3,7,7,.8); box-shadow: 0 8px 20px rgba(0,0,0,.26); backdrop-filter: blur(4px); }
.seat-top { left: 50%; top: 6%; transform: translateX(-50%); }
.seat-left { left: 2%; top: 45%; }
.seat-right { right: 2%; top: 45%; }
.seat-bottom { left: 50%; bottom: 3%; transform: translateX(-50%); }
.seat-current { border-color: var(--line-bright); box-shadow: 0 0 0 1px rgba(157,255,34,.07), 0 8px 20px rgba(0,0,0,.26); }
.seat-avatar { position: relative; isolation: isolate; overflow: visible; grid-row: 1 / span 2; width: 38px; height: 38px; display: grid; place-items: center; border: 2px solid var(--silver); border-radius: 50%; color: #07110b; font: 600 1.1rem var(--display); background: radial-gradient(circle at 38% 32%, #b5ff4e, #3e7324 67%); box-shadow: 0 0 0 3px rgba(3,7,7,.9); }
.seat-avatar::before { content: ''; position: absolute; inset: -5px; z-index: -1; border: 1px solid rgba(242,196,92,.48); border-radius: 50%; box-shadow: inset 0 0 0 2px rgba(3,7,7,.65), 0 0 0 1px rgba(157,255,34,.12); pointer-events: none; }
.seat-avatar-image { position: absolute; inset: 3px; z-index: 0; width: calc(100% - 6px); height: calc(100% - 6px); border-radius: 50%; object-fit: cover; filter: saturate(1.16) contrast(1.08); }
.avatar-glyph { position: relative; z-index: 1; text-shadow: 0 1px 1px rgba(0,0,0,.5); }
.avatar-discord .avatar-glyph { opacity: .13; }
.avatar-frame { position: absolute; inset: 1px; z-index: 2; border: 1px solid rgba(255,255,255,.18); border-radius: 50%; pointer-events: none; }
.avatar-fallback .avatar-frame { border-color: rgba(157,255,34,.45); }
.avatar-alex { color: var(--green); background: radial-gradient(circle at 40% 32%, #263c2b, #050a08 65%); border-color: var(--green); }
.avatar-blitz { background: radial-gradient(circle at 40% 32%, #ffde8e, #a36127 68%); }
.avatar-hades { background: radial-gradient(circle at 40% 32%, #c7b6ff, #5f3d8d 68%); }
.avatar-you { color: var(--ink); border-color: var(--green); }
.avatar-discord { background-image: url('/assets/poker-avatar-plate-v1.png'); background-position: center; background-size: cover; border-color: var(--green); }
.seat-details { display: grid; align-content: center; gap: .06rem; min-width: 0; }
.seat-details strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font: 600 .8rem var(--display); }
.seat-details strong em { margin-left: .25rem; color: var(--muted); font: 500 .52rem var(--body); font-style: normal; letter-spacing: .08em; }
.seat-details span { color: var(--silver); font: .67rem var(--display); }
.seat-state { color: var(--green); font-size: .62rem; }
.seat-state.muted { color: var(--muted); }
.seat-state.accent { font-weight: 600; }
.seat-winner { border-color: rgba(242,196,92,.75); box-shadow: 0 0 22px rgba(242,196,92,.14); }
.seat-winner .seat-state { color: var(--gold); font-weight: 600; }
.seat-disconnected { border-color: rgba(241,125,125,.5); opacity: .82; }
.seat-disconnected .seat-state { color: var(--red); }
.hole-cards { position: absolute; right: .55rem; top: -1.35rem; display: flex; gap: .15rem; transform: rotate(-5deg); }
.card-mini { width: 25px; height: 35px; padding-top: .12rem; border-radius: 3px; font-size: .68rem; }
.card-mini span { font-size: .75rem; }
.card-back { display: grid; place-items: center; padding: 0; background: #173329; color: rgba(157,255,34,.48); border: 1px solid rgba(157,255,34,.32); font-size: .6rem; }

.action-bar { position: sticky; bottom: 0; z-index: 4; display: grid; grid-template-columns: minmax(180px, auto) 1fr; gap: .8rem 1.4rem; align-items: start; padding: 1rem 1.2rem 1.2rem; border-top: 1px solid rgba(157,255,34,.18); background: linear-gradient(180deg, rgba(8,16,16,.94), rgba(3,7,7,.98)); box-shadow: 0 -18px 34px rgba(0,0,0,.24); backdrop-filter: blur(16px); }
.action-heading { display: flex; align-items: center; gap: .2rem; white-space: nowrap; }
.action-heading .action-pip { margin-right: .35rem; }
.action-heading div { display: grid; gap: .15rem; }
.action-heading strong { font: 600 .83rem var(--display); }
.action-heading span { color: var(--muted); font-size: .62rem; line-height: 1.35; white-space: normal; }
.action-buttons { display: flex; justify-content: start; gap: .45rem; flex-wrap: wrap; }
.action-button { min-width: 76px; min-height: 42px; padding: .5rem .75rem; border: 1px solid var(--line); border-radius: 4px; background: var(--panel); cursor: pointer; font: 600 .72rem var(--display); transition: transform .18s ease, border-color .18s ease, background .18s ease, box-shadow .18s ease; }
.action-button span { color: var(--muted); font: .62rem var(--body); }
.action-button:hover, .action-button:focus-visible { transform: translateY(-2px); border-color: var(--line-bright); box-shadow: 0 7px 16px rgba(0,0,0,.2); outline: none; }
.action-button:active { transform: translateY(0); }
.action-button:disabled { cursor: wait; opacity: .55; transform: none; }
.action-call { border-color: rgba(157,255,34,.5); background: linear-gradient(145deg, rgba(157,255,34,.18), rgba(157,255,34,.07)); color: var(--green); }
.action-check { border-color: rgba(214,221,217,.28); color: var(--silver); }
.action-raise { border-color: rgba(157,255,34,.42); background: linear-gradient(145deg, rgba(45,80,51,.9), rgba(20,39,27,.94)); color: var(--text); box-shadow: 0 0 0 1px rgba(157,255,34,.04), 0 8px 18px rgba(0,0,0,.18); }
.action-raise span { color: rgba(245,247,245,.68); }
.action-allin { border-color: rgba(242,196,92,.5); background: linear-gradient(145deg, rgba(242,196,92,.15), rgba(101,67,18,.16)); color: var(--gold); }
.action-fold { color: var(--red); background: rgba(241,125,125,.04); }
.action-feedback { grid-column: 2; color: var(--muted); font-size: .66rem; }
.raise-tools { flex: 1 1 100%; min-width: min(100%, 31rem); padding: .78rem .8rem .72rem; border: 1px solid rgba(157,255,34,.2); border-radius: 6px; background: linear-gradient(145deg, rgba(13,31,20,.9), rgba(4,12,9,.86)); box-shadow: inset 0 1px 0 rgba(255,255,255,.04), 0 9px 20px rgba(0,0,0,.16); }
.raise-tools-head { display: flex; align-items: baseline; justify-content: space-between; gap: .75rem; margin-bottom: .5rem; }
.raise-tools-label { color: var(--silver); font: 600 .62rem var(--display); letter-spacing: .08em; text-transform: uppercase; }
.raise-context { color: var(--muted); font-size: .62rem; font-variant-numeric: tabular-nums; text-align: right; }
.raise-presets { display: flex; flex-wrap: wrap; gap: .35rem; }
.raise-preset { min-width: 48px; min-height: 34px; padding: .36rem .52rem; border: 1px solid var(--line); border-radius: 4px; color: var(--muted); background: rgba(255,255,255,.035); cursor: pointer; font: 600 .62rem var(--display); transition: color .18s ease, border-color .18s ease, background .18s ease, transform .18s ease, box-shadow .18s ease; }
.raise-preset:hover, .raise-preset:focus-visible { color: var(--silver); border-color: var(--line-bright); transform: translateY(-1px); outline: none; }
.raise-preset.is-selected { color: #07110b; border-color: var(--green); background: var(--green); box-shadow: 0 0 14px rgba(157,255,34,.22); }
.raise-preset-allin { color: var(--gold); border-color: rgba(242,196,92,.35); }
.raise-preset-allin.is-selected { color: #201706; border-color: var(--gold); background: var(--gold); }
.raise-target-row { display: grid; grid-template-columns: auto auto minmax(7rem, 1fr); align-items: center; gap: .55rem; margin-top: .65rem; }

.side-rail { display: flex; flex-direction: column; }
.rail-section { padding: 1.2rem; border-bottom: 1px solid var(--line); }
.balance-heading { display: flex; align-items: center; justify-content: space-between; gap: .75rem; }
.balance { display: block; margin: .35rem 0 .6rem; color: var(--silver); font: 600 2rem var(--display); letter-spacing: -.04em; }
.balance-button { width: max-content; padding: 0; border: 0; background: transparent; cursor: pointer; text-align: left; }
.balance-button:hover, .balance-button:focus-visible { color: var(--green); outline: none; text-shadow: 0 0 12px rgba(157,255,34,.32); }
.balance small { color: var(--green); font-size: 1rem; }
.stack-unit-toggle { display: inline-flex; gap: .2rem; padding: .18rem; border: 1px solid rgba(157,255,34,.22); border-radius: 999px; background: rgba(3,7,7,.55); }
.unit-button { min-width: 2rem; padding: .22rem .42rem; border: 0; border-radius: 999px; color: var(--muted); background: transparent; cursor: pointer; font: 600 .58rem var(--display); letter-spacing: .08em; }
.unit-button:hover, .unit-button:focus-visible { color: var(--silver); }
.unit-button.is-selected { color: #07110b; background: var(--green); box-shadow: 0 0 10px rgba(157,255,34,.25); }
.balance-rule { height: 3px; margin: .6rem 0 .7rem; background: rgba(255,255,255,.1); }
.balance-rule span { display: block; height: 100%; background: var(--green); box-shadow: 0 0 8px rgba(157,255,34,.4); }
.rail-heading { display: flex; justify-content: space-between; color: var(--silver); font: 600 .76rem var(--display); text-transform: uppercase; letter-spacing: .08em; }
.booth-live { color: var(--green); font-size: .58rem; }
blockquote { margin: .8rem 0 .6rem; color: var(--text); font: 500 1rem/1.25 var(--display); letter-spacing: -.02em; }
.receipt-id { color: var(--muted); font: .62rem var(--body); }
.variant-list { display: flex; flex-wrap: wrap; gap: .3rem; margin-top: .8rem; }
.variant-list span { padding: .25rem .38rem; border: 1px solid var(--line); color: var(--muted); font: .58rem var(--display); }
.receipt-list { display: grid; gap: .5rem; margin: 1rem 0; }
.receipt-list div { display: flex; justify-content: space-between; color: var(--muted); font-size: .72rem; }
.receipt-list dd { margin: 0; color: var(--silver); font-family: var(--display); }
.text-button { padding: 0; }
.rail-help { margin-top: auto; border-bottom: 0; }
.rail-help p { margin: .55rem 0 .8rem; color: var(--muted); font-size: .76rem; }
.rail-help a { display: inline-block; margin: .7rem .9rem 0 0; color: var(--green); font-size: .76rem; }

.club-notes { display: grid; grid-template-columns: minmax(180px, .65fr) 1.35fr; gap: 3rem; padding: clamp(3rem, 8vw, 7rem) 0 2rem; }
.leaderboard-preview { display: grid; grid-template-columns: minmax(220px, .72fr) 1.28fr; gap: clamp(2rem, 6vw, 6rem); align-items: end; padding: clamp(3.5rem, 8vw, 7rem) 0 1rem; border-top: 1px solid var(--line); }
.leaderboard-intro h2 { max-width: 420px; font-size: clamp(2.6rem, 5vw, 5rem); line-height: .88; }
.leaderboard-intro > p:last-child { max-width: 42ch; margin: 1rem 0 0; color: var(--muted); font-size: .82rem; }
.leaderboard-shell { border-top: 1px solid var(--line-bright); }
.leaderboard-heading, .leaderboard-list li { display: grid; grid-template-columns: 1fr auto; gap: 1rem; align-items: center; }
.leaderboard-heading { padding: .8rem 0; color: var(--silver); font: 600 .72rem var(--display); text-transform: uppercase; letter-spacing: .1em; }
.leaderboard-status { color: var(--gold); font-size: .58rem; }
.leaderboard-list { margin: 0; padding: 0; list-style: none; }
.leaderboard-list li { grid-template-columns: 2.4rem 1fr auto; min-height: 52px; border-top: 1px solid var(--line); }
.leader-rank { color: var(--green); font: 600 .68rem var(--display); letter-spacing: .1em; }
.leaderboard-list strong { color: var(--silver); font: 500 .83rem var(--display); }
.leader-score { color: var(--muted); font: .76rem var(--display); }
.leaderboard-foot { padding: .8rem 0 0; color: var(--muted); font-size: .68rem; }
.notes-heading h2 { max-width: 360px; font-size: clamp(2.5rem, 5vw, 4.7rem); line-height: .9; }
.notes-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
.notes-grid article { padding-top: 1rem; border-top: 1px solid var(--line); }
.note-number { color: var(--green); font: .65rem var(--display); letter-spacing: .15em; }
.notes-grid h3 { margin-top: 2.2rem; font-size: 1.35rem; letter-spacing: -.035em; }
.notes-grid p { margin: .65rem 0 0; color: var(--muted); font-size: .78rem; }
.site-footer { display: flex; justify-content: space-between; gap: 1rem; padding: 1.2rem clamp(1rem, 4vw, 4rem); border-top: 1px solid var(--line); color: var(--muted); font-size: .68rem; }
.site-footer span:first-child { color: var(--silver); font-family: var(--display); }
.site-footer a { color: var(--green); }
.site-footer a:hover, .site-footer a:focus-visible { color: var(--text); text-decoration: underline; }
.toast { position: fixed; right: 1rem; bottom: 1rem; z-index: 10; max-width: 340px; padding: .8rem 1rem; border: 1px solid var(--line-bright); background: #112017; color: var(--text); box-shadow: 0 12px 35px rgba(0,0,0,.4); font-size: .76rem; opacity: 0; transform: translateY(8px); pointer-events: none; transition: opacity .2s ease, transform .2s ease; }
.toast.is-visible { opacity: 1; transform: translateY(0); }

.room-panel { padding: clamp(1.2rem, 3vw, 2rem); border: 1px solid var(--line); background: rgba(8,16,16,.82); }
.offline-panel { border-color: rgba(241,125,125,.35); }
.offline-panel h2, .panel-heading h2 { margin-top: .3rem; font-size: clamp(2rem, 4vw, 3.4rem); line-height: .95; }
.offline-panel p:not(.eyebrow) { max-width: 560px; color: var(--muted); }
.public-receipt-panel { position: relative; overflow: hidden; background: linear-gradient(125deg, rgba(10,25,20,.96), rgba(8,16,16,.84)); }
.public-receipt-panel::after { content: 'eR33t'; position: absolute; right: clamp(1rem, 5vw, 4rem); bottom: -1.1rem; color: rgba(157,255,34,.08); font: 700 clamp(5rem, 16vw, 12rem)/1 var(--display); letter-spacing: -.08em; pointer-events: none; }
.public-receipt-summary { max-width: 58ch; margin: 0 0 1.5rem; color: var(--silver); font-size: clamp(1.1rem, 2.3vw, 1.7rem); line-height: 1.15; }
.public-receipt-list { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem; max-width: 900px; margin: 0; }
.public-receipt-list div { padding-top: .7rem; border-top: 1px solid var(--line-bright); }
.public-receipt-list dt { color: var(--muted); font: 600 .62rem var(--display); letter-spacing: .11em; text-transform: uppercase; }
.public-receipt-list dd { margin: .35rem 0 0; color: var(--text); font: 600 1rem var(--display); }
.public-receipt-actions { position: relative; z-index: 1; display: flex; align-items: center; gap: 1rem; margin-top: 2rem; }
code { padding: .1rem .25rem; color: var(--green); background: var(--green-soft); font-family: ui-monospace, SFMono-Regular, Consolas, monospace; }
.panel-heading { display: flex; align-items: end; justify-content: space-between; gap: 1rem; margin-bottom: 1.6rem; }
.room-kicker { color: var(--gold); font: 600 .6rem var(--display); letter-spacing: .13em; white-space: nowrap; }
.lobby-grid { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: 1.4rem 2.8rem; }
.setup-form { display: grid; align-content: start; gap: .55rem; }
.setup-form > label:first-child, .join-form > label { color: var(--silver); font: 600 .7rem var(--display); text-transform: uppercase; letter-spacing: .1em; }
.inline-field, .setup-row, .join-form { display: flex; gap: .55rem; align-items: center; }
input, select { min-height: 42px; border: 1px solid var(--line); border-radius: 3px; padding: .65rem .7rem; color: var(--text); background: #0b1514; font: .78rem var(--body); }
input:focus-visible, select:focus-visible, button:focus-visible { outline: 2px solid var(--green); outline-offset: 2px; }
.inline-field input { flex: 1; min-width: 0; }
.setup-row select { flex: 1; min-width: 0; }
.field-note, .check-row small { color: var(--muted); font-size: .66rem; }
.check-row { display: flex; align-items: start; gap: .6rem; margin-top: .25rem; cursor: pointer; }
.check-row input { min-height: 0; width: 17px; height: 17px; margin: .12rem 0 0; accent-color: var(--green); }
.check-row span { display: grid; gap: .1rem; }
.check-row strong { color: var(--silver); font: 500 .77rem var(--body); }
.button { min-height: 42px; border: 1px solid var(--line); border-radius: 3px; padding: .62rem .85rem; cursor: pointer; font: 600 .7rem var(--display); letter-spacing: .02em; transition: transform .18s ease, border-color .18s ease, background .18s ease; }
.button:hover, .button:focus-visible { transform: translateY(-1px); border-color: var(--line-bright); }
.button-primary { color: var(--ink); background: var(--green); border-color: var(--green); }
.button-quiet { color: var(--silver); background: var(--panel); }
.setup-form .button-primary { justify-self: start; margin-top: .4rem; }
.join-divider { display: flex; align-items: center; gap: .75rem; margin: 1.8rem 0 .8rem; color: var(--muted); font: .66rem var(--display); text-transform: uppercase; letter-spacing: .1em; }
.join-divider::before, .join-divider::after { content: ''; height: 1px; flex: 1; background: var(--line); }
.join-form label { white-space: nowrap; }
.join-form input { flex: 1; max-width: 450px; }
.room-panel + #room-screen { margin-top: 1rem; }
.toolbar-button-muted { color: var(--muted); }
.table-toolbar > div:first-child { min-width: 0; }
.board { min-width: 230px; }
.board-runout { display: grid; justify-items: center; gap: .35rem; }
.board-runout + .board-runout { margin-top: .6rem; }
.board-empty { color: rgba(245,247,245,.5); font: .65rem var(--display); letter-spacing: .04em; white-space: nowrap; }
.seat-slot { display: block; min-width: 178px; padding: .55rem .65rem; }
.seat-main { display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; gap: .42rem .55rem; }
.seat-slot .seat-avatar { grid-row: 1 / span 2; }
.seat-slot .hole-cards { z-index: 1; }
.seat-0 { left: 50%; bottom: 3%; transform: translateX(-50%); }
.seat-1 { left: 3%; bottom: 17%; }
.seat-2 { left: 3%; top: 17%; }
.seat-3 { left: 50%; top: 5%; transform: translateX(-50%); }
.seat-4 { right: 3%; top: 17%; }
.seat-5 { right: 3%; bottom: 17%; }
.seat-folded { opacity: .48; }
.seat-ai { border-color: rgba(157,255,34,.24); }
.action-check { color: var(--silver); }
.action-waiting { grid-column: 2; color: var(--muted); font-size: .72rem; }
.raise-control { display: inline-flex; align-items: center; gap: .3rem; color: var(--muted); font: .65rem var(--display); }
.raise-control input { width: 84px; min-height: 39px; padding: .45rem; color: var(--silver); font-family: var(--display); }
.raise-control span { color: var(--green); }
.raise-slider-label { color: var(--muted); font: .58rem var(--display); text-transform: uppercase; }
.raise-slider { width: 100%; height: 1.2rem; appearance: none; cursor: pointer; background: transparent; }
.raise-slider::-webkit-slider-runnable-track { height: .3rem; border-radius: 999px; background: linear-gradient(90deg, rgba(157,255,34,.5), rgba(157,255,34,.12)); }
.raise-slider::-webkit-slider-thumb { width: 1.1rem; height: 1.1rem; margin-top: -.4rem; appearance: none; border: 2px solid var(--ink); border-radius: 50%; background: var(--green); box-shadow: 0 0 0 2px rgba(157,255,34,.35), 0 0 14px rgba(157,255,34,.35); }
.raise-slider::-moz-range-track { height: .3rem; border-radius: 999px; background: linear-gradient(90deg, rgba(157,255,34,.5), rgba(157,255,34,.12)); }
.raise-slider::-moz-range-thumb { width: .85rem; height: .85rem; border: 2px solid var(--ink); border-radius: 50%; background: var(--green); box-shadow: 0 0 0 2px rgba(157,255,34,.35), 0 0 14px rgba(157,255,34,.35); }
.raise-slider:focus-visible { outline: 2px solid var(--green); outline-offset: 3px; border-radius: 999px; }
.raise-target-summary { margin-top: .5rem; color: var(--muted); font-size: .62rem; font-variant-numeric: tabular-nums; }
.clock-urgent { color: var(--gold) !important; }
.lobby-actions { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1rem 1.2rem 1.2rem; border-top: 1px solid var(--line); }
.lobby-actions p { margin: 0; color: var(--muted); font-size: .72rem; }
.lobby-actions p strong { color: var(--silver); }
.lobby-actions > div { display: flex; gap: .5rem; }
.confirm-dialog { width: min(420px, calc(100% - 2rem)); border: 1px solid var(--line-bright); padding: 1.5rem; color: var(--text); background: var(--ink-2); box-shadow: 0 18px 60px rgba(0,0,0,.55); }
.confirm-dialog::backdrop { background: rgba(0,0,0,.68); backdrop-filter: blur(3px); }
.confirm-dialog h2 { margin: .3rem 0 .65rem; font: 600 1.8rem var(--display); }
.confirm-dialog p:not(.eyebrow) { color: var(--muted); font-size: .8rem; }
.dialog-actions { display: flex; justify-content: end; gap: .5rem; margin-top: 1.2rem; }
.status-banner.error { border-color: rgba(241,125,125,.35); background: rgba(241,125,125,.07); }
.status-banner.error .status-icon, .status-banner.error strong { color: var(--red); }

@media (min-width: 1051px) {
    #practice-app { min-height: 600px; }
}

@media (max-width: 1050px) {
    .hero { grid-template-columns: 1fr; gap: 2rem; }
    .hero-facts { max-width: 560px; }
    .workspace { grid-template-columns: 1fr; }
    .leaderboard-preview { grid-template-columns: 1fr; gap: 2rem; }
    .side-rail { display: grid; grid-template-columns: repeat(2, 1fr); }
    .rail-help { grid-column: 1 / -1; margin-top: 0; }
    .poker-table { min-height: 570px; }
}
@media (max-width: 720px) {
    .site-header { height: 64px; gap: .75rem; padding-inline: .85rem; }
    .brand-lockup { gap: .55rem; }
    .brand-lockup img { width: 30px; height: 30px; }
    .brand-copy strong { font-size: .92rem; }
    .brand-copy small { display: none; }
    .header-context { display: none; }
    .back-link { max-width: 11ch; font-size: .68rem; line-height: 1.15; text-align: right; }
    main { padding-top: 2.25rem; }
    .hero { display: block; }
    h1 { max-width: 12ch; font-size: clamp(3.3rem, 17vw, 6rem); line-height: .86; white-space: normal; }
    h1 span { display: block; }
    .hero-lede { margin-top: 1.25rem; }
    .coin-context { margin-top: 1rem; }
    .hero-facts { margin-top: 1.75rem; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem .8rem; padding-left: .9rem; }
    .hero-facts strong { font-size: 1.1rem; }
    .status-banner { align-items: flex-start; }
    .room-panel { padding: .9rem; }
    .panel-heading { margin-bottom: 1.2rem; }
    .table-toolbar { padding: .7rem .8rem; align-items: start; flex-wrap: wrap; }
    .table-id { display: block; margin: .05rem 0 0; }
    .toolbar-actions { width: 100%; justify-content: start; }
    .toolbar-button { font-size: .7rem; }
    .toolbar-button, .text-button { min-height: 42px; }
    .mobile-game-toggle { display: inline-flex; align-items: center; border: 1px solid rgba(157,255,34,.26); padding-inline: .55rem; }
    .mobile-game-toggle[aria-pressed="true"] { color: #07110b; border-color: var(--green); background: var(--green); }
    .panel-heading { display: block; }
    .room-kicker { display: block; margin-top: 1rem; }
    .public-receipt-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .public-receipt-actions { align-items: flex-start; flex-direction: column; }
    .lobby-grid { grid-template-columns: 1fr; }
    .setup-form, .inline-field, .setup-row { min-width: 0; }
    .inline-field, .setup-row { flex-wrap: wrap; }
    .inline-field input, .setup-row select { flex-basis: 100%; }
    .inline-field .button { margin-left: auto; }
    .join-form { flex-wrap: wrap; }
    .join-form input { flex-basis: 100%; max-width: none; }
    .table-wrap { padding: .35rem; }
    .poker-table { min-height: 470px; border-width: 8px; border-radius: 50% / 31%; }
    .seat { min-width: 132px; padding: .4rem .45rem; }
    .seat-slot { min-width: 132px; }
    .seat-1, .seat-2 { left: -2%; }
    .seat-4, .seat-5 { right: -2%; }
    .seat-1, .seat-5 { bottom: 16%; }
    .seat-2, .seat-4 { top: 16%; }
    .seat-details strong { font-size: .7rem; }
    .seat-details span { font-size: .61rem; }
    .seat-avatar { width: 31px; height: 31px; font-size: .9rem; }
    .stack-unit-toggle { transform: scale(.92); transform-origin: right center; }
    .hole-cards { top: -1.08rem; right: .35rem; }
    .board { top: 45%; }
    .playing-card { width: 38px; height: 54px; font-size: .95rem; }
    .playing-card span { font-size: 1rem; }
    .card-mini { width: 20px; height: 29px; font-size: .52rem; }
    .card-mini span { font-size: .58rem; }
    .table-brand { top: 26%; }
    .action-bar { display: block; padding: .85rem .8rem 1rem; }
    .action-buttons { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .45rem; margin-top: .9rem; }
    .action-button { min-height: 46px; padding: .55rem .45rem; }
    .action-button span { display: block; margin-top: .1rem; }
    .raise-tools { grid-column: 1 / -1; min-width: 0; padding: .7rem .65rem .65rem; }
    .raise-tools-head { display: block; }
    .raise-context { display: block; margin-top: .25rem; text-align: left; }
    .raise-presets { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
    .raise-preset { min-height: 44px; padding-inline: .25rem; }
    .raise-target-row { grid-template-columns: auto minmax(6rem, 1fr); gap: .45rem .65rem; }
    .raise-control { grid-column: 1 / -1; justify-content: space-between; width: 100%; min-height: 44px; }
    .raise-control input { width: 104px; min-height: 44px; }
    .raise-slider-label { display: none; }
    .raise-slider { grid-column: 1 / -1; min-height: 32px; }
    .action-feedback { margin-top: .8rem; }
    .action-waiting { margin-top: .8rem; }
    .lobby-actions { display: block; padding: .85rem .8rem 1rem; }
    .lobby-actions > div { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); width: 100%; margin-top: .8rem; }
    .lobby-actions .button { width: 100%; min-height: 46px; padding-inline: .45rem; }
    .side-rail { display: block; }
    .rail-section { padding: 1rem .9rem; }
    .balance { font-size: 1.8rem; }
    .club-notes { display: block; }
    .leaderboard-preview { display: block; }
    .leaderboard-shell { margin-top: 2.5rem; }
    .notes-grid { grid-template-columns: 1fr; gap: 2rem; margin-top: 2.5rem; }
    .notes-grid h3 { margin-top: 1rem; }
    .site-footer { display: grid; }

    /* Focus table turns the room into a game viewport: the document stays still,
       while the felt and decision dock own the available mobile height. */
    body.mobile-game-mode { height: 100dvh; min-height: 100dvh; overflow: hidden; overscroll-behavior: none; }
    body.mobile-game-mode .site-header { position: fixed; inset: 0 0 auto; z-index: 8; height: calc(64px + env(safe-area-inset-top)); padding-top: env(safe-area-inset-top); }
    body.mobile-game-mode main { width: 100%; height: 100dvh; min-height: 100dvh; overflow: hidden; padding: calc(64px + env(safe-area-inset-top)) .5rem env(safe-area-inset-bottom); }
    body.mobile-game-mode .hero,
    body.mobile-game-mode > main > .status-banner,
    body.mobile-game-mode .leaderboard-preview,
    body.mobile-game-mode .club-notes,
    body.mobile-game-mode .site-footer { display: none; }
    body.mobile-game-mode #practice-app,
    body.mobile-game-mode #room-screen,
    body.mobile-game-mode .workspace { height: 100%; min-height: 0; }
    body.mobile-game-mode .workspace { display: flex; flex-direction: column; border: 0; }
    body.mobile-game-mode .table-column { display: flex; min-height: 0; flex: 1; flex-direction: column; }
    body.mobile-game-mode .table-toolbar { min-height: 52px; flex: 0 0 auto; padding: .45rem .65rem; }
    body.mobile-game-mode .toolbar-actions { width: auto; flex-wrap: nowrap; gap: .25rem; }
    body.mobile-game-mode .mode-badge,
    body.mobile-game-mode #rit-badge { display: none; }
    body.mobile-game-mode .toolbar-button { min-height: 36px; padding-inline: .45rem; font-size: .61rem; }
    body.mobile-game-mode .table-wrap { display: flex; min-height: 0; flex: 1 1 auto; flex-direction: column; align-items: stretch; padding: .25rem; }
    body.mobile-game-mode .matchup-banner { flex: 0 0 auto; margin-bottom: .35rem; }
    body.mobile-game-mode .poker-table { width: 100%; min-height: 0; height: 100%; flex: 1; border-width: 6px; }
    body.mobile-game-mode .poker-table[data-table-state="lobby"],
    body.mobile-game-mode .poker-table[data-table-state="countdown"] { height: clamp(190px, 34dvh, 285px); flex: 0 1 auto; }
    body.mobile-game-mode .poker-table[data-table-state="playing"] { height: clamp(125px, 16dvh, 175px); flex: 0 1 auto; }
    body.mobile-game-mode .action-bar { position: relative; bottom: auto; flex: 0 0 auto; max-height: 60dvh; overflow-y: auto; overscroll-behavior: contain; padding: .6rem .55rem calc(.6rem + env(safe-area-inset-bottom)); }
    body.mobile-game-mode .side-rail { display: none; }
    body.mobile-game-mode .action-feedback { padding-bottom: .1rem; }
    body.mobile-game-mode .toast { bottom: calc(.7rem + env(safe-area-inset-bottom)); }
}
@media (max-width: 380px) {
    .coin-context-copy small { max-width: 18ch; }
    .hero-facts strong { font-size: 1rem; }
    .seat { min-width: 126px; }
    .seat-slot { min-width: 126px; }
    .seat-details strong { font-size: .64rem; }
    .seat-details strong em { display: block; margin: .1rem 0 0; }
    body.mobile-game-mode .poker-table[data-table-state="playing"] { height: 14dvh; }
    body.mobile-game-mode .action-bar { max-height: 68dvh; }
    body.mobile-game-mode .action-button { min-height: 40px; }
    body.mobile-game-mode .raise-preset { min-height: 38px; }
}
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; }
}

/* Table polish: a raised game surface with a clear centre of gravity. */
.poker-table {
    border-color: #1b2924;
    background:
        radial-gradient(ellipse at 50% 36%, rgba(112, 219, 117, .13), transparent 38%),
        radial-gradient(ellipse at 50% 52%, #14472d 0%, #0b2d1e 52%, #06150e 100%);
    box-shadow:
        0 0 0 1px rgba(157, 255, 34, .1),
        0 10px 0 #0a100e,
        0 22px 46px rgba(0, 0, 0, .48),
        inset 0 0 0 2px rgba(255, 255, 255, .055),
        inset 0 -26px 64px rgba(0, 0, 0, .38);
}
.poker-table::before {
    inset: 6%;
    z-index: 0;
    border-color: rgba(157, 255, 34, .22);
    background: radial-gradient(ellipse at 50% 44%, rgba(157, 255, 34, .08), transparent 64%);
    box-shadow: inset 0 0 0 9px rgba(0, 0, 0, .15), 0 0 34px rgba(157, 255, 34, .1);
}
.poker-table::after {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 0;
    border-radius: inherit;
    background:
        radial-gradient(ellipse at 50% 48%, transparent 38%, rgba(0, 0, 0, .2) 84%),
        repeating-linear-gradient(115deg, transparent 0 18px, rgba(255, 255, 255, .012) 19px 20px);
    mix-blend-mode: screen;
    pointer-events: none;
}
.table-ring { z-index: 1; opacity: .8; }
.table-brand, .table-copy { z-index: 1; }
.table-brand { top: 29%; color: rgba(245, 247, 245, .2); text-shadow: 0 1px 14px rgba(0, 0, 0, .3); }
.table-copy { bottom: 17%; color: rgba(157, 255, 34, .42); }
#seat-layer { position: absolute; inset: 0; z-index: 5; pointer-events: none; }
.seat { pointer-events: auto; min-width: 182px; border-radius: 10px; border-color: rgba(209, 234, 221, .2); background: linear-gradient(145deg, rgba(10, 22, 18, .92), rgba(3, 8, 7, .84)); box-shadow: 0 12px 24px rgba(0, 0, 0, .34), inset 0 1px 0 rgba(255, 255, 255, .06); backdrop-filter: blur(10px); }
.seat-current { border-color: rgba(157, 255, 34, .68); background: linear-gradient(145deg, rgba(24, 55, 28, .95), rgba(5, 16, 11, .9)); box-shadow: 0 0 0 1px rgba(157, 255, 34, .12), 0 0 24px rgba(157, 255, 34, .14), 0 12px 24px rgba(0, 0, 0, .34); }
.seat-avatar { box-shadow: 0 0 0 3px rgba(3, 7, 7, .9), 0 0 18px rgba(157, 255, 34, .14); }
.board { z-index: 4; min-width: 242px; padding: .42rem .55rem .5rem; border: 1px solid rgba(202, 238, 213, .18); border-radius: 14px; background: linear-gradient(180deg, rgba(4, 14, 10, .5), rgba(4, 11, 8, .28)); box-shadow: 0 10px 20px rgba(0, 0, 0, .16), inset 0 1px 0 rgba(255, 255, 255, .04); backdrop-filter: blur(4px); }
.board-label { color: rgba(225, 244, 231, .66); font-weight: 600; letter-spacing: .2em; }
.board-cards { gap: .28rem; }
.playing-card { border: 1px solid rgba(255, 255, 255, .7); border-radius: 7px; box-shadow: 0 6px 12px rgba(0, 0, 0, .34), 0 0 0 1px rgba(0, 0, 0, .12); }
.card-hidden { border-color: rgba(157, 255, 34, .45); background: linear-gradient(135deg, #254d3c, #102b20); }
.pot-marker { z-index: 4; top: 71%; padding: .27rem .65rem .32rem; border: 1px solid rgba(157, 255, 34, .18); border-radius: 999px; background: rgba(3, 10, 7, .52); box-shadow: 0 6px 14px rgba(0, 0, 0, .22); backdrop-filter: blur(5px); }
.pot-marker strong { color: var(--text); }

@media (max-width: 720px) {
    body.mobile-game-mode .table-wrap { padding: .4rem; background: radial-gradient(ellipse at 50% 0%, rgba(157, 255, 34, .06), transparent 55%); }
    body.mobile-game-mode .poker-table[data-table-state="playing"] { height: clamp(190px, 24dvh, 235px); flex: 0 0 clamp(190px, 24dvh, 235px); border-width: 7px; }
    body.mobile-game-mode .poker-table[data-seat-count="2"] .seat-0 { left: 4%; bottom: 8%; transform: none; }
    body.mobile-game-mode .poker-table[data-seat-count="2"] .seat-1 { right: 4%; top: 8%; bottom: auto; left: auto; }
    body.mobile-game-mode .seat { min-width: 140px; padding: .43rem .5rem; border-radius: 9px; }
    body.mobile-game-mode .seat-details strong { font-size: .68rem; }
    body.mobile-game-mode .seat-details span { font-size: .59rem; }
    body.mobile-game-mode .seat-state { font-size: .58rem; }
    body.mobile-game-mode .board { top: 46%; min-width: 236px; padding: .35rem .45rem .42rem; }
    body.mobile-game-mode .playing-card { width: 42px; height: 60px; padding-top: .3rem; font-size: 1.08rem; }
    body.mobile-game-mode .playing-card span { font-size: 1.15rem; }
    body.mobile-game-mode .pot-marker { top: 76%; }
    body.mobile-game-mode .table-brand { top: 25%; font-size: 2.2rem; }
    body.mobile-game-mode .table-copy { bottom: 12%; font-size: .52rem; }
}

/* eR33t card suite: recognizable at a glance, quiet enough for the table. */
.playing-card {
    position: relative;
    overflow: hidden;
    isolation: isolate;
    align-content: stretch;
    padding: .28rem;
    border-color: rgba(255, 255, 255, .82);
    background: linear-gradient(145deg, #fbfcf7 0%, #e8eee8 100%);
}
.playing-card::after {
    content: '';
    position: absolute;
    inset: 0;
    z-index: -1;
    background: linear-gradient(135deg, rgba(255,255,255,.6), transparent 38%, rgba(0,0,0,.08));
    pointer-events: none;
}
.card-corner {
    position: relative;
    z-index: 1;
    display: grid;
    justify-items: center;
    align-content: start;
    gap: .02rem;
    min-width: 1.1em;
    color: #14261d;
    font-family: var(--display);
    line-height: .78;
}
.card-corner b { font: 700 .72em/1 var(--display); letter-spacing: -.05em; }
.card-corner i { font: 700 .8em/1 var(--body); font-style: normal; }
.card-corner-bottom { align-self: end; transform: rotate(180deg); }
.card-watermark {
    position: absolute;
    left: 50%;
    top: 50%;
    z-index: 0;
    display: grid;
    place-items: center;
    width: 1.25em;
    height: 1.25em;
    transform: translate(-50%, -50%);
    border: 1px solid rgba(21, 80, 50, .2);
    border-radius: 50%;
    color: rgba(21, 80, 50, .24);
    font: 700 .82em/1 var(--display);
    letter-spacing: -.08em;
}
.card-suit-c .card-watermark, .card-suit-s .card-watermark { color: rgba(23, 112, 70, .25); border-color: rgba(23, 112, 70, .22); }
.card-suit-d, .card-suit-h { color: #b64354; }
.card-suit-d .card-corner, .card-suit-h .card-corner { color: #b64354; }
.card-suit-d .card-watermark, .card-suit-h .card-watermark { color: rgba(173, 49, 68, .23); border-color: rgba(173, 49, 68, .2); }
.card-back { display: grid; place-items: center; padding: .22rem; border-color: rgba(157, 255, 34, .58); background: #102a1f; color: var(--green); }
.card-back-inner {
    position: relative;
    display: grid;
    place-items: center;
    width: 100%;
    height: 100%;
    overflow: hidden;
    border: 1px solid rgba(157, 255, 34, .3);
    border-radius: 3px;
    background:
        repeating-linear-gradient(45deg, rgba(157, 255, 34, .13) 0 1px, transparent 1px 5px),
        linear-gradient(145deg, #1f5137, #0a2118 72%);
}
.card-back-inner::before, .card-back-inner::after { content: ''; position: absolute; inset: 12%; border: 1px solid rgba(157, 255, 34, .22); transform: rotate(45deg); }
.card-back-inner::after { inset: 22%; border-color: rgba(242, 196, 92, .24); transform: rotate(-45deg); }
.card-back-mark { position: relative; z-index: 1; display: grid; place-items: center; width: 1.5em; height: 1.5em; border: 1px solid rgba(157, 255, 34, .72); border-radius: 50%; color: var(--green); font: 700 .72em/1 var(--display); letter-spacing: -.1em; box-shadow: 0 0 10px rgba(157, 255, 34, .14); }
.card-back-line { position: absolute; left: 18%; right: 18%; top: 50%; height: 1px; background: rgba(242, 196, 92, .28); transform: rotate(-45deg); }
.card-mini.playing-card { padding: .16rem; border-radius: 4px; }
.card-mini .card-corner { min-width: 1em; }
.card-mini .card-corner b { font-size: .62em; }
.card-mini .card-corner i { font-size: .7em; }
.card-mini .card-watermark { font-size: .72em; }
.card-mini .card-back-mark { font-size: .62em; }
.hole-cards-own { z-index: 8; cursor: pointer; user-select: none; touch-action: manipulation; transition: filter .18s ease, transform .18s ease; }
.hole-cards-own:hover, .hole-cards-own:focus-visible { filter: drop-shadow(0 0 7px rgba(157, 255, 34, .25)); outline: none; transform: translateY(-1px) rotate(-5deg); }
.hole-cards-own:focus-visible .playing-card { border-color: var(--green); }
.hole-cards-label { position: absolute; right: 0; bottom: calc(100% + .16rem); color: rgba(157, 255, 34, .74); font: 600 .45rem/1 var(--display); letter-spacing: .08em; text-transform: uppercase; white-space: nowrap; pointer-events: none; }
.hole-cards-own.is-hidden .hole-cards-label { color: var(--gold); }
.hole-cards-own.is-hidden .card-back { animation: card-peek-pulse 2.4s ease-in-out infinite; }
@keyframes card-peek-pulse { 0%, 100% { box-shadow: 0 6px 12px rgba(0, 0, 0, .34); } 50% { box-shadow: 0 0 0 2px rgba(157, 255, 34, .16), 0 7px 16px rgba(0, 0, 0, .4); } }
@media (prefers-reduced-motion: reduce) { .hole-cards-own.is-hidden .card-back { animation: none; } }
@media (max-width: 720px) {
    body.mobile-game-mode .hole-cards-label { font-size: .4rem; }
    body.mobile-game-mode .card-watermark { width: 1.15em; height: 1.15em; }
}

/* Quick reactions keep the table social without turning the mobile dock into chat. */
.reaction-rail { grid-column: 1 / -1; display: flex; align-items: center; gap: .55rem; min-height: 36px; padding-top: .5rem; border-top: 1px solid rgba(157, 255, 34, .1); }
.reaction-label { color: var(--silver); font: 600 .58rem var(--display); letter-spacing: .08em; text-transform: uppercase; white-space: nowrap; }
.reaction-buttons { display: inline-flex; gap: .28rem; }
.reaction-button { display: grid; place-items: center; min-width: 31px; height: 29px; padding: 0 .42rem; border: 1px solid rgba(157, 255, 34, .18); border-radius: 999px; color: var(--text); background: rgba(20, 37, 29, .72); cursor: pointer; font-size: 1rem; line-height: 1; transition: transform .16s ease, border-color .16s ease, background .16s ease, box-shadow .16s ease; }
.reaction-button:hover, .reaction-button:focus-visible { border-color: rgba(157, 255, 34, .68); background: rgba(53, 82, 47, .88); box-shadow: 0 0 14px rgba(157, 255, 34, .15); outline: none; transform: translateY(-2px) scale(1.05); }
.reaction-button:active { transform: translateY(0) scale(.98); }
.reaction-button.reaction-text { color: var(--gold); font: 700 .58rem var(--display); letter-spacing: .04em; }
.reaction-note { margin-left: auto; color: var(--muted); font-size: .58rem; white-space: nowrap; }
.table-reaction-burst { position: absolute; left: var(--reaction-x, 50%); bottom: 29%; z-index: 9; color: var(--text); font-size: clamp(2rem, 5vw, 3.5rem); line-height: 1; pointer-events: none; filter: drop-shadow(0 6px 10px rgba(0, 0, 0, .42)); animation: table-reaction-float 1.2s cubic-bezier(.2, .8, .2, 1) forwards; }
.table-reaction-burst::after { content: ''; position: absolute; left: 50%; top: 50%; width: 1.55em; height: 1.55em; border: 1px solid rgba(157, 255, 34, .3); border-radius: 50%; transform: translate(-50%, -50%); opacity: .7; }
@keyframes table-reaction-float { 0% { opacity: 0; transform: translate(-50%, 18px) rotate(var(--reaction-tilt)); } 15% { opacity: 1; } 100% { opacity: 0; transform: translate(-50%, -74px) rotate(calc(var(--reaction-tilt) * -1)); } }
@media (prefers-reduced-motion: reduce) { .table-reaction-burst { animation: none; opacity: 1; transform: translateX(-50%); } }
@media (max-width: 720px) {
    .reaction-rail { gap: .35rem; min-height: 33px; padding-top: .38rem; }
    .reaction-label { font-size: .52rem; }
    .reaction-buttons { gap: .18rem; }
    .reaction-button { min-width: 28px; height: 27px; padding-inline: .3rem; font-size: .92rem; }
    .reaction-button.reaction-text { font-size: .52rem; }
    .reaction-note { display: none; }
    .table-reaction-burst { bottom: 35%; }
}

/* Crew UX: retain a readable table while controls update in place. */
.card-suit-s .card-corner { color: #18221e; }
.card-suit-h .card-corner { color: #b32242; }
.card-suit-d .card-corner { color: #1459b6; }
.card-suit-c .card-corner { color: #13713f; }
.hole-cards-own .card-mini { width: 50px; height: 70px; font-size: 1.45rem; }
.card-mini .card-corner b { font-size: .88em; }
.card-mini .card-corner i { font-size: .8em; }
.hole-cards-own { top: -3.6rem; }
.action-button { min-height: 46px; min-width: 96px; font-size: .88rem; touch-action: manipulation; }
.action-button span { display: block; font-size: .75rem; }
.action-bar[aria-busy="true"] .action-feedback { color: var(--green); }
.raise-tools { padding: .4rem 0 0; border: 0; background: none; box-shadow: none; min-width: 0; }
.raise-presets { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.raise-preset { min-width: 0; min-height: 44px; font-size: .78rem; }
.custom-raise { margin-top: .3rem; }
.custom-raise summary { min-height: 44px; padding: .65rem .25rem; cursor: pointer; color: var(--silver); font-size: .8rem; }
.custom-raise summary span { float: right; color: var(--muted); font-size: .72rem; max-width: 60%; text-align: right; }
.custom-raise .raise-target-row { margin: .2rem 0 .5rem; }
.showdown-result { display: grid; gap: .2rem; color: var(--silver); font-size: .75rem; text-align: center; }
.showdown-winner strong { color: var(--green); }
.action-bar { position: relative; bottom: auto; }
@media (min-width: 721px) {
    .poker-table[data-seat-count="2"] { min-height: 420px; }
    .poker-table[data-seat-count="2"] .seat { left: 50%; right: auto; transform: translateX(-50%); width: 310px; display: flex; align-items: center; justify-content: space-between; gap: .7rem; }
    .poker-table[data-seat-count="2"] .seat-opponent { top: 4%; bottom: auto; }
    .poker-table[data-seat-count="2"] .seat-viewer { bottom: 4%; top: auto; }
    .poker-table[data-seat-count="2"] .hole-cards { position: relative; top: auto; right: auto; transform: none; flex-shrink: 0; }
    .poker-table[data-seat-count="2"] .pot-marker { top: 60%; }
}

@media (max-width: 720px) {
    body.mobile-game-mode { height: auto; min-height: 100dvh; overflow-y: auto; }
    body.mobile-game-mode .site-header { height: calc(44px + env(safe-area-inset-top)); }
    body.mobile-game-mode main { min-height: 100dvh; height: auto; overflow: visible; padding-top: calc(44px + env(safe-area-inset-top)); }
    body.mobile-game-mode #practice-app,
    body.mobile-game-mode #room-screen,
    body.mobile-game-mode .workspace { height: auto; min-height: 0; }
    body.mobile-game-mode .table-column { min-height: calc(100dvh - 44px - env(safe-area-inset-top)); }
    body.mobile-game-mode #room-screen { margin-top: 0; }
    body.mobile-game-mode .table-toolbar { min-height: 0; padding: .3rem .4rem; gap: .2rem; }
    body.mobile-game-mode .table-heading { display: none; }
    body.mobile-game-mode .toolbar-actions { width: 100%; justify-content: space-between; }
    body.mobile-game-mode .toolbar-button { min-height: 44px; font-size: .68rem; }
    body.mobile-game-mode .table-wrap { padding: .2rem; flex: 1 0 auto; }
    body.mobile-game-mode .poker-table[data-table-state] { min-height: 270px; height: max(270px, calc(100dvh - 390px)); flex: 1 0 auto; border-radius: 24px; }
    body.mobile-game-mode .poker-table[data-seat-count="2"] .seat { min-width: 0; width: calc(100% - 24px); padding: .35rem .45rem; display: flex; align-items: center; justify-content: space-between; gap: .5rem; transform: none; left: 12px; right: auto; }
    body.mobile-game-mode .poker-table[data-seat-count="2"] .seat-opponent { top: 8px; bottom: auto; }
    body.mobile-game-mode .poker-table[data-seat-count="2"] .seat-viewer { top: auto; bottom: 8px; }
    body.mobile-game-mode .seat-main { gap: .18rem .4rem; min-width: 0; }
    body.mobile-game-mode .seat-details strong { font-size: .78rem; }
    body.mobile-game-mode .seat-details span { font-size: .7rem; }
    body.mobile-game-mode .seat-details em { display: none; }
    body.mobile-game-mode .seat-state { font-size: .65rem; }
    body.mobile-game-mode .poker-table[data-seat-count="2"] .hole-cards { position: relative; top: auto; right: auto; transform: none; flex-shrink: 0; }
    body.mobile-game-mode .hole-cards-label { display: none; }
    body.mobile-game-mode .playing-card { width: 38px; height: 54px; font-size: 1.25rem; }
    body.mobile-game-mode .hole-cards-own .card-mini { width: 46px; height: 62px; font-size: 1.4rem; }
    body.mobile-game-mode .seat-opponent .card-mini { width: 28px; height: 38px; font-size: 1rem; }
    body.mobile-game-mode .board { top: 41%; min-width: 0; width: max-content; max-width: 100%; padding: .25rem .35rem; gap: .25rem; }
    body.mobile-game-mode .board-label { font-size: .55rem; }
    body.mobile-game-mode .pot-marker { top: 58%; display: flex; align-items: baseline; gap: .4rem; padding: .15rem .5rem; }
    body.mobile-game-mode .pot-marker strong { font-size: .8rem; line-height: 1.2; }
    body.mobile-game-mode .table-brand, body.mobile-game-mode .table-copy { display: none; }
    body.mobile-game-mode .action-bar { position: relative; max-height: none; overflow: visible; padding: .4rem; flex: 0 0 auto; }
    body.mobile-game-mode .action-heading { margin-bottom: .3rem; }
    body.mobile-game-mode .action-buttons { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .3rem; }
    body.mobile-game-mode .action-button { min-width: 0; min-height: 44px; padding: .3rem; font-size: .8rem; }
    body.mobile-game-mode .action-button span { font-size: .68rem; }
    body.mobile-game-mode .action-timebank { grid-column: span 2; }
    body.mobile-game-mode .raise-tools { grid-column: 1 / -1; width: 100%; padding: 0; }
    body.mobile-game-mode .raise-preset { min-height: 44px; padding: .2rem; font-size: .7rem; }
    body.mobile-game-mode .custom-raise { margin: 0; }
    body.mobile-game-mode .custom-raise summary { padding: .65rem .2rem; }
    body.mobile-game-mode .action-feedback { margin: .15rem 0 0; font-size: .68rem; }
    body.mobile-game-mode .reaction-rail { display: none; }
    body.mobile-game-mode .showdown-result { font-size: .65rem; }
    body.mobile-game-mode .poker-table[data-table-state="complete"] .pot-marker,
    body.mobile-game-mode .poker-table[data-table-state="winner"] .pot-marker { display: none; }
    /* Wider tables and two runouts retain scrolling rather than clipping cards. */
    body.mobile-game-mode .poker-table:not([data-seat-count="2"]) { min-height: 430px; }
    body.mobile-game-mode .poker-table:has(.board-runout + .board-runout) { min-height: 380px; }
}

/* Keep recovery visible even when the focused table hides the page banner. */
.connection-notice { padding: .5rem .7rem; color: var(--gold); background: #171a0e; font-size: .8rem; }
.connection-notice a { margin-left: .5rem; text-decoration: underline; }
@media (max-width: 720px) {
    body.mobile-game-mode main { padding-left: max(.5rem, env(safe-area-inset-left)); padding-right: max(.5rem, env(safe-area-inset-right)); padding-bottom: env(safe-area-inset-bottom); }
    .custom-raise input { font-size: 16px; }
}
/* Short landscape screens use two columns so the decision and hand coexist. */
@media (max-width: 720px) and (max-height: 500px) and (orientation: landscape) {
    body.mobile-game-mode .table-column { display: grid; grid-template-columns: minmax(0, 1fr) minmax(270px, 1fr); align-content: start; }
    body.mobile-game-mode .table-toolbar, body.mobile-game-mode .connection-notice, body.mobile-game-mode .lobby-actions { grid-column: 1 / -1; }
    body.mobile-game-mode .table-wrap { min-width: 0; }
    body.mobile-game-mode .poker-table[data-table-state] { height: 270px; min-height: 270px; }
    body.mobile-game-mode .action-bar { min-width: 0; border-top: 0; padding: .35rem; }
    body.mobile-game-mode .action-heading { margin-bottom: .2rem; }
    body.mobile-game-mode .action-heading span { font-size: .6rem; }
    body.mobile-game-mode .action-buttons { gap: .2rem; }
    body.mobile-game-mode .custom-raise summary { min-height: 36px; padding: .4rem .2rem; }
}

.chat-dialog { position: fixed; inset: 8px 8px auto auto; width: min(380px, calc(100vw - 16px)); max-height: calc(100dvh - 16px); margin: 0; padding: .8rem; color: var(--text); background: #08120e; border: 1px solid var(--line); border-radius: 12px; overflow: auto; }
.chat-dialog::backdrop { background: rgba(0,0,0,.55); }
.chat-heading { display: flex; align-items: center; justify-content: space-between; gap: .5rem; }
.chat-heading h2 { font-size: 1.4rem; }
.chat-heading button, .chat-settings button, .chat-reactions button { min-height: 44px; }
.chat-turn { padding: .5rem 0; color: var(--green); font-size: .8rem; }
.chat-settings { display: flex; justify-content: space-between; align-items: center; font-size: .75rem; color: var(--muted); }
.chat-settings button { border: 0; background: transparent; color: var(--silver); cursor: pointer; }
.chat-events { min-height: 100px; max-height: min(32dvh, 260px); overflow-y: auto; list-style: none; margin: .5rem 0; padding: .5rem 0; border-block: 1px solid var(--line); overflow-wrap: anywhere; }
.chat-events li { padding: .25rem 0; font-size: .85rem; }
.chat-events strong { color: var(--silver); }
.chat-reactions { display: flex; gap: .3rem; margin-bottom: .5rem; }
.chat-reactions button { min-width: 44px; border: 1px solid var(--line); border-radius: 6px; background: var(--panel); color: var(--text); font-size: 1rem; cursor: pointer; }
#chat-form { display: flex; gap: .4rem; }
#chat-message { min-width: 0; width: 100%; font-size: 16px; }
#chat-feedback { min-height: 1.2em; font-size: .75rem; margin: .4rem 0 0; color: var(--muted); }
@media (max-width: 720px) { body.mobile-game-mode .toolbar-actions { flex-wrap: wrap; } body.mobile-game-mode .toolbar-button { padding-inline: .3rem; } }

/* Authored layout must never override semantic visibility. */
[hidden] { display: none !important; }
.chat-dialog[open] { display: flex; flex-direction: column; }
.chat-heading, .chat-turn, .chat-settings, .chat-reactions, #chat-form, #chat-feedback { flex: 0 0 auto; }
.chat-events { flex: 1 1 auto; min-height: 40px; }

.entry-screen { max-width: 560px; padding: clamp(1.5rem, 6vw, 4rem) 0; margin-inline: auto; }
.entry-screen h2 { margin: 1rem 0; font: 600 clamp(3rem, 10vw, 5rem)/.95 var(--display); letter-spacing: -.04em; }
.entry-screen > p:not(.eyebrow) { color: var(--muted); }
.entry-screen #guest-play { min-height: 52px; width: 100%; margin: 1.4rem 0 .7rem; font-size: 1rem; }
.entry-account { min-height: 44px; }
body.entry-mode .hero, body.entry-mode #app-status, body.entry-mode .leaderboard-preview, body.entry-mode .club-notes, body.entry-mode .site-footer,
body.lobby-mode .hero, body.lobby-mode .leaderboard-preview, body.lobby-mode .club-notes { display: none; }
body.entry-mode main, body.lobby-mode main { padding-top: 1rem; }

body.room-mode .hero { display: none; }
body.room-mode main { padding-top: 1rem; }
.lobby-play-actions { display: flex; gap: .6rem; }
.lobby-play-actions button { flex: 1; min-height: 48px; }
.table-options summary { min-height: 44px; padding-block: .7rem; color: var(--muted); cursor: pointer; }
.table-option-fields { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: .65rem; padding-block: .25rem .65rem; }
.table-option-fields > div { display: grid; gap: .35rem; min-width: 0; }
.table-option-fields > div:last-child { grid-column: 1 / -1; }
.table-option-fields select { width: 100%; min-height: 44px; }
@media (max-width: 440px) {
    .table-option-fields { grid-template-columns: 1fr; }
    .lobby-play-actions { flex-wrap: wrap; }
    .lobby-play-actions button { flex-basis: 100%; }
}
#share-link { width: 100%; margin-block: .7rem; font-size: 16px; }
#share-dialog, #invite-dialog { max-height: calc(100dvh - 2rem); overflow-y: auto; }
#share-dialog .dialog-actions { flex-wrap: wrap; }
#share-dialog .dialog-actions button, #invite-dialog .dialog-actions button { min-height: 44px; }
#share-status, #invite-feedback { overflow-wrap: anywhere; }
#invite-feedback:empty { display: none; }
#invite-form label { display: block; margin-top: .75rem; }
#invite-form input, #invite-form select { width: 100%; }

body.lobby-mode #app-status:not(.error) { display: none; }

/* Theme atlases keep rank/suit geometry identical across every artwork set. */
.playing-card.card-face, .playing-card.card-back { display: block; flex-shrink: 0; padding: 0; border: 0; border-radius: 5px; background-color: #f6f3e9; background-repeat: no-repeat; box-shadow: 0 3px 7px rgba(0,0,0,.38); }
.playing-card.card-face { background-image: var(--poker-deck-image, url('/assets/poker/deck-clubhouse-classic.svg')); background-size: 1300% 400%; background-position: var(--card-x) var(--card-y); }
.playing-card.card-back { background-image: var(--poker-deck-back, url('/assets/poker/back-clubhouse.svg')); background-size: 100% 100%; background-position: center; background-color: #10251a; }
.playing-card::after { display: none; }
.playing-card { width: 56px; height: 78.4px; }
.hole-cards-own .card-mini { width: 60px; height: 84px; }
.seat-opponent .card-mini { width: 30px; height: 42px; }
.deck-dialog { width: min(430px, calc(100vw - 24px)); max-height: calc(100dvh - 24px); padding: 1rem; color: var(--text); background: #0a1510; border: 1px solid var(--line); border-radius: 12px; overflow-y: auto; }
.deck-dialog::backdrop { background: rgba(0,0,0,.6); }
.deck-heading { display: flex; align-items: center; justify-content: space-between; gap: .5rem; }
.deck-heading h2 { font-size: 1.6rem; }
.deck-heading button { min-height: 44px; }
.deck-intro { color: var(--muted); font-size: .8rem; margin: .6rem 0 1rem; }
.deck-choices { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: .4rem; }
.deck-choices > button { padding: .7rem .2rem; border: 1px solid var(--line); border-radius: 8px; color: var(--silver); background: #101d16; cursor: pointer; min-width: 0; }
.deck-choices > button[aria-pressed="true"] { border-color: var(--green); color: var(--green); box-shadow: inset 0 0 0 1px var(--green); }
.deck-choices > button:focus-visible { outline: 2px solid var(--green); outline-offset: 3px; }
.deck-choices strong { display: block; font-size: .72rem; margin-top: .55rem; }
.deck-preview { display: flex; justify-content: center; }
.deck-preview .playing-card { width: 44px; height: 61.6px; }
.deck-preview .playing-card + .playing-card { margin-left: -20px; margin-top: 8px; }
.deck-four-color { display: flex; align-items: center; gap: .7rem; margin-top: 1rem; padding: .5rem 0; min-height: 44px; cursor: pointer; }
.deck-four-color input { accent-color: var(--green); width: 20px; height: 20px; min-height: 20px; }
.deck-four-color span { display: grid; gap: .15rem; }
.deck-four-color strong { font-size: .85rem; }
.deck-four-color small { font-size: .7rem; color: var(--muted); }
.deck-feedback { min-height: 1em; margin: .6rem 0 0; font-size: .75rem; color: var(--muted); }
@media (min-width: 721px) {
    .poker-table[data-seat-count="2"] { min-height: 460px; }
    .poker-table[data-seat-count="2"] .pot-marker { top: 60%; }
}
@media (max-width: 720px) {
    body.mobile-game-mode .poker-table[data-table-state] { min-height: 315px; height: max(315px, calc(100dvh - 390px)); }
    body.mobile-game-mode .playing-card { width: 48px; height: 67.2px; }
    body.mobile-game-mode .hole-cards-own .card-mini { width: 60px; height: 84px; }
    body.mobile-game-mode .seat-opponent .card-mini { width: 30px; height: 42px; }
    body.mobile-game-mode .board { top: 39.7%; padding: .25rem; }
    body.mobile-game-mode .board-cards { gap: 3px; }
    body.mobile-game-mode .pot-marker { top: 57%; }
    body.mobile-game-mode .seat-details { min-width: 0; }
    body.mobile-game-mode .seat-details strong { max-width: 125px; }
    body.mobile-game-mode .deck-preview .playing-card { width: 44px; height: 61.6px; }
    body.mobile-game-mode .toolbar-button { padding-inline: .25rem; font-size: .65rem; }
}

@media (max-width: 380px) { body.mobile-game-mode .toolbar-actions { gap: .1rem; } body.mobile-game-mode .toolbar-button { padding-inline: .18rem; font-size: .6rem; } }

@media (max-width: 720px) and (max-height: 500px) and (orientation: landscape) {
    body.mobile-game-mode .poker-table[data-table-state] { min-height: 270px; height: 270px; }
    body.mobile-game-mode .playing-card { width: 44px; height: 61.6px; }
    body.mobile-game-mode .hole-cards-own .card-mini { width: 52px; height: 72.8px; }
    body.mobile-game-mode .seat-opponent .card-mini { width: 26px; height: 36.4px; }
    body.mobile-game-mode .board { top: 40%; }
    body.mobile-game-mode .board-label { display: none; }
    body.mobile-game-mode .pot-marker { top: 55%; }
}

@media (max-width: 720px) { body.mobile-game-mode .poker-table[data-table-state="complete"] .board, body.mobile-game-mode .poker-table[data-table-state="winner"] .board { top: 44%; } }

/* Appearance affects the surrounding room; felt and deck retain their own contrast. */
:root {
    --ink: #151719; --ink-2: #1c1f22; --panel: #25292d; --panel-soft: #2d3237;
    --line: #3d4348; --line-bright: #717b82; --text: #f1f2ed; --silver: #dce0e2; --muted: #aeb5ba;
    --accent-text: #b6d989; --focus: #b1da79; --gold: #e0bd74; --red: #f39b9b;
    --notice: #292b2c; --error-surface: #38282b; --shadow: rgba(0,0,0,.2);
}
:root[data-poker-appearance="light"] {
    --ink: #f3f1eb; --ink-2: #faf9f5; --panel: #e9e7e0; --panel-soft: #dedfd8;
    --line: #c4c7c0; --line-bright: #858f86; --text: #252c30; --silver: #344047; --muted: #58636a;
    --accent-text: #3d611f; --focus: #426d23; --gold: #73561d; --red: #9d343d;
    --notice: #eae8df; --error-surface: #f4e2e1; --shadow: rgba(36,42,35,.1);
}
body { background: var(--ink); }
html .er33t-header { --er33t-header-bg: var(--ink-2); --er33t-header-line: var(--line); --er33t-header-text: var(--text); --er33t-header-muted: var(--muted); --er33t-header-soft: var(--panel); --er33t-header-signal: var(--accent-text); }
html .er33t-header__panel, html .er33t-header[data-er33t-enhanced] .er33t-header__nav { background: var(--ink-2); border-color: var(--line); }
html .er33t-header__panel::before { background: var(--ink-2); border-color: var(--line); }
.poker-appearance { flex: 0 0 auto; }
.poker-appearance select { width: 92px; min-height: 44px; padding: .4rem .45rem; font-size: .75rem; border-radius: 6px; }
.room-panel, .public-receipt-panel, .table-column, .side-rail, .action-bar, .lobby-actions, .confirm-dialog, .chat-dialog, .deck-dialog { background: var(--ink-2); color: var(--text); border-color: var(--line); box-shadow: none; }
.table-wrap, body.mobile-game-mode .table-wrap { background: transparent; }
input, select { background: var(--panel); color: var(--text); border-color: var(--line); }
input::placeholder { color: var(--muted); opacity: 1; }
.button-quiet, .chat-reactions button, .deck-choices > button { background: var(--panel); color: var(--silver); border-color: var(--line); }
.button-primary { background: var(--green); color: #18220c; border-color: #86c832; }
.eyebrow, .toolbar-button, .text-button, .mode-badge, .rail-help a, .booth-live, .balance small, .raise-control span, .chat-turn, .action-bar[aria-busy="true"] .action-feedback { color: var(--accent-text); }
.toolbar-button:hover, .text-button:hover, .toolbar-button:focus-visible, .text-button:focus-visible { color: var(--text); }
.mode-badge { border-color: var(--line); }
.mode-badge-gold { color: var(--gold); }
.signal-dot, .live-pip, .action-pip { background: var(--focus); box-shadow: none; }
.status-banner, .connection-notice { background: var(--notice); border-color: var(--line); color: var(--text); }
.status-banner strong, .status-icon { color: var(--silver); }
.status-banner.error { background: var(--error-surface); border-color: var(--red); }
.status-banner.error strong, .status-banner.error .status-icon { color: var(--red); }
.action-button, .action-call, .action-raise, .action-allin, .action-fold { background: var(--panel); border-color: var(--line); color: var(--text); box-shadow: none; }
.action-call { border-color: var(--focus); color: var(--accent-text); }
.action-allin { color: var(--gold); }
.action-fold { color: var(--red); }
.action-button span, .action-raise span { color: var(--muted); }
.action-button:hover { background: var(--panel-soft); box-shadow: none; }
.raise-preset { background: var(--panel); color: var(--muted); }
.raise-preset.is-selected { color: var(--text); background: var(--panel-soft); border-color: var(--focus); box-shadow: none; }
.balance-rule { background: var(--line); }
.balance-rule span { background: var(--line-bright); box-shadow: none; }
.balance-button:hover, .balance-button:focus-visible { color: var(--text); text-shadow: none; }
.rail-help a { text-decoration: underline; text-underline-offset: 3px; }
.toast { background: var(--panel); border-color: var(--line-bright); color: var(--text); box-shadow: 0 6px 20px var(--shadow); }
.deck-choices > button[aria-pressed="true"] { color: var(--accent-text); border-color: var(--focus); box-shadow: inset 0 0 0 1px var(--focus); }
.deck-four-color input { accent-color: var(--focus); }
input:focus-visible, select:focus-visible, button:focus-visible, a:focus-visible, .deck-choices > button:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; }
.mobile-game-toggle[aria-pressed="true"] { color: var(--text); border-color: var(--line); background: var(--panel); }
.poker-table { --text: #f1f4ef; --silver: #e0e6e1; --muted: #b7c5bd; --focus: #b1da79; color: var(--text); border-color: #3c4540; background: radial-gradient(ellipse at 50% 40%, #2c4439, #20352c 62%, #182a23); box-shadow: inset 0 0 0 1px rgba(255,255,255,.08), 0 8px 18px var(--shadow); }
.poker-table::before { background: none; border-color: rgba(190,210,194,.16); box-shadow: none; }
.poker-table::after { background: repeating-linear-gradient(115deg, transparent 0 18px, rgba(255,255,255,.008) 19px 20px); mix-blend-mode: normal; }
.table-ring { opacity: .2; }
.table-copy { color: #9caf9f; }
.seat { background: #202a24; border-color: #536258; color: #f1f4ef; box-shadow: 0 3px 10px rgba(0,0,0,.15); }
.seat-current { background: #28362b; border-color: #9dcd64; box-shadow: none; }
.seat-avatar { background: #39483d; color: #f1f4ef; border-color: #819784; box-shadow: none; }
.seat-avatar.avatar-character { background: #161d16; border-color: #859460; }
.avatar-character .seat-avatar-image { inset: auto auto -1px 50%; width: calc(100% + 10px); height: calc(100% + 10px); transform: translateX(-50%); border-radius: 0; object-fit: contain; filter: none; z-index: 3; }
.avatar-character .avatar-glyph { visibility: hidden; }
.dealer-button {
    position: absolute;
    inset: auto auto -5px -5px;
    z-index: 4;
    display: grid;
    place-items: center;
    width: 18px;
    height: 18px;
    border: 1px solid #a57425;
    border-radius: 50%;
    background: #ffe5a0;
    color: #241909;
    box-shadow: 0 1px 3px #000b;
    font: 700 11px/1 var(--display);
}
.board { background: rgba(15,26,20,.28); border-color: rgba(190,210,194,.16); box-shadow: none; }
.board-label { color: #c0cdc4; }
.pot-marker { background: #1d2d24; color: #b7c5bd; border-color: #536258; box-shadow: none; }
.pot-marker strong { color: #f1f4ef; }
.poker-chip-icon { width: 22px; height: 22px; object-fit: contain; flex: none; }
.bet-settings { margin-top: .9rem; border-top: 1px solid var(--line); }
.bet-settings > summary { display: list-item; min-height: 44px; padding-block: .8rem; cursor: pointer; }
.bet-settings-form fieldset { min-width: 0; margin: .6rem 0; padding: .5rem; border: 1px solid var(--line); border-radius: 6px; }
.bet-settings-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .35rem; }
.bet-settings-field { display: grid; gap: .25rem; font-size: .75rem; }
.bet-settings-field input { width: 100%; min-height: 44px; padding-inline: .35rem; }
.bet-settings-help, .bet-settings-status { font-size: .8rem; margin: .35rem 0; }
.bet-settings-actions { display: flex; flex-wrap: wrap; gap: .4rem; }
.pot-marker:has(.poker-chip-icon) { display: flex; align-items: center; gap: .35rem; }
body.mobile-game-mode .poker-chip-icon { width: 16px; height: 14px; }
.poker-chip-flight { position: absolute; z-index: 8; width: 26px; height: 26px; pointer-events: none; background: url('/assets/poker/chips-er33t.webp') center / contain no-repeat; }
@media (prefers-reduced-motion: reduce) { .poker-chip-flight { display: none; } }
.poker-table .seat-details strong, .poker-table .seat-details span, .poker-table .showdown-result { color: #e0e6e1; }
.poker-table .seat-state, .poker-table .seat-details em { color: #b7c5bd; }
.poker-table .seat-current .seat-state, .poker-table .showdown-winner strong { color: #b8e18a; }
@media (max-width: 720px) {
    html .er33t-header__inner { gap: .45rem; padding-inline: .5rem; }
    .poker-appearance { margin-left: auto; }
    .poker-appearance select { width: 82px; min-height: 44px; padding-inline: .3rem; font-size: .72rem; }
    html .er33t-header__toggle { margin-left: 0; flex-shrink: 0; }
}

/* Palette changes are immediate, so text never crosses an unreadable color tween. */
.button, .action-button, .raise-preset, .toolbar-button, .text-button { transition-property: transform, border-color; }
:root { --felt-highlight: #2c4439; --felt-mid: #20352c; --felt-edge: #182a23; --felt-rail: #3c4540; --felt-seat: #202a24; --felt-current: #28362b; }
:root[data-poker-table-style="slate"] { --felt-highlight: #344958; --felt-mid: #293c4c; --felt-edge: #1e2e3b; --felt-rail: #424d56; --felt-seat: #242d35; --felt-current: #2c3c47; }
:root[data-poker-table-style="graphite"] { --felt-highlight: #414349; --felt-mid: #34363b; --felt-edge: #292b30; --felt-rail: #4c4e52; --felt-seat: #292b30; --felt-current: #36393d; }
.poker-table { border-color: var(--felt-rail); background: radial-gradient(ellipse at 50% 40%, var(--felt-highlight), var(--felt-mid) 62%, var(--felt-edge)); }
.poker-table::after { background: url('/assets/poker/felt-texture.webp') repeat; background-size: 256px 256px; opacity: .14; mix-blend-mode: soft-light; }
.seat { background: var(--felt-seat); }
.seat-current { background: var(--felt-current); }
.customize-label { margin: 0 0 .5rem; color: var(--muted); font: 600 .7rem var(--body); letter-spacing: .04em; text-transform: uppercase; }
.table-surface-label { margin-top: 1rem; }
.table-style-choices { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: .4rem; }
.table-style-choices button { display: flex; align-items: center; justify-content: center; gap: .35rem; min-height: 44px; padding: .4rem .2rem; border: 1px solid var(--line); border-radius: 6px; background: var(--panel); color: var(--silver); font-size: .73rem; cursor: pointer; }
.table-style-choices button[aria-pressed="true"] { border-color: var(--focus); box-shadow: inset 0 0 0 1px var(--focus); }
.felt-swatch { display: block; width: 18px; height: 18px; flex: 0 0 18px; border-radius: 50%; border: 1px solid #8c948d; }
.felt-classic { background: #2c4439; } .felt-slate { background: #293c4c; } .felt-graphite { background: #34363b; }

.toolbar-button, .text-button, .mode-badge, .rail-help a, .booth-live, .balance small, .raise-control span { color: var(--silver); }

.unit-button.is-selected, .coin-context-mark { box-shadow: none; }
.raise-slider::-webkit-slider-runnable-track { background: var(--line-bright); }
.raise-slider::-moz-range-track { background: var(--line-bright); }
.raise-slider::-webkit-slider-thumb { background: var(--focus); box-shadow: none; }
.raise-slider::-moz-range-thumb { background: var(--focus); box-shadow: none; }
.hole-cards-own:hover, .hole-cards-own:focus-visible { filter: none; }
.hole-cards-own:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; border-radius: 5px; }
.hole-cards-own.is-hidden .card-back { animation: none; }

/* Keep the live hand in front; occasional table controls live behind More. */
.mobile-room-brand { display: none; font: 700 1.25rem var(--display); letter-spacing: -.06em; }
.table-more { position: relative; }
.table-more > summary { display: flex; align-items: center; justify-content: center; min-width: 48px; min-height: 44px; padding: .4rem .6rem; color: var(--silver); font-size: .78rem; list-style: none; cursor: pointer; border-radius: 5px; }
.table-more > summary::-webkit-details-marker { display: none; }
.table-more[open] > summary { background: var(--panel); }
.table-more-menu { position: absolute; right: 0; top: calc(100% + 4px); min-width: 190px; padding: .35rem; display: grid; gap: .1rem; background: var(--ink-2); border: 1px solid var(--line); border-radius: 8px; box-shadow: 0 8px 25px var(--shadow); z-index: 30; }
.table-more-menu .toolbar-button { width: 100%; min-height: 44px; padding: .6rem .7rem; font-size: .8rem; text-align: left; border-radius: 4px; }
.table-more-menu .toolbar-button:hover { background: var(--panel); }
.table-more > summary:focus-visible, .bet-sizing > summary:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.appearance-setting { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin: .7rem 0 1rem; font-size: .8rem; }
.appearance-setting select { min-height: 44px; min-width: 110px; }
.timebank-button { margin-left: auto; min-height: 44px; min-width: 48px; padding: .4rem .6rem; border: 1px solid var(--line); border-radius: 5px; background: var(--panel); color: var(--silver); font-size: .75rem; cursor: pointer; }
.bet-sizing { grid-column: 1 / -1; min-width: 0; margin-top: .15rem; }
.bet-sizing > summary { display: flex; align-items: center; min-height: 44px; width: max-content; padding: .5rem .2rem; color: var(--muted); font-size: .75rem; cursor: pointer; list-style: none; }
.bet-sizing > summary::before { content: '+'; font-size: 1rem; margin-right: .45rem; }
.bet-sizing[open] > summary::before { content: '−'; }
.bet-sizing > summary::-webkit-details-marker { display: none; }
.bet-sizing .raise-tools { padding-top: .25rem; }
.bet-sizing .custom-raise { margin-top: .65rem; }
.secondary-actions { display: flex; justify-content: flex-end; margin-top: .6rem; }
.secondary-actions .action-button { min-width: 120px; }
.action-feedback:empty, .action-waiting:empty { display: none; }
.table-pause {
    grid-column: 1 / -1;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: .65rem 1rem;
    margin-top: .65rem;
    padding: .65rem .75rem;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: var(--panel);
}
.table-pause strong, .table-pause span { display: block; }
.table-pause span { margin-top: .2rem; font-size: .8rem; color: var(--muted); }
.table-pause button { min-height: 44px; }
@media (max-width: 440px) {
    body.mobile-game-mode .action-bar:has(.table-pause) {
        display: flex;
        flex-direction: column;
        gap: .45rem;
    }
    .table-pause { order: -1; margin-top: 0; }
    .table-pause button { width: 100%; }
    body.mobile-game-mode .toast { top: calc(56px + env(safe-area-inset-top)); bottom: auto; }
}
/* The focused mobile table uses the full viewport; routine confirmations are
   already reflected in the action/status dock, so keep them from covering a
   seat or board. Error toasts remain visible for recovery. */
@media (max-width: 720px) {
    body.mobile-game-mode .toast:not([data-tone="error"]) { display: none; }
}
@media (min-width: 721px) {
    .table-toolbar { flex-wrap: wrap; }
    .toolbar-actions { flex: 1 1 auto; gap: .35rem; }
    .toolbar-actions .toolbar-button {
        min-height: 44px;
        padding: .45rem .65rem;
        border: 1px solid var(--line);
        border-radius: 5px;
        background: var(--panel);
        color: var(--text);
    }
    .toolbar-actions .toolbar-button:hover { border-color: var(--focus); }
    .table-more > summary { display: none; }
    .table-more .table-more-menu {
        position: static;
        display: flex;
        flex-wrap: wrap;
        justify-content: flex-end;
        gap: .25rem;
        min-width: 0;
        padding: 0;
        border: 0;
        background: transparent;
        box-shadow: none;
    }
    .table-more-menu .toolbar-button { width: auto; white-space: nowrap; }
    .table-more-menu .mobile-game-toggle { display: none; }
    .table-more-menu #leave-button { background: transparent; color: var(--muted); }
    .table-wrap { padding-block: clamp(.75rem, 2vh, 1.3rem); }
    .action-bar { gap: .5rem 1rem; padding-block: .7rem; }
    .action-buttons .action-button { flex: 1 1 96px; }
    .bet-sizing { margin-top: 0; }
    .bet-sizing > summary { display: none; }
    .bet-sizing .custom-raise { margin-top: .4rem; }
}

/* Keep the full decision dock in the first desktop viewport. The felt stays
   readable, while the raise target and All in action share one compact row. */
@media (min-width: 721px) {
    /* Details owns an internal content box in Chromium/Firefox, so keep the
       raise controls in flow and reserve a right-hand slot for All in. */
    .bet-sizing:has(.raise-tools) { position: relative; }
    .bet-sizing:has(.raise-tools) .raise-tools {
        display: grid;
        grid-template-columns: minmax(180px, .75fr) minmax(300px, 1.25fr);
        align-items: end;
        column-gap: .65rem;
        min-width: 0;
        padding-top: .1rem;
        padding-right: 140px;
    }
    .bet-sizing:has(.raise-tools) .raise-presets { grid-column: 1; }
    .bet-sizing:has(.raise-tools) .custom-raise { grid-column: 2; margin-top: 0; }
    .bet-sizing:has(.raise-tools) .raise-target-summary { margin: 0 0 .2rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .bet-sizing:has(.raise-tools) .raise-target-row { margin: 0; }
    .bet-sizing:has(.raise-tools) .secondary-actions {
        position: absolute;
        right: 0;
        bottom: 0;
        width: 120px;
        margin: 0;
    }
}

@media (min-width: 721px) and (min-height: 821px) and (max-height: 960px) {
    .poker-table[data-seat-count="2"] { min-height: 360px; }
    .poker-table[data-seat-count="2"] .board { top: calc(42% - 3px); padding-block: .1rem; gap: .1rem; }
    .poker-table[data-seat-count="2"] .board .playing-card { width: 44px; height: 61.6px; }
    .poker-table[data-seat-count="2"] .pot-marker { top: 54.5%; }
    .poker-table[data-seat-count="2"] .seat-viewer { bottom: 3%; }
    .table-wrap { padding-block: .7rem; }
    .action-bar { gap: .35rem .9rem; padding-block: .55rem .65rem; }
    .raise-tools { padding-top: .1rem; }
    .bet-sizing .custom-raise { margin-top: .2rem; }
}

@media (min-width: 721px) and (max-height: 820px) {
    .poker-table[data-seat-count="2"] { min-height: 350px; }
    .poker-table[data-seat-count="2"] .board { top: calc(42% - 3px); padding-block: .1rem; gap: .1rem; }
    .poker-table[data-seat-count="2"] .board .playing-card { width: 44px; height: 61.6px; }
    .poker-table[data-seat-count="2"] .pot-marker { top: 54.5%; }
    .poker-table[data-seat-count="2"] .seat-viewer { bottom: 3%; }
    .table-wrap { padding-block: .55rem; }
    .table-toolbar { min-height: 58px; padding-block: .4rem; }
    .action-bar { gap: .25rem .8rem; padding-block: .45rem .55rem; }
    .action-buttons { gap: .3rem; }
    .action-buttons .action-button { min-height: 44px; padding-block: .35rem; }
    .raise-tools { padding-top: 0; }
    .raise-presets { gap: .25rem; }
    .bet-sizing .custom-raise { margin-top: .1rem; }
    .custom-raise .raise-target-row { margin-block: .05rem .25rem; }
}

@media (min-width: 721px) and (max-height: 760px) {
    .poker-table[data-seat-count="2"] { min-height: 350px; }
}

@media (min-width: 721px) and (max-width: 820px) {
    .bet-sizing:has(.raise-tools) .raise-tools {
        grid-template-columns: minmax(150px, .7fr) minmax(220px, 1.3fr);
        column-gap: .45rem;
        padding-right: 124px;
    }
    .bet-sizing:has(.raise-tools) .secondary-actions,
    .bet-sizing:has(.raise-tools) .secondary-actions .action-button { width: 108px; min-width: 108px; }
    .bet-sizing:has(.raise-tools) .raise-preset { padding-inline: .2rem; font-size: .68rem; }
}
@media (max-width: 720px) {
    body.mobile-game-mode > .er33t-header { display: none; }
    html body.mobile-game-mode:has(> .er33t-header) > main { padding-top: env(safe-area-inset-top); }
    body.mobile-game-mode .mobile-room-brand { display: block; margin-right: auto; }
    body.mobile-game-mode .table-toolbar { padding: .25rem .4rem; min-height: 52px; }
    body.mobile-game-mode .toolbar-actions { width: auto; flex-wrap: nowrap; gap: .25rem; }
    body.mobile-game-mode .toolbar-actions > .toolbar-button, body.mobile-game-mode .table-more > summary { min-height: 44px; min-width: 48px; padding: .4rem .6rem; font-size: .76rem; }
    body.mobile-game-mode .action-bar { padding: .65rem .4rem .35rem; }
    body.mobile-game-mode .action-heading { margin-bottom: .5rem; align-items: center; }
    body.mobile-game-mode .action-heading strong { font-size: .9rem; }
    body.mobile-game-mode .action-heading span { font-size: .7rem; }
    body.mobile-game-mode .action-buttons { grid-template-columns: repeat(var(--action-columns, 3), minmax(0, 1fr)); }
    body.mobile-game-mode .action-buttons > .action-button { min-height: 48px; font-size: .85rem; }
    body.mobile-game-mode .bet-sizing > summary { font-size: .78rem; }
}

/* Refined Felt: tactile table, readable seats, and an always-visible sizing dock. */
:root { --felt-highlight: #184b32; --felt-mid: #103724; --felt-edge: #082319; --felt-rail: #252929; --felt-seat: #14281d; --felt-current: #172e20; }
.poker-table { border: 10px solid var(--felt-rail); border-radius: 48% / 25%; box-shadow: inset 0 0 0 2px #080e0b, inset 0 0 38px #0008, 0 2px 0 #535958, 0 8px 20px #0006; }
.poker-table::before { inset: 7px; border: 1px dashed #c2d3bf40; border-radius: inherit; }
.poker-table::after { opacity: .38; }
.poker-table .table-ring { inset: 0; border: 1px solid #c2d3bf24; opacity: 1; background: none; }
.poker-table .seat { border-radius: 20px; background: linear-gradient(135deg, color-mix(in srgb, var(--felt-seat), transparent 12%), var(--felt-seat)); border-color: #9bad9c70; box-shadow: 0 4px 10px #0004, inset 0 1px 0 #ffffff0c; }
.poker-table .seat-current { border-color: #c6eb57; background: linear-gradient(120deg, var(--felt-current), var(--felt-seat)); box-shadow: 0 0 0 1px #c6eb5738, 0 5px 15px #0005; }
.poker-table .seat-current::after { content: ''; position: absolute; width: 7px; height: 7px; left: -4px; top: calc(50% - 3px); border-radius: 50%; background: #d5f777; box-shadow: 0 0 8px #c6eb57a0; }
.poker-table .seat-details strong { font-weight: 700; }
.poker-table .seat-avatar { box-shadow: 0 0 0 3px #0b1710, 0 0 0 4px #a6b75f; }
.poker-table .board { background: none; border: 0; box-shadow: none; padding: 0; }
.poker-table .board-label { opacity: .75; font-size: .6rem; }
.poker-table .board-slot { background: #08231918; border: 1px dashed #b8ceba66; box-shadow: none; }
.poker-table .pot-marker { border-radius: 999px; padding: .25rem .7rem; background: #0c241abb; border-color: #bdd1bd55; }
.poker-table .table-brand, .poker-table .table-copy { opacity: .35; }
.action-bar { grid-template-columns: 1fr; gap: .4rem; }
.action-buttons { display: grid; grid-template-columns: repeat(var(--action-columns, 3), minmax(0, 1fr)); }
.action-buttons > .action-button { min-height: 52px; border-radius: 8px; font-weight: 600; }
.action-buttons .action-call, .action-buttons .action-check { color: #142005; background: linear-gradient(135deg, #def790, #b9df43); border-color: #e0f5a5; box-shadow: inset 0 1px 0 #ffffff66; }
.action-buttons .action-call span, .action-buttons .action-check span { color: #25370a; }
.action-buttons .action-raise { background: var(--panel); border-color: var(--line-bright); color: var(--text); }
.action-bar > .raise-tools { display: grid; gap: .2rem; padding: 0; }
.raise-presets { gap: .35rem; }
.raise-preset { border-radius: 6px; color: var(--silver); }
.raise-preset.is-selected { background: var(--panel-soft); border-color: var(--focus); color: var(--accent-text); box-shadow: none; }
.raise-target-row { grid-template-columns: auto minmax(0, 1fr); gap: .6rem; }
.raise-slider-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.raise-slider { min-width: 0; width: 100%; min-height: 44px; margin: 0; accent-color: var(--focus); }
.raise-control { min-height: 44px; }
.raise-control input { min-height: 44px; width: 66px; }
.raise-target-summary { margin: .1rem 0; font-size: .68rem; color: var(--muted); }
.action-feedback { grid-column: 1; }
.mobile-room-brand span { color: var(--focus); letter-spacing: -.04em; }
@media (max-width: 720px) {
    body.mobile-game-mode .table-column { min-height: 0; }
    body.mobile-game-mode .table-toolbar { min-height: 48px; padding: 0 .5rem; }
    body.mobile-game-mode .mobile-room-brand { font-size: clamp(1rem, 4.6vw, 1.45rem); white-space: nowrap; letter-spacing: -.06em; }
    body.mobile-game-mode .toolbar-actions { gap: 0; }
    body.mobile-game-mode .toolbar-actions > .toolbar-button, body.mobile-game-mode .table-more > summary { min-width: 44px; padding: .25rem; font-size: .72rem; }
    body.mobile-game-mode .table-wrap { padding: .4rem .35rem; flex: 0 0 auto; }
    body.mobile-game-mode .poker-table[data-seat-count="2"][data-table-state] { height: max(276px, calc(100svh - 286px - env(safe-area-inset-top) - env(safe-area-inset-bottom))); min-height: 276px; border-width: 7px; border-radius: 19% / 10%; }
    body.mobile-game-mode .poker-table[data-seat-count="2"] .seat { left: 14px; width: calc(100% - 28px); padding: .35rem .45rem; border-radius: 15px; }
    body.mobile-game-mode .poker-table[data-seat-count="2"] .seat-opponent { top: 12px; }
    body.mobile-game-mode .poker-table[data-seat-count="2"] .seat-viewer { bottom: 12px; }
    body.mobile-game-mode .poker-table[data-seat-count="2"] .board { top: 55%; }
    body.mobile-game-mode .poker-table[data-seat-count="2"] .pot-marker { top: 33%; }
    body.mobile-game-mode .poker-table[data-seat-count="2"] .board-label { display: none; }
    body.mobile-game-mode .playing-card { width: clamp(40px, 11vw, 54px); height: clamp(56px, 15.4vw, 75.6px); }
    body.mobile-game-mode .hole-cards-own .card-mini { width: clamp(45px, 12vw, 60px); height: clamp(63px, 16.8vw, 84px); }
    body.mobile-game-mode .seat-opponent .card-mini { width: 28px; height: 39.2px; }
    body.mobile-game-mode .seat-avatar { width: 30px; height: 30px; }
    body.mobile-game-mode .seat-details strong { font-size: .88rem; }
    body.mobile-game-mode .seat-details span { font-size: .72rem; }
    body.mobile-game-mode .action-bar { gap: .25rem; padding: .3rem .5rem; }
    body.mobile-game-mode .action-heading { margin: 0; min-height: 44px; }
    body.mobile-game-mode .action-buttons > .action-button { min-height: 48px; }
    body.mobile-game-mode .custom-raise .raise-target-row { margin: 0; }
    body.mobile-game-mode .raise-target-summary { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
    body.mobile-game-mode .bet-sizing { margin: 0; }
    body.mobile-game-mode .bet-sizing > summary { min-height: 28px; padding: .15rem; font-size: .7rem; }
}
@media (max-width: 380px) {
    body.mobile-game-mode .seat-details strong { max-width: 95px; }
    body.mobile-game-mode .seat-avatar { width: 26px; height: 26px; }
}
@media (max-height: 500px) and (max-width: 960px) and (orientation: landscape) {
    body.mobile-game-mode .poker-table[data-seat-count="2"][data-table-state] { height: 270px; min-height: 270px; }
    body.mobile-game-mode .action-bar { align-content: start; }
}
@media (max-width: 720px) {
    body.mobile-game-mode .raise-slider { grid-column: auto; }
    body.mobile-game-mode .raise-target-row { grid-template-columns: 116px minmax(0, 1fr); }
    body.mobile-game-mode .raise-control { display: flex; align-items: center; gap: .3rem; }
    body.mobile-game-mode .raise-control input { width: 58px; }
    body.mobile-game-mode .mobile-room-brand { font-size: clamp(1.2rem, 5.2vw, 1.5rem); }
}
@media (max-height: 680px) and (max-width: 720px) {
    body.mobile-game-mode .board .playing-card { width: 40px; height: 56px; }
    body.mobile-game-mode .poker-table[data-seat-count="2"] .board { top: 54%; }
}
@media (max-height: 500px) and (max-width: 960px) and (orientation: landscape) {
    body.mobile-game-mode .poker-table[data-seat-count="2"] .board { top: 53%; }
    body.mobile-game-mode .poker-table[data-seat-count="2"] .seat-viewer { bottom: 6px; }
    body.mobile-game-mode .hole-cards-own .card-mini { width: 43px; height: 60px; }
}
@media (max-width: 720px) {
    body.mobile-game-mode .raise-control { grid-column: auto; }
}
@media (max-height: 680px) and (max-width: 720px) {
    body.mobile-game-mode .poker-table[data-seat-count="2"] .board { top: 53%; }
}
@media (max-width: 720px) {
    body.mobile-game-mode .mobile-room-brand { display: flex; align-items: baseline; gap: .22em; }
    body.mobile-game-mode .poker-table .seat-avatar { width: 34px; height: 34px; }
    body.mobile-game-mode .poker-table .avatar-character .seat-avatar-image { width: calc(100% + 14px); height: calc(100% + 14px); }
}
@media (max-width: 350px) {
    body.mobile-game-mode .poker-table .seat-avatar { width: 28px; height: 28px; }
}
@media (max-height: 680px) and (max-width: 720px) {
    body.mobile-game-mode .poker-table[data-seat-count="2"] .pot-marker { top: calc(33% - 8px); }
}
.avatar-expression-choices { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .35rem; }
.avatar-expression-choices button { display: grid; justify-items: center; gap: .25rem; min-height: 80px; padding: .4rem .2rem; border: 1px solid var(--line); border-radius: 8px; background: var(--panel); color: var(--text); font-size: .7rem; cursor: pointer; }
.avatar-expression-choices button[aria-pressed="true"] { border-color: var(--focus); box-shadow: inset 0 0 0 1px var(--focus); }
.avatar-expression-choices img { object-fit: contain; }
.avatar-expression-choices button:disabled { opacity: .6; cursor: wait; }
/* The wordmark reads as ink on felt; it never crosses the hand or pot. */
.poker-table .table-brand { top: 28%; transform: translate(-50%, -50%); display: block; color: #d3e5c9; opacity: .28; font-size: 1.65rem; font-weight: 600; letter-spacing: -.05em; mix-blend-mode: soft-light; pointer-events: none; }
.poker-table .table-brand small, .poker-table .table-copy { display: none; }
@media (max-width: 720px) {
    body.mobile-game-mode .table-brand { display: none; }
}
@media (max-width: 720px) and (min-height: 681px) {
    body.mobile-game-mode .poker-table[data-seat-count="2"] .table-brand { display: block; left: 14%; top: 43%; font-size: 1.1rem; }
}
/* Two settled runouts need their own reading space; no live bet dock is active. */
@media (max-width: 720px) {
    body.mobile-game-mode .poker-table[data-seat-count="2"][data-table-state]:has(.board-runout + .board-runout) { min-height: 400px; height: max(400px, calc(100svh - 210px)); }
    body.mobile-game-mode .poker-table[data-seat-count="2"]:has(.board-runout + .board-runout) .board { top: 48%; }
    body.mobile-game-mode .poker-table[data-seat-count="2"]:has(.board-runout + .board-runout) .board-label { display: block; }
    body.mobile-game-mode .poker-table[data-seat-count="2"]:has(.board-runout + .board-runout) .table-brand { display: none; }
}
/* Chip racks yield space to decisions on compact phones without losing inspection. */
/* Desktop keeps the decision and sizing in two rows; mobile retains its full-width dock. */
@media (min-width: 721px) {
    .poker-table .table-brand { left: 20%; top: 50%; }
    .action-bar { grid-template-columns: minmax(150px, .6fr) minmax(0, 1.4fr) 120px; column-gap: .65rem; }
    .action-bar > .action-heading { grid-column: 1; margin: 0; }
    .action-bar > .action-buttons { grid-column: 2 / -1; }
    .action-bar > .raise-tools { grid-column: 1 / 3; grid-template-columns: minmax(150px, .75fr) minmax(220px, 1.25fr); align-items: end; gap: .65rem; }
    .action-bar > .raise-tools .custom-raise { margin: 0; }
    .action-bar > .raise-tools .raise-target-summary { margin: 0 0 .2rem; white-space: nowrap; }
    .action-bar > .raise-tools .raise-target-row { margin: 0; }
    .action-bar > .bet-sizing { grid-column: 3; align-self: end; margin: 0; }
    .action-bar > .bet-sizing .secondary-actions { margin: 0; }
    .action-bar > .action-feedback { grid-column: 1 / -1; }
}
@media (max-width: 720px) {
    body.mobile-game-mode .poker-table[data-seat-count="2"][data-table-state] { --poker-chip-table-min-height: 276px; }
}
@media (max-width: 720px) and (max-height: 680px) {
    body.mobile-game-mode .poker-table[data-seat-count="2"] { --poker-bankroll-racks: compact; }
}
@media (max-height: 500px) and (max-width: 960px) and (orientation: landscape) {
    body.mobile-game-mode .poker-table[data-seat-count="2"][data-table-state] { --poker-chip-table-min-height: 270px; }
}
/* Keep the decision dock present through thinking, action and settlement. */
.action-bar[data-phase] { min-height: 190px; align-content: center; }
.action-bar[data-phase="waiting"], .action-bar[data-phase="settled"] { grid-template-columns: minmax(0, 1fr) auto; }
.action-bar[data-phase="waiting"] > .action-heading,
.action-bar[data-phase="settled"] > .action-heading { grid-column: 1 / -1; }
.action-bar .thinking-state { grid-column: 1 / -1; justify-content: flex-start; display: flex; align-items: center; gap: .75rem; }
.thinking-dots { display: inline-flex; gap: 5px; }
.thinking-dots i { width: 5px; height: 5px; border-radius: 50%; background: var(--accent, #b9ee56); animation: poker-think 1.5s ease-in-out infinite; }
.thinking-dots i:nth-child(2) { animation-delay: .2s; }
.thinking-dots i:nth-child(3) { animation-delay: .4s; }
.action-bar .waiting-controls { grid-column: 1 / -1; opacity: .4; pointer-events: none; }
.seat-last-action { display: table; padding: .12rem .4rem; border: 1px solid #ffffff29; border-radius: 5px; background: #ffffff0a; margin-top: .25rem; font-size: .7rem; font-weight: 650; color: var(--text, #f1f3ef); }
.seat-details > span { line-height: 1.6; }
.deal-next { min-height: 44px; gap: 1.2rem; justify-content: space-between; }
.showdown-winner strong { color: #d7f5a2; }
@keyframes poker-think { 0%, 80%, 100% { opacity: .35; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-3px); } }
@media (max-width: 720px) {
    body.mobile-game-mode .action-bar[data-phase] { min-height: 240px; }
    .action-bar[data-phase="waiting"], .action-bar[data-phase="settled"] { grid-template-columns: minmax(0, 1fr); }
    .action-bar .raise-presets { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: .3rem; }
    .action-bar .raise-preset { min-width: 0; padding-inline: .2rem; }
    .action-bar .deal-next { width: 100%; }
}
@media (prefers-reduced-motion: reduce) { .thinking-dots i { animation: none; } }
.action-bar .raise-presets { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.action-bar .raise-preset { min-width: 0; }
