/* ============================================================
   物理知识体系图书馆 · 样式表
   ============================================================ */

/* ---------- 变量与主题 ---------- */
:root {
  --bg: #f5f7fb;
  --bg-soft: #eef1f8;
  --card: #ffffff;
  --card-2: #fbfcfe;
  --text: #1b2536;
  --text-2: #586173;
  --text-3: #8b93a6;
  --line: #e7ebf3;
  --line-2: #d8dfeb;
  --accent: #3f6cf0;
  --accent-soft: #eaf0ff;
  --accent-softs: #ffffff;
  --accent-2: #7b5cf5;
  --shadow: 0 1px 2px rgba(17, 24, 46, .03), 0 6px 18px rgba(17, 24, 46, .05);
  --shadow-lg: 0 4px 10px rgba(17, 24, 46, .06), 0 20px 48px rgba(17, 24, 46, .10);
  --shadow-inset: inset 0 1px 0 rgba(255, 255, 255, .6);
  --radius: 16px;
  --radius-sm: 10px;
  --ring: 0 0 0 3px color-mix(in srgb, var(--accent) 28%, transparent);
  --grad: linear-gradient(135deg, var(--accent), var(--accent-2));
  --mono: 'JetBrains Mono', 'Cascadia Code', Consolas, 'SF Mono', Menlo, monospace;
  --sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB',
          'Microsoft YaHei', 'Source Han Sans SC', 'Noto Sans CJK SC', sans-serif;
  --serif: Georgia, 'Songti SC', 'SimSun', serif;

  --c-mech: #4f8cff;
  --c-therm: #f5a524;
  --c-elec: #22c1a4;
  --c-opt: #a55eea;
  --c-mod: #e17055;
  --formula: #2a3f6e;        /* 公式主色：比正文略深，聚焦且不刺眼 */
  --bg-card: #ffffff;        /* 卡片底色（mastery 教材大卡、搜索框、筛选项等） */
}

html[data-theme='dark'] {
  --bg: #0f1420;
  --bg-soft: #161d2c;
  --card: #171e2e;
  --card-2: #1c2436;
  --text: #e8edf7;
  --text-2: #a7b2c8;
  --text-3: #74809a;
  --line: #283149;
  --line-2: #34425e;
  --accent: #6f97ff;
  --accent-soft: #1d2740;
  --accent-softs: #0b0f18;
  --accent-2: #9b81ff;
  --formula: #bcd2ff;        /* 深色模式：柔和淡蓝，避免公式纯白难辨 */
  --bg-card: #1b2438;        /* 卡片底色：略亮于 --card，区分层次 */
  --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 22px rgba(0, 0, 0, .26);
  --shadow-lg: 0 4px 12px rgba(0, 0, 0, .34), 0 22px 52px rgba(0, 0, 0, .44);
  --shadow-inset: inset 0 1px 0 rgba(255, 255, 255, .05);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--sans);
  background: var(--bg);
  color: var(--text);
  line-height: 1.72;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-feature-settings: "kern" 1, "liga" 1;
  transition: background .25s, color .25s;
}

a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.9;
      stroke-linecap: round; stroke-linejoin: round; }

:focus-visible { outline: none; box-shadow: var(--ring); }
a:focus-visible, button:focus-visible, input:focus-visible, .btn:focus-visible,
.icon-btn:focus-visible, .tag:focus-visible { box-shadow: var(--ring); }

::selection { background: color-mix(in srgb, var(--accent) 86%, #000); color: #fff; }

/* 滚动条 */
::-webkit-scrollbar { width: 11px; height: 11px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--line-2); border-radius: 8px; border: 3px solid var(--bg); }
::-webkit-scrollbar-thumb:hover { background: var(--text-3); }

/* ---------- 顶栏 ---------- */
.topbar {
  position: sticky; top: 0; z-index: 200;
  background: color-mix(in srgb, var(--card) 82%, transparent);
  backdrop-filter: saturate(200%) blur(18px);
  border-bottom: 1px solid var(--line);
}
.topbar-inner {
  max-width: 1280px; margin: 0 auto; padding: 0 24px;
  height: 60px; display: flex; align-items: center; gap: 14px;
}
.brand { display: flex; align-items: center; gap: 11px; flex-shrink: 0; }
.brand-mark {
  width: 36px; height: 36px; border-radius: 10px; flex-shrink: 0;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff; display: grid; place-items: center;
  font-size: 20px; font-weight: 600; font-family: var(--serif);
  box-shadow: 0 4px 14px color-mix(in srgb, var(--accent) 40%, transparent);
}
.brand-text { display: flex; flex-direction: column; line-height: 1.25; }
.brand-text b { font-size: 15px; letter-spacing: .2px; }
.brand-text i { font-size: 10.5px; color: var(--text-3); font-style: normal; letter-spacing: .3px; }

.nav {
  display: flex; gap: 2px; margin-left: auto; min-width: 0;
  flex: 1 1 auto; overflow-x: auto; scrollbar-width: none; -ms-overflow-style: none;
  justify-content: center; justify-content: safe center;
}
.nav::-webkit-scrollbar { display: none; }
.nav a {
  padding: 6px 11px; border-radius: 8px; font-size: 13px; color: var(--text-2);
  transition: .16s; white-space: nowrap; flex-shrink: 0;
}
.nav a:hover { background: var(--bg-soft); color: var(--text); }
.nav a.active {
  background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 15%, transparent), color-mix(in srgb, var(--accent-2) 15%, transparent));
  color: var(--accent); font-weight: 700;
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 24%, transparent);
}

.topbar-tools { display: flex; gap: 4px; }
.icon-btn {
  width: 36px; height: 36px; border-radius: 9px; display: grid; place-items: center;
  color: var(--text-2); transition: .16s;
}
.icon-btn:hover { background: var(--bg-soft); color: var(--text); }
.nav-toggle { display: none; }

.scroll-progress {
  position: absolute; bottom: -1px; left: 0; height: 2px; width: 0;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  transition: width .1s linear;
}

/* ---------- 布局 ---------- */
.wrap { max-width: 1280px; margin: 0 auto; padding: 0 24px; }

/* 各功能页页头（统一间距，避免标题贴顶栏） */
.view-hero { margin-bottom: 22px; }
.view-hero h1 { font-size: 28px; margin: 0 0 8px; color: var(--text); }
.view-hero .view-sub { color: var(--text-3); font-size: 14px; line-height: 1.7; margin: 0; }
.page { padding: 48px 0 80px; animation: fadeUp .38s cubic-bezier(.2,.7,.3,1); }
@keyframes fadeUp { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }

.page-head { margin-bottom: 30px; }
.page-head h1 { font-size: 32px; margin: 0 0 10px; letter-spacing: -.4px; font-weight: 700; }
.page-head h1::before { content: ""; display: block; width: 38px; height: 4px; border-radius: 4px;
                       background: var(--grad); margin-bottom: 14px; }
.page-head p { margin: 0; color: var(--text-2); font-size: 14.5px; max-width: 760px; }
.page-head p.const-note {
  margin-top: 10px; padding: 10px 14px; border-radius: var(--radius-sm);
  background: var(--accent-soft); border-left: 3px solid var(--accent);
  font-size: 13px; line-height: 1.75; max-width: 860px;
}
.page-head p.const-note b { color: var(--accent); }

.crumb { font-size: 12.5px; color: var(--text-3); margin-bottom: 14px; display: flex;
         align-items: center; gap: 7px; flex-wrap: wrap; }
.crumb a:hover { color: var(--accent); }
.crumb span { opacity: .5; }

