/* Hallmark · shape: sequential photographic letter (Split Studio was swapped for one uninterrupted viewing path) · genre: atmospheric · theme: Darkroom (deal 3/3, seed cinematic-analog-film-farewell-4e3c·93aee052·2026-11-26·r0) · job: listen · draw: c78c14
 * hero: Ledge · nav: edge-aligned title bar · footer: letter sign-off · imagery: user-supplied categorized photographs · signature: a sealed letter clicked directly to start the continuous reel · darkroom: amber
 * axes: dark/high-contrast-serif/chromatic-amber · posture: restrained · contrast: checked at sweep · fold: checked at sweep · v2.0.0 */
/* Hallmark · pre-emit critique: P4 H5 E4 S3 R5 V4 · weakest: specificity without photos; the real four story prompts carry the first cuts, no stock images or invented events */
/* Hallmark · dropped #story, #flip, #next-story, #mosaic · the user replaced per-photo interaction and the puzzle with plain adjacent text and continuous playback */
@import url('./tokens.css');
@import url('./base.css');

:root {
  --container: 1440px;
  --color-paper: #13110f;
  --color-paper-2: #191613;
  --color-paper-3: #24201c;
  --color-ink: #f0e9db;
  --color-ink-2: #c4b8a8;
  --color-muted: #aa9d8e;
  --color-rule: #4a4035;
  --color-accent: #e4ae73;
  --color-accent-hover: #f5c797;
  --color-accent-ink: #20160f;
  --color-focus: var(--color-accent-hover);
  --color-stock: #dbc49e;
  --color-stock-light: #ebd7b6;
  --color-stock-dark: #c7aa80;
  --color-letter: #ebddc6;
  --color-letter-ink: #382a21;
  --color-letter-rule: #b9a489;
  --color-seal: #783b29;
  --color-seal-ink: #f3dcc0;
  --frame-1: #675d50;
  --frame-2: #5a5551;
  --frame-3: #645b54;
  --frame-4: #535954;
  --frame-5: #6d5e52;
  --frame-6: #655b4f;
  --slot-ink: #fff8ee;
  --display-weight: 600;
  --tracking-display: -.045em;
  --ease-open: cubic-bezier(.23,1,.32,1);
  --grain: .048;
  --grain-texture: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 9 -4'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23g)'/%3E%3C/svg%3E");
}
html { scroll-padding-top: 0; }
body { background: var(--color-paper); color: var(--color-ink); }
.fine { font-size: var(--text-xs); color: var(--color-muted); }
.mast { min-height: 77px; display: flex; align-items: center; justify-content: space-between; gap: var(--space-lg); position: relative; }
.mast::after { content: ''; position: absolute; inset-inline: var(--gutter); bottom: 0; border-bottom: 1px solid var(--color-rule); }
.mast-title { display: inline-flex; align-items: center; gap: var(--space-xs); color: var(--color-ink); white-space: nowrap; font-size: var(--text-sm); }
.mast-title svg { color: var(--color-accent); flex: none; }
.mast-note { color: var(--color-muted); font-size: var(--text-xs); text-align: right; }
.hero { min-height: calc(100svh - 77px); display: grid; grid-template-columns: minmax(0,.84fr) minmax(0,1.2fr); gap: clamp(var(--space-xl),6vw,var(--space-3xl)); align-items: center; padding-block: clamp(48px,8svh,100px); }
.hero-copy h1 { font-size: clamp(3.3rem,7vw,6.65rem); font-weight: var(--display-weight); line-height: 1.09; }
.hero-text { color: var(--color-ink-2); margin-block: var(--space-lg) 28px; font-size: clamp(1rem,1.4vw,1.22rem); }
.hero-hint { margin-top: var(--space-sm); }
.player-control:active { transform: translateY(1px); }
.hero-stage { min-width: 0; border-block: 1px solid var(--color-rule); background: var(--color-paper-2); color: var(--color-ink); }
.stage-cap { min-height: 43px; display: flex; justify-content: space-between; align-items: center; gap: var(--space-xs); padding: var(--space-xs) var(--space-md); color: var(--color-muted); font-size: var(--text-xs); }
.stage-art { position: relative; isolation: isolate; aspect-ratio: 1.49; background: var(--color-paper-3); }
.stage-art::after { content:''; position: absolute; inset: 0; background-image: var(--grain-texture); opacity: var(--grain); pointer-events: none; }
.corner { position: absolute; width: 17px; height: 17px; border: 0 solid var(--color-muted); opacity: .63; }
.near-top { top: 16px; left: 18px; border-width: 1px 0 0 1px; }
.far-top { top: 16px; right: 18px; border-width: 1px 1px 0 0; }
.near-bottom { bottom: 16px; left: 18px; border-width: 0 0 1px 1px; }
.far-bottom { bottom: 16px; right: 18px; border-width: 0 1px 1px 0; }
.proof { position: absolute; width: 54%; aspect-ratio: 1.59; border: 1px solid var(--color-rule); background: var(--color-paper-2); padding: 3%; }
.proof::before { display:block; width:100%; height:100%; content:''; background: var(--frame-1); }
.proof-back { left: 19%; top: 20%; transform: rotate(-9deg); }
.proof-front { left: 29%; bottom: 19%; transform: rotate(8deg); }
.proof-front::before { background: var(--frame-2); }
.envelope { border:0; padding:0; cursor:pointer; background:transparent; color:inherit; transition:transform var(--dur-short) var(--ease-out); position: absolute; z-index: 1; top: 50%; left: 50%; width: 57%; aspect-ratio: 1.62; transform: translate(-50%,-50%) rotate(-5deg); perspective: 900px; isolation: isolate; }
.envelope:disabled { opacity:.6; cursor:not-allowed; }
@media (hover:hover) and (pointer:fine) { .envelope:not(:disabled):hover { transform:translate(-50%,-50%) rotate(-3deg) scale(1.035); } }
.envelope:active { transform:translate(-50%,-50%) rotate(-5deg) scale(.985); }
.envelope-back, .envelope-pocket, .envelope-lid { position:absolute; inset:0; }
.envelope-back { background: var(--color-stock-dark); }
.envelope-note { position: absolute; z-index: 1; inset: 9% 7%; background: var(--color-stock-light); color: var(--color-accent-ink); display: grid; align-content: center; padding: 7%; font-family: var(--font-display); font-size: clamp(14px,2.45vw,34px); line-height: 1.36; transition: transform 630ms var(--ease-open); }
.envelope-pocket { z-index: 2; background: var(--color-stock); clip-path: polygon(0 0,45% 52%,50% 57%,55% 52%,100% 0,100% 100%,0 100%); }
.envelope-lid { z-index: 3; background: var(--color-stock-light); clip-path: polygon(0 0,100% 0,52% 57%,48% 57%); transform-origin: top center; transition: transform 520ms var(--ease-open), opacity 395ms var(--ease-open); }
.seal { position:absolute; z-index:4; top:57%; left:50%; translate:-50% -50%; width:17%; aspect-ratio:1; border-radius:50%; border:3px double var(--color-stock); display:grid; place-items:center; background:var(--color-seal); color:var(--color-seal-ink); font-family:var(--font-display); font-size:clamp(14px,2.65vw,35px); line-height:1; transition: opacity 220ms var(--ease-open), transform 220ms var(--ease-open); }
.address { position:absolute; z-index:3; right:8%; bottom:8%; font-size:var(--text-xs); color:var(--color-accent-ink); }
.film-open .envelope-lid { transform: rotateX(154deg); opacity: 0; }
.film-open .envelope-note { transform: translateY(-40%) rotate(2deg); transition-delay: 125ms; }
.js .film-open .seal { opacity: 0; transform: scale(.86); }

