/* ==========================================================================
   KIT-CAT SORPRESA — estilo "teletienda retro 90s/2000s"
   Mobile-first. Sin frameworks, sin build.
   ========================================================================== */

:root {
  --yellow: #ffd400;
  --red: #ff3b5c;
  --magenta: #ff2e88;
  --pink: #ff8fc0;
  --cyan: #00e5ff;
  --purple-deep: #1a0b2e;
  --purple-mid: #2b0f4a;
  --cream: #fff6e5;
  --ink: #1a1420;
  --white: #ffffff;

  --font-display: "Bungee", "Arial Black", sans-serif;
  --font-body: "Baloo 2", "Poppins", system-ui, sans-serif;

  --radius-lg: 28px;
  --radius-md: 18px;
  --shadow-hard: 6px 6px 0 var(--ink);
  --shadow-hard-sm: 3px 3px 0 var(--ink);

  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: auto;
}

body {
  margin: 0;
  min-height: 100dvh;
  background: var(--purple-deep);
  color: var(--cream);
  font-family: var(--font-body);
  overflow-x: hidden;
  -webkit-tap-highlight-color: transparent;
}

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

button,
input,
textarea {
  font-family: inherit;
}

button {
  cursor: pointer;
}

.hidden {
  display: none !important;
}

/* Respect reduced motion everywhere */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

/* ==========================================================================
   CRT / VHS overlay (decorativo, no bloquea interacción)
   ========================================================================== */

.crt-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: none;
  background: repeating-linear-gradient(
    to bottom,
    rgba(255, 255, 255, 0.05) 0px,
    rgba(255, 255, 255, 0.05) 1px,
    transparent 2px,
    transparent 4px
  );
  background-size: 100% 8px;
  mix-blend-mode: overlay;
  opacity: 0.5;
  animation: crt-scan 9s linear infinite;
}

@keyframes crt-scan {
  from { background-position: 0 0; }
  to { background-position: 0 400px; }
}

.crt-overlay::after {
  content: "";
  position: absolute;
  inset: 0;
  box-shadow: inset 0 0 min(30vw, 220px) rgba(0, 0, 0, 0.65);
}

/* ==========================================================================
   Utilidades tipográficas / decorativas
   ========================================================================== */

.display-text {
  font-family: var(--font-display);
  letter-spacing: 0.5px;
  line-height: 1.15;
}

.stroke-yellow {
  color: var(--white);
  text-shadow:
    -3px -3px 0 var(--ink),
    3px -3px 0 var(--ink),
    -3px 3px 0 var(--ink),
    3px 3px 0 var(--ink),
    0 6px 0 var(--magenta);
}

.pill {
  display: inline-block;
  background: var(--cyan);
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 0.7rem;
  padding: 6px 14px;
  border-radius: 999px;
  border: 3px solid var(--ink);
  box-shadow: var(--shadow-hard-sm);
  transform: rotate(-2deg);
}

/* ==========================================================================
   PANTALLA DE ACCESO (gate)
   ========================================================================== */

#gate {
  position: fixed;
  inset: 0;
  z-index: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  padding-top: calc(24px + var(--safe-top));
  padding-bottom: calc(24px + var(--safe-bottom));
  background:
    radial-gradient(circle at 30% 20%, rgba(255, 62, 136, 0.35), transparent 55%),
    radial-gradient(circle at 80% 80%, rgba(0, 229, 255, 0.25), transparent 55%),
    var(--purple-deep);
  text-align: center;
}

#gate::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: repeating-linear-gradient(
    45deg,
    rgba(255, 212, 0, 0.06) 0 10px,
    transparent 10px 20px
  );
}

/* Ruido de tele sin señal: textura de estática generada con feTurbulence,
   parpadeando rápido para que se note movimiento tipo "interferencia". */
.gate-static {
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 160px 160px;
  opacity: 0.5;
  pointer-events: none;
  animation: tv-static 0.15s steps(1) infinite;
}

@keyframes tv-static {
  0% { transform: translate(0, 0); }
  25% { transform: translate(-3%, 2%); }
  50% { transform: translate(2%, -3%); }
  75% { transform: translate(-2%, -2%); }
  100% { transform: translate(3%, 1%); }
}

