@font-face {
  font-family: "Cormorant Garamond";
  src: url("fonts/CormorantGaramond-Variable.ttf") format("truetype");
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
}

@font-face {
  font-family: "Cormorant Garamond";
  src: url("fonts/CormorantGaramond-Italic-Variable.ttf") format("truetype");
  font-style: italic;
  font-weight: 300 700;
  font-display: swap;
}

@font-face {
  font-family: "Dancing Script";
  src: url("fonts/DancingScript-Variable.ttf") format("truetype");
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
}

:root {
  --wine: #793f48;
  --wine-dark: #65333b;
  --ink: #30382e;
  --paper: #f7f4ec;
  --paper-deep: #e8e8db;
  --gold: #ae9273;
  --green: #485343;
  --white: #fffdf7;
  --serif: "Cormorant Garamond", "Noto Serif", "Times New Roman", serif;
  --script: "Dancing Script", "Segoe Script", cursive;
  --sans: "Segoe UI", Arial, sans-serif;
  --shadow: 0 22px 70px rgb(93 35 54 / 12%);
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  scroll-behavior: smooth;
  scrollbar-gutter: stable;
}

body {
  margin: 0;
  overflow-x: hidden;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1rem;
  line-height: 1.7;
  font-kerning: normal;
  text-rendering: optimizeLegibility;
}

a {
  color: inherit;
}

img {
  display: block;
  max-width: 100%;
}

