/* ======================================================
   3D 书本翻页系统 · 核心样式
   ====================================================== */

:root {
  --page-w: 620px;
  --page-h: min(860px, 90vh);
  --cover-color:  #0d3d2a;
  --cover-spine:  #081f16;
  --paper-front:  #f5f0e8;
  --paper-back:   #ede8d6;
  --paper-shadow: rgba(0,0,0,0.35);
  --ink-dark:     #1a1a2e;
  --ink-mid:      #2d4a3e;
  --green-b:      #22c55e;
  --green-l:      #4ade80;
  --teal-b:       #14b8a6;
  --fold-ease:    cubic-bezier(0.645, 0.045, 0.355, 1.000);
}

/* ── 全屏舞台 ── */
#book-stage {
  position: fixed;
  inset: 0;
  background: radial-gradient(ellipse at 50% 30%,#1a3a28 0%,#0a1510 60%,#060d09 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  overflow: hidden;
  perspective: 2400px;
  perspective-origin: 50% 48%;
}

/* ── 书桌纹理背景 ── */
#book-stage::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle at 20% 80%, rgba(34,197,94,.06) 0%, transparent 40%),
    radial-gradient(circle at 80% 20%, rgba(20,184,166,.05) 0%, transparent 35%);
  pointer-events: none;
}

/* 底部浮动引导文字 */
#scroll-hint {
  position: absolute;
  bottom: 36px;
  left: 50%;
  transform: translateX(-50%);
  color: rgba(134,239,172,.55);
  font-size: 14px;
  font-family: 'Noto Sans SC', sans-serif;
  display: flex;
  align-items: center;
  gap: 10px;
  letter-spacing: .5px;
  animation: hint-blink 2.4s ease-in-out infinite;
  pointer-events: none;
  white-space: nowrap;
}
#scroll-hint .hint-wheel { display: none; } /* 已用 fa 图标替代 */
@keyframes hint-blink {
  0%,100%{opacity:.7}
  50%{opacity:.35}
}

/* 页码指示器 */
#page-indicator {
  position: absolute;
  bottom: 36px;
  right: 48px;
  color: rgba(134,239,172,.5);
  font-size: 13px;
  font-family: 'JetBrains Mono', monospace;
  letter-spacing: .5px;
  pointer-events: none;
}

/* 进度条（顶部） */
#book-progress {
  position: absolute;
  top: 0; left: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--green-b), var(--teal-b));
  width: 0;
  transition: width .4s ease;
  z-index: 10;
}

/* ── 书本容器 ── */
#book {
  position: relative;
  width: calc(var(--page-w) * 2);
  height: var(--page-h);
  transform-style: preserve-3d;
  transform: rotateX(6deg);
  transition: transform 1.2s cubic-bezier(0.23,1,0.32,1), width 0.6s cubic-bezier(0.23,1,0.32,1);
}

/* 合上状态：只显示右半（单页宽），居中就是单页居中 */
#book:not(.opened) {
  width: var(--page-w);
}
/* 合上状态下所有页从左边开始（全宽填满单页） */
#book:not(.opened) .book-page {
  left: 0;
  width: 100%;
}
/* 合上状态下书脊隐藏 */
#book:not(.opened) #book-spine {
  display: none;
}

/* 打开后双页宽，整体居中即双页居中 */
#book.opened {
  transform: rotateX(3deg);
  width: calc(var(--page-w) * 2);
}

/* ── 书脊（居中，作为左右页分界） ── */
#book-spine {
  position: absolute;
  left: calc(50% - 14px);
  top: 0;
  width: 28px;
  height: 100%;
  background: linear-gradient(to right, #030c07, #0d3d2a 40%, #0d3d2a 60%, #030c07);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}
#book-spine-text {
  color: rgba(134,239,172,.6);
  font-size: 11px;
  writing-mode: vertical-rl;
  text-orientation: mixed;
  letter-spacing: 3px;
  font-family: 'Noto Sans SC', sans-serif;
  font-weight: 600;
}

