/* ==========================================================================
   Sunsky: a romantic blush-and-rose wedding invitation, ported from landing/sunsky (css/style.css).
   Class names follow the landing, so its changes carry over.
   - a single column: full width on phones, a centred 480px column from 560px
   - everything works without JavaScript; .js (set by boot.js before the first paint) turns on the envelope
     intro, the scroll lock until it opens, reveals and the floating RSVP button
   ========================================================================== */

/* local fonts (OFL, see fonts/OFL.txt): no third-party requests under the CSP */
@font-face { font-display: swap; font-family: "Cormorant Garamond"; font-style: normal; font-weight: 300 700; src: url("fonts/cormorant-garamond-cyrillic-wght-normal.woff2") format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-display: swap; font-family: "Cormorant Garamond"; font-style: normal; font-weight: 300 700; src: url("fonts/cormorant-garamond-latin-ext-wght-normal.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-display: swap; font-family: "Cormorant Garamond"; font-style: normal; font-weight: 300 700; src: url("fonts/cormorant-garamond-latin-wght-normal.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-display: swap; font-family: "Cormorant Garamond"; font-style: italic; font-weight: 300 700; src: url("fonts/cormorant-garamond-cyrillic-wght-italic.woff2") format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-display: swap; font-family: "Cormorant Garamond"; font-style: italic; font-weight: 300 700; src: url("fonts/cormorant-garamond-latin-ext-wght-italic.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-display: swap; font-family: "Cormorant Garamond"; font-style: italic; font-weight: 300 700; src: url("fonts/cormorant-garamond-latin-wght-italic.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-display: swap; font-family: "EB Garamond"; font-style: normal; font-weight: 400 800; src: url("fonts/eb-garamond-cyrillic-wght-normal.woff2") format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-display: swap; font-family: "EB Garamond"; font-style: normal; font-weight: 400 800; src: url("fonts/eb-garamond-latin-ext-wght-normal.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-display: swap; font-family: "EB Garamond"; font-style: normal; font-weight: 400 800; src: url("fonts/eb-garamond-latin-wght-normal.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-display: swap; font-family: "EB Garamond"; font-style: italic; font-weight: 400 800; src: url("fonts/eb-garamond-cyrillic-wght-italic.woff2") format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-display: swap; font-family: "EB Garamond"; font-style: italic; font-weight: 400 800; src: url("fonts/eb-garamond-latin-ext-wght-italic.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-display: swap; font-family: "EB Garamond"; font-style: italic; font-weight: 400 800; src: url("fonts/eb-garamond-latin-wght-italic.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

:root {
  color-scheme: light;
  /* palette */
  --blush-50:  #fcf5f0;
  --blush-100: #f7e7e0;
  --blush-200: #f1d6d1;
  --blush-300: #e6bcb8;
  --rose:      #b08184;
  --rose-dark: #9a686d;
  --mauve:     #5d4043;
  --mauve-2:   #7b5c5f;
  --ink:       #4c3436;
  --paper:     #fbf4ee;
  --line:      rgba(123, 92, 95, .34);

  /* шрифты: display / body / script (курсив того же гарнитура) */
  --f-display: 'Cormorant Garamond', 'Times New Roman', Georgia, serif;
  --f-body:    'EB Garamond', Georgia, 'Times New Roman', serif;

  --gutter: 22px;
  --col: 480px;
  --ease-out: cubic-bezier(.22, .8, .24, 1);
  --ease-soft: cubic-bezier(.4, .1, .2, 1);

  /* бумажное зерно */
  --noise: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='180' height='180'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 .42  0 0 0 0 .3  0 0 0 0 .3  0 0 0 .085 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}

/* ---------- база ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; background: #efd9d1; }
html.is-locked, html.is-locked body { overflow: hidden; overscroll-behavior: none; }
body {
  margin: 0; min-height: 100vh;
  font-family: var(--f-body); font-size: 17px; line-height: 1.5; color: var(--ink);
  background: #efd9d1 url("img/bg-silk.jpg") center / cover;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
img { display: block; max-width: 100%; height: auto; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; }
h1, h2, h3, p, ol, ul, figure, fieldset { margin: 0; padding: 0; }
ol, ul { list-style: none; }
fieldset { border: 0; min-width: 0; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--rose-dark); outline-offset: 3px; border-radius: 6px; }

.sr-only, .visually-hidden {
  position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; border: 0;
}
.svg-defs { position: absolute; width: 0; height: 0; overflow: hidden; }
.ico {
  width: 1.15em; height: 1.15em; flex: none;
  fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round;
}
.ico--sm { width: 1em; height: 1em; }
.ico--lg { width: 38px; height: 38px; stroke-width: 1.4; }

/* телефонная колонка */
.page {
  position: relative; max-width: var(--col); margin: 0 auto;
  background: var(--paper); overflow-x: clip;
}
@media (min-width: 560px) {
  body { background-attachment: fixed; }
  .page { box-shadow: 0 0 0 1px rgba(150, 100, 104, .08), 0 30px 90px rgba(95, 55, 60, .28); }
}

/* ---------- общие элементы ---------- */
.rule { display: block; width: 44px; height: 1px; background: var(--mauve-2); opacity: .75; margin: 14px 0; }
.head { text-align: center; position: relative; z-index: 2; }
.head--left { text-align: left; }
.head--left .rule { margin-left: 2px; }
.caps {
  font-family: var(--f-display); font-weight: 500; text-transform: uppercase;
  letter-spacing: .14em; color: var(--mauve); line-height: 1;
  font-size: clamp(34px, 9.6vw, 44px);
}
.caps small { display: block; font-size: .5em; letter-spacing: .22em; margin-bottom: .32em; font-weight: 500; }
.script {
  font-family: var(--f-display); font-style: italic; font-weight: 500;
  color: var(--mauve); line-height: 1.05; font-size: clamp(54px, 15vw, 70px); letter-spacing: .01em;
}
.script--caps { text-transform: uppercase; font-size: clamp(32px, 9vw, 40px); letter-spacing: .14em; }
.sub { font-family: var(--f-display); font-style: italic; font-size: 22px; line-height: 1.3; color: var(--mauve); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .6em;
  font-family: var(--f-display); font-weight: 500; font-size: 22px; line-height: 1;
  padding: 17px 30px; border-radius: 999px; border: 1px solid rgba(255,255,255,.7);
  text-decoration: none; letter-spacing: .01em; position: relative;
  transition: transform .25s var(--ease-out), box-shadow .25s, filter .25s;
  -webkit-tap-highlight-color: transparent;
}
.btn .ico { width: 1em; height: 1em; transition: transform .3s var(--ease-out); }
.btn:hover .ico { transform: translateX(3px); }
.btn:active { transform: scale(.975); }
.btn--pill {
  color: var(--mauve);
  background: linear-gradient(180deg, #faebe7 0%, #f2d9d5 100%);
  box-shadow: 0 10px 26px rgba(176, 129, 132, .26), inset 0 1px 0 rgba(255,255,255,.9), inset 0 -1px 0 rgba(176,129,132,.12);
}
.btn--rose {
  color: #fdf1ee;
  background: linear-gradient(180deg, #bb8d90 0%, #a47579 100%);
  border-color: rgba(255,255,255,.35);
  box-shadow: 0 12px 26px rgba(154, 104, 109, .34), inset 0 1px 0 rgba(255,255,255,.35);
}
.btn--block { width: 100%; }
.link { background: none; border: 0; padding: 4px 2px; color: var(--rose-dark); font-family: var(--f-display); font-size: 19px; font-style: italic; text-decoration: underline; text-underline-offset: 4px; }

.deco { position: absolute; pointer-events: none; user-select: none; z-index: 1; }

/* reveal при скролле (только с JS) */
.js [data-reveal] { opacity: 0; translate: 0 22px; transition: opacity 1s var(--ease-soft), translate 1.1s var(--ease-out); transition-delay: var(--rd, 0s); }
.js [data-reveal].in { opacity: 1; translate: 0 0; }

/* ==========================================================================
   COVER
   ========================================================================== */
.cover {
  /* The envelope film and its stills share one 432×528 frame (--bw × --bh); every place on the envelope is a
     fraction of it: the closed envelope spans 42%–93% of the height, the open flap reaches the top. */
  --bw: min(98vw, 448px, 60vh);
  --bh: calc(var(--bw) * 1.2222);
  --sx: .494; --sy: .727;                       /* centre of the wax seal on the closed envelope */
  position: relative; isolation: isolate; overflow: hidden;
  min-height: 100vh; display: grid; place-items: center; padding: 28px 0 40px;
  background: #f0dbd3;
}
@supports (height: 1svh) { .cover { --bw: min(98vw, 448px, 60svh); min-height: 100svh; } }

.cover-bg {
  position: absolute; inset: 0; z-index: -3;
  background: #f0dbd3 url("img/bg-cover.webp") center / cover;
  animation: silk 28s ease-in-out infinite alternate;
}
/* the moving blossom over the still, shown only once it really plays (invitation.js) */
.cover-video {
  position: absolute; inset: 0; width: 100%; height: 100%; max-width: none;
  object-fit: cover; object-position: 50% 50%;
  opacity: 0; transition: opacity .8s var(--ease-out); pointer-events: none;
}
.cover-video.is-playing { opacity: 1; }
.cover-light {
  position: absolute; inset: 0; z-index: -2; pointer-events: none; mix-blend-mode: soft-light;
  background:
    radial-gradient(46% 30% at 18% 16%, rgba(255,252,245,.95), transparent 70%),
    radial-gradient(38% 26% at 82% 30%, rgba(255,248,238,.7), transparent 72%),
    radial-gradient(60% 30% at 50% 100%, rgba(255,255,255,.5), transparent 70%);
  animation: shimmer 9s ease-in-out infinite alternate;
}
.cover::after { /* плавный переход в следующую секцию */
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 90px; z-index: 0; pointer-events: none;
  background: linear-gradient(to bottom, rgba(241,221,213,0), #f1ddd5);
}

/* плавающие лепестки */
.drift { position: absolute; inset: 0; z-index: 3; pointer-events: none; overflow: hidden; }
.dp { position: absolute; top: -40px; left: 0; background: center / contain no-repeat; opacity: 0;
  animation: fall var(--dur, 18s) linear var(--del, 0s) infinite; will-change: translate, rotate; }
.dp.a, .bp.a { background-image: url("img/petal-a.webp"); }
.dp.b, .bp.b { background-image: url("img/petal-b.webp"); }

/* сцена */
.stage { position: relative; z-index: 5; width: var(--bw); height: var(--bh); margin: 0 auto; }
.eyebrow {
  position: absolute; left: 50%; top: calc(var(--bh) * .42 - 104px); translate: -50% 0; width: max-content; text-align: center;
  font-family: var(--f-display); font-weight: 500; text-transform: uppercase;
  font-size: clamp(19px, 5.4vw, 25px); letter-spacing: .42em; padding-left: .42em; color: var(--mauve); line-height: 1.55;
  opacity: 0; transition: opacity 1.1s var(--ease-soft) .1s, translate 1.2s var(--ease-out) .1s;
}
.eyebrow span { display: block; }
.eyebrow::after { content: ""; display: block; width: 40px; height: 1px; background: var(--mauve-2); opacity: .7; margin: 14px auto 0; }
.cover:not(.is-ready) .eyebrow { translate: -50% -8px; }
.cover.is-ready .eyebrow { opacity: 1; }
.cover.is-open .eyebrow { opacity: 0; translate: -50% -14px; transition-duration: .5s; transition-delay: 0s; }

.env-wrap { position: absolute; inset: 0; }
.envelope {
  position: absolute; inset: 0; width: 100%; padding: 0; border: 0; background: none; display: block;
  -webkit-tap-highlight-color: transparent; overflow: visible; touch-action: manipulation;
  opacity: 0; scale: .92; translate: 0 18px;
  transition: opacity 1.1s var(--ease-soft), scale 1.3s var(--ease-out), translate 1.3s var(--ease-out);
}
.cover.is-ready .envelope { opacity: 1; scale: 1; translate: 0 0; }
.cover:not(.is-ready) .envelope { pointer-events: none; }
.cover.is-open .envelope { cursor: default; }
.envelope:focus-visible { outline-offset: 10px; }
.envelope > * { position: absolute; }

/* The envelope floats as one piece. Layers, bottom to top: the open envelope with the card in its pocket, the
   closed still, the film. The cover's classes (invitation.js) walk through the opening:
   .is-open (tapped) → .is-playing (the film shows) → .is-unsealed (the open still replaces it) → .is-revealed (the card slides out). */
.env { inset: 0; pointer-events: none; animation: float 5.2s ease-in-out 1.4s infinite; }
.env > * { position: absolute; }
.env-closed, .env-film, .env-back, .env-front { inset: 0; width: 100%; height: 100%; max-width: none; }

.env-closed {
  z-index: 2;
  filter: drop-shadow(0 22px 26px rgba(120, 72, 72, .24)) drop-shadow(0 4px 6px rgba(120, 72, 72, .12));
  transition: opacity .7s ease .1s;
}
.cover.is-unsealed .env-closed, .cover.is-playing .env-closed { opacity: 0; transition: none; }

.env-film { z-index: 3; opacity: 0; filter: drop-shadow(0 22px 26px rgba(120, 72, 72, .24)) drop-shadow(0 4px 6px rgba(120, 72, 72, .12)); }
.cover.is-playing .env-film { opacity: 1; }
.cover.is-unsealed .env-film { visibility: hidden; }

/* открытый конверт: конверт → карточка → передний карман с бантом */
.env-open { inset: 0; z-index: 1; opacity: 0; transition: opacity .7s ease .1s; }
.env-open > * { position: absolute; }
.cover.is-unsealed .env-open { opacity: 1; }
.cover.is-playing .env-open { transition: none; }   /* the still is the film's last frame: swap without a fade */
.env-back { z-index: 1; filter: drop-shadow(0 22px 26px rgba(120, 72, 72, .24)) drop-shadow(0 4px 6px rgba(120, 72, 72, .12)); }
.env-front { z-index: 3; }
.card-clip { inset: 0; z-index: 2; clip-path: inset(-30% -30% 7% -30%); }   /* карточка не вылезает ниже конверта */
.card {
  position: absolute; left: 11.8%; top: .8%; width: 76.4%;
  translate: 0 calc(var(--bh) * .66); rotate: 1.6deg; visibility: hidden;
  transition: translate 1.6s var(--ease-out), rotate 1.6s var(--ease-out);
  filter: drop-shadow(0 6px 10px rgba(110, 70, 70, .16));
}
.cover.is-unsealed .card { visibility: visible; }
.cover.is-revealed .card { translate: 0 0; rotate: 0deg; }
.card-paper { width: 100%; height: auto; }
/* Sprigs tucked behind the sheets. They stay hidden while the card slides out and then grow out from
   behind the paper once it has settled. */
.card-sprig {
  position: absolute; z-index: -1; pointer-events: none;
  opacity: 0; translate: 0 14px; scale: .9;
  transition: opacity .9s ease, translate 1.3s var(--ease-out), scale 1.3s var(--ease-out);
}
.cover.is-revealed .card-sprig { opacity: 1; translate: 0 0; scale: 1; transition-delay: 1.35s; }
.cover.is-revealed .card-sprig--b { transition-delay: 1.65s; }
.card-sprig--a { left: 1%; top: -19%; width: 34%; rotate: -4deg; transform-origin: 30% 100%; }
.card-sprig--b { left: 17%; top: -13%; width: 26%; rotate: 14deg; transform-origin: 20% 100%; }
.card-text {
  position: absolute; left: 12%; right: 6%; top: 13%; bottom: 8%;
  display: flex; flex-direction: column; align-items: center; justify-content: flex-start; text-align: center; color: var(--mauve);
  font-size: calc(var(--bw) * .092);   /* всё внутри карточки масштабируется от ширины конверта */
}
.card-eyebrow { font-family: var(--f-display); font-weight: 600; text-transform: uppercase; letter-spacing: .32em; padding-left: .32em; font-size: .27em; line-height: 1.4; }
.card-names { font-family: var(--f-display); font-style: italic; font-weight: 500; line-height: .82; margin-top: .3em; display: flex; flex-direction: column; align-items: center; }
.card-names span { font-size: 1.28em; }
.card-names span:last-child { margin-left: .5em; }
.card-names i { font-size: .95em; margin: .02em 0 .06em .0em; opacity: .85; }
.card-rule { width: 2.2em; height: 1px; background: var(--mauve-2); opacity: .7; margin: .55em 0 .5em; }
.card-date { font-variant-numeric: lining-nums; font-family: var(--f-display); font-weight: 600; text-transform: uppercase; letter-spacing: .24em; padding-left: .24em; font-size: .27em; }

.seal-ring {
  left: calc(var(--bw) * var(--sx)); top: calc(var(--bh) * var(--sy));
  width: calc(var(--bw) * .17); height: calc(var(--bw) * .17); margin: calc(var(--bw) * -.085) 0 0 calc(var(--bw) * -.085);
  z-index: 4; border-radius: 50%;
}
/* the seal is marked quietly: a warm glow that breathes around it and a slow glint over the wax */
.seal-ring::before, .seal-ring::after { content: ""; position: absolute; border-radius: 50%; opacity: 0; mix-blend-mode: screen; }
.seal-ring::before {
  inset: -42%;
  background: radial-gradient(closest-side, transparent 48%, rgba(255, 242, 226, .7) 58%, rgba(255, 236, 218, .28) 76%, transparent);
  animation: seal-halo 4.4s ease-in-out 1.6s infinite;
}
.seal-ring::after {
  inset: 6%;
  background: linear-gradient(115deg, transparent 38%, rgba(255, 250, 236, .8) 50%, transparent 62%) 130% 0 / 260% 100% no-repeat;
  animation: seal-glint 5.5s ease-in-out 2.4s infinite;
}
.cover.is-open .seal-ring::before, .cover.is-open .seal-ring::after { animation: none; opacity: 0; transition: opacity .3s ease; }

.glow {
  left: 50%; top: 67%; width: calc(var(--bw) * 1.15); height: calc(var(--bw) * 1.15); margin: calc(var(--bw) * -.575) 0 0 calc(var(--bw) * -.575);
  z-index: 8; pointer-events: none; opacity: 0; border-radius: 50%;
  background: radial-gradient(closest-side, rgba(255,250,244,.95), rgba(255,244,236,.55) 55%, transparent);
}
.cover.is-open .glow { animation: glow 1.1s ease-out .05s both; }

.hint {
  position: absolute; left: 50%; top: calc(var(--bh) * .95 + 14px); translate: -50% 0; width: max-content; z-index: 6;
  display: flex; flex-direction: column; align-items: center; gap: 7px; color: var(--mauve);
  font-family: var(--f-display); font-style: italic; font-size: clamp(20px, 5.4vw, 24px); line-height: 1.1; pointer-events: none;
  opacity: 0; transition: opacity .9s ease .35s;
}
.hint .ico { width: 32px; height: 32px; stroke-width: 1.3; animation: tap 2.4s ease-in-out infinite; }
.hint .ico--chev { width: 24px; height: 24px; animation: nudge 1.9s ease-in-out infinite; opacity: .8; }
.cover.is-ready .hint { opacity: 1; }
.cover.is-open .hint { opacity: 0; transition: opacity .3s ease 0s; }

.cta {
  position: absolute; left: 50%; top: calc(100% + 14px); translate: -50% 12px; z-index: 7; white-space: nowrap;
  opacity: 0; visibility: hidden; pointer-events: none;
  transition: opacity .9s ease 1.1s, translate 1.1s var(--ease-out) 1.1s, visibility 0s linear 1.1s;
}
.cover.is-revealed .cta { opacity: 1; translate: -50% 0; visibility: visible; pointer-events: auto; }

/* лепестки и искры при открытии */
.burst { left: calc(var(--bw) * var(--sx)); top: calc(var(--bh) * var(--sy)); width: 0; height: 0; z-index: 9; pointer-events: none; }
.bp, .bs { position: absolute; left: 0; top: 0; pointer-events: none; opacity: 0; }
.bp { background: center / contain no-repeat; animation: burst-p var(--d, 2s) cubic-bezier(.2,.7,.3,1) var(--dl, 0s) both; }
.bs { width: var(--s, 6px); height: var(--s, 6px); border-radius: 50%;
  background: radial-gradient(circle, #fff, rgba(255,236,220,.9) 40%, transparent 72%);
  animation: burst-s var(--d, 1.2s) ease-out var(--dl, 0s) both; }

/* deep link: открытое состояние сразу */
.cover.no-anim *, .cover.no-anim *::before, .cover.no-anim *::after { transition: none !important; animation-duration: .001s !important; animation-delay: 0s !important; }
.cover.no-anim .env { animation: none !important; }
.cover.no-anim .burst, .cover.no-anim .glow { display: none; }

/* ==========================================================================
   FLOW (общий фон трёх секций — без стыков)
   ========================================================================== */
.flow {
  position: relative; isolation: isolate;
  background:
    var(--noise),
    linear-gradient(180deg, #f1ddd5 0, #f8e9e2 180px, #fbf3ee 520px, #fbf1ec 1300px, #f8e6df 1900px, #fbf1ec 2500px, #f7e6df 100%);
}
.flow::before { /* мягкие пятна света через листву */
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(60% 260px at 12% 0, rgba(255,250,244,.7), transparent 70%),
    radial-gradient(50% 300px at 100% 38%, rgba(255,248,240,.55), transparent 70%),
    radial-gradient(70% 320px at 0 72%, rgba(255,250,244,.5), transparent 70%);
}
.flow > section { position: relative; padding-left: var(--gutter); padding-right: var(--gutter); }

/* ---------- STORY ---------- */
.story { padding-top: 58px; overflow: clip; }
.deco--story { top: -16px; right: -14%; width: min(58vw, 280px); rotate: 180deg; scale: -1 1; }
.story .head--left { padding-top: 6px; }
.story-media { position: relative; margin: 22px calc(var(--gutter) * -1) 0; z-index: 1; }
.photo {
  position: relative; overflow: hidden; background:
    radial-gradient(70% 60% at 30% 30%, rgba(255,255,255,.75), transparent 70%),
    linear-gradient(160deg, #f8e6e0, #f0d3ce 60%, #e9c3bf);
}
.photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity 1s ease; }
.photo.has-photo img { opacity: 1; }
.photo::after { content: ""; position: absolute; inset: 0; background: var(--noise); opacity: .5; pointer-events: none; }
.photo--main {
  aspect-ratio: 1 / .86;
  -webkit-mask-image: radial-gradient(ellipse 72% 68% at 50% 48%, #000 58%, transparent 100%);
          mask-image: radial-gradient(ellipse 72% 68% at 50% 48%, #000 58%, transparent 100%);
}
.photo--main::before { /* заглушка: веточка вместо фото */
  content: ""; position: absolute; left: 50%; top: 50%; width: 36%; aspect-ratio: 302 / 504; translate: -50% -52%;
  background: url("img/sprig.webp") center / contain no-repeat; opacity: .55; filter: saturate(.85);
}
.photo--main.has-photo::before { display: none; }

.story-body { position: relative; display: grid; grid-template-columns: 1fr 46%; gap: 6px 10px; margin-top: -4px; z-index: 2; }
.story-copy { padding-top: 22px; }
.lead { font-family: var(--f-display); font-style: italic; font-size: 24px; line-height: 1.18; color: var(--mauve); margin-bottom: 14px; text-wrap: balance; }
.story-copy p:not(.lead) { font-size: 15.5px; line-height: 1.55; color: var(--ink); text-wrap: pretty; }
.polaroids { position: relative; margin: -52px -10px 0 0; aspect-ratio: 608 / 538; }
.pol-frame { position: absolute; inset: 0; width: 100%; height: 100%; max-width: none; filter: drop-shadow(0 8px 14px rgba(110, 70, 70, .22)); }
.pol-photo {
  position: absolute; background: linear-gradient(150deg, #efd4cf, #e0b8b6); overflow: hidden;
}
.pol-photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity 1s; }
.pol-photo.has-photo img { opacity: 1; }
.pol-photo--a { left: 5.26%; top: 19.52%; width: 56.74%; height: 64.87%;
  clip-path: polygon(17.39% 0, 0 83.67%, 83.19% 99.71%, 99.71% 15.47%); }
.pol-photo--b { left: 42.43%; top: 3.72%; width: 52.96%; height: 59.67%;
  clip-path: polygon(87.89% .31%, 0 14.33%, 2.48% 30.84%, 41.93% 38.01%, 33.85% 99.69%, 99.69% 89.41%); }


/* ---------- RSVP ---------- */
.rsvp { padding-top: 84px; padding-bottom: 230px; overflow: clip; }
.deco--rsvp { top: -18px; right: -12%; width: min(44vw, 210px); rotate: 180deg; scale: -1 1; }
.rsvp .head { padding-top: 14px; }
.rsvp .head .rule { margin: 12px auto 16px; }
.form { position: relative; z-index: 2; margin-top: 28px; display: grid; gap: 18px; }
.field { display: grid; gap: 7px; }
.lbl { font-family: var(--f-display); font-weight: 600; font-size: 18px; color: var(--mauve); }
.opt-note { font-weight: 400; font-style: italic; color: var(--mauve-2); font-size: 16px; }
.input {
  width: 100%; border: 1px solid rgba(176, 129, 132, .28); border-radius: 16px; padding: 13px 16px;
  background: rgba(255, 255, 255, .62); font-family: var(--f-body); font-size: 17px; color: var(--ink);
  box-shadow: 0 6px 16px rgba(176, 129, 132, .12), inset 0 1px 0 rgba(255,255,255,.9); outline: none;
  transition: border-color .2s, box-shadow .2s, background .2s;
}
.input::placeholder { color: #a58d8f; }
.input:focus { border-color: var(--rose); background: #fff; box-shadow: 0 0 0 4px rgba(176, 129, 132, .16); }
.input--area { resize: vertical; min-height: 92px; line-height: 1.45; }

.choice { display: grid; gap: 12px; }
.opt { position: relative; display: flex; align-items: center; gap: 14px; cursor: pointer;
  padding: 16px 20px; border-radius: 18px; background: rgba(255, 255, 255, .6);
  border: 1px solid rgba(255,255,255,.8); box-shadow: 0 8px 20px rgba(176, 129, 132, .14);
  font-family: var(--f-display); font-size: 21px; font-weight: 500; color: var(--mauve);
  transition: background .3s, box-shadow .3s, transform .2s; -webkit-tap-highlight-color: transparent; }
.opt input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.opt .dot { width: 22px; height: 22px; border-radius: 50%; border: 1.5px solid var(--mauve-2); flex: none; display: grid; place-items: center; transition: border-color .2s; background: rgba(255,255,255,.7); }
.opt .dot::after { content: ""; width: 12px; height: 12px; border-radius: 50%; background: var(--rose-dark); scale: 0; transition: scale .3s var(--ease-out); }
.opt-t { display: inline-flex; align-items: center; gap: .4em; }
.opt:has(input:checked) { background: linear-gradient(180deg, #f6dcd9, #efcfcc); box-shadow: 0 10px 24px rgba(176, 129, 132, .26), inset 0 1px 0 rgba(255,255,255,.7); }
.opt:has(input:checked) .dot { border-color: var(--rose-dark); }
.opt:has(input:checked) .dot::after { scale: 1; }
.opt:has(input:focus-visible) { outline: 2px solid var(--rose-dark); outline-offset: 3px; }
.opt:active { transform: scale(.985); }


.form-error { padding: 12px 16px; border-radius: 14px; background: #fbe6e3; color: #8c3b43; font-size: 15px; }

#sendBtn { margin-top: 6px; }
#sendBtn .btn-spin { display: none; width: 20px; height: 20px; border: 2px solid rgba(255,255,255,.4); border-top-color: #fff; border-radius: 50%; animation: spin .8s linear infinite; }
#sendBtn.is-loading { pointer-events: none; opacity: .9; }
#sendBtn.is-loading .btn-spin { display: block; }
#sendBtn.is-loading .ico { display: none; }

.thanks { position: relative; z-index: 2; margin-top: 30px; padding: 36px 24px 30px; text-align: center; border-radius: 26px;
  background: rgba(255,255,255,.62); box-shadow: 0 16px 40px rgba(176, 129, 132, .2), inset 0 0 0 1px rgba(255,255,255,.85); color: var(--mauve); }
.thanks:not([hidden]) { animation: pop .8s var(--ease-out) both; }
.thanks .ico--lg { margin: 0 auto 8px; color: var(--rose-dark); }
.thanks h1 { font-family: var(--f-display); font-style: italic; font-weight: 500; font-size: 38px; line-height: 1.1; margin-bottom: 10px; }
.thanks p { font-size: 17px; margin-bottom: 14px; text-wrap: balance; }

.rsvp-flower { position: absolute; bottom: 0; pointer-events: none; z-index: 1; }
/* branch.webp has its woody ends on the right: each branch grows in from its own screen edge, ends off screen */
.rsvp-flower--l { left: -18%; bottom: 14px; width: min(46vw, 220px); scale: -1 1; }
.rsvp-flower--r { right: -22%; bottom: 6px; width: min(44vw, 210px); }
.rsvp-flower { -webkit-mask-image: linear-gradient(to top, transparent 0, #000 16%); mask-image: linear-gradient(to top, transparent 0, #000 16%); }

/* ---------- WISHLIST ---------- */
.wish { padding-top: 128px; padding-bottom: 0; text-align: center; overflow: hidden; }
.wish-curtain { position: absolute; left: -2%; top: 0; width: 38%; max-width: 190px; height: 330px; object-fit: cover; object-position: top center; z-index: 1; opacity: .92; pointer-events: none;
  -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 14%, #000 56%, transparent 100%), linear-gradient(to right, #000 52%, transparent 100%);
  -webkit-mask-composite: source-in;
          mask-image: linear-gradient(to bottom, transparent 0, #000 14%, #000 56%, transparent 100%), linear-gradient(to right, #000 52%, transparent 100%);
          mask-composite: intersect; }
.deco--wish { top: -18px; right: -12%; width: min(44vw, 210px); rotate: 180deg; scale: -1 1; z-index: 2; }
.wish-in { position: relative; z-index: 3; display: flex; flex-direction: column; align-items: center; padding: 0 6px; }
.ico--gift { width: 46px; height: 46px; color: var(--mauve); stroke-width: 1.3; margin-bottom: 14px; }
.wish .rule { margin: 14px auto 22px; }
.wish-lead { font-family: var(--f-display); font-size: 22px; line-height: 1.3; color: var(--mauve); max-width: 15em; text-wrap: balance; margin-bottom: 20px; }
.wish-text { font-size: 17px; line-height: 1.5; max-width: 17em; text-wrap: balance; margin-bottom: 28px; color: var(--ink); }
.wish-land { position: relative; z-index: 1; width: calc(100% + var(--gutter) * 2); margin: 30px calc(var(--gutter) * -1) 0; max-width: none; scale: -1 1;
  -webkit-mask-image: linear-gradient(to bottom, #000 78%, transparent 100%); mask-image: linear-gradient(to bottom, #000 78%, transparent 100%); }

/* ---------- footer ---------- */
.foot { position: relative; z-index: 2; text-align: center; padding: 38px var(--gutter) 64px; background: #f7e6df; color: var(--mauve); margin-top: -2px; }
.foot-seal { width: 54px; margin: 0 auto 14px; filter: drop-shadow(0 6px 8px rgba(120, 72, 72, .25)); }
.foot-names { font-family: var(--f-display); font-style: italic; font-size: 34px; line-height: 1.1; }
.foot-names i { font-size: .9em; opacity: .8; }
.foot-date { font-variant-numeric: lining-nums; font-family: var(--f-display); text-transform: uppercase; letter-spacing: .26em; padding-left: .26em; font-size: 14px; margin-top: 8px; font-weight: 600; }
.foot-note { font-style: italic; color: var(--mauve-2); margin-top: 18px; font-size: 16px; }

/* ---------- плавающая RSVP ---------- */
.fab {
  position: fixed; z-index: 30; bottom: max(16px, env(safe-area-inset-bottom)); right: max(16px, calc(50% - var(--col) / 2 + 16px));
  display: inline-flex; align-items: center; gap: .5em; padding: 14px 22px; border-radius: 999px;
  font-family: var(--f-display); font-weight: 600; font-size: 19px; letter-spacing: .08em; text-decoration: none; color: #fdf1ee;
  background: linear-gradient(180deg, #bb8d90, #a47579); border: 1px solid rgba(255,255,255,.4);
  box-shadow: 0 14px 30px rgba(154, 104, 109, .38), inset 0 1px 0 rgba(255,255,255,.35);
  opacity: 0; translate: 0 16px; visibility: hidden; transition: opacity .4s, translate .5s var(--ease-out), visibility 0s .5s;
}
.fab .ico { width: 1em; height: 1em; }
.fab.show { opacity: 1; translate: 0 0; visibility: visible; transition-delay: 0s; }

/* ==========================================================================
   KEYFRAMES
   ========================================================================== */
@keyframes silk { from { transform: scale(1.02) translate(0, 0); } to { transform: scale(1.09) translate(-1.6%, 1.2%); } }
@keyframes shimmer { from { opacity: .55; translate: -2% -1%; } to { opacity: 1; translate: 2% 1.5%; } }
@keyframes float { 0%, 100% { translate: 0 0; } 50% { translate: 0 -7px; } }
@keyframes seal-halo { 0%, 100% { opacity: 0; scale: .94; } 50% { opacity: 1; scale: 1.06; } }
@keyframes seal-glint {
  0% { opacity: 0; background-position: 130% 0; }
  6% { opacity: 1; }
  30% { opacity: 1; background-position: -30% 0; }
  36%, 100% { opacity: 0; background-position: -30% 0; }
}
@keyframes tap { 0%, 100% { translate: 0 0; } 40% { translate: 0 -6px; } 60% { translate: 0 -6px; } }
@keyframes nudge { 0%, 100% { translate: 0 0; opacity: .35; } 50% { translate: 0 5px; opacity: .9; } }
@keyframes glow { 0% { opacity: 0; scale: .5; } 35% { opacity: 1; } 100% { opacity: 0; scale: 1.5; } }
@keyframes fall {
  0% { opacity: 0; translate: var(--x0) -6vh; rotate: 0deg; }
  8% { opacity: .9; }
  50% { translate: calc((var(--x0) + var(--x1)) / 2 + var(--sw, 30px)) 50vh; }
  92% { opacity: .85; }
  100% { opacity: 0; translate: var(--x1) 108vh; rotate: var(--r, 300deg); }
}
@keyframes burst-p {
  0% { opacity: 0; translate: 0 0; rotate: 0deg; scale: .4; }
  12% { opacity: 1; }
  45% { translate: calc(var(--x) * 1px) calc(var(--y) * 1px); }
  100% { opacity: 0; translate: calc(var(--x) * 1.25px + var(--dx, 0px)) calc(var(--y) * 1px + 190px); rotate: var(--r, 200deg); scale: 1; }
}
@keyframes burst-s {
  0% { opacity: 0; translate: 0 0; scale: .3; }
  20% { opacity: 1; }
  100% { opacity: 0; translate: calc(var(--x) * 1px) calc(var(--y) * 1px); scale: 1; }
}
@keyframes spin { to { rotate: 360deg; } }
@keyframes pop { from { opacity: 0; transform: translateY(14px) scale(.97); } to { opacity: 1; transform: none; } }

/* ==========================================================================
   reduced motion
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; animation-delay: 0s !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; transition-delay: 0s !important; }
  .js [data-reveal] { opacity: 1; translate: 0 0; }
  .drift, .burst, .seal-ring { display: none; }
}

/* ==========================================================================
   Added for the application (not in the landing)
   ========================================================================== */
.skip-link { position: fixed; z-index: 90; left: 1rem; top: 1rem; padding: .8rem 1rem; background: var(--ink); color: #fff; transform: translateY(-300%); }
.skip-link:focus { transform: none; }
main:focus { outline: none; }
dl, dd { margin: 0; }
.btn--sm { padding: 12px 22px; font-size: 18px; }
.btn:disabled { opacity: .45; pointer-events: none; }
.envelope { text-decoration: none; color: inherit; }

/* without JavaScript there is no envelope intro: the card is shown at once, as in the landing's <noscript> */
html:not(.js) .eyebrow, html:not(.js) .hint, html:not(.js) .env-closed, html:not(.js) .env-film, html:not(.js) .seal-ring, html:not(.js) .glow { display: none; }
html:not(.js) .envelope { opacity: 1; scale: 1; translate: none; pointer-events: none; }
html:not(.js) .env-open { opacity: 1; }
html:not(.js) .card { visibility: visible; translate: 0 0; rotate: 0deg; }
html:not(.js) .card-sprig { opacity: 1; translate: 0 0; scale: 1; }
html:not(.js) .cta { opacity: 1; visibility: visible; pointer-events: auto; translate: -50% 0; }

/* names from the event title: a stacked pair when "A & B" is short, one wrapped block otherwise */
.card-names { max-width: 100%; }
.card-names.is-md { font-size: .82em; }
.card-names.is-sm { font-size: .64em; }
.card-names span.names-solo {
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 4; overflow: hidden;
  margin-left: 0; font-size: 1.1em; line-height: 1.05; white-space: normal; text-align: center; text-wrap: balance; overflow-wrap: anywhere;
}
.card-place {
  max-width: 100%; margin-top: .7em; text-align: center; overflow-wrap: anywhere;
  font-family: var(--f-display); font-style: italic; font-size: .34em; line-height: 1.25; color: var(--mauve-2);
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden;
}
.foot-names { max-width: 100%; text-wrap: balance; overflow-wrap: anywhere; }
.foot-names.is-md { font-size: 28px; }
.foot-names.is-sm { font-size: 22px; }
.foot-names .names-solo { display: block; }

/* story: the organizer's description and photos */
.story { padding-bottom: 36px; }
.story-copy p:not(.lead) { white-space: pre-line; overflow-wrap: anywhere; }

/* details */
.details { padding-top: 22px; padding-bottom: 30px; }
.facts { position: relative; z-index: 2; margin-top: 22px; display: grid; }
.fact { display: flex; align-items: flex-start; gap: 16px; padding: 18px 0; border-bottom: 1px solid var(--line); }
.fact:last-child { border-bottom: 0; }
.medal {
  flex: none; width: 46px; height: 46px; display: grid; place-items: center; border-radius: 50%; color: var(--mauve);
  background: linear-gradient(180deg, #faebe7 0%, #f2d9d5 100%);
  box-shadow: 0 8px 18px rgba(176, 129, 132, .22), inset 0 1px 0 rgba(255,255,255,.9);
}
.medal .ico { width: 22px; height: 22px; stroke-width: 1.4; }
.fact > div { flex: 1 1 auto; min-width: 0; padding-top: 2px; }
.fact-main { font-family: var(--f-display); font-weight: 600; font-size: 22px; line-height: 1.2; color: var(--mauve); overflow-wrap: anywhere; }
.fact-sub { font-family: var(--f-display); font-style: italic; font-size: 19px; line-height: 1.25; color: var(--mauve-2); }
.fact-zone { margin-top: 10px; font-size: 17px; }
.link--map { display: inline-flex; align-items: center; gap: .35em; margin-top: 2px; padding-left: 0; font-size: 18px; }
.schedule { display: grid; gap: 10px; }
.schedule > div { display: grid; grid-template-columns: 5.2em 1fr; gap: 12px; align-items: baseline; }
.schedule dt { font-variant-numeric: lining-nums; font-family: var(--f-display); font-weight: 600; font-size: 19px; color: var(--mauve); }
.schedule dd { font-size: 17px; color: var(--ink); overflow-wrap: anywhere; }
.schedule-note { display: block; font-style: italic; font-size: 15.5px; color: var(--mauve-2); }

/* the reply form */
.form-current { font-family: var(--f-display); font-style: italic; font-size: 19px; line-height: 1.35; color: var(--mauve-2); }
.form-current strong { font-style: normal; font-weight: 600; color: var(--mauve); }
.rsvp-deadline { text-align: center; font-family: var(--f-display); font-style: italic; font-size: 20px; line-height: 1.3; color: var(--mauve-2); }
.form-hint { text-align: center; font-style: italic; font-size: 16px; color: var(--mauve-2); }
.form-link { display: block; padding: 6px 0; text-align: center; font-family: var(--f-display); font-style: italic; font-size: 20px; color: var(--rose-dark); text-underline-offset: 4px; }

/* the reply's details (shared macro classes): names on the open link, a note, extra guests */
.rsvp-extra { display: grid; gap: 18px; }
.rsvp-extra__field { display: grid; gap: 7px; min-width: 0; }
.rsvp-extra__label { display: block; font-family: var(--f-display); font-weight: 600; font-size: 18px; color: var(--mauve); }
.rsvp-extra__optional { font-weight: 400; font-style: italic; font-size: 16px; color: var(--mauve-2); }
.rsvp-extra__help { font-style: italic; font-size: 16px; line-height: 1.35; color: var(--mauve-2); }
.rsvp-extra__input {
  display: block; width: 100%; border: 1px solid rgba(176, 129, 132, .28); border-radius: 16px; padding: 13px 16px;
  background: rgba(255, 255, 255, .62); font-family: var(--f-body); font-size: 17px; color: var(--ink);
  box-shadow: 0 6px 16px rgba(176, 129, 132, .12), inset 0 1px 0 rgba(255,255,255,.9); outline: none;
  transition: border-color .2s, box-shadow .2s, background .2s; -webkit-appearance: none; appearance: none;
}
.rsvp-extra__input:focus { border-color: var(--rose); background: #fff; box-shadow: 0 0 0 4px rgba(176, 129, 132, .16); }
.rsvp-extra__textarea { resize: vertical; min-height: 92px; line-height: 1.45; }
.rsvp-guest__select { -webkit-appearance: auto; appearance: auto; }

.rsvp-guests-block { display: grid; gap: 12px; min-width: 0; }
.rsvp-guests { display: grid; gap: 14px; }
.rsvp-guest {
  display: grid; gap: 14px; min-width: 0; padding: 16px 16px 18px; border-radius: 20px;
  background: rgba(255, 255, 255, .55); border: 1px solid rgba(255,255,255,.8); box-shadow: 0 8px 20px rgba(176, 129, 132, .14);
}
.rsvp-guest__legend { padding: 0 6px; font-family: var(--f-display); font-weight: 600; font-size: 18px; color: var(--mauve); }
.rsvp-guest__names { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.rsvp-guest__field { display: grid; gap: 6px; min-width: 0; }
.rsvp-guest__toggle { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.rsvp-guest__option {
  display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 6px 12px;
  border: 1px solid rgba(176, 129, 132, .3); border-radius: 999px; background: rgba(255, 255, 255, .6);
  font-family: var(--f-display); font-weight: 500; font-size: 19px; color: var(--mauve);
  transition: background .25s, color .25s, border-color .25s; -webkit-tap-highlight-color: transparent;
}
.rsvp-guest__option[aria-pressed="true"] { background: linear-gradient(180deg, #bb8d90, #a47579); border-color: transparent; color: #fdf1ee; }
.rsvp-guest__icon { flex: none; width: 15px; height: auto; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.rsvp-guests__add { justify-self: center; }
.rsvp-guests__count { text-align: center; font-style: italic; font-size: 16px; color: var(--mauve-2); }
.rsvp-guest__remove { justify-self: end; min-height: 44px; padding: 0 6px; background: none; border: 0; font-family: var(--f-display); font-style: italic; font-size: 18px; color: var(--rose-dark); text-decoration: underline; text-underline-offset: 4px; }
@media (max-width: 380px) { .rsvp-guest__names { grid-template-columns: 1fr; } }

/* event photos from the shared macro */
.gallery { padding-top: 10px; padding-bottom: 36px; }
.gallery-grid { position: relative; z-index: 2; margin-top: 20px; }
.photo-gallery { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.photo-gallery__item { aspect-ratio: 4 / 5; }
.photo-gallery__item:first-child,
.photo-gallery__item:last-child:nth-child(even) { grid-column: 1 / -1; aspect-ratio: 4 / 3; }
.photo-gallery__link { display: block; height: 100%; overflow: hidden; border-radius: 18px; box-shadow: 0 12px 26px rgba(176, 129, 132, .22); }
.photo-gallery__link img { width: 100%; height: 100%; max-width: none; object-fit: cover; }

/* photo viewer (built by invitation.js) */
.lightbox {
  position: fixed; inset: 0; z-index: 80;
  display: grid; grid-template-rows: auto 1fr auto; align-items: center; justify-items: center;
  padding: max(.75rem, env(safe-area-inset-top)) .75rem max(1rem, env(safe-area-inset-bottom));
  background: rgba(52, 33, 36, .94);
}
.lightbox__close { justify-self: end; width: 2.75rem; height: 2.75rem; background: none; border: 0; color: #fff; }
.lightbox svg { width: 1.5rem; height: 1.5rem; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.lightbox__close svg { margin: auto; }
.lightbox__stage { position: relative; width: min(100%, 64rem); height: 100%; min-height: 0; overflow: hidden; }
.lightbox__stage img { position: absolute; inset: 0; width: 100%; height: 100%; max-width: none; object-fit: contain; opacity: 0; transition: opacity .6s var(--ease-out); }
.lightbox__stage img.is-on { opacity: 1; }
.lightbox__bar { display: flex; align-items: center; justify-content: center; gap: 2rem; margin-top: 1rem; color: #fff; }
.lightbox__nav { display: grid; place-items: center; width: 2.75rem; height: 2.75rem; border-radius: 50%; background: none; border: 1px solid rgba(255,255,255,.4); color: #fff; }
.lightbox__count { min-width: 4rem; font: 500 1.2rem/1 var(--f-display); letter-spacing: .2em; text-align: center; }
.lightbox button:focus-visible { outline-color: #fff; }

/* the shared wishlist list */
.wish-list { width: 100%; margin-top: 4px; text-align: left; }
.wishlist { width: 100%; }
.wishlist-items { display: grid; gap: 14px; }
.wishlist-item {
  display: grid; gap: 14px; padding: 18px 20px 20px; border-radius: 20px;
  background: rgba(255, 255, 255, .6); border: 1px solid rgba(255,255,255,.85); box-shadow: 0 10px 24px rgba(176, 129, 132, .16);
  scroll-margin-top: 24px;
}
.wishlist-item--mine { background: linear-gradient(180deg, #f9e4e0, #f3d5d1); }
.wishlist-item__title { font-family: var(--f-display); font-weight: 600; font-size: 22px; line-height: 1.2; color: var(--mauve); overflow-wrap: anywhere; }
.wishlist-item--taken .wishlist-item__title { color: var(--mauve-2); }
.wishlist-item__description { margin-top: 6px; white-space: pre-wrap; overflow-wrap: anywhere; }
.wishlist-item__link { margin-top: 6px; }
.wishlist-item__link a { color: var(--rose-dark); text-underline-offset: 4px; }
.wishlist-item__status { margin-top: 8px; font-style: italic; font-size: 16px; color: var(--mauve-2); }
.wishlist-item__status strong { font-style: normal; font-weight: 500; color: var(--mauve); }
.wishlist-item__actions { display: grid; gap: 10px; }
.wishlist-item__form { display: flex; flex-wrap: wrap; align-items: end; gap: 12px; }
.wishlist-item__quantity { display: grid; gap: 4px; font-family: var(--f-display); font-weight: 600; font-size: 16px; color: var(--mauve); }
.wishlist-item__quantity input {
  width: 6rem; min-height: 44px; padding: 8px 12px; border: 1px solid rgba(176, 129, 132, .28); border-radius: 14px;
  background: rgba(255, 255, 255, .7); font-family: var(--f-body); font-size: 17px; color: var(--ink);
}
.wishlist-item__quantity input:focus { outline: none; border-color: var(--rose); box-shadow: 0 0 0 4px rgba(176, 129, 132, .16); }
.wishlist-item__form .btn, .wishlist-item__cancel .btn { flex: 1 1 100%; width: 100%; }
.wishlist-notice, .wishlist-error { margin-bottom: 14px; padding: 12px 16px; border-radius: 14px; font-size: 16px; text-align: left; }
.wishlist-notice { background: rgba(255, 255, 255, .7); color: var(--mauve); }
.wishlist-error { background: #fbe6e3; color: #8c3b43; }
.wishlist-help { margin-top: 16px; text-align: center; font-style: italic; font-size: 16px; color: var(--mauve-2); }

/* ---------- response saved ---------- */
.saved { min-height: 100vh; overflow: hidden; padding-top: 48px; padding-bottom: 56px; display: flex; flex-direction: column; align-items: center; }
@supports (height: 1svh) { .saved { min-height: 100svh; } }
.saved .deco--story { top: -40px; width: min(46vw, 220px); }
.saved .thanks { width: 100%; margin-top: 54px; }
.thanks h1 { font-family: var(--f-display); font-style: italic; font-weight: 500; font-size: 38px; line-height: 1.1; margin-bottom: 10px; text-wrap: balance; overflow-wrap: anywhere; }
.thanks .btn { margin-top: 6px; }
.saved-event { margin: 4px 0 10px; font-family: var(--f-display); font-style: italic; font-size: 24px; line-height: 1.2; max-width: 100%; text-wrap: balance; overflow-wrap: anywhere; }
.saved-event.is-md { font-size: 22px; }
.saved-event.is-sm { font-size: 19px; }
.saved-event i { font-size: .9em; opacity: .8; }
.saved-party { margin-bottom: 14px; font-variant-numeric: lining-nums; font-family: var(--f-display); text-transform: uppercase; letter-spacing: .2em; font-size: 14px; font-weight: 600; }
.saved .facts { width: 100%; margin-top: 18px; }
.saved-wishlist { position: relative; z-index: 2; width: 100%; margin-top: 34px; text-align: center; }
.saved-wishlist .rule { margin: 14px auto 18px; }
.saved-wishlist .wish-text { max-width: 20em; margin: 0 auto 20px; }
.saved .form-link { position: relative; z-index: 2; margin-top: 18px; }
.flow--saved::before { display: none; }
