/* ============================================
   PhysicsOnline · 清新笔记风
   米白/淡绿纸感底色 · 圆角卡片 · 柔和阴影
   ============================================ */

:root {
  --paper: #faf7ef;          /* 米白纸底 */
  --paper-green: #eef5e9;    /* 淡绿纸底 */
  --card: #fffdf7;           /* 卡片底色 */
  --ink: #3b4a3f;            /* 墨绿灰文字 */
  --ink-soft: #77897c;
  --green: #6fae7c;          /* 主题绿 */
  --green-deep: #4d8a5c;
  --accent: #f2b356;         /* 暖橙点缀 */
  --danger: #e2694f;
  --line: #e3e0d3;
  --shadow: 0 6px 18px rgba(90, 110, 90, .12);
  --radius: 18px;
}

* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html { scroll-behavior: smooth; }

body {
  font-family: "PingFang SC", "Microsoft YaHei", "Hiragino Sans GB", sans-serif;
  background:
    radial-gradient(circle at 15% 20%, #f3f7ee 0%, transparent 40%),
    radial-gradient(circle at 85% 75%, #f0f6ec 0%, transparent 45%),
    var(--paper);
  color: var(--ink);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-size: 17px;
  line-height: 1.75;
}

.container { width: min(960px, 92%); margin: 0 auto; }
.page-main { flex: 1; padding: 28px 0 60px; }

/* ---------- 顶栏 ---------- */
.site-header {
  background: rgba(255, 253, 247, .92);
  backdrop-filter: blur(6px);
  border-bottom: 2px dashed var(--line);
  position: sticky; top: 0; z-index: 50;
}
.header-inner { display: flex; align-items: center; justify-content: space-between; padding: 12px 0; flex-wrap: wrap; gap: 8px; }
.brand { display: flex; align-items: baseline; gap: 8px; text-decoration: none; color: var(--ink); }
.brand-icon { font-size: 26px; }
.brand-name { font-size: 22px; font-weight: 800; letter-spacing: .5px; }
.brand-sub { font-size: 13px; color: var(--ink-soft); }
.top-nav { display: flex; gap: 6px; flex-wrap: wrap; }
.top-nav a {
  text-decoration: none; color: var(--ink);
  padding: 6px 14px; border-radius: 999px; font-size: 15px;
  transition: background .2s, color .2s;
}
.top-nav a:hover { background: var(--paper-green); color: var(--green-deep); }

/* ---------- 纸感卡片 ---------- */
.paper-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 24px 28px;
}

/* ---------- 首页 ---------- */
.hero { margin-bottom: 26px; text-align: center; padding: 38px 28px; }
.hero-title { font-size: clamp(26px, 4vw, 38px); margin-bottom: 12px; }
.wave { display: inline-block; animation: wave 1.8s ease-in-out infinite; transform-origin: 70% 70%; }
@keyframes wave { 0%,60%,100% { transform: rotate(0); } 20% { transform: rotate(18deg); } 40% { transform: rotate(-10deg); } }
.hero-desc { color: var(--ink-soft); font-size: 17px; }
.hero-desc strong { color: var(--green-deep); font-size: 20px; }

.progress-block { margin-top: 24px; text-align: left; }
.progress-label { display: flex; justify-content: space-between; font-size: 15px; margin-bottom: 8px; color: var(--ink); }

.progress-bar {
  height: 16px; background: #edeadf; border-radius: 999px; overflow: hidden;
  border: 1px solid var(--line);
}
.progress-bar.small { height: 10px; }
.progress-fill {
  height: 100%; border-radius: 999px;
  background: linear-gradient(90deg, #9ccf9f, var(--green));
  transition: width .6s ease;
}

.volume-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; margin-bottom: 26px; }
.volume-card { display: flex; align-items: center; gap: 18px; text-decoration: none; color: var(--ink); transition: transform .2s, box-shadow .2s; }
.volume-card:hover { transform: translateY(-4px); box-shadow: 0 12px 26px rgba(90, 110, 90, .18); }
.volume-icon { font-size: 52px; flex-shrink: 0; }
.volume-info { flex: 1; min-width: 0; }
.volume-info h2 { font-size: 24px; margin-bottom: 6px; }
.volume-chapters { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.mini-chip {
  font-size: 12.5px; background: var(--paper-green); color: var(--green-deep);
  border-radius: 999px; padding: 2px 10px; white-space: nowrap;
}
.volume-progress-text { font-size: 13px; color: var(--ink-soft); margin-top: 6px; }
.arrow { font-size: 26px; color: var(--green); font-weight: 700; flex-shrink: 0; }

.how-to h2 { margin-bottom: 14px; }
.how-list { list-style: none; display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.how-list li { display: flex; align-items: center; gap: 10px; background: var(--paper-green); border-radius: 12px; padding: 10px 16px; }
.step-num {
  width: 28px; height: 28px; border-radius: 50%; flex-shrink: 0;
  background: var(--green); color: #fff; display: inline-flex;
  align-items: center; justify-content: center; font-weight: 700; font-size: 15px;
}

/* ---------- 面包屑 ---------- */
.crumbs { margin-bottom: 18px; font-size: 15px; color: var(--ink-soft); }
.crumbs a { color: var(--green-deep); text-decoration: none; }
.crumbs a:hover { text-decoration: underline; }
.crumb-sep { margin: 0 8px; }

/* ---------- 分册页 ---------- */
.volume-hero { margin-bottom: 26px; }
.volume-hero h1 { font-size: 30px; margin-bottom: 6px; }
.volume-hero-sub { color: var(--ink-soft); margin-bottom: 14px; }

.chapter-list { display: grid; gap: 16px; }
.chapter-card { display: flex; align-items: center; gap: 18px; text-decoration: none; color: var(--ink); transition: transform .2s, box-shadow .2s; padding: 18px 24px; }
.chapter-card:hover { transform: translateX(6px); box-shadow: 0 10px 22px rgba(90, 110, 90, .16); }
.chapter-icon { font-size: 40px; flex-shrink: 0; }
.chapter-info { flex: 1; min-width: 0; }
.chapter-info h2 { font-size: 20px; margin-bottom: 2px; }
.chapter-info p { font-size: 14.5px; color: var(--ink-soft); }
.chapter-meta { font-size: 13px !important; }
.chapter-state { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }
.done-badge { background: var(--green); color: #fff; border-radius: 999px; font-size: 13px; padding: 3px 12px; }

/* ---------- 章节详情页 ---------- */
.chapter-hero { display: flex; align-items: center; gap: 20px; margin-bottom: 30px; padding: 26px 30px; }
.chapter-hero-icon { font-size: 56px; }
.chapter-hero h1 { font-size: 32px; }
.chapter-hero-intro { color: var(--ink-soft); }

.section-title { font-size: 24px; margin: 34px 0 16px; display: flex; align-items: center; gap: 8px; }

.block-card { margin-bottom: 18px; }
.block-card h3 { font-size: 20px; margin-bottom: 10px; display: flex; align-items: center; gap: 10px; }
.block-no {
  width: 30px; height: 30px; border-radius: 10px; background: var(--paper-green);
  color: var(--green-deep); font-weight: 800; display: inline-flex;
  align-items: center; justify-content: center; flex-shrink: 0;
}
.point-list { padding-left: 4px; list-style: none; }
.point-list li { padding-left: 22px; position: relative; margin-bottom: 6px; }
.point-list li::before { content: "✏️"; position: absolute; left: 0; font-size: 13px; top: 4px; }
.tip-box {
  margin-top: 12px; background: #fdf3e0; border-left: 4px solid var(--accent);
  border-radius: 8px; padding: 8px 14px; font-size: 15px; color: #8a6a2f;
}

/* ---------- 动画容器（统一尺寸，黑板风） ---------- */
.anim-card {
  background: #2f4038;                 /* 黑板底色 */
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 18px;
  border: 6px solid #b98d5a;           /* 木框 */
}
.anim-hint { color: #d9e8d5; font-size: 15px; margin-bottom: 12px; }
.anim-stage {
  width: 100%;
  height: 430px;                        /* 统一高度，便于复用 */
  background: #35493f;
  border-radius: 12px;
  position: relative;
  overflow: hidden;
}
.anim-stage canvas { display: block; width: 100%; height: 100%; touch-action: none; }
.anim-stage .anim-ui {
  position: absolute; left: 0; right: 0; bottom: 0;
  display: flex; flex-wrap: wrap; gap: 10px; align-items: center;
  padding: 10px 14px;
  background: rgba(20, 30, 25, .72);
  color: #eaf3e6; font-size: 14px;
}
.anim-stage .anim-ui label { display: flex; align-items: center; gap: 6px; }
.anim-stage input[type="range"] { accent-color: #9ccf9f; width: 150px; }
.anim-stage button, .anim-stage select {
  background: #5c8a67; color: #fff; border: none; border-radius: 8px;
  padding: 6px 14px; font-size: 14px; cursor: pointer; font-family: inherit;
}
.anim-stage button:hover { background: #6fae7c; }
.anim-stage .anim-readout {
  position: absolute; top: 10px; left: 12px; right: 12px;
  display: flex; gap: 10px; flex-wrap: wrap; pointer-events: none;
}
.anim-stage .chip {
  background: rgba(20, 30, 25, .68); color: #ffe9b0;
  border-radius: 8px; padding: 4px 12px; font-size: 14px;
}
.anim-stage .chip.warn { color: #ffb4a2; font-weight: 700; animation: blink .8s step-start infinite; }
@keyframes blink { 50% { opacity: .35; } }

/* ---------- 小结卡片 ---------- */
.summary-card { background: var(--paper-green); }
.summary-list { list-style: none; margin-bottom: 16px; }
.summary-list li { padding-left: 26px; position: relative; margin-bottom: 8px; font-size: 17px; }
.summary-list li::before { content: "⭐"; position: absolute; left: 0; font-size: 15px; top: 2px; }
.btn-done {
  background: var(--green-deep); color: #fff; border: none; border-radius: 12px;
  padding: 12px 26px; font-size: 17px; cursor: pointer; font-family: inherit;
  transition: background .2s, transform .1s; text-decoration: none; display: inline-block;
}
.btn-done:hover { background: var(--green); transform: translateY(-1px); }
.btn-done.is-done { background: var(--accent); cursor: default; }

/* ---------- 上一节 / 下一节 ---------- */
.chapter-nav { display: flex; justify-content: space-between; gap: 18px; margin-top: 34px; }
.nav-btn {
  flex: 1; text-decoration: none; color: var(--ink); display: flex; flex-direction: column;
  gap: 4px; padding: 16px 22px; transition: transform .2s, box-shadow .2s; max-width: 48%;
}
.nav-btn:hover { transform: translateY(-3px); box-shadow: 0 10px 22px rgba(90, 110, 90, .18); }
.nav-btn.next { text-align: right; align-items: flex-end; background: var(--paper-green); }
.nav-dir { font-size: 13px; color: var(--ink-soft); }
.nav-name { font-size: 18px; font-weight: 700; }

/* ---------- 页脚 ---------- */
.site-footer { border-top: 2px dashed var(--line); padding: 22px 0; text-align: center; color: var(--ink-soft); font-size: 14px; }
.footer-tip { font-size: 12.5px; margin-top: 4px; }

/* ---------- 考试辅助区（章节页） ---------- */
.exam-help { margin: 34px 0 6px; }
.exam-grid { display: grid; grid-template-columns: 1.3fr 1fr; gap: 18px; }
.exam-card h3 { font-size: 19px; margin-bottom: 10px; }
.exam-note { margin-top: 12px; font-size: 14.5px; color: var(--ink-soft); }
.exam-note strong { color: var(--danger); }

.mastery-box { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-top: 18px; }
.btn-quiz { display: inline-block; text-decoration: none; }
.quiz-status { font-size: 15px; color: var(--ink-soft); padding: 8px 14px; border-radius: 12px; background: var(--paper-green); }
.quiz-status.is-pass { color: var(--green-deep); font-weight: 700; background: #e2f0e2; }
.quiz-status.is-fail { color: var(--danger); background: #fbeae5; }

/* ---------- 测验页 ---------- */
.quiz-hero { margin-bottom: 24px; }
.quiz-hero h1 { font-size: clamp(22px, 3.4vw, 30px); margin-bottom: 10px; }
.quiz-rule { color: var(--ink); font-size: 16px; }
.quiz-rule strong { color: var(--danger); font-size: 19px; }
.pass-tag { display: inline-block; background: #e2f0e2; color: var(--green-deep); font-weight: 700; padding: 1px 10px; border-radius: 999px; font-size: 14px; }
.quiz-tip { margin-top: 8px; color: var(--ink-soft); font-size: 15px; }

.focus-card { margin-top: 14px; background: var(--paper-green); border-radius: 12px; padding: 10px 16px; text-align: left; }
.focus-card summary { cursor: pointer; font-weight: 700; color: var(--green-deep); }
.focus-card ul { margin: 10px 0 4px 20px; color: var(--ink); font-size: 15px; }
.focus-card li { margin: 3px 0; }

.quiz-list { display: flex; flex-direction: column; gap: 18px; }
.quiz-item h3 { font-size: 18px; display: flex; gap: 10px; align-items: baseline; margin-bottom: 12px; }
.quiz-options { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.quiz-opt {
  display: flex; align-items: center; gap: 10px;
  border: 1.5px solid var(--line); border-radius: 12px;
  padding: 9px 13px; cursor: pointer; font-size: 15.5px;
  transition: border-color .15s, background .15s;
}
.quiz-opt:hover { border-color: var(--green); background: #f6faf2; }
.quiz-opt input { accent-color: var(--green); }
.quiz-opt input:disabled { cursor: default; }
.quiz-opt input:checked + .opt-letter { background: var(--green); color: #fff; }
.opt-letter {
  flex: 0 0 26px; height: 26px; display: inline-flex; align-items: center; justify-content: center;
  border-radius: 50%; background: var(--paper-green); color: var(--green-deep);
  font-weight: 700; font-size: 14px;
}
.quiz-opt.is-right { border-color: var(--green); background: #e2f0e2; }
.quiz-opt.is-right .opt-letter { background: var(--green); color: #fff; }
.quiz-opt.is-wrong { border-color: var(--danger); background: #fbeae5; }
.quiz-opt.is-wrong .opt-letter { background: var(--danger); color: #fff; }
.quiz-explain { margin-top: 12px; padding: 10px 14px; background: var(--paper-green); border-radius: 10px; font-size: 15px; color: var(--ink); }

.quiz-actions { text-align: center; margin: 26px 0; }
.quiz-result { text-align: center; padding: 30px 28px; }
.quiz-result h2 { font-size: 24px; margin-bottom: 10px; }
.quiz-result p { color: var(--ink-soft); }
.quiz-result.result-pass { border: 2px solid var(--green); background: #f3faf1; }
.quiz-result.result-pass h2 { color: var(--green-deep); }
.quiz-result .btn-done { margin: 14px 6px 0; display: inline-block; }
.btn-back { text-decoration: none; background: var(--paper-green); color: var(--green-deep); }

/* ---------- 填空巩固 ---------- */
.fill-list { display: flex; flex-direction: column; gap: 16px; }
.fill-item h3 { font-size: 17px; line-height: 2.1; margin-bottom: 8px; }
.fill-text { margin-left: 32px; display: block; }
.fill-input {
  width: 8em; max-width: 58vw; font: inherit; color: var(--ink); text-align: center;
  border: none; border-bottom: 2px solid var(--green); background: #f6faf2;
  padding: 0 6px; border-radius: 6px 6px 0 0;
}
.fill-input:focus { outline: 2px solid rgba(111, 174, 124, .35); outline-offset: 1px; }
.fill-input:disabled { color: var(--green-deep); background: #e2f0e2; }
.fill-actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.fill-check, .wb-redo {
  border: none; border-radius: 10px; padding: 7px 16px; cursor: pointer;
  font: inherit; font-size: 14px; background: var(--green); color: #fff;
}
.fill-check:hover, .wb-redo:hover { background: var(--green-deep); }
.fill-fb { font-size: 14px; font-weight: 700; }
.fill-fb.is-right { color: var(--green-deep); }
.fill-fb.is-wrong { color: var(--danger); }

/* ---------- 错题本 ---------- */
.wb-list { display: flex; flex-direction: column; gap: 16px; }
.wb-empty { text-align: center; color: var(--ink-soft); padding: 26px; }
.wb-head { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 10px; font-size: 13px; }
.wb-badge { background: #e2f0e2; color: var(--green-deep); font-weight: 700; padding: 2px 10px; border-radius: 999px; }
.wb-chapter { color: var(--ink-soft); }
.wb-times { color: var(--ink-soft); margin-left: auto; }
.wb-q { font-size: 17px; margin-bottom: 12px; }
.wb-body { display: flex; flex-direction: column; gap: 10px; align-items: flex-start; }
.wb-body .quiz-options { width: 100%; }
.wb-yours { color: var(--danger); font-size: 15px; }
.wb-right { color: var(--green-deep); font-size: 15px; font-weight: 700; }
.wb-redo-wrap { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.wb-input { width: 10em; max-width: 50vw; }
.wb-drop {
  margin-top: 12px; border: none; border-radius: 10px; padding: 6px 14px;
  cursor: pointer; font: inherit; font-size: 13px;
  background: var(--paper-green); color: var(--ink-soft);
}
.wb-drop:hover { background: #fbeae5; color: var(--danger); }
.wb-explain { margin-top: 12px; }

/* ---------- 分册页测验成绩徽章 ---------- */
.quiz-score { font-size: 13px; padding: 3px 10px; border-radius: 999px; margin-bottom: 6px; display: inline-block; }
.quiz-score.score-pass { background: #e2f0e2; color: var(--green-deep); font-weight: 700; }
.quiz-score.score-fail { background: #fbeae5; color: var(--danger); }
.chapter-state { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }

/* ---------- 首页“继续学习”卡 ---------- */
.continue-card {
  display: flex; align-items: center; gap: 14px;
  margin: 20px auto 4px; max-width: 560px;
  background: linear-gradient(90deg, #eaf4e4, #f6faf2);
  border: 1.5px solid #bcd9bd; border-radius: 14px;
  padding: 12px 18px; text-decoration: none; color: var(--ink);
  transition: transform .2s, box-shadow .2s;
}
.continue-card:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(90, 110, 90, .16); }
.continue-badge {
  background: var(--green-deep); color: #fff; font-size: 13px; font-weight: 700;
  border-radius: 999px; padding: 3px 12px; white-space: nowrap; flex-shrink: 0;
}
.continue-title { flex: 1; font-weight: 700; font-size: 16px; text-align: left; }
.continue-card .arrow { font-size: 20px; }

/* ---------- 测验页卷切换标签 ---------- */
.paper-tabs { display: flex; gap: 8px; flex-wrap: wrap; margin: 10px 0 12px; }
.paper-tab {
  text-decoration: none; font-size: 14px; font-weight: 700;
  padding: 6px 16px; border-radius: 999px;
  background: var(--paper-green); color: var(--ink-soft);
  border: 1.5px solid transparent; transition: all .2s;
}
.paper-tab:hover { color: var(--green-deep); }
.paper-tab.active { background: var(--green-deep); color: #fff; }

/* ---------- 讲义详解与例题精讲 ---------- */
.block-detail {
  margin-top: 12px; padding: 10px 16px; font-size: 15px; line-height: 1.85;
  background: #f2f7ee; border-left: 4px solid var(--green); border-radius: 8px;
}
.example-card { margin-bottom: 18px; }
.example-card h3 { font-size: 18px; margin-bottom: 10px; display: flex; gap: 10px; align-items: baseline; }
.example-steps summary {
  cursor: pointer; font-weight: 700; color: var(--green-deep); font-size: 15px;
  background: var(--paper-green); border-radius: 10px; padding: 8px 14px;
}
.example-body { margin-top: 10px; padding: 4px 8px; }
.example-step { font-size: 15.5px; margin-bottom: 6px; padding-left: 4px; }
.example-answer {
  margin-top: 10px; padding: 8px 14px; border-radius: 10px;
  background: #e2f0e2; color: var(--green-deep); font-weight: 700; font-size: 15.5px;
}

/* ---------- 多动画卡片标题 ---------- */
.lab .anim-card { margin-bottom: 18px; }
.anim-title { color: #ffe9b0; font-size: 17px; margin-bottom: 6px; }

/* ---------- 动画反馈与控件状态 ---------- */
.anim-stage .anim-fb { flex: 1 1 100%; font-size: 14px; min-height: 20px; }
.anim-stage .anim-fb.is-right { color: #b9e8b3; font-weight: 700; }
.anim-stage .anim-fb.is-wrong { color: #ffb4a2; font-weight: 700; }
.anim-stage button.is-on { background: #f2b356; color: #3b4a3f; font-weight: 700; }
.anim-stage button:disabled { opacity: .45; cursor: default; }
.anim-stage input[type="number"] {
  background: #fffdf7; border: none; border-radius: 8px;
  padding: 6px 10px; font-size: 16px; font-family: inherit; color: var(--ink);
}
.anim-stage .anim-sliders { display: flex; flex-wrap: wrap; gap: 6px 18px; width: 100%; }
.anim-stage .slider-row { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.anim-stage .slider-row input[type="range"] { width: 110px; }
.anim-stage .tb-note { flex: 1 1 100%; font-size: 12.5px; color: #a9c4ae; }

/* ---------- 登录 / 注册页 ---------- */
.auth-card { max-width: 460px; margin: 30px auto; padding: 34px 36px; }
.auth-card h1 { font-size: 26px; margin-bottom: 8px; }
.auth-sub { color: var(--ink-soft); font-size: 15px; margin-bottom: 18px; }
.auth-error {
  background: #fbeae5; color: var(--danger);
  border-radius: 10px; padding: 9px 14px; font-size: 15px; margin-bottom: 14px;
}
.auth-form { display: flex; flex-direction: column; gap: 14px; }
.auth-form label { display: flex; flex-direction: column; gap: 6px; font-size: 15px; color: var(--ink); }
.auth-form input {
  border: 1.5px solid var(--line); border-radius: 10px;
  padding: 10px 13px; font-size: 16px; background: #fff;
  font-family: inherit; color: var(--ink);
}
.auth-form input:focus { outline: none; border-color: var(--green); }
.auth-form .btn-done { margin-top: 6px; }
.auth-alt { margin-top: 18px; font-size: 15px; }
.auth-alt a { color: var(--green-deep); font-weight: 700; }
.auth-note { margin-top: 10px; font-size: 13px; color: var(--ink-soft); }

/* ---------- 头部用户状态 ---------- */
.user-chip {
  background: var(--paper-green); color: var(--green-deep);
  font-weight: 700; font-size: 14px;
  padding: 5px 12px; border-radius: 999px;
}
.nav-reg { background: var(--green); color: #fff !important; font-weight: 700; }

/* ---------- 响应式：平板 ---------- */
@media (max-width: 900px) {
  .exam-grid { grid-template-columns: 1fr; }
}

/* ---------- 响应式：手机 ---------- */
@media (max-width: 720px) {
  body { font-size: 16px; }
  .container { width: 94%; }
  .page-main { padding: 18px 0 44px; }

  /* 顶栏：品牌行 + 导航行两行排列 */
  .header-inner { padding: 10px 0; }
  .brand-sub { display: none; }
  .brand-name { font-size: 19px; }
  .top-nav { width: 100%; justify-content: flex-start; }
  .top-nav a { padding: 7px 12px; font-size: 14px; }

  /* 卡片内边距收窄 */
  .paper-card { padding: 18px 16px; border-radius: 14px; }
  .hero { padding: 26px 16px; }
  .hero-desc { font-size: 15px; }
  .continue-card { padding: 10px 14px; gap: 10px; }
  .continue-title { font-size: 14.5px; }

  .volume-grid, .how-list { grid-template-columns: 1fr; }
  .volume-card { padding: 18px 16px; }
  .volume-icon { font-size: 42px; }
  .volume-info h2 { font-size: 20px; }

  /* 分册页章节卡 */
  .chapter-card { padding: 14px 16px; gap: 12px; }
  .chapter-icon { font-size: 32px; }
  .chapter-info h2 { font-size: 17px; }

  /* 章节详情 */
  .chapter-hero { flex-direction: column; text-align: center; padding: 22px 16px; gap: 10px; }
  .chapter-hero-icon { font-size: 44px; }
  .chapter-hero h1 { font-size: 24px; }
  .section-title { font-size: 20px; margin: 26px 0 12px; }
  .block-card h3, .example-card h3 { font-size: 17px; }
  .block-detail, .example-step { font-size: 14.5px; }

  /* 动画：高度与控件触控友好 */
  .anim-card { padding: 12px; border-width: 4px; }
  .anim-stage { height: 400px; }
  .anim-stage .anim-ui { gap: 8px; padding: 8px 10px; font-size: 13px; }
  .anim-stage button, .anim-stage select { padding: 9px 13px; font-size: 13.5px; }
  .anim-stage input[type="range"] { width: 120px; }
  .anim-stage .chip { font-size: 12px; padding: 3px 9px; }
  .anim-stage .slider-row input[type="range"] { width: 90px; }

  .exam-grid, .quiz-options { grid-template-columns: 1fr; }

  /* 测验页 */
  .quiz-hero h1 { font-size: 21px; }
  .quiz-rule { font-size: 14.5px; }
  .quiz-item h3 { font-size: 16px; }
  .quiz-opt { padding: 10px 12px; font-size: 15px; }   /* ≥ 40px 触控高度 */
  .quiz-opt input { width: 18px; height: 18px; }
  .quiz-actions { margin: 20px 0; }
  .btn-done { width: 100%; padding: 13px 18px; font-size: 16px; text-align: center; }
  .quiz-result .btn-done { margin: 10px 0 0; }
  .paper-tabs { margin: 8px 0 10px; }
  .paper-tab { font-size: 13px; padding: 7px 14px; }

  /* 章节导航 */
  .chapter-nav { flex-direction: column; gap: 12px; }
  .nav-btn { max-width: 100%; padding: 14px 18px; }
  .nav-btn.next { align-items: flex-start; text-align: left; }
  .nav-name { font-size: 16px; }

  /* 登录注册 */
  .auth-card { padding: 24px 20px; margin: 18px auto; }
  .auth-form input { font-size: 16px; }   /* 防 iOS 输入放大 */

  .quiz-status { font-size: 13.5px; }
  .site-footer { padding: 18px 0; font-size: 13px; }
}

/* ---------- 响应式：小屏手机 ---------- */
@media (max-width: 380px) {
  .brand-sub { display: none; }
  .hero-title { font-size: 22px; }
  .anim-stage { height: 360px; }
  .continue-title { font-size: 13px; }
}

/* ============================================
   XP / 等级 / 成就 / Toast 组件
   ============================================ */

/* --- 统计面板（首页） --- */
.stats-panel { margin-bottom: 26px; padding: 20px 24px; }
.stats-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; flex-wrap: wrap; gap: 10px; }
.level-badge {
  background: linear-gradient(135deg, var(--green-deep), var(--green));
  color: #fff; font-weight: 700; font-size: 15px;
  padding: 5px 16px; border-radius: 999px;
}
.streak-badge {
  background: #fff3e0; color: #e65100; font-size: 14px; font-weight: 600;
  padding: 4px 14px; border-radius: 999px; border: 1px solid #ffe0b2;
}
.xp-bar-wrap { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.xp-bar { flex: 1; height: 12px; background: #edeadf; border-radius: 999px; overflow: hidden; border: 1px solid var(--line); }
.xp-fill { height: 100%; border-radius: 999px; background: linear-gradient(90deg, #f2b356, #ff9800); transition: width .5s ease; }
.xp-text { font-size: 13px; color: var(--ink-soft); white-space: nowrap; }

/* --- 成就徽章 --- */
.ach-grid { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 8px; }
.ach-grid.ach-locked { opacity: .5; }
.ach-item {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--paper-green); border-radius: 10px; padding: 6px 12px;
  font-size: 13.5px; color: var(--ink); transition: transform .15s;
}
.ach-item.unlocked { background: #fff8e1; border: 1px solid #ffe082; }
.ach-item.unlocked:hover { transform: scale(1.05); }
.ach-icon { font-size: 17px; }
.ach-name { font-weight: 600; }

/* --- XP 浮动提示 --- */
.toast-xp {
  position: fixed; top: 70px; right: 24px; z-index: 999;
  background: linear-gradient(135deg, #ff9800, #f2b356); color: #fff;
  font-weight: 700; font-size: 16px; padding: 10px 22px;
  border-radius: 12px; box-shadow: 0 4px 16px rgba(242,179,86,.4);
  opacity: 0; transform: translateY(-10px) scale(.9);
  transition: opacity .3s, transform .3s; pointer-events: none;
}
.toast-xp.show { opacity: 1; transform: translateY(0) scale(1); }

/* --- 成就解锁 Toast --- */
.toast-achieve {
  position: fixed; top: 70px; left: 50%; transform: translateX(-50%) translateY(-16px) scale(.92);
  z-index: 1000; display: flex; align-items: center; gap: 10px;
  background: #fff; border: 2px solid var(--accent); border-radius: 14px;
  padding: 12px 24px; box-shadow: 0 8px 24px rgba(0,0,0,.12);
  opacity: 0; transition: opacity .35s, transform .35s; pointer-events: none;
}
.toast-achieve.show { opacity: 1; transform: translateX(-50%) translateY(0) scale(1); }
.toast-ach-icon { font-size: 26px; }
.toast-ach-text { font-size: 15px; font-weight: 700; color: var(--ink); }
