/* KC EPÍSTOLA · noche (RSVP → footer) y anillo musical. Carril B.
   Un solo degradado continuo: lino → burdeos → noche. Cada bloque abre y cierra con el tono de su vecino. */

:root {
  --ep-night-0: #E8DFD2;
  --ep-night-1: #4B1C24;
  --ep-night-2: #2A0B14;
  --ep-night-3: #170710;
  --ep-night-4: #0E0509;
  --ep-strip-h: clamp(11rem, 26vh, 18rem);
  --ep-night-ink: #F5F0E8;
  --ep-night-muted: #DCCFD4;
  --ep-grain: url('../../../assets/page/epistola-grain.webp');
}
@supports (height: 1svh) {
  :root { --ep-strip-h: clamp(11rem, 26svh, 18rem); }
}

/* Foco claro: el burdeos del core no se ve sobre la noche. */
#rsvp, #captura, #kc-footer { --kc-focus: #E5E6EB; }

/* ── Franja de transición: lino → noche (curva suave, sin banda) ──
   Arranca en #D9CFC4: el tono medido donde termina #regalos (lino + sombra de Carril A), no el #E8DFD2 nominal. */
#rsvp { --ep-strip-h: clamp(16rem, 66.72vw, 32rem); }
.ep-night-strip {
  height: var(--ep-strip-h);
  overflow: hidden;
  background: linear-gradient(to bottom, #D9CFC4 0%, #D5CAC0 10%, #CABCB3 20%, #BAA8A1 30%, #A7908C 40%, #927674 50%, #7D5B5C 60%, #6A4347 70%, #5A2F35 80%, #4F2128 90%, #4B1C24 100%);
}
/* R5 (CEO): la foto de los agaves es la transición; arriba se funde con el lino, abajo con la noche. */
.ep-night-strip__photo {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 40%;
  filter: saturate(0.86) sepia(0.1) contrast(1.02);
  -webkit-mask-image: linear-gradient(to bottom, transparent 0%, rgba(0,0,0,.06) 10%, rgba(0,0,0,.3) 22%, rgba(0,0,0,.75) 32%, #000 40%, #000 64%, transparent 100%);
  mask-image: linear-gradient(to bottom, transparent 0%, rgba(0,0,0,.06) 10%, rgba(0,0,0,.3) 22%, rgba(0,0,0,.75) 32%, #000 40%, #000 64%, transparent 100%);
}

/* Grano fino sobre toda la noche */
#rsvp, #captura, #kc-footer { position: relative; isolation: isolate; }
#rsvp::after, #captura::after, #kc-footer::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: 0.045;
  background: var(--ep-grain) 0 0 / 160px 160px;
}

/* ── #rsvp: night-1 → night-2 (la franja ocupa el arranque) ── */
#rsvp {
  padding-block: 0 var(--kc-section-pad);
  background-color: var(--ep-night-1);
  background-image:
    radial-gradient(62% 34% at 50% 46%, rgba(129, 45, 70, 0.34), rgba(129, 45, 70, 0) 100%),
    linear-gradient(to bottom, var(--ep-night-1) 0%, var(--ep-night-2) 100%);
  background-repeat: no-repeat;
  background-size: 100% calc(100% - var(--ep-strip-h));
  background-position: 0 100%;
  color: var(--ep-night-ink);
}
#rsvp > .kc-container { position: relative; z-index: 2; padding-top: clamp(0.5rem, 3vw, 1.5rem); }

#rsvp .kc-eyebrow, #captura .kc-eyebrow { color: var(--ep-silver-hi); }
#rsvp .kc-title, #captura .kc-title { color: var(--ep-night-ink); text-wrap: balance; }
#rsvp .kc-rsvp-deadline, #captura .kc-body { color: var(--ep-night-muted); }
#rsvp .kc-rsvp-deadline:has(#kc-rsvp-deadline:empty) { display: none; }

/* KC-RSVP: estrella de plata dibujada + la palabra, grande (R5 CEO: sin emoji). */
#rsvp .ep-rsvp-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55em;
  margin: 0 auto 0.5rem;
  font-size: clamp(1.45rem, 6.2vw, 2.2rem);
  letter-spacing: 0.24em;
  line-height: 1;
  color: var(--ep-silver-hi);
}
#rsvp .ep-rsvp-mark__star {
  order: -1;
  flex: none;
  width: 1.35em;
  height: 1.35em;
  overflow: visible;
  filter: drop-shadow(0 0 0.35em rgba(229, 230, 235, 0.32));
}
/* la palabra en plata grabada; la estrella trae su propio degradado */
#rsvp .ep-rsvp-mark {
  padding-left: 0.24em;
  background: linear-gradient(180deg, #FFFFFF 0%, #E5E6EB 46%, #A7AAB3 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
@media (prefers-reduced-motion: no-preference) {
  #rsvp .ep-rsvp-mark__star { animation: ep-star-glint 5.2s ease-in-out infinite; }
}
@keyframes ep-star-glint {
  0%, 78%, 100% { filter: drop-shadow(0 0 0.35em rgba(229, 230, 235, 0.32)); scale: 1; }
  88% { filter: drop-shadow(0 0 0.7em rgba(255, 255, 255, 0.85)) brightness(1.18); scale: 1.08; }
}

/* Placa: seda moiré burdeos con doble filete de plata y estrellas en las esquinas. Sin arco. */
#rsvp .kc-rsvp-form {
  --plate-pad: clamp(1.4rem, 6vw, 2.3rem);
  position: relative;
  margin-top: clamp(1.6rem, 6vw, 2.4rem);
  padding: calc(var(--plate-pad) + 0.6rem) var(--plate-pad) calc(var(--plate-pad) + 0.2rem);
  gap: var(--kc-space-5);
  border: 1px solid rgba(167, 170, 179, 0.78);
  border-radius: 6px;
  background:
    radial-gradient(110% 55% at 50% -8%, rgba(214, 120, 150, 0.26), rgba(214, 120, 150, 0) 62%),
    radial-gradient(150% 110% at 50% 45%, rgba(14, 3, 8, 0) 52%, rgba(14, 3, 8, 0.6) 100%),
    url("../../../assets/page/epistola-grain.webp") 0 0 / 160px 160px,
    url("../../../assets/page/rsvp-velvet.webp") 0 0 / 256px 256px,
    #4A1829;
  background-blend-mode: normal, normal, soft-light, normal, normal;
  box-shadow:
    0 0 0 4px rgba(42, 11, 20, 0.55),
    0 0 0 5px rgba(167, 170, 179, 0.28),
    0 34px 60px -30px rgba(8, 2, 5, 0.9),
    inset 0 1px 0 rgba(229, 230, 235, 0.18);
  text-align: left;
  transition: background 500ms var(--kc-ease), box-shadow 500ms var(--kc-ease), border-color 500ms var(--kc-ease);
}
#rsvp .kc-rsvp-form::before {
  content: "";
  position: absolute;
  inset: 2px;
  pointer-events: none;
  --ep-corner-star: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 40 40'%3E%3Cpath d='M20 2.8l4.23 12.18 12.89.26-10.27 7.78 3.73 12.34L20 28l-10.58 7.36 3.73-12.34L2.88 15.24l12.89-.26z' fill='%23E5E6EB' fill-opacity='.9'/%3E%3C/svg%3E");
  background:
    var(--ep-corner-star) left top / 14px 14px no-repeat,
    var(--ep-corner-star) right top / 14px 14px no-repeat,
    var(--ep-corner-star) left bottom / 14px 14px no-repeat,
    var(--ep-corner-star) right bottom / 14px 14px no-repeat;
}
#rsvp .kc-rsvp-form::after {
  content: "";
  position: absolute;
  inset: 8px;
  border: 1px solid rgba(229, 230, 235, 0.34);
  border-radius: 3px;
  box-shadow: inset 0 0 0 3px rgba(74, 24, 41, 0), inset 0 0 0 4px rgba(167, 170, 179, 0.16);
  pointer-events: none;
}
/* Con el pase en mano la placa se retira: el pase marfil queda solo sobre la noche. */
#rsvp .kc-rsvp-form:has(#kc-rsvp-ticket-host:not([hidden])) {
  padding-inline: 0;
  border-color: transparent;
  background: none;
  box-shadow: none;
}
#rsvp .kc-rsvp-form:has(#kc-rsvp-ticket-host:not([hidden]))::before,
#rsvp .kc-rsvp-form:has(#kc-rsvp-ticket-host:not([hidden]))::after { display: none; }
#rsvp .kc-rsvp-fields, #rsvp .kc-rsvp-status, #rsvp .kc-rsvp-error, #rsvp .kc-rsvp-ticket-host { position: relative; z-index: 1; }

