/* ============================================================================
   Last Stand — UI overhaul (2026)
   ----------------------------------------------------------------------------
   Loaded AFTER the inline <style> in index.html, so everything here overrides
   the original rules. Kept in one file (rather than editing the 4,900-line
   inline sheet) so the redesign is reviewable and revertible on its own.

   Design language: a field-console HUD. Notched panel corners, a warm ember
   key against cold steel, tabular numerals for anything that counts, and
   layered rim/glow shadows instead of flat fills.
   ========================================================================== */

:root {
    /* Surfaces — layered, translucent, blurred over the live 3D scene. */
    --s-0:        rgba(8, 10, 14, 0.82);
    --s-1:        rgba(14, 17, 23, 0.88);
    --s-2:        rgba(22, 26, 34, 0.92);
    --s-raise:    rgba(32, 38, 48, 0.94);

    /* Lines */
    --line:       rgba(232, 114, 10, 0.16);
    --line-hi:    rgba(255, 176, 32, 0.42);
    --line-cold:  rgba(150, 180, 220, 0.14);

    /* Accents (kept from the original palette so the 3D scene still matches) */
    --acc:        #ff8c2a;
    --acc-hot:    #ff3d4d;
    --acc-warm:   #ffb020;
    --acc-cold:   #6ec3ff;
    --ok:         #4ade80;

    /* Text */
    --t-hi:       #f3ede4;
    --t:          #c9c1b4;
    --t-dim:      #8a8075;
    --t-faint:    #554e46;

    /* Geometry */
    --notch:      10px;   /* corner cut size for panels */
    --notch-sm:   6px;
    --r:          3px;

    /* Motion */
    --fast:       120ms cubic-bezier(0.4, 0, 0.2, 1);
    --med:        260ms cubic-bezier(0.16, 1, 0.3, 1);

    /* Shadows */
    --lift:       0 18px 48px -12px rgba(0, 0, 0, 0.85);
    --rim:        inset 0 1px 0 rgba(255, 255, 255, 0.055);
}

/* Notched corners — the signature shape, used on every panel and button. */
.ls-notch   { clip-path: polygon(var(--notch) 0, 100% 0, 100% calc(100% - var(--notch)), calc(100% - var(--notch)) 100%, 0 100%, 0 var(--notch)); }

/* ── Global ─────────────────────────────────────────────────────────────── */

*::selection { background: rgba(255, 140, 42, 0.3); color: var(--t-hi); }

*::-webkit-scrollbar { width: 9px; height: 9px; }
*::-webkit-scrollbar-track { background: rgba(0, 0, 0, 0.3); }
*::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, rgba(232, 114, 10, 0.45), rgba(232, 114, 10, 0.2));
    border-radius: 99px;
}
*::-webkit-scrollbar-thumb:hover { background: rgba(255, 176, 32, 0.6); }

/* Visible keyboard focus — the original sheet had none anywhere. */
button:focus-visible, input:focus-visible, a:focus-visible, [tabindex]:focus-visible {
    outline: 2px solid var(--acc-warm);
    outline-offset: 2px;
}

/* ── Buttons ────────────────────────────────────────────────────────────── */

.btn-primary,
.btn-secondary,
#create-btn, #debug-range-btn, #debug-heli-btn, #join-toggle-btn,
#quick-join-btn, #launch-btn, #esc-resume-btn, #esc-leave-btn {
    position: relative;
    font-family: 'Rajdhani', sans-serif;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    border-radius: 0;
    clip-path: polygon(var(--notch-sm) 0, 100% 0, 100% calc(100% - var(--notch-sm)),
                       calc(100% - var(--notch-sm)) 100%, 0 100%, 0 var(--notch-sm));
    transition: transform var(--fast), box-shadow var(--med),
                background var(--med), color var(--fast), filter var(--fast);
    will-change: transform;
}

.btn-primary, #create-btn, #launch-btn {
    background: linear-gradient(135deg, #ff5d2a 0%, #ff3d4d 55%, #d81f4a 100%);
    color: #fff;
    border: none;
    box-shadow: 0 0 0 1px rgba(255, 140, 42, 0.5),
                0 10px 26px -8px rgba(255, 61, 77, 0.6),
                var(--rim);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.45);
}
.btn-primary:hover, #create-btn:hover, #launch-btn:hover:not(:disabled) {
    transform: translateY(-1px);
    filter: brightness(1.1);
    box-shadow: 0 0 0 1px rgba(255, 176, 32, 0.75),
                0 16px 34px -8px rgba(255, 61, 77, 0.75),
                0 0 26px rgba(255, 92, 42, 0.4), var(--rim);
}
.btn-primary:active, #create-btn:active, #launch-btn:active { transform: translateY(1px) scale(0.995); }

/* Sheen sweep on the primary action. */
.btn-primary::after, #create-btn::after, #launch-btn::after {
    content: ''; position: absolute; inset: 0;
    background: linear-gradient(105deg, transparent 35%, rgba(255, 255, 255, 0.3) 50%, transparent 65%);
    transform: translateX(-120%);
    transition: transform 620ms cubic-bezier(0.16, 1, 0.3, 1);
    pointer-events: none;
}
.btn-primary:hover::after, #create-btn:hover::after, #launch-btn:hover::after { transform: translateX(120%); }

.btn-secondary,
#debug-range-btn, #debug-heli-btn, #join-toggle-btn, #quick-join-btn,
#esc-resume-btn, #esc-leave-btn {
    background: linear-gradient(180deg, rgba(34, 30, 26, 0.9), rgba(20, 18, 16, 0.9));
    color: var(--t);
    border: 1px solid var(--line);
    box-shadow: var(--rim);
}
.btn-secondary:hover,
#debug-range-btn:hover, #debug-heli-btn:hover, #join-toggle-btn:hover,
#quick-join-btn:hover, #esc-resume-btn:hover, #esc-leave-btn:hover {
    color: var(--t-hi);
    border-color: var(--line-hi);
    background: linear-gradient(180deg, rgba(52, 40, 28, 0.95), rgba(30, 24, 20, 0.95));
    box-shadow: 0 0 22px -4px rgba(255, 140, 42, 0.35), var(--rim);
    transform: translateY(-1px);
}

button:disabled, .btn-primary:disabled, .btn-secondary:disabled {
    opacity: 0.4; cursor: not-allowed; filter: grayscale(0.6); transform: none !important;
}

/* ── Inputs ─────────────────────────────────────────────────────────────── */

.input-field, input[type="text"], input[type="password"], input[type="number"], select {
    background: rgba(6, 8, 11, 0.8) !important;
    border: 1px solid var(--line-cold) !important;
    border-radius: var(--r) !important;
    color: var(--t-hi) !important;
    font-family: 'Rajdhani', sans-serif;
    letter-spacing: 0.04em;
    transition: border-color var(--fast), box-shadow var(--med), background var(--fast);
}
.input-field:focus, input:focus, select:focus {
    border-color: var(--acc) !important;
    background: rgba(10, 13, 18, 0.92) !important;
    box-shadow: 0 0 0 3px rgba(255, 140, 42, 0.14), inset 0 0 18px rgba(255, 140, 42, 0.06) !important;
}
::placeholder { color: var(--t-faint) !important; letter-spacing: 0.1em; text-transform: uppercase; font-size: 0.86em; }

/* ── Panels ─────────────────────────────────────────────────────────────── */

.menu-panel, .glass-panel, .settings-card, .auth-story-card,
#auth-screen .auth-card, #settings-modal .modal-panel, #leaderboard-modal .modal-panel {
    background: linear-gradient(165deg, var(--s-2), var(--s-0)) !important;
    border: 1px solid var(--line) !important;
    border-radius: 0 !important;
    box-shadow: var(--lift), var(--rim), 0 0 0 1px rgba(0, 0, 0, 0.5) !important;
    backdrop-filter: blur(16px) saturate(1.15);
    -webkit-backdrop-filter: blur(16px) saturate(1.15);
    clip-path: polygon(var(--notch) 0, 100% 0, 100% calc(100% - var(--notch)),
                       calc(100% - var(--notch)) 100%, 0 100%, 0 var(--notch));
}

/* A hairline of ember along the top edge of every major panel. */
.menu-panel::before, .glass-panel::before {
    content: ''; position: absolute; left: var(--notch); right: 0; top: 0; height: 1px;
    background: linear-gradient(90deg, transparent, var(--acc-warm) 30%, var(--acc-hot) 70%, transparent);
    opacity: 0.55; pointer-events: none;
}

.panel-kicker, .lobby-section-label, .settings-card-title, .panel-title {
    font-family: 'Rajdhani', sans-serif;
    text-transform: uppercase;
}
.panel-kicker, .lobby-section-label {
    font-size: 10px !important;
    letter-spacing: 0.34em !important;
    color: var(--acc) !important;
    font-weight: 700;
}
.panel-title {
    font-family: 'Cinzel', serif;
    font-weight: 900;
    letter-spacing: 0.02em;
    color: var(--t-hi) !important;
}

/* ── Sidebar navigation ─────────────────────────────────────────────────── */

.nav-item {
    position: relative;
    transition: background var(--fast), color var(--fast);
    border-radius: 0;
}
.nav-item::before {
    content: ''; position: absolute; left: 0; top: 12%; bottom: 12%; width: 2px;
    background: var(--acc); transform: scaleY(0); transform-origin: center;
    transition: transform var(--med); box-shadow: 0 0 10px var(--acc);
}
.nav-item:hover { background: rgba(255, 140, 42, 0.07); }
.nav-item:hover::before, .nav-item.active::before { transform: scaleY(1); }
.nav-item.active { background: rgba(255, 140, 42, 0.11); }
.nav-item.active .nav-icon, .nav-item.active .nav-label { color: var(--acc-warm) !important; }
.nav-label { letter-spacing: 0.2em !important; font-size: 9px !important; }

