:root {
    --paper: #f7f3ed;
    --paper-2: #efe9e1;
    --ink: #191817;
    --muted: #6d6862;
    --line: rgba(25, 24, 23, .16);
    --rose: #a86f78;
    --blue-paper: #dce8ed;
    --dark: #171514;
    --white: #fffdf9;
    --sans: "Manrope", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    --display: "Manrope", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    --mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
    --devanagari: "Noto Sans Devanagari", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; background: var(--paper); }
body {
    margin: 0;
    background: var(--paper);
    color: var(--ink);
    font-family: var(--sans);
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}
body:not(.story-unlocked) { overflow: hidden; }
button, input { font: inherit; }
button { color: inherit; }
img { display: block; max-width: 100%; }
.story[hidden] { display: none !important; }

/* Gate */
.gate {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: var(--paper);
    color: var(--ink);
    transition: opacity .7s ease, visibility .7s ease;
}
.gate.is-leaving { opacity: 0; visibility: hidden; pointer-events: none; }
.gate-stage {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    padding: max(28px, env(safe-area-inset-top)) 24px max(28px, env(safe-area-inset-bottom));
    opacity: 0;
    visibility: hidden;
    transform: translateY(7px);
    transition: opacity .28s ease, transform .28s ease, visibility .28s;
}
.gate-stage.is-active { opacity: 1; visibility: visible; transform: translateY(0); }
.gate-copy { width: min(100%, 520px); text-align: center; }
.gate-nepali {
    margin: 0 0 12px;
    font-family: var(--devanagari);
    font-size: clamp(30px, 9vw, 54px);
    line-height: 1.28;
    font-weight: 500;
}
.gate-pass { margin: 0; font-size: clamp(28px, 8vw, 48px); letter-spacing: -.04em; }
.gate-sub, .gate-label { color: var(--muted); font-size: 14px; letter-spacing: .01em; }
.gate-label { margin: 0 0 28px; color: var(--ink); }
.text-button {
    appearance: none;
    border: 0;
    border-bottom: 1px solid currentColor;
    padding: 7px 0 4px;
    margin-top: 30px;
    background: transparent;
    cursor: pointer;
}
.gate-copy--form input {
    width: min(100%, 300px);
    display: block;
    margin: 0 auto;
    padding: 14px 4px 11px;
    border: 0;
    border-bottom: 1px solid var(--ink);
    border-radius: 0;
    outline: none;
    background: transparent;
    color: var(--ink);
    text-align: center;
    font-size: 19px;
}
.math-question {
    margin: 0 0 20px;
    font-size: clamp(46px, 14vw, 82px);
    line-height: 1;
    letter-spacing: -.05em;
    font-weight: 500;
}
.math-question--equation { font-size: clamp(38px, 11vw, 68px); }
.age-options, .silly-options {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    width: min(100%, 360px);
    margin: 0 auto;
}
.age-options button, .silly-options button {
    min-height: 54px;
    border: 1px solid var(--line);
    border-radius: 0;
    background: transparent;
    cursor: pointer;
}
.age-options button:hover, .silly-options button:hover { border-color: var(--ink); }
.silly-options { grid-template-columns: 1fr; }
.ridiculous-question {
    margin: 0 auto 26px;
    max-width: 560px;
    font-size: clamp(23px, 7vw, 38px);
    line-height: 1.12;
    letter-spacing: -.035em;
}
.gate-feedback { min-height: 22px; margin: 16px 0 0; color: var(--rose); font-size: 13px; }
.gate-escape {
    position: absolute;
    top: max(5px, env(safe-area-inset-top));
    right: max(5px, env(safe-area-inset-right));
    z-index: 4;
    width: 54px;
    height: 54px;
    padding: 0;
    border: 0;
    background: transparent;
    cursor: default;
}
.gate-escape span { position: absolute; right: 7px; top: 1px; color: rgba(33,29,27,.24); font-size: 16px; }

/* Shared story primitives */
.story { position: relative; background: var(--paper); }
.moment { position: relative; width: 100%; overflow: hidden; }
.folio-year {
    display: block;
    margin-bottom: 14px;
    font-family: var(--devanagari);
    font-size: 13px;
    letter-spacing: .12em;
    color: var(--muted);
}
.era-rail {
    position: fixed;
    z-index: 50;
    top: max(12px, env(safe-area-inset-top));
    left: 12px;
    color: rgba(33,29,27,.55);
    font-family: var(--devanagari);
    font-size: 11px;
    letter-spacing: .08em;
    pointer-events: none;
    mix-blend-mode: multiply;
    transition: opacity .2s ease;
}
.story-media { width: 100%; height: 100%; object-fit: cover; }
.media-placeholder {
    display: grid;
    place-items: center;
    min-height: 100%;
    border: 1px solid rgba(33,29,27,.22);
    background: rgba(255,255,255,.25);
    color: rgba(33,29,27,.55);
    text-align: center;
    padding: 14px;
}
.media-placeholder span { font-size: 10px; letter-spacing: .08em; text-transform: uppercase; overflow-wrap: anywhere; }
.reveal { opacity: 0; transform: translateY(16px); transition: opacity .72s ease, transform .72s cubic-bezier(.2,.75,.2,1); }
.reveal.is-visible { opacity: 1; transform: none; }

/* Opening */
.moment--opening {
    min-height: 100svh;
    display: grid;
    place-items: center;
    padding: 72px 28px 56px;
}
.opening-word { width: min(100%, 820px); }
.opening-word h1 {
    margin: 0;
    font-family: var(--sans);
    font-size: clamp(48px, 14vw, 102px);
    font-weight: 500;
    line-height: 1.02;
    letter-spacing: -.055em;
}
.archive-stamp {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    margin-top: 34px;
    padding-top: 12px;
    border-top: 1px solid var(--line);
    font-size: 9px;
    letter-spacing: .18em;
}
.archive-stamp span:last-child { font-family: var(--devanagari); font-size: 11px; }
.opening-index { position: absolute; right: 18px; bottom: 18px; color: var(--muted); font-size: 9px; letter-spacing: .14em; }
.scroll-mark { position: absolute; left: 28px; bottom: 24px; width: 1px; height: 42px; background: var(--line); overflow: hidden; }
.scroll-mark span { display: block; width: 1px; height: 14px; background: var(--ink); animation: scrollMark 1.8s ease-in-out infinite; }
@keyframes scrollMark { 0% { transform: translateY(-16px); } 60%,100% { transform: translateY(44px); } }


/* Don aayo don — first media moment */
.moment--don {
    min-height: 112svh;
    display: grid;
    align-items: center;
    padding: 72px 18px 88px;
    background: var(--paper-2);
}
.don-wrap { width: 100%; }
.don-media {
    width: min(88vw, 520px);
    height: min(68svh, 700px);
    min-height: 390px;
    margin: 0 auto;
    overflow: hidden;
    background: #ddd5cc;
}
.don-media > .story-media,
.don-media > .media-placeholder,
.don-media > video { width: 100%; height: 100%; object-fit: cover; }
.story-video { display: block; border: 0; }
.don-title {
    width: min(88vw, 760px);
    margin: 22px auto 0;
    font-size: clamp(60px, 19vw, 132px);
    line-height: .84;
    letter-spacing: -.075em;
    font-weight: 500;
}

/* The deliberate lie: "Some photos are beautiful." + a bad photo */
.moment--irony {
    min-height: 110svh;
    padding: 100px 20px 90px;
    display: grid;
    align-content: center;
    background: var(--paper);
}
.irony-line {
    width: min(88vw, 760px);
    margin: 0 auto 38px;
    font-size: clamp(44px, 13vw, 94px);
    line-height: .91;
    letter-spacing: -.065em;
}
.irony-photo {
    display: block;
    width: min(76vw, 430px);
    aspect-ratio: 4 / 5;
    margin: 0 auto;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    overflow: hidden;
    cursor: zoom-in;
}
.irony-note {
    width: min(76vw, 430px);
    margin: 9px auto 0;
    color: var(--muted);
    font-size: 9px;
    letter-spacing: .12em;
    text-transform: uppercase;
}

/* More bad evidence */
.moment--bad-more {
    min-height: 118svh;
    padding: 92px 12px 100px;
    background: #e4d6ce;
    color: var(--ink);
}
.bad-more-head {
    width: min(92vw, 840px);
    margin: 0 auto 46px;
}
.bad-more-head h2 {
    margin: 0;
    font-size: clamp(38px, 10.5vw, 78px);
    line-height: .95;
    letter-spacing: -.058em;
    font-weight: 500;
}
.bad-more-head p {
    margin: 18px 0 0;
    color: rgba(255,255,255,.56);
    font-size: 12px;
    letter-spacing: .08em;
    text-transform: uppercase;
}
.bad-more-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0,1fr));
    gap: 7px;
    width: 100%;
}
.bad-more-photo {
    display: block;
    min-width: 0;
    aspect-ratio: 3 / 4;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    overflow: hidden;
    cursor: zoom-in;
}
.bad-more-photo:nth-child(2) { transform: translateY(24px); }
.bad-more-photo:nth-child(3) { transform: translateY(-10px); }
.bad-more-photo:nth-child(4) { transform: translateY(14px); }

/* First evidence */
.moment--first { min-height: 100svh; padding: 90px 24px; display: grid; align-items: center; }
.first-evidence { width: 100%; }
.first-photo { width: 54vw; max-width: 250px; margin: 0 auto; }
.first-photo > .story-media, .first-photo > .media-placeholder { aspect-ratio: 4 / 5; }
.first-photo figcaption { margin-top: 8px; font-size: 7px; letter-spacing: .12em; color: var(--muted); }
.first-copy { width: min(86vw, 520px); margin: 54px auto 0; }
.first-copy h2 { margin: 0; font-size: clamp(30px, 9vw, 52px); line-height: 1.04; letter-spacing: -.045em; font-weight: 500; }

