/* =====================================================
   GLOBAL THEME — Cinematic Official Game Style
   Legends War 2 Classic
   ใช้กับหน้า Login / Register / Member / Header / Footer
   ===================================================== */

:root {
    --site-bg: #050301;
    --site-bg-2: #090503;
    --site-surface: rgba(14, 8, 5, 0.88);
    --site-surface-2: rgba(29, 17, 8, 0.84);
    --site-surface-3: rgba(45, 25, 10, 0.72);
    --site-edge: rgba(129, 82, 35, 0.42);
    --site-edge-strong: rgba(230, 171, 82, 0.64);
    --site-gold: #c89142;
    --site-gold-2: #b77a32;
    --site-gold-bright: #ffe1a1;
    --site-red: #ab2416;
    --site-red-bright: #f04c32;
    --site-blue: #4a8dff;
    --site-text: #f3e5c8;
    --site-text-soft: #cdb98e;
    --site-muted: #8d7756;
    --site-success: #63d08a;
    --site-danger: #ff7466;
    --site-container: 1240px;
    --site-radius: 18px;
    --site-topbar-height: 64px;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    min-height: 100%;
    background: var(--site-bg);
    scroll-behavior: smooth;
}

body {
    min-height: 100vh;
    margin: 0;
    background:
        radial-gradient(circle at 50% 0%, rgba(156, 82, 22, 0.16), transparent 34rem),
        radial-gradient(circle at 5% 15%, rgba(54, 91, 168, 0.12), transparent 26rem),
        radial-gradient(circle at 95% 22%, rgba(160, 45, 28, 0.12), transparent 26rem),
        linear-gradient(180deg, #080402 0%, #050301 52%, #080503 100%);
    color: var(--site-text);
    font-family: "Prompt", "Kanit", Tahoma, "Segoe UI", sans-serif;
    text-rendering: geometricPrecision;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -2;
    background:
        linear-gradient(90deg, rgba(0, 0, 0, 0.34), transparent 24%, transparent 76%, rgba(0, 0, 0, 0.36)),
        repeating-linear-gradient(-60deg, rgba(255, 255, 255, 0.014), rgba(255, 255, 255, 0.014) 1px, transparent 1px, transparent 12px);
    pointer-events: none;
}

body a,
body button {
    -webkit-tap-highlight-color: transparent;
}

::selection {
    background: rgba(255, 225, 161, 0.28);
    color: #fff7df;
}

.main-container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    /* `clip` (not `hidden`): overflow-x:hidden would force the computed
       overflow-y from visible to auto, turning this wrapper into its own
       vertical scroll container → a second scrollbar on every page.
       `clip` clips horizontal overflow without establishing a scroll box. */
    overflow-x: clip;
}

.main-container main {
    position: relative;
    flex: 1;
}

.main-container main::before {
    content: "";
    position: absolute;
    top: 0;
    left: 50%;
    width: min(900px, 90vw);
    height: 1px;
    transform: translateX(-50%);
    background: linear-gradient(90deg, transparent, rgba(255, 210, 125, 0.34), transparent);
    pointer-events: none;
}

.container,
.container-fluid {
    max-width: var(--site-container);
}

/* =====================================================
   Header / Navbar
   ===================================================== */

.site-header,
header {
    position: relative;
    z-index: 20;
}

header .navbar,
.site-navbar {
    min-height: var(--site-topbar-height);
    padding: 0;
    background:
        linear-gradient(180deg, rgba(5, 3, 1, 0.96), rgba(5, 3, 1, 0.78)) !important;
    border-bottom: 1px solid rgba(213, 152, 74, 0.24);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.36);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);

    position: relative;
    z-index: 21;
}

header .navbar::after,
.site-navbar::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: -1px;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 210, 120, 0.46), transparent);
    pointer-events: none;
}

.site-navbar-container,
header .navbar > .container-fluid {
    width: 100%;
    margin: 0 auto;
    padding: 0 28px;
    gap: 16px;
}

.site-navbar-brand,
header .navbar-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-height: var(--site-topbar-height);
    padding: 0;
    margin: 0;
    color: var(--site-gold-bright) !important;
    text-decoration: none;
}

.site-navbar-brand img,
header .navbar-brand img {
    height: 34px;
    width: auto;
    max-width: 190px;
    object-fit: contain;
    filter:
        drop-shadow(0 2px 8px rgba(0, 0, 0, 0.8))
        drop-shadow(0 0 10px rgba(255, 176, 74, 0.18));
}

.site-navbar-toggler,
header .navbar-toggler {
    border: 1px solid rgba(224, 174, 96, 0.34) !important;
    border-radius: 12px;
    background: rgba(255, 205, 122, 0.06);
    box-shadow: none !important;
}

header .navbar-toggler-icon {
    /* Paint the hamburger directly in theme gold via the SVG stroke.
       Bootstrap's dark-theme default is a white SVG; recoloring white through
       a filter() chain was imprecise. !important overrides the more specific
       [data-bs-theme=dark] .navbar-toggler-icon variable from Bootstrap. */
    --bs-navbar-toggler-icon-bg:
        url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='%23d8bd7c' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2.2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e") !important;
}

.site-navbar-menu,
header .navbar-nav {
    gap: 6px;
}

header .navbar .nav-link,
.site-navbar .nav-link {
    position: relative;
    display: inline-flex;
    align-items: center;
    min-height: 38px;
    padding: 8px 14px !important;
    border: 1px solid transparent;
    border-radius: 999px;
    color: #d8bd7c !important;
    font-size: 13px;
    font-weight: 650;
    letter-spacing: 0.15px;
    text-decoration: none;
    white-space: nowrap;
    transition: color 0.18s ease, border-color 0.18s ease, background 0.18s ease, transform 0.18s ease;
}

header .navbar .nav-link:hover,
header .navbar .nav-link.active,
.site-navbar .nav-link:hover,
.site-navbar .nav-link.active {
    color: var(--site-gold-bright) !important;
    background: rgba(255, 205, 122, 0.08);
    border-color: rgba(224, 174, 96, 0.28);
    transform: translateY(-1px);
}

.site-navbar-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.member-back-home {
    border-color: rgba(213, 152, 74, 0.4);
    color: #f1d8a0;
    font-weight: 600;
    white-space: nowrap;
}

.member-back-home:hover {
    background: rgba(213, 152, 74, 0.16);
    color: #fff;
    border-color: rgba(213, 152, 74, 0.7);
}

