/* ==========================================================================
   《大理散步学》 · 在线全书与实战工作台样式表
   Editorial Design · Evidence-Based Digital Reader · Server-Ready
   ========================================================================== */

:root {
  /* 默认：明亮纸质 (Clean Paper) */
  --bg: #f6f8f7;
  --bg-sidebar: #edf2f0;
  --surface: #ffffff;
  --surface-hover: #f3f7f5;
  --surface-active: #e7f2ed;
  --border: #e0eae6;
  --border-light: #ebf2ef;
  
  --text-main: #192a30;
  --text-muted: #5e737a;
  --text-faint: #8e9fa5;
  
  --accent: #2563eb;
  --accent-hover: #1d4ed8;
  --accent-light: #eff6ff;
  --accent-border: #bfdbfe;
  
  --blue: #2d6a8a;
  --blue-light: #eaf3f8;
  --gold: #856424;
  --gold-light: #faf4e4;
  --red: #a84238;
  --red-light: #faecea;

  --sidebar-w: 320px;
  --header-h: 60px;
  --reader-max-w: 840px;
  --font-base: 16px;
  --font-sans: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Source Han Sans CN", "Segoe UI", Roboto, sans-serif;
  --font-serif: "Songti SC", "Source Han Serif SC", "Source Han Serif CN", "STSong", "SimSun", Georgia, serif;
  --font-current: var(--font-sans);
  --line-height: 1.8;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --shadow-sm: 0 1px 3px rgba(18, 38, 33, 0.05);
  --shadow-md: 0 4px 16px rgba(18, 38, 33, 0.07);
  --shadow-lg: 0 12px 36px rgba(18, 38, 33, 0.12);
}

/* 羊皮纸护眼模式 (Warm Sepia) */
[data-theme="sepia"] {
  --bg: #f4efe2;
  --bg-sidebar: #ede4d2;
  --surface: #fbf7ee;
  --surface-hover: #f3edd9;
  --surface-active: #e9dec4;
  --border: #e4dac5;
  --border-light: #ede5d5;
  --text-main: #2b2319;
  --text-muted: #695b4c;
  --text-faint: #9c8e7e;
  --accent: #785228;
  --accent-hover: #634320;
  --accent-light: #ede2cf;
  --accent-border: #c9b497;
  --blue: #3b5f75;
  --blue-light: #e4edf2;
  --gold: #825f1d;
  --gold-light: #f5edd8;
  --red: #9e4034;
  --red-light: #f7e6e3;
}

/* 暗黑夜间模式 (OLED Dark) */
[data-theme="dark"] {
  --bg: #0f1619;
  --bg-sidebar: #151d21;
  --surface: #1a2328;
  --surface-hover: #222d33;
  --surface-active: #2a373e;
  --border: #28373f;
  --border-light: #1f2b32;
  --text-main: #dce7eb;
  --text-muted: #8b9fa7;
  --text-faint: #5a6e76;
  --accent: #48a68a;
  --accent-hover: #5ec0a3;
  --accent-light: #19312b;
  --accent-border: #2c594d;
  --blue: #5ba3cc;
  --blue-light: #1a2f3b;
  --gold: #d4a953;
  --gold-light: #342a15;
  --red: #e06d62;
  --red-light: #381f1c;
}

/* 全局重置 */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: var(--font-base); scroll-behavior: smooth; }
body {
  font-family: var(--font-current);
  background-color: var(--bg);
  color: var(--text-main);
  line-height: var(--line-height);
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* 顶部阅读进度条 */
#readingProgressBar {
  position: fixed;
  top: 0;
  left: 0;
  width: 0%;
  height: 3px;
  background: linear-gradient(90deg, var(--accent), #56b297);
  z-index: 1000;
  transition: width 0.15s ease-out;
}

/* 顶栏 Header */
.reader-header {
  height: var(--header-h);
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  backdrop-filter: blur(8px);
}

.header-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  background: none;
  border: none;
  cursor: pointer;
  color: inherit;
  text-align: left;
}

.brand-logo {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  background: var(--accent);
  color: #fff;
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 15px;
}

.brand-text {
  display: flex;
  flex-direction: column;
}

.brand-title {
  font-size: 15px;
  font-weight: 750;
  color: var(--text-main);
  letter-spacing: -0.01em;
}

.brand-sub {
  font-size: 11px;
  color: var(--text-muted);
}

.header-center {
  display: flex;
  align-items: center;
  gap: 14px;
}

.reading-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--surface-hover);
  border: 1px solid var(--border);
  padding: 5px 12px;
  border-radius: 99px;
  font-size: 12px;
  color: var(--text-muted);
}

.reading-pill strong {
  color: var(--accent);
}

.header-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* 顶部与通用按钮矢量图标微架构 */
.icon-svg {
  display: inline-block;
  vertical-align: middle;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
  flex-shrink: 0;
  transition: stroke 0.15s ease, transform 0.15s ease;
}

.header-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-muted);
  padding: 5px 10px;
  border-radius: var(--radius-sm);
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
  line-height: 1;
}

.header-btn:hover {
  background: var(--surface-hover);
  color: var(--accent);
  border-color: var(--accent-border);
}

.header-btn:hover .icon-svg {
  stroke: var(--accent);
}

.header-btn .icon-svg,
.btn-pill .icon-svg {
  width: 15px;
  height: 15px;
}

.mobile-bar-icon .icon-svg {
  width: 19px;
  height: 19px;
}

.tool-icon .icon-svg {
  width: 19px;
  height: 19px;
}

.btn-icon .icon-svg {
  width: 16px;
  height: 16px;
}

/* 按钮通用 */
.btn-icon {
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-muted);
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  display: grid;
  place-items: center;
  cursor: pointer;
  font-size: 15px;
  transition: all 0.15s;
}

.btn-icon:hover {
  background: var(--surface-hover);
  color: var(--text-main);
  border-color: var(--border);
}

.btn-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-main);
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
}

.btn-pill:hover {
  background: var(--surface-hover);
  border-color: var(--accent-border);
  color: var(--accent);
}

.btn-pill.primary {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

.btn-pill.primary:hover {
  background: var(--accent-hover);
}

/* 布局 App Shell */
.app-layout {
  display: flex;
  flex: 1;
  position: relative;
}

/* 侧边栏 Sidebar */
.sidebar {
  width: var(--sidebar-w);
  background: var(--bg-sidebar);
  border-right: 1px solid var(--border);
  height: calc(100vh - var(--header-h));
  position: sticky;
  top: var(--header-h);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  z-index: 50;
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.sidebar-search-box {
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
}

.search-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.search-input-wrap input {
  width: 100%;
  padding: 8px 30px 8px 10px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 13px;
  color: var(--text-main);
  outline: none;
}

.search-input-wrap input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px var(--accent-light);
}

.search-shortcut-hint {
  position: absolute;
  right: 8px;
  font-size: 10px;
  color: var(--text-faint);
  background: var(--bg);
  padding: 2px 5px;
  border-radius: 4px;
  pointer-events: none;
}

.sidebar-content {
  flex: 1;
  overflow-y: auto;
  padding: 12px 8px;
}

/* 侧边栏折叠面板 Section */
.section-group {
  margin-bottom: 8px;
}

.section-title-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 9px 12px;
  background: transparent;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  color: var(--text-main);
  font-size: 13px;
  font-weight: 700;
  text-align: left;
  transition: background 0.15s;
}

.section-title-btn:hover {
  background: var(--surface-hover);
}

.section-title-left {
  display: flex;
  align-items: center;
  gap: 8px;
}

.section-icon {
  font-size: 14px;
}

.section-badge {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  background: var(--surface);
  padding: 2px 6px;
  border-radius: 99px;
  border: 1px solid var(--border);
}

.section-chevron {
  font-size: 10px;
  color: var(--text-faint);
  transition: transform 0.2s;
}

.section-group.collapsed .section-chevron {
  transform: rotate(-90deg);
}

.section-group.collapsed .section-items {
  display: none;
}

.section-items {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-top: 2px;
  padding-left: 6px;
}

.chapter-nav-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 7px 10px;
  border-radius: var(--radius-sm);
  background: transparent;
  border: none;
  color: var(--text-muted);
  text-align: left;
  cursor: pointer;
  font-size: 12.5px;
  line-height: 1.4;
  transition: all 0.15s;
}

.chapter-nav-item:hover {
  background: var(--surface-hover);
  color: var(--text-main);
}

.chapter-nav-item.active {
  background: var(--surface);
  color: var(--accent);
  font-weight: 700;
  border: 1px solid var(--accent-border);
  box-shadow: var(--shadow-sm);
}

.nav-item-title {
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.nav-item-badge {
  font-size: 10px;
  padding: 1px 5px;
  border-radius: 4px;
  background: var(--surface-active);
  color: var(--accent);
  margin-left: 6px;
  flex-shrink: 0;
}

.nav-item-status {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: transparent;
  margin-left: 6px;
  flex-shrink: 0;
}

.chapter-nav-item.read .nav-item-status {
  background: var(--accent);
}

/* 侧边栏底部 */
.sidebar-footer {
  padding: 12px 14px;
  border-top: 1px solid var(--border);
  background: var(--surface);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.quick-links-row {
  display: flex;
  gap: 8px;
  align-items: center;
}
.btn-link {
  background: none;
  border: none;
  padding: 4px 6px;
  font-size: 11.5px;
  color: var(--text-muted);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  border-radius: 4px;
  transition: color 0.15s ease, background 0.15s ease;
}
.btn-link:hover {
  color: var(--accent);
  background: var(--surface-hover);
}
.btn-link .icon-svg {
  width: 13px;
  height: 13px;
}

/* 阅读器主舞台 Canvas */
.reader-canvas {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 40px 24px 80px;
  background: var(--bg);
}

.reader-container {
  width: 100%;
  max-width: var(--reader-max-w);
}

/* 章节头部信息 Header Card */
.chapter-header {
  margin-bottom: 32px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border);
}

.chapter-meta-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.meta-tag {
  font-size: 12px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 6px;
  background: var(--accent-light);
  color: var(--accent);
  border: 1px solid var(--accent-border);
}

.meta-info {
  font-size: 13px;
  color: var(--text-muted);
}

.chapter-main-title {
  font-size: clamp(24px, 3.2vw, 34px);
  font-weight: 800;
  line-height: 1.25;
  color: var(--text-main);
  letter-spacing: -0.02em;
  margin-bottom: 12px;
}

.chapter-subtitle {
  font-size: 15px;
  color: var(--text-muted);
  line-height: 1.5;
}

/* 核心一句话 Hero Takeaway */
.callout.hero-takeaway {
  background: var(--accent-light);
  border: 1px solid var(--accent-border);
  border-left: 5px solid var(--accent);
  border-radius: var(--radius-md);
  padding: 18px 22px;
  margin: 24px 0;
  box-shadow: var(--shadow-sm);
}

.callout-tag {
  font-size: 12px;
  font-weight: 800;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 6px;
}

.takeaway-text {
  font-size: 17px;
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.6;
  margin: 0;
}

/* 公式 Badge */
.formula-badge {
  display: inline-block;
  background: var(--blue-light);
  color: var(--blue);
  border: 1px solid #c2dbe8;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 0.95em;
}

.callout.formula-note {
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 4px solid var(--blue);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  margin: 16px 0;
  font-size: 14px;
}

/* ==========================================================================
   顶级家长情绪表达与应景视觉卡片组件
   ========================================================================== */

/* 1. 家长去罪化与情绪容纳卡 (De-shaming Callout) */
.deshame-card {
  background: linear-gradient(135deg, rgba(244, 238, 226, 0.7), rgba(251, 247, 238, 0.9));
  border: 1px solid var(--accent-border);
  border-left: 5px solid #c4756a;
  border-radius: var(--radius-md);
  padding: 18px 22px;
  margin: 22px 0;
  box-shadow: var(--shadow-sm);
}

.deshame-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.deshame-tag {
  font-size: 11.5px;
  font-weight: 800;
  color: #c4756a;
  background: #faecea;
  padding: 2px 8px;
  border-radius: 99px;
  border: 1px solid #f2c7c2;
}

.deshame-title {
  font-size: 14px;
  font-weight: 750;
  color: var(--text-main);
}

.deshame-body {
  font-size: 13.5px;
  color: var(--text-muted);
  line-height: 1.65;
  margin: 0;
}

/* 2. 应景认知图解容器 (Visual Infographic Box) */
.infographic-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  margin: 26px 0;
  box-shadow: var(--shadow-sm);
  text-align: center;
}

.infographic-title {
  font-size: 15px;
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.infographic-subtitle {
  font-size: 12.5px;
  color: var(--text-muted);
  margin-bottom: 18px;
}

.infographic-canvas-wrap {
  width: 100%;
  max-width: 680px;
  margin: 0 auto;
}

/* 3. 对照卡片 (Parent Seen vs Reality Happened) */
.split-cards-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin: 20px 0;
}

