@font-face {
  font-family: "DejaVu Sans";
  src: url("/fonts/DejaVuSans.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "DejaVu Sans";
  src: url("/fonts/DejaVuSans-Bold.woff2") format("woff2");
  font-weight: 700;
  font-display: swap;
}

:root {
  --tinta: #2e75b6;       /* accent1 al 75 %, el azul de los textos del PDF */
  --tinta-fuerte: #1f4e79;
  --borde-campo: #41719c;
  --error: #c8324f;
  --fuente: "DejaVu Sans", Verdana, "Segoe UI", sans-serif;
  color-scheme: only light; /* sin esto el modo oscuro forzado (Samsung, Chrome) invierte campos y textos */
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  height: 100%;
  overflow: hidden;
  overscroll-behavior: none;
}

body {
  background: #a9def7 url("/assets/bg.webp") center / cover no-repeat;
  font-family: var(--fuente);
  -webkit-tap-highlight-color: transparent;
  -webkit-text-size-adjust: 100%;
  touch-action: manipulation;
  user-select: none;
  -webkit-user-select: none;
}

/* En pantallas anchas el juego flota como una tarjeta sobre el fondo difuminado */
body.ancho::before {
  content: "";
  position: fixed;
  inset: -40px;
  background: inherit;
  filter: blur(28px) saturate(1.1);
  opacity: 0.9;
}

/* Escenario de 405 x 720 (la diapositiva) escalado a la pantalla; en celulares altos crece hacia abajo
   y en pantallas más anchas crece a los lados (--sw) con el contenido centrado (--ox) */
#stage {
  position: absolute;
  left: 0;
  top: 0;
  width: calc(var(--sw, 405) * 1px);
  height: calc(var(--sh, 720) * 1px);
  transform-origin: 0 0;
  /* Sin --s (antes de que corra app.js) mide 0: si midiera 405 px, en celulares más angostos el
     navegador alejaría la página para que quepa y el primer cálculo saldría con otra altura */
  transform: translate(calc(var(--tx, 0) * 1px), calc((var(--ty, 0) - var(--kb, 0)) * 1px)) scale(var(--s, 0));
  background: url("/assets/bg.webp") 0 0 / 100% 100% no-repeat;
  overflow: hidden;
  transition: opacity 0.4s ease, transform 0.25s ease;
}
#stage.cargando { opacity: 0; }
body.ancho #stage {
  border-radius: 26px;
  box-shadow: 0 30px 70px rgba(10, 70, 130, 0.35), 0 0 0 1px rgba(255, 255, 255, 0.6);
}

/* --a reparte el ancho extra: 0 pegado a la izquierda, 1 centrado, 2 pegado a la derecha */
.abs {
  position: absolute;
  left: calc((var(--x) + var(--ox, 0) * var(--a, 1)) * 1px);
  top: calc((var(--y) + var(--ex, 0) * var(--k, 0)) * 1px);
  width: calc(var(--w) * 1px);
  height: calc(var(--h) * 1px);
  margin: 0;
}

img { display: block; -webkit-user-drag: none; }
/* Mantener presionado un botón con imagen no debe abrir el menú de "Guardar imagen" del sistema */
#stage img { -webkit-touch-callout: none; }
.pantalla [hidden] { display: none !important; }

/* ---------- Pantallas ---------- */
.pantalla {
  position: absolute;
  inset: 0;
  visibility: hidden;
  opacity: 0;
  transition: opacity 0.32s ease, visibility 0s linear 0.32s;
}
.pantalla.activa {
  visibility: visible;
  opacity: 1;
  transition: opacity 0.32s ease;
}
/* La pantalla que se va deja de recibir toques aunque siga desvaneciéndose */
.pantalla:not(.activa) { pointer-events: none; }
/* Recién cambiada la pantalla, lo que quedó bajo el dedo ignora toques un momento (app.js):
   el segundo toque de un doble toque no cae en la pantalla nueva */
.sin-toque, .sin-toque * { pointer-events: none !important; }
.pantalla.activa > :not(.festejo) { animation: sube 0.45s cubic-bezier(0.2, 0.9, 0.3, 1.2) both; }
.pantalla.activa > *:nth-child(2) { animation-delay: 0.04s; }
.pantalla.activa > *:nth-child(3) { animation-delay: 0.08s; }
.pantalla.activa > *:nth-child(4) { animation-delay: 0.12s; }
.pantalla.activa > *:nth-child(n + 5) { animation-delay: 0.16s; }
@keyframes sube {
  from { opacity: 0; translate: 0 14px; }
  to { opacity: 1; translate: 0 0; }
}