/* ── 通用页面基础 ── */
.book-page {
  position: absolute;
  top: 0;
  /* 所有页初始叠在右半区（书脊右侧） */
  left: 50%;
  width: 50%;
  height: 100%;
  transform-style: preserve-3d;
  transform-origin: left center;
  transform: rotateY(0deg);
  transition: transform .85s var(--fold-ease), box-shadow .85s ease;
  will-change: transform;
  cursor: pointer;
}

/* 已翻过的页（朝背面折叠） */
.book-page.flipped {
  transform: rotateY(-180deg);
}

/* 页面正面 */
.page-front,
.page-back {
  position: absolute;
  inset: 0;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  overflow: hidden;
}
.page-front {
  border-radius: 2px 6px 6px 2px;
}

/* 背面旋转180°，翻过去后出现在左侧 */
.page-back {
  transform: rotateY(180deg);
  border-radius: 6px 2px 2px 6px;
}

/* 翻页时正面的折叠阴影 */
.book-page .fold-shadow {
  position: absolute;
  inset: 0;
  background: linear-gradient(to left, rgba(0,0,0,.55) 0%, transparent 60%);
  opacity: 0;
  transition: opacity .85s ease;
  pointer-events: none;
  z-index: 5;
}
.book-page.flipped .fold-shadow { opacity: 1; }

/* ── 封面页 ── */
#page-cover .page-front {
  background: linear-gradient(145deg, #0f4d34 0%, #07291c 50%, #041910 100%);
}

.cover-texture {
  position: absolute;
  inset: 0;
  background-image:
    repeating-linear-gradient(0deg, transparent, transparent 39px, rgba(255,255,255,.025) 40px),
    repeating-linear-gradient(90deg, transparent, transparent 39px, rgba(255,255,255,.015) 40px);
}

.cover-border {
  position: absolute;
  inset: 16px;
  border: 1px solid rgba(134,239,172,.2);
  border-radius: 2px;
  pointer-events: none;
}
.cover-border::before {
  content: '';
  position: absolute;
  inset: 6px;
  border: 1px solid rgba(134,239,172,.1);
  border-radius: 1px;
}

.cover-content {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 48px 40px;
  text-align: center;
}

.cover-emblem {
  width: 80px; height: 80px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(34,197,94,.25), rgba(34,197,94,.05));
  border: 2px solid rgba(34,197,94,.5);
  display: flex; align-items: center; justify-content: center;
  font-size: 36px; color: var(--green-b);
  margin-bottom: 32px;
  box-shadow: 0 0 30px rgba(34,197,94,.25);
  animation: emblem-glow 3s ease-in-out infinite;
}
@keyframes emblem-glow {
  0%,100%{box-shadow:0 0 20px rgba(34,197,94,.2)}
  50%{box-shadow:0 0 45px rgba(34,197,94,.45)}
}

.cover-subtitle-tag {
  font-size: 11px;
  letter-spacing: 3px;
  color: rgba(134,239,172,.7);
  text-transform: uppercase;
  font-family: 'Noto Sans SC', sans-serif;
  font-weight: 600;
  margin-bottom: 20px;
  border: 1px solid rgba(134,239,172,.25);
  padding: 5px 16px;
  border-radius: 20px;
}

.cover-title {
  font-family: 'Noto Sans SC', sans-serif;
  font-weight: 900;
  font-size: 30px;
  line-height: 1.35;
  color: #f0faf4;
  margin-bottom: 12px;
}
.cover-title span {
  display: block;
  background: linear-gradient(135deg, var(--green-b), var(--teal-b));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-size: 22px;
}

.cover-divider {
  width: 60px; height: 2px;
  background: linear-gradient(90deg, transparent, var(--green-b), transparent);
  margin: 20px auto;
}

.cover-meta {
  font-size: 13px;
  color: rgba(200,230,210,.6);
  font-family: 'Noto Sans SC', sans-serif;
  line-height: 2;
}
.cover-meta strong { color: rgba(134,239,172,.85); }

