/* =========================================================
   学习报告 · 样式
   暖纸底 + 墨色字 + 四科主题色
   ========================================================= */

:root {
  --paper: #f6f2e9;
  --paper-deep: #efe9dc;
  --card: #fffdf9;
  --ink: #1e2532;
  --ink-soft: #3b4455;
  --muted: #6f7686;
  --muted-2: #8b91a0;
  --line: #e5dfd2;
  --line-strong: #d7cfbe;
  --accent: #c2552f;
  --accent-soft: #f8e8df;
  --green: #1c7a5b;
  --green-soft: #e5f4ed;
  --amber: #a56a12;
  --amber-soft: #fbf0d9;
  --red: #b23a33;
  --red-soft: #fbe8e6;
  --blue: #2f6df6;
  --radius: 20px;
  --radius-sm: 12px;
  --shadow: 0 1px 2px rgba(30, 37, 50, .04), 0 12px 32px -18px rgba(30, 37, 50, .22);
  --shadow-lg: 0 2px 4px rgba(30, 37, 50, .05), 0 28px 60px -30px rgba(30, 37, 50, .35);
  --sans: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", system-ui, -apple-system, sans-serif;
  --serif: "Songti SC", "Source Han Serif SC", "Noto Serif SC", "STSong", "SimSun", serif;
  --mono: "SF Mono", "JetBrains Mono", "Cascadia Code", Consolas, monospace;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
  background:
    radial-gradient(900px 500px at 82% -10%, rgba(194, 85, 47, .10), transparent 60%),
    radial-gradient(700px 500px at 4% 8%, rgba(47, 109, 246, .07), transparent 60%),
    radial-gradient(800px 600px at 50% 100%, rgba(28, 122, 91, .06), transparent 60%);
}

::selection { background: #f2d3c2; color: var(--ink); }

h1, h2, h3, h4, p, ul, ol { margin: 0; }
ul, ol { padding: 0; list-style: none; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }
img { max-width: 100%; display: block; }
code { font-family: var(--mono); font-size: .9em; }

[hidden] { display: none !important; }

.wrap { width: min(1160px, 100% - 48px); margin-inline: auto; }

.icon {
  width: 1.15em;
  height: 1.15em;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex: 0 0 auto;
}

.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

/* ---------- 顶部导航 ---------- */

.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(246, 242, 233, .86);
  backdrop-filter: saturate(1.4) blur(14px);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s, box-shadow .2s;
}
.topbar.scrolled { border-color: var(--line); box-shadow: 0 6px 24px -20px rgba(30, 37, 50, .5); }

.topbar-inner {
  height: 68px;
  display: flex;
  align-items: center;
  gap: 24px;
}

.brand { display: inline-flex; align-items: center; gap: 10px; flex: 0 0 auto; }
.brand-mark {
  width: 36px;
  height: 36px;
  border-radius: 11px;
  background: var(--ink);
  color: #f8f4ea;
  display: grid;
  place-items: center;
  font-family: var(--serif);
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 0;
  box-shadow: inset 0 -2px 0 rgba(255, 255, 255, .12);
}
.brand-text { display: flex; flex-direction: column; line-height: 1.25; }
.brand-text b { font-size: 15px; letter-spacing: -.01em; }
.brand-text small { color: var(--muted); font-size: 11px; letter-spacing: .04em; }

.nav { display: flex; gap: 4px; margin-left: 8px; }
.nav a {
  position: relative;
  white-space: nowrap;
  padding: 8px 12px;
  border-radius: 999px;
  font-size: 14px;
  color: var(--ink-soft);
  transition: background .18s, color .18s;
}
.nav a:hover { background: rgba(30, 37, 50, .05); }
.nav a.active { color: var(--ink); background: #fff; box-shadow: var(--shadow); }
.nav-dot {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 2px var(--paper);
}

.topbar-actions { margin-left: auto; display: flex; gap: 8px; flex: 0 0 auto; }

/* ---------- 按钮 ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 999px;
  border: 1px solid transparent;
  padding: 9px 16px;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.2;
  cursor: pointer;
  transition: transform .15s, background .18s, border-color .18s, box-shadow .18s;
  white-space: nowrap;
  -webkit-tap-highlight-color: transparent;
}
.btn:active { transform: translateY(1px) scale(.995); }
.btn-line { background: transparent; border-color: var(--line-strong); color: var(--ink); }
.btn-line:hover { background: #fff; border-color: #bdb3a0; }
.btn-ghost { background: transparent; color: var(--ink-soft); }
.btn-ghost:hover { background: rgba(30, 37, 50, .06); }
.btn-wechat { background: #07c160; border-color: #07c160; color: #fff; display: flex; align-items: center; justify-content: center; gap: 8px; }
.btn-wechat:hover { background: #06ad56; border-color: #06ad56; }
.btn-wechat .icon { width: 18px; height: 18px; }
.btn-lg { padding: 13px 22px; font-size: 15px; }
.btn-sm { padding: 6px 12px; font-size: 13px; }
.btn[disabled] { opacity: .45; cursor: not-allowed; }

.link-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 0;
  background: none;
  padding: 4px 0;
  font-size: 14px;
  font-weight: 600;
  color: var(--accent);
  cursor: pointer;
  border-bottom: 1px solid transparent;
}
.link-btn:hover { border-color: currentColor; }

.icon-btn {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: #fff;
  display: grid;
  place-items: center;
  cursor: pointer;
  color: var(--ink-soft);
}
.icon-btn:hover { background: var(--paper-deep); }

/* ---------- Hero ---------- */

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(320px, .88fr);
  gap: 56px;
  align-items: center;
  padding: 64px 0 44px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .08em;
  color: var(--muted);
  text-transform: uppercase;
  margin-bottom: 22px;
}
.live-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 4px rgba(28, 122, 91, .12);
}

.hero h1 {
  font-size: clamp(38px, 5.4vw, 64px);
  line-height: 1.07;
  letter-spacing: -.035em;
  font-weight: 750;
  margin-bottom: 22px;
}
.hero h1 .accent {
  color: var(--accent);
  position: relative;
  white-space: nowrap;
}
.hero h1 .accent::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: .06em;
  height: .09em;
  background: currentColor;
  opacity: .18;
  border-radius: 2px;
}

.lede {
  font-size: 17px;
  line-height: 1.85;
  color: var(--ink-soft);
  max-width: 38em;
}

.tag-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 22px; }
.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 253, 249, .7);
  font-size: 13px;
  color: var(--ink-soft);
}
.tag::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); opacity: .7; }

.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }

.hero-card {
  position: relative;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 26px;
  padding: 24px;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}
.hero-card::after {
  content: "";
  position: absolute;
  right: -60px; top: -70px;
  width: 190px; height: 190px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(194, 85, 47, .14), transparent 68%);
}
.student-row { display: flex; align-items: center; gap: 12px; }
.avatar {
  width: 46px; height: 46px;
  border-radius: 14px;
  background: linear-gradient(145deg, #2b3548, #1e2532);
  color: #f8f4ea;
  display: grid; place-items: center;
  font-family: var(--serif);
  font-size: 21px;
  font-weight: 700;
  flex: 0 0 auto;
}
.student-name { font-size: 18px; font-weight: 700; letter-spacing: -.01em; }
.student-meta { font-size: 12px; color: var(--muted); }
.stamp {
  margin-left: auto;
  font-size: 11px;
  letter-spacing: .06em;
  color: var(--accent);
  background: var(--accent-soft);
  border: 1px solid #efd3c4;
  border-radius: 999px;
  padding: 4px 10px;
  white-space: nowrap;
}

.mini-progress { margin-top: 22px; display: grid; gap: 13px; }
.mini-row { display: grid; grid-template-columns: 48px 1fr 40px; align-items: center; gap: 10px; }
.mini-row .mn { font-size: 13px; font-weight: 600; color: var(--ink-soft); }
.mini-row .mv { font-size: 11px; color: var(--muted); text-align: right; font-variant-numeric: tabular-nums; }
.mini-track { display: block; height: 7px; border-radius: 999px; background: #efeadd; overflow: hidden; }
.mini-fill { display: block; height: 100%; border-radius: inherit; background: var(--c, var(--ink)); transition: width .8s cubic-bezier(.2, .7, .2, 1); }
.hero-note {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px dashed var(--line);
  font-size: 11.5px;
  line-height: 1.7;
  color: var(--muted);
}

/* ---------- 数据带 ---------- */

.stats-band { padding-bottom: 8px; }
.stat b { display: block; font-size: 26px; letter-spacing: -.03em; line-height: 1.15; font-variant-numeric: tabular-nums; }
.stat span { display: block; font-size: 12.5px; color: var(--ink-soft); margin-top: 4px; font-weight: 600; }
.stat small { display: block; font-size: 11px; color: var(--muted); margin-top: 3px; }

/* ---------- 版块 ---------- */

.section { padding: 78px 0 0; scroll-margin-top: 84px; }
.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 28px;
  margin-bottom: 30px;
}
.kicker {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .14em;
  color: var(--accent);
  margin-bottom: 10px;
  font-variant-numeric: tabular-nums;
}
.section-head h2 {
  font-size: clamp(26px, 3.2vw, 36px);
  line-height: 1.2;
  letter-spacing: -.028em;
  margin-bottom: 10px;
}
.section-head p { font-size: 14.5px; color: var(--muted); max-width: 56em; line-height: 1.75; }

/* ---------- 学科卡 ---------- */

.subject-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}
.subject-card {
  --c: var(--ink);
  position: relative;
  display: flex;
  flex-direction: column;
  text-align: left;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px 20px 18px;
  cursor: pointer;
  transition: transform .22s, box-shadow .22s, border-color .22s;
  overflow: hidden;
}
.subject-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 3px;
  background: var(--c);
  opacity: .85;
}
.subject-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: var(--line-strong); }
.subject-card:focus-visible { outline: 2px solid var(--c); outline-offset: 3px; }

.sc-top { display: flex; align-items: center; gap: 8px; }
.sc-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--c); }
.sc-name { font-size: 17px; font-weight: 750; letter-spacing: -.01em; }
.state-chip {
  margin-left: auto;
  font-size: 11px;
  font-weight: 600;
  padding: 3px 9px;
  border-radius: 999px;
  white-space: nowrap;
}
.state-good { color: var(--green); background: var(--green-soft); }
.state-watch { color: var(--amber); background: var(--amber-soft); }

.sc-metric { display: flex; align-items: baseline; gap: 6px; margin: 18px 0 2px; }
.sc-metric b { font-size: 34px; line-height: 1; letter-spacing: -.045em; font-variant-numeric: tabular-nums; }
.sc-metric i { font-style: normal; font-size: 14px; color: var(--muted); font-weight: 600; }
.sc-metric-label { font-size: 11.5px; color: var(--muted); line-height: 1.5; min-height: 2.6em; }

.sc-progress { margin-top: 14px; }
.sc-track { height: 6px; border-radius: 999px; background: #eee8db; overflow: hidden; }
.sc-fill { height: 100%; border-radius: inherit; background: var(--c); }
.sc-progress-text { display: flex; justify-content: space-between; font-size: 11px; color: var(--muted); margin-top: 6px; }

.sc-line {
  font-size: 12.8px;
  line-height: 1.7;
  color: var(--ink-soft);
  margin-top: 12px;
  border-top: 1px dashed var(--line);
  padding-top: 12px;
}
.sc-more {
  margin-top: auto;
  padding-top: 14px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  font-weight: 700;
  color: var(--c);
}
.sc-more .icon { transition: transform .2s; }
.subject-card:hover .sc-more .icon { transform: translateX(3px); }

/* ---------- 视图（首页 / 子页） ---------- */

.view[hidden] { display: none !important; }

.page { padding: 14px 0 0; min-height: 60vh; }
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 24px 0 8px;
  font-size: 12.5px;
  color: var(--muted);
  font-weight: 600;
}
.back-link:hover { color: var(--ink); }
.back-link .icon { width: 14px; height: 14px; }
.page-head { margin: 6px 0 28px; max-width: 780px; }
.page-head h1 {
  font-size: clamp(28px, 3.6vw, 40px);
  line-height: 1.18;
  letter-spacing: -.03em;
  margin-bottom: 10px;
}
.page-head p { font-size: 14px; line-height: 1.8; color: var(--muted); }
.page-note {
  margin-top: 22px;
  padding-top: 12px;
  border-top: 1px dashed var(--line);
  font-size: 11.5px;
  line-height: 1.8;
  color: var(--muted);
}
.page .charts-head { margin-top: 4px; }

.quick-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin: 36px 0 12px;
}
.quick-head h3 { font-size: 18px; letter-spacing: -.02em; margin-top: 4px; }
.quick-head > span { font-size: 11.5px; color: var(--muted); }
.quick-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }

/* ---------- 首页：最近上传与批改 ---------- */

.recent-block { margin-top: 34px; }
.recent-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; margin-bottom: 12px; flex-wrap: wrap; }
.recent-head h3 { font-size: 18px; letter-spacing: -.02em; margin-top: 4px; }
.recent-list { display: grid; gap: 8px; }
.recent-item {
  display: flex; gap: 12px; align-items: center; width: 100%; text-align: left;
  background: var(--card); border: 1px solid var(--line); border-left: 3px solid var(--c, var(--line));
  border-radius: 12px; padding: 10px 12px; cursor: pointer; font: inherit; color: inherit;
  transition: box-shadow .18s, transform .18s;
}
.recent-item:hover { box-shadow: 0 12px 26px -20px rgba(30, 37, 50, .55); transform: translateY(-1px); }
.recent-thumb {
  width: 54px; height: 54px; border-radius: 9px; object-fit: cover;
  background: var(--paper-deep); flex: 0 0 auto; display: block;
}
.recent-body { min-width: 0; flex: 1; }
.recent-title { display: flex; gap: 7px; align-items: center; flex-wrap: wrap; font-size: 12.5px; font-weight: 600; }
.recent-title .rec-tag { font-weight: 400; }
.recent-summary {
  font-size: 12px; color: var(--muted); margin-top: 4px; line-height: 1.55;
  display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden;
}
.recent-arrow { flex: 0 0 auto; color: var(--muted-2); }
.recent-arrow .icon { width: 16px; height: 16px; }
.recent-empty {
  border: 1.5px dashed var(--line-strong); border-radius: 14px;
  padding: 22px; text-align: center; color: var(--muted); font-size: 12.5px; line-height: 1.7;
}
.recent-empty b { display: block; color: var(--ink); margin-bottom: 4px; font-size: 13px; }
.quick {
  display: flex;
  flex-direction: column;
  gap: 4px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 16px;
  transition: transform .2s, box-shadow .2s, border-color .2s;
}
.quick:hover { transform: translateY(-2px); box-shadow: var(--shadow); border-color: var(--line-strong); }
.quick-ic {
  width: 34px; height: 34px;
  border-radius: 10px;
  display: grid; place-items: center;
  margin-bottom: 5px;
  color: var(--c, var(--ink));
  background: color-mix(in srgb, var(--c, var(--ink)) 10%, #fff);
}
.quick-ic .icon { width: 18px; height: 18px; }
.quick b { font-size: 14px; letter-spacing: -.01em; }
.quick > span { font-size: 11.5px; line-height: 1.65; color: var(--muted); }
.quick i {
  margin-top: auto;
  padding-top: 8px;
  font-style: normal;
  font-size: 11px;
  font-weight: 700;
  color: var(--c, var(--ink));
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.quick i .icon { width: 12px; height: 12px; }

.mobile-bar a.active { color: var(--ink); font-weight: 700; }

/* ---------- 学习效果图表 ---------- */

.charts-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin: 38px 0 14px;
}
.charts-head h3 { font-size: 18px; letter-spacing: -.02em; }
.charts-head p { font-size: 12px; color: var(--muted); margin-top: 3px; }
.charts-scale {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 10.5px;
  color: var(--muted);
  flex-wrap: wrap;
  white-space: nowrap;
}
.charts-scale .dot { margin-left: 9px; }
.charts-scale .dot:first-child { margin-left: 0; }
.charts-scale b { font-weight: 600; color: var(--ink-soft); }

.dot { width: 7px; height: 7px; border-radius: 50%; display: inline-block; flex: 0 0 auto; }
.dot.good { background: var(--green); }
.dot.warn { background: #d99b2b; }
.dot.bad { background: var(--red); }

.chart-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}
.chart-card {
  display: flex;
  flex-direction: column;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
}
.chart-head { display: flex; align-items: flex-start; gap: 10px; margin-bottom: 16px; }
.chart-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: .08em;
  color: var(--muted);
}
.chart-eyebrow i { width: 7px; height: 7px; border-radius: 2px; background: var(--c, var(--ink)); }
.chart-head h3 { font-size: 16px; letter-spacing: -.015em; margin-top: 3px; }
.chart-badge {
  margin-left: auto;
  font-size: 10.5px;
  font-weight: 700;
  color: var(--ink-soft);
  background: var(--paper-deep);
  border-radius: 999px;
  padding: 4px 9px;
  white-space: nowrap;
}