/* ── In-game HUD ────────────────────────────────────────────────────────── */

/* Shared module chrome for the corner read-outs. */
#ammo-block, #score-block, #wave-display, #powerup-display, #perk-bar {
    background: linear-gradient(165deg, rgba(18, 21, 28, 0.86), rgba(8, 10, 14, 0.8)) !important;
    border: 1px solid var(--line) !important;
    box-shadow: 0 8px 26px -10px rgba(0, 0, 0, 0.9), var(--rim) !important;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 0 !important;
    clip-path: polygon(var(--notch-sm) 0, 100% 0, 100% calc(100% - var(--notch-sm)),
                       calc(100% - var(--notch-sm)) 100%, 0 100%, 0 var(--notch-sm));
}

/* ── Bottom-left cluster ────────────────────────────────────────────────
   ammo-block, health-block and weapon-slots are all independently
   fixed-positioned siblings. Their offsets are set together here so the stack
   cannot collide: the original #weapon-slots sat at bottom:90px, which exactly
   met the ammo block only while the grenade row was hidden. */

#ammo-block    { bottom: 24px  !important; left: 24px !important;
                 padding: 9px 18px 10px 14px !important; width: 204px !important;
                 box-sizing: border-box; }
#health-block  { position: fixed; bottom: 155px !important; left: 24px; width: 204px;
                 box-sizing: border-box; padding: 8px 14px 10px; z-index: 110;
                 background: linear-gradient(165deg, rgba(18,21,28,0.86), rgba(8,10,14,0.8));
                 border: 1px solid var(--line);
                 box-shadow: 0 8px 26px -10px rgba(0,0,0,0.9), var(--rim);
                 backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
                 clip-path: polygon(var(--notch-sm) 0, 100% 0, 100% calc(100% - var(--notch-sm)),
                            calc(100% - var(--notch-sm)) 100%, 0 100%, 0 var(--notch-sm)); }
#weapon-slots  { bottom: 217px !important; left: 24px !important; }

#ammo-block, #health-block { border-left: 2px solid var(--acc) !important; }

.hb-row { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 6px; }
.hb-label { font-family: 'Rajdhani', sans-serif; font-weight: 700; font-size: 10px;
            letter-spacing: 0.26em; text-transform: uppercase; color: var(--t-dim); }
#health-value { font-family: 'Rajdhani', sans-serif; font-weight: 700; font-size: 20px;
                line-height: 1; color: var(--t-hi); font-variant-numeric: tabular-nums;
                text-shadow: 0 0 12px rgba(255,255,255,0.18); }
#health-track { height: 6px; background: rgba(0,0,0,0.6);
                border: 1px solid var(--line-cold); overflow: hidden; }
#health-fill  { height: 100%; width: 100%;
                background: linear-gradient(90deg, #6fe38a, #35c46a);
                box-shadow: 0 0 12px rgba(80,220,130,0.5);
                transition: width 220ms cubic-bezier(0.16,1,0.3,1), background 300ms; }
#health-fill.critical { background: linear-gradient(90deg, #ff6a5e, #ff2d3f);
                        box-shadow: 0 0 14px rgba(255,61,77,0.65);
                        animation: ls-pulse 800ms ease-in-out infinite; }
#weapon-name {
    font-family: 'Rajdhani', sans-serif; font-weight: 700;
    font-size: 11px !important; letter-spacing: 0.24em !important;
    color: var(--acc) !important; text-transform: uppercase;
}
#ammo-display {
    font-family: 'Rajdhani', sans-serif; font-weight: 700;
    font-variant-numeric: tabular-nums; font-feature-settings: 'tnum' 1;
    font-size: 40px !important; line-height: 1 !important;
    color: var(--t-hi) !important;
    text-shadow: 0 0 18px rgba(255, 140, 42, 0.45), 0 2px 4px rgba(0, 0, 0, 0.7);
    transition: color var(--fast), text-shadow var(--fast);
}
/* Low-ammo warning, driven by a class the HUD can toggle. */
#ammo-display.low { color: var(--acc-hot) !important; animation: ls-pulse 900ms ease-in-out infinite; }
@keyframes ls-pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.55; } }

#grenade-display { opacity: 0.95; }

#weapon-slots .slot {
    border: 1px solid var(--line-cold) !important;
    background: rgba(8, 10, 14, 0.7) !important;
    border-radius: 0 !important;
    transition: border-color var(--fast), background var(--fast), box-shadow var(--med);
}
#weapon-slots .slot.active {
    border-color: var(--acc) !important;
    background: rgba(255, 140, 42, 0.12) !important;
    box-shadow: 0 0 16px -2px rgba(255, 140, 42, 0.5);
}

/* Wave counter — centred, so treat it as a title plate. */
#wave-display { padding: 6px 20px !important; }
#wave-display, #wave-num {
    font-family: 'Rajdhani', sans-serif; font-weight: 700;
    letter-spacing: 0.3em !important; text-transform: uppercase;
    color: var(--t) !important;
}
#wave-num {
    color: var(--acc-warm) !important; font-size: 1.35em !important;
    font-variant-numeric: tabular-nums;
    text-shadow: 0 0 14px rgba(255, 176, 32, 0.55);
}

#score-block { padding: 8px 16px !important; text-align: right; }
#score-display {
    font-family: 'Rajdhani', sans-serif; font-weight: 700;
    font-variant-numeric: tabular-nums; letter-spacing: 0.08em;
    color: var(--acc-warm) !important;
    text-shadow: 0 0 16px rgba(255, 176, 32, 0.4);
}
#score-label, #kill-display {
    font-size: 10px !important; letter-spacing: 0.26em !important;
    color: var(--t-dim) !important; text-transform: uppercase;
}

/* XP bar */
#xp-track { background: rgba(0, 0, 0, 0.6) !important; border: 1px solid var(--line-cold) !important; border-radius: 99px !important; overflow: hidden; }
#xp-fill {
    background: linear-gradient(90deg, var(--acc), var(--acc-warm)) !important;
    box-shadow: 0 0 14px rgba(255, 176, 32, 0.6);
    transition: width var(--med);
}

/* ── Perks ──────────────────────────────────────────────────────────────── */

#perk-bar { padding: 6px 10px !important; gap: 6px; }

#perk-selection { backdrop-filter: blur(4px); }
.perk-selection-title {
    font-family: 'Cinzel', serif; font-weight: 900;
    letter-spacing: 0.22em; color: var(--t-hi);
    text-shadow: 0 0 24px rgba(255, 140, 42, 0.5);
}
.perk-choice {
    background: linear-gradient(165deg, var(--s-2), var(--s-0)) !important;
    border: 1px solid var(--line) !important;
    border-radius: 0 !important;
    clip-path: polygon(var(--notch) 0, 100% 0, 100% calc(100% - var(--notch)),
                       calc(100% - var(--notch)) 100%, 0 100%, 0 var(--notch));
    box-shadow: var(--lift), var(--rim);
    transition: transform var(--med), box-shadow var(--med), border-color var(--fast);
}
.perk-choice:hover {
    transform: translateY(-4px) scale(1.02);
    border-color: var(--line-hi) !important;
    box-shadow: 0 22px 50px -14px rgba(0, 0, 0, 0.9), 0 0 30px -6px rgba(255, 140, 42, 0.45), var(--rim);
}
.perk-choice-negative { border-color: rgba(255, 61, 77, 0.4) !important; }
.perk-choice-negative::after {
    content: 'TRADE-OFF'; position: absolute; top: 6px; right: 8px;
    font-size: 8px; letter-spacing: 0.18em; color: var(--acc-hot); opacity: 0.85;
}
.perk-key {
    background: var(--s-raise); border: 1px solid var(--line-hi);
    color: var(--acc-warm); font-weight: 700;
    font-family: 'Rajdhani', sans-serif;
}
.perk-name { font-family: 'Rajdhani', sans-serif; font-weight: 700; letter-spacing: 0.08em; }
.perk-desc { color: var(--t-dim); }
.perk-stacks { color: var(--t-faint); font-variant-numeric: tabular-nums; }

/* ── Overlays: pause, game over, scoreboard, modals ─────────────────────── */

#esc-popup, #game-over, #scoreboard,
#settings-modal, #leaderboard-modal, #server-browser-modal {
    backdrop-filter: blur(8px) saturate(0.85);
    -webkit-backdrop-filter: blur(8px) saturate(0.85);
    background: rgba(4, 5, 8, 0.62) !important;
}

#esc-popup-panel, #game-over > div, #scoreboard > div,
.modal-panel {
    background: linear-gradient(165deg, var(--s-2), var(--s-0)) !important;
    border: 1px solid var(--line) !important;
    border-radius: 0 !important;
    box-shadow: var(--lift), var(--rim) !important;
    clip-path: polygon(var(--notch) 0, 100% 0, 100% calc(100% - var(--notch)),
                       calc(100% - var(--notch)) 100%, 0 100%, 0 var(--notch));
}

/* ── Lobby ──────────────────────────────────────────────────────────────── */

