:root {
  --night: #0b0910;
  --ink: #f4ede6;
  --soft: rgba(244, 237, 230, .68);
  --faint: rgba(244, 237, 230, .4);
  --line: rgba(244, 237, 230, .14);
  --glass: rgba(26, 21, 30, .58);
  --ember: #ff9a62;
  --rose: #ff5c86;
  --heat: linear-gradient(120deg, #ffb27a, #ff5c86);
  --serif: "Instrument Serif", Georgia, serif;
  --sans: Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
  --stage-w: 50vw;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--night); color: var(--ink); font: 16px/1.65 var(--sans); -webkit-font-smoothing: antialiased; overflow-x: hidden; }
body::after { content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 40; opacity: .07; mix-blend-mode: overlay;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"); }
a { color: inherit; }
button { font: inherit; color: inherit; }
em { font-style: italic; background: var(--heat); -webkit-background-clip: text; background-clip: text; color: transparent; padding-right: .06em; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
mark.todo { background: #ffe25a; color: #3a2f00; padding: 0 .3em; border-radius: 3px; font: 600 .85em/1.4 var(--sans); }

/* 房间：夜色、跟着光标走的灯、漂浮的灰尘 */
.dust { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; }
.lamp { position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background:
    radial-gradient(42vmax 42vmax at var(--lx, 72%) var(--ly, 38%), rgba(255, 140, 90, .2), transparent 70%),
    radial-gradient(60vmax 50vmax at 75% 110%, rgba(255, 70, 130, .12), transparent 70%),
    radial-gradient(80vmax 60vmax at 0% 0%, rgba(90, 70, 160, .14), transparent 70%); }

/* 她 */
.stage { position: fixed; top: 0; right: 0; width: var(--stage-w); height: 100vh; height: 100svh; z-index: 1; pointer-events: none; }
.figure { position: absolute; left: 50%; bottom: 112px; height: calc(100% - 150px); aspect-ratio: 2 / 3; transform: translateX(-50%); }
.poster, .her { position: absolute; inset: 0; width: 100%; height: 100%; }
.poster { object-fit: contain; object-position: center bottom; transition: opacity .6s; }
.her { opacity: 0; transition: opacity .6s; }
.ready .her { opacity: 1; }
.ready .poster { opacity: 0; }
.floor { position: absolute; left: 22%; right: 22%; bottom: 3.6%; height: 4%; border-radius: 50%; background: radial-gradient(closest-side, rgba(0, 0, 0, .55), transparent); z-index: -1; }

/* 她说的话：逐词浮现，说完像水汽一样散掉 */
.say { position: fixed; z-index: 3; left: 66%; top: 12%; width: min(26vw, 340px); font: italic 400 clamp(22px, 1.9vw, 32px)/1.22 var(--serif); letter-spacing: .005em;
  text-shadow: 0 0 24px rgba(255, 150, 110, .35), 0 2px 18px rgba(0, 0, 0, .6); pointer-events: none; }
.say.over .line { padding: 14px 18px; border-radius: 18px; background: rgba(14, 11, 18, .62); backdrop-filter: blur(16px); transition: background 1.4s, backdrop-filter 1.4s; }
.say.over .line.gone { background: transparent; backdrop-filter: none; }
.say .w { display: inline-block; white-space: nowrap; opacity: 0; filter: blur(8px); transform: translateY(.3em); transition: opacity .5s, filter .6s, transform .6s cubic-bezier(.2, .7, .2, 1); }
.say .w.on { opacity: 1; filter: blur(0); transform: none; }
.say .c { display: inline-block; white-space: pre; }
.say .line.gone { position: absolute; top: 0; left: 0; right: 0; }
.say.gone .c { animation: evaporate 1.4s cubic-bezier(.4, 0, .6, 1) forwards; animation-delay: var(--d); }
@keyframes evaporate { to { opacity: 0; filter: blur(10px); transform: translate(var(--x), -1.4em) scale(1.15); } }

/* 页眉 */
.top { position: fixed; top: 0; left: 0; right: 0; z-index: 30; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 18px clamp(16px, 4vw, 48px); }
.mark { font: italic 400 30px/1 var(--serif); text-decoration: none; letter-spacing: -.01em; display: flex; align-items: flex-start; }
.mark i { width: 7px; height: 7px; border-radius: 50%; background: var(--heat); margin: 4px 0 0 2px; box-shadow: 0 0 12px var(--rose); }
.presence { margin: 0; display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--soft); padding: 7px 14px; border: 1px solid var(--line); border-radius: 999px; background: rgba(11, 9, 16, .35); backdrop-filter: blur(10px); }
.presence i { width: 7px; height: 7px; border-radius: 50%; background: #5ef0a0; box-shadow: 0 0 0 0 rgba(94, 240, 160, .6); animation: alive 2.4s infinite; }
.presence .sep { opacity: .5; }
@keyframes alive { 70% { box-shadow: 0 0 0 7px rgba(94, 240, 160, 0); } 100% { box-shadow: 0 0 0 0 rgba(94, 240, 160, 0); } }
.top nav { display: flex; align-items: center; gap: 10px; }
.sound { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 50%; border: 1px solid var(--line); background: rgba(11, 9, 16, .35); backdrop-filter: blur(10px); cursor: pointer; }
.sound svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.sound path:first-child { fill: currentColor; }
.sound .mute { display: none; }
.sound[aria-pressed="false"] .wave { display: none; }
.sound[aria-pressed="false"] .mute { display: block; }
.pill { text-decoration: none; font-weight: 600; font-size: 14px; padding: 9px 18px; border-radius: 999px; background: var(--ink); color: var(--night); }

/* 文字一侧 */
main { position: relative; z-index: 2; width: min(600px, 44vw); margin-left: clamp(16px, 7vw, 120px); }
.scene { min-height: 100vh; min-height: 100svh; display: flex; flex-direction: column; justify-content: center; padding: 120px 0 140px; }
.scene > * { transition: opacity .9s, transform .9s cubic-bezier(.2, .7, .2, 1), filter .9s; }
.scene:not(.seen) > * { opacity: 0; transform: translateY(24px); filter: blur(6px); }
.scene > :nth-child(2) { transition-delay: .08s; } .scene > :nth-child(3) { transition-delay: .16s; } .scene > :nth-child(4) { transition-delay: .24s; } .scene > :nth-child(5) { transition-delay: .32s; }
h1, h2 { font-family: var(--serif); font-weight: 400; letter-spacing: -.02em; margin: 0 0 .35em; line-height: .98; }
h1 { font-size: clamp(56px, 7.6vw, 120px); }
h2 { font-size: clamp(42px, 5vw, 76px); }
.scene p { color: var(--soft); font-size: 18px; margin: 0 0 1em; max-width: 34em; }
.scene .lede { font-size: 19px; }
.eyebrow { text-transform: uppercase; letter-spacing: .16em; font-size: 12px !important; color: var(--faint) !important; margin-bottom: 22px !important; }
.num { font: italic 400 22px var(--serif) !important; color: var(--ember) !important; margin-bottom: 8px !important; }
.actions { display: flex; align-items: center; gap: 26px; margin-top: 14px; flex-wrap: wrap; }
.button { border: 0; cursor: pointer; padding: 15px 28px; border-radius: 999px; background: var(--heat); color: #1b0d12; font-weight: 600; font-size: 16px; box-shadow: 0 10px 40px -10px rgba(255, 92, 134, .7); transition: transform .2s, box-shadow .2s; }
.button:hover { transform: translateY(-1px); box-shadow: 0 14px 50px -10px rgba(255, 92, 134, .9); }
.link { color: var(--soft); text-decoration: none; font-weight: 500; }
.link:hover { color: var(--ink); }

.chip { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; border: 1px solid var(--line); background: var(--glass); backdrop-filter: blur(14px); border-radius: 999px; padding: 8px 14px; font-size: 14px; font-weight: 500; transition: border-color .2s, background .2s, transform .2s; }
.chip:hover { border-color: rgba(255, 154, 98, .6); transform: translateY(-1px); }
.chip svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.chip.big { align-self: flex-start; padding: 13px 22px; font-size: 16px; margin-top: 10px; }
.chip.on { border-color: var(--ember); background: rgba(255, 154, 98, .16); }
.scope { width: 48px; height: 16px; }

.ghosts { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; margin-top: 18px; }
.ghosts span { padding: 10px 16px; border-radius: 18px 18px 18px 4px; background: rgba(244, 237, 230, .07); border: 1px solid var(--line); color: var(--soft); font-size: 15px; animation: ghost 6s infinite; }
.ghosts span:nth-child(2) { animation-delay: 2s; margin-left: 40px; }
.ghosts span:nth-child(3) { animation-delay: 4s; margin-left: 12px; }
@keyframes ghost { 0% { opacity: 0; filter: blur(6px); transform: translateY(10px); } 12%, 40% { opacity: 1; filter: blur(0); transform: none; } 70%, 100% { opacity: 0; filter: blur(12px); transform: translateY(-26px) scale(1.04); } }

.phone { position: relative; width: 250px; aspect-ratio: 9 / 17; margin-top: 18px; border-radius: 38px; padding: 26px 14px; border: 1px solid var(--line);
  background: radial-gradient(120% 80% at 30% 0%, #3a2546, #120e18 70%); box-shadow: 0 30px 80px -30px rgba(0, 0, 0, .9), inset 0 0 0 6px #08060c; }
.phone .lock-time { margin: 18px 0 0; text-align: center; font: 300 54px/1 var(--sans); color: var(--ink); letter-spacing: -.02em; max-width: none; }
.phone .lock-date { margin: 6px 0 0; text-align: center; font-size: 14px; color: var(--soft); }
.note { position: absolute; left: 12px; right: 12px; top: 46%; display: flex; gap: 10px; padding: 11px 12px; border-radius: 18px; background: rgba(244, 237, 230, .16); backdrop-filter: blur(20px);
  opacity: 0; transform: translateY(-14px) scale(.96); transition: opacity .6s, transform .6s cubic-bezier(.2, .9, .3, 1.3); }
.seen .note { opacity: 1; transform: none; transition-delay: 1.2s; }
.note img { width: 34px; height: 34px; border-radius: 9px; }
.note p { margin: 0 !important; font-size: 13px !important; line-height: 1.35; color: var(--ink) !important; }
.note p:first-child { display: flex; justify-content: space-between; }
.note p span { color: var(--soft); font-size: 12px; }

.pillars { list-style: none; padding: 0; margin: 14px 0 26px; display: grid; grid-template-columns: 1fr 1fr; gap: 22px 30px; }
.pillars li { padding-top: 14px; border-top: 1px solid var(--line); }
.pillars b { display: block; font: italic 400 25px/1.15 var(--serif); margin-bottom: 6px; }
.pillars span { color: var(--soft); font-size: 15px; line-height: 1.55; }

/* 她替你记着的几件事，一张接一张浮现又散去：几十年里的某一天、正在办的事、一直记得的小事 */
.years { position: relative; height: 104px; max-width: 460px; }
.year { position: absolute; inset: 0; padding: 16px 20px; border-radius: 18px; border: 1px solid var(--line); background: var(--glass); backdrop-filter: blur(14px); opacity: 0; animation: year 12s infinite; }
.year:nth-child(2) { animation-delay: 4s; }
.year:nth-child(3) { animation-delay: 8s; }
.year i { display: block; font: 600 11px/1 var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--ember); margin-bottom: 9px; font-style: normal; }
.year p { margin: 0 !important; font: italic 400 21px/1.3 var(--serif) !important; color: var(--ink) !important; }
@keyframes year { 0% { opacity: 0; filter: blur(8px); transform: translateY(12px); } 6%, 30% { opacity: 1; filter: blur(0); transform: none; } 38%, 100% { opacity: 0; filter: blur(10px); transform: translateY(-14px); } }

.platforms { list-style: none; padding: 0; margin: 8px 0 0; display: flex; flex-wrap: wrap; gap: 10px; }
.platforms li { display: flex; align-items: center; gap: 9px; padding: 12px 18px; border: 1px solid var(--line); border-radius: 14px; background: var(--glass); font-weight: 500; }
.platforms svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linejoin: round; }
.soon { margin-top: 18px !important; font: italic 400 26px var(--serif) !important; color: var(--ember) !important; }

.foot { padding: 40px 0 150px; border-top: 1px solid var(--line); color: var(--faint); font-size: 13px; }
.foot nav { display: flex; flex-wrap: wrap; gap: 8px 20px; margin-bottom: 14px; }
.foot nav a { text-decoration: none; color: var(--soft); }
.foot nav a:hover { color: var(--ink); }
.foot p { margin: 0 0 6px; }

/* 和她说话：只有尚未说出口的草稿 */
.talk { position: fixed; z-index: 20; bottom: 22px; left: calc(100% - var(--stage-w) / 2); transform: translateX(-50%); width: min(470px, calc(var(--stage-w) - 40px)); margin: 0; }
.tray { display: flex; justify-content: center; gap: 8px; margin-bottom: 10px; }
.bar { display: flex; align-items: center; gap: 6px; padding: 6px 6px 6px 20px; border-radius: 999px; border: 1px solid var(--line); background: rgba(20, 16, 24, .62); backdrop-filter: blur(22px) saturate(1.3);
  box-shadow: 0 20px 60px -20px rgba(0, 0, 0, .9); transition: border-color .3s, box-shadow .3s; }
.bar:focus-within { border-color: rgba(255, 154, 98, .55); box-shadow: 0 20px 60px -20px rgba(0, 0, 0, .9), 0 0 0 4px rgba(255, 154, 98, .1); }
.bar input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; color: var(--ink); font: 16px var(--sans); padding: 10px 0; }
.bar input::placeholder { color: var(--faint); }
.mic, .send { width: 40px; height: 40px; flex: none; display: grid; place-items: center; border-radius: 50%; border: 0; cursor: pointer; }
.mic { background: transparent; color: var(--soft); }
.mic.on { color: var(--night); background: var(--ember); animation: listen 1.2s infinite; }
@keyframes listen { 50% { box-shadow: 0 0 0 8px rgba(255, 154, 98, .18); } }
.send { background: var(--ink); color: var(--night); }
.mic svg, .send svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.hint { text-align: center; margin: 9px 0 0; font-size: 12px; color: var(--faint); transition: opacity .6s; }

/* 话说出口：一点光从输入框飞到她身上，不回显 */
.spark { position: fixed; z-index: 25; width: 10px; height: 10px; margin: -5px 0 0 -5px; border-radius: 50%; background: #fff3e6; pointer-events: none;
  box-shadow: 0 0 12px 4px rgba(255, 170, 120, .9), 0 0 40px 12px rgba(255, 92, 134, .5); }
.petal { position: fixed; z-index: 25; width: 14px; height: 18px; margin: -9px 0 0 -7px; border-radius: 80% 0 80% 0; background: linear-gradient(135deg, #ff7aa0, #c81e4c); pointer-events: none; }

/* 年龄 */
.gate { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; padding: 16px; background: rgba(8, 6, 12, .72); backdrop-filter: blur(26px); }
.gate[hidden] { display: none; }
.gate-card { width: min(480px, 100%); padding: 38px 34px; border-radius: 26px; border: 1px solid var(--line); background: rgba(26, 21, 30, .8); text-align: center; }
.gate-card h2 { font-size: clamp(40px, 6vw, 54px); }
.gate-card p { color: var(--soft); }
.gate-card .eyebrow { margin-bottom: 14px !important; }
.gate-actions { display: flex; justify-content: center; align-items: center; gap: 24px; margin-top: 26px; }

@media (max-width: 860px) {
  :root { --stage-w: 100vw; }
  .presence { display: none; }
  .figure { top: 50px; bottom: auto; height: 66svh; }
  .say { left: 16px; right: 16px; top: 70px; width: auto; text-align: center; font-size: 22px; }
  .say .line { padding: 12px 16px; border-radius: 18px; background: rgba(14, 11, 18, .6); backdrop-filter: blur(16px); transition: background 1.4s, backdrop-filter 1.4s; }
  .say .line.gone { background: transparent; backdrop-filter: none; }
  main { width: auto; margin: 0 16px; }
  .scene { justify-content: flex-end; padding: 96px 0 168px; }
  main::before { content: ""; position: fixed; left: 0; right: 0; bottom: 0; height: 64svh; z-index: -1; pointer-events: none;
    background: linear-gradient(transparent, rgba(11, 9, 16, .82) 34%, rgba(11, 9, 16, .96)); }
  .eyebrow { margin-bottom: 14px !important; }
  .scene p { font-size: 16px; }
  h1 { font-size: 50px; }
  h2 { font-size: 44px; }
  .phone { width: 200px; }
  .phone .lock-time { font-size: 44px; }
  .pillars { grid-template-columns: 1fr 1fr; gap: 10px 16px; margin-bottom: 0; }
  .pillars li { padding-top: 10px; }
  .pillars b { font-size: 20px; margin: 0; }
  .pillars span, .years { display: none; }
  .talk { left: 16px; right: 16px; width: auto; transform: none; bottom: max(14px, env(safe-area-inset-bottom)); }
  .hint { display: none; }
  .foot { padding-bottom: 170px; background: var(--night); margin: 0 -16px; padding-left: 16px; padding-right: 16px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .scene > *, .say .w { transition: none; }
  .ghosts span, .presence i { animation: none; }
  .year { animation: none; }
  .year:first-child { opacity: 1; }
}
