/* =========================================================
   一五计划 · 优先发展重工业  —  共享样式
   设计语言：Apple Keynote × 故宫文创
   ========================================================= */

/* ---------- 设计令牌（Design Tokens） ---------- */
:root {
  /* 配色 —— 克制的东方色板 */
  --gugong-red:   #A93226;   /* 故宫红 */
  --gugong-red-2: #8B2C2C;   /* 深红 */
  --paper:        #F5F1E8;   /* 宣纸米 */
  --paper-2:      #EFE9DA;   /* 略深宣纸 */
  --ink:          #1A1A1A;   /* 墨黑 */
  --ink-soft:     #3A3632;   /* 软墨 */
  --gold:         #C9A961;   /* 烫金 */
  --gold-soft:    #D8BE84;

  --muted:        #9B948A;   /* 淡灰 */
  --line:         rgba(26,26,26,.12);

  /* 字体 */
  --serif:  "Noto Serif SC", "Source Han Serif SC", "Songti SC", serif;
  --sans:   "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  --num:    "Playfair Display", "Noto Serif SC", serif;

  /* 8px 基准网格间距 */
  --s1: 8px;  --s2: 16px;  --s3: 24px;  --s4: 32px;
  --s5: 48px; --s6: 64px;  --s8: 96px;  --s10: 128px;

  /* 动效 */
  --ease: cubic-bezier(0.4, 0.0, 0.2, 1);
  --dur:  720ms;
}

/* ---------- 基础重置 ---------- */
* { margin: 0; padding: 0; box-sizing: border-box; }

