/* =====================================================================
   Afterlife Public Site — Sidebar Navigation
   Replaces the horizontal site-header with a fixed left panel (desktop)
   and a bottom tab bar (mobile).
   ===================================================================== */

:root {
    --cyan:   #00dfff;
    --purple: #b944ff;
    --green:  #31d17c;
    --amber:  #ffb52c;
    --red:    #ff4868;
    --blue:   #5865f2;
}

/* ─── Sidebar shell ─────────────────────────────────────────────────── */
.site-sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    width: 244px;
    display: flex;
    flex-direction: column;
    padding: 20px 12px 16px;
    border-right: 1px solid rgba(255, 181, 43, 0.18);
    background: #000;
    box-shadow: 4px 0 32px rgba(0, 0, 0, 0.9), inset -1px 0 0 rgba(255, 181, 43, 0.04);
    z-index: 1000;
    overflow: hidden;
    -webkit-tap-highlight-color: transparent;
}
.site-sidebar * {
    -webkit-tap-highlight-color: transparent;
}

/* Ash canvas — JS-driven particle system replaces CSS pseudo-element approach */
#sidebar-ash {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
}

/* ─── Brand / logo ──────────────────────────────────────────────────── */
.sidebar-brand {
    display: flex;
    justify-content: center;
    align-items: center;
    padding-bottom: 16px;
    margin-bottom: 12px;
    border-bottom: 1px solid rgba(255, 181, 43, 0.15);
    text-decoration: none;
    flex-shrink: 0;
}

.sidebar-brand .brand-logo {
    width: 192px;
    height: auto;
    object-fit: contain;
    filter: brightness(1.5) drop-shadow(0 0 6px rgba(255,255,255,0.35)) drop-shadow(0 0 14px rgba(255,181,43,0.28));
    animation: logo-bounce 2.8s ease-in-out infinite;
    transition: filter 0.22s;
    /* Force own GPU layer so iOS doesn't merge with the parent translateX drawer */
    isolation: isolate;
}

.sidebar-brand:hover .brand-logo,
.sidebar-brand:active .brand-logo {
    animation: none;
    transform: scale(1.08) translateY(-4px);
    filter: brightness(1.85) drop-shadow(0 0 12px rgba(255,255,255,0.9)) drop-shadow(0 0 30px rgba(255,181,43,0.75));
}

@keyframes logo-bounce {
    0%, 100% { transform: translateY(0px); }
    40%       { transform: translateY(-7px); }
    60%       { transform: translateY(-4px); }
}


/* ─── Profile page back button ─────────────────────────────────────── */
.profile-back-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 14px;
    margin-bottom: 16px;
    border: 1px solid rgba(185, 68, 255, .25);
    border-radius: 8px;
    background: rgba(185, 68, 255, .07);
    color: #9d6fc4;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: color .15s, background .15s, border-color .15s;
}
.profile-back-btn:hover {
    color: #c8aef0;
    background: rgba(185, 68, 255, .14);
    border-color: rgba(185, 68, 255, .45);
}
.profile-back-btn svg {
    width: 15px;
    height: 15px;
    stroke: currentColor;
    fill: none;
    stroke-width: 2.2;
    stroke-linecap: round;
    stroke-linejoin: round;
    flex-shrink: 0;
}

/* ─── Nav list ──────────────────────────────────────────────────────── */
.site-nav {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
    min-height: 0; /* prevents flex child from expanding past its allocation */
    overflow-y: auto;
    scrollbar-width: none;
}

.site-nav::-webkit-scrollbar {
    display: none;
}

.site-nav a {
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 11px;
    padding: 10px 12px;
    border: 1px solid transparent;
    border-left: 3px solid transparent;
    border-radius: 10px;
    color: rgba(255, 255, 255, 0.68);
    text-decoration: none;
    font-family: "Trebuchet MS", "Arial Narrow", Arial, sans-serif;
    font-size: 11px;
    font-weight: 900;
    letter-spacing: 1.6px;
    text-transform: uppercase;
    transition: background 0.18s, color 0.18s, transform 0.18s, border-color 0.18s;
    z-index: 1;
}

.site-nav a:hover {
    background: rgba(255, 255, 255, 0.05);
    color: rgba(255, 255, 255, 0.85);
}

.site-nav a.active {
    color: #fff;
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.05);
}

/* Tone: purple — Home */
.site-nav a.active[data-tone="purple"] {
    border-left-color: var(--purple);
    background: linear-gradient(90deg, rgba(185, 68, 255, 0.16), rgba(185, 68, 255, 0.03));
    box-shadow: inset 0 0 20px rgba(185, 68, 255, 0.07), 0 0 12px rgba(185, 68, 255, 0.12);
}

/* Tone: green — Map */
.site-nav a.active[data-tone="green"] {
    border-left-color: var(--green);
    background: linear-gradient(90deg, rgba(49, 209, 124, 0.14), rgba(49, 209, 124, 0.03));
    box-shadow: inset 0 0 20px rgba(49, 209, 124, 0.07), 0 0 12px rgba(49, 209, 124, 0.12);
}

/* Tone: red — Killfeed */
.site-nav a.active[data-tone="red"] {
    border-left-color: var(--red);
    background: linear-gradient(90deg, rgba(255, 72, 104, 0.14), rgba(255, 72, 104, 0.03));
    box-shadow: inset 0 0 20px rgba(255, 72, 104, 0.07), 0 0 12px rgba(255, 72, 104, 0.12);
}

/* Tone: cyan — Leaderboards (light blue) */
.site-nav a.active[data-tone="cyan"] {
    border-left-color: #3d9aff;
    background: linear-gradient(90deg, rgba(61, 154, 255, 0.14), rgba(61, 154, 255, 0.03));
    box-shadow: inset 0 0 20px rgba(61, 154, 255, 0.07), 0 0 12px rgba(61, 154, 255, 0.12);
}

/* Tone: amber — Factions */
.site-nav a.active[data-tone="amber"] {
    border-left-color: var(--amber);
    background: linear-gradient(90deg, rgba(255, 181, 44, 0.14), rgba(255, 181, 44, 0.03));
    box-shadow: inset 0 0 20px rgba(255, 181, 44, 0.07), 0 0 12px rgba(255, 181, 44, 0.12);
}

/* Tone: blue — Shop */
.site-nav a.active[data-tone="blue"] {
    border-left-color: var(--blue);
    background: linear-gradient(90deg, rgba(88, 101, 242, 0.14), rgba(88, 101, 242, 0.03));
    box-shadow: inset 0 0 20px rgba(88, 101, 242, 0.07), 0 0 12px rgba(88, 101, 242, 0.12);
}

/* ─── Nav icon ──────────────────────────────────────────────────────── */
.nav-icon {
    width: 17px;
    height: 17px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
    filter: drop-shadow(0 0 4px currentColor);
    flex-shrink: 0;
    z-index: 1;
}

/* ─── Nav matrix canvas ─────────────────────────────────────────────── */
.nav-matrix {
    display: block;
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: .32;
    pointer-events: none;
    z-index: 0;
    transition: opacity .2s;
}

.site-nav a:not(.active) .nav-matrix {
    display: none;
}

.site-nav a.active .nav-matrix {
    display: block;
    opacity: .8;
}

/* Keep text and icon on top of the canvas */
.site-nav a span,
.site-nav a .nav-icon {
    position: relative;
    z-index: 1;
}

/* ─── Main content offset ────────────────────────────────────────────── */
main {
    margin-left: 244px !important;
    margin-right: 0 !important;
    width: auto !important;
    min-height: 100vh;
}

/* ─── Content max-width — prevents extreme stretching on ultra-wide monitors */
.view {
    max-width: 1380px;
    margin-left: auto !important;
    margin-right: auto !important;
    width: 100%;
    box-sizing: border-box;
}
#home {
    max-width: 1800px;
}

/* ─── Profile 2-column detail grid ──────────────────────────────────── */
.profile-detail-grid {
    grid-template-columns: 1.5fr 1fr !important;
    align-items: start !important;
}
.profile-side-col {
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-width: 0;
}
.profile-side-col .panel {
    margin: 0 !important;
    width: 100% !important;
}

/* ─── Hero centering on wide monitors ───────────────────────────────── */
/* styles.css sets max-width:1760px on #home .hero with no margin:auto,
   so on >1984px viewports it left-aligns and looks off-center. */
#home .hero {
    margin-left: auto;
    margin-right: auto;
}

/* ─── Notification drawer clear-all button ───────────────────────────── */
.notif-head-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.notif-clear-btn {
    font-size: 11px !important;
    font-weight: 700 !important;
    color: #7a6d8a !important;
    background: none !important;
    border: none !important;
    padding: 2px 6px !important;
    border-radius: 4px !important;
    cursor: pointer !important;
    min-height: 0 !important;
    transition: color .15s;
}

.notif-clear-btn:hover {
    color: #ff4868 !important;
}

/* ─── Sidebar footer ─────────────────────────────────────────────────── */
.sidebar-foot {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding-top: 12px;
    border-top: 1px solid rgba(255, 181, 43, 0.12);
    margin-top: auto;
    flex-shrink: 0;
}

/* ─── Login / Profile button ─────────────────────────────────────────── */
.site-sidebar .login-button {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 13px;
    padding: 13px 14px;
    border: 1px solid rgba(255, 181, 43, 0.5);
    border-radius: 12px;
    background: rgba(255, 181, 43, 0.06);
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    font-size: 13px;
    font-weight: 700;
    transition: background 0.15s, color 0.15s, border-color 0.15s, box-shadow 0.15s;
    cursor: pointer;
    box-shadow: 0 0 0 1px rgba(255,181,43,0.12), 0 0 18px rgba(255,255,255,0.14), 0 0 36px rgba(255,255,255,0.05);
}

.site-sidebar .login-button:hover {
    background: rgba(255, 181, 43, 0.11);
    border-color: rgba(255, 181, 43, 0.75);
    box-shadow: 0 0 0 1px rgba(255,181,43,0.2), 0 0 22px rgba(255,255,255,0.2), 0 0 44px rgba(255,255,255,0.08);
    color: #fff;
}

/* Avatar wrapper — position:relative so the online dot can be absolute */
.login-avatar-wrap {
    position: relative;
    flex-shrink: 0;
    width: 46px;
    height: 46px;
}

.site-sidebar .login-button .login-avatar {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    display: block;
    border: 1px solid rgba(255, 181, 43, 0.45);
    object-fit: cover;
}

/* Colored dot — in-game online indicator on avatar corner */
.login-online-dot {
    position: absolute;
    bottom: 1px;
    right: 1px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    border: 2px solid #000;
    flex-shrink: 0;
}
.login-online-dot.online  { background: var(--green); box-shadow: 0 0 6px rgba(49,209,124,0.85); }
.login-online-dot.offline { background: #555; }

/* Info column — name + discord status + game status */
.login-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
    flex: 1;
}

.login-name {
    font-size: 13px;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.95);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.login-discord-status {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.3px;
    text-transform: uppercase;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.login-discord-status.linked   { color: rgba(255, 181, 43, 0.9); }
.login-discord-status.unlinked { color: rgba(255, 72, 104, 0.8); }

.login-gamertag {
    text-transform: none !important;
    letter-spacing: 0 !important;
}

.login-xbox-icon {
    width: 13px;
    height: 13px;
    object-fit: contain;
    flex-shrink: 0;
    display: inline-flex;
    vertical-align: middle;
}

.login-game-status {
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.3px;
    text-transform: uppercase;
}
.login-game-status.online  { color: var(--green); }
.login-game-status.offline { color: rgba(255, 72, 104, 0.8); }

/* ─── Notification button ────────────────────────────────────────────── */
.site-sidebar .notification-button {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 9px 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.04);
    color: rgba(255, 255, 255, 0.55);
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
    box-shadow: none;
}

.site-sidebar .notification-button:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.2);
    color: rgba(255, 255, 255, 0.85);
}

.site-sidebar .notification-button svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
    flex-shrink: 0;
}

/* Badge pill for notification count */
.site-sidebar .notification-button #notification-count:not(:empty) {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 9px;
    background: var(--red);
    color: #fff;
    font-size: 10px;
    font-weight: 800;
    line-height: 1;
    margin-left: auto;
}

/* ─── Discord button ─────────────────────────────────────────────────── */
.site-sidebar .discord-button {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 9px 12px;
    border: 1px solid rgba(88, 101, 242, 0.35);
    border-radius: 10px;
    background: rgba(88, 101, 242, 0.07);
    color: rgba(165, 180, 252, 0.9);
    text-decoration: none;
    font-size: 12px;
    font-weight: 700;
    transition: background 0.15s, color 0.15s, border-color 0.15s, box-shadow 0.15s;
    box-shadow: 0 0 14px rgba(255,255,255,0.1), 0 0 0 1px rgba(88,101,242,0.08);
}

.site-sidebar .discord-button:hover {
    background: rgba(88, 101, 242, 0.18);
    border-color: rgba(88, 101, 242, 0.6);
    color: #fff;
    box-shadow: 0 0 20px rgba(255,255,255,0.18), 0 0 0 1px rgba(88,101,242,0.14);
}

.site-sidebar .discord-button .discord-icon {
    width: 22px;
    height: 22px;
    fill: currentColor;
    flex-shrink: 0;
}

/* ─── Admin console link ─────────────────────────────────────────────── */
.site-sidebar .admin-console-link {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border: 1px solid rgba(255, 181, 44, .3);
    border-radius: 6px;
    background: rgba(255, 181, 44, .06);
    color: #e8c96a;
    text-decoration: none;
    font-size: 12px;
    font-weight: 700;
    transition: background .15s, color .15s;
}

.site-sidebar .admin-console-link:hover {
    background: rgba(255, 181, 44, .15);
    color: #fff;
}

/* ─── Profile popup (lives outside sidebar to escape transform clipping) ── */
#profile-popup.profile-popup {
    position: fixed;
    left: 252px;
    bottom: 80px;
    top: auto;
    right: auto;
    z-index: 1100;
}

/* ─── Notification drawer: black/gold/white theme ────────────────────── */
.notification-drawer[hidden] {
    display: none !important;
}

.notification-drawer {
    z-index: 1100 !important;
    background: #050505 !important;
    border: 1px solid rgba(255, 181, 43, 0.3) !important;
    box-shadow: 0 12px 48px rgba(0,0,0,0.95), 0 0 0 1px rgba(255,181,43,0.08), inset 0 1px 0 rgba(255,181,43,0.06) !important;
    border-radius: 12px !important;
    overflow: hidden !important;
    display: flex;
    flex-direction: column;
    max-height: min(72vh, 560px) !important;
}

#notification-list {
    overflow-y: auto !important;
    flex: 1 !important;
    min-height: 0 !important;
    scrollbar-width: thin;
    scrollbar-color: rgba(255,181,43,0.35) transparent;
}

#notification-list::-webkit-scrollbar {
    width: 4px;
}

#notification-list::-webkit-scrollbar-track {
    background: transparent;
}

#notification-list::-webkit-scrollbar-thumb {
    background: rgba(255, 181, 43, 0.35);
    border-radius: 2px;
}

#notification-list::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 181, 43, 0.65);
}

@media (max-width: 767px) {
    .notification-drawer {
        max-height: 65vh !important;
        right: 12px !important;
        left: 12px !important;
        width: auto !important;
    }

    .notification-drawer #close-notifications {
        width: 44px !important;
        height: 44px !important;
        min-width: 44px !important;
        min-height: 44px !important;
        touch-action: manipulation !important;
    }

    .notification-drawer .notif-clear-btn,
    .notification-drawer #clear-notifications {
        min-height: 36px !important;
        touch-action: manipulation !important;
    }

    .notification-item {
        touch-action: manipulation !important;
    }
}

.notification-drawer .panel-head {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    margin-bottom: 12px !important;
    padding-bottom: 10px !important;
    border-bottom: 1px solid rgba(255, 181, 43, 0.18) !important;
}

.notification-drawer .panel-head h2 {
    font-size: 10px !important;
    font-weight: 900 !important;
    letter-spacing: 3px !important;
    text-transform: uppercase !important;
    background: linear-gradient(to right, #ffb52b, #ffffff) !important;
    -webkit-background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
    background-clip: text !important;
    margin: 0 !important;
}

.notification-drawer .notif-head-actions {
    display: flex !important;
    align-items: center !important;
    gap: 6px !important;
}

.notification-drawer .notif-clear-btn,
.notification-drawer #clear-notifications {
    background: transparent !important;
    border: 1px solid rgba(255, 181, 43, 0.28) !important;
    color: rgba(255, 181, 43, 0.7) !important;
    font-size: 10px !important;
    font-weight: 700 !important;
    letter-spacing: 0.8px !important;
    text-transform: uppercase !important;
    border-radius: 6px !important;
    padding: 4px 10px !important;
    cursor: pointer !important;
    transition: background 0.15s, border-color 0.15s, color 0.15s !important;
    position: static !important;
}

.notification-drawer .notif-clear-btn:hover,
.notification-drawer #clear-notifications:hover {
    background: rgba(255, 181, 43, 0.08) !important;
    border-color: rgba(255, 181, 43, 0.55) !important;
    color: rgba(255, 181, 43, 1) !important;
}

.notification-drawer #close-notifications {
    background: transparent !important;
    border: 1px solid rgba(255, 255, 255, 0.15) !important;
    color: rgba(255, 255, 255, 0.45) !important;
    border-radius: 6px !important;
    width: 26px !important;
    height: 26px !important;
    padding: 0 !important;
    font-size: 16px !important;
    line-height: 1 !important;
    cursor: pointer !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    transition: background 0.15s, border-color 0.15s, color 0.15s !important;
    position: static !important;
}

.notification-drawer #close-notifications:hover {
    background: rgba(255, 255, 255, 0.06) !important;
    border-color: rgba(255, 255, 255, 0.35) !important;
    color: #fff !important;
}

.notification-item {
    background: rgba(255, 255, 255, 0.02) !important;
    border: 1px solid rgba(255, 255, 255, 0.06) !important;
    border-radius: 8px !important;
    transition: background 0.15s, border-color 0.15s !important;
    cursor: pointer !important;
}

.notification-item:hover {
    background: rgba(255, 181, 43, 0.1) !important;
    border-color: rgba(255, 181, 43, 0.3) !important;
}

.notification-item.unread {
    border-left: 3px solid rgba(255, 181, 43, 0.8) !important;
    background: rgba(255, 181, 43, 0.05) !important;
}

.notification-drawer p {
    color: rgba(255, 255, 255, 0.35) !important;
    font-size: 12px !important;
    text-align: center !important;
    padding: 16px 0 !important;
}

/* ─── Notification label text ────────────────────────────────────────── */
/* styles.css sets `.notification-button span { position:absolute; background:red... }`
   which turns ALL spans into badge pills. Override for the label span. */
.site-sidebar .notification-button .notif-label {
    position: static !important;
    display: inline !important;
    flex: 1 !important;
    text-align: left !important;
    font-size: 12px !important;
    font-weight: 700 !important;
    background: none !important;
    color: inherit !important;
    border-radius: 0 !important;
    min-width: 0 !important;
    height: auto !important;
    padding: 0 !important;
    top: auto !important;
    right: auto !important;
    line-height: inherit !important;
}

.site-sidebar .notification-button svg {
    filter: none !important;
}

/* ─── Override global refinements.css !important rules ──────────────────
   refinements.css sets border:0, padding:0, position:fixed etc. on these
   classes globally with !important. Sidebar-scoped rules here have higher
   specificity and also load last, so they take final precedence.
   ──────────────────────────────────────────────────────────────────────── */
.site-sidebar .notification-button {
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    background: rgba(255, 255, 255, 0.04) !important;
    box-shadow: none !important;
    color: rgba(255, 255, 255, 0.55) !important;
    padding: 9px 12px !important;
    position: relative !important;
    width: auto !important;
    min-width: 0 !important;
    min-height: 0 !important;
    max-width: none !important;
    margin: 0 !important;
    border-radius: 10px !important;
    justify-content: center !important;
    align-items: center !important;
}

.site-sidebar .login-button {
    position: static !important;
    right: auto !important;
    top: auto !important;
    display: flex !important;
    width: auto !important;
    max-width: none !important;
    min-width: 0 !important;
    min-height: 0 !important;
    padding: 13px 14px !important;
    font-size: 13px !important;
    background: rgba(255, 181, 43, 0.06) !important;
    border: 1px solid rgba(255, 181, 43, 0.5) !important;
    border-radius: 12px !important;
    box-shadow: 0 0 0 1px rgba(255,181,43,0.12), 0 0 18px rgba(255,255,255,0.14), 0 0 36px rgba(255,255,255,0.05) !important;
    z-index: auto !important;
    margin: 0 !important;
    overflow: visible !important;
    text-overflow: unset !important;
    white-space: normal !important;
}

/* ─── Body scroll lock when mobile sidebar is open ──────────────────── */
body.sidebar-open {
    overflow: hidden;
}

@media (max-width: 767px) {
    /* touch-action:none blocks rubber-band scroll behind the backdrop without
       position:fixed on body — which would misplace fixed children on iOS Safari */
    body.sidebar-open {
        touch-action: none;
    }
}

/* ─── Mobile topbar + backdrop (desktop: hidden) ───────────────────────── */
.mobile-topbar {
    display: none;
}

.sidebar-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .65);
    z-index: 955;
}

.sidebar-backdrop.open {
    display: block;
}

/* =====================================================================
   Mobile — hamburger + slide-in drawer (<768px)
   ===================================================================== */
