:root {
  --bg: #0a0d12;
  --bg2: #10151c;
  --panel: rgba(255, 255, 255, 0.045);
  --panel2: rgba(255, 255, 255, 0.07);
  --line: rgba(255, 255, 255, 0.09);
  --line2: rgba(255, 255, 255, 0.16);
  --text: #eef1f4;
  --muted: #8d99a6;
  --dim: #5b6672;
  --gold: #e6c068;
  --gold2: #b8913a;
  --red: #e5484d;
  --green: #3ecf8e;
  --blue: #5aa9ff;
  --felt1: #17805a;
  --felt2: #0c4a33;
  --felt3: #062a1d;
  --card-w: 62px;
  --radius: 14px;
  --font: "Inter", "PingFang SC", "HarmonyOS Sans SC", "Microsoft YaHei", system-ui, sans-serif;
}
* { 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); }
body {
  background:
    radial-gradient(1200px 700px at 50% -10%, #1a2330 0%, transparent 60%),
    radial-gradient(900px 600px at 100% 110%, #1a1420 0%, transparent 60%),
    var(--bg);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; }
input, select { font: inherit; color: inherit; }
.num { font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }
.hidden { display: none !important; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 44px; padding: 0 18px; border-radius: 12px;
  background: var(--panel2); border: 1px solid var(--line2);
  font-weight: 600; letter-spacing: .02em; transition: transform .08s, background .2s, border-color .2s, opacity .2s;
  user-select: none; white-space: nowrap;
}
.btn:hover { background: rgba(255,255,255,.11); }
.btn:active { transform: translateY(1px) scale(.98); }
.btn:disabled { opacity: .4; pointer-events: none; }
.btn.gold { background: linear-gradient(180deg, #f3d488, #c99b3e); color: #2a1d05; border-color: #f7e1a6; box-shadow: 0 6px 20px -8px rgba(230,192,104,.6), inset 0 1px 0 rgba(255,255,255,.5); }
.btn.gold:hover { filter: brightness(1.06); }
.btn.red { background: linear-gradient(180deg, #3a1d20, #2a1517); border-color: #6b2d31; color: #ffb4b6; }
.btn.green { background: linear-gradient(180deg, #1e5a43, #144030); border-color: #2f8a64; color: #b6f5d8; }
.btn.blue { background: linear-gradient(180deg, #23456e, #19324f); border-color: #3a6aa3; color: #cfe5ff; }
.btn.small { height: 34px; padding: 0 12px; font-size: 13px; border-radius: 10px; }
.btn.ghost { background: transparent; border-color: var(--line); }
.icon-btn { width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; background: var(--panel); border: 1px solid var(--line); font-size: 17px; }
.icon-btn:hover { background: var(--panel2); }

/* ---------- home ---------- */
.home { min-height: 100%; display: grid; place-items: center; padding: 24px; }
.home-card { width: min(440px, 100%); text-align: center; }
.logo { font-size: 13px; letter-spacing: .35em; color: var(--gold); text-transform: uppercase; margin-bottom: 10px; }
.home h1 { font-size: 40px; margin: 0 0 6px; font-weight: 800; letter-spacing: .04em; background: linear-gradient(180deg, #fff, #c9d2db); -webkit-background-clip: text; background-clip: text; color: transparent; }
.home .sub { color: var(--muted); margin-bottom: 30px; }
.fan { position: relative; height: 130px; margin: 0 auto 26px; width: 220px; }
.fan .card { position: absolute; left: 50%; top: 10px; transform-origin: 50% 130%; }
.field { display: flex; flex-direction: column; gap: 6px; text-align: left; margin-bottom: 14px; }
.field label { font-size: 12px; color: var(--muted); letter-spacing: .05em; }
.input {
  height: 46px; border-radius: 12px; background: rgba(0,0,0,.35); border: 1px solid var(--line2);
  padding: 0 14px; outline: none; transition: border-color .2s, box-shadow .2s; width: 100%;
}
.input:focus { border-color: var(--gold2); box-shadow: 0 0 0 3px rgba(230,192,104,.15); }
.code-input { text-transform: uppercase; letter-spacing: .4em; text-align: center; font-weight: 700; font-size: 18px; }
.row { display: flex; gap: 10px; }
.row > * { flex: 1; }
.divider { display: flex; align-items: center; gap: 12px; color: var(--dim); font-size: 12px; margin: 20px 0; }
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }

/* ---------- lobby ---------- */
.lobby { max-width: 1180px; margin: 0 auto; padding: 22px 18px 120px; }
.lobby-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 18px; flex-wrap: wrap; }
.lobby-head h2 { margin: 0; font-size: 22px; }
.room-code { display: inline-flex; align-items: center; gap: 10px; padding: 8px 8px 8px 14px; border-radius: 12px; background: var(--panel); border: 1px solid var(--line); }
.room-code b { font-size: 22px; letter-spacing: .3em; color: var(--gold); }
.grid2 { display: grid; grid-template-columns: 320px 1fr; gap: 18px; align-items: start; }
@media (max-width: 900px) { .grid2 { grid-template-columns: 1fr; } }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: 18px; padding: 18px; }
.panel h3 { margin: 0 0 14px; font-size: 15px; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.panel h3 small { font-weight: 400; color: var(--muted); font-size: 12px; }
.panel + .panel { margin-top: 18px; }
.seat-list { display: flex; flex-direction: column; gap: 8px; }
.seat-item { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 12px; background: rgba(0,0,0,.25); border: 1px solid var(--line); min-height: 56px; }
.seat-item.empty { border-style: dashed; color: var(--dim); justify-content: center; }
.seat-item .grow { flex: 1; min-width: 0; }
.seat-item .nm { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tag { font-size: 11px; padding: 2px 7px; border-radius: 999px; background: var(--panel2); color: var(--muted); border: 1px solid var(--line); white-space: nowrap; }
.tag.gold { color: var(--gold); border-color: rgba(230,192,104,.35); background: rgba(230,192,104,.08); }
.tag.green { color: var(--green); border-color: rgba(62,207,142,.35); background: rgba(62,207,142,.08); }
.avatar { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; flex: none; color: #fff; text-shadow: 0 1px 2px rgba(0,0,0,.4); }

.presets { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; margin-bottom: 16px; }
.preset { text-align: left; padding: 12px 14px; border-radius: 14px; background: rgba(0,0,0,.25); border: 1px solid var(--line); transition: border-color .2s, background .2s, transform .1s; }
.preset:hover { border-color: var(--line2); }
.preset.on { border-color: var(--gold2); background: linear-gradient(180deg, rgba(230,192,104,.12), rgba(230,192,104,.03)); box-shadow: inset 0 0 0 1px rgba(230,192,104,.25); }
.preset b { display: block; font-size: 14px; margin-bottom: 4px; }
.preset span { font-size: 12px; color: var(--muted); line-height: 1.4; }
.preset .del { float: right; color: var(--dim); font-size: 12px; padding: 0 2px; }
.editor { display: grid; gap: 14px; padding: 14px; border-radius: 14px; background: rgba(0,0,0,.22); border: 1px solid var(--line); }
.editor .lbl { font-size: 12px; color: var(--muted); margin-bottom: 8px; display: flex; justify-content: space-between; gap: 8px; }
.editor .lbl a { color: var(--gold); cursor: pointer; text-decoration: none; margin-left: 10px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { min-width: 40px; height: 38px; padding: 0 10px; border-radius: 10px; background: rgba(255,255,255,.04); border: 1px solid var(--line); font-weight: 700; color: var(--dim); transition: all .15s; }
.chip.on { background: #f6f1e4; color: #1a1a1a; border-color: #fff; box-shadow: 0 2px 8px -2px rgba(0,0,0,.6); }
.chip.suit { font-size: 20px; min-width: 52px; }
.chip.suit.red.on { color: #d0312d; }
.stepper { display: inline-flex; align-items: center; border: 1px solid var(--line2); border-radius: 10px; overflow: hidden; }
.stepper button { width: 36px; height: 36px; background: var(--panel); font-size: 18px; }
.stepper span { min-width: 40px; text-align: center; font-weight: 700; }
.seg { display: inline-flex; padding: 3px; border-radius: 11px; background: rgba(0,0,0,.35); border: 1px solid var(--line); }
.seg button { height: 32px; padding: 0 12px; border-radius: 8px; color: var(--muted); font-size: 13px; font-weight: 600; }
.seg button.on { background: var(--panel2); color: var(--text); box-shadow: 0 1px 4px rgba(0,0,0,.4); }
.deck-strip { display: flex; flex-wrap: wrap; gap: 3px; --card-w: 26px; }
.deck-strip .card { box-shadow: none; }
.pool-summary { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 13px; color: var(--muted); }
.pool-summary b { color: var(--text); font-size: 20px; }
.warn { color: #ffb86b; font-size: 13px; }

.rank-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.rank-table td { padding: 7px 6px; border-bottom: 1px solid var(--line); }
.rank-table tr:last-child td { border-bottom: 0; }
.rank-table .pos { width: 26px; color: var(--dim); font-weight: 700; }
.rank-table .nm b { font-weight: 600; }
.rank-table .nm small { display: block; color: var(--dim); font-size: 11px; margin-top: 2px; }
.rank-table .pr { text-align: right; width: 150px; }
.rank-table tr.moved .nm b::after { content: "变动"; margin-left: 6px; font-size: 10px; padding: 1px 6px; border-radius: 999px; color: #ffb86b; border: 1px solid rgba(255,184,107,.4); vertical-align: 1px; }
.rank-table tr.imp { opacity: .35; }
.bar { height: 6px; border-radius: 3px; background: rgba(255,255,255,.07); overflow: hidden; margin-top: 4px; }
.bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--gold2), var(--gold)); border-radius: 3px; }
.settings { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px 16px; }
.settings .field { margin: 0; }
.switch { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; height: 46px; }
.switch i { width: 42px; height: 24px; border-radius: 12px; background: rgba(255,255,255,.12); position: relative; transition: background .2s; }
.switch i::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; transition: transform .2s; }
.switch.on i { background: var(--green); }
.switch.on i::after { transform: translateX(18px); }
.start-bar { position: fixed; left: 0; right: 0; bottom: 0; padding: 14px 18px calc(14px + env(safe-area-inset-bottom)); background: linear-gradient(180deg, transparent, rgba(10,13,18,.95) 35%); display: flex; justify-content: center; gap: 12px; z-index: 5; }
.start-bar .btn { min-width: 220px; height: 52px; font-size: 16px; }

/* ---------- cards ---------- */
.card {
  --w: var(--card-w);
  width: var(--w); height: calc(var(--w) * 1.4); border-radius: calc(var(--w) * .12);
  background: linear-gradient(160deg, #ffffff 0%, #f4f1ea 100%);
  box-shadow: 0 1px 0 rgba(255,255,255,.6) inset, 0 6px 14px -6px rgba(0,0,0,.7), 0 0 0 1px rgba(0,0,0,.15);
  position: relative; color: #16181c; flex: none; user-select: none;
  transition: transform .25s, opacity .3s, filter .3s, box-shadow .3s;
}
.card.red { color: #d0312d; }
.card .rk { position: absolute; left: 9%; top: 5%; font-weight: 800; font-size: calc(var(--w) * .34); line-height: 1; letter-spacing: -.04em; }
.card .st { position: absolute; left: 10%; top: 36%; font-size: calc(var(--w) * .26); line-height: 1; }
.card .big { position: absolute; right: 7%; bottom: 3%; font-size: calc(var(--w) * .62); line-height: 1; opacity: .95; }
.card.joker { background: linear-gradient(150deg, #fff7dc, #f1d98e 55%, #d9b04f); color: #6a3d00; }
.card.joker .jk { position: absolute; inset: 0; display: grid; place-items: center; font-weight: 900; font-size: calc(var(--w) * .2); letter-spacing: .08em; writing-mode: vertical-rl; }
.card.joker .star { position: absolute; left: 8%; top: 5%; font-size: calc(var(--w) * .3); }
.card.joker .star2 { position: absolute; right: 8%; bottom: 5%; font-size: calc(var(--w) * .3); transform: rotate(180deg); }
.card.back {
  background:
    repeating-linear-gradient(45deg, rgba(255,255,255,.07) 0 2px, transparent 2px 7px),
    repeating-linear-gradient(-45deg, rgba(255,255,255,.07) 0 2px, transparent 2px 7px),
    linear-gradient(160deg, #8e1f2c, #5a1019);
  box-shadow: inset 0 0 0 calc(var(--w) * .05) #f3ead6, inset 0 0 0 calc(var(--w) * .07) #c9a44e, 0 6px 14px -6px rgba(0,0,0,.7);
}
.card.slot { background: rgba(0,0,0,.12); box-shadow: inset 0 0 0 1.5px rgba(255,255,255,.12); }
.card.deal { animation: dealIn .45s cubic-bezier(.2,.8,.2,1) both; }
.card.flip { animation: flipIn .5s cubic-bezier(.2,.8,.2,1) both; }
.card.win { box-shadow: 0 0 0 2px var(--gold), 0 0 22px 2px rgba(230,192,104,.65), 0 6px 14px -6px rgba(0,0,0,.7); transform: translateY(-6px); }
.card.dim { filter: brightness(.45) saturate(.6); }
@keyframes dealIn { from { opacity: 0; transform: translate(var(--dx, 0), var(--dy, -120px)) rotate(-25deg) scale(.6); } to { opacity: 1; transform: none; } }
@keyframes flipIn { 0% { opacity: 0; transform: perspective(600px) rotateY(90deg) translateY(-10px); } 100% { opacity: 1; transform: none; } }

/* ---------- table screen ---------- */
.game { height: 100dvh; display: flex; flex-direction: column; }
.topbar { display: flex; align-items: center; gap: 10px; padding: 10px 14px; padding-top: calc(10px + env(safe-area-inset-top)); }
.topbar .info { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; flex: 1; min-width: 0; }
.pill { height: 32px; display: inline-flex; align-items: center; gap: 6px; padding: 0 12px; border-radius: 999px; background: var(--panel); border: 1px solid var(--line); font-size: 13px; color: var(--muted); white-space: nowrap; }
.pill b { color: var(--text); font-weight: 700; }
.pill.gold b { color: var(--gold); letter-spacing: .15em; }

.stage { flex: 1; position: relative; min-height: 0; display: flex; align-items: center; justify-content: center; container-type: size; }
.table {
  position: relative; width: min(calc(100cqw - 56px), calc((100cqh - 150px) * 1.9), 1100px); aspect-ratio: 1.9; margin-top: 10px;
  border-radius: 999px;
  background:
    radial-gradient(ellipse at 50% 40%, var(--felt1) 0%, var(--felt2) 55%, var(--felt3) 100%);
  box-shadow:
    0 0 0 10px #2a1a10, 0 0 0 12px #5c3b22, 0 0 0 13px rgba(230,192,104,.5), 0 0 0 22px #1b110a,
    0 40px 80px -20px rgba(0,0,0,.9), inset 0 0 80px rgba(0,0,0,.55);
}
.table::before { content: ""; position: absolute; inset: 7%; border-radius: 999px; border: 1.5px solid rgba(255,255,255,.07); }
.table::after { content: "HOLD'EM DUO"; position: absolute; left: 50%; top: 73%; transform: translateX(-50%); font-weight: 800; letter-spacing: .5em; font-size: clamp(10px, 1.4vw, 15px); color: rgba(255,255,255,.06); white-space: nowrap; }
.center { position: absolute; left: 50%; top: 47%; transform: translate(-50%, -50%); display: flex; flex-direction: column; align-items: center; gap: 12px; }
.board { display: flex; gap: clamp(4px, .8vw, 9px); }
.pot { display: flex; align-items: center; gap: 8px; padding: 6px 14px; border-radius: 999px; background: rgba(0,0,0,.35); border: 1px solid rgba(255,255,255,.08); font-size: 14px; }
.pot b { color: var(--gold); font-size: 17px; }
.street-tag { font-size: 11px; letter-spacing: .25em; color: rgba(255,255,255,.4); text-transform: uppercase; }

.seat { position: absolute; transform: translate(-50%, -50%); display: flex; flex-direction: column; align-items: center; z-index: 2; --card-w: 44px; }
.seat .hole { display: flex; gap: 3px; height: calc(var(--card-w) * 1.4); margin-bottom: -14px; position: relative; z-index: 1; }
.seat .hole .card:first-child { transform: rotate(-5deg); }
.seat .hole .card:last-child { transform: rotate(5deg); }
.seat .hole .card.win { transform: translateY(-6px); }
.seat.folded .hole { opacity: .35; filter: grayscale(.8); }
.seat .plate {
  position: relative; z-index: 2; min-width: 128px; padding: 7px 12px 7px 7px; border-radius: 999px;
  background: linear-gradient(180deg, rgba(22,28,36,.96), rgba(12,16,21,.96)); border: 1px solid var(--line2);
  display: flex; align-items: center; gap: 9px; box-shadow: 0 10px 24px -10px rgba(0,0,0,.9);
}
.seat .plate .meta { display: flex; flex-direction: column; line-height: 1.15; min-width: 0; }
.seat .plate .nm { font-size: 13px; font-weight: 600; max-width: 96px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.seat .plate .stk { font-size: 14px; font-weight: 700; color: var(--gold); }
.seat.turn .plate { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(230,192,104,.25), 0 0 28px rgba(230,192,104,.35); }
.seat.turn .plate::before { content: ""; position: absolute; inset: -4px; border-radius: 999px; border: 2px solid var(--gold); animation: pulse 1.4s ease-in-out infinite; }
@keyframes pulse { 0%,100% { opacity: .2; transform: scale(1); } 50% { opacity: .9; transform: scale(1.03); } }
.seat.winner .plate { border-color: var(--green); box-shadow: 0 0 0 3px rgba(62,207,142,.25), 0 0 30px rgba(62,207,142,.45); }
.seat.away .plate { opacity: .6; }
.seat .act {
  position: absolute; top: -10px; right: -12px; z-index: 3; font-size: 11px; font-weight: 700; padding: 3px 8px; border-radius: 999px;
  background: #2b3440; border: 1px solid var(--line2); white-space: nowrap; animation: pop .25s ease-out;
}
.seat .act.fold { background: #3a2124; color: #ff9da0; border-color: #6b2d31; }
.seat .act.raise, .seat .act.allin { background: #3d3117; color: var(--gold); border-color: #7a6024; }
.seat .act.call, .seat .act.check { background: #183428; color: #9fe8c6; border-color: #2c6a4f; }
.seat .handdesc { margin-top: 6px; font-size: 12px; font-weight: 700; padding: 3px 10px; border-radius: 999px; background: rgba(0,0,0,.55); color: var(--gold); white-space: nowrap; border: 1px solid rgba(230,192,104,.3); }
.seat .timer { position: absolute; left: 14px; right: 14px; bottom: -5px; height: 3px; border-radius: 2px; background: rgba(255,255,255,.1); overflow: hidden; z-index: 3; }
.seat .timer i { display: block; height: 100%; background: var(--gold); transform-origin: left; }
.badge { position: absolute; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; font-size: 11px; font-weight: 800; z-index: 3; transform: translate(-50%, -50%); box-shadow: 0 3px 8px rgba(0,0,0,.6); }
.badge.d { background: radial-gradient(circle at 35% 30%, #fff, #d9d9d9); color: #111; border: 2px solid #999; }
.bet { position: absolute; transform: translate(-50%, -50%); display: flex; align-items: center; gap: 5px; z-index: 2; font-weight: 700; font-size: 13px; padding: 3px 9px 3px 4px; border-radius: 999px; background: rgba(0,0,0,.4); animation: pop .25s ease-out; }
.chipstack { width: 18px; height: 18px; border-radius: 50%; background: radial-gradient(circle, #e8495a 0 38%, #fff 39% 48%, #e8495a 49%); box-shadow: 0 2px 0 #8b1d29, 0 4px 0 #5e121b; }
.chipstack.blue { background: radial-gradient(circle, #3e7fd8 0 38%, #fff 39% 48%, #3e7fd8 49%); box-shadow: 0 2px 0 #1d4a87, 0 4px 0 #14335e; }
.chipstack.gold { background: radial-gradient(circle, #e0b44e 0 38%, #fff 39% 48%, #e0b44e 49%); box-shadow: 0 2px 0 #8a6a1e, 0 4px 0 #5e4712; }
@keyframes pop { from { transform: translate(-50%, -50%) scale(.6); opacity: 0; } }
.seat .act { animation-name: popA; }
@keyframes popA { from { transform: scale(.6); opacity: 0; } }
.emote { position: absolute; z-index: 20; font-size: 40px; pointer-events: none; animation: floatUp 2.2s ease-out forwards; transform: translate(-50%, -50%); }
@keyframes floatUp { 0% { opacity: 0; transform: translate(-50%, -20%) scale(.5); } 15% { opacity: 1; transform: translate(-50%, -60%) scale(1.15); } 80% { opacity: 1; } 100% { opacity: 0; transform: translate(-50%, -190%) scale(1); } }

.banner { position: absolute; left: 50%; top: 18%; transform: translateX(-50%); z-index: 6; text-align: center; padding: 10px 22px; border-radius: 16px; background: rgba(8,12,16,.82); border: 1px solid rgba(230,192,104,.45); box-shadow: 0 16px 40px -10px rgba(0,0,0,.8); backdrop-filter: blur(6px); animation: bannerIn .4s cubic-bezier(.2,.9,.3,1.3); white-space: nowrap; }
.banner b { color: var(--gold); font-size: 18px; }
.banner div { font-size: 13px; color: var(--muted); margin-top: 3px; }
@keyframes bannerIn { from { opacity: 0; transform: translate(-50%, -10px) scale(.9); } }
.notice { position: absolute; left: 50%; bottom: 6px; transform: translateX(-50%); font-size: 12px; color: var(--muted); background: rgba(0,0,0,.4); padding: 4px 12px; border-radius: 999px; white-space: nowrap; z-index: 4; }

/* action dock */
.dock { padding: 4px 14px calc(10px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; align-items: center; }
.dock-inner { width: min(100%, 900px); display: flex; flex-direction: column; gap: 8px; }
.mybest { display: flex; align-items: center; justify-content: center; gap: 8px; font-size: 13px; color: var(--muted); min-height: 22px; }
.mybest b { color: var(--gold); font-size: 15px; }
.actions { display: grid; grid-template-columns: 1fr 1fr 1.3fr; gap: 10px; }
.actions .btn { height: 50px; font-size: 16px; border-radius: 14px; }
.actions .btn small { font-weight: 500; opacity: .8; font-size: 13px; }
.raise-panel { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; padding: 8px 10px; border-radius: 14px; background: rgba(0,0,0,.3); border: 1px solid var(--line); }
.quick { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; flex: 1 1 330px; }
.slider-row { flex: 1 1 280px; }
.quick .btn { height: 36px; font-size: 13px; padding: 0 6px; }
.slider-row { display: flex; align-items: center; gap: 12px; }
.slider-row .amt { width: 110px; height: 40px; text-align: center; font-weight: 700; font-size: 16px; }
input[type=range] { -webkit-appearance: none; appearance: none; flex: 1; height: 8px; border-radius: 4px; background: linear-gradient(90deg, var(--gold) var(--p, 0%), rgba(255,255,255,.12) var(--p, 0%)); outline: none; }
input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 26px; height: 26px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #fff6dc, #d6a945); border: 2px solid #fff; box-shadow: 0 2px 8px rgba(0,0,0,.6); }
input[type=range]::-moz-range-thumb { width: 24px; height: 24px; border-radius: 50%; background: #e6c068; border: 2px solid #fff; }
.waiting { text-align: center; color: var(--muted); font-size: 14px; height: 50px; display: flex; align-items: center; justify-content: center; gap: 10px; }
.dots i { display: inline-block; width: 5px; height: 5px; border-radius: 50%; background: var(--muted); margin: 0 2px; animation: blink 1.2s infinite; }
.dots i:nth-child(2) { animation-delay: .2s; } .dots i:nth-child(3) { animation-delay: .4s; }
@keyframes blink { 0%,100% { opacity: .2; } 50% { opacity: 1; } }
.emote-bar { position: absolute; top: 52px; right: 60px; z-index: 32; display: flex; gap: 2px; padding: 6px; border-radius: 14px; background: #141a22; border: 1px solid var(--line2); box-shadow: 0 20px 40px -10px rgba(0,0,0,.8); animation: fade .15s; }
.emote-bar button { font-size: 20px; width: 38px; height: 34px; border-radius: 10px; opacity: .75; transition: transform .1s, opacity .2s, background .2s; }
.emote-bar button:hover { opacity: 1; background: var(--panel); transform: scale(1.15); }

/* drawers & modal */
.drawer-bg { position: fixed; inset: 0; background: rgba(0,0,0,.5); z-index: 30; animation: fade .2s; }
.drawer { position: fixed; top: 0; right: 0; bottom: 0; width: min(420px, 92vw); background: #0f141a; border-left: 1px solid var(--line2); z-index: 31; padding: 18px; overflow-y: auto; animation: slideIn .25s cubic-bezier(.2,.8,.2,1); }
.drawer h3 { margin: 0 0 14px; display: flex; justify-content: space-between; align-items: center; }
@keyframes slideIn { from { transform: translateX(100%); } }
@keyframes fade { from { opacity: 0; } }
.hist { padding: 12px 0; border-bottom: 1px solid var(--line); display: flex; flex-direction: column; gap: 8px; --card-w: 30px; }
.hist .cards { display: flex; gap: 3px; flex-wrap: wrap; align-items: center; }
.hist .who { font-size: 13px; }
.hist .who b { color: var(--gold); }
.log { font-size: 13px; color: var(--muted); display: flex; flex-direction: column; gap: 4px; }
.log .sep { color: var(--dim); text-align: center; font-size: 11px; letter-spacing: .1em; margin: 4px 0; }
.menu { position: absolute; top: 52px; right: 14px; z-index: 32; background: #141a22; border: 1px solid var(--line2); border-radius: 14px; padding: 6px; min-width: 190px; box-shadow: 0 20px 40px -10px rgba(0,0,0,.8); animation: fade .15s; }
.menu button { display: block; width: 100%; text-align: left; padding: 10px 12px; border-radius: 9px; font-size: 14px; }
.menu button:hover { background: var(--panel2); }
.menu button.danger { color: #ff9da0; }

#toast { position: fixed; left: 50%; top: 18px; transform: translateX(-50%); z-index: 100; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; }
#toast div { background: #1c232c; border: 1px solid var(--line2); padding: 10px 16px; border-radius: 12px; font-size: 14px; box-shadow: 0 10px 30px rgba(0,0,0,.6); animation: toastIn .25s ease-out; }
#toast div.err { border-color: #6b2d31; color: #ffb4b6; }
@keyframes toastIn { from { opacity: 0; transform: translateY(-8px); } }

/* ---------- responsive ---------- */
@media (max-width: 700px) {
  :root { --card-w: 46px; }
  .seat { --card-w: 34px; }
  .seat .plate { min-width: 96px; padding: 5px 9px 5px 5px; gap: 6px; }
  .seat .plate .nm { font-size: 11px; max-width: 64px; }
  .seat .plate .stk { font-size: 12px; }
  .avatar { width: 28px; height: 28px; font-size: 13px; }
  .pot { font-size: 12px; padding: 4px 10px; } .pot b { font-size: 14px; }
  .actions .btn { height: 50px; font-size: 15px; }
  .quick .btn { font-size: 12px; }
  .topbar .pill.hide-sm { display: none; }
}
@media (orientation: portrait) and (max-width: 700px) {
  .table { aspect-ratio: .68; width: min(calc(100cqw - 70px), calc((100cqh - 150px) * .68)); border-radius: 46% / 32%; }
  .table::before { border-radius: 46% / 32%; }
  .table::after { top: 66%; }
}

/* ---------- roles, turn, order ---------- */
.seat .roles { display: flex; gap: 4px; margin-top: 5px; min-height: 0; }
.role { display: inline-flex; align-items: center; gap: 4px; font-size: 11px; font-weight: 700; padding: 2px 8px 2px 3px; border-radius: 999px; white-space: nowrap; box-shadow: 0 2px 6px rgba(0,0,0,.5); }
.role:not(.d) { padding-left: 8px; }
.role.d { background: #f1f1f1; color: #111; }
.role.d i { font-style: normal; width: 16px; height: 16px; border-radius: 50%; display: grid; place-items: center; background: #111; color: #fff; font-size: 10px; }
.role.sb { background: #23456e; color: #cfe5ff; border: 1px solid #3a6aa3; }
.role.bb { background: #4a3a12; color: var(--gold); border: 1px solid #7a6024; }
.seat.turn::before { content: ""; position: absolute; left: 50%; top: 55%; width: 260px; height: 200px; transform: translate(-50%, -50%); background: radial-gradient(ellipse, rgba(230,192,104,.28), transparent 65%); pointer-events: none; z-index: -1; animation: glow 1.6s ease-in-out infinite; }
@keyframes glow { 0%,100% { opacity: .55; } 50% { opacity: 1; } }
.seat.turn .plate { border-width: 2px; transform: scale(1.06); transition: transform .2s; }
.turn-tag { margin-top: 6px; display: inline-flex; align-items: center; gap: 6px; padding: 4px 12px; border-radius: 999px; font-size: 13px; font-weight: 800; color: #2a1d05; background: linear-gradient(180deg, #f3d488, #c99b3e); box-shadow: 0 0 18px rgba(230,192,104,.6); animation: bob 1s ease-in-out infinite; white-space: nowrap; }
.turn-tag .dots i { background: #2a1d05; }
.turn-tag.me { font-size: 14px; padding: 5px 14px; }
@keyframes bob { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-3px); } }
.order { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 4px 6px; font-size: 13px; }
.order .lbl { color: var(--muted); margin-right: 4px; font-size: 12px; }
.order .oc { padding: 3px 10px; border-radius: 999px; background: var(--panel); border: 1px solid var(--line); color: var(--text); white-space: nowrap; }
.order .oc.cur { background: linear-gradient(180deg, #f3d488, #c99b3e); color: #2a1d05; border-color: #f7e1a6; font-weight: 800; box-shadow: 0 0 14px rgba(230,192,104,.5); }
.order .oc.done { color: #9fe8c6; border-color: #2c6a4f; }
.order .oc.out { color: var(--dim); text-decoration: line-through; opacity: .6; }
.order .oc.allin { color: var(--gold); border-color: #7a6024; }
.order .arr { color: var(--dim); }
.order .hint { width: 100%; text-align: center; color: var(--dim); font-size: 11px; }
@media (max-width: 700px) { .seat.turn::before { width: 160px; height: 130px; } .order { font-size: 12px; } .order .oc { padding: 2px 8px; } .role { font-size: 10px; } }
