/* ============================================================
   styles.css
   共享样式表 —— 用于 index.html 与全部 ch*.html
   设计语言遵循 WA01 §4：
   - 浅米杏背景、深棕文字、暖橙强调
   - 系统中文字体 + 系统衬线（不远程加载字体）
   - 移动端优先，max-width 720px 居中
   - 圆角柔和（12-20px），不出现医院感的直角与冷色
   - 暗色模式：自动跟随系统 + 手动覆盖（[data-theme])
   - 触摸目标 ≥ 44×44 px
   ============================================================ */

/* ----------------------------------------------------------------
   1. CSS 变量（设计令牌）
   ----------------------------------------------------------------
   颜色取自 WA01 §4.1，并按任务 prompt 的强约束做了一次校准：
   - 主背景 #FAF7F2（浅米杏）
   - 正文文字 #3D342B（深棕近黑，比纯黑温和）
   - 强调色 #C4837C（柔和暖粉橙——同时承担"我现在很疼"按钮）
   ---------------------------------------------------------------- */
:root {
  /* —— 浅色模式 —— */
  --bg: #FAF7F2;                /* 主背景 */
  --bg-soft: #F5EBE0;           /* 第 4 章独白专用、卡片高光底 */
  --bg-card: #FFFFFF;           /* 普通卡片 */
  --bg-elev: #FEFCF8;           /* 抬升一点的卡片 */
  --text: #3D342B;              /* 正文 */
  --text-soft: #6A6258;         /* 次级文字 */
  --text-mute: #948977;         /* 更浅的提示文字 */
  --accent: #C4837C;            /* 强调（柔粉橙）—— "我现在很疼"按钮 */
  --accent-deep: #A6655F;       /* 强调按钮 hover/active */
  --link: #8A5A3A;              /* 链接 / 可点击 */
  --line: #E8DFD0;              /* 细线 / 分隔 */
  --line-soft: #EFE7DA;         /* 更柔的分隔 */
  --warn: #C66C3A;              /* 红旗用低饱和暖橙（不是红） */
  --warn-bg: #FBEFE3;           /* 红旗卡片背景 */
  --shadow: 0 6px 20px rgba(60, 45, 30, 0.06);
  --shadow-strong: 0 8px 28px rgba(60, 45, 30, 0.12);
  --radius-sm: 12px;
  --radius-md: 16px;
  --radius-lg: 20px;

  /* —— 字号、行距 —— */
  --fz-base: 17px;              /* 移动端正文 */
  --fz-h1: 28px;
  --fz-h2: 22px;
  --fz-h3: 18px;
  --fz-small: 14px;
  --lh-base: 1.85;              /* 1.7-1.9 之间，取中间偏上 */
  --lh-tight: 1.5;
  --lh-loose: 2.0;              /* 第 4 章独白专用 */

  /* —— 容器 —— */
  --container: 720px;
}

/* —— 暗色模式：跟随系统 —— */
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #1A1816;
    --bg-soft: #221F1B;
    --bg-card: #252220;
    --bg-elev: #2A2622;
    --text: #E8E3D8;
    --text-soft: #B4AB9C;
    --text-mute: #837A6B;
    --accent: #D9A29B;          /* 暗色下稍亮一点的粉橙，保持温度 */
    --accent-deep: #C4837C;
    --link: #C9A37A;
    --line: #3A352E;
    --line-soft: #2F2B25;
    --warn: #D98C5C;
    --warn-bg: #2E2520;
    --shadow: 0 6px 20px rgba(0, 0, 0, 0.35);
    --shadow-strong: 0 8px 28px rgba(0, 0, 0, 0.5);
  }
}

/* —— 暗色模式：手动覆盖（用户切换） —— */
[data-theme="dark"] {
  --bg: #1A1816;
  --bg-soft: #221F1B;
  --bg-card: #252220;
  --bg-elev: #2A2622;
  --text: #E8E3D8;
  --text-soft: #B4AB9C;
  --text-mute: #837A6B;
  --accent: #D9A29B;
  --accent-deep: #C4837C;
  --link: #C9A37A;
  --line: #3A352E;
  --line-soft: #2F2B25;
  --warn: #D98C5C;
  --warn-bg: #2E2520;
  --shadow: 0 6px 20px rgba(0, 0, 0, 0.35);
  --shadow-strong: 0 8px 28px rgba(0, 0, 0, 0.5);
}

