/* KC-RSVP Diamond · KC EPÍSTOLA (Khal & Silvie demo)
   Dresses the nodes gala-rsvp-bridge.ts builds in KC-Center: reservation plate, extra fields, pass and farewell.
   Language of the invitation (R5): burgundy watered-silk plate, a 2.8 s sealing ritual, then a rectangular ivory pass with the EM wax seal and a perforated stub.
   Everything is anchored to #rsvp, except .kc-rsvp-capture-clean, which the bridge sets on <html> before rasterising.
   Without KC-Center these nodes do not exist and nothing here paints.
   url() goes direct (a url() inside a custom property resolves against the sheet that uses it). */

#rsvp {
  --emd-paper: #FBF8F3;
  --emd-paper-deep: #F1EADF;
  --emd-silver: #A7AAB3;
  --emd-silver-hi: #E5E6EB;
  --emd-silver-lo: #777B85;
  --emd-wine: #6E1F33;
  --emd-wine-ink: #571C30;
  --emd-ink: #2B1A21;
  --emd-ink-soft: #4B3540;
}

/* ══════════ Reservation plate: the guest's name, written in the night ══════════ */
#rsvp .kc-rsvp-reservation {
  position: relative;
  margin: 1.2rem 0 0;
  padding: 1.1rem 0.9rem 1.2rem;
  border-top: 1px solid rgba(167, 170, 179, 0.5);
  border-bottom: 1px solid rgba(167, 170, 179, 0.5);
  text-align: center;
  color: var(--ep-night-ink, #F5F0E8);
}
#rsvp .kc-rsvp-reservation-eyebrow {
  margin: 0;
  font-family: var(--ep-font-caps); font-size: 0.68rem; letter-spacing: 0.26em; text-transform: uppercase;
  color: var(--emd-silver-hi);
}
#rsvp .kc-rsvp-reservation-name {
  margin: 0.2em 0 0.35em;
  font-family: var(--kc-font-display); font-weight: 400; font-size: clamp(1.9rem, 8.6vw, 2.5rem); line-height: 1.15;
  color: var(--ep-night-ink, #F5F0E8);
  overflow-wrap: anywhere; text-wrap: balance;
}
/* Pass pill: silver edge, never wraps */
#rsvp .kc-rsvp-reservation-passes {
  display: inline-block; margin: 0; padding: 0.45rem 1rem;
  border: 1px solid rgba(229, 230, 235, 0.6); border-radius: 999px;
  background: rgba(229, 230, 235, 0.08);
  font-family: var(--ep-font-caps); font-size: 0.68rem; letter-spacing: 0.18em; text-transform: uppercase; white-space: nowrap;
  color: var(--emd-silver-hi);
}

/* ══════════ Fields the bridge adds: same ivory dress as the authored ones ══════════ */
#rsvp .kc-rsvp-extra { margin-top: 0.8rem; }
#rsvp .kc-rsvp-field-group { margin-bottom: 1rem; }
#rsvp .kc-rsvp-field-group label {
  display: block; margin-bottom: 0.45rem;
  font-family: var(--ep-font-caps); font-size: 0.74rem; letter-spacing: 0.2em; text-transform: uppercase; text-align: center;
  color: var(--emd-silver-hi);
}
#rsvp .kc-rsvp-field-group :is(input, textarea, select) {
  display: block; width: 100%; min-height: 48px; padding: 0.6rem 0.8rem;
  border: 0; border-bottom: 2px solid var(--emd-silver); border-radius: 3px 3px 0 0;
  background: var(--ep-ivory-paper, #F5F0E8); color: var(--emd-ink);
  font-family: var(--kc-font-body); font-weight: 600; font-size: 16px; line-height: 1.45;
}
#rsvp .kc-rsvp-field-group textarea { min-height: 96px; resize: vertical; }
#rsvp .kc-rsvp-field-group :is(input, textarea)::placeholder { color: #6A5560; font-style: italic; font-weight: 500; opacity: 1; }
#rsvp .kc-rsvp-field-group :is(input, textarea, select):focus-visible { outline: 2px solid var(--emd-silver-hi); outline-offset: 2px; }
#rsvp #kc-rsvp-x-children_count-hint { margin: 0.35rem 0 0; font-family: var(--kc-font-body); font-style: italic; font-size: 0.95rem; text-align: center; color: var(--ep-night-muted, #D9CFD2); }

