:root {
  --paper: #f8f2e8;
  --paper-2: #f1e7d6;
  --cream: #fffaf2;
  --ink: #3a2a22;
  --muted: #8a7666;
  --red: #9a1f22;
  --red-deep: #6e1316;
  --gold: #b48f58;
  --gold-soft: #d8c19a;
  --script: "Great Vibes", "Snell Roundhand", cursive;
  --serif: "Cormorant Garamond", "Times New Roman", serif;
  --sans: "Be Vietnam Pro", system-ui, -apple-system, sans-serif;
  --num: "Playfair Display", Georgia, "Times New Roman", serif;
  --col: 480px;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; -webkit-tap-highlight-color: transparent; scroll-behavior: smooth; scroll-padding-top: 12px; }
body {
  margin: 0;
  font-family: var(--serif);
  font-size: 18px;
  line-height: 1.55;
  color: var(--ink);
  background: #2a1c17;
  -webkit-font-smoothing: antialiased;
}

body.locked { position: fixed; left: 0; right: 0; width: 100%; overflow: hidden; }
img { display: block; max-width: 100%; }
p, h1, h2, h3, h4 { margin: 0; }
button { font: inherit; color: inherit; cursor: pointer; }
button, a, .choice span, .dock, .giftbox { -webkit-touch-callout: none; -webkit-user-select: none; user-select: none; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }

.script { font-family: var(--script); font-weight: 400; }
.num { font-family: var(--num); font-variant-numeric: lining-nums; }
.eyebrow {
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: .32em;
  text-transform: uppercase;
  color: var(--gold);
  text-wrap: balance;
}
.center { text-align: center; }
.nw { white-space: nowrap; }
.muted { color: var(--muted); font-size: 16px; }

.backdrop {
  position: fixed; inset: 0;
  background: url("images/thumb/7.jpg") center / cover;
  filter: blur(28px) brightness(.55) saturate(.9);
  transform: scale(1.1);
}

.page {
  position: relative;
  max-width: var(--col);
  margin: 0 auto;
  background:
    radial-gradient(circle at 20% 10%, rgba(255,255,255,.55), transparent 40%),
    radial-gradient(circle at 80% 70%, rgba(180,143,88,.08), transparent 45%),
    var(--paper);
  box-shadow: 0 0 80px rgba(0,0,0,.45);
  overflow: hidden;
}

.cover {
  position: fixed; inset: 0; z-index: 80;
  display: grid; place-items: center;
  padding: 24px 16px;
  overflow: hidden;
  background: var(--red-deep);
  transition: opacity 1s ease, visibility 1s;
}
.cover__bg {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; object-position: 50% 40%;
  opacity: .5;
  animation: slowzoom 18s ease-in-out infinite alternate;
}
.cover::after {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(ellipse at center, rgba(40,8,8,.25), rgba(40,8,8,.8));
}
.cover__inner { position: relative; z-index: 1; width: min(360px, 100%); text-align: center; color: var(--paper); }
.cover__eyebrow { color: var(--gold-soft); }
.cover__guest {
  margin-top: 10px;
  font-size: 32px; font-weight: 600; line-height: 1.2;
  color: #fff; text-wrap: balance; overflow-wrap: anywhere;
  text-shadow: 0 2px 16px rgba(0,0,0,.35);
}
.cover__sub { margin: 4px 0 34px; font-style: italic; color: rgba(248,242,232,.82); }
.cover__eyebrow, .cover__guest, .cover__sub, .cover__hint { transition: opacity .4s, transform .4s; }
.cover__hint {
  margin-top: 30px;
  font-family: var(--sans); font-size: 12px; letter-spacing: .1em;
  color: rgba(248,242,232,.78);
  animation: pulse 2s ease-in-out infinite;
}