/* ---------- Texto con el contorno del PDF (1.5 pt del mismo color) ---------- */
.t {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: var(--tinta);
  font-family: var(--fuente);
  font-weight: 400;
  -webkit-text-stroke: 1.1px currentColor;
  line-height: 1.2;
}
.t14 { font-size: 14px; }
.t15 { font-size: 15px; }
.t16 { font-size: 16px; }
.t18 { font-size: 18px; }
.t20 { font-size: 20px; }
.t22 { font-size: 22px; }
.t24 { font-size: 24px; }
.t28 { font-size: 28px; }
.t36 { font-size: 36px; }
.bloque { align-items: flex-start; }

.pista {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: var(--tinta);
  font-size: 13px;
  line-height: 1.25;
  opacity: 0.9;
}
.nota {
  text-align: center;
  color: var(--tinta);
  font-size: 11.5px;
  line-height: 1.45;
  opacity: 0.8;
}
.nota a {
  position: relative;
  color: var(--tinta-fuerte);
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.nota a::after { content: ""; position: absolute; inset: -22px -24px; }

/* ---------- Logo, decoraciones ---------- */
#logo {
  z-index: 2;
  pointer-events: none;
  transition: left 0.5s ease, top 0.5s ease, width 0.5s ease, height 0.5s ease;
}
#decos .deco {
  position: absolute;
  pointer-events: none;
  transition: left 0.7s ease, top 0.7s ease, width 0.7s ease, height 0.7s ease, opacity 0.5s ease;
}
#decos .deco.fuera { opacity: 0; }
#decos .burbuja img { animation: flota 6s ease-in-out infinite; }
#decos .destello img { animation: brilla 3.2s ease-in-out infinite; }
#decos .deco img { width: 100%; height: 100%; }
@keyframes flota {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-7px); }
}
@keyframes brilla {
  0%, 100% { transform: scale(1) rotate(0); opacity: 1; }
  50% { transform: scale(0.82) rotate(8deg); opacity: 0.75; }
}

.asoma { pointer-events: none; transform-origin: 50% 50%; }
#inicio.activa .asoma { animation: sube 0.6s ease both, saluda 4s ease-in-out 0.6s infinite; }
@keyframes saluda {
  0%, 100% { translate: 0 0; }
  50% { translate: 0 -6px; }
}

/* ---------- Botones ---------- */
button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
}
button:focus-visible, a:focus-visible {
  outline: 3px solid #fff;
  outline-offset: 2px;
  box-shadow: 0 0 0 6px rgba(46, 117, 182, 0.55);
}

.pill {
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  -webkit-text-stroke: 1.1px #fff;
  text-shadow: 0 1px 2px rgba(0, 70, 150, 0.35);
  /* Respaldo mientras llega pill.webp (red lenta): la misma píldora celeste dibujada con CSS */
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.6), rgba(255, 255, 255, 0) 46%),
    linear-gradient(180deg, #6fd3f8 0%, #1f9ff0 55%, #3bc4f6 82%, #86e8f8 100%);
  border: 2px solid rgba(255, 255, 255, 0.92);
  filter: drop-shadow(0 4px 6px rgba(0, 90, 170, 0.22));
  transition: transform 0.14s ease, filter 0.2s ease;
  border-radius: 40px;
}
#stage.pill-lista .pill { background: url("/assets/pill.webp") center / 100% 100% no-repeat; border: 0; }
/* SIGUIENTE, atrás: el área de toque crece sin cambiar el dibujo */
.pill[data-accion^="siguiente"]::after, #atras::after { content: ""; position: absolute; inset: -6px; }
.pill[data-accion^="siguiente"]::after { inset: -6px -4px; }
.pill:active, #btn-iniciar:active { transform: scale(0.94); }
@media (hover: hover) {
  .pill:hover, #btn-iniciar:hover { filter: drop-shadow(0 6px 10px rgba(0, 90, 170, 0.3)) brightness(1.06); }
  .op-color:hover img, .op-acc:hover img { transform: scale(1.05); }
  .op-emp:hover { transform: scale(1.04); }
}

