/* ==========================================================================
   AXOM — lobby design system
   One stylesheet for the player lobby (replaces the inline base sheet,
   portal-lobby.css and the lobby's use of axom-comfort.css).
   Tokens → base → shell → components → views → overlays → motion.
   ========================================================================== */

/* ---------- tokens ---------- */
:root {
    /* surfaces: matte ink → graphite */
    --ink: #0e0f11;
    --s0: #0b0c0e;
    --s1: #15171a;
    --s2: #1c1f23;
    --s3: #252930;
    --s4: #2e333b;
    --line: rgba(241, 235, 223, 0.08);
    --line-2: rgba(241, 235, 223, 0.13);
    --line-3: rgba(241, 235, 223, 0.22);

    /* text */
    --text: #f1ebdf;
    --text-2: #b9b2a5;
    --text-3: #9a948a;

    /* brand: one action colour (gold), teal as the secondary mark colour */
    --gold: #d9b25f;
    --gold-hi: #e6c378;
    --gold-lo: #b8923f;
    --gold-ink: #17120a;
    --gold-text: #e3c27c;
    --gold-tint: rgba(217, 178, 95, 0.12);
    --teal: #4cc9b6;
    --teal-tint: rgba(76, 201, 182, 0.12);

    /* semantic (always paired with an icon and words) */
    --ok: #5fd08f;
    --pending: #86b4ff;
    --warn: #f0a347;
    --fail: #f27b7b;
    --refund: #b9a2ff;
    --muted: #a29d94;

    --focus: #f1d79a;

    /* type */
    --font-ui: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    --font-display: "Archivo", "Geist", ui-sans-serif, system-ui, sans-serif;
    --font-mono: "Geist Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
    --fs-xs: 12px;
    --fs-sm: 13px;
    --fs-md: 15px;
    --fs-lg: 17px;

    /* space (4px grid) */
    --s-1: 4px; --s-2: 8px; --s-3: 12px; --s-4: 16px; --s-5: 20px; --s-6: 24px; --s-8: 32px; --s-10: 40px;

    /* shape */
    --r-sm: 8px; --r-md: 12px; --r-lg: 16px; --r-xl: 20px; --r-pill: 999px;

    /* motion */
    --t-press: 140ms;
    --t-card: 180ms;
    --t-layer: 220ms;
    --t-route: 240ms;
    --ease-out: cubic-bezier(0.2, 0.8, 0.2, 1);
    --ease-in: cubic-bezier(0.4, 0, 1, 1);

    /* layout */
    --top-h: 60px;
    --rail-w: 0px;
    --tabbar-h: 60px;
    --gutter: 16px;
    --content-max: 1440px;
    --safe-t: env(safe-area-inset-top, 0px);
    --safe-b: env(safe-area-inset-bottom, 0px);
    --safe-l: env(safe-area-inset-left, 0px);
    --safe-r: env(safe-area-inset-right, 0px);
    color-scheme: dark;
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html {
    -webkit-text-size-adjust: 100%; text-size-adjust: 100%; background: var(--ink);
    /* Keep focused or scrolled-to items clear of the sticky header and tab bar. */
    scroll-padding-top: calc(var(--top-h) + var(--safe-t) + 8px);
    scroll-padding-bottom: calc(var(--tabbar-h) + var(--safe-b) + 8px);
}
body {
    margin: 0;
    min-height: 100dvh;
    background: var(--ink);
    color: var(--text);
    font: 400 var(--fs-md)/1.5 var(--font-ui);
    font-feature-settings: "ss01";
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    -webkit-tap-highlight-color: transparent;
    overflow-x: hidden;
}
html.ui-layer-open, html.ui-layer-open body { overflow: hidden; }
html.ui-layer-open body { padding-right: var(--scrollbar-gap, 0px); }
img, svg { display: block; max-width: 100%; }
svg { fill: currentColor; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, p, ul, ol, dl, dd, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
[hidden] { display: none !important; }
code, kbd, .mono { font-family: var(--font-mono); font-size: 0.92em; overflow-wrap: anywhere; }
.num { font-variant-numeric: tabular-nums; font-feature-settings: "tnum"; }
::selection { background: rgba(217, 178, 95, 0.35); color: var(--text); }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: 6px; }
:focus:not(:focus-visible) { outline: none; }
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip-link { position: fixed; left: 12px; top: -60px; z-index: 500; background: var(--gold); color: var(--gold-ink); padding: 10px 14px; border-radius: var(--r-md); font-weight: 600; transition: top var(--t-press) var(--ease-out); }
.skip-link:focus { top: calc(8px + var(--safe-t)); }
body[data-auth="out"] [data-show="in"],
body[data-auth="in"] [data-show="out"],
body[data-auth="pending"] [data-show="out"] { display: none !important; }

.eyebrow { font-size: var(--fs-xs); font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-3); }
.field-hint { font-size: var(--fs-sm); color: var(--text-2); line-height: 1.5; }
.field-hint svg { display: inline-block; width: 15px; height: 15px; vertical-align: -3px; color: var(--warn); }
.section-label { font: 600 var(--fs-sm)/1.3 var(--font-ui); letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-3); margin: var(--s-6) 0 var(--s-3); }

/* ---------- shell ---------- */
#app {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto 1fr auto;
    min-height: 100dvh;
}
.topbar {
    grid-column: 1 / -1;
    position: sticky; top: 0; z-index: 40;
    display: flex; align-items: center; gap: var(--s-3);
    height: calc(var(--top-h) + var(--safe-t));
    padding: var(--safe-t) calc(var(--gutter) + var(--safe-r)) 0 calc(var(--gutter) + var(--safe-l));
    background: rgba(14, 15, 17, 0.94);
    border-bottom: 1px solid var(--line);
    backdrop-filter: saturate(140%) blur(10px);
    -webkit-backdrop-filter: saturate(140%) blur(10px);
}
.brand { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; flex-shrink: 0; }
.brand-mark { width: 30px; height: 24px; }
.wordmark { font: 800 21px/1 var(--font-display); font-stretch: 87.5%; letter-spacing: 0.14em; color: var(--text); }
.top-search {
    display: none; align-items: center; gap: 10px;
    height: 40px; padding: 0 12px; margin-left: var(--s-4);
    width: min(360px, 32vw);
    border-radius: var(--r-md); border: 1px solid var(--line-2); background: var(--s1);
    color: var(--text-3); font-size: 14px;
    transition: border-color var(--t-press) var(--ease-out), background-color var(--t-press) var(--ease-out);
}
.top-search svg { width: 18px; height: 18px; }
.top-search span { flex: 1; text-align: left; }
.top-search kbd { font-size: 12px; border: 1px solid var(--line-2); border-radius: 6px; padding: 1px 7px; color: var(--text-3); }
.top-search:hover { border-color: var(--line-3); background: var(--s2); color: var(--text-2); }
.top-actions { margin-left: auto; display: flex; align-items: center; gap: var(--s-2); min-width: 0; }

.wallet-pill {
    display: inline-flex; align-items: center; gap: 8px;
    height: 40px; padding: 0 14px; min-width: 0;
    border-radius: var(--r-pill); border: 1px solid var(--line-2); background: var(--s2);
    font-weight: 600; font-size: 15px;
    transition: border-color var(--t-press) var(--ease-out), background-color var(--t-press) var(--ease-out);
}
.wallet-pill:hover { border-color: var(--line-3); background: var(--s3); }
.wallet-pill-label { display: none; font-size: var(--fs-xs); font-weight: 500; color: var(--text-3); }
.wallet-pill .num { max-width: 46vw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wallet-pill[data-balance-state="stale"] { border-color: rgba(240, 163, 71, 0.5); }
.top-deposit span { display: none; }
.top-deposit { width: 40px; padding: 0; }
.top-deposit svg { width: 22px; height: 22px; }
@media (max-width: 429px) { .wordmark { display: none; } .top-actions { gap: 4px; } }

.icon-btn { position: relative; display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: var(--r-md); color: var(--text-2); transition: background-color var(--t-press) var(--ease-out), color var(--t-press) var(--ease-out); }
.icon-btn svg { width: 22px; height: 22px; }
.icon-btn:hover { background: var(--s2); color: var(--text); }
.icon-btn:active { background: var(--s3); }
.icon-btn .count-badge { position: absolute; top: 6px; right: 5px; }
.avatar-btn { display: none; }
.avatar { display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; overflow: hidden; background: var(--s3); border: 1px solid var(--line-2); font-weight: 600; font-size: 15px; color: var(--text); flex-shrink: 0; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar-lg { width: 64px; height: 64px; font-size: 24px; }
.count-badge { display: inline-grid; place-items: center; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--gold); color: var(--gold-ink); font: 700 11px/1 var(--font-ui); font-variant-numeric: tabular-nums; }
.pending-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--pending); box-shadow: 0 0 0 3px rgba(134, 180, 255, 0.18); flex-shrink: 0; }

.rail { display: none; }
#main {
    grid-column: 1;
    width: 100%; max-width: calc(var(--content-max) + 2 * var(--gutter));
    margin: 0 auto;
    padding: var(--s-4) calc(var(--gutter) + var(--safe-r)) calc(var(--tabbar-h) + var(--safe-b) + var(--s-8)) calc(var(--gutter) + var(--safe-l));
    outline: none;
}
.site-foot {
    grid-column: 1;
    display: flex; flex-wrap: wrap; align-items: center; gap: 6px 16px;
    padding: var(--s-4) var(--gutter) calc(var(--tabbar-h) + var(--safe-b) + var(--s-4));
    margin-top: calc(-1 * (var(--tabbar-h) + var(--safe-b)));
    border-top: 1px solid var(--line);
    color: var(--text-3); font-size: var(--fs-xs);
}
.site-foot .link-btn { font-size: var(--fs-xs); color: var(--text-2); }

.tabbar {
    position: fixed; z-index: 45; left: 0; right: 0; bottom: 0;
    display: grid; grid-template-columns: repeat(5, 1fr);
    height: calc(var(--tabbar-h) + var(--safe-b));
    padding: 0 var(--safe-r) var(--safe-b) var(--safe-l);
    background: rgba(14, 15, 17, 0.97);
    border-top: 1px solid var(--line);
    backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
}
.tabbar a {
    position: relative;
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
    color: var(--text-3); font-size: 11.5px; font-weight: 500;
    transition: color var(--t-press) var(--ease-out);
}
.tabbar a svg { width: 23px; height: 23px; }
.tabbar a[aria-current="page"] { color: var(--text); }
.tabbar a[aria-current="page"] svg { color: var(--gold); }
.tabbar a[aria-current="page"]::before { content: ""; position: absolute; top: 0; left: 30%; right: 30%; height: 2px; border-radius: 0 0 2px 2px; background: var(--gold); }
.tabbar a:active { color: var(--text); }
.tabbar .count-badge { position: absolute; top: 6px; left: calc(50% + 6px); }
.tabbar .pending-dot { position: absolute; top: 10px; left: calc(50% + 10px); }

