:root {
  /* Solid theme colours (overridden per theme below); panels are derived as translucent glass. */
  --bg: #11132a;
  --d0: #0b0d1f;
  --p1: #1d2045;
  --p2: #252955;
  --p3: #31366c;
  --bg-deep: color-mix(in srgb, var(--d0) 78%, transparent);
  --panel: color-mix(in srgb, var(--p1) 70%, transparent);
  --panel-2: color-mix(in srgb, var(--p2) 72%, transparent);
  --panel-3: color-mix(in srgb, var(--p3) 74%, transparent);
  --solid: var(--p1);
  --line: rgba(255, 255, 255, .08);
  --hover: color-mix(in srgb, var(--p3) 70%, #fff 8%);
  --text: #ffffff;
  --muted: #a6abd3;
  --dim: #7077a6;
  --green: #2fd86b;
  --green-dark: #1fae52;
  --green-ink: #05121b;
  --blue: #3d7bff;
  --blue-dark: #2c5fe0;
  --red: #ed4163;
  --gold: #ffc700;
  --radius: 10px;
  --sidebar: 240px;
  --sidebar-mini: 64px;
  --chat: 320px;
  --top: 60px;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Rubik', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; }
input, select { font: inherit; color: var(--text); }
svg { width: 18px; height: 18px; stroke: currentColor; stroke-width: 2; fill: none; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }
.muted { color: var(--muted); }
.dim { color: var(--dim); }
.small { font-size: 12px; }
.green { color: var(--green); }
.red { color: var(--red); }
.hidden { display: none !important; }

/* ---------------------------------------------------------------- layout */
#app { display: flex; min-height: 100vh; }
#sidebar {
  width: var(--sidebar); background: var(--panel); position: sticky; top: 0; height: 100vh;
  display: flex; flex-direction: column; flex-shrink: 0; z-index: 30; transition: width .2s;
  box-shadow: 0 0 12px rgba(0,0,0,.25);
}
#main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
#view { flex: 1; width: 100%; max-width: 1200px; margin: 0 auto; padding: 24px 24px 48px; }

.sb-head { height: var(--top); display: flex; align-items: center; gap: 10px; padding: 0 12px; box-shadow: 0 4px 6px rgba(0,0,0,.2); }
.sb-tabs { display: flex; gap: 8px; flex: 1; }
.sb-tab {
  flex: 1; height: 38px; display: grid; place-items: center; border-radius: var(--radius); font-weight: 800; font-size: 13px;
  background-size: cover; background-position: center; letter-spacing: .02em;
}
.sb-tab.casino { background: linear-gradient(135deg, #1e6dd6, #0e3d8a); }
.sb-tab.donate { background: linear-gradient(135deg, #e0457b, #8a1f5c); }
.sb-nav { overflow-y: auto; padding: 14px 12px; flex: 1; }
.sb-group { background: var(--panel-2); border-radius: var(--radius); margin-bottom: 12px; overflow: hidden; }
.sb-link { display: flex; align-items: center; gap: 12px; padding: 12px 14px; font-weight: 600; color: var(--text); white-space: nowrap; }
.sb-link:hover { background: var(--panel-3); }
.sb-link.active { background: var(--panel-3); }
.sb-link svg { color: var(--muted); }
.sb-link .badge { margin-left: auto; }
.sb-sep { height: 1px; background: var(--line); margin: 0 14px; }

body.sb-collapsed #sidebar { width: var(--sidebar-mini); }
body.sb-collapsed .sb-tabs, body.sb-collapsed .sb-link span, body.sb-collapsed .sb-link .badge { display: none; }
body.sb-collapsed .sb-nav { padding: 14px 8px; }
body.sb-collapsed .sb-link { justify-content: center; padding: 12px 0; }

#topbar {
  height: var(--top); background: var(--panel); position: sticky; top: 0; z-index: 20;
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; padding: 0 24px;
  box-shadow: 0 4px 6px rgba(0,0,0,.2);
}
.logo { display: inline-flex; align-items: center; gap: 8px; font-weight: 900; font-size: 22px; letter-spacing: -.02em; font-style: italic; }
.logo.small { font-size: 16px; }
.logo-mark { width: 28px; height: 28px; }
.logo.small .logo-mark { width: 20px; height: 20px; }
.top-center { display: flex; justify-content: center; }
.top-right { display: flex; justify-content: flex-end; align-items: center; gap: 8px; }

.wallet { display: flex; align-items: stretch; height: 42px; }
.wallet-bal {
  background: var(--bg-deep); border-radius: var(--radius) 0 0 var(--radius); padding: 0 14px; display: flex; align-items: center; gap: 8px;
  font-weight: 700; min-width: 150px; justify-content: space-between; transition: color .3s;
}
.wallet-bal.up { color: var(--green); }
.wallet-bal.down { color: var(--red); }
.coin { width: 16px; height: 16px; border-radius: 50%; background: radial-gradient(circle at 35% 35%, #7dff7d, var(--green) 50%, var(--green-dark)); display: inline-grid; place-items: center; font-size: 10px; font-weight: 900; color: var(--green-ink); }
/* Only the Wallet button joins the balance box; buttons in the balance dropdown keep normal corners. */
.wallet > .btn { border-radius: 0 var(--radius) var(--radius) 0; }
.bal-menu .btn { border-radius: var(--radius); }

.icon-btn { width: 40px; height: 40px; border-radius: var(--radius); display: grid; place-items: center; color: var(--muted); }
.icon-btn:hover { color: var(--text); background: var(--panel-2); }
.icon-btn.active { color: var(--text); }

/* ---------------------------------------------------------------- buttons & inputs */
.btn {
  height: 42px; padding: 0 18px; border-radius: var(--radius); font-weight: 700; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: var(--panel-3); transition: background .15s, transform .05s, filter .15s; white-space: nowrap;
}
.btn:hover { background: var(--hover); }
.btn:active { transform: scale(.98); }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }
.btn-green { background: var(--green); color: var(--green-ink); }
.btn-green:hover { background: #1fff20; }
.btn-blue { background: var(--blue); color: #fff; }
.btn-blue:hover { background: var(--blue-dark); }
.btn-ghost { background: transparent; }
.btn-ghost:hover { background: var(--panel-2); }
.btn-lg { height: 52px; font-size: 15px; width: 100%; }
.btn-sm { height: 32px; padding: 0 12px; font-size: 12px; }
.btn-block { width: 100%; }

.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.field > label, .label { font-size: 13px; font-weight: 600; color: var(--muted); display: flex; justify-content: space-between; }
.input-wrap {
  display: flex; align-items: stretch; background: var(--panel-3); border-radius: var(--radius); padding: 2px; box-shadow: 0 1px 3px rgba(0,0,0,.2);
}
.input-wrap:focus-within { box-shadow: 0 0 0 1px var(--hover); }
.input-wrap input, .input-wrap select, .input {
  flex: 1; min-width: 0; background: var(--bg-deep); border: 2px solid var(--panel-3); border-radius: 6px; padding: 0 10px; height: 38px; outline: none; font-weight: 600;
}
.input { width: 100%; border-radius: var(--radius); height: 42px; }
.input:focus, .input-wrap input:focus { border-color: var(--hover); }
.input-wrap select { appearance: none; cursor: pointer; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 16px) 50%, calc(100% - 11px) 50%; background-size: 5px 5px; background-repeat: no-repeat; }
.input-wrap .suffix { display: flex; align-items: center; padding: 0 10px; color: var(--muted); font-weight: 700; }
.input-wrap .inner-btn { min-width: 46px; padding: 0 10px; font-weight: 700; color: var(--text); border-left: 1px solid var(--bg-deep); }
.input-wrap .inner-btn:hover { background: var(--hover); }
.input-wrap .inner-btn:last-child { border-radius: 0 6px 6px 0; }
.input-wrap input[readonly] { color: var(--muted); }
.input-prefix { position: relative; flex: 1; display: flex; }
.input-prefix input { padding-right: 30px; }
.input-prefix .coin { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); }

.seg { display: flex; background: var(--bg-deep); border-radius: 999px; padding: 4px; gap: 4px; }
.seg button { flex: 1; height: 36px; border-radius: 999px; font-weight: 700; color: var(--text); }
.seg button.active { background: var(--panel-3); }
.seg button:hover:not(.active) { background: var(--panel-2); }
.seg.sq { border-radius: var(--radius); }
.seg.sq button { border-radius: 6px; }

.badge { font-size: 11px; font-weight: 800; padding: 3px 7px; border-radius: 4px; background: var(--panel-3); color: var(--muted); }
.badge.green { background: rgba(0,231,1,.15); color: var(--green); }
.badge.blue { background: rgba(20,117,225,.2); color: #5fa8ff; }
.badge.live::before { content: ''; display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--green); margin-right: 5px; vertical-align: 1px; }

/* ---------------------------------------------------------------- lobby */
.hero { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-bottom: 28px; }
.promo {
  border-radius: 10px; padding: 22px; min-height: 180px; position: relative; overflow: hidden; display: flex; flex-direction: column; justify-content: space-between;
  box-shadow: 0 4px 12px rgba(0,0,0,.25);
}
.promo .tag { align-self: flex-start; background: rgba(255,255,255,.95); color: #0f212e; font-size: 11px; font-weight: 800; padding: 3px 8px; border-radius: 4px; text-transform: uppercase; }
.promo h3 { font-size: 20px; margin: 10px 0 4px; font-weight: 800; max-width: 70%; }
.promo p { margin: 0; color: rgba(255,255,255,.8); font-size: 13px; max-width: 65%; }
.promo .btn { align-self: flex-start; margin-top: 14px; background: rgba(255,255,255,.95); color: #0f212e; height: 36px; }
.promo .art { position: absolute; right: -10px; bottom: -10px; width: 150px; height: 150px; opacity: .9; }
.promo .art svg { width: 100%; height: 100%; stroke-width: 1.4; color: rgba(255,255,255,.75); }

.search { position: relative; margin-bottom: 18px; }
.search input { width: 100%; height: 46px; border-radius: 999px; border: 2px solid var(--panel-3); background: var(--bg-deep); padding: 0 18px 0 46px; outline: none; font-weight: 500; }
.search input:focus { border-color: var(--hover); }
.search svg { position: absolute; left: 16px; top: 14px; color: var(--muted); }

.cat-tabs { display: flex; gap: 6px; background: var(--bg-deep); padding: 6px; border-radius: 999px; overflow-x: auto; margin-bottom: 26px; scrollbar-width: none; }
.cat-tabs button { height: 40px; padding: 0 18px; border-radius: 999px; font-weight: 700; display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; }
.cat-tabs button.active { background: var(--panel-3); }
.cat-tabs button:hover:not(.active) { background: var(--panel-2); }

.section-title { display: flex; align-items: center; justify-content: space-between; margin: 0 0 14px; }
.section-title h2 { font-size: 18px; margin: 0; display: flex; align-items: center; gap: 10px; font-weight: 700; }
.section-title h2 svg { color: var(--muted); }

.game-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 14px; margin-bottom: 40px; }
.game-card {
  aspect-ratio: 3 / 4; border-radius: 10px; position: relative; overflow: hidden; display: flex; flex-direction: column; justify-content: flex-end; align-items: center;
  padding: 14px 8px; transition: transform .2s; box-shadow: 0 6px 14px rgba(0,0,0,.3); isolation: isolate;
}
.game-card:hover { transform: translateY(-6px); }
.game-card::after { content: ''; position: absolute; inset: 0; background: radial-gradient(circle at 50% 30%, rgba(255,255,255,.25), transparent 60%); z-index: -1; }
.game-card .gc-icon { position: absolute; top: 18%; left: 50%; transform: translateX(-50%); width: 62%; aspect-ratio: 1; display: grid; place-items: center; filter: drop-shadow(0 8px 10px rgba(0,0,0,.35)); }
.game-card .gc-icon svg { width: 100%; height: 100%; stroke-width: 1.6; color: #fff; }
.game-card .gc-name { font-weight: 900; font-size: 20px; text-transform: uppercase; letter-spacing: .02em; text-shadow: 0 2px 6px rgba(0,0,0,.35); text-align: center; line-height: 1; }
.game-card .gc-brand { font-size: 9px; font-weight: 800; letter-spacing: .2em; text-transform: uppercase; opacity: .8; margin-top: 6px; }
.game-card .gc-players { position: absolute; top: 8px; left: 8px; font-size: 11px; font-weight: 700; background: rgba(0,0,0,.3); border-radius: 999px; padding: 2px 8px; }

/* ---------------------------------------------------------------- tables */
.table-wrap { background: transparent; }
.tabs-row { display: flex; gap: 6px; background: var(--bg-deep); padding: 5px; border-radius: 999px; width: max-content; max-width: 100%; overflow-x: auto; margin-bottom: 12px; }
.tabs-row button { height: 36px; padding: 0 16px; border-radius: 999px; font-weight: 700; white-space: nowrap; }
.tabs-row button.active { background: var(--panel-3); }
table.bets { width: 100%; border-collapse: collapse; }
table.bets th { text-align: left; color: var(--muted); font-weight: 600; padding: 12px 14px; font-size: 13px; }
table.bets td { padding: 12px 14px; font-weight: 600; white-space: nowrap; }
table.bets tbody tr:nth-child(odd) { background: var(--panel); }
table.bets tbody tr { cursor: pointer; }
table.bets tbody tr:hover { background: var(--panel-2); }
table.bets td:first-child, table.bets th:first-child { border-radius: 6px 0 0 6px; }
table.bets td:last-child, table.bets th:last-child { border-radius: 0 6px 6px 0; text-align: right; }
table.bets th:last-child { text-align: right; }
table.bets .game-cell { display: flex; align-items: center; gap: 8px; }
table.bets .game-cell svg { color: var(--muted); }
table.bets tr.new { animation: rowIn .4s ease; }
@keyframes rowIn { from { opacity: 0; transform: translateY(-8px); } }
.amt { display: inline-flex; align-items: center; gap: 6px; }
.empty { text-align: center; color: var(--muted); padding: 40px; }

/* ---------------------------------------------------------------- game shell */
.game-shell { background: var(--panel-2); border-radius: 10px; overflow: hidden; box-shadow: 0 4px 14px rgba(0,0,0,.25); }
.game-main { display: flex; min-height: 560px; }
.controls { width: 320px; flex-shrink: 0; background: var(--panel-2); padding: 14px; display: flex; flex-direction: column; gap: 0; }
.controls .seg { margin-bottom: 14px; }
.stage { flex: 1; background: var(--bg); position: relative; display: flex; flex-direction: column; min-width: 0; overflow: hidden; border-radius: 0 10px 0 0; }
.game-foot { display: flex; align-items: center; justify-content: space-between; padding: 10px 16px; border-top: 1px solid var(--line); }
.game-foot .left { display: flex; gap: 4px; }
.game-info { margin-top: 18px; background: var(--panel); border-radius: 10px; padding: 18px 20px; display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.game-info h3 { margin: 0 0 6px; font-size: 16px; }
.game-info p { margin: 0; color: var(--muted); max-width: 640px; line-height: 1.5; }
.game-info .stats { display: flex; gap: 10px; align-items: flex-start; flex-wrap: wrap; }
.after-game { margin-top: 28px; }
.auto-grid { display: grid; grid-template-columns: 1fr; gap: 0; }
.toggle-row { display: flex; gap: 6px; }
.toggle-row .seg { flex: 0 0 auto; margin: 0; }
.toggle-row .seg button { padding: 0 10px; height: 34px; font-size: 12px; }
.toggle-row .input-wrap { flex: 1; }
.history-pills { display: flex; gap: 6px; justify-content: flex-end; padding: 14px 16px 0; min-height: 46px; overflow: hidden; }
.pill { padding: 6px 12px; border-radius: 999px; font-weight: 700; font-size: 12px; background: var(--panel-3); animation: pillIn .3s; flex-shrink: 0; }
.pill.win { background: var(--green); color: var(--green-ink); }
@keyframes pillIn { from { transform: translateX(-20px) scale(.6); opacity: 0; } }

/* dice */
.dice-stage { flex: 1; display: flex; flex-direction: column; justify-content: center; padding: 40px 50px 30px; gap: 50px; }
.dice-track-wrap { position: relative; padding: 0 0; }
.dice-scale { display: flex; justify-content: space-between; color: var(--muted); font-weight: 700; margin-bottom: 14px; padding: 0 8px; }
.dice-scale span { width: 30px; text-align: center; }
.dice-track { background: var(--panel-3); border-radius: 999px; padding: 12px; position: relative; }
.dice-bar { height: 8px; border-radius: 999px; position: relative; background: var(--red); }
.dice-bar .win-zone { position: absolute; top: 0; bottom: 0; background: var(--green); border-radius: 999px; }
.dice-bar input[type=range] { position: absolute; inset: -14px 0; width: 100%; margin: 0; opacity: 0; cursor: grab; height: 36px; }
.dice-thumb { position: absolute; top: 50%; width: 34px; height: 34px; background: var(--blue); border-radius: 6px; transform: translate(-50%, -50%); pointer-events: none; box-shadow: 0 2px 6px rgba(0,0,0,.4); display: grid; place-items: center; }
.dice-thumb::before { content: ''; width: 14px; height: 12px; background: repeating-linear-gradient(90deg, rgba(255,255,255,.6) 0 2px, transparent 2px 6px); }
.dice-result { position: absolute; bottom: 100%; margin-bottom: 18px; transform: translateX(-50%); transition: left .4s cubic-bezier(.2,.8,.2,1), opacity .2s; opacity: 0; }
.dice-result.show { opacity: 1; }
.dice-hex { width: 64px; height: 56px; display: grid; place-items: center; font-weight: 800; font-size: 15px; background: #fff; color: #0f212e; clip-path: polygon(25% 0, 75% 0, 100% 50%, 75% 100%, 25% 100%, 0 50%); }
.dice-result.win .dice-hex { color: var(--green-dark); }
.dice-result.lose .dice-hex { color: var(--red); }
.stat-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; background: var(--panel-2); padding: 16px; border-radius: var(--radius); }
.stat-row .field { margin: 0; }

/* limbo */
.limbo-stage { flex: 1; display: flex; flex-direction: column; }
.limbo-big { flex: 1; display: grid; place-items: center; font-size: clamp(60px, 10vw, 110px); font-weight: 800; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.limbo-big.win { color: var(--green); }
.limbo-big.lose { color: var(--red); }
.limbo-bottom { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; background: var(--panel-2); margin: 0 20px 20px; padding: 16px; border-radius: var(--radius); }
.limbo-bottom .field { margin: 0; }

/* mines */
.mines-stage { flex: 1; display: grid; place-items: center; padding: 24px; }
.mines-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; width: min(100%, 520px); }
.tile {
  aspect-ratio: 1; border-radius: 8px; background: var(--panel-3); box-shadow: 0 5px 0 #213743; transition: transform .12s, background .12s, box-shadow .12s;
  display: grid; place-items: center; position: relative;
}
.tile:hover:not(.revealed):not(:disabled) { background: #557086; transform: translateY(-3px); box-shadow: 0 8px 0 #213743; }
.tile:disabled { cursor: default; }
.tile.revealed { background: var(--bg-deep); box-shadow: none; transform: none; animation: flip .25s; }
.tile.dimmed { opacity: .45; }
.tile.revealed .gem, .tile.revealed .mine { display: block; }
.tile .gem, .tile .mine { display: none; width: 62%; height: 62%; }
.tile.loading { animation: pulse .5s infinite alternate; }
@keyframes flip { from { transform: scale(.85); } }
@keyframes pulse { to { background: #557086; } }
.gem svg, .mine svg { width: 100%; height: 100%; }
.cashout-pop { position: absolute; inset: 0; display: grid; place-items: center; pointer-events: none; }
.cashout-card { background: var(--panel); border: 3px solid var(--green); border-radius: 10px; padding: 18px 28px; text-align: center; animation: popIn .25s; box-shadow: 0 10px 30px rgba(0,0,0,.4); }
.cashout-card .m { font-size: 28px; font-weight: 800; color: var(--green); }
.cashout-card .p { color: var(--muted); font-weight: 700; margin-top: 6px; display: flex; gap: 6px; justify-content: center; align-items: center; }
@keyframes popIn { from { transform: scale(.7); opacity: 0; } }

/* plinko */
.plinko-stage { flex: 1; display: flex; align-items: center; justify-content: center; padding: 16px; position: relative; }
.plinko-stage canvas { width: 100%; max-width: 640px; height: auto; display: block; }
.plinko-hist { position: absolute; right: 16px; top: 50%; transform: translateY(-50%); display: flex; flex-direction: column; gap: 4px; width: 56px; }
.plinko-hist div { font-size: 11px; font-weight: 800; color: var(--green-ink); text-align: center; padding: 8px 0; border-radius: 4px; animation: pillIn .25s; }

/* crash */
.crash-stage { flex: 1; display: flex; flex-direction: column; }
.crash-canvas-wrap { flex: 1; position: relative; min-height: 380px; margin: 0 16px; }
.crash-canvas-wrap canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.crash-label { position: absolute; inset: 0; display: grid; place-items: center; pointer-events: none; text-align: center; }
.crash-label .m { font-size: clamp(48px, 8vw, 84px); font-weight: 800; font-variant-numeric: tabular-nums; }
.crash-label .sub { color: var(--muted); font-weight: 700; margin-top: 4px; }
.crash-label.crashed .m { color: var(--red); }
.crash-progress { width: 260px; height: 6px; background: var(--panel-3); border-radius: 999px; margin: 14px auto 0; overflow: hidden; }
.crash-progress div { height: 100%; background: var(--green); }
.crash-players { border-top: 1px solid var(--line); padding: 12px 16px; max-height: 170px; overflow: auto; }
.crash-players .row { display: flex; justify-content: space-between; padding: 5px 0; font-weight: 600; font-size: 13px; }
.crash-players .row .won { color: var(--green); }
.crash-hist .pill.lo { background: var(--panel-3); }
.crash-hist .pill.mid { background: #1d5fa8; }
.crash-hist .pill.hi { background: var(--green); color: var(--green-ink); }

/* blackjack */
.bj-stage { flex: 1; display: flex; flex-direction: column; justify-content: space-between; align-items: center; padding: 40px 20px; position: relative; background: radial-gradient(ellipse at 50% 40%, #12354a, var(--bg) 70%); }
.bj-hand { display: flex; flex-direction: column; align-items: center; gap: 10px; min-height: 160px; }
.bj-hands { display: flex; gap: 40px; }
.bj-hand.active .bj-cards { filter: drop-shadow(0 0 8px rgba(20,117,225,.8)); }
.bj-cards { display: flex; padding-left: 40px; }
.bj-card {
  width: 82px; height: 118px; border-radius: 8px; background: #fff; color: #0f212e; margin-left: -40px; box-shadow: 0 4px 10px rgba(0,0,0,.45);
  display: flex; flex-direction: column; justify-content: space-between; padding: 6px 8px; font-weight: 800; animation: deal .3s ease-out both; position: relative;
}
.bj-card.red { color: #e9113c; }
.bj-card .r { font-size: 24px; line-height: 1; }
.bj-card .s { font-size: 30px; align-self: flex-end; line-height: 1; }
.bj-card.back { background: repeating-linear-gradient(45deg, var(--blue) 0 6px, var(--blue-dark) 6px 12px); border: 4px solid #fff; }
.bj-card.back > * { display: none; }
@keyframes deal { from { transform: translate(140px, -160px) rotate(10deg); opacity: 0; } }
.bj-val { background: var(--panel-3); border-radius: 999px; padding: 4px 12px; font-weight: 800; font-size: 13px; }
.bj-val.win, .bj-val.blackjack { background: var(--green); color: var(--green-ink); }
.bj-val.lose, .bj-val.bust { background: var(--red); }
.bj-val.push { background: var(--gold); color: #000; }
.bj-banner { font-weight: 800; letter-spacing: .1em; color: rgba(255,255,255,.25); text-align: center; font-size: 13px; line-height: 2; }
.bj-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 14px; }
.bj-actions .btn { background: var(--panel-3); }

/* wheel */
.wheel-stage { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 24px; gap: 24px; position: relative; }
.wheel-box { position: relative; width: min(100%, 420px); aspect-ratio: 1; }
.wheel-box canvas { width: 100%; height: 100%; transition: transform 3s cubic-bezier(.12,.8,.18,1); }
.wheel-pointer { position: absolute; top: -6px; left: 50%; transform: translateX(-50%); width: 0; height: 0; border-left: 16px solid transparent; border-right: 16px solid transparent; border-top: 30px solid var(--red); filter: drop-shadow(0 3px 3px rgba(0,0,0,.4)); z-index: 2; }
.wheel-center { position: absolute; inset: 0; display: grid; place-items: center; pointer-events: none; font-size: 32px; font-weight: 800; }
.wheel-legend { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; width: 100%; }
.wheel-legend div { flex: 1; min-width: 70px; max-width: 120px; background: var(--panel-2); border-radius: 6px; padding: 10px; text-align: center; font-weight: 700; border-bottom: 4px solid; }

/* ---------------------------------------------------------------- chat */
#chat { width: var(--chat); background: var(--panel); position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; flex-shrink: 0; z-index: 25; }
#chat.closed { display: none; }
.chat-head { height: var(--top); display: flex; align-items: center; justify-content: space-between; padding: 0 12px 0 16px; box-shadow: 0 4px 6px rgba(0,0,0,.2); }
.chat-title { font-weight: 700; display: flex; align-items: center; gap: 6px; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--green); box-shadow: 0 0 6px var(--green); }
.chat-list { flex: 1; overflow-y: auto; padding: 12px; display: flex; flex-direction: column; gap: 8px; }
.chat-msg { background: var(--panel-2); border-radius: var(--radius); padding: 8px 10px; line-height: 1.4; word-wrap: break-word; }
.chat-msg b { margin-right: 6px; }
.chat-msg .t { float: right; color: var(--dim); font-size: 11px; margin-left: 6px; }
.chat-form { display: flex; gap: 8px; padding: 12px; border-top: 1px solid var(--line); }
.chat-form input { flex: 1; min-width: 0; background: var(--bg-deep); border: 2px solid var(--panel-3); border-radius: var(--radius); padding: 0 12px; outline: none; }
.chat-form .btn { height: 40px; }

/* ---------------------------------------------------------------- modal & toasts */
.modal-backdrop { position: fixed; inset: 0; background: rgba(4, 12, 18, .7); display: grid; place-items: center; z-index: 100; padding: 16px; animation: fadeIn .15s; }
.modal { background: var(--panel); border-radius: 10px; width: 100%; max-width: 480px; max-height: calc(100vh - 32px); overflow-y: auto; box-shadow: 0 20px 50px rgba(0,0,0,.5); animation: popIn .2s; }
.modal.wide { max-width: 640px; }
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 18px; font-weight: 700; font-size: 16px; }
.modal-head .title { display: flex; align-items: center; gap: 8px; }
.modal-head .title svg { color: var(--muted); }
.modal-body { padding: 0 18px 20px; }
@keyframes fadeIn { from { opacity: 0; } }
.box { background: var(--panel-2); border-radius: var(--radius); padding: 16px; margin-bottom: 14px; }
.kv { display: flex; justify-content: space-between; padding: 6px 0; gap: 12px; }
.kv span:first-child { color: var(--muted); }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; word-break: break-all; }
.copyable { cursor: copy; }

#toasts { position: fixed; top: 74px; right: 16px; z-index: 200; display: flex; flex-direction: column; gap: 8px; }
.toast { background: var(--panel-2); border-left: 4px solid var(--blue); padding: 12px 16px; border-radius: 6px; box-shadow: 0 8px 24px rgba(0,0,0,.4); font-weight: 600; animation: toastIn .25s; max-width: 340px; }
.toast.error { border-color: var(--red); }
.toast.success { border-color: var(--green); }
@keyframes toastIn { from { transform: translateX(40px); opacity: 0; } }

.user-menu { position: relative; }
.dropdown { position: absolute; right: 0; top: calc(100% + 8px); background: #fff; color: #0f212e; border-radius: 6px; min-width: 190px; padding: 6px 0; box-shadow: 0 10px 30px rgba(0,0,0,.4); z-index: 50; }
.dropdown a, .dropdown button { display: flex; align-items: center; gap: 10px; padding: 10px 16px; font-weight: 600; width: 100%; text-align: left; color: #0f212e; }
.dropdown a:hover, .dropdown button:hover { background: #e7ecf3; }
.dropdown svg { color: #2f4553; }

/* ---------------------------------------------------------------- pages */
.page-head { display: flex; align-items: center; gap: 12px; margin-bottom: 20px; }
.page-head h1 { font-size: 24px; margin: 0; }
.card { background: var(--panel); border-radius: 10px; padding: 20px; margin-bottom: 18px; }
.card h3 { margin: 0 0 12px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.stat-box { background: var(--panel-2); border-radius: var(--radius); padding: 16px; }
.stat-box .l { color: var(--muted); font-size: 12px; font-weight: 600; margin-bottom: 6px; }
.stat-box .v { font-weight: 800; font-size: 18px; display: flex; align-items: center; gap: 6px; }
.progress { height: 10px; background: var(--panel-3); border-radius: 999px; overflow: hidden; }
.progress div { height: 100%; background: linear-gradient(90deg, var(--blue), var(--green)); border-radius: 999px; transition: width .5s; }
.vip-tiers { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 14px; }
.vip-tier { border-radius: 10px; padding: 18px; background: var(--panel-2); border-top: 4px solid; }
.vip-tier.current { box-shadow: 0 0 0 2px var(--green); }
.vip-tier h4 { margin: 0 0 4px; font-size: 16px; }
.vip-tier ul { margin: 10px 0 0; padding-left: 18px; color: var(--muted); line-height: 1.7; font-size: 13px; }
.lb-rank { width: 28px; height: 28px; border-radius: 50%; display: inline-grid; place-items: center; font-weight: 800; background: var(--panel-3); font-size: 12px; }
.lb-rank.r1 { background: #ffc700; color: #000; }
.lb-rank.r2 { background: #c9d4e3; color: #000; }
.lb-rank.r3 { background: #d38c4a; color: #000; }
.prose { color: var(--muted); line-height: 1.7; }
.prose h3 { color: var(--text); }
.prose code { background: var(--bg-deep); padding: 2px 6px; border-radius: 4px; color: var(--text); }
.verify-result { background: var(--bg-deep); border-radius: var(--radius); padding: 20px; text-align: center; min-height: 80px; display: grid; place-items: center; }
.verify-result .big { font-size: 32px; font-weight: 800; }
/* Provably fair hash chains (live / multiplayer games) */
.fair-live { margin: 4px 0 14px; padding: 14px 16px 2px; border-radius: var(--radius); background: var(--panel-2); }
.fair-live .label { margin-bottom: 10px; }
.fair-live-row { display: grid; grid-template-columns: minmax(0, 160px) minmax(0, 1fr); gap: 12px; }
.fair-live textarea { resize: vertical; min-height: 72px; width: 100%; padding: 10px 12px; line-height: 1.5; }
.fair-checks { margin-top: 14px; display: grid; gap: 8px; text-align: left; }
.fair-checks .kv { padding: 0; }
.fair-check { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border-radius: 8px; line-height: 1.5; font-size: 13px; background: var(--bg-deep); }
.fair-check b { flex-shrink: 0; width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; }
.fair-check.good b { background: var(--green); color: var(--green-ink); }
.fair-check.bad b { background: var(--red); color: #fff; }
.fair-check span { min-width: 0; word-break: break-word; }
.fair-box .kv > span:first-child { flex-shrink: 0; }
.fair-box .kv > span:last-child { text-align: right; }
.fair-box .fair-note { margin: 4px 0 2px; }
.db-fair .fair-box { padding: 2px 0; margin-bottom: 4px; background: none; }
.fair-seed { display: flex; justify-content: space-between; gap: 12px; padding: 3px 0; font-size: 13px; }
.fair-seed > span:first-child { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fair-seed .mono { text-align: right; }
.fair-steps { margin: 0 0 6px; padding-left: 20px; }
.fair-steps li { margin-bottom: 8px; }
.fair-chains { display: grid; gap: 8px; }
.fair-chain { display: grid; grid-template-columns: minmax(0, 200px) minmax(0, 1fr) auto; gap: 14px; align-items: center; padding: 10px 14px; border-radius: 8px; background: var(--panel-2); }
.fair-chain b { display: block; }
.fair-chain .mono { color: var(--muted); }
.fair-chain .fc-used { text-align: right; white-space: nowrap; }
@media (max-width: 860px) {
  .fair-chain { grid-template-columns: minmax(0, 1fr) auto; }
  .fair-chain .mono { grid-column: 1 / -1; grid-row: 2; }
  .fair-live-row { grid-template-columns: minmax(0, 1fr); gap: 0; }
}
.crash-hist button.pill { border: 0; color: inherit; font: inherit; font-weight: 700; font-size: 12px; cursor: pointer; }
.crash-hist .pill.crash-fair { display: inline-flex; align-items: center; gap: 5px; background: transparent; box-shadow: inset 0 0 0 1px var(--line); color: var(--muted); }
.crash-hist .pill.crash-fair svg { width: 13px; height: 13px; }
.duel-row.done { cursor: pointer; }
.duel-row.done:hover { background: var(--panel-2); }
.mini-grid { display: grid; grid-template-columns: repeat(5, 28px); gap: 4px; justify-content: center; }
.mini-grid div { width: 28px; height: 28px; border-radius: 4px; background: var(--panel-3); }
.mini-grid div.m { background: var(--red); }
.mini-grid div.g { background: var(--green); }
.mini-cards { display: flex; gap: 6px; justify-content: center; flex-wrap: wrap; }
.mini-card { background: #fff; color: #0f212e; border-radius: 4px; padding: 4px 6px; font-weight: 800; font-size: 13px; }
.mini-card.red { color: #e9113c; }

/* ---------------------------------------------------------------- responsive */
#mobile-nav { display: none; }
@media (max-width: 1100px) {
  #chat { position: fixed; right: 0; top: 0; bottom: 0; }
  .hero { grid-template-columns: 1fr 1fr; }
  .hero .promo:nth-child(3) { display: none; }
}
@media (max-width: 860px) {
  #sidebar { position: fixed; left: 0; top: 0; bottom: 0; transform: translateX(-100%); transition: transform .2s; width: 270px; }
  body.sb-open #sidebar { transform: none; }
  body.sb-collapsed #sidebar { width: 270px; }
  body.sb-collapsed .sb-tabs, body.sb-collapsed .sb-link span, body.sb-collapsed .sb-link .badge { display: revert; }
  #topbar { padding: 0 12px; grid-template-columns: auto 1fr auto; gap: 8px; }
  #topbar .logo .wordmark { display: none; }
  .wallet-bal { min-width: 0; }
  #view { padding: 16px 12px 90px; }
  .game-main { flex-direction: column-reverse; }
  .controls { width: 100%; }
  .stage { min-height: 380px; border-radius: 10px 10px 0 0; }
  .hero { grid-template-columns: 1fr; }
  .hero .promo:nth-child(2) { display: none; }
  .grid-2 { grid-template-columns: 1fr; }
  .grid-4 { grid-template-columns: 1fr 1fr; }
  .dice-stage { padding: 30px 16px; }
  .stat-row { grid-template-columns: 1fr 1fr; }
  .stat-row .field:last-child { grid-column: span 2; }
  .limbo-bottom { grid-template-columns: 1fr; margin: 0 12px 12px; }
  .mines-grid { gap: 8px; }
  table.bets .hide-sm { display: none; }
  #chat { width: 100%; }
  .user-area-name { display: none; }
  #mobile-nav { display: flex; position: fixed; bottom: 0; left: 0; right: 0; height: 62px; background: var(--panel); z-index: 40; box-shadow: 0 -4px 10px rgba(0,0,0,.3); }
  #mobile-nav > * { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; font-size: 11px; font-weight: 600; color: var(--muted); }
  #footer { padding-bottom: 70px; }
  .bj-card { width: 64px; height: 92px; }
  .plinko-hist { display: none; }
}

#footer { background: var(--bg-deep); padding: 36px 24px 20px; margin-top: 20px; }
.footer-cols { max-width: 1200px; margin: 0 auto; display: grid; grid-template-columns: 1fr 1fr 2fr; gap: 24px; }
.footer-cols h4 { margin: 0 0 12px; }
.footer-cols a { display: block; color: var(--muted); padding: 4px 0; font-weight: 500; }
.footer-cols a:hover { color: var(--text); }
.footer-bottom { max-width: 1200px; margin: 28px auto 0; padding-top: 20px; border-top: 1px solid var(--line); display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 10px; }

/* Game layout adapts to its own width (sidebar/chat open or closed) */
.game-shell { container-type: inline-size; }
.stat-row { grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); }
@container (max-width: 780px) {
  .game-main { flex-direction: column-reverse; }
  .controls { width: 100%; }
  .stage { min-height: 420px; border-radius: 10px 10px 0 0; }
  .dice-stage { padding: 30px 16px; }
  .limbo-bottom { grid-template-columns: 1fr; }
}

/* ---------------------------------------------------------------- spacing & polish pass */
#view { padding: 32px 32px 64px; }
.field { gap: 8px; margin-bottom: 18px; }
.field > label, .label { font-size: 13px; line-height: 1.2; }
.input { flex: none; height: 48px; padding: 0 16px; border-width: 2px; }
.input-wrap { padding: 3px; }
.input-wrap input, .input-wrap select { height: 42px; padding: 0 14px; }
.input-wrap select { padding-right: 34px; }
.input-wrap .inner-btn { min-width: 50px; }
.btn { height: 44px; padding: 0 20px; }
.btn-lg { height: 54px; }
.btn-sm { height: 34px; padding: 0 14px; }

.modal { max-width: 500px; }
.modal-head { padding: 22px 24px 18px; font-size: 18px; }
.modal-head .title { gap: 12px; }
.modal-body { padding: 0 24px 26px; }
.modal-body > form > .seg, .modal-body > div > .seg { margin-bottom: 24px !important; }
.reg-note { margin: 2px 0 20px; line-height: 1.55; }
.box { padding: 18px 20px; margin-bottom: 16px; }
.box p { line-height: 1.5; }
.kv { padding: 7px 0; }

#sidebar { width: 252px; }
.sb-head { padding: 0 14px; gap: 12px; }
.sb-nav { padding: 18px 14px; }
.sb-group { margin-bottom: 14px; }
.sb-link { padding: 13px 16px; gap: 14px; }
.sb-sep { margin: 4px 16px; }
#topbar { padding: 0 28px; }
.top-right { gap: 10px; }

.controls { padding: 20px; width: 340px; }
.controls .seg { margin-bottom: 20px; }
.bj-actions { gap: 10px; margin-bottom: 18px; }
.game-foot { padding: 12px 18px; }
.game-info { margin-top: 24px; padding: 22px 26px; }
.game-info h3 { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.after-game { margin-top: 40px; }

.hero { gap: 20px; margin-bottom: 36px; }
.promo { padding: 28px; min-height: 210px; }
.promo h3 { margin: 14px 0 8px; line-height: 1.25; }
.promo p { line-height: 1.5; }
.promo .btn { margin-top: 18px; }
.search { margin-bottom: 22px; }
.cat-tabs { margin-bottom: 40px; padding: 6px; }
.cat-tabs button { padding: 0 22px; gap: 10px; }
.section-title { margin-bottom: 20px; }
.section-title h2 { gap: 12px; }
.game-grid { grid-template-columns: repeat(auto-fill, minmax(132px, 1fr)); gap: 18px; margin-bottom: 52px; }
.game-card { padding: 16px 10px 18px; border-radius: 12px; }
.game-card .gc-icon { top: 12%; width: 72%; }
.game-card .gc-icon .art { width: 100%; height: 100%; stroke: none; filter: drop-shadow(0 10px 12px rgba(0,0,0,.3)); }
.game-card .gc-players { top: 10px; left: 10px; padding: 3px 10px; }
.game-card .gc-name { font-size: 19px; }
.game-card .gc-brand { margin-top: 8px; }

.tabs-row { margin-bottom: 16px; }
table.bets th { padding: 12px 18px; }
table.bets td { padding: 15px 18px; }
.card { padding: 26px; margin-bottom: 22px; }
.card h3 { margin-bottom: 14px; }
.page-head { margin-bottom: 26px; gap: 14px; }
.grid-2 { gap: 22px; }
.grid-4 { gap: 16px; }
.stat-box { padding: 18px; }
.vip-tiers { gap: 18px; }
.chat-list { padding: 14px; gap: 10px; }
.chat-msg { padding: 10px 12px; }
.chat-form { padding: 14px; gap: 10px; }

@media (max-width: 860px) {
  #view { padding: 18px 14px 96px; }
  #sidebar, body.sb-collapsed #sidebar { width: 280px; }
  #topbar { padding: 0 14px; }
  .controls { width: 100%; }
  .game-grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 14px; }
  .promo { min-height: 180px; padding: 22px; }
}
@container (max-width: 780px) { .controls { width: 100%; } }

/* ---------------------------------------------------------------- brand */
/* Mark height ≈ 1.33× the wordmark's ascender height; both share one vertical center. */
.logo { gap: 9px; font-style: normal; line-height: 1; }
.logo-mark { width: 32px; height: 32px; stroke: none; fill: none; filter: drop-shadow(0 2px 6px rgba(0, 231, 1, .25)); transition: transform .3s; }
.logo:hover .logo-mark { transform: rotate(-30deg); }
.wordmark {
  font-weight: 900; font-style: italic; font-size: 32px; line-height: 1; letter-spacing: -.035em; color: #fff;
  padding-right: .06em; transform: translateY(1px);
}
.logo.small { gap: 7px; }
.logo.small .logo-mark { width: 22px; height: 22px; filter: none; }
.logo.small .wordmark { font-size: 22px; }
.wm-i { position: relative; }
.wm-i::after {
  content: ''; position: absolute; left: 50%; top: .17em; width: .19em; height: .19em; background: var(--green);
  transform: translateX(-75%) rotate(45deg); border-radius: 1.5px; box-shadow: 0 0 8px rgba(0, 231, 1, .6);
}

/* ---------------------------------------------------------------- focus & motion */
:focus { outline: none; }
:focus-visible { outline: 2px solid #5fa8ff; outline-offset: 2px; }
input:focus-visible, select:focus-visible { outline: none; }
/* Reduced motion (the setting, or the system preference): animations jump to their end state once.
   The iteration count matters: an endless animation with a tiny duration still ran every frame. */
.reduce-motion *, .reduce-motion *::before, .reduce-motion *::after {
  animation-duration: .001ms !important; animation-delay: 0s !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important;
}

/* ---------------------------------------------------------------- wallet */
.wallet-modal .wl-hero {
  background: radial-gradient(120% 140% at 100% 0%, rgba(0, 231, 1, .12), transparent 55%), linear-gradient(135deg, #1d3a4d, #142a39);
  border: 1px solid rgba(255, 255, 255, .06); border-radius: 12px; padding: 20px 22px; margin-bottom: 18px;
}
.wl-hero-top { display: flex; justify-content: space-between; align-items: center; }
.wl-label { font-size: 11px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .07em; }
.wl-amount { display: flex; align-items: center; gap: 10px; font-size: 34px; font-weight: 800; margin: 10px 0 18px; font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.wl-amount .coin { width: 26px; height: 26px; font-size: 14px; }
.wl-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; padding-top: 16px; border-top: 1px solid rgba(255, 255, 255, .08); }
.wl-stats div { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.wl-stats b { font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wl-tabs { margin-bottom: 18px !important; }
.wl-tabs button { display: flex; align-items: center; justify-content: center; gap: 8px; height: 40px; }
.wl-tabs button svg { width: 16px; height: 16px; color: var(--muted); }
.wl-tabs button.active svg { color: var(--text); }
.wl-tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 12px; }
.wl-tile { background: var(--panel-2); border-radius: 10px; padding: 16px; display: flex; flex-direction: column; gap: 8px; }
.wl-tile-head { display: flex; align-items: center; gap: 10px; }
.wl-ico { width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; }
.wl-ico svg { width: 16px; height: 16px; }
.wl-ico.green { background: rgba(0, 231, 1, .12); color: var(--green); }
.wl-ico.blue { background: rgba(20, 117, 225, .2); color: #5fa8ff; }
.wl-tile-val { font-size: 20px; font-weight: 800; font-variant-numeric: tabular-nums; }
.wl-tile p { margin: 0 0 6px; color: var(--muted); font-size: 12px; line-height: 1.45; flex: 1; }
.wl-tile .btn { height: 40px; }
.wallet-modal .btn:disabled { background: var(--panel-3); color: var(--dim); opacity: 1; }
.wl-vip { background: var(--panel-2); border-radius: 10px; padding: 14px 16px; }
.wl-vip-row { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; font-size: 13px; }
.wl-form .field { margin-bottom: 14px; }
.wl-chips { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-bottom: 16px; }
.wl-chips .btn { padding: 0 6px; }
.wl-summary { display: flex; justify-content: space-between; align-items: center; padding: 12px 14px; background: var(--panel-2); border-radius: 8px; margin-bottom: 10px; font-size: 13px; }
.wl-form .btn-lg { margin-top: 6px; width: 100%; }
.wl-foot { text-align: center; color: var(--muted); font-size: 12px; margin: 12px 0 0; }
.input-wrap.lg input { height: 50px; font-size: 17px; }
.link-btn { color: var(--muted); font-weight: 700; font-size: 12px; }
.link-btn:hover { color: var(--text); }
@media (max-width: 520px) {
  .wl-tiles { grid-template-columns: 1fr; }
  .wl-chips { grid-template-columns: repeat(2, 1fr); }
  .wl-amount { font-size: 28px; }
}

/* ---------------------------------------------------------------- settings */
.settings { display: grid; grid-template-columns: 230px 1fr; gap: 22px; align-items: start; }
.settings-nav { background: var(--panel); border-radius: 10px; padding: 8px; display: flex; flex-direction: column; gap: 4px; position: sticky; top: 84px; }
.settings-nav button { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 8px; font-weight: 700; color: var(--muted); text-align: left; }
.settings-nav button:hover { background: var(--panel-2); color: var(--text); }
.settings-nav button.active { background: var(--panel-3); color: var(--text); }
.settings-body { min-width: 0; max-width: 760px; }
.lang-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(165px, 1fr)); gap: 10px; }
.lang-opt { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-radius: 10px; background: var(--panel-2); border: 2px solid transparent; font-weight: 700; text-align: left; }
.lang-opt:hover { border-color: var(--panel-3); }
.lang-opt.active { border-color: var(--green); }
.lang-opt .flag { font-size: 20px; line-height: 1; }
.lang-opt .check { margin-left: auto; color: var(--green); display: grid; }
.pref-row { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 18px 0; border-bottom: 1px solid var(--line); cursor: pointer; }
.pref-row:first-child { padding-top: 4px; }
.pref-row:last-child { border-bottom: 0; padding-bottom: 4px; }
.pref-row b { display: block; margin-bottom: 4px; font-size: 15px; }
.pref-row p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.5; }
.switch { position: relative; width: 46px; height: 26px; flex-shrink: 0; }
.switch input { opacity: 0; position: absolute; inset: 0; margin: 0; cursor: pointer; z-index: 1; }
.switch span { position: absolute; inset: 0; background: var(--panel-3); border-radius: 999px; transition: background .2s; }
.switch span::after { content: ''; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; transition: transform .2s; box-shadow: 0 1px 3px rgba(0, 0, 0, .3); }
.switch input:checked + span { background: var(--green); }
.switch input:checked + span::after { transform: translateX(20px); }
.switch input:focus-visible + span { outline: 2px solid #5fa8ff; outline-offset: 2px; }
.kbd-list { display: flex; gap: 18px; flex-wrap: wrap; margin-top: 12px; color: var(--muted); font-size: 13px; }
.kbd-list > span { display: inline-flex; align-items: center; gap: 8px; }
kbd { background: var(--bg-deep); border: 1px solid var(--line); border-bottom-width: 3px; border-radius: 6px; padding: 2px 8px; font: 700 12px Rubik, sans-serif; color: var(--text); }
.sb-lang { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-radius: 8px; color: var(--muted); font-weight: 600; }
.sb-lang:hover { background: var(--panel-2); color: var(--text); }
body.sb-collapsed .sb-lang { justify-content: center; padding: 12px 0; }
body.sb-collapsed .sb-lang span { display: none; }
@media (max-width: 860px) {
  .settings { grid-template-columns: 1fr; }
  .settings-nav { flex-direction: row; position: static; overflow-x: auto; }
  .settings-nav button { flex: 1; justify-content: center; white-space: nowrap; }
  body.sb-collapsed .sb-lang span { display: revert; }
}

/* ---------------------------------------------------------------- mines autobet */
.tile.selected:not(.revealed) { background: #7d3cf0; box-shadow: 0 5px 0 #4c1fa3; }
.tile.selected:not(.revealed):hover:not(:disabled) { background: #9157ff; box-shadow: 0 8px 0 #4c1fa3; }
.tile.revealed.selected { box-shadow: inset 0 0 0 3px #9157ff; }
.mines-auto-box { background: var(--bg-deep); border-radius: var(--radius); padding: 14px; margin-bottom: 18px; }
.mines-auto-head { display: flex; justify-content: space-between; align-items: center; font-weight: 700; margin-bottom: 6px; }
.mines-auto-mult { color: #b48cff; font-variant-numeric: tabular-nums; }
.mines-auto-box p { margin: 0 0 12px; color: var(--muted); font-size: 12px; line-height: 1.5; }
.mines-auto-box p.red { color: var(--red); }
.mines-auto-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }

/* Auto settings rows: keep the toggle and % input inside the panel */
.toggle-row { min-width: 0; }
.toggle-row .seg button { white-space: nowrap; }
.toggle-row .input-wrap { min-width: 0; }
.toggle-row .input-wrap input { width: 100%; }
.controls .grid-2 { align-items: end; }
.controls .grid-2 .field > label { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.input-prefix { min-width: 0; }
.input-prefix input { width: 100%; }
@media (max-width: 400px) {
  .toggle-row { flex-wrap: wrap; }
  .toggle-row .seg { flex: 1 1 100%; }
  .toggle-row .input-wrap { flex: 1 1 100%; }
}

/* ---------------------------------------------------------------- user menu (dark) */
.dropdown {
  background: var(--panel-2); color: var(--text); border: 1px solid var(--line); border-radius: 10px;
  padding: 6px; min-width: 210px; box-shadow: 0 14px 36px rgba(0, 0, 0, .5); animation: popIn .15s;
}
.dropdown a, .dropdown button { color: var(--text); border-radius: 6px; padding: 10px 12px; }
.dropdown a:hover, .dropdown button:hover { background: var(--panel-3); }
.dropdown svg { color: var(--muted); }
.dropdown a:first-child { font-weight: 800; }
.dropdown button[data-act="logout"] { color: #ff8095; }
.dropdown button[data-act="logout"] svg { color: #ff8095; }

/* ---------------------------------------------------------------- header balance pill */
.wallet { height: 44px; }
.wallet-bal { min-width: 0; gap: 12px; padding: 0 12px 0 16px; font-variant-numeric: tabular-nums; font-size: 15px; }
.wallet-cur { display: inline-flex; align-items: center; gap: 2px; color: var(--muted); }
.wallet-cur .coin { width: 18px; height: 18px; font-size: 11px; }
.wallet-cur .caret { width: 14px; height: 14px; stroke-width: 2.5; }
.wallet-bal:hover .wallet-cur { color: var(--text); }
.wallet-btn { padding: 0 20px; font-size: 15px; }
.wallet-btn .wb-ico { display: none; }
@media (max-width: 860px) {
  .wallet-btn { padding: 0 14px; }
  .wallet-btn .wb-txt { display: none; }
  .wallet-btn .wb-ico { display: grid; }
  .wallet-bal { font-size: 14px; padding: 0 10px 0 12px; gap: 8px; }
}

/* ---------------------------------------------------------------- wallet modal (Stake-style) */
.wallet-modal .wl-tabs { margin-bottom: 18px !important; }
.wallet-modal .wl-tabs button { height: 40px; }
.wl-card { background: var(--panel-2); border-radius: 10px; padding: 18px; margin-bottom: 12px; }
.wl-card-head { display: flex; justify-content: space-between; align-items: center; }
.wl-total { font-size: 32px; font-weight: 800; margin: 8px 0 16px; font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.wl-cur-row { display: flex; justify-content: space-between; align-items: center; background: var(--bg-deep); border-radius: 8px; padding: 12px 14px; font-variant-numeric: tabular-nums; }
.wl-cur-name { display: inline-flex; align-items: center; gap: 10px; }
.wl-cur-name .coin { width: 22px; height: 22px; font-size: 12px; }
.wl-cur-name .muted { font-size: 13px; font-weight: 500; }
.wallet-modal .wl-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 12px; padding: 0; border: 0; }
.wallet-modal .wl-stats > div { background: var(--panel-2); border-radius: 10px; padding: 12px 14px; }
.wl-select { display: flex; align-items: center; justify-content: space-between; height: 50px; padding: 0 14px; background: var(--bg-deep); border: 2px solid var(--panel-3); border-radius: var(--radius); }
.input-wrap.money { align-items: center; }
.input-wrap.money .cur-prefix { padding: 0 4px 0 14px; font-size: 17px; font-weight: 700; color: var(--muted); align-self: stretch; display: flex; align-items: center; background: var(--bg-deep); border-radius: 6px 0 0 6px; border: 2px solid var(--panel-3); border-right: 0; }
.input-wrap.money input { border-left: 0; border-radius: 0 6px 6px 0; padding-left: 4px; }
.wl-summary { flex-direction: column; gap: 8px; align-items: stretch; padding: 14px; }
.wl-summary > div { display: flex; justify-content: space-between; font-variant-numeric: tabular-nums; }

/* live value change pulse */
.bump { display: inline-block; animation: bump .6s ease; }
@keyframes bump { 0% { transform: scale(1.12); color: #fff; text-shadow: 0 0 12px rgba(0, 231, 1, .7); } 100% { transform: none; } }
.page-head .badge.live { background: rgba(0, 231, 1, .12); color: var(--green); }

/* ---------------------------------------------------------------- bet results: green win / red loss */
table.bets .payout { font-variant-numeric: tabular-nums; }
table.bets tr.bet-win .payout { color: var(--green); }
table.bets tr.bet-loss .payout { color: var(--red); }
.mult-pill { display: inline-block; min-width: 64px; padding: 4px 10px; border-radius: 999px; font-size: 13px; font-weight: 700; text-align: center; font-variant-numeric: tabular-nums; background: var(--panel-3); }
tr.bet-win .mult-pill { background: rgba(0, 231, 1, .14); color: var(--green); }
tr.bet-loss .mult-pill { background: rgba(237, 65, 99, .14); color: #ff6b88; }
table.bets tbody tr.bet-win td:first-child { box-shadow: inset 3px 0 0 var(--green); }
table.bets tbody tr.bet-loss td:first-child { box-shadow: inset 3px 0 0 var(--red); }
.vol-row { display: flex; align-items: center; gap: 12px; margin-top: 12px; max-width: 320px; }
.vol-row input[type=range] { flex: 1; accent-color: var(--green); cursor: pointer; }

/* ---------------------------------------------------------------- currency badge & picker */
.coin { width: 16px; height: 16px; display: inline-block; flex-shrink: 0; background: none; border-radius: 50%; vertical-align: middle; line-height: 0; }
.coin svg { width: 100%; height: 100%; display: block; stroke: none; }
.wallet-cur .coin { width: 20px; height: 20px; }
.wl-cur-name .coin { width: 24px; height: 24px; }
.wallet-modal .wl-tabs { display: grid; grid-template-columns: 1fr 1fr 1fr 46px; }
.wallet-modal .wl-tabs [data-wt=settings] svg { width: 17px; height: 17px; }
.wl-set-head { display: flex; flex-direction: column; gap: 4px; margin-bottom: 14px; }
.cur-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.cur-opt { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 10px; background: var(--panel-2); border: 2px solid transparent; text-align: left; }
.cur-opt:hover { border-color: var(--panel-3); }
.cur-opt.active { border-color: var(--green); }
.cur-opt .coin { width: 26px; height: 26px; }
.cur-opt > span:not(.coin):not(.check) { display: flex; flex-direction: column; line-height: 1.25; min-width: 0; }
.cur-opt small { color: var(--muted); font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cur-opt .check { margin-left: auto; color: var(--green); display: grid; }

/* ---------------------------------------------------------------- header balance dropdown */
.wallet { position: relative; }
.wallet-cur .caret { transition: transform .2s; }
.wallet.menu-open .wallet-cur .caret { transform: rotate(180deg); }
.bal-menu {
  position: absolute; top: calc(100% + 10px); left: 0; width: 300px; z-index: 60; background: var(--panel); border: 1px solid var(--line);
  border-radius: 12px; padding: 14px; box-shadow: 0 16px 40px rgba(0, 0, 0, .5); animation: popIn .15s;
}
.bal-primary { border: 1px solid var(--green); background: rgba(0, 231, 1, .08); border-radius: 10px; padding: 14px 16px; display: flex; flex-direction: column; gap: 6px; }
.bal-primary span { color: var(--green); font-size: 13px; font-weight: 600; }
.bal-primary b { font-size: 18px; font-variant-numeric: tabular-nums; }
.bal-sep { height: 1px; background: var(--line); margin: 14px 0; }
.bal-display { display: flex; align-items: center; justify-content: center; gap: 7px; font-weight: 600; margin-bottom: 14px; font-size: 14px; }
.bal-display .coin { width: 20px; height: 20px; }
.bal-settings { background: var(--panel-3); height: 44px; }

/* ---------------------------------------------------------------- wallet settings */
.modal-wset { max-width: 560px; }
.wset-label { color: var(--muted); font-weight: 600; margin-bottom: 14px; }
.wset-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px 10px; }
.wset-opt { display: flex; align-items: center; gap: 10px; padding: 9px 8px; border-radius: 8px; cursor: pointer; font-size: 15px; }
.wset-opt:hover { background: var(--panel-2); }
.wset-opt input { position: absolute; opacity: 0; pointer-events: none; }
.radio-dot { width: 22px; height: 22px; border-radius: 50%; background: var(--bg-deep); border: 2px solid var(--panel-3); flex-shrink: 0; display: grid; place-items: center; }
.wset-opt input:checked + .radio-dot { border-color: var(--blue); }
.wset-opt input:checked + .radio-dot::after { content: ''; width: 12px; height: 12px; border-radius: 50%; background: var(--blue); }
.wset-opt input:focus-visible + .radio-dot { outline: 2px solid #5fa8ff; outline-offset: 2px; }
.wset-opt .coin { width: 22px; height: 22px; }
.wset-note { display: flex; gap: 12px; align-items: flex-start; margin-top: 18px; padding: 14px 16px; border-radius: 10px; background: rgba(255, 150, 70, .1); color: #f5a66b; line-height: 1.5; font-size: 14px; }
.wset-i { width: 20px; height: 20px; border-radius: 50%; background: #f5a66b; color: var(--bg); font-weight: 900; font-size: 12px; display: grid; place-items: center; flex-shrink: 0; margin-top: 1px; }
@media (max-width: 520px) { .wset-grid { grid-template-columns: repeat(2, 1fr); } }

/* ---------------------------------------------------------------- wallet (stepped layout) */
.modal.modal-rb { max-width: 920px; }
.modal-rb .modal-body { padding: 0; }
.rb-top { display: flex; align-items: center; gap: 14px; padding: 18px 20px; border-bottom: 1px solid var(--line); }
.rb-tabs { flex: 1; max-width: 560px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; background: var(--bg-deep); border: 1px solid var(--line); border-radius: 10px; padding: 5px; }
.rb-tabs button { height: 42px; border-radius: 7px; font-weight: 600; color: var(--muted); }
.rb-tabs button:hover:not(.active) { background: var(--panel-2); color: var(--text); }
.rb-tabs button.active { background: var(--blue); color: #fff; box-shadow: 0 2px 8px rgba(20, 117, 225, .4); }
.rb-close { margin-left: auto; width: 42px; height: 42px; border-radius: 50%; background: var(--panel-2); display: grid; place-items: center; color: var(--muted); }
.rb-close:hover { color: var(--text); background: var(--panel-3); }
.rb-body { display: grid; grid-template-columns: 1fr 280px; gap: 24px; padding: 26px 24px 28px; align-items: start; }
.rb-main { min-width: 0; }
.rb-steps { position: relative; }
.rb-step { position: relative; display: grid; grid-template-columns: 34px 1fr; gap: 18px; padding-bottom: 26px; }
.rb-step:not(.last)::before { content: ''; position: absolute; left: 16px; top: 38px; bottom: 4px; width: 2px; background: var(--line); }
.rb-step.last { padding-bottom: 0; }
.rb-num {
  width: 34px; height: 34px; display: grid; place-items: center; font-weight: 800; color: var(--muted); position: relative; z-index: 1;
}
.rb-num::before { content: ''; position: absolute; inset: 4px; transform: rotate(45deg); border: 2px solid var(--panel-3); border-radius: 4px; background: var(--panel); z-index: -1; }
.rb-step-body h4 { margin: 6px 0 12px; font-size: 16px; }
.rb-select {
  width: 100%; height: 54px; display: flex; align-items: center; gap: 12px; padding: 0 16px; border-radius: 10px;
  background: var(--panel-2); border: 1px solid var(--line); text-align: left; font-size: 15px;
}
.rb-select:hover { border-color: var(--hover); }
.rb-select .coin { width: 26px; height: 26px; }
.rb-select .chev { margin-left: auto; color: var(--muted); }
.rb-input { display: flex; align-items: center; gap: 10px; height: 54px; padding: 0 8px 0 10px; border-radius: 10px; background: var(--panel-2); border: 1px solid var(--line); }
.rb-input:focus-within { border-color: var(--hover); }
.rb-input input { flex: 1; min-width: 0; height: 100%; background: none; border: 0; outline: none; font-size: 16px; font-weight: 600; padding: 0 6px; }
.amt-prefix { min-width: 34px; height: 34px; padding: 0 8px; border-radius: 999px; background: var(--panel-3); display: grid; place-items: center; font-weight: 700; font-size: 14px; color: var(--text); }
.rb-max { height: 38px; padding: 0 14px; border-radius: 8px; background: var(--panel-3); font-weight: 700; }
.rb-max:hover { background: var(--hover); }
.rb-chips { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: 10px; }
.rb-chips button { height: 36px; border-radius: 8px; background: var(--panel-2); border: 1px solid var(--line); font-weight: 700; font-size: 13px; }
.rb-chips button:hover { border-color: var(--hover); }
.rb-summary { display: flex; justify-content: space-between; padding: 6px 2px; font-variant-numeric: tabular-nums; }
.rb-submit { width: 100%; margin-top: 14px; }
.rb-submit:disabled { opacity: .45; }
.rb-note { text-align: center; color: var(--muted); font-size: 13px; margin: 12px 0 0; }
.rb-note.left { text-align: left; }
.rb-redeem h4 { margin: 4px 0 8px; font-size: 18px; }
.rb-redeem > p.muted { margin: 0 0 16px; line-height: 1.55; }
.rb-side { display: flex; flex-direction: column; gap: 14px; }
.rb-card {
  position: relative; overflow: hidden; display: flex; flex-direction: column; align-items: flex-start; gap: 4px; padding: 20px; border-radius: 14px;
  text-align: left; border: 1px solid; min-height: 150px;
}
.rb-card::after { content: ''; position: absolute; right: -40px; top: -40px; width: 160px; height: 160px; border-radius: 50%; background: rgba(255, 255, 255, .06); }
.rb-card.blue { background: linear-gradient(150deg, #2d5fa8, #1b3a6b); border-color: #4c8fe6; }
.rb-card.purple { background: linear-gradient(150deg, #5a3aa6, #33216a); border-color: #9a74f0; }
.rb-card.green { background: linear-gradient(150deg, #1f7a4d, #11452c); border-color: #3dbb78; }
button.rb-card:hover { filter: brightness(1.08); }
.rb-card-ico { width: 44px; height: 44px; border-radius: 12px; background: rgba(255, 255, 255, .14); display: grid; place-items: center; margin-bottom: 10px; }
.rb-card-ico svg { width: 24px; height: 24px; color: #fff; }
.rb-card b { font-size: 18px; }
.rb-card-sub { color: #d9f86b; font-weight: 600; font-size: 14px; }
.rb-card-btn { margin-top: 12px; background: rgba(255, 255, 255, .16); color: #fff; position: relative; z-index: 1; }
.rb-card-btn:hover { background: rgba(255, 255, 255, .26); }
.rb-card-btn:disabled { background: rgba(255, 255, 255, .08); color: rgba(255, 255, 255, .5); opacity: 1; }
@media (max-width: 760px) {
  .rb-body { grid-template-columns: 1fr; padding: 20px 16px; }
  .rb-side { display: grid; grid-template-columns: 1fr 1fr; }
  .rb-side .rb-card.blue { grid-column: span 2; min-height: 0; }
  .rb-top { padding: 14px; }
  .rb-tabs button { height: 38px; font-size: 13px; }
  .rb-chips { grid-template-columns: repeat(2, 1fr); }
}

/* ---------------------------------------------------------------- donate */
.donate-hero { display: flex; align-items: center; gap: 22px; padding: 30px; border-radius: 14px; margin-bottom: 18px; background: radial-gradient(120% 160% at 100% 0%, rgba(255, 255, 255, .12), transparent 50%), linear-gradient(135deg, #b9336e, #5d1a48); box-shadow: 0 6px 18px rgba(0, 0, 0, .3); }
.donate-hero h1 { margin: 0 0 6px; font-size: 28px; }
.donate-hero p { margin: 0; color: rgba(255, 255, 255, .85); line-height: 1.55; max-width: 560px; }
.donate-ico { width: 72px; height: 72px; border-radius: 18px; background: rgba(255, 255, 255, .15); display: grid; place-items: center; flex-shrink: 0; }
.donate-ico svg { width: 38px; height: 38px; color: #fff; fill: rgba(255, 255, 255, .25); }
.donate-notice { display: flex; gap: 12px; align-items: flex-start; padding: 14px 18px; border-radius: 10px; background: var(--panel); border: 1px solid var(--line); color: var(--muted); line-height: 1.55; margin-bottom: 22px; }
.donate-notice svg { color: var(--green); margin-top: 2px; }
.donate-notice b { color: var(--text); }
.donate-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.donate-card { margin: 0; display: flex; flex-direction: column; gap: 14px; }
.donate-card-head { display: flex; align-items: center; gap: 12px; }
.donate-card-head > div { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.donate-card-head b { font-size: 16px; }
.donate-net { font-size: 12px; font-weight: 600; color: var(--muted); }
.donate-coin { width: 40px; height: 40px; flex-shrink: 0; display: grid; }
.donate-coin svg { width: 100%; height: 100%; }
/* Brand logos: no outline (the site's icon style strokes every svg shape in white). */
.donate-coin svg, .donate-coin svg * { stroke: none; }
.donate-coin.sm { width: 24px; height: 24px; }
.donate-qr { align-self: center; padding: 10px; background: #fff; border-radius: 12px; line-height: 0; }
.donate-qr img { display: block; width: 184px; height: 184px; }
.donate-tokens { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 8px; background: rgba(39, 117, 202, .12); border: 1px solid rgba(39, 117, 202, .35); font-size: 13px; line-height: 1.45; color: var(--muted); }
.donate-tokens b { color: var(--text); }
.donate-tok-icons { display: flex; flex-shrink: 0; }
.donate-tok-icons .donate-coin + .donate-coin { margin-left: -6px; }
.donate-warn { display: flex; gap: 8px; align-items: flex-start; font-size: 12px; line-height: 1.45; color: var(--muted); }
.donate-warn svg { width: 14px; height: 14px; flex-shrink: 0; margin-top: 1px; color: #ffb547; }
.donate-value { display: flex; align-items: center; gap: 10px; background: var(--bg-deep); border-radius: 8px; padding: 10px 10px 10px 14px; }
.donate-value .mono { flex: 1; min-width: 0; word-break: break-all; }
.donate-empty { grid-column: 1 / -1; text-align: center; padding: 40px 24px; }
.donate-empty code { background: var(--bg-deep); padding: 2px 6px; border-radius: 4px; color: var(--text); }
@media (max-width: 600px) { .donate-hero { flex-direction: column; text-align: center; padding: 24px; } }

/* ---------------------------------------------------------------- statistics */
.btn-red { background: var(--red); color: #fff; }
.btn-red:hover { background: #ff5577; }
.badge.red-badge { background: rgba(237, 65, 99, .14); color: #ff7d95; }
.badge svg { width: 13px; height: 13px; vertical-align: -2px; margin-right: 4px; }
.stats-head { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; margin-bottom: 20px; }
.stats-id { display: flex; align-items: center; gap: 14px; }
.stats-avatar { width: 52px; height: 52px; border-radius: 50%; background: var(--panel-3); display: grid; place-items: center; flex-shrink: 0; }
.stats-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.stats-actions .badge { padding: 7px 10px; font-size: 12px; }
.stats-actions .btn-red svg { width: 15px; height: 15px; }
.stats-grid .stat-box .v { font-size: 17px; font-variant-numeric: tabular-nums; }
.stat-box .s { color: var(--dim); font-size: 12px; margin-top: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chart-card canvas { width: 100%; display: block; }
.chart-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 12px; }
.chart-head h3 { margin: 0; }
.reset-dlg p { margin: 0 0 10px; line-height: 1.5; }
.reset-dlg ul { margin: 0 0 12px; padding-left: 20px; color: var(--muted); line-height: 1.8; }
.reset-fresh { display: flex; gap: 12px; align-items: flex-start; padding: 14px; border-radius: 10px; background: var(--panel-2); border: 1px solid var(--line); cursor: pointer; margin: 14px 0 18px; line-height: 1.5; font-size: 14px; }
.reset-fresh input { width: 18px; height: 18px; margin-top: 2px; accent-color: var(--red); flex-shrink: 0; }
.reset-fresh b { display: block; }
.reset-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.lb-rule { display: flex; gap: 12px; align-items: flex-start; padding: 14px 18px; border-radius: 10px; background: var(--panel); border: 1px solid var(--line); color: var(--muted); line-height: 1.55; margin-bottom: 18px; }
.lb-rule svg { color: var(--green); margin-top: 2px; }
.lb-rule b { color: var(--text); }
.grid-4.stats-grid { grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); }
.stats-grid .stat-box { min-width: 0; }
.stats-grid .stat-box .v { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.stats-grid .stat-box .v .bump { max-width: 100%; overflow: hidden; text-overflow: ellipsis; vertical-align: bottom; }

/* ---------------------------------------------------------------- currency flags */
.flag { width: 22px; height: 22px; border-radius: 50%; object-fit: cover; flex-shrink: 0; box-shadow: 0 0 0 1.5px rgba(255, 255, 255, .14), 0 1px 3px rgba(0, 0, 0, .35); background: var(--panel-3); }
.wset-opt .flag { width: 26px; height: 26px; }
.wset-sym { margin-left: auto; color: var(--dim); font-size: 13px; font-weight: 600; }
.rb-select .flag { width: 26px; height: 26px; }
.bal-display .flag { width: 20px; height: 20px; }
.cur-opt .flag { width: 28px; height: 28px; }

.cat-tabs a { height: 40px; padding: 0 18px; border-radius: 999px; font-weight: 700; display: inline-flex; align-items: center; gap: 10px; white-space: nowrap; }
.cat-tabs a.active { background: var(--panel-3); }
.cat-tabs a:hover:not(.active) { background: var(--panel-2); }
.promo a.btn { align-self: flex-start; margin-top: 18px; background: rgba(255,255,255,.95); color: #0f212e; height: 36px; }

/* ---------------------------------------------------------------- header user chip */
.avatar { display: inline-grid; place-items: center; border-radius: 50%; background: var(--av, var(--panel-3)); color: #fff; font-weight: 800; flex-shrink: 0; box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .15); }
.user-chip { display: flex; align-items: center; gap: 10px; height: 44px; padding: 0 10px 0 5px; border-radius: 999px; background: var(--bg-deep); border: 1px solid var(--line); max-width: 280px; }
.user-chip:hover { border-color: var(--hover); }
.uc-text { display: flex; flex-direction: column; align-items: flex-start; line-height: 1.15; min-width: 0; }
.uc-text b { font-size: 14px; max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.uc-text small { font-size: 11px; font-weight: 700; }
.user-chip .caret { width: 14px; height: 14px; color: var(--muted); stroke-width: 2.5; }
.dropdown .dd-user { gap: 10px; }
@media (max-width: 860px) {
  .uc-text, .user-chip .caret { display: none; }
  .user-chip { padding: 0; height: auto; border: 0; background: none; }
}

/* ---------------------------------------------------------------- 18+ */
.age-badge { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; border: 2px solid var(--red); color: var(--red); font-weight: 900; font-size: 11px; letter-spacing: -.02em; flex-shrink: 0; }
.age-badge.big { width: 72px; height: 72px; font-size: 24px; border-width: 4px; }
.footer-legal { display: inline-flex; align-items: center; gap: 10px; }
.modal-age { max-width: 460px; }
.modal-age .modal-body { padding: 0; }
.modal-backdrop:has(.modal-age) { background: rgba(4, 12, 18, .94); }
.age-gate { text-align: center; padding: 32px 30px 26px; }
.age-gate h2 { margin: 16px 0 10px; font-size: 22px; }
.age-gate p { line-height: 1.55; margin: 0 0 12px; color: var(--muted); }
.age-gate p:first-of-type { color: var(--text); }
.age-gate a { color: #5fa8ff; }
.age-actions { display: grid; gap: 10px; margin: 20px 0 14px; }
.age-blocked { min-height: 100vh; display: grid; place-content: center; justify-items: center; text-align: center; gap: 6px; padding: 20px; }
.age-blocked h2 { margin: 14px 0 0; }
.age-blocked p { color: var(--muted); }

/* ---------------------------------------------------------------- auth & login key */
.auth-lead { margin: 0 0 16px; color: var(--muted); line-height: 1.5; }
.avail-wrap { position: relative; }
.avail-wrap .input { padding-right: 130px; }
.avail { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); font-size: 12px; font-weight: 700; color: var(--muted); pointer-events: none; }
.avail.ok { color: var(--green); }
.avail.bad { color: var(--red); }
.auth-note { margin: -4px 0 16px; line-height: 1.5; }
.auth-switch { display: block; margin: 14px auto 0; }
.auth-legal { text-align: center; color: var(--dim); font-size: 12px; margin: 18px 0 0; }
.auth-legal a { color: var(--muted); text-decoration: underline; }
.key-input { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 18px; letter-spacing: .08em; text-align: center; }
.key-dlg .key-intro { margin: 0 0 14px; line-height: 1.5; color: var(--muted); }
.key-box { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 26px; font-weight: 700; letter-spacing: .1em; text-align: center; padding: 20px 12px; border-radius: 12px; background: var(--bg-deep); border: 2px dashed var(--green); color: var(--green); user-select: all; }
.key-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 12px 0 16px; }
.key-warn { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 10px; background: rgba(255, 199, 0, .08); color: #ffd666; font-size: 13px; line-height: 1.5; }
.key-warn svg { color: #ffd666; margin-top: 1px; }
.key-ack { display: flex; align-items: center; gap: 10px; margin: 16px 0; font-weight: 600; cursor: pointer; }
.key-ack input { width: 18px; height: 18px; accent-color: var(--green); }
.key-dlg .btn-lg { width: 100%; }
@media (max-width: 420px) { .key-box { font-size: 20px; } }
.terms h3 { margin-top: 22px; }

/* ---------------------------------------------------------------- rewards */
.rw-menu { position: relative; }
.rw-btn { position: relative; }
.rw-dot { position: absolute; top: 8px; right: 8px; width: 9px; height: 9px; border-radius: 50%; background: var(--red); box-shadow: 0 0 0 2px var(--panel); }
.boost-pill { display: flex; align-items: center; gap: 8px; height: 44px; padding: 0 12px 0 6px; border-radius: 10px; background: var(--bg-deep); border: 1px solid rgba(255, 199, 0, .35); }
.boost-pill b { display: block; font-size: 13px; color: #ffc700; line-height: 1.1; }
.boost-pill small { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.rw-boost-ico { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: radial-gradient(circle at 35% 30%, #ffe27a, #ffb300); color: #5a3a00; flex-shrink: 0; box-shadow: 0 0 0 3px rgba(255, 199, 0, .2); }
.rw-boost-ico svg { width: 17px; height: 17px; stroke-width: 2.5; fill: #5a3a00; }
.rw-panel {
  position: absolute; right: -60px; top: calc(100% + 10px); width: 380px; z-index: 60; background: var(--panel); border: 1px solid var(--line);
  border-radius: 14px; overflow: hidden; box-shadow: 0 18px 44px rgba(0, 0, 0, .55); animation: popIn .15s;
}
.rw-loading { padding: 30px; text-align: center; color: var(--muted); }
.rw-raffle { display: flex; align-items: center; gap: 14px; padding: 16px 18px; background: linear-gradient(120deg, #6b5214, #3a2c0d 70%); border-bottom: 1px solid rgba(255, 199, 0, .3); }
.rw-ticket { width: 46px; height: 46px; border-radius: 10px; display: grid; place-items: center; background: linear-gradient(160deg, #ffd84d, #d9a400); color: #6b4a00; transform: rotate(-6deg); flex-shrink: 0; box-shadow: 0 4px 10px rgba(0, 0, 0, .3); }
.rw-ticket svg { width: 24px; height: 24px; stroke-width: 2.2; }
.rw-ticket.big { width: 64px; height: 64px; }
.rw-ticket.big svg { width: 34px; height: 34px; }
.rw-raffle-txt { display: flex; flex-direction: column; line-height: 1.1; flex: 1; }
.rw-raffle-txt b { font-size: 22px; font-style: italic; font-weight: 900; }
.rw-raffle-txt i { color: #ffc700; font-weight: 900; font-size: 15px; letter-spacing: .02em; }
.rw-tix { font-weight: 800; font-size: 16px; white-space: nowrap; }
.rw-boost { display: flex; align-items: center; gap: 12px; padding: 14px 18px; background: var(--panel-2); border-bottom: 1px solid var(--line); }
.rw-boost b { color: #ffc700; font-size: 16px; }
.rw-boost:not(.on) .rw-boost-ico { filter: grayscale(.8) brightness(.8); }
.rw-boost:not(.on) b { color: var(--muted); }
.rw-boost-time { margin-left: auto; font-variant-numeric: tabular-nums; font-weight: 600; color: var(--muted); }
.rw-boost.on .rw-boost-time { color: var(--text); }
.rw-info { width: 20px; height: 20px; border-radius: 50%; border: 1.5px solid var(--muted); color: var(--muted); display: grid; place-items: center; font-size: 11px; font-weight: 800; cursor: help; flex-shrink: 0; }
.rw-rows { max-height: 360px; overflow-y: auto; }
.rw-rows.big { max-height: none; }
.rw-row { display: flex; align-items: center; gap: 14px; padding: 12px 18px; border-bottom: 1px solid var(--line); }
.rw-row.plain { padding: 0; border: 0; }
.rw-txt { display: flex; flex-direction: column; gap: 3px; flex: 1; min-width: 0; }
.rw-txt b { font-size: 15px; }
.rw-txt span { color: var(--muted); font-size: 13px; line-height: 1.45; }
.rw-act { min-width: 92px; height: 38px; padding: 0 12px; border-radius: 8px; background: var(--panel-2); color: var(--muted); font-weight: 700; font-size: 13px; font-variant-numeric: tabular-nums; display: grid; place-items: center; }
.rw-act svg { width: 15px; height: 15px; }
.rw-act.ready { background: var(--green); color: var(--green-ink); }
.rw-act.ready:hover { background: #1fff20; }
.rw-act:disabled { cursor: default; }
.rw-chip {
  width: 42px; height: 42px; border-radius: 50%; flex-shrink: 0; display: grid; place-items: center;
  background: repeating-conic-gradient(var(--green) 0 22.5deg, #0e8a12 22.5deg 45deg); box-shadow: 0 0 10px rgba(0, 231, 1, .25);
}
.rw-chip span { width: 30px; height: 30px; border-radius: 50%; background: var(--bg-deep); border: 2px solid var(--green); color: var(--green); display: grid; place-items: center; font-weight: 900; font-size: 15px; }
.rw-chip.sm span { font-size: 12px; }
.rw-ico { width: 42px; height: 42px; border-radius: 12px; flex-shrink: 0; display: grid; place-items: center; border: 2px solid var(--green); color: var(--green); background: rgba(0, 231, 1, .08); }
.rw-ico svg { width: 22px; height: 22px; }
.rw-all { margin: 14px 18px 16px; width: calc(100% - 36px); background: var(--panel-3); }
.rw-page-top { display: grid; grid-template-columns: 1fr 1.1fr; gap: 20px; align-items: start; }
.rw-page-top .card { padding: 0; overflow: hidden; }
.rw-page-top .rw-raffle-card { padding: 22px; background: linear-gradient(150deg, #4d3b10, #1e2a33 60%); border: 1px solid rgba(255, 199, 0, .3); }
.rw-raffle-head { display: flex; align-items: center; gap: 16px; margin-bottom: 18px; }
.rw-raffle-pool { font-size: 34px; font-weight: 900; font-style: italic; line-height: 1; }
.rw-raffle-label { color: #ffc700; font-weight: 900; font-style: italic; letter-spacing: .03em; }
.rw-raffle-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 14px; }
.rw-raffle-stats > div { background: rgba(0, 0, 0, .25); border-radius: 10px; padding: 12px 14px; display: flex; flex-direction: column; gap: 4px; }
.rw-raffle-stats b { font-size: 18px; }
.rw-raffle-card p { line-height: 1.55; }
.rw-prizes { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 8px; margin-top: 14px; }
.rw-prizes > div { display: flex; align-items: center; gap: 8px; background: rgba(0, 0, 0, .25); border-radius: 8px; padding: 8px 10px; }
.rw-last { margin-top: 16px; padding-top: 14px; border-top: 1px solid rgba(255, 255, 255, .08); }
.rw-explain { margin-top: 20px; }
.rw-explain .card { margin: 0; }
@media (max-width: 1000px) { .rw-page-top { grid-template-columns: 1fr; } }
@media (max-width: 860px) {
  .boost-pill b, .boost-pill small { display: none; }
  .boost-pill { padding: 0 6px; }
  .rw-panel { position: fixed; left: 8px; right: 8px; top: 64px; width: auto; }
}

/* ---------------------------------------------------------------- celebration effects */
.fx-canvas { position: fixed; inset: 0; width: 100vw; height: 100vh; pointer-events: none; z-index: 300; }
.fx-big { position: fixed; inset: 0; z-index: 290; display: grid; place-items: center; background: radial-gradient(circle at 50% 50%, rgba(0, 0, 0, .35), rgba(0, 0, 0, .55)); animation: fadeIn .2s; cursor: pointer; }
.fx-big.out { opacity: 0; transition: opacity .4s; }
.fx-big-card { text-align: center; padding: 28px 46px; border-radius: 20px; background: linear-gradient(160deg, #1d3b2a, #0f212e); border: 3px solid var(--green); box-shadow: 0 0 60px rgba(0, 231, 1, .45), inset 0 0 30px rgba(0, 231, 1, .15); animation: bigIn .5s cubic-bezier(.2, 1.6, .4, 1); }
.fx-big.huge .fx-big-card { border-color: #ffc700; background: linear-gradient(160deg, #4a3a0c, #0f212e); box-shadow: 0 0 70px rgba(255, 199, 0, .5), inset 0 0 30px rgba(255, 199, 0, .2); }
.fx-big.mega .fx-big-card { border-color: #ff3cac; background: linear-gradient(160deg, #4a0f3a, #1a0f2e); box-shadow: 0 0 90px rgba(255, 60, 172, .6), inset 0 0 40px rgba(141, 56, 243, .3); }
.fx-big-title { font-size: 44px; font-weight: 900; font-style: italic; letter-spacing: .02em; background: linear-gradient(90deg, #fff, #00e701, #fff); -webkit-background-clip: text; background-clip: text; color: transparent; background-size: 200% 100%; animation: shine 1.2s linear infinite; }
.fx-big.huge .fx-big-title { background-image: linear-gradient(90deg, #fff, #ffc700, #fff); }
.fx-big.mega .fx-big-title { background-image: linear-gradient(90deg, #fff, #ff3cac, #8d38f3, #fff); }
.fx-big-mult { font-size: 26px; font-weight: 800; margin-top: 4px; }
.fx-big-amt { font-size: 30px; font-weight: 900; color: var(--green); margin-top: 6px; font-variant-numeric: tabular-nums; }
@keyframes bigIn { from { transform: scale(.4) rotate(-6deg); opacity: 0; } }
@keyframes shine { to { background-position: -200% 0; } }
.fx-streak { position: fixed; left: 50%; top: 84px; transform: translateX(-50%); z-index: 280; padding: 10px 18px; border-radius: 999px; font-weight: 800; background: linear-gradient(90deg, #ff6a00, #ee0979); box-shadow: 0 8px 24px rgba(238, 9, 121, .45); animation: streakIn 2.2s ease forwards; pointer-events: none; }
@keyframes streakIn { 0% { opacity: 0; transform: translate(-50%, -14px) scale(.8); } 12% { opacity: 1; transform: translate(-50%, 0) scale(1.05); } 20% { transform: translate(-50%, 0) scale(1); } 85% { opacity: 1; } 100% { opacity: 0; transform: translate(-50%, -10px); } }
.wallet-bal.fx-bump { animation: balBump .5s ease; }
@keyframes balBump { 40% { transform: scale(1.08); box-shadow: 0 0 22px rgba(255, 199, 0, .55); } }

/* ---------------------------------------------------------------- more colour & motion */
/* Bet button sheen: a light band sweeps across every 3.2 s. It moves with transform (compositor only);
   animating background-position repainted the button on every frame of every game page. */
.btn-lg.btn-green[data-bet] { background: #00e701; position: relative; overflow: hidden; isolation: isolate; box-shadow: 0 4px 18px rgba(0, 231, 1, .28); }
.btn-lg.btn-green[data-bet]::before { content: ''; position: absolute; top: 0; bottom: 0; left: 0; width: 50%; z-index: -1; pointer-events: none;
  background: linear-gradient(100deg, rgba(141, 255, 141, 0), #8dff8d 50%, rgba(141, 255, 141, 0)); transform: translateX(-100%); animation: betShimmer 3.2s ease-in-out infinite; }
.btn-lg.btn-green[data-bet]:hover { filter: brightness(1.08); }
.btn-lg.btn-green[data-bet]:disabled::before { animation: none; }
@keyframes betShimmer { 0%, 60% { transform: translateX(-100%); } 100% { transform: translateX(650%); } }
.rw-act.ready { animation: readyPulse 1.6s ease-in-out infinite; }
@keyframes readyPulse { 50% { box-shadow: 0 0 0 4px rgba(0, 231, 1, .25), 0 0 18px rgba(0, 231, 1, .45); } }
.rw-dot:not(.hidden) { animation: dotPulse 1.4s ease-in-out 4; }
/* The glow fades in and out on its own layer (opacity), so the pulse never repaints; a few pulses get
   attention, an endless one kept every page redrawing. */
.rw-dot::after { content: ''; position: absolute; inset: -5px; border-radius: 50%; background: radial-gradient(circle, var(--red) 25%, transparent 70%); opacity: 0; pointer-events: none; }
.rw-dot:not(.hidden)::after { animation: dotGlow 1.4s ease-in-out 4; }
@keyframes dotPulse { 50% { transform: scale(1.35); } }
@keyframes dotGlow { 50% { opacity: .8; } }
.wallet .wallet-btn.rw-btn { position: relative; background: linear-gradient(135deg, #1f8af0, #1460c4); }
.wallet .wallet-btn.rw-btn .rw-dot { top: 6px; right: 6px; }
.wallet .rw-menu { display: flex; }
.wallet .rw-panel { right: auto; left: -170px; }
.pill.win { box-shadow: 0 0 12px rgba(0, 231, 1, .45); }
.game-card { transition: transform .2s, box-shadow .2s; }
.game-card:hover { box-shadow: 0 12px 28px rgba(0, 0, 0, .45), 0 0 0 2px rgba(255, 255, 255, .25); }
.game-card:hover .gc-icon { animation: cardFloat 1.6s ease-in-out infinite; }
@keyframes cardFloat { 50% { transform: translateX(-50%) translateY(-6px) rotate(-2deg); } }
.promo { transition: transform .2s; }
.promo:hover { transform: translateY(-3px); }
.cashout-card { position: relative; }
.cashout-card::after { content: ''; position: absolute; inset: -3px; border-radius: inherit; box-shadow: 0 0 26px rgba(0, 231, 1, .45); opacity: 0; pointer-events: none;
  animation: winGlow 1.4s ease-in-out infinite .25s; } /* opacity only: no repaint per frame */
@keyframes winGlow { 50% { opacity: 1; } }
@media (max-width: 860px) { .wallet .rw-panel { left: 8px; right: 8px; } }

/* header user button: square like the wallet, no avatar */
.user-chip { height: 44px; padding: 0 12px 0 14px; gap: 10px; border-radius: var(--radius); background: var(--bg-deep); border: 1px solid var(--line); }
.user-chip .uc-ico { display: none; color: var(--muted); }
.stats-avatar { border-radius: 10px; }
@media (max-width: 860px) {
  .user-chip { padding: 0 10px; height: 40px; border: 1px solid var(--line); background: var(--bg-deep); }
  .user-chip .uc-ico { display: grid; }
}

/* custom ticket & flame icons (no emoji) */
.tix-ico { width: 30px; height: 22px; stroke: none; fill: none; flex-shrink: 0; filter: drop-shadow(0 2px 3px rgba(0, 0, 0, .35)); transform: rotate(-8deg); }
.rw-tix { display: inline-flex; align-items: center; gap: 8px; }
.tix-val { display: inline-flex; align-items: center; gap: 10px; }
.tix-val .tix-ico { width: 34px; height: 24px; }
.flame-ico { width: 18px; height: 21px; stroke: none; fill: none; flex-shrink: 0; filter: drop-shadow(0 0 6px rgba(255, 160, 0, .7)); }
.fx-streak { display: inline-flex; align-items: center; gap: 8px; }
.lang-opt .flag { width: 26px; height: 26px; }
.rename { margin-bottom: 8px; }
.rename .label { margin-bottom: 8px; }
.rename-row { display: grid; grid-template-columns: 1fr auto; gap: 10px; }
.rename-row .btn { height: 48px; }
.rename-note { margin: 8px 0 14px; }
table.lb th.lb-sorted { color: var(--text); }
table.lb th.lb-sorted::after { content: ' ▾'; color: var(--green); }
table.lb td.lb-sorted .amt { font-weight: 800; font-size: 15px; }
table.lb tr.lb-me td { background: rgba(20, 117, 225, .12); }
.admin-bal .rb-input { height: 48px; }

/* ---------------------------------------------------------------- leaderboard (podium) */
.lb-tabs { margin-bottom: 26px; }
.lb-podium { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; align-items: end; margin-bottom: 22px; }
.lb-podium.n1 { grid-template-columns: minmax(0, 360px); justify-content: center; }
.lb-podium.n2 { grid-template-columns: repeat(2, minmax(0, 340px)); justify-content: center; }
.lb-pod {
  --tc: #ffc700; position: relative; overflow: hidden; text-align: center; padding: 26px 18px 22px; border-radius: 14px;
  background: linear-gradient(180deg, color-mix(in srgb, var(--tc) 16%, var(--panel)) 0%, var(--panel) 70%);
  border: 1px solid color-mix(in srgb, var(--tc) 40%, transparent); box-shadow: 0 8px 22px rgba(0, 0, 0, .3);
}
.lb-pod::before { content: ''; position: absolute; left: 0; right: 0; top: 0; height: 4px; background: var(--tc); }
.lb-pod.gold { --tc: #ffc700; padding-top: 38px; padding-bottom: 30px; }
.lb-pod.silver { --tc: #c9d4e3; }
.lb-pod.bronze { --tc: #e0904f; }
.lb-pod.me { outline: 2px solid var(--blue); outline-offset: 2px; }
.lb-pod-ico { width: 52px; height: 52px; margin: 0 auto 10px; border-radius: 50%; display: grid; place-items: center; color: var(--tc); background: color-mix(in srgb, var(--tc) 14%, transparent); box-shadow: 0 0 22px color-mix(in srgb, var(--tc) 30%, transparent); }
.lb-pod.gold .lb-pod-ico { width: 64px; height: 64px; }
.lb-pod-ico svg { width: 28px; height: 28px; stroke-width: 2; }
.lb-pod.gold .lb-pod-ico svg { width: 34px; height: 34px; fill: color-mix(in srgb, var(--tc) 25%, transparent); }
.lb-pod-rank { font-size: 12px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--tc); }
.lb-pod-name { font-size: 18px; font-weight: 800; margin: 6px 0 10px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lb-pod .lb-val { font-size: 22px; }
.lb-pod.gold .lb-val { font-size: 26px; }
.lb-val { font-weight: 800; font-variant-numeric: tabular-nums; white-space: nowrap; }
.lb-val small { font-size: 12px; font-weight: 600; color: var(--muted); margin-left: 6px; }
.lb-list { display: flex; flex-direction: column; gap: 6px; }
.lb-row, .lb-me-bar { display: grid; grid-template-columns: 64px 1fr auto; align-items: center; gap: 12px; padding: 14px 20px; border-radius: 10px; background: var(--panel); }
.lb-row:nth-child(even) { background: color-mix(in srgb, var(--panel) 60%, var(--bg)); }
.lb-row.me { background: rgba(20, 117, 225, .14); box-shadow: inset 3px 0 0 var(--blue); }
.lb-pos { color: var(--muted); font-weight: 800; font-variant-numeric: tabular-nums; }
.lb-name { font-weight: 700; display: flex; align-items: center; gap: 8px; min-width: 0; overflow: hidden; }
.lb-row .lb-val { font-size: 16px; }
.lb-me-bar { margin-top: 18px; position: sticky; bottom: 12px; background: var(--panel-2); border: 1px solid var(--blue); box-shadow: 0 8px 24px rgba(0, 0, 0, .4); }
.lb-me-bar.muted { display: block; text-align: center; border-color: var(--line); }
.lb-empty svg { width: 40px; height: 40px; color: var(--muted); }
@media (max-width: 700px) {
  .lb-podium, .lb-podium.n2 { grid-template-columns: 1fr; }
  .lb-pod.gold { order: -1; }
  .lb-row, .lb-me-bar { grid-template-columns: 48px 1fr auto; padding: 12px 14px; }
}

/* ---------------------------------------------------------------- themes & accent */
:root { --blue-dark: color-mix(in srgb, var(--blue) 78%, #000); }
:root[data-theme="abyss"] { --bg: #08090d; --d0: #040507; --p1: #15171f; --p2: #1c1f2a; --p3: #2a2e3b; --muted: #aab1c4; --dim: #737a8f; }
:root[data-theme="royal"] { --bg: #170f2e; --d0: #0e0920; --p1: #261a4a; --p2: #2f2259; --p3: #3e2f73; --muted: #b6a9dc; --dim: #7d70a8; }
:root[data-theme="fetid"] { --bg: #08150f; --d0: #040c08; --p1: #12291f; --p2: #183428; --p3: #234637; --muted: #a6c4b6; --dim: #6c8e7f; }
:root[data-theme="crimson"] { --bg: #170b10; --d0: #0d0508; --p1: #2a141c; --p2: #331a23; --p3: #462430; --muted: #d0aab4; --dim: #9a717b; }
:root[data-theme="halloween"] { --bg: #0e0814; --d0: #07040b; --p1: #1f1129; --p2: #2a1735; --p3: #3b2147; --muted: #c9b2d6; --dim: #8b7398; --blue: #ff7a1a; --gold: #ffb020; }
:root[data-accent="purple"] { --blue: #8b5cf6; }
:root[data-accent="pink"] { --blue: #e0457b; }
:root[data-accent="gold"] { --blue: #c98f00; }
:root[data-accent="teal"] { --blue: #0f9a9a; }
.wallet .wallet-btn.rw-btn { background: linear-gradient(135deg, color-mix(in srgb, var(--blue) 88%, #fff), var(--blue-dark)); }
.tile { box-shadow: 0 5px 0 var(--panel-2); }
.tile:hover:not(.revealed):not(:disabled) { background: var(--hover); box-shadow: 0 8px 0 var(--panel-2); }
.theme-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 10px; }
.theme-opt { display: flex; flex-direction: column; gap: 8px; padding: 10px; border-radius: 10px; background: var(--panel-2); border: 2px solid transparent; font-weight: 700; text-align: left; }
.theme-opt:hover { border-color: var(--panel-3); }
.theme-opt.active { border-color: var(--green); }
.theme-prev { position: relative; display: block; height: 62px; border-radius: 7px; overflow: hidden; }
.theme-prev i { position: absolute; display: block; border-radius: 4px; }
.theme-prev i:nth-child(1) { left: 0; top: 0; bottom: 0; width: 26%; border-radius: 0; }
.theme-prev i:nth-child(2) { left: 34%; right: 8%; top: 14px; height: 18px; }
.theme-prev i.acc { left: 34%; width: 30%; bottom: 10px; height: 10px; background: var(--green); }
.accent-row { display: flex; gap: 12px; flex-wrap: wrap; }
.accent-opt { width: 38px; height: 38px; border-radius: 50%; background: var(--a); box-shadow: 0 0 0 3px var(--panel); }
.accent-opt.active { box-shadow: 0 0 0 3px var(--panel), 0 0 0 5px #fff; }
.settings-nav .admin-tab { color: #ff7d95; }
.settings-nav .admin-tab.active { color: #ff9cad; }
.admin-stats { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }

/* Founder rank: black badge with a silver shine */
.rank-badge { display: inline-flex; align-items: center; gap: 4px; padding: 2px 7px; border-radius: 5px; font-weight: 800; font-size: 11px; letter-spacing: .05em; text-transform: uppercase; line-height: 1.3; vertical-align: middle; white-space: nowrap; flex: none; width: max-content; }
.rank-badge .rb-ico { width: 11px; height: 11px; }
.rank-badge.founder { background: linear-gradient(135deg, #000, #1c1c1c 60%, #000); color: #f2f2f2; border: 1px solid #5a5a5a; box-shadow: 0 0 10px rgba(0, 0, 0, .7), inset 0 1px 0 rgba(255, 255, 255, .15); text-shadow: 0 0 6px rgba(255, 255, 255, .35); }
.rank-badge.founder .rb-ico { color: #ffd76a; filter: drop-shadow(0 0 3px rgba(255, 199, 0, .55)); }
.rank-badge.sm { font-size: 9px; padding: 1px 5px; gap: 3px; margin-left: 6px; }
.rank-badge.sm .rb-ico { width: 9px; height: 9px; }
.uc-text.uc-inline { flex-direction: row; align-items: center; }
.uc-text.uc-inline .rank-badge { margin-left: 8px; }
.admin-actions { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }

/* 2FA */
.twofa-step { text-align: center; }
.twofa-step h3 { margin: 10px 0 6px; }
.twofa-step p { margin: 0 0 16px; line-height: 1.5; }
.twofa-step .input { margin-bottom: 14px; }
.twofa-ico { width: 56px; height: 56px; margin: 0 auto; border-radius: 50%; display: grid; place-items: center; background: rgba(20, 117, 225, .15); color: #5fa8ff; }
.twofa-ico svg { width: 26px; height: 26px; }
.twofa-setup ol { margin: 0 0 14px; padding-left: 20px; line-height: 1.7; }
.qr-box { width: 200px; height: 200px; margin: 0 auto 12px; padding: 8px; background: #fff; border-radius: 12px; }
.qr-box svg { width: 100%; height: 100%; stroke: none; stroke-width: 1; stroke-linecap: butt; stroke-linejoin: miter; }
.secret-row { display: flex; align-items: center; justify-content: center; gap: 8px; margin-bottom: 14px; }
.twofa-setup .input { margin-bottom: 12px; }
.twofa-setup .btn-lg { width: 100%; }
.backup-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 12px; }
.backup-grid span { font-family: ui-monospace, Menlo, monospace; font-weight: 700; text-align: center; padding: 10px; border-radius: 8px; background: var(--bg-deep); letter-spacing: .08em; }

/* ---------------------------------------------------------------- PvP duels */
.coin-face { display: block; stroke: none; fill: none; filter: drop-shadow(0 3px 5px rgba(0, 0, 0, .35)); }
.duel-top { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 18px; margin-bottom: 8px; }
.duel-top > .card { min-width: 0; }
.duel-stake { min-width: 0; }
.duel-stake .rb-input { min-width: 0; }
.duel-stake .rb-input input { min-width: 0; width: 100%; }
.duel-sides { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.duel-side { min-width: 0; }
.duel-create h3, .duel-how h3 { margin-bottom: 6px; }
.duel-create > p, .duel-how > p { margin: 0 0 16px; line-height: 1.55; }
.duel-sides { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 16px; }
.duel-side { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-radius: 12px; background: var(--panel-2); border: 2px solid transparent; font-size: 16px; }
.duel-side:hover { border-color: var(--panel-3); }
.duel-side.active { border-color: var(--green); background: color-mix(in srgb, var(--green) 8%, var(--panel-2)); }
.duel-create .btn-lg { width: 100%; }
.duel-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.duel-stats > div { background: var(--panel-2); border-radius: 10px; padding: 12px 14px; display: flex; flex-direction: column; gap: 4px; }
.duel-stats b { font-size: 18px; }
.duel-list { display: flex; flex-direction: column; gap: 8px; }
.duel-row { display: grid; grid-template-columns: 42px 1fr auto auto; align-items: center; gap: 14px; padding: 12px 16px; border-radius: 10px; background: var(--panel); }
.duel-row.mine { box-shadow: inset 3px 0 0 var(--blue); }
.duel-who { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.duel-who small { font-size: 12px; }
.dw-line { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 0; min-width: 0; }
.dw-name { display: inline-flex; align-items: center; min-width: 0; }
.dw-name b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dw-vs { margin: 0 10px; font-size: 13px; }
.duel-amt { font-weight: 800; font-variant-numeric: tabular-nums; }
.duel-crown { display: inline-grid; place-items: center; width: 18px; height: 18px; border-radius: 4px; background: var(--green); color: var(--green-ink); font-size: 10px; font-weight: 900; margin-right: 6px; vertical-align: 1px; }
.duel-detail { display: grid; place-items: center; margin-bottom: 8px; }
.flip-dlg { text-align: center; padding: 4px 4px 2px; }
.flip-vs { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 12px; }
.fv-p { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 16px 10px 14px; border-radius: 12px; background: var(--panel-2); border: 2px solid transparent; min-width: 0; transition: border-color .25s, opacity .25s, transform .25s; }
.fv-name { max-width: 100%; display: flex; justify-content: center; }
.fv-side { font-size: 11px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.fv-vs { font-weight: 900; font-size: 15px; color: var(--muted); }
.flip-dlg.landed .fv-p.win { border-color: var(--green); background: color-mix(in srgb, var(--green) 10%, var(--panel-2)); transform: translateY(-2px); }
.flip-dlg.landed .fv-p.win .fv-side { color: var(--green); }
.flip-dlg.landed .fv-p.lose { opacity: .45; }
.flip-stage { position: relative; height: 270px; perspective: 900px; }
.flip-toss { position: absolute; left: 50%; bottom: 34px; width: 132px; height: 132px; margin-left: -66px; transform-style: preserve-3d; }
.flip-coin { position: relative; width: 100%; height: 100%; transform-style: preserve-3d; }
.flip-face { position: absolute; inset: 0; backface-visibility: hidden; -webkit-backface-visibility: hidden; }
.flip-face .coin-face { filter: none; }
.flip-back { transform: rotateX(180deg); }
.flip-shadow { position: absolute; left: 50%; bottom: 22px; width: 116px; height: 18px; border-radius: 50%; background: radial-gradient(rgba(0, 0, 0, .7), transparent 70%); transform: translateX(-50%); opacity: .55; }
.flip-res { min-height: 112px; display: flex; flex-direction: column; align-items: center; gap: 4px; opacity: 0; transform: translateY(8px); transition: opacity .25s, transform .25s; }
.flip-dlg.landed .flip-res { opacity: 1; transform: none; }
.flip-title { font-size: 28px; font-weight: 900; line-height: 1.1; }
.flip-amt { font-size: 22px; font-weight: 900; font-variant-numeric: tabular-nums; }
.flip-res p { margin: 2px 0 0; }
.duel-mode { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; padding: 5px; border-radius: 12px; background: var(--bg-deep); margin-bottom: 14px; }
.duel-mode button { display: flex; align-items: center; justify-content: center; gap: 8px; height: 40px; border-radius: 8px; font-weight: 700; color: var(--muted); }
.duel-mode button:hover { color: var(--text); }
.duel-mode button.active { background: var(--panel-3); color: var(--text); }
.duel-blurb { margin: 0 0 16px; min-height: 2.8em; }
.duel-stake { display: grid; grid-template-columns: 1fr auto auto; gap: 8px; }
.duel-stake .btn { min-width: 48px; }
.duel-win { display: flex; align-items: center; gap: 8px; margin: 2px 0 16px; }
.duel-win b { color: var(--green); font-size: 16px; }
.duel-how h3 { display: flex; align-items: center; gap: 8px; }
.duel-how p { line-height: 1.6; margin-bottom: 18px; }
@media (max-width: 860px) { .duel-top { grid-template-columns: minmax(0, 1fr); } .duel-row { grid-template-columns: 36px 1fr auto; } .duel-row .duel-winner { display: none; } }

/* ---------------------------------------------------------------- challenges / race / badges / hall of fame */
.rw-comp { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-top: 20px; align-items: start; }
.rw-comp .card { margin: 0; }
.ch-head, .race-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; margin-bottom: 14px; }
.ch-head h3 { display: flex; align-items: center; gap: 10px; margin: 0; }
.ch-head h3 svg { color: var(--green); }
.ch-list { display: flex; flex-direction: column; gap: 10px; }
.ch-item { display: grid; grid-template-columns: 40px 1fr auto; gap: 14px; align-items: center; padding: 12px; border-radius: 10px; background: var(--panel-2); }
.ch-item.done { box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--green) 45%, transparent); }
.ch-ico { width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; background: var(--bg-deep); color: var(--muted); }
.ch-item.done .ch-ico { color: var(--green); }
.ch-title { font-weight: 700; margin-bottom: 6px; }
.ch-bar { height: 6px; border-radius: 999px; background: var(--bg-deep); overflow: hidden; margin-bottom: 6px; }
.ch-bar div { height: 100%; background: linear-gradient(90deg, var(--blue), var(--green)); border-radius: 999px; transition: width .4s; }
.ch-claimed { display: inline-flex; align-items: center; gap: 6px; color: var(--green); font-weight: 700; font-size: 13px; }
.ch-claimed svg { width: 15px; height: 15px; }
.ch-sweep { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 12px; padding: 12px 14px; border-radius: 10px; background: linear-gradient(90deg, rgba(255, 106, 0, .12), transparent); }
.ch-sweep > span { display: flex; align-items: center; gap: 8px; }
.ch-sweep svg { color: #ff8a00; }
.rw-ch { color: inherit; }
.race-card { background: linear-gradient(150deg, color-mix(in srgb, var(--blue) 18%, var(--panel)), var(--panel) 60%); }
.race-head { justify-content: flex-start; }
.race-game { width: 48px; height: 48px; border-radius: 12px; display: grid; place-items: center; background: var(--bg-deep); color: var(--blue); flex-shrink: 0; }
.race-game svg { width: 26px; height: 26px; }
.race-label { font-size: 11px; font-weight: 900; letter-spacing: .14em; color: #ffc700; }
.race-head h3 { margin: 4px 0; }
.race-head h3 a { color: #5fa8ff; }
.race-table { display: flex; flex-direction: column; gap: 4px; }
.race-row { display: grid; grid-template-columns: 44px 1fr auto 70px; gap: 10px; align-items: center; padding: 9px 12px; border-radius: 8px; background: rgba(0, 0, 0, .18); }
.race-row.me { box-shadow: inset 3px 0 0 var(--blue); }
.race-row > span:last-child { text-align: right; font-weight: 700; }
.race-me, .race-last { margin-top: 12px; }
.badge-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.badge-medal { --c1: #c69c6d; --c2: #7a5a36; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 6px; padding: 16px 12px; border-radius: 12px; background: var(--panel); }
.badge-medal.silver { --c1: #dfe7f2; --c2: #7d8ba0; }
.badge-medal.gold { --c1: #ffd84d; --c2: #b37a00; }
.badge-medal.diamond { --c1: #c9a8ff; --c2: #5b2fb0; }
.badge-medal.black { --c1: #3a3a3a; --c2: #000; }
.bm-disc { width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center; background: radial-gradient(circle at 35% 30%, var(--c1), var(--c2)); color: #fff; box-shadow: 0 0 0 3px color-mix(in srgb, var(--c1) 40%, transparent), 0 6px 14px rgba(0, 0, 0, .35); }
.badge-medal.black .bm-disc { box-shadow: 0 0 0 3px #555, 0 0 14px rgba(255, 255, 255, .15); }
.bm-disc svg { width: 26px; height: 26px; filter: drop-shadow(0 1px 1px rgba(0, 0, 0, .4)); }
.badge-medal b { font-size: 14px; }
.badge-medal small { color: var(--muted); font-size: 12px; line-height: 1.35; }
.badge-medal.locked { opacity: .45; }
.badge-medal.locked .bm-disc { background: var(--panel-3); box-shadow: none; color: var(--dim); }
.lb-bar { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; flex-wrap: wrap; }
.lb-period button:disabled { opacity: .4; cursor: default; }
.lb-note { margin: -14px 0 18px; }
.lb-note a { color: #5fa8ff; }
.hof-now { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; background: linear-gradient(120deg, rgba(255, 199, 0, .12), var(--panel) 55%); }
.hof-now h3 { margin: 4px 0 6px; }
.hof-now p { margin: 0; }
.hof-season h2 { margin: 26px 0 12px; }
.hof-cats { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; }
.hof-cat { margin: 0; }
.hof-cat h4 { margin: 0 0 10px; }
.hof-row { display: grid; grid-template-columns: 44px 1fr auto; gap: 10px; align-items: center; padding: 7px 0; }
.hof-rank { font-size: 11px; font-weight: 900; text-transform: uppercase; letter-spacing: .08em; }
.hof-rank.r1 { color: #ffc700; } .hof-rank.r2 { color: #c9d4e3; } .hof-rank.r3 { color: #e0904f; }
@media (max-width: 1000px) { .rw-comp { grid-template-columns: 1fr; } }

.integrity-list { grid-column: 1 / -1; display: flex; flex-direction: column; gap: 6px; padding: 12px 14px; border-radius: 10px; background: color-mix(in srgb, var(--red) 10%, var(--panel-2)); border: 1px solid color-mix(in srgb, var(--red) 40%, transparent); }
.integrity-list > div { display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; }

/* ================================================================ glass skin
   Translucent panels over a softly lit, grainy background (Rainbet-style), with frosted
   overlays for anything that floats above content. Colours come from the theme variables. */
body {
  background:
    radial-gradient(1100px 620px at 12% -12%, color-mix(in srgb, var(--blue) 20%, transparent), transparent 62%),
    radial-gradient(900px 560px at 104% 4%, color-mix(in srgb, var(--p3) 55%, transparent), transparent 64%),
    radial-gradient(1000px 700px at 50% 118%, color-mix(in srgb, var(--blue) 10%, transparent), transparent 60%),
    var(--bg);
  background-attachment: fixed;
}
/* Fine film grain so large surfaces don't look flat or synthetic. */
body::before {
  content: ''; position: fixed; inset: 0; pointer-events: none; z-index: 0; opacity: .06; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
#app { position: relative; z-index: 1; }

/* Frame: frosted header and sidebar */
#topbar {
  background: color-mix(in srgb, var(--bg) 62%, transparent);
  backdrop-filter: blur(18px) saturate(150%); -webkit-backdrop-filter: blur(18px) saturate(150%);
  border-bottom: 1px solid var(--line); box-shadow: none;
}
/* Sidebar and chat sit beside the page, never over it: under them is only the smooth background
   glow, so a backdrop blur there cost GPU time on every frame without being visible. */
#sidebar, #chat {
  background: color-mix(in srgb, var(--p1) 55%, transparent);
  box-shadow: none;
}
#sidebar { border-right: 1px solid var(--line); }
#chat { border-left: 1px solid var(--line); }
.sb-head { box-shadow: none; border-bottom: 1px solid var(--line); }
.sb-group { background: color-mix(in srgb, var(--p2) 45%, transparent); border: 1px solid var(--line); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .04); }
.sb-link { border-radius: 8px; margin: 2px 4px; transition: background .15s, color .15s; }
.sb-link:hover { background: rgba(255, 255, 255, .05); }
.sb-link.active {
  background: linear-gradient(90deg, color-mix(in srgb, var(--blue) 30%, transparent), color-mix(in srgb, var(--blue) 10%, transparent));
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--blue) 50%, transparent);
}
.sb-link.active svg { color: color-mix(in srgb, var(--blue) 60%, #fff); }
.sb-tab { box-shadow: inset 0 1px 0 rgba(255, 255, 255, .22), inset 0 -2px 0 rgba(0, 0, 0, .18); border: 1px solid rgba(255, 255, 255, .1); }
.sb-tab.casino { background: linear-gradient(180deg, color-mix(in srgb, var(--blue) 82%, #fff), var(--blue) 55%, var(--blue-dark)); }
#footer { background: color-mix(in srgb, var(--d0) 55%, transparent); border-top: 1px solid var(--line); }

/* Surfaces */
.card, .game-shell, .game-info, .stat-box, .lb-row, .lb-pod, .duel-row, .ch-item, .race-card, .hof-cat, .theme-opt, .fv-p, .wl-card {
  border: 1px solid var(--line);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .04), 0 10px 30px rgba(0, 0, 0, .18);
}
.stat-box, .theme-opt, .fv-p { box-shadow: inset 0 1px 0 rgba(255, 255, 255, .04); }
.game-shell { box-shadow: inset 0 1px 0 rgba(255, 255, 255, .05), 0 18px 44px rgba(0, 0, 0, .28); }
.controls { background: color-mix(in srgb, var(--p2) 55%, transparent); border-right: 1px solid var(--line); }
.stage { background: color-mix(in srgb, var(--d0) 45%, transparent); }
table.bets tbody tr:nth-child(odd) { background: rgba(255, 255, 255, .025); }
table.bets tbody tr:hover { background: rgba(255, 255, 255, .06); }

/* Things that float above content: opaque so text stays readable (no backdrop blur: it can't show
   through an opaque background, it only cost GPU time) */
.modal, .dropdown, .bal-menu, .rw-panel, .toast {
  background: linear-gradient(180deg, var(--p2), var(--solid));
  border: 1px solid rgba(255, 255, 255, .1);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .06), 0 24px 60px rgba(0, 0, 0, .5);
}
.toast { border-left: 3px solid var(--blue); }
/* A darker tint instead of a full-screen blur, which re-rendered on every frame of a live table behind it. */
.modal-backdrop { background: color-mix(in srgb, var(--d0) 74%, transparent); }

/* Header pieces: boxed like the rest */
.wallet-bal { background: color-mix(in srgb, var(--d0) 55%, transparent); border: 1px solid var(--line); border-right: 0; }
.user-chip, .icon-btn.boxed, .boost-pill { background: color-mix(in srgb, var(--p2) 50%, transparent); border: 1px solid var(--line); }
.icon-btn:hover { background: rgba(255, 255, 255, .06); }

/* Buttons: glossy, with a lit top edge and a soft colour glow */
.btn { border: 1px solid var(--line); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .06); }
.btn:hover { background: var(--hover); }
.btn-green, .btn-blue { border: 1px solid rgba(255, 255, 255, .14); text-shadow: 0 1px 0 rgba(0, 0, 0, .18); }
.btn-green {
  background: linear-gradient(180deg, color-mix(in srgb, var(--green) 78%, #fff), var(--green) 48%, var(--green-dark));
  color: #06210f;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .4), inset 0 -2px 0 rgba(0, 0, 0, .14), 0 6px 18px color-mix(in srgb, var(--green) 26%, transparent);
  text-shadow: 0 1px 0 rgba(255, 255, 255, .25);
}
.btn-green:hover { background: linear-gradient(180deg, color-mix(in srgb, var(--green) 70%, #fff), color-mix(in srgb, var(--green) 92%, #fff) 48%, var(--green)); }
.btn-blue {
  background: linear-gradient(180deg, color-mix(in srgb, var(--blue) 80%, #fff), var(--blue) 50%, var(--blue-dark));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .3), inset 0 -2px 0 rgba(0, 0, 0, .18), 0 6px 18px color-mix(in srgb, var(--blue) 28%, transparent);
}
.btn-blue:hover { background: linear-gradient(180deg, color-mix(in srgb, var(--blue) 70%, #fff), color-mix(in srgb, var(--blue) 90%, #fff) 50%, var(--blue)); }
.btn-ghost { border-color: transparent; box-shadow: none; }

/* Inputs and segmented controls */
.input-wrap { background: color-mix(in srgb, var(--d0) 50%, transparent); border: 1px solid var(--line); box-shadow: none; padding: 0; }
.input-wrap input, .input-wrap select, .input { background: transparent; border: 0; }
.input { background: color-mix(in srgb, var(--d0) 50%, transparent); border: 1px solid var(--line); }
.input-wrap:focus-within, .input:focus { border-color: color-mix(in srgb, var(--blue) 70%, transparent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--blue) 18%, transparent); }
.input-wrap .inner-btn { border-left: 1px solid var(--line); }
.seg, .tabs-row, .cat-tabs, .duel-mode { background: color-mix(in srgb, var(--d0) 50%, transparent); border: 1px solid var(--line); }
.search input { background: color-mix(in srgb, var(--d0) 50%, transparent); border: 1px solid var(--line); }
.search input:focus { border-color: color-mix(in srgb, var(--blue) 70%, transparent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--blue) 18%, transparent); }

/* Game cards: crisp edge and lift on hover */
.game-card { box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .12), inset 0 1px 0 rgba(255, 255, 255, .25), 0 10px 24px rgba(0, 0, 0, .3); }
.game-card:hover { box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .22), inset 0 1px 0 rgba(255, 255, 255, .3), 0 16px 34px rgba(0, 0, 0, .38); }

/* Headings: a touch tighter */
h1, h2, h3, .page-head h1 { letter-spacing: -.01em; }

/* Long balances on phones: let the wallet shrink and truncate instead of pushing the header wider. */
@media (max-width: 600px) {
  #topbar { grid-template-columns: auto minmax(0, 1fr) auto; }
  .top-center, .wallet { min-width: 0; }
  .wallet-bal { min-width: 0; flex: 0 1 auto; }
  .wallet-bal .amt-v { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
}
/* Wide tables scroll inside their box on narrow screens instead of widening the page. */
#view div:has(> table) { overflow-x: auto; max-width: 100%; scrollbar-width: thin; }

/* ================================================================ Halloween theme (optional, Settings → Preferences)
   Pumpkin-orange glow, corner spider webs and a few bats drifting past. Decorations never catch clicks. */
:root[data-theme="halloween"] body {
  background:
    radial-gradient(1000px 560px at 10% -10%, rgba(255, 122, 26, .20), transparent 62%),
    radial-gradient(900px 600px at 105% 0%, rgba(140, 60, 200, .26), transparent 64%),
    radial-gradient(1100px 600px at 50% 120%, rgba(255, 96, 0, .16), transparent 62%),
    var(--bg);
  background-attachment: fixed;
}
.hw-deco { position: fixed; inset: 0; pointer-events: none; z-index: 2; overflow: hidden; }
.hw-web { position: absolute; width: 240px; height: 240px; opacity: .13; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 240 240'%3E%3Cpath d='M240 0L240.0 250.0 M240 0L184.4 243.7 M240 0L131.5 225.2 M240 0L84.1 195.5 M240 0L44.5 155.9 M240 0L14.8 108.5 M240 0L-3.7 55.6 M240 0L-10.0 0.0 M240.0 34.0Q236.7 29.5 232.4 33.1Q230.2 28.1 225.2 30.6Q224.2 25.2 218.8 26.6Q219.0 21.0 213.4 21.2Q214.8 15.8 209.4 14.8Q211.9 9.8 206.9 7.6Q210.5 3.3 206.0 0.0 M240.0 66.0Q233.5 57.4 225.3 64.3Q220.9 54.5 211.4 59.5Q209.3 48.9 198.8 51.6Q199.2 40.8 188.4 41.2Q191.1 30.7 180.5 28.6Q185.5 19.1 175.7 14.7Q182.6 6.5 174.0 0.0 M240.0 100.0Q230.2 86.9 217.7 97.5Q211.1 82.5 196.6 90.1Q193.5 74.0 177.7 78.2Q178.2 61.8 161.8 62.3Q166.0 46.5 149.9 43.4Q157.5 28.9 142.5 22.3Q153.1 9.8 140.0 0.0 M240.0 138.0Q226.5 119.9 209.3 134.5Q200.1 113.9 180.1 124.3Q175.8 102.2 154.0 107.9Q154.7 85.3 132.1 86.0Q137.8 64.2 115.7 59.9Q126.1 39.9 105.5 30.7Q120.1 13.5 102.0 0.0 M240.0 180.0Q222.4 156.4 199.9 175.5Q188.0 148.6 161.9 162.2Q156.3 133.3 127.8 140.7Q128.7 111.3 99.3 112.2Q106.7 83.7 77.8 78.1Q91.4 52.0 64.5 40.1Q83.6 17.6 60.0 0.0 M240.0 224.0Q218.1 194.6 190.2 218.4Q175.3 184.9 142.8 201.8Q135.8 165.9 100.3 175.1Q101.5 138.5 64.9 139.7Q74.1 104.2 38.2 97.2Q55.1 64.7 21.6 49.8Q45.4 21.9 16.0 0.0' fill='none' stroke='white' stroke-width='1.1' stroke-linecap='round' opacity='.9'/%3E%3Cpath d='M180 0v62' stroke='white' stroke-width='.9'/%3E%3Cg transform='translate%28180 70%29'%3E%3Cellipse rx='6' ry='8' fill='white'/%3E%3Ccircle cy='-9' r='4' fill='white'/%3E%3Cpath d='M-5 -4l-9 -6M-6 0l-10 0M-5 4l-9 6M5 -4l9 -6M6 0l10 0M5 4l9 6' stroke='white' stroke-width='1.4' stroke-linecap='round'/%3E%3C/g%3E%3C/svg%3E") no-repeat center / contain; }
.hw-web.tr { top: var(--top); right: 0; }
.hw-web.bl { bottom: 0; left: var(--sidebar); transform: rotate(180deg); width: 190px; height: 190px; opacity: .09; }
body.sb-collapsed .hw-web.bl { left: var(--sidebar-mini); }
.hw-bat { position: absolute; left: -60px; width: 34px; height: 20px; color: #0b0610; filter: drop-shadow(0 0 6px rgba(255, 122, 26, .45)); animation: hwFly linear infinite; }
.hw-bat svg { width: 100%; height: 100%; fill: currentColor; stroke: none; animation: hwFlap .22s ease-in-out infinite alternate; transform-origin: 50% 40%; }
.hw-bat:nth-child(3) { top: 14%; animation-duration: 26s; animation-delay: -4s; }
.hw-bat:nth-child(4) { top: 32%; width: 24px; height: 14px; animation-duration: 34s; animation-delay: -19s; }
.hw-bat:nth-child(5) { top: 58%; width: 28px; height: 17px; animation-duration: 41s; animation-delay: -30s; }
@keyframes hwFly {
  0% { transform: translate(0, 0); }
  25% { transform: translate(28vw, -40px); }
  50% { transform: translate(56vw, 20px); }
  75% { transform: translate(84vw, -30px); }
  100% { transform: translate(calc(100vw + 120px), 0); }
}
@keyframes hwFlap { from { transform: scaleY(1); } to { transform: scaleY(.45); } }
body.reduce-motion .hw-bat { display: none; }
/* Pumpkin-orange touches */
:root[data-theme="halloween"] .logo-mark { filter: drop-shadow(0 0 8px rgba(255, 122, 26, .45)); }
:root[data-theme="halloween"] .btn-blue { color: #2a1000; text-shadow: 0 1px 0 rgba(255, 255, 255, .25); }
:root[data-theme="halloween"] .sb-tab.casino { color: #2a1000; }
.theme-prev .hw-pumpkin { position: absolute; right: 8px; bottom: 6px; width: 22px; height: 22px; }
@media (max-width: 860px) { .hw-web.bl { left: 0; } .hw-web { width: 160px; height: 160px; } }

/* Player names and profile cards */
.plink { padding: 0; font-weight: inherit; color: inherit; cursor: pointer; border-radius: 4px; text-align: left; }
.plink:hover { color: color-mix(in srgb, var(--blue) 55%, #fff); text-decoration: underline; text-underline-offset: 3px; }
.plink.strong { font-weight: 700; }
.plink-hidden { display: inline-flex; align-items: center; gap: 5px; color: var(--dim); font-weight: 600; }
.plink-hidden svg { width: 14px; height: 14px; }
.pp-head { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; }
.pp-mark { width: 54px; height: 54px; flex: none; border-radius: 12px; display: grid; place-items: center; font-size: 24px; font-weight: 800;
  background: linear-gradient(160deg, color-mix(in srgb, var(--blue) 70%, #fff 10%), var(--blue-dark)); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .3); }
.pp-who { min-width: 0; flex: 1; }
.pp-name { font-size: 20px; font-weight: 800; display: flex; align-items: center; gap: 8px; overflow: hidden; text-overflow: ellipsis; }
.pp-sub { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 4px; }
.pp-vip { color: var(--c); font-weight: 700; font-size: 13px; }
.pp-rank { display: flex; flex-direction: column; align-items: flex-end; padding: 8px 12px; border-radius: 10px; background: var(--panel-2); border: 1px solid var(--line); }
.pp-rank small { color: var(--muted); font-size: 11px; }
.pp-rank b { font-size: 18px; }
.pp-tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.pp-tile { background: var(--panel-2); border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.pp-tile > span { color: var(--muted); font-size: 12px; }
.pp-tile b { font-size: 16px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pp-game { display: inline-flex; align-items: center; gap: 6px; }
.pp-game svg { width: 15px; height: 15px; color: var(--muted); }
.pp-h { display: flex; align-items: center; gap: 8px; margin: 20px 0 10px; font-size: 15px; }
.pp-h svg { color: var(--muted); }
.pp-wins { display: flex; flex-direction: column; gap: 6px; }
.pp-win { display: grid; grid-template-columns: minmax(0, 1fr) auto auto auto; align-items: center; gap: 14px; padding: 10px 14px; border-radius: 10px; background: var(--panel-2); border: 1px solid var(--line); text-align: left; }
.pp-win:hover { background: var(--panel-3); }
.pp-mult { font-variant-numeric: tabular-nums; }
.pp-badges { display: flex; flex-wrap: wrap; gap: 8px; }
.pp-private { display: flex; gap: 14px; align-items: center; padding: 18px; border-radius: 12px; background: var(--panel-2); border: 1px solid var(--line); }
.pp-private > svg { width: 28px; height: 28px; color: var(--muted); }
.pp-private p { margin: 4px 0 0; }
@media (max-width: 560px) {
  .pp-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pp-win { grid-template-columns: minmax(0, 1fr) auto; }
  .pp-win .muted { display: none; }
  .pp-head { flex-wrap: wrap; }
}
.badge-medal.sm { padding: 0; background: none; border: 0; box-shadow: none; }
.badge-medal.sm .bm-disc { width: 40px; height: 40px; }
.badge-medal.sm .bm-disc svg { width: 19px; height: 19px; }

/* Sidebar rows: long names truncate instead of pushing badges out of the panel. */
.sb-link > span:not(.badge) { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.sb-link .badge { flex: none; }

/* Category pages (e.g. Play Blackjack) */
.cat-head { display: flex; align-items: center; gap: 14px; margin-bottom: 22px; }
.cat-head h1 { margin: 0; font-size: 28px; letter-spacing: -.01em; }
.cat-back { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: var(--panel-2); border: 1px solid var(--line); color: var(--text); }
.cat-back:hover { background: var(--panel-3); }
.cat-ico svg { width: 28px; height: 28px; color: color-mix(in srgb, var(--blue) 60%, #fff); }
.cat-tools { display: flex; flex-direction: column; gap: 16px; padding: 22px; }
.cat-tools .search { margin: 0; }
.cat-chips { display: flex; flex-wrap: wrap; gap: 12px; }
.cat-chips button { display: inline-flex; align-items: center; gap: 10px; height: 48px; padding: 0 20px; border-radius: 10px; font-weight: 700;
  background: var(--panel-2); border: 1px solid var(--line); color: var(--muted); }
.cat-chips button:hover { color: var(--text); background: var(--panel-3); }
.cat-chips button.active { color: var(--text); background: var(--panel-3); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--blue) 55%, transparent); }
.cat-sec { margin-top: 28px; }
.cat-sec h3 { display: flex; align-items: center; gap: 10px; margin: 0 0 14px; font-size: 17px; }
.cat-sec h3 svg { color: var(--muted); }
.cat-sec h3 .muted { font-weight: 500; margin-left: 4px; }
.cat-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); margin: 26px 0 0; }
@media (max-width: 560px) {
  .cat-head h1 { font-size: 22px; }
  .cat-chips { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .cat-chips button { height: 42px; padding: 0 10px; gap: 8px; justify-content: center; white-space: nowrap; font-size: 13px; }
  .cat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cat-sec h3 .muted { display: none; }
}

.table-card { position: relative; }
.table-card .tc-lock { position: absolute; top: 10px; left: 10px; display: inline-flex; align-items: center; gap: 5px; padding: 3px 8px; border-radius: 6px;
  font-size: 11px; font-weight: 800; color: #ffd76a; background: rgba(12, 10, 4, .7); border: 1px solid rgba(255, 199, 0, .45); }
.table-card .tc-lock svg { width: 11px; height: 11px; }
.table-card.private { box-shadow: inset 0 0 0 1px rgba(255, 199, 0, .45), 0 10px 24px rgba(0, 0, 0, .3); }
.table-card .gc-brand { letter-spacing: .02em; text-transform: none; font-size: 11px; opacity: .9; }
.table-card .gc-icon .art { transform: scale(1.12); transform-origin: 50% 40%; }
/* The table picture is wider than tall: size its box to the drawing so it never reaches the name. */
.table-card { container-type: inline-size; }
.table-card .gc-icon { aspect-ratio: 120 / 100; top: 15%; }
.table-card .gc-brand { line-height: 1.3; }
/* Long names (Black Diamond, player-made tables) stay on one line and shrink to fit the card. */
.table-card .gc-name.long { white-space: nowrap; font-size: min(19px, 10.4cqi); max-width: 100%; overflow: hidden; text-overflow: ellipsis; }

/* Sidebar group headings (small caps label, links to the full list) */
.sb-head-link { display: block; padding: 10px 16px 6px; font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--dim); }
.sb-head-link:hover { color: var(--text); }
body.sb-collapsed .sb-head-link { display: none; }

/* Lobby hero */
.lhero { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.35fr); gap: 22px; margin-bottom: 28px; align-items: stretch; }
.lh-left { display: flex; flex-direction: column; justify-content: center; gap: 18px; min-width: 0; }
.lhero h1 { margin: 0; font-size: 34px; font-weight: 800; letter-spacing: -.02em; line-height: 1.15; overflow-wrap: anywhere; }
.lh-accent { color: color-mix(in srgb, var(--blue) 70%, #fff); }
.lh-sub { margin: 0; color: var(--muted); font-size: 15px; line-height: 1.55; max-width: 460px; }
.lh-cta { display: flex; gap: 10px; flex-wrap: wrap; }
.lh-cta .btn { width: auto; padding: 0 26px; }
.lh-progress { display: block; border-radius: 12px; background: var(--panel); border: 1px solid var(--line); overflow: hidden; }
.lh-progress:hover { border-color: rgba(255, 255, 255, .16); }
.lh-ph { display: block; padding: 12px 18px; font-weight: 600; background: rgba(255, 255, 255, .03); border-bottom: 1px solid var(--line); }
.lh-pb { display: flex; flex-direction: column; gap: 12px; padding: 16px 18px 18px; }
.lh-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; font-weight: 600; }
.lh-bar { height: 10px; border-radius: 6px; background: var(--d0); overflow: hidden; }
.lh-bar i { display: block; height: 100%; border-radius: 6px; background: linear-gradient(90deg, var(--blue-dark), color-mix(in srgb, var(--blue) 75%, #fff)); }
.lh-tiers { font-size: 13px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.lh-tiers span { display: inline-flex; align-items: center; gap: 6px; }
.lh-tiers svg { width: 15px; height: 15px; }
.lh-tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; min-width: 0; }
.lh-tile { position: relative; display: flex; flex-direction: column; border-radius: 12px; overflow: hidden; background: var(--panel-2); border: 1px solid var(--line); min-height: 220px; }
.lh-tile:hover .lh-collage { transform: rotate(-8deg) scale(1.04); }
.lh-collage { flex: 1; display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; padding: 6px; transform: rotate(-8deg) scale(1.12); transform-origin: 50% 40%; transition: transform .35s; margin: -14px -10px 0; }
.lh-mini { aspect-ratio: 1; border-radius: 9px; display: grid; place-items: center; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .2), 0 6px 14px rgba(0, 0, 0, .3); }
.lh-mini .art { width: 74%; height: 74%; }
.lh-tile-bar { position: relative; z-index: 1; display: flex; align-items: center; gap: 10px; padding: 14px 18px; font-size: 18px;
  background: linear-gradient(180deg, color-mix(in srgb, var(--blue) 70%, #000 10%), var(--blue-dark)); box-shadow: 0 -10px 24px rgba(0, 0, 0, .35); }
.lh-tile-bar svg { width: 22px; height: 22px; }
.lh-arrow { margin-left: 4px; display: inline-flex; transition: transform .2s; }
.lh-arrow svg { transform: rotate(180deg); width: 18px; height: 18px; }
.lh-tile:hover .lh-arrow { transform: translateX(4px); }
@media (max-width: 1100px) { .lhero { grid-template-columns: 1fr; } }
@media (max-width: 560px) {
  .lhero h1 { font-size: 26px; }
  .lh-tile { min-height: 150px; }
  .lh-tile-bar { font-size: 15px; padding: 11px 14px; }
}
/* Calmer details: regular-weight navigation, no coloured glow under buttons. */
.sb-link { font-weight: 500; }
.sb-link.active { font-weight: 600; }
.btn-green { box-shadow: inset 0 1px 0 rgba(255, 255, 255, .35), inset 0 -2px 0 rgba(0, 0, 0, .14); }
.btn-blue { box-shadow: inset 0 1px 0 rgba(255, 255, 255, .25), inset 0 -2px 0 rgba(0, 0, 0, .18); }
.section-title h2 { font-weight: 700; }
.lh-tile-bar b { white-space: nowrap; }
@media (max-width: 560px) { .lh-tile-bar { font-size: 14px; gap: 8px; } .lh-tile-bar svg { width: 18px; height: 18px; } .lh-arrow { display: none; } }

/* Blackjack cards: 3D card with a front and a back; dealt one at a time from the shoe (top right). */
.bj-card { background: none; box-shadow: none; padding: 0; animation: none; display: block; perspective: 700px; flex: none; }
.bj-flip { position: absolute; inset: 0; transform-style: preserve-3d; }
.bj-face { position: absolute; inset: 0; border-radius: 8px; backface-visibility: hidden; -webkit-backface-visibility: hidden; box-shadow: 0 4px 10px rgba(0, 0, 0, .45); }
.bj-front { background: #fff; color: #0f212e; display: flex; flex-direction: column; justify-content: space-between; padding: 6px 8px; font-weight: 800; }
.bj-card.red .bj-front { color: #e9113c; }
.bj-backface { transform: rotateY(180deg); background: repeating-linear-gradient(45deg, var(--blue) 0 6px, var(--blue-dark) 6px 12px); border: 4px solid #fff; }
.bj-card.down .bj-flip { transform: rotateY(180deg); }
.bj-card.fly { animation: bjFly .42s cubic-bezier(.2, .8, .25, 1) both; animation-delay: var(--d); }
.bj-card.fly:not(.down) .bj-flip { animation: bjFlip .34s ease-out both; animation-delay: calc(var(--d) + .38s); }
.bj-card.reveal .bj-flip { animation: bjFlip .42s ease-in-out both; animation-delay: var(--d); }
@keyframes bjFly { from { transform: translate(min(42vw, 360px), -260px) rotate(22deg); opacity: 0; } 12% { opacity: 1; } }
@keyframes bjFlip { from { transform: rotateY(180deg); } to { transform: rotateY(0); } }
.bj-late { animation: bjLate .25s ease-out both; }
@keyframes bjLate { from { opacity: 0; transform: translateY(4px); } }
body.reduce-motion .bj-card.fly, body.reduce-motion .bj-card .bj-flip, body.reduce-motion .bj-late { animation: none !important; }

/* ---------------------------------------------------------------- live table shell (js/livetable.js) */
.lt-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; z-index: 7; color: #fff; container-type: inline-size; }
.lt-top.lt-over { position: absolute; left: 12px; right: 12px; top: 12px; pointer-events: none; }
.lt-top.lt-over > * { pointer-events: auto; }
.lt-top.lt-bar { position: relative; margin-bottom: 14px; min-height: 40px; }
.lt-l { display: flex; align-items: center; gap: 8px; min-width: 0; flex: 1 1 auto; }
.lt-r { display: flex; align-items: center; gap: 6px; flex: none; }
/* Solid tints over the live scenes (backdrop blurs here were redrawn on every animation frame). */
.lt-glass, .lt-over .lt-back, .lt-over .lt-title, .lt-ib, .lt-leave, .lt-seatnote {
  background: color-mix(in srgb, var(--d0) 74%, transparent); border: 1px solid rgba(255,255,255,.1);
}
.lt-back { height: 38px; padding: 0 14px 0 9px; border-radius: 999px; display: inline-flex; align-items: center; gap: 6px; font-weight: 700; font-size: 13px; color: #fff; flex: none; transition: background .15s; }
.lt-bar .lt-back { background: var(--panel-2); border: 1px solid var(--line); }
.lt-back:hover { background: color-mix(in srgb, var(--p3) 85%, transparent); }
.lt-back svg { width: 17px; height: 17px; }
.lt-title { display: flex; align-items: center; gap: 10px; min-width: 0; height: 38px; padding: 0 14px; border-radius: 999px; white-space: nowrap; }
.lt-bar .lt-title { padding: 0 4px; }
.lt-name { display: block; font-weight: 700; font-size: 14px; overflow: hidden; text-overflow: ellipsis; min-width: 48px; }
.lt-name svg { vertical-align: -2px; margin-right: 6px; }
.lt-bar .lt-name { font-size: 16px; }
.lt-name svg { width: 14px; height: 14px; color: #ffd76a; }
.lt-lim { color: rgba(255,255,255,.66); font-size: 12px; font-weight: 600; font-variant-numeric: tabular-nums; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.lt-name { flex: 0 1 auto; } .lt-lim { flex: 0 100 auto; } .lt-ppl { flex: none; }
.lt-bar .lt-lim { color: var(--muted); }
.lt-ppl { position: relative; display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 700; color: rgba(255,255,255,.85); font-variant-numeric: tabular-nums; }
.lt-ppl svg { width: 15px; height: 15px; color: rgba(255,255,255,.6); }
.lt-lim + .lt-ppl::before, .lt-name + .lt-lim::before { content: ''; width: 1px; height: 14px; background: rgba(255,255,255,.16); margin-right: 6px; }
.lt-seat:empty { display: none; }
.lt-leave { height: 38px; padding: 0 15px 0 12px; border-radius: 999px; display: inline-flex; align-items: center; gap: 7px; font-weight: 700; font-size: 13px; color: #fff; white-space: nowrap;
  border-color: rgba(255,120,145,.4); transition: background .15s, border-color .15s; }
.lt-bar .lt-leave { background: rgba(237,65,99,.1); }
.lt-leave svg { width: 16px; height: 16px; color: #ff8fa6; }
.lt-leave:hover:not(:disabled) { background: rgba(214,52,84,.5); border-color: rgba(255,150,170,.6); }
.lt-leave:disabled { opacity: .5; cursor: default; }
.lt-seatnote { height: 38px; padding: 0 14px 0 11px; border-radius: 999px; display: inline-flex; align-items: center; gap: 7px; font-size: 12px; font-weight: 600; color: rgba(255,255,255,.8); white-space: nowrap; }
.lt-seatnote svg { width: 15px; height: 15px; color: #ffd34d; }
/* round icon buttons */
.lt-ib { position: relative; width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; color: rgba(255,255,255,.88); padding: 0; flex: none;
  transition: background .15s, color .15s, border-color .15s, transform .1s; }
.lt-bar .lt-ib { background: var(--panel-2); border-color: var(--line); }
.lt-ib svg { width: 18px; height: 18px; }
.lt-ib:hover, .lt-ib.on { color: #fff; background: color-mix(in srgb, var(--p3) 88%, transparent); border-color: rgba(255,255,255,.2); }
.lt-ib:active { transform: scale(.94); }
.lt-ib.sm { width: 30px; height: 30px; background: transparent; border-color: transparent; }
.lt-ib.sm svg { width: 16px; height: 16px; }
.lt-x { flex: 0 0 auto; }
.lt-x svg { color: #fff; }
.lt-badge { position: absolute; top: -3px; right: -3px; min-width: 17px; height: 17px; padding: 0 4px; border-radius: 9px; background: var(--red); color: #fff;
  font: 800 10px/17px Rubik, system-ui, sans-serif; font-style: normal; text-align: center; box-shadow: 0 0 0 2px color-mix(in srgb, var(--d0) 80%, transparent); }
.lt-more { display: none; }
/* tooltips: hover on desktop, a short label after a tap on phones */
.lt-top [data-tip] { position: relative; }
.lt-top [data-tip]::after { content: attr(data-tip); position: absolute; top: calc(100% + 8px); left: 50%; transform: translate(-50%, -3px); white-space: nowrap; pointer-events: none;
  background: #0b0d1f; color: #fff; font: 600 12px/1 Rubik, system-ui, sans-serif; letter-spacing: 0; text-transform: none; padding: 7px 9px; border-radius: 7px;
  border: 1px solid rgba(255,255,255,.1); box-shadow: 0 6px 18px rgba(0,0,0,.45); opacity: 0; transition: opacity .12s, transform .12s; z-index: 9; }
.lt-top .lt-r > [data-tip]:nth-last-child(-n+2)::after { left: auto; right: 0; transform: translate(0, -3px); }
.lt-top .lt-ppl[data-tip]::after { top: calc(100% + 14px); }
/* Left group (✕, back): tooltips start at the button's left edge so they never run off the table. */
.lt-top .lt-l > [data-tip]::after { left: 0; transform: translate(0, -3px); }
.lt-top .lt-l > [data-tip].tip::after { transform: none; }
@media (hover: hover) { .lt-top .lt-l > [data-tip]:hover::after { transform: none; } }
@media (hover: hover) { .lt-top [data-tip]:hover::after { opacity: 1; transform: translate(-50%, 0); } .lt-top .lt-r > [data-tip]:nth-last-child(-n+2):hover::after { transform: none; } }
.lt-top [data-tip].tip::after { opacity: 1; transform: translate(-50%, 0); }
.lt-top .lt-r > [data-tip].tip:nth-last-child(-n+2)::after { transform: none; }
.lt-top .on[data-tip]::after { opacity: 0 !important; }
/* narrow tables: less used tools fold into "more"; limits and player count drop first */
@container (max-width: 640px) {
  .lt-sec { display: none; }
  .lt-more { display: grid; }
  .lt-r { gap: 5px; }
}
@container (max-width: 600px) { .lt-lim { display: none; } .lt-lim + .lt-ppl::before { display: none; } }
@container (max-width: 480px) {
  .lt-back span { display: none; }
  .lt-back { width: 36px; height: 36px; padding: 0; justify-content: center; }
  .lt-title { height: 36px; padding: 0 12px; }
  .lt-bar .lt-title { padding: 0 2px; }
  .lt-ib { width: 36px; height: 36px; }
  .lt-ib svg { width: 17px; height: 17px; }
  .lt-leave, .lt-seatnote { height: 36px; }
  .lt-name, .lt-bar .lt-name { font-size: 13px; }
}
@container (max-width: 400px) { .lt-ppl { display: none; } .lt-l { gap: 6px; } .lt-r { gap: 4px; } .lt-ib { width: 34px; height: 34px; } }
/* popovers (fixed layer, never clipped by the scene) */
.lt-pop { position: fixed; z-index: 96; min-width: 200px; max-width: calc(100vw - 16px); overflow-y: auto; color: var(--text);
  background: color-mix(in srgb, var(--p1) 94%, #000 6%); border: 1px solid rgba(255,255,255,.1); border-radius: 14px; box-shadow: 0 18px 44px rgba(0,0,0,.5);
  animation: ltPop .14s ease-out; }
@keyframes ltPop { from { opacity: 0; transform: translateY(-4px); } }
.lt-sound { display: flex; align-items: center; gap: 12px; padding: 12px 14px; width: 300px; max-width: 100%; }
.lt-mute { display: inline-flex; align-items: center; gap: 8px; height: 36px; padding: 0 12px 0 10px; border-radius: 999px; background: var(--panel-3); font-weight: 700; font-size: 12px; white-space: nowrap; flex: none; }
.lt-mute svg { width: 17px; height: 17px; }
.lt-sound input[type=range] { flex: 1; min-width: 0; height: 4px; -webkit-appearance: none; appearance: none; border-radius: 4px; outline: none;
  background: linear-gradient(90deg, var(--green) var(--v, 50%), rgba(255,255,255,.14) var(--v, 50%)); }
.lt-sound input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 4px rgba(0,0,0,.5); cursor: pointer; }
.lt-sound input[type=range]::-moz-range-thumb { width: 16px; height: 16px; border: 0; border-radius: 50%; background: #fff; cursor: pointer; }
.lt-sound b { width: 38px; text-align: right; font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.lt-hist { width: 360px; max-width: 100%; display: flex; flex-direction: column; }
.lt-tabs { display: flex; gap: 4px; padding: 10px 10px 0; }
.lt-tabs button { flex: 1; height: 34px; border-radius: 8px; font-weight: 700; font-size: 13px; color: var(--muted); }
.lt-tabs button.on { background: var(--panel-3); color: #fff; }
.lt-hbody { padding: 8px 10px 12px; display: flex; flex-direction: column; gap: 2px; }
.lt-hbody .kv, .lt-hrow { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 6px; font-size: 13px; border-bottom: 1px solid var(--line); }
.lt-hbody > :last-child { border-bottom: 0; }
.lt-hrow .muted { font-size: 12px; }
.lt-bet { display: grid; grid-template-columns: 62px 1fr auto 76px; align-items: center; gap: 8px; padding: 9px 6px; border-radius: 8px; font-size: 13px; text-align: left; font-variant-numeric: tabular-nums; }
.lt-bet:hover { background: var(--panel-2); }
.lt-bet .t, .lt-bet .m { color: var(--muted); font-size: 12px; }
.lt-bet b { text-align: right; }
.lt-empty { color: var(--muted); font-size: 13px; padding: 14px 6px; text-align: center; }
.lt-menu { display: flex; flex-direction: column; padding: 6px; min-width: 210px; }
.lt-item { display: flex; align-items: center; gap: 12px; height: 44px; padding: 0 12px; border-radius: 9px; font-weight: 600; font-size: 14px; text-align: left; }
.lt-item:hover { background: var(--panel-2); }
.lt-item svg { color: var(--muted); }
.lt-ask { padding: 14px; width: 270px; max-width: 100%; }
.lt-ask p { margin: 0 0 12px; font-size: 13px; line-height: 1.45; color: var(--text); }
.lt-ask .row { display: flex; gap: 8px; }
.lt-ask button { flex: 1; height: 36px; border-radius: 9px; font-weight: 700; font-size: 13px; background: var(--panel-3); }
.lt-ask .lt-yes { background: #d63454; color: #fff; }
.lt-ask .lt-yes:hover { background: #e43f61; }
/* table chat */
.lt-chat { position: absolute; right: 12px; width: 320px; height: min(440px, calc(100% - 150px)); min-height: 240px; z-index: 6; display: flex; flex-direction: column;
  background: color-mix(in srgb, var(--d0) 88%, transparent); border: 1px solid rgba(255,255,255,.1); border-radius: 14px;
  box-shadow: 0 16px 40px rgba(0,0,0,.4); color: #fff; animation: ltPop .16s ease-out; }
.lt-chat header { display: flex; align-items: center; gap: 10px; padding: 10px 8px 10px 14px; border-bottom: 1px solid rgba(255,255,255,.07); }
.lt-chat-t { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; flex: 1; min-width: 0; }
.lt-chat-t svg { width: 16px; height: 16px; color: var(--muted); }
.lt-viewers { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.lt-viewers svg { width: 14px; height: 14px; }
.lt-chat-list { flex: 1; min-height: 0; overflow-y: auto; padding: 10px 14px; display: flex; flex-direction: column; gap: 7px; scrollbar-width: thin; overscroll-behavior: contain; }
.lt-msg { font-size: 13px; line-height: 1.45; overflow-wrap: anywhere; }
.lt-msg .who { margin-right: 6px; font-weight: 700; }
.lt-msg .who .plink { color: #9fb6ff; font-weight: 700; }
.lt-msg.me .who .plink { color: var(--green); }
.lt-msg .who .rank-badge { margin-left: 4px; vertical-align: 1px; }
.lt-msg .txt { color: rgba(255,255,255,.92); }
.lt-msg.sys { color: var(--muted); font-size: 12px; text-align: center; padding: 2px 0; }
.lt-msg.sys b { color: rgba(255,255,255,.8); font-weight: 600; }
.lt-chat .lt-empty { margin: auto 0; }
.lt-chat-form { display: flex; gap: 8px; padding: 10px; border-top: 1px solid rgba(255,255,255,.07); }
.lt-chat-form input { flex: 1; min-width: 0; height: 40px; padding: 0 14px; border-radius: 999px; outline: none; font-size: 13px;
  background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.1); transition: border-color .15s, background .15s; }
.lt-chat-form input:focus { border-color: rgba(61,123,255,.7); background: rgba(255,255,255,.09); }
.lt-chat-form input::placeholder { color: rgba(255,255,255,.45); }
.lt-send { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--blue); color: #fff; flex: none; }
.lt-send:hover { background: var(--blue-dark); }
.lt-send svg { width: 17px; height: 17px; }
.lt-chat-err { display: none; padding: 0 14px 10px; margin-top: -2px; font-size: 12px; font-weight: 600; color: #ff8aa1; }
.lt-chat.err .lt-chat-err { display: block; }
.lt-chat.sheet { position: fixed; left: 0; right: 0; bottom: 0; top: auto !important; width: auto; height: min(62vh, 520px); max-height: none; z-index: 94;
  border-radius: 16px 16px 0 0; border-bottom: 0; background: color-mix(in srgb, var(--p1) 96%, #000 4%); box-shadow: 0 -12px 40px rgba(0,0,0,.5);
  padding-bottom: env(safe-area-inset-bottom); animation: ltSheet .2s ease-out; }
@keyframes ltSheet { from { transform: translateY(30px); opacity: 0; } }
.lt-chat.sheet .lt-chat-form input { font-size: 16px; } /* no zoom on iOS */
/* header row at the top of a game stage (Jackpot, Crash) */
.stage > .lt-bar { margin: 14px 16px 0; }
.stage > .lt-bar + .history-pills { padding-top: 10px; min-height: 40px; }
.lt-helpbody h4 { margin: 16px 0 6px; font-size: 14px; } .lt-helpbody h4:first-child { margin-top: 0; }
.lt-helpbody p, .lt-helpbody ol { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.55; } .lt-helpbody ol { padding-left: 18px; } .lt-helpbody b { color: var(--text); }
/* the shell's own full screen (games without a custom one) */
.lt-fs { background: var(--bg) !important; overflow-y: auto; padding: 16px; }
body.reduce-motion .lt-pop, body.reduce-motion .lt-chat { animation: none; }
.lt-chat-list > :first-child { margin-top: auto; } /* messages sit at the bottom, like any chat */
.mpbj-room.narrow .lt-top.lt-over { left: 8px; right: 8px; top: 8px; }
.lt-bar ~ .lt-chat { height: min(360px, calc(100% - 120px)); }

/* ---------------------------------------------------------------- polish pass 2: spacing scale 4 / 8 / 12 / 16 / 24 / 32, no overflow */
/* two-up fields share the column equally and never push past the panel padding */
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-2 > .field { min-width: 0; }
/* lobby hero: 24px gutters like the rest of the page grid */
.lhero { gap: 24px; margin-bottom: 32px; }

/* Game code loads on demand (core.js App.loadGame): a spinner shows only if that takes a moment. */
.game-loading { min-height: 50vh; display: grid; place-items: center; }
.game-loading .spinner { width: 34px; height: 34px; border-radius: 50%; border: 3px solid rgba(255,255,255,.12); border-top-color: var(--green);
  opacity: 0; animation: gl-spin .8s linear infinite, gl-in .2s .3s forwards; }
.game-loading-err { display: grid; justify-items: center; gap: 12px; }
@keyframes gl-spin { to { transform: rotate(360deg); } }
@keyframes gl-in { to { opacity: 1; } }

/* ---------------------------------------------------------------- overlays on phones and tablets
   Where the chat and the menu slide over the page (no blur any more), they need a solid background,
   and on phones they cover the bottom nav so the message box and the last menu items can be reached. */
@media (max-width: 1100px) {
  #chat { background: color-mix(in srgb, var(--p1) 70%, var(--d0)); box-shadow: -10px 0 30px rgba(0, 0, 0, .45); }
}
@media (max-width: 860px) {
  #sidebar { background: color-mix(in srgb, var(--p1) 70%, var(--d0)); z-index: 60; box-shadow: 10px 0 30px rgba(0, 0, 0, .45); }
  /* The bottom nav lives in another layer: hide it while the chat or the menu covers the screen. */
  body:has(#chat:not(.closed)) #mobile-nav, body.sb-open #mobile-nav { display: none; }
  body:not(.sb-open) #sidebar { box-shadow: none; }
  #sidebar { height: 100dvh; }
  #chat { z-index: 60; height: 100dvh; }
  .chat-form { padding-bottom: max(14px, env(safe-area-inset-bottom)); }
  #sidebar nav, #sidebar .sb-scroll { padding-bottom: env(safe-area-inset-bottom); }
}

/* Desktop never shows the floating copy of the Bet button. */
.bet-float { display: none; }
/* ---------------------------------------------------------------- phones: bet without scrolling
   Like Stake on mobile: the Bet button (and Blackjack's Hit/Stand) come first under the game, the
   rest of the settings follow. The flat card tables are shorter so the button is on screen. */
@media (max-width: 860px) {
  .bet-panel { display: flex; flex-direction: column; }
  .bet-panel > [data-bet] { order: -2; margin-bottom: 14px; }
  .bet-panel > .seg { margin-bottom: 14px; }
  .controls .bj-actions { order: -3; } /* Hit / Stand first: during a hand they are what you press */
  .game-main { min-height: 0; } /* the desktop minimum only stretched the table on phones */
  .stage:has(.bj-stage), .stage:has(.bc-stage) { min-height: 0; }
  .bj-stage { padding: 14px 12px; min-height: 290px; }
  /* Hand areas sized for the phone cards (64×92) plus the total badge, not the desktop ones. */
  .bj-stage { padding-top: 10px; padding-bottom: 10px; }
  .bj-stage .bj-hand, .bj-stage .bj-hands { min-height: 116px; }
  .bj-stage .bj-banner { margin-bottom: 10px; }
  .bj-stage .bj-side-res:empty { min-height: 0; margin: 0; }
  .bet-float { display: block; position: fixed; left: 12px; right: 12px; bottom: calc(62px + 10px); width: auto; z-index: 45; box-shadow: 0 8px 24px rgba(0, 0, 0, .5); }
  .bet-float.hidden { display: none; }
  body:has(#chat:not(.closed)) .bet-float, body.sb-open .bet-float { display: none; }
  #mobile-nav { background: color-mix(in srgb, var(--p1) 70%, var(--d0)); border-top: 1px solid var(--line); }
}

/* ---------------------------------------------------------------- captcha (lib/captcha.js) */
table.bets tbody tr.free { cursor: default; }
.captcha { display: grid; gap: 14px; }
.cap-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.cap-head h3 { margin: 0 0 4px; font-size: 18px; }
.cap-lead { margin: 0; color: var(--muted); line-height: 1.45; }
.cap-lead b { color: var(--text); }
.cap-new { flex: none; width: 44px; height: 44px; border-radius: var(--radius); display: grid; place-items: center; background: var(--panel-3); color: var(--text); }
.cap-new:hover { background: var(--hover); }
.cap-new svg, .cap-note svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.cap-note svg { width: 14px; height: 14px; vertical-align: -2px; }
.cap-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; width: 100%; max-width: 372px; margin: 0 auto; }
.cap-tile { position: relative; aspect-ratio: 1; padding: 0; border-radius: 12px; overflow: hidden; background: var(--bg-deep); border: 0; cursor: pointer;
  box-shadow: inset 0 0 0 2px var(--line); transition: transform .08s, box-shadow .12s; }
.cap-tile img { width: 100%; height: 100%; display: block; object-fit: cover; user-select: none; -webkit-user-drag: none; pointer-events: none; }
.cap-tile:hover { transform: translateY(-1px); }
.cap-tile:active { transform: scale(.97); }
.cap-tile:focus-visible { outline: 3px solid #fff; outline-offset: 2px; }
.cap-tile[aria-pressed="true"] { box-shadow: 0 0 0 3px var(--blue), 0 0 0 6px color-mix(in srgb, var(--blue) 30%, transparent); }
.cap-tile[aria-pressed="true"] img { transform: scale(.9); border-radius: 8px; transition: transform .12s; }
.cap-check { position: absolute; top: 6px; right: 6px; width: 24px; height: 24px; border-radius: 50%; background: var(--blue); display: grid; place-items: center;
  opacity: 0; transform: scale(.6); transition: opacity .12s, transform .12s; box-shadow: 0 1px 4px rgba(0,0,0,.35); }
.cap-check svg { width: 15px; height: 15px; fill: none; stroke: #fff; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.cap-tile[aria-pressed="true"] .cap-check { opacity: 1; transform: none; }
.captcha.loading .cap-tile img { opacity: .25; }
.cap-msg { min-height: 20px; text-align: center; color: var(--muted); font-weight: 600; }
.cap-msg.bad { color: var(--red); }
.cap-actions { display: grid; grid-template-columns: auto 1fr; gap: 10px; }
.cap-note { margin: 0; color: var(--dim); font-size: 12px; line-height: 1.5; text-align: center; }
.lt-send.wait { font-weight: 800; font-size: 14px; opacity: .8; }

/* ---------------------------------------------------------------- header: Wallet + Rewards buttons
   The blue button opens the wallet (settings, buy credits); the pill next to the profile is Rewards,
   showing the rakeback boost and its time left while one is active. */
button.boost-pill { color: var(--text); font: inherit; cursor: pointer; text-align: left; position: relative; }
button.boost-pill:hover { border-color: rgba(255, 255, 255, .22); }
.boost-pill .rw-boost-ico svg { width: 18px; height: 18px; }
.boost-pill:not(.boosted) b { color: var(--text); }
.boost-pill:not(.boosted) .rw-boost-ico { background: radial-gradient(circle at 35% 30%, #7bb0ff, #2f6fe0); color: #fff; box-shadow: 0 0 0 3px rgba(47, 111, 224, .22); }
.boost-pill:not(.boosted) .rw-boost-ico svg { fill: none; stroke: currentColor; stroke-width: 2; }
.boost-pill.boosted { border-color: rgba(255, 199, 0, .45); }
.boost-pill small:empty { display: none; }
.boost-pill .rw-dot { top: 5px; right: 5px; }
.rw-panel { background: color-mix(in srgb, var(--p1) 70%, var(--d0)); }
/* Popup windows are solid: nothing behind them (another popup, the page) may show through. */
.modal { background: color-mix(in srgb, var(--p1) 70%, var(--d0)); }

/* ---------------------------------------------------------------- page summary sent by the server
   (lib/seo.js): what crawlers and visitors without JavaScript read; the app replaces it when it starts. */
.ssr-page { max-width: 980px; padding: 8px 0 32px; line-height: 1.6; }
.ssr-page h1 { font-size: 28px; line-height: 1.2; margin: 0 0 12px; }
.ssr-page h2 { font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 0 0 10px; }
.ssr-page p { margin: 0 0 14px; color: var(--muted); max-width: 70ch; }
.ssr-page .ssr-lead { color: var(--text); font-size: 16px; }
.ssr-page a { color: var(--text); text-decoration: underline; text-underline-offset: 3px; }
.ssr-links { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 24px; margin: 28px 0; }
.ssr-links ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.ssr-links a { display: inline-block; padding: 6px 12px; border-radius: var(--radius); background: var(--panel-2); text-decoration: none; font-weight: 600; font-size: 13px; }
.ssr-links a:hover { background: var(--hover); }
.ssr-bet { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 10px; margin: 0 0 16px; }
.ssr-bet div { background: var(--panel-2); border-radius: var(--radius); padding: 10px 14px; }
.ssr-bet dt { color: var(--muted); font-size: 12px; }
.ssr-bet dd { margin: 0; font-weight: 800; }
.ssr-note { font-size: 13px; }

/* Share prompt after a big win (js/share.js) */
.toast.share-toast { display: flex; align-items: center; gap: 10px; padding: 8px 8px 8px 14px; max-width: 380px; }
.share-toast-text { display: flex; align-items: center; gap: 8px; flex: 1; min-width: 0; }
.share-toast-text svg { color: var(--green); }
.share-toast .icon-btn { width: 32px; height: 32px; }
.share-btn svg { width: 16px; height: 16px; }