.split-card {
  padding: 16px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  text-align: left;
}

.split-card.seen {
  background: #fdf5f3;
  border-color: #f3d4ce;
}

.split-card.reality {
  background: #f1f8f4;
  border-color: #cde4d6;
}

.split-card-tag {
  font-size: 11px;
  font-weight: 800;
  display: inline-block;
  padding: 2px 7px;
  border-radius: 4px;
  margin-bottom: 8px;
}

.split-card.seen .split-card-tag {
  background: #faecea;
  color: #a84238;
}

.split-card.reality .split-card-tag {
  background: #e6f4ec;
  color: #2e735e;
}

.split-card-text {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.5;
  margin: 0;
}

/* 4. 社交金句打卡海报卡 (Shareable Quote Poster Card) */
.quote-poster-card {
  background: #faf7f2;
  border: 1px solid #ebdccb;
  border-radius: var(--radius-lg);
  padding: 30px 24px;
  margin: 32px 0 20px;
  text-align: center;
  position: relative;
  box-shadow: var(--shadow-md);
}

.quote-poster-badge {
  font-size: 11px;
  letter-spacing: 2px;
  color: #c4756a;
  font-weight: 800;
  text-transform: uppercase;
  margin-bottom: 14px;
}

.quote-poster-quote {
  font-family: var(--font-serif);
  font-size: clamp(19px, 2.5vw, 25px);
  font-weight: 700;
  color: #2b2b2b;
  line-height: 1.5;
  margin: 0 auto 16px;
  max-width: 580px;
  position: relative;
}

.quote-poster-quote::before {
  content: "“";
  font-size: 2.2em;
  color: #d9bfb8;
  position: absolute;
  top: -18px;
  left: -20px;
  font-family: Georgia, serif;
}

.quote-poster-quote::after {
  content: "”";
  font-size: 2.2em;
  color: #d9bfb8;
  position: absolute;
  bottom: -32px;
  right: -20px;
  font-family: Georgia, serif;
}

.quote-poster-footer {
  font-size: 12px;
  color: #8c7f73;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px dashed #e6d8c8;
}

@media (max-width: 768px) {
  .split-cards-grid {
    grid-template-columns: 1fr;
  }
}

/* 页面正文 排版 Typography */
.article-body {
  font-size: 1em;
  color: var(--text-main);
  line-height: var(--line-height);
}

.article-body h1, .article-body h2, .article-body h3, .article-body h4 {
  color: var(--text-main);
  font-weight: 750;
  line-height: 1.35;
  margin-top: 1.8em;
  margin-bottom: 0.6em;
}

.article-body h1 { font-size: 1.7em; border-bottom: 1px solid var(--border); padding-bottom: 0.3em; }
.article-body h2 { font-size: 1.35em; border-bottom: 1px solid var(--border-light); padding-bottom: 0.3em; }
.article-body h3 { font-size: 1.15em; }
.article-body p { margin-bottom: 1.2em; }
.article-body hr { border: 0; height: 1px; background: var(--border); margin: 2.2em 0; }

.article-body ul, .article-body ol {
  padding-left: 1.6em;
  margin-bottom: 1.3em;
}

.article-body li {
  margin-bottom: 0.5em;
}

.article-body blockquote {
  background: var(--surface-hover);
  border-left: 4px solid var(--border);
  padding: 12px 18px;
  margin: 1.4em 0;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  color: var(--text-muted);
  font-size: 0.96em;
}

/* 表格 Table */
.article-body table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.8em 0;
  font-size: 0.92em;
  background: var(--surface);
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 1px solid var(--border);
}

.article-body th, .article-body td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  text-align: left;
}

.article-body th {
  background: var(--surface-hover);
  font-weight: 700;
  color: var(--text-main);
}

.article-body tr:last-child td {
  border-bottom: none;
}

.article-body code {
  background: var(--surface-hover);
  border: 1px solid var(--border);
  padding: 2px 6px;
  border-radius: 4px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.88em;
  color: var(--accent);
}

.article-body pre {
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 16px;
  border-radius: var(--radius-md);
  overflow-x: auto;
  margin: 1.5em 0;
}

.article-body pre code {
  background: transparent;
  border: none;
  padding: 0;
  color: inherit;
}

/* 维基跳转链接 Wiki-link */
.wiki-link {
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
  padding: 1px 4px;
  border-radius: 4px;
  background: var(--accent-light);
  border-bottom: 1px dashed var(--accent-border);
  transition: all 0.15s;
}

.wiki-link:hover {
  background: var(--accent);
  color: #fff;
  border-bottom-style: solid;
}

.wiki-link-plain {
  font-weight: 600;
  color: var(--text-main);
}

/* 章节底部导航 Footer */
.reader-footer {
  margin-top: 48px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.footer-nav-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.chapter-jump-card {
  padding: 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  text-align: left;
  cursor: pointer;
  transition: all 0.15s;
}

.chapter-jump-card:hover {
  border-color: var(--accent-border);
  background: var(--surface-hover);
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

.chapter-jump-card.next {
  text-align: right;
}

.jump-direction {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.jump-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.footer-action-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 10px;
}

/* 全书搜索弹窗 Modal */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 26, 0.6);
  backdrop-filter: blur(4px);
  z-index: 200;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 70px 16px 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
}

.modal-backdrop.active,
.modal-backdrop.show {
  opacity: 1;
  pointer-events: auto;
}

.search-modal-box {
  width: 100%;
  max-width: 680px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  max-height: 80vh;
  animation: modalSlide 0.2s ease-out;
}

@keyframes modalSlide {
  from { transform: translateY(-12px); }
  to { transform: translateY(0); }
}

.search-modal-header {
  padding: 16px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 12px;
}

.search-modal-input {
  flex: 1;
  border: none;
  outline: none;
  background: transparent;
  font-size: 16px;
  color: var(--text-main);
}

.search-modal-results {
  flex: 1;
  overflow-y: auto;
  padding: 12px 16px;
}

.search-result-item {
  padding: 12px;
  border-radius: var(--radius-sm);
  margin-bottom: 8px;
  cursor: pointer;
  background: var(--surface-hover);
  border: 1px solid var(--border);
  transition: all 0.15s;
}

.search-result-item:hover, .search-result-item.selected {
  background: var(--surface-active);
  border-color: var(--accent-border);
}

.search-result-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 4px;
}

.search-result-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-main);
}

.search-result-snippet {
  font-size: 12.5px;
  color: var(--text-muted);
  line-height: 1.5;
}

.search-result-snippet mark {
  background: #fde68a;
  color: #78350f;
  padding: 1px 3px;
  border-radius: 2px;
}

/* 现场急救台 Modal (Emergency SOP) */
.sop-modal-box {
  width: 100%;
  max-width: 860px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  max-height: 88vh;
}

.sop-modal-head {
  padding: 18px 24px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.sop-modal-body {
  padding: 24px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.scenario-chips-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.scenario-chip {
  padding: 8px 14px;
  border-radius: 99px;
  border: 1px solid var(--border);
  background: var(--surface-hover);
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
}

.scenario-chip:hover, .scenario-chip.active {
  background: var(--accent-light);
  border-color: var(--accent-border);
  color: var(--accent);
}

.sop-scenario-card {
  background: var(--surface-hover);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 18px;
}

.sop-steps-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 14px;
}

.sop-step-line {
  display: grid;
  grid-template-columns: 32px 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 10px 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}

.sop-step-badge {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: var(--accent-light);
  color: var(--accent);
  font-weight: 800;
  display: grid;
  place-items: center;
  font-size: 13px;
}

/* 偏好设置面板 Popover */
.settings-popover {
  position: absolute;
  top: calc(var(--header-h) + 8px);
  right: 16px;
  width: 280px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  padding: 16px;
  z-index: 150;
  display: none;
}

.settings-popover.active {
  display: block;
}

.setting-row {
  margin-bottom: 16px;
}

.setting-row:last-child {
  margin-bottom: 0;
}

.setting-label {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-muted);
  margin-bottom: 8px;
  display: block;
}

.theme-options {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
}

.theme-btn {
  padding: 8px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--surface-hover);
  color: var(--text-main);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  text-align: center;
}

.theme-btn.active {
  border-color: var(--accent);
  background: var(--accent-light);
  color: var(--accent);
}

.font-size-stepper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--surface-hover);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 4px;
}

.stepper-btn {
  padding: 6px 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 4px;
  cursor: pointer;
  font-weight: bold;
}

/* 消息 Toast */
.toast-msg {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--text-main);
  color: var(--bg);
  padding: 10px 20px;
  border-radius: 99px;
  font-size: 13px;
  font-weight: 600;
  box-shadow: var(--shadow-md);
  z-index: 1000;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s, transform 0.2s;
}

.toast-msg.show {
  opacity: 1;
  transform: translateX(-50%) translateY(-6px);
}

/* 响应式调整 Responsive */
@media (max-width: 992px) {
  :root {
    --sidebar-w: 280px;
  }
}

@media (max-width: 768px) {
  .sidebar {
    position: fixed;
    top: var(--header-h);
    left: 0;
    bottom: 0;
    height: calc(100vh - var(--header-h));
    transform: translateX(-100%);
    box-shadow: var(--shadow-lg);
  }

  .sidebar.mobile-open {
    transform: translateX(0);
  }

  .sidebar-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.4);
    z-index: 45;
    display: none;
  }

  .sidebar-backdrop.active {
    display: block;
  }

  .reader-canvas {
    padding: 20px 14px 60px;
  }

  .footer-nav-grid {
    grid-template-columns: 1fr;
  }

  .reading-pill {
    display: none;
  }
}

/* ==========================================================================
   家长实操反馈卡 (章节末尾嵌入)
   ========================================================================== */
.chapter-feedback-card {
  margin: 36px 0 24px;
  padding: 22px;
  background: var(--surface);
  border: 1px solid var(--accent-border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  position: relative;
  overflow: hidden;
}

.chapter-feedback-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--accent), #56b297);
}

.feedback-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}

.feedback-title {
  font-size: 16px;
  font-weight: 800;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 8px;
}

.feedback-sub {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 16px;
  line-height: 1.5;
}

.feedback-rating-group {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 14px;
}

.rating-btn {
  padding: 10px 8px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface-hover);
  color: var(--text-main);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  transition: all 0.15s;
}

.rating-btn:hover {
  background: var(--surface-active);
  border-color: var(--accent-border);
}

.rating-btn.active[data-rating="effective"] {
  background: var(--accent-light);
  border-color: var(--accent);
  color: var(--accent);
}

.rating-btn.active[data-rating="partial"] {
  background: var(--gold-light);
  border-color: var(--gold);
  color: var(--gold);
}

.rating-btn.active[data-rating="failed"] {
  background: var(--red-light);
  border-color: var(--red);
  color: var(--red);
}

.feedback-row {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-bottom: 12px;
}

.age-chips {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.age-chip {
  padding: 4px 10px;
  border-radius: 99px;
  border: 1px solid var(--border);
  background: var(--surface-hover);
  color: var(--text-muted);
  font-size: 12px;
  cursor: pointer;
}

.age-chip.active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

.feedback-textarea {
  width: 100%;
  min-height: 70px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface-hover);
  color: var(--text-main);
  font-size: 13px;
  line-height: 1.5;
  resize: vertical;
  outline: none;
  margin-bottom: 12px;
}

.feedback-textarea:focus {
  border-color: var(--accent);
  background: var(--surface);
  box-shadow: 0 0 0 2px var(--accent-light);
}

/* 移动端底部极简工作台吸底导航 (Mobile Bottom Bar) */
.mobile-bottom-bar {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 56px;
  background: var(--surface);
  border-top: 1px solid var(--border);
  z-index: 105;
  justify-content: space-around;
  align-items: center;
  padding-bottom: env(safe-area-inset-bottom);
  box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.05);
}

.bottom-tab-btn {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 10.5px;
  font-weight: 600;
  cursor: pointer;
  padding: 6px 0;
}

.bottom-tab-btn span.tab-icon {
  font-size: 16px;
}

.bottom-tab-btn.active, .bottom-tab-btn:hover {
  color: var(--accent);
}

@media (max-width: 768px) {
  .mobile-bottom-bar {
    display: flex;
  }
  .reader-canvas {
    padding-bottom: 84px !important;
  }
}

/* 反馈统计看板 Modal */
.dashboard-modal-box {
  width: 100%;
  max-width: 880px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  max-height: 85vh;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 20px;
}

.stat-card {
  padding: 14px;
  border-radius: var(--radius-sm);
  background: var(--surface-hover);
  border: 1px solid var(--border);
  text-align: center;
}

.stat-num {
  font-size: 24px;
  font-weight: 800;
  line-height: 1.2;
}

.stat-label {
  font-size: 11.5px;
  color: var(--text-muted);
  margin-top: 4px;
}

