:root {
  --brand: #185FA5;
  --brand-light: #E6F1FB;
  --accent: #0F6E56;
  --bg: #F4F6F9;
  --card: #FFFFFF;
  --text: #1F2329;
  --text-2: #646A73;
  --text-3: #8F959E;
  --border: #E5E8EC;
  --danger: #A32D2D;
  --radius: 12px;
}
* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { font-size: 16px; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Helvetica Neue", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  padding-bottom: 64px;
}
a { color: var(--brand); text-decoration: none; }
.page { max-width: 640px; margin: 0 auto; }

/* 顶部头 */
.topbar {
  background: linear-gradient(135deg, #185FA5 0%, #2C7BC9 100%);
  color: #fff;
  padding: 18px 16px 16px;
}
.topbar h1 { font-size: 18px; font-weight: 600; }
.topbar .sub { font-size: 12px; opacity: .85; margin-top: 2px; }
.topbar .sub a { color: #fff; }

/* 搜索区 */
.search-wrap { padding: 14px 16px 18px; background: #fff; border-bottom: 1px solid var(--border); }
.search-row { display: flex; gap: 8px; }
.search-input {
  flex: 1; height: 42px; border: 1.5px solid var(--border); border-radius: 21px;
  padding: 0 16px; font-size: 15px; outline: none; background: var(--bg); color: var(--text);
}
.search-input:focus { border-color: var(--brand); background: #fff; }
.search-btn {
  height: 42px; padding: 0 20px; border: none; border-radius: 21px;
  background: var(--brand); color: #fff; font-size: 15px; font-weight: 500;
}
.search-btn:active { opacity: .85; }
.tab-switch { display: flex; gap: 8px; margin-bottom: 12px; }
.tab-switch button {
  flex: 1; height: 34px; border-radius: 8px; border: 1px solid var(--border);
  background: var(--bg); color: var(--text-2); font-size: 14px;
}
.tab-switch button.on { background: var(--brand-light); border-color: var(--brand); color: var(--brand); font-weight: 500; }

/* 热词与宫格 */
.hot-words { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.hot-words .tag {
  font-size: 13px; color: var(--text-2); background: var(--bg);
  border-radius: 14px; padding: 4px 12px;
}
.section { padding: 16px; }
.section-title { font-size: 15px; font-weight: 600; margin-bottom: 10px; }
.region-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.region-grid a {
  background: #fff; border: 1px solid var(--border); border-radius: 8px;
  text-align: center; padding: 10px 0; font-size: 13px; color: var(--text-2);
}
.quick-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.quick-card {
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius);
  padding: 14px 8px; text-align: center; color: var(--text);
}
.quick-card .ic { font-size: 22px; line-height: 1; margin-bottom: 6px; }
.quick-card .t { font-size: 13px; font-weight: 500; }
.quick-card .d { font-size: 11px; color: var(--text-3); }
.quick-card.disabled { opacity: .55; }

/* 筛选条 */
.filter-bar { background: #fff; padding: 10px 16px; border-bottom: 1px solid var(--border); }
.filter-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.filter-row + .filter-row { margin-top: 8px; }
.filter-label { font-size: 12px; color: var(--text-3); flex-shrink: 0; }
.chip {
  font-size: 13px; padding: 4px 12px; border-radius: 14px;
  border: 1px solid var(--border); color: var(--text-2); background: #fff; cursor: pointer;
}
.chip.on { background: var(--brand-light); border-color: var(--brand); color: var(--brand); font-weight: 500; }
select.chip { height: 30px; padding: 0 8px; background: #fff; }

/* 列表卡片 */
.list { padding: 12px 16px; }
.card {
  background: var(--card); border-radius: var(--radius); border: 1px solid var(--border);
  padding: 14px; margin-bottom: 10px; display: block; color: var(--text);
}
.card:active { background: #FAFBFC; }
.card .name { font-size: 16px; font-weight: 600; }
.card .meta { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.badge {
  font-size: 11px; padding: 2px 8px; border-radius: 4px;
  background: var(--brand-light); color: var(--brand);
}
.badge.lv-zhongzhi { background: #F4C0D1; color: #993556; }
.badge.lv-gaozhi { background: #B5D4F4; color: #0C447C; }
.badge.lv-jigong { background: #C0DD97; color: #27500A; }
.badge.mban { background: #F1EFE8; color: #854F0B; }
.badge.gongban { background: #E1F5EE; color: #0F6E56; }
.badge.ad { background: #A32D2D; color: #fff; font-weight: 500; }
.card .desc { font-size: 13px; color: var(--text-2); margin-top: 8px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card .extra { font-size: 12px; color: var(--text-3); margin-top: 6px; }
.empty { text-align: center; color: var(--text-3); font-size: 14px; padding: 48px 0; }

/* 详情页 */
.detail-head { background: #fff; padding: 18px 16px; border-bottom: 1px solid var(--border); }
.detail-head .name { font-size: 20px; font-weight: 600; }
.detail-head .meta { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.info-block { background: #fff; border-radius: var(--radius); border: 1px solid var(--border); padding: 14px 16px; margin: 12px 16px; }
.info-block h3 { font-size: 15px; font-weight: 600; margin-bottom: 10px; }
.kv { display: flex; font-size: 14px; padding: 6px 0; border-bottom: 1px dashed var(--border); }
.kv:last-child { border-bottom: none; }
.kv .k { width: 88px; flex-shrink: 0; color: var(--text-3); font-size: 13px; }
.kv .v { flex: 1; color: var(--text); word-break: break-all; }
.info-block p { font-size: 14px; color: var(--text-2); }
.career-list li { font-size: 14px; color: var(--text-2); margin: 6px 0 6px 18px; }
.disclaimer {
  font-size: 11px; color: var(--text-3); text-align: center; padding: 16px; line-height: 1.7;
}
.cta {
  display: block; margin: 12px 16px; padding: 12px; text-align: center;
  background: var(--brand-light); color: var(--brand); border-radius: var(--radius);
  font-size: 14px; font-weight: 500;
}
.cta:active { opacity: .8; }

/* 测试壳 */
.test-hero {
  background: linear-gradient(135deg, #534AB7 0%, #7F77DD 100%);
  color: #fff; margin: 16px; border-radius: 16px; padding: 28px 20px; text-align: center;
}
.test-hero .t { font-size: 20px; font-weight: 600; }
.test-hero .d { font-size: 13px; opacity: .9; margin-top: 8px; }
.test-hero .soon {
  display: inline-block; margin-top: 16px; font-size: 13px; padding: 8px 24px;
  background: rgba(255,255,255,.18); border-radius: 18px;
}

/* 底部 TabBar */
.tabbar {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 100;
  background: #fff; border-top: 1px solid var(--border);
  display: flex; max-height: 64px;
}
.tabbar .inner { display: flex; width: 100%; max-width: 640px; margin: 0 auto; }
.tabbar a {
  flex: 1; text-align: center; padding: 8px 0 6px; color: var(--text-3); font-size: 11px;
}
.tabbar a .ic { font-size: 20px; line-height: 1.2; display: block; }
.tabbar a.on { color: var(--brand); }

.count-note { font-size: 12px; color: var(--text-3); padding: 8px 16px 0; }

/* ===== V2 职业测试 ===== */
.test-stage { padding: 16px; }
.test-progress { height: 6px; background: var(--border); border-radius: 3px; overflow: hidden; margin: 4px 16px 14px; }
.test-progress > i { display: block; height: 100%; background: linear-gradient(90deg,#534AB7,#7F77DD); transition: width .25s; }
.test-progress-txt { font-size: 12px; color: var(--text-3); text-align: center; margin-top: -6px; }
.q-text { font-size: 17px; font-weight: 600; line-height: 1.55; margin: 6px 16px 18px; }
.opt-btn {
  display: block; width: 100%; text-align: left; background: #fff; border: 1.5px solid var(--border);
  border-radius: var(--radius); padding: 16px 16px; margin: 0 16px 12px; font-size: 15px; color: var(--text);
  cursor: pointer; transition: .15s;
}
.opt-btn:active { border-color: #534AB7; background: #F3F1FC; transform: scale(.99); }
.opt-btn .ix { display: inline-block; width: 22px; height: 22px; line-height: 22px; text-align: center;
  border-radius: 50%; background: var(--brand-light); color: var(--brand); font-size: 13px; margin-right: 10px; font-weight: 600; }
.test-actions { padding: 8px 16px 0; }
.btn-primary {
  display: block; width: 100%; border: none; border-radius: var(--radius); padding: 14px;
  background: linear-gradient(135deg,#534AB7,#7F77DD); color: #fff; font-size: 16px; font-weight: 600; cursor: pointer;
}
.btn-primary:active { opacity: .88; }
.btn-ghost {
  display: block; width: 100%; border: 1px solid var(--border); border-radius: var(--radius); padding: 12px;
  background: #fff; color: var(--text-2); font-size: 14px; margin-top: 10px; cursor: pointer;
}

/* 结果页 */
.result-hero { background: linear-gradient(135deg,#534AB7,#7F77DD); color:#fff; margin:16px; border-radius:16px; padding:22px 20px; }
.result-hero .t { font-size: 14px; opacity:.9; }
.result-hero .code { font-size: 30px; font-weight: 700; letter-spacing: 2px; margin: 8px 0 4px; }
.result-hero .code small { font-size: 14px; font-weight: 500; opacity:.9; margin-left:8px; letter-spacing:0; }
.result-hero .desc { font-size: 13px; opacity: .92; margin-top: 8px; line-height: 1.6; }
.holland-tags { display:flex; flex-wrap:wrap; gap:8px; padding: 0 16px 4px; }
.holland-tags .ht { font-size:13px; padding:5px 12px; border-radius:14px; color:#fff; font-weight:500; }
.ht-R{background:#C0563B;} .ht-I{background:#2C7BC9;} .ht-A{background:#9B4FB0;}
.ht-S{background:#0F9D6B;} .ht-E{background:#D98A1F;} .ht-C{background:#5B6B7B;}
.match-card { background:#fff; border:1px solid var(--border); border-radius:var(--radius); padding:14px; margin:10px 16px; }
.match-card .top { display:flex; justify-content:space-between; align-items:baseline; gap:8px; }
.match-card .mn { font-size:16px; font-weight:600; }
.match-card .match { font-size:12px; color:#0F6E56; background:#E1F5EE; padding:2px 8px; border-radius:10px; white-space:nowrap; }
.match-card .reason { font-size:13px; color:var(--text-2); margin-top:6px; }
.match-card .schools { margin-top:10px; border-top:1px dashed var(--border); padding-top:10px; }
.match-card .school-row { display:flex; justify-content:space-between; align-items:center; font-size:13px; padding:4px 0; }
.match-card .school-row .sn { color:var(--text); }
.match-card .school-row .sc { color:var(--text-3); font-size:12px; }
.match-card .school-row .ad { background:#A32D2D; color:#fff; font-size:10px; padding:1px 6px; border-radius:8px; margin-left:6px; }
.pre-major { background:#FFF7E8; border:1px solid #F0D8A0; border-radius:var(--radius); padding:14px; margin:12px 16px; font-size:14px; }
.pre-major b { color:#854F0B; }