html, body {
  height: 100%;
  font-family: var(--sans);
  color: var(--ink);
  background: var(--ink);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

::selection { background: var(--gold); color: var(--ink); }

/* 微妙噪点纹理（纯 CSS，叠加在浅色面上） */
.grain::after {
  content: "";
  position: absolute; inset: 0;
  pointer-events: none;
  opacity: .035;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  mix-blend-mode: multiply;
}

/* =========================================================
   课件（index.html）—— 全屏翻页
   ========================================================= */
.deck {
  position: fixed; inset: 0;
  overflow: hidden;
}

.slide {
  position: absolute; inset: 0;
  display: flex; align-items: safe center; justify-content: center;
  padding: clamp(28px, 5vh, 96px) clamp(24px, 5vw, 88px);
  overflow-y: auto; overflow-x: hidden;
  opacity: 0;
  visibility: hidden;
  transform: scale(1.06) translateY(30px);
  filter: blur(8px);
  transition: opacity var(--dur) var(--ease),
              transform var(--dur) var(--ease),
              filter var(--dur) var(--ease),
              visibility 0s linear var(--dur);
}
.slide.active {
  opacity: 1;
  visibility: visible;
  transform: scale(1) translateY(0);
  filter: blur(0);
  transition: opacity var(--dur) var(--ease),
              transform var(--dur) var(--ease),
              filter var(--dur) var(--ease),
              visibility 0s;
  z-index: 2;
}
.slide.prev { transform: scale(0.94) translateY(-30px); }

/* 浅色 / 深色幻灯片底 */
.slide--dark  { background: var(--ink);   color: var(--paper); }
.slide--paper { background: var(--paper);  color: var(--ink); }
.slide--red   { background: var(--gugong-red); color: var(--paper); }

.slide__inner { width: 100%; max-width: 1100px; }

/* 逐元素入场：关键帧动画，保证首屏与翻页都会重新播放 */
@keyframes rise {
  0%   { opacity: 0; transform: translateY(34px) scale(.98); filter: blur(8px); }
  60%  { filter: blur(0); }
  100% { opacity: 1; transform: translateY(0) scale(1); filter: blur(0); }
}
.reveal { opacity: 0; }
.slide.active .reveal {
  animation: rise .95s var(--ease) both;
}
/* 入场节奏 —— 默认按出现顺序错落 */
.slide.active .reveal:nth-child(1) { animation-delay: .12s; }
.slide.active .reveal:nth-child(2) { animation-delay: .26s; }
.slide.active .reveal:nth-child(3) { animation-delay: .40s; }
.slide.active .reveal:nth-child(4) { animation-delay: .54s; }
/* 显式节奏覆盖（绑定 .reveal 以胜过 nth-child 默认值） */
.slide.active .reveal.d1 { animation-delay: .18s; }
.slide.active .reveal.d2 { animation-delay: .38s; }
.slide.active .reveal.d3 { animation-delay: .58s; }
.slide.active .reveal.d4 { animation-delay: .80s; }
.slide.active .reveal.d5 { animation-delay: 1.02s; }

/* ---------- 文字层次 ---------- */
.eyebrow {
  font-family: var(--sans);
  font-size: 14px; letter-spacing: .35em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 400;
}
.kicker {
  font-family: var(--sans);
  font-size: 15px; letter-spacing: .25em;
  color: var(--gold);
}
.display {
  font-family: var(--serif);
  font-weight: 900;
  letter-spacing: .06em;
  line-height: 1.05;
}
.num { font-family: var(--num); font-weight: 700; font-variant-numeric: lining-nums; }

.text-gold  { color: var(--gold); }
.text-red   { color: var(--gugong-red); }
.text-muted { color: var(--muted); }

/* ---------- Slide 1 封面 ---------- */
.cover { text-align: center; position: relative; }
.cover .eyebrow { margin-bottom: clamp(18px, 3.5vh, 48px); }
.cover__title {
  position: relative;
  font-size: clamp(56px, min(15vw, 20vh), 200px);
  letter-spacing: .12em;
  color: var(--gold);
  filter: drop-shadow(0 2px 40px rgba(201,169,97,.28));
}
@keyframes charIn {
  0%   { opacity: 0; transform: translateY(60px) rotateX(60deg) scale(.8); filter: blur(10px); }
  100% { opacity: 1; transform: translateY(0) rotateX(0) scale(1); filter: blur(0); }
}
@keyframes shimmer { 0%{background-position:180% 0} 100%{background-position:-80% 0} }
.cover__title .char {
  display: inline-block;
  opacity: 0;
  transform-origin: bottom center;
  /* 每个字独立烫金渐变，错位播放形成扫光波纹 */
  background: linear-gradient(100deg, #B8954A 0%, var(--gold) 35%, #fff7e0 50%, var(--gold) 65%, #B8954A 100%);
  background-size: 280% 100%;
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
}
.slide.active .cover__title .char {
  animation:
    charIn .9s var(--ease) both,
    shimmer 4.5s var(--ease) infinite;
  animation-delay: calc(.35s + var(--ci, 0) * .13s),
                   calc(2s + var(--ci, 0) * .18s);
}
.cover__sub {
  font-family: var(--serif);
  font-size: clamp(20px, 3vw, 34px);
  color: var(--paper);
  margin-top: clamp(18px, 3.5vh, 48px);
  letter-spacing: .14em;
}
.cover__meta {
  position: absolute; right: 0; bottom: clamp(-56px, -5vh, -40px);
  font-size: 13px; letter-spacing: .2em; color: var(--muted);
}
/* 篆刻印章：落款盖印 */
@keyframes stamp {
  0%   { opacity: 0; transform: scale(2.4) rotate(-12deg); }
  70%  { opacity: 1; transform: scale(.92) rotate(-6deg); }
  100% { opacity: .96; transform: scale(1) rotate(-6deg); }
}
.seal {
  position: absolute; left: 50%; bottom: clamp(-104px, -9vh, -76px); transform: translateX(-50%);
  width: 64px; height: 64px; border: 3px solid var(--gugong-red); border-radius: 8px;
  display: grid; place-items: center; color: var(--gugong-red);
  font-family: var(--serif); font-weight: 900; font-size: 26px; line-height: 1;
  letter-spacing: 2px; padding: 6px; opacity: 0;
  box-shadow: 0 0 0 1px rgba(169,50,38,.35) inset;
}
.slide.active .seal { animation: stamp .7s var(--ease) both; animation-delay: 2.6s; }

/* ---------- Slide 2 情境引入 ---------- */
.quote-big {
  font-family: var(--serif);
  font-size: clamp(34px, 6vw, 80px);
  font-weight: 700;
  line-height: 1.4;
  letter-spacing: .04em;
  text-align: center;
}
.quote-sign {
  text-align: right; margin-top: var(--s5);
  font-size: clamp(16px, 2vw, 22px);
  color: var(--gold);
  letter-spacing: .15em;
}
.quote-tail {
  text-align: center; margin-top: var(--s10);
  font-size: clamp(15px, 1.8vw, 20px);
  color: var(--muted); letter-spacing: .3em;
}

/* ---------- Slide 3 数据冲击 ---------- */
.section-title {
  font-family: var(--serif);
  font-size: clamp(30px, 5vw, 60px);
  font-weight: 900; letter-spacing: .1em;
  margin-bottom: clamp(24px, 4vh, 64px);
}
.data-grid { display: grid; gap: clamp(18px, 3.4vh, 48px); }
.bar-row { display: grid; grid-template-columns: 120px 1fr; gap: var(--s4); align-items: center; }
.bar-row__label { font-size: 16px; letter-spacing: .1em; color: var(--ink-soft); }
.bars { display: grid; gap: var(--s2); }
.bar { display: flex; align-items: center; gap: var(--s2); }
.bar__track { flex: 1; height: 28px; background: rgba(26,26,26,.06); border-radius: 2px; overflow: hidden; }
.bar__fill {
  height: 100%; width: 0;
  transition: width 1100ms var(--ease);
  border-radius: 2px;
}
.slide.active .bar__fill { width: var(--w, 0); }
.bar__fill--cn { background: var(--gugong-red); transition-delay: .3s; }
.bar__fill--us { background: var(--gold); transition-delay: .5s; }
.bar__val { font-family: var(--num); font-size: 20px; min-width: 130px; }
.bar__nation { width: 42px; font-size: 13px; letter-spacing: .1em; color: var(--muted); }

/* ---------- Slide 4 核心问题（一核四翼） ---------- */
.hub-wrap { position: relative; display: grid; place-items: center; min-height: clamp(180px, 30vh, 320px); }
.hub-core {
  width: 220px; height: 220px; border-radius: 50%;
  background: var(--gugong-red); color: var(--paper);
  display: grid; place-items: center; text-align: center;
  font-family: var(--serif); font-size: 22px; font-weight: 700; line-height: 1.5;
  padding: var(--s3);
  box-shadow: 0 20px 60px rgba(169,50,38,.35);
  z-index: 3;
}
.spokes { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s4); width: 100%; margin-top: var(--s6); }
.spoke {
  border: 1px solid var(--line);
  border-left: 3px solid var(--gold);
  padding: var(--s3) var(--s4);
  background: rgba(255,255,255,.5);
  cursor: pointer;
  transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease), border-color var(--dur) var(--ease);
}
.spoke:hover { transform: translateY(-4px); box-shadow: 0 12px 30px rgba(26,26,26,.08); border-left-color: var(--gugong-red); }
.spoke__t { font-family: var(--serif); font-size: 20px; font-weight: 700; letter-spacing: .06em; }
.spoke__hint { font-size: 13px; color: var(--muted); margin-top: 4px; letter-spacing: .08em; }
.spoke__body {
  max-height: 0; overflow: hidden; opacity: 0;
  font-size: 15px; line-height: 1.7; color: var(--ink-soft);
  transition: max-height var(--dur) var(--ease), opacity var(--dur) var(--ease), margin var(--dur) var(--ease);
}
.spoke.open .spoke__body { max-height: 120px; opacity: 1; margin-top: var(--s2); }