/* Etiquetas */
#rsvp .kc-rsvp-attendance legend,
#rsvp .kc-field > label {
  font-family: var(--ep-font-caps);
  font-size: 0.8rem;
  font-weight: 400;
  letter-spacing: 0.16em;
  color: var(--ep-silver-hi);
  margin-bottom: var(--kc-space-2);
  padding: 0;
}
#rsvp .kc-rsvp-attendance-hint,
#rsvp .kc-rsvp-decline-note,
#rsvp .kc-rsvp-allocation-note { color: var(--ep-night-muted); font-size: 0.95rem; text-align: center; }

/* Sí / No: tarjetas con sello de plata */
#rsvp .kc-rsvp-attendance-options { gap: var(--kc-space-3); }
#rsvp .kc-rsvp-attendance-face {
  gap: 0.75rem;
  justify-content: flex-start;
  min-height: 3.4rem;
  padding: 0.5rem 1rem;
  border: 1px solid rgba(167, 170, 179, 0.55);
  border-radius: 3px;
  background: rgba(245, 240, 232, 0.05);
  color: var(--ep-night-ink);
  font-size: 1.08rem;
  line-height: 1.25;
  text-align: left;
  transition: background-color 280ms var(--kc-ease), border-color 280ms var(--kc-ease), box-shadow 280ms var(--kc-ease);
}
#rsvp .kc-rsvp-attendance-face::before {
  content: "";
  flex: 0 0 auto;
  width: 1.2rem;
  height: 1.2rem;
  border: 1px solid var(--ep-silver);
  border-radius: 50%;
  box-shadow: 0 0 0 3px rgba(167, 170, 179, 0.14);
  transition: background 280ms var(--kc-ease), border-color 280ms var(--kc-ease);
}
@media (hover: hover) {
  #rsvp .kc-rsvp-attendance-option:not(:has(input:disabled)):hover .kc-rsvp-attendance-face {
    border-color: var(--ep-silver-hi);
    background: rgba(245, 240, 232, 0.1);
  }
}
#rsvp .kc-rsvp-attendance-option:has(input:checked) .kc-rsvp-attendance-face {
  background: rgba(245, 240, 232, 0.14);
  border-color: var(--ep-silver-hi);
  color: var(--ep-night-ink);
  box-shadow: 0 0 0 1px rgba(229, 230, 235, 0.35), 0 10px 24px -14px rgba(0, 0, 0, 0.6);
}
#rsvp .kc-rsvp-attendance-option:has(input:checked) .kc-rsvp-attendance-face::before {
  border-color: var(--ep-silver-hi);
  background: radial-gradient(circle, var(--ep-silver-hi) 0 36%, transparent 40%);
}
#rsvp .kc-rsvp-attendance-option:has(input:focus-visible) { outline: 2px solid var(--ep-silver-hi); outline-offset: 3px; border-radius: 3px; }
#rsvp .kc-rsvp-attendance-option:has(input:disabled) { cursor: default; }
#rsvp .kc-rsvp-attendance-option input:disabled { cursor: default; }