/* Adults / kids steppers (Diamond «Adultos / Niños» switch) */
#rsvp .kc-rsvp-headcount-title { margin: 0 0 0.7rem; font-family: var(--ep-font-caps); font-size: 0.74rem; letter-spacing: 0.2em; text-transform: uppercase; text-align: center; color: var(--emd-silver-hi); }
#rsvp .kc-rsvp-headcount-cells { display: grid; grid-template-columns: repeat(auto-fit, minmax(118px, 1fr)); gap: 0.7rem; }
#rsvp .kc-rsvp-headcount-cell { min-width: 0; padding: 0.6rem 0.4rem 0.7rem; border: 1px solid rgba(167, 170, 179, 0.7); border-radius: 3px; background: var(--ep-ivory-paper, #F5F0E8); text-align: center; }
#rsvp .kc-rsvp-headcount-label { display: block; margin-bottom: 0.4rem; font-family: var(--ep-font-caps); font-size: 0.68rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--emd-wine); }
#rsvp .kc-rsvp-headcount-stepper { display: flex; align-items: center; justify-content: center; gap: 0.4rem; }
#rsvp .kc-rsvp-headcount-btn { width: 44px; height: 44px; border: 1px solid rgba(110, 31, 51, 0.55); border-radius: 50%; background: transparent; color: var(--emd-wine); font-family: var(--kc-font-display); font-size: 1.3rem; line-height: 1; cursor: pointer; touch-action: manipulation; }
#rsvp .kc-rsvp-headcount-btn:disabled { opacity: 0.4; cursor: default; }
#rsvp .kc-rsvp-headcount-btn:focus-visible { outline: 2px solid var(--emd-wine); outline-offset: 3px; }
#rsvp .kc-rsvp-headcount-value { min-width: 2ch; font-family: var(--kc-font-display); font-size: 1.8rem; font-variant-numeric: tabular-nums; text-align: center; color: var(--emd-ink); }

/* ══════════ Confirm: the ivory button of the plate; the wait is a silver light passing ══════════ */
#rsvp form[aria-busy="true"] #kc-rsvp-submit {
  cursor: progress;
  background: linear-gradient(105deg, #F5F0E8 0%, #F5F0E8 38%, #DCDDE3 50%, #F5F0E8 62%, #F5F0E8 100%) 0 0 / 260% 100%;
}
@media (prefers-reduced-motion: no-preference) {
  #rsvp form[aria-busy="true"] #kc-rsvp-submit { animation: emdWait 1.4s linear infinite; }
}
@keyframes emdWait { from { background-position: 100% 0; } to { background-position: -160% 0; } }
/* Update: the same button, engraved in silver */
#rsvp .kc-rsvp-update {
  display: block; width: 100%; max-width: 22rem; min-height: 50px; margin: 1rem auto 0;
  border: 1px solid var(--emd-silver); border-radius: 3px;
  background: transparent; color: var(--ep-ivory-paper, #F5F0E8);
  font-family: var(--ep-font-caps); font-size: 0.8rem; letter-spacing: 0.2em; text-transform: uppercase;
  cursor: pointer;
}
#rsvp .kc-rsvp-update:focus-visible { outline: 2px solid var(--emd-silver-hi); outline-offset: 4px; }

/* ══════════ Ritual (R5): the bridge holds aria-busy ≥ 2.8 s (presentation.submitRitualMs) ══════════
   The authored .ep-rsvp-ritual node sits over the fields: the silver star traces itself, the EM wax seal presses, a ring ripples. */
