/* ============================================================================
   QUECHIMBAPARCE by LevelBarber — sistema de diseño (vanilla, sin frameworks)
   Negro · Cian · Magenta — urbano, directo, premium. Un solo archivo,
   compartido por el sitio público y el panel admin.
   ============================================================================ */

:root {
  --black:      #07090C;
  --surface:    #12171C;
  --surface-2:  #1A2027;
  --surface-3:  #232A33;
  --border:     #262E37;
  --border-2:   #333D48;
  --white:      #FFFFFF;
  --text:       #FFFFFF;
  --text-2:     #A1A1AA;
  --text-3:     #6F6F76;

  /* Cian del logo: lo que se toca (botones, enlaces, foco). */
  --primary:    #16CFF2;
  --primary-2:  #6FE6FB;
  --primary-dk: #0E9FBE;
  --on-primary: #04161B;

  /* Magenta del logo: lo que debe saltar (precios, contador, progreso). */
  --accent:     #FF1F9E;
  --accent-2:   #FF6BBF;
  --accent-dk:  #C7157A;
  --on-accent:  #1A0410;

  --success:    #22C55E; --success-soft: rgba(34,197,94,.14);
  --danger:     #EF4444; --danger-soft:  rgba(239,68,68,.14);
  --warning:    #F59E0B; --warning-soft: rgba(245,158,11,.14);
  --info:       #38BDF8; --info-soft:    rgba(56,189,248,.14);

  --font: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --r-sm: 8px; --r-md: 12px; --r-lg: 18px; --r-xl: 24px; --r-pill: 999px;
  --sh-sm: 0 1px 3px rgba(0,0,0,.4);
  --sh-md: 0 6px 20px rgba(0,0,0,.35);
  --sh-lg: 0 16px 40px rgba(0,0,0,.45);
  --sh-primary: 0 8px 24px rgba(22,207,242,.26);
  --sh-accent:  0 8px 24px rgba(255,31,158,.26);
  --ease: cubic-bezier(.4,0,.2,1);
  --topbar-h: 66px;
  --sidebar-w: 232px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--black);
  color: var(--text);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4 { margin: 0; font-weight: 800; letter-spacing: -.02em; }
p { margin: 0; }
button { font-family: inherit; cursor: pointer; }
::selection { background: var(--primary); color: var(--on-primary); }

.wrap { max-width: 1160px; margin: 0 auto; padding: 0 20px; }
/* Una celda de grid o de flex no encoge por debajo de su contenido salvo que se
   le diga. Sin esto, un elemento ancho adentro (una tabla, una galería) empuja
   la página entera en vez de encogerse o hacer scroll por su cuenta. */
.grid > *, .kpi-grid > *, .grid-2f > * { min-width: 0; }
.section { padding: 56px 0; }
.section--tight { padding: 34px 0; }
.grid { display: grid; gap: 16px; }
.grid--2 { grid-template-columns: repeat(2, 1fr); }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 900px) { .grid--3, .grid--4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .grid--2, .grid--3, .grid--4 { grid-template-columns: 1fr; } }

.eyebrow { display: inline-flex; align-items: center; gap: 6px; font-weight: 800; font-size: 12.5px; letter-spacing: .06em; text-transform: uppercase; color: var(--primary); }
.h1 { font-size: clamp(30px, 5vw, 48px); line-height: 1.06; }
.h2 { font-size: clamp(24px, 3.4vw, 32px); line-height: 1.1; }
.sub { color: var(--text-2); font-size: 16px; margin-top: 10px; }
.muted { color: var(--text-2); }
.tiny { font-size: 12.5px; }

/* ---------- Botones ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 46px; padding: 0 22px; border-radius: var(--r-pill); border: 1px solid transparent;
  font-weight: 800; font-size: 14.5px; letter-spacing: .01em; transition: transform .15s var(--ease), background .15s var(--ease), box-shadow .15s var(--ease), opacity .15s;
  white-space: nowrap;
}
.btn:active { transform: scale(.97); }
.btn--primary { background: var(--primary); color: var(--on-primary); box-shadow: var(--sh-primary); }
.btn--primary:hover { background: var(--primary-2); }
.btn--dark { background: var(--white); color: var(--black); }
.btn--dark:hover { background: var(--text-2); }
.btn--ghost { background: transparent; border-color: var(--border-2); color: var(--text); }
.btn--ghost:hover { border-color: var(--primary); color: var(--primary); }
.btn--sm { height: 38px; padding: 0 16px; font-size: 13.5px; }
.btn--lg { height: 54px; padding: 0 30px; font-size: 16px; }
.btn--block { width: 100%; }
.btn[disabled] { opacity: .45; pointer-events: none; }
.btn--icon { width: 40px; height: 40px; padding: 0; border-radius: var(--r-pill); }

/* ---------- Tarjetas / superficies ---------- */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); }
.card--pad { padding: 22px; }
.panel { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-xl); }

/* ---------- Campos de formulario ---------- */
.field { display: flex; flex-direction: column; gap: 7px; margin-bottom: 16px; }
.field label { font-size: 13px; font-weight: 700; color: var(--text-2); }
.input, select.input, textarea.input {
  background: var(--surface-2); border: 1px solid var(--border-2); color: var(--text);
  border-radius: var(--r-md); height: 46px; padding: 0 14px; font-size: 14.5px; font-family: inherit;
  transition: border-color .15s var(--ease);
}
textarea.input { height: auto; padding: 12px 14px; resize: vertical; min-height: 96px; }
.input:focus { outline: none; border-color: var(--primary); }
.input::placeholder { color: var(--text-3); }
.field__hint { font-size: 12px; color: var(--text-3); }
.field__err { font-size: 12.5px; color: var(--danger); display: none; }
.field.has-err .input { border-color: var(--danger); }
.field.has-err .field__err { display: block; }

/* ---------- Badges / estados ---------- */
.badge { display: inline-flex; align-items: center; gap: 5px; padding: 4px 11px; border-radius: var(--r-pill); font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .03em; }
.badge--activa { background: var(--success-soft); color: var(--success); }
.badge--agotada { background: var(--danger-soft); color: var(--danger); }
.badge--finalizada { background: rgba(255,255,255,.1); color: var(--text-2); }
.badge--cancelada { background: rgba(255,255,255,.06); color: var(--text-3); }
.badge--borrador { background: var(--warning-soft); color: var(--warning); }
.badge--proxima { background: rgba(22,207,242,.16); color: var(--primary); }
.badge--pill-accent { background: var(--accent); color: var(--on-accent); }

/* ---------- Barra de progreso (boletos vendidos) ---------- */
.prog { height: 10px; border-radius: var(--r-pill); background: var(--surface-3); overflow: hidden; }
.prog__bar { height: 100%; background: linear-gradient(90deg, var(--accent-dk), var(--accent)); border-radius: var(--r-pill); transition: width .4s var(--ease); }

/* ---------- Tablas (admin) ---------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--r-lg); }
table.table { width: 100%; border-collapse: collapse; font-size: 13.5px; min-width: 640px; }
table.table th { text-align: left; padding: 12px 14px; background: var(--surface-2); color: var(--text-2); font-weight: 700; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; border-bottom: 1px solid var(--border); white-space: nowrap; }
table.table td { padding: 12px 14px; border-bottom: 1px solid var(--border); vertical-align: middle; }
table.table tr:last-child td { border-bottom: none; }
table.table tr:hover td { background: rgba(255,255,255,.02); }

/* ---------- Toasts ---------- */
#chp-toasts { position: fixed; top: 18px; right: 18px; z-index: 999; display: flex; flex-direction: column; gap: 10px; max-width: 340px; }
.toast { background: var(--surface-3); border: 1px solid var(--border-2); border-left: 4px solid var(--primary); color: var(--text); padding: 13px 16px; border-radius: var(--r-md); box-shadow: var(--sh-lg); font-size: 13.5px; font-weight: 600; animation: chp-in .25s var(--ease); }
.toast--success { border-left-color: var(--success); }
.toast--error { border-left-color: var(--danger); }
.toast--warning { border-left-color: var(--warning); }
@keyframes chp-in { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: translateY(0); } }

/* ---------- Sitio público: header / footer ---------- */
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(11,11,13,.86); backdrop-filter: blur(10px); border-bottom: 1px solid var(--border); }
.site-header__row { height: var(--topbar-h); display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 900; font-size: 19px; letter-spacing: -.01em; }
.brand__mark { width: 34px; height: 34px; border-radius: 9px; background: var(--primary); color: var(--on-primary); display: grid; place-items: center; font-weight: 900; font-size: 15px; flex-shrink: 0; }
.brand small { display: block; font-size: 10px; font-weight: 700; color: var(--text-3); letter-spacing: .04em; text-transform: uppercase; }
.site-nav { display: flex; align-items: center; gap: 26px; }
.site-nav a { font-size: 14px; font-weight: 700; color: var(--text-2); transition: color .15s; }
.site-nav a:hover, .site-nav a.is-active { color: var(--primary); }
.site-header__actions { display: flex; align-items: center; gap: 10px; }
/* Botón de hamburguesa: oculto en escritorio, visible en pantalla angosta. */
.site-nav-toggle { display: none; width: 42px; height: 42px; flex-shrink: 0; border: 1px solid var(--border-2);
  background: var(--surface-2); border-radius: var(--r-md); padding: 0;
  flex-direction: column; align-items: center; justify-content: center; gap: 4px; cursor: pointer; }
.site-nav-toggle span { display: block; width: 18px; height: 2px; background: var(--text); border-radius: 2px;
  transition: transform .2s var(--ease), opacity .2s var(--ease); }
