/* ============================================================
   数学竞赛学习平台 — 红金主题 · 四列布局
   ============================================================ */
:root {
  --brand-from: #E23B3B;
  --brand-to: #F6A623;
  --brand-mid: #F07B3C;
  --brand-grad: linear-gradient(135deg, var(--brand-from) 0%, var(--brand-mid) 55%, var(--brand-to) 100%);
  --brand-soft: linear-gradient(135deg, rgba(226,59,59,.08), rgba(246,166,35,.08));
  --accent: #E23B3B;
  --accent-2: #F6A623;
  --accent-soft: rgba(226,59,59,.08);
  --bg: #FFFFFF;
  --bg-soft: #F7F8FA;
  --bg-panel: #FBFCFF;
  --text: #1F2430;
  --text-2: #6B7280;
  --text-3: #9AA1AE;
  --border: #EBEEF3;
  --radius: 12px;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
[hidden] { display: none !important; }
html, body { height: 100%; }
body {
  font-family: -apple-system, "PingFang SC", "Microsoft YaHei", "Segoe UI", Roboto, sans-serif;
  background: var(--bg-soft);
  color: var(--text);
  font-size: 14px;
  line-height: 1.6;
  height: 100vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* ===== 顶栏 ===== */
header.topbar {
  height: 56px; background: #fff; border-bottom: 1px solid var(--border);
  display: flex; align-items: center; padding: 0 20px; gap: 16px; flex-shrink: 0; z-index: 20;
}
.brand { display: flex; align-items: center; gap: 10px; }
.brand-logo {
  width: 32px; height: 32px; border-radius: 9px; background: var(--brand-grad);
  color: #fff; font-size: 18px; font-weight: 700; display: flex; align-items: center; justify-content: center;
}
.brand-text h1 { font-size: 16px; font-weight: 700; line-height: 1.2; }
.brand-text span { font-size: 11px; color: var(--text-3); }
.topbar-actions { margin-left: auto; display: flex; align-items: center; gap: 10px; }

.search-box {
  display: flex; align-items: center; gap: 6px; background: var(--bg-soft);
  border: 1px solid var(--border); border-radius: 8px; padding: 6px 12px; width: 270px; position: relative;
}
.search-box .icon { color: var(--text-3); font-size: 13px; }
.search-box input { border: none; background: transparent; outline: none; width: 100%; font-size: 13px; color: var(--text); }
.search-clear { border: none; background: none; color: var(--text-3); cursor: pointer; font-size: 16px; line-height: 1; }
.search-results {
  position: absolute; top: calc(100% + 8px); left: 0; width: 360px; max-height: 420px; overflow-y: auto;
  background: #fff; border: 1px solid var(--border); border-radius: 10px; box-shadow: 0 18px 45px rgba(31,36,48,.16);
  padding: 6px; z-index: 80;
}
.search-result {
  width: 100%; border: 0; background: transparent; border-radius: 8px; padding: 9px 10px; cursor: pointer;
  display: grid; grid-template-columns: 78px 1fr; gap: 10px; text-align: left; color: var(--text);
}
.search-result:hover, .search-result:focus { background: var(--accent-soft); outline: none; }
.search-code { color: var(--accent); font: 600 11.5px ui-monospace, SFMono-Regular, Consolas, monospace; padding-top: 2px; }
.search-result b { display: block; font-size: 13px; }
.search-result small { display: block; color: var(--text-3); font-size: 11px; margin-top: 1px; }
.search-empty { color: var(--text-3); text-align: center; padding: 18px 10px; font-size: 12.5px; }

.lang-switch { display: flex; gap: 2px; background: var(--bg-soft); border: 1px solid var(--border); border-radius: 8px; padding: 2px; }
.lang-btn {
  border: none; background: none; padding: 5px 10px; border-radius: 6px; font-size: 12.5px;
  color: var(--text-2); cursor: pointer; transition: all .15s;
}
.lang-btn.active { background: var(--brand-grad); color: #fff; font-weight: 600; }

.mini-progress { display: flex; align-items: center; gap: 6px; }
.mini-progress-track { width: 90px; height: 6px; background: var(--border); border-radius: 3px; overflow: hidden; }
.mini-progress-fill { height: 100%; background: var(--brand-grad); border-radius: 3px; transition: width .3s; }
.mini-progress span { font-size: 11px; color: var(--text-3); min-width: 30px; }

.btn {
  border: 1px solid var(--border); background: #fff; color: var(--text);
  border-radius: 8px; padding: 7px 14px; font-size: 13px; cursor: pointer; transition: all .15s; white-space: nowrap;
}
.btn:hover { border-color: var(--accent); color: var(--accent); }
.btn.primary { background: var(--brand-grad); color: #fff; border: none; font-weight: 600; }
.btn.primary:hover { opacity: .92; color: #fff; }
.btn.ghost { border-color: transparent; color: var(--text-3); }
.btn.ghost:hover { color: var(--accent); border-color: transparent; }

/* ===== 五列布局 ===== */
.layout { flex: 1; display: flex; overflow-x: auto; overflow-y: hidden; }

/* 列1：导航树 */
aside.sidebar {
  width: 236px; flex-shrink: 0; background: #fff; border-right: 1px solid var(--border);
  display: flex; flex-direction: column; overflow: hidden;
}
.sidebar-head {
  display: flex; align-items: center; justify-content: space-between; padding: 12px 14px 8px; flex-shrink: 0;
}
.sidebar-head span { font-size: 12px; font-weight: 600; color: var(--text-3); letter-spacing: .5px; }
.link-btn { border: none; background: none; color: var(--accent); font-size: 12px; cursor: pointer; }
.nav-tree { flex: 1; overflow-y: auto; padding: 4px 8px 16px; }
.nav-cat { margin-bottom: 4px; }
.nav-row {
  display: flex; align-items: center; gap: 8px; padding: 8px 10px;
  border-radius: 8px; cursor: pointer; transition: background .12s;
}
.nav-row:hover { background: var(--bg-soft); }
.nav-caret { font-size: 10px; color: var(--text-3); transition: transform .15s; width: 12px; flex-shrink: 0; }
.nav-cat.open .nav-caret { transform: rotate(90deg); }
.nav-cat-color { width: 8px; height: 8px; border-radius: 3px; flex-shrink: 0; }
.nav-cat-name { font-weight: 600; font-size: 13.5px; flex: 1; }
.nav-count { font-size: 11px; color: var(--text-3); }
.nav-topics { display: none; padding-left: 18px; }
.nav-cat.open .nav-topics { display: block; }
.nav-topic {
  display: flex; align-items: center; justify-content: space-between;
  padding: 5px 10px; border-radius: 6px; cursor: pointer; font-size: 13px; color: var(--text-2);
}
.nav-topic:hover { background: var(--accent-soft); color: var(--accent); }
.nav-topic-label { min-width: 0; flex: 1; }
.nav-topic-tail { display: inline-flex; align-items: center; gap: 6px; flex: 0 0 auto; }
.topic-mock-mini {
  border: 1px solid rgba(49,95,157,.22); border-radius: 999px; padding: 1px 6px;
  background: #eef5ff; color: #315f9d; font: inherit; font-size: 9.5px; font-weight: 700; cursor: pointer;
}
.topic-mock-mini:hover { border-color: #315f9d; background: #fff; }
.nav-points { display: none; padding-left: 12px; }
.nav-topic.open + .nav-points { display: block; }
.nav-point {
  padding: 4px 10px; border-radius: 6px; cursor: pointer; font-size: 12.5px; color: var(--text-2);
  display: flex; align-items: center; gap: 7px;
}
.nav-point-name { min-width: 0; flex: 1; }
.nav-core { color: var(--accent); font-size: 9px; font-weight: 800; border: 1px solid rgba(226,59,59,.25); border-radius: 5px; padding: 0 3px; }
.nav-point:hover { background: var(--bg-soft); }
.nav-point.active { background: var(--brand-soft); color: var(--accent); font-weight: 600; }
.nav-point .dot { width: 5px; height: 5px; border-radius: 50%; background: var(--border); flex-shrink: 0; }
.nav-point.active .dot { background: var(--accent); }
.nav-point .st { width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; }
.nav-point .st.done { background: #2FBF71; }
.nav-point .st.learning { background: var(--accent-2); }

/* 通用列 */
.col { display: flex; flex-direction: column; overflow: hidden; background: #fff; }
.col-head {
  flex-shrink: 0; display: flex; align-items: center; gap: 8px;
  padding: 13px 16px; background: #fff; border-bottom: 1px solid var(--border);
  font-size: 14px; font-weight: 700;
}
.col-head::before {
  content: ''; width: 4px; height: 16px; border-radius: 2px; background: var(--brand-grad); flex-shrink: 0;
}
.col-head .count { font-size: 12px; color: var(--text-3); font-weight: 400; }
.col-scroll { flex: 1; overflow-y: auto; }

/* 列2：讲解 */
.col-explain { flex: 1; min-width: 320px; border-right: 1px solid var(--border); }
.col-explain .col-body { flex: 1; overflow-y: auto; padding: 18px 22px 24px; }
.crumb { font-size: 12px; color: var(--text-3); margin-bottom: 6px; }
.point-head { margin-bottom: 4px; }
.point-head .badge {
  display: inline-flex; align-items: center; gap: 5px; background: var(--brand-soft); color: var(--accent);
  padding: 3px 10px; border-radius: 16px; font-size: 11.5px; font-weight: 600; margin-bottom: 8px;
}
.point-head h2 { font-size: 22px; font-weight: 800; line-height: 1.3; }
.point-head .en { font-size: 13px; color: var(--text-3); margin-top: 2px; }
.status-actions { display: flex; gap: 8px; margin: 12px 0 4px; }
.profile-card {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px 12px;
  margin: 12px 0; padding: 12px 14px; background: var(--bg-panel); border: 1px solid var(--border); border-radius: 10px;
}
.profile-row { display: grid; grid-template-columns: 64px 1fr; gap: 8px; align-items: start; font-size: 12.5px; min-width: 0; }
.profile-row.profile-wide { grid-column: 1 / -1; }
.profile-label { color: var(--text-3); font-size: 11.5px; }
.meta-tag { display: inline-flex; align-items: center; border-radius: 999px; padding: 2px 8px; font-size: 11px; background: #eef2f7; margin: 1px 5px 1px 0; }
.meta-tag.core { background: #fff2b8; color: #8a5a00; font-weight: 700; }
.meta-tag.core-plus { background: #ffe0b2; color: #a54600; font-weight: 800; }
.meta-tag.book { background: #eaf3ff; color: #315f9d; }
.meta-muted { color: var(--text-3); }
.book-tags { display: flex; flex-wrap: wrap; }
.status-btn {
  border: 1px solid var(--border); background: #fff; color: var(--text-2);
  border-radius: 16px; padding: 5px 14px; font-size: 12.5px; cursor: pointer; transition: all .15s;
}
.status-btn:hover { border-color: var(--accent); color: var(--accent); }
.status-btn.active-learning { background: var(--accent-2); color: #fff; border-color: var(--accent-2); }
.status-btn.active-done { background: #2FBF71; color: #fff; border-color: #2FBF71; }

.explain-h {
  font-size: 14px; font-weight: 700; color: var(--accent);
  margin: 16px 0 8px; padding-left: 10px; border-left: 3px solid var(--accent-2);
}
.explain-p { margin: 8px 0; color: var(--text); font-size: 13.5px; }
.explain-f {
  margin: 10px 0; padding: 8px 14px; background: var(--bg-panel);
  border: 1px solid var(--border); border-radius: 8px; text-align: center; overflow-x: auto;
}
.lecture-figure {
  margin: 12px auto; padding: 10px; max-width: 100%; text-align: center; background: #fff;
  border: 1px solid var(--border); border-radius: 10px;
}
.lecture-figure img { display: block; width: auto; height: auto; max-width: 100%; max-height: 200px; margin: 0 auto; object-fit: contain; }
.lecture-figure figcaption { margin-top: 6px; color: var(--text-3); font-size: 11px; line-height: 1.45; }
.notes-block { margin-top: 24px; border-top: 1px dashed var(--border); padding-top: 14px; }
.notes-block label { font-size: 13px; font-weight: 600; color: var(--text-2); display: block; margin-bottom: 8px; }
.notes-block textarea {
  width: 100%; min-height: 90px; border: 1px solid var(--border); border-radius: 8px;
  padding: 10px 12px; font-size: 13px; font-family: inherit; resize: vertical; outline: none;
}
.notes-block textarea:focus { border-color: var(--accent-2); }
.notes-tip { font-size: 11px; color: var(--text-3); margin-top: 6px; }

/* 列3：例题 */
.col-examples { width: 400px; flex-shrink: 0; background: var(--bg-soft); border-right: 1px solid var(--border); }
.col-examples .col-scroll { padding: 14px; }
.example-card {
  border: 1px solid var(--border); border-radius: var(--radius); margin-bottom: 12px; overflow: hidden; background: #fff;
}
.example-head {
  display: flex; align-items: center; gap: 8px; padding: 11px 14px; cursor: pointer;
  border-bottom: 1px solid transparent;
}
.example-card.open .example-head { border-bottom-color: var(--border); }
.example-head .tag {
  width: 24px; height: 24px; border-radius: 7px; background: var(--brand-grad); color: #fff;
  font-size: 12.5px; font-weight: 700; display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.example-head .t { font-weight: 600; font-size: 13.5px; flex: 1; }
.example-head .arrow { color: var(--text-3); font-size: 12px; transition: transform .15s; }
.example-card.open .arrow { transform: rotate(180deg); }
.example-body { display: none; padding: 13px 14px; }
.example-card.open .example-body { display: block; }
.example-body .q { margin-bottom: 10px; font-size: 13.5px; }
.example-body .sol {
  background: var(--accent-soft); border-radius: 8px; padding: 11px 13px;
  border-left: 3px solid var(--accent-2); font-size: 13px;
}
.example-body .sol .sol-label { font-weight: 700; color: var(--accent); margin-bottom: 3px; font-size: 12.5px; }

/* 列4：分层练习 */
.col-panel { width: 400px; flex-shrink: 0; }
.tabs { display: flex; border-bottom: 1px solid var(--border); flex-shrink: 0; }
.tab {
  flex: 1; text-align: center; padding: 12px 0; font-size: 13.5px; font-weight: 600;
  color: var(--text-2); cursor: pointer; position: relative; transition: color .15s;
}
.tab:hover { color: var(--accent); }
.tab.active { color: var(--accent); }
.tab.active::after {
  content: ''; position: absolute; left: 50%; bottom: -1px; transform: translateX(-50%);
  width: 40px; height: 3px; border-radius: 2px; background: var(--brand-grad);
}
.tab .n { font-size: 11px; color: var(--text-3); margin-left: 3px; }
.col-panel .col-scroll { padding: 14px; }
.prac-item {
  border: 1px solid var(--border); border-radius: 10px; padding: 12px 13px; margin-bottom: 10px; background: #fff;
}
.prac-q { font-size: 13.5px; }
.prac-q .idx { color: var(--accent); font-weight: 700; margin-right: 5px; }
.prac-content { display: block; margin-top: 5px; }
.prac-content .explain-p:first-child, .prac-content .lecture-figure:first-child { margin-top: 0; }
.prac-ans-toggle { margin-top: 8px; font-size: 12px; color: var(--accent); cursor: pointer; user-select: none; }
.prac-ans { display: none; margin-top: 8px; padding: 10px 12px; background: var(--accent-soft); border-radius: 8px; font-size: 13px; }
.prac-ans.show { display: block; }
.prac-ans .ans-label { font-weight: 700; color: var(--accent); margin-right: 6px; }
/* 分层练习：允许先作答再核对答案 */
.prac-answer-row { display: flex; align-items: center; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.prac-myanswer { flex: 1 1 160px; min-width: 120px; height: 32px; padding: 6px 10px; border: 1px solid var(--border, #d8e0ea); border-radius: 8px; font-size: 13px; font-family: inherit; }
.prac-myanswer:focus { outline: none; border-color: var(--accent, #3b6fe2); box-shadow: 0 0 0 2px rgba(59,111,226,.15); }
.prac-answer-btn { border: 1px solid var(--accent, #3b6fe2); background: #fff; color: var(--accent, #3b6fe2); border-radius: 8px; padding: 6px 14px; font-size: 13px; font-weight: 700; cursor: pointer; font-family: inherit; }
.prac-answer-btn:hover { background: rgba(59,111,226,.08); }
.exam-more { display: block; margin: 14px 0 4px; }
.exam-more .btn { width: 100%; padding: 10px; font-weight: 600; }
.empty-hint { color: var(--text-3); text-align: center; padding: 40px 0; font-size: 13px; }
.welcome { padding: 30px 20px; text-align: center; color: var(--text-2); }
.welcome h3 { font-size: 16px; color: var(--text); margin-bottom: 8px; }
.welcome p { font-size: 13px; color: var(--text-3); }

/* 列5：真题训练 */
.col-true-training { width: 430px; flex-shrink: 0; background: #f7f9fc; border-left: 1px solid var(--border); }
.col-true-training .col-head { background: #fff; }
.col-true-training .col-scroll { padding: 14px; }
.col-head .true-total { margin-left: auto; color: var(--text-3); font-size: 10.5px; font-weight: 400; }
.true-card { border: 1px solid var(--border); border-radius: 12px; margin-bottom: 14px; overflow: hidden; background: #fff; box-shadow: 0 1px 2px rgba(16,24,40,.03); }
.true-card-head { display: flex; align-items: center; gap: 9px; padding: 11px 12px; border-bottom: 1px solid var(--border); background: linear-gradient(135deg, rgba(59,111,226,.06), rgba(246,166,35,.05)); }
.true-index { width: 25px; height: 25px; flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center; border-radius: 7px; background: #315f9d; color: #fff; font-size: 12px; font-weight: 800; }
.true-source { min-width: 0; flex: 1; }
.true-source b { display: block; font-size: 12.5px; line-height: 1.35; }
.true-source code { display: block; margin-top: 2px; color: var(--text-3); font-size: 9.5px; overflow-wrap: anywhere; }
.true-role { flex: 0 0 auto; padding: 2px 7px; border-radius: 999px; background: #eaf3ff; color: #315f9d; font-size: 9.5px; font-weight: 700; }
.true-card-body { padding: 12px 13px 6px; font-size: 13.2px; line-height: 1.65; overflow-wrap: anywhere; }
.true-language + .true-language { margin-top: 13px; padding-top: 12px; border-top: 1px dashed var(--border); }
.true-language-label { margin-bottom: 7px; color: #315f9d; font-size: 10.5px; font-weight: 800; letter-spacing: .2px; }
.true-language-en { color: var(--text-1); }
.true-language-en + .true-language-zh { border-top: none; padding-top: 0; }
.true-language-zh { color: var(--text-2); background: #f7f9fc; border: 1px solid #eef2f7; border-radius: 9px; padding: 10px 11px; margin-top: 13px; }
.true-language-zh .true-language-label { color: #7a8aa0; }
/* 中文翻译默认隐藏，点击「显示中文翻译」按钮展开 */
.true-cn-toggle { display: inline-block; margin-top: 10px; padding: 6px 13px; border: 1px solid #d6e0ee; border-radius: 999px; background: #fff; color: #315f9d; font-size: 11.5px; font-weight: 700; cursor: pointer; }
.true-cn-toggle:hover { background: #f0f6ff; }
.true-cn-toggle.open { background: #eaf3ff; }
.true-cn-body { display: none; }
.true-cn-body.cn-open { display: block; }
.true-question-text br + br { line-height: 2.2; }
.true-choices { list-style: none; display: grid; gap: 6px; margin: 10px 0 2px; padding: 0; }
.true-choices li { display: flex; align-items: flex-start; gap: 7px; padding: 6px 8px; border: 1px solid #e7ebf2; border-radius: 7px; background: #fbfcfe; }
.true-choice-key { flex: 0 0 auto; color: #315f9d; font-weight: 800; }
.true-aime-blank { margin: 12px 0 4px; text-align: center; color: var(--text-2); }
.true-aime-blank span { display: inline-block; width: 26px; height: 28px; margin-left: 4px; vertical-align: middle; border: 1.5px solid #64748b; border-radius: 4px; background: #fff; }
.true-original-html p { margin: 0 0 9px; }
/* 题目插图、选项图、解析图统一比例约束，防止原图过大撑破卡片 */
/* 注意：题目图片是 3x 视网膜图（HTML 写 1x 尺寸，实际文件大 3 倍）。
   不要用 height:auto/width:auto，否则浏览器会按 3 倍原图显示而鼓出来；
   应尊重 HTML 的 width/height 属性（即 1x 设计尺寸），只加安全上限。 */
.true-question-text img,
.true-choices img,
.true-original-html img,
.amc-card-body img,
.amc-sol-text img,
.amc-hints img,
.mri-body img,
.paper-q-body img {
  max-width: 100%;
  max-height: 200px;
  vertical-align: middle;
}
/* 居中显示式（独立公式块）尊重 1x 设计尺寸、居中 */
.true-question-text img.latexcenter,
.true-choices img.latexcenter,
.true-original-html img.latexcenter,
.amc-card-body img.latexcenter,
.amc-sol-text img.latexcenter,
.amc-hints img.latexcenter,
.mri-body img.latexcenter,
.paper-q-body img.latexcenter {
  display: block;
  margin: 8px auto;
}
/* MathJax SVG 公式统一压到紧凑比例 */
.true-question-text mjx-container,
.true-choices mjx-container,
.true-original-html mjx-container,
.amc-card-body mjx-container,
.amc-sol-text mjx-container,
.amc-hints mjx-container,
.mri-body mjx-container,
.paper-q-body mjx-container {
  font-size: 0.92em !important;
  vertical-align: middle;
}
/* 居中显示式公式块不要鼓出来 */
.true-question-text mjx-container[display="true"],
.true-choices mjx-container[display="true"],
.true-original-html mjx-container[display="true"],
.amc-card-body mjx-container[display="true"],
.amc-sol-text mjx-container[display="true"],
.amc-hints mjx-container[display="true"],
.mri-body mjx-container[display="true"],
.paper-q-body mjx-container[display="true"] {
  font-size: 1.05em !important;
}
.true-source-visuals { margin: 10px 0 2px; padding: 9px; text-align: center; border: 1px dashed var(--border); border-radius: 8px; background: #fff; }
.true-source-visuals::before { content: '原题配图'; display: block; margin-bottom: 6px; color: var(--text-3); font-size: 10px; }
.true-source-visuals img { display: block; width: auto; height: auto; max-width: 100%; max-height: 200px; margin: 5px auto; object-fit: contain; }
.true-missing-formula { display: inline-block; padding: 2px 5px; border-radius: 4px; background: #fff6df; }
.true-answer-toggle { margin: 3px 13px 12px; padding: 0; border: 0; background: none; color: var(--accent); font: inherit; font-size: 12px; cursor: pointer; }
.true-answer { display: none; margin: 0 13px 13px; padding: 9px 11px; border-left: 3px solid #2fbf71; border-radius: 7px; background: rgba(47,191,113,.09); font-size: 13px; }
.true-answer.show { display: flex; align-items: center; gap: 9px; }
.true-answer span { color: var(--text-3); font-size: 11px; }
.true-answer b { color: #167a49; font-size: 15px; }

/* ===== 弹窗 ===== */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(16,24,40,.45); z-index: 100;
  display: flex; align-items: center; justify-content: center; padding: 20px;
}
.modal {
  background: #fff; border-radius: 16px; width: 860px; max-width: 100%; max-height: 90vh;
  display: flex; flex-direction: column; overflow: hidden; box-shadow: 0 20px 60px rgba(16,24,40,.3);
}
.modal-close {
  position: absolute; top: 14px; right: 18px; border: none; background: none;
  font-size: 24px; color: var(--text-3); cursor: pointer; line-height: 1;
}
.quiz-modal { position: relative; }
.quiz-header { padding: 20px 24px 12px; border-bottom: 1px solid var(--border); }
.quiz-header h2 { font-size: 18px; }
.quiz-quota { font-size: 12px; color: var(--text-3); }
.quiz-controls { display: flex; align-items: center; gap: 10px; padding: 12px 24px; border-bottom: 1px solid var(--border); }
.quiz-score { margin-left: auto; font-weight: 700; color: var(--accent); }
.quiz-body { flex: 1; overflow-y: auto; padding: 16px 24px; }
.quiz-card { border: 1px solid var(--border); border-radius: 12px; padding: 14px 16px; margin-bottom: 12px; }
.quiz-qhead { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.quiz-num { background: var(--brand-grad); color: #fff; font-size: 12px; font-weight: 700; padding: 2px 8px; border-radius: 6px; }
.quiz-label { font-size: 12px; color: var(--text-3); }
.quiz-q { font-size: 14px; margin-bottom: 10px; }
.quiz-opts { display: flex; flex-direction: column; gap: 6px; }
.quiz-opt {
  display: flex; align-items: center; gap: 8px; text-align: left; padding: 8px 12px;
  border: 1px solid var(--border); border-radius: 8px; background: #fff; cursor: pointer; font-size: 13px;
}
.quiz-opt:hover { border-color: var(--accent-2); }
.quiz-opt.selected { border-color: var(--accent); background: var(--accent-soft); }
.quiz-opt.correct { border-color: #2FBF71; background: rgba(47,191,113,.1); }
.quiz-opt.wrong { border-color: var(--accent); background: rgba(226,59,59,.1); }
.opt-key { font-weight: 700; color: var(--text-3); width: 16px; }
.quiz-ans { margin-top: 10px; padding: 10px 12px; background: var(--accent-soft); border-radius: 8px; font-size: 13px; }

::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-thumb { background: #D5DAE2; border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: #C0C6D0; }

/* ===== 知识图谱 ===== */
.map-modal { position: relative; width: 92vw; height: 88vh; }
.map-header { padding: 18px 24px 10px; border-bottom: 1px solid var(--border); }
.map-title-row { display: flex; align-items: center; gap: 16px; margin-bottom: 4px; }
.map-header h2 { font-size: 18px; }
.map-switch { display: flex; gap: 2px; background: var(--bg-soft); border: 1px solid var(--border); border-radius: 8px; padding: 2px; }
.map-mode-btn {
  border: none; background: none; padding: 5px 14px; border-radius: 6px; font-size: 12.5px;
  color: var(--text-2); cursor: pointer; transition: all .15s;
}
.map-mode-btn.active { background: var(--brand-grad); color: #fff; font-weight: 600; }
.map-tip { font-size: 12px; color: var(--text-3); }
#mapChart { flex: 1; min-height: 0; width: 100%; }

/* ===== 二级分类章节真题模拟 ===== */
.chapter-mock-modal { position: relative; width: min(1080px, 96vw); height: 92vh; }
.chapter-mock-header { padding: 20px 54px 14px 24px; border-bottom: 1px solid var(--border); background: linear-gradient(135deg, rgba(49,95,157,.08), rgba(246,166,35,.07)); }
.chapter-mock-kicker { color: #315f9d; font-size: 11px; font-weight: 800; letter-spacing: .8px; }
.chapter-mock-header h2 { margin-top: 3px; font-size: 20px; }
.chapter-mock-meta { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.chapter-mock-meta span { padding: 3px 8px; border: 1px solid rgba(49,95,157,.16); border-radius: 999px; background: rgba(255,255,255,.78); color: var(--text-2); font-size: 10.5px; }
.chapter-mock-body { flex: 1; overflow-y: auto; padding: 18px 22px 30px; background: #f7f9fc; }
.chapter-mock-card { max-width: 920px; margin-right: auto; margin-left: auto; }

/* ===== 总览页 ===== */
.home-view { flex: 1; overflow-y: auto; background: var(--bg-soft); }
.home-hero {
  text-align: center; padding: 46px 24px 34px;
  background: linear-gradient(135deg, rgba(226,59,59,.06), rgba(246,166,35,.06)), #fff;
  border-bottom: 1px solid var(--border);
}
.home-hero h1 { font-size: 30px; font-weight: 800; background: var(--brand-grad); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.home-sub { font-size: 14px; color: var(--text-3); margin-top: 4px; }
.home-desc { max-width: 720px; margin: 18px auto 0; font-size: 14px; color: var(--text-2); line-height: 1.9; text-align: left; }
.home-desc b { color: var(--accent); }
.hl-cat { font-weight: 600; color: var(--accent); padding: 0 2px; }
.home-actions { margin-top: 24px; display: flex; justify-content: center; gap: 14px; flex-wrap: wrap; }
.home-btn {
  border: 1px solid var(--border); background: #fff; color: var(--text);
  border-radius: 12px; padding: 12px 22px; font-size: 14.5px; font-weight: 600; cursor: pointer; transition: all .15s;
}
.home-btn:hover { border-color: var(--accent); color: var(--accent); transform: translateY(-1px); box-shadow: 0 4px 12px rgba(16,24,40,.08); }
.home-btn.primary { background: var(--brand-grad); color: #fff; border: none; }
.home-btn.primary:hover { opacity: .92; color: #fff; }

/* ===== 学习路径切换栏（引导页传入，列表实时过滤） ===== */
.path-bar {
  max-width: 1100px; margin: 18px auto 0; padding: 14px 20px;
  background: #fff; border: 1px solid var(--border); border-radius: 14px;
  display: flex; align-items: center; flex-wrap: wrap; gap: 12px 18px;
  box-shadow: 0 4px 14px rgba(16,24,40,.05);
}
.path-label { font-size: 14px; font-weight: 700; color: var(--text); white-space: nowrap; }
.path-group { display: flex; gap: 8px; flex-wrap: wrap; }
.path-btn {
  border: 1px solid var(--border); background: var(--bg-soft); color: var(--text-2);
  border-radius: 999px; padding: 7px 18px; font-size: 13.5px; font-weight: 600;
  cursor: pointer; transition: all .15s;
}
.path-btn:hover { border-color: var(--accent); color: var(--accent); }
.path-btn.active { background: var(--brand-grad); color: #fff; border-color: transparent; box-shadow: 0 3px 10px rgba(226,59,59,.3); }
.path-status { margin-left: auto; font-size: 13px; color: var(--text-2); font-weight: 600; white-space: nowrap; }
.path-reselect { font-size: 13px; color: var(--accent); text-decoration: none; white-space: nowrap; font-weight: 600; }
.path-reselect:hover { text-decoration: underline; }
.home-empty { padding: 46px 20px; text-align: center; color: var(--text-3); font-size: 15px; }
/* 学习页(detailView)：左右分栏，左侧树 + 右侧内容 */
#detailView { flex: 1; display: flex; flex-direction: row; overflow: hidden; }
/* 学习页顶部路径切换栏：通栏紧凑版 */
.path-bar-detail {
  max-width: none; margin: 0; border-radius: 0;
  border-left: none; border-right: none; border-top: none;
  box-shadow: none; padding: 10px 18px; flex-shrink: 0;
  gap: 10px 14px;
  background: #fff;
}
.path-bar-detail .path-btn { padding: 5px 14px; font-size: 12.5px; }
.path-bar-detail .path-status { font-size: 12.5px; }
/* 导航树：当前路径下无匹配知识点时的提示 */
.nav-empty { padding: 22px 12px; color: var(--text-3); font-size: 12.5px; text-align: center; line-height: 1.8; }
@media (max-width: 760px) {
  .path-status { margin-left: 0; width: 100%; }
}

.home-kb { max-width: 1100px; margin: 0 auto; padding: 26px 24px 50px; }
.home-kb-head { font-size: 17px; font-weight: 700; margin-bottom: 18px; color: var(--text); }
.home-cat { margin-bottom: 22px; }
.home-cat-head { display: flex; align-items: center; gap: 9px; padding: 10px 14px; border-left: 4px solid var(--accent); background: #fff; border-radius: 8px; margin-bottom: 10px; }
.home-cat-dot { width: 10px; height: 10px; border-radius: 3px; flex-shrink: 0; }
.home-cat-name { font-size: 16px; font-weight: 700; }
.home-cat-en { font-size: 12px; color: var(--text-3); }
.home-cat-count { margin-left: auto; font-size: 12px; color: var(--text-3); }
.home-topics { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; }
.home-topic { background: #fff; border: 1px solid var(--border); border-radius: 10px; padding: 14px; }
.home-topic-name { font-size: 13.5px; font-weight: 600; color: var(--text); margin-bottom: 9px; display: flex; align-items: center; gap: 6px; }
.home-topic-name .n { font-size: 11px; color: var(--text-3); font-weight: 400; }
.home-topic-mock {
  margin-left: auto; border: 1px solid rgba(49,95,157,.22); border-radius: 999px; padding: 3px 9px;
  background: #eef5ff; color: #315f9d; font: inherit; font-size: 10.5px; font-weight: 700; cursor: pointer;
}
.home-topic-mock:hover { border-color: #315f9d; background: #fff; }
.home-points { display: flex; flex-wrap: wrap; gap: 7px; }
.home-point {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 4px 11px; border-radius: 15px; font-size: 12.5px; color: var(--text-2);
  background: var(--bg-soft); border: 1px solid var(--border); cursor: pointer; transition: all .12s;
}
.home-point:hover { background: var(--brand-soft); color: var(--accent); border-color: var(--accent-2); }
.home-point .st { width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; background: var(--border); }
.home-point .st.done { background: #2FBF71; }
.home-point .st.learning { background: var(--accent-2); }
.home-point.done { border-color: rgba(47,191,113,.4); }
.home-point.learning { border-color: rgba(246,166,35,.5); }
.home-core { color: var(--accent); font-size: 9.5px; font-weight: 800; }

/* ===== 筛选与导航页 ===== */
.filter-view { flex: 1; display: flex; flex-direction: column; overflow: hidden; background: var(--bg-soft); }
.filter-header {
  flex-shrink: 0; display: flex; align-items: center; gap: 12px;
  padding: 12px 20px; background: #fff; border-bottom: 1px solid var(--border);
}
.filter-title { font-size: 16px; font-weight: 800; }
.filter-header-actions { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.filter-hint { font-size: 11.5px; color: var(--text-3); }
.filter-layout { flex: 1; display: flex; overflow: hidden; }

/* 左栏筛选面板 */
.filter-panel {
  width: 250px; flex-shrink: 0; background: #fff; border-right: 1px solid var(--border);
  overflow-y: auto; padding: 14px 14px 20px;
}
.filter-section { margin-bottom: 16px; }
.filter-section-title { font-size: 12px; font-weight: 700; color: var(--text-2); margin-bottom: 8px; letter-spacing: .3px; }
.chip-group { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  border: 1px solid var(--border); background: #fff; color: var(--text-2);
  border-radius: 999px; padding: 4px 12px; font-size: 12px; cursor: pointer; transition: all .13s;
}
.chip:hover { border-color: var(--accent-2); color: var(--accent); }
.chip.active { background: var(--brand-grad); color: #fff; border-color: transparent; font-weight: 600; }
.filter-keyword {
  width: 100%; border: 1px solid var(--border); border-radius: 8px;
  padding: 7px 12px; font-size: 13px; outline: none; font-family: inherit;
}
.filter-keyword:focus { border-color: var(--accent-2); }
.filter-actions { margin-top: 4px; }
.filter-actions .btn { width: 100%; }

/* 右栏结果 */
.filter-results { flex: 1; overflow-y: auto; padding: 16px 20px 40px; }
.filter-results-head {
  display: flex; align-items: baseline; gap: 10px; margin-bottom: 14px;
  font-size: 13px; color: var(--text-2);
}
.filter-results-head b { color: var(--accent); font-size: 17px; }
.filter-results-sub { color: var(--text-3); font-size: 12px; }
.filter-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.filter-card {
  background: #fff; border: 1px solid var(--border); border-radius: 12px; padding: 12px 14px;
  cursor: pointer; transition: all .14s; display: flex; flex-direction: column; gap: 8px;
}
.filter-card:hover { border-color: var(--accent-2); box-shadow: 0 6px 18px rgba(16,24,40,.08); transform: translateY(-1px); }
.filter-card .fc-top { display: flex; align-items: center; gap: 8px; min-width: 0; }
.filter-card .fc-code { font: 700 10.5px ui-monospace, SFMono-Regular, Consolas, monospace; color: var(--accent); flex-shrink: 0; }
.filter-card .fc-status { margin-left: auto; flex-shrink: 0; }
.filter-card .fc-status .st { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--border); }
.filter-card .fc-status .st.done { background: #2FBF71; }
.filter-card .fc-status .st.learning { background: var(--accent-2); }
.filter-card .fc-name { font-size: 14px; font-weight: 700; color: var(--text); line-height: 1.4; }
.filter-card .fc-loc { font-size: 11.5px; color: var(--text-3); }
.filter-card .fc-tags { display: flex; flex-wrap: wrap; gap: 5px; }
.fc-tag { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: 999px; font-size: 10.5px; font-weight: 600; border: 1px solid transparent; }
.fc-tag.core { background: #fff2b8; color: #8a5a00; border-color: #eedf9a; }
.fc-tag.core-plus { background: #ffe0b2; color: #a54600; border-color: #f5c98f; }
.fc-tag.diff { background: #eef2f7; color: #44506a; }
.fc-tag.stage-inner { background: #e8f4fd; color: #1d6fb8; border-color: #c4e2f7; }
.fc-tag.stage-outer { background: #f3ecff; color: #7c4ac9; border-color: #ddd0f5; }
.fc-empty { grid-column: 1 / -1; text-align: center; color: var(--text-3); padding: 60px 0; font-size: 13.5px; }

/* 知识库「筛选 + 内容并排」三栏布局 */
.filter-results.kb-results { display: flex; flex-direction: column; overflow: hidden; padding: 0; }
.filter-results.kb-results .filter-results-head { padding: 13px 20px; border-bottom: 1px solid var(--border); background: #fff; flex-shrink: 0; margin-bottom: 0; }
.kb-split { flex: 1; display: flex; overflow: hidden; min-height: 0; }
.kb-list-wrap { width: 280px; flex-shrink: 0; border-right: 1px solid var(--border); overflow-y: auto; background: #fff; }
.kb-list { padding: 8px; }
.kb-row { padding: 9px 11px; border: 1px solid var(--border); border-radius: 9px; cursor: pointer; margin-bottom: 6px; background: #fff; transition: border-color .12s, background .12s; }
.kb-row:hover { background: var(--bg-soft); border-color: var(--accent); }
.kb-row.active { background: #eaf1fb; border-color: var(--accent); }
.kb-row .kb-top { display: flex; align-items: center; gap: 8px; }
.kb-row .kb-code { font: 700 10.5px ui-monospace, SFMono-Regular, Consolas, monospace; color: var(--accent); }
.kb-row .kb-status { margin-left: auto; }
.kb-row .kb-status .st { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--border); }
.kb-row .kb-status .st.done { background: #2FBF71; }
.kb-row .kb-status .st.learning { background: var(--accent-2); }
.kb-row .kb-name { font-weight: 600; font-size: 13.5px; margin-top: 3px; color: var(--text); }
.kb-row .kb-en { color: var(--text-3); font-weight: 400; font-size: 11.5px; margin-left: 5px; }
.kb-row .kb-loc { font-size: 11.5px; color: var(--text-3); margin-top: 2px; }
.kb-row .kb-tags { margin-top: 5px; display: flex; flex-wrap: wrap; gap: 4px; }
.kb-detail { flex: 1; overflow-y: auto; min-width: 0; background: var(--bg-soft); }
.kb-detail-empty { padding: 70px 30px; text-align: center; color: var(--text-3); font-size: 14px; line-height: 1.85; }

@media (max-width: 900px) {
  .filter-layout { flex-direction: column; }
  .filter-panel { width: 100%; border-right: none; border-bottom: 1px solid var(--border); max-height: 42vh; }
  .kb-split { flex-direction: column; }
  .kb-list-wrap { width: 100%; border-right: none; border-bottom: 1px solid var(--border); max-height: 38vh; }
}

@media (max-width: 1280px) {
  .brand-text, .mini-progress { display: none; }
  .col-examples, .col-panel { width: 340px; }
  .col-true-training { width: 360px; }
  .search-box { width: 230px; }
}

/* ===== 学习角色徽章（主讲/预告/快速复习） ===== */
.home-role { margin-left: 4px; padding: 1px 7px; border-radius: 9px; font-size: 10px; line-height: 1.7; color: #fff; font-weight: 700; flex-shrink: 0; }
.role-主讲 { background: #E23B3B; }
.role-预告 { background: #F6A623; }
.role-快速复习 { background: #3B6FE2; }
.fc-tag.role-主讲 { background: #E23B3B; color: #fff; }
.fc-tag.role-预告 { background: #F6A623; color: #fff; }
.fc-tag.role-快速复习 { background: #3B6FE2; color: #fff; }
.role-badge { display: inline-flex; align-items: center; padding: 2px 10px; border-radius: 10px; color: #fff; font-weight: 700; font-size: 12px; }
.role-badge-hint { margin-left: 8px; color: var(--text-3); font-size: 11px; }
.stage-notice {
  margin: 14px 4px; padding: 12px 14px; border-radius: 10px;
  background: rgba(226, 59, 59, .05); border: 1px dashed rgba(226, 59, 59, .35);
  color: var(--text-2); font-size: 12.5px; line-height: 1.75;
}
.path-legend { display: flex; align-items: center; gap: 12px; font-size: 11.5px; color: var(--text-2); white-space: nowrap; }
.legend-item { display: inline-flex; align-items: center; }
.legend-dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 5px; }
.dot-主讲 { background: #E23B3B; }
.dot-预告 { background: #F6A623; }
.dot-快速复习 { background: #3B6FE2; }

@media (max-width: 640px) {
  .path-legend { width: 100%; white-space: normal; }
}

/* ============================================================
   组卷（Compose）· 条件面板 + 可打印试卷
   ============================================================ */
.btn-badge {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 18px; height: 18px; padding: 0 5px; margin-left: 6px;
  border-radius: 9px; background: var(--accent); color: #fff; font-size: 11px; font-weight: 700;
}
.compose-view { flex: 1; display: flex; flex-direction: column; overflow: hidden; background: var(--bg-soft); }
.compose-header {
  flex-shrink: 0; display: flex; align-items: center; gap: 12px;
  padding: 12px 20px; background: #fff; border-bottom: 1px solid var(--border);
}
.compose-title { font-size: 16px; font-weight: 800; }
.compose-header-actions { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.compose-hint { font-size: 11.5px; color: var(--text-3); }
.compose-layout { flex: 1; display: flex; overflow: hidden; }

/* 左栏条件面板 */
.compose-panel {
  width: 268px; flex-shrink: 0; background: #fff; border-right: 1px solid var(--border);
  overflow-y: auto; padding: 14px 14px 24px;
}
.chip-group.sub { margin-top: 8px; padding-left: 6px; border-left: 2px solid var(--border); }
.chip-group.multi .chip.active { background: var(--brand-soft); color: var(--accent); border-color: var(--accent); font-weight: 700; }
.compose-note { margin-top: 10px; font-size: 11.5px; color: var(--text-2); line-height: 1.6; }
.compose-note b { color: var(--accent); }
.compose-note-tip { color: var(--text-3); font-size: 11px; }
.compose-field { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; flex-wrap: wrap; }
.compose-field > label { font-size: 12px; color: var(--text-2); flex-shrink: 0; }
.compose-input {
  width: 72px; border: 1px solid var(--border); border-radius: 8px;
  padding: 5px 10px; font-size: 13px; outline: none; font-family: inherit; color: var(--text);
}
.compose-input:focus { border-color: var(--accent-2); }
.compose-quick { display: flex; gap: 5px; }
.compose-actions { display: flex; flex-direction: column; gap: 8px; margin-top: 6px; }
.compose-actions .btn.primary { background: var(--brand-grad); color: #fff; border-color: transparent; font-weight: 700; }
.btn.danger { color: #c0392b; }

/* 右栏试卷 */
.compose-paper-wrap { flex: 1; display: flex; flex-direction: column; overflow-y: auto; }
.paper-toolbar {
  flex-shrink: 0; display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  padding: 10px 20px; background: #fff; border-bottom: 1px solid var(--border);
}
.paper-title-input {
  display: block; width: 100%; border: none; background: transparent; outline: none;
  text-align: center; font-size: 23px; font-weight: 800; color: var(--text); font-family: inherit;
  padding: 0; margin: 0 0 4px;
}
.paper-title-input:hover { background: rgba(0,0,0,.03); }
.paper-title-input:focus { background: rgba(0,0,0,.05); border-radius: 4px; }
.paper-toolbar-label { font-size: 13px; font-weight: 700; color: var(--text-2); }
.paper-title-input:focus { border-color: var(--accent-2); }
.paper-toolbar-right { margin-left: auto; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.paper-sheet {
  max-width: 820px; margin: 18px auto 40px; background: #fff;
  border: 1px solid #d4d9e2; border-radius: 4px; box-shadow: 0 8px 24px rgba(31, 36, 48, .08);
  padding: 34px 42px 42px;
}
.paper-sheet-head { text-align: center; margin-bottom: 4px; }
.paper-school { font-size: 16px; font-weight: 800; text-align: center; margin-bottom: 2px; letter-spacing: 1px; }
.paper-head h2 { font-size: 22px; font-weight: 800; text-align: center; margin-bottom: 6px; }
.paper-sub { display: block; text-align: center; font-size: 13px; color: var(--text-2); margin-bottom: 14px; }
.paper-info {
  display: flex; gap: 16px 26px; flex-wrap: wrap; justify-content: center;
  font-size: 12.5px; color: var(--text-2);
  border-bottom: 2px solid var(--text); padding-bottom: 14px; margin-bottom: 8px;
}
.paper-info .blank { display: inline-block; width: 92px; border-bottom: 1px solid #555; height: 1px; vertical-align: -3px; margin-left: 2px; }
.paper-score-table-wrap { margin-top: 8px; }
.paper-score-table-wrap table { width: 100%; border-collapse: collapse; font-size: 12px; }
.paper-score-table-wrap th, .paper-score-table-wrap td { border: 1px solid #bfc5ce; padding: 5px 8px; text-align: center; }
.paper-score-table-wrap th { background: #f6f7f9; font-weight: 700; }
.paper-score-table-wrap .score-total { font-weight: 700; background: #fafbfc; }
.paper-score-table-wrap .score-blank { width: 70px; }
.paper-body { padding-top: 4px; }
.paper-empty {
  text-align: center; color: var(--text-3); font-size: 13.5px; padding: 70px 20px; line-height: 1.9;
}
.paper-q { padding: 18px 0 16px; border-bottom: 1px dashed var(--border); }
.paper-q:last-child { border-bottom: none; }
.paper-q-head { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; margin-bottom: 8px; }
.paper-q-no { font-size: 16px; font-weight: 800; min-width: 26px; color: var(--text); }
.paper-q-kind { font-size: 11px; font-weight: 700; border-radius: 4px; padding: 2px 8px; color: #fff; }
.paper-q-kind.k-example { background: #E23B3B; }
.paper-q-kind.k-basic { background: #2FBF71; }
.paper-q-kind.k-adv { background: #3B6FE2; }
.paper-q-kind.k-true { background: #8B5CF6; }
.paper-q-src { font-size: 11px; color: var(--text-3); }
.paper-q-ops { margin-left: auto; display: flex; gap: 4px; opacity: 0; transition: opacity .15s; }
.paper-q:hover .paper-q-ops { opacity: 1; }
.paper-q-ops button {
  width: 22px; height: 22px; border: 1px solid var(--border); background: #fff; color: var(--text-2);
  border-radius: 5px; font-size: 11px; cursor: pointer; line-height: 1;
}
.paper-q-ops button:hover { border-color: var(--accent); color: var(--accent); }
.paper-q-title { font-weight: 700; margin-bottom: 6px; font-size: 13.5px; }
.paper-q-body { font-size: 14px; line-height: 1.85; color: var(--text); }
.paper-q-body .explain-f { margin: 8px 0; overflow-x: auto; }
.paper-q-body img { max-width: 100%; }
.paper-answer-toggle {
  display: inline-block; margin-top: 10px; padding: 3px 12px; border: 1px solid var(--border);
  border-radius: 6px; font-size: 12px; color: var(--text-2); cursor: pointer; background: var(--bg-soft);
}
.paper-answer-toggle:hover { border-color: var(--accent); color: var(--accent); }
.paper-answer {
  display: none; margin-top: 8px; padding: 10px 14px; background: var(--bg-soft);
  border-left: 3px solid #2FBF71; border-radius: 6px; font-size: 13px; line-height: 1.8;
}
.paper-answer.show { display: block; }
.paper-answer-value { font-weight: 700; color: #2FBF71; font-size: 14px; }
.paper-answer-section { margin-top: 30px; border-top: 2px solid var(--text); padding-top: 16px; }
.paper-answer-title { font-size: 16px; font-weight: 800; margin-bottom: 10px; }
.paper-answer-list { padding-left: 22px; font-size: 13px; line-height: 1.9; }
.paper-answer-list li { margin-bottom: 4px; }

/* 卷库 */
.paper-lib-modal { width: 640px; max-width: 92vw; max-height: 80vh; overflow: hidden; display: flex; flex-direction: column; }
.paper-lib-body { overflow-y: auto; padding: 4px 24px 24px; }
.paper-lib-item { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--border); }
.pli-main { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.pli-main b { font-size: 14px; }
.pli-meta { font-size: 11.5px; color: var(--text-3); }
.pli-ops { margin-left: auto; display: flex; gap: 8px; flex-shrink: 0; }

/* 学习页「加入试卷」按钮 */
.head-ops { margin-left: auto; display: flex; align-items: center; gap: 6px; }
.add-paper-btn {
  border: 1px solid var(--border); background: #fff; color: var(--text-2);
  border-radius: 999px; padding: 2px 10px; font-size: 11px; cursor: pointer; white-space: nowrap; font-family: inherit;
}
.add-paper-btn:hover { border-color: var(--accent); color: var(--accent); }
.add-paper-btn.added { background: var(--brand-soft); border-color: var(--accent); color: var(--accent); font-weight: 700; }
.prac-ops { display: flex; margin: 6px 0 0; }

@media (max-width: 900px) {
  .compose-layout { flex-direction: column; }
  .compose-panel { width: 100%; border-right: none; border-bottom: 1px solid var(--border); max-height: 44vh; }
  .paper-sheet { margin: 12px; padding: 20px 18px 30px; }
}

/* ===== 打印：简洁试卷模板（只输出试卷本体 + 页脚页码） ===== */
@page {
  size: A4;
  margin: 16mm;
  @bottom-center { content: "第 " counter(page) " 页 / 共 " counter(pages) " 页"; font-size: 9pt; color: #777; }
}
@media print {
  html, body { height: auto; overflow: visible; background: #fff; margin: 0; padding: 0; }
  body > * { display: none !important; }
  body > #paperPrintArea { display: block !important; position: static; width: 100%; }
  #paperPrintArea .paper-sheet { max-width: none; margin: 0; padding: 0; border: none; box-shadow: none; border-radius: 0; }
  .paper-head { text-align: center; margin-bottom: 8mm; }
  .paper-head h2 { font-size: 18pt; font-weight: 800; margin: 0 0 2mm; }
  .paper-sub { font-size: 10.5pt; color: #555; margin: 0 0 4mm; }
  .paper-info { display: flex; gap: 6mm 12mm; flex-wrap: wrap; justify-content: center; font-size: 10.5pt; color: #333; margin: 0 0 4mm; }
  .paper-info u, .paper-info .blank { display: inline-block; width: 26mm; border-bottom: 0.5pt solid #333; height: 1em; margin-left: 1mm; }
  .paper-body { font-size: 11pt; line-height: 1.8; }
  .paper-q { break-inside: avoid; page-break-inside: avoid; padding: 3mm 0; border-bottom: none; }
  .paper-q-head { margin-bottom: 1.5mm; }
  .paper-q-no { font-size: 12pt; font-weight: 700; }
  .paper-q-body { font-size: 11pt; line-height: 1.8; }
  .paper-q-body img { max-height: 40mm; max-width: 100%; }
  .print-sol { margin-top: 3mm; padding: 3mm 4mm; background: #f7f7f7; border-left: 2pt solid #2fbf71; font-size: 10.5pt; line-height: 1.7; }
  .print-answer-value { font-weight: 700; color: #1f9d57; font-size: 11pt; margin-bottom: 2mm; }
  .print-answer-value b { color: #1f9d57; margin-right: 4px; }
  .print-solution { font-size: 10.5pt; line-height: 1.7; }
  .print-solution b { display: block; font-size: 10pt; color: #b5791a; margin-bottom: 2mm; }
  .true-language-zh.print-cn { display: block !important; margin-top: 3mm; padding: 3mm 4mm; background: #f4f8ff; border-left: 2pt solid #9bbce6; border-radius: 3px; font-size: 10.5pt; line-height: 1.7; }
  .true-language-zh.print-cn .true-language-label { font-size: 10pt; color: #2f5f96; font-weight: 700; margin-bottom: 2mm; }
  .paper-answer-section { break-before: page; page-break-before: always; }
}

/* ============================================================
   组卷增强：多选分类 / 分领域规则 / 下载菜单
   ============================================================ */
.compose-panel { width: 300px; }
.compose-sub-title {
  margin: 12px 0 6px; font-size: 11.5px; font-weight: 700; color: var(--text-2);
  padding-left: 2px; border-left: 2px solid var(--accent); text-indent: 6px;
}
.topic-multi { max-height: 240px; overflow-y: auto; padding-right: 2px; }
.topic-multi-group { margin-bottom: 8px; }
.topic-multi-cat { font-size: 11px; color: var(--text-3); margin-bottom: 4px; }
.chip-group.tiny .chip { padding: 2px 8px; font-size: 11px; }

.cat-rule {
  border: 1px solid var(--border); border-radius: 8px; padding: 8px 10px; margin-bottom: 8px;
  background: var(--bg-soft);
}
.cat-rule-head {
  display: flex; align-items: center; gap: 8px; margin-bottom: 6px;
}
.cat-rule-head b { font-size: 12.5px; }
.cat-rule-state {
  margin-left: auto; font-size: 10.5px; color: var(--text-3);
  background: #fff; border: 1px solid var(--border); border-radius: 999px; padding: 1px 8px;
}
.cat-rule-state.custom { color: var(--accent); border-color: var(--accent); background: var(--brand-soft); font-weight: 700; }
.cat-rule-row { display: flex; align-items: flex-start; gap: 6px; margin-top: 5px; }
.cat-rule-row > label { font-size: 11px; color: var(--text-3); flex-shrink: 0; width: 26px; padding-top: 3px; }
.cat-rule-row .chip-group { flex-wrap: wrap; gap: 4px; }

.paper-menu-wrap { position: relative; }
.paper-menu {
  position: absolute; right: 0; top: calc(100% + 6px); z-index: 60; min-width: 232px;
  background: #fff; border: 1px solid var(--border); border-radius: 10px;
  box-shadow: 0 12px 30px rgba(31, 36, 48, .14); padding: 6px; display: flex; flex-direction: column;
}
.paper-menu button {
  text-align: left; border: none; background: transparent; font-family: inherit;
  font-size: 12.5px; color: var(--text); padding: 8px 12px; border-radius: 7px; cursor: pointer;
}
.paper-menu button:hover { background: var(--brand-soft); color: var(--accent); }
.paper-menu-sep { height: 1px; background: var(--border); margin: 5px 8px; }

/* 隐藏打印区（打印时由 JS 注入问卷/答卷内容） */
.paper-print-area { display: none; }

/* 题号范围 / 按领域分配 输入行 */
.compose-sub-field { margin-top: 10px; }
.compose-sub-field > label { display: block; font-size: 11.5px; color: var(--text-2); margin-bottom: 6px; }
.compose-range { display: flex; align-items: center; gap: 8px; }
.compose-range .compose-input.sm { width: 64px; }
.range-sep { color: var(--text-3); }
.cat-count-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 14px; margin-bottom: 8px; }
.cat-count-row { display: flex; align-items: center; gap: 8px; }
.cat-count-row > label { font-size: 12px; color: var(--text-2); flex: 1; }
.cat-count-row .compose-input.sm { width: 56px; }

/* 打印答卷：答案与解析 */
.print-sol { margin-top: 10px; padding: 10px 12px; background: var(--bg-soft); border-left: 3px solid #2fbf71; border-radius: 6px; font-size: 13px; line-height: 1.8; }
.print-answer-value { font-weight: 700; color: #2fbf71; font-size: 14px; margin-bottom: 4px; }
.print-answer-value b { color: #2fbf71; margin-right: 4px; }
.print-solution { font-size: 13px; line-height: 1.8; }
.print-solution b { display: block; font-size: 12px; color: #c47f10; margin-bottom: 4px; }
.print-solution .muted { color: var(--text-3); }

@media print {
  .paper-menu { display: none !important; }
}

/* ===================== AMC / AIME 真题库 ===================== */
.amc-view { max-width: 1180px; margin: 0 auto; padding: 18px 22px 60px; }
.amc-header { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 14px; }
.amc-title { font-size: 22px; font-weight: 800; color: var(--navy, #1a3d6e); }
.amc-header-actions { display: flex; align-items: center; gap: 12px; }
.amc-hint { font-size: 12.5px; color: var(--text-2, #6b7280); }
.amc-toolbar { display: flex; flex-wrap: wrap; gap: 12px 16px; align-items: flex-end; background: #fff; border: 1px solid #e6ebf2; border-radius: 14px; padding: 14px 16px; box-shadow: 0 4px 18px rgba(31,50,78,.06); margin-bottom: 14px; }
.amc-field { display: flex; flex-direction: column; gap: 5px; }
.amc-field > label { font-size: 12px; font-weight: 700; color: var(--navy, #1a3d6e); }
.amc-field-grow { flex: 1 1 220px; }
.amc-input { height: 36px; border: 1px solid #c8d2de; border-radius: 7px; padding: 6px 10px; font-size: 14px; min-width: 140px; }
.amc-input.sm { width: 64px; min-width: 64px; }
.amc-select { height: 36px; border: 1px solid #c8d2de; border-radius: 7px; padding: 6px 8px; font-size: 13px; max-width: 280px; }
.amc-field-kp { } /* 知识点三级级联：领域 / 话题 / 知识点 横向排列 */
.amc-field-kp select.amc-select { max-width: 150px; }
.range-sep { align-self: center; color: #9aa4b2; }
.amc-actions { display: flex; gap: 8px; }
.amc-results-head { display: flex; justify-content: space-between; align-items: baseline; margin: 6px 2px 10px; color: var(--text-2, #6b7280); font-size: 13px; }
.amc-results-head b { color: var(--navy, #1a3d6e); font-size: 15px; }
.amc-summary { font-size: 12.5px; }
.amc-results { display: grid; gap: 14px; }
.amc-empty { padding: 50px 20px; text-align: center; background: #fff; border: 1px dashed #bdc9d7; border-radius: 12px; color: var(--text-2, #6b7280); }
.amc-card { background: #fff; border: 1px solid #e6ebf2; border-radius: 12px; box-shadow: 0 3px 13px rgba(31,50,78,.06); overflow: hidden; }
.amc-card-head { display: flex; gap: 10px; align-items: flex-start; padding: 13px 16px 10px; background: linear-gradient(90deg,#fbfdff,#fff); border-bottom: 1px solid #eef2f7; flex-wrap: wrap; }
.amc-index { flex: 0 0 auto; width: 26px; height: 26px; border-radius: 7px; background: var(--navy, #1a3d6e); color: #fff; font-weight: 800; font-size: 13px; display: flex; align-items: center; justify-content: center; }
.amc-source { flex: 1 1 auto; min-width: 0; }
.amc-source b { font-size: 14.5px; color: var(--ink, #1f2937); }
.amc-source code { display: inline-block; margin-left: 8px; font: 11px/1.3 ui-monospace, Consolas, monospace; color: #6e83a0; background: #f1f4f8; padding: 2px 6px; border-radius: 5px; }
.amc-tags { display: flex; flex-wrap: wrap; gap: 5px; }
.amc-tag { border: 1px solid #cfe0ef; background: #eef5fc; color: #2f5f96; border-radius: 999px; padding: 3px 9px; font-size: 11px; font-weight: 700; cursor: pointer; }
.amc-tag:hover { background: #dcebfb; }
.amc-card-body { padding: 12px 16px 4px; font-size: 14.5px; line-height: 1.7; }
.amc-judge { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 10px 16px; border-top: 1px solid #eef2f7; }
.amc-judge-label { font-size: 13px; color: var(--text-2, #6b7280); font-weight: 700; }
.amc-choice { min-width: 34px; height: 34px; border: 1px solid #cdd6e2; background: #fff; border-radius: 8px; font-weight: 800; cursor: pointer; color: var(--navy, #1a3d6e); }
.amc-choice:hover { background: #f0f5fb; }
.amc-choice.active { background: var(--navy, #1a3d6e); color: #fff; border-color: var(--navy, #1a3d6e); }
.amc-ans-input { width: 90px; height: 34px; border: 1px solid #cdd6e2; border-radius: 8px; padding: 6px 9px; font-size: 14px; }
.amc-judge-btn { margin-left: 2px; }
.amc-judge-result { font-size: 13px; font-weight: 700; }
.amc-judge-result.ok { color: #18794e; }
.amc-judge-result.no { color: #c0392b; }
.amc-judge-result.shown { color: #2f5f96; }
.amc-solution { border-top: 1px solid #eef2f7; }
.amc-solution > summary { cursor: pointer; list-style: none; padding: 10px 16px; font-weight: 700; color: #345f91; font-size: 13.5px; }
.amc-solution > summary::-webkit-details-marker { display: none; }
.amc-solution > summary::before { content: "＋"; display: inline-block; width: 18px; color: #6e83a0; }
.amc-solution[open] > summary::before { content: "−"; }
.amc-solution-body { padding: 1px 18px 16px; color: #27364a; font-size: 14px; line-height: 1.85; }
.amc-solution-body.muted { color: var(--text-3, #9aa4b2); }
.amc-hints { margin: 0 0 10px; padding: 8px 12px; background: #fff7e8; border-radius: 8px; color: #7a5a18; font-size: 13px; }
.amc-hints b { color: #9a5b00; }
.amc-sol-text p { margin: 8px 0; }
.amc-card-ops { padding: 10px 16px 14px; }
.amc-pager { display: flex; justify-content: center; align-items: center; gap: 10px; margin-top: 18px; }
.amc-pager span { color: var(--text-2, #6b7280); font-size: 13px; }
.amc-loading { padding: 40px; text-align: center; color: var(--text-2, #6b7280); }
.amc-batch-bar { display: flex; align-items: center; gap: 12px; margin: 12px 2px 4px; flex-wrap: wrap; }
.amc-batch-hint { color: var(--text-2, #6b7280); font-size: 13px; }
.amc-batch-hint:empty { display: none; }

/* 真题训练 / 章节模拟：解析按钮 */
.true-solution-toggle { margin: 8px 0 0; border: 0; background: transparent; color: #2f5f96; font-weight: 700; font-size: 13px; cursor: pointer; padding: 4px 0; }
.true-solution { padding: 10px 12px; background: #f8fbff; border-left: 3px solid #2f5f96; border-radius: 6px; margin: 4px 0 10px; font-size: 13.5px; line-height: 1.85; display: none; }
.true-solution.show { display: block; }
.true-solution .amc-hints { margin-bottom: 8px; }
.true-solution.muted { color: var(--text-3, #9aa4b2); }
.true-solution p { margin: 8px 0; }

/* ===== 学习规划（备考周计划生成器） ===== */
.plan-view { max-width: 1100px; margin: 0 auto; padding: 22px 18px 60px; }
.plan-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.plan-title { font-size: 20px; font-weight: 800; color: var(--navy, #1a3d6e); }
.plan-hint { color: var(--text-2, #6b7280); font-size: 13px; }
.plan-form { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 14px 18px; background: #fff; border: 1px solid #e6ebf2; border-radius: 14px; padding: 18px; box-shadow: 0 3px 13px rgba(31,50,78,.05); }
.plan-field { display: flex; flex-direction: column; gap: 7px; }
.plan-field > label { font-size: 13px; font-weight: 700; color: #345f91; }
.plan-field-inline { grid-column: 1 / -1; flex-direction: row; flex-wrap: wrap; gap: 18px; align-items: center; }
.plan-check { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; color: #27364a; cursor: pointer; }
.plan-input { width: 100%; height: 38px; border: 1px solid #cdd6e2; border-radius: 8px; padding: 6px 10px; font-size: 14px; background: #fff; }
.plan-input.sm { max-width: 120px; }
.plan-actions { grid-column: 1 / -1; display: flex; gap: 10px; margin-top: 4px; }
.plan-results { margin-top: 22px; display: flex; flex-direction: column; gap: 16px; }
.plan-empty { padding: 50px 20px; text-align: center; background: #fff; border: 1px dashed #bdc9d7; border-radius: 12px; color: var(--text-2, #6b7280); }
.plan-summary { padding: 12px 16px; background: #eef5fc; border: 1px solid #d6e6f6; border-radius: 10px; color: #2f5f96; font-size: 14px; font-weight: 700; }
.plan-week { background: #fff; border: 1px solid #e6ebf2; border-radius: 12px; box-shadow: 0 3px 13px rgba(31,50,78,.05); overflow: hidden; }
.plan-week-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 13px 16px; background: linear-gradient(90deg, #f4f8fd, #fff); border-bottom: 1px solid #eef2f7; }
.plan-week-title { font-size: 16px; font-weight: 800; color: var(--navy, #1a3d6e); }
.plan-week-meta { flex: 1 1 auto; min-width: 0; font-size: 12.5px; color: var(--text-2, #6b7280); }
.plan-over { color: #c0392b; font-weight: 700; margin-left: 4px; }
.plan-week-done { white-space: nowrap; }
.plan-week-points { padding: 8px 16px 14px; display: flex; flex-direction: column; gap: 8px; }
.plan-point { display: flex; flex-direction: column; gap: 6px; border: 1px solid #eef2f7; border-radius: 10px; padding: 10px 12px; background: #fbfdff; }
.plan-point.done { background: #eefaf2; border-color: #cdeedd; }
.plan-point.done .plan-point-name { text-decoration: line-through; color: #6b8a78; }
.plan-point-main { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.plan-point-name { font-weight: 700; color: #1f2937; font-size: 14.5px; }
.plan-point-code { font: 11px/1.3 ui-monospace, Consolas, monospace; color: #6e83a0; background: #f1f4f8; padding: 2px 6px; border-radius: 5px; }
.plan-point-est { font-size: 12px; color: #6b7280; background: #f3f5f9; border-radius: 6px; padding: 1px 7px; }
.plan-prac { font-size: 11px; font-weight: 700; color: #2f5f96; background: #eef5fc; border: 1px solid #d6e6f6; border-radius: 999px; padding: 1px 8px; }
.plan-point-ops { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.plan-true-need, .plan-true-none { font-size: 12px; color: var(--text-2, #6b7280); }
.plan-true-need .link-btn { color: #2f5f96; }
/* ===== 日历视图 ===== */
/* 二级分类(板块)路线图 */
.plan-roadmap { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; margin: 4px 0 22px; }
.plan-topic { border: 1px solid #e6ebf2; border-left: 4px solid var(--cat, #2f7be0); border-radius: 12px; background: #fff; padding: 11px 13px; box-shadow: 0 2px 10px rgba(31,50,78,.04); }
.plan-topic.done { background: #f1faf4; border-color: #cfe9d8; border-left-color: #2fbf71; }
.plan-topic-head { display: flex; align-items: center; gap: 7px; }
.plan-topic-dot { width: 10px; height: 10px; border-radius: 50%; flex: 0 0 auto; }
.plan-topic-head b { font-size: 14.5px; color: #1f2d3d; }
.plan-topic-cat { margin-left: auto; font-size: 11.5px; color: #8a97a8; background: #f3f5f9; border-radius: 6px; padding: 1px 7px; }
.plan-topic-meta { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0 6px; }
.plan-topic-meta span { font-size: 11.5px; font-weight: 700; border-radius: 999px; padding: 2px 9px; }
.plan-topic-days { color: #1f6fb2; background: #e8f1fb; }
.plan-topic-diff { color: #b9770e; background: #fdf0db; }
.plan-topic-pts { color: #5b6776; background: #eef1f5; }
.plan-topic-true { color: #2f7d52; background: #e7f6ec; }
.plan-topic-ops { display: flex; gap: 12px; margin-top: 4px; }
.plan-calendar { display: flex; flex-direction: column; gap: 22px; overflow-x: auto; }
.plan-month { border: 1px solid #e6ebf2; border-radius: 14px; background: #fff; box-shadow: 0 3px 13px rgba(31,50,78,.05); padding: 14px 14px 16px; min-width: 720px; }
.plan-month-title { font-size: 16px; font-weight: 800; color: var(--navy, #1a3d6e); margin-bottom: 10px; text-align: center; }
.plan-weekday-row { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; margin-bottom: 6px; }
.plan-weekday-row span { text-align: center; font-size: 12px; font-weight: 700; color: #8a97a8; }
.plan-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.plan-cell { min-height: 104px; border: 1px solid #eef2f7; border-radius: 10px; padding: 6px 7px; background: #fbfdff; display: flex; flex-direction: column; gap: 5px; font-size: 12px; }
.plan-cell.blank { background: transparent; border: 0; }
.plan-cell.study { background: #fff; border-color: #dfe9f4; border-left: 3px solid #cdd9e6; }
.plan-cell.rest { background: #f7f9fb; border-style: dashed; border-color: #e7ecf2; }
.plan-cell.today { outline: 2px solid #2f7be0; outline-offset: -1px; }
.plan-cell-head { display: flex; align-items: center; justify-content: space-between; gap: 4px; }
.plan-cell-head .daynum { font-weight: 800; color: #33455c; font-size: 13px; }
.plan-cell.rest .daynum { color: #aab4c0; }
.plan-cat-dot { width: 9px; height: 9px; border-radius: 50%; flex: 0 0 auto; }
/* ===== 学习规划 · 自测练习（测试标签） ===== */
.plan-tabs { display: flex; gap: 8px; padding: 0 18px; margin-top: 6px; }
.plan-tab { border: 1px solid var(--border); background: #fff; color: var(--text-2); border-radius: 10px 10px 0 0; padding: 9px 18px; font-size: 14px; font-weight: 700; cursor: pointer; font-family: inherit; }
.plan-tab.active { color: var(--accent); border-color: var(--accent); border-bottom-color: #fff; background: #fff; box-shadow: 0 -2px 8px rgba(31,50,78,.04); }
.plan-test-intro { font-size: 13px; color: var(--text-2, #6b7280); margin: 14px 2px 10px; line-height: 1.6; }
.plan-test-topics { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.plan-test-chip { display: inline-flex; flex-direction: column; align-items: flex-start; gap: 2px; border: 1px solid #d6e6f6; background: #f3f8fd; color: #2f5f96; border-radius: 10px; padding: 7px 12px; font-size: 13px; font-weight: 700; cursor: pointer; font-family: inherit; transition: .15s; }
.plan-test-chip:hover { background: #e3eefb; }
.plan-test-chip.active { background: var(--accent, #2f7be0); color: #fff; border-color: var(--accent, #2f7be0); }
.plan-test-chip .ptc-name { white-space: nowrap; }
.plan-test-chip .ptc-best { font-size: 11px; font-weight: 600; opacity: .85; }
.plan-test-chip.active .ptc-best { opacity: .9; }
.plan-test-bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; }
.plan-test-sel { font-size: 13px; font-weight: 700; color: var(--text); }
.plan-test-countlabel { font-size: 13px; color: var(--text-2); margin-left: 4px; }
.plan-test-count { border: 1px solid var(--border); background: #fff; color: var(--text-2); border-radius: 999px; padding: 5px 12px; font-size: 13px; font-weight: 700; cursor: pointer; font-family: inherit; }
.plan-test-count.active { background: var(--accent-soft, #e8f1fb); color: var(--accent); border-color: var(--accent); }
.plan-test-bar .btn.primary { margin-left: auto; }
.plan-test-quiz { display: flex; flex-direction: column; gap: 14px; margin-top: 8px; }
.plan-test-quiz .quiz-card { background: #fff; }
.quiz-pick { display: flex; align-items: center; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.quiz-choice { width: 42px; height: 42px; border: 1px solid var(--border); border-radius: 10px; background: #fff; font-size: 16px; font-weight: 800; color: var(--text); cursor: pointer; font-family: inherit; transition: .12s; }
.quiz-choice:hover { border-color: var(--accent-2); }
.quiz-choice.active { border-color: var(--accent); background: var(--accent); color: #fff; }
.quiz-aime { width: 110px; height: 42px; border: 1px solid var(--border); border-radius: 10px; padding: 0 12px; font-size: 15px; font-family: inherit; outline: none; }
.quiz-aime:focus { border-color: var(--accent); }
.quiz-aime-hint { font-size: 12px; color: var(--text-2); }
.quiz-card.correct { border-color: #2fbf71; box-shadow: 0 0 0 2px rgba(47,191,113,.18); }
.quiz-card.wrong { border-color: #e23b3b; box-shadow: 0 0 0 2px rgba(226,59,59,.16); }
.quiz-feedback { margin-top: 10px; padding: 10px 12px; background: #f7f9fb; border-radius: 10px; font-size: 13px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.qf-ok { color: #2f7d52; font-weight: 800; }
.qf-no { color: #c0392b; font-weight: 800; }
.qf-ans { color: var(--text); }
.qf-ans b { color: var(--accent); }
.quiz-sol { width: 100%; margin-top: 8px; }
.plan-test-foot { display: flex; align-items: center; gap: 12px; margin-top: 16px; }
.plan-test-score { font-size: 15px; font-weight: 800; color: var(--accent); }
.plan-day-badge { font-size: 10px; font-weight: 800; color: #2f5f96; background: #e8f1fb; border-radius: 5px; padding: 1px 6px; white-space: nowrap; }
.plan-rest-label { color: #b3bcc8; font-size: 12px; margin: auto 0; text-align: center; }
.plan-day-topic { display: flex; flex-direction: column; gap: 3px; }
.plan-day-topic.done .plan-dt-name { text-decoration: line-through; color: #6b8a78; }
.plan-dt-cat { font-size: 11px; font-weight: 700; line-height: 1.2; }
.plan-dt-name { font-weight: 700; color: #1f2d3d; font-size: 12.5px; line-height: 1.3; }
.plan-dt-meta { font-size: 10.5px; color: #7a8694; }
.plan-dt-progress { height: 4px; border-radius: 3px; background: #eef2f7; overflow: hidden; margin: 1px 0 2px; }
.plan-dt-progress span { display: block; height: 100%; background: linear-gradient(90deg, #2f7be0, #5aa0ee); }
.plan-day-topic.done .plan-dt-progress span { background: #2fbf71; }

/* ============================================================
   多页面架构补充样式（共享导航 / 首页统计 / 真题库引导 / 学习页 / 滚动修复）
   ============================================================ */

/* 共享顶栏导航 */
.main-nav { display: flex; align-items: center; gap: 2px; background: #fff; border: 1px solid var(--border); border-radius: 999px; padding: 3px; }
.nav-link { padding: 6px 12px; border-radius: 999px; font-size: 13px; color: var(--text-2); text-decoration: none; white-space: nowrap; transition: all .15s; }
.nav-link:hover { background: var(--accent-soft); color: var(--accent); }

/* 首页：竞赛基础介绍 */
.home-intro { max-width: 1100px; margin: 0 auto; padding: 30px 24px 8px; }
.home-intro-head { font-size: 18px; font-weight: 800; color: var(--text); margin-bottom: 16px; }
.home-cats { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 14px; }
.home-cat-card { background: #fff; border: 1px solid var(--border); border-radius: 12px; padding: 16px 16px 18px; box-shadow: 0 3px 13px rgba(31,50,78,.05); transition: transform .15s, box-shadow .15s; }
.home-cat-card:hover { transform: translateY(-2px); box-shadow: 0 8px 22px rgba(31,50,78,.1); }
.home-cat-name { font-size: 16px; font-weight: 800; background: var(--brand-grad); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; margin-bottom: 8px; }
.home-cat-desc { font-size: 13px; color: var(--text-2); line-height: 1.7; }
.home-intro-note { max-width: 1100px; margin: 18px auto 0; padding: 12px 18px; background: #eef5fc; border: 1px solid #d6e6f6; border-radius: 10px; color: #2f5f96; font-size: 13px; line-height: 1.7; }

/* 首页：使用者数据统计 */
.home-stats-section { max-width: 1100px; margin: 26px auto 0; padding: 0 24px 36px; }
.home-stats-head { font-size: 18px; font-weight: 800; color: var(--text); margin-bottom: 16px; }
.stat-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 14px; }
.stat-card { background: #fff; border: 1px solid var(--border); border-radius: 12px; padding: 18px 16px; box-shadow: 0 3px 13px rgba(31,50,78,.05); text-align: center; }
.stat-num { font-size: 30px; font-weight: 800; background: var(--brand-grad); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; line-height: 1.1; }
.stat-num .stat-sub { font-size: 14px; color: var(--text-3); -webkit-text-fill-color: var(--text-3); margin-left: 4px; }
.stat-label { font-size: 13px; color: var(--text-2); margin-top: 6px; }

/* 真题库引导页 */
.amc-landing { max-width: 1100px; margin: 0 auto; padding: 30px 24px 60px; flex: 1; overflow-y: auto; }
.amc-landing-hero { text-align: center; padding: 24px 0 10px; }
.amc-landing-hero h1 { font-size: 28px; font-weight: 800; background: var(--brand-grad); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.amc-landing-hero p { color: var(--text-2); margin-top: 8px; font-size: 14px; }
.amc-landing-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; margin-top: 22px; }
.amc-land-card { display: block; text-decoration: none; background: #fff; border: 1px solid var(--border); border-radius: 14px; padding: 20px 20px 22px; box-shadow: 0 3px 13px rgba(31,50,78,.05); transition: transform .15s, box-shadow .15s, border-color .15s; }
.amc-land-card:hover { transform: translateY(-2px); box-shadow: 0 10px 26px rgba(31,50,78,.12); border-color: var(--accent-2); }
.amc-land-icon { font-size: 26px; }
.amc-land-name { font-size: 17px; font-weight: 800; color: var(--text); margin: 10px 0 6px; }
.amc-land-desc { font-size: 13px; color: var(--text-2); line-height: 1.7; }
.amc-land-note { max-width: 1100px; margin: 22px auto 0; padding: 12px 18px; background: #fff7e8; border: 1px solid #f3e2bd; border-radius: 10px; color: #7a5a18; font-size: 13px; line-height: 1.7; }

/* ===== 学习页：知识点头 + 标签切换 ===== */
.detail-head { padding: 22px 28px 0; }
.detail-tabs {
  display: flex; gap: 10px; padding: 14px 0 12px;
  background: var(--bg-soft); border-bottom: 1px solid var(--border);
}
.detail-tabs .tab {
  flex: 0 0 auto;
  border: 1px solid var(--border); background: #fff; border-radius: 999px;
  padding: 7px 16px; font-size: 13px; cursor: pointer; font-family: inherit;
  color: var(--text-2); display: inline-flex; align-items: center; gap: 6px;
  transition: all .15s; min-height: 34px;
}
.detail-tabs .tab:hover { border-color: var(--accent); color: var(--accent); }
.detail-tabs .tab.active { background: var(--brand-grad); color: #fff; border-color: transparent; font-weight: 600; }
.detail-tabs .tab .n { min-width: 16px; text-align: center; font-size: 11px; opacity: .85; }
.detail-tabs .tab.active .n { opacity: 1; }

/* 学习页（learn.html）布局 */
.detail-view { flex: 1; display: flex; overflow: hidden; background: var(--bg-soft); }
.detail-side { width: 280px; flex-shrink: 0; background: #fff; border-right: 1px solid var(--border); display: flex; flex-direction: column; overflow: hidden; }
.detail-side .stage-bar { padding: 12px 14px; border-bottom: 1px solid var(--border); flex-shrink: 0; }
.detail-side .path-status { font-size: 12px; color: var(--text-3); margin-bottom: 8px; }
.detail-side .path-btns { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.path-collapse { border: 1px solid var(--border); background: #fff; color: var(--text-2); border-radius: 999px; padding: 3px 10px; font-size: 12px; cursor: pointer; font-family: inherit; }
.path-collapse:hover { border-color: var(--accent); color: var(--accent); }
.detail-main { flex: 1; overflow-y: auto; padding: 22px 28px 60px; }
.detail-section { margin-bottom: 30px; }
.section-head { font-size: 18px; font-weight: 800; margin-bottom: 14px; color: var(--text); }
.panel-tabs { display: flex; gap: 8px; margin-bottom: 12px; }
.panel-tabs .tab { border: 1px solid var(--border); background: #fff; border-radius: 999px; padding: 6px 16px; font-size: 13px; cursor: pointer; font-family: inherit; color: var(--text-2); }
.panel-tabs .tab.active { background: var(--accent); color: #fff; border-color: var(--accent); }
.panel-tabs .tab .n { display: inline-block; min-width: 16px; text-align: center; font-size: 11px; opacity: .85; }

/* ===== 学习页横向并列（learn.html）：左树 + 讲解 / 例题 / 练习 / 真题 四列 ===== */
.detail-main.dcols {
  display: flex; align-items: stretch;
  overflow-x: auto; overflow-y: hidden;
  padding: 0;
}
.dcol { flex-shrink: 0; display: flex; flex-direction: column; min-height: 0; min-width: 0; background: #fff; }
.dcol-head {
  flex-shrink: 0; display: flex; align-items: center; gap: 8px;
  padding: 13px 16px; background: #fff; border-bottom: 1px solid var(--border);
  font-size: 14px; font-weight: 700;
}
.dcol-head::before { content: ''; width: 4px; height: 16px; border-radius: 2px; background: var(--brand-grad); flex-shrink: 0; }
.dcol-head .count { font-size: 12px; color: var(--text-3); font-weight: 400; }
.dcol-head .true-total { margin-left: auto; color: var(--text-3); font-size: 10.5px; font-weight: 400; }
.dcol-scroll { flex: 1; overflow-y: auto; min-height: 0; }

/* 列2 讲解：占满剩余宽度 */
.dc-explain { flex: 1 1 400px; min-width: 360px; border-right: 1px solid var(--border); }
.dc-explain .dcol-scroll { padding: 18px 22px 28px; }
.dc-explain .detail-head { padding: 0 0 6px; }
.dc-explain .detail-section { margin-bottom: 0; }
/* 列3 例题 */
.dc-examples { width: 400px; background: var(--bg-soft); border-right: 1px solid var(--border); }
.dc-examples .dcol-scroll { padding: 12px; }
.dc-examples .dcol-head { background: var(--bg-soft); }
/* 列4 分层练习 */
.dc-practice { width: 440px; border-right: 1px solid var(--border); }
.dc-practice .dcol-scroll { padding: 14px; }
.dc-practice .panel-tabs { flex-shrink: 0; padding: 10px 14px 12px; margin: 0; background: #fff; }
.dc-practice .detail-section { margin-bottom: 0; }
/* 列5 真题训练 */
.dc-true { width: 430px; background: #f7f9fc; border-left: 1px solid var(--border); }
.dc-true .dcol-head { background: #fff; }
.dc-true .dcol-scroll { padding: 14px; }

@media (max-width: 1080px) {
  .dc-explain { flex: 1 1 340px; min-width: 300px; }
  .dc-examples { width: 350px; }
  .dc-practice { width: 390px; }
  .dc-true { width: 380px; }
}


/* 图谱页占位 */
.graph-placeholder { flex: 1; display: flex; align-items: center; justify-content: center; color: var(--text-3); font-size: 15px; padding: 40px; text-align: center; }

/* 组卷：新结构补充类 */
.compose-section { margin-bottom: 18px; padding-bottom: 16px; border-bottom: 1px dashed var(--border); }
.compose-section-title { font-size: 13px; font-weight: 800; color: var(--navy, #1a3d6e); margin-bottom: 10px; }
.compose-row { display: flex; align-items: center; gap: 8px; margin-top: 10px; }
.compose-row > label { font-size: 12px; color: var(--text-2); flex-shrink: 0; }
.range-sep { color: var(--text-3); }
.compose-custom { margin-top: 10px; display: flex; flex-direction: column; gap: 8px; }
.compose-count-field { display: flex; align-items: center; gap: 8px; margin-top: 8px; }
.compose-cat-counts { margin-top: 12px; }
.compose-cat-count-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 8px 14px; }
.compose-cat-total { margin-top: 10px; font-size: 13px; color: var(--text-2); }
.compose-cat-total b { color: var(--accent); font-size: 15px; }
.compose-scope-note { margin: 4px 0 16px; font-size: 12.5px; color: var(--text-2); line-height: 1.6; background: #f3f7fc; border: 1px solid #e4edf6; border-radius: 8px; padding: 10px 12px; }
.compose-scope-note b { color: var(--accent); }

.paper-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 14px 18px; background: #fff; border-bottom: 1px solid var(--border); flex-shrink: 0; }
.paper-title-input { flex: 0 1 320px; height: 38px; border: 1px solid #cdd6e2; border-radius: 8px; padding: 6px 12px; font-size: 15px; font-weight: 700; color: var(--text); }
.paper-sub { font-size: 12.5px; color: var(--text-3); }
.compose-badge { min-width: 22px; height: 22px; padding: 0 6px; border-radius: 999px; background: var(--brand-grad); color: #fff; font-size: 12px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; }
.paper-ops { margin-left: auto; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.menu-wrap { position: relative; }
.dropdown-menu { position: absolute; top: calc(100% + 6px); right: 0; min-width: 180px; background: #fff; border: 1px solid var(--border); border-radius: 10px; box-shadow: 0 16px 40px rgba(31,36,48,.16); padding: 6px; z-index: 60; display: flex; flex-direction: column; }
.dropdown-menu button { border: none; background: none; text-align: left; padding: 9px 12px; border-radius: 8px; font-size: 13px; color: var(--text); cursor: pointer; font-family: inherit; }
.dropdown-menu button:hover { background: var(--accent-soft); color: var(--accent); }
.dropdown-menu-opt { display: flex; align-items: center; gap: 8px; padding: 9px 12px; font-size: 13px; color: var(--text); cursor: pointer; border-bottom: 1px solid var(--border); }
.dropdown-menu-opt input { margin: 0; }
.compose-main { flex: 1; display: flex; flex-direction: column; overflow-y: auto; }
.paper-answer-section { padding: 18px 22px 40px; }
.paper-answer-title { font-size: 17px; font-weight: 800; color: var(--navy, #1a3d6e); margin-bottom: 12px; }
.paper-answer-list { margin: 0; padding-left: 22px; }
.paper-answer-list li { margin-bottom: 8px; font-size: 14px; }

/* 滚动修复：规划页与真题筛选页需可纵向滚动 */
.plan-view { flex: 1; overflow-y: auto; }
.amc-view { flex: 1; overflow-y: auto; }

@media (max-width: 720px) {
  .detail-view { flex-direction: column; }
  .detail-side { width: 100%; max-height: 38vh; border-right: none; border-bottom: 1px solid var(--border); }
  .main-nav { flex-wrap: wrap; }
}

/* ===== 导航徽标（错题本数量） ===== */
.nav-badge { display: inline-block; min-width: 16px; text-align: center; margin-left: 4px; padding: 0 5px; font-size: 11px; line-height: 16px; border-radius: 999px; background: #e23b3b; color: #fff; font-weight: 700; }
.nav-badge[hidden] { display: none; }

/* ===== 真题卡：标记错题按钮 ===== */
.amc-wrong-btn { margin-right: 8px; border: 1px solid var(--border); background: #fff; border-radius: 8px; padding: 6px 12px; font-size: 13px; cursor: pointer; font-family: inherit; color: var(--text-2); transition: all .15s; }
.amc-wrong-btn:hover { border-color: #e23b3b; color: #e23b3b; }
.amc-wrong-btn.on { background: #e23b3b; border-color: #e23b3b; color: #fff; }

/* ===== 错题本页 ===== */
.wrong-view { flex: 1; display: flex; flex-direction: column; overflow-y: auto; }
.wrong-header { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; padding: 22px 28px 8px; }
.wrong-title { font-size: 20px; font-weight: 800; color: var(--navy, #1a3d6e); }
.wrong-header-actions { display: flex; align-items: center; gap: 10px; }
.wrong-hint { color: var(--text-3); font-size: 13px; }
.wrong-count { padding: 0 28px 10px; color: var(--text-2); font-size: 13.5px; }
.wrong-count b { color: var(--navy, #1a3d6e); }
.wrong-view .amc-results { padding: 4px 28px 40px; grid-template-columns: repeat(auto-fill, minmax(440px, 1fr)); }
@media (max-width: 720px) { .wrong-view .amc-results { grid-template-columns: 1fr; padding: 4px 16px 40px; } }

/* ===== 模拟考试页 ===== */
.mock-view { flex: 1; display: flex; flex-direction: column; overflow-y: auto; }
.mock-config { max-width: 880px; margin: 24px auto; padding: 0 20px; width: 100%; }
.mock-config-head { margin-bottom: 16px; }
.mock-title { font-size: 22px; font-weight: 800; color: var(--navy, #1a3d6e); }
.mock-sub { color: var(--text-3); font-size: 13.5px; line-height: 1.6; margin: 8px 0 0; }
.mock-fields { display: flex; flex-wrap: wrap; gap: 18px 26px; align-items: flex-end; }
.mock-field { display: flex; flex-direction: column; gap: 7px; }
.mock-field > label { font-size: 13px; color: var(--text-2); font-weight: 600; }
.mock-config-actions { margin-top: 22px; display: flex; align-items: center; gap: 14px; }
.mock-hint { color: #e23b3b; font-size: 13px; }

.mock-exam { flex: 1; display: flex; flex-direction: column; }
.mock-exam-bar { display: flex; align-items: center; gap: 14px; padding: 12px 20px; border-bottom: 1px solid var(--border); background: #fff; position: sticky; top: 0; z-index: 5; }
.mock-exam-meta { flex: 1; font-size: 13.5px; color: var(--text-2); font-weight: 600; }
.mock-timer { font-variant-numeric: tabular-nums; font-size: 20px; font-weight: 800; color: var(--navy, #1a3d6e); padding: 4px 12px; border-radius: 8px; background: #f1f5fb; }
.mock-timer.urgent { color: #fff; background: #e23b3b; animation: mockPulse 1s infinite; }
@keyframes mockPulse { 0%,100% { opacity: 1; } 50% { opacity: .6; } }
.mock-body { flex: 1; display: flex; gap: 16px; padding: 16px 20px 40px; align-items: flex-start; }
.mock-nav { display: grid; grid-template-columns: repeat(5, 38px); gap: 6px; flex: 0 0 auto; position: sticky; top: 70px; }
.mock-nav-cell { width: 38px; height: 38px; border: 1px solid var(--border); background: #fff; border-radius: 8px; cursor: pointer; font-size: 13px; font-weight: 600; color: var(--text-2); font-family: inherit; }
.mock-nav-cell.done { background: #e7f6ec; border-color: #4caf72; color: #2e7d4f; }
.mock-nav-cell.cur { background: var(--navy, #1a3d6e); border-color: var(--navy, #1a3d6e); color: #fff; }
.mock-current { flex: 1; min-width: 0; }
.mock-card { margin: 0; }

.mock-result { max-width: 920px; margin: 0 auto; width: 100%; padding: 18px 20px 50px; }
.mock-result-head { text-align: center; padding: 16px 0 22px; }
.mock-result-title { font-size: 18px; font-weight: 800; color: var(--text-2); }
.mock-result-score { font-size: 40px; font-weight: 900; color: var(--navy, #1a3d6e); margin: 6px 0; }
.mock-result-stats { color: var(--text-3); font-size: 14px; }
.mock-result-actions { margin-top: 14px; display: flex; gap: 12px; justify-content: center; }
.mock-review { display: flex; flex-direction: column; gap: 14px; }
.mock-review-item { border: 1px solid var(--border); border-left: 4px solid var(--border); border-radius: 10px; padding: 12px 16px; background: #fff; }
.mock-review-item.ok { border-left-color: #4caf72; }
.mock-review-item.no { border-left-color: #e23b3b; }
.mock-review-item.blank { border-left-color: #e0a93b; }
.mri-head { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-bottom: 8px; font-size: 13.5px; }
.mri-no { font-weight: 800; color: var(--navy, #1a3d6e); }
.mri-verdict { font-weight: 700; }
.mock-review-item.ok .mri-verdict { color: #2e7d4f; }
.mock-review-item.no .mri-verdict { color: #e23b3b; }
.mock-review-item.blank .mri-verdict { color: #b9821f; }
.mri-ans { color: var(--text-3); }
.mri-body { font-size: 14px; }

.mock-history { max-width: 920px; margin: 26px auto 50px; padding: 0 20px; width: 100%; }
.mock-history-head { font-size: 16px; font-weight: 800; color: var(--navy, #1a3d6e); margin-bottom: 12px; }
.mock-history-body { display: flex; flex-direction: column; gap: 10px; }
.mock-history-item { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 12px 16px; border: 1px solid var(--border); border-radius: 10px; background: #fff; }
.mhi-main { display: flex; flex-direction: column; gap: 3px; }
.mhi-main b { font-size: 14.5px; color: var(--text); }
.mhi-meta { font-size: 12.5px; color: var(--text-3); }
.mhi-ops { display: flex; gap: 8px; flex: 0 0 auto; }

@media (max-width: 720px) {
  .mock-body { flex-direction: column; }
  .mock-nav { position: static; grid-template-columns: repeat(8, 1fr); width: 100%; }
  .mock-nav-cell { width: 100%; }
}
