:root {
  --bg: #0a0b0e; --bg2: #12141a; --panel: rgba(22, 24, 31, .92); --line: rgba(212, 175, 55, .22);
  --gold: #d4af37; --gold2: #f3d77a; --gold3: #9c7a1e; --text: #ece6d6; --muted: #8d8778;
  --red: #e0474c; --green: #2fbf71; --blue: #3a8ee6;
  --cw: 44px; --hcw: 58px; --font: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans CJK SC", "Source Han Sans SC", "Helvetica Neue", Arial, sans-serif;
  --safe-b: env(safe-area-inset-bottom, 0px);
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--text); font-family: var(--font); overscroll-behavior: none; }
body { background: radial-gradient(1200px 700px at 50% -10%, #1d1a12 0%, #0d0e12 55%, #08090b 100%) fixed; }
button, input, select { font-family: inherit; }
.hidden { display: none !important; }
.muted { color: var(--muted); } .small { font-size: 12px; } .center { text-align: center; }
.gold-text { color: var(--gold2); }
.view { min-height: 100dvh; display: flex; flex-direction: column; }

/* ---------- common ---------- */
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: 16px; box-shadow: 0 10px 40px rgba(0,0,0,.45), inset 0 1px 0 rgba(255,255,255,.04); }
.btn { border: 0; border-radius: 12px; padding: 11px 18px; font-size: 15px; font-weight: 600; cursor: pointer; color: var(--text); background: #262a33; transition: transform .08s, filter .15s; }
.btn:active { transform: scale(.97); }
.btn.gold { color: #1b1405; background: linear-gradient(180deg, var(--gold2), var(--gold) 55%, var(--gold3)); box-shadow: 0 4px 16px rgba(212,175,55,.3), inset 0 1px 0 rgba(255,255,255,.5); }
.btn.outline { background: transparent; border: 1px solid var(--gold3); color: var(--gold2); }
.btn.block { width: 100%; } .btn.sm { padding: 7px 12px; font-size: 13px; border-radius: 10px; }
.btn:disabled { opacity: .45; pointer-events: none; }
.icon-btn { width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--line); background: rgba(255,255,255,.04); color: var(--gold2); font-size: 18px; cursor: pointer; display: inline-grid; place-items: center; }
.tabs { display: flex; gap: 6px; background: rgba(0,0,0,.35); border-radius: 12px; padding: 4px; }
.tab { flex: 1; border: 0; background: transparent; color: var(--muted); padding: 9px 0; border-radius: 9px; font-size: 14px; font-weight: 600; cursor: pointer; }
.tab.active { background: linear-gradient(180deg, #2c2717, #1f1b10); color: var(--gold2); box-shadow: inset 0 0 0 1px var(--line); }
label { display: block; font-size: 13px; color: var(--muted); margin: 12px 0 0; }
input, select { width: 100%; margin-top: 6px; padding: 12px 14px; border-radius: 11px; border: 1px solid #2c2f38; background: #0e1015; color: var(--text); font-size: 16px; outline: none; }
input:focus, select:focus { border-color: var(--gold3); box-shadow: 0 0 0 3px rgba(212,175,55,.12); }
.form-err { color: var(--red); font-size: 13px; min-height: 18px; margin: 8px 0; }
.chip-ico { display: inline-block; width: 14px; height: 14px; border-radius: 50%; background: radial-gradient(circle at 50% 50%, #f3d77a 0 30%, #b8901f 31% 45%, #f3d77a 46% 58%, #8a6a12 59%); box-shadow: 0 0 0 1px rgba(0,0,0,.4); vertical-align: -2px; }
.foot { text-align: center; color: #5f5a4e; font-size: 11px; padding: 10px 0 calc(10px + var(--safe-b)); letter-spacing: .5px; }

/* ---------- brand / auth ---------- */
.brand { display: flex; align-items: center; gap: 10px; }
.brand h1 { margin: 0; font-size: 18px; letter-spacing: 2px; background: linear-gradient(180deg, #fff3c4, var(--gold) 60%, var(--gold3)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.brand-mark { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font-size: 20px; color: #111; background: linear-gradient(180deg, var(--gold2), var(--gold3)); box-shadow: 0 0 18px rgba(212,175,55,.35); }
.brand.big { flex-direction: column; text-align: center; margin-bottom: 22px; }
.brand.big .brand-mark { width: 74px; height: 74px; font-size: 44px; }
.brand.big h1 { font-size: 34px; letter-spacing: 6px; margin-top: 6px; }
.brand.big p { margin: 6px 0 0; color: var(--muted); font-size: 13px; letter-spacing: 1px; }
.auth-wrap { margin: auto; width: min(400px, 92vw); padding: 40px 0; }
.auth-card { padding: 18px 20px 14px; }
.auth-card form { margin-top: 6px; }
.suits-deco { text-align: center; margin-top: 26px; color: rgba(212,175,55,.25); letter-spacing: 18px; font-size: 22px; }

/* ---------- lobby ---------- */
.topbar { display: flex; align-items: center; justify-content: space-between; padding: 10px 14px; padding-top: max(10px, env(safe-area-inset-top)); border-bottom: 1px solid rgba(212,175,55,.12); background: rgba(8,9,11,.7); backdrop-filter: blur(8px); position: sticky; top: 0; z-index: 20; }
.top-right { display: flex; align-items: center; gap: 8px; }
.chip-pill { display: flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 99px; background: rgba(0,0,0,.45); border: 1px solid var(--line); color: var(--gold2); font-weight: 700; font-variant-numeric: tabular-nums; }
.lobby { width: min(920px, 100%); margin: 0 auto; padding: 14px; flex: 1; }
.welcome { display: flex; justify-content: space-between; align-items: center; padding: 16px; gap: 12px; flex-wrap: wrap; background: linear-gradient(120deg, rgba(60,48,15,.55), rgba(22,24,31,.92) 60%); }
.welcome-name { font-size: 22px; font-weight: 700; color: var(--gold2); }
.welcome-actions { display: flex; gap: 8px; }
.lobby-tabs { margin: 16px 0 12px; }
.table-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.tcard { padding: 14px; display: flex; flex-direction: column; gap: 10px; cursor: pointer; position: relative; overflow: hidden; transition: transform .15s, border-color .15s; }
.tcard:hover { transform: translateY(-2px); border-color: rgba(212,175,55,.5); }
.tcard > * { position: relative; z-index: 1; }
.tcard::after { content: ''; position: absolute; right: -30px; top: -30px; width: 110px; height: 110px; border-radius: 50%; background: radial-gradient(circle, rgba(16,110,70,.55), transparent 70%); }
.tcard .t1 { display: flex; justify-content: space-between; align-items: baseline; }
.tcard .tname { font-weight: 700; font-size: 16px; }
.tcard .stakes { color: var(--gold2); font-weight: 800; font-size: 18px; font-variant-numeric: tabular-nums; }
.tcard .meta { display: flex; justify-content: space-between; color: var(--muted); font-size: 12px; align-items: center; }
.seatdots { display: flex; gap: 4px; }
.seatdots i { width: 9px; height: 9px; border-radius: 50%; background: #2b2f38; }
.seatdots i.on { background: var(--green); box-shadow: 0 0 6px var(--green); }
.form-panel { padding: 16px; margin-bottom: 12px; }
.form-panel h3 { margin: 0 0 4px; color: var(--gold2); font-size: 16px; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.row-inline { display: flex; gap: 8px; margin-top: 8px; }
.row-inline input { margin: 0; }
.rank-list { margin: 0; padding: 8px 14px; list-style: none; counter-reset: r; }
.rank-list li { counter-increment: r; display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid rgba(255,255,255,.05); }
.rank-list li::before { content: counter(r); width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-size: 13px; background: #23262e; color: var(--muted); }
.rank-list li:nth-child(1)::before { background: linear-gradient(180deg, #ffe58a, #c9971a); color: #2a1d00; }
.rank-list li:nth-child(2)::before { background: linear-gradient(180deg, #eef1f5, #9aa3ad); color: #222; }
.rank-list li:nth-child(3)::before { background: linear-gradient(180deg, #f0b27a, #a0612a); color: #2a1300; }
.rank-list .rn { flex: 1; font-weight: 600; }
.rank-list .rc { color: var(--gold2); font-weight: 700; font-variant-numeric: tabular-nums; }

/* ---------- table view ---------- */
#view-table { height: 100dvh; min-height: 0; overflow: hidden; }
.table-top { padding: 6px 10px; padding-top: max(6px, env(safe-area-inset-top)); }
.table-top .icon-btn { width: 34px; height: 34px; font-size: 16px; }
#btn-back { font-size: 24px; }
.table-title { flex: 1; margin: 0 10px; min-width: 0; }
.table-title #t-stakes { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.table-title #t-name { font-weight: 700; color: var(--gold2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 15px; }
.table-stage { flex: 1; position: relative; min-height: 0; }
.felt-wrap { position: absolute; inset: 0; }
.felt { position: absolute; border-radius: 50%; inset: 7% 12% 8%;
  background: radial-gradient(ellipse at 50% 42%, #1c8a5a 0%, #0f6a43 38%, #0a4a2f 72%, #06301e 100%);
  box-shadow: 0 0 0 7px #1a120b, 0 0 0 9px #6b5320, 0 0 0 13px #24170d, 0 0 0 14px rgba(212,175,55,.5), 0 18px 60px rgba(0,0,0,.8), inset 0 0 70px rgba(0,0,0,.55); }
.felt::before { content: ''; position: absolute; inset: 5%; border-radius: 50%; border: 1px solid rgba(243,215,122,.14); }
.felt-logo { position: absolute; left: 0; right: 0; top: 22%; text-align: center; color: rgba(255,255,255,.07); font-weight: 800; letter-spacing: 4px; font-size: calc(var(--cw) * .38); pointer-events: none; }
.landscape .felt { inset: 15% 11%; }
.landscape .felt-logo { top: 18%; }
.center-info { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); display: flex; flex-direction: column; align-items: center; gap: calc(var(--cw) * .16); width: 96%; }
.pot { display: inline-flex; gap: 6px; align-items: center; padding: 4px 12px; border-radius: 99px; background: rgba(0,0,0,.45); border: 1px solid rgba(243,215,122,.25); color: var(--gold2); font-weight: 800; font-size: 13px; font-variant-numeric: tabular-nums; transition: opacity .2s; }
.pot.empty { opacity: 0; }
.board { display: flex; gap: calc(var(--cw) * .1); min-height: calc(var(--cw) * 1.4); }
.table-msg { color: rgba(255,255,255,.75); font-size: 12px; min-height: 16px; text-align: center; text-shadow: 0 1px 2px #000; }
.table-msg.win { color: var(--gold2); font-weight: 700; font-size: 13px; }

/* cards */
.card { width: var(--cw); height: calc(var(--cw) * 1.4); border-radius: calc(var(--cw) * .12); position: relative; perspective: 600px; flex: none; }
.card .in { position: absolute; inset: 0; transform-style: preserve-3d; transition: transform .45s cubic-bezier(.3,.7,.3,1); }
.card.down .in { transform: rotateY(180deg); }
.card .face, .card .back { position: absolute; inset: 0; border-radius: inherit; backface-visibility: hidden; -webkit-backface-visibility: hidden; }
.card .face { background: linear-gradient(160deg, #ffffff, #f1ede4); box-shadow: 0 2px 6px rgba(0,0,0,.5); color: #15161a; }
.card .back { transform: rotateY(180deg); background: repeating-linear-gradient(45deg, #7d1420 0 4px, #93202d 4px 8px); box-shadow: 0 2px 6px rgba(0,0,0,.5), inset 0 0 0 2px #f3e3b5, inset 0 0 0 4px #7d1420; }
.card .back::after { content: '♠'; position: absolute; inset: 0; display: grid; place-items: center; color: rgba(243,215,122,.75); font-size: calc(var(--cw) * .45); }
.card.red .face { color: #c8202b; }
.card .r { position: absolute; left: 7%; top: 3%; font-weight: 800; font-size: calc(var(--cw) * .42); line-height: 1; letter-spacing: -1px; }
.card .s1 { position: absolute; left: 9%; top: 34%; font-size: calc(var(--cw) * .3); line-height: 1; }
.card .s2 { position: absolute; right: 6%; bottom: 3%; font-size: calc(var(--cw) * .62); line-height: 1; }
.card.dim .face { filter: brightness(.45); }
.card.hl .face { box-shadow: 0 0 0 2px var(--gold2), 0 0 14px rgba(243,215,122,.9); }
.card.hl { transform: translateY(-4px); }
.card.deal { animation: deal .42s cubic-bezier(.2,.8,.3,1) both; }
@keyframes deal { from { transform: translate(var(--dx), var(--dy)) rotate(-25deg) scale(.6); opacity: 0; } 30% { opacity: 1; } }
.card.flip .in { animation: flip .55s cubic-bezier(.3,.7,.3,1) both; animation-delay: inherit; }
.card.flip { animation: pop .55s both; }
@keyframes flip { from { transform: rotateY(180deg); } to { transform: rotateY(0); } }
@keyframes pop { from { transform: translateY(-6px) scale(1.06); } to { transform: none; } }

/* seats */
.seat { position: absolute; width: 0; height: 0; z-index: 5; }
.seat .box { position: absolute; left: 0; top: 0; transform: translate(-50%, -50%); display: flex; flex-direction: column; align-items: center; width: calc(var(--cw) * 2.1); }
.avatar { position: relative; width: calc(var(--cw) * 1.25); height: calc(var(--cw) * 1.25); border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-size: calc(var(--cw) * .5); color: #fff; box-shadow: 0 0 0 2px #1b1b1f, 0 0 0 3px rgba(212,175,55,.6), 0 6px 14px rgba(0,0,0,.6); text-shadow: 0 1px 2px rgba(0,0,0,.6); }
.ring { position: absolute; inset: -6px; width: calc(100% + 12px); height: calc(100% + 12px); transform: rotate(-90deg); pointer-events: none; }
.ring circle { fill: none; stroke-width: 4; stroke-linecap: round; }
.ring .bg { stroke: rgba(0,0,0,.4); }
.nameplate { margin-top: -6px; position: relative; z-index: 2; min-width: calc(var(--cw) * 1.9); max-width: calc(var(--cw) * 2.3); padding: 3px 6px 4px; border-radius: 9px; background: linear-gradient(180deg, rgba(25,26,32,.96), rgba(10,11,14,.96)); border: 1px solid rgba(212,175,55,.35); text-align: center; line-height: 1.15; }
.nameplate .nm { font-size: 11px; color: #ddd6c4; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nameplate .st { font-size: 12px; font-weight: 800; color: var(--gold2); font-variant-numeric: tabular-nums; }
.seat.acting .nameplate { border-color: var(--gold2); box-shadow: 0 0 14px rgba(243,215,122,.55); }
.seat.folded .avatar, .seat.folded .nameplate { opacity: .45; }
.seat.out .avatar { filter: grayscale(1); opacity: .5; }
.seat.win .avatar { box-shadow: 0 0 0 2px #1b1b1f, 0 0 0 3px var(--gold2), 0 0 26px 6px rgba(243,215,122,.8); animation: glow 1s ease-in-out infinite alternate; }
@keyframes glow { to { box-shadow: 0 0 0 2px #1b1b1f, 0 0 0 3px var(--gold2), 0 0 36px 10px rgba(243,215,122,.95); } }
.tag { position: absolute; top: calc(var(--cw) * -0.28); left: 50%; transform: translateX(-50%); padding: 1px 7px; border-radius: 6px; font-size: 10px; font-weight: 800; white-space: nowrap; z-index: 3; color: #111; background: var(--gold2); box-shadow: 0 2px 6px rgba(0,0,0,.5); }
.tag.fold { background: #555; color: #ddd; } .tag.check { background: #8fb7ff; } .tag.call { background: #7ee0a5; } .tag.raise, .tag.bet { background: #ffb15c; } .tag.allin { background: var(--red); color: #fff; } .tag.sb, .tag.bb { background: #c9c3b3; } .tag.away { background: #333; color: #aaa; }
.hole { position: absolute; display: flex; gap: 2px; z-index: 1; }
.hole .card { --cw: calc(var(--cwo) * .62); }
.seat .hole { top: calc(var(--cw) * -0.55); left: 50%; transform: translateX(-50%); }
.seat.hero .hole { position: absolute; top: calc(var(--cw) * -1.65); gap: 5px; }
.seat.hero .hole .card { --cw: var(--hcw); }
.seat.hero .hole .card:first-child { transform: rotate(-6deg); } .seat.hero .hole .card:last-child { transform: rotate(6deg); }
.seat.hero .hole .card.hl:first-child { transform: rotate(-6deg) translateY(-4px); } .seat.hero .hole .card.hl:last-child { transform: rotate(6deg) translateY(-4px); }
.seat.hero.folded .hole { opacity: .45; }
.handlabel { position: absolute; top: calc(var(--cw) * 1.95); left: 50%; transform: translateX(-50%); white-space: nowrap; font-size: 11px; font-weight: 700; color: #1a1300; background: linear-gradient(180deg, var(--gold2), var(--gold)); padding: 1px 7px; border-radius: 6px; z-index: 4; box-shadow: 0 2px 6px rgba(0,0,0,.5); }
.empty-seat { position: absolute; transform: translate(-50%, -50%); width: calc(var(--cw) * 1.25); height: calc(var(--cw) * 1.25); border-radius: 50%; border: 1.5px dashed rgba(243,215,122,.35); background: rgba(0,0,0,.25); color: rgba(243,215,122,.7); font-size: 11px; display: grid; place-items: center; cursor: pointer; text-align: center; line-height: 1.1; }
.empty-seat:hover { background: rgba(212,175,55,.12); }
.empty-seat.disabled { cursor: default; opacity: .35; font-size: 0; }
.dealer { position: absolute; width: calc(var(--cw) * .5); height: calc(var(--cw) * .5); margin: calc(var(--cw) * -.25) 0 0 calc(var(--cw) * -.25); border-radius: 50%; background: radial-gradient(circle at 40% 35%, #fff, #ddd 60%, #aaa); color: #111; font-weight: 900; font-size: calc(var(--cw) * .28); display: grid; place-items: center; box-shadow: 0 2px 5px rgba(0,0,0,.6); z-index: 4; transition: left .5s, top .5s; }
.bet { position: absolute; transform: translate(-50%, -50%); display: flex; align-items: center; gap: 4px; z-index: 4; padding: 2px 8px 2px 3px; border-radius: 99px; background: rgba(0,0,0,.5); color: #fff; font-size: 12px; font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; animation: betin .3s ease-out; }
  .bet.still { animation: none; }
@keyframes betin { from { opacity: 0; transform: translate(-50%, -50%) scale(.6); } }
.stack-chips { position: relative; width: 16px; height: 16px; }
.stack-chips i { position: absolute; left: 0; width: 16px; height: 16px; border-radius: 50%; border: 2px dashed rgba(255,255,255,.85); box-shadow: 0 1px 0 rgba(0,0,0,.5); }
.fxchip { position: absolute; width: 16px; height: 16px; margin: -8px 0 0 -8px; border-radius: 50%; border: 2px dashed #fff; z-index: 30; transition: transform .55s cubic-bezier(.4,.1,.3,1), opacity .55s; pointer-events: none; box-shadow: 0 2px 4px rgba(0,0,0,.6); }
.floatwin { position: absolute; transform: translate(-50%, -50%); color: var(--gold2); font-weight: 900; font-size: 18px; text-shadow: 0 2px 6px #000; z-index: 40; animation: floatup 2.2s ease-out forwards; pointer-events: none; white-space: nowrap; }
@keyframes floatup { 0% { opacity: 0; transform: translate(-50%, -20%) scale(.7); } 15% { opacity: 1; transform: translate(-50%, -60%) scale(1.1); } 100% { opacity: 0; transform: translate(-50%, -190%) scale(1); } }
.bubble { position: absolute; transform: translate(-50%, -100%); max-width: 150px; padding: 5px 9px; border-radius: 12px; background: #fff; color: #111; font-size: 12px; z-index: 50; box-shadow: 0 4px 12px rgba(0,0,0,.5); animation: bub 4s forwards; pointer-events: none; word-break: break-all; }
.bubble.emoji { font-size: 26px; background: transparent; box-shadow: none; padding: 0; }
@keyframes bub { 0% { opacity: 0; margin-top: 8px; } 8% { opacity: 1; margin-top: 0; } 85% { opacity: 1; } 100% { opacity: 0; } }

/* bottom */
.controls { min-height: 156px; display: flex; flex-direction: column; justify-content: flex-end; gap: 6px; }
.hero-hint { text-align: center; font-size: 12px; color: var(--gold2); min-height: 16px; line-height: 16px; }
.seat.hero .tag { top: auto; bottom: calc(var(--cw) * -0.42); }
.bottom { padding: 6px 10px 0; display: flex; flex-direction: column; gap: 6px; background: linear-gradient(180deg, transparent, rgba(0,0,0,.6) 30%); }
.actionbar { display: flex; flex-direction: column; gap: 6px; animation: rise .2s ease-out; }
@keyframes rise { from { transform: translateY(20px); opacity: 0; } }
.raise-panel { display: flex; flex-direction: column; gap: 6px; }
.quick { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.quick button { border: 1px solid rgba(212,175,55,.35); background: rgba(0,0,0,.5); color: var(--gold2); border-radius: 9px; padding: 7px 0; font-weight: 700; font-size: 13px; cursor: pointer; }
.quick button:active { background: rgba(212,175,55,.2); }
.slider-row { display: flex; align-items: center; gap: 8px; }
.slider-row .step { width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--line); background: #1b1d23; color: var(--gold2); font-size: 18px; cursor: pointer; flex: none; }
.r-val { min-width: 72px; text-align: right; font-weight: 800; color: var(--gold2); font-variant-numeric: tabular-nums; }
input[type=range] { -webkit-appearance: none; appearance: none; height: 6px; margin: 0; padding: 0; border: 0; border-radius: 3px; background: linear-gradient(90deg, var(--gold) var(--p, 0%), #2a2d35 var(--p, 0%)); }
input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 26px; height: 26px; border-radius: 50%; background: radial-gradient(circle at 40% 35%, #fff6d0, var(--gold) 60%, var(--gold3)); box-shadow: 0 2px 8px rgba(0,0,0,.6); border: 2px solid #2a210a; }
input[type=range]::-moz-range-thumb { width: 24px; height: 24px; border-radius: 50%; background: var(--gold); border: 2px solid #2a210a; }
.main-acts { display: grid; grid-template-columns: 1fr 1.2fr 1.2fr; gap: 8px; }
.act { border: 0; border-radius: 13px; padding: 13px 0; font-size: 16px; font-weight: 800; color: #fff; cursor: pointer; box-shadow: 0 4px 14px rgba(0,0,0,.5), inset 0 1px 0 rgba(255,255,255,.25); line-height: 1.1; }
.act small { display: block; font-size: 12px; font-weight: 700; opacity: .9; margin-top: 2px; font-variant-numeric: tabular-nums; }
.act:active { transform: scale(.97); }
.act.fold { background: linear-gradient(180deg, #5b2a2c, #3b1719); }
.act.call { background: linear-gradient(180deg, #1f7a4d, #135336); }
.act.raise { background: linear-gradient(180deg, #e2b84a, #a87d16); color: #1d1503; }
.preact { display: flex; gap: 6px; justify-content: center; }
.preact label { margin: 0; flex: 1; }
.preact input { display: none; }
.preact span { display: block; text-align: center; padding: 10px 4px; border-radius: 11px; border: 1px solid #2f323b; background: rgba(0,0,0,.45); color: #cfc8b6; font-size: 13px; font-weight: 600; cursor: pointer; }
.preact input:checked + span { border-color: var(--gold); color: var(--gold2); background: rgba(212,175,55,.16); }
.seatbar { display: flex; gap: 6px; justify-content: center; }
.chat-dock { display: flex; align-items: center; gap: 8px; padding-bottom: 2px; }
.chat-toggle { position: relative; width: 38px; height: 38px; flex: none; border-radius: 50%; border: 1px solid var(--line); background: rgba(0,0,0,.4); font-size: 17px; cursor: pointer; }
.badge { position: absolute; top: -3px; right: -3px; min-width: 17px; height: 17px; padding: 0 4px; border-radius: 9px; background: var(--red); color: #fff; font-size: 10px; display: grid; place-items: center; font-weight: 800; }
.emoji-row { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; flex: 1; }
.emoji-row::-webkit-scrollbar { display: none; }
.emoji-row button { flex: none; border: 1px solid rgba(255,255,255,.08); background: rgba(255,255,255,.05); border-radius: 99px; padding: 5px 9px; font-size: 15px; cursor: pointer; color: var(--text); }
.emoji-row button.txt { font-size: 12px; }
.table-foot { padding: 3px 0 calc(4px + var(--safe-b)); font-size: 10px; }

/* drawers & modal */
.drawer { position: fixed; right: 0; top: 0; bottom: 0; width: min(380px, 100vw); z-index: 60; background: rgba(13,14,18,.97); border-left: 1px solid var(--line); display: flex; flex-direction: column; animation: slidein .22s ease-out; box-shadow: -10px 0 40px rgba(0,0,0,.6); }
@keyframes slidein { from { transform: translateX(100%); } }
.drawer-head { display: flex; justify-content: space-between; align-items: center; padding: 12px 14px; padding-top: max(12px, env(safe-area-inset-top)); border-bottom: 1px solid rgba(255,255,255,.06); color: var(--gold2); }
.chat-list { flex: 1; overflow-y: auto; padding: 10px 14px; display: flex; flex-direction: column; gap: 8px; }
.chat-item { font-size: 14px; line-height: 1.4; word-break: break-all; }
.chat-item b { color: var(--gold2); margin-right: 6px; }
.chat-form { display: flex; gap: 8px; padding: 10px 14px calc(10px + var(--safe-b)); border-top: 1px solid rgba(255,255,255,.06); }
.chat-form input { margin: 0; }
.history-list { flex: 1; overflow-y: auto; padding: 10px 14px calc(10px + var(--safe-b)); }
.hitem { padding: 10px 0; border-bottom: 1px solid rgba(255,255,255,.06); }
.hitem .hh { display: flex; justify-content: space-between; color: var(--muted); font-size: 12px; margin-bottom: 6px; }
.hitem .mini { display: inline-flex; gap: 3px; vertical-align: middle; }
.minicard { display: inline-block; padding: 1px 4px; border-radius: 4px; background: #f4f0e6; color: #111; font-weight: 800; font-size: 12px; }
.minicard.red { color: #c8202b; }
.hitem .w { margin-top: 6px; font-size: 13px; }
.hitem .w b { color: var(--gold2); }
.hitem details { margin-top: 6px; font-size: 12px; color: #b9b29f; }
.hitem summary { cursor: pointer; color: var(--muted); }
.hitem .loglines { margin-top: 4px; line-height: 1.6; }
.modal { position: fixed; inset: 0; z-index: 80; display: grid; place-items: center; background: rgba(0,0,0,.6); backdrop-filter: blur(3px); animation: fade .2s; }
@keyframes fade { from { opacity: 0; } }
.modal-card { width: min(380px, 92vw); padding: 18px; }
.modal-card h3 { margin: 0 0 6px; color: var(--gold2); }
.modal-card .big-num { text-align: center; font-size: 28px; font-weight: 900; color: var(--gold2); margin: 14px 0 6px; font-variant-numeric: tabular-nums; }
.modal-card .range-labels { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); margin-top: 8px; }
.modal-card .btns { display: flex; gap: 10px; margin-top: 16px; }
.modal-card .btns .btn { flex: 1; }
.menu-list button { display: block; width: 100%; text-align: left; margin: 6px 0; }
.toast { position: fixed; left: 50%; top: 70px; transform: translate(-50%, -20px); background: rgba(20,20,24,.96); border: 1px solid var(--line); color: var(--text); padding: 10px 16px; border-radius: 12px; font-size: 14px; z-index: 100; opacity: 0; pointer-events: none; transition: all .25s; max-width: 90vw; text-align: center; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.conn { position: fixed; left: 50%; top: 52px; transform: translateX(-50%); background: #5b2a2c; color: #fff; padding: 6px 14px; border-radius: 99px; font-size: 13px; z-index: 90; }
.empty-hint { text-align: center; color: var(--muted); padding: 30px 0; }

@media (min-width: 900px) {
  :root { --hcw: 64px; }
  .bottom { width: min(760px, 100%); margin: 0 auto; }
  .hero-hint { font-size: 13px; }
}
