:root {
  /* Nudge-controlled appearance */
  --site-bg: #FBF6EE;
  --site-fg: #2E1F22;
  --site-accent: #8C1D33;
  --site-on-accent: #FFF7EA;
  --site-surface: #FFFDFA;
  --site-muted: #7B6A62;
  --site-border: #E7D9C4;
  --site-font: "Songti SC", "Noto Serif SC", "Source Han Serif SC", "STSong", "SimSun", Georgia, serif;
  --site-radius: 14px;
  --site-space: 1;
  --site-type: 1;
  --site-motion: 1;

  /* Hotel palette */
  --wine: #8C1D33;
  --wine-deep: #4A0E1E;
  --wine-ink: #2B0812;
  --gold: #C9A24B;
  --gold-soft: #E7CE95;
  --gold-dim: #9C7A32;
  --rose: #D98C93;
  --ivory: #FBF6EE;
  --ivory-warm: #F3E8D8;
  --emerald: #1F6F5C;
  --amber: #C97A16;
  --danger: #B3261E;
  --info: #2F5D8C;
  --scrim: rgba(26, 8, 14, .72);

  --sans: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", system-ui, -apple-system, sans-serif;
  --gap: calc(24px * var(--site-space));
  --shadow-soft: 0 18px 44px -28px rgba(43, 8, 18, .55);
  --shadow-lift: 0 26px 60px -30px rgba(43, 8, 18, .6);
  --topbar-h: 66px;
}

* { box-sizing: border-box; }

[hidden] { display: none !important; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--site-bg);
  color: var(--site-fg);
  font-family: var(--sans);
  font-size: calc(16px * var(--site-type));
  line-height: 1.85;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(60vw 40vw at 12% -6%, rgba(201, 162, 75, .16), transparent 62%),
    radial-gradient(52vw 38vw at 96% 18%, rgba(140, 29, 51, .1), transparent 60%),
    radial-gradient(46vw 40vw at 40% 108%, rgba(201, 162, 75, .12), transparent 62%);
}

.grain {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: .32;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)' opacity='.35'/%3E%3C/svg%3E");
}

main, .topbar, .footer, .lightbox { position: relative; z-index: 2; }

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

h1, h2, h3, .brand-text, .clock-cell b, .story-year {
  font-family: var(--site-font);
  font-weight: 600;
  letter-spacing: .04em;
}

h2 { font-size: calc(34px * var(--site-type)); line-height: 1.35; margin: 0 0 calc(14px * var(--site-space)); }
h3 { font-size: calc(20px * var(--site-type)); margin: 0 0 6px; }
p { margin: 0 0 calc(14px * var(--site-space)); }
a { color: inherit; }

.wrap { width: min(1180px, 100% - calc(40px * var(--site-space))); margin-inline: auto; }
.section { padding: calc(96px * var(--site-space)) 0; scroll-margin-top: var(--topbar-h); position: relative; }
.center { text-align: center; }
.eyebrow {
  font-family: var(--sans);
  font-size: calc(12px * var(--site-type));
  letter-spacing: .42em;
  text-transform: uppercase;
  color: var(--gold-dim);
  margin: 0 0 10px;
}
.section-sub { color: var(--site-muted); max-width: 62ch; margin-inline: auto; }

/* Scrollbars in the site's own language */
* { scrollbar-width: thin; scrollbar-color: var(--gold-dim) rgba(140, 29, 51, .1); }
::-webkit-scrollbar { width: 11px; height: 11px; }
::-webkit-scrollbar-track { background: rgba(140, 29, 51, .08); }
::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, var(--gold), var(--wine));
  border-radius: 99px;
  border: 3px solid var(--site-bg);
}
::-webkit-scrollbar-thumb:hover { background: linear-gradient(180deg, var(--gold-soft), var(--wine-deep)); }

/* ---------- Buttons ---------- */
.btn {
  --btn-bg: transparent;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: calc(13px * var(--site-space)) calc(26px * var(--site-space));
  border-radius: 999px;
  border: 1px solid transparent;
  font-family: var(--sans);
  font-size: calc(15px * var(--site-type));
  letter-spacing: .06em;
  text-decoration: none;
  cursor: pointer;
  background: var(--btn-bg);
  transition: transform calc(180ms * var(--site-motion)) ease, box-shadow calc(180ms * var(--site-motion)) ease,
    background-color calc(180ms * var(--site-motion)) ease, color calc(180ms * var(--site-motion)) ease;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }
