/* hallmark · theme: custom · idea: "a Filipino wedding invitation in white, leaf green and gold, read top to bottom" · vibe: "fresh, formal, garden wedding, quiet gold" · paper light · display Marcellus + Pinyon Script (names only) · body EB Garamond · accent leaf green, swappable by data-palette · hero: full-bleed photo slideshow, names set huge in script bottom-left */
/* critique: the page must hold any couple's content, so every section survives a missing field; colour lives only in the palette blocks so one attribute re-skins the site */
/* waive 48: palette blocks are declared theme blocks (one per palette), and dress-code swatches are the couple's own colours, set from content */
/* waive 58: a wedding site carries the couple's whole programme (entourage, schedule, reminders); word count is the content, not filler */

/* ── Palettes: data-palette on <html> picks one. Add a palette by copying a block. ── */
:root,
[data-palette="sampaguita"] {
  --paper: oklch(98.6% 0.006 130);
  --paper-2: oklch(95.6% 0.016 135);
  --ink: oklch(25% 0.03 160);
  --ink-soft: oklch(44% 0.025 160);
  --line: oklch(87% 0.02 140);
  --accent: oklch(43% 0.075 158);
  --accent-hover: oklch(36% 0.07 158);
  --on-accent: oklch(98.6% 0.006 130);
  --gold: oklch(74% 0.085 85);
  --deep: oklch(29% 0.045 162);
  --on-deep: oklch(97% 0.01 120);
  --on-deep-soft: oklch(84% 0.025 130);
  --shade: oklch(18% 0.03 160);
}
[data-palette="dusty-blue"] {
  --paper: oklch(98.5% 0.005 240);
  --paper-2: oklch(95% 0.015 240);
  --ink: oklch(25% 0.03 255);
  --ink-soft: oklch(45% 0.03 255);
  --line: oklch(87% 0.02 245);
  --accent: oklch(45% 0.075 252);
  --accent-hover: oklch(38% 0.07 252);
  --on-accent: oklch(98.5% 0.005 240);
  --gold: oklch(80% 0.03 250);
  --deep: oklch(30% 0.05 256);
  --on-deep: oklch(97% 0.008 240);
  --on-deep-soft: oklch(84% 0.025 245);
  --shade: oklch(18% 0.035 256);
}
[data-palette="terracotta"] {
  --paper: oklch(98% 0.01 70);
  --paper-2: oklch(94.5% 0.025 65);
  --ink: oklch(27% 0.03 45);
  --ink-soft: oklch(46% 0.035 45);
  --line: oklch(87% 0.03 60);
  --accent: oklch(52% 0.12 40);
  --accent-hover: oklch(45% 0.11 40);
  --on-accent: oklch(98% 0.01 70);
  --gold: oklch(66% 0.07 120);
  --deep: oklch(33% 0.06 40);
  --on-deep: oklch(97% 0.012 70);
  --on-deep-soft: oklch(86% 0.03 60);
  --shade: oklch(20% 0.04 40);
}
[data-palette="blush-sage"] {
  --paper: oklch(97.2% 0.012 85);
  --paper-2: oklch(94% 0.022 30);
  --ink: oklch(32% 0.015 50);
  --ink-soft: oklch(48% 0.018 50);
  --line: oklch(86% 0.025 40);
  --accent: oklch(50% 0.045 135);
  --accent-hover: oklch(43% 0.045 135);
  --on-accent: oklch(97.2% 0.012 85);
  --gold: oklch(72% 0.06 20);
  --deep: oklch(42% 0.035 135);
  --on-deep: oklch(97.5% 0.012 85);
  --on-deep-soft: oklch(88% 0.025 85);
  --shade: oklch(22% 0.02 50);
}
[data-palette="midnight"] {
  --paper: oklch(20% 0.03 260);
  --paper-2: oklch(24% 0.035 260);
  --ink: oklch(95% 0.012 90);
  --ink-soft: oklch(78% 0.02 90);
  --line: oklch(36% 0.03 260);
  --accent: oklch(80% 0.09 85);
  --accent-hover: oklch(86% 0.08 85);
  --on-accent: oklch(20% 0.03 260);
  --gold: oklch(80% 0.09 85);
  --deep: oklch(15% 0.03 260);
  --on-deep: oklch(95% 0.012 90);
  --on-deep-soft: oklch(78% 0.02 90);
  --shade: oklch(10% 0.02 260);
}