.net-status { position: fixed; z-index: 450; top: 0; left: 0; right: 0; padding: calc(8px + var(--safe-t)) 16px 8px; background: var(--warn); color: #1b1206; font-size: var(--fs-sm); font-weight: 600; text-align: center; }

/* ---------- buttons ---------- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    height: 44px; padding: 0 18px;
    border-radius: var(--r-md); border: 1px solid transparent;
    font: 600 15px/1 var(--font-ui); white-space: nowrap;
    transition: background-color var(--t-press) var(--ease-out), border-color var(--t-press) var(--ease-out), color var(--t-press) var(--ease-out), transform var(--t-press) var(--ease-out);
    user-select: none;
}
.btn svg { width: 18px; height: 18px; flex-shrink: 0; }
.btn:active:not(:disabled) { transform: translateY(1px); }
.btn:disabled, .btn[aria-disabled="true"] { cursor: not-allowed; }
.btn-primary { background: var(--gold); color: var(--gold-ink); }
.btn-primary:hover:not(:disabled) { background: var(--gold-hi); }
.btn-primary:active:not(:disabled) { background: var(--gold-lo); }
.btn-primary:disabled { background: var(--s3); color: var(--text-3); }
.btn-secondary { background: var(--s3); color: var(--text); border-color: var(--line-2); }
.btn-secondary:hover:not(:disabled) { background: var(--s4); border-color: var(--line-3); }
.btn-secondary:disabled { color: var(--text-3); }
.btn-ghost { background: transparent; color: var(--text-2); }
.btn-ghost:hover:not(:disabled) { background: var(--s2); color: var(--text); }
.btn-ghost[aria-pressed="true"] { color: var(--gold-text); }
.btn-ghost[aria-pressed="true"] svg { color: var(--gold); }
.btn-sm { height: 36px; padding: 0 14px; font-size: 14px; border-radius: 10px; }
.btn-xs { height: 32px; padding: 0 12px; font-size: 13px; border-radius: var(--r-sm); }
.btn-lg { height: 52px; padding: 0 22px; font-size: 16px; }
.btn-block { width: 100%; }
.btn[aria-busy="true"] { opacity: 0.7; }
.danger-text { color: var(--fail) !important; }
.link-btn {
    display: inline-flex; align-items: center; gap: 4px;
    min-height: 32px; padding: 0;
    color: var(--gold-text); font-weight: 500; font-size: 14px;
    text-underline-offset: 3px;
}
.link-btn svg { width: 16px; height: 16px; }
.link-btn:hover { text-decoration: underline; }
.section-head .link-btn { white-space: nowrap; flex-shrink: 0; }
.button-pair { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-2); }
.modal-back-btn { display: inline-flex; align-items: center; gap: 6px; height: 36px; margin-bottom: var(--s-2); color: var(--text-2); font-size: 14px; font-weight: 500; }
.modal-back-btn svg { width: 18px; height: 18px; }
.modal-back-btn:hover { color: var(--text); }

.spinner { display: inline-block; width: 16px; height: 16px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; animation: spin 0.7s linear infinite; flex-shrink: 0; }
#depAmtSpinner, #withdrawSpinner { display: none; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- chips, badges, status ---------- */
.chip-row { display: flex; gap: var(--s-2); overflow-x: auto; scrollbar-width: none; padding: 2px 24px 2px 2px; margin: -2px; -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 28px), transparent); mask-image: linear-gradient(to right, #000 calc(100% - 28px), transparent); }
.chip-row::-webkit-scrollbar { display: none; }
.chip {
    display: inline-flex; align-items: center; gap: 6px; flex-shrink: 0;
    height: 36px; padding: 0 14px;
    border-radius: var(--r-pill); border: 1px solid var(--line-2); background: var(--s1);
    color: var(--text-2); font-size: 14px; font-weight: 500;
    transition: background-color var(--t-press) var(--ease-out), border-color var(--t-press) var(--ease-out), color var(--t-press) var(--ease-out);
}
.chip svg { width: 15px; height: 15px; }
.chip:hover { color: var(--text); border-color: var(--line-3); }
.chip.active, .chip[aria-pressed="true"] { background: var(--gold-tint); border-color: rgba(217, 178, 95, 0.55); color: var(--gold-text); }

.badge { display: inline-flex; align-items: center; height: 22px; padding: 0 8px; border-radius: 6px; font: 700 11px/1 var(--font-ui); letter-spacing: 0.05em; text-transform: uppercase; }
.badge-hot { background: #f2c25b; color: #2a1d04; }
.badge-new { background: var(--teal); color: #052520; }
.badge-live { background: rgba(14, 15, 17, 0.82); color: var(--text); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.16); }
.badge-warn { background: var(--warn); color: #241503; }
.badge-muted { background: rgba(14, 15, 17, 0.82); color: var(--text-2); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.14); }

.status { display: inline-flex; align-items: center; gap: 5px; height: 24px; padding: 0 8px; border-radius: 6px; font-size: 12.5px; font-weight: 600; white-space: nowrap; }
.status svg { width: 14px; height: 14px; }
.status-ok { color: var(--ok); background: rgba(95, 208, 143, 0.12); }
.status-pending { color: var(--pending); background: rgba(134, 180, 255, 0.12); }
.status-warn { color: var(--warn); background: rgba(240, 163, 71, 0.12); }
.status-fail { color: var(--fail); background: rgba(242, 123, 123, 0.12); }
.status-refund { color: var(--refund); background: rgba(185, 162, 255, 0.12); }
.status-muted { color: var(--muted); background: rgba(162, 157, 148, 0.12); }
.status-info { color: var(--teal); background: var(--teal-tint); }
.chip-static { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 9px; border-radius: 6px; background: var(--s3); font-size: 12.5px; font-weight: 600; color: var(--text); }
.chip-static svg { width: 14px; height: 14px; }
.chip-static.is-telegram svg { color: #5fb6ea; }
.chip-static.is-browser svg { color: var(--gold); }

/* ---------- inputs ---------- */
.input, .search-field input, .sort-field select {
    width: 100%; height: 48px; padding: 0 14px;
    border-radius: var(--r-md); border: 1px solid var(--line-2); background: var(--s0);
    color: var(--text); font-size: 16px;
    transition: border-color var(--t-press) var(--ease-out), box-shadow var(--t-press) var(--ease-out);
}
.input::placeholder, .search-field input::placeholder { color: var(--text-3); }
.input:focus, .search-field input:focus, .sort-field select:focus { outline: none; border-color: rgba(217, 178, 95, 0.7); box-shadow: 0 0 0 3px rgba(217, 178, 95, 0.18); }
.input-amount { height: 56px; font: 600 22px/1 var(--font-ui); font-variant-numeric: tabular-nums; }
.field-label { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 8px; font-size: 14px; font-weight: 500; color: var(--text); }
.field-label span { font-size: var(--fs-sm); font-weight: 400; color: var(--text-3); }
.search-field { position: relative; flex: 1; min-width: 0; }
.search-field > svg { position: absolute; left: 14px; top: 50%; width: 19px; height: 19px; transform: translateY(-50%); color: var(--text-3); pointer-events: none; }
.search-field input { padding: 0 48px 0 44px; -webkit-appearance: none; appearance: none; }
.search-field input::-webkit-search-cancel-button { -webkit-appearance: none; }
.search-field.small input { height: 44px; }
.search-clear { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); width: 40px; height: 40px; display: none; place-items: center; border-radius: 10px; color: var(--text-3); }
.search-clear svg { width: 18px; height: 18px; }
.search-clear.show { display: grid; }
.search-clear:hover { color: var(--text); background: var(--s2); }
.sort-field { display: inline-flex; align-items: center; gap: 8px; flex-shrink: 0; font-size: 14px; color: var(--text-2); }
@media (max-width: 559px) { .catalog-tools .sort-field > span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); } }
.sort-field select {
    width: auto; height: 36px; padding: 0 32px 0 12px; font-size: 14px; border-radius: 10px; background-color: var(--s1);
    -webkit-appearance: none; appearance: none; cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23b9b2a5' d='m7 10 5 5 5-5z'/%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: right 8px center; background-size: 18px;
}
.toggle { display: flex; align-items: center; gap: 14px; padding: 12px 0; border-bottom: 1px solid var(--line); cursor: pointer; }
.toggle input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.toggle-ui { position: relative; flex-shrink: 0; width: 44px; height: 26px; border-radius: 13px; background: var(--s4); transition: background-color var(--t-press) var(--ease-out); }
.toggle-ui::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: var(--text); transition: transform var(--t-press) var(--ease-out); }
.toggle input:checked + .toggle-ui { background: var(--gold); }
.toggle input:checked + .toggle-ui::after { transform: translateX(18px); background: var(--gold-ink); }
.toggle input:focus-visible + .toggle-ui { outline: 2px solid var(--focus); outline-offset: 2px; }
.toggle b { display: block; font-weight: 500; }
.toggle small { display: block; font-size: var(--fs-sm); color: var(--text-2); }
.form-foot { display: flex; align-items: center; gap: 12px; margin-top: 14px; flex-wrap: wrap; }
.form-status { font-size: var(--fs-sm); color: var(--text-2); }
.form-status[data-tone="ok"] { color: var(--ok); }
.form-status[data-tone="fail"] { color: var(--fail); }
.confirm-check { display: flex; gap: 12px; align-items: flex-start; padding: 4px 0 12px; font-size: 14px; color: var(--text); cursor: pointer; }
.confirm-check input { width: 20px; height: 20px; margin: 1px 0 0; accent-color: var(--gold); flex-shrink: 0; }

