/* =====================================================================
   SkyRush — PLAYER theme v3.9 "Night Cockpit Pro" (app style).
   Loaded after ui.css (shared components). Phones get an app bar +
   bottom tab bar; PCs get a sidebar. THAT'S ALL FUN — NOT REAL.
   ===================================================================== */
:root {
  --font: "Manrope", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --display: "Space Grotesk", "Manrope", ui-sans-serif, system-ui, sans-serif;
  --mono: "Space Grotesk", ui-monospace, SFMono-Regular, Menlo, monospace;      /* numbers */
  --code: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;     /* UIDs + codes */
  color-scheme: dark;

  --bg: #07080c; --bg-2: #0b0d13;
  --surface: #0f1118; --surface-2: #151822; --surface-3: #1b1f2b; --input-bg: #0a0c12;
  --glass: rgba(255, 255, 255, .035); --glass-2: rgba(255, 255, 255, .06);
  --line: rgba(255, 255, 255, .07); --line-strong: rgba(255, 255, 255, .12);
  --text: #c3c7d4; --text-strong: #f6f7fb; --muted: #858b9d; --faint: #545a6b;
  --hover: rgba(255, 255, 255, .05); --row-hover: rgba(255, 255, 255, .025); --th-bg: transparent; --tabs-bg: #0a0c12;

  --accent: #ff2e63; --accent-2: #ff6a3d; --accent-hover: #ff4877; --accent-text: #ff6b8f;
  --accent-soft: rgba(255, 46, 99, .12); --on-accent: #fff;
  --grad: linear-gradient(135deg, #ff2e63 0%, #ff5a4a 60%, #ff7a3d 100%);
  --ring: #ff6b8f; --ring-soft: rgba(255, 46, 99, .2);
  --pos: #34e89e; --pos-solid: #1fcf7f; --pos-soft: rgba(52, 232, 158, .12);
  --neg: #ff6b81; --neg-solid: #e5294b; --neg-soft: rgba(255, 75, 105, .12); --neg-line: rgba(255, 75, 105, .32);
  --warn: #ffc547; --warn-soft: rgba(255, 197, 71, .12);
  --info: #74b4ff; --info-soft: rgba(116, 180, 255, .12); --neutral-soft: rgba(255, 255, 255, .06);
  --violet: #9a7cff; --violet-soft: rgba(154, 124, 255, .14);
  --leaf: #34e89e;

  --shadow: 0 1px 0 rgba(255, 255, 255, .03) inset, 0 20px 40px -24px rgba(0, 0, 0, .6);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .5);
  --glow: 0 10px 30px -8px rgba(255, 46, 99, .55);
  --r-sm: 12px; --r-lg: 20px; --r-xl: 26px;
  --sb-w: 268px; --top-h: 68px; --content-w: 1180px; --tab-h: 66px;
  --safe-b: env(safe-area-inset-bottom, 0px);

  --sb-bg: rgba(10, 11, 16, .92); --sb-line: rgba(255, 255, 255, .06); --sb-text: #9ba1b3; --sb-text-strong: #fff; --sb-faint: #565c6d;
  --sb-hover: rgba(255, 255, 255, .04); --sb-active: rgba(255, 46, 99, .1); --sb-active-text: #fff;
  --top-bg: rgba(7, 8, 12, .72);
  --brand-bg: var(--grad); --brand-fg: #fff;
  --fun-text: #ffd57a; --fun-bg: rgba(255, 197, 71, .07); --fun-line: rgba(255, 197, 71, .22);
  --toast-bg: #f6f7fb; --toast-text: #07080c;
}

