/* ============ 傲雪苍松 · 样式（移动端优先） ============ */
:root {
  --primary: #2f6bff;
  --primary-dark: #1f4fd6;
  --primary-light: #e8efff;
  --orange: #ff7a2f;
  --orange-light: #fff0e6;
  --green: #18b566;
  --green-light: #e6f7ee;
  --red: #e5484d;
  --bg: #f4f6fb;
  --card: #ffffff;
  --text: #1f2430;
  --text-2: #5b6472;
  --text-3: #9aa3b2;
  --line: #e8ebf2;
  --radius: 14px;
  --shadow: 0 2px 10px rgba(31, 60, 130, .06);
}
* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
/* C-042 修复：hidden 属性优先于 display:flex 等声明，防止隐形遮罩拦截点击 */
[hidden] { display: none !important; }
html, body { height: 100%; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
  background: var(--bg); color: var(--text);
  max-width: 480px; margin: 0 auto;
}
#app { min-height: 100vh; display: flex; flex-direction: column; }

/* ============ 顶部栏 ============ */
#topbar {
  position: sticky; top: 0; z-index: 50;
  background: linear-gradient(135deg, #2f6bff 0%, #4a8bff 100%);
  color: #fff; padding: 14px 16px 20px;
  box-shadow: 0 2px 8px rgba(47,107,255,.25);
}
#topbar-title { font-size: 20px; font-weight: 700; letter-spacing: 1px; }
#topbar-sub { font-size: 12px; opacity: .85; margin-top: 2px; }

/* ============ 主视图 ============ */
#view { flex: 1; padding: 12px 14px 78px; }
.loading, .empty { text-align: center; color: var(--text-3); padding: 48px 0; font-size: 14px; }

/* ============ 卡片 ============ */
.card {
  background: var(--card); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 14px; margin-bottom: 12px;
  border: 1px solid var(--line);
}
.card-title { font-size: 15px; font-weight: 700; margin-bottom: 10px; display: flex; align-items: center; gap: 6px; }

/* ============ 首页 ============ */
.countdown {
  background: linear-gradient(135deg, #ff7a2f, #ff9a5c);
  border-radius: var(--radius); color: #fff; padding: 18px 16px;
  margin-bottom: 12px; box-shadow: 0 4px 14px rgba(255,122,47,.3);
}
.countdown .cd-label { font-size: 13px; opacity: .92; }
.countdown .cd-num { font-size: 40px; font-weight: 800; margin: 4px 0 2px; font-variant-numeric: tabular-nums; }
.countdown .cd-target { font-size: 12px; opacity: .88; }

.quick-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-bottom: 12px; }
.quick-item {
  background: var(--card); border-radius: 12px; padding: 12px 4px; text-align: center;
  box-shadow: var(--shadow); border: 1px solid var(--line); cursor: pointer;
}
.quick-item .q-ic { font-size: 22px; display: block; margin-bottom: 4px; }
.quick-item .q-tx { font-size: 12px; color: var(--text-2); }

.tag { display: inline-block; font-size: 11px; padding: 2px 8px; border-radius: 20px; background: var(--primary-light); color: var(--primary-dark); margin-right: 4px; }
.tag.orange { background: var(--orange-light); color: var(--orange); }
.tag.green { background: var(--green-light); color: var(--green); }

.list-item { padding: 12px 0; border-bottom: 1px solid var(--line); cursor: pointer; }
.list-item:last-child { border-bottom: none; }
.list-item .li-title { font-size: 14px; font-weight: 600; }
.list-item .li-meta { font-size: 12px; color: var(--text-3); margin-top: 4px; }

/* ============ 题库 ============ */
.subject-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.subject-item {
  background: var(--card); border-radius: 12px; padding: 16px 8px; text-align: center;
  box-shadow: var(--shadow); border: 1px solid var(--line); cursor: pointer;
}
.subject-item .s-ic { font-size: 26px; display: block; margin-bottom: 6px; }
.subject-item .s-tx { font-size: 13px; font-weight: 600; }
.subject-item .s-cnt { font-size: 11px; color: var(--text-3); margin-top: 2px; }

.quiz-progress { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text-2); margin-bottom: 10px; }
.quiz-progress .bar { flex: 1; height: 6px; border-radius: 3px; background: var(--line); overflow: hidden; }
.quiz-progress .bar-inner { height: 100%; background: var(--primary); border-radius: 3px; transition: width .3s; }

