/*
 * mythos.css — 专题页《从沙子到 Mythos》
 * 目标: 电影/史诗质感。一屏一页 scroll-snap;
 *   每一幕先来一张黑场"分幕卡";内容屏讲清「何时 · 原理 · 为什么」,图文并重;
 *   视觉随时代推进: 胶片 → 蓝图 → 数字 → 未来;
 *   左侧常驻"半圆转盘"时间轴,当前节点转到弧尖放大高亮。
 * 纯静态零依赖, 不复用 book.css。
 */

:root {
  --ink: #0b0906;
  --ink-2: #16110b;
  --paper: #efe7d6;
  --paper-dim: #bcb09a;
  --paper-faint: #8b8070;
  --amber: #e6a95c;
  --amber-soft: #d0a56d;
  --rust: #c05f36;
  --sun: #f0cd83;
  --sage: #a6b489;
  --violet: #9a8bff;
  --teal: #6fbec9;
  --dawn: #7fb3e6;
  --dawn-deep: #5f8fc8;
  --line: rgba(239, 231, 214, 0.14);
  --line-strong: rgba(239, 231, 214, 0.3);
  --dial-width: clamp(120px, 15vw, 190px); /* 左侧转盘窄带宽度 */
  --dial-tip: clamp(96px, 12vw, 150px);    /* 弧尖(当前项)横坐标 */
  --bar-height: clamp(30px, 5.5vh, 66px);   /* 电影黑边 */
  --font-serif: "Songti SC", "STSong", "Source Han Serif SC", "Noto Serif CJK SC",
    "Noto Serif SC", Georgia, "Times New Roman", serif;
  --font-sans: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei",
    "Source Han Sans SC", "Noto Sans CJK SC", "Noto Sans SC",
    ui-sans-serif, system-ui, -apple-system, sans-serif;
  --font-mono: "SFMono-Regular", ui-monospace, Menlo, Consolas, monospace;
  /* 每幕主色(用 act-N 挑) */
  --c1: var(--amber);
  --c2: var(--rust);
  --c3: var(--sage);
  --c4: var(--teal);
  --c5: var(--sun);
  --c6: var(--violet);
  --c7: var(--dawn);
}

* { box-sizing: border-box; }

.act-1 { --c: var(--c1); }
.act-2 { --c: var(--c2); }
.act-3 { --c: var(--c3); }
.act-4 { --c: var(--c4); }
.act-5 { --c: var(--c5); }
.act-6 { --c: var(--c6); }
.act-7 { --c: var(--c7); }

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  color: var(--paper);
  font-family: var(--font-sans);
  background: var(--ink);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
a { color: var(--amber); text-decoration: none; }

