/*
 * ml-history.css — 专题页《百年长夜与黎明》(机器学习群星史)
 * 电影质感 · 横向一屏一幕 · 底部胶片时间线随滚动聚焦。
 * 视觉随时代推进: 蓝图 → 寒冬 → 统计网格 → 深度光谱 → 群星。
 * 图片走外链, 不在仓库内存图。纯静态零依赖, 不复用 book.css。
 */

:root {
  --paper: #efe7d6;
  --paper-dim: #b9ad98;
  --paper-faint: #857b6c;
  --ink: #07070a;

  --reel-h: clamp(40px, 6vh, 58px);
  --strip-h: clamp(104px, 15vh, 150px);

  --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;

  /* 默认(intro)主题 */
  --accent: #e3b15c;
  --glow-1: rgba(227, 177, 92, 0.16);
  --glow-2: rgba(130, 169, 255, 0.08);
  --base: #0b0a08;
}

/* ============================================================= */
/* 每个时代的主题色: 由 body[data-theme] 驱动, 平滑过渡           */
/* ============================================================= */
body[data-theme="intro"]      { --accent:#e3b15c; --glow-1:rgba(227,177,92,.16); --glow-2:rgba(130,169,255,.08); --base:#0b0a08; }
body[data-theme="symbol"]     { --accent:#8fb3e6; --glow-1:rgba(143,179,230,.15); --glow-2:rgba(239,231,214,.05); --base:#080d16; }
body[data-theme="connection"] { --accent:#e0a24e; --glow-1:rgba(224,162,78,.17);  --glow-2:rgba(224,110,88,.08);  --base:#120f0a; }
body[data-theme="winter"]     { --accent:#93a6bd; --glow-1:rgba(120,140,168,.13); --glow-2:rgba(200,214,235,.04); --base:#070a0f; }

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

body {
  margin: 0;
  height: 100vh; height: 100dvh;
  overflow: hidden;
  color: var(--paper);
  font-family: var(--font-sans);
  background:
    radial-gradient(120% 90% at 20% 8%, var(--glow-1), transparent 60%),
    radial-gradient(110% 80% at 82% 96%, var(--glow-2), transparent 62%),
    linear-gradient(180deg, var(--base) 0%, #050506 100%);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  transition: background 620ms ease;
}
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }

/* 时代纹理层: 随主题变化, 低调铺底 */
body::before {
  content: "";
  position: fixed; inset: 0; z-index: 0;
  pointer-events: none;
  opacity: 0.9;
  transition: opacity 620ms ease;
}
body[data-theme="intro"]::before {
  background: radial-gradient(120% 92% at 50% 42%, transparent 46%, rgba(0,0,0,.6));
}
body[data-theme="symbol"]::before {
  background-image:
    linear-gradient(rgba(143,179,230,.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(143,179,230,.07) 1px, transparent 1px);
  background-size: 34px 34px;
  -webkit-mask-image: radial-gradient(125% 95% at 55% 48%, #000 46%, transparent);
          mask-image: radial-gradient(125% 95% at 55% 48%, #000 46%, transparent);
}
body[data-theme="connection"]::before {
  background-image:
    radial-gradient(circle at 24% 34%, rgba(224,162,78,.14) 0 1px, transparent 1.6px),
    radial-gradient(circle at 66% 70%, rgba(224,110,88,.10) 0 1px, transparent 1.6px);
  background-size: 40px 40px, 66px 66px;
  -webkit-mask-image: radial-gradient(120% 95% at 50% 50%, #000 44%, transparent);
          mask-image: radial-gradient(120% 95% at 50% 50%, #000 44%, transparent);
}
body[data-theme="winter"]::before {
  background:
    repeating-linear-gradient(180deg, rgba(210,224,245,.028) 0 1px, transparent 1px 11px),
    radial-gradient(120% 95% at 50% 50%, transparent 30%, rgba(0,0,0,.74));
}

/* 胶片颗粒 */
.mh-grain {
  position: fixed; inset: 0; z-index: 60; 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: mh-grain 820ms steps(4) infinite;
}
@keyframes mh-grain {
  0%{transform:translate(0,0)} 25%{transform:translate(-2%,1%)}
  50%{transform:translate(1%,-2%)} 75%{transform:translate(-1%,-1%)} 100%{transform:translate(2%,2%)}
}
@media (prefers-reduced-motion: reduce){ .mh-grain{ animation:none; } }

/* ============================================================= */
/* 顶部片头条 (兼作上黑边)                                         */
/* ============================================================= */
.mh-topbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 40;
  height: var(--reel-h);
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; padding: 0 clamp(0.9rem, 3vw, 2.4rem);
  background: linear-gradient(180deg, #000 0%, rgba(0,0,0,.72) 100%);
  box-shadow: 0 12px 30px rgba(0,0,0,.5);
}
.mh-brand { display: inline-flex; align-items: baseline; gap: 0.7rem; min-width: 0; }
.mh-brand__mark {
  font-family: var(--font-mono); font-size: 0.64rem; letter-spacing: 0.32em;
  color: var(--accent); text-transform: uppercase; white-space: nowrap;
  transition: color 620ms ease;
}
.mh-brand__title {
  font-family: var(--font-serif); font-size: clamp(0.78rem, 1.2vw, 0.95rem);
  color: var(--paper); white-space: nowrap;
}
.mh-topbar__right {
  display: inline-flex; align-items: center; gap: clamp(0.6rem, 2vw, 1.3rem);
  font-family: var(--font-mono); font-size: 0.64rem; letter-spacing: 0.16em;
  color: var(--paper-faint); text-transform: uppercase; white-space: nowrap;
}
.mh-code { color: var(--accent); transition: color 620ms ease; }
.mh-link {
  color: var(--paper-dim); border-bottom: 1px solid rgba(239,231,214,.22);
  padding-bottom: 1px; transition: color 160ms ease, border-color 160ms ease;
}
.mh-link:hover { color: var(--paper); border-color: var(--accent); }

/* 顶部进度细线 */
.mh-progress {
  position: fixed; left: 0; top: var(--reel-h); z-index: 41;
  height: 2px; width: 0;
  background: linear-gradient(90deg, transparent, var(--accent));
  box-shadow: 0 0 12px var(--accent);
  transition: width 160ms linear, background 620ms ease;
}

/* ============================================================= */
/* 横向放映舞台                                                   */
/* ============================================================= */
.mh-shell {
  position: relative; z-index: 1;
  height: 100vh; height: 100dvh;
  padding-top: var(--reel-h);
}
.mh-scroll {
  height: calc(100dvh - var(--reel-h) - var(--strip-h));
  overflow-x: auto; overflow-y: hidden;
  scroll-snap-type: x mandatory; scroll-behavior: smooth;
  scrollbar-width: none;
}
.mh-scroll::-webkit-scrollbar { width: 0; height: 0; }
.mh-grid { display: flex; align-items: stretch; height: 100%; width: max-content; }

/* 隐藏旧的时代带占位 */
.period { display: none; }

.milestone, .mh-hero, .constellation {
  position: relative;
  flex: 0 0 100vw; width: 100vw; height: 100%;
  scroll-snap-align: center; scroll-snap-stop: always;
  overflow: hidden;
}

/* 进屏动画: 由 JS 给当前幕加 .is-active */
.mh-hero > *, .milestone__body > *, .milestone__media, .constellation__intro > *, .constellation .tree-scroll {
  opacity: 0; transform: translateY(26px);
  transition: opacity 760ms ease, transform 760ms ease;
}
.mh-hero.is-active > *,
.milestone.is-active .milestone__body > *,
.milestone.is-active .milestone__media,
.constellation.is-active .constellation__intro > *,
.constellation.is-active .tree-scroll {
  opacity: 1; transform: none;
}
.milestone.is-active .milestone__body > *:nth-child(2){ transition-delay: 80ms; }
.milestone.is-active .milestone__body > *:nth-child(3){ transition-delay: 150ms; }
.milestone.is-active .milestone__body > *:nth-child(4){ transition-delay: 220ms; }
.milestone.is-active .milestone__body > *:nth-child(5){ transition-delay: 290ms; }
.milestone.is-active .milestone__media{ transition-delay: 160ms; }
@media (prefers-reduced-motion: reduce) {
  .mh-hero > *, .milestone__body > *, .milestone__media,
  .constellation__intro > *, .constellation .tree-scroll { opacity: 1; transform: none; }
}

/* ============================================================= */
/* 封面幕                                                         */
/* ============================================================= */
.mh-hero {
  display: grid; align-content: center; justify-items: center; text-align: center;
  padding: clamp(2rem, 6vw, 5rem);
}
.mh-hero__kicker, .mh-card__kicker {
  margin: 0 0 1.3rem; color: var(--accent);
  font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.42em;
  text-transform: uppercase; transition: color 620ms ease;
}
.mh-hero h1 {
  margin: 0; max-width: 20ch;
  font-family: var(--font-serif); font-weight: 700;
  font-size: clamp(2.6rem, 7vw, 5.4rem); line-height: 1.04; letter-spacing: 0.01em;
  color: var(--paper);
}
.mh-hero__lead {
  margin: 1.6rem auto 0; max-width: 42rem;
  color: var(--paper-dim); font-size: clamp(1rem, 1.6vw, 1.2rem); line-height: 1.9;
}
.mh-hero__lead strong { color: var(--paper); font-weight: 600; }
.mh-legend { display: flex; flex-wrap: wrap; gap: 0.5rem; justify-content: center; margin-top: 2rem; }

.tag {
  --tag: var(--paper-faint);
  display: inline-flex; align-items: center; min-height: 27px; padding: 0 0.66rem;
  border: 1px solid color-mix(in srgb, var(--tag), transparent 55%);
  border-radius: 999px; color: var(--tag);
  background: color-mix(in srgb, var(--tag), transparent 90%);
  font-family: var(--font-mono); font-size: 0.66rem; letter-spacing: 0.12em; white-space: nowrap;
}
.tag--symbol{ --tag:#8fb3e6; } .tag--connection{ --tag:#e0a24e; }

/* ============================================================= */
/* 里程碑幕                                                       */
/* ============================================================= */
.milestone {
  display: grid; align-items: center;
  grid-template-columns: minmax(0, 1.02fr) minmax(320px, 0.98fr);
  gap: clamp(1.6rem, 5vw, 5rem);
  padding: clamp(1.4rem, 4vw, 3.4rem) clamp(1.4rem, 7vw, 7.5rem);
}
/* 巨大做旧年份水印 */
.milestone::after {
  content: attr(data-year);
  position: absolute; top: -0.14em; right: clamp(-1rem, 1vw, 1.2rem);
  z-index: 0; pointer-events: none;
  font-family: var(--font-serif); font-weight: 700; font-style: italic;
  font-size: clamp(9rem, 27vw, 24rem); line-height: 1;
  color: color-mix(in srgb, var(--accent), transparent 90%);
  letter-spacing: -0.02em;
  transition: color 620ms ease;
}

.milestone__body { position: relative; z-index: 2; max-width: 34rem; }
.milestone__head { display: flex; align-items: center; gap: 0.8rem; margin-bottom: 0.9rem; }
.milestone__year {
  font-family: var(--font-mono); font-size: 0.9rem; letter-spacing: 0.22em;
  color: var(--accent); transition: color 620ms ease;
}
.milestone h2 {
  margin: 0; color: var(--paper);
  font-family: var(--font-serif); font-weight: 700;
  font-size: clamp(2rem, 4.4vw, 3.5rem); line-height: 1.14;
}
.milestone__people {
  margin: 0.7rem 0 0; color: var(--paper-dim);
  font-family: var(--font-mono); font-size: 0.78rem; letter-spacing: 0.03em; line-height: 1.6;
}
.milestone__text {
  margin: 1.1rem 0 0; color: var(--paper-dim);
  font-size: clamp(0.98rem, 1.4vw, 1.12rem); line-height: 1.82; max-width: 32rem;
}
.milestone__why {
  margin: 1.2rem 0 0; padding-left: 1rem; position: relative;
  color: var(--paper); font-size: clamp(0.95rem, 1.3vw, 1.06rem); line-height: 1.72; max-width: 32rem;
}
.milestone__why::before {
  content: ""; position: absolute; left: 0; top: 0.15em; bottom: 0.15em;
  width: 3px; border-radius: 2px; background: var(--accent);
  transition: background 620ms ease;
}

/* 右侧胶片框图 */
.milestone__media {
  position: relative; z-index: 1; justify-self: center;
  width: min(40vw, 460px); aspect-ratio: 4 / 5;
  border: 1px solid rgba(239,231,214,.16);
  background: #0c0d11;
  box-shadow: 0 30px 70px rgba(0,0,0,.55), inset 0 0 0 1px rgba(0,0,0,.4);
  overflow: hidden;
}
/* 胶片齿孔 */
.milestone__media::before {
  content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 14px; z-index: 3;
  background:
    repeating-linear-gradient(180deg, transparent 0 12px, rgba(0,0,0,.85) 12px 20px),
    rgba(12,13,17,.9);
  border-right: 1px solid rgba(239,231,214,.08);
}
.milestone__media img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; object-position: center 22%;
  filter: sepia(0.28) saturate(0.72) contrast(1.06) brightness(0.92);
}
.milestone__media::after {
  content: ""; position: absolute; inset: 0; z-index: 2; pointer-events: none;
  background:
    radial-gradient(120% 90% at 50% 40%, transparent 52%, rgba(0,0,0,.6)),
    linear-gradient(180deg, transparent 46%, rgba(7,7,10,.82));
}
.milestone__fallback {
  position: absolute; inset: 0; z-index: 1; display: none;
  align-items: center; justify-content: center; text-align: center; padding: 1.5rem 1.5rem 1.5rem 2rem;
  color: color-mix(in srgb, var(--accent), transparent 25%);
  font-family: var(--font-serif); font-style: italic; font-size: clamp(1.4rem, 3vw, 2.2rem);
  background: radial-gradient(circle, color-mix(in srgb, var(--accent), transparent 88%), transparent 70%);
}
.milestone__media.is-broken img { display: none; }
.milestone__media.is-broken .milestone__fallback { display: flex; }
.milestone__caption {
  position: absolute; left: 24px; right: 12px; bottom: 12px; z-index: 4;
  color: rgba(239,231,214,.66); font-family: var(--font-mono);
  font-size: 0.6rem; letter-spacing: 0.14em; text-transform: uppercase;
}

/* ============================================================= */
/* 终章 · 模型演化树                                              */
/* ============================================================= */
.constellation {
  display: grid; grid-template-rows: auto 1fr; align-content: center;
  gap: clamp(0.8rem, 2vw, 1.6rem);
  padding: clamp(1.2rem, 3vw, 2.4rem) clamp(1.4rem, 6vw, 6rem);
}
.constellation__intro { max-width: 46rem; }
.constellation__intro h2 {
  margin: 0.4rem 0 0; color: var(--paper);
  font-family: var(--font-serif); font-weight: 700;
  font-size: clamp(1.8rem, 3.6vw, 3rem); line-height: 1.1;
}
.constellation__intro p {
  margin: 0.9rem 0 0; color: var(--paper-dim);
  font-size: clamp(0.95rem, 1.35vw, 1.08rem); line-height: 1.8; max-width: 44rem;
}
.constellation__note {
  color: var(--paper-faint) !important;
  font-family: var(--font-mono);
  font-size: 0.72rem !important;
  letter-spacing: 0.08em;
}
.tree-scroll {
  position: relative; align-self: stretch;
  overflow-x: auto; overflow-y: hidden;
  scrollbar-width: thin; scrollbar-color: color-mix(in srgb, var(--accent), transparent 55%) transparent;
}
.tree-scroll::-webkit-scrollbar { height: 8px; }
.tree-scroll::-webkit-scrollbar-thumb { background: color-mix(in srgb, var(--accent), transparent 55%); border-radius: 999px; }

.model-tree {
  position: relative; height: 100%; min-height: 380px;
  width: min(96vw, 1180px); margin: 0 auto;
  aspect-ratio: 1180 / 560;
}
.tree-canvas {
  position: absolute; inset: 0; width: 100%; height: 100%;
}
.tree-grid line { stroke: rgba(239,231,214,.09); stroke-width: 1; stroke-dasharray: 3 8; }
.tree-grid text {
  fill: rgba(239,231,214,.34); font-family: var(--font-mono); font-size: 13px; text-anchor: end;
}
.tree-limb {
  fill: none; stroke-linecap: round;
  stroke: color-mix(in srgb, var(--accent), transparent 42%);
  stroke-width: 2.4;
  filter: drop-shadow(0 0 6px color-mix(in srgb, var(--accent), transparent 70%));
}
.tree-limb--trunk { stroke-width: 5; stroke: var(--accent); }
.tree-limb--openai    { stroke: color-mix(in srgb, #b7cdf0, transparent 40%); }
.tree-limb--google    { stroke: color-mix(in srgb, #e6a06f, transparent 45%); }
.tree-limb--anthropic { stroke: color-mix(in srgb, #d8a15c, transparent 42%); }
.tree-limb--meta      { stroke: color-mix(in srgb, #86bd97, transparent 42%); }
.tree-limb--china     { stroke: color-mix(in srgb, #6fbec9, transparent 42%); }
/* 生长动画: 幕激活时描边 */
.tree-limb {
  stroke-dasharray: 900; stroke-dashoffset: 900;
  transition: stroke-dashoffset 1400ms ease;
}
.constellation.is-active .tree-limb { stroke-dashoffset: 0; }
@media (prefers-reduced-motion: reduce) {
  .tree-limb { stroke-dashoffset: 0; transition: none; }
}

.tree-node {
  --node: var(--accent);
  position: absolute; z-index: 2; transform: translate(-50%, -50%);
  display: inline-flex; align-items: center; gap: 0.44rem;
  padding: 0.3rem 0.66rem 0.3rem 0.34rem;
  border: 1px solid color-mix(in srgb, var(--node), transparent 42%);
  border-radius: 999px; color: var(--paper);
  background: rgba(8,9,13,.86); backdrop-filter: blur(4px);
  box-shadow: 0 4px 18px rgba(0,0,0,.5), 0 0 22px color-mix(in srgb, var(--node), transparent 76%);
  font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.02em; white-space: nowrap;
}
.tree-node--open   { --node:#86bd97; }
.tree-node--closed { --node:#b7cdf0; }
.tree-node--china  { --node:#6fbec9; }
.tree-node img {
  width: 22px; height: 22px; object-fit: contain; border-radius: 50%;
  padding: 3px; background: rgba(239,231,214,.96);
}
.tree-node__fallback {
  display: none; width: 22px; height: 22px; border-radius: 50%; place-items: center;
  color: #101217; background: rgba(239,231,214,.96); font-size: 0.5rem; font-weight: 700;
}
.tree-node.is-broken img { display: none; }
.tree-node.is-broken .tree-node__fallback { display: grid; }

.tree-legend {
  position: absolute; left: 6px; bottom: -6px; z-index: 2;
  display: flex; gap: 1.2rem; color: var(--paper-faint); font-size: 0.72rem;
}
.tree-legend span { display: inline-flex; align-items: center; gap: 0.42rem; }
.tree-legend i { width: 18px; height: 3px; border-radius: 999px; }
.tree-legend__open   { background: #86bd97; }
.tree-legend__closed { background: #b7cdf0; }

/* ============================================================= */
/* 底部胶片时间线 (兼作下黑边)                                     */
/* ============================================================= */
.mh-timelinebar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
  height: var(--strip-h);
  padding: 0.7rem clamp(0.9rem, 3vw, 2.4rem) 0.6rem;
  background: linear-gradient(0deg, #000 0%, rgba(0,0,0,.72) 100%);
  box-shadow: 0 -14px 34px rgba(0,0,0,.55);
  display: grid; grid-template-rows: auto 1fr;
}
.mh-era-chip {
  justify-self: center; margin-bottom: 0.35rem;
  color: var(--paper-dim); font-family: var(--font-mono);
  font-size: 0.72rem; letter-spacing: 0.2em; text-transform: uppercase;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 90vw;
  text-align: center;
}
.mh-timelinebar__viewport {
  position: relative; overflow-x: auto; overflow-y: hidden;
  scrollbar-width: none;
  cursor: grab; touch-action: pan-x; user-select: none;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
          mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
}
.mh-timelinebar__viewport.is-dragging { cursor: grabbing; }
.mh-timelinebar__viewport::-webkit-scrollbar { display: none; }
.mh-rail-labels {
  position: absolute; left: clamp(1rem, 4vw, 3.8rem);
  top: 3.05rem; z-index: 4;
  display: grid; gap: 1.05rem; pointer-events: none;
  font-family: var(--font-mono); font-size: 0.56rem; letter-spacing: 0.15em;
  text-transform: uppercase; opacity: 0.72;
}
.mh-rail-label--symbol { color: rgba(143,179,230,.72); }
.mh-rail-label--connection { color: rgba(224,162,78,.72); }
/* 居中定位指针 (playhead): 指向弧顶当前节点 */
.mh-timelinebar::after {
  content: ""; position: absolute; left: 50%; bottom: 0.7rem; z-index: 3;
  width: 1px; height: calc(var(--strip-h) - 3.1rem);
  background: linear-gradient(180deg, var(--accent), transparent);
  transform: translateX(-0.5px); pointer-events: none; opacity: 0.55;
  transition: background 620ms ease;
}
/* 弧形轨道: 节点由 JS 按角度绝对定位到一段上凸的弧上 */
.mh-timelinebar__track {
  position: relative;
  height: calc(var(--strip-h) - 2.1rem);
  width: max-content; min-width: 100%;
}
.mh-rails {
  position: absolute; left: 0; top: 0; height: 100%;
  pointer-events: none; overflow: visible;
}
.mh-rail {
  fill: none; stroke-width: 1.5; stroke-linecap: round;
  stroke-dasharray: 4 9;
  opacity: 0.54;
}
.mh-rail--symbol { stroke: rgba(143,179,230,.66); }
.mh-rail--connection { stroke: rgba(224,162,78,.64); }

.mh-timepoint {
  --track: rgba(239,231,214,.5);
  position: absolute; top: 0; left: 0;
  transform: translateX(-50%);
  border: 0; background: transparent; cursor: pointer;
  display: grid; justify-items: center;
  white-space: nowrap;
}
.mh-timepoint__dot {
  width: 8px; height: 8px; border-radius: 50%;
  border: 1px solid color-mix(in srgb, var(--track), transparent 22%); background: #0a0b0f;
  box-shadow: 0 0 0 3px rgba(0,0,0,.8);
  transform: translateY(-50%);
  transition: all 220ms ease;
}
.mh-timepoint__year {
  position: absolute;
  top: 0.54rem;
  font-family: var(--font-mono); font-size: 0.64rem; letter-spacing: 0.05em;
  color: rgba(239,231,214,.4); transition: color 220ms ease, opacity 220ms ease;
}
.mh-timepoint--symbol { --track: #8fb3e6; }
.mh-timepoint--connection { --track: #e0a24e; }
.mh-timepoint--winter { --track: #93a6bd; }
.mh-timepoint--bridge { --track: #efe7d6; }
.mh-timepoint:hover .mh-timepoint__year { color: var(--paper-dim); }
.mh-timepoint:hover .mh-timepoint__dot { border-color: var(--paper-dim); }
.mh-timepoint.is-active .mh-timepoint__dot {
  width: 14px; height: 14px; background: var(--track);
  border-color: var(--track); box-shadow: 0 0 0 4px rgba(0,0,0,.82), 0 0 22px var(--track);
}
.mh-timepoint.is-active .mh-timepoint__year {
  color: #fff4dc; font-size: 0.74rem;
}

/* ============================================================= */
/* 左右翻页控制                                                   */
/* ============================================================= */
.mh-controls {
  position: fixed; right: clamp(0.9rem, 3vw, 2rem);
  bottom: calc(var(--strip-h) + clamp(0.7rem, 2vh, 1.2rem)); z-index: 45;
  display: flex; gap: 0.5rem;
}
.mh-control {
  width: 44px; height: 44px; border-radius: 50%;
  border: 1px solid rgba(239,231,214,.22); color: var(--paper);
  background: rgba(8,9,13,.6); backdrop-filter: blur(10px);
  font-size: 1rem; cursor: pointer;
  transition: border-color 160ms ease, color 160ms ease, transform 160ms ease;
}
.mh-control:hover { border-color: var(--accent); color: #fff3d7; transform: translateY(-1px); }

/* ============================================================= */
/* 移动端                                                         */
/* ============================================================= */
@media (max-width: 820px) {
  .mh-brand__title { display: none; }
  .mh-topbar__right .mh-hint { display: none; }
  .milestone {
    grid-template-columns: 1fr; align-content: center; justify-items: start;
    gap: 1.2rem; padding: 1.2rem 1.3rem;
  }
  .milestone__media { width: min(72vw, 320px); aspect-ratio: 4/3; justify-self: start; order: -1; }
  .milestone::after { font-size: 40vw; top: auto; bottom: 2%; opacity: 0.8; }
  .milestone__body { max-width: none; }
  .model-tree { min-width: 960px; }
}
