/* ============================================================
   数学分析 · 智学平台  —  iOS 风格设计系统
   ============================================================ */

:root {
  --tint: #007aff;
  --tint-soft: rgba(0, 122, 255, .12);
  --green: #34c759;
  --green-soft: rgba(52, 199, 89, .14);
  --red: #ff3b30;
  --red-soft: rgba(255, 59, 48, .12);
  --orange: #ff9f0a;
  --orange-soft: rgba(255, 159, 10, .14);
  --purple: #bf5af2;
  --teal: #30d1c9;

  --bg: #f2f2f7;
  --card: #ffffff;
  --card-2: #f7f7fa;
  --label: #0a0a0c;
  --label-2: #6b6b75;
  --label-3: #a2a2ac;
  --sep: rgba(60, 60, 67, .12);
  --sep-strong: rgba(60, 60, 67, .22);
  --fill: rgba(118, 118, 128, .10);
  --fill-2: rgba(118, 118, 128, .16);
  --glass: rgba(249, 249, 251, .88);
  --glass-strong: rgba(255, 255, 255, .92);

  --shadow-s: 0 1px 2px rgba(17, 19, 42, .04), 0 4px 14px rgba(17, 19, 42, .05);
  --shadow-m: 0 2px 6px rgba(17, 19, 42, .05), 0 14px 32px -10px rgba(17, 19, 42, .16);
  --shadow-l: 0 26px 60px -22px rgba(17, 19, 42, .38);

  --ease: cubic-bezier(.32, .72, 0, 1);
  --ease-out: cubic-bezier(.22, 1, .36, 1);
  --font-scale: 1;
}