@media (max-width: 767px) {
    /* Mobile topbar: hamburger + logo */
    .mobile-topbar {
        display: flex;
        position: fixed;
        top: 0; left: 0; right: 0;
        height: 54px;
        align-items: center;
        gap: 12px;
        padding: 0 14px;
        z-index: 950;
        background: linear-gradient(180deg, rgba(9,8,11,.98), rgba(7,6,9,.97));
        border-bottom: 1px solid rgba(255, 181, 43, 0.22);
        box-shadow: 0 4px 20px rgba(0,0,0,.4);
    }

    .mobile-hamburger {
        width: 38px;
        height: 38px;
        min-height: 0;
        padding: 0;
        display: flex;
        align-items: center;
        justify-content: center;
        flex-shrink: 0;
        border: 1px solid rgba(255, 181, 43, 0.3);
        border-radius: 10px;
        background: rgba(255, 181, 43, 0.07);
        color: rgba(255, 181, 43, 0.85);
        cursor: pointer;
    }

    .mobile-hamburger svg {
        width: 20px;
        height: 20px;
        display: block;
        overflow: visible;
        fill: none;
        stroke: rgba(255, 181, 43, 0.85);
        stroke-width: 2.5px;
        stroke-linecap: round;
    }

    .mobile-hamburger svg path { stroke: inherit; fill: none; }

    .mobile-topbar-brand {
        position: absolute;
        inset: 0;
        display: flex;
        justify-content: center;
        align-items: center;
        pointer-events: none;
    }

    .mobile-topbar-logo { pointer-events: auto; }

    .mobile-topbar-logo {
        height: 34px;
        width: auto;
        object-fit: contain;
        filter: drop-shadow(0 0 4px rgba(185,68,255,.18));
    }

    /* Sidebar: hidden left drawer, slides in when .open */
    .site-sidebar {
        inset: 0 auto 0 0;
        width: 240px;
        flex-direction: column;
        padding: 20px 12px max(20px, env(safe-area-inset-bottom));
        border-right: 1px solid rgba(255, 181, 43, 0.18);
        border-top: none;
        box-shadow: 18px 0 45px rgba(0,0,0,.55);
        overflow-x: hidden;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        transform: translateX(-100%);
        transition: transform .25s cubic-bezier(.4, 0, .2, 1);
        z-index: 960;
    }

    .site-sidebar.open {
        transform: translateX(0);
    }

    /* Brand visible in mobile sidebar drawer — smaller logo so nav fits */
    .sidebar-brand {
        display: flex;
        padding-bottom: 10px;
        margin-bottom: 8px;
    }
    .sidebar-brand .brand-logo {
        width: 120px;
    }

    /* Nav: vertical like desktop — no independent scroll, sidebar scrolls as a whole */
    .site-nav {
        flex-direction: column;
        overflow: visible;
        flex: 0 0 auto;
        gap: 4px;
        align-items: stretch;
        margin: 0;
        padding: 0;
    }

    .site-nav a {
        flex-direction: row;
        align-items: center;
        gap: 11px;
        padding: 10px 12px;
        border: 1px solid transparent;
        border-left: 3px solid transparent;
        border-radius: 10px;
        font-size: 11px;
        white-space: normal;
        flex-shrink: 0;
    }

    .site-nav a.active {
        color: #fff;
        background: rgba(255, 255, 255, 0.06);
        border-color: rgba(255, 255, 255, 0.05);
    }

    .site-nav a.active[data-tone="purple"] { border-left-color: var(--purple) !important; background: linear-gradient(90deg, rgba(185,68,255,.16), rgba(185,68,255,.03)) !important; }
    .site-nav a.active[data-tone="green"]  { border-left-color: var(--green)  !important; background: linear-gradient(90deg, rgba(49,209,124,.14), rgba(49,209,124,.03)) !important; }
    .site-nav a.active[data-tone="red"]    { border-left-color: var(--red)    !important; background: linear-gradient(90deg, rgba(255,72,104,.14), rgba(255,72,104,.03)) !important; }
    .site-nav a.active[data-tone="cyan"]   { border-left-color: #3d9aff       !important; background: linear-gradient(90deg, rgba(61,154,255,.14), rgba(61,154,255,.03)) !important; }
    .site-nav a.active[data-tone="amber"]  { border-left-color: var(--amber)  !important; background: linear-gradient(90deg, rgba(255,181,44,.14), rgba(255,181,44,.03)) !important; }
    .site-nav a.active[data-tone="blue"]   { border-left-color: var(--blue)   !important; background: linear-gradient(90deg, rgba(88,101,242,.14), rgba(88,101,242,.03)) !important; }

    /* Matrix visible in mobile sidebar drawer */
    .nav-matrix { display: block; }

    /* Main: only topbar height as offset */
    main {
        margin-left: 0 !important;
        padding-top: 54px !important;
        padding-bottom: 0 !important;
    }

    /* Sidebar footer: vertical layout */
    .sidebar-foot {
        flex-direction: column;
        align-items: stretch;
        border-top: 1px solid rgba(255, 181, 43, 0.12);
        padding-top: 12px;
        margin-top: 16px;
        gap: 6px;
        flex-shrink: 0;
    }

    /* Login button: full-width row in mobile sidebar */
    .site-sidebar .login-button {
        position: static !important;
        right: auto !important;
        top: auto !important;
        display: flex !important;
        padding: 13px 14px !important;
        width: auto !important;
        max-width: none !important;
        min-width: 0 !important;
        min-height: 0 !important;
        height: auto !important;
        overflow: visible !important;
        border-radius: 12px !important;
        justify-content: flex-start !important;
        background: rgba(255,181,43,0.06) !important;
        border: 1px solid rgba(255,181,43,0.5) !important;
        box-shadow: 0 0 0 1px rgba(255,181,43,0.12), 0 0 18px rgba(255,255,255,0.14) !important;
        z-index: auto !important;
        font-size: 13px !important;
        gap: 13px !important;
        text-overflow: unset !important;
        white-space: normal !important;
    }

    .site-sidebar .login-button span { display: inline !important; }

    .site-sidebar .login-button .login-avatar {
        width: 46px !important;
        height: 46px !important;
        border-radius: 50% !important;
        display: block !important;
        flex-shrink: 0 !important;
    }

    /* Notification button: full-width row */
    .site-sidebar .notification-button {
        position: relative !important;
        width: auto !important;
        min-width: 0 !important;
        max-width: none !important;
        height: auto !important;
        min-height: 0 !important;
        padding: 9px 12px !important;
        justify-content: center !important;
        border-radius: 10px !important;
        flex-shrink: 0 !important;
        margin: 0 !important;
        border: 1px solid rgba(255, 255, 255, 0.1) !important;
        background: rgba(255, 255, 255, 0.04) !important;
        color: rgba(255, 255, 255, 0.55) !important;
    }

    /* Discord button — override refinements.css icon-only (32px/font-size:0) */
    .site-sidebar .discord-button {
        display: flex !important;
        width: auto !important;
        height: auto !important;
        min-width: 0 !important;
        min-height: 0 !important;
        padding: 9px 12px !important;
        font-size: 12px !important;
        gap: 10px !important;
        align-items: center !important;
        place-items: unset !important;
        grid-row: unset !important;
        border-radius: 10px !important;
    }

    /* Notification button: full-width row with label (same as desktop sidebar) */
    .site-sidebar .notification-button {
        width: auto !important;
        min-width: 0 !important;
        max-width: none !important;
        height: auto !important;
        min-height: 0 !important;
        padding: 9px 12px !important;
        justify-content: center !important;
        align-items: center !important;
        align-self: stretch !important;
        border-radius: 10px !important;
    }

    /* Profile popup: anchor to right edge so it stays on-screen */
    #profile-popup.profile-popup {
        position: fixed !important;
        left: auto !important;
        right: 8px !important;
        bottom: 80px !important;
        top: auto !important;
        z-index: 1100 !important;
        min-width: 160px !important;
        max-width: calc(100vw - 16px) !important;
    }

    /* Notification drawer: well above sidebar/backdrop on mobile */
    .notification-drawer {
        z-index: 1100 !important;
        right: 8px !important;
        top: 64px !important;
        width: calc(100vw - 16px) !important;
        max-width: 400px !important;
    }

    /* ─── Leaderboard toolbar: stack vertically on mobile ─────────── */
    .leaderboard-toolbar {
        flex-direction: column !important;
        gap: 10px !important;
        padding: 12px !important;
        align-items: stretch !important;
    }

    .leaderboard-toolbar > div {
        flex-direction: column !important;
        gap: 8px !important;
        display: flex !important;
    }

    .leaderboard-categories {
        display: flex !important;
        flex-wrap: wrap !important;
        gap: 6px !important;
    }

    .leaderboard-categories button {
        flex: 0 0 auto !important;
        font-size: 11px !important;
        padding: 4px 10px !important;
        min-height: 0 !important;
    }

    .leaderboard-tabs {
        display: flex !important;
        gap: 8px !important;
    }

    #leaderboard-search {
        width: 100% !important;
        max-width: none !important;
    }

    /* Faction creation dialog: scrollable on mobile */
    .faction-dialog {
        width: calc(100vw - 24px) !important;
        max-width: none !important;
        max-height: 90dvh !important;
        overflow-y: auto !important;
        margin: auto !important;
        padding: 16px !important;
    }

    .faction-dialog .identity-grid {
        grid-template-columns: repeat(3, 1fr) !important;
    }

    /* Profile: single column on mobile */
    .profile-detail-grid {
        grid-template-columns: 1fr !important;
    }
    .profile-side-col {
        width: 100% !important;
    }

    /* View max-width: full width on mobile */
    .view {
        max-width: 100% !important;
        margin: 0 !important;
    }

    /* Killfeed armband: hide on mobile — grid columns too narrow */
    .killfeed-armband {
        display: none !important;
    }
}

/* ─── Leaderboard faction tag ────────────────────────────────────────── */
.lb-faction-tag {
    font-size: 10px;
    font-style: normal;
    font-weight: 700;
    letter-spacing: 0.4px;
    margin-left: 5px;
    flex-shrink: 0;
}

/* ─── Killfeed armband badge ─────────────────────────────────────────── */
.killfeed-armband {
    width: 16px;
    height: 16px;
    object-fit: contain;
    border-radius: 2px;
    filter: drop-shadow(0 0 4px rgba(185, 68, 255, 0.6));
    vertical-align: middle;
    margin-right: 5px;
}

/* ─── Featured Factions Panel ────────────────────────────────────────── */
.featured-factions-wrap {
    margin-bottom: 28px;
    max-width: 920px;
    margin-left: auto;
    margin-right: auto;
}

.featured-factions-panel {
    display: grid !important;
    grid-template-columns: 1fr 320px 1fr !important;
    grid-template-rows: 1fr auto !important;
    gap: 0 !important;
    align-items: stretch !important;
    padding: 0 !important;
    min-height: 400px;
    overflow: hidden;
    position: relative;
    background-color: rgb(4, 2, 8) !important;
    background-image: url('/assets/ff-backdropV4.png') !important;
    background-size: cover !important;
    background-position: center center !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    border-color: rgba(255, 181, 43, 0.60) !important;
    box-shadow: 0 0 32px rgba(255,181,43,0.22), 0 12px 60px rgba(0,0,0,0.75), 0 0 0 1px rgba(255,181,43,0.35) !important;
}

/* Left column */
.ff-left {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 10px;
    padding: 28px 20px 28px 28px;
    background: transparent;
    box-shadow: none;
    position: relative;
    z-index: 2;
    grid-column: 1;
    grid-row: 1 / 3;
}

.ff-left::after {
    content: '';
    position: absolute;
    right: 0;
    top: 12%;
    height: 76%;
    width: 1px;
    background: linear-gradient(to bottom, transparent, rgba(255,181,43,0.14) 30%, rgba(255,181,43,0.14) 70%, transparent);
    pointer-events: none;
}

.ff-badge {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 1.8px;
    text-transform: uppercase;
    color: #FFB52B;
    border: 1px solid rgba(255, 181, 43, 0.55);
    border-radius: 20px;
    padding: 4px 11px;
    width: fit-content;
    background: rgba(255, 181, 43, 0.1);
    text-shadow: 0 0 10px rgba(255, 181, 43, 0.65);
}

.ff-badge i {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #FFB52B;
    box-shadow: 0 0 10px rgba(255,181,43,0.95), 0 0 22px rgba(255,181,43,0.55);
    flex-shrink: 0;
    animation: ff-blink 2s ease-in-out infinite;
}

@keyframes ff-blink {
    0%, 100% { opacity: 1; }
    50%       { opacity: 0.25; }
}

/* Badges row — allows multiple pills side by side */
.void-page-badges {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
}

/* LIVE 24/7 green pill */
.ff-live-badge {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 1.8px;
    text-transform: uppercase;
    color: #39ef9b;
    border: 1px solid rgba(57, 239, 155, 0.55);
    border-radius: 20px;
    padding: 4px 11px;
    width: fit-content;
    background: rgba(57, 239, 155, 0.1);
    text-shadow: 0 0 10px rgba(57, 239, 155, 0.65);
}
.ff-live-badge i {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #39ef9b;
    box-shadow: 0 0 10px rgba(57,239,155,0.95), 0 0 22px rgba(57,239,155,0.55);
    flex-shrink: 0;
    animation: ff-blink 1.4s ease-in-out infinite;
}

.ff-heading {
    display: flex;
    flex-direction: column;
    gap: 0;
    margin: 0;
}

.ff-h-gold {
    font-size: 38px;
    font-weight: 900;
    letter-spacing: -0.5px;
    line-height: 1.05;
    color: #FFB52B;
    text-shadow: 0 0 18px rgba(255,181,43,0.65), 0 0 40px rgba(255,150,20,0.30);
    text-transform: uppercase;
}

.ff-h-white {
    font-size: 33px;
    font-weight: 900;
    letter-spacing: -0.5px;
    line-height: 1.05;
    color: #ffffff;
    text-shadow: 0 0 16px rgba(255,255,255,0.55), 0 0 36px rgba(255,255,255,0.22);
    text-transform: uppercase;
}

.ff-sub {
    font-size: 13px;
    color: rgba(255,255,255,0.42);
    line-height: 1.6;
    max-width: 230px;
    margin: 0;
}

.ff-cta {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border: 1px solid rgba(255, 181, 43, 0.5);
    border-radius: 10px;
    background: rgba(255,181,43,0.06);
    color: rgba(255,181,43,0.9);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    cursor: pointer;
    width: fit-content;
    transition: border-color 180ms, background 180ms, color 180ms;
}

.ff-cta:hover {
    border-color: rgba(255, 181, 43, 0.9);
    background: rgba(255, 181, 43, 0.14);
    color: #FFB52B;
}

@keyframes ff-grid-drift {
    0%   { background-position: 0 0, 0 0, 0 0; }
    100% { background-position: 0 0, 32px 32px, 32px 32px; }
}

/* ── Center ── */
.ff-center {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 2;
    background: transparent;
    transition: opacity 0.32s ease, transform 0.32s ease;
    grid-column: 2;
    grid-row: 1 / 3;
}

.ff-center::after {
    content: '';
    position: absolute;
    right: 0;
    top: 12%;
    height: 76%;
    width: 1px;
    background: linear-gradient(to bottom, transparent, rgba(255,181,43,0.14) 30%, rgba(255,181,43,0.14) 70%, transparent);
    pointer-events: none;
}

.ff-center.ff-exit {
    opacity: 0;
    transform: scale(0.96);
}

.ff-center::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at 50% 30%, transparent 35%, rgba(8,8,10,0.3) 100%);
    pointer-events: none;
    z-index: 5;
}

.ff-stage {
    position: relative;
    width: 100%;
    height: 210px;
}

.ff-glow {
    position: absolute;
    top: 8%;
    left: 50%;
    transform: translateX(-50%);
    width: 150px;
    height: 150px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255,181,43,0.7) 0%, transparent 65%);
    filter: blur(22px);
    pointer-events: none;
    z-index: 0;
    animation: ff-pulse 2.8s ease-in-out infinite;
}

/* Amber platform glow at base, connecting armband to backdrop's platform */
.ff-glow::after {
    content: none;
}

@keyframes ff-pulse {
    0%, 100% { opacity: 0.45; transform: translateX(-50%) scale(0.88); }
    50%       { opacity: 0.95; transform: translateX(-50%) scale(1.22); }
}

.ff-stage::after { content: none; }

.ff-particles { position: absolute; inset: 0; pointer-events: none; z-index: 4; }

.ff-p {
    position: absolute;
    width: 3px;
    height: 3px;
    border-radius: 50%;
    background: rgba(255, 181, 43, 0.95);
    box-shadow: 0 0 6px rgba(255, 181, 43, 0.7), 0 0 12px rgba(255, 150, 10, 0.4);
}

.ff-p1  { top: 72%; left: 18%; animation: ff-particle 7s  0.0s ease-in-out infinite; width:4px; height:4px; }
.ff-p2  { top: 68%; left: 78%; animation: ff-particle 9s  1.5s ease-in-out infinite; width:2px; height:2px; }
.ff-p3  { top: 76%; left: 62%; animation: ff-particle 8s  0.8s ease-in-out infinite; width:3px; height:3px; }
.ff-p4  { top: 70%; left: 35%; animation: ff-particle 10s 3.2s ease-in-out infinite; width:2px; height:2px; }
.ff-p5  { top: 78%; left: 50%; animation: ff-particle 6s  2.0s ease-in-out infinite; width:3px; height:3px; }
.ff-p6  { top: 74%; left: 25%; animation: ff-particle 11s 0.5s ease-in-out infinite; width:2px; height:2px; }
.ff-p7  { top: 66%; left: 55%; animation: ff-particle 8s  4.4s ease-in-out infinite; width:4px; height:4px; }
.ff-p8  { top: 80%; left: 72%; animation: ff-particle 9s  1.1s ease-in-out infinite; width:2px; height:2px; }

@keyframes ff-particle {
    0%   { transform: translateY(0)     scale(1);   opacity: 0; }
    10%  { opacity: 1; }
    75%  { transform: translateY(-55px) scale(0.5); opacity: 0.5; }
    100% { transform: translateY(-75px) scale(0.1); opacity: 0; }
}

.ff-armband-img {
    position: absolute;
    top: 14%;
    left: 50%;
    transform: translateX(-50%);
    width: 170px;
    height: 170px;
    object-fit: contain;
    z-index: 3;
    animation: ff-float 5s ease-in-out infinite;
    filter: drop-shadow(0 0 28px rgba(255,181,43,0.75)) drop-shadow(0 18px 38px rgba(0,0,0,0.9));
}

@keyframes ff-float {
    0%   { transform: translateX(-50%) translateY(0px)   rotate(-4deg); }
    35%  { transform: translateX(-50%) translateY(-10px) rotate(4deg); }
    70%  { transform: translateX(-50%) translateY(-5px)  rotate(-1.5deg); }
    100% { transform: translateX(-50%) translateY(0px)   rotate(-4deg); }
}

.ff-beam {
    position: absolute;
    bottom: 7%;
    left: 50%;
    transform: translateX(-50%);
    width: 65px;
    height: 52%;
    background: linear-gradient(to top, rgba(255,181,43,1) 0%, rgba(255,181,43,0.55) 35%, rgba(255,181,43,0.12) 72%, transparent 100%);
    filter: blur(11px);
    pointer-events: none;
    z-index: 1;
    animation: ff-beam-pulse 2.8s ease-in-out infinite;
}

@keyframes ff-beam-pulse {
    0%, 100% { opacity: 0.65; }
    50%       { opacity: 1; }
}


/* ── Right detail panel — top (rank + name + status) ── */
.ff-detail-top {
    grid-column: 3;
    grid-row: 1;
    padding: 28px 28px 14px 20px;
    background: transparent;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 6px;
    position: relative;
    z-index: 2;
    transition: opacity 0.32s ease, transform 0.32s ease;
}

.ff-detail-top.ff-exit {
    opacity: 0;
    transform: translateX(8px);
}

/* ── Right detail panel — bottom (stats) ── */
.ff-detail {
    grid-column: 3;
    grid-row: 2;
    padding: 0 28px 28px 20px;
    border-left: none;
    background: transparent;
    box-shadow: none;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: flex-end;
    gap: 10px;
    position: relative;
    z-index: 2;
    transition: opacity 0.32s ease, transform 0.32s ease;
}

.ff-detail.ff-exit {
    opacity: 0;
    transform: translateX(8px);
}

/* Rank badge */
.ff-rank-badge {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 8px;
    width: 250px;
}

.ff-rank-emblem-img {
    width: 120px;
    height: 120px;
    object-fit: contain;
    filter: drop-shadow(0 0 20px rgba(255,181,43,0.45));
}

/* HUD label under armband */
.ff-hud-label {
    display: flex;
    align-items: center;
    gap: 8px;
    z-index: 3;
    white-space: nowrap;
    margin: 8px 0 0;
}

.ff-hud-line {
    width: 30px;
    height: 1px;
    background: linear-gradient(to right, transparent, rgba(255,181,43,0.55));
}

.ff-hud-line:last-child {
    background: linear-gradient(to left, transparent, rgba(255,181,43,0.55));
}

.ff-hud-tag {
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 4px;
    text-transform: uppercase;
    color: rgba(255,181,43,0.85);
    text-shadow: 0 0 14px rgba(255,181,43,0.55);
}

.ff-det-name {
    font-family: Impact, "Arial Black", "Trebuchet MS", sans-serif;
    font-size: 32px;
    font-weight: 900;
    letter-spacing: -0.5px;
    line-height: 1;
    text-transform: uppercase;
    color: #FFB52B;
    text-shadow: 0 0 18px rgba(255,181,43,0.65), 0 0 40px rgba(255,150,20,0.30);
    text-align: center;
}

.ff-det-status {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 10px;
    font-weight: 700;
    color: rgba(180,220,180,0.65);
    letter-spacing: 1px;
    text-transform: uppercase;
}

.ff-status-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--green);
    box-shadow: 0 0 7px var(--green);
    flex-shrink: 0;
    animation: ff-blink 2.5s ease-in-out infinite;
}

.ff-det-stats {
    display: flex;
    flex-direction: column;
    gap: 0;
    margin-top: 4px;
    width: 250px;
}

.ff-dstat {
    display: flex;
    align-items: center;
    gap: 10px;
    color: rgba(255,181,43,0.55);
    padding: 9px 0;
    border-bottom: 1px solid rgba(255,181,43,0.12);
}

.ff-dstat:last-child {
    border-bottom: none;
}

.ff-dstat-label {
    flex: 1;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 1.8px;
    text-transform: uppercase;
    color: rgba(255,255,255,0.82);
}

.ff-dstat b {
    font-size: 22px;
    font-weight: 900;
    color: #FFB52B;
    letter-spacing: -0.5px;
    line-height: 1;
    font-variant-numeric: tabular-nums;
    text-shadow: 0 0 20px rgba(255,181,43,0.4);
}

/* Top Member section */
.ff-top-member {
    margin-top: 10px;
    border-top: 1px solid rgba(255,181,43,0.18);
    padding-top: 10px;
    width: 250px;
}

.ff-tm-header {
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 2.5px;
    text-transform: uppercase;
    color: rgba(255,181,43,0.55);
    margin-bottom: 9px;
}

.ff-tm-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.ff-tm-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid rgba(255,181,43,0.35);
    flex-shrink: 0;
}