/* ---------- Base ---------- */
body {
  font-size: 14px; letter-spacing: -.005em;
  background:
    radial-gradient(900px 500px at 100% -8%, rgba(255, 46, 99, .09), transparent 62%),
    radial-gradient(700px 480px at -10% 110%, rgba(154, 124, 255, .07), transparent 60%),
    var(--bg);
  background-attachment: fixed;
}
body::before { /* faint star field */
  content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none; opacity: .5;
  background-image:
    radial-gradient(1px 1px at 12% 18%, rgba(255,255,255,.35) 50%, transparent 51%),
    radial-gradient(1px 1px at 72% 12%, rgba(255,255,255,.25) 50%, transparent 51%),
    radial-gradient(1px 1px at 38% 66%, rgba(255,255,255,.2) 50%, transparent 51%),
    radial-gradient(1px 1px at 88% 58%, rgba(255,255,255,.28) 50%, transparent 51%),
    radial-gradient(1px 1px at 55% 88%, rgba(255,255,255,.18) 50%, transparent 51%),
    radial-gradient(1px 1px at 22% 82%, rgba(255,255,255,.22) 50%, transparent 51%);
}
::selection { background: rgba(255, 46, 99, .35); color: #fff; }
.mono-code, .uid-tag, .code-box .code, .rid, .apply-row .input { font-family: var(--code); }
h1, h2, h3, .section-title, .page-head h1, .card-head h2, .card-head h3, .modal-head h2 { font-family: var(--display); letter-spacing: -.02em; }
.eyebrow { font-size: 10.5px; font-weight: 700; letter-spacing: .14em; color: var(--muted); }
.ic { width: 19px; height: 19px; }
* { -webkit-tap-highlight-color: transparent; }
.content { scrollbar-gutter: stable; }

/* ---------- Brand ---------- */
.brand { gap: 11px; font-family: var(--display); font-size: 17px; color: var(--text-strong); }
.brand-mark { width: 36px; height: 36px; border-radius: 11px; background: var(--grad); color: #fff; box-shadow: var(--glow); }
.brand-mark svg { width: 19px; height: 19px; }
.brand small { font-family: var(--font); font-size: 11px; font-weight: 600; color: var(--sb-faint); letter-spacing: .01em; margin-top: 1px; }

/* ---------- Sidebar (PC) ---------- */
.sidebar { backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); }
.sb-head { padding: 22px 20px 18px; }
.sb-points {
  position: relative; overflow: hidden; margin: 0 4px 8px; padding: 16px; border-radius: 18px; border: 1px solid rgba(255, 46, 99, .18);
  background: radial-gradient(180px 120px at 100% 0%, rgba(255, 106, 61, .28), transparent 70%), linear-gradient(150deg, rgba(255, 46, 99, .16), rgba(255, 46, 99, .02) 70%), var(--surface);
}
.sb-points .val { margin-top: 6px; font-family: var(--mono); font-size: 26px; font-weight: 700; color: #fff; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.sb-points .val small { font-family: var(--font); font-size: 12px; font-weight: 600; color: var(--muted); margin-left: 5px; letter-spacing: 0; }
.sb-points-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 14px; }
.sb-live { display: inline-flex; align-items: center; gap: 6px; font-size: 10px; font-weight: 800; letter-spacing: .12em; color: var(--pos); }
.sb-live i { width: 6px; height: 6px; border-radius: 50%; background: var(--pos-solid); box-shadow: 0 0 0 3px rgba(52, 232, 158, .18); }
.sb-label { padding: 18px 12px 8px; font-size: 10.5px; letter-spacing: .14em; }
.nav { gap: 3px; }
.nav a, .nav button { padding: 9px 10px; border-radius: 12px; font-weight: 600; font-size: 14px; }
.nav-ic { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: var(--glass); flex: 0 0 auto; transition: background .15s, color .15s; }
.nav a:hover .nav-ic, .nav button:hover .nav-ic { background: var(--glass-2); }
.nav a.active { background: var(--sb-active); }
.nav a.active .nav-ic { background: var(--grad); color: #fff; box-shadow: var(--glow); }
.nav-live { margin-left: auto; font-size: 9.5px; font-weight: 800; letter-spacing: .12em; color: var(--accent-text); padding: 3px 7px; border-radius: 6px; background: var(--accent-soft); }
.sb-foot { padding: 14px 12px 22px; border-top: 1px solid var(--sb-line); }
.sb-user { display: flex; align-items: center; gap: 11px; padding: 10px; border-radius: 14px; background: var(--glass); border: 1px solid var(--line); transition: background .15s; }
.sb-user:hover { background: var(--glass-2); }
.sb-fun { margin-top: 14px; padding: 0 10px; font-size: 10px; font-weight: 700; letter-spacing: .1em; color: var(--sb-faint); }

/* ---------- Top bar ---------- */
.topbar { height: var(--top-h); padding: 0 32px; gap: 14px; border-bottom: 1px solid var(--line); }
.topbar-titles { display: flex; flex-direction: column; min-width: 0; line-height: 1.15; }
.topbar-kicker { display: none; font-size: 10px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: var(--accent-text); }
.topbar-title { font-family: var(--display); font-size: 18px; font-weight: 700; letter-spacing: -.02em; }
.topbar-right { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.top-points {
  display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 6px 0 12px; border-radius: 999px; cursor: pointer;
  background: var(--surface); border: 1px solid var(--line-strong); font-family: var(--mono); font-weight: 700; color: var(--text-strong); font-size: 14px;
  transition: border-color .15s, background .15s; font-variant-numeric: tabular-nums;
}
.top-points:hover { border-color: rgba(255, 46, 99, .45); }
.top-points .coin { width: 18px; height: 18px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #ffe08a, #ffb020 60%, #d9840b); box-shadow: inset 0 -2px 0 rgba(0,0,0,.18), 0 0 12px rgba(255, 176, 32, .35); }
.top-points small { font-family: var(--font); font-weight: 600; color: var(--muted); font-size: 11px; }
.top-plus { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--grad); color: #fff; }
.top-plus .ic-sm { width: 14px; height: 14px; }
.top-avatar { margin-left: 2px; border-radius: 50%; box-shadow: 0 0 0 2px var(--bg), 0 0 0 3px var(--line-strong); }
.app-avatar { display: none; position: relative; border-radius: 50%; flex: 0 0 auto; }
.app-avatar-dot { position: absolute; right: -4px; bottom: -3px; width: 18px; height: 18px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-3); color: var(--text-strong); border: 2px solid var(--bg); }
.app-avatar-dot .ic-sm { width: 10px; height: 10px; }
.menu-btn { display: none !important; }
.content { padding: 30px 32px 64px; }
.site-foot { padding: 0 32px 32px; }
.site-foot b { color: var(--fun-text); font-weight: 700; }

/* ---------- Bottom tab bar (phones/tablets) ---------- */
.tabbar { display: none; }
@media (max-width: 1023px) {
  :root { --top-h: 62px; }
  .sidebar { background: #0b0c12; }
  .topbar { padding: 0 16px; gap: 12px; padding-top: env(safe-area-inset-top, 0px); height: calc(var(--top-h) + env(safe-area-inset-top, 0px)); }
  .app-avatar { display: inline-grid; }
  .topbar-kicker { display: block; }
  .topbar-title { font-size: 17px; }
  .top-avatar, .top-play { display: none; }
  .top-points { height: 38px; font-size: 13.5px; }
  .content { padding: 18px 16px calc(var(--tab-h) + var(--safe-b) + 28px); }
  .site-foot { padding: 0 16px calc(var(--tab-h) + var(--safe-b) + 20px); margin-top: calc(-1 * (var(--tab-h) + 8px)); }

  .tabbar {
    display: grid; grid-template-columns: repeat(5, 1fr); align-items: end;
    position: fixed; left: 10px; right: 10px; bottom: calc(10px + var(--safe-b)); z-index: 40; height: var(--tab-h);
    padding: 0 6px; border-radius: 22px; border: 1px solid var(--line-strong);
    background: rgba(16, 18, 26, .86); backdrop-filter: saturate(160%) blur(18px); -webkit-backdrop-filter: saturate(160%) blur(18px);
    box-shadow: 0 20px 50px -10px rgba(0, 0, 0, .8), 0 1px 0 rgba(255, 255, 255, .05) inset;
  }
  body.sb-open .tabbar { visibility: hidden; }
  .tab { height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; color: var(--muted); font-size: 10.5px; font-weight: 700; letter-spacing: .01em; position: relative; }
  .tab-ic { width: 40px; height: 28px; border-radius: 10px; display: grid; place-items: center; transition: background .2s, color .2s; }
  .tab-ic .ic { width: 21px; height: 21px; }
  .tab.on { color: var(--text-strong); }
  .tab.on .tab-ic { background: var(--accent-soft); color: var(--accent-text); }
  .tab:active .tab-ic { transform: scale(.92); }
  .tab-play { justify-content: flex-end; padding-bottom: 8px; }
  .tab-fab {
    position: absolute; top: -22px; left: 50%; transform: translateX(-50%); width: 58px; height: 58px; border-radius: 20px; display: grid; place-items: center;
    background: var(--grad); color: #fff; box-shadow: 0 14px 30px -6px rgba(255, 46, 99, .7), 0 0 0 5px var(--bg); transition: transform .15s;
  }
  .tab-fab .ic { width: 26px; height: 26px; transform: rotate(-12deg); }
  .tab-play:active .tab-fab { transform: translateX(-50%) scale(.94); }
  .tab-play.on .tab-fab { box-shadow: 0 14px 34px -4px rgba(255, 46, 99, .9), 0 0 0 5px var(--bg); }
  .tab-play .tab-lbl { color: var(--text-strong); }
}
@media (min-width: 1024px) and (max-width: 1180px) { .top-play { display: none; } }

/* ---------- Page head ---------- */
.page-head { margin-bottom: 22px; align-items: center; }
.page-head h1 { font-size: 28px; font-weight: 700; }
.page-head p { font-size: 14px; }
@media (max-width: 1023px) {
  .page-head { margin-bottom: 16px; gap: 12px; }
  .page-head h1 { font-size: 22px; }
  .page-head p { font-size: 13px; }
  .page-head.app-hide-title > div:first-child h1 { display: none; }
}

/* ---------- Cards / tiles ---------- */
.card { background: linear-gradient(180deg, rgba(255,255,255,.022), rgba(255,255,255,0) 40%), var(--surface); border-radius: var(--r-lg); }
.card-head { padding: 18px 20px; }
.card-head h2, .card-head h3 { font-size: 16px; font-weight: 700; }
.stat { padding: 18px; }
.stat-label { font-size: 12px; font-weight: 600; }
.stat-value { font-size: 26px; margin-top: 8px; }
.mini { padding: 14px 16px; border-radius: 16px; background: var(--glass); border: 1px solid var(--line); }
.mini .k { font-size: 12px; color: var(--muted); font-weight: 600; }
.mini .v { margin-top: 4px; font-family: var(--mono); font-size: 19px; font-weight: 700; color: var(--text-strong); font-variant-numeric: tabular-nums; letter-spacing: -.02em; }

/* ---------- Buttons ---------- */
.btn { height: 42px; border-radius: 13px; font-weight: 700; letter-spacing: -.005em; }
.btn-primary { background: var(--grad); color: #fff; box-shadow: var(--glow), inset 0 1px 0 rgba(255,255,255,.22); }
.btn-primary:hover:not(:disabled) { background: var(--grad); filter: brightness(1.08) saturate(1.05); }
.btn-secondary { background: var(--surface-2); border-color: var(--line-strong); }
.btn-secondary:hover:not(:disabled) { background: var(--surface-3); }
.btn-glass { background: rgba(255,255,255,.07); color: #fff; border: 1px solid rgba(255,255,255,.1); }
.btn-glass:hover { background: rgba(255,255,255,.12); }
.btn-success { background: linear-gradient(180deg, #2ee88f, #14b86c); box-shadow: 0 10px 26px -10px rgba(31, 207, 127, .7); }
.btn-sm { height: 34px; border-radius: 10px; font-size: 13px; }
.btn-lg { height: 52px; padding: 0 22px; font-size: 15px; border-radius: 16px; }
.chip-btn { height: 34px; padding: 0 14px; font-size: 12.5px; font-weight: 700; background: var(--surface-2); font-family: var(--mono); }
.chip-btn:hover { border-color: rgba(255, 46, 99, .55); }
.link { color: var(--accent-text); }

/* ---------- Forms ---------- */
.field label, .label { font-weight: 600; font-size: 12.5px; color: var(--text); }
.input, .field input, .field select, .field textarea { height: 48px; border-radius: 14px; padding: 0 14px; font-size: 15px; background: var(--input-bg); }
.field textarea { padding: 12px 14px; }
.input:focus, .field input:focus, .field select:focus, .field textarea:focus { border-color: rgba(255, 46, 99, .7); box-shadow: 0 0 0 4px var(--ring-soft); }
.input-wrap .suffix { font-weight: 700; }
.pass-toggle { right: 10px; font-weight: 700; }
.form-error { border-radius: 12px; }

/* ---------- Tabs (segmented) ---------- */
.tabs { padding: 4px; border-radius: 14px; background: var(--surface); border-color: var(--line); }
.tabs button { height: 34px; padding: 0 14px; border-radius: 10px; font-weight: 700; }
.tabs button.on { background: var(--surface-3); color: #fff; box-shadow: 0 1px 0 rgba(255,255,255,.06) inset, 0 4px 12px rgba(0,0,0,.35); }

/* ---------- Badges ---------- */
.badge { height: 24px; font-weight: 700; font-size: 11.5px; }

/* ---------- Tables → app lists on phones ---------- */
.table th { font-size: 10.5px; letter-spacing: .1em; }
.table td { padding: 13px 16px; }
@media (max-width: 720px) {
  .table.stack-sm tr { margin: 10px 12px; padding: 12px 14px; border-radius: 16px; background: var(--glass); border: 1px solid var(--line); }
  .table.stack-sm tbody tr:last-child { border-bottom: 1px solid var(--line); }
  .table.stack-sm td { padding: 4px 0; }
  .table.stack-sm .empty-row { background: none; border: 0; }
}

/* ---------- Modals → bottom sheets on phones ---------- */
.modal-backdrop { background: rgba(3, 4, 8, .62); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.modal-panel { border-radius: var(--r-xl); background: #10121a; border-color: var(--line-strong); }
.modal-head { padding: 22px 22px 0; }
.modal-head h2 { font-size: 19px; }
.modal-body { padding: 20px 22px; }
.modal-foot { padding: 0 22px 22px; }
.modal-foot .btn { min-width: 110px; }
@media (max-width: 640px) {
  .modal { align-items: flex-end; padding: 0; }
  .modal-panel { max-width: none; border-radius: 26px 26px 0 0; max-height: 92vh; padding-bottom: var(--safe-b); transform: translateY(40px); }
  .modal-panel::before { content: ""; display: block; width: 40px; height: 4px; border-radius: 4px; margin: 10px auto 0; background: rgba(255,255,255,.18); }
  .modal-head { padding-top: 14px; }
  .modal-foot { display: grid; grid-template-columns: 1fr 1.4fr; }
  .modal-foot .btn { height: 50px; }
}
#toast { border-radius: 14px; font-weight: 700; top: calc(14px + env(safe-area-inset-top, 0px)); }

/* ---------- Avatars ---------- */
.avatar { background: var(--grad); }
.avatar.has-img { background: var(--surface-3); }

/* =====================================================================
   DASHBOARD (Home)
   ===================================================================== */
.home { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 18px; align-items: start; }
.home-main, .home-side { display: grid; gap: 18px; min-width: 0; }
@media (max-width: 1180px) { .home { grid-template-columns: minmax(0, 1fr) 320px; } }
@media (max-width: 1023px) { .home { grid-template-columns: 1fr; gap: 14px; } .home-main, .home-side { gap: 14px; } }

.greet { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.greet h1 { font-size: 24px; font-weight: 700; color: var(--text-strong); }
.greet p { color: var(--muted); font-size: 13px; }
@media (max-width: 1023px) { .greet { display: none; } }

.bal {
  position: relative; overflow: hidden; isolation: isolate; padding: 24px; border-radius: var(--r-xl); border: 1px solid rgba(255, 46, 99, .2);
  background:
    radial-gradient(520px 260px at 105% -20%, rgba(255, 106, 61, .38), transparent 60%),
    radial-gradient(420px 260px at -10% 120%, rgba(154, 124, 255, .22), transparent 60%),
    linear-gradient(160deg, #1a0f19 0%, #120e18 45%, #0d0f16 100%);
  box-shadow: 0 30px 60px -30px rgba(255, 46, 99, .45);
}
.bal-curve { position: absolute; right: 0; top: 18px; width: 58%; height: 52%; z-index: -1; opacity: .75; pointer-events: none; }
.qa { position: relative; }
.bal-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.bal-label { font-size: 13px; font-weight: 600; color: rgba(255,255,255,.66); display: flex; align-items: center; gap: 8px; }
.bal-amount { margin-top: 10px; display: flex; align-items: baseline; flex-wrap: wrap; gap: 6px 12px; }
.bal-amount .n { font-family: var(--display); font-size: 52px; line-height: 1; font-weight: 700; color: #fff; letter-spacing: -.045em; font-variant-numeric: tabular-nums; }
.bal-amount .u { font-size: 15px; font-weight: 700; color: rgba(255,255,255,.55); }
.delta { display: inline-flex; align-items: center; gap: 5px; height: 28px; padding: 0 10px; border-radius: 999px; font-family: var(--mono); font-weight: 700; font-size: 13px;
  background: rgba(255,255,255,.08); color: #fff; border: 1px solid rgba(255,255,255,.1); }
.delta.pos { background: rgba(52, 232, 158, .14); color: var(--pos) !important; border-color: rgba(52, 232, 158, .3); }
.delta.neg { background: rgba(255, 75, 105, .14); color: var(--neg) !important; border-color: rgba(255, 75, 105, .3); }
.delta .ic-sm { width: 13px; height: 13px; }
.bal-meta { margin-top: 14px; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.uid-tag { display: inline-flex; align-items: center; gap: 8px; height: 30px; padding: 0 10px; border-radius: 9px; background: rgba(0,0,0,.28);
  border: 1px solid rgba(255,255,255,.09); font-size: 12px; color: var(--text); letter-spacing: .06em; }
.uid-tag button { color: var(--muted); display: grid; place-items: center; } .uid-tag button:hover { color: #fff; }
.uid-tag.sm { height: 24px; font-size: 11px; padding: 0 8px; }
.meta-pill { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 10px; border-radius: 9px; font-size: 12px; font-weight: 600; color: rgba(255,255,255,.7); background: rgba(0,0,0,.22); border: 1px solid rgba(255,255,255,.07); }
.meta-pill b { color: var(--leaf); font-family: var(--mono); }
.meta-pill .ic-sm { width: 14px; height: 14px; color: var(--leaf); }

.qa { margin-top: 22px; display: grid; grid-template-columns: repeat(5, 72px); gap: 18px; }
.qa-btn { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 0; color: rgba(255,255,255,.82); font-size: 12px; font-weight: 700; text-align: center; }
.qa-ic { width: 56px; height: 56px; border-radius: 18px; display: grid; place-items: center; background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.1); color: #fff;
  transition: transform .15s, background .15s; backdrop-filter: blur(8px); }
.qa-btn:hover .qa-ic { background: rgba(255,255,255,.12); transform: translateY(-2px); }
.qa-btn:active .qa-ic { transform: scale(.94); }
.qa-btn.hot .qa-ic { background: var(--grad); border-color: transparent; box-shadow: var(--glow); }
.qa-ic .ic { width: 22px; height: 22px; }
@media (max-width: 1023px) {
  .bal { padding: 20px 18px; border-radius: 24px; }
  .bal-amount .n { font-size: 42px; }
  .qa-ic { width: 52px; height: 52px; border-radius: 16px; }
  .qa { gap: 4px; margin-top: 20px; grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .qa-btn { font-size: 11px; }
}
@media (max-width: 360px) { .bal-amount .n { font-size: 36px; } .qa-ic { width: 46px; height: 46px; } }

/* stat tiles */
.tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.tile { padding: 16px; border-radius: 18px; background: var(--surface); border: 1px solid var(--line); min-width: 0; }
.tile-ic { width: 34px; height: 34px; border-radius: 11px; display: grid; place-items: center; margin-bottom: 12px; }
.tile-ic .ic { width: 18px; height: 18px; }
.tile-ic.t-accent { background: var(--accent-soft); color: var(--accent-text); }
.tile-ic.t-violet { background: var(--violet-soft); color: var(--violet); }
.tile-ic.t-pos { background: var(--pos-soft); color: var(--pos); }
.tile-ic.t-warn { background: var(--warn-soft); color: var(--warn); }
.tile-k { font-size: 12px; font-weight: 600; color: var(--muted); }
.tile-v { margin-top: 2px; font-family: var(--mono); font-size: 22px; font-weight: 700; color: var(--text-strong); letter-spacing: -.02em; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.tile-f { margin-top: 2px; font-size: 11.5px; color: var(--faint); font-weight: 600; }
@media (max-width: 1180px) { .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 1023px) { .tiles { gap: 10px; } .tile { padding: 14px; } .tile-v { font-size: 19px; } .tile-ic { margin-bottom: 10px; } }

/* section header */
.sec-h { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.sec-h h2 { font-size: 17px; font-weight: 700; color: var(--text-strong); }
.sec-h .act { font-size: 13px; font-weight: 700; color: var(--accent-text); display: inline-flex; align-items: center; gap: 4px; }

/* request list */
.list { display: grid; }
.li { display: flex; align-items: center; gap: 12px; padding: 13px 18px; border-bottom: 1px solid var(--line); min-width: 0; }
.li:last-child { border-bottom: 0; }
.li-ic { width: 42px; height: 42px; border-radius: 14px; display: grid; place-items: center; flex: 0 0 auto; background: var(--glass-2); color: var(--text-strong); }
.li-ic.is-pending { background: var(--warn-soft); color: var(--warn); }
.li-ic.is-deposited { background: var(--pos-soft); color: var(--pos); }
.li-ic.is-rejected, .li-ic.is-reversed { background: var(--neg-soft); color: var(--neg); }
.li-t { font-weight: 700; color: var(--text-strong); }
.li-s { font-size: 12px; color: var(--muted); margin-top: 1px; }
.li-r { margin-left: auto; text-align: right; flex: 0 0 auto; display: flex; flex-direction: column; align-items: flex-end; gap: 5px; }
.li-amt { font-family: var(--mono); font-weight: 700; font-size: 16px; color: var(--text-strong); font-variant-numeric: tabular-nums; }
.list-empty { padding: 34px 20px; text-align: center; color: var(--muted); }
.list-empty .ic { width: 30px; height: 30px; margin: 0 auto 10px; color: var(--faint); }

/* wallet (side) */
.wallet2 { padding: 18px; }
.w-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 12px; }
.w-cell { padding: 12px; border-radius: 14px; background: var(--glass); border: 1px solid var(--line); min-width: 0; }
.w-cell .k { font-size: 11px; font-weight: 700; color: var(--muted); }
.w-cell .v { margin-top: 3px; font-family: var(--mono); font-size: 17px; font-weight: 700; color: var(--text-strong); font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.bonus-row { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 14px; background: var(--glass); border: 1px solid var(--line); }
.bonus-row + .bonus-row { margin-top: 8px; }
.bonus-row .ico { width: 36px; height: 36px; border-radius: 11px; display: grid; place-items: center; background: var(--warn-soft); color: var(--warn); flex: 0 0 auto; }
.bonus-row.is-active .ico { background: var(--pos-soft); color: var(--pos); }
.bonus-row.is-closed .ico { background: var(--neutral-soft); color: var(--muted); }
.bonus-row .amt { margin-left: auto; font-family: var(--mono); font-weight: 700; color: var(--text-strong); white-space: nowrap; }
.bonus-row.is-pending .amt { color: var(--warn); }
.bonus-row .strong { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.badge.is-pending_activation { background: var(--warn-soft); color: var(--warn); }
.badge.is-ineligible, .badge.is-reversed { background: var(--neutral-soft); color: var(--muted); }

/* play promo card */
.promo { position: relative; overflow: hidden; isolation: isolate; display: block; padding: 20px; border-radius: var(--r-lg); border: 1px solid rgba(116, 180, 255, .2);
  background: radial-gradient(300px 200px at 100% 0%, rgba(116, 180, 255, .25), transparent 70%), linear-gradient(160deg, #0f1a2e, #0c1220 60%, #0d0f16); }
.promo-x { font-family: var(--display); font-size: 40px; font-weight: 700; color: #fff; letter-spacing: -.04em; line-height: 1; text-shadow: 0 6px 30px rgba(116, 180, 255, .5); }
.promo svg.curve { position: absolute; right: 0; bottom: 0; width: 70%; height: 70%; z-index: -1; }
.promo .live { display: inline-flex; align-items: center; gap: 6px; font-size: 10.5px; font-weight: 800; letter-spacing: .14em; color: #ff8aa5; }
.promo .live i { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); animation: livepulse2 1.4s infinite; }
@keyframes livepulse2 { 0% { box-shadow: 0 0 0 0 rgba(255, 46, 99, .6); } 70% { box-shadow: 0 0 0 8px rgba(255, 46, 99, 0); } 100% { box-shadow: 0 0 0 0 rgba(255, 46, 99, 0); } }

/* shortcut rows */
.shortcuts { display: grid; }
.sc { display: flex; align-items: center; gap: 12px; padding: 13px 16px; border-bottom: 1px solid var(--line); transition: background .15s; }
.sc:last-child { border-bottom: 0; }
.sc:hover { background: var(--row-hover); }
.sc .ico { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent-text); flex: 0 0 auto; }
.sc .ico.leaf { background: var(--pos-soft); color: var(--leaf); }
.sc .ico.vio { background: var(--violet-soft); color: var(--violet); }
.sc .ico.amb { background: var(--warn-soft); color: var(--warn); }
.sc .t { font-weight: 700; color: var(--text-strong); }
.sc .d { font-size: 12px; color: var(--muted); }
.sc .go { margin-left: auto; color: var(--faint); }

/* =====================================================================
   PLAY page (shell around the game frame)
   ===================================================================== */
.play-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.play-head h1 { font-size: 26px; font-weight: 700; color: var(--text-strong); display: flex; align-items: center; gap: 12px; }
.live-chip { display: inline-flex; align-items: center; gap: 7px; height: 28px; padding: 0 11px; border-radius: 999px; font-family: var(--font); font-size: 11px; font-weight: 800; letter-spacing: .12em; color: #ff8aa5; background: var(--accent-soft); border: 1px solid rgba(255, 46, 99, .25); }
.live-chip i { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); animation: livepulse2 1.4s infinite; }
.play-head p { color: var(--muted); font-size: 13px; margin-top: 4px; }
.frame-card { border-radius: var(--r-xl); border: 1px solid var(--line-strong); background: #06070b; box-shadow: 0 30px 80px -40px rgba(0, 0, 0, .9); }
.frame-card iframe { background: #06070b; height: 860px; }
@media (max-width: 1023px) {
  .play-head { margin-bottom: 12px; }
  .play-head h1 { font-size: 20px; }
  .play-head p, .play-head .btn { display: none; }
  body.page-play .content { padding-left: 10px; padding-right: 10px; padding-top: 12px; }
  .frame-card { border-radius: 22px; }
}

/* Live board */
.lb-sw { display: none; }
.lb-table tr.win td { background: rgba(52, 232, 158, .07); }
.lb-table tr.me td { background: var(--accent-soft); }
.you-tag { color: var(--accent-text); }
.live-dot { background: var(--accent); animation: livepulse2 1.4s infinite; }
@media (max-width: 1023px) {
  #liveBoard { margin-top: 22px; }
  #liveBoard > .grid.g-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  #liveBoard .stat { padding: 14px; }
  #liveBoard .stat-value { font-size: 19px; }
  .lb-sw { display: flex; width: 100%; margin-top: 14px; }
  .lb-sw button { flex: 1 1 0; justify-content: center; }
  #liveBoard [data-lb-panel] { display: none; }
  #liveBoard[data-tab="round"] [data-lb-panel="round"],
  #liveBoard[data-tab="last"] [data-lb-panel="last"],
  #liveBoard[data-tab="all"] [data-lb-panel="all"],
  #liveBoard[data-tab="top"] [data-lb-panel="top"] { display: block; }
  #liveBoard [data-lb-panel="top"] { margin-top: 0 !important; }
  .lb-sw button { padding-left: 6px; padding-right: 6px; }
  #liveBoard .lb-panels { grid-template-columns: 1fr; margin-top: 12px; }
  #liveBoard [data-lb-panel="all"] { margin-top: 0 !important; }
  .lb-table td, .lb-table th { padding: 10px 10px !important; font-size: 12px; }
  .lb-table .who-av .avatar { width: 22px !important; height: 22px !important; }
  /* All players: keep the essentials on a phone */
  [data-lb-panel="all"] .lb-table th:nth-child(4), [data-lb-panel="all"] .lb-table td:nth-child(4),
  [data-lb-panel="all"] .lb-table th:nth-child(6), [data-lb-panel="all"] .lb-table td:nth-child(6),
  [data-lb-panel="all"] .lb-table th:nth-child(7), [data-lb-panel="all"] .lb-table td:nth-child(7) { display: none; }
}
@media (max-width: 420px) {
  [data-lb-panel="round"] .lb-table th:nth-child(4), [data-lb-panel="round"] .lb-table td:nth-child(4),
  [data-lb-panel="last"] .lb-table th:nth-child(4), [data-lb-panel="last"] .lb-table td:nth-child(4),
  [data-lb-panel="all"] .lb-table th:nth-child(5), [data-lb-panel="all"] .lb-table td:nth-child(5),
  [data-lb-panel="top"] .lb-table th:nth-child(3), [data-lb-panel="top"] .lb-table td:nth-child(3),
  [data-lb-panel="top"] .lb-table th:nth-child(6), [data-lb-panel="top"] .lb-table td:nth-child(6) { display: none; }
}
/* v4.6 demo players (admin view only) */
.demo-tag { display: inline-block; margin-left: 4px; padding: 0 5px; border-radius: 5px; font-size: 9.5px; font-weight: 800; letter-spacing: .06em;
  text-transform: uppercase; color: #8b7cf6; border: 1px solid rgba(139,124,246,.4); vertical-align: 1px; }
.lb-table tr.demo td { opacity: .78; }

/* =====================================================================
   RETURN POINTS
   ===================================================================== */
.ret-top { display: grid; grid-template-columns: 320px 1fr; gap: 16px; }
@media (max-width: 900px) { .ret-top { grid-template-columns: 1fr; gap: 14px; } }
.ring-card { padding: 26px 22px; display: flex; flex-direction: column; align-items: center; text-align: center;
  background: radial-gradient(260px 200px at 50% 30%, rgba(52, 232, 158, .12), transparent 70%), var(--surface); }
.ring { position: relative; width: 200px; height: 200px; }
.ring svg { width: 100%; height: 100%; transform: rotate(-90deg); filter: drop-shadow(0 0 18px rgba(52, 232, 158, .25)); }
.ring .bg { stroke: rgba(255, 255, 255, .06); }
.ring .fg { stroke: url(#ringGrad); transition: stroke-dashoffset .8s cubic-bezier(.22, .8, .24, 1); }
.ring .center { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.ring .big { font-family: var(--display); font-size: 34px; font-weight: 700; color: var(--text-strong); letter-spacing: -.03em; line-height: 1.1; font-variant-numeric: tabular-nums; }
.ring .cap { font-size: 12px; color: var(--muted); margin-top: 4px; font-weight: 600; }
.ring-meta { margin-top: 16px; display: flex; gap: 8px; align-items: center; font-size: 13px; color: var(--muted); padding: 8px 14px; border-radius: 999px; background: var(--pos-soft); }
.ring-meta .ic-sm { color: var(--leaf); }
.ring-meta b { color: var(--leaf); font-family: var(--mono); }
.limit-dots { display: inline-flex; gap: 4px; }
.limit-dots i { width: 20px; height: 6px; border-radius: 4px; background: rgba(255, 255, 255, .1); }
.limit-dots i.used { background: var(--grad); }
.limit-pill { display: inline-flex; align-items: center; gap: 10px; height: 34px; padding: 0 14px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line-strong); font-size: 12px; color: var(--text); font-weight: 600; }
.limit-pill b { color: var(--text-strong); }
.ret-cta { display: flex; flex-direction: column; justify-content: space-between; gap: 20px; padding: 22px; }
.ret-facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
@media (max-width: 560px) { .ret-facts { grid-template-columns: 1fr 1fr; } .ret-facts .mini:last-child { grid-column: span 2; } .ret-cta { padding: 18px; } }
.ret-form { border-top: 1px solid var(--line); padding-top: 20px; }
.ret-form[hidden] { display: none; }
.preview-line { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); margin-top: 12px; min-height: 20px; flex-wrap: wrap; }
.preview-line b { color: var(--leaf); }
.refresh-btn .ic, .refresh-btn .ic-sm { transition: transform .3s; }
.refresh-btn.spin .ic, .refresh-btn.spin .ic-sm { animation: spin .8s linear infinite; }
.updated { font-size: 12px; color: var(--faint); }
.rid { font-weight: 600; color: var(--text-strong); }
.leaf-note { display: inline-flex; align-items: center; gap: 6px; color: var(--leaf); font-size: 12px; font-weight: 700; }
.play-box { padding: 16px; border-radius: 16px; background: var(--glass); border: 1px solid var(--line); }
.play-box .strong .ic-sm { display: inline-block; vertical-align: -2px; margin-right: 4px; color: var(--accent-text); }
.play-box .bar > i { background: linear-gradient(90deg, #1fcf7f, #34e89e); }
.play-box .between { flex-wrap: wrap; gap: 6px 12px; }
#ctaRow .btn { height: 50px; padding: 0 22px; border-radius: 15px; }
@media (max-width: 560px) { #ctaRow .btn { width: 100%; } }
.bar { height: 8px; background: rgba(255,255,255,.06); }
.bar > i { background: var(--grad); }

/* =====================================================================
   AUTH (login / register)
   ===================================================================== */
.auth { min-height: 100vh; min-height: 100dvh; display: grid; grid-template-columns: 1.05fr 1fr; }
.auth-side { position: relative; overflow: hidden; isolation: isolate; display: flex; flex-direction: column; justify-content: space-between; padding: 44px 48px; border-right: 1px solid var(--line);
  background: radial-gradient(800px 500px at 0% 110%, rgba(255, 46, 99, .25), transparent 60%), radial-gradient(600px 400px at 110% -10%, rgba(154, 124, 255, .18), transparent 60%), #08090e; }
.auth-side .brand small { color: var(--muted); }
.auth-hero { position: relative; margin: 30px 0; }
.auth-x { font-family: var(--display); font-size: clamp(72px, 9vw, 128px); font-weight: 700; letter-spacing: -.06em; line-height: .9; color: #fff;
  text-shadow: 0 10px 60px rgba(255, 46, 99, .5); font-variant-numeric: tabular-nums; }
.auth-x span { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.auth-side .quote { margin-top: 18px; font-family: var(--display); font-size: 30px; line-height: 1.15; font-weight: 700; color: var(--text-strong); letter-spacing: -.03em; max-width: 440px; }
.auth-side .quote span { color: var(--accent-text); }
.auth-side p.sub { margin-top: 12px; color: var(--muted); max-width: 400px; font-size: 14.5px; }
.auth-curve { position: absolute; left: 0; right: 0; bottom: 0; width: 100%; height: 40%; z-index: -1; opacity: .85; }
.auth-curve path.line { stroke-dasharray: 900; stroke-dashoffset: 900; animation: draw 2.8s cubic-bezier(.3, .7, .2, 1) forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }
.auth-feats { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 24px; }
.auth-feat { display: inline-flex; align-items: center; gap: 7px; height: 34px; padding: 0 12px; border-radius: 999px; font-size: 12.5px; font-weight: 700; color: var(--text); background: rgba(255,255,255,.05); border: 1px solid var(--line-strong); backdrop-filter: blur(8px); }
.auth-feat .ic-sm { color: var(--accent-text); }
.auth-main { display: flex; align-items: center; justify-content: center; padding: 40px 24px; }
.auth-box { width: 100%; max-width: 410px; }
.auth-box h1 { font-size: 30px; font-weight: 700; color: var(--text-strong); letter-spacing: -.03em; }
.auth-box .lead { margin-top: 6px; color: var(--muted); font-size: 15px; }
.auth-box .btn-block { height: 52px; border-radius: 16px; font-size: 15px; }
.auth-mobile-brand { display: none; }
.fun-pill { height: 28px; border-radius: 999px; }
@media (max-width: 900px) {
  .auth { grid-template-columns: 1fr; align-content: start; }
  .auth-side { display: none; }
  .auth-main { position: relative; overflow: hidden; isolation: isolate; align-items: flex-start; padding: 0 20px 40px; padding-top: env(safe-area-inset-top, 0px); }
  .auth-mobile-brand { display: block; position: relative; margin: 0 -20px 26px; padding: 26px 20px 30px; overflow: hidden; isolation: isolate;
    background: radial-gradient(400px 260px at 100% 0%, rgba(255, 106, 61, .3), transparent 65%), radial-gradient(300px 260px at 0% 100%, rgba(154, 124, 255, .2), transparent 65%), #0c0b12;
    border-bottom: 1px solid var(--line); border-radius: 0 0 30px 30px; }
  .auth-mobile-brand .auth-x { font-size: 64px; margin-top: 26px; }
  .auth-mobile-brand .mb-sub { margin-top: 8px; color: rgba(255,255,255,.65); font-size: 14px; max-width: 300px; }
  .auth-mobile-brand .auth-curve { height: 70%; }
  .auth-box { max-width: 520px; margin: 0 auto; }
  .auth-box h1 { font-size: 26px; }
}

/* =====================================================================
   REFERRAL REWARDS
   ===================================================================== */
.ref-top { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
@media (max-width: 900px) { .ref-top { grid-template-columns: 1fr; gap: 14px; } }
.ref-card { padding: 22px; }
@media (max-width: 560px) { .ref-card { padding: 18px; } }
.ref-card:first-child { background: radial-gradient(360px 220px at 100% 0%, rgba(255, 46, 99, .14), transparent 70%), var(--surface); }
.ref-status { display: inline-flex; align-items: center; min-height: 32px; }
.ref-progress { padding: 16px; border-radius: 16px; background: var(--glass); border: 1px solid var(--line); }
.ref-progress-val { font-family: var(--mono); font-size: 24px; font-weight: 700; color: var(--text-strong); font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.ref-progress-val small { font-family: var(--font); font-size: 12px; font-weight: 600; color: var(--muted); letter-spacing: 0; }
.ref-break { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.code-box { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px; padding: 18px; border-radius: 18px;
  background: repeating-linear-gradient(135deg, rgba(255,255,255,.015) 0 10px, transparent 10px 20px), var(--input-bg); border: 1.5px dashed rgba(255, 46, 99, .4); }
.code-box .code { font-size: 26px; font-weight: 700; letter-spacing: .1em; color: #fff; }
@media (max-width: 480px) { .code-box { flex-direction: column; align-items: stretch; text-align: center; } .code-box .row-wrap { display: grid; grid-template-columns: 1fr 1fr; } }
.apply-row { display: flex; gap: 8px; }
.apply-row .input { flex: 1 1 auto; min-width: 0; letter-spacing: .08em; text-transform: uppercase; }
.apply-row .btn { height: 48px; }
@media (max-width: 420px) { .apply-row { flex-direction: column; } .apply-row .btn { width: 100%; } }
.applied { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-radius: 16px; background: var(--glass); border: 1px solid var(--line); }
.applied .mono { font-size: 17px; letter-spacing: .06em; font-family: var(--code); }
.how { margin: 0; padding: 4px 20px 16px; display: grid; gap: 4px; color: var(--text); list-style: none; counter-reset: how; }
.how li { position: relative; padding: 12px 0 12px 48px; counter-increment: how; }
.how li::before { content: counter(how); position: absolute; left: 0; top: 10px; width: 32px; height: 32px; border-radius: 11px; display: grid; place-items: center;
  font-family: var(--display); font-weight: 700; color: var(--accent-text); background: var(--accent-soft); }
.how b { color: var(--text-strong); }
.pager-u { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 16px; border-top: 1px solid var(--line); }
.callout-dark { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-radius: 14px; font-size: 13px; color: var(--warn); background: var(--warn-soft); border: 1px solid rgba(255, 197, 71, .22); }
.grid.g-4 > .card.stat { border-radius: 18px; }
@media (max-width: 1023px) { .grid.g-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; } .stat { padding: 14px; } .stat-value { font-size: 20px; } }

/* =====================================================================
   LEADERBOARD
   ===================================================================== */
.lbd { overflow: hidden; --gold: #ffcf5a; --silver: #d3dbea; --bronze: #e39a62; }
.lbd-head { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 10px; padding: 18px 20px 6px; }
.lbd-podium { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: end; gap: 12px; padding: 34px 22px 0;
  background: radial-gradient(460px 240px at 50% 100%, rgba(255, 207, 90, .12), transparent 70%); }
.lbd-pod { display: flex; flex-direction: column; align-items: center; text-align: center; min-width: 0; }
.lbd-pod-av { position: relative; display: inline-block; margin-bottom: 10px; }
.lbd-pod .avatar { box-shadow: 0 0 0 3px var(--surface), 0 0 0 5px var(--ring-c, var(--line-strong)), 0 12px 30px -8px var(--ring-c, transparent); }
.lbd-pod.p1 { --ring-c: var(--gold); } .lbd-pod.p2 { --ring-c: var(--silver); } .lbd-pod.p3 { --ring-c: var(--bronze); }
.lbd-crown { position: absolute; left: 50%; top: -24px; transform: translateX(-50%) rotate(-8deg); width: 32px; height: 32px; color: var(--gold); filter: drop-shadow(0 2px 8px rgba(255, 207, 90, .55)); }
.lbd-crown svg, .lbd-medal svg { width: 100%; height: 100%; }
.lbd-medal { position: absolute; right: -6px; bottom: -4px; width: 24px; height: 24px; padding: 3px; border-radius: 50%; background: var(--surface); }
.lbd-medal.m2 { color: var(--silver); } .lbd-medal.m3 { color: var(--bronze); }
.lbd-pod-name { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 700; color: var(--text-strong); font-size: 14px; }
.lbd-uid { display: block; font-family: var(--code); font-size: 10.5px; color: var(--faint); letter-spacing: .04em; margin-top: 2px; }
.lbd-pod-pts { margin-top: 6px; font-family: var(--mono); font-weight: 700; font-size: 18px; color: var(--text-strong); font-variant-numeric: tabular-nums; }
.lbd-pod.p1 .lbd-pod-pts { color: var(--gold); font-size: 23px; }
.lbd-pod-pts small, .lbd-pts small { font-family: var(--font); font-size: 11px; font-weight: 600; color: var(--muted); margin-left: 3px; }
.lbd-step { width: 100%; margin-top: 12px; border-radius: 16px 16px 0 0; display: grid; place-items: start center; padding-top: 10px;
  font-family: var(--display); font-weight: 700; font-size: 24px; color: rgba(255, 255, 255, .35);
  background: linear-gradient(180deg, rgba(255, 255, 255, .08), rgba(255, 255, 255, .01)); border: 1px solid var(--line); border-bottom: 0; }
.lbd-pod.p1 .lbd-step { height: 96px; background: linear-gradient(180deg, rgba(255, 207, 90, .26), rgba(255, 207, 90, .02)); color: var(--gold); border-color: rgba(255, 207, 90, .3); }
.lbd-pod.p2 .lbd-step { height: 68px; color: var(--silver); }
.lbd-pod.p3 .lbd-step { height: 50px; color: var(--bronze); }
.lbd-pod.is-me .lbd-step { box-shadow: inset 0 2px 0 var(--accent); }
.lbd-pod.is-empty .lbd-step, .lbd-pod.is-loading .lbd-step { opacity: .5; }
.lbd-ghost { background: var(--surface-2) !important; color: var(--faint); border: 1px dashed var(--line-strong); }
.lbd-list { list-style: none; margin: 0; padding: 8px; border-top: 1px solid var(--line); display: grid; gap: 4px; }
.lbd-row { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 14px; min-width: 0; }
.lbd-row:hover { background: var(--row-hover); }
.lbd-row.is-me { background: var(--accent-soft); box-shadow: inset 0 0 0 1px rgba(255, 46, 99, .3); }
.lbd-rank { width: 30px; height: 30px; flex: 0 0 auto; border-radius: 10px; display: grid; place-items: center; font-family: var(--mono); font-weight: 700; color: var(--muted); background: var(--glass-2); font-size: 13px; }
.lbd-name { display: block; font-weight: 700; color: var(--text-strong); }
.lbd-pts { flex: 0 0 auto; font-family: var(--mono); font-weight: 700; color: var(--text-strong); font-variant-numeric: tabular-nums; }
.lbd-you { display: inline-block; margin-left: 6px; padding: 1px 6px; border-radius: 6px; font-size: 9.5px; font-weight: 800; letter-spacing: .1em; vertical-align: 2px; color: #fff; background: var(--grad); font-family: var(--font); }
.lbd-me-card { display: flex; align-items: center; gap: 14px; padding: 16px 20px; }
.lbd-me-card.good { border-color: rgba(255, 207, 90, .3); background: linear-gradient(90deg, rgba(255, 207, 90, .1), transparent 60%), var(--surface); }
.lbd-me-ico { width: 42px; height: 42px; flex: 0 0 auto; border-radius: 13px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent-text); padding: 10px; }
.lbd-me-card.good .lbd-me-ico { background: rgba(255, 207, 90, .14); color: #ffcf5a; }
.lbd-me-ico svg { width: 100%; height: 100%; }
.lbd-me-rank { min-width: 54px; height: 42px; padding: 0 10px; flex: 0 0 auto; border-radius: 13px; display: grid; place-items: center; font-family: var(--display); font-weight: 700; font-size: 17px; background: var(--grad); color: #fff; }
.lbd-rules { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; padding: 18px 20px 20px; }
.lbd-ul { margin: 8px 0 0; padding: 0; list-style: none; display: grid; gap: 6px; font-size: 13px; }
.lbd-ul li { position: relative; padding-left: 18px; }
.lbd-ul li::before { content: ""; position: absolute; left: 2px; top: 7px; width: 7px; height: 7px; border-radius: 50%; background: var(--pos-solid); }
.lbd-ul.off li::before { background: var(--neg-solid); }
.lbd-ul.neutral li::before { background: var(--muted); }
@media (max-width: 860px) { .lbd-rules { grid-template-columns: 1fr; gap: 14px; } }
@media (max-width: 1023px) {
  .lb-head-ctl { width: 100%; }
  .lb-head-ctl .tabs { flex: 1 1 auto; display: flex; }
  .lb-head-ctl .tabs button { flex: 1 1 0; justify-content: center; }
}
@media (max-width: 560px) {
  .lbd-head { padding: 14px 16px 4px; }
  .lbd-podium { gap: 8px; padding: 30px 12px 0; }
  .lbd-pod .avatar { width: 50px !important; height: 50px !important; }
  .lbd-pod.p1 .avatar { width: 64px !important; height: 64px !important; }
  .lbd-pod-name { font-size: 12.5px; }
  .lbd-pod-pts { font-size: 15px; } .lbd-pod.p1 .lbd-pod-pts { font-size: 18px; }
  .lbd-uid { font-size: 9.5px; letter-spacing: 0; }
  .lbd-pod.p1 .lbd-step { height: 76px; } .lbd-pod.p2 .lbd-step { height: 54px; } .lbd-pod.p3 .lbd-step { height: 40px; }
  .lbd-row { padding: 10px; gap: 10px; }
  .lbd-me-card { padding: 14px 16px; gap: 12px; }
}

/* =====================================================================
   PROFILE
   ===================================================================== */
.prof-hero { position: relative; overflow: hidden; display: flex; align-items: center; gap: 18px; padding: 24px; border-radius: var(--r-xl); border: 1px solid var(--line-strong); margin-bottom: 16px;
  background: radial-gradient(420px 240px at 100% 0%, rgba(255, 46, 99, .2), transparent 65%), radial-gradient(320px 220px at 0% 120%, rgba(154, 124, 255, .16), transparent 65%), var(--surface); }
.prof-hero .avatar { box-shadow: 0 0 0 4px var(--surface), 0 0 0 6px rgba(255, 46, 99, .6); }
.prof-hero h1 { font-size: 24px; font-weight: 700; color: var(--text-strong); }
.prof-hero .meta { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.prof-out { margin-left: auto; }
@media (max-width: 640px) {
  .prof-hero { flex-direction: column; text-align: center; padding: 24px 18px; gap: 12px; }
  .prof-hero .meta { justify-content: center; }
  .prof-out { margin: 4px 0 0; width: 100%; }
}
.av-current { display: flex; align-items: center; gap: 16px; }
.av-current .avatar { box-shadow: 0 0 0 3px var(--surface), 0 0 0 5px var(--accent); }
.av-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 10px; }
.av-opt { border-radius: 16px; background: var(--glass); padding: 12px 6px 9px; }
.av-opt:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); box-shadow: 0 0 0 1px var(--accent) inset; }
.av-opt .tick { background: var(--grad); }
@media (max-width: 520px) { .av-grid { grid-template-columns: repeat(4, 1fr); gap: 8px; } .av-opt .avatar { width: 44px; height: 44px; } #avatarForm .card-head { flex-direction: column; align-items: stretch; } #avatarForm .card-head .btn { width: 100%; } }
@media (max-width: 560px) { .card-foot.between { flex-direction: column-reverse; align-items: stretch; } .card-foot .btn { width: 100%; } }

/* =====================================================================
   Misc + motion
   ===================================================================== */
.fade-up { animation: fadeUp .5s cubic-bezier(.22, .8, .24, 1) both; }
.fade-up.d1 { animation-delay: .05s; } .fade-up.d2 { animation-delay: .1s; } .fade-up.d3 { animation-delay: .15s; } .fade-up.d4 { animation-delay: .2s; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(10px); } }
@media (prefers-reduced-motion: reduce) { .fade-up { animation: none; } .auth-curve path.line { animation: none; stroke-dashoffset: 0; } }
.install-tip { display: none; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line-strong); }
.install-tip.show { display: flex; }
.install-tip .ico { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; background: var(--grad); color: #fff; flex: 0 0 auto; }
.bal-av { border-radius: 50%; box-shadow: 0 0 0 2px rgba(255,255,255,.15); }
@media (max-width: 1023px) { .bal-av { display: none; } }
@media (max-width: 1023px) { body.page-play .play-head { display: none; } }

/* =====================================================================
   v4.0 GAMES hub + game pages
   ===================================================================== */
.back-link { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 700; color: var(--muted); margin-bottom: 4px; }
.back-link:hover { color: var(--text-strong); }
.ic.flip, .ic-sm.flip { transform: rotate(180deg); }
.games-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 18px; }
.game-card { position: relative; display: flex; flex-direction: column; border-radius: var(--r-lg); overflow: hidden; background: var(--surface);
  border: 1px solid var(--line-strong); transition: transform .18s, border-color .18s, box-shadow .18s; color: inherit; }
.game-card:not(.is-soon):hover { transform: translateY(-3px); border-color: color-mix(in srgb, var(--gc) 55%, transparent); box-shadow: 0 24px 60px -30px var(--gc); }
.game-art { position: relative; height: 150px; display: grid; place-items: center; overflow: hidden; color: var(--gc, #7c5cff);
  background: radial-gradient(ellipse 90% 90% at 30% 0%, color-mix(in srgb, var(--gc, #7c5cff) 32%, transparent), transparent 70%), #07080c; }
.game-art svg { position: absolute; right: 0; bottom: 0; width: 75%; height: 80%; }
.game-big { position: relative; font-family: var(--display); font-size: 40px; font-weight: 700; color: #fff; letter-spacing: -.03em; text-shadow: 0 6px 30px color-mix(in srgb, var(--gc) 70%, transparent); }
.game-wheel { position: absolute; left: 18px; top: 18px; opacity: .9; }
.game-wheel .ic { width: 46px; height: 46px; animation: gameSpin 9s linear infinite; }
.game-art-pps .game-wheel { left: auto; top: auto; position: absolute; right: -22px; bottom: -22px; opacity: .35; }
.game-art-pps .game-wheel .ic { width: 150px; height: 150px; stroke-width: 1.2; }
/* v4.3 Under or Over card */
.game-art-uo .game-wheel { left: auto; top: auto; position: absolute; right: -14px; bottom: -18px; opacity: .38; }
.game-art-uo .game-wheel .ic { width: 140px; height: 140px; stroke-width: 1.2; animation: uoTilt 6s ease-in-out infinite; }
@keyframes uoTilt { 0%, 100% { transform: rotate(-12deg); } 50% { transform: rotate(10deg) translateY(-6px); } }
@media (prefers-reduced-motion: reduce) { .game-art-uo .game-wheel .ic { animation: none; } }
@keyframes gameSpin { to { transform: rotate(360deg); } }
.game-body { display: flex; flex-direction: column; gap: 6px; padding: 16px 18px 18px; flex: 1; }
.game-kind { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--gc, var(--muted)); }
.game-live { display: inline-flex; align-items: center; gap: 6px; font-size: 10.5px; font-weight: 800; letter-spacing: .12em; color: #ff8aa5; }
.game-live i { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); animation: livepulse2 1.4s infinite; }
.game-name { font-family: var(--display); font-size: 22px; font-weight: 700; color: var(--text-strong); margin-top: 4px; }
.game-desc { font-size: 13px; color: var(--muted); line-height: 1.5; }
.game-meta { font-size: 12px; color: var(--faint); font-family: var(--mono); min-height: 18px; }
.game-go { align-self: flex-start; margin-top: auto; }
.game-card.is-soon { opacity: .6; border-style: dashed; }
.games-note { display: flex; align-items: center; gap: 14px; padding: 16px 18px; }
.games-note > .ic { width: 28px; height: 28px; color: var(--warn); flex: 0 0 auto; }
@media (max-width: 600px) { .games-grid { grid-template-columns: 1fr; gap: 14px; } .game-art { height: 120px; } .games-note .btn { display: none; } }

/* v4.0 Leaderboard sections */
.lb-jump { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 18px; }
.lb-jump a { display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; border-radius: 999px; font-size: 12.5px; font-weight: 700; border: 1px solid var(--line-strong); color: var(--muted); }
.lb-jump a:hover { color: var(--text-strong); border-color: var(--gc, var(--accent)); }
.lb-jump a i { width: 8px; height: 8px; border-radius: 50%; background: var(--gc, var(--accent)); }
.lb-sec { margin-bottom: 30px; scroll-margin-top: 80px; }
.lb-sec-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.lb-sec-title { display: flex; align-items: center; gap: 10px; }
.lb-sec-title .gi { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; color: #fff; background: var(--gc, var(--accent)); box-shadow: 0 10px 26px -12px var(--gc, var(--accent)); }
.lb-sec-title h2 { font-family: var(--display); font-size: 20px; font-weight: 700; color: var(--text-strong); }
.lb-sec-title p { font-size: 12px; color: var(--muted); }
.lb-sec .lbd-me { margin-top: 12px; }

/* =====================================================================
   v4.1 "Daylight cockpit" — light content with dark islands (mixed).
   Light: page, cards, forms, lists, tables.  Dark: sidebar, balance hero, promo,
   game art / game frames, sign-in hero, phone tab bar.  Game frames are untouched.
   ===================================================================== */
:root {
  color-scheme: light;
  --bg: #eef1f6; --bg-2: #e6eaf1;
  --surface: #ffffff; --surface-2: #f5f7fb; --surface-3: #edf0f6; --input-bg: #f7f9fc;
  --glass: rgba(15, 23, 42, .03); --glass-2: rgba(15, 23, 42, .055);
  --line: rgba(15, 23, 42, .08); --line-strong: rgba(15, 23, 42, .14);
  --text: #3a4155; --text-strong: #0f1424; --muted: #687087; --faint: #9aa1b3;
  --hover: rgba(15, 23, 42, .045); --row-hover: rgba(15, 23, 42, .03); --tabs-bg: #e7ebf2;
  --accent-text: #e3194f; --accent-soft: rgba(255, 46, 99, .1); --ring: #ff2e63; --ring-soft: rgba(255, 46, 99, .18);
  --pos: #0f9f63; --pos-solid: #0f9d63; --pos-soft: rgba(16, 169, 106, .12);
  --neg: #df3557; --neg-soft: rgba(223, 53, 87, .1); --neg-line: rgba(223, 53, 87, .3);
  --warn: #c47f00; --warn-soft: rgba(255, 183, 0, .15);
  --info: #2f74e6; --info-soft: rgba(47, 116, 230, .1); --neutral-soft: rgba(15, 23, 42, .06);
  --violet: #6a48f5; --violet-soft: rgba(106, 72, 245, .1); --leaf: #11a467;
  --shadow: 0 1px 2px rgba(15, 23, 42, .05), 0 14px 34px -22px rgba(15, 23, 42, .28);
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, .08);
  --glow: 0 10px 26px -10px rgba(255, 46, 99, .55);
  --top-bg: rgba(238, 241, 246, .82);
  --fun-text: #9a6200; --fun-bg: rgba(255, 183, 0, .12); --fun-line: rgba(255, 183, 0, .35);
  --toast-bg: #0f1424; --toast-text: #fff;
}
/* Dark islands get the night palette back */
.sidebar, .sb-backdrop, .bal, .promo, .auth-side, .auth-mobile-brand, .frame-card, .game-art, .tabbar, .lbd-me-rank {
  color-scheme: dark;
  --surface: #0f1118; --surface-2: #151822; --surface-3: #1b1f2b; --input-bg: #0a0c12; --bg: #0b0d13;
  --glass: rgba(255, 255, 255, .035); --glass-2: rgba(255, 255, 255, .06);
  --line: rgba(255, 255, 255, .07); --line-strong: rgba(255, 255, 255, .12);
  --text: #c3c7d4; --text-strong: #f6f7fb; --muted: #858b9d; --faint: #545a6b;
  --hover: rgba(255, 255, 255, .05); --row-hover: rgba(255, 255, 255, .025);
  --accent-text: #ff6b8f; --accent-soft: rgba(255, 46, 99, .14);
  --pos: #34e89e; --leaf: #34e89e; --warn: #ffc547; --info: #74b4ff; --violet: #9a7cff;
  color: var(--text);
}
.sidebar { background: linear-gradient(180deg, #11131c, #0b0c12) !important; border-right: 0; box-shadow: 8px 0 30px -18px rgba(15, 23, 42, .5); }
body {
  background:
    radial-gradient(900px 480px at 100% -10%, rgba(255, 46, 99, .08), transparent 62%),
    radial-gradient(760px 480px at -10% 110%, rgba(106, 72, 245, .07), transparent 60%),
    var(--bg) !important;
  color: var(--text);
}
body::before { display: none; }
::selection { background: rgba(255, 46, 99, .22); color: var(--text-strong); }
.topbar { border-bottom: 1px solid var(--line); }
.card { background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); }
.tabs { background: var(--tabs-bg); }
.tabs button.on { background: #fff; color: var(--text-strong); box-shadow: 0 1px 3px rgba(15, 23, 42, .14); }
.ring .bg { stroke: rgba(15, 23, 42, .08); }
.limit-dots i, .bar { background: rgba(15, 23, 42, .08); }
.code-box .code { color: var(--text-strong); }
.code-box { background: repeating-linear-gradient(135deg, rgba(15, 23, 42, .025) 0 10px, transparent 10px 20px), var(--input-bg); }
.modal-panel::before { background: rgba(15, 23, 42, .18) !important; }
.uid-tag:not(.bal .uid-tag) { background: var(--surface-2); border-color: var(--line); color: var(--text); }
.uid-tag button:hover { color: var(--text-strong); }
.lbd { --gold: #d39a00; --silver: #8792a8; --bronze: #c46f2e; }
.lbd-step { color: rgba(15, 23, 42, .3); background: linear-gradient(180deg, rgba(15, 23, 42, .05), rgba(15, 23, 42, .01)); }
.lbd-pod.p1 .lbd-step { background: linear-gradient(180deg, rgba(255, 196, 0, .22), rgba(255, 196, 0, .02)); }
.lbd-me-card.good { background: linear-gradient(90deg, rgba(255, 196, 0, .12), transparent 60%), var(--surface); }
.lbd-me-card.good .lbd-me-ico { color: #c58a00; background: rgba(255, 196, 0, .16); }
.lbd-crown { filter: drop-shadow(0 2px 6px rgba(211, 154, 0, .45)); }
.tile, .sc, .list > *, .wallet2 { color: var(--text); }
.btn-secondary { background: var(--surface); border: 1px solid var(--line-strong); color: var(--text-strong); }
.btn-secondary:hover:not(:disabled) { background: var(--surface-2); }
.input, input, select, textarea { color: var(--text-strong); }
.top-points { background: var(--surface); box-shadow: var(--shadow-sm); }
.nav-live { background: rgba(255, 46, 99, .18); }
.site-foot { color: var(--muted); }
/* phone tab bar: dark glass island on the light page */
@media (max-width: 1023px) {
  .tabbar { background: rgba(16, 18, 26, .92); }
  .tab-fab { box-shadow: 0 14px 30px -6px rgba(255, 46, 99, .7), 0 0 0 5px #eef1f6; }
  .tab-play.on .tab-fab { box-shadow: 0 14px 34px -4px rgba(255, 46, 99, .9), 0 0 0 5px #eef1f6; }
  .topbar { background: rgba(238, 241, 246, .9); }
}
.game-card { box-shadow: var(--shadow); }
.games-note > .ic { color: #d39a00; }
.topbar-titles { min-width: 0; }
.topbar-title { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 640px) { .nb-btn { width: 36px; height: 36px; border-radius: 11px; } }

/* =====================================================================
   v4.2 "Sportsbook Blue" — light player app, inspired by sportsbook UIs:
   navy top bar, LIGHT sidebar, light blue-grey page, white cards,
   mid-blue hero cards, green action buttons. Game frames are untouched.
   ===================================================================== */
:root {
  color-scheme: light;
  --bg: #e4eaf1; --bg-2: #dce4ec;
  --surface: #ffffff; --surface-2: #f2f5f9; --surface-3: #e8edf3; --input-bg: #f5f8fb;
  --glass: rgba(16, 45, 80, .04); --glass-2: rgba(16, 45, 80, .075);
  --line: rgba(16, 45, 80, .10); --line-strong: rgba(16, 45, 80, .17);
  --text: #34475d; --text-strong: #0d2237; --muted: #5e7085; --faint: #93a2b3;
  --hover: rgba(16, 45, 80, .05); --row-hover: rgba(16, 45, 80, .035); --tabs-bg: #e1e8ef;

  --accent: #1b6fc2; --accent-2: #2a8ae0; --accent-hover: #175fa7; --accent-text: #1667b8;
  --accent-soft: rgba(27, 111, 194, .1); --on-accent: #fff; --ring: #1b6fc2; --ring-soft: rgba(27, 111, 194, .2);
  --grad: linear-gradient(180deg, #7cc33b 0%, #5c9f28 100%);                 /* green action buttons */
  --blue: linear-gradient(135deg, #2069a8 0%, #17558c 50%, #113f69 100%);    /* blue hero / active */
  --glow: 0 8px 20px -10px rgba(92, 159, 40, .8);
  --pos: #2f8f17; --pos-solid: #43a321; --pos-soft: rgba(67, 163, 33, .12); --leaf: #3a9a1d;
  --neg: #d33a50; --neg-soft: rgba(211, 58, 80, .1);
  --shadow: 0 1px 2px rgba(16, 45, 80, .06), 0 12px 30px -22px rgba(16, 45, 80, .35);
  --shadow-sm: 0 1px 2px rgba(16, 45, 80, .08);

  --sb-bg: #ffffff; --sb-line: rgba(16, 45, 80, .09); --sb-text: #3c5068; --sb-text-strong: #0d2237; --sb-faint: #8a9aac;
  --sb-hover: #eef3f8; --sb-active: #e4eefa; --sb-active-text: #0d2237;
  --top-bg: linear-gradient(90deg, #0f365a 0%, #16507f 100%);
  --fun-text: #8a5a00;
  --toast-bg: #0f365a; --toast-text: #fff;
}
/* Mid-blue islands (balance card, hero, promo, game art, sign-in side, phone tab bar) */
.sb-points, .bal, .promo, .auth-side, .auth-mobile-brand, .game-art, .tabbar, .lbd-me-rank, .topbar {
  color-scheme: dark;
  --surface: #1c5384; --surface-2: #215c91; --surface-3: #2666a0; --input-bg: #144571; --bg: #123f68;
  --glass: rgba(255, 255, 255, .08); --glass-2: rgba(255, 255, 255, .14);
  --line: rgba(255, 255, 255, .14); --line-strong: rgba(255, 255, 255, .22);
  --text: #d6e4f2; --text-strong: #ffffff; --muted: #a8c0d8; --faint: #7f9db9;
  --hover: rgba(255, 255, 255, .08); --row-hover: rgba(255, 255, 255, .05);
  --accent-text: #9fd0ff; --accent-soft: rgba(159, 208, 255, .16);
  --pos: #9be36f; --leaf: #9be36f; --neg: #ff8b9c; --warn: #ffd166; --info: #9fd0ff; --violet: #c3b2ff;
  color: var(--text);
}
/* ...and the sidebar is LIGHT now */
.sidebar {
  color-scheme: light;
  --surface: #ffffff; --surface-2: #f2f5f9; --surface-3: #e8edf3; --input-bg: #f5f8fb; --bg: #e4eaf1;
  --glass: rgba(16, 45, 80, .045); --glass-2: rgba(16, 45, 80, .08);
  --line: rgba(16, 45, 80, .10); --line-strong: rgba(16, 45, 80, .17);
  --text: #34475d; --text-strong: #0d2237; --muted: #5e7085; --faint: #93a2b3;
  --hover: rgba(16, 45, 80, .05); --accent-text: #1667b8; --accent-soft: rgba(27, 111, 194, .1);
  --pos: #2f8f17; --leaf: #3a9a1d; --warn: #b77900; --info: #1b6fc2; --violet: #5b44d6;
  background: #ffffff !important; color: var(--sb-text);
  border-right: 1px solid var(--sb-line); box-shadow: 4px 0 24px -16px rgba(16, 45, 80, .35);
}
body { background: linear-gradient(180deg, #dbe3ec 0, var(--bg) 260px) !important; color: var(--text); }
::selection { background: rgba(27, 111, 194, .2); color: var(--text-strong); }
.brand { color: var(--text-strong); }
.brand-mark { background: var(--blue); box-shadow: 0 8px 18px -10px rgba(17, 63, 105, .9); }
.brand small { color: var(--sb-faint); }

/* sidebar */
.sb-points { border: 0; background: radial-gradient(160px 110px at 100% 0%, rgba(124, 195, 59, .28), transparent 70%), var(--blue); box-shadow: 0 16px 30px -20px rgba(17, 63, 105, .9); }
.sb-points .val small { color: var(--muted); }
.sb-label { color: var(--sb-faint); }
.nav a, .nav button { color: var(--sb-text); }
.nav a:hover, .nav button:hover { background: var(--sb-hover); color: var(--sb-text-strong); }
.nav-ic { background: #eef3f8; color: #2a5a88; }
.nav a:hover .nav-ic, .nav button:hover .nav-ic { background: #e2ebf5; }
.nav a.active { background: var(--sb-active); color: var(--sb-active-text); box-shadow: inset 3px 0 0 #1b6fc2; }
.nav a.active .nav-ic { background: var(--blue); color: #fff; box-shadow: 0 8px 16px -10px rgba(17, 63, 105, .9); }
.nav-live { color: #fff; background: #e0364f; }
.sb-foot { border-top: 1px solid var(--sb-line); }
.sb-user { background: var(--surface-2); border-color: var(--line); }
.sb-user:hover { background: var(--sb-hover); }
.sb-fun { color: var(--sb-faint); }
.sb-backdrop { background: rgba(13, 34, 55, .45); }

/* navy top bar */
.topbar { background: var(--top-bg) !important; border-bottom: 0; box-shadow: 0 6px 18px -12px rgba(13, 34, 55, .7); }
.topbar-title { color: #fff; }
.topbar-kicker { color: #9fd0ff; }
.top-points { background: #fff !important; border: 0; color: #0d2237; box-shadow: 0 2px 6px rgba(0, 0, 0, .15); }
.top-points small { color: #5e7085; }
.top-points:hover { box-shadow: 0 0 0 2px #7cc33b; }
.top-avatar { box-shadow: 0 0 0 2px #16507f, 0 0 0 3px rgba(255, 255, 255, .45); }
.app-avatar-dot { background: #fff; color: #0d2237; border-color: #16507f; }
.nb-btn { color: #d6e4f2; border-color: rgba(255, 255, 255, .22); background: rgba(255, 255, 255, .06); }
.nb-btn:hover, .nb.open .nb-btn { color: #fff; border-color: rgba(255, 255, 255, .4); }
.nb-count { box-shadow: 0 0 0 2px #16507f; }
.nb-panel { /* dropdown stays light */
  color-scheme: light; --surface: #fff; --line: rgba(16, 45, 80, .10); --text: #34475d; --text-strong: #0d2237; --muted: #5e7085; --faint: #93a2b3;
  --accent-text: #1667b8; --row-hover: rgba(16, 45, 80, .035); color: var(--text); }

/* buttons: green actions, blue accents */
.btn-primary { background: var(--grad); color: #fff; box-shadow: var(--glow), inset 0 1px 0 rgba(255, 255, 255, .25); text-shadow: 0 1px 0 rgba(0, 0, 0, .12); }
.btn-primary:hover:not(:disabled) { background: var(--grad); filter: brightness(1.06); }
.btn-secondary { background: #fff; border: 1px solid var(--line-strong); color: var(--text-strong); }
.sb-points .btn-glass, .bal .btn-glass { background: rgba(255, 255, 255, .12); border-color: rgba(255, 255, 255, .2); color: #fff; }
.top-plus { background: var(--grad); }
.link, .sec-h .act { color: var(--accent-text); }

/* cards / page */
.card { background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); }
.tabs { background: var(--tabs-bg); }
.tabs button.on { background: #fff; color: var(--text-strong); box-shadow: 0 1px 3px rgba(16, 45, 80, .16); }
.greet h1, .page-head h1 { color: var(--text-strong); }

/* balance hero + promo: mid-blue */
.bal { border: 0; background: radial-gradient(520px 260px at 105% -20%, rgba(124, 195, 59, .26), transparent 60%), radial-gradient(420px 260px at -10% 120%, rgba(42, 138, 224, .35), transparent 60%), var(--blue);
  box-shadow: 0 26px 50px -30px rgba(17, 63, 105, .85); }
.bal-label { color: rgba(255, 255, 255, .75); }
.bal-amount .u { color: rgba(255, 255, 255, .65); }
.qa-btn { color: rgba(255, 255, 255, .9); }
.qa-ic { background: rgba(255, 255, 255, .12); border-color: rgba(255, 255, 255, .18); }
.qa-btn.hot .qa-ic { background: var(--grad); box-shadow: var(--glow); }
.uid-tag:not(.bal .uid-tag) { background: var(--surface-2); border-color: var(--line); color: var(--text); }
.bal .uid-tag, .bal .meta-pill { background: rgba(0, 0, 0, .18); border-color: rgba(255, 255, 255, .14); }
.promo { border: 0; background: radial-gradient(300px 200px at 100% 0%, rgba(124, 195, 59, .25), transparent 70%), linear-gradient(160deg, #1b5c94, #134a7a 60%, #0f3a60); }
.promo .live { color: #ffd166; }
.promo .live i, .game-live i, .live-dot { background: #e0364f; }
.live-chip { color: #c3233d; background: rgba(224, 54, 79, .1); border-color: rgba(224, 54, 79, .25); }
.live-chip i { background: #e0364f; }
.game-live { color: #ffd166; }
@keyframes livepulse2 { 0% { box-shadow: 0 0 0 0 rgba(224, 54, 79, .55); } 70% { box-shadow: 0 0 0 8px rgba(224, 54, 79, 0); } 100% { box-shadow: 0 0 0 0 rgba(224, 54, 79, 0); } }

/* games hub: blue art panels on white cards */
.game-art { background: radial-gradient(ellipse 90% 90% at 30% 0%, color-mix(in srgb, var(--gc, #2a8ae0) 38%, transparent), transparent 70%), linear-gradient(160deg, #17507f, #0f365a); }
.game-card { border-color: var(--line); }

/* sign-in side panels */
.auth-side { background: radial-gradient(800px 500px at 0% 110%, rgba(124, 195, 59, .22), transparent 60%), radial-gradient(600px 400px at 110% -10%, rgba(42, 138, 224, .35), transparent 60%), linear-gradient(160deg, #17507f, #0f365a); }
.auth-x { text-shadow: 0 10px 50px rgba(42, 138, 224, .45); }
@media (max-width: 1023px) {
  .auth-mobile-brand { background: radial-gradient(400px 260px at 100% 0%, rgba(124, 195, 59, .25), transparent 65%), linear-gradient(160deg, #17507f, #0f365a) !important; }
}

/* leaderboard accents */
.lbd-row.is-me { background: var(--accent-soft); box-shadow: inset 0 0 0 1px rgba(27, 111, 194, .3); }
.lbd-me-rank { background: var(--blue); }
.lbd-you { background: var(--blue); }

/* phones: navy app bar + navy tab bar with a green Games button */
@media (max-width: 1023px) {
  .topbar { background: var(--top-bg) !important; }
  .tabbar { background: rgba(15, 54, 90, .96) !important; border-color: rgba(255, 255, 255, .1); box-shadow: 0 16px 40px -12px rgba(13, 34, 55, .7); }
  .tab { color: #a8c0d8; }
  .tab.on { color: #fff; }
  .tab.on .tab-ic { background: rgba(255, 255, 255, .14); color: #fff; }
  .tab-fab { background: var(--grad); box-shadow: 0 12px 26px -8px rgba(92, 159, 40, .9), 0 0 0 5px #e4eaf1 !important; }
  .tab-play.on .tab-fab { box-shadow: 0 12px 30px -6px rgba(92, 159, 40, 1), 0 0 0 5px #e4eaf1 !important; }
  .sidebar { box-shadow: 0 20px 60px rgba(13, 34, 55, .35); }
}

/* v4.7 Drop Pop */
.dp-frame iframe { background: #140405; height: 760px; }
.game-art-dp { background: radial-gradient(ellipse at 50% 30%, #4d0c10, #140405 80%); }
.game-cards { display: flex; gap: 8px; }
.game-cards i { font-style: normal; width: 38px; height: 50px; border-radius: 7px; display: grid; place-items: center; font: 900 20px/1 Georgia, serif; color: #1b2236;
  background: linear-gradient(180deg, #fff, #e2dccf); box-shadow: 0 3px 0 #9a8f78, 0 8px 18px rgba(0,0,0,.5); transform: rotate(-8deg); }
.game-cards i:nth-child(2) { transform: translateY(-6px); }
.game-cards i:nth-child(3) { transform: rotate(8deg); color: #c4262e; }
.game-cards i.g { color: #fff8d8; background: linear-gradient(160deg, #fff6cf, #f6d46a 28%, #d99a2a 58%, #ffe28c 84%, #b8761a); }
