#headerr {
    position: sticky;
    top: 0;
    z-index: 100;
    height: var(--header-h);
    background: rgba(var(--bg-rgb), .9);
    border-bottom: 1px solid var(--border);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
}
.header-inner {
    display: flex;
    align-items: center;
    gap: 18px;
    width: min(var(--content-width), 100%);
    height: 100%;
    margin: 0 auto;
    padding: 0 24px;
}
#headerlogo-link { display: inline-flex; padding: 3px; overflow: hidden; background: rgba(var(--secondary-rgb), .08); border: 1px solid rgba(var(--secondary-rgb), .2); border-radius: 50%; }
#headerlogo { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; transition: transform .25s ease, box-shadow .25s ease; }
#headerlogo-link:hover #headerlogo { transform: scale(1.04); box-shadow: 0 0 14px rgba(var(--secondary-rgb), .22); }
#navlist { display: flex; align-items: center; gap: 4px; margin: 0; padding: 0; list-style: none; }
.mainp { padding: 0; }
a.he, span.he {
    position: relative;
    display: inline-block;
    padding: 8px 14px;
    border-radius: var(--radius-sm);
    color: var(--text-dim);
    text-decoration: none;
    font-size: 15px;
    transition: color .2s ease, background .2s ease;
}
a.he:hover { color: var(--text); background: rgba(var(--secondary-rgb), .08); }
a.he.active { color: var(--text); background: rgba(var(--secondary-rgb), .055); }
a.he::after {
    position: absolute;
    right: 14px;
    bottom: 4px;
    left: 14px;
    height: 2px;
    border-radius: 2px;
    background: var(--accent);
    content: "";
    transform: scaleX(0);
    transform-origin: left;
    transition: transform .25s ease;
}
a.he:hover::after, a.he.active::after { transform: scaleX(1); }
span.he.disabled { color: var(--text-dim); opacity: .55; cursor: not-allowed; user-select: none; }
#themeToggle {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    margin-left: auto;
    padding: 0;
    color: var(--text-dim);
    background: rgba(var(--surface-rgb), .46);
    border: 1px solid var(--border);
    border-radius: 50%;
    cursor: pointer;
    transition: color .2s ease, background .2s ease, border-color .2s ease;
}
#themeToggle:hover { color: var(--text); background: var(--surface-2); border-color: rgba(var(--secondary-rgb), .42); }
.theme-icon { width: 18px; height: 18px; }
.theme-icon-light { display: none; }
:root[data-theme="dark"] .theme-icon-light { display: block; }
:root[data-theme="dark"] .theme-icon-dark { display: none; }
@media (max-width: 640px) {
    #headerr { overflow-x: auto; scrollbar-width: none; }
    #headerr::-webkit-scrollbar { display: none; }
    .header-inner { width: max-content; min-width: 100%; gap: 8px; padding: 0 10px; }
    #navlist { flex-shrink: 0; }
    a.he, span.he { padding: 8px 9px; font-size: 14px; }
    a.he::after { right: 9px; left: 9px; }
}
