/* Shared site shell: sticky activity ticker + bottom navigation */

:root {
    /* Total fixed-top inset (ticker + donor strip when visible). The 52px
     * here is only the pre-JS fallback: app.js measures the rendered bars
     * and republishes --site-shell-top as an inline style on <html> (and
     * adds html.shell-top-measured) so every consumer clears BOTH bars. */
    --site-shell-top: 52px;
    /* Static height of the ticker bar ONLY. Used for the ticker's own
     * min-height and the donor strip's top offset — must NOT reference
     * --site-shell-top or the JS measurement would feed back into the
     * bars' own geometry and grow them. */
    --site-ticker-height: 52px;
    --site-donor-strip-height: 30px;
    --site-shell-bottom: 110px;
    /* ── Site-shell stacking scale ──────────────────────────────────────────
     * One ordered ladder, lowest rung first. Every fixed part of the shell
     * MUST take its z-index from a rung here rather than an ad-hoc literal —
     * that is what makes "the overlay covers all chrome" checkable by reading
     * this block instead of by grepping the file.
     *
     *   --site-nav-z     baseline for fixed shell chrome (the bottom nav).
     *   --site-donor-z   fixed top chrome, above the nav bar.
     *   --site-ticker-z  fixed top chrome, above the donor strip.
     *   --site-overlay-z the OVERLAY rung: an open drawer + its scrim. Must
     *                    stay strictly above EVERY chrome rung above, because
     *                    a scrim that something can out-rank is not a scrim.
     *                    Deliberately left below the modal families (>=1200:
     *                    promo/nudges/chat/casino-nav) so a modal opened from
     *                    the drawer still lands on top.
     *
     * --site-drawer-z is NOT a rung on this ladder: it only orders the drawer
     * above the scrim *inside* the .site-bottom-nav wrapper (which is its own
     * stacking context), so it is never compared against page-level chrome.
     * Treating it as the overlay rung is exactly the bug fixed further down. */
    --site-nav-z: 1080;
    --site-drawer-z: 1088;
    --site-donor-z: calc(var(--site-nav-z) + 18);
    --site-ticker-z: calc(var(--site-nav-z) + 20);
    --site-overlay-z: calc(var(--site-nav-z) + 30);
    --site-safe-area-bottom: env(safe-area-inset-bottom, 0px);
}

/* When the donor strip is rendered (server-side; controlled by `hidden`
 * attribute on .site-donor-strip), the body needs extra top padding so the
 * strip doesn't overlap page content. The strip self-removes via the
 * `hidden` attribute when the donor list is empty, so the .has-donor-strip
 * class is what actually triggers the padding bump. */
body.has-donor-strip {
    padding-top: calc(var(--site-ticker-height) + var(--site-donor-strip-height)) !important;
}

/* Once app.js has measured the real combined fixed-top height,
 * --site-shell-top already includes the donor strip — use it directly
 * (adding the strip height again would double-count it). */
html.shell-top-measured body,
html.shell-top-measured body.has-donor-strip {
    padding-top: var(--site-shell-top) !important;
}

.navbar,
#mobileInfoStrip,
#mobileBottomNav {
    display: none !important;
}

body {
    padding-top: var(--site-shell-top) !important;
    padding-bottom: calc(var(--site-shell-bottom) + var(--site-safe-area-bottom)) !important;
    min-height: 100vh;
    min-height: 100dvh;
}

.site-bottom-nav-shell,
.site-nav-drawer,
.site-nav-backdrop,
.site-bottom-nav-item {
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}

.main-content {
    padding-top: 1.25rem;
}

.site-ticker-shell {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: var(--site-ticker-z);
    display: grid;
    grid-template-columns: auto auto 1fr;
    align-items: center;
    gap: 0.75rem;
    min-height: var(--site-ticker-height, 52px);
    padding: 0.5rem 0.9rem;
    background:
        linear-gradient(90deg, rgba(9, 20, 31, 0.98), rgba(17, 34, 48, 0.96) 36%, rgba(11, 18, 30, 0.98)),
        radial-gradient(circle at top left, rgba(255, 140, 0, 0.14), transparent 42%);
    border-bottom: 1px solid rgba(158, 179, 199, 0.16);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.28);
}

.site-ticker-brand {
    min-width: 0;
}

.ticker-brand-link {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    text-decoration: none;
    color: #f8fafc;
    font-family: 'Rajdhani', sans-serif;
    font-weight: 700;
    font-size: 0.95rem;
    letter-spacing: 0.04em;
}

.ticker-brand-link img {
    width: 28px;
    height: 28px;
    object-fit: contain;
    filter: drop-shadow(0 0 12px rgba(34, 197, 94, 0.25));
}

/* ── Ticker Constants Zone ─────────────────────────────────── */
.site-ticker-constants {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    min-width: 0;
    flex-shrink: 0;
    border-left: 1px solid rgba(148, 163, 184, 0.12);
    padding-left: 0.65rem;
}

.ticker-const-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.2rem 0.55rem;
    border-radius: 999px;
    font-size: 0.8125rem;
    font-weight: 600;
    font-family: 'Rajdhani', sans-serif;
    letter-spacing: 0.03em;
    white-space: nowrap;
    text-decoration: none;
    transition: opacity 0.2s, background 0.2s;
    min-width: 0;
    overflow: hidden;
}

.ticker-const-pill i {
    font-size: 0.8125rem;
    flex-shrink: 0;
}

.ticker-const-pill span {
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
}

.ticker-const-hidden {
    display: none !important;
}

/* Entrance animation when pills become visible */
@keyframes ticker-pill-enter {
    from { opacity: 0; transform: scale(0.85); }
    to   { opacity: 1; transform: scale(1); }
}
.ticker-const-pill:not(.ticker-const-hidden) {
    animation: ticker-pill-enter 0.3s ease-out;
}

/* Discord pill */
.ticker-const-discord {
    background: rgba(88, 101, 242, 0.25);
    border: 1px solid rgba(88, 101, 242, 0.4);
    color: #bdc3f9;
}
.ticker-const-discord:hover {
    background: rgba(88, 101, 242, 0.45);
    color: #fff;
}

.ticker-const-vote {
    background: rgba(34, 197, 94, 0.22);
    border: 1px solid rgba(74, 222, 128, 0.52);
    color: #bbf7d0;
}
.ticker-const-vote:hover {
    background: rgba(34, 197, 94, 0.42);
    color: #fff;
}

/* Boss pill */
.ticker-const-boss {
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #fca5a5;
    cursor: default;
}
.ticker-const-boss[data-state="active"] {
    background: rgba(239, 68, 68, 0.3);
    border-color: rgba(239, 68, 68, 0.55);
    color: #fef2f2;
    animation: ticker-pulse-boss 2s ease-in-out infinite;
}
@keyframes ticker-pulse-boss {
    0%, 100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
    50% { box-shadow: 0 0 8px 2px rgba(239, 68, 68, 0.3); }
}
.ticker-const-boss[data-state="waiting"] {
    background: rgba(251, 191, 36, 0.15);
    border-color: rgba(251, 191, 36, 0.3);
    color: #fde68a;
}
.ticker-const-boss[data-state="waiting"].is-soon {
    background: rgba(251, 191, 36, 0.25);
    border-color: rgba(251, 191, 36, 0.5);
    color: #fbbf24;
    animation: ticker-boss-soon-pulse 1.5s ease-in-out infinite;
}
@keyframes ticker-boss-soon-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

/* Story pill */
.ticker-const-story {
    background: rgba(139, 92, 246, 0.15);
    border: 1px solid rgba(139, 92, 246, 0.3);
    color: #c4b5fd;
    cursor: default;
}
.ticker-const-story[data-state="active"] {
    background: rgba(139, 92, 246, 0.3);
    border-color: rgba(139, 92, 246, 0.55);
    color: #f5f3ff;
    animation: ticker-pulse-story 3s ease-in-out infinite;
}
.ticker-const-story[data-state="holding"] {
    background: rgba(139, 92, 246, 0.2);
    border-color: rgba(139, 92, 246, 0.4);
    color: #ddd6fe;
}
.ticker-const-story[data-state="warming_up"] {
    background: rgba(251, 146, 60, 0.2);
    border-color: rgba(251, 146, 60, 0.4);
    color: #fed7aa;
    animation: ticker-pulse-story-warmup 3.5s ease-in-out infinite;
}
@keyframes ticker-pulse-story {
    0%, 100% { box-shadow: 0 0 0 0 rgba(139, 92, 246, 0); }
    50% { box-shadow: 0 0 8px 2px rgba(139, 92, 246, 0.3); }
}
@keyframes ticker-pulse-story-warmup {
    0%, 100% { box-shadow: 0 0 0 0 rgba(251, 146, 60, 0); }
    50% { box-shadow: 0 0 8px 2px rgba(251, 146, 60, 0.25); }
}

/* Live event pill */
.ticker-const-boost {
    background: rgba(34, 197, 94, 0.16);
    border: 1px solid rgba(34, 197, 94, 0.34);
    color: #bbf7d0;
    cursor: default;
}
.ticker-const-boost[data-state="active"] {
    background: rgba(34, 197, 94, 0.28);
    border-color: rgba(34, 197, 94, 0.52);
    color: #f0fdf4;
    animation: ticker-pulse-boost 2.1s ease-in-out infinite;
}
.ticker-const-boost[data-state="ending"] {
    background: rgba(245, 158, 11, 0.22);
    border-color: rgba(245, 158, 11, 0.48);
    color: #fef3c7;
    animation: ticker-pulse-boost-ending 1.8s ease-in-out infinite;
}
.ticker-const-boost[data-state="pending"] {
    background: rgba(255, 215, 0, 0.16);
    border-color: rgba(255, 215, 0, 0.4);
    color: #fde68a;
}
@keyframes ticker-pulse-boost {
    0%, 100% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0); }
    50% { box-shadow: 0 0 8px 2px rgba(34, 197, 94, 0.28); }
}
@keyframes ticker-pulse-boost-ending {
    0%, 100% { box-shadow: 0 0 0 0 rgba(245, 158, 11, 0); }
    50% { box-shadow: 0 0 9px 2px rgba(245, 158, 11, 0.3); }
}

/* Live event pill */
.ticker-const-event {
    background: rgba(16, 185, 129, 0.16);
    border: 1px solid rgba(16, 185, 129, 0.34);
    color: #a7f3d0;
    cursor: default;
}
.ticker-const-event[data-state="active"] {
    background: rgba(16, 185, 129, 0.28);
    border-color: rgba(16, 185, 129, 0.52);
    color: #ecfdf5;
    animation: ticker-pulse-event 2.2s ease-in-out infinite;
}
.ticker-const-event[data-state="ending"] {
    background: rgba(245, 158, 11, 0.22);
    border-color: rgba(245, 158, 11, 0.48);
    color: #fef3c7;
    animation: ticker-pulse-event-ending 1.8s ease-in-out infinite;
}
@keyframes ticker-pulse-event {
    0%, 100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
    50% { box-shadow: 0 0 8px 2px rgba(16, 185, 129, 0.28); }
}
@keyframes ticker-pulse-event-ending {
    0%, 100% { box-shadow: 0 0 0 0 rgba(245, 158, 11, 0); }
    50% { box-shadow: 0 0 9px 2px rgba(245, 158, 11, 0.3); }
}

