/* ==========================================================================
   Botón flotante + chat con Nico (ver js/chat-widget.js). Mismo componente que
   Santy Barber; aquí sus variables toman los colores de Nácar.
   ========================================================================== */
.chat-widget {
  --accent: #d6156a; --accent-hover: #7d1238; --accent-ink: #ffffff; --accent-fg: #d6156a;
  --bg: #fff0f4; --surface: #ffffff; --surface-2: #ffe3ec;
  --ink: #2b1019; --ink-2: #6b4651; --line: rgba(125, 18, 56, 0.16); --danger: #a3263b;
  --font-body: "DM Sans", system-ui, sans-serif; --font-display: "Cormorant Garamond", Georgia, serif;
  --shadow: 0 24px 60px -24px rgba(61, 8, 32, 0.55);
  --pole: linear-gradient(120deg, #ff3d8b 0%, #d6156a 45%, #7d1238 100%);
}
.chat-widget {
  position: fixed; right: 16px; bottom: calc(16px + env(safe-area-inset-bottom, 0px)); z-index: 80;
  display: flex; flex-direction: column; align-items: flex-end; gap: 12px;
  pointer-events: none;
}
.chat-widget > * { pointer-events: auto; }
/* Lo que el JS oculta con `hidden` (panel, burbuja, sugerencias) debe ocultarse
   aunque su regla le ponga display: flex. */
.chat-widget [hidden] { display: none !important; }
@media (min-width: 768px) { .chat-widget { right: 24px; bottom: calc(24px + env(safe-area-inset-bottom, 0px)); } }
/* Mientras se ve el formulario de reserva (celular), el botón se esconde para no tapar Atrás/Siguiente. */
@media (max-width: 919px) {
  .chat-widget { transition: opacity .2s, visibility .2s; }
  body.stepbar-on .chat-widget:not(.is-open) { opacity: 0; visibility: hidden; }
}

.chat-widget__button {
  width: 52px; height: 52px; border-radius: 50%; border: 0; cursor: pointer;
  display: grid; place-items: center;
  background: var(--accent); color: var(--accent-ink);
  box-shadow: 0 8px 20px rgba(0, 0, 0, .45);
  transition: transform .16s cubic-bezier(.23, 1, .32, 1), background-color .15s ease;
}
@media (hover: hover) and (pointer: fine) { .chat-widget__button:hover { transform: scale(1.06); background: var(--accent-hover); } }
.chat-widget__button:active { transform: scale(.94); }

/* Latido: un anillo sale del botón cada 2,4 s y el botón "late" un poco, hasta que lo abren.
   Con "reducir movimiento" activado en el celular no se anima. */
.chat-widget__button { position: relative; }
@media (prefers-reduced-motion: no-preference) {
  .chat-widget.is-pulsing:not(.is-open) .chat-widget__button { animation: chat-latido 2.4s ease-in-out 1.5s infinite; }
  .chat-widget.is-pulsing:not(.is-open) .chat-widget__button::before,
  .chat-widget.is-pulsing:not(.is-open) .chat-widget__button::after {
    content: ""; position: absolute; inset: 0; border-radius: 50%;
    border: 2px solid var(--accent); pointer-events: none;
    animation: chat-onda 2.4s ease-out 1.5s infinite; opacity: 0;
  }
  .chat-widget.is-pulsing:not(.is-open) .chat-widget__button::after { animation-delay: 2.1s; }
}
@keyframes chat-onda {
  0% { transform: scale(1); opacity: .7; }
  80%, 100% { transform: scale(1.9); opacity: 0; }
}
@keyframes chat-latido {
  0%, 30%, 100% { transform: scale(1); }
  10% { transform: scale(1.1); }
  20% { transform: scale(.97); }
}
.chat-widget__button svg { width: 24px; height: 24px; }
@media (min-width: 768px) { .chat-widget__button { width: 58px; height: 58px; } .chat-widget__button svg { width: 27px; height: 27px; } }
/* Botón con imagen propia ("Consulta aquí"): más grande para que se lea el texto del logo. */
.chat-widget__button--logo { width: 70px; height: 70px; padding: 0; background: transparent; box-shadow: 0 10px 24px rgba(0, 0, 0, .5); }
.chat-widget__logo { width: 100%; height: 100%; display: block; border-radius: 50%; }
@media (hover: hover) and (pointer: fine) { .chat-widget__button--logo:hover { background: transparent; } }
@media (min-width: 768px) { .chat-widget__button--logo { width: 80px; height: 80px; } }
.chat-widget.is-open .chat-widget__button--logo { background: var(--accent); }
.chat-widget__button--wa { background: #1FA855; box-shadow: 0 10px 26px rgba(31, 168, 85, .35); }
.chat-widget__button--wa:hover { background: #188A45; }

/* La burbuja de bienvenida tapa contenido en celular: solo se muestra en pantallas anchas. */
@media (max-width: 767px) { .chat-widget__bubble { display: none !important; } }
.chat-widget__bubble {
  position: relative; max-width: 250px;
  background: var(--surface); color: var(--ink);
  border: 1px solid var(--line); border-radius: 16px 16px 4px 16px;
  padding: 14px 34px 14px 16px; box-shadow: var(--shadow);
  font-size: .88rem; line-height: 1.4;
}
.chat-widget__bubble strong { display: block; font-family: var(--font-display); text-transform: uppercase; font-size: 1.2rem; letter-spacing: .02em; }
.chat-widget__bubble-close {
  position: absolute; top: 6px; right: 6px; width: 26px; height: 26px; border-radius: 50%;
  display: grid; place-items: center; border: 0; background: none; color: var(--ink-2); cursor: pointer;
}
.chat-widget__bubble-close:hover { background: var(--surface-2); }
.chat-widget__bubble-close svg { width: 14px; height: 14px; }

.chat-widget__ico { display: grid; place-items: center; }
.chat-widget__ico--close { display: none; }
.chat-widget.is-open .chat-widget__ico--open { display: none; }
.chat-widget.is-open .chat-widget__ico--close { display: grid; }

/* ---------- Panel ---------- */
.chat-panel {
  display: flex; flex-direction: column;
  width: min(380px, calc(100vw - 32px)); height: min(600px, calc(100vh - 120px));
  background: var(--surface); color: var(--ink);
  border: 1px solid var(--line); border-radius: 20px; overflow: hidden;
  box-shadow: 0 24px 60px rgba(0, 0, 0, .45);
}
@media (max-width: 599px) {
  .chat-widget.is-open { inset: 0; }
  .chat-widget.is-open .chat-widget__button { display: none; }
  .chat-panel { width: 100vw; height: 100vh; height: 100dvh; border-radius: 0; border: 0; }
}
body.chat-no-scroll { overflow: hidden; }

.chat-panel__head {
  display: flex; align-items: center; gap: 10px; padding: 12px 10px 12px 14px;
  background: #060810; color: var(--ink); border-bottom: 4px solid transparent; border-image: var(--pole) 1;
}
.chat-panel__avatar {
  width: 40px; height: 40px; flex: none; border-radius: 12px;
  display: grid; place-items: center; background: var(--accent); color: var(--accent-ink);
  font-family: var(--font-display); font-weight: 700; font-size: 1.4rem;
}
.chat-panel__avatar img { width: 100%; height: 100%; border-radius: 50%; display: block; }
.chat-panel__avatar:has(img) { background: none; border-radius: 50%; }
.chat-panel__who { flex: 1; min-width: 0; line-height: 1.25; }
.chat-panel__who strong { display: block; font-family: var(--font-display); text-transform: uppercase; font-size: 1.35rem; letter-spacing: .03em; }
.chat-panel__who span { display: flex; align-items: center; gap: 6px; font-size: .75rem; color: rgba(255, 255, 255, .72); }
.chat-panel__online { width: 8px; height: 8px; border-radius: 50%; background: #3DDC84; flex: none; }
.chat-panel__icon-btn {
  width: 38px; height: 38px; border-radius: 10px; flex: none; border: 0; background: none; cursor: pointer;
  display: grid; place-items: center; font-size: 1.15rem; color: #fff;
}
.chat-panel__icon-btn:hover { background: rgba(255, 255, 255, .12); }
.chat-panel__icon-btn svg { width: 20px; height: 20px; }
.chat-panel :focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.chat-panel__head :focus-visible { outline-color: #fff; }

.chat-panel__body {
  flex: 1; overflow-y: auto; overscroll-behavior: contain;
  padding: 16px 14px; display: flex; flex-direction: column; gap: 10px; background: var(--bg);
}
.chat-msg { display: flex; flex-direction: column; gap: 6px; max-width: 86%; }
.chat-msg--bot { align-self: flex-start; }
.chat-msg--user { align-self: flex-end; align-items: flex-end; }
.chat-msg__bubble { padding: 10px 13px; border-radius: 16px; font-size: .92rem; line-height: 1.45; overflow-wrap: anywhere; }
.chat-msg--bot .chat-msg__bubble { background: var(--surface); border: 1px solid var(--line); border-bottom-left-radius: 4px; }
.chat-msg--user .chat-msg__bubble { background: var(--accent); color: var(--accent-ink); border-bottom-right-radius: 4px; }
.chat-msg__bubble a { color: inherit; text-decoration: underline; }
.chat-msg__acciones { display: flex; flex-direction: column; gap: 6px; }
.chat-accion {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 14px; border-radius: 12px; text-decoration: none;
  font-weight: 700; font-size: .88rem; color: #fff; background: #0F7A3F;
}
.chat-accion:hover { background: #0B6332; }
.chat-accion--persona { background: var(--ink); color: var(--bg); }
.chat-accion--persona:hover { background: var(--ink-2); }
.chat-accion svg { width: 18px; height: 18px; }
.chat-cita__premio { margin-top: 4px; padding: 6px 8px; border-radius: 8px; background: rgba(215,38,61,.18); color: var(--accent-fg); font-weight: 700; justify-content: center !important; }
.chat-enviado { margin: 0; padding: 10px 12px; border-radius: 12px; background: #123A2A; color: #4ADE9B; font-weight: 600; font-size: .86rem; text-align: center; }
.chat-enviado a { display: block; margin-top: 2px; color: var(--ink-2); font-weight: 500; }

.chat-cita {
  background: var(--surface); border: 1.5px dashed var(--accent); border-radius: 12px;
  padding: 10px 12px; font-size: .85rem; display: grid; gap: 4px;
}
.chat-cita strong { font-family: var(--font-display); text-transform: uppercase; font-size: 1.25rem; letter-spacing: .02em; }
.chat-cita div { display: flex; justify-content: space-between; gap: 12px; }
.chat-cita div span:first-child { color: var(--ink-2); }
.chat-cita div span:last-child { text-align: right; font-weight: 600; }
.chat-cita__code { font-family: var(--font-body); font-weight: 700; font-size: 1.25rem; letter-spacing: .14em; color: var(--accent-fg); }
.chat-cita--off { border-color: var(--line); opacity: .8; }
.chat-cita--off strong { color: var(--danger); }
.chat-cita__total { border-top: 1px solid var(--line); padding-top: 6px; margin-top: 2px; }
.chat-cita__total span:last-child { color: var(--accent-fg); font-family: var(--font-display); font-size: 1.3rem; font-weight: 700; }

.chat-typing { display: flex; gap: 4px; padding: 14px 16px; }
.chat-typing i { width: 7px; height: 7px; border-radius: 50%; background: var(--ink-2); animation: chat-typing 1.2s infinite ease-in-out; }
.chat-typing i:nth-child(2) { animation-delay: .15s; }
.chat-typing i:nth-child(3) { animation-delay: .3s; }
@keyframes chat-typing { 0%, 60%, 100% { transform: translateY(0); opacity: .45; } 30% { transform: translateY(-4px); opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .chat-typing i { animation: none; opacity: .7; } }

.chat-panel__chips { display: flex; flex-wrap: wrap; gap: 6px; padding: 10px 12px 2px; background: var(--bg); }
.chat-chip {
  padding: 7px 12px; border-radius: 999px; font-size: .82rem; font-weight: 600; cursor: pointer;
  background: var(--surface); border: 1px solid var(--accent); color: var(--accent-fg);
}
.chat-chip:hover { background: var(--accent); color: var(--accent-ink); }

.chat-panel__form { display: flex; align-items: flex-end; gap: 8px; padding: 10px 12px; background: var(--surface); border-top: 1px solid var(--line); }
.chat-panel__form textarea {
  flex: 1; resize: none; max-height: 120px;
  font: inherit; font-size: 16px; line-height: 1.35; color: var(--ink);
  border: 1.5px solid var(--line); border-radius: 14px; padding: 10px 12px; background: var(--bg);
}
.chat-panel__form textarea:focus-visible { outline: 0; border-color: var(--accent); }
.chat-panel__form button {
  width: 44px; height: 44px; border-radius: 50%; flex: none; border: 0; cursor: pointer;
  display: grid; place-items: center; background: var(--accent); color: var(--accent-ink);
}
.chat-panel__form button svg { width: 20px; height: 20px; }
.chat-panel__form button:disabled, .chat-panel__form textarea:disabled { opacity: .55; cursor: default; }
.chat-panel__foot {
  display: flex; align-items: center; justify-content: center; gap: 6px; text-decoration: none;
  padding: 8px 12px 10px; font-size: .78rem; color: var(--ink-2); background: var(--surface);
}
.chat-panel__foot svg { width: 14px; height: 14px; color: #1FA855; }
.chat-panel__foot:hover { color: var(--ink); }

/* ---------- Ajustes de Nácar (estilo del spa en vez del de barbería) ---------- */
.chat-panel { box-shadow: var(--shadow); }
.chat-panel__head { background: linear-gradient(140deg, #3d0820 0%, #7d1238 45%, #c2185b 100%); color: #fff; border: 0; border-image: none; }
.chat-panel__avatar { background: linear-gradient(120deg, #ff3d8b, #d6156a); border-radius: 50%; font-weight: 500; }
.chat-widget__bubble strong,
.chat-panel__who strong,
.chat-cita strong { text-transform: none; letter-spacing: 0; font-weight: 500; }
.chat-panel__who strong { font-size: 1.5rem; }
.chat-widget__button { background: linear-gradient(120deg, #ff3d8b, #d6156a 55%, #7d1238); box-shadow: 0 12px 28px -10px rgba(214, 21, 106, 0.8); }
/* La barra móvil de Llamar / WhatsApp ocupa el fondo en el celular: el botón del chat va encima */
@media (max-width: 1023px) { .chat-widget { bottom: calc(84px + env(safe-area-inset-bottom, 0px)); } .chat-widget.is-open { bottom: 0; } }
body:has(.chat-widget .chat-panel) .wa-flotante { display: none !important; }

/* Puntos de "escribiendo": grandes, en el color del spa y con el texto al lado */
.chat-msg__bubble.chat-typing { display: flex; align-items: center; gap: 10px; padding: 12px 16px; }
.chat-typing__dots { display: inline-flex; gap: 5px; align-items: center; }
.chat-typing i { width: 9px; height: 9px; background: #d6156a; animation: chat-typing 1.1s infinite ease-in-out; }
.chat-typing__txt { font-size: .85rem; color: var(--ink-2); }

/* Aviso de privacidad bajo la conversación */
.chat-panel__legal{margin:0;padding:6px 14px;font-size:.74rem;line-height:1.4;color:var(--ink-2);text-align:center;border-top:1px solid var(--line)}
.chat-panel__legal a{color:var(--accent-fg);text-underline-offset:2px}

/* ---------- Nico muñeco (config.js → chatBot.mascota: true) ---------- */
.chat-widget__button--mascota { width: 84px; height: 98px; border-radius: 0; background: transparent; box-shadow: none; padding: 0; overflow: visible; }
@media (min-width: 768px) { .chat-widget__button--mascota { width: 104px; height: 122px; } }
@media (hover: hover) and (pointer: fine) { .chat-widget__button--mascota:hover { background: transparent; transform: none; } }
.chat-widget__button--mascota .chat-widget__ico { width: 100%; height: 100%; }
.chat-widget__button--mascota svg.nico { width: 100%; height: 100%; overflow: visible; }
/* Abierto: vuelve a ser el botón redondo con la X para cerrar */
.chat-widget.is-open .chat-widget__button--mascota { width: 58px; height: 58px; border-radius: 50%; background: var(--accent); box-shadow: 0 8px 20px rgba(0, 0, 0, .45); }
.chat-widget.is-open .chat-widget__button--mascota svg { width: 27px; height: 27px; }

.nico { --n-azul: #c2578c; --n-linea: #8c2f5e; }
.nico__sombra { fill: rgba(0, 0, 0, .35); }
.nico__cuerpo { fill: url(#nico-cuerpo); stroke: var(--n-linea); stroke-width: 2.5; }
.nico__cola { fill: #f2a0c6; stroke: var(--n-linea); stroke-width: 2.5; stroke-linejoin: round; }
.nico__brillo { fill: #fff; opacity: .45; }
.nico__brazo { fill: #f2a0c6; stroke: var(--n-linea); stroke-width: 2.5; }
.nico__pierna rect, .nico__pierna ellipse { fill: var(--n-azul); stroke: var(--n-linea); stroke-width: 2.5; }
.nico__ojos ellipse { fill: var(--n-linea); }
.nico__glint { fill: #fff; }
.nico__mejilla { fill: #ff9fb8; opacity: .7; }
.nico__boca { fill: none; stroke: var(--n-linea); stroke-width: 3; stroke-linecap: round; }
.nico__boca-feliz { fill: var(--n-linea); display: none; }
.nico__dormido { display: none; fill: none; stroke: var(--n-linea); stroke-width: 3; stroke-linecap: round; }
.nico__estrella { fill: #fff; opacity: .9; }
.nico__zzz { display: none; fill: #fff; font: 700 14px/1 system-ui, sans-serif; paint-order: stroke; stroke: var(--n-linea); stroke-width: 3px; }

/* Piezas que giran sobre su propio centro */
.nico__ojo, .nico__ojos, .nico__respira, .nico__salto, .nico__brazo-saluda, .nico__pierna, .nico__estrella, .nico__cara { transform-box: fill-box; }
.nico__ojo { transform-origin: center; transition: transform .12s ease-out; }
.nico__respira { transform-origin: 50% 100%; }
.nico__brazo-saluda { transform-origin: 50% 20%; }
.nico__pierna { transform-origin: 50% 0; }
.nico__salto { transform-origin: 50% 100%; }
.nico__estrella { transform-origin: center; }

/* Contento / saludando: boca abierta */
.nico-feliz .nico__boca, .nico-saluda .nico__boca, .nico-salta .nico__boca { display: none; }
.nico-feliz .nico__boca-feliz, .nico-saluda .nico__boca-feliz, .nico-salta .nico__boca-feliz { display: block; }
/* Dormido: ojos cerrados y "zzz" */
.nico-dormido .nico__ojos, .nico-dormido .nico__boca-feliz { display: none; }
.nico-dormido .nico__dormido, .nico-dormido .nico__zzz { display: block; }
.nico-dormido .nico__boca { display: block; transform: translateY(2px); }

@media (prefers-reduced-motion: no-preference) {
  .nico__respira { animation: nico-respira 3.2s ease-in-out infinite; }
  .nico__ojos { animation: nico-parpadeo 4.6s infinite; transform-origin: 50% 50%; }
  .nico__estrella { animation: nico-brilla 2.8s ease-in-out infinite; }
  .nico-dormido .nico__respira { animation-duration: 5s; }
  .nico-dormido .nico__zzz text { animation: nico-zzz 2.8s ease-in-out infinite; }
  .nico-dormido .nico__zzz text:nth-child(2) { animation-delay: 1.1s; }

  /* Entrada: camina desde el borde derecho moviendo las piernas */
  .nico-entra .chat-widget__button--mascota { animation: nico-camina 2.3s cubic-bezier(.3, .6, .4, 1) both; }
  .nico-entra .nico__pierna--i { animation: nico-paso .38s ease-in-out infinite; }
  .nico-entra .nico__pierna--d { animation: nico-paso .38s ease-in-out infinite reverse; }
  .nico-entra .nico__respira { animation: nico-bote .38s ease-in-out infinite; }
  /* Saluda con la mano */
  .nico-saluda .nico__brazo-saluda { animation: nico-saludo .5s ease-in-out 5; }
  /* Contento: pequeño brinco */
  .nico-feliz .nico__salto { animation: nico-brinco .5s ease-out; }
  /* Cita confirmada: salta varias veces con los brazos arriba */
  .nico-salta .nico__salto { animation: nico-brinco .55s ease-out 4; }
  .nico-salta .nico__brazo-saluda { animation: nico-saludo .3s ease-in-out 7; }
  .chat-widget.is-pulsing:not(.is-open) .chat-widget__button--mascota { animation: none; }
  .chat-widget.is-pulsing:not(.is-open) .chat-widget__button--mascota::before,
  .chat-widget.is-pulsing:not(.is-open) .chat-widget__button--mascota::after { display: none; }
}
@keyframes nico-respira { 0%, 100% { transform: scale(1, 1); } 50% { transform: scale(1.025, .965); } }
@keyframes nico-parpadeo { 0%, 92%, 100% { transform: scaleY(1); } 95% { transform: scaleY(.08); } }
@keyframes nico-brilla { 0%, 100% { transform: scale(.7) rotate(0); opacity: .4; } 50% { transform: scale(1.1) rotate(20deg); opacity: 1; } }
@keyframes nico-zzz { 0% { opacity: 0; transform: translate(0, 6px); } 40% { opacity: 1; } 100% { opacity: 0; transform: translate(4px, -10px); } }
@keyframes nico-camina { from { transform: translateX(calc(100vw - 40px)); } to { transform: translateX(0); } }
@keyframes nico-paso { 0%, 100% { transform: rotate(22deg); } 50% { transform: rotate(-22deg); } }
@keyframes nico-bote { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-3px); } }
@keyframes nico-saludo { 0%, 100% { transform: rotate(0); } 50% { transform: rotate(-38deg) translateY(-6px); } }
@keyframes nico-brinco { 0%, 100% { transform: translateY(0) scale(1, 1); } 30% { transform: translateY(-16px) scale(.96, 1.05); } 60% { transform: translateY(0) scale(1.05, .94); } }

/* ---------- Nico: globo de texto y paseo ---------- */
.nico-dice {
  position: relative; max-width: min(230px, calc(100vw - 40px)); margin-bottom: -6px;
  background: var(--surface); color: var(--ink); border: 1px solid var(--line); border-radius: 16px 16px 4px 16px;
  padding: 10px 14px; box-shadow: var(--shadow); font-size: .86rem; line-height: 1.35; font-weight: 600;
  transform-origin: 90% 100%;
}
@media (prefers-reduced-motion: no-preference) { .nico-dice { animation: nico-globo .28s cubic-bezier(.23, 1, .32, 1); } }
@keyframes nico-globo { from { opacity: 0; transform: scale(.6) translateY(8px); } to { opacity: 1; transform: none; } }
.chat-widget.is-open .nico-dice { display: none; }

/* Paseo: camina a la izquierda con su globo, se da la vuelta (la cola cambia de lado) y regresa */
@media (prefers-reduced-motion: no-preference) {
  .chat-widget.nico-pasea { animation: nico-paseo 6.4s ease-in-out both; }
  .nico-pasea .chat-widget__button--mascota { animation: nico-giro 6.4s steps(1, end) both; }
  .nico-pasea .nico__pierna--i { animation: nico-paso .42s ease-in-out infinite; }
  .nico-pasea .nico__pierna--d { animation: nico-paso .42s ease-in-out infinite reverse; }
  .nico-pasea .nico__respira { animation: nico-bote .42s ease-in-out infinite; }
}
@keyframes nico-paseo { 0% { transform: translateX(0); } 35%, 45% { transform: translateX(-110px); } 92%, 100% { transform: translateX(0); } }
@keyframes nico-giro { 0%, 40% { transform: scaleX(1); } 41%, 91% { transform: scaleX(-1); } 92%, 100% { transform: scaleX(1); } }

/* ---------- Nico muñeco en la cabecera del chat ---------- */
.chat-panel__avatar--nico, .chat-panel__avatar--nico:has(img) { width: 52px; height: 60px; margin: 6px 2px -2px 0; border-radius: 0; background: none; overflow: visible; }
.chat-panel__avatar--nico svg.nico { width: 100%; height: 100%; display: block; overflow: visible; }
/* Mientras responde, "trabaja": brinquitos y pierna en marcha */
@media (prefers-reduced-motion: no-preference) {
  .nico-escribe .chat-panel__avatar .nico__salto { animation: nico-brinco .7s ease-in-out infinite; }
  .nico-escribe .chat-panel__avatar .nico__brazo-saluda { animation: nico-saludo .35s ease-in-out infinite; }
}
.nico-escribe .chat-panel__avatar .nico__boca { display: none; }
.nico-escribe .chat-panel__avatar .nico__boca-feliz { display: block; }
.chat-panel__avatar .nico__cuerpo { fill: url(#nico-cuerpo-h); }
.chat-panel__avatar .nico__aura { fill: url(#nico-aura-h); }

/* ---------- Nico de Nácar: lazo y uñas del color del servicio, modo brillo al confirmar ---------- */
.nico__lazo, .nico__una { fill: var(--n-lazo, #ff5fa2); stroke: var(--n-linea); stroke-width: 2; stroke-linejoin: round; }
.nico__una { stroke-width: 1.4; }
.nico__brillos { display: none; fill: #ffd23f; }
.nico__aura { fill: url(#nico-aura); opacity: 0; pointer-events: none; }
.nico-super .nico__aura { opacity: 1; }
.nico-super .nico__brillos { display: block; }
.nico-super .nico__lazo, .nico-super .nico__una { fill: #f0c24b; }
.nico-super .nico__cuerpo { filter: drop-shadow(0 0 6px #ffb3d6); }
.nico__brillos path { transform-box: fill-box; transform-origin: center; }
@media (prefers-reduced-motion: no-preference) {
  .nico-cambia .nico__una, .nico-cambia .nico__lazo { animation: nico-pelo .65s cubic-bezier(.3, 1.6, .5, 1); transform-box: fill-box; transform-origin: center; }
  .nico-super .nico__aura { animation: nico-aura .7s ease-in-out infinite alternate; transform-box: fill-box; transform-origin: center; }
  .nico-super .nico__brillos path { animation: nico-brilla 1s ease-in-out infinite; }
  .nico-super .nico__brillos path:nth-child(2) { animation-delay: .25s; } .nico-super .nico__brillos path:nth-child(3) { animation-delay: .5s; } .nico-super .nico__brillos path:nth-child(4) { animation-delay: .75s; }
  .nico-super .nico__salto { animation: nico-brinco .55s ease-out 4; }
}
@keyframes nico-pelo { 0% { transform: scale(.2); opacity: 0; } 70% { transform: scale(1.3); opacity: 1; } 100% { transform: none; } }
@keyframes nico-aura { from { transform: scale(.92); opacity: .75; } to { transform: scale(1.1); opacity: 1; } }

/* Sellos de la tarjeta de fidelidad dentro de la cita */
.chat-sellos { display: block !important; margin-top: 6px; padding: 10px; border-radius: 12px; background: rgba(215,38,61,.12); text-align: center; }
.chat-sellos b { display: block; font-size: .82rem; margin-bottom: 8px; }
.chat-sellos ol { list-style: none; margin: 0 0 8px; padding: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; }
.chat-sellos li { aspect-ratio: 3 / 4; border-radius: 999px 999px 8px 8px; display: grid; place-items: center; font-size: .8rem; border: 1.5px dashed currentColor; opacity: .6; }
.chat-sellos li.regalo { border-style: solid; border-color: #d99a2b; opacity: 1; }
.chat-sellos li.on { border: 0; opacity: 1; color: #fff; background: linear-gradient(160deg, #ff7aa8, #ff3d8b 55%, #d6156a); }
.chat-sellos p { margin: 0; font-size: .8rem; font-weight: 600; }

/* Al cerrar el chat el foco vuelve al botón: sin el cuadro oscuro del navegador alrededor de Sofi.
   Con el teclado se ve un brillo rosado que sigue la forma del muñeco (o un aro redondo en el botón normal). */
.chat-widget__button:focus-visible { outline: none; }
.chat-widget__button:not(.chat-widget__button--mascota):focus-visible { box-shadow: 0 0 0 3px rgba(255, 255, 255, .9), 0 0 0 6px rgba(214, 21, 106, .55); }
.chat-widget__button--mascota:focus-visible svg.nico { filter: drop-shadow(0 0 5px rgba(255, 61, 139, .95)) drop-shadow(0 0 2px #fff); }
