/* ============================================================
   AI 锻炼 · 动态叙事页
   5 幕 + 封面 + 尾声；滚动驱动，一屏一幕。
   设计约束：只用 transform / opacity 做动效；不引入外部字体与图库。
   ============================================================ */

:root {
  --ink: #0A0B0D;
  --ink-2: #12151A;
  --paper: #F2EFE9;

  --mint: #35E0A1;
  --cyan: #43D9FF;
  --violet: #A79BFF;
  --ember: #FF6B3D;

  --ff: "Microsoft YaHei UI", "Microsoft YaHei Light", "PingFang SC", "HarmonyOS Sans SC", system-ui, -apple-system, sans-serif;
  --fm: "Cascadia Mono", Consolas, "SF Mono", ui-monospace, monospace;

  --pad: clamp(22px, 6vw, 104px);
  --ease: cubic-bezier(.16, 1, .3, 1);
}

/* 明暗两套前景色：封面是纸白，其余是深色影像 */
body[data-tone="dark"] {
  --fg: #F7F5F1;
  --fg-dim: rgba(247, 245, 241, .68);
  --fg-faint: rgba(247, 245, 241, .42);
  --line: rgba(247, 245, 241, .16);
  --glass: rgba(10, 12, 15, .52);
  --glass-line: rgba(255, 255, 255, .14);
}
body[data-tone="light"] {
  --fg: #14171B;
  --fg-dim: rgba(20, 23, 27, .64);
  --fg-faint: rgba(20, 23, 27, .38);
  --line: rgba(20, 23, 27, .16);
  --glass: rgba(255, 255, 255, .55);
  --glass-line: rgba(20, 23, 27, .1);
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--ink);
  color: var(--fg);
  font-family: var(--ff);
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  transition: color .6s ease;
}

h1, h2, p, ul, figure, blockquote { margin: 0; padding: 0; }
ul { list-style: none; }
a { color: inherit; text-decoration: none; }
b, strong { font-weight: 600; }
em { font-style: normal; }

/* ── 卷轴：N 幕 = N 屏高，舞台 sticky 固定 ── */
.film {
  --acts: 7;
  position: relative;
  height: calc(var(--acts) * 100vh);
  height: calc(var(--acts) * 100svh);
}
.stage {
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100svh;
  overflow: hidden;
  isolation: isolate;
}