#reel { border-top:1px solid var(--color-rule); }
.chapter { position:relative; min-height:calc(100svh + var(--chapter-travel, 0px)); border-bottom:1px solid var(--color-rule); }
.chapter.is-pinned .scene { position:sticky; top:0; }
.scene { display:grid; min-height:100svh; grid-template-columns:minmax(0,.8fr) minmax(0,1.85fr); align-content:center; align-items:center; gap:clamp(var(--space-xl),6vw,var(--space-3xl)); padding-block:var(--space-2xl); }
.chapter-index { color:var(--color-accent); font-size:var(--text-sm); font-variant-numeric:tabular-nums; margin-bottom:var(--space-lg); }
.scene-copy h2,.closing h2 { font-size:clamp(2.45rem,4.6vw,4.75rem); }
.scene-copy h2:focus,.closing h2:focus { outline:none; }
.chapter-copy,.closing > p { margin-top:var(--space-lg); max-width:22em; color:var(--color-ink-2); font-size:clamp(1rem,1.2vw,1.15rem); line-height:1.82; }
.still { margin:0; min-width:0; }
.rail-window { container-type:inline-size; overflow-x:auto; overflow-y:hidden; scrollbar-width:thin; display:block; scroll-snap-type:x proximity; }
.is-pinned .rail-window { overflow:clip; scroll-snap-type:none; }
.photo-reel { position:relative; display:flex; gap:var(--space-sm); --rail-height:clamp(210px,min(42svh,47cqi),470px); }
.reel-photo { flex:none; width:min(calc(var(--rail-height) * var(--photo-ratio)), 84cqi); min-width:0; color:var(--color-ink-2); scroll-snap-align:start; }
.reel-media { position:relative; height:var(--rail-height); display:grid; place-items:center; overflow:hidden; background:var(--color-paper-3); color:var(--color-ink-2); }
.photo-description { padding-block-start:var(--space-sm); font-size:var(--text-sm); line-height:1.6; overflow-wrap:anywhere; white-space:pre-line; }
.rehearsal-media { position:relative; }
.rehearsal-media video { display:block; position:absolute; inset:0; width:100%; height:100%; object-fit:contain; }
.rehearsal-play,.bike-switch { font:inherit; font-size:var(--text-sm); min-height:44px; cursor:pointer; }
.rehearsal-play { position:absolute; inset:auto var(--space-2xs) var(--space-2xs); display:flex; align-items:center; justify-content:center; gap:var(--space-xs); padding:var(--space-xs); background:var(--color-paper); color:var(--color-ink); border:0; white-space:nowrap; }
.rehearsal-play svg { color:var(--color-accent); flex:none; }
.rehearsal-play:focus-visible { outline-offset:-3px; }
.rehearsal-error { position:absolute; inset:0 0 auto; padding:var(--space-xs); background:var(--color-paper); color:var(--color-ink); font-size:var(--text-sm); }
.bike-switch { display:inline-flex; margin-top:var(--space-lg); align-items:center; background:var(--color-accent); color:var(--color-accent-ink); border:0; padding-inline:var(--space-md); white-space:nowrap; }
.bike-switch:disabled { opacity:.55; cursor:not-allowed; }
@media (hover:hover) { .bike-switch:hover { background:var(--color-accent-hover); } .rehearsal-play:hover { color:var(--color-accent-hover); } }
.photo-description--index { color:var(--color-muted); font-variant-numeric:tabular-nums; }
.reel-photo img { display:block; position:absolute; inset:0; width:100%; height:100%; object-fit:contain; }
.reel-photo:only-child { width:100%; }
.reel-photo:only-child .reel-media { height:min(54svh,520px); }
.still figcaption { display:flex; justify-content:space-between; gap:var(--space-sm); color:var(--color-muted); font-size:var(--text-sm); padding-block:var(--space-sm); border-bottom:1px solid var(--color-rule); }
.photo-count { flex:none; font-variant-numeric:tabular-nums; }
.chapter--portrait { background:var(--color-paper-2); }
.chapter--portrait .scene { grid-template-columns:minmax(0,1fr); gap:var(--space-xl); }
.chapter--portrait .scene-copy,.chapter--finale .scene-copy { display:grid; grid-template-columns:minmax(0,1.5fr) minmax(0,.6fr); align-items:end; column-gap:var(--space-xl); }
.chapter--portrait .chapter-index,.chapter--finale .chapter-index { grid-column:1 / -1; margin-bottom:var(--space-sm); }
.chapter--portrait .chapter-copy,.chapter--finale .chapter-copy { margin:0; }
.chapter--portrait .photo-reel { --rail-height:clamp(200px,min(40svh,44cqi),440px); }
.chapter--portrait .rail-label { color:var(--color-accent); }
.chapter--finale .scene { grid-template-columns:minmax(0,1fr); width:min(100%,1240px); gap:var(--space-xl); }
.chapter--finale .chapter-copy { justify-self:end; }
.chapter--finale .photo-reel { --rail-height:clamp(200px,min(47svh,50cqi),490px); }
.chapter--finale .reel-photo:only-child .reel-media { height:min(62svh,620px); background:var(--color-paper); }
.chapter--finale .still:has(.reel-photo:only-child) figcaption { display:none; }
.interlude { border-bottom:1px solid var(--color-rule); }
.interlude-inner { display:grid; grid-template-columns:auto minmax(0,1fr); align-items:center; gap:var(--space-xl); padding-block:clamp(var(--space-2xl),12svh,var(--space-3xl)); }
.interlude-mark { color:var(--color-accent); }
.interlude p { color:var(--color-ink-2); font-family:var(--font-display); font-size:clamp(1.5rem,3vw,2.85rem); line-height:1.4; }
.credits { background:var(--color-paper-2); border-bottom:1px solid var(--color-rule); }
.credits-inner { padding-block:clamp(var(--space-2xl),12svh,128px); }
.letter-paper { padding:clamp(var(--space-lg),5vw,var(--space-2xl)); background:var(--color-letter); color:var(--color-letter-ink); }
.letter-head { display:flex; align-items:center; justify-content:space-between; gap:var(--space-md); color:var(--color-seal); border-bottom:1px solid var(--color-letter-rule); padding-bottom:var(--space-md); font-size:var(--text-sm); }
.letter-body { display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1fr); gap:var(--space-xl); padding-block-start:var(--space-xl); }
.letter-body h2 { font-size:clamp(2.6rem,5.1vw,5.1rem); }
.letter-copy { display:grid; gap:var(--space-md); align-content:start; max-width:28em; font-size:clamp(1rem,1.45vw,1.2rem); line-height:1.8; }
.letter-sign { margin-top:var(--space-md); color:var(--color-seal); }
.foot { display:flex; align-items:flex-start; justify-content:space-between; gap:20px; min-height:145px; padding-block:20px 84px; color:var(--color-muted); font-size:var(--text-sm); }
.foot a { color:var(--color-ink); min-height:44px; display:inline-flex; align-items:center; margin-top:calc(-1 * var(--space-sm)); white-space:nowrap; }