#room-code, .room-code {
    font-family: 'Cinzel', serif; font-weight: 900;
    letter-spacing: 0.24em;
    color: var(--acc-warm) !important;
    text-shadow: 0 0 26px rgba(255, 176, 32, 0.45);
    transition: transform var(--fast), text-shadow var(--med);
    cursor: pointer;
}
#room-code:hover, .room-code:hover { transform: scale(1.02); text-shadow: 0 0 34px rgba(255, 176, 32, 0.7); }

.map-card, .map-tile {
    border: 1px solid var(--line-cold) !important;
    border-radius: 0 !important;
    overflow: hidden;
    transition: transform var(--med), border-color var(--fast), box-shadow var(--med);
}
.map-card:hover, .map-tile:hover {
    transform: translateY(-3px);
    border-color: var(--line-hi) !important;
    box-shadow: 0 18px 40px -14px rgba(0, 0, 0, 0.9), 0 0 24px -8px rgba(255, 140, 42, 0.4);
}
.map-card.selected, .map-tile.selected {
    border-color: var(--acc) !important;
    box-shadow: 0 0 0 1px var(--acc), 0 0 28px -6px rgba(255, 140, 42, 0.55);
}

/* ── Chat ───────────────────────────────────────────────────────────────── */

#global-chat-panel {
    background: linear-gradient(165deg, var(--s-1), var(--s-0)) !important;
    border: 1px solid var(--line) !important;
    border-radius: 0 !important;
    box-shadow: var(--lift), var(--rim) !important;
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    clip-path: polygon(var(--notch) 0, 100% 0, 100% 100%, 0 100%, 0 var(--notch));
}

/* ── Loading screen ─────────────────────────────────────────────────────── */

#loading-screen { background: radial-gradient(ellipse at 50% 45%, #14100c 0%, #05060a 70%) !important; }

/* ── Motion preferences ─────────────────────────────────────────────────── */

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.001ms !important;
    }
}

/* ── Narrow viewports ───────────────────────────────────────────────────── */

@media (max-width: 760px) {
    :root { --notch: 7px; --notch-sm: 5px; }
    #ammo-display { font-size: 30px !important; }
    #ammo-block { min-width: 132px; padding: 8px 12px 10px !important; }
}

/* ── Map loading overlay ────────────────────────────────────────────────────
   Built in JS (main.js createMapLoadingOverlay) with hardcoded blue inline
   styles, so it rendered as a completely different-looking application.
   Inline styles mean these overrides need !important. */

#map-loading-overlay {
    background: radial-gradient(ellipse at 50% 38%, #16110c 0%, #05060a 72%) !important;
    color: var(--t) !important;
    gap: 14px !important;
}
#map-loading-overlay > div:first-child {
    font-family: 'Cinzel', serif !important;
    font-weight: 900 !important;
    font-size: 34px !important;
    letter-spacing: 0.14em !important;
    text-transform: uppercase;
    color: var(--t-hi) !important;
    text-shadow: 0 0 34px rgba(255, 140, 42, 0.45);
}
#map-loading-overlay > div:nth-child(2) {
    font-size: 11px !important;
    letter-spacing: 0.3em !important;
    text-transform: uppercase;
    color: var(--acc) !important;
    opacity: 1 !important;
}
/* Progress track + fill */
#map-loading-overlay > div:nth-child(3) {
    width: 380px !important;
    height: 6px !important;
    border: 1px solid var(--line-cold) !important;
    border-radius: 0 !important;
    background: rgba(0, 0, 0, 0.6) !important;
}
#map-loading-bar {
    background: linear-gradient(90deg, var(--acc-hot), var(--acc), var(--acc-warm)) !important;
    box-shadow: 0 0 16px rgba(255, 140, 42, 0.7);
}
#map-loading-console {
    background: rgba(4, 6, 10, 0.8) !important;
    border: 1px solid var(--line) !important;
    border-radius: 0 !important;
    color: var(--t-dim) !important;
    font-family: 'Rajdhani', monospace !important;
    letter-spacing: 0.04em;
    clip-path: polygon(var(--notch-sm) 0, 100% 0, 100% calc(100% - var(--notch-sm)),
               calc(100% - var(--notch-sm)) 100%, 0 100%, 0 var(--notch-sm));
}
#map-loading-leave-btn {
    background: linear-gradient(180deg, rgba(34, 30, 26, 0.9), rgba(20, 18, 16, 0.9)) !important;
    border: 1px solid var(--line) !important;
    border-radius: 0 !important;
    color: var(--t) !important;
    font-family: 'Rajdhani', sans-serif !important;
    font-weight: 700 !important;
    letter-spacing: 0.18em !important;
    text-transform: uppercase;
    padding: 9px 20px !important;
    clip-path: polygon(var(--notch-sm) 0, 100% 0, 100% calc(100% - var(--notch-sm)),
               calc(100% - var(--notch-sm)) 100%, 0 100%, 0 var(--notch-sm));
    transition: color var(--fast), border-color var(--fast), box-shadow var(--med);
}
#map-loading-leave-btn:hover {
    color: var(--t-hi) !important;
    border-color: var(--line-hi) !important;
    box-shadow: 0 0 20px -4px rgba(255, 140, 42, 0.45) !important;
}



/* ── Map splash placeholder ─────────────────────────────────────────────────
   Every map (including all the custom ones) ships the same crossed-box
   placeholder bitmap, so the map picker was a grid of identical broken-looking
   tiles. Swap the rendered image for an on-brand terrain plate. Maps that have
   a real splash image are untouched. */

img[src*="map-splash-placeholder"] {
    content: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns=%22http://www.w3.org/2000/svg%22%20viewBox=%220%200%20320%20180%22%20preserveAspectRatio=%22xMidYMid%20slice%22%3E%3Cdefs%3E%3ClinearGradient%20id=%22b%22%20x1=%220%22%20y1=%220%22%20x2=%221%22%20y2=%221%22%3E%3Cstop%20offset=%220%22%20stop-color=%22%2311151c%22/%3E%3Cstop%20offset=%220.55%22%20stop-color=%22%230a0d12%22/%3E%3Cstop%20offset=%221%22%20stop-color=%22%231a1109%22/%3E%3C/linearGradient%3E%3CradialGradient%20id=%22g%22%20cx=%220.72%22%20cy=%220.78%22%20r=%220.62%22%3E%3Cstop%20offset=%220%22%20stop-color=%22%23e8720a%22%20stop-opacity=%220.34%22/%3E%3Cstop%20offset=%221%22%20stop-color=%22%23e8720a%22%20stop-opacity=%220%22/%3E%3C/radialGradient%3E%3Cpattern%20id=%22p%22%20width=%2220%22%20height=%2220%22%20patternUnits=%22userSpaceOnUse%22%3E%3Cpath%20d=%22M20%200H0V20%22%20fill=%22none%22%20stroke=%22%237fa3c9%22%20stroke-opacity=%220.07%22%20stroke-width=%221%22/%3E%3C/pattern%3E%3C/defs%3E%3Crect%20width=%22320%22%20height=%22180%22%20fill=%22url(%2523b)%22/%3E%3Crect%20width=%22320%22%20height=%22180%22%20fill=%22url(%2523p)%22/%3E%3Crect%20width=%22320%22%20height=%22180%22%20fill=%22url(%2523g)%22/%3E%3Cpath%20d=%22M0%20132%20L58%20112%20L104%20126%20L163%2096%20L214%20116%20L268%2088%20L320%20104%20L320%20180%20L0%20180%20Z%22%20fill=%22%2305070b%22%20fill-opacity=%220.85%22/%3E%3Cpath%20d=%22M0%20132%20L58%20112%20L104%20126%20L163%2096%20L214%20116%20L268%2088%20L320%20104%22%20fill=%22none%22%20stroke=%22%23e8720a%22%20stroke-opacity=%220.5%22%20stroke-width=%221.4%22/%3E%3Cg%20stroke=%22%23ffb020%22%20stroke-opacity=%220.5%22%20stroke-width=%221.6%22%20fill=%22none%22%3E%3Cpath%20d=%22M12%2012%20H34%20M12%2012%20V34%22/%3E%3Cpath%20d=%22M308%2012%20H286%20M308%2012%20V34%22/%3E%3Cpath%20d=%22M12%20168%20H34%20M12%20168%20V146%22/%3E%3Cpath%20d=%22M308%20168%20H286%20M308%20168%20V146%22/%3E%3C/g%3E%3Ccircle%20cx=%22160%22%20cy=%2290%22%20r=%2217%22%20fill=%22none%22%20stroke=%22%23ffb020%22%20stroke-opacity=%220.22%22%20stroke-width=%221%22/%3E%3Cpath%20d=%22M160%2066%20V80%20M160%20100%20V114%20M136%2090%20H150%20M170%2090%20H184%22%20stroke=%22%23ffb020%22%20stroke-opacity=%220.3%22%20stroke-width=%221%22/%3E%3C/svg%3E");
    object-fit: cover;
}

/* ============================================================================
   HudFx — combat feedback layer (static/js/hud_fx.js)
   ========================================================================== */

#hudfx-root {
    position: fixed; inset: 0; z-index: 112;
    pointer-events: none; opacity: 0;
    transition: opacity 200ms ease;
    font-family: 'Rajdhani', sans-serif;
}
#hudfx-root.visible { opacity: 1; }

/* ── Floating damage numbers ─────────────────────────────────────────────── */

.hudfx-damage-layer { position: absolute; inset: 0; }

