/* ==========================================================================
   FILE: site-chrome.css
   ROLE: site
   Shared site shell: header band and nav pill, mobile bottom navigation,
   search field, toasts and page chrome.
   Loaded on: every page (headerv5.php, tiktok/head.php).
   ========================================================================== */

/* Design: see new-design-php/docs/design-system.md + page-patterns.md */
/* Palette is the single source of colour truth and is imported here so every
   page family that loads site-chrome.css also gets all --hp-color-* tokens. */
@import url("core-palette.css");.nav__link,
.nav__logo {
    color: var(--title-color);
    font-weight: 600;
}:root {
    --header-height: 3rem;
    --title-color: var(--hp-color-text-dim);
    --h1-font-size: 1.5rem;
    --normal-font-size: 0.938rem;
    --tiny-font-size: 0.625rem;
    --z-tooltip: 10;
    --z-fixed: 100;
    /* mobile bottom navigation — every colour resolves through core-palette.css */
    --hp-nav-canvas: var(--hp-color-overlay-bottom-rgb);
    --hp-nav-surface: var(--hp-color-overlay-mid-rgb);
    --hp-nav-surface-overlay: var(--hp-color-overlay-top-rgb);
    --hp-nav-border: var(--hp-glass-border);
    --hp-nav-muted: rgba(var(--hp-color-white-rgb), 0.40);
    --hp-nav-active: var(--hp-color-white);
    --hp-nav-fab-from: var(--hp-color-accent);
    --hp-nav-fab-mid: var(--hp-color-accent-mid);
    --hp-nav-fab-to: var(--hp-color-accent-deep);
    --hp-nav-height: 64px;
}@media screen and (min-width: 968px){:root {
        --h1-font-size: 2.25rem;
        --normal-font-size: 1rem;
    }}html {
    scroll-behavior: smooth;
}.nav__menu ul {
    padding-left: 0;
    margin-bottom: 0;
    list-style: none;
}.section {
    padding: 4.5rem 0 2rem;
}.nav__link,
.nav__list {
    display: flex;
}.nav__link {
    flex-direction: column;
    align-items: center;
    row-gap: 4px;
}.nav__list {
    justify-content: space-around;
}/* desktop-only sliding thumb (positioned by the nav JS) */
.nav__thumb {
    display: none;
}.nav__name {
    font-size: var(--tiny-font-size);
}.nav__icon {
    font-size: 1.5rem;
}.active-link {
    position: relative;
    color: var(--hp-color-accent);
    transition: 0.3s;
}.scroll-header {
    box-shadow: 0 1px 12px rgba(var(--hp-color-black-rgb), 0.15);
}/* header actions are a mobile-only surface (profile / login / moderator) */
.header__actions {
    display: none;
}/* account controls — shared by the mobile header bar and the desktop header */
.header__login {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 34px;
    padding: 0 18px;
    border-radius: 999px;
    background: var(--hp-color-white);
    color: var(--hp-color-canvas-soft);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.01em;
    text-decoration: none;
    white-space: nowrap;
    transition: transform 0.18s ease, background 0.18s ease;
}/* keep the dark label on hover — the global a:hover rule turns links white,
   which made the white pill disappear */
.header__login:hover,
.header__login:focus-visible {
    color: var(--hp-color-canvas-soft);
    background: var(--hp-color-light);
}.header__login:active {
    transform: scale(0.96);
    background: var(--hp-color-light);
}.header__profile {
    display: block;
}.header__profile img {
    display: block;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    object-fit: cover;
    border: 1.5px solid rgba(var(--hp-color-white-rgb), 0.18);
    background: var(--hp-color-elevated);
}.header__iconbtn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: rgba(var(--hp-color-white-rgb), 0.08);
    /* same ring as the profile avatar so both read as equal-weight circles */
    border: 1.5px solid rgba(var(--hp-color-white-rgb), 0.18);
    text-decoration: none;
}.header__iconbtn img {
    width: 18px;
    height: 18px;
    opacity: 0.9;
    filter: brightness(0) invert(1);
}/* ==========================================================================
   MOBILE BOTTOM NAVIGATION  (max-width: 767px)
   Glass + layout + type copied 1:1 from topview.ai's mobile navigation.
   Design source / living prototype: preview/mobile-nav-preview.css
   ========================================================================== */