[data-theme="dark"] {
  --bg: #000000;
  --card: #1c1c1e;
  --card-2: #2c2c2e;
  --label: #ffffff;
  --label-2: #9d9da6;
  --label-3: #63636b;
  --sep: rgba(120, 120, 128, .22);
  --sep-strong: rgba(120, 120, 128, .38);
  --fill: rgba(120, 120, 128, .22);
  --fill-2: rgba(120, 120, 128, .34);
  --glass: rgba(24, 24, 26, .84);
  --glass-strong: rgba(28, 28, 30, .9);
  --tint: #0a84ff;
  --tint-soft: rgba(10, 132, 255, .18);
  --green-soft: rgba(48, 209, 88, .18);
  --red-soft: rgba(255, 69, 58, .18);
  --orange-soft: rgba(255, 179, 64, .18);

  --shadow-s: 0 1px 2px rgba(0, 0, 0, .4);
  --shadow-m: 0 10px 28px -12px rgba(0, 0, 0, .8);
  --shadow-l: 0 30px 60px -24px rgba(0, 0, 0, .9);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html, body { height: 100%; margin: 0; }

body {
  /* 拉丁字母与数字统一 Times New Roman，汉字回落到系统黑体 */
  font-family: "Times New Roman", Times, "PingFang SC",
               "HarmonyOS Sans SC", "Microsoft YaHei UI", "Microsoft YaHei", system-ui, sans-serif;
  color: var(--label);
  background: #e9e9ee;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  transition: background .4s ease;
}

[data-theme="dark"] body { background: #08080a; }

/* ---------- 桌面装饰背景 ---------- */
.stage { position: fixed; inset: 0; overflow: hidden; pointer-events: none; z-index: 0; }
.orb { position: absolute; border-radius: 50%; filter: blur(70px); opacity: .55; }
.orb-a { width: 46vw; height: 46vw; left: -10vw; top: -8vw;
         background: radial-gradient(circle at 30% 30%, #7fb6ff, #5e5ce6 70%); }
.orb-b { width: 40vw; height: 40vw; right: -8vw; bottom: -10vw;
         background: radial-gradient(circle at 40% 40%, #ffb3c7, #bf5af2 72%); opacity: .38; }
.orb-c { width: 26vw; height: 26vw; right: 12vw; top: 6vh;
         background: radial-gradient(circle at 50% 50%, #9df3c4, #30d1c9 70%); opacity: .3; }
[data-theme="dark"] .orb { opacity: .28; }

/* ---------- 应用外壳 ---------- */
.app {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 460px;
  height: 100dvh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  overflow: hidden;
  transition: background .4s ease;
}

@media (min-width: 680px) and (min-height: 700px) {
  .app {
    height: min(900px, 96dvh);
    border-radius: 46px;
    box-shadow: 0 50px 100px -40px rgba(20, 22, 60, .45), 0 0 0 10px rgba(255, 255, 255, .5);
  }
  [data-theme="dark"] .app {
    box-shadow: 0 50px 100px -40px rgba(0, 0, 0, .9), 0 0 0 10px rgba(255, 255, 255, .05);
  }
}

.views { position: relative; flex: 1; overflow: hidden; }

/* ---------- 屏幕与滚动 ---------- */
.screen {
  position: absolute;
  inset: 0;
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
  scrollbar-width: none;
  padding-bottom: calc(96px + env(safe-area-inset-bottom, 0px));
}
.screen::-webkit-scrollbar { display: none; }
.screen.is-fullscreen { padding-bottom: calc(28px + env(safe-area-inset-bottom, 0px)); }

@keyframes screenIn { from { opacity: 0; transform: translate3d(26px, 0, 0) scale(.985); }
                      to   { opacity: 1; transform: none; } }
@keyframes screenBack { from { opacity: 0; transform: translate3d(-22px, 0, 0) scale(.99); }
                        to   { opacity: 1; transform: none; } }
.screen.anim-in  { animation: screenIn .42s var(--ease-out) both; }
.screen.anim-back { animation: screenBack .38s var(--ease-out) both; }

/* ---------- 页头 ---------- */
.screen-head {
  position: sticky;
  top: 0;
  z-index: 12;
  padding-top: env(safe-area-inset-top, 0px);
  background-color: transparent;
  border-bottom: .5px solid transparent;
  transition: background-color .28s ease, border-color .28s ease;
}
.screen-head.is-stuck {
  background-color: var(--glass);
  -webkit-backdrop-filter: blur(22px) saturate(180%);
  backdrop-filter: blur(22px) saturate(180%);
  border-bottom-color: var(--sep);
}

.head-bar {
  position: relative;
  height: 46px;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0 12px;
  z-index: 1;
}
.head-bar-title {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  font-size: 15.5px;
  font-weight: 600;
  letter-spacing: -.01em;
  opacity: 0;
  transition: opacity .25s ease;
  white-space: nowrap;
  pointer-events: none;
}
.screen-head.is-stuck .head-bar-title { opacity: 1; }

.head-title {
  position: relative;
  padding: 2px 20px 4px;
  z-index: 1;
}
.head-title h1 {
  margin: 0;
  font-size: 32px;
  line-height: 1.18;
  font-weight: 800;
  letter-spacing: -.028em;
}
.head-title .head-sub {
  margin: 6px 0 0;
  font-size: 13.5px;
  color: var(--label-2);
  line-height: 1.5;
  letter-spacing: -.005em;
}

/* ---------- 图标按钮 ---------- */
.icon-btn {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--tint);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform .2s var(--ease), background .2s ease;
}
.icon-btn:active { transform: scale(.9); background: var(--fill); }
.icon-btn.plain { color: var(--label); }

.avatar-btn {
  width: 34px; height: 34px; border-radius: 50%;
  border: 0; padding: 0; cursor: pointer;
  background: linear-gradient(145deg, #5ac8fa, #5e5ce6 60%, #bf5af2);
  color: #fff; font-size: 14px; font-weight: 700;
  display: inline-flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 12px -4px rgba(94, 92, 230, .8);
  transition: transform .2s var(--ease);
}
.avatar-btn:active { transform: scale(.92); }

/* ---------- 教材轮播 ---------- */
.carousel-wrap { position: relative; margin-top: 14px; }
.carousel {
  display: flex;
  gap: 14px;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  padding: 8px 20px 22px;
  scrollbar-width: none;
  scroll-padding-left: 20px;
  -webkit-overflow-scrolling: touch;
}
.carousel::-webkit-scrollbar { display: none; }

.book-card {
  position: relative;
  flex: 0 0 auto;
  width: 68%;
  max-width: 296px;
  height: 340px;
  border: 0;
  padding: 0;
  border-radius: 26px;
  overflow: hidden;
  cursor: pointer;
  scroll-snap-align: center;
  text-align: left;
  font-family: inherit;
  color: #fff;
  background: linear-gradient(155deg, var(--g1), var(--g2));
  box-shadow: 0 18px 34px -16px var(--g2), 0 2px 6px rgba(0, 0, 0, .08);
  transition: transform .45s var(--ease), opacity .35s ease, box-shadow .45s var(--ease);
  transform: scale(.93);
  opacity: .72;
  will-change: transform;
}
.book-card.is-active { transform: scale(1); opacity: 1; }
.book-card:active { transform: scale(.965); opacity: 1; }

.book-card .bc-glow {
  position: absolute; inset: -40% -30% auto;
  height: 90%;
  background: radial-gradient(60% 60% at 30% 20%, rgba(255, 255, 255, .5), transparent 70%);
  pointer-events: none;
}
.book-card .bc-ring {
  position: absolute; right: -46px; bottom: -56px;
  width: 190px; height: 190px; border-radius: 50%;
  border: 1.5px solid rgba(255, 255, 255, .26);
  pointer-events: none;
}
.book-card .bc-ring::after {
  content: ""; position: absolute; inset: 26px; border-radius: 50%;
  border: 1.5px solid rgba(255, 255, 255, .18);
}
.book-card .bc-shine {
  position: absolute; inset: 0;
  background: linear-gradient(115deg, rgba(255, 255, 255, .22) 0%, rgba(255, 255, 255, 0) 38%);
  pointer-events: none;
}
.book-card .bc-spine {
  position: absolute; left: 0; top: 0; bottom: 0; width: 12px;
  background: linear-gradient(90deg, rgba(0, 0, 0, .22), rgba(255, 255, 255, .04) 70%, transparent);
  pointer-events: none;
}

.bc-inner {
  position: relative;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 20px 20px 18px 24px;
}
.bc-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.bc-tag {
  font-size: 11px; font-weight: 700; letter-spacing: .12em;
  text-transform: uppercase;
  padding: 5px 9px; border-radius: 8px;
  background: rgba(255, 255, 255, .22);
  backdrop-filter: blur(6px);
  color: #fff;
}
.bc-ready {
  font-size: 11px; font-weight: 600;
  display: inline-flex; align-items: center; gap: 4px;
  padding: 4px 8px; border-radius: 8px;
  background: rgba(255, 255, 255, .18);
}
.bc-ready.soon { background: rgba(0, 0, 0, .16); color: rgba(255, 255, 255, .82); }
.bc-dot { width: 6px; height: 6px; border-radius: 50%; background: #7ff2a8; box-shadow: 0 0 8px #7ff2a8; }

.bc-title {
  font-size: 30px;
  font-weight: 800;
  letter-spacing: -.02em;
  line-height: 1.1;
  display: block;
  text-shadow: 0 2px 12px rgba(0, 0, 0, .16);
}
.bc-title.is-long { font-size: 24px; line-height: 1.18; letter-spacing: -.01em; }
.bc-title.is-xlong { font-size: 21px; line-height: 1.2; letter-spacing: 0; }
.bc-sub {
  display: block;
  margin-top: 7px;
  font-size: 12.5px;
  line-height: 1.5;
  color: rgba(255, 255, 255, .82);
  letter-spacing: .01em;
}
.bc-bottom { display: flex; align-items: flex-end; justify-content: space-between; gap: 10px; }
.bc-meta { font-size: 11.5px; color: rgba(255, 255, 255, .78); line-height: 1.6; }
.bc-cta {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 12.5px; font-weight: 650;
  padding: 7px 12px; border-radius: 999px;
  background: rgba(255, 255, 255, .92);
  color: #1b1b22;
  white-space: nowrap;
}
.bc-cta.locked { background: rgba(255, 255, 255, .2); color: #fff; }

/* 指示点 */
.dots { display: flex; justify-content: center; gap: 6px; margin: 2px 0 0; }
.dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--sep-strong);
  transition: width .35s var(--ease), background .3s ease;
  border: 0; padding: 0; cursor: pointer;
}
.dot.is-active { width: 20px; border-radius: 4px; background: var(--label); }

/* ---------- 通用卡片 ---------- */
.pad { padding-left: 20px; padding-right: 20px; }
.card {
  background: var(--card);
  border-radius: 20px;
  box-shadow: var(--shadow-s);
}
.section-label {
  font-size: 12.5px;
  font-weight: 650;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--label-3);
  margin: 26px 0 10px;
  display: flex; align-items: center; justify-content: space-between;
}
.section-label a { color: var(--tint); font-size: 12.5px; text-decoration: none; letter-spacing: 0; text-transform: none; }

/* 继续学习 */
.resume-card {
  display: flex; align-items: center; gap: 14px;
  padding: 15px 16px;
  border-radius: 20px;
  background: var(--card);
  box-shadow: var(--shadow-s);
  border: 0; width: 100%; text-align: left; font-family: inherit;
  cursor: pointer; color: inherit;
  transition: transform .22s var(--ease), box-shadow .22s ease;
}
.resume-card:active { transform: scale(.982); box-shadow: var(--shadow-m); }
.resume-ico {
  width: 46px; height: 46px; border-radius: 14px; flex: 0 0 auto;
  display: grid; place-items: center;
  background: linear-gradient(150deg, var(--g1, #0a84ff), var(--g2, #5e5ce6));
  color: #fff;
  box-shadow: 0 6px 14px -6px var(--g2, #5e5ce6);
}
.resume-body { flex: 1; min-width: 0; }
.resume-body > span { display: block; }
.resume-kicker { font-size: 11px; font-weight: 650; letter-spacing: .08em; color: var(--tint); text-transform: uppercase; }
.resume-title { font-size: 15.5px; font-weight: 650; margin-top: 3px; letter-spacing: -.01em;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.resume-sub { font-size: 12.5px; color: var(--label-2); margin-top: 3px; }
.resume-play {
  width: 34px; height: 34px; border-radius: 50%; flex: 0 0 auto;
  background: var(--tint); color: #fff; display: grid; place-items: center;
  box-shadow: 0 6px 14px -6px var(--tint);
}

/* 进度条 */
.bar { height: 5px; border-radius: 3px; background: var(--fill-2); overflow: hidden; }
.bar > i { display: block; height: 100%; border-radius: 3px; background: var(--tint); transition: width .6s var(--ease); }
.resume-card .bar { margin-top: 8px; }

/* 三列统计 */
.stat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 12px; }
.stat {
  background: var(--card); border-radius: 18px; padding: 14px 12px;
  box-shadow: var(--shadow-s);
  text-align: center;
}
.stat-num { font-size: 21px; font-weight: 750; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.stat-num small { font-size: 12px; font-weight: 600; color: var(--label-2); margin-left: 1px; }
.stat-label { font-size: 11.5px; color: var(--label-2); margin-top: 4px; }

/* ---------- 教材详情 ---------- */
.book-hero {
  position: relative;
  margin: 8px 20px 0;
  border-radius: 24px;
  padding: 18px;
  color: #fff;
  background: linear-gradient(150deg, var(--g1), var(--g2));
  box-shadow: 0 18px 36px -18px var(--g2);
  overflow: hidden;
}
.book-hero .bh-glow {
  position: absolute; inset: -50% -20% auto; height: 110%;
  background: radial-gradient(55% 55% at 25% 25%, rgba(255, 255, 255, .42), transparent 70%);
}
.book-hero .bh-row { position: relative; display: flex; align-items: center; gap: 14px; }
.bh-cover {
  width: 58px; height: 78px; border-radius: 8px; flex: 0 0 auto;
  background: rgba(255, 255, 255, .18);
  border: 1px solid rgba(255, 255, 255, .32);
  display: grid; place-items: center;
  font-size: 20px; font-weight: 800;
  box-shadow: inset 0 0 20px rgba(255, 255, 255, .18);
}
.bh-info { flex: 1; min-width: 0; }
.bh-title { font-size: 20px; font-weight: 750; letter-spacing: -.02em; }
.bh-author { font-size: 12.5px; opacity: .85; margin-top: 4px; }
.bh-meta { display: flex; gap: 6px; margin-top: 12px; flex-wrap: wrap; position: relative; }
.bh-chip {
  font-size: 11.5px; font-weight: 600;
  padding: 5px 9px; border-radius: 8px;
  background: rgba(255, 255, 255, .2);
}

/* 课节列表 */
.lesson-list { margin: 0 20px 18px; border-radius: 20px; overflow: hidden; background: var(--card); box-shadow: var(--shadow-s); }
/* 章标题（学习路径的分组） */
.chapter-label {
  display: flex; align-items: center; gap: 8px;
  margin: 24px 22px 9px;
  font-size: 12.5px; font-weight: 650; letter-spacing: .04em;
  color: var(--label-2);
}
.chapter-label:first-of-type { margin-top: 12px; }
.chapter-label .cl-dash { width: 14px; height: 2px; border-radius: 1px; background: var(--tint); opacity: .8; flex: 0 0 auto; }
.chapter-label .cl-pill {
  margin-left: auto; padding: 2px 8px; border-radius: 20px;
  font-size: 10.5px; font-weight: 650; letter-spacing: .05em;
  color: var(--label-3); background: var(--fill-2);
}
.lesson-row {
  display: flex; align-items: center; gap: 13px;
  padding: 14px 15px;
  border: 0; background: transparent; width: 100%;
  text-align: left; font-family: inherit; color: inherit; cursor: pointer;
  position: relative;
  transition: background .2s ease;
}
.lesson-row + .lesson-row::before {
  content: ""; position: absolute; left: 15px; right: 0; top: 0; height: .5px; background: var(--sep);
}
.lesson-row:active { background: var(--fill); }
.lesson-row.locked { cursor: default; opacity: .55; }
.lr-index {
  width: 40px; height: 40px; border-radius: 12px; flex: 0 0 auto;
  display: grid; place-items: center;
  font-size: 15px; font-weight: 700;
  background: var(--fill); color: var(--label-2);
  font-variant-numeric: tabular-nums;
}
.lesson-row.done .lr-index { background: var(--green-soft); color: var(--green); }
.lesson-row.active .lr-index { background: var(--tint); color: #fff; box-shadow: 0 6px 14px -6px var(--tint); }
.lr-body { flex: 1; min-width: 0; }
.lr-body > span { display: block; }
.lr-title { font-size: 15.5px; font-weight: 650; letter-spacing: -.01em; }
.lr-meta { font-size: 12px; color: var(--label-2); margin-top: 3px; }
.lr-right { display: flex; align-items: center; gap: 8px; color: var(--label-3); }
.lr-pct { font-size: 12.5px; font-weight: 650; color: var(--tint); font-variant-numeric: tabular-nums; }

/* 悬浮主按钮 */
.cta-dock {
  position: sticky;
  bottom: 0;
  padding: 14px 20px calc(14px + env(safe-area-inset-bottom, 0px));
  background: linear-gradient(to top, var(--bg) 55%, transparent);
  z-index: 8;
  margin-top: 10px;
}
.btn-primary {
  width: 100%; height: 52px; border: 0; border-radius: 16px;
  background: var(--tint); color: #fff;
  font-family: inherit; font-size: 16px; font-weight: 650; letter-spacing: -.01em;
  cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  box-shadow: 0 12px 26px -12px var(--tint);
  transition: transform .2s var(--ease), filter .2s ease;
}
.btn-primary:active { transform: scale(.975); filter: brightness(1.06); }
.btn-primary:disabled { background: var(--fill-2); color: var(--label-3); box-shadow: none; }
.btn-ghost {
  height: 48px; border: 0; border-radius: 14px; width: 100%;
  background: var(--fill); color: var(--label);
  font-family: inherit; font-size: 15px; font-weight: 600; cursor: pointer;
  transition: transform .2s var(--ease);
}
.btn-ghost:active { transform: scale(.98); }

/* ---------- 课程页 ---------- */
.lesson-head {
  position: sticky;
  top: 0;
  z-index: 14;
  background-color: transparent;
  border-bottom: .5px solid transparent;
  transition: background-color .28s ease, border-color .28s ease;
}
.lesson-head.is-stuck {
  background-color: var(--glass);
  -webkit-backdrop-filter: blur(22px) saturate(180%);
  backdrop-filter: blur(22px) saturate(180%);
  border-bottom-color: var(--sep);
}
.lh-bar { position: relative; height: 46px; display: flex; align-items: center; gap: 4px; padding: 0 10px; }
.lh-title { flex: 1; min-width: 0; text-align: center; font-size: 15px; font-weight: 650; letter-spacing: -.01em;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lesson-progress { position: relative; height: 2.5px; background: var(--sep); }
.lesson-progress > i { display: block; height: 100%; background: var(--tint); transition: width .5s var(--ease); }

/* 分段控件 */
.tabs-dock {
  position: sticky; top: calc(46px + 2.5px); z-index: 13;
  background: var(--bg); padding: 8px 20px 10px;
  border-bottom: .5px solid var(--sep);
}
.segmented {
  position: relative; display: flex; padding: 3px; border-radius: 12px;
  background: var(--fill-2);
}
.segmented button {
  position: relative; z-index: 2; flex: 1; height: 32px; border: 0; background: transparent;
  font-family: inherit; font-size: 13.5px; font-weight: 600; color: var(--label-2);
  border-radius: 9px; cursor: pointer; transition: color .25s ease;
}
.segmented button.is-on { color: var(--label); }
.segmented.plain button.is-on {
  background: var(--card);
  box-shadow: 0 1px 3px rgba(0, 0, 0, .12), 0 1px 1px rgba(0, 0, 0, .06);
}
.seg-pill {
  position: absolute; top: 3px; bottom: 3px; left: 3px;
  border-radius: 9px; background: var(--card);
  box-shadow: 0 1px 3px rgba(0, 0, 0, .12), 0 1px 1px rgba(0, 0, 0, .06);
  transition: transform .34s var(--ease), width .34s var(--ease);
  z-index: 1;
}

/* 阅读区 */
.prose { font-size: calc(15.6px * var(--font-scale)); line-height: 1.78; letter-spacing: -.002em; line-break: strict; }
.prose p { margin: 12px 0; color: var(--label); }
.prose strong { font-weight: 650; }
.prose em { font-style: normal; color: var(--tint); font-weight: 600; }
.prose .katex { font-size: calc(1.06em * var(--font-scale)); }

.sec-head { display: flex; align-items: baseline; gap: 9px; margin: 30px 0 6px; }
.sec-head:first-child { margin-top: 10px; }
.sec-num {
  font-size: 12px; font-weight: 750; color: var(--tint);
  font-variant-numeric: tabular-nums; letter-spacing: .04em;
}
.sec-head h2 { margin: 0; font-size: calc(19px * var(--font-scale)); font-weight: 750; letter-spacing: -.02em; }
.sec-body { }
.sec-min { font-size: 12px; color: var(--label-3); margin-left: auto; }

.block-def {
  border-radius: 18px; padding: 15px 16px; margin: 14px 0;
  background: linear-gradient(180deg, var(--tint-soft), rgba(0, 122, 255, .03));
  border: 1px solid rgba(10, 132, 255, .18);
}
.block-def .bd-label {
  font-size: 11.5px; font-weight: 750; letter-spacing: .1em; text-transform: uppercase;
  color: var(--tint); margin-bottom: 6px; display: flex; align-items: center; gap: 6px;
}
.block-def p { margin: 6px 0; }

.block-note {
  border-radius: 16px; padding: 13px 15px; margin: 14px 0;
  background: var(--orange-soft);
  border: 1px solid rgba(255, 159, 10, .26);
}
.block-note .bn-label { font-size: 12px; font-weight: 750; color: #b26b00; letter-spacing: .04em; margin-bottom: 5px; }
[data-theme="dark"] .block-note .bn-label { color: #ffb340; }

.block-key {
  border-radius: 16px; padding: 13px 15px; margin: 14px 0;
  background: var(--green-soft); border: 1px solid rgba(52, 199, 89, .26);
}
.block-key .bk-label { font-size: 12px; font-weight: 750; color: #1a8f3c; letter-spacing: .04em; margin-bottom: 5px; }
[data-theme="dark"] .block-key .bk-label { color: #4cd964; }

.formula {
  margin: 12px 0;
  padding: 6px 2px;
  overflow-x: auto;
  overflow-y: hidden;
  text-align: center;
  scrollbar-width: none;
}
.formula::-webkit-scrollbar { display: none; }
.formula .katex { font-size: calc(1.1em * var(--font-scale)); }
.formula.multi .katex-display { margin: .3em 0; }

/* 列表 */
.blist { margin: 10px 0; padding: 0; list-style: none; }
.blist li {
  position: relative; padding-left: 18px; margin: 8px 0;
  font-size: calc(14.8px * var(--font-scale)); line-height: 1.7; color: var(--label);
}
.blist li::before {
  content: ""; position: absolute; left: 3px; top: .72em;
  width: 5px; height: 5px; border-radius: 50%; background: var(--tint); opacity: .6;
}
.blist.num { counter-reset: n; }
.blist.num li::before { display: none; }
.blist.num li { padding-left: 24px; }
.blist.num > li > .n {
  position: absolute; left: 0; top: 0;
  font-size: 12.5px; font-weight: 700; color: var(--tint);
  font-variant-numeric: tabular-nums;
}

/* 表格 */
.tbl-wrap { margin: 14px 0; border-radius: 16px; overflow: hidden; border: .5px solid var(--sep); background: var(--card); }
.tbl { width: 100%; border-collapse: collapse; font-size: calc(13.4px * var(--font-scale)); }
.tbl th {
  background: var(--fill); font-weight: 650; color: var(--label-2);
  padding: 9px 8px; text-align: center; font-size: 12.5px; letter-spacing: .02em;
}
.tbl td {
  padding: 9px 8px; text-align: center; border-top: .5px solid var(--sep);
  color: var(--label);
}
.tbl td:first-child { color: var(--label-2); }
.tbl .katex { font-size: .98em; }

/* chips */
.chips { display: flex; flex-wrap: wrap; gap: 7px; margin: 10px 0; }
.chip {
  font-size: calc(12.6px * var(--font-scale));
  padding: 6px 11px; border-radius: 999px;
  background: var(--fill); color: var(--label);
  display: inline-flex; align-items: center;
  line-height: 1.4;
}
.chip .katex { font-size: 1em; }
.chip.tint { background: var(--tint-soft); color: var(--tint); font-weight: 600; }

/* ---------- 交互演示 ---------- */
.demo {
  margin: 16px 0; border-radius: 18px; overflow: hidden;
  background: var(--card); border: .5px solid var(--sep);
  box-shadow: var(--shadow-s);
}
.demo-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 15px 6px;
}
.demo-title { font-size: 13.5px; font-weight: 700; letter-spacing: -.01em; }
.demo-hint { font-size: 11.5px; color: var(--label-3); }
.demo canvas { display: block; width: 100%; height: 220px; }
.demo-bar { display: flex; align-items: center; gap: 12px; padding: 10px 15px 14px; }
.demo-bar label { font-size: 12.5px; color: var(--label-2); font-variant-numeric: tabular-nums; white-space: nowrap; }
.demo-bar .val { font-weight: 700; color: var(--tint); min-width: 34px; text-align: right; font-variant-numeric: tabular-nums; }
.demo-caption { padding: 0 15px 13px; font-size: 12.5px; color: var(--label-2); line-height: 1.6; }

input[type="range"] {
  -webkit-appearance: none; appearance: none;
  flex: 1; height: 4px; border-radius: 2px;
  background: var(--fill-2); outline: none;
}
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none;
  width: 22px; height: 22px; border-radius: 50%;
  background: #fff; border: .5px solid rgba(0, 0, 0, .06);
  box-shadow: 0 2px 6px rgba(0, 0, 0, .22);
  cursor: pointer; transition: transform .15s var(--ease);
}
input[type="range"]:active::-webkit-slider-thumb { transform: scale(1.12); }
input[type="range"]::-moz-range-thumb {
  width: 22px; height: 22px; border-radius: 50%; background: #fff;
  border: .5px solid rgba(0, 0, 0, .06); box-shadow: 0 2px 6px rgba(0, 0, 0, .22);
}

/* 开关 */
.switch {
  position: relative; width: 51px; height: 31px; flex: 0 0 auto;
  border-radius: 999px; background: var(--fill-2); border: 0; cursor: pointer;
  transition: background .28s ease;
}
.switch::after {
  content: ""; position: absolute; top: 2px; left: 2px;
  width: 27px; height: 27px; border-radius: 50%; background: #fff;
  box-shadow: 0 2px 5px rgba(0, 0, 0, .2);
  transition: transform .3s var(--ease);
}
.switch.on { background: var(--green); }
.switch.on::after { transform: translateX(20px); }

/* ---------- 例题 ---------- */
.ex-card {
  background: var(--card); border-radius: 20px; overflow: hidden;
  box-shadow: var(--shadow-s); margin-bottom: 14px;
}
.ex-top {
  display: flex; align-items: center; gap: 8px;
  padding: 14px 16px 0;
}
.ex-badge {
  font-size: 12px; font-weight: 750; letter-spacing: .02em;
  padding: 3px 8px; border-radius: 7px;
  background: var(--tint-soft); color: var(--tint);
}
.ex-tag { font-size: 11.5px; color: var(--label-3); }
.ex-q { padding: 8px 16px 0; font-size: calc(15px * var(--font-scale)); line-height: 1.75; }
.ex-q .katex { font-size: 1.06em; }
.ex-actions { padding: 12px 16px 14px; }
.ex-toggle {
  width: 100%; height: 40px; border: 0; border-radius: 12px;
  background: var(--fill); color: var(--tint);
  font-family: inherit; font-size: 14px; font-weight: 600; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; gap: 5px;
  transition: transform .18s var(--ease);
}
.ex-toggle:active { transform: scale(.985); }

.ex-body { display: none; padding: 0 16px 16px; }
.ex-body.open { display: block; animation: fadeUp .35s var(--ease-out) both; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

.ex-step { display: flex; gap: 10px; margin: 11px 0; }
.ex-step .si {
  flex: 0 0 auto; width: 21px; height: 21px; margin-top: 2px;
  border-radius: 50%; background: var(--tint-soft); color: var(--tint);
  font-size: 11.5px; font-weight: 750; display: grid; place-items: center;
}
.ex-step .sc { flex: 1; min-width: 0; font-size: calc(14.6px * var(--font-scale)); line-height: 1.75; color: var(--label); line-break: strict; }
.ex-step .sc .katex { font-size: 1.04em; }
.ex-answer {
  margin-top: 12px; padding: 12px 14px; border-radius: 14px;
  background: var(--green-soft); border: 1px solid rgba(52, 199, 89, .24);
  font-size: calc(14.6px * var(--font-scale)); line-height: 1.75;
}
.ex-answer .ea-label { font-size: 11.5px; font-weight: 750; color: #1a8f3c; letter-spacing: .06em; margin-bottom: 4px; }
[data-theme="dark"] .ex-answer .ea-label { color: #4cd964; }
.ex-tip {
  margin-top: 10px; padding: 10px 13px; border-radius: 12px;
  background: var(--fill); font-size: calc(13.2px * var(--font-scale)); line-height: 1.65; color: var(--label-2);
}

/* ---------- 练习 ---------- */
.quiz-wrap { padding: 6px 20px 0; }
.quiz-progress { display: flex; align-items: center; gap: 10px; margin: 6px 0 14px; }
.quiz-progress .qp-txt { font-size: 12.5px; font-weight: 650; color: var(--label-2); font-variant-numeric: tabular-nums; white-space: nowrap; }
.quiz-progress .bar { flex: 1; }

.q-card { background: var(--card); border-radius: 20px; padding: 16px; box-shadow: var(--shadow-s); }
.q-kind {
  font-size: 11px; font-weight: 750; letter-spacing: .08em; text-transform: uppercase;
  color: var(--tint); margin-bottom: 8px;
}
.q-text { font-size: calc(15.6px * var(--font-scale)); line-height: 1.75; font-weight: 500; line-break: strict; }
.q-text .katex { font-size: 1.06em; }

.opts { margin-top: 14px; display: flex; flex-direction: column; gap: 9px; }
.opt {
  display: flex; align-items: flex-start; gap: 11px;
  padding: 13px 14px; border-radius: 14px;
  background: var(--fill); border: 1.5px solid transparent;
  text-align: left; font-family: inherit; cursor: pointer; color: inherit;
  font-size: calc(14.8px * var(--font-scale)); line-height: 1.6;
  transition: background .2s ease, border-color .2s ease, transform .16s var(--ease);
}
.opt:active { transform: scale(.988); }
.opt .ok {
  flex: 0 0 auto; width: 22px; height: 22px; border-radius: 50%;
  background: var(--card); color: var(--label-2);
  font-size: 11.5px; font-weight: 750; display: grid; place-items: center;
  box-shadow: 0 1px 2px rgba(0, 0, 0, .06);
}
.opt .oc { flex: 1; min-width: 0; }
.opt.sel { background: var(--tint-soft); border-color: var(--tint); }
.opt.sel .ok { background: var(--tint); color: #fff; }
.opt.right { background: var(--green-soft); border-color: var(--green); }
.opt.right .ok { background: var(--green); color: #fff; }
.opt.wrong { background: var(--red-soft); border-color: var(--red); }
.opt.wrong .ok { background: var(--red); color: #fff; }
.opt[disabled] { cursor: default; }

.fill-box {
  margin-top: 14px; display: flex; gap: 9px;
}
.fill-box input {
  flex: 1; height: 46px; border-radius: 13px; border: 1.5px solid var(--sep-strong);
  background: var(--card); color: var(--label);
  font-family: inherit; font-size: 15px; padding: 0 14px; outline: none;
  transition: border-color .2s ease;
}
.fill-box input:focus { border-color: var(--tint); }
.fill-box input.right { border-color: var(--green); }
.fill-box input.wrong { border-color: var(--red); }

.q-feedback {
  margin-top: 13px; padding: 12px 14px; border-radius: 14px;
  font-size: calc(13.8px * var(--font-scale)); line-height: 1.7;
  display: none;
}
.q-feedback.show { display: block; animation: fadeUp .3s var(--ease-out) both; }
.q-feedback.ok { background: var(--green-soft); }
.q-feedback.no { background: var(--red-soft); }
.q-feedback b { font-weight: 700; }
.q-feedback .fhead { display: flex; align-items: center; gap: 6px; font-weight: 700; margin-bottom: 4px; }

.quiz-nav { display: flex; gap: 10px; margin: 16px 0 8px; }

.result-card {
  margin: 20px; padding: 26px 20px; border-radius: 24px;
  background: var(--card); box-shadow: var(--shadow-m); text-align: center;
}
.result-ring { margin: 4px auto 14px; }
.result-title { font-size: 21px; font-weight: 750; letter-spacing: -.02em; }
.result-sub { font-size: 13.5px; color: var(--label-2); margin-top: 6px; line-height: 1.6; }
.result-stats { display: flex; justify-content: center; gap: 26px; margin: 18px 0 20px; }
.result-stats div { font-size: 12px; color: var(--label-2); }
.result-stats b { display: block; font-size: 19px; font-weight: 750; color: var(--label); font-variant-numeric: tabular-nums; }

/* ---------- 小结 ---------- */
.sum-card { background: var(--card); border-radius: 20px; padding: 16px; box-shadow: var(--shadow-s); margin-bottom: 14px; }
.sum-card h3 { margin: 0 0 10px; font-size: 15px; font-weight: 700; display: flex; align-items: center; gap: 7px; letter-spacing: -.01em; }
.sum-card h3 .ic { width: 22px; height: 22px; border-radius: 7px; display: grid; place-items: center; background: var(--tint-soft); color: var(--tint); }
.sum-formula { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-top: .5px solid var(--sep); font-size: 13px; }
.sum-formula:first-of-type { border-top: 0; }
.sum-formula .k { flex: 1; min-width: 0; overflow-x: auto; overflow-y: hidden; scrollbar-width: none; }
.sum-formula .k::-webkit-scrollbar { display: none; }
.sum-formula .k .katex { font-size: 1em; }
.sum-formula .d { flex: 0 0 auto; color: var(--label-2); font-size: 12px; max-width: 45%; text-align: right; line-height: 1.4; }

/* ---------- 「我的」 ---------- */
.profile-top { display: flex; align-items: center; gap: 14px; padding: 6px 20px 0; }
.pf-avatar {
  width: 58px; height: 58px; border-radius: 50%;
  background: linear-gradient(145deg, #5ac8fa, #5e5ce6 55%, #bf5af2);
  color: #fff; font-size: 22px; font-weight: 750;
  display: grid; place-items: center;
  box-shadow: 0 8px 20px -8px rgba(94, 92, 230, .8);
}
.pf-name { font-size: 19px; font-weight: 750; letter-spacing: -.02em; }
.pf-sub { font-size: 12.5px; color: var(--label-2); margin-top: 3px; }

.group-list { margin: 0 20px; border-radius: 18px; background: var(--card); box-shadow: var(--shadow-s); overflow: hidden; }
.grow {
  display: flex; align-items: center; gap: 12px; padding: 13px 15px;
  position: relative; width: 100%; border: 0; background: transparent; color: inherit;
  font-family: inherit; font-size: 15px; text-align: left; cursor: pointer;
}
.grow + .grow::before { content: ""; position: absolute; left: 15px; right: 0; top: 0; height: .5px; background: var(--sep); }
.grow:active { background: var(--fill); }
.grow .gi {
  width: 28px; height: 28px; border-radius: 8px; flex: 0 0 auto;
  display: grid; place-items: center; color: #fff;
}
.grow .gt { flex: 1; min-width: 0; }
.grow .gv { font-size: 14px; color: var(--label-2); font-variant-numeric: tabular-nums; }

/* 学习日历 */
.cal { display: flex; gap: 6px; margin: 12px 0 4px; }
.cal-day { flex: 1; text-align: center; }
.cal-day span { display: block; font-size: 10.5px; color: var(--label-3); margin-bottom: 5px; }
.cal-day i {
  display: block; height: 26px; border-radius: 8px; background: var(--fill);
}
.cal-day.on i { background: var(--tint); }

/* ---------- 底部标签栏 ---------- */
.tabbar {
  position: relative;
  display: flex;
  align-items: stretch;
  padding: 6px 8px calc(6px + env(safe-area-inset-bottom, 0px));
  background: var(--glass);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  backdrop-filter: blur(24px) saturate(180%);
  border-top: .5px solid var(--sep);
  z-index: 20;
  transition: transform .4s var(--ease), opacity .3s ease;
}
.app[data-fullscreen="true"] .tabbar { display: none; }
.tab {
  flex: 1; border: 0; background: transparent; cursor: pointer;
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  padding: 5px 0 3px; color: var(--label-3); font-family: inherit;
  transition: color .22s ease, transform .2s var(--ease);
}
.tab:active { transform: scale(.94); }
.tab.is-on { color: var(--tint); }
.tab-label { font-size: 10px; font-weight: 600; letter-spacing: .01em; }
.tab-ico { display: grid; place-items: center; height: 26px; }
.icon { display: block; }

/* ---------- 模糊层 / 弹出层 ---------- */
.sheet-root { position: absolute; inset: 0; z-index: 40; pointer-events: none; }
.sheet-root.open { pointer-events: auto; }
.sheet-scrim {
  position: absolute; inset: 0; background: rgba(0, 0, 0, .32);
  opacity: 0; transition: opacity .34s ease;
  -webkit-backdrop-filter: blur(1px); backdrop-filter: blur(1px);
}
.sheet-root.open .sheet-scrim { opacity: 1; }
.sheet {
  position: absolute; left: 0; right: 0; bottom: 0;
  background: var(--card);
  border-radius: 24px 24px 0 0;
  transform: translateY(102%);
  transition: transform .44s var(--ease);
  max-height: 76%;
  display: flex; flex-direction: column;
  padding-bottom: calc(12px + env(safe-area-inset-bottom, 0px));
  box-shadow: 0 -20px 50px -20px rgba(0, 0, 0, .3);
}
.sheet-root.open .sheet { transform: none; }
.sheet-grab { width: 36px; height: 5px; border-radius: 3px; background: var(--sep-strong); margin: 8px auto 4px; flex: 0 0 auto; }
.sheet-title { font-size: 16px; font-weight: 750; padding: 8px 20px 10px; letter-spacing: -.01em; flex: 0 0 auto; }
.sheet-body { overflow-y: auto; padding-bottom: 8px; }
.sheet-row {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 20px; border: 0; background: transparent; width: 100%;
  font-family: inherit; font-size: 14.5px; color: inherit; text-align: left; cursor: pointer;
}
.sheet-row:active { background: var(--fill); }
.sheet-row .sn { font-size: 11.5px; font-weight: 750; color: var(--label-3); width: 16px; font-variant-numeric: tabular-nums; }
.sheet-row.on .sn, .sheet-row.on .st { color: var(--tint); }
.sheet-row .st { flex: 1; min-width: 0; }
.sheet-row .sd { font-size: 12px; color: var(--label-3); }
.sheet-row.done .sn { color: var(--green); }

/* ---------- Toast ---------- */
.toast {
  position: absolute; left: 50%; bottom: calc(96px + env(safe-area-inset-bottom, 0px));
  transform: translate(-50%, 12px) scale(.94);
  background: rgba(28, 28, 32, .92);
  color: #fff; font-size: 13.5px; font-weight: 500;
  padding: 11px 18px; border-radius: 999px;
  opacity: 0; pointer-events: none; z-index: 60;
  transition: opacity .28s ease, transform .34s var(--ease);
  max-width: 84%; text-align: center;
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  box-shadow: 0 12px 30px -12px rgba(0, 0, 0, .5);
}
.toast.show { opacity: 1; transform: translate(-50%, 0) scale(1); }

/* ---------- 其他 ---------- */
.empty {
  text-align: center; padding: 40px 24px; color: var(--label-2);
  font-size: 13.5px; line-height: 1.7;
}
.empty .e-ico {
  width: 56px; height: 56px; border-radius: 18px; margin: 0 auto 12px;
  background: var(--fill); display: grid; place-items: center; color: var(--label-3);
}
.mt8 { margin-top: 8px; } .mt16 { margin-top: 16px; } .mt24 { margin-top: 24px; }
.center { text-align: center; }
.foot-note { text-align: center; font-size: 11.5px; color: var(--label-3); margin: 26px 20px 8px; line-height: 1.7; }

/* 小标题（初等函数各分节） */
.mini-h {
  margin: 22px 0 8px;
  font-size: calc(15.5px * var(--font-scale));
  font-weight: 700;
  letter-spacing: -.01em;
  color: var(--label);
  display: flex;
  align-items: center;
  gap: 7px;
}
.mini-h::before {
  content: ""; width: 3px; height: 15px; border-radius: 2px;
  background: var(--tint); flex: 0 0 auto;
}

/* 演示内的分段按钮 / 重播 */
.demo-seg { display: flex; gap: 4px; padding: 3px; border-radius: 10px; background: var(--fill); }
.demo-seg-btn {
  border: 0; background: transparent; font-family: inherit;
  font-size: 12px; font-weight: 600; color: var(--label-2);
  padding: 6px 10px; border-radius: 7px; cursor: pointer;
  transition: background .22s ease, color .22s ease, transform .16s var(--ease);
  white-space: nowrap;
}
.demo-seg-btn.on { background: var(--card); color: var(--label); box-shadow: 0 1px 3px rgba(0, 0, 0, .14); }
.demo-seg-btn:active { transform: scale(.95); }
.demo-replay {
  margin-left: auto; border: 0; background: var(--fill); color: var(--tint);
  font-family: inherit; font-size: 12px; font-weight: 650;
  padding: 6px 11px; border-radius: 9px; cursor: pointer;
  transition: transform .16s var(--ease);
}
.demo-replay:active { transform: scale(.94); }
.demo-bar { flex-wrap: wrap; }

/* 成绩环 */
.result-ring { position: relative; width: 104px; height: 104px; margin: 2px auto 14px; }
.result-ring svg { position: absolute; inset: 0; }
.result-pct {
  position: absolute; inset: 0;
  display: grid; grid-auto-flow: column; place-content: center;
  align-items: baseline;
  font-size: 27px; font-weight: 800; letter-spacing: -.03em;
}
.result-pct span { font-size: 14px; font-weight: 700; margin-left: 1px; }
.result-card .btn-primary, .result-card .btn-ghost { flex: 1; height: 50px; }

/* 减少动效 */
@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* ============================================================
   字体：字母与数字统一 Times New Roman
   KaTeX 只替换「字母/数字承载类」，符号与大型运算符仍用原字体，
   缺字时按字体栈逐字回落到 KaTeX_Main，保证 ⩽、∅ 等不会变方框。
   ============================================================ */
.katex { font-family: "Times New Roman", KaTeX_Main, serif; }
.katex .mathnormal,
.katex .mathit { font-family: "Times New Roman", KaTeX_Math, serif; font-style: italic; }
.katex .mathrm,
.katex .textrm,
.katex .text { font-family: "Times New Roman", KaTeX_Main, serif; }
.katex .mathbf { font-family: "Times New Roman", KaTeX_Main, serif; font-weight: 700; }

/* ============================================================
   书封装饰图案
   ============================================================ */
.bc-art {
  position: absolute; right: -14px; bottom: 44px;
  width: 170px; height: 170px;
  color: #fff; opacity: .32;
  pointer-events: none; z-index: 0;
}
.bc-art svg { width: 100%; height: 100%; display: block; }
.bc-inner > span { position: relative; z-index: 1; }

/* 教材详情页头图上的同款图案 */
.bh-art {
  position: absolute; right: -26px; bottom: -34px;
  width: 186px; height: 186px;
  color: #fff; opacity: .16; pointer-events: none;
}
.bh-art svg { width: 100%; height: 100%; display: block; }

/* 首页：书架 $+$ 侧栏（移动端上下堆叠） */
.home-layout { display: block; }
.home-side { padding: 0 20px; }
.me-cols { display: block; }

/* ============================================================
   目录页布局容器（移动端单列 / 桌面端左右两栏）
   ============================================================ */
.book-layout { display: block; }
.book-aside { min-width: 0; }
.book-main { min-width: 0; }
.book-cta { display: none; }

/* 首页两栏（移动端自动堆叠） */
.home-cols { display: block; }

/* ============================================================
   桌面端（≥ 980px）：侧边导航 + 加宽内容
   ============================================================ */
@media (min-width: 980px) {
  .app {
    width: 100%;
    max-width: 1180px;
    height: min(870px, 93dvh);
    flex-direction: row;
    border-radius: 30px;
    box-shadow: 0 44px 100px -46px rgba(20, 22, 60, .5), 0 0 0 1px rgba(255, 255, 255, .55);
  }
  [data-theme="dark"] .app {
    box-shadow: 0 44px 100px -46px rgba(0, 0, 0, .92), 0 0 0 1px rgba(255, 255, 255, .06);
  }

  /* 底部标签栏 → 左侧导航栏 */
  .tabbar {
    position: relative;
    order: -1;
    flex: 0 0 108px;
    width: 108px;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    gap: 4px;
    padding: 22px 12px;
    border-top: 0;
    border-right: .5px solid var(--sep);
    background: var(--card);
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }
  .app[data-fullscreen="true"] .tabbar { display: flex; }
  .tab { flex: 0 0 auto; padding: 14px 4px 12px; border-radius: 15px; gap: 6px; }
  .tab:hover { background: var(--fill); }
  .tab:active { transform: scale(.97); }
  .tab.is-on { background: var(--tint-soft); }
  .tab-label { font-size: 11.5px; letter-spacing: .02em; }
  .tab-ico { height: 28px; }

  .views { flex: 1; min-width: 0; }
  .screen { padding-bottom: 26px; }

  .pad { padding-left: 34px; padding-right: 34px; }
  .head-bar { padding: 0 34px; }
  .head-title { padding-left: 34px; padding-right: 34px; }
  .head-title h1 { font-size: 36px; }
  .foot-note { margin-left: 34px; margin-right: 34px; }

  /* 首页：书架四列网格，所有书一眼可见 */
  .carousel-wrap { margin-top: 18px; }
  .carousel {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    overflow: visible;
    padding: 4px 0 6px;
    scroll-snap-type: none;
  }
  .book-card {
    width: auto; max-width: none; height: 334px;
    transform: none; opacity: 1; scroll-snap-align: none;
  }
  .book-card.is-active { transform: none; }
  .book-card:hover { transform: translateY(-4px); box-shadow: 0 26px 46px -22px var(--g2), 0 5px 12px rgba(0, 0, 0, .1); }
  .book-card:active { transform: translateY(-1px) scale(.99); }
  .dots { display: none; }

  .home-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    gap: 26px;
    padding: 0 34px;
    align-items: start;
  }
  .home-books { min-width: 0; }
  .home-side { padding: 0; }
  .home-side .section-label:first-child { margin-top: 6px; }
  .home-side .stat-grid { grid-template-columns: 1fr; gap: 10px; margin-top: 12px; }
  .home-side .stat {
    display: flex; align-items: baseline; justify-content: space-between;
    padding: 13px 16px; text-align: left;
  }
  .home-side .stat-label { margin-top: 0; }
  .resume-card { min-height: 96px; }
  .home-foot { margin: 22px 0 0; text-align: left; }

  /* 目录页：左侧信息卡（吸附）+ 右侧章节列表 */
  .book-layout {
    display: grid;
    grid-template-columns: 344px minmax(0, 1fr);
    gap: 26px;
    padding: 6px 34px 30px;
    align-items: start;
  }
  .book-aside { position: sticky; top: 58px; }
  .book-aside .book-hero { margin: 8px 0 0; }
  .book-aside .pad { padding: 0; }
  .book-cta { display: block; margin-top: 16px; }
  .book-cta .btn-primary { width: 100%; }
  .book-main .section-label { margin: 12px 0 10px; padding: 0; }
  .book-main .lesson-list { margin: 0 0 16px; }
  .book-main .chapter-label { margin-left: 4px; }
  .book-main .chapter-label:first-of-type { margin-top: 6px; }
  .cta-dock { display: none; }

  /* 课程页：阅读栏限宽居中 */
  #lessonBody { max-width: 900px; margin: 0 auto; }
  .lesson-head { max-width: 900px; margin: 0 auto; }
  .tabs-dock { padding-left: 0; padding-right: 0; }
  .segmented { max-width: 460px; margin: 0 auto; }
  .lesson-head { position: sticky; top: 0; z-index: 12; background: var(--bg); }
  .lesson-progress { border-radius: 2px; }

  /* 底部面板：桌面端收窄居中 */
  .sheet {
    left: 50%; right: auto; bottom: 0;
    width: min(560px, calc(100% - 96px));
    transform: translate(-50%, 102%);
  }
  .sheet-root.open .sheet { transform: translate(-50%, 0); }
  .toast { bottom: 40px; }

  /* 我的 */
  .screen > .pad { max-width: 1000px; }
  .profile-top, .group-list { max-width: 1000px; }
  .profile-top { padding-top: 12px; padding-left: 34px; padding-right: 34px; }
  .me-cols { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 22px; align-items: start; }
  .me-cols .group-list { margin: 0; }
}

/* ============================================================
   错题本
   ============================================================ */

/* 标签栏角标 */
.tabbar .tab { position: relative; }
.tab-badge {
  position: absolute;
  top: 3px; left: 50%; margin-left: 7px;
  min-width: 16px; height: 16px; padding: 0 4px;
  border-radius: 999px;
  background: var(--red); color: #fff;
  font-size: 10px; font-weight: 750; line-height: 16px;
  text-align: center; letter-spacing: 0;
  font-variant-numeric: tabular-nums;
  display: none;
}
.tab-badge.is-on { display: block; }

/* 首页侧栏入口 */
.wrong-entry {
  display: flex; align-items: center; gap: 12px;
  width: 100%; margin-top: 12px; padding: 12px 14px;
  border: 0; border-radius: 18px;
  background: var(--card); box-shadow: var(--shadow-s);
  font-family: inherit; color: inherit; text-align: left; cursor: pointer;
  transition: transform .22s var(--ease);
}
.wrong-entry:active { transform: scale(.982); }
.we-ico {
  width: 38px; height: 38px; border-radius: 12px; flex: 0 0 auto;
  display: grid; place-items: center;
  background: var(--orange-soft); color: var(--orange);
}
.we-body { flex: 1; min-width: 0; }
.we-t { display: block; font-size: 14.5px; font-weight: 650; letter-spacing: -.01em; }
.we-s { display: block; font-size: 11.5px; color: var(--label-2); margin-top: 2px; }
.we-arrow { color: var(--label-3); display: grid; place-items: center; }

/* 页面容器 */
.wrong-page { padding-bottom: 8px; }

/* 订正入口卡 */
.wr-cta-card {
  display: flex; align-items: center; gap: 14px;
  margin-top: 14px; padding: 15px 16px;
  border-radius: 20px;
  background: linear-gradient(150deg, rgba(10, 132, 255, .13), rgba(94, 92, 230, .09));
  border: 1px solid rgba(10, 132, 255, .16);
}
.wr-cta-card.live { background: var(--fill); border-color: var(--sep); }
.wr-cta-card.done { background: var(--green-soft); border-color: rgba(52, 199, 89, .22); }
.wr-cta-txt { flex: 1; min-width: 0; }
.wr-cta-title { font-size: 15px; font-weight: 700; letter-spacing: -.012em; }
.wr-cta-sub { font-size: 12px; color: var(--label-2); margin-top: 3px; line-height: 1.5; }
.wr-cta-btn {
  width: auto; height: 42px; padding: 0 17px; flex: 0 0 auto;
  font-size: 14.5px; border-radius: 13px;
}

/* 筛选 */
.wr-filters { display: flex; gap: 8px; margin: 20px 0 2px; }
.wr-chip {
  border: 0; border-radius: 999px; padding: 7px 13px;
  background: var(--fill); color: var(--label-2);
  font-family: inherit; font-size: 12.5px; font-weight: 600;
  display: inline-flex; align-items: center; gap: 5px; cursor: pointer;
  transition: background .22s ease, color .22s ease, transform .16s var(--ease);
}
.wr-chip:active { transform: scale(.96); }
.wr-chip b { font-size: 11.5px; font-weight: 750; font-variant-numeric: tabular-nums; opacity: .7; }
.wr-chip.is-on { background: var(--tint); color: #fff; }
.wr-chip.is-on b { opacity: .92; }

/* 分组标题 */
.wr-group-head { margin-top: 20px; }
.wr-group-head .cl-pill.ok { color: var(--green); background: var(--green-soft); }

/* 错题卡片 */
.wr-card {
  position: relative;
  background: var(--card); border-radius: 18px;
  padding: 14px 15px; margin-bottom: 11px;
  box-shadow: var(--shadow-s);
}
.wr-card.is-fixed { box-shadow: none; border: .5px solid var(--sep); }
.wr-top { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.wr-badge {
  font-size: 11.5px; font-weight: 750; letter-spacing: .02em;
  padding: 3px 8px; border-radius: 7px;
  background: var(--tint-soft); color: var(--tint);
}
.wr-card.is-fixed .wr-badge { background: var(--fill); color: var(--label-2); }
.wr-kind { font-size: 11.5px; color: var(--label-3); }
.wr-state {
  margin-left: auto; font-size: 11px; font-weight: 700;
  padding: 3px 8px; border-radius: 999px; white-space: nowrap;
}
.wr-state.todo { background: var(--red-soft); color: var(--red); }
.wr-state.done { background: var(--green-soft); color: var(--green); }

.wr-q { font-size: calc(14.6px * var(--font-scale)); line-height: 1.74; line-break: strict; }
.wr-q .katex { font-size: 1.06em; }
.wr-q strong { font-weight: 650; }

.wr-ans { margin-top: 11px; display: flex; flex-direction: column; gap: 7px; }
.wr-line { display: flex; align-items: flex-start; gap: 8px; font-size: calc(13.4px * var(--font-scale)); line-height: 1.6; }
.wl-k {
  flex: 0 0 auto; font-size: 10.5px; font-weight: 750; letter-spacing: .02em;
  padding: 2px 6px; border-radius: 6px; white-space: nowrap; margin-top: 1px;
}
.wr-line.your .wl-k { background: var(--red-soft); color: var(--red); }
.wr-line.right .wl-k { background: var(--green-soft); color: var(--green); }
.wl-v { flex: 1; min-width: 0; color: var(--label-2); }
.wl-v .katex { font-size: 1.02em; }

.wr-times { margin-top: 8px; font-size: 11.5px; font-weight: 650; color: var(--orange); }

.wr-acts { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 12px; }
.wr-btn {
  border: 0; border-radius: 10px; padding: 7px 11px;
  background: var(--fill); color: var(--label-2);
  font-family: inherit; font-size: 12.5px; font-weight: 600;
  display: inline-flex; align-items: center; gap: 4px; cursor: pointer;
  transition: transform .16s var(--ease), color .2s ease, background .2s ease;
}
.wr-btn:active { transform: scale(.96); }
.wr-btn.on { background: var(--tint-soft); color: var(--tint); }
.wr-btn.ok { background: var(--green-soft); color: var(--green); }
.wr-btn.del { margin-left: auto; background: transparent; color: var(--label-3); padding-right: 2px; }
.wr-btn.del:active { color: var(--red); }

.wr-why {
  display: none; margin-top: 11px; padding: 11px 13px; border-radius: 12px;
  background: var(--fill);
  font-size: calc(13.2px * var(--font-scale)); line-height: 1.7; color: var(--label-2);
}
.wr-why.open { display: block; animation: fadeUp .3s var(--ease-out) both; }
.wr-why .katex { font-size: 1.04em; }

/* 答错反馈里的错题本提示 */
.fb-note {
  margin-top: 7px; padding-top: 7px;
  border-top: .5px solid rgba(255, 59, 48, .18);
  font-size: 11.5px; color: var(--label-3);
}

/* 练习结果里的错题本入口 */
.result-link {
  width: 100%; margin-top: 10px; padding: 9px 0 2px;
  border: 0; background: transparent; color: var(--tint);
  font-family: inherit; font-size: 13px; font-weight: 600;
  display: inline-flex; align-items: center; justify-content: center; gap: 5px;
  cursor: pointer;
}
.result-link:active { opacity: .6; }

/* 订正练习 */
.wr-quit {
  border: 0; background: transparent; color: var(--label-2);
  font-family: inherit; font-size: 12.5px; font-weight: 600;
  display: inline-flex; align-items: center; gap: 2px;
  padding: 0 6px 0 0; cursor: pointer; white-space: nowrap; flex: 0 0 auto;
}
.wr-quit:active { color: var(--tint); }
.wr-result { margin: 22px 0 0; }
.wr-empty { padding-top: 28px; }

@media (min-width: 980px) {
  .screen.is-wrong .head-title { max-width: 880px; margin-left: auto; margin-right: auto; }
  .screen > .wrong-page { max-width: 880px; margin-left: auto; margin-right: auto; }
  .wr-card { padding: 16px 18px; }
  .wr-card:hover { box-shadow: var(--shadow-m); }
}

/* ============================================================
   通用：扩展页页头按钮 / 小部件
   ============================================================ */
.nav-btn {
  width: 34px; height: 34px; flex: 0 0 auto;
  display: grid; place-items: center;
  border: 0; border-radius: 11px; background: transparent;
  color: var(--tint); cursor: pointer; font-family: inherit;
}
.nav-btn:active { background: var(--fill); }
.head-bar .nav-btn + .head-bar-title { margin-left: 2px; }

.mini-empty {
  padding: 18px 4px; text-align: center;
  font-size: 12.5px; line-height: 1.7; color: var(--label-3);
}
.mini-stat-row { display: flex; gap: 8px; }
.mini-stat-row > div {
  flex: 1; text-align: center; padding: 10px 4px;
  border-radius: 14px; background: var(--fill);
}
.mini-stat-row b { display: block; font-size: 19px; font-weight: 700; letter-spacing: -.02em; }
.mini-stat-row span { display: block; font-size: 11px; color: var(--label-3); margin-top: 2px; }

.chip-row { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 10px; }
.tool-chip {
  border: 0; border-radius: 10px; padding: 7px 11px;
  background: var(--fill); color: var(--label-2);
  font-family: inherit; font-size: 12.5px; font-weight: 600; cursor: pointer;
  transition: background .2s ease, color .2s ease, transform .16s var(--ease);
}
.tool-chip:active { transform: scale(.96); }
.tool-chip.on { background: var(--tint-soft); color: var(--tint); }

/* ============================================================
   首页快捷入口
   ============================================================ */
.quick-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: 10px; }
.quick {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  padding: 11px 4px 9px; border: 0; border-radius: 15px;
  background: var(--card); box-shadow: var(--shadow-s);
  font-family: inherit; font-size: 11.5px; font-weight: 600; color: var(--label);
  cursor: pointer; transition: transform .2s var(--ease);
}
.quick:active { transform: scale(.955); }
.q-ico { width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; }

/* ============================================================
   学情看板
   ============================================================ */
.stats-page, .graph-page, .smart-page, .path-page,
.tool-page, .ai-page, .plan-page, .wa-page { padding-bottom: 10px; }

.stats-card { margin-top: 12px; padding: 16px 16px 14px; }
.sc-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.sc-t { font-size: 14.5px; font-weight: 650; letter-spacing: -.01em; }
.sc-foot { margin-top: 8px; font-size: 11.5px; color: var(--label-3); line-height: 1.65; }
.sc-foot b { color: var(--label-2); font-weight: 650; }
.sc-foot .warn { color: var(--orange); }
.sl-note { margin-left: 8px; font-size: 10.5px; font-weight: 500; letter-spacing: 0; text-transform: none; color: var(--orange); }

.segmented.mini { padding: 2px; border-radius: 9px; width: auto; }
.segmented.mini button { padding: 4px 10px; font-size: 11.5px; border-radius: 7px; }

svg.trend { width: 100%; height: 128px; display: block; margin: 4px 0 0; overflow: visible; }

.stack-bar {
  display: flex; height: 12px; border-radius: 999px; overflow: hidden;
  background: var(--fill); margin: 4px 0 10px;
}
.stack-bar i { display: block; height: 100%; transition: width .6s var(--ease); }
.legend-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; font-size: 11.5px; color: var(--label-2); }
.legend-row .lg { display: inline-flex; align-items: center; gap: 5px; }
.legend-row .lg i { width: 9px; height: 9px; border-radius: 3px; }
.legend-row .lg b { font-weight: 700; color: var(--label); }
.legend-row .lg-note { margin-left: auto; color: var(--label-3); }

.kn-row {
  display: flex; align-items: center; gap: 9px; width: 100%;
  padding: 10px 2px; border: 0; border-top: .5px solid var(--sep);
  background: transparent; font-family: inherit; color: inherit;
  text-align: left; cursor: pointer;
}
.kn-row:first-of-type { border-top: 0; }
.kn-c { width: 4px; height: 26px; border-radius: 2px; flex: 0 0 auto; }
.kn-n { flex: 1; min-width: 0; font-size: 13.5px; font-weight: 550; }
.kn-p { font-size: 12px; color: var(--label-3); font-variant-numeric: tabular-nums; }
.kn-tag { font-size: 10.5px; font-weight: 700; padding: 2.5px 7px; border-radius: 7px; white-space: nowrap; }

.bar-row { display: flex; align-items: center; gap: 9px; margin: 9px 0; }
.br-k { flex: 0 0 62px; font-size: 12px; color: var(--label-2); }
.br-t { flex: 1; height: 8px; border-radius: 999px; background: var(--fill); overflow: hidden; }
.br-t i { display: block; height: 100%; border-radius: 999px; transition: width .6s var(--ease); }
.br-v { flex: 0 0 26px; text-align: right; font-size: 11.5px; color: var(--label-3); font-variant-numeric: tabular-nums; }

.heat { display: flex; gap: 3px; overflow-x: auto; padding: 2px 0 4px; }
.hm-week { display: flex; flex-direction: column; gap: 3px; }
.hm-cell { width: 12px; height: 12px; border-radius: 3px; background: var(--fill); }
.hm-cell.lv1 { background: rgba(10, 132, 255, .22); }
.hm-cell.lv2 { background: rgba(10, 132, 255, .42); }
.hm-cell.lv3 { background: rgba(10, 132, 255, .66); }
.hm-cell.lv4 { background: var(--tint); }

/* ============================================================
   知识点图谱
   ============================================================ */
.graph-card { margin-top: 12px; padding: 12px 10px 10px; }
.graph-wrap { overflow-x: auto; overflow-y: hidden; -webkit-overflow-scrolling: touch; }
.kgraph { display: block; }
.gnode { cursor: pointer; }
.gnode text { font-family: "Times New Roman", "PingFang SC", "Microsoft YaHei UI", serif; }
.gnode:focus { outline: none; }
.gnode.is-focus rect { stroke-width: 2.4; }

.kn-detail { margin-top: 12px; padding: 15px 16px; }
.kd-top { display: flex; align-items: flex-start; gap: 10px; }
.kd-n { font-size: 15.5px; font-weight: 700; letter-spacing: -.015em; }
.kd-tip { font-size: 12.5px; color: var(--label-2); margin-top: 3px; line-height: 1.55; }
.kd-bar { height: 7px; border-radius: 999px; background: var(--fill); margin: 12px 0 6px; overflow: hidden; }
.kd-bar i { display: block; height: 100%; border-radius: 999px; transition: width .6s var(--ease); }
.kd-sub { font-size: 11.5px; color: var(--label-3); line-height: 1.6; }
.kd-deps { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 10px; }
.kd-k { font-size: 11px; color: var(--label-3); margin-right: 1px; }
.dep-chip {
  border: 0; border-radius: 8px; padding: 4px 9px;
  background: var(--fill); color: var(--label-2);
  font-family: inherit; font-size: 11.5px; font-weight: 600; cursor: pointer;
}
.dep-chip:active { transform: scale(.96); }
.kd-acts { display: flex; gap: 8px; margin-top: 14px; }
.kd-acts .btn-ghost { flex: 1; height: 38px; font-size: 13.5px; }

.stage-list { margin-top: 12px; padding: 14px 16px; }
.stage-row { display: flex; gap: 10px; padding: 8px 0; border-top: .5px solid var(--sep); }
.stage-row:first-child { border-top: 0; }
.stage-k { flex: 0 0 44px; font-size: 11px; color: var(--label-3); padding-top: 5px; }
.stage-n { display: flex; flex-wrap: wrap; gap: 6px; }
.stage-chip {
  border: 0; border-radius: 8px; padding: 4px 9px;
  background: var(--fill); color: var(--label-2);
  font-family: inherit; font-size: 11.5px; cursor: pointer;
}
.stage-chip.good { background: var(--green-soft); color: var(--green); }
.stage-chip.mid { background: var(--orange-soft); color: var(--orange); }
.stage-chip.weak { background: var(--red-soft); color: var(--red); }

/* ============================================================
   推荐 / 自适应
   ============================================================ */
.rec-card { margin-top: 10px; padding: 14px 15px; }
.rc-top { display: flex; align-items: center; gap: 9px; }
.rc-name { flex: 1; font-size: 14.5px; font-weight: 650; letter-spacing: -.01em; }
.rc-why { font-size: 12.2px; color: var(--label-2); line-height: 1.65; margin-top: 5px; }
.rc-acts { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 11px; }
.rec-cta { margin-top: 10px; padding: 15px 16px; }
.rec-cta .btn-primary, .rec-cta .btn-ghost { margin-top: 12px; width: 100%; }

.apt-bar { display: flex; align-items: center; justify-content: space-between; margin-top: 14px; font-size: 12px; color: var(--label-3); }
.apt-node { padding: 3px 8px; border-radius: 7px; background: var(--tint-soft); color: var(--tint); font-weight: 650; }
.apt-q { font-size: calc(15.4px * var(--font-scale)); line-height: 1.78; margin: 14px 0 16px; }
.apt-fb { margin-top: 16px; padding: 13px 14px; border-radius: 16px; font-size: 13.5px; line-height: 1.72; }
.apt-fb.ok { background: var(--green-soft); color: var(--green); }
.apt-fb.no { background: var(--red-soft); }
.apt-fb.no { color: var(--red); }
.apt-ans { margin: 6px 0 4px; color: var(--label); font-weight: 600; }
.apt-why { color: var(--label-2); font-size: 12.8px; margin-top: 4px; }

/* ============================================================
   复习路径
   ============================================================ */
.path-hero { margin-top: 12px; padding: 16px; }
.ph-t { font-size: 15.5px; font-weight: 700; letter-spacing: -.015em; }
.ph-s { font-size: 12.5px; color: var(--label-2); margin-top: 4px; line-height: 1.65; }
.goal-list { display: flex; flex-direction: column; gap: 8px; margin: 14px 0 12px; }
.goal-card {
  display: grid; grid-template-columns: 42px 1fr; grid-template-rows: auto auto;
  gap: 2px 10px; align-items: center; text-align: left;
  padding: 11px 13px; border: 1.5px solid var(--sep); border-radius: 15px;
  background: var(--card); font-family: inherit; color: inherit; cursor: pointer;
  transition: border-color .2s ease, background .2s ease;
}
.goal-card.is-on { border-color: var(--tint); background: var(--tint-soft); }
.gc-d { grid-row: span 2; font-size: 20px; font-weight: 700; color: var(--tint); letter-spacing: -.03em; }
.gc-d small { font-size: 10.5px; font-weight: 600; margin-left: 1px; }
.gc-t { font-size: 14px; font-weight: 650; }
.gc-s { grid-column: 2; font-size: 11.5px; color: var(--label-2); line-height: 1.5; }

.path-progress { height: 8px; border-radius: 999px; background: var(--fill); overflow: hidden; margin: 8px 0 12px; }
.path-progress i { display: block; height: 100%; background: var(--green); border-radius: 999px; transition: width .6s var(--ease); }
.path-day { margin-bottom: 10px; padding: 12px 14px; }
.path-day.is-today { box-shadow: 0 0 0 1.5px var(--tint) inset, var(--shadow-s); }
.path-day.is-done { opacity: .72; }
.pd-head { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.pd-d { font-size: 12.5px; font-weight: 750; letter-spacing: .01em; color: var(--tint); }
.pd-date { font-size: 11.5px; color: var(--label-3); }
.pd-ok { margin-left: auto; color: var(--green); display: grid; place-items: center; }
.pd-item { display: flex; align-items: center; gap: 8px; padding: 7px 0; border-top: .5px solid var(--sep); cursor: pointer; }
.pd-item input { display: none; }
.pd-box {
  width: 17px; height: 17px; flex: 0 0 auto; border-radius: 5px;
  border: 1.5px solid var(--label-3); position: relative;
}
.pd-item.on .pd-box { background: var(--green); border-color: var(--green); }
.pd-item.on .pd-box::after {
  content: ""; position: absolute; left: 4.5px; top: 1.5px; width: 5px; height: 9px;
  border: solid #fff; border-width: 0 1.8px 1.8px 0; transform: rotate(42deg);
}
.pd-t { flex: 1; font-size: 13px; line-height: 1.5; }
.pd-item.on .pd-t { color: var(--label-3); text-decoration: line-through; }
.pd-go { border: 0; background: transparent; color: var(--label-3); padding: 2px; cursor: pointer; display: grid; place-items: center; }
.pd-rest { font-size: 12.5px; color: var(--label-3); padding: 6px 0 2px; }

/* ============================================================
   工具集
   ============================================================ */
.tools-seg { max-width: 420px; margin-left: auto; margin-right: auto; }
.tool-card { margin-top: 12px; padding: 16px; }
.tc-t { font-size: 14.5px; font-weight: 650; letter-spacing: -.01em; margin-bottom: 10px; }
.tc-s { font-size: 11px; font-weight: 500; color: var(--label-3); margin-left: 4px; letter-spacing: 0; }
.tc-acts { display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; }
.tc-acts .btn-primary { flex: 1; min-width: 130px; height: 42px; font-size: 14px; }
.tc-acts .btn-ghost { height: 42px; padding: 0 14px; font-size: 13.5px; }

.wa-input {
  width: 100%; border: 0; border-radius: 12px; padding: 11px 12px;
  background: var(--fill); color: var(--label);
  font-family: inherit; font-size: 14.5px; line-height: 1.6;
  resize: vertical; outline: none;
}
.wa-input.mono { font-family: "Times New Roman", "SF Mono", Consolas, monospace; font-size: 14px; letter-spacing: .01em; }
.wa-input:focus { box-shadow: 0 0 0 2px var(--tint-soft) inset; }
.wa-select { appearance: none; }
.wa-field { margin-bottom: 13px; }
.wa-label { display: block; font-size: 12px; font-weight: 650; color: var(--label-2); margin-bottom: 6px; }
.wa-label em { font-style: normal; font-weight: 500; color: var(--label-3); margin-left: 4px; font-size: 11px; }
.wa-row { display: flex; gap: 10px; }
.wa-row > * { flex: 1; min-width: 0; }
.wa-hint { font-size: 11px; color: var(--label-3); margin-top: 5px; line-height: 1.55; }
.wa-preview {
  margin-top: 8px; padding: 12px; border-radius: 12px; min-height: 46px;
  background: var(--fill); font-size: 14.5px; line-height: 1.7;
  overflow-x: auto;
}
.wa-ph { color: var(--label-3); font-size: 12.5px; }
.wa-form label { cursor: default; }
.wa-imgs { display: flex; gap: 8px; flex-wrap: wrap; }
.wa-thumb { position: relative; width: 74px; height: 74px; border-radius: 12px; overflow: hidden; background: var(--fill); }
.wa-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.wa-thumb-del {
  position: absolute; top: 3px; right: 3px; width: 19px; height: 19px;
  border: 0; border-radius: 50%; background: rgba(0,0,0,.55); color: #fff;
  display: grid; place-items: center; cursor: pointer; padding: 0;
}
.wa-imgbtns { display: flex; align-items: center; gap: 8px; margin-top: 9px; flex-wrap: wrap; }
.wa-file { display: inline-flex; align-items: center; gap: 4px; }

.cause-row { display: flex; flex-wrap: wrap; gap: 6px; }
.cause-chip {
  border: 0; border-radius: 9px; padding: 6px 10px;
  background: var(--fill); color: var(--label-2);
  font-family: inherit; font-size: 12px; font-weight: 600; cursor: pointer;
  transition: background .2s ease, color .2s ease;
}
.cause-chip.on { background: var(--cc, var(--tint)); color: #fff; }

.tex-preview {
  margin-top: 10px; padding: 16px 12px; border-radius: 12px;
  background: var(--fill); overflow-x: auto; min-height: 56px;
  display: flex; align-items: center; justify-content: center;
}
.snip { padding: 10px 0; border-top: .5px solid var(--sep); }
.snip:first-child { border-top: 0; }
.snip-p { overflow-x: auto; padding: 4px 0; }
.snip-acts { display: flex; gap: 7px; margin-top: 6px; }

.plot-input { display: flex; align-items: center; gap: 8px; }
.pi-k { font-size: 13px; color: var(--label-2); flex: 0 0 auto; font-family: "Times New Roman", serif; }
.plot-legend { display: flex; flex-wrap: wrap; gap: 10px; margin: 10px 0 4px; font-size: 11.5px; color: var(--label-2); }
.pi-b { padding: 3px 8px; border-radius: 7px; background: var(--fill); font-family: "Times New Roman", serif; }
.pi-s { font-size: 12.5px; }
.pi-err { color: var(--red); }
.plot-cv { width: 100%; height: 260px; display: block; border-radius: 14px; margin-top: 8px; touch-action: none; }
.plot-hint { font-size: 11px; color: var(--label-3); margin-top: 8px; }
.x0-row { display: flex; align-items: center; gap: 8px; margin-top: 8px; }
.x0-row .wa-input { flex: 1; }
.calc-out {
  margin-top: 12px; padding: 14px; border-radius: 12px; background: var(--fill);
  overflow-x: auto; min-height: 50px;
}
.calc-tex { font-size: 14.5px; }
.calc-note { font-size: 11.5px; color: var(--label-3); margin-top: 7px; line-height: 1.6; }
.calc-note.err { color: var(--red); }

.pad-card { padding-bottom: 12px; }
.pad-tools { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.color-row { display: flex; gap: 7px; }
.dot-color {
  width: 24px; height: 24px; border-radius: 50%; border: 2px solid transparent;
  background: var(--dc); cursor: pointer; padding: 0;
  box-shadow: 0 0 0 .5px rgba(0,0,0,.12) inset;
}
.dot-color.on { border-color: var(--tint); box-shadow: 0 0 0 2px var(--tint-soft); }
.pad-btns { display: flex; flex-wrap: wrap; gap: 6px; }
.pad-cv {
  display: block; width: 100%; height: 380px;
  border-radius: 14px; background: var(--card);
  box-shadow: 0 0 0 .5px var(--sep) inset;
  touch-action: none; cursor: crosshair;
}

/* ============================================================
   错题本新增：手动卡片 / 错因 / 图片
   ============================================================ */
.wr-badge-m { background: rgba(94, 92, 230, .14); color: #5e5ce6; }
.wr-thumbs { display: flex; gap: 7px; margin-top: 10px; flex-wrap: wrap; }
.wr-thumb {
  width: 64px; height: 64px; padding: 0; border: 0; border-radius: 10px;
  overflow: hidden; background: var(--fill); cursor: zoom-in;
}
.wr-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.wr-note { font-size: 13px; line-height: 1.72; }
.wr-note.muted { color: var(--label-3); font-size: 12.5px; }
.wr-causes { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 10px; padding-top: 9px; border-top: .5px solid var(--sep); }
.wc-k { font-size: 11px; color: var(--label-3); margin-right: 1px; }
.wr-causes .cause-chip { padding: 4px 8px; font-size: 11px; }

.img-view {
  position: fixed; inset: 0; z-index: 90; background: rgba(0, 0, 0, .88);
  display: grid; place-items: center; padding: 20px;
  animation: fadeUp .2s ease both;
}
.img-view img { max-width: 100%; max-height: 100%; border-radius: 8px; }
.iv-close {
  position: absolute; top: max(14px, env(safe-area-inset-top)); right: 14px;
  width: 36px; height: 36px; border: 0; border-radius: 50%;
  background: rgba(255, 255, 255, .16); color: #fff; cursor: pointer;
  display: grid; place-items: center;
}

/* ============================================================
   账号 / 登录
   ============================================================ */
.acc-login { padding: 16px; margin-top: 12px; }
.acc-form { margin-top: 14px; }
.acc-err {
  display: none; margin-top: 4px; margin-bottom: 10px; padding: 9px 11px;
  border-radius: 10px; background: var(--red-soft); color: var(--red);
  font-size: 12.5px; line-height: 1.55;
}
.acc-err.show { display: block; }
.acc-tip { font-size: 11.5px; color: var(--label-3); line-height: 1.6; margin-top: 10px; text-align: center; }
.acc-tip.left { text-align: left; margin-top: 8px; }
.code-row { display: flex; gap: 8px; }
.code-row .wa-input { flex: 1; }
.code-btn {
  flex: 0 0 auto; border: 0; border-radius: 12px; padding: 0 13px;
  background: var(--tint-soft); color: var(--tint);
  font-family: inherit; font-size: 12.5px; font-weight: 650; cursor: pointer;
  white-space: nowrap; min-width: 92px;
}
.code-btn:disabled { opacity: .55; cursor: default; }
.acc-quick { margin-top: 10px; padding: 14px 16px; }
.quick-login {
  display: flex; align-items: center; gap: 10px; width: 100%;
  padding: 11px 0; border: 0; border-top: .5px solid var(--sep);
  background: transparent; font-family: inherit; font-size: 14px; color: var(--label);
  text-align: left; cursor: pointer;
}
.quick-login:first-child { border-top: 0; padding-top: 2px; }
.ql-ico {
  width: 32px; height: 32px; border-radius: 10px; flex: 0 0 auto;
  display: grid; place-items: center;
  background: var(--tint-soft); color: var(--tint);
}
.acc-card { display: flex; align-items: center; gap: 13px; margin-top: 12px; padding: 16px; }
.acc-avatar {
  width: 52px; height: 52px; border-radius: 17px; flex: 0 0 auto;
  display: grid; place-items: center;
  background: linear-gradient(150deg, var(--tint), #5e5ce6); color: #fff;
  font-size: 21px; font-weight: 700;
}
.acc-name { font-size: 17px; font-weight: 700; letter-spacing: -.02em; }
.acc-sub { font-size: 12px; color: var(--label-2); margin-top: 3px; }
.acc-sync { margin-top: 10px; padding: 14px 16px; }
.as-row { display: flex; justify-content: space-between; padding: 7px 0; font-size: 13px; color: var(--label-2); border-top: .5px solid var(--sep); }
.as-row:first-child { border-top: 0; }
.as-row b { color: var(--label); font-weight: 650; }
.as-msg { font-size: 11.5px; color: var(--green); margin-top: 6px; }
.as-acts { display: flex; gap: 8px; margin-top: 14px; }
.as-acts .btn-primary { flex: 1; height: 42px; font-size: 14px; }
.as-acts .btn-ghost { flex: 1; height: 42px; font-size: 13.5px; }
.acc-note { margin-top: 12px; padding: 16px; }
.an-t { font-size: 14.5px; font-weight: 650; }
.an-s { font-size: 12.5px; color: var(--label-2); margin-top: 5px; line-height: 1.65; }

/* ============================================================
   AI 答疑
   ============================================================ */
.ai-model { font-size: 11px; color: var(--label-3); margin-top: 12px; text-align: center; }
.ai-thread { margin-top: 8px; display: flex; flex-direction: column; gap: 12px; min-height: 60px; }
.ai-msg { display: flex; gap: 8px; }
.ai-msg.user { justify-content: flex-end; }
.ai-avatar {
  width: 27px; height: 27px; border-radius: 9px; flex: 0 0 auto;
  display: grid; place-items: center;
  background: linear-gradient(150deg, var(--tint), #5e5ce6); color: #fff;
}
.ai-bubble {
  max-width: 82%; padding: 11px 13px; border-radius: 15px;
  font-size: calc(13.8px * var(--font-scale)); line-height: 1.75;
  background: var(--card); box-shadow: var(--shadow-s); word-break: break-word;
}
.ai-msg.user .ai-bubble {
  background: var(--tint); color: #fff; box-shadow: none;
  border-bottom-right-radius: 5px;
}
.ai-msg.bot .ai-bubble { border-bottom-left-radius: 5px; }
.ai-bubble .katex { font-size: 1.04em; }
.ai-img { width: 100%; max-width: 220px; border-radius: 10px; display: block; margin-bottom: 6px; }
.ai-dim { color: var(--label-3); font-size: 12.5px; }
.md-h2 { font-weight: 700; font-size: 14.5px; margin: 6px 0 3px; }
.md-h3 { font-weight: 650; font-size: 13.5px; margin: 5px 0 2px; }
.md-li { position: relative; padding-left: 12px; margin: 2px 0; }
.md-li::before { content: "·"; position: absolute; left: 2px; color: var(--tint); font-weight: 700; }
.ai-dots { display: inline-flex; gap: 3px; padding: 4px 0; }
.ai-dots i { width: 6px; height: 6px; border-radius: 50%; background: var(--label-3); animation: aiDot 1.1s infinite ease-in-out; }
.ai-dots i:nth-child(2) { animation-delay: .16s; }
.ai-dots i:nth-child(3) { animation-delay: .32s; }
@keyframes aiDot { 0%, 60%, 100% { opacity: .28; transform: translateY(0); } 30% { opacity: 1; transform: translateY(-3px); } }

.ai-empty { text-align: center; padding: 34px 16px 22px; }
.ae-ico {
  width: 54px; height: 54px; border-radius: 17px; margin: 0 auto 12px;
  display: grid; place-items: center;
  background: linear-gradient(150deg, rgba(10,132,255,.14), rgba(94,92,230,.12)); color: var(--tint);
}
.ae-t { font-size: 15px; font-weight: 650; }
.ae-s { font-size: 12.5px; color: var(--label-2); margin-top: 5px; }
.ai-quick { margin-bottom: 10px; }
.ai-input {
  position: sticky; bottom: 0; margin-top: 8px; padding: 10px;
  border-radius: 18px; background: var(--card); box-shadow: var(--shadow-m);
}
.ai-ta {
  width: 100%; border: 0; background: transparent; color: var(--label);
  font-family: inherit; font-size: 14px; line-height: 1.6; resize: none; outline: none;
  max-height: 120px;
}
.ai-bar { display: flex; align-items: center; gap: 8px; margin-top: 6px; }
.ai-file {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 6px 10px; border-radius: 10px; background: var(--fill);
  font-size: 12px; color: var(--label-2); cursor: pointer;
}
.ai-hint { flex: 1; font-size: 10.5px; color: var(--label-3); }
.ai-send {
  width: 36px; height: 36px; border: 0; border-radius: 50%;
  background: var(--tint); color: #fff; display: grid; place-items: center; cursor: pointer;
}
.ai-send:disabled { opacity: .45; }
.ai-imgpick { position: relative; width: 62px; height: 62px; margin-bottom: 8px; border-radius: 10px; overflow: hidden; }
.ai-imgpick img { width: 100%; height: 100%; object-fit: cover; }
.ai-imgpick button {
  position: absolute; top: 2px; right: 2px; width: 18px; height: 18px;
  border: 0; border-radius: 50%; background: rgba(0,0,0,.6); color: #fff;
  display: grid; place-items: center; padding: 0; cursor: pointer;
}

/* ============================================================
   Agent 应用（AI 智能问答）
   ============================================================ */
.ag-newbtn {
  display: inline-flex; align-items: center; gap: 4px;
  border: 0; border-radius: 10px; padding: 6px 10px;
  background: var(--fill); color: var(--tint);
  font-family: inherit; font-size: 12.5px; font-weight: 650; cursor: pointer;
}
.ag-hero {
  margin-top: 12px; padding: 14px 15px;
  display: flex; align-items: center; gap: 12px;
}
.ag-orb {
  width: 44px; height: 44px; border-radius: 15px; flex: 0 0 auto;
  display: grid; place-items: center; color: #fff;
  background: linear-gradient(150deg, #0a84ff, #5e5ce6 68%, #bf5af2);
  box-shadow: 0 10px 22px -10px rgba(94, 92, 230, .8);
}
.ag-hero-main { min-width: 0; flex: 1; }
.ag-name { font-size: 15.5px; font-weight: 700; display: flex; align-items: center; gap: 7px; }
.ag-live { display: inline-flex; align-items: center; gap: 4px; font-size: 10.5px; font-weight: 650; color: var(--green); }
.ag-live i { width: 5px; height: 5px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 3px var(--green-soft); }
.ag-sub {
  font-size: 11.5px; color: var(--label-2); margin-top: 4px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.ag-caps { display: flex; gap: 6px; margin-top: 10px; overflow-x: auto; padding-bottom: 2px; }
.ag-caps::-webkit-scrollbar { display: none; }
.ag-cap {
  flex: 0 0 auto;
  border: 0; border-radius: 999px; padding: 6px 11px; background: var(--card);
  box-shadow: var(--shadow-s); color: var(--label-2);
  display: flex; align-items: center; gap: 5px;
  font-family: inherit; font-size: 11px; cursor: pointer; line-height: 1.3;
}
.ag-cap svg { color: var(--tint); }
.ag-cap b { font-size: 11.5px; font-weight: 650; color: var(--label); }
.ag-ctx {
  margin-top: 10px; padding: 8px 12px; border-radius: 14px; background: var(--fill);
  display: flex; align-items: center; gap: 10px;
}
.ag-ctx-t { flex: 1; display: flex; align-items: flex-start; gap: 6px; font-size: 11.5px; color: var(--label-2); line-height: 1.5; }
.ag-ctx-t svg { flex: 0 0 auto; margin-top: 2px; color: var(--label-3); }
.ag-ctx.slim { margin-top: 8px; padding: 5px 12px; }
.ag-ctx.slim .ag-ctx-t { font-size: 11px; }
.ag-modes { margin-top: 12px; }
.ag-mode-hint { margin-top: 7px; font-size: 11px; color: var(--label-3); }
.ag-thread { margin-top: 12px; }
.ag-quick { margin: 10px 0 0; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
.ag-quick::-webkit-scrollbar { display: none; }
.ag-quick .tool-chip { flex: 0 0 auto; white-space: nowrap; }
.ag-body { display: flex; flex-direction: column; gap: 6px; min-width: 0; max-width: 86%; }
.ag-body .ai-bubble { max-width: 100%; }
.ag-tools { display: flex; flex-wrap: wrap; gap: 5px; }
.ag-tool {
  display: inline-flex; align-items: center; gap: 4px;
  border: .5px solid var(--sep); border-radius: 999px; padding: 3px 8px;
  background: var(--card); color: var(--label-2);
  font-family: inherit; font-size: 10.5px; cursor: pointer;
}
.ag-tool.on { color: var(--tint); border-color: var(--tint); background: var(--tint-soft); }
.ag-tool-detail {
  font-size: 11px; line-height: 1.62; color: var(--label-2);
  background: var(--fill); border-radius: 10px; padding: 8px 10px;
  white-space: pre-wrap; word-break: break-word;
}
.ag-welcome { text-align: center; padding: 20px 0 4px; }.ag-skill-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 16px; }
.ag-skill {
  border: 0; border-radius: 15px; padding: 11px 12px; text-align: left;
  background: var(--card); box-shadow: var(--shadow-s); cursor: pointer;
  display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto;
  gap: 1px 8px; align-items: center; font-family: inherit;
}
.ag-skill-ico {
  grid-row: span 2; width: 30px; height: 30px; border-radius: 10px;
  background: var(--fill); display: grid; place-items: center;
}
.ag-skill-t { font-size: 12.5px; font-weight: 650; color: var(--label); }
.ag-skill-s { font-size: 10.5px; color: var(--label-3); }

/* 整屏定高：对话区内部滚动，输入框固定在底部，任何屏高都不会压住内容 */
.screen.is-agent { display: flex; flex-direction: column; overflow: hidden; padding-bottom: 0; }
.screen.is-agent > .screen-head,
.screen.is-agent > .head-title { flex: 0 0 auto; width: 100%; }
.screen.is-agent > .head-title { max-width: 820px; }
.screen.is-agent .ag-modes { width: 100%; }
.screen.is-agent .agent-page {
  flex: 1 1 auto; min-height: 0; width: 100%;
  display: flex; flex-direction: column;
  padding-bottom: 6px;
}
.screen.is-agent .ag-thread {
  flex: 1 1 auto; min-height: 0; overflow-y: auto;
  overscroll-behavior: contain; scrollbar-width: none;
}
.screen.is-agent .ag-thread::-webkit-scrollbar { display: none; }
.screen.is-agent .ag-hero,
.screen.is-agent .ag-caps,
.screen.is-agent .ag-ctx,
.screen.is-agent .ag-modes,
.screen.is-agent .ag-mode-hint,
.screen.is-agent .ag-quick,
.screen.is-agent .ag-input,
.screen.is-agent .agent-page > .foot-note,
.screen.is-agent .agent-page > .acc-err { flex: 0 0 auto; }
.screen.is-agent .ag-input { position: static; margin-top: 8px; }
.screen.is-agent .ag-welcome { padding-top: 12px; }
.screen.is-agent .ag-welcome .ae-ico { width: 46px; height: 46px; border-radius: 15px; margin-bottom: 10px; }

/* 矮屏（iPhone SE 一类）：收起身份卡与工具条，把高度让给对话 */
@media (max-height: 720px) {
  .screen.is-agent .ag-hero,
  .screen.is-agent .ag-caps,
  .screen.is-agent .ag-mode-hint { display: none; }
  .screen.is-agent .head-title { padding-top: 0; padding-bottom: 2px; }
  .screen.is-agent .head-title h1 { font-size: 26px; }
  .screen.is-agent .head-sub { display: none; }
  .screen.is-agent .ag-welcome { padding-top: 6px; }
}

/* 答疑页 → Agent 应用 的引导条 */
.ag-link {
  margin-top: 12px; width: 100%; display: flex; align-items: center; gap: 10px;
  border: 0; border-radius: 15px; padding: 11px 13px; cursor: pointer; text-align: left;
  background: linear-gradient(120deg, rgba(94, 92, 230, .14), rgba(10, 132, 255, .08));
  font-family: inherit; color: var(--label);
}
.al-ico {
  width: 28px; height: 28px; border-radius: 9px; flex: 0 0 auto;
  background: linear-gradient(150deg, #0a84ff, #5e5ce6); color: #fff;
  display: grid; place-items: center;
}
.al-t { flex: 1; display: flex; flex-direction: column; gap: 2px; font-size: 12.5px; font-weight: 650; }
.al-t em { font-style: normal; font-size: 10.5px; font-weight: 400; color: var(--label-2); }
.al-arrow { color: var(--label-3); display: grid; place-items: center; }

/* ============================================================
   计划与公告
   ============================================================ */
.plan-remind { margin-top: 12px; padding: 16px; }
.pr-head { display: flex; align-items: center; gap: 12px; }
.pr-t { font-size: 15px; font-weight: 650; }
.pr-s { font-size: 12px; color: var(--label-2); margin-top: 3px; }
.pr-time { display: flex; align-items: center; gap: 10px; margin-top: 14px; }
.pr-time label { font-size: 13px; color: var(--label-2); }
.pr-time input {
  border: 0; border-radius: 10px; padding: 8px 10px;
  background: var(--fill); color: var(--label);
  font-family: inherit; font-size: 14px;
}
.pr-note { font-size: 11px; color: var(--label-3); margin-top: 10px; line-height: 1.55; }
.plan-today { margin-top: 10px; padding: 14px 16px; }
.pt-head { font-size: 12.5px; font-weight: 650; color: var(--label-2); margin-bottom: 4px; }
.pt-acts { display: flex; gap: 8px; margin-top: 12px; }
.pt-acts .btn-ghost { flex: 1; height: 38px; font-size: 13.5px; }
.ann-list { display: flex; flex-direction: column; gap: 9px; margin-top: 10px; }
.ann-card { padding: 13px 15px; }
.an-head { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.an-tag {
  font-size: 10px; font-weight: 750; padding: 2.5px 6px; border-radius: 6px;
  background: var(--tint-soft); color: var(--tint);
}
.an-tag.update { background: var(--orange-soft); color: var(--orange); }
.an-tag.warn { background: var(--red-soft); color: var(--red); }
.an-title { font-size: 13.5px; font-weight: 650; }
.an-pin { font-size: 10px; color: var(--label-3); }
.an-body { font-size: 12.5px; color: var(--label-2); line-height: 1.68; margin-top: 5px; }
.an-date { font-size: 10.5px; color: var(--label-3); margin-top: 7px; }

/* ============================================================
   桌面端
   ============================================================ */
@media (min-width: 980px) {
  .screen.is-ext .head-title, .screen.is-ext .head-bar { max-width: 880px; margin-left: auto; margin-right: auto; }
  .pad.stats-page, .pad.graph-page, .pad.smart-page, .pad.path-page,
  .pad.tool-page, .pad.ai-page, .pad.agent-page, .pad.plan-page, .pad.wa-page { max-width: 880px; margin-left: auto; margin-right: auto; }
  .pad.tool-page { max-width: 820px; }
  .pad.ai-page { max-width: 820px; }
  .pad.agent-page { max-width: 820px; }
  .sg-card:hover, .stats-card:hover, .card:hover { /* 保持克制，仅提升阴影 */ }
  .graph-card { padding: 16px 18px; }
  .quick-grid { grid-template-columns: repeat(4, 1fr); }
  .quick { flex-direction: row; justify-content: center; gap: 7px; padding: 9px 6px; font-size: 12px; }
  .goals { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
  .plot-cv { height: 340px; }
  .pad-cv { height: 520px; }
  .ai-input { position: static; }
  .ai-thread { min-height: 320px; }
}