.hudfx-dmg {
    position: absolute; left: 50%; top: 46%;
    transform: translate(-50%, -50%);
    font-weight: 700; font-size: 22px; line-height: 1;
    font-variant-numeric: tabular-nums;
    color: var(--t-hi);
    text-shadow: 0 2px 6px rgba(0, 0, 0, 0.9), 0 0 14px rgba(255, 255, 255, 0.25);
    animation: hudfx-float 1s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    will-change: transform, opacity;
}
.hudfx-dmg.hs {
    font-size: 30px; color: var(--acc-warm);
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.9), 0 0 20px rgba(255, 176, 32, 0.8);
}
.hudfx-dmg.kill {
    font-size: 34px; color: var(--acc-hot);
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.95), 0 0 26px rgba(255, 61, 77, 0.9);
}
@keyframes hudfx-float {
    0%   { opacity: 0; transform: translate(calc(-50% + var(--dx)), calc(-50% + var(--dy))) scale(0.6); }
    18%  { opacity: 1; transform: translate(calc(-50% + var(--dx)), calc(-50% + var(--dy))) scale(1.12); }
    32%  { transform: translate(calc(-50% + var(--dx)), calc(-50% + var(--dy))) scale(1); }
    100% { opacity: 0; transform: translate(calc(-50% + var(--dx)), calc(-50% + var(--dy) - 58px)) scale(0.95); }
}

/* ── Kill-combo widget ───────────────────────────────────────────────────── */

.hudfx-combo {
    position: absolute; right: 30px; top: 132px;
    min-width: 150px; padding: 10px 14px 12px; text-align: right;
    background: linear-gradient(165deg, rgba(20, 14, 10, 0.9), rgba(8, 6, 6, 0.86));
    border: 1px solid var(--line);
    border-right: 3px solid var(--acc);
    box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.9), var(--rim);
    backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
    clip-path: polygon(var(--notch-sm) 0, 100% 0, 100% 100%, 0 100%, 0 var(--notch-sm));
    opacity: 0; transform: translateX(26px) scale(0.96);
    transition: opacity 200ms ease, transform 260ms cubic-bezier(0.16, 1, 0.3, 1);
}
.hudfx-combo.active { opacity: 1; transform: none; }
.hudfx-combo.bump   { animation: hudfx-bump 260ms cubic-bezier(0.16, 1, 0.3, 1); }
@keyframes hudfx-bump { 0% { transform: scale(1); } 40% { transform: scale(1.07); } 100% { transform: scale(1); } }

.hudfx-combo-count {
    font-size: 40px; font-weight: 700; line-height: 0.95;
    font-variant-numeric: tabular-nums; color: var(--t-hi);
    text-shadow: 0 0 20px rgba(255, 140, 42, 0.5);
}
.hudfx-combo-count::after {
    content: ' KILL CHAIN'; font-size: 9px; letter-spacing: 0.24em;
    color: var(--t-dim); text-shadow: none; vertical-align: middle;
}
.hudfx-combo-mult {
    font-size: 17px; font-weight: 700; letter-spacing: 0.08em;
    color: var(--acc-warm); margin-top: 2px;
    text-shadow: 0 0 14px rgba(255, 176, 32, 0.55);
}
.hudfx-combo-bar { margin-top: 8px; height: 3px; background: rgba(0, 0, 0, 0.55); overflow: hidden; }
.hudfx-combo-bar > i {
    display: block; height: 100%; width: 100%;
    background: linear-gradient(90deg, var(--acc-hot), var(--acc-warm));
}
/* Escalating heat as the chain grows. */
.hudfx-combo[data-tier="1"] { border-right-color: var(--acc-warm); }
.hudfx-combo[data-tier="2"] { border-right-color: var(--acc-hot);
    box-shadow: 0 10px 30px -10px rgba(0,0,0,0.9), 0 0 26px -6px rgba(255,61,77,0.5), var(--rim); }
.hudfx-combo[data-tier="3"] { border-right-color: #fff;
    box-shadow: 0 10px 30px -10px rgba(0,0,0,0.9), 0 0 38px -4px rgba(255,92,42,0.75), var(--rim);
    animation: hudfx-blaze 1.1s ease-in-out infinite; }
@keyframes hudfx-blaze { 0%,100% { filter: brightness(1); } 50% { filter: brightness(1.22); } }

/* ── Wave progress ───────────────────────────────────────────────────────── */

.hudfx-wave {
    position: absolute; left: 50%; bottom: 136px; transform: translateX(-50%);
    width: 300px; text-align: center; opacity: 0; transition: opacity 240ms ease;
}
.hudfx-wave.active { opacity: 1; }
.hudfx-wave-text {
    font-size: 12px; font-weight: 700; letter-spacing: 0.22em; text-transform: uppercase;
    color: var(--t); margin-bottom: 6px; font-variant-numeric: tabular-nums;
    text-shadow: 0 2px 6px rgba(0, 0, 0, 0.9);
}
.hudfx-wave-track {
    height: 5px; background: rgba(0, 0, 0, 0.6);
    border: 1px solid var(--line-cold); overflow: hidden;
}
.hudfx-wave-track > i {
    display: block; height: 100%; width: 100%;
    background: linear-gradient(90deg, var(--acc-hot), var(--acc));
    box-shadow: 0 0 12px rgba(255, 92, 42, 0.6);
    transition: width 300ms cubic-bezier(0.16, 1, 0.3, 1);
}

/* ── Sprint stamina ──────────────────────────────────────────────────────── */

.hudfx-stamina {
    position: absolute; left: 24px; bottom: 141px;
    width: 204px; height: 4px; background: rgba(0, 0, 0, 0.6);
    border-left: 2px solid var(--acc-cold);
    opacity: 0; transition: opacity 200ms ease;
}
.hudfx-stamina.active { opacity: 1; }
.hudfx-stamina > i {
    display: block; height: 100%; width: 100%;
    background: linear-gradient(90deg, var(--acc-cold), #bfe6ff);
    box-shadow: 0 0 10px rgba(110, 195, 255, 0.6);
    transition: width 90ms linear;
}
.hudfx-stamina.empty > i { background: var(--acc-hot); box-shadow: 0 0 10px rgba(255,61,77,0.7); }

/* ── Kill feed ───────────────────────────────────────────────────────────── */

.hudfx-feed {
    position: absolute; right: 30px; top: 258px;
    display: flex; flex-direction: column; align-items: flex-end; gap: 4px;
}
.hudfx-feed-row {
    font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase;
    color: var(--t); padding: 4px 10px;
    background: rgba(8, 10, 14, 0.7);
    border-right: 2px solid var(--acc);
    backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
    animation: hudfx-slide 260ms cubic-bezier(0.16, 1, 0.3, 1);
    transition: opacity 380ms ease, transform 380ms ease;
}
.hudfx-feed-row.out { opacity: 0; transform: translateX(16px); }
@keyframes hudfx-slide { from { opacity: 0; transform: translateX(22px); } to { opacity: 1; transform: none; } }

@media (max-width: 760px) {
    .hudfx-combo { right: 14px; top: 78px; min-width: 104px; padding: 8px 10px 10px; }
    .hudfx-combo-count { font-size: 30px; }
    .hudfx-feed { right: 14px; top: 170px; }
}

/* ============================================================================
   MAIN MENU — composition redesign
   ----------------------------------------------------------------------------
   The original layout was a 72px icon rail plus a full-height 720px panel slab
   whose content only filled the top third, with a small disconnected hero block
   floating top-right. Everything below is a re-composition: the panel becomes a
   vertically-centred console card, the hero becomes a real identity block, and
   the top strip reads as status chrome rather than a toolbar.
   ========================================================================== */

/* ── Viewport chrome: corner brackets framing the whole menu ─────────────── */

#main-menu.active::before,
#main-menu.active::after {
    content: ''; position: fixed; width: 54px; height: 54px;
    pointer-events: none; z-index: 1002; opacity: 0.5;
}
#main-menu.active::before {
    left: 88px; top: 64px;
    border-left: 2px solid var(--acc); border-top: 2px solid var(--acc);
}
#main-menu.active::after {
    right: 28px; bottom: 28px;
    border-right: 2px solid var(--acc); border-bottom: 2px solid var(--acc);
}

/* ── Top status strip ────────────────────────────────────────────────────── */

#menu-top-bar {
    height: 46px !important;
    background: linear-gradient(180deg, rgba(8, 10, 14, 0.94), rgba(8, 10, 14, 0.72)) !important;
    border-bottom: 1px solid var(--line) !important;
    backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
    box-shadow: 0 8px 26px -14px rgba(0, 0, 0, 0.9);
}
#menu-top-bar::after {
    content: ''; position: absolute; left: 0; right: 0; bottom: -1px; height: 1px;
    background: linear-gradient(90deg, transparent, var(--acc) 22%, var(--acc-hot) 55%, transparent);
    opacity: 0.5;
}
#motd-bar {
    font-size: 10px !important; letter-spacing: 0.26em !important;
    text-transform: uppercase; color: var(--t-dim) !important;
}
#online-counter { font-size: 10px; letter-spacing: 0.2em; text-transform: uppercase; }
.online-dot { box-shadow: 0 0 10px currentColor; }

/* ── Nav rail ────────────────────────────────────────────────────────────── */

#menu-nav-rail {
    width: 84px !important;
    background: linear-gradient(180deg, rgba(10, 12, 17, 0.95), rgba(6, 8, 11, 0.9)) !important;
    border-right: 1px solid var(--line) !important;
    backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
}
#menu-nav-items { gap: 2px; }
.nav-item { padding: 13px 0 11px !important; }
.nav-item .nav-icon { transition: transform var(--med), color var(--fast); }
.nav-item:hover .nav-icon { transform: translateY(-2px); }
.nav-divider { opacity: 0.35; }

