/* ============================================================
   Game shop header — the same quiet collection shell as the demo.
   Uses tenant --rb-* tokens, so light/dark and palette stay intact.
   ============================================================ */

header.gs-site-head {
    --gs-head-accent: #4f46e5;
    position: sticky;
    top: 0;
    z-index: 100;
    display: block;
    padding: 0;
    border: 0;
    border-bottom: 1px solid var(--rb-border);
    background: var(--rb-bg);
    box-shadow: none;
    color: var(--rb-text);
}

.gs-sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

[data-theme="dark"] header.gs-site-head {
    --gs-head-accent: #818cf8;
}

.gs-site-head .gs-shell {
    width: min(1240px, calc(100% - 48px));
    margin: 0 auto;
}

.gs-site-head .gs-head-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    height: 76px;
}

.gs-site-head .gs-brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
    color: var(--rb-text);
    text-decoration: none;
}

.gs-site-head .gs-brand:hover {
    color: var(--rb-text);
    text-decoration: none;
}

.gs-site-head .gs-brand__mark {
    width: 38px;
    height: 38px;
    flex: 0 0 38px;
    display: grid;
    place-items: center;
    overflow: hidden;
    border: 1px solid var(--rb-border);
    border-radius: 50%;
    background: var(--rb-surface);
}

.gs-site-head .gs-brand__mark {
    border-color: color-mix(in srgb, var(--gs-head-accent) 45%, transparent);
}

.gs-site-head .gs-brand__mark img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 50%;
}

.gs-site-head .gs-brand__logo--dark {
    display: none;
}

[data-theme="dark"] .gs-site-head .gs-brand__logo--light {
    display: none;
}

[data-theme="dark"] .gs-site-head .gs-brand__logo--dark {
    display: block;
}

.gs-site-head .gs-brand__word {
    display: block;
    overflow: hidden;
    color: var(--rb-heading);
    font-family: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", Georgia, serif;
    font-size: 19px;
    letter-spacing: .16em;
    line-height: 1;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.gs-site-head .gs-brand__word small {
    display: block;
    margin-top: 6px;
    color: var(--rb-muted);
    font-family: "SFMono-Regular", "JetBrains Mono", "Roboto Mono", ui-monospace, monospace;
    font-size: 8px;
    letter-spacing: .3em;
}

#nav-menu.gs-nav {
    display: flex;
    align-items: center;
    gap: 27px;
    margin: 0;
}

#nav-menu.gs-nav a {
    position: relative;
    padding: 8px 0;
    border-radius: 0;
    color: var(--rb-muted);
    font-size: 12px;
    font-weight: 500;
    letter-spacing: .04em;
    text-decoration: none;
    transition: color .2s;
}

#nav-menu.gs-nav a:hover,
#nav-menu.gs-nav a.is-active {
    background: transparent;
    color: var(--rb-text);
    text-decoration: none;
    transform: none;
}

#nav-menu.gs-nav a.is-active::after {
    content: "";
    position: absolute;
    right: 0;
    bottom: 0;
    left: 0;
    height: 1px;
    background: var(--gs-head-accent);
}

.gs-site-head .gs-head-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.gs-site-head .gs-theme-switch {
    width: 60px;
    height: 32px;
    padding: 0;
    border: 1px solid var(--rb-border);
    border-radius: 999px;
    background: var(--rb-surface-2);
    color: var(--rb-muted);
    cursor: pointer;
    transition: border-color .2s, background .2s;
}

.gs-site-head .gs-theme-switch:hover {
    border-color: var(--rb-muted);
}

.gs-site-head .gs-theme-switch__track {
    position: relative;
    display: block;
    width: 100%;
    height: 100%;
}

.gs-site-head .gs-theme-switch__sun,
.gs-site-head .gs-theme-switch__moon {
    position: absolute;
    top: 50%;
    z-index: 2;
    transform: translateY(-50%);
    font-size: 11px;
    line-height: 1;
    transition: color .2s;
}

.gs-site-head .gs-theme-switch__sun {
    left: 9px;
    color: #fff;
}

.gs-site-head .gs-theme-switch__moon {
    right: 9px;
    color: var(--rb-muted);
}

.gs-site-head .gs-theme-switch__thumb {
    position: absolute;
    top: 3px;
    left: 3px;
    z-index: 1;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--rb-accent);
    box-shadow: 0 2px 7px rgba(0, 0, 0, .22);
    transition: transform .25s cubic-bezier(.2, .8, .3, 1), background .2s;
}

.gs-site-head .gs-theme-switch[aria-pressed="true"] .gs-theme-switch__thumb {
    transform: translateX(30px);
    background: var(--rb-heading);
}

.gs-site-head .gs-theme-switch[aria-pressed="true"] .gs-theme-switch__sun {
    color: var(--rb-muted);
}

.gs-site-head .gs-theme-switch[aria-pressed="true"] .gs-theme-switch__moon {
    color: var(--rb-bg);
}