#btn-iniciar img { width: 100%; height: 100%; }
#btn-iniciar { transition: transform 0.14s ease, filter 0.2s ease; border-radius: 50px; }
#inicio.activa #btn-iniciar { animation: sube 0.5s ease 0.1s both, late 2.4s ease-in-out 1s infinite; }
@keyframes late {
  0%, 100% { scale: 1; }
  50% { scale: 1.05; }
}

#handle img { width: 100%; height: 100%; }
#handle { border-radius: 30px; }
/* Enlaces de texto y @bluemintbazar: el área de toque crece sin cambiar el dibujo.
   '¿Ya hiciste tu personaje?' y @bluemintbazar se reparten el hueco que hay entre los dos. */
.enlace.abs::after, #handle::after { content: ""; position: absolute; inset: -9px -6px; }
#handle::after { inset: -15px -6px -4px; }
#ya-hice::after { inset: -4px -6px -17px; }

.enlace {
  color: var(--tinta);
  font-size: 15px;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
}

#atras, #musica {
  z-index: 5;
  display: grid;
  place-items: center;
  color: var(--tinta);
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #fff 0%, rgba(255, 255, 255, 0.85) 45%, rgba(190, 232, 252, 0.8) 100%);
  box-shadow: 0 3px 8px rgba(0, 80, 160, 0.25), inset 0 -2px 4px rgba(90, 170, 230, 0.4);
  transition: transform 0.14s ease, opacity 0.3s ease;
}
#atras svg, #musica svg { width: 24px; height: 24px; }
#musica:active { transform: scale(0.9); }
#musica::after { content: ""; position: absolute; inset: -6px; }
#musica .off, #musica.apagada .on { display: none; }
#musica.apagada .off { display: block; }
#musica.apagada { color: #7fa6c8; }
#atras:active { transform: scale(0.9); }
#atras[hidden] { display: grid; opacity: 0; visibility: hidden; transition: opacity 0.3s ease, visibility 0s linear 0.3s; }
.pantalla:focus { outline: none; }

/* Celular acostado: el juego es vertical */
#gira {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 50;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  color: var(--tinta);
  font: 700 20px var(--fuente);
  background: rgba(225, 245, 255, 0.94);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}
#gira svg { width: 72px; height: 72px; animation: gira 2s ease-in-out infinite; }
#gira p { margin: 0; }
@keyframes gira {
  0%, 30% { transform: rotate(-90deg); }
  60%, 100% { transform: rotate(0); }
}
/* app.js pone .acostado con la orientación física del celular (nunca con el teclado abierto) */
body.acostado #gira { display: flex; }

/* ---------- Registro ---------- */
/* El área de toque del campo es más grande que su dibujo: un borde transparente de --t unidades
   por lado (57 de alto en total). Lo que se ve (fondo, línea y anillo) va en la caja de relleno. */