#rsvp .ep-rsvp-ritual {
  display: none; position: relative; z-index: 3;
  flex-direction: column; align-items: center; justify-content: center; gap: 1.3rem;
  min-height: 19rem; pointer-events: none;
}
/* the fields step out and the plate closes around the ritual */
#rsvp .kc-rsvp-form[aria-busy="true"] #kc-rsvp-form-fields { display: none; }
#rsvp .kc-rsvp-form[aria-busy="true"] .ep-rsvp-ritual { display: flex; }
#rsvp .ep-rsvp-ritual__stage { position: relative; width: 10.5rem; height: 10.5rem; }
#rsvp .ep-rsvp-ritual__star { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; stroke-dasharray: 100; stroke-dashoffset: 0; filter: drop-shadow(0 0 6px rgba(229, 230, 235, 0.45)); }
#rsvp .ep-rsvp-ritual__seal { position: absolute; left: 50%; top: 50%; width: 4.6rem; height: 4.6rem; margin: -2.3rem 0 0 -2.3rem; overflow: visible; filter: drop-shadow(0 6px 10px rgba(8, 2, 5, 0.55)); }
#rsvp .ep-rsvp-ritual__ring { position: absolute; left: 50%; top: 50%; width: 4.6rem; height: 4.6rem; margin: -2.3rem 0 0 -2.3rem; border: 1px solid rgba(229, 230, 235, 0.8); border-radius: 50%; opacity: 0; }
#rsvp .ep-rsvp-ritual__copy { margin: 0; display: flex; align-items: baseline; gap: 0.35rem; font-family: var(--ep-font-caps); font-size: 0.82rem; letter-spacing: 0.24em; text-transform: uppercase; color: var(--emd-silver-hi); }
#rsvp .ep-rsvp-ritual__no { display: none; }
#rsvp .kc-rsvp-form:has(input[name="asistencia"][value="No"]:checked) .ep-rsvp-ritual__yes { display: none; }
#rsvp .kc-rsvp-form:has(input[name="asistencia"][value="No"]:checked) .ep-rsvp-ritual__no { display: inline; }
#rsvp .ep-rsvp-ritual__dots { display: inline-flex; gap: 0.22rem; }
#rsvp .ep-rsvp-ritual__dots i { width: 3px; height: 3px; border-radius: 50%; background: currentColor; }
@media (prefers-reduced-motion: no-preference) {
  #rsvp .kc-rsvp-form[aria-busy="true"] .ep-rsvp-ritual__star { animation: emdStarTrace 1500ms cubic-bezier(0.45, 0, 0.2, 1) 200ms both; }
  #rsvp .kc-rsvp-form[aria-busy="true"] .ep-rsvp-ritual__seal { animation: emdSealPress 700ms cubic-bezier(0.3, 0, 0.2, 1) 1500ms both; }
  #rsvp .kc-rsvp-form[aria-busy="true"] .ep-rsvp-ritual__ring { animation: emdRipple 1100ms ease-out 2050ms forwards; }
  #rsvp .kc-rsvp-form[aria-busy="true"] .ep-rsvp-ritual { animation: emdRise 450ms ease-out both; }
  #rsvp .kc-rsvp-form[aria-busy="true"] .ep-rsvp-ritual__copy { animation: emdRise 600ms ease-out 300ms both; }
  #rsvp .kc-rsvp-form[aria-busy="true"] .ep-rsvp-ritual__dots i { animation: emdDot 1200ms ease-in-out infinite; }
  #rsvp .ep-rsvp-ritual__dots i:nth-child(2) { animation-delay: 200ms !important; }
  #rsvp .ep-rsvp-ritual__dots i:nth-child(3) { animation-delay: 400ms !important; }
  #rsvp .kc-rsvp-form[data-kc-sealed] .ep-rsvp-ritual__seal { animation: emdSealFlash 240ms ease-out both; }
}
@keyframes emdStarTrace { from { stroke-dashoffset: 100; opacity: 0.2; } 12% { opacity: 1; } to { stroke-dashoffset: 0; opacity: 1; } }
@keyframes emdSealPress {
  0% { opacity: 0; transform: scale(2.1) rotate(-14deg); }
  70% { opacity: 1; transform: scale(0.9, 0.86) rotate(0deg); }
  100% { opacity: 1; transform: scale(1) rotate(0deg); }
}
@keyframes emdRipple { from { opacity: 0.9; transform: scale(1); } to { opacity: 0; transform: scale(2.3); } }
@keyframes emdDot { 0%, 100% { opacity: 0.25; } 50% { opacity: 1; } }
@keyframes emdSealFlash { 0% { filter: drop-shadow(0 6px 10px rgba(8, 2, 5, 0.55)) brightness(1); } 50% { filter: drop-shadow(0 0 18px rgba(255, 255, 255, 0.9)) brightness(1.35); } 100% { filter: drop-shadow(0 6px 10px rgba(8, 2, 5, 0.55)) brightness(1); } }