/* —— 浅色模式：手动覆盖（用户从暗色切回） —— */
[data-theme="light"] {
  --bg: #FAF7F2;
  --bg-soft: #F5EBE0;
  --bg-card: #FFFFFF;
  --bg-elev: #FEFCF8;
  --text: #3D342B;
  --text-soft: #6A6258;
  --text-mute: #948977;
  --accent: #C4837C;
  --accent-deep: #A6655F;
  --link: #8A5A3A;
  --line: #E8DFD0;
  --line-soft: #EFE7DA;
  --warn: #C66C3A;
  --warn-bg: #FBEFE3;
  --shadow: 0 6px 20px rgba(60, 45, 30, 0.06);
  --shadow-strong: 0 8px 28px rgba(60, 45, 30, 0.12);
}

/* ============================================================
   2. 重置与基础
   ============================================================ */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  font-size: 100%;
  -webkit-text-size-adjust: 100%;     /* iOS 不要自动缩放 */
  scroll-behavior: smooth;             /* 锚点平滑滚动（兜底，JS 会再做一次） */
}

body {
  margin: 0;
  padding: 0;
  background-color: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC",
               "Hiragino Sans GB", "Microsoft YaHei",
               "Helvetica Neue", Arial, sans-serif;
  font-size: var(--fz-base);
  line-height: var(--lh-base);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;                   /* 永远不出现横向滚动 */
  transition: background-color 240ms ease, color 240ms ease;
}

/* —— 标题用衬线，给"信件感" —— */
h1, h2, h3, h4 {
  font-family: "Noto Serif SC", "Source Han Serif SC",
               "Songti SC", "STSong", "SimSun", serif;
  color: var(--text);
  margin: 0 0 0.6em 0;
  line-height: var(--lh-tight);
  font-weight: 600;
}
h1 { font-size: var(--fz-h1); }
h2 { font-size: var(--fz-h2); margin-top: 1.5em; }
h3 { font-size: var(--fz-h3); margin-top: 1.2em; }

/* —— 段落 —— */
p {
  margin: 0 0 1em 0;
}

/* —— 链接 —— */
a {
  color: var(--link);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 200ms ease, color 200ms ease;
}
a:hover,
a:focus-visible {
  border-bottom-color: var(--link);
}

/* —— 强调与软引用 —— */
strong {
  color: var(--text);
  font-weight: 700;
}
em {
  color: var(--text-soft);
  font-style: normal;            /* 中文不用斜体，转为色阶 */
}

/* —— 分隔线 —— */
hr {
  border: none;
  border-top: 1px solid var(--line);
  margin: 2em 0;
}

/* —— 列表 —— */
ul, ol {
  margin: 0 0 1em 0;
  padding-left: 1.4em;
}
li {
  margin-bottom: 0.4em;
}

/* —— 输入元素：尊重系统默认，仅做最小修饰 —— */
button,
input,
textarea,
select {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
  border: none;
  background: none;
}

textarea {
  width: 100%;
  border: 1px solid var(--line);
  background-color: var(--bg-elev);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  resize: vertical;
  min-height: 8em;
  line-height: 1.7;
}

/* ============================================================
   3. 布局容器
   ============================================================ */
.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 20px;
}

main.container {
  padding-top: 24px;
  padding-bottom: 96px;        /* 给底部浮动按钮留呼吸 */
}

