/* =========================================================
   视觉方向：存折本身的材料
   墨绿 PVC 封皮 · 烫金 · 薄荷绿防伪底纹纸 · 针式打印机蓝紫色带 · 印泥红
   每一章随年代换“场景光”：1990s 柜台暖光 → 拨号年代靛蓝 → 屏幕时代青光
   ========================================================= */
@font-face { font-family: "XiaoWei"; src: url(../fonts/xiaowei.woff2) format("woff2"); font-display: swap; }
@font-face { font-family: "Hand"; src: url(../fonts/hand.woff2) format("woff2"); font-display: swap; }

:root {
  --lacquer: #0c211c;
  --cover: #1d4a3e;
  --cover-d: #10302a;
  --foil: #cfa94f;
  --foil-l: #f3dc97;
  --mint: #e4efe7;
  --mint-d: #c9ddd0;
  --ribbon: #3a2f7a;
  --seal: #d0202e;
  --screen: #19e3c4;
  --ivory: #e9dcb4;
  --line: #cfa94f;
  --display: "XiaoWei", "Noto Serif CJK SC", "Source Han Serif SC", "Songti SC", serif;
  --hand: "Hand", "KaiTi", "STKaiti", "AR PL UKai CN", cursive;
  --sans: "Noto Sans CJK SC", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  --mono: "JetBrains Mono", "Consolas", "Courier New", monospace;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; overflow: hidden; }