/* ---------- 成就巡礼 通用（Slide 5/6/7） ---------- */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s8); align-items: center; }
.figure { display: grid; place-items: center; }
.figure svg { width: 100%; max-width: 460px; height: auto; }
.ach__kicker { font-size: 15px; letter-spacing: .3em; color: var(--gold); margin-bottom: var(--s3); }
.ach__title { font-family: var(--serif); font-size: clamp(30px,4vw,52px); font-weight: 900; letter-spacing: .08em; line-height: 1.2; }
.ach__date  { font-family: var(--num); font-size: 26px; color: var(--gugong-red); margin: var(--s2) 0; }
.ach__desc  { font-size: 18px; line-height: 1.8; color: var(--ink-soft); margin-top: var(--s3); max-width: 36ch; }
.ach__note  { font-size: 13px; color: var(--muted); letter-spacing: .12em; margin-top: var(--s4); }
.story-card {
  margin-top: var(--s4); padding: var(--s3) var(--s4);
  background: rgba(169,50,38,.06);
  border-left: 3px solid var(--gugong-red);
  font-size: 15px; line-height: 1.7;
}
.story-card b { font-family: var(--serif); color: var(--gugong-red); }

/* Slide 6 / 7 居中布局 */
.center-stage { text-align: center; }
.center-stage .figure svg { max-width: 720px; }
.bridge .figure svg { max-width: 980px; }

/* ---------- Slide 8 工业布局 ---------- */
.map-layout { display: grid; grid-template-columns: 1.4fr 1fr; gap: var(--s8); align-items: center; }
.map-svg svg { width: 100%; height: auto; }
.map-points li { list-style: none; margin-bottom: var(--s3); padding-left: var(--s4); position: relative; font-size: 17px; line-height: 1.6; }
.map-points li::before { content: ""; position: absolute; left: 0; top: 10px; width: 10px; height: 10px; border-radius: 50%; background: var(--gugong-red); }
.map-points b { font-family: var(--serif); }
.map-caption { margin-top: var(--s5); font-family: var(--serif); font-size: 22px; color: var(--gugong-red); letter-spacing: .1em; }

/* ---------- Slide 9 AI 对话 ---------- */
.chat { width: 100%; max-width: 760px; margin: 0 auto; }
.chat__title { font-family: var(--serif); font-size: clamp(28px,4vw,44px); font-weight: 900; text-align: center; margin-bottom: var(--s4); }
.chat__sub { text-align:center; color: var(--muted); font-size:14px; letter-spacing:.2em; margin-bottom: var(--s4); }
.chat__log {
  height: clamp(150px, 30vh, 300px); overflow-y: auto;
  border: 1px solid var(--line); border-radius: 6px;
  padding: var(--s3); background: rgba(255,255,255,.6);
  display: flex; flex-direction: column; gap: var(--s2);
}
.msg { max-width: 80%; padding: 10px 16px; border-radius: 12px; font-size: 15px; line-height: 1.6; }
.msg--user { align-self: flex-end; background: var(--gugong-red); color: var(--paper); border-bottom-right-radius: 2px; }
.msg--bot  { align-self: flex-start; background: var(--paper-2); color: var(--ink); border-bottom-left-radius: 2px; }
.msg--sys  { align-self: center; color: var(--muted); font-size: 13px; background: none; }
.chat__presets { display: flex; flex-wrap: wrap; gap: var(--s1); margin: var(--s3) 0; justify-content: center; }
.chip {
  font-family: var(--sans); font-size: 13px;
  padding: 8px 16px; border-radius: 999px;
  border: 1px solid var(--gold); color: var(--gugong-red-2); background: transparent;
  cursor: pointer; transition: all var(--dur) var(--ease); letter-spacing: .05em;
}
.chip:hover { background: var(--gold); color: var(--ink); }
.chat__input { display: flex; gap: var(--s2); }
.chat__input input {
  flex: 1; padding: 14px 18px; font-size: 15px; font-family: var(--sans);
  border: 1px solid var(--line); border-radius: 6px; background: #fff; color: var(--ink);
}
.chat__input input:focus { outline: none; border-color: var(--gugong-red); }
.btn {
  font-family: var(--sans); font-size: 15px; letter-spacing: .15em;
  padding: 14px 28px; border: none; border-radius: 6px;
  background: var(--gugong-red); color: var(--paper); cursor: pointer;
  transition: background var(--dur) var(--ease), transform var(--dur) var(--ease);
}
.btn:hover { background: var(--gugong-red-2); transform: translateY(-2px); }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }
.api-note { text-align:center; font-size:12px; color:var(--muted); margin-top: var(--s2); letter-spacing:.08em; }
.cfg-btn {
  background: none; border: 1px solid var(--line); border-radius: 4px;
  font-size: 11px; font-family: var(--sans); color: var(--muted);
  padding: 2px 8px; cursor: pointer; transition: all var(--dur) var(--ease);
  vertical-align: middle; margin-left: 4px;
}
.cfg-btn:hover { border-color: var(--gugong-red); color: var(--gugong-red); }