/* ── 背景层 ── */
.layer {
  position: absolute;
  inset: 0;
  z-index: 0;
  opacity: 0;
  background-size: cover;
  background-position: center;
  transform: scale(1.02);
  will-change: opacity, transform;
}
.layer--paper { background: radial-gradient(120% 100% at 78% 42%, #FFFFFF 0%, #F4F1EB 46%, #E6E1D7 100%); }
.layer--ink { background: radial-gradient(110% 90% at 50% 18%, #161A20 0%, #0A0B0D 62%); }

/* 结尾的「回忆」底纹：两张居家 / 竹影图低透明度交替，呼应「练回生活里」 */
.memory {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0;
  filter: grayscale(.3) brightness(.5);
  animation: mem 22s ease-in-out infinite;
  will-change: opacity;
}
.memory--b { animation-delay: 11s; }
@keyframes mem {
  0%, 4% { opacity: 0; }
  12%, 42% { opacity: .42; }
  50%, 100% { opacity: 0; }
}
.memory__wash {
  position: absolute;
  inset: 0;
  background: radial-gradient(115% 95% at 50% 20%, rgba(24, 28, 34, .74) 0%, rgba(10, 11, 13, .93) 58%, #0A0B0D 100%);
}

/* 第二机位：正文落位后「切镜」 */
.layer--alt {
  z-index: 1;
  opacity: 0;
  transition: opacity 1.1s ease;
}
.layer--alt.cut { opacity: 1; }

@keyframes kb {
  from { transform: scale(1.02) translate3d(0, 0, 0); }
  to   { transform: scale(1.13) translate3d(-1.2%, -1.4%, 0); }
}
.layer.burns { animation: kb 18s ease-out both; }
.layer--alt.cut { animation: kb 22s ease-out both; }

/* 压暗层：文字在哪一侧，就压哪一侧 */
.layer__scrim { position: absolute; inset: 0; display: block; }
.layer[data-act="1"] .layer__scrim {
  background:
    linear-gradient(270deg, rgba(6, 8, 10, .95) 0%, rgba(6, 8, 10, .82) 26%, rgba(6, 8, 10, .3) 58%, rgba(6, 8, 10, .06) 82%),
    linear-gradient(0deg, rgba(6, 8, 10, .7), transparent 46%);
}
.layer[data-act="2"] .layer__scrim {
  background:
    linear-gradient(90deg, rgba(8, 10, 12, .93) 0%, rgba(8, 10, 12, .76) 30%, rgba(8, 10, 12, .18) 64%, transparent 88%),
    linear-gradient(0deg, rgba(8, 10, 12, .72), transparent 50%);
}
.layer[data-act="3"] .layer__scrim {
  background:
    linear-gradient(90deg, rgba(6, 7, 12, .94) 0%, rgba(6, 7, 12, .8) 30%, rgba(6, 7, 12, .34) 62%, rgba(6, 7, 12, .12) 86%),
    linear-gradient(0deg, rgba(6, 7, 12, .78), transparent 48%),
    radial-gradient(70% 60% at 70% 40%, transparent 0%, rgba(4, 5, 10, .35) 100%);
}
.layer[data-act="4"] .layer__scrim {
  background:
    linear-gradient(90deg, rgba(8, 12, 12, .94) 0%, rgba(8, 12, 12, .84) 32%, rgba(8, 12, 12, .3) 66%, rgba(8, 12, 12, .08) 88%),
    linear-gradient(0deg, rgba(8, 12, 12, .74), transparent 50%);
}
.layer[data-act="5"] .layer__scrim {
  background:
    linear-gradient(270deg, rgba(12, 16, 12, .92) 0%, rgba(12, 16, 12, .8) 28%, rgba(12, 16, 12, .26) 60%, rgba(12, 16, 12, .04) 84%),
    linear-gradient(0deg, rgba(12, 16, 12, .68), transparent 46%);
}

/* 胶片颗粒 */
.grain {
  position: absolute;
  inset: -50%;
  z-index: 2;
  pointer-events: none;
  opacity: .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='.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: grain 8s steps(6) infinite;
}
@keyframes grain {
  0%, 100% { transform: translate3d(0, 0, 0); }
  16% { transform: translate3d(-3%, 2%, 0); }
  33% { transform: translate3d(2%, -3%, 0); }
  50% { transform: translate3d(-2%, -2%, 0); }
  66% { transform: translate3d(3%, 1%, 0); }
  83% { transform: translate3d(-1%, 3%, 0); }
}

/* 第 2 幕的扫描线：暗示「正在读取」 */
.scan { position: absolute; inset: 0; z-index: 2; pointer-events: none; opacity: 0; transition: opacity .8s ease; }
body[data-act="2"] .scan { opacity: 1; }
.scan i {
  position: absolute;
  left: 0; right: 0; height: 22vh;
  background: linear-gradient(180deg, transparent, rgba(53, 224, 161, .08) 60%, rgba(53, 224, 161, .22) 96%, transparent);
  animation: scan 5.5s cubic-bezier(.45, 0, .55, 1) infinite;
}
@keyframes scan {
  0%   { transform: translate3d(0, -25vh, 0); }
  100% { transform: translate3d(0, 105vh, 0); }
}

/* ── 幕 ── */
.act {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: flex;
  align-items: center;
  padding: 13vh var(--pad) 16vh;
  opacity: 0;
  will-change: opacity, transform;
}
.act[data-align="left"]  { justify-content: flex-start; }
.act[data-align="right"] { justify-content: flex-end; }
.act[data-align="center"] { justify-content: center; text-align: center; }

.act__inner { width: min(640px, 46vw); }

/* ── 文字组件 ── */
.kicker {
  display: flex;
  align-items: center;
  gap: 14px;
  font-family: var(--fm);
  font-size: 11px;
  letter-spacing: .34em;
  text-transform: uppercase;
  color: var(--fg-dim);
  text-shadow: 0 1px 8px rgba(0, 0, 0, .55);
  opacity: 0;
  transform: translateY(10px);
  transition: opacity .8s ease .12s, transform .8s var(--ease) .12s;
}
.in .kicker { opacity: 1; transform: none; }
.kicker b { color: var(--mint); font-weight: 400; letter-spacing: .18em; }
body[data-tone="light"] .kicker { text-shadow: none; }
body[data-tone="light"] .kicker b { color: #1E9C74; }
.kicker__line { width: 42px; height: 1px; background: currentColor; opacity: .5; }
.kicker__dot { width: 6px; height: 6px; border-radius: 50%; background: var(--mint); box-shadow: 0 0 0 4px rgba(53, 224, 161, .18); }
.kicker--center { justify-content: center; }

.title, .cover__title, .endcard__title {
  margin-top: 22px;
  font-size: clamp(27px, 3.15vw, 50px);
  font-weight: 300;
  line-height: 1.44;
  letter-spacing: .01em;
  color: var(--fg);
}

.line { display: block; overflow: hidden; padding-bottom: .06em; }
.line > i {
  display: block;
  transform: translateY(112%);
  transition: transform 1.05s var(--ease);
}
.in .line:nth-child(1) > i { transition-delay: .08s; }
.in .line:nth-child(2) > i { transition-delay: .17s; }
.in .line:nth-child(3) > i { transition-delay: .26s; }
.in .line > i { transform: none; }

.hl {
  background: linear-gradient(100deg, var(--mint), var(--cyan) 55%, var(--violet));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.body {
  margin-top: 26px;
  max-width: 33em;
  font-size: clamp(14px, 1.02vw, 16px);
  line-height: 2.05;
  color: var(--fg-dim);
  opacity: 0;
  transform: translateY(14px);
  transition: opacity .9s ease .38s, transform .9s var(--ease) .38s;
}
.in .body { opacity: 1; transform: none; }

.pull {
  margin-top: 28px;
  padding-left: 18px;
  border-left: 1px solid var(--mint);
  font-size: clamp(15px, 1.15vw, 18px);
  line-height: 1.9;
  color: var(--fg);
  opacity: 0;
  transform: translateY(14px);
  transition: opacity .9s ease .5s, transform .9s var(--ease) .5s;
}
.in .pull { opacity: 1; transform: none; }

/* ── 封面 ── */
.act--cover { align-items: center; }
.cover { position: relative; width: min(1240px, 100%); }

.cover__title { margin-top: 24px; font-size: clamp(34px, 5.4vw, 82px); line-height: 1.25; }
.cover__sub {
  margin-top: 26px;
  max-width: 25em;
  font-size: clamp(14px, 1.1vw, 17px);
  line-height: 2;
  color: var(--fg-dim);
  opacity: 0;
  transform: translateY(14px);
  transition: opacity .9s ease .44s, transform .9s var(--ease) .44s;
}
.in .cover__sub { opacity: 1; transform: none; }

.cover__meta {
  display: flex;
  gap: 34px;
  margin-top: 46px;
  opacity: 0;
  transform: translateY(14px);
  transition: opacity .9s ease .56s, transform .9s var(--ease) .56s;
}
.in .cover__meta { opacity: 1; transform: none; }
.cover__meta li { display: flex; align-items: baseline; gap: 8px; }
.cover__meta b {
  font-family: var(--fm);
  font-size: clamp(20px, 1.8vw, 26px);
  font-weight: 400;
  color: var(--fg);
  font-variant-numeric: tabular-nums;
}
.cover__meta span { font-size: 12px; letter-spacing: .12em; color: var(--fg-faint); }
.cover__meta li + li::before {
  content: "";
  width: 1px; height: 12px;
  margin-right: 26px;
  background: var(--line);
}

/* 封面右侧的仪表盘 */
.ring {
  position: absolute;
  right: -1vw;
  top: 50%;
  width: clamp(220px, 25vw, 360px);
  aspect-ratio: 1;
  transform: translateY(-50%);
  opacity: 0;
  transition: opacity 1.4s ease .2s;
}
.in .ring { opacity: .92; }
.ring__ticks {
  position: absolute; inset: 0;
  border-radius: 50%;
  color: rgba(20, 23, 27, .32);
  background: repeating-conic-gradient(from 0deg, currentColor 0deg .35deg, transparent .35deg 2.5deg);
  -webkit-mask: radial-gradient(circle, transparent 63%, #000 63.5%, #000 66%, transparent 66.5%);
  mask: radial-gradient(circle, transparent 63%, #000 63.5%, #000 66%, transparent 66.5%);
  animation: spin 90s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.ring__arc { position: absolute; inset: 8%; width: 84%; height: 84%; overflow: visible; }
.arc { fill: none; stroke-width: 1.6; stroke-linecap: round; transform: rotate(-90deg); transform-origin: 50% 50%; }
.arc--bg { stroke: rgba(20, 23, 27, .1); stroke-width: 1; }
.arc--mint {
  stroke: var(--mint);
  stroke-dasharray: 540.4;
  stroke-dashoffset: 540.4;
  transition: stroke-dashoffset 2.6s cubic-bezier(.22, .8, .2, 1) .3s;
}
.in .arc--mint { stroke-dashoffset: 205; }
.arc--violet {
  stroke: rgba(167, 155, 255, .85);
  stroke-dasharray: 427.3;
  stroke-dashoffset: 427.3;
  transition: stroke-dashoffset 2.2s cubic-bezier(.22, .8, .2, 1) .7s;
}
.in .arc--violet { stroke-dashoffset: 300; }

.ring__core {
  position: absolute; inset: 0;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 4px;
}
.ring__core b {
  font-family: var(--fm);
  font-size: clamp(26px, 3vw, 40px);
  font-weight: 400;
  line-height: 1;
  color: var(--fg);
  font-variant-numeric: tabular-nums;
}
.ring__core small {
  font-family: var(--fm);
  font-size: 9px;
  letter-spacing: .3em;
  color: var(--fg-faint);
}

.scrollhint {
  position: absolute;
  left: 50%;
  bottom: 13vh;
  display: flex;
  align-items: center;
  gap: 12px;
  transform: translateX(-50%);
  font-family: var(--fm);
  font-size: 10px;
  letter-spacing: .26em;
  color: var(--fg-faint);
  opacity: 0;
  animation: fadein 1s ease 1.6s forwards;
}
.scrollhint i {
  display: block; width: 1px; height: 34px;
  background: linear-gradient(180deg, transparent, currentColor);
  animation: drip 2.2s ease-in-out infinite;
}
@keyframes drip { 0%, 100% { opacity: .25; } 50% { opacity: 1; } }
@keyframes fadein { to { opacity: 1; } }

/* ── HUD 卡片 ── */
.hud {
  margin-top: 34px;
  width: min(430px, 100%);
  padding: 18px 20px 16px;
  border: 1px solid var(--glass-line);
  border-radius: 16px;
  background: var(--glass);
  -webkit-backdrop-filter: blur(16px) saturate(1.15);
  backdrop-filter: blur(16px) saturate(1.15);
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 1s ease .55s, transform 1s var(--ease) .55s;
}
.in .hud { opacity: 1; transform: none; }

.hud__head {
  display: flex; align-items: center; justify-content: space-between;
  padding-bottom: 12px;
  margin-bottom: 4px;
  border-bottom: 1px solid var(--glass-line);
}
.rec {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--fm); font-size: 10px; letter-spacing: .22em;
  color: var(--fg);
}
.rec i {
  width: 6px; height: 6px; border-radius: 50%;
  background: #FF4D4D;
  box-shadow: 0 0 10px rgba(255, 77, 77, .8);
  animation: blink 1.6s steps(2) infinite;
}
@keyframes blink { 50% { opacity: .2; } }
.hud__tag { font-family: var(--fm); font-size: 10px; letter-spacing: .12em; color: var(--mint); }

.rows li {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 3px 14px;
  padding: 10px 0;
  border-bottom: 1px solid rgba(255, 255, 255, .07);
}
.rows li:last-child { border-bottom: 0; }
.rows span { font-size: 12.5px; letter-spacing: .06em; color: var(--fg-dim); }
.rows b {
  font-family: var(--fm);
  font-size: 15px;
  font-weight: 400;
  color: var(--fg);
  font-variant-numeric: tabular-nums;
}
.rows em { font-size: 10px; margin-left: 2px; color: var(--fg-faint); }
.bar {
  grid-column: 1 / -1;
  height: 2px;
  margin-top: 5px;
  background: rgba(255, 255, 255, .1);
  overflow: hidden;
}
.bar i {
  display: block; height: 100%;
  background: linear-gradient(90deg, var(--mint), var(--cyan));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 1.2s var(--ease) .8s;
}
.in .bar i { transform: scaleX(var(--v, .5)); }

/* 街机风 HUD：图里已经有 COMBO ×8，这里改成「得分 + 三项读数」，避免重复 */
.hud--arcade {
  display: flex; align-items: center; gap: 24px;
  width: fit-content;
  max-width: 100%;
  border-color: rgba(67, 217, 255, .28);
  box-shadow: 0 0 60px rgba(67, 217, 255, .12) inset;
}
.score {
  display: flex; flex-direction: column; gap: 6px;
  padding-right: 24px;
  border-right: 1px solid rgba(255, 255, 255, .12);
}
.score__label { font-family: var(--fm); font-size: 9.5px; letter-spacing: .22em; color: var(--cyan); opacity: .8; }
.score b {
  font-family: var(--fm);
  font-size: 36px;
  font-weight: 500;
  line-height: 1;
  color: #EAFBFF;
  font-variant-numeric: tabular-nums;
  text-shadow: 0 0 18px rgba(67, 217, 255, .7), 0 0 46px rgba(67, 217, 255, .3);
}
.arcade-stats { display: flex; gap: 20px; }
.arcade-stats div { display: flex; flex-direction: column; gap: 2px; }
.arcade-stats span { font-size: 10px; letter-spacing: .16em; color: var(--fg-faint); }
.arcade-stats b {
  font-family: var(--fm); font-size: 15px; font-weight: 400;
  color: var(--fg); font-variant-numeric: tabular-nums;
}
.arcade-stats em { font-size: 9px; margin-left: 3px; color: var(--fg-faint); }

/* 治疗师评估卡 */
.note {
  margin-top: 30px;
  width: min(460px, 100%);
  padding: 18px 20px;
  border: 1px solid var(--glass-line);
  border-left: 2px solid var(--mint);
  border-radius: 4px 14px 14px 4px;
  background: var(--glass);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 1s ease .62s, transform 1s var(--ease) .62s;
}
.in .note { opacity: 1; transform: none; }
.note__head { display: flex; align-items: center; justify-content: space-between; }
.note__who { font-size: 11px; letter-spacing: .2em; color: var(--mint); }
.badge {
  padding: 3px 9px;
  border: 1px solid rgba(255, 184, 77, .5);
  border-radius: 999px;
  font-size: 10px;
  letter-spacing: .14em;
  color: #FFC46B;
  background: rgba(255, 184, 77, .1);
}
.note blockquote {
  margin: 12px 0 10px;
  font-size: 13.5px;
  line-height: 1.95;
  color: var(--fg);
}
.note figcaption {
  font-family: var(--fm);
  font-size: 10px;
  letter-spacing: .1em;
  color: var(--fg-faint);
}

.chips {
  display: flex; flex-wrap: wrap; gap: 8px;
  margin-top: 18px;
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 1s ease .74s, transform 1s var(--ease) .74s;
}
.in .chips { opacity: 1; transform: none; }
.chips li {
  padding: 5px 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 11px;
  letter-spacing: .06em;
  color: var(--fg-dim);
}

/* 30 天打卡 */
.days { margin-top: 34px; opacity: 0; transform: translateY(14px); transition: opacity 1s ease .55s, transform 1s var(--ease) .55s; }
.in .days { opacity: 1; transform: none; }
.days__grid {
  display: grid;
  grid-template-columns: repeat(10, 1fr);
  gap: 7px;
  width: min(340px, 100%);
}
.day {
  aspect-ratio: 1;
  border-radius: 2px;
  background: rgba(255, 255, 255, .12);
  transform: scale(.55);
  opacity: 0;
  transition: transform .5s var(--ease), opacity .5s ease, background .5s ease;
}
.in .day {
  opacity: 1;
  transform: none;
  background: var(--c, rgba(53, 224, 161, .85));
  transition-delay: calc(var(--i) * 34ms + .6s);
}
.days__cap {
  margin-top: 16px;
  font-family: var(--fm);
  font-size: 11px;
  letter-spacing: .12em;
  color: var(--fg-dim);
}
.days__cap b { color: var(--fg); font-weight: 400; }

/* ── 尾声 ── */
.act--end { align-items: center; }
.endcard { width: min(760px, 100%); }
.endcard__title { margin-top: 18px; font-size: clamp(32px, 4.6vw, 66px); line-height: 1.3; }
.endcard__sub {
  margin-top: 18px;
  font-family: var(--fm);
  font-size: 12px;
  letter-spacing: .26em;
  color: var(--fg-faint);
  opacity: 0;
  transition: opacity 1s ease .4s;
}
.in .endcard__sub { opacity: 1; }

.endcard__cta {
  display: flex; justify-content: center; flex-wrap: wrap; gap: 12px;
  margin-top: 40px;
  opacity: 0;
  transform: translateY(14px);
  transition: opacity .9s ease .5s, transform .9s var(--ease) .5s;
}
.in .endcard__cta { opacity: 1; transform: none; }
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 16px 32px;
  border-radius: 999px;
  font-size: 14.5px;
  letter-spacing: .06em;
  transition: transform .4s var(--ease), background .3s ease, color .3s ease, border-color .3s ease;
}
.btn--solid { background: #F7F5F1; color: #0A0B0D; }
.btn--solid span { transition: transform .4s var(--ease); }
.btn--solid:hover { transform: translateY(-2px); }
.btn--solid:hover span { transform: translateX(4px); }
.btn--ghost { border: 1px solid var(--line); color: var(--fg); }
.btn--ghost:hover { border-color: rgba(247, 245, 241, .5); background: rgba(255, 255, 255, .06); }

.endcard__url {
  display: flex; align-items: center; justify-content: center; gap: 9px;
  margin-top: 26px;
  font-family: var(--fm);
  font-size: 11.5px;
  letter-spacing: .06em;
  color: var(--fg-faint);
  opacity: 0;
  transition: opacity 1s ease .66s;
}
.in .endcard__url { opacity: 1; }
.endcard__url .dot { width: 5px; height: 5px; border-radius: 50%; background: var(--mint); }

.endcard__facts {
  display: flex; justify-content: center; flex-wrap: wrap; gap: 10px 28px;
  margin-top: 34px;
  opacity: 0;
  transition: opacity 1s ease .74s;
}
.in .endcard__facts { opacity: 1; }
.endcard__facts li { font-size: 12px; letter-spacing: .16em; color: var(--fg-dim); }

.endcard__privacy {
  margin-top: 34px;
  font-size: 11.5px;
  line-height: 2;
  color: rgba(247, 245, 241, .34);
  opacity: 0;
  transition: opacity 1s ease .82s;
}
.in .endcard__privacy { opacity: 1; }

/* ── 界面框架 ── */
.chrome {
  position: absolute;
  left: 0; right: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 var(--pad);
  color: var(--fg);
  text-shadow: 0 1px 10px rgba(0, 0, 0, .45);
  transition: color .6s ease;
}
body[data-tone="light"] .chrome { text-shadow: none; }
.chrome--top { top: 0; height: 9vh; min-height: 56px; }
.chrome--bottom { bottom: 0; flex-direction: column; align-items: stretch; }

.brand { display: inline-flex; align-items: center; gap: 11px; }
.brand__mark {
  position: relative;
  width: 18px; height: 18px;
  border: 1px solid currentColor;
  border-radius: 50%;
  opacity: .8;
}
.brand__mark i {
  position: absolute; inset: 3px;
  border-radius: 50%;
  background: var(--mint);
  animation: pulse 3.4s ease-in-out infinite;
}
@keyframes pulse { 0%, 100% { transform: scale(.7); opacity: .55; } 50% { transform: scale(1); opacity: 1; } }
.brand__text { font-size: 13px; letter-spacing: .3em; }
.brand__text b { font-weight: 600; }
body[data-tone="light"] .brand__mark i { background: #1E9C74; }

.chapter {
  display: flex; align-items: center; gap: 8px;
  font-family: var(--fm);
  font-size: 11px;
  letter-spacing: .2em;
  color: var(--fg-faint);
}
.chapter em { opacity: .4; }

/* 右侧章节点 */
.rail {
  position: absolute;
  right: clamp(20px, 2.4vw, 46px);
  top: 50%;
  z-index: 5;
  display: flex;
  flex-direction: column;
  gap: 14px;
  transform: translateY(-50%);
}
.rail__dot {
  display: flex; align-items: center; gap: 10px;
  padding: 0; border: 0; background: none;
  color: var(--fg-faint);
  cursor: pointer;
  font: inherit;
}
.rail__tick {
  width: 14px; height: 1px;
  background: currentColor;
  transition: width .45s var(--ease), background .45s ease, height .45s ease;
}
.rail__label {
  position: absolute; right: 26px;
  font-family: var(--fm); font-size: 10px; letter-spacing: .14em;
  white-space: nowrap;
  opacity: 0;
  transform: translateX(6px);
  transition: opacity .3s ease, transform .3s ease;
  pointer-events: none;
}
.rail__dot:hover .rail__label,
.rail__dot:focus-visible .rail__label { opacity: 1; transform: none; }
.rail__dot.on .rail__tick { width: 30px; height: 2px; background: var(--mint); }
.rail__dot.on { color: var(--fg); }
body[data-tone="light"] .rail__dot.on .rail__tick { background: #1E9C74; }

/* 进度与控件 */
.progress {
  height: 1px;
  background: var(--line);
  margin: 0 var(--pad);
}
.progress span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--mint), var(--cyan));
  transform: scaleX(0);
  transform-origin: left;
  will-change: transform;
}
.chrome__row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px var(--pad) 18px;
}
.hint {
  font-family: var(--fm);
  font-size: 10px;
  letter-spacing: .22em;
  color: var(--fg-faint);
}
.ctrl { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.ctrl__btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 7px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  color: var(--fg-dim);
  font: 11px/1 var(--fm);
  letter-spacing: .12em;
  cursor: pointer;
  transition: color .3s ease, border-color .3s ease, background .3s ease;
}
.ctrl__btn:hover { color: var(--fg); border-color: rgba(255, 255, 255, .4); }
body[data-tone="light"] .ctrl__btn:hover { border-color: rgba(20, 23, 27, .4); }
.ctrl__btn[aria-pressed="true"] { color: var(--mint); border-color: rgba(53, 224, 161, .5); }
.ctrl__btn--icon { width: 32px; justify-content: center; padding: 7px 0; }
.ctrl__btn .ico { font-size: 9px; }

/* ── 载入遮罩 ── */
.boot {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  background: var(--paper);
  color: #14171B;
  animation: bootOut .7s ease 4s forwards;
}
.boot.gone { opacity: 0; pointer-events: none; transition: opacity .7s ease; }
@keyframes bootOut { to { opacity: 0; visibility: hidden; } }
.boot__inner { display: flex; flex-direction: column; align-items: center; gap: 16px; }
.boot__mark {
  position: relative;
  width: 34px; height: 34px;
  border: 1px solid rgba(20, 23, 27, .3);
  border-radius: 50%;
}
.boot__mark i {
  position: absolute; inset: 6px;
  border-radius: 50%;
  background: #1E9C74;
  animation: pulse 1.6s ease-in-out infinite;
}
.boot__label { font-family: var(--fm); font-size: 10px; letter-spacing: .3em; color: rgba(20, 23, 27, .5); }
.boot__bar { width: 120px; height: 1px; background: rgba(20, 23, 27, .15); overflow: hidden; }
.boot__bar i {
  display: block; width: 40%; height: 100%;
  background: #1E9C74;
  animation: load 1.4s ease-in-out infinite;
}
@keyframes load {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(320%); }
}

/* ── 自适应 ── */
@media (max-width: 1080px) {
  .act__inner { width: min(600px, 62vw); }
}

@media (max-width: 860px) {
  :root { --pad: 22px; }
  .rail { display: none; }
  .act, .act[data-align="right"], .act[data-align="left"] { justify-content: flex-start; padding: 14vh 22px 17vh; }
  .act__inner { width: 100%; }
  .title { font-size: clamp(24px, 6.6vw, 34px); line-height: 1.5; }
  .body { max-width: 100%; }
  .cover__title { font-size: clamp(30px, 9vw, 46px); }
  .ring {
    position: relative;
    right: auto; top: auto;
    transform: none;
    width: 156px;
    margin: 0 0 26px;
  }
  .in .ring { opacity: .8; }
  .scrollhint { bottom: 12vh; font-size: 9px; letter-spacing: .18em; }
  .hud--arcade { flex-direction: column; align-items: flex-start; gap: 14px; }
  .score { padding-right: 0; padding-bottom: 12px; border-right: 0; border-bottom: 1px solid rgba(255, 255, 255, .12); width: 100%; }
  .arcade-stats { gap: 18px; }
  .endcard__title { font-size: clamp(28px, 8.4vw, 40px); }
  .endcard__cta { flex-direction: column; align-items: center; }
  .btn { width: 100%; justify-content: center; }
  .pc { display: none; }
  .cover__meta {
    display: grid;
    grid-template-columns: repeat(3, auto);
    gap: 10px 16px;
    margin-top: 30px;
    justify-content: start;
  }
  .cover__meta li + li::before { display: none; }
  .cover__meta b { font-size: 18px; }
  .cover__meta span { font-size: 10.5px; letter-spacing: .06em; }
  .chrome--top { height: 7vh; min-height: 48px; }
  .hint { display: none; }
}

@media (max-height: 780px) {
  .act { padding-top: 11vh; padding-bottom: 13vh; }
  .title { font-size: clamp(24px, 2.7vw, 40px); line-height: 1.4; }
  .body { margin-top: 18px; line-height: 1.85; }
  .pull { margin-top: 18px; }
  .hud, .note, .days { margin-top: 20px; }
  .hud { padding: 14px 16px; }
  .rows li { padding: 7px 0; }
  .cover__meta { margin-top: 26px; }
  .cover__sub { margin-top: 18px; }
  .endcard__cta { margin-top: 26px; }
  .endcard__facts, .endcard__url { margin-top: 18px; }
}

@media (max-height: 620px) {
  .act { padding-top: 9vh; padding-bottom: 11vh; }
  .hud, .note, .days, .chips { margin-top: 14px; }
  .chips { display: none; }
  .note blockquote { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .grain, .scan i, .ring__ticks, .brand__mark i, .rec i, .boot__bar i { animation: none !important; }
  .layer.burns, .layer--alt.cut { animation: none !important; }
  .memory { animation: none !important; opacity: .16; }
  .memory--b { opacity: 0; }
  .line > i { transition-duration: .01ms; }
  .bar i { transition-duration: .01ms; }
}