/* ==========================================================================
   图文并茂杂志级工作台系统 (Magazine & Illustrated Workstation System)
   对标原型：Hero横幅、三栏工作台、生活切片、证据卡片组、3步SOP、证据金字塔与温情便签
   ========================================================================== */

/* 1. 顶栏杂志导航标签与搜索框 */
.header-nav-tabs {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav-tab {
  background: none;
  border: none;
  font-size: 14.5px;
  font-weight: 600;
  color: var(--text-muted);
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s;
  position: relative;
}

.nav-tab:hover {
  color: var(--text-main);
  background: var(--surface-hover);
}

.nav-tab.active {
  color: var(--accent);
  font-weight: 700;
}

.nav-tab.active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 14px;
  right: 14px;
  height: 2.5px;
  background: var(--accent);
  border-radius: 2px;
}

.header-search-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--surface-hover);
  border: 1px solid var(--border);
  padding: 6px 14px;
  border-radius: 20px;
  cursor: pointer;
  transition: all 0.2s;
}

.header-search-bar:hover {
  border-color: var(--accent);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.search-icon {
  font-size: 14px;
  color: var(--text-muted);
}

.search-placeholder {
  font-size: 13px;
  color: var(--text-muted);
  white-space: nowrap;
}

.search-kbd-tag {
  font-size: 11px;
  padding: 1px 6px;
  border-radius: 4px;
  background: var(--bg);
  color: var(--text-faint);
  border: 1px solid var(--border);
}


/* ==========================================================================
   全书 3D 动态典籍独立展台 (Independent Book Dynamic Cover Stage)
   让书动态封面独立在最顶部，专属于整本书的典籍形态展示，不与任何篇章介绍混杂
   ========================================================================== */
.book-cover-stage {
  position: relative;
  width: 100%;
  max-width: 1360px;
  margin: 0 auto 18px auto;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 22px;
  padding: 24px 20px 26px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.book-cover-stage::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, transparent 0%, var(--accent) 50%, transparent 100%);
  opacity: 0.8;
}

.book-stage-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.5px;
  color: var(--text-muted);
  background: var(--bg);
  border: 1px solid var(--border);
  padding: 4px 14px;
  border-radius: 16px;
  margin-bottom: 12px;
  user-select: none;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.04);
}

.book-cover-stage .hero-foil-stage {
  perspective: 1000px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px 0 16px 0;
  width: 100%;
  min-height: 330px;
}

.book-cover-stage .book-3d {
  position: relative;
  width: 220px;
  height: 310px;
  transform-style: preserve-3d;
  transform: rotateY(-16deg) rotateX(7deg);
  box-shadow: -10px 20px 38px rgba(0, 0, 0, 0.44);
  transition: transform 0.4s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 0.4s ease;
  cursor: pointer;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.book-cover-stage .book-3d:hover,
.book-cover-stage .book-3d:active {
  transform: rotateY(-3deg) rotateX(2deg) translateY(-6px) scale(1.03);
  box-shadow: -12px 24px 44px rgba(0, 0, 0, 0.52);
}

.book-cover-stage .book-3d-cover {
  padding: 24px 20px;
  border-radius: 5px 12px 12px 5px;
}

.book-cover-stage .foil-gold-title {
  font-size: 20px;
  line-height: 1.35;
  letter-spacing: 0.5px;
  margin-top: 12px;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.45));
}

.book-cover-stage .foil-sub-text {
  font-size: 12px;
  line-height: 1.45;
  max-width: 180px;
  margin-top: 8px;
  opacity: 0.9;
}

.book-cover-stage .foil-author-tag {
  font-size: 11.5px;
  padding-top: 12px;
}

.book-cover-stage .book-3d-ribbon {
  width: 24px;
  height: 105px;
  right: 28px;
}

.book-cover-stage .book-3d-spine {
  width: 26px;
  transform: rotateY(-90deg) translateX(-13px);
}

.book-cover-stage .book-3d-pages {
  width: 26px;
  height: calc(100% - 10px);
}

/* 2. 顶部 Hero 视觉横幅 (Hero Banner) */
.hero-banner-container {
  max-width: 1360px;
  margin: 0 auto 28px auto;
  width: 100%;
}

.hero-banner-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 32px 36px;
  display: block;
  align-items: center;
  justify-content: space-between;
  gap: 36px;
  box-shadow: var(--shadow-sm);
  position: relative;
  overflow: hidden;
}

.hero-banner-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 8px;
  height: 100%;
  background: linear-gradient(180deg, var(--accent) 0%, var(--blue) 100%);
}

.hero-banner-content {
  flex: 1;
  min-width: 300px;
}

.hero-badge-tag {
  display: inline-block;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--blue);
  background: var(--blue-light);
  padding: 4px 12px;
  border-radius: 20px;
  margin-bottom: 14px;
}

.hero-title {
  font-size: 28px;
  font-weight: 850;
  color: var(--text-main);
  line-height: 1.35;
  margin-bottom: 12px;
  letter-spacing: -0.01em;
}

.hero-subtitle {
  font-size: 15.5px;
  color: var(--text-muted);
  line-height: 1.65;
  margin-bottom: 20px;
}

.hero-meta-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  font-size: 13px;
  color: var(--text-muted);
}

.hero-meta-item {
  display: flex;
  align-items: center;
  gap: 5px;
}

.hero-banner-visual {
  position: relative;
  flex-shrink: 0;
  width: 360px;
  max-width: 42%;
}

.hero-img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  border-radius: 16px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
  display: block;
}

.hero-quote-pill {
  position: absolute;
  bottom: -12px;
  right: -10px;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(8px);
  padding: 8px 16px;
  border-radius: 20px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.12);
  border: 1px solid rgba(220, 220, 220, 0.6);
  font-size: 13px;
  font-weight: 700;
  color: var(--text-main);
  white-space: nowrap;
}

[data-theme="dark"] .hero-quote-pill {
  background: rgba(26, 35, 40, 0.92);
  border-color: rgba(60, 80, 90, 0.6);
}

/* 3. 沉浸式双栏工作台网格容器（左导航 + 中正文） */
.mag-layout-container {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 32px;
  max-width: 1180px;
  margin: 0 auto;
  width: 100%;
  align-items: start;
}

/* 4. 左侧栏 (Left Rail) */
.mag-left-rail {
  display: flex;
  flex-direction: column;
  gap: 20px;
  position: sticky;
  top: 76px;
}

.mag-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 16px;
  box-shadow: var(--shadow-sm);
}

.mag-card-header {
  padding-bottom: 12px;
  margin-bottom: 12px;
  border-bottom: 1px solid var(--border-light);
}

.mag-card-title {
  font-size: 13.5px;
  font-weight: 800;
  color: var(--text-main);
  letter-spacing: 0.02em;
}

.mag-nav-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.mag-nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  color: var(--text-muted);
  text-decoration: none;
  border: none;
  background: none;
  cursor: pointer;
  width: 100%;
  text-align: left;
  transition: all 0.15s;
}

.mag-nav-item:hover {
  background: var(--surface-hover);
  color: var(--accent);
}

.mag-nav-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--border);
  flex-shrink: 0;
  transition: all 0.2s;
}

.mag-nav-item:hover .mag-nav-dot {
  background: var(--accent);
  transform: scale(1.3);
}

.mag-related-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.mag-related-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 8px;
  border-radius: var(--radius-sm);
  font-size: 12.5px;
  color: var(--text-muted);
  text-decoration: none;
  cursor: pointer;
  border: none;
  background: none;
  width: 100%;
  text-align: left;
  transition: all 0.15s;
}

.mag-related-item:hover {
  background: var(--surface-hover);
  color: var(--text-main);
}

.mag-related-badge {
  font-size: 11px;
  font-weight: 700;
  color: var(--accent);
  background: var(--accent-light);
  padding: 2px 6px;
  border-radius: 10px;
  flex-shrink: 0;
}

.mag-ai-card {
  background: linear-gradient(135deg, #f0f7f4 0%, #eaf3f8 100%);
  border: 1px solid var(--accent-border);
  cursor: pointer;
  transition: all 0.2s;
}

[data-theme="dark"] .mag-ai-card {
  background: linear-gradient(135deg, #162923 0%, #172833 100%);
  border-color: #2e594b;
}

.mag-ai-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.mag-ai-head {
  display: flex;
  align-items: center;
  gap: 12px;
}

.mag-ai-icon {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--surface);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

.mag-ai-title {
  font-size: 13.5px;
  font-weight: 800;
  color: var(--text-main);
}

.mag-ai-sub {
  font-size: 11.5px;
  color: var(--accent);
  font-weight: 600;
}

/* 5. 中间主体 (Main Flow) */
.mag-main-flow {
  min-width: 0;
}

.mag-main-flow .reader-container {
  max-width: 100%;
  padding: 0;
}

/* 生活切片场景卡片 */
.scene-slice-block {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 24px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 20px;
  margin-bottom: 28px;
  align-items: center;
  box-shadow: var(--shadow-sm);
}

.scene-slice-visual {
  width: 100%;
  height: 180px;
  border-radius: 12px;
  overflow: hidden;
}

.scene-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s;
}

.scene-slice-block:hover .scene-img {
  transform: scale(1.03);
}

.scene-quote-box {
  padding: 10px;
}

.scene-quote-tag {
  font-size: 11.5px;
  font-weight: 800;
  color: var(--blue);
  background: var(--blue-light);
  display: inline-block;
  padding: 2px 10px;
  border-radius: 99px;
  margin-bottom: 10px;
  letter-spacing: 0.5px;
}

.scene-empathy-quote {
  font-size: 16.5px;
  font-weight: 600;
  color: var(--text-main);
  line-height: 1.65;
  margin-bottom: 10px;
}

.scene-empathy-quote strong {
  color: var(--blue);
  font-weight: 800;
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: rgba(45, 106, 138, 0.35);
}

.scene-quote-author {
  font-size: 12.5px;
  color: var(--text-faint);
  display: block;
}

/* 模块大标题 */
.mag-section-block {
  margin-bottom: 34px;
}

.mag-section-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--border-light);
}

.mag-section-num {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--blue);
  color: #fff;
  font-size: 14px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.mag-section-title {
  font-size: 19px;
  font-weight: 800;
  color: var(--text-main);
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin: 0;
}

.mag-section-sub {
  font-size: 13px;
  font-weight: normal;
  color: var(--text-muted);
}

/* 1. 研究证据卡片组 (3列卡片) */
.evidence-cards-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.evidence-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 18px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: var(--shadow-sm);
  transition: all 0.2s;
}

.evidence-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: var(--accent-border);
}

.evidence-card-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.evidence-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
}

.evidence-title {
  font-size: 14px;
  font-weight: 750;
  color: var(--text-main);
}

.evidence-text {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 12px;
}

.evidence-source {
  font-size: 11px;
  color: var(--text-faint);
  background: var(--bg);
  padding: 4px 8px;
  border-radius: 4px;
  display: inline-block;
}

/* 2. 实践建议 (3步流程卡) */
.practice-steps-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.practice-step-card {
  background: #f4faf7;
  border: 1px solid #d2ebd8;
  border-radius: 14px;
  padding: 18px;
  display: flex;
  gap: 12px;
  box-shadow: var(--shadow-sm);
}

[data-theme="dark"] .practice-step-card {
  background: #142821;
  border-color: #244b3c;
}

.practice-step-num {
  font-size: 13px;
  font-weight: 800;
  color: var(--accent);
  background: #fff;
  border: 1.5px solid var(--accent);
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

[data-theme="dark"] .practice-step-num {
  background: #192a24;
}

.practice-step-content {
  flex: 1;
}

.practice-step-title {
  font-size: 14.5px;
  font-weight: 750;
  color: var(--text-main);
  margin-bottom: 8px;
}

.practice-step-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.practice-step-list li {
  font-size: 12.5px;
  color: var(--text-muted);
  line-height: 1.55;
  margin-bottom: 5px;
  position: relative;
  padding-left: 14px;
}

.practice-step-list li::before {
  content: '•';
  color: var(--accent);
  position: absolute;
  left: 2px;
  font-weight: bold;
}

/* 3. 原创工具卡片组 (3列) */
.tool-cards-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.tool-action-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 18px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: var(--shadow-sm);
  transition: all 0.2s;
}

.tool-action-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.tool-card-top {
  display: flex;
  gap: 12px;
  margin-bottom: 16px;
}

.tool-card-icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}

.tool-card-title {
  font-size: 14px;
  font-weight: 750;
  color: var(--text-main);
  margin-bottom: 4px;
}

.tool-card-desc {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.45;
}

.tool-card-btn {
  width: 100%;
  padding: 7px 12px;
  font-size: 12.5px;
  font-weight: 600;
  border-radius: 20px;
  border: 1px solid var(--border);
  background: var(--surface-hover);
  color: var(--text-main);
  cursor: pointer;
  transition: all 0.15s;
}

