/* MUTACORE · interactivos (incubadora, ruleta, duelo, evolución, quiz, rueda de elementos).
   Usa los tokens y piezas de sitio.css (panel con chaflán, boton, placa, filtro, chip, naipe). Todo con prefijo ia-.
   Celular primero: blancos de 44 px como mínimo. */

.ia-seccion { padding: 14px 0; scroll-margin-top: 76px; }
.ia-indice { margin: 4px 0 6px; }
.ia-indice a { text-decoration: none; min-height: 44px; }
.ia-indice a[aria-current="true"] { color: #fff; border-color: var(--acento); box-shadow: 0 0 12px rgba(56, 214, 255, .35); }
.ia-cta { margin: 26px 0 40px; display: flex; flex-wrap: wrap; gap: 14px; align-items: center; justify-content: space-between; }
.ia-cta p { margin: 0; max-width: 620px; }

/* ---------- panel de componente ---------- */
.ia { padding: 18px 16px 20px; }
.ia-cab { display: flex; gap: 12px; align-items: flex-start; margin-bottom: 14px; }
.ia-cab .ico { width: 46px; height: 52px; font-size: 1.2rem; margin-top: 2px; }
.ia-cab .ia-tit { font-size: clamp(1.3rem, 4.4vw, 1.75rem); margin: 0 0 .15em; text-shadow: var(--contorno-texto); }
.ia-cab .ia-tit::after { display: none; }
.ia-cab p { margin: 0; font-size: .95rem; max-width: 640px; }
.ia-columna { display: grid; gap: 12px; min-width: 0; align-content: start; }
.ia-mini-tit { display: block; font: 700 .74rem var(--t-titulo); text-transform: uppercase; letter-spacing: .08em; color: var(--c, var(--suave)); margin-bottom: 6px; }
.ia-acciones { gap: 10px; }
.ia-nota { margin: 10px 0 0; display: flex; gap: 6px; align-items: flex-start; }
.ia-nota .gl { color: var(--acento); margin-top: 3px; }
.ia button { touch-action: manipulation; }
.ia [hidden] { display: none !important; }
/* Los hijos de grilla no se estiran por las tiras con scroll horizontal. */
.ia-cuerpo, .ia-inc > *, .ia-rul > *, .ia-evo > *, .ia-elem > *, .ia-duelo > *, .ia-duelo-sel > *, .ia-quiz > *, .ia-quiz-res > *, .ia-sel-caja { min-width: 0; max-width: 100%; }

/* Diseños de dos columnas en pantallas grandes. */
.ia-inc, .ia-rul, .ia-evo, .ia-elem { display: grid; gap: 16px; }
@media (min-width: 900px) {
  .ia-inc, .ia-evo { grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); align-items: start; }
  .ia-rul { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: start; }
  .ia-elem { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: center; }
  .ia { padding: 24px 26px 26px; }
}

