/* 公共手机导航：所有使用默认布局的页面共享。 */
.mobile-nav-toggle {
    display: none;
}

/* 年级下拉只承载单个学段，使用紧凑宽度避免菜单留白。 */
.doc-header .grade-menu-panel {
    width: 420px;
}

@media (max-width: 768px) {
    .doc-header {
        position: relative;
        z-index: 999;
        min-width: 0;
        height: 64px;
        background: #fff;
        border-bottom: 1px solid #edf0f5;
        box-shadow: 0 2px 12px rgba(22, 34, 51, .08);
    }

    .doc-header .container {
        display: flex;
        width: calc(100% - 24px);
        min-width: 0;
        height: 100%;
        margin: 0 auto;
        align-items: center;
        justify-content: space-between;
    }

    .doc-header .container .jn-logo {
        display: flex;
        height: 64px;
        align-items: center;
    }

    .doc-header .container .jn-logo a,
    .doc-header .container .jn-logo a img {
        display: block;
        max-width: 210px;
        height: auto;
    }

    .mobile-nav-toggle {
        display: flex;
        width: 42px;
        height: 42px;
        padding: 10px;
        border: 1px solid #dfe4eb;
        border-radius: 10px;
        flex-direction: column;
        justify-content: space-around;
        background: #f7f8fa;
        cursor: pointer;
    }

    .mobile-nav-toggle span {
        display: block;
        width: 100%;
        height: 2px;
        border-radius: 2px;
        background: #273142;
        transition: transform .2s, opacity .2s;
    }

    .mobile-nav-toggle.is-open span:nth-child(1) {
        transform: translateY(7px) rotate(45deg);
    }

    .mobile-nav-toggle.is-open span:nth-child(2) {
        opacity: 0;
    }

    .mobile-nav-toggle.is-open span:nth-child(3) {
        transform: translateY(-7px) rotate(-45deg);
    }

    .doc-header .container .jn-nav {
        position: absolute;
        top: 64px;
        right: 0;
        left: 0;
        display: none;
        overflow: hidden;
        width: 100%;
        height: auto;
        margin: 0;
        padding: 8px 12px 12px;
        border-radius: 0 0 14px 14px;
        background: #fff;
        box-shadow: 0 14px 24px rgba(26, 39, 58, .16);
        box-sizing: border-box;
        white-space: normal;
    }

    .doc-header .container .jn-nav.is-open {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 6px;
    }

    .doc-header .container .jn-nav > li {
        float: none;
        width: auto;
        height: 42px;
    }

    .doc-header .container .jn-nav > li > a,
    .doc-header .container .jn-nav > li > a.active,
    .doc-header .container .jn-nav > li:hover > a {
        display: block;
        height: 42px;
        padding: 0 12px;
        border-radius: 8px;
        color: #273142;
        line-height: 42px;
        background: #f6f7f9;
    }

    .doc-header .nav-drop,
    .doc-header .flag_icon,
    .doc-header .header-right {
        display: none !important;
    }
}