.ff-tm-info {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.ff-tm-name {
    display: flex;
    align-items: center;
    gap: 3px;
    font-size: 10px;
    font-weight: 800;
    color: #fff;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.ff-xbox-icon {
    width: 11px;
    height: 11px;
    object-fit: contain;
    flex-shrink: 0;
}

.ff-tm-kd {
    font-size: 10px;
    color: rgba(255,181,43,0.7);
    font-weight: 600;
    letter-spacing: 0.5px;
}

.ff-tm-name span {
    max-width: 68px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Top 3 members — horizontal, directly below clan tag */
.ff-top3 {
    display: flex;
    flex-direction: row;
    justify-content: center;
    gap: 6px;
    padding: 8px 10px 12px;
    width: 100%;
}

.ff-top3-row {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    flex: 1;
    max-width: 95px;
    border-bottom: none;
    padding: 0;
}

.ff-top3-rank {
    font-size: 9px;
    font-weight: 900;
    color: rgba(255,181,43,0.5);
    text-align: center;
    letter-spacing: 0.5px;
}

.ff-tm-avatar-placeholder {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: rgba(255,181,43,0.15);
    border: 1px solid rgba(255,181,43,0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 800;
    color: rgba(255,181,43,0.7);
    flex-shrink: 0;
}

/* Smoke behind armband */
.ff-smoke {
    position: absolute;
    bottom: -8px;
    left: 0;
    right: 0;
    margin: 0 auto;
    width: 240px;
    height: 110px;
    pointer-events: none;
    z-index: 1;
}

.ff-smoke::before,
.ff-smoke::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    left: 0;
    right: 0;
    margin: 0 auto;
}

.ff-smoke::before {
    width: 210px;
    height: 80px;
    background: radial-gradient(ellipse, rgba(255,160,40,0.26) 0%, rgba(255,120,20,0.12) 45%, transparent 70%);
    filter: blur(18px);
    bottom: 0;
    animation: ff-smoke-breathe 5s ease-in-out infinite alternate;
}

.ff-smoke::after {
    width: 150px;
    height: 55px;
    background: radial-gradient(ellipse, rgba(255,210,120,0.18) 0%, transparent 65%);
    filter: blur(14px);
    bottom: 20px;
    animation: ff-smoke-breathe 7s ease-in-out 1.5s infinite alternate-reverse;
}

@keyframes ff-smoke-shift {
    0%   { opacity: 0.75; }
    100% { opacity: 1; }
}

@keyframes ff-smoke-breathe {
    0%   { opacity: 0.55; }
    100% { opacity: 1; }
}

/* Drifting ambient particles — bezier curved paths via CSS Motion Path */
.ff-drift {
    position: absolute;
    border-radius: 50%;
    background: rgba(240, 235, 255, 0.88);
    offset-rotate: 0deg;
    animation: ff-drift-path var(--dur, 5s) linear var(--delay, 0s) infinite;
    pointer-events: none;
}

@keyframes ff-drift-path {
    0%   { offset-distance: 0%;   opacity: 0; }
    7%   { offset-distance: 7%;   opacity: 0.72; }
    93%  { offset-distance: 93%;  opacity: 0.72; }
    100% { offset-distance: 100%; opacity: 0; }
}

/* Fire ember particles — opacity:0 at both ends hides the position reset, seamless loop */
.ff-ember {
    position: absolute;
    border-radius: 50%;
    offset-rotate: auto;
    animation: ff-ember-path var(--dur, 5s) linear var(--delay, 0s) infinite;
    will-change: offset-distance, opacity;
    pointer-events: none;
}

/* Click-spawned embers need to appear instantly at the cursor, not fade in
   over ~15% of their duration like the ambient loop above — that fade-in
   made a freshly-spawned ember invisible for over a second while it had
   already drifted along its path, reading as both "click delay" and
   "appears offset from the cursor" once it finally became visible. */
.ff-ember.ff-ember-click {
    animation-name: ff-ember-click-path;
}
@keyframes ff-ember-click-path {
    0%   { offset-distance: 0%; opacity: 0.95; }
    85%  { opacity: 0.75; }
    100% { offset-distance: 100%; opacity: 0; }
}

@keyframes ff-ember-path {
    0%   { offset-distance: 0%;   opacity: 0; }
    7%   { offset-distance: 7%;   opacity: 0; }
    16%  { opacity: 0.88; }
    84%  { opacity: 0.88; }
    93%  { offset-distance: 93%;  opacity: 0; }
    100% { offset-distance: 100%; opacity: 0; }
}


/* Fiber-optic starfield */
.ff-starfield {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 1;
    overflow: hidden;
}

.ff-star {
    position: absolute;
    border-radius: 50%;
    animation: ff-twinkle var(--dur, 2.5s) linear var(--delay, 0s) infinite;
    animation-play-state: running;
    pointer-events: none;
}

@keyframes ff-twinkle {
    0%   { opacity: 0.06; }
    50%  { opacity: 1; }
    100% { opacity: 0.06; }
}

/* Mobile */
@media (max-width: 767px) {
    .featured-factions-wrap {
        margin: 0 10px 20px !important;
    }
    .featured-factions-panel {
        grid-template-columns: 1fr !important;
        grid-template-rows: auto auto auto auto !important;
        min-height: 0 !important;
        padding: 0 !important;
        background-size: auto 120% !important;
        background-position: 50% 0% !important;
    }
    /* Hide terminal panels on mobile — high specificity to beat styles.css (1,2,0) */
    #home .hero .system-panel,
    #home .hero .network-panel { display: none !important; }
    #home .hero {
        display: flex !important;
        flex-direction: column !important;
        align-items: stretch !important;
        grid-template-columns: 1fr !important;
        min-height: 0 !important;
        gap: 0 !important;
        padding: 12px 0 0 !important;
    }
    .hero-core-wrap {
        order: -1;
        width: 100%;
    }

    .ff-left {
        padding: 12px 16px 10px !important;
        text-align: center;
        align-items: center;
        background: linear-gradient(to bottom, rgba(8,8,10,0.35) 20%, transparent 100%) !important;
        gap: 6px !important;
        grid-column: 1 !important;
        grid-row: auto !important;
        order: 0;
    }
    .ff-badge { font-size: 9px; padding: 3px 9px; }
    .ff-h-gold { font-size: 20px !important; }
    .ff-h-white { font-size: 18px !important; }
    .ff-sub { display: none; }
    .ff-cta { padding: 8px 16px; font-size: 10px; }
    .ff-detail-top {
        grid-column: 1 !important; grid-row: auto !important;
        order: 1; padding: 8px 16px 18px; align-items: center;
    }
    .ff-detail-top::before { display: none; }
    @keyframes ff-float-mobile {
        0%   { transform: translateX(-50%) translateY(0px)  rotate(-3deg); }
        35%  { transform: translateX(-50%) translateY(-4px) rotate(3deg); }
        70%  { transform: translateX(-50%) translateY(-2px) rotate(-1deg); }
        100% { transform: translateX(-50%) translateY(0px)  rotate(-3deg); }
    }
    .ff-armband-img { animation: ff-float-mobile 5s ease-in-out infinite; }
    .ff-center { position: relative; align-items: center; justify-content: flex-start; order: 2; grid-column: 1 !important; grid-row: auto !important; }
    .ff-stage { height: 80px; }
    .ff-armband-img { width: 80px; height: 80px; top: 0; }
    .ff-glow { width: 80px; height: 80px; top: 0; }
    .ff-hud-label { margin: 0; gap: 4px; }
    .ff-top3 { padding: 4px 8px 8px; gap: 3px; }
    .ff-top3-row { max-width: 80px; }
    .ff-hud-line { width: 18px; }
    .ff-hud-tag { font-size: 10px; letter-spacing: 2px; }
    .ff-tm-avatar { width: 24px; height: 24px; }
    .ff-detail {
        background: transparent !important;
        padding: 8px 16px 12px !important;
        border-top: none;
        justify-content: flex-start;
        align-items: center !important;
        gap: 4px;
        text-align: center;
        order: 3;
        grid-column: 1 !important;
        grid-row: auto !important;
    }
    .ff-detail::before { display: none; }
    .ff-rank-badge { display: flex; flex-direction: column; align-items: center; gap: 4px; margin-bottom: 0; width: auto; }
    .ff-rank-emblem-img { width: 52px !important; height: 52px !important; }
    .ff-det-name { font-size: 22px !important; }
    .ff-det-status { display: none; }
    .ff-top-member { display: none; }
    .ff-det-stats {
        flex-direction: row !important;
        justify-content: space-around;
        gap: 0 !important;
        border-top: 1px solid rgba(255,181,43,0.12);
        padding-top: 6px;
        margin-top: 2px;
    }
    .ff-dstat { flex-direction: column; align-items: center; gap: 2px; padding: 0; border-bottom: none; }
    .ff-dstat svg { display: none; }
    .ff-dstat-label { font-size: 8px; letter-spacing: 0.8px; text-align: center; }
    .ff-dstat b { font-size: 14px; }
}

/* ─── Featured section header ───────────────────────────────────────── */
.featured-section-header {
    display: flex;
    align-items: center;
    gap: 14px;
    max-width: 1900px;
    margin: 0 auto 14px;
}
.featured-section-line {
    flex: 1;
    height: 1px;
    background: linear-gradient(to right, transparent, rgba(255,181,43,0.4), transparent);
}
.featured-section-label {
    font-family: "Trebuchet MS", "Arial Narrow", Arial, sans-serif;
    font-size: 15px;
    font-weight: 900;
    letter-spacing: 5px;
    text-transform: uppercase;
    color: #ffd04d;
    text-shadow: 0 0 8px rgba(255,255,255,0.9), 0 0 22px rgba(255,255,255,0.5), 0 0 40px rgba(255,181,43,0.6);
    white-space: nowrap;
}

/* ─── Featured panels side-by-side row ──────────────────────────────── */
.featured-panels-row {
    display: flex;
    gap: 20px;
    max-width: 1900px;
    margin: 0 auto 28px;
}

.featured-panels-row .featured-factions-wrap,
.featured-panels-row .featured-players-wrap {
    flex: 1 1 0;
    min-width: 0;
    max-width: none !important;
    margin: 0 !important;
}

@media (max-width: 767px) {
    .featured-panels-row { flex-direction: column; gap: 16px; margin-bottom: 16px; }
}

/* ─── Featured Players ───────────────────────────────────────────────── */
.featured-players-wrap {
    max-width: 920px;
    margin-left: auto;
    margin-right: auto;
    margin-bottom: 28px;
}

.featured-players-panel {
    display: grid !important;
    grid-template-columns: 1fr 320px 1fr !important;
    grid-template-rows: 1fr auto !important;
    gap: 0 !important;
    align-items: stretch !important;
    padding: 0 !important;
    min-height: 400px;
    overflow: hidden;
    position: relative;
    background-color: rgb(4, 2, 8) !important;
    background-image: url('/assets/ff-backdropV4.png') !important;
    background-size: cover !important;
    background-position: center center !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    border-color: rgba(255,181,43,0.60) !important;
    box-shadow: 0 0 32px rgba(255,181,43,0.22), 0 12px 60px rgba(0,0,0,0.75), 0 0 0 1px rgba(255,181,43,0.35) !important;
}

/* ── Players panel: blue accent overrides ── */
.featured-players-panel .ff-h-gold {
    color: #3D9AFF;
    text-shadow: 0 0 18px rgba(61,154,255,0.65), 0 0 40px rgba(0,90,220,0.30);
}
.featured-players-panel .ff-badge {
    color: #3D9AFF;
    border-color: rgba(61,154,255,0.55);
    background: rgba(61,154,255,0.1);
    text-shadow: 0 0 10px rgba(61,154,255,0.65);
}
.featured-players-panel .ff-badge i {
    background: #3D9AFF;
    box-shadow: 0 0 10px rgba(61,154,255,0.95), 0 0 22px rgba(61,154,255,0.55);
}
.featured-players-panel .ff-cta {
    color: #3D9AFF;
    border-color: rgba(61,154,255,0.45);
}
.featured-players-panel .ff-cta:hover {
    border-color: rgba(61,154,255,0.9);
    background: rgba(61,154,255,0.14);
    color: #3D9AFF;
}
.featured-players-panel .ff-det-name {
    color: #3D9AFF;
    text-shadow: 0 0 18px rgba(61,154,255,0.65), 0 0 40px rgba(0,90,220,0.30);
}
.featured-players-panel .ff-dstat b { color: #3D9AFF; }
.featured-players-panel .ff-dstat { border-bottom-color: rgba(61,154,255,0.12); }
.featured-players-panel .ff-left::after,
.featured-players-panel .ff-center::after {
    background: linear-gradient(to bottom, transparent, rgba(61,154,255,0.14) 30%, rgba(61,154,255,0.14) 70%, transparent);
}
/* Players panel glow — completely separate from ff-glow to avoid gold cascade */
.fp-glow {
    position: absolute;
    top: 8%;
    left: 50%;
    transform: translateX(-50%);
    width: 150px;
    height: 150px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(61,154,255,0.7) 0%, transparent 65%);
    filter: blur(22px);
    pointer-events: none;
    z-index: 0;
    animation: fp-pulse 2.8s ease-in-out infinite;
}

@keyframes fp-pulse {
    0%, 100% { opacity: 0.45; transform: translateX(-50%) scale(0.88); }
    50%       { opacity: 0.95; transform: translateX(-50%) scale(1.22); }
}
/* Circular player avatar */
.fp-avatar-img {
    position: absolute;
    top: 12%;
    left: 50%;
    transform: translateX(-50%);
    width: 150px;
    height: 150px;
    border-radius: 50%;
    object-fit: cover;
    z-index: 3;
    animation: ff-float 5s ease-in-out infinite;
    border: 2px solid rgba(61,154,255,0.45);
    filter: drop-shadow(0 0 24px rgba(61,154,255,0.65)) drop-shadow(0 14px 30px rgba(0,0,0,0.9));
}

/* Initial letter placeholder when no avatar */
.fp-avatar-placeholder {
    position: absolute;
    top: 12%;
    left: 50%;
    transform: translateX(-50%);
    width: 150px;
    height: 150px;
    border-radius: 50%;
    z-index: 3;
    background: rgba(61,154,255,0.08);
    border: 2px solid rgba(61,154,255,0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: Impact, "Arial Black", sans-serif;
    font-size: 64px;
    color: rgba(61,154,255,0.7);
    animation: ff-float 5s ease-in-out infinite;
}

/* Faction affiliation badge in center */
.fp-faction-badge {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 6px;
    padding: 4px 12px;
    background: rgba(61,154,255,0.06);
    border: 1px solid rgba(61,154,255,0.15);
    border-radius: 4px;
}

.fp-faction-arm {
    width: 20px;
    height: 20px;
    object-fit: contain;
    border-radius: 2px;
}

.fp-faction-name {
    font-size: 10px;
    letter-spacing: 1.5px;
    font-weight: 700;
    text-transform: uppercase;
    color: rgba(61,154,255,0.75);
    text-shadow: 0 0 10px rgba(61,154,255,0.35);
}

/* fp-stage: slightly taller to fit round avatar */
.fp-stage {
    height: 240px !important;
}

@media (max-width: 767px) {
    .featured-players-wrap { margin: 0 10px 20px !important; }
    .featured-players-panel {
        grid-template-columns: 1fr !important;
        grid-template-rows: auto auto auto auto !important;
        min-height: 0 !important;
        padding: 0 !important;
        background-size: auto 120% !important;
        background-position: 50% 0% !important;
    }
    .fp-avatar-img { width: 90px; height: 90px; top: 0; animation: ff-float-mobile 5s ease-in-out infinite; }
    .fp-avatar-placeholder { width: 90px; height: 90px; top: 0; font-size: 38px; animation: ff-float-mobile 5s ease-in-out infinite; }
    .fp-stage { height: 100px !important; }
    .fp-faction-badge { margin-top: 4px; padding: 3px 8px; }
}

/* ─── HQ metrics: 3-column (Faction Score removed) ──────────────────── */
.hq-metrics {
    grid-template-columns: repeat(3, 1fr) !important;
}

/* ─── Leaderboard faction armband badge ──────────────────────────────── */
.leaderboard-faction-badge {
    width: 28px !important;
    height: 28px !important;
    flex: none !important;
    object-fit: contain !important;
    border-radius: 4px !important;
    border: none !important;
    background: none !important;
    margin-left: 6px;
    flex-shrink: 0;
    vertical-align: middle;
    filter: drop-shadow(0 0 6px rgba(255,255,255,0.55));
}

/* Faction tab row logo — white glow, no purple box */
#leaderboards .faction-rank-row .rank-identity img {
    width: 28px !important;
    height: 28px !important;
    flex-basis: 28px !important;
    object-fit: contain !important;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    outline: none !important;
    border-radius: 4px !important;
    overflow: visible !important;
    flex-shrink: 0;
    filter: drop-shadow(0 0 6px rgba(255,255,255,0.55));
}

/* ─── Void page title — lean header floating in the dark void ─────────── */
.void-page-title {
    padding: 40px 4px 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin: 0 0 12px;
    background: none;
}

/* Big two-tone Impact heading — single row, fills the page width */
.void-heading {
    display: flex;
    flex-direction: row;
    align-items: baseline;
    gap: 0.32em;
    flex-wrap: nowrap;
    margin: 0;
    font-style: normal;
    text-shadow: none;
}

.void-heading .ff-h-gold {
    font-size: clamp(36px, 11vw, 155px) !important;
    font-family: Impact, "Arial Black", sans-serif !important;
    font-weight: 400 !important;
    letter-spacing: 5px !important;
    line-height: 1 !important;
    background: linear-gradient(95deg, #cc8800 0%, #ffb52b 22%, #fff5c0 48%, #ffd060 68%, #ff9500 88%, #ffb52b 100%) !important;
    -webkit-background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
    background-clip: text !important;
    color: transparent !important;
    text-shadow: none !important;
    filter: drop-shadow(0 0 28px rgba(255,181,43,0.45));
}

.void-heading .ff-h-white {
    font-size: clamp(36px, 11vw, 155px) !important;
    font-family: Impact, "Arial Black", sans-serif !important;
    font-weight: 400 !important;
    letter-spacing: 2px !important;
    line-height: 1 !important;
    background: linear-gradient(95deg, #ffffff 0%, #d8d8d8 28%, #aaaaaa 54%, #e8e8e8 80%, #cccccc 100%) !important;
    -webkit-background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
    background-clip: text !important;
    color: transparent !important;
    text-shadow: none !important;
    filter: drop-shadow(0 0 22px rgba(255,255,255,0.22));
}

.void-heading .ff-h-green {
    font-size: clamp(36px, 11vw, 155px) !important;
    font-family: Impact, "Arial Black", sans-serif !important;
    font-weight: 400 !important;
    letter-spacing: 5px !important;
    line-height: 1 !important;
    text-transform: uppercase !important;
    background: linear-gradient(95deg, #0a8a52 0%, #19f78f 22%, #d4fff0 48%, #4dffb0 68%, #0fae6b 88%, #19f78f 100%) !important;
    -webkit-background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
    background-clip: text !important;
    color: transparent !important;
    text-shadow: none !important;
    filter: drop-shadow(0 0 28px rgba(25,247,143,0.45));
}

.void-page-title .ff-sub {
    display: block !important;
    color: rgba(255, 255, 255, 0.82);
    font-size: clamp(15px, 1.4vw, 20px);
    line-height: 1.6;
    margin-top: 14px;
    letter-spacing: 0.3px;
}
#factions .void-page-title .ff-sub {
    max-width: none !important;
    width: fit-content !important;
    margin: 0 auto !important;
    text-align: center !important;
    white-space: nowrap !important;
}

/* Hero heading — dark panel, gold border, white outer glow */
#factions .void-page-title {
    border: 1px solid rgba(255,181,43,0.55) !important;
    background: rgba(0,0,0,0.5) !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    box-shadow: 0 0 0 1px rgba(255,181,43,0.18), 0 0 28px rgba(255,255,255,0.18), 0 0 60px rgba(255,255,255,0.08), 0 4px 32px rgba(0,0,0,0.45), inset 0 1px 0 rgba(255,181,43,0.12) !important;
    border-radius: 18px !important;
    padding: 32px 28px 24px !important;
    max-width: none !important;
    margin: 0 0 20px !important;
    text-align: center !important;
}

/* Heading: block so text-align:center applies; spans stay inline for one-line layout */
#factions .void-heading {
    display: block !important;
    text-align: center !important;
    white-space: nowrap !important;
    margin: 0 !important;
}
#factions .void-heading .ff-h-gold,
#factions .void-heading .ff-h-white {
    display: inline !important;
}

/* Badges row: block container so text-align:center works on inline-flex pills */
#factions .void-page-title .void-page-badges {
    display: block !important;
    text-align: center !important;
    margin-bottom: 4px;
}

/* Gold rule — full width block */
#factions .void-page-title::after {
    content: '';
    display: block;
    height: 1px;
    margin-top: 14px;
    background: linear-gradient(90deg, transparent 0%, rgba(255,181,43,0.2) 15%, rgba(255,220,100,0.6) 40%, rgba(255,220,100,0.6) 60%, rgba(255,181,43,0.2) 85%, transparent 100%);
    box-shadow: 0 0 10px rgba(255,181,43,0.45), 0 0 24px rgba(255,181,43,0.18);
}

/* Cancel the 1180px styles.css single-column collapse — factions stays multi-col */
@media (max-width: 1180px) {
    #factions .panel-grid { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; }
}
@media (max-width: 900px) {
    #factions .panel-grid { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
}

/* Faction grid — gold border container, white outer glow, full-width */
#factions .panel-grid {
    border: 1px solid rgba(255,181,43,0.5) !important;
    border-radius: 18px !important;
    padding: 12px !important;
    background: rgba(0,0,0,0.55) !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    box-shadow: 0 0 0 1px rgba(255,181,43,0.15), 0 0 28px rgba(255,255,255,0.18), 0 0 60px rgba(255,255,255,0.08), inset 0 1px 0 rgba(255,181,43,0.1) !important;
    max-width: none !important;
    margin: 0 !important;
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 12px !important;
    max-height: none !important;
    overflow-y: visible !important;
}

@media (max-width: 767px) {
    .void-page-title { padding: 22px 4px 10px; }
    #factions .void-page-title { padding: 28px 4px 16px !important; }
    .void-heading .ff-h-gold { letter-spacing: 2px !important; filter: drop-shadow(0 0 12px rgba(255,181,43,0.4)) !important; }
    .void-heading .ff-h-white { letter-spacing: 0px !important; filter: drop-shadow(0 0 10px rgba(255,255,255,0.2)) !important; }
    #factions .panel-grid { grid-template-columns: 1fr !important; gap: 10px !important; padding: 10px !important; }
    .void-page-title .ff-sub { font-size: 14px; }
    #factions .void-page-title .ff-sub { width: 100% !important; white-space: normal !important; text-align: center !important; margin: 0 !important; }
}

/* ─── Panel heading font — Impact style matching featured panels ─────── */
.panel-head h2,
.panel-head .killfeed-title {
    font-family: Impact, "Arial Black", sans-serif !important;
    font-size: clamp(15px, 1.6vw, 20px) !important;
    text-transform: uppercase !important;
    letter-spacing: 2px !important;
    font-weight: 400 !important;
    text-shadow: 0 0 16px currentColor !important;
}

/* small subtitle inside killfeed title stays muted */
.killfeed-title small {
    font-family: inherit;
    font-size: 10px !important;
    letter-spacing: 1px !important;
    opacity: 0.55;
    text-transform: uppercase;
    margin-left: 8px;
}

/* ─── Void mode — strip body bg image, corner frames, overlay ───────── */
body.void-mode {
    background-color: #000000 !important;
    background-image:
        linear-gradient(rgba(0,0,0,0.97), rgba(0,0,0,0.97)),
        url('/assets/ff-backdropV4.png') !important;
    background-size: cover, cover !important;
    background-position: center center !important;
    background-attachment: fixed !important;
}
/* Kill the purple corner bracket lines on main */
body.void-mode main::after { display: none !important; }
/* Kill the scanline/edge vignette overlay */
body.void-mode::before { display: none !important; }
/* Constellation stopped and hidden via JS */

/* ─── Void-mode full-page starfield ─────────────────────────────────── */
#home-bg-stars {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
    transform: translateZ(0);
    -webkit-transform: translateZ(0);
}
body.void-mode #home-bg-stars,
body.lb-mode #home-bg-stars { opacity: 0; pointer-events: none; }

#void-page-stars {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
    display: none;
    overflow: hidden;
    /* Force own GPU compositor layer — prevents iOS scroll thread from repainting this element */
    transform: translateZ(0);
    -webkit-transform: translateZ(0);
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}
body.void-mode #void-page-stars { display: block; }

/* ═══════════════════════════════════════════════════════
   #factions page — gold/white/red void redesign
═══════════════════════════════════════════════════════ */

/* Cards: warm neutral dark bg, flex layout, arm floats right */
/* --fc-border is set per-card by JS (extracted armband dominant color) */
#factions .faction-card {
    background:
        radial-gradient(ellipse 60% 90% at 88% 50%, rgba(var(--fc-star-rgb, 180,180,180), 0.07) 0%, transparent 100%),
        #000 !important;
    border-color: var(--fc-border, rgba(255,255,255,0.12)) !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    box-shadow:
        0 8px 36px rgba(0,0,0,0.68),
        inset 0 1px 0 rgba(255,255,255,0.04) !important;
    color: rgba(255,255,255,0.88);
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 0 !important;
    padding: 22px 24px 22px !important;
    min-height: 0 !important;
    position: relative !important;
    overflow: hidden !important;
}

/* Faction name — centered, gradient like FACTION HUB */
.void-fc-name {
    position: relative;
    z-index: 1;
    text-align: center;
    font-family: Impact, "Arial Black", sans-serif;
    font-size: clamp(17px, 2.2vw, 26px);
    font-weight: 400;
    letter-spacing: 2px;
    text-transform: uppercase;
    margin: 0 0 4px;
    color: #fff !important;
    -webkit-text-fill-color: #fff !important;
    background: none !important;
    text-shadow: 0 0 18px rgba(255,255,255,0.22);
}
.void-fc-tag {
    display: block;
    position: relative;
    z-index: 1;
    text-align: center;
    font-family: Impact, "Arial Black", sans-serif;
    font-size: 12px;
    letter-spacing: 4px;
    color: rgba(255,255,255,0.65);
    margin: 0 0 14px;
    text-shadow: 0 0 10px rgba(255,255,255,0.25);
}

/* Body row: stats left, armband right */
.void-fc-body {
    display: flex;
    align-items: center;
    gap: 20px;
    flex: 1;
}

/* Per-card starfield — z below content, colored by faction tone */
.fc-stars {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}
.fc-star {
    position: absolute;
    border-radius: 0;
    opacity: 0;
    background: rgb(var(--fc-star-rgb, 255,255,255));
    transform: rotate(45deg) scale(0.3);
    animation: fc-star-sparkle var(--dur, 6s) linear var(--delay, 0s) infinite;
}
@keyframes fc-star-sparkle {
    0%, 28%, 72%, 100% {
        opacity: 0;
        transform: rotate(45deg) scale(0.2);
        box-shadow: none;
    }
    50% {
        opacity: var(--peak, 1);
        transform: rotate(45deg) scale(1);
        box-shadow:
            0 0 var(--glow, 6px) 2px rgb(var(--fc-star-rgb, 255,255,255)),
            0 0 calc(var(--glow, 6px) * 3) rgba(var(--fc-star-rgb, 255,255,255), 0.65),
            18px 0 22px rgba(var(--fc-star-rgb, 255,255,255), 0.55),
            -18px 0 22px rgba(var(--fc-star-rgb, 255,255,255), 0.55),
            0 18px 22px rgba(var(--fc-star-rgb, 255,255,255), 0.55),
            0 -18px 22px rgba(var(--fc-star-rgb, 255,255,255), 0.55);
    }
}

/* Content layers sit above the stars */
.void-fc-left { position: relative; z-index: 1; }

#factions .faction-card:hover {
    border-color: var(--fc-border-hover, rgba(255,255,255,0.25)) !important;
    box-shadow: 0 14px 52px rgba(0,0,0,0.68), inset 0 1px 0 rgba(255,255,255,0.07) !important;
}

/* Left column */
.void-fc-left {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

/* Right column: armband — same float as featured panels */
.void-fc-arm {
    flex-shrink: 0;
    width: 100px;
    display: flex;
    align-items: flex-end;
    justify-content: flex-start;
    padding-bottom: 6px;
    padding-left: 2px;
    position: relative;
    z-index: 1;
}
.void-fc-arm .faction-large {
    border: none !important;
    background: transparent !important;
    box-shadow: none !important;
    width: auto !important;
    height: auto !important;
    transform: translateX(-14px) translateY(16px);
}
.void-fc-arm .faction-large img {
    width: 90px !important;
    height: 90px !important;
    object-fit: contain !important;
    filter: drop-shadow(0 0 18px rgba(255,255,255,0.7)) drop-shadow(0 8px 20px rgba(0,0,0,0.9));
    animation: void-arm-float 5s ease-in-out infinite;
    display: block !important;
}
/* Fallback for letter-only armbands */
.void-fc-arm .faction-large:not(:has(img)) {
    border: 2px solid currentColor !important;
    width: 72px !important;
    height: 72px !important;
    background: rgba(0,0,0,0.4) !important;
    border-radius: 10px !important;
    animation: void-arm-float 5s ease-in-out infinite;
}
@keyframes void-arm-float {
    0%   { transform: translateY(0px)   rotate(-4deg); }
    35%  { transform: translateY(-10px) rotate(4deg);  }
    70%  { transform: translateY(-5px)  rotate(-1.5deg); }
    100% { transform: translateY(0px)   rotate(-4deg); }
}

/* Faction name */
.void-fc-left h2 {
    color: var(--amber) !important;
    text-shadow: 0 0 22px rgba(255,181,43,0.5) !important;
    font-family: Impact, "Arial Black", sans-serif !important;
    font-size: 20px !important;
    letter-spacing: 1px !important;
    text-transform: uppercase !important;
    font-weight: 400 !important;
    margin: 0 0 2px !important;
}

/* Member count */
.void-fc-left > p { color: rgba(255,255,255,0.65); font-size: 12px; margin: 0 0 10px; }

/* Stats */
#factions .faction-public-stats { margin: 0 0 10px; }
#factions .faction-public-stats div { border-top-color: rgba(255,181,43,0.14) !important; padding: 5px 0; }
#factions .faction-public-stats dt { color: rgba(255,255,255,0.55); font-size: 10px; text-transform: uppercase; letter-spacing: 0.4px; }
#factions .faction-public-stats dd { color: var(--amber) !important; font-weight: 700; }
.fc-rank-emblem {
    width: 40px;
    height: 40px;
    object-fit: contain;
    display: block;
    filter: drop-shadow(0 0 7px rgba(255,181,43,0.55));
}

/* Recruitment: CLOSED = vivid red, OPEN = green */
#factions .recruitment-state { color: #e03030 !important; margin: 8px 0 10px; font-size: 11px; text-transform: uppercase; letter-spacing: 0.5px; }
#factions .recruitment-state i { background: #e03030 !important; box-shadow: 0 0 6px rgba(220,48,48,0.55) !important; }
#factions .recruitment-state.open { color: var(--green) !important; }
#factions .recruitment-state.open i { background: var(--green) !important; box-shadow: 0 0 8px rgba(25,247,143,0.65) !important; }

/* Buttons */
.void-fc-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 4px; }
.void-fc-actions button {
    border-color: rgba(255,181,43,0.38) !important;
    color: var(--amber) !important;
    background: rgba(255,181,43,0.06) !important;
    box-shadow: none !important;
    text-shadow: none !important;
    padding: 8px 18px !important;
    font-size: 12px !important;
}
.void-fc-actions button:hover {
    background: rgba(255,181,43,0.14) !important;
    border-color: rgba(255,181,43,0.72) !important;
    box-shadow: 0 0 18px rgba(255,181,43,0.2) !important;
}


/* Create Faction / Open HQ */
#factions .create-faction-button { border-color: rgba(255,181,43,0.48) !important; color: var(--amber) !important; background: rgba(255,181,43,0.07) !important; box-shadow: 0 0 20px rgba(255,181,43,0.22) !important; text-shadow: 0 0 12px rgba(255,181,43,0.45) !important; }
#factions .create-faction-button:hover { background: rgba(255,181,43,0.15) !important; border-color: rgba(255,181,43,0.78) !important; box-shadow: 0 0 30px rgba(255,181,43,0.34) !important; }
#factions .faction-actions > span { color: rgba(255,255,255,0.75) !important; }

