﻿/* Gold Poker Club — styles (Gold Poker palette, mobile-first adjustments at the bottom) */
:root {
  --bg: #0c0c0e;
  --bg2: #121216;
  --panel: #16161a;
  --panel2: #1e1e24;
  --border: #2c2c34;
  --text: #ecebe6;
  --muted: #9a99a0;
  --accent: #f0d478;
  --primary: #d4af37;
  --primary-ink: #1b1505;
  --success: #2fbf71;
  --danger: #e0464b;
  --felt: #0f3d2e;
  --felt2: #0a2c21;
  --gold: #d4af37;
  --gold2: #f0d478;
  --gold-rgb: 212, 175, 55;       /* (the same two golds, for rgba()) */
  --gold2-rgb: 240, 212, 120;
  --bg-glow: #1a1812;             /* the light at the top of the page */
  --felt-hi: #155a43;             /* the felt's lit middle */
  --rail: #2b2216;                /* the table's rim */
  --back-a: #3a2f10;              /* card backs: the two stripes and the edge */
  --back-b: #2a220b;
  --back-edge: #d4af37;
  color-scheme: dark;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  font: 15px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", "PingFang SC", "Hiragino Sans", "Malgun Gothic", sans-serif;
  background: radial-gradient(1200px 600px at 50% -10%, var(--bg-glow) 0%, var(--bg) 60%);
  background-color: var(--bg);
  color: var(--text);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}
button, input, select { font: inherit; color: inherit; }
a { color: var(--gold2); }

#app { max-width: 1200px; margin: 0 auto; min-height: 100vh; display: flex; flex-direction: column; }

/* ---- top bar ---- */
#topbar {
  display: flex; align-items: center; gap: 16px;
  padding: 10px 20px; background: rgba(18, 18, 22, .96); background: color-mix(in srgb, var(--bg2) 96%, transparent);
  border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 20;
  padding-top: max(10px, env(safe-area-inset-top));
}
.brand { display: flex; align-items: center; gap: 8px; text-decoration: none; flex: none; }
.brand img { height: 26px; width: auto; display: block; }
.brand-club {
  font-size: 11px; font-weight: 800; letter-spacing: 2px; color: var(--primary-ink);
  background: var(--gold); border-radius: 4px; padding: 2px 6px;
}
#nav { display: flex; gap: 4px; flex: 1; min-width: 0; }
.nav-btn {
  background: transparent; border: none; color: var(--muted); white-space: nowrap;
  padding: 8px 12px; border-radius: 8px; cursor: pointer; font-size: 14px; font-weight: 600;
}
.nav-btn:hover { background: var(--panel); color: var(--text); }
.nav-btn.active { background: var(--panel2); color: var(--gold2); }
.nav-ic { display: none; }
.top-right { display: flex; align-items: center; gap: 10px; flex: none; }
.bal { font-size: 14px; color: var(--muted); margin-right: 6px; white-space: nowrap; }
.bal b { color: var(--text); }
.lang-select {
  background: var(--panel); border: 1px solid var(--border); color: var(--text); border-radius: 8px;
  padding: 6px 8px; font-size: 13px; cursor: pointer; max-width: 120px;
}
/* the language picker with flags (js/i18n.js enhanceLangSelect): the native select stays, out of sight */
.lang-pick { position: relative; display: inline-flex; vertical-align: middle; }
.lang-pick .lang-native { position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important; opacity: 0; pointer-events: none; overflow: hidden; }
.lang-btn {
  display: inline-flex; align-items: center; gap: 6px; background: var(--panel); border: 1px solid var(--border); color: var(--text);
  border-radius: 8px; padding: 5px 8px; font-size: 13px; cursor: pointer; white-space: nowrap;
}
.lang-btn .lang-caret { color: var(--muted); font-size: 11px; }
.flag { width: 21px; height: 14px; border-radius: 2px; flex: none; box-shadow: 0 0 0 1px rgba(255, 255, 255, .18); display: block; }
.lang-menu {
  position: absolute; top: calc(100% + 4px); right: 0; z-index: 1200; min-width: 150px; padding: 4px;
  background: var(--panel); border: 1px solid var(--border); border-radius: 10px; box-shadow: 0 10px 28px rgba(0, 0, 0, .5);
}
.lang-menu[hidden] { display: none; }
.lang-menu button {
  display: flex; align-items: center; gap: 9px; width: 100%; padding: 8px 10px; background: none; border: 0; border-radius: 6px;
  color: var(--text); font-size: 14px; text-align: left; cursor: pointer; white-space: nowrap;
}
.lang-menu button:hover, .lang-menu button[aria-selected="true"] { background: var(--panel2); }
.login-lang .lang-menu { top: auto; bottom: calc(100% + 4px); right: auto; left: 50%; transform: translateX(-50%); }
.profile-btn {
  background: var(--panel); border: 1px solid var(--border); color: var(--text);
  padding: 7px 12px; border-radius: 20px; cursor: pointer; font-weight: 600; white-space: nowrap;
  max-width: 160px; overflow: hidden; text-overflow: ellipsis;
}
.return-pill { padding: 6px 12px; border-radius: 20px; }

/* ---- screens ---- */
.screen { display: none; padding: 22px 20px 40px; flex: 1; }
.screen.active { display: block; }
.screen-title { display: flex; align-items: baseline; flex-wrap: wrap; gap: 6px 12px; margin: 6px 0 16px; }
.screen-title h2 { font-size: 22px; }
.sub { color: var(--muted); font-size: 14px; }
.sub b { color: var(--gold2); }

/* ---- buttons ---- */
.btn {
  background: var(--panel2); color: var(--text); border: 1px solid var(--border);
  padding: 9px 16px; border-radius: 8px; cursor: pointer; font-size: 14px; font-weight: 600;
  touch-action: manipulation;
}
.btn:hover { filter: brightness(1.12); }
.btn:disabled { opacity: .45; cursor: default; filter: none; }
.btn.primary { background: var(--primary); border-color: var(--primary); color: var(--primary-ink); }
.btn.success { background: var(--success); border-color: var(--success); color: #04120b; }
.btn.danger { background: var(--danger); border-color: var(--danger); color: #fff; }
.btn.ghost { background: transparent; }
.btn.big { padding: 12px 22px; font-size: 16px; }
.btn.small { padding: 4px 10px; font-size: 13px; }

.tag {
  display: inline-block; background: var(--panel2); color: var(--muted);
  font-size: 11px; padding: 2px 8px; border-radius: 10px; font-weight: 700; vertical-align: middle;
}
.tag.live { background: #123d2a; color: #4fe0a0; }
.tag.gold { background: rgba(var(--gold-rgb), .2); color: var(--gold2); }
.hidden { display: none !important; }

/* ---- login ---- */
#screen-login { display: none; align-items: center; justify-content: center; }
#screen-login.active { display: flex; }
.login-card {
  background: var(--bg2); border: 1px solid var(--border); border-radius: 16px;
  padding: 36px 32px; width: min(440px, 100%); text-align: center; box-shadow: 0 20px 60px rgba(0,0,0,.5);
}
.login-logo { width: 240px; max-width: 80%; height: auto; display: block; margin: 0 auto 6px; }
.login-club { display: inline-block; font-size: 12px; font-weight: 800; letter-spacing: 4px; color: var(--primary-ink); background: var(--gold); border-radius: 4px; padding: 2px 10px; margin-bottom: 14px; }
.tagline { color: var(--muted); margin-bottom: 22px; line-height: 1.5; }
.login-form input {
  display: block; width: 100%; padding: 12px 14px; border-radius: 10px; border: 1px solid var(--border);
  background: var(--panel); color: var(--text); font-size: 16px; margin-bottom: 10px;
}
.login-hint { margin: 6px 0 12px; line-height: 1.5; }
.login-lang { margin-top: 10px; }
.login-card .btn { width: 100%; margin-bottom: 8px; }
.login-features { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin: 18px 0 6px; }
.login-features span { background: var(--panel); padding: 6px 10px; border-radius: 14px; font-size: 12px; color: var(--muted); }

/* ---- practice lobby ---- */
.table-grid, .game-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; margin-bottom: 8px; }
.lobby-table, .game-item { background: var(--panel); border: 1px solid var(--border); border-radius: 12px; padding: 16px; }
.lt-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 6px; }
.lt-name { font-weight: 700; }
.lt-blinds { color: var(--gold2); font-size: 15px; font-weight: 700; margin-bottom: 4px; }
.lt-meta { color: var(--muted); font-size: 13px; margin-bottom: 12px; }
.play-btn { width: 100%; }
.game-item { display: flex; flex-direction: column; gap: 4px; opacity: .9; }
.game-item.disabled { opacity: .5; }
.gi-icon { font-size: 22px; color: var(--gold); }
.gi-name { font-weight: 700; }
.gi-desc { color: var(--muted); font-size: 12px; flex: 1; }

/* ---- shop ---- */
.shop-list { display: flex; flex-direction: column; gap: 10px; max-width: 640px; }
.shop-wallet { color: var(--muted); margin-bottom: 4px; }
.shop-wallet b { color: var(--text); }
.shop-item {
  display: flex; align-items: center; gap: 14px;
  background: var(--panel); border: 1px solid var(--border); border-radius: 12px; padding: 14px 16px;
}
.s-icon { font-size: 28px; }
.s-name { flex: 1; font-weight: 600; }

/* ---- profile ---- */
.profile-card { background: var(--panel); border: 1px solid var(--border); border-radius: 14px; padding: 22px; max-width: 680px; }
.profile-head { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; }
.avatar.big { font-size: 54px; }
.profile-head h3 { font-size: 22px; word-break: break-word; }
.profile-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 12px; }
.profile-stats div { background: var(--panel2); border-radius: 10px; padding: 12px 6px; text-align: center; }
.profile-stats b { display: block; font-size: 20px; }
.profile-stats span { color: var(--muted); font-size: 12px; }
.profile-card .hint { color: var(--muted); font-size: 13px; margin-bottom: 14px; }
.profile-card h4 { margin: 20px 0 10px; }
.history-row { display: flex; flex-wrap: wrap; gap: 4px 10px; padding: 7px 0; border-bottom: 1px solid var(--border); font-size: 13px; color: var(--muted); }
.history-row .h-hand { color: var(--text); font-weight: 600; }
.history-row .h-win { margin-left: auto; color: var(--success); }
.empty { color: var(--muted); padding: 16px; text-align: center; }

/* ---- poker table ---- */
#screen-table { padding: 10px 16px 24px; }
.table-top { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; flex-wrap: wrap; }
.table-info { font-weight: 700; color: var(--gold2); }
.table-log { color: var(--muted); font-size: 14px; flex: 1; text-align: right; min-width: 120px; }
.table-banner {
  background: #2a2410; border: 1px solid #5a4a18; color: var(--gold2); border-radius: 10px;
  padding: 8px 12px; margin: 0 auto 10px; max-width: 900px; text-align: center; font-size: 14px;
}
.table-banner .btn { margin-left: 8px; }

.poker-table { display: flex; justify-content: center; }
.table-felt {
  position: relative; width: min(900px, 100%); aspect-ratio: 1.6;
  background: radial-gradient(ellipse at center, var(--felt-hi) 0%, var(--felt) 45%, var(--felt2) 80%);
  border: 12px solid var(--rail); border-radius: 50%;
  box-shadow: inset 0 0 0 2px rgba(var(--gold-rgb),.25), inset 0 0 80px rgba(0,0,0,.45), 0 10px 30px rgba(0,0,0,.5);
}
.board { position: absolute; left: 50%; top: 44%; transform: translate(-50%, -50%); display: flex; gap: 6px; }
.pot-display {
  position: absolute; left: 50%; top: 66%; transform: translateX(-50%); white-space: nowrap;
  color: var(--gold2); font-weight: 700; font-size: 15px; text-shadow: 0 1px 3px rgba(0,0,0,.7);
}