.btn:focus-visible, a:focus-visible, input:focus-visible, textarea:focus-visible, button:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
}
.btn-gold {
  background: linear-gradient(135deg, var(--gold-soft), var(--gold) 52%, var(--gold-dim));
  color: var(--wine-ink);
  font-weight: 600;
  box-shadow: 0 14px 30px -16px rgba(201, 162, 75, .9);
}
.btn-gold:hover { box-shadow: 0 20px 38px -16px rgba(201, 162, 75, 1); }
.btn-outline { border-color: rgba(231, 206, 149, .7); color: var(--gold-soft); }
.btn-outline:hover { background: rgba(231, 206, 149, .14); }
.btn-outline.dark { border-color: rgba(140, 29, 51, .35); color: var(--wine); }
.btn-outline.dark:hover { background: rgba(140, 29, 51, .08); }
.btn.wide { width: 100%; }
.btn[disabled] { opacity: .6; cursor: progress; transform: none; }

/* ---------- Topbar ---------- */
.topbar {
  position: fixed;
  inset: 0 0 auto;
  height: var(--topbar-h);
  display: flex;
  align-items: center;
  gap: var(--gap);
  padding: 0 clamp(16px, 3vw, 34px);
  background: linear-gradient(180deg, rgba(43, 8, 18, .94), rgba(43, 8, 18, .82));
  backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(201, 162, 75, .32);
  color: var(--site-on-accent);
  z-index: 40;
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; flex: none; }
.brand-mark {
  width: 34px; height: 34px; display: grid; place-items: center;
  border: 1px solid var(--gold);
  border-radius: 50%;
  color: var(--gold-soft);
  font-family: var(--site-font);
  font-size: 17px;
  background: radial-gradient(circle at 30% 25%, rgba(201, 162, 75, .35), transparent 70%);
}
.brand-text { display: flex; flex-direction: column; line-height: 1.15; font-size: 16px; color: var(--gold-soft); }
.brand-text i { font-family: var(--sans); font-style: normal; font-size: 9px; letter-spacing: .34em; color: rgba(251, 246, 238, .6); }
.nav { display: flex; gap: clamp(10px, 1.6vw, 24px); margin-left: auto; overflow-x: auto; scrollbar-width: none; }
.nav::-webkit-scrollbar { display: none; }
.nav a {
  position: relative;
  text-decoration: none;
  font-size: calc(14px * var(--site-type));
  letter-spacing: .12em;
  color: rgba(251, 246, 238, .78);
  padding: 6px 2px;
  white-space: nowrap;
  transition: color calc(180ms * var(--site-motion)) ease;
}
.nav a::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 1px;
  background: var(--gold);
  transform: scaleX(0);
  transform-origin: center;
  transition: transform calc(220ms * var(--site-motion)) ease;
}
.nav a:hover, .nav a.active { color: var(--gold-soft); }
.nav a.active::after, .nav a:hover::after { transform: scaleX(1); }