/* ============================================================
   4. 顶部导航
   ============================================================ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background-color: rgba(250, 247, 242, 0.92);
  backdrop-filter: saturate(140%) blur(8px);
  -webkit-backdrop-filter: saturate(140%) blur(8px);
  border-bottom: 1px solid var(--line-soft);
  transition: background-color 240ms ease, border-color 240ms ease;
}
[data-theme="dark"] .site-header,
@media (prefers-color-scheme: dark) {
  /* 不能直接 nest @media——下面单独写 */
}
[data-theme="dark"] .site-header {
  background-color: rgba(26, 24, 22, 0.92);
}
@media (prefers-color-scheme: dark) {
  .site-header {
    background-color: rgba(26, 24, 22, 0.92);
  }
  [data-theme="light"] .site-header {
    background-color: rgba(250, 247, 242, 0.92);
  }
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 52px;
  gap: 12px;
}

/* 站名采用极克制的字号 —— 不写"痛经调理" */
.site-name {
  font-family: "Noto Serif SC", "Songti SC", "STSong", serif;
  font-size: 16px;
  color: var(--text-soft);
  letter-spacing: 0.05em;
  border-bottom: none;
}
.site-name:hover {
  color: var(--text);
  border-bottom: none;
}

/* 顶部右侧的工具按钮组 */
.site-tools {
  display: flex;
  align-items: center;
  gap: 6px;
}

/* 圆形小图标按钮（暗色切换、回首页等） */
.icon-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--text-soft);
  transition: background-color 200ms ease, color 200ms ease;
}
.icon-btn:hover,
.icon-btn:focus-visible {
  background-color: var(--line-soft);
  color: var(--text);
  outline: none;
}
.icon-btn svg {
  width: 20px;
  height: 20px;
  display: block;
}

/* 暗色切换：太阳 / 月亮按需显示 */
.theme-toggle .icon-sun { display: none; }
.theme-toggle .icon-moon { display: block; }
[data-theme="dark"] .theme-toggle .icon-sun { display: block; }
[data-theme="dark"] .theme-toggle .icon-moon { display: none; }
@media (prefers-color-scheme: dark) {
  .theme-toggle .icon-sun { display: block; }
  .theme-toggle .icon-moon { display: none; }
  [data-theme="light"] .theme-toggle .icon-sun { display: none; }
  [data-theme="light"] .theme-toggle .icon-moon { display: block; }
}

/* ============================================================
   5. 首页 hero（开场屏）
   ============================================================ */
.hero {
  padding: 48px 0 32px 0;
}
.hero__greeting {
  font-family: "Noto Serif SC", "Songti SC", "STSong", serif;
  font-size: 19px;
  line-height: 2.0;
  color: var(--text);
  margin-bottom: 28px;
}
.hero__greeting p {
  margin-bottom: 0.8em;
}
.hero__promise {
  color: var(--text-soft);
  font-size: 16px;
  line-height: 1.85;
  margin-bottom: 32px;
}
.hero__buttons {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 16px;
}
@media (min-width: 480px) {
  .hero__buttons {
    flex-direction: row;
  }
  .hero__buttons .btn { flex: 1; }
}

/* ============================================================
   6. 按钮系统
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 12px 22px;
  border-radius: var(--radius-sm);
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-align: center;
  cursor: pointer;
  border: 1px solid transparent;
  transition: background-color 200ms ease, color 200ms ease,
              border-color 200ms ease, transform 100ms ease;
  border-bottom: none;          /* 重置 a 的下划线 */
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

/* 主按钮：暖粉橙 */
.btn--primary {
  background-color: var(--accent);
  color: #FFFFFF;
}
.btn--primary:hover,
.btn--primary:focus-visible {
  background-color: var(--accent-deep);
  color: #FFFFFF;
  border-bottom: none;
  outline: none;
}

/* 次要按钮：浅米色描边 */
.btn--ghost {
  background-color: var(--bg-card);
  color: var(--text);
  border-color: var(--line);
}
.btn--ghost:hover,
.btn--ghost:focus-visible {
  border-color: var(--text-soft);
  color: var(--text);
  border-bottom: 1px solid var(--text-soft);
  outline: none;
}

/* 小尺寸按钮（笔记区、复制按钮） */
.btn--small {
  min-height: 40px;
  padding: 8px 16px;
  font-size: 14px;
  font-weight: 500;
}