.tool-card-btn.primary {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

.tool-card-btn:hover {
  opacity: 0.9;
  transform: scale(1.02);
}

/* 6. 右侧栏 (Right Rail) */
/* 6. 右侧栏与底部重复跳转卡片（彻底移除） */
.mag-right-rail,
.footer-nav-grid,
.chapter-jump-card {
  display: none !important;
}

.evidence-pyramid-svg {
  margin: 6px 0;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.04));
}

.pyramid-note {
  font-size: 11px;
  color: var(--text-muted);
  line-height: 1.5;
  margin-top: 8px;
  padding: 8px 10px;
  background: var(--surface-hover);
  border-radius: var(--radius-sm);
}

.mag-quick-nav-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.quick-nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  background: none;
  border: none;
  font-size: 12.5px;
  color: var(--text-muted);
  cursor: pointer;
  width: 100%;
  text-align: left;
  transition: all 0.15s;
}

.quick-nav-item:hover {
  background: var(--surface-hover);
  color: var(--accent);
}

/* 温情手写金句便签卡 (紫色粉色微渐变) */
.quote-postit-card {
  background: linear-gradient(135deg, #f5effb 0%, #fdf2f7 100%);
  border: 1px solid #ebd9f3;
  border-radius: 16px;
  padding: 20px;
  box-shadow: 0 4px 14px rgba(180, 140, 200, 0.12);
  position: relative;
}

[data-theme="dark"] .quote-postit-card {
  background: linear-gradient(135deg, #231929 0%, #291a24 100%);
  border-color: #4b3057;
}

.postit-heart {
  font-size: 20px;
  margin-bottom: 10px;
}

.postit-text {
  font-family: var(--font-serif);
  font-size: 14.5px;
  line-height: 1.7;
  color: #4a2c5a;
  margin-bottom: 14px;
}

[data-theme="dark"] .postit-text {
  color: #e0caec;
}

.postit-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11px;
  color: #7b588e;
}

[data-theme="dark"] .postit-footer {
  color: #a48bb5;
}

.postit-copy-btn {
  background: rgba(255, 255, 255, 0.6);
  border: 1px solid rgba(160, 120, 180, 0.3);
  padding: 3px 8px;
  border-radius: 12px;
  font-size: 11px;
  cursor: pointer;
  color: #4a2c5a;
  transition: all 0.15s;
}

.postit-copy-btn:hover {
  background: #fff;
}

/* 下一集图文预告卡 */
.next-preview-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 12px;
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: all 0.2s;
}

.next-preview-card:hover {
  transform: translateY(-2px);
  border-color: var(--accent);
  box-shadow: var(--shadow-md);
}

.preview-thumb-box {
  width: 64px;
  height: 64px;
  border-radius: 8px;
  overflow: hidden;
  flex-shrink: 0;
}

.preview-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.preview-info-box {
  flex: 1;
  min-width: 0;
}

.preview-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--accent);
  display: block;
  margin-bottom: 2px;
}

.preview-title {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-main);
  line-height: 1.4;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.preview-arrow {
  font-size: 18px;
  color: var(--text-muted);
  padding-right: 4px;
}

/* 7. 网站现代底部 (Site Footer) */
.site-footer {
  background: var(--surface);
  border-top: 1px solid var(--border);
  margin-top: 60px;
  padding: 36px 24px;
}

.site-footer-inner {
  max-width: 1360px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 20px;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.footer-logo {
  width: 32px;
  height: 32px;
  background: var(--accent);
  color: #fff;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 14px;
}

.footer-name {
  font-size: 14.5px;
  font-weight: 700;
  color: var(--text-main);
}

.footer-slogan {
  font-size: 12px;
  color: var(--text-muted);
}

.footer-links {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
}

.footer-links a {
  font-size: 13px;
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.15s;
}

.footer-links a:hover {
  color: var(--accent);
}

/* 8. 响应式布局自适应 (Responsive Breakpoints) */
@media (max-width: 1220px) {
  .mag-layout-container {
    grid-template-columns: 240px minmax(0, 1fr);
    gap: 24px;
    padding: 0 16px;
  }
  .evidence-cards-grid,
  .practice-steps-grid,
  .tool-cards-grid {
    grid-template-columns: 1fr;
  }
  .hero-banner-card {
    flex-direction: column;
    align-items: flex-start;
  }
  .hero-banner-visual {
    width: 100%;
    max-width: 100%;
  }
}

@media (max-width: 960px) {
  .header-nav-tabs {
    display: none;
  }
  .mag-layout-container {
    grid-template-columns: 1fr;
  }
  .mag-left-rail {
    display: none;
  }
  .mag-right-rail {
    position: static;
    margin-top: 32px;
  }
  .scene-slice-block {
    grid-template-columns: 1fr;
  }
  .scene-slice-visual {
    height: 160px;
  }
  .hero-title {
    font-size: 22px;
  }
}

/* 学术脚注与文献引用 */
.footnote {
  margin-top: 48px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.6;
}
.footnote hr {
  display: none;
}
.footnote ol {
  padding-left: 20px;
  margin: 0;
}
.footnote li {
  margin-bottom: 8px;
}
.footnote-ref {
  font-size: 11px;
  font-weight: 700;
  color: var(--primary);
  text-decoration: none;
  padding: 0 2px;
}
.footnote-backref {
  color: var(--primary);
  text-decoration: none;
  margin-left: 4px;
}


/* ==========================================================================
   现代化专业电子书与知识库系统升级标准套件
   (标杆复盘工程标准：3D烫金实体书 / Tufte边注 / 三大认知科学组件 / 辅助坞 / 打印优化)
   ========================================================================== */

/* 1. 移动端抗压与跨端排版保护 (防破版核心规范) */
.article-body table,
.vp-doc table {
  display: block !important;
  width: 100% !important;
  max-width: 100% !important;
  overflow-x: auto !important;
  -webkit-overflow-scrolling: touch !important;
  border-collapse: collapse !important;
  margin: 20px 0 !important;
  border-radius: var(--radius-sm);
}

.article-body table th,
.article-body table td {
  padding: 10px 14px;
  border: 1px solid var(--border);
  font-size: 13.5px;
  line-height: 1.6;
}

.article-body table th {
  background: var(--surface-hover);
  font-weight: 700;
  color: var(--text-main);
}

/* 公式垂直居中基准线对齐 */
.fm-formula {
  vertical-align: middle !important;
  display: inline-flex !important;
  align-items: center !important;
  line-height: 1.2 !important;
}

/* 顶部微光阅读进度条增强 */
#readingProgressBar {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--accent) 0%, #48a68a 60%, #ffd54f 100%);
  z-index: 9999;
  transition: width 0.15s ease-out;
  box-shadow: 0 0 10px rgba(46, 115, 94, 0.6);
}

/* 2. 爱德华·塔夫特 (Edward Tufte) 边注系统 */
.tufte-sidenote {
  font-size: 12.5px;
  line-height: 1.55;
  color: var(--text-muted);
  background: var(--surface-hover);
  border-left: 3px solid var(--accent);
  padding: 8px 12px;
  margin: 16px 0;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

.tufte-sidenote-badge {
  display: inline-block;
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 4px;
}

@media (min-width: 1320px) {
  .tufte-sidenote {
    float: right;
    clear: right;
    margin-right: -260px;
    width: 230px;
    margin-top: 4px;
    margin-bottom: 12px;
    background: transparent;
    border-left: 2px solid var(--border);
    padding: 2px 0 2px 12px;
    font-size: 12px;
  }
}

/* 3. 拟物 3D 烫金实体书展台 (Hero Foil 3D Showcase) */
.hero-foil-stage {
  perspective: 1200px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 10px;
  width: 100%;
}

.book-3d {
  position: relative;
  width: 195px;
  height: 275px;
  transform-style: preserve-3d;
  transform: rotateY(-22deg) rotateX(10deg);
  transition: transform 0.6s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 0.6s ease;
  cursor: pointer;
  user-select: none;
}

.book-3d:hover {
  transform: rotateY(-6deg) rotateX(3deg) translateY(-8px) scale(1.03);
}

/* 封面表面 */
.book-3d-cover {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, #184235 0%, #0d2921 45%, #133c30 100%);
  border-radius: 4px 10px 10px 4px;
  box-shadow: -8px 12px 30px rgba(0, 0, 0, 0.42), inset 2px 0 4px rgba(255, 255, 255, 0.25);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 20px 16px;
  overflow: hidden;
  border-left: 4px solid rgba(255, 215, 0, 0.45);
  z-index: 5;
}

/* 封面聚光灯真实反光 */
.book-3d-cover::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle at 35% 30%, rgba(255, 255, 255, 0.28) 0%, rgba(255, 255, 255, 0.06) 40%, transparent 70%);
  pointer-events: none;
}

/* 烫金工艺文字 */
.foil-gold-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 10px;
  font-weight: 700;
  color: #ffd54f;
  letter-spacing: 1px;
  text-transform: uppercase;
  border: 1px solid rgba(255, 213, 79, 0.4);
  padding: 2px 6px;
  border-radius: 4px;
  width: fit-content;
}

.foil-gold-title {
  background: linear-gradient(135deg, #fff3c4 0%, #ffd54f 35%, #ffffff 50%, #ffb300 70%, #ffe082 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  font-size: 17px;
  font-weight: 900;
  line-height: 1.35;
  letter-spacing: 0.5px;
  margin-top: 10px;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.4));
}

.foil-sub-text {
  font-size: 10.5px;
  color: rgba(255, 255, 255, 0.8);
  margin-top: 6px;
  line-height: 1.4;
}

.foil-author-tag {
  font-size: 9.5px;
  color: #c9b497;
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  padding-top: 8px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* 垂挂式燕尾红丝带 */
.book-3d-ribbon {
  position: absolute;
  top: 0;
  right: 24px;
  width: 18px;
  height: 84px;
  background: linear-gradient(to bottom, #c62828 0%, #8e0000 100%);
  box-shadow: 2px 4px 8px rgba(0,0,0,0.4);
  clip-path: polygon(0 0, 100% 0, 100% 100%, 50% 84%, 0 100%);
  z-index: 10;
  transition: transform 0.3s ease;
}

.book-3d:hover .book-3d-ribbon {
  transform: translateY(4px);
}

/* 实体书立体厚度与切页层叠 */
.book-3d-spine {
  position: absolute;
  left: 0;
  top: 0;
  width: 22px;
  height: 100%;
  background: linear-gradient(to right, #091a15 0%, #163a2f 70%, #0d261e 100%);
  transform: rotateY(-90deg) translateX(-11px);
  border-radius: 4px 0 0 4px;
}

.book-3d-pages {
  position: absolute;
  top: 4px;
  right: 0;
  width: 22px;
  height: calc(100% - 8px);
  background: repeating-linear-gradient(to right, #fffdf8, #fffdf8 1px, #ede6d8 1.5px, #f4efe4 2px);
  transform: rotateY(90deg) translateX(11px) translateZ(10px);
  box-shadow: inset 2px 0 4px rgba(0,0,0,0.15);
  border-radius: 0 3px 3px 0;
}

/* 4. 动态元认知雷达测评仪 (<CognitiveRadar />) */
.radar-modal-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  max-width: 880px;
  width: 95%;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}

.radar-content-grid {
  display: grid;
  grid-template-columns: 340px 1fr;
  gap: 24px;
  padding: 20px;
  overflow-y: auto;
}

@media (max-width: 820px) {
  .radar-content-grid {
    grid-template-columns: 1fr;
  }
}

.radar-visual-panel {
  display: flex;
  flex-direction: column;
  align-items: center;
  background: var(--surface-hover);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 16px;
}

.radar-score-badge {
  font-size: 28px;
  font-weight: 900;
  color: var(--accent);
  margin-top: 8px;
  font-variant-numeric: tabular-nums;
}

.radar-type-card {
  margin-top: 12px;
  padding: 10px 14px;
  background: var(--accent-light);
  border: 1px solid var(--accent-border);
  border-radius: var(--radius-sm);
  width: 100%;
}

.radar-type-title {
  font-size: 13px;
  font-weight: 800;
  color: var(--accent);
  margin-bottom: 4px;
}

.radar-type-desc {
  font-size: 11.5px;
  color: var(--text-muted);
  line-height: 1.5;
}

.radar-questions-panel {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.radar-q-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 14px;
  transition: border-color 0.2s;
}

.radar-q-item:hover {
  border-color: var(--accent);
}

.radar-q-title {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 8px;
  display: flex;
  justify-content: space-between;
}

.radar-slider-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.radar-slider-row input[type="range"] {
  flex: 1;
  accent-color: var(--accent);
}

.radar-val-pill {
  min-width: 28px;
  text-align: center;
  font-weight: 800;
  font-size: 13px;
  color: var(--accent);
  background: var(--accent-light);
  padding: 2px 6px;
  border-radius: 4px;
}

/* 5. 可探索模型沙盒 (<InteractiveSandbox /> · Bret Victor 范式) */
.sandbox-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 22px;
  margin: 28px 0;
  box-shadow: var(--shadow-sm);
}

.sandbox-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 18px;
  flex-wrap: wrap;
  gap: 10px;
}

.sandbox-formula-badge {
  font-family: Georgia, serif;
  font-size: 15px;
  font-weight: 700;
  color: var(--accent);
  background: var(--accent-light);
  padding: 6px 14px;
  border-radius: 999px;
  border: 1px solid var(--accent-border);
}

.sandbox-controls-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
  margin-bottom: 22px;
}