.player { position:fixed; z-index:var(--z-sticky); right:max(22px,env(safe-area-inset-right)); bottom:max(20px,env(safe-area-inset-bottom)); display:flex; align-items:center; gap:var(--space-md); padding:var(--space-2xs) var(--space-sm) var(--space-2xs) var(--space-2xs); background:var(--color-paper); border:1px solid var(--color-rule); color:var(--color-ink-2); }
.player-control { display:inline-flex; align-items:center; justify-content:center; gap:var(--space-xs); min-height:44px; min-width:94px; padding:0 var(--space-xs); background:var(--color-paper-3); color:var(--color-ink); border:0; cursor:pointer; white-space:nowrap; font-size:var(--text-xs); }
.player-control:disabled { opacity:.55; cursor:not-allowed; }
.player-control svg { color:var(--color-accent); flex:none; }
.music-control { min-width:44px; padding:0; background:var(--color-paper); border-inline-start:1px solid var(--color-rule); }
.music-control[aria-pressed='true'] .sound-off, .music-control[aria-pressed='false'] .sound-on { display:none; }
.music-control[aria-pressed='false'] svg { color:var(--color-muted); }
.player-detail { display:grid; gap:var(--space-2xs); min-width:61px; font-size:var(--text-xs); font-variant-numeric:tabular-nums; }
progress { appearance:none; width:100%; height:2px; border:0; background:var(--color-rule); }
progress::-webkit-progress-bar { background:var(--color-rule); }
progress::-webkit-progress-value { background:var(--color-accent); }
progress::-moz-progress-bar { background:var(--color-accent); }
@media (hover:hover) { .player-control:hover { color:var(--color-accent-hover); } .foot a:hover { color:var(--color-accent-hover); } }
@media (max-width:60rem) {
  .hero { gap:32px; }
  .scene { gap:32px; }
  .scene-copy h2 { font-size:clamp(2.2rem,5.2vw,4rem); }
}
@media (max-width:40rem) {
  .mast { min-height:59px; gap:var(--space-xs); }
  .mast-note { font-size:var(--text-xs); }
  .mast-title { gap:var(--space-2xs); }
  .mast-title svg { width:19px;height:19px; }
  .hero { min-height:calc(100svh - 59px); grid-template-columns:minmax(0,1fr); align-content:center; gap:28px; padding-block:var(--space-xl); }
  .hero-copy h1 { font-size:clamp(3rem,12vw,4.25rem); }
  .hero-text { margin-block:var(--space-md) 20px; }
  .stage-cap { min-height:34px; padding:var(--space-2xs) var(--space-sm); }
  .corner { width:11px; height:11px; }
  .near-top,.near-bottom { left:11px; } .far-top,.far-bottom { right:11px; }
  .near-top,.far-top { top:11px; } .near-bottom,.far-bottom { bottom:11px; }
  .scene { grid-template-columns:minmax(0,1fr); gap:var(--space-lg); padding-block:var(--space-xl) var(--space-2xl); }
  .chapter-index { margin-bottom:var(--space-sm); }
  .photo-reel { --rail-height:clamp(170px,min(35svh,61cqi),290px); }
  .reel-photo:only-child .reel-media { height:min(40svh,360px); }
  .chapter-copy,.closing > p { margin-top:var(--space-sm); }
  .chapter--portrait .scene,.chapter--finale .scene { gap:var(--space-lg); }
  .chapter--portrait .scene-copy,.chapter--finale .scene-copy { grid-template-columns:minmax(0,1fr); }
  .chapter--portrait .chapter-copy,.chapter--finale .chapter-copy { justify-self:start; margin-top:var(--space-sm); }
  .chapter--portrait .photo-reel { --rail-height:clamp(163px,min(32svh,58cqi),290px); }
  .chapter--finale .reel-photo:only-child .reel-media { height:auto; aspect-ratio:var(--photo-ratio); max-height:54svh; }
  .interlude-inner { grid-template-columns:minmax(0,1fr); gap:var(--space-md); }
  .interlude-mark svg { width:44px; height:44px; }
  .letter-body { grid-template-columns:minmax(0,1fr); gap:var(--space-lg); padding-block-start:var(--space-lg); }
  .player { right:max(12px,env(safe-area-inset-right)); bottom:max(12px,env(safe-area-inset-bottom)); }
}

