/* ============================================================
 * 教招刷题 · 全局样式
 * 设计规范：8px 间距栅格 / 设计令牌 / 三档响应式
 *   手机  < 768：单列 + 底部标签栏 + 抽屉答题卡
 *   平板  768~1023：双列卡片 + 底部标签栏
 *   桌面  ≥ 1024：左侧导航栏 + 答题侧栏 + 双列内容 + 登录分屏
 * ============================================================ */
* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

:root {
  /* 品牌：沉稳靛蓝，同色系渐变（避免蓝紫撞色的模板感） */
  --primary: #4360ee;
  --primary-600: #3a4fd6;
  --primary-bg: #eef1fe;
  --grad: linear-gradient(135deg, #3e56d6 0%, #5570f0 100%);
  --grad-deep: linear-gradient(152deg, #2c3fb5 0%, #4358cf 52%, #5a63dd 100%);
  /* 语义色 */
  --success: #0b9d6e; --success-bg: #e7f6f0;
  --danger: #e0484d;  --danger-bg: #fdeeee;
  --warn: #d97706;    --warn-bg: #fef3c7;
  /* 文本 */
  --text: #1a2130; --text-2: #5a6373; --text-3: #98a1b2;
  /* 表面 */
  --bg: #f4f5fa; --card: #ffffff;
  --line: #e7e9f1; --line-2: #eff1f7;
  /* 圆角 / 阴影（多层柔和 + 蓝调投影，模拟真实光照的高级感） */
  --r-sm: 8px; --r-md: 12px; --r-lg: 16px; --r-xl: 22px;
  --sh-1: 0 1px 1px rgba(23, 32, 64, .03), 0 2px 6px rgba(23, 32, 64, .05);
  --sh-2: 0 2px 4px rgba(23, 32, 64, .04), 0 12px 32px rgba(23, 32, 64, .1);
  --sh-3: 0 8px 22px rgba(23, 32, 64, .12), 0 28px 72px rgba(23, 32, 64, .2);
  /* 布局 */
  --sidebar-w: 224px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --font: system-ui, -apple-system, "PingFang SC", "HarmonyOS Sans SC", "Microsoft YaHei UI", "Microsoft YaHei", sans-serif;
  /* 展示字体：衬线书卷气，契合教育考试主题（系统字体，零下载成本） */
  --font-display: Georgia, "Times New Roman", "Songti SC", "STSong", "NSimSun", SimSun, serif;
  --ease-spring: cubic-bezier(.34, 1.56, .64, 1);
}

html { height: 100%; }
body {
  font-family: var(--font);
  background: linear-gradient(180deg, #edf0f9 0%, var(--bg) 360px) fixed;
  background-color: var(--bg);
  color: var(--text);
  font-size: 15px;
  line-height: 1.6;
  min-height: 100%;
  -webkit-font-smoothing: antialiased;
}
::selection { background: var(--primary); color: #fff; }

:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; border-radius: 4px; }

/* 细滚动条（弹层 / 表格） */
.modal::-webkit-scrollbar, .sheet::-webkit-scrollbar, .a-table-wrap::-webkit-scrollbar { width: 6px; height: 6px; }
.modal::-webkit-scrollbar-thumb, .sheet::-webkit-scrollbar-thumb, .a-table-wrap::-webkit-scrollbar-thumb {
  background: #d3d8e6; border-radius: 3px;
}
.modal::-webkit-scrollbar-thumb:hover, .sheet::-webkit-scrollbar-thumb:hover { background: #bcc3d6; }

#app { min-height: 100vh; display: flex; flex-direction: column; width: 100%; }

/* ---------- 通用 ---------- */
.hidden { display: none !important; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  border: none; border-radius: 10px; font-size: 14px; font-weight: 600;
  padding: 9px 16px; cursor: pointer; font-family: inherit;
  transition: filter .15s, background .15s, box-shadow .18s, transform .1s;
  user-select: none;
}
.btn:active { transform: translateY(1px) scale(.985); }
.btn .ico { width: 16px; height: 16px; }
.btn-primary { background: var(--grad); color: #fff; box-shadow: inset 0 1px 0 rgba(255,255,255,.22), 0 1px 2px rgba(43, 60, 158, .3), 0 5px 14px -4px rgba(67, 96, 238, .5); position: relative; overflow: hidden; }
.btn-primary::after {   /* 悬停扫光 */
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(115deg, transparent 32%, rgba(255,255,255,.3) 50%, transparent 68%);
  transform: translateX(-140%); transition: transform .55s ease;
}
.btn-primary:hover::after { transform: translateX(140%); }
.btn-primary:hover { filter: brightness(1.07); box-shadow: inset 0 1px 0 rgba(255,255,255,.22), 0 5px 14px rgba(67, 96, 238, .38); }
.btn-ghost { background: var(--primary-bg); color: var(--primary); }
.btn-ghost:hover { background: #e2e8fd; }
.btn-plain { background: var(--line-2); color: var(--text-2); }
.btn-plain:hover { background: #e6e9f2; color: var(--text); }
.btn-danger-ghost { background: var(--danger-bg); color: var(--danger); }
.btn-danger-ghost:hover { background: #fbdddd; }
.btn-block { display: flex; width: 100%; padding: 12px; font-size: 15px; }
.btn[disabled] { opacity: .4; pointer-events: none; }

.ico { display: inline-flex; width: 20px; height: 20px; flex: none; align-items: center; justify-content: center; }
.ico svg { width: 100%; height: 100%; }

/* ---------- 页头（hero） ---------- */
.page-head {
  /* 深靛蓝夜幕 + 三层极光光斑（白/紫/青），光斑直接画进背景避免越界裁切弹层 */
  background:
    radial-gradient(300px 300px at 91% -18%, rgba(255, 255, 255, .18), transparent 66%),
    radial-gradient(260px 260px at 6% 122%, rgba(122, 143, 255, .32), transparent 64%),
    radial-gradient(200px 200px at 55% 148%, rgba(77, 208, 225, .12), transparent 62%),
    linear-gradient(158deg, #26359c 0%, #3647b8 46%, #4658cf 78%, #5663da 100%);
  color: #fff;
  padding: 30px 18px 42px;
  position: relative;
}
.page-head h1 { font-size: 24px; letter-spacing: 1.5px; font-weight: 700; position: relative; font-family: var(--font-display); }
.h1-em { background: linear-gradient(90deg, #ffd76e, #ffb84d); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; font-weight: 800; margin-left: 2px; }
.page-head .sub { font-size: 12.5px; opacity: .82; margin-top: 4px; letter-spacing: .5px; position: relative; }
.head-btn {
  background: rgba(255,255,255,.14); color: #fff;
  border: 1px solid rgba(255,255,255,.16);
  padding: 6px 12px; font-size: 12.5px; font-weight: 500;
  backdrop-filter: blur(4px);
}
.head-btn:hover { background: rgba(255,255,255,.24); }

/* 悬浮统计卡：白卡叠在 hero 下缘（首页），数字深色 + 顶部高光线 */
.stat-strip { display: flex; gap: 10px; position: relative; }
.stat-strip .cell {
  flex: 1; background: var(--card); border: 1px solid var(--line);
  border-radius: 14px; padding: 13px 6px 11px; text-align: center;
  box-shadow: 0 1px 0 rgba(255,255,255,.9) inset, var(--sh-2);
  transition: transform .2s, box-shadow .2s;
}
.stat-strip .cell:hover { transform: translateY(-2px); box-shadow: 0 1px 0 rgba(255,255,255,.9) inset, var(--sh-3); }
.stat-strip .num { font-size: 21px; font-weight: 800; color: var(--text); font-variant-numeric: tabular-nums; letter-spacing: .3px; }
.stat-strip .lbl { font-size: 11px; color: var(--text-3); margin-top: 2px; letter-spacing: 2px; }
.stat-strip.floating { margin: -30px auto 14px; z-index: 5; max-width: 560px; }

/* ---------- 内容区 ---------- */
.content { flex: 1; padding: 16px 14px calc(18px + var(--safe-b)); width: 100%; max-width: 640px; margin: 0 auto; }
.block-title {
  font-size: 14px; font-weight: 650; color: var(--text-2);
  margin: 10px 2px 10px; display: flex; align-items: center; gap: 8px;
}
.block-title { font-size: 15px; font-weight: 750; letter-spacing: 1px; color: var(--text); }
.block-title::before { content: ''; width: 4px; height: 15px; border-radius: 2px; background: linear-gradient(180deg, var(--primary), #7a94ff); box-shadow: 0 2px 6px -1px rgba(67, 96, 238, .45); }
/* VIP 题库标题：金色渐变条 + 金色字 */
.block-title.vip::before { background: linear-gradient(180deg, #ffd76e, #f5a623); box-shadow: 0 2px 6px -1px rgba(245, 166, 35, .55); }
.block-title.vip { color: var(--text); }
.block-title.vip .vip-tag {
  font-size: 10.5px; font-weight: 800; letter-spacing: 1.5px; color: #b9720a;
  background: linear-gradient(135deg, #ffe9bd, #ffd76e);
  border-radius: 6px; padding: 2px 7px; margin-left: 2px;
  box-shadow: inset 0 0 0 1px rgba(232, 141, 11, .25);
}

.resume-bar {
  background: var(--warn-bg); border: 1px solid #fde4a7; color: #8c6d1f;
  border-radius: var(--r-md); padding: 10px 14px; font-size: 13px;
  display: flex; align-items: center; gap: 10px; margin-bottom: 12px;
}

/* ---------- 我的页面 ---------- */
.mine-card:first-child { display: flex; align-items: center; }
.mine-avatar {
  width: 52px; height: 52px; border-radius: 50%; flex: none;
  background: var(--grad); color: #fff; font-size: 22px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}
.mine-uinfo { margin-left: 14px; }
.mine-name { font-size: 17px; font-weight: 700; }
.mine-sub { font-size: 12.5px; color: var(--text-3); margin-top: 2px; }
.mine-card .mine-row {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 13px 2px; border-bottom: 1px solid var(--line-2);
}
.mine-card .mine-row:last-child { border-bottom: none; }
.mr-label { font-size: 14.5px; font-weight: 600; color: var(--text); }
.mr-val { font-size: 13.5px; color: var(--text-2); display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.mr-val .btn .ico { width: 14px; height: 14px; }

/* ---------- 到期 / 续期横幅 ---------- */
.expire-bar {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  background: var(--danger-bg); border: 1px solid #f8cfcf; color: #a03535;
  border-radius: var(--r-md); padding: 11px 14px; font-size: 13px; font-weight: 550;
  margin-bottom: 14px;
}
.expire-bar.warn { background: var(--warn-bg); border-color: #fde4a7; color: #8c6d1f; }

/* ---------- 每日一练卡片 ---------- */
.daily-card {
  display: flex; align-items: center; gap: 14px;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg);
  box-shadow: var(--sh-1); padding: 16px 18px; margin-bottom: 14px;
  cursor: pointer; transition: box-shadow .2s, transform .2s;
  position: relative; overflow: hidden;
}
.daily-card::before {
  content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 3px;
  background: linear-gradient(180deg, #f5a623, #ffcf7d);
}
.daily-card:hover { box-shadow: var(--sh-2); transform: translateY(-2px); }
.daily-card .dc-flame {
  width: 46px; height: 46px; border-radius: 13px; flex: none;
  background: radial-gradient(130% 130% at 30% 18%, #fff8ec 0%, #ffe7c2 70%, #ffd9a3 100%);
  box-shadow: inset 0 0 0 1px rgba(232, 105, 11, .14), 0 2px 6px rgba(232, 141, 11, .18);
  color: #e8690b;
  display: flex; align-items: center; justify-content: center;
}
.daily-card .dc-flame .ico { width: 23px; height: 23px; animation: flamePulse 2.4s ease-in-out infinite; }
@keyframes flamePulse {
  0%, 100% { transform: scale(1) rotate(0deg); }
  50% { transform: scale(1.14) rotate(-4deg); }
}
.daily-card.done .dc-flame .ico { animation: none; }
.daily-card.done .dc-flame { background: var(--success-bg); color: var(--success); }
.daily-card .dc-body { flex: 1; min-width: 0; }
.daily-card .dc-t { font-size: 16px; font-weight: 750; letter-spacing: .2px; }
.daily-card .dc-t span { font-size: 12px; color: #e8690b; font-weight: 600; margin-left: 6px; }
.daily-card .dc-d { font-size: 12.5px; color: var(--text-3); margin-top: 3px; letter-spacing: .2px; }
.daily-card .ico.shield { width: 22px; height: 22px; color: var(--success); }

/* ---------- 分段切换（错题/收藏） ---------- */
.seg-tabs {
  display: inline-flex; background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.18);
  border-radius: 999px; padding: 3px; margin-top: 12px; position: relative;
}
.seg-tabs .seg {
  padding: 5px 18px; font-size: 13px; font-weight: 600; color: rgba(255,255,255,.75);
  border-radius: 999px; cursor: pointer; transition: all .15s;
}
.seg-tabs .seg.on { background: #fff; color: var(--primary-600); box-shadow: var(--sh-1); }

/* ---------- 收藏星标 ---------- */
.bm-star {
  border: none; background: none; cursor: pointer; padding: 5px; border-radius: 8px;
  color: #c3c9d8; transition: color .15s, background .15s, transform .15s;
}
.bm-star .ico { width: 20px; height: 20px; display: block; }
.bm-star:hover { background: var(--line-2); color: var(--warn); }
.bm-star.on { color: #f5a623; }
.bm-star.on .ico svg { fill: #f5a623; }
.bm-star:active { transform: scale(.85); }

/* ---------- 学习数据页 ---------- */
.streak-strip { display: flex; gap: 10px; margin-top: 16px; position: relative; }
.streak-strip .cell {
  flex: 1; background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.17);
  border-radius: 14px; padding: 11px 6px 10px; text-align: center;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.14);
  backdrop-filter: blur(6px);
}
.streak-strip .num { font-size: 21px; font-weight: 800; font-variant-numeric: tabular-nums; }
.streak-strip .lbl { font-size: 11px; opacity: .78; margin-top: 1px; letter-spacing: 1px; display: flex; align-items: center; justify-content: center; gap: 3px; }
.streak-strip .lbl .ico { width: 12px; height: 12px; color: #ffca6b; }
.page-head .sub .ico { width: 13px; height: 13px; color: #ffca6b; vertical-align: -2px; }

.data-card { padding: 16px; }
.data-card .dc-title { font-size: 15px; font-weight: 700; display: flex; align-items: baseline; gap: 8px; }
.data-card .dc-sub { font-size: 11.5px; color: var(--text-3); font-weight: 400; }

/* 热力图 */
.heatmap { overflow-x: auto; margin-top: 12px; padding-bottom: 2px; }
.hm-grid {
  display: grid; grid-auto-flow: column; grid-template-rows: repeat(7, 12px);
  grid-auto-columns: 12px; gap: 3px; width: max-content;
}
.hm-cell { width: 12px; height: 12px; border-radius: 3px; background: #edeff5; }
.hm-cell.ghost { background: transparent; }
.hm-cell.l1 { background: #ccd8fb; }
.hm-cell.l2 { background: #93acf5; }
.hm-cell.l3 { background: #5c7bec; }
.hm-cell.l4 { background: #3550d2; }
.hm-legend { display: flex; align-items: center; gap: 4px; justify-content: flex-end; font-size: 11px; color: var(--text-3); margin-top: 8px; }
.hm-legend .hm-cell { width: 10px; height: 10px; border-radius: 2.5px; }

/* 雷达图 */
.radar-wrap { display: flex; justify-content: center; margin-top: 6px; }
.radar-wrap svg { width: 100%; max-width: 300px; height: auto; }
.radar-ring { fill: none; stroke: var(--line); stroke-width: 1; }
.radar-axis { stroke: var(--line); stroke-width: 1; }
.radar-data {
  fill: rgba(67, 96, 238, .18); stroke: var(--primary); stroke-width: 2; stroke-linejoin: round;
  transform-box: fill-box; transform-origin: center;
  animation: radarIn .7s cubic-bezier(.22, .8, .36, 1) both .15s;
}
@keyframes radarIn { from { transform: scale(.25); opacity: 0; } }
.radar-dot { fill: var(--primary); animation: dotIn .4s both .7s; }
@keyframes dotIn { from { opacity: 0; } }
.radar-label { font-size: 11px; fill: var(--text-2); font-weight: 600; animation: dotIn .4s both .8s; }
.radar-val { font-size: 10px; fill: var(--text-3); animation: dotIn .4s both .85s; }

/* 趋势图 */
.trend-wrap { margin-top: 12px; }
.trend-wrap svg { width: 100%; height: 150px; display: block; }
.trend-bar {
  fill: #ccd8fb;
  transform-box: fill-box; transform-origin: bottom;
  animation: barUp .55s cubic-bezier(.22, .8, .36, 1) both;
}
@keyframes barUp { from { transform: scaleY(0); } }
.trend-bar:nth-child(-n+6) { animation-delay: .02s; }
.trend-bar:nth-child(n+7):nth-child(-n+12) { animation-delay: .06s; }
.trend-bar:nth-child(n+13):nth-child(-n+18) { animation-delay: .1s; }
.trend-bar:nth-child(n+19):nth-child(-n+24) { animation-delay: .14s; }
.trend-bar:nth-child(n+25) { animation-delay: .18s; }
.trend-line { fill: none; stroke: #0b9d6e; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; animation: dotIn .7s both .45s; }
.trend-dot { fill: #0b9d6e; animation: dotIn .4s both .6s; }
.trend-x { font-size: 9.5px; fill: var(--text-3); }
.trend-legend { display: flex; gap: 16px; justify-content: center; font-size: 11.5px; color: var(--text-3); margin-top: 8px; }
.trend-legend span { display: inline-flex; align-items: center; gap: 5px; }
.trend-legend i { display: inline-block; }
.tl-bar { width: 10px; height: 8px; border-radius: 2px; background: #ccd8fb; }
.tl-line { width: 14px; height: 2.5px; border-radius: 2px; background: #0b9d6e; }

/* 薄弱章节 */
.weak-row { display: flex; align-items: center; gap: 11px; padding: 11px 0; border-bottom: 1px solid var(--line-2); }
.weak-row:last-child { border-bottom: none; }
.wk-rank {
  width: 30px; height: 30px; border-radius: 9px; flex: none; font-size: 14px; font-weight: 750;
  display: flex; align-items: center; justify-content: center;
}
.wk-info { flex: 1; min-width: 0; }
.wk-name { font-size: 13.5px; font-weight: 600; margin-bottom: 6px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wk-val { flex: none; text-align: right; font-size: 15px; font-weight: 700; font-variant-numeric: tabular-nums; }
.wk-val small { display: block; font-size: 10.5px; color: var(--text-3); font-weight: 400; margin-top: 1px; }

/* ---------- 卡片 ---------- */
/* 层级编码：独立卡片 = 可交互入口（科目/模考/表单）；纯内容条目用轻量分隔线列表 */
.sub-card, .exam-card, .a-card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg);
  box-shadow: var(--sh-1);
}
.sub-card { padding: 16px; margin-bottom: 12px; transition: box-shadow .2s, transform .2s, border-color .2s; }
@media (hover: hover) {
  .sub-card:hover, .exam-card:hover { box-shadow: var(--sh-2); transform: translateY(-2px); border-color: #dfe3f0; }
}
.sub-card .row { display: flex; align-items: center; gap: 12px; }
.sub-card .sub-head { cursor: pointer; }
.sub-chev { color: var(--text-3); display: flex; transition: transform .2s; }
.sub-chev .ico { width: 18px; height: 18px; }
.sub-card.open .sub-chev { transform: rotate(180deg); }
/* 章节展开区 */
.ch-ex { display: none; margin-top: 6px; border-top: 1px dashed var(--line); padding-top: 4px; }
.sub-card.open .ch-ex { display: block; animation: fadeUp .25s cubic-bezier(.22, .8, .36, 1); }
.ch-ex-row {
  display: block; padding: 10px 4px 11px;
  border-radius: 9px; cursor: pointer; transition: background .13s;
}
.ch-ex-row:hover { background: #f6f8fe; }
.ch-ex-row:active { background: var(--primary-bg); }
.ch-ex-top { display: flex; align-items: center; gap: 10px; }
.ch-ex-name { flex: 1; min-width: 0; font-size: 13.5px; font-weight: 600; letter-spacing: .2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ch-ex-bot { display: flex; align-items: center; margin-top: 8px; }
.ch-ex-val { flex: none; font-size: 12px; font-weight: 550; color: var(--text-3); font-variant-numeric: tabular-nums; }
.ch-ex-val.full { color: var(--success); font-weight: 700; }
.ch-ex-arrow { flex: none; color: #c2c8d8; display: flex; transition: color .15s, transform .15s; }
.ch-ex-arrow .ico { width: 16px; height: 16px; }
.ch-ex-row:hover .ch-ex-arrow { color: var(--primary); transform: translateX(2px); }
.ch-ex-row { border-radius: 10px; padding: 9px 10px; margin: 0 -10px; transition: background .14s; }
.ch-ex-row:hover { background: var(--line-2, #f2f4f9); }

/* 极光进度条（品牌靛蓝系双色渐变 + 流动 + 亮晶晶光点） */
.pb {
  display: block; flex: 1; width: 100%; height: 8px; border-radius: 999px;
  background: linear-gradient(180deg, #eaecf3 0%, #f3f4f9 100%);
  box-shadow: inset 0 1px 2px rgba(20, 27, 45, .08), inset 0 -1px 0 rgba(255, 255, 255, .7);
  overflow: hidden;
}
.pb i {
  display: block; height: 100%; border-radius: 999px; position: relative;
  background: linear-gradient(90deg, #4360ee, #7a5cff, #4dd0e1, #4360ee);
  background-size: 200% 100%;
  box-shadow: 0 1px 5px rgba(91, 116, 250, .45);
  animation: barGrow .8s cubic-bezier(.22, .8, .36, 1) both, pbFlow 5s linear infinite .9s;
}
@keyframes pbFlow { to { background-position: 200% 0; } }
.pb i.full {
  background: linear-gradient(90deg, #0b9d6e, #34d399, #0b9d6e);
  background-size: 200% 100%;
  box-shadow: 0 0 0 1px rgba(52, 211, 153, .4), 0 1px 10px rgba(52, 211, 153, .55);
}
/* 流动的亮晶晶光点 */
.pb i::before {
  content: ''; position: absolute; top: 50%; left: 2%;
  width: 16px; height: 16px; transform: translate(-50%, -50%);
  background: radial-gradient(circle, rgba(255, 255, 255, .98) 0%, rgba(255, 255, 255, .6) 26%, rgba(255, 255, 255, 0) 62%);
  filter: drop-shadow(0 0 5px rgba(255, 255, 255, .95));
  opacity: 0; pointer-events: none;
  animation: pbSpark 3.6s ease-in-out infinite 1.2s;
}
@keyframes pbSpark {
  0% { left: 2%; opacity: 0; }
  14% { opacity: 1; }
  50% { left: 98%; opacity: 1; }
  64% { left: 98%; opacity: 0; }
  100% { left: 2%; opacity: 0; }
}
/* 载入时的扫光（三次后停） */
.pb i::after {
  content: ''; position: absolute; inset: 0; border-radius: inherit;
  background: linear-gradient(115deg, transparent 28%, rgba(255, 255, 255, .6) 50%, transparent 72%);
  transform: translateX(-130%);
  animation: barSheen 3.2s ease-in-out 3;
}

/* ---------- 进度条组件（凹槽轨道 + 渐变填充 + 流光） ---------- */
.ch-ex-bar, .rp-bar, .br-pct .bar {
  border-radius: 999px;
  background: linear-gradient(180deg, #eaecf3 0%, #f3f4f9 100%);
  box-shadow: inset 0 1px 2px rgba(20, 27, 45, .08), inset 0 -1px 0 rgba(255, 255, 255, .7);
  overflow: hidden;
}
.ch-ex-bar i, .rp-bar i, .br-pct .bar i {
  position: relative; display: block; height: 100%; border-radius: 999px;
  background: linear-gradient(90deg, #5570f0 0%, #3e56d6 100%);
  box-shadow: 0 1px 3px rgba(62, 86, 214, .4);
  animation: barGrow .8s cubic-bezier(.22, .8, .36, 1) both;
}
@keyframes barGrow { from { width: 0; } }
.ch-ex-bar i.full, .rp-bar i.full {
  background: linear-gradient(90deg, #17b583 0%, #0b9d6e 100%);
  box-shadow: 0 1px 3px rgba(11, 157, 110, .4);
}
/* 填充上的流光扫过（载入后扫三次即停，避免持续装饰性动效） */
.ch-ex-bar i::after, .rp-bar i::after, .br-pct .bar i::after {
  content: ''; position: absolute; inset: 0; border-radius: inherit;
  background: linear-gradient(115deg, transparent 28%, rgba(255, 255, 255, .5) 50%, transparent 72%);
  transform: translateX(-130%);
  animation: barSheen 3.2s ease-in-out 3;
}
@keyframes barSheen {
  0%, 55% { transform: translateX(-130%); }
  90%, 100% { transform: translateX(130%); }
}
.rp-bar { flex: 1; }
.sub-icon {
  width: 46px; height: 46px; border-radius: var(--r-md); flex: none;
  display: flex; align-items: center; justify-content: center; font-size: 23px;
  box-shadow: inset 0 0 0 1px rgba(20, 27, 45, .04);
}
.sub-info { flex: 1; min-width: 0; }
.sub-name { font-size: 16.5px; font-weight: 650; }
.sub-desc { font-size: 12px; color: var(--text-3); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sub-meta { display: flex; align-items: center; gap: 8px; margin-top: 12px; flex-wrap: wrap; }
.progress-pill {
  font-size: 11.5px; color: var(--text-2); background: var(--line-2);
  padding: 3px 10px; border-radius: 999px; font-variant-numeric: tabular-nums;
}
.acc-pill { font-size: 11.5px; padding: 3px 10px; border-radius: 999px; background: var(--success-bg); color: var(--success); font-weight: 600; }
.acc-pill.none { background: var(--line-2); color: var(--text-3); font-weight: 400; }

.exam-card { padding: 16px; margin-bottom: 12px; transition: box-shadow .2s, transform .2s, border-color .2s; }
.exam-card .ec-name { font-size: 16.5px; font-weight: 700; display: flex; align-items: center; gap: 9px; }
.exam-card .ec-name .ico { width: 30px; height: 30px; padding: 6px; box-sizing: border-box; background: var(--primary-bg); border-radius: 9px; color: var(--primary); }
/* 一行式极简模考卡：名称+题数在左，按钮在右 */
.exam-card.simple { border-radius: 14px; }
.exam-card.simple:hover { transform: translateY(-2px); border-color: color-mix(in srgb, var(--primary) 30%, var(--line)); }
.exam-card.simple .ec-name .ico {
  background: linear-gradient(135deg, color-mix(in srgb, var(--primary) 16%, #fff), color-mix(in srgb, var(--primary) 7%, #fff));
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--primary) 18%, transparent);
}
.exam-card.simple { display: flex; align-items: center; gap: 10px; padding: 13px 14px 13px 16px; }
.exam-card.simple .ec-name { flex: 1; min-width: 0; font-size: 15px; font-weight: 700; letter-spacing: .2px; }
.exam-card.simple .ec-name .ico { width: 27px; height: 27px; border-radius: 9px; flex: none; }
.exam-card.simple .ec-meta { font-size: 12px; font-weight: 500; color: var(--text-3); margin-left: 8px; font-variant-numeric: tabular-nums; letter-spacing: .2px; }
.exam-card.simple .btn { flex: none; padding: 7px 16px; font-size: 13px; }
.exam-card .ec-desc { font-size: 12.5px; color: var(--text-3); margin: 3px 0 10px; }
.exam-card .ec-parts { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.ec-part { font-size: 11px; background: var(--line-2); color: var(--text-2); padding: 3px 9px; border-radius: 6px; }
.ec-part.score { background: #eef1ff; color: var(--primary); font-weight: 600; }
.q-pts { display: inline-block; font-size: 11.5px; font-weight: 600; color: var(--primary); background: #eef1ff; border-radius: 999px; padding: 2px 9px; margin-right: 6px; vertical-align: 1px; }
.exam-card .ec-foot { display: flex; align-items: center; gap: 8px; }
.exam-card .ec-meta { flex: 1; font-size: 12px; color: var(--text-3); }

.empty { text-align: center; color: var(--text-3); padding: 44px 20px; font-size: 13.5px; line-height: 2; }
.empty .em-ico {
  width: 64px; height: 64px; border-radius: 50%; margin: 0 auto 12px;
  background: var(--line-2); display: flex; align-items: center; justify-content: center;
}
.empty .em-ico .ico { width: 28px; height: 28px; color: #b6bed1; }
.empty.compact { padding: 18px 10px; line-height: 1.7; }
.empty.compact .em-ico { width: 46px; height: 46px; margin-bottom: 8px; }
.empty.compact .em-ico .ico { width: 21px; height: 21px; color: var(--success); }

/* ---------- 骨架屏（加载占位） ---------- */
@keyframes shimmer { 0% { background-position: -200% 0; } 100% { background-position: 200% 0; } }
.sk {
  border-radius: 8px;
  background: linear-gradient(100deg, #eceef5 32%, #f6f7fb 48%, #eceef5 64%);
  background-size: 200% 100%;
  animation: shimmer 1.3s linear infinite;
}
.sk-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 16px; margin-bottom: 12px; box-shadow: var(--sh-1); }
.sk-line { height: 13px; margin-bottom: 9px; }

/* ---------- 列表入场动效 ---------- */
@keyframes fadeUp { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
.fade-list > * { animation: fadeUp .4s cubic-bezier(.22, .8, .36, 1) both; }
.fade-list > *:nth-child(2) { animation-delay: .04s; }
.fade-list > *:nth-child(3) { animation-delay: .08s; }
.fade-list > *:nth-child(4) { animation-delay: .12s; }
.fade-list > *:nth-child(5) { animation-delay: .16s; }
.fade-list > *:nth-child(6) { animation-delay: .2s; }
.fade-list > *:nth-child(n+7) { animation-delay: .24s; }

/* ---------- 底部标签栏（桌面端变为左侧导航） ---------- */
/* 手机端用 sticky：处于文档流内、钉在视口底部，规避 iOS/微信内核下 fixed 沉底的问题 */
.tabbar {
  position: sticky; bottom: 0; z-index: 40;
  display: flex; justify-content: space-around;
  background: rgba(255,255,255,.92); backdrop-filter: blur(14px) saturate(1.4);
  -webkit-backdrop-filter: blur(14px) saturate(1.4);
  border-top: 1px solid var(--line);
  padding-bottom: var(--safe-b);
  box-shadow: 0 -4px 24px rgba(20, 27, 45, .06);
  transform: translateZ(0);
}
.tb-logo { display: none; }
.tb-logo em { font-style: normal; font-size: 12px; font-weight: 600; color: var(--primary); margin-left: 2px; }
.tabbar .tab {
  flex: 1; text-align: center; padding: 6px 0 5px; cursor: pointer; user-select: none;
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  border-radius: var(--r-md);
  transition: color .15s;
}
.tab .ico { width: 23px; height: 23px; color: var(--text-3); transition: color .18s; }
.tab .txt { font-size: 11px; color: var(--text-3); transition: color .18s; position: relative; z-index: 1; }
.tab.on .txt { color: var(--primary); font-weight: 600; }
.tab.on .ico { color: var(--primary); animation: tabPop .26s cubic-bezier(.22, .8, .36, 1); }
@keyframes tabPop { 0% { transform: scale(.82); } 100% { transform: scale(1); } }
@media (max-width: 1023px) {
  /* 激活胶囊：柔和品牌色底、托起图标，原生 App 质感 */
  .tab { position: relative; }
  .tab.on::before {
    content: ''; position: absolute; left: 50%; bottom: calc(2px + var(--safe-b));
    transform: translateX(-50%);
    width: 46px; height: 30px; border-radius: 999px;
    background: linear-gradient(180deg, color-mix(in srgb, var(--primary) 13%, transparent), color-mix(in srgb, var(--primary) 8%, transparent));
  }
  .tab.on .ico, .tab.on .txt { position: relative; z-index: 1; }
}
@media (hover: hover) {
  .tabbar .tab:hover .ico { color: var(--primary); }
}

/* ---------- 弹层 ---------- */
.modal-mask {
  position: fixed; inset: 0; z-index: 90; background: rgba(16, 21, 35, .5);
  display: flex; align-items: center; justify-content: center; padding: 24px 18px;
  backdrop-filter: blur(6px);
  animation: maskIn .2s ease;
}
@keyframes maskIn { from { opacity: 0; } to { opacity: 1; } }
.modal {
  background: var(--card); border-radius: var(--r-xl); width: 100%; max-width: 380px;
  padding: 22px 20px; box-shadow: var(--sh-3);
  animation: pop .28s var(--ease-spring); max-height: 88vh; overflow-y: auto;
}
@keyframes pop { from { transform: scale(.92) translateY(10px); opacity: 0; } to { transform: scale(1) translateY(0); opacity: 1; } }
.modal h3 { font-size: 17px; margin-bottom: 6px; font-weight: 700; }
.modal .m-sub { font-size: 13px; color: var(--text-2); margin-bottom: 14px; line-height: 1.7; }
.m-btns { display: flex; gap: 10px; margin-top: 18px; }
.m-btns .btn { flex: 1; padding: 11px; }
.modal-wide { max-width: 560px; }

.mode-list .mode-item {
  display: flex; align-items: center; gap: 12px; padding: 13px 14px;
  border: 1.5px solid var(--line); border-radius: var(--r-md); margin-bottom: 10px;
  cursor: pointer; transition: border-color .14s, background .14s, transform .14s, box-shadow .14s;
}
.mode-item:hover { border-color: #b9c4ef; box-shadow: var(--sh-1); }
.mode-item:active { transform: scale(.99); }
.mode-item.on { border-color: var(--primary); background: var(--primary-bg); }
.mode-item .mi-ico {
  width: 36px; height: 36px; border-radius: 10px; flex: none;
  background: var(--primary-bg); color: var(--primary);
  display: flex; align-items: center; justify-content: center;
}
.mode-item .mi-ico .ico { width: 19px; height: 19px; }
.mode-item.on .mi-ico { background: #fff; }
.mode-item .mi-name { font-size: 15px; font-weight: 600; }
.mode-item .mi-desc { font-size: 12px; color: var(--text-3); }
.count-row { display: flex; gap: 8px; margin: 4px 0 6px; }
.count-row .cnt {
  flex: 1; text-align: center; padding: 9px 0; border: 1.5px solid var(--line);
  border-radius: 10px; cursor: pointer; font-size: 14px; transition: all .12s;
}
.count-row .cnt.on { border-color: var(--primary); color: var(--primary); background: var(--primary-bg); font-weight: 600; }

.type-checks { display: flex; gap: 8px; }
.type-checks .tc {
  flex: 1; text-align: center; border: 1.5px solid var(--line); border-radius: 10px;
  padding: 8px 0; font-size: 13.5px; cursor: pointer; background: var(--card);
  user-select: none; transition: all .12s;
}
.type-checks .tc.on { border-color: var(--primary); color: var(--primary); background: var(--primary-bg); font-weight: 600; }

/* ---------- 表单控件 ---------- */
.fi {
  width: 100%; border: 1.5px solid var(--line); border-radius: 10px; padding: 10px 12px;
  font-size: 14.5px; font-family: inherit; background: var(--card); color: var(--text);
  outline: none; transition: border-color .15s, box-shadow .15s;
}
.fi:hover { border-color: #cdd3e0; }
.fi:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(79, 110, 247, .14); }
.fi + .fi { margin-top: 10px; }
textarea.fi { resize: vertical; min-height: 70px; line-height: 1.6; }
.fl { display: block; font-size: 12.5px; color: var(--text-2); font-weight: 600; margin: 12px 0 6px; }
.fl.sm { display: inline-block; margin: 0 0 4px; color: var(--text-3); font-weight: 500; }
.eb-scores > div { text-align: center; }
.frow2 { display: flex; gap: 10px; }
.frow2 > * { flex: 1; min-width: 0; }
.fcheck { display: flex; align-items: center; gap: 8px; font-size: 14px; padding: 8px 2px; cursor: pointer; }
.fcheck input { width: 17px; height: 17px; accent-color: var(--primary); }

.upload-row { display: flex; align-items: center; gap: 10px; margin-top: 6px; flex-wrap: wrap; }
.upload-hint { font-size: 12px; color: var(--text-3); }

/* ---------- 答题卡（抽屉 + 桌面侧栏共用） ---------- */
.sheet {
  position: fixed; left: 50%; transform: translateX(-50%); bottom: 0; z-index: 95;
  width: 100%; max-width: 640px; background: var(--card);
  border-radius: 18px 18px 0 0; padding: 20px 18px calc(18px + var(--safe-b));
  animation: up .28s var(--ease-spring); max-height: 72vh; overflow-y: auto; box-shadow: var(--sh-3);
}
.sheet::before {   /* 顶部把手 */
  content: ''; position: sticky; display: block; top: -14px; margin: -14px auto 10px;
  width: 40px; height: 4.5px; border-radius: 999px; background: var(--line);
}
@keyframes up { from { transform: translate(-50%, 52px); opacity: 0; } to { transform: translate(-50%, 0); opacity: 1; } }
.sheet-legend { display: flex; gap: 14px; font-size: 12px; color: var(--text-2); margin-bottom: 12px; flex-wrap: wrap; }
.sheet-legend i { display: inline-block; width: 12px; height: 12px; border-radius: 4px; margin-right: 4px; vertical-align: -1px; }
.l-done { background: var(--primary-bg); border: 1px solid var(--primary); }
.l-right { background: var(--success-bg); border: 1px solid var(--success); }
.l-wrong { background: var(--danger-bg); border: 1px solid var(--danger); }
.l-none { background: var(--card); border: 1px solid var(--line); }
.sheet-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(38px, 1fr)); gap: 8px; }
.sheet-grid .sq {
  aspect-ratio: 1; border-radius: 9px; border: 1.5px solid var(--line);
  display: flex; align-items: center; justify-content: center;
  font-size: 13.5px; cursor: pointer; background: var(--card);
  font-variant-numeric: tabular-nums; transition: all .12s;
}
.sq:hover { border-color: var(--primary); }
.sq.done { background: var(--primary-bg); border-color: var(--primary); color: var(--primary); font-weight: 600; }
.sq.right { background: var(--success-bg); border-color: var(--success); color: var(--success); font-weight: 600; }
.sq.wrong { background: var(--danger-bg); border-color: var(--danger); color: var(--danger); font-weight: 600; }
.sq.cur { outline: 2.5px solid #1f2937; outline-offset: 1.5px; }

/* ---------- 答题页 ---------- */
.quiz-top {
  position: sticky; top: 0; z-index: 30; background: rgba(255,255,255,.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
  padding: 10px 16px 0;
}
.quiz-top .qt-row { display: flex; align-items: center; gap: 10px; max-width: 960px; margin: 0 auto; }
.qt-back {
  font-size: 26px; cursor: pointer; color: var(--text-2); padding: 0 8px 0 2px;
  line-height: 1; font-family: system-ui; height: 32px; display: flex; align-items: center;
  border-radius: 8px; transition: background .15s;
}
.qt-back:hover { background: var(--line-2); }
.qt-title { flex: 1; min-width: 0; }
.qt-title .name { font-size: 15.5px; font-weight: 650; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.qt-title .prog { font-size: 11.5px; color: var(--text-3); }
.qt-timer { font-size: 15px; font-weight: 700; color: var(--danger); font-variant-numeric: tabular-nums; }
.qt-right { display: flex; align-items: center; gap: 8px; }
.qt-submit {
  border: none; cursor: pointer; font-family: inherit;
  background: var(--primary); color: #fff; font-size: 12px; font-weight: 600;
  padding: 5px 12px; border-radius: 999px;
}
.qt-submit:hover { background: var(--primary-600); }
.qt-progress { height: 3.5px; background: var(--line-2); overflow: hidden; margin-top: 9px; border-radius: 999px; }
.qt-progress i { display: block; height: 100%; background: var(--grad); border-radius: 999px; transition: width .3s cubic-bezier(.22, .8, .36, 1); position: relative; }
.qt-progress i::after {   /* 彗星头光晕 */
  content: ''; position: absolute; right: -3px; top: 50%; transform: translateY(-50%);
  width: 14px; height: 14px; border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, .95) 0%, rgba(130, 155, 255, .5) 40%, transparent 72%);
}

.quiz-layout { flex: 1; width: 100%; }
.quiz-body { padding: 18px 16px 120px; max-width: 640px; margin: 0 auto; width: 100%; }
.q-type {
  display: inline-block; font-size: 11.5px; font-weight: 650; padding: 2px 9px;
  border-radius: 6px; margin-bottom: 10px;
}
.q-type.single { color: var(--primary); background: var(--primary-bg); }
.q-type.multi { color: #b45309; background: var(--warn-bg); }
.q-type.judge { color: #0e7490; background: #d9f3fa; }
.q-type.fill { color: #7c3aed; background: #efe7fd; }
.q-type.short { color: #be185d; background: #fde7f1; }

/* ---------- 填空 / 简答作答区 ---------- */
.fill-area { display: flex; gap: 10px; align-items: center; margin-top: 14px; }
.fill-area .fill-input { flex: 1; font-size: 15px; padding: 11px 14px; }
.fill-hint { flex: none; font-size: 11.5px; color: var(--text-3); }
.short-area { display: flex; flex-direction: column; gap: 10px; margin-top: 14px; }
.short-area textarea { font-size: 14.5px; line-height: 1.7; resize: vertical; }
.short-area .btn { align-self: flex-end; }
.self-eval {
  margin-top: 14px; border: 1.5px dashed #d8cbf5; border-radius: 14px;
  background: #faf7ff; padding: 14px;
}
.self-eval .se-q { font-size: 13.5px; font-weight: 600; color: var(--text-2); margin-bottom: 10px; }
.self-eval .se-btns { display: flex; gap: 10px; }
.self-eval .se-btns .btn { flex: 1; }
.feedback.short-ref { border-style: dashed; }
.feedback.short-ref .fb-line b { white-space: pre-wrap; }
.q-stem { font-size: 16.5px; font-weight: 600; line-height: 1.75; margin-bottom: 18px; white-space: pre-wrap; }

.opts { display: flex; flex-direction: column; gap: 11px; }
.opt {
  display: flex; align-items: flex-start; gap: 11px; padding: 12px 13px;
  border: 1.5px solid var(--line); border-radius: var(--r-md); background: var(--card);
  cursor: pointer; transition: border-color .14s, background .14s, box-shadow .14s; font-size: 15px;
}
.opt:hover { border-color: #b9c4ef; background: #f8faff; box-shadow: var(--sh-1); }
.opt .letter {
  width: 26px; height: 26px; border-radius: 50%; flex: none; margin-top: 1px;
  border: 1.5px solid var(--line); display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 600; color: var(--text-2); transition: all .12s;
}
.opt.sel { border-color: var(--primary); background: var(--primary-bg); }
.opt.sel .letter { border-color: var(--primary); background: var(--primary); color: #fff; }
.opt.right { border-color: var(--success); background: var(--success-bg); }
.opt.right .letter { border-color: var(--success); background: var(--success); color: #fff; }
.opt.wrong { border-color: var(--danger); background: var(--danger-bg); }
.opt.wrong .letter { border-color: var(--danger); background: var(--danger); color: #fff; }
.opt.dim { opacity: .55; }

.feedback { border-radius: var(--r-md); padding: 13px 14px; margin-top: 16px; font-size: 14px; animation: pop .18s ease; }
.feedback.ok { background: var(--success-bg); color: var(--success); }
.feedback.bad { background: var(--danger-bg); color: var(--danger); }
.feedback .fb-line { font-weight: 700; margin-bottom: 6px; font-size: 15px; }
.feedback .fb-ans { color: var(--text); }
.feedback .fb-tip {
  margin-top: 9px; padding-top: 9px; border-top: 1px dashed rgba(31,41,55,.16);
  color: var(--text-2); line-height: 1.75;
}
.feedback .fb-tip b { color: var(--text); }

.quiz-foot {
  position: fixed; bottom: 0; left: 50%; transform: translateX(-50%);
  width: 100%; max-width: 640px; z-index: 35;
  display: flex; align-items: center; gap: 10px;
  background: rgba(255,255,255,.94); backdrop-filter: blur(10px);
  border-top: 1px solid var(--line);
  padding: 10px 14px calc(10px + var(--safe-b));
}
.quiz-foot .btn { flex: 1; text-align: center; padding: 11px 8px; }
.quiz-foot .mini { flex: 0 0 auto; width: 52px; padding: 11px 0; font-size: 12.5px; }
.confirm-multi { flex: 1.4 !important; background: var(--grad); color: #fff; box-shadow: 0 2px 8px rgba(79,110,247,.35); }

/* ---------- 结果页 ---------- */
.result-hero {
  text-align: center; padding: 34px 20px 28px; color: #fff;
  background: var(--grad-deep); position: relative; overflow: hidden;
}
.result-hero::after {
  content: ''; position: absolute; left: -40px; bottom: -90px;
  width: 240px; height: 240px; border-radius: 50%;
  background: radial-gradient(closest-side, rgba(255,255,255,.13), transparent);
}
.result-hero::before {
  content: ''; position: absolute; right: -70px; top: -90px;
  width: 230px; height: 230px; border-radius: 50%;
  background: radial-gradient(closest-side, rgba(255,255,255,.1), transparent);
}
.result-hero .score { font-size: 56px; font-weight: 700; line-height: 1.1; font-variant-numeric: tabular-nums; letter-spacing: 1px; position: relative; font-family: var(--font-display); }
.result-hero .score small { font-size: 20px; font-weight: 600; letter-spacing: 0; }
.result-hero .score.recite-done .ico { width: 52px; height: 52px; opacity: .95; }
.result-hero .verdict { font-size: 14px; opacity: .9; margin-top: 4px; position: relative; }
.result-hero .facts { display: flex; justify-content: center; gap: 26px; margin-top: 18px; font-size: 12.5px; opacity: .92; position: relative; }
.result-hero .facts b { display: block; font-size: 17px; text-align: center; font-variant-numeric: tabular-nums; }

.result-cols { display: grid; gap: 14px; }
.review-item { padding: 14px 4px; margin-bottom: 0; border-bottom: 1px solid var(--line-2); border-radius: 8px; }
.review-item:last-child { border-bottom: none; }
.review-item .rv-stem { font-size: 14.5px; font-weight: 600; line-height: 1.7; }
.rv-tags { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.rv-tag { font-size: 11px; padding: 2px 8px; border-radius: 6px; }
.rv-tag.ok { background: var(--success-bg); color: var(--success); }
.rv-tag.bad { background: var(--danger-bg); color: var(--danger); }
.rv-tag.ans { background: var(--line-2); color: var(--text-2); }
.rv-tip { margin-top: 8px; font-size: 13px; color: var(--text-2); line-height: 1.7; border-top: 1px dashed var(--line); padding-top: 8px; }

.report-row { display: flex; align-items: center; gap: 10px; padding: 7px 0; font-size: 13px; }
.rp-name { flex: 0 0 44%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text-2); }
.rp-val { flex: none; font-variant-numeric: tabular-nums; color: var(--text-2); font-size: 12px; }

/* ---------- 错题本 / 考试记录 ---------- */
.wrong-item, .hist-item {
  padding: 12px 6px; margin-bottom: 0; display: flex; align-items: center; gap: 12px;
  border-bottom: 1px solid var(--line-2); border-radius: 8px;
  transition: background .13s;
}
.wrong-item:hover, .hist-item:hover { background: #f7f8fd; }
.wrong-item:last-child, .hist-item:last-child { border-bottom: none; }
.wrong-item .w-info { flex: 1; min-width: 0; cursor: pointer; }
.wrong-item .w-stem {
  font-size: 14px; font-weight: 550; overflow: hidden; text-overflow: ellipsis;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
}
.wrong-item .w-meta { font-size: 11.5px; color: var(--text-3); margin-top: 3px; }
.wrong-item .w-del {
  flex: none; border: none; background: none; color: var(--text-3);
  font-size: 15px; cursor: pointer; padding: 8px; border-radius: 8px;
}
.wrong-item .w-del:hover { background: var(--danger-bg); color: var(--danger); }

.hist-item .h-score {
  width: 52px; height: 52px; border-radius: var(--r-md); flex: none;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  font-weight: 700; background: var(--primary-bg); color: var(--primary);
}
.hist-item .h-score span { font-size: 17px; font-variant-numeric: tabular-nums; }
.hist-item .h-score small { font-size: 10px; font-weight: 500; }
.hist-item .h-info { flex: 1; min-width: 0; }
.hist-item .h-name { font-size: 14.5px; font-weight: 600; }
.hist-item .h-meta { font-size: 11.5px; color: var(--text-3); margin-top: 3px; }
.hist-item .h-score[data-cls="good"] { background: var(--success-bg); color: var(--success); }
.hist-item .h-score[data-cls="mid"] { background: var(--warn-bg); color: var(--warn); }
.hist-item .h-score[data-cls="bad"] { background: var(--danger-bg); color: var(--danger); }

/* ---------- 图片题干 ---------- */
.rich-img { max-width: 100%; border-radius: 10px; margin: 8px 0; display: block; }

/* ---------- 导入预览 ---------- */
.imp-preview {
  max-height: 300px; overflow-y: auto; border: 1.5px dashed var(--line); border-radius: 10px;
  padding: 10px 12px; margin-top: 10px; font-size: 13px; background: #fafbfd;
}
.imp-q { padding: 6px 0; border-bottom: 1px dashed #eef0f4; }
.imp-q:last-child { border-bottom: none; }

/* ---------- Toast ---------- */
#toast {
  position: fixed; left: 50%; bottom: 110px; transform: translateX(-50%) translateY(8px);
  background: rgba(17, 24, 39, .86); color: #fff; font-size: 13.5px;
  padding: 9px 18px; border-radius: 999px; z-index: 120;
  opacity: 0; pointer-events: none; transition: all .2s; white-space: nowrap;
  box-shadow: var(--sh-2);
}
#toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ============================================================
 * 登录 / 注册（桌面分屏，移动单卡）
 * ============================================================ */
.auth-shell { min-height: 100vh; display: flex; }
.auth-brand { display: none; }
.auth-wrap {
  flex: 1; display: flex; align-items: center; justify-content: center;
  background: var(--bg); padding: 28px 20px;
}
.auth-card {
  width: 100%; max-width: 380px; background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r-xl); padding: 30px 26px 26px; box-shadow: var(--sh-2);
}
.auth-logo { text-align: center; font-size: 21px; font-weight: 700; letter-spacing: 2px; margin-bottom: 4px; display: flex; align-items: center; justify-content: center; gap: 9px; font-family: var(--font-display); }
.auth-logo .ico { width: 30px; height: 30px; color: var(--primary); }
.auth-logo small { display: block; font-size: 12px; font-weight: 400; color: var(--text-3); margin-top: 4px; letter-spacing: 0; }
.auth-tabs { display: flex; background: var(--line-2); border-radius: 10px; padding: 4px; margin: 18px 0; }
.auth-tabs .at {
  flex: 1; text-align: center; padding: 8px 0; font-size: 14px; font-weight: 600;
  color: var(--text-2); border-radius: 8px; cursor: pointer; transition: all .15s;
}
.auth-tabs .at.on { background: var(--card); color: var(--primary); box-shadow: var(--sh-1); }
.auth-err { color: var(--danger); font-size: 13px; min-height: 18px; margin: 6px 0 8px; text-align: center; }
.auth-tip { text-align: center; color: var(--text-3); font-size: 12px; margin-top: 14px; }
.auth-tip a { color: var(--primary); cursor: pointer; font-weight: 600; }

/* ============================================================
 * 管理后台
 * ============================================================ */
body.admin-body { background: linear-gradient(180deg, #edf0f9 0%, #f2f3f8 360px); }
.admin-top {
  position: sticky; top: 0; z-index: 50; color: #fff;
  background:
    radial-gradient(280px 280px at 92% -30%, rgba(255, 255, 255, .14), transparent 66%),
    radial-gradient(240px 240px at 4% 130%, rgba(122, 143, 255, .26), transparent 64%),
    linear-gradient(158deg, #20294c 0%, #1a2140 52%, #232c55 100%);
  box-shadow: 0 1px 0 rgba(255,255,255,.06) inset, 0 6px 24px rgba(16, 23, 45, .3);
  display: flex; flex-wrap: wrap; align-items: center; gap: 2px 14px; padding: 10px 14px 2px;
}
.admin-top .brand { font-size: 15.5px; font-weight: 700; letter-spacing: .5px; white-space: nowrap; display: flex; align-items: center; gap: 8px; }
.admin-top .brand .ico { width: 20px; height: 20px; color: #8fa5ff; }
.admin-nav { display: flex; gap: 5px; order: 5; flex: 1 1 100%; min-width: 0; overflow-x: auto; scrollbar-width: none; padding: 4px 0 9px; }
.admin-nav::-webkit-scrollbar { display: none; }
.admin-nav .an {
  display: flex; align-items: center; gap: 7px; position: relative;
  padding: 6px 13px; border-radius: 999px; font-size: 13.5px; cursor: pointer;
  color: rgba(200, 210, 238, .6); white-space: nowrap; transition: all .15s;
}
.admin-nav .an .ico { width: 17px; height: 17px; }
.admin-nav .an:hover { color: #fff; background: rgba(255,255,255,.07); }
.admin-nav .an.on {
  color: #fff; font-weight: 600;
  background: linear-gradient(180deg, rgba(96, 123, 255, .34), rgba(96, 123, 255, .18));
  box-shadow: inset 0 0 0 1px rgba(154, 170, 255, .28), 0 2px 10px -3px rgba(96, 123, 255, .5);
}
.admin-top .top-actions { display: flex; gap: 12px; align-items: center; margin-left: auto; font-size: 13px; color: rgba(210, 218, 240, .85); }
.admin-top .top-actions .who { font-weight: 600; }
.admin-top .top-actions .lnk { cursor: pointer; color: #9db1ff; display: inline-flex; align-items: center; gap: 4px; }
.admin-top .top-actions .lnk .ico { width: 14px; height: 14px; }
.admin-top .top-actions .lnk:hover { color: #fff; }
.admin-main { padding: 18px 14px 60px; max-width: 1080px; margin: 0 auto; width: 100%; }

.a-card { padding: 18px; margin-bottom: 16px; border-radius: 16px; border-color: #eceef5; }
.list-card { padding: 5px 14px; }
.a-card h3 { font-size: 16px; margin-bottom: 4px; font-weight: 700; }
.a-card .a-sub { font-size: 12.5px; color: var(--text-3); margin-bottom: 12px; }
.a-toolbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 14px; }
.a-toolbar .fi { width: auto; padding: 7px 11px; }
.a-toolbar select.fi { min-width: 128px; }
.a-toolbar .spacer { flex: 1; }
.a-toolbar .btn .ico { width: 15px; height: 15px; }

.a-table-wrap { overflow-x: auto; border-radius: var(--r-md); }
.a-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.a-table th {
  text-align: left; color: var(--text-3); font-weight: 600; font-size: 11.5px; letter-spacing: 1px;
  padding: 10px; border-bottom: 1px solid var(--line); white-space: nowrap;
}
.a-table td { padding: 12px 10px; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
.a-table tbody tr { transition: background .12s; }
.a-table tbody tr:hover { background: #f8f9fd; }
.a-table tbody tr:last-child td { border-bottom: none; }
.a-table .t-stem { max-width: 380px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mini-btn {
  border: 1px solid var(--line); background: var(--card); font-size: 12.5px; cursor: pointer; padding: 4px 11px;
  border-radius: 999px; color: var(--text-2); font-family: inherit; transition: all .13s;
}
.mini-btn:hover { border-color: #b9c4ef; background: #f6f8fe; color: var(--primary); }
.mini-btn.danger { color: var(--danger); }
.mini-btn.danger:hover { border-color: #f0b9bb; background: var(--danger-bg); }

/* 多选科目 chip（生成激活码 / 用户权限弹窗共用） */
.gc-subs { display: flex; flex-wrap: wrap; gap: 8px; }
.gc-sub {
  display: inline-flex; align-items: center; gap: 6px;
  border: 1.5px solid var(--line); background: var(--card); border-radius: 999px;
  padding: 7px 14px; font-size: 13.5px; font-weight: 600; color: var(--text-2);
  cursor: pointer; font-family: inherit; transition: all .14s;
}
.gc-sub em { font-style: normal; font-size: 11px; color: var(--text-3); font-weight: 500; }
.gc-sub:hover { border-color: color-mix(in srgb, var(--sc, #4360ee) 45%, var(--line)); background: color-mix(in srgb, var(--sc, #4360ee) 5%, var(--card)); }
.gc-sub.on {
  border-color: var(--sc, #4360ee); color: var(--sc, #4360ee);
  background: color-mix(in srgb, var(--sc, #4360ee) 10%, var(--card));
  box-shadow: 0 2px 8px -3px color-mix(in srgb, var(--sc, #4360ee) 45%, transparent);
}
.gc-sub.on em { color: var(--sc, #4360ee); }
.gc-tip { font-size: 12px; color: var(--text-3); margin-top: 8px; }

/* 可视化调色器：预设色板圆点 + 原生取色器 + 当前色预览 */
.cp-row { display: flex; align-items: center; flex-wrap: wrap; gap: 7px; padding-top: 5px; }
.cp-sw {
  width: 26px; height: 26px; border-radius: 50%; border: 2px solid #fff; cursor: pointer;
  box-shadow: inset 0 0 0 1px rgba(23, 32, 64, .14);
  transition: transform .14s var(--ease-spring, ease), box-shadow .14s;
}
.cp-sw:hover { transform: scale(1.16); }
.cp-sw.on { box-shadow: 0 0 0 2px var(--card), 0 0 0 4px var(--primary); transform: scale(1.08); }
.cp-custom { display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; color: var(--text-3); cursor: pointer; }
.cp-custom input[type="color"] { width: 27px; height: 27px; border: none; border-radius: 50%; padding: 0; cursor: pointer; background: none; }
.cp-custom input[type="color"]::-webkit-color-swatch-wrapper { padding: 2px; }
.cp-custom input[type="color"]::-webkit-color-swatch { border: 1px dashed #c3c9d8; border-radius: 50%; }
.cp-cur { width: 14px; height: 14px; border-radius: 50%; margin-left: 2px; box-shadow: inset 0 0 0 1px rgba(23, 32, 64, .15); }
.a-pager { display: flex; align-items: center; gap: 10px; justify-content: center; margin-top: 14px; font-size: 13px; color: var(--text-2); }

.tag { display: inline-block; font-size: 11px; padding: 2.5px 9px; border-radius: 999px; background: var(--line-2); color: var(--text-2); font-weight: 500; }
.tag.blue { background: var(--primary-bg); color: var(--primary); }
.tag.green { background: var(--success-bg); color: var(--success); }
.tag.gray { background: var(--line-2); color: var(--text-3); }
.code-txt { font-family: Consolas, Menlo, monospace; font-size: 12.5px; font-weight: 600; letter-spacing: .5px; color: var(--primary-600); background: var(--primary-bg); padding: 2px 8px; border-radius: 6px; }
.tag.orange { background: var(--warn-bg); color: var(--warn); }
.tag.teal { background: #d9f3fa; color: #0e7490; }

.sub-block { border: 1.5px solid var(--line); border-radius: var(--r-lg); padding: 14px 16px; margin-bottom: 12px; background: var(--card); }
.sub-block .sb-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.sub-block .sb-title { font-size: 15.5px; font-weight: 700; flex: 1; min-width: 120px; }
.ch-row { display: flex; align-items: center; gap: 8px; padding: 7px 0; border-bottom: 1px dashed var(--line-2); font-size: 13.5px; }
.ch-row:last-child { border-bottom: none; }
.ch-row .ch-name { flex: 1; min-width: 0; }
.ch-row .cnt { color: var(--text-3); font-size: 12px; }

/* 模考组合器 */
.builder-row {
  display: flex; align-items: center; gap: 10px; padding: 9px 10px;
  border: 1.5px solid var(--line); border-radius: 10px; margin-bottom: 8px; font-size: 13.5px;
  transition: all .12s;
}
.builder-row.on { border-color: var(--primary); background: var(--primary-bg); }
.builder-row .br-name { flex: 1; min-width: 0; }
.builder-row .br-name small { display: block; color: var(--text-3); font-size: 11.5px; }
.builder-row input[type="number"] {
  width: 74px; border: 1.5px solid var(--line); border-radius: 8px; padding: 6px 8px;
  font-size: 13.5px; text-align: center; font-family: inherit; outline: none;
}
.builder-row.on input[type="number"] { border-color: var(--primary); }
.br-pct { width: 90px; flex: none; }
.br-pct .bar { height: 6px; margin-bottom: 3px; }
.br-pct .pct { font-size: 11px; color: var(--text-2); text-align: center; font-variant-numeric: tabular-nums; }
.builder-total {
  position: sticky; bottom: 0; background: var(--card); border-top: 1px solid var(--line);
  padding: 12px 2px 2px; display: flex; align-items: center; gap: 12px; margin-top: 6px;
}
.builder-total b { font-size: 18px; color: var(--primary); font-variant-numeric: tabular-nums; }

/* ============================================================
 * 响应式：平板 ≥ 768
 * ============================================================ */
@media (min-width: 768px) {
  body { font-size: 15px; }
  .admin-top { flex-wrap: nowrap; height: 54px; padding: 0 14px; }
  .admin-nav { order: 0; flex: 1 1 auto; padding: 0; }
  .content { padding: 20px 20px calc(88px + var(--safe-b)); max-width: 720px; }
  .page-head { padding: 30px 24px 24px; border-radius: 0 0 var(--r-xl) var(--r-xl); }
  .sub-grid, .exam-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
  .sub-card, .exam-card { margin-bottom: 0; height: 100%; }
  .modal { max-width: 430px; }
  .quiz-body { padding: 22px 20px 124px; }
  .sheet { max-width: 640px; border-radius: var(--r-lg); bottom: 20px; }
  .admin-main { padding: 22px 20px 70px; }
  .a-table { font-size: 14px; }
  .a-card { padding: 20px 22px; }
  .modal-wide { max-width: 640px; }
  .result-cols { gap: 14px; }
}

/* ============================================================
 * 响应式：桌面 ≥ 1024（左侧导航 / 答题侧栏 / 双列内容 / 登录分屏）
 * ============================================================ */
@media (min-width: 1024px) {
  body { font-size: 15px; }

  /* ---- 用户端：tabbar 变左侧导航 ---- */
  .tabbar {
    position: fixed;
    left: 0; right: auto; top: 0; bottom: 0; width: var(--sidebar-w);
    flex-direction: column; justify-content: flex-start; align-items: stretch;
    gap: 4px; padding: 22px 14px; border-top: none;
    border-right: 1px solid var(--line); background: var(--card);
    box-shadow: var(--sh-1);
  }
  .tb-logo {
    display: flex; align-items: center; gap: 10px;
    font-size: 16px; font-weight: 800; color: var(--text);
    padding: 2px 12px 20px; letter-spacing: 1px;
  }
  .tb-logo .ico { width: 27px; height: 27px; color: var(--primary); }
  .tabbar .tab {
    flex: none; flex-direction: row; justify-content: flex-start; gap: 12px;
    width: 100%; padding: 12px 14px; border-radius: var(--r-md);
    font-size: 15px; transition: background .15s;
  }
  .tabbar .tab:hover { background: var(--line-2); }
  .tabbar .tab.on { background: var(--primary-bg); }
  .tab .ico { width: 21px; height: 21px; }
  .tab .txt { font-size: 14.5px; color: var(--text-2); }
  .tab.on .txt { color: var(--primary); }

  body.has-tabbar #app { margin-left: var(--sidebar-w); width: calc(100% - var(--sidebar-w)); max-width: none; }
  #app .content { max-width: 880px; margin: 0 auto; }
  body.has-tabbar #app .page-head { border-radius: 0 0 var(--r-xl) var(--r-xl); }

  /* 居中类浮层向内容区对齐（用 100% 而非 100vw，避免 Windows 滚动条宽度导致偏移） */
  body.has-tabbar .sheet,
  body.has-tabbar #toast { left: calc(var(--sidebar-w) + (100% - var(--sidebar-w)) / 2); }
  body.has-tabbar .quiz-foot { left: calc(var(--sidebar-w) + (100% - var(--sidebar-w)) / 2); max-width: 640px; }

  /* ---- 答题页：单列居中，答题卡按"答题卡"按钮弹出（底部抽屉） ---- */
  .quiz-layout {
    display: grid; grid-template-columns: minmax(0, 640px);
    gap: 0; max-width: 640px; margin: 0 auto; width: 100%;
    padding: 0 24px; align-items: start;
  }
  .quiz-main { min-width: 0; max-width: none; }
  .quiz-body { padding: 24px 0 8px; }
  .quiz-foot { position: static; border: none; background: none; backdrop-filter: none; padding: 10px 0 24px; max-width: none; }
  .quiz-top .qt-row { max-width: 640px; padding: 0 24px; }

  /* ---- 结果页双列 ---- */
  .result-cols { grid-template-columns: 320px minmax(0, 1fr); align-items: start; }
  .rc-left { position: sticky; top: 16px; }

  /* ---- 登录分屏 ---- */
  .auth-shell { min-height: 100vh; }
  .auth-brand {
    display: flex; flex-direction: column; justify-content: center; gap: 10px;
    background: var(--grad-deep); color: #fff; padding: 56px 56px;
    min-height: 100vh; position: relative; overflow: hidden;
  }
  .auth-brand::after {
    content: ''; position: absolute; right: -80px; bottom: -80px;
    width: 300px; height: 300px; border-radius: 50%;
    background: radial-gradient(closest-side, rgba(255,255,255,.13), transparent);
  }
  .auth-brand .ab-badge {
    font-size: 15px; font-weight: 700; letter-spacing: 1px;
    background: rgba(255,255,255,.16); border: 1px solid rgba(255,255,255,.2);
    border-radius: 999px; padding: 7px 16px; width: fit-content; position: relative;
    display: inline-flex; align-items: center; gap: 8px;
  }
  .auth-brand .ab-badge .ico { width: 18px; height: 18px; }
  .auth-brand h2 { font-size: 31px; line-height: 1.45; font-weight: 700; margin: 14px 0 18px; position: relative; font-family: var(--font-display); letter-spacing: 1px; }
  .auth-brand ul { list-style: none; display: flex; flex-direction: column; gap: 16px; position: relative; }
  .auth-brand li { display: flex; align-items: flex-start; gap: 12px; font-size: 14px; opacity: .92; }
  .auth-brand li .ico { width: 22px; height: 22px; margin-top: 2px; color: #cdd9ff; }
  .auth-brand li b { display: block; font-size: 15px; margin-bottom: 1px; }
  .auth-brand.admin { background: linear-gradient(150deg, #1c2438 0%, #2b1f52 100%); }
  .auth-shell { display: grid; grid-template-columns: 1.05fr 1fr; }

  /* ---- 管理后台：顶栏变侧边栏 ---- */
  body.admin-body #app { max-width: none; }
  body.admin-body .admin-top {
    position: fixed; left: 0; top: 0; bottom: 0; width: var(--sidebar-w); height: auto;
    flex-direction: column; align-items: stretch; gap: 6px; padding: 22px 14px;
    overflow-y: auto;
  }
  body.admin-body .admin-top .brand { padding: 0 10px 16px; font-size: 16px; }
  body.admin-body .admin-nav { flex-direction: column; gap: 4px; overflow: visible; }
  body.admin-body .admin-nav .an { padding: 11px 13px; font-size: 14.5px; border-radius: var(--r-md); }
  body.admin-body .admin-top .top-actions {
    flex-direction: column; align-items: stretch; gap: 10px;
    border-top: 1px solid rgba(255,255,255,.12); padding: 16px 4px 0; margin-top: auto;
  }
  body.admin-body .admin-top .top-actions .lnk { font-size: 14px; }
  body.admin-body .admin-main { margin-left: var(--sidebar-w); width: calc(100% - var(--sidebar-w)); padding: 26px 28px 80px; max-width: 1180px; }
  body.admin-body .a-table .t-stem { max-width: 520px; }
  .modal-wide { max-width: 720px; }
}

/* 动效偏好 */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ---------- 风控系统页 ---------- */
.risk-stats { display: flex; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.rs-cell {
  flex: 1; min-width: 140px; background: var(--card); border: 1px solid #eceef5;
  border-radius: 14px; padding: 16px 18px; box-shadow: var(--sh-1);
}
.rs-cell .num { font-size: 26px; font-weight: 750; font-variant-numeric: tabular-nums; }
.rs-cell .lbl { font-size: 12px; color: var(--text-3); margin-top: 2px; }

/* ---------- 风控 IP 明细 ---------- */
.mini-btn.ip-toggle.warn { border-color: #f0c36d; color: #b45309; background: #fffaf0; }
.ip-list { display: flex; flex-wrap: wrap; gap: 8px; }
.ip-chip {
  display: inline-flex; flex-direction: column; gap: 3px;
  background: var(--card); border: 1px solid var(--line); border-radius: 10px;
  padding: 7px 11px;
}
.ip-chip small { font-size: 11px; color: var(--text-3); }

/* ---------- 首页科目选择（头部触发按钮 + 全屏选择面板） ---------- */
.sp-trigger {
  display: inline-flex; align-items: center; gap: 8px; flex: none; position: relative;
  background: linear-gradient(135deg, rgba(255, 255, 255, .2), rgba(255, 255, 255, .09));
  border: 1px solid rgba(255, 255, 255, .26);
  border-radius: 999px; padding: 4px 12px 4px 5px;
  color: #fff; font-family: inherit; font-size: 13px; font-weight: 650;
  cursor: pointer; overflow: hidden;
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  box-shadow: 0 6px 22px -8px var(--sc, #4f7cff), inset 0 1px 0 rgba(255, 255, 255, .18);
  transition: transform .16s var(--ease-spring, ease), box-shadow .22s, background .2s;
  max-width: 178px;
}
.sp-trigger::after {   /* 掠光 */
  content: ''; position: absolute; top: 0; bottom: 0; width: 46%; left: 0;
  background: linear-gradient(105deg, transparent, rgba(255, 255, 255, .32), transparent);
  transform: translateX(-130%); transition: transform .7s ease;
}
.sp-trigger:hover::after, .sp-trigger.open::after { transform: translateX(300%); }
.sp-trigger:hover { box-shadow: 0 8px 26px -6px var(--sc, #4f7cff), inset 0 1px 0 rgba(255, 255, 255, .22); }
.sp-trigger:active { transform: scale(.96); }
.sp-trigger.open { background: linear-gradient(135deg, rgba(255, 255, 255, .3), rgba(255, 255, 255, .14)); }
.spt-ico {
  width: 27px; height: 27px; border-radius: 50%; flex: none; font-size: 14px;
  display: inline-flex; align-items: center; justify-content: center;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .28);
}
.spt-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.spt-chev { display: inline-flex; flex: none; transition: transform .26s var(--ease-spring, ease); }
.spt-chev .ico { width: 15px; height: 15px; color: rgba(255, 255, 255, .88); }
.sp-trigger.open .spt-chev { transform: rotate(180deg); }
@media (max-width: 380px) { .sp-trigger { max-width: 152px; } }

/* 选择面板：手机 = 底部上滑面板，桌面 = 居中卡片 */
.sub-picker {
  position: fixed; inset: 0; z-index: 80;
  visibility: hidden; opacity: 0;
  transition: opacity .26s ease, visibility .26s;
}
.sub-picker.open { visibility: visible; opacity: 1; }
.sp-mask {
  position: absolute; inset: 0;
  background: rgba(9, 13, 31, .52);
  backdrop-filter: blur(10px) saturate(1.3); -webkit-backdrop-filter: blur(10px) saturate(1.3);
}
.sp-panel {
  position: absolute; left: 0; right: 0; bottom: 0;
  background: #fff; border-radius: 26px 26px 0 0;
  padding: 8px 16px calc(16px + var(--safe-b));
  max-height: 84dvh; overflow-y: auto;
  transform: translateY(64px); opacity: 0;
  transition: transform .34s var(--ease-spring, ease), opacity .24s ease;
  box-shadow: 0 -18px 60px rgba(10, 16, 40, .28);
}
.sub-picker.open .sp-panel { transform: translateY(0); opacity: 1; }
.sp-grab { width: 42px; height: 4.5px; border-radius: 99px; background: #d9deeb; margin: 6px auto 8px; }
.sp-head { display: flex; align-items: center; justify-content: space-between; padding: 2px 2px 12px; }
.sp-head b { font-size: 17px; font-weight: 800; letter-spacing: .5px; }
.sp-close {
  width: 30px; height: 30px; border-radius: 50%; border: none; cursor: pointer;
  background: var(--line-2, #eef1f8); color: var(--text-2); font-size: 13px; line-height: 1;
  transition: background .15s, transform .15s;
}
.sp-close:hover { background: var(--line, #e3e7f2); transform: rotate(90deg); }

.sp-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.sp-card {
  position: relative; border-radius: 18px; padding: 13px 12px 11px; cursor: pointer;
  background: linear-gradient(155deg, var(--scB), var(--scA));
  border: 1.5px solid var(--scL);
  animation: spIn .5s var(--ease-spring, ease) both;
  transition: transform .18s var(--ease-spring, ease), box-shadow .22s, border-color .2s;
}
@keyframes spIn { from { opacity: 0; transform: translateY(18px) scale(.94); } }
.sp-card:hover { transform: translateY(-2px); box-shadow: 0 12px 26px -12px var(--sc); }
.sp-card:active { transform: scale(.95); }
.sp-card.on {
  border-color: var(--sc);
  background: linear-gradient(155deg, var(--scB), var(--scA));
  box-shadow: 0 12px 30px -10px var(--sc), inset 0 0 0 1px rgba(255, 255, 255, .5);
}
.sp-card.lock { background: #f5f6fa; border: 1.5px dashed #ccd2e0; }
.sp-card.lock:hover { box-shadow: 0 10px 22px -14px rgba(30, 40, 70, .4); }
.sp-ico {
  width: 42px; height: 42px; border-radius: 14px; font-size: 22px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(255, 255, 255, .72);
  box-shadow: inset 0 0 0 1px var(--scL);
}
.sp-card.lock .sp-ico { filter: grayscale(.55); opacity: .8; }
.sp-name { font-size: 14px; font-weight: 750; margin-top: 9px; color: var(--text); }
.sp-card.lock .sp-name { color: var(--text-3); font-weight: 600; }
.sp-line { height: 5px; border-radius: 99px; background: rgba(16, 24, 48, .08); margin: 8px 0 6px; overflow: hidden; }
.sp-line i { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, var(--sc), var(--sc) 99); transition: width .5s ease; }
.sp-line.dim { background: rgba(16, 24, 48, .05); }
.sp-sub { font-size: 11px; color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sp-badge {
  position: absolute; top: 10px; right: 10px; width: 22px; height: 22px; border-radius: 50%;
  background: var(--sc); color: #fff; font-size: 12px; font-weight: 800;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 12px -2px var(--sc);
  animation: badgePop .4s var(--ease-spring, ease) .12s both;
}
@keyframes badgePop { from { transform: scale(.2); opacity: 0; } }
.sp-locktag {
  display: inline-flex; align-items: center; gap: 3px;
  font-size: 10.5px; color: var(--text-3); background: #e9ecf4; border-radius: 99px; padding: 3px 8px;
}
.sp-locktag .ico { width: 11px; height: 11px; }
.sp-tip { text-align: center; font-size: 11.5px; color: var(--text-3); padding: 13px 0 2px; }

@media (min-width: 768px) {
  .sub-picker { display: flex; align-items: center; justify-content: center; padding: 28px; }
  .sp-panel {
    position: relative; left: auto; right: auto; bottom: auto;
    width: 640px; max-width: 100%; border-radius: 24px;
    padding: 20px 20px 16px; max-height: 82vh;
    transform: translateY(20px) scale(.95);
  }
  .sub-picker.open .sp-panel { transform: translateY(0) scale(1); }
  .sp-grab { display: none; }
  .sp-grid { grid-template-columns: repeat(3, 1fr); gap: 12px; }
}
.sub-detail { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--sh-1); padding: 16px; }
.sd-head { display: flex; align-items: center; gap: 12px; }
.sd-chs { margin-top: 10px; border-top: 1px dashed var(--line); padding-top: 4px; }

/* ---------- 用户端：科目目录折叠树（单元 → 篇 → 章节） ---------- */
.tree-stack { display: flex; flex-direction: column; gap: 14px; }

/* 单元卡：左侧渐变色条 + 头部两行式 + 顶部进度条 + 圆形箭头 */
.tree-unit {
  position: relative;
  background: var(--card); border: 1px solid var(--line); border-radius: 16px;
  box-shadow: var(--sh-1); overflow: hidden;
  transition: box-shadow .25s, border-color .25s, transform .25s;
}
.tree-unit:hover { box-shadow: var(--sh-2); transform: translateY(-1px); }
.tree-unit.open { border-color: color-mix(in srgb, var(--sc, #4360ee) 32%, var(--line)); box-shadow: 0 8px 28px -10px color-mix(in srgb, var(--sc, #4360ee) 38%, transparent), var(--sh-1); }
.tree-unit::before {
  content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 4px;
  background: linear-gradient(180deg, var(--sc, #4360ee), color-mix(in srgb, var(--sc, #4360ee) 45%, #fff));
}
.tu-head {
  display: flex; align-items: center; gap: 12px; cursor: pointer;
  padding: 15px 15px 13px 19px; user-select: none;
  transition: background .16s;
}
.tree-unit.open .tu-head { background: linear-gradient(180deg, color-mix(in srgb, var(--sc, #4360ee) 7%, transparent), transparent 78%); }
.tu-ico {
  width: 40px; height: 40px; border-radius: 13px; flex: none; font-size: 19px;
  display: inline-flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, color-mix(in srgb, var(--sc, #4360ee) 17%, #fff), color-mix(in srgb, var(--sc, #4360ee) 7%, #fff));
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--sc, #4360ee) 20%, transparent);
}
.tu-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.tu-name { font-size: 16px; font-weight: 800; letter-spacing: .3px; color: var(--text); }
.tu-sub { font-size: 12px; color: var(--text-3); letter-spacing: .2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tu-val {
  flex: none; font-size: 12.5px; font-weight: 750; font-variant-numeric: tabular-nums;
  color: var(--sc, #4360ee);
  background: color-mix(in srgb, var(--sc, #4360ee) 10%, #fff);
  border-radius: 99px; padding: 4px 12px; min-width: 46px; text-align: center;
}
.tu-val.full { color: var(--success); background: rgba(52, 168, 122, .12); }
.tu-val.zero { color: var(--text-3); background: var(--line-2, #eef1f8); }
.tu-chev {
  flex: none; width: 28px; height: 28px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--line-2, #eef1f8); color: var(--text-2);
  transition: transform .26s var(--ease-spring, ease), background .16s;
}
.tu-chev .ico { width: 15px; height: 15px; }
.tu-head:hover .tu-chev { background: color-mix(in srgb, var(--sc, #4360ee) 16%, #fff); color: var(--sc, #4360ee); }
.tree-unit:not(.open) .tu-chev { transform: rotate(-90deg); }
/* 头部底缘进度条 */
.tu-prog { height: 3px; background: var(--line-2, #eef1f8); overflow: hidden; }
.tu-prog i {
  display: block; height: 100%;
  background: linear-gradient(90deg, var(--sc, #4360ee), color-mix(in srgb, var(--sc, #4360ee) 55%, #7a94ff));
  transition: width .5s ease;
}
.tu-body { padding: 6px 15px 13px; }
.tg-none { font-size: 12.5px; font-weight: 700; color: var(--text-3); letter-spacing: .8px; padding: 2px 4px 7px; }

/* ---------- 后台：单元盒子 ---------- */
.unit-box {
  border: 1px solid var(--line); border-radius: 12px;
  padding: 10px 12px; margin-bottom: 8px; background: var(--bg, #f8f9fc);
}
.unit-head { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.unit-name { font-size: 13.5px; font-weight: 750; color: var(--text); }

/* ---------- 未开通科目（请开通会员） ---------- */
.vip-card .em-ico.vip {
  width: 60px; height: 60px; margin: 0 auto 10px; border-radius: 18px;
  background: linear-gradient(135deg, #7a5cff26, #ffc53d2e);
  display: flex; align-items: center; justify-content: center;
}
.vip-card .em-ico.vip .ico { width: 30px; height: 30px; color: #b8860b; }

/* ---------- 后台：筛选 chip ---------- */
.chip-row { display: inline-flex; gap: 6px; background: var(--line-2); padding: 3px; border-radius: 10px; }
.chip {
  border: none; background: transparent; cursor: pointer; font-family: inherit;
  font-size: 12.5px; font-weight: 600; color: var(--text-3);
  padding: 5px 12px; border-radius: 8px; transition: all .15s;
}
.chip:hover { color: var(--text); }
.chip.on { background: var(--card); color: var(--primary); box-shadow: var(--sh-1); }

/* ---------- 后台：数据概览 ---------- */
.dash-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.d-card {
  background: linear-gradient(160deg, #202a4e 0%, #232f5c 100%);
  border-radius: 14px; padding: 16px 18px; color: #fff; position: relative; overflow: hidden;
}
.d-card::after {
  content: ''; position: absolute; right: -22px; top: -22px; width: 84px; height: 84px;
  border-radius: 50%; background: radial-gradient(circle, rgba(122, 148, 255, .28), transparent 68%);
}
.d-card .d-num { font-size: 27px; font-weight: 800; font-variant-numeric: tabular-nums; line-height: 1.15; }
.d-card .d-lbl { font-size: 13px; font-weight: 600; margin-top: 3px; color: #dfe5ff; }
.d-card .d-sub { font-size: 11.5px; color: #9aa7d8; margin-top: 6px; }
.dash-2col { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 12px; }
@media (max-width: 900px) { .dash-2col { grid-template-columns: 1fr; } }
.ac-title { font-size: 14px; font-weight: 700; padding: 14px 2px 8px; color: var(--text); }

/* 柱状趋势图（纯 div） */
.dc-chart { display: flex; align-items: flex-end; gap: 5px; height: 132px; padding: 6px 2px 0; }
.dc-col { flex: 1; display: flex; flex-direction: column; align-items: center; height: 100%; min-width: 0; }
.dc-bar-wrap { flex: 1; width: 100%; display: flex; align-items: flex-end; justify-content: center; }
.dc-bar {
  width: min(70%, 22px); border-radius: 5px 5px 2px 2px; min-height: 4px;
  background: linear-gradient(180deg, #7a94ff, #4360ee);
  transition: height .5s var(--ease-spring, ease);
}
.dc-col:hover .dc-bar { filter: brightness(1.12); }
.dc-day { font-size: 9.5px; color: var(--text-3); margin-top: 5px; white-space: nowrap; }

/* 科目进度行 */
.ds-row { display: flex; align-items: center; gap: 10px; padding: 8px 2px; }
.ds-row + .ds-row { border-top: 1px dashed var(--line); }
.ds-name { width: 86px; flex: none; font-size: 13px; font-weight: 600; color: var(--text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ds-bar { flex: 1; height: 8px; background: var(--line-2); border-radius: 99px; overflow: hidden; }
.ds-bar i { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, #7a94ff, #4360ee); transition: width .5s ease; }
.ds-val { flex: none; font-size: 11.5px; color: var(--text-3); white-space: nowrap; }

/* 成绩得分配色 */
.c-ok { color: var(--success); }
.c-bad { color: var(--danger); }

/* ---------- 后台：模考板块配置行 ---------- */
.sec-row {
  border: 1px solid var(--line); border-radius: 12px;
  padding: 10px 12px 8px; margin-bottom: 8px; background: var(--bg, #f7f8fc);
  transition: border-color .15s, background .15s;
}
.sec-row:focus-within { border-color: var(--primary); background: var(--primary-bg); }
.sec-row.custom { border-color: var(--primary); }
.sec-row .sr-line { display: flex; align-items: center; gap: 10px; }
.sec-row .sr-name { width: 64px; flex: none; font-size: 13.5px; font-weight: 700; }
.sec-row .sr-name small { display: block; font-size: 10.5px; color: var(--text-3); font-weight: 500; margin-top: 2px; }
.sec-row .sr-cell { flex: 1; display: flex; align-items: center; gap: 6px; }
.sec-row .sr-cell label { font-size: 11.5px; color: var(--text-3); flex: none; }
.sec-row .sr-cell .fi { min-width: 0; padding: 7px 8px; }
.sec-row .sr-cell .fi:disabled { opacity: .6; }
.sec-row .sr-sum { flex: none; width: 128px; text-align: right; font-size: 12px; color: var(--text-2); font-variant-numeric: tabular-nums; }
@media (max-width: 480px) {
  .sec-row .sr-line { flex-wrap: wrap; }
  .sec-row .sr-sum { width: 100%; text-align: left; }
}
/* 章节占比行 */
.sec-row .sr-dist {
  display: flex; align-items: center; gap: 8px;
  margin-top: 8px; padding-top: 8px; border-top: 1px dashed var(--line);
}
.sr-dist-lbl { font-size: 11.5px; color: var(--text-3); }
.sec-row.custom .sr-dist-lbl { color: var(--primary); font-weight: 600; }
.sr-chs { margin-top: 8px; display: flex; flex-direction: column; gap: 4px; }
.sch-row { display: flex; align-items: center; gap: 8px; padding: 3px 6px; border-radius: 8px; transition: background .12s; }
.sch-row.on { background: var(--primary-bg); }
.sch-name { flex: 1; min-width: 0; font-size: 12.5px; color: var(--text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sch-n { width: 74px; flex: none; padding: 5px 8px; text-align: center; }
.sch-av { flex: none; font-size: 11px; color: var(--text-3); white-space: nowrap; }
.sch-bar { display: flex; align-items: center; gap: 8px; padding: 6px 6px 2px; font-size: 12px; color: var(--text-2); }
.sch-bar b { color: var(--primary); }

/* ---------- 后台：建号会员选择 ---------- */
.mem-row {
  display: flex; align-items: flex-start; gap: 10px; cursor: pointer;
  border: 1.5px solid var(--line); border-radius: 12px;
  padding: 10px 12px; margin-bottom: 8px; transition: all .15s;
}
.mem-row:hover { border-color: #c9d3f5; }
.mem-row.on { border-color: var(--primary); background: var(--primary-bg); }
.mem-row .mem-dot {
  width: 18px; height: 18px; border-radius: 50%; flex: none; margin-top: 1px;
  border: 2px solid #c5cbe0; transition: all .15s; position: relative;
}
.mem-row.on .mem-dot { border-color: var(--primary); }
.mem-row.on .mem-dot::after {
  content: ''; position: absolute; inset: 3px; border-radius: 50%; background: var(--primary);
}
.mem-row b { font-size: 13.5px; display: block; }
.mem-row small { font-size: 11.5px; color: var(--text-3); display: block; margin-top: 1px; }

/* ---------- 后台：用户权限弹窗 ---------- */
.pm-sec { margin-top: 14px; padding-top: 10px; border-top: 1px dashed var(--line); }
.pm-sec:first-of-type { border-top: none; padding-top: 0; }
.pm-title { font-size: 12.5px; font-weight: 700; color: var(--text-2); margin-bottom: 8px; }
.pm-row { display: flex; align-items: center; gap: 10px; padding: 7px 0; }
.pm-row + .pm-row { border-top: 1px dashed var(--line-2, #eef0f6); }
.pm-name { width: 110px; flex: none; font-size: 13px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pm-val { font-size: 12.5px; color: var(--text-2); }

/* ---------- 后台：模考成绩详情 ---------- */
.ad-head { display: flex; align-items: center; gap: 12px; margin-bottom: 6px; }
.ad-head > div:first-child { flex: 1; min-width: 0; }
.ad-user { font-size: 15px; font-weight: 700; }
.ad-exam { font-size: 12.5px; color: var(--text-3); margin-top: 2px; }
.ad-score { font-size: 15px; font-weight: 800; color: var(--primary); font-variant-numeric: tabular-nums; }
.ad-score span { font-size: 12px; color: var(--text-3); font-weight: 500; }
.ad-meta { font-size: 12.5px; color: var(--text-2); padding-bottom: 10px; border-bottom: 1px solid var(--line); }
.ad-list { max-height: 46vh; overflow-y: auto; margin-top: 4px; }
.ad-q { padding: 10px 2px; border-bottom: 1px dashed var(--line); }
.ad-q.ok .ad-mark { color: var(--success); }
.ad-q.bad .ad-mark { color: var(--danger); }
.ad-qh { display: flex; align-items: center; gap: 8px; }
.ad-no {
  width: 20px; height: 20px; border-radius: 6px; flex: none;
  background: var(--line-2); color: var(--text-2); font-size: 11px; font-weight: 700;
  display: inline-flex; align-items: center; justify-content: center;
}
.ad-mark { font-size: 12px; font-weight: 700; margin-left: auto; }
.ad-stem { font-size: 13px; margin: 6px 0 4px; line-height: 1.55; }
.ad-ans { font-size: 12px; color: var(--text-3); }