/* ---------- AI 配置弹窗 ---------- */
.cfg-modal { position: fixed; inset: 0; z-index: 9999; display: flex; align-items: center; justify-content: center; }
.cfg-modal[hidden] { display: none; }
.cfg-modal__backdrop { position: absolute; inset: 0; background: rgba(0,0,0,.45); }
.cfg-modal__box {
  position: relative; z-index: 1;
  background: var(--paper); border-radius: 10px; padding: 32px 36px;
  width: min(460px, 90vw); box-shadow: 0 20px 60px rgba(0,0,0,.2);
}
.cfg-modal__title { font-family: var(--serif); font-size: 20px; color: var(--ink); margin-bottom: 20px; }
.cfg-label {
  display: flex; flex-direction: column; gap: 6px;
  font-size: 13px; color: var(--muted); letter-spacing: .08em; margin-bottom: 14px;
}
.cfg-label input {
  padding: 10px 14px; border: 1px solid var(--line); border-radius: 6px;
  font-size: 14px; font-family: var(--sans); color: var(--ink); background: #fff;
}
.cfg-label input:focus { outline: none; border-color: var(--gugong-red); }
.cfg-tip { font-size: 12px; color: var(--muted); margin-bottom: 20px; }
.cfg-modal__btns { display: flex; gap: 12px; }
.cfg-cancel {
  background: none; border: 1px solid var(--line); border-radius: 6px;
  font-family: var(--sans); font-size: 15px; padding: 12px 24px; cursor: pointer;
  color: var(--muted); transition: all var(--dur) var(--ease);
}
.cfg-cancel:hover { border-color: var(--ink); color: var(--ink); }

/* ---------- Slide 10 历史回响 ---------- */
.echo { width: 100%; max-width: 980px; text-align: center; }
.echo__row { display: flex; flex-wrap: wrap; gap: var(--s2); justify-content: center; }
.echo__tag { font-family: var(--serif); font-size: clamp(18px,2.4vw,30px); letter-spacing: .08em; }
.echo--past .echo__tag { color: rgba(245,241,232,.35); }
.echo--now  .echo__tag { color: var(--gold); }
.echo__mid { font-family: var(--serif); font-size: clamp(26px,4vw,48px); font-weight:900; color: var(--paper); margin: clamp(20px,4vh,64px) 0; letter-spacing:.08em; }
.echo__label { font-size:13px; letter-spacing:.35em; color: var(--muted); margin-bottom: var(--s3); }
.echo__submit { display:flex; gap: var(--s2); max-width: 560px; margin: var(--s5) auto 0; }
.echo__submit input { flex:1; padding:12px 16px; border-radius:6px; border:1px solid rgba(245,241,232,.25); background: rgba(255,255,255,.06); color: var(--paper); font-size:15px; }
.echo__submit input:focus { outline:none; border-color: var(--gold); }
.echo__wall { display:flex; flex-wrap:wrap; gap: var(--s1); justify-content:center; margin-top: var(--s4); }
.echo__wall span { font-size:13px; color: var(--gold-soft); border:1px solid rgba(201,169,97,.3); border-radius:999px; padding:6px 14px; }

/* ---------- 进度 / 导航 ---------- */
.progress { position: fixed; top: 0; left: 0; height: 3px; background: var(--gold); z-index: 50; transition: width var(--dur) var(--ease); }
.dots { position: fixed; right: var(--s4); top: 50%; transform: translateY(-50%); display: flex; flex-direction: column; gap: 12px; z-index: 50; }
.dots button { position: relative; width: 9px; height: 9px; border-radius: 50%; border: none; background: rgba(150,150,150,.4); cursor: pointer; padding: 0; transition: all var(--dur) var(--ease); }
.dots button.active { background: var(--gold); transform: scale(1.5); }
.dots button::before {
  content: attr(data-label);
  position: absolute; right: calc(100% + 12px); top: 50%; transform: translateY(-50%);
  white-space: nowrap; font-family: var(--sans); font-size: 12px; letter-spacing: .08em;
  background: rgba(0,0,0,.65); color: #fff; padding: 3px 10px; border-radius: 4px;
  opacity: 0; pointer-events: none; transition: opacity .18s ease;
}
.dots button:hover::before { opacity: 1; }
.navhint { position: fixed; left: var(--s4); bottom: var(--s3); font-size: 12px; letter-spacing: .15em; color: var(--muted); z-index: 50; }
.pagenum { position: fixed; right: var(--s4); bottom: var(--s3); font-family: var(--num); font-size: 14px; color: var(--muted); z-index: 50; }
.pagenum b { color: var(--gold); }
/* 背景音乐按钮 */
.music-btn {
  position: fixed; top: var(--s3); right: var(--s4); z-index: 60;
  width: 46px; height: 46px; border-radius: 50%;
  border: 1px solid rgba(201,169,97,.5); background: rgba(0,0,0,.28);
  display: grid; place-items: center; cursor: pointer;
  backdrop-filter: blur(4px);
  transition: border-color var(--dur) var(--ease), background var(--dur) var(--ease), transform var(--dur) var(--ease);
}
.music-btn:hover { border-color: var(--gold); background: rgba(201,169,97,.16); transform: scale(1.06); }
.music-btn .eq { display: flex; align-items: flex-end; gap: 3px; height: 18px; }
.music-btn .eq span { width: 3px; height: 5px; background: var(--gold); border-radius: 2px; transition: height .3s var(--ease); }
.music-btn.playing .eq span { animation: eqbar .9s ease-in-out infinite; }
.music-btn.playing .eq span:nth-child(1) { animation-delay: 0s; }
.music-btn.playing .eq span:nth-child(2) { animation-delay: .25s; }
.music-btn.playing .eq span:nth-child(3) { animation-delay: .45s; }
.music-btn.playing .eq span:nth-child(4) { animation-delay: .15s; }
@keyframes eqbar { 0%,100% { height: 5px; } 50% { height: 18px; } }
/* 暂停态：显示一条斜杠暗示静音 */
.music-btn:not(.playing) .eq { opacity: .55; }