.campo {
  --t: 8.5;
  margin: calc(var(--t) * -1px);
  width: calc((var(--w) + var(--t) * 2) * 1px);
  height: calc((var(--h) + var(--t) * 2) * 1px);
  background: #fff padding-box;
  border: calc(var(--t) * 1px) solid transparent;
  border-radius: calc((7 + var(--t)) * 1px);
  box-shadow: inset 0 0 0 1.4px var(--borde-campo);
  outline: 0 solid transparent;
  outline-offset: calc((2 - var(--t)) * 1px);
  padding: 0 12px;
  font-family: var(--fuente);
  font-size: 18px;
  color: var(--tinta-fuerte);
  text-align: center;
  user-select: text;
  -webkit-user-select: text;
  transition: box-shadow 0.2s ease;
}
.campo::placeholder { color: #9dbbd6; font-size: 15px; }
.campo:focus { box-shadow: inset 0 0 0 1.4px var(--tinta); outline: 3px solid #fff; }
.campo[aria-invalid="true"] {
  box-shadow: inset 0 0 0 1.4px var(--error);
  outline: 4px solid rgba(200, 50, 79, 0.18);
  outline-offset: calc(var(--t) * -1px);
  animation: tiembla 0.35s ease;
}
.campo[aria-invalid="true"]:focus { outline: 3px solid #fff; outline-offset: calc((2 - var(--t)) * 1px); }
/* Instagram: la "@" va fija dentro del campo, a la izquierda (no es parte del valor) y el usuario
   se escribe pegado a ella */
.campo.campo-ig { text-align: left; padding: 0 12px 0 31px; }
.arroba {
  display: flex;
  align-items: center;
  pointer-events: none;
  color: var(--tinta);
  font-size: 18px;
  font-weight: 700;
}
.campo[aria-invalid="true"] + .arroba { color: var(--error); animation: tiembla 0.35s ease; }
#e-instagram { line-height: 14px; padding-top: 2px; } /* "Revisa tu usuario..." ocupa dos renglones */
.error {
  pointer-events: none; /* el toque pasa al campo, que llega hasta aquí */
  color: var(--error);
  font-size: 12px;
  font-weight: 700;
  text-align: center;
  line-height: 18px;
}
@keyframes tiembla {
  20%, 60% { translate: -5px 0; }
  40%, 80% { translate: 5px 0; }
}

/* ---------- Elegir color ---------- */
.op-color img { width: 100%; height: 100%; transition: transform 0.2s ease, filter 0.2s ease; }
.op-color { border-radius: 40%; }
.op-color.elegido img { transform: scale(1.08); filter: drop-shadow(0 0 14px rgba(255, 255, 255, 0.95)); }
#color.eligiendo .op-color:not(.elegido) img { opacity: 0.45; transform: scale(0.94); }

/* ---------- Accesorios ---------- */
.op-acc { display: grid; place-items: center; border-radius: 22px; }
.op-acc img { position: relative; z-index: 1; transition: transform 0.2s ease; filter: drop-shadow(0 3px 4px rgba(0, 60, 120, 0.18)); }
.op-acc::before, .op-emp::before {
  content: "";
  position: absolute;
  inset: -10%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.95) 0%, rgba(170, 228, 255, 0.55) 48%, rgba(170, 228, 255, 0) 72%);
  opacity: 0;
  transform: scale(0.6);
  transition: opacity 0.25s ease, transform 0.3s cubic-bezier(0.3, 1.4, 0.5, 1);
  pointer-events: none;
}
.op-acc[aria-checked="true"]::before { opacity: 1; transform: scale(1); }
.op-acc[aria-checked="true"] img { transform: scale(1.1); }

/* Al entrar, las opciones saltan una por una para invitar a tocarlas */
.pantalla.activa .op-acc img,
.pantalla.activa .op-emp img { animation: invita 0.55s cubic-bezier(0.3, 1.6, 0.5, 1) both; animation-delay: calc(0.15s + var(--i, 0) * 0.035s); }
@keyframes invita {
  from { opacity: 0; scale: 0.4; }
  to { opacity: 1; scale: 1; }
}
/* SIGUIENTE late cuando ya se puede avanzar */
.pill.puede { animation: late 1.6s ease-in-out infinite; }

/* ---------- Emprendedores ---------- */
.op-emp {
  border-radius: 50%;
  transition: transform 0.2s cubic-bezier(0.3, 1.4, 0.5, 1);
}
.op-emp img {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 2px 6px rgba(0, 70, 140, 0.28), 0 0 0 1.5px rgba(255, 255, 255, 0.9);
  transition: box-shadow 0.2s ease;
}
/* Área de toque: llega hasta la mitad del hueco con cada vecino (app.js calcula --toque) */
.op-emp::after { content: ""; position: absolute; inset: var(--toque, -2px); }
.op-emp::before { inset: -15%; }
/* El elegido se marca sin montarse sobre sus vecinos: crece poco y el aro va por dentro */
.op-emp[aria-checked="true"] { transform: scale(1.04); }
.op-emp[aria-checked="true"]::before { opacity: 1; transform: scale(1); }
.op-emp[aria-checked="true"] img {
  outline: 3px solid #29a8ec;
  outline-offset: -3px;
  box-shadow: 0 0 0 1.5px #fff, 0 3px 8px rgba(0, 90, 170, 0.4);
}
#nombre-emp.elegido { font-weight: 700; font-size: 15px; opacity: 1; }

/* ---------- Personaje ---------- */
.porta-avatar { pointer-events: none; }
.avatar {
  position: absolute;
  left: 0;
  top: 0;
  transform-origin: 0 0;
}
.avatar .pieza { position: absolute; }
.avatar .pieza img { width: 100%; height: 100%; }
.avatar .cuerpo { z-index: 1; }
.avatar .accesorio { z-index: 2; }
.avatar .objeto { z-index: 3; }
.avatar .accesorio img.entra { animation: cae 0.5s cubic-bezier(0.3, 1.5, 0.5, 1) both; }
.avatar .objeto img.entra { animation: aparece 0.45s cubic-bezier(0.3, 1.6, 0.5, 1) both; }
.avatar .cuerpo img.entra { animation: aparece 0.4s ease both; }
@keyframes cae {
  from { transform: translateY(-40px) scale(0.9); opacity: 0; }
  to { transform: none; opacity: 1; }
}
@keyframes aparece {
  from { transform: scale(0.2); opacity: 0; }
  to { transform: none; opacity: 1; }
}
.pantalla.activa .avatar { animation: respira 3.6s ease-in-out infinite; }
@keyframes respira {
  0%, 100% { translate: 0 0; }
  50% { translate: 0 -4px; }
}

/* ---------- Pase ---------- */
/* La pastilla con el @usuario crece con el texto (hasta el ancho de su caja); app.js achica la letra si es largo */
.usuario { display: flex; justify-content: center; }
.usuario strong {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 221px;
  max-width: 100%;
  height: 100%;
  padding: 0 18px;
  overflow: hidden;
  white-space: nowrap;
  font-size: 21px;
  color: var(--tinta-fuerte);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.95), rgba(214, 240, 253, 0.9));
  border: 1.5px solid rgba(255, 255, 255, 0.95);
  border-radius: 20px;
  box-shadow: 0 4px 12px rgba(0, 90, 170, 0.2), inset 0 -3px 6px rgba(120, 190, 235, 0.35);
  user-select: text;
  -webkit-user-select: text;
}
/* Invitación a compartir el personaje en historias (pase) */
.cta { text-wrap: balance; }