.music-toggle {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid rgba(201, 162, 75, .55);
  background: rgba(201, 162, 75, .12);
  color: var(--gold-soft);
  font-family: var(--sans);
  font-size: 12px;
  letter-spacing: .12em;
  cursor: pointer;
  transition: background-color calc(180ms * var(--site-motion)) ease;
}
.music-toggle:hover { background: rgba(201, 162, 75, .24); }
.music-bars { display: inline-flex; align-items: flex-end; gap: 2px; height: 14px; }
.music-bars i { width: 2px; height: 5px; background: currentColor; border-radius: 2px; }
.music-toggle.playing .music-bars i { animation: bar 900ms ease-in-out infinite; }
.music-toggle.playing .music-bars i:nth-child(2) { animation-delay: 120ms; }
.music-toggle.playing .music-bars i:nth-child(3) { animation-delay: 260ms; }
.music-toggle.playing .music-bars i:nth-child(4) { animation-delay: 380ms; }
@keyframes bar { 0%, 100% { height: 4px; } 50% { height: 14px; } }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 100svh;
  display: grid;
  align-items: center;
  padding: calc(var(--topbar-h) + 48px) 0 96px;
  overflow: hidden;
  isolation: isolate;
}
.hero-media { position: absolute; inset: 0; z-index: -1; }
.hero-media img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.04); animation: drift 26s ease-in-out infinite alternate; }
@keyframes drift { from { transform: scale(1.04) translate3d(0, 0, 0); } to { transform: scale(1.11) translate3d(-1.4%, -1%, 0); } }
.hero-scrim {
  position: absolute; inset: 0;
  background:
    linear-gradient(180deg, rgba(26, 8, 14, .82) 0%, rgba(43, 8, 18, .48) 34%, rgba(26, 8, 14, .88) 100%),
    radial-gradient(70% 60% at 50% 46%, rgba(74, 14, 30, .18), rgba(26, 8, 14, .72));
}
.hero-sparks { position: absolute; inset: 0; overflow: hidden; }
.hero-sparks i {
  position: absolute;
  width: 3px; height: 3px;
  border-radius: 50%;
  background: var(--gold-soft);
  box-shadow: 0 0 10px 2px rgba(231, 206, 149, .55);
  opacity: 0;
  animation: spark linear infinite;
}
@keyframes spark {
  0% { opacity: 0; transform: translate3d(0, 20px, 0) scale(.6); }
  18% { opacity: .9; }
  100% { opacity: 0; transform: translate3d(14px, -180px, 0) scale(1.1); }
}
.hero-inner { width: min(900px, 100% - 40px); margin-inline: auto; text-align: center; color: var(--site-on-accent); }
.hero-kicker { font-size: calc(12px * var(--site-type)); letter-spacing: .52em; color: var(--gold-soft); margin-bottom: 18px; }
.hero-rule { display: flex; align-items: center; justify-content: center; gap: 16px; margin-bottom: 22px; }
.hero-rule span { height: 1px; width: min(120px, 22vw); background: linear-gradient(90deg, transparent, var(--gold)); }
.hero-rule span:last-child { background: linear-gradient(90deg, var(--gold), transparent); }
.hero-rule i { font-style: normal; font-family: var(--site-font); color: var(--gold); font-size: 20px; }
.hero-names {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: center;
  gap: clamp(12px, 3vw, 30px);
  font-size: clamp(calc(38px * var(--site-type)), 8vw, calc(76px * var(--site-type)));
  margin: 0 0 18px;
  text-shadow: 0 18px 40px rgba(0, 0, 0, .45);
}
.hero-names em { font-style: normal; color: var(--gold); font-size: .5em; }
.hero-quote { font-family: var(--site-font); font-size: calc(19px * var(--site-type)); color: rgba(251, 246, 238, .9); margin-bottom: 30px; }
.hero-facts {
  display: flex; flex-wrap: wrap; justify-content: center;
  gap: clamp(18px, 5vw, 60px);
  margin: 0 0 34px;
  padding: 18px 0;
  border-top: 1px solid rgba(201, 162, 75, .38);
  border-bottom: 1px solid rgba(201, 162, 75, .38);
}
.hero-facts div { text-align: center; }
.hero-facts dt { font-size: 11px; letter-spacing: .3em; color: rgba(231, 206, 149, .8); }
.hero-facts dd { margin: 4px 0 0; font-family: var(--site-font); font-size: calc(22px * var(--site-type)); color: var(--site-on-accent); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; justify-content: center; }
.hero-scroll {
  position: absolute; left: 50%; bottom: 26px; transform: translateX(-50%);
  display: grid; justify-items: center; gap: 8px;
  color: rgba(231, 206, 149, .85); text-decoration: none; font-size: 11px; letter-spacing: .3em;
}
.hero-scroll i { width: 1px; height: 42px; background: linear-gradient(180deg, var(--gold), transparent); animation: pulse 2.4s ease-in-out infinite; }
@keyframes pulse { 0%, 100% { opacity: .35; transform: scaleY(.7); } 50% { opacity: 1; transform: scaleY(1); } }

