/*!
 * Entrada animada "10 años de jale" — Avanzar
 * Hoja de estilos del componente. Todas las clases usan el prefijo .ia- para no chocar con el sitio.
 */

/* Evita que el sitio se vea un instante antes de que cargue la entrada.
   Si algo falla, el sitio aparece solo a los 5 s. */
html.ia-precarga { background: #080000; }
html.ia-precarga body { opacity: 0; animation: ia-seguro 0s linear 5s forwards; }
@keyframes ia-seguro { to { opacity: 1; } }

html.ia-activa,
html.ia-activa body { overflow: hidden !important; }

.ia {
  --ia-oro-claro: #FFE6A6;
  --ia-oro: #E9B65A;
  --ia-cempasuchil: #F2861E;
  --ia-fondo: #080000;
  --ia-insignia: min(60vh, 86vw, 760px);
  position: fixed;
  inset: 0;
  z-index: 2147483000;
  overflow: hidden;
  background: var(--ia-fondo);
  color: var(--ia-oro-claro);
  font-family: 'Alegreya Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  -webkit-tap-highlight-color: transparent;
  -webkit-user-select: none;
  user-select: none;
  -webkit-font-smoothing: antialiased;
}
@supports (height: 100dvh) {
  .ia { --ia-insignia: min(60dvh, 86vw, 760px); }
}
.ia *, .ia *::before, .ia *::after { box-sizing: border-box; }

.ia-escena { position: absolute; inset: 0; isolation: isolate; }
.ia-capa { position: absolute; inset: 0; pointer-events: none; }
.ia-lienzo { display: block; width: 100%; height: 100%; }

/* ---------- Textura ---------- */
.ia-textura {
  inset: -8%;
  z-index: 0;
  background: var(--ia-fondo) url("img/textura-roja.webp") center / cover no-repeat;
  will-change: transform;
}
.ia-luz { z-index: 1; mix-blend-mode: screen; }
.ia-oscuridad { z-index: 2; background: var(--ia-fondo); }

.ia-humo { z-index: 3; overflow: hidden; }
.ia-humo i {
  position: absolute;
  width: 80vmax;
  height: 42vmax;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(255, 112, 52, .11), rgba(255, 112, 52, 0));
  animation: ia-deriva 26s ease-in-out infinite alternate;
}
.ia-humo i:nth-child(1) { left: -30vmax; bottom: -22vmax; }
.ia-humo i:nth-child(2) { right: -34vmax; bottom: -18vmax; animation-duration: 31s; animation-delay: -9s; }
.ia-humo i:nth-child(3) { left: 10vmax; bottom: -30vmax; animation-duration: 37s; animation-delay: -17s; opacity: .7; }
@keyframes ia-deriva {
  from { transform: translate3d(-6vmax, 0, 0) scale(1); }
  to   { transform: translate3d(6vmax, -4vmax, 0) scale(1.15); }
}

.ia-lienzo--fondo { z-index: 4; }
.ia-guirnaldas { z-index: 5; will-change: transform; }
.ia-lienzo--frente { z-index: 7; }
.ia-destello { z-index: 8; opacity: 0; mix-blend-mode: screen; }
.ia-vineta {
  z-index: 9;
  background: radial-gradient(ellipse 75% 70% at 50% 46%, rgba(0, 0, 0, 0) 42%, rgba(0, 0, 0, .5) 78%, rgba(0, 0, 0, .86) 100%);
}
.ia-grano {
  inset: -10%;
  z-index: 10;
  opacity: .08;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='180' height='180'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 1  0 0 0 0 .86  0 0 0 0 .7  0 0 0 .6 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
  animation: ia-grano .9s steps(6) infinite;
}
@keyframes ia-grano {
  0%   { transform: translate(0, 0); }
  20%  { transform: translate(-3%, 2%); }
  40%  { transform: translate(2%, -3%); }
  60%  { transform: translate(-2%, -1%); }
  80%  { transform: translate(3%, 3%); }
  100% { transform: translate(0, 0); }
}