.site-nav-toggle.is-open span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.site-nav-toggle.is-open span:nth-child(2) { opacity: 0; }
.site-nav-toggle.is-open span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* Panel desplegable del teléfono. */
.site-menu { display: none; border-top: 1px solid var(--border); background: var(--black); padding: 14px 20px 20px; }
.site-menu__nav { display: flex; flex-direction: column; }
.site-menu__nav a { padding: 14px 4px; font-size: 16px; font-weight: 700; color: var(--text);
  border-bottom: 1px solid var(--border); }
.site-menu__nav a.is-active { color: var(--primary); }
.site-menu__actions { display: flex; gap: 10px; margin-top: 16px; }
.site-menu__actions .btn { flex: 1; justify-content: center; min-height: 46px; font-size: 15px; }
.site-menu__actions .sound-toggle { display: none; }
body.menu-abierto { overflow: hidden; }

@media (max-width: 860px) {
  .site-nav { display: none; }
  .site-nav-toggle { display: flex; }
  .site-menu:not([hidden]) { display: block; }
  /* En el teléfono los botones de cuenta viven en el menú, no en la barra:
     metidos ahí se salían de la pantalla en cualquier móvil. */
  .site-header__actions { display: none; }
  .site-header__row { gap: 10px; }
}

/* Teléfonos angostos: la marca se reduce para que quepa con el botón de menú. */
@media (max-width: 420px) {
  .brand { font-size: 16px; gap: 8px; min-width: 0; }
  .brand > span:last-child { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .brand__mark { width: 30px; height: 30px; font-size: 14px; }
  .brand small { font-size: 10.5px; }
  .wrap { padding: 0 16px; }
}

/* Nada de texto por debajo de 11px: en un teléfono no se lee. */
@media (max-width: 860px) {
  .tiny { font-size: 11.5px; }
  /* Objetivos táctiles: 44px es el mínimo cómodo para un dedo. */
  .btn { min-height: 44px; }
  .btn--sm { min-height: 38px; }
  .filter-chip { min-height: 42px; }
  /* En el pie los enlaces iban pegados y medían 16px de alto: imposible
     acertarles con el dedo. Se les da aire. */
  .footer-cols ul { gap: 2px; }
  .footer-cols ul a { display: inline-block; padding: 11px 0; font-size: 14.5px; }
  .footer-bottom { flex-direction: column; gap: 6px; text-align: left; }
}

/* Cuadrícula de la sección de texto (el bloque "Rifas en línea en Cúcuta…").
   Se desvanece arriba y abajo para que se funda con las secciones vecinas y
   enlace visualmente con el pie, que lleva la suya. */
.seccion-malla { position: relative; overflow: hidden; }
.seccion-malla__malla {
  position: absolute; inset: 0; pointer-events: none; z-index: 0;
  --m-paso: 29px; --m-fina: rgba(22,207,242,.11); --m-gruesa: rgba(22,207,242,.33);
  --m-punto: rgba(111,230,251,.5); --m-brillo: rgba(126,240,255,.4);
  -webkit-mask-image: linear-gradient(180deg, transparent, #000 28%, #000 72%, transparent);
          mask-image: linear-gradient(180deg, transparent, #000 28%, #000 72%, transparent);
  animation-duration: 44s;
}
.seccion-malla > .wrap { position: relative; z-index: 1; }
@media (max-width: 760px) { .seccion-malla__malla { --m-paso: 22px; } }
@media (prefers-reduced-motion: reduce) { .seccion-malla__malla { animation: none; } }

/* ---------- Pie de pagina ----------
   El pie es lo ultimo que ve alguien, asi que no puede sentirse como "donde
   se acabo la pagina": tiene que leerse como una banda con intencion. Tres
   decisiones lo sostienen:

     1. Las columnas van en REJILLA, no en flex con space-between. Con flex,
        cada columna ocupaba el ancho de su texto mas largo y los huecos
        quedaban distintos entre si: por eso se veia desarmado.
     2. Debajo del texto hay un velo oscuro que se desvanece hacia los bordes.
        La cuadricula sigue viva en los margenes pero no pasa por detras de
        las palabras, que es lo que hacia dificil leer los enlaces.
     3. El borde de arriba no es una linea gris plana sino un degradado que
        nace y muere en transparente, con los dos colores de la marca. Marca
        la costura sin cortar la pagina en dos. */
.site-footer {
  position: relative; overflow: hidden;
  padding: 54px 0 26px; margin-top: 64px; color: var(--text-2);
}
/* La costura superior. Va en ::before para no gastar el borde, que en algunos
   navegadores no admite degradado. */
.site-footer::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 1px; z-index: 3;
  background: linear-gradient(90deg,
    transparent, rgba(22,207,242,.6) 22%, rgba(255,46,158,.55) 62%, transparent);
}
/* El velo que le devuelve el contraste al texto. */
.site-footer::after {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  /* Dos capas: una vertical que cubre TODO el alto (por eso ya no se apaga
     a media bajada) y una radial que abre los bordes laterales para que la
     cuadricula siga asomando donde no hay texto. */
  /* Un tinte minimo para asentar el pie contra el resto de la pagina. La
     legibilidad ya no depende de esto: la resuelve el vidrio esmerilado. */
  background: linear-gradient(180deg, rgba(7,9,12,.12), rgba(7,9,12,.22));
}
/* Cuadrícula propia del pie: igual que la del resto del sitio pero un 15% más
   intensa, para que el pie se lea como una banda y no como un vacío. Va detrás
   del contenido y no intercepta clics, así que los enlaces siguen funcionando. */
.site-footer__malla {
  position: absolute; inset: -40px 0 0; pointer-events: none; z-index: 0;
  --m-paso: 29px; --m-fina: rgba(22,207,242,.15); --m-gruesa: rgba(22,207,242,.44);
  --m-punto: rgba(111,230,251,.66); --m-brillo: rgba(126,240,255,.5);
  -webkit-mask-image: linear-gradient(180deg, transparent, #000 30%, #000 100%);
          mask-image: linear-gradient(180deg, transparent, #000 30%, #000 100%);
  animation-duration: 46s;
}
.site-footer > .wrap { position: relative; z-index: 2; }
@media (max-width: 760px) { .site-footer__malla { --m-paso: 22px; } }
@media (prefers-reduced-motion: reduce) { .site-footer__malla { animation: none; } }
.site-footer { --pie-texto: #D6D9E0; --pie-suave: #A9AEBA; }
.site-footer a { color: var(--pie-texto); }
.footer-marca p, .footer-bottom { color: var(--pie-suave); }
.site-footer a:hover { color: var(--primary); }
/* La marca ocupa mas porque lleva parrafo; las tres listas reparten el resto
   por igual. minmax(0,1fr) y no 1fr: sin eso una palabra larga ensancha su
   columna y desarma la fila entera. */
/* ---------- Vidrio esmerilado sobre la cuadricula ----------
   El problema de siempre: o se ve el fondo o se lee el texto. La salida no es
   tapar ni aclarar, es DESENFOCAR lo que queda justo detras de las palabras.

   backdrop-filter desenfoca lo que ya esta pintado debajo del elemento. La
   cuadricula se sigue viendo entera —las lineas, los cruces, el barrido de
   luz pasando— pero difuminada, asi que deja de competir con las letras por
   la atencion del ojo. Es el mismo recurso de las barras de iOS o de macOS.

   Va con @supports porque en un navegador viejo backdrop-filter no hace nada
   y el texto quedaria sobre la cuadricula a pelo: ahi, en vez de vidrio, se
   usa un fondo solido discreto. */
.vidrio-malla {
  position: relative; z-index: 2;
  border-radius: 20px;
  padding: 30px 26px;
  background: rgba(9, 12, 17, .58);
  border: 1px solid rgba(255,255,255,.06);
  box-shadow: 0 18px 44px rgba(0,0,0,.34);
}
@supports ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) {
  .vidrio-malla {
    background: rgba(9, 12, 17, .3);
    -webkit-backdrop-filter: blur(14px) saturate(1.25);
            backdrop-filter: blur(14px) saturate(1.25);
  }
}
@media (max-width: 760px) {
  .vidrio-malla { border-radius: 16px; padding: 22px 16px; }
}

/* ---------- Texto sobre la cuadricula ----------
   Leer sobre un fondo con dibujo no se arregla apagando el fondo: se arregla
   dandole a las letras su propio contorno. Tres sombras apiladas:

     · una muy pegada (1px) que define el filo de cada letra
     · una media (3px) que la despega del fondo
     · una abierta (8px) que oscurece el area inmediata, como un halo

   Cuesta cero en rendimiento, no cambia el color del texto, y la cuadricula
   se sigue viendo entera por detras. Es lo mismo que hacen los subtitulos de
   cualquier pelicula sobre una imagen cualquiera. */
.texto-sobre-malla, .site-footer .wrap, .seccion-malla .wrap {
  text-shadow:
    0 1px 1px rgba(3,5,8,.75),
    0 0 4px rgba(3,5,8,.5);
}
/* El logo y los adornos de color no llevan halo: ahi se veria como suciedad. */
.site-footer .brand__mark, .site-footer h4::after { text-shadow: none; }

.footer-cols {
  display: grid;
  grid-template-columns: 1.5fr repeat(3, minmax(0, 1fr));
  gap: 34px 28px;
  align-items: start;
}
.footer-cols h4 {
  color: var(--text); font-size: 12px; font-weight: 800;
  text-transform: uppercase; letter-spacing: .09em; margin: 0 0 14px;
  position: relative; padding-bottom: 9px;
}
/* Un subrayado corto bajo cada titulo: ancla la columna y da ritmo. */
.footer-cols h4::after {
  content: ''; position: absolute; left: 0; bottom: 0; width: 22px; height: 2px;
  border-radius: 2px; background: linear-gradient(90deg, var(--primary), var(--accent));
}
.footer-cols ul {
  list-style: none; margin: 0; padding: 0;
  display: flex; flex-direction: column; gap: 10px; font-size: 13.5px;
}
/* El enlace se gana su subrayado al pasar por encima, creciendo desde la
   izquierda, y se corre un pelo: se nota que es tocable sin gritar. */
.footer-cols ul a {
  position: relative; display: inline-block;
  transition: color .18s var(--ease), transform .18s var(--ease);
}
.footer-cols ul a::after {
  content: ''; position: absolute; left: 0; bottom: -2px; height: 1px; width: 100%;
  background: currentColor; transform: scaleX(0); transform-origin: 0 50%;
  transition: transform .22s var(--ease);
}
.footer-cols ul a:hover { transform: translateX(3px); }
.footer-cols ul a:hover::after { transform: scaleX(1); }

.footer-marca { max-width: 290px; }
.footer-marca p { margin: 10px 0 0; line-height: 1.6; }

.footer-bottom {
  margin-top: 38px; padding-top: 20px; font-size: 12.5px;
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px;
  border-top: 1px solid rgba(255,255,255,.07);
}

/* Dos columnas en el telefono: con tres, "Preguntas frecuentes" y "Terminos y
   condiciones" se partian en dos lineas cada uno y la lista perdia el ritmo.
   La marca cruza el ancho entero. Este bloque va aqui, despues de la rejilla
   de escritorio: si estuviera mas arriba en el archivo no haria nada, porque
   a igual peso gana la ultima regla. */
@media (max-width: 760px) {
  .footer-cols { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px 20px; }
  .footer-marca { grid-column: 1 / -1; max-width: none; }
  .site-footer { padding: 42px 0 22px; margin-top: 48px; }
  .footer-cols ul a { font-size: 15px; font-weight: 500; }
  .footer-marca p { font-size: 13.5px; }
  .footer-bottom { font-size: 12.5px; }
}
/* Por debajo de 360px (iPhone SE y parecidos) ni siquiera dos columnas caben
   sin partir palabras: ahi se apila todo. */
@media (max-width: 359px) {
  .footer-cols { grid-template-columns: 1fr; gap: 20px; }
}

/* ---------- Hero ---------- */
.hero { position: relative; padding: 64px 0 50px; overflow: hidden; }
.hero::before { content: ''; position: absolute; inset: -40% -10% auto -10%; height: 120%; background: radial-gradient(60% 60% at 50% 0%, rgba(22,207,242,.14), transparent 70%); pointer-events: none; }

/* ---------- Fondo animado del hero ----------
   Dos manchas de color que se desplazan muy despacio. Es CSS puro: no hay
   JavaScript ni canvas corriendo, así que no consume batería en el celular.
   Se anima solo 'transform', que la tarjeta gráfica mueve sin repintar nada. */
.hero__aurora { position: absolute; inset: 0; overflow: hidden; pointer-events: none; z-index: 0; }
.hero__aurora i {
  position: absolute; display: block; border-radius: 50%;
  filter: blur(70px); opacity: .5;
  will-change: transform;
}
.hero__aurora i:nth-child(1) {
  width: 46vw; height: 46vw; max-width: 560px; max-height: 560px;
  left: -8%; top: -18%;
  background: radial-gradient(circle, rgba(22,207,242,.55), transparent 68%);
  animation: aurora-a 26s ease-in-out infinite alternate;
}
.hero__aurora i:nth-child(2) {
  width: 40vw; height: 40vw; max-width: 500px; max-height: 500px;
  right: -10%; top: 6%;
  background: radial-gradient(circle, rgba(255,31,158,.42), transparent 68%);
  animation: aurora-b 32s ease-in-out infinite alternate;
}
.hero__aurora i:nth-child(3) {
  width: 34vw; height: 34vw; max-width: 420px; max-height: 420px;
  left: 42%; bottom: -28%;
  background: radial-gradient(circle, rgba(111,230,251,.30), transparent 70%);
  animation: aurora-c 38s ease-in-out infinite alternate;
}
@keyframes aurora-a { from { transform: translate3d(0,0,0) scale(1); } to { transform: translate3d(14vw,8vh,0) scale(1.18); } }
@keyframes aurora-b { from { transform: translate3d(0,0,0) scale(1.1); } to { transform: translate3d(-12vw,12vh,0) scale(.92); } }
@keyframes aurora-c { from { transform: translate3d(0,0,0) scale(.95); } to { transform: translate3d(-9vw,-10vh,0) scale(1.2); } }

/* ---- Capa 2: cuadrícula ----
   Una malla finísima que se desvanece hacia los bordes. No se "ve" como
   cuadrícula: lo que hace es dar sensación de profundidad detrás de las
   manchas, para que el fondo no sea una mancha plana. Se mueve muy despacio. */
/* ============================================================================
   MALLA — el sistema de cuadrícula del fondo
   ----------------------------------------------------------------------------
   En vez de una rejilla plana de líneas todas iguales, se dibujan tres capas
   que juntas dan sensación de plano técnico y de profundidad:

     1. líneas finas    — cada celda, muy tenues (la textura)
     2. líneas gruesas  — cada 4 celdas, más marcadas (la estructura)
     3. puntos          — en los cruces fuertes (el detalle que se nota de cerca)

   Encima pasa un barrido de luz muy lento en diagonal que enciende las líneas
   a su paso: es lo que hace que el fondo parezca vivo en vez de un estampado.

   Cada sitio donde se usa define su propia intensidad con estas variables:
     --m-paso    tamaño de la celda pequeña
     --m-fina    color de las líneas finas
     --m-gruesa  color de las líneas gruesas
     --m-punto   color de los puntos de cruce
     --m-brillo  color del barrido de luz
   ========================================================================== */
.hero__malla, .fondo-vivo__malla, .seccion-malla__malla, .site-footer__malla {
  background-image:
    radial-gradient(circle at 50% 50%, var(--m-punto) 1.1px, transparent 1.6px),
    linear-gradient(to right,  var(--m-gruesa) 1px, transparent 1px),
    linear-gradient(to bottom, var(--m-gruesa) 1px, transparent 1px),
    linear-gradient(to right,  var(--m-fina) 1px, transparent 1px),
    linear-gradient(to bottom, var(--m-fina) 1px, transparent 1px);
  background-size:
    calc(var(--m-paso) * 4) calc(var(--m-paso) * 4),
    calc(var(--m-paso) * 4) calc(var(--m-paso) * 4),
    calc(var(--m-paso) * 4) calc(var(--m-paso) * 4),
    var(--m-paso) var(--m-paso),
    var(--m-paso) var(--m-paso);
  animation-name: malla-deriva;
  animation-timing-function: linear;
  animation-iteration-count: infinite;
  will-change: transform;
}
/* El barrido: la misma cuadrícula, pero solo visible dentro de una banda de luz
   que cruza en diagonal. Al no repintar nada (solo se mueve una máscara), es
   barato incluso en teléfonos. */
.hero__malla::after, .fondo-vivo__malla::after,
.seccion-malla__malla::after, .site-footer__malla::after {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background-image:
    linear-gradient(to right,  var(--m-brillo) 1px, transparent 1px),
    linear-gradient(to bottom, var(--m-brillo) 1px, transparent 1px);
  background-size:
    calc(var(--m-paso) * 4) calc(var(--m-paso) * 4),
    calc(var(--m-paso) * 4) calc(var(--m-paso) * 4);
  -webkit-mask-image: linear-gradient(115deg, transparent 38%, #000 50%, transparent 62%);
          mask-image: linear-gradient(115deg, transparent 38%, #000 50%, transparent 62%);
  -webkit-mask-size: 260% 260%; mask-size: 260% 260%;
  -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat;
  animation: malla-barrido 9s linear infinite;
}
.hero__malla::after          { animation-duration: 8s;  animation-delay: 1s; }
.fondo-vivo__malla::after    { animation-duration: 11s; animation-delay: 2s; }
.seccion-malla__malla::after { animation-duration: 10s; animation-delay: 3s; }
.site-footer__malla::after   { animation-duration: 12s; }

@keyframes malla-deriva {
  from { transform: translate3d(0, 0, 0); }
  to   { transform: translate3d(calc(var(--m-paso) * -4), calc(var(--m-paso) * -4), 0); }
}
@keyframes malla-barrido {
  from { -webkit-mask-position: 150% -50%; mask-position: 150% -50%; }
  to   { -webkit-mask-position: -50% 150%; mask-position: -50% 150%; }
}
@media (prefers-reduced-motion: reduce) {
  .hero__malla, .fondo-vivo__malla, .seccion-malla__malla, .site-footer__malla,
  .hero__malla::after, .fondo-vivo__malla::after,
  .seccion-malla__malla::after, .site-footer__malla::after { animation: none; }
  .hero__malla::after, .fondo-vivo__malla::after,
  .seccion-malla__malla::after, .site-footer__malla::after { opacity: 0; }
}

.hero__malla {
  position: absolute; inset: -60px; pointer-events: none; z-index: 0;
  --m-paso: 27px; --m-fina: rgba(22,207,242,.14); --m-gruesa: rgba(22,207,242,.4);
  --m-punto: rgba(111,230,251,.62); --m-brillo: rgba(126,240,255,.5);
  /* El desvanecido evita el corte seco contra el borde de la sección. */
  -webkit-mask-image: radial-gradient(70% 60% at 50% 45%, #000 30%, transparent 78%);
          mask-image: radial-gradient(70% 60% at 50% 45%, #000 30%, transparent 78%);
  animation-duration: 34s;
}
@keyframes malla-corre {
  from { transform: translate3d(0, 0, 0); }
  to   { transform: translate3d(-54px, -54px, 0); }
}

/* ---- Capa 3: partículas ----
   Puntitos que suben flotando, como burbujas lentas. Son pocos a propósito:
   con muchos pasa de ambiente a ruido, y además cuesta batería. */
.hero__chispas { position: absolute; inset: 0; overflow: hidden; pointer-events: none; z-index: 0; }
.hero__chispas i {
  position: absolute; bottom: -10px; width: 8px; height: 8px; border-radius: 50%;
  background: var(--primary); opacity: 0;
  box-shadow: 0 0 10px 2px rgba(22,207,242,.5);
  animation: chispa-sube linear infinite;
  will-change: transform, opacity;
}
.hero__chispas i:nth-child(even) {
  background: var(--accent); width: 6px; height: 6px;
  box-shadow: 0 0 9px 2px rgba(255,31,158,.45);
}
/* Una de cada tres va más grande: el tamaño desigual se lee como profundidad,
   como si unas estuvieran más cerca que otras. */
.hero__chispas i:nth-child(3n) { width: 11px; height: 11px; opacity: .85; }
@keyframes chispa-sube {
  0%   { opacity: 0;  transform: translate3d(0, 0, 0) scale(.6); }
  12%  { opacity: .85; }
  80%  { opacity: .5; }
  100% { opacity: 0;  transform: translate3d(14px, -340px, 0) scale(1.25); }
}

/* ---- Capa 4: cuadritos que se encienden ----
   Celdas sueltas de la cuadrícula que prenden y apagan, como luces de un
   tablero. Van en posiciones y tiempos fijos (no al azar en cada carga) para
   que el efecto se vea compuesto y no como estática de televisor. */
.hero__cuadros { position: absolute; inset: 0; pointer-events: none; z-index: 0; overflow: hidden; }
.hero__cuadros i {
  position: absolute; display: block; width: 54px; height: 54px;
  /* Sin relleno: lo que se enciende es la línea, no el cuadro. */
  background: none;
  border: 1px solid rgba(22,207,242,.75);
  box-shadow: 0 0 9px rgba(22,207,242,.4), inset 0 0 7px rgba(22,207,242,.18);
  opacity: 0;
  animation: cuadro-prende 5.5s ease-in-out infinite;
  will-change: opacity;
}
.hero__cuadros i:nth-child(even) {
  border-color: rgba(255,31,158,.7);
  box-shadow: 0 0 9px rgba(255,31,158,.36), inset 0 0 7px rgba(255,31,158,.15);
}
@keyframes cuadro-prende {
  0%, 52%, 100% { opacity: 0; }
  58%           { opacity: .85; }
  66%           { opacity: .25; }
  74%           { opacity: .75; }
  84%           { opacity: .45; }
  94%           { opacity: .08; }
}

@media (max-width: 760px) {
  .hero__cuadros i { width: 42px; height: 42px; }
  /* Menos cuadritos en el teléfono: en pantalla chica llenan demasiado. */
  .hero__cuadros i:nth-child(n+7) { display: none; }
}

/* En pantallas chicas se baja el desenfoque: es el efecto que más cuesta. */
@media (max-width: 760px) {
  .hero__aurora i { filter: blur(48px); opacity: .42; }
  .hero__malla { --m-paso: 21px; opacity: .78; }
  /* Menos de la mitad de las partículas: el teléfono lo agradece. */
  .hero__chispas i:nth-child(n+8) { display: none; }
}

/* Quien pidió menos movimiento en su sistema ve las manchas quietas.
   Es una preferencia de accesibilidad real: hay gente a la que el movimiento
   de fondo le produce mareo. */
@media (prefers-reduced-motion: reduce) {
  .hero__aurora i:nth-child(1),
  .hero__aurora i:nth-child(2),
  .hero__aurora i:nth-child(3) { animation: none; }
  .hero__malla { animation: none; }
  /* Las partículas y los cuadritos se quitan: quietos serían manchas sueltas
     sin sentido, y el parpadeo es justo lo que molesta a quien pidió calma. */
  .hero__chispas, .hero__cuadros { display: none; }
}
/* ---------- Logo de la portada ----------
   Reemplaza al renglon de texto que iba encima del titular. Se sirve al doble
   del tamano maximo en pantalla para que no se vea borroso en pantallas de
   telefono, y lleva width/height en el HTML: asi el navegador reserva su
   hueco antes de descargarlo y el titular no pega un salto al cargar. */
.hero__logo {
  display: block; width: min(430px, 76vw); height: auto;
  margin: 0 auto 22px;
  /* Dos sombras: una cerrada que lo despega del fondo y una abierta en cian
     que lo hace sentir encendido, como un letrero. */
  filter: drop-shadow(0 6px 14px rgba(0,0,0,.55))
          drop-shadow(0 0 26px rgba(22,207,242,.28));
  animation: logo-late 5.5s ease-in-out infinite;
}
/* Un latido muy leve del halo. No se mira, se siente. */
@keyframes logo-late {
  0%, 100% { filter: drop-shadow(0 6px 14px rgba(0,0,0,.55)) drop-shadow(0 0 22px rgba(22,207,242,.22)); }
  50%      { filter: drop-shadow(0 6px 14px rgba(0,0,0,.55)) drop-shadow(0 0 34px rgba(22,207,242,.38)); }
}
@media (max-width: 760px) { .hero__logo { width: min(320px, 82vw); margin-bottom: 16px; } }
@media (prefers-reduced-motion: reduce) { .hero__logo { animation: none; } }

.hero__content { position: relative; text-align: center; max-width: 720px; margin: 0 auto; }
.hero__tag { margin-bottom: 16px; }
.hero__cta { display: flex; gap: 12px; justify-content: center; margin-top: 26px; flex-wrap: wrap; }

/* ---------- Tarjeta de rifa ---------- */
.rifa-card { position: relative; display: flex; flex-direction: column; overflow: hidden; transition: transform .18s var(--ease), border-color .18s; }
.rifa-card:hover { transform: translateY(-3px); border-color: var(--border-2); }
.rifa-card__img { aspect-ratio: 16/10; background: var(--surface-2) center/cover no-repeat; position: relative; }
.rifa-card__badge { position: absolute; top: 12px; left: 12px; }
.rifa-card__body { padding: 18px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.rifa-card__price { font-size: 22px; font-weight: 900; color: var(--accent); }
.rifa-card__meta { display: flex; justify-content: space-between; font-size: 12.5px; color: var(--text-2); }
/* El CTA de la tarjeta es un <span>, no un <a>: la tarjeta entera ya es un enlace
   y anidar enlaces es HTML inválido. Visualmente se comporta igual. */
.rifa-card__cta { display: block; margin-top: auto; padding: 11px 16px; border-radius: var(--r-md);
  background: var(--primary); color: var(--on-primary); font-weight: 800; font-size: 14px;
  text-align: center; transition: filter .18s var(--ease); }
.rifa-card:hover .rifa-card__cta { filter: brightness(1.08); }
.rifa-card__cta--soft { background: var(--surface-2); color: var(--text-2); }
/* Botón de compartir sobre la foto de la tarjeta. */
.rifa-card__share { position: absolute; top: 10px; right: 10px; z-index: 2;
  width: 40px; height: 40px; border-radius: 50%; border: none; cursor: pointer;
  background: rgba(0,0,0,.55); backdrop-filter: blur(6px); color: #fff;
  display: grid; place-items: center; transition: background .15s, transform .15s var(--ease); }
.rifa-card__share:hover { background: #25D366; transform: scale(1.07); }
.rifa-card__share svg { width: 19px; height: 19px; }

/* Botón grande de WhatsApp (color oficial de la marca, no el de la paleta). */
.btn--wa { background: #25D366; color: #062312; font-weight: 800; border: none; }
.btn--wa:hover { background: #1FBE5A; }
.btn--wa svg { width: 19px; height: 19px; margin-right: 8px; }
.rifa-card--proxima .rifa-card__img { filter: saturate(.75); }
.rifa-card__pronto { font-size: 13.5px; color: var(--text-2); font-weight: 600; }

/* ---------- Stepper de compra ---------- */
.qty-stepper { display: flex; align-items: center; gap: 14px; }
.qty-stepper button { width: 42px; height: 42px; border-radius: var(--r-pill); border: 1px solid var(--border-2); background: var(--surface-2); color: var(--text); font-size: 20px; font-weight: 800; display: grid; place-items: center; }
.qty-stepper button:hover { border-color: var(--primary); color: var(--primary); }
.qty-stepper input { width: 70px; text-align: center; background: transparent; border: none; color: var(--text); font-size: 22px; font-weight: 900; }
.qty-chips { display: flex; gap: 8px; flex-wrap: wrap; margin: 14px 0; }
.qty-chip { padding: 9px 16px; border-radius: var(--r-pill); border: 1px solid var(--border-2); background: var(--surface-2); font-weight: 800; font-size: 13.5px; }
.qty-chip.is-active { background: var(--primary); color: var(--on-primary); border-color: var(--primary); }

/* ---------- Utilidades ---------- */
.row { display: flex; align-items: center; }
.between { justify-content: space-between; }
.gap-8 { gap: 8px; } .gap-12 { gap: 12px; } .gap-16 { gap: 16px; }
.mt-8 { margin-top: 8px; } .mt-16 { margin-top: 16px; } .mt-24 { margin-top: 24px; } .mt-32 { margin-top: 32px; }
.center { text-align: center; }
.divider { height: 1px; background: var(--border); margin: 20px 0; border: none; }
.skel { background: linear-gradient(90deg, var(--surface-2) 25%, var(--surface-3) 37%, var(--surface-2) 63%); background-size: 400% 100%; animation: chp-skel 1.4s ease infinite; border-radius: var(--r-md); }
@keyframes chp-skel { 0% { background-position: 100% 50%; } 100% { background-position: 0 50%; } }
.empty { text-align: center; padding: 50px 20px; color: var(--text-2); }

/* ---------- Panel admin: sidebar + topbar ---------- */
.admin-shell { display: flex; min-height: 100vh; }
.admin-sidebar { width: var(--sidebar-w); flex-shrink: 0; background: var(--surface); border-right: 1px solid var(--border); padding: 18px 12px; display: flex; flex-direction: column; gap: 4px; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.admin-sidebar .brand { padding: 6px 10px 20px; }
.admin-nav__link { display: flex; align-items: center; gap: 11px; padding: 10px 12px; border-radius: var(--r-md); color: var(--text-2); font-weight: 700; font-size: 13.5px; }
.admin-nav__link:hover { background: var(--surface-2); color: var(--text); }
.admin-nav__link.is-active { background: var(--primary); color: var(--on-primary); }
.admin-nav__link svg { width: 18px; height: 18px; flex-shrink: 0; }
.admin-nav__label { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--text-3); font-weight: 800; padding: 16px 12px 6px; }
.admin-main { flex: 1; min-width: 0; }
.admin-topbar { height: var(--topbar-h); border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; padding: 0 24px; position: sticky; top: 0; background: rgba(11,11,13,.9); backdrop-filter: blur(8px); z-index: 20; }
.admin-content { padding: 28px 24px 60px; max-width: 1200px; }
.admin-page__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 22px; flex-wrap: wrap; }
.kpi-card { padding: 18px; }
.kpi-card__label { font-size: 12px; color: var(--text-2); font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }
.kpi-card__value { font-size: 28px; font-weight: 900; margin-top: 6px; }
.avatar { width: 34px; height: 34px; border-radius: var(--r-pill); background: var(--primary); color: var(--on-primary); display: grid; place-items: center; font-weight: 800; font-size: 13px; }

/* ---------- Modal / drawer sencillo ---------- */
.modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,.6); display: none; align-items: center; justify-content: center; z-index: 200; padding: 20px; }
.modal-overlay.is-open { display: flex; }
.modal { background: var(--surface); border: 1px solid var(--border-2); border-radius: var(--r-xl); width: 100%; max-width: 560px; max-height: 88vh; overflow-y: auto; padding: 26px; box-shadow: var(--sh-lg); }
.modal__head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 18px; }
.modal__close { background: var(--surface-2); border: none; color: var(--text-2); width: 32px; height: 32px; border-radius: var(--r-pill); font-size: 16px; }

@media (max-width: 760px) {
  .admin-sidebar { position: fixed; left: -260px; top: 0; z-index: 100; transition: left .2s var(--ease); box-shadow: var(--sh-lg); }
  .admin-sidebar.is-open { left: 0; }
  .admin-content { padding: 20px 16px 50px; }
  .table-wrap { max-width: 100%; }
}

/* Teléfonos angostos: dos tarjetas de cifra no caben. */
@media (max-width: 560px) {
  .kpi-grid { grid-template-columns: 1fr; }
}

/* ============================================================================
   ANIMACIONES, VIDEO, GALERÍA, CONTADOR, WHATSAPP Y COMPARTIR
   Agregado en la 3ª iteración (video + fotos + efectos).
   ============================================================================ */

/* ---------- Reveal al hacer scroll ---------- */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s var(--ease), transform .6s var(--ease); }
.reveal.is-in { opacity: 1; transform: none; }
.reveal--d1 { transition-delay: .08s; }
.reveal--d2 { transition-delay: .16s; }
.reveal--d3 { transition-delay: .24s; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  * { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}

/* Brillo que recorre el botón principal */
.btn--primary { position: relative; overflow: hidden; }
.btn--primary::after {
  content: ''; position: absolute; top: 0; left: -120%; width: 60%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.45), transparent);
  transform: skewX(-20deg); animation: chp-shine 3.6s ease-in-out infinite;
}
@keyframes chp-shine { 0%, 65% { left: -120%; } 100% { left: 140%; } }

/* Pulso suave para llamar la atención */
@keyframes chp-pulse { 0%,100% { transform: scale(1); } 50% { transform: scale(1.045); } }
.pulse { animation: chp-pulse 2.2s var(--ease) infinite; }

/* ---------- Video del premio ---------- */
.media-box { position: relative; border-radius: var(--r-xl); overflow: hidden; border: 1px solid var(--border); background: #000; }
.media-box video, .media-box iframe { display: block; width: 100%; aspect-ratio: 16/9; border: 0; object-fit: cover; background: #000; }
.media-tabs { display: flex; gap: 8px; margin-bottom: 12px; }
.media-tab { padding: 8px 16px; border-radius: var(--r-pill); border: 1px solid var(--border-2); background: var(--surface-2); color: var(--text-2); font-weight: 800; font-size: 13px; display: inline-flex; align-items: center; gap: 6px; }
.media-tab.is-active { background: var(--primary); color: var(--on-primary); border-color: var(--primary); }
.media-tab svg { width: 15px; height: 15px; }

/* ---------- Galería / carrusel con miniaturas ---------- */
.gal-main { position: relative; aspect-ratio: 4/3; border-radius: var(--r-xl); border: 1px solid var(--border); background: var(--surface-2) center/cover no-repeat; cursor: zoom-in; overflow: hidden; }
.gal-main__nav { position: absolute; top: 50%; transform: translateY(-50%); width: 40px; height: 40px; border-radius: 999px; background: rgba(0,0,0,.55); border: 1px solid rgba(255,255,255,.18); color: #fff; display: grid; place-items: center; backdrop-filter: blur(4px); }
.gal-main__nav:hover { background: var(--primary); color: var(--on-primary); }
.gal-main__nav--prev { left: 12px; } .gal-main__nav--next { right: 12px; }
.gal-main__count { position: absolute; bottom: 12px; right: 12px; background: rgba(0,0,0,.6); padding: 5px 12px; border-radius: 999px; font-size: 12px; font-weight: 700; backdrop-filter: blur(4px); }
.gal-thumbs { display: flex; gap: 10px; margin-top: 12px; overflow-x: auto; padding-bottom: 4px; }
.gal-thumb { width: 74px; height: 74px; flex-shrink: 0; border-radius: 10px; background: var(--surface-2) center/cover no-repeat; border: 2px solid transparent; cursor: pointer; transition: border-color .18s, transform .18s var(--ease); }
.gal-thumb:hover { transform: translateY(-2px); }
.gal-thumb.is-active { border-color: var(--primary); }

/* Lightbox a pantalla completa */
.lightbox { position: fixed; inset: 0; background: rgba(0,0,0,.93); z-index: 300; display: none; align-items: center; justify-content: center; padding: 24px; }
.lightbox.is-open { display: flex; animation: chp-in .2s var(--ease); }
.lightbox img { max-width: 100%; max-height: 90vh; border-radius: var(--r-md); }
.lightbox__close { position: absolute; top: 20px; right: 20px; width: 42px; height: 42px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--border-2); color: var(--text); font-size: 18px; }
.lightbox__nav { position: absolute; top: 50%; transform: translateY(-50%); width: 48px; height: 48px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--border-2); color: var(--text); display: grid; place-items: center; }
.lightbox__nav:hover { background: var(--primary); color: var(--on-primary); }
.lightbox__nav--prev { left: 20px; } .lightbox__nav--next { right: 20px; }

/* ---------- Contador regresivo ---------- */
.countdown { display: flex; gap: 10px; }
.cd-cell { flex: 1; text-align: center; background: var(--surface-2); border: 1px solid var(--border-2); border-radius: var(--r-md); padding: 12px 4px; }
.cd-cell__n { font-size: 26px; font-weight: 900; line-height: 1; color: var(--accent); font-variant-numeric: tabular-nums; }
.cd-cell__l { font-size: 11.5px; text-transform: uppercase; letter-spacing: .07em; color: var(--text-3); font-weight: 800; margin-top: 6px; }

/* ---------- Botón flotante de WhatsApp ---------- */
.wa-fab { position: fixed; right: 18px; bottom: 18px; z-index: 120; width: 56px; height: 56px; border-radius: 999px; background: #25D366; color: #fff; display: none; align-items: center; justify-content: center; box-shadow: 0 8px 24px rgba(37,211,102,.4); transition: transform .18s var(--ease); }
.wa-fab.is-on { display: flex; }
.wa-fab:hover { transform: scale(1.08); }
.wa-fab svg { width: 30px; height: 30px; }
.wa-fab::before { content: ''; position: absolute; inset: 0; border-radius: 999px; background: #25D366; opacity: .55; animation: chp-wa 2.4s ease-out infinite; z-index: -1; }
@keyframes chp-wa { 0% { transform: scale(1); opacity: .5; } 100% { transform: scale(1.7); opacity: 0; } }

/* ---------- Compartir ---------- */
.share-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.share-btn { width: 38px; height: 38px; border-radius: 999px; border: 1px solid var(--border-2); background: var(--surface-2); color: var(--text-2); display: grid; place-items: center; transition: all .18s var(--ease); }
.share-btn:hover { color: var(--primary); border-color: var(--primary); transform: translateY(-2px); }
.share-btn svg { width: 17px; height: 17px; }

/* ---------- Botón de silencio ---------- */
.sound-toggle { width: 34px; height: 34px; border-radius: 999px; border: 1px solid var(--border-2); background: transparent; color: var(--text-3); display: grid; place-items: center; flex-shrink: 0; }
.sound-toggle:hover { color: var(--primary); border-color: var(--primary); }
.sound-toggle svg { width: 16px; height: 16px; }

/* ---------- Elegir el número del boleto ---------- */
.modo-tabs { display:flex; gap:8px; margin-bottom:16px; }
.modo-tab { flex:1; padding:10px 12px; border-radius:var(--r-md); border:1px solid var(--border-2); background:var(--surface-2); color:var(--text-2); font-weight:800; font-size:13px; text-align:center; }
.modo-tab.is-active { background:var(--primary); color:var(--on-primary); border-color:var(--primary); }
.num-buscador { display:flex; gap:8px; }
.num-buscador .input { flex:1; }
.num-estado { font-size:13px; font-weight:700; margin-top:10px; min-height:20px; }
.num-estado--libre { color:var(--success); }
.num-estado--ocupado { color:var(--danger); }
.num-chips { display:flex; flex-wrap:wrap; gap:8px; margin-top:14px; }
.num-chip { display:inline-flex; align-items:center; gap:7px; background:var(--accent); color:var(--on-accent); border:none; padding:7px 12px; border-radius:var(--r-pill); font-weight:900; font-size:13px; font-variant-numeric:tabular-nums; }
.num-chip button { background:rgba(0,0,0,.22); color:inherit; border:none; width:17px; height:17px; border-radius:999px; font-size:11px; line-height:1; display:grid; place-items:center; }
.num-sug { display:flex; flex-wrap:wrap; gap:7px; margin-top:12px; }
.num-sug button { background:var(--surface-2); border:1px solid var(--border-2); color:var(--text-2); padding:6px 12px; border-radius:var(--r-pill); font-weight:800; font-size:12.5px; font-variant-numeric:tabular-nums; }
.num-sug button:hover { border-color:var(--primary); color:var(--primary); }

/* ═══ BOLETAS 3D ═══════════════════════════════════════════════════════════ */
/* La boleta usa medidas relativas (clamp) porque se ve en celular, en
   escritorio y además se captura a 3x para el PNG/PDF. */
.boletas-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(min(100%,330px),1fr)); gap:30px; justify-items:center; }
.bol-escena { width:100%; max-width:460px; perspective:900px; touch-action:pan-y; }
.bol-wrap { transform-style:preserve-3d; transition:transform .15s cubic-bezier(.2,.8,.2,1); will-change:transform; }
.bol-ticket {
  position:relative; width:100%; aspect-ratio:2.1/1; border-radius:18px; overflow:hidden;
  background:
    linear-gradient(135deg, rgba(255,255,255,.05) 0%, transparent 42%),
    repeating-linear-gradient(45deg, #131315 0 2px, #0d0d10 2px 6px),
    linear-gradient(180deg, #1a1a1e 0%, #0a0a0c 100%);
  border:1px solid rgba(22,207,242,.4);
  box-shadow: 0 0 0 2px #08080a, 0 0 0 3px rgba(22,207,242,.45), 0 0 20px rgba(22,207,242,.18),
              0 15px 30px rgba(0,0,0,.9), inset 0 1px 1px rgba(255,255,255,.16);
  transform-style:preserve-3d;
}
.bol-ticket::before, .bol-ticket::after {
  content:""; position:absolute; top:50%; width:14px; height:24px; transform:translateY(-50%);
  background:var(--bg,#0B0B0D); border:1.5px solid rgba(22,207,242,.5); z-index:10;
}
.bol-ticket::before { left:-8px; border-radius:0 12px 12px 0; }
.bol-ticket::after { right:-8px; border-radius:12px 0 0 12px; }
.bol-brillo { position:absolute; inset:0; z-index:8; pointer-events:none;
  background:radial-gradient(360px circle at var(--bx,50%) var(--by,50%), rgba(255,255,255,.14), transparent 52%); }
.bol-tornillo { position:absolute; width:9px; height:9px; border-radius:50%; z-index:9; transform:translateZ(10px);
  background:radial-gradient(circle at 30% 30%, #fff 0%, #78786f 52%, #1a1a18 92%); box-shadow:0 1px 3px rgba(0,0,0,.8); }
.bol-tornillo.tl{top:10px;left:10px} .bol-tornillo.tr{top:10px;right:10px}
.bol-tornillo.bl{bottom:10px;left:10px} .bol-tornillo.br{bottom:10px;right:10px}
.bol-header { height:27%; padding:0 6%; display:flex; align-items:center; justify-content:space-between;
  border-bottom:1px solid rgba(22,207,242,.22); transform:translateZ(12px); }
.bol-marca { font-size:clamp(14px,4vw,22px); font-weight:900; letter-spacing:.5px; color:#fff; text-shadow:0 0 10px rgba(255,255,255,.3); }
.bol-badge { font-size:clamp(9px,2.4vw,12px); font-weight:800; color:var(--primary);
  background:rgba(22,207,242,.1); border:1px solid rgba(22,207,242,.4); padding:2px 8px; border-radius:4px; font-variant-numeric:tabular-nums; }
.bol-contenido { height:73%; display:grid; grid-template-columns:1.15fr .95fr .9fr; gap:6px; padding:8px 4%; align-items:center; }
.bol-col { display:flex; flex-direction:column; justify-content:center; border-right:1px solid rgba(255,255,255,.07); padding-right:5px; min-width:0; }
.bol-col:last-child { border-right:none; }
.bol-label { font-size:clamp(6.5px,1.7vw,9px); text-transform:uppercase; letter-spacing:.5px; color:#8b8b84; font-weight:700; margin-bottom:2px; }
.bol-premio { font-size:clamp(11px,3vw,17px); font-weight:800; color:#fff; line-height:1.05; margin-bottom:5px;
  transform:translateZ(10px); overflow:hidden; display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; }
.bol-fecha { font-size:clamp(9px,2.4vw,12px); font-weight:700; color:#d4d4cd; }
.bol-col--num { transform:translateZ(18px); }
.bol-numero { font-size:clamp(17px,5vw,30px); font-weight:900; line-height:.95;
  color:#FF1F9E; font-variant-numeric:tabular-nums; text-shadow:0 0 14px rgba(255,31,158,.45); }
.bol-estado { display:inline-flex; align-items:center; gap:3px; margin-top:5px; align-self:flex-start;
  background:rgba(22,207,242,.12); border:1px solid var(--primary); color:var(--primary);
  font-size:clamp(6.5px,1.7vw,9px); font-weight:800; padding:2px 5px; border-radius:3px; }
.bol-estado--pend { background:var(--warning-soft); border-color:var(--warning); color:var(--warning); }
.bol-col--qr { align-items:center; transform:translateZ(14px); }
.bol-qr-caja { padding:4px; background:#fff; border-radius:4px; box-shadow:0 0 10px rgba(22,207,242,.28);
  width:clamp(44px,12vw,62px); height:clamp(44px,12vw,62px); display:grid; place-items:center; overflow:hidden; }
.bol-qr-caja img, .bol-qr-caja canvas { width:100% !important; height:100% !important; display:block; }
.bol-qr-fallback { font-size:5px; line-height:1.25; color:#000; text-align:center; font-weight:700; }
.bol-codigo { font-family:ui-monospace,SFMono-Regular,Menlo,monospace; font-size:clamp(5.5px,1.5vw,8px);
  color:#a8a89f; margin-top:4px; text-align:center; word-break:break-all; }
.bol-verif { font-size:clamp(5px,1.3vw,7px); color:#75756e; text-align:center; margin-top:1px; }
.bol-btn-png { margin-top:12px; width:100%; }

/* ═══ MODO DEMO / COBRO REAL ═══════════════════════════════════════════════ */
.mp-banda { border-radius:var(--r-md); padding:14px 16px; font-size:14px; }
.mp-banda b { display:block; font-size:15px; }
.mp-banda--demo { background:var(--warning-soft); color:var(--warning); }
.mp-banda--real { background:var(--success-soft); color:var(--success); }
/* Banda fija arriba del panel: tiene que verse sin buscarla. */
.admin-banda { background:var(--warning-soft); color:var(--warning); border-bottom:1px solid var(--warning);
  padding:11px 22px; font-size:13.5px; font-weight:700; }
.admin-banda a { color:inherit; text-decoration:underline; }
/* Aviso al comprador cuando la plataforma está en demostración. */
.demo-aviso { background:var(--warning-soft); color:var(--warning); border:1px solid var(--warning);
  border-radius:var(--r-md); padding:13px 16px; font-size:13.5px; font-weight:700; text-align:center; }

/* ---------- Cupón en el checkout ---------- */
.cupon__fila { display: flex; gap: 8px; }
.cupon__fila .input { flex: 1; min-width: 0; text-transform: uppercase; }
.cupon__fila .btn { flex-shrink: 0; }

/* ============================================================================
   ANIMACIONES DE INTERACCIÓN
   Todo lo de aquí es decoración: nada de esto comunica información que no
   esté también en el texto. Por eso al final se apaga entero cuando el
   usuario pidió menos movimiento en su sistema.
   ============================================================================ */

/* Hundir el botón al presionarlo. Es el gesto que más "responde" por lo poco
   que cuesta: confirma que el toque se registró, antes de que llegue nada. */
.btn:active { transform: translateY(1px) scale(.985); }
.btn { transition: transform .09s var(--ease), filter .15s var(--ease), background .15s var(--ease); }

/* Brillo que cruza el botón principal al pasar por encima. */
.btn--primary { position: relative; overflow: hidden; }
.btn--primary::after {
  content: ''; position: absolute; top: 0; left: -75%; width: 50%; height: 100%;
  background: linear-gradient(100deg, transparent, rgba(255,255,255,.22), transparent);
  transform: skewX(-20deg); transition: left .55s var(--ease); pointer-events: none;
}
.btn--primary:hover::after { left: 125%; }

/* Un número elegido aparece dando un saltico. */
@keyframes chp-pop {
  0%   { transform: scale(.4); opacity: 0; }
  65%  { transform: scale(1.14); opacity: 1; }
  100% { transform: scale(1); }
}
.num-chip { animation: chp-pop .26s var(--ease) both; }

/* Error: un temblor corto. Más efectivo que pintar de rojo y ya. */
@keyframes chp-temblor {
  0%,100% { transform: translateX(0); }
  20% { transform: translateX(-6px); }
  40% { transform: translateX(5px); }
  60% { transform: translateX(-3px); }
  80% { transform: translateX(2px); }
}
.chp-temblor { animation: chp-temblor .38s var(--ease); }

/* La barra de progreso lleva un reflejo que la recorre: indica "esto sigue
   vendiéndose", que es justo lo que queremos que sienta quien duda. */
.prog__bar { position: relative; overflow: hidden; }
.prog__bar::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.38), transparent);
  transform: translateX(-100%);
  animation: chp-reflejo 2.6s ease-in-out 1.2s infinite;
}
@keyframes chp-reflejo { 0% { transform: translateX(-100%); } 55%,100% { transform: translateX(240%); } }

/* La tarjeta levanta la foto un poco al pasar por encima. */
.rifa-card__img { transition: transform .4s var(--ease); }
.rifa-card:hover .rifa-card__img { transform: scale(1.045); }

/* Latido suave en el contador cuando queda poco. Se enciende desde el código. */
@keyframes chp-latido { 0%,100% { transform: scale(1); } 50% { transform: scale(1.07); } }
.cd-cell--urgente .cd-cell__n { animation: chp-latido 1.1s ease-in-out infinite; color: var(--danger); }

/* Entrada de los avisos flotantes, con rebote. */
@keyframes chp-entra-aviso {
  0%   { opacity: 0; transform: translateY(-14px) scale(.96); }
  60%  { opacity: 1; transform: translateY(2px) scale(1.01); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}
.toast { animation: chp-entra-aviso .32s var(--ease) both; }

/* La boleta entra girando un poco, como si se pusiera sobre la mesa. */
@keyframes chp-boleta {
  0%   { opacity: 0; transform: perspective(900px) rotateX(16deg) translateY(26px); }
  100% { opacity: 1; transform: perspective(900px) rotateX(0) translateY(0); }
}
.chp-boleta-entra { animation: chp-boleta .6s var(--ease) both; }

/* Pulso del botón de WhatsApp: llama la atención sin moverse del sitio. */
@keyframes chp-pulso {
  0%   { box-shadow: 0 0 0 0 rgba(37,211,102,.45); }
  70%  { box-shadow: 0 0 0 14px rgba(37,211,102,0); }
  100% { box-shadow: 0 0 0 0 rgba(37,211,102,0); }
}
.wa-fab.is-on { animation: chp-pulso 2.8s ease-out 2s infinite; }

/* Confeti, reutilizable fuera de la pantalla del sorteo. */
.chp-confeti { position: fixed; inset: 0; pointer-events: none; overflow: hidden; z-index: 90; }
.chp-confeti i { position: absolute; width: 9px; height: 15px; top: -20px; opacity: 0;
  animation: chp-cae linear forwards; }
@keyframes chp-cae {
  0%   { opacity: 1; transform: translateY(-10vh) rotate(0); }
  100% { opacity: 0; transform: translateY(105vh) rotate(760deg); }
}

@media (prefers-reduced-motion: reduce) {
  .btn--primary::after,
  .prog__bar::after,
  .chp-confeti { display: none; }
  .num-chip, .toast, .chp-boleta-entra,
  .cd-cell--urgente .cd-cell__n, .wa-fab.is-on, .chp-temblor { animation: none; }
  .btn:active { transform: none; }
  .rifa-card:hover .rifa-card__img { transform: none; }
}


/* ============================================================================
   FONDO VIVO DE TODA LA PÁGINA
   Lo mismo que hay detrás del título de la portada, pero fijo al fondo de la
   ventana y en todas las páginas públicas. Va MÁS SUAVE que el de la portada:
   ahí es el protagonista, aquí tiene que dejar leer lo que hay encima.
   ============================================================================ */
.fondo-vivo {
  position: fixed; inset: 0; z-index: -1;      /* detrás de todo el contenido */
  pointer-events: none; overflow: hidden;
  /* contain evita que el navegador recalcule la página entera en cada cuadro
     de la animación: es lo que hace que no se note en el rendimiento. */
  contain: strict;
}
.fondo-vivo i {
  position: absolute; display: block; border-radius: 50%;
  filter: blur(90px); opacity: .5; will-change: transform;
}
.fondo-vivo i:nth-child(1) {
  width: 52vw; height: 52vw; max-width: 680px; max-height: 680px; left: -12%; top: -14%;
  background: radial-gradient(circle, rgba(22,207,242,.55), transparent 68%);
  animation: fv-a 34s ease-in-out infinite alternate;
}
.fondo-vivo i:nth-child(2) {
  width: 46vw; height: 46vw; max-width: 600px; max-height: 600px; right: -14%; top: 22%;
  background: radial-gradient(circle, rgba(255,31,158,.42), transparent 68%);
  animation: fv-b 42s ease-in-out infinite alternate;
}
.fondo-vivo i:nth-child(3) {
  width: 40vw; height: 40vw; max-width: 520px; max-height: 520px; left: 34%; bottom: -20%;
  background: radial-gradient(circle, rgba(111,230,251,.30), transparent 70%);
  animation: fv-c 48s ease-in-out infinite alternate;
}
@keyframes fv-a { from { transform: translate3d(0,0,0) scale(1); }    to { transform: translate3d(12vw,14vh,0) scale(1.2); } }
@keyframes fv-b { from { transform: translate3d(0,0,0) scale(1.12); } to { transform: translate3d(-10vw,-12vh,0) scale(.9); } }
@keyframes fv-c { from { transform: translate3d(0,0,0) scale(.95); }  to { transform: translate3d(-8vw,-14vh,0) scale(1.22); } }

/* La cuadrícula, igual que en la portada pero más tenue. */
.fondo-vivo__malla {
  position: absolute; inset: -60px;
  --m-paso: 29px; --m-fina: rgba(22,207,242,.11); --m-gruesa: rgba(22,207,242,.33);
  --m-punto: rgba(111,230,251,.5); --m-brillo: rgba(126,240,255,.4);
  -webkit-mask-image: radial-gradient(85% 70% at 50% 40%, #000 25%, transparent 80%);
          mask-image: radial-gradient(85% 70% at 50% 40%, #000 25%, transparent 80%);
  animation-duration: 40s;
}

/* Un velo encima para que el texto nunca pierda contraste contra las manchas. */
.fondo-vivo::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(7,9,12,.16), rgba(7,9,12,.46));
}

@media (max-width: 760px) {
  .fondo-vivo i { filter: blur(60px); opacity: .4; }
  .fondo-vivo__malla { --m-paso: 22px; }
}

@media (prefers-reduced-motion: reduce) {
  .fondo-vivo i:nth-child(1),
  .fondo-vivo i:nth-child(2),
  .fondo-vivo i:nth-child(3),
  .fondo-vivo__malla { animation: none; }
}

/* ============================================================================
   CHIMBI — animaciones de la mascota
   ============================================================================ */
.chimbi { display: block; overflow: visible; }

/* Respiración: sube y baja apenas, y se ensancha un pelo. Es lo que hace que
   un dibujo quieto parezca estar vivo. */
@keyframes chb-respira {
  0%, 100% { transform: translateY(0) scaleX(1) scaleY(1); }
  50%      { transform: translateY(-4px) scaleX(1.015) scaleY(.985); }
}
.chimbi { animation: chb-respira 3.2s ease-in-out infinite; }

/* Parpadeo con pausas largas: seguido se ve nervioso. */
@keyframes chb-parpadea { 0%, 93%, 100% { transform: scaleY(1); } 96% { transform: scaleY(.06); } }
.chb-ojo { transform-origin: center; animation: chb-parpadea 5.2s ease-in-out infinite; }
.chimbi--duerme .chb-ojo { animation: none; }

/* Las pupilas flotan un poquito: la mirada deja de estar clavada. */
@keyframes chb-mira { 0%,100% { transform: translate(0,0); } 30% { transform: translate(2px,-1px); } 65% { transform: translate(-2px,1px); } }
.chb-pupila { animation: chb-mira 6.5s ease-in-out infinite; }

/* Brillo de plástico que cruza el boleto cada tanto. */
@keyframes chb-brillo { 0%, 72% { transform: translateX(0); } 100% { transform: translateX(240px); } }
.chb-brillo { animation: chb-brillo 4.5s ease-in-out infinite; }

/* Las "z" de dormido. */
@keyframes chb-zzz { 0% { opacity:0; transform: translate(0,6px) scale(.8); } 40% { opacity:.9; } 100% { opacity:0; transform: translate(10px,-16px) scale(1.15); } }
.chb-zzz { animation: chb-zzz 2.6s ease-out infinite; }

/* Los destellos de emoción laten. */
@keyframes chb-destello { 0%,100% { opacity:.35; transform: scale(.85) rotate(0); } 50% { opacity:1; transform: scale(1.2) rotate(25deg); } }
.chb-destellos { transform-origin: center; animation: chb-destello 1.5s ease-in-out infinite; }

/* La gorra rebota un poco a destiempo del cuerpo: eso da sensación de peso. */
@keyframes chb-gorra { 0%,100% { transform: translateY(0) rotate(0); } 50% { transform: translateY(-2.5px) rotate(-1.2deg); } }
.chb-gorra { transform-origin: 80px 40px; animation: chb-gorra 3.2s ease-in-out .18s infinite; }

/* Los brazos se mecen. */
@keyframes chb-mece-izq { 0%,100% { transform: rotate(0); } 50% { transform: rotate(5deg); } }
@keyframes chb-mece-der { 0%,100% { transform: rotate(0); } 50% { transform: rotate(-5deg); } }
.chb-brazo--izq { transform-origin: 32px 94px; animation: chb-mece-izq 3.2s ease-in-out infinite; }
.chb-brazo--der { transform-origin: 148px 94px; animation: chb-mece-der 3.2s ease-in-out .3s infinite; }

/* La sombra se encoge cuando el cuerpo sube: es lo que vende el peso. */
@keyframes chb-sombra { 0%,100% { transform: scaleX(1); opacity:.4; } 50% { transform: scaleX(.92); opacity:.3; } }
.chb-sombra { transform-origin: 90px 178px; animation: chb-sombra 3.2s ease-in-out infinite; }

/* Saludo, solo cuando se le pide. */
@keyframes chb-saluda { 0%,100% { transform: rotate(0); } 25% { transform: rotate(-26deg); } 60% { transform: rotate(16deg); } }
.chimbi--saluda .chb-brazo--der { animation: chb-saluda .75s ease-in-out 2; }

/* Caminata. */
@keyframes chb-paso-a { 0%,100% { transform: rotate(0); } 50% { transform: rotate(18deg); } }
@keyframes chb-paso-b { 0%,100% { transform: rotate(18deg); } 50% { transform: rotate(0); } }
.chimbi--camina .chb-pierna--izq { transform-origin: 68px 132px; animation: chb-paso-a .48s ease-in-out infinite; }
.chimbi--camina .chb-pierna--der { transform-origin: 112px 132px; animation: chb-paso-b .48s ease-in-out infinite; }

/* Brinco de celebración, con aplastado al caer (squash & stretch). */
@keyframes chb-brinca {
  0%, 100% { transform: translateY(0) scaleY(1) rotate(0); }
  12%      { transform: translateY(4px) scaleY(.88) scaleX(1.1); }
  38%      { transform: translateY(-34px) scaleY(1.1) scaleX(.94) rotate(-7deg); }
  62%      { transform: translateY(2px) scaleY(.92) scaleX(1.06); }
  80%      { transform: translateY(-16px) scaleY(1.05) rotate(5deg); }
}
.chimbi--brinca { animation: chb-brinca 1s cubic-bezier(.34,1.3,.5,1) 2; }

/* ---- Chimbi acompañante, abajo a la izquierda ---- */
/* ---------- Chimbi en foto ----------
   Las poses del render 3D, recortadas con fondo transparente. Todas comparten
   escala y linea de piso, asi que al cambiar de una a otra el personaje no se
   mueve de sitio ni cambia de tamano. */
.chimbi-foto {
  display: block; width: 92px; height: 94px; position: relative;
  transform-origin: 50% 100%;
}
.chimbi-foto__img {
  display: block; width: 100%; height: 100%; object-fit: contain;
  object-position: bottom center;
  filter: drop-shadow(0 10px 14px rgba(0,0,0,.45));
  /* La respiracion es lo que separa un muneco pegado de uno que esta vivo. */
  animation: chimbi-respira 3.6s ease-in-out infinite;
}
@keyframes chimbi-respira {
  0%, 100% { transform: translateY(0)     scaleY(1);    }
  50%      { transform: translateY(-2px)  scaleY(1.012); }
}
/* El brinco: se agacha, sube y aterriza. El "squash" de la salida y la
   llegada es lo que hace que se sienta peso y no un sprite subiendo. */
.chimbi-foto--brinca { animation: chimbi-brinca .72s cubic-bezier(.3,.9,.3,1); }
@keyframes chimbi-brinca {
  0%   { transform: translateY(0)     scale(1, 1);       }
  18%  { transform: translateY(2px)   scale(1.06, .94);  }
  45%  { transform: translateY(-16px) scale(.95, 1.06);  }
  72%  { transform: translateY(0)     scale(1.05, .95);  }
  100% { transform: translateY(0)     scale(1, 1);       }
}
@media (max-width: 760px) {
  .chimbi-foto { width: 74px; height: 76px; }
}
@media (prefers-reduced-motion: reduce) {
  .chimbi-foto__img, .chimbi-foto--brinca { animation: none; }
}

.chimbi-fab {
  position: fixed; left: 18px; bottom: 14px; z-index: 60;
  display: flex; align-items: flex-end; gap: 6px;
  cursor: pointer; background: none; border: none; padding: 0;
}
.chimbi-fab__globo {
  background: var(--surface-2); border: 1px solid var(--border-2);
  border-radius: 14px 14px 14px 4px; padding: 9px 13px;
  font-size: 13px; font-weight: 600; color: var(--text); max-width: 210px;
  text-align: left; line-height: 1.4; box-shadow: var(--sh-lg);
  opacity: 0; transform: translateY(6px) scale(.95); transform-origin: 0 100%;
  transition: opacity .25s var(--ease), transform .25s var(--ease);
  pointer-events: none; margin-bottom: 30px;
}
.chimbi-fab__globo.is-on { opacity: 1; transform: translateY(0) scale(1); }

/* En el teléfono se esconde el globo y queda solo la mascota, más chica:
   abajo también vive el botón de WhatsApp y no pueden pelearse el espacio. */
@media (max-width: 760px) {
  .chimbi-fab { left: 8px; bottom: 6px; }
  .chimbi-fab__globo { display: none; }
  
}

@media (prefers-reduced-motion: reduce) {
  .chimbi, .chb-ojo, .chb-pupila, .chb-brillo, .chb-zzz, .chb-destellos,
  .chb-gorra, .chb-brazo--izq, .chb-brazo--der, .chb-sombra,
  .chimbi--saluda .chb-brazo--der,
  .chimbi--camina .chb-pierna--izq, .chimbi--camina .chb-pierna--der,
  .chimbi--brinca { animation: none; }
  .chimbi-fab__globo { transition: none; }
}


/* ---------- Chimbi 3D en la portada ----------
   Va al lado del título en escritorio y debajo en el teléfono. Es decoración:
   nunca tapa texto ni empuja los botones fuera de la pantalla. */
.hero__chimbi {
  display: block; width: 260px; height: auto; margin: 26px auto 0;
  filter: drop-shadow(0 22px 34px rgba(0,0,0,.55));
  animation: hero-chimbi 4s ease-in-out infinite;
}
@keyframes hero-chimbi {
  0%, 100% { transform: translateY(0) rotate(0); }
  50%      { transform: translateY(-10px) rotate(-1.2deg); }
}

@media (min-width: 1040px) {
  /* En pantallas anchas se pone a un lado, flotando junto al título. */
  .hero__content { position: relative; }
  .hero__chimbi {
    position: absolute; right: -230px; bottom: -30px;
    width: 250px; margin: 0; z-index: 2;
  }
}

@media (max-width: 760px) {
  .hero__chimbi { width: 150px; margin-top: 22px; }
}

@media (prefers-reduced-motion: reduce) {
  .hero__chimbi { animation: none; }
}

/* Botón para cortar el saludo hablado. Aparece solo mientras suena. */
.saludo-corte {
  position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%);
  z-index: 95; display: inline-flex; align-items: center; gap: 9px;
  background: var(--surface-2); color: var(--text); border: 1px solid var(--border-2);
  border-radius: var(--r-pill); padding: 11px 20px; font-size: 14px; font-weight: 700;
  box-shadow: var(--sh-lg); cursor: pointer; min-height: 44px;
  animation: chp-entra-aviso .3s var(--ease) both;
}
.saludo-corte span {
  width: 9px; height: 9px; border-radius: 50%; background: var(--primary);
  animation: saludo-late 1s ease-in-out infinite;
}
@keyframes saludo-late { 0%,100% { opacity: 1; transform: scale(1); } 50% { opacity: .4; transform: scale(.75); } }
@media (prefers-reduced-motion: reduce) {
  .saludo-corte, .saludo-corte span { animation: none; }
}


/* ---------- Onda al pulsar un botón ----------
   Un círculo que nace justo donde tocaste y se expande. Es de los efectos más
   usados en apps bien hechas porque hace una cosa concreta: confirma que el
   toque se registró en el punto exacto, antes de que pase nada más. En una
   conexión lenta, eso es la diferencia entre "no funcionó" y "ya va". */
.btn, .filter-chip, .modo-tab, .pay-opt, .chimbi-fab, .rifa-card__share {
  position: relative; overflow: hidden;
}
.onda {
  position: absolute; border-radius: 50%; pointer-events: none;
  background: currentColor; opacity: .32;
  transform: scale(0); animation: onda-crece .55s var(--ease) forwards;
}
/* En los botones de color fuerte la onda va blanca: el currentColor ahí es
   oscuro y no se vería. */
.btn--primary .onda, .btn--wa .onda, .filter-chip.is-active .onda { background: #fff; opacity: .4; }

@keyframes onda-crece {
  to { transform: scale(2.6); opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .onda { animation: none; display: none; }
}