/* ─── My Faction panel ──────────────────────────────────────────────── */
#my-faction-panel {
    margin-bottom: 20px;
}
#my-faction-panel .faction-card {
    border-top: 2px solid rgba(255,181,43,0.8) !important;
    box-shadow: 0 8px 36px rgba(0,0,0,0.68), 0 0 0 1px rgba(255,181,43,0.22), 0 0 40px rgba(255,181,43,0.06), inset 0 1px 0 rgba(255,255,255,0.04) !important;
}
.my-faction-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 9px;
    letter-spacing: 2.5px;
    text-transform: uppercase;
    color: rgba(255,181,43,0.9);
    font-weight: 700;
    font-family: "Trebuchet MS", Arial, sans-serif;
    margin-bottom: 6px;
    position: relative;
    z-index: 1;
}
.my-faction-eyebrow i {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: rgba(255,181,43,0.9);
    box-shadow: 0 0 7px rgba(255,181,43,0.9);
    flex-shrink: 0;
    font-style: normal;
    display: block;
}
.void-fc-actions .my-faction-hq-btn {
    background: rgba(255,181,43,0.14) !important;
    border-color: rgba(255,181,43,0.7) !important;
    color: #ffd04d !important;
    box-shadow: 0 0 18px rgba(255,181,43,0.22) !important;
    text-shadow: 0 0 8px rgba(255,181,43,0.4) !important;
    font-weight: 700 !important;
}
.void-fc-actions .my-faction-hq-btn:hover {
    background: rgba(255,181,43,0.24) !important;
    border-color: rgba(255,181,43,0.95) !important;
    box-shadow: 0 0 28px rgba(255,181,43,0.38) !important;
}

/* ─── Faction list divider ───────────────────────────────────────────── */
.faction-list-divider {
    margin-bottom: 16px;
}
.faction-list-divider .featured-section-label {
    font-size: 11px;
    background: linear-gradient(to right, #ffb52b 0%, #ffd060 25%, #fff8e8 55%, #ffffff 80%, #ffffff 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    color: transparent;
    text-shadow: none;
    letter-spacing: 4px;
    filter: drop-shadow(0 0 12px rgba(255,181,43,0.3));
}
.faction-list-divider .featured-section-line {
    background: linear-gradient(to right, transparent, rgba(255,255,255,0.1), transparent);
}

/* ─── View Members dialog — void redesign matching faction cards ─────── */
body.void-mode .public-faction-dialog {
    background: #000 !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    border-color: var(--fc-border, rgba(255,255,255,0.2)) !important;
    box-shadow: 0 20px 60px rgba(0,0,0,0.9), inset 0 1px 0 rgba(255,255,255,0.04) !important;
    position: relative !important;
    overflow: hidden !important;
}
/* Stars layer inside dialog */
body.void-mode .public-faction-dialog .fc-stars {
    position: absolute !important;
    inset: 0 !important;
    z-index: 0 !important;
    pointer-events: none !important;
    overflow: hidden !important;
}
/* Panel-head: kill the purple gradient, keep it clean */
body.void-mode .public-faction-dialog .panel-head {
    background: transparent !important;
    border-bottom: 1px solid rgba(255,255,255,0.08) !important;
    position: relative !important;
    z-index: 1 !important;
}
body.void-mode .public-faction-dialog .panel-head h2 {
    background: linear-gradient(90deg, #fff 0%, #e0e0e0 30%, #c0a84a 55%, #888 80%, #ccc 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-family: Impact, "Arial Black", sans-serif !important;
    text-transform: uppercase !important;
    letter-spacing: 2px !important;
    font-weight: 400 !important;
}
body.void-mode #close-public-faction {
    border-color: rgba(255,255,255,0.2) !important;
    color: rgba(255,255,255,0.5) !important;
    background: transparent !important;
    min-height: 0 !important;
}
body.void-mode #close-public-faction:hover {
    border-color: rgba(255,255,255,0.5) !important;
    color: #fff !important;
}
/* Members container: z above stars, scrollable */
body.void-mode #public-faction-members {
    position: relative !important;
    z-index: 1 !important;
}
body.void-mode .public-faction-overview {
    border-bottom: 1px solid rgba(255,255,255,0.07) !important;
    background: rgba(255,255,255,0.02) !important;
}
body.void-mode .public-faction-overview strong {
    background: linear-gradient(90deg, #fff 0%, #e0e0e0 30%, #c0a84a 55%, #888 80%, #ccc 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-family: Impact, "Arial Black", sans-serif !important;
    font-size: 16px !important;
    text-transform: uppercase !important;
    letter-spacing: 1px !important;
    font-weight: 400 !important;
}
body.void-mode .public-faction-overview span { color: rgba(255,255,255,0.4) !important; font-size: 11px !important; text-transform: uppercase !important; letter-spacing: 0.5px !important; }
body.void-mode .public-faction-overview b { color: rgba(255,255,255,0.55) !important; }
body.void-mode .public-faction-mark {
    border: none !important;
    background: transparent !important;
    box-shadow: none !important;
}
body.void-mode .public-faction-mark img {
    filter: drop-shadow(0 0 12px currentColor) drop-shadow(0 4px 10px rgba(0,0,0,0.6)) !important;
}
/* Member list: scrollable, max 10 rows */
body.void-mode .public-faction-member-list {
    max-height: 420px !important;
    overflow-y: auto !important;
    scrollbar-width: thin !important;
    scrollbar-color: rgba(var(--fc-star-rgb, 200,200,200), 0.3) transparent !important;
}
body.void-mode .public-faction-member {
    border: none !important;
    border-bottom: 1px solid rgba(255,255,255,0.06) !important;
    background: transparent !important;
    border-radius: 0 !important;
}
body.void-mode .public-faction-member:hover { background: rgba(255,255,255,0.03) !important; }
body.void-mode .public-faction-member strong { color: #fff !important; font-family: inherit !important; }
/* Rank badges: match faction card color */
body.void-mode .public-faction-member em {
    border: 1px solid rgba(var(--fc-star-rgb, 255,255,255), 0.4) !important;
    color: rgb(var(--fc-star-rgb, 255,255,255)) !important;
    background: rgba(var(--fc-star-rgb, 255,255,255), 0.07) !important;
    border-radius: 4px !important;
    padding: 3px 9px !important;
    font-style: normal !important;
    font-size: 10px !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.8px !important;
}

/* ─── Leaderboard rank emblems (ranks 1-5) ──────────────────────────── */
.lb-rank-emblem {
    width: 32px;
    height: 32px;
    object-fit: contain;
    display: block;
    margin: 0 auto;
}
.lb-rank-num {
    color: #ffffff;
    font-size: 14px;
    font-weight: 700;
    font-family: Impact, "Arial Black", sans-serif;
    letter-spacing: 0.5px;
}

/* ─── Create Faction Wizard ────────────────────────────────────────────────── */
body.fc-open {
    overflow: hidden;
    touch-action: none; /* iOS: prevent background page from drifting while dialog is open */
}

.fc-wizard {
    position: fixed;
    inset: 0;
    margin: auto;
    max-width: 580px;
    width: calc(100% - 32px);
    max-height: 88vh;
    /* iOS Safari's `vh` is sized against the toolbar-collapsed (largest
       possible) viewport, not what's actually visible — so a sticky footer
       pinned to bottom:0 of an 88vh-tall box can end up partly behind the
       still-visible address bar/bottom toolbar until the user scrolls the
       PAGE (collapsing that chrome) rather than the dialog. `dvh` tracks the
       real current viewport and fixes this; kept as a second declaration
       (not a replacement) so unsupporting browsers just keep the vh value
       above instead of getting an invalid property. */
    max-height: 88dvh;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain; /* iOS: stop inner scroll from chaining to the page */
    background: #000 !important;
    border: 1px solid rgba(255,255,255,0.12) !important;
    border-radius: 18px !important;
    box-shadow: 0 0 0 1px rgba(255,255,255,0.07), 0 0 50px rgba(255,255,255,0.1), 0 0 100px rgba(255,255,255,0.04), 0 8px 40px rgba(0,0,0,0.8) !important;
    padding: 44px 36px 32px;
    color: #fff;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
}
.fc-wizard::backdrop { background: rgba(0,0,0,0.88); touch-action: none; }
.loadout-dialog { max-width: 900px; }

/* Sticks Back/Next to the bottom of the dialog's own scroll area (padding is
   part of an overflow:auto element's scrollport, so bottom:0 alone already
   lands flush with the dialog's visible bottom edge — no margin/offset
   tricks needed) so they're always reachable no matter how tall a given
   step's content grows (e.g. a slot with many items). Scoped to the loadout
   dialog specifically since faction creation's much shorter steps never had
   this problem reported. */
.loadout-dialog .fc-step-nav {
    position: sticky;
    bottom: 0;
    padding-top: 14px;
    padding-bottom: 14px;
    background: #000;
    box-shadow: 0 -12px 16px -8px rgba(0,0,0,0.7);
}

/* Help ("?") — same circle treatment as .fc-close, sits just to its left so
   the two never collide across the dialog's step-nav breakpoints. */
.loadout-help-btn {
    position: absolute;
    top: 16px;
    right: 60px;
    width: 34px;
    height: 34px;
    min-width: 34px;
    min-height: 34px;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255,181,43,0.08);
    border: 1px solid rgba(255,181,43,0.4);
    border-radius: 50%;
    color: #ffb52b;
    cursor: pointer;
    padding: 0;
    transition: background 0.2s, border-color 0.2s, color 0.2s;
}
.loadout-help-btn svg { width: 17px; height: 17px; }
.loadout-help-btn:hover { background: rgba(255,181,43,0.18); border-color: rgba(255,181,43,0.7); color: #fff; }

/* Close — min-height/min-width override the global button { min-height: 40px } so it stays a perfect circle */
.fc-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 34px;
    height: 34px;
    min-width: 34px;
    min-height: 34px;
    box-sizing: border-box;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 50%;
    color: rgba(255,255,255,0.7);
    font-size: 0;
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s;
    padding: 0;
    overflow: hidden;
}
.fc-close::before,
.fc-close::after {
    content: '';
    position: absolute;
    width: 13px;
    height: 1.5px;
    background: rgba(255,255,255,0.65);
    border-radius: 1px;
    pointer-events: none;
}
.fc-close::before { transform: rotate(45deg); }
.fc-close::after  { transform: rotate(-45deg); }
.fc-close:hover { background: rgba(255,255,255,0.12); border-color: rgba(255,255,255,0.3); }
.fc-close:hover::before,
.fc-close:hover::after { background: #fff; }

/* Progress */
.fc-progress {
    display: flex;
    align-items: center;
    margin-bottom: 30px;
}
/* The loadout dialog has a second top-right button (the "?" help toggle,
   see .loadout-help-btn) that plain .fc-close-only wizards don't — without
   this, the progress row's own dots run flush to the content box's edge and
   the last dot or two land directly under/behind both circular buttons.
   Reserving space here (not on the shared .fc-progress rule, which other
   wizards like faction creation still rely on being edge-to-edge) just
   shrinks the flex-line gaps between dots, no dot resizing needed. */
.loadout-dialog .fc-progress { padding-right: 74px; }
/* Real 12-step dots don't fit a phone-width row no matter how the overflow
   is handled — tried containing it as a horizontally-scrollable strip
   first (overflow-x:auto + flex-shrink:0), which looked right in desktop
   Chromium mobile-emulation testing, but real iOS Safari didn't actually
   contain it inside this <dialog> the way the emulator did (2026-08-06 —
   same "nested overflow region doesn't behave in real Safari inside a
   modal" gap already hit once this session with the picker-grid's vertical
   scroll), so dots kept spilling onto the ?/× buttons on a real device even
   after that fix. Replaced with a completely different, overflow-free
   design for narrow screens: the numbered-dot row is desktop-only now; a
   plain filled progress bar + "Step X of Y" text (new .loadout-progress-bar,
   rendered alongside the dots in loadoutStepIndicatorHtml, toggled by this
   same breakpoint) takes over below 580px. A percentage-width bar has no
   minimum content width of its own, so there's structurally nothing left
   for it to overflow — this sidesteps the whole class of bug instead of
   patching it again. */
.loadout-progress-bar { display: none; }
@media (max-width: 580px) {
    .loadout-dialog .fc-progress { display: none; }
    .loadout-progress-bar {
        display: block;
        margin: 0 74px 22px 0; /* same right clearance as the dots had, for the ?/× buttons */
    }
    .loadout-progress-bar-track {
        height: 5px;
        border-radius: 3px;
        background: rgba(255,255,255,.12);
        overflow: hidden;
    }
    .loadout-progress-bar-fill {
        height: 100%;
        background: #ffb52b;
        border-radius: 3px;
        transition: width .2s;
    }
    .loadout-progress-bar-label {
        display: block;
        margin-top: 6px;
        color: rgba(255,255,255,.5);
        font-size: 10px;
        text-transform: uppercase;
        letter-spacing: .8px;
    }
}
.fc-prog-item {
    width: 30px;
    height: 30px;
    min-height: 0;
    padding: 0;
    margin: 0;
    border-radius: 50%;
    border: 1px solid rgba(255,255,255,0.25);
    background: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 700;
    font-family: Impact, "Arial Black", sans-serif;
    text-transform: none;
    letter-spacing: normal;
    color: rgba(255,255,255,0.5);
    flex-shrink: 0;
    transition: all 0.3s;
    /* The faction wizard's own dots are plain <div>s (never clickable); the
       Loadout wizard's are real <button>s so they can be clicked to jump to
       a step (2026-08-12) — this file's global `button{}` reset (min-height:
       40px, padding:0 18px, background, uppercase) would otherwise turn
       these back into 40px pills instead of 30px circles. Harmless on the
       faction wizard's <div>s either way, since none of this applies to a
       non-button element. */
    cursor: pointer;
}
.fc-prog-item:disabled { cursor: default; opacity: 0.5; }
.fc-prog-item.active {
    border-color: rgba(255,181,43,0.8);
    background: rgba(255,181,43,0.12);
    color: rgba(255,181,43,1);
    box-shadow: 0 0 10px rgba(255,181,43,0.25);
}
.fc-prog-item.done {
    border-color: rgba(57,239,155,0.7);
    background: rgba(57,239,155,0.1);
    color: #39ef9b;
}
.fc-prog-line { flex: 1; height: 1px; background: rgba(255,255,255,0.08); transition: background 0.3s; }
.fc-prog-line.active { background: rgba(255,181,43,0.35); }

/* Step heading */
.fc-step-heading {
    font-family: Impact, "Arial Black", sans-serif;
    font-size: clamp(18px, 2.2vw, 26px);
    font-weight: 400;
    letter-spacing: 4px;
    color: #fff;
    margin: 0 0 6px;
    text-shadow: 0 0 18px rgba(255,255,255,0.35);
}
.fc-step-sub {
    font-size: 11px;
    color: rgba(255,255,255,0.62);
    letter-spacing: 0.5px;
    margin: 0 0 18px;
    text-transform: uppercase;
}

/* Platform */
.fc-platform-grid {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
    margin-bottom: 28px;
    margin-top: 24px;
}

/* Eliminate 300ms tap delay on all faction wizard interactive elements */
.fc-platform-btn,
.fc-armband-item,
.fc-btn-back,
.fc-btn-next,
.fc-btn-create,
#factions button,
#factions a,
.void-faction-card,
[data-view-faction],
[data-join-faction],
[data-open-my-hq],
.my-faction-hq-btn { touch-action: manipulation; }

.fc-platform-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    width: 160px;
    height: 144px;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.18);
    border-radius: 14px;
    color: rgba(255,255,255,0.82);
    cursor: pointer;
    transition: all 0.22s;
    font-family: Impact, "Arial Black", sans-serif;
    font-size: 13px;
    letter-spacing: 3px;
}
.fc-platform-btn:hover { background: rgba(255,255,255,0.08); border-color: rgba(255,255,255,0.25); color: #fff; }
.fc-platform-btn.selected {
    background: rgba(255,181,43,0.08);
    border-color: rgba(255,181,43,0.7);
    color: rgba(255,181,43,1);
    box-shadow: 0 0 18px rgba(255,181,43,0.18), inset 0 0 18px rgba(255,181,43,0.04);
}
.fc-platform-icon { width: 52px; height: 52px; }

/* Armband grid */
.fc-armband-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(96px, 1fr));
    gap: 8px;
    max-height: 320px;
    overflow-y: auto;
    margin: 16px 0 20px;
    padding: 4px 6px 4px 6px;
}
.fc-armband-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 12px 8px 10px;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.18s;
    text-align: center;
}
.fc-armband-item:hover:not(.unavailable) { background: rgba(255,255,255,0.08); border-color: rgba(255,255,255,0.22); }
.fc-armband-item.selected { background: rgba(255,181,43,0.14); border-color: rgba(255,181,43,0.9); box-shadow: 0 0 0 2px rgba(255,181,43,0.45), 0 0 18px rgba(255,181,43,0.3); }
.fc-armband-item.selected img { filter: drop-shadow(0 0 10px rgba(255,181,43,0.7)) drop-shadow(0 0 4px rgba(255,181,43,0.4)); }
.fc-armband-item.unavailable { opacity: 0.32; cursor: not-allowed; }
.fc-armband-item input[type="radio"] { display: none; }
.fc-armband-item img { width: 58px; height: 58px; object-fit: contain; filter: drop-shadow(0 0 8px rgba(255,255,255,0.35)) drop-shadow(0 0 18px rgba(255,255,255,0.12)); }
.fc-id-name { font-size: 9px; color: rgba(255,255,255,0.88); letter-spacing: 0.4px; text-transform: uppercase; line-height: 1.3; }
.fc-id-status { display: flex; align-items: center; gap: 4px; font-size: 8px; letter-spacing: 0.4px; text-transform: uppercase; }
.fc-id-status i { width: 5px; height: 5px; border-radius: 50%; flex-shrink: 0; }
.fc-id-status.available { color: #39ef9b; }
.fc-id-status.available i { background: #39ef9b; box-shadow: 0 0 5px rgba(57,239,155,0.8); }
.fc-id-status.unavailable { color: #ef5555; }
.fc-id-status.unavailable i { background: #ef5555; box-shadow: 0 0 5px rgba(239,85,85,0.8); }

/* Form fields */
.fc-field { margin-bottom: 16px; }
.fc-label {
    display: block;
    font-family: Impact, "Arial Black", sans-serif;
    font-size: 10px;
    font-weight: 400;
    letter-spacing: 2px;
    color: rgba(255,181,43,0.85);
    text-transform: uppercase;
    margin-bottom: 6px;
}
.fc-hint { color: rgba(255,255,255,0.52); font-size: 9px; letter-spacing: 1px; }
.fc-input {
    width: 100%;
    box-sizing: border-box;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 8px;
    color: #fff;
    padding: 10px 14px;
    font-size: 16px; /* 16px prevents iOS auto-zoom on focus */
    font-family: inherit;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.fc-input:focus { border-color: rgba(255,181,43,0.5); box-shadow: 0 0 0 3px rgba(255,181,43,0.06); }
.fc-input::placeholder { color: rgba(255,255,255,0.38); }

/* Member search dropdown — position:absolute overlays content below; no layout shift
   when it opens/closes, so the recruitment toggle and NEXT button never move */
.fc-search-wrap { position: relative; }
.fc-search-results {
    position: absolute;
    left: 0;
    right: 0;
    top: calc(100% + 4px);
    z-index: 20;
    max-height: 220px;
    background: #0c0c0c;
    border: 1px solid rgba(255,255,255,0.14);
    border-radius: 8px;
    overflow-y: auto;
    box-shadow: 0 4px 16px rgba(0,0,0,0.6);
}
.fc-search-result {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 12px;
    cursor: pointer;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    transition: background 0.12s;
    width: 100%;
    text-align: left;
    background: none;
    color: #fff;
    border-radius: 0;
}
.fc-search-result:last-child { border-bottom: none; }
.fc-search-result:hover:not(:disabled) { background: rgba(255,255,255,0.06); }
.fc-search-result:disabled { opacity: 0.38; cursor: not-allowed; }
.fc-search-avatar {
    border-radius: 50%;
    background: rgba(255,255,255,0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    flex-shrink: 0;
    overflow: hidden;
    color: rgba(255,255,255,0.8);
}
.fc-search-avatar img { width: 100%; height: 100%; object-fit: cover; }
.fc-search-info { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.fc-search-name { font-size: 13px; font-weight: 600; color: #fff; }
.fc-search-gamertag { font-size: 11px; color: rgba(255,255,255,0.65); }
.fc-search-unavail { font-size: 11px; color: #ef5555; }

/* Selected member chips */
.fc-member-chips { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 10px; }
.fc-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(255,181,43,0.07);
    border: 1px solid rgba(255,181,43,0.3);
    border-radius: 20px;
    padding: 4px 8px 4px 4px;
    font-size: 12px;
    color: rgba(255,255,255,0.9);
}
.fc-chip-avatar {
    border-radius: 50%;
    background: rgba(255,181,43,0.18);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    overflow: hidden;
    flex-shrink: 0;
    min-width: 22px;
    color: rgba(255,181,43,0.9);
}
.fc-chip-avatar img { width: 100%; height: 100%; object-fit: cover; }
.fc-chip-remove {
    width: 18px;
    height: 18px;
    min-width: 18px;
    min-height: 18px;
    border-radius: 50%;
    background: rgba(255,255,255,0.1);
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    padding: 0;
    flex-shrink: 0;
    box-sizing: border-box;
    position: relative;
    transition: background 0.15s;
    overflow: hidden;
    font-size: 0; /* hide any text content */
}
.fc-chip-remove::before,
.fc-chip-remove::after {
    content: '';
    position: absolute;
    width: 8px;
    height: 1.5px;
    background: rgba(255,255,255,0.72);
    border-radius: 1px;
    pointer-events: none;
}
.fc-chip-remove::before { transform: rotate(45deg); }
.fc-chip-remove::after { transform: rotate(-45deg); }
.fc-chip-remove:hover { background: rgba(239,85,85,0.5); }
.fc-chip-remove:hover::before,
.fc-chip-remove:hover::after { background: #fff; }

/* Recruitment toggle */
.fc-recruit-toggle {
    display: flex;
    gap: 0;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid rgba(255,255,255,0.1);
    width: fit-content;
}
.fc-recruit-btn {
    padding: 9px 22px;
    font-family: Impact, "Arial Black", sans-serif;
    font-size: 12px;
    letter-spacing: 2px;
    border: none;
    background: rgba(255,255,255,0.04);
    color: rgba(255,255,255,0.45);
    cursor: pointer;
    transition: background 0.18s, color 0.18s;
}
.fc-recruit-btn[data-recruit="open"].active {
    background: rgba(57,239,155,0.15);
    color: #39ef9b;
    box-shadow: inset 0 0 0 1px rgba(57,239,155,0.4);
}
.fc-recruit-btn[data-recruit="closed"].active {
    background: rgba(239,85,85,0.15);
    color: #ef7070;
    box-shadow: inset 0 0 0 1px rgba(239,85,85,0.4);
}
.fc-recruit-btn:not(.active):hover { background: rgba(255,255,255,0.08); color: rgba(255,255,255,0.7); }

/* Rules */
.fc-rules {
    list-style: none;
    padding: 0;
    margin: 16px 0 22px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.fc-rules li {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 13px;
    color: rgba(255,255,255,0.92);
    line-height: 1.55;
}
.fc-rules li::before {
    content: '';
    width: 5px;
    height: 5px;
    min-width: 5px;
    border-radius: 50%;
    background: rgba(255,181,43,0.8);
    margin-top: 7px;
}

/* Agree */
.fc-agree-label {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    cursor: pointer;
    margin-bottom: 22px;
    padding: 14px 16px;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 8px;
}
.fc-agree-check { width: 17px; height: 17px; flex-shrink: 0; accent-color: rgba(255,181,43,1); cursor: pointer; margin-top: 2px; }
.fc-agree-text { font-size: 13px; color: rgba(255,255,255,0.9); line-height: 1.5; }

/* Error */
.fc-error { font-size: 12px; color: #ef5555; margin: 0 0 10px; min-height: 16px; }

/* Navigation */
.fc-step-nav { display: flex; align-items: center; justify-content: space-between; margin-top: 22px; gap: 12px; }
.fc-btn-back {
    font-family: Impact, "Arial Black", sans-serif;
    font-size: 11px;
    letter-spacing: 2px;
    color: rgba(255,255,255,0.65);
    background: none;
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 7px;
    padding: 10px 18px;
    cursor: pointer;
    transition: all 0.18s;
}
.fc-btn-back:hover { color: #fff; border-color: rgba(255,255,255,0.4); }
.fc-btn-next {
    font-family: Impact, "Arial Black", sans-serif;
    font-size: 11px;
    letter-spacing: 2px;
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.28);
    border-radius: 7px;
    color: rgba(255,255,255,0.88);
    padding: 10px 26px;
    cursor: pointer;
    transition: all 0.18s;
    margin-left: auto;
}
.fc-btn-next:not(:disabled):hover { background: rgba(255,255,255,0.12); border-color: rgba(255,255,255,0.38); color: #fff; }
.fc-btn-next:disabled { opacity: 0.3; cursor: not-allowed; }
.fc-btn-create {
    font-family: Impact, "Arial Black", sans-serif;
    font-size: 12px;
    letter-spacing: 2px;
    background: rgba(255,181,43,0.1);
    border: 1px solid rgba(255,181,43,0.48);
    border-radius: 7px;
    color: rgba(255,181,43,1);
    padding: 12px 22px;
    cursor: pointer;
    transition: all 0.18s;
    text-shadow: 0 0 10px rgba(255,181,43,0.35);
}
.fc-btn-create:not(:disabled):hover {
    background: rgba(255,181,43,0.18);
    border-color: rgba(255,181,43,0.75);
    box-shadow: 0 0 18px rgba(255,181,43,0.22);
}
.fc-btn-create:disabled { opacity: 0.3; cursor: not-allowed; }

@media (max-width: 580px) {
    .fc-wizard { border-radius: 16px; margin: auto; max-height: 88vh; max-height: 88dvh; padding: 40px 18px 24px; }
    .fc-platform-btn { width: 130px; height: 120px; }
    .fc-armband-grid { grid-template-columns: repeat(auto-fill, minmax(82px, 1fr)); max-height: 260px; }
    .fc-btn-create { font-size: 10px; padding: 11px 14px; }
}

/* ═══════════════════════════════════════════════════════════════════════════
   LEADERBOARDS — Hall of Legends redesign
   ═══════════════════════════════════════════════════════════════════════════ */

/* ─── Body mode — hide old site chrome ───────────────────────────────────── */
body.lb-mode {
    background-color: #000 !important;
    background-image: none !important;
}
body.lb-mode::before { display: none !important; }
body.lb-mode main::after { display: none !important; }
body.lb-mode main { background: transparent !important; }

/* ─── Hero ───────────────────────────────────────────────────────────────── */
#leaderboards.view.active {
    padding: 0 !important;
    display: flex !important;
    flex-direction: column;
}

.lb-hero {
    position: relative;
    width: 100%;
    margin-left: 0;
    min-height: 400px;
    max-height: 560px;
    height: 50vh;
    overflow: hidden;
    flex-shrink: 0;
    z-index: 1;
    border-radius: 10px;
    border: 1px solid rgba(255,181,43,0.30);
    box-shadow: 0 0 0 1px rgba(255,181,43,0.10), 0 8px 48px rgba(0,0,0,0.75);
}

.lb-hero-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: 65% center;
    display: block;
    user-select: none;
    pointer-events: none;
}

.lb-topo-canvas {
    display: none;
}

.lb-hero-sun-glow {
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at 82% 6%, rgba(0,0,0,0.38) 0%, rgba(0,0,0,0.12) 28%, transparent 58%);
    pointer-events: none;
    z-index: 2;
}

.lb-hero-overlay {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(to right, rgba(5,5,5,0.88) 0%, rgba(5,5,5,0.62) 30%, rgba(5,5,5,0.18) 56%, rgba(5,5,5,0.0) 76%),
        linear-gradient(to top, #080808 0%, rgba(8,8,8,0.68) 20%, rgba(8,8,8,0.28) 42%, transparent 62%),
        radial-gradient(ellipse at 90% 5%, rgba(0,0,0,0.38) 0%, rgba(0,0,0,0.14) 28%, transparent 55%);
    z-index: 3;
}

.lb-hero-content {
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    z-index: 4;
    padding: 0 52px;
    max-width: 620px;
}

.lb-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 2px;
    color: rgba(80,200,255,1);
    text-transform: uppercase;
    margin-bottom: 16px;
    background: rgba(80,200,255,0.10);
    border: 1px solid rgba(80,200,255,0.38);
    border-radius: 100px;
    padding: 5px 14px 5px 10px;
}

.lb-eyebrow i {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: rgba(80,200,255,1);
    box-shadow: 0 0 8px rgba(80,200,255,0.9), 0 0 18px rgba(80,200,255,0.45);
    flex-shrink: 0;
    animation: lb-dot-pulse 2.4s ease-in-out infinite;
}

@keyframes lb-dot-pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.6; transform: scale(0.8); }
}

.lb-heading {
    font-family: Impact, "Arial Black", sans-serif;
    font-size: clamp(52px, 8vw, 108px);
    font-weight: 400;
    line-height: 0.9;
    letter-spacing: 3px;
    text-transform: uppercase;
    margin: 0 0 20px;
    display: flex;
    flex-direction: column;
}

.lb-h-gold {
    color: #ffffff;
    -webkit-text-fill-color: #ffffff;
    filter: drop-shadow(0 2px 24px rgba(0,0,0,0.9));
}

.lb-h-white {
    background: linear-gradient(135deg, rgba(80,200,255,1) 0%, #ffffff 48%, rgba(80,200,255,0.9) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    filter: drop-shadow(0 0 28px rgba(80,200,255,0.45));
}

.lb-sub {
    font-size: 17px;
    background: linear-gradient(175deg, #ffffff 0%, rgba(200,200,200,0.68) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1.55;
    margin: 0;
    font-weight: 400;
}

/* ─── Page content wrap ──────────────────────────────────────────────────── */
.lb-page-wrap {
    position: relative;
    padding: 40px 36px 72px;
    flex: 1;
}

.lb-page-topo-canvas {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    -webkit-transform: translateZ(0);
    transform: translateZ(0);
}

@media (max-width: 860px) {
    .lb-page-topo-canvas {
        position: absolute;
        height: 100%;
        width: 100%;
    }
}

/* ─── Stat cards ─────────────────────────────────────────────────────────── */
#leaderboards .leaderboard-summary {
    display: grid !important;
    grid-template-columns: repeat(4, 1fr) !important;
    gap: 14px !important;
    margin: 0 0 28px !important;
    position: relative;
    z-index: 1;
}

.lb-metric {
    position: relative;
    isolation: isolate;
    background: rgba(4,4,4,0.93) !important;
    border: 1px solid rgba(255,181,43,0.40) !important;
    border-radius: 10px !important;
    padding: 18px 16px !important;
    overflow: hidden !important;
    display: flex !important;
    align-items: center !important;
    gap: 14px !important;
    box-shadow: 0 4px 28px rgba(0,0,0,0.65), inset 0 1px 0 rgba(255,255,255,0.06) !important;
    min-height: 0 !important;
    grid-template-columns: unset !important;
}

.lb-metric .matrix-canvas {
    position: absolute !important;
    inset: 0 !important;
    width: 100% !important;
    height: 100% !important;
    z-index: 0 !important;
    opacity: 1 !important;
    mix-blend-mode: screen;
}

.lb-metric-icon {
    position: relative;
    z-index: 1;
    flex-shrink: 0;
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255,181,43,0.75);
}

.lb-metric-icon.lb-metric-icon--red {
    color: rgba(255,55,70,0.85);
}

.lb-metric-icon.lb-metric-icon--green {
    color: rgba(49,209,124,0.85);
}

.lb-metric-icon.lb-metric-icon--blue {
    color: rgba(61,180,255,0.85);
}

.lb-metric-icon svg {
    width: 26px;
    height: 26px;
    stroke: currentColor;
    fill: none;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.lb-metric-copy {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-width: 0;
}

.lb-metric-copy span {
    font-size: 10px !important;
    font-weight: 700 !important;
    letter-spacing: 1.5px !important;
    text-transform: uppercase !important;
    color: rgba(255,255,255,0.38) !important;
    display: block !important;
}

.lb-metric-copy strong {
    font-size: 28px !important;
    font-weight: 800 !important;
    color: #fff !important;
    line-height: 1 !important;
    letter-spacing: -0.5px !important;
    display: block !important;
    text-shadow: none !important;
    filter: none !important;
}

/* ─── Board: tabs, search, table ─────────────────────────────────────────── */
.lb-board {
    position: relative;
    z-index: 1;
    background: rgba(2,2,2,0.94);
    border: 1px solid rgba(255,181,43,0.28);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 8px 48px rgba(0,0,0,0.72), inset 0 1px 0 rgba(255,255,255,0.06);
    -webkit-backdrop-filter: blur(24px);
}

/* ═══════════════════════════════════════════════════════════════════════════
   FACTIONS HERO
   ═══════════════════════════════════════════════════════════════════════════ */
.ff-hero {
    position: relative;
    width: 100%;
    min-height: 400px;
    max-height: 560px;
    height: 50vh;
    overflow: hidden;
    flex-shrink: 0;
    z-index: 1;
    border-radius: 10px;
    border: 1px solid rgba(255,181,43,0.30);
    box-shadow: 0 0 0 1px rgba(255,181,43,0.10), 0 8px 48px rgba(0,0,0,0.75);
    margin-bottom: 28px;
}

.ff-hero-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: 65% center;
    display: block;
    user-select: none;
    pointer-events: none;
}

.ff-hero-overlay {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(to right, rgba(5,5,5,0.90) 0%, rgba(5,5,5,0.65) 32%, rgba(5,5,5,0.20) 58%, rgba(5,5,5,0.0) 78%),
        linear-gradient(to top, #080808 0%, rgba(8,8,8,0.68) 20%, rgba(8,8,8,0.28) 42%, transparent 62%),
        radial-gradient(ellipse at 88% 5%, rgba(0,0,0,0.55) 0%, rgba(0,0,0,0.22) 32%, transparent 58%);
    z-index: 3;
}

.ff-hero-content {
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    z-index: 4;
    padding: 0 52px;
    max-width: 600px;
}

/* Override centered layout from #factions .void-heading when inside hero */
#factions .ff-hero-content .void-heading {
    display: flex !important;
    flex-direction: column !important;
    text-align: left !important;
    white-space: normal !important;
    margin: 0 0 12px !important;
}

#factions .ff-hero-content .void-heading .ff-h-gold,
#factions .ff-hero-content .void-heading .ff-h-white {
    display: block !important;
    font-size: clamp(52px, 8vw, 108px) !important;
    line-height: 0.9 !important;
    font-family: Impact, "Arial Black", sans-serif !important;
    font-weight: 400 !important;
}

#factions .ff-hero-content .void-page-badges {
    display: flex !important;
    justify-content: flex-start !important;
    text-align: left !important;
    gap: 8px;
    margin-bottom: 16px;
}
#factions .ff-hero-content .ff-badge {
    color: #FFB52B !important;
    border-color: rgba(255,181,43,0.55) !important;
    background: rgba(255,181,43,0.10) !important;
    text-shadow: none !important;
}
#factions .ff-hero-content .ff-badge i {
    background: #FFB52B !important;
    box-shadow: 0 0 6px rgba(255,181,43,0.9), 0 0 12px rgba(255,181,43,0.4) !important;
}

#factions .ff-hero-content .ff-sub {
    display: block !important;
    color: rgba(255,255,255,0.68) !important;
    font-size: 17px !important;
    margin: 16px 0 0 !important;
    width: auto !important;
    text-align: left !important;
    white-space: normal !important;
}

@media (max-width: 860px) {
    .ff-hero { min-height: 340px; height: 44vh; }
    .ff-hero-content { padding: 0 28px; }
}

@media (max-width: 767px) {
    .ff-hero-content { padding: 0 22px; max-width: 72%; }
    .ff-hero-img {
        object-position: 60% center;
    }
}

@media (max-width: 600px) {
    .ff-hero { min-height: 280px; height: 40vh; max-height: 400px; }
    .ff-hero-overlay {
        background:
            linear-gradient(to right, rgba(5,5,5,0.88) 0%, rgba(5,5,5,0.60) 42%, rgba(5,5,5,0.06) 68%),
            linear-gradient(to top, #080808 0%, rgba(8,8,8,0.42) 15%, rgba(8,8,8,0.10) 36%, transparent 54%),
            radial-gradient(ellipse at 90% 5%, rgba(0,0,0,0.15) 0%, transparent 42%);
    }
    .ff-hero-content { padding: 0 20px; max-width: 100%; }
    #factions .ff-hero-content .void-heading .ff-h-gold,
    #factions .ff-hero-content .void-heading .ff-h-white {
        font-size: clamp(36px, 14vw, 56px) !important;
    }
}

/* Override old purple toolbar border */
#leaderboards .leaderboard-toolbar {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    flex-wrap: wrap !important;
    gap: 12px !important;
    padding: 16px 20px !important;
    border-bottom: 1px solid rgba(255,181,43,0.1) !important;
    background: none !important;
}

.lb-toolbar-left {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

/* Tabs */
#leaderboards .leaderboard-tabs {
    display: flex !important;
    gap: 0 !important;
    border: 1px solid rgba(255,255,255,0.1) !important;
    border-radius: 6px !important;
    overflow: hidden !important;
}

#leaderboards .leaderboard-tabs button {
    background: transparent !important;
    border: none !important;
    padding: 7px 20px !important;
    font-size: 12px !important;
    font-weight: 700 !important;
    letter-spacing: 1px !important;
    text-transform: uppercase !important;
    color: rgba(255,255,255,0.4) !important;
    cursor: pointer !important;
    transition: all 140ms ease !important;
    box-shadow: none !important;
}