:root {
  --font-display: 'Marcellus', 'Times New Roman', serif;
  --font-body: 'EB Garamond', 'Times New Roman', serif;
  --font-script: 'Pinyon Script', 'Segoe Script', cursive;
  --step--1: 0.95rem;
  --step-0: 1.15rem;
  --step-1: 1.4rem;
  --step-2: 1.9rem;
  --step-3: clamp(2.2rem, 4.5vw, 3.2rem);
  --step-4: clamp(3rem, 8vw, 5.6rem);
  --step-names: clamp(3.4rem, 10vw, 7.5rem);
  --wrap: 72rem;
  --gutter: clamp(1.25rem, 4vw, 2.5rem);
  --gap: clamp(1.5rem, 4vw, 3rem);
  --sec: clamp(4.5rem, 10vw, 8rem);
  --radius: 2px;
  --nav-h: 3.5rem;
  --ease: cubic-bezier(.22, .61, .36, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { overflow-x: clip; scroll-behavior: smooth; scroll-padding-top: var(--nav-h); -webkit-text-size-adjust: 100%; }
body { overflow-x: clip; margin: 0; background: var(--paper); color: var(--ink); font-family: var(--font-body); font-size: var(--step-0); line-height: 1.65; }
body.is-locked { overflow: hidden; }
img { display: block; max-width: 100%; }
a { color: inherit; }
p { margin: 0 0 1em; }
h1, h2, h3 { text-wrap: balance; margin: 0; font-family: var(--font-display); font-weight: 400; line-height: 1.12; color: var(--ink); overflow-wrap: break-word; min-width: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; transition: none; }
.script { font-family: var(--font-script); font-weight: 400; line-height: 1.05; }
.amp { font-family: var(--font-script); }
.note { font-style: italic; color: var(--ink-soft); }
.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); }

/* ── Buttons: one style, a ghost and a light variant for dark grounds ── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; min-height: 2.9rem; padding: 0.6rem 1.5rem;
  border: 1px solid var(--accent); border-radius: var(--radius); background: var(--accent); color: var(--on-accent);
  font-family: var(--font-body); font-size: var(--step-0); text-decoration: none; line-height: 1.2;
  transition: background-color .25s var(--ease), color .25s var(--ease), border-color .25s var(--ease), transform .25s var(--ease);
}
.btn:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.btn:active { transform: translateY(1px); }
.btn:disabled, .btn[aria-disabled="true"] { opacity: .55; cursor: not-allowed; }
.btn-ghost { background: transparent; color: var(--accent); }
.btn-ghost:hover { background: var(--accent); color: var(--on-accent); }
.btn-light { background: transparent; border-color: var(--on-deep); color: var(--on-deep); }
.btn-light:hover { background: var(--on-deep); color: var(--deep); border-color: var(--on-deep); }
.btn-light:focus-visible { outline-color: var(--on-deep); }
.actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1.75rem; }

/* ── Sections ── */
.sec { padding-block: var(--sec); position: relative; }
.alt { background: var(--paper-2); }
.deep { background: var(--deep); color: var(--on-deep); }
.deep h2, .deep h3 { color: var(--on-deep); }
.deep .note, .deep .sec-sub { color: var(--on-deep-soft); }
.sec-head { margin-bottom: clamp(2rem, 5vw, 3.5rem); max-width: 40rem; }
.sec-head h2 { font-size: var(--step-3); }
.sec-head h2::after { content: ""; display: block; width: 3rem; height: 1px; margin-top: 1.1rem; background: var(--gold); }
.sec-sub { margin: 1rem 0 0; font-style: italic; color: var(--ink-soft); font-size: var(--step-1); line-height: 1.4; }
.role { display: block; font-style: italic; color: var(--ink-soft); font-size: var(--step--1); }

/* ── Opening screen: only exists when scripting is on ── */
.intro { display: none; }
.js .intro {
  position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: var(--gutter);
  background: var(--deep); color: var(--on-deep); text-align: center; cursor: pointer; transition: opacity .9s var(--ease);
}
.js .intro.is-leaving { opacity: 0; pointer-events: none; }
.intro-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .38; }
.intro-body { position: relative; }
.intro-line { font-style: italic; font-size: var(--step-1); margin-bottom: .5rem; }
.intro-names { font-size: var(--step-names); margin: 0 0 1rem; }
.intro-date { font-family: var(--font-display); font-size: var(--step-1); margin-bottom: 2.25rem; }
.intro:hover .btn-light { background: var(--on-deep); color: var(--deep); }
.intro:focus-visible { outline-offset: -8px; outline-color: var(--on-deep); }