@keyframes hp-nav-pop {
    0% {
        opacity: 0.55;
        transform: translateY(2px) scale(0.72);
    }

    55% {
        opacity: 1;
        transform: translateY(-1px) scale(1.09);
    }

    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}@keyframes hp-nav-bloom {
    0% {
        opacity: 0;
        transform: scale(0.55);
    }

    40% {
        opacity: 0.55;
    }

    100% {
        opacity: 0;
        transform: scale(1.35);
    }
}@keyframes hp-search-in {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}@media screen and (max-width: 767px){/* leave room for the floating bars (top header + bottom nav) */
    body {
        padding-top: calc(56px + 10px + 14px + env(safe-area-inset-top, 0px));
        padding-bottom: calc(var(--hp-nav-height) + 10px + 24px + env(safe-area-inset-bottom, 0px));
    }/* nav stage: full-width, max 30rem, 16px gutters */
    .nav__menu {
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        margin-inline: auto;
        width: 100%;
        max-width: 30rem;
        height: auto;
        padding: 0 16px max(10px, env(safe-area-inset-bottom, 0px));
        display: block;
        pointer-events: none;
        background: none;
        border: 0;
        box-shadow: none;
        transition: none;
        z-index: 1030;
    }/* scrim behind the bar — makes the glass read as glass */
    .nav__menu::before {
        content: "";
        position: absolute;
        left: 0;
        right: 0;
        bottom: 0;
        height: calc(7.25rem + env(safe-area-inset-bottom, 0px));
        background: linear-gradient(transparent 0%,
                rgba(var(--hp-color-black-rgb), 0.62) 48%,
                rgba(var(--hp-color-black-rgb), 0.92) 100%);
        pointer-events: none;
        z-index: 0;
    }/* the glass bar */
    .nav__list {
        position: relative;
        z-index: 1;
        display: grid;
        grid-template-columns: repeat(5, 1fr);
        align-items: center;
        margin: 0;
        padding: 4px 8px;
        min-height: var(--hp-nav-height);
        border-radius: 27px;
        background: linear-gradient(180deg,
                rgba(var(--hp-nav-surface-overlay), 0.66) 0%,
                rgba(var(--hp-nav-surface), 0.76) 60%,
                rgba(var(--hp-nav-canvas), 0.84) 100%);
        -webkit-backdrop-filter: blur(28px) saturate(135%);
        backdrop-filter: blur(28px) saturate(135%);
        border: 1px solid var(--hp-nav-border);
        box-shadow: 0 18px 48px rgba(var(--hp-color-black-rgb), 0.42);
        pointer-events: auto;
        isolation: isolate;
        overflow: visible;
        column-gap: 0;
    }/* .nav__menu ul sets padding-left:0 — specificity (0,1,1) beats .nav__list
       (0,1,0), so the glass bar silently lost its LEFT inner gutter while
       keeping the right one, shifting the whole menu ~8px off centre. */
    .nav__menu .nav__list {
        padding-left: 8px;
    }/* opaque fallback when backdrop-filter is unavailable */
    @supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
        .nav__list {
            background: linear-gradient(180deg, var(--hp-color-elevated) 0%, var(--hp-color-surface-2) 60%, var(--hp-color-canvas-soft) 100%);
        }
    }.nav__item {
        display: flex;
        justify-content: center;
        align-items: center;
        min-width: 0;
    }/* slot order: Albums · Photos · Upload FAB · Videos · Search */
    .nav__item--albums {
        order: 1;
    }.nav__item--photos {
        order: 2;
    }.nav__item--upload {
        order: 3;
    }.nav__item--videos {
        order: 4;
    }.nav__item--search {
        order: 5;
    }/* profile / login / mod move to the header on mobile */
    .nav__item--mod,
    .nav__item--profile,
    .nav__item--login {
        display: none;
    }.nav__link {
        position: relative;
        top: -2px;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 2px;
        width: 100%;
        max-width: 4.5rem;
        min-height: 56px;
        min-width: 0;
        margin: 0 auto;
        padding: 0 2px;
        border-radius: 16px;
        color: var(--hp-nav-muted);
        text-decoration: none;
        -webkit-tap-highlight-color: transparent;
        transition: color 0.16s ease;
    }/* 24px glyph inside a 32px box */
    .nav__link img {
        display: block;
        box-sizing: content-box;
        width: 24px;
        height: 24px;
        padding: 4px 0;
        filter: brightness(0) invert(1);
        opacity: 0.4;
        transition: opacity 0.16s ease, transform 0.16s ease;
    }.nav__name {
        display: block;
        max-width: 100%;
        font-size: 10px;
        font-weight: 400;
        line-height: 1;
        letter-spacing: -0.01em;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }/* active tab */
    .nav__item.is-active > .nav__link {
        color: var(--hp-nav-active);
    }.nav__item.is-active > .nav__link img {
        opacity: 1;
        animation: hp-nav-pop 0.34s cubic-bezier(0.34, 1.56, 0.64, 1) both;
    }/* violet bloom behind the icon when it becomes active */
    .nav__item.is-active > .nav__link::after {
        content: "";
        position: absolute;
        top: 4px;
        left: calc(50% - 18px);
        width: 36px;
        height: 36px;
        border-radius: 50%;
        background: radial-gradient(circle,
                rgba(var(--hp-color-accent-rgb), 0.55) 0%,
                rgba(var(--hp-color-accent-rgb), 0.15) 55%,
                transparent 72%);
        pointer-events: none;
        animation: hp-nav-bloom 0.55s ease-out both;
    }.nav__link:active img {
        transform: scale(0.88);
    }/* Upload FAB (centre slot) */
    .nav__item--upload .nav__link {
        gap: 0;
        padding: 0;
    }.nav__item--upload .nav__link::before {
        content: "";
        position: absolute;
        top: 0;
        left: 50%;
        width: 52px;
        height: 52px;
        transform: translate(-50%, -10px);
        border-radius: 50%;
        background: linear-gradient(180deg,
                var(--hp-nav-fab-from) 0%,
                var(--hp-nav-fab-mid) 48%,
                var(--hp-nav-fab-to) 100%);
        box-shadow:
            0 4px 8px rgba(var(--hp-color-black-rgb), 0.28),
            0 10px 22px rgba(var(--hp-color-accent-deep-rgb), 0.22),
            0 18px 36px rgba(var(--hp-color-accent-rgb), 0.12);
    }.nav__item--upload .nav__link img {
        position: absolute;
        top: 4px;
        left: calc(50% - 12px);
        width: 24px;
        height: 24px;
        padding: 0;
        box-sizing: border-box;
        opacity: 1;
        z-index: 1;
    }.nav__item--upload .nav__name {
        display: none;
    }.nav__item--upload.is-active > .nav__link::after {
        top: 2px;
        left: calc(50% - 18px);
    }/* search: fixed glass field above the bottom bar, at any scroll position */
    body.hp-search-open #search-input {
        position: fixed;
        left: 16px;
        right: 16px;
        margin-inline: auto;
        max-width: 28rem;
        bottom: calc(var(--hp-nav-height) + 10px + 14px + env(safe-area-inset-bottom, 0px));
        z-index: 1035;
        width: auto;
        height: 50px;
        padding: 0 18px;
        border-radius: 16px;
        border: 1px solid var(--hp-color-border-strong);
        background: rgba(var(--hp-color-overlay-strong-rgb), 0.94);
        -webkit-backdrop-filter: blur(20px) saturate(150%);
        backdrop-filter: blur(20px) saturate(150%);
        color: var(--hp-color-white);
        box-shadow: 0 14px 40px rgba(var(--hp-color-black-rgb), 0.5);
        animation: hp-search-in 0.18s ease-out both;
    }body.hp-search-open #search-input::placeholder {
        color: rgba(var(--hp-color-white-rgb), 0.5);
    }/* mobile header: floating glass bar, same recipe as the bottom nav */
    .header.site-header {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        width: 100%;
        height: auto;
        margin: 0 !important;
        padding: calc(10px + env(safe-area-inset-top, 0px)) 16px 0;
        z-index: 1025;
        pointer-events: none;
        transition: top 0.26s cubic-bezier(0.4, 0, 0.2, 1);
        will-change: top;
    }/* auto-hide: keeps the account control one flick away without eating
       viewport while the user scrolls down through the gallery.
       NOTE: animate `top`, never `transform` — a transformed .header would
       become the containing block for the fixed bottom nav and yank it up. */
    body.hp-header-hidden .header.site-header {
        top: calc(-1 * (66px + env(safe-area-inset-top, 0px)));
    }.header.site-header.bg-dark {
        background-color: transparent !important;
    }/* scrim above the bar so content scrolling underneath stays readable */
    .header.site-header::before {
        content: "";
        position: absolute;
        left: 0;
        right: 0;
        top: 0;
        height: calc(7.25rem + env(safe-area-inset-top, 0px));
        background: linear-gradient(180deg,
                rgba(var(--hp-color-black-rgb), 0.92) 0%,
                rgba(var(--hp-color-black-rgb), 0.62) 55%,
                transparent 100%);
        pointer-events: none;
        z-index: 0;
    }.header.site-header .container {
        position: relative;
        z-index: 1;
        width: 100%;
        max-width: 30rem;
        margin: 0 auto;
        padding: 0;
        background: none;
        border: 0;
        box-shadow: none;
        pointer-events: auto;
    }/* Glass lives on a pseudo-element, never on an ancestor of .nav__menu:
       backdrop-filter would turn that ancestor into the containing block for
       the fixed bottom bar and drag it to the top of the page. */
    .header.site-header .navbar {
        position: relative;
        isolation: isolate;
        justify-content: space-between;
        align-items: center;
        min-height: 56px;
        padding: 4px 14px;
        background: none;
        border-radius: 27px;
    }.header.site-header .navbar::before {
        content: "";
        position: absolute;
        inset: 0;
        border-radius: 27px;
        background: linear-gradient(180deg,
                rgba(var(--hp-nav-surface-overlay), 0.66) 0%,
                rgba(var(--hp-nav-surface), 0.76) 60%,
                rgba(var(--hp-nav-canvas), 0.84) 100%);
        -webkit-backdrop-filter: blur(28px) saturate(135%);
        backdrop-filter: blur(28px) saturate(135%);
        border: 1px solid var(--hp-nav-border);
        box-shadow: 0 18px 48px rgba(var(--hp-color-black-rgb), 0.42);
        pointer-events: none;
        z-index: -1;
    }.header.site-header .navbar > a,
    .header.site-header .navbar > .header__actions {
        position: relative;
        z-index: 1;
    }@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
        .header.site-header .navbar::before {
            background: linear-gradient(180deg, var(--hp-color-elevated) 0%, var(--hp-color-surface-2) 60%, var(--hp-color-canvas-soft) 100%);
        }
    }.header.site-header .navbar > a > img {
        width: 112px;
        height: auto;
    }.header__actions {
        display: flex;
        align-items: center;
        gap: 10px;
        margin-left: auto;
    }}/* tiny phones: second label line never needed, just shrink it */