#leaderboards .leaderboard-tabs button.active {
    background: rgba(255,181,43,0.12) !important;
    color: #ffb52b !important;
    box-shadow: none !important;
}

/* Category pills */
#leaderboards .leaderboard-categories {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 4px !important;
}

#leaderboards .leaderboard-categories button {
    background: transparent !important;
    border: 1px solid transparent !important;
    padding: 5px 12px !important;
    font-size: 11px !important;
    font-weight: 700 !important;
    letter-spacing: 0.8px !important;
    text-transform: uppercase !important;
    color: rgba(255,255,255,0.38) !important;
    border-radius: 4px !important;
    cursor: pointer !important;
    transition: all 140ms ease !important;
    min-height: 0 !important;
    flex: unset !important;
}

#leaderboards .leaderboard-categories button.active {
    border-color: rgba(255,181,43,0.38) !important;
    color: #ffb52b !important;
    background: rgba(255,181,43,0.07) !important;
}

/* Search */
.lb-search-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.09);
    border-radius: 7px;
    padding: 8px 13px;
    cursor: text;
}

.lb-search-wrap svg {
    width: 15px;
    height: 15px;
    color: rgba(255,255,255,0.3);
    flex-shrink: 0;
}

#leaderboard-search {
    background: none !important;
    border: none !important;
    outline: none !important;
    color: rgba(255,255,255,0.82) !important;
    font-size: 13px !important;
    width: 220px !important;
    padding: 0 !important;
    min-height: 0 !important;
    max-width: none !important;
    border-radius: 0 !important;
}

#leaderboard-search::placeholder {
    color: rgba(255,255,255,0.28) !important;
}

/* ─── Table rows ─────────────────────────────────────────────────────────── */
#leaderboards .leaderboard-header {
    background: rgba(0,0,0,0.28) !important;
    color: rgba(255,255,255,0.32) !important;
    border-bottom: 1px solid rgba(255,255,255,0.05) !important;
}

#leaderboards .leaderboard-row {
    border-top: 1px solid rgba(255,255,255,0.04) !important;
    color: rgba(255,255,255,0.78) !important;
}

#leaderboards .leaderboard-row:hover {
    background: rgba(255,181,43,0.04) !important;
}

/* Override cyan K/D color — let kdClass handle coloring */
#leaderboards .leaderboard-row > [data-label="K/D"] {
    color: inherit !important;
}

/* Avatar ring — white instead of purple (overrides styles.css and refinements.css) */
#leaderboards .rank-identity img {
    border: 1.5px solid rgba(255,255,255,0.28) !important;
    background: rgba(255,255,255,0.05) !important;
    box-shadow: 0 0 7px rgba(255,255,255,0.14) !important;
    border-radius: 50% !important;
    object-fit: cover !important;
}
/* Armband badge inside player rank-identity: no ring, no circle */
#leaderboards .rank-identity img.leaderboard-faction-badge {
    border: none !important;
    background: none !important;
    box-shadow: none !important;
    border-radius: 3px !important;
    object-fit: contain !important;
}
#leaderboards .leaderboard-avatar-fallback {
    border: 1.5px solid rgba(255,255,255,0.28) !important;
    background: rgba(255,255,255,0.05) !important;
    box-shadow: 0 0 7px rgba(255,255,255,0.14) !important;
}
#leaderboards .leaderboard-avatar-fallback svg {
    stroke: rgba(255,255,255,0.65) !important;
}

/* Player name button — kill purple hover/focus from legacy styles */
#leaderboards .player-profile-link {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    outline: none !important;
}
#leaderboards .player-profile-link:hover,
#leaderboards .player-profile-link:focus {
    background: transparent !important;
    box-shadow: none !important;
    outline: none !important;
    transform: none !important;
    color: rgba(255,255,255,0.95) !important;
}

/* Top 3 rows */
.lb-top3-row {
    position: relative;
    border-left: 3px solid rgba(255,181,43,0.25) !important;
}

.lb-top3-row:nth-child(2) {
    background: linear-gradient(90deg, rgba(255,181,43,0.16) 0%, rgba(255,181,43,0.04) 50%, transparent 100%) !important;
    border-left-color: rgba(255,181,43,0.90) !important;
}

.lb-top3-row:nth-child(3) {
    background: linear-gradient(90deg, rgba(210,215,225,0.10) 0%, rgba(210,215,225,0.03) 50%, transparent 100%) !important;
    border-left-color: rgba(210,215,225,0.65) !important;
}

.lb-top3-row:nth-child(4) {
    background: linear-gradient(90deg, rgba(195,130,60,0.10) 0%, rgba(195,130,60,0.03) 50%, transparent 100%) !important;
    border-left-color: rgba(205,145,75,0.65) !important;
}

/* K/D value colors */
.kd-gold { color: #ffb52b !important; font-weight: 700 !important; }
.kd-green { color: #31d17c !important; font-weight: 700 !important; }
.kd-orange { color: #ff7d38 !important; font-weight: 700 !important; }
.kd-red { color: #ff4868 !important; font-weight: 700 !important; }

/* ─── Responsive ─────────────────────────────────────────────────────────── */
@media (max-width: 1100px) {
    #leaderboards .leaderboard-summary {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

@media (max-width: 860px) {
    .lb-hero {
        min-height: 340px;
        height: 44vh;
    }
    .lb-hero-content {
        padding: 0 28px;
    }
    .lb-heading {
        font-size: clamp(44px, 11vw, 72px);
    }
    .lb-page-wrap {
        padding: 28px 20px 56px;
    }
    #leaderboards .leaderboard-toolbar {
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 10px !important;
    }
    .lb-search-wrap {
        width: 100%;
        box-sizing: border-box;
    }
    #leaderboard-search {
        width: 100% !important;
    }
}

@media (max-width: 767px) {
    .lb-hero-content {
        padding: 0 22px;
        max-width: 72%;
    }
    .lb-hero-img {
        object-position: 85% center;
    }
}

@media (max-width: 600px) {
    .lb-hero {
        min-height: 280px;
        height: 40vh;
        max-height: 400px;
    }
    .lb-hero-overlay {
        background:
            linear-gradient(to right, rgba(5,5,5,0.88) 0%, rgba(5,5,5,0.60) 42%, rgba(5,5,5,0.06) 68%),
            linear-gradient(to top, #080808 0%, rgba(8,8,8,0.42) 15%, rgba(8,8,8,0.10) 36%, transparent 54%),
            radial-gradient(ellipse at 90% 5%, rgba(0,0,0,0.15) 0%, transparent 42%);
    }
    .lb-hero-content {
        padding: 0 20px;
        max-width: 100%;
    }
    .lb-heading {
        font-size: clamp(36px, 14vw, 56px);
        letter-spacing: 1px;
        margin-bottom: 12px;
    }
    .lb-eyebrow {
        font-size: 9px;
        letter-spacing: 1.8px;
        margin-bottom: 10px;
    }
    .lb-sub {
        font-size: 13px;
    }
    #leaderboards .leaderboard-summary {
        grid-template-columns: 1fr 1fr !important;
        gap: 10px !important;
    }
    .lb-metric-copy strong {
        font-size: 20px !important;
    }
    .lb-metric-copy span {
        font-size: 8px !important;
        letter-spacing: 0.7px !important;
    }
    .lb-metric {
        padding: 14px 12px !important;
        gap: 10px !important;
    }
    .lb-metric-icon {
        width: 28px !important;
        height: 28px !important;
    }
    .lb-metric-icon svg {
        width: 20px !important;
        height: 20px !important;
    }
    .lb-page-wrap {
        padding: 20px 14px 48px;
    }
}

/* ─── Mobile leaderboard row fix ────────────────────────────────────────────
   styles.css sets grid-row:1/4 on .rank, causing items 4+ to spill into
   column 1 (K/D in col 1, PLAYTIME in col 2, side-by-side). Fix: span rank
   across enough rows, then force all other cells to column 2.
   Also: styles.css [data-label]::before adds "RANK" text inside the rank
   column + display:flex justify-content:space-between, causing the 32px
   emblem to overflow the 42px column and visually cover adjacent cells. */
@media (max-width: 760px) {
    #leaderboards .player-rank-row > .rank,
    #leaderboards .faction-rank-row > .rank {
        grid-column: 1 !important;
        grid-row: 1 / span 6 !important;
        align-self: center !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        overflow: hidden !important;
        padding: 0 !important;
    }
    #leaderboards .player-rank-row > .rank::before,
    #leaderboards .faction-rank-row > .rank::before {
        display: none !important;
        content: none !important;
    }
    #leaderboards .player-rank-row > :not(.rank),
    #leaderboards .faction-rank-row > :not(.rank) {
        grid-column: 2 !important;
    }
}

/* ═══════════════════════════════════════════════════════
   #killfeed page redesign
═══════════════════════════════════════════════════════ */

/* Full-page etch-a-sketch canvas */
#killfeed-tracers {
    position: fixed;
    inset: 0;
    z-index: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
    display: none;
}
body.kf-mode #killfeed-tracers { display: block; }
body.kf-mode #constellation-bg { display: none; }
body.kf-mode #home-bg-stars { display: none; }

/* Shop page background — same DOM-based star/ember void effect Factions
   uses (populateStarfield() with ember:true), just recolored green+gold
   instead of Factions' amber-only embers. Own dedicated container since
   populateStarfield() only ever populates a given element once
   (dataset.starsInit guard) — reusing #void-page-stars would silently skip
   Shop's custom color pass after Factions had already initialized it. */
#shop-void-stars {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
    display: none;
    overflow: hidden;
    transform: translateZ(0);
    -webkit-transform: translateZ(0);
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}
body.shop-mode #shop-void-stars { display: block; }
body.shop-mode #constellation-bg { display: none; }
body.shop-mode #home-bg-stars { display: none; }

/* Profile page background — reuses the exact sidebar "ash" floating-particle
   effect (startAshEffect() in app.js, generalized from the sidebar-only
   startSidebarAshEffect() to drive any .ash-particles canvas) instead of the
   multi-color constellation network, per user request (2026-07-10).
   Wrapped in its own fixed, viewport-sized div — the ash effect sizes each
   canvas off its immediate parent's offsetWidth/Height, and body's box on a
   long scrolling page reports the full document height, not the viewport. */
#profile-bg-ash-wrap {
    position: fixed;
    inset: 0;
    width: 100vw;
    height: 100vh;
    z-index: 0;
    pointer-events: none;
    display: none;
}
body.pf-mode #profile-bg-ash-wrap { display: block; }
body.pf-mode #constellation-bg { display: none; }
#profile-bg-ash-wrap .ash-particles {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

/* ── Hero ── */
.kf-hero {
    position: relative;
    width: 100%;
    max-width: 1380px;
    margin: 0 auto 28px;
    min-height: 400px;
    max-height: 560px;
    height: 50vh;
    overflow: hidden;
    border-radius: 10px;
    border: 1px solid rgba(255,185,43,0.30);
    box-shadow: 0 0 0 1px rgba(255,185,43,0.10), 0 8px 48px rgba(0,0,0,0.75);
    flex-shrink: 0;
    background: #080808;
}
.kf-hero-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center center;
    user-select: none;
    pointer-events: none;
}
.kf-hero-overlay {
    position: absolute;
    inset: 0;
    /* Neutral dark — no red tint */
    background:
        linear-gradient(to right, rgba(3,3,5,0.88) 0%, rgba(3,3,5,0.58) 32%, rgba(3,3,5,0.12) 58%, transparent 78%),
        linear-gradient(to top, rgba(4,4,6,0.96) 0%, rgba(4,4,6,0.68) 20%, rgba(4,4,6,0.22) 42%, transparent 62%),
        radial-gradient(ellipse at 88% 8%, rgba(0,0,0,0.38) 0%, transparent 52%);
    z-index: 3;
}
.kf-hero-content {
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    padding: 0 52px;
    z-index: 4;
    max-width: 720px;
}

/* Eyebrow — matches lb-eyebrow pill style */
.kf-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: rgba(255, 80, 100, 1);
    background: rgba(255, 51, 78, 0.12);
    border: 1px solid rgba(255, 51, 78, 0.40);
    border-radius: 100px;
    padding: 5px 14px 5px 10px;
    margin-bottom: 16px;
}
.kf-eyebrow i {
    width: 6px; height: 6px;
    border-radius: 50%;
    background: #ff1010;
    box-shadow: 0 0 8px rgba(220,10,10,0.95), 0 0 18px rgba(200,0,0,0.55);
    flex-shrink: 0;
    animation: kf-dot-pulse 2.2s ease-in-out infinite;
}
@keyframes kf-dot-pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.55; transform: scale(0.75); }
}

/* Heading: KILL + FEED on one line — both warm white */
.kf-heading {
    font-family: Impact, "Arial Black", sans-serif;
    font-size: clamp(52px, 7.5vw, 108px);
    line-height: 1;
    letter-spacing: -0.01em;
    margin: 0 0 14px;
    text-transform: uppercase;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    white-space: normal;
}
.kf-h-white {
    color: #ffffff;
    display: inline;
}
.kf-h-red {
    display: inline;
    background: linear-gradient(to bottom, #bb0000 0%, #ee1111 40%, #ffffff 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    filter: drop-shadow(0 0 18px rgba(200,10,10,0.50));
}
.kf-sub {
    font-size: 13px;
    color: rgba(255,255,255,0.52);
    letter-spacing: 0.04em;
    margin: 0;
}

/* ── Content grid (single column) ── */
.kf-content-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
    max-width: 1380px;
    margin: 0 auto;
    padding-bottom: 40px;
    position: relative;
    z-index: 2;
}