.sandbox-control-item {
  background: var(--surface-hover);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 12px 14px;
}

.sandbox-control-label {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 8px;
}

.sandbox-control-item input[type="range"] {
  width: 100%;
  accent-color: var(--accent);
}

.sandbox-results-panel {
  background: linear-gradient(135deg, var(--surface-hover) 0%, var(--surface) 100%);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 18px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

@media (max-width: 680px) {
  .sandbox-results-panel {
    grid-template-columns: 1fr;
  }
}

.sandbox-metric-box {
  display: flex;
  flex-direction: column;
}

.sandbox-metric-val {
  font-size: 26px;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
  margin-bottom: 4px;
}

.sandbox-status-alert {
  grid-column: 1 / -1;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  line-height: 1.6;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 10px;
}

/* 6. 章节内嵌式间隔提取卡 (<MnemonicCard /> · Andy Matuschak 范式) */
.mnemonic-card {
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 22px;
  margin: 36px 0;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.04);
  position: relative;
  overflow: hidden;
}

.mnemonic-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 5px;
  height: 100%;
  background: linear-gradient(to bottom, var(--accent), #ffd54f);
}

.mnemonic-badge-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.mnemonic-tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-weight: 800;
  color: var(--accent);
  background: var(--accent-light);
  padding: 3px 9px;
  border-radius: 999px;
}

.mnemonic-status-pill {
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 4px;
}

.mnemonic-question {
  font-size: 15.5px;
  font-weight: 800;
  color: var(--text-main);
  line-height: 1.55;
  margin-bottom: 14px;
}

.mnemonic-hint-box {
  background: var(--surface-hover);
  border: 1px dashed var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  margin-bottom: 14px;
  font-size: 12.5px;
  color: var(--text-muted);
}

.mnemonic-answer-fold {
  display: none;
  background: var(--accent-light);
  border: 1px solid var(--accent-border);
  border-radius: var(--radius-md);
  padding: 16px;
  margin-bottom: 16px;
  font-size: 13.5px;
  line-height: 1.7;
  color: var(--text-main);
}

.mnemonic-answer-fold.show {
  display: block;
  animation: fadeIn 0.25s ease-out;
}

.mnemonic-ratings-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  padding-top: 12px;
  border-top: 1px solid var(--border-light);
}

.mnemonic-rate-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-main);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}

.mnemonic-rate-btn:hover {
  background: var(--surface-hover);
  border-color: var(--accent);
  transform: translateY(-1px);
}

.mnemonic-rate-btn.active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

/* 7. 物理世界锚定：可打印工具箱 (Printables) */
.printable-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  margin-top: 16px;
}

.printable-card-item {
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  padding: 18px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.printable-card-item:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: var(--accent);
}

.printable-card-title {
  font-size: 15px;
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.printable-card-desc {
  font-size: 12.5px;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 14px;
}

/* 可打印实物手账卡片预览版式 (物理仿真) */
.printable-sheet-preview {
  background: #ffffff;
  color: #1a1a1a;
  border: 2px dashed #999;
  border-radius: 6px;
  padding: 24px;
  margin: 16px 0;
  box-shadow: 0 4px 14px rgba(0,0,0,0.08);
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Segoe UI", sans-serif;
}

.printable-sheet-header {
  border-bottom: 2px solid #2e735e;
  padding-bottom: 10px;
  margin-bottom: 16px;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
}

.printable-sheet-title {
  font-size: 18px;
  font-weight: 900;
  color: #1b493b;
}

.printable-checkbox-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid #eee;
  font-size: 13.5px;
}

.printable-box {
  width: 16px;
  height: 16px;
  border: 1.5px solid #333;
  border-radius: 3px;
  margin-top: 2px;
  flex-shrink: 0;
}

/* 8. 右下角无感常驻辅助坞 (Floating Action Dock) */
.floating-action-dock {
  position: fixed;
  right: 18px;
  bottom: 22px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 999;
}

.dock-pill-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  color: var(--text-main);
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.2, 0.8, 0.2, 1);
  position: relative;
}

.dock-pill-btn:hover {
  transform: scale(1.1);
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
  box-shadow: 0 6px 20px rgba(46, 115, 94, 0.35);
}

.dock-tooltip {
  position: absolute;
  right: 52px;
  background: rgba(15, 23, 42, 0.9);
  color: #fff;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transform: translateX(6px);
  transition: all 0.2s ease;
}

.dock-pill-btn:hover .dock-tooltip {
  opacity: 1;
  transform: translateX(0);
}

@media (max-width: 768px) {
  .floating-action-dock {
    bottom: 74px; /* 避开移动端底部吸底栏 */
    right: 12px;
  }
  .dock-pill-btn {
    width: 38px;
    height: 38px;
    font-size: 16px;
  }
}

