
        /* --- 全局与重置 --- */
        body {
            margin: 0;
            padding: 0;
            font-family: 'Segoe UI', Arial, sans-serif;
            background-color: #f4f5f7;
            color: #333;
            height: 100vh;
            display: flex;
            flex-direction: column;
            overflow: hidden; /* app-shell：页面整体不滚，只让中间列滚 */
        }

        /* --- 顶部导航栏 --- */
        .top-nav {
            background-color: #2F7C81;
            height: 64px;
            box-shadow: 0 2px 8px rgba(0,0,0,0.15);
            z-index: 100;
            flex-shrink: 0;
            width: 100%;
        }

        .nav-content-container {
            max-width: 1600px;
            margin: 0 auto;
            height: 100%;
            display: grid;
            grid-template-columns: minmax(180px, 1fr) minmax(600px, 3fr) minmax(200px, 1fr);
            gap: 20px;
            align-items: center;
            padding: 0 20px;
            box-sizing: border-box;
        }

        .logo {
            grid-column: 2;
            grid-row: 1;
            justify-self: start;
            font-size: 24px;
            font-weight: bold;
            color: white;
            letter-spacing: 1px;
            min-width: 70px;
        }

        .nav-menu {
            grid-column: 2;
            grid-row: 1;
            justify-self: center;
            display: flex;
            height: 100%;
            align-items: center;
        }

        .nav-item {
            position: relative;
            height: 100%;
            display: flex;
            align-items: center;
            padding: 0 20px;
            color: rgba(255,255,255,0.95);
            cursor: pointer;
            transition: background 0.3s;
            font-size: 16px;
            font-weight: 500;
            white-space: nowrap;
        }
        .nav-item:hover { background-color: rgba(255,255,255,0.1); color: white; }
        .nav-item.active { background-color: rgba(0,0,0,0.1); border-bottom: 4px solid #82c4c9; color: white; }

        .nav-separator { width: 1px; height: 24px; background-color: rgba(255,255,255,0.4); margin: 0 5px; }

        /* 下拉菜单 */
        .dropdown-menu {
            display: none;
            position: absolute;
            top: 64px;
            left: 50%;
            transform: translateX(-50%);
            background-color: white;
            min-width: 160px;
            box-shadow: 0 4px 12px rgba(0,0,0,0.15);
            border-radius: 0 0 4px 4px;
            z-index: 200;
            text-align: center;
        }

        .nav-item:hover .dropdown-menu { display: block; }

        .dropdown-menu a {
            display: block;
            padding: 12px 20px;
            color: #333;
            text-decoration: none;
            font-size: 14px;
            border-bottom: 1px solid #eee;
            transition: background 0.2s;
        }
        .dropdown-menu a:hover { background-color: #f0f7f8; color: #2F7C81; }
        .dropdown-menu a:last-child { border-bottom: none; }

        .nav-right {
            grid-column: 2;
            grid-row: 1;
            justify-self: end;
            margin-left: 0;
            display: flex;
            align-items: center;
            height: 100%;
            min-width: 0;
            justify-content: flex-end;
        }
        .nav-user { max-width: 180px; min-width: 0; box-sizing: border-box; }
        .nav-avatar { width: 28px; height: 28px; border-radius: 50%; margin-right: 8px; border: 2px solid rgba(255,255,255,0.5); object-fit: cover; flex: 0 0 auto; }
        .nav-nickname { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
        .user-dropdown { left: auto; right: 0; transform: none; }

        /* --- 布局 & 内容 --- */
        .main-layout {
            display: flex;
            flex: 1;           /* 撑满 body 剩余高度（100vh - 64px 导航） */
            min-height: 0;     /* ★ 关键：让 flex 子项可以收缩到容器高度以内 */
            max-width: 1600px;
            margin: 20px auto;
            width: 100%;
            gap: 20px;
            padding: 0 20px;
            box-sizing: border-box;
            overflow: hidden;  /* 裁掉左右栏溢出，中间列自己管滚动 */
            align-items: flex-start;
        }
        .col-left { flex: 1; display: flex; flex-direction: column; gap: 12px; min-width: 180px; }
        .col-left .card { margin: 0; }
        .col-left #ad-container { padding: 0; overflow: hidden; line-height: 0; }
        .col-left #ad-container > * { margin: 0 !important; padding: 0 !important; max-width: 100%; }
        .col-left #ad-container .ad-empty { padding: 20px !important; line-height: normal; }
        .col-center {
            flex: 3;
            display: flex;
            flex-direction: column;
            background: white;
            border-radius: 8px;
            box-shadow: 0 2px 4px rgba(0,0,0,0.05);
            padding: 30px;
            box-sizing: border-box; /* ★ padding 计入 height，不额外撑高 */
            overflow-y: auto;       /* ★ 只有这一列内部滚动 */
            min-height: 0;          /* ★ 关键：允许 flex 子项在父级限定高度内收缩 */
            height: calc(100vh - 104px); /* 64px 导航 + 20px 上边距 + 20px 下边距 */
            min-width: 600px;
        }
        .col-right { flex: 1; display: flex; flex-direction: column; min-width: 200px; }

        .card { background: white; border-radius: 8px; padding: 20px; box-shadow: 0 2px 4px rgba(0,0,0,0.05); }

        .card.no-padding {
            padding: 0;
            overflow: hidden;
            display: block;
            background: white;
            box-shadow: 0 2px 4px rgba(0,0,0,0.05);
        }

        .user-avatar { width: 70px; height: 70px; border-radius: 50%; border: 3px solid #f0f7f8; display: block; margin: 0 auto 10px; }
        .qr-code { width: 100%; max-width: 160px; margin: 10px auto; display: block; }
        .service-box { text-align: center; }

        .section-header {
            margin-bottom: 18px;
            border-bottom: 1px solid #f0f0f0;
            padding-bottom: 12px;}
        .section-title { font-size: 24px; font-weight: 600; color: #2c3e50; margin: 0; }
        .section-desc { font-size: 16px; color: #95a5a6; margin-top: 5px; }

        .sets-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 15px; padding-top: 10px; }

        /* Set Card */
        .set-card {
            display: flex;
            flex-direction: row;
            align-items: center;
            justify-content: center;
            height: 46px;
            background: #f9fbfb;
            border: 1px solid #eef2f3;
            border-radius: 8px;
            cursor: pointer;
            transition: all 0.2s;
            text-decoration: none;
            position: relative;
            overflow: hidden;
            padding: 0 10px;
        }

        .version-section { margin-bottom: 14px; }
        .version-label {
            font-size: 14px; font-weight: 700;
            padding: 4px 12px; border-radius: 5px; display: inline-block;
            margin-bottom: 8px; color: white;
        }
        .exam-label     { background: #f97316; }
        .practice-label { background: #2563eb; }
        .mock-label     { background: #dc2626; }
        .set-card:hover { transform: translateY(-2px); box-shadow: 0 4px 10px rgba(47,124,129,0.1); border-color: #bce0e2; }
        .set-card::before { content: ''; position: absolute; top: 0; left: 0; width: 4px; height: 100%; background: #2F7C81; opacity: 0.5; }
        .set-num { font-size: 14px; font-weight: 700; color: #2F7C81; text-align: center; }

        #ad-container img { width: 100%; height: auto; display: block; margin: 0 !important; border-radius: 8px; }

        .version-heading {
            display: flex;
            align-items: center;
            gap: 8px;
            margin-bottom: 10px;
            flex-wrap: wrap;
        }
        
        .version-heading .version-label {
            margin-bottom: 0;
        }
        
        .version-note {
            font-size: 14px;
            color: #6b7280;
            font-weight: 500;
        }

        /* --- 弹窗样式 --- */
        .modal-overlay {
            display: none;
            position: fixed;
            top: 0; left: 0;
            width: 100%; height: 100%;
            background-color: rgba(0, 0, 0, 0.6);
            z-index: 1000;
            justify-content: center;
            align-items: center;
        }
        .modal-content {
            background-color: white;
            padding: 30px;
            border-radius: 12px;
            box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
            text-align: center;
            position: relative;
            width: 400px;
            max-width: 90%;
        }
        .close-btn {
            position: absolute;
            top: 10px; right: 15px;
            font-size: 24px;
            cursor: pointer;
            color: #aaa;
            line-height: 1;
        }
        .close-btn:hover { color: #333; }
        #wx_login_container { margin-top: 20px; height: 400px; }

        /* 验证码弹窗 */
        #gate-modal .modal-content { width: 420px; }
        .gate-input {
            width: 100%;
            margin-top: 16px;
            padding: 12px 14px;
            font-size: 16px;
            border: 1px solid #e3e7ea;
            border-radius: 10px;
            outline: none;
            box-sizing: border-box;
            text-align: center;
            letter-spacing: 2px;
        }
        .gate-input:focus { border-color: #2F7C81; box-shadow: 0 0 0 3px rgba(47,124,129,0.12); }
        .gate-actions {
            display: flex;
            gap: 10px;
            margin-top: 14px;
        }
        .gate-btn {
            flex: 1;
            padding: 12px 10px;
            border-radius: 10px;
            border: 1px solid #e3e7ea;
            cursor: pointer;
            font-size: 14px;
            background: #fff;
        }
        .gate-btn.primary {
            background: #2F7C81;
            color: #fff;
            border-color: #2F7C81;
        }
        .gate-btn.primary:hover { filter: brightness(0.98); }
        .gate-hint {
            margin-top: 10px;
            font-size: 13px;
            color: #888;
        }
        .gate-error {
            margin-top: 10px;
            font-size: 13px;
            color: #d93025;
            display: none;
            animation: shake 0.3s;
        }
        @keyframes shake {
            0% { transform: translateX(0); }
            25% { transform: translateX(-5px); }
            75% { transform: translateX(5px); }
            100% { transform: translateX(0); }
        }
        @keyframes spin {
            from { transform: rotate(0deg); }
            to   { transform: rotate(360deg); }
        }

        /* ====== 实考版折叠手风琴样式 ====== */

        /* 年份标题行 */
        .exam-year-header {
            display: flex;
            align-items: center;
            gap: 8px;
            padding: 8px 12px;
            background: #f0f7f8;
            border: 1px solid #d8eeef;
            border-radius: 7px;
            cursor: pointer;
            user-select: none;
            margin-bottom: 6px;
            transition: background 0.15s;
        }
        .exam-year-header:hover { background: #e4f1f2; }
        .exam-year-header .year-text {
            font-size: 15px;
            font-weight: 700;
            color: #2F7C81;
            flex: 1;
        }
        .exam-year-header .year-arrow {
            font-size: 14px;
            color: #2F7C81;
            transition: transform 0.2s;
            flex-shrink: 0;
        }
        .exam-year-header.collapsed .year-arrow { transform: rotate(-90deg); }

        /* 年份内容区 */
        .exam-year-body {
            padding-left: 8px;
            overflow: hidden;
            transition: max-height 0.25s ease;
        }
        .exam-year-body.collapsed { max-height: 0 !important; }

        /* 月份标题行 */
        .exam-month-header {
            display: flex;
            align-items: center;
            gap: 8px;
            padding: 7px 10px;
            background: #fafafa;
            border: 1px solid #ececec;
            border-radius: 6px;
            cursor: pointer;
            user-select: none;
            margin-bottom: 4px;
            margin-top: 2px;
            transition: background 0.15s;
        }
        .exam-month-header:hover { background: #f0f7f8; border-color: #c8e6e8; }
        .exam-month-header .month-text {
            font-size: 14px;
            font-weight: 600;
            color: #374151;
            flex: 1;
        }
        .exam-month-header .month-count {
            font-size: 14px;
            color: #9ca3af;
            font-weight: 400;
        }
        .exam-month-header .month-arrow {
            font-size: 14px;
            color: #9ca3af;
            transition: transform 0.2s;
            flex-shrink: 0;
        }
        .exam-month-header.collapsed .month-arrow { transform: rotate(-90deg); }

        /* 最新标签 */
        .latest-badge {
            display: inline-block;
            font-size: 14px;
            font-weight: 700;
            color: #fff;
            background: #f97316;
            padding: 1px 7px;
            border-radius: 10px;
            line-height: 18px;
            flex-shrink: 0;
        }

        /* 月份内容区 */
        .exam-month-body {
            overflow: hidden;
            transition: max-height 0.25s ease;
            padding-left: 4px;
        }
        .exam-month-body.collapsed { max-height: 0 !important; }

        /* 单年份时不显示年份层 */
        .exam-single-year .exam-year-header { display: none; }
        .exam-single-year .exam-year-body {
            padding-left: 0;
            max-height: none !important;
        }
        .exam-single-year .exam-year-body.collapsed { max-height: none !important; }

        /* ====== AI备考顾问小五 ====== */
        .advisor-msg { max-width:90%;padding:8px 12px;border-radius:12px;font-size:13px;line-height:1.6;word-break:break-word; }
        .advisor-msg-bot { background:#f0fafa;color:#333;align-self:flex-start;border-bottom-left-radius:4px; }
        .advisor-msg-user { background:#2F7C81;color:white;align-self:flex-end;border-bottom-right-radius:4px; }
        .advisor-msg-loading { background:#f0fafa;color:#999;align-self:flex-start;font-style:italic; }

        /* 移动端窄屏适配 */
        @media (max-width: 700px) {
            .exam-year-header .year-text { font-size: 14px; }
            .exam-month-header .month-text { font-size: 14px; }
            .exam-month-header .month-count { font-size: 14px; }
        }

        @media (min-width: 981px) and (max-width: 1599px) {
            .nav-menu { transform: translateX(-40px); }
            .nav-menu > .nav-item { padding: 0 16px; }
            .nav-user { max-width: 160px; }
        }

        @media (max-width: 980px) {
            .nav-content-container { display: flex; gap: 0; }
            .logo, .nav-menu, .nav-right { grid-column: auto; grid-row: auto; }
            .nav-menu { overflow-x: auto; }
            .nav-right { margin-left: auto; flex-shrink: 0; }
        }

        /* ====== 70/30 双栏布局（实考版 + 备考版并列） ====== */
        .sets-split {
            display: flex;
            gap: 20px;
            align-items: flex-start;
            width: 100%;
        }
        .sets-split-exam {
            flex: 7;          /* 70% */
            min-width: 0;
        }
        .sets-split-practice {
            flex: 3;          /* 30% */
            min-width: 180px;
            border-left: 1px solid #f0f0f0;
            padding-left: 20px;
        }

        /* 备考版竖排按钮 */
        .practice-list {
            display: flex;
            flex-direction: column;
            gap: 8px;
            padding-top: 10px;
        }
        .practice-list .set-card {
            width: 100%;
            height: 42px;
            box-sizing: border-box;
        }

        /* 实考版套题按钮：紧凑型，只显示「A套」 */
        .exam-card-compact {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            height: 38px;
            background: #f9fbfb;
            border: 1px solid #eef2f3;
            border-radius: 8px;
            cursor: pointer;
            transition: all 0.2s;
            text-decoration: none;
            position: relative;
            overflow: hidden;
            padding: 0 8px;
            min-width: 54px;
        }
        .exam-card-compact::before {
            content: '';
            position: absolute;
            top: 0; left: 0;
            width: 4px; height: 100%;
            background: #2F7C81;
            opacity: 0.5;
        }
        .exam-card-compact:hover {
            transform: translateY(-2px);
            box-shadow: 0 4px 10px rgba(47,124,129,0.1);
            border-color: #bce0e2;
        }
        .exam-card-compact .set-num {
            font-size: 14px;
            font-weight: 700;
            color: #2F7C81;
        }

        /* 实考版套题网格：4个一行，间距收紧 */
        .exam-sets-grid {
            display: grid;
            grid-template-columns: repeat(4, 1fr);
            gap: 8px;
            padding-top: 8px;
            margin-bottom: 10px;
        }

        /* 小屏（<1100px）：双栏变单栏上下堆叠 */
        @media (max-width: 1100px) {
            .sets-split {
                flex-direction: column;
            }
            .sets-split-practice {
                border-left: none;
                border-top: 1px solid #f0f0f0;
                padding-left: 0;
                padding-top: 16px;
                min-width: 0;
                width: 100%;
            }
            .practice-list {
                flex-direction: row;
                flex-wrap: wrap;
            }
            .practice-list .set-card {
                width: auto;
                flex: 0 0 calc(25% - 6px);
            }
            .exam-sets-grid {
                grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
            }
        }
    