@font-face{font-family:Instrument;src:url(fonts/serif.woff2);font-display:swap}
@font-face{font-family:Instrument;src:url(fonts/italic.woff2);font-style:italic;font-display:swap}
@font-face{font-family:DM;src:url(fonts/sans.woff2);font-display:swap}
@font-face{font-family:Caveat;src:url(fonts/hand.woff2);font-display:swap}
:root{--paper:#faf5ec;--ink:#302826;--wine:#963e50;--muted:#665951;--line:#dcd2c4;--serif:Instrument,Georgia,serif;--hand:Caveat,'Bradley Hand',cursive;color-scheme:light}
*{box-sizing:border-box}
html{scroll-behavior:smooth;scroll-padding-top:20px}
body{margin:0;background:var(--paper);color:var(--ink);font:1rem/1.6 DM,Arial,sans-serif}
body:has(dialog[open]){overflow:hidden}
button,a{font:inherit;color:inherit}
a{text-decoration:none}
button{cursor:pointer;background:none;border:none;padding:0}
button:focus-visible,a:focus-visible{outline:3px solid #a7475a;outline-offset:4px}
[hidden]{display:none!important}
svg.symbols{position:absolute;width:0;height:0;overflow:hidden}
.wrap{width:min(1176px,88%);margin-inline:auto}
.header{border-bottom:1px solid var(--line)}
nav{height:72px;display:flex;align-items:center;justify-content:space-between}
.brand{display:inline-flex;align-items:center;gap:10px;font:italic 1.85rem/1 var(--serif)}
.brand-heart{font:1.25rem Georgia;color:var(--wine);transform:rotate(-13deg)}
.navlinks{display:flex;gap:30px;align-items:center;font-size:.9rem}
.navlinks a:hover,footer a:hover{text-decoration:underline}
.letter-link,.primary,.secondary{display:inline-flex;justify-content:center;align-items:center;gap:10px}
.letter-link{border:1px solid #b99a96;border-radius:30px;padding:6px 16px;color:#733544}
button svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:1.55}
.hero{display:grid;grid-template-columns:1.08fr 1fr;align-items:center;min-height:560px;padding-block:56px 60px;gap:30px}
.intro{position:relative;z-index:1}
.dedication,.kicker{color:var(--wine);display:flex;align-items:center;gap:11px;font-size:.76rem;letter-spacing:.15em;text-transform:uppercase;margin:0}
.dedication span{width:28px;height:1px;background:currentColor}
h1,h2{font-family:var(--serif);font-weight:400;margin:0;line-height:.99}
h1{font-size:clamp(4.7rem,7.55vw,7.5rem);letter-spacing:-.035em;margin:21px 0 23px}
h1 em,h2 em{color:var(--wine);font-weight:400}
.intro-copy{font-size:1.05rem;color:var(--muted);line-height:1.6;margin:0 0 25px}
.primary{background:var(--wine);color:white;border-radius:30px;padding:13px 22px;font-size:.94rem;transition:background .2s}
.primary:hover{background:#763044}
.stack{position:relative;isolation:isolate;width:100%;height:435px;max-width:535px;justify-self:end}
.print{position:absolute;background:#fffdf6;box-shadow:2px 6px 14px #412c2224,1px 2px 3px #412c221a;padding:12px;transition:transform .25s ease}
.print img{width:100%;height:100%;display:block;object-fit:cover}
.front{width:56%;height:89%;top:4%;left:11%;transform:rotate(-6deg);display:flex;flex-direction:column}
.front img{min-height:0;flex:1;object-position:50% 40%}
.caption{font:1.66rem/1.3 var(--hand);white-space:nowrap;padding:8px 0 1px}
.caption i,footer i{color:var(--wine);font-style:normal}
.back{width:46%;height:70%;right:4%;top:20%;transform:rotate(11deg);padding-bottom:32px}
.front:hover{transform:rotate(-4deg) translateY(-3px)}
.back:hover{transform:rotate(13deg) translateY(-3px)}
.tape{position:absolute;width:90px;height:29px;background:#d6c398bc;top:-9px;left:31%;transform:rotate(-7deg);clip-path:polygon(1% 0,99% 3%,97% 17%,100% 28%,97% 47%,100% 59%,98% 80%,100% 99%,0 97%,2% 77%,0 62%,2% 44%,0 30%,2% 16%)}
.stamp{width:81px;height:81px;position:absolute;right:0;bottom:5%;transform:rotate(12deg);fill:#f4d8cd;stroke:#995165;stroke-width:1.4;pointer-events:none}
.stamp text{stroke:none;fill:#803d50;font:9px DM,sans-serif;letter-spacing:1px}
.stamp .seal-heart{fill:#a25464;stroke:none}
.album{background:#f4eee4;border-block:1px solid var(--line);padding:43px 0 54px}
.album-head{display:flex;align-items:end;justify-content:space-between;gap:18px;margin-bottom:28px}
.kicker{font-size:.71rem;gap:8px}
.tiny-heart{font-size:1rem}
.album h2{font-size:clamp(2.8rem,4.35vw,4.4rem);letter-spacing:-.025em;margin-top:9px}
.filters{display:flex;border:1px solid #cfbfb1;border-radius:30px;padding:3px;align-items:center}
.filters button{border-radius:30px;padding:6px 15px;font-size:.88rem;color:#594e47}
.filters button[aria-pressed=true]{background:var(--wine);color:white}
.grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:24px 20px}
.memory{text-align:left;display:block;min-width:0}
.thumb{position:relative;display:block;overflow:hidden;aspect-ratio:4/4.25;background:#e9dfd1}
.thumb img{width:100%;height:100%;display:block;object-fit:cover;object-position:50% 32%;transition:transform .3s}
.memory:hover img{transform:scale(1.025)}
.memory-name{display:block;font:1.22rem/1.3 var(--serif);margin-top:8px}
.play{position:absolute;inset:auto auto 10px 10px;background:#fffaf0ef;border-radius:20px;padding:3px 10px;font-size:.78rem;color:#54313c}
.count{text-align:center;color:var(--muted);margin:27px 0 10px;font-size:.85rem}
.secondary{display:flex;margin:auto;border:1px solid #ae8d88;padding:9px 20px;border-radius:30px;color:#753747}
footer{display:flex;align-items:center;justify-content:space-between;padding-block:26px}
footer span{font:1.65rem var(--hand)}
footer a{font-size:.85rem}
dialog{color:var(--ink);border:0;padding:0;background:var(--paper);box-shadow:0 20px 70px #1d110f44;max-width:calc(100% - 26px);max-height:90dvh}
dialog::backdrop{background:#241b19c9}
dialog[open]{animation:open .22s ease-out}
@keyframes open{from{opacity:.3;transform:translateY(10px)}}
.letter-paper{max-width:520px;padding:34px clamp(22px,5vw,52px) 30px;position:relative;border-top:5px solid var(--wine)}
.letter-heart{color:var(--wine);font-size:1.6rem}
.letter-paper h2{font-size:2.8rem;margin:12px 0 20px}
.letter-paper p{color:#51443d;line-height:1.65}
.letter-paper .signature{font:2rem var(--hand);color:var(--wine);margin-bottom:0}
.close,.viewer-bottom button{width:42px;height:42px;border-radius:50%;font:1.8rem/1 Arial,sans-serif}
.close:hover,.viewer-bottom button:hover{background:#d2bdb442}
.letter-paper .close{position:absolute;top:10px;right:10px}
#viewer{background:#211d1c;color:#fff8f0;width:min(780px,95vw);border-radius:8px}
.viewer-shell{padding:8px 14px}
.viewer-top,.viewer-bottom{display:flex;align-items:center;justify-content:space-between;gap:8px}
.viewer-top{font-size:.85rem}
.viewer-bottom{padding:6px 0;font:1.45rem var(--serif)}
#stage{height:min(65dvh,650px);display:grid;place-items:center;background:#161313}
#stage img,#stage video{width:100%;height:100%;min-height:0;object-fit:contain}
@media(max-width:900px){.hero{min-height:505px;gap:10px}.stack{height:350px}.caption{font-size:1.38rem}.grid{gap:18px 12px}.stamp{width:65px;height:65px}.intro-copy{font-size:1rem}}
@media(max-width:680px){.wrap{width:89%}nav{height:60px}.brand{font-size:1.52rem;gap:6px}.navlinks{gap:12px;font-size:.8rem}.letter-link{padding:4px 11px;gap:5px}.hero{grid-template-columns:1fr;gap:18px;padding:38px 0 25px}.dedication{font-size:.7rem}.intro h1{font-size:clamp(4.3rem,15vw,5.4rem);margin:16px 0}.intro-copy{margin-bottom:18px}.primary{padding:11px 17px}.stack{justify-self:center;width:min(94%,440px);height:clamp(280px,71vw,350px);margin-top:7px}.front{left:7%;width:58%}.back{right:5%}.stamp{right:0}.album{padding:30px 0 36px}.album-head{align-items:start;flex-direction:column;gap:16px;margin-bottom:18px}.album h2{font-size:3rem}.grid{grid-template-columns:repeat(2,minmax(0,1fr))}.memory-name{font-size:1.15rem}.thumb{aspect-ratio:4/4.6}}
@media(max-width:380px){.navlinks{gap:8px}.letter-link svg{display:none}.caption{font-size:1.22rem}.wide{display:none}}
@media(prefers-reduced-motion:reduce){html{scroll-behavior:auto}*,*::before,*::after{transition:none!important;animation:none!important}}

.birthday-actions{display:flex;align-items:center;gap:6px 22px;flex-wrap:wrap}
.wish-button{display:inline-flex;align-items:center;gap:6px;color:#773749;font:1.45rem var(--hand);min-height:44px}
.wish-button:hover{text-decoration:underline;text-underline-offset:4px}
.wish-button img{transform:rotate(13deg)}
.birthday-wish{color:var(--wine);font:1.5rem/1.25 var(--hand);margin:10px 0 0;max-width:34ch}
.birthday-wish:empty{margin:0}
.celebration-layer{position:fixed;inset:0;z-index:5;pointer-events:none;overflow:hidden;contain:strict}
.letter-paper .celebration-layer{position:absolute}
.celebration-piece{position:absolute;left:0;top:0;display:block;pointer-events:none}
.celebration-rose{height:auto}
@media(max-width:420px){.birthday-actions{column-gap:12px}.wish-button{font-size:1.3rem}}

#party-poppers{position:fixed;inset:0;z-index:6;pointer-events:none;overflow:hidden;contain:strict}
.popper{position:absolute;bottom:max(0px,env(safe-area-inset-bottom));width:clamp(52px,6.5vw,85px);z-index:1}
.popper-left{left:0}
.popper-right{right:0;transform:scaleX(-1)}
.page-controls{display:flex;align-items:center;gap:6px;position:fixed;z-index:7;bottom:max(9px,env(safe-area-inset-bottom));left:50%;transform:translateX(-50%)}
.page-controls button{min-height:38px;padding:5px 14px;background:#fffaf1;color:#703746;border:1px solid #bc9b93;border-radius:20px;font-size:.82rem;white-space:nowrap}
.page-controls button:hover{background:#f6e6dc}
footer.wrap{padding-bottom:78px}
.party-heart{font-family:Georgia,serif;line-height:1}

.song-credit{font-size:.82rem;line-height:1.4;color:var(--muted);margin:10px 0 0}
.music-button::before{content:"♫" / "";padding-right:6px}
.letter-head{display:flex;align-items:center;justify-content:space-between;gap:8px;padding-right:28px}
.letter-head .music-button,.viewer-top .music-button{font-size:.85rem;min-height:38px;padding:4px 8px;text-decoration:underline;text-underline-offset:3px}
.viewer-top .music-button{margin-left:auto}
.music-button:disabled{cursor:default;text-decoration:none}
body:has(dialog[open]) .page-controls{display:none}
