:root {
  --bg: #0a0e18;
  --bg2: #141b2d;
  --ink: #f6efe0;
  --muted: #9aa3b8;
  --gold: #f2c75c;
  --gold2: #b8862b;
  --red: #e0384f;
  --green: #22b573;
  --blue: #3a8dde;
  --glass: rgba(14, 19, 33, .72);
  --line: rgba(255, 255, 255, .09);
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
  --display: 'Cinzel', Georgia, serif;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--ink); font-family: Inter, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif; overscroll-behavior: none; }
body { background: radial-gradient(120% 70% at 50% -10%, #1f2a48 0%, var(--bg) 60%) fixed; -webkit-user-select: none; user-select: none; }
button { font: inherit; color: inherit; border: 0; cursor: pointer; }
.hidden { display: none !important; }
.screen { position: fixed; inset: 0; display: flex; flex-direction: column; }
.red { color: var(--red); }

/* ---------- buttons ---------- */
.btn { position: relative; padding: 14px 18px; border-radius: 14px; font-weight: 800; letter-spacing: .02em; font-size: 15px; transition: transform .08s, filter .15s, opacity .2s; }
.btn:active { transform: translateY(1px) scale(.98); }
.btn[disabled] { opacity: .45; pointer-events: none; }
.btn.wide { width: 100%; }
.btn.small { padding: 9px 14px; font-size: 13px; border-radius: 10px; }
.btn.gold { color: #2a1b02; background: linear-gradient(180deg, #ffe39a 0%, var(--gold) 45%, var(--gold2) 100%); box-shadow: 0 6px 18px rgba(242, 199, 92, .28), inset 0 1px 0 rgba(255, 255, 255, .7); }
.btn.red { color: #fff; background: linear-gradient(180deg, #ff6a7d, #c31d38); box-shadow: 0 6px 16px rgba(224, 56, 79, .3), inset 0 1px 0 rgba(255, 255, 255, .35); }
.btn.green { color: #fff; background: linear-gradient(180deg, #4fdc9c, #138a55); box-shadow: 0 6px 16px rgba(34, 181, 115, .3), inset 0 1px 0 rgba(255, 255, 255, .35); }
.btn.blue { color: #fff; background: linear-gradient(180deg, #6db3ff, #2366b8); box-shadow: 0 6px 16px rgba(58, 141, 222, .3), inset 0 1px 0 rgba(255, 255, 255, .35); }
.btn.purple { color: #fff; background: linear-gradient(180deg, #b58bff, #6a3fc9); box-shadow: 0 6px 16px rgba(130, 80, 230, .3), inset 0 1px 0 rgba(255, 255, 255, .35); }
.btn.ghost { background: rgba(255, 255, 255, .07); border: 1px solid var(--line); color: var(--ink); }
.btn .sub { display: block; font-size: 12px; font-weight: 800; opacity: .9; margin-top: 1px; }
.icon-btn { width: 38px; height: 38px; border-radius: 12px; background: rgba(255, 255, 255, .07); border: 1px solid var(--line); font-size: 18px; display: grid; place-items: center; flex: none; }
.icon-btn:active { transform: scale(.94); }

/* ---------- coins ---------- */
.coin { display: inline-block; width: 16px; height: 16px; border-radius: 50%; vertical-align: -3px; margin-right: 6px; flex: none;
  background: radial-gradient(circle at 35% 30%, #fff3c4 0 12%, #f6cf62 30%, #c08a24 75%, #8a5c10 100%);
  box-shadow: inset 0 0 0 2px rgba(120, 75, 5, .55), 0 1px 2px rgba(0, 0, 0, .5); }
.coinpill { display: flex; align-items: center; padding: 8px 14px 8px 10px; border-radius: 999px; background: linear-gradient(180deg, rgba(255, 220, 130, .14), rgba(255, 220, 130, .05)); border: 1px solid rgba(242, 199, 92, .35); font-weight: 800; color: #ffe7a8; font-variant-numeric: tabular-nums; }
.coinpill.sm { padding: 6px 10px 6px 8px; font-size: 13px; }
.coinpill.sm .coin { width: 14px; height: 14px; margin-right: 5px; }

/* ---------- login ---------- */
#login { align-items: center; justify-content: center; padding: 24px; overflow: hidden; }
.login-box { position: relative; width: 100%; max-width: 360px; padding: 34px 26px 26px; border-radius: 26px; text-align: center;
  background: linear-gradient(180deg, rgba(30, 38, 62, .85), rgba(14, 18, 32, .9)); border: 1px solid rgba(242, 199, 92, .22);
  box-shadow: 0 30px 80px rgba(0, 0, 0, .55), inset 0 1px 0 rgba(255, 255, 255, .06); backdrop-filter: blur(10px); }
.suits { display: flex; justify-content: center; gap: 14px; font-size: 26px; margin-bottom: 6px; color: #f6efe0; text-shadow: 0 2px 10px rgba(0, 0, 0, .5); }
.club-name { font-family: var(--display); font-weight: 800; letter-spacing: .06em; }
#login h1 { margin: 4px 0 2px; font-size: 34px; background: linear-gradient(180deg, #fff2c6, var(--gold) 55%, #a6741c); -webkit-background-clip: text; background-clip: text; color: transparent; }
.lsub { color: var(--muted); margin: 0 0 22px; font-size: 14px; }
.code-wrap { position: relative; display: block; margin-bottom: 18px; }
.code-wrap input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; font-size: 16px; z-index: 2; }
.boxes { display: flex; gap: 8px; justify-content: center; }
.boxes i { width: 44px; height: 56px; border-radius: 12px; display: grid; place-items: center; font-style: normal; font-size: 26px; font-weight: 800;
  background: rgba(0, 0, 0, .35); border: 1.5px solid rgba(255, 255, 255, .12); font-variant-numeric: tabular-nums; transition: border-color .15s, box-shadow .15s; }
.boxes i.on { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(242, 199, 92, .18); }
.boxes i.filled { border-color: rgba(242, 199, 92, .55); color: #fff3cf; }
.err { color: #ff8a98; min-height: 20px; margin: 12px 0 0; font-size: 14px; font-weight: 600; }
.fine { color: #6f7890; font-size: 12px; margin: 8px 0 0; }
.shake { animation: shake .4s; }
@keyframes shake { 20%, 60% { transform: translateX(-8px); } 40%, 80% { transform: translateX(8px); } }
.floaters { position: absolute; inset: 0; pointer-events: none; }
.fcard { position: absolute; width: 90px; height: 126px; border-radius: 10px; background: linear-gradient(160deg, #fff, #ece6da); color: #111; opacity: .13; box-shadow: 0 20px 40px rgba(0, 0, 0, .5); animation: floaty 9s ease-in-out infinite; }
.fcard b { position: absolute; top: 8px; left: 10px; font-size: 22px; }
.fcard i { position: absolute; inset: 0; display: grid; place-items: center; font-style: normal; font-size: 54px; }
.fcard.red { color: var(--red); }
.f1 { top: 8%; left: -18px; transform: rotate(-18deg); }
.f2 { top: 14%; right: -14px; transform: rotate(16deg); animation-delay: -3s; }
.f3 { bottom: 9%; left: 6%; transform: rotate(12deg); animation-delay: -5s; }
.f4 { bottom: 13%; right: 4%; transform: rotate(-10deg); animation-delay: -7s; }
@keyframes floaty { 50% { translate: 0 -14px; } }

/* ---------- lobby ---------- */
#lobby { overflow-y: auto; padding: calc(12px + var(--safe-t)) 16px calc(20px + var(--safe-b)); }
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.me { display: flex; align-items: center; gap: 10px; }
.me-name { font-weight: 800; font-size: 16px; }
.me-sub { color: var(--muted); font-size: 12px; }
.lobby-title { margin: 26px 0 4px; text-align: center; font-size: 28px; color: var(--gold); }
.lobby-sub { text-align: center; color: var(--muted); margin: 0 0 20px; font-size: 13px; }
.tables { display: grid; gap: 16px; max-width: 560px; width: 100%; margin: 0 auto; }
.ttile { position: relative; border-radius: 22px; overflow: hidden; padding: 16px; display: grid; grid-template-columns: 128px 1fr; gap: 14px; align-items: center;
  border: 1px solid rgba(255, 255, 255, .08); box-shadow: 0 18px 40px rgba(0, 0, 0, .45); text-align: left; width: 100%; }
.ttile.holdem { background: linear-gradient(135deg, #0f3b2c, #0b1b1a 70%); }
.ttile.teenpatti { background: linear-gradient(135deg, #4a0d24, #1a0b16 70%); }
.ttile::after { content: ''; position: absolute; inset: 0; background: radial-gradient(80% 60% at 100% 0%, rgba(242, 199, 92, .14), transparent 60%); pointer-events: none; }
.mini-table { position: relative; width: 128px; height: 84px; border-radius: 999px; border: 5px solid #3b2414; box-shadow: 0 0 0 2px rgba(242, 199, 92, .5), inset 0 0 18px rgba(0, 0, 0, .55); }
.holdem .mini-table { background: radial-gradient(#239163, #0d5537); }
.teenpatti .mini-table { background: radial-gradient(#a3274c, #570c27); }
.mini-table .dot { position: absolute; width: 18px; height: 18px; border-radius: 50%; transform: translate(-50%, -50%); background: rgba(0, 0, 0, .45); border: 2px solid rgba(255, 255, 255, .25); font-size: 9px; font-weight: 800; display: grid; place-items: center; color: #fff; }
.mini-table .dot.on { background: var(--gold); border-color: #fff4c9; color: #3a2600; box-shadow: 0 0 10px rgba(242, 199, 92, .7); }
.mini-table .mc { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); font-size: 20px; letter-spacing: -4px; opacity: .9; }
.ttile h3 { margin: 0; font-family: var(--display); font-size: 20px; letter-spacing: .03em; }
.ttile .meta { color: #c9cfdd; font-size: 12px; margin: 3px 0 8px; }
.ttile .who { font-size: 12px; color: var(--muted); min-height: 16px; margin-bottom: 10px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.live { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: #9ff0c9; }
.live::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: #3ee08f; box-shadow: 0 0 8px #3ee08f; animation: blink 1.6s infinite; }
.live.idle { color: var(--muted); }
.live.idle::before { background: #6f7890; box-shadow: none; animation: none; }
@keyframes blink { 50% { opacity: .35; } }
.lobby-foot { display: flex; flex-direction: column; align-items: center; gap: 6px; margin-top: 28px; }

/* ---------- avatars ---------- */
.ava { --h: 210; position: relative; width: 54px; height: 54px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-size: 18px; color: #fff; text-shadow: 0 1px 2px rgba(0, 0, 0, .4);
  background: radial-gradient(circle at 35% 30%, hsl(var(--h) 85% 68%), hsl(var(--h) 70% 42%) 60%, hsl(calc(var(--h) + 25) 70% 26%));
  box-shadow: 0 0 0 3px rgba(10, 14, 24, .9), 0 0 0 4.5px rgba(242, 199, 92, .55), 0 8px 18px rgba(0, 0, 0, .5); }
.ava.sm { width: 40px; height: 40px; font-size: 15px; }

/* ---------- table screen ---------- */
#table { background: radial-gradient(90% 60% at 50% 45%, #1a2340 0%, #0a0e18 75%); }
.tbar { display: flex; align-items: center; gap: 8px; padding: calc(8px + var(--safe-t)) 10px 6px; z-index: 5; }
.tname { flex: 1; min-width: 0; }
#tName { font-family: var(--display); font-weight: 800; font-size: 16px; letter-spacing: .03em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tsub { font-size: 11px; color: var(--muted); }
.ticker { text-align: center; font-size: 12px; color: #c5ccdc; height: 18px; line-height: 18px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; padding: 0 12px; opacity: .85; }
.stage { flex: 1; position: relative; min-height: 0; display: grid; place-items: center; padding: 46px 0 64px; }
.oval { position: relative; height: 100%; aspect-ratio: .6; max-width: 80vw; max-height: 100%; }
.felt { position: absolute; inset: 0; border-radius: 999px; overflow: hidden;
  border: 12px solid transparent;
  background:
    radial-gradient(70% 55% at 50% 45%, var(--felt1), var(--felt2) 70%, var(--felt3)) padding-box,
    linear-gradient(160deg, #6b4423, #2b170a 45%, #5a3518 75%, #1e0f05) border-box;
  box-shadow: 0 0 0 2px rgba(242, 199, 92, .65), 0 0 0 7px rgba(0, 0, 0, .5), 0 30px 70px rgba(0, 0, 0, .7), inset 0 0 50px rgba(0, 0, 0, .55); }
#table.holdem { --felt1: #2aa271; --felt2: #12704a; --felt3: #0a4a31; }
#table.teenpatti { --felt1: #b8325a; --felt2: #7d1538; --felt3: #4b0a22; }
.felt::before { content: ''; position: absolute; inset: 0; opacity: .18; mix-blend-mode: overlay;
  background-image: radial-gradient(rgba(255, 255, 255, .5) 1px, transparent 1px); background-size: 4px 4px; }
#table.teenpatti .felt::after { content: ''; position: absolute; inset: 18% 10%; border-radius: 50%; opacity: .12;
  background: repeating-conic-gradient(from 0deg, rgba(255, 230, 160, .9) 0 4deg, transparent 4deg 15deg); -webkit-mask: radial-gradient(circle, transparent 30%, #000 31%, #000 50%, transparent 51%); mask: radial-gradient(circle, transparent 30%, #000 31%, #000 50%, transparent 51%); }
.felt-ring { position: absolute; inset: 14px; border-radius: 999px; border: 1.5px solid rgba(255, 230, 160, .22); }
.watermark { position: absolute; left: 0; right: 0; top: 60%; text-align: center; font-size: 15px; color: rgba(255, 255, 255, .09); letter-spacing: .25em; text-transform: uppercase; }

.center { position: absolute; left: 50%; top: 44%; transform: translate(-50%, -50%); width: 92%; display: flex; flex-direction: column; align-items: center; gap: 10px; pointer-events: none; }
.pot { display: inline-flex; align-items: center; gap: 6px; padding: 6px 14px 6px 8px; border-radius: 999px; background: rgba(0, 0, 0, .45); border: 1px solid rgba(242, 199, 92, .35); font-weight: 800; color: #ffe7a8; font-size: 15px; font-variant-numeric: tabular-nums; box-shadow: 0 4px 14px rgba(0, 0, 0, .35); }
.pot .lbl { font-size: 10px; letter-spacing: .12em; color: #d9c28a; margin-right: 2px; }
.board { display: flex; gap: 4px; --cw: min(11.5vw, 48px); min-height: calc(var(--cw) * 1.4); }
.board .slot { width: var(--cw); height: calc(var(--cw) * 1.4); border-radius: calc(var(--cw) * .12); border: 1.5px dashed rgba(255, 255, 255, .14); }
.info { font-size: 11px; color: rgba(255, 255, 255, .7); text-align: center; letter-spacing: .03em; text-shadow: 0 1px 2px rgba(0, 0, 0, .5); }
.info b { color: #fff; }
.waiting-msg { font-family: var(--display); font-size: 13px; color: rgba(255, 255, 255, .75); letter-spacing: .08em; text-align: center; }

/* chip stacks */
.chip { display: inline-block; width: 18px; height: 18px; border-radius: 50%; flex: none;
  background: radial-gradient(circle, #fff 0 22%, transparent 23%), repeating-conic-gradient(var(--c, #e0384f) 0 30deg, #fff 30deg 45deg);
  box-shadow: inset 0 0 0 2px rgba(0, 0, 0, .25), 0 2px 3px rgba(0, 0, 0, .5); }
.chip.c2 { --c: #2b7fd6; } .chip.c3 { --c: #1d9a5c; } .chip.c4 { --c: #222; } .chip.gold { --c: #d4a034; }
.chips { position: relative; display: inline-block; width: 22px; height: 22px; }
.chips .chip { position: absolute; left: 2px; }
.bet { position: absolute; transform: translate(-50%, -50%); display: flex; align-items: center; gap: 4px; padding: 3px 9px 3px 4px; border-radius: 999px; background: rgba(0, 0, 0, .5); font-weight: 800; font-size: 12px; color: #fff; z-index: 2; font-variant-numeric: tabular-nums; }

/* seats */
.seat { position: absolute; transform: translate(-50%, -50%); width: 84px; display: flex; flex-direction: column; align-items: center; z-index: 3; transition: opacity .3s, filter .3s; }
.seat.empty .ava { background: rgba(0, 0, 0, .35); box-shadow: 0 0 0 2px rgba(255, 255, 255, .12); color: rgba(255, 255, 255, .3); font-size: 12px; }
.seat.folded .ava, .seat.folded .plate, .seat.out .ava { filter: grayscale(.85) brightness(.6); }
.seat.offline .ava::after { content: '⚡'; position: absolute; right: -4px; bottom: -4px; font-size: 13px; background: #222; border-radius: 50%; width: 20px; height: 20px; display: grid; place-items: center; }
.seat .ring { position: absolute; inset: -7px; width: calc(100% + 14px); height: calc(100% + 14px); transform: rotate(-90deg); pointer-events: none; opacity: 0; }
.seat .ring circle { fill: none; stroke: #4ade80; stroke-width: 4; stroke-linecap: round; stroke-dasharray: 201; stroke-dashoffset: 0; }
.seat.turn .ring { opacity: 1; }
.seat.turn .ava { box-shadow: 0 0 0 3px rgba(10, 14, 24, .9), 0 0 22px 4px rgba(255, 220, 120, .55); }
.plate { margin-top: 6px; min-width: 76px; max-width: 92px; padding: 3px 8px 4px; border-radius: 10px; text-align: center; background: linear-gradient(180deg, rgba(20, 26, 44, .95), rgba(8, 11, 20, .95)); border: 1px solid rgba(255, 255, 255, .1); box-shadow: 0 4px 10px rgba(0, 0, 0, .45); }
.plate .nm { font-size: 11px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.plate .cn { font-size: 12px; font-weight: 800; color: #ffe39a; font-variant-numeric: tabular-nums; display: flex; align-items: center; justify-content: center; }
.plate .cn .coin { width: 11px; height: 11px; margin-right: 4px; vertical-align: -1px; }
.seat.me .plate { border-color: rgba(242, 199, 92, .55); position: absolute; left: calc(50% + 34px); top: 50%; transform: translateY(-50%); margin: 0; }
.seat.me .tag { top: 18px; right: calc(50% + 36px); }
.seat.me .hname { display: none; }
.info.mine { font-size: 12px; color: #fff3c4; background: rgba(0, 0, 0, .35); padding: 3px 10px; border-radius: 999px; }
.tag { position: absolute; top: -20px; padding: 2px 8px; border-radius: 6px; font-size: 10px; font-weight: 800; letter-spacing: .06em; white-space: nowrap; background: #2b3550; color: #e6ebf7; box-shadow: 0 3px 8px rgba(0, 0, 0, .4); z-index: 4; animation: pop .25s ease-out; }
.tag.t-fold, .tag.t-pack { background: #4a4f5d; color: #c7cbd6; }
.tag.t-check { background: #2f6fb3; }
.tag.t-call, .tag.t-chaal { background: #1e8a57; }
.tag.t-bet, .tag.t-raise { background: linear-gradient(180deg, #ffd86b, #c8902a); color: #2e1d00; }
.tag.t-allin { background: linear-gradient(180deg, #ff6a7d, #b5162f); color: #fff; }
.tag.t-sb, .tag.t-bb, .tag.t-boot { background: #3c3360; }
.tag.t-show, .tag.t-sideshow { background: #7b47d6; }
.tag.t-deny { background: #6b2a2a; }
.tag.t-wait { background: rgba(0, 0, 0, .5); color: #aab2c6; }
.tag.t-seen { background: #0f6b6b; }
@keyframes pop { from { transform: scale(.5); opacity: 0; } }
.dbtn { position: absolute; width: 20px; height: 20px; border-radius: 50%; background: linear-gradient(#fff, #d9d9d9); color: #111; font-size: 10px; font-weight: 900; display: grid; place-items: center; box-shadow: 0 2px 5px rgba(0, 0, 0, .6); right: -6px; top: -4px; z-index: 5; }
.minis { position: absolute; display: flex; --cw: 22px; z-index: 2; }
.minis .card + .card { margin-left: -12px; }
.seat.side-l .minis { left: 66px; top: 6px; }
.seat.side-r .minis { right: 66px; top: 6px; }
.seat.side-t .minis { left: 66px; top: 6px; }
.seat.side-l .minis .card:nth-child(1), .seat.side-r .minis .card:nth-child(1) { transform: rotate(-8deg); }
.seat.side-l .minis .card:nth-child(3), .seat.side-r .minis .card:nth-child(3) { transform: rotate(8deg); }
.minis.open { --cw: 30px; }
.minis.open .card + .card { margin-left: -8px; }
.seen-dot { font-size: 9px; font-weight: 800; letter-spacing: .08em; color: #9fe7e7; margin-top: 2px; }
.seen-dot.blind { color: #d9b4ff; }
.hname { position: absolute; bottom: -18px; white-space: nowrap; font-size: 10px; font-weight: 800; color: #fff3c4; background: rgba(0, 0, 0, .65); padding: 2px 7px; border-radius: 6px; z-index: 4; }
.seat.winner .ava { animation: winpulse 1s ease-in-out infinite; }
.seat.winner .plate { border-color: var(--gold); box-shadow: 0 0 18px rgba(242, 199, 92, .6); }
@keyframes winpulse { 50% { box-shadow: 0 0 0 3px rgba(10, 14, 24, .9), 0 0 30px 10px rgba(255, 215, 100, .8); } }
.emote-bubble { position: absolute; top: -34px; font-size: 30px; z-index: 9; animation: emote 2.2s ease-out forwards; pointer-events: none; }
@keyframes emote { 0% { transform: translateY(10px) scale(.3); opacity: 0; } 15% { transform: translateY(0) scale(1.2); opacity: 1; } 25% { transform: scale(1); } 80% { opacity: 1; } 100% { transform: translateY(-26px); opacity: 0; } }

/* hero */
.hero-hand { position: absolute; left: 50%; top: 78%; transform: translate(-50%, -50%); display: flex; align-items: flex-end; z-index: 4; --cw: min(15vw, 64px); }
.hero-hand .card { box-shadow: 0 10px 24px rgba(0, 0, 0, .55); }
.hero-hand .card:nth-child(1) { transform: rotate(-8deg) translateY(4px); }
.hero-hand.n2 .card:nth-child(2) { transform: rotate(8deg) translateY(4px); margin-left: -10px; }
.hero-hand.n3 .card:nth-child(2) { margin-left: -14px; transform: translateY(-4px); }
.hero-hand.n3 .card:nth-child(3) { margin-left: -14px; transform: rotate(8deg) translateY(4px); }
.hero-hand.folded { opacity: .45; filter: grayscale(.6); }
.see-btn { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); z-index: 6; padding: 8px 16px; font-size: 13px; border-radius: 999px; animation: glow 1.6s ease-in-out infinite; white-space: nowrap; }
@keyframes glow { 50% { box-shadow: 0 0 24px 6px rgba(242, 199, 92, .55); } }

/* cards */
.card { --cw: inherit; position: relative; width: var(--cw); height: calc(var(--cw) * 1.4); border-radius: calc(var(--cw) * .12); flex: none;
  background: linear-gradient(160deg, #ffffff 0%, #f5f1e8 60%, #e9e2d3 100%); color: #15171c; box-shadow: 0 3px 8px rgba(0, 0, 0, .45), inset 0 0 0 1px rgba(0, 0, 0, .08); font-weight: 800; overflow: hidden; }
.card.red { color: #d0102f; }
.card .tl { position: absolute; top: 5%; left: 8%; display: flex; flex-direction: column; align-items: center; line-height: .92; font-size: calc(var(--cw) * .34); letter-spacing: -.04em; }
.card .tl i { font-style: normal; font-size: .8em; }
.card .c { position: absolute; right: 6%; bottom: 3%; font-size: calc(var(--cw) * .62); line-height: 1; }
.card.back { background:
    radial-gradient(circle at 50% 50%, rgba(255, 220, 140, .35) 0 14%, transparent 15%),
    repeating-linear-gradient(45deg, rgba(255, 255, 255, .09) 0 2px, transparent 2px 7px),
    repeating-linear-gradient(-45deg, rgba(255, 255, 255, .09) 0 2px, transparent 2px 7px),
    linear-gradient(160deg, #2b4fa3, #142a66);
  box-shadow: 0 3px 8px rgba(0, 0, 0, .45), inset 0 0 0 calc(var(--cw) * .06) #f2f0ea, inset 0 0 0 calc(var(--cw) * .085) #c9a24a; }
#table.teenpatti .card.back, .card.back.tp { background:
    radial-gradient(circle at 50% 50%, rgba(255, 220, 140, .4) 0 14%, transparent 15%),
    repeating-linear-gradient(45deg, rgba(255, 255, 255, .09) 0 2px, transparent 2px 7px),
    repeating-linear-gradient(-45deg, rgba(255, 255, 255, .09) 0 2px, transparent 2px 7px),
    linear-gradient(160deg, #a3203f, #5a0b22); }
.card.new { animation: flipin .45s ease-out both; }
@keyframes flipin { from { transform: rotateY(90deg) scale(.9); } }
.card.win { box-shadow: 0 0 0 2px var(--gold), 0 0 16px 4px rgba(242, 199, 92, .75); transform: translateY(-5px) !important; }
.card.dim { filter: brightness(.55); }

/* banner */
.banner { position: absolute; left: 50%; top: 31%; transform: translate(-50%, -50%); z-index: 8; min-width: 72%; max-width: 96%; text-align: center; padding: 10px 16px; border-radius: 16px;
  background: linear-gradient(180deg, rgba(40, 28, 4, .92), rgba(20, 14, 2, .92)); border: 1.5px solid var(--gold); box-shadow: 0 14px 40px rgba(0, 0, 0, .6), 0 0 30px rgba(242, 199, 92, .3); animation: bannerIn .45s cubic-bezier(.2, 1.6, .4, 1); pointer-events: none; }
.banner .w { font-family: var(--display); font-weight: 800; font-size: 17px; color: #ffe39a; }
.banner .h { font-size: 12px; color: #f6efe0; margin-top: 2px; }
.banner .w + .w { margin-top: 6px; }
@keyframes bannerIn { from { transform: translate(-50%, -50%) scale(.6); opacity: 0; } }

/* action bar */
.actionbar { position: relative; z-index: 6; padding: 10px 10px calc(10px + var(--safe-b)); background: linear-gradient(180deg, rgba(10, 14, 24, 0), rgba(10, 14, 24, .92) 30%); min-height: 84px; }
.arow { display: flex; gap: 8px; }
.arow + .arow { margin-top: 8px; }
.arow .btn { flex: 1; padding: 13px 6px; font-size: 15px; }
.arow.sec .btn { padding: 9px 6px; font-size: 13px; }
.status { text-align: center; color: #cdd3e1; font-size: 14px; padding: 8px 6px; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.status .big { font-family: var(--display); font-size: 16px; color: #fff; letter-spacing: .04em; }
.status .row { display: flex; gap: 8px; }
.yourturn { position: absolute; left: 50%; top: -14px; transform: translateX(-50%); font-size: 11px; font-weight: 800; letter-spacing: .14em; color: #2a1b02; background: linear-gradient(180deg, #ffe39a, var(--gold)); padding: 3px 12px; border-radius: 999px; box-shadow: 0 4px 14px rgba(242, 199, 92, .5); animation: pop .3s; }

.raise-panel { position: absolute; left: 10px; right: 10px; bottom: calc(96px + var(--safe-b)); z-index: 7; padding: 14px; border-radius: 18px; background: linear-gradient(180deg, rgba(30, 38, 62, .97), rgba(14, 18, 32, .98)); border: 1px solid rgba(242, 199, 92, .35); box-shadow: 0 -10px 40px rgba(0, 0, 0, .5); animation: up .2s ease-out; }
@keyframes up { from { transform: translateY(20px); opacity: 0; } }
.rp-amt { text-align: center; font-size: 30px; font-weight: 800; color: #ffe39a; font-variant-numeric: tabular-nums; }
.rp-sub { text-align: center; font-size: 12px; color: var(--muted); margin-bottom: 10px; }
.rp-chips { display: flex; gap: 6px; justify-content: center; flex-wrap: wrap; margin-bottom: 12px; }
.rp-chip { width: 50px; height: 50px; border-radius: 50%; font-weight: 800; font-size: 13px; color: #fff; text-shadow: 0 1px 2px rgba(0, 0, 0, .6);
  background: radial-gradient(circle, var(--c) 0 48%, transparent 49%), repeating-conic-gradient(var(--c) 0 30deg, #fff 30deg 45deg); box-shadow: inset 0 0 0 3px rgba(0, 0, 0, .25), 0 4px 10px rgba(0, 0, 0, .5); }
.rp-chip.sel { outline: 3px solid var(--gold); outline-offset: 2px; }
.raise-panel input[type=range] { width: 100%; margin: 0 0 12px; accent-color: var(--gold); height: 28px; }

.emote-pop { position: absolute; right: 10px; top: calc(56px + var(--safe-t)); z-index: 9; display: grid; grid-template-columns: repeat(4, 44px); gap: 6px; padding: 10px; border-radius: 16px; background: rgba(20, 26, 44, .97); border: 1px solid var(--line); box-shadow: 0 14px 40px rgba(0, 0, 0, .5); animation: pop .15s; }
.emote-pop button { font-size: 26px; height: 44px; border-radius: 10px; background: rgba(255, 255, 255, .05); }

.modal { position: absolute; inset: 0; z-index: 20; display: grid; place-items: center; background: rgba(0, 0, 0, .55); backdrop-filter: blur(3px); padding: 20px; }
.modal .box { width: 100%; max-width: 340px; border-radius: 22px; padding: 22px; text-align: center; background: linear-gradient(180deg, #232c48, #121828); border: 1px solid rgba(181, 139, 255, .5); box-shadow: 0 20px 60px rgba(0, 0, 0, .6); animation: bannerIn .35s cubic-bezier(.2, 1.5, .4, 1); }
.modal h3 { margin: 0 0 6px; font-family: var(--display); }
.modal p { color: #c9cfdd; margin: 0 0 14px; font-size: 14px; }
.modal .bar { height: 6px; border-radius: 3px; background: rgba(255, 255, 255, .1); overflow: hidden; margin-bottom: 16px; }
.modal .bar i { display: block; height: 100%; background: linear-gradient(90deg, #b58bff, #f2c75c); width: 100%; }

/* ---------- teen patti variations ---------- */
.var-badge { display: inline-flex; align-items: center; gap: 4px; margin-top: 3px; padding: 2px 9px; border-radius: 999px; font-size: 10.5px; font-weight: 800; letter-spacing: .04em;
  color: #2a1b02; background: linear-gradient(180deg, #ffe39a, var(--gold)); box-shadow: 0 2px 8px rgba(242, 199, 92, .3); max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.var-badge::after { content: 'ⓘ'; font-size: 11px; opacity: .7; }
.vtag { display: inline-block; margin-left: 6px; padding: 1px 7px; border-radius: 999px; font-size: 10px; font-weight: 800; letter-spacing: .05em; color: #2a1b02; background: var(--gold); vertical-align: 1px; }
.card.wild { box-shadow: 0 0 0 2px var(--gold), 0 0 12px 3px rgba(242, 199, 92, .7), 0 3px 8px rgba(0, 0, 0, .45); }
.card .star { position: absolute; bottom: 4%; left: 9%; font-size: calc(var(--cw) * .26); line-height: 1; color: #d39a1c; text-shadow: 0 0 4px rgba(255, 220, 120, .9); }
.minis:not(.open) .card .star { display: none; }
.joker-wrap { display: flex; flex-direction: column; align-items: center; gap: 3px; --cw: min(10vw, 40px); }
.joker-wrap .card.jk { box-shadow: 0 0 0 2px var(--gold), 0 0 18px 4px rgba(242, 199, 92, .65); transform: rotate(-4deg); }
.jk-lbl { font-size: 9.5px; font-weight: 900; letter-spacing: .22em; color: #2a1b02; background: linear-gradient(180deg, #ffe39a, var(--gold)); padding: 1px 7px 1px 9px; border-radius: 999px; }
.modal .box.picker { max-width: 400px; max-height: 92vh; overflow-y: auto; border-color: rgba(242, 199, 92, .55); }
.modal .box.picker .bar i { background: linear-gradient(90deg, var(--gold2), #ffe39a); }
.vgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 10px; }
.vtile { padding: 11px 8px; border-radius: 14px; text-align: left; background: linear-gradient(180deg, rgba(255, 255, 255, .08), rgba(255, 255, 255, .03)); border: 1px solid rgba(242, 199, 92, .3); transition: transform .08s, border-color .15s; }
.vtile:active { transform: scale(.97); border-color: var(--gold); }
.vtile b { display: block; font-family: var(--display); font-size: 15px; color: #ffe39a; }
.vtile span { display: block; font-size: 11.5px; color: #c9cfdd; margin-top: 2px; line-height: 1.3; }
.vtile:last-child:nth-child(odd) { grid-column: 1 / -1; }
.sheet-badge { display: inline-block; margin-bottom: 10px; padding: 2px 10px; border-radius: 999px; font-size: 11px; font-weight: 800; color: #2a1b02; background: var(--gold); }
.sheet-jk { margin: 4px 0 8px; --cw: 46px; }
.modal .rules { text-align: left; margin: 0 0 12px; padding-left: 20px; color: #e3e7f0; font-size: 14px; line-height: 1.45; }
.modal .rules li + li { margin-top: 4px; }
.sheet .box { border-color: rgba(242, 199, 92, .5); }
.sheet .fine { margin: 0 0 14px; }

#fx { position: fixed; inset: 0; pointer-events: none; z-index: 30; }
#fx > * { position: fixed; left: 0; top: 0; will-change: transform; }
.float-num { font-weight: 900; font-size: 20px; color: #ffe39a; text-shadow: 0 2px 6px rgba(0, 0, 0, .8), 0 0 14px rgba(242, 199, 92, .8); }

.toast { position: fixed; left: 50%; top: calc(70px + var(--safe-t)); transform: translate(-50%, -20px); z-index: 40; padding: 10px 16px; border-radius: 12px; background: rgba(20, 26, 44, .97); border: 1px solid var(--line); font-size: 14px; font-weight: 600; opacity: 0; pointer-events: none; transition: all .25s; max-width: 90vw; text-align: center; box-shadow: 0 10px 30px rgba(0, 0, 0, .5); }
.toast.on { opacity: 1; transform: translate(-50%, 0); }

@media (min-width: 700px) {
  .oval { max-width: 520px; aspect-ratio: .75; }
}
@media (max-height: 640px) {
  .stage { padding-top: 40px; padding-bottom: 56px; }
  .seat { transform: translate(-50%, -50%) scale(.88); }
}