@media screen and (max-width: 359px) {
    .nav__name {
        font-size: 9px;
        letter-spacing: -0.035em;
    }
}/* ==========================================================================
   DESKTOP HEADER  (>= 768px)
   In normal flow (scrolls away with the page — not sticky), logo left,
   links + account right, single glass segmented pill for the links.
   ========================================================================== */
@media screen and (min-width: 768px) {
    /* in normal flow on desktop — it scrolls away with the page */
    .header.site-header {
        position: relative;
        width: 100%;
        height: auto;
        margin: 0 !important;
        padding: 12px 16px 16px;
        background: transparent !important;
        border: 0;
        z-index: 5;
    }

    .header.site-header.bg-dark {
        background: transparent !important;
    }

    /* no scrim needed: nothing scrolls underneath the header any more */
    .header.site-header::before {
        display: none;
    }

    .header.site-header .container {
        position: relative;
        z-index: 1;
        max-width: 1320px;
        margin: 0 auto;
        padding: 0;
    }

    /* the header itself stays plain — the only glass surface is the nav pill */
    .header.site-header .navbar {
        position: relative;
        display: flex;
        align-items: center;
        flex-wrap: nowrap;
        gap: 18px;
        min-height: 60px;
        padding: 0 18px;
        background: none;
        border: 0;
        border-radius: 0;
        box-shadow: none;
        -webkit-backdrop-filter: none;
        backdrop-filter: none;
    }

    .header .navbar > a {
        order: 1;
        display: flex;
        align-items: center;
        flex-shrink: 0;
    }

    .header.site-header .navbar > a > img {
        width: 158px;
        height: auto;
    }

    /* links + account controls all live on the right, logo alone on the left */
    .header .navbar .nav__menu {
        order: 2;
        flex: 0 0 auto;
        min-width: 0;
        margin-left: auto;
        display: flex;
    }

    .header.site-header .navbar > .header__actions {
        order: 3;
        display: flex;
        align-items: center;
        gap: 10px;
        margin-left: 0;
        flex-shrink: 0;
    }

    /* ----- glass segmented pill for the nav links (topview tab style) ----- */
    .nav__list {
        position: relative;
        width: auto;
        display: inline-flex;
        align-items: center;
        gap: 2px;
        min-height: 0;
        margin: 0;
        padding: 4px;
        background: rgba(var(--hp-color-white-rgb), 0.05);
        border: 1px solid rgba(var(--hp-color-white-rgb), 0.06);
        border-radius: 999px;
        box-shadow: inset 0 1px 0 rgba(var(--hp-color-white-rgb), 0.06);
        -webkit-backdrop-filter: none;
        backdrop-filter: none;
    }

    /* sliding glass thumb behind the active link */
    .nav__thumb {
        display: block;
        position: absolute;
        top: 4px;
        left: 0;
        width: 0;
        height: 32px;
        border-radius: 999px;
        background: linear-gradient(180deg,
                rgba(var(--hp-color-white-rgb), 0.08) 0%,
                rgba(var(--hp-color-white-rgb), 0.05) 52%,
                rgba(var(--hp-color-white-rgb), 0.18) 100%);
        box-shadow: inset 0 1px 0 rgba(var(--hp-color-white-rgb), 0.24);
        transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1),
            width 0.3s cubic-bezier(0.22, 1, 0.36, 1);
        pointer-events: none;
        opacity: 0;
        z-index: 0;
    }

    .nav__item {
        display: flex;
        position: relative;
        z-index: 1;
    }

    /* account + moderator live in .header__actions on desktop */
    .nav__item--mod,
    .nav__item--profile,
    .nav__item--login {
        display: none;
    }

    .nav__item--upload .nav__link::before {
        display: none;
    }

    .nav__link {
        position: relative;
        z-index: 1;
        flex-direction: row;
        gap: 0;
        row-gap: 0;
        height: 32px;
        padding: 0 14px;
        border-radius: 999px;
        color: rgba(var(--hp-color-white-rgb), 0.5);
        font-size: 13px;
        font-weight: 500;
        line-height: 1;
        transition: color 0.3s ease;
    }

    .nav__link:hover {
        color: rgba(var(--hp-color-white-rgb), 0.85);
        background: none;
    }

    .nav__name {
        font-size: 13px;
        font-weight: inherit;
        letter-spacing: 0;
    }

    .nav__item.is-active > .nav__link {
        color: var(--hp-color-white);
    }

    /* the sliding thumb is the indicator on desktop */
    .nav__item.is-active > .nav__link::after {
        display: none;
    }

    /* icons are a mobile affordance */
    .nav__icon,
    .header .nav__list .nav__link .hp-icon {
        display: none !important;
    }
}/* motion preferences */
@media (prefers-reduced-motion: reduce) {

    .header.site-header {
        transition: none;
    }

    .nav__thumb {
        transition: none;
    }

    .nav__link,
    .nav__link img {
        transition: none;
    }

    .nav__item.is-active > .nav__link img {
        animation: none;
    }

    .nav__item.is-active > .nav__link::after {
        animation: none;
        opacity: 0;
    }

    .nav__link:active img {
        transform: none;
    }
}@media screen and (min-width: 768px){body {
        margin: 0;
    }.section {
        padding: 7rem 0 2rem;
    }.nav__icon,
    .nav__img {
        display: none;
    }}@media screen and (min-width: 1024px){.container {
        margin-left: auto;
        margin-right: auto;
    }}/* ==========================================================================
   TIKTOK VIDEO SECTION — shared header/nav compatibility
   (the /tiktok/ pages use the same chrome files;these are the only extra
   rules their markup needs: legacy .nav wrapper, promo/filter header row,
   and the legacy desktop bottom bar)
   ========================================================================== */