.gs-site-head .gs-login {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 38px;
    border: 1px solid var(--rb-border);
    border-radius: 999px;
    background: transparent;
    color: var(--rb-muted);
    font: 500 12px var(--gs-ui, "Manrope", system-ui, sans-serif);
    text-decoration: none;
    cursor: pointer;
    transition: color .2s, border-color .2s, background .2s;
}

.gs-site-head .gs-theme-toggle {
    width: 38px;
    padding: 0;
    font-size: 16px;
}

.gs-site-head .gs-login {
    padding: 0 14px;
}

.gs-site-head .gs-theme-toggle:hover,
.gs-site-head .gs-login:hover {
    border-color: var(--rb-muted);
    background: var(--rb-surface);
    color: var(--rb-text);
    text-decoration: none;
}

.gs-site-head .gs-balance {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    height: 38px;
    padding: 0 13px 0 5px;
    border: 1px solid var(--rb-border);
    border-radius: 999px;
    color: var(--rb-text);
    font-family: "SFMono-Regular", "JetBrains Mono", "Roboto Mono", ui-monospace, monospace;
    font-size: 12px;
    letter-spacing: .04em;
    text-decoration: none;
    white-space: nowrap;
}

.gs-site-head .gs-balance:hover {
    border-color: var(--rb-muted);
    color: var(--rb-text);
    text-decoration: none;
}

.gs-site-head .gs-balance__coin {
    width: 28px;
    height: 28px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: linear-gradient(145deg, #f0d6a0, #c69c55);
    color: #1a140b;
    font-family: var(--gs-ui, "Manrope", system-ui, sans-serif);
    font-size: 12px;
    font-weight: 800;
}

.gs-site-head .gs-bag {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    height: 38px;
    padding: 0 13px;
    border: 1px solid var(--rb-border);
    border-radius: 999px;
    background: transparent;
    color: var(--rb-muted);
    font: 500 12px var(--gs-ui, "Manrope", system-ui, sans-serif);
    text-decoration: none;
    transition: border-color .2s, color .2s;
}

.gs-site-head .gs-bag:hover {
    border-color: var(--rb-muted);
    color: var(--rb-text);
    text-decoration: none;
}

.gs-site-head .gs-bag span {
    min-width: 18px;
    height: 18px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: #e6c283;
    color: #1a140b;
    font-family: "SFMono-Regular", "JetBrains Mono", ui-monospace, monospace;
    font-size: 9px;
    font-weight: 700;
}

.gs-site-head .menu-toggle.gs-menu-toggle {
    display: none;
    padding: 9px 6px;
    border: 0;
    background: transparent;
}

.gs-site-head .menu-toggle.gs-menu-toggle .bar {
    width: 23px;
    height: 2px;
    background: var(--rb-text);
    border-radius: 2px;
}

@media (max-width: 900px) {
    .gs-site-head .gs-shell {
        width: calc(100% - 32px);
    }

    .gs-site-head .gs-head-row {
        gap: 12px;
        height: 66px;
    }

    .gs-site-head .gs-brand__word {
        font-size: 17px;
    }

    .gs-site-head .gs-menu-toggle.gs-menu-toggle {
        display: flex;
    }

    #nav-menu.gs-nav {
        display: none;
    }

    #nav-menu.gs-nav.active {
        position: absolute;
        top: 100%;
        right: 0;
        left: 0;
        display: flex;
        flex-direction: column;
        align-items: stretch;
        gap: 2px;
        padding: 14px 16px 20px;
        border-bottom: 1px solid var(--rb-border);
        background: var(--rb-surface);
        box-shadow: 0 18px 30px rgba(0, 0, 0, .08);
    }

    #nav-menu.gs-nav.active a {
        padding: 12px 8px;
        font-size: 14px;
    }

    #nav-menu.gs-nav.active a.is-active::after {
        right: 8px;
        left: 8px;
    }
}

@media (max-width: 640px) {
    .gs-site-head .gs-head-row {
        height: 60px;
    }

    .gs-site-head .gs-brand__mark {
        width: 32px;
        height: 32px;
        flex-basis: 32px;
    }

    .gs-site-head .gs-brand__word {
        font-size: 15px;
        letter-spacing: .1em;
    }

    .gs-site-head .gs-brand__word small {
        margin-top: 4px;
        font-size: 7px;
    }

    .gs-site-head .gs-head-actions {
        gap: 6px;
    }

    .gs-site-head .gs-login {
        display: none;
    }

    .gs-site-head .gs-theme-toggle,
    .gs-site-head .gs-balance,
    .gs-site-head .gs-bag {
        height: 34px;
    }

    .gs-site-head .gs-theme-toggle {
        width: 34px;
    }

    .gs-site-head .gs-balance {
        padding-right: 9px;
        font-size: 11px;
    }

    .gs-site-head .gs-balance__coin {
        width: 24px;
        height: 24px;
        font-size: 10px;
    }

    .gs-site-head .gs-bag {
        padding: 0 9px;
    }

    .gs-site-head .gs-bag__label {
        display: none;
    }
}