/* ── The console card ────────────────────────────────────────────────────── */

#menu-panel-area {
    left: 116px !important;
    top: 0 !important;
    bottom: 0 !important;
    margin-top: auto !important;
    margin-bottom: auto !important;
    width: min(620px, 44vw) !important;
    height: min(830px, 78vh) !important;
    background: linear-gradient(165deg, rgba(16, 19, 26, 0.9), rgba(7, 9, 13, 0.86)) !important;
    border: 1px solid var(--line) !important;
    box-shadow: 0 40px 90px -30px rgba(0, 0, 0, 0.95),
                0 0 0 1px rgba(0, 0, 0, 0.5), var(--rim) !important;
    backdrop-filter: blur(18px) saturate(1.1);
    -webkit-backdrop-filter: blur(18px) saturate(1.1);
    clip-path: polygon(18px 0, 100% 0, 100% calc(100% - 18px), calc(100% - 18px) 100%, 0 100%, 0 18px);
    overflow: hidden;
}
/* Ember hairline along the card's top edge. */
#menu-panel-area::before {
    content: ''; position: absolute; left: 18px; right: 0; top: 0; height: 1px; z-index: 3;
    background: linear-gradient(90deg, var(--acc-warm), var(--acc-hot) 45%, transparent);
    opacity: 0.7; pointer-events: none;
}

/* Panels fill the card and scroll internally instead of stretching the page. */
.menu-panel {
    position: absolute !important; inset: 0 !important;
    width: auto !important; height: auto !important;
    display: none; flex-direction: column;
    background: none !important; border: none !important;
    box-shadow: none !important; backdrop-filter: none !important;
    clip-path: none !important;
}
.menu-panel.active { display: flex !important; }
.menu-panel::before { display: none; }

.panel-header {
    padding: 26px 30px 18px !important;
    border-bottom: 1px solid var(--line);
    background: linear-gradient(180deg, rgba(255, 140, 42, 0.05), transparent);
    flex: 0 0 auto;
}
.panel-title { font-size: 30px !important; line-height: 1.05 !important; }
.panel-body {
    flex: 1 1 auto; min-height: 0;
    overflow-y: auto; overflow-x: hidden;
    padding: 22px 30px 26px !important;
    display: flex; flex-direction: column; gap: 16px;
}
.panel-section { margin: 0 !important; }
.panel-divider { margin: 2px 0 !important; opacity: 0.6; }

/* The open-servers list soaks up the leftover height instead of leaving a void. */
#inline-server-wrap {
    flex: 1 1 auto; min-height: 140px;
    display: flex; flex-direction: column;
    border: 1px solid var(--line-cold);
    background: rgba(0, 0, 0, 0.28);
    padding: 12px 14px;
}
.isb-empty {
    flex: 1; display: flex; align-items: center; justify-content: center;
    text-align: center; font-size: 11px !important; letter-spacing: 0.22em;
    text-transform: uppercase; color: var(--t-faint) !important;
}

/* The house-ad block was pure dead weight in a card this size. */
#ad-play-sidebar { display: none !important; }

/* Primary action gets real presence. */
#create-btn { padding: 16px 20px !important; font-size: 15px !important; letter-spacing: 0.2em !important; }

/* ── Hero / identity block ───────────────────────────────────────────────── */

#menu-scene-overlay {
    left: auto !important;
    right: 44px !important;
    top: auto !important;
    bottom: 470px !important;
    width: min(680px, 46vw) !important;
    height: auto !important;
    text-align: right;
    pointer-events: none;
}
#menu-scene-overlay-brand {
    font-family: 'Cinzel', serif !important;
    font-weight: 900 !important;
    font-size: clamp(44px, 5.2vw, 86px) !important;
    line-height: 0.94 !important;
    letter-spacing: 0.04em !important;
    color: var(--t-hi) !important;
    text-shadow: 0 0 60px rgba(255, 92, 42, 0.45), 0 6px 26px rgba(0, 0, 0, 0.8);
}
#menu-scene-overlay-copy,
#menu-scene-overlay-member-line,
#menu-scene-overlay-motd {
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.9);
}
#menu-scene-overlay-copy {
    font-size: 15px !important; color: var(--t) !important; margin-top: 10px !important;
}
#menu-scene-overlay-member-line {
    font-size: 11px !important; letter-spacing: 0.26em !important;
    text-transform: uppercase; color: var(--acc) !important; margin-top: 12px !important;
}
#menu-scene-overlay-motd {
    font-size: 10px !important; letter-spacing: 0.24em !important;
    color: var(--t-faint) !important;
}
/* Rule under the hero, tying it to the frame. */
#menu-scene-overlay::after {
    content: ''; display: block; margin-left: auto; margin-top: 16px;
    width: 220px; height: 1px;
    background: linear-gradient(90deg, transparent, var(--acc));
    opacity: 0.6;
}

/* The old absolutely-placed title/subtitle are superseded by the hero block. */
#menu-title, #menu-subtitle { display: none !important; }

/* ── Chat ────────────────────────────────────────────────────────────────── */

#global-chat-panel { right: 28px !important; bottom: 28px !important; }

@media (max-width: 1280px) {
    #menu-panel-area { width: min(560px, 54vw) !important; }
    #menu-scene-overlay { bottom: 440px !important; width: 52vw !important; }
}

/* ============================================================================
   AUTH SCREEN — composition redesign
   ----------------------------------------------------------------------------
   Was two heavy side-by-side slabs that covered most of the 3D scene. Now the
   marketing copy sits directly on the scene as a title treatment, and only the
   sign-in form keeps a panel, so the outpost is the backdrop rather than a
   sliver between two boxes.
   ========================================================================== */

#auth-screen .auth-layout {
    width: min(1560px, 94vw) !important;
    gap: clamp(32px, 6vw, 110px) !important;
    align-items: center !important;
}

/* Marketing column: no panel, straight onto the scene. */
#auth-screen .auth-story {
    background: none !important;
    border: none !important;
    box-shadow: none !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    clip-path: none !important;
    padding: 0 !important;
    max-width: 660px;
}
#auth-screen .auth-story::before { display: none !important; }

#auth-screen .auth-story-kicker {
    font-size: 10px !important; letter-spacing: 0.4em !important;
    color: var(--acc) !important;
}
#auth-screen .auth-story h2 {
    font-family: 'Cinzel', serif !important;
    font-weight: 900 !important;
    font-size: clamp(40px, 4.6vw, 74px) !important;
    line-height: 0.98 !important;
    letter-spacing: 0.01em !important;
    color: var(--t-hi) !important;
    text-shadow: 0 0 70px rgba(255, 92, 42, 0.4), 0 8px 30px rgba(0, 0, 0, 0.85);
    margin: 14px 0 18px !important;
}
#auth-screen .auth-story-copy {
    font-size: 15px !important; line-height: 1.65 !important;
    color: var(--t) !important; max-width: 52ch;
    text-shadow: 0 2px 12px rgba(0, 0, 0, 0.9);
}

/* Feature grid becomes four lightweight stat cards with a left accent. */
#auth-screen .auth-story-grid { gap: 12px !important; margin-top: 26px !important; }
#auth-screen .auth-story-card {
    background: linear-gradient(120deg, rgba(14, 17, 23, 0.72), rgba(8, 10, 14, 0.5)) !important;
    border: 1px solid var(--line-cold) !important;
    border-left: 2px solid var(--acc) !important;
    clip-path: none !important;
    padding: 13px 15px !important;
    transition: transform var(--med), border-color var(--fast), background var(--fast);
}
#auth-screen .auth-story-card:hover {
    transform: translateY(-2px);
    border-left-color: var(--acc-warm) !important;
    background: linear-gradient(120deg, rgba(26, 20, 15, 0.8), rgba(10, 12, 16, 0.6)) !important;
}

#auth-screen .auth-story-footer { margin-top: 26px !important; gap: 8px !important; }
#auth-screen .auth-story-pill {
    background: rgba(8, 10, 14, 0.66) !important;
    border: 1px solid var(--line) !important;
    border-radius: 0 !important;
    font-size: 9px !important; letter-spacing: 0.24em !important;
    padding: 7px 13px !important; color: var(--t-dim) !important;
    clip-path: polygon(5px 0, 100% 0, calc(100% - 5px) 100%, 0 100%);
}

/* Sign-in card: the only solid surface on the screen. */
#auth-screen .auth-container {
    width: min(420px, 34vw) !important;
    padding: 34px 32px 30px !important;
    background: linear-gradient(165deg, rgba(17, 20, 27, 0.94), rgba(7, 9, 13, 0.9)) !important;
    box-shadow: 0 46px 96px -34px rgba(0, 0, 0, 0.96), var(--rim),
                0 0 0 1px rgba(0, 0, 0, 0.5) !important;
    clip-path: polygon(18px 0, 100% 0, 100% calc(100% - 18px),
               calc(100% - 18px) 100%, 0 100%, 0 18px) !important;
}
#auth-screen .auth-header h1 {
    font-family: 'Cinzel', serif !important; font-weight: 900 !important;
    letter-spacing: 0.1em !important;
}
#auth-screen .auth-divider {
    background: linear-gradient(90deg, transparent, var(--acc), transparent) !important;
    opacity: 0.5; height: 1px !important;
}
#auth-screen .auth-form { gap: 12px !important; display: flex; flex-direction: column; }
#auth-screen .input-field { padding: 13px 14px !important; font-size: 14px !important; }
#auth-screen .auth-switch { font-size: 11px !important; letter-spacing: 0.06em; }
#auth-screen .auth-switch a, #auth-screen .auth-switch span[role="button"] { color: var(--acc); }