/* ---------- panels and common blocks ---------- */
.panel { background: var(--s1); border: 1px solid var(--line); border-radius: var(--r-lg); padding: var(--s-5); }
.panel > h2, .panel-head h2 { font: 600 var(--fs-lg)/1.3 var(--font-ui); }
.panel > h2 { margin-bottom: var(--s-2); }
.panel > p { color: var(--text-2); font-size: 14px; margin-bottom: var(--s-3); }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: var(--s-3); margin-bottom: var(--s-3); }
.panel-head h2 { display: inline-flex; align-items: center; gap: 10px; }
.view-head { margin: var(--s-2) 0 var(--s-5); }
.view-head h1 { font: 700 28px/1.15 var(--font-display); font-stretch: 87.5%; letter-spacing: 0.01em; outline: none; }
.view-head p { color: var(--text-2); margin-top: 6px; max-width: 60ch; }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: var(--s-3); margin-bottom: var(--s-3); }
.section-head h2 { font: 700 20px/1.2 var(--font-display); font-stretch: 87.5%; letter-spacing: 0.01em; display: flex; align-items: baseline; gap: 8px; }
.section-head .count { font: 500 var(--fs-sm)/1 var(--font-ui); color: var(--text-3); }
.section-sub { display: flex; align-items: center; gap: 6px; margin-top: 4px; font-size: var(--fs-sm); color: var(--text-2); }
.section-sub svg { width: 15px; height: 15px; flex-shrink: 0; color: var(--text-3); }
.originals .section-sub svg { color: var(--gold); }
.telegram .section-sub svg { color: #5fb6ea; }
.empty-state {
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px;
    padding: 28px 16px; text-align: center;
    border: 1px dashed var(--line-2); border-radius: var(--r-lg);
    color: var(--text-2); font-size: 14px;
}
.empty-state strong { color: var(--text); font-size: 15px; font-weight: 600; }
.empty-state .btn { margin-top: 6px; }
.empty-state > svg { width: 24px; height: 24px; color: var(--warn); }
.empty-state.signed-out { border-style: solid; background: var(--s1); }
.empty-inline { color: var(--text-2); font-size: 14px; padding: 12px 0; }
.callout { border-radius: var(--r-md); padding: 12px 14px; margin: 12px 0; font-size: 14px; }
.callout.is-warn { background: rgba(240, 163, 71, 0.1); border: 1px solid rgba(240, 163, 71, 0.35); }
.callout strong { display: block; margin-bottom: 4px; }
.callout p { color: var(--text-2); }
.rule-list { display: grid; gap: 8px; margin: 12px 0 16px; }
.rule-list li { position: relative; padding-left: 18px; font-size: 14px; color: var(--text-2); }
.rule-list li::before { content: ""; position: absolute; left: 2px; top: 9px; width: 6px; height: 6px; border-radius: 2px; background: var(--gold); }
.link-list li + li { border-top: 1px solid var(--line); }
.link-list a, .link-list button { display: flex; align-items: center; justify-content: space-between; width: 100%; min-height: 48px; color: var(--text); font-size: 15px; text-align: left; }
.link-list svg { width: 18px; height: 18px; color: var(--text-3); }
.link-list a:hover, .link-list button:hover { color: var(--gold-text); }

.figure-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: var(--s-2); margin: var(--s-3) 0; }
.figure { background: var(--s2); border-radius: var(--r-md); padding: 12px 14px; min-width: 0; }
.figure dt, .figure > span { display: block; font-size: var(--fs-sm); color: var(--text-2); }
.figure dd, .figure > strong { display: block; margin-top: 4px; font: 700 20px/1.2 var(--font-ui); font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.figure.is-accent dd, .figure.is-accent > strong { color: var(--gold-text); }

.meter-bar { position: relative; height: 8px; border-radius: 4px; background: var(--s3); overflow: hidden; margin: 10px 0; }
.meter-bar.big { height: 12px; border-radius: 6px; }
.meter-bar i { position: absolute; inset: 0 auto 0 0; width: var(--pct, 0%); border-radius: inherit; background: var(--gold); transition: width 400ms var(--ease-out); }

.detail-list { display: grid; }
.detail-row { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; padding: 11px 0; border-bottom: 1px solid var(--line); }
.detail-row dt { color: var(--text-2); font-size: 14px; flex-shrink: 0; }
.detail-row dd { text-align: right; font-size: 14px; min-width: 0; overflow-wrap: anywhere; }
.detail-list.compact .detail-row { padding: 8px 0; }
.detail-actions { display: grid; gap: 8px; margin-top: 18px; }
.detail-more { margin-top: 14px; border: 1px solid var(--line); border-radius: var(--r-md); padding: 0 14px; }
.detail-more summary { min-height: 44px; display: flex; align-items: center; cursor: pointer; font-weight: 500; color: var(--text-2); }
.detail-more summary:hover { color: var(--text); }
.txn-link { color: var(--gold-text); text-align: right; overflow-wrap: anywhere; }
.kv-copy { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 6px 8px; margin: 10px 0; }
.kv-copy > span { grid-column: 1 / -1; font-size: var(--fs-sm); color: var(--text-2); }
.kv-copy code { display: block; padding: 10px 12px; border-radius: 10px; background: var(--s0); border: 1px solid var(--line-2); font-size: 13.5px; line-height: 1.4; }
.kv-copy.is-required > span { color: var(--warn); font-weight: 600; }
.kv-copy.is-large code { font-size: 14px; }

.row-skeleton, .card-skeleton { position: relative; overflow: hidden; background: var(--s1); border-radius: var(--r-md); }
.row-skeleton { display: grid; gap: 8px; padding: 16px; margin-bottom: 8px; list-style: none; }
.row-skeleton i { display: block; height: 10px; border-radius: 5px; background: var(--s3); }
.row-skeleton i:first-child { width: 60%; }
.row-skeleton i:last-child { width: 35%; }
.card-skeleton { height: 168px; }
.card-skeleton.tall { height: 280px; }
.row-skeleton::after, .card-skeleton::after, .gcard-art:not(.is-loaded)::after, [data-balance].is-loading::after {
    content: ""; position: absolute; inset: 0;
    background: linear-gradient(100deg, transparent 20%, rgba(255, 255, 255, 0.05) 50%, transparent 80%);
    animation: shimmer 1.3s linear infinite;
}
@keyframes shimmer { from { transform: translateX(-100%); } to { transform: translateX(100%); } }
[data-balance].is-loading { position: relative; display: inline-block; min-width: 72px; color: transparent !important; background: var(--s3); border-radius: 6px; overflow: hidden; }

/* ---------- game cards ---------- */
.game-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 12px; }
.game-row {
    display: grid; grid-auto-flow: column; grid-auto-columns: calc((100% - 12px) / 2.35);
    gap: 12px; overflow-x: auto; overscroll-behavior-x: contain;
    scroll-snap-type: x mandatory; scroll-padding: 0 var(--gutter);
    margin: 0 calc(-1 * var(--gutter)); padding: 2px var(--gutter) 6px;
    scrollbar-width: thin; scrollbar-color: var(--s3) transparent;
}
.game-row > .gcard { scroll-snap-align: start; }
.gcard { position: relative; min-width: 0; --accent: var(--gold); }
.gcard-link { display: block; border-radius: var(--r-lg); outline-offset: 3px; }
.gcard-art {
    position: relative; display: block; aspect-ratio: 1 / 1; overflow: hidden;
    border-radius: var(--r-lg);
    background: radial-gradient(120% 90% at 50% 0%, color-mix(in srgb, var(--accent) 26%, var(--s2)) 0%, var(--s2) 70%);
    box-shadow: inset 0 0 0 1px var(--line);
    isolation: isolate;
}
.gcard-art img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform var(--t-card) var(--ease-out), opacity var(--t-card) var(--ease-out); }
.gcard-art:not(.is-loaded) img { opacity: 0; }
.gcard-art.is-wide::before { content: ""; position: absolute; inset: -12%; background: var(--cover) center / cover; filter: blur(22px) saturate(1.1); opacity: 0.55; z-index: -1; }
.gcard-art.is-wide img { object-fit: contain; }
.glyph-scene { position: absolute; inset: 0; display: grid; place-items: center; color: var(--accent); }
.glyph-scene svg { width: 58%; height: 58%; }
.gcard-art .badge { position: absolute; top: 8px; left: 8px; z-index: 1; }
.gcard-platform {
    position: absolute; left: 8px; bottom: 8px; z-index: 1;
    display: inline-flex; align-items: center; gap: 5px;
    height: 24px; padding: 0 8px 0 6px; border-radius: 7px;
    background: rgba(11, 12, 14, 0.8); color: var(--text);
    font-size: 11.5px; font-weight: 600; letter-spacing: 0.01em;
    backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
}
.gcard-platform svg { width: 14px; height: 14px; }
.gcard-platform.is-browser svg { color: var(--gold); }
.gcard-platform.is-telegram svg { color: #6cc0f0; }
.gcard-body { display: block; padding: 9px 40px 0 2px; }
.gcard-name { display: block; font-size: 15px; font-weight: 600; line-height: 1.3; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gcard-meta { display: block; margin-top: 2px; font-size: var(--fs-xs); color: var(--text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gcard-fav, .gcard-info {
    position: absolute; z-index: 2;
    display: grid; place-items: center;
    width: 40px; height: 40px; border-radius: 50%;
    transition: color var(--t-press) var(--ease-out), background-color var(--t-press) var(--ease-out), transform var(--t-press) var(--ease-out);
}
.gcard-fav { top: 4px; right: 4px; color: rgba(255, 255, 255, 0.9); }
.gcard-fav::before { content: ""; position: absolute; inset: 5px; border-radius: 50%; background: rgba(11, 12, 14, 0.62); transition: background-color var(--t-press) var(--ease-out); }
.gcard-fav svg { position: relative; width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 2; }
.gcard-fav:hover::before { background: rgba(11, 12, 14, 0.85); }
.gcard-fav:active { transform: scale(0.92); }
.gcard-fav[aria-pressed="true"] { color: var(--gold); }
.gcard-fav[aria-pressed="true"] svg { fill: currentColor; }
.gcard-info { right: -4px; top: calc(100% - 44px); color: var(--text-3); }
.gcard-info svg { width: 19px; height: 19px; }
.gcard-info:hover { color: var(--text); background: var(--s2); }
.gcard.is-maintenance .gcard-art img, .gcard.is-soon .gcard-art img, .gcard.is-maintenance .glyph-scene, .gcard.is-soon .glyph-scene { filter: grayscale(0.7) brightness(0.6); }
.gcard.is-soon .gcard-link { cursor: default; }
@media (hover: hover) and (pointer: fine) {
    .gcard:not(.is-soon) .gcard-link:hover .gcard-art img { transform: scale(1.04); }
    .gcard:not(.is-soon) .gcard-link:hover .gcard-name { color: var(--gold-text); }
}
.gcard-link:active .gcard-art { transform: scale(0.985); transition: transform var(--t-press) var(--ease-out); }
body.account-compact .game-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px 8px; }
body.account-compact .gcard-meta, body.account-compact .gcard-platform { display: none; }
body.account-compact .gcard-name { font-size: 13px; }

/* ---------- casino ---------- */
.lobby-top { display: grid; gap: var(--s-3); margin-bottom: var(--s-4); }
.feature { position: relative; --accent: var(--gold); }
.feature-link {
    display: grid; grid-template-columns: 112px minmax(0, 1fr); align-items: center; gap: 14px;
    padding: 12px; border-radius: var(--r-xl);
    background:
        radial-gradient(70% 140% at 0% 50%, color-mix(in srgb, var(--accent) 20%, transparent) 0%, transparent 65%),
        var(--s1);
    border: 1px solid var(--line);
    transition: border-color var(--t-card) var(--ease-out);
}
.feature-link:hover { border-color: var(--line-3); }
.feature-art { width: 112px; border-radius: 14px; }
.feature-copy { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; min-width: 0; padding-right: 36px; }
.feature-title { font: 700 24px/1.1 var(--font-display); font-stretch: 87.5%; }
.feature-text { font-size: 14px; color: var(--text-2); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.feature-cta { margin-top: 6px; }
.feature-info { position: absolute; top: 8px; right: 8px; width: 40px; height: 40px; display: grid; place-items: center; border-radius: 50%; color: var(--text-3); }
.feature-info svg { width: 20px; height: 20px; }
.feature-info:hover { color: var(--text); background: var(--s2); }
.account-card { display: none; }
.account-card-row { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 14px; }
.account-balance { font: 700 30px/1.15 var(--font-ui); font-variant-numeric: tabular-nums; margin: 4px 0 2px; overflow-wrap: anywhere; }
.account-card[data-balance-state="stale"] .account-balance, .balance-card[data-balance-state="stale"] .balance-value { color: var(--text-2); }
.account-rewards { display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 12px; border-radius: var(--r-pill); background: var(--s2); border: 1px solid var(--line-2); font-size: 14px; font-weight: 500; }
.account-rewards svg { width: 17px; height: 17px; color: var(--gold); }
.account-guest-title { font: 600 18px/1.3 var(--font-ui); margin: 6px 0 14px; }

.catalog-tools { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; align-items: center; margin-bottom: var(--s-5); scroll-margin-top: calc(var(--top-h) + var(--safe-t) + 8px); }
.catalog-tools .search-field { grid-column: 1 / -1; }
.catalog-section { margin-bottom: var(--s-8); }
.lobby-secondary { display: grid; gap: var(--s-3); margin-top: var(--s-2); }
.meter-figure { font: 700 24px/1.2 var(--font-ui); font-variant-numeric: tabular-nums; }
.meter-figure.big { font-size: 32px; }
.meter-of { font-size: 15px; font-weight: 500; color: var(--text-2); }
.meter-personal { font-size: 14px; color: var(--text); margin: 8px 0; padding: 10px 12px; border-radius: 10px; background: var(--s2); }
.meter-personal[data-qualified="yes"], .meter-you[data-qualified="yes"] p { color: var(--ok); }
[data-meter-state][data-state="active"] [data-meter="status"] { color: var(--ok); background: rgba(95, 208, 143, 0.12); }
[data-meter-state][data-state="settled"] [data-meter="status"] { color: var(--gold-text); background: var(--gold-tint); }
.wins-list li + li { border-top: 1px solid var(--line); }
.win-row { display: grid; grid-template-columns: 32px minmax(0, 1fr) auto; align-items: center; gap: 10px; width: 100%; min-height: 52px; text-align: left; border-radius: 8px; }
.win-row:hover .win-who strong { color: var(--gold-text); }
.win-avatar { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: var(--s3); font-size: 13px; font-weight: 600; }
.win-who { min-width: 0; }
.win-who strong { display: block; font-size: 14px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.win-who span { display: block; font-size: var(--fs-xs); color: var(--text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.win-amt { text-align: right; font-weight: 600; color: var(--ok); font-size: 14px; }
.win-amt small { display: block; font-size: var(--fs-xs); font-weight: 500; color: var(--text-2); }
.fair-card p { font-size: 14px; color: var(--text-2); margin-bottom: 14px; }

/* ---------- wallet ---------- */
.wallet-layout { display: grid; gap: var(--s-4); }
.wallet-main { display: grid; gap: var(--s-6); align-content: start; min-width: 0; }
.balance-card {
    padding: var(--s-6) var(--s-5); border-radius: var(--r-xl);
    background: radial-gradient(90% 120% at 100% 0%, rgba(217, 178, 95, 0.12), transparent 60%), var(--s1);
    border: 1px solid var(--line-2);
}
.balance-value { font: 700 40px/1.1 var(--font-ui); font-variant-numeric: tabular-nums; margin: 6px 0 4px; overflow-wrap: anywhere; }
.balance-note { font-size: var(--fs-sm); color: var(--text-2); margin-bottom: var(--s-5); min-height: 20px; }
[data-balance-state="stale"] .balance-note, [data-balance-state="stale"] [data-balance-note] { color: var(--warn); }
.balance-card .button-pair, .balance-card > .btn { margin-bottom: var(--s-4); }
.ledger { display: grid; gap: 0; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--s1); overflow: hidden; }
.ledger:empty { display: none; }
.ledger > .empty-state, .ledger > .row-skeleton { margin: 12px; }
.ledger-row { display: flex; flex-direction: column; border-bottom: 1px solid var(--line); }
.ledger-row:last-child { border-bottom: 0; }
.ledger-main {
    display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 12px; align-items: center;
    width: 100%; padding: 14px 16px; text-align: left;
    transition: background-color var(--t-press) var(--ease-out);
}
.ledger-main:hover { background: var(--s2); }
.ledger-title { font-weight: 600; font-size: 15px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ledger-method { font-weight: 500; color: var(--text-2); font-size: 13.5px; }
.ledger-amt { font-weight: 700; font-size: 15px; text-align: right; white-space: nowrap; }
.ledger-amt.in { color: var(--ok); }
.ledger-amt.out { color: var(--text); }
.ledger-amt.neutral { color: var(--text-3); text-decoration: line-through; }
.ledger-sub { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; font-size: var(--fs-sm); color: var(--text-2); }
.ledger-ref { grid-column: 1 / -1; font-size: var(--fs-xs); color: var(--text-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ledger-pay { align-self: flex-end; margin: -6px 16px 12px; }
.pending-list { display: grid; gap: var(--s-3); }
.pending-card { padding: var(--s-4); border-radius: var(--r-lg); background: var(--s1); border: 1px solid rgba(134, 180, 255, 0.28); }
.pending-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin-bottom: 8px; }
.pending-head strong { font-size: 15px; }
.pending-copy { font-size: var(--fs-sm); color: var(--text-2); }
.pending-card .btn { margin-top: 6px; }
.methods-card h2 { margin-bottom: var(--s-3); }
.methods-card h3 { font-size: 14px; font-weight: 600; margin: var(--s-4) 0 6px; }
.coin-list { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.coin-list li { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 10px 0 4px; border-radius: var(--r-pill); background: var(--s2); font-size: 13px; font-weight: 500; }
.coin-list .coin-ic { width: 24px; height: 24px; }
.coin-list .coin-ic img { width: 16px; height: 16px; }

/* ---------- rewards ---------- */
.rewards-head { display: flex; justify-content: space-between; align-items: flex-start; gap: var(--s-4); }
.rewards-summary-value { font: 700 22px/1.25 var(--font-ui); color: var(--gold-text); margin-top: 6px; }
.subnav { display: flex; gap: 2px; overflow-x: auto; scrollbar-width: none; border-bottom: 1px solid var(--line); margin: 0 calc(-1 * var(--gutter)) var(--s-5); padding: 0 var(--gutter); }
.subnav::-webkit-scrollbar { display: none; }
.subnav a { flex-shrink: 0; display: inline-flex; align-items: center; min-height: 46px; padding: 0 14px; color: var(--text-2); font-size: 14.5px; font-weight: 500; border-bottom: 2px solid transparent; margin-bottom: -1px; transition: color var(--t-press) var(--ease-out), border-color var(--t-press) var(--ease-out); }
.subnav a:hover { color: var(--text); }
.subnav a[aria-current="page"] { color: var(--text); border-bottom-color: var(--gold); }
.rewards-panel { display: grid; gap: var(--s-4); }
.reward-section + .reward-section { margin-top: var(--s-2); }
.reward-section .section-label { margin-top: var(--s-2); }
.reward-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: var(--s-3); }
.reward-card { display: flex; flex-direction: column; gap: 10px; padding: var(--s-4); border-radius: var(--r-lg); background: var(--s1); border: 1px solid var(--line); }
.reward-card.is-ready { border-color: rgba(217, 178, 95, 0.5); box-shadow: inset 0 2px 0 var(--gold); }
.reward-card.is-claimed, .reward-card.is-locked { opacity: 0.86; }
.reward-head { display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; gap: 12px; align-items: start; }
.reward-icon { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: var(--s3); font-size: 20px; }
.reward-titles { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; min-width: 0; }
.reward-titles h3 { font-size: 15.5px; font-weight: 600; line-height: 1.3; }
.reward-countdown { display: inline-flex; align-items: center; gap: 4px; font-size: var(--fs-xs); color: var(--text-2); white-space: nowrap; }
.reward-countdown svg { width: 14px; height: 14px; }
.reward-countdown b { font-variant-numeric: tabular-nums; color: var(--text); font-weight: 600; }
.reward-primary { font: 700 19px/1.3 var(--font-ui); }
.reward-body { font-size: 14px; color: var(--text-2); }
.reward-meta { display: flex; flex-wrap: wrap; gap: 6px; }
.reward-meta li { font-size: var(--fs-xs); color: var(--text-2); background: var(--s2); border-radius: 6px; padding: 4px 8px; }
.reward-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 2px; }
.tier-pill { display: inline-flex; align-items: center; gap: 8px; height: 36px; padding: 0 12px 0 6px; border-radius: var(--r-pill); background: var(--s2); border: 1px solid var(--line-2); font-size: 14px; font-weight: 600; white-space: nowrap; }
.tier-pill img { width: 26px; height: 26px; }
.tier-pill svg { width: 16px; height: 16px; color: var(--text-3); }
.tier-ic { display: inline-grid; place-items: center; width: 32px; height: 32px; font-size: 20px; }
.tier-ic img { width: 32px; height: 32px; }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--s1); }
.tier-table, .info-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.tier-table th, .tier-table td, .info-table th, .info-table td { padding: 11px 14px; border-bottom: 1px solid var(--line); text-align: left; white-space: nowrap; }
.tier-table thead th, .info-table thead th { font-size: var(--fs-xs); font-weight: 600; color: var(--text-3); text-transform: uppercase; letter-spacing: 0.06em; background: var(--s1); }
.tier-table tbody th, .info-table tbody th { font-weight: 500; }
.tier-table td.num, .info-table td.num { text-align: right; }
.tier-table tr:last-child > *, .info-table tr:last-child > * { border-bottom: 0; }
.tier-table tr.is-current { background: var(--gold-tint); }
.tier-name { display: inline-flex; align-items: center; gap: 10px; }
.tier-name .tier-ic { width: 28px; height: 28px; }
.tier-name .tier-ic img { width: 28px; height: 28px; }
.ref-body { display: grid; gap: var(--s-3); max-width: 720px; }
.code-panel .btn { margin-top: 4px; }
.meter-you { margin: 12px 0; padding: 12px 14px; border-radius: var(--r-md); background: var(--s2); }
.meter-you p:last-child { font-size: 14px; }

/* ---------- activity ---------- */
.segmented { display: inline-flex; gap: 4px; padding: 4px; border-radius: var(--r-md); background: var(--s1); border: 1px solid var(--line); }
.segmented button { height: 38px; padding: 0 18px; border-radius: 9px; color: var(--text-2); font-size: 14.5px; font-weight: 500; transition: background-color var(--t-press) var(--ease-out), color var(--t-press) var(--ease-out); }
.segmented button:hover { color: var(--text); }
.segmented button[aria-selected="true"], .segmented button.active { background: var(--s3); color: var(--text); box-shadow: inset 0 0 0 1px var(--line-2); }
.history-tools { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: var(--s-4) 0; }
.history-tools .search-field { flex: 1 1 260px; }
.history-tools .chip-row { flex: 1 1 100%; }
#histMoreBtn { margin-top: var(--s-3); }

/* ---------- account ---------- */
.profile-card { display: flex; align-items: center; gap: var(--s-4); flex-wrap: wrap; padding: var(--s-5); margin-bottom: var(--s-4); border-radius: var(--r-xl); background: var(--s1); border: 1px solid var(--line); }
.profile-id { flex: 1; min-width: 0; }
.profile-id h2 { font: 700 22px/1.2 var(--font-display); font-stretch: 87.5%; overflow-wrap: anywhere; }
.profile-id p { color: var(--text-2); font-size: 14px; }
.account-layout { display: grid; gap: var(--s-4); }

/* ---------- help ---------- */
.help-grid { display: grid; gap: var(--s-3); margin-bottom: var(--s-4); }
.help-card {
    display: flex; flex-direction: column; align-items: flex-start; gap: 8px;
    padding: var(--s-5); border-radius: var(--r-lg); background: var(--s1); border: 1px solid var(--line);
    text-align: left; transition: border-color var(--t-card) var(--ease-out), background-color var(--t-card) var(--ease-out);
}
.help-card > svg { width: 26px; height: 26px; color: var(--gold); }
.help-card h2 { font-size: var(--fs-lg); font-weight: 600; }
.help-card p { font-size: 14px; color: var(--text-2); flex: 1; }
.help-card:hover { border-color: var(--line-3); background: var(--s2); }
.panel.fairness, #view-help > .panel { margin-bottom: var(--s-4); }
.steps { counter-reset: step; display: grid; gap: 12px; margin: 14px 0; }
.steps li { counter-increment: step; position: relative; padding-left: 40px; font-size: 14.5px; color: var(--text-2); }
.steps li::before { content: counter(step); position: absolute; left: 0; top: -2px; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--s3); color: var(--gold-text); font-weight: 700; font-size: 14px; }
.steps b { color: var(--text); font-weight: 600; }
.responsible { display: flex; gap: 10px; margin-top: 14px; font-size: var(--fs-sm); color: var(--text-2); }
.responsible svg { width: 18px; height: 18px; flex-shrink: 0; color: var(--text-3); }

/* ---------- overlays: dialogs, sheets, drawers ---------- */
.modal-overlay {
    position: fixed; inset: 0; z-index: 100;
    display: flex; align-items: center; justify-content: center;
    padding: calc(16px + var(--safe-t)) 16px calc(16px + var(--safe-b));
    background: rgba(5, 6, 7, 0.68);
    opacity: 0;
    transition: opacity var(--t-layer) var(--ease-out);
}
.modal-overlay.active { opacity: 1; }
.modal-container {
    position: relative;
    display: flex; flex-direction: column;
    width: min(560px, 100%); max-height: min(88dvh, 880px);
    background: var(--s1); border: 1px solid var(--line-2); border-radius: var(--r-xl);
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5);
    transform: translateY(10px) scale(0.99);
    transition: transform var(--t-layer) var(--ease-out);
    outline: none; overflow: hidden;
}
.modal-overlay.active .modal-container { transform: none; }
.modal-overlay.no-motion, .modal-overlay.no-motion .modal-container { transition: none !important; }
.modal-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 18px 16px 12px 20px; flex-shrink: 0; }
.modal-title { font: 700 20px/1.25 var(--font-display); font-stretch: 87.5%; letter-spacing: 0.01em; padding-top: 6px; }
.modal-close { display: grid; place-items: center; width: 44px; height: 44px; margin: -4px -4px 0 0; border-radius: 12px; color: var(--text-2); flex-shrink: 0; }
.modal-close svg { width: 20px; height: 20px; }
.modal-close:hover { background: var(--s2); color: var(--text); }
.modal-body { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 0 20px calc(20px + var(--safe-b)); -webkit-overflow-scrolling: touch; }
.terms-modal { width: min(720px, 100%); }
.terms-body h3 { font-size: 15px; font-weight: 600; margin: 20px 0 6px; }
.terms-body p, .terms-body li { font-size: 14px; color: var(--text-2); line-height: 1.65; }
.terms-body p + p { margin-top: 8px; }
.terms-body ul { list-style: disc; padding-left: 20px; margin: 8px 0; }
.terms-meta { font-size: var(--fs-xs); color: var(--text-3); margin-bottom: 4px; }
.terms-final { margin-top: 22px !important; text-align: center; font-size: var(--fs-xs) !important; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-3) !important; }

/* drawer (Player Chat) */
.drawer { justify-content: flex-end; padding: 0; }
.drawer .modal-container { width: min(420px, 100%); height: 100dvh; max-height: none; border-radius: var(--r-xl) 0 0 var(--r-xl); border-right: 0; transform: translateX(24px); }

/* game information */
.info-hero { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 14px; align-items: start; margin-bottom: 4px; }
.info-art { width: 96px; border-radius: 14px; }
.info-hero-copy p { font-size: 14.5px; color: var(--text); margin-top: 8px; }
.info-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.info-section { margin-top: 20px; }
.info-section h3 { font-size: var(--fs-xs); font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-3); margin-bottom: 8px; }
.info-section p { font-size: 14px; color: var(--text-2); }
.info-section p + p, .info-section .info-facts + p { margin-top: 6px; }
.info-steps { counter-reset: s; display: grid; gap: 8px; }
.info-steps li { counter-increment: s; position: relative; padding-left: 30px; font-size: 14px; color: var(--text); }
.info-steps li::before { content: counter(s); position: absolute; left: 0; top: 0; width: 22px; height: 22px; border-radius: 50%; background: var(--s3); color: var(--gold-text); font-size: 12px; font-weight: 700; display: grid; place-items: center; }
.info-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.info-tags li { font-size: 13px; padding: 5px 10px; border-radius: 8px; background: var(--s2); color: var(--text); }
.info-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 8px; }
.info-facts div { background: var(--s2); border-radius: 10px; padding: 10px 12px; }
.info-facts dt { font-size: var(--fs-xs); color: var(--text-2); }
.info-facts dd { font-size: 16px; font-weight: 600; margin-top: 2px; }
.info-muted { color: var(--text-3) !important; font-weight: 400; font-size: 13.5px; }
.info-facts .info-muted { font-size: 13px; }
.info-table { border: 1px solid var(--line); border-radius: 10px; overflow: hidden; display: table; }
.info-table th, .info-table td { padding: 8px 12px; }
.info-links { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 8px; }
.info-destination { display: flex; gap: 10px; align-items: flex-start; margin-top: 20px; padding: 12px 14px; border-radius: var(--r-md); background: var(--s2); font-size: 13.5px; color: var(--text-2); }
.info-destination svg { width: 18px; height: 18px; flex-shrink: 0; margin-top: 1px; color: var(--gold); }
.info-destination b { color: var(--text); font-weight: 600; }
.info-actions { display: grid; gap: 8px; margin-top: 14px; position: sticky; bottom: calc(-20px - var(--safe-b)); padding: 12px 0 calc(4px + var(--safe-b)); background: linear-gradient(to bottom, transparent, var(--s1) 22%); }
.info-actions .btn-ghost svg { fill: none; stroke: currentColor; stroke-width: 2; }
.info-actions .btn-ghost[aria-pressed="true"] svg { fill: currentColor; }

