/* A Winter Promise (public/templates/a-winter-promise.html). One continuous scroll over a snowy backdrop that never stops: a canvas fixed behind the page
   (#sky) draws soft snow falling at three depths, with warm candle lights among it, and the snow comes toward you as you scroll. Every chapter is one
   crafted drawing (winterpromise-art.js) that slides into place as it arrives, so there is never a cut, a black frame or a fade between scenes.
   The palette is the brief's: Winter Ivory, Frosted Silver, Midnight Navy, Champagne, Glacier Blue, Evergreen, Warm Candlelight. Light only.
   The fast-and-reactive rule: only transform and opacity move; nothing that moves carries a filter; drawings are flat images made once. */
:root {
  --ivory: #F7F5F0;
  --paper: #FFFDFA;
  --silver: #C8CDD2;
  --silver-deep: #7C858F;
  --navy: #172535;
  --ink: #1E2A36;
  --ink-soft: #4F5B66;
  --champ: #D8C5A5;
  --champ-deep: #9C8257;
  --glacier: #DCE8EE;
  --ever: #34483F;
  --candle: #F3D5A4;
  --display: "Cormorant Garamond", "Iowan Old Style", Georgia, serif;
  --serif: "EB Garamond", Georgia, "Times New Roman", serif;
  --ui: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --silver-foil: linear-gradient(100deg, #66707B 0%, #A9B1BA 24%, #EEF1F4 42%, #FFFFFF 48%, #CDD3D9 58%, #8C949D 80%, #66707B 100%);
  color-scheme: light;
}
html, body { background: var(--ivory); color: var(--ink); }
body { margin: 0; font-family: var(--serif); font-size: 18px; line-height: 1.6; overflow-x: hidden; -webkit-tap-highlight-color: transparent; }
button { font: inherit; color: inherit; cursor: pointer; }
:focus-visible { outline: 2px solid var(--champ-deep); outline-offset: 4px; }
img { display: block; max-width: 100%; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -9999px; top: 8px; z-index: 90; padding: 10px 14px; background: var(--paper); border-radius: 8px; }
.skip:focus { left: max(16px, env(safe-area-inset-left, 0px)); }

#sky { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 0; display: block; pointer-events: none; }
#story { position: relative; z-index: 1; overflow-x: hidden; overflow-x: clip; }

/* ---------- type ---------- */
.caps { margin: 0; font-family: var(--ui); font-weight: 600; font-size: 11px; letter-spacing: .28em; text-transform: uppercase; color: var(--silver-deep); }
.foil { background: var(--silver-foil); background-size: 100% 100%; -webkit-background-clip: text; background-clip: text; color: transparent; }
h1, h2, h3 { margin: 0; font-family: var(--display); font-weight: 300; text-wrap: balance; }
p { margin: 0; }

/* ---------- arriving as you scroll: each piece rests at --rest and waits off to one side until its scene is on screen ---------- */
.rv { transform: var(--rest, none); transition: transform 1.15s cubic-bezier(.16,1,.3,1), opacity .9s ease; transition-delay: var(--d, 0ms); }
.armed .rv.up:not(.in) { transform: translateY(54px); opacity: 0; }
.armed .rv.left:not(.in) { transform: translateX(-46vw) rotate(-4deg); opacity: 0; }
.armed .rv.right:not(.in) { transform: translateX(46vw) rotate(4deg); opacity: 0; }
.armed .rv.pop:not(.in) { transform: scale(.82); opacity: 0; }
.armed .rv.fade:not(.in) { opacity: 0; }

/* ---------- the chapters ---------- */
.ch { position: relative; display: grid; justify-items: center; text-align: center; gap: 22px;
  padding-block: 12vh 8vh; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
.art { position: relative; width: 100%; }
.art > img.base { width: 100%; height: auto; }

/* 1. the arrival */
.c1 { min-height: 100svh; align-content: center; padding-top: 14vh; }
.title { display: grid; justify-items: center; gap: 16px; opacity: 0; transform: translateY(14px); transition: opacity 1.8s ease .6s, transform 1.8s cubic-bezier(.16,1,.3,1) .6s; }
.ready .title { opacity: 1; transform: none; }
.title h1 { font-size: clamp(46px, 12vw, 104px); line-height: .98; letter-spacing: .01em; padding: 0 .04em .06em; }
.sline { width: min(46vw, 220px); height: 1px; background: linear-gradient(90deg, rgba(200,205,210,0), #9AA3AD 30%, #FFFFFF 50%, #9AA3AD 70%, rgba(200,205,210,0)); transform: scaleX(0); transition: transform 2.2s cubic-bezier(.16,1,.3,1) 1.4s; }
.ready .sline { transform: scaleX(1); }
.estate { width: min(94vw, 620px); }
.cue { display: grid; justify-items: center; gap: 6px; margin-top: 4px; }
.cue svg { width: 18px; height: 18px; animation: nudge 2.2s ease-in-out infinite; }
@keyframes nudge { 0%, 100% { transform: translateY(0); opacity: .45; } 50% { transform: translateY(6px); opacity: 1; } }

/* the lettered bands between the chapters, drifting with the scroll */
.band { position: relative; z-index: 1; overflow: hidden; padding-block: 2px; border-block: 1px solid rgba(200,205,210,.75); background: rgba(255,253,250,.6); }
.band.a { transform: rotate(-1.6deg); margin-inline: -4vw; }
.band.b { transform: rotate(1.3deg); margin-inline: -4vw; }
.band-track { display: flex; width: max-content; will-change: transform; }
.band-track span { font-family: var(--display); font-style: italic; font-weight: 300; font-size: clamp(34px, 8vw, 84px); line-height: 1.2; white-space: nowrap; padding-right: .5em; color: transparent; -webkit-text-stroke: 1px #A3ACB6; }
.band-track span:nth-child(even) { -webkit-text-stroke: 0; font-style: normal; font-family: var(--ui); font-weight: 600; font-size: clamp(14px, 3vw, 26px); letter-spacing: .32em; text-transform: uppercase; color: var(--silver-deep); align-self: center; }

/* 2. the entrance: the stage stays while the doors open as you scroll */
.c2 { height: 210svh; padding: 0; display: block; }
.c2 .stage { position: sticky; top: 0; height: 100svh; display: grid; place-items: center; }
.door { position: relative; width: min(74vw, 400px); aspect-ratio: 360 / 440; perspective: 900px; }
.door > img.base { position: absolute; inset: 0; width: 100%; height: 100%; }
.door .glow { position: absolute; left: 25%; top: 25%; width: 50%; height: 65.9%; border-radius: 50% 50% 0 0 / 31% 31% 0 0; background: radial-gradient(60% 50% at 50% 55%, rgba(255,236,196,.95), rgba(243,213,164,.35) 70%, rgba(243,213,164,0)); opacity: 0; pointer-events: none; }
.door .lf { position: absolute; top: 25%; width: 25%; height: 65.9%; will-change: transform; }
.door .lf img { width: 100%; height: 100%; }
.door .lf.l { left: 25%; transform-origin: 0 50%; }
.door .lf.r { left: 50%; transform-origin: 100% 50%; }
.urn { position: absolute; bottom: -2%; width: 46%; z-index: 2; }
.urn.l { left: -24%; }
.urn.r { right: -24%; transform: scaleX(-1); }
.urn.r.rv { --rest: scaleX(-1); }
.urn img { width: 100%; height: auto; }

/* 2b. the first memory: the console inside the door */
.console { width: min(92vw, 540px); }
.frame { position: absolute; box-sizing: border-box; padding: 4.2%; border-radius: 2px;
  background: linear-gradient(135deg, #F2F4F6 0%, #A9B0B8 22%, #EEF1F3 46%, #8E969F 70%, #DCE0E4 100%);
  box-shadow: 0 10px 18px -8px rgba(30,42,54,.45), inset 0 0 0 1px rgba(255,255,255,.7), 0 0 0 1px rgba(124,133,143,.5); }
.frame .win { position: relative; width: 100%; height: 100%; overflow: hidden; background: var(--paper); box-shadow: inset 0 0 0 3px #FBFAF6, inset 0 0 0 4px rgba(124,133,143,.4); }
.frame .win img { width: 100%; height: 100%; object-fit: cover; }
.frame .win::after { content: ""; position: absolute; inset: 0; background: linear-gradient(118deg, rgba(255,255,255,.34) 0%, rgba(255,255,255,0) 34%, rgba(255,255,255,0) 64%, rgba(220,232,238,.22) 100%); pointer-events: none; }
.ph { width: 100%; height: 100%; display: grid; place-content: center; justify-items: center; gap: 6px; background: linear-gradient(160deg, #F8F6F1, #E9EEF1); color: var(--silver-deep); text-align: center; }
.ph svg { width: 28%; height: auto; }
.ph span { font-family: var(--ui); font-size: clamp(8px, 1.6vw, 11px); font-weight: 600; letter-spacing: .14em; text-transform: uppercase; }

/* 3. a story in photographs: the hallway wall */
.gallery { width: min(92vw, 540px); }

/* 4. the album: the book stays while its pages turn as you scroll */
.c4 { padding: 0; display: block; }
.c4 .stage { position: sticky; top: 0; height: 100svh; display: grid; place-items: center; align-content: center; gap: 18px; }
.album { position: relative; width: min(94vw, 680px); aspect-ratio: 2 / 1.34; perspective: 2000px; }
.book { position: absolute; inset: 0; transform-style: preserve-3d; transform: rotateX(16deg); }
.book .shadow { position: absolute; left: 3%; right: 3%; bottom: -5%; height: 10%; border-radius: 50%; background: radial-gradient(50% 50% at 50% 50%, rgba(30,42,54,.28), rgba(30,42,54,0)); }
.pg { position: absolute; top: 0; height: 100%; width: 50%; box-sizing: border-box; border-radius: 3px; background: linear-gradient(90deg, #EFEBE3 0%, #FCFAF6 7%, #FFFDFA 100%); box-shadow: 0 1px 2px rgba(30,42,54,.18); }
.pg.bl { left: 0; background: linear-gradient(270deg, #EFEBE3 0%, #FCFAF6 7%, #FFFDFA 100%); }
.pg.br { left: 50%; }
.lv { position: absolute; left: 50%; top: 0; width: 50%; height: 100%; transform-origin: 0 50%; transform-style: preserve-3d; will-change: transform; }
.lv .fc { position: absolute; inset: 0; box-sizing: border-box; border-radius: 3px; -webkit-backface-visibility: hidden; backface-visibility: hidden; overflow: hidden; display: grid; align-content: center; justify-items: center; gap: 8%; padding: 9% 9%; }
.lv .fc.front { background: linear-gradient(90deg, #EFEBE3 0%, #FCFAF6 7%, #FFFDFA 100%); }
.lv .fc.back { transform: rotateY(180deg); background: linear-gradient(270deg, #EFEBE3 0%, #FCFAF6 7%, #FFFDFA 100%); }
.lv.cover .fc.front { background: linear-gradient(135deg, #DCCDB2 0%, #CDBB9A 100%); box-shadow: inset 0 0 0 6px rgba(255,255,255,.18); }
.lv.cover .fc.front::before { content: ""; position: absolute; inset: 0; background: repeating-linear-gradient(90deg, rgba(255,255,255,.06) 0 1px, transparent 1px 3px), repeating-linear-gradient(0deg, rgba(120,96,58,.06) 0 1px, transparent 1px 3px); }
.lv .snap { width: 100%; aspect-ratio: 4 / 5; overflow: hidden; background: var(--paper); box-shadow: 0 2px 6px rgba(30,42,54,.18), 0 0 0 5px #FFFFFF, 0 0 0 6px rgba(124,133,143,.3); }
.lv .snap img { width: 100%; height: 100%; object-fit: cover; }
.lv .cap { font-family: var(--display); font-style: italic; font-size: clamp(12px, 2.4vw, 19px); line-height: 1.2; color: var(--ink-soft); }
.cover-t { position: relative; font-family: var(--display); font-weight: 400; font-size: clamp(18px, 4.4vw, 36px); line-height: 1.1; color: #FFFDF8; letter-spacing: .04em; text-shadow: 0 1px 0 rgba(120,96,58,.35); }
.cover-m { position: relative; width: 26%; aspect-ratio: 1; border-radius: 50%; border: 1px solid rgba(255,255,255,.7); display: grid; place-items: center; font-family: var(--display); font-style: italic; font-size: clamp(12px, 3vw, 22px); color: #FFFDF8; }
.mono-pg { font-family: var(--display); font-style: italic; font-size: clamp(16px, 3.6vw, 28px); color: var(--champ-deep); }
.album-grid { display: none; }

/* 5. the ballroom */
.names { display: grid; justify-items: center; line-height: .95; }
.names .n { font-family: var(--display); font-style: italic; font-weight: 300; font-size: clamp(52px, 14vw, 110px); color: var(--navy); }
.names .amp { font-family: var(--display); font-style: italic; font-size: clamp(24px, 5vw, 40px); line-height: 1.3; color: var(--champ-deep); }
.family { max-width: 30ch; font-size: clamp(18px, 3.6vw, 22px); font-style: italic; color: var(--ink-soft); }
.ballroom { width: min(94vw, 620px); }

/* 5b. the invitation: a portrait envelope with a silver seal; the card rises out of its top and comes to rest big and centred */
.c6 { min-height: 112svh; align-content: center; }
.envscene { position: relative; width: min(92vw, 460px); height: min(150vw, 700px); }
.env { position: absolute; left: 50%; bottom: 3%; width: 62%; aspect-ratio: 5.4 / 7.4; transform: translateX(-50%); }
.env .back { position: absolute; inset: 0; z-index: 1; border-radius: 4px; overflow: hidden; background: #E6EEF2 center / cover no-repeat; box-shadow: 0 22px 36px -12px rgba(30,42,54,.35), 0 2px 5px rgba(30,42,54,.18); }
.env .pocket { position: absolute; inset: 0; z-index: 3; border-radius: 4px; background: linear-gradient(172deg, #FFFEFB 0%, #F6F2EA 64%, #ECE6DB 100%); clip-path: polygon(0 0, 50% 30%, 100% 0, 100% 100%, 0 100%); }
.env .pocket::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(120,104,80,.1), rgba(120,104,80,0)); clip-path: polygon(0 100%, 50% 54%, 100% 100%); }
.env .fshadow { position: absolute; left: 0; top: 2px; width: 100%; height: 41%; z-index: 3; background: rgba(90,80,64,.12); clip-path: polygon(0 0, 100% 0, 50% 100%); pointer-events: none; }
.env .flap { position: absolute; left: 0; top: 0; width: 100%; height: 40%; z-index: 4; transform-origin: 50% 0; transform: perspective(1400px) rotateX(0deg); transform-style: preserve-3d; pointer-events: none; }
.env .flap .fc { position: absolute; inset: 0; clip-path: polygon(0 0, 100% 0, 50% 100%); -webkit-backface-visibility: hidden; backface-visibility: hidden; }
.env .flap .out { background: linear-gradient(180deg, #FFFEFB 0%, #F3EEE5 100%); }
.env .flap .in { transform: rotateY(180deg); background: #E6EEF2 center / cover no-repeat; }
.wax { position: absolute; width: 26%; aspect-ratio: 1; left: 37%; top: 26%; border-radius: 51% 47% 52% 49% / 48% 52% 47% 52%;
  background: radial-gradient(circle at 34% 30%, #FFFFFF 0%, #DDE1E5 30%, #AAB2BA 64%, #7E8790 100%);
  box-shadow: 0 4px 8px rgba(30,42,54,.3), inset 0 -3px 5px rgba(60,68,76,.45), inset 0 2px 3px rgba(255,255,255,.85);
  -webkit-backface-visibility: hidden; backface-visibility: hidden; }
.wax b { position: absolute; inset: 16%; border-radius: 50%; display: grid; place-items: center; box-shadow: inset 0 1px 3px rgba(60,68,76,.55), inset 0 -1px 2px rgba(255,255,255,.7);
  font-family: var(--display); font-style: italic; font-weight: 600; font-size: clamp(14px, 4.2vw, 24px); color: #6E7780; text-shadow: 0 1px 0 rgba(255,255,255,.8); white-space: nowrap; }
.wax.top { clip-path: inset(-14px -14px 50% -14px); transform: translateZ(1px); }
.flap .wax.top { top: 66%; }   /* the same spot as the half on the pocket: the flap is 40% of the envelope's height */
.wax.bot { z-index: 5; clip-path: inset(50% -14px -14px -14px); }
.cracked .wax.top { transform: translateZ(1px) translateY(-1px); }
.cracked .wax.bot { transform: translateY(1.5px) rotate(1.5deg); }
.seal-hit { position: absolute; z-index: 9; left: 33%; top: 22%; width: 34%; aspect-ratio: 1; border: 0; padding: 0; border-radius: 50%; background: transparent; }
.envhint { position: absolute; left: 0; right: 0; bottom: -7%; font-family: var(--ui); font-size: 12px; font-weight: 600; letter-spacing: .22em; text-transform: uppercase; color: var(--silver-deep); text-align: center; }
/* the card: 5 by 7, upright inside the envelope; it rises out of the top, then comes forward to rest big and centred */
.card { position: absolute; z-index: 2; left: 50%; top: 0; width: 92%; aspect-ratio: 5 / 7; box-sizing: border-box; padding: 9% 8%; border-radius: 2px; transform-origin: 50% 0;
  background: var(--paper); box-shadow: 0 1px 2px rgba(30,42,54,.16), 0 18px 34px -14px rgba(30,42,54,.35);
  display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 3.2%; }
.card::before { content: ""; position: absolute; inset: 3.4%; border: 1px solid rgba(124,133,143,.45); pointer-events: none; }
.card .grp { transition: opacity 1.1s ease, transform 1.1s cubic-bezier(.16,1,.3,1); transition-delay: var(--d, 0ms); }
.envscene:not(.landed) .card .grp { opacity: 0; transform: translateY(8px); }
.card .mono { width: 15%; aspect-ratio: 1; border-radius: 50%; border: 1px solid rgba(124,133,143,.6); display: grid; place-items: center; font-family: var(--display); font-style: italic; font-size: clamp(11px, 2.6vw, 16px); color: var(--silver-deep); white-space: nowrap; }
.card .cn { font-family: var(--display); font-style: italic; font-weight: 400; font-size: clamp(30px, 8.4vw, 52px); line-height: .95; color: var(--navy); }
.card .camp { font-family: var(--display); font-style: italic; font-size: clamp(16px, 3.6vw, 24px); color: var(--champ-deep); }
.card .req { font-family: var(--serif); font-style: italic; font-size: clamp(13px, 3.1vw, 18px); color: var(--ink-soft); }
.card .rule { width: 18%; height: 1px; background: var(--silver); }
.card .dt { font-family: var(--ui); font-weight: 600; font-size: clamp(9px, 2.2vw, 12px); letter-spacing: .22em; text-transform: uppercase; color: var(--ink); }
.card .tm { font-family: var(--serif); font-size: clamp(13px, 3vw, 17px); color: var(--ink-soft); }
.card .vn { font-family: var(--display); font-weight: 500; font-size: clamp(17px, 4vw, 24px); color: var(--ink); }
.card .aft { font-family: var(--serif); font-style: italic; font-size: clamp(13px, 3vw, 17px); color: var(--silver-deep); }
.card .portrait { width: 46%; aspect-ratio: 4 / 5; overflow: hidden; border-radius: 2px; box-shadow: 0 0 0 4px #FFFFFF, 0 0 0 5px rgba(124,133,143,.4); }
.card .portrait img { width: 100%; height: 100%; object-fit: cover; }
.card.p-beside { flex-direction: row; flex-wrap: wrap; align-content: center; }
.card.p-beside .portrait { width: 40%; order: -1; margin: 0 4% 2% 0; }
.card.p-beside .cbody { width: 52%; }
.card.p-behind { color: #FFFDFA; }
.card.p-behind .portrait { position: absolute; inset: 0; width: 100%; height: 100%; border-radius: 2px; box-shadow: none; z-index: 0; }
.card.p-behind .portrait::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(23,37,53,.35), rgba(23,37,53,.72)); }
.card.p-behind .cbody { position: relative; z-index: 1; }
.card.p-behind .cn, .card.p-behind .dt, .card.p-behind .vn { color: #FFFDFA; }
.card.p-behind .req, .card.p-behind .tm, .card.p-behind .aft, .card.p-behind .camp { color: #EEF1F4; }
.card .cbody { display: flex; flex-direction: column; align-items: center; gap: 2.4%; width: 100%; }

/* 6. the celebration */
.aisle { width: min(94vw, 620px); }
.begin { font-size: clamp(40px, 10vw, 80px); line-height: 1.02; color: var(--navy); }
.celebrate { font-size: clamp(19px, 3.8vw, 24px); font-style: italic; color: var(--ink-soft); }
.sign { font-family: var(--ui); font-weight: 600; font-size: 12px; letter-spacing: .3em; text-transform: uppercase; color: var(--champ-deep); }
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 52px; padding: 0 28px; border: 0; border-radius: 26px; background: var(--navy); color: #FFFDFA; font-family: var(--ui); font-size: 15px; font-weight: 600; letter-spacing: .04em; text-decoration: none; }
.btn.ghost { background: transparent; color: var(--navy); box-shadow: inset 0 0 0 1px rgba(23,37,53,.4); }
.linkish { border: 0; background: none; padding: 10px 6px; font-family: var(--ui); font-size: 13px; color: var(--ink-soft); text-decoration: underline; text-underline-offset: 3px; }

/* ---------- the wedding details, on paper over the same snow ---------- */
.suite { position: relative; z-index: 1; padding-block: 8vh 6vh; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
.suite-in { max-width: 720px; margin: 0 auto; display: grid; gap: 22px; }
.suite-head { text-align: center; display: grid; gap: 10px; justify-items: center; }
.suite-head h2 { font-size: clamp(36px, 8vw, 58px); color: var(--navy); }
.chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.chips a { display: inline-flex; align-items: center; min-height: 40px; padding: 0 16px; border-radius: 20px; background: rgba(255,253,250,.85); box-shadow: inset 0 0 0 1px rgba(124,133,143,.4); color: var(--ink); font-family: var(--ui); font-size: 13px; font-weight: 600; text-decoration: none; }
.panel { background: rgba(255,253,250,.92); border-radius: 6px; box-shadow: 0 0 0 1px rgba(200,205,210,.8), 0 14px 30px -18px rgba(30,42,54,.3); padding: clamp(22px, 5vw, 36px); display: grid; gap: 14px; }
.panel h3 { font-size: clamp(28px, 6vw, 40px); color: var(--navy); }
.panel .lead { font-size: 17px; color: var(--ink-soft); }
.rows { display: grid; }
.rows > div { display: grid; grid-template-columns: minmax(0, 7.5em) minmax(0, 1fr); gap: 4px 16px; padding: 12px 0; border-bottom: 1px solid rgba(200,205,210,.7); }
.rows > div:last-child { border-bottom: 0; }
.rows dt, .rows .k { font-family: var(--ui); font-size: 13px; font-weight: 600; color: var(--ink); font-variant-numeric: tabular-nums; }
.rows dd, .rows .v { margin: 0; color: var(--ink-soft); min-width: 0; overflow-wrap: anywhere; }
.acts { display: flex; flex-wrap: wrap; gap: 10px; }
.links { display: grid; gap: 8px; }
.links a { display: flex; justify-content: space-between; align-items: center; min-height: 48px; padding: 0 18px; border-radius: 24px; background: #FFFFFF; box-shadow: inset 0 0 0 1px rgba(124,133,143,.4); color: var(--ink); font-family: var(--ui); font-size: 14px; font-weight: 600; text-decoration: none; }
.qa { display: grid; gap: 4px; padding: 10px 0; border-bottom: 1px solid rgba(200,205,210,.7); }
.qa b { font-family: var(--ui); font-size: 14px; }
.shots { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.shots button { padding: 0; border: 0; aspect-ratio: 4 / 5; overflow: hidden; border-radius: 3px; background: var(--paper); box-shadow: 0 0 0 1px rgba(200,205,210,.8); }
.shots img { width: 100%; height: 100%; object-fit: cover; }
#lightbox { position: fixed; inset: 0; z-index: 80; display: grid; place-items: center; background: rgba(23,37,53,.86); padding: 24px; }
#lightbox img { max-width: min(92vw, 720px); max-height: 82vh; object-fit: contain; border-radius: 3px; box-shadow: 0 0 0 6px #FFFFFF; }
#lightbox button { position: absolute; top: max(16px, env(safe-area-inset-top, 0px)); right: max(16px, env(safe-area-inset-right, 0px)); min-height: 44px; padding: 0 16px; border: 0; border-radius: 22px; background: #FFFDFA; color: var(--navy); font-family: var(--ui); font-weight: 600; }

/* the reply */
#rsvp form { display: grid; gap: 16px; }
.f { display: grid; gap: 6px; font-family: var(--ui); font-size: 13px; font-weight: 600; color: var(--ink); }
.f input, .f textarea, .f select { width: 100%; box-sizing: border-box; min-height: 48px; border: 1px solid rgba(124,133,143,.55); border-radius: 10px; background: #FFFFFF; padding: 10px 14px; font-family: var(--serif); font-size: 17px; font-weight: 400; color: var(--ink); }
.f textarea { min-height: 84px; resize: vertical; }
.ans { display: grid; gap: 8px; border: 0; margin: 0; padding: 0; }
.ans label { display: flex; align-items: center; gap: 12px; min-height: 52px; padding: 0 16px; border-radius: 26px; background: #FFFFFF; box-shadow: inset 0 0 0 1px rgba(124,133,143,.45); font-family: var(--ui); font-size: 15px; cursor: pointer; }
.ans input { width: 18px; height: 18px; accent-color: var(--navy); }
.step { display: flex; align-items: center; gap: 12px; }
.step button { width: 44px; height: 44px; border-radius: 50%; border: 1px solid rgba(124,133,143,.55); background: #FFFFFF; font-family: var(--ui); font-size: 20px; }
.step output { min-width: 2ch; text-align: center; font-family: var(--ui); font-size: 18px; font-variant-numeric: tabular-nums; }
.meals { display: grid; gap: 10px; }
.meal { display: grid; gap: 6px; }
#err { min-height: 1.2em; font-family: var(--ui); font-size: 14px; color: var(--ink-soft); }
#err.err { color: #8E2F3C; }
#done { display: grid; gap: 10px; text-align: center; justify-items: center; }
#done h4 { margin: 0; font-family: var(--display); font-weight: 400; font-size: clamp(28px, 6vw, 40px); color: var(--navy); }
.going { font-family: var(--ui); font-size: 13px; color: var(--ink-soft); }
.going b { color: var(--ink); }

.end { display: grid; justify-items: center; gap: 12px; text-align: center; padding-block: 4vh 2vh; }
.end .wax { position: relative; left: auto; top: auto; width: 76px; }
.foot { font-family: var(--ui); font-size: 12px; color: rgba(79,91,102,.6); text-align: center; }

/* sound and the small controls */
#snd-hint { position: fixed; top: calc(20px + env(safe-area-inset-top, 0px)); right: calc(72px + env(safe-area-inset-right, 0px)); z-index: 60; margin: 0; padding: 8px 12px; border-radius: 16px; background: rgba(255,253,250,.9); font-family: var(--ui); font-size: 12px; font-weight: 600; color: var(--ink-soft); pointer-events: none; transition: opacity .6s ease; }
#snd-hint.gone { opacity: 0; }
.mute { position: fixed; top: 14px; right: 14px; z-index: 61; }

@media (min-width: 880px) {
  .rows > div { grid-template-columns: minmax(0, 10em) minmax(0, 1fr); }
}
/* reduced motion: everything simply in place, the doors open, the album as a plain set of photographs */
.rm .rv, .rm .title, .rm .sline, .rm .card .grp { transition: none !important; }
.rm .cue svg { animation: none; }
.rm.armed .rv:not(.in) { transform: var(--rest, none); opacity: 1; }
.rm .c2 { height: auto; }
.rm .c2 .stage { position: relative; height: auto; padding-block: 10vh; }
.rm .c4 { height: auto !important; }
.rm .c4 .stage { position: relative; height: auto; padding-block: 8vh; }
.rm .album { display: none; }
.rm .album-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; width: min(92vw, 560px); }
.album-grid figure { margin: 0; display: grid; gap: 6px; }
.album-grid img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; border-radius: 2px; box-shadow: 0 0 0 5px #FFFFFF, 0 0 0 6px rgba(124,133,143,.3); }
.album-grid figcaption { font-family: var(--display); font-style: italic; color: var(--ink-soft); }