/* Bandas de color de sintonía (estilo carta de ajuste de TV) arriba y abajo */
/* Barras de color de sintonía: fuera del flujo (si no, al ser hijas de
   #gate — que es flex en fila — se colocaban a los lados de la tarjeta y
   se salían de la pantalla). Ancho x2 y en bucle para que se vean moverse. */
.gate-colorbars {
  position: absolute;
  left: 0;
  width: 200%;
  height: 12px;
  background: repeating-linear-gradient(
    to right,
    #c0c0c0 0 7%,
    #c0c000 7% 14%,
    #00c0c0 14% 21%,
    #00c000 21% 28%,
    #c000c0 28% 35%,
    #c00000 35% 42%,
    #0000c0 42% 50%
  );
  border-top: 2px solid var(--ink);
  border-bottom: 2px solid var(--ink);
  animation: colorbars-scroll 6s linear infinite;
}

.gate-colorbars--top {
  top: 0;
}

.gate-colorbars--bottom {
  bottom: 0;
}

@keyframes colorbars-scroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

.gate-tv {
  position: relative;
  max-width: 380px;
  width: 100%;
  background: var(--cream);
  color: var(--ink);
  border-radius: var(--radius-lg);
  border: 4px solid var(--ink);
  box-shadow: 8px 8px 0 var(--ink);
  padding: 32px 24px;
}

.gate-channel {
  font-family: var(--font-display);
  font-size: 0.75rem;
  color: var(--red);
  margin-bottom: 8px;
}

.gate-dots {
  display: inline;
  white-space: nowrap;
}

.gate-dots span {
  display: inline-block;
  opacity: 0;
  animation: gate-dot-blink 1.4s infinite;
}

.gate-dots span:nth-child(1) { animation-delay: 0s; }
.gate-dots span:nth-child(2) { animation-delay: 0.25s; }
.gate-dots span:nth-child(3) { animation-delay: 0.5s; }

@keyframes gate-dot-blink {
  0%, 15% { opacity: 0; }
  35%, 65% { opacity: 1; }
  85%, 100% { opacity: 0; }
}

.gate-title {
  font-size: clamp(1.5rem, 7.4vw, 1.9rem);
  margin: 0 0 12px;
  position: relative;
  display: inline-block;
  white-space: nowrap;
  color: var(--white); /* relleno claro: sin esto, el contorno oscuro del glitch se come el texto */
  animation: gate-glitch 1s infinite steps(1);
}

/* Glitch de tele mal sintonizada: dos "ráfagas" de desincronización de color
   por cada vuelta (1s), bastante notorias — no un parpadeo que solo se ve
   si tienes suerte. Contorno cómic normal el resto del tiempo. */
@keyframes gate-glitch {
  0%, 6%, 20%, 48%, 62%, 100% {
    text-shadow: -3px -3px 0 var(--ink), 3px -3px 0 var(--ink), -3px 3px 0 var(--ink), 3px 3px 0 var(--ink), 0 5px 0 var(--magenta);
    transform: translate(0, 0);
  }
  8% {
    text-shadow: -3px -3px 0 var(--ink), 3px -3px 0 var(--ink), -3px 3px 0 var(--ink), 3px 3px 0 var(--ink), 0 5px 0 var(--magenta), 4px 0 var(--cyan), -4px 0 var(--red);
    transform: translate(-3px, 1px);
  }
  12% {
    text-shadow: -3px -3px 0 var(--ink), 3px -3px 0 var(--ink), -3px 3px 0 var(--ink), 3px 3px 0 var(--ink), 0 5px 0 var(--magenta), -4px 0 var(--cyan), 4px 0 var(--red);
    transform: translate(3px, -1px);
  }
  16% {
    text-shadow: -3px -3px 0 var(--ink), 3px -3px 0 var(--ink), -3px 3px 0 var(--ink), 3px 3px 0 var(--ink), 0 5px 0 var(--magenta), 3px 0 var(--cyan), -3px 0 var(--red);
    transform: translate(-2px, 0);
  }
  50% {
    text-shadow: -3px -3px 0 var(--ink), 3px -3px 0 var(--ink), -3px 3px 0 var(--ink), 3px 3px 0 var(--ink), 0 5px 0 var(--magenta), -4px 0 var(--cyan), 4px 0 var(--red);
    transform: translate(2px, -1px);
  }
  54% {
    text-shadow: -3px -3px 0 var(--ink), 3px -3px 0 var(--ink), -3px 3px 0 var(--ink), 3px 3px 0 var(--ink), 0 5px 0 var(--magenta), 4px 0 var(--cyan), -4px 0 var(--red);
    transform: translate(-3px, 1px);
  }
  58% {
    text-shadow: -3px -3px 0 var(--ink), 3px -3px 0 var(--ink), -3px 3px 0 var(--ink), 3px 3px 0 var(--ink), 0 5px 0 var(--magenta), -3px 0 var(--cyan), 3px 0 var(--red);
    transform: translate(2px, 0);
  }
}