.page-noise {
  position: fixed;
  inset: 0;
  z-index: 20;
  opacity: 0.035;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 140 140' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.falling-flowers {
  position: fixed;
  z-index: 9;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.falling-flowers span {
  position: absolute;
  top: -3rem;
  left: var(--flower-x);
  color: rgb(187 91 119 / 48%);
  font-family: Georgia, serif;
  font-size: var(--flower-size);
  line-height: 1;
  text-shadow: 0 2px 8px rgb(93 35 54 / 10%);
  will-change: transform, opacity;
  animation: flower-fall var(--flower-duration) linear var(--flower-delay) both;
}

@keyframes flower-fall {
  0% {
    opacity: 0;
    transform: translate3d(0, -6vh, 0) rotate(var(--flower-rotation-start));
  }

  12% {
    opacity: var(--flower-opacity);
  }

  45% {
    transform: translate3d(var(--flower-sway), 46vh, 0) rotate(var(--flower-rotation-mid));
  }

  86% {
    opacity: var(--flower-opacity);
  }

  100% {
    opacity: 0;
    transform: translate3d(var(--flower-drift), 110vh, 0) rotate(var(--flower-rotation-end));
  }
}

body.book-locked {
  overflow: hidden;
}

body:has(dialog[open]) { overflow: hidden; }

.falling-flowers.is-paused span,
body.book-locked .falling-flowers span,
body:has(dialog[open]) .falling-flowers span { animation-play-state: paused; }

:focus-visible { outline: 2px solid var(--gold); outline-offset: 5px; }

.book-intro {
  position: fixed;
  z-index: 80;
  inset: 0;
  overflow: hidden;
  opacity: 1;
  transition: opacity 360ms ease, visibility 360ms ease;
}
.book-intro.is-hidden { visibility: hidden; opacity: 0; pointer-events: none; }
.book-scene, .invitation-book { position: absolute; inset: 0; text-align: center; }
.invitation-book { isolation: isolate; }
.invitation-door {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 50%;
  background:
    repeating-linear-gradient(0deg, transparent 0 3px, rgb(115 88 62 / 2%) 3px 4px),
    repeating-linear-gradient(90deg, transparent 0 4px, rgb(115 88 62 / 2%) 4px 5px),
    radial-gradient(ellipse at 50% 45%, #fffcf5, #eae0d2);
  transition: transform 1850ms cubic-bezier(.65, 0, .2, 1);
  will-change: transform;
}
.invitation-door::after {
  position: absolute; inset: clamp(1rem, 3vw, 2.5rem);
  border: 1px solid rgb(173 123 91 / 28%); content: "";
  pointer-events: none;
}
.invitation-door-left { left: 0; box-shadow: inset -14px 0 24px -20px #654b36; }
.invitation-door-right { right: 0; box-shadow: inset 14px 0 24px -20px #654b36; }
.invitation-door-left::after { right: 0; border-right: 0; border-radius: 40% 0 0 0; }
.invitation-door-right::after { left: 0; border-left: 0; border-radius: 0 40% 0 0; }
.intro-letter, .intro-bottom {
  position: absolute;
  z-index: 1;
  left: 1.25rem; right: 1.25rem;
  color: var(--wine-dark);
  transition: opacity 300ms ease, transform 500ms ease;
}
.intro-letter { bottom: calc(50% + 100px); }
.book-cover-kicker, .book-cover-date {
  font: 600 .75rem/1.6 var(--sans);
  letter-spacing: .23em;
  text-transform: uppercase;
}
.book-cover-kicker { color: #806d5b; }
.book-cover-names {
  display: flex; align-items: center; justify-content: center;
  flex-wrap: wrap; gap: .22em; margin-top: 1rem;
  font: 500 clamp(3.2rem, 6vw, 5.8rem)/1.25 var(--script);
}
.book-cover-names i { color: #ad7b5b; font: italic .5em var(--serif); }
.book-cover {
  position: absolute; left: 50%; top: 50%; z-index: 2;
  width: 128px; height: 128px; padding: 0; border: 0;
  border-radius: 50%; background: transparent; color: #9a7150;
  transform: translate(-50%, -50%); cursor: pointer;
  transition: opacity 280ms ease, transform 450ms ease;
}
.wax-seal {
  display: grid; width: 100%; height: 100%; place-items: center;
  border-radius: 47% 53% 49% 51% / 52% 46% 54% 48%;
  background: radial-gradient(circle at 36% 26%, #fff9e9, #e0c5a2 65%, #c5a17d);
  box-shadow: 0 8px 20px rgb(85 56 33 / 20%), inset 1px 2px 3px #fffaf0, inset -2px -3px 6px #b68f6c;
  transition: transform 240ms ease;
}
.wax-seal::before { position: absolute; inset: 10px; border: 1px solid #b99675; border-radius: 50%; box-shadow: 0 1px 2px #fff8e7; content: ""; }
.wax-seal svg { width: 82px; height: 82px; filter: drop-shadow(0 1px 0 #fff6df); }
.book-cover:hover .wax-seal, .book-cover:focus-visible .wax-seal { transform: scale(1.055) rotate(-4deg); }
.intro-bottom { top: calc(50% + 100px); }
.book-cover-date { color: #80634f; }
.book-intro-hint { margin: 1rem 0 0; font: italic 1.3rem/1.4 var(--serif); }
.intro-music-note { margin: .55rem 0 0; color: #807369; font-size: .75rem; }
.invitation-book.is-open .invitation-door-left { transform: translate3d(-102%, 0, 0); }
.invitation-book.is-open .invitation-door-right { transform: translate3d(102%, 0, 0); }
.invitation-book.is-open .book-cover { opacity: 0; transform: translate(-50%, -50%) scale(.7); pointer-events: none; }
.invitation-book.is-open .intro-letter { opacity: 0; transform: translateY(-12px); }
.invitation-book.is-open .intro-bottom { opacity: 0; transform: translateY(12px); }
.book-toggle, .music-toggle {
  position: fixed; bottom: max(1rem, env(safe-area-inset-bottom)); z-index: 35;
  display: inline-flex; min-height: 44px; align-items: center; gap: .6rem;
  padding: .65rem 1rem; border: 1px solid rgb(151 61 89 / 22%);
  border-radius: 999px; background: rgb(255 253 248 / 94%); color: var(--wine-dark);
  font: 600 .76rem/1 var(--sans); box-shadow: 0 8px 28px rgb(93 35 54 / 14%);
  cursor: pointer; backdrop-filter: blur(10px);
}
.book-toggle { left: 1rem; }
.music-toggle { right: 1rem; bottom: max(3.9rem, calc(env(safe-area-inset-bottom) + 2.9rem)); }
.music-disc { display: grid; width: 24px; height: 24px; place-items: center; border: 1px solid #c69a83; border-radius: 50%; font-size: 1rem; }
.music-toggle.is-playing .music-disc { animation: music-turn 8s linear infinite; }
.music-status { position: fixed; right: 1rem; bottom: 7rem; z-index: 36; max-width: min(280px, 80vw); margin: 0; padding: .65rem .9rem; border-radius: 8px; background: var(--white); color: var(--wine-dark); font-size: .8rem; box-shadow: var(--shadow); }
.music-status:empty { display: none; }
.youtube-music-panel {
  position: fixed; z-index: 36; right: 1rem; bottom: 7.5rem;
  width: min(340px, calc(100vw - 2rem)); padding: 10px;
  border: 1px solid #dfcec2; border-radius: 14px;
  background: var(--white); color: var(--wine-dark); box-shadow: var(--shadow);
}
.youtube-music-heading { display: flex; align-items: center; justify-content: space-between; gap: .5rem; padding: .1rem .25rem .6rem; }
.youtube-music-heading span { display: block; font-size: .65rem; letter-spacing: .05em; color: #806d5b; }
.youtube-music-heading strong { display: block; font: 500 1.6rem/1.2 var(--serif); }
.youtube-music-heading button { flex: 0 0 44px; height: 44px; border: 0; background: transparent; color: var(--wine-dark); font-size: 1.5rem; cursor: pointer; }
.youtube-player-wrap { width: 100%; min-height: 200px; background: #241b20; }
.youtube-player-wrap iframe { display: block; width: 100%; height: 200px; border: 0; }
.youtube-music-help { margin: .6rem .25rem .2rem; font-size: .75rem; line-height: 1.5; }
.youtube-music-help:empty { display: none; }
.youtube-music-panel > a { display: inline-block; margin: .5rem .25rem .1rem; font-size: .75rem; text-underline-offset: 3px; }
@media (max-height: 560px) { .youtube-music-panel { bottom: .75rem; right: .75rem; } }
.music-credit { margin: 1.25rem 0 0; color: #807369; font-size: .7rem; }
.music-credit a { text-underline-offset: 3px; }
@keyframes music-turn { to { transform: rotate(360deg); } }

.draft-badge {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  z-index: 30;
  padding: 0.45rem 0.75rem;
  border: 1px solid rgb(255 255 255 / 35%);
  border-radius: 999px;
  background: rgb(81 64 71 / 92%);
  color: var(--white);
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  box-shadow: 0 8px 30px rgb(0 0 0 / 20%);
}


/* A letter in pictures — Long & Dương */
:root { --line: #cdd0bf; --muted: #6c7164; --olive-light: #e9ebdf; }
body { font-size: 15px; }
button, input, textarea { font: inherit; }
button, a, input, textarea { -webkit-tap-highlight-color: transparent; }
a, button { touch-action: manipulation; }
:focus-visible { outline: 2px solid var(--wine); outline-offset: 5px; }
::selection { background: #dce1d0; color: #263123; }
.art-defs { position: absolute; width: 0; height: 0; overflow: hidden; }
.botanical { display: block; color: #798567; }
.page-noise { opacity: .026; }
.eyebrow { margin: 0 0 1.25rem; color: var(--muted); font: 600 .65rem/1.8 var(--sans); letter-spacing: .19em; text-transform: uppercase; }
h2 { margin: 0; color: var(--ink); font: 400 clamp(2.75rem, 4.4vw, 4.3rem)/1.07 var(--serif); letter-spacing: -.025em; text-wrap: balance; }
h2 em { color: var(--wine); font-weight: 400; }
p { text-wrap: pretty; }
.section { padding: clamp(4.5rem, 8vw, 8rem) max(5vw, calc((100vw - 1180px) / 2)); }
.section-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 3rem; margin-bottom: 3.8rem; }
.section-heading > div { min-width: 0; }
.text-link { display: inline-flex; align-items: center; justify-content: space-between; gap: 1.5rem; min-height: 44px; border: 0; border-bottom: 1px solid currentColor; color: var(--wine-dark); background: transparent; padding: .5rem 0; font-size: .8rem; font-weight: 500; text-decoration: none; cursor: pointer; }
.text-link span { font-size: 1.25rem; transition: transform .25s ease; }
.text-link:hover span { transform: translate(3px, -3px); }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 1.5rem; min-height: 48px; padding: .85rem 1.7rem; border: 1px solid var(--green); border-radius: 0; background: transparent; color: var(--green); font: 500 .85rem/1.5 var(--sans); text-decoration: none; cursor: pointer; transition: background .2s, color .2s; }
.button-primary { background: var(--green); color: var(--white); }
.button-primary:hover { background: #313d2e; }
.button:disabled { opacity: .6; cursor: wait; }

.site-header { display: flex; max-width: 1400px; margin: auto; padding: 1.1rem 5vw; align-items: center; gap: 1.5rem; border-bottom: 1px solid var(--line); }
.header-brand { flex: 0 0 61px; height: 45px; color: var(--green); }
.header-brand svg { display: block; height: 100%; width: 100%; }
.header-ring-accent { stroke: var(--wine); }
.header-ring-spark { fill: var(--wine); }
.header-note { margin: 0; font-size: .58rem; letter-spacing: .17em; color: var(--muted); }
.site-header nav { display: flex; margin-left: auto; gap: clamp(.8rem, 2vw, 2.2rem); flex-wrap: wrap; }
.site-header nav a { display: inline-flex; min-height: 44px; align-items: center; font-size: .75rem; text-decoration: none; }
.site-header nav a:hover { color: var(--wine); text-decoration: underline; text-underline-offset: 6px; }

.hero { position: relative; display: grid; grid-template-columns: 1fr 1fr; align-items: center; column-gap: clamp(2rem, 6vw, 6rem); max-width: 1400px; margin: auto; padding: 3rem 7vw 0; }
.hero-copy { position: relative; padding: 1rem 0 2rem; z-index: 2; }
.hero .eyebrow { font-size: .61rem; margin-bottom: 1.3rem; }
.guest-line { margin: 0 0 .8rem; font: italic 1.2rem/1.5 var(--serif); color: #727363; overflow-wrap: anywhere; }
.hero h1 { position: relative; margin: 0 0 1.8rem; color: var(--wine-dark); font: 500 clamp(5rem, 9.4vw, 9.1rem)/1.08 var(--script); letter-spacing: -.035em; }
.hero h1 > span { display: block; }
.hero h1 > span:last-child { padding-left: .55em; }
.hero h1 i { position: absolute; left: .3em; top: 53%; transform: translateY(-25%); font: italic .38em/1 var(--serif); color: #a28b6d; }
.hero h1:focus { outline: none; }
.hero-promise { margin: 0 0 1.75rem; font: 400 clamp(1.5rem, 2.3vw, 2.2rem)/1.3 var(--serif); color: var(--green); }
.hero-promise em { font-weight: 400; }
.date-lockup { display: flex; align-items: center; gap: 1rem; width: fit-content; border-top: 1px solid var(--line); padding-top: 1rem; }
.date-lockup strong { font: 400 3.6rem/1 var(--serif); }
.date-lockup > div { display: grid; gap: .25rem; border-left: 1px solid var(--line); padding-left: 1rem; }
.date-lockup span { font: 500 .65rem/1.5 var(--sans); letter-spacing: .12em; text-transform: uppercase; }
.hero-event-note { max-width: 340px; margin: .75rem 0 0; font-size: .75rem; color: var(--muted); }
.hero-link { margin-top: 1.3rem; min-width: 160px; }
.hero-visual { position: relative; align-self: center; padding: 1.4rem 0 2.3rem; }
.hero-visual::before { position: absolute; inset: -1rem -1.7rem 3.2rem 3.2rem; border: 1px solid #b9bfa8; border-radius: 48% 48% 0 0; content: ""; }
.hero-photo { position: relative; aspect-ratio: .87; margin: 0; overflow: hidden; border-radius: 47% 47% 0 0; background: #dce0d2; }
.hero-photo img { height: 100%; width: 100%; object-fit: cover; object-position: 62% center; }
.hero-side-note { position: absolute; z-index: 1; right: -3rem; top: 30%; writing-mode: vertical-rl; font-size: .62rem; letter-spacing: .14em; color: #777d6b; }
.hero-botanical { position: absolute; bottom: -1rem; left: -5.5rem; width: 145px; transform: rotate(-28deg); }
.hero-handnote { position: absolute; right: -.7rem; bottom: -.25rem; color: var(--wine); transform: rotate(-7deg); font: 400 2.3rem/1.4 var(--script); }
.hero-stamp { position: absolute; right: -1.3rem; top: 1rem; width: 100px; height: 100px; display: flex; flex-direction: column; justify-content: center; align-items: center; gap: .25rem; background: var(--paper); border: 1px solid var(--wine); border-radius: 50%; transform: rotate(12deg); color: var(--wine); box-shadow: inset 0 0 0 5px var(--paper), inset 0 0 0 6px #ae8b81; }
.hero-stamp span { font-size: .45rem; letter-spacing: .16em; }
.hero-stamp b { font: 400 2.25rem/1.1 var(--serif); }
.hero-bottom { grid-column: 1 / -1; display: flex; justify-content: space-between; gap: 1rem; padding: 2rem 0 1.7rem; margin-top: 2rem; border-top: 1px solid var(--line); color: var(--muted); font-size: .7rem; letter-spacing: .035em; }
.hero-bottom a { text-decoration: none; }
.hero-bottom a span { margin-left: 1rem; }
html:not(.has-hero-photo) .hero { grid-template-columns: 1fr; }
html:not(.has-hero-photo) .hero-copy { max-width: 600px; margin: auto; }
html:not(.has-hero-photo) .hero-visual { display: none; }

.invitation { display: grid; grid-template-columns: .55fr 1.45fr; gap: 5rem; align-items: center; }
.letter-aside { align-self: center; color: var(--green); }
.letter-aside .botanical { width: 115px; margin: 0 0 1.4rem -.3rem; }
.letter-aside > span { font: 400 clamp(1.8rem, 3vw, 2.7rem)/1.3 var(--serif); }
.letter-aside i { color: var(--wine); }
.letter-sheet { position: relative; padding: clamp(2rem, 5vw, 4.7rem); background: var(--white); border: 1px solid #dedfd1; box-shadow: 8px 9px 0 -1px var(--paper), 8px 9px 0 0 #d8daca; }
.letter-top { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding-bottom: 1.5rem; margin-bottom: 2rem; border-bottom: 1px solid var(--line); }
.letter-top .eyebrow { margin: 0; font-size: .56rem; }
.letter-mark { color: var(--wine); white-space: nowrap; font: 400 1.5rem var(--script); }
.letter-salutation { font: italic 1.4rem/1.5 var(--serif); color: var(--muted); }
.letter-sheet h2 { font-size: clamp(2.5rem, 4.2vw, 4rem); }
.invitation-text { max-width: 600px; margin: 1.6rem 0 0; color: #62675b; line-height: 1.95; }
blockquote { margin: 1.6rem 0 0; padding: 1.3rem 0 0; font: italic 1.5rem/1.45 var(--serif); color: var(--green); border-top: 1px solid var(--line); }
.letter-signature { margin: 1.5rem 0 0; font: 500 2.2rem/1.4 var(--script); color: var(--wine); text-align: right; }
.letter-signature i { font: italic .75em var(--serif); }

.event-section { position: relative; background: var(--green); color: var(--white); }
.event-heading h2 { color: var(--white); }
.event-heading h2 em { color: #d6dcbf; }
.event-section .eyebrow { color: #d5d9c6; }
.event-intro { flex: 0 1 310px; margin: 0 0 .4rem; color: #dce0d1; font-size: .88rem; line-height: 1.9; }
.celebration-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2rem; }
.celebration { position: relative; min-width: 0; padding: 2.2rem 2.5rem 0; background: var(--paper); color: var(--ink); border-top: 5px solid #abb18f; }
.celebration:nth-child(2) { border-top-color: #b78e8b; }
.celebration::before, .celebration::after { position: absolute; bottom: 47px; width: 20px; height: 20px; background: var(--green); border-radius: 50%; content: ""; }
.celebration::before { left: -10px; }
.celebration::after { right: -10px; }
.ticket-heading { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.celebration .eyebrow { margin: 0; color: var(--muted); font-size: .58rem; }
.ticket-heading > span { font: italic 1.6rem var(--serif); color: #818a70; }
.celebration h3 { margin: 1.1rem 0 .25rem; font: 400 clamp(2rem, 3vw, 3rem)/1.2 var(--serif); color: var(--wine-dark); }
.celebration-family { margin: 0; font-size: .75rem; color: var(--muted); }
.celebration-detail { padding-top: 1.4rem; margin-top: 1.4rem; border-top: 1px solid var(--line); }
.label { display: block; margin-bottom: .45rem; color: var(--muted); font-size: .59rem; letter-spacing: .14em; text-transform: uppercase; }
.celebration-detail strong { display: block; font: 500 1.7rem/1.3 var(--serif); }
.celebration-detail p { margin: .45rem 0 0; font-size: .83rem; overflow-wrap: anywhere; color: #62675b; }
.celebration-time strong { font: 400 3.25rem/1 var(--serif); color: var(--green); }
.celebration .text-link { margin: 1rem 0 0; }
.ticket-foot { display: flex; justify-content: space-between; align-items: center; border-top: 1px dashed #b5bba7; margin-top: 1.8rem; min-height: 58px; padding: .7rem 0; color: var(--muted); font: italic 1.05rem var(--serif); }
.ticket-foot > span:last-child { font-size: 1.55rem; color: var(--wine); }
html[data-invitation-side="groom"] .celebration-grid, html[data-invitation-side="bride"] .celebration-grid { grid-template-columns: minmax(0, 700px); justify-content: center; }
.countdown { display: grid; grid-template-columns: 1fr 1.35fr; gap: 2rem; align-items: center; margin-top: 3.5rem; padding-top: 2.8rem; border-top: 1px solid #7b856d; }
.countdown h2 { color: #f1f2e8; font-size: 2.15rem; }
.countdown h2 em { color: #d6dcbf; }
.countdown .eyebrow { font-size: .53rem; margin-bottom: .7rem; }
.countdown-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); text-align: center; }
.countdown-grid > div { border-left: 1px solid #7b856d; padding: .1rem .7rem; }
.countdown-grid strong { display: block; font: 400 clamp(2.5rem, 5vw, 4.4rem)/1.05 var(--serif); font-variant-numeric: tabular-nums; }
.countdown-grid span { display: block; margin-top: .7rem; color: #dce0d1; font-size: .56rem; letter-spacing: .15em; text-transform: uppercase; }
.countdown-finished { font: italic 1.8rem var(--serif); }

.gallery { padding-bottom: 3rem; }
.gallery-heading { align-items: center; }
.gallery-heading h2 { font-size: clamp(2.65rem, 4.5vw, 4.5rem); }
.gallery-intro { max-width: 250px; color: var(--muted); }
.gallery-intro p { font: italic 1.5rem/1.5 var(--serif); }
.gallery-intro > span { font-size: .65rem; }
.gallery-intro i { margin-left: .5rem; font-style: normal; }
.gallery-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 2rem; align-items: start; }
.gallery-grid figure { position: relative; margin: 0; min-width: 0; cursor: zoom-in; grid-column: span 4; }
.gallery-grid figure:first-child { grid-column: 1 / 8; grid-row: 1 / 3; }
.gallery-grid figure:nth-child(2) { grid-column: 9 / 13; grid-row: 1; margin-top: 2.5rem; }
.gallery-grid figure:nth-child(3) { grid-column: 8 / 13; grid-row: 2; margin-top: 0; margin-left: -1.5rem; }
.gallery-frame { overflow: hidden; position: relative; background: #e1e0d4; aspect-ratio: 4 / 5; }
.gallery-grid figure:first-child .gallery-frame { aspect-ratio: 3 / 4; border-radius: 180px 0 0 0; }
.gallery-grid figure:nth-child(2) .gallery-frame { aspect-ratio: 1; }
.gallery-grid figure:nth-child(3) .gallery-frame { aspect-ratio: 4 / 3; border: 9px solid var(--paper); box-shadow: 0 10px 30px #30382e10; transform: rotate(-3deg); }
.gallery-grid img { height: 100%; width: 100%; object-fit: cover; transition: transform .7s ease; }
.gallery-grid figure:first-child img { object-position: 65% center; }
.gallery-grid figure:hover img, .gallery-grid figure:focus-visible img { transform: scale(1.035); }
.album-end { display: flex; justify-content: center; align-items: center; gap: 2rem; margin-top: 3rem; }
.album-end > span { height: 1px; width: 17%; background: var(--line); }
.album-end .botanical { width: 55px; height: 90px; transform: rotate(45deg); }

.wishes { display: grid; grid-template-columns: .9fr 1.1fr; gap: clamp(2rem, 7vw, 7rem); align-items: center; background: var(--olive-light); }
.wishes-copy .eyebrow { max-width: 270px; }
.wishes-copy > p:not(.eyebrow) { max-width: 400px; margin: 1.75rem 0; color: #62695a; font-size: .9rem; line-height: 1.9; }
.wishes-signature { font: 500 2.3rem/1.4 var(--script); color: var(--wine); }
.wishes-signature i { font: italic .75em var(--serif); }
.wishes-form { position: relative; padding: 2.5rem; background: var(--white); border: 1px solid #d0d5c2; box-shadow: 7px 8px 0 #dce0d0; }
.postcard-top { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding-bottom: 1.5rem; margin-bottom: 1.7rem; border-bottom: 1px solid var(--line); }
.postcard-top > span:first-child { font-size: .58rem; letter-spacing: .15em; color: var(--muted); }
.postcard-top b { display: block; margin-top: .3rem; color: var(--wine); font: 500 1.55rem var(--script); letter-spacing: 0; }
.postcard-stamp { display: grid; place-content: center; width: 68px; height: 76px; border: 1px dashed #9caa88; outline: 4px solid #f4f4e8; background: #f0f1e6; text-align: center; color: var(--green); font: .7rem/1 var(--serif); transform: rotate(7deg); }
.postcard-stamp i { font: 500 1.6rem var(--script); }
.wishes-form label { display: block; margin: 1rem 0 .3rem; font-size: .75rem; color: var(--green); }
.wishes-form input, .wishes-form textarea { display: block; width: 100%; min-width: 0; padding: .7rem 0; border: 0; border-bottom: 1px solid #afb79f; border-radius: 0; background: transparent; color: var(--ink); font: 400 1rem/1.85 var(--sans); }
.wishes-form textarea { resize: vertical; min-height: 160px; background: repeating-linear-gradient(transparent 0 29px, #dfe2d4 29px 30px); background-position: 0 12px; line-height: 30px; }
.wishes-form ::placeholder { color: #838777; opacity: 1; }
.wishes-form input:focus-visible, .wishes-form textarea:focus-visible { outline-offset: 6px; }
.wishes-privacy { font-size: .68rem; margin: 1rem 0 1.4rem; color: var(--muted); line-height: 1.7; }
.wish-status { font-size: .8rem; margin: 1rem 0 0; overflow-wrap: anywhere; }
.wish-status:empty { display: none; }
.wish-status[data-state="success"] { color: #35604a; }
.wish-status[data-state="error"] { color: var(--wine); }

.gift { display: grid; grid-template-columns: .8fr 1.2fr; gap: clamp(3rem, 8vw, 8rem); align-items: center; }
.gift-copy h2 { font-size: clamp(2.5rem, 4vw, 3.8rem); }
.gift-copy > p:not(.eyebrow) { max-width: 470px; margin: 1.5rem 0; color: var(--muted); font-size: .9rem; line-height: 1.9; }
.gift-preview { position: relative; width: 100%; max-width: 420px; min-height: 270px; padding: 2rem; margin: auto; display: flex; flex-direction: column; align-items: center; border: 1px solid #b4bba3; background: #e6e9db; color: var(--green); box-shadow: 0 18px 38px #4b55421a; cursor: pointer; transform: rotate(-4deg); transition: transform .35s, box-shadow .35s; }
.gift-preview::before { position: absolute; inset: 9px; border: 1px solid #bac2a9; content: ""; }
.gift-preview:hover { transform: rotate(-1deg) translateY(-4px); box-shadow: 0 24px 40px #4b554225; }
.gift-envelope-fold { position: absolute; top: 0; left: 0; width: 100%; height: 55%; background: #d5ddc7; clip-path: polygon(0 0, 100% 0, 50% 100%); }
.gift-preview-label, .gift-preview-hint { position: relative; font-size: .54rem; letter-spacing: .15em; text-transform: uppercase; }
.gift-preview-seal { position: relative; display: grid; place-content: center; width: 64px; height: 64px; margin: 1.1rem 0 .7rem; border: 1px solid #96686c; border-radius: 47% 53% 49% 51%; background: var(--wine); color: var(--paper); box-shadow: inset 0 0 0 5px #8b525c, 0 5px 12px #65333b20; font: 2rem var(--serif); }
.gift-preview-name { position: relative; font: 500 2rem/1.4 var(--script); }
.gift-preview-name i { font: italic .7em var(--serif); }
.gift-preview-hint { margin-top: .75rem; color: #626d53; }
.gift-open { text-align: left; }

.closing { padding-top: 0; padding-bottom: 4rem; }
.closing-card { display: grid; grid-template-columns: 1fr; background: #eae6dc; }
.closing-card.has-photo { grid-template-columns: 1fr 1fr; }
.closing-photo { margin: 0; min-width: 0; }
.closing-photo img { width: 100%; height: 100%; min-height: 600px; object-fit: cover; object-position: 50% center; }
.closing-copy { display: flex; flex-direction: column; align-items: flex-start; justify-content: center; padding: clamp(2rem, 4.5vw, 4rem); }
.closing-copy h2 { font-size: clamp(2.5rem, 4.2vw, 4.1rem); }
.closing-warmth { margin: 1.4rem 0 1.8rem; color: #606758; font-size: .9rem; line-height: 1.85; }
.closing-events { display: flex; flex-direction: column; gap: .5rem; width: 100%; padding-top: 1.4rem; border-top: 1px solid #c8cabb; font-size: .75rem; }
.closing-schedule { font-size: .72rem; margin: .65rem 0 1rem; }
#closingMessage { margin: 0 0 1.2rem; font-size: .75rem; line-height: 1.85; color: #69705f; }
.closing-signature { color: var(--wine); font: 500 2.35rem/1.5 var(--script); }
.closing-signature i { font: italic .7em var(--serif); }

.wedding-footer { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 0 1.25rem; max-width: 1180px; margin: 0 auto; padding: 2rem 0 6.5rem; border-top: 1px solid var(--line); }
.footer-emblem { grid-row: 1 / 3; width: 65px; }
.footer-wedding-mark svg { display: block; width: 100%; }
.footer-names { margin: 0; font: 500 2rem/1.2 var(--script); color: var(--wine); }
.footer-names i { font: italic .7em var(--serif); }
.footer-date { margin: 0; font-size: .65rem; color: var(--green); letter-spacing: .12em; }
.footer-thanks { grid-column: 2 / -1; margin: .65rem 0 0; color: var(--muted); font-size: .7rem; }
.music-credit { grid-column: 2 / -1; font-size: .62rem; margin: .75rem 0 0; }

@media (min-width: 1600px) { .hero { padding-inline: 90px; } }
@media (max-width: 1050px) {
  .header-note { display: none; }
  .hero { gap: 3rem; padding-inline: 6vw; }
  .hero-stamp { width: 82px; height: 82px; right: -.8rem; }
  .hero-stamp b { font-size: 1.8rem; }
  .hero-visual::before { right: -.8rem; }
  .hero-side-note { right: -2.2rem; }
  .hero-botanical { width: 105px; left: -3.4rem; }
  .invitation { gap: 2.5rem; grid-template-columns: .45fr 1.55fr; }
  .letter-sheet { padding: 2.4rem; }
  .wishes { gap: 2.5rem; }
  .celebration { padding-inline: 1.8rem; }
  .closing-card.has-photo { grid-template-columns: .85fr 1.15fr; }
  .wedding-footer { margin-inline: 5vw; }
}
@media (max-width: 760px) {
  body { font-size: 14px; }
  .section { padding: 4.5rem 6vw; }
  .section-heading { display: block; margin-bottom: 2.5rem; }
  h2 { font-size: 2.8rem; }
  .eyebrow { font-size: .57rem; margin-bottom: 1rem; }
  .site-header { padding: .6rem 5vw; gap: .5rem; }
  .header-brand { flex-basis: 48px; height: 37px; }
  .site-header nav { gap: .8rem; justify-content: flex-end; }
  .site-header nav a { font-size: .65rem; }
  #giftNav { display: none; }
  .hero { padding: 2.5rem 7vw 0; grid-template-columns: 1fr; gap: 1.5rem; }
  .hero-copy { padding: 0; text-align: center; }
  .hero .eyebrow { margin-bottom: .9rem; font-size: .54rem; }
  .guest-line { font-size: 1.12rem; margin: 0 0 .8rem; }
  .hero h1 { display: flex; justify-content: center; align-items: baseline; gap: .1em; margin: 0 0 1.15rem; font-size: clamp(3.3rem, 12.3vw, 5.6rem); letter-spacing: -.025em; }
  .hero h1 > span:last-child { padding: 0; }
  .hero h1 i { position: static; font-size: .45em; transform: none; }
  .hero-promise { font-size: 1.4rem; margin-bottom: 1.1rem; }
  .hero-promise br { display: none; }
  .hero-promise em::before { content: " "; }
  .date-lockup { margin: 0 auto; padding-top: .8rem; }
  .date-lockup strong { font-size: 2.75rem; }
  .date-lockup span { font-size: .57rem; }
  .hero-link { margin-top: .75rem; min-height: 38px; min-width: 142px; font-size: .72rem; }
  .hero-event-note { margin: .75rem auto 0; }
  .hero-visual { width: min(82%, 440px); margin: 1rem auto 0; padding: .5rem 0 1.4rem; }
  .hero-photo { aspect-ratio: .96; }
  .hero-visual::before { inset: -.5rem -.9rem 2.3rem 1.3rem; }
  .hero-stamp { width: 73px; height: 73px; top: -1.7rem; right: -.85rem; }
  .hero-stamp span { font-size: .36rem; }
  .hero-stamp b { font-size: 1.5rem; }
  .hero-side-note { font-size: .46rem; right: -1.7rem; }
  .hero-handnote { font-size: 1.7rem; bottom: -.3rem; }
  .hero-botanical { left: -2.7rem; bottom: -.75rem; width: 90px; }
  .hero-bottom { margin-top: 1.4rem; padding: 1.3rem 0; font-size: .6rem; }
  .hero-bottom > span { max-width: 140px; }
  .hero-bottom > a { max-width: 140px; text-align: right; }
  .hero-bottom a span { margin-left: .3rem; }
  .invitation { display: block; }
  .letter-aside { display: none; }
  .letter-sheet { padding: 1.7rem; }
  .letter-top { margin-bottom: 1.4rem; gap: .5rem; padding-bottom: 1rem; }
  .letter-top .eyebrow { max-width: 170px; font-size: .49rem; }
  .letter-mark { font-size: 1.3rem; }
  .letter-salutation { font-size: 1.2rem; }
  .letter-sheet h2 { font-size: 2.6rem; }
  .invitation-text { font-size: .86rem; margin-top: 1.2rem; }
  blockquote { font-size: 1.3rem; }
  .letter-signature { font-size: 2rem; }
  .event-intro { max-width: 350px; font-size: .83rem; margin-top: 1.5rem; }
  .celebration-grid { grid-template-columns: 1fr; gap: 1.7rem; }
  .celebration { padding: 1.8rem 1.65rem 0; }
  .celebration h3 { font-size: 2.4rem; }
  .celebration-detail strong { font-size: 1.6rem; }
  .celebration-time strong { font-size: 3.2rem; }
  .countdown { display: block; margin-top: 2.5rem; padding-top: 2rem; text-align: center; }
  .countdown h2 { font-size: 1.9rem; }
  .countdown h2 br { display: none; }
  .countdown-grid { margin-top: 1.8rem; }
  .countdown-grid > div:first-child { border-left: 0; }
  .countdown-grid strong { font-size: 2.75rem; }
  .countdown-grid span { font-size: .49rem; }
  .gallery-heading h2 { font-size: 2.8rem; }
  .gallery-intro { max-width: none; margin-top: 1.25rem; }
  .gallery-intro p { margin: .6rem 0; font-size: 1.3rem; }
  .gallery-intro p br { display: none; }
  .gallery-grid { gap: 1rem; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .gallery-grid figure, .gallery-grid figure:nth-child(2), .gallery-grid figure:nth-child(3) { grid-column: auto; grid-row: auto; margin: 0; }
  .gallery-grid figure:first-child { grid-column: 1 / -1; grid-row: 1; }
  .gallery-grid figure:first-child .gallery-frame { aspect-ratio: .95; border-radius: 110px 0 0 0; }
  .gallery-grid figure:nth-child(2) .gallery-frame { aspect-ratio: 3 / 4; }
  .gallery-grid figure:nth-child(3) { margin-top: 2rem; }
  .gallery-grid figure:nth-child(3) .gallery-frame { aspect-ratio: 3 / 4; border-width: 4px; }
  .album-end { margin-top: 1.5rem; }
  .album-end .botanical { width: 42px; height: 70px; }
  .wishes { display: block; }
  .wishes-copy h2 { font-size: 2.65rem; }
  .wishes-copy > p:not(.eyebrow) { margin-block: 1.25rem; font-size: .87rem; }
  .wishes-signature { font-size: 2.1rem; }
  .wishes-form { padding: 1.6rem; margin-top: 2rem; }
  .postcard-top { padding-bottom: 1rem; margin-bottom: 1.2rem; }
  .gift { grid-template-columns: 1fr; gap: 2.5rem; }
  .gift-copy { grid-row: 1; }
  .gift-copy h2 { font-size: 2.65rem; }
  .gift-preview { width: 88%; max-width: 360px; min-height: 240px; padding: 1.5rem; }
  .gift-copy > p:not(.eyebrow) { font-size: .87rem; }
  .closing { padding-top: 1rem; padding-bottom: 3rem; }
  .closing-card.has-photo { grid-template-columns: 1fr; }
  .closing-photo img { min-height: 0; aspect-ratio: 1.1; }
  .closing-copy { padding: 2rem 1.65rem; }
  .closing-copy h2 { font-size: 2.8rem; }
  .closing-warmth { font-size: .83rem; }
  .closing-signature { font-size: 2.15rem; }
  .wedding-footer { grid-template-columns: 55px 1fr; gap: .5rem 1rem; padding-bottom: 8rem; margin-inline: 6vw; }
  .footer-emblem { width: 55px; }
  .footer-names { font-size: 1.9rem; }
  .footer-date { grid-column: 2; }
  .footer-thanks, .music-credit { grid-column: 1 / -1; }
  .music-toggle { padding: .6rem .8rem; min-width: 44px; }
  .music-disc { width: 20px; height: 20px; font-size: .85rem; }
  .book-toggle { font-size: .65rem; padding: .6rem .8rem; }
  .draft-badge { font-size: .61rem; right: .8rem; }
  .music-status { font-size: .72rem; }
  .book-cover-names { font-size: clamp(2.8rem, 10vw, 4.5rem); }
}
@media (max-width: 370px) {
  .site-header nav { gap: .6rem; }
  .site-header nav a { font-size: .6rem; }
  .hero h1 { font-size: 3.4rem; }
  .hero .eyebrow { letter-spacing: .13em; }
  .letter-sheet, .wishes-form { padding: 1.25rem; }
  .letter-sheet h2, .wishes-copy h2, .gift-copy h2 { font-size: 2.3rem; }
  .hero-bottom { font-size: .55rem; }
}

.modal {
  width: min(calc(100% - 2rem), 620px);
  max-height: calc(100svh - 2rem);
  padding: 0;
  overflow: auto;
  border: 0;
  background: var(--white);
  color: var(--ink);
  box-shadow: 0 30px 100px rgb(0 0 0 / 38%);
}

.modal::backdrop {
  background: rgb(24 18 18 / 78%);
  backdrop-filter: blur(8px);
}

.modal-close {
  position: absolute;
  top: 0.85rem;
  right: 0.85rem;
  z-index: 3;
  display: grid;
  width: 42px;
  height: 42px;
  padding: 0;
  border: 1px solid rgb(151 61 89 / 18%);
  border-radius: 50%;
  background: var(--white);
  color: var(--wine);
  font-size: 1.6rem;
  line-height: 1;
  place-items: center;
  cursor: pointer;
}

.modal-content {
  padding: clamp(2rem, 7vw, 4rem);
  text-align: center;
}

.modal-content h2 {
  font-size: clamp(2rem, 6vw, 3.4rem);
}

.qr-frame {
  position: relative;
  width: min(100%, 310px);
  margin: 2rem auto 0;
  padding: 1rem;
  border: 1px solid rgb(151 61 89 / 16%);
  background: #fff;
}

.qr-frame img {
  width: 100%;
}

.qr-demo-stamp {
  position: absolute;
  right: -0.8rem;
  bottom: 1.2rem;
  padding: 0.45rem 0.75rem;
  border: 2px solid var(--wine);
  background: var(--white);
  color: var(--wine);
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  transform: rotate(-6deg);
}

.bank-details {
  display: flex;
  margin-top: 1.5rem;
  flex-direction: column;
  gap: 0.25rem;
}

.bank-details span {
  color: #6c625b;
}

.bank-details strong {
  color: var(--wine-dark);
  font-family: var(--serif);
  font-size: 1.45rem;
}

.bank-details code {
  font-family: var(--sans);
  font-size: 0.9rem;
}

.modal-note {
  max-width: 440px;
  margin: 1.2rem auto 0;
  color: #786e67;
  font-size: 0.82rem;
}

.image-modal {
  width: min(calc(100% - 2rem), 1100px);
  overflow: hidden;
  background: #161412;
  color: #fff;
}

.image-modal img {
  width: 100%;
  max-height: calc(100svh - 6rem);
  object-fit: contain;
}

.image-modal p {
  margin: 0;
  padding: 0.8rem 1.2rem 1rem;
  text-align: center;
}

.image-modal-close {
  border-color: rgb(255 255 255 / 25%);
  background: rgb(22 20 18 / 72%);
  color: #fff;
}


.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;
}

.reveal {
  opacity: 1;
  transform: none;
  transition: opacity 450ms ease, transform 450ms ease;
}

.reveal.reveal-pending {
  opacity: 0;
  transform: translateY(12px);
}

.reveal.reveal-pending.is-visible {
  opacity: 1;
  transform: none;
}


@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }

  .reveal.reveal-pending {
    opacity: 1;
    transform: none;
  }

  .falling-flowers {
    display: none;
  }
}

@media (max-height: 560px) {
  .intro-letter { bottom: calc(50% + 65px); }
  .book-cover-names { flex-direction: row; margin-top: .3rem; font-size: 2.5rem; }
  .book-cover { width: 88px; height: 88px; }
  .wax-seal svg { width: 62px; height: 62px; }
  .intro-bottom { top: calc(50% + 65px); }
  .book-intro-hint { margin-top: .35rem; }
}