/* 9. 全局打印媒体优化规范 (@media print) */
@media print {
  /* 隐藏所有屏幕交互组件 */
  .reader-header,
  .sidebar,
  .sidebar-backdrop,
  .site-footer,
  .modal-backdrop:not(.printing-active-modal),
  .mobile-bottom-bar,
  .floating-action-dock,
  #readingProgressBar,
  #bv-counter,
  .header-search-bar,
  .chapter-feedback-card,
  .reader-footer,
  .mag-left-rail,
  .mag-right-rail,
  .mag-ai-card,
  .btn-icon,
  .btn-pill {
    display: none !important;
  }

  /* 行动表专属打印模式 (body.printing-sheet) */
  body.printing-sheet .app-layout {
    display: none !important;
  }
  body.printing-sheet #printablesModal {
    display: block !important;
    position: static !important;
    background: #ffffff !important;
    padding: 0 !important;
    margin: 0 !important;
  }
  body.printing-sheet #printablesModal .sop-modal-box {
    max-width: 100% !important;
    width: 100% !important;
    max-height: none !important;
    box-shadow: none !important;
    border: none !important;
    padding: 0 !important;
    margin: 0 !important;
  }
  body.printing-sheet #printablesModal .sop-modal-head,
  body.printing-sheet #printablesModal .header-nav-tabs {
    display: none !important;
  }
  body.printing-sheet #printSheetContainer {
    display: block !important;
    width: 100% !important;
  }

  body, html {
    background: #ffffff !important;
    color: #111111 !important;
    font-size: 12pt !important;
    line-height: 1.6 !important;
  }

  .app-layout {
    display: block !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  .reader-canvas {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  .mag-layout-container {
    display: block !important;
  }

  .mag-main-flow {
    width: 100% !important;
    max-width: 100% !important;
  }

  .reader-container {
    padding: 0 !important;
  }

  .hero-banner-card {
    border: none !important;
    box-shadow: none !important;
    padding: 10px 0 !important;
    border-bottom: 2pt solid #2e735e !important;
    page-break-after: avoid;
  }

  .article-body {
    font-size: 11pt !important;
  }

  .article-body h1,
  .article-body h2,
  .article-body h3 {
    page-break-after: avoid;
    color: #000000 !important;
  }

  .mnemonic-card,
  .sandbox-card,
  .printable-sheet-preview {
    page-break-inside: avoid !important;
    border: 1pt solid #444 !important;
    box-shadow: none !important;
  }

  .tufte-sidenote {
    float: none !important;
    width: 100% !important;
    margin: 10px 0 !important;
    border-left: 2pt solid #666 !important;
    background: #f8f8f8 !important;
  }
}

/* ==========================================================================
   移动端顶级沉浸阅读增强规范 (Mobile Reading Ergonomics & Touch Controls)
   ========================================================================== */

/* 桌面端隐藏移动端专属组件 */
.mobile-header-btn {
  display: none !important;
}
.sidebar-mobile-title {
  display: none;
}
.mobile-bottom-bar {
  display: none !important;
}
.mobile-subnav-container {
  display: none;
}
.bottom-sheet-backdrop {
  display: none;
}

@media (max-width: 768px) {
  /* 1. 隐藏桌面专属控件 */
  .desktop-tool-btn,
  .header-center,
  .brand-sub,
  .floating-action-dock,
  .mag-left-rail,
  .mag-right-rail {
    display: none !important;
  }

  /* 2. 顶栏极简轻量化 (Clean Mobile Topbar) */
  .reader-header,
  .app-header {
    height: 48px !important;
    padding: 0 10px !important;
    background: var(--surface) !important;
    border-bottom: 1px solid var(--border) !important;
    position: sticky !important;
    top: 0 !important;
    z-index: 100 !important;
    backdrop-filter: blur(10px) !important;
    -webkit-backdrop-filter: blur(10px) !important;
  }

  .header-left {
    gap: 8px !important;
  }

  .brand-btn {
    gap: 8px !important;
  }

  .brand-logo {
    width: 28px !important;
    height: 28px !important;
    font-size: 12px !important;
    border-radius: 7px !important;
    font-weight: 900 !important;
  }

  .brand-title {
    font-size: 14px !important;
    font-weight: 800 !important;
    color: var(--text-main) !important;
    white-space: nowrap !important;
  }

  .header-right {
    gap: 6px !important;
  }

  .mobile-header-btn {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    width: 32px !important;
    height: 32px !important;
    font-size: 14px !important;
    border-radius: 7px !important;
    background: var(--surface-hover) !important;
    border: 1px solid var(--border) !important;
    color: var(--text-main) !important;
    cursor: pointer;
  }

  .mobile-menu-btn {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    width: 32px !important;
    height: 32px !important;
    border-radius: 7px !important;
    background: transparent !important;
    border: none !important;
    color: var(--text-main) !important;
  }

  /* 3. 移动端全书目录抽屉 (Smooth Sidebar Drawer) */
  .sidebar,
  .app-sidebar {
    position: fixed !important;
    top: 0 !important;
    bottom: 0 !important;
    left: 0 !important;
    width: 84vw !important;
    max-width: 320px !important;
    height: 100vh !important;
    z-index: 250 !important;
    background: var(--bg-sidebar) !important;
    transform: translateX(-100%) !important;
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1) !important;
    box-shadow: 6px 0 28px rgba(0, 0, 0, 0.18) !important;
    display: flex !important;
    flex-direction: column !important;
  }

  .sidebar.mobile-open,
  .app-sidebar.mobile-open {
    transform: translateX(0) !important;
  }

  .sidebar-backdrop {
    position: fixed !important;
    inset: 0 !important;
    background: rgba(15, 23, 42, 0.45) !important;
    backdrop-filter: blur(3px) !important;
    -webkit-backdrop-filter: blur(3px) !important;
    z-index: 240 !important;
    display: none;
  }

  .sidebar-backdrop.active {
    display: block !important;
  }

  .sidebar-mobile-title {
    display: flex !important;
    align-items: center;
    justify-content: space-between;
    padding: 14px 14px 10px 14px;
    font-size: 14px;
    font-weight: 800;
    color: var(--text-main);
    border-bottom: 1px solid var(--border-light);
  }

  .sidebar-close-btn {
    width: 28px !important;
    height: 28px !important;
    font-size: 13px !important;
    border-radius: 6px !important;
    background: var(--surface-hover) !important;
  }

  /* 4. 主画布与正文排版 (Ergonomic Reading Canvas) */
  .reader-canvas,
  .app-main {
    padding: 10px 12px 84px 12px !important;
    width: 100% !important;
    max-width: 100% !important;
    background: var(--bg) !important;
  }

  .reader-container,
  .reading-viewport {
    width: 100% !important;
    max-width: 100% !important;
  }

  .mag-layout-container,
  .magazine-grid {
    display: block !important;
    width: 100% !important;
  }

  /* 5. 极简轻巧的移动端 Hero 横幅 (Eliminate Giant 3D Box) */
  .hero-banner-card {
    padding: 14px 12px 14px 12px !important;
    border-radius: 12px !important;
    margin-bottom: 12px !important;
    flex-direction: column !important;
    border: 1px solid var(--border) !important;
    box-shadow: var(--shadow-sm) !important;
  }

    /* 5. 独立在最顶部的全书 3D 动态典籍展台 (Mobile 大幅提振适配手机全宽) */
  .book-cover-stage {
    padding: 16px 12px 22px 12px !important;
    border-radius: 18px !important;
    margin-bottom: 14px !important;
    border: 1px solid var(--border) !important;
    box-shadow: var(--shadow-sm), 0 8px 24px rgba(0,0,0,0.03) !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    width: 100% !important;
    max-width: 100% !important;
  }

  .book-stage-badge {
    font-size: 11px !important;
    padding: 3px 12px !important;
    margin-bottom: 10px !important;
    border-radius: 16px !important;
  }

  .book-cover-stage .hero-foil-stage {
    perspective: 900px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 8px 0 16px 0 !important;
    width: 100% !important;
    min-height: 330px !important;
  }

  .book-cover-stage .book-3d {
    position: relative !important;
    width: min(220px, 64vw) !important;
    height: min(310px, 90vw) !important;
    transform-style: preserve-3d !important;
    transform: rotateY(-16deg) rotateX(7deg) !important;
    box-shadow: -10px 20px 38px rgba(0, 0, 0, 0.44) !important;
    transition: transform 0.4s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 0.4s ease !important;
    cursor: pointer !important;
    user-select: none !important;
    -webkit-tap-highlight-color: transparent !important;
  }

  .book-cover-stage .book-3d:hover,
  .book-cover-stage .book-3d:active {
    transform: rotateY(-3deg) rotateX(2deg) translateY(-6px) scale(1.03) !important;
    box-shadow: -12px 24px 44px rgba(0, 0, 0, 0.52) !important;
  }

  .book-cover-stage .book-3d-cover {
    padding: 24px 20px !important;
    border-radius: 5px 12px 12px 5px !important;
  }

  .book-cover-stage .foil-gold-title {
    font-size: 20px !important;
    line-height: 1.35 !important;
    letter-spacing: 0.5px !important;
    margin-top: 12px !important;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.45)) !important;
  }

  .book-cover-stage .foil-sub-text {
    font-size: 12px !important;
    line-height: 1.45 !important;
    max-width: 180px !important;
    margin-top: 8px !important;
    opacity: 0.9 !important;
  }

  .book-cover-stage .foil-author-tag {
    font-size: 11.5px !important;
    padding-top: 12px !important;
  }

  .book-cover-stage .book-3d-ribbon {
    width: 24px !important;
    height: 105px !important;
    right: 28px !important;
  }

  .book-cover-stage .book-3d-spine {
    width: 26px !important;
    transform: rotateY(-90deg) translateX(-13px) !important;
  }

  .book-cover-stage .book-3d-pages {
    width: 26px !important;
    height: calc(100% - 10px) !important;
  }

  /* 独立每一篇章介绍卡片 (Mobile，彻底与全书封面解耦) */
  .hero-banner-card {
    padding: 16px 14px 16px 18px !important;
    border-radius: 14px !important;
    margin-bottom: 14px !important;
    border: 1px solid var(--border) !important;
    box-shadow: var(--shadow-sm) !important;
    display: block !important;
    flex-direction: column !important;
  }

  .hero-banner-card::before {
    width: 6px !important;
  }

  .hero-badge-tag {
    font-size: 11px !important;
    padding: 2px 8px !important;
    margin-bottom: 8px !important;
    display: inline-block !important;
  }

  .hero-title {
    font-size: 20px !important;
    line-height: 1.35 !important;
    margin-bottom: 8px !important;
  }

  .hero-subtitle {
    font-size: 13px !important;
    line-height: 1.55 !important;
    margin-bottom: 12px !important;
  }

  .hero-meta-row {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 8px !important;
    font-size: 12px !important;
  }

  .hero-banner-visual {
    display: none !important;
  }

  /* 6. 移动端本章核心小节快捷横滑胶囊 (In-Chapter Swipeable Mini-TOC) */
  .mobile-subnav-container {
    display: flex !important;
    align-items: center;
    gap: 8px;
    margin: 8px 0 16px 0;
    padding: 7px 10px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 9px;
    overflow: hidden;
  }

  .mobile-subnav-tag {
    font-size: 11px;
    font-weight: 750;
    color: var(--accent);
    white-space: nowrap;
    flex-shrink: 0;
  }

  .mobile-subnav-scroll {
    display: flex;
    gap: 6px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    flex: 1;
  }

  .mobile-subnav-scroll::-webkit-scrollbar {
    display: none;
  }

  .mobile-toc-chip {
    padding: 3px 9px;
    font-size: 11px;
    font-weight: 600;
    white-space: nowrap;
    border-radius: 99px;
    background: var(--surface-hover);
    border: 1px solid var(--border);
    color: var(--text-main);
    cursor: pointer;
    flex-shrink: 0;
    -webkit-tap-highlight-color: transparent;
  }

  .mobile-toc-chip:active {
    background: var(--accent-light);
    color: var(--accent);
    border-color: var(--accent);
  }

  /* 7. 正文自然行高与字号优化 (Natural Typography) */
  .article-body,
  .article-body-wrapper {
    font-size: 16.5px !important;
    line-height: 1.82 !important;
    color: var(--text-main) !important;
    letter-spacing: 0.01em;
  }

  .article-body p {
    margin-bottom: 1.2em !important;
    text-align: justify;
    word-break: break-word;
  }

  .article-body h2 {
    font-size: 18px !important;
    font-weight: 800 !important;
    margin-top: 1.6em !important;
    margin-bottom: 0.5em !important;
    padding-bottom: 0.3em !important;
    border-bottom: 1px solid var(--border-light) !important;
  }

  .article-body h3 {
    font-size: 15.5px !important;
    font-weight: 750 !important;
    margin-top: 1.3em !important;
    margin-bottom: 0.4em !important;
  }

  .article-body blockquote {
    padding: 10px 12px !important;
    margin: 14px 0 !important;
    border-left: 3.5px solid var(--accent) !important;
    border-radius: 4px;
    background: var(--surface-hover);
    font-size: 15px !important;
    line-height: 1.65 !important;
  }

  /* 8. 公式与表格防爆宽机制 (Safe Mobile Formulas & Tables) */
  .fm-formula {
    max-width: 100% !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
    display: inline-flex !important;
    vertical-align: middle !important;
    padding: 2px 6px !important;
    margin: 0 2px !important;
    font-size: 1.05em !important;
  }

  table {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
    margin: 14px 0 !important;
    border-collapse: collapse !important;
  }

  /* 9. 移动端专属底栏 (Mobile Bottom Reading Bar) */
  .mobile-bottom-bar {
    display: flex !important;
    position: fixed !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    height: 52px !important;
    background: var(--surface) !important;
    border-top: 1px solid var(--border) !important;
    z-index: 150 !important;
    align-items: center;
    justify-content: space-around;
    padding: 0 4px env(safe-area-inset-bottom) 4px;
    box-shadow: 0 -3px 18px rgba(0, 0, 0, 0.06) !important;
    backdrop-filter: blur(12px) !important;
    -webkit-backdrop-filter: blur(12px) !important;
  }

  .mobile-bar-btn {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 4px 0;
    -webkit-tap-highlight-color: transparent;
  }

  .mobile-bar-btn:active {
    opacity: 0.65;
  }

  .mobile-bar-icon {
    font-size: 17px;
    line-height: 1.2;
  }

  .mobile-bar-label {
    font-size: 10px;
    font-weight: 600;
    margin-top: 2px;
  }

  .mobile-bar-center {
    flex: 1.3;
  }

  .mobile-bar-pill {
    font-size: 11.5px;
    font-weight: 850;
    color: #fff;
    background: var(--accent);
    padding: 1.5px 8px;
    border-radius: 99px;
    letter-spacing: 0.02em;
    box-shadow: 0 2px 6px rgba(37, 99, 235, 0.25);
  }

  .mobile-bar-brief {
    font-size: 9.5px;
    color: var(--text-muted);
    margin-top: 2px;
    max-width: 72px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  /* 10. 移动端实战工具抽屉 (Mobile Tools Bottom Sheet) */
  .bottom-sheet-backdrop {
    display: flex !important;
    position: fixed !important;
    inset: 0 !important;
    background: rgba(15, 23, 42, 0.55) !important;
    backdrop-filter: blur(5px) !important;
    -webkit-backdrop-filter: blur(5px) !important;
    z-index: 260 !important;
    align-items: flex-end !important;
    justify-content: center !important;
    padding: 0 !important;
    opacity: 0 !important;
    pointer-events: none !important;
    transition: opacity 0.22s ease !important;
  }

  .bottom-sheet-backdrop.active,
  .bottom-sheet-backdrop.show {
    opacity: 1 !important;
    pointer-events: auto !important;
  }

  .bottom-sheet-box {
    width: 100% !important;
    max-width: 600px !important;
    background: var(--surface) !important;
    border-radius: 20px 20px 0 0 !important;
    border-top: 1px solid var(--border) !important;
    box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.16) !important;
    padding: 10px 14px calc(24px + env(safe-area-inset-bottom)) 14px !important;
    max-height: 84vh !important;
    overflow-y: auto !important;
    transform: translateY(100%) !important;
    transition: transform 0.26s cubic-bezier(0.16, 1, 0.3, 1) !important;
  }

  .bottom-sheet-backdrop.active .bottom-sheet-box,
  .bottom-sheet-backdrop.show .bottom-sheet-box {
    transform: translateY(0) !important;
  }

  .bottom-sheet-handle {
    width: 36px;
    height: 4px;
    background: var(--border);
    border-radius: 99px;
    margin: 4px auto 10px auto;
  }

  .bottom-sheet-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border);
    margin-bottom: 12px;
  }

  .bottom-sheet-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }

  @media (max-width: 440px) {
    .bottom-sheet-grid {
      grid-template-columns: 1fr;
      gap: 7px;
    }
  }

  .bottom-sheet-tool-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    background: var(--surface-hover);
    border: 1px solid var(--border);
    border-radius: 11px;
    cursor: pointer;
    text-align: left;
    -webkit-tap-highlight-color: transparent;
  }

  .bottom-sheet-tool-btn:active {
    background: var(--accent-light);
    border-color: var(--accent-border);
  }

  .tool-icon {
    width: 36px;
    height: 36px;
    border-radius: 9px;
    display: grid;
    place-items: center;
    font-size: 18px;
    flex-shrink: 0;
  }

  .tool-title {
    font-size: 13px;
    font-weight: 750;
    color: var(--text-main);
  }

  .tool-sub {
    font-size: 10.5px;
    color: var(--text-muted);
    margin-top: 1px;
    line-height: 1.3;
  }

  /* 11. 弹窗在移动端自动转换为底部抽屉模式 (Bottom Sheet Modals) */
  .modal-backdrop {
    padding: 0 !important;
    align-items: flex-end !important;
  }

  .sop-modal-box,
  .radar-modal-box,
  .dashboard-modal-box,
  .search-modal-box {
    max-height: 88vh !important;
    width: 100% !important;
    border-radius: 20px 20px 0 0 !important;
    margin: 0 !important;
    border-left: none !important;
    border-right: none !important;
    border-bottom: none !important;
    animation: modalSheetSlide 0.25s cubic-bezier(0.16, 1, 0.3, 1) !important;
  }

  @keyframes modalSheetSlide {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
  }

  .sop-modal-body[style*="grid"] {
    grid-template-columns: 1fr !important;
    gap: 14px !important;
  }

  /* 12. 移动端章节反馈卡与提取卡微调 */
  .mnemonic-card,
  .chapter-feedback-card {
    padding: 16px 12px !important;
    margin: 20px 0 !important;
    border-radius: 12px !important;
  }

  .rating-btn-group {
    flex-direction: column !important;
    gap: 6px !important;
  }

  .rating-btn {
    width: 100% !important;
    justify-content: flex-start !important;
    padding: 8px 12px !important;
    font-size: 12px !important;
  }

  /* 避开移动端底栏遮挡 */
  .site-footer,
  .app-footer {
    padding-bottom: 76px !important;
  }
}

/* ==========================================================================
   移动端深度精简与自适应增强补丁 (Mobile Streamlining & Immersive Polish)
   ========================================================================== */

