﻿:root {
    --hao-site-sidebar-shell-width: 238px;
    --hao-site-sidebar-shell-collapsed-width: 84px;
    --hao-site-sidebar-panel-radius: 18px;
    --hao-site-sidebar-border-color: rgba(15, 23, 42, 0.055);
    --hao-site-sidebar-soft-bg: rgba(15, 23, 42, 0.03);
    --hao-site-sidebar-soft-bg-strong: rgba(15, 23, 42, 0.045);
    --hao-site-sidebar-muted: rgba(60, 60, 67, 0.64);
    --hao-site-sidebar-title: rgba(54, 54, 54, 0.76);
    --hao-site-sidebar-title-strong: rgba(54, 54, 54, 0.92);
    --hao-site-sidebar-subtle: rgba(60, 60, 67, 0.5);
    --hao-site-sidebar-icon: rgba(60, 60, 67, 0.58);
    --hao-site-sidebar-surface: rgba(255, 255, 255, 0.56);
    --hao-site-sidebar-surface-strong: rgba(255, 255, 255, 0.7);
    --hao-site-sidebar-panel-bg: rgba(247, 249, 254, 0.22);
    --hao-site-sidebar-pill-bg: rgba(255, 255, 255, 0.4);
    --hao-site-sidebar-accent-bg: rgba(66, 89, 239, 0.06);
    --hao-site-sidebar-accent-border: rgba(66, 89, 239, 0.08);
    --hao-site-sidebar-active-bg: rgba(66, 89, 239, 0.05);
    --hao-site-sidebar-active-color: rgba(54, 54, 54, 0.92);
    --hao-site-sidebar-active-icon: rgba(54, 54, 54, 0.82);
    --hao-site-sidebar-shadow: none;
    --hao-site-sidebar-icon-shadow: none;
    --hao-site-sidebar-elevation: none;
}

#hao-site-sidebar-desktop {
    display: none;
}

.hao-site-nav__brand,
.hao-site-nav__section,
.hao-site-nav-drawer__footer {
    position: relative;
    overflow: visible;
    padding: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}

.hao-site-nav__brand-link {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 0 6px 10px;
    color: var(--hao-site-sidebar-title);
    text-decoration: none;
    border-bottom: none;
}

.hao-site-nav__brand-mark {
    width: 32px;
    height: 32px;
    border-radius: 10px;
    background: var(--hao-site-sidebar-soft-bg);
    border: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    overflow: hidden;
    box-shadow: var(--hao-site-sidebar-icon-shadow);
}

.hao-site-nav__brand-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    border-radius: 10px;
}

.hao-site-nav__brand-mark i,
.hao-site-nav__brand-mark .hao-site-nav__brand-symbol {
    width: 1rem;
    height: 1rem;
    font-size: 0.98rem;
    line-height: 1;
    color: var(--hao-site-sidebar-icon);
    fill: currentColor;
}