/* 复制按钮专用 */
.copy-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background-color: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 6px 12px;
  font-size: 13px;
  color: var(--text-soft);
  min-height: 32px;
  transition: all 200ms ease;
}
.copy-btn:hover {
  background-color: var(--bg-card);
  color: var(--text);
}
.copy-btn.is-copied {
  color: var(--accent);
  border-color: var(--accent);
}

/* ============================================================
   7. 章节卡片（首页 8 卡片导航）
   ============================================================ */
.toc {
  margin-top: 8px;
  padding-top: 16px;
}
.toc__title {
  font-family: "Noto Serif SC", "Songti SC", "STSong", serif;
  font-size: 18px;
  color: var(--text-soft);
  margin-bottom: 20px;
  text-align: center;
  letter-spacing: 0.05em;
}

.chapter-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}
@media (min-width: 720px) {
  .chapter-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.chapter-card {
  display: block;
  background-color: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 18px 20px;
  color: var(--text);
  text-decoration: none;
  border-bottom: 1px solid var(--line);
  box-shadow: var(--shadow);
  transition: transform 200ms ease, box-shadow 200ms ease,
              border-color 200ms ease, background-color 200ms ease;
}
.chapter-card:hover,
.chapter-card:focus-visible {
  transform: translateY(-2px);
  box-shadow: var(--shadow-strong);
  border-color: var(--accent);
  outline: none;
}

.chapter-card__index {
  display: inline-block;
  font-family: "Noto Serif SC", "Songti SC", "STSong", serif;
  font-size: 13px;
  color: var(--accent);
  letter-spacing: 0.1em;
  margin-bottom: 4px;
}
.chapter-card__title {
  font-family: "Noto Serif SC", "Songti SC", "STSong", serif;
  font-size: 19px;
  font-weight: 600;
  color: var(--text);
  margin: 2px 0 8px 0;
  line-height: 1.4;
}
.chapter-card__desc {
  font-size: 14px;
  line-height: 1.7;
  color: var(--text-soft);
  margin: 0 0 8px 0;
}
.chapter-card__meta {
  font-size: 12px;
  color: var(--text-mute);
  letter-spacing: 0.04em;
}

/* ============================================================
   8. 内容区基础组件
   ============================================================ */

/* 章节标题块（chapter 页用） */
.chapter-head {
  margin: 16px 0 28px 0;
}
.chapter-head__index {
  font-family: "Noto Serif SC", "Songti SC", "STSong", serif;
  font-size: 14px;
  color: var(--accent);
  letter-spacing: 0.15em;
  margin-bottom: 6px;
}
.chapter-head__title {
  font-size: 26px;
  margin: 0;
}

/* 引导块（章首/退出文案 等） */
.lede {
  font-size: 17px;
  line-height: 1.9;
  color: var(--text);
  background: none;
  padding: 16px 0 8px 0;
}
.lede strong {
  color: var(--text);
}

/* 引用块 */
blockquote {
  margin: 1em 0;
  padding: 4px 0 4px 18px;
  border-left: 2px solid var(--line);
  color: var(--text-soft);
  font-style: normal;
}
blockquote p { margin-bottom: 0.6em; }
blockquote p:last-child { margin-bottom: 0; }

/* 卡片块（通用） */
.card {
  background-color: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 20px 22px;
  margin: 16px 0;
  box-shadow: var(--shadow);
}
.card--soft {
  background-color: var(--bg-elev);
  box-shadow: none;
}

/* 强调段（"你不是矫情"金句一类） */
.emphasis {
  text-align: center;
  font-size: 17px;
  font-weight: 600;
  line-height: 1.9;
  color: var(--text);
  margin: 32px auto;
  padding: 16px 12px;
  max-width: 28em;
}
.emphasis p { margin-bottom: 0.4em; }

/* 过渡文案（章节末） */
.transition {
  text-align: center;
  font-size: 15px;
  color: var(--text-mute);
  line-height: 1.8;
  margin: 48px auto;
  max-width: 26em;
}

/* micro-copy（散落小话） */
.micro-copy {
  text-align: center;
  font-size: 15px;
  color: var(--text-soft);
  margin: 24px auto;
  max-width: 24em;
  line-height: 1.8;
}

/* 折叠 details */
details {
  margin: 12px 0;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background-color: var(--bg-card);
  overflow: hidden;
}
details > summary {
  list-style: none;
  cursor: pointer;
  padding: 14px 18px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 48px;
  user-select: none;
}
details > summary::-webkit-details-marker {
  display: none;
}
details > summary::after {
  content: "+";
  font-size: 22px;
  color: var(--text-mute);
  transition: transform 200ms ease;
  line-height: 1;
}
details[open] > summary::after {
  transform: rotate(45deg);
}
details > .details__body {
  padding: 0 18px 16px 18px;
  border-top: 1px solid var(--line-soft);
  padding-top: 14px;
}

/* ============================================================
   9. 可勾选清单（自查清单 B/C/D 用）
   ============================================================ */
.checklist {
  list-style: none;
  padding: 0;
  margin: 12px 0;
}
.checklist li {
  margin: 0;
  padding: 0;
}
.checklist label {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 10px;
  cursor: pointer;
  transition: background-color 200ms ease;
  min-height: 44px;
  line-height: 1.7;
}
.checklist label:hover {
  background-color: var(--bg-elev);
}
.checklist input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  width: 22px;
  height: 22px;
  border: 1.5px solid var(--line);
  border-radius: 6px;
  margin: 4px 0 0 0;
  flex-shrink: 0;
  background-color: var(--bg);
  cursor: pointer;
  position: relative;
  transition: background-color 200ms ease, border-color 200ms ease;
}
.checklist input[type="checkbox"]:hover {
  border-color: var(--accent);
}
.checklist input[type="checkbox"]:checked {
  background-color: var(--accent);
  border-color: var(--accent);
}
.checklist input[type="checkbox"]:checked::after {
  content: "";
  position: absolute;
  left: 6px;
  top: 2px;
  width: 6px;
  height: 11px;
  border: solid #FFFFFF;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}
.checklist input[type="checkbox"]:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.checklist label:has(input:checked) {
  color: var(--text-soft);          /* 勾选后文字稍淡，不删除线 */
}

/* ============================================================
   10. 红旗清单（柔和橙调，不用红色）
   ============================================================ */
.redflag {
  background-color: var(--warn-bg);
  border: 1px solid var(--warn);
  border-radius: var(--radius-md);
  padding: 18px 20px;
  margin: 18px 0;
}
.redflag__title {
  font-family: "Noto Serif SC", "Songti SC", "STSong", serif;
  font-size: 17px;
  font-weight: 600;
  color: var(--warn);
  margin: 0 0 10px 0;
}
.redflag .checklist label:hover {
  background-color: rgba(198, 108, 58, 0.06);
}
.redflag .checklist input[type="checkbox"] {
  border-color: var(--warn);
}
.redflag .checklist input[type="checkbox"]:checked {
  background-color: var(--warn);
  border-color: var(--warn);
}

/* ============================================================
   11. 第 4 章独白特殊样式
   ============================================================ */
.monologue {
  background-color: var(--bg-soft);
  border-radius: var(--radius-lg);
  padding: 32px 24px;
  margin: 24px 0;
  font-size: 18px;
  line-height: var(--lh-loose);     /* 2.0，比正文更宽松 */
  color: var(--text);
}
.monologue p {
  margin-bottom: 1.2em;
}
.monologue p:last-child {
  margin-bottom: 0;
}
.monologue strong {
  color: var(--text);
  font-weight: 700;
}
@media (min-width: 720px) {
  .monologue {
    padding: 40px 36px;
  }
}

/* ============================================================
   12. 浮动"我现在很疼"按钮
   ============================================================ */
#float-pain-btn {
  position: fixed;
  right: 18px;
  bottom: 22px;
  z-index: 100;
  background-color: var(--accent);
  color: #FFFFFF;
  border-radius: 28px;          /* 圆角矩形（不是图标按钮） */
  padding: 14px 20px;
  min-height: 56px;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.05em;
  box-shadow: 0 8px 24px rgba(196, 131, 124, 0.32);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: none;
  border-bottom: none;
  cursor: pointer;

  /* 默认隐藏，JS 控制淡入 */
  opacity: 0;
  transform: translateY(8px);
  pointer-events: none;
  transition: opacity 320ms ease, transform 320ms ease,
              background-color 200ms ease;
}
#float-pain-btn.is-visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}
#float-pain-btn:hover {
  background-color: var(--accent-deep);
  color: #FFFFFF;
  border-bottom: none;
}
/* 暗色模式下按钮颜色保持暖橙——这是温度信号，不能在暗色模式里变冷 */
[data-theme="dark"] #float-pain-btn,
@media (prefers-color-scheme: dark) {
  /* 用 CSS 变量已经处理 */
}