.site-lang-switcher .btn {
    min-width: 38px;
    font-weight: 600;
    letter-spacing: 0.04em;
    opacity: 0.6;
}

.site-lang-switcher .btn:hover {
    opacity: 1;
}

/* Language dropdown (full name + flag) */
.site-lang-flag {
    width: 20px;
    height: 14px;
    border-radius: 2px;
    object-fit: cover;
    box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.28);
    flex: 0 0 auto;
    display: block;
}

.site-lang-dropdown .site-lang-current {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    letter-spacing: 0.02em;
}

.site-lang-label {
    line-height: 1;
}

.site-lang-menu {
    min-width: 190px;
    padding: 6px;
    background: rgba(20, 12, 6, 0.98);
    border: 1px solid rgba(213, 152, 74, 0.35);
    border-radius: 12px;
    box-shadow: 0 14px 34px rgba(0, 0, 0, 0.5);
}

.site-lang-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border-radius: 8px;
    color: #f3e5c8;
    font-weight: 600;
}

.site-lang-item:hover,
.site-lang-item:focus {
    background: rgba(213, 152, 74, 0.16);
    color: #fff;
}

.site-lang-item.active {
    background: linear-gradient(180deg, #e0ac5a, #cf8f3c);
    color: #201203;
}

.site-lang-item .fa-check {
    font-size: 12px;
}

.site-lang-switcher .btn.active {
    background: linear-gradient(180deg, #e0ac5a, #cf8f3c);
    color: #201203;
    border-color: #f0cd88;
    opacity: 1;
    font-weight: 800;
    box-shadow: 0 0 0 1px rgba(240, 205, 136, 0.55), 0 4px 10px rgba(0, 0, 0, 0.35);
}

.site-lang-switcher .btn.active:hover,
.site-lang-switcher .btn.active:focus {
    background: linear-gradient(180deg, #ecba69, #d9974a);
    color: #201203;
    border-color: #f5dca0;
}

.site-navbar-actions .btn,
header .navbar .btn {
    min-height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 7px 13px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.1px;
    white-space: nowrap;
    transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease, color 0.18s ease, box-shadow 0.18s ease;
}

.site-btn-login,
header .btn-outline-light {
    color: #fff7df !important;
    border-color: rgba(255, 170, 89, 0.58) !important;
    background:
        linear-gradient(180deg, rgba(255, 122, 58, 0.18), transparent),
        linear-gradient(135deg, #b72d1b 0%, #6f160c 100%) !important;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.18),
        0 6px 18px rgba(125, 22, 10, 0.34);
}

.site-btn-login:hover,
header .btn-outline-light:hover {
    color: #fff !important;
    border-color: rgba(255, 198, 111, 0.75) !important;
    background:
        linear-gradient(180deg, rgba(255, 160, 76, 0.26), transparent),
        linear-gradient(135deg, #d63c25 0%, #812010 100%) !important;
    transform: translateY(-1px);
}

.site-btn-user,
header .btn-outline-info {
    color: var(--site-gold-bright) !important;
    border-color: rgba(224, 174, 96, 0.48) !important;
    background: rgba(255, 205, 122, 0.08) !important;
}

.site-btn-user:hover,
header .btn-outline-info:hover {
    color: #fff7df !important;
    border-color: rgba(255, 224, 150, 0.72) !important;
    background: rgba(255, 205, 122, 0.14) !important;
    transform: translateY(-1px);
}

/* ===== Switch-accounts dropdown ===== */
.site-account-dropdown {
    display: inline-block;
    position: relative;
}

.site-account-dropdown .site-btn-user {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding-right: 12px;
}

.site-account-caret {
    font-size: 10px;
    opacity: .7;
    transition: transform .2s ease;
}

.site-account-dropdown .show .site-account-caret,
.site-account-dropdown.show .site-account-caret { transform: rotate(180deg); }

.site-account-menu {
    min-width: 280px;
    max-width: 320px;
    padding: 6px 0;
    color: #f3e5c8;
    border: 1px solid rgba(255, 219, 145, 0.4) !important;
    border-radius: 14px !important;
    background:
        radial-gradient(circle at 50% -20%, rgba(255, 196, 97, 0.16), transparent 14rem),
        linear-gradient(165deg, rgba(28, 15, 7, 0.97), rgba(12, 6, 3, 0.97)) !important;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.05),
        0 20px 44px rgba(0, 0, 0, 0.55) !important;
    overflow: hidden;
}

.site-account-head {
    padding: 12px 16px 8px;
    border-bottom: 1px solid rgba(199, 145, 66, 0.22);
}

.site-account-head-title {
    color: #ffe1a1;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: .4px;
}

.site-account-head-sub {
    color: #8e7655;
    font-size: 11px;
    font-weight: 700;
    margin-top: 2px;
}

/* ===== Compact summary view inside the header dropdown ===== */
.site-account-menu-summary { min-width: 300px; max-width: 340px; }

.site-account-summary {
    padding: 14px 16px;
    border-bottom: 1px solid rgba(199, 145, 66, 0.22);
}

.site-account-summary-id {
    display: flex;
    align-items: center;
    gap: 10px;
}

.site-account-summary-avatar {
    width: 38px;
    height: 38px;
    flex: 0 0 auto;
    display: grid;
    place-items: center;
    color: #fff5d6;
    border: 1px solid rgba(255, 219, 145, 0.55);
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(177, 112, 24, 0.95), rgba(82, 45, 7, 0.95));
    box-shadow: 0 8px 18px rgba(80, 36, 7, 0.4);
    font-size: 17px;
}

.site-account-summary-id strong {
    display: block;
    color: #ffe1a1;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.2;
    max-width: 220px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.site-account-summary-id small {
    display: block;
    margin-top: 3px;
    color: #8e7655;
    font-family: Consolas, Monaco, monospace;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .3px;
}

.site-account-summary-bal {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-top: 12px;
}

.site-account-summary-bal-item {
    padding: 8px 10px;
    text-align: center;
    border: 1px solid rgba(199, 145, 66, 0.28);
    border-radius: 10px;
    background: rgba(8, 4, 2, 0.5);
}

.site-account-summary-bal-item span {
    display: block;
    color: #8e7655;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .8px;
    text-transform: uppercase;
}

.site-account-summary-bal-item strong {
    display: block;
    margin-top: 3px;
    color: #ffe1a1;
    font-size: 15px;
    font-weight: 700;
    line-height: 1.2;
}

.site-account-action-count {
    margin-left: auto;
    min-width: 22px;
    padding: 1px 8px;
    color: #ffe1a1;
    border: 1px solid rgba(255, 218, 140, 0.45);
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.32);
    font-size: 11px;
    font-weight: 700;
    text-align: center;
}

.site-account-empty {
    padding: 14px 16px;
    color: #8e7655;
    text-align: center;
    font-size: 12px;
    font-weight: 700;
}

.site-account-item {
    position: relative;
    display: flex !important;
    align-items: center;
    gap: 10px;
    padding: 10px 14px !important;
    color: #ceb98c !important;
    background: transparent !important;
    border-bottom: 1px solid rgba(199, 145, 66, 0.12);
    transition: background .15s ease, color .15s ease;
    cursor: pointer;
}

.site-account-item:last-child { border-bottom: 0; }

.site-account-item:hover {
    background: rgba(199, 145, 66, 0.12) !important;
    color: #ffe1a1 !important;
}

.site-account-item.is-active {
    background: linear-gradient(135deg, rgba(177, 112, 24, 0.22), rgba(82, 45, 7, 0.22)) !important;
    color: #fff5d6 !important;
}

.site-account-item-icon {
    width: 30px;
    height: 30px;
    flex: 0 0 auto;
    display: grid;
    place-items: center;
    color: #ffe1a1;
    border: 1px solid rgba(199, 145, 66, 0.34);
    border-radius: 50%;
    background: rgba(8, 4, 2, 0.55);
    font-size: 13px;
}

.site-account-item.is-active .site-account-item-icon {
    color: #fff5d6;
    border-color: rgba(255, 219, 145, 0.65);
    background: linear-gradient(135deg, rgba(177, 112, 24, 0.9), rgba(82, 45, 7, 0.9));
    box-shadow: 0 0 12px rgba(255, 195, 90, 0.35);
}

.site-account-item-text {
    flex: 1 1 auto;
    min-width: 0;
}

.site-account-item-name {
    display: block;
    font-size: 13px;
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.site-account-item-uid {
    display: block;
    color: #8e7655;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .3px;
}

.site-account-item.is-active .site-account-item-uid { color: #c89142; }

.site-account-item-active {
    flex: 0 0 auto;
    width: 22px;
    height: 22px;
    display: grid;
    place-items: center;
    color: #4ade80;
    border: 1px solid rgba(74, 222, 128, 0.55);
    border-radius: 50%;
    background: rgba(20, 83, 45, 0.32);
    font-size: 10px;
}

.site-account-item-logout {
    flex: 0 0 auto;
    width: 26px;
    height: 26px;
    display: grid;
    place-items: center;
    color: #ffd7d0;
    border: 1px solid rgba(240, 88, 60, 0.4);
    border-radius: 8px;
    background: rgba(127, 29, 29, 0.18);
    font-size: 11px;
    cursor: pointer;
    transition: transform .15s ease, filter .15s ease, background .15s ease;
}

.site-account-item-logout:hover {
    transform: translateY(-1px);
    filter: brightness(1.1);
    background: rgba(127, 29, 29, 0.34);
}

.site-account-action {
    display: flex !important;
    align-items: center;
    gap: 10px;
    padding: 10px 16px !important;
    color: #ceb98c !important;
    background: transparent !important;
    font-size: 13px;
    font-weight: 700;
    transition: background .15s ease, color .15s ease;
}

.site-account-action i {
    width: 18px;
    color: #c89142;
    text-align: center;
}

.site-account-action:hover {
    color: #ffe1a1 !important;
    background: rgba(199, 145, 66, 0.12) !important;
}

.site-account-action:hover i { color: #ffe1a1; }

.site-account-action.is-danger { color: #ffd7d0 !important; }
.site-account-action.is-danger i { color: #f0583c; }
.site-account-action.is-danger:hover {
    color: #ffe2dc !important;
    background: rgba(127, 29, 29, 0.22) !important;
}

/* Prominent top-up CTA inside the account dropdown (matches the WP
   card's gold pill on the member home page). */
.site-account-topup-li { padding: 6px 12px 2px; }

.site-account-topup {
    position: relative;
    display: flex !important;
    align-items: center;
    gap: 10px;
    padding: 10px 14px !important;
    border-radius: 10px;
    border: 1px solid #ffe4a6;
    color: #3a1c04 !important;
    background: linear-gradient(135deg, #fff2c8, #ffce67 46%, #cf8630) !important;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: .02em;
    overflow: hidden;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, .60),
        0 4px 12px rgba(180, 110, 30, .40),
        0 0 14px rgba(255, 200, 100, .35);
    transition: transform .15s ease, box-shadow .15s ease, filter .15s ease, background .15s ease;
}

.site-account-topup i { width: 18px; color: #6a3a0c; text-align: center; }

.site-account-topup .site-account-topup-arrow {
    width: auto;
    margin-left: auto;
    transition: transform .15s ease;
}

.site-account-topup::after {
    content: "";
    position: absolute;
    top: 0;
    left: -60%;
    width: 40%;
    height: 100%;
    background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .70), transparent);
    transform: skewX(-18deg);
    animation: site-account-topup-shine 3.6s ease-in-out infinite;
    pointer-events: none;
}

.site-account-topup:hover {
    color: #1a0c01 !important;
    background: linear-gradient(135deg, #fff5d4, #ffd67c 46%, #d9922f) !important;
    filter: brightness(1.04);
    transform: translateY(-1px);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, .65),
        0 6px 16px rgba(180, 110, 30, .50),
        0 0 20px rgba(255, 205, 110, .50);
}

.site-account-topup:hover .site-account-topup-arrow { transform: translateX(3px); }

/* Sweep once, then rest off-screen for the remainder of the cycle. */
@keyframes site-account-topup-shine {
    0%   { left: -60%; }
    16%  { left: 140%; }
    100% { left: 140%; }
}

@media (prefers-reduced-motion: reduce) {
    .site-account-topup::after { display: none; }
}

/* ===== Site-wide confirmation modal (header dropdown logout) ===== */
.site-confirm-overlay {
    position: fixed;
    inset: 0;
    z-index: 1090;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 16px;
    background: rgba(0, 0, 0, 0.62);
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
}

.site-confirm-overlay.is-open {
    display: flex;
    animation: site-confirm-fade .18s ease both;
}

.site-confirm-modal {
    width: 92%;
    max-width: 460px;
    padding: 26px 26px 22px;
    text-align: center;
    color: #f3e5c8;
    border: 1px solid rgba(255, 219, 145, 0.6);
    border-radius: 18px;
    background:
        radial-gradient(circle at 50% 0%, rgba(255, 196, 97, 0.16), transparent 14rem),
        linear-gradient(145deg, rgba(28, 15, 7, 0.96), rgba(12, 6, 3, 0.96));
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.06),
        0 28px 64px rgba(0, 0, 0, 0.6);
    animation: site-confirm-pop .22s cubic-bezier(.2,.9,.4,1.2) both;
}

.site-confirm-icon {
    width: 56px;
    height: 56px;
    margin: 0 auto 12px;
    display: grid;
    place-items: center;
    color: #ffd7d0;
    border: 1px solid rgba(240, 88, 60, 0.55);
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(138, 36, 23, 0.6), rgba(63, 13, 7, 0.6));
    font-size: 22px;
    box-shadow: 0 8px 20px rgba(120, 28, 16, 0.35);
}

.site-confirm-title {
    margin: 0 0 8px;
    color: #ffe1a1;
    font-size: 20px;
    font-weight: 700;
}

.site-confirm-body {
    margin: 0 0 18px;
    color: #ceb98c;
    font-size: 14px;
    line-height: 1.65;
}

.site-confirm-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
}

.site-confirm-cancel,
.site-confirm-ok {
    min-height: 42px;
    padding: 8px 22px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    border-radius: 12px;
    font-weight: 700;
    font-size: 14px;
    text-decoration: none;
    cursor: pointer;
    transition: transform .15s ease, filter .15s ease, border-color .15s ease, background .15s ease;
}

.site-confirm-cancel {
    color: #ceb98c;
    border: 1px solid rgba(199, 145, 66, 0.34);
    background: rgba(9, 5, 2, 0.6);
}

.site-confirm-cancel:hover {
    color: #ffe1a1;
    border-color: rgba(255, 219, 145, 0.62);
    background: rgba(34, 20, 9, 0.72);
}

.site-confirm-ok {
    color: #ffd7d0;
    border: 1px solid rgba(240, 88, 60, 0.6);
    background: linear-gradient(135deg, #8a2417, #3f0d07);
    box-shadow: 0 10px 22px rgba(120, 28, 16, 0.4);
}

.site-confirm-ok:hover {
    transform: translateY(-1px);
    filter: brightness(1.1);
    color: #ffd7d0;
}

@keyframes site-confirm-fade {
    from { opacity: 0; }
    to   { opacity: 1; }
}

@keyframes site-confirm-pop {
    from { opacity: 0; transform: translateY(8px) scale(0.96); }
    to   { opacity: 1; transform: translateY(0)   scale(1); }
}

/* ===== Switch-account / Logout-picker modal ===== */
.site-switch-overlay .site-switch-modal {
    width: 92%;
    max-width: 480px;
    max-height: 88vh;
    overflow: auto;
    padding: 22px 22px 18px;
    color: #f3e5c8;
    border: 1px solid rgba(255, 219, 145, 0.55);
    border-radius: 18px;
    background:
        radial-gradient(circle at 50% 0%, rgba(255, 196, 97, 0.14), transparent 14rem),
        linear-gradient(145deg, rgba(28, 15, 7, 0.96), rgba(12, 6, 3, 0.96));
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.05),
        0 28px 64px rgba(0, 0, 0, 0.6);
    animation: site-confirm-pop .22s cubic-bezier(.2,.9,.4,1.2) both;
}

.site-switch-head {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 14px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(199, 145, 66, 0.22);
}

.site-switch-head > div { flex: 1 1 auto; min-width: 0; }

.site-switch-head h3 {
    margin: 0;
    color: #ffe1a1;
    font-size: 18px;
    font-weight: 700;
}

.site-switch-head p {
    margin: 4px 0 0;
    color: #8e7655;
    font-size: 12px;
    font-weight: 700;
}

.site-switch-close {
    width: 32px;
    height: 32px;
    flex: 0 0 auto;
    display: grid;
    place-items: center;
    color: #ceb98c;
    border: 1px solid rgba(199, 145, 66, 0.34);
    border-radius: 10px;
    background: rgba(9, 5, 2, 0.55);
    cursor: pointer;
    transition: color .15s, border-color .15s, background .15s;
}

.site-switch-close:hover {
    color: #ffe1a1;
    border-color: rgba(255, 219, 145, 0.62);
    background: rgba(34, 20, 9, 0.72);
}

.site-switch-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 12px;
}

.site-switch-list .site-account-item {
    border: 1px solid rgba(199, 145, 66, 0.22);
    border-radius: 12px;
    margin: 0;
}

.site-switch-list .site-account-item:hover {
    border-color: rgba(255, 219, 145, 0.55);
}

.site-switch-add {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    color: #ffe1a1;
    border: 1px dashed rgba(255, 219, 145, 0.5);
    border-radius: 12px;
    background: transparent;
    text-decoration: none;
    font-size: 13px;
    font-weight: 700;
    transition: background .15s, border-color .15s, color .15s;
}

.site-switch-add:hover {
    color: #fff5d6;
    border-color: rgba(255, 219, 145, 0.85);
    background: rgba(255, 205, 122, 0.08);
}

.site-switch-add i {
    width: 18px;
    color: #c89142;
    text-align: center;
}

.site-switch-add:hover i { color: #ffe1a1; }

.site-switch-add.is-danger {
    color: #ffd7d0;
    border-color: rgba(240, 88, 60, 0.45);
}

.site-switch-add.is-danger i { color: #f0583c; }

.site-switch-add.is-danger:hover {
    color: #ffe2dc;
    border-color: rgba(240, 88, 60, 0.75);
    background: rgba(127, 29, 29, 0.18);
}

.site-btn-danger,
header .btn-outline-danger {
    color: #ffd2c9 !important;
    border-color: rgba(240, 96, 64, 0.48) !important;
    background: rgba(171, 36, 22, 0.12) !important;
}

.site-btn-danger:hover,
header .btn-outline-danger:hover {
    color: #fff !important;
    border-color: rgba(255, 133, 104, 0.74) !important;
    background: rgba(171, 36, 22, 0.22) !important;
    transform: translateY(-1px);
}

/* =====================================================
   Page Hero Banner
   ===================================================== */

.hero-banner {
    position: relative;
    min-height: 220px;
    display: grid;
    place-items: center;
    overflow: hidden;
    background-image:
        radial-gradient(ellipse at 50% 38%, rgba(255, 239, 183, 0.18) 0%, rgba(255, 239, 183, 0.04) 20%, transparent 38%),
        radial-gradient(ellipse at 15% 58%, rgba(34, 123, 255, 0.16) 0%, transparent 28%),
        radial-gradient(ellipse at 86% 56%, rgba(153, 42, 255, 0.14) 0%, transparent 28%),
        linear-gradient(180deg, rgba(5, 3, 1, 0.34) 0%, rgba(5, 3, 1, 0.72) 74%, rgba(5, 3, 1, 1) 100%),
        url('/assets/images/homepage/background-hero-v2.webp');
    background-size: cover;
    background-position: center 42%;
    background-repeat: no-repeat;
    border-bottom: 1px solid rgba(213, 152, 74, 0.22);
    isolation: isolate;
}

.hero-banner::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background:
        linear-gradient(90deg, rgba(0, 0, 0, 0.64), transparent 30%, transparent 70%, rgba(0, 0, 0, 0.68)),
        repeating-linear-gradient(-60deg, rgba(255, 255, 255, 0.018), rgba(255, 255, 255, 0.018) 1px, transparent 1px, transparent 12px);
    pointer-events: none;
}

.hero-banner::after {
    content: "";
    position: absolute;
    left: 50%;
    bottom: 0;
    width: min(900px, 92vw);
    height: 1px;
    transform: translateX(-50%);
    background: linear-gradient(90deg, transparent, rgba(255, 210, 125, 0.44), transparent);
}

.hero-banner-inner {
    width: min(100%, 920px);
    padding: 42px 22px 34px;
    text-align: center;
}

.hero-banner-kicker {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 10px;
    padding: 6px 15px;
    border: 1px solid rgba(232, 180, 92, 0.38);
    border-radius: 999px;
    color: #f6dca4;
    background: rgba(9, 4, 1, 0.42);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 8px 24px rgba(0, 0, 0, 0.34);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.hero-banner-title {
    margin: 0;
    color: var(--site-gold-bright);
    font-size: clamp(25px, 4vw, 48px);
    line-height: 1.15;
    font-weight: 700;
    letter-spacing: -0.3px;
    text-shadow: 0 6px 22px rgba(0, 0, 0, 0.95), 0 0 28px rgba(203, 114, 34, 0.34);
}

.hero-banner-subtitle {
    margin: 9px auto 0;
    max-width: 620px;
    color: var(--site-text-soft);
    font-size: 14px;
    line-height: 1.65;
    text-shadow: 0 3px 14px rgba(0, 0, 0, 0.85);
}

/* =====================================================
   Auth Pages
   ===================================================== */

.auth-page {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: calc(100vh - 340px);
    padding: 54px 16px 72px;
}

.auth-page::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background:
        radial-gradient(circle at 50% 8%, rgba(194, 111, 31, 0.16), transparent 30rem),
        radial-gradient(circle at 15% 80%, rgba(74, 141, 255, 0.08), transparent 26rem),
        radial-gradient(circle at 85% 72%, rgba(240, 76, 50, 0.08), transparent 26rem);
    pointer-events: none;
}

.auth-card {
    position: relative;
    width: 100%;
    max-width: 470px;
    border: 1px solid var(--site-edge);
    border-radius: 22px;
    background:
        linear-gradient(180deg, rgba(255, 224, 150, 0.07), transparent 44%),
        linear-gradient(145deg, var(--site-surface-2), var(--site-surface));
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.06),
        0 24px 58px rgba(0, 0, 0, 0.55);
    overflow: hidden;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
}

.auth-card::before,
.auth-card::after {
    content: "";
    position: absolute;
    width: 34px;
    height: 34px;
    pointer-events: none;
    opacity: 0.82;
}

.auth-card::before {
    top: 12px;
    left: 12px;
    border-top: 1px solid rgba(255, 220, 140, 0.48);
    border-left: 1px solid rgba(255, 220, 140, 0.48);
}

.auth-card::after {
    right: 12px;
    bottom: 12px;
    border-right: 1px solid rgba(255, 220, 140, 0.36);
    border-bottom: 1px solid rgba(255, 220, 140, 0.36);
}

.auth-card-header {
    position: relative;
    padding: 34px 34px 13px;
    text-align: center;
}

.auth-card-header::after {
    content: "";
    display: block;
    width: 116px;
    height: 1px;
    margin: 18px auto 0;
    background: linear-gradient(90deg, transparent, rgba(255, 225, 161, 0.68), transparent);
}

.auth-card-header h2 {
    margin: 0 0 7px;
    color: var(--site-gold-bright);
    font-size: clamp(24px, 3vw, 31px);
    line-height: 1.2;
    font-weight: 700;
    letter-spacing: -0.2px;
    text-shadow: 0 4px 14px rgba(0, 0, 0, 0.75);
}

.auth-card-header p {
    margin: 0;
    color: var(--site-muted);
    font-size: 14px;
    line-height: 1.65;
}

.auth-card-body {
    padding: 18px 34px 34px;
}

.auth-card-body .mb-3 {
    margin-bottom: 1.05rem !important;
}

.auth-card-body .form-label {
    margin-bottom: 0.44rem;
    color: var(--site-text-soft);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.1px;
}

.auth-card-body .form-control {
    min-height: 46px;
    padding: 0.68rem 0.9rem;
    border: 1px solid rgba(197, 139, 60, 0.28);
    border-radius: 13px;
    background: rgba(5, 3, 1, 0.56);
    color: #fff7df;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
    font-size: 14px;
    transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.auth-card-body .form-control::placeholder {
    color: rgba(205, 185, 142, 0.48);
}

.auth-card-body .form-control:focus {
    border-color: rgba(255, 225, 161, 0.78);
    background: rgba(7, 4, 2, 0.75);
    color: #fff7df;
    box-shadow:
        0 0 0 3px rgba(200, 145, 66, 0.18),
        0 0 24px rgba(200, 145, 66, 0.14),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.auth-card-body .form-control.is-invalid {
    border-color: rgba(255, 116, 102, 0.72);
    background-image: none;
}

.auth-card-body .form-control.is-invalid:focus {
    box-shadow: 0 0 0 3px rgba(255, 116, 102, 0.18);
}

.invalid-feedback,
.text-danger.small {
    color: #ffaea4 !important;
    font-size: 12px;
}

.turnstile-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 68px;
    justify-content: center;
    padding: 8px;
    border: 1px solid rgba(197, 139, 60, 0.18);
    border-radius: 14px;
    background: rgba(5, 3, 1, 0.28);
}

.btn-auth {
    position: relative;
    min-height: 48px;
    padding: 0.76rem 1rem;
    border: 1px solid rgba(255, 170, 89, 0.58) !important;
    border-radius: 14px;
    background:
        linear-gradient(180deg, rgba(255, 160, 76, 0.22), transparent),
        linear-gradient(135deg, #b72d1b 0%, #6f160c 100%) !important;
    color: #fff7df !important;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.18),
        0 12px 28px rgba(125, 22, 10, 0.35);
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 0.2px;
    overflow: hidden;
    transition: transform 0.18s ease, filter 0.18s ease, box-shadow 0.18s ease, opacity 0.18s ease;
}

.btn-auth::before {
    content: "";
    position: absolute;
    inset: 5px;
    border: 1px solid rgba(255, 228, 166, 0.18);
    border-radius: 10px;
    pointer-events: none;
}

.btn-auth:hover {
    color: #fff !important;
    filter: brightness(1.08);
    transform: translateY(-2px);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.2),
        0 16px 34px rgba(125, 22, 10, 0.48),
        0 0 22px rgba(211, 126, 37, 0.18);
}

.btn-auth:active {
    transform: translateY(0) scale(0.99);
}

.btn-auth:disabled {
    opacity: 0.56;
    cursor: not-allowed;
    transform: none;
    filter: grayscale(0.18);
}

.auth-footer {
    margin-top: 1.3rem;
    color: var(--site-muted);
    text-align: center;
    font-size: 13px;
}

.auth-footer a {
    color: var(--site-gold-bright);
    text-decoration: none;
    font-weight: 700;
}

.auth-footer a:hover {
    color: #fff4d2;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.auth-card-body .alert {
    border-radius: 14px;
    padding: 0.82rem 0.95rem;
    font-size: 13px;
    font-weight: 600;
}

.auth-card-body .alert-danger {
    border-color: rgba(255, 116, 102, 0.32);
    background: rgba(171, 36, 22, 0.14);
    color: #ffb4a8;
}

.auth-card-body .alert-success {
    border-color: rgba(99, 208, 138, 0.34);
    background: rgba(35, 132, 72, 0.14);
    color: #aaf0c0;
}

/* =====================================================
   Logout Page
   ===================================================== */

.logout-icon {
    margin-bottom: 0.75rem;
    color: var(--site-red-bright);
    font-size: 2.65rem;
    filter: drop-shadow(0 0 18px rgba(240, 76, 50, 0.32));
}

.logout-progress {
    height: 7px;
    border: 1px solid rgba(197, 139, 60, 0.2);
    border-radius: 999px;
    background: rgba(5, 3, 1, 0.66);
    overflow: hidden;
}

.logout-progress-bar {
    height: 100%;
    border-radius: 999px;
    background: linear-gradient(90deg, #9b5f1c, var(--site-gold-bright), #d74227);
    transition: width 0.9s linear;
    box-shadow: 0 0 18px rgba(255, 225, 161, 0.35);
}

/* =====================================================
   Member Page
   ===================================================== */

.member-page {
    width: min(100%, 980px);
    max-width: 980px;
    margin: 0 auto;
    padding: 52px 16px 72px;
}

.member-welcome,
.member-stat-card,
.member-info-card {
    position: relative;
    border: 1px solid var(--site-edge);
    border-radius: var(--site-radius);
    background:
        linear-gradient(180deg, rgba(255, 224, 150, 0.06), transparent 44%),
        linear-gradient(145deg, var(--site-surface-2), var(--site-surface));
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.055),
        0 18px 42px rgba(0, 0, 0, 0.36);
    overflow: hidden;
}

.member-welcome {
    padding: 22px 24px;
}

.member-welcome::before,
.member-info-card::before,
.member-stat-card::before {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 225, 161, 0.36), transparent);
    pointer-events: none;
}

.member-welcome-inner {
    position: relative;
    display: flex;
    align-items: center;
    gap: 16px;
}

.member-avatar {
    width: 58px;
    height: 58px;
    flex: 0 0 auto;
    display: grid;
    place-items: center;
    border: 1px solid rgba(255, 225, 161, 0.38);
    border-radius: 18px;
    background:
        linear-gradient(180deg, rgba(255, 230, 184, 0.18), transparent),
        linear-gradient(135deg, #ad6d20, #6f160c);
    box-shadow: 0 12px 26px rgba(0, 0, 0, 0.36), 0 0 22px rgba(200, 145, 66, 0.18);
    color: #fff7df;
    font-size: 1.35rem;
}

.member-welcome-label {
    color: var(--site-muted);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.7px;
    text-transform: uppercase;
}

.member-welcome-name {
    color: var(--site-gold-bright);
    font-size: clamp(21px, 3vw, 28px);
    line-height: 1.25;
    font-weight: 700;
    text-shadow: 0 4px 14px rgba(0, 0, 0, 0.65);
}

.member-stat-card {
    height: 100%;
    padding: 22px 18px;
    text-align: center;
    transition: transform 0.18s ease, border-color 0.18s ease, filter 0.18s ease;
}

.member-stat-card:hover {
    transform: translateY(-3px);
    border-color: rgba(255, 225, 161, 0.54);
    filter: brightness(1.04);
}

.member-stat-icon {
    margin-bottom: 10px;
    color: var(--site-gold-bright);
    font-size: 1.55rem;
    filter: drop-shadow(0 0 12px rgba(255, 225, 161, 0.18));
}

.member-stat-value {
    color: #fff4d2;
    font-size: clamp(24px, 3vw, 32px);
    line-height: 1.15;
    font-weight: 700;
}

.member-stat-label {
    margin-top: 6px;
    color: var(--site-muted);
    font-size: 12px;
    font-weight: 650;
}

.text-purple {
    color: var(--site-gold-bright) !important;
}

.member-info-card {
    height: 100%;
    padding: 22px 24px;
}

.member-info-card-title {
    position: relative;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(138, 91, 39, 0.38);
    color: var(--site-gold-bright);
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 0.2px;
}

.member-info-card-title::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -1px;
    width: 86px;
    height: 1px;
    background: linear-gradient(90deg, var(--site-gold-bright), transparent);
}

.member-info-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.member-info-list li {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    min-height: 40px;
    padding: 9px 0;
    border-bottom: 1px solid rgba(97, 62, 28, 0.32);
    font-size: 14px;
}

.member-info-list li:last-child {
    border-bottom: none;
}

.info-label {
    color: var(--site-muted);
    font-weight: 600;
}

.info-value {
    color: #ead4a5;
    font-weight: 700;
    text-align: right;
}

.font-mono {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
    font-size: 0.84rem;
}

.btn-member-action,
.btn-member-action-danger {
    min-height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: flex-start;
    gap: 10px;
    width: 100%;
    border-radius: 13px;
    text-align: left;
    font-size: 14px;
    font-weight: 700;
    padding: 0.68rem 1rem;
    text-decoration: none;
    transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease, color 0.18s ease, box-shadow 0.18s ease;
}

.btn-member-action {
    border: 1px solid rgba(203, 145, 65, 0.42);
    background: rgba(255, 205, 122, 0.08);
    color: var(--site-gold-bright);
}

.btn-member-action:hover {
    border-color: rgba(255, 222, 145, 0.72);
    background: rgba(255, 205, 122, 0.13);
    color: #fff7df;
    transform: translateY(-2px);
    box-shadow: 0 12px 26px rgba(0, 0, 0, 0.28);
}

.btn-member-action-danger {
    border: 1px solid rgba(240, 96, 64, 0.4);
    background: rgba(171, 36, 22, 0.12);
    color: #ffd0c6;
}

.btn-member-action-danger:hover {
    border-color: rgba(255, 133, 104, 0.7);
    background: rgba(171, 36, 22, 0.2);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 12px 26px rgba(0, 0, 0, 0.28);
}

/* =====================================================
   Footer
   ===================================================== */

footer,
.site-footer {
    position: relative;
    padding: 0;
    border-top: 1px solid rgba(100, 61, 24, 0.5);
    background:
        radial-gradient(circle at 50% 0%, rgba(150, 75, 20, 0.12), transparent 32rem),
        linear-gradient(180deg, #080503 0%, var(--site-bg) 100%);
    color: var(--site-muted);
    font-size: 12px;
    text-align: center;
}

.site-footer-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 26px 28px 18px;
}

.site-footer-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
    text-align: left;
}

.site-footer-logo {
    height: 34px;
    width: auto;
    opacity: 0.86;
    filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.75));
}