.quiz-q { font-size: 16px; font-weight: 600; line-height: 1.6; margin-bottom: 14px; }
.opt {
  display: block; width: 100%; text-align: left;
  background: var(--card); border: 1.5px solid var(--line); border-radius: 12px;
  padding: 12px 14px; font-size: 14px; color: var(--text); margin-bottom: 10px; cursor: pointer;
  transition: all .15s;
}
.opt:active { transform: scale(.99); }
.opt.correct { border-color: var(--green); background: var(--green-light); color: var(--green); font-weight: 600; }
.opt.wrong { border-color: var(--red); background: #fdeeee; color: var(--red); }

.analysis { background: var(--primary-light); border-radius: 12px; padding: 12px; font-size: 13px; line-height: 1.7; margin-top: 6px; }
.analysis b { color: var(--primary-dark); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  border: none; border-radius: 12px; padding: 12px 20px; font-size: 14px; font-weight: 600; cursor: pointer;
  transition: opacity .15s;
}
.btn:active { opacity: .8; }
.btn-primary { background: var(--primary); color: #fff; }
.btn-orange { background: var(--orange); color: #fff; }
.btn-ghost { background: #fff; color: var(--primary); border: 1.5px solid var(--primary); }
.btn-block { width: 100%; }
.btn-sm { padding: 7px 14px; font-size: 13px; border-radius: 9px; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }

.score-big { font-size: 44px; font-weight: 800; color: var(--primary); text-align: center; }
.score-sub { text-align: center; color: var(--text-2); font-size: 13px; margin: 4px 0 14px; }

/* ============ 表单 ============ */
.field { margin-bottom: 12px; }
.field label { display: block; font-size: 13px; color: var(--text-2); margin-bottom: 6px; }
.field input, .field select, .field textarea {
  width: 100%; border: 1.5px solid var(--line); border-radius: 10px;
  padding: 11px 12px; font-size: 14px; background: #fff; color: var(--text);
}
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--primary); }
.field textarea { min-height: 80px; resize: vertical; }

/* ============ 院校 ============ */
.filter-bar { display: flex; gap: 8px; margin-bottom: 12px; overflow-x: auto; padding-bottom: 4px; }
.filter-chip {
  flex-shrink: 0; padding: 7px 14px; border-radius: 20px; font-size: 13px;
  background: #fff; border: 1px solid var(--line); color: var(--text-2); cursor: pointer;
}
.filter-chip.on { background: var(--primary); color: #fff; border-color: var(--primary); }

.school-item { display: flex; justify-content: space-between; align-items: center; }
.school-item .si-main { flex: 1; min-width: 0; }
.school-item .si-name { font-size: 15px; font-weight: 700; }
.school-item .si-meta { font-size: 12px; color: var(--text-3); margin-top: 4px; }
.school-item .si-score { text-align: right; flex-shrink: 0; margin-left: 10px; }
.school-item .si-score .sc { font-size: 16px; font-weight: 800; color: var(--orange); }
.school-item .si-score .sl { font-size: 11px; color: var(--text-3); }
.school-item .fav { font-size: 18px; padding: 6px; cursor: pointer; flex-shrink: 0; }

.detail-row { display: flex; padding: 8px 0; border-bottom: 1px dashed var(--line); font-size: 13px; }
.detail-row:last-child { border-bottom: none; }
.detail-row .dr-k { width: 84px; color: var(--text-3); flex-shrink: 0; }
.detail-row .dr-v { flex: 1; color: var(--text); line-height: 1.6; }

/* ============ 位次换算 ============ */
.rank-result { text-align: center; padding: 6px 0; }
.rank-result .rr-num { font-size: 36px; font-weight: 800; color: var(--orange); }
.rank-result .rr-tip { font-size: 12px; color: var(--text-3); margin-top: 4px; }
.ladder { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; }
.ladder-item { border-radius: 12px; padding: 10px 12px; font-size: 13px; line-height: 1.7; }
.ladder-item .ld-t { font-weight: 700; margin-bottom: 4px; display: flex; align-items: center; gap: 6px; }
.ladder-chong { background: #fdeeee; border: 1px solid #f5c6c7; }
.ladder-chong .ld-t { color: var(--red); }
.ladder-wen { background: #fff6e8; border: 1px solid #f3dcb5; }
.ladder-wen .ld-t { color: var(--orange); }
.ladder-bao { background: var(--green-light); border: 1px solid #bceccf; }
.ladder-bao .ld-t { color: var(--green); }

/* ============ AI 升学 ============ */
.ai-tabs { display: flex; background: #fff; border-radius: 12px; padding: 4px; margin-bottom: 12px; border: 1px solid var(--line); }
.ai-tab { flex: 1; text-align: center; padding: 9px 0; font-size: 13px; border-radius: 9px; color: var(--text-2); cursor: pointer; }
.ai-tab.on { background: var(--primary); color: #fff; font-weight: 600; }

.chat-box { display: flex; flex-direction: column; gap: 10px; min-height: 60vh; }
.msg { max-width: 86%; padding: 10px 13px; border-radius: 14px; font-size: 14px; line-height: 1.65; white-space: pre-wrap; word-break: break-word; }
.msg.ai { background: var(--card); border: 1px solid var(--line); align-self: flex-start; border-bottom-left-radius: 4px; }
.msg.me { background: var(--primary); color: #fff; align-self: flex-end; border-bottom-right-radius: 4px; }
.msg-avatar { display: flex; gap: 8px; align-items: flex-start; }
.msg-avatar .av { width: 30px; height: 30px; border-radius: 50%; background: linear-gradient(135deg,#2f6bff,#4a8bff); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 14px; flex-shrink: 0; }
.chat-suggests { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { padding: 7px 12px; border-radius: 18px; font-size: 12px; background: var(--primary-light); color: var(--primary-dark); cursor: pointer; border: none; }
.chip:active { opacity: .7; }

.chat-input-bar { position: sticky; bottom: 72px; display: flex; gap: 8px; align-items: center; background: #fff; border: 1px solid var(--line); border-radius: 22px; padding: 6px 6px 6px 14px; }
.chat-input-bar input { flex: 1; border: none; font-size: 14px; outline: none; background: transparent; }
.chat-send { width: 64px; background: var(--primary); color: #fff; border-radius: 18px; padding: 9px 0; border: none; font-size: 13px; font-weight: 600; cursor: pointer; }
.chat-send[disabled] { opacity: .5; }
.typing::after { content: "▍"; animation: blink 1s infinite; }
@keyframes blink { 50% { opacity: 0; } }

.diag-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.diag-input { text-align: center; }
.diag-input label { display: block; font-size: 12px; color: var(--text-2); margin-bottom: 4px; }
.diag-input input { width: 100%; text-align: center; border: 1.5px solid var(--line); border-radius: 9px; padding: 8px 4px; font-size: 13px; }

.ai-result { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 14px; font-size: 14px; line-height: 1.75; white-space: pre-wrap; word-break: break-word; margin-top: 12px; }
.ai-loading { text-align: center; color: var(--text-3); font-size: 13px; padding: 18px 0; }
.ai-loading::after { content: "▍"; animation: blink 1s infinite; }

/* ============ 我的 ============ */
.mine-menu { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); border: 1px solid var(--line); overflow: hidden; }
.mine-row { display: flex; align-items: center; justify-content: space-between; padding: 14px; border-bottom: 1px solid var(--line); cursor: pointer; font-size: 14px; }
.mine-row:last-child { border-bottom: none; }
.mine-row .mr-ic { margin-right: 8px; }
.mine-row .mr-badge { background: var(--red); color: #fff; font-size: 11px; border-radius: 10px; padding: 1px 8px; }
.mine-row .mr-arrow { color: var(--text-3); }
.stat-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 12px; }
.stat-card { background: var(--card); border-radius: 12px; padding: 14px 6px; text-align: center; border: 1px solid var(--line); box-shadow: var(--shadow); }
.stat-card .st-n { font-size: 22px; font-weight: 800; color: var(--primary); }
.stat-card .st-l { font-size: 11px; color: var(--text-3); margin-top: 2px; }

/* ============ 底部导航 ============ */
#tabbar {
  position: fixed; bottom: 0; left: 50%; transform: translateX(-50%);
  width: 100%; max-width: 480px; height: 64px;
  background: #fff; border-top: 1px solid var(--line);
  display: flex; z-index: 60;
  padding-bottom: env(safe-area-inset-bottom);
}
.tab { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; color: var(--text-3); text-decoration: none; font-size: 11px; }
.tab .tab-ic { font-size: 20px; }
.tab.on { color: var(--primary); font-weight: 600; }

.toast { position: fixed; top: 18%; left: 50%; transform: translateX(-50%); background: rgba(0,0,0,.78); color: #fff; padding: 10px 20px; border-radius: 10px; font-size: 13px; z-index: 999; animation: fade .3s; }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }

.markdown-body { font-size: 14px; line-height: 1.8; }
.markdown-body h3 { font-size: 15px; margin: 10px 0 6px; color: var(--primary-dark); }
.markdown-body ul, .markdown-body ol { padding-left: 20px; margin: 6px 0; }
.markdown-body li { margin: 4px 0; }
.markdown-body b, .markdown-body strong { color: var(--text); }

/* ============ v2.1 视觉精修：动效 / hero / 交互反馈 ============ */
/* 页面淡入 */
#view { animation: pageIn .28s ease; }
@keyframes pageIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
/* 卡片悬浮 */
.card, .subject-item, .quick-item, .school-item { transition: transform .18s ease, box-shadow .18s ease; }
.card:hover, .subject-item:hover, .quick-item:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(31,60,130,.10); }
/* 首页 hero：品牌标语 */
.hero-banner {
  background: linear-gradient(135deg, #2f6bff 0%, #7a5cff 60%, #ff7a2f 130%);
  border-radius: 16px; color: #fff; padding: 20px 18px; margin-bottom: 12px;
  box-shadow: 0 8px 24px rgba(47,107,255,.28); position: relative; overflow: hidden;
}
.hero-banner::after { content: ""; position: absolute; right: -40px; top: -40px; width: 140px; height: 140px; border-radius: 50%; background: rgba(255,255,255,.10); }
.hero-banner::before { content: "🌲"; position: absolute; right: 16px; bottom: -8px; font-size: 64px; opacity: .35; }
.hero-title { font-size: 22px; font-weight: 800; letter-spacing: 1px; }
.hero-sub { font-size: 13px; opacity: .92; margin-top: 4px; line-height: 1.6; }
.hero-stats { display: flex; gap: 20px; margin-top: 12px; font-size: 12px; opacity: .95; }
.hero-stats b { font-size: 18px; display: block; }
/* 卡片标题图标动效 */
.card-title { gap: 7px; }
/* 按钮按压 */
.btn:active, .opt:active, .chip:active, .filter-chip:active, .tab:active { transform: scale(.96); }
.opt, .btn, .chip, .filter-chip { transition: transform .12s ease; }
/* 底部导航活跃态 */
.tab { position: relative; }
.tab.on::after { content: ""; position: absolute; top: 0; left: 50%; transform: translateX(-50%); width: 22px; height: 3px; border-radius: 0 0 3px 3px; background: var(--primary); }
/* 会员卡动效 */
.countdown { animation: cdGlow 3s ease-in-out infinite alternate; }
@keyframes cdGlow { from { box-shadow: 0 4px 14px rgba(255,122,47,.25); } to { box-shadow: 0 6px 22px rgba(255,122,47,.45); } }
/* 徽章 */
.si-badge { display: inline-block; font-size: 10.5px; padding: 1px 7px; border-radius: 10px; background: var(--orange-light); color: var(--orange); margin-left: 6px; vertical-align: 1px; }
/* 加载动效 */
.loading::before { content: ""; display: inline-block; width: 14px; height: 14px; margin-right: 6px; border: 2px solid var(--primary-light); border-top-color: var(--primary); border-radius: 50%; vertical-align: -2px; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ============ v3：院校评论 ============ */
.review-item { padding: 10px 0; border-bottom: 1px dashed var(--line, #e8e8e8); }
.review-item:last-child { border-bottom: none; }
.rv-head { display: flex; align-items: center; gap: 6px; font-size: 13px; }
.rv-name { font-weight: 600; color: var(--text); }
.rv-star { color: #f5a623; font-size: 12px; letter-spacing: 1px; }
.rv-content { font-size: 13px; color: var(--text-2); line-height: 1.7; margin: 5px 0 3px; }
.rv-time { font-size: 11px; color: var(--text-3); }
.review-form { margin-top: 12px; border-top: 1px solid var(--line, #eee); padding-top: 8px; }
.rv-rate { display: flex; align-items: center; margin-bottom: 8px; }
.rate-star { font-size: 24px; color: #ddd; cursor: pointer; margin-right: 4px; }
.rate-star:hover { color: #f5a623; }
.review-form textarea { width: 100%; border: 1px solid var(--line, #ddd); border-radius: 8px; padding: 8px; font-size: 13px; resize: vertical; background: #fff; }
.review-form textarea:focus { outline: none; border-color: var(--primary); }

/* ============ v9：院校库 分页 + 多维筛选 ============ */
.sub-filter { display: flex; gap: 8px; align-items: center; margin: 10px 0 8px; }
.sub-filter .sf-input { flex: 1; border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; font-size: 13px; background: var(--card); color: var(--text); outline: none; }
.sub-filter .sf-input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(47,107,255,.12); }
.btn-sm { padding: 8px 16px; font-size: 13px; border-radius: 10px; }
.sub-filter-row { display: flex; gap: 8px; margin-bottom: 10px; }
.sub-filter-row .sf-select { flex: 1; border: 1px solid var(--line); border-radius: 10px; padding: 9px 10px; font-size: 13px; background: var(--card); color: var(--text); outline: none; appearance: none; -webkit-appearance: none; background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%23999'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 10px center; }
.pager { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; justify-content: center; padding: 14px 0 4px; }
.pager .pg-btn, .pager .pg-num { border: 1px solid var(--line); background: var(--card); color: var(--text-2); border-radius: 10px; padding: 7px 12px; font-size: 13px; cursor: pointer; transition: all .2s; }
.pager .pg-btn:hover:not([disabled]), .pager .pg-num:hover { border-color: var(--primary); color: var(--primary); }
.pager .pg-btn[disabled] { opacity: .4; cursor: not-allowed; }
.pager .pg-num.on { background: var(--primary); border-color: var(--primary); color: #fff; font-weight: 600; }
.pager .pg-info { font-size: 12px; color: var(--text-3); margin-left: 4px; }

/* ============ v2：顶部栏 / 分站切换 / 登录弹层 ============ */
.topbar { position: sticky; top: 0; z-index: 50; background: linear-gradient(135deg, #2f6bff 0%, #4a8bff 100%); color: #fff; padding: 10px 16px 14px; box-shadow: 0 2px 8px rgba(47,107,255,.25); }
.topbar-inner { display: flex; align-items: center; justify-content: space-between; gap: 10px; max-width: 1200px; margin: 0 auto; }
.brand #topbar-title { font-size: 19px; font-weight: 700; letter-spacing: 1px; }
.brand #topbar-sub { font-size: 12px; opacity: .85; margin-top: 2px; }
.topbar-right { display: flex; align-items: center; gap: 8px; }
.site-btn { background: rgba(255,255,255,.18); border: 1px solid rgba(255,255,255,.4); color: #fff; border-radius: 18px; padding: 6px 12px; font-size: 13px; cursor: pointer; }
.site-switch { position: relative; }
.site-panel { position: absolute; top: 36px; right: 0; width: 320px; max-height: 320px; overflow-y: auto; background: #fff; border-radius: 12px; box-shadow: 0 8px 30px rgba(0,0,0,.18); padding: 10px; z-index: 100; }
.site-panel .site-item { display: inline-block; padding: 7px 12px; margin: 3px; border-radius: 16px; font-size: 13px; background: var(--bg); color: var(--text-2); cursor: pointer; }
.site-panel .site-item.on { background: var(--primary); color: #fff; }
.site-panel .sp-title { font-size: 12px; color: var(--text-3); padding: 4px 8px 6px; }
.login-btn { background: #fff; color: var(--primary); border: none; border-radius: 18px; padding: 6px 14px; font-size: 13px; font-weight: 600; cursor: pointer; }
.user-chip { display: flex; align-items: center; gap: 4px; background: rgba(255,255,255,.18); border-radius: 18px; padding: 5px 12px; font-size: 13px; cursor: pointer; }
.user-chip span { color: #fff; }

.modal-mask { position: fixed; inset: 0; background: rgba(0,0,0,.5); z-index: 200; display: flex; align-items: center; justify-content: center; padding: 20px; }
.modal { background: #fff; border-radius: 16px; width: 100%; max-width: 380px; padding: 20px; box-shadow: 0 12px 40px rgba(0,0,0,.25); }
.modal-head { display: flex; align-items: center; justify-content: space-between; font-size: 16px; font-weight: 700; margin-bottom: 14px; }
.modal-close { background: none; border: none; font-size: 18px; cursor: pointer; color: var(--text-3); }
.login-tip { margin-top: 10px; font-size: 13px; color: var(--red); min-height: 18px; text-align: center; }

/* ============ v2：PC 响应式（≥1024px） ============ */
@media (min-width: 1024px) {
  body { max-width: none; }
  #view { max-width: 1200px; margin: 0 auto; padding: 16px 20px 120px; }
  #app { max-width: none; }
  #topbar { padding-left: 48px; padding-right: 48px; }
  #tabbar { max-width: 100%; height: auto; }
  .tab { flex-direction: row; gap: 6px; padding: 10px 0; font-size: 14px; }
  .tab .tab-ic { font-size: 18px; }
  .subject-grid { grid-template-columns: repeat(6, 1fr); }
  .diag-grid { grid-template-columns: repeat(4, 1fr); }
  .quick-grid { grid-template-columns: repeat(8, 1fr); }
  .card { padding: 18px; }
  #chat-scroll { height: 60vh !important; }
  .chat-input-bar { max-width: 760px; margin: 8px auto 0; }
}

/* ============ v2.1：升学日历 + 资料中心 ============ */
.chip-row { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.chip.on { background: var(--primary); color: #fff; }
.tag.blue { background: #e6f0ff; color: var(--primary-dark); }

/* 升学日历 */
.cal-month { font-size: 13px; font-weight: 700; color: var(--primary-dark); margin: 14px 0 8px; padding-left: 10px; border-left: 3px solid var(--primary); }
.cal-item { display: flex; gap: 10px; background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; margin-bottom: 8px; box-shadow: var(--shadow); }
.cal-date { flex: 0 0 52px; text-align: center; background: var(--primary-light); border-radius: 10px; padding: 6px 0; height: fit-content; }
.cal-date b { display: block; font-size: 20px; color: var(--primary-dark); line-height: 1.1; }
.cal-date i { font-style: normal; font-size: 11px; color: var(--primary-dark); opacity: .7; }
.cal-main { flex: 1; min-width: 0; }
.cal-title { font-size: 14px; font-weight: 700; color: var(--text); line-height: 1.4; }
.cal-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 4px; margin-top: 5px; }
.cal-days { margin-left: auto; font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 20px; background: var(--bg); color: var(--text-2); }
.cal-days.soon { background: var(--orange-light); color: var(--orange); }
.cal-days.today { background: var(--red); color: #fff; }
.cal-days.done { background: var(--line); color: var(--text-3); }
.cal-detail { font-size: 12px; color: var(--text-2); line-height: 1.7; margin-top: 5px; }

/* 资料中心 */
.res-item { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; margin-bottom: 10px; box-shadow: var(--shadow); }
.res-top { display: flex; align-items: center; justify-content: space-between; }
.res-src { font-size: 11px; color: var(--text-3); }
.res-title { font-size: 15px; font-weight: 700; color: var(--text); margin: 7px 0 5px; line-height: 1.4; }
.res-note { font-size: 12px; color: var(--text-2); line-height: 1.7; }
.res-foot { margin-top: 8px; text-align: right; }

/* ============ v6 企业级设计系统（渐进增强，不破坏 JS 依赖结构） ============ */
:root {
  --brand-grad: linear-gradient(135deg, #2f6bff 0%, #4a8bff 55%, #7a5cff 100%);
  --brand-soft: linear-gradient(135deg, #eef3ff 0%, #f6f0ff 100%);
  --radius-lg: 20px;
  --shadow-sm: 0 1px 4px rgba(31,60,130,.06);
  --shadow-md: 0 4px 16px rgba(31,60,130,.10);
  --shadow-lg: 0 12px 36px rgba(31,60,130,.16);
  --font-num: "SF Mono", ui-monospace, Consolas, monospace;
}

/* ---- 顶栏：企业级品牌区 ---- */
.topbar { background: var(--brand-grad); padding: 12px 16px 16px; }
.brand { display: flex; align-items: center; gap: 10px; min-width: 0; }
.brand-logo {
  width: 40px; height: 40px; border-radius: 12px; flex-shrink: 0;
  background: rgba(255,255,255,.22); border: 1px solid rgba(255,255,255,.35);
  display: flex; align-items: center; justify-content: center; font-size: 22px;
  box-shadow: inset 0 1px 2px rgba(255,255,255,.35), 0 2px 8px rgba(0,0,0,.12);
}
.brand-txt { min-width: 0; }
.brand #topbar-title { font-size: 19px; letter-spacing: 1.5px; text-shadow: 0 1px 3px rgba(0,0,0,.15); }
.brand #topbar-sub { font-size: 11px; opacity: .9; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.site-btn, .user-chip { backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); background: rgba(255,255,255,.16); }
.site-panel { border-radius: 16px; box-shadow: var(--shadow-lg); }
.site-panel .site-item { transition: all .15s; }
.site-panel .site-item:active { transform: scale(.95); }

/* ---- 企业级 Hero ---- */
.hero-banner {
  background: var(--brand-grad);
  border-radius: var(--radius-lg);
  padding: 24px 20px;
  box-shadow: 0 10px 30px rgba(47,107,255,.30);
  position: relative; overflow: hidden;
}
.hero-banner::after { width: 200px; height: 200px; right: -60px; top: -60px; background: rgba(255,255,255,.08); }
.hero-banner::before { right: 18px; bottom: -10px; font-size: 76px; opacity: .30; }
.hero-title { font-size: 24px; text-shadow: 0 2px 6px rgba(0,0,0,.12); }
.hero-sub { margin-top: 6px; }
.hero-stats { gap: 22px; margin-top: 14px; }
.hero-stats b { font-size: 20px; font-variant-numeric: tabular-nums; }

/* ---- 卡片：层级阴影 + hover 抬升 ---- */
.card { border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); border: 1px solid rgba(31,60,130,.07); }
.card:hover { box-shadow: var(--shadow-md); }
.card-title { font-size: 15.5px; }

/* ---- 快捷入口/科目：品牌渐变图标 + 悬浮 ---- */
.quick-item, .subject-item { border-radius: 14px; border: 1px solid rgba(31,60,130,.06); box-shadow: var(--shadow-sm); transition: all .2s ease; }
.quick-item:hover, .subject-item:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: rgba(47,107,255,.25); }
.quick-item .q-ic { font-size: 24px; }
.subject-item .s-ic { font-size: 28px; }

/* ---- 按钮：主按钮渐变 + 阴影 + 按压 ---- */
.btn { border-radius: 12px; transition: all .18s ease; }
.btn-primary { background: var(--brand-grad); box-shadow: 0 4px 14px rgba(47,107,255,.30); }
.btn-primary:active { transform: scale(.97); box-shadow: 0 2px 6px rgba(47,107,255,.20); }
.btn-orange { background: linear-gradient(135deg,#ff7a2f,#ff9a5c); box-shadow: 0 4px 14px rgba(255,122,47,.30); }
.btn-ghost { background: #fff; border: 1.5px solid rgba(47,107,255,.35); }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }

/* ---- 底部导航：毛玻璃 + 活跃指示 ---- */
#tabbar {
  background: rgba(255,255,255,.92);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-top: 1px solid rgba(31,60,130,.08);
  box-shadow: 0 -4px 20px rgba(31,60,130,.06);
}
.tab { transition: color .2s ease; }
.tab .tab-ic { transition: transform .2s ease; }
.tab.on .tab-ic { transform: translateY(-2px) scale(1.1); }
.tab.on::after { background: var(--brand-grad); width: 24px; height: 3.5px; }

/* ---- 弹层：磨砂遮罩 + 大圆角 ---- */
.modal-mask { background: rgba(16,26,51,.55); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); }
.modal { border-radius: var(--radius-lg); box-shadow: 0 20px 60px rgba(0,0,0,.30); border: 1px solid rgba(255,255,255,.5); }

/* ---- 筛选 chip / 标签 ---- */
.filter-chip { border-radius: 22px; transition: all .18s ease; }
.filter-chip.on { background: var(--brand-grad); box-shadow: 0 3px 10px rgba(47,107,255,.28); }
.tag { letter-spacing: .2px; }

/* ---- 统计卡（我的页） ---- */
.stat-card { border-radius: 14px; border: 1px solid rgba(31,60,130,.06); box-shadow: var(--shadow-sm); transition: all .2s ease; }
.stat-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.stat-card .st-n { font-variant-numeric: tabular-nums; }

/* ---- 倒计时/会员卡呼吸光 ---- */
.countdown { border-radius: var(--radius-lg); }

/* ---- 加载/空状态 ---- */
.loading, .empty { color: var(--text-3); }

/* ---- 登录按钮（顶栏） ---- */
.login-btn { background: #fff; box-shadow: 0 2px 8px rgba(0,0,0,.12); }

/* ---- PC 企业级增强（≥1024px） ---- */
@media (min-width: 1024px) {
  .topbar-inner { max-width: 1200px; }
  #view { max-width: 1200px; }
  .card { padding: 20px; }
  .hero-banner { padding: 30px 28px; }
  .hero-title { font-size: 28px; }
  .quick-grid { gap: 14px; }
  .quick-item { padding: 16px 6px; }
  .quick-item .q-ic { font-size: 26px; }
  .tab { padding: 12px 0; }
  #tabbar { box-shadow: 0 -4px 24px rgba(31,60,130,.08); }
  /* 后台若嵌入前台容器时无影响，前台更精致 */
}

/* ---- 动效降级：尊重系统设置 ---- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ==================== v8：院校对比 ==================== */
.cmp-btn {
  position: absolute; right: 44px; top: 50%; transform: translateY(-50%);
  width: 26px; height: 26px; border-radius: 50%;
  border: 1.5px solid var(--line); background: #fff; color: var(--text-3);
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; cursor: pointer; transition: all .18s ease; z-index: 2;
}
.cmp-btn.on { background: var(--brand-grad); border-color: transparent; color: #fff; box-shadow: 0 3px 8px rgba(47,107,255,.3); }
.cmp-btn:active { transform: translateY(-50%) scale(.88); }
.compare-bar {
  position: sticky; bottom: 64px; z-index: 20;
  display: flex; align-items: center; gap: 8px;
  background: rgba(255,255,255,.96); backdrop-filter: blur(8px);
  border: 1px solid rgba(47,107,255,.25); border-radius: 14px;
  padding: 8px 12px; margin: 8px 0 12px;
  box-shadow: 0 6px 20px rgba(31,60,130,.14);
}
.compare-bar #compare-count { font-size: 13px; font-weight: 700; color: var(--primary); margin-right: auto; }
.compare-bar .btn { margin: 0; }
/* 对比表格（横向滚动） */
.cmp-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.cmp-table { width: 100%; min-width: 480px; border-collapse: collapse; font-size: 13px; }
.cmp-table th, .cmp-table td {
  border: 1px solid var(--line); padding: 9px 10px; text-align: left; vertical-align: top;
  word-break: break-all; line-height: 1.6;
}
.cmp-table thead th { background: var(--brand-grad); color: #fff; font-size: 13px; font-weight: 700; position: sticky; top: 0; }
.cmp-table .cmp-key { background: #f6f8ff; color: var(--text-2); font-weight: 600; white-space: nowrap; min-width: 84px; }
.cmp-table tbody tr:nth-child(even) td { background: rgba(47,107,255,.03); }

/* ==================== v10：分数线趋势 ==================== */
.trend-legend { display: inline-flex; gap: 6px; margin-left: 6px; vertical-align: middle; }
.tr-up { color: var(--red, #e5484d); font-size: 12px; font-weight: 700; }
.tr-down { color: var(--green, #2f9e44); font-size: 12px; font-weight: 700; }
.tr-flat { color: var(--text-3); font-size: 12px; font-weight: 600; }
.trend-item {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 12px 2px; border-bottom: 1px solid var(--line); cursor: pointer;
}
.trend-item:active { background: rgba(47,107,255,.04); }
.trend-main { min-width: 0; flex: 1; }
.tr-name { font-size: 14px; font-weight: 700; color: var(--text-1); margin-bottom: 4px; }
.tr-meta { display: flex; flex-wrap: wrap; gap: 4px; }
.trend-side { text-align: right; white-space: nowrap; }
.tr-cell {
  display: inline-block; font-size: 11px; color: var(--text-2);
  background: #f4f6fb; border-radius: 6px; padding: 2px 6px; margin-left: 4px;
}
.trend-side .tr-up, .trend-side .tr-down, .trend-side .tr-flat { display: block; margin-top: 4px; font-size: 12px; }

/* ==================== v11：录取概率速查 ==================== */
.mt-item {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 12px 2px; border-bottom: 1px solid var(--line); cursor: pointer;
}
.mt-item:active { background: rgba(47,107,255,.04); }
.mt-main { min-width: 0; flex: 1; }
.mt-name { font-size: 14px; font-weight: 700; color: var(--text-1); margin-bottom: 4px; }
.mt-meta { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; }
.mt-side { text-align: right; white-space: nowrap; }
.mt-ref { font-size: 11px; color: var(--text-3); margin-bottom: 4px; }
.mt-pct { display: flex; align-items: center; gap: 6px; justify-content: flex-end; }
.mt-pct b { font-size: 14px; color: var(--text-1); min-width: 40px; }
.mt-bar { width: 92px; height: 6px; border-radius: 3px; background: #eef1f7; overflow: hidden; }
.mt-bar i { display: block; height: 100%; border-radius: 3px; }
/* 档位徽章 */
.bd-chong { display: inline-block; font-size: 11px; font-weight: 700; color: #fff; background: #d9534f; border-radius: 8px; padding: 2px 8px; }
.bd-wen { display: inline-block; font-size: 11px; font-weight: 700; color: #fff; background: #2f9e6e; border-radius: 8px; padding: 2px 8px; }
.bd-bao { display: inline-block; font-size: 11px; font-weight: 700; color: #7a5c1e; background: #f7e6b5; border-radius: 8px; padding: 2px 8px; }
.bd-low { display: inline-block; font-size: 11px; font-weight: 700; color: var(--text-3); background: #eceff4; border-radius: 8px; padding: 2px 8px; }
.bd-pend { display: inline-block; font-size: 11px; font-weight: 600; color: var(--orange); background: #fff3e0; border-radius: 8px; padding: 2px 8px; }

/* ============ v12：错题本复习闭环（遗忘曲线 + 变式举一反三） ============ */
.wb-bar { display: flex; gap: 10px; flex-wrap: wrap; background: linear-gradient(135deg,#fff7e6,#fff); border: 1px solid #ffe1a8; border-radius: 12px; padding: 10px 12px; margin-bottom: 10px; font-size: 12px; }
.wb-bar-i { color: var(--text-2); }
.wb-bar-i b { color: var(--orange); font-size: 15px; }
.wb-badge { display: inline-block; font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: 20px; margin-right: 6px; }
.wb-master { background: var(--green-light); color: var(--green); }
.wb-pending { background: #fff3e0; color: #e67e22; }
.wb-wait { background: #f0f0f5; color: #8a8a9a; }
.wb-variant { background: #e6f0ff; color: var(--primary-dark); }
.wb-review-q { font-size: 15px; font-weight: 600; line-height: 1.7; margin-bottom: 8px; }

/* ============ v13：错因标注 + 单题拔刺 + 我的志愿表 ============ */
.btn-violet { background: linear-gradient(135deg,#7a5cff,#9a7cff); color: #fff; }
.btn-violet:active { opacity: .85; }
.cause-row { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.cause-tag { font-size: 11px; color: var(--text-2); background: #f3f4f8; border: 1px solid var(--line); border-radius: 20px; padding: 3px 10px; cursor: pointer; }
.cause-tag.on { color: #fff; border-color: transparent; }
.cause-tag.on.cause-c { background: #e6a23c; }
.cause-tag.on.cause-n { background: #2f6bff; }
.cause-tag.on.cause-m { background: #7a5cff; }
.cause-tag.on.cause-r { background: #e0912f; }
.cause-bar { margin: 4px 0 6px; }
.cause-i { display: flex; align-items: center; gap: 8px; margin: 4px 0; }
.cause-lb { font-size: 12px; color: var(--text-2); min-width: 86px; }
.cause-lb b { color: var(--text-1); }
.cause-track { flex: 1; height: 6px; border-radius: 3px; background: #eef1f7; overflow: hidden; }
.cause-fill { height: 100%; border-radius: 3px; }
.cause-fill.cause-c { background: #e6a23c; }
.cause-fill.cause-n { background: #2f6bff; }
.cause-fill.cause-m { background: #7a5cff; }
.cause-fill.cause-r { background: #e0912f; }
/* 志愿表 */
.pl-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 10px; }
.pl-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.pl-chip { font-size: 12px; padding: 5px 12px; border-radius: 20px; background: #f3f4f8; color: var(--text-2); cursor: pointer; border: 1px solid var(--line); }
.pl-chip.on { background: var(--primary); color: #fff; border-color: transparent; }
.pl-group { margin: 8px 0 14px; }
.pl-gt { font-size: 13px; font-weight: 700; color: var(--text-2); margin-bottom: 6px; }
.pl-item { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 10px 2px; border-bottom: 1px dashed var(--line); }
.pl-main { min-width: 0; flex: 1; }
.pl-name { font-size: 14px; font-weight: 700; color: var(--text-1); }
.pl-meta { font-size: 11px; color: var(--text-3); margin-top: 2px; }
.pl-side { text-align: right; white-space: nowrap; font-size: 12px; color: var(--text-2); }
.pl-rm { border: none; background: none; color: var(--text-3); font-size: 16px; padding: 2px 6px; cursor: pointer; }
.pl-rm:hover { color: #d9534f; }
.pl-empty { padding: 24px 0; text-align: center; color: var(--text-3); font-size: 13px; }
.pl-tools { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; }
.pl-add { font-size: 16px; cursor: pointer; padding: 4px 8px; color: var(--primary); border-radius: 10px; user-select: none; }
.pl-add:hover { background: rgba(47,107,255,.08); }
.pl-add:active { transform: scale(1.15); }

/* ============ v14：分数口径换算器 ============ */
.cv-card { border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; margin-top: 10px; background: #f8faff; }
.cv-card.to { background: #fdf8f2; border-color: #f0dfc8; }
.cv-k { font-size: 12px; color: var(--text-2); margin-bottom: 4px; }
.cv-big { font-size: 26px; font-weight: 800; color: var(--primary); line-height: 1.3; }
.cv-card.to .cv-big { color: #d97b29; }
.cv-rate { font-size: 13px; font-weight: 700; color: var(--text-2); }
.cv-row { font-size: 12px; color: var(--text-2); margin-top: 4px; }
.cv-over { color: #2f9e6e; }
.cv-under { color: #d9534f; }
/* ============ v14：初升高衔接自测 ============ */
.bq-progress { font-size: 13px; font-weight: 700; color: var(--primary); margin-bottom: 10px; }
.bq-card { border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; margin-bottom: 10px; background: #fff; }
.bq-q { font-size: 14px; line-height: 1.6; margin-bottom: 8px; }
.bq-opts { display: flex; flex-wrap: wrap; gap: 8px; }
.bq-opt { font-size: 13px; padding: 8px 16px; border-radius: 10px; border: 1px solid var(--line); background: #f8f9fc; color: var(--text-1); cursor: pointer; }
.bq-opt.ok { background: #e8f7ef; border-color: #2f9e6e; color: #1d7a52; font-weight: 700; }
.bq-opt.bad { background: #fdeeee; border-color: #d9534f; color: #b3403a; font-weight: 700; }
.bq-opt.right { border-color: #2f9e6e; box-shadow: inset 0 0 0 1px #2f9e6e; }
.bq-opt:disabled { cursor: default; opacity: .85; }
.bq-tip { font-size: 12px; color: var(--text-2); margin-top: 8px; line-height: 1.6; }
.bq-result { border: 1px solid #cfd9ff; background: linear-gradient(135deg,#f4f7ff,#fdf6ff); border-radius: 14px; padding: 14px; margin-top: 12px; }
.bq-r-big { font-size: 20px; font-weight: 800; color: var(--primary); margin-bottom: 4px; }
/* ============ v15：志愿梯度体检 ============ */
.pc-hero { text-align: center; padding: 14px 0 6px; }
.pc-score { font-size: 46px; font-weight: 800; color: var(--primary); line-height: 1.2; }
.pc-grade-good { display: inline-block; font-size: 14px; font-weight: 800; padding: 3px 12px; border-radius: 999px; background: #e8f7ef; color: #1d7a52; margin-top: 4px; }
.pc-grade-mid { display: inline-block; font-size: 14px; font-weight: 800; padding: 3px 12px; border-radius: 999px; background: #eaf1ff; color: #2f6bff; margin-top: 4px; }
.pc-grade-warn { display: inline-block; font-size: 14px; font-weight: 800; padding: 3px 12px; border-radius: 999px; background: #fdf3e3; color: #c07a1a; margin-top: 4px; }
.pc-grade-danger { display: inline-block; font-size: 14px; font-weight: 800; padding: 3px 12px; border-radius: 999px; background: #fdeeee; color: #b3403a; margin-top: 4px; }
.pc-grade-empty { display: inline-block; font-size: 14px; font-weight: 800; padding: 3px 12px; border-radius: 999px; background: #f1f3f8; color: var(--text-3); margin-top: 4px; }
.pc-bars { margin: 12px 0; }
.pc-bar-row { display: flex; align-items: center; gap: 8px; margin-bottom: 7px; font-size: 12px; }
.pc-bar-label { width: 44px; color: var(--text-2); flex: none; }
.pc-bar { flex: 1; height: 8px; background: #eef1f6; border-radius: 999px; overflow: hidden; }
.pc-bar-in { height: 100%; border-radius: 999px; transition: width .5s ease; }
.pc-b-chong { background: linear-gradient(90deg,#ff7a45,#ff9c6e); }
.pc-b-wen { background: linear-gradient(90deg,#2f6bff,#5b8bff); }
.pc-b-bao { background: linear-gradient(90deg,#2f9e6e,#52c798); }
.pc-b-low { background: #c8ccd6; }
.pc-b-other { background: repeating-linear-gradient(45deg,#e5e9f2 0 4px,#f4f6fb 4px 8px); }
.pc-bar-num { width: 44px; text-align: right; color: var(--text-2); flex: none; }
.pc-tips { margin-top: 6px; }
.pc-tip { display: flex; gap: 7px; font-size: 13px; line-height: 1.6; padding: 7px 10px; border-radius: 10px; margin-bottom: 6px; background: #f8f9fc; border: 1px solid var(--line); color: var(--text-1); }
.pc-tip-good { background: #f2fbf6; border-color: #cfe9db; }
.pc-tip-warn { background: #fdf8ef; border-color: #f0dfc0; }
.pc-tip-danger { background: #fdf0ef; border-color: #f3cdcb; color: #a33a35; }
.pc-tip > span:first-child { flex: none; }