/* Stage lighting follows the selected frame without zooming or cropping the original. */
.stage-spotlight { position:absolute; inset:0; pointer-events:none; opacity:0; background:radial-gradient(ellipse 37% 66% at var(--spot-x) var(--spot-y), transparent 25%, color-mix(in srgb, var(--color-paper) 49%, transparent) 100%); transition:opacity var(--dur-short) var(--ease-out); }
.reel-photo--spotlight.is-current .stage-spotlight { opacity:1; }
.reel-photo--spotlight.is-current .photo-description { color:var(--color-accent); }

/* One screen per chapter or cutaway; tall chapters retain their scroll runway. */
.interlude-inner { min-height:100svh; align-content:center; }
.credits { min-height:100svh; display:flex; flex-direction:column; }
.credits-inner { flex:1; display:grid; align-items:center; }
.credits .foot { min-height:0; padding-block-end:calc(72px + env(safe-area-inset-bottom)); }
@media (pointer:coarse) and (min-height:540px) {
  html.film-paging { scroll-snap-type:y proximity; }
  .film-paging .chapter,.film-paging .interlude,.film-paging .credits { scroll-snap-align:start; scroll-snap-stop:always; }
}

/* ===== v2 additions ===== */
.photo-description--index { display:none; }

/* 数字页 */
.stat-interlude { background:var(--color-paper-2); }
.stat-interlude:focus { outline:none; }
.stat-inner { min-height:100svh; display:grid; align-content:center; justify-items:start; gap:var(--space-lg); padding-block:var(--space-3xl); }
.stat-dates { display:flex; align-items:center; gap:var(--space-md); color:var(--color-accent); font-size:var(--text-sm); font-variant-numeric:tabular-nums; letter-spacing:.08em; }
.stat-dates i { display:block; width:clamp(48px,10vw,120px); height:1px; background:var(--color-accent); opacity:.7; }
.stat-number { display:flex; align-items:baseline; gap:var(--space-md); font-family:var(--font-display); font-weight:var(--display-weight); font-size:clamp(5rem,16vw,13rem); line-height:1; font-variant-numeric:tabular-nums; letter-spacing:-.04em; color:var(--color-ink); }
.stat-number small { font-size:clamp(1.5rem,3vw,2.5rem); letter-spacing:0; color:var(--color-ink-2); }
.stat-line { color:var(--color-ink-2); font-family:var(--font-display); font-size:clamp(1.25rem,2.4vw,2.1rem); line-height:1.6; max-width:24em; }