/* ══════════ The pass: rectangular ivory laid paper, silver double filet, EM wax seal on the top edge, perforated stub ══════════ */
#rsvp .kc-rsvp-ticket-host { max-width: 22rem; margin: 2.6rem auto 0; text-align: center; }
#rsvp .kc-rsvp-ticket-host .kc-ticket {
  position: relative; isolation: isolate;
  margin: 0; padding: 3.1rem 1.5rem 1.6rem;
  border-radius: 6px;
  background:
    radial-gradient(90% 40% at 30% 0%, rgba(255, 253, 249, 0.95), rgba(255, 253, 249, 0) 70%),
    repeating-linear-gradient(0deg, rgba(110, 31, 51, 0.035) 0 1px, transparent 1px 5px),
    url("../../assets/page/epistola-grain.webp") 0 0 / 96px 96px,
    var(--emd-paper);
  background-blend-mode: normal, normal, multiply, normal;
  color: var(--emd-ink);
  box-shadow: 0 0 0 1px rgba(167, 170, 179, 0.6), 0 4px 10px rgba(8, 2, 5, 0.3), 0 26px 56px rgba(8, 2, 5, 0.55);
}
/* inner double filet: silver, then a wine hairline */
#rsvp .kc-rsvp-ticket-host .kc-ticket::after {
  content: ''; position: absolute; inset: 7px; z-index: 1; pointer-events: none;
  border: 1px solid rgba(167, 170, 179, 0.9); border-radius: 3px;
  box-shadow: inset 0 0 0 3px rgba(251, 248, 243, 0), inset 0 0 0 4px rgba(110, 31, 51, 0.4);
}
/* the EM seal: burgundy wax in watered silk, silver letters, sitting on the top edge */
#rsvp .kc-rsvp-ticket-host .kc-ticket::before {
  content: 'KS'; position: absolute; left: calc(50% - 30px); top: -30px; z-index: 3;
  display: grid; place-items: center;
  width: 60px; height: 60px;
  border-radius: 48% 52% 50% 50% / 52% 47% 53% 48%;
  background:
    radial-gradient(circle at 34% 28%, rgba(255, 190, 210, 0.45), rgba(255, 190, 210, 0) 42%),
    radial-gradient(circle at 50% 50%, rgba(0, 0, 0, 0) 56%, rgba(30, 6, 14, 0.55) 72%, rgba(0, 0, 0, 0) 74%),
    url("../../assets/page/rsvp-velvet.webp") 0 0 / 120px 120px,
    #5E2036;
  box-shadow: 0 0 0 2px rgba(110, 31, 51, 0.65), 0 6px 12px rgba(30, 6, 14, 0.45), inset 0 -3px 6px rgba(20, 4, 10, 0.5), inset 0 2px 3px rgba(255, 200, 215, 0.25);
  font-family: var(--kc-font-display); font-size: 1.15rem; letter-spacing: 0.04em; line-height: 1;
  color: #E5E6EB; text-shadow: 0 1px 0 rgba(20, 4, 10, 0.6), 0 -1px 0 rgba(255, 255, 255, 0.25);
}
#rsvp .kc-rsvp-ticket-host .kc-ticket-particles { position: absolute; inset: 0; z-index: 1; pointer-events: none; overflow: hidden; border-radius: inherit; }
#rsvp .kc-rsvp-ticket-host .kc-tp { display: none; }
#rsvp .kc-rsvp-ticket-host .kc-ticket-particles::after {
  content: ''; position: absolute; inset: -10% -60%;
  background: linear-gradient(105deg, transparent 42%, rgba(255, 255, 255, 0.7) 50%, transparent 58%);
  transform: translateX(-100%); opacity: 0;
}
#rsvp .kc-rsvp-ticket-host .kc-ticket > :not(.kc-ticket-particles) { position: relative; z-index: 2; }
#rsvp .kc-ticket-header { margin: 0 0 0.6rem; }
#rsvp .kc-ticket-crown-ornament {
  display: inline-flex; align-items: center; gap: 0.6rem;
  font-family: var(--ep-font-caps); font-size: 0.6rem; letter-spacing: 0.28em; text-transform: uppercase; white-space: nowrap;
  color: var(--emd-silver-lo);
}
#rsvp .kc-ticket-crown-ornament::before,
#rsvp .kc-ticket-crown-ornament::after { content: ''; width: 22px; height: 1px; background: linear-gradient(90deg, transparent, var(--emd-silver)); }
#rsvp .kc-ticket-crown-ornament::after { transform: scaleX(-1); }
#rsvp .kc-ticket-status { margin: 0; font-family: var(--kc-font-body); font-style: italic; font-size: 1.05rem; color: var(--emd-wine); }
#rsvp .kc-ticket-event {
  margin: 0.25rem 0 0;
  font-family: var(--ep-font-script); font-weight: 400; font-size: clamp(2.3rem, 10vw, 2.8rem); line-height: 1.1; white-space: nowrap;
  color: var(--emd-wine);
}
#rsvp .kc-ticket-celebrant {
  margin: 0.2rem 0 0;
  font-family: var(--kc-font-display); font-size: 1.05rem; letter-spacing: 0.02em;
  color: var(--emd-wine-ink);
}
/* rule with a silver rhombus (the contract's «· · ◆ · ·» stays as invisible fallback) */
#rsvp .kc-ticket-rule {
  position: relative; width: 200px; height: 9px; margin: 1rem auto;
  background: linear-gradient(to right, transparent, var(--emd-silver) 18%, var(--emd-wine) 50%, var(--emd-silver) 82%, transparent) center / 100% 1px no-repeat;
}
#rsvp .kc-ticket-rule span {
  display: block; width: 7px; height: 7px; margin: 1px auto 0;
  overflow: hidden; font-size: 0; color: transparent;
  background: var(--emd-silver); transform: rotate(45deg);
}
#rsvp .kc-ticket-guest-label {
  margin: 0;
  font-family: var(--ep-font-caps); font-size: 0.6rem; letter-spacing: 0.24em; text-transform: uppercase;
  color: var(--emd-ink-soft);
}
#rsvp .kc-ticket-guest {
  margin: 0.25rem 0 0.75rem;
  font-family: var(--kc-font-display); font-weight: 400; font-size: clamp(1.55rem, 6.8vw, 1.95rem); line-height: 1.2;
  color: var(--emd-ink);
  overflow-wrap: anywhere; text-wrap: balance;
}
#rsvp .kc-rsvp-ticket-host .kc-ticket-passes {
  display: inline-block; margin: 0; padding: 0.45rem 1rem;
  border: 1px solid var(--emd-silver); border-radius: 999px;
  background: rgba(167, 170, 179, 0.12);
  font-family: var(--ep-font-caps); font-size: 0.66rem; letter-spacing: 0.18em; text-transform: uppercase; white-space: nowrap;
  color: var(--emd-wine);
}
#rsvp .kc-ticket-date {
  margin: 0.9rem 0 0;
  font-family: var(--ep-font-caps); font-size: 0.68rem; letter-spacing: 0.24em; text-transform: uppercase;
  color: var(--emd-ink-soft);
}
/* QR: clean paper panel in a silver frame. The modules are never touched. */
#rsvp .kc-ticket-qr-wrap { display: flex; flex-direction: column; align-items: center; gap: 0.6rem; margin: 1.2rem auto 0; }
#rsvp .kc-ticket-qr-frame {
  display: flex; align-items: center; justify-content: center;
  box-sizing: border-box; width: 206px; height: 206px; padding: 0;
  border: 1px solid var(--emd-silver-lo); background: var(--emd-paper);
  box-shadow: 0 0 0 3px var(--emd-paper), 0 0 0 4px rgba(110, 31, 51, 0.5), 0 10px 22px rgba(52, 17, 29, 0.16);
}
#rsvp .kc-ticket-qr-img { display: block; width: 180px; height: 180px; }
#rsvp .kc-ticket-qr-img svg { display: block; width: 100%; height: 100%; }
#rsvp .kc-ticket-qr-hint { margin: 0; font-family: var(--ep-font-caps); font-size: 0.56rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--emd-ink-soft); }
#rsvp .kc-ticket-id { margin: 0.9rem 0 0; font-family: var(--ep-font-caps); font-size: 0.54rem; letter-spacing: 0.22em; text-transform: uppercase; color: var(--emd-ink-soft); }
#rsvp .kc-ticket-brand { margin: 0.5rem 0 0; font-family: var(--ep-font-caps); font-size: 0.5rem; letter-spacing: 0.22em; text-transform: uppercase; color: rgba(75, 53, 64, 0.8); }
/* Save pass: an ivory bar on the night plate, sibling of the pass (not part of the capture) */
#rsvp .kc-ticket-share { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.6rem; margin-top: 1.2rem; }
#rsvp .kc-ticket-share-btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: min(100%, 17rem); min-height: 50px; padding: 0.75rem 1.5rem;
  border: 1px solid var(--emd-silver); border-radius: 3px;
  background: var(--ep-ivory-paper, #F5F0E8);
  color: var(--emd-wine-ink);
  font-family: var(--ep-font-caps); font-size: 0.74rem; letter-spacing: 0.2em; text-transform: uppercase; white-space: nowrap;
  box-shadow: 0 0 0 3px rgba(167, 170, 179, 0.16), 0 14px 26px -16px rgba(0, 0, 0, 0.7);
  cursor: pointer;
}
#rsvp .kc-ticket-share-btn:focus-visible { outline: 2px solid var(--emd-silver-hi); outline-offset: 4px; }
#rsvp .kc-ticket-share-btn:active { transform: scale(0.98); }
#rsvp .kc-ticket-share .kc-open-reload { background: transparent; color: var(--ep-ivory-paper, #F5F0E8); box-shadow: none; }