.cover-open-hint {
  margin-top: 32px;
  font-size: 13px;
  color: rgba(134,239,172,.55);
  font-family: 'Noto Sans SC', sans-serif;
  display: flex; align-items: center; gap: 8px;
  animation: hint-blink 2.4s ease-in-out infinite;
}

/* 封面背面（灰色衬页） */
#page-cover .page-back {
  background: linear-gradient(160deg, #f5f0e8, #ede8d6);
}
.endpaper {
  position: absolute; inset: 0;
  background:
    repeating-linear-gradient(90deg,rgba(0,0,0,.025) 0,rgba(0,0,0,.025) 1px,transparent 1px,transparent 24px),
    repeating-linear-gradient(0deg,rgba(0,0,0,.025) 0,rgba(0,0,0,.025) 1px,transparent 1px,transparent 24px);
  display: flex; align-items: center; justify-content: center;
}
.endpaper-text {
  font-size: 11px;
  color: rgba(40,60,40,.3);
  letter-spacing: 4px;
  text-transform: uppercase;
  font-family: 'Noto Sans SC', sans-serif;
}

/* ── 内页通用（纸张） ── */
.inner-front {
  background: var(--paper-front);
  font-family: 'Noto Sans SC', sans-serif;
}
.inner-back {
  background: var(--paper-back);
  font-family: 'Noto Sans SC', sans-serif;
}

/* 纸边阴影（装订侧） */
.inner-front::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0; width: 28px;
  background: linear-gradient(to right, rgba(0,0,0,.12), transparent);
  z-index: 1;
  pointer-events: none;
}
.inner-back::before {
  content: '';
  position: absolute;
  right: 0; top: 0; bottom: 0; width: 28px;
  background: linear-gradient(to left, rgba(0,0,0,.12), transparent);
  z-index: 1;
  pointer-events: none;
}

/* 页边线 */
.page-rule {
  position: absolute;
  top: 52px; left: 48px; right: 24px; bottom: 24px;
  border-top: 2px solid rgba(34,197,94,.2);
  pointer-events: none;
}
/* 背面页边线（左右镜像：书脊在右侧） */
.inner-back .page-rule {
  left: 24px; right: 48px;
}

/* 内页内容区 —— 鼠标滚轮在此区域内原生滚动 */
.page-inner-content {
  position: absolute;
  top: 56px; left: 48px; right: 24px; bottom: 40px;
  overflow-y: auto;
  overflow-x: hidden;
  font-size: 13px;
  color: var(--ink-dark);
  line-height: 1.85;
  /* 全局换行兜底：防止任何长单词/代码撑破容器 */
  word-break: break-word;
  overflow-wrap: break-word;
  /* 允许接收指针/滚轮事件 */
  pointer-events: auto;
  /* 自定义滚动条 */
  scrollbar-width: thin;
  scrollbar-color: rgba(34,197,94,.35) transparent;
}
.page-inner-content::-webkit-scrollbar {
  width: 4px;
}
.page-inner-content::-webkit-scrollbar-track {
  background: transparent;
}
.page-inner-content::-webkit-scrollbar-thumb {
  background: rgba(34,197,94,.3);
  border-radius: 2px;
}
.page-inner-content::-webkit-scrollbar-thumb:hover {
  background: rgba(34,197,94,.55);
}
/* 背面内容区（镜像：书脊在右） */
.inner-back .page-inner-content {
  left: 24px; right: 48px;
}

/* 页码 */
.page-number {
  position: absolute;
  bottom: 12px;
  right: 24px;
  font-size: 12px;
  color: rgba(40,60,40,.4);
  font-family: 'JetBrains Mono', monospace;
}
.inner-back .page-number { right: auto; left: 24px; }