/* ── Nav: appears once the hero has scrolled away ── */
.nav {
  position: fixed; inset: 0 0 auto; z-index: 50; height: var(--nav-h); display: flex; align-items: center; gap: 1.5rem;
  padding-inline: var(--gutter); background: color-mix(in oklch, var(--paper) 94%, transparent); border-bottom: 1px solid var(--line);
  backdrop-filter: blur(8px); transform: translateY(-105%); transition: transform .45s var(--ease);
}
.nav.is-shown, .nav:focus-within { transform: none; }
.nav-mark { font-family: var(--font-display); font-size: var(--step-1); text-decoration: none; white-space: nowrap; }
.nav-mark .amp { color: var(--gold); }
.nav ul { display: flex; gap: clamp(1rem, 3vw, 2rem); margin-left: auto; overflow-x: auto; scrollbar-width: none; }
.nav a { text-decoration: none; white-space: nowrap; font-size: var(--step--1); }
.nav ul a:hover { color: var(--accent); }
@media (max-width: 640px) { .nav-mark { display: none; } .nav ul { margin-left: 0; } }

/* ── Hero ── */
.is-shot .hero { min-height: 812px; }
.hero { position: relative; min-height: 100svh; display: flex; align-items: flex-end; color: var(--on-deep); background: var(--shade); overflow: hidden; }
.hero-media, .slide { position: absolute; inset: 0; }
.slide { opacity: 0; transition: opacity 1.8s var(--ease); }
.slide.is-on { opacity: 1; }
.slide img { width: 100%; height: 100%; object-fit: cover; object-position: var(--focus); transform: scale(1.06); transition: transform 9s linear; }
.slide.is-on img { transform: scale(1); }
@media (max-width: 720px) { .slide img { object-position: var(--focus-m); } }
.hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, color-mix(in oklch, var(--shade) 82%, transparent) 0%, color-mix(in oklch, var(--shade) 30%, transparent) 45%, transparent 70%); }
.hero-body { position: relative; z-index: 1; padding-block: 0 clamp(2.5rem, 7vh, 5rem); }
.hero h1 { font-family: var(--font-script); font-size: var(--step-names); color: var(--on-deep); line-height: 1; margin-bottom: 1rem; }
.hero-line { max-width: 34rem; font-size: var(--step-1); line-height: 1.4; }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 2rem; margin-top: 1.5rem; }
.countdown { display: flex; gap: 1.25rem; font-style: italic; color: var(--on-deep-soft); }
.countdown b { font-family: var(--font-display); font-style: normal; font-weight: 400; font-size: var(--step-2); color: var(--on-deep); margin-right: .2rem; font-variant-numeric: tabular-nums; }
.countdown.is-done { font-family: var(--font-display); font-style: normal; font-size: var(--step-1); color: var(--on-deep); }

/* ── Save the date ── */
.std-grid { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: var(--gap); align-items: center; }
.std-big { font-size: var(--step-4); line-height: 1; }
.std-big span { display: block; color: var(--accent); }
.std-when { font-size: var(--step-1); font-style: italic; color: var(--ink-soft); margin-top: 1rem; }
.cal { width: 100%; max-width: 26rem; justify-self: end; border-collapse: collapse; text-align: center; font-variant-numeric: tabular-nums; }
.cal caption { font-family: var(--font-display); font-size: var(--step-1); margin-bottom: 1rem; text-align: left; }
.cal th { font-weight: 400; font-style: italic; color: var(--ink-soft); font-size: var(--step--1); padding-bottom: .5rem; }
.cal td { height: 2.8rem; border-top: 1px solid var(--line); }
.cal .is-day span { display: inline-grid; place-items: center; width: 2.4rem; height: 2.4rem; border-radius: 50%; background: var(--accent); color: var(--on-accent); }
@media (max-width: 760px) { .std-grid { grid-template-columns: minmax(0, 1fr); } .cal { justify-self: start; } }

/* ── Invitation ── */
.invite { overflow: hidden; }
.invite-bg, .invite-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .22; }
.invite-video { opacity: 0; transition: opacity 1.2s var(--ease); overflow: hidden; }
.invite-video.is-ready { opacity: .35; }
.invite-video video, .invite-video iframe { position: absolute; top: 50%; left: 50%; min-width: 100%; min-height: 100%; width: 177.78vh; height: 56.25vw; transform: translate(-50%, -50%); border: 0; object-fit: cover; pointer-events: none; }
.invite-body { position: relative; max-width: 44rem; margin-inline: auto; text-align: center; }
.invite h2 { font-family: var(--font-script); font-size: var(--step-4); margin-bottom: 1.5rem; }
.invite p { font-size: var(--step-1); line-height: 1.5; }
.invite .btn { margin-top: 1rem; }