/* Campos marfil con subrayado de plata */
#rsvp .kc-field input:not([type="radio"]),
#rsvp .kc-field select {
  min-height: 3.1rem;
  padding: 0 var(--kc-space-4);
  border: 0;
  border-bottom: 2px solid var(--ep-silver);
  border-radius: 3px 3px 0 0;
  background: var(--ep-ivory-paper);
  color: var(--kc-ink);
  font-family: var(--kc-font-body);
  font-weight: 600;
  transition: border-color 240ms var(--kc-ease), box-shadow 240ms var(--kc-ease);
}
#rsvp .kc-field input::placeholder { color: #6A5560; opacity: 1; font-weight: 500; }
#rsvp .kc-field input:not([type="radio"]):focus-visible,
#rsvp .kc-field select:focus-visible {
  outline: 2px solid var(--ep-silver-hi);
  outline-offset: 2px;
  border-bottom-color: var(--ep-silver-hi);
}
#rsvp .kc-field select {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 2.6rem;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%23571C30' stroke-width='1.4'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  background-size: 0.8rem;
}
#rsvp .kc-field input[aria-invalid="true"],
#rsvp .kc-field select[aria-invalid="true"] { border-bottom-color: #F2A9B6; box-shadow: 0 2px 0 0 rgba(242, 169, 182, 0.35); }
/* Vista previa: mismo diseño, línea punteada y quietud; no gris roto */
#rsvp .kc-field input:not([type="radio"]):disabled,
#rsvp .kc-field select:disabled {
  border-bottom-style: dotted;
  border-bottom-color: var(--ep-silver);
  background-color: rgba(245, 240, 232, 0.93);
  opacity: 1;
  -webkit-text-fill-color: #4B3540;
  color: #4B3540;
  cursor: default;
}