/* perforated stub above the QR: dotted tear line with two side notches cut to the night */
#rsvp .kc-rsvp-ticket-host .kc-ticket-qr-wrap { position: relative; padding-top: 1.5rem; }
#rsvp .kc-rsvp-ticket-host .kc-ticket-qr-wrap::before {
  content: ''; position: absolute; top: 0; left: -1.5rem; right: -1.5rem; height: 20px; translate: 0 -50%;
  background:
    radial-gradient(circle at 0 50%, #2E0C17 9px, rgba(46, 12, 23, 0) 9.5px),
    radial-gradient(circle at 100% 50%, #2E0C17 9px, rgba(46, 12, 23, 0) 9.5px),
    radial-gradient(circle, rgba(119, 123, 133, 0.75) 1.1px, transparent 1.4px) center / 9px 20px repeat-x;
  background-clip: border-box, border-box, content-box;
  padding-inline: 16px;
  box-sizing: border-box;
}

/* Reveal: the pass rises out of the seal's slit, the seal lands on it, one silver light passes. Once. */
@media (prefers-reduced-motion: no-preference) {
  #rsvp .kc-rsvp-ticket-host .kc-ticket { animation: emdPassRise 1.1s cubic-bezier(0.22, 1, 0.36, 1) both; }
  #rsvp .kc-rsvp-ticket-host .kc-ticket::before { animation: emdSealLand 600ms cubic-bezier(0.3, 0, 0.2, 1) 650ms both; }
  #rsvp .kc-rsvp-ticket-host .kc-ticket-particles::after { animation: emdGlint 1.5s ease-in-out 1.1s both; }
  #rsvp .kc-ticket-share { animation: emdRise 0.7s ease-out 1.2s both; }
}
@keyframes emdPassRise {
  from { opacity: 0; clip-path: inset(0 0 100% 0 round 6px); transform: translateY(26px) scale(0.97); }
  35% { opacity: 1; }
  /* ends past the edge: a clip left at 0 would cut the seal and the pass shadow */
  to { opacity: 1; clip-path: inset(-80px -80px -80px -80px round 6px); transform: none; }
}
@keyframes emdSealLand { 0% { opacity: 0; transform: scale(1.9) rotate(-12deg); } 70% { opacity: 1; transform: scale(0.92, 0.88); } 100% { opacity: 1; transform: none; } }
@keyframes emdGlint { 0% { transform: translateX(-100%); opacity: 1; } 100% { transform: translateX(100%); opacity: 1; } }
@keyframes emdRise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

/* ══════════ Farewell (declined): quiet ivory card, no QR ══════════ */
#rsvp .kc-rsvp-farewell {
  max-width: 22rem; margin: 0.6rem auto 0; padding: 1.6rem 1.3rem;
  border: 1px solid rgba(167, 170, 179, 0.8); border-radius: 6px;
  background:
    repeating-linear-gradient(0deg, rgba(110, 31, 51, 0.035) 0 1px, transparent 1px 5px),
    url("../../assets/page/epistola-grain.webp") 0 0 / 96px 96px,
    var(--emd-paper);
  background-blend-mode: normal, multiply, normal;
  box-shadow: inset 0 0 0 6px var(--emd-paper), inset 0 0 0 7px rgba(167, 170, 179, 0.6), 0 26px 56px rgba(8, 2, 5, 0.5);
  text-align: center; color: var(--emd-ink);
}
#rsvp .kc-rsvp-farewell-eyebrow { margin: 0; font-family: var(--ep-font-caps); font-size: 0.64rem; letter-spacing: 0.26em; text-transform: uppercase; color: var(--emd-silver-lo); }
#rsvp .kc-rsvp-farewell-guest { margin: 0.6rem 0 0.4rem; font-family: var(--kc-font-display); font-size: clamp(1.55rem, 6.8vw, 1.95rem); line-height: 1.2; color: var(--emd-wine); overflow-wrap: anywhere; }
#rsvp .kc-rsvp-farewell-body { margin: 0; font-family: var(--kc-font-body); font-style: italic; font-size: 1.08rem; line-height: 1.55; color: var(--emd-ink-soft); }
#rsvp .kc-rsvp-farewell-brand { margin: 0.9rem 0 0; font-family: var(--ep-font-caps); font-size: 0.5rem; letter-spacing: 0.22em; text-transform: uppercase; color: rgba(75, 53, 64, 0.7); }

