/* Shared floating chrome for main and tournament navigation. */
.topbar[data-mobile-header] {
    position: sticky;
    top: 12px;
    z-index: 100;
    width: calc(100% - 32px);
    max-width: calc(100% - 32px);
    margin: 12px auto 0;
    border: 1px solid #202329;
    border-top-color: #2b2e34;
    border-bottom-color: #121419;
    border-radius: 7px;
    background:
        linear-gradient(115deg, rgba(8, 9, 12, .93) 0%, rgba(2, 3, 5, .91) 38%, rgba(4, 5, 8, .91) 72%, rgba(9, 10, 13, .93) 100%);
    -webkit-backdrop-filter: blur(20px);
    backdrop-filter: blur(20px);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .035), 0 8px 24px rgba(0, 0, 0, .32);
    box-sizing: border-box;
}

.topbar[data-mobile-header] .topbar-inner {
    max-width: none;
    padding-inline: 20px;
    gap: 24px;
    box-sizing: border-box;
}

.topbar[data-mobile-header] .nav-brand-group {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}
.topbar[data-mobile-header] .nav-brand-group > a { display: flex; align-items: center; }
.topbar[data-mobile-header] .nav-brand-group img { width: 32px; height: 32px; object-fit: contain; }
.topbar[data-mobile-header] .nav-brand-copy { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; }
.topbar[data-mobile-header] .nav-brand-copy > a { display: block; line-height: 1.1; text-decoration: none; white-space: nowrap; }
.topbar[data-mobile-header] .nav-brand-copy .nav-status-slot { padding: 0; flex: none; }
.topbar[data-mobile-header] .nav-brand-copy .nav-status { padding: 0; font-size: 9px; }
.topbar[data-mobile-header] .nav-status-slot {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 1 0 130px;
    padding-inline: clamp(8px, 2vw, 40px);
}
.topbar[data-mobile-header] a.nav-status {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    padding: 6px 0;
    border: 0;
    border-radius: 0;
    background: none;
    color: #737b88;
    font: 400 10px/1.2 Inter, sans-serif;
    letter-spacing: .2px;
    text-transform: none;
    text-decoration: none;
    white-space: nowrap;
    box-shadow: none;
}
.topbar[data-mobile-header] .nav-status:hover { color: #b0b8c5; background: none; box-shadow: none; }
.topbar[data-mobile-header]:has(.nav-status[data-status="live"]) { border-color: rgba(239, 68, 68, .40); box-shadow: 0 0 18px rgba(239, 68, 68, .10), 0 8px 24px rgba(0, 0, 0, .32); }
.topbar[data-mobile-header]:has(.nav-status[data-status="signup"]) { border-color: rgba(74, 222, 128, .32); box-shadow: 0 0 18px rgba(74, 222, 128, .08), 0 8px 24px rgba(0, 0, 0, .32); }
.topbar[data-mobile-header]:has(.nav-status[data-status="soon"]) { border-color: rgba(232, 200, 74, .28); box-shadow: 0 0 18px rgba(232, 200, 74, .07), 0 8px 24px rgba(0, 0, 0, .32); }

@media (min-width: 1401px) {
    .topbar[data-mobile-header] [data-mobile-nav] {
        flex: 1;
        min-width: 0;
        justify-content: space-evenly;
        gap: 8px;
    }

    .topbar[data-mobile-header] .gh-topnav > .gh-nav-link,
    .topbar[data-mobile-header] .gh-topnav > .gh-nav-dropdown,
    .topbar[data-mobile-header] .gh-topnav > .gh-cta,
    .topbar[data-mobile-header] .topnav > a {
        flex: 1 0 auto;
        display: inline-flex;
        justify-content: center;
        align-items: center;
    }
    .topbar[data-mobile-header] .ecc-nav-button {
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }
    .topbar[data-mobile-header] .gh-topnav > .gh-nav-dropdown > .gh-nav-dropdown-menu {
        left: 50%;
        transform: translateX(-50%);
    }

    .topbar[data-mobile-header] .gh-nav-user {
        margin-left: 0;
        flex: 0 0 auto;
    }

    .topbar[data-mobile-header] .gh-topnav > a,
    .topbar[data-mobile-header] .gh-nav-dropdown-btn,
    .topbar[data-mobile-header] .ecc-nav-button {
        padding-inline: 10px;
    }
}

@media (min-width: 1401px) and (max-width: 1700px) {
    .topbar[data-mobile-header] .topbar-inner { padding-inline: 16px; gap: 16px; }
    .topbar[data-mobile-header] .gh-brand-name { font-size: 16px; letter-spacing: 2px; }
    .topbar[data-mobile-header] .gh-topnav { gap: 2px; }
    .topbar[data-mobile-header] .gh-topnav a,
    .topbar[data-mobile-header] .gh-nav-dropdown-btn { padding-inline: 7px; font-size: 12px; }
    .topbar[data-mobile-header] .gh-nav-user { gap: 6px; padding-left: 10px; }
    .topbar[data-mobile-header] a.nav-status { font-size: 10px; padding-inline: 0; }
}

@media (max-width: 1400px) {
    .topbar[data-mobile-header] {
        top: 8px;
        width: calc(100% - 16px);
        max-width: none;
        margin-top: 8px;
        border-radius: 6px;
    }

    .topbar[data-mobile-header].nav-ready [data-mobile-nav] {
        top: calc(100% + 8px);
        border: 1px solid #202329;
        border-radius: 6px;
        background: linear-gradient(135deg, rgba(8, 9, 12, .95), rgba(2, 3, 5, .93) 55%, rgba(5, 6, 9, .95));
        -webkit-backdrop-filter: blur(20px);
        backdrop-filter: blur(20px);
        box-shadow: inset 0 1px 0 rgba(255, 255, 255, .035), 0 12px 28px rgba(0, 0, 0, .35);
        max-height: calc(100vh - 152px);
        max-height: calc(100dvh - 152px);
        box-sizing: border-box;
    }
}


/* Scale the actual controls with the layout, without scaling the text bitmap. */
.topbar[data-mobile-header] .nav-user-name {
    display: block;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

@media (min-width: 1401px) {
    .topbar[data-mobile-header] .topbar-inner {
        height: clamp(64px, 3.3vw, 68px);
        padding-inline: clamp(16px, 1vw, 28px);
        gap: clamp(16px, .95vw, 18px);
    }
    .topbar[data-mobile-header] .nav-brand-group { gap: clamp(10px, .6vw, 12px); }
    .topbar[data-mobile-header] .nav-brand-group img { width: clamp(32px, 1.8vw, 38px); height: clamp(32px, 1.8vw, 38px); }
    .topbar[data-mobile-header] .nav-brand-copy > a { font-size: clamp(16px, .95vw, 18px); letter-spacing: clamp(1.5px, .1vw, 2px); }
    .topbar[data-mobile-header] .nav-brand-copy .nav-status { font-size: clamp(9px, .5vw, 10px); }
    .topbar[data-mobile-header] .gh-topnav > a,
    .topbar[data-mobile-header] .gh-nav-dropdown-btn,
    .topbar[data-mobile-header] .ecc-nav-button,
    .topbar[data-mobile-header] .topnav > a {
        min-height: clamp(32px, 1.8vw, 38px);
        padding: clamp(6px, .3vw, 8px) clamp(7px, .5vw, 14px);
        font-size: clamp(12px, .7vw, 14px);
    }
    .topbar[data-mobile-header] .gh-nav-user,
    .topbar[data-mobile-header] .theader-user { gap: clamp(6px, .4vw, 10px); }
    .topbar[data-mobile-header] .gh-nav-user > a,
    .topbar[data-mobile-header] .theader-user > a {
        min-height: clamp(30px, 1.8vw, 36px);
        font-size: clamp(11px, .65vw, 13px);
        display: inline-flex;
        align-items: center;
    }
    .topbar[data-mobile-header] .gh-user-chip,
    .topbar[data-mobile-header] .theader-user-chip { min-width: 0; max-width: clamp(120px, 10vw, 240px); }
    .topbar[data-mobile-header] .gh-user-chip img,
    .topbar[data-mobile-header] .theader-user-chip img { width: clamp(24px, 1.3vw, 28px); height: clamp(24px, 1.3vw, 28px); }
    .topbar[data-mobile-header] .gh-nav-dropdown-menu a { font-size: clamp(12px, .7vw, 14px); }
}

@media (min-width: 601px) and (max-width: 1400px) {
    .topbar[data-mobile-header] .topbar-inner { min-height: 72px; gap: 16px; padding-inline: 20px; }
    .topbar[data-mobile-header] .nav-brand-group img { width: 40px; height: 40px; }
    .topbar[data-mobile-header] .nav-brand-copy > a { font-size: 19px; letter-spacing: 2px; }
    .topbar[data-mobile-header] .nav-brand-copy .nav-status { font-size: 10px; }
    .topbar[data-mobile-header] .mobile-nav-toggle { width: 46px; height: 46px; }
}

@media (max-width: 600px) {
    .topbar[data-mobile-header] .topbar-inner { min-height: 64px; padding-inline: 12px; gap: 10px; }
    .topbar[data-mobile-header] .nav-brand-group { gap: 10px; }
    .topbar[data-mobile-header] .nav-brand-group img { width: 32px; height: 32px; }
    .topbar[data-mobile-header] .nav-brand-copy > a { font-size: 16px; letter-spacing: 1.8px; }
    .topbar[data-mobile-header] .nav-brand-copy .nav-status { font-size: 9px; }
    .topbar[data-mobile-header] .mobile-nav-toggle { width: 44px; height: 44px; }
}


/* Explicit brand colors also apply when the home link has been visited. */
.topbar[data-mobile-header] .nav-brand-copy > a,
.topbar[data-mobile-header] .nav-brand-copy > a:visited {
    color: #e2e8f0;
    background: linear-gradient(135deg, #ffffff 0%, #cbd5e1 50%, #94a3b8 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Keep the header attached at the top; float its chrome without moving page content. */
.topbar[data-mobile-header] {
    --nav-float-gap: 12px;
    --nav-float-inset: 32px;
    top: 0;
    width: 100%;
    max-width: none;
    margin: 0 auto;
    border-radius: 0;
    border-color: transparent;
    border-bottom-color: #202329;
    box-shadow: none;
    transform: translateY(0);
    transition: width 280ms ease, transform 280ms ease, border-radius 280ms ease,
        border-color 280ms ease, box-shadow 280ms ease;
}
.topbar[data-mobile-header].nav-scrolled {
    width: calc(100% - var(--nav-float-inset));
    transform: translateY(var(--nav-float-gap));
    border-color: #202329;
    border-top-color: #2b2e34;
    border-bottom-color: #121419;
    border-radius: 7px;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.035), 0 8px 24px rgba(0,0,0,.32);
}
.topbar[data-mobile-header]:not(.nav-scrolled):has(.nav-status) {
    border-color: transparent;
    border-bottom-color: #202329;
    box-shadow: none;
}
@media (max-width: 1400px) {
    .topbar[data-mobile-header] { --nav-float-gap: 8px; --nav-float-inset: 16px; }
    .topbar[data-mobile-header].nav-scrolled { border-radius: 6px; }
}
@media (prefers-reduced-motion: reduce) {
    .topbar[data-mobile-header] { transition: none; }
}