/* ── Story reel: scroll sideways, tap a year ── */
.reel {
  display: grid; grid-auto-flow: column; grid-auto-columns: clamp(13rem, 24vw, 17rem); gap: 1.25rem;
  --reel-pad: max(var(--gutter), calc((100% - var(--wrap)) / 2 + var(--gutter)));
  overflow-x: auto; scroll-snap-type: x mandatory; padding: .5rem var(--reel-pad) 1.5rem; scroll-padding-inline: var(--reel-pad);
  scrollbar-width: thin; scrollbar-color: var(--line) transparent;
}
.reel li { scroll-snap-align: start; }
.reel-card { display: block; width: 100%; padding: 0; border: 0; background: none; text-align: left; }
.reel-ph { display: block; aspect-ratio: 3 / 4; overflow: hidden; background: var(--paper-2); }
.reel-ph img { width: 100%; height: 100%; object-fit: cover; object-position: var(--focus); transition: transform .6s var(--ease); }
.reel-card:hover .reel-ph img { transform: scale(1.04); }
.reel-year { display: block; font-family: var(--font-display); font-size: var(--step-2); margin-top: .75rem; color: var(--accent); }
.reel-title { display: block; line-height: 1.35; }
.story-plain { max-width: 40rem; }

/* ── Entourage ── */
.ent-parents { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--gap); padding-bottom: var(--gap); margin-bottom: var(--gap); border-bottom: 1px solid var(--line); }
.ent-parents h3, .ent-group h3 { font-size: var(--step-1); margin-bottom: .75rem; }
.ent-parents li { margin-bottom: .6rem; font-size: var(--step-1); }
.memoriam { color: var(--ink-soft); }
.ent-groups { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: calc(var(--gap) * 1.2) var(--gap); }
.ent-note { font-style: italic; color: var(--ink-soft); margin: -.5rem 0 .75rem; }
.ent-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr)); gap: 1rem 2rem; }
.ent-cols li, .ent-pairs li { line-height: 1.45; margin-bottom: .2rem; }
.ent-pairs li { margin-bottom: .7rem; }
@media (max-width: 760px) { .ent-groups, .ent-parents { grid-template-columns: minmax(0, 1fr); } }

/* ── Venues ── */
.venues { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--gap); }
.venue img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.venue-body { padding-top: 1.25rem; }
.venue h3 { font-family: var(--font-body); font-size: var(--step-0); color: var(--ink-soft); }
.venue-time { font-family: var(--font-display); font-size: var(--step-3); color: var(--accent); margin: .25rem 0 .5rem; line-height: 1.1; }
.venue-name { font-family: var(--font-display); font-size: var(--step-1); margin-bottom: .25rem; }
.venue-area { color: var(--ink-soft); margin-bottom: 1.25rem; }
@media (max-width: 760px) { .venues { grid-template-columns: minmax(0, 1fr); } }

/* ── Dress code ── */
.dress { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: var(--gap); align-items: start; }
.dress-photos { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.dress-photos img { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; }
.dress-notes > div { margin-bottom: 1.75rem; }
.dress-notes h3 { font-size: var(--step-1); margin-bottom: .5rem; }
.swatches { display: flex; flex-wrap: wrap; gap: 1.25rem; }
.swatches li { display: grid; justify-items: center; gap: .4rem; font-size: var(--step--1); }
.swatches i { width: 3.25rem; height: 3.25rem; border-radius: 50%; background: var(--swatch); box-shadow: inset 0 0 0 1px color-mix(in oklch, var(--ink) 12%, transparent); }
@media (max-width: 760px) { .dress { grid-template-columns: minmax(0, 1fr); } }

/* ── Schedule ── */
.sched-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: var(--gap); }
.sched li { display: grid; grid-template-columns: 7.5rem minmax(0, 1fr); gap: 1.25rem; padding: 1.1rem 0; border-top: 1px solid var(--line); }
.sched li:last-child { border-bottom: 1px solid var(--line); }
.sched time { font-family: var(--font-display); font-size: var(--step-1); color: var(--accent); font-variant-numeric: tabular-nums; white-space: nowrap; }
.sched b { display: block; font-weight: 500; font-size: var(--step-1); line-height: 1.3; }
.sched span { color: var(--ink-soft); }
@media (max-width: 760px) { .sched-grid { grid-template-columns: minmax(0, 1fr); } .sched li { grid-template-columns: 6.5rem minmax(0, 1fr); gap: .75rem; } }