/* 开启条件信 / 留言墙 */
.after { padding-block:clamp(var(--space-2xl),12svh,128px); border-top:1px solid var(--color-rule); }
.after h2 { font-size:clamp(2rem,4vw,3.75rem); margin-bottom:var(--space-md); }
.after .chapter-copy { margin-top:0; max-width:34em; }
.letter-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(min(100%,300px),1fr)); gap:var(--space-lg); margin-top:var(--space-xl); align-items:start; }
.open-letter { background:var(--color-stock); color:var(--color-accent-ink); transition:background var(--dur-short) var(--ease-out); }
.open-letter.is-open { background:var(--color-letter); color:var(--color-letter-ink); }
.open-letter-seal { all:unset; box-sizing:border-box; display:grid; grid-template-columns:auto minmax(0,1fr); gap:var(--space-xs) var(--space-md); align-items:center; width:100%; min-height:112px; padding:var(--space-lg); cursor:pointer; }
.open-letter-seal:focus-visible { outline:2px solid var(--color-accent-ink); outline-offset:-5px; }
.open-letter-mark { grid-row:1 / span 2; width:46px; aspect-ratio:1; border-radius:50%; background:var(--color-seal); border:3px double var(--color-stock); transition:transform var(--dur-long) var(--ease-open); }
.open-letter-mark::after { content:'启'; display:grid; place-items:center; height:100%; color:var(--color-seal-ink); font-family:var(--font-display); font-size:1.15rem; }
.is-locked .open-letter-mark::after { content:'锁'; }
.is-open .open-letter-mark { transform:rotate(18deg) scale(.88); }
.open-letter-when { font-family:var(--font-display); font-size:clamp(1.15rem,1.6vw,1.4rem); line-height:1.35; font-weight:700; }
.open-letter-hint { font-size:var(--text-xs); opacity:.75; }
.is-locked { opacity:.82; }
.open-letter-body { padding:0 var(--space-lg) var(--space-lg); display:grid; gap:var(--space-sm); line-height:1.8; animation:letter-in 420ms var(--ease-open); }
.open-letter-body h3 { font-size:clamp(1.4rem,2vw,1.8rem); color:var(--color-seal); margin-bottom:var(--space-2xs); }
@keyframes letter-in { from { opacity:0; transform:translateY(-8px); } to { opacity:1; transform:none; } }
.note-wall { columns:3 260px; column-gap:var(--space-lg); margin-top:var(--space-xl); }
.note { break-inside:avoid; margin:0 0 var(--space-lg); padding:var(--space-lg); background:var(--color-letter); color:var(--color-letter-ink); transform:rotate(var(--tilt,0deg)); transition:transform var(--dur-short) var(--ease-out); }
.note blockquote { margin:0; font-family:var(--font-display); font-size:clamp(1.05rem,1.4vw,1.2rem); line-height:1.75; }
.note figcaption { margin-top:var(--space-md); font-size:var(--text-sm); color:var(--color-seal); text-align:right; }
.note.is-placeholder { outline:1px dashed var(--color-seal); outline-offset:-6px; }
@media (hover:hover) { .note:hover { transform:rotate(0deg) translateY(-4px); } }
@media (max-width:40rem) { .stat-inner { padding-block:var(--space-2xl); } .open-letter-seal { padding:var(--space-md); } }

/* 口令页 */
body.gated { overflow:hidden; }
.gate { position:fixed; inset:0; z-index:var(--z-modal); display:grid; place-items:center; padding:var(--gutter); background:var(--color-paper); transition:opacity 650ms var(--ease-open), visibility 650ms; }
.gate::after { content:''; position:absolute; inset:0; background-image:var(--grain-texture); opacity:var(--grain); pointer-events:none; }
.gate.is-leaving { opacity:0; visibility:hidden; }
.gate-card { position:relative; z-index:1; width:min(100%,460px); display:grid; justify-items:center; gap:var(--space-md); text-align:center; }
.gate-seal { width:64px; aspect-ratio:1; border-radius:50%; display:grid; place-items:center; background:var(--color-seal); color:var(--color-seal-ink); border:3px double var(--color-stock); font-family:var(--font-display); font-size:1.6rem; transition:transform 600ms var(--ease-open); }
.gate.is-right .gate-seal { transform:rotate(-20deg) scale(1.12); }
.gate-card h1 { font-size:clamp(1.9rem,6vw,2.8rem); max-width:none; line-height:1.2; }
.gate-q { color:var(--color-ink-2); line-height:1.7; }
.gate-input { width:100%; max-width:260px; min-height:56px; text-align:center; font-size:1.6rem; letter-spacing:.35em; font-variant-numeric:tabular-nums; background:var(--color-paper-3); color:var(--color-ink); border:1px solid var(--color-rule); border-radius:0; padding:0 var(--space-md); }
.gate-input:focus { outline:2px solid var(--color-accent); outline-offset:2px; }
.gate-input::placeholder { letter-spacing:.1em; font-size:1rem; color:var(--color-muted); }
.gate-go { min-height:48px; min-width:140px; border:0; background:var(--color-accent); color:var(--color-accent-ink); cursor:pointer; font-size:var(--text-md); }
@media (hover:hover) { .gate-go:hover { background:var(--color-accent-hover); } }
.gate-msg { min-height:1.6em; font-size:var(--text-sm); color:var(--color-muted); }
.gate.is-right .gate-msg { color:var(--color-accent); }

/* ===== 交互惊喜 ===== */
.chip-button { display:inline-flex; align-items:center; gap:var(--space-xs); min-height:44px; margin-top:var(--space-lg); padding:0 var(--space-md); border:0; background:var(--color-accent); color:var(--color-accent-ink); font-size:var(--text-sm); cursor:pointer; white-space:nowrap; }
.chip-ghost { background:transparent; color:var(--color-ink); box-shadow:inset 0 0 0 1px var(--color-rule); }
@media (hover:hover) { .chip-button:hover { background:var(--color-accent-hover); } .chip-ghost:hover { background:var(--color-paper-3); } }
.chip-button.is-calling { animation:calling 1.6s var(--ease-out) 2; }
@keyframes calling { 0%,100% { box-shadow:0 0 0 0 color-mix(in srgb, var(--color-accent) 60%, transparent); } 60% { box-shadow:0 0 0 12px transparent; } }
body.sheet-open { overflow:hidden; }