.hao-site-nav__brand-copy {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 1px;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.hao-site-nav__brand-title {
    font-size: 1rem;
    line-height: 1.15;
    font-weight: 650;
    color: var(--hao-site-sidebar-title);
}

.hao-site-nav__brand-subtitle {
    font-size: 0.7rem;
    line-height: 1.35;
    color: var(--hao-site-sidebar-subtle);
}

.hao-site-nav__sections {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.hao-site-nav__section {
    padding-top: 12px;
}

.hao-site-nav__section:first-child {
    padding-top: 0;
}

.hao-site-nav__section + .hao-site-nav__section {
    border-top: 1px solid var(--hao-site-sidebar-border-color);
}

.hao-site-nav__section-header {
    margin-bottom: 8px;
    padding: 0 10px;
    transition: opacity 0.18s ease, transform 0.18s ease;
}

.hao-site-nav__section-title {
    margin: 0;
    color: var(--hao-site-sidebar-subtle);
    font-size: 0.65rem;
    line-height: 1.3;
    font-weight: 600;
    letter-spacing: 0.12em;
}

.hao-site-nav__section-desc {
    margin: 2px 0 0;
    color: var(--hao-site-sidebar-subtle);
    font-size: 0.68rem;
    line-height: 1.35;
}

.hao-site-nav__section-list {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.hao-site-nav__item,
.hao-site-nav__action {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 8px 10px;
    border-radius: 12px;
    border: 0;
    background: transparent;
    color: var(--hao-site-sidebar-title);
    text-decoration: none;
    border-bottom: none;
    box-shadow: none;
    transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.hao-site-nav__item:hover,
.hao-site-nav__action:hover {
    transform: none;
    background: var(--hao-site-sidebar-soft-bg);
    color: var(--hao-site-sidebar-title-strong);
    box-shadow: none;
}

.hao-site-nav__item.is-active {
    background: var(--hao-site-sidebar-active-bg);
    color: var(--hao-site-sidebar-active-color);
}

.hao-site-nav__icon,
.hao-site-nav__action-icon {
    width: 30px;
    height: 30px;
    border-radius: 10px;
    background: transparent;
    color: var(--hao-site-sidebar-icon);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: background 0.18s ease, color 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.hao-site-nav__item:hover .hao-site-nav__icon,
.hao-site-nav__action:hover .hao-site-nav__action-icon {
    color: var(--hao-site-sidebar-title);
}

.hao-site-nav__item.is-active .hao-site-nav__icon {
    background: var(--hao-site-sidebar-pill-bg);
    color: var(--hao-site-sidebar-active-icon);
    box-shadow: var(--hao-site-sidebar-icon-shadow);
}

.hao-site-nav__icon i,
.hao-site-nav__icon .ali_icon,
.hao-site-nav__action-icon i,
.hao-site-nav__action-icon .ali_icon {
    width: 0.92rem;
    height: 0.92rem;
    font-size: 0.88rem;
    line-height: 1;
}

.hao-site-nav__icon-image {
    width: 0.96rem;
    height: 0.96rem;
    object-fit: cover;
    border-radius: 7px;
    display: block;
    opacity: 0.74;
    filter: saturate(0.78);
    transition: opacity 0.18s ease, filter 0.18s ease;
}

.hao-site-nav__copy {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 1px;
    transition: opacity 0.18s ease, transform 0.18s ease;
}

.hao-site-nav__item-title,
.hao-site-nav__item-subtitle,
.hao-site-nav__action-text {
    display: -webkit-box;
    overflow: hidden;
    -webkit-box-orient: vertical;
}

.hao-site-nav__item-title,
.hao-site-nav__action-text {
    font-size: 0.9rem;
    line-height: 1.2;
    font-weight: 600;
    color: var(--hao-site-sidebar-title);
    -webkit-line-clamp: 1;
}

.hao-site-nav__item-subtitle {
    font-size: 0.68rem;
    line-height: 1.3;
    color: var(--hao-site-sidebar-subtle);
    -webkit-line-clamp: 1;
    word-break: break-word;
    opacity: 0.66;
}

.hao-site-nav__item:hover .hao-site-nav__item-subtitle,
.hao-site-nav__action:hover .hao-site-nav__item-subtitle,
.hao-site-nav__item.is-active .hao-site-nav__item-subtitle {
    opacity: 0.84;
}

.hao-site-nav__item:hover .hao-site-nav__icon-image,
.hao-site-nav__item.is-active .hao-site-nav__icon-image {
    opacity: 0.9;
    filter: none;
}

.hao-site-nav__item.is-active .hao-site-nav__item-title {
    color: var(--hao-site-sidebar-active-color);
    font-weight: 650;
}

.hao-site-sidebar-desktop__bottom {
    padding-top: 6px;
}

.hao-site-sidebar-desktop__collapse {
    width: 100%;
    display: inline-flex;
    align-items: center;
    justify-content: flex-start;
    gap: 8px;
    border: 0;
    border-radius: 12px;
    background: transparent;
    color: var(--hao-site-sidebar-subtle);
    height: 34px;
    padding: 0 10px;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.hao-site-sidebar-desktop__collapse:hover {
    background: var(--hao-site-sidebar-soft-bg);
    color: var(--hao-site-sidebar-title);
    transform: none;
}

.hao-site-sidebar-desktop__collapse-icon {
    font-size: 0.78rem;
    opacity: 0.74;
    transition: transform 0.2s ease;
}

.hao-site-nav-drawer {
    background: var(--hao-site-sidebar-panel-bg);
}

.hao-site-nav-drawer__content {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.hao-site-sidebar-drawer__intro {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

@media screen and (min-width: 1101px) {
    body[data-type]:not([data-type='music']) #hao-site-sidebar-desktop {
        position: fixed;
        top: 18px;
        left: 18px;
        bottom: 18px;
        width: calc(var(--hao-site-sidebar-shell-width) - 18px);
        z-index: 100;
        display: block;
    }

    .hao-site-sidebar-desktop__panel {
        height: 100%;
        display: flex;
        flex-direction: column;
        gap: 12px;
        padding: 10px 8px 8px 0;
        border-radius: 0;
        border: 0;
        background: var(--hao-site-sidebar-panel-bg);
        box-shadow: var(--hao-site-sidebar-shadow);
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
        transition: width 0.22s ease, padding 0.22s ease;
    }

    .hao-site-sidebar-desktop__scroll {
        flex: 1 1 auto;
        min-height: 0;
        overflow-y: auto;
        padding-right: 4px;
    }

    .hao-site-sidebar-desktop__scroll::-webkit-scrollbar {
        width: 3px;
    }

    body[data-type]:not([data-type='music']) .page {
        width: calc(100% - var(--hao-site-sidebar-shell-width));
        margin-left: var(--hao-site-sidebar-shell-width);
        transition: margin-left 0.22s ease, width 0.22s ease;
    }

    body[data-type]:not([data-type='music']) #page-header #nav {
        top: 8px;
        left: calc(var(--hao-site-sidebar-shell-width) + 12px);
        right: 16px;
        width: auto;
        border-radius: 0;
        border: 0;
        background: transparent;
        box-shadow: none;
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
        transition: left 0.22s ease, width 0.22s ease;
    }

    body[data-type]:not([data-type='music']) #hao-site-sidebar-desktop::after {
        content: "";
        position: absolute;
        top: 10px;
        right: 4px;
        bottom: 10px;
        width: 1px;
        background: var(--hao-site-sidebar-border-color);
        border-radius: 999px;
        pointer-events: none;
    }

    body[data-type]:not([data-type='music']) #page-header #menus,
    body[data-type]:not([data-type='music']) #page-header #blog_name,
    body[data-type]:not([data-type='music']) #page-header #page-name-mask,
    body[data-type]:not([data-type='music']) #page-header #toggle-menu {
        display: none !important;
    }

    body[data-type]:not([data-type='music']) #page-header #nav #nav-group {
        max-width: none;
        width: 100%;
        padding-left: 0;
        padding-right: 0;
    }

    body[data-type]:not([data-type='music']) #page-header #nav-right {
        position: static;
        right: auto;
        margin-left: auto;
        margin-right: 0;
        justify-content: flex-end;
        flex-wrap: nowrap;
    }

    body[data-type]:not([data-type='music']) #page-header #nav-right > div:first-child {
        margin-left: 0;
    }

    body[data-type='index'] #home_top,
    body[data-type='index'] .layout#content-inner {
        max-width: 1400px;
    }

    body[data-type='index'] #home_top {
        margin-top: -14px;
        padding-left: 0;
        padding-right: 0;
    }

    body[data-type='index'] .layout#content-inner {
        padding-top: 8px;
        padding-left: 0;
        padding-right: 0;
        padding-bottom: 24px;
        align-items: flex-start;
    }

    body[data-type='index'] .layout#content-inner > #recent-posts {
        width: calc(100% - 320px);
    }

    body[data-type='index'] .layout#content-inner > #aside-content {
        width: 300px;
        padding-left: 20px;
        margin-left: auto;
    }

    body[data-type='index'] .layout#content-inner > #aside-content > .card-widget:first-child {
        margin-top: 0;
    }

    body[data-type='index'] .recent-top-post-group,
    body[data-type='index'] .recent-posts {
        margin-top: 0;
    }

    body[data-type='index'] .recent-posts > .recent-post-item:first-of-type {
        margin-top: 0;
    }

    body[data-type]:not([data-type='music']) #page-header #nav #nav-group {
        height: 48px;
        padding: 0;
        justify-content: flex-end;
    }

    body[data-type]:not([data-type='music']) #page-header #nav-right {
        display: flex;
        align-items: center;
        gap: 8px;
    }

    body[data-type]:not([data-type='music']) #page-header #nav-right .nav-button,
    body[data-type]:not([data-type='music']) #page-header #nav-right .console-button,
    body[data-type]:not([data-type='music']) #page-header #nav-right #toggle-menu {
        margin: 0;
    }

    body[data-type]:not([data-type='music']) #page-header #nav-right .site-page,
    body[data-type]:not([data-type='music']) #page-header #nav-right .console_switchbutton,
    body[data-type]:not([data-type='music']) #page-header #nav-right .totopbtn {
        min-width: 38px;
        height: 38px;
        padding: 0 10px;
        border-radius: 14px;
        border: 0;
        background: transparent;
        box-shadow: none;
        color: var(--hao-site-sidebar-title) !important;
    }

    body[data-type]:not([data-type='music']) #page-header #nav-right .site-page:hover,
    body[data-type]:not([data-type='music']) #page-header #nav-right .console_switchbutton:hover,
    body[data-type]:not([data-type='music']) #page-header #nav-right .totopbtn:hover {
        background: var(--hao-site-sidebar-soft-bg);
    }

    body[data-type]:not([data-type='music']) #page-header #nav-right .site-page i,
    body[data-type]:not([data-type='music']) #page-header #nav-right .console_switchbutton i,
    body[data-type]:not([data-type='music']) #page-header #nav-right .totopbtn i,
    body[data-type]:not([data-type='music']) #page-header #nav-right .site-page svg,
    body[data-type]:not([data-type='music']) #page-header #nav-right .console_switchbutton svg,
    body[data-type]:not([data-type='music']) #page-header #nav-right .totopbtn svg,
    body[data-type]:not([data-type='music']) #page-header #nav-right #percent {
        color: var(--hao-site-sidebar-title) !important;
        fill: currentColor;
        stroke: currentColor;
    }

    body[data-type]:not([data-type='music']) #page-header #nav-right .totopbtn {
        gap: 6px;
        min-width: 56px;
    }

    body[data-type]:not([data-type='music']) #page-header #nav #nav-right #nav-totop {
        width: 56px;
        height: 38px;
        overflow: hidden;
    }

    body[data-type]:not([data-type='music']) #page-header #nav #nav-right #nav-totop.long {
        width: 86px;
    }

    body[data-type]:not([data-type='music']) #page-header #nav #nav-right .nav-button a.totopbtn {
        position: static;
        top: auto;
        right: auto;
        width: 100%;
        height: 100%;
        min-width: 56px;
        padding: 0 12px;
        border-radius: 14px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 6px;
        background: rgba(255, 255, 255, 0.82) !important;
        box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.04);
        backdrop-filter: blur(14px);
        -webkit-backdrop-filter: blur(14px);
        color: var(--hao-site-sidebar-title) !important;
    }

    body[data-type]:not([data-type='music']) #page-header #nav #nav-right .nav-button.long a.totopbtn {
        width: 100%;
    }

    body[data-type]:not([data-type='music']) #page-header #nav #nav-right .nav-button:hover a.totopbtn {
        background: rgba(255, 255, 255, 0.9) !important;
    }

    body[data-type]:not([data-type='music']) #page-header #nav #nav-right .nav-button:not(.long):hover a.totopbtn {
        width: 100%;
        height: 100%;
        top: auto;
        right: auto;
    }

    body.hao-site-sidebar-collapsed[data-type]:not([data-type='music']) .page {
        width: calc(100% - var(--hao-site-sidebar-shell-collapsed-width));
        margin-left: var(--hao-site-sidebar-shell-collapsed-width);
    }

    body.hao-site-sidebar-collapsed[data-type]:not([data-type='music']) #page-header #nav {
        left: calc(var(--hao-site-sidebar-shell-collapsed-width) + 12px);
    }

    body.hao-site-sidebar-collapsed[data-type]:not([data-type='music']) #hao-site-sidebar-desktop {
        width: calc(var(--hao-site-sidebar-shell-collapsed-width) - 18px);
    }

    body.hao-site-sidebar-collapsed .hao-site-sidebar-desktop__panel {
        padding-right: 4px;
        padding-left: 0;
    }

    body.hao-site-sidebar-collapsed .hao-site-nav__brand-link,
    body.hao-site-sidebar-collapsed .hao-site-nav__item,
    body.hao-site-sidebar-collapsed .hao-site-nav__action {
        justify-content: center;
        padding-inline: 0;
    }

    body.hao-site-sidebar-collapsed .hao-site-nav__brand-copy,
    body.hao-site-sidebar-collapsed .hao-site-nav__section-header,
    body.hao-site-sidebar-collapsed .hao-site-nav__copy,
    body.hao-site-sidebar-collapsed .hao-site-sidebar-desktop__collapse-text {
        opacity: 0;
        transform: translateX(-6px);
        pointer-events: none;
        position: absolute;
        width: 1px;
        height: 1px;
        overflow: hidden;
        clip: rect(0, 0, 0, 0);
        white-space: nowrap;
        clip-path: inset(50%);
    }

    body.hao-site-sidebar-collapsed .hao-site-nav__section {
        padding-top: 0;
        border-top: 0;
    }

    body.hao-site-sidebar-collapsed .hao-site-nav__section-list {
        align-items: center;
        gap: 6px;
    }

    body.hao-site-sidebar-collapsed .hao-site-nav__icon,
    body.hao-site-sidebar-collapsed .hao-site-nav__action-icon {
        width: 36px;
        height: 36px;
    }

    body.hao-site-sidebar-collapsed .hao-site-sidebar-desktop__collapse {
        padding: 0;
        justify-content: center;
    }

    body.hao-site-sidebar-collapsed .hao-site-sidebar-desktop__collapse-icon {
        transform: rotate(180deg);
    }
}