/* ---------- Countdown ---------- */
.countdown {
  background:
    radial-gradient(70% 120% at 15% 0%, rgba(201, 162, 75, .16), transparent 60%),
    radial-gradient(60% 120% at 90% 100%, rgba(140, 29, 51, .07), transparent 60%),
    linear-gradient(180deg, var(--ivory-warm), var(--site-bg));
  color: var(--site-fg);
  padding: calc(56px * var(--site-space)) 0;
  border-block: 1px solid var(--site-border);
  scroll-margin-top: var(--topbar-h);
}
.countdown-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--gap); }
.countdown-copy h2 { color: var(--wine); margin-bottom: 6px; }
.countdown-note { color: var(--site-muted); margin: 0; font-size: calc(14px * var(--site-type)); }
.clock { display: flex; gap: clamp(10px, 2vw, 18px); }
.clock-cell {
  min-width: clamp(70px, 17vw, 104px);
  padding: calc(14px * var(--site-space)) 10px;
  text-align: center;
  border: 1px solid rgba(156, 122, 50, .4);
  border-radius: var(--site-radius);
  background: linear-gradient(180deg, var(--site-surface), var(--ivory-warm));
  box-shadow: var(--shadow-soft);
}
.clock-cell b { display: block; font-size: calc(38px * var(--site-type)); line-height: 1.1; color: var(--wine); font-variant-numeric: tabular-nums; }
.clock-cell span { font-size: 11px; letter-spacing: .28em; color: var(--site-muted); }
.clock-cell.tick b { animation: tick calc(420ms * var(--site-motion)) ease; }
@keyframes tick { from { transform: translateY(-5px); opacity: .45; } to { transform: none; opacity: 1; } }

/* ---------- Invitation ---------- */
.invite-grid { display: grid; grid-template-columns: minmax(0, .85fr) minmax(0, 1fr); gap: calc(56px * var(--site-space)); align-items: center; }
.portrait { margin: 0; }
.portrait-frame {
  position: relative;
  border-radius: 260px 260px var(--site-radius) var(--site-radius);
  overflow: hidden;
  border: 1px solid var(--site-border);
  box-shadow: var(--shadow-lift);
  background: var(--ivory-warm);
}
.portrait-frame::after {
  content: "";
  position: absolute; inset: 10px;
  border: 1px solid rgba(201, 162, 75, .55);
  border-radius: 250px 250px calc(var(--site-radius) - 4px) calc(var(--site-radius) - 4px);
  pointer-events: none;
}
.portrait-frame img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; }
.portrait figcaption { margin-top: 16px; text-align: center; font-family: var(--site-font); color: var(--site-muted); }
.invite-copy .lead { font-size: calc(18px * var(--site-type)); }
.detail-list { margin: calc(24px * var(--site-space)) 0 0; display: grid; gap: 2px; border-top: 1px solid var(--site-border); }
.detail-list div { display: grid; grid-template-columns: 108px 1fr; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--site-border); }
.detail-list dt { color: var(--gold-dim); font-size: calc(13px * var(--site-type)); letter-spacing: .18em; }
.detail-list dd { margin: 0; font-family: var(--site-font); font-size: calc(17px * var(--site-type)); }
.schedule-note { margin-top: 16px; color: var(--site-muted); font-size: calc(14px * var(--site-type)); }

