/**
 * 全站子模块顶栏（与导航页一致）
 * 依赖各页 :root 中的 --header-h、--accent、--accent-2、--border、--surface、--text-muted
 */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: calc(var(--header-h, 56px) + env(safe-area-inset-top, 0px));
    padding-top: env(safe-area-inset-top, 0px);
    z-index: 100;
    background: var(--header-bar-bg, rgba(10, 16, 20, 0.85));
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--border, rgba(255, 255, 255, 0.09));
}

.site-header-inner {
    height: var(--header-h, 56px);
    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding: 0 20px;
    gap: 12px;
}

.site-header-left {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
    flex-shrink: 1;
}

.site-header-title {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    letter-spacing: 0.14em;
    line-height: 1;
    cursor: default;
    user-select: none;
    white-space: nowrap;
    background: var(--header-title-gradient, linear-gradient(135deg, var(--accent), var(--accent-2, var(--accent))));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.site-header-home,
.nav-home-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-left: auto;
    height: 34px;
    padding: 0 12px;
    border: 1px solid var(--border, rgba(255, 255, 255, 0.09));
    border-radius: 999px;
    background: var(--surface, rgba(255, 255, 255, 0.05));
    color: var(--text-muted, #94a3b8);
    font-size: 12px;
    text-decoration: none;
    letter-spacing: 0.04em;
    white-space: nowrap;
    transition: all 0.22s ease;
}

.site-header-home:hover,
.nav-home-link:hover {
    color: var(--text, #f1f5f9);
    border-color: var(--accent);
    background: var(--surface-2, rgba(255, 255, 255, 0.08));
}

@media (max-width: 640px) {
    .site-header-home-text,
    .nav-home-text {
        display: none;
    }

    .site-header-home,
    .nav-home-link {
        width: 34px;
        padding: 0;
    }

    .site-header-title {
        font-size: 15px;
        letter-spacing: 0.1em;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .site-header-inner {
        padding: 0 14px;
        gap: 8px;
    }

    .site-header-left {
        gap: 8px;
        min-width: 0;
        flex: 1;
    }
}

@media (max-width: 480px) {
    .site-header-title {
        font-size: 14px;
        letter-spacing: 0.06em;
    }

    .site-header-inner {
        padding: 0 12px;
    }
}

@media (min-width: 992px) {
    .site-header-title {
        font-size: 17px;
    }
}
