:root { --gold: #f0b400; --cyan: #17b4e8; --cyan2: #0a7fb5; --navy: #171c3d; --red: #c9252b; --line: #3a3f5c; --muted: #a3a8c3; --felt1: #1f7d1c; --felt2: #135a12; --felt3: #0a340a; }
body[data-felt=blue] { --felt1: #1c5f9a; --felt2: #124372; --felt3: #0a2746; }
body[data-felt=red] { --felt1: #9a2626; --felt2: #6e1616; --felt3: #400b0b; }
body[data-felt=gray] { --felt1: #55606b; --felt2: #3a434c; --felt3: #22282e; }
* { box-sizing: border-box; }
html, body { height: 100%; }
body { margin: 0; background: #000; color: #fff; font: 15px/1.35 Roboto, "Segoe UI", system-ui, sans-serif; overflow: hidden; }
[hidden] { display: none !important; }
button { font: inherit; color: inherit; cursor: pointer; }
.spacer { flex: 1; }
.muted { color: var(--muted); }
.err { color: #ff8a80; min-height: 1.2em; margin: 2px 0; }
.pos { color: #4ade80; } .neg { color: #f87171; }
.st-pending { color: var(--gold); } .st-approved { color: #4ade80; } .st-rejected { color: #f87171; } .st-cancelled { color: var(--muted); }
.empty { padding: 28px; text-align: center; color: var(--muted); }
.screen { position: fixed; inset: 0; display: flex; flex-direction: column; }

/* ---------- lobby ---------- */
#lobby, #pages {
  background:
    linear-gradient(118deg, transparent 0 74%, rgba(203,190,150,.9) 74% 80%, transparent 80%),
    linear-gradient(118deg, var(--red) 0 7%, rgba(203,190,150,.9) 7% 13%, transparent 13% 86%, var(--red) 86%),
    var(--navy);
}
.topbar { display: flex; align-items: center; gap: 8px; padding: 8px 10px; }
.brand { font-weight: 900; font-size: 22px; letter-spacing: 3px; }
.brand span { color: var(--gold); }
.icon { background: none; border: 0; font-size: 22px; width: 42px; height: 42px; border-radius: 8px; line-height: 1; }
.icon:hover { background: rgba(255,255,255,.12); }
.tb { border: 0; border-radius: 4px; height: 58px; min-width: 70px; display: flex; flex-direction: column; align-items: center; justify-content: center; font-weight: 600; font-size: 13px; }
.tb.login { background: linear-gradient(#22c3f3, var(--cyan2)); }
.tb.login i { font-style: normal; font-size: 18px; line-height: 1; }
.tb.cashier { background: linear-gradient(135deg, #d8a800, #8a6d00 45%, #e3b500); border: 2px solid #ffd84a; min-width: 140px; color: #fff; }
.tb.cashier small { font-size: 13px; letter-spacing: .5px; }
.tb.cashier b { background: var(--gold); border-radius: 999px; padding: 0 18px; min-width: 100px; text-align: center; }
.userchip { background: none; border: 0; display: flex; align-items: center; gap: 8px; text-align: right; height: 58px; }
.userchip span { display: flex; flex-direction: column; } .userchip small { color: var(--muted); }
.userchip i { width: 56px; height: 56px; border-radius: 4px; display: grid; place-items: center; font-style: normal; font-weight: 800; font-size: 26px; }

.lobby-body { flex: 1; display: flex; gap: 6px; padding: 0 5px; min-height: 0; }
.lleft { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.lright { width: 320px; display: flex; flex-direction: column; background: rgba(10,12,30,.55); }
#cashPane { flex: 1; display: flex; flex-direction: column; min-height: 0; }
.bigtabs { display: flex; gap: 4px; padding: 4px; }
.bigtabs button { flex: 1; background: none; border: 0; border-radius: 4px; padding: 8px; font-size: 15px; display: flex; flex-direction: column; align-items: center; gap: 2px; }
.bigtabs button i { font-style: normal; font-size: 26px; line-height: 1; }
.bigtabs button.on { background: rgba(255,255,255,.2); }
.filters { display: flex; gap: 4px; padding: 3px 4px; background: rgba(255,255,255,.14); margin-bottom: 4px; }
.filters button { flex: 1; background: none; border: 0; border-radius: 4px; padding: 5px; font-weight: 500; }
.filters button.on { background: var(--gold); }
.filters em { font-style: normal; font-size: 10px; background: #fff; color: #333; border-radius: 999px; padding: 0 5px; margin-left: 4px; vertical-align: top; }

.trow { display: grid; grid-template-columns: 2.4fr 1.3fr 1.2fr .7fr .8fr 1fr 96px; align-items: center; min-height: 40px; padding: 0 10px; gap: 4px; }
.trow > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-align: center; }
.trow > span:first-child { text-align: left; }
.thead { background: #1b1b1b; color: #cfcfcf; font-size: 12px; }
#rows { flex: 1; overflow-y: auto; background: #000; }
#rows .trow { font-weight: 700; font-style: italic; font-size: 16px; cursor: pointer; }
#rows .trow.holdem { background: #000; color: #ffe800; }
#rows .trow.omaha { background: #3f6fe6; color: #fff; }
#rows .trow.sel { background: #ffff00; color: #000; }
.playbtn { border: 0; border-radius: 4px; background: linear-gradient(#35c8f5, var(--cyan2)); color: #fff; font-weight: 800; font-style: italic; padding: 6px 16px; font-size: 16px; }
.bottomfilters { display: flex; align-items: center; gap: 16px; padding: 8px; background: rgba(203,190,150,.75); }
.bottomfilters input:not([type]), .bottomfilters select { flex: 1; max-width: 240px; background: rgba(255,255,255,.25); border: 0; border-radius: 3px; padding: 9px 10px; color: #fff; font: inherit; }
.bottomfilters select option { color: #000; }
.bottomfilters input::placeholder { color: #eee; }
.tog { display: flex; align-items: center; gap: 8px; font-weight: 500; cursor: pointer; }
.tog input { display: none; }
.tog i { width: 46px; height: 22px; border-radius: 999px; background: #777; position: relative; transition: .15s; }
.tog i::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: .15s; }
.tog input:checked + i { background: #e0262c; }
.tog input:checked + i::after { left: 27px; }

.phead { background: #2b3047; padding: 12px; font-weight: 800; font-style: italic; }
.pl { display: flex; justify-content: space-between; padding: 9px 12px; font-size: 13px; font-weight: 600; }
.pl.head { background: #1b1b1b; color: #cfcfcf; font-weight: 400; font-size: 12px; }
.plist { flex: 1; overflow-y: auto; min-height: 60px; }
.mini { position: relative; height: 210px; background: #0b0b0b; }
.minifelt { position: absolute; inset: 22% 16% 24%; border-radius: 999px; background: radial-gradient(var(--felt1), var(--felt3)); border: 4px solid #d9a521; }
.mseat { position: absolute; transform: translate(-50%, -50%); display: flex; flex-direction: column; align-items: center; font-size: 9px; line-height: 1.1; text-align: center; }
.mseat i { width: 26px; height: 26px; border-radius: 50%; border: 1px solid #999; }
.mseat span { background: #000; border: 1px solid #777; border-radius: 6px; padding: 0 4px; margin-top: -4px; max-width: 70px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.mseat.free::before { content: ""; width: 26px; height: 26px; border-radius: 50%; background: #2a2f45; border: 1px solid #666; }
.buyin { position: absolute; left: 0; right: 0; top: 50%; transform: translateY(-60%); text-align: center; font-size: 11px; }
.pbtns { display: flex; gap: 4px; padding: 4px; }
.pbtns .btn { flex: 1; border-radius: 3px; padding: 11px; font-size: 16px; }
.statusbar { display: flex; align-items: center; gap: 18px; padding: 8px 14px; background: #1c1c1c; font-size: 12px; }
.conn { color: #c33; } .conn.on { color: #2ecc40; }

/* jackpot, language, tournaments, multi-table tabs, flags */
.tb.jackpot { border: 2px solid #e8b400; background: rgba(120,0,0,.55); min-width: 130px; color: var(--gold); cursor: default; }
.tb.jackpot b { color: #fff; }
.tb.jackpot { display: flex; flex-direction: row; align-items: center; gap: 2px; padding-left: 2px; padding-right: 2px; }
.tb.jackpot > span { display: flex; flex-direction: column; align-items: center; min-width: 108px; max-width: 150px; cursor: pointer; }
.tb.jackpot .jpn { font-size: 10px; line-height: 1.15; text-align: center; white-space: normal; }
.jparr { background: none; border: 0; color: #fff; font-size: 22px; line-height: 1; padding: 4px 6px; cursor: pointer; }
.jpmini { cursor: pointer; }
.stxt { margin: 10px 0; } .stxt.sz-sm { font-size: 13px; } .stxt.sz-md { font-size: 16px; } .stxt.sz-lg { font-size: 21px; font-weight: 700; line-height: 1.25; }
.stxt.c-none { color: #aaa; } .stxt.c-white { color: #fff; } .stxt.c-gold { color: var(--gold); } .stxt.c-red { color: #ff5a5a; } .stxt.c-green { color: #4ade80; } .stxt.c-cyan { color: #4dd9ff; }
.seebadge { font-style: normal; font-size: 10px; font-weight: 700; background: #c0392b; color: #fff; border-radius: 3px; padding: 1px 5px; vertical-align: middle; }
.seenote { position: absolute; top: 1%; left: 50%; transform: translateX(-50%); background: #c0392b; color: #fff; font-size: 12px; font-weight: 700; padding: 3px 12px; border-radius: 999px; white-space: nowrap; z-index: 6; }
.seewarn { background: #c0392b; color: #fff; font-weight: 700; padding: 8px 10px; border-radius: 4px; }
.seewarn[hidden] { display: none; }
.claim { margin-top: 12px; border: 1px solid rgba(255,255,255,.25); border-radius: 6px; padding: 8px 12px; }
.claim summary { cursor: pointer; font-weight: 700; color: var(--gold); padding: 6px 0; }
.claim textarea { width: 100%; font: inherit; padding: 8px; border-radius: 4px; border: 1px solid #888; resize: vertical; }
.jpmini .jpn { display: block; max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.icon.lang { font-size: 13px; font-weight: 700; background: rgba(255,255,255,.14); width: 40px; height: 34px; }
.trow.tour { grid-template-columns: 2.2fr 1fr 1.2fr 1fr 1.4fr 130px; }
#tourPane { flex: 1; display: flex; flex-direction: column; min-height: 0; }
#tourRows { flex: 1; overflow-y: auto; background: #000; }
#tourRows .trow { font-weight: 700; font-style: italic; font-size: 16px; cursor: pointer; background: #000; color: #7dff8a; }
#tourRows .trow.sel { background: #ffff00; color: #000; }
.trow small { font-size: 11px; opacity: .8; }
#ttabs { display: flex; gap: 4px; margin-left: 4px; }
.tabstrip { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; } .tabstrip::-webkit-scrollbar { display: none; }
#ltabs { padding: 0 10px 6px; } #ltabs[hidden] { display: none; }
.ttab { flex: none; display: flex; align-items: center; gap: 6px; background: none; border: 0; padding: 4px 3px; color: #fff; }
.ttab i { display: block; width: 46px; height: 26px; border: 3px solid #8a8a8a; border-radius: 999px; }
.ttab.on i { border-color: #fff; border-width: 4px; }
.ttab.turn i { border-color: var(--gold); background: rgba(240,180,0,.25); animation: blink 1s steps(2) infinite; }
.ttab.on.turn i { animation: none; }
.ttab small { font-size: 12px; max-width: 110px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ttab.add { width: 28px; height: 28px; padding: 0; justify-content: center; border: 2px solid #8a8a8a; border-radius: 50%; font-size: 18px; line-height: 1; align-self: center; margin-left: 4px; }
#ttabs { max-width: 46vw; }
@keyframes blink { 50% { opacity: .35; } }
.jpmini { font-size: 11px; color: var(--gold); margin-right: 10px; text-align: right; line-height: 1.1; }
.jpmini b { display: block; font-size: 13px; }
.flag { position: absolute; left: -1.5em; top: 50%; transform: translateY(-50%); width: 1.7em; height: 1.2em; border: 1px solid rgba(255,255,255,.3); background: #777; }
.inline .flag { position: static; transform: none; display: inline-block; width: 26px; height: 18px; }
body.noflags .seat .flag { display: none; }
.f-MN { background: linear-gradient(90deg, #c4272f 0 33%, #015197 33% 66%, #c4272f 66%); }
.f-RU { background: linear-gradient(#fff 0 33%, #0039a6 33% 66%, #d52b1e 66%); }
.f-DE { background: linear-gradient(#000 0 33%, #dd0000 33% 66%, #ffce00 66%); }
.f-JP { background: radial-gradient(circle, #bc002d 0 32%, #fff 34%); }
.f-KR { background: radial-gradient(circle, #cd2e3a 0 22%, #0047a0 22% 34%, #fff 36%); }
.f-CN { background: radial-gradient(circle at 25% 30%, #ffde00 0 14%, #de2910 16%); }
.f-TR { background: radial-gradient(circle at 38% 50%, #fff 0 20%, #e30a17 22%); }
.f-KZ { background: radial-gradient(circle, #fec50c 0 24%, #00afca 26%); }
.f-US { background: linear-gradient(90deg, #3c3b6e 0 42%, transparent 42%), repeating-linear-gradient(#b22234 0 12%, #fff 12% 24%); }
.f-VN { background: radial-gradient(circle, #ff0 0 15%, #da251d 17%); }
.f-UZ { background: linear-gradient(#0099b5 0 33%, #fff 33% 66%, #1eb53a 66%); }
.f-KG { background: radial-gradient(circle, #ffef00 0 26%, #e8112d 28%); }
.f-IN { background: linear-gradient(#ff9933 0 33%, #fff 33% 66%, #138808 66%); }
.f-TH { background: linear-gradient(#a51931 0 17%, #fff 17% 33%, #2d2a4a 33% 67%, #fff 67% 83%, #a51931 83%); }
.themebtn { width: 110px; height: 56px; border-radius: 6px; border: 3px solid transparent; font-weight: 700; }
.themebtn.on { border-color: var(--cyan); }
.th-classic { background: linear-gradient(118deg, #c9252b 0 20%, #cbbe96 20% 32%, #171c3d 32%); }
.th-dark { background: #17181c; } .th-emerald { background: linear-gradient(135deg, #06352a, #0f6b4f); } .th-royal { background: linear-gradient(135deg, #2a0f52, #5a1f9a); }
body[data-theme=dark] #lobby, body[data-theme=dark] #pages { background: #17181c; }
body[data-theme=emerald] #lobby, body[data-theme=emerald] #pages { background: linear-gradient(135deg, #06352a, #0f6b4f 60%, #0a4a38); }
body[data-theme=royal] #lobby, body[data-theme=royal] #pages { background: linear-gradient(135deg, #2a0f52, #5a1f9a 60%, #33126a); }
.banner { position: absolute; left: 50%; top: 20%; transform: translateX(-50%); background: linear-gradient(#ffd84a, #e8a400); color: #1a1200; font-weight: 800; font-size: 1.4em; padding: .4em 1.4em; border-radius: .5em; z-index: 9; text-align: center; box-shadow: 0 0 2em rgba(255,200,0,.7); animation: gather .4s ease-out; }
.board.twice { flex-direction: column; gap: .3em; }
.board > div { display: flex; gap: .45em; justify-content: center; }
.board.twice .card { font-size: .8em; }
.timer.bank i { background: var(--gold); }
.act.bank { width: 92px; background: #b8860b; display: grid; place-items: center; align-content: center; font-size: 13px; cursor: default; }
.act.bank small { font-size: 18px; font-weight: 700; }
.act.bank.on { background: var(--gold); color: #1a1200; animation: blink 1s steps(2) infinite; }

/* ---------- buttons, forms ---------- */
.btn { background: #2b3047; border: 1px solid var(--line); border-radius: 4px; padding: 10px 16px; font-weight: 700; }
.btn:hover { filter: brightness(1.15); }
.btn:disabled { opacity: .5; cursor: default; }
.btn.sm { padding: 5px 10px; font-size: 13px; }
.btn.gold { background: var(--gold); border-color: var(--gold); color: #fff; }
.btn.cyan { background: linear-gradient(#22c3f3, var(--cyan2)); border: 0; }
.btn.red { background: var(--red); border-color: var(--red); }
.btn.ghost { background: none; border: 0; }
input, select { background: #fff; color: #111; border: 1px solid #999; border-radius: 3px; padding: 9px 10px; font: inherit; }
input[type=checkbox] { width: 20px; height: 20px; accent-color: #e0262c; }
input[type=range] { padding: 0; accent-color: var(--gold); }
.col { display: flex; flex-direction: column; gap: 10px; max-width: 360px; }
.col label, .inline { display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: #ddd; }
.inline { flex-direction: row; align-items: center; gap: 10px; margin-bottom: 10px; }
.line { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.chk { display: flex; align-items: center; gap: 12px; cursor: pointer; padding: 6px 0; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 24px; }
h4 { margin: 14px 0 8px; font-weight: 600; }

/* ---------- table ---------- */
#table { background: #0a0a0a; }
.ttop { display: flex; align-items: center; gap: 2px; padding: 2px 8px; height: 46px; }
.handno { color: #8a8a8a; font-size: 13px; margin-left: 6px; }
.chipbal { color: var(--gold); font-weight: 700; margin-right: 8px; }
#infoPanel { position: absolute; top: 46px; right: 0; width: 320px; background: #5a5a5a; z-index: 15; padding: 12px 22px; font-weight: 600; font-size: 14px; }
.arena { flex: 1; position: relative; min-height: 0; font-size: clamp(8px, 1.08vw, 16px); }
.felt { position: absolute; inset: 14% 19% 19%; border-radius: 999px; padding: 1.1em; background: linear-gradient(#f6d76b, #b8860b 50%, #f1c84a); box-shadow: 0 0 0 .25em #1a1a1a, 0 1em 2.5em rgba(0,0,0,.8); }
.rail { width: 100%; height: 100%; border-radius: 999px; background: radial-gradient(ellipse at center, var(--felt1) 0, var(--felt2) 55%, var(--felt3) 100%); box-shadow: inset 0 0 2.5em rgba(0,0,0,.55), inset 0 0 0 .35em rgba(0,0,0,.18); }
#seats { position: absolute; inset: 0; }
.pot, .board, .caption, .pots { position: absolute; left: 50%; transform: translate(-50%, -50%); }
.pot { top: 28%; background: rgba(0,40,0,.55); border-radius: 999px; padding: .25em 2.6em; font-size: 1.15em; white-space: nowrap; }
.board { top: 44%; display: flex; }
.caption { top: 55.5%; color: rgba(255,255,255,.3); font-size: 1.1em; white-space: nowrap; }
.pots { top: 60%; display: flex; gap: 1.6em; font-size: 1.1em; z-index: 1; }
.pots span { display: flex; align-items: flex-end; gap: .5em; background: rgba(0,0,0,.3); border-radius: 999px; padding: .1em .9em .1em .4em; }

/* cards: large index, like a real online deck */
.card { position: relative; width: 4em; height: 5.4em; border-radius: .4em; background: #fff; color: #111; box-shadow: 0 .1em .4em rgba(0,0,0,.6); overflow: hidden; flex: none; }
.card b { position: absolute; left: .18em; top: -.02em; font-size: 1.75em; font-weight: 500; line-height: 1.1; letter-spacing: -.05em; }
.card i { position: absolute; left: .22em; top: 1.5em; font-style: normal; font-size: 1.25em; line-height: 1; }
.card u { position: absolute; right: .06em; bottom: -.16em; font-size: 3.4em; font-weight: 500; line-height: 1; text-decoration: none; letter-spacing: -.05em; font-family: Georgia, "Times New Roman", serif; }
.card.s-h, .card.s-d, .mini-cards .s-h, .mini-cards .s-d { color: #e01414; }
body[data-deck="4c"] .card.s-d, body[data-deck="4c"] .mini-cards .s-d, [data-deck-demo="4c"] .card.s-d { color: #1458d8; }
body[data-deck="4c"] .card.s-c, body[data-deck="4c"] .mini-cards .s-c, [data-deck-demo="4c"] .card.s-c { color: #12902c; }
[data-deck-demo="2c"] .card.s-d { color: #e01414; } [data-deck-demo="2c"] .card.s-c { color: #111; }
.card.back { background: #141414; border: .14em solid #fff; }
.mini-cards i { display: inline-block; background: #fff; color: #111; border-radius: 3px; padding: 0 3px; margin-right: 2px; font-style: normal; font-weight: 700; font-size: 12px; line-height: 16px; }

.seat { position: absolute; transform: translate(-50%, -50%); width: 10.5em; display: flex; flex-direction: column; align-items: center; z-index: 2; }
.ava { position: relative; width: 5.8em; height: 6.4em; border-radius: .3em; display: grid; place-items: start center; font-weight: 800; color: rgba(255,255,255,.85); }
.ava > span { font-size: 2.6em; line-height: 1.5; }
.away { position: absolute; left: 0; right: 0; bottom: 1.5em; text-align: center; font-style: normal; font-size: .95em; background: rgba(0,0,0,.55); }
.hole { display: flex; }
.hole.backs { position: absolute; left: -.6em; bottom: .9em; }
.hole.backs .card { width: 2em; height: 2.7em; margin-right: -.55em; }
.hole.faces { position: absolute; top: .9em; left: 50%; transform: translateX(-50%); z-index: 3; }
.hole.faces .card { font-size: .78em; margin: 0 -.35em; }
.hole.faces.n4 .card { font-size: .66em; margin: 0 -.7em; }
.seat.you .hole.faces { top: -.2em; }
.seat.you .hole.faces .card { font-size: .95em; margin: 0 -.45em; }
.seat.you .hole.faces.n4 .card { font-size: .78em; margin: 0 -.8em; }
.hole.faces.show { top: -.4em; }
.hole.faces.show .card { font-size: 1.02em; margin: 0 -.5em; }
.hole.faces.show.n4 .card { font-size: .82em; margin: 0 -.85em; }
.hole.peek .card { outline: .14em dashed var(--gold); opacity: .93; }
.plate { position: relative; width: 100%; margin-top: -1.3em; background: #060606; border: .14em solid #777; border-radius: 1.6em; padding: .45em .5em .3em; text-align: center; display: flex; flex-direction: column; line-height: 1.2; z-index: 4; }
.plate b { font-weight: 400; font-size: 1.2em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.plate span { font-size: 1.2em; }
.desc { margin-top: .2em; background: #f2f2f2; color: #111; font-weight: 700; font-size: .98em; border-radius: .5em; padding: .05em .7em; white-space: nowrap; z-index: 5; }
.seat.you .plate { border-color: var(--cyan); }
.seat.active .plate { border-color: #fff; box-shadow: 0 0 1em rgba(255,255,255,.7); animation: pulse 1.2s ease-in-out infinite; }
.seat.win .plate { border-color: var(--gold); box-shadow: 0 0 1.2em var(--gold); animation: winpulse .7s ease-in-out 4; }
.seat.out .ava, .seat.out .plate b, .seat.out .plate span { opacity: .42; }
.bub { position: absolute; top: -1em; left: 50%; transform: translateX(-50%); font-style: normal; font-size: 1.1em; border-radius: 999px; padding: 0 .9em; white-space: nowrap; color: #111; background: #b9b5f0; z-index: 6; }
.bub.call, .bub.check { background: #5ccb3c; }
.bub.raise, .bub.bet { background: var(--cyan); box-shadow: 0 0 .6em var(--cyan); }
.bub.fold { background: #d83a3a; } .bub.allin { background: #f2e03a; }
.bub.win { background: var(--gold); font-weight: 800; }
.dealer { position: absolute; right: -1.6em; top: 50%; transform: translateY(-50%); width: 1.6em; height: 1.6em; border-radius: 50%; background: #e8e8e8; color: #111; font: 700 .85em/1.6em sans-serif; font-style: normal; text-align: center; }
.timer { position: absolute; left: 8%; right: 8%; bottom: -.1em; height: .3em; background: #333; border-radius: 1em; overflow: hidden; }
.timer i { display: block; height: 100%; background: #e0262c; animation: shrink linear forwards; }
.seat-open { position: absolute; transform: translate(-50%, -50%); width: 6.4em; height: 6.4em; border-radius: 50%; background: #2a2f45; border: .12em solid #666; font-size: 1.25em; line-height: 1.15; z-index: 2; }
.seat-open:hover:not(:disabled) { background: #3a4060; }
.seat-open:disabled { opacity: .5; cursor: default; }
.bet { position: absolute; transform: translate(-50%, -50%); display: flex; align-items: flex-end; gap: .5em; font-size: 1.15em; z-index: 1; background: rgba(0,0,0,.3); border-radius: 999px; padding: 0 .7em 0 .2em; }
.chips { display: inline-flex; align-items: flex-end; gap: .08em; }
.chips i { width: 1.25em; border-radius: 50% / .32em; border: .06em solid rgba(0,0,0,.45); background: repeating-linear-gradient(to bottom, #d92b2b 0 .2em, #fff .2em .27em); box-shadow: inset 0 .25em 0 rgba(255,255,255,.35); }
.chips i.c1 { background: repeating-linear-gradient(to bottom, #2a6fd6 0 .2em, #fff .2em .27em); }
.chips i.c2 { background: repeating-linear-gradient(to bottom, #e3b10c 0 .2em, #fff .2em .27em); }
.chips i.c3 { background: repeating-linear-gradient(to bottom, #23a455 0 .2em, #fff .2em .27em); }

/* animations (disabled by Settings → Animation) */
@keyframes shrink { from { width: 100%; } to { width: 0; } }
@keyframes pulse { 50% { box-shadow: 0 0 1.6em rgba(255,255,255,.95); } }
@keyframes winpulse { 50% { box-shadow: 0 0 2.2em var(--gold); transform: scale(1.05); } }
@keyframes dealt { from { opacity: 0; transform: translate(0, -3em) scale(.3) rotate(-25deg); } }
@keyframes dealtFace { from { opacity: 0; transform: translateX(-50%) translateY(-2em) scale(.4); } }
@keyframes flip { from { transform: rotateY(90deg) translateY(-1em); opacity: 0; } }
@keyframes pop { from { transform: translateX(-50%) scale(.3); opacity: 0; } 70% { transform: translateX(-50%) scale(1.15); } }
@keyframes slide { from { left: var(--fx); top: var(--fy); opacity: .2; } }
@keyframes gather { from { transform: translate(-50%, -50%) scale(.5); opacity: 0; } }
.hole.backs.dealt { animation: dealt .35s ease-out backwards; }
.hole.faces.dealt { animation: dealtFace .35s ease-out backwards; }
.card.flip { animation: flip .35s ease-out backwards; }
.card.flip + .card.flip { animation-delay: .12s; } .card.flip + .card.flip + .card.flip { animation-delay: .24s; }
.bub.pop { animation: pop .25s ease-out; }
.bet.slide { animation: slide .3s ease-out; }
.pots.gather { animation: gather .35s ease-out; }
body.noanim * { animation: none !important; transition: none !important; }
body.noanim .timer i { animation: shrink linear forwards !important; }

.tbottom { display: flex; align-items: flex-end; gap: 12px; padding: 0 10px 8px; height: 138px; }
.chat { width: 38%; max-width: 560px; height: 110px; background: #595959; display: flex; flex-direction: column; margin-left: 10%; }
.chat-tabs { display: flex; height: 28px; }
.chat-tabs button { background: #6a6a6a; border: 0; padding: 2px 16px; } .chat-tabs button.on { background: var(--gold); }
#log { flex: 1; overflow-y: auto; padding: 4px 8px; font-size: 12px; }
#log .d { color: #5fe8ff; }
#chatForm input { width: 100%; border: 0; border-radius: 0; background: #444; color: #fff; padding: 4px 8px; font-size: 12px; }
#controls { flex: 1; display: flex; flex-direction: column; align-items: flex-end; justify-content: flex-end; gap: 4px; }
.hint { width: 100%; text-align: center; font-size: 17px; margin: 0 0 40px; }
.acts { display: flex; gap: 3px; align-items: stretch; }
.act { border: 0; border-radius: 2px; width: 112px; height: 62px; font-size: 18px; font-weight: 600; line-height: 1.1; color: #fff; }
.act small { font-size: 14px; font-weight: 400; }
.act.fold { background: #c9333a; } .act.call { background: #2f9a22; } .act.raise { background: #4046b8; }
.act.wide { width: 220px; }
.act:hover { filter: brightness(1.15); } .act:disabled { opacity: .5; }
.amt { display: flex; flex-direction: column; justify-content: space-between; width: 190px; background: #1d1d1d; padding: 5px 8px; }
.amt input[type=number] { background: #000; color: #fff; border: 1px solid #555; padding: 4px 6px; text-align: right; width: 100%; }
.amt input[type=range] { width: 100%; }
.raisebox { display: flex; gap: 3px; }
.raisebox button { background: #4046b8; border: 0; border-radius: 2px; padding: 5px 0; width: 46px; font-size: 13px; }
.pre { display: flex; gap: 24px; margin-bottom: 14px; }

/* ---------- admin page ---------- */
#pages main { flex: 1; overflow-y: auto; padding: 8px 18px 40px; background: rgba(10,12,30,.82); }
#pages h3 { margin: 22px 0 8px; color: var(--gold); }
.scroll { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; background: rgba(0,0,0,.45); }
th, td { padding: 7px 10px; text-align: left; border-bottom: 1px solid var(--line); white-space: nowrap; }
th { color: #cfcfcf; font-weight: 600; font-size: 12px; background: #1b1b1b; }
td input[type=number] { width: 130px; padding: 5px 8px; }
.row { display: flex; gap: 8px; align-items: end; flex-wrap: wrap; margin-top: 10px; }
.row.center { justify-content: center; }
.row label { display: flex; flex-direction: column; gap: 3px; color: var(--muted); font-size: 12px; }

/* ---------- dialogs ---------- */
dialog.dlg { background: #3a3a3a; color: #fff; border: 1px solid #2a3a6a; border-radius: 6px; padding: 0; width: min(330px, 94vw); }
dialog.dlg.wide { width: min(900px, 96vw); }
dialog::backdrop { background: rgba(0,0,0,.6); }
.dlg header { display: flex; align-items: center; justify-content: space-between; padding: 14px 18px; font-size: 13px; }
.dlg .x { background: none; border: 0; font-size: 20px; }
.dlg form, .dlg .dbody { padding: 0 16px 16px; }
.dlg > form { display: flex; flex-direction: column; gap: 10px; }
.dlg > form input:not([type=range]) { padding: 13px 10px; }
.dlg .dbody { min-height: 220px; max-height: 60vh; overflow-y: auto; padding-top: 14px; background: #333; }
.dlg footer { display: flex; justify-content: center; gap: 12px; padding: 12px; }
.dlg footer .btn { min-width: 150px; }
.dtabs { display: flex; background: #555; padding: 4px; gap: 2px; overflow-x: auto; }
.dtabs button { flex: 1; background: none; border: 0; border-radius: 3px; padding: 9px 12px; white-space: nowrap; font-weight: 500; }
.dtabs button.on { background: var(--gold); }
.notice { background: #0f3d24; border: 1px solid #2ecc71; border-left-width: 5px; color: #c9f7dc; border-radius: 6px; padding: 10px 14px; margin-bottom: 12px; font-weight: 500; }
.decks, .felts { display: flex; gap: 10px; flex-wrap: wrap; }
.deck { background: none; border: 2px solid transparent; border-radius: 6px; padding: 6px; display: flex; flex-direction: column; align-items: center; gap: 4px; }
.deck > span { display: flex; gap: 2px; font-size: 8px; }
.deck.on, .feltbtn.on { border-color: var(--cyan); }
.feltbtn { width: 84px; height: 46px; border-radius: 999px; border: 3px solid #d9a521; outline: 2px solid transparent; }
.feltbtn.on { outline-color: var(--cyan); }
.f-green { background: #1f7d1c; } .f-blue { background: #1c5f9a; } .f-red { background: #9a2626; } .f-gray { background: #55606b; }

#drawer { position: fixed; inset: 0; z-index: 20; }
.drawer-bg { position: absolute; inset: 0; background: rgba(0,0,0,.45); }
#drawer nav { position: absolute; left: 0; top: 0; bottom: 0; width: 272px; background: #5c5c5c; padding: 14px 10px; display: flex; flex-direction: column; gap: 2px; }
#drawer nav { overflow-y: auto; padding: 14px 0; }
#drawer nav button { background: none; border: 0; text-align: left; padding: 12px 22px; font-size: 16px; display: flex; align-items: center; gap: 14px; }
#drawer nav button:hover { background: rgba(255,255,255,.12); }
#drawer nav button i { font-style: normal; width: 24px; text-align: center; font-size: 19px; }
#drawer nav button em { font-style: normal; margin-left: auto; transition: transform .15s; }
#drawer nav button.open { background: #3a3a3a; } #drawer nav button.open em { transform: rotate(180deg); }
#drawer nav button[data-close] { font-weight: 700; }
#drawer .sub { display: flex; flex-direction: column; }
#drawer .sub button { padding-left: 40px; }
/* dialogs opened from the menu */
.about { text-align: center; padding: 30px 10px; } .about p { margin: 4px 0; }
.about a { color: #9db4ff; } .about .row { margin-top: 28px; } .about .row .btn { min-width: 130px; }
.info p { margin: 0 0 22px; } .info select { padding: 5px 8px; margin-left: 6px; }
.dtabs.inner { margin: 0 -16px 12px; }
.hfilter { display: flex; justify-content: flex-end; gap: 6px; margin-bottom: 8px; } .hfilter input { padding: 6px 8px; background: #555; color: #fff; border: 0; }
tr.click { cursor: pointer; } tr.click:hover { background: rgba(255,255,255,.08); }
.avabig { width: 140px; height: 140px; margin: 0 auto 14px; display: grid; place-items: center; font-size: 30px; font-weight: 800; overflow: hidden; }
.avabig img, .ava img, .userchip i img, .mseat i img { width: 100%; height: 100%; object-fit: cover; display: block; }
.avabig span { font-size: 2.2em; } .emo { font-size: 3.4em !important; line-height: 1.5 !important; }
.avabig .emo { font-size: 2.6em !important; }
.avagrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(64px, 1fr)); gap: 8px; margin-bottom: 14px; }
.avapick { height: 64px; font-size: 32px; background: #444; border: 3px solid transparent; border-radius: 6px; } .avapick.on { border-color: var(--gold); }
.avaup { width: 220px; height: 220px; margin: 0 auto 14px; border: 2px solid #666; border-radius: 8px; background: #2c2c2c; overflow: hidden; } .avaup img { width: 100%; height: 100%; object-fit: cover; }
.ava { overflow: visible; } .ava > img { border-radius: .3em; }
.userchip i { overflow: hidden; } .userchip i .emo { font-size: 1.1em !important; line-height: 1 !important; }
.mseat i { overflow: hidden; display: grid; place-items: center; font-style: normal; } .mseat i .emo { font-size: 14px !important; line-height: 1 !important; }
.toast { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); background: #5a1518; border: 1px solid var(--red); padding: 10px 18px; border-radius: 8px; z-index: 30; }
.toast.ok { background: #14532d; border-color: #22c55e; }

@media (max-width: 900px) { .lright { display: none; } }
@media (max-width: 700px) {
  .userchip > span, #fPlayers, .jpmini { display: none; }
  .brand { order: -1; flex: 1 0 100%; text-align: center; font-size: 14px; letter-spacing: 2px; line-height: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .trow.tour { grid-template-columns: 2fr 1fr 1fr 1.3fr 96px; } .trow.tour > span:nth-child(3) { display: none; }
  .trow.tour > span:nth-child(4), .trow.tour > span:nth-child(6) { display: block; }
  .act.bank { width: 64px; flex: none; }
  .tb { height: 50px; } .tb.cashier { min-width: 110px; } .userchip i { width: 46px; height: 46px; }
  .trow { grid-template-columns: 2.2fr 1.3fr 1.1fr .8fr 70px; padding: 0 6px; }
  .trow > span:nth-child(4), .trow > span:nth-child(6) { display: none; }
  #rows .trow { font-size: 13px; } .playbtn { padding: 6px 10px; font-size: 14px; }
  .bottomfilters { gap: 8px; font-size: 13px; }
  .ttop .icon { width: 34px; font-size: 19px; } #infoPanel { width: 100%; }
  .arena { font-size: clamp(7px, 2.5vw, 12px); }
  .felt { inset: 9% 13% 8%; border-radius: 12em; }
  .rail { border-radius: 11em; }
  .pot { top: 30%; } .board { top: 45%; gap: .2em; } .board .card { font-size: .86em; }
  .caption { top: 56%; white-space: normal; text-align: center; width: 60%; } .pots { top: 63%; }
  .seat { width: 9em; } .ava { width: 4.6em; height: 5.2em; }
  .tbottom { flex-direction: column; align-items: stretch; height: auto; gap: 6px; }
  .chat { width: 100%; max-width: none; margin: 0; height: 74px; order: 2; }
  #controls { align-items: stretch; min-height: 74px; }
  .acts { flex-wrap: wrap; } .act { flex: 1; width: auto; height: 52px; } .amt { width: 100%; flex-direction: row; gap: 8px; order: -1; }
  .amt input[type=number] { width: 110px; } .raisebox button { flex: 1; }
  .hint { margin: 10px 0; font-size: 14px; }
  .grid2 { grid-template-columns: 1fr; }
}

/* ---------- phones: most players come from a phone ---------- */
html, body { height: 100dvh; }
button, a, summary, label { touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
#table { user-select: none; -webkit-user-select: none; }
@media (max-width: 700px) {
  input, select, textarea { font-size: 16px !important; } /* iOS zooms the page on smaller fields */
  .topbar { flex-wrap: wrap; padding: max(6px, env(safe-area-inset-top)) 8px 6px; gap: 6px; }
  .tb.jackpot { display: flex; order: 9; flex: 1 0 100%; height: 36px; justify-content: space-between; padding: 0 4px; }
  .tb.jackpot > span { flex-direction: row; gap: 8px; max-width: none; min-width: 0; align-items: baseline; }
  .tb.jackpot .jpn { font-size: 11px; white-space: nowrap; } .tb.jackpot b { font-size: 15px; }
  .jparr { padding: 2px 14px; font-size: 24px; }
  [data-ui=fullscreen] { display: none; }
  .trow { grid-template-columns: 2fr 1.55fr 1.1fr .75fr 66px; min-height: 46px; }
  #rows .trow > span:nth-child(2) { font-size: 12px; }
  .statusbar { padding-bottom: max(8px, env(safe-area-inset-bottom)); }
  .bottomfilters input:not([type]) { min-width: 0; width: 0; flex: 1 1 0; padding: 8px; }
  .seat.you .flag { display: none; }
  .ttop { padding-top: env(safe-area-inset-top); height: auto; min-height: 44px; flex-wrap: wrap; }
  .handno { font-size: 11px; white-space: nowrap; margin-left: 2px; } .chipbal { font-size: 13px; }
  .seat .flag { left: auto; right: .3em; top: -.55em; transform: none; width: 1.5em; height: 1.05em; z-index: 5; }
  .seat.you .hole.faces { top: -1.5em; } .seat.you .hole.faces .card { font-size: 1.22em; margin: 0 -.4em; }
  .seat.you .hole.faces.n4 .card { font-size: 1em; margin: 0 -.75em; }
  .tbottom { padding: 0 8px max(8px, env(safe-area-inset-bottom)); }
  .chat { height: 96px; } .chat-tabs { height: 26px; flex: none; } #log { flex: 1; min-height: 0; overflow-y: auto; }
  #chatForm { flex: none; } #chatIn { height: 30px; }
  .act { height: 56px; font-size: 19px; } .raisebox button { height: 40px; }
  dialog.dlg, dialog.dlg.wide { width: 96vw; max-height: 92dvh; overflow-y: auto; }
  .toast { bottom: max(20px, env(safe-area-inset-bottom)); width: max-content; max-width: 92vw; }
}
/* a phone held sideways: little height, so the chat gives way to the table */
@media (max-height: 500px) and (orientation: landscape) {
  .tbottom { height: 78px; padding-bottom: 4px; } .chat { display: none; } #controls { margin-left: auto; }
  .act { height: 54px; width: 96px; } .ttop { height: 36px; } [data-ui=fullscreen] { display: none; }
  .arena { font-size: clamp(7px, 1.9vh, 12px); }
  dialog.dlg, dialog.dlg.wide { max-height: 96dvh; overflow-y: auto; }
}

.seenote { max-width: 96%; white-space: normal; text-align: center; border-radius: 8px; }
@media (max-width: 700px) { .seenote { font-size: 11px; width: 92%; padding: 3px 6px; } .tn .seebadge { display: block; width: max-content; font-size: 9px; line-height: 1.3; margin-top: 1px; } }

@media (max-width: 700px) { .ttab i { width: 36px; height: 21px; } .ttab.add { width: 24px; height: 24px; font-size: 16px; } #ttabs { max-width: 62vw; } .ttop .spacer { flex: 1 0 100%; height: 0; } .ttop .chipbal { margin: 0 auto 0 8px; } }

/* phones, second pass: no pull-to-refresh under the finger, a slider that a thumb can hold, tabs and tables that fit */
html, body { overscroll-behavior: none; }
@media (max-width: 700px) {
  .dtabs button { padding: 9px 4px; font-size: 13px; }
  input[type=range] { -webkit-appearance: none; appearance: none; background: transparent; height: 38px; }
  input[type=range]::-webkit-slider-runnable-track { height: 8px; border-radius: 4px; background: #6a6a6a; }
  input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 30px; height: 30px; margin-top: -11px; border-radius: 50%; background: var(--gold); border: 2px solid #fff; }
  input[type=range]::-moz-range-track { height: 8px; border-radius: 4px; background: #6a6a6a; }
  input[type=range]::-moz-range-thumb { width: 26px; height: 26px; border-radius: 50%; background: var(--gold); border: 2px solid #fff; }
  .txt { font-size: 12px; } .txt th, .txt td { padding: 6px 5px; } .txt th:first-child, .txt td:first-child { display: none; }
}
/* figure avatars */
.fig { width: 100%; height: 100%; display: block; }
.ava > .fig { border-radius: .3em; } .avabig { overflow: hidden; } .avapick { padding: 0; overflow: hidden; height: 72px; } .avapick .fig { border-radius: 3px; }
.avagrid { max-height: 46vh; overflow-y: auto; }
@media (max-width: 700px) { input[type=range] { border: 0 !important; box-shadow: none; } .amt input[type=range] { padding: 0 4px; } .dtabs button { font-size: 12px; padding: 9px 2px; } .txt { font-size: 11px; } .txt td:last-child { white-space: normal; } }

/* ---------- day 2: the table on a phone, upright and sideways ---------- */
#chatToggle, #logLast { display: none; }
.buyrow { display: flex; gap: 8px; align-items: stretch; } .buyrow input { flex: 1; min-width: 0; } .buyrow .btn { padding: 0 14px; }
.away.off { background: #b3261e; color: #fff; }
@media (max-width: 700px), (max-height: 500px) and (orientation: landscape) {
  /* one row at the top: home, table icons … pause, leave, menu. Sound, info and settings are in the menu. */
  .ttop { flex-wrap: nowrap; position: relative; gap: 0; }
  .ttop .tx, .ttop .chipbal { display: none; }
  .ttop .spacer { flex: 1 1 auto; height: auto; }
  #ttabs { max-width: none; flex: 0 1 auto; min-width: 0; }
  .ttop .handno { position: absolute; left: 10px; top: 100%; margin: 2px 0 0; z-index: 3; pointer-events: none; }
  /* chat: one line with the newest message; a tap opens it */
  #chatToggle { display: block; flex: none; width: 44px; background: #6a6a6a; border: 0; color: #fff; font-size: 16px; }
  #logLast { display: block; flex: 1; min-width: 0; padding: 0 8px; font-size: 12px; line-height: 26px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; background: #595959; cursor: pointer; }
  #logLast b { font-weight: 600; } #logLast .mini-cards { display: none; }
  .chat { height: 26px; } .chat #log, .chat #chatForm { display: none; }
  .chat.open { height: 190px; } .chat.open #log { display: block; } .chat.open #chatForm:not([hidden]) { display: block; } .chat.open #logLast { visibility: hidden; }
  .chat-tabs { height: 26px; } .chat-tabs button[data-log] { flex: none; }
}
@media (max-height: 500px) and (orientation: landscape) {
  /* sideways there is no room under the table: the chat floats in the bottom-left corner */
  .chat, .chat.open { display: flex; position: fixed; left: max(6px, env(safe-area-inset-left)); bottom: 6px; width: 40vw; max-width: 340px; margin: 0; z-index: 15; box-shadow: 0 2px 10px rgba(0,0,0,.5); }
  .chat.open { height: 62vh; }
  .tbottom { justify-content: flex-end; padding-left: calc(40vw + 14px); padding-right: max(8px, env(safe-area-inset-right)); }
  #controls { margin-left: 0; flex: 1; justify-content: flex-end; }
  .ttop { padding-left: max(8px, env(safe-area-inset-left)); padding-right: max(8px, env(safe-area-inset-right)); }
  /* shorter seats so that two fit above each other on the sides */
  .ava { height: 3.7em; width: 4.6em; } .seat { width: 8.6em; }
  .seat.you .hole.faces { top: -1.2em; }
  .hint { margin: 2px 0; font-size: 12px; }
}
@media (max-height: 500px) and (orientation: landscape) {
  .chat, .chat.open { width: 30vw; max-width: 260px; }
  .tbottom { padding-left: calc(min(30vw, 260px) + 14px); }
  .act { width: 84px; } .act.bank { width: 62px; flex: none; font-size: 13px; } .amt { width: 150px; } .raisebox button { width: 36px; }
}

/* password field with the show / hide eye */
.pw { position: relative; display: block; }
.pw input { width: 100%; padding-right: 46px !important; }
.pw .eye { position: absolute; right: 0; top: 0; bottom: 0; width: 44px; display: flex; align-items: center; justify-content: center; background: none; border: 0; color: #666; cursor: pointer; padding: 0; }
.pw .eye:hover { color: #111; }