/* ============================================================
   13. 回到顶部按钮
   ============================================================ */
#back-top {
  position: fixed;
  left: 18px;
  bottom: 22px;
  z-index: 99;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background-color: var(--bg-card);
  color: var(--text-soft);
  border: 1px solid var(--line);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow);

  opacity: 0;
  transform: translateY(8px);
  pointer-events: none;
  transition: opacity 280ms ease, transform 280ms ease;
}
#back-top.is-visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}
#back-top:hover {
  color: var(--text);
}
#back-top svg {
  width: 18px;
  height: 18px;
}

/* ============================================================
   14. 章节内导航（chapter 页底部 prev/next）
   ============================================================ */
.chapter-nav {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  margin: 48px 0 16px 0;
  padding-top: 24px;
  border-top: 1px solid var(--line-soft);
}
@media (min-width: 480px) {
  .chapter-nav {
    grid-template-columns: 1fr 1fr;
  }
}
.chapter-nav__link {
  display: block;
  padding: 14px 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background-color: var(--bg-card);
  color: var(--text);
  text-decoration: none;
  border-bottom: 1px solid var(--line);
  transition: border-color 200ms ease, transform 200ms ease;
}
.chapter-nav__link:hover {
  border-color: var(--accent);
  transform: translateY(-1px);
}
.chapter-nav__hint {
  display: block;
  font-size: 12px;
  color: var(--text-mute);
  letter-spacing: 0.06em;
  margin-bottom: 4px;
}
.chapter-nav__title {
  display: block;
  font-family: "Noto Serif SC", "Songti SC", "STSong", serif;
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
}
.chapter-nav__link--prev .chapter-nav__hint::before { content: "← "; }
.chapter-nav__link--next { text-align: right; }
.chapter-nav__link--next .chapter-nav__hint::after { content: " →"; }
.chapter-nav__home {
  grid-column: 1 / -1;
  text-align: center;
  font-size: 14px;
  color: var(--text-soft);
  padding: 12px;
}
.chapter-nav__home a {
  color: var(--text-soft);
}
.chapter-nav__home a:hover {
  color: var(--text);
}