/* ── 页面内内容排版（复用dark-theme模块并适配亮色纸张） ── */
.page-inner-content h2 {
  font-size: 21px;
  font-weight: 900;
  color: #0d2d1c;
  margin-bottom: 6px;
  line-height: 1.3;
}
.page-inner-content .page-chapter-label {
  font-size: 11px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--green-b);
  font-weight: 700;
  margin-bottom: 10px;
  display: flex; align-items: center; gap: 6px;
}
.page-inner-content .page-chapter-label::before {
  content: '';
  display: inline-block;
  width: 24px; height: 2px;
  background: var(--green-b);
  vertical-align: middle;
}
.page-inner-content .page-divider {
  width: 100%; height: 1px;
  background: linear-gradient(90deg, var(--green-b), transparent);
  margin: 12px 0 18px;
  opacity: .4;
}

.page-inner-content p {
  font-size: 13.5px;
  color: #1e3828;
  line-height: 1.9;
  margin-bottom: 12px;
}
.page-inner-content p strong { color: #0d2d1c; }

.page-inner-content .highlight-box {
  background: rgba(34,197,94,.07);
  border-left: 3px solid var(--green-b);
  border-radius: 0 6px 6px 0;
  padding: 11px 14px;
  margin: 14px 0;
  font-size: 13px;
  color: #1a3e28;
  line-height: 1.75;
}

/* 政策时间轴（亮色版） */
.light-timeline { display: flex; flex-direction: column; gap: 0; }
.light-tl-item {
  display: flex; gap: 14px;
  padding: 10px 0;
  border-bottom: 1px dashed rgba(34,197,94,.2);
}
.light-tl-item:last-child { border-bottom: none; }
.light-tl-year {
  font-size: 13px; font-weight: 800;
  font-family: 'JetBrains Mono', monospace;
  color: var(--green-b);
  min-width: 44px; padding-top: 2px;
}
.light-tl-content strong {
  font-size: 13px; font-weight: 700;
  color: #0d2d1c; display: block; margin-bottom: 2px;
}
.light-tl-content p {
  font-size: 12.5px; color: #3d6050; margin: 0; line-height: 1.7;
}

/* 国情数据（亮色版） */
.light-stat-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 10px;
  margin: 12px 0;
}
.light-stat-card {
  background: rgba(34,197,94,.06);
  border: 1px solid rgba(34,197,94,.2);
  border-radius: 8px;
  padding: 12px 14px; text-align: center;
}
.light-stat-card .lsc-num {
  font-size: 20px; font-weight: 900;
  color: #0d6e3b; line-height: 1;
  margin-bottom: 4px;
}
.light-stat-card .lsc-label {
  font-size: 11px; color: #2d5a3e;
  font-weight: 700; letter-spacing: .5px; margin-bottom: 4px;
}
.light-stat-card .lsc-desc {
  font-size: 11.5px; color: #3d6050; line-height: 1.6;
}