.topbar { position: fixed; left: var(--s4); top: var(--s3); font-size: 12px; letter-spacing:.2em; color: var(--muted); z-index: 50; }
.topbar a { color: var(--gold); text-decoration: none; border-bottom: 1px solid transparent; }
.topbar a:hover { border-bottom-color: var(--gold); }

/* =========================================================
   氛围层 · 动态背景
   ========================================================= */
/* 深色屏：呼吸光晕 + 暗角（.slide 本身已是 position:absolute，无需再设 relative，
   否则会覆盖基类定位、令深色屏脱离叠放层而掉到文档流下方） */
.slide--dark::before {
  content: ""; position: absolute; inset: 0; pointer-events: none; z-index: 0;
  background:
    radial-gradient(60% 50% at 50% 38%, rgba(201,169,97,.16), transparent 70%),
    radial-gradient(80% 80% at 50% 120%, rgba(169,50,38,.22), transparent 70%);
  animation: breathe 9s ease-in-out infinite;
}
.slide--dark::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; z-index: 0;
  box-shadow: inset 0 0 220px 40px rgba(0,0,0,.65);
}
@keyframes breathe { 0%,100%{opacity:.7; transform:scale(1)} 50%{opacity:1; transform:scale(1.08)} }
.slide__inner { position: relative; z-index: 1; }

/* 飘动的金色微粒（由 JS 注入 .ember） */
.embers { position: absolute; inset: 0; overflow: hidden; pointer-events: none; z-index: 0; }
.ember {
  position: absolute; bottom: -10px;
  width: 4px; height: 4px; border-radius: 50%;
  background: var(--gold); opacity: 0;
  box-shadow: 0 0 8px 1px rgba(201,169,97,.7);
  animation: float-up linear infinite;
}
@keyframes float-up {
  0%   { opacity: 0; transform: translateY(0) translateX(0) scale(.6); }
  12%  { opacity: .9; }
  85%  { opacity: .7; }
  100% { opacity: 0; transform: translateY(-100vh) translateX(var(--drift, 20px)) scale(1.1); }
}