@media screen and (max-width: 1100px) {
    #hao-site-sidebar-desktop {
        display: none !important;
    }

    body[data-type]:not([data-type='music']) #page-header #menus {
        display: none !important;
    }

    body[data-type]:not([data-type='music']) #page-header #toggle-menu,
    body[data-type]:not([data-type='music']) #page-header #nav-right #toggle-menu {
        display: none !important;
    }

    body[data-type]:not([data-type='music']) #page-header #nav-right #toggle-menu .hao-mobile-menu-trigger {
        min-width: 78px;
        height: 40px;
        padding: 0 12px;
        border-radius: 999px;
        border: 1px solid rgba(148, 163, 184, 0.22);
        background: linear-gradient(135deg, rgba(255, 255, 255, 0.92), rgba(255, 255, 255, 0.72));
        box-shadow: 0 12px 24px rgba(15, 23, 42, 0.12);
        color: var(--hao-site-sidebar-title-strong) !important;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
        text-decoration: none;
        border-bottom: 0;
        transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease, border-color 0.25s ease;
    }

    body[data-type]:not([data-type='music']) #page-header #nav-right #toggle-menu .hao-mobile-menu-trigger:active {
        transform: scale(0.975);
    }

    body[data-type]:not([data-type='music']) #page-header #nav-right #toggle-menu .hao-mobile-menu-trigger:focus-visible {
        outline: 0;
        box-shadow:
            0 0 0 3px rgba(99, 102, 241, 0.16),
            0 12px 24px rgba(15, 23, 42, 0.14);
        border-color: rgba(99, 102, 241, 0.34);
    }

    body[data-type]:not([data-type='music']) #page-header #nav-right #toggle-menu .hao-mobile-menu-trigger__bars {
        width: 18px;
        height: 16px;
        display: inline-flex;
        flex-direction: column;
        justify-content: center;
        gap: 3px;
        flex-shrink: 0;
    }

    body[data-type]:not([data-type='music']) #page-header #nav-right #toggle-menu .hao-mobile-menu-trigger__bar {
        width: 18px;
        height: 2px;
        border-radius: 999px;
        background: currentColor;
        transform-origin: center;
        transition: transform 0.28s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.2s ease, width 0.2s ease;
    }

    body[data-type]:not([data-type='music']) #page-header #nav-right #toggle-menu .hao-mobile-menu-trigger__bar:nth-child(2) {
        width: 14px;
    }

    body[data-type]:not([data-type='music']) #page-header #nav-right #toggle-menu .hao-mobile-menu-trigger__bar:nth-child(3) {
        width: 10px;
    }

    body[data-type]:not([data-type='music']) #page-header #nav-right #toggle-menu .hao-mobile-menu-trigger__text {
        font-size: 0.76rem;
        font-weight: 650;
        line-height: 1;
        letter-spacing: 0.06em;
        white-space: nowrap;
    }

    body.hao-mobile-menu-open[data-type]:not([data-type='music']) #page-header #nav-right #toggle-menu .hao-mobile-menu-trigger {
        border-color: rgba(99, 102, 241, 0.28);
        background: linear-gradient(135deg, rgba(224, 231, 255, 0.95), rgba(238, 242, 255, 0.8));
        box-shadow: 0 16px 30px rgba(67, 56, 202, 0.2);
    }

    body.hao-mobile-menu-open[data-type]:not([data-type='music']) #page-header #nav-right #toggle-menu .hao-mobile-menu-trigger__bar:nth-child(1) {
        width: 18px;
        transform: translateY(5px) rotate(45deg);
    }

    body.hao-mobile-menu-open[data-type]:not([data-type='music']) #page-header #nav-right #toggle-menu .hao-mobile-menu-trigger__bar:nth-child(2) {
        width: 18px;
        opacity: 0;
        transform: scaleX(0.15);
    }

    body.hao-mobile-menu-open[data-type]:not([data-type='music']) #page-header #nav-right #toggle-menu .hao-mobile-menu-trigger__bar:nth-child(3) {
        width: 18px;
        transform: translateY(-5px) rotate(-45deg);
    }

    body.hao-mobile-menu-open[data-type]:not([data-type='music']) #page-header #nav-right #toggle-menu .hao-mobile-menu-trigger__text {
        letter-spacing: 0.12em;
    }
}

