/* ==========================================================================
   Sidebar & mobile nav — Mobile (max-width: 767px)
   ========================================================================== */

@media (max-width: 767px) {
    .sidebar {
        display: none;
    }

    .sidebar-backdrop {
        display: none;
        position: fixed;
        inset: 0;
        z-index: 39;
        background: rgba(0, 0, 0, 0.55);
    }

    .app.is-nav-open .sidebar-backdrop {
        display: block;
    }

    /* —— 移动端抽屉导航 212px —— */
    .mobile-nav {
        position: fixed;
        inset: 0;
        z-index: 40;
        pointer-events: none;
    }

    .app.is-nav-open .mobile-nav {
        pointer-events: auto;
    }

    .mobile-nav__panel {
        width: 212px;
        max-width: 88vw;
        height: 100dvh;
        padding: 60px 10px 18px;
        box-sizing: border-box;
        background: rgba(0, 0, 0, 0.8);
        -webkit-backdrop-filter: blur(6.5px);
        backdrop-filter: blur(6.5px);
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        transform: translateX(-100%);
        transition: transform 0.25s ease;
        overflow-y: auto;
    }

    .app.is-nav-open .mobile-nav__panel {
        transform: translateX(0);
    }

    .mobile-nav__head {
        position: relative;
        display: flex;
        align-items: flex-start;
        justify-content: space-between;
        width: 180px;
        margin-bottom: 32px;
        flex-shrink: 0;
    }

    .mobile-nav__title {
        flex: 1 1 0;
        min-width: 0;
        color: #eef0f8;
        font-size: 18px;
        font-family: "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
        font-weight: 600;
        line-height: 24px;
    }

    .mobile-nav__close {
        flex-shrink: 0;
        width: 24px;
        height: 24px;
        padding: 0;
        border: none;
        background: transparent;
        line-height: 0;
    }

    .mobile-nav__close-icon {
        display: block;
        width: 24px;
        height: 24px;
        object-fit: contain;
    }

    .mobile-nav__grid {
        display: flex;
        flex-direction: column;
        align-content: flex-start;
        gap: 12px;
        width: 180px;
    }

    .mobile-nav__group {
        width: 100%;
        display: flex;
        flex-direction: column;
        gap: 8px;
    }

    .mobile-nav__toggle {
        box-sizing: border-box;
        width: 100%;
        height: 40px;
        padding: 7px 14px;
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 8px;
        border: none;
        border-radius: 6px;
        background: rgba(255, 255, 255, 0.08);
        color: #a7acc2;
        font-size: 14px;
        font-family: "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
        font-weight: 400;
        line-height: 20px;
        text-align: left;
        cursor: pointer;
        transition: background 0.2s ease, color 0.2s ease;
    }

    .mobile-nav__toggle-text {
        flex: 1 1 0;
        min-width: 0;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .mobile-nav__toggle--active,
    .mobile-nav__item--open .mobile-nav__toggle {
        background: linear-gradient(90deg, rgba(138, 107, 255, 0.28) 0%, rgba(39, 215, 230, 0.14) 100%);
        color: #eef0f8;
    }

    .mobile-nav__chevron-wrap {
        flex-shrink: 0;
        width: 15px;
        height: 15px;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .mobile-nav__chevron {
        display: block;
        width: 11px;
        height: 11px;
        object-fit: contain;
        transition: transform 0.2s ease;
    }

    .mobile-nav__item--open .mobile-nav__chevron {
        transform: rotate(180deg);
    }

    .mobile-nav__sublist {
        display: flex;
        flex-direction: column;
        gap: 8px;
        padding-left: 12px;
    }

    .mobile-nav__sublist[hidden] {
        display: none;
    }

    .mobile-nav__chip {
        box-sizing: border-box;
        width: 100%;
        height: 40px;
        padding: 7px 14px;
        display: flex;
        align-items: center;
        justify-content: center;
        border-radius: 6px;
        background: rgba(255, 255, 255, 0.08);
        color: #a7acc2;
        font-size: 14px;
        font-family: "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
        font-weight: 400;
        line-height: 20px;
        text-align: center;
        white-space: nowrap;
        transition: background 0.2s ease, color 0.2s ease;
    }

    .mobile-nav__chip--active {
        background: linear-gradient(90deg, #8a6bff 0%, #26d7e6 100%);
        color: #eef0f8;
    }

    .mobile-nav__chip--sub {
        height: 36px;
        font-size: 13px;
        justify-content: flex-start;
        text-align: left;
    }
}
