* { box-sizing: border-box; }
:root { --ink: #173331; --night: #102729; --gold: #ebc98f; --cream: #f8f1dd; --paper: #f3eddc; --muted: #736b56; --sans: "Segoe UI", Arial, sans-serif; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--night); color: var(--cream); font: 1.1rem/1.65 Georgia, "Times New Roman", serif; }
button, a { -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
button { cursor: pointer; color: inherit; font: inherit; }
a { color: inherit; text-decoration: none; }
button:focus-visible, a:focus-visible { outline: 3px solid #bb8737; outline-offset: 4px; }
button { border: none; }
h1,h2,p { margin: 0; }
h1,h2 { font-weight: 400; }
h2 { font-size: clamp(2.8rem,4.6vw,4.8rem); line-height: 1.02; letter-spacing: -.055em; }
h2 em { font-weight: 400; }
.symbols { position: absolute; height: 0; width: 0; overflow: hidden; }
.icon { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }
.skip { position: absolute; top: -100px; z-index: 9; background: var(--cream); color: var(--ink); padding: 10px; }
.skip:focus { top: 0; }
header { background: #102526; border-bottom: 1px solid #b3956445; }
.header-inner,.wrap,.letter-layout,.hero-body,.hero-foot { width: min(85%,1230px); margin-inline: auto; }
.header-inner { display: flex; align-items: center; justify-content: space-between; min-height: 72px; gap: 24px; }
.brand { display: inline-flex; align-items: center; gap: 11px; font-size: 1.37rem; letter-spacing: -.045em; }
.brand .icon { color: var(--gold); width: 30px; height: 30px; stroke-width: 1.2; }
nav { display: flex; gap: clamp(20px,3vw,48px); }
nav a,.snow-control { font: .88rem/1.2 var(--sans); }
nav a { display: inline-flex; align-items: center; min-height: 44px; color: #e7e6d8; }
nav a:hover,.hero-foot a:hover { color: var(--gold); }
.snow-control { display: inline-flex; justify-content: center; align-items: center; gap: 9px; background: transparent; border: 1px solid #d5c9a650; border-radius: 30px; min-height: 38px; padding: 0 13px; }
.snow-control .icon { width: 17px; height: 17px; color: var(--gold); }
.toggle-track { width: 21px; height: 12px; border-radius: 12px; border: 1px solid #938976; position: relative; }
.toggle-track::before { content: ""; position: absolute; inset: 2px auto auto 2px; background: #aaa; width: 6px; height: 6px; border-radius: 50%; }
[aria-pressed="true"] .toggle-track { background: var(--gold); border-color: var(--gold); }
[aria-pressed="true"] .toggle-track::before { background: var(--night); left: 11px; }
.hero { position: relative; isolation: isolate; display: grid; align-items: center; min-height: clamp(550px,42.7vw,720px); overflow: hidden; background-color: #123238; }
.hero-art,.hero-frame,.flakes { position: absolute; pointer-events: none; }
.hero-art { inset: 0; z-index: -2; background: linear-gradient(90deg,#061a20ad 0%,#071d2340 45%,transparent 68%),linear-gradient(0deg,#081f27a6,transparent 26%),url("assets/moonlit-valley.webp") 54% 48%/cover; }
.hero-frame { inset: 17px 22px; border: 1px solid #e5c98c53; }
.hero-frame i { position: absolute; width: 15px; height: 15px; border: solid #e1c692bb; border-width: 1px 0 0 1px; top: 4px; left: 4px; }
.hero-frame i:nth-child(2) { left: auto; right: 4px; transform: rotate(90deg); }
.hero-frame i:nth-child(3) { top: auto; bottom: 4px; transform: rotate(-90deg); }
.hero-frame i:nth-child(4) { inset: auto 4px 4px auto; transform: rotate(180deg); }
.hero-body { position: relative; padding: 64px 0 88px; }
.eyebrow { display: flex; align-items: center; gap: 13px; text-transform: uppercase; letter-spacing: .2em; font: 600 .74rem/1.5 var(--sans); letter-spacing: .19em; color: var(--gold); }
.line { width: 34px; height: 1px; background: currentColor; }
h1 { font-size: clamp(5rem,7.3vw,7.8rem); line-height: .98; letter-spacing: -.06em; margin: 23px 0 20px; }
h1 em { color: #f2d4a1; font-weight: 400; }
.title-star { display: inline-block; color: var(--gold); font: 400 .31em/1 Georgia,serif; vertical-align: top; margin: .35em 0 0 .36em; }
.hero-body p { font-size: clamp(1.06rem,1.52vw,1.35rem); color: #f4ead8; }
.gold-button,.dark-button { display: inline-flex; align-items: center; justify-content: center; gap: 12px; background: #f0d5a0; color: #172d2c; padding: 13px 25px; min-height: 48px; border-radius: 5px; font: 600 .96rem/1.35 var(--sans); transition: background .2s,transform .2s; }
.gold-button { margin-top: 27px; }
.gold-button:hover { background: #ffe6b8; transform: translateY(-2px); }
.hero-foot { position: absolute; bottom: 30px; left: 50%; transform: translateX(-50%); display: flex; align-items: flex-end; justify-content: space-between; pointer-events: none; }
.hero-foot a { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; color: #f4e7c9; font: .75rem var(--sans); letter-spacing: .065em; pointer-events: auto; }
.scroll-mark { display: grid; place-items: center; width: 23px; height: 23px; border: 1px solid #e9d9ac80; border-radius: 50%; }
.scroll-mark::before { content: ""; width: 6px; height: 6px; border: solid currentColor; border-width: 0 1px 1px 0; transform: translateY(-2px) rotate(45deg); }
.postmark { width: 126px; height: auto; transform: rotate(-10deg); color: #ebdabc; }
.flakes { inset: 0; z-index: -1; overflow: hidden; }
.flakes i { position: absolute; top: -6px; border-radius: 50%; background: #fff8e7; animation: drift linear infinite; }
@keyframes drift { to { transform: translate(14px,750px); } }
.paper { background-color: var(--paper); background-image: url("assets/paper-grain.png"); color: var(--ink); }
.paper .eyebrow { color: #706448; }
.letter-section { padding: clamp(48px,5.5vw,84px) 0 clamp(65px,7vw,110px); }
.letter-layout,.closing-grid { display: grid; grid-template-columns: .8fr 1.35fr; gap: 7%; align-items: start; }
.letter-heading { padding-top: 20px; }
.letter-heading h2,.closing h2,.album h2,.gifts h2 { margin: 19px 0; }
.letter-heading h2 em,.closing h2 em { color: #79694d; }
.ornament { display: flex; align-items: center; gap: 12px; font: 1.4rem Georgia; color: #8c7956; margin-top: 26px; }
.ornament::before,.ornament::after { content: ""; height: 1px; width: 33px; background: #b4a483; }
.stationery { position: relative; min-width: 0; padding: 35px clamp(24px,3.6vw,60px) 45px; border: 1px solid #c5bca0; background: #fcf8e9 url("assets/paper-grain.png"); color: #343b34; box-shadow: 3px 5px 0 -1px #e4ddc8,3px 5px 0 0 #c9bfa5,0 12px 24px #493b2410; }
.letter-address { display: flex; align-items: baseline; gap: 10px; margin: 10px 120px 44px 0; padding-bottom: 6px; border-bottom: 1px solid #c5bca0; font-size: 1.14rem; font-style: italic; color: #5e695c; }
.letter-address span { font: .72rem var(--sans); text-transform: uppercase; letter-spacing: .13em; color: #726952; }
.stamp-group { position: absolute; top: 16px; right: 19px; width: 112px; height: 80px; }
.stamp { position: absolute; right: 0; width: 55px; height: 68px; background: #c8c9ae; padding: 6px; transform: rotate(5deg); mask: radial-gradient(circle at 3px 0,transparent 2px,#000 2.5px) 0 0/6px 51% repeat-x,radial-gradient(circle at 3px 100%,transparent 2px,#000 2.5px) 0 100%/6px 51% repeat-x; }
.stamp div { height: 100%; border: 1px solid #e2d9bc; background: url("assets/moonlit-valley.webp") 85% 30%/auto 100%; }
.stamp-group .postmark { width: 97px; opacity: .75; position: absolute; left: -5px; bottom: 0; color: #56685a; }
.hand p,.closing-copy p { margin: 0 0 1.05em; }
.hand p:first-child { font-style: italic; font-size: 1.45rem; }
.hand p:last-child,.closing-copy > p:last-of-type { margin-bottom: 0; }
.album,.cat-section,.gifts,.closing { padding: clamp(56px,7vw,105px) 0; }
.album { background: #143331; }
.album h2 em,.gifts h2 em { color: var(--gold); }
.album p,.gifts .wrap>p { color: #e2dfcd; }
.gallery { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: clamp(12px,1.8vw,27px); margin: 40px 0 0; }
.snapshot,.cat-stamp { background: #f4ecdb url("assets/paper-grain.png"); color: var(--ink); box-shadow: 0 5px 13px #03131338; padding: 8px; transition: transform .25s; }
.snapshot:nth-child(odd) { transform: rotate(-1.6deg); }
.snapshot:nth-child(even) { transform: rotate(1.4deg); }
.snapshot:hover,.cat-stamp:hover { transform: translateY(-4px); }
.snapshot img { display: block; width: 100%; aspect-ratio: 4/4.5; object-fit: cover; }
.snapshot span { display: block; font-style: italic; padding: 10px 2px 4px; }
.cat-layout { display: grid; grid-template-columns: minmax(0,.7fr) minmax(0,1fr); align-items: center; gap: clamp(36px,8vw,130px); }
.cat-stamp { width: min(100%,340px); justify-self: center; padding: 12px; transform: rotate(-3deg); border: 1px solid #c5b98f; }
.cat-stamp img { width: 100%; display: block; }
.cat-section h2 { margin-bottom: 20px; }
.text-button { background: transparent; color: var(--ink); padding: 8px 0; min-height: 44px; text-decoration: underline; text-underline-offset: 6px; font: 600 .94rem/1.5 var(--sans); }
.cat-section .text-button { margin-top: 13px; }
.answer:not(:empty) { margin-top: 18px; font-style: italic; }
.gifts { background: #183a39; }
.gifts .wrap>p { max-width: 650px; }
.envelopes { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 24px; margin-top: 34px; }
.envelope { position: relative; padding: 68px 15px 18px; background: #e7d7b9 url("assets/paper-grain.png"); color: #283d36; border: 1px solid #bdb08e; box-shadow: 0 5px 14px #081c2233; font-style: italic; }
.flap { position: absolute; inset: 0; background: #beae8c; clip-path: polygon(0 0,100% 0,50% 47%); }
.flap::before { content: ""; position: absolute; inset: 0 0 2px; background: #f1e4c9 url("assets/paper-grain.png"); clip-path: polygon(0 0,100% 0,50% 46%); }
.seal { display: grid; place-items: center; position: absolute; left: 50%; top: 44%; transform: translate(-50%,-50%); width: 31px; height: 31px; border-radius: 50%; background: #924f41; color: #f1d4a5; box-shadow: inset 0 0 0 3px #81493c; transition: transform .2s; }
.envelope:hover .seal { transform: translate(-50%,-58%); }
.seal .icon { width: 15px; height: 15px; }
.gift-hint { margin: 20px 0 0; font-size: .95rem; font-style: italic; }
.wish-note { margin-top: 25px; padding: 20px 0 0; border-top: 1px solid #b9b098; }
.wish-note p { font-style: italic; margin: 0; }
footer { padding: 65px 20px 40px; text-align: center; background: radial-gradient(ellipse at 50% 0,#24433e,#102729 70%); }
footer>.icon { width: 34px; height: 34px; color: var(--gold); }
footer p { font-size: clamp(1.45rem,3.2vw,2.5rem); line-height: 1.4; margin: 18px 0; font-style: italic; }
footer a { display: inline-flex; align-items: center; min-height: 44px; font: .875rem var(--sans); color: var(--gold); text-decoration: underline; text-underline-offset: 5px; }
dialog { border: 1px solid #baac8b; padding: 0; width: min(88%,480px); max-height: 85vh; max-height: 85dvh; background: #f4eddb; color: var(--ink); overflow: auto; }
dialog::backdrop { background: #071b20ce; }
dialog[open] { animation: arrive .25s ease-out; }
@keyframes arrive { from { opacity: 0; transform: translateY(9px); } }
.dismiss { position: absolute; right: 6px; top: 6px; width: 44px; height: 44px; display: grid; place-items: center; background: #f6efdff0; color: var(--ink); border-radius: 50%; z-index: 1; }
.dialog-body { text-align: center; padding: 48px 25px 35px; }
.dialog-body>.icon { width: 30px; height: 30px; color: #8f6b38; }
.dialog-body h2 { font-size: 2.3rem; margin: 14px 0; }
.dialog-body p+p { margin-top: 14px; }
.dark-button { margin-top: 20px; background: var(--ink); color: var(--cream); }
[hidden] { display: none !important; }
body:has(dialog[open]) { overflow: hidden; }
#photoDialog { width: min(92vw,78vh,720px); max-width: 94vw; }
.photo-stage { display: grid; height: min(66dvh,670px); overflow: hidden; background: #11252a; }
.photo-stage img { grid-area: 1/1; display: block; width: 100%; height: 100%; min-height: 0; object-fit: contain; background: #11252a; }
.photo-controls { padding: 5px 12px; display: flex; align-items: center; justify-content: space-between; gap: 12px; font-style: italic; }
.photo-controls button { width: 44px; min-height: 44px; font-size: 1.65rem; background: transparent; }
@media (max-width: 780px) {
 .header-inner,.wrap,.letter-layout,.hero-body,.hero-foot { width: 87%; }
 .header-inner { gap: 12px; }
 .letter-layout,.closing-grid { grid-template-columns: minmax(0,1fr); gap: 28px; }
 .letter-heading { padding-top: 0; }
 .letter-heading h2 br { display: none; }
 .letter-heading h2 br::after { content: " "; }
 .letter-heading h2 em::before { content: " "; }
 .ornament { display: none; }
 .gallery { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 22px; }
 .cat-layout { gap: 30px; }
}
@media (max-width: 600px) {
 body { font-size: 1.05rem; }
 .header-inner { flex-wrap: wrap; padding: 8px 0 0; gap: 0; }
 nav { order: 3; width: 100%; flex-wrap: wrap; gap: 0 8px; justify-content: space-between; border-top: 1px solid #f5e9c424; margin-top: 6px; }
 nav a { font-size: .85rem; }
 .brand { font-size: 1.18rem; min-height: 44px; }
 .brand .icon { width: 26px; }
 .snow-control { min-height: 44px; border: 0; padding-right: 0; }
 .hero { grid-template-columns: minmax(0,1fr); min-height: 570px; min-height: clamp(535px,76svh,660px); align-items: end; }
 .hero-art { background-image: linear-gradient(0deg,#051b23f0 1%,#061c23bd 35%,#0925298c 65%,transparent 87%), url("assets/moonlit-valley.webp"); background-size: cover,auto 100%; background-position: center,82% center; }
 .hero-frame { inset: 11px; }
 .hero-body { padding: 160px 5px 88px; }
 .hero-body p { max-width: 280px; }
 h1 { font-size: min(20vw,clamp(4.25rem,15vw,5.4rem)); margin: 17px 0 13px; }
 h2 { font-size: min(12.6vw,2.8rem); }
 .wrap,.stationery,.dialog-body { overflow-wrap: anywhere; }
 .eyebrow { font-size: .72rem; letter-spacing: .115em; gap: 10px; }
 .line { width: 24px; }
 .gold-button { margin-top: 18px; }
 .hero-foot { bottom: 17px; padding: 0 4px; }
 .hero-foot .postmark { width: 78px; }
 .letter-heading h2 { margin-bottom: 0; }
 .stationery { padding: 24px 20px 30px; }
 .letter-address { flex-direction: column; gap: 2px; margin: 2px 90px 32px 0; }
 .stamp-group { right: 12px; transform: scale(.82); transform-origin: top right; }
 .gallery { gap: 16px 12px; margin-top: 27px; }
 .snapshot { padding: 5px; }
 .snapshot span { font-size: .92rem; }
 .cat-layout { grid-template-columns: 1fr; }
 .cat-stamp { width: min(72%,260px); }
 .envelopes { grid-template-columns: 1fr; gap: 15px; }
 .envelope { min-height: 114px; }
}
@media (max-width: 600px) and (max-height: 700px) and (orientation: portrait) {
 .hero { min-height: clamp(395px,72svh,500px); }
 .hero-body { padding-top: clamp(54px,calc(100svh - 510px),124px); }
}
@media (max-width: 950px) and (max-height: 500px) and (orientation: landscape) and (pointer: coarse) {
 .hero { min-height: 300px; align-items: start; }
 .hero-body { padding-block: 24px 78px; }
 .hero h1 { font-size: clamp(2.7rem,6vw,3.4rem); margin: 10px 0; }
 .hero-body .gold-button { margin-top: 12px; }
 .hero-foot { bottom: 14px; }
 .hero-foot .postmark { width: 76px; }
}
@media (prefers-reduced-motion: reduce) {
 html { scroll-behavior: auto; }
 *,*::before,*::after { transition-duration: 0s !important; animation-duration: 0s !important; }
 .flakes { display: none; }
}

.letter-scene { position:relative; min-width:0; isolation:isolate; perspective:1100px; }
.letter-pocket { position:absolute; inset:0 0 auto; height:180px; background:#d5c5a6 url("assets/paper-grain.png"); border:1px solid #bead8a; }
.letter-pocket::before { content:""; position:absolute; inset:0; background:#c5b496; clip-path:polygon(0 0,100% 0,50% 77%); transform-origin:top; }
.letter-scene .stationery { transition:transform .58s ease-out,opacity .45s; }
.letter-scene.folded .stationery { opacity:0; transform:translateY(34px) rotateX(-8deg); }
.letter-scene.reading .letter-pocket::before { animation:unseal .55s ease-out both; }
.letter-scene.reading .hand p { animation:ink-in .42s ease-out both; animation-delay:var(--delay); }
@keyframes unseal { to {transform:rotateX(164deg)} }
@keyframes ink-in { from {opacity:.05;transform:translateY(9px)} }

.cat-stamp { display:grid; place-items:center; aspect-ratio:1; overflow:hidden; background:radial-gradient(ellipse at 47% 65%,#52706a,#193f41 70%,#102b2c); border:6px solid #e6dcc7; padding:0; border-radius:48% 48% 4px 4px; transform:none; }
.cat-stamp>* { grid-area:1/1; }
.cat-stamp canvas { display:block; width:100%; height:100%; min-width:0; }
@media(prefers-reduced-motion:reduce){.letter-scene.folded .stationery{opacity:1;transform:none}.letter-scene.reading .hand p{animation:none}}
#letterDialog { width:min(91vw,640px); overscroll-behavior:contain; background:var(--paper) url("assets/paper-grain.png"); }
#letterDialog[open] { animation:deliver-letter .52s cubic-bezier(.17,.8,.25,1) both; }
#letterDialog::backdrop { backdrop-filter:blur(3px); }
.letter-tools { position:sticky; top:0; height:0; z-index:3; }
#letterDialog .stationery { box-shadow:none; padding-top:44px; }
#letterDialog .stamp-group { right:58px; }
#letterDialog .letter-address { margin-right:145px; }
#letterTitle { margin:0 0 20px; font-size:clamp(2rem,7vw,3.2rem); }
.letter-seal { margin:0; padding:18px; text-align:center; font-style:italic; color:var(--ink); }
@keyframes deliver-letter { from { opacity:0; transform:perspective(850px) translateY(18vh) rotateX(-15deg) rotate(-4deg) scale(.9); } }
@media(max-width:420px){#letterDialog .stamp-group{top:57px;right:14px}#letterDialog .letter-address{margin-right:87px}}
@media(prefers-reduced-motion:reduce){#letterDialog[open]{animation:none}}

.postcards summary { display:flex; justify-content:space-between; align-items:center; gap:12px; min-height:48px; list-style:none; cursor:pointer; }
.postcards summary::-webkit-details-marker { display:none; }
.postcards summary h2 { margin:0; }
.fold-action { display:flex; align-items:center; gap:9px; color:var(--gold); font:.85rem var(--sans); }
.fold-action::after { content:""; width:7px; height:7px; border:solid currentColor; border-width:0 1px 1px 0; transform:rotate(45deg); }
.postcards[open] .fold-action::after { transform:rotate(225deg); }
.postcards:not([open]) .fold-action span:last-child,.postcards[open] .fold-action span:first-child { display:none; }
.postcards summary:focus-visible { outline:2px solid var(--gold); outline-offset:4px; }
.snapshot { position:relative; padding:clamp(8px,1vw,14px); border:1px solid #d2b77f; background:repeating-linear-gradient(135deg,#284d46 0 9px,#c5aa73 9px 11px,#843e3e 11px 20px,#ddc89f 20px 22px); }
.snapshot img { border:2px solid #ead6ae; }
.snapshot span { background:#f5ecd9 url("assets/paper-grain.png"); padding:9px 3px; }
.snapshot::after { content:"✦"; position:absolute; top:1px; right:2px; font:1.25rem Georgia,serif; color:#ffe8ad; text-shadow:0 1px 2px #493b29; pointer-events:none; }

/* The lunar post office and its three keepsakes. */
header { background: linear-gradient(110deg,#173535,#0c2126 75%); }
.header-inner { min-height: 88px; }
.brand { color: #f5e6c6; white-space: nowrap; }
.brand em { color: var(--gold); }
.brand-mark { display: grid; place-items: center; width: 45px; height: 45px; border: 1px solid #bb9d61; border-radius: 50%; outline: 1px dashed #b89f6666; outline-offset: -5px; transform: rotate(-9deg); }
.mail-nav { gap: clamp(18px,3vw,44px); }
.mail-link { display: flex; align-items: center; gap: 12px; padding: 5px 2px; min-height: 52px; text-align: left; font: 1.06rem/1.15 Georgia,serif; color: var(--cream); background: none; }
.mail-link small { display: block; margin-top: 4px; font: .75rem/1.2 var(--sans); color: #c0c9b9; }
.mail-link > :first-child { position: relative; flex: none; transition: transform .23s ease-out; }
.mail-link:hover > :first-child,.mail-link:focus-visible > :first-child { transform: translateY(-3px) rotate(-7deg); }
.mini-letter { width: 37px; height: 25px; background: #e1cba6 url("assets/paper-grain.png"); border: 1px solid #bd9e75; box-shadow: 0 3px 5px #061418; transform: rotate(-8deg); }
.mini-letter::before { content: ""; position: absolute; inset: 0; background: #f6e4c3; clip-path: polygon(0 0,100% 0,50% 61%); }
.mini-letter::after { content: ""; position: absolute; left: 41%; top: 40%; width: 7px; height: 7px; background: #ac5749; box-shadow: inset 0 0 0 1px #85483a; border-radius: 50%; }
.mini-photo,.album-cover { background: #f1dfbe url("assets/moonlit-valley.webp") 82% center/auto 100%; border: 3px solid #efe5cf; border-bottom-width: 6px; box-shadow: -3px 2px 0 #b8a485,0 4px 8px #06182055; transform: rotate(7deg); }
.mini-photo { width: 31px; height: 31px; }
.mini-gift { width: 31px; height: 24px; margin-top: 4px; border-radius: 2px; background: linear-gradient(90deg,transparent 40%,#efcc84 40% 57%,transparent 57%),linear-gradient(#a25147 0 20%,#653637 21% 27%,#914b45 28%); transform: rotate(-5deg); box-shadow: 0 3px 5px #061418; }
.mini-gift::before,.mini-gift::after { content: ""; position: absolute; top: -7px; left: 4px; width: 10px; height: 6px; border: 1.5px solid #ecc987; border-radius: 60% 65% 0 65%; transform: rotate(16deg); }
.mini-gift::after { left: 15px; transform: scaleX(-1) rotate(16deg); }
@media(max-width:920px) {
 .header-inner { flex-wrap: wrap; padding: 8px 0; gap: 4px 12px; }
 .mail-nav { order: 3; width: 100%; display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 5px; margin-top: 4px; padding-top: 7px; border-top: 1px solid #e8d5a82b; }
 .mail-link { justify-content: center; }
 .brand-mark { width: 37px; height: 37px; }
}
@media(max-width:600px) {
 .header-inner { width: 92%; }
 .mail-link { flex-direction: column; gap: 6px; text-align: center; font-size: .97rem; padding: 4px 0; }
 .mail-link > :first-child { margin-block: auto; }
 .mail-link small { margin-top: 2px; }
 .mail-link .mini-gift { margin-block: 7px 0; }
}

/* Evergreen spread and the closed photo album. */
main { --album-blend: clamp(64px,7vw,96px); }
.album { padding-block: 0; background: #112d2e; }
.forest-layout { position: relative; isolation: isolate; display: grid; align-items: center; min-height: clamp(420px,41vw,820px); }
.forest-intro { z-index: 1; padding: 48px 0 calc(88px + var(--album-blend)); pointer-events: none; }
.forest-intro h2,.forest-intro p { max-width: min(34vw,460px); }
.forest-intro h2 em { display: block; }
.tree-window { position: absolute; inset: 0; width: 100%; height: 100%; display: block; overflow: hidden; padding: 0; background: #112d2e; }
.tree-window::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg,#091d23ed,#0a1c238c 31%,transparent 49%); }
.tree-window:focus-visible { outline-offset: -4px; }
.tree-scene { display: block; width: 100%; height: 100%; }
.tree-scene image { filter: brightness(.8) saturate(.85); transition: filter .8s; }
.tree-window.lit image { filter: brightness(1.06) saturate(1.12); }
.tree-lamps { fill: #fff7cc; }
.tree-lamps g { opacity: 0; transition: opacity .38s; }
.lit .tree-lamps g { opacity: 1; transition-delay: var(--delay); }
.tree-control { position: absolute; z-index: 1; left: max(7.5%,calc((100% - 1230px)/2)); bottom: calc(var(--album-blend) + 16px); display: inline-flex; gap: 8px; align-items: center; padding: 8px 14px; min-height: 44px; border: 1px solid #bca477; color: #f5dfb0; border-radius: 24px; background: #17312ff2; font: 600 .875rem/1.25 var(--sans); }
.lit .tree-control { background: #f6dca8; color: #273c35; }
.winter-spread { position: relative; isolation: isolate; margin-top: calc(0px - var(--album-blend)); }
.winter-spread::before {
 content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
 background: linear-gradient(90deg,#07191e17,#091b22a8 64%),url("assets/backgrounds/winter-fairy-lights.webp") center 49%/cover #132c34;
 mask-image: linear-gradient(180deg,transparent,#000 var(--album-blend));
}
.postcards { padding: clamp(14px,2vw,25px) clamp(16px,3vw,40px); background: linear-gradient(120deg,#142d32e6,#102631d4); border: 1px solid #c2bc9b80; box-shadow: inset 3px 0 #ad925f,0 5px 16px #071e203d; border-radius: 3px 12px 12px 3px; }
.album-cover { flex: none; width: clamp(38px,5vw,62px); aspect-ratio: 1.1; margin: 5px 5px 5px 0; }
.postcards summary { justify-content: start; }
.postcards summary h2 { font-size: clamp(1.6rem,3vw,2.6rem); letter-spacing: -.04em; }
.fold-action { margin-left: auto; }
@media(max-width:740px) {
 .forest-layout { min-height: 0; }
 .forest-intro { padding: clamp(210px,54vw,320px) 0 calc(82px + var(--album-blend)); }
 .forest-intro h2,.forest-intro p { max-width: 100%; }
 .forest-intro h2 em { display: inline; }
 .tree-window::after { background: linear-gradient(180deg,transparent 26%,#08191d55 46%,#08191dba 72%,#08191d60); }
 .tree-control { left: 6.5%; }
}
@media(max-width:380px) {
 .postcards { padding-inline: 12px; }
 .postcards summary { gap: 8px; }
 .album-cover { width: 30px; }
 .fold-action { font-size: .77rem; }
}

/* A postcard with a portrait stamp, then the night mail. */
.cat-section { color: #fff5de; background: transparent; padding-top: clamp(26px,4vw,60px); }
.cat-layout { gap: clamp(22px,5vw,84px); }
.cat-layout > div { padding: clamp(20px,3vw,38px); border-radius: 12px; background: #0b242bd1; }
.cat-layout .text-button { color: #ffe2af; }
.cat-stamp { box-shadow: 0 0 0 1px #9d9272,3px 7px 12px #5b604933; }
.cat-layout h2 em { color: #f5cd91; }
.cat-layout h2::after { content: ""; display: block; width: 60px; height: 3px; margin-top: 18px; border-block: 1px solid #9e906c; }
.gifts {
 background: linear-gradient(90deg,#071320eb 0%,#0c1a2985 45%,transparent 78%),
             linear-gradient(0deg,#061222ba,transparent 42%),
             url("assets/backgrounds/new-year-square.webp") center 52%/cover #102139;
}
@media(max-width:600px) {
 .gifts {
  padding-top: clamp(180px,50vw,235px);
  background-image: linear-gradient(180deg,transparent 12%,#08132566 32%,#081325d9 70%,#081325),
                    url("assets/backgrounds/new-year-square.webp");
  background-size: 100% 100%,auto 70%;
  background-position: center,72% top;
  background-repeat: no-repeat;
 }
}
.envelopes { gap: clamp(18px,3vw,38px); margin-top: 46px; }
.envelope { --front: #e4cfa6; --flap-paper: #f0dfbf; --wax: #9e5548; --rim: #7c4038; isolation: isolate; min-height: 146px; padding: 94px 10px 17px; border: 1px solid #b4a27d; background: #b39a74; box-shadow: 2px 7px 14px #041a2180; }
.envelope[data-note="1"] { --front: #c8d2bb; --flap-paper: #e2e5d0; --wax: #436558; --rim: #345345; }
.envelope[data-note="2"] { --front: #d3c6cf; --flap-paper: #ece1dd; --wax: #785267; --rim: #614352; }
.envelope-pocket,.note-slip,.envelope .flap,.snow-burst { pointer-events: none; }
.envelope-pocket { position: absolute; inset: 0; z-index: 2; background: var(--front) url("assets/paper-grain.png"); clip-path: polygon(0 0,50% 44%,100% 0,100% 100%,0 100%); }
.envelope-pocket::after { content: ""; position: absolute; inset: 0; background: linear-gradient(33deg,transparent 43%,#7e6a5430 43.5%,transparent 44%),linear-gradient(-33deg,transparent 43%,#7e6a5425 43.5%,transparent 44%); }
.envelope .flap { z-index: 3; transform-origin: top; }
.flap::before { background-color: var(--flap-paper); }
.envelope .seal { z-index: 4; width: 35px; height: 35px; background: var(--wax); box-shadow: inset 0 0 0 3px var(--rim),inset 0 0 0 4px #e8c59877,1px 3px 4px #654a344d; }
.envelope > span:not([class]) { position: relative; z-index: 4; }
.note-slip { position: absolute; z-index: 1; inset: 8% 7% 6%; display: grid; justify-items: center; align-content: start; color: #8d6d44; padding-top: 10px; background: #fff6df url("assets/paper-grain.png"); border: 4px double #c4ad7d; }
.envelope.opening { z-index: 5; }
.opening .flap { animation: unfold-flap .65s ease-in-out both; }
.opening .seal { animation: melt-seal .35s ease-in both; }
.opening .note-slip { animation: lift-keepsake 1.05s cubic-bezier(.22,.74,.21,1) both; }
.snow-burst { position: absolute; inset: 0; z-index: 6; }
.snow-burst i { position: absolute; left: 50%; top: 41%; color: #fff1bd; opacity: 0; font: 1.05rem/1 Georgia,serif; text-shadow: 0 0 7px #f8d781; animation: snow-shower .76s ease-out both; }
@keyframes unfold-flap {
 0%,14% { transform: perspective(500px) rotateX(0); }
 53% { z-index: 3; }
 54%,100% { z-index: 0; }
 100% { transform: perspective(500px) rotateX(160deg); }
}
@keyframes melt-seal {
 40% { box-shadow: 0 0 18px #f3d28c; }
 to { opacity: 0; transform: translate(-50%,-75%) rotate(-15deg) scale(.72); }
}
@keyframes lift-keepsake {
 0%,36% { transform: translateY(0); }
 82%,100% { transform: translateY(-40%) rotate(-3deg); }
}
@keyframes snow-shower {
 0% { opacity: 0; transform: scale(.3); }
 18% { opacity: 1; }
 100% { opacity: 0; transform: translate(var(--dx),var(--dy)) rotate(55deg); }
}
#noteDialog { border: 4px double #ae966a; box-shadow: 0 14px 75px #08191e88; }
#noteDialog[open] { animation: arrive-keepsake .42s ease-out; }
#noteDialog .dialog-body { padding: 44px clamp(22px,5vw,44px) 38px; background-image: url("assets/paper-grain.png"),radial-gradient(ellipse at top,#fff8e5,#efe3c9); }
#noteDialog .dialog-body>.icon { padding: 7px; width: 44px; height: 44px; border: 1px solid #b1996f; outline: 1px dashed #b1996f; outline-offset: -4px; border-radius: 50%; }
@keyframes arrive-keepsake { from { opacity: 0; transform: translateY(28px) rotate(-3deg) scale(.94); } }
@media(max-width:600px) {
 .envelopes { gap: 23px; }
 .envelope { min-height: 122px; padding-top: 76px; }
}

/* The final letter rests on a sheet of lined writing paper. */
.closing {
 color: #fff8ea;
 background: linear-gradient(120deg,#0d263bbd 0%,transparent 52%),
             url("assets/backgrounds/winter-clearing.webp") center 58%/cover #233e4a;
}
.closing .eyebrow,.closing h2 em { color: #efe1c6; }
.closing-copy { color: var(--ink); }
@media(max-width:780px) {
 .closing-grid { width: 94%; grid-template-columns: minmax(0,.75fr) minmax(0,1.35fr); gap: 4%; }
}
@media(max-width:600px) {
 .closing { background-position: center,27% center; }
 .closing-grid {
  width: auto;
  margin-inline: clamp(12px,calc(68vw - 190px),25%) 4%;
  grid-template-columns: minmax(0,1fr);
  gap: 14px;
 }
 .closing-grid h2 { font-size: clamp(2rem,8.8vw,2.8rem); margin-block: 12px 0; }
 .closing-grid .closing-copy { padding: 20px clamp(15px,4vw,22px); }
}
.closing-grid { align-items: start; }
.closing-copy { position: relative; padding: clamp(22px,3.2vw,48px); background: #fbf5e6 url("assets/paper-grain.png"); border: 1px solid #c8b99a; box-shadow: 3px 4px 0 -1px #e6d9bd,3px 4px 0 0 #bcae90,0 12px 26px #5b59431a; }
.closing-copy::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 4px; background: repeating-linear-gradient(125deg,#a66957 0 10px,#eee1ca 10px 19px,#6b827d 19px 29px,#eee1ca 29px 38px); }
footer {
 padding: clamp(100px,10vw,155px) 20px 55px;
 background: radial-gradient(ellipse at 50% 52%,#081b23bd,transparent 67%),
             url("assets/backgrounds/moonlit-river.webp") center 57%/cover #142c34;
}
/* Adjacent scenes meet in the same soft band of twilight. */
main > section,main > footer { position: relative; }
main > section:not(.album)::after,main > section:not(.hero)::before,.winter-spread::after,main > footer::before {
 content: "";
 position: absolute;
 inset: auto 0 0;
 height: clamp(22px,3.4vw,52px);
 z-index: 2;
 pointer-events: none;
 background: linear-gradient(to bottom,transparent,#112a32);
}
main > section:not(.hero)::before,main > footer::before {
 inset: 0 0 auto;
 background: linear-gradient(to bottom,#112a32,transparent);
}
@media(max-width:600px) {
 footer { background-position: center,66% center; }
}
@media(prefers-reduced-motion:reduce) {
 .mail-link:hover > :first-child { transform: none; }
 #noteDialog[open] { animation: none; }
 .tree-lamps g { transition: none; }
}