@media screen and (min-width: 1101px) and (max-width: 1280px) {
    :root {
        --hao-site-sidebar-shell-width: 224px;
        --hao-site-sidebar-shell-collapsed-width: 78px;
    }

    body[data-type]:not([data-type='music']) #hao-site-sidebar-desktop {
        width: calc(var(--hao-site-sidebar-shell-width) - 20px);
        top: 16px;
        left: 16px;
        bottom: 16px;
    }

    body[data-type]:not([data-type='music']) #page-header #nav {
        left: calc(var(--hao-site-sidebar-shell-width) + 10px);
        right: 12px;
    }

    body[data-type]:not([data-type='music']) .page {
        width: calc(100% - var(--hao-site-sidebar-shell-width));
        margin-left: var(--hao-site-sidebar-shell-width);
    }

    body[data-type='index'] .layout#content-inner > #recent-posts {
        width: calc(100% - 300px);
    }

    body[data-type='index'] .layout#content-inner > #aside-content {
        width: 280px;
        padding-left: 16px;
    }
}

@media screen and (max-width: 768px) {
    body[data-type]:not([data-type='music']) #page-header #nav-right #toggle-menu {
        display: none !important;
    }

    #page-header.nav-fixed #randomPost_button {
        opacity: 1 !important;
        visibility: visible !important;
        transform: none !important;
    }

    body[data-type]:not([data-type='music']) #page-header #nav-right #toggle-menu .hao-mobile-menu-trigger {
        min-width: 44px;
        width: 44px;
        padding: 0;
        gap: 0;
    }

    body[data-type]:not([data-type='music']) #page-header #nav-right #toggle-menu .hao-mobile-menu-trigger__text {
        display: none;
    }
}

