:root { --wine:#65172e; --rose:#ad3754; --paper:#fff7ed; --edge:#c8918a; }
* { box-sizing:border-box }
body { margin:0; color:var(--wine); font-family:Georgia,serif; background:radial-gradient(ellipse at 25% 0%,#6c263d,transparent 65%),#351222; min-height:100vh; }
main { width:min(1000px,92%); margin:clamp(20px,6vh,70px) auto; }
.cover, article { position:relative; background:radial-gradient(ellipse at top right,#f8d9da,transparent 58%),var(--paper); box-shadow:0 24px 60px #19050f66; }
.cover { padding:clamp(20px,4vw,48px); border:5px double var(--edge); }
header { display:flex; justify-content:space-between; align-items:center; border-bottom:1px solid var(--edge); padding-bottom:16px; font:600 .76rem system-ui; letter-spacing:.15em; }
.spread { display:flex; align-items:center; justify-content:center; gap:clamp(36px,8vw,110px); padding:clamp(40px,6vw,82px) 0; }
figure { position:relative; isolation:isolate; width:min(42%,340px); margin:0; padding:11px 11px 18px; background:#fffdf6; box-shadow:1px 8px 18px #5e223139; transform:rotate(-5deg); animation:arrive .85s ease-out; }
figure:before { content:""; position:absolute; z-index:-1; inset:-10px 8px 8px -9px; background:#daacaa; border:5px double #f5d0c4; transform:rotate(9deg); }
img { position:relative; width:100%; aspect-ratio:1; display:block; object-fit:cover; border:5px solid #fffaf2; }
figcaption { padding-top:12px; font:italic 1.25rem Georgia; text-align:center; }
.seal { position:absolute; right:-13px; bottom:28px; width:54px; height:54px; display:grid; place-items:center; border-radius:49% 44% 47% 42%; background:radial-gradient(at 33% 24%,#cb6774,#962b47 65%,#70172f); border:4px double #d48b90; box-shadow:1px 4px 6px #45122755,inset 0 0 0 3px #8f3048; color:#ffd5ce; font-size:27px; }
.dedication { font:italic 1.15rem Georgia; }
h1 { font:normal clamp(3rem,6.5vw,5.8rem)/.96 Georgia; letter-spacing:-.055em; margin:16px 0 26px; }
em { color:var(--rose); }
button { border:1px solid #822339; color:white; background:linear-gradient(115deg,#922e48,#71182f); padding:14px 24px; border-radius:28px; font:600 1rem system-ui; cursor:pointer; box-shadow:0 4px 12px #79263c30; transition:transform .2s; }
button:active { transform:scale(.97); }
button:focus-visible { outline:3px solid var(--rose); outline-offset:4px; }
.flap { display:inline-block; transform-origin:center bottom; }
.opening .flap { animation:unseal .42s ease both; }
.rule { display:flex; align-items:center; justify-content:center; gap:12px; color:#a74559; }
.rule:before,.rule:after { content:""; flex:1; height:1px; background:var(--edge); }
article { margin:32px auto; max-width:720px; padding:clamp(26px,7vw,80px); font-size:1.16rem; line-height:1.8; border-top:5px double var(--edge); scroll-margin:14px; }
article:not([hidden]) { animation:rise .55s ease-out; }
article h2 { font:italic normal clamp(1.8rem,4vw,2.7rem)/1.14 Georgia; }
article p { color:#4e313a; }
article p:first-of-type:first-letter { float:left; font:3.7rem/.95 Georgia; padding-right:6px; color:var(--rose); }
@keyframes arrive { from { opacity:0; transform:translateY(18px) rotate(-9deg); } }
@keyframes rise { from { opacity:.15; transform:translateY(25px); } }
@keyframes unseal { to { transform:perspective(120px) rotateX(-145deg) translateY(-3px); opacity:0; } }
@media(max-width:640px) { .spread { flex-direction:column; text-align:center; gap:16px; padding:32px 0 22px; } figure { width:min(77%,245px); } h1 { margin:10px 0 20px; } article { font-size:1.07rem; } }
@media(prefers-reduced-motion:reduce) { *,*:before,*:after { animation:none!important; transition:none!important; } }
body:has(article:not([hidden])) main { margin:0 auto; padding:5dvh 0; }
article:not([hidden]) { display:flex; flex-direction:column; justify-content:center; min-height:90dvh; border:5px double var(--edge); margin:0 auto; }
article p { font:normal clamp(1.18rem,3vw,1.65rem)/1.58 Georgia; }
article nav { margin-top:30px; border-top:1px solid var(--edge); padding-top:20px; display:flex; align-items:center; justify-content:space-between; font: .85rem system-ui; letter-spacing:.14em; }
article nav button { min-width:48px; padding:10px; font-size:20px; }
.full-letter figure { width:min(85%,320px); margin:16px auto 48px; }
.message-page { display:flex; flex-direction:column; align-items:center; width:100%; }
article > [hidden] { display:none !important; }
.memory-photo { width:clamp(220px,62vw,330px); margin:0 auto 34px; padding:10px 10px 26px; background:#fffdf7; box-shadow:0 12px 24px #5d263442; transform:rotate(-2deg); }
.memory-photo:nth-child(odd) { transform:rotate(2deg); }
.memory-photo img { width:100%; aspect-ratio:1.14; object-fit:cover; border:1px solid #e2b1b4; }
.message-page p, .message-page h2 { align-self:stretch; }
body { background-image:radial-gradient(ellipse at 15% 0%,#954d653f,transparent 54%),repeating-linear-gradient(45deg,transparent 0 24px,#f4b8ba0c 24px 25px,transparent 25px 48px),repeating-linear-gradient(-45deg,transparent 0 24px,#f4b8ba0c 24px 25px,transparent 25px 48px);background-attachment:fixed; }
article { background-image:radial-gradient(ellipse at top right,#f3c8c8,transparent 50%),repeating-linear-gradient(0deg,transparent 0 31px,#b5747510 31px 32px); }
article:before { content:"❦"; display:block; text-align:center; color:#a65264; font-size:2rem; }
article nav { position:relative; border:0; padding-top:24px; }
article nav:before { content:""; position:absolute; top:0; width:100%; height:3px; background:linear-gradient(to right,#9e3855 var(--progress),#e5c6c8 var(--progress)); }
.save-photo { display:inline-flex; align-items:center; justify-content:center; padding:14px 24px; border-radius:30px; background:#812941; color:#fff; text-decoration:none; font:600 1rem system-ui; }
.music-card { display:flex; align-items:center; gap:14px; width:fit-content; max-width:100%; margin:24px auto; padding:10px 20px 10px 12px; border:1px solid #a66a7c; border-radius:48px; background:linear-gradient(115deg,#602b41,#441d30); color:#ffecd9; box-shadow:0 7px 20px #24081955; font:italic 1rem Georgia; }
.cover[hidden] + .music-card { display:none; }
.disc { width:36px; height:36px; flex:none; border-radius:50%; background:radial-gradient(circle,#471228 0 5%,#ebacaa 6% 24%,transparent 25%),repeating-radial-gradient(circle,transparent 0 3px,#efbbc22b 4px),conic-gradient(#341421,#a96879,#341421,#69364a,#341421); }
.levels { display:flex; align-items:center; gap:3px; height:22px; }
.levels i { width:3px; height:5px; border-radius:4px; background:#f5acb9; }
.playing .disc { animation:vinyl 5s linear infinite; }
.playing .levels i { height:17px; animation:meter .68s ease-in-out infinite alternate; }
.levels i:nth-child(2n) { animation-delay:-.34s; }.levels i:nth-child(3n) { animation-delay:-.5s; }
@keyframes vinyl { to {transform:rotate(360deg)} }
@keyframes meter { from {transform:scaleY(.22)} to {transform:scaleY(1)} }