/* 架构图（亮色版） */
.light-arch { display: flex; flex-direction: column; gap: 6px; }
.light-arch-layer {
  border-radius: 6px; padding: 8px 14px;
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
}
.light-arch-layer.ls { background: rgba(20,184,166,.1); border: 1px solid rgba(20,184,166,.3); }
.light-arch-layer.ld { background: rgba(34,197,94,.08); border: 1px solid rgba(34,197,94,.25); }
.light-arch-layer.lm { background: rgba(99,102,241,.08); border: 1px solid rgba(99,102,241,.2); }
.light-arch-layer.lr { background: rgba(245,158,11,.08); border: 1px solid rgba(245,158,11,.2); }
.light-arch-label {
  font-size: 11px; font-weight: 700; letter-spacing: .5px;
  padding: 2px 8px; border-radius: 4px; white-space: nowrap;
}
.ls .light-arch-label { background: rgba(20,184,166,.15); color: #0e9285; }
.ld .light-arch-label { background: rgba(34,197,94,.15); color: #0a8040; }
.lm .light-arch-label { background: rgba(99,102,241,.15); color: #4f46e5; }
.lr .light-arch-label { background: rgba(245,158,11,.15); color: #b45309; }
.light-arch-items { display: flex; gap: 8px; flex-wrap: wrap; }
.light-arch-items span {
  font-size: 12px; color: #1e3828;
  background: rgba(0,0,0,.04); padding: 3px 9px; border-radius: 4px;
  display: flex; align-items: center; gap: 5px;
}
.light-arch-arrow { text-align: center; color: rgba(34,197,94,.5); font-size: 14px; }

/* 任务卡片（亮色版） */
.light-task-header {
  display: flex; align-items: center; gap: 14px; margin-bottom: 14px;
}
.light-task-num {
  font-size: 42px; font-weight: 900;
  font-family: 'JetBrains Mono', monospace;
  background: linear-gradient(135deg, var(--green-b), var(--teal-b));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1; min-width: 56px;
}
.light-task-title { flex: 1; }
.light-task-ds {
  font-size: 11px; font-weight: 700; letter-spacing: .5px;
  background: rgba(34,197,94,.1); border: 1px solid rgba(34,197,94,.35);
  color: #0a7040; padding: 3px 10px; border-radius: 6px; margin-bottom: 5px;
  display: inline-block;
}
.light-task-title h3 {
  font-size: 18px; font-weight: 800; color: #0d2d1c; line-height: 1.3; margin: 0;
}
.light-task-icon {
  font-size: 30px; color: rgba(34,197,94,.25); flex-shrink: 0;
}

.light-section-title {
  font-size: 12px; font-weight: 700; letter-spacing: .5px;
  color: #0a7040; text-transform: uppercase; margin: 14px 0 7px;
  display: flex; align-items: center; gap: 6px;
}
.light-section-title i { font-size: 11px; }

/* 要求列表 */
.light-req-list {
  list-style: none; padding: 0; margin: 0;
  display: flex; flex-direction: column; gap: 8px;
}
.light-req-list li {
  /* block 布局：文字正常流动，不拆成左右两列 */
  display: block;
  padding-left: 16px;
  position: relative;
  font-size: 12px; color: #1e3828;
  line-height: 1.8;
  word-break: break-word;     /* 仅在确实溢出时才断词，不拆开普通英文单词 */
  overflow-wrap: break-word;
}
.light-req-list li::before {
  content: '▸';
  color: var(--green-b);
  position: absolute;
  left: 0; top: 0;
}
.light-req-list li code {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  background: rgba(34,197,94,.12); color: #0a6030;
  padding: 1px 4px; border-radius: 3px;
  /* inline 行内元素，随文本流动，不单独成块 */
  display: inline;
  word-break: break-word;
  overflow-wrap: break-word;
}
.light-req-list li strong { color: #0d2d1c; }

/* 步骤条 */
.light-steps { display: flex; flex-direction: column; gap: 8px; }
.light-step {
  display: flex; gap: 10px; align-items: flex-start;
  background: rgba(34,197,94,.04); border: 1px solid rgba(34,197,94,.15);
  border-radius: 6px; padding: 9px 12px;
}
.light-step-n {
  font-size: 11px; font-weight: 700; color: var(--green-b);
  background: rgba(34,197,94,.1); padding: 2px 8px; border-radius: 4px;
  white-space: nowrap; font-family: 'JetBrains Mono', monospace;
}
.light-step-c strong { font-size: 12.5px; color: #0d2d1c; display: block; margin-bottom: 2px; }
.light-step-c p { font-size: 12px; color: #3d6050; margin: 0; line-height: 1.65; }
.light-step-c p code {
  font-family: 'JetBrains Mono', monospace; font-size: 11px;
  background: rgba(34,197,94,.1); color: #0a6030; padding: 1px 4px; border-radius: 3px;
  display: inline;
  word-break: break-word;
  overflow-wrap: break-word;
}

/* 性能表格（亮色版） */
.light-perf-table {
  width: 100%; border-collapse: collapse; font-size: 12.5px; margin: 10px 0;
  border: 1px solid rgba(34,197,94,.2); border-radius: 6px; overflow: hidden;
}
.light-perf-table thead { background: rgba(34,197,94,.06); }
.light-perf-table th {
  padding: 8px 12px; text-align: left; font-weight: 700; font-size: 11.5px;
  color: #0a7040; text-transform: uppercase; letter-spacing: .5px;
  border-bottom: 1px solid rgba(34,197,94,.2);
}
.light-perf-table td { padding: 8px 12px; color: #1e3828; border-bottom: 1px solid rgba(0,0,0,.06); }
.light-perf-table tbody tr:last-child td { border-bottom: none; }
.light-perf-table code {
  font-family: 'JetBrains Mono', monospace; font-size: 11px;
  background: rgba(34,197,94,.1); color: #0a6030;
  padding: 1px 6px; border-radius: 3px; font-weight: 700;
}

/* 代码块（亮色版） */
.light-code-block {
  background: #1a2e22; border-radius: 8px; overflow: hidden;
  margin: 12px 0; border: 1px solid rgba(34,197,94,.2);
}
.light-code-header {
  display: flex; justify-content: space-between; align-items: center;
  padding: 7px 14px; background: rgba(34,197,94,.08);
  border-bottom: 1px solid rgba(34,197,94,.15);
}
.light-code-header .lch-lang { font-size: 11px; font-weight: 700; color: var(--green-b); font-family: monospace; }
.light-code-header .lch-file { font-size: 11px; color: rgba(134,239,172,.5); font-family: monospace; }
.light-code-block pre {
  padding: 14px 16px; font-size: 11.5px;
  font-family: 'JetBrains Mono', monospace;
  line-height: 1.75; overflow-x: auto; color: #b8e4c8; margin: 0;
}
.lc-kw  { color: #c792ea; }
.lc-cls { color: #82aaff; }
.lc-mth { color: #82b1ff; }
.lc-cmt { color: #546e7a; font-style: italic; }

/* 课时分隔标题 */
.light-session-divider {
  display: flex; align-items: center; gap: 10px;
  margin: 8px 0 10px;
}
.light-session-divider::before,
.light-session-divider::after {
  content: ''; flex: 1; height: 1px; background: #d1fae5;
}
.lsd-badge {
  display: inline-flex; align-items: center; gap: 6px;
  background: #dcfce7; color: #15803d;
  border: 1px solid #86efac;
  border-radius: 20px; padding: 3px 12px;
  font-size: 11.5px; font-weight: 700; white-space: nowrap;
}
.lsd-badge-new {
  background: #eff6ff; color: #1d4ed8;
  border-color: #93c5fd;
}
.lsd-badge i { font-size: 10px; }

/* 第一课时成果回顾三格 */
.light-review-grid {
  display: grid; grid-template-columns: repeat(3,1fr); gap: 8px;
  margin-bottom: 4px;
}
.light-review-card {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  background: #f0fdf4; border: 1px solid #bbf7d0;
  border-radius: 8px; padding: 10px 8px; text-align: center;
}
.lrc-num {
  width: 26px; height: 26px; border-radius: 50%;
  background: #16a34a; color: #fff;
  font-size: 13px; font-weight: 800;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.lrc-text {
  font-size: 11.5px; color: #1e3828; line-height: 1.6;
}

/* 课前任务卡片 */
.light-pretask-box {
  background: linear-gradient(135deg, rgba(234,179,8,.06) 0%, rgba(16,185,129,.06) 100%);
  border: 1.5px solid rgba(234,179,8,.3);
  border-radius: 9px;
  padding: 12px 14px;
  margin: 8px 0 12px;
}
.lpt-prompt {
  display: flex; align-items: center; gap: 8px;
  font-size: 12.5px; font-weight: 700; color: #7c5e00;
  margin-bottom: 10px;
}
.lpt-prompt i { color: #d97706; font-size: 13px; }
.lpt-items { display: flex; flex-direction: column; gap: 7px; margin-bottom: 10px; }
.lpt-item {
  display: flex; align-items: flex-start; gap: 8px;
  font-size: 12px; color: #1e3828; line-height: 1.65;
}
.lpt-tag {
  flex-shrink: 0;
  background: #d97706; color: #fff;
  font-size: 10.5px; font-weight: 700;
  border-radius: 4px; padding: 1px 7px;
  margin-top: 2px; letter-spacing: .5px;
}
.lpt-tip {
  display: flex; align-items: flex-start; gap: 7px;
  background: rgba(234,179,8,.08); border-radius: 6px;
  padding: 8px 10px;
  font-size: 11.5px; color: #5a4500; line-height: 1.7;
  font-style: italic;
}
.lpt-tip i { color: #d97706; flex-shrink: 0; margin-top: 2px; }

/* 课前任务：图上文下垂直布局 */
.lpt-layout {
  display: flex; flex-direction: column; gap: 10px;
  margin-bottom: 10px;
}
.lpt-graph-wrap {
  display: flex; flex-direction: column; align-items: center; gap: 4px;
}
.lpt-graph-label {
  font-size: 10px; color: #6b7280; font-weight: 600; letter-spacing: .4px;
}
.lpt-svg {
  width: 100%; height: auto;
  border-radius: 7px;
  filter: drop-shadow(0 1px 4px rgba(0,0,0,.08));
}
.lpt-layout .lpt-items {
  margin-bottom: 0;
}

/* 思考提示（亮色版） */
.light-tips { display: flex; flex-direction: column; gap: 7px; }
.light-tip {
  display: flex; gap: 9px; align-items: flex-start;
  background: rgba(248,113,113,.05); border: 1px solid rgba(248,113,113,.15);
  border-radius: 6px; padding: 9px 12px;
  font-size: 12.5px; color: #2e1a1a; line-height: 1.7;
}
.light-tip i { color: #ef4444; flex-shrink: 0; margin-top: 2px; }

/* 选型对比（亮色版） */
.light-why-grid {
  display: grid; grid-template-columns: repeat(3,1fr); gap: 8px; margin: 10px 0;
}
.light-why-card {
  border-radius: 7px; padding: 11px 12px;
  border: 1px solid rgba(0,0,0,.1);
}
.light-why-card.good { background: rgba(34,197,94,.07); border-color: rgba(34,197,94,.25); }
.light-why-card.bad  { background: rgba(239,68,68,.04);  border-color: rgba(239,68,68,.15);  }
.light-why-card .lwc-label {
  font-size: 12px; font-weight: 700; margin-bottom: 7px;
}
.good .lwc-label { color: #0a7040; }
.bad  .lwc-label { color: #dc2626; }
.light-why-card .lwc-pts { display: flex; flex-direction: column; gap: 4px; }
.light-why-card .lwc-pts span { font-size: 11.5px; color: #1e3828; line-height: 1.5; }

/* 总结页格子 */
.light-summary-grid {
  display: grid; grid-template-columns: repeat(4,1fr); gap: 10px; margin: 16px 0;
}
.light-summary-card {
  background: rgba(34,197,94,.05);
  border: 1px solid rgba(34,197,94,.2);
  border-radius: 8px; padding: 14px 10px; text-align: center;
  position: relative; overflow: hidden;
}
.light-summary-card::after {
  content: ''; position: absolute; bottom: 0; left: 0; right: 0; height: 3px;
  background: var(--c, var(--green-b));
}
.light-summary-card .lsc-icon { font-size: 22px; color: var(--c, var(--green-b)); margin-bottom: 8px; }
.light-summary-card .lsc-ds   { font-size: 13px; font-weight: 800; color: #0d2d1c; margin-bottom: 4px; }
.light-summary-card .lsc-task { font-size: 11px; color: #3d6050; margin-bottom: 5px; }
.light-summary-card .lsc-key  { font-size: 10.5px; color: #5a8068; font-family: 'JetBrains Mono',monospace; }

/* 尾页样式 */
.final-page-content {
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  height: 100%; text-align: center; padding: 40px;
}
.final-page-content .fp-emblem {
  font-size: 48px; color: rgba(34,197,94,.4); margin-bottom: 24px;
}
.final-page-content h2 { font-size: 22px; font-weight: 900; color: #0d2d1c; margin-bottom: 16px; }
.final-page-content p  { font-size: 14px; color: #3d6050; max-width: 400px; line-height: 1.9; margin-bottom: 12px; }
.final-page-content p strong { color: #0d2d1c; }
.fp-tags { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 20px; }
.fp-tags span {
  background: rgba(34,197,94,.1); border: 1px solid rgba(34,197,94,.3);
  color: #0a7040; padding: 4px 12px; border-radius: 20px; font-size: 12px; font-weight: 600;
}

/* ── 导航按钮 ── */
#nav-prev, #nav-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px; height: 44px;
  border-radius: 50%;
  border: 1px solid rgba(134,239,172,.3);
  background: rgba(10,26,18,.7);
  backdrop-filter: blur(8px);
  color: rgba(134,239,172,.7);
  font-size: 16px;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: all .3s;
  z-index: 20;
  opacity: 0; pointer-events: none;
}
#nav-prev { left: 28px; }
#nav-next { right: 28px; }
#nav-prev:hover, #nav-next:hover {
  background: rgba(34,197,94,.2);
  border-color: rgba(134,239,172,.6);
  color: #86efac;
}
.nav-visible { opacity: 1 !important; pointer-events: auto !important; }

/* ── 关闭按钮（翻回封面） ── */
#btn-close {
  position: absolute; top: 24px; right: 24px; z-index: 30;
  background: rgba(10,26,18,.75); backdrop-filter: blur(8px);
  border: 1px solid rgba(134,239,172,.25);
  color: rgba(134,239,172,.6); font-size: 13px; font-weight: 600;
  padding: 7px 16px; border-radius: 20px; cursor: pointer;
  display: flex; align-items: center; gap: 7px;
  font-family: 'Noto Sans SC', sans-serif;
  transition: all .25s;
  opacity: 0; pointer-events: none;
}
#btn-close:hover { background: rgba(34,197,94,.15); color: #86efac; border-color: rgba(134,239,172,.5); }
.btn-visible { opacity: 1 !important; pointer-events: auto !important; }

/* ── 书本阴影（底部） ── */
#book-shadow {
  position: absolute;
  top: calc(50% + var(--page-h) / 2 - 10px);
  left: 50%;
  transform: translateX(-50%);
  width: calc(var(--page-w) * 1.8);
  height: 32px;
  background: radial-gradient(ellipse, rgba(0,0,0,.6) 0%, transparent 70%);
  pointer-events: none;
  filter: blur(10px);
  transition: width .85s ease, opacity .6s ease;
}

/* ── 遮罩过渡 ── */
#page-turn-overlay {
  position: absolute;
  inset: 0;
  background: rgba(7,18,12,.95);
  z-index: 50;
  pointer-events: none;
  opacity: 0;
  transition: opacity .4s ease;
}
#page-turn-overlay.show { opacity: 1; }

/* ── 翻页光泽（折叠亮边） ── */
.page-gloss {
  position: absolute;
  top: 0; right: 0;
  width: 30px; height: 100%;
  background: linear-gradient(to left, rgba(255,255,255,.18) 0%, transparent 100%);
  pointer-events: none;
  z-index: 3;
  opacity: 0;
  transition: opacity .3s;
}
.book-page.flipping .page-gloss { opacity: 1; }

/* ── 响应式 ── */
@media (max-width: 1340px) {
  :root { --page-w: min(44vw, 560px); --page-h: min(860px, 90vh); }
}
@media (max-width: 800px) {
  :root { --page-w: 88vw; --page-h: 85vh; }
  .light-summary-grid { grid-template-columns: repeat(2,1fr); }
  .light-why-grid { grid-template-columns: 1fr; }
  /* 小屏单页模式 */
  #book, #book:not(.opened), #book.opened { width: 100% !important; }
  .book-page { left: 0 !important; width: 100% !important; }
  #book-spine { display: none; }
}