/* ── Log panel — gold trim, semi-transparent so tracers show through ── */
.kf-log-panel {
    background: rgba(6,6,8,0.48) !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    border-color: rgba(255,181,43,0.45) !important;
    box-shadow: 0 0 22px rgba(255,181,43,0.10), 0 0 40px rgba(0,0,0,0.65) !important;
    transform: none !important;
    transition: none !important;
}
.kf-log-panel:hover {
    border-color: rgba(255,181,43,0.28) !important;
    box-shadow: 0 0 32px rgba(0,0,0,0.65) !important;
    transform: none !important;
}
.kf-log-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 20px 12px;
    border-bottom: 1px solid rgba(255,181,43,0.10);
    margin-bottom: 0;
}
.kf-log-title {
    display: flex;
    align-items: center;
    gap: 10px;
}
.kf-log-title h2 {
    font-family: Impact, "Arial Black", sans-serif;
    font-size: 15px;
    letter-spacing: 0.14em;
    color: #fff;
    text-shadow: none !important;
    margin: 0;
}
.kf-live-dot {
    width: 9px; height: 9px;
    border-radius: 50%;
    background: #ff1010;
    box-shadow: 0 0 10px rgba(220,10,10,0.95), 0 0 22px rgba(200,0,0,0.50);
    animation: kf-dot-pulse 2.2s ease-in-out infinite;
    flex-shrink: 0;
}
.kf-refresh-btn {
    font-size: 9px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: rgba(255,181,43,0.8);
    background: rgba(255,181,43,0.07);
    border: 1px solid rgba(255,181,43,0.25);
    border-radius: 6px;
    padding: 6px 14px;
    cursor: pointer;
    transition: all 0.18s;
    touch-action: manipulation;
}
.kf-refresh-btn:hover { background: rgba(255,181,43,0.14); border-color: rgba(255,181,43,0.5); color: #ffb52b; }

/* Override red scrollbar in killfeed list */
#killfeed-list::-webkit-scrollbar-thumb { background: rgba(255,181,43,0.5) !important; border-radius: 3px !important; }
#killfeed-list { scrollbar-color: rgba(255,181,43,0.5) rgba(8,8,10,0.75) !important; }

/* ── Column header row ── */
.kf-page-col-headers {
    display: grid !important;
    grid-template-columns: minmax(0,1fr) 70px minmax(0,1fr) minmax(140px,190px) 44px !important;
    gap: 0 10px !important;
    padding: 6px 16px 4px !important;
    border-bottom: 1px solid rgba(255,181,43,0.08) !important;
    font-size: 9px !important;
    letter-spacing: 0.10em !important;
    text-transform: uppercase !important;
    color: rgba(255,181,43,0.45) !important;
    font-weight: 700 !important;
}
.kf-page-col-headers .kfc-killer   { grid-column: 1 !important; padding-left: 0 !important; }
.kf-page-col-headers .kfc-action   { grid-column: 2 !important; text-align: center !important; }
.kf-page-col-headers .kfc-victim   { grid-column: 3 !important; }
.kf-page-col-headers .kfc-weapon   { grid-column: 4 !important; }
.kf-page-col-headers .kfc-distance { grid-column: 5 !important; text-align: right !important; }

/* ── Feed rows (kfp-row class — no base feed-row conflicts) ── */
.kfp-row {
    display: grid;
    grid-template-columns: minmax(0,1fr) 70px minmax(0,1fr) minmax(140px,190px) 44px;
    grid-template-rows: auto auto;
    gap: 3px 10px;
    padding: 9px 16px;
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 6px;
    background: rgba(6,6,8,0.50);
    margin: 0;
    position: relative;
    min-height: 0;
    flex-shrink: 0;
}
.kfp-row .feed-live   { grid-column: 1; grid-row: 1; justify-self: start; align-self: center; }
.kfp-row time         { grid-column: 2/5; grid-row: 1; font-size: 11px; color: rgba(255,255,255,0.45); white-space: nowrap; }
.kfp-row .distance    { grid-column: 5; grid-row: 1; text-align: right; font-size: 11px; color: rgba(255,181,43,0.75); white-space: nowrap; font-weight: 600; }
.kfp-row .killer      { grid-column: 1; grid-row: 2; color: #ffb52b; font-size: 14px; font-weight: 700; display: flex; align-items: center; gap: 6px; min-width: 0; overflow: hidden; white-space: nowrap; }
.kfp-row .feed-action { grid-column: 2; grid-row: 2; font-size: 11px; color: rgba(255,255,255,0.55); text-align: center; white-space: nowrap; align-self: center; }
.kfp-row .victim      { grid-column: 3; grid-row: 2; color: #ff1a1a; font-size: 14px; font-weight: 700; display: flex; align-items: center; gap: 6px; min-width: 0; overflow: hidden; white-space: nowrap; }
.kfp-row .weapon      { grid-column: 4; grid-row: 2; display: flex; align-items: center; gap: 8px; min-width: 0; overflow: hidden; }
.kfp-row .weapon span { font-size: 11px; color: rgba(255,255,255,0.62); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kfp-row .weapon-image { width: 136px; height: 76px; flex: 0 0 136px; object-fit: contain; filter: drop-shadow(0 0 6px rgba(255,181,43,0.55)); }
.kfp-row .killfeed-armband { display: inline-block !important; filter: none !important; box-shadow: none !important; width: 36px; height: 36px; flex-shrink: 0; }

/* ── Feed list container ── */
#killfeed-list {
    height: 62vh !important;
    overflow-y: scroll !important;
    padding: 6px 0 !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 6px !important;
    box-sizing: border-box !important;
}
@media (max-width: 767px) {
    #killfeed-list { height: min(420px, 68vh) !important; }
}

/* ── Killfeed highlights strip ── */
#killfeed .killfeed-highlights {
    position: relative;
    z-index: 2;
    max-width: 1380px;
    margin: 0 auto 20px;
}

/* ── Mobile ── */
@media (max-width: 767px) {
    .kf-hero { height: min(240px, 58vw); border-radius: 10px; margin-bottom: 14px; }
    .kf-hero-content { padding: 0 20px; }
    .kf-heading { font-size: clamp(34px, 11vw, 60px); flex-direction: column; align-items: flex-start; white-space: normal; line-height: 0.92; }
    .kf-sub { display: block; }
    .kf-page-col-headers {
        display: grid !important;
        grid-template-columns: 1fr auto 1fr !important;
        padding: 4px 12px 4px !important;
    }
    .kf-page-col-headers .kfc-killer   { grid-column: 1 !important; }
    .kf-page-col-headers .kfc-action   { grid-column: 2 !important; text-align: center !important; }
    .kf-page-col-headers .kfc-victim   { grid-column: 3 !important; text-align: right !important; }
    .kf-page-col-headers .kfc-weapon,
    .kf-page-col-headers .kfc-distance { display: none !important; }
    .kfp-row {
        grid-template-columns: 1fr auto 1fr;
        grid-template-rows: auto auto auto;
        padding: 8px 12px;
        gap: 4px 8px;
    }
    .kfp-row time         { grid-column: 2/4; text-align: right; }
    .kfp-row .distance    { display: none; }
    .kfp-row .killer      { grid-column: 1; grid-row: 2 / 4; font-size: 13px; flex-direction: column-reverse; align-items: flex-start; justify-content: space-between; gap: 0; }
    .kfp-row .feed-action { grid-column: 2; grid-row: 2; font-size: 10px; }
    .kfp-row .victim      { grid-column: 3; grid-row: 2 / 4; font-size: 13px; justify-self: end; flex-direction: column-reverse; align-items: flex-end; justify-content: space-between; gap: 0; }
    .kfp-row .weapon      { grid-column: 2; grid-row: 3; justify-self: center; align-items: center; }
    .kfp-row .weapon-image { width: 70px; height: 40px; flex-basis: 70px; }
    .kfp-row .killfeed-armband { display: inline-block !important; width: 26px !important; height: 26px !important; }
}

/* ─── Home Page Redesign ─────────────────────────────────────────────────────── */

.home-hero {
    position: relative;
    width: 100%;
    max-width: 1380px;
    margin-left: auto;
    margin-right: auto;
    min-height: 400px;
    max-height: 560px;
    height: 50vh;
    overflow: hidden;
    border-radius: 10px;
    border: 1px solid rgba(255,185,43,0.30);
    box-shadow: 0 0 0 1px rgba(255,185,43,0.10), 0 8px 48px rgba(0,0,0,0.75);
    margin-bottom: 28px;
    flex-shrink: 0;
    background: #080808;
}
.home-hero-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: 60% center;
    display: block;
    user-select: none;
    pointer-events: none;
}
.home-hero-overlay {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(to right, rgba(5,5,5,0.90) 0%, rgba(5,5,5,0.65) 32%, rgba(5,5,5,0.20) 58%, rgba(5,5,5,0.0) 78%),
        linear-gradient(to top, #080808 0%, rgba(8,8,8,0.68) 20%, rgba(8,8,8,0.28) 42%, transparent 62%),
        radial-gradient(ellipse at 88% 5%, rgba(0,0,0,0.55) 0%, rgba(0,0,0,0.22) 32%, transparent 58%);
    z-index: 3;
}
.home-hero-content {
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    z-index: 4;
    padding: 0 52px;
    max-width: 600px;
}
.home-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 2px;
    color: rgba(176,63,255,1);
    text-transform: uppercase;
    margin-bottom: 16px;
    background: rgba(140,24,212,0.12);
    border: 1px solid rgba(176,63,255,0.40);
    border-radius: 100px;
    padding: 5px 14px 5px 10px;
    width: fit-content;
}
.home-eyebrow i {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: rgba(176,63,255,1);
    box-shadow: 0 0 8px rgba(176,63,255,0.9), 0 0 18px rgba(176,63,255,0.45);
    flex-shrink: 0;
    animation: home-dot-pulse 2.4s ease-in-out infinite;
}
@keyframes home-dot-pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50%       { opacity: 0.55; transform: scale(0.75); }
}
.home-heading {
    font-family: Impact, "Arial Black", sans-serif;
    font-size: clamp(52px, 8vw, 108px);
    font-weight: 400;
    line-height: 0.9;
    letter-spacing: 3px;
    text-transform: uppercase;
    margin: 0 0 20px;
    display: flex;
    flex-direction: column;
}
.home-h-white {
    background: linear-gradient(95deg, #ffffff 0%, #d8d8d8 28%, #aaaaaa 54%, #e8e8e8 80%, #cccccc 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    color: transparent;
    text-shadow: none;
    filter: drop-shadow(0 2px 22px rgba(0,0,0,0.9));
}
.home-h-purple {
    background: linear-gradient(95deg, #8c18d4 0%, #b03fff 22%, #e2b0ff 48%, #c060ff 68%, #8b1dd6 88%, #b03fff 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    color: transparent;
    text-shadow: none;
    filter: drop-shadow(0 0 30px rgba(176,63,255,0.50));
}
.home-sub {
    font-size: 16px;
    color: rgba(220,220,220,0.72);
    line-height: 1.55;
    margin: 0;
    font-weight: 400;
}

/* ─── Home Metrics Row ───────────────────────────────────────────────────────── */
.home-metrics-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}
/* Flat dark cards — see-through to background, no frosted glass gloss */
.home-metrics-row .metric {
    background: rgba(8,8,10,0.55) !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    border-color: rgba(255,185,43,0.15) !important;
    box-shadow: 0 4px 24px rgba(0,0,0,0.5) !important;
}

/* Ensure featured-panels-row shows (styles.css may hide .featured-panels-row in some contexts) */
#home .featured-panels-row { display: flex !important; }
#home .featured-factions-wrap,
#home .featured-players-wrap { display: block !important; }

/* ─── Home Content Grid ──────────────────────────────────────────────────────── */
.home-content-grid {
    display: grid;
    grid-template-columns: 1fr 1.6fr;
    gap: 16px;
    margin-bottom: 24px;
    align-items: start;
}
.home-panel {
    background: rgba(5,5,6,0.93);
    border: 1px solid rgba(255,185,43,0.16);
    border-radius: 12px;
    padding: 14px 16px;
    display: flex;
    flex-direction: column;
    max-height: 380px;
    overflow: hidden;
}
.home-panel-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(255,185,43,0.10);
    flex-shrink: 0;
}

/* ═══════════════════════════════════════════════════════
   #profile page — gold/void redesign
   Replaces the old purple identity card + the rainbow
   cyan/teal/orange/amber/green/red tone-panel system (used
   only here and in the Faction HQ dashboard, which also
   renders inside #profile) with the same void-black + gold
   treatment established on #factions. Semantic colors (online
   = green, closed/danger = red) are left alone on purpose.
═══════════════════════════════════════════════════════ */

/* Generic buttons (Remove/Save Settings/Approve/Deny/Add Member/etc.) default
   to the global purple `button{border-color:var(--line)}` — override to gold
   here. Placed early so the more specific danger/edit/back-button rules below
   still win on their own elements. */
#profile button:not(.danger-button),
#faction-hq button:not(.danger-button),
#hq-tab-dialog button:not(.danger-button) {
    border-color: rgba(255,181,43,.35) !important;
    background: rgba(10,10,10,.85) !important;
    color: rgba(255,255,255,.92) !important;
}
#profile button:not(.danger-button):hover,
#faction-hq button:not(.danger-button):hover,
#hq-tab-dialog button:not(.danger-button):hover {
    border-color: rgba(255,181,43,.6) !important;
    background: rgba(255,181,43,.1) !important;
}

/* Identity card — translucent so the page's animated constellation
   background shows through (matches the rest of the site's void panels,
   not a solid block). Uses the neutral #0a0a0a base at partial alpha
   instead of the old #05010c/rgba(5,1,12,...) hue-cast value. */
#profile .panel.profile-command,
#profile .panel.profile-command:hover {
    background-color: rgba(10,10,10,.42) !important;
    background-image: none !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    isolation: auto !important;
    border-color: rgba(255,181,43,0.24) !important;
    box-shadow: 0 8px 32px rgba(0,0,0,.5), inset 0 1px 0 rgba(255,181,43,.06) !important;
    /* .profile-command is the one panel final-tuning.css deliberately keeps
       the legacy corner-bracket ::before alive on (for its own banner-
       gradient overlay). That decoration's filter:drop-shadow(currentColor)
       in styles.css is never reset, so without an explicit color here it
       falls back to the shared base ".panel{color:var(--purple)}" default
       and washes the whole translucent card purple. */
    color: rgba(255,255,255,.85) !important;
}
#profile .profile-command::before {
    /* Partial darkening wash over the banner image for text contrast —
       must stay translucent (not opaque) or it hides the banner entirely.
       filter:none kills the inherited corner-bracket drop-shadow glow
       (see color note above) which otherwise tints this overlay purple
       regardless of background/color fixes. */
    background: rgba(10,10,10,.5) !important;
    filter: none !important;
}
#profile .profile-command::after {
    /* Separate legacy corner-bracket decoration (styles.css .panel::after,
       inset:10px, filter:drop-shadow(0 0 8px currentColor)). final-tuning.css
       kills this for every OTHER panel via ".panel:not(.profile-command)"
       but .profile-command was excluded from that kill-list (it needed its
       own ::before override) which left ::after completely un-touched —
       these were the leftover "border frame" lines around the identity
       card. Nothing here ever used it, so just remove it outright. */
    content: none !important;
    display: none !important;
}
#profile .profile-avatar {
    border: 2px solid rgba(255,181,43,.5);
    box-shadow: 0 0 18px rgba(255,181,43,.22);
}
#profile .profile-command h2 {
    color: #fff !important;
    text-shadow: 0 0 18px rgba(255,255,255,0.22) !important;
}
#profile .profile-command .eyebrow {
    color: #ffb52b !important;
}
#profile .profile-discord-id {
    margin: 2px 0 0;
    color: rgba(255,255,255,.4);
    font-size: 11px;
    letter-spacing: .3px;
}
#profile .profile-faction-tag {
    --faction-color: #ffb52b !important;
    color: #ffb52b !important;
    border-color: rgba(255,181,43,.65) !important;
    box-shadow: 0 0 14px rgba(255,181,43,.16) !important;
}
#profile .profile-edit-button {
    background: rgba(10,10,10,.9) !important;
    border: 1px solid rgba(255,181,43,.38) !important;
}
#profile .profile-edit-button:hover { border-color: rgba(255,181,43,.7) !important; }
#profile .profile-back-btn {
    border-color: rgba(255,181,43,.32) !important;
    color: #ffb52b !important;
}
#profile .profile-back-btn:hover {
    border-color: rgba(255,181,43,.6) !important;
    background: rgba(255,181,43,.08) !important;
}

/* Discord XP panel */
#profile .profile-xp {
    background: rgba(12,12,12,.4) !important;
    border-color: rgba(255,181,43,.3) !important;
}
#profile .profile-xp span { color: #ffb52b !important; }
#profile .profile-xp strong { color: #fff !important; }
#profile .xp-track { border-color: rgba(255,181,43,.35) !important; }
#profile .xp-track i {
    background: linear-gradient(90deg,#cc8800,#ffb52b,#fff5c0) !important;
    box-shadow: 0 0 14px rgba(255,181,43,.55) !important;
}

/* LED stat tiles (Kills/Deaths/K-D/Playtime, HQ Members/Online/Treasury) —
   the shared .metric component's base background (rgba(12,4,24,...)) has the
   same purple-cast-baked-into-the-hex issue as the panels above (B channel
   way higher than R/G). Scoped to Profile/Faction HQ only — Killfeed/
   Leaderboards/Home use the same shared component and haven't asked for this. */
#profile .profile-metric-row .metric,
#faction-hq .hq-metrics .metric {
    background: #0a0a0a !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
}

/* Detail grid + Faction HQ cards: one consistent void-black/gold panel
   instead of a different color per card. Translucent (not solid) so the
   page's animated background shows through, per user request. */
#profile .cyan-panel,
#profile .teal-panel,
#profile .orange-panel,
#profile .amber-panel,
#profile .green-panel,
#faction-hq .cyan-panel,
#faction-hq .teal-panel,
#faction-hq .orange-panel,
#faction-hq .amber-panel,
#faction-hq .green-panel,
#faction-hq .red-panel {
    background: rgba(10,10,10,.42) !important;
    border-color: rgba(255,181,43,.22) !important;
    box-shadow: 0 8px 32px rgba(0,0,0,.45), inset 0 1px 0 rgba(255,181,43,.05) !important;
    color: rgba(255,255,255,.85) !important;
}
#profile .cyan-panel h2, #profile .teal-panel h2, #profile .orange-panel h2,
#profile .amber-panel h2, #profile .green-panel h2,
#faction-hq .cyan-panel h2, #faction-hq .teal-panel h2, #faction-hq .orange-panel h2,
#faction-hq .amber-panel h2, #faction-hq .green-panel h2, #faction-hq .red-panel h2 {
    color: #ffb52b !important;
    text-shadow: 0 0 16px rgba(255,181,43,.5) !important;
}
#profile .profile-detail-grid dt { color: rgba(255,255,255,.5) !important; }
#profile .profile-faction > a {
    border-color: rgba(255,181,43,.4) !important;
    color: #ffb52b !important;
}
#profile .profile-faction > a:hover { background: rgba(255,181,43,.08) !important; }

/* Faction HQ dashboard */
#faction-hq .hq-banner {
    background: rgba(10,10,10,.42) !important;
    border-color: rgba(255,181,43,.22) !important;
}
#faction-hq .hq-banner h2 {
    color: #fff !important;
    text-shadow: 0 0 18px rgba(255,255,255,0.22) !important;
}
#faction-hq .eyebrow,
#faction-hq .faction-chat-panel h2 {
    color: #ffb52b !important;
    text-shadow: 0 0 16px rgba(255,181,43,.5) !important;
}
#faction-hq .hq-management textarea,
#faction-hq .hq-management input,
#faction-hq .hq-management select,
#hq-tab-dialog textarea,
#hq-tab-dialog input,
#hq-tab-dialog select {
    border-color: rgba(255,181,43,.3) !important;
    background: #0a0a0a !important;
    color: #fff !important;
}
/* The recruitment <select>'s own displayed value was rendering as black
   text on the near-black background (browser default form-control text
   color winning over the inherited/authored white) — invisible until you
   already knew "Open"/"Closed" was there. Style the dropdown popup list
   itself too, since <option> often needs its own explicit colors or it
   falls back to the OS's native (light) popup styling. */
#hq-tab-dialog select option,
#faction-hq .hq-management select option {
    background: #0a0a0a;
    color: #fff;
}
/* Avatar was silently losing its fixed 38px size to the shared
   ".hq-members span{flex:1}" base rule (styles.css) — that selector has
   higher specificity than ".member-avatar{flex:0 0 38px}" (an extra type
   selector puts it a tier above a lone class), so the avatar flex-grew
   alongside .member-identity by a DIFFERENT amount on every row depending
   on how much free space that row's rank/action buttons left over — which
   is what actually caused member names to start at different X positions
   per row ("not in line"), not a text-alignment property at all. */
#hq-tab-dialog .member-avatar {
    flex: 0 0 38px !important;
}
#hq-tab-dialog .danger-button {
    background: rgba(10,10,10,.85) !important;
}
#hq-tab-dialog .join-requests > div {
    flex-wrap: wrap;
}
/* .hq-management's own base styling (refinements.css) paints a green-to-
   purple diagonal gradient panel background plus green-tinted borders on
   its form/.join-requests boxes — never themed because this wrapper never
   used to appear inside a gold dialog before the Tools tab extraction.
   Neutralize all of it to flat black/gold to match the rest of the dialog. */
#hq-tab-dialog .hq-management {
    background: #0a0a0a !important;
}
#hq-tab-dialog .hq-management form,
#hq-tab-dialog .hq-management .join-requests {
    border-color: rgba(255,181,43,.18) !important;
    background: rgba(255,255,255,.03) !important;
}
#hq-tab-dialog .hq-management .join-requests h3 {
    color: #ffb52b !important;
}
#faction-hq .hq-members > div,
#faction-hq .hq-history > div,
#faction-hq .join-requests > div,
#hq-tab-dialog .hq-members > div,
#hq-tab-dialog .hq-history > div,
#hq-tab-dialog .join-requests > div {
    border-color: rgba(255,181,43,.14) !important;
}
#faction-hq .hq-members em,
#faction-hq .join-requests em,
#hq-tab-dialog .hq-members em,
#hq-tab-dialog .join-requests em { color: #ffb52b !important; }
#faction-hq .member-avatar img,
#hq-tab-dialog .member-avatar img { border-color: rgba(255,181,43,.5) !important; }
#faction-hq .member-avatar b,
#hq-tab-dialog .member-avatar b {
    border-color: rgba(255,181,43,.5) !important;
    color: #ffb52b !important;
    background: #150d02 !important;
}
#faction-hq .faction-chat-panel {
    border-color: rgba(255,181,43,.26) !important;
    background: rgba(10,10,10,.42) !important;
}
#faction-hq .faction-chat-message:nth-child(2n),
#hq-tab-dialog .faction-chat-message:nth-child(2n) {
    background: rgba(255,181,43,.045) !important;
}
/* Chat avatar + message text were still on the old blue/purple palette
   (refinements.css .chat-avatar img border, .chat-avatar b fallback bg,
   .faction-chat-message p color) — none of it scoped to #hq-tab-dialog
   before, so it never got themed along with everything else in this tab. */
#hq-tab-dialog .chat-avatar img {
    border-color: rgba(255,181,43,.5) !important;
}
#hq-tab-dialog .chat-avatar b {
    background: #0a0a0a !important;
    color: #ffb52b !important;
}
#hq-tab-dialog .faction-chat-message {
    border-color: rgba(255,181,43,.1) !important;
}
#hq-tab-dialog .faction-chat-message p {
    color: rgba(255,255,255,.75) !important;
}
#faction-hq .hq-section-heading {
    border-left-color: #ffb52b !important;
    background: linear-gradient(90deg, rgba(255,181,43,.1), rgba(255,181,43,.04), transparent) !important;
}
#faction-hq .hq-section-heading span { color: #ffb52b !important; }

/* Clear break between the Profile section and Faction HQ below it — without
   this, the HQ dashboard just reads as more of the same list (user feedback
   2026-07-09: "the Faction HQ looks combined. You can't even tell it's
   separate"). */
#faction-hq .hq-section-divider {
    display: flex;
    align-items: center;
    gap: 14px;
    margin: 44px 0 20px;
}
#faction-hq .hq-section-divider::before,
#faction-hq .hq-section-divider::after {
    content: "";
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255,181,43,.4), transparent);
}
#faction-hq .hq-section-divider span {
    flex-shrink: 0;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 2.5px;
    text-transform: uppercase;
    color: #ffb52b;
    text-shadow: 0 0 12px rgba(255,181,43,.4);
}
#faction-hq .faction-hq-dashboard {
    margin-top: 0 !important;
}

/* HQ banner — armband + tag beside the faction name, founded date under
   the recruitment status (2026-07-09 HQ overhaul). */
#faction-hq .hq-banner {
    align-items: flex-start !important;
}
#faction-hq .hq-banner-title {
    display: flex;
    align-items: center;
    gap: 10px;
}
#faction-hq .hq-banner-title h2 {
    margin: 0 !important;
}
#faction-hq .hq-armband {
    width: 34px;
    height: 34px;
    object-fit: contain;
}
#faction-hq .hq-tag {
    font-size: 15px;
    font-weight: 700;
    letter-spacing: .5px;
}
#faction-hq .hq-banner-side {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
    flex-shrink: 0;
}
#faction-hq .hq-founded {
    color: rgba(255,255,255,.4);
    font-size: 11px;
    letter-spacing: .3px;
}

/* Members / History / Tools / Chat (Faction HQ) and PVP/Build/Misc/Wallet/
   Faction (Profile) — buttons below the LED metrics that open the
   corresponding panel as a popup dialog, replacing the old always-on grids
   (user feedback: with 15+ members the page scrolled forever and it "felt
   like a list, not a profile"). Each button carries its own color via an
   inline `--tab-color` custom property set in app.js, so one set of rules
   covers both button rows instead of duplicating per-tab selectors. */