/* ---------- 首页 Hero ---------- */
.hero {
  position: relative; overflow: hidden;
  border-bottom: 1px solid var(--line);
  background:
    radial-gradient(900px 420px at 12% -10%, color-mix(in srgb, var(--accent) 14%, transparent), transparent 70%),
    radial-gradient(760px 380px at 88% 0%, color-mix(in srgb, var(--accent-2) 12%, transparent), transparent 70%);
}
/* 深色模式：增强首页 Hero 背景光晕，避免渐变在暗底上几乎不可见 */
html[data-theme='dark'] .hero {
  background:
    radial-gradient(900px 420px at 12% -10%, color-mix(in srgb, var(--accent) 24%, transparent), transparent 70%),
    radial-gradient(760px 380px at 88% 0%, color-mix(in srgb, var(--accent-2) 20%, transparent), transparent 70%);
}
.hero-grid {
  position: absolute; inset: 0; opacity: .5; pointer-events: none;
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 46px 46px;
  mask-image: radial-gradient(700px 340px at 50% 20%, #000 20%, transparent 78%);
}
.hero-inner { position: relative; max-width: 1280px; margin: 0 auto; padding: 76px 24px 62px; }
.hero-badge {
  display: inline-flex; align-items: center; gap: 8px; padding: 5px 13px 5px 8px;
  border: 1px solid var(--line-2); border-radius: 999px; background: var(--card);
  font-size: 12px; color: var(--text-2); margin-bottom: 22px; box-shadow: var(--shadow);
}
.hero-badge b { color: var(--accent); font-weight: 600; }
.hero-badge .dot { width: 6px; height: 6px; border-radius: 50%; background: #22c55e;
                   box-shadow: 0 0 0 3px color-mix(in srgb, #22c55e 22%, transparent); }
.hero h1 {
  font-size: clamp(30px, 4.6vw, 52px); line-height: 1.16; margin: 0 0 18px;
  letter-spacing: -1.4px; font-weight: 800; max-width: 900px;
}
.hero h1 em {
  font-style: normal;
  background: linear-gradient(120deg, var(--accent), var(--accent-2) 60%, #e17055);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero p.lead { font-size: 16px; color: var(--text-2); max-width: 660px; margin: 0 0 30px; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }

.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 11px 20px; border-radius: var(--radius-sm); font-size: 14px; font-weight: 600;
  border: 1px solid var(--line-2); background: var(--card); color: var(--text);
  transition: transform .18s, box-shadow .18s, background .18s, border-color .18s;
  box-shadow: var(--shadow);
}
.btn:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.btn:active { transform: translateY(0); box-shadow: var(--shadow); }
.btn svg { width: 17px; height: 17px; }
.btn-primary {
  background: var(--grad);
  color: #fff; border-color: transparent;
  box-shadow: 0 6px 20px color-mix(in srgb, var(--accent) 34%, transparent), var(--shadow-inset);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 10px 30px color-mix(in srgb, var(--accent) 44%, transparent), var(--shadow-inset); }
.btn-primary:active { transform: translateY(0); }
.btn-sm { padding: 7px 14px; font-size: 12.5px; }

/* 统计条 */
.stats {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 1px; background: var(--line); border: 1px solid var(--line);
  border-radius: var(--radius); overflow: hidden; margin-top: 44px;
}
.stat { background: var(--card); padding: 20px 22px; }
.stat b { display: block; font-size: 27px; font-weight: 700; letter-spacing: -.8px;
          font-family: var(--mono); line-height: 1.2; color: var(--accent);
          background: var(--grad); -webkit-background-clip: text; background-clip: text;
          -webkit-text-fill-color: transparent; }
.stat span { font-size: 12px; color: var(--text-3); }

/* ---------- 区块标题 ---------- */
.sec { padding: 64px 0; }
.sec-head { display: flex; align-items: flex-end; justify-content: space-between;
            gap: 20px; margin-bottom: 26px; flex-wrap: wrap; }
.sec-head h2 { font-size: 24px; margin: 0 0 6px; letter-spacing: -.3px; display: flex; align-items: center; gap: 11px; }
.sec-head h2::before {
  content: ""; width: 22px; height: 4px; border-radius: 4px; background: var(--grad); flex-shrink: 0;
}
.sec-head p { margin: 0; font-size: 13.5px; color: var(--text-2); }
.sec-link { font-size: 13px; color: var(--accent); font-weight: 600; display: inline-flex;
            align-items: center; gap: 5px; }
.sec-link svg { width: 15px; height: 15px; }
.sec-link:hover { gap: 9px; }

/* ---------- 卡片网格 ---------- */
.grid { display: grid; gap: 18px; }
.g2 { grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); }
.g3 { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.g4 { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
/* 教材书库页：严格三本一行 */
.books-grid { grid-template-columns: repeat(3, 1fr); gap: 20px; }

.home-footer { margin-top: 8px; }
.home-footer-grid { grid-template-columns: repeat(2, 1fr); gap: 16px; }
.home-footer-card { display: flex; align-items: center; gap: 16px; text-decoration: none; color: inherit; transition: .2s; }
.home-footer-card:hover { border-color: var(--accent); transform: translateY(-2px); box-shadow: var(--shadow); }
.home-footer-card h3 { margin: 0 0 4px; font-size: 16px; color: var(--text); }
.home-footer-card p { margin: 0; font-size: 13px; line-height: 1.6; color: var(--text-2); }

.card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px; transition: transform .2s, box-shadow .2s, border-color .2s; position: relative; overflow: hidden;
}
.card::after {
  content: ""; position: absolute; left: 18px; right: 18px; top: 0; height: 2px; border-radius: 0 0 3px 3px;
  background: var(--grad); opacity: 0; transition: opacity .22s;
}
.card:hover { border-color: var(--line-2); box-shadow: var(--shadow-lg); transform: translateY(-3px); }
.card:hover::after { opacity: 1; }
.card h3 { margin: 0 0 7px; font-size: 15.5px; letter-spacing: -.1px; }
.card p { margin: 0; font-size: 13px; color: var(--text-2); }

/* ---------- 领域卡 ---------- */
.domain-card { padding-left: 22px; }
.domain-card::before {
  content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--dc);
}
.domain-card .dc-top { display: flex; align-items: center; gap: 11px; margin-bottom: 12px; }
.dc-icon {
  width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center;
  font-family: var(--serif); font-size: 17px; font-weight: 700; color: #fff; background: var(--dc);
  flex-shrink: 0;
}
.dc-count { margin-left: auto; font-size: 11.5px; color: var(--text-3); font-family: var(--mono); }
.dc-path { font-size: 12px; color: var(--text-2); line-height: 1.85;
           padding-top: 12px; margin-top: 12px; border-top: 1px dashed var(--line); }

/* ---------- 学习方法卡（首页初学者引导） ---------- */
.method-grid { grid-template-columns: repeat(3, 1fr); }
.method-card { padding-left: 22px; }
.method-card::before {
  content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 4px;
  background: var(--mc, var(--accent)); border-radius: var(--radius) 0 0 var(--radius);
}
.method-top { display: flex; align-items: center; gap: 10px; margin-bottom: 11px; }
.method-no {
  font-family: var(--mono); font-size: 12px; font-weight: 700; color: var(--mc, var(--accent));
  background: color-mix(in srgb, var(--mc, var(--accent)) 14%, transparent);
  border-radius: 6px; padding: 2px 7px; flex-shrink: 0;
}
.method-card h3 { font-size: 14.5px; margin: 0; line-height: 1.35; }
.method-desc { font-size: 13px; color: var(--text-2); line-height: 1.8; }
.method-math {
  margin: 11px 0 0; padding: 9px 12px; border-radius: 9px; text-align: center;
  background: var(--bg-soft); border: 1px solid var(--line);
}
.method-math .katex { font-size: 1.15em; color: var(--formula); }
/* 公式主色：深色模式下避免纯白难辨；渐变标题文字内的公式保持透明，不被覆盖 */
.katex { color: var(--formula); }
.hero h1 em .katex { color: transparent; }
.method-how {
  margin-top: 12px; padding-top: 11px; border-top: 1px dashed var(--line);
  font-size: 12.5px; color: var(--text-2); line-height: 1.75;
}
.method-how b { color: var(--mc, var(--accent)); }
.method-foot { margin: 24px 0 0; font-size: 13.5px; color: var(--text-2); text-align: center; line-height: 1.8; }
.method-foot a {
  color: var(--accent); font-weight: 600; text-decoration: none;
  border-bottom: 1px solid color-mix(in srgb, var(--accent) 40%, transparent);
}
.method-foot a:hover { border-bottom-color: var(--accent); }

@media (max-width: 1230px) { .books-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 920px) { .method-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 880px) { .books-grid { grid-template-columns: repeat(1, 1fr); } }
@media (max-width: 600px) { .method-grid { grid-template-columns: 1fr; } }

/* ---------- 书籍卡 ---------- */
.book-card { display: flex; gap: 16px; cursor: pointer; align-items: stretch; }
.book-cover {
  width: 100px; flex-shrink: 0; border-radius: 6px; overflow: hidden;
  position: relative; background: var(--bc, #eef2f7); align-self: flex-start;
  aspect-ratio: 3 / 4; box-shadow: 3px 4px 16px rgba(20,40,80,.14);
}
.book-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.book-cover-bar {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 18px 9px 9px;
  display: flex; flex-direction: column; gap: 2px; color: #fff;
  background: linear-gradient(transparent, rgba(0,0,0,.74));
}
.book-cover-bar i { font-size: 9.5px; font-style: normal; opacity: .85; letter-spacing: .4px; }
.book-cover-bar b { font-size: 12.5px; line-height: 1.3; font-weight: 600; }
.book-cover.no-cover {
  background: linear-gradient(150deg, var(--bc), color-mix(in srgb, var(--bc) 62%, #000));
}
.book-cover.no-cover .book-cover-bar { background: linear-gradient(transparent, rgba(0,0,0,.34)); }
.book-info { min-width: 0; flex: 1; display: flex; flex-direction: column; }
.book-info h3 { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.book-info > p { color: var(--text-2); font-size: 12.5px; line-height: 1.75; }
.book-meta { display: flex; gap: 12px; font-size: 11.5px; color: var(--text-3);
             font-family: var(--mono); margin-top: 9px; flex-wrap: wrap; }
.book-doms { display: flex; gap: 5px; flex-wrap: wrap; margin-top: 10px; }
.book-actions { display: flex; gap: 6px; margin-top: auto; padding-top: 12px; flex-wrap: wrap; }
.bact {
  display: inline-flex; align-items: center; justify-content: center; gap: 5px;
  padding: 6px 10px; border-radius: 7px; font-size: 12px; font-weight: 600;
  border: 1px solid var(--line-2); background: var(--bg-soft); color: var(--text-2);
  transition: .15s; text-decoration: none;
}
.bact svg { width: 14px; height: 14px; }
.bact:hover { transform: translateY(-1px); background: var(--card); border-color: var(--line); color: var(--text); box-shadow: var(--shadow); }
.bact-read { background: var(--accent-soft); color: var(--accent); border-color: var(--accent-soft); }
.bact-read:hover { background: var(--accent); color: #fff; border-color: var(--accent); }
.bact-toc { background: transparent; }

/* ---------- 标签 ---------- */
.tag {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 2px 9px; border-radius: 6px; font-size: 11px; font-weight: 600;
  background: var(--bg-soft); color: var(--text-2); border: 1px solid var(--line);
  white-space: nowrap;
}
.tag-junior { background: #e8f5e9; color: #2e7d32; border-color: #c8e6c9; }
.tag-senior { background: #e3f2fd; color: #1565c0; border-color: #bbdefb; }
html[data-theme='dark'] .tag-junior { background: #17301c; color: #7fd48c; border-color: #24462a; }
html[data-theme='dark'] .tag-senior { background: #14263c; color: #7fb5f0; border-color: #1e3a56; }

.tag-dom { color: #fff; border-color: transparent; }

/* ---------- 章节列表 ---------- */
.chapter {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  margin-bottom: 12px; overflow: hidden; transition: .2s;
}
.chapter:hover { border-color: var(--line-2); }
.ch-head {
  display: flex; align-items: center; gap: 14px; padding: 16px 20px;
  cursor: pointer; user-select: none;
}
.ch-head:hover { background: var(--card-2); }
.ch-no {
  font-family: var(--mono); font-size: 11px; color: #fff; background: var(--chc);
  padding: 3px 9px; border-radius: 6px; flex-shrink: 0; font-weight: 600;
}
.ch-title { font-size: 15px; font-weight: 600; flex: 1; min-width: 0; }
.ch-title:hover { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
a.ch-title { text-decoration: none; cursor: pointer; }
.ch-page { font-family: var(--mono); font-size: 11.5px; color: var(--text-3); }
a.ch-page { text-decoration: none; cursor: pointer; }
a.ch-page:hover { color: var(--accent); }
.ch-arrow { transition: transform .25s; color: var(--text-3); flex-shrink: 0; }
.chapter.open .ch-arrow { transform: rotate(180deg); }
.ch-body {
  max-height: 0; overflow: hidden; transition: max-height .34s cubic-bezier(.2,.7,.3,1);
}
.chapter.open .ch-body { max-height: 2400px; }
.ch-body-inner { padding: 0 20px 18px; border-top: 1px solid var(--line); padding-top: 15px; }
.ch-summary {
  font-size: 13px; color: var(--text-2); background: var(--bg-soft);
  padding: 11px 14px; border-radius: var(--radius-sm); margin-bottom: 14px;
  border-left: 3px solid var(--chc);
}

.section-item {
  display: flex; gap: 13px; padding: 12px 0; border-bottom: 1px dashed var(--line);
}
.section-item:last-child { border-bottom: none; }
.sec-no {
  font-family: var(--mono); font-size: 11px; color: var(--text-3); flex-shrink: 0;
  min-width: 42px; padding-top: 3px;
}
.sec-body { flex: 1; min-width: 0; }
.sec-name { font-size: 13.8px; font-weight: 600; margin-bottom: 6px; display: flex;
            align-items: baseline; gap: 8px; flex-wrap: wrap; text-decoration: none; color: inherit; cursor: pointer; }
.sec-name:hover { color: var(--accent); }
.sec-name .pg { font-family: var(--mono); font-size: 10.5px; color: var(--text-3);
                font-weight: 400; }
.points { display: flex; flex-wrap: wrap; gap: 6px; }
.point {
  font-size: 11.5px; padding: 3px 9px; border-radius: 6px;
  background: var(--bg-soft); color: var(--text-2); border: 1px solid var(--line);
  text-decoration: none; cursor: pointer; transition: all .15s;
}
.point:hover { background: var(--accent); color: #fff; border-color: var(--accent); }

/* ---------- 知识图谱 ---------- */
.graph-toolbar {
  display: flex; gap: 10px; flex-wrap: wrap; align-items: center;
  padding: 14px 18px; background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); margin-bottom: 18px;
}
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip {
  padding: 6px 13px; border-radius: 999px; font-size: 12.5px; font-weight: 600;
  border: 1px solid var(--line-2); background: var(--card); color: var(--text-2);
  transition: .16s; display: inline-flex; align-items: center; gap: 6px;
}
.chip:hover { border-color: var(--text-3); }
.chip.on { color: #fff; border-color: transparent; }
.chip .cdot { width: 8px; height: 8px; border-radius: 50%; background: currentColor; opacity: .8; }
.tb-label { font-size: 12px; color: var(--text-3); font-weight: 600; margin-right: 2px; }
.tb-sep { width: 1px; height: 22px; background: var(--line); }

.graph-stage {
  position: relative; background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); overflow: hidden; height: 640px;
}
.graph-stage svg.gcanvas { width: 100%; height: 100%; display: block; cursor: grab; shape-rendering: geometricPrecision; }
.graph-stage svg.gcanvas:active { cursor: grabbing; }
.gnode-circle { cursor: pointer; transition: r .18s, opacity .2s; }
.gnode-label { font-size: 10.5px; font-weight: 400; fill: var(--text-2); pointer-events: none;
               font-family: var(--sans); transition: opacity .2s; text-rendering: optimizeLegibility;
               letter-spacing: 0; }
.gnode-label.sel { font-weight: 400; fill: var(--text); }
.glink { stroke: var(--line-2); stroke-width: 1.2; fill: none; transition: .2s; }
.glink.hl { stroke: var(--accent); stroke-width: 2.2; }
.gdim { opacity: .12; }

/* 全屏模式 */
.graph-stage.is-full {
  position: fixed; inset: 0; z-index: 9999; width: 100vw; height: 100vh;
  border-radius: 0; background: var(--bg);
}
.graph-stage.is-full .graph-legend,
.graph-stage.is-full .graph-zoom { bottom: 28px; }
.graph-stage.is-full .graph-toolbar-fs { display: none; }
.fs-btn {
  display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 600;
  padding: 7px 12px; border-radius: 9px; cursor: pointer; color: var(--text);
  background: var(--bg-soft); border: 1px solid var(--line-2); transition: background .15s, border-color .15s;
}
.fs-btn:hover { border-color: var(--accent); color: var(--accent); }
.fs-btn svg { width: 15px; height: 15px; }
.graph-fs { position: absolute; top: 14px; right: 14px; z-index: 6; }
.graph-stage.is-full .graph-fs { top: 22px; right: 22px; }

.graph-legend {
  position: absolute; left: 14px; bottom: 14px; display: flex; flex-direction: column; gap: 6px;
  background: color-mix(in srgb, var(--card) 92%, transparent); padding: 11px 13px;
  border: 1px solid var(--line); border-radius: var(--radius-sm); backdrop-filter: blur(8px);
}
.lg-item { display: flex; align-items: center; gap: 7px; font-size: 11.5px; color: var(--text-2); }
.lg-dot { width: 9px; height: 9px; border-radius: 50%; }

.graph-zoom {
  position: absolute; right: 14px; bottom: 14px; display: flex; flex-direction: column; gap: 5px;
}
.zoom-btn {
  width: 32px; height: 32px; border-radius: 8px; background: var(--card);
  border: 1px solid var(--line); display: grid; place-items: center; color: var(--text-2);
  font-size: 15px; box-shadow: var(--shadow);
}
.zoom-btn:hover { color: var(--accent); border-color: var(--accent); }

.node-panel {
  position: absolute; right: 14px; top: 14px; width: 300px;
  background: var(--card); border: 1px solid var(--line-2); border-radius: var(--radius);
  padding: 18px; box-shadow: var(--shadow-lg); display: none;
  max-height: calc(100% - 28px); overflow-y: auto;
}
.node-panel.show { display: block; animation: fadeUp .25s; }
.np-close { position: absolute; right: 12px; top: 12px; color: var(--text-3); }
.np-close:hover { color: var(--text); }
.np-dom { display: inline-flex; align-items: center; gap: 6px; font-size: 11px;
          font-weight: 700; margin-bottom: 8px; }
.node-panel h3 { margin: 0 0 10px; font-size: 16px; padding-right: 20px; }
.node-panel .np-brief { font-size: 13px; color: var(--text-2); margin: 0 0 14px; }
.np-row { display: flex; gap: 8px; font-size: 12px; padding: 7px 0;
          border-top: 1px dashed var(--line); }
.np-row b { color: var(--text-3); font-weight: 600; min-width: 54px; flex-shrink: 0; }
.np-deps { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 5px; }
.np-dep {
  font-size: 11px; padding: 2px 8px; border-radius: 5px; background: var(--accent-soft);
  color: var(--accent); border: 1px solid color-mix(in srgb, var(--accent) 26%, transparent);
  cursor: pointer;
}
.np-dep:hover { background: var(--accent); color: #fff; }
.np-actions { display: flex; gap: 8px; margin-top: 16px; flex-wrap: wrap; }
.np-btn {
  flex: 1 1 auto; text-align: center; font-size: 13px; font-weight: 600; text-decoration: none;
  padding: 9px 10px; border-radius: 9px; background: var(--accent); color: #fff;
  border: 1px solid transparent; transition: filter .15s;
}
.np-btn:hover { filter: brightness(1.06); }
.np-btn-read { background: #fff; color: var(--accent); border-color: color-mix(in srgb, var(--accent) 32%, transparent); }

/* 图谱节点右键菜单 */
.graph-cmenu {
  position: fixed; z-index: 60; min-width: 268px; display: none;
  background: var(--card); border: 1px solid var(--line-2); border-radius: 12px;
  box-shadow: var(--shadow-lg); padding: 6px; animation: fadeUp .16s;
  font-size: 13px;
}
.graph-cmenu .cm-head {
  padding: 8px 10px 9px; font-weight: 700; font-size: 13px; color: var(--text);
  border-bottom: 1px solid var(--line); margin-bottom: 4px;
}
.graph-cmenu .cm-item {
  display: flex; align-items: flex-start; gap: 9px; text-decoration: none;
  color: var(--text); padding: 9px 10px; border-radius: 8px; line-height: 1.35;
}
.graph-cmenu .cm-item:hover { background: var(--accent-soft); }
.graph-cmenu .cm-ic { font-size: 15px; line-height: 1.3; }
.graph-cmenu .cm-tx { display: flex; flex-direction: column; gap: 2px; }
.graph-cmenu .cm-go { color: var(--accent); font-weight: 700; }
.graph-cmenu .cm-page { color: var(--accent); font-weight: 700; }
.graph-cmenu .cm-sub { font-size: 11px; color: var(--text-3); }

/* 路径视图（列表式图谱） */
.path-domain { margin-bottom: 34px; }
.path-domain > h3 {
  display: flex; align-items: center; gap: 10px; font-size: 17px; margin: 0 0 4px;
}
.path-domain > p { margin: 0 0 16px; font-size: 12.5px; color: var(--text-3);
                   font-family: var(--mono); }
.path-flow { display: flex; flex-direction: column; gap: 0; }
.path-level { display: flex; gap: 10px; align-items: flex-start; padding: 3px 0; }
.pl-badge {
  font-family: var(--mono); font-size: 10px; color: var(--text-3); min-width: 30px;
  padding-top: 9px; text-align: right; flex-shrink: 0;
}
.pl-nodes { display: flex; flex-wrap: wrap; gap: 7px; flex: 1; padding: 4px 0; }
.pnode {
  padding: 6px 12px; border-radius: 8px; font-size: 12.5px; cursor: pointer;
  background: var(--card); border: 1px solid var(--line-2); transition: .16s;
  display: inline-flex; align-items: center; gap: 7px;
}
.pnode:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.pnode .pdot { width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; }
.pnode.jr { border-style: dashed; }

/* ---------- 公式表 ---------- */
.table-wrap {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: auto; max-height: calc(100vh - 200px);
}
table { width: 100%; border-collapse: collapse; font-size: 13px; }
thead th {
  text-align: left; padding: 12px 16px; background: var(--bg-soft);
  font-size: 11.5px; color: var(--text-3); font-weight: 700; letter-spacing: .4px;
  text-transform: uppercase; border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 5;
}
thead th::after { content: ''; position: absolute; left: 0; right: 0; bottom: -1px; border-bottom: 1px solid var(--line); }
tbody td { padding: 12px 16px; border-bottom: 1px solid var(--line); vertical-align: top; }
tbody tr:last-child td { border-bottom: none; }
tbody tr:hover { background: var(--card-2); }
.fml {
  font-family: var(--mono); font-size: 13.5px; font-weight: 600; color: var(--accent);
  background: var(--accent-soft); padding: 4px 10px; border-radius: 6px;
  display: inline-block; white-space: nowrap;
}
.td-name { font-weight: 600; }
.td-note { font-size: 11.5px; color: var(--text-3); }
.td-book { text-align: center; white-space: nowrap; }
.fml-read {
  display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 700;
  text-decoration: none; padding: 4px 9px; border-radius: 7px; color: var(--accent);
  background: var(--accent-soft); border: 1px solid transparent; transition: background .15s, border-color .15s, transform .12s;
}
.fml-read:hover { border-color: var(--accent); transform: translateY(-1px); }
.grp-row td {
  background: var(--bg-soft); font-weight: 700; font-size: 12px; color: var(--text-2);
  letter-spacing: .5px; padding: 9px 16px;
}

/* ---------- 常量卡 ---------- */
.const-card { text-align: left; padding: 16px 18px; }
.const-card .cs { font-family: var(--mono); font-size: 16px; color: var(--accent);
                  font-weight: 700; line-height: 1.4; }
.const-card .cv { font-family: var(--mono); font-size: 15px; font-weight: 600;
                  margin: 5px 0 3px; letter-spacing: -.2px; line-height: 1.5; }
.const-card .cs .katex, .const-card .cv .katex { font-size: 1em; }
.const-card .cn { font-size: 12.5px; }
.const-card .cu { font-size: 11px; color: var(--text-3); margin-top: 5px; }

.unit-card { padding: 14px 16px; }
.uc-title { font-size: 14px; font-weight: 700; color: var(--accent); margin-bottom: 8px; }
.uc-list { list-style: none; margin: 0; padding: 0; }
.uc-list li { font-family: var(--mono); font-size: 13px; line-height: 1.9; color: var(--text); border-bottom: 1px dashed var(--line); padding: 2px 0; }
.uc-list li:last-child { border-bottom: 0; }

/* ---------- 实验卡 ---------- */
.exp-card { display: flex; flex-direction: column; }
.exp-top { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; flex-wrap: wrap; }
.exp-goal { font-size: 12.5px; color: var(--text-2); margin: 0 0 12px;
            padding-bottom: 12px; border-bottom: 1px dashed var(--line); }
.exp-name { margin: 0 0 2px; font-size: 15px; color: var(--text); line-height: 1.4; }
.exp-alias { font-size: 12px; color: var(--text-3); line-height: 1.5; margin-bottom: 8px; }
.exp-key { margin: 0; padding: 0; list-style: none; display: flex;
           flex-direction: column; gap: 7px; }
.exp-key li { font-size: 12.5px; color: var(--text-2); padding-left: 18px; position: relative; }
.exp-key li::before {
  content: ''; position: absolute; left: 4px; top: 8px; width: 5px; height: 5px;
  border-radius: 50%; background: var(--accent);
}
.exp-foot { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); }
.exp-read {
  display: inline-flex; align-items: center; gap: 5px; font-size: 12.5px; font-weight: 600;
  color: var(--accent); text-decoration: none; padding: 6px 10px; border-radius: 7px;
  background: var(--accent-soft); border: 1px solid transparent; transition: background .15s, border-color .15s;
}
.exp-read:hover { border-color: var(--accent); }
.exp-card { cursor: pointer; transition: transform .12s, box-shadow .15s; }
.exp-card:hover { transform: translateY(-2px); }

/* ---------- 科学家卡 ---------- */
.sci-card { display: flex; flex-direction: column; }
.sci-top { display: flex; gap: 13px; align-items: flex-start; margin-bottom: 12px; }
.sci-avatar {
  width: 46px; height: 46px; border-radius: 12px; flex-shrink: 0; display: grid;
  place-items: center; font-family: var(--serif); font-size: 19px; font-weight: 700;
  color: #fff; background: linear-gradient(135deg, var(--sc), color-mix(in srgb, var(--sc) 55%, #000));
}
.sci-name { font-size: 15.5px; font-weight: 700; margin: 0; line-height: 1.3; }
.sci-en { font-size: 11.5px; color: var(--text-3); font-family: var(--mono); }
.sci-meta { font-size: 11.5px; color: var(--text-3); margin-top: 3px; }
.sci-contrib { font-size: 12.8px; color: var(--text-2); margin: 0; }
.sci-quote {
  margin: 12px 0 0; padding: 10px 13px; background: var(--bg-soft);
  border-left: 3px solid var(--sc); border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-size: 12px; color: var(--text-2); font-family: var(--serif); font-style: italic;
}
.sci-foot { margin-top: auto; padding-top: 12px; }
.sci-card[data-openable] { cursor: pointer; transition: transform .12s, box-shadow .15s, border-color .15s; }
.sci-card[data-openable]:hover { transform: translateY(-2px); border-color: var(--sc); box-shadow: 0 8px 22px rgba(0,0,0,.08); }
.sci-expand {
  margin-left: auto; color: var(--text-3); transition: transform .2s; align-self: center;
  display: inline-flex; width: 18px; height: 18px;
}
.sci-expand svg { width: 18px; height: 18px; }
.sci-card[data-openable]:hover .sci-expand { transform: translateX(3px); color: var(--sc); }

/* 科学家详情面板 —— 页内可关闭弹窗 */
.sci-detail { margin-top: 26px; }
.sci-detail[hidden] { display: none; }
.sci-detail {
  position: fixed; inset: 0; z-index: 1000;
  display: flex; align-items: flex-start; justify-content: center;
  padding: 7vh 20px 24px; overflow-y: auto;
  background: rgba(17, 24, 39, .42); backdrop-filter: blur(2px);
  animation: sciFade .16s ease;
}
@keyframes sciFade { from { opacity: 0 } to { opacity: 1 } }
.sci-detail-inner {
  position: relative; width: min(860px, 100%); background: var(--card);
  border: 1px solid var(--line-2); border-radius: var(--radius); padding: 28px 32px;
  box-shadow: 0 24px 70px rgba(0,0,0,.28); border-top: 4px solid var(--sc);
  animation: sciPop .18s ease;
}
@keyframes sciPop { from { transform: translateY(14px); opacity: 0 } to { transform: translateY(0); opacity: 1 } }
body.sci-modal-open { overflow: hidden; }
.sci-detail-close {
  position: absolute; top: 14px; right: 14px; width: 30px; height: 30px; border-radius: 8px;
  border: 1px solid var(--line-2); background: var(--bg-soft); color: var(--text-2);
  cursor: pointer; display: grid; place-items: center; transition: background .15s, color .15s;
}
.sci-detail-close:hover { background: var(--sc); color: #fff; }
.sci-detail-close svg { width: 16px; height: 16px; }
.sci-detail-head { display: flex; gap: 16px; align-items: center; margin-bottom: 8px; }
.sci-avatar.lg { width: 60px; height: 60px; font-size: 25px; border-radius: 14px; }
.sci-avatar img { width: 100%; height: 100%; object-fit: cover; border-radius: inherit; display: block; }
.sci-detail-head .sci-name { font-size: 19px; }
.sci-detail-head .sci-en { font-size: 12.5px; }
.sci-sec { margin-top: 20px; padding-top: 18px; border-top: 1px dashed var(--line); }
.sci-sec:first-of-type { border-top: none; padding-top: 0; }
.sci-sec h4 {
  margin: 0 0 10px; font-size: 13px; font-weight: 700; letter-spacing: .03em;
  color: var(--sc); position: relative; padding-left: 11px;
}
.sci-sec h4::before {
  content: ''; position: absolute; left: 0; top: 2px; bottom: 2px; width: 3px;
  border-radius: 2px; background: var(--sc);
}
.sci-bio { font-size: 13.5px; line-height: 1.85; color: var(--text); margin: 0; text-align: justify; }
.exp-scheme { font-size: 13.5px; line-height: 1.85; color: var(--text); text-align: justify; }
.exp-scheme p { margin: 0 0 9px; }
.exp-scheme p:last-child { margin-bottom: 0; }
.sci-node-desc { font-size: 12.8px; line-height: 1.7; color: var(--text-2); margin: 0 0 12px; }
.kd-links { display: flex; flex-wrap: wrap; gap: 10px; }
.kd-link {
  display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600;
  text-decoration: none; padding: 8px 13px; border-radius: 9px;
  color: var(--text); background: var(--bg-soft); border: 1px solid var(--line-2);
  transition: background .15s, border-color .15s, transform .12s;
}
.kd-link:hover { border-color: var(--sc); background: color-mix(in srgb, var(--sc) 10%, var(--bg-soft)); transform: translateY(-1px); }
.kd-book { color: var(--accent); }
.kd-book:hover { background: var(--accent-soft); border-color: var(--accent); }
.kd-lab { color: #157a3a; }
.kd-lab:hover { background: #eafaf0; border-color: #157a3a; }
.sci-links { display: flex; gap: 10px; flex-wrap: wrap; }
.sci-baidu {
  display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600;
  text-decoration: none; padding: 8px 14px; border-radius: 9px; color: #fff;
  background: linear-gradient(135deg, #2932e1, #4e6ef2); transition: opacity .15s, transform .12s;
}
.sci-baidu:hover { opacity: .9; transform: translateY(-1px); }
.sci-baidu svg { width: 14px; height: 14px; }

/* ---------- 筛选栏 ---------- */
.filters {
  display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 22px;
  padding: 13px 16px; background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius);
}
.filter-input {
  flex: 1; min-width: 180px; padding: 8px 13px; border-radius: 8px;
  border: 1px solid var(--line-2); background: var(--bg-soft); color: var(--text);
  font-size: 13px; font-family: inherit; outline: none; transition: .16s;
}
.filter-input:focus { border-color: var(--accent); background: var(--card);
                      box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 14%, transparent); }
.filter-count { font-size: 12px; color: var(--text-3); font-family: var(--mono); }

/* ---------- 搜索浮层 ---------- */
.search-overlay {
  position: fixed; inset: 0; z-index: 500; display: none;
  background: color-mix(in srgb, #0a0e18 52%, transparent);
  backdrop-filter: blur(4px); padding: 90px 20px 20px;
}
.search-overlay.show { display: block; animation: fadeIn .18s; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.search-panel {
  max-width: 660px; margin: 0 auto; background: var(--card);
  border: 1px solid var(--line-2); border-radius: var(--radius);
  box-shadow: var(--shadow-lg); overflow: hidden; animation: fadeUp .22s;
}
.search-input-wrap {
  display: flex; align-items: center; gap: 11px; padding: 15px 18px;
  border-bottom: 1px solid var(--line);
}
.search-input-wrap .si { color: var(--text-3); flex-shrink: 0; }
#searchInput {
  flex: 1; border: none; outline: none; background: none; color: var(--text);
  font-size: 15.5px; font-family: inherit;
}
#searchInput::placeholder { color: var(--text-3); }
.search-input-wrap kbd {
  font-family: var(--mono); font-size: 10px; padding: 3px 7px; border-radius: 5px;
  background: var(--bg-soft); border: 1px solid var(--line-2); color: var(--text-3);
}
.search-results { max-height: 460px; overflow-y: auto; }
.search-hint { padding: 30px 20px; text-align: center; }
.search-hint p { margin: 0; font-size: 13px; color: var(--text-3); }
.search-hint b { color: var(--accent); font-weight: 600; }
.sr-group { padding: 9px 18px 4px; font-size: 10.5px; color: var(--text-3);
            font-weight: 700; letter-spacing: .6px; text-transform: uppercase; }
.sr-item {
  display: flex; align-items: center; gap: 12px; padding: 10px 18px; cursor: pointer;
  transition: .12s; border-left: 3px solid transparent;
}
.sr-item:hover, .sr-item.sel { background: var(--accent-soft); border-left-color: var(--accent); }
.sr-icon {
  width: 30px; height: 30px; border-radius: 8px; flex-shrink: 0; display: grid;
  place-items: center; font-size: 13px; font-weight: 700; color: #fff;
  font-family: var(--serif);
}
.sr-body { min-width: 0; flex: 1; }
.sr-title { font-size: 13.5px; font-weight: 600; white-space: nowrap; overflow: hidden;
            text-overflow: ellipsis; }
.sr-sub { font-size: 11.5px; color: var(--text-3); white-space: nowrap; overflow: hidden;
          text-overflow: ellipsis; }
.sr-item mark { background: color-mix(in srgb, #ffd54f 55%, transparent); color: inherit;
                border-radius: 3px; padding: 0 1px; }
html[data-theme='dark'] .sr-item mark { background: color-mix(in srgb, #ffd54f 26%, transparent);
                                        color: #ffe082; }
.sr-empty { padding: 34px 20px; text-align: center; font-size: 13px; color: var(--text-3); }

/* ---------- 路由模块加载态 ---------- */
.view-loading {
  text-align: center; padding: 90px 20px; color: var(--text-3);
}
.view-loading p { margin: 16px 0 0; font-size: 13.5px; letter-spacing: .2px; }
.vl-spinner {
  width: 30px; height: 30px; margin: 0 auto;
  border: 2.5px solid var(--line-2);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: vl-spin .7s linear infinite;
}
@keyframes vl-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
  .vl-spinner { animation-duration: 1.8s; }
}

/* 路由模块加载进度条 */
.vl-prog {
  display: flex; align-items: center;
  width: min(340px, 78vw); margin: 12px auto 0;
}
.vl-prog-bar {
  flex: 1; height: 7px; border-radius: 99px;
  background: var(--line-2); overflow: hidden;
}
.vl-prog-bar > i {
  display: block; height: 100%; width: 0%;
  background: linear-gradient(90deg, var(--accent), #6d8bff);
  border-radius: 99px;
  transition: width .25s ease;
}

/* ---------- 空状态 ---------- */
.empty {
  text-align: center; padding: 60px 20px; color: var(--text-3);
}
.empty svg { width: 42px; height: 42px; margin-bottom: 12px; opacity: .4; }
.empty p { margin: 0; font-size: 13.5px; }

/* ---------- 页脚 ---------- */
.footer { border-top: 1px solid var(--line); background: var(--card); margin-top: 40px; }
.footer-inner {
  max-width: 1280px; margin: 0 auto; padding: 40px 24px;
  display: grid; grid-template-columns: 2fr 1fr 1.4fr; gap: 34px;
}
.footer-col b { font-size: 13px; display: block; margin-bottom: 8px; }
.footer-col p { margin: 0; font-size: 12px; color: var(--text-3); line-height: 1.8; }

/* ---------- 回到顶部 ---------- */
.to-top {
  position: fixed; right: 24px; bottom: 24px; width: 42px; height: 42px;
  border-radius: 12px; background: var(--card); border: 1px solid var(--line-2);
  display: grid; place-items: center; color: var(--text-2); box-shadow: var(--shadow-lg);
  opacity: 0; pointer-events: none; transition: .22s; z-index: 150;
}
.to-top.show { opacity: 1; pointer-events: auto; }
.to-top:hover { color: var(--accent); border-color: var(--accent); transform: translateY(-3px); }

/* ---------- 响应式 ---------- */
@media (max-width: 980px) {
  .footer-inner { grid-template-columns: 1fr; gap: 22px; }
}
@media (max-width: 860px) {
  .nav {
    position: absolute; top: 60px; left: 0; right: 0; flex-direction: column;
    background: var(--card); border-bottom: 1px solid var(--line); padding: 10px 16px 16px;
    display: none; box-shadow: var(--shadow-lg); margin-left: 0;
  }
  .nav.open { display: flex; }
  .nav a { padding: 11px 13px; }
  .nav-toggle { display: grid; }
  .brand-text i { display: none; }
  .hero-inner { padding: 52px 20px 44px; }
  .graph-stage { height: 500px; }
  .node-panel { position: fixed; left: 12px; right: 12px; bottom: 12px; top: auto;
                width: auto; max-height: 56vh; }
  thead th { position: static; }
  .table-wrap { overflow-x: auto; }
  table { min-width: 620px; }
}
@media (max-width: 560px) {
  .wrap, .topbar-inner { padding-left: 16px; padding-right: 16px; }
  .page-head h1 { font-size: 24px; }
  .g2, .g3, .g4 { grid-template-columns: 1fr; }
  .books-grid { grid-template-columns: repeat(2, 1fr); }
  @media (max-width: 640px) { .books-grid { grid-template-columns: 1fr; } }
  .search-overlay { padding-top: 60px; }
}

@media (max-width: 13780px) {
  .wrap, .topbar-inner { padding-left: 16px; padding-right: 16px; }
}
/* ---------- 打印 ---------- */
@media print {
  .topbar, .footer, .to-top, .search-overlay, .graph-toolbar, .graph-zoom { display: none; }
  body { background: #fff; }
  .chapter.open .ch-body { max-height: none; }
}

/* ============================================================
   自制 PDF 阅读器
   ============================================================ */
.reader-host { margin: 0; }
.reader { display: flex; flex-direction: column; height: calc(100vh - 56px); background: var(--bg); }
.reader-bar {
  display: flex; align-items: center; gap: 12px; padding: 8px 14px;
  background: var(--bg-soft); border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 5; flex-wrap: wrap;
}
.r-back { color: var(--accent); text-decoration: none; font-size: 13px; white-space: nowrap; }
.r-title { font-weight: 600; font-size: 14px; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.r-tools { display: flex; align-items: center; gap: 6px; margin-left: auto; flex-wrap: wrap; }
.r-btn {
  border: 1px solid var(--line); background: var(--bg-soft); color: var(--text);
  border-radius: 7px; padding: 5px 10px; cursor: pointer; font-size: 13px; line-height: 1;
  transition: background .15s, border-color .15s;
}
.r-btn:hover { background: var(--accent-soft); border-color: var(--accent); color: var(--accent); }
.r-page { display: inline-flex; align-items: center; gap: 4px; color: var(--text-2); font-size: 13px; }
.r-page input { width: 52px; padding: 4px 6px; border: 1px solid var(--line); border-radius: 6px;
  background: var(--bg-soft); color: var(--text); text-align: center; }
.r-zoom { font-size: 12px; color: var(--text-2); min-width: 38px; text-align: center; }
.r-sep { width: 1px; height: 18px; background: var(--line); margin: 0 2px; }

.reader-body { display: flex; flex: 1; min-height: 0; position: relative; }
.reader-toc {
  position: absolute; top: 0; left: 0; bottom: 0; z-index: 30;
  width: 280px; overflow-y: auto; white-space: nowrap;
  background: var(--bg-soft); border-right: 1px solid var(--line);
  box-shadow: 4px 0 18px rgba(0,0,0,.18);
  transform: translateX(-100%); transition: transform .22s ease;
}
.reader-toc.show { transform: translateX(0); }
.toc-head { padding: 12px 16px; font-weight: 600; color: var(--text); border-bottom: 1px solid var(--line); }
.toc-item { display: block; padding: 8px 16px; color: var(--text-2); text-decoration: none; font-size: 13px;
  border-bottom: 1px solid var(--line-2); cursor: pointer; }
.toc-item:hover { background: var(--accent-soft); color: var(--accent); }
.toc-empty { padding: 16px; color: var(--text-3); font-size: 13px; }

.reader-stage {
  flex: 800 1 0; overflow: auto; padding: 16px; background: var(--bg);
  display: flex; align-items: flex-start; justify-content: center;
}
.reader-canvas-wrap {
  position: relative; background: #fff; border-radius: 4px;
  box-shadow: 0 4px 24px rgba(0,0,0,.18); line-height: 0; padding-bottom: 24px;
}
.reader-canvas-wrap canvas { display: block; border-radius: 4px; }
.reader-page-no {
  position: absolute; left: 50%; bottom: 4px; transform: translateX(-50%);
  font-size: 11px; color: var(--text-3); font-family: var(--mono); line-height: 1;
}
.reader-loading {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%,-50%);
  color: var(--text-3); font-size: 13px; background: rgba(255,255,255,.6);
  border-radius: 12px; padding: 22px 26px; width: min(360px, 84vw);
  text-align: center; backdrop-filter: blur(2px);
}
.rl-inner { display: flex; flex-direction: column; align-items: center; gap: 0; }
.rl-spin {
  width: 26px; height: 26px; margin-bottom: 12px;
  border: 2.5px solid var(--line-2); border-top-color: var(--accent);
  border-radius: 50%; animation: vl-spin .7s linear infinite;
}
.rl-text { margin: 0 0 12px; font-size: 13px; color: var(--text-2); }
.reader-fail { color: #c0392b; font-size: 13px; line-height: 1.7; }
html[data-theme='dark'] .reader-loading { background: rgba(0,0,0,.35); }

@media (max-width: 640px) {
  .reader { height: calc(100vh - 52px); }
  .reader-toc { width: 76%; max-width: 280px; z-index: 6; }
  .r-title { display: none; }
}

/* ===================== 知识点大全 ===================== */
.mastery-view { max-width: 1200px; margin: 0 auto; padding: 0 16px 80px; }
.mastery-view .view-hero { padding: 26px 8px 14px; }
.mastery-view h1 { font-size: 30px; margin: 0 0 6px; }
.mastery-view .view-sub { color: var(--text-3); font-size: 13.5px; line-height: 1.7; margin: 0 0 18px; }
.mastery-view .view-sub b { color: var(--accent); }

/* 工具栏 */
.mty-toolbar { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; margin-bottom: 6px; }
/* 知识点大全顶端的闪卡模块（原独立概念闪卡页合并而来） */
.mty-flash { background: var(--bg-soft); border: 1px solid var(--line); border-radius: 14px; padding: 18px 20px; margin: 8px 0 26px; }
.mty-flash-head { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.mty-flash-head h2 { margin: 0; font-size: 18px; color: var(--text); }
.mty-flash-tip { font-size: 12.5px; color: var(--text-3); }
.mty-search {
  flex: 1; min-width: 240px; padding: 11px 14px; border-radius: 10px;
  border: 1px solid var(--line); background: var(--bg-card); color: var(--text);
  font-size: 14px; outline: none;
}
.mty-search:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.mty-filters { display: flex; gap: 6px; }
.mty-filter {
  padding: 9px 16px; border-radius: 20px; border: 1px solid var(--line);
  background: var(--bg-card); color: var(--text-2); cursor: pointer; font-size: 13px;
}
.mty-filter.active { background: var(--accent); color: #fff; border-color: var(--accent); }
.mty-btn {
  padding: 9px 14px; border-radius: 20px; border: 1px solid var(--line);
  background: var(--bg-card); color: var(--text-2); cursor: pointer; font-size: 13px;
}
.mty-btn:hover { border-color: var(--accent); color: var(--accent); }

/* —— 教材分组：整本一张大卡 —— */
.mty-book { margin: 24px 0; border: 1px solid var(--line); border-radius: 16px; overflow: hidden; background: var(--bg-card); }
.mty-book-head {
  display: flex; align-items: center; gap: 12px; padding: 15px 18px;
  background: linear-gradient(0deg, var(--bg-soft), var(--bg-card));
  cursor: pointer; user-select: none; border-bottom: 1px solid transparent; transition: background .15s;
}
.mty-book:not(.collapsed) .mty-book-head { border-bottom-color: var(--line); }
.mty-book-head:hover { background: var(--accent-soft); }
.mty-book-toggle { color: var(--text-3); font-size: 12px; transition: transform .18s; }
.mty-book.collapsed .mty-book-toggle { transform: rotate(-90deg); }
.mty-book-stage { font-size: 11px; padding: 3px 10px; border-radius: 20px; background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.mty-book-head h3 { margin: 0; font-size: 18px; letter-spacing: .01em; }
.mty-book-count { margin-left: auto; color: var(--text-3); font-size: 12.5px; }
.mty-book-quiz {
  font-size: 12.5px; padding: 4px 12px; border-radius: 20px; margin-left: 10px;
  background: var(--accent-soft); color: var(--accent); font-weight: 600;
  text-decoration: none; white-space: nowrap; transition: background .15s, color .15s;
}
.mty-book-quiz:hover { background: var(--accent); color: #fff; }

/* —— 本节练习（知识点 → 题库联动） —— */
.mty-block-practice { border: 1px solid #fcd9b6; background: #fffaf3; }
html[data-theme='dark'] .mty-block-practice { background: rgba(217,119,6,.07); border-color: rgba(217,119,6,.3); }
.mty-block-practice .mty-block-h { color: #b45309; }
.mty-block-practice .mty-block-h::before { background: #d97706; }
.mty-tag-pra { color: #b45309; background: #fef0db; border: 1px solid #fcd9b6; }
.mty-pra-list { display: flex; flex-direction: column; gap: 9px; padding: 14px 16px; }
.mty-pra-item {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 11px 14px; border: 1px solid var(--line); border-radius: 10px;
  text-decoration: none; background: var(--bg-soft);
  transition: border-color .15s, background .15s, transform .1s;
}
.mty-pra-item:hover { border-color: #d97706; background: #fff5e9; transform: translateX(2px); }
html[data-theme='dark'] .mty-pra-item:hover { background: rgba(217,119,6,.14); }
.mty-pra-item b { font-size: 13.5px; font-weight: 600; color: var(--text); }
.mty-pra-item span { font-size: 12.5px; color: var(--text-3); white-space: nowrap; }
.mty-pra-adv { border-color: #e7d3ff; }
.mty-pra-adv b { color: #6d3fd1; }
.mty-pra-adv:hover { border-color: #6d3fd1; background: #f6ecff; }
html[data-theme='dark'] .mty-pra-adv:hover { background: rgba(109,63,209,.14); }
.mty-pra-none { font-size: 12.5px; color: var(--text-3); padding: 2px; }
.mty-book.collapsed .mty-chapter { display: none; }

/* —— 章节 —— */
.mty-chapter { margin: 18px 16px; }
.mty-ch-title {
  display: flex; align-items: center; gap: 8px; font-size: 15px; font-weight: 700;
  color: var(--text); padding: 11px 14px; background: var(--bg-soft);
  border-radius: 10px; cursor: pointer; user-select: none;
  border-left: 4px solid var(--accent-2, #7c9cff); transition: background .15s, color .15s;
}
.mty-ch-title:hover { color: var(--accent); background: var(--accent-soft); }
.mty-ch-toggle { color: var(--text-3); font-size: 11px; transition: transform .18s; }
.mty-chapter.collapsed > .mty-ch-title .mty-ch-toggle { transform: rotate(-90deg); }
.mty-chapter.collapsed .mty-sec { display: none; }

/* 章级概述 / 课标 */
.mty-ch-teacher { margin: 10px 13px; padding: 12px 16px; background: var(--bg-soft); border-radius: 10px; }
.mty-ch-teacher .mty-detail, .mty-ch-teacher .mty-tip { margin-top: 8px; background: transparent; border: 0; padding: 4px 0; }
.mty-ch-std { margin: 10px 13px; padding: 12px 16px; background: #f3f8ff; border-left: 4px solid #4a90d9; border-radius: 8px; }
html[data-theme='dark'] .mty-ch-std { background: rgba(74,144,217,.1); }
.mty-ch-std > div:first-child { font-weight: 600; color: #2c5fa8; margin-bottom: 4px; }
html[data-theme='dark'] .mty-ch-std > div:first-child { color: #7fb0e8; }
.mty-ch-std ul { margin: 0; padding-left: 18px; font-size: 13px; line-height: 1.75; color: #334; }

/* —— 节卡片：竖排，每节占满整行 —— */
.mty-chapter { display: flex; flex-direction: column; gap: 12px; align-items: stretch; }
.mty-ch-title { flex: 0 0 auto; width: 100%; }
.mty-sec {
  flex: 1 1 auto; min-width: 0; margin: 0;
  border: 1px solid var(--line); border-radius: 12px; overflow: hidden;
  background: var(--bg-card); transition: box-shadow .18s, border-color .18s, transform .18s;
}
.mty-sec:hover { border-color: var(--accent-line, #c9d8ff); box-shadow: 0 6px 20px rgba(61,110,245,.10); }
.mty-sec-head { display: flex; align-items: center; gap: 10px; padding: 13px 16px; cursor: default; user-select: none; border-radius: 12px 12px 0 0; transition: background .15s; }
.mty-sec-head:hover { background: var(--accent-soft); }
.mty-sec-title { font-weight: 600; font-size: 15px; flex: 1; color: var(--text); cursor: pointer; transition: color .15s; }
.mty-sec-title:hover { color: var(--accent); }
.mty-sec-read { font-size: 12px; color: var(--accent); text-decoration: none; padding: 4px 11px; border: 1px solid var(--accent-soft); border-radius: 7px; flex-shrink: 0; transition: background .15s, color .15s; }
.mty-sec-read:hover { background: var(--accent); color: #fff; border-color: var(--accent); }
.mty-sec-toggle { display: none; }
.mty-sec-body { display: none; border-top: 1px solid var(--line); }
/* 节内容默认折叠，点击节标题(.mty-sec-title)展开 */
.mty-sec.open .mty-sec-body { display: block; animation: fadeUp .28s cubic-bezier(.22,.61,.36,1); }
.mty-sec-flash { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }

/* —— 专注阅读模式：点开知识点后隐藏其他书/章/节，干净阅读 —— */
.mty-book.mty-hidden, .mty-chapter.mty-hidden, .mty-sec.mty-hidden { display: none !important; }
.mastery-view.mty-focus .mty-toolbar,
.mastery-view.mty-focus #mtyFlash { display: none; }
.mty-focusbar {
  display: flex; align-items: center; gap: 12px; margin: 0 0 18px;
  padding: 11px 16px; border-radius: 12px;
  background: var(--accent-soft); border: 1px solid var(--accent-line, #c9d8ff);
}
.mty-focusbar[hidden] { display: none; }
.mty-focus-back {
  display: inline-flex; align-items: center; gap: 6px; cursor: pointer;
  border: 1px solid var(--accent); color: var(--accent); background: #fff;
  font-size: 13.5px; font-weight: 600; padding: 7px 14px; border-radius: 9px;
  transition: background .15s, color .15s; white-space: nowrap;
}
.mty-focus-back:hover { background: var(--accent); color: #fff; }
.mty-focus-crumb { font-size: 13px; color: var(--text-2); line-height: 1.5; }
.mty-focus-crumb b { color: var(--text); }
.mty-focus-nav {
  font-size: 13px; font-weight: 600; padding: 7px 13px; border-radius: 9px; cursor: pointer;
  border: 1px solid var(--accent-line, #c9d8ff); background: #fff; color: var(--accent);
  transition: background .15s, color .15s; white-space: nowrap;
}
.mty-focus-nav:hover:not(:disabled) { background: var(--accent); color: #fff; }
.mty-focus-nav:disabled { opacity: .4; cursor: not-allowed; }
.mty-focus-crumb { margin-left: auto; }

/* 已读进度 */
.mty-sec.is-read .mty-sec-title::after {
  content: "✓ 已读"; margin-left: 8px; font-size: 11px; font-weight: 700;
  color: var(--ok, #2e9e6b); background: #e6f7ef; padding: 1px 8px; border-radius: 999px; white-space: nowrap;
}
html[data-theme='dark'] .mty-sec.is-read .mty-sec-title::after { background: rgba(46,158,107,.18); }
.mty-prog { font-size: 12.5px; color: var(--text-3); margin-left: auto; white-space: nowrap; }
.mty-resume { font-size: 13px; }
.mty-resume[hidden] { display: none; }

/* —— 详情块：统一的「标题条 + 内容」卡片语言 —— */
.mty-lead { position: relative; font-size: 14px; color: var(--text); line-height: 1.85; margin: 16px 0 0; padding: 14px 18px 14px 44px; background: var(--accent-soft); border-radius: 12px; border-left: 4px solid var(--accent); }
.mty-epigraph {
  margin: 16px 8px 0; padding: 12px 18px; text-align: center;
  font-size: 14.5px; font-style: italic; line-height: 1.7; color: var(--accent);
  letter-spacing: .01em; position: relative;
  border-top: 1px solid var(--accent-line, #d9e6ff); border-bottom: 1px solid var(--accent-line, #d9e6ff);
}
.mty-epigraph::before { content: "\201C"; font-family: Georgia, "Songti SC", serif; font-size: 22px; opacity: .5; margin-right: 2px; }
.mty-epigraph::after { content: "\201D"; font-family: Georgia, "Songti SC", serif; font-size: 22px; opacity: .5; margin-left: 2px; }
.mty-lead::before { content: "\201C"; position: absolute; left: 14px; top: -2px; font-size: 38px; line-height: 1; font-family: Georgia, "Songti SC", serif; color: var(--accent); opacity: .45; }
.mty-detail { font-size: 13.5px; color: var(--text-2); line-height: 1.9; margin-top: 12px; }
.mty-example { margin-top: 12px; font-size: 13.5px; color: var(--text-2); line-height: 1.85; background: var(--bg-soft); padding: 12px 16px; border-radius: 10px; border: 1px solid var(--line); }
.mty-example b, .mty-tip b { display: inline-block; margin-right: 6px; color: var(--accent); }
.mty-tip { margin-top: 10px; font-size: 13px; color: var(--text-2); line-height: 1.85; padding: 10px 16px; border-radius: 10px; border: 1px dashed #f0b27a; background: #fff8ef; }
html[data-theme='dark'] .mty-tip { background: rgba(240,178,122,.08); }
.mty-goal { margin-top: 12px; font-size: 13.5px; color: var(--text-2); line-height: 1.9; padding: 12px 16px; background: #eafaef; border-radius: 10px; border-left: 4px solid var(--ok, #2e9e6b); }
html[data-theme='dark'] .mty-goal { background: rgba(46,158,107,.1); }
.mty-goal b, .mty-ch-teacher b { display: inline-block; margin-right: 6px; color: var(--accent); }

/* 结构化分层块：统一卡片外观 */
.mty-block { margin-top: 16px; background: var(--bg-soft); border: 1px solid var(--line); border-radius: 14px; padding: 0; overflow: hidden; box-shadow: 0 1px 2px rgba(20,30,60,.04); transition: box-shadow .18s; }
.mty-block:hover { box-shadow: 0 4px 16px rgba(20,30,60,.07); }
.mty-block-h {
  font-size: 14.5px; font-weight: 700; color: var(--text); letter-spacing: .01em;
  margin: 0; padding: 13px 16px; border-bottom: 1px solid var(--line);
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  background: linear-gradient(180deg, rgba(255,255,255,.55), rgba(255,255,255,0));
}
html[data-theme='dark'] .mty-block-h { background: linear-gradient(180deg, rgba(255,255,255,.05), rgba(255,255,255,0)); }
.mty-block-h::before { content: ""; width: 4px; height: 15px; border-radius: 3px; background: var(--accent); display: inline-block; flex: 0 0 auto; }
.mty-block > :not(.mty-block-h) { font-size: 13.5px; color: var(--text-2); line-height: 1.9; padding: 14px 16px; }
.mty-student, .mty-web, .mty-life, .mty-examples, .mty-pf-list, .mty-std-list, .mty-expand-list, .mty-block-expand .mty-block-h + ul { padding-left: 16px; padding-right: 16px; }
/* 各类别色彩：标题文字用对应色，左侧 ::before 色条用对应色 */
.mty-block-learn .mty-block-h { color: var(--accent); }
.mty-block-learn .mty-block-h::before { background: var(--accent); }
.mty-block-stu .mty-block-h { color: #0b7f5b; }
.mty-block-stu .mty-block-h::before { background: #0b7f5b; }
.mty-block-web .mty-block-h { color: #2a5fb0; }
.mty-block-web .mty-block-h::before { background: #2a5fb0; }
.mty-block-life .mty-block-h { color: #8a3f9e; }
.mty-block-life .mty-block-h::before { background: #8a3f9e; }
.mty-bracket { display: inline-block; padding: 1px 7px; margin: 0 1px; border-radius: 6px; background: linear-gradient(135deg, #fff4d6, #ffe2a0); color: #8a5a00; font-weight: 700; border: 1px solid #ffcf7a; font-size: 0.92em; line-height: 1.55; white-space: nowrap; box-shadow: 0 1px 2px rgba(180,120,0,.12); }
.mty-block-goal .mty-block-h { color: #2563eb; }
.mty-block-goal .mty-block-h::before { background: #2563eb; }
.mty-block-ext .mty-block-h { color: var(--text-3); }
.mty-block-ext .mty-block-h::before { background: var(--text-3); }
.mty-block-examples .mty-block-h { color: #6d3fd1; }
.mty-block-examples .mty-block-h::before { background: #6d3fd1; }
.mty-block-expand .mty-block-h { color: #6d3fd1; }
.mty-block-expand .mty-block-h::before { background: #6d3fd1; }
.mty-block-ext .sec-extract { display: block; margin: 0 16px 14px; padding: 10px 14px; background: var(--bg-card); border-radius: 8px; border: 1px solid var(--line); border-left: 3px solid var(--text-3); font-style: italic; color: var(--text-3); }
.mty-expand-list { margin: 0; padding-left: 18px; }
.mty-expand-list li { margin: 7px 0; line-height: 1.8; }
.mty-expand-list li b { color: var(--accent); margin-right: 4px; }

/* 学生版 / 教师版 双视图标签 */
.mty-tag { display: inline-block; font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: 999px; vertical-align: middle; margin-right: 6px; letter-spacing: .02em; }
.mty-tag-stu { color: #0b7f5b; background: #e3f6ee; border: 1px solid #b6e3d2; }
.mty-tag-tea { color: #9a5b00; background: #fdf0dc; border: 1px solid #f0d3a3; }
.mty-student { font-size: 14.5px; color: var(--text); line-height: 1.95; letter-spacing: .005em; text-align: justify; text-justify: inter-ideograph; }
.mty-student br { content: ""; display: block; margin-bottom: 6px; }
/* 正文中 **重点** 的精致高亮 */
.mty-student strong, .mty-web strong, .mty-life strong, .mty-detail strong, .mty-lead strong,
.mty-ex-body strong, .mty-ex-desc strong {
  font-weight: 700; color: var(--accent); padding: 0 2px;
  background: linear-gradient(transparent 62%, var(--accent-soft) 62%); border-radius: 2px;
}
html[data-theme='dark'] .mty-student strong, html[data-theme='dark'] .mty-web strong, html[data-theme='dark'] .mty-life strong, html[data-theme='dark'] .mty-detail strong, html[data-theme='dark'] .mty-lead strong { background: linear-gradient(transparent 62%, rgba(120,150,255,.22) 62%); }
.mty-student :where(ul,ol), .mty-web :where(ul,ol), .mty-life :where(ul,ol) { padding-left: 20px; margin: 8px 0; }
.mty-student li, .mty-web li, .mty-life li { margin: 5px 0; line-height: 1.85; }

/* 教师教学参考（教案）：置于每节详情末尾 */
.mty-teacher { margin-top: 16px; border: 1px dashed #e0b878; border-radius: 12px; background: #fffaf2; overflow: hidden; }
html[data-theme='dark'] .mty-teacher { background: rgba(240,200,120,.06); }
.mty-teacher > summary { cursor: pointer; padding: 12px 16px; font-size: 13px; font-weight: 600; color: #9a5b00; list-style: none; user-select: none; border-radius: 12px; }
html[data-theme='dark'] .mty-teacher > summary { color: #e0b060; }
.mty-teacher > summary::-webkit-details-marker { display: none; }
.mty-teacher > summary::before { content: "▸ "; color: #c98a2e; }
.mty-teacher[open] > summary::before { content: "▾ "; }
.mty-teacher-body { padding: 0 16px 16px; font-size: 13px; color: var(--text-2); line-height: 1.85; border-top: 1px solid #f0d3a3; margin: 0 16px; padding-top: 12px; }
.mty-teacher-body br { content: ""; display: block; margin-bottom: 6px; }

/* 课外百科科普 / 生活应用 标签与块 */
.mty-tag-web { color: #2a5fb0; background: #e8f0fd; border: 1px solid #c2d8f5; }
.mty-tag-life { color: #8a3f9e; background: #f6ecfb; border: 1px solid #e3c9f0; }
.mty-web { font-size: 14px; color: var(--text); line-height: 1.9; }
.mty-web br { content: ""; display: block; margin-bottom: 4px; }
.mty-life { font-size: 14px; color: var(--text); line-height: 1.9; }
.mty-life br { content: ""; display: block; margin-bottom: 4px; }

/* 举例子 · 多角度印证 模块 */
.mty-tag-ex { color: #5a32c4; background: #ece6fb; border: 1px solid #d3c6f3; }
.mty-examples { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 4px; }
.mty-ex-card { display: flex; gap: 12px; background: linear-gradient(180deg, #fbfaff, #f4f0fd); border: 1px solid #e6e0f7; border-radius: 12px; padding: 12px 14px; transition: box-shadow .18s, transform .18s, border-color .18s; }
.mty-ex-card:hover { box-shadow: 0 6px 18px rgba(109,63,209,.14); transform: translateY(-2px); border-color: #cdbcf0; }
.mty-ex-no { flex: 0 0 auto; width: 28px; height: 28px; border-radius: 50%; background: linear-gradient(135deg, #7c4dd6, #5a32c4); color: #fff; font-size: 12px; font-weight: 700; display: flex; align-items: center; justify-content: center; margin-top: 2px; box-shadow: 0 2px 6px rgba(109,63,209,.3); }
.mty-ex-body { min-width: 0; }
.mty-ex-title { font-size: 14px; font-weight: 600; color: var(--text); line-height: 1.5; }
.mty-ex-desc { font-size: 13px; color: var(--text-2); line-height: 1.85; margin-top: 4px; }
.mty-ex-math { margin-top: 8px; padding: 5px 10px; background: #f3f0fc; border-radius: 8px; display: inline-block; border: 1px solid #e6e0f7; }
.mty-ex-math .katex { font-size: 1.04em; }
@media (max-width: 680px) {
  .mty-examples { grid-template-columns: 1fr; }
}

/* 易错清单：突出强调模块 */
.mty-tag-pf { color: #c2410c; background: #ffedd5; border: 1px solid #fdba74; }
.mty-block-pitfall { background: #fff7ed; border-color: #fdba74; }
html[data-theme='dark'] .mty-block-pitfall { background: rgba(194,65,12,.08); }
.mty-block-pitfall .mty-block-h { color: #c2410c; border-bottom-color: #fed7aa; }
.mty-block-pitfall .mty-block-h::before { background: #c2410c; }
.mty-pf-list { margin: 0; padding-left: 20px; }
.mty-pf-list li { margin: 9px 0; line-height: 1.85; }

/* 网络流言辨伪（mythbust）：玫红警示色，区别于易错橙 */
.mty-tag-myth { color: #be123c; background: #ffe4e9; border: 1px solid #faa9bc; }
.mty-block-myth { background: #fff5f7; border-color: #faa9bc; }
html[data-theme='dark'] .mty-block-myth { background: rgba(190,18,60,.08); border-color: rgba(190,18,60,.3); }
.mty-block-myth .mty-block-h { color: #be123c; border-bottom-color: #fbcfe0; }
.mty-block-myth .mty-block-h::before { background: #be123c; }
.mty-myth-item { padding: 11px 0; border-bottom: 1px dashed var(--line); }
.mty-myth-item:last-of-type { border-bottom: none; }
.mty-myth-claim { font-weight: 700; color: var(--text); margin-bottom: 6px; }
.mty-myth-row { display: flex; gap: 8px; align-items: baseline; margin: 4px 0; line-height: 1.8; }
.mty-myth-k { flex: 0 0 auto; font-size: 11px; font-weight: 700; padding: 1px 7px; border-radius: 6px; }
.mty-myth-w { color: #be123c; background: #ffe4e9; }
.mty-myth-r { color: #0f766e; background: #ccfbf1; }
.mty-myth-pr { margin-top: 5px; font-size: 12.5px; color: var(--text-3); }
.mty-myth-more { display: inline-block; margin-top: 10px; font-size: 12.5px; font-weight: 600; color: #be123c; text-decoration: none; }
.mty-myth-more:hover { text-decoration: underline; }
.mty-x-myth { color: #be123c !important; border-color: #faa9bc !important; }

/* 流言辨伪独立页面 */
.myth-view { max-width: 980px; margin: 0 auto; }
.myth-filters { display: flex; flex-wrap: wrap; gap: 8px; margin: 4px 0 18px; }
.myth-fbtn { padding: 7px 16px; font-size: 13px; font-weight: 600; border-radius: 999px; border: 1px solid var(--line); background: var(--bg-card); color: var(--text-2); cursor: pointer; transition: all .15s; }
.myth-fbtn:hover { border-color: #be123c; color: #be123c; }
.myth-fbtn.active { background: #be123c; border-color: #be123c; color: #fff; }
.myth-group { margin-bottom: 22px; }
.myth-group-h { font-size: 15px; font-weight: 700; color: var(--text); margin-bottom: 10px; padding-left: 10px; border-left: 4px solid #be123c; }
.myth-card { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; margin-bottom: 12px; box-shadow: var(--shadow); }
.myth-card-h { font-size: 15px; font-weight: 700; color: var(--text); line-height: 1.5; margin-bottom: 10px; }
.myth-fld { display: inline-block; font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 999px; color: #be123c; background: #ffe4e9; border: 1px solid #faa9bc; margin-right: 8px; vertical-align: middle; }
.myth-row { display: flex; gap: 10px; align-items: baseline; margin: 7px 0; line-height: 1.85; }
.myth-row > div { flex: 1; }
.myth-k { flex: 0 0 auto; font-size: 11px; font-weight: 700; padding: 2px 9px; border-radius: 6px; }
.myth-k-w { color: #be123c; background: #ffe4e9; }
.myth-k-r { color: #0f766e; background: #ccfbf1; }
.myth-pr { margin-top: 6px; font-size: 12.5px; color: var(--text-3); }
.myth-tags { margin-top: 8px; display: flex; flex-wrap: wrap; gap: 6px; }
.myth-tag { font-size: 11.5px; color: var(--text-3); background: var(--bg-soft); border: 1px solid var(--line); padding: 1px 8px; border-radius: 999px; }
.myth-refs { margin-top: 8px; font-size: 12px; color: var(--text-3); }
.myth-refs a { color: #be123c; text-decoration: none; }
.myth-refs a:hover { text-decoration: underline; }
.myth-lvlf { margin-top: -8px; align-items: center; }
.myth-lvlf-label { font-size: 12.5px; font-weight: 700; color: var(--text-3); margin-right: 4px; }
.myth-lvl { display: inline-block; font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 999px; margin-right: 8px; vertical-align: middle; }
.myth-lvl-C { color: #0f766e; background: #ccfbf1; border: 1px solid #99f6e4; }
.myth-lvl-G { color: #b45309; background: #fef3c7; border: 1px solid #fcd34d; }
.myth-lvl-A { color: #6d28d9; background: #ede9fe; border: 1px solid #c4b5fd; }

/* 课标要求：节级模块（teal 色，区别于易错橙、通俗蓝） */
.mty-tag-std { color: #0f766e; background: #ccfbf1; border: 1px solid #5eead4; }
.mty-block-std { background: #f0fdfa; border-color: #99f6e4; }
.mty-block-std .mty-block-h { color: #0f766e; border-bottom-color: #99f6e4; }
.mty-block-std .mty-block-h::before { background-color: #0f766e; }

/* 全站联动导航 */
.mty-block-xnav .mty-block-h { color: #7c3aed; }
.mty-block-xnav .mty-block-h::before { background: #7c3aed; }
.mty-xnav { display: flex; flex-wrap: wrap; gap: 8px; padding: 14px 16px; }
.mty-xnav-a { display: inline-flex; align-items: center; padding: 7px 14px; border-radius: 999px; font-size: 12.5px; font-weight: 600; text-decoration: none; border: 1px solid var(--line); background: var(--bg-card); color: var(--text-2); transition: transform .15s, box-shadow .15s; }
.mty-xnav-a:hover { transform: translateY(-1px); box-shadow: 0 3px 10px rgba(20,30,60,.1); }
.mty-x-read { color: #0b7f5b; border-color: #b6e3d2; background: #e3f6ee; }
.mty-x-fm { color: #2563eb; border-color: #bcd2fb; background: #e8f0fd; }
.mty-x-quiz { color: #c2410c; border-color: #fdba74; background: #fff7ed; }
.mty-x-guide { color: #7c3aed; border-color: #d3c6f3; background: #ece6fb; }
.mty-x-lesson { color: #9a5b00; border-color: #f0d3a3; background: #fdf0dc; }

/* 「本节教案」入口（知识点大全每个知识点的最后位置） */
.mty-block-lesson { border: 1px solid #f0d3a3; background: linear-gradient(135deg, #fffaf0, #fdf3e3); }
html[data-theme='dark'] .mty-block-lesson { background: rgba(217,119,6,.08); border-color: rgba(217,119,6,.32); }
.mty-lesson-cta { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; padding: 16px 18px; }
.mty-lesson-cta-txt { flex: 1 1 320px; min-width: 260px; }
.mty-lesson-cta-txt b { display: block; font-size: 15px; color: #9a5b00; margin-bottom: 4px; }
.mty-lesson-cta-txt span { font-size: 12.5px; line-height: 1.65; color: var(--text-2); }
.mty-lesson-cta-btn { flex: 0 0 auto; display: inline-flex; align-items: center; gap: 7px; padding: 10px 20px; border-radius: 10px; font-size: 13.5px; font-weight: 700; text-decoration: none; color: #fff; background: linear-gradient(135deg, #d97706, #b45309); box-shadow: 0 3px 12px rgba(217,119,6,.28); transition: transform .15s, box-shadow .15s; }
.mty-lesson-cta-btn::after { content: "→"; font-size: 15px; transition: transform .15s; }
.mty-lesson-cta-btn:hover { transform: translateY(-1px); box-shadow: 0 6px 18px rgba(217,119,6,.36); }
.mty-lesson-cta-btn:hover::after { transform: translateX(3px); }

/* 深链进入教案页时高亮生成的教案卡片 */
.lp-card-focus { animation: lpFocus 1.6s ease-out; }
@keyframes lpFocus {
  0% { box-shadow: 0 0 0 4px rgba(217,119,6,.45); }
  100% { box-shadow: 0 1px 2px rgba(20,30,60,.06); }
}
.mty-x-exp { color: #0f766e; border-color: #5eead4; background: #f0fdfa; }
.mty-x-sim { color: #be185d; border-color: #f5b9d4; background: #fdf2f8; }
.mty-x-web { color: #475569; border-color: #cbd5e1; background: #f1f5f9; }
.mty-tag-x { color: #7c3aed; background: #ece6fb; border: 1px solid #d3c6f3; }
.sec-mty { margin-left: 8px; font-size: 12px; font-weight: 600; color: var(--accent); text-decoration: none; white-space: nowrap; }
.sec-mty:hover { text-decoration: underline; }

/* 知识拓展卡片 */
.mty-ex-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; padding: 14px 16px; }
.mty-ex-card { border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; background: var(--bg-card); }
.mty-ex-history { border-left: 3px solid #d97706; }
.mty-ex-life { border-left: 3px solid #0b7f5b; }
.mty-ex-bridge { border-left: 3px solid #2563eb; }
.mty-ex-cross { border-left: 3px solid #7c3aed; }
.mty-ex-method { border-left: 3px solid #c2410c; }
.mty-ex-exp { border-left: 3px solid #0f766e; }
.mty-ex-head { font-size: 13px; font-weight: 700; color: var(--text); margin-bottom: 6px; }
.mty-ex-tag { display: inline-block; font-size: 10.5px; font-weight: 600; padding: 1px 7px; border-radius: 999px; background: var(--accent); color: #fff; margin-right: 6px; vertical-align: middle; }
.mty-ex-body { font-size: 13px; color: var(--text-2); line-height: 1.85; }
.mty-ex-body p { margin: 0 0 .6em; }
.mty-ex-body p:last-child { margin-bottom: 0; }
.mty-ex-src { margin-top: 8px; padding-top: 7px; border-top: 1px dashed var(--line); font-size: 11.5px; color: var(--text-3); }
.mty-ex-src a { color: var(--accent); text-decoration: none; word-break: break-all; overflow-wrap: anywhere; }
.mty-ex-src a:hover { text-decoration: underline; }

/* 长文阅读优化：限制每行字数、允许长链接/公式换行，避免大屏下长行难读或溢出 */
.mty-student, .mty-web, .mty-life, .mty-detail, .mty-ex-body, .mty-ex-desc {
  overflow-wrap: anywhere; text-wrap: pretty;
}
.mty-student, .mty-web, .mty-life, .mty-detail { max-width: 760px; }

/* 教学要点（教师） */
.mty-teach { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 18px; padding: 14px 16px; }
.mty-teach-sec { font-size: 13px; }
.mty-teach-sec > b { display: block; color: #9a5b00; margin-bottom: 4px; font-size: 12.5px; }
.mty-teach-sec ul { margin: 0; padding-left: 18px; }
.mty-teach-sec li { line-height: 1.7; }
.mty-teach-board { grid-column: 1 / -1; padding: 10px 12px; background: #fff7e6; border: 1px dashed #e0b878; border-radius: 8px; font-size: 12.5px; color: var(--text-2); }
.mty-teach-board b { color: #9a5b00; }
@media (max-width: 720px) { .mty-teach { grid-template-columns: 1fr; } }
.mty-std-list { margin: 0; padding-left: 0; list-style: none; }
.mty-std-item { display: flex; gap: 8px; align-items: baseline; margin: 7px 0; line-height: 1.85; }
.mty-std-tag { flex: 0 0 auto; font-size: 11px; font-weight: 700; padding: 1px 6px; border-radius: 4px; }
.tag-std { color: #fff; background: #0d9488; }
.tag-point { color: #475569; background: #e2e8f0; }
.mty-std-txt { flex: 1; }

/* 搜索命中高亮 */
mark.sr-hit { background: #fff3a3; color: inherit; border-radius: 3px; padding: 0 2px; }

/* ---------- 教案生成（教师） ---------- */
.nav-teacher { position: relative; }
.nav-teacher-tag {
  margin-left: 6px; font-size: 10px; line-height: 1; padding: 2px 6px; border-radius: 999px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: #fff; font-weight: 700;
  letter-spacing: .3px; vertical-align: middle;
}
.nav a.nav-teacher.active { background: var(--accent-soft); }

.lesson-wrap { max-width: 920px; margin: 0 auto; padding: 8px 0 40px; }
.lesson-header h1 { font-size: 27px; margin: 0 0 8px; letter-spacing: -.4px; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.lesson-badge {
  font-size: 11.5px; font-weight: 600; padding: 4px 11px; border-radius: 999px;
  background: color-mix(in srgb, #f59e0b 16%, transparent); color: #b9760a;
  border: 1px solid color-mix(in srgb, #f59e0b 36%, transparent); letter-spacing: .3px;
}
html[data-theme='dark'] .lesson-badge { color: #f7c66b; }
.lesson-sub { color: var(--text-2); font-size: 14px; margin: 0 0 22px; max-width: 760px; }

.lesson-panel {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 20px; box-shadow: var(--shadow);
}
.lesson-label { display: block; font-size: 13px; font-weight: 600; color: var(--text-2); margin-bottom: 9px; }
.lesson-input {
  width: 100%; box-sizing: border-box; resize: vertical; font-family: var(--sans); font-size: 14px;
  line-height: 1.7; padding: 12px 14px; border: 1px solid var(--line-2); border-radius: 10px;
  background: var(--card-2); color: var(--text); transition: .16s;
}
.lesson-input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }

.lesson-options { display: flex; gap: 14px; align-items: flex-end; flex-wrap: wrap; margin-top: 16px; }
.lesson-opt { display: flex; flex-direction: column; gap: 6px; }
.lesson-opt-t { font-size: 12px; color: var(--text-3); }
.lesson-select {
  padding: 9px 12px; border-radius: 9px; border: 1px solid var(--line-2); background: var(--card-2);
  color: var(--text); font-size: 13.5px; cursor: pointer; min-width: 130px;
}
.lesson-select:focus { outline: none; border-color: var(--accent); }
.lesson-gen {
  margin-left: auto; padding: 11px 22px; border-radius: 10px; border: none; cursor: pointer;
  font-size: 14px; font-weight: 600; color: #fff;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 6px 18px color-mix(in srgb, var(--accent) 36%, transparent); transition: .18s;
}
.lesson-gen:hover { box-shadow: 0 10px 28px color-mix(in srgb, var(--accent) 46%, transparent); transform: translateY(-1px); }

.lesson-match { margin-top: 14px; font-size: 13px; min-height: 18px; }
.lesson-ok { color: #16a34a; }
.lesson-warn { color: #e0590b; }

.lesson-result { margin-top: 26px; display: flex; flex-direction: column; gap: 18px; }
.lp-card {
  position: relative;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); overflow: hidden; transition: box-shadow .18s, transform .18s;
}
.lp-card:hover { box-shadow: 0 10px 30px color-mix(in srgb, var(--accent) 10%, transparent); }
.lp-head {
  display: grid; grid-template-columns: 1fr auto; gap: 3px 14px; align-items: center;
  padding: 18px 20px 15px;
  background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 13%, var(--card-2)), color-mix(in srgb, var(--accent-2) 9%, var(--card-2)));
  border-bottom: 1px solid var(--line);
}
.lp-head::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: linear-gradient(180deg, var(--accent), var(--accent-2)); }
.lp-title { font-size: 19px; font-weight: 700; letter-spacing: -.2px; color: var(--text); }
.lp-meta { font-size: 12.5px; color: var(--text-2); font-family: var(--mono); display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.lp-chip {
  display: inline-flex; align-items: center; font-family: var(--sans, inherit);
  font-size: 11.5px; font-weight: 600; padding: 2px 10px; border-radius: 999px;
  background: color-mix(in srgb, var(--accent) 10%, var(--card)); color: var(--accent);
  border: 1px solid color-mix(in srgb, var(--accent) 22%, transparent);
}
.lp-chip-t { background: color-mix(in srgb, #16a34a 10%, var(--card)); color: #15803d; border-color: color-mix(in srgb, #16a34a 26%, transparent); }
html[data-theme='dark'] .lp-chip { background: rgba(255,255,255,.06); }
html[data-theme='dark'] .lp-chip-t { color: #6ee7a8; }
.lp-actions { grid-row: 1 / span 2; grid-column: 2; display: flex; gap: 8px; }
.lp-regen {
  padding: 7px 14px; border-radius: 8px; border: 1px solid var(--line-2); background: var(--card);
  color: var(--accent); font-size: 12.5px; font-weight: 600; cursor: pointer; transition: .15s;
}
.lp-regen:hover { background: var(--accent-soft); border-color: var(--accent-soft); transform: translateY(-1px); }
.lp-warn {
  display: block; margin: 14px 18px 0; padding: 8px 12px; border-radius: 8px; font-size: 12.5px;
  background: color-mix(in srgb, #f59e0b 14%, transparent); color: #b9760a;
  border: 1px solid color-mix(in srgb, #f59e0b 30%, transparent);
}
html[data-theme='dark'] .lp-warn { color: #f7c66b; }

.lp-body { padding: 20px 20px 22px; display: flex; flex-direction: column; gap: 18px; }
.lp-sec { scroll-margin-top: 70px; }
.lp-sec h4 {
  margin: 0 0 11px; font-size: 14px; font-weight: 700; color: var(--text);
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 14px 6px 11px; border-radius: 9px;
  background: color-mix(in srgb, var(--accent) 9%, transparent);
  border-left: 3px solid var(--accent);
}
.lp-list { margin: 0; padding-left: 20px; }
.lp-list li { font-size: 13.5px; color: var(--text); line-height: 1.8; margin-bottom: 5px; }
.lp-hard, .lp-tip { margin: 0; font-size: 13.5px; color: var(--text); line-height: 1.8; }
.lp-tip { color: #b9760a; }
html[data-theme='dark'] .lp-tip { color: #f7c66b; }
.lp-proc { list-style: none; margin: 0; padding: 0; counter-reset: step; }
.lp-proc li {
  display: flex; gap: 12px; padding: 10px 0; border-bottom: 1px dashed var(--line); font-size: 13.5px; line-height: 1.75;
}
.lp-proc li:last-child { border-bottom: none; }
.lp-proc li b { color: var(--text); flex-shrink: 0; min-width: 92px; font-weight: 600; }
.lp-proc li span { color: var(--text-2); }
.lp-ex {
  position: relative;
  font-size: 13px; color: var(--text); line-height: 1.85; background: var(--bg-soft);
  padding: 14px 16px 14px 64px; border-radius: 11px; white-space: pre-wrap;
  border: 1px solid var(--line); border-left: 3px solid #6d3fd1;
}
.lp-ex::before {
  content: "例题"; position: absolute; left: 12px; top: 14px;
  font-size: 11px; font-weight: 700; color: #fff; letter-spacing: .05em;
  background: linear-gradient(135deg, #6d3fd1, #4c2a99);
  padding: 3px 9px; border-radius: 6px; box-shadow: 0 2px 6px rgba(109,63,209,.28);
}

/* 详细教案新增样式 */
.lp-goals { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.lp-goals li {
  display: grid; grid-template-columns: 92px 1fr; gap: 10px; align-items: start;
  font-size: 13px; line-height: 1.75; color: var(--text-2);
  background: var(--bg-card); border: 1px solid var(--line); border-radius: 11px; padding: 11px 13px;
  border-left: 3px solid var(--accent);
  transition: box-shadow .15s, transform .15s;
}
.lp-goals li:hover { box-shadow: 0 4px 14px rgba(37,99,235,.10); transform: translateY(-1px); }
.lp-goals li:nth-child(1) { border-left-color: #2563eb; }
.lp-goals li:nth-child(2) { border-left-color: #6d3fd1; }
.lp-goals li:nth-child(3) { border-left-color: #0891b2; }
.lp-goals li:nth-child(4) { border-left-color: #dba106; }
.lp-goals li b {
  font-size: 12.5px; font-weight: 700; color: var(--text);
  display: inline-flex; align-items: center; justify-content: center;
  padding: 3px 0; border-radius: 7px;
  background: color-mix(in srgb, currentColor 8%, transparent);
}
.lp-goals li:nth-child(1) b { color: #2563eb; background: rgba(37,99,235,.10); }
.lp-goals li:nth-child(2) b { color: #6d3fd1; background: rgba(109,63,209,.10); }
.lp-goals li:nth-child(3) b { color: #0891b2; background: rgba(8,145,178,.10); }
.lp-goals li:nth-child(4) b { color: #b98600; background: rgba(219,161,6,.12); }
html[data-theme='dark'] .lp-goals li:nth-child(1) b { color: #7db3ff; }
html[data-theme='dark'] .lp-goals li:nth-child(2) b { color: #b79bf5; }
html[data-theme='dark'] .lp-goals li:nth-child(3) b { color: #4fd0e8; }
html[data-theme='dark'] .lp-goals li:nth-child(4) b { color: #f0c455; }

/* 四维教学目标卡片（物理观念 / 科学思维 / 科学探究 / 科学态度与责任） */
.lp-fd { display: grid; gap: 8px; margin: 2px 0; }
.lp-fd-row {
  display: grid;
  grid-template-columns: 132px 1fr;
  gap: 12px;
  align-items: stretch;
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent);
  border-radius: 9px;
  padding: 9px 13px;
  transition: box-shadow .15s, transform .15s;
}
.lp-fd-row:hover { box-shadow: 0 3px 12px rgba(37,99,235,.12); transform: translateX(2px); }
.lp-fd-row:nth-child(1) { border-left-color: #2563eb; }
.lp-fd-row:nth-child(2) { border-left-color: #6d3fd1; }
.lp-fd-row:nth-child(3) { border-left-color: #0891b2; }
.lp-fd-row:nth-child(4) { border-left-color: #dba106; }
.lp-fd-tag {
  font-weight: 700; font-size: 12.5px; line-height: 1.5; color: var(--text);
  display: flex; align-items: center;
}
.lp-fd-txt { font-size: 13px; line-height: 1.75; color: var(--text-2); }
.lp-fd-compact .lp-fd-row { padding: 7px 11px; gap: 9px; }
.lp-fd-compact .lp-fd-tag { font-size: 12px; }
.lp-fd-compact .lp-fd-txt { font-size: 12.5px; line-height: 1.7; }
html[data-theme='dark'] .lp-fd-row { background: rgba(255,255,255,.03); }
.lp-hard { margin: 0 0 8px; font-size: 13.5px; line-height: 1.8; color: var(--text); }
.lp-prep { display: flex; flex-direction: column; gap: 9px; }
.lp-prep-row {
  display: grid; grid-template-columns: 92px 1fr; gap: 12px; align-items: start;
  background: var(--bg-card); border: 1px solid var(--line); border-radius: 11px; padding: 11px 14px;
  font-size: 13px; line-height: 1.8; color: var(--text-2);
  transition: box-shadow .15s, transform .15s;
}
.lp-prep-row:hover { box-shadow: 0 4px 14px rgba(20,30,60,.08); transform: translateY(-1px); }
.lp-prep-k {
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700; color: #fff;
  background: linear-gradient(135deg, #0e7490, #155e75);
  border-radius: 7px; padding: 3px 0; letter-spacing: .02em;
}
.lp-prep-row:nth-child(2) .lp-prep-k { background: linear-gradient(135deg, #6d3fd1, #4c2a99); }
.lp-prep-row:nth-child(3) .lp-prep-k { background: linear-gradient(135deg, #b45309, #92400e); }
.lp-prep-v { min-width: 0; }
.lp-ky {
  display: inline-block; font-size: 11px; font-weight: 700; padding: 1px 7px; border-radius: 5px; margin-right: 6px;
  background: color-mix(in srgb, var(--accent) 15%, transparent); color: var(--accent);
}
.lp-break { margin: 0; font-size: 13px; color: var(--text-2); line-height: 1.75; }
.lp-break b { color: var(--text); }

.lp-proc li { display: block; padding: 0; border: 1px solid var(--line); border-radius: 12px; margin-bottom: 12px; overflow: hidden; transition: box-shadow .15s, border-color .15s; }
.lp-proc li:last-child { margin-bottom: 0; }
.lp-proc li:hover { border-color: color-mix(in srgb, var(--accent) 35%, var(--line)); box-shadow: 0 4px 16px color-mix(in srgb, var(--accent) 8%, transparent); }
.lp-step-h { display: flex; align-items: center; gap: 10px; padding: 11px 14px; background: linear-gradient(180deg, color-mix(in srgb, var(--accent) 6%, var(--card-2)), var(--card-2)); border-bottom: 1px solid var(--line); }
.lp-step-h b { font-size: 14px; color: var(--text); }
.lp-step-no {
  display: inline-flex; align-items: center; justify-content: center; width: 22px; height: 22px; border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: #fff; font-size: 12px; font-weight: 700; flex-shrink: 0;
}
.lp-time {
  margin-left: auto; font-size: 11.5px; color: var(--accent); font-family: var(--mono);
  background: var(--accent-soft); padding: 2px 9px; border-radius: 999px; flex-shrink: 0;
}
.lp-step-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0; }
.lp-step-grid > div { padding: 12px 15px; font-size: 13px; line-height: 1.75; color: var(--text); border-top: 1px solid var(--line); }
.lp-step-grid > div:nth-child(1) { border-right: 1px solid var(--line); }
.lp-step-grid > div i { display: block; font-style: normal; font-size: 11px; font-weight: 700; color: var(--text-3); margin-bottom: 4px; letter-spacing: .3px; }
.lp-mark {
  display: inline-block; font-weight: 700; color: var(--accent);
  background: var(--accent-soft); border-radius: 5px; padding: 0 6px; margin-right: 2px;
  font-size: 12px;
}
.lp-step-grid > div:nth-child(1) i { color: #2563eb; }
.lp-step-grid > div:nth-child(2) i { color: #0891b2; }
.lp-intent { grid-column: 1 / -1; background: color-mix(in srgb, var(--accent) 7%, transparent); }
.lp-intent i { color: var(--accent) !important; }

/* —— 讲解要点清单（教案"知识点讲解"的落地抓手） —— */
.lp-keys {
  padding: 11px 15px 12px; border-top: 1px dashed var(--line);
  background: color-mix(in srgb, #6366f1 5%, transparent);
}
.lp-keys > i {
  display: block; font-style: normal; font-size: 11px; font-weight: 700; letter-spacing: .3px;
  color: #6366f1; margin-bottom: 6px;
}
html[data-theme='dark'] .lp-keys > i { color: #a5b4fc; }
.lp-keys ol { margin: 0; padding-left: 20px; }
.lp-keys li { font-size: 12.5px; line-height: 1.8; color: var(--text-2); margin-bottom: 3px; }
.lp-keys li:last-child { margin-bottom: 0; }
.lp-keys li b { color: var(--text); font-weight: 700; }
.lp-keys li::marker { color: var(--accent); font-weight: 700; font-size: 12px; }

/* —— 40 分钟课时时间轴 —— */
.lp-axis { margin: 0 0 14px; }
.lp-axis-bar {
  display: flex; height: 12px; border-radius: 999px; overflow: hidden;
  background: var(--card-2); border: 1px solid var(--line);
}
.lp-axis-seg { height: 100%; transition: filter .15s; }
.lp-axis-seg:hover { filter: brightness(1.12); }
.lp-axis-seg.a0 { background: #6366f1; }
.lp-axis-seg.a1 { background: #2563eb; }
.lp-axis-seg.a2 { background: #0891b2; }
.lp-axis-seg.a3 { background: #16a34a; }
.lp-axis-seg.a4 { background: #f59e0b; }
.lp-axis-seg.a5 { background: #db2777; }
.lp-axis-lg { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 9px; }
.lp-axis-li {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 11.5px; color: var(--text-2); line-height: 1.4;
}
.lp-axis-li b { color: var(--text); font-family: var(--mono); font-size: 11px; }
.lp-axis-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; display: inline-block; }
.lp-axis-dot.a0 { background: #6366f1; }
.lp-axis-dot.a1 { background: #2563eb; }
.lp-axis-dot.a2 { background: #0891b2; }
.lp-axis-dot.a3 { background: #16a34a; }
.lp-axis-dot.a4 { background: #f59e0b; }
.lp-axis-dot.a5 { background: #db2777; }
@media (max-width: 640px) { .lp-axis-li { font-size: 11px; } }

/* —— 板书公式区 —— */
.lp-board-fml { padding: 11px 15px 13px; border-top: 1px dashed var(--line); background: var(--bg-card); }
.lp-board-fml > b { display: block; margin-bottom: 7px; color: var(--accent); font-size: 12.5px; }
.lp-board-f {
  display: flex; align-items: baseline; gap: 9px; flex-wrap: wrap;
  padding: 5px 0; border-top: 1px dotted var(--line);
}
.lp-board-f:first-of-type { border-top: none; }
.lp-board-fn { font-size: 12px; font-weight: 700; color: var(--text); flex-shrink: 0; }
.lp-board-f code {
  font-family: var(--mono); font-size: 13px; color: var(--accent);
  background: var(--accent-soft); padding: 1px 8px; border-radius: 6px;
}
.lp-board-f i { font-style: normal; font-size: 11.5px; color: var(--text-3); }
.lp-chip-e { background: color-mix(in srgb, #6366f1 10%, var(--card)); color: #4f46e5; border-color: color-mix(in srgb, #6366f1 26%, transparent); }
html[data-theme='dark'] .lp-chip-e { color: #a5b4fc; }

.lp-web p { margin: 0 0 8px; font-size: 13px; line-height: 1.8; color: var(--text-2); }
.lp-web p:last-child { margin-bottom: 0; }
.lp-web-sec { margin: 0 0 14px; }
.lp-web-sec:last-child { margin-bottom: 0; }
.lp-web-sec-h { font-weight: 700; font-size: 13.5px; color: var(--accent); margin: 0 0 7px; padding-left: 9px; border-left: 3px solid var(--accent); line-height: 1.5; }

.lp-board { border: 1px dashed var(--line-2); border-radius: 12px; overflow: hidden; }
.lp-board-t {
  padding: 12px 16px; font-weight: 700; font-size: 14.5px; color: #fff;
  background: linear-gradient(135deg, #2f3b52, #1f2a3d);
  border-bottom: 1px solid var(--line);
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
}
.lp-board-t::before { content: "▎"; color: #7dd3fc; font-size: 12px; }
.lp-board-epi { display: inline-block; margin-left: 4px; font-size: 12px; font-weight: 400; line-height: 1.65; color: #a9c6e8; font-style: italic; }
.lp-board-c { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; }
.lp-board-c > div { padding: 13px 15px; font-size: 12.5px; line-height: 1.75; color: var(--text); border-right: 1px solid var(--line); background: var(--bg-card); }
.lp-board-c > div:last-child { border-right: none; }
.lp-board-c b { display: block; margin-bottom: 5px; color: var(--accent); font-size: 12.5px; }

.lp-hw { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 9px; }
.lp-hw li {
  font-size: 13.5px; line-height: 1.75; color: var(--text);
  display: flex; gap: 10px; align-items: flex-start;
  background: var(--bg-card); border: 1px solid var(--line); border-radius: 10px; padding: 10px 13px;
}
.lp-hw li:nth-child(1) { border-left: 3px solid #16a34a; }
.lp-hw li:nth-child(2) { border-left: 3px solid #f59e0b; }
.lp-hw li:nth-child(3) { border-left: 3px solid #6366f1; }
.lp-hw-lv { flex-shrink: 0; font-size: 11px; font-weight: 700; padding: 2px 9px; border-radius: 6px; margin-top: 2px; color: #fff; }
.lp-hw-lv.lv1 { background: #16a34a; }
.lp-hw-lv.lv2 { background: #f59e0b; }
.lp-hw-lv.lv3 { background: #6366f1; }

.lp-reflect {
  position: relative; margin: 0; font-size: 13px; line-height: 1.8; color: var(--text-2);
  background: var(--bg-soft); padding: 12px 15px 12px 64px; border-radius: 11px;
  border: 1px solid var(--line); border-left: 3px solid var(--accent);
}
.lp-reflect::before {
  content: "反思"; position: absolute; left: 12px; top: 12px;
  font-size: 11px; font-weight: 700; color: #fff;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  padding: 3px 9px; border-radius: 6px;
}

@media (max-width: 640px) {
  .lp-head { grid-template-columns: 1fr; }
  .lp-actions { grid-row: auto; grid-column: 1; }
  .lp-goals { grid-template-columns: 1fr; }
  .lp-goals li { grid-template-columns: 84px 1fr; }
  .lp-prep-row { grid-template-columns: 1fr; gap: 6px; }
  .lp-prep-k { justify-self: start; padding: 2px 12px; }
  .lp-step-grid { grid-template-columns: 1fr; }
  .lp-step-grid > div:nth-child(1) { border-right: none; }
  .lp-board-c { grid-template-columns: 1fr; }
  .lp-board-c > div { border-right: none; border-bottom: 1px solid var(--line); }
  .lp-board-c > div:last-child { border-bottom: none; }
  .lp-key-grid { grid-template-columns: 1fr !important; }
  .lp-mis-row { grid-template-columns: 1fr; }
  .lp-ex { padding-left: 16px; padding-top: 40px; }
  .lp-ex::before { top: 10px; }
  .lp-reflect { padding-left: 15px; padding-top: 38px; }
  .lp-reflect::before { top: 10px; }
}

/* 重难点深度解析 */
.lp-key { background: color-mix(in srgb, var(--accent) 6%, transparent); border: 1px solid color-mix(in srgb, var(--accent) 22%, transparent); border-radius: 12px; padding: 16px 18px; }
.lp-key > h4 { color: var(--accent); border-left-color: var(--accent); }
.lp-key-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 14px; }
.lp-key-box { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; }
.lp-key-box:last-child { background: color-mix(in srgb, #f59e0b 7%, var(--card)); border-color: color-mix(in srgb, #f59e0b 26%, transparent); }
.lp-key-h { font-size: 13.5px; font-weight: 700; color: var(--text); margin: 4px 0 9px; }
.lp-key-box:last-child .lp-key-h { color: #b9760a; }
html[data-theme='dark'] .lp-key-box:last-child .lp-key-h { color: #f7c66b; }
.lp-key-list { margin: 0; padding-left: 20px; }
.lp-key-list li { font-size: 13px; line-height: 1.75; color: var(--text); margin-bottom: 7px; }
.lp-key-list li:last-child { margin-bottom: 0; }
.lp-key-list b { color: var(--accent); }

.lp-mis-h { margin-top: 4px; }
.lp-mis { display: flex; flex-direction: column; gap: 8px; margin-bottom: 14px; }
.lp-mis-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; align-items: stretch; }
.lp-mis-w, .lp-mis-r { font-size: 12.5px; line-height: 1.6; padding: 9px 11px; border-radius: 8px; }
.lp-mis-w { background: color-mix(in srgb, #ef4444 12%, transparent); color: #c0392b; border: 1px solid color-mix(in srgb, #ef4444 28%, transparent); }
.lp-mis-r { background: color-mix(in srgb, #22c55e 12%, transparent); color: #15803d; border: 1px solid color-mix(in srgb, #22c55e 28%, transparent); }
html[data-theme='dark'] .lp-mis-w { color: #fca5a5; }
html[data-theme='dark'] .lp-mis-r { color: #86efac; }
@media (max-width: 640px) { .lp-mis-row { grid-template-columns: 1fr; } }

/* ============ 实验探究 / 刷题练习 ============ */
.muted { color: var(--text-3); font-size: 12.5px; }
.loading { padding: 40px; text-align: center; color: var(--text-3); }
.notfound { padding: 40px; text-align: center; color: var(--text-2); }
.notfound a { color: var(--accent); }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 9px; overflow: hidden; }
.seg button { border: none; background: var(--card); padding: 8px 14px; cursor: pointer; font: inherit; font-size: 13.5px; color: var(--text-3); }
.seg button.active { background: var(--accent); color: #fff; }
.empty-hint { padding: 40px; text-align: center; color: var(--text-2); }
.empty-hint a { color: var(--accent); }

/* 实验卡片 */
.lab-card { display: block; text-decoration: none; color: inherit; padding: 16px; }
.lab-card-no { font-size: 12px; color: var(--text-3); }
.lab-card-name { font-weight: 700; font-size: 16px; margin: 5px 0 8px; line-height: 1.4; }
.lab-card-meta { font-size: 12.5px; color: var(--text-3); }
.lab-card-tags { margin-top: 10px; display: flex; gap: 6px; flex-wrap: wrap; }

/* 刷题 */
.pf-statbar { display: flex; gap: 14px; margin: 16px 0 10px; flex-wrap: wrap; }
.pf-stat { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 10px 16px; text-align: center; }
.pf-stat b { display: block; font-size: 20px; color: var(--accent); }
.pf-stat span { font-size: 12px; color: var(--text-3); }
.pf-tabs { margin: 14px 0 6px; }
/* 内嵌到 #/quiz 时的刷题区修正 */
.pf-embed { margin-top: 4px; }
.pf-embed .page-head { margin: 0 0 6px; }
.pf-embed .page-head h1 { display: none; }
.qz-maintabs { display: inline-flex; gap: 6px; margin: 4px 0 18px; }
.qz-maintabs button { padding: 8px 18px; font-size: 14px; font-weight: 600; color: var(--text-2); background: var(--bg-soft); border: 1px solid var(--line); border-radius: 999px; cursor: pointer; }
.qz-maintabs button.active { color: #fff; background: var(--accent); border-color: var(--accent); }
.qz-panel[hidden] { display: none; }
.quiz-page.qz-embed { padding: 0; }
.quiz-page.qz-embed .quiz-top { margin: 0 0 12px; }
.book-tree { display: flex; flex-direction: column; gap: 14px; }
.tree-book { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; }
.tree-book-head { display: flex; align-items: center; gap: 10px; font-size: 15px; margin-bottom: 6px; }
.tree-book-head .muted { flex: 1; }
.tree-chapter { padding: 6px 0; border-top: 1px dashed var(--line); }
.tree-ch-title { font-weight: 600; color: var(--text); font-size: 14px; margin: 8px 0 6px; }
.tree-secs { display: flex; gap: 8px; flex-wrap: wrap; }
.tree-section { border: 1px solid var(--line); background: var(--bg); color: var(--text); border-radius: 8px; padding: 6px 12px; font: inherit; font-size: 13px; cursor: pointer; }
.tree-section:hover { border-color: var(--accent); color: var(--accent); }

.quiz-page { max-width: 820px; }
.quiz-top { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.quiz-top .q-prog { flex: 1; font-size: 14px; color: var(--text-2); }
.q-bar { height: 6px; background: var(--line); border-radius: 4px; overflow: hidden; margin-bottom: 14px; }
.q-bar-in { height: 100%; background: var(--accent); transition: width .2s; }
.quiz-card { padding: 18px 20px; }
.q-type { margin-bottom: 10px; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.q-stem { font-size: 16.5px; line-height: 1.7; color: var(--text); margin-bottom: 14px; }
.q-opts { display: flex; flex-direction: column; gap: 8px; }
.q-opt { padding: 10px 14px; border: 1px solid var(--line); border-radius: 9px; cursor: pointer; font-size: 14.5px; color: var(--text); }
.q-opt:hover { background: var(--bg); }
.q-opt.selected { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 10%, transparent); }
.q-opt.correct { background: #e8f5e9; border-color: #2e7d32; color: #2e7d32; }
.q-opt.wrong { background: #ffebee; border-color: #c62828; color: #c62828; }
.q-fill { width: 100%; padding: 10px 14px; border: 1px solid var(--line); border-radius: 9px; font: inherit; font-size: 15px; }
.q-fill:focus { outline: none; border-color: var(--accent); }
.q-analysis { margin-top: 14px; padding: 12px 14px; background: color-mix(in srgb, var(--accent) 7%, transparent); border-radius: 9px; font-size: 14px; line-height: 1.7; color: var(--text); }
.quiz-nav { display: flex; gap: 10px; justify-content: center; margin-top: 16px; }

.pf-stats { padding: 8px 0; }
.pf-statbig { font-size: 15px; margin-bottom: 14px; color: var(--text); }
.pf-statbig b { color: var(--accent); font-size: 18px; }
.stat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; margin-bottom: 16px; }
.stat-box { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; text-align: center; }
.stat-box b { display: block; font-size: 20px; color: var(--accent); }
.stat-box .muted { font-size: 12px; }

.wrong-sec { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; margin-bottom: 12px; }
.wrong-sec-h { font-weight: 700; margin-bottom: 8px; color: var(--text); }
.wrong-item { padding: 8px 0; border-top: 1px dashed var(--line); }
.wrong-item:first-of-type { border-top: none; }
.wrong-q { font-size: 14px; color: var(--text); margin-bottom: 4px; }
.wrong-item .redo { margin-top: 6px; }
/* 抽题模式切换 & 错题展示增强 */
.quiz-top { flex-wrap: wrap; }
.q-mode { margin-left: auto; }
.q-mode button { padding: 6px 12px; font-size: 13px; }
.wrong-head { display: flex; align-items: center; justify-content: space-between; margin: 4px 2px 12px; }
.wrong-opts { display: flex; flex-direction: column; gap: 6px; margin: 6px 0; }
.wo { padding: 6px 10px; border: 1px solid var(--line); border-radius: 8px; font-size: 13.5px; color: var(--text-2); }
.wo-correct { border-color: #2e7d32; background: #e8f5e9; color: #2e7d32; font-weight: 600; }
.wrong-analysis { font-size: 13px; line-height: 1.7; color: var(--text-2); margin-top: 6px; background: var(--bg); padding: 8px 10px; border-radius: 8px; }

/* ===================== 公式速查（可展开详解） ===================== */
.fml-tip, .lab-tip, .home-learn-tip {
  margin: 16px 0 18px; padding: 14px 16px; border-radius: 12px;
  background: linear-gradient(90deg, #e8f1ff, #f4f9ff);
  border: 1px solid #cfe2ff; color: #1a3a5c; font-size: 14px; line-height: 1.7;
}
.fml-tip b, .lab-tip b, .home-learn-tip b { color: #0b5cad; }
.fml-tip a, .lab-tip a, .home-learn-tip a { color: #0b5cad; font-weight: 600; text-decoration: none; border-bottom: 1px solid rgba(11,92,173,.35); }
.fml-tip a:hover, .lab-tip a:hover, .home-learn-tip a:hover { border-bottom-color: #0b5cad; }
/* 深色模式：提示框（公式速查 / 实验 / 首页学习提示）改用深色底，避免浅蓝刺眼 */
html[data-theme='dark'] .fml-tip,
html[data-theme='dark'] .lab-tip,
html[data-theme='dark'] .home-learn-tip {
  background: color-mix(in srgb, var(--accent) 16%, var(--card));
  border-color: var(--line-2);
  color: var(--text);
}
html[data-theme='dark'] .fml-tip b,
html[data-theme='dark'] .lab-tip b,
html[data-theme='dark'] .home-learn-tip b,
html[data-theme='dark'] .fml-tip a,
html[data-theme='dark'] .lab-tip a,
html[data-theme='dark'] .home-learn-tip a { color: var(--accent); }
html[data-theme='dark'] .fml-tip a,
html[data-theme='dark'] .lab-tip a,
html[data-theme='dark'] .home-learn-tip a { border-bottom-color: color-mix(in srgb, var(--accent) 45%, transparent); }
/* 深色模式：公式速查列表中的公式文字也统一用公式主色，避免硬编码深蓝在暗底发暗 */
html[data-theme='dark'] .fml-eq { color: var(--formula); }
.fml-group { margin-bottom: 26px; }
.fml-list { display: flex; flex-direction: column; gap: 10px; }
.fml-card { border: 1px solid var(--line); border-radius: 12px; background: var(--card); overflow: hidden; transition: box-shadow .15s, border-color .15s; }
.fml-card.open { border-color: var(--accent); box-shadow: 0 6px 20px rgba(21,101,192,.10); }
.fml-head {
  width: 100%; display: flex; align-items: center; gap: 14px; padding: 14px 16px;
  background: none; border: none; cursor: pointer; text-align: left; font: inherit; color: var(--text);
}
.fml-head:hover { background: rgba(21,101,192,.04); }
.fml-name { font-weight: 700; font-size: 15px; min-width: 0; }
.fml-eq { flex: 1; min-width: 0; color: #0b5cad; font-size: 14px; }
.fml-eq .katex { font-size: 1.05em; }
.fml-chev { flex: none; transition: transform .2s; color: var(--text-3); }
.fml-card.open .fml-chev { transform: rotate(180deg); }
.fml-body { padding: 4px 18px 18px; border-top: 1px dashed var(--line); }
.fml-sec { margin-top: 14px; }
.fml-sec h4 { margin: 0 0 6px; font-size: 13.5px; color: var(--text-2); letter-spacing: .3px; }
.fml-sec p { margin: 0; line-height: 1.8; font-size: 14.5px; color: var(--text); }
.fml-vars { list-style: none; margin: 4px 0 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.fml-vars li { padding: 8px 12px; border: 1px solid #e3ecf7; border-radius: 8px; color: #0b5cad; }
.fml-vars li .katex { font-size: 1.05em; }
.fml-muted { color: var(--text-3) !important; background: #fafafa !important; border-color: var(--line) !important; }
.fml-ex { margin-top: 4px; padding: 10px 12px; background: #f3fbf4; border: 1px solid #d6efd9; border-radius: 8px; line-height: 1.8; font-size: 14px; color: #1f5132; }
.fml-pit { margin-top: 10px; padding: 10px 12px; background: #fff7ec; border: 1px solid #ffe2b0; border-radius: 8px; line-height: 1.7; font-size: 13.5px; color: #8a5a00; }
.fml-pit b { color: #b45309; }
.fml-rels { }
.fml-rel-row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 4px; }
.fml-rel { display: inline-flex; align-items: center; padding: 8px 12px; border-radius: 8px; text-decoration: none; font-size: 13.5px; font-weight: 600; }
.fml-rel { background: #eef4ff; color: #0b5cad; border: 1px solid #cfe2ff; }
.fml-rel:hover { background: #dcebff; }
.fml-rel-lab { background: #eafaf0; color: #157a3a; border-color: #bfe9cd; }
.fml-rel-lab:hover { background: #d6f3e1; }
.tag-lab { background: #eafaf0 !important; color: #157a3a !important; border: 1px solid #bfe9cd !important; }

/* ===================== 实验探究 相关学习面板 ===================== */
.lab-rel-panel { margin-top: 26px; }
.lab-rel-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; }
.lab-rel-card { display: flex; flex-direction: column; gap: 4px; padding: 16px; border: 1px solid var(--line); border-radius: 12px; text-decoration: none; background: var(--card); color: var(--text); transition: transform .12s, box-shadow .12s, border-color .12s; }
.lab-rel-card:hover { transform: translateY(-2px); box-shadow: 0 8px 22px rgba(0,0,0,.08); border-color: var(--accent); }
.lab-rel-card b { font-size: 15px; color: var(--accent); }
.lab-rel-card span { font-size: 13px; color: var(--text-3); line-height: 1.6; }

/* ===================== 刷题 书本高亮 ===================== */
.tree-book-focus { animation: tbFocus 2.4s ease; }
@keyframes tbFocus { 0%,100% { box-shadow: none; } 20% { box-shadow: 0 0 0 3px var(--accent); } }

/* ===================== 物理学习指南 ===================== */
.guide-view { max-width: 1080px; margin: 0 auto; padding: 0 18px 80px; }
.guide-intro { margin: 18px 0 14px; padding: 18px 20px; background: linear-gradient(135deg, var(--accent-soft), var(--accent-softs)); border: 1px solid var(--line); border-radius: var(--radius); line-height: 1.95; font-size: 15px; color: var(--text); }
.guide-steps { list-style: none; margin: 14px 0 0; padding: 0; position: relative; }
.guide-steps::before { content: ''; position: absolute; left: 7px; top: 6px; bottom: 6px; width: 2px; background: var(--line-2); }
.guide-step { position: relative; display: flex; gap: 14px; padding: 10px 0; }
.gs-dot { flex: none; width: 16px; height: 16px; margin-top: 3px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.gs-body { flex: 1; }
.gs-t { font-weight: 700; font-size: 15px; color: var(--text); }
.gs-d { margin-top: 2px; color: var(--text-2); font-size: 14px; line-height: 1.7; }
.gs-link { display: inline-block; margin-top: 4px; color: var(--accent); font-size: 13px; font-weight: 600; text-decoration: none; }
.gs-link:hover { text-decoration: underline; }
.concept-grid { grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 14px; margin-top: 14px; }
.concept-card { padding: 16px 18px; }
.concept-card .cc-t { margin: 0 0 10px; font-size: 16px; color: var(--accent); }
.cc-row { display: flex; gap: 8px; font-size: 13.5px; line-height: 1.7; padding: 6px 0; border-top: 1px dashed var(--line); }
.cc-row:first-of-type { border-top: none; }
.cc-row b { flex: none; width: 64px; color: var(--text-3); font-weight: 600; }
.cc-row span { flex: 1; color: var(--text); }
.cc-life span { color: #1f7a45; }
.cc-mis span { color: #b4540a; }
.cc-rem span { color: var(--accent); font-weight: 600; }
.method-list { margin: 14px 0 0; padding-left: 22px; }
.method-list li { margin: 6px 0; line-height: 1.7; font-size: 14px; color: var(--text); }
.method-list li::marker { color: var(--accent); font-weight: 700; }
.mistake-grid { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; margin-top: 14px; }
.mistake-card { padding: 14px 16px; border-left: 3px solid #f0a020; }
.mc-t { margin: 0 0 6px; font-size: 14.5px; color: #b4540a; }
.mc-d { font-size: 13.5px; line-height: 1.7; color: var(--text-2); }
.cc-more, .mc-more { display: inline-flex; align-items: center; gap: 6px; margin-top: 10px; padding: 5px 10px; font-size: 12.5px; font-weight: 600; color: #b4540a; background: #fff6ea; border: 1px solid #f3d9b0; border-radius: 999px; cursor: pointer; }
.cc-more:hover, .mc-more:hover { background: #ffedcf; }
.cc-more-n, .mc-more-n { display: inline-block; min-width: 16px; padding: 0 5px; font-size: 11px; color: #fff; background: #f0a020; border-radius: 999px; text-align: center; }
.cc-pits, .mc-pits { list-style: none; margin: 8px 0 0; padding: 8px 0 0; border-top: 1px dashed var(--line); }
.cc-pits li, .mc-pits li { position: relative; padding: 6px 0; font-size: 13px; line-height: 1.7; color: var(--text); }
.cc-pit-src, .mc-pit-src { display: block; margin-top: 2px; font-size: 12px; }
.cc-pit-src a, .mc-pit-src a { color: var(--accent); text-decoration: none; }
.cc-pit-src a:hover, .mc-pit-src a:hover { text-decoration: underline; }
.mistake-card-soft { border-left-color: var(--line-2); background: var(--bg-soft); }
.mistake-card-soft .mc-d { color: var(--text); }
/* 易错补充：内容多，使用更紧凑的多列小卡片 */
#guide-sec-extra .mistake-grid { grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px; }
#guide-sec-extra .mistake-card-soft { padding: 10px 12px; }
#guide-sec-extra .mistake-card-soft .mc-d { font-size: 12.5px; line-height: 1.65; }
#guide-sec-extra .mc-pit-src { margin-top: 4px; }
#guide-sec-extra .mc-pit-src a { font-size: 11px; }
.gc-bar { display: inline-block; width: 6px; height: 16px; border-radius: 3px; margin-right: 8px; vertical-align: -2px; }
.guide-view .view-sub a { color: var(--accent); text-decoration: none; }
.guide-view .view-sub a:hover { text-decoration: underline; }

/* ===== 学习指南：模块专属目录（TOC） ===== */
.guide-toc {
  position: sticky; top: 12px; z-index: 20;
  display: flex; align-items: center; gap: 12px;
  margin: 18px 0 8px; padding: 10px 14px;
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow);
  overflow-x: auto;
}
.gtoc-title { flex: none; font-weight: 700; font-size: 13px; color: var(--text-3); letter-spacing: .05em; }
.gtoc-list { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; }
.gtoc-list li { margin: 0; }
.gtoc-list a {
  display: inline-block; padding: 5px 11px; font-size: 13px; line-height: 1.2;
  color: var(--text-2); text-decoration: none;
  background: var(--bg-soft); border: 1px solid var(--line);
  border-radius: 999px; white-space: nowrap; transition: all .15s;
}
.gtoc-list a:hover { color: var(--accent); border-color: var(--accent); background: var(--accent-soft); }
.gtoc-sub a { font-size: 12.5px; padding: 4px 10px; color: var(--text-3); }

/* ===== 学习指南：可折叠分区 ===== */
.guide-sec {
  margin-top: 18px; padding: 0;
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow);
  overflow: hidden; scroll-margin-top: 76px;
}
.guide-sec > summary { list-style: none; cursor: pointer; }
.guide-sec > summary::-webkit-details-marker { display: none; }
.guide-sec > summary:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.guide-sec > .sec-head {
  margin: 0; padding: 16px 20px; border-bottom: 1px solid transparent;
  border-radius: var(--radius) var(--radius) 0 0; transition: background .15s;
}
.guide-sec > summary:hover > .sec-head { background: var(--bg-soft); }
.guide-sec[open] > .sec-head { border-bottom-color: var(--line); }
.guide-sec > .sec-head h2 { margin: 0; font-size: 18px; color: var(--text); }
.guide-sec > .sec-head p { margin: 4px 0 0; font-size: 13px; color: var(--text-2); }

/* 折叠箭头 */
.guide-sec > summary .gs-fold {
  flex: none; width: 22px; height: 22px; position: relative;
  border-radius: 50%; background: var(--bg-soft); border: 1px solid var(--line);
}
.guide-sec > summary .gs-fold::before {
  content: ''; position: absolute; top: 7px; left: 6px;
  width: 7px; height: 7px; border-right: 2px solid var(--text-2);
  border-bottom: 2px solid var(--text-2); transform: rotate(45deg);
  transition: transform .2s;
}
.guide-sec:not([open]) > summary .gs-fold::before { transform: rotate(-45deg); top: 9px; left: 8px; }

/* 内容区内边距（method-list 左侧留出编号空间） */
.guide-sec > .guide-steps,
.guide-sec > .concept-grid,
.guide-sec > .mistake-grid,
.guide-sec > .guide-theme { padding: 16px 20px 20px; }
.guide-sec > .method-list { padding: 16px 20px 20px 36px; }

/* 让 sec-head 成为 summary 的弹性行 */
.guide-sec > summary > .sec-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.guide-sec > summary > .sec-head > div { flex: 1; min-width: 0; }


/* ---------- 打印友好：教师可直接打印教案 ---------- */
@media print {
  .nav, .site-header, .view-hero, .lp-actions, .mty-toolbar, .mty-focusbar, .lesson-gen, .lesson-match, .sim-desc, footer { display: none !important; }
  .lp-card { break-inside: avoid; box-shadow: none; border-color: #ccc; margin-bottom: 14px; }
  .lp-card:hover { box-shadow: none; }
  .lp-head { background: #f3f4f6 !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .lp-proc li { break-inside: avoid; }
  .lp-sec { break-inside: avoid; }
  body { background: #fff; }
}

/* ============================================================
   逐字稿教案（#/script）
   ============================================================ */
.script-wrap { max-width: 980px; margin: 0 auto; padding: 26px 20px 60px; }
.script-header h1 { font-size: 24px; margin: 0 0 8px; letter-spacing: .3px; }
.script-badge {
  display: inline-block; margin-left: 8px; font-size: 11.5px; font-weight: 600;
  padding: 3px 10px; border-radius: 999px; vertical-align: middle;
  background: color-mix(in srgb, var(--accent) 12%, var(--card)); color: var(--accent);
  border: 1px solid color-mix(in srgb, var(--accent) 24%, transparent);
}
.script-sub { margin: 0 0 20px; font-size: 13.5px; line-height: 1.75; color: var(--fg-2); }

.script-picker { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 18px 20px; margin-bottom: 22px; }
.script-label { display: block; font-size: 12.5px; font-weight: 700; color: var(--fg-2); margin-bottom: 9px; }
.script-picker-row { display: flex; gap: 10px; }
.script-input {
  flex: 1; min-width: 0; padding: 11px 14px; border-radius: 10px; font-size: 14px;
  border: 1px solid var(--line-2); background: var(--bg-2, var(--card)); color: var(--fg);
}
.script-input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 14%, transparent); }
.script-go {
  flex: 0 0 auto; padding: 11px 20px; border-radius: 10px; border: none; cursor: pointer;
  font-size: 13.5px; font-weight: 700; color: #fff;
  background: linear-gradient(135deg, #d97706, #b45309);
}
.script-go:hover { filter: brightness(1.06); }
.script-hint { margin-top: 10px; font-size: 12.5px; min-height: 18px; }
.script-warn { color: #b45309; }
.script-loading { color: var(--fg-2); }

.sc-empty { padding: 40px; text-align: center; color: var(--fg-2); font-size: 13.5px; background: var(--card); border: 1px dashed var(--line-2); border-radius: 14px; }

.sc-card { background: var(--card); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; }
.sc-head { padding: 20px 22px 16px; border-bottom: 1px solid var(--line); background: color-mix(in srgb, var(--accent) 5%, var(--card)); }
.sc-title { font-size: 20px; font-weight: 800; letter-spacing: .3px; }
.sc-meta { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 11px; }
.sc-chip {
  font-size: 11.5px; font-weight: 600; padding: 3px 10px; border-radius: 999px;
  background: color-mix(in srgb, var(--accent) 9%, var(--card)); color: var(--accent);
  border: 1px solid color-mix(in srgb, var(--accent) 20%, transparent);
}
.sc-chip-t { background: color-mix(in srgb, #16a34a 10%, var(--card)); color: #15803d; border-color: color-mix(in srgb, #16a34a 26%, transparent); }
.sc-chip-e { background: color-mix(in srgb, #d97706 12%, var(--card)); color: #b45309; border-color: color-mix(in srgb, #d97706 28%, transparent); }

.sc-turns { padding: 8px 22px 6px; }
.sc-line { display: flex; gap: 10px; padding: 7px 0; font-size: 14.5px; line-height: 1.95; }
.sc-who {
  flex: 0 0 auto; width: 24px; height: 24px; margin-top: 4px; border-radius: 7px;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 800;
}
.sc-say { flex: 1; min-width: 0; word-break: break-word; }
.sc-t .sc-who { background: color-mix(in srgb, #2563eb 15%, var(--card)); color: #1d4ed8; }
.sc-t .sc-say { color: var(--fg); }
.sc-s .sc-who { background: color-mix(in srgb, #16a34a 15%, var(--card)); color: #15803d; }
.sc-s .sc-say { color: var(--fg-2); }
.sc-n { padding: 16px 0 6px; }
.sc-n .sc-say {
  font-size: 12.5px; font-weight: 800; letter-spacing: .5px; color: var(--accent);
  border-left: 3px solid var(--accent); padding-left: 10px; line-height: 1.6;
}

.sc-src {
  margin: 10px 22px 0; padding: 10px 13px; border-radius: 9px; font-size: 12px; line-height: 1.7;
  color: var(--fg-2); background: var(--bg-2, color-mix(in srgb, var(--fg) 4%, var(--card)));
  border: 1px dashed var(--line-2);
}
.sc-foot { display: flex; flex-wrap: wrap; gap: 10px; padding: 16px 22px 20px; }
.sc-btn {
  display: inline-flex; align-items: center; gap: 6px; padding: 9px 16px; border-radius: 9px;
  font-size: 13px; font-weight: 700; text-decoration: none; cursor: pointer;
  border: 1px solid var(--line-2); background: var(--card); color: var(--accent); transition: .15s;
}
.sc-btn:hover { background: var(--accent-soft); transform: translateY(-1px); }
.sc-btn-ghost { color: var(--fg-2); }

/* 教案卡片里的「逐字稿」按钮 */
.lp-script { display: inline-flex; align-items: center; text-decoration: none; }
.mty-lesson-cta-btns { flex: 0 0 auto; display: flex; flex-direction: column; gap: 8px; }
.mty-lesson-cta-btn-2 { background: linear-gradient(135deg, #0ea5e9, #0369a1); box-shadow: 0 3px 12px rgba(14,165,233,.28); }
.mty-lesson-cta-btn-2:hover { box-shadow: 0 6px 18px rgba(14,165,233,.36); }

html[data-theme='dark'] .sc-chip { background: rgba(255,255,255,.06); }
html[data-theme='dark'] .sc-chip-t { color: #6ee7a8; }
html[data-theme='dark'] .sc-t .sc-who { color: #93c5fd; }
html[data-theme='dark'] .sc-s .sc-who { color: #6ee7a8; }

@media (max-width: 640px) {
  .script-picker-row { flex-direction: column; }
  .sc-turns { padding: 8px 14px 6px; }
  .sc-head { padding: 16px 14px 14px; }
}

@media print {
  .script-picker, .sc-foot, .site-header, .nav { display: none !important; }
  .sc-line { break-inside: avoid; }
}

/* 教案 · 课堂实录对话（取自资料库教案，与逐字稿同源） */
.lp-dlg { margin-top: 10px; padding: 10px 12px; border-radius: 9px; border: 1px dashed var(--line-2); background: color-mix(in srgb, var(--accent) 4%, var(--card)); }
.lp-dlg > i { display: block; font-style: normal; font-size: 11px; font-weight: 700; letter-spacing: .3px; color: var(--accent); margin-bottom: 7px; }
.lp-dlg-q, .lp-dlg-a { display: flex; gap: 8px; font-size: 13px; line-height: 1.8; }
.lp-dlg-a { margin-top: 5px; }
.lp-dlg-q b, .lp-dlg-a b {
  flex: 0 0 auto; width: 20px; height: 20px; margin-top: 4px; border-radius: 6px; font-size: 11px;
  display: inline-flex; align-items: center; justify-content: center; font-weight: 800;
}
.lp-dlg-q b { background: color-mix(in srgb, #2563eb 15%, var(--card)); color: #1d4ed8; }
.lp-dlg-a b { background: color-mix(in srgb, #16a34a 15%, var(--card)); color: #15803d; }
html[data-theme='dark'] .lp-dlg-q b { color: #93c5fd; }
html[data-theme='dark'] .lp-dlg-a b { color: #6ee7a8; }

/* 教案 · 教材教案原始目标 */
.lp-goals-real { margin-top: 12px; padding: 11px 13px; border-radius: 9px; border: 1px dashed var(--line-2); background: color-mix(in srgb, var(--accent) 4%, var(--card)); }
.lp-goals-real > i { display: block; font-style: normal; font-size: 11px; font-weight: 700; letter-spacing: .3px; color: var(--accent); margin-bottom: 7px; }
.lp-goals-real ul { margin: 0; padding-left: 18px; }
.lp-goals-real li { font-size: 12.8px; line-height: 1.85; color: var(--fg-2); }

/* 逐字稿 · 示例快捷入口 */
.sc-examples { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 12px; padding-top: 12px; border-top: 1px dashed var(--line-2); }
.sc-ex-t { font-size: 12px; font-weight: 700; color: var(--fg-2); }
.sc-examples a {
  font-size: 12px; padding: 4px 11px; border-radius: 999px; text-decoration: none;
  border: 1px solid var(--line-2); background: var(--card); color: var(--accent); transition: .15s;
}
.sc-examples a:hover { background: var(--accent-soft); transform: translateY(-1px); }