/* ============================================================
   15. 页脚（危机文案永久页脚）
   ============================================================ */
.site-footer {
  margin-top: 64px;
  padding: 32px 0 80px 0;        /* 给浮动按钮空间 */
  border-top: 1px solid var(--line-soft);
  font-size: var(--fz-small);
  color: var(--text-soft);
  line-height: 1.75;
}
.site-footer .container {
  max-width: var(--container);
}
.crisis-block {
  background: none;
  padding: 8px 0;
}
.crisis-block__intro {
  margin-bottom: 12px;
  color: var(--text-soft);
}
.crisis-list {
  list-style: none;
  padding: 0;
  margin: 0 0 12px 0;
}
.crisis-list li {
  margin-bottom: 6px;
  font-size: 14px;
}
.crisis-list a {
  color: var(--text);
  font-weight: 600;
  border-bottom: 1px dotted var(--line);
}
.crisis-list a:hover {
  border-bottom-color: var(--text);
}
.site-footer__small {
  font-size: 12px;
  color: var(--text-mute);
  margin-top: 18px;
  text-align: center;
}

/* ============================================================
   16. 桌面端 / 平板的细节优化
   ============================================================ */
@media (min-width: 720px) {
  :root {
    --fz-base: 16px;
    --fz-h1: 30px;
    --fz-h2: 24px;
    --fz-h3: 19px;
  }
  body {
    font-size: var(--fz-base);
  }
  main.container {
    padding-top: 32px;
    padding-bottom: 120px;
  }
  .hero {
    padding: 64px 0 40px 0;
  }
  #float-pain-btn {
    right: 32px;
    bottom: 32px;
  }
  #back-top {
    left: 32px;
    bottom: 32px;
  }
}

