  :root {
    --primary: #B3643A;
    --primary-light: #C47E53;
    --primary-bg: #EFE0D3;
    --bg: #FAF6EF;
    --card: #FFFDF8;
    --border: #E5DDCC;
    --text: #2B2A26;
    --text-secondary: #6E6A60;
    --success: #16a34a;
    --warning: #d97706;
    --danger: #dc2626;
    --radius: 6px;
    --shadow: 0 1px 3px rgba(0,0,0,0.08), 0 1px 2px rgba(0,0,0,0.06);
    --shadow-lg: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -1px rgba(0,0,0,0.06);
  }
  * { box-sizing: border-box; margin: 0; padding: 0; }
  body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "PingFang SC", "Microsoft YaHei", sans-serif;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
  }
  .header {
    background: linear-gradient(135deg, #2B2A26, #3F3B33);
    color: white;
    padding: 20px 16px;
    text-align: center;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow-lg);
  }
  .header h1 { font-size: 20px; font-weight: 700; letter-spacing: 1px; }
  .header p { font-size: 12px; opacity: 0.85; margin-top: 4px; line-height: 1.4; }
  .container { max-width: 1200px; margin: 0 auto; padding: 12px; }
  /* ===== Home Page Cards ===== */
  .home-page { display: block; }
  .home-page.hidden { display: none; }
  .detail-page { display: none; }
  .detail-page.active { display: block; }
  .home-cards {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    padding: 4px 0;
  }
  .home-card {
    background: var(--card);
    border-radius: 16px;
    padding: 24px 16px;
    text-align: center;
    cursor: pointer;
    transition: transform 0.15s, box-shadow 0.15s;
    box-shadow: var(--shadow);
    border: 1.5px solid transparent;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
  }
  .home-card:active {
    transform: scale(0.96);
    box-shadow: var(--shadow-lg);
  }
  .home-card:hover {
    border-color: var(--primary);
    box-shadow: var(--shadow-lg);
  }
  .home-card .card-icon {
    font-size: 36px;
    margin-bottom: 10px;
    display: block;
  }
  .home-card .card-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 4px;
  }
  .home-card .card-desc {
    font-size: 11px;
    color: var(--text-secondary);
    line-height: 1.3;
  }
  .home-card:nth-child(n+5) {
    grid-column: 1 / -1;
  }
  .predict-type-opt.active {
    border-color: var(--primary) !important;
    background: var(--primary-bg) !important;
    box-shadow: 0 0 0 2px rgba(37,99,235,0.15);
  }
  .predict-area-opt.active, .predict-sctype-opt.active {
    border-color: var(--primary) !important;
    background: var(--primary-bg) !important;
    color: var(--primary) !important;
    box-shadow: 0 0 0 2px rgba(37,99,235,0.15);
  }
  .predict-area-opt:not(.active):hover, .predict-sctype-opt:not(.active):hover {
    background: #f1f5f9 !important;
  }
  /* ===== Detail Page ===== */
  .detail-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 0;
    margin-bottom: 8px;
  }
  .back-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: none;
    background: var(--card);
    box-shadow: var(--shadow);
    cursor: pointer;
    transition: transform 0.1s;
    -webkit-tap-highlight-color: transparent;
    flex-shrink: 0;
  }
  .back-btn:active { transform: scale(0.9); }
  .back-btn svg { width: 20px; height: 20px; }
  .detail-title {
    font-size: 17px;
    font-weight: 700;
    color: var(--text);
  }
  /* Tabs */
  .tabs {
    display: flex; gap: 4px;
    background: var(--card);
    border-radius: var(--radius);
    padding: 4px;
    margin-bottom: 12px;
    box-shadow: var(--shadow);
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .tabs::-webkit-scrollbar { display: none; }
  .tab {
    flex-shrink: 0; padding: 10px 16px; text-align: center;
    border: none; background: transparent; border-radius: 8px;
    font-size: 14px; font-weight: 500; color: var(--text-secondary);
    cursor: pointer; transition: transform 0.1s, opacity 0.1s;
    white-space: nowrap;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
  }
  .tab:active { transform: scale(0.94); opacity: 0.8; }
  .tab:hover { color: var(--primary); background: var(--primary-bg); }
  .tab:active { transform: scale(0.95); opacity: 0.85; }
  .tab:hover { color: var(--primary); }
  .tab.active {
    background: var(--primary); color: white;
    box-shadow: 0 2px 8px rgba(37,99,235,0.3);
  }
  /* Filters - Redesigned */
  .filters {
    background: var(--card);
    border-radius: var(--radius);
    padding: 16px;
    margin-bottom: 12px;
    box-shadow: var(--shadow);
  }
  .filter-section { margin-bottom: 14px; }
  .filter-section:last-child { margin-bottom: 0; }
  .filter-label {
    display: flex; align-items: center; gap: 6px;
    font-size: 13px; font-weight: 600; color: var(--text);
    margin-bottom: 8px;
  }
  .filter-label .icon { font-size: 15px; }
  .filter-group {
    display: flex; flex-direction: column;
    width: 100%;
  }
  .filter-group select, .filter-group input[type="text"] {
    width: 100%; padding: 11px 12px; border: 1.5px solid var(--border);
    border-radius: 10px; font-size: 15px;
    background: white; color: var(--text);
    outline: none; transition: all 0.2s;
    box-sizing: border-box;
  }

  /* ===== 主筛选区：桌面端横排（标签与控件同一行） ===== */
  #filters {
    display: flex; flex-wrap: wrap; align-items: flex-end; gap: 14px 18px;
  }
  #filters .filter-section { margin-bottom: 0; }
  #filters .filter-label {
    margin-bottom: 0; margin-right: 8px; white-space: nowrap; flex-shrink: 0;
  }
  #filters .filter-group { width: auto; flex-direction: row; align-items: center; flex: 1; }
  #filters .filter-group .autocomplete-wrap { width: 100%; }
  #filters .filter-group .hint-text { display: none; }
  #filters .filter-group select,
  #filters .filter-group input[type="text"],
  #filters .filter-group input[type="number"] { width: 100%; }
  /* 各字段宽度 */
  #filters > .filter-section:first-child { flex: 0 0 150px; } /* 所在区 */
  #filter-section-local { flex: 0 0 240px; }
  #middle-school-group { flex: 1 1 220px; min-width: 200px; }
  #filter-section-highschool { flex: 1 1 240px; min-width: 220px; }
  #filters > .filter-section:last-of-type { flex: 1 1 260px; min-width: 240px; } /* 年份 */
  #filters .filter-actions { flex: 0 0 auto; margin-top: 0; }
  /* 年份标签不与控件并排，按钮独占下方 */
  #filters > .filter-section:last-of-type {
    flex-direction: column; align-items: flex-start;
  }
  #filters > .filter-section:last-of-type .filter-label { margin-bottom: 8px; margin-right: 0; }
  /* “本区+类型”区块改为横排紧凑控件 */
  #filter-section-local { display: flex; flex-direction: column; gap: 8px; }
  #filter-section-local .local-toggle { padding: 9px 12px; }
  #filter-section-local .local-toggle .toggle-desc { display: none; }
  #filter-section-local .local-toggle .toggle-text { font-size: 13px; white-space: nowrap; }
  #filter-section-local > div:last-child { margin-top: 0 !important; }
  #filter-section-local > div:last-child select { min-width: 110px; }
  #filters .filter-actions .btn { padding: 10px 22px; }

  /* ===== 高考升学率 / 本科投档线 筛选行：横排 + 搜索框收窄 ===== */
  .filter-row {
    display: flex; flex-wrap: wrap; align-items: flex-end; gap: 14px 18px;
  }
  .filter-row .filter-group {
    flex: 0 0 auto; width: auto; flex-direction: column;
  }
  .filter-row .filter-group label {
    display: block; font-size: 13px; font-weight: 600; color: var(--text);
    margin-bottom: 8px; white-space: nowrap;
  }
  .filter-row .filter-group input,
  .filter-row .filter-group select {
    width: 240px; max-width: 100%;
    padding: 11px 12px; border: 1.5px solid var(--border); border-radius: 10px;
    font-size: 15px; background: white; color: var(--text); outline: none;
    box-sizing: border-box; transition: all 0.2s;
  }
  .filter-row .filter-group select {
    appearance: none; -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2364748b' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: right 12px center; padding-right: 36px;
  }
  .filter-row .filter-group input:focus,
  .filter-row .filter-group select:focus {
    border-color: var(--primary); box-shadow: 0 0 0 3px rgba(179,100,58,0.12);
  }
  /* 带 flex:1 内联的提示行/搜索组仍可弹性，但输入框本身封顶，避免过宽 */
  .filter-row .filter-group[style*="flex:1"] input { max-width: 300px; }
  .filter-row .filter-actions { margin-top: 0; }

  /* ===== 模拟填报推荐筛选区：桌面端横排 ===== */
  #predict-filters {
    display: flex; flex-wrap: wrap; align-items: flex-end; gap: 14px 18px;
  }
  #predict-filters .filter-section { margin-bottom: 0; flex: 0 0 auto; }
  #predict-filters .filter-label { margin-bottom: 8px; margin-right: 0; }
  #predict-filters .filter-group { width: auto; flex-direction: column; }
  #predict-filters #predict-district { width: 150px; }
  #predict-filters #predict-ms { width: 230px; }
  #predict-filters #predict-score { width: 190px; }
  #predict-filters #predict-district,
  #predict-filters #predict-ms,
  #predict-filters #predict-score {
    padding: 11px 12px; border: 1.5px solid var(--border); border-radius: 10px;
    font-size: 15px; background: white; color: var(--text); outline: none; box-sizing: border-box;
  }
  #predict-filters .filter-section:has(.local-toggle) { flex: 0 0 230px; }
  #predict-filters .local-toggle { padding: 9px 12px; }
  #predict-filters .local-toggle .toggle-desc { display: none; }
  #predict-filters .filter-actions { flex: 1 1 100%; margin-top: 4px; }
  #predict-filters .filter-actions .btn { flex: 1; max-width: 360px; }
  .filter-group select:focus, .filter-group input[type="text"]:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37,99,235,0.1);
  }
  .filter-group select {
    appearance: none; -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2364748b' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 36px;
  }
  .local-toggle {
    display: flex; align-items: center; gap: 10px;
    padding: 12px 14px; background: var(--primary-bg);
    border-radius: 10px; cursor: pointer;
    transition: background 0.15s;
  }
  .local-toggle:hover { background: #dbeafe; }
  .local-toggle input[type="checkbox"] {
    width: 20px; height: 20px; accent-color: var(--primary);
    flex-shrink: 0; margin: 0;
  }
  .local-toggle .toggle-text { font-size: 14px; color: var(--text); font-weight: 500; }
  .local-toggle .toggle-desc { font-size: 11px; color: var(--text-secondary); margin-top: 1px; }
  .year-buttons {
    display: flex; gap: 8px; flex-wrap: wrap;
  }
  .year-btn {
    padding: 8px 18px; border: 1.5px solid var(--border);
    border-radius: 20px; font-size: 14px; font-weight: 500;
    background: white; color: var(--text);
    cursor: pointer; transition: all 0.15s;
    user-select: none;
  }
  .year-btn:hover { border-color: var(--primary); color: var(--primary); }
  .year-btn.active {
    background: var(--primary); color: white;
    border-color: var(--primary);
    box-shadow: 0 2px 6px rgba(37,99,235,0.25);
  }
  .year-btn:active { transform: scale(0.94); opacity: 0.8; }
  .year-actions { display: flex; gap: 12px; margin-top: 8px; }
  .year-action-btn {
    font-size: 12px; color: var(--primary); cursor: pointer;
    background: none; border: none; font-weight: 500;
    padding: 2px 4px;
  }
  .year-action-btn:hover { text-decoration: underline; }
  .filter-actions {
    display: flex; gap: 10px; margin-top: 16px;
  }
  /* Autocomplete */
  .autocomplete-wrap { position: relative; }
  .autocomplete-list {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    max-height: 280px;
    overflow-y: auto;
    background: white;
    border: 1px solid var(--border);
    border-top: none;
    border-radius: 0 0 6px 6px;
    box-shadow: var(--shadow-lg);
    z-index: 50;
    display: none;
  }
  .autocomplete-list.show { display: block; }
  .autocomplete-item {
    padding: 8px 10px;
    font-size: 13px;
    cursor: pointer;
    border-bottom: 1px solid #f1f5f9;
  }
  .autocomplete-item:hover, .autocomplete-item.active {
    background: var(--primary-bg);
    color: var(--primary);
  }
  .autocomplete-item .sub {
    font-size: 11px;
    color: var(--text-secondary);
    margin-top: 2px;
  }
  /* Year buttons already defined above */
  .filter-actions {
    display: flex; gap: 10px; align-items: flex-end;
    flex-shrink: 0; padding-bottom: 2px;
  }
  .btn {
    padding: 9px 24px; border: none; border-radius: 8px;
    font-size: 14px; font-weight: 600;
    cursor: pointer; transition: all 0.2s;
    white-space: nowrap;
  }
  .btn:active { transform: scale(0.96); }
  .btn-primary { background: var(--primary); color: white; }
  .btn-primary:hover { background: #1d4ed8; }
  .btn-primary:active { background: #1e40af; transform: scale(0.96); }
  .btn-outline {
    background: transparent; border: 1px solid var(--border);
    color: var(--text-secondary);
  }
  .btn-outline:hover { background: var(--bg); border-color: var(--text-secondary); }
  .btn-outline:active { background: #e2e8f0; transform: scale(0.96); }
  /* Stats */
  .stats {
    display: flex; gap: 8px;
    margin-bottom: 12px; flex-wrap: wrap;
  }
  .stat-card {
    background: var(--card); border-radius: 8px;
    padding: 10px 14px; box-shadow: var(--shadow);
    flex: 1; min-width: 0; text-align: center;
  }
  .stat-card .num { font-size: 22px; font-weight: 700; color: var(--primary); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .stat-card .label { font-size: 11px; color: var(--text-secondary); margin-top: 2px; }
  /* Table */
  .table-wrap {
    background: var(--card); border-radius: var(--radius);
    overflow: hidden; box-shadow: var(--shadow);
  }
  .table-scroll { overflow-x: auto; max-height: 65vh; overflow-y: auto; }
  .table-scroll.card-mode { overflow: hidden; max-height: none; }
  table {
    width: 100%; border-collapse: collapse;
    font-size: 13px; white-space: nowrap;
  }
  thead { position: sticky; top: 0; z-index: 10; }
  th {
    background: #f1f5f9; padding: 10px 12px;
    text-align: left; font-weight: 600;
    color: var(--text-secondary); font-size: 12px;
    border-bottom: 2px solid var(--border);
    cursor: pointer; user-select: none;
  }
  th:hover { background: #e2e8f0; }
  th .sort-arrow { margin-left: 4px; opacity: 0.3; }
  th.sort-asc .sort-arrow, th.sort-desc .sort-arrow { opacity: 1; }
  th.sort-asc .sort-arrow::after { content: '↑'; }
  th.sort-desc .sort-arrow::after { content: '↓'; }
  td { padding: 8px 12px; border-bottom: 1px solid var(--border); }
  tr:hover td { background: var(--primary-bg); }
  tr.no-recent-enrollment td {
    background: #fef3c7 !important;
  }
  tr.no-recent-enrollment:hover td {
    background: #fde68a !important;
  }
  .score-flat { color: #94a3b8; }
  .score-cell { font-weight: 600; font-variant-numeric: tabular-nums; color: #000; }
  .quota-cell { font-weight: 600; color: #059669; background: #ecfdf5; padding: 2px 8px; border-radius: 10px; font-size: 12px; }
  .year-badge {
    display: inline-block; padding: 2px 6px; border-radius: 3px;
    font-size: 11px; font-weight: 600;
  }
  .year-2026 { background: #dbeafe; color: #1d4ed8; }
  .year-2025 { background: #d1fae5; color: #047857; }
  .year-2024 { background: #fef3c7; color: #b45309; }
  .year-2023 { background: #ede9fe; color: #6d28d9; }
  .year-2022 { background: #f1f5f9; color: #64748b; }
  .empty-state { text-align: center; padding: 60px 20px; color: var(--text-secondary); }
  .empty-state .icon { font-size: 48px; margin-bottom: 12px; }
  .empty-state p { font-size: 14px; }
  /* 志愿模拟填报推荐结果 */
  .mock-results { padding: 16px 0; }
  .mock-section { margin-bottom: 24px; border: 1px solid var(--border); border-radius: 12px; overflow: hidden; background: #fff; }
  .mock-section-header { display: flex; align-items: center; gap: 8px; padding: 14px 16px; background: #f8fafc; border-bottom: 1px solid var(--border); font-weight: 600; font-size: 15px; }
  .mock-section-icon { font-size: 20px; }
  .mock-section-title { flex: 1; }
  .mock-section-badge { font-size: 11px; padding: 2px 10px; border-radius: 10px; background: var(--primary); color: #fff; font-weight: 500; }
  .mock-section-badge.orange { background: #f59e0b; }
  .mock-section-badge.green { background: #16a34a; }
  .mock-school-card { display: flex; align-items: center; padding: 12px 16px; border-bottom: 1px solid #f1f5f9; transition: background 0.1s; }
  .mock-school-card:last-child { border-bottom: none; }
  .mock-school-card:hover { background: #f8fafc; }
  .mock-school-rank { width: 28px; font-size: 13px; font-weight: 600; color: var(--text-secondary); text-align: center; }
  .mock-school-info { flex: 1; min-width: 0; }
  .mock-school-name { font-size: 14px; font-weight: 600; color: #1e293b; }
  .mock-school-meta { font-size: 12px; color: var(--text-secondary); margin-top: 2px; display: flex; align-items: center; flex-wrap: wrap; gap: 4px; }
  .mock-quota-item { font-size: 11px; color: #059669; background: #ecfdf5; padding: 2px 6px; border-radius: 4px; font-weight: 600; }
  .mock-quota-no { font-size: 11px; color: #dc2626; background: #fef2f2; padding: 2px 6px; border-radius: 4px; }
  .quota-sep { font-size: 10px; color: #9ca3af; margin: 0 2px; }
  .mock-school-prob { width: 80px; text-align: center; }
  .mock-school-prob .prob-label { font-size: 10px; color: var(--text-secondary); font-weight: 400; line-height: 1.2; }
  .mock-school-prob .prob-value { font-weight: 700; font-size: 16px; line-height: 1.3; }
  .mock-school-gap { width: 70px; text-align: center; font-size: 13px; }
  .mock-school-scores { display: flex; gap: 6px; flex-wrap: wrap; }
  .mock-school-score { display: inline-flex; flex-direction: column; align-items: center; background: #f1f5f9; border-radius: 6px; padding: 3px 8px; }
  .mock-school-score .year { font-size: 10px; color: var(--text-secondary); }
  .mock-school-score .val { font-size: 13px; font-weight: 600; }
  .mock-school-score .val.high { color: #dc2626; }
  .mock-school-score .val.ok { color: #16a34a; }
  .mock-empty { text-align: center; padding: 32px; color: var(--text-secondary); font-size: 14px; }
  .mock-rec-label { font-size: 11px; padding: 2px 8px; border-radius: 8px; font-weight: 600; margin-left: 8px; }
  .mock-rec-label.chongci { background: #dbeafe; color: #1d4ed8; }
  .mock-rec-label.wentuo { background: #d1fae5; color: #15803d; }
  .mock-rec-label.baodi { background: #fef3c7; color: #92400e; }
  .mock-school-type { font-size: 11px; padding: 1px 8px; border-radius: 8px; font-weight: 500; background: #e8eaf6; color: #3949ab; margin-left: 6px; }
  /* 近年未有招生名额提示 */
  .no-recent-enrollment {
    background: #fef3c7 !important;
    border-left: 3px solid #f59e0b !important;
  }
  .no-recent-enrollment .mock-school-name {
    color: #92400e !important;
  }
  .no-recent-enrollment-warning {
    display: inline-block;
    font-size: 11px;
    color: #d97706;
    background: #fef3c7;
    padding: 2px 6px;
    border-radius: 4px;
    margin-left: 4px;
    font-weight: 600;
    border: 1px solid #f59e0b;
  }
  @media (max-width: 640px) {
    .mock-school-card { flex-wrap: wrap; gap: 6px; padding: 10px 12px; }
    .mock-school-rank { width: 22px; }
    .mock-school-prob { width: 65px; }
    .mock-school-prob .prob-value { font-size: 14px; }
    .mock-school-gap { width: 60px; font-size: 12px; }
    .mock-school-scores { gap: 4px; }
    .mock-school-score { padding: 2px 6px; }
    .mock-school-score .val { font-size: 12px; }
  }
  .loading { text-align: center; padding: 60px 20px; }
  .spinner {
    width: 40px; height: 40px;
    border: 3px solid var(--border);
    border-top: 3px solid var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 0 auto 12px;
  }
  @keyframes spin { to { transform: rotate(360deg); } }
  .hint-text { font-size: 11px; color: var(--text-secondary); margin-top: 2px; }
  @media (max-width: 640px) {
    .header { padding: 14px 12px; }
    .header h1 { font-size: 16px; }
    .header p { font-size: 11px; }
    .container { padding: 8px; }
    .filters { padding: 12px; }
    .filter-group select, .filter-group input[type="text"] { font-size: 16px; padding: 13px 14px; }
    .filter-actions { flex-direction: column; gap: 8px; }
    .filter-actions .btn { width: 100%; text-align: center; padding: 14px 16px; font-size: 16px; }
    /* 手机端主筛选区恢复纵排 */
    #filters { flex-direction: column; align-items: stretch; gap: 12px; }
    #filters .filter-section,
    #filters > .filter-section:first-child,
    #filter-section-local,
    #middle-school-group,
    #filter-section-highschool,
    #filters > .filter-section:last-of-type { flex: 1 1 auto; min-width: 0; }
    #filters .filter-label { margin-bottom: 8px; margin-right: 0; }
    #filters .filter-group { flex-direction: column; align-items: stretch; }
    #filters .filter-group .hint-text { display: block; }
    #filters .filter-actions { width: 100%; }
    #filters .filter-actions .btn { width: 100%; }
    #filter-section-local .local-toggle .toggle-desc { display: block; }
    /* 高考升学率 / 本科投档线 / 模拟填报 筛选区手机端纵排 */
    .filter-row { flex-direction: column; align-items: stretch; gap: 12px; }
    .filter-row .filter-group { width: 100%; }
    .filter-row .filter-group input,
    .filter-row .filter-group select { width: 100%; max-width: 100%; }
    #predict-filters { flex-direction: column; align-items: stretch; gap: 12px; }
    #predict-filters #predict-district,
    #predict-filters #predict-ms,
    #predict-filters #predict-score { width: 100%; font-size: 16px; padding: 13px 14px; }
    #predict-filters .filter-section:has(.local-toggle) { flex: 1 1 auto; }
    #predict-filters .local-toggle .toggle-desc { display: block; }
    #predict-filters .filter-actions .btn { max-width: none; }
    .year-buttons { gap: 6px; }
    .year-btn { padding: 10px 16px; font-size: 15px; flex: 1; min-width: 0; text-align: center; }
    .stat-card .num { font-size: 16px; }
    .stat-card { padding: 8px 6px; }
    .tab { font-size: 13px; padding: 10px 14px; flex-shrink: 0; }
    /* 手机端卡片模式 */
    .table-scroll { overflow: hidden; }
    .table-scroll.card-mode thead { display: none; }
    .table-scroll.card-mode table { white-space: normal; }
    .table-scroll.card-mode td { padding: 0; border: none; background: transparent !important; }
    .table-scroll.card-mode tr { border: none; }
    .card-list { display: flex; flex-direction: column; gap: 6px; padding: 4px 0; }
    .card-item {
      background: white; border-radius: 10px;
      border: 1px solid var(--border);
      padding: 10px 12px;
      box-shadow: 0 1px 2px rgba(0,0,0,0.04);
    }
    .no-recent-enrollment.card-item {
      background: #fef3c7 !important;
      border-left: 3px solid #f59e0b !important;
    }
    .no-recent-enrollment.card-item .card-school {
      color: #92400e !important;
    }
    .card-header {
      display: flex; justify-content: space-between; align-items: flex-start;
      margin-bottom: 6px;
    }
    .card-school { font-size: 14px; font-weight: 600; color: var(--text); flex: 1; line-height: 1.3; }
    .card-badge {
      font-size: 10px; padding: 2px 6px; border-radius: 4px;
      font-weight: 600; white-space: nowrap; margin-left: 6px;
    }
    .card-meta {
      display: flex; gap: 8px; font-size: 11px; color: var(--text-secondary);
      margin-bottom: 6px; flex-wrap: wrap;
    }
    .card-meta span { white-space: nowrap; }
    .card-scores {
      display: flex; gap: 4px; flex-wrap: wrap;
    }
    .card-score-item {
      display: flex; flex-direction: column; align-items: center;
      min-width: 52px; padding: 4px 6px;
      background: #f8fafc; border-radius: 6px;
    }
    .card-score-year { font-size: 10px; color: var(--text-secondary); }
    .card-score-val { font-size: 14px; font-weight: 700; color: var(--primary); }
    .card-score-val.flat { color: #94a3b8; }
    .card-quota {
      display: inline-block; padding: 2px 8px; border-radius: 10px;
      font-size: 11px; font-weight: 600;
      background: #ecfdf5; color: #059669;
    }
  }
  .table-scroll::-webkit-scrollbar { width: 6px; height: 6px; }
  .table-scroll::-webkit-scrollbar-track { background: transparent; }
  .table-scroll::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 3px; }
  .table-scroll::-webkit-scrollbar-thumb:hover { background: #94a3b8; }
  /* Pagination */
  .pagination {
    display: flex; align-items: center; justify-content: center;
    gap: 4px; padding: 10px; flex-wrap: wrap;
  }
  .page-btn {
    padding: 5px 12px; border: 1px solid var(--border);
    background: white; border-radius: 5px; cursor: pointer;
    font-size: 12px; color: var(--text); transition: all 0.15s;
  }
  .page-btn:hover { background: var(--primary-bg); color: var(--primary); }
  .page-btn.active { background: var(--primary); color: white; border-color: var(--primary); }
  .page-btn:disabled { opacity: 0.4; cursor: not-allowed; }
  .page-info { font-size: 12px; color: var(--text-secondary); margin: 0 8px; }
  /* Sub-tabs for high school reference */
  .sub-tabs {
    display: flex; gap: 4px; margin-bottom: 10px;
    flex-wrap: wrap;
  }
  .sub-tab {
    padding: 6px 14px; border: 1px solid var(--border);
    background: white; border-radius: 6px; cursor: pointer;
    font-size: 12px; color: var(--text-secondary); transition: all 0.15s;
  }
  .sub-tab:hover { background: var(--primary-bg); color: var(--primary); }
  .sub-tab.active { background: var(--primary); color: white; border-color: var(--primary); }
  .data-source {
    font-size: 11px; color: var(--text-secondary);
    max-width: 400px; overflow: hidden; text-overflow: ellipsis;
    white-space: nowrap;
  }
  .data-source:hover { white-space: normal; }
  @media print {
    .header, .tabs, .filters, .stats { display: none; }
    .table-wrap { box-shadow: none; }
  }
  .modal {
    background: var(--card); border-radius: var(--radius);
    box-shadow: var(--shadow-lg); max-width: 95vw; max-height: 90vh;
    overflow: hidden; display: flex; flex-direction: column;
  }
  .modal-sm { width: 360px; }
  .modal-lg { width: 1200px; }
  .modal-header {
    display: flex; justify-content: space-between; align-items: center;
    padding: 14px 18px; border-bottom: 1px solid var(--border);
  }
  .modal-header h2 { font-size: 16px; font-weight: 600; }
  .modal-close {
    width: 32px; height: 32px; border: none; background: none;
    font-size: 20px; cursor: pointer; border-radius: 6px;
    color: var(--text-secondary); display: flex; align-items: center; justify-content: center;
  }
  .modal-close:hover { background: var(--bg); color: var(--text); }
  .modal-body { padding: 18px; overflow-y: auto; flex: 1; }
  .modal-footer {
    padding: 12px 18px; border-top: 1px solid var(--border);
    display: flex; gap: 8px; justify-content: flex-end;
  }
  .btn-sm { padding: 3px 10px; font-size: 11px; border: none; border-radius: 4px; cursor: pointer; }
  .btn-edit { background: #dbeafe; color: #1d4ed8; }
  .btn-edit:hover { background: #bfdbfe; }
  .btn-del { background: #fee2e2; color: #dc2626; }
  .btn-del:hover { background: #fecaca; }
  .btn-save { background: #d1fae5; color: #047857; }
  .btn-save:hover { background: #a7f3d0; }
  .btn-cancel { background: #f1f5f9; color: var(--text-secondary); }
  .btn-cancel:hover { background: #e2e8f0; }
  .btn-add { background: var(--primary); color: white; }
  .btn-add:hover { background: #1d4ed8; }
  .btn-export { background: #fef3c7; color: #b45309; }
  .btn-export:hover { background: #fde68a; }
  .btn-danger { background: #dc2626; color: white; }
  .btn-danger:hover { background: #b91c1c; }
  .editing-row td { padding: 3px 8px; }
  .editing-row .btn-group { display: flex; gap: 4px; }