.modal-backdrop {
    width: 0 !important;
}.nav {
    height: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 50;
}.nav ul {
    list-style: none;
}.nav a {
    text-decoration: none;
}.nav img {
    max-width: 100%;
    height: auto;
}.rm-6 {
    margin-top: 6rem !important;
}/* tiktok app header layout (moved here from tiktok/fab.css + assets/css/fab.css) */
.hp-videos-topbar {
    position: fixed;
    right: 0;
    left: 0;
    z-index: 100;
    color: var(--hp-color-white);
    margin: 1rem 3rem 0rem 3rem;

}.hp-videos-header p {
    font-weight: 700
}@supports(-webkit-touch-callout:none) {
    @media (display-mode:standalone) {
        .hp-videos-header {
            margin: env(safe-area-inset-top) 2rem env(safe-area-inset-bottom)
        }
    }
}/* legacy desktop bottom bar (tiktok only — scoped by its fixed header wrapper) */
/* legacy tiktok desktop bottom bar removed (new mobile nav used on /videos/) */


/* tiktok mobile header: fixed overlay, promo strip, floating glass filter row */
@media screen and (max-width: 767px) {
    /* No page padding here on purpose: every tiktok page is a full-height
       snap feed (body/html 100% + .postlist_container 100%), so the bar is an
       overlay like it was before — adding bottom padding would shrink the
       feed and leave a black band under the video. The scrim keeps content
       legible behind the glass. */

    /* ---- tiktok header (fixed overlay): floating glass bar, same recipe as the
       bottom nav. Promo strip above it stays as-is. ---- */
    .hp-videos-topbar {
        margin: 0;
        padding: 0;
        top: 0;
        transition: top 0.26s cubic-bezier(0.4, 0, 0.2, 1);
        will-change: top;
    }

    /* auto-hide while scrolling down, reveal on scroll up / at the top.
       `top` (not transform) keeps the fixed bottom nav anchored to the viewport. */
    body.hp-header-hidden .hp-videos-topbar {
        top: calc(-1 * (150px + env(safe-area-inset-top, 0px)));
    }

    /* top scrim so the feed stays readable under the floating header */
    .hp-videos-topbar::before {
        content: "";
        position: absolute;
        left: 0;
        right: 0;
        top: 0;
        height: calc(7.25rem + env(safe-area-inset-top, 0px));
        background: linear-gradient(180deg,
                rgba(var(--hp-color-black-rgb), 0.92) 0%,
                rgba(var(--hp-color-black-rgb), 0.62) 55%,
                transparent 100%);
        pointer-events: none;
        z-index: 0;
    }

    .hp-videos-header {
        position: relative;
        z-index: 1;
        max-width: none;
        margin: 0;
        padding: 0;
    }

    .header.site-header {
        background-color: transparent !important;
    }

    /* filter dropdown + profile / login / mod share one floating glass row.
       Glass is on a pseudo-element so the fixed .nav__menu is never inside a
       backdrop-filter ancestor (that would move it to the top of the page). */
    .header .header__topbar {
        position: relative;
        isolation: isolate;
        align-items: center !important;
        justify-content: space-between !important;
        gap: 10px;
        min-height: 56px;
        width: calc(100% - 32px);
        max-width: 30rem;
        margin: 8px auto 0;
        padding: 4px 10px;
        border-radius: 27px;
        background: none;
    }

    .header .header__topbar::before {
        content: "";
        position: absolute;
        inset: 0;
        border-radius: 27px;
        background: linear-gradient(180deg,
                rgba(var(--hp-nav-surface-overlay), 0.66) 0%,
                rgba(var(--hp-nav-surface), 0.76) 60%,
                rgba(var(--hp-nav-canvas), 0.84) 100%);
        -webkit-backdrop-filter: blur(28px) saturate(135%);
        backdrop-filter: blur(28px) saturate(135%);
        border: 1px solid var(--hp-nav-border);
        box-shadow: 0 18px 48px rgba(var(--hp-color-black-rgb), 0.42);
        pointer-events: none;
        z-index: -1;
    }

    .header .header__topbar > * {
        position: relative;
        z-index: 1;
    }

    @supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
        .header .header__topbar::before {
            background: linear-gradient(180deg, var(--hp-color-elevated) 0%, var(--hp-color-surface-2) 60%, var(--hp-color-canvas-soft) 100%);
        }
    }

}/* ==========================================================================
   Desktop header: give it its own surface + hairline so it separates from
   the page body (mobile keeps the floating glass bar)
   ========================================================================== */