@media (max-width: 768px) {
  /* 1. 沉浸模式：下滑阅读时平滑收起顶栏与底栏 */
  .reader-header,
  .app-header {
    transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1) !important;
  }
  .mobile-bottom-bar {
    transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1) !important;
  }
  .mobile-nav-hidden .reader-header,
  .mobile-nav-hidden .app-header {
    transform: translateY(-100%) !important;
  }
  .mobile-nav-hidden .mobile-bottom-bar {
    transform: translateY(100%) !important;
  }

  /* 2. 彻底移除移动端右栏杂项卡片堆叠 (去除证据金字塔、黄便签、重复预告) */
  .desktop-only-rail,
  .mag-right-rail {
    display: none !important;
  }

  /* 3. 移动端顶栏精简 (无重复图标，两端对齐) */
  .reader-header .header-left {
    padding-left: 2px !important;
  }
  .brand-title {
    font-size: 14.5px !important;
  }

  /* 4. 精简正文底部反馈卡体积 (减少 70% 空间占用) */
  .chapter-feedback-card {
    padding: 12px 12px !important;
    margin: 16px 0 !important;
    border-radius: 9px !important;
    background: var(--surface-hover) !important;
    border: 1px solid var(--border) !important;
  }
  .feedback-card-header h3 {
    font-size: 13.5px !important;
    margin-bottom: 2px !important;
  }
  .feedback-card-header p {
    font-size: 11px !important;
  }
  .feedback-rating-row {
    margin-top: 6px !important;
    gap: 6px !important;
  }
  .rating-btn-group {
    display: flex !important;
    gap: 6px !important;
    width: 100% !important;
  }
  .rating-btn {
    flex: 1 !important;
    padding: 5px 4px !important;
    font-size: 11px !important;
    justify-content: center !important;
  }
  .age-pills-group {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 4px !important;
  }
  .age-pill-btn {
    padding: 2px 7px !important;
    font-size: 10.5px !important;
  }
  .feedback-textarea {
    min-height: 48px !important;
    font-size: 12px !important;
    padding: 6px !important;
    border-radius: 6px !important;
  }
  .feedback-submit-row {
    margin-top: 6px !important;
  }
  .feedback-submit-row span {
    display: none !important;
  }
  .feedback-submit-row button {
    width: 100% !important;
    padding: 7px !important;
    font-size: 11.5px !important;
  }

  /* 5. 翻页精简：底栏已有上一章，末尾仅保留“下一章全宽卡”与“标记掌握” */
  .chapter-pagination-footer {
    margin-top: 14px !important;
    padding-top: 12px !important;
    border-top: 1px dashed var(--border) !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 8px !important;
  }
  .jump-chapter-btn.prev {
    display: none !important;
  }
  .jump-chapter-btn.next {
    width: 100% !important;
    padding: 10px 14px !important;
    background: var(--surface) !important;
    border: 1.5px solid var(--accent-border) !important;
    border-radius: 9px !important;
    text-align: center !important;
  }
  .jump-chapter-btn.next .jump-sub {
    font-size: 10.5px !important;
    color: var(--accent) !important;
  }
  .jump-chapter-btn.next .jump-title {
    font-size: 13.5px !important;
    font-weight: 750 !important;
    margin-top: 2px !important;
  }
  .footer-center-action {
    width: 100% !important;
  }
  .footer-center-action button {
    width: 100% !important;
    justify-content: center !important;
    padding: 6px !important;
    font-size: 11px !important;
  }

  /* 6. 移动端安全屏宽与防横向拖拽 */
  html, body {
    overflow-x: hidden !important;
    max-width: 100vw !important;
  }
  .reader-canvas {
    max-width: 100vw !important;
    box-sizing: border-box !important;
    padding-left: max(12px, env(safe-area-inset-left)) !important;
    padding-right: max(12px, env(safe-area-inset-right)) !important;
    padding-bottom: calc(72px + env(safe-area-inset-bottom)) !important;
  }
}

/* ==========================================================================
   跨书目内容组件兼容层 (Passmode GitHub Alerts / Redbook Cards & Matrix)
   ========================================================================== */
:root {
  --vp-c-text-1: var(--text-main);
  --vp-c-text-2: var(--text-muted);
  --vp-c-text-3: var(--text-faint);
  --vp-c-brand-1: var(--accent);
  --vp-c-bg-soft: var(--surface-hover);
  --vp-c-divider: var(--border);
}

.custom-block {
  margin: 18px 0;
  padding: 14px 18px;
  border-radius: 10px;
  border: 1px solid var(--border);
  border-left: 4px solid var(--accent);
  background: var(--surface-hover);
  font-size: 14.5px;
  line-height: 1.75;
}
.custom-block p {
  margin: 6px 0;
}
.custom-block-title {
  font-weight: 800;
  font-size: 14.5px;
  color: var(--text-main);
  margin-bottom: 6px !important;
}
.custom-block.important {
  border-left-color: #d97706;
  background: rgba(245, 158, 11, 0.06);
}
.custom-block.important .custom-block-title {
  color: #b45309;
}
.custom-block.tip {
  border-left-color: #16a34a;
  background: rgba(22, 163, 74, 0.06);
}
.custom-block.tip .custom-block-title {
  color: #15803d;
}
.custom-block.warning, .custom-block.caution {
  border-left-color: #dc2626;
  background: rgba(220, 38, 38, 0.06);
}
.custom-block.warning .custom-block-title, .custom-block.caution .custom-block-title {
  color: #b91c1c;
}
.custom-block.note {
  border-left-color: var(--accent);
  background: var(--accent-light);
}
.custom-block.note .custom-block-title {
  color: var(--accent);
}
.article-body pre {
  background: #0f172a;
  color: #f8fafc;
  padding: 16px;
  border-radius: 10px;
  overflow-x: auto;
  font-size: 13.5px;
  line-height: 1.65;
  margin: 16px 0;
}
.article-body pre code {
  background: transparent !important;
  color: inherit !important;
  padding: 0 !important;
  border: none !important;
}
.article-body button.copy {
  display: none !important;
}
.article-body span.lang {
  display: none !important;
}
.advice-card{background:#fff;border:1px solid #e2e8f0;border-radius:10px;padding:22px 24px;margin:22px 0;box-shadow:0 4px 14px #00000008;transition:border-color .2s ease}.dark .advice-card{background:#1c1c1f;border-color:#2e2e33}.advice-card:hover{border-color:#cbd5e1}.advice-head{display:flex;justify-content:space-between;align-items:flex-start;gap:12px;margin-bottom:14px}.advice-title{font-family:var(--font-sans);font-size:19px;font-weight:700;color:var(--text-main);margin:0;flex:1;line-height:1.4}.evidence-tag{flex-shrink:0;font-size:11px;font-weight:700;padding:3px 10px;border-radius:4px;letter-spacing:.5px}.evidence-A{background:#dcfce7;color:#166534;border:1px solid #bbf7d0}.evidence-B{background:#fef3c7;color:#92400e;border:1px solid #fde68a}.evidence-C{background:#f1f5f9;color:#475569;border:1px solid #e2e8f0}.dark .evidence-A{background:#064e3b;color:#86efac;border-color:#047857}.dark .evidence-B{background:#451a03;color:#fde047;border-color:#78350f}.dark .evidence-C{background:#1e293b;color:#cbd5e1;border-color:#334155}.advice-body{font-size:15px;line-height:1.8;color:var(--text-main);margin-bottom:14px}.advice-meta{display:grid;grid-template-columns:1fr 1fr;gap:16px;padding-top:14px;border-top:1px dashed #e2e8f0}.dark .advice-meta{border-top-color:#334155}.meta-label{font-size:12px;color:var(--text-muted);font-weight:600;margin-bottom:4px}.meta-value{font-size:14px;font-weight:600}.meta-value.cost{color:#b45309}.meta-value.gain{color:#15803d}.dark .meta-value.cost{color:#f59e0b}.dark .meta-value.gain{color:#4ade80}.advice-source{margin-top:12px;padding-top:8px;font-size:12px;color:var(--text-muted)}.advice-source a{color:var(--accent);text-decoration:none;font-weight:600;margin-left:4px}.advice-source a:hover{text-decoration:underline}.callout-box{padding:14px 18px;border-radius:6px;margin:18px 0;font-size:14.5px;line-height:1.7}.callout-title{display:flex;align-items:center;gap:6px;font-weight:700;margin-bottom:6px}.callout-box.info{background:#f8fafc;border-left:4px solid #3b82f6;color:var(--text-main)}.callout-box.paid{background:#fef2f2;border-left:4px solid #991b1b;color:var(--text-main)}.callout-box.warn,.callout-box.danger{background:#fffbeb;border-left:4px solid #d97706;color:var(--text-main)}.callout-box.tip,.callout-box.success{background:#f0fdf4;border-left:4px solid #16a34a;color:var(--text-main)}.dark .callout-box.info{background:#0f172a;border-left-color:#60a5fa}.dark .callout-box.paid{background:#260a0d;border-left-color:#f87171}.dark .callout-box.warn{background:#241403;border-left-color:#fbbf24}.dark .callout-box.tip{background:#052e16;border-left-color:#4ade80}.vp-doc table{width:100%;border-collapse:collapse;margin:18px 0;font-size:14px;overflow-x:auto;display:block}.vp-doc th{background:#f8fafc;font-weight:700;color:var(--text-main);padding:10px 14px;border:1px solid #e2e8f0}.dark .vp-doc th{background:#1e1e22;border-color:#2e2e34}.vp-doc td{padding:10px 14px;border:1px solid #e2e8f0;line-height:1.6}.dark .vp-doc td{border-color:#2e2e34}.vp-doc tr:nth-child(2n){background-color:#fcfcfc}.dark .vp-doc tr:nth-child(2n){background-color:#17171a}@media print{.VPNav,.VPSidebar,.VPDocFooter,.VPLastUpdated,.vp-doc-aside,.changelog-link{display:none!important}.VPDoc{padding:0!important}.vp-doc{font-size:12pt;line-height:1.5;color:#000!important}.advice-card{page-break-inside:avoid;box-shadow:none!important;border:1px solid #999!important}a{text-decoration:none!important;color:#000!important}}.home-dynamic-section{max-width:1152px;margin:0 auto;padding:0 24px 40px}.VPLocalSearchBox{position:fixed;z-index:100;top:0;right:0;bottom:0;left:0;display:flex}.backdrop{position:absolute;top:0;right:0;bottom:0;left:0;background:var(--vp-backdrop-bg-color);transition:opacity .5s}.shell{position:relative;padding:12px;margin:64px auto;display:flex;flex-direction:column;gap:16px;background:var(--vp-local-search-bg);width:min(100vw - 60px,900px);height:min-content;max-height:min(100vh - 128px,900px);border-radius:6px}@media (max-width: 767px){.shell{margin:0;width:100vw;height:100vh;max-height:none;border-radius:0}}.search-bar{border:1px solid var(--border);border-radius:4px;display:flex;align-items:center;padding:0 12px;cursor:text}@media (max-width: 767px){.search-bar{padding:0 8px}}.search-bar:focus-within{border-color:var(--accent)}.local-search-icon{display:block;font-size:18px}.navigate-icon{display:block;font-size:14px}.search-icon{margin:8px}@media (max-width: 767px){.search-icon{display:none}}.search-input{padding:6px 12px;font-size:inherit;width:100%}@media (max-width: 767px){.search-input{padding:6px 4px}}.search-actions{display:flex;gap:4px}@media (any-pointer: coarse){.search-actions{gap:8px}}@media (min-width: 769px){.search-actions.before{display:none}}.search-actions button{padding:8px}.search-actions button:not([disabled]):hover,.toggle-layout-button.detailed-list{color:var(--accent)}.search-actions button.clear-button:disabled{opacity:.37}.search-keyboard-shortcuts{font-size:.8rem;opacity:75%;display:flex;flex-wrap:wrap;gap:16px;line-height:14px}.search-keyboard-shortcuts span{display:flex;align-items:center;gap:4px}@media (max-width: 767px){.search-keyboard-shortcuts{display:none}}.search-keyboard-shortcuts kbd{background:#8080801a;border-radius:4px;padding:3px 6px;min-width:24px;display:inline-block;text-align:center;vertical-align:middle;border:1px solid rgba(128,128,128,.15);box-shadow:0 2px 2px #0000001a}.results{display:flex;flex-direction:column;gap:6px;overflow-x:hidden;overflow-y:auto;overscroll-behavior:contain}.result{display:flex;align-items:center;gap:8px;border-radius:4px;transition:none;line-height:1rem;border:solid 2px var(--vp-local-search-result-border);outline:none}.result>div{margin:12px;width:100%;overflow:hidden}@media (max-width: 767px){.result>div{margin:8px}}.titles{display:flex;flex-wrap:wrap;gap:4px;position:relative;z-index:1001;padding:2px 0}.title{display:flex;align-items:center;gap:4px}.title.main{font-weight:500}.title-icon{opacity:.5;font-weight:500;color:var(--accent)}.title svg{opacity:.5}.result.selected{--vp-local-search-result-bg: var(--vp-local-search-result-selected-bg);border-color:var(--vp-local-search-result-selected-border)}.excerpt-wrapper{position:relative}.excerpt{opacity:50%;pointer-events:none;max-height:140px;overflow:hidden;position:relative;margin-top:4px}.result.selected .excerpt{opacity:1}.excerpt *{font-size:.8rem!important;line-height:130%!important}.titles mark,.excerpt mark{background-color:var(--vp-local-search-highlight-bg);color:var(--vp-local-search-highlight-text);border-radius:2px;padding:0 2px}.excerpt .vp-code-group .tabs{display:none}.excerpt .vp-code-group div[class*=language-]{border-radius:8px!important}.excerpt-gradient-bottom{position:absolute;bottom:-1px;left:0;width:100%;height:8px;background:linear-gradient(transparent,var(--vp-local-search-result-bg));z-index:1000}.excerpt-gradient-top{position:absolute;top:-1px;left:0;width:100%;height:8px;background:linear-gradient(var(--vp-local-search-result-bg),transparent);z-index:1000}.result.selected .titles,.result.selected .title-icon{color:var(--accent)!important}.no-results{font-size:.9rem;text-align:center;padding:12px}svg{flex:none}

:root, body.theme-light {
  --accent: #1f6f5c;
  --accent-hover: #165647;
  --accent-light: rgba(31, 111, 92, 0.08);
  --accent-border: rgba(31, 111, 92, 0.25);
}



/* ==========================================================================
   全站核心体验升级：主题模式 (Dark/Sepia) + 真实字号缩放 + 表格首列冻结
   ========================================================================== */

/* 1. 羊皮纸护眼模式 (Sepia Theme) */
[data-theme="sepia"],
body.theme-sepia {
  --bg: #f5efe1 !important;
  --bg-sidebar: #ebe2cf !important;
  --surface: #fbf6ec !important;
  --surface-hover: #f0e6d2 !important;
  --surface-active: #e6dac1 !important;
  --border: #e0d4be !important;
  --border-light: #eae0cb !important;
  --text-main: #2d2417 !important;
  --text-muted: #6e5e4d !important;
  --text-faint: #9c8c7a !important;
  --shadow-sm: 0 1px 3px rgba(45, 36, 23, 0.08) !important;
}

body.theme-sepia .book-cover-stage {
  background: #fbf6ec !important;
  border-color: #e0d4be !important;
}
body.theme-sepia .hero-banner-card {
  background: #fbf6ec !important;
  border-color: #e0d4be !important;
}

/* 2. 暗黑夜间模式 (Dark Theme) */
[data-theme="dark"],
body.theme-dark {
  --bg: #090d16 !important;
  --bg-sidebar: #0f172a !important;
  --surface: #1e293b !important;
  --surface-hover: #273549 !important;
  --surface-active: #334155 !important;
  --border: #334155 !important;
  --border-light: #1e293b !important;
  --text-main: #f8fafc !important;
  --text-muted: #94a3b8 !important;
  --text-faint: #64748b !important;
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.4) !important;
}

