:root { --site-header-offset: 76px; }

.site-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    width: 100vw;
    max-width: none;
    margin-left: calc(50% - 50vw);
    border-bottom: 1px solid rgba(214, 205, 196, .72);
    background: rgba(251, 248, 244, .78);
    -webkit-backdrop-filter: blur(16px) saturate(145%);
    backdrop-filter: blur(16px) saturate(145%);
}

.site-header__inner {
    width: min(1120px, 100%);
    min-height: 76px;
    margin: 0 auto;
    padding: 10px 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
}

.site-header__brand {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: #352d27;
    text-decoration: none;
    font-family: 'Quicksand', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: clamp(21px, 2.3vw, 27px);
    font-weight: 800;
    line-height: 1;
    white-space: nowrap;
}

.site-header__brand img {
    display: block;
    width: 48px;
    height: 48px;
    flex: 0 0 48px;
    border-radius: 50%;
    object-fit: cover;
}

.site-header__nav {
    min-width: 0;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 7px;
}

.site-header__nav a {
    min-height: 40px;
    padding: 9px 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(214, 205, 196, .82);
    border-radius: 999px;
    background: rgba(255, 255, 255, .72);
    color: #352d27;
    box-shadow: 0 4px 12px rgba(74, 63, 53, .045);
    text-decoration: none;
    font-family: 'Quicksand', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 14px;
    font-weight: 800;
    line-height: 1;
    white-space: nowrap;
    transition: background .16s ease, border-color .16s ease, color .16s ease, transform .16s ease;
    -webkit-backdrop-filter: blur(14px) saturate(140%);
    backdrop-filter: blur(14px) saturate(140%);
}

.site-header__nav a:hover {
    border-color: rgba(245, 155, 177, .72);
    background: rgba(255, 255, 255, .95);
    transform: translateY(-1px);
}

.site-header__nav a.active,
.site-header__nav a[aria-current="page"] {
    border-color: #352d27;
    background: #352d27;
    color: #fff;
}

@supports (padding: max(0px)) {
    .site-header__inner {
        padding-left: max(18px, env(safe-area-inset-left));
        padding-right: max(18px, env(safe-area-inset-right));
    }
}

@media (max-width: 820px) {
    :root { --site-header-offset: 104px; }

    .site-header__inner {
        min-height: 0;
        padding-top: max(9px, env(safe-area-inset-top));
        padding-bottom: 9px;
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
    }

    .site-header__brand {
        align-self: flex-start;
        font-size: 22px;
    }

    .site-header__brand img {
        width: 42px;
        height: 42px;
        flex-basis: 42px;
    }

    .site-header__nav {
        width: 100%;
        justify-content: flex-start;
        gap: 6px;
        overflow-x: auto;
        overscroll-behavior-inline: contain;
        scrollbar-width: none;
        -webkit-overflow-scrolling: touch;
        padding-bottom: 1px;
    }

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

    .site-header__nav a {
        flex: 0 0 auto;
        min-height: 36px;
        padding: 8px 12px;
        font-size: 13px;
    }
}

@supports (width: 100dvw) {
    .site-header { width: 100dvw; margin-left: calc(50% - 50dvw); }
}