.site-footer-title {
    color: var(--site-gold-bright);
    font-size: 14px;
    font-weight: 700;
    line-height: 1.2;
}

.site-footer-subtitle {
    margin-top: 2px;
    color: var(--site-muted);
    font-size: 11px;
    line-height: 1.2;
}

.site-footer-social,
footer .d-flex.gap-1 {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 9px !important;
}

.site-footer-social a,
footer .d-flex.gap-1 a {
    width: 38px;
    height: 38px;
    display: inline-grid;
    place-items: center;
    border: 1px solid rgba(139, 88, 34, 0.45);
    border-radius: 50%;
    color: var(--site-gold-2);
    background: rgba(18, 10, 5, 0.74);
    text-decoration: none;
    font-size: 15px;
    transition: color 0.18s ease, border-color 0.18s ease, background 0.18s ease, transform 0.18s ease;
}

.site-footer-social a:hover,
footer .d-flex.gap-1 a:hover {
    color: var(--site-gold-bright);
    border-color: rgba(255, 222, 145, 0.64);
    background: rgba(36, 22, 10, 0.9);
    transform: translateY(-2px);
}

footer .hr-yellow,
.site-footer-line {
    max-width: var(--site-container);
    margin: 0 auto;
    border: 0;
    height: 1px;
    opacity: 1;
    background: linear-gradient(90deg, transparent, rgba(255, 210, 125, 0.3), transparent);
}

