:root {
  --paper: #f7f1e8;
  --paper-light: #fcf9f3;
  --ink: #322820;
  --muted: #76695e;
  --rust: #a74e3b;
  --rose: #e4a99d;
  --sage: #a9b28c;
  --lilac: #c7b9ce;
  --yellow: #eacb79;
  --line: rgba(67, 48, 36, .18);
  --serif: 'Playfair Display', Georgia, serif;
  --sans: 'DM Sans', Arial, sans-serif;
  --hand: 'Caveat', cursive;
  color-scheme: light;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 88px; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--sans); font-size: 15px; line-height: 1.65; }
button, input { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; text-decoration: none; }
button { color: inherit; }
[hidden] { display: none !important; }
::selection { background: #eacb79; color: var(--ink); }
:focus-visible { outline: 3px solid #a74e3b; outline-offset: 4px; }

.paper-grain { position: fixed; inset: 0; z-index: 20; pointer-events: none; opacity: .12; background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.15'/%3E%3C/svg%3E"); mix-blend-mode: multiply; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.section-wrap { width: min(1180px, calc(100% - 96px)); margin-inline: auto; }
.eyebrow { margin: 0 0 20px; color: var(--rust); font-size: 10px; font-weight: 700; letter-spacing: .17em; line-height: 1.4; }

.button { display: inline-flex; min-height: 46px; align-items: center; justify-content: center; gap: 17px; padding: 0 21px; border: 1px solid transparent; border-radius: 2px; cursor: pointer; font-size: 11px; font-weight: 700; letter-spacing: .035em; transition: background .2s, color .2s, transform .2s; }
.button:hover { transform: translateY(-2px); }
.button-dark { background: var(--ink); color: var(--paper-light); }
.button-dark:hover { background: var(--rust); }
.form-error { margin: 0; color: #9b342b; font-size: 12px; text-align: left; }

.site-header { position: sticky; z-index: 15; top: 0; display: flex; height: 78px; align-items: center; justify-content: space-between; padding-inline: max(48px, calc((100vw - 1320px) / 2)); border-bottom: 1px solid rgba(67,48,36,.12); background: rgba(247,241,232,.91); backdrop-filter: blur(12px); }
.wordmark { display: inline-flex; align-items: center; gap: 9px; font-family: var(--serif); font-size: 15px; font-weight: 600; letter-spacing: -.02em; white-space: nowrap; }
.wordmark i { color: var(--rust); font-weight: 500; }
.wordmark-icon { display: grid; place-items: center; width: 27px; height: 27px; border: 1px solid var(--rust); border-radius: 50%; color: var(--rust); font-family: var(--sans); font-size: 14px; }
.main-nav { display: flex; align-items: center; gap: clamp(22px, 4vw, 52px); }
.main-nav a, .header-note { font-size: 11px; font-weight: 600; }
.main-nav a { color: #65594f; transition: color .2s; }
.main-nav a:hover, .header-note:hover { color: var(--rust); }
.header-note { color: var(--rust); }
.header-note span { margin-left: 8px; }

.hero { position: relative; display: grid; min-height: 650px; grid-template-columns: 1.05fr .95fr; align-items: center; padding-top: 57px; padding-bottom: 86px; }
.hero-copy { position: relative; z-index: 2; padding-bottom: 30px; }
.eyebrow-dot { display: inline-block; width: 7px; height: 7px; margin-right: 9px; border-radius: 50%; background: var(--rust); vertical-align: 1px; }
h1, h2, h3, p { overflow-wrap: break-word; }
.hero h1 { margin: 0; font: 500 clamp(56px, 7.1vw, 94px)/.99 var(--serif); letter-spacing: -.065em; }
h1 em, h2 em, .closing-line em { color: var(--rust); font-weight: 500; }
.hero-intro { max-width: 390px; margin: 26px 0 26px; color: var(--muted); font-size: 14px; line-height: 1.85; }
.hero-actions { display: flex; align-items: center; gap: 20px; }
.hand-note { color: var(--rust); font: 600 20px var(--hand); transform: rotate(-4deg); }
.hand-note span { display: inline-block; margin-left: 4px; transform: rotate(-30deg); }
.hero-footnote { margin-top: 54px; color: #76695e; font-size: 10px; letter-spacing: .04em; }
.tiny-heart { margin-right: 8px; color: var(--rust); }
.hero-art { position: relative; display: grid; min-height: 470px; place-items: center; }
.hero-sun { position: absolute; top: 37px; right: 7%; width: 290px; height: 290px; border-radius: 50%; background: #e8c779; opacity: .64; }
.polaroid { position: relative; z-index: 1; width: min(70%, 330px); padding: 13px 13px 56px; background: #fffdf8; box-shadow: 7px 14px 24px rgba(54,38,27,.15); transform: rotate(4deg); }
.hero-photo img { display: block; width: 100%; height: 360px; object-fit: cover; filter: saturate(.78); }
.hero-photo p { position: absolute; right: 0; bottom: 12px; left: 0; margin: 0; color: #48382c; font: 600 25px var(--hand); text-align: center; }
 .hero-photo p span { margin-left: 10px; color: var(--rust); }
.hero-ticket { position: absolute; z-index: 3; bottom: 70px; left: 3%; display: flex; width: 188px; min-height: 91px; flex-direction: column; justify-content: center; padding: 13px 16px; border: 1px dashed rgba(110,69,49,.55); background: #f7e8c8; box-shadow: 4px 7px 14px rgba(54,38,27,.13); transform: rotate(-8deg); }
.hero-ticket::before, .hero-ticket::after { position: absolute; top: 50%; width: 15px; height: 15px; border-radius: 50%; background: var(--paper); content: ''; transform: translateY(-50%); }
.hero-ticket::before { left: -9px; } .hero-ticket::after { right: -9px; }
.hero-ticket span { color: #8d6049; font-size: 7px; font-weight: 700; letter-spacing: .13em; }
.hero-ticket strong { margin-top: 5px; font: 600 20px/1.03 var(--hand); }
.hero-ticket i { position: absolute; right: 14px; bottom: 9px; color: var(--rust); font: 21px var(--hand); }
.hero-orbit { position: absolute; z-index: 2; display: grid; place-items: center; color: var(--rust); animation: orbit-float 4s ease-in-out infinite; }
.orbit-one { top: 34px; left: 8%; font-size: 32px; }
.orbit-two { right: 4%; bottom: 107px; color: #758053; font-size: 22px; animation-delay: -2s; }
@keyframes orbit-float { 0%,100% { transform: translateY(0) rotate(-8deg); } 50% { transform: translateY(-10px) rotate(9deg); } }
.hero-tape { position: absolute; z-index: 2; top: 69px; left: 18%; width: 98px; height: 25px; background: rgba(223,169,157,.72); transform: rotate(-36deg); }
.hero-sticker { position: absolute; z-index: 3; top: 75px; right: 0; display: grid; width: 92px; height: 92px; place-content: center; border-radius: 50%; background: var(--rust); color: #fff7ed; font-size: 10px; font-weight: 700; letter-spacing: .1em; line-height: 1.2; text-align: center; transform: rotate(9deg); }
.scribble { position: absolute; z-index: 3; right: 14%; bottom: 57px; color: var(--rust); font: 62px var(--hand); transform: rotate(15deg); }
.photo-caption { position: absolute; right: 4%; bottom: 8px; color: #807265; font-size: 9px; letter-spacing: .04em; }
.scroll-cue { position: absolute; bottom: 22px; left: 0; display: flex; align-items: center; gap: 11px; color: #74675b; font-size: 9px; font-weight: 700; letter-spacing: .13em; }
.scroll-cue span:first-child { display: block; width: 29px; height: 1px; background: var(--rust); }
.intro-strip { display: flex; min-height: 66px; align-items: center; justify-content: space-evenly; gap: 16px; padding: 12px 24px; background: #e9c979; color: #473629; font-size: 9px; font-weight: 700; letter-spacing: .14em; text-align: center; }
.strip-star { font-size: 15px; animation: star-turn 13s linear infinite; }
@keyframes star-turn { to { transform: rotate(360deg); } }

.story-section { padding-top: 122px; padding-bottom: 128px; }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 48px; margin-bottom: 55px; }
.section-heading .eyebrow { margin-bottom: 16px; }
h2 { margin: 0; font: 500 clamp(42px, 5vw, 66px)/1.06 var(--serif); letter-spacing: -.055em; }
.section-aside { max-width: 260px; margin: 0 0 7px; color: var(--muted); font-size: 12px; line-height: 1.8; }
.timeline { position: relative; display: grid; gap: 43px; max-width: 920px; margin: 0 auto; }
.timeline::before { position: absolute; top: 18px; bottom: 15px; left: 50%; width: 1px; background: repeating-linear-gradient(to bottom, rgba(167,78,59,.6) 0 4px, transparent 4px 10px); content: ''; }
.memory { position: relative; display: grid; width: 100%; grid-template-columns: 1fr 1fr; align-items: center; gap: 60px; }
.memory-left .memory-card { grid-column: 1; justify-self: end; }
.memory-left .memory-photo { grid-column: 2; justify-self: start; }
.memory-right .memory-card { grid-column: 2; grid-row: 1; justify-self: start; }
.memory-right .memory-photo { grid-column: 1; grid-row: 1; justify-self: end; }
.memory-pin { position: absolute; z-index: 2; top: 50%; left: 50%; display: grid; width: 33px; height: 33px; place-items: center; border: 1px solid #9a4837; border-radius: 50%; background: var(--paper); color: var(--rust); font-size: 15px; transform: translate(-50%,-50%); }
.pin-sage { border-color: #64744c; color: #64744c; }
.pin-rose { border-color: #9b5960; color: #9b5960; }
.memory-card { position: relative; width: min(100%, 350px); min-height: 200px; padding: 27px 31px; box-shadow: 5px 8px 0 rgba(50,40,32,.07); }
.card-peach { background: #edc3b5; transform: rotate(-1.8deg); }
.card-sage { background: #c4cbaa; transform: rotate(1.5deg); }
.card-lilac { background: #d5c9d9; transform: rotate(-1deg); }
.memory-index, .memory-date { color: #625247; font-size: 9px; font-weight: 700; letter-spacing: .12em; }
.memory-date { margin: 19px 0 4px; color: #735043; }
.memory-card h3 { margin: 0; font: 500 27px/1.2 var(--serif); letter-spacing: -.03em; }
.memory-card > p:not(.memory-date) { max-width: 260px; margin: 10px 0 0; color: #5f5047; font-size: 11px; line-height: 1.75; }
.memory-scribble { position: absolute; right: 22px; bottom: 17px; color: #9e4d3b; font: 31px var(--hand); transform: rotate(-17deg); }
.scribble-sun { color: #64744c; }
.memory-photo { position: relative; width: min(100%, 285px); padding: 10px 10px 32px; background: #fffdf8; box-shadow: 5px 8px 18px rgba(54,38,27,.12); transform: rotate(2deg); }
.memory-photo img { display: block; width: 100%; height: 170px; object-fit: cover; }
.memory-photo > span[data-edit] { position: absolute; right: 0; bottom: 5px; left: 0; color: #786b60; font: 500 17px var(--hand); text-align: center; }
.memory-photo.tilt-left { transform: rotate(-3deg); }
.demo-caption { margin: 32px 0 0; color: #847568; font-size: 10px; text-align: center; }
.demo-caption code { color: #61473c; }

.gallery-section { padding: 112px 0 125px; background: #eee5d8; }
.gallery-heading { margin-bottom: 46px; }
.gallery-grid { display: grid; grid-template-columns: repeat(4, 1fr); grid-auto-rows: 185px; gap: 15px; }
.gallery-item { position: relative; display: block; min-width: 0; margin: 0; overflow: hidden; background: #d9cbb9; }
.gallery-open { position: absolute; inset: 0; width: 100%; height: 100%; overflow: hidden; padding: 0; border: 0; background: transparent; cursor: zoom-in; text-align: left; }
.gallery-open::after { position: absolute; inset: 45% 0 0; background: linear-gradient(transparent, rgba(31,24,19,.67)); content: ''; transition: opacity .25s; }
.gallery-open:hover::after { opacity: .76; }
.gallery-open img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .55s cubic-bezier(.2,.75,.2,1), filter .3s; }
.gallery-open:hover img { transform: scale(1.04); filter: saturate(1.08); }
.photo-placeholder { display: grid; width: 100%; height: 100%; place-items: center; background: repeating-linear-gradient(135deg, rgba(167,78,59,.08) 0 8px, transparent 8px 16px); color: var(--muted); font: 600 15px var(--hand); }
.hero-photo .photo-placeholder { height: 360px; }
.memory-photo .photo-placeholder { height: 170px; }
.gallery-open .photo-placeholder { position: absolute; inset: 0; }
.gallery-tall { grid-row: span 2; }
.gallery-wide { grid-column: span 2; }
.gallery-square { grid-row: span 1; }
.gallery-label { position: absolute; z-index: 1; right: 15px; bottom: 12px; left: 15px; display: flex; justify-content: space-between; gap: 8px; color: white; font-size: 11px; font-weight: 600; }
.gallery-label b { font-weight: 500; }
.photo-number { position: absolute; z-index: 1; top: 12px; left: 13px; color: white; font-size: 9px; font-weight: 700; letter-spacing: .13em; text-shadow: 0 1px 5px rgba(0,0,0,.55); }
.gallery-demo-caption { margin-top: 24px; }
.lightbox { position: fixed; width: min(92vw, 880px); max-width: none; max-height: 90vh; padding: 20px 20px 14px; border: 0; background: #fcf9f3; box-shadow: 0 20px 90px rgba(0,0,0,.35); }
.lightbox::backdrop { background: rgba(35,27,23,.83); backdrop-filter: blur(4px); }
.lightbox img { display: block; max-width: 100%; max-height: calc(90vh - 84px); margin: auto; object-fit: contain; }
.lightbox > p { margin: 8px 0 0; color: #5b4e43; font: 600 21px var(--hand); text-align: center; }
.lightbox-close { position: absolute; z-index: 1; top: 11px; right: 11px; display: grid; width: 38px; height: 38px; place-items: center; border: 1px solid rgba(50,40,32,.23); border-radius: 50%; background: #fcf9f3; cursor: pointer; font-size: 25px; line-height: 1; }

.letter-section { position: relative; display: grid; min-height: 590px; grid-template-columns: .9fr 1.1fr; align-items: center; gap: 8%; padding-top: 100px; padding-bottom: 110px; }
.letter-decoration { position: relative; display: grid; width: min(100%, 390px); height: 365px; place-items: center; border: 1px solid rgba(167,78,59,.5); border-radius: 50% 50% 46% 54% / 49% 44% 56% 51%; background: #e6c8bb; transform: rotate(-7deg); }
.letter-decoration::before, .letter-decoration::after { position: absolute; width: 73%; height: 73%; border: 1px solid rgba(167,78,59,.3); border-radius: 50%; content: ''; }
.letter-decoration::after { width: 49%; height: 49%; border-style: dashed; }
.letter-flower { color: var(--rust); font-size: 97px; }
.letter-loop { position: absolute; top: 39px; right: 67px; color: #a74e3b; font: 52px var(--hand); transform: rotate(17deg); }
.letter-star { position: absolute; bottom: 39px; left: 56px; color: #67754e; font-size: 31px; }
.letter-copy { position: relative; z-index: 1; }
.letter-copy .section-aside { max-width: 360px; margin-top: 17px; }
.letter-details { margin-top: 25px; }
.letter-details summary { width: fit-content; list-style: none; }
.letter-details summary::-webkit-details-marker { display: none; }
.letter-details[open] summary { background: var(--rust); }
.letter-paper { position: relative; max-width: 470px; margin-top: 19px; padding: 29px 34px 24px; border: 1px solid rgba(67,48,36,.14); background: #fffaf1; box-shadow: 5px 8px 18px rgba(54,38,27,.09); animation: unfold .38s ease both; }
.letter-paper::before { position: absolute; top: 0; right: 33px; width: 52px; height: 19px; background: rgba(234,203,121,.68); content: ''; transform: translateY(-5px) rotate(4deg); }
.letter-date { margin: 0 0 12px; color: #8d6b54; font-size: 8px; font-weight: 700; letter-spacing: .12em; }
.letter-greeting { margin: 0 0 7px; font: 600 25px var(--hand); }
.letter-paper > p:not(.letter-date):not(.letter-greeting):not(.letter-signoff):not(.demo-caption) { color: #6f6258; font-size: 11px; line-height: 1.9; }
.letter-signoff { margin: 18px 0 0; color: #6f6258; font-size: 10px; }
.letter-signoff span { display: inline-block; margin-top: 3px; color: var(--rust); font: 600 25px var(--hand); }
.letter-paper .demo-caption { margin-top: 17px; text-align: left; }
.letter-side-note { position: absolute; right: 0; bottom: 60px; color: var(--rust); font: 600 21px/1.05 var(--hand); transform: rotate(5deg); }
.letter-side-note span { display: inline-block; padding-left: 22px; }

.music-section { overflow: hidden; padding: 94px 0 100px; background: #394332; color: #f8f1e7; }
.music-inner { display: grid; grid-template-columns: .78fr 1.22fr; align-items: center; gap: 9%; }
.music-copy .eyebrow { color: #e6c978; }
.music-copy h2 em { color: #e6c978; }
.music-copy > p:last-child { max-width: 300px; margin: 21px 0 0; color: #d0d0c3; font-size: 12px; line-height: 1.8; }
.music-player-card { position: relative; display: grid; grid-template-columns: 75px 1fr; gap: 22px; min-height: 280px; padding: 33px; border: 1px solid rgba(248,241,231,.28); background: rgba(248,241,231,.07); }
.record-art { position: relative; display: grid; width: 72px; height: 72px; place-items: center; }
.record-disc { display: grid; width: 100%; height: 100%; place-items: center; border-radius: 50%; background: repeating-radial-gradient(circle at 50% 50%, #2c3527 0 2px, #3b4634 2px 4px); box-shadow: inset 0 0 0 1px rgba(230,201,120,.35); animation: record-spin 9s linear infinite; }
.record-disc::after { width: 20px; height: 20px; border-radius: 50%; background: #e6c978; content: ''; }
.record-note { position: absolute; color: #394332; font: 14px var(--serif); }
.record-spark { position: absolute; top: -7px; right: -8px; color: #e6c978; font-size: 16px; animation: star-turn 9s linear infinite; }
@keyframes record-spin { to { transform: rotate(360deg); } }
.music-player-content { min-width: 0; }
.player-kicker { margin: 0 0 8px; color: #e6c978; font-size: 9px; font-weight: 700; letter-spacing: .14em; }
.music-player-card h3 { margin: 0; font: 500 26px/1.2 var(--serif); }
.music-player-card #player-hint { margin: 7px 0 17px; color: #d0d0c3; font-size: 11px; }
.spotify-form label { display: block; margin-bottom: 7px; color: #e8e2d8; font-size: 10px; font-weight: 600; }
.input-row { display: flex; gap: 8px; }
.input-row input { min-width: 0; flex: 1; height: 43px; padding: 0 12px; border: 1px solid rgba(248,241,231,.38); border-radius: 1px; background: rgba(25,31,23,.42); color: #fffaf1; font-size: 11px; }
.input-row input::placeholder { color: #c0c0b2; }
.input-row .button { min-height: 43px; padding-inline: 15px; background: #e6c978; color: #394332; }
.input-row .button:hover { background: #f2d98f; }
.spotify-form .form-error { margin-top: 7px; color: #ffc1ac; }
.save-message { min-height: 17px; margin: 4px 0 0; color: #e6c978; font-size: 10px; }
.spotify-embed { margin-top: 8px; }
.spotify-embed iframe { display: block; width: 100%; min-height: 152px; border: 0; border-radius: 8px; }
.music-sparkle { position: absolute; color: #e6c978; }
.sparkle-a { top: 18px; right: 21px; font-size: 19px; }
.sparkle-b { right: 24px; bottom: 23px; font-size: 28px; }

.closing-section { position: relative; overflow: hidden; padding-top: 88px; padding-bottom: 84px; text-align: center; }
.closing-section::before, .closing-section::after { position: absolute; top: 46%; width: 130px; height: 1px; background: linear-gradient(90deg, transparent, rgba(167,78,59,.45)); content: ''; }
.closing-section::before { left: 3%; transform: rotate(-14deg); } .closing-section::after { right: 3%; transform: rotate(14deg) scaleX(-1); }
.closing-rule { width: 54px; height: 1px; margin: 0 auto 23px; background: var(--rust); }
.closing-heart { margin: 0; color: var(--rust); font: 32px var(--serif); }
.closing-line { margin: 7px 0 6px; font: 500 clamp(32px, 4vw, 47px)/1.2 var(--serif); letter-spacing: -.04em; }
.closing-caption { margin: 0; color: var(--muted); font-size: 10px; }
.site-footer { display: flex; min-height: 76px; align-items: center; justify-content: space-between; padding: 12px max(48px, calc((100vw - 1320px) / 2)); border-top: 1px solid var(--line); }
.site-footer .wordmark { font-size: 13px; }
.site-footer p { margin: 0; color: #76695e; font-size: 10px; }
.site-footer p span { margin-left: 7px; color: var(--rust); }
.reveal { opacity: 0; transform: translateY(17px); transition: opacity .65s ease, transform .65s cubic-bezier(.2,.7,.2,1); }
.reveal.is-visible { opacity: 1; transform: translateY(0); }

/* — motion & scrapbook details — */
.tape-progress { position: fixed; z-index: 40; inset: 0 auto auto 0; width: 100%; height: 4px; background: repeating-linear-gradient(90deg, rgba(167,78,59,.9) 0 13px, rgba(233,201,121,.92) 13px 25px, rgba(138,154,91,.8) 25px 33px); transform: scaleX(0); transform-origin: 0 50%; pointer-events: none; }

.polaroid { animation: polaroid-in .95s cubic-bezier(.18,.85,.25,1.06) both .15s; transition: transform .5s cubic-bezier(.2,.7,.2,1), box-shadow .4s; }
.hero-photo:hover { transform: rotate(1.2deg) translateY(-6px); box-shadow: 10px 20px 30px rgba(54,38,27,.2); }
.hero-photo img { animation: photo-drift 22s ease-in-out infinite alternate; }
@keyframes polaroid-in { from { opacity: 0; transform: rotate(11deg) translateY(30px) scale(.95); } to { opacity: 1; transform: rotate(4deg); } }
@keyframes photo-drift { to { transform: scale(1.055) translateY(-7px); } }
.hero-sun { animation: sun-breathe 9s ease-in-out infinite alternate; }
@keyframes sun-breathe { to { transform: scale(1.07); opacity: .5; } }
.hero-sticker { animation: sticker-sway 6s ease-in-out infinite alternate; }
@keyframes sticker-sway { from { transform: rotate(6deg) translateY(0); } to { transform: rotate(12deg) translateY(-5px); } }
.hero-tape { animation: tape-shift 7s ease-in-out infinite alternate; }
@keyframes tape-shift { to { transform: rotate(-31deg) translateY(-5px); } }
.hand-note { animation: note-nudge 3.4s ease-in-out infinite; }
@keyframes note-nudge { 0%, 100% { transform: rotate(-4deg); } 50% { transform: rotate(-1deg) translateY(-3px); } }
.scroll-cue span:first-child { animation: cue-pulse 2.2s ease-in-out infinite; transform-origin: left center; }
@keyframes cue-pulse { 0%, 100% { transform: scaleX(1); } 50% { transform: scaleX(1.2); } }

.timeline::before { transform-origin: 50% 0; animation: line-grow 1.5s cubic-bezier(.3,.7,.3,1) .1s both; }
@keyframes line-grow { from { transform: scaleY(.15); opacity: 0; } to { transform: scaleY(1); opacity: 1; } }
.memory.reveal { transition: opacity .8s ease, transform .8s cubic-bezier(.18,.8,.25,1); }
.memory-left.reveal { transform: translateY(30px) rotate(-1.2deg); }
.memory-right.reveal { transform: translateY(30px) rotate(1.2deg); }
.memory.is-visible { transform: translateY(0) rotate(0); }
.memory-card { transition: transform .45s cubic-bezier(.2,.7,.2,1), box-shadow .45s; }
.memory-card:hover { transform: rotate(0deg) translateY(-5px); box-shadow: 9px 13px 0 rgba(50,40,32,.09); }
.memory-photo { transition: transform .5s cubic-bezier(.2,.7,.2,1), box-shadow .5s; }
.memory-photo::before { position: absolute; z-index: 2; top: -8px; left: 50%; width: 64px; height: 19px; background: rgba(242,216,133,.78); content: ''; transform: translateX(-50%) rotate(-4deg); }
.memory-photo:hover { transform: rotate(0deg) translateY(-5px); box-shadow: 8px 14px 24px rgba(54,38,27,.18); }
.memory-pin { animation: pin-wiggle 5s ease-in-out infinite; }
@keyframes pin-wiggle { 0%, 88%, 100% { transform: translate(-50%,-50%) rotate(0); } 92% { transform: translate(-50%,-50%) rotate(-13deg); } 96% { transform: translate(-50%,-50%) rotate(9deg); } }

.gallery-item { transition: transform .5s cubic-bezier(.2,.75,.2,1), box-shadow .5s; }
.gallery-item::before { position: absolute; z-index: 2; top: 6px; left: 50%; width: 62px; height: 17px; background: rgba(242,216,133,.85); content: ''; opacity: 0; transform: translateX(-50%) rotate(-3deg); transition: opacity .3s, top .35s; }
.gallery-item:hover { z-index: 3; transform: translateY(-7px) rotate(-.7deg); box-shadow: 0 20px 32px rgba(46,33,24,.18); }
.gallery-item:nth-child(even):hover { transform: translateY(-7px) rotate(.7deg); }
.gallery-item:hover::before { top: 10px; opacity: 1; }

.lightbox[open] { animation: lightbox-pop .4s cubic-bezier(.16,.9,.25,1.08) both; }
@keyframes lightbox-pop { from { opacity: 0; transform: translateY(18px) rotate(-1.6deg) scale(.96); } to { opacity: 1; transform: none; } }
.lightbox[open]::backdrop { animation: backdrop-in .35s ease both; }
@keyframes backdrop-in { from { opacity: 0; } to { opacity: 1; } }

.letter-decoration { animation: collage-sway 11s ease-in-out infinite alternate; }
@keyframes collage-sway { from { transform: rotate(-8.5deg) translateY(-3px); } to { transform: rotate(-5.5deg) translateY(5px); } }
.letter-paper::before { animation: tape-shift 6.5s ease-in-out infinite alternate; }
.letter-star { animation: orbit-float 5s ease-in-out infinite; }

.music-sparkle { animation: sparkle-twinkle 3.2s ease-in-out infinite; }
.sparkle-b { animation-delay: -1.6s; }
@keyframes sparkle-twinkle { 0%, 100% { opacity: .55; transform: scale(.9) rotate(0); } 50% { opacity: 1; transform: scale(1.12) rotate(14deg); } }
.music-player-card { transition: border-color .4s, background .4s; }
.music-player-card:hover { border-color: rgba(230,201,120,.55); background: rgba(248,241,231,.1); }

@keyframes unfold { from { opacity: 0; transform: translateY(-8px) scaleY(.95); transform-origin: top; } to { opacity: 1; transform: translateY(0) scaleY(1); } }

/* — editor — */
.gallery-label { pointer-events: none; }
body.is-editing .gallery-label { pointer-events: auto; }
.photo-edit-badge { position: absolute; z-index: 4; top: 8px; left: 8px; padding: 4px 9px; border-radius: 999px; background: rgba(50,40,32,.84); color: #fff8ee; font: 600 10px/1.2 var(--sans); letter-spacing: .06em; text-transform: uppercase; pointer-events: none; }
body.is-editing .gallery-open .photo-number { display: none; }

.editor-only { display: none !important; }
body.is-editing .editor-only { display: block !important; }
body.is-editing .editor-delete-inline { display: grid !important; }

.editor-delete { position: absolute; z-index: 6; top: 8px; right: 8px; display: grid; width: 28px; height: 28px; padding: 0; place-items: center; border: 0; border-radius: 50%; background: var(--rust); color: #fff8ee; font: 700 17px/1 var(--sans); cursor: pointer; box-shadow: 0 2px 8px rgba(0,0,0,.22); }
.editor-delete-inline { position: static; width: 20px; height: 20px; margin-left: 5px; vertical-align: middle; font-size: 14px; }

.editor-add-row { justify-content: center; margin-top: 26px; }
body.is-editing .editor-add-row { display: flex !important; }
.editor-add { display: inline-flex; min-height: 38px; align-items: center; padding: 0 15px; border: 1px dashed rgba(167,78,59,.7); border-radius: 999px; background: rgba(255,250,241,.75); color: var(--rust); font: 600 11px var(--sans); cursor: pointer; }
.editor-add:hover { background: #fffaf1; }
.letter-paragraph-add { margin-top: 12px; }
.editor-empty { padding: 20px; border: 1px dashed rgba(167,78,59,.45); color: var(--muted); font-size: 12px; text-align: center; }

body.is-editing [contenteditable="true"] { outline: 2px dashed rgba(167,78,59,.55); outline-offset: 3px; border-radius: 2px; cursor: text; }
body.is-editing .hero-photo, body.is-editing .memory-photo, body.is-editing .gallery-open { cursor: grab; touch-action: none; }
body.is-editing.is-panning-photo, body.is-editing.is-panning-photo * { cursor: grabbing !important; user-select: none; }
body.is-editing .hero-photo img, body.is-editing .memory-photo img, body.is-editing .gallery-open img { user-select: none; -webkit-user-drag: none; }
body.is-editing .letter-paper { animation: none; }

.editor-bar { position: fixed; z-index: 60; right: 16px; bottom: 16px; display: flex; max-width: calc(100% - 32px); flex-wrap: wrap; align-items: center; gap: 9px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 14px; background: rgba(252,249,243,.95); box-shadow: 0 12px 32px rgba(54,38,27,.2); backdrop-filter: blur(8px); }
.editor-status { margin-right: 8px; color: var(--muted); font-size: 11px; }
.editor-btn { min-height: 38px; padding-inline: 15px; font-size: 10px; }
.editor-bar .editor-save { background: var(--rust); color: #fff8ee; }
.editor-bar .editor-cancel { background: transparent; border-color: rgba(67,48,36,.3); }
.editor-toast { position: fixed; z-index: 70; bottom: 78px; left: 50%; max-width: min(90vw, 460px); padding: 10px 16px; border-radius: 999px; background: #2f2a24; color: #fff8ee; font-size: 11px; text-align: center; transform: translateX(-50%); box-shadow: 0 10px 28px rgba(0,0,0,.25); }
.editor-toast.is-error { background: #8e2f28; }

@media (max-width: 860px) {
  .section-wrap { width: min(100% - 52px, 700px); }
  .site-header { height: 68px; padding-inline: 26px; }
  .header-note { display: none; }
  .hero { min-height: 580px; grid-template-columns: 1fr .85fr; }
  .hero h1 { font-size: clamp(53px, 8vw, 76px); }
  .hero-art { min-height: 390px; }
  .hero-photo img { height: 290px; }
  .hero-photo .photo-placeholder { height: 290px; }
  .hero-sun { width: 230px; height: 230px; }
  .hero-sticker { right: -9px; width: 76px; height: 76px; font-size: 8px; }
  .memory { gap: 35px; }
  .memory-card { padding: 23px 24px; }
  .memory-card h3 { font-size: 23px; }
  .memory-photo img { height: 145px; }
  .memory-photo .photo-placeholder { height: 145px; }
  .music-inner { grid-template-columns: .65fr 1.35fr; gap: 5%; }
  .music-player-card { grid-template-columns: 54px 1fr; gap: 15px; padding: 26px 22px; }
  .record-art { width: 54px; height: 54px; }
  .record-disc::after { width: 15px; height: 15px; }
  .record-note { font-size: 11px; }
}

@media (max-width: 620px) {
  html { scroll-padding-top: 68px; }
  .section-wrap { width: calc(100% - 38px); }
  .site-header { height: 64px; padding-inline: 19px; }
  .wordmark { gap: 7px; font-size: 13px; }
  .wordmark-icon { width: 24px; height: 24px; font-size: 12px; }
  .main-nav { gap: 14px; }
  .main-nav a { font-size: 9px; }
  .hero { min-height: auto; grid-template-columns: 1fr; gap: 8px; padding-top: 72px; padding-bottom: 88px; }
  .hero-copy { padding-bottom: 0; }
  .hero .eyebrow { margin-bottom: 15px; font-size: 9px; }
  .hero h1 { font-size: clamp(53px, 13.5vw, 78px); }
  .hero-intro { max-width: 360px; margin: 20px 0; font-size: 13px; }
  .hero-footnote { margin-top: 26px; }
  .hero-art { min-height: 390px; margin-top: 7px; }
  .polaroid { width: min(66%, 270px); padding: 10px 10px 48px; }
  .hero-photo img { height: 275px; }
  .hero-photo .photo-placeholder { height: 275px; }
  .hero-photo p { bottom: 9px; font-size: 22px; }
  .hero-sun { top: 30px; right: 11%; width: 235px; height: 235px; }
  .hero-tape { top: 53px; left: 17%; width: 81px; height: 21px; }
  .hero-sticker { top: 54px; right: 6%; width: 71px; height: 71px; }
  .hero-ticket { bottom: 61px; left: 0; width: 157px; min-height: 78px; padding: 10px 13px; }
  .hero-ticket strong { font-size: 17px; }
  .hero-orbit.orbit-one { top: 25px; left: 2%; }
  .scribble { right: 12%; bottom: 36px; font-size: 49px; }
  .photo-caption { right: 0; bottom: -3px; }
  .scroll-cue { bottom: 25px; font-size: 8px; }
  .intro-strip { min-height: 58px; flex-wrap: wrap; gap: 5px 12px; padding: 11px 14px; font-size: 8px; }
  .intro-strip span:nth-of-type(3), .intro-strip span:nth-of-type(4) { display: none; }
  .story-section { padding-top: 82px; padding-bottom: 88px; }
  .section-heading { display: block; margin-bottom: 38px; }
  h2 { font-size: clamp(42px, 11vw, 58px); }
  .section-aside { max-width: 340px; margin-top: 17px; font-size: 11px; }
  .timeline { gap: 34px; margin-left: 9px; }
  .timeline::before { left: 12px; }
  .memory { display: flex; flex-direction: column; align-items: stretch; gap: 15px; padding-left: 42px; }
  .memory-pin { top: 20px; left: 12px; width: 26px; height: 26px; font-size: 12px; transform: translate(-50%,0); }
  .memory-card { width: 100%; min-height: 180px; padding: 23px 24px; }
  .memory-card h3 { font-size: 23px; }
  .memory-photo { align-self: flex-end; width: 72%; margin-right: 2px; }
  .memory-photo img { height: 130px; }
  .memory-photo .photo-placeholder { height: 130px; }
  .memory-right .memory-photo { order: 2; }
  .memory-right .memory-card { order: 1; }
  .demo-caption { font-size: 9px; }
  .gallery-section { padding: 80px 0 84px; }
  .gallery-grid { grid-template-columns: repeat(2, 1fr); grid-auto-rows: 145px; gap: 9px; }
  .gallery-tall { grid-row: span 2; }
  .gallery-wide { grid-column: span 1; grid-row: span 1; }
  .gallery-square { grid-row: span 1; }
  .gallery-label { right: 9px; bottom: 8px; left: 9px; font-size: 9px; }
  .photo-number { top: 8px; left: 9px; font-size: 8px; }
  .letter-section { min-height: 0; grid-template-columns: 1fr; gap: 37px; padding-top: 76px; padding-bottom: 91px; }
  .letter-decoration { width: min(75%, 290px); height: 260px; justify-self: center; }
  .letter-flower { font-size: 75px; }
  .letter-loop { top: 27px; right: 42px; font-size: 40px; }
  .letter-star { bottom: 28px; left: 39px; font-size: 25px; }
  .letter-copy .section-aside { max-width: 330px; }
  .letter-paper { padding: 25px 22px 22px; }
  .letter-side-note { right: 0; bottom: 24px; font-size: 17px; }
  .music-section { padding: 76px 0 79px; }
  .music-inner { grid-template-columns: 1fr; gap: 28px; }
  .music-copy > p:last-child { margin-top: 14px; }
  .music-player-card { grid-template-columns: 43px 1fr; gap: 12px; padding: 23px 16px; }
  .record-art { width: 43px; height: 43px; }
  .record-disc::after { width: 13px; height: 13px; }
  .record-note { font-size: 10px; }
  .record-spark { top: -5px; right: -5px; font-size: 11px; }
  .music-player-card h3 { font-size: 22px; }
  .input-row { flex-direction: column; }
  .input-row .button { align-self: flex-start; }
  .closing-section { padding-top: 65px; padding-bottom: 66px; }
  .closing-caption { max-width: 290px; margin-inline: auto; }
  .site-footer { min-height: 70px; flex-wrap: wrap; gap: 8px 15px; padding: 13px 19px; }
  .site-footer .wordmark { font-size: 11px; }
  .site-footer p { order: 2; width: 100%; text-align: center; }

}

@media (max-width: 620px) {
  .editor-bar { right: 10px; bottom: 10px; left: 10px; max-width: none; }
  .editor-status { width: 100%; margin: 0; }
  .editor-btn { flex: 1; }
  .editor-toast { bottom: 126px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .reveal { opacity: 1; transform: none; }
  .hero-photo img { animation: none !important; }
}
