:root {
  --primary: #1a5fb4;
  --primary-dark: #124a8f;
  --accent: #f59e0b;
  --danger: #dc2626;
  --success: #16a34a;
  --info: #2563eb;
  --bg: #f5f7fa;
  --card: #ffffff;
  --text: #1f2937;
  --text-muted: #6b7280;
  --border: #e5e7eb;
  --radius: 14px;
  --shadow: 0 2px 12px rgba(0,0,0,0.06);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

/* 图片响应式兜底：任何图片都不超过容器宽度 */
img { max-width: 100%; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.container { max-width: 720px; margin: 0 auto; padding: 0 16px; }

/* 导航 */
.navbar {
  background: var(--primary);
  color: #fff;
  padding: 14px 0;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  position: sticky;
  top: 0;
  z-index: 100;
}
.nav-inner { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.brand { color: #fff; font-size: 16px; font-weight: 700; text-decoration: none; flex-shrink: 0; white-space: nowrap; }
.nav-links {
  display: flex;
  align-items: center;
  gap: 14px;
  white-space: nowrap;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.nav-links a {
  color: rgba(255,255,255,0.9);
  text-decoration: none;
  font-size: 14px;
  flex-shrink: 0;
}
.nav-links a:hover { color: #fff; }
.nav-cta {
  background: var(--accent);
  color: #fff !important;
  padding: 5px 12px;
  border-radius: 20px;
  font-weight: 700;
}
.nav-cta:hover { background: #d97706; color: #fff !important; }

/* 首页 hero */
.hero {
  text-align: center;
  padding: 36px 0 20px;
}
.hero h1 {
  font-size: 26px;
  color: var(--primary);
  margin-bottom: 8px;
}
.hero .subtitle {
  color: var(--text-muted);
  font-size: 15px;
  margin-bottom: 4px;
}
.hero .badge {
  display: inline-block;
  background: #fef3c7;
  color: #92400e;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 13px;
  margin-top: 8px;
}

/* 卡片 */
.card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 24px;
  margin-bottom: 16px;
}
.card-title {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.card-title .icon { font-size: 20px; }

/* 表单 */
.form-group { margin-bottom: 16px; }
.form-group label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--text);
}
.form-group input,
.form-group select {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  font-size: 16px;
  outline: none;
  transition: border-color 0.2s;
}
.form-group input:focus,
.form-group select:focus { border-color: var(--primary); }
.form-hint { font-size: 12px; color: var(--text-muted); margin-top: 4px; }

/* 质检类型切换 */
.exam-tabs {
  display: flex;
  gap: 10px;
  margin-bottom: 16px;
}
.exam-tab {
  flex: 1;
  padding: 12px;
  border: 2px solid var(--border);
  border-radius: 10px;
  text-align: center;
  cursor: pointer;
  font-size: 15px;
  font-weight: 600;
  transition: all 0.2s;
}
.exam-tab.active {
  border-color: var(--primary);
  background: #eff6ff;
  color: var(--primary);
}
.exam-tab input { display: none; }

/* 按钮 */
.btn {
  display: inline-block;
  width: 100%;
  padding: 14px;
  border: none;
  border-radius: 10px;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  text-align: center;
  text-decoration: none;
  transition: all 0.2s;
}
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); }
.btn-accent { background: var(--accent); color: #fff; }
.btn-accent:hover { background: #d97706; }
.btn-outline {
  background: #fff;
  color: var(--primary);
  border: 2px solid var(--primary);
}
.btn-outline:hover { background: #eff6ff; }

/* flash 消息 */
.flash {
  padding: 12px 16px;
  border-radius: 10px;
  margin-bottom: 16px;
  font-size: 14px;
}
.flash-error { background: #fef2f2; color: var(--danger); border: 1px solid #fecaca; }
.flash-success { background: #f0fdf4; color: var(--success); border: 1px solid #bbf7d0; }

/* 结果页 */
.result-header {
  text-align: center;
  padding: 24px 0 8px;
}
.rank-number {
  font-size: 48px;
  font-weight: 800;
  color: var(--primary);
  line-height: 1.1;
}
.rank-label { font-size: 14px; color: var(--text-muted); }
.score-pill {
  display: inline-block;
  background: #eff6ff;
  color: var(--primary);
  padding: 6px 16px;
  border-radius: 20px;
  font-size: 15px;
  font-weight: 700;
  margin-top: 8px;
}

/* 投档线 */
.line-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}
.line-row:last-child { border-bottom: none; }
.line-name { font-size: 14px; color: var(--text); }
.line-detail { font-size: 13px; color: var(--text-muted); }
.line-rule { font-size: 12px; color: var(--text-muted); margin-top: 3px; line-height: 1.5; }
.line-status {
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
}
.line-status.above { background: #dcfce7; color: #15803d; }
.line-status.below { background: #fee2e2; color: #b91c1c; }

/* 学校列表 */
.school-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}
.school-item:last-child { border-bottom: none; }
.school-item > div:first-child { flex: 1; min-width: 0; padding-right: 10px; }
.school-item .school-rank { flex-shrink: 0; }
.school-name { font-size: 15px; font-weight: 600; }
.school-meta { font-size: 12px; color: var(--text-muted); }
.school-rank { font-size: 13px; color: var(--text); text-align: right; }
.school-rank strong { color: var(--primary); }

/* 标签 */
.tag {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}
.tag-chongci { background: #fef2f2; color: #dc2626; }
.tag-wenjian { background: #dcfce7; color: #15803d; }
.tag-baodi { background: #dbeafe; color: #1d4ed8; }
.tag-cat {
  background: #f3f4f6;
  color: #6b7280;
  font-weight: 500;
  margin-right: 6px;
}

/* 志愿建议卡片 */
.suggest-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 14px;
  background: #f9fafb;
  border-radius: 10px;
  margin-bottom: 10px;
}
.suggest-row .tag { flex-shrink: 0; margin-top: 2px; }
.suggest-body { flex: 1; }
.suggest-school { font-size: 15px; font-weight: 700; }
.suggest-note { font-size: 13px; color: var(--text-muted); margin-top: 2px; }

/* 解锁框 */
.lock-box {
  background: linear-gradient(135deg, #1a5fb4, #124a8f);
  color: #fff;
  border-radius: var(--radius);
  padding: 24px;
  text-align: center;
  margin-bottom: 16px;
}
.lock-box h3 { font-size: 18px; margin-bottom: 6px; }
.lock-box p { font-size: 14px; opacity: 0.9; margin-bottom: 16px; }
.lock-box input {
  width: 100%;
  padding: 12px 14px;
  border: none;
  border-radius: 10px;
  font-size: 16px;
  margin-bottom: 10px;
  outline: none;
}
.lock-box .btn { margin-top: 6px; }

/* 警告框 */
.warn-box {
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: 10px;
  padding: 14px;
  margin-bottom: 16px;
}
.warn-box .warn-title { font-size: 14px; font-weight: 700; color: #92400e; margin-bottom: 6px; }
.warn-box ul { list-style: none; }
.warn-box li { font-size: 13px; color: #78350f; padding: 3px 0; }

/* 数据说明提醒（所有查询结果固定显示） */
.notice-box {
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 16px;
}
.notice-title { font-size: 15px; font-weight: 700; color: #1e40af; margin-bottom: 8px; }
.notice-box ul { list-style: none; }
.notice-box li { font-size: 13px; color: #1e3a5f; padding: 4px 0; line-height: 1.7; }
.notice-box li.notice-hot { color: #b91c1c; font-weight: 700; }

/* 咨询二维码 */
.consult-row { display: flex; align-items: center; gap: 12px; margin-top: 12px; padding-top: 12px; border-top: 1px dashed #bfdbfe; }
.consult-qr { width: 96px; height: 96px; border-radius: 8px; border: 1px solid var(--border); flex-shrink: 0; }
.consult-qr-center { display: block; margin: 0 auto; width: 140px; height: 140px; }
.consult-qr-small { width: 72px; height: 72px; }
.consult-title { font-size: 14px; font-weight: 700; color: var(--text); }
.consult-sub { font-size: 12px; color: var(--text-muted); margin-top: 2px; }
.footer-consult { display: flex; align-items: center; justify-content: center; gap: 12px; margin-bottom: 8px; }
.footer-consult > div { text-align: left; }

/* 政策页 */
.policy-section { margin-bottom: 20px; }
.policy-section h2 {
  font-size: 20px;
  color: var(--primary);
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 2px solid #eff6ff;
}
.policy-section h3 { font-size: 16px; margin: 14px 0 8px; color: var(--text); }
.policy-section p { font-size: 14px; color: var(--text); margin-bottom: 8px; }
.policy-section ul { padding-left: 20px; margin-bottom: 8px; }
.policy-section li { font-size: 14px; margin-bottom: 4px; }
.policy-table { width: 100%; border-collapse: collapse; margin: 10px 0; font-size: 13px; }
.policy-table th, .policy-table td {
  border: 1px solid var(--border);
  padding: 8px 10px;
  text-align: left;
}
.policy-table th { background: #f9fafb; font-weight: 600; }

/* 后台 */
.admin-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 20px;
}
.stat-card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 18px;
  text-align: center;
}
.stat-number { font-size: 28px; font-weight: 800; color: var(--primary); }
.stat-label { font-size: 13px; color: var(--text-muted); margin-top: 2px; }
.admin-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.admin-table th, .admin-table td {
  border: 1px solid var(--border);
  padding: 8px 10px;
  text-align: left;
}
.admin-table th { background: #f9fafb; position: sticky; top: 0; }

/* 付费下载 */
.pay-box {
  border: 2px solid var(--accent) !important;
}
.pay-qr-row { display: flex; gap: 20px; justify-content: center; margin: 10px 0 14px; }
.pay-qr { text-align: center; }
.pay-qr img {
  width: 132px; height: 132px;
  border: 1px solid var(--border); border-radius: 10px; object-fit: contain;
  background: #fff;
}
.pay-qr .qr-label { font-size: 12px; color: var(--text-muted); margin-top: 5px; }
.pay-form input {
  width: 100%; padding: 12px 14px; border: 1px solid var(--border);
  border-radius: 10px; font-size: 16px; margin-bottom: 10px; outline: none;
}
.pay-form input:focus { border-color: var(--primary); }

/* 底部 */
.footer {
  text-align: center;
  padding: 24px 0 40px;
  color: var(--text-muted);
  font-size: 12px;
}
.footer-muted { margin-top: 4px; opacity: 0.7; }

/* 响应式 */
@media (max-width: 480px) {
  .hero h1 { font-size: 22px; }
  .rank-number { font-size: 40px; }
  .admin-stats { grid-template-columns: repeat(2, 1fr); gap: 8px; }
}

/* ===== 报考指南页 ===== */
.guide-hero {
  background: linear-gradient(135deg, var(--primary) 0%, #2f7bd9 100%);
  color: #fff;
  border-radius: var(--radius);
  padding: 40px 24px;
  text-align: center;
  margin-bottom: 20px;
  box-shadow: var(--shadow);
}
.guide-title {
  font-size: 30px;
  font-weight: 800;
  margin-bottom: 12px;
  letter-spacing: 1px;
}
.guide-subtitle {
  font-size: 16px;
  opacity: 0.95;
  margin-bottom: 6px;
}
.guide-meta {
  font-size: 14px;
  opacity: 0.85;
  margin-bottom: 18px;
}
.guide-consult {
  font-size: 14px;
  opacity: 0.9;
}
.guide-hero-qr img {
  width: 88px;
  height: 88px;
  border-radius: 8px;
  margin-top: 12px;
  background: #fff;
  border: 3px solid #fff;
}

.guide-preface {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 24px;
  margin-bottom: 20px;
}
.guide-preface-title {
  font-size: 20px;
  color: var(--primary);
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 2px solid #eff6ff;
}
.guide-preface p { font-size: 14px; color: var(--text); margin-bottom: 10px; }

.guide-toc {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px 24px;
  margin-bottom: 20px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.guide-toc .toc-title {
  font-size: 18px;
  font-weight: 800;
  color: var(--primary);
  margin-bottom: 10px;
}
.guide-toc a {
  text-decoration: none;
  color: var(--text);
  font-size: 14px;
  padding: 6px 0;
  border-radius: 6px;
}
.guide-toc a.toc-l1 {
  font-weight: 700;
  margin-top: 8px;
  color: var(--primary-dark);
}
.guide-toc a.toc-l2 {
  padding-left: 18px;
  color: var(--text-muted);
}
.guide-toc a:hover { color: var(--primary); }

.guide-body {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 28px 24px 36px;
}
.guide-body h2 {
  font-size: 22px;
  color: var(--primary);
  margin: 30px 0 14px;
  padding-bottom: 10px;
  border-bottom: 3px solid #eff6ff;
  scroll-margin-top: 70px;
}
.guide-body h2:first-child { margin-top: 0; }
.guide-body h3 {
  font-size: 17px;
  color: var(--text);
  margin: 22px 0 10px;
  padding-left: 10px;
  border-left: 4px solid var(--primary);
  scroll-margin-top: 70px;
}
.guide-body h4 {
  font-size: 15px;
  color: var(--text-muted);
  margin: 16px 0 8px;
  font-weight: 700;
  scroll-margin-top: 70px;
}
.guide-body h5 {
  font-size: 14px;
  color: var(--text-muted);
  margin: 14px 0 6px;
  font-weight: 700;
}
.guide-body h4.guide-sub {
  font-size: 16px;
  color: var(--primary-dark);
  margin: 18px 0 8px;
  font-weight: 800;
}
.guide-body p { font-size: 14.5px; color: var(--text); margin-bottom: 10px; line-height: 1.75; }
.guide-body p.guide-li {
  padding-left: 16px;
  position: relative;
  margin-bottom: 6px;
}
.guide-body p.guide-li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 11px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
}
.guide-img img {
  max-width: 100%;
  border-radius: 10px;
  border: 1px solid var(--border);
  margin: 8px 0;
}
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 12px 0; }
.table-wrap .policy-table { min-width: 480px; width: 100%; }

/* ==================== 学校百科 ==================== */
/* 列表页 */
.school-search { position: relative; max-width: 480px; margin: 16px auto 0; }
.school-search input {
  width: 100%;
  padding: 14px 44px 14px 16px;
  border: 2px solid var(--border);
  border-radius: 24px;
  font-size: 16px;
  outline: none;
  background: var(--card);
  box-shadow: var(--shadow);
  transition: border-color 0.2s;
}
.school-search input:focus { border-color: var(--primary); }
.school-search-icon {
  position: absolute; right: 16px; top: 50%; transform: translateY(-50%);
  font-size: 18px; pointer-events: none;
}
.school-stats {
  text-align: center;
  font-size: 13px;
  color: var(--text-muted);
  margin: 12px 0 20px;
}
.school-stats strong { color: var(--primary); }
.muted-note { font-size: 12px; opacity: 0.8; }

.school-group { margin-bottom: 22px; }
.school-group-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--primary-dark);
  margin-bottom: 10px;
  padding-left: 10px;
  border-left: 4px solid var(--primary);
  display: flex;
  align-items: center;
  gap: 8px;
}
.school-group-count {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  background: #eff6ff;
  padding: 2px 8px;
  border-radius: 12px;
}
.school-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 10px;
}
.school-card {
  display: block;
  background: var(--card);
  border-radius: 12px;
  box-shadow: var(--shadow);
  padding: 12px 14px;
  text-decoration: none;
  transition: transform 0.15s, box-shadow 0.15s;
  border: 1px solid transparent;
}
.school-card:hover { transform: translateY(-2px); box-shadow: 0 6px 18px rgba(0,0,0,0.1); border-color: #dbeafe; }
.school-card-head { display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.school-card-name {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.35;
}
.dx-tag {
  font-size: 11px;
  font-weight: 700;
  color: #b45309;
  background: #fef3c7;
  padding: 2px 6px;
  border-radius: 6px;
  flex-shrink: 0;
}
.school-card-meta { margin-top: 8px; display: flex; align-items: baseline; gap: 8px; }
.school-score { font-size: 18px; font-weight: 800; color: var(--primary); }
.school-score i { font-style: normal; font-size: 12px; font-weight: 600; }
.school-score.none { color: var(--border); font-size: 16px; }
.school-rank { font-size: 12px; color: var(--text-muted); }
.school-benke { font-size: 13px; color: var(--success); font-weight: 600; }

/* 详情页 */
.detail-head { padding: 18px 0 6px; }
.back-link {
  display: inline-block;
  font-size: 13px;
  color: var(--primary);
  text-decoration: none;
  margin-bottom: 12px;
}
.back-link:hover { text-decoration: underline; }
.detail-title-row { display: flex; flex-direction: column; gap: 8px; }
.detail-name { font-size: 24px; color: var(--primary); }
.detail-badges { display: flex; flex-wrap: wrap; gap: 8px; }
.cat-badge, .nature-badge, .dx-badge {
  font-size: 12px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 14px;
}
.cat-badge { color: #fff; }
.cat-老九所 { background: #dc2626; }
.cat-一类校 { background: var(--primary); }
.cat-二类校 { background: #16a34a; }
.cat-三类校 { background: #d97706; }
.cat-一般普高 { background: #6b7280; }
.cat-综合高中 { background: #7c3aed; }
.cat-民办 { background: #0891b2; }
.cat-其他 { background: #6b7280; }
.nature-badge { background: #eff6ff; color: var(--primary-dark); }
.dx-badge { background: #fef3c7; color: #b45309; }

.admission-table { width: 100%; border-collapse: collapse; }
.admission-table th {
  background: #eff6ff;
  color: var(--primary-dark);
  font-size: 13px;
  padding: 10px 8px;
  text-align: left;
}
.admission-table td {
  font-size: 14px;
  padding: 10px 8px;
  border-bottom: 1px solid var(--border);
}
.admission-table .score-cell { font-weight: 800; color: var(--primary); font-size: 15px; }
.table-note { font-size: 12.5px; color: var(--text-muted); margin-top: 10px; line-height: 1.6; }
.table-note strong { color: var(--text); }

.kv-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.kv-item {
  background: #f8fafc;
  border-radius: 10px;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.kv-label { font-size: 12px; color: var(--text-muted); }
.kv-value { font-size: 16px; font-weight: 700; color: var(--text); white-space: pre-line; }

.dx-line {
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: 10px;
  padding: 12px 14px;
  margin-top: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.dx-line-label { font-size: 13px; color: #92400e; font-weight: 600; }
.dx-line-value { font-size: 18px; font-weight: 800; color: #b45309; }
.dx-note {
  font-size: 12.5px;
  color: #92400e;
  background: #fef3c7;
  border-radius: 8px;
  padding: 10px 12px;
  margin-top: 10px;
  line-height: 1.6;
}

/* 各初中校定向生名额与分数明细表 */
.dx-search {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  font-size: 14px;
  margin-top: 12px;
  box-sizing: border-box;
  outline: none;
}
.dx-search:focus { border-color: var(--primary); }
.dx-table-wrap { max-height: 480px; overflow-y: auto; margin-top: 10px; }
.dx-detail-table { min-width: 560px; }
.dx-detail-table th { position: sticky; top: 0; z-index: 1; }
.dx-detail-table .dx-junior { font-weight: 600; white-space: nowrap; }

.se-block { border-top: 1px solid var(--border); padding: 14px 0; }
.se-block:first-of-type { border-top: none; padding-top: 0; }
.se-title { font-size: 16px; font-weight: 700; color: var(--primary-dark); margin-bottom: 8px; }
.se-details { margin-top: 10px; }
.se-details summary {
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  color: var(--primary);
  padding: 6px 0;
}
.se-details-body {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.7;
  padding: 10px 12px;
  background: #f8fafc;
  border-radius: 8px;
  margin-top: 6px;
  white-space: pre-line;
}
.muted-tag { font-size: 11px; font-weight: 600; color: #b45309; background: #fef3c7; padding: 2px 8px; border-radius: 10px; margin-left: 4px; }

.eb-item { display: flex; gap: 10px; padding: 10px 0; border-top: 1px solid var(--border); }
.eb-item:first-of-type { border-top: none; padding-top: 0; }
.eb-kind {
  flex-shrink: 0;
  font-size: 12px;
  font-weight: 700;
  color: #7c3aed;
  background: #f3e8ff;
  padding: 3px 8px;
  border-radius: 8px;
  height: fit-content;
  margin-top: 2px;
}
.eb-title { font-size: 14px; font-weight: 700; color: var(--text); }
.eb-detail { font-size: 12.5px; color: var(--text-muted); margin-top: 2px; }

.ex-item { padding: 10px 0; border-top: 1px solid var(--border); }
.ex-item:first-of-type { border-top: none; padding-top: 0; }
.ex-title { font-size: 14px; font-weight: 700; color: var(--text); }
.ex-meta { font-size: 13px; color: var(--primary); margin-top: 2px; }
.ex-note { font-size: 12.5px; color: var(--text-muted); margin-top: 2px; }
.ex-link { display: inline-block; font-size: 12.5px; color: var(--primary); margin-top: 4px; }

.tt-item { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-top: 1px solid var(--border); }
.tt-item:first-of-type { border-top: none; padding-top: 0; }
.tt-subject { font-size: 14px; font-weight: 600; color: var(--text); }
.tt-count { font-size: 13px; color: var(--primary); font-weight: 700; }
.tt-time { font-size: 12px; color: var(--text-muted); margin-left: auto; }

.data-source-card { background: #f8fafc; }

/* 导航小屏适配 */
@media (max-width: 640px) {
  /* 避免 iOS Safari 聚焦输入框时自动缩放页面 */
  input, select, textarea { font-size: 16px; }
  .nav-inner { flex-direction: column; align-items: stretch; gap: 6px; }
  .nav-links {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    gap: 0;
    width: 100%;
    padding-bottom: 2px;
  }
  .nav-links a {
    margin-left: 0;
    margin-right: 18px;
    font-size: 13px;
    flex-shrink: 0;
    white-space: nowrap;
  }
  .nav-links::-webkit-scrollbar { display: none; }
  .nav-links { scrollbar-width: none; }
}

/* 中考历年真题 */
.subject-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.subject-tab {
  padding: 8px 14px;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: #fff;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-muted);
  transition: all 0.2s;
}
.subject-tab.active { background: var(--primary); color: #fff; border-color: var(--primary); }
.subject-group.hidden { display: none; }
.paper-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 0;
  border-top: 1px solid var(--border);
}
.paper-row:first-of-type { border-top: none; padding-top: 0; }
.paper-info { flex: 1; min-width: 0; }
.paper-year {
  display: inline-block;
  background: #eff6ff;
  color: var(--primary);
  font-size: 12px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 6px;
  margin-bottom: 4px;
}
.paper-title { font-size: 14px; color: var(--text); }
.paper-subtitle { font-size: 12.5px; color: var(--primary); font-weight: 600; margin-left: 2px; }
.paper-size { font-size: 12px; color: var(--text-muted); margin-top: 2px; }
.paper-actions { display: flex; gap: 8px; flex-shrink: 0; }
.btn-sm {
  width: auto;
  padding: 8px 14px;
  font-size: 13px;
  border-radius: 8px;
}

/* 真题手机号验证 */
.phone-gate-form { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.phone-gate-form input {
  flex: 1;
  min-width: 200px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 15px;
}
.phone-gate-form .btn { width: auto; padding: 12px 22px; }
.phone-ok {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  color: var(--success);
  font-weight: 600;
}
.member-form { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.member-form input {
  flex: 1;
  min-width: 180px;
  max-width: 240px;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 14px;
}
.member-form .btn { width: auto; padding: 10px 20px; }

/* 下载前手机号验证弹窗 */
.modal-mask {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 999;
  background: rgba(15, 23, 42, 0.5);
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.modal-mask.show { display: flex; }
.modal-box {
  background: #fff;
  border-radius: 16px;
  padding: 24px 22px;
  width: 100%;
  max-width: 360px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
}
.modal-title { font-size: 17px; font-weight: 700; color: var(--text); margin-bottom: 8px; }
.modal-desc { font-size: 13.5px; color: var(--text-muted); line-height: 1.6; margin-bottom: 16px; }
.modal-desc strong { color: var(--primary); }
.modal-box input {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 15px;
  margin-bottom: 6px;
}
.modal-box input:focus { outline: none; border-color: var(--primary); }
.modal-error { font-size: 12.5px; color: var(--danger); min-height: 18px; margin-bottom: 8px; }
.modal-actions { display: flex; gap: 10px; justify-content: flex-end; }
.modal-actions .btn { width: auto; padding: 10px 20px; }

/* 教育金句 */
.edu-quote {
  text-align: center;
  padding: 18px 22px;
  margin: 14px 0;
  border-radius: var(--radius);
  background: linear-gradient(135deg, #eef5ff, #e6f0fb);
  border: 1px solid #d8e6f7;
}
.edu-quote-text {
  font-size: 15px;
  font-weight: 600;
  color: var(--primary-dark);
  line-height: 1.8;
  letter-spacing: 0.5px;
}
.edu-quote-author {
  display: block;
  margin-top: 8px;
  font-size: 12px;
  color: var(--text-muted);
}


/* ==================== 学校百科页（信息图风格） ==================== */
.sd-topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: linear-gradient(90deg, #16a34a, #15803d);
  color: #fff;
  font-size: 13px;
  padding: 10px 16px;
  border-radius: 10px;
  margin: 14px 0 16px;
}
.sd-topbar b { font-size: 15px; }
.sd-head { text-align: center; margin: 4px 0 10px; }
.sd-name {
  font-size: 28px;
  font-weight: 800;
  color: var(--text);
  letter-spacing: 1px;
}
.sd-sub { color: var(--text-muted); font-size: 14px; margin-top: 2px; }
.sd-badges { margin-top: 10px; display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }

.sd-judge {
  display: flex;
  gap: 10px;
  background: #fff8e6;
  border: 1px solid #f5d98a;
  border-radius: 12px;
  padding: 14px 16px;
  margin: 14px 0;
}
.sd-judge-icon { font-size: 22px; line-height: 1.3; }
.sd-judge-title { font-weight: 700; color: #b45309; font-size: 14px; }
.sd-judge-text { font-size: 14px; color: #7c4a03; line-height: 1.75; }
.sd-judge-text b { color: #b45309; }

.sd-info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 10px;
  margin: 14px 0;
}
.sd-info-item {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px 14px;
  box-shadow: var(--shadow);
}
.sd-info-label { display: block; font-size: 12px; color: var(--text-muted); }
.sd-info-value { display: block; font-size: 16px; font-weight: 700; color: var(--primary); margin-top: 2px; }

.sd-charts img {
  width: 100%;
  border-radius: 12px;
  box-shadow: var(--shadow);
  margin-bottom: 14px;
  display: block;
}

.sd-compare { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px 22px; margin: 14px 0; box-shadow: var(--shadow); }
.sd-cmp-row { display: grid; grid-template-columns: 1fr; gap: 12px; }
@media (min-width: 720px) { .sd-cmp-row { grid-template-columns: 1fr 1fr 1fr; } }
.sd-cmp-block { border-radius: 12px; padding: 14px; }
.sd-cmp-up { background: #fff3e6; border: 1px solid #fbd5a8; }
.sd-cmp-same { background: #eaf2fd; border: 1px solid #c4dcf7; }
.sd-cmp-down { background: #eaf7ee; border: 1px solid #bfe5cc; }
.sd-cmp-head { font-weight: 700; font-size: 14px; margin-bottom: 8px; }
.sd-cmp-up .sd-cmp-head { color: #c2540a; }
.sd-cmp-same .sd-cmp-head { color: var(--primary); }
.sd-cmp-down .sd-cmp-head { color: #15803d; }
.sd-cmp-block ul { list-style: none; padding: 0; margin: 0; }
.sd-cmp-block li {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  font-size: 13.5px;
  padding: 5px 0;
  border-bottom: 1px dashed rgba(0,0,0,0.08);
}
.sd-cmp-block li:last-child { border-bottom: none; }
.sd-cmp-block a { color: var(--text); text-decoration: none; }
.sd-cmp-block a:hover { color: var(--primary); }
.sd-cmp-score { font-weight: 700; color: var(--text); white-space: nowrap; }
.sd-cmp-note { font-size: 11.5px; color: var(--text-muted); margin-top: 8px; line-height: 1.5; }

.sd-disclaimer {
  font-size: 12px;
  color: var(--text-muted);
  background: var(--bg);
  border: 1px dashed var(--border);
  border-radius: 10px;
  padding: 10px 14px;
  line-height: 1.8;
  margin: 14px 0;
}
.sd-cmp-empty { font-size: 13px; color: var(--text-muted); line-height: 1.7; padding: 6px 0 2px; }

/* ===== 学校百科页移动端适配 ===== */
@media (max-width: 640px) {
  .sd-topbar {
    flex-wrap: wrap;
    gap: 4px;
    font-size: 12px;
    padding: 8px 12px;
  }
  .sd-topbar b { font-size: 13px; }
  .sd-name { font-size: 22px; }
  .sd-sub { font-size: 13px; }
  .sd-judge { padding: 12px; }
  .sd-judge-text { font-size: 13px; }
  .sd-info-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .sd-info-item { padding: 10px 12px; }
  .sd-compare { padding: 14px 12px; }
  .sd-cmp-block { padding: 10px; }
  .card { padding: 16px 14px; }
  .card-title { font-size: 16px; }
  .admission-table th, .admission-table td { padding: 8px 6px; font-size: 13px; }
  .dx-table-wrap { max-height: 380px; }
  .kv-item { padding: 10px; }
}

/* 404 页面 */
.nf404 { text-align: center; padding: 64px 16px; }
.nf404-code { font-size: 72px; font-weight: 800; color: var(--primary); line-height: 1.1; }
.nf404-msg { color: var(--muted, #6b7280); margin: 12px 0 28px; }
.nf404-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