[data-theme='dark'] {
    --hao-site-sidebar-border-color: rgba(255, 255, 255, 0.055);
    --hao-site-sidebar-soft-bg: rgba(255, 255, 255, 0.04);
    --hao-site-sidebar-soft-bg-strong: rgba(255, 255, 255, 0.055);
    --hao-site-sidebar-muted: rgba(161, 162, 184, 0.76);
    --hao-site-sidebar-title: rgba(247, 247, 250, 0.78);
    --hao-site-sidebar-title-strong: rgba(247, 247, 250, 0.96);
    --hao-site-sidebar-subtle: rgba(161, 162, 184, 0.58);
    --hao-site-sidebar-icon: rgba(161, 162, 184, 0.72);
    --hao-site-sidebar-surface: rgba(29, 30, 34, 0.62);
    --hao-site-sidebar-surface-strong: rgba(29, 30, 34, 0.76);
    --hao-site-sidebar-panel-bg: rgba(24, 23, 29, 0.26);
    --hao-site-sidebar-pill-bg: rgba(255, 255, 255, 0.035);
    --hao-site-sidebar-accent-bg: rgba(255, 255, 255, 0.05);
    --hao-site-sidebar-accent-border: rgba(255, 255, 255, 0.07);
    --hao-site-sidebar-active-bg: rgba(255, 255, 255, 0.06);
    --hao-site-sidebar-active-color: rgba(247, 247, 250, 0.95);
    --hao-site-sidebar-active-icon: rgba(247, 247, 250, 0.84);
    --hao-site-sidebar-shadow: none;
    --hao-site-sidebar-icon-shadow: none;
    --hao-site-sidebar-elevation: none;
}

