/* ============================================================
   中考择校指南 - 专属响应式样式表 v2
   移动端优先 · 暗色模式 · 完整适配 · 解决冲突
   ============================================================ */

/* ========== CSS 变量扩展 ========== */
:root {
  --sg-primary: #4F46E5;
  --sg-primary-light: #818CF8;
  --sg-primary-bg: #EEF2FF;
  --sg-success: #10B981;
  --sg-success-light: #D1FAE5;
  --sg-warning: #F59E0B;
  --sg-warning-light: #FEF3C7;
  --sg-danger: #EF4444;
  --sg-danger-light: #FEE2E2;
  --sg-info: #06B6D4;
  --sg-info-light: #CFFAFE;
  --sg-purple: #7C3AED;
  --sg-purple-light: #EDE9FE;
  --sg-pink: #EC4899;
  --sg-pink-light: #FCE7F3;
  --sg-radius: 16px;
  --sg-radius-sm: 12px;
  --sg-radius-xs: 10px;
  --sg-transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ========== Hero 区域 ========== */
.sg-hero {
  background: linear-gradient(135deg, #1E3A8A 0%, #3730A3 30%, #4F46E5 55%, #7C3AED 80%, #A78BFA 100%);
  padding: 32px 16px 36px;
  text-align: center;
  position: relative;
  overflow: hidden;
  border-radius: 0 0 28px 28px;
  margin: -16px -16px 16px;
}
.sg-hero::before {
  content: '';
  position: absolute;
  top: -50%; left: -50%;
  width: 200%; height: 200%;
  background:
    radial-gradient(circle at 20% 30%, rgba(255,255,255,0.1) 0%, transparent 40%),
    radial-gradient(circle at 80% 70%, rgba(167,139,250,0.15) 0%, transparent 45%),
    radial-gradient(circle at 50% 50%, rgba(255,255,255,0.04) 0%, transparent 60%);
  animation: sgHeroBg 12s ease-in-out infinite;
}
@keyframes sgHeroBg {
  0%, 100% { transform: translate(0, 0) rotate(0deg); }
  33%  { transform: translate(8px, -6px) rotate(1deg); }
  66%  { transform: translate(-4px, 4px) rotate(-1deg); }
}

/* 装饰圆点 */
.sg-hero::after {
  content: '';
  position: absolute;
  bottom: -30px; right: -30px;
  width: 120px; height: 120px;
  border-radius: 50%;
  background: rgba(255,255,255,0.04);
}
.sg-hero > * { position: relative; z-index: 1; }
.sg-hero h1 {
  font-size: 24px; font-weight: 900;
  color: #fff; margin: 0 0 6px;
  text-shadow: 0 2px 12px rgba(0,0,0,0.25);
  letter-spacing: 1px;
}
.sg-hero > p {
  font-size: 13px; color: rgba(255,255,255,0.82);
  margin: 0 0 14px; line-height: 1.5;
  max-width: 360px; margin-left: auto; margin-right: auto;
}

/* Hero 统计卡片 */
.sg-hero-stats {
  display: flex; gap: 10px; justify-content: center;
  flex-wrap: wrap; margin-top: 12px;
}
.sg-hero-stat {
  background: rgba(255,255,255,0.12);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: var(--sg-radius-sm); padding: 10px 14px;
  text-align: center; min-width: 72px;
  transition: var(--sg-transition);
}
.sg-hero-stat:hover {
  background: rgba(255,255,255,0.2);
  transform: translateY(-2px);
}
.sg-hero-stat-num { font-size: 22px; font-weight: 900; color: #fff; line-height: 1.2; }
.sg-hero-stat-label { font-size: 10px; color: rgba(255,255,255,0.7); margin-top: 2px; }

/* ========== 倒计时 ========== */
.sg-countdown {
  background: #fff; border-radius: var(--sg-radius);
  padding: 12px 16px; margin-bottom: 12px;
  display: flex; align-items: center; gap: 10px;
  box-shadow: var(--shadow-sm); border: 1px solid var(--border);
  flex-wrap: wrap; justify-content: center;
}
.sg-countdown-icon { font-size: 26px; flex-shrink: 0; }
.sg-countdown-label { font-size: 12px; color: var(--text-secondary); white-space: nowrap; }
.sg-countdown-num {
  font-size: 28px; font-weight: 900;
  background: linear-gradient(135deg, var(--danger), #F97316);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text; font-family: 'Courier New', monospace;
  min-width: 48px; text-align: center;
}
.sg-countdown-bar-wrap {
  flex: 1; min-width: 80px; height: 6px;
  background: #F1F5F9; border-radius: 10px; overflow: hidden;
}
.sg-countdown-bar-fill {
  height: 100%; border-radius: 10px;
  background: linear-gradient(90deg, var(--danger), var(--warning));
  transition: width 1s ease;
}

/* ========== 每日金句 ========== */
.sg-quote {
  background: linear-gradient(135deg, #FFFBEB, #FEF3C7);
  border-radius: var(--sg-radius); padding: 14px 16px;
  margin-bottom: 16px; display: flex; gap: 12px;
  align-items: flex-start; border: 1px solid #FDE68A;
}
.sg-quote-icon { font-size: 24px; flex-shrink: 0; animation: sgFloat 3s ease-in-out infinite; }
.sg-quote-text { font-size: 13px; color: #92400E; line-height: 1.7; margin: 0; font-style: italic; }
.sg-quote-author { font-size: 11px; color: #B45309; margin: 4px 0 0; font-weight: 600; }

/* ========== 区块标题 ========== */
.sg-section {
  display: flex; align-items: center; gap: 8px;
  margin: 24px 0 12px; font-size: 17px;
  font-weight: 800; color: var(--text);
  scroll-margin-top: 70px;
}
.sg-section::after {
  content: ''; flex: 1; height: 1px;
  background: var(--border); margin-left: 6px;
}

/* ========== 智能匹配器 ========== */
.sg-matcher {
  background: linear-gradient(135deg, #EEF2FF, #F5F3FF);
  border-radius: var(--sg-radius); padding: 20px 16px;
  margin-bottom: 20px; border: 2px solid #C7D2FE;
  position: relative; overflow: hidden;
}
.sg-matcher::after {
  content: ''; position: absolute;
  top: -40px; right: -40px;
  width: 100px; height: 100px; border-radius: 50%;
  background: rgba(79,70,229,0.04);
}
.sg-matcher-header {
  display: flex; align-items: center; gap: 8px;
  margin-bottom: 12px; position: relative; z-index: 1;
}
.sg-matcher-icon { font-size: 26px; }
.sg-matcher h3 { font-size: 16px; font-weight: 800; margin: 0; color: var(--sg-primary); }

.sg-matcher-input-row {
  display: flex; gap: 8px; align-items: center;
  flex-wrap: wrap; position: relative; z-index: 1;
}
.sg-matcher-input {
  flex: 1; min-width: 120px; padding: 12px 16px;
  border: 2px solid #C7D2FE; border-radius: 14px;
  font-size: 15px; background: #fff; outline: none;
  transition: var(--sg-transition);
  font-family: inherit; box-sizing: border-box;
  -webkit-appearance: none;
}
.sg-matcher-input:focus { border-color: var(--sg-primary); box-shadow: 0 0 0 4px rgba(79,70,229,0.1); }
.sg-matcher-btn {
  padding: 12px 20px; border-radius: 14px; border: none;
  background: linear-gradient(135deg, var(--sg-primary), var(--sg-purple));
  color: #fff; font-size: 14px; font-weight: 700; cursor: pointer;
  transition: var(--sg-transition); white-space: nowrap;
  font-family: inherit; box-shadow: 0 4px 15px rgba(79,70,229,0.3);
  -webkit-tap-highlight-color: transparent;
}
.sg-matcher-btn:active { transform: scale(0.95); }
.sg-matcher-btn:hover { box-shadow: 0 6px 20px rgba(79,70,229,0.45); }

/* 匹配结果 */
.sg-matcher-results { margin-top: 14px; display: none; position: relative; z-index: 1; }
.sg-matcher-results.show { display: block; animation: sgFadeInUp 0.4s ease; }

.sg-match-tier { margin-bottom: 12px; }
.sg-match-tier-label {
  font-size: 12px; font-weight: 800; margin-bottom: 6px;
  padding: 4px 10px; border-radius: 8px;
  display: inline-flex; align-items: center; gap: 4px;
}
.sg-match-school {
  background: #fff; border-radius: 12px; padding: 10px 12px;
  margin-bottom: 6px; display: flex; align-items: center; gap: 10px;
  border: 1px solid var(--border); transition: var(--sg-transition);
  cursor: pointer; -webkit-tap-highlight-color: transparent;
}
.sg-match-school:active { transform: scale(0.98); background: #F8FAFC; }
.sg-match-rank {
  width: 28px; height: 28px; border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 800; flex-shrink: 0;
}
.sg-match-info { flex: 1; min-width: 0; }
.sg-match-name { font-size: 13px; font-weight: 700; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sg-match-type { font-size: 10px; color: var(--text-secondary); }
.sg-match-score { font-size: 16px; font-weight: 900; text-align: right; flex-shrink: 0; min-width: 44px; }
.sg-match-bar-wrap {
  display: none;
}

/* ========== 快捷导航 ========== */
.sg-quick-nav {
  display: flex; gap: 6px; overflow-x: auto;
  padding: 6px 0 14px; scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  scroll-behavior: smooth; margin-bottom: 2px;
}
.sg-quick-nav::-webkit-scrollbar { display: none; }
.sg-quick-nav a {
  flex-shrink: 0; padding: 8px 14px;
  background: #fff; border: 1px solid var(--border);
  border-radius: 22px; font-size: 12px; font-weight: 600;
  color: var(--text-secondary); text-decoration: none;
  transition: var(--sg-transition); white-space: nowrap;
  display: flex; align-items: center; gap: 4px;
  -webkit-tap-highlight-color: transparent;
}
.sg-quick-nav a:active,
.sg-quick-nav a:hover {
  background: var(--sg-primary-bg); color: var(--sg-primary);
  border-color: var(--sg-primary); transform: translateY(-1px);
}

/* ========== 招生方式卡片 - 解决与 style.css 冲突 ========== */
/* 【关键修复】覆盖 style.css 中的样式 */
.sg-page .enroll-methods,
.enroll-methods {
  display: grid !important;
  grid-template-columns: 1fr;
  gap: 12px; margin-bottom: 20px;
}
.enroll-method-card {
  background: #fff; border-radius: var(--sg-radius);
  padding: 18px 16px; border: 1px solid var(--border);
  box-shadow: var(--shadow-sm); transition: var(--sg-transition);
  position: relative; overflow: hidden;
  border-left: none !important; /* 覆盖 style.css */
}
.enroll-method-card:hover { box-shadow: var(--shadow-md); }
.enroll-method-card:active { transform: scale(0.98); }

/* 左侧色条 - 替代码 style.css 的 border-left */
.enroll-method-card::before {
  content: ''; position: absolute; top: 0; left: 0;
  width: 4px; height: 100%; border-radius: 4px 0 0 4px;
}
.enroll-method-card.method-blue::before { background: var(--sg-info); }
.enroll-method-card.method-purple::before { background: var(--sg-purple); }
.enroll-method-card.method-green::before { background: var(--sg-success); }

.enroll-method-card .enroll-method-icon { font-size: 32px; margin-bottom: 6px; display: block; }
.enroll-method-card h3 { font-size: 16px; font-weight: 800; margin: 0 0 4px; }
.enroll-method-desc { font-size: 12px; color: var(--text-secondary); line-height: 1.5; margin: 0 0 10px; }

.enroll-detail { list-style: none; padding: 0; margin: 0; }
.enroll-detail li {
  font-size: 11px; color: var(--text); padding: 4px 0;
  border-bottom: 1px solid #F1F5F9; line-height: 1.5;
}
.enroll-detail li:last-child { border-bottom: none; }

/* 【关键修复】覆盖 style.css 的 .enroll-tag absolute 定位 */
.enroll-tag {
  display: inline-block !important;
  position: static !important;
  margin-top: 10px; padding: 4px 12px; border-radius: 20px;
  font-size: 11px; font-weight: 700;
  top: auto !important; right: auto !important;
}
.method-blue .enroll-tag { background: var(--sg-info-light); color: #0E7490; }
.method-purple .enroll-tag { background: var(--sg-purple-light); color: #6D28D9; }
.method-green .enroll-tag { background: var(--sg-success-light); color: #065F46; }

/* ========== 策略卡片 - 解决与 style.css 冲突 ========== */
.strategy-grid {
  display: grid !important;
  grid-template-columns: 1fr;
  gap: 12px; margin-bottom: 20px;
}
.strategy-card {
  background: #fff; border-radius: var(--sg-radius);
  padding: 18px 16px; border: 1px solid var(--border);
  box-shadow: var(--shadow-sm); transition: var(--sg-transition);
  position: relative; overflow: hidden;
  border-left: none !important; /* 覆盖 style.css */
}
.strategy-card:active { transform: scale(0.98); }

/* 左侧色条 */
.strategy-card::before {
  content: ''; position: absolute; top: 0; left: 0;
  width: 4px; height: 100%; border-radius: 4px 0 0 4px;
}
.strategy-card.strategy-rush::before { background: var(--sg-danger); }
.strategy-card.strategy-steady::before { background: var(--sg-primary); }
.strategy-card.strategy-safe::before { background: var(--sg-success); }

.strategy-header { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.strategy-icon { font-size: 28px; flex-shrink: 0; }
.strategy-header h3 { font-size: 17px; font-weight: 800; margin: 0; }
.strategy-header p { font-size: 11px; color: var(--text-secondary); margin: 2px 0 0; }
.strategy-body p { font-size: 12px; color: var(--text); font-weight: 600; margin: 0 0 6px; }
.strategy-body ul { list-style: none; padding: 0; margin: 0; }
.strategy-body li {
  font-size: 11px; color: var(--text-secondary); padding: 3px 0 3px 16px;
  position: relative; line-height: 1.5;
}
.strategy-body li::before {
  content: '•'; position: absolute; left: 2px;
  font-weight: 700; font-size: 12px; top: 3px;
}
.strategy-rush .strategy-body li::before { color: var(--sg-danger); }
.strategy-steady .strategy-body li::before { color: var(--sg-primary); }
.strategy-safe .strategy-body li::before { color: var(--sg-success); }

/* ========== 时间轴 ========== */
.sg-timeline-wrap {
  background: #fff; border-radius: var(--sg-radius);
  padding: 16px; margin-bottom: 20px;
  box-shadow: var(--shadow-sm); border: 1px solid var(--border);
}
.sg-timeline {
  position: relative; padding-left: 28px;
}
.sg-timeline::before {
  content: ''; position: absolute; left: 13px; top: 6px; bottom: 6px;
  width: 2px; background: linear-gradient(180deg, var(--sg-primary), var(--sg-purple), var(--sg-info));
  border-radius: 1px;
}
.sg-tl-item {
  position: relative; padding-bottom: 20px;
}
.sg-tl-item:last-child { padding-bottom: 0; }
.sg-tl-dot {
  position: absolute; left: -21px; top: 0;
  width: 30px; height: 30px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 10px; font-weight: 800; color: #fff;
  background: var(--sg-primary); z-index: 1;
  box-shadow: 0 2px 8px rgba(79,70,229,0.25);
  transition: var(--sg-transition);
}
.sg-tl-item.current .sg-tl-dot {
  background: var(--sg-danger);
  box-shadow: 0 0 0 5px rgba(239,68,68,0.15);
  animation: sgPulse 2s infinite;
}
.sg-tl-content {
  background: #F8FAFC; border-radius: 10px;
  padding: 12px 14px; transition: var(--sg-transition);
}
.sg-tl-item:hover .sg-tl-content,
.sg-tl-item:active .sg-tl-content { background: var(--sg-primary-bg); }
.sg-tl-content h4 { font-size: 13px; font-weight: 700; margin: 0 0 3px; color: var(--text); display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.sg-tl-content p { font-size: 11px; color: var(--text-secondary); margin: 0; line-height: 1.5; }
.sg-tl-current-tag {
  display: inline-block; padding: 2px 7px; border-radius: 8px;
  font-size: 10px; font-weight: 700; background: var(--sg-danger-light);
  color: var(--sg-danger); animation: sgPulse 1.5s infinite;
}

/* ========== 学校筛选工具栏 ========== */
.sg-toolbar {
  position: sticky; top: 60px; z-index: 100;
  background: var(--bg); padding: 10px 0 8px;
  margin-bottom: 12px; transition: var(--sg-transition);
}
.sg-toolbar.scrolled {
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 2px 20px rgba(0,0,0,0.06);
  margin: -10px -16px 12px;
  padding: 10px 16px 8px;
}
.sg-toolbar-inner {
  display: flex; gap: 6px; align-items: center; flex-wrap: wrap;
}
.sg-search-wrap {
  flex: 1; min-width: 140px; position: relative;
}
.sg-search-wrap input {
  width: 100%; padding: 8px 12px 8px 34px;
  border: 2px solid var(--border); border-radius: 22px;
  font-size: 12px; background: #fff; outline: none;
  transition: var(--sg-transition); font-family: inherit;
  box-sizing: border-box; -webkit-appearance: none;
}
.sg-search-wrap input:focus { border-color: var(--sg-primary); box-shadow: 0 0 0 3px rgba(79,70,229,0.08); }
.sg-search-wrap .sg-search-icon {
  position: absolute; left: 12px; top: 50%;
  transform: translateY(-50%); font-size: 13px; color: var(--text-light); pointer-events: none;
}

.sg-filter-select {
  padding: 8px 26px 8px 12px; border: 2px solid var(--border);
  border-radius: 22px; font-size: 12px; background: #fff;
  color: var(--text); outline: none; cursor: pointer;
  transition: var(--sg-transition); font-family: inherit;
  white-space: nowrap; min-width: 0;
  -webkit-appearance: none; appearance: none;
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%2394A3B8' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M2 5l6 6 6-6'/%3e%3c/svg%3e");
  background-repeat: no-repeat; background-position: right 6px center;
  background-size: 12px;
}
.sg-filter-select:focus { border-color: var(--sg-primary); }

.sg-result-count {
  font-size: 11px; color: var(--text-light); white-space: nowrap;
}
.sg-clear-filter {
  font-size: 11px; color: var(--sg-primary); cursor: pointer;
  font-weight: 600; white-space: nowrap; padding: 4px 0;
  background: none; border: none; font-family: inherit; display: none;
}
.sg-clear-filter.show { display: inline-block; }

.sg-btn-compare {
  padding: 8px 14px; border-radius: 22px; border: 2px solid var(--sg-primary);
  background: #fff; color: var(--sg-primary); font-size: 12px;
  font-weight: 700; cursor: pointer; transition: var(--sg-transition);
  white-space: nowrap; font-family: inherit;
  display: flex; align-items: center; gap: 4px;
  -webkit-tap-highlight-color: transparent;
}
.sg-btn-compare:active { background: var(--sg-primary); color: #fff; transform: scale(0.95); }
.sg-btn-compare.active { background: var(--sg-danger); color: #fff; border-color: var(--sg-danger); }

/* 对比栏 */
.sg-compare-bar {
  display: none; background: var(--sg-primary-bg);
  border-radius: 12px; padding: 10px 14px; margin-bottom: 12px;
  align-items: center; gap: 8px; flex-wrap: wrap;
  border: 2px solid #C7D2FE; animation: sgFadeInUp 0.3s ease;
}
.sg-compare-bar.show { display: flex; }
.sg-compare-label { font-weight: 700; font-size: 12px; color: var(--sg-primary); white-space: nowrap; }
.sg-compare-slot {
  padding: 5px 12px; border-radius: 18px; font-size: 11px;
  border: 2px dashed #A5B4FC; color: var(--text-light);
  background: #fff; cursor: default; min-width: 60px; text-align: center;
  transition: var(--sg-transition);
}
.sg-compare-slot.filled {
  border-style: solid; border-color: var(--sg-primary);
  background: var(--sg-primary); color: #fff; font-weight: 700;
  display: flex; align-items: center; gap: 3px;
}
.sg-compare-slot.filled button {
  background: none; border: none; color: #fff; cursor: pointer;
  font-size: 13px; line-height: 1; padding: 0; margin-left: 2px;
}
.sg-btn-do-compare {
  padding: 7px 16px; border-radius: 20px; border: none;
  background: linear-gradient(135deg, var(--sg-primary), var(--sg-purple));
  color: #fff; font-size: 12px; font-weight: 700; cursor: pointer;
  transition: var(--sg-transition); white-space: nowrap;
  font-family: inherit; box-shadow: 0 3px 10px rgba(79,70,229,0.25);
  margin-left: auto;
}
.sg-btn-do-compare:disabled { opacity: 0.35; cursor: not-allowed; box-shadow: none; }
.sg-btn-do-compare:not(:disabled):active { transform: scale(0.95); }
.sg-btn-cancel-compare {
  padding: 7px 14px; border-radius: 20px; border: 1px solid var(--border);
  background: #fff; color: var(--text-secondary); font-size: 12px;
  cursor: pointer; white-space: nowrap; font-family: inherit; transition: var(--sg-transition);
}

/* ========== 学校卡片网格 ========== */
.sg-school-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px; margin-bottom: 20px;
}
.sg-school-card {
  background: #fff; border-radius: var(--sg-radius);
  padding: 16px; border: 1px solid var(--border);
  box-shadow: var(--shadow-sm); transition: var(--sg-transition);
  position: relative; overflow: hidden; cursor: default;
  display: flex; flex-direction: column;
}
.sg-school-card:active { transform: scale(0.985); }
.sg-school-card.hidden { display: none; }
.sg-school-card-top {
  display: flex; justify-content: space-between; align-items: flex-start;
  gap: 10px; margin-bottom: 8px;
}
.sg-school-card-left { display: flex; align-items: center; gap: 10px; min-width: 0; flex: 1; }
.sg-school-avatar {
  width: 44px; height: 44px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 16px; font-weight: 900; color: #fff; flex-shrink: 0;
}
.sg-school-avatar.province { background: linear-gradient(135deg, #4F46E5, #818CF8); }
.sg-school-avatar.city { background: linear-gradient(135deg, #059669, #34D399); }
.sg-school-avatar.district { background: linear-gradient(135deg, #F59E0B, #FBBF24); }

.sg-school-name {
  font-size: 14px; font-weight: 800; color: var(--text);
  margin: 0; line-height: 1.3;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.sg-school-type-badge {
  display: inline-block; margin-top: 3px;
  padding: 2px 8px; border-radius: 16px;
  font-size: 10px; font-weight: 700;
}
.sg-school-type-badge.province { background: #DBEAFE; color: #1E40AF; }
.sg-school-type-badge.city { background: #D1FAE5; color: #065F46; }
.sg-school-type-badge.district { background: #FEF3C7; color: #92400E; }

.sg-school-score-box {
  text-align: center; flex-shrink: 0;
  background: linear-gradient(135deg, #EEF2FF, #F5F3FF);
  border-radius: 10px; padding: 6px 12px; min-width: 60px;
}
.sg-school-score { font-size: 20px; font-weight: 900; color: var(--sg-primary); line-height: 1.2; }
.sg-school-score-label { font-size: 9px; color: var(--text-secondary); }

.sg-school-desc {
  font-size: 11px; color: var(--text-secondary);
  line-height: 1.5; margin: 0 0 8px;
  display: -webkit-box; -webkit-line-clamp: 2;
  -webkit-box-orient: vertical; overflow: hidden; flex: 1;
}
.sg-school-tags { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 8px; }
.sg-school-tag {
  display: inline-block; padding: 3px 8px; border-radius: 10px;
  font-size: 10px; font-weight: 600;
}
.sg-school-tag.tag-blue { background: #DBEAFE; color: #1E40AF; }
.sg-school-tag.tag-green { background: #D1FAE5; color: #065F46; }
.sg-school-tag.tag-purple { background: #EDE9FE; color: #6D28D9; }
.sg-school-tag.tag-orange { background: #FEF3C7; color: #92400E; }
.sg-school-tag.tag-pink { background: #FCE7F3; color: #BE185D; }

.sg-school-actions { display: flex; gap: 6px; margin-top: auto; }
.sg-school-btn {
  padding: 6px 12px; border-radius: 16px; border: 1px solid var(--border);
  font-size: 11px; font-weight: 600; cursor: pointer;
  transition: var(--sg-transition); font-family: inherit;
  background: #F8FAFC; color: var(--text);
  display: flex; align-items: center; gap: 3px;
  -webkit-tap-highlight-color: transparent;
}
.sg-school-btn:active { transform: scale(0.95); }
.sg-school-btn.sg-btn-primary { background: var(--sg-primary); color: #fff; border-color: var(--sg-primary); }
.sg-school-btn.sg-btn-compare { display: none; }
.sg-school-btn.sg-btn-compare.visible { display: flex; }
.sg-school-btn.sg-btn-compare.selected {
  background: var(--sg-primary); color: #fff; border-color: var(--sg-primary);
}

/* 匹配高亮 */
.sg-school-card.match-highlight {
  border-color: var(--sg-primary);
  box-shadow: 0 0 0 2px rgba(79,70,229,0.12);
}
.sg-match-badge {
  position: absolute; top: -1px; right: -1px;
  padding: 4px 10px; border-radius: 0 14px 0 12px;
  font-size: 9px; font-weight: 800; color: #fff; z-index: 2;
}
.sg-match-badge.rush { background: linear-gradient(135deg, var(--sg-danger), #F97316); }
.sg-match-badge.steady { background: linear-gradient(135deg, var(--sg-primary), var(--sg-purple)); }
.sg-match-badge.safe { background: linear-gradient(135deg, var(--sg-success), var(--sg-info)); }

/* ========== 详情弹窗（底部滑入） ========== */
.sg-modal-overlay {
  display: none; position: fixed; inset: 0;
  z-index: 9999; background: rgba(0,0,0,0.45);
  backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px);
  align-items: flex-end; justify-content: center;
  animation: sgFadeIn 0.2s ease;
}
.sg-modal-overlay.show { display: flex; }
.sg-modal {
  background: #fff; border-radius: 20px 20px 0 0;
  width: 100%; max-height: 85vh; overflow-y: auto;
  padding: 22px 18px 28px; position: relative;
  animation: sgSlideUp 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 -10px 40px rgba(0,0,0,0.1);
}
.sg-modal-close {
  position: absolute; top: 12px; right: 14px;
  width: 30px; height: 30px; border-radius: 50%;
  background: #F1F5F9; border: none; font-size: 16px;
  cursor: pointer; display: flex; align-items: center;
  justify-content: center; color: var(--text-secondary);
  transition: var(--sg-transition); z-index: 1;
  -webkit-tap-highlight-color: transparent;
}
.sg-modal-close:active { background: #E2E8F0; transform: scale(0.9); }
.sg-modal-header {
  display: flex; align-items: center; gap: 12px; margin-bottom: 16px;
}
.sg-modal-avatar {
  width: 50px; height: 50px; border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px; font-weight: 900; color: #fff; flex-shrink: 0;
}
.sg-modal-stats {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 8px; background: #F8FAFC; border-radius: 12px;
  padding: 12px; margin-bottom: 14px; text-align: center;
}
.sg-modal-stat-num { font-size: 18px; font-weight: 900; color: var(--sg-primary); line-height: 1.2; }
.sg-modal-stat-label { font-size: 10px; color: var(--text-secondary); margin-top: 2px; }
.sg-modal-desc { font-size: 13px; color: var(--text); line-height: 1.7; margin-bottom: 12px; }
.sg-modal-subtitle { font-size: 12px; font-weight: 700; color: var(--text); margin-bottom: 5px; }
.sg-modal-tags { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 12px; }
.sg-modal-info-row {
  display: flex; align-items: flex-start; gap: 6px;
  margin-bottom: 6px; font-size: 12px; color: var(--text-secondary);
}
.sg-modal-info-row .icon { flex-shrink: 0; margin-top: 1px; }

/* ========== FAQ 区域 ========== */
.sg-faq-search {
  margin-bottom: 12px; position: relative;
}
.sg-faq-search input {
  width: 100%; padding: 10px 14px 10px 38px;
  border: 2px solid var(--border); border-radius: 22px;
  font-size: 13px; font-family: inherit; outline: none;
  transition: var(--sg-transition); box-sizing: border-box;
  -webkit-appearance: none;
}
.sg-faq-search input:focus { border-color: var(--sg-primary); box-shadow: 0 0 0 3px rgba(79,70,229,0.08); }
.sg-faq-search-icon { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); font-size: 15px; pointer-events: none; }
.sg-faq-list { margin-bottom: 20px; }
.sg-faq-item {
  background: #fff; border-radius: 12px;
  margin-bottom: 6px; border: 1px solid var(--border);
  overflow: hidden; transition: var(--sg-transition);
}
.sg-faq-item.hidden { display: none; }
.sg-faq-q {
  display: flex; align-items: center; gap: 8px;
  padding: 12px 14px; cursor: pointer;
  user-select: none; -webkit-tap-highlight-color: transparent;
}
.sg-faq-q .q-num {
  font-size: 12px; font-weight: 900; color: var(--sg-primary);
  flex-shrink: 0; min-width: 20px;
}
.sg-faq-q .q-text { flex: 1; font-size: 13px; font-weight: 600; color: var(--text); line-height: 1.4; }
.sg-faq-q .q-arrow {
  font-size: 12px; color: var(--text-light); flex-shrink: 0;
  transition: transform 0.3s ease;
}
.sg-faq-item.open .q-arrow { transform: rotate(180deg); }
.sg-faq-item.open { border-color: var(--sg-primary); box-shadow: 0 3px 10px rgba(79,70,229,0.08); }
.sg-faq-a {
  max-height: 0; overflow: hidden; transition: max-height 0.4s ease, padding 0.4s ease;
}
.sg-faq-item.open .sg-faq-a { max-height: 500px; }
.sg-faq-a-inner {
  padding: 0 14px 14px; font-size: 12px; color: var(--text-secondary);
  line-height: 1.7;
}

/* ========== CTA 咨询卡片 ========== */
.sg-cta {
  background: linear-gradient(135deg, #EEF2FF, #F5F3FF);
  border-radius: var(--sg-radius); padding: 28px 18px;
  text-align: center; margin: 20px 0 60px;
  border: 2px solid #C7D2FE;
}
.sg-cta-icon { font-size: 42px; margin-bottom: 10px; }
.sg-cta h3 { font-size: 17px; font-weight: 800; margin: 0 0 6px; }
.sg-cta p { font-size: 12px; color: var(--text-secondary); margin: 0 0 18px; line-height: 1.6; }
.sg-cta .btn { display: inline-flex; align-items: center; gap: 6px; }

/* ========== 回到顶部 ========== */
.sg-back-top {
  position: fixed; bottom: 96px; right: 16px; z-index: 99;
  width: 40px; height: 40px; border-radius: 50%;
  background: var(--sg-primary); color: #fff; border: none;
  font-size: 18px; cursor: pointer; opacity: 0;
  transform: translateY(16px); transition: var(--sg-transition);
  box-shadow: 0 4px 14px rgba(79,70,229,0.35);
  display: flex; align-items: center; justify-content: center;
  pointer-events: none;
  -webkit-tap-highlight-color: transparent;
}
.sg-back-top.show { opacity: 1; transform: translateY(0); pointer-events: auto; }
.sg-back-top:active { transform: scale(0.85); }

/* ========== Toast ========== */
.sg-toast {
  position: fixed; bottom: 100px; left: 50%; transform: translateX(-50%) translateY(80px);
  background: var(--text); color: #fff; padding: 10px 20px;
  border-radius: 22px; font-size: 12px; font-weight: 600;
  z-index: 9999; opacity: 0; transition: var(--sg-transition);
  box-shadow: 0 6px 24px rgba(0,0,0,0.2); pointer-events: none;
}
.sg-toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ========== 空状态 ========== */
.sg-empty {
  text-align: center; padding: 36px 16px;
}
.sg-empty-icon { font-size: 40px; margin-bottom: 10px; }
.sg-empty h3 { font-size: 15px; font-weight: 700; color: var(--text); margin: 0 0 4px; }
.sg-empty p { font-size: 12px; color: var(--text-secondary); margin: 0; }

/* ========== 动画关键帧 ========== */
@keyframes sgFadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes sgFadeInUp {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes sgSlideUp {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}
@keyframes sgFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-5px); }
}
@keyframes sgPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.06); }
}

/* =================================================================
   响应式断点
   ================================================================= */

/* 小屏手机 (width < 360px) */
@media (max-width: 359px) {
  .sg-hero { padding: 24px 12px 28px; border-radius: 0 0 20px 20px; }
  .sg-hero h1 { font-size: 20px; }
  .sg-hero > p { font-size: 11px; }
  .sg-hero-stat { padding: 8px 10px; min-width: 60px; }
  .sg-hero-stat-num { font-size: 18px; }
  .sg-hero-stat-label { font-size: 9px; }
  .sg-countdown { padding: 10px 12px; gap: 6px; }
  .sg-countdown-num { font-size: 24px; }
  .sg-section { font-size: 16px; }
  .sg-toolbar-inner { gap: 4px; }
  .sg-filter-select { padding: 6px 22px 6px 8px; font-size: 10px; }
  .sg-search-wrap input { font-size: 10px; }
  .sg-school-card { padding: 12px; }
  .sg-school-avatar { width: 38px; height: 38px; font-size: 14px; }
  .sg-school-name { font-size: 13px; }
  .sg-school-score { font-size: 18px; }
}

/* 平板 (>=480px) */
@media (min-width: 480px) {
  .sg-hero { padding: 40px 20px 44px; }
  .sg-hero h1 { font-size: 28px; }
  .sg-hero > p { font-size: 14px; }

  .enroll-methods { grid-template-columns: repeat(3, 1fr) !important; }
  .strategy-grid { grid-template-columns: repeat(3, 1fr) !important; }
  .sg-school-grid { grid-template-columns: repeat(2, 1fr); }

  .sg-matcher-input-row { gap: 10px; }
  .sg-matcher-input { min-width: 180px; }
  .sg-match-bar-wrap { display: block; flex: 2; min-width: 60px; height: 5px; background: #F1F5F9; border-radius: 10px; overflow: hidden; }
  .sg-match-bar { height: 100%; border-radius: 10px; transition: width 0.8s ease; }
}

/* 中等屏幕 (>=768px) */
@media (min-width: 768px) {
  /* 修复 main-content padding 变化后 Hero margin */
  .sg-hero {
    margin: -24px -24px 20px;
    padding: 52px 28px 56px;
    border-radius: 0 0 36px 36px;
  }
  .sg-hero h1 { font-size: 32px; }
  .sg-hero > p { font-size: 15px; max-width: 480px; }
  .sg-hero-stat { padding: 12px 20px; }
  .sg-hero-stat-num { font-size: 24px; }

  .sg-toolbar.scrolled { margin: -10px -24px 12px; padding: 10px 24px 8px; }

  /* 弹窗居中 */
  .sg-modal {
    border-radius: 20px; max-width: 520px;
    margin: auto; max-height: 80vh;
  }
  .sg-modal-overlay { align-items: center; }
}

/* 大屏 (>=1024px) */
@media (min-width: 1024px) {
  .sg-school-grid { grid-template-columns: repeat(3, 1fr); }
}

/* ========== 暗色模式 ========== */
@media (prefers-color-scheme: dark) {
  .sg-countdown,
  .sg-school-card,
  .enroll-method-card,
  .strategy-card,
  .sg-timeline-wrap,
  .sg-faq-item,
  .sg-match-school,
  .sg-tl-content { background: #1E293B; border-color: #334155; }

  .sg-matcher { background: rgba(79,70,229,0.08); border-color: rgba(129,140,248,0.2); }
  .sg-quote { background: rgba(245,158,11,0.08); border-color: rgba(251,191,36,0.2); }
  .sg-cta { background: rgba(79,70,229,0.06); border-color: rgba(129,140,248,0.2); }
  .sg-compare-bar { background: rgba(79,70,229,0.1); border-color: rgba(129,140,248,0.3); }

  .sg-search-wrap input,
  .sg-filter-select,
  .sg-faq-search input,
  .sg-matcher-input { background: #1E293B; color: #E2E8F0; border-color: #334155; }

  .sg-toolbar { background: #0F172A; }
  .sg-toolbar.scrolled { background: rgba(15,23,42,0.92); }

  .sg-tl-content { background: #0F172A; }
  .sg-tl-item:hover .sg-tl-content,
  .sg-tl-item:active .sg-tl-content { background: rgba(79,70,229,0.12); }

  .sg-school-score-box { background: rgba(79,70,229,0.12); }
  .sg-modal { background: #1E293B; }
  .sg-modal-stats { background: #0F172A; }
  .sg-modal-close { background: #334155; color: #E2E8F0; }

  .sg-countdown-bar-wrap { background: #334155; }
  .enroll-detail li { border-bottom-color: #334155; }
}

/* ========== 打印样式 ========== */
@media print {
  .sg-toolbar, .sg-compare-bar, .sg-back-top,
  .sg-quick-nav, .sg-matcher, .sg-hero-stats,
  .top-header, .bottom-nav, .float-call-btn, .float-consult-btn,
  .sg-school-actions, .sg-cta, .sg-faq-search,
  .sg-modal-overlay { display: none !important; }
  .sg-hero { background: #fff !important; color: #000 !important; margin: 0; border-radius: 0; }
  .sg-hero h1, .sg-hero p { color: #000 !important; text-shadow: none !important; }
  .sg-school-card { break-inside: avoid; box-shadow: none; border: 1px solid #ccc; }
  .sg-school-grid { grid-template-columns: repeat(2, 1fr); gap: 6px; }
}
