/* ============ 浙江高中全学科工作台 ============ */
:root {
  --purple: #6d5bd0;
  --purple-deep: #5848c2;
  --purple-dark: #4635a8;
  --bg: #f4f3fa;
  --ink: #26243a;
  --muted: #6f6c85;
  --line: #e6e4f0;
  --amber-bg: #fff8e6;
  --amber-line: #f0dc9a;
  --radius: 14px;
  --shadow: 0 2px 10px rgba(70, 53, 168, .07);
  --shadow-hover: 0 10px 28px rgba(70, 53, 168, .16);
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", system-ui, sans-serif;
  background: var(--bg); color: var(--ink); line-height: 1.65;
}

/* ---- Hero ---- */
.hero {
  background: linear-gradient(135deg, #4a3a9e 0%, #5d4bb8 45%, #7b5fd0 100%);
  border-radius: 0 0 22px 22px;
  padding: 34px 20px 26px;
  color: #fff;
}
.hero-inner { max-width: 1080px; margin: 0 auto; }
.hero h1 { font-size: 28px; letter-spacing: 1px; }
.hero-sub { margin-top: 6px; font-size: 13.5px; opacity: .82; }
.stat-row {
  margin-top: 20px;
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px;
}
.stat-card {
  background: rgba(255, 255, 255, .13);
  border: 1px solid rgba(255, 255, 255, .22);
  border-radius: 12px; padding: 14px 18px;
  backdrop-filter: blur(4px);
  transition: transform .25s ease, background .25s ease;
}
.stat-card:hover { transform: translateY(-3px); background: rgba(255,255,255,.2); }
.stat-num { font-size: 26px; font-weight: 800; }
.stat-num small { font-size: 14px; font-weight: 600; margin-left: 2px; }
.stat-label { font-size: 12px; opacity: .8; margin-top: 2px; }

/* ---- Tabs ---- */
.tabs {
  max-width: 1080px; margin: 18px auto 0; padding: 0 20px;
  display: flex; gap: 6px; flex-wrap: wrap;
}
.tab {
  border: none; background: transparent; cursor: pointer;
  font-size: 14.5px; padding: 8px 18px; border-radius: 999px;
  color: var(--muted); font-family: inherit;
  transition: all .22s ease;
}
.tab:hover { background: #e9e6f7; color: var(--purple-dark); }
.tab.active {
  background: linear-gradient(135deg, var(--purple), var(--purple-deep));
  color: #fff; font-weight: 600;
  box-shadow: 0 4px 14px rgba(88, 72, 194, .35);
}

/* ---- Layout ---- */
.container { max-width: 1080px; margin: 16px auto 60px; padding: 0 20px; }
.page { display: none; }
.page.active { display: block; animation: pageIn .35s ease; }
@keyframes pageIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

.card {
  background: #fff; border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 22px 26px; margin-bottom: 18px;
  border: 1px solid var(--line);
}
.card h2 { font-size: 19px; margin-bottom: 6px; }
.subhead { font-size: 15.5px; margin: 18px 0 10px; }
.muted { color: var(--muted); font-size: 13.5px; }
.small { font-size: 12.5px; }
.fade-up { animation: fadeUp .45s ease backwards; }
.fade-up:nth-child(2) { animation-delay: .08s; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

/* ---- Table ---- */
.table-wrap { overflow-x: auto; margin-top: 10px; }
.table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.table th, .table td { border: 1px solid var(--line); padding: 9px 12px; text-align: left; vertical-align: top; }
.table th { background: #f4f2fc; font-weight: 600; white-space: nowrap; }
.table tbody tr { transition: background .15s; }
.table tbody tr:hover { background: #faf9fe; }

.notice {
  margin-top: 12px; background: var(--amber-bg); border: 1px solid var(--amber-line);
  color: #8a6d1a; font-size: 12.5px; border-radius: 10px; padding: 9px 14px;
}
.notice::before { content: "⚠️ "; }

/* ---- Subject cards ---- */
.subject-grid {
  margin-top: 14px;
  display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px;
}
.subject-card {
  border-radius: 12px; padding: 16px 18px; color: #fff; cursor: pointer;
  position: relative; overflow: hidden;
  transition: transform .22s ease, box-shadow .22s ease;
}
.subject-card::after {
  content: "→"; position: absolute; right: 16px; top: 14px;
  opacity: 0; transform: translateX(-8px); transition: all .22s ease; font-weight: 700;
}
.subject-card:hover { transform: translateY(-4px); box-shadow: 0 12px 24px rgba(0,0,0,.22); }
.subject-card:hover::after { opacity: .9; transform: none; }
.subject-card h3 { font-size: 17px; }
.subject-card p { font-size: 11.5px; opacity: .88; margin-top: 4px; }

/* ---- Chips ---- */
.chip-row { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0 18px; }
.chip {
  border: 1px solid var(--line); background: #faf9fd; border-radius: 999px;
  padding: 5px 16px; font-size: 13.5px; cursor: pointer; font-family: inherit;
  transition: all .2s ease; color: var(--ink);
}
.chip:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.chip.active { color: #fff; font-weight: 600; border-color: transparent; }

/* ---- Knowledge graph ---- */
.kg-head { border-left: 4px solid var(--accent, var(--purple)); padding-left: 12px; margin-bottom: 14px; }
.kg-head h3 { font-size: 16.5px; }
.kg-head p { font-size: 12px; color: var(--muted); }
.kg-module {
  border: 1px solid var(--line); border-left: 4px solid var(--accent, var(--purple));
  border-radius: 10px; padding: 14px 18px; margin-bottom: 14px;
  transition: box-shadow .2s ease, transform .2s ease;
}
.kg-module:hover { box-shadow: var(--shadow-hover); transform: translateY(-2px); }
.kg-module-head { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-bottom: 8px; }
.kg-module-head b { font-size: 14.5px; }
.badge {
  font-size: 11px; border-radius: 6px; padding: 2px 8px; font-weight: 600;
  background: color-mix(in srgb, var(--accent, var(--purple)) 12%, white);
  color: var(--accent, var(--purple));
}
.badge.gray { background: #f1f0f7; color: var(--muted); }
.kg-points { list-style: none; }
.kg-points li {
  display: flex; justify-content: space-between; align-items: baseline; gap: 12px;
  padding: 4px 0; font-size: 13px; flex-wrap: wrap;
}
.kg-points li::before { content: "▸"; color: var(--accent, var(--purple)); margin-right: 6px; }
.kg-point-text { flex: 1; min-width: 200px; }
.chapter-tag {
  font-size: 11.5px; color: #2471a3; background: #eef5fc;
  border-radius: 6px; padding: 2px 8px; white-space: nowrap;
}
.chapter-tag::before { content: "📘 "; }
.ai-btn {
  border: none; background: none; cursor: pointer; font-size: 13px;
  border-radius: 6px; padding: 1px 4px; transition: background .15s, transform .15s;
}
.ai-btn:hover { background: #f0edfb; transform: scale(1.2); }
.kg-tip {
  margin-top: 8px; background: var(--amber-bg); border: 1px solid var(--amber-line);
  border-radius: 8px; padding: 7px 12px; font-size: 12.5px; color: #8a6d1a;
}
.kg-tip::before { content: "💡 "; }

/* ---- Forms ---- */
.input {
  border: 1px solid var(--line); border-radius: 9px; padding: 8px 12px;
  font-size: 13.5px; font-family: inherit; background: #fff; color: var(--ink);
  transition: border-color .18s, box-shadow .18s; outline: none;
}
.input:focus { border-color: var(--purple); box-shadow: 0 0 0 3px rgba(109, 91, 208, .15); }
.select { cursor: pointer; }
.input.sm { padding: 5px 10px; font-size: 12.5px; }
.grow { flex: 1; min-width: 180px; }
.toolbar { display: flex; gap: 10px; flex-wrap: wrap; margin: 14px 0 8px; }
.form-row { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }

.btn {
  border: none; border-radius: 9px; padding: 8px 18px; font-size: 13.5px;
  cursor: pointer; font-family: inherit; font-weight: 600;
  transition: all .2s ease;
}
.btn.primary {
  background: linear-gradient(135deg, var(--purple), var(--purple-deep)); color: #fff;
  box-shadow: 0 4px 12px rgba(88, 72, 194, .3);
}
.btn.primary:hover { transform: translateY(-2px); box-shadow: 0 8px 18px rgba(88, 72, 194, .4); }
.btn.ghost { background: #f1effa; color: var(--purple-dark); }
.btn.ghost:hover { background: #e6e2f6; }
.btn.ai { background: linear-gradient(135deg, #0ea5e9, #6366f1); color: #fff; box-shadow: 0 4px 12px rgba(99,102,241,.3); }
.btn.ai:hover { transform: translateY(-2px); box-shadow: 0 8px 18px rgba(99,102,241,.42); }
.btn.sm { padding: 5px 12px; font-size: 12.5px; }
.btn:disabled { opacity: .55; cursor: not-allowed; transform: none !important; }
.btn.danger { background: #fdecea; color: #c0392b; }
.btn.danger:hover { background: #fadbd8; }

/* ---- Diagnosis ---- */
.diag-form { margin-top: 8px; }
.diag-row {
  display: flex; align-items: center; gap: 12px;
  padding: 8px 4px; border-bottom: 1px dashed var(--line); font-size: 13.5px;
}
.diag-row label { flex: 1; }
.diag-row .custom-del { margin-left: auto; }
.diag-inputs { display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: 12.5px; }
.diag-inputs .input { width: 84px; padding: 6px 8px; text-align: center; }
.diag-inputs .input.full { width: 70px; background: #faf9fd; }
.pct-pill { font-size: 11px; min-width: 44px; text-align: center; border-radius: 6px; padding: 2px 6px; font-weight: 600; }

.diag-result { margin-top: 18px; }
.diag-flex { display: flex; gap: 26px; flex-wrap: wrap; align-items: flex-start; }
.radar-box { background: #faf9fe; border: 1px solid var(--line); border-radius: 12px; padding: 10px; }
.weak-box { flex: 1; min-width: 260px; }
.weak-item {
  display: flex; align-items: center; gap: 10px; padding: 9px 12px;
  border: 1px solid var(--line); border-radius: 10px; margin-bottom: 8px; font-size: 13px;
  animation: fadeUp .4s ease backwards;
}
.weak-bar { flex: 1; height: 8px; background: #efedf7; border-radius: 99px; overflow: hidden; }
.weak-bar i { display: block; height: 100%; border-radius: 99px; transition: width .8s cubic-bezier(.2,.8,.3,1); }

.history-list { font-size: 13px; }
.history-item {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  border: 1px solid var(--line); border-radius: 10px; padding: 9px 14px; margin-bottom: 8px;
}
.history-item .muted { font-size: 12px; }

/* ---- Timeline ---- */
.timeline-card { border-left: 4px solid var(--tl-color, var(--purple)); }
.timeline { position: relative; margin: 14px 0 6px 8px; padding-left: 22px; }
.timeline::before { content: ""; position: absolute; left: 5px; top: 6px; bottom: 6px; width: 2px; background: color-mix(in srgb, var(--tl-color, var(--purple)) 30%, white); }
.tl-item { position: relative; padding: 7px 0; animation: fadeUp .4s ease backwards; }
.tl-item::before {
  content: ""; position: absolute; left: -22px; top: 13px;
  width: 9px; height: 9px; border-radius: 50%;
  background: var(--tl-color, var(--purple)); box-shadow: 0 0 0 3px color-mix(in srgb, var(--tl-color, var(--purple)) 20%, white);
}
.tl-time { font-weight: 700; font-size: 13px; color: var(--tl-color, var(--purple)); margin-right: 8px; }
.tl-title { font-weight: 600; font-size: 13.5px; }
.tl-desc { font-size: 12.5px; color: var(--muted); }

/* ---- Papers ---- */
.paper-form { background: #faf9fe; border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; }
.ai-upload {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  margin: 14px 0; padding: 13px 16px; border-radius: 12px;
  background: linear-gradient(135deg, #eef6ff, #f2f0ff); border: 1px dashed #b9c8f0;
}
.ai-upload > div { flex: 1; min-width: 220px; }
/* 已选照片 chips */
.img-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0 2px; }
.img-chip {
  display: inline-flex; align-items: center; gap: 6px;
  background: #f1effa; color: var(--purple-dark); border: 1px solid var(--line);
  border-radius: 999px; padding: 3px 10px; font-size: 12px;
  animation: fadeUp .25s ease backwards;
}
.img-chip button { border: none; background: none; cursor: pointer; color: #c0392b; font-size: 11px; padding: 0; line-height: 1; }
.img-chip button:hover { transform: scale(1.2); }

/* 原生文件选择控件隐藏，用 label 按钮触发（保持主题风格） */
.file-input { display: none; }
.archive-head { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.archive-filters { display: flex; gap: 8px; flex-wrap: wrap; }
.paper-list { margin-top: 12px; }
.paper-item {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  border: 1px solid var(--line); border-radius: 10px; padding: 10px 14px; margin-bottom: 8px;
  font-size: 13px; animation: fadeUp .3s ease backwards;
  transition: box-shadow .2s;
}
.paper-item:hover { box-shadow: var(--shadow); }
.paper-item .p-name { font-weight: 600; }
.paper-item .tag {
  font-size: 11px; background: #f1effa; color: var(--purple-dark);
  border-radius: 6px; padding: 2px 8px; white-space: nowrap;
}
.paper-item .p-note { color: var(--muted); font-size: 12px; flex-basis: 100%; }
.empty { color: var(--muted); font-size: 13px; padding: 14px 4px; }

/* ---- Live stats (总览 · 我的学习数据库) ---- */
.live-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 12px; margin-top: 14px;
}
.live-tile {
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  background: #faf9fe; border: 1px solid var(--line); border-radius: 12px;
  padding: 14px 10px; transition: transform .2s ease, box-shadow .2s ease;
}
.live-tile:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.live-tile .lt-icon { font-size: 20px; }
.live-tile .lt-num { font-size: 24px; font-weight: 800; color: var(--purple-dark); }
.live-tile .lt-label { font-size: 12px; color: var(--muted); }

/* ---- AI 报告历史 ---- */
.report-list { margin-top: 12px; }
.report-item {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  border: 1px solid var(--line); border-radius: 10px; padding: 10px 14px; margin-bottom: 8px;
  font-size: 13px; animation: fadeUp .3s ease backwards; transition: box-shadow .2s;
}
.report-item:hover { box-shadow: var(--shadow); }
.kind-badge { font-size: 11px; border-radius: 6px; padding: 2px 8px; font-weight: 600; white-space: nowrap; }
.kind-diagnose { background: #f3e8fd; color: #7d3c98; }
.kind-explain { background: #e8f6fd; color: #1a6d9e; }
.kind-paper { background: #e9f7ec; color: #1e8449; }
.kind-solve { background: #fdf3e3; color: #b9770e; }
.report-item .r-ref { font-weight: 600; }
.report-item .r-time { font-size: 11.5px; color: var(--muted); }
.report-item .r-preview {
  flex-basis: 100%; font-size: 12px; color: var(--muted);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.report-item .r-actions { margin-left: auto; display: flex; gap: 6px; }

/* ---- AI output ---- */
.ai-out {
  margin-top: 14px; border: 1px solid #d7dbf5; border-radius: 12px;
  background: #fbfbff; padding: 16px 20px; font-size: 13.5px; line-height: 1.75;
}
.ai-out h1, .ai-out h2, .ai-out h3, .ai-out h4 { font-size: 14.5px; margin: 12px 0 6px; color: var(--purple-dark); }
.ai-out table { border-collapse: collapse; width: 100%; margin: 8px 0; font-size: 12.5px; }
.ai-out th, .ai-out td { border: 1px solid var(--line); padding: 5px 9px; }
.ai-out th { background: #f1effa; }
.ai-out ul, .ai-out ol { padding-left: 22px; margin: 6px 0; }
.ai-out code { background: #f0eefb; border-radius: 4px; padding: 1px 5px; font-size: 12px; }
.ai-out pre { background: #2f2a55; color: #e8e6f5; border-radius: 8px; padding: 10px 14px; overflow-x: auto; margin: 8px 0; }
.ai-out pre code { background: none; color: inherit; padding: 0; font-size: 12px; line-height: 1.6; }
.ai-out .ai-meta { font-size: 11px; color: var(--muted); margin-top: 10px; border-top: 1px dashed var(--line); padding-top: 8px; }
.typing-cursor { display: inline-block; width: 8px; height: 15px; background: var(--purple); vertical-align: -2px; animation: blink .8s infinite; }
@keyframes blink { 50% { opacity: 0; } }
.spinner {
  display: inline-block; width: 15px; height: 15px; border-radius: 50%;
  border: 2px solid #d5d0f0; border-top-color: var(--purple);
  animation: spin .8s linear infinite; vertical-align: -3px; margin-right: 8px;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---- Modal ---- */
.modal { position: fixed; inset: 0; z-index: 50; display: flex; align-items: center; justify-content: center; }
.modal-mask { position: absolute; inset: 0; background: rgba(30, 24, 60, .45); backdrop-filter: blur(2px); }
.modal-card {
  position: relative; background: #fff; border-radius: 16px; width: min(720px, 92vw);
  max-height: 82vh; display: flex; flex-direction: column;
  box-shadow: 0 24px 60px rgba(30, 24, 60, .35); animation: modalIn .25s ease;
}
@keyframes modalIn { from { opacity: 0; transform: translateY(18px) scale(.98); } to { opacity: 1; transform: none; } }
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 20px; border-bottom: 1px solid var(--line); }
.modal-close { border: none; background: #f1effa; border-radius: 8px; width: 30px; height: 30px; cursor: pointer; font-size: 13px; }
.modal-body { overflow-y: auto; padding: 4px 20px 18px; margin-top: 0; border: none; background: #fff; }

/* ---- AI 解题 ---- */
.solve-out { margin-top: 6px; }
.trans-box {
  border: 1px solid var(--line); border-radius: 10px; background: #faf9fe;
  padding: 8px 14px; margin-bottom: 10px; font-size: 13px;
}
.trans-box summary { cursor: pointer; font-weight: 600; font-size: 13px; color: var(--purple-dark); }
.trans-box .trans-body { padding: 8px 4px 4px; }
.math-fallback {
  background: #f0eefb; border-radius: 4px; padding: 1px 5px; font-size: 12.5px;
  font-family: Consolas, Monaco, monospace; color: #4635a8; word-break: break-all;
}
.solve-out .katex-display { margin: .6em 0; }
.solve-out .katex { font-size: 1.04em; }

/* ---- 解题校验状态 ---- */
.verify-badge {
  border-radius: 10px; padding: 9px 14px; font-size: 13px; margin-bottom: 10px;
  border: 1px solid transparent;
}
.verify-badge.pass { background: #e9f7ec; border-color: #b7e1c3; color: #1e8449; }
.verify-badge.fail { background: #fdecea; border-color: #f5b7b1; color: #a93226; }
.verify-badge.unknown { background: var(--amber-bg); border-color: var(--amber-line); color: #8a6d1a; }
.verify-badge b { font-family: Consolas, Monaco, monospace; font-size: 12px; }
.verify-warn {
  background: var(--amber-bg); border: 1px solid var(--amber-line); color: #8a6d1a;
  border-radius: 10px; padding: 8px 14px; font-size: 13px; margin: 10px 0;
}
.orig-solution {
  margin-top: 10px; border: 1px dashed var(--line); border-radius: 10px;
  background: #faf9fe; padding: 8px 14px; font-size: 13px;
}
.orig-solution summary { cursor: pointer; font-size: 12.5px; color: var(--muted); font-weight: 600; }
.orig-solution .trans-body { padding-top: 8px; opacity: .85; }

/* ---- 题解会话继续对话 ---- */
.chat-thread { margin-top: 16px; }
.chat-msgs {
  max-height: 460px; overflow-y: auto; padding: 6px 2px;
  display: flex; flex-direction: column; gap: 10px;
}
.chat-msg { display: flex; }
.chat-msg.user { justify-content: flex-end; }
.chat-msg.assistant { justify-content: flex-start; }
.chat-bubble {
  max-width: 86%; border-radius: 12px; padding: 9px 14px; font-size: 13.5px; line-height: 1.7;
  border: 1px solid var(--line);
}
.chat-msg.user .chat-bubble { background: linear-gradient(135deg, #6d5bd0, #5848c2); color: #fff; border: none; }
.chat-msg.assistant .chat-bubble { background: #faf9fe; }
.chat-msg .chat-meta { font-size: 11px; opacity: .65; margin-top: 6px; border-top: 1px dashed rgba(128,128,128,.25); padding-top: 4px; }
.chat-msg.user .chat-img { font-size: 11.5px; opacity: .85; margin-top: 4px; }
.chat-input-row { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; align-items: center; }
.chat-input-row .input.grow { flex: 1; min-width: 200px; }

/* ---- 解题回顾（回看面板） ---- */
.review-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 14px; margin-top: 14px;
}
.review-card {
  display: flex; gap: 12px; border: 1px solid var(--line); border-radius: 12px;
  padding: 12px; cursor: pointer; background: #fff;
  transition: transform .2s ease, box-shadow .2s ease;
  animation: fadeUp .3s ease backwards;
}
.review-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-hover); }
.rc-thumb {
  width: 84px; height: 84px; border-radius: 9px; overflow: hidden; flex-shrink: 0;
  background: #f1effa; display: flex; align-items: center; justify-content: center;
}
.rc-thumb img { width: 100%; height: 100%; object-fit: cover; }
.rc-noimg { font-size: 30px; opacity: .5; }
.rc-body { min-width: 0; display: flex; flex-direction: column; gap: 5px; }
.rc-title { font-size: 14px; line-height: 1.4; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.rc-meta { display: flex; gap: 6px; flex-wrap: wrap; }
.rc-meta .tag { font-size: 10.5px; background: #f1effa; color: var(--purple-dark); border-radius: 5px; padding: 1px 7px; }
.review-imgs { display: flex; gap: 10px; flex-wrap: wrap; margin: 10px 0; }
.review-imgs img {
  width: 220px; border-radius: 10px; border: 1px solid var(--line); transition: transform .2s;
}
.review-imgs img:hover { transform: scale(1.04); }
.solve-title { font-size: 16.5px; font-weight: 700; color: var(--purple-dark); margin-bottom: 10px; }

/* ---- 解题过程实时展示 ---- */
.live-proc { display: flex; flex-direction: column; gap: 10px; max-height: 520px; overflow-y: auto; padding: 2px; }
.lp-stage { border: 1px solid var(--line); border-radius: 10px; padding: 8px 12px; background: #faf9fe; animation: fadeUp .3s ease backwards; }
.lp-head { font-size: 12.5px; font-weight: 600; color: var(--purple-dark); }
.lp-stage.live .lp-head::after { content: ' ✍️'; }
/* 实时渲染的 Markdown+公式正文 */
.lp-body { font-size: 12.5px; line-height: 1.7; margin-top: 4px; overflow-wrap: break-word; }
.lp-body p { margin: 3px 0; }
.lp-body h1, .lp-body h2, .lp-body h3, .lp-body h4 { font-size: 13px; margin: 8px 0 4px; color: var(--purple-dark); }
.lp-body ul, .lp-body ol { margin: 3px 0; padding-left: 20px; }
.lp-body table { border-collapse: collapse; margin: 5px 0; font-size: 11.5px; }
.lp-body th, .lp-body td { border: 1px solid var(--line); padding: 2px 7px; }
.lp-body .katex { font-size: 1em; }
.lp-body .katex-display { margin: 5px 0; }

/* ---- Modal 表单（令牌 / 自定义模块） ---- */
.modal-form { display: flex; flex-direction: column; gap: 8px; padding-top: 6px; }
.modal-form label { font-size: 12.5px; color: var(--muted); font-weight: 600; }

/* ---- 模块得分趋势 ---- */
.trend-list { font-size: 13px; }
.trend-item {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  border: 1px solid var(--line); border-radius: 10px; padding: 9px 14px; margin-bottom: 8px;
  animation: fadeUp .4s ease backwards; transition: box-shadow .2s;
}
.trend-item:hover { box-shadow: var(--shadow); }
.trend-item b { min-width: 150px; }
.trend-item .trend-pct { font-weight: 700; min-width: 52px; text-align: right; }
.trend-bars {
  display: flex; align-items: flex-end; gap: 3px; height: 42px; flex: 1; min-width: 120px;
  border-bottom: 1px solid var(--line); padding-bottom: 1px;
}
.trend-bars i { display: block; width: 12px; border-radius: 3px 3px 0 0; min-height: 6px; }

/* ---- 加载更多 ---- */
.load-more-wrap { text-align: center; margin-top: 10px; }
.load-more-wrap .btn.hidden { display: none; }

/* ---- Toast ---- */
.toast {
  position: fixed; left: 50%; bottom: 34px; transform: translateX(-50%) translateY(20px);
  background: #2f2a55; color: #fff; border-radius: 10px; padding: 10px 20px;
  font-size: 13.5px; opacity: 0; pointer-events: none; transition: all .3s ease; z-index: 99;
  box-shadow: 0 10px 30px rgba(30, 24, 60, .35);
}
.toast.show { opacity: 1; transform: translateX(-50%); }
.toast.err { background: #a93226; }

.footer { text-align: center; padding: 22px 16px 30px; color: var(--muted); font-size: 12px; }
.hidden { display: none !important; }

@media (max-width: 760px) {
  .stat-row { grid-template-columns: repeat(2, 1fr); }
  .hero h1 { font-size: 22px; }
  .diag-flex { flex-direction: column; }
  .kg-points li { flex-direction: column; gap: 2px; }
}