body.theme-dark .book-cover-stage {
  background: #131c2e !important;
  border-color: #334155 !important;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5) !important;
}
body.theme-dark .hero-banner-card {
  background: #131c2e !important;
  border-color: #334155 !important;
}
body.theme-dark .book-stage-badge {
  background: #090d16 !important;
  border-color: #334155 !important;
  color: #94a3b8 !important;
}
body.theme-dark .article-body table,
body.theme-dark .vp-doc table {
  background: #131c2e !important;
}
body.theme-dark .article-body table th:first-child,
body.theme-dark .article-body table td:first-child,
body.theme-dark .vp-doc table th:first-child,
body.theme-dark .vp-doc table td:first-child {
  background: #1e293b !important;
  box-shadow: 2px 0 6px rgba(0, 0, 0, 0.5) !important;
}
body.theme-dark .article-body table th,
body.theme-dark .vp-doc table th {
  background: #273549 !important;
  color: #f8fafc !important;
}

/* 3. 动态字号全局响应 (Font Size Scaling) */
.article-body {
  font-size: var(--content-font-size, 16px) !important;
  line-height: 1.85 !important;
}
.article-body p,
.article-body li,
.article-body blockquote {
  font-size: 1em !important;
  line-height: inherit !important;
}

/* 4. 衬线体/黑体切换实时响应 (Font Family Switcher) */
body.font-serif,
body.font-serif .article-body {
  font-family: var(--font-serif) !important;
}
body:not(.font-serif),
body:not(.font-serif) .article-body {
  font-family: var(--font-sans) !important;
}

/* 5. 移动端长表格首列吸顶冻结 (Sticky First Column) */
.article-body table,
.vp-doc table {
  display: block !important;
  width: 100% !important;
  max-width: 100% !important;
  overflow-x: auto !important;
  -webkit-overflow-scrolling: touch !important;
  position: relative !important;
}

.article-body table th:first-child,
.article-body table td:first-child,
.vp-doc table th:first-child,
.vp-doc table td:first-child {
  position: sticky !important;
  left: 0 !important;
  z-index: 2 !important;
  background: var(--surface) !important;
  box-shadow: 2px 0 6px rgba(0, 0, 0, 0.06) !important;
}

.article-body table th:first-child,
.vp-doc table th:first-child {
  z-index: 3 !important;
  background: var(--surface-hover) !important;
}

/* ==========================================================================
   极简非侵入式读者反馈条 (Clean Feedback Bar)
   ========================================================================== */
.clean-feedback-bar {
  margin: 32px 0 20px 0 !important;
  padding: 14px 18px !important;
  background: var(--surface) !important;
  border: 1px solid var(--border) !important;
  border-radius: var(--radius-md) !important;
  box-shadow: var(--shadow-sm) !important;
}

.clean-feedback-inner {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  flex-wrap: wrap !important;
  gap: 12px !important;
}

.clean-feedback-prompt {
  font-size: 13.5px !important;
  font-weight: 600 !important;
  color: var(--text-main) !important;
}

.clean-feedback-actions {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  flex-wrap: wrap !important;
}

.clean-fb-btn {
  display: inline-flex !important;
  align-items: center !important;
  gap: 6px !important;
  padding: 6px 14px !important;
  font-size: 12.5px !important;
  font-weight: 600 !important;
  color: var(--text-main) !important;
  background: var(--surface-hover) !important;
  border: 1px solid var(--border) !important;
  border-radius: 99px !important;
  cursor: pointer !important;
  transition: all 0.18s ease !important;
}

.clean-fb-btn:hover {
  background: var(--border-light) !important;
  border-color: var(--accent) !important;
}

.clean-fb-btn.active {
  background: var(--accent-light) !important;
  border-color: var(--accent) !important;
  color: var(--accent) !important;
}

.clean-fb-btn.text-link {
  background: transparent !important;
  border-color: transparent !important;
  color: var(--text-muted) !important;
}

.clean-fb-btn.text-link:hover {
  color: var(--accent) !important;
  text-decoration: underline !important;
}

/* 实战工具箱弹窗支持桌面端居中与移动端抽屉两用 */
.bottom-sheet-backdrop {
  display: flex !important;
  position: fixed !important;
  inset: 0 !important;
  background: rgba(15, 23, 42, 0.55) !important;
  backdrop-filter: blur(5px) !important;
  -webkit-backdrop-filter: blur(5px) !important;
  z-index: 300 !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 20px !important;
  opacity: 0 !important;
  pointer-events: none !important;
  transition: opacity 0.22s ease !important;
}

.bottom-sheet-backdrop.active,
.bottom-sheet-backdrop.show {
  opacity: 1 !important;
  pointer-events: auto !important;
}

.bottom-sheet-box {
  width: 100% !important;
  max-width: 580px !important;
  background: var(--surface) !important;
  border-radius: 18px !important;
  border: 1px solid var(--border) !important;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.22) !important;
  padding: 18px 20px 22px 20px !important;
  max-height: 85vh !important;
  overflow-y: auto !important;
  transform: scale(0.95) !important;
  transition: transform 0.22s ease !important;
}

.bottom-sheet-backdrop.active .bottom-sheet-box,
.bottom-sheet-backdrop.show .bottom-sheet-box {
  transform: scale(1) !important;
}

@media (max-width: 768px) {
  .bottom-sheet-backdrop {
    align-items: flex-end !important;
    padding: 0 !important;
  }
  .bottom-sheet-box {
    border-radius: 20px 20px 0 0 !important;
    transform: translateY(100%) !important;
    padding: 12px 14px calc(24px + env(safe-area-inset-bottom)) 14px !important;
  }
  .bottom-sheet-backdrop.active .bottom-sheet-box,
  .bottom-sheet-backdrop.show .bottom-sheet-box {
    transform: translateY(0) !important;
  }
}

/* 移除篇章元数据栏后的紧凑精炼排版 */
.hero-subtitle {
  margin-bottom: 0 !important;
}
.hero-banner-card {
  padding-bottom: 24px !important;
}
@media (max-width: 768px) {
  .hero-banner-card {
    padding: 14px 16px 16px 16px !important;
  }
}

/* ==========================================================================
   小节分段沉浸式阅读器样式 (紧凑流畅无冗余空行版)
   ========================================================================== */
.hero-banner-container {
  margin: 0 auto 12px auto !important;
}
@media (max-width: 768px) {
  .hero-banner-container {
    margin: 0 auto 8px auto !important;
  }
}

.section-reader-container {
  margin-top: 0 !important;
  width: 100%;
}

.section-tabs-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 99px;
  padding: 6px 12px;
  box-shadow: var(--shadow-sm);
  margin-bottom: 12px;
  position: sticky;
  top: 56px;
  z-index: 20;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.section-tabs-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13.5px;
  font-weight: 700;
  color: var(--accent);
  white-space: nowrap;
  padding-left: 4px;
  padding-right: 10px;
  border-right: 1px solid var(--border);
}

.section-tabs-scroll {
  display: flex;
  align-items: center;
  gap: 8px;
  overflow-x: auto;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding: 2px 0;
}
.section-tabs-scroll::-webkit-scrollbar {
  display: none;
}

.section-tab-btn {
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
  padding: 6px 14px;
  font-size: 13px;
  font-weight: 600;
  border-radius: 99px;
  border: 1px solid var(--border);
  background: var(--surface-hover);
  color: var(--text-main);
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  flex-shrink: 0;
  -webkit-tap-highlight-color: transparent;
}

.section-tab-btn:hover {
  background: var(--border-light);
  border-color: var(--accent);
  color: var(--accent);
}

.section-tab-btn.active {
  background: var(--accent) !important;
  border-color: var(--accent) !important;
  color: #ffffff !important;
  box-shadow: 0 4px 12px rgba(29, 78, 216, 0.25) !important;
}

.section-content-viewport {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 20px 24px;
  box-shadow: var(--shadow-sm);
  min-height: auto;
  transition: opacity 0.15s ease;
}

.section-pane-head {
  padding-bottom: 8px;
  margin-bottom: 14px;
  border-bottom: 1px solid var(--border);
}

.section-pane-badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  color: var(--accent);
  background: var(--accent-light);
  padding: 2px 9px;
  border-radius: 99px;
  margin-bottom: 6px;
}

.section-pane-title {
  font-size: 19px !important;
  font-weight: 800 !important;
  color: var(--text-main) !important;
  margin: 0 !important;
  line-height: 1.35 !important;
}

.section-pane-body {
  font-size: var(--content-font-size, 16px);
  line-height: 1.8;
  color: var(--text-main);
}
.section-pane-body > :first-child {
  margin-top: 0 !important;
}
.section-pane-body > :last-child {
  margin-bottom: 0 !important;
}
.section-pane-body hr {
  margin: 12px 0 !important;
  opacity: 0.35;
}

.section-subpager {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 12px;
  margin-bottom: 14px;
}

.section-subpager-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 9px 20px;
  font-size: 14px;
  font-weight: 600;
  border-radius: 99px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-main);
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: var(--shadow-sm);
  white-space: nowrap;
  user-select: none;
}

.section-subpager-btn:hover {
  background: var(--surface-hover);
  border-color: var(--accent);
  color: var(--accent);
}

.section-subpager-btn.next {
  margin-left: auto;
  background: var(--accent-light);
  border-color: var(--accent);
  color: var(--accent);
}
.section-subpager-btn.next:hover {
  background: var(--accent);
  color: #ffffff;
}

.section-subpager-btn.finish {
  background: #f0fdf4 !important;
  border-color: #22c55e !important;
  color: #16a34a !important;
}
.section-subpager-btn.finish:hover {
  background: #22c55e !important;
  color: #ffffff !important;
}

/* 紧凑化反馈条间距 */
.clean-feedback-bar {
  margin: 10px 0 16px 0 !important;
  padding: 12px 16px !important;
}

@media (max-width: 768px) {
  .section-tabs-bar {
    border-radius: 12px;
    padding: 5px 8px;
    top: 48px;
    margin-bottom: 8px;
  }
  .section-tabs-label {
    font-size: 12px;
    padding-right: 6px;
  }
  .section-tab-btn {
    padding: 5px 12px;
    font-size: 12px;
  }
  .section-content-viewport {
    padding: 14px 14px;
    border-radius: 12px;
  }
  .section-pane-title {
    font-size: 16.5px !important;
  }
  .section-subpager {
    margin-top: 10px;
    margin-bottom: 10px;
  }
  .section-subpager-btn {
    padding: 8px 16px;
    font-size: 13px;
    white-space: nowrap;
  }
  .clean-feedback-bar {
    margin: 8px 0 12px 0 !important;
    padding: 10px 12px !important;
  }
}