/* ---------- Papel picado ---------- */
.ia-guirnalda { position: absolute; left: 0; top: 0; width: 100%; }
.ia-cordel { position: absolute; left: 0; top: 0; overflow: visible; }
.ia-bandera { position: absolute; transform-origin: 50% 0; }
.ia-bandera__mecer {
  width: 100%;
  height: 100%;
  transform-origin: 50% 0;
  animation: ia-mecer var(--d, 3s) ease-in-out var(--r, 0s) infinite alternate;
}
.ia-bandera svg { display: block; width: 100%; height: 100%; opacity: .94; }
@keyframes ia-mecer {
  from { transform: rotate(calc(var(--m, 3deg) * -1)) skewX(1.5deg); }
  to   { transform: rotate(var(--m, 3deg)) skewX(-1.5deg); }
}

/* ---------- Centro: logo, lema y botón ---------- */
.ia-centro {
  z-index: 6;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: clamp(56px, 11vh, 130px) 16px clamp(64px, 9vh, 110px);
  perspective: 1100px;
}
.ia-insignia {
  position: relative;
  flex: none;
  width: var(--ia-insignia);
  height: var(--ia-insignia);
  will-change: transform;
}
.ia-insignia__cuerpo { position: absolute; inset: 0; }
.ia-logo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  opacity: 0;
  -webkit-user-drag: none;
}
.ia-aura {
  position: absolute;
  left: 50%;
  top: 48.3%;
  width: 150%;
  height: 150%;
  border-radius: 50%;
  opacity: 0;
  transform: translate(-50%, -50%) scale(.5);
  background: radial-gradient(closest-side, rgba(255, 152, 44, .45), rgba(205, 40, 0, .16) 55%, rgba(205, 40, 0, 0));
}
.ia-onda {
  position: absolute;
  left: 50%;
  top: 48.3%;
  width: 50%;
  height: 50%;
  margin: -25% 0 0 -25%;
  border-radius: 50%;
  opacity: 0;
  border: 2px solid rgba(255, 222, 150, .9);
  box-shadow: 0 0 26px 4px rgba(255, 160, 50, .65), inset 0 0 26px 4px rgba(255, 160, 50, .5);
}
.ia-brillo {
  position: absolute;
  inset: 0;
  opacity: 0;
  background: linear-gradient(110deg, rgba(255, 246, 214, 0) 38%, rgba(255, 246, 214, .95) 48%, rgba(255, 214, 140, .6) 52%, rgba(255, 246, 214, 0) 62%);
  background-size: 260% 100%;
  background-position: 130% 0;
  -webkit-mask: url("img/logo-10-anos-760.webp") center / 100% 100% no-repeat;
  mask: url("img/logo-10-anos-760.webp") center / 100% 100% no-repeat;
  mix-blend-mode: overlay;
}