/* ── Film ── */
.film { position: relative; aspect-ratio: 16 / 9; background: var(--shade); }
.film iframe, .film video { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* ── Gifts ── */
.gifts-body { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: var(--gap); }
.gifts-body p { font-size: var(--step-1); line-height: 1.5; }
.gifts .btn { margin-top: .75rem; }
@media (max-width: 760px) { .gifts-body { grid-template-columns: minmax(0, 1fr); } }

/* ── RSVP ── */
.rsvp-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: var(--gap); align-items: start; }
.rsvp-card { padding: clamp(1.5rem, 4vw, 2.5rem); border: 1px solid var(--line); background: var(--paper); }
.finder label { display: block; margin-bottom: .5rem; }
.finder-row { display: flex; flex-wrap: wrap; gap: .75rem; }
.finder-row input { flex: 1 1 14rem; }
input, select, textarea {
  min-height: 2.9rem; padding: .55rem .8rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper); color: var(--ink);
  transition: border-color .2s var(--ease);
}
input:hover, select:hover, textarea:hover { border-color: var(--ink-soft); }
input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 2px solid var(--accent); outline-offset: 0; border-color: var(--accent); }
input[aria-invalid="true"] { border-color: var(--accent); }
.results { margin-top: 1.25rem; }
.results:empty { display: none; }
.results p { margin-bottom: .75rem; }
.results ul { display: grid; gap: .5rem; }
.pick {
  width: 100%; display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: .8rem 1rem; text-align: left;
  border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper-2); transition: border-color .2s var(--ease), background-color .2s var(--ease);
}
.pick:hover { border-color: var(--accent); }
.pick small { color: var(--ink-soft); font-size: var(--step--1); white-space: nowrap; }
@media (max-width: 760px) { .rsvp-grid { grid-template-columns: minmax(0, 1fr); } }

/* ── Reminders ── */
.rem { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--gap); }
.rem h3 { font-size: var(--step-1); margin-bottom: 1rem; }
.rem li { position: relative; padding-left: 1.75rem; margin-bottom: .85rem; line-height: 1.5; }
.rem li::before { position: absolute; left: 0; top: 0; font-family: var(--font-display); color: var(--accent); }
.rem-do li::before { content: "\2713"; }
.rem-avoid li::before { content: "\2715"; color: var(--ink-soft); }
.rem-note { max-width: 46rem; margin-top: var(--gap); font-style: italic; color: var(--ink-soft); font-size: var(--step-1); line-height: 1.5; }
@media (max-width: 760px) { .rem { grid-template-columns: minmax(0, 1fr); } }

/* ── Gallery ── */
.gal { columns: 3 16rem; column-gap: 1rem; }
.gal li { break-inside: avoid; margin-bottom: 1rem; }
.gal button { display: block; width: 100%; padding: 0; border: 0; background: var(--paper-2); overflow: hidden; }
.gal img { width: 100%; height: auto; transition: transform .6s var(--ease), opacity .3s var(--ease); }
.gal button:hover img { transform: scale(1.03); }

/* ── Footer ── */
.foot { padding: var(--sec) var(--gutter) calc(var(--sec) * .6); text-align: center; }
.foot-names { font-size: var(--step-4); margin-bottom: 1rem; }
.foot p { max-width: 36rem; margin-inline: auto; }
.credit { margin-top: 2.5rem; font-size: var(--step--1); color: var(--on-deep-soft); }