/* notifications */
.note-list { display: grid; gap: 8px; }
.note { padding: 12px 14px; border-radius: var(--r-md); background: var(--s2); border: 1px solid var(--line); }
.note.is-unread { border-color: rgba(76, 201, 182, 0.35); }
.note-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.note-head strong { font-size: 14.5px; }
.note p { font-size: 13.5px; color: var(--text-2); margin-top: 3px; }
.note-foot { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: 6px; font-size: var(--fs-xs); color: var(--text-3); }

/* ---------- wallet sheets (deposit / withdraw) ---------- */
.wallet-modal { width: min(560px, 100%); }
.wallet-heading p { font-size: var(--fs-sm); color: var(--text-2); margin-top: 4px; max-width: 46ch; }
.wallet-tabs { margin: 0 20px 14px; align-self: flex-start; }
.wallet-tabs.is-detail { display: none; }
.wallet-panel { margin-bottom: 16px; }
.wallet-section-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 12px; }
.wallet-section-head strong { display: block; font-size: 15px; font-weight: 600; }
.wallet-section-head span:not(.status) { display: block; font-size: var(--fs-sm); color: var(--text-2); margin-top: 2px; }
.wallet-field-label { display: flex; justify-content: space-between; gap: 12px; font-size: var(--fs-sm); color: var(--text-2); margin: 14px 0 8px; font-weight: 500; }
.wallet-field-label span { color: var(--text-3); font-weight: 400; }
.wallet-divider { display: flex; align-items: center; gap: 12px; margin: 18px 0 12px; font-size: var(--fs-xs); color: var(--text-3); text-transform: uppercase; letter-spacing: 0.08em; }
.wallet-divider::before, .wallet-divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.wallet-step-head { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.wallet-step-head strong { display: block; font-size: 16px; }
.wallet-step-head span { display: block; font-size: var(--fs-sm); color: var(--text-2); }
.wallet-note { margin: 10px 0 14px; padding: 12px 14px; border-radius: var(--r-md); background: var(--s2); font-size: var(--fs-sm); color: var(--text-2); }
.wallet-note b { display: block; color: var(--text); font-weight: 600; margin-bottom: 2px; }
.wallet-form-field { margin-top: 14px; }
.wallet-form-field:first-child { margin-top: 0; }
.amount-quick-btns { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.quick-amount-btn { height: 36px; padding: 0 14px; border-radius: var(--r-pill); background: var(--s2); border: 1px solid var(--line-2); font-size: 14px; font-weight: 500; font-variant-numeric: tabular-nums; transition: border-color var(--t-press) var(--ease-out), background-color var(--t-press) var(--ease-out); }
.quick-amount-btn:hover { border-color: var(--line-3); background: var(--s3); }
.coin-ic { position: relative; display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: var(--c, var(--s3)); flex-shrink: 0; overflow: hidden; }
.coin-ic img { width: 24px; height: 24px; }
.coin-ic.mono img { display: none; }
.coin-ic.mono::after { content: attr(data-m); color: #fff; font-weight: 700; font-size: 15px; }
.coin-ic.tg { background: var(--s3); font-size: 18px; }
.method-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.method-card {
    display: flex; align-items: center; gap: 10px; min-height: 58px; padding: 10px 12px;
    border-radius: var(--r-md); background: var(--s2); border: 1px solid var(--line); text-align: left;
    transition: border-color var(--t-press) var(--ease-out), background-color var(--t-press) var(--ease-out);
}
.method-card:hover { border-color: var(--line-3); background: var(--s3); }
.method-card.selected { border-color: var(--gold); background: var(--gold-tint); }
.mc-text { min-width: 0; }
.mc-name { font-size: 14px; font-weight: 600; }
.mc-net { font-size: var(--fs-xs); color: var(--text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wallet-asset-strip { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding: 2px; margin: -2px; }
.wallet-asset-strip::-webkit-scrollbar { display: none; }
.wallet-asset-chip { display: inline-flex; align-items: center; gap: 8px; flex-shrink: 0; height: 40px; padding: 0 14px 0 5px; border-radius: var(--r-pill); background: var(--s2); border: 1px solid var(--line); font-size: 14px; font-weight: 600; transition: border-color var(--t-press) var(--ease-out); }
.wallet-asset-chip .coin-ic { width: 30px; height: 30px; }
.wallet-asset-chip .coin-ic img { width: 20px; height: 20px; }
.wallet-asset-chip:hover { border-color: var(--line-3); }
.wallet-asset-chip.active { border-color: var(--gold); background: var(--gold-tint); }
.deposit-address-section { display: none; }
.deposit-address-section.active { display: block; }
.deposit-address-assets { margin-bottom: 12px; }
.deposit-selector-row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.deposit-selector-card { display: flex; flex-direction: column; gap: 4px; min-height: 64px; padding: 10px 12px; border-radius: var(--r-md); background: var(--s2); border: 1px solid var(--line-2); text-align: left; min-width: 0; transition: border-color var(--t-press) var(--ease-out); }
.deposit-selector-card:hover { border-color: var(--line-3); }
.deposit-selector-label { font-size: var(--fs-xs); color: var(--text-2); }
.deposit-selector-value { display: flex; align-items: center; gap: 8px; min-width: 0; }
.deposit-selector-value strong { font-size: 14.5px; font-weight: 600; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.deposit-selector-coin .coin-ic { width: 24px; height: 24px; }
.deposit-selector-coin .coin-ic img { width: 16px; height: 16px; }
.deposit-selector-chevron { width: 16px; height: 16px; color: var(--text-3); transform: rotate(90deg); flex-shrink: 0; }
.qr-frame { display: none; position: relative; width: 196px; height: 196px; margin: 16px auto 8px; padding: 8px; border-radius: 16px; background: #fff; overflow: hidden; }
.qr-frame.show { display: block; }
.qr-frame img { width: 180px; height: 180px; }
.qr-frame.loading img { visibility: hidden; }
.qr-frame.loading::after { content: ""; position: absolute; inset: 8px; border-radius: 10px; background: linear-gradient(100deg, #eee 20%, #f8f8f8 50%, #eee 80%); background-size: 200% 100%; animation: qrload 1.2s linear infinite; }
@keyframes qrload { from { background-position: 100% 0; } to { background-position: -100% 0; } }
.address-box, .memo-box { margin: 12px 0; }
.address-label { font-size: var(--fs-sm); color: var(--text-2); margin-bottom: 6px; }
.memo-box .address-label { color: var(--warn); font-weight: 600; }
.address-value { display: flex; align-items: center; gap: 10px; padding: 8px 8px 8px 12px; border-radius: var(--r-md); background: var(--s0); border: 1px solid var(--line-2); }
.address-value > span { flex: 1; min-width: 0; font-size: 13.5px; line-height: 1.45; overflow-wrap: anywhere; }
.memo-box .address-value { border-color: rgba(240, 163, 71, 0.45); }
.memo-box .field-hint { margin-top: 6px; }
.copy-btn:disabled { opacity: 0.5; cursor: not-allowed; }
.network-info { display: flex; align-items: flex-start; gap: 8px; margin: 12px 0 8px; padding: 10px 12px; border-radius: 10px; background: var(--s2); font-size: var(--fs-sm); color: var(--text-2); }
.network-info svg { width: 18px; height: 18px; flex-shrink: 0; color: var(--teal); }
#depositLeaseExpiry { font-size: var(--fs-sm); color: var(--warn); margin: 10px 0; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
#depositLeaseExpiry:empty { display: none; }
#depositDetails { margin: 8px 0 12px; }
#depositDetails .field-hint { margin-top: 8px; }
.deposit-warning { display: flex; gap: 10px; align-items: flex-start; margin: 12px 0; padding: 12px 14px; border-radius: var(--r-md); background: rgba(240, 163, 71, 0.08); border: 1px solid rgba(240, 163, 71, 0.32); font-size: var(--fs-sm); color: var(--text); }
.deposit-warning svg { width: 18px; height: 18px; flex-shrink: 0; color: var(--warn); }
.deposit-network-overlay { position: absolute; inset: 0; z-index: 5; display: flex; align-items: flex-end; background: rgba(5, 6, 7, 0.6); opacity: 0; pointer-events: none; transition: opacity var(--t-layer) var(--ease-out); }
.deposit-network-overlay.active { opacity: 1; pointer-events: auto; }
.deposit-network-sheet { width: 100%; max-height: 82%; overflow-y: auto; overscroll-behavior: contain; padding: 16px 16px calc(16px + var(--safe-b)); background: var(--s1); border-top: 1px solid var(--line-2); border-radius: var(--r-xl) var(--r-xl) 0 0; transform: translateY(16px); transition: transform var(--t-layer) var(--ease-out); }
.deposit-network-overlay.active .deposit-network-sheet { transform: none; }
.deposit-network-sheet-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 12px; }
.deposit-network-sheet-head strong { display: block; font-size: 16px; }
.deposit-network-sheet-head span { display: block; font-size: var(--fs-sm); color: var(--text-2); }
.deposit-network-options { display: grid; gap: 8px; }
.deposit-network-option { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 56px; padding: 10px 12px; border-radius: var(--r-md); background: var(--s2); border: 1px solid var(--line); text-align: left; transition: border-color var(--t-press) var(--ease-out); }
.deposit-network-option:hover { border-color: var(--line-3); }
.deposit-network-option.selected { border-color: var(--gold); background: var(--gold-tint); }
.deposit-network-option-copy { flex: 1; min-width: 0; }
.deposit-network-option-copy strong { display: block; font-size: 14.5px; }
.deposit-network-option-copy span { display: block; font-size: var(--fs-xs); color: var(--text-2); }
.deposit-network-radio { width: 20px; height: 20px; border-radius: 50%; border: 2px solid var(--line-3); flex-shrink: 0; }
.deposit-network-option.selected .deposit-network-radio { border-color: var(--gold); box-shadow: inset 0 0 0 4px var(--s1); background: var(--gold); }
.deposit-choice-footer { display: flex; justify-content: space-between; gap: 12px; margin-top: 12px; }

.withdraw-stepper { display: flex; align-items: center; gap: 8px; margin: 0 0 16px; }
.withdraw-step { display: flex; align-items: center; gap: 8px; flex: 1; color: var(--text-3); font-size: var(--fs-sm); }
.withdraw-step:not(:last-child)::after { content: ""; flex: 1; height: 2px; border-radius: 1px; background: var(--s3); }
.withdraw-step span { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--s3); font-weight: 700; font-size: 13px; color: var(--text-2); flex-shrink: 0; }
.withdraw-step strong { font-weight: 500; }
.withdraw-step.active { color: var(--text); }
.withdraw-step.active span { background: var(--gold); color: var(--gold-ink); }
.withdraw-step.complete span { background: var(--teal-tint); color: var(--teal); }
.withdraw-step.complete:not(:last-child)::after { background: var(--teal); }
.wallet-balance-banner { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 14px; margin-bottom: 14px; border-radius: var(--r-md); background: var(--s2); font-size: var(--fs-sm); color: var(--text-2); }
.wallet-balance-banner strong { font-size: 18px; color: var(--text); font-variant-numeric: tabular-nums; }
.wallet-balance-banner.is-stale strong { color: var(--warn); }
.withdraw-review-card { padding: 16px; border-radius: var(--r-lg); background: var(--s2); }
.withdraw-review-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.withdraw-review-head span, .withdraw-review-address span { display: block; font-size: var(--fs-xs); color: var(--text-2); }
.withdraw-review-head strong { font-size: 16px; }
.withdraw-review-address { margin: 14px 0; }
.withdraw-review-address strong { display: block; font-size: 14px; font-weight: 500; overflow-wrap: anywhere; margin-top: 2px; }
.withdraw-summary { border-top: 1px solid var(--line-2); }
.summary-row { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; font-size: 14px; border-bottom: 1px solid var(--line); }
.summary-row dt { color: var(--text-2); }
.summary-row.total { border-bottom: 0; font-weight: 700; font-size: 16px; }
.summary-row.total dd { color: var(--gold-text); }
.withdraw-otp-input { letter-spacing: 0.3em; font-size: 18px; max-width: 220px; }
.withdraw-review-actions { display: flex; gap: 8px; }
.withdraw-review-actions .btn-primary { flex: 1; }
.sticky-action { position: sticky; bottom: calc(-20px - var(--safe-b)); padding: 12px 0 calc(4px + var(--safe-b)); margin-top: 4px; background: linear-gradient(to bottom, transparent, var(--s1) 26%); z-index: 2; }
.withdraw-result-stage { text-align: center; padding: 12px 0 4px; }
.withdraw-result-icon { display: grid; place-items: center; width: 64px; height: 64px; margin: 4px auto 14px; border-radius: 50%; font-size: 28px; font-weight: 700; background: var(--s3); color: var(--text); }
.withdraw-result-icon.processing { border: 3px solid var(--s3); border-top-color: var(--gold); background: none; animation: spin 0.9s linear infinite; }
.withdraw-result-icon.pending { color: var(--pending); background: rgba(134, 180, 255, 0.14); }
.withdraw-result-icon.complete { color: var(--ok); background: rgba(95, 208, 143, 0.14); }
.withdraw-result-icon.refunded { color: var(--refund); background: rgba(185, 162, 255, 0.14); }
.withdraw-result-icon.failed { color: var(--fail); background: rgba(242, 123, 123, 0.14); }
.withdraw-result-stage h3 { font: 700 22px/1.25 var(--font-display); font-stretch: 87.5%; margin: 4px 0 8px; }
.withdraw-result-stage > p:not(.eyebrow) { color: var(--text-2); font-size: 14.5px; max-width: 40ch; margin: 0 auto; }
.withdraw-result-ref { display: inline-flex; gap: 10px; margin-top: 14px; padding: 8px 12px; border-radius: 10px; background: var(--s2); font-size: var(--fs-sm); color: var(--text-2); }
.withdraw-result-ref strong { color: var(--text); font-weight: 500; }
.withdraw-result-actions { display: grid; gap: 8px; margin-top: 20px; }

/* ---------- reward codes sheet ---------- */
.claim-code-wrap { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; }
.claim-code-input { font: 600 18px/1 var(--font-mono); letter-spacing: 0.12em; text-transform: uppercase; }
.claim-code-wrap .btn { height: 48px; }
.claim-feedback { display: none; margin-top: 14px; }
.claim-feedback.show { display: block; }
.claim-drop-summary { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 14px; border-radius: var(--r-md); background: var(--s2); }
.claim-drop-summary:empty { display: none; }
.claim-drop-summary strong { display: block; font-size: 15px; }
.claim-drop-summary small { display: block; font-size: var(--fs-xs); color: var(--text-2); }
.claim-base { font: 700 20px/1 var(--font-ui); color: var(--gold-text); font-variant-numeric: tabular-nums; }
.claim-requirements { display: grid; gap: 6px; margin-top: 10px; }
.claim-req { display: flex; align-items: flex-start; gap: 10px; font-size: 14px; }
.claim-req i { display: grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; font-style: normal; font-size: 12px; font-weight: 700; flex-shrink: 0; margin-top: 1px; }
.claim-req.ok i { background: rgba(95, 208, 143, 0.16); color: var(--ok); }
.claim-req.bad i { background: rgba(240, 163, 71, 0.16); color: var(--warn); }
.claim-message { margin-top: 10px; padding: 10px 12px; border-radius: var(--r-md); background: rgba(242, 123, 123, 0.1); border: 1px solid rgba(242, 123, 123, 0.35); font-size: 14px; }
.claim-channel-links { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.claim-channel-links:empty { display: none; }
.claim-channel-links button { height: 36px; padding: 0 14px; border-radius: 10px; background: var(--s3); border: 1px solid var(--line-2); font-size: 14px; font-weight: 600; }
.claim-channel-links button.claim-recheck { background: var(--gold); color: var(--gold-ink); border-color: transparent; }
.claim-rules { margin: 16px 0 10px; padding: 12px 14px; border-radius: var(--r-md); background: var(--s2); }
.claim-rules p:last-child { font-size: 14px; color: var(--text-2); margin-top: 4px; }
.claim-result { display: none; text-align: center; padding: 8px 0; }
.claim-result.show { display: block; }
.claim-result-orb { display: grid; place-items: center; width: 64px; height: 64px; margin: 0 auto 12px; border-radius: 50%; background: var(--s3); font-size: 28px; }
.claim-kicker { font-size: var(--fs-xs); font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-3); }
.claim-result h3 { font: 700 22px/1.25 var(--font-display); font-stretch: 87.5%; margin: 6px 0; }
.claim-result p { font-size: 14px; color: var(--text-2); }
.claim-won-amount { font: 700 36px/1.1 var(--font-ui); color: var(--gold-text); margin: 14px 0 6px; font-variant-numeric: tabular-nums; }
.claim-result-meta { font-size: var(--fs-sm); color: var(--text-2); }
.claim-submit { display: inline-flex; align-items: center; justify-content: center; width: 100%; height: 48px; margin-top: 18px; border-radius: var(--r-md); background: var(--gold); color: var(--gold-ink); font-weight: 600; }
.claim-chest-grid { display: grid; grid-template-columns: repeat(3, 64px); gap: 8px; justify-content: center; margin: 16px 0; }
.claim-chest-tile { display: grid; place-items: center; height: 64px; border-radius: 12px; background: var(--s3); font-weight: 700; color: var(--text-3); }
.claim-chest-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.claim-chest-actions button { height: 48px; border-radius: var(--r-md); font-weight: 600; }
.claim-chest-keep { background: var(--s3); border: 1px solid var(--line-2); }
.claim-chest-reveal { background: var(--gold); color: var(--gold-ink); }

/* ---------- player chat ---------- */
.chat-panel { padding: 0; }
.chat-header { border-bottom: 1px solid var(--line); padding-bottom: 12px; padding-top: calc(16px + var(--safe-t)); }
.chat-status { display: flex; align-items: center; gap: 8px; font-size: var(--fs-sm); color: var(--text-2); margin-top: 2px; }
.chat-status i { width: 8px; height: 8px; border-radius: 50%; background: var(--muted); }
.chat-status[data-state="connected"] i { background: var(--ok); }
.chat-status[data-state="connecting"] i, .chat-status[data-state="disconnected"] i { background: var(--warn); }
.chat-status[data-state="error"] i { background: var(--fail); }
.rain-banner { display: none; align-items: center; justify-content: space-between; gap: 12px; margin: 12px 16px 0; padding: 12px 14px; border-radius: var(--r-md); background: var(--teal-tint); border: 1px solid rgba(76, 201, 182, 0.35); }
.rain-banner.active { display: flex; }
.rain-info strong { display: block; font-size: 14.5px; }
.rain-info span { font-size: var(--fs-sm); color: var(--text-2); }
.chat-messages { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 12px 16px; display: flex; flex-direction: column; gap: 10px; }
.chat-message { display: flex; gap: 10px; align-items: flex-start; }
.chat-message.system { justify-content: center; text-align: center; font-size: var(--fs-sm); color: var(--text-2); padding: 4px 12px; }
.chat-message.tip .msg-content, .chat-message.rain .msg-content { background: var(--teal-tint); }
.msg-avatar { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--s3); font-size: 13px; font-weight: 600; flex-shrink: 0; }
.msg-content { min-width: 0; padding: 8px 12px; border-radius: 4px 14px 14px 14px; background: var(--s2); }
.msg-header { display: flex; align-items: baseline; gap: 8px; }
.msg-username { font-size: 13.5px; font-weight: 600; color: var(--gold-text); }
.msg-time { font-size: 11.5px; color: var(--text-3); }
.msg-text { font-size: 14.5px; overflow-wrap: anywhere; }
.chat-input-area { padding: 10px 16px calc(12px + var(--safe-b)); border-top: 1px solid var(--line); }
.chat-hint { font-size: var(--fs-xs); color: var(--text-3); margin-bottom: 8px; }
.chat-hint code { color: var(--text-2); }
.chat-input-wrapper { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; }
.chat-input { height: 46px; }
.chat-send-btn { width: 46px; height: 46px; padding: 0; }
.chat-community-link { display: inline-flex; align-items: center; gap: 6px; margin-top: 10px; font-size: var(--fs-xs); color: var(--text-2); }
.chat-community-link svg { width: 14px; height: 14px; }
.chat-community-link:hover { color: var(--gold-text); }

/* ---------- toasts ---------- */
.toast-container { position: fixed; z-index: 400; left: 16px; right: 16px; bottom: calc(var(--tabbar-h) + var(--safe-b) + 12px); display: grid; gap: 8px; justify-items: center; pointer-events: none; }
.toast { display: flex; align-items: flex-start; gap: 10px; width: min(440px, 100%); padding: 12px 14px; border-radius: var(--r-md); background: var(--s3); border: 1px solid var(--line-2); box-shadow: 0 12px 30px rgba(0, 0, 0, 0.45); font-size: 14px; pointer-events: auto; animation: toast-in var(--t-layer) var(--ease-out); transition: opacity var(--t-layer) var(--ease-in), transform var(--t-layer) var(--ease-in); }
.toast.out { opacity: 0; transform: translateY(6px); }
.t-ic { width: 20px; height: 20px; flex-shrink: 0; }
.t-ic svg { width: 20px; height: 20px; }
.toast.success .t-ic { color: var(--ok); }
.toast.error { border-color: rgba(242, 123, 123, 0.4); }
.toast.error .t-ic { color: var(--fail); }
.toast.info .t-ic { color: var(--teal); }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } }

/* ---------- game launch ---------- */
.game-launch { position: fixed; inset: 0; z-index: 300; display: grid; place-items: center; padding: 16px; background: rgba(8, 9, 10, 0.72); opacity: 0; visibility: hidden; pointer-events: none; transition: opacity var(--t-layer) var(--ease-out), visibility 0s linear var(--t-layer); }
.game-launch.active { opacity: 1; visibility: visible; pointer-events: auto; transition: opacity var(--t-layer) var(--ease-out) 160ms, visibility 0s; }
.game-launch-card { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 12px 14px; align-items: center; width: min(360px, 100%); padding: 18px; border-radius: var(--r-lg); background: var(--s1); border: 1px solid var(--line-2); }
.game-launch-card .spinner { width: 22px; height: 22px; color: var(--gold); }
.game-launch-card strong { display: block; font-size: 16px; }
.game-launch-card span:not(.spinner) { display: block; font-size: var(--fs-sm); color: var(--text-2); }
.game-launch-actions { grid-column: 1 / -1; display: none; gap: 8px; }
.game-launch.stalled .game-launch-actions { display: flex; }
.game-launch.stalled .spinner { display: none; }
.game-launch.stalled .game-launch-card { grid-template-columns: minmax(0, 1fr); }

/* ---------- sign-in gate ---------- */
.login-gate { position: fixed; inset: 0; z-index: 200; display: none; background: var(--ink); overflow-y: auto; }
.login-gate.show { display: grid; grid-template-rows: auto 1fr; }
.login-art { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; padding: calc(16px + var(--safe-t)) 16px 0; max-height: 38dvh; overflow: hidden; -webkit-mask-image: linear-gradient(to bottom, #000 40%, transparent); mask-image: linear-gradient(to bottom, #000 40%, transparent); }
.login-art img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 14px; }
.login-panel { display: flex; flex-direction: column; align-items: stretch; gap: 12px; width: min(420px, 100%); margin: 0 auto; padding: 8px 20px calc(24px + var(--safe-b)); }
.login-mark { width: 44px; height: 36px; }
.login-panel h1 { font: 700 30px/1.1 var(--font-display); font-stretch: 87.5%; }
.login-copy { color: var(--text-2); margin-bottom: 8px; }
.tg-login-spinner { display: none; align-items: center; gap: 10px; font-size: 14px; color: var(--text-2); }
.tg-login-spinner.show { display: flex; }
.tg-login-status { display: none; padding: 10px 12px; border-radius: var(--r-md); background: rgba(240, 163, 71, 0.1); border: 1px solid rgba(240, 163, 71, 0.35); font-size: 14px; }
.tg-login-status.show { display: block; }
#tgLoginButton[aria-disabled="true"] { background: var(--s3); color: var(--text-3); pointer-events: none; }
.login-foot { font-size: var(--fs-xs); color: var(--text-3); text-align: center; margin-top: 8px; }

/* global challenge widget: keep clear of the tab bar */
.ax-challenge-fab { bottom: calc(var(--tabbar-h) + var(--safe-b) + 14px) !important; }

/* ---------- responsive ---------- */
@media (min-width: 420px) {
    .game-row { grid-auto-columns: calc((100% - 24px) / 3.2); }
}
@media (min-width: 560px) {
    .game-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    body.account-compact .game-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
    .catalog-tools { grid-template-columns: minmax(0, 1fr) auto; }
    .feature-link { grid-template-columns: 140px minmax(0, 1fr); }
    .feature-art { width: 140px; }
}
@media (max-width: 699px) {
    .modal-overlay { align-items: flex-end; padding: calc(12px + var(--safe-t)) 0 0; }
    .modal-container { width: 100%; max-height: calc(100dvh - var(--safe-t) - 12px); border-radius: var(--r-xl) var(--r-xl) 0 0; border-bottom: 0; transform: translateY(28px); }
    .modal-container::before { content: ""; position: absolute; top: 7px; left: 50%; width: 36px; height: 4px; margin-left: -18px; border-radius: 2px; background: var(--line-3); }
    .drawer .modal-container { height: calc(100dvh - var(--safe-t) - 12px); border-radius: var(--r-xl) var(--r-xl) 0 0; transform: translateY(28px); }
    .chat-header { padding-top: 18px; }
    .withdraw-step strong { display: none; }
    .withdraw-step.active strong { display: inline; }
    .claim-modal.keyboard-open .claim-rules { display: none; }
}
@media (min-width: 700px) {
    :root { --rail-w: 84px; --gutter: 24px; --tabbar-h: 0px; }
    .tabbar { display: none; }
    .top-search { display: inline-flex; }
    .avatar-btn { display: inline-flex; border-radius: 50%; }
    .wallet-pill-label { display: inline; }
    .top-deposit { width: auto; padding: 0 14px; }
    .top-deposit span { display: inline; }
    .rail {
        display: flex; flex-direction: column; gap: 2px;
        grid-column: 1; grid-row: 2 / 4;
        position: sticky; top: calc(var(--top-h) + var(--safe-t));
        height: calc(100dvh - var(--top-h) - var(--safe-t));
        padding: 12px 8px calc(12px + var(--safe-b)) calc(8px + var(--safe-l));
        border-right: 1px solid var(--line);
        overflow-y: auto; scrollbar-width: none;
    }
    .rail::-webkit-scrollbar { display: none; }
    .rail-link {
        position: relative;
        display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
        min-height: 60px; padding: 6px 4px; border-radius: var(--r-md);
        color: var(--text-2); font-size: 11.5px; font-weight: 500; text-align: center; width: 100%;
        transition: background-color var(--t-press) var(--ease-out), color var(--t-press) var(--ease-out);
    }
    .rail-link svg { width: 22px; height: 22px; flex-shrink: 0; }
    .rail-link:hover { background: var(--s1); color: var(--text); }
    .rail-link[aria-current="page"] { background: var(--s2); color: var(--text); }
    .rail-link[aria-current="page"] > svg:first-child { color: var(--gold); }
    .rail-link[aria-current="page"]::before { content: ""; position: absolute; left: -8px; top: 12px; bottom: 12px; width: 3px; border-radius: 0 3px 3px 0; background: var(--gold); }
    .rail-link .count-badge, .rail-link .pending-dot { position: absolute; top: 6px; right: 14px; }
    .rail-sub, .rail-label, .rail-meta, .rail-foot, .rail-ext { display: none; }
    .rail-group { margin-top: auto; padding-top: 10px; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 2px; }
    #main { padding-bottom: var(--s-10); }
    .site-foot { margin-top: 0; padding-bottom: calc(var(--s-4) + var(--safe-b)); }
    .lobby-top { grid-template-columns: minmax(0, 1fr) 300px; align-items: stretch; }
    .feature-link { height: 100%; }
    .account-card { display: block; }
    .account-card.panel, .account-card { background: var(--s1); border: 1px solid var(--line); border-radius: var(--r-xl); padding: var(--s-5); }
    .game-row { grid-auto-columns: 180px; margin: 0; padding: 2px 0 8px; scroll-padding: 0; }
    .catalog-tools { grid-template-columns: minmax(240px, 380px) minmax(0, 1fr) auto; }
    .catalog-tools .search-field { grid-column: auto; }
    .lobby-secondary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .wallet-layout { grid-template-columns: minmax(0, 1fr) 300px; align-items: start; }
    .help-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .account-layout { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .subnav { margin-left: 0; margin-right: 0; padding: 0; }
    .toast-container { left: auto; right: 24px; top: calc(var(--top-h) + var(--safe-t) + 12px); bottom: auto; justify-items: end; }
    .view-head h1 { font-size: 32px; }
    .login-gate.show { grid-template-rows: none; grid-template-columns: minmax(0, 1.1fr) minmax(380px, 1fr); }
    .login-art { max-height: none; align-content: center; padding: 40px; -webkit-mask-image: linear-gradient(to right, #000 55%, transparent); mask-image: linear-gradient(to right, #000 55%, transparent); }
    .login-panel { justify-content: center; padding: 40px; }
    .ax-challenge-fab { bottom: 24px !important; }
}
@media (min-width: 900px) {
    .game-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px 16px; }
    body.account-compact .game-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); }
    .feature-link { grid-template-columns: 180px minmax(0, 1fr); padding: 16px; }
    .feature-art { width: 180px; }
    .feature-title { font-size: 30px; }
}
@media (min-width: 1100px) {
    :root { --rail-w: 232px; }
    .rail { padding: 16px 12px calc(16px + var(--safe-b)) calc(12px + var(--safe-l)); }
    .rail-link { flex-direction: row; justify-content: flex-start; gap: 12px; min-height: 44px; padding: 0 12px; font-size: 14.5px; text-align: left; }
    .rail-link[aria-current="page"]::before { left: -12px; top: 10px; bottom: 10px; }
    .rail-link span:not(.count-badge):not(.rail-meta) { flex: 1; }
    .rail-link .count-badge, .rail-link .pending-dot { position: static; }
    .rail-sub { display: grid; margin: 0 0 6px 34px; border-left: 1px solid var(--line); }
    .rail-sub a { display: flex; align-items: center; min-height: 36px; padding: 0 12px; font-size: 13.5px; color: var(--text-2); border-radius: 0 8px 8px 0; }
    .rail-sub a:hover { color: var(--text); background: var(--s1); }
    .rail-label { display: block; padding: 0 12px 6px; font-size: var(--fs-xs); font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-3); }
    .rail-meta { display: inline; font-size: var(--fs-xs); color: var(--text-3); }
    .rail-ext { display: block; width: 14px !important; height: 14px !important; color: var(--text-3); }
    .rail-foot { display: block; padding: 12px 12px 0; font-size: var(--fs-xs); color: var(--text-3); }
    .lobby-top { grid-template-columns: minmax(0, 1fr) 320px; }
    .lobby-secondary { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (min-width: 1360px) {
    .game-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); }
}
@media (min-width: 1600px) {
    .game-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); }
}

/* ---------- route transition ---------- */
#main.view-enter .view:not([hidden]) { animation: view-in var(--t-route) var(--ease-out); }
@keyframes view-in { from { opacity: 0; transform: translateY(4px); } }

/* ---------- reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        transition-delay: 0s !important;
        scroll-behavior: auto !important;
    }
    .spinner, .withdraw-result-icon.processing { animation: spin 1.6s linear infinite !important; }
    .row-skeleton::after, .card-skeleton::after, .gcard-art:not(.is-loaded)::after, [data-balance].is-loading::after, .qr-frame.loading::after { animation: none !important; }
}


/* ==========================================================================
   Game floor layout — top-bar destinations, spotlight mosaic, wallet dock.
   ========================================================================== */
.topnav { display: none; }
@media (min-width: 900px) {
    .topnav { display: flex; align-items: stretch; align-self: stretch; gap: 2px; margin-left: var(--s-6); }
    .topnav a {
        position: relative; display: inline-flex; align-items: center; gap: 6px;
        padding: 0 14px; color: var(--text-2); font-size: 14.5px; font-weight: 500;
        transition: color var(--t-press) var(--ease-out);
    }
    .topnav a:hover { color: var(--text); }
    .topnav a[aria-current="page"] { color: var(--text); }
    .topnav a[aria-current="page"]::after { content: ""; position: absolute; left: 14px; right: 14px; bottom: -1px; height: 2px; border-radius: 2px 2px 0 0; background: var(--gold); }
    .top-search { width: 44px; padding: 0; justify-content: center; margin-left: auto; }
    .top-search span, .top-search kbd { display: none; }
    .top-actions { margin-left: var(--s-2); }
}
@media (min-width: 1400px) {
    .top-search { width: 240px; padding: 0 12px; justify-content: flex-start; }
    .top-search span, .top-search kbd { display: inline; }
}

.floor-layout { display: grid; gap: var(--s-6); align-items: start; }
.floor-main { min-width: 0; }
.floor-head { display: grid; gap: var(--s-4); margin: var(--s-2) 0 var(--s-5); }
.floor-h { font: 800 34px/1 var(--font-display); font-stretch: 80%; letter-spacing: 0.01em; margin-top: 4px; }
.floor-head .catalog-tools { margin-bottom: 0; }

/* resume strip */
.resume-strip { display: flex; align-items: center; gap: var(--s-3); margin-bottom: var(--s-6); min-width: 0; }
.resume-label { flex-shrink: 0; font-size: var(--fs-xs); font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-3); writing-mode: horizontal-tb; }
.resume-row { display: flex; gap: var(--s-2); overflow-x: auto; scrollbar-width: none; min-width: 0; padding: 2px; margin: -2px; -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 28px), transparent); mask-image: linear-gradient(to right, #000 calc(100% - 28px), transparent); }
.resume-row::-webkit-scrollbar { display: none; }
.resume { display: inline-flex; align-items: center; gap: 10px; flex-shrink: 0; height: 56px; padding: 6px 16px 6px 6px; border-radius: 14px; background: var(--s1); border: 1px solid var(--line); transition: border-color var(--t-press) var(--ease-out), background-color var(--t-press) var(--ease-out); }
.resume:hover { border-color: var(--line-3); background: var(--s2); }
.resume-art { width: 44px; height: 44px; border-radius: 10px; overflow: hidden; background: color-mix(in srgb, var(--accent) 30%, var(--s2)); flex-shrink: 0; }
.resume-art img { width: 100%; height: 100%; object-fit: cover; }
.resume-copy b { display: block; font-size: 14px; font-weight: 600; white-space: nowrap; }
.resume-copy small { display: flex; align-items: center; gap: 4px; font-size: var(--fs-xs); color: var(--text-2); }
.resume-copy small svg { width: 12px; height: 12px; }

/* floor mosaic */
.floor-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 12px; }
.gcard.is-spotlight { grid-column: 1 / -1; }
.gcard.is-spotlight .gcard-link { position: relative; display: block; height: 100%; }
.gcard.is-spotlight .gcard-art { aspect-ratio: 16 / 11; border-radius: var(--r-xl); }
.gcard.is-spotlight .gcard-platform { display: none; }
.gcard.is-spotlight .gcard-body {
    position: absolute; left: 0; right: 0; bottom: 0; z-index: 1;
    display: flex; flex-direction: column; align-items: flex-start; gap: 4px;
    padding: 64px 18px 18px;
    border-radius: 0 0 var(--r-xl) var(--r-xl);
    background: linear-gradient(to bottom, transparent, rgba(8, 9, 10, 0.88) 55%);
}
.gcard.is-spotlight .gcard-name { font: 800 30px/1.05 var(--font-display); font-stretch: 80%; white-space: normal; }
.gcard.is-spotlight .gcard-meta { color: var(--text-2); }
.spot-copy { font-size: 14px; color: var(--text); max-width: 44ch; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.spot-cta { margin-top: 8px; pointer-events: none; }
.gcard.is-spotlight .gcard-info { top: 4px; right: 46px; color: rgba(255, 255, 255, 0.9); }
.gcard.is-spotlight .gcard-info::before { content: ""; position: absolute; inset: 5px; border-radius: 50%; background: rgba(11, 12, 14, 0.62); }
.gcard.is-spotlight .gcard-info svg { position: relative; }
@media (hover: hover) and (pointer: fine) {
    .gcard.is-spotlight .gcard-link:hover .gcard-name { color: var(--text); }
    .gcard.is-spotlight .gcard-link:hover .spot-cta { background: var(--gold-hi); }
}
@media (min-width: 560px) {
    .floor-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (min-width: 700px) {
    .floor-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px 16px; }
    .gcard.is-spotlight { grid-column: span 2; grid-row: span 2; }
    .gcard.is-spotlight .gcard-art { aspect-ratio: auto; height: 100%; min-height: 320px; }
    .gcard.is-spotlight .gcard-body { padding: 96px 24px 24px; }
    .gcard.is-spotlight .gcard-name { font-size: 42px; }
    .floor-h { font-size: 44px; }
    .floor-head { grid-template-columns: auto minmax(0, 1fr); align-items: end; gap: var(--s-6); }
    .floor-head .catalog-tools { grid-template-columns: minmax(200px, 320px) minmax(0, 1fr) auto; }
    .floor-head .catalog-tools .search-field { grid-column: auto; }
}
@media (min-width: 1280px) {
    .floor-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); }
}
.strip .game-row { grid-auto-columns: calc((100% - 12px) / 2.35); }
@media (min-width: 700px) { .strip .game-row { grid-auto-columns: 168px; } }