body {
  font-family: var(--sans); color: var(--ivory); background: var(--lacquer);
  transition: background-color 1.2s;
  -webkit-font-smoothing: antialiased;
}
body[data-era="mid"] { --line: #8d9cff; background: #0f1330; }
body[data-era="new"] { --line: #19e3c4; background: #03171a; }
button { font: inherit; color: inherit; cursor: pointer; }
button:focus-visible, input:focus-visible, [tabindex]:focus-visible { outline: 2px dashed var(--foil); outline-offset: 3px; }
.mono { font-family: var(--mono); }
[hidden] { display: none !important; }

/* ---------- 背景 ---------- */
.bg { position: fixed; inset: 0; pointer-events: none; overflow: hidden; }
.bg-rose { position: absolute; width: 130vmax; height: 130vmax; left: 50%; top: 50%; translate: -50% -50%; opacity: .1; }
.bg-rose.r1 { animation: spin 260s linear infinite; }
.bg-rose.r2 { width: 70vmax; height: 70vmax; left: 88%; top: 85%; opacity: .08; animation: spin 180s linear infinite reverse; }
.rosette { width: 100%; height: 100%; fill: none; stroke: var(--line); stroke-width: .7; transition: stroke 1.2s; }
.bg-grain { position: absolute; inset: 0; opacity: .25; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2'/%3E%3C/filter%3E%3Crect width='200' height='200' filter='url(%23n)' opacity='.6'/%3E%3C/svg%3E"); }
@keyframes spin { to { rotate: 360deg; } }

#fx { position: fixed; inset: 0; pointer-events: none; z-index: 90; }

/* ---------- HUD ---------- */
.hud { position: fixed; inset: 0 0 auto 0; z-index: 60; display: flex; align-items: center; justify-content: space-between; padding: 14px 22px; pointer-events: none; }
.hud > * { pointer-events: auto; }
.hud-home { display: flex; align-items: center; gap: 8px; background: rgba(0,0,0,.25); border: 1px solid rgba(207,169,79,.4); border-radius: 99px; padding: 7px 16px 7px 10px; font-size: .9rem; backdrop-filter: blur(6px); transition: .25s; }
.hud-home svg { width: 20px; height: 20px; fill: none; stroke: var(--foil); stroke-width: 1.6; }
.hud-home:hover { background: var(--foil); color: var(--lacquer); }
.hud-home:hover svg { stroke: var(--lacquer); }
.hud-seals { display: flex; gap: 6px; }
.hud-seals span { min-width: 30px; height: 30px; padding: 0 4px; display: grid; place-items: center; border: 1px dashed rgba(233,220,180,.3); font-family: var(--display); font-size: .7rem; color: rgba(233,220,180,.3); border-radius: 3px; transition: .4s; }
.hud-seals span.on { background: var(--seal); border: 1px solid var(--seal); color: #fff; transform: rotate(-6deg); box-shadow: 0 0 18px rgba(208,32,46,.5); }
.hud-sound { background: none; border: none; font-size: .85rem; opacity: .7; }
.hud-sound:hover { opacity: 1; }

/* ---------- 通用按钮 ---------- */
.act { position: relative; border: none; background: linear-gradient(180deg, var(--foil-l), var(--foil)); color: #1a1408; font-weight: 800; letter-spacing: .06em;
  padding: 13px 26px; border-radius: 4px; box-shadow: 0 1px 0 rgba(255,255,255,.5) inset, 0 8px 24px -8px rgba(207,169,79,.7); transition: transform .15s, box-shadow .2s, opacity .2s; }
.act:hover { transform: translateY(-2px); box-shadow: 0 1px 0 rgba(255,255,255,.5) inset, 0 14px 30px -8px rgba(207,169,79,.9); }
.act:active { transform: translateY(2px) scale(.98); }
.act:disabled { opacity: .45; transform: none; cursor: default; }
.act.ghost { background: transparent; color: var(--ivory); border: 1px solid rgba(233,220,180,.35); box-shadow: none; }
.act.ghost:hover { border-color: var(--foil); color: var(--foil-l); }
.act span { font-family: var(--mono); font-weight: 400; font-size: .75em; opacity: .65; margin-left: 10px; }

/* =========================================================
   片头
   ========================================================= */
.intro { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; overflow: hidden;
  background: radial-gradient(ellipse at 50% 45%, #173a31 0%, var(--lacquer) 60%); transition: opacity .9s, filter .9s; }
.intro.leaving { opacity: 0; filter: blur(8px); pointer-events: none; }
.intro-rose { position: absolute; width: min(120vmin, 1100px); aspect-ratio: 1; opacity: .3; animation: spin 120s linear infinite; }
.intro-rose .rosette { stroke: var(--foil); stroke-width: .9; }
.intro-rose path { stroke-dasharray: 1; stroke-dashoffset: 1; }
.intro.drawing .intro-rose path { animation: draw 3.2s cubic-bezier(.6,0,.2,1) forwards; animation-delay: calc(var(--i) * .25s); }
@keyframes draw { to { stroke-dashoffset: 0; } }
.intro-center { position: relative; text-align: center; display: flex; flex-direction: column; align-items: center; padding: 0 20px; }
.intro-eyebrow { font-family: var(--mono); font-size: .8rem; letter-spacing: .3em; color: var(--foil); margin: 0 0 22px; opacity: .85; }
.intro-title { filter: drop-shadow(0 0 22px rgba(233,220,180,.25)); }
.intro-stamp { margin-top: 10px; font-family: var(--display); font-size: clamp(1.4rem, 3vw, 2.2rem); color: var(--seal); border: 4px double var(--seal); padding: 4px 18px;
  transform: rotate(-7deg) scale(3); opacity: 0; letter-spacing: .2em; text-shadow: 0 0 1px var(--seal); }
.intro-stamp.on { animation: slam .35s cubic-bezier(.3,1.6,.6,1) forwards; }
@keyframes slam { to { transform: rotate(-7deg) scale(1); opacity: .92; } }
.intro-sub { font-family: var(--display); font-size: clamp(1.05rem, 1.8vw, 1.4rem); line-height: 1.8; margin: 26px 0 30px; opacity: 0; transform: translateY(14px); transition: .8s; color: #cfc4a2; }
.intro-sub.on { opacity: 1; transform: none; }
.intro-go { position: relative; background: none; border: 1px solid var(--foil); color: var(--foil-l); padding: 14px 44px; font-family: var(--display); font-size: 1.25rem; letter-spacing: .5em; text-indent: .5em;
  overflow: hidden; opacity: 0; transform: translateY(10px); transition: opacity .6s, transform .6s, background .3s, color .3s; }
.intro-go.on { opacity: 1; transform: none; }
.intro-go:hover { background: var(--foil); color: var(--lacquer); }
.intro-go i { position: absolute; inset: 0; background: linear-gradient(100deg, transparent 30%, rgba(255,240,190,.55) 50%, transparent 70%); transform: translateX(-120%); animation: sweep 2.6s 1s infinite; }
@keyframes sweep { 60%, 100% { transform: translateX(120%); } }

/* =========================================================
   主舞台：存折
   ========================================================= */
.hub { position: fixed; inset: 0; display: grid; place-items: center; perspective: 2200px; transition: opacity .8s, filter .8s; }
.hub.fade { opacity: .12; filter: blur(4px); }
.book-wrap { transform-style: preserve-3d; will-change: transform; }
.book { --w: min(1120px, 92vw, 150vh); position: relative; width: var(--w); height: calc(var(--w) * .62); transform-style: preserve-3d;
  transform: translateX(-25%); transition: transform 1.3s cubic-bezier(.65,0,.35,1); }
.book.open, .book.opening { transform: none; }
.page { position: absolute; top: 0; height: 100%; width: 50%; color: #2b3a33; overflow: hidden;
  background-color: var(--mint); background-image: var(--waves), linear-gradient(90deg, rgba(0,0,0,.0), rgba(0,0,0,0)); background-size: 380px auto; }
.page-r { left: 50%; border-radius: 0 10px 10px 0; padding: 4.2% 4% 3% 4.5%;
  box-shadow: inset 28px 0 40px -24px rgba(0,0,0,.35), 0 40px 80px -30px rgba(0,0,0,.8); }

/* 封面（右半边，绕书脊翻开到左边） */
.cover { position: absolute; left: 50%; top: 0; width: 50%; height: 100%; transform-origin: left center; transform-style: preserve-3d;
  transition: transform 1.3s cubic-bezier(.65,0,.35,1); }
.book.open .cover, .book.opening .cover { transform: rotateY(-180deg); }
.cover-front, .cover-back { position: absolute; inset: 0; backface-visibility: hidden; -webkit-backface-visibility: hidden; }
.cover-front { border-radius: 4px 14px 14px 4px; overflow: hidden; display: flex; flex-direction: column; align-items: center; justify-content: center;
  background: repeating-linear-gradient(115deg, rgba(255,255,255,.025) 0 2px, transparent 2px 5px), radial-gradient(ellipse at 30% 20%, #2b6352, var(--cover) 45%, var(--cover-d));
  box-shadow: inset 10px 0 0 rgba(0,0,0,.25), inset -2px 0 0 rgba(255,255,255,.06), 0 40px 80px -30px rgba(0,0,0,.9); }
.cv-rose { position: absolute; width: 92%; aspect-ratio: 1; opacity: .22; }
.cv-rose .rosette { stroke: var(--foil); stroke-width: 1.1; }
.cv-emblem { position: relative; width: 22%; aspect-ratio: 1; border: 3px solid var(--foil); border-radius: 50%; display: grid; place-items: center;
  font-family: var(--display); font-size: calc(var(--w) * .05); color: transparent; background: none; margin-bottom: 7%; transition: color .6s, box-shadow .6s; }
.cv-emblem.lit, .book.open .cv-emblem { color: var(--foil); box-shadow: 0 0 40px rgba(207,169,79,.35); }
.cv-title, .cv-sub { position: relative; background: linear-gradient(100deg, #9c7a2c, var(--foil-l) 45%, #9c7a2c); -webkit-background-clip: text; background-clip: text; color: transparent; }
.cv-title { font-family: var(--display); font-size: calc(var(--w) * .038); letter-spacing: .35em; text-indent: .35em; }
.cv-sub { font-size: calc(var(--w) * .011); letter-spacing: .4em; margin-top: 3%; }
.cv-sheen { position: absolute; inset: 0; background: linear-gradient(105deg, transparent 35%, rgba(255,236,170,.45) 50%, transparent 65%); transform: translateX(-120%); }
.book.sheen .cv-sheen { animation: sheen 1.4s ease-in-out; }
@keyframes sheen { to { transform: translateX(120%); } }
.cover-back { transform: rotateY(180deg); width: 100%; border-radius: 10px 0 0 10px; padding: 5% 5% 4% 6%;
  box-shadow: inset -28px 0 40px -24px rgba(0,0,0,.35), 0 40px 80px -30px rgba(0,0,0,.8); display: flex; flex-direction: column; }

/* 左页 */
.pl-head { display: flex; align-items: center; gap: 14px; padding-bottom: 12px; border-bottom: 2px solid var(--cover); }
.pl-head b { display: block; font-family: var(--display); font-size: calc(var(--w) * .022); color: var(--cover); letter-spacing: .2em; font-weight: 400; }
.pl-head small { font-size: .62rem; letter-spacing: .3em; color: #6c8a7c; }
.pl-emblem { width: calc(var(--w) * .045); aspect-ratio: 1; border-radius: 50%; border: 2px solid var(--cover); color: var(--cover); display: grid; place-items: center; font-family: var(--display); font-size: calc(var(--w) * .022); }
.pl-info { display: grid; grid-template-columns: auto 1fr; gap: 6px 16px; margin: 14px 0; font-size: calc(var(--w) * .0125); }
.pl-info dt { color: #6c8a7c; }
.pl-info dd { margin: 0; color: var(--ribbon); font-weight: 700; }
.pl-notes { flex: 1; min-height: 0; display: flex; flex-direction: column; border: 1px solid rgba(29,74,62,.25); background: rgba(255,255,255,.35); padding: 10px 14px; }
.pl-notes-h { font-size: .72rem; letter-spacing: .3em; color: var(--seal); border-bottom: 1px dashed rgba(208,32,46,.35); padding-bottom: 5px; }
#notes { list-style: none; margin: 0; padding: 0; overflow: auto; flex: 1; scrollbar-width: thin; }
#notes li { display: flex; gap: 10px; align-items: flex-start; padding: 8px 0 6px; border-bottom: 1px dashed rgba(29,74,62,.15); animation: write 1.2s steps(24) both; }
#notes li p { margin: 0; font-family: var(--hand); font-size: calc(var(--w) * .0145); line-height: 1.5; color: #22337a; }
#notes .note-empty { font-family: var(--hand); color: #8aa597; font-size: calc(var(--w) * .014); animation: none; border: none; }
.n-seal { flex: none; writing-mode: vertical-rl; font-family: var(--display); font-size: .72rem; color: #fff; background: var(--seal); padding: 4px 2px; border-radius: 2px; letter-spacing: .1em; }
@keyframes write { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0 0 0 0); } }

/* 右页：明细 */
.pr-head, .row { display: grid; grid-template-columns: 1.25fr 1.15fr .9fr .9fr 1.3fr; gap: 6px; align-items: center; }
.pr-head { font-size: calc(var(--w) * .0125); color: var(--cover); font-weight: 700; border-bottom: 2px solid var(--cover); padding-bottom: 6px; letter-spacing: .1em; }
.rows { display: flex; flex-direction: column; }
.row { position: relative; background: none; border: none; border-bottom: 1px solid rgba(29,74,62,.22); height: calc(var(--w) * .052); padding: 0; text-align: left; transition: background .25s; }
.row::before { content: ""; position: absolute; left: -14px; top: 18%; bottom: 18%; width: 4px; background: var(--seal); transform: scaleY(0); transition: transform .25s; }
.row.printed:hover, .row-sign:hover { background: rgba(255,255,255,.55); }
.row.printed:hover::before, .row-sign:hover::before, .row.hot::before { transform: scaleY(1); }
.cell { display: flex; align-items: center; height: 100%; overflow: hidden; }
.cell canvas { display: block; color: var(--ribbon); }
.row-seal { position: absolute; left: 44%; top: 50%; pointer-events: none; transform: translateY(-50%) rotate(-12deg) scale(2.6); opacity: 0; mix-blend-mode: multiply; }
.row-seal.on { animation: rowslam .3s cubic-bezier(.3,1.6,.6,1) forwards; }
@keyframes rowslam { to { transform: translateY(-50%) rotate(-12deg) scale(1); opacity: .9; } }
.row-ghost { position: absolute; inset: 0; display: grid; place-items: center; font-family: var(--hand); font-style: normal; font-size: calc(var(--w) * .02); color: var(--seal);
  opacity: .55; animation: breathe 2.4s ease-in-out infinite; }
@keyframes breathe { 50% { opacity: .95; } }
.pr-hint { font-family: var(--hand); color: var(--seal); font-size: calc(var(--w) * .019); margin: 16px 0 0; opacity: 0; transform: rotate(-2deg) translateY(6px); transition: .8s; }
.pr-hint.on { opacity: .85; transform: rotate(-2deg); }

/* 印章 */
.seal { display: inline-flex; flex-direction: column; align-items: center; border: 3px solid var(--seal); color: var(--seal); padding: 3px 4px; border-radius: 3px;
  font-family: var(--display); line-height: 1; box-shadow: inset 0 0 0 1px rgba(208,32,46,.3); background: rgba(208,32,46,.04); }
.seal i { font-style: normal; font-size: calc(var(--w, 1000px) * .02); padding: 1px 0; }
.seal.s3 i { font-size: calc(var(--w, 1000px) * .016); }
.row-seal .seal { flex-direction: row; gap: 2px; padding: 3px 6px; }
.row-seal .seal i { font-size: calc(var(--w) * .016); }

/* =========================================================
   章节通用
   ========================================================= */
.chapters { position: fixed; inset: 0; pointer-events: none; z-index: 20; }
.ch { --title: var(--ivory); position: absolute; inset: 0; display: none; grid-template-rows: auto 1fr auto; gap: 18px; padding: 70px clamp(20px, 5vw, 80px) 26px; overflow: auto; pointer-events: auto; isolation: isolate; }
.ch.active { display: grid; }
.ch::before { content: ""; position: absolute; inset: 0; z-index: -2; opacity: 0; transition: opacity .9s; background: var(--scene); }
.ch.bgin::before { opacity: 1; }
.ch[data-era="old"] { --title: #f1d896; --accent: var(--foil); --scene: radial-gradient(ellipse at 20% 0%, rgba(255,190,90,.22), transparent 55%), linear-gradient(160deg, #241a10, #120d08 70%); }
.ch[data-era="mid"] { --title: #dfe4ff; --accent: #8d9cff; --scene: linear-gradient(180deg, #0f1330, #070915); }
.ch[data-era="new"] { --title: #a9fbec; --accent: var(--screen); --scene: radial-gradient(ellipse at 80% 0%, rgba(25,227,196,.18), transparent 55%), linear-gradient(170deg, #062226, #020c0e 70%); }

.ch-head { position: relative; display: flex; flex-direction: column; gap: 8px; }
.ch-row { margin: 0; font-size: .82rem; letter-spacing: .18em; color: var(--accent); }
.ch-row::before { content: ""; display: inline-block; width: 26px; height: 1px; background: currentColor; vertical-align: middle; margin-right: 10px; }
.dot-title { display: block; color: var(--title); filter: drop-shadow(0 0 18px color-mix(in srgb, var(--title) 30%, transparent)); }
.ch-lede { margin: 4px 0 0; max-width: 62ch; line-height: 1.85; color: color-mix(in srgb, var(--title) 70%, #888); font-size: 1.02rem; }
.ch-body { position: relative; min-height: 0; }
.ch-foot { display: flex; justify-content: flex-end; gap: 12px; }
.ch-foot.ready [data-act="next"] { animation: glow 1.6s ease-in-out infinite; }
@keyframes glow { 50% { box-shadow: 0 0 0 6px rgba(207,169,79,.25), 0 14px 30px -8px rgba(207,169,79,.9); } }

/* 进场：内容被打印头一行行印出来 */
.ch.pre .ch-row, .ch.pre .ch-lede, .ch.pre .ch-body, .ch.pre .ch-foot, .ch.pre .tm-bg { opacity: 0; }
.ch.revealing .ch-row, .ch.revealing .ch-lede, .ch.revealing .ch-body, .ch.revealing .ch-foot { animation: printin .9s cubic-bezier(.5,0,.2,1) both; }
.ch.revealing .ch-body { animation-delay: .12s; }
.ch.revealing .ch-foot { animation-delay: .3s; }
@keyframes printin { from { clip-path: inset(0 0 100% 0); opacity: .4; } to { clip-path: inset(0 0 -20% 0); opacity: 1; } }
.ch.revealing::after { content: ""; position: absolute; left: 0; right: 0; height: 3px; top: 0; z-index: 5; pointer-events: none;
  background: linear-gradient(90deg, transparent, var(--accent), transparent); box-shadow: 0 0 24px 6px color-mix(in srgb, var(--accent) 50%, transparent);
  animation: head .95s cubic-bezier(.5,0,.2,1) forwards; }
@keyframes head { from { top: 60px; } to { top: 100%; opacity: 0; } }
.ch.leaving .ch-row, .ch.leaving .ch-lede, .ch.leaving .ch-body, .ch.leaving .ch-foot, .ch.leaving .ch-seal, .ch.leaving .tm-bg { transition: .35s; opacity: 0; filter: blur(6px); transform: scale(.98); }
.ch.leaving::before { transition: opacity .9s .2s; opacity: 0; }

.ch-seal { position: absolute; right: 70px; top: 6px; transform: rotate(-12deg) scale(3); opacity: 0; animation: slam2 .3s .2s cubic-bezier(.3,1.6,.6,1) forwards; --w: 2200px; }
.ch-seal .seal { background: rgba(208,32,46,.12); box-shadow: 0 0 30px rgba(208,32,46,.35); }
@keyframes slam2 { to { transform: rotate(-12deg) scale(1); opacity: .95; } }

/* ---------- 1996 鉴宝 ---------- */
.loupe-stage { display: grid; grid-template-columns: auto auto minmax(240px, 1fr); gap: clamp(16px, 3vw, 44px); align-items: center; justify-content: center; }
.specimen { margin: 0; display: flex; flex-direction: column; align-items: center; gap: 12px; }
.spec-img { position: relative; cursor: none; touch-action: none; box-shadow: 0 30px 60px -20px #000, 0 0 0 1px rgba(207,169,79,.3); }
.spec-img::after { content: ""; position: absolute; inset: 0; background: radial-gradient(ellipse at 50% 0%, rgba(255,220,150,.18), transparent 60%); pointer-events: none; }
.spec-img img { display: block; height: min(52vh, 500px); width: auto; user-select: none; }
.specimen figcaption { font-size: .85rem; color: #b9a982; }
.specimen figcaption b { color: var(--foil); font-family: var(--mono); margin-right: 6px; }
.loupe { position: absolute; left: 0; top: 0; width: 180px; height: 180px; border-radius: 50%; pointer-events: none; opacity: 0; z-index: 4; background-repeat: no-repeat;
  border: 3px solid var(--foil); box-shadow: 0 0 0 6px rgba(0,0,0,.35), 0 20px 40px rgba(0,0,0,.6), inset 0 0 30px rgba(0,0,0,.4); transition: opacity .2s, border-color .2s; }
.loupe.on { opacity: 1; }
.loupe.warm { border-color: var(--seal); box-shadow: 0 0 0 6px rgba(208,32,46,.35), 0 0 40px rgba(208,32,46,.6), inset 0 0 30px rgba(0,0,0,.4); }
.find-mark { position: absolute; width: 0; height: 0; pointer-events: none; }
.find-mark i { position: absolute; width: 70px; height: 56px; left: -35px; top: -28px; border: 2.5px solid var(--seal); border-radius: 50% 45% 55% 40%; transform: rotate(-8deg); animation: ring .5s ease-out both; }
.find-mark span { position: absolute; left: 40px; top: -42px; white-space: nowrap; font-family: var(--hand); font-size: 1.5rem; color: #ff4b57; text-shadow: 0 2px 6px #000; animation: write .6s .2s steps(8) both; }
@keyframes ring { from { transform: rotate(-8deg) scale(1.8); opacity: 0; } }
.finds { align-self: stretch; display: flex; flex-direction: column; gap: 12px; border-left: 1px solid rgba(207,169,79,.3); padding-left: clamp(14px, 2vw, 30px); justify-content: center; }
.finds-h { font-family: var(--display); font-size: 1.3rem; color: var(--foil-l); }
.finds-h b { font-family: var(--mono); color: var(--seal); font-size: 1.6rem; }
.finds ol { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; counter-reset: f; }
.finds li { counter-increment: f; padding: 12px 14px 12px 44px; position: relative; border: 1px solid rgba(207,169,79,.2); line-height: 1.65; font-size: .93rem; transition: .4s; }
.finds li::before { content: counter(f); position: absolute; left: 14px; top: 12px; font-family: var(--mono); color: var(--foil); }
.find-todo { color: #8f826a; border-style: dashed !important; }
.find-done { background: rgba(208,32,46,.1); border-color: rgba(208,32,46,.5) !important; color: #eadfc3; }
.find-done b { display: block; font-family: var(--hand); font-size: 1.3rem; color: #ff6b75; font-weight: 400; }
.finds-tip { font-size: .82rem; color: #8f826a; margin: 0; }

/* ---------- 1998 取钱大挑战 ---------- */
.race { display: grid; grid-template-columns: 1.15fr 70px 1fr; gap: 0; align-items: stretch; min-height: 0; }
.lane { padding: 20px 22px; display: flex; flex-direction: column; gap: 14px; }
.lane-old { background: linear-gradient(180deg, #ecdcb9, #dcc79c); color: #3b2c18; clip-path: polygon(0 0, 100% 0, 94% 100%, 0 100%); padding-right: 9%; border-radius: 6px 0 0 6px; }
.lane-new { background: linear-gradient(160deg, rgba(25,227,196,.12), rgba(25,227,196,.02)); border: 1px solid rgba(25,227,196,.35); clip-path: polygon(6% 0, 100% 0, 100% 100%, 0 100%); padding-left: 9%; border-radius: 0 6px 6px 0; align-items: center; }
.lane-top { display: flex; justify-content: space-between; align-items: center; width: 100%; }
.lane-tag { font-family: var(--mono); font-size: .8rem; letter-spacing: .2em; padding: 4px 10px; border: 1px solid currentColor; }
.lane-new .lane-tag { color: var(--screen); }
.lane-old .clock { color: #8a1e14; }
.lane-new .clock { color: var(--screen); }
.steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; counter-reset: s; }
.steps li { counter-increment: s; display: flex; justify-content: space-between; gap: 10px; padding: 8px 10px 8px 34px; position: relative; opacity: .38; transition: .3s; border-bottom: 1px dashed rgba(59,44,24,.25); }
.steps li::before { content: counter(s); position: absolute; left: 8px; font-family: var(--mono); font-weight: 700; }
.steps li em { font-style: normal; font-family: var(--mono); color: #8a1e14; white-space: nowrap; }
.steps li.now { opacity: 1; background: rgba(255,255,255,.55); }
.steps li.done { opacity: .9; text-decoration: line-through; text-decoration-color: rgba(138,30,20,.5); }
.queue { display: grid; grid-template-columns: auto 1fr; gap: 2px 16px; align-items: center; background: #15110b; color: #ffbf3c; padding: 12px 16px; border-radius: 4px; font-family: var(--mono); box-shadow: inset 0 0 20px rgba(255,160,40,.15); }
.q-num { grid-row: span 2; font-size: 2rem; font-weight: 900; text-shadow: 0 0 12px rgba(255,170,40,.7); }
.q-wait b { font-size: 1.3rem; }
.q-tip { font-family: var(--sans); font-size: .8rem; color: #b49a6a; }
.lane-old .act { align-self: flex-start; background: #3b2c18; color: #f1dfb7; box-shadow: 0 8px 18px -8px rgba(0,0,0,.6); }
.act.hold { background: #8a1e14 !important; animation: holdp 1s ease-in-out infinite; touch-action: none; user-select: none; }
@keyframes holdp { 50% { box-shadow: 0 0 0 8px rgba(138,30,20,.25); } }
.rift { display: grid; place-items: center; }
.rift span { font-family: var(--display); font-size: 2.6rem; color: var(--seal); transform: rotate(-10deg); text-shadow: 0 0 20px rgba(208,32,46,.6); }
.phone { width: 230px; height: 420px; border-radius: 34px; background: #0b0f10; padding: 10px; position: relative; box-shadow: 0 0 0 2px #233, 0 30px 60px -10px rgba(0,0,0,.8), 0 0 60px rgba(25,227,196,.15); }
.phone-notch { position: absolute; top: 16px; left: 50%; translate: -50% 0; width: 70px; height: 18px; border-radius: 10px; background: #000; z-index: 2; }
.phone-screen { height: 100%; border-radius: 26px; background: linear-gradient(170deg, #0c2b2f, #071a1d); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; padding: 20px; transition: background .5s; }
.ps-amount { font-family: var(--mono); font-size: 2.2rem; font-weight: 700; color: #fff; }
.ps-shop { font-size: .8rem; color: #7fb7ad; }
.ps-state { margin-top: 40px; color: var(--screen); font-size: 1rem; letter-spacing: .1em; min-height: 1.5em; }
.phone-screen.ok { background: linear-gradient(170deg, #0f8f7c, #0a4e46); }
.phone-screen.ok .ps-state { color: #fff; font-size: 1.5rem; font-weight: 800; }
.slide-pay { --p: 0; position: relative; width: 100%; height: 54px; border-radius: 99px; background: rgba(255,255,255,.08); border: 1px solid rgba(25,227,196,.4); overflow: hidden; display: grid; place-items: center; transition: opacity .3s; }
.slide-pay::before { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(25,227,196,.5), rgba(25,227,196,.1)); transform-origin: left; transform: scaleX(var(--p)); }
.slide-pay span { position: relative; font-size: .85rem; color: #9fd8ce; letter-spacing: .3em; }
.slide-pay.gone { opacity: 0; pointer-events: none; }
.sp-thumb { position: absolute; left: 4px; top: 4px; width: 46px; height: 46px; border-radius: 50%; background: var(--screen); color: #032; display: grid; place-items: center; font-size: 1.6rem; font-weight: 900; z-index: 1; touch-action: none; cursor: grab; box-shadow: 0 0 20px rgba(25,227,196,.6); }
.race-result { position: absolute; left: 50%; bottom: 110px; translate: -50% 0; z-index: 6; width: min(820px, 92%); text-align: center; padding: 22px 30px; background: rgba(12,9,5,.94); border: 1px solid var(--foil); box-shadow: 0 30px 80px #000, 0 0 60px rgba(207,169,79,.2); animation: printin .8s both; }
.race-result p { margin: 6px 0; line-height: 1.7; }
.race-result b { color: var(--foil-l); font-family: var(--mono); font-size: 1.3em; }
.rr-n { display: flex; justify-content: center; align-items: baseline; gap: 22px; font-family: var(--mono); font-weight: 900; font-size: clamp(2rem, 5vw, 3.6rem); }
.rr-n span { color: #f1b26a; }
.rr-n .neo { color: var(--screen); text-shadow: 0 0 20px rgba(25,227,196,.6); }
.rr-n i { font-style: normal; font-family: var(--display); font-size: .4em; color: #998; }
.rr-q { font-family: var(--display); font-size: 1.2rem; color: var(--foil-l); }

/* ---------- 2019 补登时光机 ---------- */
.tm-bg { position: absolute; inset: 0; z-index: -1; overflow: hidden; transition: opacity .6s; }
.tm-bg::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(5,8,20,.92), transparent 35%), linear-gradient(90deg, rgba(5,8,20,.9) 0%, rgba(5,8,20,.55) 55%, rgba(5,8,20,.85)), linear-gradient(0deg, rgba(5,8,20,.95), transparent 40%); }
.tm-slide { position: absolute; inset: 0; background-size: cover; background-position: center; opacity: 0; transform: scale(1.18); transition: opacity 1s, transform 7s ease-out; filter: saturate(.8); }
.tm-slide.on { opacity: 1; transform: scale(1.02); }
.tm-none { display: grid; place-items: center; background: radial-gradient(circle, #1a2366, #070915); }
.tm-dial { width: 80vmin; animation: spin 40s linear infinite; opacity: .7; }
.tm-dial .rosette { stroke: #8d9cff; }
.tm { display: grid; grid-template-columns: auto minmax(280px, 520px); grid-template-rows: 1fr auto; gap: 20px 40px; align-items: center; }
.tm-year canvas { display: block; color: var(--title); filter: drop-shadow(0 0 30px color-mix(in srgb, var(--title) 40%, transparent)); }
body[data-era="new"] .ch-time { --title: #a9fbec; --accent: var(--screen); }
body[data-era="old"] .ch-time { --title: #f1d896; --accent: var(--foil); }
.tm-card { border-left: 3px solid var(--accent); padding: 6px 0 6px 24px; }
.tm-card.in { animation: cardin .7s cubic-bezier(.2,.8,.2,1) both; }
@keyframes cardin { from { opacity: 0; transform: translateX(30px); filter: blur(6px); } }
.tm-card h3 { font-family: var(--display); font-weight: 400; font-size: clamp(1.6rem, 3vw, 2.4rem); margin: 0 0 12px; color: #fff; }
.tm-card p { line-height: 1.85; margin: 0 0 14px; color: #d8dbe8; }
.tm-quip { font-family: var(--hand); font-size: 1.45rem; color: var(--accent) !important; line-height: 1.5 !important; }
.tm-track { grid-column: 1 / -1; position: relative; height: 92px; margin: 0 30px; }
.tm-rail { position: absolute; left: 0; right: 0; top: 30px; height: 2px; background: repeating-linear-gradient(90deg, var(--accent) 0 6px, transparent 6px 12px); opacity: .6; }
.tm-ticks button { position: absolute; top: 50px; translate: -50% 0; background: none; border: none; font-family: var(--mono); font-size: .85rem; color: rgba(255,255,255,.45); padding: 4px; transition: .3s; }
.tm-ticks button::before { content: ""; position: absolute; left: 50%; top: -24px; width: 1px; height: 14px; background: currentColor; }
.tm-ticks button.on { color: var(--accent); transform: scale(1.25); }
.tm-carriage { position: absolute; top: 4px; translate: -50% 0; width: 78px; height: 52px; border-radius: 6px; background: linear-gradient(180deg, #2d3440, #151a22); border: 1px solid var(--accent);
  display: grid; place-items: center; cursor: grab; touch-action: none; box-shadow: 0 0 24px color-mix(in srgb, var(--accent) 45%, transparent), inset 0 -8px 0 rgba(0,0,0,.4); transition: left .35s cubic-bezier(.2,.8,.2,1), transform .2s; }
.tm-carriage::after { content: ""; position: absolute; bottom: -8px; left: 50%; translate: -50% 0; width: 10px; height: 10px; background: var(--accent); clip-path: polygon(0 0, 100% 0, 50% 100%); }
.tm-carriage span { font-size: .78rem; letter-spacing: .2em; color: var(--accent); }
.tm-carriage.drag { transition: transform .2s; transform: scale(1.1); cursor: grabbing; }

/* ---------- 2024 交接 ---------- */
.match { display: grid; grid-template-columns: 1fr minmax(200px, 300px) 1fr; gap: clamp(16px, 3vw, 40px); align-items: center; }
.m-col { display: flex; flex-direction: column; gap: 12px; }
.m-card { display: flex; align-items: center; gap: 14px; padding: 14px 18px; border-radius: 10px; font-weight: 700; cursor: grab; user-select: none; touch-action: none; transition: transform .2s, opacity .4s, background .25s, border-color .25s; }
.m-card svg { width: 34px; height: 34px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; }
.m-card.old { background: linear-gradient(120deg, #e6d4ad, #cdb685); color: #3b2c18; box-shadow: 0 10px 20px -10px #000; }
.m-card.neo { background: rgba(25,227,196,.07); color: #c9fff5; border: 1px solid rgba(25,227,196,.35); cursor: pointer; }
.m-card.neo:hover, .m-card.neo.over { background: rgba(25,227,196,.22); border-color: var(--screen); transform: scale(1.03); }
.m-card.sel { outline: 3px solid var(--seal); transform: translateX(8px); }
.m-card.lifted { opacity: .25; }
.m-card.done { opacity: .18; pointer-events: none; filter: grayscale(.6); }
.m-card.neo.done.flash { animation: flash .8s; }
@keyframes flash { 0% { background: var(--screen); opacity: 1; } }
.m-card.ghost { position: fixed; left: 0; top: 0; z-index: 100; pointer-events: none; box-shadow: 0 30px 50px -10px #000; }
.m-mid { text-align: center; font-family: var(--display); font-size: 1.3rem; line-height: 1.7; color: #e4fff9; min-height: 140px; display: grid; place-items: center; padding: 18px;
  border-top: 1px solid rgba(25,227,196,.35); border-bottom: 1px solid rgba(25,227,196,.35); }
.m-mid p { margin: 0; animation: printin .5s both; }
.m-mid b { color: var(--screen); font-weight: 400; }

/* ---------- 2025 奶奶 ---------- */
.nai { display: grid; grid-template-columns: minmax(300px, 440px) 1fr; gap: clamp(20px, 4vw, 56px); align-items: start; }
.chat { height: min(62vh, 560px); display: flex; flex-direction: column; border-radius: 26px; overflow: hidden; background: #0b1416; border: 1px solid rgba(25,227,196,.25); box-shadow: 0 30px 60px -20px #000; }
.chat-top { display: flex; align-items: center; gap: 12px; padding: 14px 18px; background: rgba(255,255,255,.04); border-bottom: 1px solid rgba(255,255,255,.06); }
.chat-top b { display: block; }
.chat-top small { font-size: .75rem; color: var(--screen); }
.avatar { width: 40px; height: 40px; border-radius: 50%; background: #e7c9a0; color: #5b3a1a; display: grid; place-items: center; font-family: var(--display); font-size: 1.2rem; }
.chat-body { flex: 1; overflow: auto; padding: 16px; display: flex; flex-direction: column; gap: 10px; scrollbar-width: thin; }
.msg { max-width: 84%; padding: 10px 14px; border-radius: 14px; line-height: 1.6; font-size: .95rem; animation: msgin .35s cubic-bezier(.2,.8,.2,1) both; }
@keyframes msgin { from { opacity: 0; transform: translateY(10px) scale(.96); } }
.msg.in { background: #1d2a2c; align-self: flex-start; border-bottom-left-radius: 4px; }
.msg.out { background: var(--screen); color: #032a24; align-self: flex-end; border-bottom-right-radius: 4px; font-weight: 600; }
.msg.sys { align-self: center; font-size: .8rem; padding: 6px 12px; border-radius: 4px; max-width: 94%; text-align: center; }
.msg.sys.good { color: var(--screen); border: 1px solid rgba(25,227,196,.5); }
.msg.sys.bad { color: #ff8a92; border: 1px solid rgba(255,90,100,.5); }
.chat-opts { padding: 12px; display: flex; flex-direction: column; gap: 8px; background: rgba(255,255,255,.03); border-top: 1px solid rgba(255,255,255,.06); }
.chat-opts button { display: flex; gap: 10px; text-align: left; background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.1); border-radius: 10px; padding: 10px 12px; font-size: .9rem; line-height: 1.55; transition: .2s; animation: msgin .3s both; }
.chat-opts button:hover { border-color: var(--screen); background: rgba(25,227,196,.1); }
.chat-opts button b { font-family: var(--mono); color: var(--screen); }
.nai-photo { margin: 0; border-radius: 8px; overflow: hidden; max-height: 34vh; }
.nai-photo img { width: 100%; height: 100%; object-fit: cover; display: block; filter: saturate(.85); }
.nai-facts { list-style: none; padding: 0; margin: 20px 0 0; display: grid; gap: 12px; }
.nai-facts li { padding-left: 16px; border-left: 2px solid var(--screen); line-height: 1.7; color: #c7dcd8; }
.nai-facts b { color: #fff; }

/* ---------- 2026 投票 + 弹幕 ---------- */
.danmaku { position: absolute; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
.dm { position: absolute; left: 100%; white-space: nowrap; font-size: clamp(1rem, 1.6vw, 1.35rem); font-weight: 700; color: rgba(169,251,236,.38); animation: fly linear forwards; }
.dm.mine { color: #fff; background: var(--seal); padding: 2px 14px; border-radius: 99px; box-shadow: 0 0 20px rgba(208,32,46,.6); z-index: 2; }
@keyframes fly { to { transform: translateX(calc(-100vw - 100%)); } }
.vote { display: flex; flex-direction: column; gap: 18px; max-width: 900px; }
.v-opts { display: grid; gap: 10px; }
.v-opt { position: relative; display: flex; justify-content: space-between; gap: 20px; text-align: left; padding: 16px 20px; background: rgba(255,255,255,.03); border: 1px solid rgba(25,227,196,.25); border-radius: 6px; overflow: hidden; font-size: 1.05rem; transition: border-color .2s; }
.v-opt:hover { border-color: var(--screen); }
.v-bar { position: absolute; inset: 0 auto 0 0; width: 0; background: linear-gradient(90deg, rgba(25,227,196,.35), rgba(25,227,196,.08)); transition: width 1.2s cubic-bezier(.2,.8,.2,1); }
.v-t, .v-p { position: relative; }
.v-p { font-family: var(--mono); color: var(--screen); white-space: nowrap; }
.v-opt.mine { border-color: var(--seal); }
.v-opt.mine .v-t::after { content: "我的选择"; font-size: .7rem; margin-left: 10px; padding: 2px 6px; background: var(--seal); color: #fff; border-radius: 2px; vertical-align: middle; }
.voted .v-opt { cursor: default; }
.v-think { border-left: 3px solid var(--foil); padding: 4px 0 4px 22px; animation: printin .8s both; }
.v-think p { margin: 0 0 10px; line-height: 1.9; color: #d7e8e4; }
.v-think em { font-style: normal; color: var(--foil-l); border-bottom: 1px solid var(--foil); }
.dm-form { display: flex; gap: 10px; }
.dm-form input { flex: 1; background: rgba(255,255,255,.04); border: 1px solid rgba(25,227,196,.3); border-radius: 4px; padding: 12px 16px; color: #fff; font: inherit; }
.dm-form button { background: var(--screen); color: #032; border: none; padding: 0 24px; border-radius: 4px; font-weight: 800; }

/* =========================================================
   签收 & 片尾
   ========================================================= */
.sign { position: fixed; inset: 0; z-index: 70; display: grid; place-items: center; background: rgba(4,12,10,.6); backdrop-filter: blur(4px); }
.sign-card { width: min(480px, 92vw); background-color: var(--mint); background-image: var(--waves); color: #23352d; padding: 30px 32px; border-radius: 6px; box-shadow: 0 40px 80px -20px #000; animation: msgin .4s both; }
.sign-h { font-family: var(--display); font-size: 1.7rem; margin: 0 0 6px; color: var(--cover); }
.sign-sub { margin: 0 0 20px; color: #4d6a5d; line-height: 1.7; }
.sign-card input { width: 100%; background: transparent; border: none; border-bottom: 2px solid var(--ribbon); padding: 10px 4px; font-family: var(--hand); font-size: 1.8rem; color: var(--ribbon); }
.sign-card input:focus { outline: none; }
.sign-btns { display: flex; justify-content: flex-end; gap: 10px; margin-top: 24px; }
.sign-card .act.ghost { color: var(--cover); border-color: rgba(29,74,62,.4); }

.finale { position: fixed; inset: 0; z-index: 40; display: grid; place-items: center; padding: 20px; overflow: auto; }
.fin-inner { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 22px; max-width: 900px; }
#finTitle { color: var(--ivory); }
.fin-lines p { font-family: var(--display); font-size: clamp(1.1rem, 2vw, 1.5rem); margin: 10px 0; opacity: 0; transform: translateY(14px); color: #e9dcb4; }
.finale.on .fin-lines p { animation: up .8s cubic-bezier(.2,.8,.2,1) forwards; }
.finale.on .fin-lines p:nth-child(2) { animation-delay: .5s; }
.finale.on .fin-lines p:nth-child(3) { animation-delay: 1s; }
@keyframes up { to { opacity: 1; transform: none; } }
.fin-end { font-family: var(--hand); font-size: clamp(1.4rem, 2.4vw, 2rem); line-height: 1.6; color: var(--foil-l); margin: 6px 0; opacity: 0; }
.finale.on .fin-end { animation: up 1s 1.7s forwards; }
.fin-actions { display: flex; gap: 12px; opacity: 0; }
.finale.on .fin-actions { animation: up .8s 2.4s forwards; }
.credits { list-style: none; padding: 0; margin: 0; font-size: .75rem; color: #8f9c95; line-height: 1.9; text-align: left; }
.credits a { color: var(--foil); }

/* ---------- 小屏 ---------- */
@media (max-width: 900px) {
  .loupe-stage, .race, .match, .nai, .tm { grid-template-columns: 1fr; }
  .spec-img img { height: 38vh; }
  .rift { display: none; }
  .lane-old, .lane-new { clip-path: none; padding: 18px; border-radius: 6px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