@media (max-width: 1100px) {
    #auth-screen .auth-layout { flex-direction: column !important; gap: 28px !important; }
    #auth-screen .auth-container { width: min(420px, 90vw) !important; }
    #auth-screen .auth-story { max-width: 90vw; }
}

/* ============================================================================
   LOBBY — composition redesign
   ----------------------------------------------------------------------------
   The left column had a large dead gap between the game-mode pills and the
   launch button, and the map grid sat in a panel with no sense of hierarchy.
   This gives the column a deliberate top-to-bottom rhythm, pins Launch to the
   bottom as the one clear exit, and turns the map grid into a mission board.
   ========================================================================== */

#lobby .lobby-shell {
    gap: clamp(20px, 2.4vw, 40px) !important;
    padding: clamp(18px, 2.4vh, 34px) clamp(20px, 2.6vw, 44px) !important;
}

/* ── Left column ─────────────────────────────────────────────────────────── */

#lobby-left {
    display: flex !important; flex-direction: column;
    gap: 18px;
    background: linear-gradient(165deg, rgba(16, 19, 26, 0.9), rgba(7, 9, 13, 0.86)) !important;
    border: 1px solid var(--line) !important;
    box-shadow: 0 40px 90px -34px rgba(0, 0, 0, 0.95), var(--rim) !important;
    backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
    clip-path: polygon(18px 0, 100% 0, 100% calc(100% - 18px),
               calc(100% - 18px) 100%, 0 100%, 0 18px);
    padding: 22px 26px 24px !important;
}
#lobby-left::before {
    content: ''; position: absolute; left: 18px; right: 0; top: 0; height: 1px;
    background: linear-gradient(90deg, var(--acc-warm), var(--acc-hot) 50%, transparent);
    opacity: 0.7;
}

/* Room code reads as the headline artefact of the screen. */
#lobby .lobby-heading-block { margin-bottom: 2px !important; }
#room-code, #lobby .room-code, #lobby-room-code {
    font-size: clamp(34px, 3.4vw, 50px) !important;
    padding: 16px 12px !important;
    background: linear-gradient(135deg, rgba(255, 92, 42, 0.11), rgba(255, 61, 77, 0.05)) !important;
    border: 1px solid var(--line-hi) !important;
    clip-path: polygon(10px 0, 100% 0, 100% calc(100% - 10px),
               calc(100% - 10px) 100%, 0 100%, 0 10px);
}

/* Push the launch stack to the bottom so the gap becomes deliberate space. */
#lobby .lobby-launch-stack { margin-top: auto !important; padding-top: 18px; }
#lobby .lobby-launch-stack button,
#lobby #launch-btn {
    width: 100%; padding: 18px 20px !important;
    font-size: 16px !important; letter-spacing: 0.24em !important;
}

/* Player rows */
#lobby .lobby-section-label { margin-bottom: 8px !important; }

/* ── Right column: preview + mission board ───────────────────────────────── */

#lobby-right { gap: clamp(14px, 1.6vh, 24px) !important; }

#lobby .lobby-preview-card,
#lobby .lobby-map-card {
    background: linear-gradient(165deg, rgba(16, 19, 26, 0.88), rgba(7, 9, 13, 0.84)) !important;
    border: 1px solid var(--line) !important;
    box-shadow: 0 30px 70px -30px rgba(0, 0, 0, 0.9), var(--rim) !important;
    clip-path: polygon(18px 0, 100% 0, 100% calc(100% - 18px),
               calc(100% - 18px) 100%, 0 100%, 0 18px);
}

/* Map grid: tighter, with a clearer selected state. */
#lobby .map-card {
    background: rgba(6, 8, 12, 0.55) !important;
    transition: transform var(--med), border-color var(--fast), box-shadow var(--med);
}
#lobby .map-card img { transition: transform 420ms cubic-bezier(0.16, 1, 0.3, 1); }
#lobby .map-card:hover img { transform: scale(1.05); }
#lobby .map-card.selected::after {
    content: 'SELECTED'; position: absolute; top: 8px; right: 8px;
    font-size: 8px; letter-spacing: 0.2em; padding: 3px 7px;
    background: var(--acc); color: #120a04; font-weight: 700;
}

/* Search + filter chips */
#lobby input[type="text"] { padding: 11px 13px !important; }
#lobby .diff-pills button, #lobby #game-mode-pills button {
    border-radius: 0 !important;
    clip-path: polygon(6px 0, 100% 0, calc(100% - 6px) 100%, 0 100%);
    letter-spacing: 0.16em !important;
}

/* Controller hint strip sits quietly at the bottom. */
#lobby .lobby-controls-hint, #lobby .controls-hint {
    font-size: 9px !important; letter-spacing: 0.2em !important;
    color: var(--t-faint) !important;
}

/* ============================================================================
   MOTION — entrances and panel transitions
   ----------------------------------------------------------------------------
   Screens previously snapped in with no transition at all, which is most of
   why the menus felt static. All of it collapses under prefers-reduced-motion
   via the global rule further up.
   ========================================================================== */

@keyframes ls-rise   { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
@keyframes ls-fade   { from { opacity: 0; } to { opacity: 1; } }
@keyframes ls-slideL { from { opacity: 0; transform: translateX(-26px); } to { opacity: 1; transform: none; } }
@keyframes ls-slideR { from { opacity: 0; transform: translateX(26px); } to { opacity: 1; transform: none; } }
@keyframes ls-pop    { from { opacity: 0; transform: scale(0.94); } to { opacity: 1; transform: scale(1); } }

/* Auth entrance — copy and form arrive from opposite sides. */
#auth-screen.active .auth-story     { animation: ls-slideL 620ms cubic-bezier(0.16, 1, 0.3, 1) both; }
#auth-screen.active .auth-container { animation: ls-slideR 620ms cubic-bezier(0.16, 1, 0.3, 1) 80ms both; }
#auth-screen.active .auth-story-card { animation: ls-rise 520ms cubic-bezier(0.16, 1, 0.3, 1) both; }
#auth-screen.active .auth-story-card:nth-child(1) { animation-delay: 180ms; }
#auth-screen.active .auth-story-card:nth-child(2) { animation-delay: 240ms; }
#auth-screen.active .auth-story-card:nth-child(3) { animation-delay: 300ms; }
#auth-screen.active .auth-story-card:nth-child(4) { animation-delay: 360ms; }

/* Main menu entrance. */
#main-menu.active #menu-nav-rail     { animation: ls-slideL 520ms cubic-bezier(0.16, 1, 0.3, 1) both; }
#main-menu.active #menu-panel-area   { animation: ls-rise   560ms cubic-bezier(0.16, 1, 0.3, 1) 60ms both; }
#main-menu.active #menu-scene-overlay{ animation: ls-slideR 680ms cubic-bezier(0.16, 1, 0.3, 1) 140ms both; }
#main-menu.active #menu-top-bar      { animation: ls-fade   420ms ease both; }

/* Panel switches inside the console card. */
.menu-panel.active { animation: ls-rise 340ms cubic-bezier(0.16, 1, 0.3, 1) both; }

/* Lobby entrance. */
#lobby.active #lobby-left  { animation: ls-slideL 560ms cubic-bezier(0.16, 1, 0.3, 1) both; }
#lobby.active #lobby-right { animation: ls-slideR 560ms cubic-bezier(0.16, 1, 0.3, 1) 70ms both; }

/* Map tiles cascade in. */
#lobby .map-card { animation: ls-pop 380ms cubic-bezier(0.16, 1, 0.3, 1) both; }
#lobby .map-card:nth-child(-n+8) { animation-delay: calc(60ms * var(--i, 0)); }

/* ============================================================================
   OVERLAYS — pause, game over, scoreboard
   ========================================================================== */

#esc-popup-panel {
    padding: 34px 40px 30px !important;
    min-width: 320px;
    animation: ls-pop 300ms cubic-bezier(0.16, 1, 0.3, 1) both;
}
#esc-popup-panel h2 {
    font-family: 'Cinzel', serif !important; font-weight: 900 !important;
    letter-spacing: 0.3em !important; font-size: 26px !important;
    color: var(--t-hi) !important; text-align: center;
    text-shadow: 0 0 30px rgba(255, 140, 42, 0.45);
    margin-bottom: 22px !important;
}
#esc-popup-panel .esc-actions { display: flex; flex-direction: column; gap: 10px; }
#esc-popup-panel button { width: 100%; padding: 13px 18px !important; }
#esc-leave-btn { border-color: rgba(255, 61, 77, 0.35) !important; }
#esc-leave-btn:hover {
    border-color: var(--acc-hot) !important; color: #fff !important;
    box-shadow: 0 0 22px -4px rgba(255, 61, 77, 0.5) !important;
}

#game-over h1 {
    font-family: 'Cinzel', serif !important; font-weight: 900 !important;
    font-size: clamp(48px, 6vw, 92px) !important;
    letter-spacing: 0.12em !important;
    color: var(--acc-hot) !important;
    text-shadow: 0 0 70px rgba(255, 61, 77, 0.55), 0 8px 30px rgba(0, 0, 0, 0.9);
    animation: ls-pop 620ms cubic-bezier(0.16, 1, 0.3, 1) both;
}
#game-over-xp-summary { animation: ls-rise 520ms cubic-bezier(0.16, 1, 0.3, 1) 180ms both; }
#postgame-leaderboard { animation: ls-rise 520ms cubic-bezier(0.16, 1, 0.3, 1) 300ms both; }