#faction-hq .hq-tab-nav,
#profile .profile-tab-nav {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 10px;
    margin: 16px 0;
}
#faction-hq .hq-tab-nav button,
#profile .profile-tab-nav button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 46px;
    border: 1px solid color-mix(in srgb, var(--tab-color, #ffb52b) 45%, transparent);
    border-radius: 10px;
    background: rgba(10,10,10,.5);
    color: var(--tab-color, #ffb52b);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
}
#faction-hq .hq-tab-nav button:hover,
#profile .profile-tab-nav button:hover {
    border-color: var(--tab-color, #ffb52b);
    background: color-mix(in srgb, var(--tab-color, #ffb52b) 10%, transparent);
}
#faction-hq .hq-tab-nav button svg,
#profile .profile-tab-nav button svg {
    width: 16px;
    height: 16px;
    fill: none;
    stroke: var(--tab-color, #ffb52b);
    stroke-width: 3;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.hq-tab-dialog {
    width: min(720px, calc(100vw - 28px));
    /* svh (small viewport height) after the vh fallback — on mobile, 100vh
       is the LARGEST possible viewport (address bar hidden), so 82vh can be
       taller than what's actually visible with browser chrome on screen,
       making the dialog look oversized / push its footer off-screen. Same
       gotcha already fixed on the Map page elsewhere in this file. */
    max-height: 82vh;
    max-height: 82svh;
    border-color: rgba(255,181,43,.35) !important;
    background: #0a0a0a !important;
    box-shadow: 0 0 40px rgba(255,181,43,.18) !important;
}
.hq-tab-dialog::backdrop {
    background: rgba(0,0,0,.78);
}
.hq-tab-dialog .panel-head {
    padding: 18px 20px;
    margin: 0 !important;
    border-bottom: 1px solid rgba(255,181,43,.2);
}
.hq-tab-dialog .panel-head h2 {
    color: #ffb52b !important;
    text-shadow: 0 0 16px rgba(255,181,43,.5) !important;
}
.hq-tab-dialog .panel-head button {
    border-color: rgba(255,181,43,.35) !important;
    color: rgba(255,255,255,.7) !important;
}
.hq-tab-dialog #hq-tab-content {
    overflow-y: auto;
    overscroll-behavior: contain;
    max-height: calc(82vh - 100px);
    max-height: calc(82svh - 100px);
    padding: 20px;
    scrollbar-width: thin;
    scrollbar-color: rgba(255,181,43,.5) rgba(255,255,255,.05);
}
.hq-tab-dialog #hq-tab-content::-webkit-scrollbar {
    width: 8px;
}
.hq-tab-dialog #hq-tab-content::-webkit-scrollbar-track {
    background: rgba(255,255,255,.05);
}
.hq-tab-dialog #hq-tab-content::-webkit-scrollbar-thumb {
    background: rgba(255,181,43,.45);
    border-radius: 4px;
}
.hq-tab-dialog #hq-tab-content::-webkit-scrollbar-thumb:hover {
    background: rgba(255,181,43,.7);
}
@media (max-width: 600px) {
    .hq-tab-dialog {
        width: calc(100vw - 20px);
        max-height: 88vh;
        max-height: 88svh;
    }
    .hq-tab-dialog #hq-tab-content {
        max-height: calc(88vh - 90px);
        max-height: calc(88svh - 90px);
        padding: 14px;
    }
    /* #add-faction-member{display:flex} (styles.css) was written for the
       old, much wider inline panel — "Add Selected Member" alone needs
       ~180px, leaving the search input barely any room in the narrower
       mobile dialog. Stack it instead of squeezing both onto one row. */
    #hq-tab-dialog #add-faction-member {
        flex-direction: column;
        align-items: stretch;
    }
    #hq-tab-dialog #add-faction-member input {
        flex: none;
    }
}
#hq-tab-dialog .hq-management label {
    color: rgba(255,255,255,.55) !important;
}
/* Faction chat message list already scrolls (refinements.css
   .faction-chat-messages{height:280px;overflow-y:auto}) but had no visible
   scrollbar styling of its own — same treatment as #hq-tab-content. */
#hq-tab-dialog .faction-chat-messages {
    background: rgba(10,10,10,.5) !important;
    border-color: rgba(255,181,43,.18) !important;
    scrollbar-width: thin;
    scrollbar-color: rgba(255,181,43,.5) rgba(255,255,255,.05);
}
#hq-tab-dialog .faction-chat-messages::-webkit-scrollbar {
    width: 8px;
}
#hq-tab-dialog .faction-chat-messages::-webkit-scrollbar-track {
    background: rgba(255,255,255,.05);
}
#hq-tab-dialog .faction-chat-messages::-webkit-scrollbar-thumb {
    background: rgba(255,181,43,.45);
    border-radius: 4px;
}
/* The composer previously sat in normal flow after .faction-chat-messages
   inside #hq-tab-content, so on short viewports where the whole tab body
   needed to scroll, the input/Send button scrolled away with it (and a
   position:sticky attempt still left #hq-tab-content free to grow a SECOND
   scrollbar alongside the messages list's own). Fixed properly: give the
   whole chat tab a fixed height and lay it out as a column so
   .faction-chat-messages is the only scrolling region (flex:1) and the
   footer is a normal, never-scrolled flex sibling below it. This keeps
   #hq-tab-content itself from ever needing to scroll for the Chat tab. */
#hq-tab-dialog .faction-chat-tab-body {
    display: flex;
    flex-direction: column;
    height: 400px;
}
#hq-tab-dialog .faction-chat-tab-body .faction-chat-messages {
    flex: 1 1 auto;
    min-height: 0;
    height: auto !important;
    overflow-y: auto !important;
}
#hq-tab-dialog .faction-chat-footer {
    flex: 0 0 auto;
    padding-top: 10px;
    background: #0a0a0a;
    border-top: 1px solid rgba(255,181,43,.12);
}
#hq-tab-dialog .faction-chat-footer .faction-chat-composer {
    margin-top: 0 !important;
}
@media (max-width: 600px) {
    #hq-tab-dialog .faction-chat-tab-body {
        height: 320px;
    }
}
#hq-tab-dialog .pf-tab-stats {
    margin: 0;
}
#hq-tab-dialog .pf-tab-stats > div {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    padding: 13px 0;
    border-bottom: 1px solid rgba(255,255,255,.12);
}
#hq-tab-dialog .pf-tab-stats dt {
    color: rgba(255,255,255,.5);
}
#hq-tab-dialog .pf-tab-stats dd {
    margin: 0;
    color: #fff;
    font-weight: 700;
}
#hq-status {
    margin: 8px 0 0;
    color: var(--red);
    font-size: 12px;
}
#hq-tab-dialog .pf-services-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
#hq-tab-dialog .pf-service-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 12px 14px;
    border: 1px solid rgba(185,68,255,.2);
    border-radius: 10px;
    background: rgba(185,68,255,.05);
}
#hq-tab-dialog .pf-service-row strong {
    display: block;
    color: #fff;
}
#hq-tab-dialog .pf-service-row span {
    display: block;
    margin-top: 3px;
    color: rgba(255,255,255,.5);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: .5px;
}
#hq-tab-dialog .pf-service-status {
    padding: 4px 9px;
    border: 1px solid rgba(25,247,143,.4);
    border-radius: 20px;
    color: var(--green);
    font-size: 10px;
    font-style: normal;
    text-transform: uppercase;
    white-space: nowrap;
}
#hq-tab-dialog .pf-service-status.expired,
#hq-tab-dialog .pf-service-status.inactive {
    border-color: rgba(255,255,255,.25);
    color: rgba(255,255,255,.45);
}

/* Member row layout in the dialog is narrower than the old full-width grid
   was — let it wrap instead of clipping Remove off the right edge.
   Overrides refinements.css's unscoped ".hq-members>div{display:grid;
   grid-template-columns:42px minmax(0,1fr) auto auto}" — those two "auto"
   tracks don't shrink and were pushing Remove past the dialog's edge. */
#hq-tab-dialog .hq-member-row {
    display: flex !important;
    flex-wrap: wrap !important;
}
#hq-tab-dialog .member-identity {
    flex: 1 1 140px;
    min-width: 0;
}
#hq-tab-dialog .member-rank-view:not([hidden]),
#hq-tab-dialog .member-rank-edit:not([hidden]) {
    flex: 0 0 auto;
    margin-left: auto;
}

/* Member row edit/remove controls */
#faction-hq .member-rank-view:not([hidden]),
#hq-tab-dialog .member-rank-view:not([hidden]) {
    display: flex !important;
    align-items: center;
    gap: 8px;
}
#faction-hq .member-rank-view em,
#hq-tab-dialog .member-rank-view em {
    font-style: normal;
    color: rgba(255,255,255,.55);
    font-size: 11px;
    text-transform: uppercase;
}
#faction-hq .member-edit-btn,
#faction-hq .member-remove-btn,
#faction-hq .member-rank-cancel,
#hq-tab-dialog .member-edit-btn,
#hq-tab-dialog .member-remove-btn,
#hq-tab-dialog .member-rank-cancel {
    min-height: 28px;
    padding: 0 10px;
    font-size: 10px;
}
#faction-hq .member-remove-btn,
#hq-tab-dialog .member-remove-btn {
    border-color: rgba(255,72,104,.5) !important;
    color: #ff4868 !important;
}
#faction-hq .member-remove-btn:hover,
#hq-tab-dialog .member-remove-btn:hover {
    background: rgba(255,72,104,.1) !important;
}
#faction-hq .member-rank-edit:not([hidden]),
#hq-tab-dialog .member-rank-edit:not([hidden]) {
    display: flex !important;
    align-items: center;
    gap: 8px;
}
#faction-hq .member-rank-edit select,
#hq-tab-dialog .member-rank-edit select {
    min-height: 28px;
    padding: 0 8px;
    border: 1px solid rgba(255,181,43,.35);
    background: #0a0a0a;
    color: #fff;
    font-size: 11px;
}

/* Custom Yes/No remove-member confirmation — green Yes, red No */
.hq-confirm-dialog {
    width: min(380px, calc(100vw - 28px));
    padding: 22px;
    border: 1px solid rgba(255,181,43,.35);
    border-radius: 14px;
    background: #0a0a0a;
    color: #fff;
    box-shadow: 0 20px 60px rgba(0,0,0,.8);
}
.hq-confirm-dialog::backdrop {
    background: rgba(0,0,0,.7);
}
.hq-confirm-dialog #hq-confirm-message {
    margin: 0 0 18px;
    font-size: 14px;
    line-height: 1.5;
}
.hq-confirm-actions {
    display: flex;
    gap: 10px;
}
.hq-confirm-actions button {
    flex: 1;
    min-height: 42px;
    font-weight: 700;
    letter-spacing: .5px;
}
.hq-confirm-yes {
    border-color: rgba(49,209,124,.6) !important;
    color: #31d17c !important;
    background: rgba(49,209,124,.1) !important;
}
.hq-confirm-yes:hover {
    background: rgba(49,209,124,.2) !important;
}
.hq-confirm-no {
    border-color: rgba(255,72,104,.6) !important;
    color: #ff4868 !important;
    background: rgba(255,72,104,.1) !important;
}
.hq-confirm-no:hover {
    background: rgba(255,72,104,.2) !important;
}

/* Edit Profile dialog — same dialog-scoping gotcha as #hq-tab-dialog:
   #profile-editor is a top-level <dialog> sibling, not nested inside
   #profile, so it never picked up the gold theme and stayed on the old
   purple .profile-editor base styling (border/glow/textarea/buttons). */
#profile-editor {
    border-color: rgba(255,181,43,.35) !important;
    background: #0a0a0a !important;
    box-shadow: 0 0 40px rgba(255,181,43,.18) !important;
}
#profile-editor::backdrop {
    background: rgba(0,0,0,.78);
}
#profile-editor .panel-head {
    border-bottom: 1px solid rgba(255,181,43,.2);
}
#profile-editor .panel-head h2 {
    color: #ffb52b !important;
    text-shadow: 0 0 16px rgba(255,181,43,.5) !important;
}
#profile-editor label {
    color: rgba(255,255,255,.6) !important;
}
#profile-editor textarea,
#profile-editor input:not([type="file"]) {
    border-color: rgba(255,181,43,.3) !important;
    background: #050505 !important;
    color: #fff !important;
}
#profile-editor fieldset {
    border-color: rgba(255,181,43,.3) !important;
}
#profile-editor .banner-upload {
    border-color: rgba(255,181,43,.5) !important;
}
#profile-editor button:not(.danger-button) {
    border-color: rgba(255,181,43,.35) !important;
    background: rgba(10,10,10,.85) !important;
    color: rgba(255,255,255,.92) !important;
}
#profile-editor button:not(.danger-button):hover {
    border-color: rgba(255,181,43,.6) !important;
    background: rgba(255,181,43,.1) !important;
}
#close-profile-editor {
    border-color: rgba(255,181,43,.35) !important;
    color: rgba(255,255,255,.7) !important;
}

.home-panel-head h2 {
    font-size: 10px;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: rgba(255,185,43,0.80);
    font-weight: 700;
    margin: 0;
}
.home-panel-head h2 small {
    font-size: 9px;
    letter-spacing: 1px;
    color: rgba(255,255,255,0.35);
    font-weight: 400;
    margin-left: 8px;
}
.home-panel-head a {
    font-size: 9px;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: rgba(255,185,43,0.55);
    text-decoration: none;
    font-weight: 700;
    transition: color 0.2s;
}
.home-panel-head a:hover { color: rgba(255,185,43,1); }

/* Scrollable inner content — keeps header pinned, content scrolls */
#home-factions,
#home-kills {
    flex: 1;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(255,185,43,0.25) transparent;
}

/* Gold-toned faction chips inside home panel — override per-faction color coding (amber/purple/cyan/green) */
.home-factions-panel .faction-chip {
    border-color: rgba(255,185,43,0.22) !important;
    color: #FFB52B !important;
    border-radius: 8px;
    margin-bottom: 5px;
}
.home-factions-panel .faction-chip em {
    color: var(--muted) !important;
}

.home-panel-more {
    display: block;
    margin-top: 8px;
    text-align: center;
    font-size: 9px;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: rgba(255,185,43,0.45);
    text-decoration: none;
    font-weight: 700;
    padding: 7px;
    border-top: 1px solid rgba(255,185,43,0.08);
    flex-shrink: 0;
    transition: color 0.2s;
}
.home-panel-more:hover { color: rgba(255,185,43,0.9); }

/* Strip glassmorphism from any .panel on the home page — see-through, no gloss highlight, no inner glow */
#home .panel {
    background-color: rgba(7, 7, 8, 0.72) !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.38) !important;
    border-color: rgba(255, 181, 43, 0.30) !important;
}

/* Metric panels (.metric, no .panel class) — strip purple base background on home + killfeed */
#home .metric,
#killfeed .metric {
    background: rgba(7, 7, 8, 0.88) !important;
}

/* Desktop killfeed highlights: Total Kills → gold, Most Kills → red */
@media (min-width: 768px) {
    #killfeed-highlights .metric:nth-child(3) {
        color: var(--amber);
        --tone-glow: rgba(255,181,43,0.5);
        --matrix-dot: rgba(255,181,43,0.15);
        --matrix-spark: rgba(255,238,198,0.1);
        border-color: rgba(255,181,43,0.68) !important;
        box-shadow: 0 0 28px rgba(255,181,43,0.26), 0 0 52px rgba(255,181,43,0.08) inset !important;
    }
    #killfeed-highlights .metric:nth-child(4) {
        color: var(--red);
        --tone-glow: rgba(255,51,78,0.5);
        --matrix-dot: rgba(255,51,78,0.15);
        --matrix-spark: rgba(255,214,220,0.1);
        border-color: rgba(255,51,78,0.68) !important;
        box-shadow: 0 0 28px rgba(255,51,78,0.26), 0 0 52px rgba(255,51,78,0.08) inset !important;
    }
}

/* Preserve each metric type's colored box-shadow; only override the base purple glow fallback */
#home .metric:not(.green):not(.red):not(.amber):not(.purple),
#killfeed .metric:not(.green):not(.red):not(.amber):not(.purple) {
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.06), 0 4px 18px rgba(0,0,0,0.55) !important;
}

/* Kill body::before scanline + edge-gradient that draws visible frame lines */
body::before { display: none !important; }

/* Kill main::after corner bracket decorations (purple/cyan L-shapes at 3 corners of main) */
main::after { content: none !important; display: none !important; }

/* Remove corner-frame ::before/::after from .panel elements inside home */
#home .panel::before { content: none !important; display: none !important; }
#home .panel::after  { content: none !important; display: none !important; }
#home .panel:hover,
#home .panel:focus {
    border-color: rgba(255,185,43,0.22) !important;
    box-shadow: 0 14px 44px rgba(0,0,0,0.50) !important;
}

/* Home content panels — neutral dark, minimal constellation bleed-through */
.home-panel {
    background: rgba(5,5,6,0.93) !important;
    box-shadow: 0 2px 16px rgba(0,0,0,0.55) !important;
}
.home-panel:hover {
    border-color: rgba(255,185,43,0.28) !important;
    box-shadow: 0 4px 24px rgba(0,0,0,0.65) !important;
}

/* Killfeed rows in the home panel — compact 2-row layout always applied */
.home-killfeed-panel .feed-row {
    min-height: 0 !important;
    display: grid !important;
    grid-template-columns: 60px minmax(0,1fr) 72px minmax(0,1fr) 52px 36px !important;
    gap: 7px 8px !important;
    padding: 10px !important;
    background: rgba(6,6,7,0.45) !important;
    border-color: rgba(255,185,43,0.08) !important;
    border-radius: 10px !important;
}
.home-killfeed-panel .feed-row .kill-skull  {
    display: none !important;
}
.home-killfeed-panel .feed-row .weapon-image { filter: drop-shadow(0 0 4px rgba(255,181,43,0.55)) !important; }
.home-killfeed-panel .killfeed-armband { filter: none !important; box-shadow: none !important; }
.home-killfeed-panel .feed-row .feed-live   { grid-column: 1 !important; grid-row: 1 !important; }
.home-killfeed-panel .feed-row time         { grid-column: 2/6 !important; grid-row: 1 !important; padding: 0 !important; border: 0 !important; font-size: 9px !important; }
.home-killfeed-panel .feed-row .distance    { grid-column: 6 !important; grid-row: 1 !important; text-align: right !important; }
.home-killfeed-panel .feed-row .killer {
    color: var(--purple) !important;
    text-shadow: none !important;
}
.home-killfeed-panel .feed-row .victim {
    color: var(--red) !important;
    text-shadow: none !important;
}
.home-killfeed-panel .feed-row .killer      { grid-column: 1/3 !important; grid-row: 2 !important; padding: 0 0 0 22px !important; font-size: 12px !important; }
.home-killfeed-panel .feed-row .feed-action { grid-column: 3 !important; grid-row: 2 !important; font-size: 9px !important; }
.home-killfeed-panel .feed-row .victim      { grid-column: 4 !important; grid-row: 2 !important; font-size: 12px !important; }
.home-killfeed-panel .feed-row .weapon      { grid-column: 5 !important; grid-row: 2 !important; justify-content: flex-end !important; font-size: 10px !important; }
.home-killfeed-panel .feed-row .weapon span { display: none !important; }
.home-killfeed-panel .feed-row .weapon-image { width: 68px !important; height: 42px !important; flex-basis: 68px !important; }
.home-killfeed-panel .killfeed-armband { width: 22px !important; height: 22px !important; }

/* Killfeed column header row */
.kf-col-headers {
    display: grid;
    grid-template-columns: 60px minmax(0,1fr) 72px minmax(0,1fr) 52px 36px;
    gap: 0 8px;
    padding: 6px 10px 4px;
    font-size: 9px;
    letter-spacing: 0.10em;
    text-transform: uppercase;
    color: rgba(255,185,43,0.45);
    font-weight: 700;
}
.kf-col-headers .kfc-killer   { grid-column: 1/3; padding-left: 22px; }
.kf-col-headers .kfc-action   { grid-column: 3; }
.kf-col-headers .kfc-victim   { grid-column: 4; }
.kf-col-headers .kfc-weapon   { grid-column: 5; text-align: right; }
.kf-col-headers .kfc-distance { grid-column: 6; text-align: right; }

/* Mobile killfeed: 3-column layout gives killer/victim full expansion room for long names */
@media (max-width: 767px) {
    .home-killfeed-panel .feed-row {
        display: grid !important;
        grid-template-columns: 1fr auto 1fr !important;
        grid-template-rows: auto auto !important;
    }
    .home-killfeed-panel .feed-row .feed-live   { grid-column: 1 !important; grid-row: 1 !important; justify-self: start !important; }
    .home-killfeed-panel .feed-row time         { grid-column: 2/4 !important; grid-row: 1 !important; text-align: left !important; }
    .home-killfeed-panel .feed-row .distance    { display: none !important; }
    .home-killfeed-panel .feed-row .killer      { grid-column: 1 !important; grid-row: 2 !important; padding: 0 !important; justify-self: start !important; }
    .home-killfeed-panel .feed-row .feed-action { grid-column: 2 !important; grid-row: 2 !important; text-align: center !important; }
    .home-killfeed-panel .feed-row .victim      { grid-column: 3 !important; grid-row: 2 !important; text-align: right !important; justify-self: end !important; }
    .home-killfeed-panel .feed-row .weapon      { display: none !important; }
    .kf-col-headers {
        grid-template-columns: 1fr auto 1fr;
        font-size: 8px;
        padding: 5px 10px 3px;
    }
    .kf-col-headers .kfc-killer   { grid-column: 1; padding-left: 0; }
    .kf-col-headers .kfc-action   { grid-column: 2; text-align: center; }
    .kf-col-headers .kfc-victim   { grid-column: 3; text-align: right; }
    .kf-col-headers .kfc-weapon   { display: none; }
    .kf-col-headers .kfc-distance { display: none; }
}

/* Active factions panel — tone down faction mark glow so it doesn't blow out */
.home-factions-panel .faction-mark {
    box-shadow:
        0 0 0 1px rgba(0,0,0,0.82) inset,
        0 0 0 1px currentColor !important;
    filter: none !important;
}
.home-factions-panel .faction-mark img {
    filter: drop-shadow(0 0 3px currentColor) !important;
}

/* ─── Mobile: keep bg canvases fixed (iOS overflow-x:hidden breaks position:fixed) ─ */
@media (max-width: 767px) {
    #constellation-bg,
    #home-bg-stars,
    #killfeed-tracers,
    #void-page-stars,
    #shop-void-stars {
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        width: 100% !important;
        height: 100% !important;
        will-change: transform;
        -webkit-transform: translateZ(0);
        transform: translateZ(0);
        -webkit-backface-visibility: hidden;
        backface-visibility: hidden;
    }
}

/* ─── Site footer — gold instead of purple ───────────────────────────────────── */
.site-footer {
    border-top-color: rgba(255,181,43,0.32) !important;
    color: rgba(255,181,43,0.60) !important;
}
.site-footer a {
    color: rgba(255,181,43,0.60) !important;
    text-decoration: none;
}
.site-footer a:hover {
    color: rgba(255,181,43,1) !important;
}

/* ─── Responsive ─────────────────────────────────────────────────────────────── */
@media (max-width: 980px) {
    .home-hero { height: min(340px, 60vw); }
    .home-hero-content { padding: 28px 28px; }
    .home-metrics-row { grid-template-columns: repeat(2, 1fr); }
    .home-content-grid { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
    .home-hero { height: 260px; border-radius: 10px; }
    .home-hero-content { padding: 20px 20px; }
    .home-metrics-row { grid-template-columns: repeat(2, 1fr); gap: 8px; }
}

/* ─── Map renderer — layer panel ────────────────────────────────────────────── */
.map-layers-panel label {
    display: flex;
    align-items: center;
    gap: 8px;
}
.map-layers-panel input[type="checkbox"] {
    appearance: none;
    -webkit-appearance: none;
    width: 14px;
    height: 14px;
    flex-shrink: 0;
    border: 1px solid rgba(255,255,255,0.18);
    border-radius: 3px;
    background: rgba(255,255,255,0.05);
    transition: border-color 0.15s, background 0.15s;
}
.map-layers-panel input[type="checkbox"]:not(:disabled) {
    cursor: pointer;
    border-color: rgba(0,255,200,0.35);
}
.map-layers-panel input[type="checkbox"]:not(:disabled):hover {
    border-color: rgba(0,255,200,0.7);
    background: rgba(0,255,200,0.08);
}
.map-layers-panel input[type="checkbox"]:checked {
    background: rgba(0,255,200,0.25);
    border-color: rgba(0,255,200,0.85);
}
.map-layers-panel input[type="checkbox"]:checked::after {
    content: '';
    display: block;
    width: 6px;
    height: 4px;
    border-left: 2px solid #00ffc8;
    border-bottom: 2px solid #00ffc8;
    transform: translate(3px, 3px) rotate(-45deg);
}
.map-layers-panel label:not(:has(input:disabled)) {
    cursor: pointer;
    color: #b4a8c0;
}
.map-layers-panel label:not(:has(input:disabled)):hover {
    color: #e0d8ec;
}

/* ─── Map satellite tile styling ─────────────────────────────────────────────── */
#chernarus-map.leaflet-container {
    background: #080a08;
}
#chernarus-map .leaflet-zoom-animated {
    transition-duration: 0.1s !important;
}
#chernarus-map img.leaflet-tile {
    image-rendering: auto;
}

/* ─── Fullscreen map mode: hide hero, map panel takes over the viewport ────────
   Flow-based (viewport units), NOT position:fixed — this main also uses
   `opacity:0 → .app-ready{opacity:1}` for the anti-flash fix (final-tuning.css),
   and non-1 opacity makes an element a containing block for fixed descendants,
   which briefly starves Leaflet of its real size and wrecks tile layout.
   Only active while body.map-mode; scoped so no other page is touched. */
body.map-mode #map .void-page-title {
    display: none !important;
}
/* Animated starfield backgrounds keep running/repainting even when fully
   covered by the fullscreen map — that's wasted CPU/GPU competing with
   Leaflet's own tile rendering and panning. Kill them outright on the map
   page; the map shell's own near-black background reads as solid black. */
body.map-mode #home-bg-stars,
body.map-mode #void-page-stars {
    display: none !important;
}
/* Map page is the whole screen — no scrolling anywhere, ever. Anything
   added to this page later must be an overlay on top of the map, not
   in-flow content, or it will reintroduce scroll. site-footer always
   renders after <main> regardless of route, so it must be hidden here too. */