/* ============================================================= */
/* 固定背景底: 一整块不随内容滚动的底, 只在跨幕时平滑换主题色。      */
/* 背景不再写在各幕盒子里(那样会跟着滚, 相邻幕又不同色 → 交界有痕迹)。 */
/* 用 @property 注册可插值变量, 颜色才能 transition 平滑过渡。        */
/* 只覆盖 act-1~act-5; 群星幕与高峰幕(act-6)保留各自背景, 不动。 */
/* ============================================================= */
@property --bg-glow { syntax: "<color>"; inherits: true; initial-value: rgba(230,169,92,0.12); }
@property --bg-top  { syntax: "<color>"; inherits: true; initial-value: #1b130b; }
@property --bg-bot  { syntax: "<color>"; inherits: true; initial-value: #0b0906; }
@property --bg-glow-x { syntax: "<percentage>"; inherits: true; initial-value: 42%; }

body {
  --bg-glow: rgba(230,169,92,0.12);
  --bg-top: #1b130b;
  --bg-bot: #0b0906;
  --bg-glow-x: 42%;
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(130% 110% at 50% 45%, transparent 46%, rgba(0,0,0,0.6)),
    radial-gradient(120% 95% at var(--bg-glow-x) 42%, var(--bg-glow), transparent 55%),
    linear-gradient(180deg, var(--bg-top), var(--bg-bot));
  transition: --bg-glow 620ms ease, --bg-top 620ms ease, --bg-bot 620ms ease, --bg-glow-x 620ms ease;
}
@media (prefers-reduced-motion: reduce) { body::before { transition: none; } }
/* 每幕主题色: JS 把当前幕的 act-N 写到 body[data-act]。act-6 保留原背景。 */
body[data-act="act-1"] { --bg-glow: rgba(230,169,92,0.13); --bg-top:#1b130b; --bg-bot:#0b0906; --bg-glow-x:40%; --theme-accent: var(--amber); }
body[data-act="act-2"] { --bg-glow: rgba(120,150,170,0.11); --bg-top:#0d1210; --bg-bot:#0a0e0c; --bg-glow-x:56%; --theme-accent: var(--rust); }
body[data-act="act-3"] { --bg-glow: rgba(166,180,137,0.11); --bg-top:#0d100e; --bg-bot:#090c0b; --bg-glow-x:54%; --theme-accent: var(--sage); }
body[data-act="act-4"] { --bg-glow: rgba(111,190,201,0.12); --bg-top:#0a1113; --bg-bot:#07100f; --bg-glow-x:53%; --theme-accent: var(--teal); }
body[data-act="act-5"] { --bg-glow: rgba(240,205,131,0.12); --bg-top:#0e0d12; --bg-bot:#0a090e; --bg-glow-x:52%; --theme-accent: var(--sun); }
body[data-act="act-6"] { --theme-accent: var(--violet); }
body[data-act="act-7"] { --theme-accent: var(--dawn); }

/* ============================================================= */
/* 胶片氛围: 颗粒 + 上下黑边 + 片名/时间码                        */
/* ============================================================= */

.grain {
  position: fixed; inset: 0; z-index: 90; pointer-events: none;
  opacity: 0.05; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%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");
  animation: grain 900ms steps(4) infinite;
}
@keyframes grain {
  0% { transform: translate(0,0); } 25% { transform: translate(-3%,2%); }
  50% { transform: translate(2%,-3%); } 75% { transform: translate(-2%,-2%); }
  100% { transform: translate(3%,3%); }
}
@media (prefers-reduced-motion: reduce) { .grain { animation: none; } }

.bar {
  position: fixed; left: 0; right: 0; height: var(--bar-height);
  background: #000; z-index: 80; pointer-events: none;
}
.bar--top { top: 0; box-shadow: 0 10px 30px rgba(0,0,0,0.6); }
.bar--bottom { bottom: 0; box-shadow: 0 -10px 30px rgba(0,0,0,0.6); }

.reel {
  position: fixed; top: 0; left: 0; right: 0; height: var(--bar-height);
  z-index: 82; display: flex; align-items: center; justify-content: space-between;
  padding: 0 clamp(0.9rem, 3vw, 2.4rem);
  font-family: var(--font-mono); font-size: 0.66rem; letter-spacing: 0.16em;
  color: var(--paper-faint); pointer-events: none;
}
.reel__title { text-transform: uppercase; }
.reel__code { color: var(--amber-soft); }

.deck-progress {
  position: fixed; top: var(--bar-height); left: 0; z-index: 82;
  height: 2px; width: 0%;
  background: linear-gradient(90deg, var(--theme-accent, var(--amber)), color-mix(in srgb, var(--theme-accent, var(--amber)) 55%, white));
  transition: width 140ms linear, background 320ms ease;
}

/* ============================================================= */
/* 滚动容器 + 一屏一页                                            */
/* ============================================================= */

.deck {
  height: 100vh; height: 100dvh;
  overflow-y: scroll; scroll-snap-type: y mandatory; scroll-behavior: smooth;
  scrollbar-width: none;
  perspective: 1px; /* 备用: 视差 */
}
.deck::-webkit-scrollbar { width: 0; height: 0; }

.slide {
  position: relative;
  min-height: 100vh; min-height: 100dvh;
  scroll-snap-align: start; scroll-snap-stop: always;
  display: grid; align-items: center;
  gap: clamp(1.6rem, 4vw, 4.5rem);
  grid-template-columns: 1.02fr 0.98fr;
  padding: calc(var(--bar-height) + 2.6rem) clamp(1.6rem, 5vw, 6rem)
           calc(var(--bar-height) + 2.6rem) calc(var(--dial-tip) + clamp(9rem, 12vw, 14rem));
  overflow: hidden;
}

/* 每幕氛围: 胶片 → 蓝图 → 数字 → 未来 */
.slide::before { content: ""; position: absolute; inset: 0; z-index: 0; pointer-events: none; }
/* act-1~act-5 内容幕: 背景交给固定底(body::before), 幕自身透明、不跟滚。
   保留各幕 ::before 的轻纹理(胶片/网格/点阵), 但去掉会造成交界暗角的遮罩。 */
.slide.act-1, .slide.act-2, .slide.act-3, .slide.act-4, .slide.act-5 { background: transparent; }
.slide.act-1::before { background: repeating-linear-gradient(90deg, transparent 0 38px, rgba(0,0,0,0.10) 38px 39px); opacity: 0.6; background-attachment: fixed; }
.slide.act-2::before { background-image: linear-gradient(rgba(150,175,150,0.06) 1px, transparent 1px), linear-gradient(90deg, rgba(150,175,150,0.06) 1px, transparent 1px); background-size: 30px 30px; -webkit-mask-image: radial-gradient(120% 100% at 58% 50%, #000 55%, transparent); mask-image: radial-gradient(120% 100% at 58% 50%, #000 55%, transparent); background-attachment: fixed; }
.slide.act-3::before { background-image: radial-gradient(rgba(200,220,200,0.10) 1px, transparent 1.4px); background-size: 24px 24px; -webkit-mask-image: radial-gradient(120% 100% at 55% 50%, #000 45%, transparent); mask-image: radial-gradient(120% 100% at 55% 50%, #000 45%, transparent); background-attachment: fixed; }
.slide.act-4::before { background-image: radial-gradient(rgba(111,190,201,0.11) 1px, transparent 1.4px); background-size: 25px 25px; -webkit-mask-image: radial-gradient(120% 100% at 53% 50%, #000 45%, transparent); mask-image: radial-gradient(120% 100% at 53% 50%, #000 45%, transparent); background-attachment: fixed; }
.slide.act-5::before { background-image: radial-gradient(rgba(240,205,131,0.10) 1px, transparent 1.4px); background-size: 26px 26px; -webkit-mask-image: radial-gradient(120% 100% at 52% 50%, #000 45%, transparent); mask-image: radial-gradient(120% 100% at 52% 50%, #000 45%, transparent); background-attachment: fixed; }
.slide.act-6 { background: radial-gradient(85% 75% at 48% 42%, rgba(230,169,92,0.18), transparent 55%), radial-gradient(70% 90% at 78% 72%, rgba(154,139,255,0.16), transparent 60%), linear-gradient(180deg,#0b0a14,#08070d); background-attachment: fixed; }
.slide.act-6::before { background: repeating-linear-gradient(180deg, rgba(255,255,255,0.03) 0 2px, transparent 2px 4px); opacity: 0.5; background-attachment: fixed; }

/* 进屏淡入 */
.slide__text > *, .slide__stage { opacity: 0; transform: translateY(22px); transition: opacity 900ms ease, transform 900ms ease; }
.slide.is-in .slide__text > * { opacity: 1; transform: none; }
.slide.is-in .slide__text > *:nth-child(2) { transition-delay: 90ms; }
.slide.is-in .slide__text > *:nth-child(3) { transition-delay: 170ms; }
.slide.is-in .slide__text > *:nth-child(4) { transition-delay: 250ms; }
.slide.is-in .slide__text > *:nth-child(5) { transition-delay: 330ms; }
.slide.is-in .slide__stage { opacity: 1; transform: none; transition-delay: 220ms; }
@media (prefers-reduced-motion: reduce) {
  .slide__text > *, .slide__stage { opacity: 1; transform: none; }
}

.slide__text { position: relative; z-index: 2; }
.slide__stage { position: relative; z-index: 2; display: grid; gap: 0.9rem; align-content: center; }

/* 幕次 + 年代:时间码风 */
.slide__meta {
  display: flex; align-items: center; gap: 0.7rem; flex-wrap: wrap;
  font-family: var(--font-mono); font-size: 0.7rem; letter-spacing: 0.14em;
  color: var(--paper-faint); margin-bottom: 1.1rem; text-transform: uppercase;
}
.slide__act { color: var(--c, var(--amber)); font-weight: 700; }
.slide__era { padding-left: 0.7rem; border-left: 1px solid var(--line-strong); }

.slide__title {
  font-family: var(--font-serif); font-weight: 700;
  font-size: clamp(2.2rem, 5.2vw, 3.7rem); line-height: 1.12;
  letter-spacing: 0.01em; margin: 0 0 1.1rem; color: var(--paper);
}
.slide__title .accent { color: var(--c, var(--amber)); font-style: italic; }

.slide__lead {
  font-size: clamp(1.02rem, 1.7vw, 1.22rem); line-height: 1.85;
  color: var(--paper-dim); margin: 0 0 1.2rem; max-width: 36rem;
}
.slide__lead strong { color: var(--paper); font-weight: 600; }

/* 何时 / 原理 / 为什么 三段块 */
/* 正文: 三段顺读叙事(原 何时/原理/为什么 标签已移除, 只留自然段落流) */
.facets { display: block; margin: 0 0 0.4rem; max-width: 37rem; }
.facet {
  display: block;
  margin: 0 0 0.85rem;
  padding: 0;
  position: relative;
  padding-left: 1rem;
}
/* 段首一个小竖条代替标签, 用幕色, 低调但有节奏感 */
.facet::before {
  content: ""; position: absolute; left: 0; top: 0.5em;
  width: 3px; height: 1.05em; border-radius: 2px;
  background: var(--c, var(--amber)); opacity: 0.55;
}
.facet__v { font-size: 1rem; line-height: 1.82; color: var(--paper-dim); }
.facet__v strong { color: var(--paper); font-weight: 600; }

.slide__xref {
  display: inline-flex; align-items: center; gap: 0.4rem; margin-top: 1.2rem;
  padding-bottom: 0.15rem; border-bottom: 1px solid var(--line-strong);
  color: var(--paper-dim); font-size: 0.84rem; font-family: var(--font-mono); letter-spacing: 0.04em;
  transition: color 160ms ease, border-color 160ms ease;
}
.slide__xref::before { content: "▸ "; color: var(--c, var(--amber)); }
.slide__xref:hover { color: var(--paper); border-color: var(--c, var(--amber)); }

/* 右侧图舞台: 可放多张 */
.frame {
  border: 1px solid var(--line); border-radius: 2px;
  background: linear-gradient(180deg, rgba(239,231,214,0.03), transparent), var(--ink-2);
  box-shadow: 0 26px 66px rgba(0,0,0,0.55), inset 0 0 0 1px rgba(0,0,0,0.3);
  padding: 0.5rem;
}
.frame svg { display: block; width: 100%; height: auto; }
.frame__cap {
  margin: 0.5rem 0.2rem 0.15rem; font-family: var(--font-mono); font-size: 0.66rem;
  letter-spacing: 0.05em; color: var(--paper-faint); text-align: center;
}
.stage-2 { grid-template-columns: 1fr 1fr; display: grid; gap: 0.9rem; }
.stage-2 .frame__cap { font-size: 0.6rem; }

/* SVG 语义类 */
.s-stroke { stroke: var(--line-strong); fill: none; }
.s-c { stroke: var(--c, var(--amber)); fill: none; }
.s-cf { fill: var(--c, var(--amber)); }
.s-paper { fill: var(--paper); }
.s-dim { fill: var(--paper-faint); }
.s-t { fill: var(--paper-dim); font-family: var(--font-mono); font-size: 12px; }
.s-tc { fill: var(--c, var(--amber)); font-family: var(--font-mono); font-size: 12px; }

/* ============================================================= */
/* 分幕黑场卡                                                     */
/* ============================================================= */

.slide--act {
  grid-template-columns: 1fr; justify-items: center; text-align: center;
  padding-left: calc(var(--dial-width) + clamp(1rem, 2.5vw, 3rem));
}
/* 分幕卡背景走固定底(与本幕同色同主题), 这里只留极淡暗角聚焦标题, 不再压一大片黑 */
.slide--act::before {
  background: radial-gradient(75% 65% at 50% 45%, transparent 55%, rgba(0,0,0,0.22));
  -webkit-mask-image: none; mask-image: none;
  opacity: 1;
}
.actcard { max-width: 44rem; }
.actcard__no {
  font-family: var(--font-mono); font-size: 0.8rem; letter-spacing: 0.5em;
  color: var(--c, var(--amber)); text-transform: uppercase; margin: 0 0 1.4rem;
}
.actcard__title {
  font-family: var(--font-serif); font-weight: 700;
  font-size: clamp(2.6rem, 7vw, 5rem); line-height: 1.08; margin: 0 0 1.4rem; color: var(--paper);
}
.actcard__title .accent { color: var(--c, var(--amber)); font-style: italic; }
.actcard__title-link {
  color: inherit;
  text-decoration: none;
  font: inherit;
  cursor: pointer;
}
.actcard__title-link .accent { color: var(--c, var(--amber)); font-style: italic; }
.actcard__line { font-size: clamp(1rem, 1.9vw, 1.28rem); line-height: 1.8; color: var(--paper-dim); max-width: 34rem; margin: 0 auto; }
.actcard__rule { width: 60px; height: 2px; background: var(--c, var(--amber)); margin: 1.8rem auto 0; }

.slide--constellation {
  grid-template-columns: 1fr;
  justify-items: center;
  text-align: center;
  padding-left: calc(var(--dial-width) + clamp(1rem, 2.5vw, 3rem));
  background:
    radial-gradient(95% 75% at 50% 42%, rgba(31,76,140,0.28), transparent 58%),
    radial-gradient(80% 70% at 72% 70%, rgba(102,168,255,0.14), transparent 62%),
    linear-gradient(180deg, #030813 0%, #07142a 46%, #02050c 100%);
  background-attachment: fixed;
}
.slide--constellation::before {
  background:
    radial-gradient(circle at 12% 18%, rgba(255,255,255,0.92) 0 1px, transparent 1.7px),
    radial-gradient(circle at 34% 72%, rgba(177,211,255,0.82) 0 1px, transparent 1.8px),
    radial-gradient(circle at 66% 24%, rgba(255,255,255,0.86) 0 1px, transparent 1.7px),
    radial-gradient(circle at 82% 66%, rgba(177,211,255,0.74) 0 1px, transparent 1.8px),
    radial-gradient(circle at 47% 38%, rgba(255,255,255,0.72) 0 1px, transparent 1.7px),
    radial-gradient(70% 60% at 50% 45%, rgba(74,139,224,0.18), transparent 58%),
    radial-gradient(90% 80% at 50% 50%, transparent 38%, rgba(0,0,0,0.55));
  background-size:
    180px 160px,
    230px 210px,
    260px 190px,
    210px 240px,
    310px 250px,
    auto,
    auto;
  -webkit-mask-image: none;
  mask-image: none;
  opacity: 1;
  background-attachment: fixed;
}
.slide--constellation::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 28% 30%, rgba(196,222,255,0.72), transparent 1.7px),
    radial-gradient(circle at 58% 76%, rgba(255,255,255,0.54), transparent 1.5px),
    radial-gradient(circle at 76% 42%, rgba(196,222,255,0.62), transparent 1.6px),
    linear-gradient(180deg, rgba(0,0,0,0.16), rgba(0,0,0,0.38));
  background-size: 140px 120px, 190px 170px, 260px 220px, auto;
  opacity: 0.92;
  background-attachment: fixed;
}
.constellation-card {
  position: relative;
  z-index: 4;
  max-width: 44rem;
}
/* 群星幕收尾小字: 主句与紫色分隔线之间的片尾感落款, 比正文暗、字号小, 不抢主句 */
.constellation-epilogue {
  margin: 1.2rem auto 0.2rem;
  max-width: 30rem;
  color: rgba(226,238,255,0.5);
  font-family: var(--font-serif);
  font-size: clamp(0.8rem, 1.3vw, 0.94rem);
  line-height: 1.85;
  letter-spacing: 0.04em;
}
.constellation {
  position: absolute;
  inset: calc(var(--bar-height) + 1rem) clamp(1.4rem, 4vw, 4.8rem);
  z-index: 3;
  pointer-events: none;
}
.constellation-star {
  position: absolute;
  left: var(--x);
  top: var(--y);
  display: inline-flex;
  align-items: center;
  gap: 0.42rem;
  transform: translate(0, -50%) scale(var(--s));
  transform-origin: left center;
  border: 0;
  padding: 0;
  background: transparent;
  color: rgba(226,238,255,0.82);
  cursor: pointer;
  font-family: var(--font-mono);
  font-size: clamp(0.64rem, 1vw, 0.88rem);
  letter-spacing: 0.12em;
  opacity: 0.74;
  pointer-events: auto;
  text-transform: uppercase;
  text-shadow:
    0 0 10px rgba(120,177,255,0.55),
    0 0 24px rgba(55,116,210,0.36);
  transition: color 160ms ease, opacity 160ms ease, transform 160ms ease;
}
.constellation-star--west {
  flex-direction: row-reverse;
  transform: translate(-100%, -50%) scale(var(--s));
  transform-origin: right center;
}
.constellation-star:hover,
.constellation-star:focus-visible,
.constellation-star.is-selected {
  color: #fff;
  opacity: 1;
  outline: none;
}
.constellation-star:hover,
.constellation-star:focus-visible {
  transform: translate(0, -50%) scale(calc(var(--s) * 1.08));
}
.constellation-star--west:hover,
.constellation-star--west:focus-visible {
  transform: translate(-100%, -50%) scale(calc(var(--s) * 1.08));
}
.constellation-star i {
  display: inline-block;
  width: 0.48rem;
  height: 0.48rem;
  border-radius: 50%;
  background: #f8fbff;
  box-shadow:
    0 0 10px rgba(255,255,255,1),
    0 0 22px rgba(127,184,255,0.9),
    0 0 46px rgba(64,133,232,0.55);
}
.constellation-star--major i {
  width: 0.66rem;
  height: 0.66rem;
}
.constellation-popover {
  position: fixed;
  left: 1rem;
  top: 1rem;
  z-index: 88;
  width: min(23rem, calc(100vw - 2rem));
  border: 1px solid rgba(177,211,255,0.24);
  border-radius: 6px;
  background: rgba(3,8,19,0.9);
  box-shadow: 0 24px 70px rgba(0,0,0,0.62), 0 0 42px rgba(64,133,232,0.16);
  color: var(--paper-dim);
  opacity: 0;
  padding: 1rem 1.05rem 1.05rem;
  pointer-events: none;
  text-align: left;
  transform: translateY(0.5rem);
  transition: opacity 140ms ease, transform 140ms ease;
}
.constellation-popover.is-open {
  opacity: 1;
  pointer-events: auto;
  transform: none;
}
.constellation-popover__close {
  position: absolute;
  right: 0.65rem;
  top: 0.55rem;
  border: 0;
  background: transparent;
  color: rgba(226,238,255,0.72);
  cursor: pointer;
  font: inherit;
  font-family: var(--font-mono);
  font-size: 0.85rem;
}
.constellation-popover__kind {
  margin: 0 1.6rem 0.35rem 0;
  color: rgba(156,196,255,0.8);
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.constellation-popover__title {
  margin: 0 1.6rem 0.7rem 0;
  color: var(--paper);
  font-family: var(--font-serif);
  font-size: 1.25rem;
  line-height: 1.25;
}
.constellation-popover__text {
  margin: 0.55rem 0 0;
  font-size: 0.9rem;
  line-height: 1.7;
}

/* ============================================================= */
/* 封面 & 终点                                                    */
/* ============================================================= */

.slide--hero, .slide--finale, .slide--future {
  grid-template-columns: 1fr; justify-items: center; text-align: center;
  padding-left: calc(var(--dial-width) + clamp(1rem, 2.5vw, 3rem));
}
.slide--hero .slide__text, .slide--finale .slide__text, .slide--future .slide__text { max-width: 48rem; }
.slide--hero .slide__lead, .slide--finale .slide__lead, .slide--future .slide__lead { margin-left: auto; margin-right: auto; }
.slide--hero .slide__meta, .slide--finale .slide__meta, .slide--future .slide__meta { justify-content: center; }

/* 封面题记: 主标题上方一行开场献词, 极淡暖金、宽字距, 像电影开场前的献辞 */
.hero__dedication {
  margin: 0 0 1.2rem;
  color: var(--amber-soft);
  font-family: var(--font-mono);
  font-size: clamp(0.66rem, 1.15vw, 0.8rem);
  letter-spacing: 0.22em;
  text-transform: uppercase;
  opacity: 0.62;
}
.hero__title {
  font-family: var(--font-serif); font-weight: 700;
  font-size: clamp(3rem, 9vw, 6rem); line-height: 1.02; margin: 0 0 1.5rem;
  color: var(--paper); letter-spacing: 0.01em;
}
.hero__title .accent { color: var(--amber); font-style: italic; }
.finale__note { font-size: 0.96rem; line-height: 1.85; color: var(--paper-faint); max-width: 40rem; margin: 0 auto; }
.finale__note strong { color: var(--paper); }
.mythos-note { position: relative; display: inline-block; }
.mythos-note__mark {
  background: none; border: 0; cursor: pointer; padding: 0 0.1em; margin: 0;
  color: var(--amber); font-family: var(--font-serif); font-size: 0.8em;
  vertical-align: super; opacity: 0.85; transition: opacity 0.2s ease;
}
.mythos-note__mark:hover, .mythos-note__mark[aria-expanded="true"] { opacity: 1; }
.mythos-note__pop {
  position: absolute; left: 50%; bottom: calc(100% + 0.5rem); transform: translate(-50%, 6px);
  z-index: 40; width: max-content; max-width: 17rem; white-space: normal; text-align: left;
  padding: 0.5rem 0.7rem; border-radius: 0.5rem;
  background: rgba(20, 18, 28, 0.96); border: 1px solid rgba(230, 169, 92, 0.28);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  font-family: var(--font-mono); font-size: 0.62rem; letter-spacing: 0.04em; line-height: 1.6;
  color: var(--paper-faint);
  opacity: 0; visibility: hidden; pointer-events: none;
  transition: opacity 0.24s ease, transform 0.24s ease, visibility 0.24s;
}
.mythos-note__pop::after {
  content: ""; position: absolute; top: 100%; left: 50%; transform: translateX(-50%);
  border: 6px solid transparent; border-top-color: rgba(230, 169, 92, 0.28);
}
.mythos-note__pop.is-open {
  opacity: 1; visibility: visible; pointer-events: auto; transform: translate(-50%, 0);
}
.slide--future {
  background:
    radial-gradient(90% 72% at 50% 40%, rgba(127, 179, 230, 0.12), transparent 60%),
    radial-gradient(62% 66% at 76% 72%, rgba(230, 169, 92, 0.07), transparent 68%),
    linear-gradient(180deg, #05080f 0%, #050710 42%, #04050a 100%);
  background-attachment: fixed;
}
.slide--future::before {
  background:
    radial-gradient(circle at 18% 22%, rgba(255,255,255,0.42) 0 1px, transparent 1.6px),
    radial-gradient(circle at 78% 28%, rgba(196,222,255,0.34) 0 1px, transparent 1.8px),
    radial-gradient(circle at 38% 76%, rgba(255,255,255,0.28) 0 1px, transparent 1.7px),
    radial-gradient(circle at 66% 66%, rgba(196,222,255,0.22) 0 1px, transparent 1.7px);
  background-size: 240px 220px, 280px 240px, 210px 190px, 310px 260px;
  opacity: 0.62;
  background-attachment: fixed;
}
.future__note {
  margin: 0.6rem auto 0;
  max-width: 42rem;
  color: rgba(226,238,255,0.72);
  font-size: 0.98rem;
  line-height: 1.9;
}
.future__note strong { color: var(--paper); }
.future__rule {
  width: 84px;
  height: 1px;
  margin: 2rem auto 0;
  background: linear-gradient(90deg, transparent, rgba(196,222,255,0.82), transparent);
}
.story-credit {
  position: fixed;
  right: clamp(0.8rem, 2vw, 1.5rem);
  bottom: calc(var(--bar-height) + clamp(0.55rem, 1.5vh, 1rem));
  z-index: 83;
  margin: 0;
  color: var(--paper-faint);
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  opacity: 0.42;
  text-transform: uppercase;
}
.story-credit__egg {
  display: inline;
  font: inherit;
  font-family: inherit;
  font-size: inherit;
  letter-spacing: inherit;
  text-transform: inherit;
  color: inherit;
  background: none;
  border: none;
  padding: 0;
  margin: 0;
  opacity: 1;
  -webkit-appearance: none;
  appearance: none;
  cursor: default;
  pointer-events: none;
}
.story-credit__egg.is-live {
  cursor: pointer;
  pointer-events: auto;
}
.finale__credit {
  margin: 1rem auto 0;
  color: var(--paper-faint);
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.14em;
  opacity: 0.42;
  text-transform: uppercase;
}

.button-row { display: flex; gap: 0.7rem; flex-wrap: wrap; justify-content: center; margin-top: 2rem; }
.mbtn {
  display: inline-flex; align-items: center; gap: 0.4rem; padding: 0.68rem 1.5rem;
  border: 1px solid var(--line-strong); border-radius: 2px; font-family: var(--font-mono);
  font-size: 0.8rem; letter-spacing: 0.06em; color: var(--paper);
  transition: background 160ms ease, border-color 160ms ease, transform 160ms ease;
}
.mbtn--primary { background: var(--amber); color: var(--ink); border-color: var(--amber); font-weight: 700; }
.mbtn:hover { transform: translateY(-1px); border-color: var(--amber); }

/* 总览 */
.slide--overview { grid-template-columns: 1fr; justify-items: center; }
.slide--overview .slide__text { max-width: 58rem; width: 100%; }
.overview__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(8.5rem,1fr)); gap: 0.7rem; margin-top: 1.4rem; }
.ov-act { border: 1px solid var(--line); border-top: 2px solid var(--c, var(--amber)); border-radius: 2px; padding: 0.85rem 0.9rem 0.95rem; background: var(--ink-2); }
.ov-act__name { font-family: var(--font-serif); font-weight: 700; font-size: 0.98rem; color: var(--c, var(--amber)); margin: 0 0 0.15rem; }
.ov-act__era { font-family: var(--font-mono); font-size: 0.66rem; color: var(--paper-faint); margin: 0 0 0.5rem; }
.ov-act__list { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 0.2rem; }
.ov-act__list li { font-size: 0.8rem; color: var(--paper-dim); line-height: 1.5; }

/* 编年注: 总览五幕卡下方一行克制脚注, 说明"逻辑递进 ≠ 严格编年"。
   幕色 mono 小标签 + 暗金细线 + 低调正文, 像史料页边的一条注脚。 */
.overview__note {
  position: relative;
  max-width: 40rem;
  margin: 1.5rem auto 0;
  padding-top: 1.1rem;
  color: var(--paper-faint);
  font-family: var(--font-serif);
  font-size: clamp(0.78rem, 1.25vw, 0.9rem);
  line-height: 1.9;
  letter-spacing: 0.01em;
  text-align: center;
}
.overview__note::before {
  content: "";
  position: absolute;
  top: 0; left: 50%; transform: translateX(-50%);
  width: 46px; height: 1px;
  background: linear-gradient(90deg, transparent, var(--amber-soft), transparent);
  opacity: 0.6;
}
.overview__note-k {
  display: inline-block;
  margin-right: 0.5rem;
  color: var(--amber);
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  opacity: 0.75;
}
.overview__note em {
  font-style: normal;
  color: var(--paper-dim);
  border-bottom: 1px solid rgba(230, 169, 92, 0.32);
}

/* ============================================================= */
/* 左侧半圆转盘时间轴                                             */
/* ============================================================= */

.dial {
  position: fixed; top: 0; bottom: 0; left: 0; z-index: 70;
  width: var(--dial-width); pointer-events: none;
}
/* 装饰弧: 一个大圆, 圆心在屏幕左外侧, 右缘(弧尖)刚好落在 --dial-tip 处。
   直径 = 2×半径; 半径 ≈ 0.95×视口高, 与 mythos.js 的 RADIUS 对齐。
   left 让圆的最右点 = --dial-tip: left = tip - 2R = tip - 1.9×100vh。 */
.dial__arc {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 190vh; height: 190vh;
  left: calc(var(--dial-tip) - 190vh);
  border-radius: 50%;
  border: 1px solid var(--line);
  background: radial-gradient(circle at right center, rgba(0,0,0,0.5), transparent 30%);
}
.dial__hub { display: none; }
/* 弧尖指示线 (当前项停靠处) */
.dial__needle {
  display: none;
}

.dial__track {
  position: absolute; inset: 0; pointer-events: auto;
}
/* 每个节点绝对定位, 由 JS 按角度摆到弧上 */
.dial-item {
  position: absolute; left: 0; top: 50%;
  transform-origin: left center;
  width: 0; height: 0;
  cursor: pointer; white-space: nowrap;
  color: var(--paper-faint);
  transition: color 200ms ease, opacity 200ms ease;
  opacity: 0.5;
}
.dial-item__dot {
  position: absolute; left: 0; top: 0;
  transform: translate(-50%, -50%);
  width: 9px; height: 9px; border-radius: 50%;
  background: var(--ink); border: 1.5px solid var(--line-strong);
  transition: all 200ms ease;
}
.dial-item__era {
  position: absolute; right: 0.7rem; top: 50%; transform: translateY(-50%);
  font-family: var(--font-mono); font-size: 0.66rem; letter-spacing: 0.05em;
  opacity: 0.82;
}
.dial-item__label {
  position: absolute; left: 0.78rem; top: 50%; transform: translateY(-50%);
  font-size: 0.9rem; font-weight: 700;
}
.dial-item--no-era .dial-item__era { display: none; }
.dial-item:hover { color: var(--paper-dim); opacity: 0.85; }
.dial-item.is-active {
  color: var(--paper); opacity: 1;
}
.dial-item.is-active .dial-item__dot {
  background: var(--c, var(--amber)); border-color: var(--c, var(--amber));
  box-shadow: 0 0 12px var(--c, var(--amber)); transform: translate(-50%, -50%) scale(1.5);
}
.dial-item.is-active .dial-item__era { color: var(--paper-dim); }
.dial-item.is-active .dial-item__label { color: var(--c, var(--amber)); font-size: 1.16rem; }
.dial-item.act-7.is-active .dial-item__dot {
  background: var(--dawn-deep);
  border-color: var(--dawn-deep);
  box-shadow: 0 0 12px var(--dawn-deep);
}
.dial-item.act-7.is-active .dial-item__label { color: var(--dawn-deep); }
.dial-item.is-near { opacity: 0.85; }

.dial__corner {
  position: absolute; left: 0.9rem;
  pointer-events: auto;
  padding: 0.45rem 0.7rem; border: 1px solid var(--line); border-radius: 2px;
  color: var(--paper-dim); font-family: var(--font-mono); font-size: 0.68rem; letter-spacing: 0.04em;
  transition: border-color 140ms ease, color 140ms ease;
}
.dial__top { top: calc(var(--bar-height) + 0.8rem); }
.dial__home {
  bottom: calc(var(--bar-height) + 0.8rem);
  opacity: 0;
  transition: opacity 180ms ease, border-color 140ms ease, color 140ms ease;
}
.dial__home::before {
  content: "";
  position: absolute;
  inset: -0.6rem -1.1rem -0.6rem -0.6rem;
}
.dial__home:hover,
.dial__home:focus-visible { opacity: 1; }

/* ============================================================= */
/* 移动端跳转面板                                                 */
/* ============================================================= */

.mobile-jump { display: none; }

.mobile-jump__btn,
.mobile-jump__close,
.mobile-jump__item {
  font: inherit;
}

/* ============================================================= */
/* 移动端: 不展示时间线,避免窄屏把左侧转盘挤成顶部怪异横条          */
/* ============================================================= */

@media (max-width: 920px) {
  :root { --dial-width: 0px; }
  .slide {
    grid-template-columns: 1fr; justify-items: start; gap: 1.5rem;
    padding: calc(var(--bar-height) + 2rem) 1.5rem calc(var(--bar-height) + 2.2rem);
  }
  .slide--act, .slide--hero, .slide--finale, .slide--future, .slide--constellation { padding-left: 1.5rem; justify-items: center; }
  .story-credit {
    right: 0.75rem;
    bottom: calc(var(--bar-height) + 3.45rem);
    font-size: 0.6rem;
    opacity: 0.34;
  }
  .constellation {
    inset: calc(var(--bar-height) + 1rem) 0.6rem;
  }
  .constellation-star {
    font-size: 0.58rem;
    opacity: 0.56;
    letter-spacing: 0.08em;
  }
  .constellation-popover {
    left: 1rem;
    right: 1rem;
    top: auto;
    bottom: calc(var(--bar-height) + 3.6rem);
    width: auto;
  }
  .slide__stage { order: 2; width: 100%; }
  .dial { display: none; }

  .mobile-jump {
    display: block;
    position: fixed; inset: 0;
    z-index: 86; pointer-events: none;
  }
  .mobile-jump__btn {
    position: absolute; right: 1rem; bottom: calc(var(--bar-height) + 0.9rem);
    pointer-events: auto;
    border: 1px solid var(--line-strong); border-radius: 999px;
    background: rgba(11,9,6,0.82); color: var(--paper);
    padding: 0.58rem 0.9rem;
    font-family: var(--font-mono); font-size: 0.76rem; letter-spacing: 0.08em;
    box-shadow: 0 14px 34px rgba(0,0,0,0.44);
    backdrop-filter: blur(10px);
  }
  .mobile-jump__backdrop {
    position: absolute; inset: 0;
    background: rgba(0,0,0,0.42);
    opacity: 0; transition: opacity 160ms ease;
  }
  .mobile-jump__panel {
    position: absolute; left: 0; right: 0; bottom: 0;
    max-height: min(72vh, 34rem);
    padding: 1rem 1rem calc(var(--bar-height) + 1rem);
    border-top: 1px solid var(--line-strong);
    background: rgba(11,9,6,0.96);
    box-shadow: 0 -24px 70px rgba(0,0,0,0.55);
    transform: translateY(105%);
    transition: transform 180ms ease;
    pointer-events: auto;
  }
  .mobile-jump.is-open { pointer-events: auto; }
  .mobile-jump.is-open .mobile-jump__backdrop { opacity: 1; pointer-events: auto; }
  .mobile-jump.is-open .mobile-jump__panel { transform: translateY(0); }
  .mobile-jump__head {
    display: flex; align-items: center; justify-content: space-between; gap: 1rem;
    margin: 0 0 0.7rem;
    color: var(--paper);
  }
  .mobile-jump__head strong {
    font-family: var(--font-serif); font-size: 1.05rem;
  }
  .mobile-jump__close {
    border: 1px solid var(--line); border-radius: 999px;
    background: transparent; color: var(--paper-faint);
    padding: 0.34rem 0.58rem;
    font-family: var(--font-mono); font-size: 0.66rem;
  }
  .mobile-jump__list {
    display: grid; gap: 0.42rem;
    max-height: calc(min(72vh, 34rem) - 6rem);
    overflow: auto;
    padding-right: 0.2rem;
  }
  .mobile-jump__item {
    display: grid; grid-template-columns: 4.4rem 1fr; align-items: baseline; gap: 0.72rem;
    width: 100%;
    border: 1px solid var(--line); border-radius: 2px;
    background: rgba(239,231,214,0.035); color: var(--paper-dim);
    padding: 0.72rem 0.78rem;
    text-align: left;
  }
  .mobile-jump__item:active { background: rgba(239,231,214,0.08); }
  .mobile-jump__item--no-era { grid-template-columns: 1fr; }
  .mobile-jump__era {
    justify-self: end;
    font-family: var(--font-mono); font-size: 0.68rem; color: var(--paper-faint);
  }
  .mobile-jump__item--no-era .mobile-jump__era { display: none; }
  .mobile-jump__label {
    color: var(--c, var(--amber)); font-weight: 700; font-size: 0.95rem;
  }
}