/* Parpadeo ocasional de "mala señal" en toda la pantalla del gate */
#gate {
  animation: gate-flicker 2.4s infinite;
}

@keyframes gate-flicker {
  0%, 96%, 100% { opacity: 1; }
  97% { opacity: 0.85; }
  97.5% { opacity: 1; }
  98% { opacity: 0.9; }
  98.5% { opacity: 1; }
}

.gate-subtitle {
  font-size: 0.95rem;
  margin: 0 0 20px;
  line-height: 1.4;
}

#gate-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

#gate-input {
  border: 3px solid var(--ink);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  font-size: 1.1rem;
  text-align: center;
  background: var(--white);
  color: var(--ink);
  outline: none;
}

#gate-input:focus {
  border-color: var(--magenta);
}

.btn-primary {
  font-family: var(--font-display);
  font-size: 1rem;
  letter-spacing: 0.5px;
  color: var(--ink);
  background: var(--yellow);
  border: 3px solid var(--ink);
  border-radius: var(--radius-md);
  padding: 14px 20px;
  box-shadow: var(--shadow-hard);
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}

.btn-primary:active {
  transform: translate(3px, 3px);
  box-shadow: 0 0 0 var(--ink);
}

.gate-error {
  color: var(--red);
  font-weight: 700;
  min-height: 1.2em;
  font-size: 0.9rem;
}

/* ==========================================================================
   APP (contenido tras el gate)
   ========================================================================== */

#app {
  position: relative;
}

section {
  position: relative;
  padding: 64px 20px;
}

/* ---- Hero ---- */

#hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 18px;
  padding: 0 28px 56px; /* .hero-intro gestiona su propio padding superior, y se sale del lateral aposta (ver abajo) */
  background:
    radial-gradient(circle at 20% 10%, rgba(0, 229, 255, 0.25), transparent 50%),
    radial-gradient(circle at 85% 85%, rgba(255, 62, 136, 0.3), transparent 50%),
    var(--purple-deep);
}

/* .hero-intro (rayos + kicker + gato + título) sale del flujo normal por
   completo con position:absolute, así que el padding lateral de #hero (o
   cualquiera que tenga en el futuro) le da igual: se ancla al borde real de
   la sección, no a su caja de contenido. El spacer de abajo reserva el
   hueco de 100dvh en el flujo para que el resto del hero no se monte encima. */
.hero-top-spacer {
  width: 100%;
  height: calc(100dvh + 34px); /* 34px = alto exacto de .hero-divider, que va absoluto */
  flex-shrink: 0;
}

.hero-intro {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100dvh;
  max-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-top: calc(36px + var(--safe-top));
  padding-bottom: calc(36px + var(--safe-bottom));
  overflow: hidden;
}

/* Rayos de sol girando de fondo, estilo teletienda. Enorme y centrado para
   que, gire lo que gire, nunca se le vean los bordes; contenido por el
   overflow:hidden del padre así que jamás se sale de los 100dvh. */
.hero-sunburst {
  position: absolute;
  top: 44%;
  left: 50%;
  width: 200vmax;
  height: 200vmax;
  transform: translate(-50%, -50%) rotate(0deg);
  background: repeating-conic-gradient(
    from 0deg,
    rgba(255, 212, 0, 0.22) 0deg 6deg,
    transparent 6deg 9deg
  );
  animation: sunburst-spin 50s linear infinite;
  pointer-events: none;
  z-index: 0;
}

@keyframes sunburst-spin {
  to { transform: translate(-50%, -50%) rotate(360deg); }
}

