:root{color-scheme:dark;--pink:#ffb8e1;--white:#fff4fa;--muted:#d2c6e0;--glass:rgba(64,29,54,.50);--glow:rgba(255,137,201,.45);font-family:system-ui,-apple-system,BlinkMacSystemFont,"PingFang SC","Microsoft YaHei",sans-serif;scroll-behavior:smooth}*{box-sizing:border-box}body{margin:0;color:var(--white);background:#1e0e24;overflow-x:hidden}button,input,textarea{font:inherit}button,a,input,textarea{-webkit-tap-highlight-color:transparent}button,a{touch-action:manipulation}button{color:inherit;cursor:pointer}a{color:inherit;text-decoration:none}button:focus-visible,a:focus-visible,input:focus-visible,textarea:focus-visible{outline:2px solid #fff;outline-offset:4px}button{border:0;background:none}button:disabled{opacity:.5} .scenery,.shade,#fx{position:fixed;inset:0;pointer-events:none}.scenery{background:#1d0f26 url(assets/birthday.webp) center center/cover no-repeat;z-index:-3;transition:filter 1.3s,transform 1.5s}.shade{background:linear-gradient(180deg,rgba(26,8,28,.23),transparent 35%,rgba(34,12,34,.18) 70%,rgba(24,9,24,.64));z-index:-2}#fx{width:100%;height:100%;z-index:4}header{position:absolute;z-index:5;top:0;left:0;right:0;display:flex;justify-content:space-between;align-items:center;padding:calc(17px + env(safe-area-inset-top)) 24px 14px;max-width:720px;margin:auto}.brand{display:flex;align-items:center;gap:9px;font-size:14px;font-weight:600;letter-spacing:2px}.brand small{display:block;font-size:8px;letter-spacing:2px;color:#ebc3de;margin-top:3px}.logo,.round{border:1px solid #ffdcf578;background:#37254060;box-shadow:inset 0 0 12px #fff1,0 0 24px #f8a3d62b;border-radius:50%;display:grid;place-items:center;width:39px;height:39px;color:#ffe5fa;font-size:22px;backdrop-filter:blur(12px)}main{width:min(100%,650px);margin:auto}.hero{position:relative;display:flex;flex-direction:column;align-items:center;text-align:center;padding:calc(76px + env(safe-area-inset-top)) 24px 24px;gap:10px}.hero-title{margin-top:2px;position:relative}.crown{font-size:40px;color:#fff0bb;text-shadow:0 0 13px #ffb6ce,0 0 30px #ffb6ce;line-height:1}.chapter-tag{font-size:10px;letter-spacing:3px;color:#ffd1e9;margin:12px 0 7px;font-weight:600}.hero-script{font-family:Georgia,"Times New Roman",serif;font-style:italic;font-weight:400;font-size:clamp(30px,8.4vw,44px);letter-spacing:1px;line-height:1.2;margin:12px 0 0;color:#ffe2ee;text-shadow:0 0 calc(8px + 15px * var(--energy,0)) #ff91c7,0 0 26px #ff91c780,0 3px 18px #210f41}.ornament{color:#fbc3df;letter-spacing:4px;font-size:13px;margin:6px 0}.sub{margin:0;font-size:14px;letter-spacing:2px;color:#fce7f8;text-shadow:0 2px 8px #251130}.glass{background:linear-gradient(135deg,rgba(255,212,244,.16),rgba(43,33,71,.56) 52%,rgba(255,175,221,.12));border:1px solid rgba(255,221,245,.38);box-shadow:inset 0 1px 1px #fffb, inset 0 -1px 9px #ffb6ec20,0 12px 36px #160a3060;backdrop-filter:blur(18px);border-radius:22px}.hero-card{width:min(100%,340px);padding:12px 14px 10px;margin-top:2px}.card-kicker{font-size:9px;letter-spacing:2px;color:#ffd0ed}.hero-card p{font-size:15px;line-height:1.6;margin:2px 0 6px;min-height:48px;display:grid;place-items:center;text-shadow:0 0 16px #ffaed8}.tiny-dots{display:flex;justify-content:center;gap:5px}.tiny-dots i{width:4px;height:4px;background:#ffcae4;border-radius:50%;opacity:.5}.tiny-dots i:first-child{width:13px;border-radius:6px;opacity:1}.hero-bottom{width:min(100%,340px);margin-top:2px}.primary{width:100%;min-height:51px;padding:13px 20px;display:flex;align-items:center;justify-content:center;gap:12px;border-radius:28px;background:linear-gradient(125deg,#ffe4f1aa,#c76caa92 48%,#f6b9e5aa);border:1px solid #ffecfaab;box-shadow:inset 0 2px 4px #fffc,inset 0 -4px 14px #f45c9c44,0 0 30px #fa83c55c;letter-spacing:1px;font-weight:600;color:#fff;transition:transform .2s,box-shadow .2s}.primary:active{transform:scale(.97)}.primary span:last-child{margin-left:auto}.primary span:first-child{margin-right:auto}.scroll-hint{display:block;margin-top:8px;font-size:10px;letter-spacing:2px;color:#ffeff9;text-shadow:0 1px 8px #261027}.scroll-hint span{display:block;font-size:18px;animation:float 2s infinite}.chapter{padding:26px 24px;position:relative;scroll-margin-top:20px;background:linear-gradient(180deg,#2a1233b8,#2b1433c9 85%,#291230b8);border-top:1px solid #ffdef01c}.chapter-tag{margin:0 0 9px;color:#f2a8d7}.chapter h2,.dialog-head h2,#message h2{font-family:"Noto Serif CJK SC","Songti SC",serif;font-size:29px;letter-spacing:2px;margin:0 0 10px}.lead{color:#e6d6e9;font-size:14px;line-height:1.7;margin:0 0 14px}.count{display:grid;grid-template-columns:repeat(4,1fr);padding:20px 6px;text-align:center}.count>div+div{border-left:1px solid #ffd8ef30}.count strong{display:block;font:36px Georgia,serif;color:#ffe6f7;font-variant-numeric:tabular-nums;text-shadow:0 0 18px #ff8bc28c}.count small,.caption{font-size:10px;color:#d4bbd9;letter-spacing:1px}.caption{line-height:1.6;margin:12px 0 0}.scene-grid{display:grid;grid-template-columns:1fr 1fr;gap:12px}.scene{min-height:133px;border-radius:18px;border:1px solid #ffdef04d;text-align:left;display:flex;flex-direction:column;justify-content:end;gap:5px;padding:14px;background-image:linear-gradient(0deg,#130d2ce8,transparent),url(assets/birthday-small.webp);background-size:cover;box-shadow:0 8px 20px #0b082833}.scene span{font-size:9px;letter-spacing:1px;color:#ffcfeb}.scene b{font-size:19px}.scene small{font-size:11px;color:#f1d8ec}.s1{background-position:center 20%}.s2{background-position:left top}.s3{background-position:right 30%}.s4{background-position:center bottom}.lyric{margin-top:12px;text-align:center;padding:14px 10px;min-height:145px}.lyric p{margin:7px 0;color:#e6c9dd;font-size:12px;min-height:14px}.lyric #lyricNow{color:white;font-size:18px;line-height:1.6;text-shadow:0 0 15px #ff9bd2}.lyric #lyricMode{font-size:10px;color:#d4b3d1}.cake-stage{padding:20px 15px 17px;overflow:hidden;position:relative}.cake-model{width:210px;height:185px;margin:20px auto 5px;position:relative;filter:drop-shadow(0 12px 20px #0e082f90);perspective:400px}.candles{position:absolute;top:0;left:37px;right:37px;display:flex;align-items:end;justify-content:space-around;z-index:4;height:65px}.candles i{width:10px;height:38px;border-radius:4px;background:repeating-linear-gradient(135deg,#fce3c6 0 6px,#f191bc 6px 10px);position:relative;box-shadow:0 0 8px #ffb6ce}.candles i:nth-child(3){height:49px}.candles em{display:block;position:absolute;left:0;top:-21px;width:10px;height:21px;border-radius:60% 45% 50% 50%;background:linear-gradient(#fff,#fff2a3 50%,#ffa04c);box-shadow:0 0 14px 4px #ffba6c,0 0 34px 6px #ff7a5b80;animation:flicker .7s alternate infinite;transform-origin:bottom}.candles i:nth-child(2n) em{animation-delay:.2s}.out .candles em{opacity:0;animation:none}.cake-top{position:absolute;top:56px;left:8px;right:8px;height:52px;background:radial-gradient(ellipse,#fff5e9,#ffbedc);border-radius:50%;z-index:3;box-shadow:inset 0 0 0 5px #fff0e8;display:grid;place-items:center;color:#b14d80;font:bold 11px Georgia}.cake-side{position:absolute;top:82px;height:70px;left:8px;right:8px;border-radius:0 0 50% 50%/0 0 23px 23px;background:linear-gradient(90deg,#d779af,#ffcadc 38%,#fba8cb 70%,#bd6599);border-bottom:9px solid #ffd9e7;display:flex;align-items:center;justify-content:space-evenly;color:#fff1f3}.plate{position:absolute;bottom:15px;left:-7px;right:-7px;height:40px;border-radius:50%;background:linear-gradient(#ffdfed,#9671ba);z-index:-1}.cake-orbit{position:absolute;width:240px;height:160px;border:1px solid #ffc4e648;left:50%;top:48px;transform:translateX(-50%) rotate(-12deg);border-radius:50%;box-shadow:0 0 30px #ff80cb30}.cake-controls{display:flex;gap:9px;align-items:center}.cake-controls .primary{flex:2}.ghost{border:1px solid #ffdef05c;background:#ffe8fa0b;border-radius:24px;padding:12px 15px;font-size:13px;min-height:44px}.wish-form{display:grid;gap:10px;padding:18px}.wish-form label{font-size:13px;display:flex;justify-content:space-between}.wish-form label small{font-size:10px;color:#d7bad9}input:not([type=range]),textarea{width:100%;background:#120e2b77;color:#fff;border:1px solid #f8c9e83b;border-radius:13px;padding:12px;min-width:0}textarea{resize:vertical}input::placeholder,textarea::placeholder{color:#bca7c4}.form-note,#wishStatus{font-size:11px;color:#dec0df;line-height:1.6}.wish-heading{display:flex;justify-content:space-between;margin:14px 0 8px;color:#f2d6ec;font-size:14px}.wish-heading small{font-size:11px}.wish-list{display:grid;gap:10px;margin-bottom:14px}.wish-item,.shared{padding:13px 15px;overflow-wrap:anywhere}.wish-item p,.shared p{margin:8px 0;white-space:pre-wrap;line-height:1.6}.wish-item small{font-size:11px;color:#f3bddf}.wish-item button{font-size:11px;color:#f4c9e8;border:1px solid #f6d4e83d;border-radius:18px;padding:6px 10px;margin:3px 4px 0 0}.shared{margin-top:15px}.finale{text-align:center}.gift-box{display:block;width:180px;height:160px;position:relative;margin:18px auto 8px;animation:float 3s ease-in-out infinite}.gift-body,.gift-lid,.gift-ribbon,.gift-glow,.bow{position:absolute;display:block}.gift-body{inset:55px 15px 8px;background:linear-gradient(135deg,#ffd0e5,#c76aab);border-radius:10px;box-shadow:0 0 32px #ff94cb77,inset 0 1px 1px #fff}.gift-lid{inset:39px 4px auto;height:30px;background:linear-gradient(#ffe5ee,#e493c6);border-radius:7px;z-index:1}.gift-ribbon{width:23px;height:110px;background:linear-gradient(90deg,#ff92c3,#fff0f6,#e77aaa);left:calc(50% - 11px);top:39px;z-index:2}.bow{left:0;right:0;top:0;font-size:56px;z-index:3;line-height:1}.gift-glow{inset:0;box-shadow:0 0 80px #ff83d277;border-radius:50%;z-index:-1}.finale>p:not(.lead){font-size:12px;color:#e8c5df;margin:10px 0 16px}footer{padding:24px 20px calc(28px + env(safe-area-inset-bottom));text-align:center;background:#200f22ed;font-size:10px;letter-spacing:2px;color:#d1a9d4}footer span{display:block;font-size:14px;margin-top:12px;letter-spacing:2px}.text-btn{display:block;margin:15px auto 0;color:#f6bde3;text-decoration:underline;font-size:12px}.toast-area{position:fixed;z-index:11;right:15px;top:calc(77px + env(safe-area-inset-top));width:min(75%,290px);pointer-events:none;display:grid;gap:8px}.toast{padding:12px 14px;border-radius:15px;background:#59304feb;border:1px solid #ffd9ee99;box-shadow:0 0 20px #ff98cb55;animation:toastIn .45s both;font-size:13px;line-height:1.5}.toast small{display:block;color:#f5b6d8;font-size:9px;letter-spacing:2px;margin-bottom:4px}dialog{color:var(--white);border:1px solid #f8c7e98c;border-radius:26px;background:linear-gradient(145deg,#4a2c50,#241228);box-shadow:0 0 55px #fa94cb3d;max-height:90svh;width:min(calc(100% - 30px),430px);padding:22px;overflow:auto}dialog::backdrop{background:#0b0719a8;backdrop-filter:blur(7px)}.dialog-head{display:flex;justify-content:space-between;align-items:start}.dialog-head h2{font-size:23px}.album{display:flex;align-items:center;gap:13px;margin:15px 0}.album>span{width:55px;height:55px;display:grid;place-items:center;border-radius:14px;background:linear-gradient(135deg,#f2a5cc,#5c4aab);font-size:30px}.album small{display:block;margin-top:5px;color:#d5bfdc;font-size:11px}.album strong{font-size:14px}#bars{height:42px;display:flex;align-items:center;justify-content:center;gap:4px;margin:12px 0}#bars i{display:block;width:4px;background:linear-gradient(#fff1fa,#df80be);border-radius:4px;height:5px}input[type=range]{width:100%;accent-color:#f8a6d8}.times{display:flex;justify-content:space-between;font-size:10px;color:#ddc2db}.transport{display:flex;justify-content:center;align-items:center;gap:20px;margin:12px 0 20px}.transport .primary{width:55px;padding:0;height:55px}.transport button{font-size:22px}.file-button{display:block;position:relative;border:1px dashed #ffcae57a;border-radius:13px;padding:12px;margin:10px 0;font-size:13px;text-align:center;overflow:hidden}.file-button input{position:absolute;inset:0;opacity:0;cursor:pointer}.setting-row{display:flex;gap:12px;align-items:center;margin-top:15px;font-size:12px}.setting-row input{flex:1}#playlist button{display:block;text-align:left;padding:10px 5px;border-bottom:1px solid #fff1;width:100%;font-size:13px}.modal-close{position:absolute;right:15px;top:15px}#message{text-align:center;padding:30px 22px 22px}.message-icon{font-size:50px;color:#ffdef5;text-shadow:0 0 25px #ff8acb}#message p{line-height:1.9;color:#f5dfed;font-size:15px;margin:15px 0 23px}.scene-1 .scenery{filter:hue-rotate(-18deg) saturate(1.25)}.scene-2 .scenery{filter:saturate(1.45) brightness(.85)}.scene-3 .scenery{filter:hue-rotate(24deg) saturate(1.15)}@keyframes float{50%{transform:translateY(-7px)}}@keyframes flicker{to{transform:scale(.82,1.12) rotate(5deg);opacity:.8}}@keyframes toastIn{from{transform:translateX(30px);opacity:0}to{transform:none;opacity:1}}@media(min-width:700px){.scenery{background-size:auto 115%;background-color:#1c153d}.hero{padding-left:50px;padding-right:50px}.chapter{padding-left:46px;padding-right:46px}.scene{min-height:180px}}@media(max-width:370px){.hero{padding-left:16px;padding-right:16px}.chapter{padding-left:17px;padding-right:17px}.count strong{font-size:29px}}@media(prefers-reduced-motion:reduce){*,*::before,*::after{animation:none!important;transition:none!important;scroll-behavior:auto!important}}

/* Automatic soundtrack: no public player controls. */
.header-star{font-size:28px;text-shadow:0 0 22px #ffb5ec;color:#ffedc6}.floating-lyrics{position:fixed;z-index:9;bottom:calc(20px + env(safe-area-inset-bottom));left:50%;transform:translateX(-50%);width:min(90%,520px);text-align:center;padding:12px 18px;border-radius:18px;background:#1d142caa;backdrop-filter:blur(16px);border:1px solid #ffe2f142;color:#fff1dc;font-size:16px;font-weight:600;line-height:1.55;text-shadow:0 0 15px #ff89c9;pointer-events:none}.floating-lyrics[hidden]{display:none}.hero-card{animation:cardGlow 6s ease-in-out infinite}.hero-title{animation:reveal 1s ease both}.hero-bottom{animation:reveal 1.4s ease both}.chapter h2{ text-shadow:0 0 20px #ff9bd14f}.scene:active{transform:scale(.97)}@keyframes cardGlow{50%{box-shadow:inset 0 1px 1px #fffb,0 0 30px #ff93c93b}}@keyframes reveal{from{opacity:0;transform:translateY(14px)}to{opacity:1;transform:none}}

/* Taste gate: tap targets >=44px; stop iOS auto-zoom on the wish form. */
.wish-item button{min-height:44px;padding:10px 12px}
.modal-close{width:44px;height:44px}
input,textarea{font-size:16px}

/* Hers: her own avatar replaces the glyph mark in the header. */
img.logo.avatar{object-fit:cover;padding:0}

/* Hero lyric reel: three lines that roll upward with the song — typography only, no player chrome.
   Lines sit in fixed slots (prev / now / next); on a line change the stack glides up one step. */
.hero-lyrics{width:min(100%,360px);margin-top:0;padding:2px 6px 0;text-align:center;position:relative;z-index:0}
.hero-lyrics::before{content:"";position:absolute;inset:-6px -16px;z-index:-1;border-radius:26px;background:radial-gradient(ellipse 92% 100% at 50% 50%,rgba(24,6,26,.45),rgba(24,6,26,0) 72%)}
.hl-hint{margin:0 0 2px;font-size:10px;letter-spacing:2px;color:#ffe9a8;opacity:.92;transition:opacity .5s}
.hero-lyrics.playing .hl-hint{opacity:0;height:0;margin:0;overflow:hidden}
.hl-reel{position:relative;height:138px;overflow:hidden}
.hl-line{position:absolute;left:0;right:0;top:0;margin:0;text-align:center;transition:transform .7s cubic-bezier(.4,0,.2,1),opacity .7s ease,font-size .7s ease}
.hl-line>span{display:inline-block}
.hl-line.pos-0{transform:translateY(0);font-size:15px;line-height:1.45;color:#d8c2dc;opacity:.62;font-weight:400}
.hl-line.pos-1{transform:translateY(29px);font-size:clamp(24px,6.8vw,27px);line-height:1.5;color:#fff;font-weight:600;text-shadow:0 0 calc(14px + 22px * var(--energy,0)) #ff9bd2,0 2px 12px rgba(28,7,30,.85)}
.hl-line.pos-2{transform:translateY(116px);font-size:15px;line-height:1.45;color:#d8c2dc;opacity:.62;font-weight:400}
.hl-line.leaving{transform:translateY(-30px);opacity:0}
.hl-line.notrans{transition:none!important}
.hl-mode{display:block;margin-top:6px;font-size:9px;letter-spacing:1px;color:#d4b3d1}
.hero-lyrics.playing .hl-line.pos-1>span{animation:lyricPulse 1.6s ease-in-out infinite}
@keyframes lyricPulse{0%,100%{transform:scale(1)}50%{transform:scale(1.045)}}

/* Scroll reveal: chapters pop in EVERY time they enter the view — scrolling
   down they rise from below, scrolling back up they settle from above — and
   reset only once fully out of view, so the entrance replays on every pass.
   .reveal is added by JS only when IntersectionObserver is active and motion
   is allowed, so no-JS / reduced-motion visitors always see the content. */
.reveal{opacity:0;transform:translateY(28px) scale(.92);transition:opacity .65s ease,transform .8s cubic-bezier(.34,1.56,.64,1)}
.reveal.from-above{transform:translateY(-28px) scale(.92)}
.reveal.in{opacity:1;transform:none}
.reveal>*{opacity:0;transform:translateY(16px);transition:opacity .55s ease,transform .7s cubic-bezier(.34,1.56,.64,1)}
.reveal.from-above>*{transform:translateY(-16px)}
.reveal.in>*{opacity:1;transform:none}
.reveal.in>*:nth-child(2){transition-delay:.06s}
.reveal.in>*:nth-child(3){transition-delay:.12s}
.reveal.in>*:nth-child(4){transition-delay:.18s}
.reveal.in>*:nth-child(5){transition-delay:.24s}
.reveal.in>*:nth-child(6){transition-delay:.3s}

/* Small screens: keep the dimmed reel lines on one line (must come after the reel rules). */
@media(max-width:370px){.hl-line.pos-0,.hl-line.pos-2{font-size:11px}}
