/* RSVP page only. Palette: snow white, holly red, forest green. */
body.rsvp {
  --snow: #ffffff;
  --paper: #f8f6f1;
  --pine: #1a4630;
  --pine-deep: #0f2c1e;
  --pine-mid: #2a6a49;
  --pine-soft: #eaf3ed;
  --berry: #b71c2c;
  --berry-deep: #911521;
  --berry-soft: #fcecee;
  --gold: #e8b64c;       /* highlight only: use sparingly */
  --gold-light: #f8e1a1;
  --gold-deep: #8a6414;  /* gold text on white */
  --gold-soft: #fbf3dc;
  --ink: #1b241f;
  --ink-muted: #5c665f;
  --line: #e5e0d5;
  --ring: rgb(26 70 48 / 18%);
  --radius-lg: 20px;
  --radius-md: 14px;
  --shadow-sheet: 0 1px 2px rgb(15 44 30 / 5%), 0 12px 32px -12px rgb(15 44 30 / 18%);
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-display: "Fraunces", Georgia, "Times New Roman", serif;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
}
body.rsvp :focus-visible { outline: 3px solid var(--pine-mid); outline-offset: 2px; }
.rsvp .i { width: 1.15em; height: 1.15em; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; vertical-align: -0.2em; }

/* Hero */
.hero { color: var(--snow); } /* Sky and snow: .night in theme.css */
.hero-inner {
  max-width: 1080px; margin: 0 auto; padding: 60px 16px 48px;
  display: grid; grid-template-columns: 1fr; gap: 28px; align-items: center;
}
.hero .eyebrow {
  display: inline-flex; align-items: center; gap: 8px; margin: 0 0 14px;
  padding: 6px 12px; border-radius: 999px; background: rgb(255 255 255 / 10%); border: 1px solid rgb(255 255 255 / 18%);
  font-size: .78rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase;
}
.hero .eyebrow .i { color: var(--gold); fill: currentColor; stroke: none; width: 14px; height: 14px; }
.hero h1 {
  font-family: var(--font-display); font-weight: 700; letter-spacing: -0.01em;
  font-size: clamp(2.3rem, 8vw, 3.75rem); line-height: 1.02; margin: 0 0 20px; color: var(--snow);
}
.facts { list-style: none; padding: 0; margin: 0 0 22px; display: grid; gap: 12px; }
.facts li { display: flex; gap: 12px; align-items: flex-start; }
.facts .i {
  width: 40px; height: 40px; padding: 9px; border-radius: 12px;
  background: rgb(255 255 255 / 10%); color: var(--snow); stroke-width: 1.8;
}
.facts li > span { display: flex; flex-direction: column; line-height: 1.35; padding-top: 1px; }
.facts strong { font-weight: 600; font-size: 1.05rem; }
.facts span span { color: rgb(255 255 255 / 78%); font-size: .95rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.pill {
  display: inline-flex; align-items: center; gap: 8px; min-height: 42px; padding: 8px 18px 8px 14px; border-radius: 999px;
  background: var(--snow); color: var(--pine); font-weight: 600; font-size: .9rem; text-decoration: none;
  transition: transform .15s ease, background .15s ease;
}
.pill .i { width: 18px; height: 18px; stroke-width: 1.9; }
.pill:first-child .i { color: var(--berry); }
.pill:hover { background: var(--pine-soft); color: var(--pine); transform: translateY(-1px); }
.pill + .pill { background: rgb(255 255 255 / 10%); color: var(--snow); border: 1px solid rgb(255 255 255 / 28%); }
.pill + .pill:hover { background: rgb(255 255 255 / 18%); color: var(--snow); }
.ornament { display: none; }
/* Entrance: each piece rises in after the one before (--d sets the order) */
.rise { animation: rise .7s cubic-bezier(.2,.7,.2,1) calc(var(--d, 0) * 90ms + 150ms) backwards; }
@keyframes rise { from { opacity: 0; translate: 0 14px; } }
@keyframes swing { 0%, 100% { rotate: 2.5deg; } 50% { rotate: -2.5deg; } }
@keyframes glint { 0%, 100% { opacity: .35; } 50% { opacity: 1; } }

/* Title */
.title .word { display: inline-block; animation: word-in .8s cubic-bezier(.2,.7,.2,1) calc(var(--d) * 120ms + 150ms) backwards; }
@keyframes word-in { from { opacity: 0; translate: 0 .4em; filter: blur(8px); } }
.title .accent {
  position: relative; margin-right: .14em;
  background: linear-gradient(100deg, #fff 0 38%, var(--gold-light) 45%, var(--gold) 50%, var(--gold-light) 55%, #fff 62% 100%) 120% 0 / 300% 100%;
  -webkit-background-clip: text; background-clip: text; color: transparent;
  animation: word-in .8s cubic-bezier(.2,.7,.2,1) calc(var(--d) * 120ms + 150ms) backwards, shimmer 6s ease-in-out 1.8s infinite;
}
@keyframes shimmer { 0% { background-position: 120% 0; } 45%, 100% { background-position: -20% 0; } }
.hat {
  position: absolute; width: .78em; height: .68em; right: -.3em; top: -.3em;
  rotate: 16deg; transform-origin: 30% 90%; filter: drop-shadow(0 3px 4px rgb(0 0 0 / 30%));
  animation: hat-drop .7s cubic-bezier(.3,1.6,.5,1) 1.1s backwards, hat-wobble 5s ease-in-out 2.2s infinite;
}
@keyframes hat-drop { from { opacity: 0; translate: 0 -70%; rotate: -12deg; } }
@keyframes hat-wobble { 0%, 100% { rotate: 16deg; } 50% { rotate: 6deg; } }

.tagline {
  display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; margin: -6px 0 24px;
  font-size: .78rem; font-weight: 600; letter-spacing: .18em; text-transform: uppercase;
}
.tagline span { color: rgb(255 255 255 / 60%); animation: glow-word 6s ease-in-out infinite; }
.tagline span:nth-of-type(2) { animation-delay: 2s; }
.tagline span:nth-of-type(3) { animation-delay: 4s; }
.tagline i { font-style: normal; font-size: .7em; color: var(--gold); }
@media (max-width: 420px) { .tagline { font-size: .7rem; letter-spacing: .12em; gap: 4px 8px; } }
@keyframes glow-word {
  0%, 40%, 100% { color: rgb(255 255 255 / 60%); text-shadow: none; }
  12%, 28% { color: var(--gold-light); text-shadow: 0 0 14px rgb(232 182 76 / 65%); }
}
.hero .eyebrow .twinkle { animation: star 3s ease-in-out infinite; }
@keyframes star { 50% { scale: 1.35; rotate: 72deg; filter: drop-shadow(0 0 5px var(--gold)); } }

/* Countdown */
.countdown { margin: 0 0 24px; }
.countdown-label { margin: 0 0 8px; font-size: .72rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: #ff9aa4; }
.cd-tiles { display: flex; gap: 8px; }
.cd-tile {
  display: flex; flex-direction: column; align-items: center; min-width: 66px; padding: 10px 8px 8px; overflow: hidden;
  border-radius: 14px; background: rgb(255 255 255 / 8%); border: 1px solid rgb(255 255 255 / 16%);
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 12%); backdrop-filter: blur(4px);
}
.cd-num { display: inline-block; font-family: var(--font-display); font-weight: 700; font-size: 1.75rem; line-height: 1; font-variant-numeric: tabular-nums; }
.cd-num.tick { animation: flip .45s cubic-bezier(.2,.7,.2,1); }
@keyframes flip { from { opacity: 0; translate: 0 -55%; } }
.cd-tile:last-child .cd-num { color: #ffc2c9; }
.cd-unit { margin-top: 6px; font-size: .66rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: rgb(255 255 255 / 70%); }
.countdown.live .countdown-label { font-size: 1rem; letter-spacing: .06em; color: #fff; animation: glow-word 2s ease-in-out infinite; }

/* Wide screens: Santa stands bottom-left, the flyer hangs top-right, on either side of the text */
.santa { display: none; }
@media (min-width: 1024px) {
  .hero .hero-inner { max-width: 1320px; grid-template-columns: 220px minmax(0, 1fr) 220px; gap: 40px; padding-bottom: 64px; }
  .hero-copy { justify-self: center; max-width: 720px; }
  .santa { align-self: end; justify-self: center; }
  .hero .ornament { justify-self: center; width: 210px; }
  .santa {
    display: block; position: relative; z-index: 0; margin-bottom: -60px;
    animation: rise .9s cubic-bezier(.2,.7,.2,1) 600ms backwards;
  }
  .santa-svg { display: block; width: 210px; height: auto; overflow: visible; filter: drop-shadow(0 6px 10px rgb(0 0 0 / 30%)); }
  .santa-body { transform-box: fill-box; transform-origin: 50% 100%; animation: santa-sway 4s ease-in-out infinite; }
  .santa-arm { transform-box: fill-box; transform-origin: 0% 100%; animation: santa-wave 1.6s ease-in-out infinite; }
  .santa-eyes { transform-box: fill-box; transform-origin: 50% 50%; animation: santa-blink 5s infinite; }
  .santa-hat { transform-box: fill-box; transform-origin: 10% 100%; animation: santa-hat 4s ease-in-out infinite; }
  .santa-bubble {
    position: absolute; left: 50%; top: -52px; translate: -50% 0; margin: 0; padding: 8px 16px; white-space: nowrap;
    background: var(--snow); color: var(--berry); border-radius: 16px;
    font: 700 1rem var(--font-display); box-shadow: 0 8px 18px -6px rgb(0 0 0 / 40%);
    transform-origin: 50% 100%; animation: santa-say 7s ease-in-out 2s infinite backwards;
  }
  .santa-bubble::after {
    content: ""; position: absolute; left: 50%; bottom: -7px; width: 14px; height: 14px; margin-left: -7px;
    background: var(--snow); rotate: 45deg; border-radius: 0 0 3px 0;
  }
}
@keyframes santa-sway { 0%, 100% { rotate: -2deg; } 50% { rotate: 2deg; } }
@keyframes santa-wave { 0%, 100% { rotate: 0deg; } 50% { rotate: 22deg; } }
@keyframes santa-blink { 0%, 46%, 50%, 100% { scale: 1 1; } 48% { scale: 1 .1; } }
@keyframes santa-hat { 0%, 100% { rotate: 0deg; } 50% { rotate: -4deg; } }
@keyframes santa-say {
  0%, 62%, 100% { opacity: 0; scale: .4; }
  8%, 50% { opacity: 1; scale: 1; }
}

/* Flyer glare follows the pointer */
.flyer-glare {
  position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity .3s ease;
  background: radial-gradient(circle at var(--gx, 50%) var(--gy, 50%), rgb(255 255 255 / 35%), transparent 55%);
}
.flyer-thumb.tilting .flyer-glare { opacity: 1; }

.hero-inner { position: relative; }
@media (min-width: 760px) {
  .hero-inner { grid-template-columns: 1fr 210px; padding: 84px 24px 64px; gap: 48px; }
  .facts { grid-template-columns: auto auto; justify-content: start; gap: 12px 32px; }
  /* The flyer hangs from the string lights like an ornament and swings gently */
  .ornament {
    display: block; position: relative; align-self: start; margin-top: 6px;
    transform-origin: 50% -96px;
    animation: rise .8s cubic-bezier(.2,.7,.2,1) calc(var(--d) * 90ms + 150ms) backwards, swing 6s ease-in-out 1s infinite;
  }
  .ornament::before {
    content: ""; position: absolute; left: 50%; bottom: calc(100% + 19px); width: 3px; height: 90px; margin-left: -1.5px;
    border-radius: 2px; background: repeating-linear-gradient(to bottom, var(--snow) 0 5px, var(--berry) 5px 10px);
    box-shadow: 0 0 3px rgb(0 0 0 / 30%);
  }
  .ornament-cap {
    position: absolute; left: 50%; top: -12px; z-index: 2; width: 36px; height: 17px; margin-left: -18px;
    border-radius: 5px 5px 3px 3px;
    background:
      repeating-linear-gradient(90deg, rgb(0 0 0 / 12%) 0 2px, transparent 2px 5px),
      linear-gradient(180deg, #ffffff 0%, #d5dcd8 55%, #9aa59f 100%);
    box-shadow: 0 3px 5px rgb(0 0 0 / 35%);
  }
  .ornament-cap::before {
    content: ""; position: absolute; left: 50%; top: -10px; width: 13px; height: 13px; margin-left: -6.5px;
    border: 2.5px solid #dfe5e1; border-radius: 50%;
  }
  .ornament-cap::after {
    content: ""; position: absolute; inset: 2px 6px auto; height: 3px; border-radius: 2px;
    background: rgb(255 255 255 / 85%); animation: glint 6s ease-in-out 1s infinite;
  }
  .flyer-thumb {
    display: block; border-radius: 14px; overflow: hidden; border: 4px solid var(--snow);
    box-shadow: 0 18px 40px -12px rgb(0 0 0 / 55%); position: relative;
    transform: perspective(800px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg));
    transition: transform .5s cubic-bezier(.2,.7,.2,1);
  }
  .flyer-thumb.tilting { transition: transform .12s linear; }
  .flyer-thumb:hover { transform: perspective(800px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)) scale(1.03); }
  .flyer-thumb img { display: block; width: 100%; height: auto; }
}

/* What to expect */
.extras { max-width: 1080px; margin: 0 auto; padding: 28px 16px 0; }
.extras-card { background: var(--snow); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow-sheet); padding: 20px 16px 22px; }
.extras-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px 20px; margin-bottom: 20px; }
.extras-title { margin: 0; font-family: var(--font-display); font-weight: 700; font-size: 1.35rem; color: var(--ink); }
.highlights { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px 8px; }
.highlights li { display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; }
.hl-icon { display: grid; place-items: center; width: 56px; height: 56px; border-radius: 50%; background: var(--pine-soft); color: var(--pine); }
.highlights li:nth-child(even) .hl-icon { background: var(--berry-soft); color: var(--berry); }
.hl-icon .i { width: 26px; height: 26px; stroke-width: 1.7; }
.hl-photo {
  display: block; width: 76px; height: 76px; border-radius: 50%; object-fit: cover;
  border: 3px solid var(--snow); box-shadow: 0 0 0 2px var(--pine), 0 6px 14px -6px rgb(15 44 30 / 45%);
  background: var(--pine-soft);
}
.highlights li:nth-child(even) .hl-photo { box-shadow: 0 0 0 2px var(--berry), 0 6px 14px -6px rgb(145 21 33 / 45%); }
@media (min-width: 760px) { .hl-photo { width: 88px; height: 88px; } }
.hl-label { font-size: .85rem; font-weight: 600; line-height: 1.25; color: var(--ink); }
.dress-code { display: flex; align-items: center; gap: 6px; margin: 0; font-weight: 600; color: var(--gold-deep); font-size: .9rem; }
.swatch { width: 14px; height: 14px; flex: none; border-radius: 50%; border: 2px solid var(--snow); box-shadow: 0 0 0 1px var(--line); }
.swatch.red { background: var(--berry); }
.swatch.green { background: var(--pine); margin-right: 4px; }
@media (min-width: 640px) {
  .highlights { grid-template-columns: repeat(6, 1fr); }
  .highlights li + li { border-left: 1px dashed var(--line); }
}
@media (min-width: 760px) { .extras { padding: 32px 24px 0; } .extras-card { padding: 24px 28px 26px; } }

/* Layout */
.rsvp-main { max-width: 1080px; margin: 0 auto; padding: 20px 16px 24px; }
@media (min-width: 760px) { .rsvp-main { padding: 24px 24px 32px; } }
.rsvp-grid { display: grid; gap: 20px; align-items: start; }
@media (min-width: 920px) {
  .rsvp-grid { grid-template-columns: minmax(0, 1fr) 340px; gap: 28px; }
  .summary-panel { position: sticky; top: calc(var(--nav-h) + 20px); }
}
.sheet {
  background: var(--snow); border: 1px solid var(--line); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sheet); padding: 24px 20px;
}
@media (min-width: 760px) { .sheet { padding: 32px; } }
.sheet h2 { font-family: var(--font-display); font-weight: 700; font-size: 1.9rem; margin: 0; letter-spacing: -0.01em; }
.sheet-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; margin-bottom: 4px; }
.deadline {
  margin: 0; padding: 6px 12px; border-radius: 999px; background: var(--gold-soft); color: var(--gold-deep); border: 1px solid var(--gold-light);
  font-weight: 600; font-size: .85rem;
}