@media screen and (min-width: 768px) {
    .header.site-header,
    .header.site-header.bg-dark {
        background: linear-gradient(180deg,
                rgba(var(--hp-color-white-rgb), 0.05) 0%,
                rgba(var(--hp-color-white-rgb), 0.018) 100%) !important;
        border-bottom: 1px solid rgba(var(--hp-color-white-rgb), 0.09) !important;
        box-shadow: inset 0 1px 0 rgba(var(--hp-color-white-rgb), 0.05),
                    0 12px 32px rgba(var(--hp-color-black-rgb), 0.26);
        -webkit-backdrop-filter: blur(14px) saturate(130%);
        backdrop-filter: blur(14px) saturate(130%);
    }
}/* header: transparent again, separated by a hairline + faint violet top glow
   (the lighter glass band read as a flat strip) */
@media screen and (min-width: 768px) {
    .header.site-header,
    .header.site-header.bg-dark {
        background:
            radial-gradient(120% 180% at 50% -60%, rgba(var(--hp-color-accent-rgb), 0.10) 0%, transparent 68%) !important;
        border-bottom: 1px solid rgba(var(--hp-color-white-rgb), 0.07) !important;
        box-shadow: none;
        -webkit-backdrop-filter: none;
        backdrop-filter: none;
    }
}/* desktop header — chosen style C: solid elevated surface + soft shadow, no border */
@media screen and (min-width: 768px) {
    .header.site-header,
    .header.site-header.bg-dark {
        background: rgb(var(--hp-color-surface-2-rgb)) !important;
        border-bottom: 0 !important;
        box-shadow: 0 12px 28px rgba(var(--hp-color-black-rgb), 0.55) !important;
        -webkit-backdrop-filter: none !important;
        backdrop-filter: none !important;
    }
}/* desktop header nav: central SVG icons next to the labels */
@media screen and (min-width: 768px) {
    .header.site-header .nav__list .nav__link,
    .header.site-header .nav__list .nav__item--upload > .nav__link {
        flex-direction: row;
        gap: 7px;
        padding: 0 14px;
        height: 32px;
    }

    .header.site-header .nav__list .nav__link .hp-icon {
        position: static !important;
        display: block !important;
        box-sizing: border-box !important;
        width: 16px !important;
        height: 16px !important;
        min-width: 0;
        padding: 0 !important;
        margin: 0 !important;
        top: auto !important;
        left: auto !important;
        flex: 0 0 16px !important;
        color: inherit;
        opacity: 1;
        filter: none !important;
    }

    .header.site-header .nav__list .nav__link:hover .hp-icon {
        opacity: 1;
    }

    .header.site-header .nav__list .nav__item.is-active > .nav__link .hp-icon {
        color: var(--hp-color-accent-soft);
    }
}

/* breathing room between the header band and the page content (all pages),
   except the grid/profile pages whose header is in flow and hosts the search
   field — there the margin would leave an empty band when search is closed */
@media screen and (min-width: 768px) {
    .header.site-header {
        margin-bottom: 24px !important;
    }

    .hp-tag-page .header.site-header,
    .hp-tags-page .header.site-header,
    .hp-user-page .header.site-header {
        margin-bottom: 0 !important;
    }
}