/* ---------- escenario 3D (lienzo compartido) ---------- */
.ia-escenario {
  position: relative; display: block; width: 100%; aspect-ratio: 1 / 1; max-height: 520px; padding: 0; margin: 0; border: 0; color: inherit; font: inherit;
  border-radius: 12px; overflow: hidden; cursor: pointer; isolation: isolate;
  background:
    radial-gradient(60% 55% at 50% 62%, rgba(56, 214, 255, .16), transparent 70%),
    linear-gradient(rgba(56, 214, 255, .06) 1px, transparent 1px) 0 0 / 28px 28px,
    linear-gradient(90deg, rgba(56, 214, 255, .06) 1px, transparent 1px) 0 0 / 28px 28px,
    linear-gradient(180deg, #13244f, #070d20);
  box-shadow: inset 0 0 0 2px rgba(56, 214, 255, .25), inset 0 -40px 60px rgba(0, 0, 0, .35);
  -webkit-user-select: none; user-select: none; -webkit-touch-callout: none;
}
div.ia-escenario { cursor: default; }
.ia-lienzo { position: absolute; inset: 0; width: 100%; height: 100%; display: block; z-index: 1; pointer-events: none; }
.ia-capa { position: absolute; inset: 0; z-index: 3; pointer-events: none; }
.ia-capa button, .ia-capa a { pointer-events: auto; }
.ia-pista {
  position: absolute; left: 50%; bottom: 14px; transform: translateX(-50%); display: inline-flex; gap: 8px; align-items: center; white-space: nowrap;
  padding: 6px 14px; border-radius: 999px; background: rgba(4, 8, 22, .7); border: 1px solid rgba(56, 214, 255, .4);
  font: 700 .9rem var(--t-titulo); text-transform: uppercase; letter-spacing: .05em; color: #fff; transition: opacity .3s ease;
  animation: ia-latido 1.6s ease-in-out infinite;
}
.ia-pista .gl { color: var(--exito); }
.ia-pista.oculta { opacity: 0; }
@keyframes ia-latido { 50% { transform: translateX(-50%) scale(1.06); } }

/* Barra (Ui.Bar) */
.ia .pista { --c: var(--acento); position: relative; display: block; height: 18px; border-radius: 5px; overflow: hidden; background: var(--contorno); box-shadow: 0 0 0 2px color-mix(in srgb, var(--c) 30%, black), inset 0 2px 4px rgba(0, 0, 0, .6); }
.ia .pista > b { display: block; height: 100%; width: 0; border-radius: 5px; background: linear-gradient(180deg, rgba(255, 255, 255, .45), rgba(255, 255, 255, 0) 16%, rgba(255, 255, 255, 0) 30%, rgba(0, 0, 0, .35)), var(--c); box-shadow: 0 0 10px color-mix(in srgb, var(--c) 60%, transparent); transition: width .35s var(--suave-ease); }
.ia .pista > .v { position: absolute; inset: 0; display: grid; place-items: center; font-size: .72rem; color: #fff; text-shadow: var(--contorno-texto); }
.ia-progreso { display: grid; grid-template-columns: auto 1fr; gap: 10px; align-items: center; font: 700 .78rem var(--t-titulo); text-transform: uppercase; letter-spacing: .06em; color: var(--suave); }

/* Probabilidades */
.ia-odds ul { list-style: none; margin: 0 0 6px; padding: 0; display: grid; gap: 4px; }
.ia-odds li { display: grid; grid-template-columns: 12px 1fr auto; gap: 8px; align-items: center; font-size: .9rem; padding: 3px 0; border-bottom: 1px solid rgba(56, 214, 255, .08); }
.ia-odds li:last-child { border-bottom: 0; }
.ia-odds li i { width: 10px; height: 10px; border-radius: 3px; transform: rotate(45deg); background: var(--c); box-shadow: 0 0 8px var(--c); }
.ia-odds li b { color: var(--c); }
.ia-odds .tenue { margin: 6px 0 0; font-size: .82rem; }

/* Selector de mutante */
.ia-selector { display: flex; gap: 8px; overflow-x: auto; padding: 4px 2px 10px; scroll-snap-type: x proximity; scrollbar-width: thin; -webkit-overflow-scrolling: touch; }
.ia-opcion {
  --c: var(--acento); flex: none; scroll-snap-align: center; display: grid; justify-items: center; gap: 2px; width: 84px; min-height: 88px; padding: 4px 4px 6px; cursor: pointer;
  border-radius: 10px; border: 2px solid color-mix(in srgb, var(--c) 35%, transparent); background: linear-gradient(180deg, #1a2d5e, var(--placa)); color: var(--suave);
  font: 700 .68rem var(--t-titulo); text-transform: uppercase; letter-spacing: .02em; transition: transform .15s var(--rebote), border-color .15s ease, box-shadow .15s ease;
}
.ia-opcion img, .ia-opcion .ia-sinimg { width: 56px; height: 56px; object-fit: contain; filter: drop-shadow(0 4px 4px rgba(0, 0, 0, .5)); }
.ia-opcion span { max-width: 100%; text-align: center; line-height: 1.12; overflow-wrap: break-word; hyphens: auto; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; } /* 2 renglones: «Chispabicho», «Giant Quartz» o «チスパビチョ» ya no se cortan */
.ia-opcion:hover { transform: translateY(-2px); border-color: var(--c); }
.ia-opcion[aria-checked="true"] { border-color: var(--c); color: #fff; box-shadow: 0 0 0 2px color-mix(in srgb, var(--c) 40%, black), 0 0 14px color-mix(in srgb, var(--c) 60%, transparent); background: linear-gradient(180deg, color-mix(in srgb, var(--c) 30%, #1a2d5e), var(--placa)); }
.ia-opcion.azar { --c: var(--oro); color: var(--oro); align-content: center; }
.ia-opcion.azar .gl { width: 34px; height: 34px; }
.ia-sinimg { display: grid; place-items: center; border-radius: 50%; background: radial-gradient(circle, color-mix(in srgb, var(--c) 45%, transparent), transparent 70%); color: #fff; }
.ia-sinimg .gl { width: 55%; height: 55%; }

/* Revelación de carta */
.ia-revela { --c: #fff; text-align: center; animation: ia-entra .5s var(--rebote) both; }
.ia-revela[hidden] { display: none; }
.ia-nacio { font: 700 1.35rem var(--t-titulo); margin: 0 0 10px; color: #fff; text-shadow: var(--contorno-texto), 0 0 18px var(--c, #38d6ff); }
.ia-carta-box { width: min(230px, 66vw); margin: 0 auto 12px; position: relative; }
.ia-carta-box::before { content: ""; position: absolute; inset: -18%; z-index: -1; background: radial-gradient(circle, color-mix(in srgb, var(--c) 55%, transparent), transparent 65%); animation: ia-respira 2.4s ease-in-out infinite; pointer-events: none; }
.ia-revela .ia-acciones, .ia-quiz-final .ia-acciones { justify-content: center; }
.ia-revela.r-Legendary .ia-carta-box::after, .ia-revela.r-Epic .ia-carta-box::after { content: ""; position: absolute; inset: -30%; z-index: -1; background: conic-gradient(from 0deg, transparent, color-mix(in srgb, var(--c) 60%, transparent) 10%, transparent 20%, transparent 50%, color-mix(in srgb, var(--c) 60%, transparent) 60%, transparent 70%); border-radius: 50%; animation: ia-gira 6s linear infinite; pointer-events: none; }
@keyframes ia-entra { from { opacity: 0; transform: scale(.8) translateY(10px); } }
@keyframes ia-respira { 50% { opacity: .55; transform: scale(.94); } }
@keyframes ia-gira { to { transform: rotate(1turn); } }

/* Destello y ráfaga */
.ia-escenario, .ia-rueda-caja, .ia-quiz-final { position: relative; }
.ia-destello { position: absolute; inset: 0; z-index: 6; pointer-events: none; border-radius: inherit; background: radial-gradient(circle at 50% 50%, #fff, var(--c) 35%, transparent 75%); opacity: 0; animation: ia-destello .9s ease-out both; }
@keyframes ia-destello { 0% { opacity: 0; transform: scale(.6); } 12% { opacity: var(--f, 1); transform: scale(1.1); } 100% { opacity: 0; transform: scale(1.6); } }
.ia-rafaga { position: absolute; left: 50%; top: 50%; z-index: 7; pointer-events: none; }
.ia-rafaga i { position: absolute; width: 8px; height: 8px; margin: -4px; border-radius: 2px; background: var(--c); box-shadow: 0 0 10px var(--c); animation: ia-chispa var(--d, .8s) cubic-bezier(.15, .7, .3, 1) both; }
@keyframes ia-chispa { from { transform: translate(0, 0) rotate(0) scale(1.2); opacity: 1; } to { transform: translate(var(--x), var(--y)) rotate(200deg) scale(.3); opacity: 0; } }

/* Huevo 2D (sin WebGL o mientras llega el 3D) */
.ia-huevo2d { position: absolute; inset: 0; z-index: 2; display: grid; place-items: center; --calor: 0; }
.ia-huevo2d[hidden] { display: none; }
.ia-huevo2d .cascara { width: 38%; aspect-ratio: 100 / 130; border-radius: 50% 50% 46% 46% / 60% 60% 40% 40%; background: radial-gradient(circle at 35% 30%, #fff, #cfe0fa 45%, #8fa8d8); box-shadow: 0 0 calc(var(--calor) * 60px) rgba(255, 180, 74, calc(var(--calor) * .9)), inset -10px -14px 24px rgba(40, 60, 120, .35); position: relative; transform-origin: 50% 90%; }
.ia-huevo2d .cascara svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.ia-huevo2d .grietas path { fill: none; stroke: #ffb44a; stroke-width: 2.4; stroke-linecap: round; filter: drop-shadow(0 0 3px #ffb44a); }
.ia-huevo2d.tiembla .cascara { animation: ia-tiembla .35s ease-out; }
.ia-huevo2d.abierto .cascara { animation: ia-revienta .45s ease-in both; }
.ia-huevo2d .nacido { position: absolute; inset: 12%; display: grid; place-items: center; }
.ia-huevo2d .nacido img { width: 80%; height: auto; animation: ia-entra .6s var(--rebote) both; filter: drop-shadow(0 10px 12px rgba(0, 0, 0, .5)); }
@keyframes ia-tiembla { 20% { transform: rotate(-8deg) scale(1.04, .96); } 45% { transform: rotate(6deg); } 70% { transform: rotate(-3deg); } }
@keyframes ia-revienta { to { transform: scale(1.4); opacity: 0; filter: brightness(3); } }
.ia-inc-esc.con-3d .ia-huevo2d { display: none; }

/* ---------- Ruleta ---------- */
.ia-rueda-caja { width: min(100%, 420px); margin: 0 auto; aspect-ratio: 224 / 230; }
.ia-rueda { width: 100%; height: 100%; display: block; overflow: visible; }
.ia-rueda-marco { fill: #070d20; stroke: #38d6ff; stroke-width: 2.5; filter: drop-shadow(0 0 10px rgba(56, 214, 255, .45)); }
.ia-rueda .seg { fill: color-mix(in srgb, var(--c) 70%, #0a122a); stroke: #040816; stroke-width: 1.2; }
.ia-rueda .seg.e { fill: color-mix(in srgb, var(--c) 30%, #0e1a3c); }
.ia-rueda text { fill: #fff; font: 700 10px var(--t-tec); text-anchor: middle; dominant-baseline: middle; paint-order: stroke; stroke: #040816; stroke-width: 2.5px; }
.ia-rueda .gema { fill: #fff; filter: drop-shadow(0 0 3px #ffbe28); }
.ia-rueda .gl-e { fill: #fff; filter: drop-shadow(0 1px 0 #040816); }
.ia-rueda .aguja path { fill: #ffc83c; stroke: #040816; stroke-width: 2; stroke-linejoin: round; }
.ia-girar { position: absolute; left: 50%; top: 50.5%; transform: translate(-50%, -50%); width: 30%; aspect-ratio: 1; min-width: 72px; min-height: 72px; padding: 0; border-radius: 50%; font-size: clamp(.8rem, 3.2vw, 1.05rem); }
.ia-girar:hover { transform: translate(-50%, -50%) scale(1.05); }
.ia-girar:active { transform: translate(-50%, -50%) scale(.94); padding: 0; }
.ia-girar[disabled] { --b: #6a5420; transform: translate(-50%, -50%); }
.ia-rul-banner { position: absolute; left: 50%; bottom: -4px; transform: translateX(-50%); z-index: 5; display: grid; justify-items: center; gap: 2px; min-width: 70%; padding: 6px 16px 8px; border-radius: 10px; background: linear-gradient(180deg, color-mix(in srgb, var(--c) 40%, #0e1a3c), #0a122a); border: 2px solid var(--c); box-shadow: 0 0 22px color-mix(in srgb, var(--c) 60%, transparent); animation: ia-entra .45s var(--rebote) both; }
.ia-rul-banner[hidden] { display: none; }
.ia-rul-banner b { font: 700 1.25rem var(--t-titulo); text-transform: uppercase; letter-spacing: .06em; color: var(--c); text-shadow: var(--contorno-texto); }
.ia-rul-banner span { display: inline-flex; gap: 6px; align-items: center; font: 700 1rem var(--t-titulo); }
.ia-rul-banner.g-Legendary b { background: var(--irisado); background-size: 300% 100%; -webkit-background-clip: text; background-clip: text; color: transparent; animation: irisado 3s linear infinite; text-shadow: none; filter: drop-shadow(0 1.5px 0 #040816); }
.ia-rul-cab { display: flex; gap: 12px; align-items: center; margin-bottom: 8px; }
.ia-rul-cab > div { display: grid; }
.ia-rul-cab b { font: 700 1.15rem var(--t-titulo); }
.ia-rul-img { width: 64px; height: 64px; object-fit: contain; flex: none; filter: drop-shadow(0 6px 6px rgba(0, 0, 0, .5)); }
.ia-etapas { margin-bottom: 6px; }
.ia-etapas .filtro { min-height: 44px; }
.ia-stats { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.ia-stats li { display: grid; grid-template-columns: 22px 1fr auto; gap: 8px; align-items: center; padding: 6px 8px; border-radius: 8px; font-size: .92rem; transition: background .3s ease; }
.ia-stats li > .gl { color: var(--c); width: 20px; height: 20px; }
.ia-stats li b em { font-style: normal; color: var(--g, var(--exito)); text-shadow: 0 0 10px var(--g, var(--exito)); }
.ia-stats li b small { font-size: .72rem; color: var(--g, var(--exito)); }
.ia-stats li.toca { background: color-mix(in srgb, var(--g, var(--exito)) 18%, transparent); box-shadow: inset 0 0 0 1.5px var(--g, var(--exito)); animation: ia-entra .5s var(--rebote) both; }

/* ---------- Duelo ---------- */
.ia-duelo { display: grid; gap: 12px; }
.ia-duelo-sel { display: grid; gap: 6px; }
@media (min-width: 900px) { .ia-duelo-sel { grid-template-columns: 1fr 1fr; gap: 16px; } }
.ia-arena { aspect-ratio: 4 / 3; max-height: 560px; }
@media (min-width: 700px) { .ia-arena { aspect-ratio: 16 / 9; } }
.ia-hud { position: absolute; left: 10px; right: 10px; top: 10px; display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.ia-vida { display: grid; gap: 3px; min-width: 0; }
.ia-vida.l1 { text-align: end; }
.ia-vida-nom { display: inline-flex; gap: 5px; align-items: center; font: 700 .9rem var(--t-titulo); text-shadow: var(--contorno-texto); overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.ia-vida.l1 .ia-vida-nom { justify-content: flex-end; }
.ia-vida-nom .gl { color: var(--c); flex: none; }
.ia-vida .pista { height: 16px; }
.ia-vida.l1 .pista > b { margin-inline-start: auto; }
.ia-vida.golpe .pista { animation: ia-sacude .25s ease-out; }
.ia-mult { font: 700 .68rem var(--t-titulo); text-transform: uppercase; letter-spacing: .05em; min-height: 1em; }
.ia-mult.bien { color: var(--exito); }
.ia-mult.mal { color: var(--peligro); }
@keyframes ia-sacude { 30% { transform: translateX(-4px); } 60% { transform: translateX(3px); } }
.ia-numeros { position: absolute; inset: 0; overflow: hidden; }
.ia-num { position: absolute; transform: translate(-50%, -50%); font: 700 1.25rem var(--t-titulo); color: #fff; text-shadow: var(--contorno-texto); animation: ia-sube 1s ease-out both; white-space: nowrap; }
.ia-num.bien { color: #ffe27a; }
.ia-num.mal { color: #b8c4d8; font-size: 1.05rem; }
.ia-num.fuerte { font-size: 1.7rem; color: #ffd246; }
@keyframes ia-sube { 0% { opacity: 0; transform: translate(-50%, -20%) scale(.6); } 15% { opacity: 1; transform: translate(-50%, -60%) scale(1.2); } 100% { opacity: 0; transform: translate(-50%, -260%) scale(1); } }
.ia-poder { position: absolute; transform: translate(-50%, -50%); padding: 3px 10px; border-radius: 6px; background: rgba(4, 8, 22, .75); border: 1.5px solid var(--c); color: #fff; font: 700 .8rem var(--t-titulo); text-transform: uppercase; letter-spacing: .04em; white-space: nowrap; box-shadow: 0 0 12px color-mix(in srgb, var(--c) 60%, transparent); animation: ia-poder 1.3s ease-out both; }
@keyframes ia-poder { 0% { opacity: 0; transform: translate(-50%, -30%) scale(.7); } 15% { opacity: 1; transform: translate(-50%, -50%) scale(1.08); } 80% { opacity: 1; } 100% { opacity: 0; transform: translate(-50%, -120%); } }
.ia-vs { position: absolute; left: 50%; top: 46%; transform: translate(-50%, -50%); font: 700 clamp(3rem, 12vw, 5.5rem) var(--t-titulo); color: #ffc83c; text-shadow: var(--contorno-texto), 0 0 30px rgba(255, 150, 40, .8); animation: ia-vs .9s var(--rebote) both; }
.ia-vs[hidden] { display: none; }
@keyframes ia-vs { 0% { opacity: 0; transform: translate(-50%, -50%) scale(2.4); } 40% { opacity: 1; transform: translate(-50%, -50%) scale(1); } 85% { opacity: 1; } 100% { opacity: 0; transform: translate(-50%, -50%) scale(.8); } }
.ia-final { position: absolute; inset: 0; display: grid; place-items: center; background: radial-gradient(circle, rgba(4, 8, 22, .55), rgba(4, 8, 22, .85)); }
.ia-final[hidden] { display: none; }
.ia-final-caja { display: grid; justify-items: center; gap: 4px; text-align: center; padding: 10px 16px; animation: ia-entra .5s var(--rebote) both; }
.ia-final-caja > b { font: 700 clamp(1.3rem, 4.8vw, 2rem) var(--t-titulo); text-shadow: var(--contorno-texto), 0 0 20px var(--c); }
.ia-final-img { width: clamp(80px, 22vw, 140px); height: auto; filter: drop-shadow(0 8px 10px rgba(0, 0, 0, .6)) drop-shadow(0 0 16px var(--c)); }
.ia-corona { color: var(--oro); }
.ia-corona .gl { width: 36px; height: 36px; filter: drop-shadow(0 0 10px rgba(255, 200, 60, .8)); }
.ia-arena2d { position: absolute; inset: 0; z-index: 1; display: grid; grid-template-columns: 1fr 1fr; align-items: end; padding: 18% 6% 8%; }
.ia-arena.con-3d .ia-arena2d { display: none; }
.ia-luchador { display: grid; place-items: center; }
.ia-luchador img, .ia-luchador .ia-sinimg { width: min(80%, 220px); height: auto; aspect-ratio: 1; object-fit: contain; filter: drop-shadow(0 12px 10px rgba(0, 0, 0, .5)); }
.ia-luchador.l1 img { transform: scaleX(-1); }
.ia-luchador.embiste { animation: ia-embiste .35s ease-out; }
.ia-luchador.l1.embiste { animation-name: ia-embiste-i; }
.ia-luchador.recibe { animation: ia-recibe .3s ease-out; }
.ia-luchador.cae { transition: transform .8s ease-in, opacity .8s ease-in; transform: rotate(80deg) translateY(30%); opacity: .4; }
.ia-luchador.gana { animation: ia-salta .5s ease-in-out 3; }
@keyframes ia-embiste { 40% { transform: translateX(28%); } }
@keyframes ia-embiste-i { 40% { transform: translateX(-28%); } }
@keyframes ia-recibe { 30% { filter: brightness(2.2) sepia(1) hue-rotate(-30deg) saturate(4); transform: translateX(4px); } }
@keyframes ia-salta { 50% { transform: translateY(-14%); } }

/* ---------- Evolución ---------- */
.ia-evo-esc { aspect-ratio: 1 / 1; }
.ia-evo-etapas { position: absolute; left: 0; right: 0; top: 10px; display: flex; justify-content: center; align-items: center; gap: 6px; font: 700 .78rem var(--t-titulo); text-transform: uppercase; letter-spacing: .05em; color: var(--tenue); }
.ia-evo-etapas span { display: inline-flex; gap: 5px; align-items: center; padding: 4px 9px; border-radius: 999px; background: rgba(4, 8, 22, .6); border: 1px solid rgba(180, 90, 255, .3); transition: color .3s ease, border-color .3s ease, box-shadow .3s ease; }
.ia-evo-etapas span i { width: 8px; height: 8px; border-radius: 50%; background: #2a3150; }
.ia-evo-etapas span.si { color: #fff; border-color: #b45aff; box-shadow: 0 0 10px rgba(180, 90, 255, .5); }
.ia-evo-etapas span.si i { background: #d65aff; box-shadow: 0 0 8px #d65aff; }
.ia-evo-etapas b { color: var(--tenue); }
.ia-evo-msg { position: absolute; left: 0; right: 0; bottom: 12px; margin: 0; text-align: center; font: 700 1.3rem var(--t-titulo); text-shadow: var(--contorno-texto), 0 0 18px #d65aff; }
.ia-evo-msg.sale { animation: ia-entra .5s var(--rebote) both; }
.ia-columna > * { min-width: 0; }
.ia-mantener { --carga: 0; min-height: 60px; width: 100%; min-width: 0; white-space: normal; text-align: center; line-height: 1.1; font-size: clamp(.92rem, 4vw, 1.1rem); padding-inline: 14px; gap: 12px; touch-action: none; -webkit-user-select: none; user-select: none; box-shadow: 0 0 calc(var(--carga) * 30px) rgba(214, 90, 255, calc(.3 + var(--carga) * .6)); transform: scale(calc(1 + var(--carga) * .04)); }
.ia-mantener:active { transform: scale(calc(.97 + var(--carga) * .05)); }
.ia-anillo { width: 38px; height: 38px; flex: none; transform: rotate(-90deg); }
.ia-anillo circle { fill: none; stroke: rgba(0, 0, 0, .35); stroke-width: 5; }
.ia-anillo .lleno { stroke: #fff; stroke-dasharray: 100; stroke-dashoffset: 100; stroke-linecap: round; filter: drop-shadow(0 0 4px #fff); }
.ia-mantener.reinicio { --b: var(--panel-claro); }
.ia-mantener.reinicio .ia-anillo { display: none; }
.ia-evo2d { position: absolute; inset: 10%; z-index: 2; display: grid; place-items: center; --carga: 0; --c: #b45aff; }
.ia-evo-esc.con-3d .ia-evo2d { display: none; }
.ia-evo2d img, .ia-evo2d .ia-sinimg { width: 80%; height: auto; aspect-ratio: 1; object-fit: contain; filter: drop-shadow(0 0 calc(var(--carga) * 40px) var(--c)) brightness(calc(1 + var(--carga))); }
.ia-evo2d.cambia img { animation: ia-entra .6s var(--rebote) both; }

/* ---------- Quiz ---------- */
.ia-quiz { display: grid; gap: 10px; }
.ia-quiz-inicio { display: grid; justify-items: center; gap: 16px; padding: 8px 0; }
.ia-quiz-sobre { display: flex; justify-content: center; }
.ia-quiz-sobre span { width: 64px; margin: 0 -8px; animation: flotar 3.6s ease-in-out infinite; animation-delay: calc(var(--i) * -.5s); }
.ia-quiz-prog { display: flex; gap: 6px; }
.ia-quiz-prog i { flex: 1; height: 6px; border-radius: 3px; background: #22305a; }
.ia-quiz-prog i.si { background: var(--oro); box-shadow: 0 0 8px rgba(255, 200, 60, .6); }
.ia-quiz-prog i.ahora { background: linear-gradient(90deg, var(--oro), #22305a); }
.ia-quiz-num { margin: 0; }
.ia-quiz-preg { font: 700 clamp(1.2rem, 4.4vw, 1.6rem) var(--t-titulo); margin: 0 0 4px; text-shadow: var(--contorno-texto); outline: none; animation: ia-entra .35s var(--suave-ease) both; }
.ia-quiz-resp { display: grid; gap: 10px; grid-template-columns: 1fr; }
@media (min-width: 640px) { .ia-quiz-resp { grid-template-columns: 1fr 1fr; } }
.ia-resp {
  display: flex; gap: 12px; align-items: center; min-height: 56px; padding: 10px 14px; text-align: start; cursor: pointer; color: #fff;
  font: 600 1rem var(--t-texto); border-radius: 10px; border: 2px solid rgba(56, 214, 255, .3); background: linear-gradient(180deg, #1c3168, var(--placa));
  transition: transform .15s var(--rebote), border-color .15s ease, box-shadow .15s ease; animation: ia-entra .35s var(--suave-ease) both; animation-delay: calc(var(--i) * 60ms);
}
.ia-resp .gl { width: 26px; height: 26px; color: var(--oro); flex: none; }
.ia-resp:hover { border-color: var(--acento); transform: translateY(-2px); box-shadow: 0 0 14px rgba(56, 214, 255, .35); }
.ia-resp.elegida { border-color: var(--oro); box-shadow: 0 0 18px rgba(255, 200, 60, .6); transform: scale(1.03); }
.ia-resp[disabled] { cursor: default; }
.ia-quiz-final { --c: #ffc83c; text-align: center; border-radius: 12px; }
.ia-quiz-res { display: grid; gap: 14px; justify-items: center; }
.ia-quiz-res .fila { justify-content: center; }
@media (min-width: 760px) { .ia-quiz-res { grid-template-columns: auto 1fr; text-align: start; align-items: center; } .ia-quiz-res .fila { justify-content: flex-start; } .ia-quiz-final .ia-acciones { justify-content: flex-start; } }

/* ---------- Rueda de elementos ---------- */
.ia-ruedael { width: min(100%, 440px); display: block; margin: 0 auto; overflow: visible; }
.ia-ruedael .guia { fill: none; stroke: rgba(56, 214, 255, .12); stroke-width: 22; }
.ia-ruedael .flecha { fill: none; stroke: rgba(160, 192, 232, .3); stroke-width: 3; stroke-linecap: round; transition: stroke .3s ease, opacity .3s ease; }
.ia-ruedael .flecha.caos { opacity: 0; stroke: #b45aff; }
.ia-ruedael .flecha.caos.on { opacity: 1; }
.ia-ruedael.hay-eleccion .flecha:not(.bien):not(.mal):not(.caos) { opacity: .25; }
.ia-ruedael .flecha.bien { stroke: var(--exito); stroke-width: 4.5; filter: drop-shadow(0 0 4px var(--exito)); }
.ia-ruedael .flecha.mal { stroke: var(--peligro); stroke-width: 4.5; filter: drop-shadow(0 0 4px var(--peligro)); }
.ia-ruedael .flecha.dibuja { stroke-dasharray: 100; animation: ia-dibuja .7s var(--suave-ease) both; }
@keyframes ia-dibuja { from { stroke-dashoffset: 100; } to { stroke-dashoffset: 0; } }
.ia-ruedael .punta.base { fill: rgba(160, 192, 232, .5); }
.ia-ruedael .punta.bien { fill: var(--exito); }
.ia-ruedael .punta.mal { fill: var(--peligro); }
.ia-ruedael .punta.caos { fill: #b45aff; }
.ia-ruedael .nodo { cursor: pointer; outline: none; }
.ia-ruedael .nodo .zona { fill: transparent; }
.ia-ruedael .nodo .disco { fill: color-mix(in srgb, var(--c) 35%, #0a122a); stroke: var(--c); stroke-width: 2.5; transition: transform .25s var(--rebote), filter .25s ease; }
.ia-ruedael .nodo use { fill: #fff; pointer-events: none; transition: transform .25s var(--rebote); }
.ia-ruedael .nodo:hover .disco, .ia-ruedael .nodo:focus-visible .disco { filter: drop-shadow(0 0 6px var(--c)); }
.ia-ruedael .nodo:focus-visible .zona { stroke: var(--acento); stroke-width: 2; }
.ia-ruedael .nodo.activo .disco { transform: scale(1.18); fill: var(--c); filter: drop-shadow(0 0 10px var(--c)); }
.ia-ruedael .nodo.activo use { transform: scale(1.18); }
.ia-ruedael .etq rect { fill: #040816; stroke-width: 1.5; }
.ia-ruedael .etq.bien rect { stroke: var(--exito); }
.ia-ruedael .etq.mal rect { stroke: var(--peligro); }
.ia-ruedael .etq text { font: 700 9px var(--t-tec); text-anchor: middle; }
.ia-ruedael .etq.bien text { fill: var(--exito); }
.ia-ruedael .etq.mal text { fill: #ff8a94; }
.ia-ruedael .etq { animation: ia-aparece .4s .3s both; }
@keyframes ia-aparece { from { opacity: 0; } }
.ia-elem-info { --c: var(--acento); min-height: 120px; }
.ia-elem-info p { display: flex; gap: 8px; align-items: flex-start; margin: 6px 0; }
.ia-elem-info p .gl { margin-top: 3px; }
.ia-elem-info p.bien .gl { color: var(--exito); }
.ia-elem-info p.mal .gl { color: var(--peligro); }
.ia-elem-nom { display: inline-flex; gap: 8px; align-items: center; font: 700 1.3rem var(--t-titulo); color: var(--c); text-shadow: var(--contorno-texto); margin-bottom: 4px; }
.ia-elem-info .ia-mini-tit { margin-top: 10px; }
.ia-elem-lista { display: flex; flex-wrap: wrap; gap: 6px; }
.ia-elem-mut { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 2px 10px 2px 2px; border-radius: 8px; cursor: pointer; color: #fff; font: 700 .82rem var(--t-titulo); background: linear-gradient(180deg, #1a2d5e, var(--placa)); border: 1px solid color-mix(in srgb, var(--c) 40%, transparent); transition: transform .15s var(--rebote), border-color .15s ease; }
.ia-elem-mut img, .ia-elem-mut .ia-sinimg { width: 38px; height: 38px; object-fit: contain; }
.ia-elem-mut:hover { transform: translateY(-2px); border-color: var(--c); }

/* ---------- movimiento reducido ---------- */
@media (prefers-reduced-motion: reduce) {
  .ia *, .ia *::before, .ia *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .ia-destello { animation: ia-destello-suave .3s ease-out both !important; }
  @keyframes ia-destello-suave { 0% { opacity: .5; } 100% { opacity: 0; } }
}

/* Teléfono: área de toque de 44 px como mínimo en los deslizadores. */
@media (max-width: 760px), (pointer: coarse) {
  main input[type="range"] { min-height: 44px; }
}

/* El contenido lo arma JS después de que cabecera.js pinta el pie: sin alto mínimo el pie saltaba (CLS 0,3–0,5). */
#principal { min-height: 100vh; }

/* Mientras cada demo carga su módulo, reserva su lugar: la tarjeta final y las demos de abajo no saltan (CLS 0,2–0,36). */
.ia-seccion > [data-interactivo]:empty { min-height: 520px; }
@media (max-width: 620px) { .ia-seccion > [data-interactivo]:empty { min-height: 640px; } }