/* wallet dock */
.dock { display: none; }
@media (min-width: 1100px) {
    .floor-layout { grid-template-columns: minmax(0, 1fr) 296px; gap: var(--s-8); }
    .floor-head { grid-template-columns: minmax(0, 1fr); }
    .dock {
        display: grid; gap: var(--s-3);
        position: sticky; top: calc(var(--top-h) + var(--safe-t) + 16px);
        max-height: calc(100dvh - var(--top-h) - var(--safe-t) - 32px); overflow-y: auto; scrollbar-width: none;
    }
    .dock::-webkit-scrollbar { display: none; }
}
@media (min-width: 1360px) {
    .floor-head { grid-template-columns: auto minmax(0, 1fr); }
}
.dock-card { padding: var(--s-5); border-radius: var(--r-xl); border: 1px solid var(--line-2); background: radial-gradient(100% 120% at 100% 0%, rgba(217, 178, 95, 0.12), transparent 60%), var(--s1); }
.dock-balance { font: 700 32px/1.1 var(--font-ui); font-variant-numeric: tabular-nums; margin: 6px 0 2px; overflow-wrap: anywhere; }
.dock-card[data-balance-state="stale"] .dock-balance { color: var(--text-2); }
.dock-card .field-hint { margin-bottom: var(--s-4); }
.dock-guest { font: 600 17px/1.35 var(--font-ui); margin: 6px 0 14px; }
.dock-list { display: grid; gap: 2px; padding: 6px; border-radius: var(--r-lg); background: var(--s1); border: 1px solid var(--line); }
.dock-label { padding: 8px 10px 4px; }
.dock-row { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 46px; padding: 0 10px; border-radius: 10px; color: var(--text); font-size: 14.5px; text-align: left; transition: background-color var(--t-press) var(--ease-out); }
.dock-row > span:not(.count-badge):not(.dock-meta) { flex: 1; }
.dock-row > svg { width: 19px; height: 19px; color: var(--text-3); flex-shrink: 0; }
.dock-row > svg:first-child { color: var(--text-2); }
.dock-row:hover { background: var(--s2); }
.dock-row[data-pending-row] { color: var(--pending); }
.dock-meta { font-size: var(--fs-xs); color: var(--text-3); }
.dock-streak { margin: 4px; padding: 12px; border-radius: 10px; background: var(--s2); }
.dock-streak .panel-head { margin-bottom: 4px; }
.dock-streak p { font-size: 13.5px; color: var(--text-2); }
.dock-foot { font-size: var(--fs-xs); color: var(--text-3); padding: 0 6px; }
.topbar .top-deposit svg { width: 24px; height: 24px; }
body[data-route="casino"] .top-search, body[data-route="search"] .top-search { visibility: hidden; }
@media (max-width: 699px) {
    .floor-title .eyebrow { display: none; }
    .floor-h { font-size: 30px; }
    .floor-head { gap: var(--s-3); margin-bottom: var(--s-4); }
    .resume-strip { margin-bottom: var(--s-5); }
    .resume-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
}
@media (min-width: 1100px) {
    #rewardsBody { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-2) var(--s-6); align-items: start; }
    #rewardsBody > .empty-state, #rewardsBody > .field-hint { grid-column: 1 / -1; }
    #rewardsBody .reward-grid { grid-template-columns: minmax(0, 1fr); }
    .reward-section + .reward-section { margin-top: 0; }
}
.field-row { display: grid; gap: 8px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.field-row b { display: block; font-weight: 500; }
.field-row small { display: block; font-size: var(--fs-sm); color: var(--text-2); }
.field-row select { height: 44px; padding: 0 36px 0 12px; border-radius: var(--r-md); border: 1px solid var(--line-2); background: var(--s0) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23b9b2a5' d='m7 10 5 5 5-5z'/%3E%3C/svg%3E") no-repeat right 10px center / 18px; color: var(--text); font-size: 15px; -webkit-appearance: none; appearance: none; }
.field-row + .form-status:empty { display: none; }

/* ---------- my chat (group-owner partner page) ---------- */
.mychat-body .tier-table th, .mychat-body .tier-table td { white-space: normal; }
.mychat-body .tier-table thead th.num { text-align: right; }
.mychat-body { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--s-3); max-width: 760px; min-width: 0; }
.mychat-claim { border-color: rgba(217, 178, 95, 0.5); box-shadow: inset 0 2px 0 var(--gold); }
.mychat-claim .field-hint { margin-bottom: var(--s-3); }
.mychat-claim .mychat-hero { font: 700 32px/1.15 var(--font-ui); color: var(--gold-text); margin: 6px 0 4px; overflow-wrap: anywhere; }
.mychat-controls { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--s-2); min-width: 0; }
.mychat-controls .segmented { justify-self: start; }
.mychat-tabs { display: flex; width: 100%; }
.mychat-tabs button { flex: 1 1 0; min-width: 0; padding: 0 8px; }
.mychat-pane { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--s-3); min-width: 0; }
.mychat-pane[hidden] { display: none; }
.mychat-tabs button { font-size: 13.5px; padding: 0 4px; }
.mychat-players { display: grid; gap: var(--s-2); min-width: 0; }
.mychat-player-days { display: flex; width: 100%; }
.mychat-player-days button { flex: 1 1 0; }
.mychat-players .chip-row { flex-wrap: wrap; overflow: visible; }
.mychat-months { max-width: 100%; overflow-x: auto; scrollbar-width: none; }
.mychat-months button { padding: 0 14px; flex-shrink: 0; }
.mychat-body .section-label { margin: var(--s-3) 0 0; }
.mychat-tiles { margin: 0; grid-template-columns: repeat(auto-fit, minmax(min(140px, 44%), 1fr)); }
.mychat-tiles .figure dd { font-size: 18px; }
.mychat-neg, .ledger-amt.mychat-out { color: var(--fail); }
.mychat-pos { color: var(--ok); }
.ledger-amt.neutral-flat { color: var(--text-3); }
.mychat-vol { color: var(--teal); }
.mychat-breakdown .detail-row.is-total dt, .mychat-breakdown .detail-row.is-total dd { color: var(--text); font-weight: 600; }
.mychat-breakdown .detail-row dt { flex-shrink: 1; }
.mychat-chart .chip-row { margin-bottom: var(--s-3); }
.mychat-chart .panel-head { flex-wrap: wrap; }
.mychat-svg { display: block; width: 100%; height: 170px; overflow: visible; }
.mychat-svg .axis { stroke: var(--line-3); stroke-width: 1; vector-effect: non-scaling-stroke; }
.mychat-svg .hit { fill: transparent; cursor: pointer; }
.mychat-svg .bar { transition: opacity var(--t-press) var(--ease-out); }
.mychat-svg .bar.pos { fill: var(--ok); }
.mychat-svg .bar.neg { fill: var(--fail); }
.mychat-svg .bar.neu { fill: var(--gold); }
.mychat-svg:hover .mychat-bar:not(:hover):not(.is-active) .bar { opacity: 0.55; }
.mychat-svg .mychat-bar.is-active .bar { opacity: 1; }
.mychat-svg .mychat-bar:focus { outline: none; }
.mychat-svg .mychat-bar:focus-visible .hit { fill: var(--gold-tint); }
.mychat-ticks { display: flex; justify-content: space-between; font-size: var(--fs-xs); color: var(--text-3); padding: 4px 2px 0; font-variant-numeric: tabular-nums; }
.mychat-day { margin-top: var(--s-2); min-height: 40px; }
.mychat-feed { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--s-2); min-width: 0; }
.mychat-feed .ledger-main { cursor: default; }
.mychat-feed .ledger-main:hover { background: transparent; }