.site-footer-bottom,
footer .text-wrap {
    padding: 15px 20px 22px;
    color: var(--site-muted);
    font-size: 12px;
    letter-spacing: 0.2px;
}

.site-footer-bottom {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 16px;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.site-footer-legal {
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.site-footer-legal a {
    color: var(--site-text-soft);
    text-decoration: none;
}

.site-footer-legal a:hover {
    color: var(--site-gold-bright);
}

.site-footer-legal-sep {
    color: var(--site-muted);
}

/* =====================================================
   Bootstrap / Utility Overrides
   ===================================================== */

.btn-primary {
    border-color: rgba(255, 170, 89, 0.58) !important;
    background:
        linear-gradient(180deg, rgba(255, 160, 76, 0.22), transparent),
        linear-gradient(135deg, #b72d1b 0%, #6f160c 100%) !important;
}

.btn-primary:hover,
.btn-primary:focus {
    border-color: rgba(255, 198, 111, 0.75) !important;
    filter: brightness(1.08);
}

.card,
.modal-content,
.dropdown-menu {
    border-color: var(--site-edge);
    background-color: rgba(14, 8, 5, 0.96);
    color: var(--site-text);
}

.table {
    --bs-table-bg: transparent;
    --bs-table-color: var(--site-text-soft);
    --bs-table-border-color: rgba(129, 82, 35, 0.26);
}

/* =====================================================
   Responsive
   ===================================================== */

@media (max-width: 991.98px) {
    :root {
        --site-topbar-height: 58px;
    }

    .site-navbar-container,
    header .navbar > .container-fluid {
        padding: 9px 16px;
    }

    .site-navbar-brand,
    header .navbar-brand {
        min-height: 42px;
    }

    .site-navbar-brand img,
    header .navbar-brand img {
        height: 30px;
    }

    .site-navbar-collapse,
    header .navbar-collapse {
        width: 100%;
        margin-top: 8px;
        padding: 12px;
        border: 1px solid rgba(213, 152, 74, 0.18);
        border-radius: 16px;
        background: rgba(5, 3, 1, 0.72);
    }

    .site-navbar-actions {
        margin-top: 10px;
        padding-top: 10px;
        border-top: 1px solid rgba(213, 152, 74, 0.16);
    }

    header .navbar .nav-link,
    .site-navbar .nav-link {
        width: 100%;
        justify-content: flex-start;
    }
}

@media (max-width: 680px) {
    .hero-banner {
        min-height: 178px;
        background-position: center center;
    }

    .hero-banner-inner {
        padding: 32px 16px 28px;
    }

    .hero-banner-kicker {
        font-size: 9px;
        letter-spacing: 1.5px;
    }

    .hero-banner-title {
        font-size: clamp(24px, 8vw, 36px);
    }

    .hero-banner-subtitle {
        font-size: 13px;
    }

    .auth-page {
        align-items: flex-start;
        min-height: auto;
        padding: 34px 14px 54px;
    }

    .auth-card {
        border-radius: 18px;
    }

    .auth-card-header {
        padding: 28px 22px 10px;
    }

    .auth-card-body {
        padding: 16px 22px 28px;
    }

    .member-page {
        padding: 34px 14px 58px;
    }

    .member-welcome,
    .member-info-card,
    .member-stat-card {
        border-radius: 16px;
    }

    .member-welcome {
        padding: 18px;
    }

    .member-welcome-inner {
        align-items: flex-start;
    }

    .member-avatar {
        width: 50px;
        height: 50px;
        border-radius: 16px;
    }

    .member-info-list li {
        align-items: flex-start;
        flex-direction: column;
        gap: 2px;
    }

    .info-value {
        text-align: left;
    }

    .site-footer-inner {
        flex-direction: column;
        justify-content: center;
        padding: 24px 16px 16px;
        text-align: center;
    }

    .site-footer-brand {
        flex-direction: column;
        text-align: center;
    }
}

@media (max-width: 420px) {
    .site-navbar-actions {
        align-items: stretch;
        flex-direction: column;
        width: 100%;
    }

    .site-navbar-actions .btn,
    header .navbar .btn {
        width: 100%;
    }

    .auth-card-header h2 {
        font-size: 23px;
    }
}

/* ───── Account dropdown menu — phone-width safety net ─────
   Bootstrap/Popper places the menu relative to the toggle, but on narrow
   phones the toggle sits inside the collapsed navbar (with its own padding)
   AND the page wrapper has overflow-x:hidden. The combination can land the
   menu's left edge at a negative x and clip the content. Pin the menu as a
   fixed-position panel below the topbar instead so it always fits the
   viewport with a 12px gutter on each side.
   Applies to both the regular dropdown and the wider summary variant. */
@media (max-width: 991px) {
    .site-account-dropdown .site-account-menu,
    .site-account-menu.site-account-menu-summary {
        position: fixed !important;
        top: calc(var(--site-topbar-height, 58px) + 8px) !important;
        right: 12px !important;
        left: 12px !important;
        bottom: auto !important;
        transform: none !important;
        margin: 0 !important;
        min-width: 0 !important;
        max-width: none !important;
        width: auto !important;
        max-height: calc(100vh - var(--site-topbar-height, 58px) - 24px);
        overflow-y: auto;
    }
}

/* ─── Login: "Resume a saved session" list ────────────────────────────
 * Shown on /login when the client-side account jar still holds accounts,
 * so a stray single-logout never leaves them unreachable. Reuses the
 * .site-account-item visual language from the header switcher. */
.login-saved {
    margin-bottom: 22px;
}

.login-saved-head {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
    color: #ceb98c;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .3px;
}

.login-saved-head i { color: #c89142; }

.login-saved-list {
    border: 1px solid rgba(199, 145, 66, 0.28);
    border-radius: 12px;
    background: rgba(8, 4, 2, 0.35);
    overflow: hidden;
}

.login-saved-item { text-decoration: none; }

.login-saved-item.is-loading {
    opacity: .6;
    pointer-events: none;
}

.login-saved-go {
    flex: 0 0 auto;
    color: #c89142;
    font-size: 13px;
}

.login-saved-item:hover .login-saved-go { color: #ffe1a1; }

.login-saved-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 18px 0 4px;
    color: #8e7655;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .3px;
    text-transform: uppercase;
}

.login-saved-divider::before,
.login-saved-divider::after {
    content: "";
    flex: 1 1 auto;
    height: 1px;
    background: rgba(199, 145, 66, 0.2);
}

/* Account switch cooldown: gold countdown, green ready state. */
.site-switch-cooldown {
    overflow: hidden;
    margin-bottom: 8px;
    border: 1px solid rgba(214, 166, 81, .3);
    border-radius: 12px;
    background: linear-gradient(120deg, rgba(136, 89, 28, .22), rgba(31, 22, 12, .65));
}
.site-switch-cooldown-body { display: flex; align-items: center; gap: 10px; padding: 12px; }
.site-switch-cooldown-icon {
    display: grid; place-items: center; flex: 0 0 34px; height: 34px;
    border: 1px solid rgba(232, 198, 122, .25); border-radius: 10px;
    background: rgba(204, 151, 65, .1); color: #e8c67a;
}
.site-switch-cooldown-copy { flex: 1; min-width: 0; }
.site-switch-cooldown-copy strong { display: block; font-size: .8rem; line-height: 1.5; color: #ffe0a1; }
.site-switch-cooldown-copy > span { display: block; margin-top: 3px; font-size: .68rem; line-height: 1.5; color: #bca785; }
.site-switch-countdown {
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    flex: 0 0 49px; min-height: 49px; border-radius: 10px;
    border: 1px solid rgba(232, 198, 122, .4); background: rgba(12, 9, 5, .55);
}
.site-switch-countdown b { color: #ffe2a1; font-size: 1.4rem; line-height: 1.15; font-variant-numeric: tabular-nums; }
.site-switch-countdown small { font-size: .58rem; color: #bca785; }
.site-switch-progress { height: 3px; background: rgba(232, 198, 122, .09); }
.site-switch-progress > span {
    display: block; height: 100%; border-radius: 0 3px 3px 0;
    background: linear-gradient(90deg, #a87830, #ffe2a1);
    box-shadow: 0 0 8px rgba(232, 198, 122, .3); transition: width .25s linear;
}
.site-switch-cooldown.is-ready { border-color: rgba(89, 164, 116, .25); background: rgba(34, 75, 48, .12); }
.site-switch-cooldown.is-ready .site-switch-cooldown-icon { color: #8bd2a3; border-color: rgba(89, 164, 116, .3); background: rgba(89, 164, 116, .1); }
.site-switch-cooldown.is-ready .site-switch-cooldown-copy strong { color: #a7dbb6; }
.site-switch-list .site-account-item.is-switch-locked { opacity: .55; cursor: not-allowed; }
@media (prefers-reduced-motion: reduce) {
    .site-switch-progress > span { transition: none; }
    .site-switch-cooldown .fa-spin { animation: none; }
}