/* Botón: marfil con texto burdeos */
#rsvp .kc-rsvp-submit {
  min-height: 3.3rem;
  border: 1px solid var(--ep-silver);
  border-radius: 3px;
  background: var(--ep-ivory-paper);
  color: var(--ep-burgundy-ink);
  font-family: var(--ep-font-caps);
  font-size: 0.92rem;
  font-weight: 400;
  letter-spacing: 0.2em;
  box-shadow: 0 0 0 3px rgba(167, 170, 179, 0.16), 0 14px 26px -16px rgba(0, 0, 0, 0.7);
  transition: transform 240ms var(--kc-ease), background-color 240ms var(--kc-ease), box-shadow 240ms var(--kc-ease);
}
@media (hover: hover) {
  #rsvp .kc-rsvp-submit:not(:disabled):hover { background: #fff; transform: translateY(-1px); }
}
#rsvp .kc-rsvp-submit:not(:disabled):active { transform: translateY(0); }
/* En vista previa el botón espera: grabado en plata, sin relleno */
#rsvp .kc-rsvp-submit:disabled {
  background: transparent;
  border-color: var(--ep-silver);
  color: var(--ep-ivory-paper);
  box-shadow: inset 0 0 0 3px rgba(167, 170, 179, 0.12);
  cursor: default;
}

#rsvp .kc-rsvp-status { color: var(--ep-night-ink); }
#rsvp .kc-rsvp-error { color: #FFC7D0; padding-top: var(--kc-space-2); border-top: 1px solid rgba(242, 169, 182, 0.4); }

/* Nota de publicación: línea de sello bajo la placa */
#rsvp .kc-rsvp-offline {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.9rem;
  margin-top: var(--kc-space-5);
  color: var(--ep-night-muted);
  font-style: italic;
  font-size: 1rem;
  line-height: 1.35;
  text-align: center;
}
#rsvp .kc-rsvp-offline::before,
#rsvp .kc-rsvp-offline::after {
  content: "";
  flex: 1 1 1.5rem;
  max-width: 4rem;
  height: 1px;
  background: linear-gradient(to right, rgba(167, 170, 179, 0), rgba(167, 170, 179, 0.75));
}
#rsvp .kc-rsvp-offline::after { transform: scaleX(-1); }