/* ---------- referral stats (Rewards › Referrals): violet /refer card theme ----------
   Scoped to .refstats; palette mirrors refer_card.py (TOP/BOT gradient, INK/SOFT/FAINT
   text, GOLD + GOLD_DEEP, MINT, RULE). Tokens are re-pointed inside the wrapper so the
   shared components (segmented, chip, btn, kv-copy, detail-list) follow the theme. */
.refstats {
    --rv-top: rgb(88, 50, 186); --rv-bot: rgb(150, 40, 138);
    --rv-ink: #fff; --rv-soft: rgb(236, 222, 255); --rv-faint: rgb(204, 180, 238);
    --rv-gold: rgb(255, 214, 102); --rv-gold-deep: rgb(40, 26, 0); --rv-mint: rgb(140, 246, 190);
    --rv-rule: rgba(176, 130, 220, 0.55); --rv-glass: rgba(255, 255, 255, 0.09); --rv-glass-2: rgba(255, 255, 255, 0.14);
    --text: var(--rv-ink); --text-2: var(--rv-soft); --text-3: var(--rv-faint);
    --s0: rgba(255, 255, 255, 0.1); --s1: var(--rv-glass); --s2: var(--rv-glass-2); --s3: rgba(255, 255, 255, 0.18); --s4: rgba(255, 255, 255, 0.24);
    --line: rgba(176, 130, 220, 0.35); --line-2: var(--rv-rule); --line-3: rgba(176, 130, 220, 0.8);
    --gold: var(--rv-gold); --gold-hi: #ffe08f; --gold-lo: #ecc04f; --gold-ink: var(--rv-gold-deep);
    --gold-text: var(--rv-gold); --gold-tint: rgba(255, 214, 102, 0.2);
    --ok: var(--rv-mint); --teal: var(--rv-mint); --focus: var(--rv-gold);
    display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--s-3); min-width: 0;
    padding: var(--s-3); border-radius: var(--r-xl); color: var(--rv-soft);
    background:
        radial-gradient(ellipse 75% 22% at 50% 9%, rgba(230, 200, 255, 0.2), rgba(230, 200, 255, 0) 70%),
        linear-gradient(180deg, var(--rv-top), var(--rv-bot));
    box-shadow: inset 0 0 0 1px rgba(176, 130, 220, 0.4);
}
.refstats .segmented { background: rgba(255, 255, 255, 0.08); border-color: var(--line); }
.refstats .segmented button { color: var(--rv-soft); }
.refstats .segmented button[aria-selected="true"] { background: var(--rv-gold); color: var(--rv-gold-deep); box-shadow: none; font-weight: 600; }
.refstats-tabs { display: flex; width: 100%; }
.refstats-tabs button { flex: 1 1 0; min-width: 0; padding: 0 6px; }
.refstats-periods { display: flex; width: 100%; overflow-x: auto; scrollbar-width: none; }
.refstats-periods::-webkit-scrollbar { display: none; }
.refstats-periods button { flex: 1 0 auto; height: 32px; padding: 0 8px; font-size: 13px; }
.refstats-periods[hidden], .refstats-pane[hidden] { display: none; }
.refstats-pane { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--s-3); min-width: 0; }
.refstats-pane > div { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--s-3); min-width: 0; }
.refstats .chip { background: rgba(255, 255, 255, 0.08); color: var(--rv-soft); }
.refstats .chip[aria-pressed="true"] { background: var(--rv-gold); border-color: var(--rv-gold); color: var(--rv-gold-deep); font-weight: 600; }
.refstats .chip-row { flex-wrap: wrap; overflow: visible; -webkit-mask-image: none; mask-image: none; padding-right: 2px; }
.refstats .chip { height: 32px; padding: 0 12px; font-size: 13px; }
.refstats .btn-secondary { background: rgba(255, 255, 255, 0.14); border-color: var(--rv-rule); color: var(--rv-ink); }
.refstats .empty-state { border-color: var(--rv-rule); color: var(--rv-soft); background: rgba(255, 255, 255, 0.06); }
.refstats .card-skeleton { background: rgba(255, 255, 255, 0.1); }
.refstats .num { font-variant-numeric: tabular-nums; }
.refstats-label { margin: var(--s-1) 0 0; font: 600 var(--fs-xs)/1.3 var(--font-ui); letter-spacing: 0.08em; text-transform: uppercase; color: var(--rv-faint); }
.refstats-faint { color: var(--rv-faint); font-size: var(--fs-sm); }
.refstats-note { color: var(--rv-faint); font-size: var(--fs-xs); line-height: 1.5; }