/* Calavera interactiva (conserva el nombre interno de la vela para compatibilidad con la animación) */
.ia-vela {
  --vw: clamp(112px, calc(var(--ia-insignia) * .235), 174px);
  position: absolute;
  left: 28%;
  top: 50%;
  width: 43%;
  height: 96%;
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  transform: translate(-50%, -50%);
  cursor: pointer;
  pointer-events: auto;
  opacity: 0;
  transition: opacity .8s ease;
  perspective: 620px;
  transform-style: preserve-3d;
}
.ia-cargada .ia-vela { opacity: 1; }
.ia-vela:focus-visible { outline: 3px solid #FFC530; outline-offset: 8px; border-radius: 42%; }
.ia-vela__halo {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 138%;
  height: 70%;
  border-radius: 50%;
  transform: translate(-50%, -50%) scale(.32);
  background: radial-gradient(closest-side, rgba(255, 196, 100, .6), rgba(255, 120, 40, .2) 40%, rgba(255, 120, 40, 0));
  mix-blend-mode: screen;
  animation: ia-respirar 2.6s ease-in-out infinite;
  transition: transform .6s cubic-bezier(.34, 1.56, .64, 1);
}
.ia-encendida .ia-vela__halo { transform: translate(-50%, -50%) scale(1); animation: none; }
@keyframes ia-respirar {
  50% { transform: translate(-50%, -50%) scale(.42); }
}
.ia-vela:hover .ia-vela__halo { transform: translate(-50%, -50%) scale(.52); }
.ia-calavera__personaje {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center bottom;
  filter: drop-shadow(0 18px 24px rgba(0, 0, 0, .62)) drop-shadow(0 0 18px rgba(244, 132, 34, .22));
  transform-origin: 50% 88%;
  animation: ia-anfitrion-saluda 2.7s ease-in-out infinite;
  transition: filter .3s ease;
}
.ia-vela:hover .ia-calavera__personaje { filter: drop-shadow(0 20px 28px rgba(0, 0, 0, .68)) drop-shadow(0 0 30px rgba(255, 168, 58, .55)) brightness(1.06); }
.ia-encendida .ia-calavera__personaje { animation: ia-anfitrion-despedida .9s cubic-bezier(.18,.82,.2,1) forwards; }
@keyframes ia-anfitrion-saluda {
  0%, 100% { transform: translateY(3px) rotate(-1.4deg); }
  24% { transform: translateY(-7px) rotate(1.8deg); }
  48% { transform: translateY(-3px) rotate(-1deg); }
  72% { transform: translateY(-8px) rotate(1.4deg); }
}
@keyframes ia-anfitrion-despedida {
  0% { transform: translateY(0) rotate(0) scale(1); }
  35% { transform: translateY(-12px) rotate(5deg) scale(1.06); }
  68% { transform: translateY(-4px) rotate(-4deg) scale(1.1); }
  100% { transform: translateY(0) rotate(0) scale(1.06); }
}
.ia-calavera::before {
  content: '';
  position: absolute;
  left: 50%;
  top: 48%;
  width: 128%;
  aspect-ratio: 1;
  border: 3px solid rgba(255, 214, 120, .9);
  border-radius: 50%;
  opacity: 0;
  transform: translate(-50%, -50%) scale(.55) rotateX(68deg);
  box-shadow: 0 0 24px rgba(255, 145, 38, .75), inset 0 0 20px rgba(255, 190, 78, .55);
  pointer-events: none;
}
.ia-encendida .ia-calavera::before { animation: ia-calavera-anillo .75s ease-out forwards; }
@keyframes ia-calavera-anillo {
  0% { opacity: 0; transform: translate(-50%, -50%) scale(.45) rotateX(68deg); }
  24% { opacity: 1; }
  100% { opacity: 0; transform: translate(-50%, -50%) scale(1.3) rotateX(68deg); }
}
.ia-calavera__rostro {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: clamp(2px, calc(var(--vw) * .025), 4px) solid #e0a63b;
  border-radius: 48% 48% 38% 38% / 45% 45% 55% 55%;
  background:
    radial-gradient(circle at 50% 19%, #f6a11b 0 4%, transparent 4.8%),
    radial-gradient(circle at 43% 22%, #9b1e28 0 3.2%, transparent 4%),
    radial-gradient(circle at 57% 22%, #9b1e28 0 3.2%, transparent 4%),
    linear-gradient(135deg, #fff3ca 0%, #d9b46f 49%, #fff0bf 74%, #b98136 100%);
  box-shadow:
    inset 15px 3px 18px rgba(255, 255, 225, .58),
    inset -17px -9px 22px rgba(76, 16, 11, .38),
    0 3px 0 #bc7628,
    0 7px 0 #7e3e20,
    0 13px 22px rgba(0, 0, 0, .68),
    0 0 24px rgba(242, 134, 30, .28);
  filter: saturate(.88);
  transform-origin: 50% 58%;
  transform-style: preserve-3d;
  animation: ia-calavera-flotar 3.4s ease-in-out infinite;
  transition: transform .45s cubic-bezier(.34, 1.56, .64, 1), filter .45s ease, box-shadow .45s ease;
}
.ia-vela:hover .ia-calavera__rostro { animation-duration: 1.65s; filter: saturate(1.08) brightness(1.08); }
.ia-encendida .ia-calavera__rostro {
  animation: ia-calavera-impacto .82s cubic-bezier(.18,.82,.2,1) forwards;
  filter: brightness(1.22) saturate(1.14);
  box-shadow: inset 15px 3px 18px rgba(255,255,225,.7), inset -17px -9px 22px rgba(76,16,11,.35), 0 5px 0 #bc7628, 0 10px 0 #7e3e20, 0 0 52px rgba(255,169,54,.95);
}
@keyframes ia-calavera-flotar {
  0%, 100% { transform: translateY(2px) rotateX(-3deg) rotateY(-9deg) rotateZ(-1deg); }
  50% { transform: translateY(-9px) rotateX(5deg) rotateY(9deg) rotateZ(1deg); }
}
@keyframes ia-calavera-impacto {
  0% { transform: translateY(0) rotateX(0) rotateY(0) scale(1); }
  28% { transform: translateY(-12px) rotateX(-12deg) rotateY(28deg) scale(1.13); }
  58% { transform: translateY(-4px) rotateX(7deg) rotateY(-18deg) scale(1.2); }
  100% { transform: translateY(0) rotateX(0) rotateY(0) scale(1.12); }
}
.ia-calavera__rostro::before,
.ia-calavera__rostro::after {
  content: '';
  position: absolute;
  bottom: -2%;
  width: 27%;
  height: 31%;
  background: inherit;
  border-bottom: inherit;
  z-index: -1;
}
.ia-calavera__rostro::before { left: 13%; border-left: inherit; border-radius: 0 0 0 60%; transform: rotate(9deg); }
.ia-calavera__rostro::after { right: 13%; border-right: inherit; border-radius: 0 0 60% 0; transform: rotate(-9deg); }
.ia-calavera__ojo {
  position: absolute;
  top: 37%;
  width: 28%;
  aspect-ratio: 1;
  border: clamp(3px, calc(var(--vw) * .032), 6px) solid #e37d1f;
  border-radius: 48% 52% 48% 52%;
  background: radial-gradient(circle, #2a0710 0 46%, #65152c 48% 62%, #1b0509 64%);
  box-shadow: 0 0 0 3px #7e202e, inset 0 0 10px #000;
  transform-style: preserve-3d;
}
.ia-calavera__ojo--izq { left: 14%; transform: translateZ(7px) rotate(-8deg); }
.ia-calavera__ojo--der { right: 14%; transform: translateZ(7px) rotate(8deg); }
.ia-calavera__nariz {
  position: absolute;
  left: 50%;
  top: 61%;
  width: 14%;
  height: 13%;
  transform: translateX(-50%) translateZ(9px);
  clip-path: polygon(50% 0, 100% 100%, 52% 79%, 0 100%);
  background: #310913;
}
.ia-calavera__boca {
  position: absolute;
  left: 27%;
  right: 27%;
  bottom: 10%;
  height: 16%;
  border-top: 4px solid #5d1721;
  border-radius: 50%;
  background: repeating-linear-gradient(90deg, transparent 0 13%, #64202a 13% 17%, transparent 17% 29%);
  transform: translateZ(8px);
}
.ia-calavera__flor {
  position: absolute;
  left: 50%;
  top: 8%;
  width: 20%;
  aspect-ratio: 1;
  transform: translateX(-50%) translateZ(10px) rotate(45deg);
  border-radius: 45%;
  background: #8e1834;
  box-shadow: 0 -.42em 0 #e4871d, .42em 0 0 #e4871d, 0 .42em 0 #e4871d, -.42em 0 0 #e4871d;
}
.ia-calavera__adorno { position: absolute; top: 28%; width: 15%; height: 7%; border-top: 3px solid #7f1d30; border-radius: 50%; }
.ia-calavera__adorno--izq { left: 9%; transform: rotate(-28deg); }
.ia-calavera__adorno--der { right: 9%; transform: rotate(28deg); }
/* Elementos técnicos usados por la secuencia original; no forman parte de la nueva figura. */
.ia-vela__llama, .ia-vela__mecha, .ia-vela__cuerpo { position: absolute; left: 50%; top: 50%; width: 1px; height: 1px; opacity: 0; pointer-events: none; }

.ia-invitacion {
  position: absolute;
  left: 40%;
  top: 21%;
  width: 60%;
  max-width: none;
  margin: 0;
  padding: clamp(18px, 3.4vw, 34px) clamp(16px, 3vw, 30px);
  border: 2px solid rgba(233, 182, 90, .82);
  border-radius: 28px 28px 28px 8px;
  background: linear-gradient(145deg, rgba(255, 240, 196, .97), rgba(222, 169, 82, .94));
  box-shadow: 0 18px 50px rgba(0, 0, 0, .62), inset 0 1px 0 rgba(255, 255, 255, .65), 0 0 30px rgba(240, 128, 28, .18);
  transform: rotate(1deg);
  text-align: left;
  color: #4b0b08;
  opacity: 0;
  transition: opacity .8s ease .3s;
  pointer-events: none;
}
.ia-invitacion::before {
  content: '';
  position: absolute;
  left: -22px;
  bottom: 25%;
  width: 38px;
  height: 32px;
  background: #e3ae5a;
  clip-path: polygon(100% 0, 100% 100%, 0 78%);
}
.ia-invitacion strong {
  display: block;
  font-family: 'Alegreya Sans', system-ui, sans-serif;
  font-weight: 800;
  font-size: clamp(1rem, calc(var(--ia-insignia) * .036), 1.55rem);
  line-height: 1.14;
  letter-spacing: .025em;
  text-wrap: balance;
  text-align: center;
  text-shadow: 0 1px 0 rgba(255,255,255,.5);
}
.ia-invitacion strong span { display: block; white-space: nowrap; }
.ia-invitacion small { display: block; margin-top: 1em; font-size: clamp(.78rem, 1.5vw, .96rem); color: rgba(75, 11, 8, .68); }
.ia-cargada .ia-invitacion { opacity: 1; }
.ia-encendida .ia-invitacion { opacity: 0; transition-delay: 0s; transition-duration: .35s; }
.ia-invitacion .ia-texto-tactil { display: none; }
@media (hover: none) {
  .ia-invitacion .ia-texto-raton { display: none; }
  .ia-invitacion .ia-texto-tactil { display: block; }
}
@media (max-width: 640px) {
  .ia-vela { left: 50%; top: 36%; width: 52%; height: 66%; }
  .ia-invitacion {
    left: 50%;
    top: 69%;
    width: min(94%, 360px);
    padding: 15px 16px 14px;
    transform: translateX(-50%) rotate(.5deg);
    border-radius: 20px 20px 20px 7px;
    text-align: center;
  }
  .ia-invitacion::before {
    left: 28%;
    top: -18px;
    bottom: auto;
    transform: rotate(86deg);
  }
  .ia-invitacion strong { font-size: clamp(.92rem, 4.2vw, 1.16rem); line-height: 1.14; }
  .ia-invitacion strong span { white-space: nowrap; }
  .ia-invitacion small { margin-top: .6em; font-size: .78rem; }
}

/* Mensaje que aparece antes del logo */
.ia-mensaje {
  z-index: 6;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(84px, 17vh, 180px) 7vw clamp(72px, 11vh, 130px);
}
.ia-mensaje p {
  margin: 0;
  max-width: 30ch;
  padding: clamp(1.05rem, 2.8vw, 2rem) clamp(1.2rem, 4vw, 3rem);
  border: 1px solid rgba(246, 203, 110, .5);
  border-radius: clamp(20px, 3vw, 34px);
  background:
    linear-gradient(145deg, rgba(41, 5, 8, .9), rgba(17, 3, 6, .84)),
    radial-gradient(circle at 50% 0, rgba(208, 143, 47, .18), transparent 58%);
  box-shadow:
    0 22px 70px rgba(0, 0, 0, .48),
    inset 0 1px 0 rgba(255, 243, 201, .14),
    0 0 42px rgba(132, 24, 20, .24);
  backdrop-filter: blur(9px);
  -webkit-backdrop-filter: blur(9px);
  font-family: 'Alegreya Sans', system-ui, sans-serif;
  font-weight: 800;
  font-size: clamp(1.55rem, min(3.8vw, 5.4vh), 3.35rem);
  line-height: 1.12;
  letter-spacing: .015em;
  text-align: center;
  text-wrap: balance;
  filter: drop-shadow(0 4px 12px rgba(0, 0, 0, .5));
}
.ia-mensaje .ia-palabra {
  opacity: 0;
  background: linear-gradient(180deg, #FFF9E9 0%, #FFE1A0 62%, #F4B64F 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
}

/* Lema opcional bajo el logo */
.ia-lema {
  position: relative;
  margin: clamp(.2rem, 1.6vh, 1.1rem) 0 0;
  max-width: 92vw;
  font-family: 'Rye', Georgia, serif;
  font-weight: 400;
  font-size: clamp(1.35rem, min(3.4vw, 4.6vh), 2.6rem);
  line-height: 1.18;
  text-align: center;
  filter: drop-shadow(0 2px 0 rgba(58, 6, 0, .95)) drop-shadow(0 0 16px rgba(255, 140, 40, .35));
}
.ia-palabra { display: inline-block; white-space: nowrap; }
.ia-letra {
  display: inline-block;
  opacity: 0;
  background: linear-gradient(180deg, #FFF3C9 8%, #F6CB6E 46%, #D08F2F 74%, #9A5A16 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
}

/* Botón Entrar */
.ia-entrar {
  margin-top: clamp(.8rem, 2.6vh, 1.6rem);
  padding: .9em 2.5em .82em;
  border: 1.5px solid var(--ia-oro);
  border-radius: 999px;
  background: radial-gradient(120% 140% at 50% 0%, #5a0c06 0%, #2a0302 60%, #160101 100%);
  box-shadow: 0 0 0 4px rgba(233, 182, 90, .16), 0 10px 30px rgba(0, 0, 0, .6), inset 0 1px 0 rgba(255, 230, 170, .25);
  color: var(--ia-oro-claro);
  font: 400 clamp(1rem, 1.6vw, 1.25rem)/1 'Rye', Georgia, serif;
  letter-spacing: .04em;
  cursor: pointer;
  pointer-events: auto;
  opacity: 0;
  visibility: hidden;
  transition: transform .25s ease, box-shadow .25s ease, background .25s ease;
}
.ia-entrar:hover {
  transform: translateY(-2px);
  background: radial-gradient(120% 140% at 50% 0%, #7a1408 0%, #3a0603 60%, #1c0101 100%);
  box-shadow: 0 0 0 6px rgba(233, 182, 90, .26), 0 0 36px rgba(255, 150, 40, .45), inset 0 1px 0 rgba(255, 230, 170, .35);
}
.ia-entrar:active { transform: translateY(0) scale(.98); }
.ia-entrar:focus-visible { outline: 3px solid #FFC530; outline-offset: 5px; }

/* Controles inferiores */
.ia-controles {
  position: absolute;
  z-index: 20;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 0 max(16px, env(safe-area-inset-right)) max(14px, env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left));
  pointer-events: none;
  opacity: 0;
  transition: opacity .8s ease .6s;
}
.ia-cargada .ia-controles { opacity: 1; }
.ia-control {
  display: inline-flex;
  align-items: center;
  gap: .5em;
  padding: .55em 1em;
  border: 1px solid rgba(233, 182, 90, .28);
  border-radius: 999px;
  background: rgba(20, 2, 1, .4);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  color: rgba(255, 230, 170, .75);
  font: 500 .95rem/1 'Alegreya Sans', system-ui, -apple-system, sans-serif;
  cursor: pointer;
  pointer-events: auto;
  transition: color .2s ease, border-color .2s ease, background .2s ease;
}
.ia-control:hover { color: var(--ia-oro-claro); border-color: rgba(233, 182, 90, .7); background: rgba(40, 4, 2, .6); }
.ia-control:focus-visible { outline: 3px solid #FFC530; outline-offset: 3px; }
.ia-control svg { width: 1.15em; height: 1.15em; flex: none; }
.ia-control .ia-icono-on { display: none; }
.ia-control[aria-pressed="true"] .ia-icono-on { display: block; }
.ia-control[aria-pressed="true"] .ia-icono-off { display: none; }
.ia-sonido[aria-pressed="true"] { cursor: default; }
.ia-sonido[aria-pressed="false"] {
  color: var(--ia-oro-claro);
  border-color: rgba(233, 182, 90, .62);
  background: rgba(40, 4, 2, .68);
}
.ia-sonido-bloqueado .ia-sonido[aria-pressed="false"] {
  animation: ia-pulso-sonido 1.6s ease-in-out infinite;
}
.ia-sonido:disabled { cursor: wait; opacity: .72; }
@keyframes ia-pulso-sonido {
  0%, 100% { box-shadow: 0 0 0 0 rgba(233, 182, 90, 0); }
  50% { box-shadow: 0 0 0 7px rgba(233, 182, 90, .16); }
}

/* Anillo dorado del portal de salida (vive fuera de .ia) */
.ia-portal {
  position: fixed;
  z-index: 2147483001;
  border-radius: 50%;
  border: 2px solid rgba(255, 214, 140, .95);
  box-shadow: 0 0 28px 6px rgba(255, 160, 50, .65), inset 0 0 28px 6px rgba(255, 160, 50, .45);
  pointer-events: none;
}

.ia-oculto {
  position: absolute !important;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 640px) {
  .ia-salto { display: none; }
  .ia-mensaje p { max-width: 25ch; padding: 1.15rem 1.2rem; }
  .ia-control { font-size: .88rem; padding: .5em .85em; }
}

@media (prefers-reduced-motion: reduce) {
  .ia-bandera__mecer,
  .ia-grano,
  .ia-humo i,
  .ia-vela__fuego,
  .ia-vela__halo,
  .ia-vela__mecha { animation: none !important; }
}