/* ---------- Story ---------- */
.story-grid { display: grid; grid-template-columns: minmax(0, .7fr) minmax(0, 1.3fr); gap: calc(56px * var(--site-space)); }
.story-aside { position: sticky; top: calc(var(--topbar-h) + 40px); align-self: start; }
.story-aside p { color: var(--site-muted); }
.story-line { width: 1px; height: 120px; margin-top: 24px; background: linear-gradient(180deg, var(--gold), transparent); }
.story-list { list-style: none; margin: 0; padding: 0 0 0 calc(28px * var(--site-space)); border-left: 1px solid var(--site-border); display: grid; gap: calc(28px * var(--site-space)); }
.story-item { position: relative; }
.story-item::before {
  content: "";
  position: absolute;
  left: calc(-28px * var(--site-space) - 6px);
  top: 12px;
  width: 11px; height: 11px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 0 4px rgba(201, 162, 75, .18);
}
.story-year { display: block; color: var(--gold-dim); letter-spacing: .2em; font-size: calc(15px * var(--site-type)); margin-bottom: 8px; }
.story-card {
  background: var(--site-surface);
  border: 1px solid var(--site-border);
  border-radius: var(--site-radius);
  padding: calc(22px * var(--site-space));
  box-shadow: var(--shadow-soft);
}
.story-card p { margin: 0; color: #55454a; }

/* ---------- Gallery ---------- */
.gallery {
  background:
    radial-gradient(60% 50% at 85% 0%, rgba(140, 29, 51, .08), transparent 60%),
    radial-gradient(50% 60% at 10% 100%, rgba(201, 162, 75, .14), transparent 60%),
    var(--site-bg);
  color: var(--site-fg);
}
.gallery h2 { color: var(--wine); }
.gallery .section-sub { color: var(--site-muted); }
.gallery-grid {
  margin-top: calc(40px * var(--site-space));
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: calc(16px * var(--site-space));
}
.gallery-item {
  position: relative;
  border: 1px solid rgba(201, 162, 75, .34);
  border-radius: var(--site-radius);
  overflow: hidden;
  padding: 0;
  background: var(--ivory-warm);
  cursor: pointer;
  color: inherit;
  transition: transform calc(240ms * var(--site-motion)) ease, border-color calc(240ms * var(--site-motion)) ease;
}
.gallery-item:nth-child(4n + 1) { grid-row: span 2; }
.gallery-item img { width: 100%; height: 100%; object-fit: cover; aspect-ratio: 4 / 5; transition: transform calc(420ms * var(--site-motion)) ease; }
.gallery-item:nth-child(4n + 1) img { aspect-ratio: 4 / 10.3; }
.gallery-item:hover { transform: translateY(-4px); border-color: var(--gold); }
.gallery-item:hover img { transform: scale(1.06); }
.gallery-item figcaption {
  position: absolute; inset: auto 0 0;
  padding: 30px 14px 12px;
  font-size: calc(13px * var(--site-type));
  letter-spacing: .1em;
  text-align: left;
  background: linear-gradient(180deg, transparent, rgba(26, 8, 14, .88));
  color: var(--gold-soft);
}

/* ---------- RSVP ---------- */
.rsvp {
  background:
    radial-gradient(55% 70% at 8% 0%, rgba(201, 162, 75, .14), transparent 60%),
    radial-gradient(50% 60% at 95% 100%, rgba(140, 29, 51, .07), transparent 60%),
    linear-gradient(180deg, var(--site-bg), var(--ivory-warm));
  color: var(--site-fg);
}
.rsvp-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: calc(56px * var(--site-space)); align-items: start; }
.rsvp-copy h2 { color: var(--wine); }
.rsvp-copy p { color: #55454a; }
.rsvp-facts { list-style: none; display: flex; gap: calc(28px * var(--site-space)); padding: 0; margin: calc(28px * var(--site-space)) 0; }
.rsvp-facts li { display: grid; }
.rsvp-facts b { font-family: var(--site-font); font-size: calc(34px * var(--site-type)); color: var(--wine); line-height: 1.2; }
.rsvp-facts span { font-size: 12px; letter-spacing: .2em; color: var(--site-muted); }
.rsvp-deadline { font-size: calc(13px * var(--site-type)); color: var(--gold-dim); }

.rsvp-panel {
  background: var(--site-surface);
  color: var(--site-fg);
  border-radius: calc(var(--site-radius) + 6px);
  border: 1px solid rgba(201, 162, 75, .5);
  padding: calc(32px * var(--site-space));
  box-shadow: var(--shadow-lift);
}
.field { margin-bottom: calc(18px * var(--site-space)); position: relative; border: 0; padding: 0; }
.field label, .field legend { display: block; font-size: calc(14px * var(--site-type)); letter-spacing: .1em; color: #5d4a4e; margin-bottom: 8px; padding: 0; }
.field i { color: var(--wine); font-style: normal; }
.field input[type="text"], .field input[type="number"], .field textarea, .field select {
  width: 100%;
  padding: 12px 14px;
  border-radius: calc(var(--site-radius) - 4px);
  border: 1px solid var(--site-border);
  background: #fffdf9;
  color: var(--site-fg);
  font-family: var(--sans);
  font-size: calc(15px * var(--site-type));
  transition: border-color calc(180ms * var(--site-motion)) ease, box-shadow calc(180ms * var(--site-motion)) ease;
}
.field textarea { resize: vertical; min-height: 88px; line-height: 1.7; }
.field input:focus, .field textarea:focus { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(201, 162, 75, .18); outline: none; }
.counter { position: absolute; right: 2px; top: 0; font-size: 11px; color: var(--site-muted); font-variant-numeric: tabular-nums; }
.counter.near { color: var(--amber); }
.counter.full { color: var(--danger); }
.choice-row { display: flex; gap: 12px; flex-wrap: wrap; }
.choice { position: relative; flex: 1 1 150px; }
.choice input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.choice span {
  display: block;
  text-align: center;
  padding: 12px 10px;
  border-radius: 999px;
  border: 1px solid var(--site-border);
  background: #fffdf9;
  font-size: calc(15px * var(--site-type));
  transition: all calc(180ms * var(--site-motion)) ease;
}
.choice input:checked + span {
  border-color: var(--wine);
  background: linear-gradient(135deg, rgba(140, 29, 51, .1), rgba(201, 162, 75, .16));
  color: var(--wine);
  font-weight: 600;
}
.choice input:focus-visible + span { outline: 2px solid var(--gold); outline-offset: 2px; }
.stepper { display: flex; align-items: center; gap: 10px; }
.stepper input { width: 84px; text-align: center; }
.stepper-btn {
  width: 40px; height: 40px; flex: none;
  border-radius: 50%;
  border: 1px solid var(--site-border);
  background: var(--ivory-warm);
  color: var(--wine);
  font-size: 20px;
  cursor: pointer;
  transition: background-color calc(180ms * var(--site-motion)) ease;
}
.stepper-btn:hover { background: rgba(201, 162, 75, .28); }
.form-error {
  margin: 0 0 14px;
  padding: 10px 14px;
  border-radius: calc(var(--site-radius) - 4px);
  background: rgba(179, 38, 30, .08);
  border: 1px solid rgba(179, 38, 30, .35);
  color: var(--danger);
  font-size: calc(14px * var(--site-type));
}
.form-hint { margin: 12px 0 0; font-size: 12px; color: var(--site-muted); text-align: center; }

.rsvp-success { text-align: center; padding: calc(12px * var(--site-space)) 0; }
.success-seal {
  width: 66px; height: 66px; margin: 0 auto 16px;
  display: grid; place-items: center;
  border-radius: 50%;
  border: 1px solid var(--gold);
  color: var(--wine);
  font-family: var(--site-font);
  font-size: 30px;
  background: radial-gradient(circle at 32% 28%, rgba(201, 162, 75, .35), rgba(251, 246, 238, .9));
  animation: seal calc(520ms * var(--site-motion)) ease;
}
@keyframes seal { from { transform: scale(.6) rotate(-12deg); opacity: 0; } to { transform: none; opacity: 1; } }
.success-summary { margin: calc(20px * var(--site-space)) 0; text-align: left; border-top: 1px solid var(--site-border); }
.success-summary div { display: grid; grid-template-columns: 92px 1fr; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--site-border); }
.success-summary dt { color: var(--gold-dim); font-size: calc(13px * var(--site-type)); }
.success-summary dd { margin: 0; font-size: calc(15px * var(--site-type)); word-break: break-word; }

/* ---------- Venue ---------- */
.map-card {
  margin-top: calc(36px * var(--site-space));
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  background: var(--site-surface);
  border: 1px solid var(--site-border);
  border-radius: calc(var(--site-radius) + 4px);
  overflow: hidden;
  box-shadow: var(--shadow-lift);
}
.map-canvas { min-height: 340px; background: var(--ivory-warm); z-index: 0; }
.map-fallback { display: grid; place-items: center; height: 100%; min-height: 340px; color: var(--site-muted); padding: 24px; text-align: center; }
.map-content { padding: calc(30px * var(--site-space)); }
.map-content h3 { color: var(--wine); font-size: calc(24px * var(--site-type)); }
.map-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.map-tip { min-height: 22px; margin: 10px 0 0; font-size: 13px; color: var(--emerald); }
.venue-notes { margin: calc(18px * var(--site-space)) 0 0; padding-left: 18px; color: var(--site-muted); font-size: calc(14px * var(--site-type)); }
.venue-notes li { margin-bottom: 6px; }
.leaflet-container { font-family: var(--sans); background: var(--ivory-warm); }
.leaflet-popup-content-wrapper { border-radius: var(--site-radius); background: var(--site-surface); color: var(--site-fg); }
.leaflet-popup-content { font-family: var(--site-font); font-size: 14px; }
.venue-pin { filter: drop-shadow(0 6px 8px rgba(43, 8, 18, .45)); }

/* ---------- Footer ---------- */
.footer {
  background: linear-gradient(180deg, var(--wine-ink), #1d050c);
  color: rgba(251, 246, 238, .8);
  padding: calc(56px * var(--site-space)) 0 calc(40px * var(--site-space));
  border-top: 1px solid rgba(201, 162, 75, .35);
  text-align: center;
}
.footer-mark { display: inline-grid; place-items: center; width: 46px; height: 46px; border-radius: 50%; border: 1px solid var(--gold); color: var(--gold-soft); font-family: var(--site-font); font-size: 22px; }
.footer-names { font-family: var(--site-font); font-size: calc(24px * var(--site-type)); color: var(--gold-soft); margin: 16px 0 4px; }
.footer-meta { font-size: calc(14px * var(--site-type)); letter-spacing: .16em; margin: 0 0 14px; }
.footer-thanks { font-size: calc(14px * var(--site-type)); color: rgba(251, 246, 238, .6); }

/* ---------- Lightbox ---------- */
.lightbox {
  position: fixed; inset: 0; z-index: 60;
  display: grid; grid-template-columns: 64px 1fr 64px; align-items: center;
  background: rgba(20, 5, 10, .94);
  backdrop-filter: blur(6px);
  padding: 24px;
}
.lightbox[hidden] { display: none; }
.lightbox figure { margin: 0; display: grid; justify-items: center; gap: 14px; }
.lightbox img { max-height: 78vh; width: auto; border-radius: var(--site-radius); border: 1px solid rgba(201, 162, 75, .45); box-shadow: 0 40px 80px -30px #000; }
.lightbox figcaption { color: var(--gold-soft); font-family: var(--site-font); letter-spacing: .12em; }
.lightbox-close, .lightbox-nav {
  border: 1px solid rgba(201, 162, 75, .45);
  background: rgba(251, 246, 238, .06);
  color: var(--gold-soft);
  cursor: pointer;
  border-radius: 50%;
  width: 46px; height: 46px;
  font-size: 24px;
  line-height: 1;
  display: grid; place-items: center;
  transition: background-color calc(180ms * var(--site-motion)) ease;
}
.lightbox-close { position: absolute; top: 20px; right: 20px; }
.lightbox-close:hover, .lightbox-nav:hover { background: rgba(201, 162, 75, .25); }
.lightbox-nav.prev { justify-self: start; }
.lightbox-nav.next { justify-self: end; }

/* ---------- Reveal ---------- */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity calc(620ms * var(--site-motion)) ease, transform calc(620ms * var(--site-motion)) ease; }
.reveal.in { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 1080px) {
  .gallery-grid { grid-template-columns: repeat(3, 1fr); }
  .gallery-item:nth-child(4n + 1) { grid-row: span 1; }
  .gallery-item:nth-child(4n + 1) img { aspect-ratio: 4 / 5; }
}

@media (max-width: 900px) {
  :root { --topbar-h: 58px; }
  .section { padding: calc(68px * var(--site-space)) 0; }
  h2 { font-size: calc(28px * var(--site-type)); }
  .brand-text { display: none; }
  .nav { gap: 14px; }
  .nav a { font-size: 13px; }
  .music-label { display: none; }
  .music-toggle { padding: 8px 11px; }
  .invite-grid, .story-grid, .rsvp-grid, .map-card { grid-template-columns: minmax(0, 1fr); gap: calc(34px * var(--site-space)); }
  .story-aside { position: static; }
  .story-line { display: none; }
  .portrait { max-width: 420px; margin-inline: auto; }
  .countdown-inner { justify-content: center; text-align: center; }
  .clock { width: 100%; justify-content: center; }
  .gallery-grid { grid-template-columns: repeat(2, 1fr); }
  .map-canvas { min-height: 300px; }
  .lightbox { grid-template-columns: 44px 1fr 44px; padding: 14px; }
  .lightbox img { max-height: 68vh; }
}

@media (max-width: 560px) {
  .hero { min-height: 92svh; padding-bottom: 76px; }
  .hero-facts { gap: 18px; }
  .hero-facts dd { font-size: calc(18px * var(--site-type)); }
  .hero-actions .btn { flex: 1 1 100%; }
  .detail-list div { grid-template-columns: 88px 1fr; gap: 10px; }
  .rsvp-panel { padding: calc(22px * var(--site-space)); }
  .rsvp-facts { gap: 18px; }
  .clock-cell { min-width: 66px; padding: 10px 6px; }
  .clock-cell b { font-size: calc(28px * var(--site-type)); }
  .lightbox { grid-template-columns: 1fr; }
  .lightbox-nav { position: absolute; bottom: 18px; }
  .lightbox-nav.prev { left: 22px; }
  .lightbox-nav.next { right: 22px; }
}

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