/* ── #captura (KC-Echoes): noche más honda, night-2 → night-3 ── */
#captura {
  padding-block: clamp(3rem, 8vw, 5rem);
  overflow: clip;
  background-color: var(--ep-night-2);
  background-image:
    radial-gradient(58% 30% at 50% 24%, rgba(110, 40, 62, 0.34), rgba(110, 40, 62, 0) 100%),
    linear-gradient(to bottom, var(--ep-night-2) 0%, var(--ep-night-3) 100%);
  color: var(--ep-night-ink);
}
#captura > .kc-container { position: relative; z-index: 2; }
/* R4: el álbum se abre el día del evento (el Center inyecta el acceso cuando se activa). */
#captura .ep-echoes__opens {
  display: inline-block;
  margin: 1.1rem auto 0;
  padding: 0.5rem 1.1rem;
  border: 0.7px solid rgba(229, 230, 235, 0.45);
  border-radius: 999px;
  font-family: var(--ep-font-caps);
  font-size: 0.72rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ep-silver-hi);
}
.ep-echoes {
  position: relative;
  height: clamp(11rem, 44vw, 15rem);
  margin-top: var(--kc-space-2);
  margin-bottom: var(--kc-space-3);
  pointer-events: none;
}
.ep-echoes__camera {
  position: absolute;
  left: 50%;
  top: 50%;
  width: clamp(9.5rem, 40vw, 14rem);
  translate: -50% -50%;
  filter: brightness(1.35) drop-shadow(0 0 14px rgba(229, 230, 235, 0.28)) drop-shadow(0 12px 22px rgba(0, 0, 0, 0.55));
  animation: ep-camera-float 7s ease-in-out infinite;
}
.ep-mote {
  position: absolute;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: radial-gradient(circle, #E5E6EB 0 40%, rgba(229, 230, 235, 0) 72%);
  opacity: 0;
  animation: ep-mote-drift 11s ease-in-out infinite;
}
.ep-mote:nth-of-type(1) { left: 12%; top: 70%; animation-duration: 12s; }
.ep-mote:nth-of-type(2) { left: 24%; top: 28%; animation-duration: 9s; animation-delay: -3s; width: 3px; height: 3px; }
.ep-mote:nth-of-type(3) { left: 38%; top: 82%; animation-duration: 13s; animation-delay: -6s; }
.ep-mote:nth-of-type(4) { left: 66%; top: 76%; animation-duration: 10s; animation-delay: -2s; width: 5px; height: 5px; }
.ep-mote:nth-of-type(5) { left: 80%; top: 30%; animation-duration: 14s; animation-delay: -8s; width: 3px; height: 3px; }
.ep-mote:nth-of-type(6) { left: 90%; top: 62%; animation-duration: 11s; animation-delay: -5s; }
@keyframes ep-camera-float {
  0%, 100% { transform: translateY(-4px) rotate(-1deg); }
  50% { transform: translateY(5px) rotate(1deg); }
}
@keyframes ep-mote-drift {
  0% { opacity: 0; transform: translate(0, 0); }
  20% { opacity: 0.85; }
  80% { opacity: 0.5; }
  100% { opacity: 0; transform: translate(14px, -46px); }
}
/* ── Footer: el cielo. night-3 → night-4 con luz hacia la luna ── */
#kc-footer {
  --moon-w: clamp(5.85rem, 24.7vw, 11.7rem);
  --hz-h: clamp(5.85rem, 30vw, 16.9rem);
  overflow: hidden;
  padding-block: calc(var(--moon-w) * 1.2) calc(var(--hz-h) * 0.55 + env(safe-area-inset-bottom));
  background-color: var(--ep-night-3);
  background-image:
    radial-gradient(circle at calc(100% - 6vw - var(--moon-w) / 2) calc(var(--moon-w) * 0.8), rgba(150, 70, 96, 0.4) 0, rgba(150, 70, 96, 0.18) calc(var(--moon-w) * 0.38), rgba(150, 70, 96, 0) calc(var(--moon-w) * 0.8)),
    /* bruma tras la silueta: sin ella el negro del horizonte se funde con el cielo */
    radial-gradient(70% 100% at 50% 100%, rgba(150, 58, 88, 0.5), rgba(150, 58, 88, 0) 100%),
    linear-gradient(to bottom, var(--ep-night-3) 0%, var(--ep-night-4) 100%);
  background-size: auto, 100% calc(var(--hz-h) * 1.3), auto;
  background-position: 0 0, 0 100%, 0 0;
  background-repeat: no-repeat;
  color: var(--ep-night-ink);
}
.ep-sky { position: absolute; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
.ep-sky__stars {
  position: absolute;
  left: 0;
  top: 0;
  width: 1.4px;
  height: 1.4px;
  border-radius: 50%;
  box-shadow:
    33.1vw 114px 0 0px rgba(245,240,232,0.26),
    80.8vw 75px 0 0px rgba(245,240,232,0.20),
    5.6vw 309px 0 0px rgba(245,240,232,0.30),
    10.7vw 303px 0 0px rgba(245,240,232,0.30),
    62.5vw 412px 0 0.8px rgba(245,240,232,0.30),
    6.8vw 163px 0 0.4px rgba(245,240,232,0.45),
    42.2vw 383px 0 0px rgba(245,240,232,0.60),
    11.9vw 404px 0 0.4px rgba(245,240,232,0.45),
    11.4vw 501px 0 0px rgba(245,240,232,0.30),
    49.7vw 377px 0 0.8px rgba(245,240,232,0.60),
    58.2vw 323px 0 0px rgba(245,240,232,0.60),
    78.3vw 492px 0 0px rgba(245,240,232,0.45),
    57.1vw 372px 0 0.8px rgba(245,240,232,0.60),
    29.6vw 686px 0 0.8px rgba(245,240,232,0.30),
    17.8vw 246px 0 0.8px rgba(245,240,232,0.85),
    5.8vw 471px 0 0.4px rgba(245,240,232,0.60),
    68.7vw 420px 0 0px rgba(245,240,232,0.85),
    82.6vw 662px 0 0px rgba(245,240,232,0.85),
    7.8vw 494px 0 0.4px rgba(245,240,232,0.85),
    70.8vw 622px 0 0px rgba(245,240,232,0.60),
    92.3vw 255px 0 0.8px rgba(245,240,232,0.30),
    7.7vw 540px 0 0px rgba(245,240,232,0.45),
    40.2vw 643px 0 0px rgba(245,240,232,0.85),
    18.0vw 287px 0 0px rgba(245,240,232,0.60),
    80.7vw 606px 0 0.8px rgba(245,240,232,0.60),
    96.7vw 481px 0 0px rgba(245,240,232,0.85),
    16.5vw 132px 0 0px rgba(245,240,232,0.43),
    3.2vw 583px 0 0.4px rgba(245,240,232,0.45),
    29.1vw 111px 0 0.4px rgba(245,240,232,0.51),
    93.5vw 486px 0 0.8px rgba(245,240,232,0.30),
    88.4vw 548px 0 0.8px rgba(245,240,232,0.85),
    40.3vw 81px 0 0px rgba(245,240,232,0.58),
    20.3vw 689px 0 0px rgba(245,240,232,0.85),
    12.6vw 425px 0 0px rgba(245,240,232,0.30),
    56.4vw 380px 0 0px rgba(245,240,232,0.60),
    8.8vw 153px 0 0px rgba(245,240,232,0.85),
    62.9vw 669px 0 0.8px rgba(245,240,232,0.60),
    13.8vw 596px 0 0.8px rgba(245,240,232,0.85),
    48.4vw 69px 0 0.4px rgba(245,240,232,0.19),
    73.1vw 340px 0 0px rgba(245,240,232,0.45),
    21.7vw 667px 0 0px rgba(245,240,232,0.60),
    68.2vw 641px 0 0px rgba(245,240,232,0.60),
    68.8vw 190px 0 0px rgba(245,240,232,0.60),
    36.1vw 164px 0 0px rgba(245,240,232,0.60),
    60.9vw 554px 0 0px rgba(245,240,232,0.45),
    80.6vw 521px 0 0px rgba(245,240,232,0.45),
    51.7vw 255px 0 0px rgba(245,240,232,0.30),
    77.9vw 336px 0 0.4px rgba(245,240,232,0.45),
    44.9vw 657px 0 0.4px rgba(245,240,232,0.60),
    9.7vw 80px 0 0px rgba(245,240,232,0.58),
    34.4vw 343px 0 0.8px rgba(245,240,232,0.30),
    89.3vw 247px 0 0px rgba(245,240,232,0.30),
    89.3vw 550px 0 0.8px rgba(245,240,232,0.45),
    87.3vw 309px 0 0px rgba(245,240,232,0.60),
    78.9vw 680px 0 0.8px rgba(245,240,232,0.85),
    40.5vw 663px 0 0px rgba(245,240,232,0.45),
    97.3vw 29px 0 0px rgba(245,240,232,0.34),
    60.7vw 421px 0 0.4px rgba(245,240,232,0.85),
    17.0vw 388px 0 0px rgba(245,240,232,0.30),
    78.7vw 511px 0 0px rgba(245,240,232,0.30),
    43.6vw 612px 0 0px rgba(245,240,232,0.45),
    26.2vw 212px 0 0.4px rgba(245,240,232,0.45),
    26.9vw 299px 0 0px rgba(245,240,232,0.45),
    89.4vw 254px 0 0.8px rgba(245,240,232,0.85);
}
.ep-sky__twinkle {
  position: absolute;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: #F5F0E8;
  box-shadow: 0 0 6px 1px rgba(229, 230, 235, 0.8);
  animation: ep-twinkle 4.6s ease-in-out infinite;
}
.ep-sky__twinkle:nth-of-type(2) { left: 14%; top: 17%; }
.ep-sky__twinkle:nth-of-type(3) { left: 34%; top: 9%; animation-duration: 6s; animation-delay: -2s; }
.ep-sky__twinkle:nth-of-type(4) { left: 56%; top: 20%; animation-duration: 5.2s; animation-delay: -1s; width: 2px; height: 2px; }
.ep-sky__twinkle:nth-of-type(5) { left: 8%; top: 38%; animation-duration: 7s; animation-delay: -4s; width: 2px; height: 2px; }
.ep-sky__twinkle:nth-of-type(6) { left: 44%; top: 31%; animation-duration: 5.6s; animation-delay: -3s; }
@keyframes ep-twinkle {
  0%, 100% { opacity: 0.25; transform: scale(0.7); }
  50% { opacity: 1; transform: scale(1.25); }
}
/* Halo de la luna: radial CSS; su borde exterior llega a alpha 0 antes del tope del footer */
.ep-sky::before {
  content: "";
  position: absolute;
  top: 0;
  right: calc(6vw - var(--moon-w) * 0.3);
  width: calc(var(--moon-w) * 1.6);
  aspect-ratio: 1;
  background: radial-gradient(circle closest-side, rgba(229, 230, 235, 0.36) 0, rgba(229, 230, 235, 0.2) 30%, rgba(167, 170, 179, 0.08) 62%, rgba(167, 170, 179, 0) 100%);
}
.ep-sky__moon {
  position: absolute;
  top: calc(var(--moon-w) * 0.3);
  right: 6vw;
  width: var(--moon-w);
  height: auto;
  /* El limbo oscuro tapa el halo, como la luna real; un brillo de tierra tenue (luz cenicienta) le da cuerpo.
     Disco del grabado = 94.4% del lado. */
  border-radius: 50%;
  background:
    radial-gradient(40% 40% at 58% 46%, rgba(78, 52, 66, 0.5) 0, rgba(78, 52, 66, 0) 100%),
    radial-gradient(circle closest-side, #1B0A12 0 93.6%, rgba(27, 10, 18, 0) 94.6%);
  filter: drop-shadow(0 0 1.1rem rgba(229, 230, 235, 0.35));
}
.ep-sky__horizon {
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: var(--hz-h);
  max-width: none;
}
#kc-footer > .kc-container { position: relative; z-index: 2; }

/* Texto: marfil y plata sobre la noche */
#kc-footer .kc-footer__inner { gap: 0.45rem; }
#kc-footer .kc-footer__inner::before {
  content: "";
  display: block;
  width: min(14rem, 60vw);
  height: 1px;
  margin-bottom: 0.15rem;
  background:
    linear-gradient(90deg, transparent 0%, rgba(245, 240, 232, 0.95) 50%, transparent 100%) -120% 0 / 40% 100% no-repeat,
    linear-gradient(90deg, transparent, rgba(167, 170, 179, 0.7) 50%, transparent);
  animation: ep-divider-shine 6.5s ease-in-out infinite;
}
@keyframes ep-divider-shine {
  0%, 25% { background-position: -120% 0, 0 0; }
  70%, 100% { background-position: 220% 0, 0 0; }
}
#kc-footer .kc-footer__mark {
  gap: 0.7rem;
  font-family: var(--ep-font-caps);
  font-size: 0.95rem;
  letter-spacing: 0.28em;
  text-transform: none;
  color: var(--ep-night-ink);
}
#kc-footer .kc-footer__icon {
  width: 0.95rem;
  height: 0.95rem;
  border: 0;
  border-radius: 0;
  background: linear-gradient(135deg, var(--ep-silver-hi), var(--ep-silver) 55%, var(--ep-silver-lo));
  clip-path: polygon(50% 0, 60% 40%, 100% 50%, 60% 60%, 50% 100%, 40% 60%, 0 50%, 40% 40%);
}
#kc-footer .kc-footer__icon::after { display: none; }
#kc-footer .kc-footer__inner p { margin: 0; color: var(--ep-night-muted); font-size: 0.92rem; }
#kc-footer .kc-footer__inner p:first-of-type { color: var(--ep-night-ink); font-family: var(--kc-font-display); font-size: 1rem; }
#kc-footer .kc-footer__inner p[data-event-field="locationContext"] { display: none; }
#kc-footer .kc-footer__inner p[data-event-field="eventDate.display"] { font-family: var(--ep-font-caps); letter-spacing: 0.18em; font-size: 0.8rem; color: var(--ep-silver-hi); }
#kc-footer .kc-footer__link {
  margin-top: 0.15rem;
  color: var(--ep-night-muted);
  font-family: var(--ep-font-caps);
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  transition: color 240ms var(--kc-ease);
}
#kc-footer .kc-footer__link:hover { color: var(--ep-night-ink); }