/* Beautiful / history contrast */
.moment--beautiful { min-height: 100svh; background: #e4d6ce; }
.full-photo { position: absolute; inset: 0; }
.overlay-line {
    position: absolute;
    z-index: 2;
    left: 24px;
    right: 24px;
    bottom: max(34px, env(safe-area-inset-bottom));
    margin: 0;
    max-width: 620px;
    font-size: clamp(34px, 10vw, 68px);
    line-height: .98;
    letter-spacing: -.05em;
    font-weight: 500;
}
.overlay-line--light { color: var(--white); text-shadow: 0 2px 22px rgba(0,0,0,.28); }
.moment--history { min-height: 100svh; padding: 90px 24px; display: grid; align-items: center; }
.history-wrap { width: 100%; }
.history-line { width: min(100%, 620px); margin: 0 0 42px; font-size: clamp(30px, 8vw, 52px); line-height: 1.04; letter-spacing: -.045em; }
.history-photo { width: min(78vw, 430px); aspect-ratio: 4 / 5; margin-left: auto; }
.history-meta { display: block; width: min(78vw, 430px); margin: 8px 0 0 auto; font-size: 7px; letter-spacing: .12em; color: var(--muted); }

/* Pair swaps */
.moment--pairs { padding: 100px 20px 120px; background: var(--paper-2); }
.pairs-intro { width: min(100%, 620px); margin: 0 auto 52px; }
.pairs-intro h2 { margin: 0; font-size: clamp(42px, 12vw, 78px); line-height: .98; letter-spacing: -.055em; font-weight: 500; }
.pairs-intro p { margin: 14px 0 0; color: var(--muted); font-size: 11px; letter-spacing: .08em; }
.pairs-grid { display: grid; gap: 56px; width: 100%; }
.photo-pair {
    position: relative;
    width: min(84vw, 440px);
    aspect-ratio: 4 / 5;
    margin: 0 auto;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    cursor: pointer;
    overflow: visible;
}
.pair-image { position: absolute; inset: 0; transition: opacity .32s ease, transform .32s ease; }
.pair-image--bad { opacity: 0; transform: scale(.985); }
.photo-pair.is-bad .pair-image--good { opacity: 0; transform: scale(.985); }
.photo-pair.is-bad .pair-image--bad { opacity: 1; transform: scale(1); }
.pair-caption { position: absolute; left: 0; bottom: -25px; font-size: 10px; letter-spacing: .08em; }
.pair-tap { position: absolute; right: 0; bottom: -25px; color: var(--muted); font-size: 9px; letter-spacing: .1em; }
.pairs-after { margin: 90px auto 0; width: min(100%, 620px); font-size: clamp(44px, 13vw, 86px); line-height: .92; letter-spacing: -.06em; }

/* Develop */
.moment--develop { min-height: 100svh; padding: 90px 20px 70px; display: grid; align-content: center; gap: 36px; background: #e8e0d6; }
.develop-copy { width: min(100%, 520px); margin: 0 auto; }
.develop-copy h2 { margin: 0; font-size: clamp(30px, 8vw, 48px); line-height: 1.02; letter-spacing: -.04em; font-weight: 500; }
.develop-photo {
    position: relative;
    display: block;
    width: min(86vw, 480px);
    aspect-ratio: 4 / 5;
    margin: 0 auto;
    padding: 0;
    border: 0;
    background: #c8bfb4;
    overflow: hidden;
    cursor: pointer;
    -webkit-touch-callout: none;
    user-select: none;
}
.develop-image { position: absolute; inset: 0; filter: grayscale(.9) blur(5px) contrast(.75); transform: scale(1.025); transition: filter .75s ease, transform .75s ease; }
.develop-veil { position: absolute; inset: 0; background: rgba(80,67,56,.55); mix-blend-mode: multiply; transition: opacity .75s ease; }
.develop-hint { position: absolute; left: 16px; bottom: 14px; z-index: 3; color: white; font-size: 9px; letter-spacing: .16em; text-transform: uppercase; }
.develop-photo.is-developed .develop-image { filter: none; transform: scale(1); }
.develop-photo.is-developed .develop-veil { opacity: 0; }
.develop-photo.is-developed .develop-hint { opacity: .15; }

/* Film */
.moment--film { padding: 110px 14px; background: #dcd1c7; color: var(--ink); }
.film-head { padding: 0 10px; margin-bottom: 46px; }
.film-head .folio-year { color: rgba(255,255,255,.5); }
.film-head h2 { margin: 0; max-width: 650px; font-size: clamp(34px, 9vw, 60px); line-height: 1; letter-spacing: -.045em; font-weight: 500; }
.film-strip { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 10px 8px; }
.film-frame { margin: 0; }
.film-frame > .story-media, .film-frame > .media-placeholder { aspect-ratio: 3 / 4; }
.film-frame figcaption { display: flex; justify-content: space-between; gap: 8px; padding-top: 6px; font-size: 8px; letter-spacing: .1em; color: rgba(255,255,255,.48); }
.film-frame em { color: var(--white); font-style: normal; }
.film-frame.is-chosen > .story-media, .film-frame.is-chosen > .media-placeholder { outline: 1px solid var(--white); outline-offset: 3px; }

/* Quality */
.moment--quality { min-height: 120svh; padding: 100px 20px; display: grid; align-items: center; }
.quality-grid { display: grid; gap: 42px; width: 100%; }
.quality-old { width: 46vw; max-width: 220px; margin: 0; }
.quality-old > .story-media, .quality-old > .media-placeholder { aspect-ratio: 4 / 5; }
.quality-new { width: 78vw; max-width: 430px; margin: 0 0 0 auto; }
.quality-new > .story-media, .quality-new > .media-placeholder { aspect-ratio: 4 / 5; }
.quality-old figcaption, .quality-new figcaption { margin-top: 7px; font-size: 8px; color: var(--muted); letter-spacing: .1em; }
.quality-copy { width: min(92vw, 610px); margin: 0 auto; }
.quality-copy h2 { margin: 0 0 12px; font-size: clamp(42px, 12vw, 84px); line-height: .92; letter-spacing: -.06em; font-weight: 500; }
.quality-copy p { margin: 0; font-size: clamp(20px, 5.5vw, 30px); letter-spacing: -.025em; }

/* Quantity escalation */
.moment--count { padding: 70px 18px 120px; background: var(--paper-2); }
.count-beat { min-height: 92svh; display: grid; align-content: center; gap: 30px; }
.count-copy { margin: 0; font-size: clamp(40px, 12vw, 78px); line-height: .94; letter-spacing: -.055em; }
.count-photo { display: block; padding: 0; border: 0; background: transparent; cursor: zoom-in; aspect-ratio: 4 / 5; overflow: hidden; }
.count-photo--single { width: min(74vw, 380px); margin-left: auto; }
.count-grid { display: grid; gap: 8px; }
.count-grid--two { grid-template-columns: repeat(2, minmax(0,1fr)); }
.count-grid--four { grid-template-columns: repeat(2, minmax(0,1fr)); }
.count-grid--two .count-photo:nth-child(2) { margin-top: 42px; }
.count-grid--four .count-photo:nth-child(2), .count-grid--four .count-photo:nth-child(4) { transform: translateY(24px); }

/* Contact sheet */
.moment--wall { padding: 92px 10px 36px; background: #eee7de; }
.wall-head { padding: 0 10px; margin-bottom: 38px; }
.wall-head h2 { margin: 0; max-width: 760px; font-size: clamp(38px, 10vw, 68px); line-height: .95; letter-spacing: -.055em; font-weight: 500; }
.contact-sheet { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 5px; }
.contact-frame { position: relative; padding: 0; border: 0; background: transparent; cursor: zoom-in; }
.contact-image { display: block; aspect-ratio: 3 / 4; overflow: hidden; }
.contact-id { display: block; padding: 4px 1px 2px; color: var(--muted); font-size: 7px; letter-spacing: .08em; text-align: left; }
.moment--after-wall { min-height: 100svh; display: grid; place-items: center; padding: 70px 24px; }
.after-wall-line { margin: 0; max-width: 760px; font-size: clamp(48px, 14vw, 96px); line-height: .91; letter-spacing: -.065em; }

/* Approved / mine */
.moment--approved { background: var(--paper-2); }
.selection-block { padding: 90px 18px 110px; }
.selection-block h2 { margin: 0 0 42px; font-size: clamp(38px, 10vw, 70px); line-height: .96; letter-spacing: -.055em; font-weight: 500; }
.approved-grid { display: grid; gap: 18px; }
.approved-photo, .mine-photo { padding: 0; border: 0; background: transparent; cursor: zoom-in; overflow: hidden; }
.approved-photo--one { width: 86%; aspect-ratio: 4 / 5; }
.approved-photo--two { width: 68%; aspect-ratio: 3 / 4; margin-left: auto; }
.anyway-beat { min-height: 75svh; display: grid; place-items: center; background: var(--paper); padding: 40px 24px; }
.anyway-beat p { margin: 0; font-size: clamp(64px, 22vw, 150px); line-height: .9; letter-spacing: -.07em; }
.mine-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 7px; }
.mine-photo { aspect-ratio: 3 / 4; }
.mine-photo:nth-child(3n+2) { transform: translateY(22px); }

/* Present */
.moment--present { min-height: 180svh; background: #e9e0d7; color: var(--ink); }
.present-photo { position: sticky; top: 0; width: 100%; height: 100svh; }
.present-photo::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to bottom, transparent 45%, rgba(0,0,0,.55)); pointer-events: none; }
.present-copy { position: relative; z-index: 3; margin-top: -92svh; min-height: 172svh; padding: 58svh 24px 18svh; display: flex; flex-direction: column; justify-content: flex-end; gap: 46px; }
.present-copy .folio-year { color: rgba(255,255,255,.7); }
.present-line { margin: 0; max-width: 780px; font-size: clamp(48px, 14vw, 96px); line-height: .92; letter-spacing: -.06em; }
.present-line--soft { color: rgba(255,255,255,.82); font-size: clamp(34px, 9vw, 64px); }
.present-line--last { font-size: clamp(30px, 8vw, 58px); }

/* Birthday */
.moment--birthday { min-height: 100svh; display: grid; place-items: center; padding: 80px 22px; background: var(--paper); }
.birthday-inner { width: min(100%, 900px); }
.birthday-number { font-family: var(--devanagari); font-size: clamp(120px, 45vw, 420px); line-height: .7; letter-spacing: -.08em; color: var(--rose); }
.birthday-inner h2 { margin: 54px 0 0; font-size: clamp(42px, 11vw, 88px); line-height: .95; letter-spacing: -.055em; font-weight: 500; }
.birthday-message { margin: 42px 0 0; max-width: 650px; font-size: clamp(19px, 5vw, 28px); line-height: 1.3; letter-spacing: -.02em; color: #4b4440; }
.birthday-signoff { margin: 70px 0 0; font-size: clamp(34px, 9vw, 64px); line-height: 1; letter-spacing: -.045em; }

/* End */
.moment--end { min-height: 100svh; padding: 80px 20px 34px; display: flex; flex-direction: column; justify-content: center; }
.end-photo { width: min(82vw, 520px); aspect-ratio: 4 / 5; margin: auto; }
.end-note { margin: 18px auto 0; width: min(82vw, 520px); color: var(--muted); font-size: 8px; letter-spacing: .1em; }

/* Lightbox */
.lightbox { position: fixed; inset: 0; z-index: 9998; display: grid; place-items: center; padding: 44px 14px 20px; background: rgba(20,18,17,.95); opacity: 0; visibility: hidden; pointer-events: none; transition: opacity .2s ease, visibility .2s; }
.lightbox.is-open { opacity: 1; visibility: visible; pointer-events: auto; }
.lightbox-stage { max-width: min(94vw, 880px); max-height: 86svh; }
.lightbox-stage img { width: auto; max-width: 100%; height: auto; max-height: 86svh; object-fit: contain; margin: auto; }
.lightbox-stage .media-placeholder { width: min(84vw, 520px); height: 65svh; color: white; border-color: rgba(255,255,255,.3); }
.lightbox-close { position: absolute; top: max(10px, env(safe-area-inset-top)); right: max(14px, env(safe-area-inset-right)); width: 34px; height: 34px; border: 0; background: transparent; color: white; font-size: 28px; font-weight: 300; cursor: pointer; }

@media (min-width: 720px) {
    .era-rail { left: 22px; top: 20px; font-size: 12px; }
    .moment--opening { padding: 90px 7vw 70px; }
    .archive-stamp { max-width: 820px; }
    .first-evidence { display: grid; grid-template-columns: minmax(220px, .75fr) 1.25fr; align-items: end; gap: 8vw; width: min(86vw, 1050px); margin: auto; }
    .first-photo { width: 100%; max-width: 360px; margin: 0; }
    .first-copy { width: 100%; margin: 0 0 8%; }
    .history-wrap { width: min(86vw, 1000px); margin: auto; display: grid; grid-template-columns: 1fr 1fr; gap: 8vw; align-items: center; }
    .history-line { margin: 0; }
    .history-photo { width: 100%; max-width: 430px; }
    .history-meta { grid-column: 2; width: 100%; }
    .pairs-grid { width: min(92vw, 1200px); margin: auto; grid-template-columns: repeat(3,1fr); gap: 24px; }
    .photo-pair { width: 100%; }
    .pairs-after { margin-top: 130px; }
    .moment--develop { grid-template-columns: .8fr 1.2fr; align-items: center; gap: 7vw; padding: 100px 8vw; }
    .develop-copy { margin: 0; }
    .develop-photo { width: min(40vw, 520px); margin: 0; }
    .film-strip { grid-template-columns: repeat(5,minmax(0,1fr)); gap: 16px 10px; }
    .quality-grid { width: min(90vw, 1150px); margin: auto; grid-template-columns: .55fr 1fr 1.05fr; align-items: center; gap: 5vw; }
    .quality-old, .quality-new { width: 100%; margin: 0; }
    .quality-copy { width: 100%; }
    .count-beat { width: min(88vw, 1080px); margin: auto; grid-template-columns: .75fr 1.25fr; align-items: center; gap: 8vw; }
    .count-photo--single { width: min(36vw, 420px); margin: 0 0 0 auto; }
    .contact-sheet { grid-template-columns: repeat(6,minmax(0,1fr)); gap: 8px; }
    .wall-head { width: min(92vw, 1180px); margin-left: auto; margin-right: auto; }
    .selection-block { padding-left: 7vw; padding-right: 7vw; }
    .approved-grid { grid-template-columns: 1.15fr .85fr; align-items: end; gap: 3vw; }
    .approved-photo--one, .approved-photo--two { width: 100%; }
    .mine-grid { grid-template-columns: repeat(3,minmax(0,1fr)); gap: 12px; }
    .present-copy { padding-left: 8vw; padding-right: 8vw; }
    .birthday-inner { padding: 0 3vw; }
}


@media (min-width: 720px) {
    .moment--don { padding-left: 7vw; padding-right: 7vw; }
    .don-wrap { width: min(90vw, 1120px); margin: auto; display: grid; grid-template-columns: .9fr 1.1fr; gap: 6vw; align-items: end; }
    .don-media { width: 100%; height: min(76vh, 760px); margin: 0; }
    .don-title { width: 100%; margin: 0 0 7%; }
    .moment--irony { grid-template-columns: 1fr 1fr; align-items: center; column-gap: 7vw; padding-left: 8vw; padding-right: 8vw; }
    .irony-line { width: 100%; margin: 0; }
    .irony-photo { width: min(38vw, 480px); margin: 0; }
    .irony-note { grid-column: 2; width: min(38vw, 480px); margin: 9px 0 0; }
    .bad-more-head { width: min(90vw, 1120px); }
    .bad-more-grid { width: min(90vw, 1120px); margin: auto; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 12px; }
    .bad-more-photo:nth-child(2) { transform: translateY(46px); }
    .bad-more-photo:nth-child(3) { transform: translateY(-18px); }
    .bad-more-photo:nth-child(4) { transform: translateY(24px); }
}

@media (min-width: 1100px) {
    .moment--opening { min-height: 100vh; }
    .opening-word h1 { font-size: clamp(82px, 8vw, 128px); }
    .moment--beautiful { min-height: 110vh; }
    .full-photo { left: 12vw; right: 0; }
    .overlay-line { left: 6vw; bottom: 9vh; }
    .moment--pairs { padding-top: 140px; padding-bottom: 160px; }
    .film-head { width: min(92vw, 1200px); margin-left: auto; margin-right: auto; }
    .film-window { width: min(92vw, 1200px); margin: auto; }
    .moment--wall { padding-left: 3vw; padding-right: 3vw; }
    .contact-sheet { grid-template-columns: repeat(10,minmax(0,1fr)); }
    .approved-grid { width: min(84vw, 1080px); }
    .mine-grid { width: min(92vw, 1250px); }
    .moment--end { padding-top: 100px; padding-bottom: 55px; }
}

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


/* =========================================================
   v2.3 — camera-roll opening, no chronological navigation,
   lighter photo-book palette
   ========================================================= */

/* The story is no longer organised by year. */
.folio-year,
.era-rail { display: none !important; }

/* Editorial display type: character without turning the page into a "brand". */
.opening-word h1,
.don-title,
.irony-line,
.bad-more-head h2,
.pairs-intro h2,
.pairs-after,
.develop-copy h2,
.film-head h2,
.quality-copy h2,
.count-copy,
.wall-head h2,
.after-wall-line,
.selection-block h2,
.anyway-beat p,
.present-line,
.birthday-inner h2,
.birthday-signoff {
    font-family: var(--display);
    font-weight: 400;
}

/* Opening: quick camera-roll burst on top, paper copy below. */
.moment--opening {
    min-height: 100svh;
    display: flex;
    align-items: flex-end;
    padding: 0;
    background: #f3ece3;
    overflow: hidden;
}
.opening-flash {
    position: absolute;
    inset: 0 0 auto 0;
    height: 58svh;
    overflow: hidden;
    background: #d9cec3;
    border-bottom: 1px solid var(--line);
}
.opening-flash-frame {
    position: absolute;
    inset: 0;
    margin: 0;
    opacity: 0;
    visibility: hidden;
    background: #d9cec3;
    transition: opacity 55ms linear;
}
.opening-flash-frame.is-active {
    opacity: 1;
    visibility: visible;
}
.opening-flash-frame img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
}
.opening-flash-frame:nth-child(5n+2) {
    padding: 3.5vh 6vw;
    background: #e8ded4;
}
.opening-flash-frame:nth-child(5n+2) img { object-fit: contain; }
.opening-flash-frame:nth-child(5n+3) img { object-position: 34% center; }
.opening-flash-frame:nth-child(5n+4) {
    padding: 0 15vw 7vh 0;
    background: #d7c7be;
}
.opening-flash-frame:nth-child(5n+4) img { object-fit: cover; }
.opening-flash-frame:nth-child(5n+5) {
    padding: 6vh 4vw 0 17vw;
    background: #eee5db;
}
.opening-flash-frame:nth-child(5n+5) img { object-fit: cover; }
.opening-paper-noise {
    position: absolute;
    inset: 58svh 0 0;
    pointer-events: none;
    opacity: .24;
    background-image: radial-gradient(rgba(60,48,40,.18) .45px, transparent .45px);
    background-size: 5px 5px;
}
.opening-word {
    position: relative;
    z-index: 4;
    width: 100%;
    min-height: 46svh;
    padding: 30px 22px max(72px, calc(48px + env(safe-area-inset-bottom)));
    background: var(--paper);
    border-top: 1px solid rgba(33,29,27,.08);
}
.opening-eyebrow {
    margin: 0 0 15px;
    max-width: 330px;
    color: var(--muted);
    font-size: 9px;
    line-height: 1.45;
    letter-spacing: .15em;
    text-transform: uppercase;
}
.opening-word h1 {
    max-width: 650px;
    margin: 0;
    font-size: clamp(50px, 15.8vw, 92px);
    line-height: .84;
    letter-spacing: -.055em;
}
.opening-answer {
    margin: 20px 0 0;
    max-width: 420px;
    font-size: 16px;
    line-height: 1.3;
    opacity: 0;
    transform: translateY(7px);
    transition: opacity .5s ease, transform .5s ease;
}
.moment--opening.is-flash-finished .opening-answer,
.moment--opening.has-no-flash .opening-answer {
    opacity: 1;
    transform: none;
}
.archive-stamp {
    max-width: 560px;
    margin-top: 28px;
    font-family: var(--sans);
}
.archive-stamp span:last-child {
    font-family: var(--sans);
    font-size: 8px;
}
.opening-empty-note {
    position: absolute;
    z-index: 5;
    top: 24px;
    left: 20px;
    right: 20px;
    margin: 0 auto;
    max-width: 420px;
    padding: 10px 12px;
    background: rgba(245,239,231,.92);
    border: 1px solid var(--line);
    color: var(--muted);
    font-size: 10px;
    line-height: 1.4;
    letter-spacing: .04em;
}
.opening-index { z-index: 6; }
.scroll-mark { z-index: 6; }

/* First media: the video never silently autoplays. A tap starts it with audio. */
.story-video-shell {
    position: relative;
    width: 100%;
    height: 100%;
    background: #d9cec3;
}
.story-video-shell video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.story-video-start {
    position: absolute;
    left: 12px;
    bottom: 12px;
    display: grid;
    gap: 1px;
    min-width: 118px;
    padding: 11px 13px 10px;
    border: 1px solid rgba(33,29,27,.22);
    border-radius: 0;
    background: rgba(251,248,243,.96);
    color: var(--ink);
    text-align: left;
    cursor: pointer;
}
.story-video-start span {
    font-size: 12px;
    font-weight: 600;
}
.story-video-start small {
    color: var(--muted);
    font-size: 8px;
    letter-spacing: .13em;
    text-transform: uppercase;
}
.story-video-shell.is-playing .story-video-start {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

/* Replace the old black story blocks with warm paper / print tones. */
.moment--bad-more {
    background: #e4d6ce;
    color: var(--ink);
}
.bad-more-head p {
    color: #746b64;
}
.bad-more-photo {
    outline: 1px solid rgba(33,29,27,.08);
    outline-offset: -1px;
}

.moment--beautiful {
    background: #e4d6ce;
    color: var(--ink);
}
.overlay-line--light {
    color: var(--ink);
    text-shadow: none;
}

.moment--film {
    background: #dcd1c7;
    color: var(--ink);
}
.film-frame figcaption {
    color: rgba(33,29,27,.53);
}
.film-frame em {
    color: var(--ink);
}
.film-frame.is-chosen > .story-media,
.film-frame.is-chosen > .media-placeholder {
    outline-color: var(--ink);
}
.film-window {
    border-top: 1px solid rgba(33,29,27,.14);
    padding-top: 14px;
}

.moment--present {
    min-height: 145svh;
    background: #e9e0d7;
    color: var(--ink);
    padding-bottom: 9svh;
}
.present-photo {
    height: 92svh;
}
.present-photo::after {
    display: none;
}
.present-copy {
    position: relative;
    z-index: 3;
    width: calc(100% - 24px);
    min-height: auto;
    margin: -13svh 12px 0;
    padding: 44px 20px 76px;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    gap: 34px;
    background: var(--paper);
    border-top: 1px solid var(--line);
}
.present-line {
    color: var(--ink);
}
.present-line--soft {
    color: #625a55;
}

/* Keep the birthday reveal clean, not "party themed". */
.birthday-number { color: #9e6974; }

/* No chronology visually sneaks back in through captions. */
.quality-old figcaption,
.quality-new figcaption {
    font-family: var(--sans);
}

/* Desktop becomes a composed spread rather than a stretched phone. */
@media (min-width: 720px) {
    .moment--opening {
        min-height: 100vh;
        align-items: stretch;
    }
    .opening-flash {
        inset: 0 0 0 46%;
        width: 54%;
        height: 100%;
        border-bottom: 0;
        border-left: 1px solid var(--line);
    }
    .opening-paper-noise {
        inset: 0 54% 0 0;
    }
    .opening-word {
        width: 46%;
        min-height: 100vh;
        padding: 9vh 5vw 8vh;
        display: flex;
        flex-direction: column;
        justify-content: center;
        border-top: 0;
    }
    .opening-word h1 {
        font-size: clamp(68px, 7.3vw, 118px);
        max-width: 600px;
    }
    .opening-answer {
        margin-top: 28px;
        font-size: 18px;
    }
    .archive-stamp {
        margin-top: 44px;
    }
    .opening-empty-note {
        top: 24px;
        right: 3vw;
        left: auto;
        width: min(44vw, 420px);
    }
    .opening-index { right: 24px; }
    .scroll-mark { left: 24px; }

    .moment--present {
        min-height: 120vh;
        display: grid;
        grid-template-columns: 58% 42%;
        align-items: stretch;
        padding-bottom: 0;
    }
    .present-photo {
        position: sticky;
        top: 0;
        width: 100%;
        height: 100vh;
    }
    .present-copy {
        width: 100%;
        min-height: 100vh;
        margin: 0;
        padding: 16vh 6vw 12vh;
        justify-content: center;
        background: var(--paper);
        border-top: 0;
        border-left: 1px solid var(--line);
    }
}

@media (prefers-reduced-motion: reduce) {
    .opening-flash-frame {
        display: none;
    }
    .opening-flash-frame:first-child {
        display: block;
        opacity: 1;
        visibility: visible;
    }
    .opening-answer {
        opacity: 1;
        transform: none;
    }
}


/* =========================================================
   v2.4 — tighter rhythm, clean type, blue memory break,
   interactive saved-photo stack
   ========================================================= */

/* Clean, restrained type. Tiny archive metadata gets a mono voice. */
.opening-eyebrow,
.irony-note,
.pairs-intro p,
.pair-caption,
.pair-tap,
.develop-hint,
.film-frame figcaption,
.contact-id,
.saved-stack-head p,
.saved-stack-counter,
.saved-card-id,
.end-note {
    font-family: var(--mono);
}

.opening-word h1,
.don-title,
.irony-line,
.bad-more-head h2,
.pairs-intro h2,
.develop-copy h2,
.film-head h2,
.quality-copy h2,
.count-copy,
.wall-head h2,
.after-wall-line,
.saved-stack-head h2,
.present-line,
.birthday-inner h2,
.birthday-signoff {
    font-family: var(--display);
    font-weight: 600;
    letter-spacing: -.055em;
}

/* Opening: only three pieces of copy. */
.moment--opening {
    min-height: 100svh;
}
.opening-flash {
    height: 62svh;
}
.opening-paper-noise {
    inset: 62svh 0 0;
    opacity: .12;
}
.opening-word {
    min-height: 38svh;
    padding: 24px 20px max(54px, calc(36px + env(safe-area-inset-bottom)));
    display: flex;
    flex-direction: column;
    justify-content: center;
}
.opening-eyebrow {
    margin: 0 0 10px;
    color: var(--muted);
    font-size: 9px;
    letter-spacing: .13em;
}
.opening-word h1 {
    max-width: 560px;
    font-size: clamp(42px, 12.8vw, 80px);
    line-height: .94;
}
.opening-answer {
    margin: 13px 0 0;
    max-width: 420px;
    color: #4d4945;
    font-size: 13px;
    line-height: 1.35;
}
.opening-index,
.archive-stamp,
.opening-empty-note { display: none !important; }
.scroll-mark { left: auto; right: 18px; bottom: 18px; height: 30px; opacity: .55; }

/* Tighten the photo-book rhythm. Full screens remain only where they earn it. */
.moment--don {
    min-height: auto;
    padding: 54px 18px 64px;
}
.don-media {
    height: min(64svh, 650px);
    min-height: 330px;
}
.don-title {
    margin-top: 16px;
    font-size: clamp(52px, 16vw, 112px);
    line-height: .88;
}

.moment--irony {
    min-height: auto;
    padding: 68px 20px 74px;
}
.irony-line { margin-bottom: 24px; font-size: clamp(40px, 11.5vw, 82px); }
.irony-note { margin-top: 7px; }

.moment--bad-more {
    min-height: auto;
    padding: 70px 12px 72px;
    background: #eadbd8;
}
.bad-more-head { margin-bottom: 30px; }
.bad-more-head h2 { font-size: clamp(34px, 9.2vw, 66px); }
.bad-more-head p { margin-top: 10px; font-size: 9px; }

.moment--pairs {
    padding: 72px 18px 78px;
}
.pairs-intro { margin-bottom: 34px; }
.pairs-intro h2 {
    font-size: clamp(36px, 10vw, 66px);
    line-height: .96;
}
.pairs-intro p {
    margin-top: 10px;
    max-width: 360px;
    font-size: 9px;
    line-height: 1.5;
}
.pairs-grid { gap: 46px; }
.pairs-after { display: none !important; }

/* The older-memory interaction is the one cool blue interruption. */
.moment--develop {
    min-height: auto;
    padding: 72px 20px 76px;
    gap: 24px;
    background: var(--blue-paper);
}
.develop-copy h2 {
    font-size: clamp(30px, 8vw, 48px);
    line-height: 1;
}
.develop-photo { background: #aebfc7; }
.develop-image {
    filter: grayscale(.7) sepia(.08) hue-rotate(155deg) saturate(.68) blur(4px) contrast(.82);
}
.develop-veil {
    background: rgba(46, 72, 86, .42);
    mix-blend-mode: multiply;
}

.moment--film {
    padding: 74px 14px 78px;
    background: #e7e0d7;
}
.film-head { margin-bottom: 30px; }
.film-head h2 { font-size: clamp(32px, 8.5vw, 54px); }

.moment--quality {
    min-height: auto;
    padding: 78px 20px 82px;
}
.quality-grid { gap: 28px; }
.quality-copy h2 { font-size: clamp(38px, 10.5vw, 72px); }
.quality-copy p { font-size: clamp(18px, 5vw, 27px); }

.moment--count {
    padding: 30px 18px 68px;
}
.count-beat {
    min-height: auto;
    padding: 48px 0;
    gap: 22px;
}
.count-copy { font-size: clamp(36px, 10vw, 66px); }
.count-grid--two .count-photo:nth-child(2) { margin-top: 24px; }
.count-grid--four .count-photo:nth-child(2),
.count-grid--four .count-photo:nth-child(4) { transform: translateY(14px); }

.moment--wall {
    padding: 70px 9px 24px;
    background: #f0ebe4;
}
.wall-head { margin-bottom: 28px; }
.wall-head h2 { font-size: clamp(35px, 9.2vw, 62px); }
.moment--after-wall {
    min-height: auto;
    padding: 82px 24px 86px;
}
.after-wall-line { font-size: clamp(42px, 11.5vw, 78px); }

/* Replaces the old approved/mine split. Same uploaded slots, one new idea. */
.moment--saved-stack {
    padding: 74px 18px 86px;
    background: #e9e2da;
    overflow: hidden;
}
.saved-stack-head {
    width: min(100%, 620px);
    margin: 0 auto 30px;
}
.saved-stack-head h2 {
    margin: 0;
    font-size: clamp(38px, 10.5vw, 70px);
    line-height: .94;
}
.saved-stack-head p {
    margin: 10px 0 0;
    color: var(--muted);
    font-size: 9px;
    letter-spacing: .12em;
    text-transform: uppercase;
}
.saved-stack {
    position: relative;
    width: min(82vw, 450px);
    aspect-ratio: 4 / 5;
    margin: 0 auto;
}
.saved-card {
    position: absolute;
    inset: 0;
    display: block;
    width: 100%;
    height: 100%;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: #d7d0c8;
    box-shadow: 0 12px 34px rgba(34, 29, 26, .08);
    overflow: hidden;
    cursor: pointer;
    transform-origin: 50% 92%;
    transition: transform .3s cubic-bezier(.2,.8,.2,1), opacity .25s ease;
}
.saved-card::after {
    content: "";
    position: absolute;
    inset: 0;
    border: 1px solid rgba(25,24,23,.12);
    pointer-events: none;
}
.saved-card-id {
    position: absolute;
    right: 9px;
    bottom: 8px;
    padding: 3px 5px;
    background: rgba(247,243,237,.88);
    color: var(--ink);
    font-size: 8px;
    letter-spacing: .08em;
}
.saved-stack-counter {
    width: min(82vw, 450px);
    margin: 16px auto 0;
    color: var(--muted);
    font-size: 9px;
    letter-spacing: .1em;
    text-align: right;
}

/* Present-day and ending remain deliberate, but not padded into emptiness. */
.moment--present {
    min-height: auto;
    padding-bottom: 58px;
}
.present-photo { height: min(82svh, 780px); position: relative; }
.present-copy {
    width: calc(100% - 24px);
    margin: -54px 12px 0;
    padding: 36px 18px 46px;
    gap: 24px;
}
.present-line { font-size: clamp(40px, 11.5vw, 80px); }
.present-line--soft { font-size: clamp(28px, 7.5vw, 52px); }
.present-line--last { font-size: clamp(26px, 7vw, 48px); }

.moment--birthday {
    min-height: 92svh;
    padding: 64px 22px;
}
.birthday-inner h2 { margin-top: 36px; }
.birthday-message { margin-top: 26px; }
.birthday-signoff { margin-top: 46px; }
.moment--end {
    min-height: auto;
    padding: 60px 20px 30px;
}

@media (min-width: 720px) {
    .moment--opening { min-height: 100vh; }
    .opening-flash {
        inset: 0 0 0 48%;
        width: 52%;
        height: 100%;
    }
    .opening-paper-noise { inset: 0 52% 0 0; }
    .opening-word {
        width: 48%;
        min-height: 100vh;
        padding: 8vh 5vw;
    }
    .opening-word h1 { font-size: clamp(58px, 6vw, 92px); }
    .opening-answer { font-size: 14px; }

    .moment--don { padding: 74px 7vw 84px; }
    .moment--irony { padding-top: 92px; padding-bottom: 92px; }
    .moment--pairs { padding: 96px 6vw 106px; }
    .pairs-grid { gap: 22px; }
    .moment--develop { padding: 86px 8vw; }
    .moment--film { padding-top: 90px; padding-bottom: 92px; }
    .moment--quality { padding: 96px 6vw; }
    .count-beat { padding: 72px 0; }
    .moment--after-wall { padding-top: 110px; padding-bottom: 110px; }

    .moment--saved-stack {
        display: grid;
        grid-template-columns: minmax(260px, .75fr) minmax(360px, 1fr);
        align-items: center;
        gap: 7vw;
        padding: 10vh 8vw;
        min-height: 100vh;
    }
    .saved-stack-head { margin: 0; }
    .saved-stack { width: min(38vw, 500px); }
    .saved-stack-counter { width: min(38vw, 500px); grid-column: 2; margin-top: -4vh; }

    .moment--present {
        min-height: auto;
        display: grid;
        grid-template-columns: 58% 42%;
        padding-bottom: 0;
    }
    .present-photo {
        position: relative;
        width: 100%;
        height: 100vh;
    }
    .present-copy {
        width: 100%;
        min-height: 100vh;
        margin: 0;
        padding: 12vh 5vw;
        justify-content: center;
        border-left: 1px solid var(--line);
    }
}

@media (min-width: 1100px) {
    .moment--pairs { padding-top: 110px; padding-bottom: 118px; }
    .moment--wall { padding-top: 88px; }
}


/* v2.5 final interaction pass */
/* A slower opening flash is handled in JS; keep transitions crisp enough to feel like a camera roll. */
.opening-flash-frame { transition: opacity .13s linear; }

/* Give the develop beat its own muted lilac-grey paper instead of the previous blue/tan. */
.moment--develop {
    background: #e6e2ea;
    color: #1f1b22;
}
.develop-photo { background: #b8afbe; }
.develop-veil { background: rgba(60, 48, 65, .52); }

/* Camera-roll archive: two photographs per row on the phone, deliberately larger and easier to inspect. */
.contact-sheet {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 8px !important;
    padding-left: 10px;
    padding-right: 10px;
}
.contact-frame { min-width: 0; }
.contact-image { aspect-ratio: 4 / 5; }
.contact-id { font-size: 8px; }

/* Birthday payoff: one short burst, no endless confetti loop. */
.moment--birthday { isolation: isolate; overflow: hidden; }
.birthday-inner { position: relative; z-index: 2; }
.birthday-burst { position: absolute; inset: 0; z-index: 1; pointer-events: none; overflow: hidden; }
.birthday-bit {
    --from-x: 10%; --drift: 25vw; --lift: 58vh; --spin: 180deg; --delay: 0s; --duration: 1.25s;
    position: absolute;
    left: var(--from-x);
    bottom: -18px;
    width: 7px;
    height: 14px;
    opacity: 0;
    background: #a96f7b;
    transform: translate3d(0,0,0) rotate(0);
}
.birthday-bit--dash { width: 3px; height: 18px; background: #706f8d; }
.birthday-bit--dot { width: 8px; height: 8px; border-radius: 50%; background: #d2a96f; }
.is-celebrating .birthday-bit { animation: birthdayPop var(--duration) cubic-bezier(.18,.72,.22,1) var(--delay) both; }
.is-celebrating .birthday-number { animation: birthdayNumber .72s cubic-bezier(.18,.88,.3,1.2) both; }
@keyframes birthdayPop {
    0% { opacity: 0; transform: translate3d(0,0,0) rotate(0); }
    12% { opacity: 1; }
    68% { opacity: .95; transform: translate3d(var(--drift), calc(var(--lift) * -1), 0) rotate(var(--spin)); }
    100% { opacity: 0; transform: translate3d(calc(var(--drift) * 1.18), calc(var(--lift) * -.72), 0) rotate(calc(var(--spin) * 1.35)); }
}
@keyframes birthdayNumber {
    0% { transform: scale(.86) rotate(-2deg); }
    60% { transform: scale(1.04) rotate(.7deg); }
    100% { transform: scale(1) rotate(0); }
}

/* The final photo is now made by the visitor. */
.moment--capture {
    min-height: 100svh;
    display: grid;
    align-content: center;
    padding: 76px 18px 34px;
    background: #eee8df;
}
.capture-wrap { width: min(100%, 640px); margin: 0 auto; }
.capture-kicker {
    margin: 0 0 11px;
    font-family: var(--mono);
    font-size: 9px;
    letter-spacing: .16em;
    color: var(--muted);
}
.capture-wrap h2 {
    margin: 0 0 26px;
    font-size: clamp(46px, 13vw, 78px);
    line-height: .92;
    letter-spacing: -.055em;
    font-weight: 600;
}
.capture-stage {
    position: relative;
    width: 100%;
    aspect-ratio: 4 / 5;
    max-height: 68svh;
    background: #e3ddd4;
    border: 1px solid rgba(25,24,23,.16);
    overflow: hidden;
}
.capture-empty {
    position: absolute;
    inset: 0;
    display: grid;
    place-content: center;
    justify-items: center;
    gap: 14px;
    padding: 28px;
    text-align: center;
    color: #615b55;
}
.capture-empty[hidden] { display: none; }
.capture-frame-mark {
    display: grid;
    place-items: center;
    width: 52px;
    height: 52px;
    border: 1px solid rgba(25,24,23,.35);
    border-radius: 50%;
    font-size: 28px;
    font-weight: 300;
}
.capture-empty p { max-width: 270px; margin: 0; font-size: 14px; line-height: 1.45; }
.capture-stage img { width: 100%; height: 100%; object-fit: cover; }
.capture-stage img[hidden] { display: none; }
.capture-saving {
    position: absolute;
    left: 12px;
    bottom: 12px;
    padding: 7px 9px;
    background: rgba(247,243,237,.9);
    font-family: var(--mono);
    font-size: 9px;
    letter-spacing: .08em;
}
.capture-saving[hidden] { display: none; }
.capture-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 10px; }
.capture-action {
    min-height: 48px;
    display: grid;
    place-items: center;
    border: 1px solid var(--ink);
    background: var(--ink);
    color: var(--paper);
    cursor: pointer;
    font-size: 12px;
    font-weight: 600;
}
.capture-action--secondary { background: transparent; color: var(--ink); }
.capture-action input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.capture-status { min-height: 18px; margin: 10px 0 0; font-family: var(--mono); font-size: 9px; color: var(--muted); }
.capture-status[data-state="success"] { color: #46644f; }
.capture-status[data-state="error"] { color: #8a4c50; }
.capture-actions.is-after-save .capture-action span::after { content: " another"; }
.moment--capture .end-note { margin: 38px auto 0; max-width: 640px; }

@media (min-width: 720px) {
    .contact-sheet { grid-template-columns: repeat(4, minmax(0, 1fr)) !important; gap: 10px !important; padding-left: 4vw; padding-right: 4vw; }
    .moment--capture { padding: 10vh 7vw 5vh; }
    .capture-wrap { width: min(58vw, 620px); }
}

@media (prefers-reduced-motion: reduce) {
    .birthday-bit { display: none; }
    .is-celebrating .birthday-number { animation: none; }
}

/* =========================================================
   v2.6 — hero camera-roll explosion
   ========================================================= */
.moment--opening {
    min-height: 100svh !important;
    height: 100svh;
    padding: 0 !important;
    display: block !important;
    position: relative;
    overflow: hidden;
    background: #f5efe7 !important;
    cursor: default;
}
.opening-flash,
.opening-word,
.opening-paper-noise,
.opening-answer,
.opening-eyebrow,
.scroll-mark { display: none !important; }

.opening-chaos-stage {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
    isolation: isolate;
    background:
        radial-gradient(circle at 22% 18%, rgba(184,128,137,.08), transparent 31%),
        radial-gradient(circle at 82% 76%, rgba(104,122,136,.07), transparent 28%),
        #f5efe7;
}
.opening-chaos-stage::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 2;
    pointer-events: none;
    opacity: .24;
    background-image: radial-gradient(rgba(44,39,35,.16) .38px, transparent .38px);
    background-size: 5px 5px;
    mix-blend-mode: multiply;
}

.opening-chaos-title {
    position: absolute;
    z-index: 80;
    top: max(8svh, calc(env(safe-area-inset-top) + 28px));
    left: 7vw;
    width: min(78vw, 520px);
    transition: opacity .55s ease, transform .55s cubic-bezier(.2,.7,.2,1);
}
.opening-chaos-title h1 {
    margin: 0;
    font-family: var(--display);
    font-size: clamp(47px, 14vw, 78px);
    font-weight: 600;
    line-height: .91;
    letter-spacing: -.07em;
    text-wrap: balance;
}

.opening-chaos-grid {
    position: absolute;
    inset: 0;
    z-index: 10;
    pointer-events: none;
}
.opening-chaos-photo {
    position: absolute;
    left: var(--hero-x, 50%);
    top: var(--hero-y, 50%);
    z-index: var(--hero-z, 10);
    width: var(--hero-w, 48vw);
    height: var(--hero-h, 35svh);
    margin: 0;
    overflow: hidden;
    background: #ddd3c8;
    opacity: 0;
    transform: translate3d(0, 34px, 0) rotate(var(--hero-r, 0deg)) scale(.74);
    box-shadow: 0 12px 34px rgba(41,34,29,.11);
    transition:
        opacity .32s ease var(--hero-delay, 0s),
        transform .65s cubic-bezier(.18,.82,.21,1) var(--hero-delay, 0s),
        left .78s cubic-bezier(.2,.7,.2,1),
        top .78s cubic-bezier(.2,.7,.2,1),
        width .78s cubic-bezier(.2,.7,.2,1),
        height .78s cubic-bezier(.2,.7,.2,1),
        box-shadow .6s ease;
}
.opening-chaos-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.opening-chaos-photo:nth-child(4n+2) img { object-position: 40% center; }
.opening-chaos-photo:nth-child(5n+3) img { object-position: 62% center; }

.moment--opening.is-opening-chaos .opening-chaos-title {
    opacity: .84;
    transform: translateY(-4px) scale(.98);
}
.moment--opening.is-opening-chaos .opening-chaos-photo {
    opacity: 1;
    transform: translate3d(0,0,0) rotate(var(--hero-r, 0deg)) scale(1);
}
.moment--opening.is-opening-wall .opening-chaos-title {
    opacity: 0;
    transform: translateY(-18px) scale(.96);
}
.moment--opening.is-opening-wall .opening-chaos-photo {
    box-shadow: 0 8px 24px rgba(41,34,29,.09);
}

.moment--opening.is-opening-collapse .opening-chaos-photo:not(.is-final-photo) {
    opacity: 0;
    transform: translate3d(0, 16px, 0) rotate(var(--hero-r,0deg)) scale(.82);
    transition-delay: 0s !important;
    pointer-events: none;
}
.moment--opening.is-opening-collapse .opening-chaos-photo.is-final-photo {
    left: 8vw !important;
    top: 16svh !important;
    width: 84vw !important;
    height: 62svh !important;
    z-index: 70 !important;
    opacity: 1;
    transform: rotate(-1.25deg) scale(1) !important;
    box-shadow: 0 20px 52px rgba(41,34,29,.16);
    transition-delay: 0s !important;
}

.opening-chaos-final {
    position: absolute;
    z-index: 90;
    left: 8vw;
    right: 8vw;
    bottom: max(6svh, calc(env(safe-area-inset-bottom) + 22px));
    opacity: 0;
    transform: translateY(12px);
    transition: opacity .42s ease, transform .42s ease;
    pointer-events: none;
}
.opening-chaos-final p {
    margin: 0;
    font-size: 15px;
    font-weight: 600;
    letter-spacing: -.025em;
}
.moment--opening.is-opening-final .opening-chaos-final {
    opacity: 1;
    transform: none;
}

.opening-chaos-empty {
    position: absolute;
    z-index: 100;
    left: 8vw;
    bottom: 8svh;
    width: min(84vw, 420px);
    margin: 0;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.5;
}
.moment--opening.has-no-photos .opening-chaos-title { opacity: 1; }

.moment--opening.is-opening-reshuffle .opening-chaos-photo {
    opacity: 1 !important;
    transform: rotate(var(--hero-r, 0deg)) scale(.96) !important;
}

@media (min-width: 720px) {
    .moment--opening { height: 100vh; min-height: 100vh !important; }
    .opening-chaos-title {
        top: 12vh;
        left: 9vw;
        width: min(40vw, 620px);
    }
    .opening-chaos-title h1 {
        font-size: clamp(68px, 7vw, 112px);
        line-height: .9;
    }
    .moment--opening.is-opening-collapse .opening-chaos-photo.is-final-photo {
        left: 27vw !important;
        top: 10vh !important;
        width: 46vw !important;
        height: 72vh !important;
    }
    .opening-chaos-final {
        left: 27vw;
        right: auto;
        bottom: 7vh;
        width: 46vw;
    }
    .opening-chaos-final p { font-size: 16px; }
}

@media (prefers-reduced-motion: reduce) {
    .opening-chaos-title { opacity: 0 !important; }
    .opening-chaos-photo:not(.is-final-photo) { display: none !important; }
    .opening-chaos-photo.is-final-photo {
        opacity: 1 !important;
        left: 8vw !important;
        top: 16svh !important;
        width: 84vw !important;
        height: 62svh !important;
        transform: none !important;
    }
    .opening-chaos-final { opacity: 1 !important; transform: none !important; }
}

/* =========================================================
   v2.7 — Don hero payoff, editorial archive, live capture roll
   ========================================================= */
.opening-sound { display: none; }

/* The chaos now clears into the Don aayo don media itself. */
.opening-chaos-feature {
    position: absolute;
    z-index: 88;
    inset: max(5svh, calc(env(safe-area-inset-top) + 14px)) 6vw max(4svh, calc(env(safe-area-inset-bottom) + 12px));
    display: grid;
    grid-template-rows: auto minmax(0, 1fr) auto;
    gap: 10px;
    opacity: 0;
    transform: translateY(14px) scale(.985);
    pointer-events: none;
    transition: opacity .5s ease, transform .62s cubic-bezier(.2,.75,.2,1);
}
.opening-chaos-kicker {
    margin: 0;
    font-family: var(--mono);
    font-size: 10px;
    line-height: 1.3;
    letter-spacing: .08em;
    text-transform: uppercase;
}
.opening-feature-media {
    min-height: 0;
    overflow: hidden;
    background: #ddd3c8;
    box-shadow: 0 18px 48px rgba(41,34,29,.13);
}
.opening-feature-media > .story-media,
.opening-feature-media > .story-video-shell,
.opening-feature-media .story-video {
    width: 100%;
    height: 100%;
}
.opening-feature-media > .story-media,
.opening-feature-media .story-video { object-fit: cover; }
.opening-feature-title {
    margin: 0;
    font-family: var(--display);
    font-size: clamp(42px, 13vw, 74px);
    font-weight: 650;
    line-height: .9;
    letter-spacing: -.065em;
}
.moment--opening.is-opening-collapse .opening-chaos-photo {
    opacity: 0 !important;
    transform: translate3d(0, 22px, 0) rotate(var(--hero-r,0deg)) scale(.78) !important;
    transition-delay: 0s !important;
}
.moment--opening.is-opening-final .opening-chaos-feature {
    opacity: 1;
    transform: none;
    pointer-events: auto;
}
.moment--opening.is-opening-final .opening-chaos-empty { display: none; }
.moment--opening.is-opening-reshuffle .opening-chaos-feature { opacity: 0 !important; pointer-events: none; }

@media (min-width: 720px) {
    .opening-chaos-feature {
        inset: 7vh auto 6vh 50%;
        width: min(43vw, 720px);
        transform: translate(-50%, 16px) scale(.985);
        gap: 12px;
    }
    .moment--opening.is-opening-final .opening-chaos-feature { transform: translate(-50%, 0); }
    .opening-feature-title { font-size: clamp(58px, 6vw, 96px); }
    .opening-chaos-kicker { font-size: 11px; }
}

/* Archive: one collection, deliberately unequal photographic scale. */
.contact-sheet {
    display: grid !important;
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    grid-auto-rows: 22vw;
    grid-auto-flow: dense;
    gap: 6px !important;
    padding: 0 3vw 5vw !important;
    align-items: stretch;
}
.contact-frame {
    width: auto !important;
    height: auto !important;
    min-height: 0 !important;
    aspect-ratio: auto !important;
    margin: 0 !important;
    padding: 0;
    overflow: hidden;
}
.contact-frame--normal { grid-column: span 2; grid-row: span 2; }
.contact-frame--portrait { grid-column: span 2; grid-row: span 3; }
.contact-frame--small { grid-column: span 1; grid-row: span 1; }
.contact-frame--wide { grid-column: 1 / -1; grid-row: span 2; }
.contact-frame--tall { grid-column: span 2; grid-row: span 4; }
.contact-frame--hero { grid-column: span 3; grid-row: span 4; }
.contact-frame--full { grid-column: 1 / -1; grid-row: span 9; }
.contact-frame .contact-image,
.contact-frame .story-media,
.contact-frame .media-placeholder {
    width: 100%;
    height: 100%;
}
.contact-frame .story-media { object-fit: cover; }
.contact-frame--wide .story-media { object-position: center 42%; }
.contact-frame--full .story-media { object-position: center; }
.contact-id { display: none !important; }

@media (min-width: 720px) {
    .contact-sheet {
        grid-template-columns: repeat(12, minmax(0, 1fr)) !important;
        grid-auto-rows: 4.5vw;
        gap: 9px !important;
        padding: 0 4vw 7vw !important;
    }
    .contact-frame--normal { grid-column: span 3; grid-row: span 3; }
    .contact-frame--portrait { grid-column: span 3; grid-row: span 5; }
    .contact-frame--small { grid-column: span 2; grid-row: span 2; }
    .contact-frame--wide { grid-column: span 6; grid-row: span 3; }
    .contact-frame--tall { grid-column: span 4; grid-row: span 6; }
    .contact-frame--hero { grid-column: span 7; grid-row: span 7; }
    .contact-frame--full { grid-column: 1 / -1; grid-row: span 12; }
}

/* Ending becomes a repeatable, persistent capture roll. */
.moment--capture {
    padding: 76px 14px max(34px, env(safe-area-inset-bottom));
    background: #f0e9df;
}
.capture-wrap {
    width: min(100%, 760px) !important;
    margin: 0 auto;
}
.capture-head { margin: 0 6px 22px; }
.capture-head h2 {
    margin: 0;
    max-width: 650px;
    font-size: clamp(44px, 12vw, 78px);
    line-height: .92;
    letter-spacing: -.06em;
}
.capture-head p {
    margin: 12px 0 0;
    color: var(--muted);
    font-family: var(--mono);
    font-size: 10px;
    letter-spacing: .02em;
}
.capture-actions {
    position: relative;
    z-index: 3;
    margin: 0 6px 12px;
}
.capture-status { margin: 0 6px 14px; }
.capture-live-gallery {
    display: grid;
    grid-template-columns: repeat(2, minmax(0,1fr));
    gap: 6px;
}
.capture-gallery-photo {
    appearance: none;
    display: block;
    width: 100%;
    padding: 0;
    border: 0;
    border-radius: 0;
    overflow: hidden;
    background: #ddd3c8;
    cursor: zoom-in;
    aspect-ratio: 4 / 5;
}
.capture-gallery-photo:nth-child(5n+2) { aspect-ratio: 1 / 1; }
.capture-gallery-photo:nth-child(7n+3) { grid-column: 1 / -1; aspect-ratio: 16 / 10; }
.capture-gallery-photo:nth-child(9n+5) { aspect-ratio: 3 / 4; }
.capture-gallery-photo img { width: 100%; height: 100%; object-fit: cover; }
.capture-gallery-photo.is-pending { opacity: .45; }
.moment--capture .end-note { margin-top: 42px; }

@media (min-width: 720px) {
    .moment--capture { padding: 11vh 7vw 5vh; }
    .capture-wrap { width: min(82vw, 980px) !important; }
    .capture-actions { width: min(560px, 100%); }
    .capture-live-gallery { grid-template-columns: repeat(3, minmax(0,1fr)); gap: 8px; }
    .capture-gallery-photo:nth-child(7n+3) { grid-column: span 2; }
}

@media (prefers-reduced-motion: reduce) {
    .opening-chaos-photo { display: none !important; }
    .opening-chaos-title { display: none !important; }
    .opening-chaos-feature {
        opacity: 1 !important;
        transform: none !important;
        pointer-events: auto !important;
    }
}

/* =========================================================
   v2.8 — autoplay Don payoff + continuous natural archive
   ========================================================= */

/* Don video: autoplay is attempted as the hero resolves. The button only appears
   as a browser-policy fallback if unmuted autoplay is refused. */
.opening-feature-media .story-video-start {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(4px);
    transition: opacity .22s ease, transform .22s ease, visibility .22s;
}
.opening-feature-media .story-video-shell.needs-manual-play .story-video-start {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: none;
}
.opening-feature-media .story-video-shell.is-playing .story-video-start {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

/* The archive is now a continuous two-column photographic stream on phones.
   Natural image ratios are preserved: no forced viewport-size tiles and no
   artificial grid holes between rows. */
.contact-sheet {
    display: block !important;
    columns: 2;
    column-gap: 7px;
    width: 100%;
    padding: 0 10px 32px !important;
}
.contact-frame,
.contact-frame--normal,
.contact-frame--portrait,
.contact-frame--small,
.contact-frame--wide,
.contact-frame--tall,
.contact-frame--hero,
.contact-frame--full,
.contact-frame--compact {
    display: inline-block !important;
    width: 100% !important;
    height: auto !important;
    min-height: 0 !important;
    aspect-ratio: auto !important;
    grid-column: auto !important;
    grid-row: auto !important;
    margin: 0 0 7px !important;
    break-inside: avoid;
    page-break-inside: avoid;
    vertical-align: top;
    overflow: hidden;
    background: transparent;
}
.contact-frame .contact-image,
.contact-frame .story-media,
.contact-frame .media-placeholder {
    display: block;
    width: 100%;
    height: auto !important;
    min-height: 0 !important;
}
.contact-frame .story-media {
    object-fit: contain !important;
    object-position: center !important;
}
.contact-frame .media-placeholder { aspect-ratio: 4 / 5; }

/* Sentence blocks: tighter line lengths and rhythm so copy never feels like an
   empty section between photographs. */
.wall-head,
.bad-more-head,
.pairs-intro,
.develop-copy,
.film-head,
.quality-copy {
    text-wrap: balance;
}
.wall-head h2,
.bad-more-head h2,
.pairs-intro h2,
.develop-copy h2,
.film-head h2,
.quality-copy h2 {
    max-width: 18ch;
}
.wall-head { padding-bottom: 24px !important; }
.moment--wall { padding-bottom: 18px !important; }

@media (min-width: 720px) {
    .contact-sheet {
        columns: 3;
        column-gap: 10px;
        padding: 0 4vw 54px !important;
    }
    .contact-frame,
    .contact-frame--normal,
    .contact-frame--portrait,
    .contact-frame--small,
    .contact-frame--wide,
    .contact-frame--tall,
    .contact-frame--hero,
    .contact-frame--full,
    .contact-frame--compact {
        margin-bottom: 10px !important;
    }
}

@media (min-width: 1180px) {
    .contact-sheet {
        columns: 4;
        max-width: 1320px;
        margin: 0 auto;
    }
}

/* Final v2.8 archive density tuning. */
.moment--wall {
    padding-top: 52px !important;
}
.wall-head {
    margin-bottom: 18px !important;
    padding-bottom: 0 !important;
}
.contact-frame .story-media {
    width: auto !important;
    max-width: 100% !important;
    max-height: 68svh;
    margin-left: auto;
    margin-right: auto;
}
@media (min-width: 720px) {
    .moment--wall { padding-top: 70px !important; }
    .wall-head { margin-bottom: 24px !important; }
    .contact-frame .story-media { max-height: 64vh; }
}

/* =========================================================
   v2.9 — calm photo-click opening, one-screen Don payoff,
   gapless mixed-size archive, warm memory section
   ========================================================= */

/* Opening returns to the calmer one-photo-at-a-time camera-roll rhythm. */
.moment--opening {
    position: relative;
    height: 100svh !important;
    min-height: 100svh !important;
    padding: 0 !important;
    overflow: hidden;
    background: #f4efe8 !important;
}
.opening-sound { display: none !important; }
.opening-flash-stage {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
    background: #f4efe8;
}
.opening-flash-title {
    position: absolute;
    z-index: 30;
    left: 20px;
    right: 20px;
    top: max(7svh, calc(env(safe-area-inset-top) + 22px));
    pointer-events: none;
    transition: opacity .42s ease, transform .42s ease;
}
.opening-flash-title h1 {
    width: min(100%, 560px);
    margin: 0;
    font-family: var(--display);
    font-size: clamp(48px, 14.2vw, 84px);
    line-height: .9;
    letter-spacing: -.065em;
    font-weight: 650;
    text-wrap: balance;
}
.moment--opening.is-title-soft .opening-flash-title {
    opacity: .18;
    transform: translateY(-4px);
}
.moment--opening.is-flash-finished .opening-flash-title,
.moment--opening.is-opening-final .opening-flash-title {
    opacity: 0;
    visibility: hidden;
}
.opening-flash-stack {
    position: absolute;
    inset: 0;
    z-index: 10;
    overflow: hidden;
}
.opening-flash-frame {
    position: absolute !important;
    inset: 15svh 5vw 7svh !important;
    margin: 0 !important;
    padding: 0 !important;
    opacity: 0 !important;
    visibility: hidden !important;
    background: #ddd4ca;
    box-shadow: 0 14px 42px rgba(45, 37, 31, .10);
    transform: scale(.992);
    transition: opacity .09s linear, transform .18s ease !important;
}
.opening-flash-frame.is-active {
    opacity: 1 !important;
    visibility: visible !important;
    transform: scale(1);
}
.opening-flash-frame img {
    display: block;
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
}
.opening-flash-frame:nth-child(4n+2) {
    inset: 19svh 10vw 8svh 4vw !important;
    background: #e4dbd1;
}
.opening-flash-frame:nth-child(4n+2) img { object-fit: contain !important; }
.opening-flash-frame:nth-child(5n+3) {
    inset: 13svh 3vw 11svh 12vw !important;
}
.opening-flash-frame:nth-child(6n+4) {
    inset: 18svh 13vw 8svh 7vw !important;
}
.opening-flash-frame:nth-child(6n+4) img { object-fit: contain !important; }
.opening-flash-frame:nth-child(7n+5) {
    inset: 12svh 6vw 12svh !important;
}
.moment--opening.is-flash-finished .opening-flash-stack {
    opacity: 0;
    transition: opacity .34s ease;
}

/* Final hero beat: Apparently, here + Don media + title always fit one phone viewport. */
.opening-feature {
    position: absolute;
    z-index: 50;
    inset: 0;
    display: grid;
    grid-template-rows: auto minmax(0, 1fr) auto;
    gap: 8px;
    padding:
        max(16px, calc(env(safe-area-inset-top) + 8px))
        14px
        max(14px, calc(env(safe-area-inset-bottom) + 8px));
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(10px);
    background: #f4efe8;
    transition: opacity .42s ease, transform .48s cubic-bezier(.2,.75,.2,1), visibility .42s;
}
.moment--opening.is-opening-final .opening-feature {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: none;
}
.opening-feature-kicker {
    margin: 0;
    padding: 0 2px;
    font-family: var(--mono);
    font-size: 10px;
    line-height: 1.25;
    letter-spacing: .05em;
    color: var(--muted);
}
.opening-feature-media {
    width: 100%;
    min-height: 0;
    overflow: hidden;
    background: #ddd4ca;
    box-shadow: 0 14px 38px rgba(45, 37, 31, .10);
}
.opening-feature-media > .story-media,
.opening-feature-media > .story-video-shell,
.opening-feature-media .story-video {
    width: 100%;
    height: 100%;
    min-height: 0;
}
.opening-feature-media > .story-media,
.opening-feature-media .story-video {
    object-fit: contain !important;
    object-position: center;
}
.opening-feature-title {
    margin: 0;
    padding: 0 2px;
    font-family: var(--display);
    font-size: clamp(40px, 11.4vw, 68px);
    font-weight: 650;
    line-height: .88;
    letter-spacing: -.065em;
    text-wrap: balance;
}
.opening-flash-empty {
    position: absolute;
    z-index: 20;
    left: 20px;
    right: 20px;
    bottom: 26px;
    margin: 0;
    color: var(--muted);
    font-size: 11px;
}

/* Keep autoplay fallback invisible unless the browser actually blocks sound. */
.opening-feature-media .story-video-start {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}
.opening-feature-media .story-video-shell.needs-manual-play .story-video-start {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

/* Better-camera memory beat returns to the same warm paper family as the story. */
.moment--develop {
    background: #eee8df !important;
    color: var(--ink) !important;
}
.develop-photo { background: #cfc5ba !important; }
.develop-image {
    filter: grayscale(.62) sepia(.12) saturate(.72) blur(4px) contrast(.84) !important;
}
.develop-veil {
    background: rgba(67, 56, 49, .36) !important;
    mix-blend-mode: multiply;
}

/* Archive: mixed photographic scale without rigid columns or dead grid holes. */
.contact-sheet {
    position: relative !important;
    display: block !important;
    columns: auto !important;
    column-count: auto !important;
    column-gap: 0 !important;
    width: calc(100% - 20px) !important;
    margin: 0 10px !important;
    padding: 0 !important;
    min-height: 1px;
}
.contact-sheet.is-packed .contact-frame,
.contact-frame,
.contact-frame--normal,
.contact-frame--portrait,
.contact-frame--small,
.contact-frame--wide,
.contact-frame--tall,
.contact-frame--hero,
.contact-frame--full,
.contact-frame--compact {
    position: absolute !important;
    display: block !important;
    margin: 0 !important;
    padding: 0 !important;
    break-inside: auto !important;
    grid-column: auto !important;
    grid-row: auto !important;
    aspect-ratio: auto !important;
    overflow: hidden;
    background: #ddd4ca;
    transition: left .18s ease, top .18s ease, width .18s ease, height .18s ease, opacity .3s ease !important;
}
.contact-frame .contact-image,
.contact-frame .story-media,
.contact-frame .media-placeholder {
    display: block;
    width: 100% !important;
    height: 100% !important;
    min-height: 0 !important;
}
.contact-frame .story-media {
    max-width: none !important;
    max-height: none !important;
    margin: 0 !important;
    object-fit: cover !important;
    object-position: center !important;
}
.contact-id { display: none !important; }
.moment--wall { padding-bottom: 30px !important; }
.wall-head { margin-bottom: 24px !important; }

@media (min-width: 720px) {
    .opening-flash-title {
        left: 7vw;
        right: 7vw;
        top: 8vh;
    }
    .opening-flash-title h1 {
        font-size: clamp(66px, 7.2vw, 108px);
        max-width: 760px;
    }
    .opening-flash-frame {
        inset: 9vh 17vw 7vh !important;
    }
    .opening-flash-frame:nth-child(4n+2) { inset: 11vh 25vw 8vh 13vw !important; }
    .opening-flash-frame:nth-child(5n+3) { inset: 8vh 12vw 10vh 27vw !important; }
    .opening-flash-frame:nth-child(6n+4) { inset: 13vh 29vw 8vh 15vw !important; }
    .opening-feature {
        inset: 0;
        width: min(760px, 52vw);
        margin: 0 auto;
        padding: 5vh 0 4vh;
        gap: 10px;
    }
    .opening-feature-title { font-size: clamp(58px, 5.6vw, 88px); }
    .opening-feature-kicker { font-size: 11px; }
    .contact-sheet {
        width: calc(100% - 8vw) !important;
        margin: 0 4vw !important;
    }
}

@media (prefers-reduced-motion: reduce) {
    .opening-flash-frame { display: none !important; }
    .opening-feature { opacity: 1 !important; visibility: visible !important; transform: none !important; }
    .opening-flash-title { display: none !important; }
}


/* =========================================================
   v2.10 — all-photo fast opening, small-phone Don fit,
   large 1–2-up gapless archive
   ========================================================= */

/* The opening flashes every available assigned/archive photo, quickly but still legibly. */
.opening-flash-frame {
    transition: opacity .055s linear, transform .10s ease !important;
}

/* Guarantee the complete Don payoff is visible together, including on short phones. */
.opening-feature {
    display: flex !important;
    flex-direction: column;
    justify-content: center;
    align-items: stretch;
    gap: 7px;
    padding:
        max(10px, calc(env(safe-area-inset-top) + 6px))
        12px
        max(10px, calc(env(safe-area-inset-bottom) + 6px));
}
.opening-feature-kicker {
    flex: 0 0 auto;
    font-size: 9px;
}
.opening-feature-media {
    flex: 0 1 auto;
    height: min(52svh, 390px);
    min-height: 180px;
    max-height: 52svh;
}
.opening-feature-title {
    flex: 0 0 auto;
    font-size: clamp(36px, 10.2vw, 58px);
    line-height: .9;
}

/* Larger archive rhythm: 1 or 2 photographs per row, never tiny 3–4-up tiles. */
.contact-sheet {
    width: calc(100% - 16px) !important;
    margin: 0 8px !important;
}
.contact-frame {
    border: 0 !important;
    box-shadow: none !important;
}

@media (max-width: 390px) and (max-height: 680px) {
    .opening-feature { gap: 5px; }
    .opening-feature-kicker { font-size: 8px; }
    .opening-feature-media {
        height: 43svh;
        min-height: 150px;
        max-height: 43svh;
    }
    .opening-feature-title {
        font-size: clamp(32px, 9.4vw, 44px);
        line-height: .9;
    }
}

@media (max-height: 580px) {
    .opening-feature-media {
        height: 39svh;
        min-height: 135px;
        max-height: 39svh;
    }
    .opening-feature-title { font-size: 31px; }
}

@media (min-width: 720px) {
    .opening-feature {
        width: min(720px, 58vw);
        margin: 0 auto;
        padding: 4vh 0 3vh;
        gap: 10px;
    }
    .opening-feature-media {
        height: min(62vh, 600px);
        max-height: 62vh;
    }
    .opening-feature-title { font-size: clamp(50px, 5vw, 78px); }
    .contact-sheet {
        width: min(calc(100% - 8vw), 1180px) !important;
        margin-left: auto !important;
        margin-right: auto !important;
    }
}


/* =========================================================
   v2.11 — dynamic flash controls + natural masonry archive
   ========================================================= */

/* The archive is positioned by JS as a true two-column masonry layout.
   Each photograph has its own aspect-ratio-derived height. */
.contact-sheet {
    position: relative !important;
    display: block !important;
}
.contact-frame,
.contact-sheet.is-packed .contact-frame {
    position: absolute !important;
    aspect-ratio: auto !important;
}
.contact-frame .story-media {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
}

/* Desktop Don media grows from the old ~50–58vw treatment to 70vw. */
@media (min-width: 720px) {
    .opening-feature {
        width: min(70vw, 1040px) !important;
        max-width: 70vw !important;
    }
    .opening-feature-media,
    .opening-feature-media > .story-video-shell,
    .opening-feature-media .story-video {
        width: 100% !important;
    }
}


/* =========================================================
   v3.0 — fuller Don payoff + clear continuation + side reveals
   ========================================================= */

/* The Don payoff now uses nearly all of the available viewport instead of
   sitting inside a shorter fixed media box. The title remains visible. */
.opening-feature {
    justify-content: stretch !important;
    min-height: 100%;
    padding:
        max(8px, calc(env(safe-area-inset-top) + 5px))
        10px
        max(8px, calc(env(safe-area-inset-bottom) + 5px)) !important;
    gap: 6px !important;
}
.opening-feature-media {
    flex: 1 1 0 !important;
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
}
.opening-feature-title {
    padding-right: 48px;
}

/* Small, deliberate continuation cue. The video also advances automatically
   when it reaches its natural end. */
.opening-next {
    position: absolute;
    right: 14px;
    bottom: max(12px, calc(env(safe-area-inset-bottom) + 8px));
    z-index: 8;
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    padding: 0;
    border: 1px solid rgba(33,29,27,.24);
    border-radius: 999px;
    background: rgba(244,239,232,.82);
    color: var(--ink);
    font: inherit;
    font-size: 19px;
    line-height: 1;
    cursor: pointer;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    animation: openingNextNudge 1.9s ease-in-out infinite;
}
.opening-next:hover,
.opening-next:focus-visible {
    background: #f4efe8;
    border-color: rgba(33,29,27,.5);
}
@keyframes openingNextNudge {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(4px); }
}

/* Photo motion: only a short horizontal travel, with alternating direction.
   Existing text reveal behaviour is intentionally untouched. */
.reveal[data-reveal-side="left"] {
    opacity: 0;
    transform: translate3d(-28px, 3px, 0);
    transition-delay: var(--reveal-delay, 0ms);
}
.reveal[data-reveal-side="right"] {
    opacity: 0;
    transform: translate3d(28px, 3px, 0);
    transition-delay: var(--reveal-delay, 0ms);
}
.reveal[data-reveal-side].is-visible {
    opacity: 1;
    transform: translate3d(0,0,0);
}
.contact-frame.reveal[data-reveal-side] {
    transition:
        left .18s ease,
        top .18s ease,
        width .18s ease,
        height .18s ease,
        opacity .55s ease,
        transform .62s cubic-bezier(.2,.75,.2,1) !important;
    transition-delay: 0ms, 0ms, 0ms, 0ms, var(--reveal-delay, 0ms), var(--reveal-delay, 0ms) !important;
}

@media (min-width: 720px) {
    .opening-feature {
        width: min(78vw, 1180px) !important;
        max-width: 78vw !important;
        padding: 3vh 0 2.5vh !important;
        gap: 8px !important;
    }
    .opening-feature-media {
        flex-basis: auto !important;
    }
    .opening-feature-title {
        font-size: clamp(52px, 4.8vw, 80px);
    }
}

@media (max-width: 390px) and (max-height: 680px) {
    .opening-feature-title {
        font-size: clamp(30px, 8.8vw, 41px) !important;
        line-height: .88;
    }
    .opening-feature-kicker { font-size: 8px !important; }
    .opening-next { width: 34px; height: 34px; font-size: 17px; }
}

@media (prefers-reduced-motion: reduce) {
    .opening-next { animation: none; }
    .reveal[data-reveal-side="left"],
    .reveal[data-reveal-side="right"],
    .reveal[data-reveal-side].is-visible {
        opacity: 1 !important;
        transform: none !important;
        transition: none !important;
    }
}

/* =========================================================
   v3.1 — final title + sound + birthday celebration polish
   ========================================================= */

/* Keep the Don title visible even when the video consumes the viewport.
   It lives inside the media frame now rather than below it. */
.opening-feature {
    display: flex !important;
    flex-direction: column !important;
    position: absolute !important;
}
.opening-feature-media {
    position: relative;
    flex: 1 1 auto !important;
    min-height: 0 !important;
}
.opening-feature-title {
    position: absolute;
    z-index: 10;
    left: 16px;
    bottom: max(14px, calc(env(safe-area-inset-bottom) + 10px));
    max-width: calc(100% - 82px);
    margin: 0 !important;
    padding: .14em .22em .18em !important;
    background: rgba(244, 239, 232, .90);
    color: var(--ink);
    border: 1px solid rgba(33, 29, 27, .14);
    box-shadow: 0 8px 24px rgba(31, 25, 21, .10);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    font-size: clamp(34px, 9.6vw, 66px) !important;
    line-height: .88 !important;
    pointer-events: none;
}
.opening-next {
    z-index: 12;
}
@media (min-width: 720px) {
    .opening-feature-title {
        left: 22px;
        bottom: 20px;
        max-width: calc(100% - 98px);
        font-size: clamp(48px, 4.6vw, 76px) !important;
    }
}
@media (max-width: 390px) and (max-height: 680px) {
    .opening-feature-title {
        left: 10px;
        bottom: max(9px, calc(env(safe-area-inset-bottom) + 6px));
        max-width: calc(100% - 64px);
        font-size: clamp(27px, 8vw, 36px) !important;
    }
}

/* Birthday: floating bubbles plus repeated restrained party-popper bursts. */
.moment--birthday {
    isolation: isolate;
    overflow: hidden;
}
.birthday-bubbles,
.birthday-burst {
    position: absolute;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
}
.birthday-bubbles { z-index: 0; }
.birthday-burst { z-index: 1; }
.birthday-inner { position: relative; z-index: 3; }

.birthday-bubble {
    position: absolute;
    left: var(--bubble-x);
    bottom: -54px;
    width: var(--bubble-size);
    height: var(--bubble-size);
    border-radius: 50%;
    border: 1px solid rgba(158, 105, 116, .34);
    background: rgba(255, 255, 255, .12);
    opacity: 0;
    transform: translate3d(0, 0, 0);
}
.is-party-active .birthday-bubble {
    animation: birthdayBubbleRise var(--bubble-duration) linear var(--bubble-delay) infinite;
}
@keyframes birthdayBubbleRise {
    0% { opacity: 0; transform: translate3d(0, 0, 0) scale(.78); }
    12% { opacity: .68; }
    76% { opacity: .52; }
    100% { opacity: 0; transform: translate3d(var(--bubble-drift), -112svh, 0) scale(1.14); }
}

.birthday-popper {
    position: absolute;
    z-index: 2;
    bottom: 7vh;
    font-size: clamp(34px, 8vw, 62px);
    opacity: .76;
    transform-origin: 50% 100%;
    pointer-events: none;
}
.birthday-popper--left { left: 4vw; transform: rotate(-18deg); }
.birthday-popper--right { right: 4vw; transform: scaleX(-1) rotate(-18deg); }
.is-popping .birthday-popper--left {
    animation: birthdayPopperLeft .7s cubic-bezier(.2,.82,.24,1) both;
}
.is-popping .birthday-popper--right {
    animation: birthdayPopperRight .7s cubic-bezier(.2,.82,.24,1) both;
}
@keyframes birthdayPopperLeft {
    0% { transform: rotate(-18deg) scale(.82); }
    42% { transform: rotate(-7deg) scale(1.14); }
    100% { transform: rotate(-18deg) scale(1); }
}
@keyframes birthdayPopperRight {
    0% { transform: scaleX(-1) rotate(-18deg) scale(.82); }
    42% { transform: scaleX(-1) rotate(-7deg) scale(1.14); }
    100% { transform: scaleX(-1) rotate(-18deg) scale(1); }
}

/* Each newly injected bit animates while the birthday scene is active. */
.is-party-active .birthday-bit,
.is-celebrating .birthday-bit {
    animation: birthdayPop var(--duration) cubic-bezier(.18,.72,.22,1) var(--delay) both;
}

@media (prefers-reduced-motion: reduce) {
    .birthday-bubble,
    .birthday-popper {
        animation: none !important;
    }
}


/* =========================================================
   v3.2 — explicit Don heading above media + final birthday copy
   ========================================================= */

/* The Don title is a real heading ABOVE the video now — never an overlay. */
.opening-feature {
    display: flex !important;
    flex-direction: column !important;
}
.opening-feature-title {
    position: static !important;
    z-index: auto !important;
    order: 1;
    flex: 0 0 auto !important;
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 0 48px 0 0 !important;
    background: transparent !important;
    color: var(--ink) !important;
    border: 0 !important;
    box-shadow: none !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    font-family: var(--display);
    font-size: clamp(38px, 10.5vw, 64px) !important;
    font-weight: 650;
    line-height: .88 !important;
    letter-spacing: -.06em;
    pointer-events: auto;
}
.opening-feature-kicker {
    order: 2;
    margin: 2px 0 1px !important;
}
.opening-feature-media {
    order: 3;
    flex: 1 1 0 !important;
    min-height: 0 !important;
}
.opening-next { order: 4; }

/* Preserve the larger video while reserving guaranteed room for the heading. */
@media (min-width: 720px) {
    .opening-feature-title {
        padding-right: 56px !important;
        font-size: clamp(54px, 5vw, 84px) !important;
    }
}
@media (max-width: 390px) and (max-height: 680px) {
    .opening-feature-title {
        padding-right: 42px !important;
        font-size: clamp(32px, 9vw, 42px) !important;
    }
}

/* The new birthday toast is intentionally line-broken for rhythm/readability. */
.birthday-message { white-space: pre-line; }


/* ============================================================
   v3.3 — reveal fix + story-flow polish
   ============================================================ */
/* Hold-to-reveal state. These !important rules intentionally
   beat the older colour-treatment overrides so the actual photograph becomes
   fully clear instead of keeping a dark/black wash. */
.develop-photo.is-developed .develop-image {
    filter: none !important;
    transform: scale(1) !important;
}
.develop-photo.is-developed .develop-veil {
    opacity: 0 !important;
    background: transparent !important;
    mix-blend-mode: normal !important;
    visibility: hidden !important;
}
.develop-photo.is-developed .develop-hint {
    opacity: 0 !important;
    visibility: hidden !important;
}
.develop-photo.is-developed {
    background: transparent !important;
}

/* With unlimited teenage photos the visible stack still only previews a few
   depths; hidden depth cards remain available and rotate to the top on tap. */
.saved-card[aria-hidden="true"] { visibility: visible; }


/* v3.3.2 — hold-to-reveal interaction */
.develop-photo {
    touch-action: none;
    -webkit-user-select: none;
    user-select: none;
    -webkit-touch-callout: none;
}
.develop-hint {
    pointer-events: none;
}

/* ============================================================
   v3.3.5 — direct tap cycling + true hold-to-reveal
   ============================================================ */
.saved-stack,
.saved-card {
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}
.saved-card img {
    pointer-events: none;
    -webkit-user-drag: none;
    user-select: none;
}
.saved-card.is-leaving {
    transform: translate(24%, -5%) rotate(8deg) scale(.97) !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

.develop-photo {
    touch-action: none !important;
    -webkit-user-select: none;
    user-select: none;
    -webkit-touch-callout: none;
    -webkit-tap-highlight-color: transparent;
}
.develop-photo img {
    pointer-events: none;
    -webkit-user-drag: none;
}
.develop-photo.is-developed .develop-image,
.develop-photo.is-holding .develop-image,
.develop-photo:active .develop-image {
    filter: none !important;
    transform: scale(1) !important;
}
.develop-photo.is-developed .develop-veil,
.develop-photo.is-holding .develop-veil,
.develop-photo:active .develop-veil {
    opacity: 0 !important;
    visibility: hidden !important;
    background: transparent !important;
    mix-blend-mode: normal !important;
}
.develop-photo.is-developed .develop-hint,
.develop-photo.is-holding .develop-hint,
.develop-photo:active .develop-hint {
    opacity: 0 !important;
    visibility: hidden !important;
}
.develop-photo.is-developed,
.develop-photo.is-holding,
.develop-photo:active {
    background: transparent !important;
}