#scoreboard-inner, #postgame-leaderboard {
    background: linear-gradient(165deg, var(--s-2), var(--s-0)) !important;
    border: 1px solid var(--line) !important;
    box-shadow: var(--lift), var(--rim) !important;
    clip-path: polygon(var(--notch) 0, 100% 0, 100% calc(100% - var(--notch)),
               calc(100% - var(--notch)) 100%, 0 100%, 0 var(--notch));
}
#scoreboard-inner h2 {
    font-family: 'Cinzel', serif !important; font-weight: 900 !important;
    letter-spacing: 0.22em !important; color: var(--t-hi) !important;
}
#scoreboard table, #postgame-leaderboard table { width: 100%; border-collapse: collapse; }
#scoreboard th, #postgame-leaderboard th {
    font-size: 9px !important; letter-spacing: 0.24em !important;
    text-transform: uppercase; color: var(--acc) !important;
    text-align: left; padding: 10px 12px !important;
    border-bottom: 1px solid var(--line) !important;
}
#scoreboard td, #postgame-leaderboard td {
    padding: 9px 12px !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04) !important;
    font-variant-numeric: tabular-nums;
}
#scoreboard tbody tr:hover, #postgame-leaderboard tbody tr:hover {
    background: rgba(255, 140, 42, 0.06);
}

/* Downed / revive states read as urgent rather than incidental. */
#downed-text {
    font-family: 'Cinzel', serif !important; font-weight: 900 !important;
    letter-spacing: 0.2em !important; color: var(--acc-hot) !important;
    text-shadow: 0 0 40px rgba(255, 61, 77, 0.7);
}
#downed-timer { font-variant-numeric: tabular-nums; color: var(--t-hi) !important; }
#revive-prompt-text {
    letter-spacing: 0.18em; text-transform: uppercase;
    background: rgba(8, 10, 14, 0.8); border: 1px solid var(--line-hi);
    padding: 9px 16px; backdrop-filter: blur(8px);
}

/* ── Special round announcement ──────────────────────────────────────────── */

.hudfx-special {
    position: absolute; left: 50%; top: 21%;
    transform: translateX(-50%);
    text-align: center; pointer-events: none;
    animation: hudfx-special-in 620ms cubic-bezier(0.16, 1, 0.3, 1) both;
}
.hudfx-special.out { animation: hudfx-special-out 620ms ease forwards; }
.hudfx-special-name {
    font-family: 'Cinzel', serif; font-weight: 900;
    font-size: clamp(38px, 4.6vw, 74px); line-height: 1;
    letter-spacing: 0.16em; color: var(--acc-hot);
    text-shadow: 0 0 60px rgba(255, 61, 77, 0.65), 0 6px 26px rgba(0, 0, 0, 0.9);
}
.hudfx-special-desc {
    margin-top: 10px;
    font-size: 12px; letter-spacing: 0.34em; text-transform: uppercase;
    color: var(--t); text-shadow: 0 2px 10px rgba(0, 0, 0, 0.95);
}
.hudfx-special::after {
    content: ''; display: block; margin: 14px auto 0; width: 190px; height: 1px;
    background: linear-gradient(90deg, transparent, var(--acc-hot), transparent);
}
@keyframes hudfx-special-in {
    0%   { opacity: 0; transform: translateX(-50%) scale(0.86); letter-spacing: 0.5em; }
    100% { opacity: 1; transform: translateX(-50%) scale(1); }
}
@keyframes hudfx-special-out {
    to { opacity: 0; transform: translateX(-50%) translateY(-18px); }
}

/* ══════════════════════════════════════════════════════════════════════════
   Horde intro — civil-defence emergency broadcast before wave 1.
   Paired with static/js/horde_intro.js.
   ══════════════════════════════════════════════════════════════════════════ */

#horde-intro {
    position: fixed;
    inset: 0;
    z-index: 15000;
    display: none;
    pointer-events: none;
    overflow: hidden;
    background:
        radial-gradient(120% 90% at 50% 40%, rgba(40, 6, 4, .78) 0%, rgba(6, 4, 4, .96) 62%, #050303 100%);
    font-family: 'Rajdhani', 'Oswald', system-ui, sans-serif;
    opacity: 0;
    transition: opacity .45s ease;
}
#horde-intro.on  { display: block; }
#horde-intro.run { opacity: 1; }
#horde-intro.out { opacity: 0; }

/* Rotating siren beam. */
#horde-intro .hi-sweep {
    position: absolute;
    inset: -40%;
    background: conic-gradient(from 0deg,
        rgba(255, 46, 24, 0) 0deg,
        rgba(255, 60, 30, .30) 12deg,
        rgba(255, 90, 40, .07) 34deg,
        rgba(255, 46, 24, 0) 62deg,
        rgba(255, 46, 24, 0) 180deg,
        rgba(255, 60, 30, .24) 192deg,
        rgba(255, 46, 24, 0) 238deg,
        rgba(255, 46, 24, 0) 360deg);
    filter: blur(18px);
    opacity: 0;
    transform-origin: 50% 50%;
}
#horde-intro.run .hi-sweep { opacity: 1; animation: hi-sweep 2.4s linear infinite; }
@keyframes hi-sweep { to { transform: rotate(360deg); } }

#horde-intro .hi-vignette {
    position: absolute; inset: 0;
    background: radial-gradient(70% 60% at 50% 50%, transparent 38%, rgba(0, 0, 0, .86) 100%);
}

/* CRT scanlines over everything. */
#horde-intro .hi-scan {
    position: absolute; inset: 0;
    background: repeating-linear-gradient(
        to bottom,
        rgba(0, 0, 0, 0) 0px,
        rgba(0, 0, 0, 0) 2px,
        rgba(0, 0, 0, .34) 3px,
        rgba(0, 0, 0, .34) 4px);
    mix-blend-mode: multiply;
    opacity: .7;
}
#horde-intro.run .hi-scan { animation: hi-scanroll 9s linear infinite; }
@keyframes hi-scanroll { to { background-position-y: 96px; } }

/* Red wash pulsing in time with the siren. */
#horde-intro .hi-strobe {
    position: absolute; inset: 0;
    background: radial-gradient(90% 70% at 50% 45%, rgba(255, 38, 20, .30), transparent 70%);
    opacity: 0;
}
#horde-intro.run   .hi-strobe { animation: hi-strobe 2.4s ease-in-out infinite; }
#horde-intro.final .hi-strobe { animation-duration: 1.1s; }
@keyframes hi-strobe { 0%, 100% { opacity: .12; } 46% { opacity: .62; } }

#horde-intro .hi-frame {
    position: absolute; inset: 0;
    display: flex; flex-direction: column; align-items: center; justify-content: space-between;
    padding: 5vh 4vw;
    text-align: center;
}

/* ── Top ticker ─────────────────────────────────────────────────────────── */
#horde-intro .hi-top {
    display: flex; align-items: center; gap: 14px;
    width: min(1100px, 92vw);
    border-top: 1px solid rgba(255, 74, 40, .5);
    border-bottom: 1px solid rgba(255, 74, 40, .5);
    background: rgba(40, 8, 4, .5);
    padding: 7px 12px;
    overflow: hidden;
}
#horde-intro .hi-dot {
    flex: 0 0 auto; width: 10px; height: 10px; border-radius: 50%;
    background: #ff3a1c; box-shadow: 0 0 12px #ff3a1c;
}
#horde-intro.run .hi-dot { animation: hi-blink 1.2s steps(1, end) infinite; }
@keyframes hi-blink { 50% { opacity: .15; box-shadow: none; } }

#horde-intro .hi-marquee { flex: 1 1 auto; overflow: hidden; white-space: nowrap; }
#horde-intro .hi-marquee > span {
    display: inline-block; padding-left: 100%;
    font-size: clamp(11px, 1.15vw, 15px);
    letter-spacing: .34em; color: #ffb9a4;
    text-shadow: 0 0 10px rgba(255, 60, 30, .6);
}
#horde-intro.run .hi-marquee > span { animation: hi-marquee 14s linear infinite; }
@keyframes hi-marquee { to { transform: translateX(-100%); } }

/* ── Centre block ───────────────────────────────────────────────────────── */
#horde-intro .hi-mid { display: flex; flex-direction: column; align-items: center; gap: 10px; }

#horde-intro .hi-kicker {
    font-size: clamp(11px, 1.2vw, 15px);
    letter-spacing: .46em; color: #ff7a5c; opacity: 0;
    text-shadow: 0 0 14px rgba(255, 60, 30, .7);
}
#horde-intro.run .hi-kicker { animation: hi-fadein .5s .25s ease forwards; }