/* gold ribbon: what can be claimed right now */
.refstats-ribbon {
    display: flex; align-items: center; justify-content: space-between; gap: var(--s-3);
    padding: 14px 16px; border-radius: var(--r-lg); color: var(--rv-gold-deep);
    background: linear-gradient(100deg, #ffe28f, var(--rv-gold) 55%, #f5c451);
    box-shadow: 0 6px 18px rgba(40, 10, 70, 0.28);
}
.refstats-ribbon-main { min-width: 0; }
.refstats-ribbon-label { font: 700 var(--fs-xs)/1.2 var(--font-ui); letter-spacing: 0.08em; text-transform: uppercase; opacity: 0.8; }
.refstats-ribbon-value { font: 800 28px/1.15 var(--font-ui); margin: 2px 0; overflow-wrap: anywhere; }
.refstats-ribbon-sub { font-size: var(--fs-xs); line-height: 1.35; }
.refstats-claim { flex-shrink: 0; height: 40px; padding: 0 18px; border-radius: var(--r-pill); background: var(--rv-gold-deep); color: var(--rv-gold); font-weight: 700; }
.refstats-claim:hover:not(:disabled) { background: #000; }

/* stat tiles */
.refstats-tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-2); margin: 0; }
.refstats-tile { min-width: 0; padding: 12px; border-radius: var(--r-md); background: var(--rv-glass); border: 1px solid rgba(176, 130, 220, 0.4); }
.refstats-tile dt { font-size: var(--fs-xs); color: var(--rv-faint); line-height: 1.3; }
.refstats-tile dd { margin-top: 4px; font: 700 20px/1.2 var(--font-ui); color: var(--rv-ink); overflow-wrap: anywhere; }
.refstats-tile.is-gold dd { color: var(--rv-gold); }
.refstats-tile.is-mint dd { color: var(--rv-mint); }
.refstats-tile-sub { display: block; margin-top: 3px; font-size: 11.5px; line-height: 1.3; color: var(--rv-soft); overflow-wrap: anywhere; }