/* ---------- Sticker extra: pasos para compartir en historias ---------- */
.pasos {
  display: grid;
  align-content: center;
  gap: 9px;
  padding: 12px 14px 12px 12px;
  list-style: none;
  color: var(--tinta-fuerte);
  font-size: 13.5px;
  line-height: 1.3;
  text-align: left;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.95), rgba(214, 240, 253, 0.9));
  border: 1.5px solid rgba(255, 255, 255, 0.95);
  border-radius: 22px;
  box-shadow: 0 4px 12px rgba(0, 90, 170, 0.2), inset 0 -3px 6px rgba(120, 190, 235, 0.35);
}
.pasos li { display: grid; grid-template-columns: 28px 1fr; align-items: center; gap: 10px; }
.pasos .num {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  text-shadow: 0 1px 2px rgba(0, 70, 150, 0.35);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.6), rgba(255, 255, 255, 0) 46%),
    linear-gradient(180deg, #6fd3f8 0%, #1f9ff0 55%, #3bc4f6 82%, #86e8f8 100%);
  border: 1.5px solid #fff;
  box-shadow: 0 2px 5px rgba(0, 90, 170, 0.25);
}
.pasos strong { color: var(--tinta); }

/* ---------- Aviso flotante ---------- */
#aviso {
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 0 14px;
  font-size: 14px;
  font-weight: 700;
  color: var(--tinta-fuerte);
  background: rgba(255, 255, 255, 0.92);
  border-radius: 20px;
  box-shadow: 0 6px 18px rgba(0, 80, 160, 0.25);
  opacity: 0;
  translate: 0 10px;
  pointer-events: none;
  transition: opacity 0.25s ease, translate 0.25s ease;
}
#aviso.visible { opacity: 1; translate: 0 0; }
/* Arriba, entre el botón de regresar y el de la música (app.js decide en qué pantallas) */
#aviso.arriba { top: 12px; left: calc((62 + var(--ox, 0)) * 1px); width: 281px; translate: 0 -10px; }
#aviso.arriba.visible { translate: 0 0; }