.seats { position: absolute; inset: 0; pointer-events: none; }        /* (the board under it takes taps: the rest-of-board offer) */
.seats > * { pointer-events: auto; }
.seat { position: absolute; transform: translate(-50%, -50%); width: 120px; text-align: center; transition: box-shadow .2s; }
.seat.active .seat-avatar { box-shadow: 0 0 0 3px var(--gold2), 0 0 18px rgba(var(--gold2-rgb),.45); }
.seat.me .seat-avatar { border-color: var(--gold); }
.seat.folded { opacity: .55; }
.seat.out { opacity: .35; }
.seat.winner .seat-avatar { box-shadow: 0 0 0 3px var(--gold); }
.dealer-btn {
  position: absolute; top: -8px; left: calc(50% + 14px);
  width: 20px; height: 20px; background: #fff; color: #000; border-radius: 50%;
  font-size: 11px; font-weight: 800; display: flex; align-items: center; justify-content: center; z-index: 2;
}
.seat-avatar {
  width: 44px; height: 44px; margin: 0 auto; border-radius: 50%;
  background: var(--panel2); border: 2px solid var(--border);
  display: flex; align-items: center; justify-content: center; font-size: 22px;
}
.seat-name { font-size: 12px; font-weight: 600; margin-top: 3px; text-shadow: 0 1px 2px rgba(0,0,0,.7); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.seat-chips { color: var(--gold2); font-size: 12px; font-weight: 700; }
.seat-bet { display: inline-block; margin-top: 2px; padding: 1px 8px; background: rgba(0,0,0,.55); border-radius: 10px; font-size: 12px; color: #fff; }
.seat-status { color: #ffd; font-size: 11px; font-weight: 700; margin-top: 2px; }
.seat-clock { color: var(--gold2); font-size: 11px; font-weight: 800; }
.seat-cards { display: flex; gap: 2px; justify-content: center; margin-top: 4px; }
.seat-cards.small .card { width: 26px; height: 36px; padding: 2px 3px; }
.seat-cards.small .card .rank { font-size: 13px; }
.seat-cards.small .card .suit { font-size: 13px; }
.blind-tag { color: var(--gold2); font-size: 10px; }
.bot-tag { color: var(--muted); font-size: 9px; font-weight: 600; border: 1px solid var(--border); border-radius: 6px; padding: 0 3px; }

/* cards */
.card {
  position: relative; width: 44px; height: 62px; background: #fbfaf6; color: #111;
  border-radius: 6px; font-weight: 800; display: inline-flex; flex-direction: column;
  padding: 3px 5px; box-shadow: 0 2px 5px rgba(0,0,0,.4); user-select: none; flex: none;
}
.card .rank { font-size: 18px; line-height: 1; }
.card .suit { font-size: 20px; line-height: 1; margin-top: auto; }
.card.red { color: #c8202f; }
.card.back { background: repeating-linear-gradient(45deg, var(--back-a), var(--back-a) 4px, var(--back-b) 4px, var(--back-b) 8px); border: 2px solid var(--back-edge); }

.my-area { display: flex; gap: 18px; align-items: center; justify-content: center; margin-top: 16px; flex-wrap: wrap; }
.my-cards { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }
.my-cards .card { width: 58px; height: 82px; }
.my-cards .card .rank { font-size: 24px; }
.my-cards .card .suit { font-size: 26px; }
.my-cards .card.pusoy { width: 42px; height: 60px; cursor: pointer; transition: transform .1s, box-shadow .1s; }
.my-cards .card.pusoy .rank { font-size: 16px; }
.my-cards .card.pusoy .suit { font-size: 18px; }
.my-cards .card.pusoy:hover { box-shadow: 0 0 0 2px var(--accent); }
.my-cards .card.pusoy.selected { transform: translateY(-8px); box-shadow: 0 0 0 2px var(--gold), 0 4px 10px rgba(0,0,0,.5); }
.pusoy-play { display: flex; align-items: center; gap: 5px; background: rgba(0,0,0,.35); padding: 6px 10px; border-radius: 8px; font-size: 14px; color: #fff; }
.pusoy-play .card { width: 30px; height: 42px; }
.pusoy-play .card .rank { font-size: 13px; }
.pusoy-play .card .suit { font-size: 14px; }
.pusoy-play.lead { color: var(--gold2); }
.tongits-center { display: flex; gap: 16px; align-items: center; justify-content: center; }
.tongits-pile { display: flex; flex-direction: column; align-items: center; gap: 4px; font-size: 13px; color: #fff; }
.tongits-melds { margin-bottom: 8px; font-size: 13px; color: var(--muted); display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.tongits-melds .meld { display: inline-flex; gap: 2px; }
.tongits-melds .card { width: 26px; height: 36px; }
.tongits-melds .card .rank { font-size: 11px; }
.tongits-melds .card .suit { font-size: 12px; }
.tongits-hand { display: flex; gap: 5px; flex-wrap: wrap; }
.ofc-hand { display: flex; gap: 5px; flex-wrap: wrap; align-items: center; }
.ofc-label { color: var(--muted); font-size: 13px; margin-right: 6px; }
.card.ofc { width: 38px; height: 54px; cursor: pointer; }
.card.ofc .rank { font-size: 14px; }
.card.ofc .suit { font-size: 16px; }
.ofc-rows { display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.ofc-row { display: flex; align-items: center; gap: 6px; }
.ofc-row-cards { display: inline-flex; gap: 4px; }
.ofc-bot { margin-top: 12px; color: var(--muted); font-size: 12px; }
.stud-board { color: var(--muted); font-size: 14px; }
.stud-my { display: flex; gap: 4px; align-items: center; flex-wrap: wrap; }
.stud-label { color: var(--muted); font-size: 12px; margin: 0 4px 0 8px; }
.stud-result { margin-top: 4px; font-size: 13px; color: #fff; }

.action-bar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; justify-content: center; min-height: 44px; }
.action-bar .waiting { color: var(--muted); }
.action-bar .btn { min-width: 84px; }
.action-bar .raise-open { display: none; }
.action-bar .ss-ask { flex: 1 0 100%; text-align: center; color: var(--gold2); font-weight: 700; }
.result-line { color: var(--gold2); font-weight: 700; text-align: center; }
.turn-clock { color: var(--muted); font-weight: 700; font-variant-numeric: tabular-nums; min-width: 44px; }
.turn-clock.urgent { color: var(--danger); }
.turn-clock.bank, .seat-clock.bank { color: #7cc7ff; }
.bank-left { color: var(--muted); font-size: 12px; white-space: nowrap; }
.seat-status.tp-blind { color: #c9a2ff; }
.seat-status.tp-seen { color: var(--gold2); }
.my-cards .see-btn { align-self: center; margin-left: 8px; }
#sitout-left { font-variant-numeric: tabular-nums; }
.raise-wrap { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: center; }
.raise-wrap input[type=number] {
  width: 96px; padding: 8px; border-radius: 8px; border: 1px solid var(--border);
  background: var(--panel); color: var(--text); font-size: 15px; text-align: center;
}
.raise-wrap input[type=range] { width: 180px; accent-color: var(--gold); height: 28px; }
.raise-quick { display: flex; gap: 4px; }
.raise-quick button {
  background: var(--panel2); color: var(--muted); border: 1px solid var(--border);
  border-radius: 6px; padding: 5px 8px; font-size: 12px; cursor: pointer; font-weight: 600;
}
.raise-quick button:hover { color: #fff; }

/* ---- online hub / clubs / tournaments ---- */
.hub-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-items: start; }
.hub-col { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.panel { background: var(--panel); border: 1px solid var(--border); border-radius: 14px; padding: 16px; min-width: 0; }
.panel h3 { margin-bottom: 12px; font-size: 15px; }
.hint { color: var(--muted); font-size: 13px; margin-bottom: 10px; }
.signin-hint { background: var(--panel2); border: 1px dashed var(--border); border-radius: 10px; padding: 10px 14px; margin-bottom: 14px; color: var(--muted); }
.row { display: flex; gap: 8px; align-items: center; margin-bottom: 8px; }
.row.wrap { flex-wrap: wrap; }
.row input { flex: 1; min-width: 0; padding: 9px 10px; border-radius: 8px; border: 1px solid var(--border); background: var(--bg2); color: var(--text); font-size: 15px; }
.row input.narrow-input { flex: 0 0 96px; }
.account-form input { width: 100%; margin-bottom: 8px; padding: 10px 12px; border-radius: 8px; border: 1px solid var(--border); background: var(--bg2); color: var(--text); font-size: 15px; }
.list { display: flex; flex-direction: column; gap: 6px; }
.list-row { display: flex; justify-content: space-between; align-items: center; gap: 8px; background: var(--panel2); border-radius: 8px; padding: 8px 10px; font-size: 14px; }
.list-row > span:first-child { min-width: 0; overflow-wrap: anywhere; }
.list-row small { color: var(--muted); font-size: 12px; }
.row-actions { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; flex: none; }
.member-row { display: flex; justify-content: space-between; align-items: center; gap: 8px; background: var(--panel2); border-radius: 8px; padding: 8px 10px; font-size: 14px; text-align: left; margin-bottom: 6px; }
.member-row > span:first-child { min-width: 0; overflow-wrap: anywhere; }
.member-row small { color: var(--muted); font-size: 12px; }
.block-input { display: block; width: 100%; padding: 9px 10px; border-radius: 8px; border: 1px solid var(--border); background: var(--bg2); color: var(--text); font-size: 15px; margin-bottom: 8px; }
.notice-list { display: flex; flex-direction: column; gap: 4px; }
.notice-item { color: var(--muted); font-size: 13px; padding: 4px 0; border-bottom: 1px dashed var(--border); }
.notice-item b { color: var(--gold2); }
.giftbag-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 8px; }
.gift-tile { background: var(--panel2); border-radius: 10px; padding: 10px 8px; text-align: center; display: flex; flex-direction: column; gap: 3px; align-items: center; }
.gift-icon { font-size: 26px; line-height: 1.1; }
.gift-name { font-weight: 600; font-size: 13px; }
.gift-price { color: var(--muted); font-size: 12px; }
.gift-price b { color: var(--gold2); }
.gift-actions { display: flex; gap: 4px; margin-top: 4px; }
.chat-log { height: 180px; overflow-y: auto; background: var(--bg2); border: 1px solid var(--border); border-radius: 8px; padding: 8px; margin-bottom: 8px; display: flex; flex-direction: column; gap: 4px; }
.chat-log.small { height: 90px; }
.chat-msg { font-size: 13px; line-height: 1.4; color: var(--text); overflow-wrap: anywhere; }
.chat-msg b { color: var(--gold2); }
.table-chat { margin-top: 14px; max-width: 560px; margin-left: auto; margin-right: auto; }
.online-join { display: flex; gap: 8px; margin: 10px 0; }
.online-join input {
  flex: 1; min-width: 0; padding: 10px 12px; border-radius: 8px; border: 1px solid var(--border);
  background: var(--bg2); color: var(--text); font-size: 15px; text-transform: uppercase;
}
.online-status { color: var(--gold2); font-weight: 600; min-height: 20px; margin-bottom: 10px; }
.online-roster { display: flex; flex-wrap: wrap; gap: 8px; }
.online-roster .chip { background: var(--panel2); padding: 6px 10px; border-radius: 16px; font-size: 13px; }

/* ---- modal + toasts ---- */
.modal { position: fixed; inset: 0; background: rgba(0,0,0,.6); display: flex; align-items: center; justify-content: center; z-index: 50; padding: 16px; }
.modal-card { background: var(--bg2); border: 1px solid var(--border); border-radius: 14px; padding: 22px; width: min(420px, 100%); max-height: 85vh; overflow-y: auto; text-align: center; }
.modal-card h3 { margin-bottom: 14px; }
.modal-card input {
  width: 100%; padding: 10px 12px; border-radius: 8px; border: 1px solid var(--border);
  background: var(--panel); color: var(--text); margin-bottom: 12px; font-size: 16px;
}
.modal-card p { color: var(--muted); margin-bottom: 12px; line-height: 1.5; }
.modal-card .btn { margin-top: 4px; }
#toasts { position: fixed; left: 50%; bottom: max(18px, env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 60; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; width: min(92vw, 460px); }
.toast { background: rgba(30, 30, 36, .97); border: 1px solid var(--border); color: var(--text); border-radius: 10px; padding: 10px 14px; font-size: 14px; box-shadow: 0 8px 24px rgba(0,0,0,.45); transition: opacity .4s, transform .4s; text-align: center; }
.toast.error { border-color: #6b2a2c; color: #ffb4b6; }
.toast.out { opacity: 0; transform: translateY(6px); }

@media (max-width: 860px) {
  .hub-grid { grid-template-columns: 1fr; }
}

/* ---- phones ---- */
@media (max-width: 700px) {
  body { font-size: 14px; }
  #topbar { position: relative; flex-wrap: wrap; gap: 6px 10px; padding: 8px 12px 4px; padding-top: max(8px, env(safe-area-inset-top)); }
  .brand img { height: 20px; }
  .top-right { margin-left: auto; gap: 6px; }
  .bal { font-size: 13px; margin-right: 2px; }
  .profile-btn { padding: 5px 10px; max-width: 110px; font-size: 13px; }
  /* bottom tab bar */
  #nav { position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; gap: 0; justify-content: space-around;
    background: rgba(12, 12, 14, .97); background: color-mix(in srgb, var(--bg) 97%, transparent); border-top: 1px solid var(--border); backdrop-filter: blur(6px);
    padding: 3px 2px calc(3px + env(safe-area-inset-bottom)); }
  .nav-btn { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; align-items: center; gap: 1px; padding: 4px 2px; font-size: 10.5px; border-radius: 8px; }
  .nav-btn.active { background: transparent; }
  .nav-ic { display: block; font-size: 19px; line-height: 1.15; filter: grayscale(.6); opacity: .8; }
  .nav-btn.active .nav-ic { filter: none; opacity: 1; }
  .nav-lbl { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  body.has-nav { padding-bottom: calc(58px + env(safe-area-inset-bottom)); }
  body.has-nav .toasts, body.has-nav #toasts { bottom: calc(70px + env(safe-area-inset-bottom)); }
  /* at the table: no header, the table gets the room; my cards and the buttons stay in view */
  body.at-table #topbar { padding: 0; border: 0; min-height: 0; }
  body.at-table #topbar .brand, body.at-table #topbar .top-right { display: none; }
  body.at-table #screen-table .my-area { position: sticky; bottom: calc(58px + env(safe-area-inset-bottom)); z-index: 5;
    background: linear-gradient(to bottom, rgba(12, 12, 14, 0), var(--bg) 16px); padding-top: 12px; }
  .screen { padding: 14px 12px 32px; }
  .screen-title h2 { font-size: 19px; }
  .login-card { padding: 26px 18px; }
  .profile-stats { grid-template-columns: repeat(2, 1fr); }
  .list-row, .member-row { flex-wrap: wrap; }
  .row-actions { width: 100%; justify-content: flex-start; }

  #screen-table { padding: 6px 8px 20px; }
  .table-top { gap: 6px; flex-wrap: wrap; margin-bottom: 6px; }          /* a second row only on very narrow screens */
  .table-top .btn { padding: 6px 8px; flex: none; }
  .table-info { flex: 1 1 100%; order: 99; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; }   /* a row of its own, under the buttons */
  .table-info .po-tags { display: block; overflow: hidden; text-overflow: ellipsis; }   /* the play options: a line of their own under it */
  .table-info .po-sep { display: none; }
  .sq-badge { right: calc(50% + 10px); font-size: 11px; line-height: 16px; }
  .table-top .lbl { display: none; }
  .table-log { display: none; }
  .table-banner { font-size: 13px; padding: 6px 10px; margin-bottom: 6px; }
  .poker-table { margin-top: 12px; }
  .table-felt { aspect-ratio: 0.9; border-width: 8px; border-radius: 46% / 40%; width: 100%; max-width: 440px; }
  .board { top: 45%; gap: 3px; }
  .board .card { width: 34px; height: 48px; padding: 2px 4px; }
  .board .card .rank { font-size: 15px; }
  .board .card .suit { font-size: 15px; }
  .pot-display { top: 58%; font-size: 13px; }
  .seat { width: 78px; }
  .seat-avatar { width: 36px; height: 36px; font-size: 18px; }
  .seat-name { font-size: 11px; }
  .seat-chips, .seat-bet { font-size: 11px; }
  .seat-cards.small .card { width: 21px; height: 30px; padding: 1px 2px; }
  .seat-cards.small .card .rank, .seat-cards.small .card .suit { font-size: 11px; }
  .seat.me .seat-cards { display: none; }        /* your own cards are shown large below the table */
  .dealer-btn { width: 17px; height: 17px; font-size: 10px; left: calc(50% + 10px); }
  .my-area { margin-top: 10px; gap: 10px; }
  .my-cards .card { width: 50px; height: 70px; }
  .action-bar { gap: 8px; }
  .action-bar > .btn { flex: 1 1 28%; min-width: 0; padding: 12px 6px; font-size: 15px; }
  .action-bar .raise-open { display: block; }
  .action-bar .raise-wrap { display: none; }
  .action-bar.raising .raise-wrap { display: flex; }
  .action-bar.raising .raise-open { outline: 2px solid var(--gold2); }
  #toasts { top: calc(56px + env(safe-area-inset-top)); bottom: auto; }
  .raise-wrap { width: 100%; }
  .raise-wrap input[type=number] { flex: 1; width: auto; font-size: 16px; }
  .raise-wrap input[type=range] { flex: 1 0 100%; order: -1; }
  .raise-quick { width: 100%; }
  .raise-quick button { flex: 1; padding: 8px 4px; font-size: 13px; }
  .chat-log.small { height: 70px; }
}

@media (max-width: 380px) {
  .bal.diamonds { display: none; }
  .seat { width: 68px; }
}

/* ---- round 2: account tables, clubs, shop, admin ---- */
.mt { margin-top: 14px; }
.muted { color: var(--muted); }
.row-label { color: var(--muted); font-size: 13px; flex: none; }
.select { flex: 1; min-width: 0; padding: 9px 10px; border-radius: 8px; border: 1px solid var(--border); background: var(--bg2); color: var(--text); font-size: 15px; }
#online-create { margin-bottom: 8px; }
.needs-login { text-align: center; padding: 22px 16px; margin-bottom: 16px; }
.needs-login p { color: var(--muted); margin-bottom: 12px; }
.seg { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.seg-btn { background: var(--bg2); border: 1px solid var(--border); color: var(--muted); border-radius: 18px; padding: 7px 12px; font-size: 13px; font-weight: 700; cursor: pointer; }
.seg-btn.active { background: rgba(var(--gold-rgb), .2); border-color: var(--gold); color: var(--gold2); }
.seg-btn:disabled { opacity: .4; cursor: default; }
.acct-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; margin-bottom: 10px; }
.acct-grid div { background: var(--panel2); border-radius: 10px; padding: 8px 10px; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.acct-grid span { color: var(--muted); font-size: 12px; }
.acct-grid b { font-size: 16px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.club-code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; color: var(--gold2); letter-spacing: 1px; }
.seat.empty { opacity: .55; cursor: pointer; }
.seat.empty .seat-avatar { border-style: dashed; color: var(--muted); font-size: 20px; background: rgba(0,0,0,.25); }
.seat.empty .seat-name { color: var(--muted); }
.topup-tag { color: #4fe0a0; font-size: 11px; }
.table-top .lbl { margin-left: 4px; }
.modal-actions { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; margin-top: 6px; }
.quick-row { display: flex; gap: 6px; justify-content: center; margin-bottom: 10px; }
.modal-card input[type=range] { padding: 0; border: none; background: transparent; accent-color: var(--gold); margin-bottom: 8px; }
.modal-card .warn { color: #ffb4b6; }
.modal-card h4 { text-align: left; margin: 12px 0 8px; font-size: 14px; color: var(--gold2); }
.invite-text { width: 100%; min-height: 90px; border-radius: 8px; border: 1px solid var(--border); background: var(--panel); color: var(--text); padding: 10px; font: inherit; resize: vertical; }
.shop-gifts { max-width: 640px; }
#balances { display: flex; align-items: center; }

/* club chips: the counter, requests, statement */
.wallet-btn { display: inline-flex; align-items: center; gap: 4px; }
.wallet-btn b { font-variant-numeric: tabular-nums; }
.wallet-btn.owes b { color: #7a1416; }
.badge { display: inline-block; min-width: 18px; padding: 0 5px; margin-left: 4px; border-radius: 9px; background: var(--danger); color: #fff; font-size: 11px; font-weight: 700; line-height: 18px; text-align: center; }
.pending-bar { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin: -6px 0 14px; padding: 10px 14px; border-radius: 10px; border: 1px solid rgba(var(--gold-rgb),.45); background: rgba(var(--gold-rgb),.08); color: var(--gold2); font-weight: 600; }
.bank-grid { grid-template-columns: repeat(4, 1fr); }
.bank-grid b.neg { color: #ffb4b6; }
.bank-exchange { align-items: center; gap: 8px; margin: 0 0 10px; }
.bank-exchange .hint { flex: 1; min-width: 180px; margin: 0; text-align: left; }
.modal-card .row input.narrow-input, .modal-card input.narrow-input { flex: 0 0 110px; width: 110px; margin-bottom: 0; }
.modal-card .row input { margin-bottom: 0; }
.bank-act { text-align: left; background: var(--panel2); border: 1px solid rgba(var(--gold-rgb),.35); border-radius: 10px; padding: 10px 12px; margin-bottom: 10px; }
.bank-act .row { margin: 8px 0 0; gap: 8px; align-items: center; }
.bank-act .hint { margin: 6px 0 0; }
.bank-act .select { max-width: 220px; }
.bank-row { text-align: left; }
.bank-row small.neg, .member-row small.neg { color: #ffb4b6; }
.modal-card .bank-row .row-actions { flex-wrap: wrap; justify-content: flex-end; }
/* unions and fair play (union.js) */
.union-head { color: var(--muted); font-size: 13px; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-bottom: 10px; }
.risk-row { text-align: left; }
.risk-row.flagged { box-shadow: inset 3px 0 0 var(--danger); }
.big-count { font-size: 34px; font-weight: 800; color: var(--gold2); text-align: center; font-variant-numeric: tabular-nums; }
.table-wrap.ledger { max-height: 52vh; overflow-y: auto; }
.data-table td.note { white-space: normal; text-align: left; min-width: 140px; color: var(--muted); }
.data-totals { text-align: left; font-weight: 600; color: var(--text) !important; margin: 4px 0 8px !important; }
.gold-num { color: var(--gold2); font-weight: 700; }
.email-row { align-items: center; gap: 8px; }
.email-row .hint { margin: 0; }
.login-card .btn.login-forgot { width: auto; margin: -2px auto 6px; display: block; background: none; border: none; color: var(--muted); font-weight: 500; text-decoration: underline; text-underline-offset: 3px; padding: 4px 8px; }
.login-card .btn.login-forgot:hover { color: var(--gold2); }
#club-found .row-actions input.narrow-input { flex: 0 0 140px; width: 140px; padding: 7px 9px; border-radius: 8px; border: 1px solid var(--border); background: var(--bg2); color: var(--text); }
@media (max-width: 640px) {
  .bank-grid { grid-template-columns: repeat(2, 1fr); }
  .modal-card .bank-row { flex-direction: column; align-items: stretch; }
  .modal-card .bank-row .row-actions { justify-content: flex-start; margin-top: 6px; }
}

/* admin console */
.admin-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 20px; background: var(--bg2); border-bottom: 1px solid var(--border); flex-wrap: wrap; }
.admin-top h1 { font-size: 18px; display: flex; align-items: center; gap: 10px; }
.admin-top h1 img { height: 22px; width: auto; }
.admin-tools { margin: 0; }
#admin-app { max-width: 1100px; margin: 0 auto; min-height: 100vh; }
.admin-login { max-width: 380px; margin: 60px auto; display: flex; gap: 8px; padding: 0 16px; }
.admin-login input, .admin-filter { flex: 1; min-width: 0; padding: 10px 12px; border-radius: 8px; border: 1px solid var(--border); background: var(--panel); color: var(--text); }
#admin-panel { padding: 20px 16px; }
.admin-msg { text-align: center; color: var(--gold2); min-height: 22px; margin: 10px 16px; }
.admin-msg.error { color: #ffb4b6; }
.summary { background: var(--panel); border: 1px solid var(--border); border-radius: 10px; padding: 12px 16px; margin-bottom: 16px; font-weight: 600; font-size: 14px; display: flex; flex-direction: column; gap: 4px; }
.summary .bad { color: #ffb4b6; }
.admin-grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: 16px; margin-bottom: 16px; }
.admin-grid .list { max-height: 460px; overflow-y: auto; }
.admin-filter { width: 100%; margin-bottom: 10px; }
.admin-page .panel .row { flex-wrap: wrap; }
@media (max-width: 800px) { .admin-grid { grid-template-columns: 1fr; } }
/* terms.html / privacy.html */
.legal-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 16px; background: var(--bg2); border-bottom: 1px solid var(--border); }
.legal-home img { height: 24px; width: auto; display: block; }
.legal { max-width: 760px; margin: 0 auto; padding: 20px 16px 48px; line-height: 1.65; }
.legal h1 { font-size: 26px; margin: 8px 0 4px; color: var(--gold2); }
.legal h2 { font-size: 18px; margin: 28px 0 8px; color: var(--gold2); scroll-margin-top: 16px; }
.legal p, .legal li { color: var(--text); overflow-wrap: anywhere; }
.legal p { margin: 10px 0; }
.legal ul { padding-left: 22px; margin: 8px 0; }
.legal li { margin: 6px 0; }
.legal .updated { color: var(--muted); font-size: 14px; }
.legal-nav { margin-top: 36px; border-top: 1px solid var(--border); padding-top: 16px; }
.legal-note, .legal-links { margin: 10px 0 0; }
.legal-note a, .legal-links a { white-space: nowrap; }
.admin-health { margin-bottom: 16px; }
.admin-health #admin-health > div { margin: 5px 0; overflow-wrap: anywhere; }
.admin-health .bad { color: #ffb4b6; }
.admin-health .warn { color: #e8c37a; }
.admin-health .spark { display: block; width: 100%; height: 40px; color: var(--gold); }
@media (max-width: 700px) {
  .lang-select { max-width: 76px; padding: 5px 4px; font-size: 12px; }
  .lang-pick.compact .lang-name { display: none; }
  .lang-pick.compact .lang-btn { padding: 5px 6px; gap: 4px; }
  .acct-grid b { font-size: 15px; }
}

/* ---- round 3: club lobby ---- */
.club-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin: 6px 0 16px; }
.club-title { flex: 1; min-width: 0; display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.club-title h2 { font-size: 22px; overflow-wrap: anywhere; }
.club-link { cursor: pointer; text-decoration: underline; text-decoration-color: rgba(var(--gold2-rgb),.35); text-underline-offset: 3px; }
.ct-row .tag { margin-left: 2px; }
#club-new-table .row { flex-wrap: wrap; }
#club-new-table .select { min-width: 110px; }
@media (max-width: 700px) {
  .club-head { gap: 8px; }
  .club-title h2 { font-size: 19px; }
}

/* ---- hand history, replay, club data */
.modal-card.wide { width: min(680px, 100%); text-align: left; }
.modal-card.wide h3 { text-align: left; }
.profile-stats.small b { font-size: 17px; }
.hint.small { font-size: 12px; }
.hand-list { max-height: 420px; overflow-y: auto; }
.hand-row { cursor: pointer; }
.hand-row:hover { background: var(--panel2); }
.mini { white-space: nowrap; }
.mini.hb { margin-left: 6px; opacity: .85; }
.mc { display: inline-block; min-width: 26px; padding: 0 3px; margin-right: 2px; border-radius: 4px; background: #f4f1e6; color: #111; font-size: 12px; font-weight: 700; text-align: center; }
.mc.red { color: #c62828; }
.hand-net { font-weight: 800; font-variant-numeric: tabular-nums; white-space: nowrap; }
.hand-end { display: flex; align-items: center; gap: 4px; flex: none; }
.star-btn { background: none; border: 0; color: var(--muted); font-size: 20px; line-height: 1; padding: 6px; min-width: 34px; cursor: pointer; border-radius: 8px; }
.star-btn:hover { background: var(--bg2); }
.star-btn.on, .star-toggle.on { color: var(--gold2); }
.hand-filter { margin: 4px 0 8px; }
.rp-tools { display: flex; justify-content: center; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; }
.rp-share { border: 1px solid var(--border); border-radius: 8px; padding: 8px 10px; margin-bottom: 8px; font-size: 13px; }
.rp-share .row { gap: 6px; margin: 6px 0 2px; flex-wrap: wrap; }
.rp-share input { flex: 1 1 180px; min-width: 0; font-size: 12px; }
.rp-shared-note { text-align: center; margin: 0 0 8px; }

/* ---- career page */
#profile-stats, #profile-stats2 { cursor: pointer; }
.career-btn { width: 100%; margin: 4px 0 10px; }
.cr-tabs { justify-content: center; }
.cr-sum { margin: 6px 0 8px; }
.cr-sum b.pos, .cr-tile b.pos { color: var(--success); }
.cr-sum b.neg, .cr-tile b.neg { color: var(--danger); }
.cr-chart { position: relative; height: 150px; margin: 4px 0 10px; border-radius: 10px; background: var(--panel2); overflow: hidden; }
.cr-chart svg { width: 100%; height: 100%; display: block; }
.cr-chart .cr-line { fill: none; stroke-width: 2; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.cr-chart .cr-zero { stroke: var(--muted); stroke-dasharray: 4 4; opacity: .5; vector-effect: non-scaling-stroke; }
.cr-chart .cr-area { opacity: .15; }
.cr-chart.up .cr-line { stroke: var(--success); }
.cr-chart.up .cr-area { fill: var(--success); }
.cr-chart.down .cr-line { stroke: var(--danger); }
.cr-chart.down .cr-area { fill: var(--danger); }
.cr-chart-labels { position: absolute; inset: 4px 8px; display: flex; flex-direction: column; justify-content: space-between; align-items: flex-start; pointer-events: none; font-size: 11px; color: var(--muted); font-variant-numeric: tabular-nums; }
.cr-sessions { max-height: 320px; overflow-y: auto; }
.cr-game { font-weight: 700; margin-bottom: 8px; }
.cr-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 8px; margin-bottom: 10px; }
.cr-tile { background: var(--panel2); border-radius: 10px; padding: 8px 10px; display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.cr-tile b { font-size: 20px; font-variant-numeric: tabular-nums; }
.cr-tile span { font-weight: 700; font-size: 13px; }
.cr-tile small { color: var(--muted); font-size: 11px; line-height: 1.3; }
.cr-best { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 8px 10px; border-radius: 10px; background: var(--panel2); margin-bottom: 8px; }
.cr-best[data-cr-hand] { cursor: pointer; }
.cr-best[data-cr-hand]:hover { outline: 1px solid var(--gold); }
.cr-best .mc { font-size: 14px; min-width: 30px; }
.cr-pos td { position: relative; }
.cr-bbcell span:last-child { position: relative; }
.cr-bar { position: absolute; left: 0; top: 22%; height: 56%; border-radius: 3px; opacity: .2; }
.cr-bar.up { background: var(--success); }
.cr-bar.down { background: var(--danger); }
/* positions on an oval table: the size buttons in the middle, each position's result under its seat */
.cr-oval { position: relative; height: 380px; max-width: 420px; margin: 4px auto 12px; }
.cr-felt { position: absolute; inset: 9% 22%; border-radius: 999px; background: radial-gradient(ellipse at 50% 40%, var(--felt) 0%, var(--felt2) 100%); border: 6px solid rgba(var(--gold-rgb), .28); }
.cr-sizes { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); display: flex; flex-direction: column; gap: 8px; }
.cr-sizes .seg-btn { min-width: 86px; background: rgba(0, 0, 0, .35); border: 1px solid rgba(255, 255, 255, .14); }
.cr-sizes .seg-btn.active { background: var(--gold); color: var(--primary-ink); border-color: var(--gold); }
.cr-seat { position: absolute; transform: translate(-50%, -50%); display: flex; flex-direction: column; align-items: center; gap: 3px; width: 92px; }
.cr-chip { width: 54px; height: 54px; border-radius: 50%; background: var(--panel2); border: 2px solid var(--border); display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1.1; box-shadow: 0 2px 6px rgba(0, 0, 0, .35); }
.cr-chip b { font-size: 13px; }
.cr-chip small { font-size: 9px; color: var(--muted); max-width: 50px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cr-val { min-width: 54px; padding: 2px 8px; border-radius: 7px; text-align: center; font-weight: 700; font-size: 13px; font-variant-numeric: tabular-nums; background: var(--panel); border: 1px solid var(--border); }
.cr-val.pos { color: var(--success); border-color: var(--success); }
.cr-val.neg { color: var(--danger); border-color: var(--danger); }
.cr-val.none { color: var(--muted); }
.cr-oval.n8 .cr-chip, .cr-oval.n9 .cr-chip, .cr-oval.n10 .cr-chip { width: 48px; height: 48px; }
@media (max-width: 420px) {
  .cr-oval { height: 360px; }
  .cr-felt { inset: 10% 24%; }
  .cr-sizes .seg-btn { min-width: 72px; padding: 5px 8px; }
  .cr-chip { width: 48px; height: 48px; }
  .cr-oval.n8 .cr-chip, .cr-oval.n9 .cr-chip, .cr-oval.n10 .cr-chip { width: 44px; height: 44px; }
}
.pos { color: var(--success); }
.neg { color: var(--danger); }
.rp-sub { color: var(--muted); font-size: 12px; margin: -8px 0 10px; }
.rp-board { display: flex; align-items: center; gap: 6px; min-height: 64px; padding: 8px; border-radius: 10px; background: var(--felt2); margin-bottom: 10px; flex-wrap: wrap; }
.rp-board .card { width: 40px; height: 56px; font-size: 14px; }
.rp-pot { margin-left: auto; color: var(--gold2); font-weight: 700; }
.rp-board.flat { min-height: 0; }
.rp-seats { display: grid; gap: 6px; }
.rp-seat { display: grid; grid-template-columns: minmax(0, 1fr) auto 70px 56px; align-items: center; gap: 8px; padding: 6px 8px; border-radius: 8px; background: var(--panel2); border: 1px solid transparent; }
.rp-seat.acting { border-color: var(--gold); }
.rp-seat.folded { opacity: .45; }
.rp-seat.won { border-color: var(--success); }
.rp-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rp-cards { display: flex; gap: 3px; }
.rp-cards .card { width: 30px; height: 42px; font-size: 11px; }
.rp-stack { text-align: right; font-variant-numeric: tabular-nums; }
.rp-bet { text-align: right; color: var(--gold2); font-variant-numeric: tabular-nums; }
.rp-step { margin: 10px 0 6px; font-weight: 700; min-height: 22px; }
.rp-controls { display: flex; align-items: center; justify-content: center; gap: 8px; margin-bottom: 8px; }
.rp-controls { flex-wrap: wrap; }
.rp-fair { border: 1px solid var(--border); border-radius: 8px; padding: 8px 10px; margin-bottom: 8px; font-size: 13px; line-height: 1.5; }
.rp-fair.pass { border-color: #2e7d32; }
.rp-fair.fail { border-color: #c62828; }
.rp-fair.unconfirmed { border-color: #f9a825; }
.rp-fair .ok { color: #66bb6a; }
.rp-fair .bad { color: #ef5350; }
.rp-fair-cards { margin: 4px 0; }
.rp-fair-cards .mc { margin-bottom: 3px; }
.rp-fair-cards .mc small { font-weight: 400; opacity: .7; margin-left: 2px; }
.mc.bad { outline: 2px solid #c62828; }
.rp-count { color: var(--muted); font-variant-numeric: tabular-nums; min-width: 60px; text-align: center; }
.rp-log { max-height: 150px; overflow-y: auto; border-top: 1px solid var(--border); padding-top: 6px; font-size: 13px; }
.rp-line { padding: 3px 6px; border-radius: 6px; cursor: pointer; color: var(--muted); }
.rp-line.on { background: var(--panel2); color: var(--text); }
.table-wrap { overflow-x: auto; margin: 10px 0; }
.data-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.data-table th, .data-table td { padding: 6px 8px; border-bottom: 1px solid var(--border); text-align: right; white-space: nowrap; }
.data-table th:first-child, .data-table td:first-child { text-align: left; }
.data-table th { color: var(--muted); font-weight: 600; }
@media (max-width: 560px) {
  .rp-seat { grid-template-columns: minmax(0, 1fr) auto 58px; }
  .rp-bet { grid-column: 3; }
  .rp-board .card { width: 34px; height: 48px; }
}

/* ---- club tournaments */
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 12px; }
.panel-head h3 { margin: 0; }
.ct-tour .tag { margin-left: 2px; }
.ct-tour small { line-height: 1.5; }
.ct-clock { color: var(--gold2); font-weight: 700; white-space: nowrap; }
.ct-bar { display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: center; justify-content: center; font-size: 13px; color: var(--muted); margin: -4px 0 8px; }
.ct-bar b { color: var(--text); }
.form-grid { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 10px 12px; align-items: center; text-align: left; margin-bottom: 8px; }
.form-grid .full { grid-column: 1 / -1; }
.form-grid .seg { margin-bottom: 0; }
.form-grid .hidden { display: none; }
.modal-card .form-grid input { margin-bottom: 0; }
.modal-card .form-grid input[type=checkbox] { width: auto; margin: 0 6px 0 0; accent-color: var(--gold); }
.check-line { display: flex; align-items: center; color: var(--muted); font-size: 14px; }
.ct-detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.ct-levels { max-height: 260px; overflow-y: auto; }
.data-table.kv td:first-child { color: var(--muted); }
.data-table.kv td:last-child { text-align: left; white-space: normal; }
.data-table tr.on td { color: var(--gold2); font-weight: 700; }
.data-table tr.me td { background: rgba(var(--gold2-rgb),.08); font-weight: 700; }
.ct-names { text-align: left; font-size: 13px; }
@media (max-width: 560px) {
  .ct-detail-grid { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; gap: 6px; }
  .form-grid .row-label { margin-top: 4px; }
}

/* ---- OFC Pineapple table (online and practice) */
.poker-table.ofc-mode .table-felt { aspect-ratio: auto; border-radius: 28px; padding: 14px 10px; max-width: 900px; }
.poker-table.ofc-mode .board, .poker-table.ofc-mode .pot-display { display: none; }
.poker-table.ofc-mode .seats { position: static; }
.ofc-wrap { display: flex; flex-direction: column; gap: 12px; align-items: center; }
.ofc-opps { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; width: 100%; }
.ofc-board { background: rgba(0,0,0,.22); border: 1px solid rgba(255,255,255,.08); border-radius: 12px; padding: 8px 10px; min-width: 0; }
.ofc-board.active { box-shadow: 0 0 0 2px var(--gold2), 0 0 16px rgba(var(--gold2-rgb),.35); }
.ofc-head { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: 13px; margin-bottom: 6px; }
.ofc-name { font-weight: 700; max-width: 140px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ofc-chips { color: var(--gold2); font-weight: 700; }
.ofc-head .seat-clock { margin-left: auto; }
.ofc-row { display: flex; align-items: center; gap: 6px; margin: 3px 0; border-radius: 8px; }
.ofc-rl { width: 54px; color: var(--muted); font-size: 11px; text-align: right; flex: none; }
.ofc-cards { display: flex; gap: 3px; }
.card.ofc-c { width: 34px; height: 48px; padding: 2px 4px; }
.card.ofc-c .rank { font-size: 15px; }
.card.ofc-c .suit { font-size: 15px; }
.ofc-board.opp .card.ofc-c { width: 26px; height: 36px; padding: 1px 3px; border-radius: 4px; }
.ofc-board.opp .card.ofc-c .rank, .ofc-board.opp .card.ofc-c .suit { font-size: 12px; }
.card.ofc-c.slot { background: transparent; border: 1px dashed rgba(255,255,255,.22); box-shadow: none; }
.card.ofc-c.draft { box-shadow: 0 0 0 2px var(--gold2); cursor: pointer; }
.ofc-board.mine .ofc-row.target { cursor: pointer; }
.ofc-board.mine .ofc-row.target:hover, .ofc-board.mine .ofc-row.target:active { background: rgba(var(--gold2-rgb),.10); }
.ofc-hn { font-size: 11px; color: #ffd; white-space: nowrap; }
.ofc-hn b { color: var(--gold2); }
.ofc-res { margin-top: 6px; font-weight: 800; font-size: 13px; }
.ofc-hidden { color: var(--muted); font-size: 12px; padding: 16px 6px; text-align: center; max-width: 180px; }
.my-cards .card.ofc-c.pick { width: 52px; height: 74px; cursor: pointer; transition: transform .1s, box-shadow .1s; }
.my-cards .card.ofc-c.pick .rank { font-size: 22px; }
.my-cards .card.ofc-c.pick .suit { font-size: 22px; }
.my-cards .card.ofc-c.pick.selected { transform: translateY(-10px); box-shadow: 0 0 0 3px var(--gold2), 0 6px 12px rgba(0,0,0,.5); }
.my-cards .card.ofc-c.pick.discard { opacity: .45; }
.my-cards .card.ofc-c.mini { width: 26px; height: 36px; padding: 1px 3px; }
.my-cards .card.ofc-c.mini .rank, .my-cards .card.ofc-c.mini .suit { font-size: 12px; }
.ofc-disc { color: var(--muted); font-size: 12px; align-self: center; }
.ofc-hint { color: var(--muted); font-size: 13px; flex: 1 0 100%; text-align: center; }
.tag.danger { background: #3d1212; color: #ff9da0; }
@media (max-width: 560px) {
  .poker-table.ofc-mode .table-felt { border-width: 6px; padding: 10px 6px; }
  .ofc-rl { width: 38px; font-size: 10px; }
  .card.ofc-c { width: 30px; height: 42px; }
  .card.ofc-c .rank, .card.ofc-c .suit { font-size: 13px; }
  .ofc-board.opp { padding: 6px; }
  .ofc-board.opp .ofc-rl { display: none; }
  .ofc-board.opp .card.ofc-c { width: 21px; height: 30px; }
  .ofc-board.opp .card.ofc-c .rank, .ofc-board.opp .card.ofc-c .suit { font-size: 10px; }
  .my-cards .card.ofc-c.pick { width: 46px; height: 66px; }
}

/* ---- table options: straddle, run it twice, insurance, watchers */
.opt-row { display: flex; flex-wrap: wrap; gap: 6px 14px; margin: 2px 0 10px; }
.chk { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: 13px; cursor: pointer; user-select: none; }
.chk input { width: 16px; height: 16px; accent-color: var(--gold); margin: 0; }
/* the game settings of a table (js/gameset.js) */
.gs-box { margin: 2px 0 10px; border: 1px solid var(--border); border-radius: 10px; background: var(--bg2); }
.gs-box > summary { cursor: pointer; padding: 8px 12px; font-weight: 600; font-size: 14px; color: var(--gold2); list-style: none; }
.gs-box > summary::-webkit-details-marker { display: none; }
.gs-box > summary::before { content: '▸ '; }
.gs-box[open] > summary::before { content: '▾ '; }
.gs { padding: 2px 12px 8px; }
.gs .row { flex-wrap: wrap; gap: 6px 10px; }
.gs .select { min-width: 0; max-width: 100%; }
.gs-field { display: inline-flex; align-items: center; gap: 6px; flex: 1 1 210px; min-width: 0; }
.gs-field .row-label { display: inline-flex; align-items: center; white-space: nowrap; }
.gs-field .select { flex: 1 1 auto; }
.gs-flag { display: inline-flex; align-items: center; gap: 2px; }
@media (max-width: 420px) {                      /* a long label: its list goes on the next line, whole */
  .gs-field { flex-wrap: wrap; }
  .gs-field .select { flex: 1 1 100%; }
}
.gs .opt-row { margin-bottom: 6px; }
.gs-q { display: inline-flex; align-items: center; justify-content: center; width: 17px; height: 17px; margin-left: 2px; padding: 0; border-radius: 50%; border: 1px solid var(--border); background: transparent; color: var(--muted); font-size: 11px; line-height: 1; cursor: pointer; }
.gs-q:hover { color: var(--gold2); border-color: var(--gold); }
.gs-pw-input { width: 150px; }
.clock-tag b { font-variant-numeric: tabular-nums; }
.clock-tag b.warn { color: #ffb4b6; }
.gs-settle tr.me td { background: rgba(var(--gold-rgb), .08); }
.gs-settle th, .gs-settle td { padding: 7px 8px; }
.gs-settle td:not(:first-child), .gs-settle th:not(:first-child) { text-align: right; white-space: nowrap; }
.gs-settle td:first-child { white-space: normal; overflow-wrap: anywhere; }
.gs-settle th { white-space: normal; vertical-align: bottom; }
.gs-settle td.pos { color: var(--success); }
.gs-settle td.neg { color: var(--danger); }
/* the buy-ins waiting for my OK: a small badge under the top bar (below windows, clear of the table's buttons) */
.gs-tray { position: fixed; top: calc(env(safe-area-inset-top, 0px) + 64px); right: 8px; z-index: 45; padding: 6px 12px; border-radius: 999px; background: var(--panel); color: var(--gold2); border: 1px solid var(--gold); font-weight: 700; font-size: 14px; box-shadow: 0 4px 14px rgba(0, 0, 0, .5); cursor: pointer; }
.gs-req { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 6px 0; border-bottom: 1px solid var(--border); }
.gs-req .row-actions { display: flex; gap: 4px; flex: none; }
/* the play options (js/playopts.js) */
.gs-sub { margin: 6px 0 8px; border-top: 1px dashed var(--border); padding-top: 6px; }
.gs-sub > summary { cursor: pointer; font-weight: 600; font-size: 13px; color: var(--gold2); list-style: none; padding: 2px 0 6px; }
.gs-sub > summary::-webkit-details-marker { display: none; }
.gs-sub > summary::before { content: '▸ '; }
.gs-sub[open] > summary::before { content: '▾ '; }
.gs-num { width: 120px; }
.po-nodes { display: flex; flex-wrap: wrap; gap: 6px 12px; margin: 0 0 8px; }
.po-node { display: inline-flex; align-items: center; gap: 4px; }
.po-node .select { min-width: 0; }
.po-odds td.po-up { color: #ffb35c; font-weight: 700; }
.po-tags { white-space: nowrap; }
.po-tag { display: inline-flex; align-items: center; gap: 2px; }
.po-tag.bomb { color: #ffb35c; font-weight: 700; }
button.po-odds-btn { font: inherit; color: inherit; background: none; border: 0; border-bottom: 1px dotted currentColor; padding: 0; cursor: pointer; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
/* a seat's squids: pinned by the avatar, across from the dealer button (a long name cannot hide them) */
.sq-badge { position: absolute; top: -8px; right: calc(50% + 14px); z-index: 2; font-size: 12px; line-height: 18px; padding: 0 4px;
  background: rgba(0,0,0,.65); border: 1px solid #c86bff; border-radius: 9px; color: #fff; white-space: nowrap; }
.po-hint { white-space: pre-line; line-height: 1.5; }
.chk.disabled { opacity: .5; }
.table-prefs { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; width: 100%; }
.pref-chip { background: var(--panel2); border: 1px solid var(--border); color: var(--muted); border-radius: 16px; padding: 5px 12px; font-size: 12px; font-weight: 700; cursor: pointer; }
.pref-chip.on { background: rgba(var(--gold-rgb), .2); border-color: var(--gold); color: var(--gold2); }
.table-felt.two-boards #board { top: 30%; }
.table-felt.two-boards #board2 { top: 50%; }
.board .run-tag, .rp-board .run-tag { align-self: center; color: var(--gold2); font-size: 11px; font-weight: 800; margin-right: 2px; }
.ins-panel { display: flex; flex-direction: column; gap: 8px; align-items: center; width: 100%; }
.ins-head { color: var(--gold2); font-weight: 800; text-align: center; }
.ins-outs { display: flex; gap: 3px; flex-wrap: wrap; justify-content: center; }
.ins-outs .card { width: 24px; height: 34px; padding: 1px 3px; }
.ins-outs .card .rank, .ins-outs .card .suit { font-size: 11px; }
.ins-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; justify-content: center; }
.ins-row input[type=range] { width: 180px; accent-color: var(--gold); }
.ins-row input[type=number] { width: 96px; padding: 8px; border-radius: 8px; border: 1px solid var(--border); background: var(--panel); color: var(--text); font-size: 15px; text-align: center; }
.ins-prem { color: var(--muted); font-size: 13px; min-width: 120px; text-align: center; }
.ins-note { font-size: 12px; color: var(--muted); text-align: center; max-width: 520px; line-height: 1.4; }
.ins-note.warn { color: var(--gold2); font-weight: 700; }
.ins-table { font-size: 12px; color: var(--muted); text-align: center; }
.ins-table summary { cursor: pointer; }
.ins-table div { display: flex; flex-wrap: wrap; gap: 4px; justify-content: center; margin-top: 6px; max-width: 520px; }
.ins-table span { border: 1px solid var(--border); border-radius: 6px; padding: 2px 6px; font-variant-numeric: tabular-nums; }
.ins-table span b { color: var(--text); margin-right: 4px; }
.ins-table span.on { border-color: var(--gold); color: var(--gold2); }
.watch-tag { color: var(--muted); font-weight: 600; }
.fair-tag { color: var(--muted); font-family: ui-monospace, Menlo, Consolas, monospace; font-size: .85em; cursor: help; }
@media (max-width: 560px) {
  .table-felt.two-boards #board { top: 34%; }
  .table-felt.two-boards #board2 { top: 52%; }
  .board2 { gap: 3px; }
  .board2 .card { width: 34px; height: 48px; padding: 2px 4px; }
}

/* ---- app install and notifications (profile) */
.pwa-box { border-top: 1px solid var(--border); margin: 12px 0; padding-top: 10px; }
.pwa-box h4 { margin-bottom: 8px; }
.pwa-box .hint.small { margin: 0; }
.offline-link { color: var(--gold2); text-decoration: underline; cursor: pointer; margin-left: 6px; }

/* round 9: club running, settlements, reports */
.offer-row { margin-top: 6px; padding: 6px 8px; border: 1px dashed var(--gold, #d4af37); border-radius: 6px; font-size: 13px; }
.offer-row .btn { margin-left: 6px; }
.rp-report { border: 1px solid var(--border); border-radius: 8px; padding: 8px 10px; margin-bottom: 8px; }
.rp-report .row { margin-top: 6px; gap: 6px; }
.rp-report .select, .rp-report input { flex: 1 1 160px; min-width: 0; }
.btn.tiny { padding: 0 6px; min-height: 22px; font-size: 12px; line-height: 20px; }
.audit-list { max-height: 55vh; overflow-y: auto; border-top: 1px solid var(--border); }
.audit-row { padding: 6px 2px; border-bottom: 1px solid var(--border); font-size: 13px; line-height: 1.45; }
.audit-row small { margin-right: 6px; }
label.check { display: block; padding: 4px 0; }
tr.total td { border-top: 2px solid var(--border); }

/* ---- round 10: four-colour deck, table settings, rules, hand-strength meter, squeeze (js/tablefx.js) */
.four-color .card.d { color: #2563eb; }
.four-color .card.c { color: #15803d; }
.tset-row { display: flex; align-items: flex-start; gap: 10px; padding: 10px 2px; border-bottom: 1px solid var(--border); text-align: left; }
.tset-row input { margin-top: 3px; width: 18px; height: 18px; flex: none; }
.rules-list { text-align: left; margin: 8px 0 0; padding-left: 20px; line-height: 1.55; }
.rules-list li { margin-bottom: 4px; }
.rank-list { display: flex; flex-direction: column; gap: 4px; }
.rank-row { display: flex; align-items: center; gap: 8px; background: var(--panel2); border-radius: 8px; padding: 5px 8px; }
.rank-n { width: 18px; color: var(--muted); font-size: 12px; text-align: right; flex: none; }
.rank-cards { display: flex; gap: 3px; flex: none; }
.rank-cards .card { width: 26px; height: 36px; border-radius: 4px; padding: 2px; }
.rank-cards .card .rank { font-size: 12px; }
.rank-cards .card .suit { font-size: 12px; }
.rank-name { font-weight: 600; text-align: left; min-width: 0; }
/* the meter: ten segments that light from the bottom, green at the foot to red at the top */
.strength { display: flex; flex-direction: column; align-items: center; gap: 3px; flex: none; }
.strength.hidden { display: none; }
.st-bar { display: flex; flex-direction: column; gap: 2px; padding: 3px; border-radius: 6px; background: rgba(0, 0, 0, .35); border: 1px solid var(--border); }
.st-seg { display: block; width: 14px; height: 6px; border-radius: 2px; background: rgba(255, 255, 255, .08); transition: background .25s; }
.st-seg.on:nth-child(1) { background: #ef4444; } .st-seg.on:nth-child(2) { background: #f05a37; }
.st-seg.on:nth-child(3) { background: #f2742a; } .st-seg.on:nth-child(4) { background: #f4901f; }
.st-seg.on:nth-child(5) { background: #eab308; } .st-seg.on:nth-child(6) { background: #c3c514; }
.st-seg.on:nth-child(7) { background: #93c521; } .st-seg.on:nth-child(8) { background: #5fbf3a; }
.st-seg.on:nth-child(9) { background: #35b04a; } .st-seg.on:nth-child(10) { background: #22a05a; }
.st-pct { font-size: 11px; font-weight: 700; color: var(--muted); min-height: 13px; }
.strength.busy .st-pct { opacity: .5; }
/* squeezing my cards open: the backs peel up off the faces */
.squeeze { position: relative; display: inline-block; touch-action: none; user-select: none; cursor: grab; --peel: 0; perspective: 500px; padding-bottom: 18px;
  --cw: min(58px, calc((100vw - 110px) / var(--n, 2) - 8px)); }          /* PLO5's five cards still fit a small phone */
.squeeze .sq-faces, .squeeze .sq-backs { display: flex; gap: 8px; }
.squeeze .sq-backs { position: absolute; left: 0; top: 0; transform-origin: 50% 0; transform: translateY(calc(var(--peel) * -70%)) rotateX(calc(var(--peel) * 55deg)); transition: transform .18s ease-out, opacity .18s; }
.squeeze.dragging .sq-backs { transition: none; }
.squeeze.opened .sq-backs { transform: translateY(-110%) rotateX(75deg); opacity: 0; }
.squeeze .card { width: var(--cw); height: calc(var(--cw) * 1.41); }
.squeeze .sq-faces .card .rank { font-size: calc(var(--cw) * .41); }
.squeeze .sq-faces .card .suit { font-size: calc(var(--cw) * .45); }
.squeeze .sq-backs .card { box-shadow: 0 6px 14px rgba(0, 0, 0, .45); }
.squeeze .sq-hint { position: absolute; left: 0; right: 0; bottom: 0; font-size: 11px; color: var(--muted); text-align: center; white-space: nowrap; }

/* ---- numbers that roll (js/rollfx.js): green and a little pop going up, red going down */
.roll-up, .roll-down { transition: color .3s; }
.roll-up { color: var(--success) !important; display: inline-block; animation: roll-pop .5s ease-out; }
.roll-down { color: var(--danger) !important; }
@keyframes roll-pop { 0% { transform: scale(1); } 35% { transform: scale(1.22); } 100% { transform: scale(1); } }
@media (prefers-reduced-motion: reduce) { .roll-up { animation: none; } }

/* ---- feedback (js/feedback.js) */
.fb-textarea { width: 100%; min-height: 110px; resize: vertical; margin: 6px 0; }
.feedback input#fb-contact { width: 100%; margin-bottom: 8px; }
.fb-shots { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
.fb-shot { position: relative; width: 72px; height: 72px; border-radius: 8px; overflow: hidden; background: var(--panel2); }
.fb-shot img { width: 100%; height: 100%; object-fit: cover; display: block; }
.fb-x { position: absolute; top: 2px; right: 2px; width: 22px; height: 22px; border-radius: 50%; border: 0; background: rgba(0, 0, 0, .6); color: #fff; cursor: pointer; line-height: 22px; padding: 0; }
.fb-add { width: 72px; height: 72px; border-radius: 8px; border: 1px dashed var(--border); display: flex; align-items: center; justify-content: center; color: var(--muted); cursor: pointer; font-size: 13px; text-align: center; }
.fb-list { display: grid; gap: 8px; max-height: 320px; overflow-y: auto; }
.fb-item { background: var(--panel2); border-radius: 8px; padding: 8px 10px; font-size: 13px; }
.fb-head { margin-bottom: 4px; }
.fb-text { white-space: pre-wrap; overflow-wrap: anywhere; }
.fb-reply { margin-top: 6px; padding: 6px 8px; border-left: 3px solid var(--gold); background: var(--bg2); border-radius: 4px; white-space: pre-wrap; overflow-wrap: anywhere; }
.fb-st.replied { color: var(--success); }
.fb-st.done { color: var(--muted); }
.fb-one { margin-top: 10px; padding: 10px; border: 1px solid var(--border); border-radius: 8px; display: grid; gap: 6px; }
.fb-full { max-width: 100%; max-height: 420px; border-radius: 6px; background: var(--panel2); min-width: 60px; min-height: 60px; }
.fb-row { cursor: pointer; }

/* ---- invite friends (js/invite.js) */
.inv-code { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 6px; }
.inv-code b { font-size: 26px; letter-spacing: 4px; color: var(--gold2); font-variant-numeric: tabular-nums; }
.inv-link { gap: 6px; flex-wrap: wrap; margin: 4px 0 8px; }
.inv-link input { flex: 1 1 200px; min-width: 0; font-size: 12px; }
.inv-list { max-height: 240px; overflow-y: auto; }
.inv-st.paid { color: var(--success); }
.inv-st.none { color: var(--muted); }
.inv-club { border-top: 1px solid var(--border); padding-top: 8px; margin-top: 8px; }
#login-invite { text-transform: uppercase; letter-spacing: 2px; }
#login-invite::placeholder { text-transform: none; letter-spacing: normal; }
.cfg-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 8px 16px; }
.cfg-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 13px; }
.cfg-row input { width: 110px; }

/* ---- the 3D squeeze (js/squeeze3d.js): the table dims, the card lies on it, the finger curls it open */
.sq3d { position: fixed; inset: 0; z-index: 900; background: radial-gradient(ellipse at 50% 62%, rgba(10, 40, 26, .78), rgba(0, 0, 0, .9) 70%);
  background: radial-gradient(ellipse at 50% 62%, color-mix(in srgb, var(--felt2) 78%, transparent), rgba(0, 0, 0, .9) 70%);
  opacity: 0; transition: opacity .2s ease; touch-action: none; user-select: none; -webkit-user-select: none; }
.sq3d.in { opacity: 1; }
.sq3d-canvas { position: absolute; inset: 0; display: block; cursor: grab; touch-action: none; }
.sq3d.peeling .sq3d-canvas { cursor: grabbing; }
.sq3d-hint { position: absolute; left: 0; right: 0; bottom: calc(118px + env(safe-area-inset-bottom)); text-align: center; color: #f3e3a8; font-weight: 700;
  font-size: 15px; text-shadow: 0 1px 3px #000; pointer-events: none; transition: opacity .2s; }
.sq3d.peeling .sq3d-hint, .sq3d.opening .sq3d-hint { opacity: 0; }
.sq3d-actions { position: absolute; left: 0; right: 0; bottom: calc(40px + env(safe-area-inset-bottom)); display: flex; gap: 12px; justify-content: center; }
.sq3d-actions .btn { min-width: 120px; }
.sq3d.opening .sq3d-actions { opacity: 0; pointer-events: none; transition: opacity .2s; }
.sq3d-turn { position: absolute; top: calc(18px + env(safe-area-inset-top)); left: 50%; transform: translateX(-50%); background: rgba(var(--gold-rgb), .95);
  color: #1b1405; font-weight: 800; padding: 6px 16px; border-radius: 16px; box-shadow: 0 2px 10px rgba(0,0,0,.5); }
.squeeze.sq3-ready { cursor: pointer; }

/* ---- debug tables: the tag at the table and the note in the buy-in window (players); the admin console's panel */
.dbg-tag { color: #ffb347; }
.dbg-note { background: #3a2a10; border: 1px solid #6b4c16; color: #ffd27a; border-radius: 8px; padding: 8px 10px; font-size: 13px; }
.dbg-code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; color: var(--gold); letter-spacing: 1px; }
.list-row.dbg-on { outline: 1px solid var(--gold); }
.dbg-opts { margin: 6px 0; }
.dbg-view { margin-top: 12px; border-top: 1px solid var(--border); padding-top: 10px; }
.dbg-head { font-size: 14px; margin-bottom: 4px; }
.dbg-board, .dbg-result { margin: 6px 0; font-size: 14px; }
.dbg-seats tr.dbg-turn td { background: rgba(var(--gold-rgb), .14); }
.dbg-hole { white-space: nowrap; }
.mc.dbg-unk { background: transparent; color: var(--muted); border: 1px dashed var(--border); }
.dbg-deal { display: grid; gap: 6px; margin: 6px 0 8px; }
.dbg-seat-row { display: grid; grid-template-columns: minmax(90px, 160px) 1fr 110px; gap: 8px; align-items: center; font-size: 13px; }
.dbg-seat-row span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dbg-seat-row input { min-width: 0; padding: 7px 9px; border-radius: 8px; border: 1px solid var(--border); background: var(--bg2); color: var(--text); font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.dbg-seat-row:has(#ad-dbg-board-in), .dbg-seat-row:has(#ad-dbg-board2-in) { grid-template-columns: minmax(90px, 160px) 1fr; }
#ad-dbg-set { margin-top: 6px; }
#ad-dbg-ctl { margin-top: 10px; gap: 8px; }
.dbg-hand { background: var(--panel2); border-radius: 8px; padding: 6px 10px; margin: 6px 0; }
.dbg-hand summary { cursor: pointer; font-size: 13px; }
.dbg-acts { color: var(--muted); margin-top: 6px; line-height: 1.7; }
.dbg-act-board { white-space: nowrap; }
.num.up { color: var(--success); }
.num.down { color: var(--danger); }
@media (max-width: 560px) { .dbg-seat-row { grid-template-columns: 1fr 1fr; } .dbg-seat-row span { grid-column: 1 / -1; } }

/* ---- money.js: the USDT on-ramp (only rendered when the server has it on) ---- */
.money { max-width: 520px; }
.money h4 { margin: 14px 0 6px; }
.money input, .money select { width: 100%; margin-bottom: 8px; }
.money .money-addr { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 13px; word-break: break-all;
  padding: 10px; border-radius: 8px; background: rgba(255,255,255,.06); margin: 6px 0; user-select: all; }
.money .money-list { max-height: 220px; overflow-y: auto; }
.money .money-item { padding: 8px 0; border-bottom: 1px solid rgba(255,255,255,.08); }
.money .money-head { display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; }
.money .money-amt { margin-left: auto; color: #2e7d32; }
.money .money-sub { font-size: 12px; opacity: .75; word-break: break-all; }
.money .money-sub.small, .money .hint.small { font-size: 11px; }
.money .money-st { font-size: 12px; padding: 1px 6px; border-radius: 6px; background: rgba(255,255,255,.08); }
.money .money-st.ok { color: #2e7d32; }
.money .money-st.pending { color: #b8860b; }
.money .money-st.warn { color: #b8860b; }
.money .money-st.err { color: #c62828; }
.money .money-st.muted { opacity: .6; }
.money .err { color: #c62828; background: rgba(198,40,40,.10); padding: 8px 10px; border-radius: 8px; margin: 8px 0; }

/* money.js: the conversion preview and channel picker */
.money .money-quote { padding: 8px 10px; border-radius: 8px; background: rgba(255,255,255,.06); margin: 6px 0; }
.money .money-quote .muted { margin-left: 8px; }
.money .hint.small.ok { color: #2e7d32; }
/* ---- VIP (js/vipfx.js): tier badges, the shop's tiers, the daily check-in, the all-in win % */
.vip-badge { display: inline-flex; align-items: center; gap: 3px; padding: 1px 8px; border-radius: 999px; font-size: 12px; font-weight: 800; white-space: nowrap; }
.vip-badge.t1 { background: linear-gradient(135deg, #e6e9ee, #9aa3ad); color: #1d2228; }
.vip-badge.t2 { background: linear-gradient(135deg, #f7dc7c, #c9952b); color: #2a1c02; }
.vip-badge.t3 { background: linear-gradient(135deg, #f5d27a, #b46bff 55%, #5b2bd1); color: #fff; text-shadow: 0 1px 2px rgba(0,0,0,.4); }
.bal.vip.t1 { filter: grayscale(1) brightness(1.3); }
.bal.vip.t3 { animation: vip-glow 2.4s ease-in-out infinite; }
@keyframes vip-glow { 50% { filter: drop-shadow(0 0 6px #c79bff); } }
.shop-vip { margin-bottom: 14px; }
.vip-now { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 4px 0 10px; color: var(--muted); font-size: 13px; }
.vip-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 10px; }
.vip-card { background: var(--panel2); border: 1px solid var(--border); border-radius: 12px; padding: 12px; display: flex; flex-direction: column; gap: 8px; }
.vip-card.on { border-color: var(--gold); box-shadow: inset 0 0 0 1px var(--gold); }
.vip-card.t3 { background: linear-gradient(160deg, rgba(180, 107, 255, .14), var(--panel2) 55%); }
.vip-perks { list-style: none; display: grid; gap: 3px; font-size: 13px; }
.vip-perks li::before { content: '✓ '; color: var(--success); font-weight: 800; }
.vip-perks li.muted::before { content: '… '; color: var(--muted); }
.vip-buy { display: flex; gap: 6px; flex-wrap: wrap; margin-top: auto; }
.vip-buy .btn { flex: 1 1 0; min-width: 0; padding: 6px 4px; display: flex; flex-direction: column; align-items: center; gap: 1px; line-height: 1.2; }
.vip-buy .btn span { font-size: 12px; font-weight: 600; opacity: .9; }
.checkin { display: flex; align-items: center; gap: 10px; background: var(--panel2); border: 1px solid var(--border); border-radius: 12px; padding: 10px 12px; margin-bottom: 12px; }
.checkin .ck-ic { font-size: 20px; }
.checkin .ck-text { flex: 1; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.checkin .ck-mult { color: var(--gold2); font-weight: 800; }
.checkin.done { opacity: .75; }
.eq-badge { display: inline-block; margin-top: 3px; padding: 0 7px; border-radius: 9px; background: rgba(0,0,0,.6); color: #fff; font-size: 12px; font-weight: 800; }
.eq-badge.lead { background: var(--success); color: #04150b; }
/* the rest of the board (VIP, js/vipfx.js), in the board's place: the offer after a hand that ended early (the whole
   button where the board is empty, else a round one after the cards), then the cards that would have come */
.rb-btn { background: rgba(0,0,0,.6); border: 1px solid rgba(var(--gold-rgb), .6); color: var(--gold2); border-radius: 999px; align-self: center;
  padding: 6px 14px; font: inherit; font-size: 13px; font-weight: 700; cursor: pointer; max-width: min(300px, 70vw); line-height: 1.35; }
.rb-btn small { display: block; color: var(--muted); font-weight: 400; font-size: 11px; }
.rb-btn.mini { width: 36px; height: 36px; padding: 0; border-radius: 50%; position: relative; display: inline-flex; align-items: center; justify-content: center; font-size: 17px; }
.rb-btn.mini small { position: absolute; right: -6px; top: -7px; background: var(--gold2); color: #1a1407; border-radius: 9px; padding: 0 5px; font-size: 10px; font-weight: 800; }
.rb-btn:disabled { opacity: .55; cursor: default; }
.rb-ic { font-size: 16px; align-self: center; }
.board .rb-ic { margin: 0 -2px; }
.rb-prev { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.rb-prev .rb-cap { font-size: 12px; color: var(--gold2); background: rgba(0,0,0,.5); border-radius: 8px; padding: 1px 8px; white-space: nowrap; }
.rb-prev .rb-row { display: flex; gap: 4px; opacity: .78; }
.card.rest { box-shadow: 0 0 0 2px var(--gold2); filter: saturate(.7) brightness(.9); }
.card.was { opacity: .5; }
.seat.tap { cursor: pointer; }
/* a player's numbers (a seat tapped): a small card at the top of the table, the action buttons left free */
.ps-pop { position: fixed; top: 64px; left: 50%; transform: translateX(-50%); z-index: 40; width: min(380px, 94vw); }
.ps-card { position: relative; background: var(--panel); border: 1px solid rgba(var(--gold-rgb), .35); border-radius: 14px; padding: 12px 14px; box-shadow: 0 10px 30px rgba(0,0,0,.55); }
.ps-head { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; padding-right: 26px; }
.ps-head small { flex-basis: 100%; }
.ps-x { position: absolute; top: 6px; right: 8px; background: none; border: 0; color: var(--muted); font-size: 22px; line-height: 1; cursor: pointer; padding: 4px; }
.ps-tiles { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; margin-top: 10px; }
.ps-tiles .cr-tile { padding: 6px 2px; }
.ps-tiles .cr-tile b { font-size: 15px; }
.ps-tiles .cr-tile span { font-size: 11px; }
.vip-lock { text-align: center; padding: 18px 8px; color: var(--muted); line-height: 1.9; }
.cr-hide { display: flex; align-items: center; gap: 8px; margin: 14px 0 4px; font-size: 14px; cursor: pointer; }
.cr-hide input { width: auto; padding: 0; margin: 0; flex: none; }
.cr-hide-off { margin: 12px 0 0; }
@media (max-width: 700px) {
  .rb-btn { font-size: 12px; padding: 5px 12px; }
  .rb-btn.mini { width: 30px; height: 30px; font-size: 15px; }
  .board .rb-ic { font-size: 13px; }
  .rb-prev .rb-row .card { width: 28px; height: 40px; }
  .ps-pop { top: 56px; }
}
/* avatars (js/avatars.js): built-in drawings and players' pictures, the picker, cutting a photo, the console's list */
.av-img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; display: block; }
.av-emoji { line-height: 1; }
.seat-avatar { overflow: hidden; }
.seat-avatar .av-img { pointer-events: none; }
.av-mini { display: inline-flex; width: 22px; height: 22px; border-radius: 50%; overflow: hidden; vertical-align: middle; align-items: center; justify-content: center; }
.avatar.big { width: 72px; height: 72px; display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; overflow: hidden; flex: none; cursor: pointer; }
.ps-av { display: inline-flex; width: 40px; height: 40px; border-radius: 50%; overflow: hidden; align-items: center; justify-content: center; font-size: 22px; }
.av-pick h3 { margin-bottom: 10px; }
.av-up-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.av-file { cursor: pointer; }
.av-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(62px, 1fr)); gap: 10px; max-height: 52vh; overflow-y: auto; padding: 2px; }
.av-opt { border: 3px solid transparent; border-radius: 50%; padding: 2px; background: none; cursor: pointer; aspect-ratio: 1; width: 100%; max-width: 72px; justify-self: center; }
.av-up-row .av-opt { width: 64px; }
.av-opt.on { border-color: var(--gold2); box-shadow: 0 0 10px rgba(var(--gold2-rgb), .45); }
.av-cut { text-align: center; }
.av-cut canvas { width: min(280px, 78vw, 48vh); height: auto; aspect-ratio: 1; border-radius: 12px; touch-action: none; background: #000; display: block; margin: 10px auto; cursor: grab; }
.av-cut input[type=range] { width: min(280px, 78vw); }
.av-cut canvas:focus-visible { outline: 2px solid var(--gold2); outline-offset: 2px; }
.av-cut .row { justify-content: center; margin-top: 10px; }
.av-admin { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 12px; margin-top: 8px; }
.av-card { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 8px; border-radius: 10px; background: var(--panel2); text-align: center; }
.av-card img { width: 96px; height: 96px; border-radius: 50%; object-fit: cover; background: #000; }
.av-card.wait { outline: 2px dashed var(--gold2); }
/* VIP frames (js/vipfx.js vipFrame: .vf1 silver, .vf2 gold with a gem, .vf3 royal, turning, with a crown): a ring over
   the avatar's edge; at a seat it lies on the border, the turn's glow stays outside it */
.vf1, .vf2, .vf3 { position: relative; overflow: visible; --vf-at: -3px; --vf-w: 3px; }
.seat-avatar.vf1, .seat-avatar.vf2, .seat-avatar.vf3 { --vf-at: -2px; --vf-w: 3.5px; border-color: transparent; }
.av-mini.vf1, .av-mini.vf2, .av-mini.vf3 { --vf-at: 0px; --vf-w: 2px; }   /* (inside its box: an OFC head clips what sticks out) */
.avatar.big.vf1, .avatar.big.vf2, .avatar.big.vf3 { --vf-at: -4px; --vf-w: 4px; overflow: visible; }
.vf1 .av-img, .vf2 .av-img, .vf3 .av-img { border-radius: 50%; }
.vf1::before, .vf2::before, .vf3::before {
  content: ''; position: absolute; inset: var(--vf-at); border-radius: 50%; padding: var(--vf-w); pointer-events: none; z-index: 1;
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); mask-composite: exclude;
}
.vf1::before { background: linear-gradient(135deg, #ffffff, #9aa3ad 35%, #eef1f4 55%, #7d8790 80%, #dfe3e8); }
.vf2::before { background: linear-gradient(135deg, #fff3b0, #d4a017 30%, #fff0a0 52%, #a8740c 78%, #f7d774); }
.vf3::before { background: conic-gradient(from 0deg, #f5d27a, #b46bff, #5b2bd1, #ff7ad9, #f5d27a); animation: vf-spin 4s linear infinite; }
.vf2::after { content: ''; position: absolute; left: 14.6%; top: 85.4%; width: 8px; height: 8px; transform: translate(-50%, -50%) rotate(45deg); z-index: 2; pointer-events: none;
  background: linear-gradient(135deg, #eafcff, #4fc3f7 50%, #1565c0); border: 1px solid #fff3b0; border-radius: 2px; box-shadow: 0 0 4px rgba(79,195,247,.8); }
.vf3::after { content: ''; position: absolute; left: 50%; top: 0; width: 20px; height: 14px; transform: translate(-50%, -72%); z-index: 2; pointer-events: none;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 16'%3E%3Cpath d='M2 15 L1 4 L7 8.5 L12 1 L17 8.5 L23 4 L22 15 Z' fill='%23f5c842' stroke='%237a4b00' stroke-width='1.2' stroke-linejoin='round'/%3E%3Ccircle cx='12' cy='10' r='2' fill='%23b46bff'/%3E%3Ccircle cx='5' cy='11.5' r='1.2' fill='%23ff7ad9'/%3E%3Ccircle cx='19' cy='11.5' r='1.2' fill='%23ff7ad9'/%3E%3C/svg%3E") center / contain no-repeat;
  filter: drop-shadow(0 1px 1px rgba(0,0,0,.5)); }
.av-mini.vf2::after, .av-mini.vf3::after { display: none; }
.avatar.big.vf2::after { width: 12px; height: 12px; }
.avatar.big.vf3::after { width: 30px; height: 21px; }
.seat.active .seat-avatar.vf1, .seat.active .seat-avatar.vf2, .seat.active .seat-avatar.vf3 { box-shadow: 0 0 0 5px var(--gold2), 0 0 18px rgba(var(--gold2-rgb),.45); }
@keyframes vf-spin { to { transform: rotate(360deg); } }
@media (max-width: 700px) {
  .vf3::after { width: 16px; height: 11px; }
  .vf2::after { width: 7px; height: 7px; }
}

/* emotes (js/emotes.js): the panel (the 😀 button at the top of the table), and an emote over a player's avatar for a
   moment, its parts moving */
.emote-panel { position: fixed; top: 64px; left: 50%; transform: translateX(-50%); z-index: 46; width: min(360px, 94vw); max-height: calc(100vh - 72px); max-height: calc(100dvh - 72px); overflow-y: auto;
  background: var(--panel); border: 1px solid rgba(var(--gold-rgb), .35); border-radius: 14px; padding: 10px 12px 12px; box-shadow: 0 10px 30px rgba(0,0,0,.55); }
.em-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.em-btn { position: relative; aspect-ratio: 1; width: 100%; padding: 5px; border: 1px solid transparent; border-radius: 12px; background: var(--panel2); cursor: pointer; }
.em-btn:hover, .em-btn:focus-visible { border-color: var(--gold2); }
.em-btn svg { width: 100%; height: 100%; display: block; }
.em-btn.locked svg { filter: grayscale(.85); opacity: .4; }
.em-lock { position: absolute; right: 2px; bottom: 1px; font-size: 13px; line-height: 1; }
.em-vip-h { display: flex; align-items: center; gap: 8px; margin: 12px 0 6px; font-size: 13px; color: var(--gold2); }
.em-hint { margin: 8px 2px 0; min-height: 1.2em; font-size: 13px; color: var(--gold2); }
.em-hint:empty { display: none; }
.emote-layer { position: absolute; inset: 0; pointer-events: none; z-index: 1; }   /* (over the seats, under the sticky action area on phones) */
.emote { position: absolute; width: 64px; height: 64px; transform: translate(-50%, -50%); animation: em-pop 2.6s ease both; filter: drop-shadow(0 3px 6px rgba(0,0,0,.45)); }
.emote svg { width: 100%; height: 100%; display: block; overflow: visible; }
.emote svg :where([class^="em-"], [class*=" em-"]) { transform-box: fill-box; transform-origin: center; }   /* (only the moving parts: the drawings' own transforms keep their origin; :where — a part's own pivot below wins) */
@keyframes em-pop {
  0% { transform: translate(-50%, -50%) scale(.2); opacity: 0; }
  12% { transform: translate(-50%, -50%) scale(1.15); opacity: 1; }
  20% { transform: translate(-50%, -50%) scale(1); }
  82% { transform: translate(-50%, -62%) scale(1); opacity: 1; }
  100% { transform: translate(-50%, -85%) scale(.9); opacity: 0; }
}
@keyframes em-hop { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-7%); } }
@keyframes em-shake { 0%, 100% { transform: rotate(0); } 25% { transform: rotate(-7deg); } 75% { transform: rotate(7deg); } }
@keyframes em-tremble { 0%, 100% { transform: translateX(0); } 25% { transform: translateX(-2%); } 75% { transform: translateX(2%); } }
@keyframes em-fall { 0% { transform: translateY(-20%); opacity: 0; } 25% { opacity: 1; } 100% { transform: translateY(160%); opacity: 0; } }
@keyframes em-rise { 0% { transform: translateY(25%) scale(.6); opacity: 0; } 35% { opacity: 1; } 100% { transform: translateY(-110%) scale(1.25); opacity: 0; } }
@keyframes em-blink { 0%, 100% { opacity: 0; transform: scale(.4); } 50% { opacity: 1; transform: scale(1.15); } }
@keyframes em-gasp { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.4); } }
@keyframes em-up { 0% { transform: rotate(-25deg) scale(.8); } 30% { transform: rotate(8deg) scale(1.12); } 50%, 100% { transform: rotate(0) scale(1); } }
@keyframes em-flip { 0%, 100% { transform: scaleX(1); } 50% { transform: scaleX(.15); } }
@keyframes em-flick { 0%, 100% { transform: scale(1, 1) skewX(0); } 33% { transform: scale(.96, 1.1) skewX(-5deg); } 66% { transform: scale(1.04, .93) skewX(5deg); } }
@keyframes em-clapL { 0%, 100% { transform: translateX(0) rotate(0); } 50% { transform: translateX(9%) rotate(9deg); } }
@keyframes em-clapR { 0%, 100% { transform: translateX(0) rotate(0); } 50% { transform: translateX(-9%) rotate(-9deg); } }
@keyframes em-sway { 0%, 100% { transform: rotate(-9deg); } 50% { transform: rotate(9deg); } }
@keyframes em-launch { 0% { transform: translate(0, 0); } 35% { transform: translate(2%, -3%); } 100% { transform: translate(30%, -45%); } }
@keyframes em-cork { 0%, 38% { transform: translate(0, 0) rotate(0); opacity: 1; } 70% { transform: translate(60%, -260%) rotate(200deg); opacity: 1; } 100% { transform: translate(90%, -420%) rotate(340deg); opacity: 0; } }
@keyframes em-foam { 0%, 40% { transform: scale(0); opacity: 0; } 55% { transform: scale(1.15); opacity: 1; } 100% { transform: scale(1); opacity: 1; } }
@keyframes em-burst { 0% { transform: scale(.1); opacity: 0; } 20% { opacity: 1; } 70% { transform: scale(1.1); opacity: 1; } 100% { transform: scale(1.3); opacity: 0; } }
@keyframes em-wave { 0%, 100% { transform: rotate(-14deg); } 50% { transform: rotate(14deg); } }
@keyframes em-wad { 0%, 100% { transform: translateY(0) rotate(0); } 50% { transform: translateY(-9%) rotate(-5deg); } }
.emote.em-smile svg { animation: em-hop .7s ease-in-out infinite; }
.emote.em-laugh svg { animation: em-shake .3s linear infinite; }
.emote .em-tear { animation: em-blink .6s ease-in-out infinite; }
.emote .em-drip { animation: em-fall 1s ease-in infinite; }
.emote.em-angry svg { animation: em-tremble .14s linear infinite; }
.emote .em-steam { animation: em-rise 1s ease-out infinite; }
.emote .em-glint { animation: em-blink 1.2s ease-in-out infinite; }
.emote .em-dots { animation: em-blink 1s ease-in-out infinite; }
.emote .em-mouth { animation: em-gasp .8s ease-in-out infinite; }
.emote .em-thumb { animation: em-up 1.2s ease-out infinite; transform-origin: 50% 90%; }
.emote .em-bills { animation: em-wad .5s ease-in-out infinite; }
.emote .em-coin { animation: em-flip .8s linear infinite; }
.emote .em-flame { animation: em-flick .35s ease-in-out infinite; transform-origin: 50% 100%; }
.emote .em-clapL { animation: em-clapL .35s ease-in-out infinite; }
.emote .em-clapR { animation: em-clapR .35s ease-in-out infinite; }
.emote .em-spark { animation: em-blink .7s ease-in-out infinite; }
.emote .em-spark:nth-of-type(2n) { animation-delay: .35s; }
.emote .em-crown { animation: em-hop .8s ease-in-out infinite; }
.emote .em-rocket { animation: em-launch 2.4s ease-in both; }
.emote .em-exhaust { animation: em-flick .2s linear infinite; transform-origin: 50% 0; }
.emote .em-bottle { animation: em-shake .25s linear 4; }
.emote .em-cork { animation: em-cork 2.4s ease-out both; }
.emote .em-foam { animation: em-foam 2.4s ease-out both; transform-origin: 50% 100%; }
.emote .em-gem { animation: em-sway 1s ease-in-out infinite; }
.emote .em-cup { animation: em-hop .8s ease-in-out infinite; }
.emote .em-confetti { animation: em-fall 1.2s linear infinite; }
.emote .em-burst1 { animation: em-burst 1.2s ease-out infinite; }
.emote .em-burst2 { animation: em-burst 1.2s ease-out .6s infinite both; }
.emote .em-paw { animation: em-wave .6s ease-in-out infinite; transform-origin: 50% 100%; }
@media (max-width: 700px) {
  .emote { width: 52px; height: 52px; }
  .emote-panel { top: 56px; }
}
@media (prefers-reduced-motion: reduce) {
  .vf3::before { animation: none; }
  .emote { animation: em-fade 2.6s ease both; }
  .emote *, .emote svg { animation: none !important; }
}
@keyframes em-fade { 0%, 100% { opacity: 0; transform: translate(-50%, -50%); } 10%, 85% { opacity: 1; transform: translate(-50%, -50%); } }
/* multi-tabling (js/multitable.js): a row of tabs over the table — the one shown, the others behind (one where it is my
   turn lights up), and ＋ for another table; the "back to the table" pill lights up too */
.table-tabs { display: flex; gap: 6px; overflow-x: auto; margin: 0 0 8px; padding-bottom: 2px; scrollbar-width: none; }
.table-tabs::-webkit-scrollbar { display: none; }
.mt-tab { flex: 0 0 auto; display: inline-flex; flex-direction: column; align-items: flex-start; gap: 1px; min-width: 84px; max-width: 160px;
  padding: 5px 10px; border-radius: 10px; border: 1px solid var(--border); background: var(--panel2); color: var(--text); cursor: pointer; text-align: left; position: relative; }
.mt-tab.on { border-color: var(--gold); background: rgba(var(--gold-rgb), .14); }
.mt-name { font-size: 12px; font-weight: 700; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mt-row { display: flex; align-items: center; gap: 6px; min-height: 16px; }
.mt-stack { font-size: 12px; color: var(--gold2); font-weight: 700; }
.mt-turn { font-size: 11px; font-weight: 800; color: #1b1400; background: var(--gold2); border-radius: 6px; padding: 0 5px; }
.mt-tab.turn { border-color: var(--gold2); animation: mt-pulse 1s ease-in-out infinite; }
.mt-add { min-width: 40px; align-items: center; justify-content: center; font-size: 18px; font-weight: 800; color: var(--gold2); }
.table-tabs { align-items: stretch; }
.return-pill.turn { animation: mt-pulse 1s ease-in-out infinite; }
@keyframes mt-pulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(var(--gold2-rgb), .7); } 50% { box-shadow: 0 0 0 5px rgba(var(--gold2-rgb), 0); } }
@media (max-width: 700px) {
  .table-tabs { margin-bottom: 6px; }
  .mt-tab { min-width: 72px; padding: 4px 8px; }
}
@media (prefers-reduced-motion: reduce) { .mt-tab.turn, .return-pill.turn { animation: none; } }
/* (multi-tabling) phones: the tabs share the row, so every table — and one where it is my turn — is in view; the table
   creator's buy-in tray moves under them; a buy-in waiting while I play elsewhere is a small note, not a window */
@media (max-width: 700px) {
  .table-tabs { overflow-x: visible; }
  .mt-tab { flex: 1 1 0; min-width: 0; max-width: none; }
  .mt-add { flex: 0 0 36px; min-width: 36px; }
  .mt-turn { font-size: 10px; padding: 0 4px; }
}
body.at-table.mt-on .gs-tray { top: calc(env(safe-area-inset-top, 0px) + 126px); }
.bw-pill { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(76px + env(safe-area-inset-bottom)); z-index: 44; display: flex; align-items: center; gap: 8px;
  max-width: 94vw; padding: 6px 8px 6px 12px; border-radius: 999px; background: var(--panel); border: 1px solid var(--gold); color: var(--text); font-size: 13px; box-shadow: 0 4px 14px rgba(0,0,0,.5); }
.bw-pill span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.bw-pill b { color: var(--gold2); }

/* club levels (js/levels.js): the badge (colour per level, the owner may change it), the chip in the club lobby, the
   levels page and the owner's form */
.lv-badge { display: inline-block; margin-left: 4px; padding: 0 5px; border-radius: 6px; font: 700 10px/15px system-ui, sans-serif; color: #fff; vertical-align: 1px; letter-spacing: .02em; text-shadow: 0 1px 1px rgba(0, 0, 0, .35); white-space: nowrap; }
.lv-c0 { background: linear-gradient(135deg, #7d8794, #5a636e); }
.lv-c1 { background: linear-gradient(135deg, #2b9a57, #1e6f3f); }
.lv-c2 { background: linear-gradient(135deg, #1b8d8d, #136b6e); }
.lv-c3 { background: linear-gradient(135deg, #3f8ef0, #2a64c4); }
.lv-c4 { background: linear-gradient(135deg, #6464e8, #4342b8); }
.lv-c5 { background: linear-gradient(135deg, #9b5ce8, #7239c0); }
.lv-c6 { background: linear-gradient(135deg, #d24a91, #a8306d); }
.lv-c7 { background: linear-gradient(135deg, #ec5050, #bd2d2d); }
.lv-c8 { background: linear-gradient(135deg, #f39237, #d97a1e); color: #2b1600; text-shadow: none; }
.lv-c9 { background: linear-gradient(135deg, #f2cd5c, #c99a1d); color: #2b1f00; text-shadow: none; }
.seat-name .lv-badge { font-size: 9px; line-height: 13px; padding: 0 4px; margin-left: 3px; }
/* a seat's name shrinks (cut with …) so its level badge and SB / BB tags stay in view */
.seat-name:has(.sn) { display: flex; justify-content: center; align-items: center; gap: 2px; max-width: 100%; }
.seat-name .sn { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.seat-name .lv-badge, .seat-name .blind-tag { flex: none; }
.lv-chip { display: inline-flex; align-items: center; gap: 4px; margin-left: 8px; padding: 2px 8px 2px 2px; border-radius: 999px; border: 1px solid var(--line, rgba(255, 255, 255, .15)); background: rgba(255, 255, 255, .05); color: inherit; font-size: 12px; cursor: pointer; }
.lv-chip .lv-badge { margin-left: 0; }
.lv-page .lv-me { padding: 10px 12px; border-radius: 12px; background: rgba(255, 255, 255, .04); margin-bottom: 10px; }
.lv-page .lv-me-top { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.lv-page .lv-me-top .lv-badge { font-size: 13px; line-height: 20px; padding: 0 8px; margin-left: 0; }
.lv-bar { height: 8px; border-radius: 4px; background: rgba(255, 255, 255, .1); overflow: hidden; margin-bottom: 6px; }
.lv-bar i { display: block; height: 100%; background: var(--gold, #d4af37); border-radius: 4px; }
.lv-list .lv-row { align-items: center; gap: 10px; }
.lv-list .lv-row.mine { background: rgba(var(--gold-rgb, 212, 175, 55), .1); }
.lv-list .lv-gives { font-size: 12px; text-align: right; color: var(--muted, #aaa); }
.lv-edit { display: flex; flex-direction: column; gap: 8px; max-height: 60vh; overflow-y: auto; margin-bottom: 10px; }
.lv-ed-row { border: 1px solid var(--line, rgba(255, 255, 255, .15)); border-radius: 10px; padding: 6px 10px 10px; display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: flex-end; margin: 0; }
.lv-ed-row legend { padding: 0 4px; font-size: 13px; }
.lv-f { display: flex; flex-direction: column; gap: 3px; font-size: 12px; min-width: 96px; }
.lv-f > span { color: var(--muted, #aaa); }
.lv-f input[type=number] { width: 110px; }
.lv-f.check { flex-direction: row; align-items: center; min-width: 0; }

/* a table's dealer (js/dealer.js): a slim bar under the header — who deals, tip, gift; naming the dealer */
.table-dealer { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; padding: 4px 10px; font-size: 13px; border-bottom: 1px solid var(--border); background: rgba(var(--gold-rgb), .06); }
.table-dealer .dl-who { display: inline-flex; align-items: center; gap: 6px; min-width: 0; flex: 1 1 auto; }
.table-dealer .dl-who b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 12em; display: inline-block; vertical-align: bottom; }
.table-dealer .av-mini { width: 22px; height: 22px; }
.table-dealer .btn.small { padding: 3px 8px; }
.dl-presets { flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.dl-gifts { margin-top: 8px; }
button.gift-tile { border: 0; cursor: pointer; color: inherit; font: inherit; }
button.gift-tile:disabled { opacity: .5; cursor: default; }
/* ==== the 3D look (round 19, the user's pick): the page is a dark room lit from above; buttons are keys that press
   down; panels, rows and dialogs are cards raised off the page; fields are sunk into it. The table: js/table3d.js. ==== */
body {
  background:
    radial-gradient(1100px 620px at 50% -8%, rgba(255, 236, 190, .085) 0%, rgba(255, 236, 190, 0) 62%),
    radial-gradient(1400px 900px at 50% 30%, #17171d 0%, #0d0d11 58%, #060608 100%);
  background-color: #08080a;
}
/* buttons: a lit top edge and a base under them (--d deep); pressed, they sink onto it */
.btn {
  --d: 3px; --base: #0b0b0f; --hi: .13; --glow: rgba(0, 0, 0, .42);
  background: linear-gradient(180deg, #383843 0%, #25252d 100%);
  border-color: #101015;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, var(--hi)), 0 var(--d) 0 var(--base), 0 calc(var(--d) * 2) calc(var(--d) * 4) var(--glow);
  transition: transform .08s, box-shadow .08s, filter .15s;
}
.btn.small, .btn.tiny { --d: 2px; }
.btn.big { --d: 4px; }
.btn:active:not(:disabled) { transform: translateY(2px); --d: 1px; }
.btn:disabled { box-shadow: inset 0 1px 0 rgba(255, 255, 255, .06); }
.btn.primary { --base: #6a500f; --hi: .5; --glow: rgba(212, 175, 55, .22); border-color: #8b6b18;
  background: linear-gradient(180deg, #f5da7b 0%, #d8b343 52%, #b38d27 100%); }
.btn.success { --base: #0b5434; --hi: .38; border-color: #137a4c; background: linear-gradient(180deg, #55e39d 0%, #27c27b 55%, #199f63 100%); }
.btn.danger { --base: #661919; --hi: .32; border-color: #9c2a2d; background: linear-gradient(180deg, #ff7779 0%, #dd4649 55%, #b53436 100%); }
.btn.ghost { --base: rgba(0, 0, 0, .6); --hi: .07; --glow: rgba(0, 0, 0, .3); border-color: rgba(255, 255, 255, .09);
  background: linear-gradient(180deg, rgba(255, 255, 255, .075), rgba(255, 255, 255, .02)); }
.login-card .btn.login-forgot, .login-card .btn.login-forgot:active { box-shadow: none; background: none; transform: none; }
/* the segmented choices: raised pills; the chosen one pressed in and lit gold */
.seg-btn { background: linear-gradient(180deg, #2a2a33, #1b1b22); border-color: #101015;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .09), 0 2px 0 #09090c, 0 4px 8px rgba(0, 0, 0, .35); transition: transform .08s, box-shadow .08s; }
.seg-btn.active { background: linear-gradient(180deg, rgba(var(--gold-rgb), .16), rgba(var(--gold-rgb), .26)); border-color: rgba(var(--gold-rgb), .7);
  box-shadow: inset 0 2px 5px rgba(0, 0, 0, .45), 0 0 10px rgba(var(--gold-rgb), .18); transform: translateY(1px); }
/* fields sunk into the page */
.login-form input, .modal-card input:not([type=checkbox]):not([type=radio]):not([type=range]), .online-join input, select, textarea {
  box-shadow: inset 0 2px 5px rgba(0, 0, 0, .5), 0 1px 0 rgba(255, 255, 255, .05);
}
/* cards raised off the page, lit from above */
.panel, .profile-card, .shop-item, .lobby-table, .game-item, .login-card, .vip-card {
  border-color: rgba(255, 255, 255, .055);
  background: linear-gradient(180deg, #1f1f27 0%, #15151b 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .075), 0 2px 4px rgba(0, 0, 0, .45), 0 14px 28px rgba(0, 0, 0, .5);
}
.vip-card { background: linear-gradient(160deg, #29252f 0%, #17151c 100%); }
.modal-card { border-color: rgba(255, 255, 255, .07); background: linear-gradient(180deg, #1d1d24 0%, #121217 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .08), 0 30px 70px rgba(0, 0, 0, .7), 0 4px 10px rgba(0, 0, 0, .5); }
.modal { background: rgba(0, 0, 0, .66); }
/* rows and tiles: a little raised; on a computer they lean toward you under the pointer */
.list-row, .member-row, .gift-tile {
  background: linear-gradient(180deg, #25252e 0%, #1c1c23 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .06), 0 2px 0 rgba(0, 0, 0, .5), 0 6px 12px rgba(0, 0, 0, .3);
}
/* (on a computer a row lights up under the pointer — it does not move: its buttons stay where the pointer is) */
@media (hover: hover) {
  .list-row, .member-row, .gift-tile, .shop-item, .lobby-table, .game-item, .vip-card { transition: box-shadow .18s, filter .18s; }
  .list-row:hover, .member-row:hover, .gift-tile:hover, .shop-item:hover, .lobby-table:hover, .game-item:hover, .vip-card:hover {
    filter: brightness(1.07); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .1), 0 3px 6px rgba(0, 0, 0, .45), 0 18px 34px rgba(0, 0, 0, .55);
  }
}
.tag { box-shadow: inset 0 1px 0 rgba(255, 255, 255, .06), 0 1px 2px rgba(0, 0, 0, .4); }
.toast { background: linear-gradient(180deg, rgba(40, 40, 48, .98), rgba(26, 26, 32, .98)); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .08), 0 14px 30px rgba(0, 0, 0, .55); }
/* the top bar: a raised dock; the chosen page's tab pressed in */
#topbar { box-shadow: 0 10px 24px rgba(0, 0, 0, .5), inset 0 -1px 0 rgba(255, 255, 255, .04); }
.nav-btn.active { background: linear-gradient(180deg, #30303a, #22222a); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .12), 0 2px 0 #0b0b0f, 0 5px 9px rgba(0, 0, 0, .38); }
@media (max-width: 700px) {
  #nav { box-shadow: 0 -10px 24px rgba(0, 0, 0, .55), inset 0 1px 0 rgba(255, 255, 255, .05); }
  .nav-btn.active { background: linear-gradient(180deg, rgba(var(--gold-rgb), .12), rgba(var(--gold-rgb), .04));
    box-shadow: inset 0 2px 5px rgba(0, 0, 0, .5), inset 0 -1px 0 rgba(var(--gold-rgb), .35); }
}

/* ---- the 3D table (js/table3d.js): a canvas under the HTML draws the table, the cards, the chips and the button; the
   seats, the amounts and the board's buttons stay HTML, laid where the 3D puts them ---- */
.t3-canvas, .t3-labels { position: absolute; left: 0; top: 0; width: 100%; height: 100%; pointer-events: none; display: none; }
.poker-table.t3 .t3-canvas, .poker-table.t3 .t3-labels { display: block; }
.poker-table.t3 .table-felt { background: none; border: 0; border-radius: 0; box-shadow: none; }
.poker-table.t3:not(.t3-plain) .seat-cards, .poker-table.t3:not(.t3-plain) .seat-bet, .poker-table.t3:not(.t3-plain) .dealer-btn { display: none; }
.poker-table.t3 .board { transform: translate(-50%, -50%); gap: var(--t3gap, 6px); }
.poker-table.t3:not(.t3-plain) .board .card { visibility: hidden; width: var(--t3cw, 44px); height: var(--t3ch, 62px); padding: 0; }
/* OFC, pusoy, tongits (table3d.js: T3.PLAIN): the 3D table under their own cards — OFC's boards lie on its felt */
.poker-table.t3.ofc-mode .table-felt { padding: 22px 16px; }
.poker-table.t3.ofc-mode .seats { position: relative; z-index: 1; }            /* (over the canvas, not under it) */
.poker-table.t3.ofc-mode .ofc-board { background: rgba(8, 20, 15, .55); backdrop-filter: blur(1px); }
.poker-table.t3 .pot-display { transform: translate(0, -50%); padding: 2px 10px; border-radius: 12px; background: rgba(0, 0, 0, .42);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .08); }
.poker-table.t3 .pot-display:empty { display: none; }
.poker-table.t3 .stud-board { padding: 2px 10px; border-radius: 10px; background: rgba(0, 0, 0, .5); color: var(--gold2); font-size: 12px; white-space: nowrap; }
.t3-lbl { position: absolute; transform: translate(-50%, -50%); white-space: nowrap; padding: 1px 8px; border-radius: 10px;
  background: rgba(8, 8, 12, .72); color: #fff; font-size: 12px; font-weight: 700; box-shadow: 0 2px 6px rgba(0, 0, 0, .5), inset 0 1px 0 rgba(255, 255, 255, .1); }
.t3-lbl.side { transform: translate(0, -50%); }
.t3-fx { position: absolute; inset: 0; pointer-events: none; z-index: 6; display: none; }
.poker-table.t3 .t3-fx { display: block; }
/* a winner's "+amount": rises over the seat and fades */
.t3-win { position: absolute; transform: translate(-50%, 0); white-space: nowrap; font-weight: 900; font-size: 22px; color: #ffe08a;
  text-shadow: 0 2px 0 #6b4d0e, 0 0 14px rgba(255, 196, 64, .75), 0 4px 10px rgba(0, 0, 0, .7); animation: t3-rise 2.1s cubic-bezier(.2, .8, .3, 1) forwards; }
@keyframes t3-rise { 0% { opacity: 0; transform: translate(-50%, 14px) scale(.6); } 14% { opacity: 1; transform: translate(-50%, 0) scale(1.18); }
  24% { transform: translate(-50%, -4px) scale(1); } 78% { opacity: 1; } 100% { opacity: 0; transform: translate(-50%, -34px) scale(1); } }
@property --t3-left { syntax: '<number>'; inherits: true; initial-value: 1; }
.poker-table.t3 .table-felt { transition: --t3-left .26s linear; }
/* whose turn: a ring round the avatar running down — green, then gold, then red (--t3-left from 1 to 0) */
.poker-table.t3 .seat.active::before { content: ''; position: absolute; left: 50%; top: -5px; width: 54px; height: 54px; transform: translateX(-50%);
  border-radius: 50%; pointer-events: none; z-index: 1;
  background: conic-gradient(var(--t3-ring, #3ddc84) calc(var(--t3-left, 1) * 360deg), rgba(255, 255, 255, .08) 0);
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 4px), #000 calc(100% - 3.5px));
  mask: radial-gradient(farthest-side, transparent calc(100% - 4px), #000 calc(100% - 3.5px)); filter: drop-shadow(0 0 5px var(--t3-ring, #3ddc84)); }
/* a seat: its avatar on the rail, its name and stack on a plate under it */
.poker-table.t3 .seat { width: 108px; transform: translate(-50%, -24px); }
.poker-table.t3 .seat-avatar { box-shadow: 0 0 0 2px #2a2118, 0 6px 12px rgba(0, 0, 0, .65); }
.poker-table.t3 .seat-name { margin: 4px 6px 0; padding: 1px 6px 0; border-radius: 8px 8px 0 0;
  background: linear-gradient(180deg, #33333d, #1d1d24); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .12); }
.poker-table.t3 .seat-chips { margin: 0 6px; padding: 0 6px 1px; border-radius: 0 0 8px 8px; background: #0b0b10; box-shadow: 0 6px 10px rgba(0, 0, 0, .55); }
.poker-table.t3 .seat.empty .seat-name { border-radius: 8px; }
.poker-table.t3 .seat-status { display: inline-block; margin-top: 3px; padding: 0 7px; border-radius: 8px; background: rgba(0, 0, 0, .55); }
@media (max-width: 700px) {
  .poker-table.t3 .table-felt { aspect-ratio: .8; max-width: none; }
  .poker-table.t3 .seat { width: 78px; transform: translate(-50%, -20px); }
  .poker-table.t3 .seat-name { margin: 3px 2px 0; padding: 0 3px; }
  .poker-table.t3 .seat-chips { margin: 0 2px; padding: 0 3px; }
  .t3-lbl { font-size: 11px; padding: 0 6px; }
  .poker-table.t3 .seat.active::before { width: 46px; height: 46px; }
  .t3-win { font-size: 18px; }
}

/* ---- the side bet (js/sidebet.js): a panel in a corner of the table — one bet on show (‹ › for the others), its
   multiplier, three stakes; folded away to a small button (on a phone: folded until tapped) ---- */
.poker-table { position: relative; }
.sb-panel { position: absolute; z-index: 7; width: 238px; padding: 8px 10px 9px; border-radius: 14px; font-size: 13px;
  background: linear-gradient(180deg, rgba(38, 33, 22, .95), rgba(17, 15, 11, .95)); border: 1px solid rgba(var(--gold-rgb), .35);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .08), 0 12px 26px rgba(0, 0, 0, .55); }
.sb-panel.closed { width: auto; padding: 0; background: none; border: 0; box-shadow: none; }
/* the corner (js/sidebet.js: the first where it covers no seat) */
.sb-panel, .sb-panel[data-at="br"] { right: 8px; bottom: 8px; }
.sb-panel[data-at="bl"] { right: auto; left: 8px; }
.sb-panel[data-at="tr"] { bottom: auto; top: 8px; }
.sb-panel[data-at="tl"] { right: auto; left: 8px; bottom: auto; top: 8px; }
.sb-head { display: flex; align-items: center; gap: 6px; color: var(--gold2); }
.sb-head b { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sb-hide { background: none; border: 0; color: var(--muted); font-size: 15px; line-height: 1; padding: 2px 4px; cursor: pointer; }
.sb-line { margin: 5px 0 7px; line-height: 1.35; }
.sb-line.on { color: var(--gold2); font-weight: 700; }
.sb-row { display: flex; align-items: center; gap: 4px; }
.sb-stakes { flex: 1; display: flex; gap: 4px; min-width: 0; }
.sb-nav, .sb-stake { height: 32px; border-radius: 9px; border: 0; cursor: pointer; font: inherit; font-weight: 800; color: var(--text);
  background: linear-gradient(180deg, #3a3a44, #24242c); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .14), 0 2px 0 #0b0b0f, 0 4px 8px rgba(0, 0, 0, .4); }
.sb-nav { flex: none; width: 24px; font-size: 17px; }
.sb-stake { flex: 1; min-width: 0; display: inline-flex; align-items: center; justify-content: center; gap: 4px; padding: 0 4px;
  color: var(--primary-ink); background: linear-gradient(180deg, #f5d97e, #c99a2e); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .5), 0 2px 0 #6b4f12, 0 4px 8px rgba(0, 0, 0, .4); }
.sb-nav:active, .sb-stake:active { transform: translateY(2px); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .2), 0 0 0 #0b0b0f; }
.sb-stake:disabled { opacity: .55; cursor: default; }
.sb-chip { flex: none; width: 12px; height: 12px; border-radius: 50%; background: #c0392b; border: 2px dashed #fff; box-shadow: 0 0 0 1px #7a1a12; }
.sb-res { margin-left: auto; padding: 0 7px; border-radius: 9px; font-size: 12px; font-weight: 800; color: var(--muted); background: rgba(255, 255, 255, .06); white-space: nowrap; }
.sb-res.won { color: #7be495; background: rgba(47, 191, 113, .16); }
.sb-res.back { color: var(--text); }
.sb-open { max-width: 200px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding: 6px 12px; border-radius: 16px; border: 1px solid rgba(var(--gold-rgb), .4); color: var(--gold2); font: inherit; font-weight: 700; cursor: pointer;
  background: linear-gradient(180deg, rgba(38, 33, 22, .95), rgba(17, 15, 11, .95)); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .08), 0 6px 14px rgba(0, 0, 0, .5); }
.sb-open.on { color: var(--primary-ink); background: linear-gradient(180deg, #f5d97e, #c99a2e); border-color: #f5d97e; }
/* a win: the panel lights up gold */
.sb-panel.flash { animation: sb-flash 1.4s ease-out; }
@keyframes sb-flash { 0% { box-shadow: 0 0 0 0 rgba(255, 214, 90, .95), 0 0 0 rgba(255, 196, 64, 0); border-color: #ffe08a; }
  30% { box-shadow: 0 0 0 6px rgba(255, 214, 90, .35), 0 0 34px rgba(255, 196, 64, .8); border-color: #ffe08a; }
  100% { box-shadow: inset 0 1px 0 rgba(255, 255, 255, .08), 0 12px 26px rgba(0, 0, 0, .55); } }
@media (max-width: 700px) {
  /* (a phone: the button; opened by a tap, the panel over the table where the button was) */
  .sb-panel { width: 218px; padding: 7px 8px 8px; font-size: 12px; border-radius: 12px; z-index: 9; }
  .sb-panel, .sb-panel[data-at="bl"] { right: auto; left: 4px; bottom: 4px; top: auto; }
  .sb-panel[data-at="br"] { left: auto; right: 4px; bottom: 4px; top: auto; }
  .sb-panel[data-at="tl"] { right: auto; left: 4px; bottom: auto; top: 4px; }
  .sb-panel[data-at="tr"] { left: auto; right: 4px; bottom: auto; top: 4px; }
  .sb-nav, .sb-stake { height: 30px; border-radius: 8px; }
  .sb-nav { width: 22px; }
  .sb-open { max-width: 120px; padding: 4px 10px; font-size: 12px; }
}