/* Steps */
.step { padding: 26px 0 4px; border-top: 1px solid var(--line); margin-top: 22px; }
.sheet-head + .step { border-top: 0; margin-top: 0; padding-top: 20px; }
.step fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
.step-title {
  display: flex; align-items: center; gap: 12px; padding: 0;
  font-family: var(--font); font-size: 1.1rem; font-weight: 700; margin: 0 0 18px; color: var(--ink);
}
.step-no {
  display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; flex: none;
  border: 2px solid var(--pine); color: var(--pine); font-size: .85rem; font-weight: 700;
  transition: background .2s ease, color .2s ease;
}
.step.done .step-no { background: var(--pine); color: var(--snow); }
.inline-total { margin-left: auto; font-size: .9rem; font-weight: 600; color: var(--pine); background: var(--pine-soft); padding: 4px 10px; border-radius: 999px; }
@media (min-width: 920px) { .inline-total { display: none; } }

.rsvp .field { margin-bottom: 18px; }
.rsvp .field > label { display: flex; align-items: baseline; gap: 8px; font-weight: 600; font-size: .95rem; margin-bottom: 8px; }
.field-row { display: grid; gap: 0 16px; }
@media (min-width: 640px) { .field-row { grid-template-columns: 1fr 1fr; } }
.rsvp .hint { display: block; color: var(--ink-muted); font-size: .82rem; font-weight: 400; margin: 6px 0 0; }
.optional { font-size: .75rem; font-weight: 500; color: var(--ink-muted); background: var(--paper); border: 1px solid var(--line); padding: 1px 8px; border-radius: 999px; }
.rsvp input[type="text"], .rsvp input[type="email"], .rsvp input[type="tel"] {
  min-height: 52px; padding: 12px 14px; border: 1.5px solid var(--line); border-radius: 12px;
  background: var(--snow); color: var(--ink); font-size: 1rem;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.rsvp input::placeholder { color: #a5aca7; }
.rsvp input[type="text"]:hover, .rsvp input[type="email"]:hover, .rsvp input[type="tel"]:hover { border-color: #cfc8b8; }
.rsvp input[type="text"]:focus, .rsvp input[type="email"]:focus, .rsvp input[type="tel"]:focus {
  outline: none; border-color: var(--pine); box-shadow: 0 0 0 4px var(--ring);
}
.rsvp [aria-invalid="true"] { border-color: var(--berry) !important; box-shadow: 0 0 0 4px rgb(183 28 44 / 12%) !important; }
.rsvp .field-error { display: flex; gap: 6px; align-items: center; color: var(--berry); font-weight: 500; font-size: .85rem; margin: 8px 0 0; }
.rsvp .field-error::before { content: "!"; display: inline-grid; place-items: center; width: 16px; height: 16px; flex: none; border-radius: 50%; background: var(--berry); color: var(--snow); font-size: .7rem; font-weight: 800; }
.rsvp .field-error:empty { display: none; }

/* Yes / Maybe / No cards */
.answer-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.answer {
  position: relative; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 10px;
  padding: 18px 8px 16px; border: 1.5px solid var(--line); border-radius: var(--radius-md); background: var(--snow);
  cursor: pointer; transition: border-color .15s ease, background .15s ease, transform .15s ease, box-shadow .15s ease;
}
.answer:hover { border-color: #cfc8b8; transform: translateY(-1px); }
.answer input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.answer-icon {
  display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%;
  background: var(--pine-soft); color: var(--pine); transition: background .15s ease, color .15s ease;
}
.answer-icon .i { width: 22px; height: 22px; stroke-width: 2.4; }
.answer.no .answer-icon { background: var(--berry-soft); color: var(--berry); }
.answer-text { display: flex; flex-direction: column; gap: 2px; line-height: 1.25; }
.answer-text strong { font-size: 1.05rem; }
.answer-text span { font-size: .8rem; color: var(--ink-muted); }
.answer:has(input:checked) { border-color: var(--pine); background: var(--pine-soft); box-shadow: 0 0 0 1px var(--pine); }
.answer:has(input:checked) .answer-icon { background: var(--pine); color: var(--snow); }
.answer.no:has(input:checked) { border-color: var(--berry); background: var(--berry-soft); box-shadow: 0 0 0 1px var(--berry); }
.answer.no:has(input:checked) .answer-icon { background: var(--berry); color: var(--snow); }
.answer:has(input:focus-visible) { outline: 3px solid var(--pine-mid); outline-offset: 2px; }

/* Counters */
.counters { border: 1.5px solid var(--line); border-radius: var(--radius-md); overflow: hidden; margin-bottom: 8px; }
.counter {
  display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 4px 12px;
  padding: 14px 16px; border-top: 1px solid var(--line);
}
.counter:first-child { border-top: 0; }
.counter.veg { background: var(--paper); }
.counter .field-error { grid-column: 1 / -1; margin: 0; }
.counter-label label { display: flex; align-items: center; gap: 6px; font-weight: 600; }
.counter-label .hint { margin: 2px 0 0; }
.leaf { color: var(--pine-mid); }
.stepper { display: flex; align-items: center; gap: 4px; }
.stepper button {
  display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%;
  border: 1.5px solid var(--line); background: var(--snow); color: var(--pine); cursor: pointer;
  transition: background .15s ease, border-color .15s ease;
}
.stepper button:hover:not(:disabled) { border-color: var(--pine); background: var(--pine-soft); }
.stepper button:disabled { color: #c3c8c4; cursor: not-allowed; }
.stepper button .i { width: 18px; height: 18px; stroke-width: 2.4; }
.stepper input {
  width: 44px; height: 40px; border: 0; background: transparent; padding: 0; text-align: center;
  font: 700 1.15rem var(--font); color: var(--ink); font-variant-numeric: tabular-nums; -moz-appearance: textfield;
}
.stepper input::-webkit-outer-spin-button, .stepper input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.stepper input:focus { outline: none; border-radius: 8px; box-shadow: 0 0 0 3px var(--ring); }

/* Payment */
.pay-note { background: var(--paper); border: 1px solid var(--line); border-left: 4px solid var(--gold); border-radius: 12px; padding: 12px 14px; font-size: .92rem; margin: 0 0 18px; }
.sub-legend { display: flex; align-items: baseline; gap: 8px; font-weight: 600; font-size: .95rem; margin-bottom: 10px; padding: 0; }
.segmented { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.seg {
  position: relative; display: inline-flex; align-items: center; min-height: 44px; padding: 8px 18px;
  border: 1.5px solid var(--line); border-radius: 999px; background: var(--snow); font-weight: 600; font-size: .92rem; cursor: pointer;
  transition: background .15s ease, border-color .15s ease, color .15s ease;
}
.seg input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.seg:hover { border-color: #cfc8b8; }
.seg:has(input:checked) { background: var(--pine); border-color: var(--pine); color: var(--snow); }
.seg:has(input:focus-visible) { outline: 3px solid var(--pine-mid); outline-offset: 2px; }

/* Summary panel */
.summary-sheet { border-top: 0; position: relative; overflow: hidden; }
.summary-sheet::before { content: ""; position: absolute; inset: 0 0 auto; height: 6px; background: linear-gradient(90deg, var(--gold), var(--gold-light) 50%, var(--gold)); }
.summary-kicker { margin: 0 0 14px; font-size: .75rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--gold-deep); }
.summary-empty { color: var(--ink-muted); margin: 0 0 20px; font-size: .95rem; }
.lines { list-style: none; padding: 0; margin: 0 0 4px; font-variant-numeric: tabular-nums; }
.lines li { display: flex; justify-content: space-between; gap: 12px; padding: 7px 0; font-size: .95rem; }
.lines li span:first-child { color: var(--ink-muted); }
.lines li.zero { opacity: .5; }
.grand { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; border-top: 1.5px dashed var(--line); margin-top: 8px; padding-top: 14px; }
.grand span { font-weight: 600; }
.grand strong { font-family: var(--font-display); font-size: 2.2rem; color: var(--pine); line-height: 1; font-variant-numeric: tabular-nums; }
.summary-note { font-size: .82rem; color: var(--ink-muted); margin: 10px 0 0; }
.party { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 14px; }
.party span { font-size: .8rem; font-weight: 600; padding: 3px 10px; border-radius: 999px; background: var(--pine-soft); color: var(--pine); }
#turnstile:not(:empty) { margin-top: 16px; }
.rsvp .notice.error { background: var(--berry-soft); color: var(--berry-deep); margin: 16px 0 0; font-size: .9rem; }
.btn-cta {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; width: 100%;
  min-height: 56px; margin-top: 20px; padding: 14px 20px; border: 0; border-radius: var(--radius-md);
  background: var(--berry); color: var(--snow); font: 700 1.05rem var(--font); text-decoration: none; cursor: pointer;
  box-shadow: 0 8px 20px -8px rgb(183 28 44 / 60%);
  transition: background .15s ease, transform .15s ease, box-shadow .15s ease;
}
.btn-cta:hover { background: var(--berry-deep); color: var(--snow); transform: translateY(-1px); }
.btn-cta:active { transform: translateY(0); }
.btn-cta[disabled] { opacity: .7; cursor: progress; transform: none; }
.btn-cta.secondary { background: var(--pine); box-shadow: 0 8px 20px -8px rgb(26 70 48 / 55%); }
.btn-cta.secondary:hover { background: var(--pine-deep); }
.btn-cta.ghost { background: var(--snow); color: var(--pine); border: 1.5px solid var(--line); box-shadow: none; }
.btn-cta.ghost:hover { background: var(--pine-soft); color: var(--pine); }
.fine-print { margin: 12px 0 0; text-align: center; font-size: .8rem; color: var(--ink-muted); }
.account-note {
  margin: 0 0 20px; padding: 10px 14px; border-radius: 12px;
  background: var(--pine-soft); color: var(--pine); font-size: .9rem; font-weight: 500; line-height: 1.45;
}
.rsvp input[readonly] { background: var(--paper); color: var(--ink-muted); cursor: default; }
#form-error a { color: inherit; font-weight: 600; }

/* Success and closed */
.success, .closed-sheet { max-width: 620px; margin: 0 auto; text-align: center; }
.success h2, .closed-sheet h2 { margin-bottom: 8px; font-size: clamp(1.5rem, 5.5vw, 1.9rem); }
.success-badge {
  display: grid; place-items: center; width: 72px; height: 72px; margin: 0 auto 18px; border-radius: 50%;
  background: var(--pine); color: var(--snow); box-shadow: 0 0 0 8px var(--pine-soft);
}
.success-badge .i { width: 36px; height: 36px; stroke-width: 2.6; }
.success.declined .success-badge { background: var(--berry); box-shadow: 0 0 0 8px var(--berry-soft); }
.success-lead { color: var(--ink-muted); margin-bottom: 22px; }
.success dl.summary {
  text-align: left; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius-md);
  padding: 16px 18px; gap: 8px 16px; grid-template-columns: 1fr auto;
}
.success dl.summary dt { color: var(--ink-muted); }
.success dl.summary dd { text-align: right; font-variant-numeric: tabular-nums; }
#success-payment { text-align: left; }
#success-payment h3 { font-size: 1rem; margin: 20px 0 8px; }
.success-actions { display: grid; gap: 10px; margin-top: 8px; }
@media (min-width: 520px) { .success-actions { grid-template-columns: 1fr 1fr; } }
.success-actions .btn-cta { margin-top: 12px; }

.rsvp footer.site { color: var(--ink-muted); }

@media (prefers-reduced-motion: reduce) {
  .rsvp *, .rsvp *::before, .rsvp *::after { transition: none !important; animation: none !important; }
}