.chart-split { display: flex; align-items: center; gap: 20px; flex: 1; min-width: 0; }
.donut-wrap { display: flex; flex-direction: column; align-items: center; gap: 7px; flex: 0 0 auto; }
.donut {
  position: relative;
  width: 118px;
  height: 118px;
  border-radius: 50%;
  display: grid;
  place-items: center;
}
.donut::after {
  content: "";
  position: absolute;
  inset: 13px;
  background: var(--card);
  border-radius: 50%;
}
.donut-label { position: relative; z-index: 1; text-align: center; line-height: 1.1; }
.donut-label b { display: block; font-size: 22px; letter-spacing: -.04em; font-variant-numeric: tabular-nums; }
.donut-label span { font-size: 9.5px; color: var(--muted); }
.donut-note { font-size: 9.5px; color: var(--muted); }

.bar-list { flex: 1; display: grid; gap: 8px; min-width: 0; }
.bar-row { display: grid; grid-template-columns: 72px 1fr 42px; gap: 8px; align-items: center; font-size: 11px; }
.bar-name { color: var(--ink-soft); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bar-track { height: 8px; background: #eee8db; border-radius: 99px; overflow: hidden; }
.bar-fill { display: block; height: 100%; border-radius: inherit; background: var(--green); }
.bar-fill.warn { background: #d99b2b; }
.bar-fill.bad { background: var(--red); }
.bar-score { text-align: right; color: var(--muted); font-variant-numeric: tabular-nums; font-size: 10.5px; }

.chart-insight {
  margin-top: auto;
  padding-top: 11px;
  border-top: 1px dashed var(--line);
  font-size: 11.5px;
  line-height: 1.7;
  color: var(--muted);
}
.chart-insight b { color: var(--accent); margin-right: 6px; font-size: 10px; letter-spacing: .06em; }

.page-legend { display: grid; gap: 9px; flex: 1; min-width: 0; }
.page-legend li { display: flex; gap: 8px; align-items: flex-start; }
.page-legend i { width: 8px; height: 8px; border-radius: 2px; margin-top: 4px; flex: 0 0 auto; }
.page-legend b { display: flex; gap: 6px; font-size: 11.5px; color: var(--ink-soft); }
.page-legend b span { font-family: var(--mono); font-size: 10px; color: var(--muted); background: var(--paper-deep); border-radius: 4px; padding: 0 4px; }
.page-legend small { display: block; font-size: 10px; color: var(--muted); margin-top: 1px; }

.mastery-chart { display: grid; gap: 10px; flex: 1; align-content: center; }
.mc-row { display: grid; grid-template-columns: 38px 1fr 46px; gap: 8px; align-items: center; font-size: 11px; }
.mc-name { color: var(--ink-soft); }
.mc-bar { display: flex; height: 11px; border-radius: 99px; overflow: hidden; background: #eee8db; }
.mc-seg { display: block; height: 100%; }
.mc-count { text-align: right; color: var(--muted); font-variant-numeric: tabular-nums; font-size: 10px; line-height: 1.25; }
.mc-count small { display: block; font-size: 8.5px; color: var(--muted-2); }
.chart-legend { display: flex; flex-wrap: wrap; gap: 8px 14px; margin-top: 12px; font-size: 10px; color: var(--muted); }
.chart-legend span { display: inline-flex; align-items: center; gap: 5px; }
.chart-legend .dot { border-radius: 2px; }

.cause-bar { display: flex; height: 18px; border-radius: 7px; overflow: hidden; background: #eee8db; margin-top: 2px; }
.cause-seg { display: block; height: 100%; }
.cause-legend { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 14px; margin: 14px 0 2px; font-size: 10.5px; }
.cause-legend li { display: flex; align-items: center; gap: 6px; color: var(--ink-soft); min-width: 0; }
.cause-legend i { width: 7px; height: 7px; border-radius: 2px; flex: 0 0 auto; }
.cause-legend span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cause-legend b { margin-left: auto; color: var(--muted); font-family: var(--mono); font-size: 10px; }

/* ---------- 学期路线 ---------- */

.timeline {
  margin-top: 22px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  animation: fadeUp .25s ease both;
}
.timeline-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; margin-bottom: 14px; }
.timeline-head b { display: block; font-size: 15px; }
.timeline-head span { font-size: 12px; color: var(--muted); }
.timeline-foot { margin-top: 14px; font-size: 12px; color: var(--muted); line-height: 1.75; }

.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.week-table { width: 100%; border-collapse: collapse; min-width: 760px; font-size: 12.5px; }
.week-table th {
  position: sticky; top: 0;
  text-align: left;
  font-size: 11px;
  letter-spacing: .06em;
  color: var(--muted);
  font-weight: 700;
  padding: 8px 12px;
  background: #fbf8f0;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
.week-table td { padding: 9px 12px; border-bottom: 1px solid #f0ebdf; vertical-align: top; line-height: 1.6; }
.week-table tbody tr:nth-child(even) { background: rgba(246, 242, 233, .45); }
.week-table td:first-child { font-weight: 700; color: var(--muted); font-variant-numeric: tabular-nums; }
.week-table tr.current td { background: #fdf0e7; }
.week-table tr.current td:first-child { color: var(--accent); }
.week-table tr.current td:first-child::after { content: "现在"; margin-left: 6px; font-size: 9px; background: var(--accent); color: #fff; padding: 1px 5px; border-radius: 999px; vertical-align: 1px; }

/* ---------- 标签页 ---------- */

.tabs {
  display: flex;
  gap: 6px;
  padding: 6px;
  background: rgba(255, 253, 249, .6);
  border: 1px solid var(--line);
  border-radius: 999px;
  width: fit-content;
  max-width: 100%;
  overflow-x: auto;
  margin-bottom: 18px;
}
.tab {
  --c: var(--ink);
  border: 0;
  background: transparent;
  padding: 9px 18px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 600;
  color: var(--muted);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  white-space: nowrap;
  transition: background .18s, color .18s;
}
.tab::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--c); opacity: .45; }
.tab:hover { color: var(--ink); }
.tab.on { background: var(--ink); color: #fbf8f0; box-shadow: var(--shadow); }
.tab.on::before { opacity: 1; background: var(--c); }

.panel-card {
  --c: var(--ink);
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 30px;
  box-shadow: var(--shadow);
  animation: fadeUp .28s ease both;
}
.detail-top { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 24px; padding-bottom: 22px; border-bottom: 1px solid var(--line); }
.detail-title { min-width: 200px; }
.detail-title .dt-name { display: flex; align-items: center; gap: 9px; font-size: 22px; font-weight: 750; letter-spacing: -.02em; }
.detail-title .dt-name i { width: 12px; height: 12px; border-radius: 50%; background: var(--c); }
.detail-title .dt-book { font-size: 11.5px; color: var(--muted); margin-top: 4px; }
.detail-metric { margin-left: auto; text-align: right; }
.detail-metric b { font-size: 30px; letter-spacing: -.04em; line-height: 1; font-variant-numeric: tabular-nums; }
.detail-metric i { font-style: normal; font-size: 14px; color: var(--muted); }
.detail-metric span { display: block; font-size: 11.5px; color: var(--muted); margin-top: 5px; max-width: 240px; }
.detail-progress { flex: 1 1 220px; max-width: 460px; }
.detail-progress .dp-top { display: flex; justify-content: space-between; font-size: 11px; color: var(--muted); margin-bottom: 6px; }
.detail-progress .dp-track { height: 8px; background: #eee8db; border-radius: 999px; overflow: hidden; }
.detail-progress .dp-fill { height: 100%; background: var(--c); border-radius: inherit; }
.detail-progress .dp-text { font-size: 11px; color: var(--ink-soft); margin-top: 7px; }

.detail-body { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(280px, .75fr); gap: 34px; padding-top: 24px; }
.detail-col h4 { display: flex; align-items: center; gap: 7px; font-size: 13px; letter-spacing: .04em; color: var(--muted); margin-bottom: 14px; font-weight: 700; }
.detail-col h4 .icon { color: var(--c); }

.strength { display: grid; gap: 14px; }
.strength li { display: grid; grid-template-columns: 22px 1fr; gap: 10px; }
.strength .tick {
  width: 20px; height: 20px; border-radius: 50%;
  background: var(--green-soft); color: var(--green);
  display: grid; place-items: center; margin-top: 2px;
}
.strength .tick .icon { width: 12px; height: 12px; stroke-width: 2.4; }
.strength b { font-size: 14px; display: block; }
.strength p { font-size: 12.5px; color: var(--muted); line-height: 1.7; margin-top: 2px; }

.gaps { display: grid; gap: 14px; }
.gap-item {
  border: 1px solid var(--line);
  border-left: 3px solid var(--level-c, var(--line-strong));
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  background: #fffcf6;
}
.gap-item.lv-C { border-left-color: var(--red); }
.gap-item.lv-B { border-left-color: var(--amber); }
.gap-item.lv-A { border-left-color: var(--green); }
.gap-head { display: flex; align-items: center; gap: 8px; }
.gap-head b { font-size: 14px; }
.level {
  font-size: 10px; font-weight: 700; letter-spacing: .04em;
  padding: 2px 7px; border-radius: 999px; white-space: nowrap;
}
.lv-C .level { background: var(--red-soft); color: var(--red); }
.lv-B .level { background: var(--amber-soft); color: var(--amber); }
.lv-A .level { background: var(--green-soft); color: var(--green); }
.level-pending { background: #eef0f4; color: var(--muted); }
.gap-item p { font-size: 12.5px; color: var(--muted); line-height: 1.7; margin-top: 5px; }
.gap-fix { margin-top: 9px; font-size: 12px; line-height: 1.7; color: var(--ink-soft); background: rgba(30, 37, 50, .035); border-radius: 9px; padding: 8px 10px; }
.gap-fix b { color: var(--accent); font-weight: 700; }
.point-row { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }

.kp {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: .015em;
  padding: 3px 7px;
  border-radius: 6px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink-soft);
  cursor: pointer;
  transition: border-color .15s, color .15s, background .15s;
}
.kp:hover { border-color: var(--c, var(--ink)); color: var(--c, var(--ink)); background: #fff; }

.side-block { margin-bottom: 24px; }
.side-block:last-child { margin-bottom: 0; }
.next-box {
  background: linear-gradient(160deg, #fdf3ea, #fbf8f0);
  border: 1px solid #efdbc9;
  border-radius: 14px;
  padding: 16px;
}
.next-box b { display: flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--accent); margin-bottom: 6px; }
.next-box p { font-size: 12.8px; line-height: 1.75; color: var(--ink-soft); }

.breakdown { display: grid; gap: 10px; }
.bd-row { display: grid; grid-template-columns: 78px 1fr 46px; align-items: center; gap: 10px; font-size: 12px; }
.bd-row .bd-name { color: var(--ink-soft); }
.bd-row .bd-track { height: 6px; background: #eee8db; border-radius: 999px; overflow: hidden; }
.bd-row .bd-fill { display: block; height: 100%; border-radius: inherit; background: var(--c); }
.bd-row .bd-score { text-align: right; color: var(--muted); font-variant-numeric: tabular-nums; }

.materials { display: grid; gap: 8px; }
.materials li { position: relative; padding-left: 18px; font-size: 12.5px; color: var(--ink-soft); line-height: 1.65; }
.materials li::before {
  content: ""; position: absolute; left: 2px; top: .62em;
  width: 6px; height: 6px; border-radius: 1px; background: var(--c); opacity: .55;
  transform: rotate(45deg);
}

.mastery-mini { display: flex; flex-wrap: wrap; gap: 6px; }
.mm {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 11px; font-weight: 600;
  border-radius: 7px; padding: 4px 8px;
}
.mm b { font-family: var(--mono); font-size: 11px; font-weight: 700; }
.mm.A { background: var(--green-soft); color: var(--green); }
.mm.B { background: var(--amber-soft); color: var(--amber); }
.mm.C { background: var(--red-soft); color: var(--red); }
.mm.N { background: #f1efe9; color: var(--muted); }
.mini-note { margin-top: 8px; font-size: 10.5px; line-height: 1.65; color: var(--muted); }
.evidence-block code { display: inline-block; font-size: 10.5px; background: var(--paper-deep); border-radius: 6px; padding: 4px 8px; color: var(--muted); word-break: break-all; }

.pending-list { display: grid; gap: 10px; }
.pending-list li { font-size: 12.5px; line-height: 1.7; color: var(--ink-soft); padding-left: 16px; position: relative; }
.pending-list li::before { content: "□"; position: absolute; left: 0; color: var(--amber); }
.pending-list b { display: block; font-size: 13px; color: var(--ink); }

.plan14 { width: 100%; border-collapse: collapse; font-size: 12px; margin-top: 4px; }
.plan14 th { text-align: left; font-size: 10.5px; letter-spacing: .04em; color: var(--muted); padding: 6px 8px; border-bottom: 1px solid var(--line); }
.plan14 td { padding: 7px 8px; border-bottom: 1px solid #f1ecdf; vertical-align: top; line-height: 1.6; color: var(--ink-soft); }
.plan14 td:first-child { white-space: nowrap; color: var(--muted); font-variant-numeric: tabular-nums; }
.plan14 tr:last-child td { border-bottom: 0; }

/* ---------- 行动 ---------- */

.plan-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.plan-card {
  --c: var(--ink);
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
  display: flex;
  flex-direction: column;
}
.plan-top { display: flex; align-items: center; gap: 9px; margin-bottom: 4px; }
.plan-subject { font-size: 11px; font-weight: 700; color: var(--c); background: color-mix(in srgb, var(--c) 10%, #fff); padding: 3px 9px; border-radius: 999px; }
.plan-time { font-size: 11px; color: var(--muted); margin-left: auto; display: inline-flex; align-items: center; gap: 4px; }
.plan-card h3 { font-size: 17px; letter-spacing: -.015em; margin: 8px 0 12px; }
.plan-card ol { display: grid; gap: 7px; counter-reset: step; }
.plan-card ol li { display: grid; grid-template-columns: 20px 1fr; gap: 8px; font-size: 12.8px; line-height: 1.7; color: var(--ink-soft); }
.plan-card ol li::before {
  counter-increment: step; content: counter(step);
  width: 18px; height: 18px; border-radius: 50%;
  background: var(--paper-deep); color: var(--muted);
  font-size: 10px; font-weight: 700;
  display: grid; place-items: center; margin-top: 2px;
}
.plan-target {
  margin-top: auto; padding-top: 12px; border-top: 1px dashed var(--line);
  font-size: 12px; color: var(--ink-soft); display: flex; gap: 6px; align-items: flex-start;
}
.plan-card ol { margin-bottom: 14px; }
.plan-target .icon { color: var(--green); margin-top: 3px; }

.two-col { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; margin-top: 16px; }
.panel {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
}
.panel-head h3 { display: flex; align-items: center; gap: 8px; font-size: 15px; margin-bottom: 14px; }
.panel-head .icon { color: var(--accent); }
.stack { display: grid; gap: 16px; }

.daily { display: grid; gap: 2px; }
.daily-row { display: grid; grid-template-columns: 92px 1fr; gap: 12px; padding: 10px 0; border-bottom: 1px dashed var(--line); }
.daily-row:last-child { border-bottom: 0; }
.daily-day { font-size: 12px; font-weight: 700; color: var(--ink-soft); }
.daily-day small { display: block; font-size: 10.5px; color: var(--muted); font-weight: 500; margin-top: 2px; }
.daily-items { display: grid; gap: 3px; }
.daily-items li { font-size: 12.3px; color: var(--muted); line-height: 1.65; padding-left: 12px; position: relative; }
.daily-items li::before { content: ""; position: absolute; left: 0; top: .62em; width: 5px; height: 5px; border-radius: 50%; background: var(--line-strong); }

.check-list { display: grid; gap: 10px; }
.check-list li { display: grid; grid-template-columns: 18px 1fr; gap: 8px; font-size: 12.5px; line-height: 1.7; color: var(--ink-soft); }
.check-list li::before { content: ""; width: 16px; height: 16px; border: 1.5px solid var(--line-strong); border-radius: 4px; margin-top: 3px; }

.cross-list { display: grid; gap: 9px; }
.cross-list li { display: grid; grid-template-columns: 16px 1fr; gap: 8px; font-size: 12.5px; line-height: 1.7; color: var(--ink-soft); }
.cross-list li::before { content: "×"; color: var(--red); font-weight: 700; text-align: center; line-height: 1.5; }
.panel-warn { background: #fffaf5; border-color: #efdccd; }

.retest {
  margin-top: 16px;
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 24px;
  background: var(--ink);
  color: #f3eee3;
  border-radius: var(--radius);
  padding: 26px 28px;
}
.retest h3 { font-size: 15px; letter-spacing: .02em; }
.retest .when { font-size: 12px; color: #c9c2b2; margin-top: 6px; }
.retest-body p { font-size: 12.8px; line-height: 1.8; color: #ddd6c8; }
.retest-body .target { margin-top: 10px; font-size: 12.8px; color: #fff; }
.retest .point-row { margin-top: 10px; }
.retest .kp { background: rgba(255, 255, 255, .06); border-color: rgba(255, 255, 255, .18); color: #eae4d6; }
.retest .kp:hover { background: rgba(255, 255, 255, .12); color: #fff; }

/* ---------- 知识点 ---------- */

.kp-summary { display: flex; gap: 10px; flex-wrap: wrap; }
.kp-summary .chip {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 11.5px; color: var(--ink-soft);
  border: 1px solid var(--line); background: #fff;
  border-radius: 999px; padding: 5px 10px;
}
.kp-summary .chip b { font-variant-numeric: tabular-nums; }
.kp-summary .chip.A { color: var(--green); }
.kp-summary .chip.B { color: var(--amber); }
.kp-summary .chip.C { color: var(--red); }

.kp-controls { display: grid; gap: 14px; margin-bottom: 16px; }
.seg {
  display: inline-flex;
  gap: 4px;
  padding: 4px;
  background: rgba(255, 253, 249, .7);
  border: 1px solid var(--line);
  border-radius: 999px;
  width: fit-content;
  max-width: 100%;
  overflow-x: auto;
}
.seg button {
  border: 0;
  background: transparent;
  padding: 7px 15px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  cursor: pointer;
  white-space: nowrap;
  transition: background .16s, color .16s;
}
.seg button:hover { color: var(--ink); }
.seg button.on { background: var(--ink); color: #fbf8f0; }
.seg button .n { font-size: 10px; opacity: .65; margin-left: 4px; font-variant-numeric: tabular-nums; }

.filter-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; }
.field { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.field > span { font-size: 11px; color: var(--muted); font-weight: 600; letter-spacing: .02em; }
.field select, .field input {
  appearance: none;
  border: 1px solid var(--line-strong);
  background: #fffdf9;
  border-radius: 9px;
  padding: 8px 12px;
  font-size: 13px;
  color: var(--ink);
  min-width: 120px;
  outline: none;
  transition: border-color .15s, box-shadow .15s;
}
.field select { padding-right: 30px; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 15px) 52%, calc(100% - 10px) 52%; background-size: 5px 5px, 5px 5px; background-repeat: no-repeat; }
.field input:focus, .field select:focus { border-color: var(--ink-soft); box-shadow: 0 0 0 3px rgba(30, 37, 50, .08); }
.field-search { flex: 1 1 220px; }
.field-search input { width: 100%; min-width: 0; }

.table-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}
.table-meta {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 18px;
  border-bottom: 1px solid var(--line);
  font-size: 12px;
  color: var(--ink-soft);
  font-weight: 600;
}
.table-hint { margin-left: auto; color: var(--muted); font-weight: 400; font-size: 11px; }
.table-more { display: flex; justify-content: center; padding: 14px; border-top: 1px solid var(--line); background: #fdfaf3; }
.table-more[hidden] { display: none; }

.kp-scroll { max-height: 720px; overflow: auto; }
.kp-table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 12.5px; min-width: 820px; }
.kp-table thead th {
  position: sticky; top: 0; z-index: 2;
  background: #faf6ee;
  text-align: left;
  font-size: 10.5px;
  letter-spacing: .06em;
  color: var(--muted);
  font-weight: 700;
  padding: 9px 14px;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
.kp-table tbody td { padding: 9px 14px; border-bottom: 1px solid #f2ecdf; vertical-align: top; line-height: 1.6; }
.kp-table tbody tr.kp-row { cursor: pointer; }
.kp-table tbody tr.kp-row:hover { background: #fdf9f1; }
.kp-table tbody tr.open { background: #fdf6ec; }
.kp-id { font-family: var(--mono); font-size: 10.5px; color: var(--muted); white-space: nowrap; }
.kp-text { color: var(--ink); min-width: 240px; }
.kp-unit { color: var(--muted); font-size: 11.5px; min-width: 120px; }
.kp-type { color: var(--ink-soft); font-size: 11.5px; white-space: nowrap; }
.stars { color: var(--amber); letter-spacing: 1px; font-size: 10.5px; white-space: nowrap; }
.stars .off { color: #ded7c8; }
.mastery {
  display: inline-flex; align-items: center; justify-content: center;
  width: 26px; height: 20px; border-radius: 6px;
  font-size: 11px; font-weight: 700; font-family: var(--mono);
}
.m-A { background: var(--green-soft); color: var(--green); }
.m-B { background: var(--amber-soft); color: var(--amber); }
.m-C { background: var(--red-soft); color: var(--red); }
.m-none { background: #f1efe9; color: #aaa69a; font-weight: 500; }
.kp-detail-row td { background: #fdf8ef; padding: 0 !important; }
.kp-detail {
  padding: 14px 18px;
  display: grid;
  gap: 6px;
  border-left: 3px solid var(--c, var(--accent));
}
.kp-detail .row { display: flex; gap: 8px; font-size: 12px; line-height: 1.7; }
.kp-detail .lbl { color: var(--muted); flex: 0 0 64px; }
.kp-detail .val { color: var(--ink-soft); }
.kp-detail .val.mono { font-family: var(--mono); font-size: 11px; word-break: break-all; }

.empty { padding: 46px 20px; text-align: center; display: grid; justify-items: center; gap: 4px; }
.empty-art { width: 54px; height: 54px; border-radius: 16px; background: var(--paper-deep); display: grid; place-items: center; color: var(--muted); margin-bottom: 8px; }
.empty-art .icon { width: 24px; height: 24px; }
.empty b { font-size: 15px; }
.empty span { font-size: 12px; color: var(--muted); }

/* ---------- 上传 ---------- */

.upload-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 16px; align-items: start; }
.uploader { padding: 20px; }
.dropzone {
  border: 1.5px dashed var(--line-strong);
  border-radius: 16px;
  background: #fcfaf4;
  padding: 28px 20px;
  text-align: center;
  transition: border-color .2s, background .2s, transform .2s;
}
.dropzone.drag { border-color: var(--accent); background: #fdf1e8; transform: scale(1.005); }
.drop-art {
  width: 52px; height: 52px; border-radius: 16px;
  background: var(--ink); color: #fbf8f0;
  display: grid; place-items: center;
  margin: 0 auto 12px;
  box-shadow: 0 10px 22px -14px rgba(30, 37, 50, .8);
}
.drop-art .icon { width: 24px; height: 24px; }
.dropzone b { display: block; font-size: 16px; letter-spacing: -.01em; }
.dropzone > span { display: block; font-size: 11.5px; color: var(--muted); margin-top: 4px; }
.drop-actions { display: flex; justify-content: center; gap: 10px; margin-top: 16px; flex-wrap: wrap; }
.file-input {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
  opacity: 0;
}
.cam-tip {
  margin-top: 10px;
  font-size: 10.5px;
  line-height: 1.65;
  color: var(--muted);
  text-align: center;
}

.upload-meta {
  display: grid;
  grid-template-columns: 1.1fr .9fr 1.4fr;
  gap: 14px;
  margin-top: 18px;
  align-items: end;
}
.meta-block { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.batch-check {
  display: flex; align-items: center; gap: 8px;
  margin-top: 14px; font-size: 12px; color: var(--ink-soft); cursor: pointer;
  user-select: none; line-height: 1.5;
}
.batch-check input { width: 15px; height: 15px; margin: 0; accent-color: var(--ink); flex: 0 0 auto; }
.batch-start { margin-top: 10px; }
.meta-label { font-size: 11px; color: var(--muted); font-weight: 600; letter-spacing: .02em; }
.seg-subject { background: #f6f1e6; width: 100%; }
.seg-subject button { flex: 1; padding: 7px 8px; font-size: 12px; }
.seg-subject button.on { background: var(--c, var(--ink)); }
.field-wide { grid-column: 1 / -1; }
.field-wide input { width: 100%; }

.queue { display: grid; gap: 8px; margin-top: 14px; }
.queue-item {
  display: grid;
  grid-template-columns: 54px 1fr auto;
  gap: 12px;
  align-items: center;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 8px;
  animation: fadeUp .2s ease both;
}
.queue-thumb { width: 54px; height: 54px; border-radius: 8px; object-fit: cover; background: var(--paper-deep); }
.queue-info { min-width: 0; }
.queue-name { font-size: 12.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.queue-meta { font-size: 10.5px; color: var(--muted); margin-top: 2px; display: flex; gap: 8px; }
.queue-bar { height: 4px; border-radius: 99px; background: #eee8db; overflow: hidden; margin-top: 7px; }
.queue-fill { height: 100%; background: var(--green); width: 0; transition: width .2s; }
.queue-status { font-size: 10.5px; color: var(--muted); }
.queue-status.err { color: var(--red); }
.queue-remove { border: 0; background: none; color: var(--muted-2); cursor: pointer; padding: 6px; border-radius: 8px; }
.queue-remove:hover { background: var(--paper-deep); color: var(--ink); }
.fineprint { margin-top: 12px; font-size: 11px; color: var(--muted); line-height: 1.7; }

/* ---------- 自动分析开关 ---------- */

.analysis-bar {
  display: flex;
  align-items: center;
  gap: 14px;
  background: linear-gradient(120deg, #fffdf9, #f8f1e4);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px 16px;
  margin-bottom: 8px;
}
.ab-main { display: flex; align-items: center; gap: 10px; min-width: 0; }
.ab-icon {
  width: 34px; height: 34px; border-radius: 10px;
  background: var(--ink); color: #fbf8f0;
  display: grid; place-items: center; flex: 0 0 auto;
}
.ab-icon .icon { width: 18px; height: 18px; }
.ab-main b { display: block; font-size: 13px; letter-spacing: -.01em; }
.ab-main span { display: block; font-size: 11px; color: var(--muted); margin-top: 1px; }
.ab-right { margin-left: auto; display: flex; align-items: center; gap: 10px; flex: 0 0 auto; }
.ab-badge {
  font-size: 10px; font-weight: 700; letter-spacing: .02em;
  padding: 3px 9px; border-radius: 999px;
  background: var(--green-soft); color: var(--green);
  white-space: nowrap;
}
.ab-badge.off { background: #f1efe9; color: var(--muted); }
.ab-badge.busy { background: var(--amber-soft); color: var(--amber); }

.switch { position: relative; display: inline-flex; width: 44px; height: 26px; cursor: pointer; flex: 0 0 auto; }
.switch input { position: absolute; inset: 0; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.switch-track { position: absolute; inset: 0; border-radius: 999px; background: #d9d2c3; transition: .2s; }
.switch-track::after {
  content: ""; position: absolute; top: 3px; left: 3px;
  width: 20px; height: 20px; border-radius: 50%; background: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, .2); transition: .2s;
}
.switch input:checked + .switch-track { background: var(--green); }
.switch input:checked + .switch-track::after { transform: translateX(18px); }
.switch input:disabled { cursor: not-allowed; }
.switch input:disabled + .switch-track { opacity: .45; }

.analysis-note { font-size: 11px; color: var(--muted); margin: 0 0 18px 4px; line-height: 1.7; }
.browser-tip {
  font-size: 11.5px;
  line-height: 1.7;
  color: var(--amber);
  background: var(--amber-soft);
  border: 1px solid #efdcb9;
  border-radius: 10px;
  padding: 9px 12px;
  margin: -8px 0 18px;
}
.browser-tip b { font-weight: 700; }

/* ---------- 分析结果 ---------- */

.shot-status.queued,
.shot-status.analyzing { color: var(--accent); }
.shot-status.error { color: var(--red); }
.shot-status.none { color: var(--muted); }
.spin {
  display: inline-block; width: 8px; height: 8px; margin-right: 4px;
  border: 1.5px solid currentColor; border-top-color: transparent;
  border-radius: 50%; animation: spin .8s linear infinite; vertical-align: -1px;
}
@keyframes spin { to { transform: rotate(360deg); } }

.shot-analysis { display: flex; gap: 6px; align-items: center; margin-top: 6px; }
.shot-analysis .sa-score { font-size: 10px; font-weight: 700; color: var(--ink-soft); background: var(--paper-deep); border-radius: 5px; padding: 1px 6px; white-space: nowrap; }
.shot-analysis .sa-summary { font-size: 10.5px; color: var(--muted); line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.shot-open { width: 100%; margin-top: 8px; }
.analysis-weak { display: grid; gap: 8px; }
.analysis-weak li { display: flex; gap: 8px; align-items: flex-start; font-size: 12px; line-height: 1.7; color: var(--ink-soft); }
.analysis-weak li .kp { flex: 0 0 auto; margin-top: 1px; }
.shot-error { font-size: 10.5px; color: var(--red); line-height: 1.5; margin-top: 5px; }

.analysis-summary {
  font-size: 13.5px;
  line-height: 1.8;
  color: var(--ink-soft);
  background: #fdf6ec;
  border-left: 3px solid var(--accent);
  border-radius: 8px;
  padding: 11px 14px;
  margin: 14px 0;
}
.analysis-warn {
  font-size: 12px; line-height: 1.7; color: var(--amber);
  background: var(--amber-soft); border-radius: 8px; padding: 9px 12px; margin: 10px 0;
}
.analysis-stats { display: flex; flex-wrap: wrap; gap: 7px; margin: 12px 0; }
.as-chip { font-size: 11px; font-weight: 600; padding: 3px 9px; border-radius: 999px; }
.as-chip.right { background: var(--green-soft); color: var(--green); }
.as-chip.partial { background: var(--amber-soft); color: var(--amber); }
.as-chip.wrong { background: var(--red-soft); color: var(--red); }
.as-chip.unclear { background: #f1efe9; color: var(--muted); }
.as-table { width: 100%; border-collapse: collapse; font-size: 12px; min-width: 620px; }
.as-table th {
  text-align: left; font-size: 10.5px; letter-spacing: .04em; color: var(--muted);
  font-weight: 700; padding: 7px 9px; border-bottom: 1px solid var(--line); white-space: nowrap;
}
.as-table td { padding: 9px; border-bottom: 1px solid #f1ecdf; vertical-align: top; line-height: 1.65; color: var(--ink-soft); }
.as-table td:first-child { font-weight: 700; color: var(--ink); white-space: nowrap; }
.as-table .v { font-weight: 700; white-space: nowrap; }
.v.right { color: var(--green); }
.v.partial { color: var(--amber); }
.v.wrong { color: var(--red); }
.v.unclear { color: var(--muted); }
.as-table .as-points { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.analysis-block h4 { font-size: 12px; letter-spacing: .04em; color: var(--muted); margin: 18px 0 8px; font-weight: 700; }
.analysis-advice { display: grid; gap: 6px; }
.analysis-advice li { display: grid; grid-template-columns: 18px 1fr; gap: 4px; font-size: 12.5px; line-height: 1.7; color: var(--ink-soft); }
.analysis-advice li::before { content: "→"; color: var(--accent); font-weight: 700; }
.analysis-meta { margin-top: 18px; padding-top: 10px; border-top: 1px dashed var(--line); font-size: 10px; line-height: 1.7; color: var(--muted-2); }

.as-error { color: var(--red); background: var(--red-soft); border-radius: 8px; padding: 10px 12px; font-size: 12px; line-height: 1.7; margin: 12px 0; }

.qr-panel { padding: 20px; position: sticky; top: 88px; }
.qr-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; margin-bottom: 14px; }
.qr-head b { display: block; font-size: 14px; }
.qr-head span { font-size: 11px; color: var(--muted); }
.qr-head .icon { color: var(--muted); }
.qr-box {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 10px;
  display: grid;
  place-items: center;
  aspect-ratio: 1;
}
.qr-box svg { width: 100%; height: 100%; border-radius: 6px; }
.qr-box .placeholder { font-size: 11px; color: var(--muted); text-align: center; padding: 20px; }
.phone-ready { display: grid; justify-items: center; gap: 8px; padding: 18px 10px; text-align: center; }
.phone-ready .big { width: 54px; height: 54px; border-radius: 50%; background: var(--green-soft); color: var(--green); display: grid; place-items: center; }
.phone-ready .big .icon { width: 26px; height: 26px; stroke-width: 2.2; }
.phone-ready b { font-size: 13px; }
.phone-ready span { font-size: 10.5px; color: var(--muted); line-height: 1.6; }
.lan-url { display: flex; align-items: center; gap: 8px; margin-top: 12px; }
.lan-url code { flex: 1; font-size: 11px; background: var(--paper-deep); border-radius: 8px; padding: 8px 10px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lan-picker { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 9px; }
.lan-picker button {
  border: 1px solid var(--line); background: #fff; color: var(--muted);
  border-radius: 8px; padding: 5px 8px; font-size: 10.5px; line-height: 1.35;
  cursor: pointer; text-align: left; max-width: 100%;
}
.lan-picker button.on { border-color: var(--ink); color: var(--ink); background: var(--paper-deep); }
.lan-picker small { display: block; color: var(--muted-2); font-size: 9px; }
.lan-meta { font-size: 10.5px; color: var(--muted); margin-top: 7px; line-height: 1.6; }
.lan-actions { margin-top: 8px; }
.net-help { margin-top: 10px; font-size: 10.5px; color: var(--muted); line-height: 1.7; }
.net-help summary { cursor: pointer; color: var(--ink-soft); font-weight: 600; font-size: 11px; }
.net-help ol { margin: 8px 0 0; padding-left: 16px; list-style: decimal; display: grid; gap: 5px; }
.net-help code { background: var(--paper-deep); border-radius: 3px; padding: 0 4px; }
.qr-note { margin-top: 10px; font-size: 10.5px; line-height: 1.7; color: var(--muted); }

.gallery-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; margin: 36px 0 14px; flex-wrap: wrap; }
.gallery-head h3 { font-size: 17px; display: flex; align-items: center; gap: 8px; }
.gallery-head h3 span { font-size: 11px; font-weight: 600; background: var(--ink); color: #fff; border-radius: 999px; padding: 1px 8px; }
.gallery-head p { font-size: 12px; color: var(--muted); margin-top: 3px; }
.seg-small { background: transparent; border-color: transparent; padding: 0; gap: 2px; }
.seg-small button { padding: 5px 10px; font-size: 11.5px; }
.seg-small button.on { background: var(--ink); }

.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; }
.shot {
  position: relative;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  transition: box-shadow .2s, transform .2s;
}
.shot:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.shot-img { aspect-ratio: 4 / 3; background: #efe9dc; cursor: zoom-in; position: relative; overflow: hidden; }
.shot-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s; }
.shot-img:hover img { transform: scale(1.03); }
.shot-img .fallback { display: grid; place-items: center; height: 100%; color: var(--muted); font-size: 11px; text-align: center; padding: 12px; }
.shot-body { padding: 10px 12px 11px; }
.shot-tags { display: flex; gap: 5px; align-items: center; flex-wrap: wrap; }
.shot-subject { font-size: 10px; font-weight: 700; color: var(--c); background: color-mix(in srgb, var(--c) 9%, #fff); padding: 2px 6px; border-radius: 5px; }
.shot-kind { font-size: 10px; color: var(--muted); border: 1px solid var(--line); padding: 1px 5px; border-radius: 5px; }
.shot-page { font-size: 10px; font-weight: 600; color: #6b5a2e; background: #f6efe0; border-radius: 5px; padding: 2px 6px; }
.shot-status { margin-left: auto; font-size: 9.5px; font-weight: 700; }
.shot-status.pending { color: var(--amber); }
.shot-status.done { color: var(--green); }
.shot-note { font-size: 11px; color: var(--ink-soft); margin-top: 5px; line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.shot-foot { display: flex; align-items: center; justify-content: space-between; margin-top: 7px; }
.shot-date { font-size: 10px; color: var(--muted-2); }
.shot-actions { display: flex; gap: 2px; }
.shot-act { border: 0; background: none; padding: 4px; border-radius: 6px; color: var(--muted); cursor: pointer; display: grid; place-items: center; }
.shot-act:hover { background: var(--paper-deep); color: var(--ink); }
.shot-act.del:hover { color: var(--red); background: var(--red-soft); }
.shot-act .icon { width: 14px; height: 14px; }

.gallery-empty {
  grid-column: 1 / -1;
  border: 1.5px dashed var(--line);
  border-radius: 16px;
  padding: 38px 20px;
  text-align: center;
  color: var(--muted);
  font-size: 12.5px;
  display: grid;
  justify-items: center;
  gap: 6px;
}
.gallery-empty .icon { width: 26px; height: 26px; color: var(--line-strong); }

/* ---------- 批改记录 ---------- */

.records-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; margin: 38px 0 14px; flex-wrap: wrap; }
.records-head h3 { font-size: 17px; display: flex; align-items: center; gap: 8px; }
.records-head h3 span { font-size: 11px; font-weight: 600; background: var(--ink); color: #fff; border-radius: 999px; padding: 1px 8px; }
.records-head p { font-size: 12px; color: var(--muted); margin-top: 3px; max-width: 620px; line-height: 1.6; }
.records-tools { display: flex; align-items: flex-end; gap: 10px; flex-wrap: wrap; }
.records-search { min-width: 220px; }
.records { display: grid; gap: 10px; }
.record {
  display: flex; gap: 14px; align-items: center; justify-content: space-between;
  background: var(--card); border: 1px solid var(--line); border-left: 3px solid var(--c, var(--line));
  border-radius: 12px; padding: 12px 14px;
}
.record-main { min-width: 0; flex: 1; }
.record-tags { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.rec-tag { font-size: 10px; color: var(--muted); border: 1px solid var(--line); border-radius: 5px; padding: 1px 6px; }
.rec-tag.edited { color: var(--accent); border-color: color-mix(in srgb, var(--accent) 40%, #fff); background: #fdf1e8; font-weight: 700; }
.rec-tag.done { color: var(--green); border-color: color-mix(in srgb, var(--green) 40%, #fff); }
.rec-tag.auto { color: #2f6df6; border-color: color-mix(in srgb, #2f6df6 35%, #fff); background: #eef3ff; }
.record-group { margin-bottom: 20px; }
.record-group:last-child { margin-bottom: 0; }
.record-group h4 {
  display: flex; align-items: center; gap: 8px; margin: 0 0 8px;
  font-size: 13px; font-weight: 700; color: var(--ink-soft);
}
.record-group h4 span {
  font-size: 10px; font-weight: 600; color: var(--muted);
  background: var(--paper-deep); border-radius: 999px; padding: 1px 7px;
}
.record-summary { font-size: 13px; color: var(--ink-soft); margin-top: 6px; line-height: 1.6; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.record-meta { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-top: 7px; font-size: 10.5px; color: var(--muted-2); }
.record-points { display: inline-flex; gap: 4px; flex-wrap: wrap; }
.record-actions { flex: 0 0 auto; }

/* ---------- 本机摄像头拍照 ---------- */

.cam-stage {
  position: relative;
  margin: 14px 0 12px;
  border-radius: 14px;
  overflow: hidden;
  background: #14181f;
  aspect-ratio: 4 / 3;
  display: grid;
  place-items: center;
}
.cam-stage video { width: 100%; height: 100%; object-fit: contain; display: block; }
.cam-status {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 20px;
  text-align: center;
  font-size: 12.5px;
  line-height: 1.7;
  color: #d9dde6;
  background: rgba(20, 24, 31, .92);
}
.cam-status[hidden] { display: none; }
.cam-bar { display: flex; gap: 8px; align-items: center; margin-bottom: 12px; }

/* 拍照后的裁切预览 */
.shot-preview-body { display: flex; gap: 12px; align-items: flex-start; }
.shot-preview-stage {
  margin: 12px 0;
  background: #14181f;
  border-radius: 12px;
  overflow: hidden;
  display: grid;
  place-items: center;
  flex: 1;
  min-width: 0;
}
.shot-preview-stage canvas { display: block; width: 100%; height: auto; max-height: 54vh; object-fit: contain; cursor: grab; }
.shot-crop-box { flex: 0 0 168px; display: flex; flex-direction: column; gap: 6px; padding-top: 12px; }
.shot-crop-box > span { font-size: 11px; color: var(--muted); }
.shot-crop-box canvas {
  display: block; width: 100%; height: auto; border-radius: 8px;
  background: #14181f; border: 1px solid var(--line);
}
.cam-select {
  flex: 1;
  font: inherit;
  font-size: 12.5px;
  padding: 7px 9px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
}

/* 批改结果的编辑态 */
.ed-table { min-width: 720px; }
.ed-table td { vertical-align: top; }
.ed-input {
  width: 100%; font: inherit; font-size: 12.5px; line-height: 1.5;
  padding: 6px 8px; border: 1px solid var(--line-strong); border-radius: 8px; background: #fff; color: var(--ink);
}
.ed-input + .ed-input { margin-top: 5px; }
.ed-table select.ed-input { padding: 5px 6px; }
.ed-hint { font-size: 10.5px; color: var(--muted-2); margin-top: 4px; }

.upload-hints { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-top: 18px; }
.hint {
  background: rgba(255, 253, 249, .7);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 14px;
  font-size: 11.5px;
  line-height: 1.65;
  color: var(--muted);
}
.hint b { display: block; font-size: 11px; color: var(--accent); margin-bottom: 3px; letter-spacing: .04em; }

/* ---------- 页脚 ---------- */

.footer {
  margin-top: 78px;
  padding: 28px 0 40px;
  border-top: 1px solid var(--line);
  scroll-margin-top: 80px;
}
.footer-main { display: flex; justify-content: space-between; align-items: center; gap: 20px; flex-wrap: wrap; }
.footer-brand { display: flex; align-items: center; gap: 12px; }
.footer-brand b { display: block; font-size: 14px; }
.footer-brand span { font-size: 11px; color: var(--muted); }
.footer-actions { display: flex; gap: 6px; }
.evidence { margin-top: 20px; font-size: 12px; color: var(--muted); }
.evidence summary { cursor: pointer; color: var(--ink-soft); font-weight: 600; }
.evidence ul { display: grid; gap: 5px; margin-top: 10px; }
.evidence li { display: flex; gap: 8px; flex-wrap: wrap; }
.evidence code { color: var(--ink-soft); background: var(--paper-deep); border-radius: 5px; padding: 1px 6px; }
.footer-note { margin-top: 18px; font-size: 10.5px; line-height: 1.8; color: var(--muted-2); }

/* ---------- 移动端底栏 ---------- */

.mobile-bar {
  display: none;
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 45;
  background: rgba(255, 253, 249, .94);
  backdrop-filter: blur(14px);
  border-top: 1px solid var(--line);
  padding: 6px 8px calc(6px + env(safe-area-inset-bottom));
  box-shadow: 0 -8px 24px -20px rgba(30, 37, 50, .4);
}
.mobile-bar a {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  font-size: 9.5px;
  color: var(--muted);
  padding: 3px 0;
}
.mobile-bar .icon { width: 20px; height: 20px; }
.mobile-bar .mobile-cam { color: var(--ink); font-weight: 600; }
.cam-circle {
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--ink); color: #fbf8f0;
  display: grid; place-items: center;
  margin-top: -18px;
  border: 4px solid var(--paper);
  box-shadow: 0 8px 18px -10px rgba(30, 37, 50, .8);
}
.cam-circle .icon { width: 22px; height: 22px; }

/* ---------- 弹层 ---------- */

.modal { position: fixed; inset: 0; z-index: 80; display: grid; place-items: center; padding: 24px; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(20, 24, 32, .55); backdrop-filter: blur(4px); }
.modal-card {
  position: relative;
  z-index: 1;
  width: min(760px, 100%);
  max-height: min(86vh, 900px);
  overflow: auto;
  background: var(--card);
  border-radius: 22px;
  padding: 28px;
  box-shadow: var(--shadow-lg);
  animation: pop .22s ease both;
}
.modal-close {
  position: absolute; top: 12px; right: 12px;
  width: 34px; height: 34px; border-radius: 50%;
  border: 0; background: rgba(30, 37, 50, .06);
  display: grid; place-items: center; cursor: pointer;
  z-index: 2;
}
.modal-close:hover { background: rgba(30, 37, 50, .12); }
.modal h3 { font-size: 18px; margin-bottom: 6px; padding-right: 30px; }
.modal .modal-sub { font-size: 11.5px; color: var(--muted); margin-bottom: 16px; }
.modal .modal-body p { font-size: 13.5px; line-height: 1.85; color: var(--ink-soft); }
.modal .modal-body .kv { display: grid; grid-template-columns: 74px 1fr; gap: 8px 10px; font-size: 12.5px; line-height: 1.75; }
.modal .modal-body .kv dt { color: var(--muted); }
.modal .modal-body .kv dd { margin: 0; color: var(--ink-soft); }
.modal-img { border-radius: 12px; max-height: 70vh; width: auto; margin: 0 auto; }
.modal-actions { display: flex; gap: 8px; margin-top: 18px; flex-wrap: wrap; }
.qr-modal { text-align: center; }
.qr-modal .qr-large { width: min(280px, 100%); margin: 8px auto 14px; background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 10px; }
.qr-modal code { display: inline-block; background: var(--paper-deep); border-radius: 8px; padding: 7px 12px; font-size: 13px; }

.toast {
  position: fixed;
  left: 50%;
  bottom: 34px;
  transform: translate(-50%, 16px);
  background: var(--ink);
  color: #fbf8f0;
  padding: 10px 18px;
  border-radius: 999px;
  font-size: 12.5px;
  z-index: 90;
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s, transform .2s;
  max-width: calc(100vw - 40px);
  text-align: center;
  box-shadow: var(--shadow-lg);
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

@keyframes fadeUp { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes pop { from { opacity: 0; transform: scale(.97) translateY(6px); } to { opacity: 1; transform: none; } }

/* ---------- 响应式 ---------- */

@media (max-width: 1040px) {
  .nav a { padding: 8px 9px; font-size: 13.5px; }
  .hero { grid-template-columns: 1fr; gap: 34px; padding-top: 48px; }
  .hero-card { max-width: 560px; }
  .subject-grid { grid-template-columns: repeat(2, 1fr); }
  .detail-body { grid-template-columns: 1fr; gap: 26px; }
  .upload-layout { grid-template-columns: 1fr; }
  .qr-panel { position: static; }
  .qr-box { max-width: 230px; margin: 0 auto 12px; }
}

@media (max-width: 860px) {
  .nav { display: none; }
  .topbar-actions .btn-ghost { display: none; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .stat:nth-child(3) { border-left: 0; border-top: 1px solid var(--line); }
  .stat:nth-child(4) { border-top: 1px solid var(--line); }
  .chart-grid { grid-template-columns: 1fr; }
  .charts-head { flex-direction: column; align-items: flex-start; gap: 8px; }
  .quick-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .quick-head { flex-direction: column; align-items: flex-start; gap: 6px; }
  .page { padding-top: 4px; }
  .plan-grid { grid-template-columns: 1fr; }
  .two-col { grid-template-columns: 1fr; }
  .retest { grid-template-columns: 1fr; gap: 14px; padding: 22px; }
  .upload-hints { grid-template-columns: repeat(2, 1fr); }
  .mobile-bar { display: flex; }
  body { padding-bottom: calc(66px + env(safe-area-inset-bottom)); }
  .toast { bottom: calc(84px + env(safe-area-inset-bottom)); }
  .footer { padding-bottom: 20px; }
  .section { padding-top: 58px; }
  .wrap { width: min(1160px, 100% - 32px); }
}

@media (max-width: 640px) {
  .topbar-inner { height: 60px; gap: 12px; }
  .brand-text small { display: none; }
  .brand-text b { font-size: 14px; }
  .topbar-actions .btn-solid span { display: none; }
  .topbar-actions .btn-solid { padding: 9px 12px; }
  .hero { padding: 28px 0 26px; }
  .hero h1 { font-size: clamp(34px, 9.8vw, 42px); }
  .lede { font-size: 14.5px; line-height: 1.75; }
  .tag-row { display: none; }
  .hero-actions { margin-top: 22px; }
  .hero-card { padding: 18px; border-radius: 20px; }
  .section-head { flex-direction: column; align-items: flex-start; gap: 12px; margin-bottom: 22px; }
  .section-head p { font-size: 13px; }
  .subject-grid { grid-template-columns: 1fr; gap: 12px; }
  .subject-card { padding: 16px 18px; }
  .page-head h1 { font-size: 26px; }
  .quick { padding: 14px; }
  .quick-ic { width: 30px; height: 30px; }
  .quick > span { font-size: 11px; }
  .chart-card { padding: 16px; }
  .chart-split { gap: 14px; }
  .donut { width: 104px; height: 104px; }
  .donut::after { inset: 11px; }
  .donut-label b { font-size: 20px; }
  .bar-row { grid-template-columns: 64px 1fr 38px; }
  .cause-legend { grid-template-columns: 1fr; }
  .sc-metric { margin-top: 12px; }
  .sc-metric b { font-size: 30px; }
  .panel-card { padding: 20px 16px; border-radius: 18px; }
  .detail-top { gap: 14px; }
  .detail-metric { margin-left: 0; text-align: left; }
  .detail-progress { width: 100%; max-width: none; flex-basis: 100%; }
  .detail-body { padding-top: 18px; }
  .plan-card { padding: 18px; }
  .stats-grid { border-radius: 14px; }
  .stat { padding: 14px 16px; }
  .stat b { font-size: 22px; }
  .uploader { padding: 14px; }
  .dropzone { padding: 22px 14px; }
  .upload-meta { grid-template-columns: 1fr; }
  .field-wide { grid-column: auto; }
  .qr-panel { display: block; }
  .qr-box { width: 100%; max-width: 220px; margin: 0 auto 12px; }
  .qr-head { margin-bottom: 12px; }
  .gallery { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .gallery-head { margin-top: 28px; }
  .upload-hints { grid-template-columns: 1fr; }
  .seg button { padding: 6px 11px; font-size: 12px; }
  .kp-summary { display: none; }
  .kp-controls .seg { width: 100%; justify-content: space-between; }
  .filter-row { gap: 8px; }
  .field { flex: 1 1 46%; }
  .field select, .field input { min-width: 0; width: 100%; padding: 9px 11px; font-size: 16px; }
  .field select { font-size: 14px; }
  .field-search { flex-basis: 100%; }
  .table-hint { display: none; }
  .kp-scroll { max-height: none; }
  .kp-table { min-width: 0; }
  .kp-table thead th:nth-child(3), .kp-table tbody td:nth-child(3),
  .kp-table thead th:nth-child(4), .kp-table tbody td:nth-child(4) { display: none; }
  .kp-table tbody td { padding: 9px 10px; }
  .kp-table thead th { padding: 8px 10px; }
  .kp-text { min-width: 0; }
  .kp-detail { padding: 12px 12px; }
  .kp-detail .row { display: block; }
  .kp-detail .lbl { display: block; }
  .as-table { min-width: 0; }
  .as-table thead { display: none; }
  .as-table, .as-table tbody, .as-table tr, .as-table td { display: block; width: 100%; }
  .as-table tr {
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 10px 12px;
    margin-bottom: 9px;
    background: #fffdf8;
  }
  .as-table td { border: 0; padding: 3px 0; }
  .as-table td::before {
    content: attr(data-label);
    display: block;
    font-size: 9px;
    font-weight: 700;
    letter-spacing: .04em;
    color: var(--muted-2);
    margin-bottom: 1px;
  }
  .as-table td:first-child { font-size: 13px; }
  .modal { padding: 12px; }
  .modal-card { padding: 22px 18px; border-radius: 18px; }
  .footer-main { align-items: flex-start; }
  .retest { padding: 20px; }
  .daily-row { grid-template-columns: 76px 1fr; }
  .records-tools { width: 100%; }
  .records-search { min-width: 0; width: 100%; }
  .record { flex-direction: column; align-items: stretch; }
  .record-actions .btn { width: 100%; }
  .shot-preview-body { flex-direction: column; }
  .shot-crop-box { flex: none; width: 100%; padding-top: 0; }
  .shot-crop-box canvas { max-width: 200px; }
}

@media (max-width: 380px) {
  .gallery { grid-template-columns: 1fr; }
  .seg-subject button { font-size: 11px; padding: 6px 4px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* ---------- 打印 ---------- */

@media print {
  body { background: #fff; padding: 0; }
  body::before { display: none; }
  .topbar, .mobile-bar, .hero-actions, #upload, .qr-panel, .gallery-head, .gallery, .toast, .modal, .footer-actions, .link-btn, .tabs, .kp-controls, .table-hint { display: none !important; }
  .wrap { width: 100%; padding-inline: 0; }
  .hero { padding: 0 0 18px; grid-template-columns: 1fr; }
  .hero h1 { font-size: 30px; }
  .section { padding-top: 22px; break-inside: avoid-page; }
  .panel-card, .subject-card, .plan-card, .panel, .table-card { box-shadow: none; border-color: #ccc; }
  .detail-body { grid-template-columns: 1fr 1fr; }
  .kp-scroll { max-height: none; overflow: visible; }
  .kp-table { font-size: 9px; min-width: 0; }
  a[href]::after { content: ""; }
}

/* ---------------- 人教版先修链（taxonomy） ---------------- */
.chain { list-style: none; margin: 6px 0 0; padding: 0; display: grid; gap: 4px; }
.chain > li { display: flex; align-items: baseline; gap: 8px; font-size: 12.5px; line-height: 1.5; }
.chain-vol { flex: none; min-width: 66px; color: var(--muted); font-variant-numeric: tabular-nums; }
.chain-name { color: var(--ink-soft); }
.chain-ext { color: var(--muted); font-size: 11px; border: 1px dashed var(--line-strong); border-radius: 999px; padding: 0 6px; }
.chain-none { color: var(--muted); font-size: 12px; }
.chain-more { margin-top: 4px; color: var(--muted); font-size: 11.5px; }
.kp-mini { font-size: 10.5px; padding: 1px 6px; margin-left: 4px; border-radius: 999px; border: 1px solid var(--line-strong); background: var(--card); color: var(--ink-soft); cursor: pointer; }
.kp-mini.lv-B { border-color: var(--amber); color: var(--amber); background: var(--amber-soft); }
.kp-mini.lv-C { border-color: var(--red); color: var(--red); background: var(--red-soft); }
.as-check { margin-top: 4px; font-size: 11.5px; color: var(--blue); background: rgba(47,109,246,.07); border-radius: 8px; padding: 3px 7px; display: inline-block; }
.rt-block { border-top: 1px dashed var(--line); padding-top: 12px; }
.rt-note { font-size: 12px; color: var(--muted); margin-bottom: 8px; }
.rt-src { display: block; font-size: 11px; margin-top: 2px; opacity: .8; }
.rt-list { margin: 0; padding-left: 18px; display: grid; gap: 12px; }
.rt-item { font-size: 12.5px; }
.rt-head { color: var(--ink-soft); margin-bottom: 4px; }
.rt-weak { margin-left: 4px; font-size: 10.5px; color: var(--red); background: var(--red-soft); border-radius: 999px; padding: 0 6px; }
.rt-ext { margin-top: 10px; font-size: 12px; color: var(--amber); background: var(--amber-soft); border-radius: 10px; padding: 6px 9px; }
@media print { .chain, .rt-block { break-inside: avoid; } }
.chain-self .chain-vol { color: var(--accent); font-weight: 600; }
.chain-self .chain-name { color: var(--ink); font-weight: 600; }

/* ---------------- 筛查（screening） ---------------- */
.empty-note { color: var(--muted); font-size: 13px; padding: 18px 2px; }
.empty-note code { background: var(--paper-deep); padding: 1px 5px; border-radius: 5px; }
.sc-card { padding: 20px 22px; }
.sc-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 10px; font-size: 12.5px; color: var(--muted); margin-bottom: 12px; }
.sc-head > span:nth-child(2) { color: var(--ink-soft); font-weight: 600; }
.sc-diff { margin-left: auto; border: 1px solid var(--line-strong); border-radius: 999px; padding: 1px 8px; font-size: 11px; }
.sc-prompt { font-size: 17px; line-height: 1.7; margin: 6px 0 16px; }
.sc-choices { display: grid; gap: 8px; }
.sc-choice { display: flex; gap: 10px; align-items: flex-start; text-align: left; padding: 10px 12px; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); background: var(--card); cursor: pointer; font: inherit; font-size: 14px; }
.sc-choice:hover { border-color: var(--ink-soft); }
.sc-choice.on { border-color: var(--accent); background: var(--accent-soft); }
.sc-choice b { color: var(--accent); min-width: 18px; }
.sc-input { width: 100%; padding: 11px 12px; font: inherit; font-size: 15px; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); background: var(--card); }
.sc-input:focus { outline: 2px solid var(--blue); outline-offset: 1px; }
.sc-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 16px; }
.sc-hint { margin-top: 10px; font-size: 11.5px; color: var(--muted); }
.sc-result-head { display: flex; align-items: baseline; gap: 10px; margin-bottom: 10px; }
.sc-result-head span { color: var(--muted); font-size: 12px; }
.sc-chain { margin-top: 12px; padding-top: 10px; border-top: 1px dashed var(--line); }
.sc-chain-head { display: flex; gap: 8px; align-items: baseline; font-size: 13px; color: var(--ink-soft); }
.mastery.m-screen { border: 1px dashed currentColor; background: transparent; }
.src-tag { font-size: 10.5px; border: 1px dashed var(--line-strong); border-radius: 999px; padding: 0 6px; color: var(--muted); margin-left: 4px; }

/* ---------- 新增功能提示条 ---------- */
.whats-new {
  margin-top: 14px;
  font-size: 12.5px;
  color: var(--muted);
  background: var(--green-soft);
  border: 1px solid rgba(28, 122, 91, .18);
  border-radius: 10px;
  padding: 8px 12px;
  display: inline-block;
}
.whats-new a { color: var(--green); font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }
@media print { .whats-new { display: none; } }
.build-stamp { display: block; margin-top: 4px; font-size: 11px; color: var(--muted); opacity: .85; }

/* ---------- 筛查进度与已做记录 ---------- */
.sc-progress-card { margin: 26px 0 8px; padding: 14px 16px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-sm); }
.scp-head { display: flex; justify-content: space-between; align-items: baseline; font-size: 13px; margin-bottom: 8px; gap: 10px; }
.scp-head span { color: var(--muted); font-size: 12px; }
.scp-track { height: 8px; background: var(--paper-deep); border-radius: 999px; overflow: hidden; }
.scp-track span { display: block; height: 100%; background: var(--green); border-radius: 999px; transition: width .3s; }
.sc-done-title { font-size: 15px; margin: 22px 0 10px; }
.sc-done-item { border: 1px solid var(--line); border-radius: 10px; margin-bottom: 8px; background: var(--card); }
.sc-done-item > summary { cursor: pointer; display: flex; align-items: center; gap: 10px; padding: 9px 12px; font-size: 12.5px; list-style: none; }
.sc-done-item > summary::-webkit-details-marker { display: none; }
.sc-done-item[open] > summary { border-bottom: 1px dashed var(--line); }
.sc-done-ids { flex: 1; color: var(--ink-soft); }
.sc-done-score { color: var(--muted); font-variant-numeric: tabular-nums; }
.sc-done-date { color: var(--muted); font-size: 11px; }
.sc-done-qs { margin: 0; padding: 10px 12px 10px 34px; display: grid; gap: 6px; }
.sc-done-qs li { font-size: 12px; color: var(--ink-soft); display: flex; gap: 6px; align-items: baseline; }
.q-mark { font-weight: 700; flex: none; }
.sc-done-qs li.ok .q-mark { color: var(--green); }
.sc-done-qs li.no .q-mark { color: var(--red); }
.sc-done-qs li.na .q-mark { color: var(--muted); }
@media print { .sc-done-item { break-inside: avoid; } }

/* ---------- 账户：登录 / 注册 / 资料 ---------- */
.nav-user { display: inline-flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--ink-soft); margin-right: 4px; white-space: nowrap; flex: 0 0 auto; }
.nav-user .nu-name { font-weight: 600; }
.nav-user .nu-link { color: var(--muted); text-decoration: none; background: none; border: 0; padding: 0; font: inherit; cursor: pointer; }
.nav-user .nu-link:hover { color: var(--ink); text-decoration: underline; }
.auth-card { max-width: 460px; margin: 0 auto; padding: 22px; display: grid; gap: 14px; }
.auth-card .seg { margin-bottom: 4px; }
.auth-card .field { display: grid; gap: 6px; }
.auth-card .field span { font-size: 12px; color: var(--muted); }
.auth-card input { padding: 10px 12px; font: inherit; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); background: var(--card); }
.auth-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 6px; }
.auth-note { font-size: 12px; color: var(--muted); min-height: 16px; }
.auth-wechat { border-top: 1px dashed var(--line); padding-top: 12px; }
.btn-block { display: block; text-align: center; }
.profile-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; }
.profile-grid .field { display: grid; gap: 6px; }
.profile-grid .field span { font-size: 12px; color: var(--muted); }
.profile-grid input, .profile-grid select { padding: 10px 12px; font: inherit; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); background: var(--card); }
.profile-sub { font-size: 14px; margin: 18px 0 10px; }
#profileForm { padding: 22px; }

/* =========================================================
   首页配色升级（2026-11-20）
   保留暖纸底，但首屏加入四科色光斑、渐变标题、彩色统计卡
   ========================================================= */

/* 1. 首屏：柔和彩色光斑 */
.hero { position: relative; isolation: isolate; }
.hero::before {
  content: "";
  position: absolute;
  inset: -30px -70px -10px -70px;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(460px 320px at 8% 12%, rgba(47, 109, 246, .14), transparent 68%),
    radial-gradient(420px 300px at 92% 6%, rgba(194, 85, 47, .17), transparent 68%),
    radial-gradient(520px 360px at 62% 100%, rgba(28, 122, 91, .13), transparent 70%),
    radial-gradient(360px 260px at 30% 88%, rgba(122, 79, 214, .11), transparent 70%);
  filter: blur(2px);
}

/* 2. 标题强调：橙 → 玫红渐变字 */
.hero h1 .accent {
  background: linear-gradient(100deg, #e2603a 0%, #c2552f 42%, #a83f6b 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero h1 .accent::after {
  background: linear-gradient(90deg, #e2603a, #a83f6b);
  opacity: .22;
}

/* 3. 主按钮：暖色渐变（替换原来的墨黑） */
.btn-solid {
  background: linear-gradient(135deg, #e2603a 0%, #c2552f 55%, #a8452a 100%);
  color: #fff;
  box-shadow: 0 10px 24px -14px rgba(194, 85, 47, .8);
}
.btn-solid:hover { background: linear-gradient(135deg, #ea6b44 0%, #cf5c34 55%, #b34a2e 100%); }

/* 4. 统计卡：四张各自带色 */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  background: none;
  border: 0;
  border-radius: 0;
  overflow: visible;
}
.stat {
  position: relative;
  min-width: 0;
  padding: 20px 22px 18px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--card);
  overflow: hidden;
  transition: transform .2s, box-shadow .2s;
}
.stat:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.stat::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: var(--sc, var(--accent));
}
.stat:nth-child(1) { --sc: #2f6df6; background: linear-gradient(155deg, #edf3ff 0%, #fffdf9 62%); }
.stat:nth-child(2) { --sc: #1c7a5b; background: linear-gradient(155deg, #e8f7ef 0%, #fffdf9 62%); }
.stat:nth-child(3) { --sc: #c2552f; background: linear-gradient(155deg, #fdefe7 0%, #fffdf9 62%); }
.stat:nth-child(4) { --sc: #7a4fd6; background: linear-gradient(155deg, #f2edff 0%, #fffdf9 62%); }
.stat b { color: var(--sc); }
.stat:first-child { border-left: 1px solid var(--line); }

/* 5. 学生卡：彩色描边 + 渐变底 */
.hero-card {
  background: linear-gradient(160deg, #fffdf9 0%, #fdf5ec 52%, #f1f6ff 100%);
  border-color: rgba(194, 85, 47, .22);
}
.hero-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 4px;
  background: linear-gradient(90deg, #2f6df6, #1c7a5b 35%, #c2552f 68%, #7a4fd6);
  opacity: .85;
}
.avatar {
  background: linear-gradient(145deg, #e2603a, #a83f6b);
  box-shadow: 0 8px 18px -10px rgba(168, 63, 107, .8);
}

/* 6. 科目卡 / 快捷入口：淡色底 */
.subject-card { background: linear-gradient(170deg, color-mix(in srgb, var(--c) 7%, #fffdf9) 0%, #fffdf9 55%); }
.subject-card::before { height: 4px; }
.quick { background: linear-gradient(165deg, color-mix(in srgb, var(--c) 8%, #fffdf9) 0%, #fffdf9 60%); }

/* 7. 小屏：统计卡两列，去掉旧版分隔线 */
@media (max-width: 860px) {
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .stat:nth-child(3), .stat:nth-child(4) { border-left: 1px solid var(--line); border-top: 1px solid var(--line); }
}
@media (max-width: 640px) {
  .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .stat { padding: 14px 16px; }
  .stat b { font-size: 22px; }
}

/* ---------- 管理页 ---------- */

.admin-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 22px; }
.admin-stat {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 18px 20px;
}
.admin-stat b { display: block; font-size: 24px; letter-spacing: -.03em; color: var(--accent); line-height: 1.2; }
.admin-stat span { display: block; font-size: 12.5px; font-weight: 600; color: var(--ink-soft); margin-top: 4px; }
.admin-stat small { display: block; font-size: 11px; color: var(--muted); margin-top: 3px; }

.admin-panel { padding: 22px; margin-bottom: 20px; }
.admin-panel-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.admin-panel-head h2 { font-size: 18px; letter-spacing: -.02em; }
.admin-panel-head p { font-size: 12px; color: var(--muted); margin-top: 4px; line-height: 1.6; }

.admin-form { display: grid; gap: 14px; }
.admin-form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.admin-switches { display: flex; flex-wrap: wrap; gap: 18px; }
.admin-check { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--ink-soft); cursor: pointer; }
.admin-check input { width: 16px; height: 16px; accent-color: var(--accent); }
.admin-actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.admin-note { font-size: 12px; color: var(--muted); }

.admin-users { display: grid; gap: 10px; }
.admin-user {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 16px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--card);
}
.admin-user-name { font-size: 14px; font-weight: 700; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.admin-user-meta { font-size: 11.5px; color: var(--muted); margin-top: 3px; }
.admin-user-stats { display: flex; gap: 14px; font-size: 11.5px; color: var(--muted); }
.admin-user-stats b { color: var(--ink); font-size: 13px; }
.admin-user-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.admin-me { font-size: 10.5px; color: var(--accent); background: var(--accent-soft); border-radius: 999px; padding: 2px 8px; }
.admin-danger { color: var(--red); }
.admin-danger:hover { background: var(--red-soft); }

@media (max-width: 860px) {
  .admin-stats { grid-template-columns: repeat(2, 1fr); }
  .admin-user { grid-template-columns: 1fr; gap: 10px; }
  .admin-form-row { grid-template-columns: 1fr; }
}


/* ---------- 启动遮罩：避免登录页闪一下 ---------- */
body.booting .view { visibility: hidden; }
#bootMask {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: grid;
  place-items: center;
  gap: 12px;
  align-content: center;
  background: var(--paper);
  color: var(--muted);
  font-size: 13px;
}
body:not(.booting) #bootMask { display: none; }
.boot-spin {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 3px solid var(--line-strong);
  border-top-color: var(--accent);
  animation: bootspin .8s linear infinite;
}
@keyframes bootspin { to { transform: rotate(360deg); } }

/* ---------- 首页横幅 / 注册身份 ---------- */
.home-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 18px 0 0;
  padding: 14px 18px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: var(--card);
}
.home-banner b { display: block; font-size: 14px; }
.home-banner span { display: block; font-size: 12px; color: var(--muted); margin-top: 3px; line-height: 1.6; }
.banner-grade { background: linear-gradient(120deg, #fff4e8, #fffdf9 60%); border-color: #f0d3bd; }
.banner-profile { background: linear-gradient(120deg, #eef4ff, #fffdf9 60%); border-color: #cfdcf5; }
.seg-role { margin-bottom: 14px; }
.profile-role { font-size: 12px; color: var(--muted); margin-bottom: 14px; }
@media (max-width: 640px) {
  .home-banner { flex-direction: column; align-items: flex-start; }
}

/* ---------- 管理页：用量统计 ---------- */
.usage-table { overflow-x: auto; }
.usage-tbl { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.usage-tbl th, .usage-tbl td { padding: 8px 10px; text-align: right; border-bottom: 1px solid var(--line); white-space: nowrap; }
.usage-tbl th:first-child, .usage-tbl td:first-child { text-align: left; }
.usage-tbl thead th { color: var(--muted); font-weight: 600; font-size: 11.5px; }
.usage-tbl tfoot th { border-top: 2px solid var(--line-strong); font-weight: 700; }

/* ---------- 资料页：同班同学 ---------- */
.classmates { margin-top: 8px; }
.classmate-group { font-size: 13px; margin-bottom: 10px; }
.classmate-share { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.classmate-list { list-style: none; padding: 0; margin: 10px 0 0; display: grid; gap: 8px; }
.classmate { display: flex; justify-content: space-between; gap: 12px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--card); font-size: 13px; }
.classmate-stats { color: var(--muted); font-size: 12px; }

/* ---------- 意见反馈 ---------- */
.btn-feedback {
  position: relative;
  background: var(--accent-soft);
  border: 1px solid #ecc9b6;
  color: #8f3a1c;
  font-weight: 600;
}
.btn-feedback:hover { background: #f4dccd; border-color: #e0b49c; }
.btn-feedback .icon { color: var(--accent); }

.fb-dot {
  position: absolute;
  top: -6px; right: -6px;
  min-width: 17px; height: 17px;
  padding: 0 4px;
  border-radius: 9px;
  background: var(--red);
  color: #fff;
  font-size: 10px; font-style: normal; font-weight: 700;
  line-height: 17px; text-align: center;
  box-shadow: 0 0 0 2px var(--paper);
}

.fab-feedback {
  position: fixed;
  right: 22px;
  bottom: 26px;
  z-index: 46;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 11px 16px 11px 13px;
  border: 0;
  border-radius: 999px;
  background: var(--accent);
  color: #fff8f2;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 12px 28px -12px rgba(194, 85, 47, .85), 0 2px 6px rgba(30, 37, 50, .12);
  transition: transform .15s, box-shadow .15s;
}
.fab-feedback:hover { transform: translateY(-2px); box-shadow: 0 16px 32px -12px rgba(194, 85, 47, .9); }
.fab-feedback .icon { width: 18px; height: 18px; }
.fab-feedback .fb-dot { top: -5px; right: -4px; }

.feedback-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr);
  gap: 20px;
  align-items: start;
}
.feedback-form { padding: 22px; display: grid; gap: 16px; }
.feedback-form textarea, .fb-reply-form textarea {
  width: 100%;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  padding: 10px 12px;
  font: inherit;
  font-size: 13.5px;
  line-height: 1.7;
  color: var(--ink);
  background: #fffdf9;
  outline: none;
  resize: vertical;
}
.feedback-form textarea:focus, .fb-reply-form textarea:focus {
  border-color: var(--ink-soft);
  box-shadow: 0 0 0 3px rgba(30, 37, 50, .08);
}

.fb-cats { display: flex; gap: 8px; flex-wrap: wrap; }
.fb-cats button {
  border: 1px solid var(--line-strong);
  background: #fffdf9;
  border-radius: 999px;
  padding: 6px 14px;
  font-size: 12.5px;
  color: var(--ink-soft);
  cursor: pointer;
}
.fb-cats button.on { background: var(--ink); border-color: var(--ink); color: #fbf8f0; font-weight: 600; }

.fb-rating { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.fb-rating-label { font-size: 11px; color: var(--muted); font-weight: 600; margin-right: 4px; }
.fb-star {
  border: 0; background: none; padding: 0 1px;
  font-size: 22px; line-height: 1;
  color: #d8d0c0; cursor: pointer;
  transition: color .12s, transform .12s;
}
.fb-star:hover { transform: scale(1.12); }
.fb-star.on { color: #e0a12a; }
.fb-rating-clear { border: 0; background: none; font-size: 11px; color: var(--muted); cursor: pointer; text-decoration: underline; }

.fb-attach:empty { display: none; }
.fb-thumbs { display: flex; gap: 8px; flex-wrap: wrap; }
.fb-thumb {
  position: relative;
  width: 84px; height: 84px;
  margin: 0;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: #fff;
}
.fb-thumb img { width: 100%; height: 100%; object-fit: cover; }
.fb-thumb-x {
  position: absolute; top: 3px; right: 3px;
  width: 20px; height: 20px;
  border: 0; border-radius: 50%;
  background: rgba(20, 24, 32, .72);
  color: #fff; font-size: 13px; line-height: 20px;
  cursor: pointer;
}
.fb-audio {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  background: var(--paper-deep);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 8px 10px;
}
.fb-audio audio { height: 34px; max-width: 240px; }
.fb-audio-meta { font-size: 12px; color: var(--muted); }

.fb-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.fb-actions .btn-solid { margin-left: auto; }
.fb-hint { font-size: 11px; color: var(--muted-2); line-height: 1.7; }

#fbRecord.recording { border-color: #e6b3ad; background: var(--red-soft); color: var(--red); font-weight: 600; }
.rec-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--red); display: inline-block;
  animation: recPulse 1s infinite;
}
@keyframes recPulse { 0%, 100% { opacity: 1; } 50% { opacity: .25; } }

.feedback-history { padding: 20px 22px; }
.fb-history-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 14px; }
.fb-history-head h2 { font-size: 16px; }
.fb-empty {
  display: grid; gap: 4px;
  padding: 26px 18px;
  text-align: center;
  border: 1px dashed var(--line-strong);
  border-radius: 14px;
  color: var(--muted);
  font-size: 12.5px;
}
.fb-empty b { color: var(--ink-soft); font-size: 13.5px; }

.fb-msg {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fffdf9;
  padding: 14px 16px;
  display: grid;
  gap: 9px;
}
.fb-msg + .fb-msg { margin-top: 10px; }
.fb-msg-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 11.5px; color: var(--muted); }
.fb-msg-head time { margin-left: auto; font-variant-numeric: tabular-nums; }
.fb-cat { background: var(--paper-deep); border-radius: 999px; padding: 2px 9px; font-size: 11px; font-weight: 600; color: var(--ink-soft); }
.fb-stars { color: #e0a12a; letter-spacing: 1px; font-size: 12px; }
.fb-msg-text { font-size: 13.5px; line-height: 1.75; white-space: pre-wrap; word-break: break-word; }
.fb-msg-imgs { display: flex; gap: 8px; flex-wrap: wrap; }
.fb-msg-imgs img { width: 96px; height: 96px; object-fit: cover; border-radius: 10px; border: 1px solid var(--line); }
.fb-msg-audio { display: flex; align-items: center; gap: 8px; font-size: 11.5px; color: var(--muted); }
.fb-msg-audio audio { height: 32px; max-width: 230px; }
.fb-replies { display: grid; gap: 6px; border-left: 3px solid var(--green); padding-left: 10px; }
.fb-reply-item { display: grid; gap: 1px; font-size: 12.5px; }
.fb-reply-item b { font-size: 11px; color: var(--green); }
.fb-reply-item small { color: var(--muted-2); font-size: 10.5px; }

.fb-status-new { background: var(--amber-soft); color: var(--amber); }
.fb-status-read { background: #eef1f6; color: var(--muted); }
.fb-status-done { background: var(--green-soft); color: var(--green); }

.fb-filters { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 14px; }
.fb-filters button {
  border: 1px solid var(--line-strong);
  background: #fffdf9;
  border-radius: 999px;
  padding: 5px 13px;
  font-size: 12px;
  color: var(--ink-soft);
  cursor: pointer;
}
.fb-filters button.on { background: var(--ink); border-color: var(--ink); color: #fbf8f0; }
.admin-feedback { display: grid; gap: 10px; }
.fb-user { font-weight: 700; color: var(--ink); font-size: 12.5px; }
.fb-user small { font-weight: 500; color: var(--muted); margin-left: 6px; font-size: 10.5px; }
.fb-admin-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.fb-reply-form { display: grid; gap: 8px; margin-top: 2px; }
.fb-reply-form .btn { justify-self: start; }

@media (max-width: 860px) {
  .feedback-layout { grid-template-columns: 1fr; }
  .fab-feedback { bottom: calc(78px + env(safe-area-inset-bottom)); right: 14px; }
  .btn-feedback span { display: none; }
  .btn-feedback { padding: 9px 11px; }
}
@media (max-width: 640px) {
  .fb-actions .btn-solid { margin-left: 0; width: 100%; }
  .fb-msg-imgs img { width: 78px; height: 78px; }
}
@media print {
  .fab-feedback, .btn-feedback { display: none !important; }
}

/* 顶部导航在中等宽度下收紧：先收起「手机扫码」（页脚还有入口），避免账号名被挤成竖排 */
@media (max-width: 1360px) {
  .topbar-actions .btn-ghost[data-open-qr] { display: none; }
  .nav { gap: 2px; }
  .nav a { padding: 8px 9px; font-size: 13.5px; }
}
body.on-feedback .fab-feedback { display: none; }
.lan-url-label {
  flex: 1;
  font-size: 11px;
  color: var(--ink-soft);
  background: var(--paper-deep);
  border-radius: 8px;
  padding: 8px 10px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ---------- 教材核对 ---------- */
.review-tabs { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
.rv-tab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--line-strong);
  background: #fffdf9;
  border-radius: 999px;
  padding: 8px 16px;
  font-size: 13px;
  color: var(--ink-soft);
  cursor: pointer;
}
.rv-tab small { font-size: 10.5px; color: var(--muted-2); }
.rv-tab.on { background: var(--ink); border-color: var(--ink); color: #fbf8f0; }
.rv-tab.on small { color: #cfc8b8; }
.rv-tab.pending:not(.on) { border-color: #e6c9a8; background: #fdf4e6; color: #8a5a1c; }
.rv-tab.confirmed:not(.on) { border-color: #c9e3d7; background: var(--green-soft); color: var(--green); }

.rv-panel { padding: 22px; }
.rv-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.rv-head h2 { font-size: 18px; }
.rv-sub { font-size: 12px; color: var(--muted); margin-top: 4px; }
.rv-tip { font-size: 12.5px; color: var(--ink-soft); line-height: 1.75; margin-top: 12px; }
.rv-summary { font-size: 12.5px; line-height: 1.75; margin-top: 10px; padding: 10px 12px; border-radius: 10px; background: var(--paper-deep); color: var(--ink-soft); }
.rv-note { font-size: 12px; color: var(--amber); margin-top: 8px; }
.rv-chip-pending { background: var(--amber-soft); color: var(--amber); }
.rv-chip-confirmed { background: var(--green-soft); color: var(--green); }

.rv-toolbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 16px 0 10px; }
.rv-count { font-size: 12px; color: var(--muted); margin-left: auto; }
.rv-analyzing { font-size: 12.5px; color: var(--blue); margin-bottom: 10px; }

.rv-list { display: grid; gap: 8px; }
.rv-row {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) 44px 26px;
  gap: 8px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fffdf9;
  padding: 8px 10px;
}
.rv-row.off { opacity: .5; background: var(--paper-deep); }
.rv-row.added { border-color: #c9e3d7; background: #f4fbf7; }
.rv-check { display: grid; place-items: center; }
.rv-check input { width: 16px; height: 16px; accent-color: var(--ink); }
.rv-fields { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr) minmax(0, 1.4fr); gap: 6px; }
.rv-fields input {
  width: 100%;
  border: 1px solid transparent;
  background: transparent;
  border-radius: 7px;
  padding: 6px 8px;
  font: inherit;
  font-size: 12.5px;
  color: var(--ink);
  outline: none;
}
.rv-fields input:hover { border-color: var(--line); }
.rv-fields input:focus { border-color: var(--line-strong); background: #fff; box-shadow: 0 0 0 3px rgba(30, 37, 50, .06); }
.rv-source { font-size: 10.5px; color: var(--green); text-align: right; }
.rv-del { border: 0; background: none; color: var(--muted-2); font-size: 18px; line-height: 1; cursor: pointer; }
.rv-del:hover { color: var(--red); }

.rv-confirm {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px dashed var(--line-strong);
}
.rv-ack { display: inline-flex; align-items: center; gap: 7px; font-size: 12.5px; color: var(--ink-soft); cursor: pointer; }
.rv-ack input { width: 16px; height: 16px; accent-color: var(--ink); }
.rv-confirm .btn-solid { margin-left: auto; }

.rv-empty {
  display: grid;
  gap: 6px;
  justify-items: start;
  padding: 26px;
  color: var(--muted);
  font-size: 13px;
}
.rv-empty b { color: var(--ink); font-size: 14px; }
.rv-empty .btn { margin-top: 8px; }

.banner-review { background: linear-gradient(120deg, #fff1e2, #fffdf9 60%); border-color: #efcfae; }

@media (max-width: 720px) {
  .rv-fields { grid-template-columns: 1fr; }
  .rv-row { grid-template-columns: 24px minmax(0, 1fr) 22px; }
  .rv-source { display: none; }
  .rv-confirm .btn-solid { margin-left: 0; width: 100%; }
}
body.on-review .fab-feedback { display: none; }

/* ---------- 识别失败与照片回显 ---------- */
.rec-tag.error, .state-chip.error { background: var(--red-soft); color: var(--red); }
.banner-error { background: linear-gradient(120deg, #fdeceb, #fffdf9 60%); border-color: #eec5c1; }
.recent-failed { --c: var(--red); }
.recent-failed .recent-arrow { color: var(--red); font-size: 11px; white-space: nowrap; }
.as-photo { margin: 12px 0 4px; }
.as-photo img { width: 100%; max-height: 260px; object-fit: contain; border-radius: 12px; border: 1px solid var(--line); background: #fff; }

/* ---------- 错题本 ---------- */
.nav-count {
  position: absolute;
  top: 2px;
  right: 2px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 8px;
  background: var(--red);
  color: #fff;
  font-size: 10px;
  font-style: normal;
  font-weight: 700;
  line-height: 16px;
  text-align: center;
  box-shadow: 0 0 0 2px var(--paper);
}
.quick-badge {
  display: inline-block;
  min-width: 17px;
  height: 17px;
  padding: 0 5px;
  margin-left: 4px;
  border-radius: 9px;
  background: var(--red);
  color: #fff;
  font-size: 10px;
  font-style: normal;
  line-height: 17px;
  text-align: center;
  vertical-align: 1px;
}

.mk-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-bottom: 16px; }
.mk-stat { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; }
.mk-stat b { display: block; font-size: 22px; line-height: 1.2; }
.mk-stat span { font-size: 11.5px; color: var(--muted); }
.mk-stat.due b { color: var(--red); }
.mk-stat.mastered b { color: var(--green); }

.mk-toolbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.mk-toolbar .seg { margin: 0; }
.mk-subject {
  appearance: none;
  border: 1px solid var(--line-strong);
  background: #fffdf9;
  border-radius: 999px;
  padding: 6px 12px;
  font: inherit;
  font-size: 12px;
  color: var(--ink-soft);
}
.mk-toolbar #mkStart { margin-left: auto; }

.mk-list { display: grid; gap: 10px; }
.mk-card { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 14px 16px; display: grid; gap: 10px; }
.mk-card-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 11.5px; color: var(--muted); }
.mk-card-head time { margin-left: auto; font-variant-numeric: tabular-nums; }
.mk-subject { background: var(--paper-deep); border-radius: 999px; padding: 2px 9px; font-weight: 600; color: var(--ink-soft); }
.mk-point { font-family: var(--mono); font-size: 10.5px; color: var(--muted); }
.mk-status { border-radius: 999px; padding: 2px 9px; font-size: 10.5px; font-weight: 600; }
.mk-status.due { background: var(--red-soft); color: var(--red); }
.mk-status.scheduled { background: var(--amber-soft); color: var(--amber); }
.mk-status.done { background: var(--green-soft); color: var(--green); }

.mk-card-body { display: grid; grid-template-columns: 110px minmax(0, 1fr); gap: 12px; align-items: start; }
.mk-photo img { width: 110px; height: 110px; object-fit: cover; border-radius: 10px; border: 1px solid var(--line); }
.mk-detail { display: grid; gap: 4px; font-size: 12.5px; line-height: 1.7; }
.mk-detail p { margin: 0; }
.mk-correct { color: var(--green); }
.mk-reason { color: var(--amber); }
.mk-fix { color: var(--ink-soft); }
.mk-note { color: var(--muted); }

.mk-card-foot { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 11px; color: var(--muted); border-top: 1px dashed var(--line); padding-top: 9px; }
.mk-actions { margin-left: auto; display: flex; gap: 4px; flex-wrap: wrap; }

.mk-empty { display: grid; gap: 6px; justify-items: start; padding: 30px 24px; border: 1px dashed var(--line-strong); border-radius: 16px; color: var(--muted); font-size: 13px; }
.mk-empty b { color: var(--ink); font-size: 15px; }
.mk-empty .btn { margin-top: 8px; }

.mk-review { display: grid; gap: 12px; }
.mk-review-head { display: flex; justify-content: space-between; gap: 10px; font-size: 12px; color: var(--muted); }
.mk-review-photo { width: 100%; max-height: 300px; object-fit: contain; border-radius: 12px; border: 1px solid var(--line); background: #fff; }
.mk-review-q { font-size: 14px; line-height: 1.8; }
.mk-review-answer { background: var(--green-soft); border-radius: 12px; padding: 10px 12px; font-size: 13px; line-height: 1.8; display: grid; gap: 4px; }
.mk-review-actions { display: flex; gap: 8px; flex-wrap: wrap; }

@media (max-width: 640px) {
  .mk-stats { grid-template-columns: repeat(2, 1fr); }
  .mk-card-body { grid-template-columns: 1fr; }
  .mk-photo img { width: 100%; height: 160px; }
  .mk-toolbar #mkStart { margin-left: 0; width: 100%; }
}

/* ---------- 本周变化 / 趋势 / 导出 ---------- */
.week-change {
  margin: 18px 0 6px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 14px 18px;
}
.week-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 8px; }
.week-head b { font-size: 14px; }
.week-head span { font-size: 11px; color: var(--muted); font-variant-numeric: tabular-nums; }
.week-grid { display: flex; gap: 18px; flex-wrap: wrap; font-size: 12.5px; color: var(--ink-soft); }
.week-grid b { font-size: 16px; color: var(--ink); margin: 0 2px; }
.week-grid i { font-style: normal; font-size: 11px; margin-left: 2px; }
.week-grid i.up { color: var(--green); }
.week-grid i.down { color: var(--red); }

.trend-panel { margin-top: 18px; padding: 18px 20px; }
.trend-svg { width: 100%; height: auto; display: block; margin-top: 6px; }

.export-actions { display: flex; gap: 8px; flex-wrap: wrap; margin: 8px 0 18px; }

/* ---------- 变式题 ---------- */
.mk-variants { display: grid; gap: 10px; }
.mk-variant-loading { color: var(--muted); font-size: 13px; line-height: 1.8; }
.variant-list { display: grid; gap: 14px; padding-left: 20px; }
.variant-item { display: grid; gap: 6px; }
.variant-q { font-size: 13.5px; line-height: 1.8; }
.variant-answer { background: var(--paper-deep); border-radius: 10px; padding: 8px 10px; font-size: 12.5px; line-height: 1.8; display: grid; gap: 4px; }

/* ---------- 多孩子 ---------- */
.nu-child {
  appearance: none;
  border: 1px solid var(--line-strong);
  background: #fffdf9;
  border-radius: 999px;
  padding: 4px 8px;
  font: inherit;
  font-size: 11.5px;
  color: var(--ink-soft);
  max-width: 110px;
}
.child-list { display: grid; gap: 8px; margin-bottom: 10px; }
.child-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px 12px;
  background: #fffdf9;
}
.child-row.on { border-color: var(--ink); background: var(--paper-deep); }
.child-name b { font-size: 13.5px; }
.child-name small { color: var(--muted); margin-left: 6px; font-size: 11px; }
.child-actions { display: flex; align-items: center; gap: 4px; }
.child-add { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
.child-add input {
  border: 1px solid var(--line-strong);
  border-radius: 9px;
  padding: 8px 10px;
  font: inherit;
  font-size: 13px;
  background: #fffdf9;
  min-width: 140px;
}
.invite-code {
  font-family: var(--mono);
  font-size: 28px;
  letter-spacing: 6px;
  text-align: center;
  background: var(--paper-deep);
  border-radius: 12px;
  padding: 16px;
  margin: 12px 0;
}

/* ---------- 通知 ---------- */
.nav-bell { position: relative; padding: 9px 10px; }
.nav-bell .nav-count { top: 0; right: 0; }
.notif-list { display: grid; gap: 8px; max-height: 60vh; overflow: auto; }
.notif-item {
  text-align: left;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px 12px;
  background: #fffdf9;
  display: grid;
  gap: 3px;
  cursor: pointer;
}
.notif-item.read { opacity: .6; }
.notif-item b { font-size: 13px; }
.notif-item span { font-size: 12px; color: var(--muted); }
.notif-item time { font-size: 10.5px; color: var(--muted-2); }
.notif-empty { color: var(--muted); font-size: 13px; }

/* ---------- 英语跟读/听写 ---------- */
.en-panel { padding: 20px; margin-bottom: 16px; }
.en-block { display: grid; gap: 12px; }
.en-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.en-rating { display: flex; gap: 6px; align-items: center; font-size: 12px; color: var(--muted); }
.en-rating .btn.on { background: var(--ink); color: #fff; }
.en-hint { font-size: 11.5px; color: var(--muted); line-height: 1.7; }
.en-history { padding: 18px 20px; }
.en-record { display: flex; gap: 10px; align-items: center; border-bottom: 1px dashed var(--line); padding: 8px 0; font-size: 12.5px; }
.en-type { background: var(--paper-deep); border-radius: 999px; padding: 2px 8px; font-size: 11px; }
.en-text { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.en-meta { color: var(--muted); font-size: 11px; }

/* ---------- 班级概览 ---------- */
.class-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.class-head b { font-size: 15px; }
.class-head span { font-size: 12px; color: var(--muted); }
.class-tbl td:first-child { font-weight: 600; }

/* ---------- 作文评分量表 ---------- */
.essay-rubric { margin: 12px 0; }
.essay-rubric h4 { font-size: 13px; margin-bottom: 8px; }
.essay-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.essay-dim { border: 1px solid var(--line); border-radius: 12px; padding: 10px; background: #fffdf9; display: grid; gap: 3px; }
.essay-dim b { font-size: 12.5px; }
.essay-dim span { font-size: 11px; color: var(--muted); }
.essay-dim small { font-size: 10.5px; color: var(--muted-2); line-height: 1.5; }
.essay-dim.right { border-color: #c9e3d7; background: var(--green-soft); }
.essay-dim.wrong { border-color: #eec5c1; background: var(--red-soft); }
.essay-dim.unclear { border-color: #e6d3b3; background: var(--amber-soft); }
@media (max-width: 640px) { .essay-grid { grid-template-columns: repeat(2, 1fr); } }

/* ---------- 前置链小图 ---------- */
.chain-graph { width: 100%; height: auto; display: block; margin: 4px 0 10px; background: #fffdf9; border: 1px solid var(--line); border-radius: 12px; }

/* ---------- 批改置信度/复核 ---------- */
.as-lowconf {
  display: inline-block;
  margin-left: 5px;
  padding: 1px 5px;
  border-radius: 999px;
  background: var(--amber-soft);
  color: #8a5a12;
  font-size: 10px;
  font-weight: 600;
  vertical-align: 1px;
}
.as-work {
  color: var(--muted-2);
  font-size: 10.5px;
  line-height: 1.6;
  margin-top: 4px;
}
.as-disputed {
  display: inline-block;
  margin-left: 5px;
  padding: 1px 5px;
  border-radius: 999px;
  background: var(--red-soft);
  color: #9b2c24;
  font-size: 10px;
  font-weight: 600;
  vertical-align: 1px;
}

/* ---------- P2：状态类/移动端字号 ---------- */
.rv-tab.missing:not(.on) { border-color: #e6c9a8; background: #fdf4e6; color: #8a5a1c; }
.rv-tab.draft:not(.on) { border-color: #e6c9a8; background: #fdf4e6; color: #8a5a1c; }
.rv-tab.published:not(.on) { border-color: #c9e3d7; background: var(--green-soft); color: var(--green); }
.rv-tab.builtin:not(.on) { border-color: var(--line-strong); background: var(--paper-deep); color: var(--ink-soft); }
@media (max-width: 640px) {
  input, textarea, select { font-size: 16px; }
}

/* ---------- 分页 ---------- */
.load-more { display: flex; justify-content: center; padding: 14px 0 4px; }
.kp-row:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }

/* ---------- 题库 / 异议 ---------- */
.as-bank {
  margin-top: 6px;
  font-size: 11px;
  line-height: 1.6;
  background: var(--blue-soft, #edf3ff);
  border-radius: 8px;
  padding: 5px 8px;
  color: #2f4f86;
}
.as-bank-warn { display: block; color: #9b2c24; margin-top: 2px; }
.as-actions { display: flex; gap: 4px; flex-wrap: wrap; margin-top: 4px; }
.dispute-box { background: var(--paper-deep); border-radius: 10px; padding: 10px 12px; display: grid; gap: 6px; margin-bottom: 12px; }
.dispute-box .kv { display: flex; gap: 8px; font-size: 12px; line-height: 1.6; }
.dispute-box .k { color: var(--muted); width: 64px; flex: none; }
.dispute-box .v { flex: 1; }
.bank-row { border-bottom: 1px dashed var(--line); padding: 8px 0; font-size: 12.5px; line-height: 1.65; }
.bank-row:last-child { border-bottom: 0; }
.bank-stem { font-weight: 600; }
.bank-answer { color: #1c7a5b; }
.bank-meta { color: var(--muted); font-size: 11px; }

/* ---------- 题库页面 ---------- */
.bk-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-bottom: 14px; }
.bk-stat { background: #fffdf9; border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; }
.bk-stat b { display: block; font-size: 22px; font-weight: 800; letter-spacing: -.02em; }
.bk-stat span { font-size: 11.5px; color: var(--muted); }
.bk-stat.good b { color: var(--green); }
.bk-stat.warn b { color: #8a5a1c; }
.bk-stat.bad b { color: var(--red); }
.bk-search {
  width: 100%;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  padding: 9px 12px;
  font: inherit;
  font-size: 13px;
  background: #fffdf9;
  margin-bottom: 14px;
}
.bk-panel { padding: 18px 20px; margin-bottom: 16px; }
.bk-panel h3 { font-size: 15px; margin-bottom: 10px; }
.bk-head { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.bk-head h3 { margin: 0; }
.bk-item { border-bottom: 1px dashed var(--line); padding: 10px 0; }
.bk-item:last-child { border-bottom: 0; }
.bk-stem { font-size: 13px; font-weight: 600; line-height: 1.6; }
.bk-answer { font-size: 12.5px; color: var(--green); margin-top: 3px; line-height: 1.6; }
.bk-meta { display: flex; gap: 5px; flex-wrap: wrap; margin-top: 6px; }
.bk-note { font-size: 11.5px; color: var(--amber); margin-top: 4px; }
.bk-kv { display: flex; gap: 8px; font-size: 12.5px; line-height: 1.6; margin-top: 4px; }
.bk-kv .k { color: var(--muted); flex: none; width: 64px; }
.bk-kv .v { flex: 1; }
.bk-edit-row { display: flex; gap: 6px; margin-top: 8px; flex-wrap: wrap; }
.bk-input {
  flex: 1;
  min-width: 160px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  padding: 7px 10px;
  font: inherit;
  font-size: 12.5px;
  background: #fffdf9;
}
@media (max-width: 640px) {
  .bk-stats { grid-template-columns: repeat(2, 1fr); }
}

/* ---------- 我的题库：结题思路 ---------- */
.bk-approaches { margin-top: 8px; padding: 8px 10px; background: var(--paper-deep); border-radius: 10px; }
.bk-approaches-title { font-size: 11.5px; font-weight: 600; color: var(--ink-soft); margin-bottom: 4px; }
.bk-approach { display: flex; flex-direction: column; gap: 1px; padding: 3px 0; border-top: 1px dashed var(--line); }
.bk-approach:first-of-type { border-top: 0; }
.bk-approach-text { font-size: 12px; line-height: 1.6; }
.bk-approach-by { font-size: 10.5px; color: var(--muted-2); }

/* ---------- 今天 ---------- */
.today-panel {
  margin: 18px 0 6px;
  border: 1px solid rgba(194, 85, 47, .22);
  background: linear-gradient(160deg, #fffdf9 0%, #fdf5ec 100%);
  border-radius: 16px;
  padding: 16px 18px;
}
.today-head { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; }
.today-title { font-size: 16px; font-weight: 800; letter-spacing: -.01em; }
.today-sub { font-size: 12px; color: var(--muted); }
.today-list { display: grid; gap: 8px; }
.today-item { display: flex; align-items: center; gap: 10px; }
.today-check {
  width: 26px; height: 26px; flex: none;
  border-radius: 50%; border: 1px solid var(--line-strong);
  background: #fffdf9; color: var(--muted);
  font-size: 12px; font-weight: 700; cursor: pointer;
}
.today-item.done .today-check { background: var(--green); border-color: var(--green); color: #fff; }
.today-body { flex: 1; min-width: 0; cursor: pointer; }
.today-item-title { font-size: 13.5px; font-weight: 600; }
.today-item.done .today-item-title { text-decoration: line-through; color: var(--muted); }
.today-item-detail { font-size: 11.5px; color: var(--muted); line-height: 1.6; }
.today-link { font-size: 12px; color: var(--accent); text-decoration: none; flex: none; }
.today-all-done { margin-top: 8px; font-size: 12px; color: var(--green); }

/* ---------- 错题重做 ---------- */
.mk-card .mk-actions .btn-solid { min-width: 60px; }

/* ---------- 给我讲讲 ---------- */
.explain h3 { margin-bottom: 10px; }
.ex-block { margin-bottom: 10px; }
.ex-block b { display: block; font-size: 11.5px; color: var(--muted); margin-bottom: 3px; }
.ex-block p { font-size: 14px; line-height: 1.75; }
.ex-steps { margin: 4px 0 0 18px; display: grid; gap: 4px; }
.ex-steps li { font-size: 13.5px; line-height: 1.7; }
.ex-tip { background: var(--amber-soft); color: #8a5a1c; border-radius: 10px; padding: 8px 10px; font-size: 12.5px; line-height: 1.7; margin-bottom: 10px; }
.ex-practice { background: var(--paper-deep); border-radius: 12px; padding: 10px 12px; }
.ex-q { font-size: 14px; font-weight: 600; margin-bottom: 6px; }
.ex-answer { margin-top: 6px; font-size: 13px; color: var(--green); }

/* ---------- 行动打卡 / 复盘 ---------- */
.plan-check {
  margin-top: 10px; width: 100%;
  border: 1px dashed var(--line-strong); background: transparent;
  border-radius: 10px; padding: 7px 10px;
  font: inherit; font-size: 12px; color: var(--muted); cursor: pointer;
}
.plan-check.on { border-style: solid; border-color: var(--green); background: var(--green-soft); color: var(--green); font-weight: 600; }
.plan-review { padding: 16px 18px; margin: 16px 0 4px; }
.plan-review-head { display: flex; align-items: baseline; gap: 10px; margin-bottom: 10px; }
.plan-review-head b { font-size: 15px; }
.plan-review-head span { font-size: 12px; color: var(--muted); }
.plan-review-rows { display: grid; gap: 6px; }
.plan-review-row { position: relative; display: flex; align-items: center; gap: 8px; font-size: 12.5px; padding: 4px 0; }
.pr-bar { position: absolute; left: 0; bottom: 0; height: 3px; width: var(--w, 0); background: var(--accent); border-radius: 2px; opacity: .35; }
.pr-title { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pr-days { color: var(--muted); font-variant-numeric: tabular-nums; }
.plan-review-advice { margin-top: 10px; font-size: 12.5px; color: var(--ink-soft); line-height: 1.7; }

/* 管理员查看指定用户上传 */
.admin-uploads{position:fixed;inset:0;z-index:60;background:rgba(24,20,14,.72);display:flex;flex-direction:column;padding:16px;gap:10px;overflow:auto}
.admin-uploads .au-head{display:flex;align-items:center;gap:12px;background:#fff;border-radius:12px;padding:10px 14px}
.admin-uploads .au-head b{flex:1;font-size:15px}
.admin-uploads .au-head span{color:#7a6f5f;font-size:13px}
.admin-uploads .au-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(150px,1fr));gap:10px}
.admin-uploads .au-item{margin:0;background:#fff;border-radius:10px;overflow:hidden}
.admin-uploads .au-item img{display:block;width:100%;height:130px;object-fit:cover}
.admin-uploads figcaption{padding:6px 8px;font-size:12px;color:#5c5346;line-height:1.4}
.admin-uploads figcaption em{display:block;font-style:normal;color:#8a7f6d;margin-top:2px}
.admin-uploads .au-date{display:block;color:#a99f8d;font-size:11px}
.admin-uploads .au-empty{color:#fff;text-align:center;padding:24px}
.admin-profile-form{background:#fff;border-radius:12px;padding:16px;display:grid;grid-template-columns:repeat(auto-fill,minmax(220px,1fr));gap:12px;max-width:900px;width:100%;margin:0 auto}
.admin-profile-form .field{display:flex;flex-direction:column;gap:4px;font-size:13px}
.admin-profile-form input{padding:8px 10px;border:1px solid #ddd5c6;border-radius:8px;font-size:14px}
.admin-profile-form .ap-actions{grid-column:1/-1;display:flex;justify-content:flex-end}

/* 批改进度条 */
.an-progress{background:#fff;border:1px solid #e8dfd0;border-radius:12px;padding:10px 14px;margin-bottom:12px}
.an-progress-top{display:flex;justify-content:space-between;align-items:baseline;font-size:13px;color:#5c5346;gap:10px}
.an-progress-top b{font-size:14px;color:#2f2a22}
.an-progress-bar{height:8px;border-radius:999px;background:#efe8db;overflow:hidden;margin:8px 0 6px}
.an-progress-bar i{display:block;height:100%;border-radius:999px;background:linear-gradient(90deg,#2f6df6,#5b8cf8);transition:width .4s ease}
.an-progress .fineprint{margin:0;font-size:11.5px;color:#8a7f6d}

/* 手动摆正按钮 */
.shot-act.rot{font-size:15px;line-height:1}

/* 原图查看浮层 */
.zoom-layer{position:fixed;inset:0;z-index:60;background:rgba(18,16,12,.92);display:flex;flex-direction:column}
.zoom-bar{display:flex;gap:8px;align-items:center;justify-content:center;padding:10px;flex-wrap:wrap}
.zoom-bar .zoom-pct{color:#f4efe4;font-size:13px;min-width:52px;text-align:center}
.zoom-stage{flex:1;overflow:auto;display:flex;align-items:center;justify-content:center;padding:12px}
.zoom-stage img{max-width:100%;max-height:100%;transform-origin:center center;transition:transform .12s ease;cursor:zoom-in;background:#fff}

/* 识别不确定处：红色问号 */
mark.q-unknown{background:#ffe3e0;color:#c0392b;font-weight:700;border-radius:3px;padding:0 2px}
.as-raw{margin-top:4px;font-size:11.5px;color:#7a6f5f;line-height:1.5;word-break:break-all}
.as-raw-hint{margin-top:3px;font-size:11px;color:#c0392b}

/* 错因标签：书写用醒目色，便于和"过程不完整"区分 */
.as-cause{display:inline-block;margin-left:6px;padding:1px 7px;border-radius:999px;font-size:11px;font-weight:600;background:#eef2f8;color:#3b5b8c;vertical-align:middle}
.as-cause[data-cause="书写"]{background:#fde8f3;color:#b3246e}
.as-cause[data-cause="计算"]{background:#fff0e0;color:#a35b00}
.as-cause[data-cause="审题"]{background:#e6f6f1;color:#0d6b52}
.as-cause[data-cause="概念"]{background:#e8eefc;color:#2a4fa8}
.as-cause[data-cause="方法"]{background:#f0e9fb;color:#5b3ba8}
.as-cause[data-cause="表述"]{background:#fbf1e3;color:#8a5a1a}
.as-cause[data-cause="习惯"]{background:#eef0f2;color:#57606a}

/* 批改详情：图片可点、全屏、正确答案与建议更突出 */
.as-photo-img{cursor:zoom-in}
.as-fs-btn{margin-left:10px;vertical-align:middle;font-size:11px;padding:3px 10px}
.modal-card.as-fullscreen{width:96vw;max-width:96vw;height:92vh;max-height:92vh;overflow:auto}
.modal-card.as-fullscreen .as-table td{font-size:14.5px}
.as-table td[data-label="正确答案 / 怎么补"]{font-size:14.5px;font-weight:600;color:#2f2a22}
.as-table td[data-label="正确答案 / 怎么补"] .as-work{font-weight:400}
.analysis-advice li{font-size:15px;line-height:1.9;font-weight:600;color:#2f2a22}
.analysis-block h4{font-size:14px}

/* 每日任务 */
.daily-tasks{margin:14px 0 18px;background:#fff;border:1px solid #e8dfd0;border-radius:14px;padding:14px 16px}
.dt-head{display:flex;align-items:baseline;gap:12px;margin-bottom:10px;flex-wrap:wrap}
.dt-head b{font-size:15px}
.dt-head span{font-size:12px;color:#8a7f6d}
.dt-sum{margin-left:auto;font-weight:600;color:#2f6df6}
.dt-row{padding:8px 0;border-top:1px dashed #efe7d8}
.dt-row:first-of-type{border-top:0}
.dt-main{display:flex;align-items:center;gap:8px}
.dt-title{font-size:14px;font-weight:600;color:#2f2a22}
.dt-num{margin-left:auto;font-size:12.5px;color:#8a7f6d}
.dt-badge{font-size:11px;padding:1px 8px;border-radius:999px}
.dt-badge.ok{background:#e8f6ee;color:#1c7a4a}
.dt-badge.todo{background:#fdeceb;color:#b3392f}
.dt-bar{height:6px;border-radius:999px;background:#f2ebdd;overflow:hidden;margin-top:6px}
.dt-bar i{display:block;height:100%;background:linear-gradient(90deg,#7aa7f5,#2f6df6);border-radius:999px;transition:width .3s}
.dt-points{display:flex;flex-wrap:wrap;gap:8px;margin-top:8px}
.dt-point{display:flex;align-items:center;gap:5px;font-size:12px;background:#f7f3ea;border-radius:999px;padding:3px 9px}

/* 庆祝画面 */
.celebrate-layer{position:fixed;inset:0;z-index:90;background:rgba(20,16,10,.55);display:grid;place-items:center;overflow:hidden}
.celebrate-card{position:relative;background:#fffdf7;border-radius:18px;padding:34px 42px;text-align:center;box-shadow:0 24px 60px rgba(0,0,0,.28);max-width:90vw}
.celebrate-emoji{font-size:44px;line-height:1}
.celebrate-card h3{margin:8px 0 6px;font-size:20px}
.celebrate-card p{margin:0 0 16px;color:#7a6f5f;font-size:13.5px}
.celebrate-confetti i{position:absolute;top:-10px;width:8px;height:14px;border-radius:2px;animation-name:celebrate-fall;animation-timing-function:linear;animation-iteration-count:infinite}
@keyframes celebrate-fall{0%{transform:translateY(-20px) rotate(0)}100%{transform:translateY(110vh) rotate(540deg)}}

/* 今天面板：自动任务徽标 */
.today-badge{font-size:11px;padding:1px 8px;border-radius:999px;margin-left:6px;vertical-align:middle}
.today-badge.ok{background:#e8f6ee;color:#1c7a4a}
.today-badge.todo{background:#fdeceb;color:#b3392f}
.today-num{font-size:12px;color:#8a7f6d;margin-left:6px}
.today-check.today-auto{display:inline-grid;place-items:center;color:#8a7f6d;font-weight:700}
.today-check.today-auto.ok{color:#1c7a4a}

/* 多页角色标注：题干页 / 作答页（可选） */
.batch-roles { margin-top: 10px; display: grid; gap: 6px; }
.batch-roles .br-row {
  display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--ink-soft);
  background: #fbf7ef; border: 1px solid #eee3d2; border-radius: 9px; padding: 6px 9px;
}
.batch-roles .br-row b { font-weight: 600; color: var(--ink); min-width: 52px; }
.batch-roles select {
  font: inherit; font-size: 12px; padding: 3px 6px; border-radius: 6px;
  border: 1px solid #ddd2bf; background: #fff; color: var(--ink);
}
.batch-roles .br-tip { font-size: 11px; color: var(--muted); }

/* 题库题干截图 */
.bk-item { position: relative; }
.bk-thumb { float: right; margin: 0 0 8px 10px; display: block; }
.bk-thumb img {
  width: 96px; height: 72px; object-fit: cover; border-radius: 8px;
  border: 1px solid #e6dccb; background: #faf7f0;
}

/* 管理页：识别模型快捷选择 */
.model-preset { margin-bottom: 6px; font-size: 12px; padding: 5px 7px; border-radius: 7px; border: 1px solid #ddd2bf; background: #fff; }