/* ── Music ── */
.player { position: fixed; right: var(--gutter); bottom: calc(1rem + env(safe-area-inset-bottom, 0px)); z-index: 60; display: flex; align-items: center; gap: .6rem; }
.player[hidden] { display: none; }
.player-btn { width: 3rem; height: 3rem; border-radius: 50%; border: 1px solid var(--line); background: var(--paper); display: grid; place-items: center; box-shadow: 0 8px 20px -12px var(--shade); transition: border-color .2s var(--ease), transform .2s var(--ease); }
.player-btn:hover { border-color: var(--accent); }
.player-btn:active { transform: scale(.96); }
.eq { display: flex; align-items: flex-end; gap: 3px; height: 1rem; }
.eq i { width: 3px; height: 100%; background: var(--accent); transform-origin: bottom; animation: eq 1s ease-in-out infinite alternate; }
.eq i:nth-child(2) { animation-delay: -.4s; }
.eq i:nth-child(3) { animation-delay: -.7s; }
.player.is-paused .eq i { animation: none; transform: scaleY(.3); }
@keyframes eq { from { transform: scaleY(.25); } to { transform: scaleY(1); } }
.player-now { margin: 0; padding: .35rem .8rem; background: var(--paper); border: 1px solid var(--line); font-size: var(--step--1); font-style: italic; max-width: 15rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; opacity: 0; transform: translateX(.5rem); transition: opacity .4s var(--ease), transform .4s var(--ease); pointer-events: none; }
.player.is-telling .player-now { opacity: 1; transform: none; }

/* ── Dialogs ── */
.dlg { position: fixed; border: 0; padding: clamp(1.5rem, 4vw, 2.5rem); background: var(--paper); color: var(--ink); max-width: min(56rem, calc(100% - 2rem)); max-height: calc(100svh - 2rem); overflow: auto; }
.dlg::backdrop { background: color-mix(in oklch, var(--shade) 72%, transparent); }
.dlg[open] { animation: dlgIn .35s var(--ease); }
@keyframes dlgIn { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
.dlg-close { position: absolute; top: .4rem; right: .6rem; width: 2.6rem; height: 2.6rem; border: 0; background: none; font-size: 1.8rem; line-height: 1; color: inherit; border-radius: 50%; transition: background-color .2s var(--ease); }
.dlg-close:hover { background: var(--paper-2); }
.story-d { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: var(--gap); }
.story-d-ph img { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; object-position: var(--focus, 50% 40%); }
.story-d-year { font-family: var(--font-display); font-size: var(--step-3); color: var(--accent); margin: 0 0 .25rem; line-height: 1; }
.story-d h3 { font-size: var(--step-2); margin-bottom: 1.25rem; }
.story-d-nav { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1.5rem; }
@media (max-width: 700px) { .story-d { grid-template-columns: minmax(0, 1fr); } .story-d-ph img { aspect-ratio: 4 / 3; } }
.dlg-photo { padding: 0; background: var(--shade); max-width: calc(100% - 1rem); }
.dlg-photo img { max-height: calc(100svh - 3rem); width: auto; margin: auto; }
.dlg-photo .dlg-close, .ph-nav { color: var(--on-deep); }
.dlg-photo .dlg-close:hover, .ph-nav:hover { background: color-mix(in oklch, var(--on-deep) 16%, transparent); }
.ph-nav svg { width: 1.4rem; height: 1.4rem; margin: auto; }
.ph-nav { position: absolute; top: 50%; translate: 0 -50%; width: 3rem; height: 3rem; border: 0; border-radius: 50%; background: color-mix(in oklch, var(--shade) 40%, transparent); font-size: 2rem; line-height: 1; transition: background-color .2s var(--ease); }
.ph-nav.prev { left: .5rem; } .ph-nav.next { right: .5rem; }
.ph-count { position: absolute; left: 50%; bottom: .5rem; translate: -50% 0; margin: 0; color: var(--on-deep); font-size: var(--step--1); }
.dlg-gift, .dlg-rsvp { width: min(30rem, calc(100% - 2rem)); text-align: center; }
.dlg-gift h3, .dlg-rsvp h3 { font-family: var(--font-script); font-size: var(--step-3); margin-bottom: 1rem; }
.qr { width: min(16rem, 100%); margin: 1rem auto; background: var(--on-deep); padding: .5rem; }
.rsvp-who b { font-family: var(--font-display); font-weight: 400; font-size: var(--step-1); }
.rsvp-who span { color: var(--ink-soft); font-style: italic; }
.form { text-align: left; display: grid; gap: 1.1rem; margin-top: 1.25rem; }
.form fieldset { border: 0; padding: 0; margin: 0; display: grid; gap: .4rem; }
.form legend, .field label { margin-bottom: .4rem; display: block; }
.field { display: grid; }
.radio { display: flex; align-items: center; gap: .6rem; cursor: pointer; }
.radio input { min-height: 0; width: 1.15rem; height: 1.15rem; accent-color: var(--accent); }
.form-note { margin: 0; color: var(--accent); min-height: 1.5em; }
.rsvp-thanks p { font-size: var(--step-1); }

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