#horde-intro .hi-title {
    position: relative;
    font-size: clamp(42px, 9.5vw, 138px);
    font-weight: 800; line-height: .95;
    letter-spacing: .06em; color: #fff;
    text-shadow: 0 0 40px rgba(255, 52, 24, .75), 0 6px 0 rgba(90, 10, 4, .6);
    opacity: 0;
}
#horde-intro.run .hi-title { animation: hi-slam .62s .45s cubic-bezier(.16, 1, .3, 1) forwards; }
@keyframes hi-slam {
    0%   { opacity: 0; transform: scale(1.5); filter: blur(14px); letter-spacing: .34em; }
    60%  { opacity: 1; }
    100% { opacity: 1; transform: scale(1);   filter: blur(0);    letter-spacing: .06em; }
}
/* RGB split on two pseudo copies — the glitch. */
#horde-intro .hi-title::before,
#horde-intro .hi-title::after {
    content: attr(data-text);
    position: absolute; inset: 0;
    text-shadow: none;
}
#horde-intro .hi-title::before { color: #ff2d18; }
#horde-intro .hi-title::after  { color: #22d3ee; }
#horde-intro.run .hi-title::before { animation: hi-glitch-a 3.1s steps(2, end) .9s infinite; }
#horde-intro.run .hi-title::after  { animation: hi-glitch-b 2.7s steps(2, end) 1.2s infinite; }
@keyframes hi-glitch-a {
    0%, 92%, 100% { opacity: 0; transform: none; clip-path: none; }
    93% { opacity: .85; transform: translate(-5px, 2px); clip-path: inset(12% 0 58% 0); }
    96% { opacity: .85; transform: translate(4px, -3px); clip-path: inset(62% 0 8% 0); }
}
@keyframes hi-glitch-b {
    0%, 90%, 100% { opacity: 0; transform: none; clip-path: none; }
    91% { opacity: .7; transform: translate(6px, -2px); clip-path: inset(40% 0 34% 0); }
    95% { opacity: .7; transform: translate(-4px, 3px); clip-path: inset(6% 0 76% 0); }
}
#horde-intro.final .hi-title { color: #ffd9cf; text-shadow: 0 0 60px rgba(255, 40, 18, .95); }

#horde-intro .hi-map {
    font-size: clamp(14px, 1.9vw, 24px);
    letter-spacing: .38em; color: #e7c9bf; opacity: 0;
}
#horde-intro.run .hi-map { animation: hi-fadein .6s .95s ease forwards; }

#horde-intro .hi-rule {
    width: min(560px, 76vw); height: 1px; opacity: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 90, 50, .9), transparent);
}
#horde-intro.run .hi-rule { animation: hi-fadein .5s 1.1s ease forwards; }

#horde-intro .hi-lines {
    display: flex; flex-direction: column; gap: 5px;
    min-height: 116px; margin-top: 4px;
}
#horde-intro .hi-line {
    font-size: clamp(13px, 1.6vw, 20px);
    letter-spacing: .13em; color: #cdbdb6;
    text-shadow: 0 0 12px rgba(0, 0, 0, .9);
    animation: hi-linein .55s cubic-bezier(.16, 1, .3, 1) both;
}
@keyframes hi-linein {
    from { opacity: 0; transform: translateY(9px); filter: blur(5px); }
    to   { opacity: 1; transform: none;            filter: blur(0); }
}

/* ── Countdown ──────────────────────────────────────────────────────────── */
#horde-intro .hi-bottom { display: flex; flex-direction: column; align-items: center; gap: 6px; }

#horde-intro .hi-cd-label {
    font-size: clamp(10px, 1.05vw, 13px);
    letter-spacing: .52em; color: #ff8e72; opacity: 0;
}
#horde-intro.run .hi-cd-label { animation: hi-fadein .5s 1.3s ease forwards; }

#horde-intro .hi-cd {
    font-variant-numeric: tabular-nums;
    font-size: clamp(48px, 7vw, 96px);
    font-weight: 800; line-height: 1; color: #fff;
    text-shadow: 0 0 34px rgba(255, 70, 34, .8);
}
#horde-intro .hi-cd.beat { animation: hi-beat .42s cubic-bezier(.16, 1, .3, 1); }
@keyframes hi-beat {
    0%   { transform: scale(1.34); text-shadow: 0 0 60px rgba(255, 90, 44, 1); }
    100% { transform: scale(1);    text-shadow: 0 0 34px rgba(255, 70, 34, .8); }
}
#horde-intro.final .hi-cd { color: #ff5334; text-shadow: 0 0 52px rgba(255, 40, 16, 1); }

#horde-intro .hi-track {
    width: min(620px, 82vw); height: 3px;
    background: rgba(255, 255, 255, .1);
    overflow: hidden;
}
#horde-intro .hi-track > i {
    display: block; height: 100%; width: 100%;
    background: linear-gradient(90deg, #ff2d18, #ff8a3c);
    box-shadow: 0 0 14px rgba(255, 80, 40, .9);
    transition: width .12s linear;
}

#horde-intro .hi-foot {
    margin-top: 6px;
    font-size: clamp(10px, 1.1vw, 14px);
    letter-spacing: .4em; color: #9c8a84; opacity: 0;
}
#horde-intro.run .hi-foot { animation: hi-fadein .6s 1.5s ease forwards; }

@keyframes hi-fadein { to { opacity: 1; } }

/* Respect the OS setting: keep the information, drop the motion. */
@media (prefers-reduced-motion: reduce) {
    #horde-intro .hi-sweep,
    #horde-intro .hi-strobe,
    #horde-intro .hi-scan { animation: none !important; }
    #horde-intro .hi-title::before,
    #horde-intro .hi-title::after { display: none; }
    #horde-intro.run .hi-title { animation: hi-fadein .4s ease forwards; }
    #horde-intro .hi-cd.beat { animation: none; }
}

/* ══════════════════════════════════════════════════════════════════════════
   Dev tools (DebugMenu). Only ever rendered for an account the server has
   flagged is_dev — see static/js/debug_menu.js.
   ══════════════════════════════════════════════════════════════════════════ */

#dev-tools {
    position: fixed;
    top: 56px; right: 14px;
    width: 340px; max-height: calc(100vh - 100px);
    display: none; flex-direction: column;
    z-index: 16000;
    background: rgba(11, 14, 19, .96);
    border: 1px solid #2a323d;
    border-radius: 8px;
    box-shadow: 0 18px 50px rgba(0, 0, 0, .6);
    font: 12px/1.5 ui-monospace, Menlo, Consolas, monospace;
    color: #d7dee7;
    backdrop-filter: blur(6px);
}
#dev-tools.on { display: flex; }

#dev-tools .dbg-head {
    display: flex; align-items: center; gap: 8px;
    padding: 8px 10px;
    border-bottom: 1px solid #2a323d;
    background: linear-gradient(180deg, rgba(60, 80, 110, .30), transparent);
}
#dev-tools .dbg-title {
    font-size: 11px; letter-spacing: .2em; color: #7fd4ff; font-weight: 700;
}
#dev-tools .dbg-status { flex: 1; color: #6b7684; font-size: 11px; text-align: right; }
#dev-tools .dbg-close {
    background: none; border: none; color: #8b97a6; cursor: pointer;
    font-size: 18px; line-height: 1; padding: 0 2px;
}
#dev-tools .dbg-close:hover { color: #fff; }

#dev-tools .dbg-tabs {
    display: flex; flex-wrap: wrap; gap: 3px;
    padding: 7px 8px; border-bottom: 1px solid #2a323d;
}
#dev-tools .dbg-tab {
    background: #171d25; color: #9aa6b4; border: 1px solid #2a323d;
    border-radius: 4px; padding: 4px 8px; cursor: pointer; font: inherit;
}
#dev-tools .dbg-tab:hover { background: #1f2831; color: #d7dee7; }
#dev-tools .dbg-tab.on { background: #244055; border-color: #3f7ba6; color: #cfe9ff; }

#dev-tools .dbg-body { overflow-y: auto; padding: 10px; }

#dev-tools .dbg-section { margin-bottom: 12px; }
#dev-tools .dbg-section-title {
    font-size: 10px; letter-spacing: .18em; text-transform: uppercase;
    color: #6b7684; margin-bottom: 5px;
    border-bottom: 1px solid #202832; padding-bottom: 3px;
}
#dev-tools .dbg-row { display: flex; align-items: center; gap: 8px; margin-bottom: 5px; }
#dev-tools .dbg-label { color: #8b97a6; min-width: 76px; }

#dev-tools .dbg-toggle {
    display: flex; align-items: center; gap: 7px;
    margin-bottom: 4px; cursor: pointer; user-select: none;
}
#dev-tools .dbg-toggle input { accent-color: #4b9fd4; cursor: pointer; }

#dev-tools .dbg-slider { margin-bottom: 8px; }
#dev-tools .dbg-slider-head { display: flex; justify-content: space-between; color: #8b97a6; }
#dev-tools .dbg-slider-head .dbg-val { color: #7fd4ff; }
#dev-tools .dbg-slider input { width: 100%; accent-color: #4b9fd4; }

#dev-tools .dbg-btn {
    background: #1d2833; color: #cfe9ff; border: 1px solid #35505f;
    border-radius: 4px; padding: 5px 10px; cursor: pointer; font: inherit;
    margin: 0 4px 4px 0;
}
#dev-tools .dbg-btn:hover { background: #274050; }

#dev-tools .dbg-select {
    flex: 1; background: #171d25; color: #d7dee7;
    border: 1px solid #2a323d; border-radius: 4px; padding: 4px 6px; font: inherit;
}

#dev-tools .dbg-readout {
    margin: 0; padding: 7px 8px;
    background: #0d1117; border: 1px solid #202832; border-radius: 4px;
    color: #9fd7a8; font: inherit; white-space: pre-wrap; word-break: break-word;
}

/* The hint chip that tells a dev the tools are there at all. */
#debug-hint {
    position: fixed; top: 10px; right: 14px; z-index: 15900;
    background: rgba(36, 64, 85, .9); border: 1px solid #3f7ba6;
    color: #cfe9ff; border-radius: 5px; padding: 3px 9px;
    font: 11px/1.5 ui-monospace, Menlo, Consolas, monospace;
    letter-spacing: .1em; pointer-events: none;
    opacity: 0; transition: opacity .3s;
}
#debug-hint.on { opacity: .85; }