.envelope { position: relative; width: min(310px, 84vw); aspect-ratio: 3 / 2; margin: 0 auto; perspective: 900px; }
.envelope__back {
  position: absolute; inset: 0; border-radius: 6px;
  background: #7a1417;
  box-shadow: 0 30px 60px -18px rgba(0,0,0,.65);
}
.envelope__letter {
  position: absolute; left: 6%; right: 6%; top: 7%; bottom: 6%; z-index: 1;
  padding: 11% 6% 0;
  border-radius: 3px;
  text-align: center;
  background: var(--paper);
  box-shadow: 0 2px 10px rgba(0,0,0,.15);
  transition: transform 1s cubic-bezier(.2,.8,.2,1) .45s;
}
.envelope__letter::before { content: ""; position: absolute; inset: 6px; border: 1px solid var(--gold-soft); border-radius: 2px; pointer-events: none; }
.letter__names { margin-top: 2px; font-size: 38px; line-height: 1.15; color: var(--red-deep); }
.letter__names em { font-style: normal; color: var(--gold); }
.letter__date { margin-top: 2px; font-size: 14px; letter-spacing: .12em; color: var(--muted); }
.envelope__pocket {
  position: absolute; inset: 0; z-index: 2; border-radius: 6px;
  background: linear-gradient(160deg, #a92428, #85171a);
  box-shadow: inset 0 -3px 0 rgba(216,193,154,.45);
  clip-path: polygon(0 0, 50% 56%, 100% 0, 100% 100%, 0 100%);
}
.envelope__flap {
  position: absolute; left: 0; right: 0; top: 0; height: 62%; z-index: 3;
  border-radius: 6px 6px 0 0;
  background: linear-gradient(180deg, #b72c30, #951f22);
  clip-path: polygon(0 0, 100% 0, 50% 100%);
  transform-origin: top center;
  transition: transform .8s cubic-bezier(.6,0,.3,1), z-index 0s linear .4s;
}
.seal {
  position: absolute; left: 50%; top: 62%; z-index: 4;
  width: 72px; height: 72px; margin: -36px 0 0 -36px;
  border: 0; border-radius: 50%;
  display: grid; place-items: center;
  font-family: "Songti SC", "STSong", serif; font-size: 32px; color: var(--red-deep);
  background: radial-gradient(circle at 35% 30%, #f3dca5, #c9a15a 55%, #99733a);
  box-shadow: 0 6px 16px rgba(0,0,0,.35), inset 0 -3px 6px rgba(0,0,0,.2);
  transition: transform .35s, opacity .4s;
}
.seal::before { content: ""; position: absolute; inset: 6px; border-radius: 50%; border: 1.5px dashed rgba(110,19,22,.35); }
.seal:hover { transform: scale(1.06) rotate(-4deg); }
.is-open .envelope__flap { transform: rotateX(180deg); z-index: 0; }
.is-open .seal { opacity: 0; transform: scale(.6); pointer-events: none; }
.is-open .envelope__letter { transform: translateY(-58%); }
.is-open .cover__eyebrow, .is-open .cover__guest, .is-open .cover__sub, .is-open .cover__hint { opacity: 0; transform: translateY(-10px); }
.opened .cover { opacity: 0; visibility: hidden; }

.hero {
  position: relative;
  height: 100vh; height: 100svh; min-height: 560px; max-height: 900px;
  color: #fff;
  overflow: hidden;
}
.hero__img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; object-position: 50% 30%;
  transform: scale(1.12);
  transition: transform 3s cubic-bezier(.2,.6,.2,1);
}
.opened .hero__img { transform: scale(1); }
.hero::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(to bottom, rgba(0,0,0,.15) 0%, transparent 30%, transparent 50%, rgba(35,18,12,.8) 100%);
}
.hero__content {
  position: absolute; left: 0; right: 0; bottom: 96px; z-index: 1;
  text-align: center; padding: 0 20px;
}
.hero__content .eyebrow { color: var(--gold-soft); }
.hero__names { margin: 6px 0 6px; font-size: 60px; font-weight: 400; line-height: 1.05; text-shadow: 0 2px 20px rgba(0,0,0,.35); }
.hero__names span { display: inline-block; }
.hero__names em { font-style: normal; color: var(--gold); padding: 0 .15em; }
.hero__date { font-size: 20px; letter-spacing: .24em; }
.scroll-cue {
  position: absolute; bottom: 30px; left: 50%; z-index: 1;
  width: 22px; height: 34px; margin-left: -11px;
  border: 1.5px solid rgba(255,255,255,.7); border-radius: 12px;
}
.scroll-cue span {
  position: absolute; left: 50%; top: 7px; width: 3px; height: 7px; margin-left: -1.5px;
  background: #fff; border-radius: 2px;
  animation: cue 1.8s ease-in-out infinite;
}

.section { padding: 72px 24px; }
.title {
  margin: 4px 0 28px;
  text-align: center;
  font-size: 48px; font-weight: 400; line-height: 1.1;
  color: var(--red-deep);
}

.invite { text-align: center; }
.han {
  font-family: "Songti SC", "STSong", serif;
  font-size: 40px; color: var(--red);
  margin-bottom: 24px;
}
.families {
  display: grid; grid-template-columns: 1fr 1px 1fr; gap: 16px;
  font-size: 17px; line-height: 1.5;
}
.family .eyebrow { margin-bottom: 8px; }
.family .muted { margin-top: 6px; font-size: clamp(12.5px, 3.3vw, 14px); font-style: italic; }
.family .muted .nw { display: block; }
.family__actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 12px; }
.families__line { background: linear-gradient(transparent, var(--gold-soft), transparent); }
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  min-height: 40px; padding: 0 14px;
  font-family: var(--sans); font-size: 12px; letter-spacing: .04em; white-space: nowrap; text-decoration: none;
  color: var(--red-deep); background: var(--cream);
  border: 1px solid var(--gold-soft); border-radius: 999px;
  transition: background .2s, color .2s, border-color .2s;
}
.chip svg { width: 14px; height: 14px; flex: none; }
.chip:hover { color: #fff; background: var(--red-deep); border-color: var(--red-deep); }
.chip--solid { color: #fff; background: var(--red-deep); border-color: var(--red-deep); }
.chip--solid:hover { background: var(--red); border-color: var(--red); }
.invite__lead {
  margin: 40px 0 28px;
  font-size: 20px; font-style: italic;
}

.couple {
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 8px;
}
.couple__amp { font-size: 44px; color: var(--gold); margin-top: -40px; }
.portrait { margin: 0; }
.arch {
  position: relative;
  aspect-ratio: 3 / 4.3;
  border-radius: 999px 999px 6px 6px;
  overflow: hidden;
  box-shadow: 0 12px 28px rgba(58,42,34,.18);
}
.arch img { width: 100%; height: 100%; object-fit: cover; }
.portrait figcaption { margin-top: 14px; }
.portrait small {
  display: block;
  font-family: var(--sans); font-size: 11px; letter-spacing: .2em; text-transform: uppercase;
  color: var(--muted);
}
.portrait strong { display: block; font-size: 24px; font-weight: 400; line-height: 1.25; color: var(--red-deep); text-wrap: balance; }

.datecard {
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center;
  margin: 44px auto 12px; max-width: 340px;
}
.datecard__side {
  padding: 8px 0;
  border-top: 1px solid var(--gold-soft); border-bottom: 1px solid var(--gold-soft);
  font-family: var(--sans); font-size: 11px; letter-spacing: .12em; text-transform: uppercase;
  white-space: nowrap;
}
.datecard__day { padding: 0 18px; font-size: 60px; font-weight: 400; line-height: 1; color: var(--red); }

.quote { position: relative; min-height: 460px; display: grid; align-items: end; color: #fff; }
.quote img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 35%; }
.quote::after { content: ""; position: absolute; inset: 0; background: linear-gradient(transparent 35%, rgba(30,20,12,.78)); }
.quote blockquote { position: relative; z-index: 1; margin: 0; padding: 40px 32px; text-align: center; font-size: 22px; font-style: italic; line-height: 1.45; }

.calendar-sec { background: var(--paper-2); }
.calendar {
  display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px;
  max-width: 360px; margin: 0 auto;
  text-align: center;
  font-family: var(--sans); font-size: 14px;
}
.calendar .dow { font-size: 10px; letter-spacing: .12em; color: var(--muted); padding-bottom: 8px; }
.calendar .d { position: relative; isolation: isolate; aspect-ratio: 1; display: grid; place-items: center; }
.calendar .d.sun { color: var(--red); }
.calendar .d.today { color: #fff; font-weight: 500; }
.calendar .d.today::before {
  content: ""; position: absolute; inset: -2px; z-index: -1;
  background: var(--red);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 21.35l-1.45-1.32C5.4 15.36 2 12.28 2 8.5 2 5.42 4.42 3 7.5 3c1.74 0 3.41.81 4.5 2.09C13.09 3.81 14.76 3 16.5 3 19.58 3 22 5.42 22 8.5c0 3.78-3.4 6.86-8.55 11.54L12 21.35z'/%3E%3C/svg%3E") center / contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 21.35l-1.45-1.32C5.4 15.36 2 12.28 2 8.5 2 5.42 4.42 3 7.5 3c1.74 0 3.41.81 4.5 2.09C13.09 3.81 14.76 3 16.5 3 19.58 3 22 5.42 22 8.5c0 3.78-3.4 6.86-8.55 11.54L12 21.35z'/%3E%3C/svg%3E") center / contain no-repeat;
  animation: beat 1.6s ease-in-out infinite;
}

.countdown {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px;
  max-width: 360px; margin: 36px auto 0;
}
.countdown div {
  padding: 14px 4px 10px;
  text-align: center;
  background: var(--paper);
  border: 1px solid var(--gold-soft);
  border-radius: 999px 999px 8px 8px;
}
.countdown b { display: block; font-size: 30px; font-weight: 400; line-height: 1.1; color: var(--red-deep); font-variant-numeric: lining-nums tabular-nums; }
.countdown span { font-family: var(--sans); font-size: 10px; letter-spacing: .15em; text-transform: uppercase; color: var(--muted); }
.countdown.done { display: block; text-align: center; font-size: 22px; font-style: italic; color: var(--red-deep); }

.timeline { display: grid; gap: 18px; }
.day {
  position: relative;
  padding: 26px 20px 8px;
  background: var(--cream);
  border: 1px solid var(--gold-soft); border-radius: 6px;
}
.day::before { content: ""; position: absolute; inset: 6px; border: 1px solid rgba(216,193,154,.45); border-radius: 3px; pointer-events: none; }
.day__head { position: relative; padding-bottom: 12px; text-align: center; border-bottom: 1px solid var(--gold-soft); }
.day__wd { display: block; font-size: 38px; line-height: 1.1; color: var(--red-deep); }
.day__date { font-size: 13px; letter-spacing: .2em; color: var(--muted); }
.ev { position: relative; display: grid; grid-template-columns: 68px minmax(0, 1fr); gap: 14px; padding: 18px 0; }
.ev + .ev { border-top: 1px dashed var(--gold-soft); }
.ev__time { font-size: 24px; line-height: 1.2; color: var(--red); }
.ev__title { font-size: 21px; font-weight: 600; line-height: 1.25; }
.ev__place { margin-top: 2px; font-family: var(--sans); font-size: 13px; color: var(--red-deep); }
.ev__addr { font-size: 15px; line-height: 1.4; color: var(--muted); }
.ev__links { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.ev__links .chip { min-height: 38px; padding: 0 12px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 44px; padding: 0 22px;
  font-family: var(--sans); font-size: 12px; font-style: normal; letter-spacing: .12em; text-transform: uppercase; text-decoration: none;
  color: var(--red-deep);
  background: transparent;
  border: 1px solid var(--red-deep); border-radius: 999px;
  transition: background .25s, color .25s, opacity .25s;
}
.btn:hover { background: var(--red-deep); color: #fff; }
.btn--light { color: var(--red-deep); background: var(--paper); border-color: var(--paper); }
.btn--light:hover { background: transparent; color: var(--paper); }
.btn--ghost { color: #fff; border-color: rgba(255,255,255,.75); }
.btn--ghost:hover { color: var(--red-deep); background: #fff; }
.btn:disabled { opacity: .6; cursor: progress; }

.album-sec { padding: 24px 12px 72px; }
.album { columns: 2; column-gap: 8px; }
.album button {
  display: block; width: 100%; margin: 0 0 8px; padding: 0; border: 0;
  background: var(--paper-2);
  border-radius: 4px; overflow: hidden;
  break-inside: avoid;
}
.album img { width: 100%; height: auto; transition: transform .6s ease; }
.album button:hover img { transform: scale(1.04); }

.rsvp {
  position: relative;
  color: var(--paper);
  background: var(--red-deep);
}
.rsvp::before {
  content: "囍"; position: absolute; right: -30px; top: 20px;
  font-family: "Songti SC", "STSong", serif; font-size: 220px; line-height: 1;
  color: rgba(255,255,255,.05);
  pointer-events: none;
}
.rsvp .title { color: var(--paper); }
.rsvp .eyebrow { color: var(--gold-soft); }
.rsvp__note { font-style: italic; opacity: .85; margin: -12px 0 28px; }
.form { position: relative; display: grid; gap: 20px; max-width: 380px; margin: 0 auto; }
.field { display: grid; gap: 6px; }
.field > span { font-family: var(--sans); font-size: 11px; letter-spacing: .18em; text-transform: uppercase; color: var(--gold-soft); }
.field input, .field textarea {
  width: 100%;
  padding: 8px 0;
  font: inherit; font-size: 18px; color: var(--paper);
  background: transparent;
  border: 0; border-bottom: 1px solid rgba(248,242,232,.4); border-radius: 0;
  outline: none;
  resize: vertical;
}
.field input::placeholder, .field textarea::placeholder { color: rgba(248,242,232,.45); }
.field input:focus, .field textarea:focus { border-bottom-color: var(--gold-soft); }
.choice { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.choice label { position: relative; }
.choice input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.choice span {
  display: flex; align-items: center; justify-content: center;
  min-height: 44px; padding: 8px 10px; text-align: center;
  font-family: var(--sans); font-size: 13px; line-height: 1.3;
  border: 1px solid rgba(248,242,232,.4); border-radius: 999px;
  transition: background .2s, color .2s;
}
.choice input:checked + span { background: var(--paper); color: var(--red-deep); border-color: var(--paper); }
.choice input:focus-visible + span { outline: 2px solid var(--gold-soft); outline-offset: 2px; }
.stepper { display: inline-flex; align-items: center; width: max-content; border: 1px solid rgba(248,242,232,.4); border-radius: 999px; }
.stepper button { width: 46px; height: 46px; padding: 0; border: 0; background: none; color: var(--paper); font-size: 22px; line-height: 1; }
.stepper button:disabled { opacity: .35; cursor: default; }
.stepper output { min-width: 40px; text-align: center; font-size: 22px; }
.form .btn { justify-self: center; margin-top: 4px; padding: 0 30px; }
.rsvp__done { position: relative; max-width: 380px; margin: 0 auto; text-align: center; }
.check { width: 64px; height: 64px; margin: 0 auto 8px; fill: none; stroke: var(--gold-soft); stroke-width: 1.6; }
.check circle { stroke-dasharray: 151; stroke-dashoffset: 151; animation: draw .7s ease forwards; }
.check path { stroke-width: 2.2; stroke-dasharray: 36; stroke-dashoffset: 36; animation: draw .45s ease .55s forwards; }
.rsvp__done-title { font-size: 46px; line-height: 1.1; color: var(--paper); }
#rsvpDoneText { font-style: italic; opacity: .9; }

.gift { text-align: center; }
.gift > .muted { max-width: 30ch; margin: -8px auto 0; }
.giftbox {
  display: flex; flex-direction: column; align-items: center; gap: 16px;
  margin: 56px auto 0; padding: 10px 16px;
  background: none; border: 0;
}
.giftbox__art { position: relative; display: block; width: 132px; height: 128px; animation: wiggle 3.6s ease-in-out infinite; }
.giftbox__body {
  position: absolute; left: 12px; right: 12px; bottom: 0; height: 80px;
  border-radius: 3px 3px 6px 6px;
  background:
    linear-gradient(90deg, transparent 43%, #caa35f 43%, #e3c283 50%, #caa35f 57%, transparent 57%),
    linear-gradient(160deg, #b3272b, var(--red-deep));
  box-shadow: 0 20px 30px -16px rgba(110,19,22,.7);
}
.giftbox__lid {
  position: absolute; left: 4px; right: 4px; top: 30px; height: 26px;
  border-radius: 4px;
  background:
    linear-gradient(90deg, transparent 43%, #d4ae6a 43%, #ecd097 50%, #d4ae6a 57%, transparent 57%),
    linear-gradient(160deg, #c8373b, #971d21);
  box-shadow: 0 4px 8px rgba(0,0,0,.18);
  transform-origin: 15% 100%;
  transition: transform .8s cubic-bezier(.3,1.5,.5,1);
}
.giftbox__bow { position: absolute; left: 50%; top: -24px; width: 60px; height: 28px; margin-left: -30px; }
.giftbox__bow::before, .giftbox__bow::after {
  content: ""; position: absolute; top: 2px;
  width: 26px; height: 22px;
  border: 5px solid #d4ae6a; border-radius: 60% 60% 10% 60%;
}
.giftbox__bow::before { left: 2px; transform: rotate(-18deg); }
.giftbox__bow::after { right: 2px; transform: scaleX(-1) rotate(-18deg); }
.giftbox__spark { position: absolute; left: 50%; top: 44px; width: 7px; height: 7px; margin-left: -3.5px; border-radius: 50%; background: #e3c283; opacity: 0; }
.giftbox__spark:nth-child(1) { --sx: -58px; --sy: -34px; }
.giftbox__spark:nth-child(2) { --sx: 56px; --sy: -40px; }
.giftbox__spark:nth-child(3) { --sx: -30px; --sy: -70px; }
.giftbox__spark:nth-child(4) { --sx: 34px; --sy: -72px; }
.giftbox__label {
  display: inline-flex; align-items: center;
  min-height: 46px; padding: 0 24px;
  font-family: var(--sans); font-size: 12px; font-weight: 500; letter-spacing: .14em; text-transform: uppercase;
  color: #fff; background: var(--red-deep);
  border-radius: 999px;
  box-shadow: 0 10px 20px -10px rgba(110,19,22,.7);
  transition: background .2s;
}
.giftbox:hover .giftbox__label { background: var(--red); }
.giftbox.is-open .giftbox__art { animation: none; }
.giftbox.is-open .giftbox__lid { transform: translate(-34px, -22px) rotate(-24deg); }
.giftbox.is-open .giftbox__spark { animation: spark .9s ease-out forwards; }
.gift-reveal {
  display: grid; grid-template-columns: 1fr 1fr; gap: 10px;
  max-width: 520px; margin: 26px auto 0;
  animation: rise .6s cubic-bezier(.2,.8,.2,1) both;
}
.giftpanel {
  position: relative;
  display: flex; flex-direction: column; align-items: center;
  padding: 16px 12px;
  background: var(--cream); border: 1px solid var(--gold-soft); border-radius: 6px;
}
.giftpanel::before { content: ""; position: absolute; inset: 5px; border: 1px solid rgba(216,193,154,.45); border-radius: 3px; pointer-events: none; }
.giftpanel__label { position: relative; margin-bottom: 10px; font-size: 9px; letter-spacing: .16em; }
.giftpanel img { position: relative; width: 100%; aspect-ratio: 1; object-fit: contain; border-radius: 4px; background: #fff; }
.giftpanel__bank { margin-top: 10px; font-size: 18px; font-weight: 600; line-height: 1.2; }
.giftpanel__acc { font-size: 19px; letter-spacing: .02em; color: var(--red-deep); font-variant-numeric: lining-nums tabular-nums; }
.giftpanel__holder { margin-bottom: 12px; font-family: var(--sans); font-size: 10px; letter-spacing: .08em; color: var(--muted); text-wrap: balance; }
.giftpanel .btn { position: relative; width: 100%; min-height: 40px; margin-top: auto; padding: 0 8px; font-size: 11px; letter-spacing: .06em; white-space: nowrap; }
@media (min-width: 440px) {
  .giftpanel { padding: 20px 16px; }
  .giftpanel__bank { font-size: 20px; }
  .giftpanel__acc { font-size: 22px; }
}
@media (max-width: 359px) {
  .gift-reveal { grid-template-columns: 1fr; max-width: 280px; }
}

.thanks { position: relative; color: #fff; text-align: center; }
.thanks img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; object-position: 50% 30%; }
.thanks::after { content: ""; position: absolute; inset: 0; background: linear-gradient(rgba(30,12,10,.1), rgba(30,12,10,.8)); }
.thanks__content { position: absolute; left: 0; right: 0; bottom: 92px; z-index: 1; padding: 0 20px; font-style: italic; font-size: 20px; }
.thanks__big { font-style: normal; font-size: 64px; line-height: 1.1; }
.thanks .btn { margin-top: 18px; }

.dock {
  position: fixed; z-index: 55; left: 50%; bottom: max(14px, env(safe-area-inset-bottom));
  display: flex; align-items: center; gap: 2px;
  max-width: calc(100vw - 20px); padding: 5px;
  background: rgba(255,250,242,.92);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  border: 1px solid rgba(216,193,154,.85); border-radius: 999px;
  box-shadow: 0 12px 30px -12px rgba(58,20,16,.5);
  transform: translate(-50%, 160%);
  transition: transform .6s cubic-bezier(.2,.8,.2,1), opacity .3s;
}
.dock.show { transform: translate(-50%, 0); }
.locked .dock { opacity: 0; pointer-events: none; }
.dock a {
  display: flex; align-items: center; justify-content: center;
  min-width: 40px; min-height: 40px; padding: 0 12px;
  font-family: var(--sans); font-size: 12px; white-space: nowrap; text-decoration: none;
  color: var(--ink); border-radius: 999px;
  transition: background .25s, color .25s;
}
.dock a.active { color: #fff; background: var(--red-deep); }
.dock__music { flex: none; display: grid; place-items: center; width: 40px; height: 40px; padding: 0; border: 0; border-radius: 50%; background: none; color: var(--red-deep); }
.dock__music.playing svg { animation: spin 4s linear infinite; }

.petals { position: fixed; inset: 0; z-index: 40; pointer-events: none; width: 100%; height: 100%; }

.lightbox {
  position: fixed; inset: 0; z-index: 60;
  display: grid; place-items: center;
  background: rgba(20,12,10,.95);
  overflow: hidden;
  touch-action: none;
}
.lightbox.is-loading::after {
  content: ""; position: absolute; left: 50%; top: 50%;
  width: 34px; height: 34px; margin: -17px 0 0 -17px;
  border: 2px solid rgba(255,255,255,.25); border-top-color: #fff; border-radius: 50%;
  animation: spin .8s linear infinite;
}
.lb__img {
  max-width: 94vw; max-height: 86vh; object-fit: contain; border-radius: 2px;
  box-shadow: 0 20px 60px rgba(0,0,0,.5);
  transform-origin: center;
  cursor: zoom-in; -webkit-user-drag: none; user-select: none;
  transition: opacity .25s;
}
.lb__img.is-animating { transition: opacity .25s, transform .25s ease; }
.lightbox.is-zoomed .lb__img { cursor: grab; }
.lightbox.is-loading .lb__img { opacity: 0; }
.lb__close, .lb__nav {
  position: absolute; z-index: 2; display: grid; place-items: center; padding: 0;
  border: 0; background: rgba(255,255,255,.12); color: #fff;
  width: 46px; height: 46px; border-radius: 50%;
}
.lb__close svg, .lb__nav svg { display: block; pointer-events: none; }
.lb__close { top: max(16px, env(safe-area-inset-top)); right: 16px; }
.lb__nav { top: 50%; margin-top: -23px; }
.lb__prev { left: 12px; }
.lb__next { right: 12px; }
.lb__hint {
  position: absolute; z-index: 2; left: 50%; bottom: calc(max(18px, env(safe-area-inset-bottom)) + 30px);
  padding: 7px 14px; border-radius: 999px;
  font-family: var(--sans); font-size: 12px; white-space: nowrap;
  color: #fff; background: rgba(255,255,255,.14);
  transform: translateX(-50%); opacity: 0; pointer-events: none;
  transition: opacity .4s;
}
.lb__hint.show { opacity: 1; }
.lb__count { position: absolute; z-index: 2; bottom: max(18px, env(safe-area-inset-bottom)); left: 0; right: 0; text-align: center; color: rgba(255,255,255,.7); font-family: var(--sans); font-size: 12px; letter-spacing: .2em; }

.toast {
  position: fixed; z-index: 70; left: 50%; bottom: 84px;
  width: max-content; max-width: calc(100vw - 32px); padding: 10px 18px; text-align: center;
  font-family: var(--sans); font-size: 13px;
  color: #fff; background: rgba(40,25,20,.94); border-radius: 999px;
  transform: translate(-50%, 20px); opacity: 0; pointer-events: none;
  transition: opacity .3s, transform .3s;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

.js .reveal { opacity: 0; transform: translateY(26px); transition: opacity 1s ease, transform 1s cubic-bezier(.2,.7,.2,1); }
.js .reveal.in { opacity: 1; transform: none; }

@keyframes slowzoom { from { transform: scale(1); } to { transform: scale(1.12); } }
@keyframes pulse { 50% { opacity: .45; } }
@keyframes cue { 0% { transform: translateY(0); opacity: 1; } 70% { transform: translateY(12px); opacity: 0; } 100% { opacity: 0; } }
@keyframes beat { 50% { transform: scale(1.12); } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
@keyframes wiggle { 0%, 84%, 100% { transform: rotate(0); } 87% { transform: rotate(-6deg); } 90% { transform: rotate(6deg); } 93% { transform: rotate(-4deg); } 96% { transform: rotate(3deg); } }
@keyframes spark { 0% { opacity: 1; transform: translate(0, 0) scale(1); } 100% { opacity: 0; transform: translate(var(--sx), var(--sy)) scale(.4); } }

@media (max-width: 400px) {
  .family .muted .nw { display: inline; }
  .families { grid-template-columns: 1fr; gap: 0; }
  .families__line { height: 1px; margin: 22px auto; width: 60%; background: linear-gradient(90deg, transparent, var(--gold-soft), transparent); }
  .portrait strong { font-size: 21px; }
  .choice { grid-template-columns: 1fr; }
}

@media (max-width: 360px) {
  .hero__names { font-size: 50px; }
  .title { font-size: 42px; }
  .ev { grid-template-columns: 54px minmax(0, 1fr); gap: 10px; }
  .ev__time { font-size: 20px; }
  .day { padding-left: 14px; padding-right: 14px; }
  .dock a { padding: 0 7px; font-size: 11px; }
}

@media (min-width: 1024px) {
  :root { --col: 560px; }
}

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