/* ---------- Diálogo ---------- */
#dialogo, .capa-dialogo {
  position: absolute;
  inset: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 26px;
  background: rgba(20, 80, 140, 0.32);
  -webkit-backdrop-filter: blur(3px);
  backdrop-filter: blur(3px);
  animation: aparece-fondo 0.25s ease both;
}
#dialogo[hidden], .capa-dialogo[hidden] { display: none; }
/* La búsqueda va arriba: el teclado del celular no la tapa */
#buscar { align-items: flex-start; padding-top: 118px; }
.dialogo-caja {
  width: 100%;
  display: grid;
  justify-items: center;
  gap: 12px;
  padding: 26px 22px 20px;
  text-align: center;
  border-radius: 28px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.97), rgba(222, 243, 254, 0.95));
  border: 1.5px solid #fff;
  box-shadow: 0 18px 40px rgba(0, 60, 130, 0.3), inset 0 -4px 10px rgba(120, 190, 235, 0.35);
  animation: cae 0.4s cubic-bezier(0.3, 1.4, 0.5, 1) both;
}
.dialogo-caja h2 { margin: 0; line-height: 1.15; }
.dialogo-caja p { margin: 0; color: var(--tinta-fuerte); font-size: 17px; line-height: 1.35; }
.dialogo-botones { display: grid; justify-items: center; gap: 8px; margin-top: 6px; }
/* Crece con el texto (CAMBIAR INSTAGRAM) para que las letras no se monten en los bordes redondeados;
   los textos cortos se quedan en 210 */
.dialogo-botones .pill { min-width: 210px; max-width: 100%; height: 60px; padding: 0 28px; white-space: nowrap; }
.dialogo-botones .enlace { position: relative; min-height: 44px; padding: 0 16px; }
.dialogo-botones .enlace::after { content: ""; position: absolute; inset: -7px -8px; }
#buscar .dialogo-botones .pill { width: 250px; }
#buscar .error { min-height: 16px; margin: -4px 0 -2px; font-size: 13px; line-height: 16px; color: var(--error); }
.caja-ig { position: relative; width: 100%; max-width: 290px; }
#b-instagram {
  display: block;
  width: 100%;
  height: 50px;
  margin: 0;
  padding: 0 12px 0 33px;
  border: 0;
  border-radius: 10px;
  background: #fff;
  box-shadow: inset 0 0 0 1.4px var(--borde-campo);
  outline: 0 solid transparent;
  outline-offset: 2px;
  font-family: var(--fuente);
  font-size: 18px;
  color: var(--tinta-fuerte);
  text-align: left;
  user-select: text;
  -webkit-user-select: text;
  -webkit-appearance: none;
  appearance: none;
}
#b-instagram::placeholder { color: #9dbbd6; font-size: 16px; }
#b-instagram:focus { box-shadow: inset 0 0 0 1.4px var(--tinta); outline: 3px solid #fff; }
#b-instagram[aria-invalid="true"] { box-shadow: inset 0 0 0 1.4px var(--error); }
.caja-ig .arroba { position: absolute; left: 14px; top: 0; bottom: 0; }
#b-instagram[aria-invalid="true"] + .arroba { color: var(--error); }
@keyframes aparece-fondo {
  from { opacity: 0; }
  to { opacity: 1; }
}
button:disabled { cursor: default; filter: saturate(0.6) opacity(0.75); }

/* Burbujas de celebración */
.festejo {
  position: absolute;
  z-index: 4;
  pointer-events: none;
  animation: burbujea var(--dur, 2.2s) ease-out both;
}
@keyframes burbujea {
  from { transform: translateY(0) scale(0.4); opacity: 0; }
  15% { opacity: 1; }
  to { transform: translateY(-260px) translateX(var(--dx, 0px)) scale(1); opacity: 0; }
}

#pase-pista.rechazado {
  font-size: 13px;
  font-weight: 700;
  color: var(--error);
  opacity: 1;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}
#pase-pista.rechazado::after { content: ""; position: absolute; inset: -14px 0 -8px; }
#pase-pista.guardando { font-size: 12px; color: var(--tinta-fuerte); opacity: 1; animation: pulsa 1.1s ease-in-out infinite alternate; }
@keyframes pulsa {
  from { opacity: 1; }
  to { opacity: 0.55; }
}

#pase-nombre { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding: 0 12px; display: block; line-height: 36px; }

#imagen-lista {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 20px;
  background: rgba(15, 50, 90, 0.82);
  color: #fff;
  font: 700 16px var(--fuente);
  text-align: center;
}
#imagen-lista p { margin: 0; }
#imagen-lista img { max-width: 100%; max-height: 72vh; border-radius: 16px; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35); -webkit-touch-callout: default; user-select: auto; -webkit-user-select: auto; }
#imagen-lista button { min-width: 140px; min-height: 46px; border-radius: 23px; background: #fff; color: var(--tinta-fuerte); font-weight: 700; }

.sin-transicion, .sin-transicion * { transition: none !important; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