.site-ticker-viewport {
    min-width: 0;
    overflow: hidden;
    position: relative;
    border-left: 1px solid rgba(148, 163, 184, 0.12);
    padding-left: 0.75rem;
    mask-image: linear-gradient(90deg, transparent, #000 5%, #000 95%, transparent);
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 5%, #000 95%, transparent);
}

.site-ticker-track {
    display: inline-flex;
    align-items: center;
    gap: 1.5rem;
    white-space: nowrap;
    will-change: transform;
    width: max-content;
    min-width: 100%;
    flex-wrap: nowrap;
    padding-right: 1.5rem;
}

.site-ticker-track.is-paused {
    transition: none;
}

.site-ticker-item {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: #f2e8d0;
    font-size: 0.88rem;
    font-weight: 500;
}

.site-ticker-item strong {
    color: #f8fafc;
}

.site-ticker-meta {
    color: rgba(240, 233, 216, 0.78);
    font-size: 0.8125rem;
}

.site-ticker-dot {
    width: 0.42rem;
    height: 0.42rem;
    border-radius: 50%;
    background: linear-gradient(135deg, #ff6b4a, #ffaa00);
    box-shadow: 0 0 12px rgba(255, 170, 0, 0.35);
    flex-shrink: 0;
}

/* Ticker highlight: Gold — jackpots, big wins, giveaway */
.site-ticker-item.ticker-gold {
    color: #ffd700;
}
.site-ticker-item.ticker-gold strong {
    color: #ffdf40;
    text-shadow: 0 0 6px rgba(255, 215, 0, 0.5);
}
.site-ticker-item.ticker-gold .site-ticker-dot {
    background: linear-gradient(135deg, #ffd700, #ffaa00);
    box-shadow: 0 0 10px rgba(255, 215, 0, 0.6);
}
.site-ticker-item.ticker-gold .site-ticker-meta {
    color: rgba(255, 223, 100, 0.7);
}

/* Ticker category: Casino wins */
.site-ticker-item.ticker-casino {
    color: #c4b5fd;
}
.site-ticker-item.ticker-casino strong {
    color: #ddd6fe;
}
.site-ticker-item.ticker-casino .site-ticker-dot {
    background: linear-gradient(135deg, #a78bfa, #7c3aed);
    box-shadow: 0 0 10px rgba(139, 92, 246, 0.4);
}

/* Ticker category: Premium shop */
.site-ticker-item.ticker-premium {
    color: #fbcfe8;
}
.site-ticker-item.ticker-premium strong {
    color: #fce7f3;
}
.site-ticker-item.ticker-premium .site-ticker-dot {
    background: linear-gradient(135deg, #f472b6, #db2777);
    box-shadow: 0 0 10px rgba(236, 72, 153, 0.4);
}

/* Ticker category: Purchases */
.site-ticker-item.ticker-purchase {
    color: #bbf7d0;
}
.site-ticker-item.ticker-purchase strong {
    color: #dcfce7;
}
.site-ticker-item.ticker-purchase .site-ticker-dot {
    background: linear-gradient(135deg, #4ade80, #16a34a);
    box-shadow: 0 0 10px rgba(74, 222, 128, 0.4);
}

/* Ticker category: Giveaway */
.site-ticker-item.ticker-giveaway {
    color: #fde68a;
}
.site-ticker-item.ticker-giveaway strong {
    color: #fef3c7;
}

/* Ticker category: Boss kills & rewards */
.site-ticker-item.ticker-boss {
    color: #fca5a5;
}
.site-ticker-item.ticker-boss strong {
    color: #fecaca;
}
.site-ticker-item.ticker-boss .site-ticker-dot {
    background: linear-gradient(135deg, #f87171, #dc2626);
    box-shadow: 0 0 10px rgba(248, 113, 113, 0.4);
}

/* Ticker category: Gift/reward claims */
.site-ticker-item.ticker-reward {
    color: #ff9d5c;
}
.site-ticker-item.ticker-reward strong {
    color: #ffc7a3;
}
.site-ticker-item.ticker-reward .site-ticker-dot {
    background: linear-gradient(135deg, #ff8a50, #ff4500);
    box-shadow: 0 0 10px rgba(255, 138, 80, 0.4);
}

/* Gold highlight overrides category colors (highest priority) */
.site-ticker-item.ticker-gold.ticker-casino,
.site-ticker-item.ticker-gold.ticker-giveaway {
    color: #ffd700;
}
.site-ticker-item.ticker-gold.ticker-casino strong,
.site-ticker-item.ticker-gold.ticker-giveaway strong {
    color: #ffdf40;
    text-shadow: 0 0 6px rgba(255, 215, 0, 0.5);
}

.site-ticker-loading {
    color: rgba(226, 232, 240, 0.8);
    font-size: 0.84rem;
}

/* ---------------- Recent-donor scroller ----------------
 * Sits directly below the activity-ticker shell, fixed at the top of the
 * viewport. Auto-scrolling marquee of recent Stripe-paid donations within
 * the last 90 days. The aside is hidden (via the `hidden` attribute) until
 * the JS hydrates it with at least one entry; on hydration the JS also
 * adds the `has-donor-strip` class to <body> so the body padding-top
 * compensates for the strip height. */
.site-donor-strip {
    position: fixed;
    /* Sits directly below the ticker bar — pinned to the ticker's own
     * height, NOT --site-shell-top (which, once measured by app.js,
     * includes this strip and would push it below itself). */
    top: var(--site-ticker-height, 52px);
    left: 0;
    right: 0;
    z-index: var(--site-donor-z);
    display: grid;
    /* THREE cells, not two: [TOP DONATOR] [Recent Donors] [marquee viewport].
       This used to be `auto 1fr` here and was corrected to `auto auto 1fr` by an
       inline <style> block in base.html — which hub_base.html, having copied the
       MARKUP verbatim and not the inline sheet, never got. The third child then
       wrapped onto an implicit second grid row, so the TOP DONATOR cell rendered
       ABOVE the ticking donors instead of leading them and the strip was two rows
       high on every hub page (measured 56.5px against the live page's 31px at
       1024x900). The declaration lives here now so BOTH shells get it from the
       stylesheet they both link. Never re-add a copy in a template. */
    grid-template-columns: auto auto 1fr;
    align-items: center;
    gap: 0.5rem;
    min-height: var(--site-donor-strip-height);
    padding: 0.1rem 0.85rem;
    background:
        linear-gradient(90deg, rgba(35, 16, 56, 0.92), rgba(22, 11, 41, 0.92) 60%, rgba(40, 18, 64, 0.92)),
        radial-gradient(circle at top left, rgba(247, 200, 106, 0.18), transparent 45%);
    border-bottom: 1px solid rgba(247, 200, 106, 0.22);
    color: rgba(245, 232, 196, 0.95);
    font-size: 0.8125rem;
    min-width: 0;
    overflow: hidden;
}
.site-donor-strip[hidden] {
    display: none !important;
}
/* Top Donator slot — always-visible, month-aware, links to the Top Donator
 * leaderboard. The FIRST cell of the donor-strip grid, INLINE IN FRONT of the
 * marquee (it leads it; it is not a second row).
 *
 * These six rules were an inline <style> block in base.html. Living in a
 * template meant only that template's pages got them: `hub_base.html` reuses the
 * same markup and rendered `.site-donor-top` as a bare <a> — UA-default blue and
 * underlined, because nothing in this codebase sets a global `a { color }` — with
 * no pill, no gap and no size caps. Both symptoms (the wrapped row and the blue
 * link) were the same missing sheet. Anything the donor strip's markup depends on
 * belongs HERE, next to the rest of `.site-donor-*`. */
.site-donor-top {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    text-decoration: none;
    white-space: nowrap;
    padding: 0.12rem 0.6rem;
    border-radius: 999px;
    background: linear-gradient(90deg, rgba(247, 200, 106, 0.20), rgba(247, 200, 106, 0.08));
    border: 1px solid rgba(247, 200, 106, 0.45);
    box-shadow: 0 0 10px rgba(247, 200, 106, 0.18);
    min-width: 0;
    transition: filter 0.15s ease, box-shadow 0.15s ease;
}
.site-donor-top:hover { filter: brightness(1.12); box-shadow: 0 0 14px rgba(247, 200, 106, 0.30); }
.site-donor-top > i {
    color: #ffd66e;
    font-size: 0.82rem;
    text-shadow: 0 0 6px rgba(247, 200, 106, 0.45);
    flex: 0 0 auto;
}
.site-donor-top-copy {
    display: inline-flex;
    align-items: baseline;
    gap: 0.4rem;
    min-width: 0;
}
.site-donor-top-label {
    color: #f7c86a;
    font-weight: 800;
    letter-spacing: 0.04em;
    font-size: 0.8125rem;
    text-transform: uppercase;
    white-space: nowrap;
}
.site-donor-top-name {
    color: #f9efd7;
    font-weight: 700;
    font-size: 0.8125rem;
    max-width: 16ch;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    min-width: 0;
}
.site-donor-strip-label {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    white-space: nowrap;
    font-weight: 700;
    color: #f7c86a;
    text-shadow: 0 0 6px rgba(247, 200, 106, 0.35);
    min-width: 0;
}
.site-donor-strip-label i {
    color: #f7c86a;
}
.site-donor-strip-window {
    color: rgba(231, 217, 178, 0.75);
    font-weight: 500;
    font-size: 0.8125rem;
    margin-left: 0.15rem;
}
.site-donor-strip-viewport {
    position: relative;
    overflow: hidden;
    min-width: 0;
    height: calc(var(--site-donor-strip-height) - 0.2rem);
    mask-image: linear-gradient(90deg, transparent, #000 4%, #000 96%, transparent);
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 4%, #000 96%, transparent);
}
.site-donor-strip-track {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    white-space: nowrap;
    flex-wrap: nowrap;
    /* width: max-content forces the flex container to its natural content
     * width so the JS translateX shift covers exactly one copy of the
     * duplicated markup. Without this, the inline-flex element collapsed
     * to the viewport width inside a grid cell and the marquee stalled. */
    width: max-content;
    min-width: 100%;
    will-change: transform;
    /* Animation is JS-driven via requestAnimationFrame in base.html
     * (same pattern as the existing activity ticker). The CSS-only
     * @keyframes approach failed when stacked under base.html JS that
     * sets/resets `track.style.transform` during page hydration. */
}
.site-donor-item {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.15rem 0.55rem;
    border-radius: 999px;
    background: rgba(247, 200, 106, 0.08);
    border: 1px solid rgba(247, 200, 106, 0.18);
    min-width: 0;
    overflow: hidden;
}
.site-donor-item .site-donor-icon {
    color: #f7c86a;
    font-size: 0.8125rem;
}
.site-donor-item .site-donor-name {
    color: #f9efd7;
    font-weight: 700;
    max-width: 16ch;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    min-width: 0;
}
.site-donor-item .site-donor-amount {
    color: #ffd66e;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}
.site-donor-item .site-donor-package {
    color: rgba(231, 217, 178, 0.7);
    font-weight: 500;
    max-width: 18ch;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
/* JS rAF drives the donor-strip marquee; no @keyframes needed. The
 * reduced-motion preference is honored by the JS animator (`siteDonorPaused`
 * stays true when matchMedia('prefers-reduced-motion: reduce').matches). */
@media (max-width: 640px) {
    /* Phone donor lane: one readable donor identity plus the actual marquee.
       The desktop's extra "Recent Donors" column consumes the space the
       ticker needs, then leaves only fragments of each donation visible. */
    .site-donor-strip {
        grid-template-columns: minmax(0, 8.75rem) minmax(0, 1fr);
        min-height: 32px;
        padding: 0.1rem 0.4rem;
        gap: 0.3rem;
    }
    .site-donor-strip-label { display: none; }
    .site-donor-strip-viewport { height: 30px; }
    .site-donor-item .site-donor-package { display: none; }
    .site-donor-item .site-donor-name { max-width: 12ch; }
    .site-donor-top { min-width: 0; padding: 0.1rem 0.35rem; gap: 0.25rem; }
    .site-donor-top-copy { min-width: 0; }
    .site-donor-top-label { display: none; }
    .site-donor-top-name { display: block; font-size: 0.8125rem; max-width: 8.5ch; }
}

.site-bottom-nav {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: var(--site-nav-z);
    pointer-events: none;
    /* The shell is a viewport-centred object, not a child positioned from the
       document's left edge.  Keeping the centring on this untransformed fixed
       wrapper matters: transforming it would turn the More/Online drawers'
       fixed positioning into a local coordinate system. */
    display: flex;
    justify-content: center;
    width: 100%;
}

.site-bottom-nav-shell,
.site-nav-drawer,
.site-nav-backdrop {
    pointer-events: auto;
}

.site-bottom-nav-shell {
    position: relative;
    width: min(760px, calc(100vw - 1rem));
    margin: 0 auto calc(var(--site-safe-area-bottom) + 0.65rem);
    flex: 0 1 min(760px, calc(100vw - 1rem));
    transition: opacity 0.2s ease, transform 0.2s ease;
}

/* ── Minimize / restore button ── */
.site-nav-minimize-btn {
    position: absolute;
    top: -26px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: 56px;
    height: 26px;
    border: 1px solid rgba(148, 163, 184, 0.22);
    border-bottom: none;
    border-radius: 12px 12px 0 0;
    background: linear-gradient(180deg, rgba(8, 15, 32, 0.95), rgba(10, 20, 40, 0.9));
    backdrop-filter: blur(12px);
    color: rgba(226, 232, 240, 0.7);
    font-size: 0.8125rem;
    cursor: pointer;
    transition: color 0.18s ease, background 0.18s ease;
    padding: 0;
    outline: none;
    -webkit-tap-highlight-color: transparent;
}
.site-nav-minimize-btn:hover,
.site-nav-minimize-btn:active {
    color: #fff;
    background: rgba(20, 30, 50, 0.98);
}

/* Minimized state: hide status row + nav bar, show only restore tab */
.site-bottom-nav-shell.is-minimized .site-status-row,
.site-bottom-nav-shell.is-minimized .site-bottom-nav-bar {
    display: none;
}
.site-bottom-nav-shell.is-minimized {
    margin-bottom: calc(var(--site-safe-area-bottom) + 0.3rem);
}
.site-bottom-nav-shell.is-minimized .site-nav-minimize-btn {
    position: relative;
    top: auto;
    left: auto;
    transform: none;
    width: 100%;
    height: 36px;
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-bottom: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 14px;
    background: linear-gradient(180deg, rgba(8, 15, 32, 0.94), rgba(10, 20, 40, 0.9));
    font-size: 0.8125rem;
}
.site-bottom-nav-shell.is-minimized .site-nav-minimize-btn i {
    transform: rotate(180deg);
}

/* ═══ Unified status row — single line above nav bar, auto-fits to content ═══ */
.site-status-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.3rem;
    width: fit-content;
    max-width: 100%;
    margin: 0 auto 0.3rem;
    padding: 0.2rem 0.35rem;
    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: none;
    -ms-overflow-style: none;
    -webkit-overflow-scrolling: touch;
    background: linear-gradient(180deg, rgba(8, 15, 32, 0.88), rgba(10, 20, 40, 0.78));
    border: 1px solid rgba(148, 163, 184, 0.1);
    border-radius: 999px;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    transition: width 0.25s ease;
}
.site-status-row::-webkit-scrollbar { display: none; }
.site-status-row:empty { display: none; }

/* ── Shared chip base ── */
.sr-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    flex-shrink: 0;
    min-width: 0;
    padding: 0.2rem 0.5rem;
    border-radius: 999px;
    border: 1px solid transparent;
    background: rgba(255, 255, 255, 0.04);
    text-decoration: none;
    font-size: 0.8125rem;
    font-weight: 700;
    color: #e2e8f0;
    line-height: 1;
    transition: transform 0.15s ease, border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}
.sr-chip:hover {
    transform: translateY(-1px);
    border-color: rgba(255, 215, 0, 0.22);
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}
.sr-chip:active { transform: scale(0.97); }
.sr-chip[hidden] { display: none; }
.sr-chip.is-hidden { display: none; }

/* Thin divider between balance chips and action chips */
.sr-balance-chip + .sr-reminder-chip,
.sr-balance-chip + .sr-giveaway-chip {
    border-left: 1px solid rgba(148, 163, 184, 0.12);
    margin-left: 0.1rem;
    padding-left: 0.55rem;
}

/* ── Balance chips ── */
.sr-balance-chip { padding: 0.15rem 0.45rem; }
.sr-dream { color: #fef3c7; }
.sr-dream:hover { border-color: rgba(250, 204, 21, 0.25); background: rgba(250, 204, 21, 0.06); }
.sr-premium { color: #e9d5ff; }
.sr-premium:hover { border-color: rgba(192, 132, 252, 0.25); background: rgba(192, 132, 252, 0.06); }
.sr-raid { color: #ffd1b5; }
.sr-raid:hover { border-color: rgba(255, 138, 80, 0.3); background: rgba(255, 138, 80, 0.07); }

.sr-coin-icon {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.45rem;
    height: 1.45rem;
    flex: 0 0 1.45rem;
    overflow: hidden;
    isolation: isolate;
    filter: drop-shadow(0 1px 3px rgba(0, 0, 0, 0.3));
}
.sr-coin-media {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    pointer-events: none;
}
.sr-coin-video {
    z-index: 1;
    transform: translateZ(0);
    backface-visibility: hidden;
    will-change: transform;
}
.sr-balance-copy {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    min-width: 0;
    line-height: 1;
}
/* ⚠️ `.sr-` HERE MEANS "STATUS ROW", NOT "SCREEN READER".
   Same prefix as .sr-chip / .sr-coin-icon / .sr-giveaway-chip — all visible
   chrome — and .sr-value carries id="siteNavDreamCoins". Measured in Chromium
   (tests/status_row_type_floor_harness.py): position static, clip-path none,
   clip auto, visibility visible, opacity 1, non-zero box, elementFromPoint
   returns the node itself at 360/390/414/768/1440. These are PAINTED. The 13px
   type floor (compact-view.css:8, exceptions list EMPTY) applies in full.
   Was 0.4rem = 6.4px — under the floor even on desktop. 0.8125rem = 13.0px
   against the 16px root. Do not drop it back to a "caption" size: the coin
   icon and chip color are decoration, this is the only text naming the
   currency, and 6.4px is not text anyone can read. */
.sr-balance-label {
    font-size: 0.8125rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: rgba(226, 232, 240, 0.5);
    line-height: 1;
}
.sr-dream .sr-balance-label { color: rgba(254, 243, 199, 0.55); }
.sr-premium .sr-balance-label { color: rgba(233, 213, 255, 0.55); }
.sr-raid .sr-balance-label { color: rgba(255, 209, 181, 0.6); }
.sr-value {
    font-family: 'Rajdhani', sans-serif;
    font-size: 0.88rem;
    font-weight: 700;
    color: #fff;
    white-space: nowrap;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
    line-height: 1.05;
}

/* Brief color pulse after a balance change. No transform — keeps the chip
   layout stable. Applied to .sr-value nav chips and any [data-live-*-balance]
   node by main.js's flashBalanceChip helper. */
.sr-balance-flash-up,
[data-live-dream-balance].sr-balance-flash-up,
[data-live-premium-balance].sr-balance-flash-up {
    animation: sr-balance-flash-up-anim 0.6s ease-out;
}
.sr-balance-flash-down,
[data-live-dream-balance].sr-balance-flash-down,
[data-live-premium-balance].sr-balance-flash-down {
    animation: sr-balance-flash-down-anim 0.6s ease-out;
}
@keyframes sr-balance-flash-up-anim {
    0%   { color: #fff; text-shadow: 0 1px 3px rgba(0, 0, 0, 0.25); }
    35%  { color: #4ade80; text-shadow: 0 0 8px rgba(74, 222, 128, 0.6); }
    100% { color: #fff; text-shadow: 0 1px 3px rgba(0, 0, 0, 0.25); }
}
@keyframes sr-balance-flash-down-anim {
    0%   { color: #fff; text-shadow: 0 1px 3px rgba(0, 0, 0, 0.25); }
    35%  { color: #fb7185; text-shadow: 0 0 8px rgba(251, 113, 133, 0.55); }
    100% { color: #fff; text-shadow: 0 1px 3px rgba(0, 0, 0, 0.25); }
}
@media (prefers-reduced-motion: reduce) {
    .sr-balance-flash-up,
    .sr-balance-flash-down,
    [data-live-dream-balance].sr-balance-flash-up,
    [data-live-dream-balance].sr-balance-flash-down,
    [data-live-premium-balance].sr-balance-flash-up,
    [data-live-premium-balance].sr-balance-flash-down {
        animation: none;
    }
}

/* ── Reminder chips ── */
.sr-reminder-chip {
    cursor: pointer;
    border-color: rgba(250, 204, 21, 0.18);
    background: rgba(250, 204, 21, 0.06);
}
.sr-reminder-chip:hover {
    border-color: rgba(250, 204, 21, 0.35);
    background: rgba(250, 204, 21, 0.12);
}
.sr-reminder-chip i { font-size: 0.8125rem; }
.sr-reminder-chip span { font-size: 0.8125rem; letter-spacing: 0.03em; text-transform: uppercase; }

/* ── Daily chip — always visible ── */
.sr-daily-chip i { color: #facc15; }
.sr-daily-chip .sr-reminder-btn span { color: #fef3c7; }
.sr-daily-chip.sr-daily-ready { animation: sr-remind-glow 2.8s ease-in-out infinite; }
.sr-daily-chip.sr-daily-cooldown { animation: none; opacity: 0.7; }
.sr-daily-chip.sr-daily-cooldown .sr-reminder-btn { cursor: default; }
.sr-daily-timer {
    font-family: 'Rajdhani', sans-serif;
    font-size: 0.8125rem;
    font-weight: 700;
    color: rgba(250, 204, 21, 0.8);
    letter-spacing: 0.01em;
    white-space: nowrap;
}
.sr-daily-timer:empty { display: none; }
.sr-daily-label,
.sr-daily-timer {
    transition: opacity 0.2s ease;
}
.sr-daily-ready .sr-daily-timer { opacity: 0; width: 0; overflow: hidden; }
.sr-daily-cooldown .sr-daily-label { opacity: 0; width: 0; overflow: hidden; }

/* ── WTP chip ── */
.sr-wtp-chip { border-color: rgba(255, 215, 0, 0.22); background: rgba(255, 140, 0, 0.08); animation: sr-wtp-glow 2.8s ease-in-out infinite; }
.sr-wtp-chip:hover { border-color: rgba(255, 215, 0, 0.4); background: rgba(255, 140, 0, 0.14); }
.sr-wtp-chip i { color: #ffd700; }
.sr-wtp-chip span { color: #ffe9c9; }

@keyframes sr-remind-glow {
    0%, 100% { box-shadow: none; }
    50% { box-shadow: 0 0 8px rgba(250, 204, 21, 0.15); }
}
@keyframes sr-wtp-glow {
    0%, 100% { box-shadow: none; }
    50% { box-shadow: 0 0 8px rgba(255, 215, 0, 0.18); }
}

.sr-reminder-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    background: none;
    border: none;
    color: inherit;
    font: inherit;
    cursor: pointer;
    padding: 0;
}
.sr-reminder-btn:disabled { cursor: default; }

/* ── Giveaway chip ── */
.sr-giveaway-chip { padding: 0; border-color: transparent; background: transparent; }
.sr-giveaway-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    background: none;
    border: none;
    color: inherit;
    font: inherit;
    cursor: pointer;
    padding: 0.2rem 0.48rem;
    outline: none;
    -webkit-tap-highlight-color: transparent;
}
.sr-giveaway-btn[disabled] { cursor: default; }
.sr-giveaway-btn:focus-visible {
    outline: 2px solid rgba(255, 215, 0, 0.7);
    outline-offset: 2px;
    border-radius: 999px;
}

.sr-ga-icon { font-size: 0.8125rem; flex-shrink: 0; line-height: 1; }
.sr-ga-copy { display: flex; flex-direction: column; gap: 0; min-width: 0; }
.sr-ga-label {
    font-size: 0.8125rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: rgba(226, 232, 240, 0.6);
    line-height: 1.1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.sr-ga-timer {
    font-family: 'Rajdhani', sans-serif;
    font-size: 0.82rem;
    font-weight: 700;
    color: #fff;
    line-height: 1.1;
    letter-spacing: 0.01em;
}
.sr-ga-entries {
    display: inline-flex;
    align-items: center;
    padding: 0.1rem 0.32rem;
    border-radius: 999px;
    background: rgba(255, 215, 0, 0.08);
    border: 1px solid rgba(255, 215, 0, 0.12);
    font-size: 0.8125rem;
    font-weight: 700;
    color: #ffd700;
    white-space: nowrap;
    flex-shrink: 0;
}
.sr-ga-entries:empty { display: none; }
.sr-ga-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.2rem 0.5rem;
    border-radius: 999px;
    font-size: 0.8125rem;
    font-weight: 800;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    white-space: nowrap;
    flex-shrink: 0;
    transition: background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease, transform 0.15s ease;
}
.sr-ga-action:empty { display: none; }

/* ── Giveaway states (classes toggled on #siteGiveawayBtn by JS) ── */

/* LIVE — golden glow, pulsing border */
.sr-giveaway-chip:has(.is-live) {
    border-color: rgba(255, 207, 102, 0.4);
    background: rgba(255, 207, 102, 0.05);
    box-shadow: 0 0 10px rgba(255, 207, 102, 0.12);
    animation: sr-ga-pulse 2.4s ease-in-out infinite;
}
.sr-giveaway-btn.is-live .sr-ga-label { color: #fde68a; }
.sr-giveaway-btn.is-live .sr-ga-action {
    background: linear-gradient(135deg, #f59e0b, #eab308);
    color: #1c1917;
    box-shadow: 0 2px 6px rgba(245, 158, 11, 0.3);
}
.sr-giveaway-btn.is-live:hover:not([disabled]) .sr-ga-action {
    background: linear-gradient(135deg, #fbbf24, #facc15);
    box-shadow: 0 3px 10px rgba(251, 191, 36, 0.4);
    transform: translateY(-1px);
}

/* ENTERING — loading pulse */
.sr-giveaway-btn.is-entering .sr-ga-action {
    opacity: 0.7;
    animation: sr-ga-entering 0.8s ease-in-out infinite alternate;
}

@keyframes sr-ga-entering { from { opacity: 0.5; } to { opacity: 0.9; } }
@keyframes sr-ga-pulse {
    0%, 100% { box-shadow: 0 0 6px rgba(255, 207, 102, 0.08); }
    50% { box-shadow: 0 0 14px rgba(255, 207, 102, 0.25); }
}

/* ENTERED — green success */
.sr-giveaway-chip:has(.is-entered) {
    border-color: rgba(74, 222, 128, 0.3);
    background: rgba(74, 222, 128, 0.04);
    animation: none;
}
.sr-giveaway-btn.is-entered .sr-ga-label { color: #86efac; }
.sr-giveaway-btn.is-entered .sr-ga-action {
    background: rgba(74, 222, 128, 0.15);
    color: #86efac;
}

/* WAITING — subdued, idle */
.sr-giveaway-chip:has(.is-waiting) {
    border-color: transparent;
    background: rgba(255, 255, 255, 0.02);
    animation: none;
    opacity: 0.75;
}
.sr-giveaway-btn.is-waiting .sr-ga-label { color: rgba(226, 232, 240, 0.5); }
.sr-giveaway-btn.is-waiting .sr-ga-timer { color: rgba(255, 255, 255, 0.6); font-size: 0.8125rem; }
.sr-giveaway-btn.is-waiting .sr-ga-action { display: none; }
.sr-giveaway-btn.is-waiting .sr-ga-entries { display: none; }

/* ── Reduced motion ── */
@media (prefers-reduced-motion: reduce) {
    .sr-reminder-chip,
    #siteWtpReminder,
    .sr-giveaway-chip:has(.is-live) { animation: none !important; }
    .sr-giveaway-btn.is-entering .sr-ga-action { animation: none; opacity: 0.6; }
}

/* ── Legacy compat ── */
.site-balance-strip { display: none; }
.site-reminder-strip { display: none; }
.site-balance-value { font-family: 'Rajdhani', sans-serif; font-size: 0.88rem; font-weight: 700; color: #fff; }

.site-bottom-nav-bar {
    display: flex;
    flex-wrap: nowrap;
    align-items: stretch;
    gap: 0.18rem;
    padding: 0.28rem;
    background: linear-gradient(180deg, rgba(8, 15, 32, 0.97), rgba(10, 20, 40, 0.92));
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 22px;
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.35);
    /* On wide viewports the items are flex:1 1 0 and always fit, so there is
       nothing to scroll. On narrow phones (≤560px) the items switch to fixed
       min-width tap cells (below) and this container becomes a clean
       horizontal scroller so every one of the 9–10 destinations stays a
       proper ≥44px tap target instead of crushing to ~36px. */
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scroll-snap-type: x proximity;
    scrollbar-width: none;
    -ms-overflow-style: none;
    -webkit-overflow-scrolling: touch;
}
.site-bottom-nav-bar::-webkit-scrollbar { display: none; }

.site-bottom-nav-item {
    flex: 1 1 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.08rem;
    min-height: 43px;
    padding: 0.1rem 0.08rem;
    min-width: 0;
    border: none;
    background: transparent;
    color: rgba(226, 232, 240, 0.66);
    text-decoration: none;
    border-radius: 14px;
    transition: transform 0.18s ease, background 0.18s ease, color 0.18s ease;
    font-size: 0.8125rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    overflow: hidden;
    white-space: nowrap;
}

.site-bottom-nav-item span {
    line-height: 1;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ── Nav labels wrap rather than truncate, from 561px up ────────────────────
 * Above 560px the cells are `flex: 1 1 0` — EQUAL width inside a shell capped
 * at `min(760px, 100vw - 1rem)` — so ~10 destinations get ~70-76px each no
 * matter how wide the viewport is. At the 13px type floor the longest names no
 * longer fit on one line: measured in Chromium, "Player Market" needs 93px
 * into 70px and "Build-A-Pal" 78px into 72px, and the pre-existing
 * `text-overflow: ellipsis` silently cut both.
 *
 * A cut LABEL is the same defect as a label too small to read, wearing an
 * intentional-looking mask — see `domain/web-frontend` -> "nowrap +
 * text-overflow: ellipsis DOES NOT OVERFLOW — IT TRUNCATES", whose rule is:
 * a destination NAME clamps to two lines, the single-line ellipsis is for long
 * VALUES. So clamp to 2 instead. Costs one text line on the bar's height and
 * keeps every name whole.
 *
 * Scoped `> span` and excluding the two NON-TEXT spans (the rewards count
 * bubble and the vote dot), because `-webkit-box` on either would wreck a
 * decoration. Below 561px this block does not apply and nothing changes: the
 * bar is a horizontal scroller whose cells size to their content, and the
 * market cell already swaps in the short "Items/Pals" label. */
@media (min-width: 561px) {
    .site-bottom-nav-item > span:not(.site-bottom-nav-badge):not(.site-vote-dot) {
        white-space: normal;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        text-overflow: clip;
        line-height: 1.05;
    }
}

.site-bottom-nav-item:hover,
.site-bottom-nav-item.active {
    background: rgba(255, 140, 0, 0.12);
    color: #ffffff;
    transform: translateY(-1px);
}

.site-bottom-nav-item i {
    font-size: 0.95rem;
}

/* Market button — overline + dual-line label so the cell reads
   "Item/Pal Player Market" without competing with Casino/Map for
   spotlight. The amber gradient that used to live here was moved to
   .site-bottom-nav-item-spotlight (now applied to More). */
.site-bottom-nav-item-market-label {
    line-height: 1.05;
}

/* Two labels live in the market cell — the long desktop one and a short
   mobile-only one ("Items/Pals"). The desktop default hides the mobile
   span; the ≤560px breakpoint flips them so the cell never truncates on
   phones (issue #293). */
.site-bottom-nav-label-mobile { display: none; }

.site-bottom-nav-overline {
    font-size: 0.8125rem;
    font-weight: 700;
    line-height: 1;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: rgba(229, 231, 235, 0.72);
    margin-bottom: 0;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.site-bottom-nav-item-market-label.active .site-bottom-nav-overline,
.site-bottom-nav-item-market-label:hover .site-bottom-nav-overline {
    color: #ffffff;
}

/* Spotlighted nav cell — drives attention to a specific button (e.g.
   the More menu, where most utility lives). Mirrors the previous Market
   gold treatment so the visual language stays consistent. */
.site-bottom-nav-item-spotlight {
    position: relative;
    background: linear-gradient(180deg, rgba(66, 32, 6, 0.34), rgba(120, 53, 15, 0.18));
    color: #fde68a;
    box-shadow: inset 0 0 0 1px rgba(251, 191, 36, 0.18);
    animation: siteBottomNavSpotlightPulse 2.4s ease-in-out infinite;
}

.site-bottom-nav-item-spotlight i {
    color: #fbbf24;
}

.site-bottom-nav-item-spotlight:hover,
.site-bottom-nav-item-spotlight.active {
    background:
        linear-gradient(180deg, rgba(66, 32, 6, 0.54), rgba(120, 53, 15, 0.32)),
        radial-gradient(circle at top, rgba(251, 191, 36, 0.22), transparent 55%);
    color: #fff7d6;
}

.site-bottom-nav-item-spotlight.active i,
.site-bottom-nav-item-spotlight:hover i {
    color: #fde68a;
}

@keyframes siteBottomNavSpotlightPulse {
    0%, 100% { box-shadow: inset 0 0 0 1px rgba(251, 191, 36, 0.18); }
    50%      { box-shadow: inset 0 0 0 1px rgba(251, 191, 36, 0.42), 0 0 12px rgba(251, 191, 36, 0.18); }
}

@media (prefers-reduced-motion: reduce) {
    .site-bottom-nav-item-spotlight { animation: none; }
}

.site-bottom-nav-rewards {
    position: relative;
}

.site-bottom-nav-rewards.is-hidden {
    display: none;
}

.site-bottom-nav-rewards.has-pending-rewards {
    color: #fff2b8;
    background: rgba(251, 191, 36, 0.11);
    border: 1px solid rgba(251, 191, 36, 0.24);
    box-shadow: inset 0 0 0 1px rgba(251, 191, 36, 0.05);
}

.site-bottom-nav-rewards.has-pending-rewards i {
    color: #fbbf24;
}

.site-bottom-nav-meta {
    font-size: 0.8125rem;
    color: #4ade80;
    line-height: 1;
    text-shadow: 0 0 10px rgba(74, 222, 128, 0.24);
}

.site-rewards-nav-meta {
    color: rgba(229, 231, 235, 0.82);
}

#siteOnlineNavCount {
    font-size: 0.8125rem;
    font-weight: 700;
}

.site-bottom-nav-badge {
    position: absolute;
    top: 0.35rem;
    right: 0.4rem;
    min-width: 1.1rem;
    height: 1.1rem;
    padding: 0 0.28rem;
    border-radius: 999px;
    background: #ef4444;
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8125rem;
    font-weight: 800;
    line-height: 1;
    box-shadow: 0 0 0 2px rgba(8, 15, 32, 0.96);
}

.site-more-profile {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    min-width: 0;
}

.site-more-avatar {
    width: 3.35rem;
    height: 3.35rem;
    border-radius: 18px;
    object-fit: cover;
    border: 1px solid rgba(255, 215, 0, 0.28);
    box-shadow: 0 16px 28px rgba(0, 0, 0, 0.22);
    background: rgba(15, 23, 42, 0.9);
}

.site-more-profile-copy {
    min-width: 0;
}

.site-more-profile-heading {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    min-width: 0;
}

.site-more-level-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 1.45rem;
    padding: 0.12rem 0.55rem;
    border-radius: 999px;
    border: 1px solid rgba(250, 204, 21, 0.28);
    background: linear-gradient(180deg, rgba(250, 204, 21, 0.18), rgba(245, 158, 11, 0.14));
    color: #fde68a;
    font-size: 0.8125rem;
    font-weight: 900;
    letter-spacing: 0.06em;
    line-height: 1;
    text-transform: uppercase;
    white-space: nowrap;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.04);
}

.site-more-progress-shell {
    margin-top: 0.55rem;
    padding: 0.55rem 0.7rem;
    border-radius: 14px;
    border: 1px solid rgba(250, 204, 21, 0.14);
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.72), rgba(30, 41, 59, 0.5));
}

.site-more-progress-meta,
.site-more-progress-stats {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.55rem;
    flex-wrap: wrap;
}

.site-more-progress-meta {
    color: rgba(226, 232, 240, 0.92);
    font-size: 0.8125rem;
    font-weight: 700;
}

.site-more-progress-bar {
    margin-top: 0.45rem;
    width: 100%;
    height: 0.42rem;
    border-radius: 999px;
    background: rgba(30, 41, 59, 0.92);
    overflow: hidden;
}

.site-more-progress-bar span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #facc15, #fb923c);
    box-shadow: 0 0 12px rgba(250, 204, 21, 0.26);
}

.site-more-progress-stats {
    margin-top: 0.45rem;
    color: rgba(240, 233, 216, 0.78);
    font-size: 0.8125rem;
}

.site-more-progress-highlights {
    margin-top: 0.55rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.42rem;
}

.site-more-progress-pill {
    display: inline-flex;
    align-items: center;
    min-height: 1.65rem;
    padding: 0.18rem 0.58rem;
    border-radius: 999px;
    border: 1px solid rgba(250, 204, 21, 0.18);
    background: rgba(120, 53, 15, 0.22);
    color: rgba(254, 240, 138, 0.96);
    font-size: 0.8125rem;
    font-weight: 800;
    line-height: 1.15;
}

.site-more-progress-pill.is-soft {
    border-color: rgba(255, 215, 0, 0.18);
    background: rgba(30, 41, 59, 0.58);
    color: rgba(240, 233, 216, 0.88);
}

.site-more-command-summary {
    padding: 0 1.1rem;
    margin-bottom: 0.7rem;
}

.site-more-command-summary-title {
    color: rgba(148, 163, 184, 0.88);
    font-size: 0.8125rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-bottom: 0.42rem;
}

.site-more-command-summary-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
}

.site-more-command-chip {
    display: inline-flex;
    align-items: center;
    min-height: 1.7rem;
    padding: 0.18rem 0.65rem;
    border-radius: 999px;
    border: 1px solid rgba(74, 222, 128, 0.18);
    background: rgba(22, 163, 74, 0.14);
    color: #bbf7d0;
    font-size: 0.8125rem;
    font-weight: 800;
    line-height: 1;
}

.site-more-command-chip.is-muted {
    border-color: rgba(148, 163, 184, 0.16);
    background: rgba(51, 65, 85, 0.48);
    color: rgba(226, 232, 240, 0.72);
}

.site-more-actions,
.site-more-grid,
.site-more-command-grid {
    padding: 0 1.1rem;
}

.site-more-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.65rem;
}

.site-more-action {
    position: relative;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-height: 78px;
    padding: 0.9rem 0.95rem;
    border-radius: 18px;
    border: 1px solid rgba(148, 163, 184, 0.14);
    background: rgba(15, 23, 42, 0.72);
    color: #e2e8f0;
    text-decoration: none;
    transition: transform 0.18s ease, background 0.18s ease, border-color 0.18s ease, color 0.18s ease;
    width: 100%;
    cursor: pointer;
    text-align: left;
    font: inherit;
}

.site-more-action:hover,
.site-more-action:focus {
    transform: translateY(-1px);
    background: rgba(30, 41, 59, 0.95);
    border-color: rgba(255, 215, 0, 0.28);
    color: #ffffff;
    text-decoration: none;
}

.site-more-action-icon {
    width: 2.6rem;
    height: 2.6rem;
    border-radius: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 140, 0, 0.16);
    color: #ffcf80;
    flex-shrink: 0;
}

.site-more-action-copy {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.site-more-action-title {
    color: #f8fafc;
    font-size: 0.92rem;
    font-weight: 700;
    line-height: 1.15;
}

.site-more-action-subtitle {
    margin-top: 0.2rem;
    color: rgba(240, 233, 216, 0.72);
    font-size: 0.8125rem;
    line-height: 1.3;
}

.site-more-action-badge {
    position: absolute;
    top: 0.6rem;
    right: 0.6rem;
    min-width: 1.25rem;
    height: 1.25rem;
    padding: 0 0.35rem;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #ef4444;
    color: #fff;
    font-size: 0.8125rem;
    font-weight: 800;
    line-height: 1;
    box-shadow: 0 0 0 2px rgba(8, 15, 32, 0.96);
}

.site-more-action-badge.is-hidden {
    display: none;
}

/* My Boosts (pause/resume) rows in the MORE drawer */
.site-myboost-row {
    min-width: 0;
    overflow: hidden;
}

.site-myboost-row .site-more-action-copy {
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
}

.site-myboost-row .site-more-action-title,
.site-myboost-row .site-more-action-subtitle {
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.site-myboost-btn {
    flex-shrink: 0;
    padding: 0.45rem 0.8rem;
    border-radius: 12px;
    border: 1px solid rgba(148, 163, 184, 0.25);
    background: rgba(30, 41, 59, 0.92);
    color: #e2e8f0;
    font-size: 0.8125rem;
    font-weight: 700;
    line-height: 1;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.18s ease, border-color 0.18s ease, color 0.18s ease;
}

.site-myboost-btn:disabled {
    opacity: 0.55;
    cursor: default;
}

.site-myboost-btn.is-pause:hover,
.site-myboost-btn.is-pause:focus {
    border-color: rgba(251, 191, 36, 0.5);
    color: #fbbf24;
}

.site-myboost-btn.is-resume {
    border-color: rgba(74, 222, 128, 0.35);
    color: #86efac;
}

.site-myboost-btn.is-resume:hover,
.site-myboost-btn.is-resume:focus {
    background: rgba(22, 101, 52, 0.35);
    color: #bbf7d0;
}

.site-myboost-btn.is-cancel:hover,
.site-myboost-btn.is-cancel:focus {
    border-color: rgba(255, 215, 0, 0.42);
    color: #fde68a;
}

.site-myboost-note {
    flex-shrink: 0;
    font-size: 0.8125rem;
    color: rgba(148, 163, 184, 0.8);
    white-space: nowrap;
}

.site-more-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.65rem;
}

.site-more-market-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
    padding: 0 1.1rem;
}

.site-more-command-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.65rem;
}

.site-more-command-btn {
    position: relative;
    min-height: 76px;
    border-radius: 18px;
    background:
        linear-gradient(180deg, rgba(15, 23, 42, 0.84), rgba(15, 23, 42, 0.68)),
        radial-gradient(circle at top left, rgba(255, 140, 0, 0.12), transparent 42%);
    border-color: rgba(148, 163, 184, 0.14);
    box-shadow: none;
}

.site-more-command-btn.is-batch-command {
    background:
        linear-gradient(180deg, rgba(71, 28, 14, 0.94), rgba(120, 53, 15, 0.82)),
        radial-gradient(circle at top left, rgba(251, 191, 36, 0.26), transparent 48%);
    border-color: rgba(251, 191, 36, 0.34);
    box-shadow: inset 0 0 0 1px rgba(251, 191, 36, 0.12);
}

.site-more-command-btn.is-batch-command .command-btn-icon {
    background: rgba(251, 191, 36, 0.18);
}

.site-more-command-btn.is-batch-command .command-btn-icon i {
    color: #fde68a;
}

.site-more-command-btn.is-batch-command .command-btn-label {
    color: #fff7d6;
    letter-spacing: 0.08em;
}

.site-more-command-btn.is-batch-command .command-btn-cooldown {
    color: rgba(254, 240, 138, 0.84);
}

.site-more-command-btn:hover:not(:disabled),
.site-more-command-btn:focus-visible:not(:disabled) {
    box-shadow: 0 14px 24px rgba(2, 6, 23, 0.28);
}

.site-more-command-btn .command-btn-icon {
    background: rgba(255, 140, 0, 0.16);
}

.site-more-command-btn .command-btn-icon i {
    color: #ffcf80;
}

.site-more-command-btn .command-btn-label {
    font-size: 0.92rem;
    color: #f8fafc;
}

.site-more-command-btn .command-btn-cooldown {
    color: rgba(240, 233, 216, 0.72);
}

.site-more-command-btn.has-active-challenge {
    border-color: rgba(250, 204, 21, 0.34);
    box-shadow: inset 0 0 0 1px rgba(250, 204, 21, 0.08);
}

.site-more-command-marker {
    position: absolute;
    top: 0.55rem;
    right: 0.55rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 1.25rem;
    padding: 0 0.38rem;
    border-radius: 999px;
    border: 1px solid rgba(250, 204, 21, 0.18);
    background: linear-gradient(180deg, rgba(250, 204, 21, 0.18), rgba(245, 158, 11, 0.14));
    color: #fde68a;
    font-size: 0.8125rem;
    font-weight: 900;
    letter-spacing: 0.05em;
    line-height: 1;
    text-transform: uppercase;
    white-space: nowrap;
}

.site-more-command-btn.on-cooldown {
    background: linear-gradient(180deg, rgba(30, 41, 59, 0.88), rgba(15, 23, 42, 0.74));
}

.site-more-command-btn.on-cooldown .command-btn-cooldown {
    color: #fbbf24;
}

.site-more-card {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    min-height: 102px;
    padding: 0.95rem;
    border-radius: 18px;
    border: 1px solid rgba(148, 163, 184, 0.14);
    background:
        linear-gradient(180deg, rgba(15, 23, 42, 0.82), rgba(15, 23, 42, 0.66)),
        radial-gradient(circle at top left, rgba(255, 140, 0, 0.12), transparent 42%);
    color: #e2e8f0;
    text-decoration: none;
    transition: transform 0.18s ease, background 0.18s ease, border-color 0.18s ease, color 0.18s ease;
}

.site-more-card:hover,
.site-more-card:focus {
    transform: translateY(-1px);
    border-color: rgba(255, 215, 0, 0.28);
    color: #ffffff;
    text-decoration: none;
}

.site-more-card i {
    color: #ffcf80;
    font-size: 1rem;
}

.site-more-card strong {
    color: #f8fafc;
    font-size: 0.92rem;
    line-height: 1.2;
}

.site-more-card span {
    color: rgba(240, 233, 216, 0.72);
    font-size: 0.8125rem;
    line-height: 1.3;
}

.site-more-market-card {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    min-height: 136px;
    padding: 1rem;
    border-radius: 20px;
    border: 1px solid rgba(148, 163, 184, 0.18);
    color: #f8fafc;
    text-decoration: none;
    overflow: hidden;
    transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.site-more-market-card::before {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at top right, rgba(255, 255, 255, 0.14), transparent 46%);
    pointer-events: none;
}

.site-more-market-card:hover,
.site-more-market-card:focus {
    transform: translateY(-2px);
    color: #ffffff;
    text-decoration: none;
    box-shadow: 0 16px 28px rgba(2, 6, 23, 0.28);
}

.site-more-market-card.is-item {
    background:
        linear-gradient(160deg, rgba(66, 32, 6, 0.96), rgba(121, 53, 15, 0.84)),
        radial-gradient(circle at top left, rgba(251, 191, 36, 0.22), transparent 42%);
    border-color: rgba(251, 191, 36, 0.32);
}

.site-more-market-card.is-pal {
    background:
        linear-gradient(160deg, rgba(36, 22, 83, 0.96), rgba(67, 56, 202, 0.8)),
        radial-gradient(circle at top left, rgba(129, 140, 248, 0.26), transparent 46%);
    border-color: rgba(129, 140, 248, 0.34);
}

.site-more-market-card.is-item:hover,
.site-more-market-card.is-item:focus {
    border-color: rgba(253, 224, 71, 0.56);
}

.site-more-market-card.is-pal:hover,
.site-more-market-card.is-pal:focus {
    border-color: rgba(165, 180, 252, 0.58);
}

.site-more-market-kicker {
    display: inline-flex;
    align-self: flex-start;
    align-items: center;
    gap: 0.35rem;
    padding: 0.22rem 0.55rem;
    border-radius: 999px;
    font-size: 0.8125rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    background: rgba(15, 23, 42, 0.22);
    border: 1px solid rgba(255, 255, 255, 0.16);
}

.site-more-market-title {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    font-size: 1rem;
    font-weight: 800;
    line-height: 1.2;
}

.site-more-market-title i {
    width: 2.2rem;
    height: 2.2rem;
    border-radius: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(15, 23, 42, 0.2);
    font-size: 0.95rem;
}

.site-more-market-description {
    color: rgba(255, 255, 255, 0.86);
    font-size: 0.8125rem;
    line-height: 1.35;
}

.site-more-market-cta {
    margin-top: auto;
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    font-size: 0.8125rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.site-more-card-compact {
    min-height: 76px;
    justify-content: center;
}

/* Per-section accent system. `:where()` keeps outer scope at specificity 0
   so the inner element class still has 0,1,0 — equal to the modifier
   classes below (.site-more-action-attention/-success/-gold). Modifiers
   come after these rules in source order, so per-card state colors keep
   winning over the section's default accent. */

/* Account — ember */
.site-drawer-section-title.is-section-account { color: #ff9d5c; }
:where(.site-more-actions.is-section-account) .site-more-action {
    border-color: rgba(255, 140, 0, 0.24);
    background:
        linear-gradient(180deg, rgba(60, 22, 6, 0.55), rgba(15, 23, 42, 0.78)),
        radial-gradient(circle at top left, rgba(255, 140, 0, 0.14), transparent 45%);
}
:where(.site-more-actions.is-section-account) .site-more-action:hover,
:where(.site-more-actions.is-section-account) .site-more-action:focus {
    border-color: rgba(255, 140, 0, 0.5);
}
:where(.site-more-actions.is-section-account) .site-more-action-icon {
    background: rgba(255, 140, 0, 0.18);
    color: #ffb787;
}

/* Markets — keep card-level gold/violet, just tint the title */
.site-drawer-section-title.is-section-markets { color: #fcd34d; }

/* Command Center — amber */
.site-drawer-section-title.is-section-commands { color: #fbbf24; }
:where(.site-more-command-grid.is-section-commands) .site-more-command-btn {
    border-color: rgba(251, 191, 36, 0.24);
}
:where(.site-more-command-grid.is-section-commands) .site-more-command-btn:hover,
:where(.site-more-command-grid.is-section-commands) .site-more-command-btn:focus {
    border-color: rgba(251, 191, 36, 0.5);
}
:where(.site-more-command-grid.is-section-commands) .command-btn-icon {
    color: #fbbf24;
}

/* Trade & Play — violet */
.site-drawer-section-title.is-section-trade { color: #c4b5fd; }
:where(.site-more-grid.is-section-trade) .site-more-card {
    border-color: rgba(167, 139, 250, 0.24);
    background:
        linear-gradient(180deg, rgba(46, 16, 101, 0.42), rgba(15, 23, 42, 0.78)),
        radial-gradient(circle at top left, rgba(167, 139, 250, 0.16), transparent 42%);
}
:where(.site-more-grid.is-section-trade) .site-more-card:hover,
:where(.site-more-grid.is-section-trade) .site-more-card:focus {
    border-color: rgba(167, 139, 250, 0.5);
}
:where(.site-more-grid.is-section-trade) .site-more-card i { color: #c4b5fd; }

/* Profile — emerald */
.site-drawer-section-title.is-section-profile { color: #6ee7b7; }
:where(.site-more-grid.is-section-profile) .site-more-card {
    border-color: rgba(16, 185, 129, 0.26);
    background:
        linear-gradient(180deg, rgba(6, 78, 59, 0.42), rgba(15, 23, 42, 0.78)),
        radial-gradient(circle at top left, rgba(16, 185, 129, 0.16), transparent 42%);
}
:where(.site-more-grid.is-section-profile) .site-more-card:hover,
:where(.site-more-grid.is-section-profile) .site-more-card:focus {
    border-color: rgba(16, 185, 129, 0.5);
}
:where(.site-more-grid.is-section-profile) .site-more-card i { color: #6ee7b7; }

/* Community — rose */
.site-drawer-section-title.is-section-community { color: #fda4af; }
:where(.site-more-grid.is-section-community) .site-more-card {
    border-color: rgba(244, 114, 182, 0.26);
    background:
        linear-gradient(180deg, rgba(76, 5, 25, 0.42), rgba(15, 23, 42, 0.78)),
        radial-gradient(circle at top left, rgba(244, 114, 182, 0.18), transparent 42%);
}
:where(.site-more-grid.is-section-community) .site-more-card:hover,
:where(.site-more-grid.is-section-community) .site-more-card:focus {
    border-color: rgba(244, 114, 182, 0.5);
}
:where(.site-more-grid.is-section-community) .site-more-card i { color: #fda4af; }

/* Quick Links (logged-out) — gold */
.site-drawer-section-title.is-section-quick { color: #ffd700; }
:where(.site-more-actions.is-section-quick) .site-more-action {
    border-color: rgba(255, 215, 0, 0.22);
    background:
        linear-gradient(180deg, rgba(66, 32, 6, 0.42), rgba(15, 23, 42, 0.78)),
        radial-gradient(circle at top left, rgba(255, 140, 0, 0.14), transparent 45%);
}
:where(.site-more-actions.is-section-quick) .site-more-action:hover,
:where(.site-more-actions.is-section-quick) .site-more-action:focus {
    border-color: rgba(255, 215, 0, 0.5);
}
:where(.site-more-actions.is-section-quick) .site-more-action-icon {
    background: rgba(255, 140, 0, 0.18);
    color: #ffcf80;
}

/* Explore (logged-out) — share violet with Trade & Play */
.site-drawer-section-title.is-section-explore { color: #c4b5fd; }
:where(.site-more-grid.is-section-explore) .site-more-card {
    border-color: rgba(167, 139, 250, 0.24);
    background:
        linear-gradient(180deg, rgba(46, 16, 101, 0.42), rgba(15, 23, 42, 0.78)),
        radial-gradient(circle at top left, rgba(167, 139, 250, 0.16), transparent 42%);
}
:where(.site-more-grid.is-section-explore) .site-more-card:hover,
:where(.site-more-grid.is-section-explore) .site-more-card:focus {
    border-color: rgba(167, 139, 250, 0.5);
}
:where(.site-more-grid.is-section-explore) .site-more-card i { color: #c4b5fd; }

.site-more-action-attention {
    border-color: rgba(251, 191, 36, 0.36);
    background: linear-gradient(180deg, rgba(66, 32, 6, 0.62), rgba(15, 23, 42, 0.8));
}

.site-more-action-attention .site-more-action-icon {
    background: rgba(245, 158, 11, 0.18);
    color: #fbbf24;
}

.site-more-action-success {
    border-color: rgba(74, 222, 128, 0.28);
}

.site-more-action-success .site-more-action-icon {
    background: rgba(34, 197, 94, 0.16);
    color: #4ade80;
}

.site-more-action-gold {
    border-color: rgba(255, 215, 0, 0.32);
    background: linear-gradient(180deg, rgba(80, 60, 8, 0.55), rgba(15, 23, 42, 0.8));
}

.site-more-action-gold:hover,
.site-more-action-gold:focus {
    border-color: rgba(255, 215, 0, 0.5);
    background: linear-gradient(180deg, rgba(90, 68, 10, 0.7), rgba(30, 41, 59, 0.95));
}

.site-more-action-gold .site-more-action-icon {
    background: rgba(255, 215, 0, 0.16);
    color: #ffd700;
}

.site-more-action-gold .site-more-action-title {
    color: #ffd700;
}

.site-bottom-nav-badge.is-hidden {
    display: none;
}

.site-bottom-nav-avatar {
    width: 1.6rem;
    height: 1.6rem;
    border-radius: 999px;
    object-fit: cover;
    border: 2px solid rgba(255, 215, 0, 0.45);
}

.site-nav-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(2, 6, 23, 0.72);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.2s ease;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.site-nav-backdrop.visible {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.site-nav-drawer {
    position: fixed;
    left: 50%;
    top: calc(var(--site-shell-top) + 0.55rem);
    bottom: calc(env(safe-area-inset-bottom, 0px) + var(--site-shell-bottom) - 0.75rem);
    transform: translate(-50%, calc(100% + 2rem));
    width: min(760px, calc(100vw - 1rem));
    max-height: min(calc(100dvh - var(--site-shell-top) - var(--site-shell-bottom) - 1.3rem), 760px);
    overflow-y: auto;
    border-radius: 24px;
    background:
        radial-gradient(circle at top right, rgba(255, 140, 0, 0.16), transparent 30%),
        linear-gradient(180deg, rgba(10, 16, 31, 0.98), rgba(8, 13, 26, 0.97));
    border: 1px solid rgba(148, 163, 184, 0.16);
    box-shadow: 0 35px 70px rgba(0, 0, 0, 0.5);
    transition: transform 0.24s ease;
    z-index: var(--site-drawer-z);
    padding-bottom: 1.2rem;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
}

.site-nav-drawer.open {
    transform: translate(-50%, 0);
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

/* ── Overlay tier: promote the WRAPPER, not the drawer ──────────────────────
 * `.site-bottom-nav` is `position: fixed; z-index: var(--site-nav-z)` (1080),
 * which makes it a STACKING CONTEXT. Everything inside it — the nav bar shell,
 * `.site-nav-backdrop` (z-index: auto) and `.site-nav-drawer`
 * (z-index: var(--site-drawer-z), 1088) — is therefore ranked against the rest
 * of the page at the WRAPPER's 1080, never at its own value. `--site-drawer-z`
 * only orders the drawer above the backdrop *within* this wrapper; it cannot
 * rank the drawer against page content.
 *
 * Consequence: any page chrome that legitimately sits above the fixed nav BAR
 * (e.g. the wiki's `--intel-nav-z` 1085 / `--intel-search-z` 1084 tab strip and
 * search bar, which need to out-rank the bar so long dropdowns are not clipped
 * by it) also out-ranked the OPEN drawer and its scrim — so it painted over the
 * menu and stayed un-dimmed and clickable.
 *
 * Fix the cause, not the symptom: while a drawer is open the wrapper *is* the
 * overlay layer, so it must carry the overlay tier itself. One state-scoped
 * rule using the existing token — no renumbering, and every layer below the
 * overlay tier is covered by construction rather than by out-bidding it. With
 * the drawer closed the wrapper returns to --site-nav-z, so sticky page chrome
 * behaves exactly as before.
 *
 * ── 2026-07-28: promote to the OVERLAY rung, not the drawer's ──────────────
 * The first cut of this rule used --site-drawer-z (1088), which fixed the wiki
 * chrome (1084/1085) but left the fixed TOP chrome painting over the open
 * menu on every page: #siteTickerShell (--site-ticker-z, 1100) and
 * #siteDonorStrip (--site-donor-z, 1098) are siblings of this wrapper in the
 * root stacking context and simply out-ranked 1088.
 *
 * The real cause was not those two numbers — they are legitimately above the
 * nav so the fixed top bars clear the nav bar and sticky page chrome at rest.
 * It was that --site-drawer-z is an INTRA-wrapper ordering value (drawer over
 * scrim) that was being reused as a page-level overlay tier it was never
 * ordered against. So the ladder now has a real top rung: --site-overlay-z
 * sits above every chrome rung by construction, and the scrim covers all of
 * them because it cannot be out-bid — not because it happens to win a race.
 * Any future fixed shell chrome only has to take a rung below the overlay.
 * Still state-scoped: with the drawer closed this selector does not match, so
 * the wrapper stays at --site-nav-z and the top bars keep their z-order. */
body.site-drawer-active .site-bottom-nav {
    z-index: var(--site-overlay-z);
}

body.site-drawer-active .site-bottom-nav-shell {
    opacity: 0.28;
    transform: translateY(0.35rem) scale(0.99);
    pointer-events: none;
}

.site-drawer-handle {
    display: flex;
    justify-content: center;
    padding-top: 0.7rem;
}

.site-drawer-handle-bar {
    width: 3rem;
    height: 0.28rem;
    border-radius: 999px;
    background: rgba(148, 163, 184, 0.38);
}

.site-drawer-hero {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 1.1rem 0.85rem;
}

.site-drawer-hero-compact {
    align-items: center;
}

.site-drawer-kicker {
    font-size: 0.8125rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: rgba(255, 207, 128, 0.84);
    margin-bottom: 0.25rem;
}

.site-drawer-title {
    margin: 0;
    font-size: 1.5rem;
    color: #f8fafc;
}

.site-drawer-subtitle {
    margin: 0.25rem 0 0;
    color: rgba(226, 232, 240, 0.66);
    font-size: 0.88rem;
}

.site-drawer-stat {
    flex-shrink: 0;
    padding: 0.8rem 0.95rem;
    border-radius: 18px;
    background: rgba(15, 23, 42, 0.8);
    border: 1px solid rgba(148, 163, 184, 0.14);
    text-align: right;
}

.site-drawer-stat-value {
    display: block;
    font-family: 'Rajdhani', sans-serif;
    font-size: 1.45rem;
    font-weight: 700;
    color: #ffffff;
    line-height: 1;
}

.site-drawer-stat-label {
    color: rgba(240, 233, 216, 0.72);
    font-size: 0.8125rem;
}

/* ── More menu balance strip — DC / PC / RC, kept live by updateBalanceTargets ── */
.site-more-balances {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.5rem;
    padding: 0 1.1rem 0.65rem;
    margin-top: -0.4rem;
}

.site-more-balance-card {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 0.18rem;
    min-width: 0;
    padding: 0.55rem 0.7rem;
    border-radius: 14px;
    border: 1px solid rgba(148, 163, 184, 0.16);
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.78), rgba(30, 41, 59, 0.55));
    color: #f8fafc;
    text-decoration: none;
    transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease;
    overflow: hidden;
}

.site-more-balance-card:hover {
    transform: translateY(-1px);
    border-color: rgba(255, 215, 0, 0.32);
}

.site-more-balance-card.is-dream { border-color: rgba(250, 204, 21, 0.22); }
.site-more-balance-card.is-dream:hover { border-color: rgba(250, 204, 21, 0.45); }
.site-more-balance-card.is-premium { border-color: rgba(192, 132, 252, 0.22); }
.site-more-balance-card.is-premium:hover { border-color: rgba(192, 132, 252, 0.45); }
.site-more-balance-card.is-raid { border-color: rgba(255, 138, 80, 0.22); }
.site-more-balance-card.is-raid:hover { border-color: rgba(255, 138, 80, 0.45); }

.site-more-balance-label {
    font-size: 0.8125rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: rgba(226, 232, 240, 0.6);
    line-height: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    width: 100%;
}

.site-more-balance-card.is-dream .site-more-balance-label { color: rgba(254, 243, 199, 0.7); }
.site-more-balance-card.is-premium .site-more-balance-label { color: rgba(233, 213, 255, 0.7); }
.site-more-balance-card.is-raid .site-more-balance-label { color: rgba(255, 209, 181, 0.75); }

.site-more-balance-value {
    font-family: 'Rajdhani', sans-serif;
    font-size: 1.1rem;
    font-weight: 700;
    color: #fff;
    line-height: 1.05;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    width: 100%;
}

@media (max-width: 420px) {
    .site-more-balances { gap: 0.35rem; padding-inline: 0.85rem; }
    .site-more-balance-card { padding: 0.45rem 0.55rem; }
    .site-more-balance-value { font-size: 0.98rem; }
    .site-more-balance-label { font-size: 0.8125rem; }
}

.site-drawer-section-title {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 1.1rem 1.1rem 0.55rem;
    margin-top: 0.35rem;
    color: #f1f5f9;
    font-size: 0.95rem;
    font-weight: 800;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.site-drawer-section-title::before {
    content: "";
    display: inline-block;
    width: 4px;
    height: 1.05rem;
    background: currentColor;
    opacity: 0.85;
    flex-shrink: 0;
}

.site-drawer-section-title::after {
    content: "";
    flex: 1;
    height: 1px;
    background: linear-gradient(to right, currentColor, transparent);
    opacity: 0.22;
}

.site-server-status-grid,
.site-online-player-list {
    padding: 0 1.1rem;
}

.site-server-card,
.site-online-player {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.85rem 0.95rem;
    border-radius: 16px;
    background: rgba(15, 23, 42, 0.72);
    border: 1px solid rgba(148, 163, 184, 0.12);
    margin-bottom: 0.6rem;
    color: inherit;
    text-decoration: none;
    transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

.site-online-player:hover {
    transform: translateY(-1px);
    border-color: rgba(255, 215, 0, 0.28);
    background: rgba(15, 23, 42, 0.84);
}

.site-server-card-name,
.site-online-player-name {
    color: #f8fafc;
    font-weight: 600;
}

/* TYPE FLOOR, LATENT. Was 0.8rem = 12.80px against the 16px root — under the
   13px floor (`compact-view.css:8`, exceptions list EMPTY) at 360/390/414 AND
   1440, because nothing overrides it: this pair is declared in exactly one
   place across all 14 sheets base.html links, and no media query touches it.
   0.8125rem = 13.0px.

   LATENT, NOT LIVE, and the reason is worth recording: NEITHER selector is on
   screen today. `.site-server-card-meta` is emitted only by
   `base.html::renderRaidBossStatus()` (base.html:2583), which returns at
   `if (!container)` because `#raidBossDropdown` has never existed in any
   commit; `.site-online-player-meta` is emitted by nothing at all. The live
   online drawer renders `.sog-*` markup (base.html:2113-2118) instead. So this
   is corrected against the day the drawer is actually mounted rather than
   measured in a browser — there is nothing to point a browser at. */
.site-server-card-meta,
.site-online-player-meta {
    color: rgba(240, 233, 216, 0.66);
    font-size: 0.8125rem;
}

.site-server-card-count {
    color: #4ade80;
    font-weight: 700;
}

.site-server-card-count.offline {
    color: rgba(148, 163, 184, 0.55);
}

.site-drawer-divider {
    height: 1px;
    margin: 0.65rem 1.1rem;
    background: rgba(148, 163, 184, 0.12);
}

.site-drawer-empty {
    padding: 1rem;
    border-radius: 16px;
    color: rgba(226, 232, 240, 0.62);
    background: rgba(15, 23, 42, 0.52);
}

.footer {
    margin-bottom: calc(var(--site-shell-bottom) + 1rem);
}

@media (max-width: 768px) {
    :root {
        --site-shell-top: 48px;
        --site-ticker-height: 48px;
        --site-shell-bottom: 96px;
    }

    .ticker-brand-link span {
        display: none;
    }

    .site-ticker-shell {
        grid-template-columns: auto auto 1fr;
        gap: 0.4rem;
        padding-inline: 0.7rem;
    }

    .site-ticker-constants {
        gap: 0.3rem;
        padding-left: 0.4rem;
    }

    .ticker-const-pill span {
        display: none;
    }

    .ticker-const-boost span {
        display: inline;
        /* Shorter label on tablet/large-phone widths so the boost pill can't
           crowd the marquee viewport in the auto/auto/1fr ticker grid. */
        max-width: 12ch;
    }

    .ticker-const-pill {
        padding: 0.25rem 0.4rem;
        min-width: 28px;
        min-height: 28px;
        justify-content: center;
    }

    .ticker-const-boost {
        min-width: 0;
        padding: 0.25rem 0.5rem;
        font-size: 0.8125rem;
        justify-content: flex-start;
    }

    .site-bottom-nav-shell,
    .site-nav-drawer {
        width: calc(100vw - 0.8rem);
    }

    .site-bottom-nav-bar {
        gap: 0.12rem;
        padding: 0.22rem;
    }

    .site-bottom-nav-item {
        min-height: 38px;
        font-size: 0.8125rem;
        gap: 0.08rem;
        padding: 0.08rem 0.03rem;
    }

    .site-bottom-nav-item i {
        font-size: 0.82rem;
    }

    .site-bottom-nav-item span {
        font-size: 0.8125rem;
    }

    .site-bottom-nav-badge {
        top: 0.28rem;
        right: 0.28rem;
    }

    /* Compact status row for tablet */
    .site-status-row {
        gap: 0.25rem;
        padding: 0.18rem 0.3rem;
    }
    .sr-chip {
        padding: 0.16rem 0.32rem;
        font-size: 0.8125rem;
        gap: 0.18rem;
    }
    .sr-coin-icon {
        width: 1.25rem;
        height: 1.25rem;
        flex-basis: 1.25rem;
    }
    /* Type floor, tablet. Was 0.78rem/0.36rem = 12.48px/5.76px — the balance
       figure itself was under the 13px floor and its label was unreadable.
       0.875rem = 14px keeps the value above both the floor and the label, so
       the caption/figure hierarchy survives the correction. */
    .sr-value { font-size: 0.875rem; }
    .sr-balance-label { font-size: 0.8125rem; }
    .sr-ga-copy { flex-direction: row; align-items: center; gap: 0.25rem; }

    .site-nav-drawer {
        bottom: calc(var(--site-safe-area-bottom) + var(--site-shell-bottom) - 1rem);
        max-height: min(calc(100dvh - var(--site-shell-top) - var(--site-shell-bottom) - 1.6rem), 680px);
    }

    .site-drawer-hero {
        padding-inline: 0.9rem;
    }

    .site-server-status-grid,
    .site-online-player-list {
        padding-inline: 0.9rem;
    }

    .site-more-actions,
    .site-more-grid,
    .site-more-command-grid {
        padding-inline: 0.9rem;
    }
}

@media (max-width: 560px) {
    :root { --site-shell-bottom: 120px; }

    /* Status row: allow wrapping so chips flow to second line instead of shrinking */
    .site-status-row {
        flex-wrap: wrap;
        justify-content: center;
        gap: 0.16rem;
        padding: 0.2rem 0.3rem;
        border-radius: 16px;
        width: calc(100vw - 1.2rem);
        overflow-x: visible;
    }
    .sr-chip { padding: 0.16rem 0.32rem; font-size: 0.8125rem; gap: 0.18rem; }
    .sr-coin-icon { width: 1.2rem; height: 1.2rem; flex-basis: 1.2rem; }
    /* Type floor, phone. Same correction as the tablet block above — this row
       already `flex-wrap: wrap`s, so the extra height is absorbed by the wrap
       rather than by shrinking the balance below readability. */
    .sr-value { font-size: 0.875rem; }
    .sr-balance-label { font-size: 0.8125rem; }
    .sr-reminder-chip span { font-size: 0.8125rem; }
    .sr-reminder-chip i { font-size: 0.8125rem; }

    /* Mobile giveaway pill: compact pill that flows inline with the
       balance/daily chips instead of dominating its own full-width row.
       Hide the large prize label and big timer; keep just the gift icon,
       a tight countdown, and the ENTER action so the row stays single-
       line and the icon nav bar below has room to breathe. */
    .sr-giveaway-chip {
        flex: 0 1 auto;
        justify-content: center;
        padding: 0;
        max-width: 100%;
    }
    .sr-giveaway-btn {
        width: auto;
        justify-content: center;
        padding: 0.16rem 0.32rem;
        gap: 0.18rem;
    }
    .sr-ga-copy { flex-direction: row; align-items: center; gap: 0.22rem; }
    .sr-ga-icon { font-size: 0.8125rem; }
    /* Hide the verbose "1,234 DC GIVEAWAY" label on phones — the gift icon
       and ENTER action already communicate intent. JS callers that read
       textContent off this span still work because the node remains in
       the DOM (display:none, not removed). */
    .sr-ga-label { display: none; }
    .sr-ga-timer {
        font-size: 0.8125rem;
        font-weight: 700;
        letter-spacing: 0.01em;
    }
    /* Hide the entries badge on mobile too — it only adds noise next to
       the timer and we need the horizontal real estate. */
    .sr-ga-entries { display: none; }
    .sr-ga-action {
        font-size: 0.8125rem;
        padding: 0.14rem 0.34rem;
        letter-spacing: 0.04em;
    }
    /* On wrap-friendly viewports the divider rule above stripped the
       left padding too, so the daily-chip icon hugged the chip's left
       edge and looked clipped (issue #293). Drop only the divider —
       keep the chip's natural padding so the icon stays inset. */
    .sr-balance-chip + .sr-reminder-chip,
    .sr-balance-chip + .sr-giveaway-chip { margin-left: 0; border-left: none; }

    .site-drawer-hero {
        flex-direction: column;
        align-items: stretch;
    }

    .site-drawer-stat {
        text-align: left;
    }

    .site-bottom-nav-bar {
        gap: 0.1rem;
        padding: 0.16rem;
        /* The control row remains centred as a row, even once it overflows.
           Each stop snaps to the actual visual centre rather than leaving the
           selected navigation target stranded against a screen edge. */
        justify-content: center;
        scroll-padding-inline: calc((100% - 58px) / 2);
    }

    /* Fixed-width tap cells + horizontal scroll: with 9–10 always-on items
       the row is wider than a 360–430px phone, so instead of squeezing every
       cell down to ~36px (below the 44px touch target) we give each a solid
       min tap size and let the bar scroll. Labels stay visible. */
    .site-bottom-nav-item {
        min-height: 46px;
        gap: 0.08rem;
        padding: 0.16rem 0.25rem;
        flex: 0 0 auto;
        min-width: 58px;
        letter-spacing: 0.01em;
        scroll-snap-align: center;
    }

    /* More owns the signed-in player card, account links, claims and logout.
       Keeping it as the ninth off-screen cell made the only account menu a
       horizontal-scroll scavenger hunt.  Put that gateway first on phones;
       all primary destinations remain in the same scrollable row. */
    #siteMoreNavBtn { order: -1; }

    .site-bottom-nav-item span {
        font-size: 0.8125rem;
        max-width: 100%;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .site-bottom-nav-item i {
        font-size: 0.92rem;
    }

    /* Compact Player Market cell — the "Item/Pal" overline + "Player Market"
       label is too tall for the cramped phone nav row, especially when the
       Rewards/Vote buttons are also visible. Drop the overline and shorten
       the label so the cell renders as one icon + one short word, matching
       the other six items. The "Player Market" label still doesn't fit
       cleanly so we hide it and surface the shorter "Items/Pals" span
       instead (issue #293). */
    .site-bottom-nav-item-market-label .site-bottom-nav-overline {
        display: none;
    }
    .site-bottom-nav-item-market-label .site-bottom-nav-label-desktop {
        display: none;
    }
    .site-bottom-nav-item-market-label .site-bottom-nav-label-mobile {
        display: inline;
    }
    .site-bottom-nav-item-market-label.site-bottom-nav-item span:not(.site-bottom-nav-overline) {
        font-size: 0.8125rem;
    }

    /* Online nav cell shows a player count in the meta slot — clamp to
       small text so the cell width stays consistent with the others. */
    #siteOnlineNavCount { font-size: 0.8125rem; }
    .site-bottom-nav-meta { font-size: 0.8125rem; }

    .site-balance-value {
        font-size: 0.72rem;
    }

    .site-balance-cta,
    .site-balance-helper {
        font-size: 0.36rem;
    }

    .site-more-actions,
    .site-more-grid,
    .site-more-command-grid {
        grid-template-columns: 1fr;
    }

    /* Ultra-small: hide boss/story/boost/event pills, keep Discord icon only */
    .ticker-const-boss,
    .ticker-const-story,
    .ticker-const-boost,
    .ticker-const-event {
        display: none !important;
    }
}

/* Very narrow phones (≤390px iPhone SE, etc.). The nav bar is a horizontal
   scroller (see .site-bottom-nav-bar) so we DON'T crush cells to fit — every
   item keeps a real ≥44px tap target and a small legible label, and the row
   scrolls to reach off-screen items. */
@media (max-width: 390px) {
    .site-bottom-nav-bar { gap: 0.08rem; padding: 0.12rem; }
    .site-bottom-nav-item { min-height: 46px; min-width: 54px; padding: 0.14rem 0.2rem; letter-spacing: 0; flex: 0 0 auto; }
    /* Keep the label (the scroll approach leaves room) — 9 similar FontAwesome
       icons are hard to tell apart without text. */
    .site-bottom-nav-item span { display: block; font-size: 0.8125rem; }
    .site-bottom-nav-item i { font-size: 1rem; }
    /* Preserve the Player-Market cell's compact treatment: short mobile label
       only, no desktop label / overline. (These re-assert the ≤560px rules so
       the generic span:display:block above doesn't un-hide them.) */
    .site-bottom-nav-item-market-label .site-bottom-nav-label-desktop { display: none; }
    .site-bottom-nav-item-market-label .site-bottom-nav-overline { display: none; }
    .site-bottom-nav-badge {
        top: 0.18rem;
        right: 0.18rem;
        min-width: 1.15rem;
        height: 1.15rem;
        font-size: 0.8125rem;
    }
    .sr-giveaway-btn { padding: 0.12rem 0.28rem; gap: 0.16rem; }
    .sr-ga-action { font-size: 0.8125rem; padding: 0.12rem 0.28rem; }
    .sr-ga-timer { font-size: 0.8125rem; }
}

/* ═══ RECOVERED 2026-07-23 (stash 8e828aee): casino quick-pick nav modal styles.
   The modal HTML (#casinoNavModalOverlay) + its JS (openCasinoNavModal) survived
   the 07-22 checkout -f but these styles + the modal markup were reverted,
   leaving the bottom-nav Casino tap firing at a non-existent/unstyled modal. ═══ */
/* ═══════════════════════════════════════════════════════════════════════
   Casino Quick-Pick Modal
   Opened when the Casino bottom-nav item (or the More-drawer Casino card) is
   tapped. Compact, thumb-friendly grid of game tiles. Dark by default to match
   the rest of the shell, with a prefers-color-scheme:light adaptation so it
   stays legible for viewers in light mode.
   ═══════════════════════════════════════════════════════════════════════ */
.casino-nav-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 10002; /* above bottom nav (~1088) and vote modal siblings */
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    background: rgba(0, 0, 0, 0.72);
    -webkit-backdrop-filter: blur(4px);
    backdrop-filter: blur(4px);
    overscroll-behavior: contain;
}
.casino-nav-modal-overlay.is-hidden { display: none !important; }
body.casino-nav-modal-open { overflow: hidden; }

.casino-nav-modal {
    position: relative;
    width: min(440px, calc(100vw - 24px));
    max-height: min(84vh, 620px);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 1.35rem 1.15rem 1.15rem;
    border-radius: 18px;
    border: 1px solid rgba(155, 89, 182, 0.45);
    background: linear-gradient(160deg, #12071f, #1a0a2c 55%, #0b0514);
    box-shadow: 0 0 40px rgba(155, 89, 182, 0.18), 0 16px 48px rgba(0, 0, 0, 0.5);
    color: #f3ecff;
    animation: casinoNavModalIn 0.18s ease-out;
}
@keyframes casinoNavModalIn {
    from { opacity: 0; transform: translateY(10px) scale(0.98); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}

.casino-nav-modal-close {
    position: absolute;
    top: 8px;
    right: 12px;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    color: #b9a7d6;
    font-size: 1.6rem;
    line-height: 1;
    cursor: pointer;
    border-radius: 10px;
}
.casino-nav-modal-close:hover,
.casino-nav-modal-close:focus-visible { color: #fff; background: rgba(255, 255, 255, 0.08); outline: none; }

.casino-nav-modal-header { text-align: center; margin-bottom: 1rem; padding: 0 1.4rem; }
.casino-nav-modal-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 46px;
    height: 46px;
    border-radius: 14px;
    font-size: 1.35rem;
    color: #f7c86a;
    background: rgba(247, 200, 106, 0.12);
    border: 1px solid rgba(247, 200, 106, 0.28);
}
.casino-nav-modal-header h3 {
    margin: 0.55rem 0 0.15rem;
    font-size: 1.12rem;
    font-weight: 800;
    color: #fff;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.casino-nav-modal-sub { margin: 0; font-size: 0.8125rem; color: #b6a9cf; }

.casino-nav-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(92px, 1fr));
    gap: 0.6rem;
    margin-bottom: 1rem;
}
.casino-nav-tile {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    min-width: 0;
    min-height: 78px;
    padding: 0.7rem 0.4rem;
    border-radius: 14px;
    text-decoration: none;
    color: #ece3ff;
    background: rgba(255, 255, 255, 0.045);
    border: 1px solid rgba(155, 89, 182, 0.22);
    transition: transform 0.14s ease, border-color 0.14s ease, background 0.14s ease;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
    overflow: hidden;
}
.casino-nav-tile i { font-size: 1.35rem; color: #c8a6ff; flex-shrink: 0; }
.casino-nav-tile span {
    font-size: 0.8125rem;
    font-weight: 600;
    text-align: center;
    line-height: 1.15;
    max-width: 100%;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.casino-nav-tile:hover,
.casino-nav-tile:focus-visible {
    transform: translateY(-2px);
    border-color: rgba(155, 89, 182, 0.6);
    background: rgba(155, 89, 182, 0.12);
    outline: none;
}
.casino-nav-tile:active { transform: translateY(0); }
.casino-nav-tile.is-gacha {
    background: linear-gradient(135deg, rgba(247, 200, 106, 0.12), rgba(255, 255, 255, 0.03));
    border-color: rgba(247, 200, 106, 0.32);
}
.casino-nav-tile.is-gacha i { color: #f7c86a; }

.casino-nav-modal-all {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.6rem 0.9rem;
    border-radius: 12px;
    font-size: 0.82rem;
    font-weight: 700;
    text-decoration: none;
    color: #c8b6e8;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.1);
    min-width: 0;
}
.casino-nav-modal-all i { flex-shrink: 0; }
.casino-nav-modal-all:hover,
.casino-nav-modal-all:focus-visible { color: #fff; border-color: rgba(155, 89, 182, 0.45); outline: none; }

@media (max-width: 400px) {
    .casino-nav-grid { grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 0.5rem; }
    .casino-nav-tile { min-height: 72px; }
    .casino-nav-tile i { font-size: 1.2rem; }
    .casino-nav-tile span { font-size: 0.8125rem; }
}

/* Light-mode adaptation for viewers whose OS prefers a light theme. */
@media (prefers-color-scheme: light) {
    .casino-nav-modal-overlay { background: rgba(20, 12, 32, 0.5); }
    .casino-nav-modal {
        background: linear-gradient(160deg, #ffffff, #f6f1fb 60%, #efe8f7);
        border-color: rgba(123, 63, 173, 0.28);
        color: #241832;
        box-shadow: 0 0 32px rgba(123, 63, 173, 0.12), 0 16px 48px rgba(0, 0, 0, 0.22);
    }
    .casino-nav-modal-close { color: #6b5a86; }
    .casino-nav-modal-close:hover,
    .casino-nav-modal-close:focus-visible { color: #1c1130; background: rgba(0, 0, 0, 0.06); }
    .casino-nav-modal-header h3 { color: #1c1130; }
    .casino-nav-modal-sub { color: #6b5a86; }
    .casino-nav-tile {
        color: #2a1c3d;
        background: rgba(123, 63, 173, 0.05);
        border-color: rgba(123, 63, 173, 0.2);
    }
    .casino-nav-tile i { color: #7b3fad; }
    .casino-nav-tile:hover,
    .casino-nav-tile:focus-visible { background: rgba(123, 63, 173, 0.11); border-color: rgba(123, 63, 173, 0.5); }
    .casino-nav-tile.is-gacha {
        background: linear-gradient(135deg, rgba(214, 158, 46, 0.14), rgba(123, 63, 173, 0.04));
        border-color: rgba(214, 158, 46, 0.4);
    }
    .casino-nav-tile.is-gacha i { color: #c8922a; }
    .casino-nav-modal-all {
        color: #5a4778;
        background: rgba(123, 63, 173, 0.05);
        border-color: rgba(123, 63, 173, 0.18);
    }
    .casino-nav-modal-all:hover,
    .casino-nav-modal-all:focus-visible { color: #1c1130; border-color: rgba(123, 63, 173, 0.45); }
}

@media (prefers-reduced-motion: reduce) {
    .casino-nav-modal { animation: none; }
    .casino-nav-tile { transition: none; }
}