/* ── Anillo musical: disco burdeos, órbita de plata y gema ── */
#music-control.kc-ring {
  --ring-core: radial-gradient(circle at 35% 28%, #812D46 0%, #571C30 58%, #34111D 100%);
  background: var(--ring-core);
  color: var(--ep-ivory-paper);
  filter: none;
  border: 1px solid rgba(229, 230, 235, 0.62);
  box-shadow: 0 6px 20px rgba(14, 5, 9, 0.6), 0 0 0 1px rgba(14, 5, 9, 0.28), inset 0 1px 0 rgba(245, 240, 232, 0.16);
  transition: transform 200ms var(--kc-ease), border-color 300ms var(--kc-ease), box-shadow 300ms var(--kc-ease);
}
#music-control.kc-ring:active { transform: scale(0.93); }
/* Halo plateado y disco burdeos, con la órbita de Pórtico. */
#music-control.kc-ring .kc-ring__glow {
  position: absolute;
  inset: -12px;
  z-index: 0;
  border-radius: 50%;
  pointer-events: none;
  background: radial-gradient(circle, rgba(229, 230, 235, .2) 0%, rgba(167, 170, 179, .1) 40%, transparent 70%);
  animation: ep-ring-breath 3s ease-in-out infinite alternate;
  animation-play-state: paused;
}
#music-control.kc-ring .kc-ring__orbit {
  z-index: 2;
  inset: -10px;
  border: 1.5px dashed rgba(229, 230, 235, 0.88);
  box-shadow: 0 0 12px rgba(167, 170, 179, 0.28);
  animation-duration: 14s;
  transition: opacity 400ms var(--kc-ease);
}
/* Gema: rombo de plata sobre la órbita discontinua. */
#music-control.kc-ring .kc-ring__orbit::before {
  top: -4.5px;
  width: 7px;
  height: 7px;
  margin-left: 0;
  border-radius: 1px;
  transform: translateX(-50%) rotate(45deg);
  background: linear-gradient(135deg, #FFFFFF 0%, #E5E6EB 42%, #A7AAB3 72%, #6E727C 100%);
  box-shadow: 0 0 6px 2px rgba(229, 230, 235, .55), 0 0 14px 4px rgba(229, 230, 235, .24);
}
#music-control.kc-ring .kc-ring__letter {
  z-index: 3;
  font-family: var(--kc-font-display);
  font-size: 0.86rem;
  letter-spacing: 0.04em;
  color: var(--ep-ivory-paper);
  text-shadow: 0 0 10px rgba(229, 230, 235, 0.3);
  padding-bottom: 5px;
  transition: color 300ms var(--kc-ease), opacity 300ms var(--kc-ease);
}
#music-control.kc-ring .kc-ring__emblem { display: none; }
#music-control.kc-ring .kc-ring__bars { z-index: 4; bottom: 8px; gap: 1.5px; transition: opacity 300ms var(--kc-ease); }
#music-control.kc-ring .kc-bar {
  width: 2.5px;
  border-radius: 1px;
  background: linear-gradient(to top, var(--ep-silver-lo), var(--ep-silver-hi));
  animation: ep-ring-bar var(--ep-bar-tempo, .4s) ease-in-out infinite alternate;
  animation-play-state: paused;
  box-shadow: 0 0 4px rgba(229, 230, 235, .36);
}
#music-control.kc-ring[data-kc-state="playing"] .kc-ring__glow { animation-play-state: running; opacity: 1; }
#music-control.kc-ring[data-kc-state="playing"] .kc-bar { animation-play-state: running; }
#music-control.kc-ring .kc-bar:nth-child(1) { --ep-bar-tempo: .35s; }
#music-control.kc-ring .kc-bar:nth-child(2) { --ep-bar-tempo: .25s; animation-delay: .1s; }
#music-control.kc-ring .kc-bar:nth-child(3) { --ep-bar-tempo: .4s; animation-delay: .2s; }
/* Pausa: todo se apaga y se congela donde estaba (sin reiniciar) */
#music-control.kc-ring[data-kc-state="paused"] { border-color: rgba(167, 170, 179, 0.45); }
#music-control.kc-ring[data-kc-state="paused"] .kc-ring__orbit { opacity: 0.5; box-shadow: none; animation-play-state: paused; }
#music-control.kc-ring[data-kc-state="paused"] .kc-ring__glow { animation-play-state: paused; opacity: .08; }
#music-control.kc-ring[data-kc-state="paused"] .kc-ring__letter { opacity: 0.62; }
#music-control.kc-ring[data-kc-state="paused"] .kc-ring__bars { opacity: 0.4; }
#music-control.kc-ring[data-kc-state="paused"] .kc-bar { height: 3px !important; opacity: .18; }
@media (hover: hover) {
  #music-control.kc-ring:hover { border-color: var(--ep-silver-hi); box-shadow: 0 8px 24px rgba(14, 5, 9, 0.7), 0 0 18px rgba(229, 230, 235, 0.3), inset 0 1px 0 rgba(245, 240, 232, 0.2); }
}
#music-control.kc-ring:focus-visible { outline: 2px solid var(--ep-silver-hi); outline-offset: 5px; }
@keyframes ep-ring-breath {
  from { transform: scale(0.88); }
  to { transform: scale(1.16); }
}
@keyframes ep-ring-bar { from { height: 3px; opacity: .5; } to { opacity: 1; box-shadow: 0 0 6px rgba(229, 230, 235, .64); } }

@media (prefers-reduced-motion: reduce) {
  .ep-echoes__camera,
  .ep-mote,
  .ep-sky__twinkle,
  #kc-footer .kc-footer__inner::before,
  #music-control.kc-ring .kc-ring__glow { animation: none !important; }
  .ep-mote { opacity: 0.5; }
  .ep-sky__twinkle { opacity: 0.8; }
}

/* Fuera de pantalla no se gasta batería: la noche espera (el anillo no entra aquí) */
.ep-offscreen .ep-echoes__camera,
.ep-offscreen .ep-mote,
.ep-offscreen .ep-sky__twinkle,
.ep-offscreen .kc-footer__inner::before { animation-play-state: paused; }