/* 浅色屏：宣纸渐晕 */
.slide--paper { background:
  radial-gradient(120% 90% at 50% -10%, #FBF8F0, var(--paper) 55%) !important; }

/* SVG 自绘 line-art 的「绘制」动画 */
.draw path, .draw line, .draw rect, .draw circle, .draw polyline {
  stroke-dasharray: var(--len, 1200);
  stroke-dashoffset: var(--len, 1200);
}
.slide.active .draw path,
.slide.active .draw line,
.slide.active .draw rect,
.slide.active .draw circle,
.slide.active .draw polyline {
  animation: draw 1.8s var(--ease) forwards;
  animation-delay: .5s;
}
@keyframes draw { to { stroke-dashoffset: 0; } }
/* 填充类（火光、轮子心）延后淡入 */
.slide.active .draw [data-fill] { animation: fadein 1s var(--ease) both; animation-delay: 1.8s; }
@keyframes fadein { from{opacity:0} to{opacity:1} }

/* 图形随指针轻微视差（作用于内部 svg） */
.figure svg { transition: transform .5s var(--ease); will-change: transform; }

/* 柱状图数值的滚动 */
.bar__val .count { font-variant-numeric: tabular-nums; }

/* 核心圆：缓慢脉动光圈 */
.hub-core { position: relative; }
.hub-core::after {
  content: ""; position: absolute; inset: -14px; border-radius: 50%;
  border: 2px solid rgba(201,169,97,.5); animation: pulse-ring 2.6s var(--ease) infinite;
}
@keyframes pulse-ring { 0%{transform:scale(1);opacity:.8} 100%{transform:scale(1.35);opacity:0} }

/* 章节标题左侧朱红竖纹 */
.section-title { position: relative; padding-left: 26px; }
.section-title::before {
  content: ""; position: absolute; left: 0; top: 8%; height: 84%; width: 6px;
  background: var(--gugong-red); border-radius: 3px;
}

/* 回响标签逐字感（hover 微浮） */
.echo__tag { transition: transform .4s var(--ease), color .4s var(--ease); }
.echo--now .echo__tag:hover { transform: translateY(-4px) scale(1.06); }

/* =========================================================
   启幕 · 首次加载的电影式开场
   ========================================================= */
#intro {
  position: fixed; inset: 0; z-index: 9999;
  background: radial-gradient(120% 90% at 50% 50%, #1f1d1a, #0c0b0a 70%);
  display: grid; place-items: center; overflow: hidden;
  cursor: pointer;
}
#intro.lift { animation: curtain 1.1s var(--ease) forwards; }
@keyframes curtain { to { transform: translateY(-100%); opacity: 0; visibility: hidden; } }
.intro__wrap { text-align: center; position: relative; z-index: 2; }
.intro__eyebrow {
  font-size: 13px; letter-spacing: .5em; color: var(--muted); text-transform: uppercase;
  opacity: 0; animation: introUp .9s var(--ease) .2s both;
}
.intro__line {
  width: 0; height: 1px; margin: 28px auto;
  background: linear-gradient(90deg, transparent, var(--gold) 35%, #fff7e0 50%, var(--gold) 65%, transparent);
  animation: introLine 1.5s var(--ease) .5s both;
}
@keyframes introLine { to { width: 420px; } }
.intro__word {
  font-family: var(--serif); font-weight: 900;
  font-size: clamp(40px, 8vw, 110px); letter-spacing: .35em; text-indent: .35em;
  color: var(--gold); opacity: 0;
  animation: introUp 1.1s var(--ease) .9s both;
}
.intro__sub {
  font-family: var(--serif); font-size: clamp(14px, 2vw, 20px);
  letter-spacing: .25em; color: rgba(245,241,232,.6); margin-top: 18px;
  opacity: 0; animation: introUp 1.1s var(--ease) 1.3s both;
}
@keyframes introUp { from { opacity: 0; transform: translateY(22px); filter: blur(6px); }
                     to   { opacity: 1; transform: translateY(0); filter: blur(0); } }
.intro__skip {
  position: absolute; bottom: 36px; left: 0; right: 0; text-align: center;
  font-size: 12px; letter-spacing: .25em; color: rgba(245,241,232,.35);
  opacity: 0; animation: introUp 1s var(--ease) 2s both;
}

/* =========================================================
   光标光晕 · 深色屏的临场感
   ========================================================= */
.cursor-glow {
  position: fixed; inset: 0; z-index: 3; pointer-events: none;
  opacity: 0; transition: opacity .8s var(--ease);
  background: radial-gradient(260px circle at var(--mx, 50%) var(--my, 50%),
              rgba(201,169,97,.12), transparent 65%);
  mix-blend-mode: screen;
}
body.on-dark .cursor-glow { opacity: 1; }

/* =========================================================
   细节升华
   ========================================================= */
/* 封面四角回纹边饰 */
.cover__corner {
  position: absolute; width: 46px; height: 46px; opacity: 0;
  border-color: rgba(201,169,97,.55); border-style: solid; border-width: 0;
  animation: introUp 1s var(--ease) 1.6s both;
}
.cover__corner.tl { top: -40px; left: -56px; border-top-width: 2px; border-left-width: 2px; }
.cover__corner.tr { top: -40px; right: -56px; border-top-width: 2px; border-right-width: 2px; }
.cover__corner.bl { bottom: -40px; left: -56px; border-bottom-width: 2px; border-left-width: 2px; }
.cover__corner.br { bottom: -40px; right: -56px; border-bottom-width: 2px; border-right-width: 2px; }

/* 数据屏 · 差距震撼标注 */
.gap-callout {
  display: inline-flex; align-items: baseline; gap: 8px;
  margin-top: clamp(14px, 3vh, 32px); padding: 10px 20px;
  border: 1px dashed var(--gugong-red); border-radius: 6px;
  background: rgba(169,50,38,.05);
}
.gap-callout .num { font-size: 34px; color: var(--gugong-red); }
.gap-callout small { font-size: 14px; color: var(--ink-soft); letter-spacing: .08em; }

/* FX 元素：豁免「自绘描边」逻辑，改走各自的循环动画 */
.draw .fx { stroke-dasharray: none !important; stroke-dashoffset: 0 !important; }

/* 高炉 · 出铁口熔光脉动 */
@keyframes molten { 0%,100% { opacity: .55; } 50% { opacity: 1; } }
.draw circle[data-molten] { animation: molten 2.2s var(--ease) infinite !important; }
/* 烟气缓缓上飘 */
@keyframes smoke { 0% { opacity:.2; transform: translateY(4px);} 50%{opacity:.7;} 100% { opacity:.15; transform: translateY(-8px);} }
.draw .smoke-anim { transform-box: fill-box; animation: smoke 4s ease-in-out infinite !important; }

/* 城市节点 ping */
@keyframes ping { 0% { transform: scale(1); opacity: .8; } 100% { transform: scale(3.4); opacity: 0; } }
.draw .city-ping, .city-ping { transform-box: fill-box; transform-origin: center; animation: ping 2.4s var(--ease) infinite !important; }

/* =========================================================
   教学内容增强 · 重点/难点 · 导览 · 时间轴 · 概况 · 小结
   ========================================================= */
/* 重点 / 难点 徽标 */
.kpt {
  display: inline-flex; align-items: center; gap: 7px;
  font-family: var(--sans); font-size: 13px; font-weight: 500; letter-spacing: .2em;
  padding: 5px 16px; border-radius: 999px; margin-bottom: 18px;
}
.kpt::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.kpt--key  { background: var(--gugong-red); color: #fff; }
.kpt--hard { background: rgba(201,169,97,.16); color: var(--gugong-red-2); border: 1px solid var(--gold); }
.slide--dark .kpt--hard { color: var(--gold); }

/* 行内关键词高亮（重点词） */
.hl { color: var(--gugong-red); font-weight: 700; }
.slide--dark .hl { color: var(--gold); }
.hl-mark { background: linear-gradient(transparent 58%, rgba(201,169,97,.45) 58%); padding: 0 2px; font-weight: 700; }

/* ---- 本课导览 · roadmap + 重点难点卡 ---- */
.kd-cards { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s4); margin-bottom: var(--s5); }
.kd-card { padding: var(--s3) var(--s4); border-radius: 8px; border-left: 4px solid; background: rgba(255,255,255,.55); }
.kd-card--key  { border-color: var(--gugong-red); }
.kd-card--hard { border-color: var(--gold); }
.kd-card__tag  { font-size: 13px; letter-spacing: .2em; font-weight: 700; }
.kd-card--key  .kd-card__tag { color: var(--gugong-red); }
.kd-card--hard .kd-card__tag { color: var(--gold); }
.kd-card__body { font-family: var(--serif); font-size: clamp(17px,2vw,22px); line-height: 1.6; margin-top: 8px; color: var(--ink); }
.roadmap { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.roadmap__step { font-size: 14px; letter-spacing: .08em; padding: 8px 16px; border: 1px solid var(--line); border-radius: 999px; background: #fff; color: var(--ink-soft); }
.roadmap__arrow { color: var(--gold); font-size: 14px; }

/* ---- 概况 · 方针 + 事实条 ---- */
.brief-policy {
  font-family: var(--serif); font-size: clamp(22px,3.2vw,40px); font-weight: 700;
  line-height: 1.6; letter-spacing: .04em; max-width: 22ch; margin-bottom: var(--s5);
}
.facts { display: grid; grid-template-columns: repeat(4, 1fr); gap: clamp(12px, 1.4vw, 22px); }
.fact { padding: clamp(14px,2vh,22px) clamp(14px,1.4vw,24px); border: 1px solid rgba(201,169,97,.4); border-radius: 8px; min-width: 0; }
.fact__num { font-family: var(--num); font-size: clamp(24px,2.6vw,40px); color: var(--gold); line-height: 1; white-space: nowrap; }
.fact__label { font-size: clamp(12px,0.9vw,13px); letter-spacing: .08em; color: var(--muted); margin-top: 8px; }

/* 「是什么」四方块 · 点击揭晓答案 */
.fact--quiz { cursor: pointer; transition: transform var(--dur) var(--ease), border-color var(--dur) var(--ease); }
.fact--quiz:hover { transform: translateY(-4px); border-color: var(--gold); }
.fact__q { font-family: var(--serif); font-size: clamp(17px,1.5vw,22px); font-weight: 700; color: var(--paper); letter-spacing: .04em; }
.fact__cue { display: block; font-family: var(--sans); font-size: 12px; font-weight: 400; color: var(--gold); margin-top: 6px; letter-spacing: .12em; transition: opacity var(--dur) var(--ease); }
.fact__reveal { max-height: 0; overflow: hidden; opacity: 0; transition: max-height var(--dur) var(--ease), opacity var(--dur) var(--ease), margin var(--dur) var(--ease); }
.fact--quiz.open .fact__cue { opacity: 0; }
.fact--quiz.open .fact__reveal { max-height: 140px; opacity: 1; margin-top: var(--s2); }

/* ---- 成就时间轴 ---- */
.timeline { position: relative; padding-left: 28px; display: grid; gap: clamp(14px,2.6vh,26px); }
.timeline::before { content: ""; position: absolute; left: 7px; top: 6px; bottom: 6px; width: 2px;
  background: linear-gradient(var(--gold), rgba(201,169,97,.2)); }
.tl-item { position: relative; display: grid; grid-template-columns: 130px 1fr; gap: var(--s4); align-items: baseline; }
.tl-item::before { content: ""; position: absolute; left: -28px; top: 7px; width: 14px; height: 14px;
  border-radius: 50%; background: var(--paper); border: 3px solid var(--gugong-red); }
.tl-date { font-family: var(--num); font-size: clamp(17px,2vw,22px); color: var(--gugong-red); white-space: nowrap; }
.tl-text { font-size: clamp(15px,1.7vw,18px); line-height: 1.6; color: var(--ink-soft); }
.tl-text b { font-family: var(--serif); color: var(--ink); }
/* 深色屏上的时间轴文字提亮 */
.slide--dark .tl-text { color: rgba(245,241,232,.85); }
.slide--dark .tl-text b { color: var(--paper); }
.slide--dark .tl-item::before { background: var(--ink); }

/* ---- 课堂小结 · 知识框架四段 ---- */
.frame { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--s2); align-items: stretch; }
.frame__card { position: relative; padding: var(--s4) var(--s3); border-radius: 10px;
  background: rgba(255,255,255,.6); border-top: 4px solid var(--gugong-red); text-align: center; }
.frame__q { font-size: 13px; letter-spacing: .2em; color: var(--gold); }
.frame__t { font-family: var(--serif); font-size: clamp(18px,2.2vw,26px); font-weight: 900; color: var(--gugong-red); margin: 8px 0 12px; }
.frame__d { font-size: 14px; line-height: 1.7; color: var(--ink-soft); text-align: left; }
.frame__d li { margin-bottom: 4px; list-style: none; padding-left: 14px; position: relative; }
.frame__d li::before { content: "·"; position: absolute; left: 2px; color: var(--gugong-red); }
.frame__arrow { display: grid; place-items: center; color: var(--gold); font-size: 22px; }

/* ---- 历史意义 · 横向三段（一线串联） ---- */
.hflow {
  position: relative; display: grid; grid-template-columns: repeat(3, 1fr);
  gap: clamp(24px, 4vw, 72px); margin-top: var(--s6);
}
/* 串联三个节点的横线（穿过节点中心） */
.hflow::before {
  content: ""; position: absolute; top: 29px; left: 16.66%; right: 16.66%; height: 2px;
  background: linear-gradient(90deg, transparent, var(--gold) 12%, var(--gold) 88%, transparent);
  z-index: 0; transform: scaleX(0); transform-origin: left center;
}
.slide.active .hflow::before { animation: lineGrowX 1.2s var(--ease) .5s both; }
@keyframes lineGrowX { to { transform: scaleX(1); } }
.hflow__item { display: flex; flex-direction: column; align-items: center; text-align: center; position: relative; }
.hflow__node {
  width: 58px; height: 58px; border-radius: 50%; background: var(--gold); color: var(--ink);
  font-family: var(--num); font-size: 26px; font-weight: 700; display: grid; place-items: center;
  position: relative; z-index: 2; margin-bottom: var(--s4);
  box-shadow: 0 0 0 6px rgba(201,169,97,.18);
}
.hflow__text { font-size: clamp(16px,1.8vw,21px); line-height: 1.8; color: var(--ink-soft); max-width: 22ch; }
.slide--dark .hflow__text { color: rgba(245,241,232,.88); }

/* =========================================================
   谢幕 · 精致大字 · 编排感
   ========================================================= */
.endcard { width: 100%; max-width: 1080px; text-align: center; margin: 0 auto; }
.endcard__eyebrow {
  display: inline-block;
  font-family: var(--sans); font-size: clamp(12px,1vw,14px); letter-spacing: .35em;
  color: var(--gold); position: relative; padding-left: 20px; margin-bottom: clamp(22px,4.5vh,48px);
}
.endcard__eyebrow::before {
  content: ""; position: absolute; left: 0; top: 50%; transform: translateY(-50%);
  width: 5px; height: 20px; background: var(--gugong-red); border-radius: 2px;
}
.end-title {
  font-family: var(--serif); font-weight: 700;
  font-size: clamp(54px, min(13vw, 17vh), 158px); letter-spacing: .32em; text-indent: .32em;
  color: var(--paper); line-height: 1;
}
.end-sub-en {
  font-family: var(--sans); font-size: clamp(11px,1vw,14px); letter-spacing: .42em;
  color: rgba(201,169,97,.75); text-transform: uppercase; margin-top: clamp(16px,3vh,28px);
}
.end-rule { width: 120px; height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  margin: clamp(20px,4vh,38px) auto clamp(16px,3vh,26px); transform-origin: center; }
.slide.active .end-rule { animation: lineGrowX 1s var(--ease) .6s both; }
.end-line { font-family: var(--serif); font-size: clamp(17px,1.9vw,25px); color: rgba(245,241,232,.82); letter-spacing: .06em; line-height: 1.7; }
.end-emph { font-family: var(--serif); font-size: clamp(21px,2.5vw,33px); color: var(--gold);
  letter-spacing: .08em; margin-top: 8px; display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 4px 18px; }
.end-seal {
  display: inline-grid; place-items: center; width: 50px; height: 50px;
  border: 2px solid var(--gugong-red); border-radius: 6px; color: var(--gugong-red);
  font-family: var(--serif); font-weight: 700; font-size: 18px; letter-spacing: 1px; padding: 3px;
  writing-mode: vertical-rl; box-shadow: inset 0 0 0 1px rgba(169,50,38,.3);
}
.end-meta { margin-top: clamp(24px,5vh,56px); font-size: 13px; letter-spacing: .2em; color: var(--muted); }

/* =========================================================
   响应式（768px 优先）
   ========================================================= */
@media (max-width: 860px) {
  .slide { padding: var(--s8) var(--s4); }
  .split, .map-layout { grid-template-columns: 1fr; gap: var(--s5); }
  .spokes, .kd-cards { grid-template-columns: 1fr; }
  .dots { display: none; }
  .bar-row { grid-template-columns: 1fr; }
  .frame { grid-template-columns: 1fr; }
  .frame__arrow { transform: rotate(90deg); }
  .tl-item { grid-template-columns: 1fr; gap: 2px; }
  .hflow { grid-template-columns: 1fr; gap: var(--s4); }
  .hflow::before { display: none; }
  .facts { grid-template-columns: repeat(2, 1fr); }
}

/* 降低动效偏好 */
@media (prefers-reduced-motion: reduce) {
  * { transition-duration: .01ms !important; animation: none !important; }
}