/* ══════════ Gallery CTA (KC-Center injects it into #captura when the album is activated) ══════════ */
#captura .kc-gallery-cta__link {
  border: 1px solid rgba(229, 230, 235, 0.7); border-radius: 3px;
  background: var(--ep-ivory-paper, #F5F0E8); color: var(--emd-wine-ink); opacity: 1;
  font-family: var(--ep-font-caps); font-size: 0.76rem; letter-spacing: 0.18em; text-transform: uppercase;
  box-shadow: 0 0 0 3px rgba(167, 170, 179, 0.16), 0 14px 26px -16px rgba(0, 0, 0, 0.7);
}

/* ══════════ PNG capture: no outer shadows, no animation, no filters ══════════ */
.kc-rsvp-capture-clean #rsvp .kc-rsvp-ticket-host .kc-ticket {
  animation: none !important; clip-path: none !important; transform: none !important; opacity: 1 !important;
  padding-top: 4.6rem !important;
  box-shadow: none !important; outline: 1px solid rgba(167, 170, 179, 0.6);
}
/* the capture is the pass box only: the seal moves inside so it is not cut */
.kc-rsvp-capture-clean #rsvp .kc-rsvp-ticket-host .kc-ticket::before {
  animation: none !important; top: 14px !important;
  /* WebKit misplaces spread shadows inside foreignObject (a ghost disc): a border instead, solid wax */
  box-sizing: border-box; border: 2px solid rgba(110, 31, 51, 0.65); box-shadow: none !important;
  background: radial-gradient(circle at 34% 28%, rgba(255, 190, 210, 0.4), rgba(255, 190, 210, 0) 42%), #5E2036 !important;
  border-radius: 50% !important; text-shadow: none !important;
}
.kc-rsvp-capture-clean #rsvp .kc-rsvp-ticket-host .kc-ticket-qr-wrap::before { background: radial-gradient(circle, rgba(119, 123, 133, 0.75) 1.1px, transparent 1.4px) center / 9px 20px repeat-x !important; }
.kc-rsvp-capture-clean #rsvp .kc-ticket-particles { display: none !important; }
/* WebKit misplaces spread shadows inside foreignObject: outline ring in the capture */
.kc-rsvp-capture-clean #rsvp .kc-ticket-qr-frame { box-shadow: none !important; outline: 1px solid rgba(110, 31, 51, 0.5); outline-offset: 3px; }