/* ============================================================
   17. 打印样式
   ============================================================ */
@media print {
  .site-header,
  .site-footer,
  #float-pain-btn,
  #back-top,
  .chapter-nav,
  .copy-btn {
    display: none !important;
  }
  body {
    background: #FFFFFF;
    color: #000;
    font-size: 14pt;
  }
  .container {
    max-width: 100%;
  }
  details > summary::after {
    display: none;
  }
  details {
    border: none;
  }
  details:not([open]) > .details__body {
    display: block;
  }
}

/* ============================================================
   18. 焦点可见样式（a11y）
   ============================================================ */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

/* —— 跳过链接（屏幕阅读器友好） —— */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 8px;
  background: var(--accent);
  color: #fff;
  padding: 8px 12px;
  border-radius: 6px;
  z-index: 999;
}
.skip-link:focus {
  left: 8px;
}

/* ============================================================
   19. 工具类
   ============================================================ */
.text-center { text-align: center; }
.text-soft { color: var(--text-soft); }
.text-mute { color: var(--text-mute); }
.mt-32 { margin-top: 32px; }
.mt-48 { margin-top: 48px; }
.mt-64 { margin-top: 64px; }
.mb-32 { margin-bottom: 32px; }
.divider-soft {
  border: none;
  border-top: 1px solid var(--line-soft);
  margin: 32px 0;
}

/* —— 仅供屏幕阅读器使用 —— */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ============================================================
   20. 一些 micro 装饰元素
   ============================================================ */

/* 章节内分隔的小图标（一弯月 / 一片叶等） */
.deco-mark {
  text-align: center;
  color: var(--text-mute);
  font-size: 22px;
  margin: 32px 0;
  user-select: none;
  letter-spacing: 0.6em;
}

/* 章首温柔的数字编号（替代图标） */
.chapter-num {
  display: inline-block;
  font-family: "Noto Serif SC", "Songti SC", "STSong", serif;
  font-size: 12px;
  color: var(--accent);
  letter-spacing: 0.2em;
}

/* ============================================================
   21. ch7 误区破解卡片：myth-card / myth-step 三层视觉
   ----------------------------------------------------------------
   - .myth-card：卡片间距更大，让 8 个误区呼吸开
   - .myth-step：通用段落（继承正文，留白略增）
   - .myth-old：旧说法 —— 淡色 + 左侧细线，视觉"被引用"感
   - .myth-new：新理解 —— 默认正文色（不强调，让它"成为正文"）
   - .myth-do：下次可以试试 —— 软底色圆角小卡片，强调可操作
   配色严格沿用现有令牌，不引入红色或警示色
   ============================================================ */
.myth-card {
  margin-bottom: 28px;
}
.myth-card h3 {
  color: var(--text);
  margin-bottom: 12px;
}
.myth-step {
  margin: 12px 0;
}
.myth-step.myth-old {
  color: var(--text-mute);
  border-left: 2px solid var(--line);
  padding-left: 14px;
}
.myth-step.myth-new {
  /* 默认正文色与节奏 —— 留作显式钩子，便于将来微调 */
  color: var(--text);
}
.myth-step.myth-do {
  background-color: var(--bg-elev);
  border-radius: 12px;
  padding: 14px 16px;
  margin-top: 14px;
  color: var(--text);
}
.myth-step.myth-do strong {
  color: var(--accent-deep);
}