/* Todo el contenido real del hero-intro por encima del sunburst */
.hero-intro > *:not(.hero-sunburst) {
  position: relative;
  z-index: 1;
}

/* Separador "cortinilla" entre la primera pantalla (rayos) y el resto del
   hero — disimula a propósito el corte en vez de intentar esconderlo. Franja
   de estrellas en marquesina (mismo motivo ★ de las tarjetas), sin patrones
   geométricos que puedan salir cortados en los bordes. Va absoluta, pegada
   justo donde terminan los rayos (top:100dvh) — así no depende de ningún
   cálculo de gap del flex de #hero, igual que los rayos. */
.hero-divider {
  position: absolute;
  top: 100dvh;
  left: 0;
  width: 100%;
  height: 34px;
  background: var(--pink);
  border-top: 3px solid var(--ink);
  border-bottom: 3px solid var(--ink);
  overflow: hidden;
  display: flex;
  align-items: center;
}

.hero-divider-track {
  display: inline-flex;
  white-space: nowrap;
  animation: marquee-scroll 16s linear infinite;
  will-change: transform;
}

.hero-divider-track span {
  display: inline-block;
  font-family: var(--font-display);
  font-size: 0.85rem;
  color: var(--ink);
  letter-spacing: 6px;
}

.hero-kicker {
  font-family: var(--font-display);
  font-size: 0.7rem;
  color: var(--purple-deep);
  background: var(--cyan);
  border: 3px solid var(--ink);
  border-radius: 999px;
  padding: 6px 16px;
  box-shadow: var(--shadow-hard-sm);
}

.hero-title {
  font-size: clamp(2.4rem, 12vw, 5rem);
  margin: 0;
  padding: 0 16px;
}

.hero-subtitle {
  font-family: var(--font-display);
  font-size: clamp(1rem, 4.5vw, 1.4rem);
  color: var(--yellow);
  margin: 38px 0 0; /* + los 18px de gap del flex = 56px, igual que el hueco desliza→marquesina */
  text-shadow: 2px 2px 0 var(--ink);
}

/* Alto basado en dvh (no en ancho): así el gato SIEMPRE encaja dentro de la
   primera pantalla sin importar el aspect-ratio del SVG ni el alto real del
   viewport (móvil bajito, notch, teclado, lo que sea). */
#hero-mascot {
  height: min(46dvh, 360px);
  width: auto;
  max-width: 78vw;
  flex-shrink: 0;
  filter: drop-shadow(0 10px 0 rgba(0, 0, 0, 0.35));
}

@media (min-width: 700px) {
  #hero-mascot {
    height: min(56dvh, 620px);
  }
}

.hero-body {
  max-width: 480px;
  background: var(--cream);
  color: var(--ink);
  border-radius: var(--radius-md);
  border: 4px solid var(--ink);
  box-shadow: var(--shadow-hard);
  padding: 20px 22px;
  font-size: 1.02rem;
  line-height: 1.55;
}

.hero-cta {
  font-family: var(--font-display);
  color: var(--yellow);
  font-size: 0.95rem;
  margin-top: 8px;
  animation: bounce-y 1.4s ease-in-out infinite;
}

@keyframes bounce-y {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(8px); }
}

/* ---- Marquesina ---- */

.marquee {
  background: var(--yellow);
  color: var(--ink);
  border-top: 4px solid var(--ink);
  border-bottom: 4px solid var(--ink);
  overflow: hidden;
  white-space: nowrap;
  padding: 10px 0;
}

.marquee-track {
  display: inline-flex;
  animation: marquee-scroll 22s linear infinite;
  will-change: transform;
}

/* El propio texto de cada span ya repite la frase dos veces terminando en
   "★ " — así el hueco entre el final de un span y el principio del
   siguiente es IDÉNTICO al hueco entre frases dentro del propio texto, y
   translateX(-50%) encaja sin saltos ni huecos raros. */
.marquee-track span {
  font-family: var(--font-display);
  font-size: 1rem;
  flex: none;
}

@keyframes marquee-scroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* ---- Catálogo ---- */

#catalogo {
  background: var(--purple-mid);
  padding-bottom: 160px;
}

.section-heading {
  text-align: center;
  margin-bottom: 32px;
}

.section-heading h2 {
  font-size: clamp(1.8rem, 7vw, 2.6rem);
  margin: 0 0 8px;
}