/* 浮层 */
.sheet { position:fixed; inset:0; z-index:var(--z-modal); display:grid; place-items:center; padding:max(12px,env(safe-area-inset-top)) 12px max(12px,env(safe-area-inset-bottom)); background:color-mix(in srgb, #000 72%, transparent); animation:fade-in 240ms var(--ease-out); }
.sheet-box { position:relative; width:min(100%,960px); max-height:100%; overflow:auto; background:var(--color-paper-2); border:1px solid var(--color-rule); padding:clamp(16px,3vw,32px); }
.sheet-close { position:absolute; top:8px; right:8px; min-height:40px; padding:0 var(--space-sm); border:0; background:transparent; color:var(--color-muted); cursor:pointer; font-size:var(--text-sm); z-index:2; }
@keyframes fade-in { from { opacity:0; } to { opacity:1; } }

/* 找找 Felix */
.find { display:grid; gap:var(--space-sm); }
.find-head { color:var(--color-accent); font-size:var(--text-sm); padding-right:56px; }
.find-stage { --find-h:64svh; position:relative; width:100%; margin-inline:auto; cursor:crosshair; touch-action:manipulation; user-select:none; -webkit-user-select:none; overflow:hidden; background:var(--color-paper); }
.find-stage img { width:100%; height:100%; object-fit:cover; display:block; pointer-events:none; }
.find-mark { position:absolute; translate:-50% -50%; pointer-events:none; border-radius:50%; }
.find-mark.is-miss { width:28px; height:28px; border:2px solid #fff; opacity:.9; animation:miss 700ms var(--ease-out) forwards; }
.find-mark.is-miss::before, .find-mark.is-miss::after { content:''; position:absolute; left:50%; top:50%; width:14px; height:2px; background:#fff; translate:-50% -50%; rotate:45deg; }
.find-mark.is-miss::after { rotate:-45deg; }
@keyframes miss { 0% { scale:.5; } 30% { scale:1.1; } 100% { scale:1; opacity:0; } }
.find-mark.is-hit { width:clamp(70px,14%,130px); aspect-ratio:1; border:3px solid var(--color-accent); box-shadow:0 0 0 9999px color-mix(in srgb, #000 45%, transparent); animation:hit 520ms var(--ease-out); }
@keyframes hit { from { scale:2.2; opacity:0; } to { scale:1; opacity:1; } }
.find-msg { font-family:var(--font-display); font-size:clamp(1.1rem,2.2vw,1.5rem); line-height:1.5; min-height:1.5em; }
.find-next { justify-self:start; min-height:44px; padding:0 var(--space-lg); border:0; background:var(--color-accent); color:var(--color-accent-ink); cursor:pointer; }
.find-result { font-family:var(--font-display); font-size:clamp(2rem,5vw,3.4rem); line-height:1.2; }

/* 按快门：取景器 */
.chapter--camera .still figcaption { display:none; }
.viewfinder { width:100%; display:grid; gap:var(--space-sm); }
.vf-frame { --vf-ratio:1.5; position:relative; width:min(100%, calc(min(56svh,560px) * var(--vf-ratio))); aspect-ratio:var(--vf-ratio); margin-inline:auto; overflow:hidden; background:#0b0a09; }
.vf-frame img { position:absolute; inset:0; width:100%; height:100%; object-fit:cover; transition:filter 600ms var(--ease-out); }
.vf-frame.is-preview img { filter:blur(10px) brightness(.6) saturate(.6); }
.vf-frame.is-developing img { animation:develop 1400ms var(--ease-out); }
@keyframes develop { from { filter:brightness(2.4) contrast(.5) saturate(0); } 40% { filter:brightness(1.2) contrast(.9) saturate(.5); } to { filter:none; } }
.vf-flash { position:absolute; inset:0; background:#fff; opacity:0; pointer-events:none; }
.vf-hud { position:absolute; inset:0; pointer-events:none; color:#fff; font-size:var(--text-xs); font-variant-numeric:tabular-nums; text-shadow:0 1px 2px #0008; }
.vf-hud > span { position:absolute; }
.vf-rec { top:12px; left:14px; color:#ff6a4d; }
.vf-exp { bottom:12px; left:14px; opacity:.85; }
.vf-count { bottom:12px; right:14px; }
.vf-focus { left:50%; top:50%; width:64px; height:44px; translate:-50% -50%; border:1px solid #fff9; }
.vf-focus::before, .vf-focus::after { content:''; position:absolute; left:50%; top:50%; background:#fff9; translate:-50% -50%; }
.vf-focus::before { width:10px; height:1px; } .vf-focus::after { width:1px; height:10px; }
.vf-hud::before { content:''; position:absolute; inset:10px; border:1px solid #fff4; border-radius:2px; }
.vf-end { position:absolute; inset:0; display:grid; place-content:center; text-align:center; background:color-mix(in srgb, #000 62%, transparent); color:#fff; font-family:var(--font-display); font-size:clamp(1.4rem,3vw,2.2rem); animation:fade-in 600ms var(--ease-out); }
.vf-end[hidden] { display:none; }
.vf-end-sub { font-family:var(--font-body); font-size:var(--text-sm); opacity:.8; margin-top:var(--space-xs); }
.vf-bar { display:flex; align-items:center; gap:var(--space-md); width:min(100%, calc(min(56svh,560px) * 1.5)); margin-inline:auto; }
.vf-shutter { flex:none; width:60px; height:60px; border-radius:50%; border:3px solid var(--color-ink); background:transparent; padding:5px; cursor:pointer; touch-action:manipulation; }
.vf-shutter span { display:block; width:100%; height:100%; border-radius:50%; background:var(--color-accent); transition:scale 120ms var(--ease-out); }
.vf-shutter:active span { scale:.86; }
.vf-caption { color:var(--color-ink-2); font-size:var(--text-sm); line-height:1.6; }

/* 吹蜡烛 */
.cake { margin-top:var(--space-xl); display:grid; justify-items:center; width:min(100%,360px); }
.cake-candles { display:flex; gap:clamp(14px,4vw,26px); position:relative; z-index:1; }
.candle { position:relative; width:30px; height:96px; padding:0; border:0; background:none; cursor:pointer; touch-action:manipulation; -webkit-tap-highlight-color:transparent; }
.candle-stick { position:absolute; bottom:0; left:50%; translate:-50% 0; width:12px; height:56px; border-radius:3px 3px 0 0; background:repeating-linear-gradient(135deg, #f4ede2 0 6px, var(--color-accent) 6px 10px); }
.candle-stick::before { content:''; position:absolute; top:-7px; left:50%; width:2px; height:8px; translate:-50% 0; background:#3a302a; }
.candle-flame { position:absolute; left:50%; bottom:62px; width:14px; height:24px; translate:-50% 0; border-radius:50% 50% 50% 50% / 62% 62% 38% 38%; background:radial-gradient(ellipse at 50% 72%, #fff8d0 0 22%, #ffc94a 45%, #ff7a2c 80%, transparent 82%); box-shadow:0 0 18px 6px #ffb3403d; transform-origin:50% 90%; animation:flicker calc(1.1s + var(--i) * .13s) ease-in-out infinite alternate; transition:opacity 220ms, scale 220ms; }
@keyframes flicker { 0% { rotate:-3deg; scale:1 1; } 50% { rotate:2deg; scale:.94 1.06; } 100% { rotate:-1deg; scale:1.04 .96; } }
.candle-smoke { position:absolute; left:50%; bottom:64px; width:6px; height:6px; border-radius:50%; background:#cfc6bb; opacity:0; translate:-50% 0; }
.candle.is-out .candle-flame { opacity:0; scale:.2; animation:none; }
.candle.is-out .candle-smoke { animation:smoke 1500ms var(--ease-out) forwards; }
@keyframes smoke { 0% { opacity:.7; transform:translate(0,0) scale(1); } 100% { opacity:0; transform:translate(8px,-56px) scale(5); } }
.candle:not(:disabled):hover .candle-flame { scale:1.08; }
.candle:disabled { cursor:default; }
.cake-body { position:relative; display:grid; justify-items:center; width:100%; margin-top:-4px; }
.cake-top { width:86%; height:16px; border-radius:50%; background:#f4ede2; }
.cake-tier { display:grid; place-items:center; width:86%; height:86px; margin-top:-8px; background:linear-gradient(#f4ede2 0 14px, var(--color-accent) 14px 22px, #e9dfd0 22px); color:var(--color-accent); font-family:var(--font-display); font-size:var(--text-xl); padding-top:20px; border-radius:0 0 6px 6px; }
.cake-plate { width:100%; height:12px; margin-top:-2px; border-radius:50%; background:var(--color-paper-3); }
.cake.is-done .cake-tier { animation:glow 1600ms var(--ease-out); }
@keyframes glow { 0% { box-shadow:0 0 0 0 #ffc94a80; } 100% { box-shadow:0 0 0 30px transparent; } }
.cake-tools { display:flex; flex-wrap:wrap; align-items:center; justify-content:center; gap:var(--space-sm); margin-top:var(--space-md); }
.cake-tools .chip-button { margin-top:0; }
.chip-button.is-listening { --level:0; box-shadow:inset 0 0 0 1px var(--color-accent), 0 0 0 calc(var(--level) * 14px) color-mix(in srgb, var(--color-accent) 35%, transparent); color:var(--color-accent); }
.cake-status { width:100%; text-align:center; color:var(--color-ink-2); font-size:var(--text-sm); min-height:1.6em; }

/* 长按油门 */
.throttle { --p:0; position:relative; overflow:hidden; display:inline-flex; align-items:center; min-height:52px; margin-top:var(--space-lg); padding:0 var(--space-lg); border:1px solid var(--color-accent); background:transparent; color:var(--color-ink); font-size:var(--text-sm); cursor:pointer; user-select:none; -webkit-user-select:none; -webkit-touch-callout:none; touch-action:none; -webkit-tap-highlight-color:transparent; }
.throttle-fill { position:absolute; inset:0; background:var(--color-accent); transform-origin:left; transform:scaleX(var(--p)); }
.throttle-text { position:relative; mix-blend-mode:difference; color:#fff; }
.throttle.is-holding { animation:shake 90ms linear infinite; }
.throttle.is-done { border-color:var(--color-rule); }
.throttle-tip { min-height:1.6em; margin-top:var(--space-xs); color:var(--color-accent); font-size:var(--text-sm); }
@keyframes shake { 0% { translate:0 0; } 25% { translate:1px -1px; } 50% { translate:-1px 1px; } 75% { translate:1px 1px; } 100% { translate:0 0; } }
.reel-media.is-rumbling img { animation:shake 70ms linear infinite; }

/* 年份进度条 */
.player-detail:has(.years) { min-width:0; }
.years { display:grid; grid-template-columns:auto 1fr; grid-template-rows:auto auto; column-gap:var(--space-sm); align-items:center; width:clamp(150px,22vw,240px); }
.years-now { grid-row:1 / 3; min-width:3.6em; font-family:var(--font-display); font-size:var(--text-lg); color:var(--color-ink); font-variant-numeric:tabular-nums; }
.years-track { --x:0; position:relative; height:2px; background:var(--color-rule); }
.years-dot { position:absolute; top:50%; left:calc(var(--x) * 100%); width:9px; height:9px; translate:-50% -50%; border-radius:50%; background:var(--color-accent); transition:left 600ms var(--ease-out), opacity 300ms; }
.years-dot { left:calc(var(--x, 0) * 100%); }
.years.is-unknown .years-dot { opacity:.35; }
.years.is-unknown .years-now { font-size:var(--text-sm); color:var(--color-ink-2); }
.years-ticks { display:flex; justify-content:space-between; margin-top:4px; font-size:10px; color:var(--color-muted); }
.years-tick { transition:color 300ms; } .years-tick.is-past { color:var(--color-ink-2); }

/* 彩蛋 */
.egg { display:grid; gap:var(--space-md); max-width:560px; margin-inline:auto; padding-block:var(--space-lg); text-align:center; }
.egg-title { font-family:var(--font-display); font-size:var(--text-section); line-height:1.2; }
.egg-text { color:var(--color-ink-2); line-height:1.9; }
.egg-media { width:100%; max-height:60svh; background:#000; }
.egg-audio { width:100%; }

/* 结尾签收 */
.signoff { display:flex; align-items:center; gap:var(--space-md); margin-top:var(--space-xl); }
.signoff-seal { --p:0; position:relative; flex:none; width:72px; height:72px; border:0; border-radius:50%; padding:0; background:none; cursor:pointer; user-select:none; -webkit-user-select:none; -webkit-touch-callout:none; touch-action:none; -webkit-tap-highlight-color:transparent; }
.signoff-ring { position:absolute; inset:0; border-radius:50%; background:conic-gradient(var(--color-seal) calc(var(--p) * 360deg), color-mix(in srgb, var(--color-seal) 22%, transparent) 0); }
.signoff-core { position:absolute; inset:6px; display:grid; place-items:center; border-radius:50%; background:var(--color-seal); color:var(--color-seal-ink); font-family:var(--font-display); font-size:1.6rem; transition:scale 160ms var(--ease-out); }
.signoff-seal.is-holding .signoff-core { scale:.9; }
.signoff-label { color:var(--color-letter-ink); opacity:.75; font-size:var(--text-sm); }
.letter-paper { position:relative; }
.stamp { position:absolute; right:clamp(16px,6vw,64px); bottom:clamp(16px,5vw,56px); display:grid; justify-items:center; gap:2px; padding:10px 18px; border:3px double var(--color-seal); color:var(--color-seal); font-family:var(--font-display); transform:rotate(-12deg); opacity:.88; mix-blend-mode:multiply; pointer-events:none; }
.stamp b { font-size:1.35rem; letter-spacing:.08em; } .stamp span { font-size:var(--text-xs); font-variant-numeric:tabular-nums; }
.stamp[hidden] { display:none; }

/* 照片拼成 5 */
.five { position:fixed; inset:0; z-index:var(--z-modal); display:grid; grid-template-columns:auto auto; align-items:center; justify-content:center; gap:clamp(24px,6vw,80px); padding:max(20px,env(safe-area-inset-top)) 20px max(20px,env(safe-area-inset-bottom)); background:var(--color-paper); overflow:hidden; animation:fade-in 400ms var(--ease-out); }
.five-grid { --cell:min(9.5svh,8vw,76px); display:grid; grid-template-columns:repeat(5,var(--cell)); grid-template-rows:repeat(7,var(--cell)); gap:6px; }
.five-tile { display:block; background:center / cover no-repeat var(--color-paper-3); transform:rotate(var(--tilt)); box-shadow:0 6px 16px #0006; outline:3px solid #f4ede2; outline-offset:-3px; }
.five-words { opacity:0; translate:0 12px; transition:opacity 800ms var(--ease-out), translate 800ms var(--ease-out); }
.five-words.is-in { opacity:1; translate:0 0; }
.five-big { font-family:var(--font-display); font-size:var(--text-display); line-height:1.15; color:var(--color-ink); }
.five-small { margin-top:var(--space-sm); color:var(--color-ink-2); font-size:var(--text-lead); }
.five-actions { display:flex; gap:var(--space-sm); flex-wrap:wrap; }

@media (max-width: 720px) {
  .five { grid-template-columns:auto; justify-items:center; text-align:center; align-content:center; gap:var(--space-lg); }
  .five-grid { --cell:min(7.4svh,15vw,60px); gap:5px; }
  .five-actions { justify-content:center; }
  .five-big { font-size:var(--text-display-s); }
  .years { width:132px; }
  .years-now { font-size:var(--text-md); }
  .vf-shutter { width:54px; height:54px; }
  .signoff { margin-top:var(--space-lg); }
  .stamp { position:relative; right:auto; bottom:auto; justify-self:end; margin:var(--space-md) 0 0 auto; width:max-content; }
  .find-stage { --find-h:58svh; }
  .sheet-box { padding:var(--space-md); }
}
@media (prefers-reduced-motion: reduce) {
  .candle-flame { animation:none; }
  .throttle.is-holding, .reel-media.is-rumbling img { animation:none; }
}