/* daily chart */
.refstats-card { min-width: 0; padding: 14px; border-radius: var(--r-lg); background: var(--rv-glass); border: 1px solid rgba(176, 130, 220, 0.4); }
.refstats-card-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 12px; margin-bottom: var(--s-3); }
.refstats-card-head h2 { font: 600 var(--fs-lg)/1.3 var(--font-ui); color: var(--rv-ink); }
.refstats-chart .chip-row { margin-bottom: var(--s-3); }
.refstats-svg { display: block; width: 100%; height: 170px; overflow: visible; }
.refstats-svg .axis { stroke: var(--rv-rule); stroke-width: 1; vector-effect: non-scaling-stroke; }
.refstats-svg .hit { fill: transparent; cursor: pointer; }
.refstats-svg .bar { fill: var(--rv-mint); transition: opacity var(--t-press) var(--ease-out); }
.refstats-svg .refstats-bar.is-best .bar, .refstats-svg .refstats-bar.is-active .bar { fill: var(--rv-gold); }
.refstats-svg:hover .refstats-bar:not(:hover):not(.is-active) .bar { opacity: 0.6; }
.refstats-svg .refstats-bar:focus { outline: none; }
.refstats-svg .refstats-bar:focus-visible .hit { fill: rgba(255, 214, 102, 0.18); }
.refstats-ticks { display: flex; justify-content: space-between; padding: 4px 2px 0; font-size: var(--fs-xs); color: var(--rv-faint); font-variant-numeric: tabular-nums; }
.refstats-day { margin-top: var(--s-2); min-height: 40px; font-size: var(--fs-sm); line-height: 1.5; color: var(--rv-soft); }
.refstats-day b { color: var(--rv-ink); }

/* players */
.refstats-list { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--s-2); min-width: 0; }
.refstats-player { min-width: 0; padding: 12px 14px; border-radius: var(--r-md); background: var(--rv-glass); border: 1px solid rgba(176, 130, 220, 0.4); }
.refstats-player-head { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--s-2); }
.refstats-player-name { display: grid; min-width: 0; }
.refstats-player-name strong { color: var(--rv-ink); font-size: 15px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.refstats-player-name span { font-size: 11.5px; color: var(--rv-faint); }
.refstats-status { flex-shrink: 0; height: 22px; padding: 0 8px; border-radius: var(--r-pill); font-size: 11.5px; font-weight: 700; line-height: 22px; white-space: nowrap; }
.refstats-status.is-ftd { background: var(--rv-gold); color: var(--rv-gold-deep); }
.refstats-status.is-new { background: rgba(255, 255, 255, 0.9); color: rgb(88, 50, 186); }
.refstats-status.is-comeback { background: rgba(255, 170, 220, 0.25); color: #ffd6ef; box-shadow: inset 0 0 0 1px rgba(255, 170, 220, 0.55); }
.refstats-status.is-active { background: rgba(140, 246, 190, 0.18); color: var(--rv-mint); box-shadow: inset 0 0 0 1px rgba(140, 246, 190, 0.5); }
.refstats-status.is-dormant { background: rgba(255, 255, 255, 0.08); color: var(--rv-faint); }
.refstats-player-nums { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s-2); margin: 10px 0 8px; }
.refstats-player-nums > div { min-width: 0; }
.refstats-player-nums dt { font-size: 11px; color: var(--rv-faint); }
.refstats-player-nums dd { font-size: 14px; font-weight: 600; color: var(--rv-ink); overflow-wrap: anywhere; }
.refstats-player-nums dd.is-gold { color: var(--rv-gold); }
.refstats-player-meta { font-size: var(--fs-xs); line-height: 1.5; color: var(--rv-soft); overflow-wrap: anywhere; }
.refstats-player-meta b { color: var(--rv-ink); }

/* original invite / claim content as the Invite tab */
.refstats-invite { gap: var(--s-2); }
.refstats-invite .figure-row { margin: 0; }
.refstats-invite .figure { background: var(--rv-glass); border: 1px solid rgba(176, 130, 220, 0.4); }
.refstats-invite .kv-copy code { color: var(--rv-ink); }
.refstats-invite .field-hint { color: var(--rv-soft); }