body.map-mode .site-footer {
    display: none !important;
}
html:has(body.map-mode),
body.map-mode,
body.map-mode main {
    overflow: hidden !important;
    overscroll-behavior: none;
}
body.map-mode main {
    padding: 0 !important;
}
body.map-mode #map.view {
    max-width: none !important;
    margin: 0 !important;
}
body.map-mode .map-page-panel.map-renderer-panel {
    padding: 0 !important;
}
body.map-mode .map-renderer-shell {
    height: 100vh !important;
    height: 100svh !important;
    height: 100dvh !important;
    height: var(--map-shell-h, 100dvh) !important;
    max-height: none !important;
    min-height: 0 !important;
    border: none !important;
}
@media (max-width: 767px) {
    body.map-mode main {
        padding-top: 54px !important;
    }
    body.map-mode .map-renderer-shell {
        height: calc(100vh - 54px) !important;
        height: calc(100svh - 54px) !important;
        height: calc(100dvh - 54px) !important;
        height: var(--map-shell-h, calc(100dvh - 54px)) !important;
    }
}

/* ── Shop redesign (gold/void, reusing the shared .ff-hero component
   Factions already uses) — same left-align-inside-hero override pattern
   as #factions, just re-scoped to #shop since these rules are ID-scoped
   and don't cascade between pages. */
#shop .ff-hero-content .void-heading {
    display: flex !important;
    flex-direction: column !important;
    text-align: left !important;
    white-space: normal !important;
    margin: 0 0 12px !important;
}
#shop .ff-hero-content .void-heading .ff-h-gold,
#shop .ff-hero-content .void-heading .ff-h-white,
#shop .ff-hero-content .void-heading .ff-h-green {
    display: block !important;
    font-size: clamp(52px, 8vw, 108px) !important;
    line-height: 0.9 !important;
    font-family: Impact, "Arial Black", sans-serif !important;
    font-weight: 400 !important;
}
#shop .ff-hero-content .void-page-badges {
    display: flex !important;
    justify-content: flex-start !important;
    text-align: left !important;
    gap: 8px;
    margin-bottom: 16px;
}
#shop .ff-hero-content .ff-badge {
    color: #19f78f !important;
    border-color: rgba(25,247,143,0.55) !important;
    background: rgba(25,247,143,0.10) !important;
    text-shadow: none !important;
}
#shop .ff-hero-content .ff-badge i {
    background: #19f78f !important;
    box-shadow: 0 0 6px rgba(25,247,143,0.9), 0 0 12px rgba(25,247,143,0.4) !important;
}
#shop .ff-hero-content .ff-sub {
    display: block !important;
    color: rgba(255,255,255,0.68) !important;
    font-size: 17px !important;
    margin: 16px 0 0 !important;
    width: auto !important;
    text-align: left !important;
    white-space: normal !important;
}
@media (max-width: 600px) {
    #shop .ff-hero-content .void-heading .ff-h-gold,
    #shop .ff-hero-content .void-heading .ff-h-white,
    #shop .ff-hero-content .void-heading .ff-h-green {
        font-size: clamp(36px, 14vw, 56px) !important;
    }
}

.shop-how-it-works {
    max-width: 1380px;
    margin: 0 auto 36px;
    padding: 0 4px;
}
.shop-how-it-works h2 {
    margin: 0 0 16px;
    font-family: Impact, "Arial Black", sans-serif;
    font-weight: 400;
    font-size: clamp(18px, 2vw, 24px);
    color: rgba(255,255,255,.5);
    text-transform: uppercase;
    letter-spacing: 1px;
}
.shop-steps {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}
.shop-step {
    position: relative;
    padding: 20px;
    border: 1px solid rgba(25,247,143,.18);
    border-radius: 14px;
    background: #0a0a0a;
}
.shop-step-num {
    position: absolute;
    top: 14px;
    right: 18px;
    color: rgba(255,255,255,.15);
    font-family: Impact, "Arial Black", sans-serif;
    font-size: 26px;
}
.shop-step-icon {
    display: inline-flex;
    width: 34px;
    height: 34px;
    margin-bottom: 12px;
    color: #19f78f;
}
.shop-step-icon svg {
    width: 100%;
    height: 100%;
    fill: none;
    stroke: currentColor;
    stroke-width: 3;
    stroke-linecap: round;
    stroke-linejoin: round;
    filter: drop-shadow(0 0 6px rgba(25,247,143,.5));
}
.shop-step h3 {
    margin: 0 0 6px;
    color: #fff;
    font-size: 15px;
}
.shop-step p {
    margin: 0;
    color: rgba(255,255,255,.6);
    font-size: 12.5px;
    line-height: 1.5;
}
@media (max-width: 640px) {
    .shop-steps { gap: 8px; }
    .shop-step { padding: 12px 10px; }
    .shop-step-num { top: 8px; right: 10px; font-size: 18px; }
    .shop-step-icon { width: 24px; height: 24px; margin-bottom: 8px; }
    .shop-step h3 { font-size: 11.5px; margin-bottom: 4px; }
    .shop-step p { font-size: 9.5px; line-height: 1.35; }
}

.shop-categories {
    max-width: 1380px;
    margin: 0 auto;
    padding: 0 4px;
}
.shop-category-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
    max-width: 1380px;
    margin: 0 auto 40px;
    padding: 0 4px;
}
@media (max-width: 1000px) {
    .shop-category-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
    .shop-category-grid { grid-template-columns: 1fr; gap: 12px; }
}
.shop-category-tile {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid rgba(255,181,43,.18);
    border-radius: 14px;
    background: #0a0a0a;
    box-shadow: 0 8px 32px rgba(0,0,0,.55);
    cursor: pointer;
    transition: border-color .15s, box-shadow .15s, transform .15s;
}
.shop-category-tile:hover {
    border-color: rgba(25,247,143,.45);
    box-shadow: 0 14px 44px rgba(0,0,0,.6), 0 0 24px rgba(25,247,143,.12);
    transform: translateY(-2px);
}
.shop-category-tile-media {
    position: relative;
    aspect-ratio: 16/9;
    overflow: hidden;
    background: #050505;
}
.shop-category-tile-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.shop-category-tile-body {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 18px 20px;
}
.shop-category-tile-body h2 {
    margin: 0;
    color: #fff;
    font-size: 20px;
}
.shop-category-tile-body span {
    color: rgba(255,255,255,.45);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: .8px;
    white-space: nowrap;
}
.shop-category-nav {
    display: flex;
    align-items: baseline;
    gap: 16px;
    margin-bottom: 16px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(25,247,143,.18);
}
.shop-category-nav h2 {
    margin: 0;
    font-family: Impact, "Arial Black", sans-serif;
    font-weight: 400;
    font-size: clamp(20px, 2.4vw, 28px);
    color: #19f78f;
    text-shadow: 0 0 16px rgba(25,247,143,.35);
}
.shop-category-nav span {
    margin-left: auto;
    color: rgba(255,255,255,.45);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: .8px;
    white-space: nowrap;
}
.shop-back-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 14px;
    border: 1px solid rgba(255,181,43,.35);
    border-radius: 20px;
    background: transparent;
    color: rgba(255,255,255,.75);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: .5px;
    cursor: pointer;
    transition: border-color .15s, color .15s, background .15s;
}
.shop-back-btn:hover {
    border-color: rgba(255,181,43,.7);
    color: #ffb52b;
    background: rgba(255,181,43,.08);
}
.shop-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
    padding: 0 4px;
}
@media (max-width: 1000px) {
    .shop-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
    .shop-grid { grid-template-columns: 1fr; gap: 12px; }
}
.shop-card {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid rgba(255,181,43,.45);
    border-radius: 14px;
    background: #0a0a0a;
    box-shadow: 0 8px 32px rgba(0,0,0,.55);
    transition: border-color .15s, box-shadow .15s, transform .15s;
}
.shop-card:hover {
    border-color: rgba(255,181,43,.75);
    box-shadow: 0 14px 44px rgba(0,0,0,.6), 0 0 24px rgba(255,181,43,.1);
    transform: translateY(-2px);
}
.shop-card-media {
    position: relative;
    height: 160px;
    background: radial-gradient(ellipse at 50% 0%, rgba(255,181,43,.1), transparent 70%), #050505;
    border-bottom: 1px solid rgba(255,181,43,.14);
}
.shop-card-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.shop-card-media-fallback {
    display: grid;
    place-items: center;
    width: 100%;
    height: 100%;
    color: rgba(255,181,43,.3);
}
.shop-card-media-fallback svg {
    width: 46px;
    height: 46px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2.5;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.shop-card-type {
    position: absolute;
    top: 10px;
    left: 10px;
    padding: 4px 9px;
    border: 1px solid rgba(255,181,43,.4);
    border-radius: 20px;
    background: rgba(5,5,5,.75);
    color: #ffb52b;
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
}
.shop-card-availability {
    position: absolute;
    top: 10px;
    right: 10px;
    margin: 0;
    padding: 4px 9px;
    border-radius: 20px;
    background: rgba(5,5,5,.75);
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
}
.shop-card-availability i {
    width: 7px;
    height: 7px;
}
.shop-card-body {
    flex: 1;
    padding: 16px 18px 4px;
}
.shop-card-body h2 {
    margin: 0 0 8px;
    color: #fff;
    font-size: 17px;
    filter: none;
    text-shadow: none;
}
.shop-card-body p {
    margin: 0;
    color: rgba(255,255,255,.55);
    font-size: 12.5px;
    line-height: 1.55;
    white-space: pre-line;
}
.shop-card-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 18px 18px;
}
.shop-card-foot .availability {
    margin: 0;
    color: rgba(255,255,255,.7);
    font-size: 11px;
    letter-spacing: .5px;
}
.shop-card-price {
    color: #ffb52b;
    font-size: 16px;
    font-weight: 800;
    white-space: nowrap;
}
.shop-card-price em {
    margin-left: 3px;
    color: rgba(255,181,43,.6);
    font-size: 10px;
    font-style: normal;
    text-transform: uppercase;
}
.shop-card-price-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border: 1px solid rgba(255,181,43,.4);
    border-radius: 20px;
    background: rgba(255,181,43,.1);
    color: #ffb52b;
    font-size: 14px;
    font-weight: 800;
    white-space: nowrap;
}
.shop-card-price-icon {
    display: inline-flex;
    width: 13px;
    height: 13px;
    flex: 0 0 auto;
}
.shop-card-price-icon svg {
    width: 100%;
    height: 100%;
    fill: none;
    stroke: currentColor;
    stroke-width: 3.5;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.shop-card-view-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 18px;
    border: 1px solid rgba(255,181,43,.35);
    border-radius: 20px;
    background: rgba(255,181,43,.14);
    color: #ffb52b;
    font-size: 10.5px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .8px;
    transition: background .15s, border-color .15s;
}
.shop-card:hover .shop-card-view-btn {
    background: rgba(255,181,43,.28);
    border-color: rgba(255,181,43,.6);
}
.shop-card-media-badge {
    position: absolute;
    bottom: 10px;
    right: 10px;
    padding: 4px 9px;
    border: 1px solid rgba(255,181,43,.4);
    border-radius: 20px;
    background: rgba(5,5,5,.75);
    color: #ffb52b;
    font-size: 9px;
    font-weight: 700;
    letter-spacing: .5px;
    text-transform: uppercase;
}
.shop-card[data-shop-product] { cursor: pointer; }

.shop-product-dialog {
    width: min(720px, calc(100vw - 28px));
    max-height: 86vh;
    max-height: 86svh;
    padding: 0 !important;
    border-color: rgba(255,181,43,.35) !important;
    background: #0a0a0a !important;
    box-shadow: 0 0 40px rgba(255,181,43,.16) !important;
    overflow-y: auto;
}
.shop-product-dialog::backdrop {
    background: rgba(0,0,0,.78);
}
.shop-product-dialog .panel-head {
    padding: 18px 20px;
    margin: 0 !important;
    background: linear-gradient(90deg, rgba(255,181,43,.1), transparent);
    border-bottom: 1px solid rgba(255,181,43,.2);
}
.shop-product-dialog .panel-head h2 {
    color: #fff !important;
    text-shadow: none !important;
}
.shop-product-dialog .panel-head button {
    width: 34px;
    height: 34px;
    min-height: 0;
    padding: 0;
    border-color: rgba(255,181,43,.35) !important;
    color: rgba(255,255,255,.7) !important;
    background: transparent !important;
}
.shop-product-body {
    padding: 4px 20px 20px;
}
.shop-product-flyover {
    width: 100%;
    border-radius: 10px;
    margin-bottom: 14px;
    background: #000;
}
.shop-product-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 8px;
    margin-bottom: 16px;
}
.shop-product-gallery img {
    width: 100%;
    aspect-ratio: 4/3;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid rgba(255,181,43,.18);
    cursor: pointer;
    transition: border-color .15s, transform .15s;
}
.shop-product-gallery img:hover {
    border-color: rgba(255,181,43,.6);
    transform: scale(1.02);
}

.shop-lightbox-dialog {
    align-items: center;
    justify-content: center;
    width: 92vw;
    height: 88vh;
    max-width: 1400px;
    padding: 0;
    border: none;
    background: transparent;
}
.shop-lightbox-dialog::backdrop {
    background: rgba(0,0,0,.92);
}
/* display:flex belongs ONLY here, not on the base rule above — the base rule
   setting display:flex unconditionally was overriding the browser's own
   dialog:not([open]){display:none} default, so the dialog (and its
   position:fixed nav/close buttons) stayed visibly painted on screen even
   after .close() removed the [open] attribute. */
.shop-lightbox-dialog[open] {
    display: flex;
}
#shop-lightbox-img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 0 60px rgba(0,0,0,.7);
}
.shop-lightbox-close {
    position: fixed;
    top: 24px;
    right: 28px;
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255,181,43,.4);
    border-radius: 50%;
    background: rgba(0,0,0,.6);
    color: #fff;
    font-size: 22px;
    cursor: pointer;
}
.shop-lightbox-close:hover {
    border-color: #ffb52b;
    color: #ffb52b;
}
.shop-lightbox-nav {
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    width: 52px;
    height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255,181,43,.4);
    border-radius: 50%;
    background: rgba(0,0,0,.6);
    color: #fff;
    font-size: 30px;
    line-height: 1;
    cursor: pointer;
}
.shop-lightbox-nav:hover {
    border-color: #ffb52b;
    color: #ffb52b;
}
.shop-lightbox-prev { left: 24px; }
.shop-lightbox-next { right: 24px; }
.shop-lightbox-count {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    margin: 0;
    padding: 6px 14px;
    border-radius: 20px;
    background: rgba(0,0,0,.6);
    color: rgba(255,255,255,.8);
    font-size: 12px;
}
@media (max-width: 640px) {
    .shop-lightbox-nav { width: 40px; height: 40px; font-size: 22px; }
    .shop-lightbox-prev { left: 8px; }
    .shop-lightbox-next { right: 8px; }
}
.shop-product-desc {
    margin: 0 0 16px;
    color: rgba(255,255,255,.65);
    font-size: 13px;
    line-height: 1.6;
    white-space: pre-line;
}
.shop-product-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding-top: 14px;
    border-top: 1px solid rgba(255,181,43,.14);
}
.shop-product-meta .availability { margin: 0; }
@media (max-width: 600px) {
    .shop-product-gallery { grid-template-columns: repeat(2, 1fr); }
}

.shop-purchase {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid rgba(255,181,43,.14);
}
.shop-purchase-label {
    margin: 0 0 10px;
    color: rgba(255,255,255,.6);
    font-size: 12px;
}
.shop-duration-options {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    margin-bottom: 12px;
}
.shop-duration-btn {
    padding: 10px 8px;
    border: 1px solid rgba(255,181,43,.3);
    border-radius: 8px;
    background: #050505;
    color: rgba(255,255,255,.75);
    font-size: 12.5px;
    font-weight: 600;
    cursor: pointer;
    transition: border-color .15s, background .15s, color .15s;
}
.shop-duration-btn:hover {
    border-color: rgba(255,181,43,.55);
    color: #fff;
}
.shop-duration-btn.active {
    border-color: #ffb52b;
    background: rgba(255,181,43,.12);
    color: #ffb52b;
}
.shop-purchase-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    min-height: 44px;
    padding: 10px 16px;
    border: 1px solid #ffb52b;
    border-radius: 8px;
    background: rgba(255,181,43,.14);
    color: #ffb52b;
    font-size: 13px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .5px;
    text-decoration: none;
    cursor: pointer;
    transition: background .15s, color .15s;
}
.shop-purchase-icon {
    display: inline-flex;
    width: 15px;
    height: 15px;
    flex: 0 0 auto;
}
.shop-purchase-icon svg {
    width: 100%;
    height: 100%;
    fill: none;
    stroke: currentColor;
    stroke-width: 3.5;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.shop-purchase-btn:hover:not(:disabled) {
    background: rgba(255,181,43,.24);
}
.shop-purchase-btn:disabled {
    opacity: .5;
    cursor: not-allowed;
}
.shop-purchase-note {
    margin: 0;
    color: rgba(255,255,255,.5);
    font-size: 12.5px;
    text-align: center;
}
.shop-purchase-error {
    margin: 10px 0 0;
    color: #ff334e;
    font-size: 12px;
    text-align: center;
}
.shop-confirm-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}
.shop-confirm-actions .shop-purchase-btn {
    margin: 0;
}
.shop-cancel-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 44px;
    padding: 10px 16px;
    border: 1px solid rgba(255,255,255,.2);
    border-radius: 8px;
    background: transparent;
    color: rgba(255,255,255,.7);
    font-size: 13px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .5px;
    cursor: pointer;
    transition: border-color .15s, color .15s, background .15s;
}
.shop-cancel-btn:hover:not(:disabled) {
    border-color: rgba(255,255,255,.4);
    color: #fff;
}
.shop-cancel-btn:disabled {
    opacity: .5;
    cursor: not-allowed;
}
.shop-purchase-success {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0;
    padding: 12px 14px;
    border: 1px solid rgba(25,247,143,.35);
    border-radius: 8px;
    background: rgba(25,247,143,.08);
    color: #19f78f;
    font-size: 13px;
    line-height: 1.5;
}
.shop-purchase-success svg {
    width: 20px;
    height: 20px;
    flex: 0 0 auto;
    fill: none;
    stroke: currentColor;
    stroke-width: 3;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.loadout-name-input {
    width: 100%;
    min-height: 46px;
    padding: 10px 16px;
    margin-bottom: 6px;
    border: 1px solid rgba(255,181,43,.3);
    border-radius: 8px;
    background: #050505;
    color: #fff;
    font-size: 15px;
}
.loadout-name-input:focus {
    outline: none;
    border-color: rgba(255,181,43,.7);
}

.loadout-step-body { min-height: 320px; }

/* Static icon+label summary shown at the top of a slot step / in the review step */
.loadout-slot-summary {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
    padding: 10px 12px;
    border: 1px solid rgba(255,181,43,.25);
    border-radius: 9px;
    background: #050505;
}
.loadout-slot-summary img {
    width: 40px;
    height: 40px;
    object-fit: contain;
    flex-shrink: 0;
    border-radius: 6px;
    background: rgba(255,255,255,.06);
}
.loadout-slot-btn-empty {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    flex-shrink: 0;
    border: 1px dashed rgba(255,255,255,.25);
    border-radius: 7px;
    color: rgba(255,255,255,.35);
    font-size: 18px;
}
.loadout-slot-btn-text {
    display: grid;
    gap: 2px;
    min-width: 0;
}
.loadout-slot-btn-label {
    color: rgba(255,255,255,.5);
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: .8px;
}
.loadout-slot-btn-value {
    color: #fff;
    font-size: 12.5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Interactive variant of .loadout-slot-summary — the collapsed "you already
   picked a container item" state (see loadoutSlotCatalogHtml). It's a real
   <button>, so it needs to fight the global button{} reset (min-height:40px,
   padding:0 18px, uppercase, background) back down to look like the plain
   .loadout-slot-summary div it's replacing. */
.loadout-slot-summary-btn {
    width: 100%;
    min-height: 0;
    padding: 10px 12px;
    text-align: left;
    text-transform: none;
    letter-spacing: normal;
    font-family: inherit;
    cursor: pointer;
    transition: border-color .15s, background .15s;
}
.loadout-slot-summary-btn:hover { border-color: rgba(255,181,43,.5); background: rgba(255,181,43,.06); }
.loadout-slot-summary-btn .loadout-slot-btn-text { flex: 1; }
.loadout-slot-summary-change {
    flex-shrink: 0;
    padding: 5px 10px;
    border: 1px solid rgba(255,181,43,.35);
    border-radius: 14px;
    color: rgba(255,181,43,.85);
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: .6px;
}

/* Sub-category catalog tabs within a slot/carried step */
.loadout-subcat-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 14px;
}
.loadout-subcat-tab {
    padding: 6px 12px;
    border: 1px solid rgba(255,255,255,.12);
    border-radius: 16px;
    background: rgba(255,255,255,.03);
    color: rgba(255,255,255,.6);
    font-size: 11px;
    cursor: pointer;
    transition: all .15s;
    touch-action: manipulation;
}
.loadout-subcat-tab:hover { border-color: rgba(255,255,255,.25); color: #fff; }
.loadout-subcat-tab.active {
    border-color: rgba(255,181,43,.7);
    background: rgba(255,181,43,.1);
    color: #ffb52b;
}
.loadout-subcat-tab span { color: rgba(255,255,255,.4); font-size: 10px; }
.loadout-subcat-tab.active span { color: rgba(255,181,43,.7); }

.loadout-carried-counter {
    margin: 0 0 10px;
    color: rgba(255,255,255,.5);
    font-size: 11.5px;
}
.loadout-step-error {
    margin: 0 0 10px;
    color: #ff5b5b;
    font-size: 11.5px;
}

.loadout-review-heading {
    margin: 0 0 14px;
    color: #fff;
    font-size: 16px;
}
.loadout-review-slots {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 22px;
}
@media (max-width: 640px) {
    .loadout-review-slots { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.loadout-review-slot { margin-bottom: 0; }
.loadout-review-subheading {
    margin: 0 0 12px;
    color: rgba(255,181,43,.8);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1px;
}
.loadout-review-carried .loadout-picker-item { cursor: default; }
.loadout-review-carried .loadout-picker-item:hover { background: rgba(255,255,255,.04); border-color: rgba(255,255,255,.08); }

.loadout-cargo-heading {
    margin: 22px 0 4px;
    padding-top: 18px;
    border-top: 1px solid rgba(255,181,43,.14);
    color: #fff;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: .5px;
}

/* No max-height/overflow-y of its own on purpose (reverted 2026-08-06) — a
   nested independently-scrolling grid inside the .fc-wizard dialog's own
   overflow-y:auto looked fine in desktop Chromium mobile-emulation testing,
   but on a real iOS Safari device the inner scroll region wasn't isolated
   the way it should've been: the WHOLE dialog (including the progress dots
   and close button) scrolled as one block past the grid's intended bounds,
   and the Back/Next footer became unreachable without scrolling further
   than expected. One single scroll region (.fc-wizard itself) is far more
   reliable cross-browser than nested overflow — see .fc-step-nav below for
   how the footer stays reachable without the inner scroll trick. */
.loadout-picker-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(96px, 1fr));
    gap: 10px 8px;
    padding: 4px 4px 4px 0;
}
.loadout-picker-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    height: 100%;
    padding: 12px 8px 10px;
    border: 1px solid rgba(255,255,255,.08);
    border-radius: 10px;
    background: rgba(255,255,255,.04);
    color: rgba(255,255,255,.85);
    text-align: center;
    cursor: pointer;
    transition: all .15s;
    touch-action: manipulation;
}
.loadout-picker-item:hover {
    background: rgba(255,255,255,.08);
    border-color: rgba(255,255,255,.22);
}
.loadout-picker-item.selected {
    background: rgba(255,181,43,.14);
    border-color: rgba(255,181,43,.9);
    box-shadow: 0 0 0 2px rgba(255,181,43,.45), 0 0 18px rgba(255,181,43,.3);
}
.loadout-picker-item img {
    width: 48px;
    height: 48px;
    object-fit: contain;
    border-radius: 7px;
    background: rgba(255,255,255,.07);
}
.loadout-picker-item-name {
    font-size: 9.5px;
    letter-spacing: .3px;
    line-height: 1.3;
}
.loadout-cargo-item-main {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    width: 100%;
    padding: 0;
    background: none;
    border: none;
    color: inherit;
    cursor: pointer;
    touch-action: manipulation;
}
.loadout-qty-stepper {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin-top: 6px;
    padding-top: 6px;
    border-top: 1px solid rgba(255,181,43,.2);
    width: 100%;
}
.loadout-qty-stepper button {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    min-height: 0;
    padding: 0;
    border: 1px solid rgba(255,181,43,.4);
    border-radius: 5px;
    background: rgba(255,181,43,.1);
    color: #ffb52b;
    font-size: 13px;
    line-height: 1;
    cursor: pointer;
    touch-action: manipulation;
}
.loadout-qty-stepper button:hover { background: rgba(255,181,43,.22); }
.loadout-qty-stepper span {
    min-width: 16px;
    font-size: 11px;
    font-weight: 600;
    color: #fff;
}
.loadout-picker-none-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    color: rgba(255,255,255,.35);
    font-size: 22px;
}
.loadout-actions {
    border-top: 1px solid rgba(255,181,43,.14);
    padding-top: 20px;
}


/* ── Multi-server: map placeholder for maps without tiles yet ── */
.map-renderer-shell[data-placeholder] {
    display: grid;
    place-items: center;
    background: radial-gradient(ellipse at center, rgba(241, 196, 15, 0.08), transparent 65%), #07050a;
}
.map-coming-soon {
    max-width: 520px;
    padding: 32px 24px;
    text-align: center;
}
.map-coming-soon h2 {
    margin: 16px 0 10px;
    color: #fff;
    font-size: clamp(24px, 4vw, 34px);
    line-height: 1.15;
}
.map-coming-soon p {
    margin: 0;
    color: rgba(255, 255, 255, 0.6);
    font-size: 15px;
    line-height: 1.6;
}

/* ── Multi-server: sidebar server picker (shown with 2+ servers) ── */
.server-picker {
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 11px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.45);
}
.server-picker select {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.04);
    color: #fff;
    font-size: 16px; /* >=16px stops iOS auto-zoom on focus */
}