@media screen and (max-width: 1280px) {
    [data-theme='dark'] body[data-type]:not([data-type='music']) #page-header #nav-right #toggle-menu .hao-mobile-menu-trigger {
        border-color: rgba(129, 140, 248, 0.28);
        background: linear-gradient(135deg, rgba(30, 41, 59, 0.92), rgba(17, 24, 39, 0.86));
        box-shadow: 0 12px 24px rgba(2, 6, 23, 0.42);
        color: rgba(247, 247, 250, 0.92) !important;
    }

    [data-theme='dark'] body.hao-mobile-menu-open[data-type]:not([data-type='music']) #page-header #nav-right #toggle-menu .hao-mobile-menu-trigger {
        border-color: rgba(129, 140, 248, 0.4);
        background: linear-gradient(135deg, rgba(49, 46, 129, 0.92), rgba(30, 41, 59, 0.86));
        box-shadow: 0 16px 30px rgba(67, 56, 202, 0.34);
    }
}

/* Home feed: tablet portrait and small laptop keep two-card rhythm */
@media screen and (min-width: 769px) and (max-width: 1299px) {
    body[data-type='index'] #recent-posts {
        display: flex;
        flex-wrap: wrap;
        align-items: flex-start;
        align-content: flex-start;
        justify-content: space-between;
        gap: 12px;
    }

    body[data-type='index'] #recent-posts > .recent-post-item:not(.ads-wrap) {
        width: calc(50% - 6px);
        margin: 0 !important;
        min-height: 0;
        height: auto !important;
        flex-direction: column !important;
        overflow: hidden;
    }

    body[data-type='index'] #recent-posts > .recent-post-item:not(.ads-wrap) .post_cover {
        width: 100% !important;
        height: clamp(170px, 22vw, 240px);
    }

    body[data-type='index'] #recent-posts > .recent-post-item:not(.ads-wrap) > .recent-post-info {
        width: 100% !important;
        padding: 14px 16px 16px !important;
    }
}

@media screen and (min-width: 769px) and (max-width: 940px) {
    body[data-type='index'] #recent-posts > .recent-post-item:not(.ads-wrap) > .recent-post-info > .article-title {
        font-size: 1.1rem;
        line-height: 1.36;
    }
}

/* Desktop home aside should scroll with page, not sticky-fixed */
@media screen and (min-width: 900px) {
    body[data-type='index'] #aside-content .sticky_layout {
        position: static !important;
        top: auto !important;
    }
}