.section-heading p {
  margin: 0;
  color: var(--cream);
  opacity: 0.85;
  font-size: 1rem;
}

.card-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 28px;
  max-width: 1100px;
  margin: 0 auto;
}

@media (min-width: 640px) {
  .card-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 980px) {
  .card-grid { grid-template-columns: repeat(3, 1fr); }
}

.kc-card {
  position: relative;
  background: var(--cream);
  color: var(--ink);
  border-radius: var(--radius-lg);
  border: 4px solid var(--ink);
  box-shadow: var(--shadow-hard);
  padding: 20px 18px 22px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
  --card-accent: var(--magenta);
}

.kc-card::before {
  content: "";
  position: absolute;
  inset: 8px;
  border: 3px dashed var(--card-accent);
  border-radius: calc(var(--radius-lg) - 8px);
  pointer-events: none;
  opacity: 0.6;
}

.kc-card:hover,
.kc-card:focus-within {
  transform: translateY(-6px) rotate(-1deg);
  box-shadow: 9px 9px 0 var(--ink);
}

.kc-card.selected {
  outline: none;
  transform: translateY(-8px) scale(1.02);
  box-shadow: 9px 9px 0 var(--card-accent);
}

.kc-card.dimmed {
  opacity: 0.55;
  filter: grayscale(0.35);
}

.kc-badge {
  font-family: var(--font-display);
  font-size: 0.65rem;
  color: var(--white);
  background: var(--card-accent);
  border: 3px solid var(--ink);
  border-radius: 999px;
  padding: 6px 12px;
  position: absolute;
  top: -16px;
  left: 50%;
  transform-origin: center;
  box-shadow: var(--shadow-hard-sm);
  white-space: nowrap;
  animation: badge-wobble 2.6s ease-in-out infinite;
}

@keyframes badge-wobble {
  0%, 100% { transform: translateX(-50%) rotate(-3deg) scale(1); }
  50% { transform: translateX(-50%) rotate(3deg) scale(1.06); }
}

.kc-card-media {
  width: 100%;
  height: 190px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 14px 0 12px;
  position: relative;
}

.kc-card-media img {
  max-height: 100%;
  width: auto;
  margin: 0 auto;
}

.kc-mascot-mini {
  position: absolute;
  bottom: -6px;
  right: -6px;
  width: 46px;
  height: 46px;
  background: var(--white);
  border: 3px solid var(--ink);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-hard-sm);
  animation: mini-bounce 2.2s ease-in-out infinite;
}

@keyframes mini-bounce {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-5px) rotate(-8deg); }
}

.kc-mascot-mini svg {
  width: 30px;
  height: 30px;
}

.kc-card-name {
  font-family: var(--font-display);
  font-size: 1.15rem;
  margin: 4px 0 6px;
}

.kc-card-note {
  font-size: 0.85rem;
  background: var(--yellow);
  border: 2px solid var(--ink);
  border-radius: var(--radius-md);
  padding: 8px 10px;
  margin: 4px 0 10px;
  line-height: 1.35;
}

.kc-card-actions {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
}

.kc-link {
  font-size: 0.8rem;
  color: var(--purple-mid);
  text-decoration: underline;
  font-weight: 700;
}

.kc-select-btn {
  font-family: var(--font-display);
  font-size: 0.85rem;
  color: var(--ink);
  background: var(--white);
  border: 3px solid var(--ink);
  border-radius: var(--radius-md);
  padding: 10px 14px;
  box-shadow: var(--shadow-hard-sm);
  transition: transform 0.12s ease, background 0.12s ease;
  animation: btn-clickme 1.7s ease-in-out infinite;
}

.kc-select-btn:active {
  transform: translate(2px, 2px);
  box-shadow: none;
}

@keyframes btn-clickme {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.025); }
}

/* Ya elegida esta tarjeta: dejamos de invitar al clic */
.kc-card.selected .kc-select-btn {
  animation: none;
}

.kc-card.selected .kc-select-btn {
  background: var(--card-accent);
  color: var(--white);
}

.kc-check {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--card-accent);
  border: 3px solid var(--ink);
  display: none;
  align-items: center;
  justify-content: center;
  color: var(--white);
  font-weight: 900;
  transform: scale(0);
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.kc-card.selected .kc-check {
  display: flex;
  transform: scale(1);
}

/* Tarjeta "Otro" */

.kc-card--otro {
  --card-accent: #8a8a8a;
  background: repeating-linear-gradient(
    135deg,
    var(--cream) 0 14px,
    #f1e6cf 14px 28px
  );
}

.kc-otro-input {
  width: 100%;
  border: 3px solid var(--ink);
  border-radius: var(--radius-md);
  padding: 10px 12px;
  font-size: 0.95rem;
  text-align: center;
  resize: vertical;
  min-height: 70px;
  margin-top: 8px;
}

/* ==========================================================================
   BARRA DE CONFIRMACIÓN (fija abajo)
   ========================================================================== */

#confirm-bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 400;
  background: var(--cream);
  color: var(--ink);
  border-top: 4px solid var(--ink);
  box-shadow: 0 -8px 0 rgba(0, 0, 0, 0.15);
  padding: 16px 20px calc(16px + var(--safe-bottom));
  transform: translateY(110%);
  transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

#confirm-bar.visible {
  transform: translateY(0);
}

.confirm-close {
  position: absolute;
  top: -18px;
  right: 16px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--red);
  color: var(--white);
  border: 3px solid var(--ink);
  box-shadow: var(--shadow-hard-sm);
  font-family: var(--font-display);
  font-size: 1rem;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.confirm-close:active {
  transform: translate(2px, 2px);
  box-shadow: none;
}

.confirm-inner {
  max-width: 640px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 10px;
}

#confirm-title {
  font-family: var(--font-display);
  font-size: 1rem;
  margin: 0;
}

#confirm-title strong {
  color: var(--magenta);
}

#confirm-submit {
  width: 100%;
}

#confirm-loading {
  font-family: var(--font-display);
  font-size: 0.85rem;
  text-align: center;
}

/* ==========================================================================
   OVERLAYS de éxito / error
   ========================================================================== */

.result-overlay {
  position: fixed;
  inset: 0;
  z-index: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(26, 11, 46, 0.92);
  text-align: center;
}

.result-card {
  max-width: 420px;
  background: var(--cream);
  color: var(--ink);
  border: 4px solid var(--ink);
  border-radius: var(--radius-lg);
  box-shadow: 8px 8px 0 var(--ink);
  padding: 32px 24px;
}

.result-card p {
  font-size: 1.05rem;
  line-height: 1.5;
  margin: 0 0 20px;
}

/* ---- Footer ---- */

#site-footer {
  text-align: center;
  padding: 28px 20px calc(28px + var(--safe-bottom));
  background: var(--purple-deep);
  font-size: 0.85rem;
  opacity: 0.8;
}

.logout-link {
  margin-top: 10px;
  background: none;
  border: none;
  color: var(--cream);
  opacity: 0.45;
  font-size: 0.7rem;
  font-family: var(--font-body);
  text-decoration: underline;
  padding: 6px;
}

.logout-link:active {
  opacity: 0.8;
}

/* Honeypot: oculto visualmente pero accesible a bots */
.hp-field {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* ==========================================================================
   Mascota Kit-Cat animada (ojos + cola), reutilizada en hero y mini-tarjetas
   ========================================================================== */

.kc-eye-pupil {
  animation: kc-eyes 1.3s ease-in-out infinite;
  transform-box: fill-box;
  transform-origin: center;
}

.kc-tail-group {
  animation: kc-tail 1.3s ease-in-out infinite;
  transform-box: fill-box;
  transform-origin: top center;
}

@keyframes kc-eyes {
  0%, 10% { transform: translateX(-2.5px); }
  50% { transform: translateX(2.5px); }
  90%, 100% { transform: translateX(-2.5px); }
}

@keyframes kc-tail {
  0%, 10% { transform: rotate(-9deg); }
  50% { transform: rotate(9deg); }
  90%, 100% { transform: rotate(-9deg); }
}

/* Ojos de la mascota "Otro": en dispositivos con ratón, el JS toma el control
   y las mueve siguiendo el cursor (desactivando el parpadeo lateral idle). En
   táctil se quedan con la animación normal de kc-eye-pupil. */
.kc-otro-pupil {
  transition: transform 0.08s linear;
}

.kc-otro-pupil.tracking-cursor {
  animation: none;
}
