/*
 * QueenMary — estilos.
 * Concepto: una máquina arcade de medianoche con aire de realeza.
 * Fondo púrpura casi negro con líneas de CRT, oro para la corona, el SCORE y
 * lo valioso; cian para lo que el jugador elige; verde y rojo solo para
 * acierto y error. Un solo aspecto oscuro, a propósito.
 */
:root {
  color-scheme: dark;
  --bg: #120a20;
  --bg-2: #1a0f2e;
  --panel: #221539;
  --panel-2: #2e1d4c;
  --line: #4a3477;
  --text: #f4eeff;
  --muted: #ab9bcd;
  --gold: #f5c451;
  --gold-2: #ffe29a;
  --gold-deep: #a8761f;
  --cyan: #66e5ff;
  --rosa: #ff8fd0;
  /* Colores de las 6 dificultades (Fácil → Muy difícil) */
  --d1: #4fe39c;
  --d2: #a6e45a;
  --d3: #f5c451;
  --d4: #ffa24f;
  --d5: #ff6f5e;
  --d6: #ff3d7f;
  --ok: #4fe39c;
  --bad: #ff5170;
  --warn: #ffb44f;
  --ink: #1a0f2e;

  --font-logo: "Bungee", "Impact", "Arial Black", sans-serif;
  --font-hud: "Press Start 2P", ui-monospace, "Courier New", monospace;
  --font-text: "Chakra Petch", "Segoe UI", system-ui, sans-serif;

  --radio: 10px;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  background:
    radial-gradient(120% 60% at 50% -10%, rgba(120, 70, 200, 0.35), transparent 60%),
    radial-gradient(80% 50% at 50% 110%, rgba(245, 196, 81, 0.08), transparent 70%),
    var(--bg);
  background-color: var(--bg);
  color: var(--text);
  font-family: var(--font-text);
  font-size: 16px;
  line-height: 1.45;
  -webkit-tap-highlight-color: transparent;
}
/* Franja bajo la barra de estado del celular (app instalada / APK): el contenido no se ve por detrás al hacer scroll. */
html::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: env(safe-area-inset-top, 0px);
  background: var(--bg);
  z-index: 40;
}
/* Líneas de pantalla CRT, muy suaves. */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background: repeating-linear-gradient(to bottom, rgba(255, 255, 255, 0.025) 0 1px, transparent 1px 3px);
  z-index: 50;
}

button { font: inherit; color: inherit; cursor: pointer; }
button:disabled { cursor: not-allowed; }
:focus-visible { outline: 2px solid var(--cyan); outline-offset: 2px; }

#app {
  max-width: 520px;
  min-height: 100%;
  margin: 0 auto;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
  padding-top: calc(14px + env(safe-area-inset-top, 0px));
  padding-bottom: calc(28px + env(safe-area-inset-bottom, 0px));
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* ---------- Tipografía y utilidades ---------- */
.hud-font { font-family: var(--font-hud); letter-spacing: 0.04em; }
.etiqueta {
  font-family: var(--font-hud);
  font-size: 8px;
  letter-spacing: 0.12em;
  color: var(--muted);
  text-transform: uppercase;
}
.muted { color: var(--muted); }
.centro { text-align: center; }
.fila { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.columna { display: flex; flex-direction: column; gap: 10px; }
.separador { height: 1px; background: var(--line); border: 0; margin: 4px 0; }

/* ---------- Botones ---------- */
.btn {
  font-family: var(--font-hud);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 14px 16px;
  border-radius: 6px;
  border: 2px solid var(--gold);
  background: var(--panel);
  color: var(--gold-2);
  box-shadow: 0 4px 0 var(--gold-deep);
  transition: transform 0.08s, box-shadow 0.08s, background 0.15s;
  text-align: center;
  line-height: 1.4;
}
.btn:active:not(:disabled) { transform: translateY(3px); box-shadow: 0 1px 0 var(--gold-deep); }
.btn.principal { background: linear-gradient(180deg, var(--gold-2), var(--gold)); color: var(--ink); }
.btn.secundario { border-color: var(--line); color: var(--text); box-shadow: 0 4px 0 #120a20; }
.btn.chico { font-size: 9px; padding: 10px 12px; }
.btn.peligro { border-color: var(--bad); color: var(--bad); box-shadow: 0 4px 0 #5a1426; }
.btn:disabled { opacity: 0.35; box-shadow: none; transform: none; }
.btn.bloque { width: 100%; }

.enlace {
  background: none;
  border: 0;
  color: var(--cyan);
  text-decoration: underline;
  padding: 4px 0;
  font-size: 14px;
}

/* ---------- Portada ---------- */
.portada { display: flex; flex-direction: column; gap: 18px; align-items: stretch; padding-top: 18px; }
.marquesina { text-align: center; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.corona { width: 64px; height: auto; overflow: visible; filter: drop-shadow(0 0 12px rgba(245, 196, 81, 0.5)); }
/* Logo: un solo SVG (QUEEN + corona-slash + MARY) que se escala al ancho disponible. */
.logo { margin: 0; width: 100%; max-width: 440px; line-height: 0; }
.logo-svg { width: 100%; height: auto; display: block; overflow: visible; filter: drop-shadow(0 3px 0 #3a2160) drop-shadow(0 0 18px rgba(245, 196, 81, 0.25)); }
.logo-texto { font-family: var(--font-logo); font-size: 100px; }
.solo-lector { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
/* Dibujo de la portada (dos caritas en neón) */
.dibujo { display: block; width: 100%; max-width: 300px; height: auto; margin: 0 auto; }
.dibujo.chico { max-width: 180px; }

/* Celebración al coronarse (los dibujos bailan al ritmo de la música: 100 BPM = 0,6 s por tiempo) */
.fiesta { position: relative; width: 100%; max-width: 440px; aspect-ratio: 820 / 640; margin: 6px auto 0; }
.fiesta .fp { position: absolute; z-index: 1; animation: fp-entra 0.75s cubic-bezier(0.2, 1.5, 0.4, 1) both; animation-delay: calc(var(--i) * 0.2s + 0.2s + var(--t)); }
.fiesta .fp img { display: block; width: 100%; height: auto; transform-origin: 50% 100%; }
.fp-oso img { animation: fp-salto 0.6s ease-in-out calc(1.4s + var(--t)) infinite alternate; }
.fp-panda img { animation: fp-vaiven 1.2s ease-in-out calc(1.4s + var(--t)) infinite alternate; transform-origin: 40% 100%; }
.fp-lentes img { animation: fp-bote 0.6s ease-in-out calc(1.4s + var(--t)) infinite alternate; }
.fp-mono img { animation: fp-bote 0.6s ease-in-out calc(1.7s + var(--t)) infinite alternate; }
.fp-corazon img { animation: fp-latido 0.6s ease-in-out calc(1.4s + var(--t)) infinite alternate; transform-origin: 50% 60%; }
.fiesta-corona { position: absolute; left: 7%; top: 63%; width: 21%; z-index: 1; animation: fp-entra 0.75s cubic-bezier(0.2, 1.5, 0.4, 1) calc(1.3s + var(--t)) both; }
.fiesta-corona svg { display: block; width: 100%; height: auto; filter: drop-shadow(0 0 10px rgba(245, 196, 81, 0.75)); animation: fp-corona 1.2s ease-in-out calc(2s + var(--t)) infinite alternate; }
@keyframes fp-entra { 0% { transform: translateY(18%) scale(0.2); opacity: 0; } 60% { opacity: 1; } 100% { transform: none; opacity: 1; } }
@keyframes fp-salto { from { transform: translateY(0) rotate(-6deg); } to { transform: translateY(-9%) rotate(6deg); } }
@keyframes fp-vaiven { from { transform: rotate(-5deg); } to { transform: rotate(4deg) translateY(-3%); } }
@keyframes fp-bote { from { transform: translateY(0) rotate(-2deg); } to { transform: translateY(-7%) rotate(3deg); } }
@keyframes fp-latido { from { transform: scale(0.92) translateY(4%); } to { transform: scale(1.12) translateY(-4%); } }
@keyframes fp-corona { from { transform: rotate(-8deg) translateY(0); } to { transform: rotate(6deg) translateY(-8%); } }
.confeti { position: absolute; inset: -6% -4% 0; overflow: hidden; pointer-events: none; z-index: 0; }
.confeti i { position: absolute; top: -14%; height: 114%; width: 8px; animation: fp-caer var(--d) linear calc(var(--e) + var(--t)) 3 both; }
.confeti i::before { content: ""; position: absolute; top: 0; left: 0; width: 7px; height: 11px; border-radius: 2px; background: var(--c); box-shadow: 0 0 6px var(--c); animation: fp-girar 0.8s linear infinite; }
@keyframes fp-caer { from { transform: translate(0, 0); opacity: 1; } 85% { opacity: 1; } to { transform: translate(var(--x), 100%); opacity: 0; } }
@keyframes fp-girar { to { transform: rotate(var(--r)) scaleX(0.3); } }
.keep-going { display: block; width: 100%; max-width: 380px; height: auto; margin: 0 auto; overflow: visible; }
.avatar { width: 64px; height: 64px; display: block; margin: 0 auto; }
.avatar.grande { width: 120px; height: 120px; }
.avatar.mini { width: 28px; height: 28px; display: inline-block; vertical-align: middle; margin: -6px 4px -6px 0; }
.lema { font-family: var(--font-hud); font-size: 9px; color: var(--cyan); letter-spacing: 0.14em; }
.parpadeo { animation: parpadeo 1.1s steps(2, start) infinite; }
@keyframes parpadeo { to { visibility: hidden; } }

.hi-portada {
  display: flex;
  justify-content: center;
  gap: 18px;
  font-family: var(--font-hud);
  font-size: 11px;
}
.hi-portada b { color: var(--gold); font-weight: 400; }

.aviso-modo {
  border: 1px dashed var(--line);
  border-radius: var(--radio);
  padding: 12px 14px;
  font-size: 14px;
  color: var(--muted);
  background: rgba(34, 21, 57, 0.6);
}
.aviso-modo strong { color: var(--text); }

/* ---------- HUD de juego ---------- */
.hud {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr auto;
  gap: 8px;
  align-items: stretch;
  position: sticky;
  top: env(safe-area-inset-top, 0px);
  z-index: 10;
  background: linear-gradient(180deg, var(--bg) 70%, rgba(18, 10, 32, 0));
  padding-bottom: 6px;
}
.hud-caja {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 7px 8px;
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 0;
}
.hud-valor { font-family: var(--font-hud); font-size: 12px; color: var(--text); font-variant-numeric: tabular-nums; white-space: nowrap; }
.hud-valor.oro { color: var(--gold); }
.hud-valor.negativo { color: var(--bad); }
.hud-boton {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 10px;
  font-family: var(--font-hud);
  font-size: 9px;
  color: var(--muted);
  min-width: 44px;
}
.hud-boton[aria-pressed="true"] { color: var(--gold); border-color: var(--gold-deep); }

.jugador-turno { font-family: var(--font-hud); font-size: 10px; color: var(--cyan); text-align: center; }

/* Escalera de 10 niveles */
.escalera { display: grid; grid-template-columns: repeat(10, 1fr); gap: 4px; }
.peldano {
  position: relative;
  height: 26px;
  border-radius: 4px;
  background: var(--panel);
  border: 1px solid var(--line);
  font-family: var(--font-hud);
  font-size: 8px;
  display: grid;
  place-items: center;
  color: var(--muted);
}
.peldano.pasado { background: linear-gradient(180deg, var(--gold-2), var(--gold)); color: var(--ink); border-color: var(--gold); }
.peldano.actual { border: 2px solid var(--cyan); color: var(--cyan); box-shadow: 0 0 10px rgba(102, 229, 255, 0.5); animation: latir 1.4s ease-in-out infinite; }
.peldano .marca {
  position: absolute;
  bottom: -14px;
  font-size: 7px;
  color: var(--gold);
  white-space: nowrap;
}
.peldano::after { content: ""; position: absolute; left: 3px; right: 3px; bottom: 2px; height: 2px; border-radius: 2px; background: var(--dif, transparent); }
.peldano.pasado::after { opacity: 0.45; }
.escalera-pie { min-height: 14px; padding-top: 4px; text-align: left; font-family: var(--font-hud); font-size: 7px; color: var(--muted); letter-spacing: 0.06em; }

/* Selector de dificultad (portada) */
.dificultad-sel { display: flex; flex-direction: column; gap: 9px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radio); padding: 12px; }
.ds-cabeza { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; font-family: var(--font-hud); font-size: 8px; color: var(--muted); letter-spacing: 0.06em; }
.ds-cabeza b { color: var(--text); font-weight: 400; font-size: 10px; margin-left: 4px; }
.ds-mult { color: var(--gold); white-space: nowrap; }
.ds-opciones { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.ds-opcion {
  min-height: 46px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--bg-2);
  color: var(--muted);
  font-family: var(--font-hud);
  font-size: 7px;
  letter-spacing: 0.04em;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 4px 2px;
  cursor: pointer;
}
.ds-opcion .estrellas { color: var(--gold-deep); font-family: var(--font-text); font-size: 10px; letter-spacing: -1px; line-height: 1; }
.ds-opcion[aria-checked="true"] { border-color: var(--gold); background: rgba(245, 196, 81, 0.12); color: var(--text); box-shadow: 0 0 12px rgba(245, 196, 81, 0.25); }
.ds-opcion[aria-checked="true"] .estrellas { color: var(--gold); }
.punto-dif { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--dif); margin-right: 3px; vertical-align: 1px; }
.tabla-desliza { overflow-x: auto; }
.tabla-modos { width: 100%; border-collapse: collapse; font-size: 14px; font-variant-numeric: tabular-nums; }
.tabla-modos th { font-family: var(--font-hud); font-size: 7px; color: var(--muted); font-weight: 400; padding: 6px 3px; white-space: nowrap; }
.tabla-modos td { padding: 6px 3px; border-top: 1px solid var(--line); text-align: center; }
.tabla-modos td:first-child, .tabla-modos th:first-child { text-align: left; }
.tabla-hi td.dif { font-family: var(--font-hud); font-size: 8px; color: var(--muted); }
@keyframes latir { 50% { box-shadow: 0 0 2px rgba(102, 229, 255, 0.2); } }

/* ---------- Comodines ---------- */
.comodines { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.comodin {
  position: relative;
  background: var(--panel-2);
  border: 2px solid var(--line);
  border-radius: var(--radio);
  padding: 6px 4px 5px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  min-height: 58px;
  transition: transform 0.12s, border-color 0.2s, background 0.2s;
  overflow: hidden;
}
.comodin svg { width: 21px; height: 21px; }
.comodin .nombre { font-size: 12px; font-weight: 700; line-height: 1.1; text-align: center; }
.comodin .costo { font-family: var(--font-hud); font-size: 6px; color: var(--bad); }
.comodin .cantidad {
  position: absolute;
  top: 4px;
  right: 5px;
  font-family: var(--font-hud);
  font-size: 8px;
  color: var(--ink);
  background: var(--gold);
  border-radius: 3px;
  padding: 2px 3px;
}
.comodin.disponible { border-color: var(--gold-deep); color: var(--gold-2); }
.comodin.disponible:active { transform: scale(0.96); }
.comodin.disponible:hover { border-color: var(--gold); }
.comodin.inactivo { opacity: 0.55; }
.comodin.usado { color: var(--muted); background: var(--panel); filter: grayscale(0.8); }
.comodin.usado::before, .comodin.usado::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 84%;
  height: 4px;
  background: var(--bad);
  border-radius: 2px;
  box-shadow: 0 0 6px rgba(255, 81, 112, 0.6);
}
.comodin.usado::before { transform: translate(-50%, -50%) rotate(35deg); }
.comodin.usado::after { transform: translate(-50%, -50%) rotate(-35deg); }
.comodin.bloqueado { border-style: dashed; color: var(--muted); background: transparent; }
.comodin.bloqueado .costo { color: var(--muted); }
.comodin.temporal { border: 2px dashed var(--cyan); color: var(--cyan); box-shadow: 0 0 12px rgba(102, 229, 255, 0.35); }
.comodin.recarga { border-color: var(--warn); color: var(--warn); }
.comodin.anim-usado { animation: sello 0.6s ease-out; }
.comodin.anim-usado::before, .comodin.anim-usado::after { animation: tachar 0.45s ease-out; }
.comodin.anim-ganado { animation: aparecer 0.9s cubic-bezier(.2, 1.6, .4, 1); box-shadow: 0 0 22px rgba(245, 196, 81, 0.8); border-color: var(--gold); }
@keyframes sello { 0% { transform: scale(1.15); } 40% { transform: scale(0.94); } 100% { transform: scale(1); } }
@keyframes tachar { from { width: 0; } }
@keyframes aparecer { 0% { transform: scale(0.3) rotate(-8deg); opacity: 0; } 60% { transform: scale(1.12); opacity: 1; } 100% { transform: scale(1); } }

.acciones-extra { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }

/* ---------- Temáticas ---------- */
.titulo-seccion { font-family: var(--font-hud); font-size: 11px; color: var(--gold); margin: 6px 0 0; line-height: 1.6; text-wrap: balance; }
.tematicas { display: flex; flex-direction: column; gap: 10px; }
.tematica {
  background: var(--panel);
  border: 2px solid var(--line);
  border-radius: var(--radio);
  padding: 16px;
  text-align: left;
  font-size: 18px;
  font-weight: 700;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  transition: border-color 0.15s, transform 0.08s;
}
.tematica:hover { border-color: var(--gold); }
.tematica:active { transform: scale(0.98); }
.tematica .flecha { color: var(--gold); font-family: var(--font-hud); font-size: 12px; }
.tematica.sorpresa { border-style: dashed; border-color: var(--cyan); }
.tematica.sorpresa small { display: block; font-size: 13px; font-weight: 500; color: var(--muted); margin-top: 3px; }

/* ---------- Pregunta ---------- */
.tarjeta {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip {
  font-family: var(--font-hud);
  font-size: 7px;
  letter-spacing: 0.08em;
  padding: 5px 7px;
  border-radius: 4px;
  border: 1px solid var(--line);
  color: var(--muted);
  text-transform: uppercase;
}
.chip.tema { color: var(--gold-2); border-color: var(--gold-deep); }
.chip.fuente-ia { color: var(--cyan); border-color: rgba(102, 229, 255, 0.4); }
.pregunta-texto { font-size: 21px; font-weight: 600; line-height: 1.3; margin: 0; text-wrap: balance; }

.reloj { height: 6px; border-radius: 3px; background: var(--bg-2); overflow: hidden; }
.reloj-barra { height: 100%; background: var(--cyan); width: 100%; transition: width 0.25s linear; }
.reloj.alerta .reloj-barra { background: var(--bad); }
.reloj-texto { font-family: var(--font-hud); font-size: 9px; color: var(--muted); text-align: right; font-variant-numeric: tabular-nums; }
.reloj-texto.alerta { color: var(--bad); }

.opciones { display: flex; flex-direction: column; gap: 10px; }
.opcion {
  display: grid;
  grid-template-columns: 34px 1fr;
  align-items: center;
  gap: 10px;
  text-align: left;
  background: var(--bg-2);
  border: 2px solid var(--line);
  border-radius: var(--radio);
  padding: 12px;
  font-size: 17px;
  font-weight: 500;
  min-height: 56px;
  transition: border-color 0.12s, background 0.12s, opacity 0.3s;
}
.opcion .letra {
  font-family: var(--font-hud);
  font-size: 11px;
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 6px;
  background: var(--panel-2);
  color: var(--gold);
}
.opcion:hover:not(:disabled) { border-color: var(--gold-deep); }
.opcion.marcada { border-color: var(--cyan); background: rgba(102, 229, 255, 0.1); box-shadow: 0 0 14px rgba(102, 229, 255, 0.35); }
.opcion.marcada .letra { background: var(--cyan); color: var(--ink); }
.opcion.eliminada { opacity: 0.25; text-decoration: line-through; }
.opcion.suspenso { animation: suspenso 0.5s ease-in-out infinite alternate; }
.opcion.correcta { border-color: var(--ok); background: rgba(79, 227, 156, 0.16); }
.opcion.correcta .letra { background: var(--ok); color: var(--ink); }
.opcion.incorrecta { border-color: var(--bad); background: rgba(255, 81, 112, 0.14); animation: sacudir 0.4s; }
.opcion.incorrecta .letra { background: var(--bad); color: var(--ink); }
@keyframes suspenso { from { box-shadow: 0 0 4px rgba(102, 229, 255, 0.3); } to { box-shadow: 0 0 22px rgba(102, 229, 255, 0.9); background: rgba(102, 229, 255, 0.2); } }
@keyframes sacudir { 25% { transform: translateX(-6px); } 50% { transform: translateX(6px); } 75% { transform: translateX(-3px); } }
.confirmar-ayuda { font-family: var(--font-hud); font-size: 8px; color: var(--cyan); text-align: center; line-height: 1.6; min-height: 13px; }

/* Ayudas recibidas: pistas y QueenBot */
.ayudas { display: flex; flex-direction: column; gap: 8px; }
.pista {
  display: grid;
  grid-template-columns: 26px 1fr;
  gap: 8px;
  align-items: start;
  padding: 10px 12px;
  border-radius: var(--radio);
  background: rgba(245, 196, 81, 0.08);
  border: 1px solid var(--gold-deep);
  font-size: 15px;
  color: var(--gold-2);
}
.pista svg { width: 22px; height: 22px; }
.bot {
  display: grid;
  grid-template-columns: 40px 1fr;
  gap: 10px;
  align-items: start;
}
.bot-avatar { width: 40px; height: 40px; }
.bot-globo {
  background: rgba(102, 229, 255, 0.08);
  border: 1px solid rgba(102, 229, 255, 0.45);
  border-radius: 4px 14px 14px 14px;
  padding: 10px 12px;
  font-size: 15px;
}
.bot-globo b { font-family: var(--font-hud); font-size: 8px; color: var(--cyan); display: block; margin-bottom: 4px; font-weight: 400; }
.esperando { font-family: var(--font-hud); font-size: 9px; color: var(--muted); text-align: center; padding: 6px; }

/* ---------- Cargando ---------- */
.cargando { display: flex; flex-direction: column; align-items: center; gap: 16px; padding: 46px 0; }
.cargando .corona { width: 60px; animation: flotar 1.2s ease-in-out infinite alternate; }
@keyframes flotar { to { transform: translateY(-10px) rotate(4deg); } }
.puntos::after { content: ""; animation: puntos 1.2s steps(4) infinite; }
@keyframes puntos { 0% { content: ""; } 25% { content: "."; } 50% { content: ".."; } 75% { content: "..."; } }

/* ---------- Resultado ---------- */
.resultado-titulo { font-family: var(--font-hud); font-size: 20px; line-height: 1.4; text-align: center; margin: 4px 0 0; }
.resultado-titulo.bien { color: var(--ok); text-shadow: 0 0 14px rgba(79, 227, 156, 0.5); }
.resultado-titulo.mal { color: var(--bad); text-shadow: 0 0 14px rgba(255, 81, 112, 0.5); }
.resultado-sub { font-family: var(--font-hud); font-size: 10px; text-align: center; color: var(--gold); line-height: 1.7; }
.dato {
  border-left: 3px solid var(--cyan);
  padding: 8px 12px;
  background: var(--bg-2);
  border-radius: 0 var(--radio) var(--radio) 0;
  font-size: 15px;
}
.dato b { font-family: var(--font-hud); font-size: 8px; color: var(--cyan); display: block; margin-bottom: 4px; font-weight: 400; letter-spacing: 0.1em; }
.desbloqueo {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 10px 12px;
  border-radius: var(--radio);
  border: 2px solid var(--gold);
  background: rgba(245, 196, 81, 0.1);
  color: var(--gold-2);
  font-weight: 700;
  animation: aparecer 0.9s cubic-bezier(.2, 1.6, .4, 1);
}
.desbloqueo svg { width: 28px; height: 28px; flex: none; }

/* ---------- Pase del celular ---------- */
.pase { display: flex; flex-direction: column; align-items: center; gap: 18px; padding: 40px 0; text-align: center; }
.pase .nombre-grande { font-family: var(--font-logo); font-size: 52px; color: var(--cyan); line-height: 1; }
.pase.jugador-2 .nombre-grande { color: var(--rosa); }

/* ---------- Fin de partida ---------- */
.final-titulo { font-family: var(--font-logo); font-size: clamp(34px, 11vw, 48px); text-align: center; margin: 10px 0 0; line-height: 1.05; }
.final-titulo.gameover { color: var(--bad); }
.final-titulo.campeon { color: var(--gold); text-shadow: 0 0 20px rgba(245, 196, 81, 0.55); }
.marcador-final { font-family: var(--font-hud); text-align: center; display: flex; flex-direction: column; gap: 10px; }
.marcador-final .score-grande { font-size: 30px; color: var(--gold); font-variant-numeric: tabular-nums; }
.perfect { font-family: var(--font-hud); font-size: 14px; color: var(--cyan); text-align: center; }
.desglose { width: 100%; border-collapse: collapse; font-size: 15px; }
.desglose td { padding: 6px 4px; border-bottom: 1px solid var(--line); }
.desglose td:last-child { text-align: right; font-family: var(--font-hud); font-size: 10px; font-variant-numeric: tabular-nums; }
.desglose .menos { color: var(--bad); }
.desglose .mas { color: var(--ok); }
.versus { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.versus .tarjeta { align-items: center; text-align: center; }
.versus .ganador { border-color: var(--gold); box-shadow: 0 0 16px rgba(245, 196, 81, 0.35); }

/* Iniciales estilo arcade */
.iniciales { display: flex; justify-content: center; gap: 12px; }
.inicial { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.inicial button {
  width: 48px;
  height: 34px;
  border-radius: 6px;
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--gold);
  font-family: var(--font-hud);
  font-size: 10px;
}
.inicial .letra-grande {
  font-family: var(--font-hud);
  font-size: 28px;
  color: var(--gold-2);
  width: 48px;
  text-align: center;
  border-bottom: 3px solid var(--gold);
  padding-bottom: 6px;
}

/* ---------- HI-SCORES ---------- */
.tabla-hi { width: 100%; border-collapse: collapse; font-family: var(--font-hud); font-size: 11px; font-variant-numeric: tabular-nums; }
.tabla-hi th { font-size: 8px; color: var(--muted); font-weight: 400; text-align: left; padding: 8px 4px; }
.tabla-hi td { padding: 10px 4px; border-bottom: 1px dashed var(--line); }
.tabla-hi td.num { text-align: right; }
.tabla-hi tr.p1 td { color: var(--gold); }
.tabla-hi tr.p2 td { color: #d9dcef; }
.tabla-hi tr.p3 td { color: #e0a36a; }
.tabla-hi tr.nuevo td { animation: parpadeo 0.8s steps(2, start) 6; }
.vacio { text-align: center; color: var(--muted); padding: 24px 0; }

/* ---------- Ajustes y ayuda ---------- */
.formulario { display: flex; flex-direction: column; gap: 18px; }
.campo { display: flex; flex-direction: column; gap: 8px; }
.campo label, .campo .titulo-campo { font-weight: 700; font-size: 15px; }
.campo .ayuda { font-size: 13px; color: var(--muted); }
.campo input[type="password"], .campo input[type="text"], .campo select, .nueva-clave select, .nueva-clave input {
  width: 100%;
  font: inherit;
  font-size: 16px;
  padding: 12px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--bg-2);
  color: var(--text);
}
.campo input[type="range"] { width: 100%; accent-color: var(--gold); }
.interruptor { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.interruptor input { width: 22px; height: 22px; accent-color: var(--gold); }
.estado-conexion { font-size: 14px; min-height: 20px; }
.estado-conexion.ok { color: var(--ok); }
.estado-conexion.mal { color: var(--bad); }
.rutas-ia, .lista-claves, .resultados-ia { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.rutas-ia li { display: flex; justify-content: space-between; gap: 10px; font-size: 14px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--bg-2); }
.rutas-ia .bien { color: var(--ok); }
.rutas-ia .mal { color: var(--bad); text-align: right; }
.rutas-ia .aviso { color: var(--gold); }
.lista-claves li { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 10px; font-size: 14px; }
.lista-claves .prov { font-weight: 700; }
.lista-claves .mascara { color: var(--muted); font-family: var(--font-hud); font-size: 9px; letter-spacing: 0.05em; }
.nueva-clave { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 2fr); gap: 8px; }
.resultados-ia { gap: 2px; margin-bottom: 4px; }
.avanzado summary { cursor: pointer; font-weight: 700; font-size: 15px; color: var(--muted); }
.campo input[type="url"] { width: 100%; }

.reglas { display: flex; flex-direction: column; gap: 12px; font-size: 15px; }
.reglas h3 { font-family: var(--font-hud); font-size: 10px; color: var(--gold); margin: 10px 0 0; line-height: 1.6; }
.reglas p, .reglas ul { margin: 0; }
.reglas ul { padding-left: 20px; display: flex; flex-direction: column; gap: 6px; }
.tabla-costos { width: 100%; border-collapse: collapse; }
.tabla-costos td { padding: 7px 4px; border-bottom: 1px solid var(--line); }
.tabla-costos td:last-child { text-align: right; font-family: var(--font-hud); font-size: 10px; color: var(--bad); }

.cabecera { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.cabecera h2 { font-family: var(--font-hud); font-size: 13px; color: var(--gold); margin: 0; line-height: 1.5; }

/* ---------- Modales ---------- */
.modal {
  position: fixed;
  inset: 0;
  z-index: 40;
  background: rgba(10, 5, 20, 0.82);
  display: grid;
  place-items: center;
  padding: max(16px, env(safe-area-inset-top, 0px)) max(16px, env(safe-area-inset-right, 0px)) max(16px, env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-left, 0px));
}
.modal-caja {
  width: min(420px, 100%);
  background: var(--panel);
  border: 2px solid var(--gold-deep);
  border-radius: 16px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  text-align: center;
}
.modal-caja h3 { font-family: var(--font-hud); font-size: 12px; color: var(--gold); margin: 0; line-height: 1.6; }

/* Ruleta */
.ruleta-zona { position: relative; width: 250px; height: 250px; margin: 0 auto; }
.ruleta-puntero {
  position: absolute;
  top: -6px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 13px solid transparent;
  border-right: 13px solid transparent;
  border-top: 24px solid var(--gold-2);
  z-index: 2;
  filter: drop-shadow(0 2px 0 var(--gold-deep));
}
.ruleta-rueda {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  border: 6px solid var(--gold);
  background: conic-gradient(#5b2ea6 0 90deg, #1f6f86 90deg 180deg, #8a2d63 180deg 270deg, #2e6a3d 270deg 360deg);
  position: relative;
  box-shadow: 0 0 24px rgba(245, 196, 81, 0.35), inset 0 0 20px rgba(0, 0, 0, 0.5);
  transition: transform 2.6s cubic-bezier(0.15, 0.7, 0.12, 1);
}
.ruleta-texto {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 80px;
  margin-left: -40px;
  margin-top: -14px;
  font-family: var(--font-hud);
  font-size: 7px;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.85);
  text-align: center;
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.6);
}
.ruleta-texto b { display: block; font-size: 12px; color: #fff; font-weight: 400; }
.ruleta-eje { position: absolute; inset: 42%; border-radius: 50%; background: var(--gold); border: 3px solid var(--ink); }
.ruleta-resultado { font-family: var(--font-hud); font-size: 11px; color: var(--cyan); line-height: 1.7; min-height: 38px; }

/* Aviso flotante */
.toast {
  position: fixed;
  left: 50%;
  bottom: calc(18px + env(safe-area-inset-bottom, 0px));
  transform: translateX(-50%);
  width: min(480px, calc(100% - 32px));
  background: var(--panel-2);
  border: 1px solid var(--warn);
  color: var(--text);
  border-radius: var(--radio);
  padding: 12px 14px;
  font-size: 14px;
  z-index: 45;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
  animation: subir 0.3s ease-out;
}
@keyframes subir { from { transform: translate(-50%, 20px); opacity: 0; } }

/* ---------- v7.1: Escudo mágico, cuadro «Never give up», Rey sabio, sticker, reporte y Zona final ---------- */
:root {
  --magia: #5ab8ff;
  --magia-2: #b8ecff;
  --lava: #ff5a1f;
  --lava-2: #ffb347;
}
.btn svg { width: 15px; height: 15px; vertical-align: -3px; margin-right: 4px; }
.comodines.especiales { grid-template-columns: 1fr; margin-top: 6px; }
/* Escudo y Random recarga: una sola línea (ícono a la izquierda) para ocupar poco alto. */
.comodin.especial { min-height: 40px; flex-direction: row; justify-content: center; gap: 10px; padding: 4px 10px; }
.comodin.especial .pila { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; min-width: 0; }
.comodin.especial .nombre { text-align: left; white-space: nowrap; }
.comodin.especial svg { flex: none; }
.comodin .costo.gratis { color: var(--ok); }
.comodin .icono-color { width: 26px; height: 26px; }
.comodin.escudo.disponible { border-color: var(--magia); color: var(--magia-2); background: linear-gradient(180deg, rgba(90, 184, 255, 0.16), var(--panel-2)); box-shadow: 0 0 12px rgba(90, 184, 255, 0.25); }
.comodin.escudo .costo { color: var(--magia-2); }
.comodin.escudo-activo { border: 2px solid var(--magia); color: var(--magia-2); background: rgba(90, 184, 255, 0.18); animation: escudoLatido 1.4s ease-in-out infinite; }
.comodin.revivir.disponible { border-color: var(--rosa); color: #ffd0ec; }
.comodin.anim-quemado { animation: quemarse 0.9s ease-out; }
.comodin.cargando-escudo { animation: cargarEscudo 1.2s ease-out; }
@keyframes quemarse { 0% { box-shadow: 0 0 0 rgba(90, 184, 255, 0); } 35% { box-shadow: 0 0 22px rgba(90, 184, 255, 0.9); border-color: var(--magia); transform: scale(1.05); } 100% { transform: scale(1); } }
@keyframes cargarEscudo { 0% { transform: scale(1); } 45% { transform: scale(1.1); box-shadow: 0 0 34px rgba(90, 184, 255, 1); } 100% { transform: scale(1); } }
@keyframes escudoLatido { 50% { box-shadow: 0 0 20px rgba(90, 184, 255, 0.75); } }
.chispa-mana {
  position: fixed;
  width: 9px; height: 9px;
  margin: -4px 0 0 -4px;
  border-radius: 50%;
  background: radial-gradient(circle, #fff 0 25%, var(--magia-2) 45%, rgba(90, 184, 255, 0) 70%);
  box-shadow: 0 0 10px var(--magia);
  z-index: 60;
  pointer-events: none;
  animation: chispaViaja 0.85s cubic-bezier(.5, 0, .3, 1) both;
}
@keyframes chispaViaja { 0% { transform: translate(0, 0) scale(0.4); opacity: 0; } 15% { opacity: 1; transform: translate(0, -12px) scale(1.2); } 100% { transform: translate(var(--dx), var(--dy)) scale(0.6); opacity: 0.2; } }

.tarjeta { position: relative; }
.cabeza-pregunta { display: block; }
.cabeza-pregunta > .chips, .cabeza-pregunta > .escudo-aviso { margin-bottom: 12px; }
.sticker-hueco { float: right; width: 60px; height: 62px; }
/* El cuadro «Never give up»: completo; cuando su poder despierta, brilla, vibra y hace zoom al texto. */
.sticker {
  position: absolute;
  top: -16px;
  right: -10px;
  width: 76px;
  height: 89px;
  padding: 0;
  border-radius: 12px;
  border: 2px solid var(--gold);
  overflow: hidden;
  background: #2a2a40;
  transform: rotate(6deg);
  box-shadow: 0 0 14px rgba(255, 90, 31, 0.4), 0 6px 14px rgba(0, 0, 0, 0.45);
  cursor: zoom-in;
  z-index: 2;
}
.sticker img { display: block; width: 100%; height: 100%; object-fit: cover; transform-origin: 42.3% 44.9%; }
.sticker:active { transform: rotate(6deg) scale(0.95); }
.sticker.activo { border-color: var(--lava-2); cursor: pointer; animation: cuadroLatido 1.6s ease-in-out infinite; }
.sticker.activo img { transform: scale(2.15); }
.sticker.despierta { animation: cuadroVibra 0.5s ease-in-out 3, cuadroBrillo 2s ease-out; }
.sticker.despierta img { animation: cuadroZoom 1.3s 0.55s cubic-bezier(.3, 0, .2, 1) both; }
.sticker.casi { animation: cuadroCasi 1.6s ease-out; }
.sticker.casi img { animation: cuadroCasiZoom 1.6s ease-in-out; }
.sticker.apagandose img { animation: cuadroZoomOut 1s ease-in-out both; }
.sticker.apagandose { animation: cuadroDestello 1s ease-out; }
@keyframes cuadroLatido { 0%, 100% { box-shadow: 0 0 12px rgba(255, 179, 71, 0.55), 0 6px 14px rgba(0, 0, 0, 0.45); } 50% { box-shadow: 0 0 26px 4px rgba(255, 179, 71, 0.95), 0 0 46px rgba(255, 90, 31, 0.6), 0 6px 14px rgba(0, 0, 0, 0.45); } }
@keyframes cuadroVibra { 0%, 100% { transform: rotate(6deg); } 20% { transform: rotate(1deg) translate(-3px, 1px); } 40% { transform: rotate(11deg) translate(3px, -1px); } 60% { transform: rotate(2deg) translate(-2px, -1px); } 80% { transform: rotate(10deg) translate(2px, 1px); } }
@keyframes cuadroBrillo { 0% { filter: brightness(1); } 25% { filter: brightness(1.7) saturate(1.3); box-shadow: 0 0 34px 10px rgba(255, 220, 120, 0.95), 0 0 70px rgba(255, 90, 31, 0.85); } 100% { filter: brightness(1); } }
@keyframes cuadroZoom { from { transform: scale(1); } to { transform: scale(2.15); } }
@keyframes cuadroZoomOut { from { transform: scale(2.15); } to { transform: scale(1); } }
@keyframes cuadroDestello { 0% { filter: brightness(1.8); box-shadow: 0 0 30px 8px rgba(255, 240, 200, 0.9); } 100% { filter: brightness(1); } }
@keyframes cuadroCasi { 0% { filter: brightness(1); } 25% { filter: brightness(1.6); box-shadow: 0 0 26px 6px rgba(255, 210, 110, 0.85); transform: rotate(4deg) translate(-1px, 0); } 45% { transform: rotate(8deg) translate(1px, 0); } 70% { filter: brightness(0.6) saturate(0.6); } 100% { filter: brightness(1); transform: rotate(6deg); } }
@keyframes cuadroCasiZoom { 0%, 100% { transform: scale(1); } 35% { transform: scale(1.35); } }
.cuadro-explica { margin: 10px 0 0; font-size: 15px; line-height: 1.45; }
.cuadro-explica strong { color: var(--gold-2); }
.sticker-grande { display: block; width: 100%; max-height: 62vh; object-fit: contain; border-radius: 12px; border: 2px solid var(--gold); }
.tarjeta.con-escudo { border-color: var(--magia); box-shadow: 0 0 0 1px rgba(90, 184, 255, 0.5), 0 0 26px rgba(90, 184, 255, 0.35); animation: auraEscudo 2.2s ease-in-out infinite; }
@keyframes auraEscudo { 50% { box-shadow: 0 0 0 1px rgba(90, 184, 255, 0.7), 0 0 36px rgba(90, 184, 255, 0.55); } }
.escudo-aviso { display: flex; align-items: center; gap: 8px; font-family: var(--font-hud); font-size: 7.5px; line-height: 1.6; color: var(--magia-2); }
.escudo-aviso svg { width: 26px; height: 26px; flex: none; }

.rey { display: grid; grid-template-columns: 64px 1fr; gap: 10px; align-items: end; }
.rey-img { width: 64px; height: 64px; object-fit: contain; filter: drop-shadow(0 0 8px rgba(245, 196, 81, 0.45)); }
.rey-globo {
  background: rgba(245, 196, 81, 0.09);
  border: 1px solid var(--gold-deep);
  border-radius: 14px 14px 14px 4px;
  padding: 10px 12px;
  font-size: 15px;
  color: var(--gold-2);
}
.rey-globo b { font-family: var(--font-hud); font-size: 8px; color: var(--gold); display: block; margin-bottom: 4px; font-weight: 400; }
.rey.aparece .rey-img { animation: reyEntra 0.7s cubic-bezier(.2, 1.5, .4, 1); }
.rey.aparece .rey-globo { animation: aparecer 0.6s 0.15s cubic-bezier(.2, 1.4, .4, 1) both; }
@keyframes reyEntra { 0% { transform: translateY(30px) scale(0.4); opacity: 0; } 100% { transform: none; opacity: 1; } }
.rey-pensando { display: flex; align-items: center; justify-content: center; gap: 10px; padding: 8px; font-family: var(--font-hud); font-size: 9px; color: var(--gold); }
.rey-pensando .corona { width: 34px; animation: flotar 1.2s ease-in-out infinite alternate; }

.peldano .marca.final { color: var(--lava-2); }
.peldano .marca.misterio { font-size: 10px; bottom: -16px; color: var(--lava-2); text-shadow: 0 0 6px rgba(255, 179, 71, 0.8); animation: misterio 1.8s ease-in-out infinite; }
@keyframes misterio { 50% { opacity: 0.45; transform: scale(1.25); } }
.resultado-titulo.salvado { color: var(--magia-2); text-shadow: 0 0 12px rgba(90, 184, 255, 0.6); }
.acciones-extra.una { grid-template-columns: 1fr; }
.reporte { border-radius: var(--radio); padding: 12px 14px; font-size: 15px; display: flex; flex-direction: column; gap: 6px; }
.reporte p { margin: 0; }
.reporte b { font-family: var(--font-hud); font-size: 8px; font-weight: 400; letter-spacing: 0.05em; }
.reporte.revisando { align-items: center; text-align: center; border: 1px dashed var(--gold-deep); }
.reporte.revisando .corona { width: 42px; animation: flotar 1.2s ease-in-out infinite alternate; }
.reporte.revisando .hud-font { font-size: 9px; color: var(--gold); }
.reporte.bien { background: rgba(79, 227, 156, 0.08); border: 1px solid rgba(79, 227, 156, 0.5); }
.reporte.bien b { color: var(--ok); }
.reporte.mala { background: rgba(255, 143, 208, 0.08); border: 1px solid rgba(255, 143, 208, 0.5); }
.reporte.mala b { color: var(--rosa); }
.reporte .muted { font-size: 14px; }
.reporte-salvado { font-family: var(--font-hud); font-size: 8px; line-height: 1.7; color: var(--ok); }

/* Zona final */
.zona-final {
  position: fixed;
  inset: 0;
  z-index: 70;
  background: #050002;
  display: grid;
  place-items: end center;
  padding-bottom: max(13vh, env(safe-area-inset-bottom, 0px));
  overflow: hidden;
  animation: zfEntra 0.35s ease-out, zfTiembla 0.5s 2.4s ease-in-out;
}
.zona-final.saliendo { opacity: 0; transition: opacity 0.4s ease-in; }
.zf-fondo {
  position: absolute;
  inset: -4%;
  background-size: cover;
  background-position: center 42%;
  animation: zfAcerca 3.4s ease-out both;
}
.zf-fondo::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 50% 90%, rgba(255, 90, 31, 0.3), rgba(5, 0, 2, 0) 55%), linear-gradient(180deg, rgba(5, 0, 2, 0.45), rgba(5, 0, 2, 0) 18%, rgba(5, 0, 2, 0) 62%, rgba(5, 0, 2, 0.4));
  animation: zfPulso 1.1s ease-in-out infinite alternate;
}
.zf-brasas { position: absolute; inset: 0; pointer-events: none; }
.zf-brasas i {
  position: absolute;
  bottom: -10px;
  width: 4px; height: 4px;
  border-radius: 50%;
  background: var(--lava-2);
  box-shadow: 0 0 8px var(--lava);
  animation: brasa var(--d) var(--e) linear infinite;
}
@keyframes brasa { 0% { transform: translate(0, 0); opacity: 0; } 15% { opacity: 1; } 100% { transform: translate(var(--x), -105vh); opacity: 0; } }
.zf-texto { position: relative; text-align: center; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
.zf-titulo {
  font-family: var(--font-logo);
  font-size: clamp(40px, 13vw, 76px);
  line-height: 1;
  background: linear-gradient(180deg, #fff3c4 0%, var(--lava-2) 38%, var(--lava) 70%, #8a0d06 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 0 18px rgba(255, 90, 31, 0.85)) drop-shadow(0 4px 0 #2a0204);
  animation: zfTitulo 0.9s 0.25s cubic-bezier(.2, 1.4, .4, 1) both;
}
.zf-sub { font-family: var(--font-hud); font-size: 9px; letter-spacing: 0.12em; color: var(--lava-2); margin-top: 14px; text-shadow: 0 0 8px rgba(255, 90, 31, 0.8); animation: aparecer 0.6s 0.8s both; }
@keyframes zfEntra { from { opacity: 0; } }
@keyframes zfAcerca { from { transform: scale(1.18); filter: brightness(0.4); } to { transform: scale(1); filter: brightness(1); } }
@keyframes zfPulso { to { opacity: 0.55; } }
@keyframes zfTitulo { 0% { transform: scale(2.4); opacity: 0; letter-spacing: 0.3em; } 100% { transform: none; opacity: 1; letter-spacing: 0; } }
@keyframes zfTiembla { 20% { transform: translate(-5px, 3px); } 40% { transform: translate(5px, -3px); } 60% { transform: translate(-3px, 2px); } 80% { transform: translate(3px, -1px); } }

/* Ajustes: pistas de música (escuchar / MP3 propio) y preguntas reportadas */
.lista-pistas { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.pista-musica { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 9px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--bg-2); transition: border-color 0.2s, box-shadow 0.2s; }
.pista-musica.sonando { border-color: var(--gold); box-shadow: 0 0 0 1px var(--gold), 0 0 14px rgba(245, 196, 81, 0.25); }
.pm-info { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.pm-info b { font-size: 15px; }
.pm-info span { font-size: 12px; color: var(--muted); }
.pm-info .pm-propia { color: var(--cyan); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pm-acciones { display: flex; flex-direction: column; gap: 6px; align-items: stretch; }
.pm-acciones .btn { white-space: nowrap; }
.subir-mp3 { position: relative; overflow: hidden; cursor: pointer; text-align: center; }
.subir-mp3 input { position: absolute; inset: 0; opacity: 0; width: 100%; height: 100%; cursor: pointer; font-size: 0; }
.subir-mp3.cargando-mp3 { opacity: 0.6; pointer-events: none; }
.pista-musica.sonando .pm-info b::after { content: " ♪"; color: var(--gold); animation: zfPulso 0.6s ease-in-out infinite alternate; }
.reportadas .lista-reportadas { list-style: none; margin: 8px 0; padding: 0; display: flex; flex-direction: column; gap: 6px; max-height: 280px; overflow-y: auto; }
.lista-reportadas li { display: flex; flex-direction: column; gap: 2px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--bg-2); font-size: 13px; }
.lista-reportadas li span { color: var(--muted); font-size: 12px; }
.lista-reportadas li .nota { color: var(--warn); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}
.comodin.especial.usado::before { transform: translate(-50%, -50%) rotate(12deg); }
.comodin.especial.usado::after { transform: translate(-50%, -50%) rotate(-12deg); }

/* ==========================================================================
   Portada: fila «Estoy pensando en...» + cuadrado MINIJUEGO y estilos del minijuego
   ========================================================================== */
.fila-minijuego {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 74px;
  gap: 8px;
  align-items: stretch;
}
.btn-pensando {
  border-color: var(--cyan);
  background: linear-gradient(180deg, rgba(61, 232, 255, 0.16), rgba(255, 110, 199, 0.12));
  color: var(--text);
  box-shadow: 0 3px 0 #09030f, 0 0 14px rgba(61, 232, 255, 0.22);
}
.btn-pensando:hover {
  border-color: var(--rosa);
  box-shadow: 0 3px 0 #09030f, 0 0 18px rgba(255, 110, 199, 0.35);
}
.cuadro-minijuego {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  border: 2px solid var(--rosa);
  border-radius: var(--radius);
  background: linear-gradient(145deg, rgba(255, 110, 199, 0.22), rgba(26, 17, 48, 0.95));
  box-shadow: 0 3px 0 #09030f, 0 0 14px rgba(255, 110, 199, 0.32), inset 0 0 10px rgba(255, 110, 199, 0.18);
  padding: 4px;
  text-align: center;
  user-select: none;
}
.cm-icono {
  font-size: 17px;
  line-height: 1;
  filter: drop-shadow(0 0 6px rgba(255, 110, 199, 0.7));
}
.cm-texto {
  font-family: var(--font-hud);
  font-size: 7px;
  line-height: 1.25;
  letter-spacing: 0.06em;
  color: var(--rosa);
  text-shadow: 0 0 8px rgba(255, 110, 199, 0.65);
}

/* Contenedor y elementos del minijuego «Estoy pensando en...» */
.ep-pantalla {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-bottom: 18px;
}
.ep-pantalla .cabecera {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.ep-pantalla .titulo-seccion {
  font-family: var(--font-logo);
  font-size: clamp(14px, 4.2vw, 19px);
  color: var(--gold);
  letter-spacing: 0.04em;
  text-align: center;
  text-shadow: 0 2px 0 #09030f, 0 0 10px rgba(245, 196, 81, 0.35);
}
.btn-volver, .ep-btn-mini {
  font-family: var(--font-text);
  font-weight: 700;
  font-size: 13px;
  padding: 7px 11px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--panel-2);
  color: var(--text);
  cursor: pointer;
}
.btn-volver:hover, .ep-btn-mini:hover {
  border-color: var(--gold);
  color: var(--gold);
}
.ep-paso-badge {
  font-size: 20px;
}
.ep-hero-banner {
  background: linear-gradient(135deg, rgba(61, 232, 255, 0.14), rgba(255, 110, 199, 0.14));
  border: 1px solid rgba(61, 232, 255, 0.45);
  border-radius: var(--radius);
  padding: 11px 13px;
  box-shadow: 0 0 16px rgba(61, 232, 255, 0.12);
}
.ep-hero-badge {
  font-family: var(--font-hud);
  font-size: 8px;
  color: var(--cyan);
  letter-spacing: 0.08em;
  margin-bottom: 5px;
}
.ep-hero-sub {
  margin: 0;
  font-size: 13px;
  color: var(--text);
  line-height: 1.38;
}
.panel-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
}
.ep-pantalla .subtitulo {
  font-family: var(--font-hud);
  font-size: 9px;
  color: var(--gold);
  letter-spacing: 0.08em;
  margin: 4px 0 6px;
}
.ep-jugadores-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
@media (max-width: 390px) {
  .ep-jugadores-grid { grid-template-columns: 1fr; }
}
.ep-jugador-input {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px;
  border-radius: 9px;
  background: var(--bg-2);
  border: 1px solid var(--line);
}
.ep-jugador-input.ep-j1 { border-color: rgba(61, 232, 255, 0.55); }
.ep-jugador-input.ep-j2 { border-color: rgba(255, 110, 199, 0.55); }
.ep-avatar-chico {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  border: 2px solid var(--line);
}
.ep-j1 .ep-avatar-chico { border-color: var(--cyan); }
.ep-j2 .ep-avatar-chico { border-color: var(--rosa); }
.ep-input-wrap {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
  flex: 1;
}
.ep-input-wrap label {
  font-family: var(--font-hud);
  font-size: 7px;
  letter-spacing: 0.06em;
  color: var(--muted);
}
.ep-j1 .ep-input-wrap label { color: var(--cyan); }
.ep-j2 .ep-input-wrap label { color: var(--rosa); }
.ep-input-wrap input {
  width: 100%;
  padding: 6px 8px;
  font-size: 14px;
  font-weight: 700;
  border-radius: 6px;
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--text);
}

/* Generador IA */
.ep-ia-card {
  border-color: rgba(245, 196, 81, 0.45);
  background: linear-gradient(180deg, rgba(35, 23, 64, 0.92), rgba(26, 17, 48, 0.95));
}
.ep-ia-cab {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}
.ep-ia-badge {
  font-family: var(--font-hud);
  font-size: 8px;
  padding: 4px 7px;
  border-radius: 6px;
  background: rgba(245, 196, 81, 0.18);
  border: 1px solid var(--gold);
  color: var(--gold);
}
.ep-ia-tit {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
}
.ep-ia-fila {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}
.ep-inp-ia {
  width: 100%;
  padding: 9px 11px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--bg-2);
  color: var(--text);
  font-size: 14px;
}
.btn-cyan {
  border-color: var(--cyan);
  background: linear-gradient(180deg, rgba(61, 232, 255, 0.24), rgba(61, 232, 255, 0.1));
  color: var(--cyan);
}
.btn-principal {
  border-color: var(--gold);
  background: linear-gradient(180deg, var(--gold-2), var(--gold));
  color: #160d29;
  box-shadow: 0 3px 0 #5a4210, 0 0 18px rgba(245, 196, 81, 0.35);
}
.btn-secundario {
  background: var(--bg-2);
  color: var(--muted);
  border-color: var(--line);
}
.btn-grande {
  width: 100%;
  padding: 13px 16px;
  font-size: 15px;
}
.ep-ia-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}
.ep-chip-sug {
  font-family: var(--font-text);
  font-size: 12px;
  font-weight: 600;
  padding: 4px 9px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--bg-2);
  color: var(--muted);
  cursor: pointer;
}
.ep-chip-sug:hover {
  border-color: var(--cyan);
  color: var(--cyan);
}
.ep-ia-msg {
  margin-top: 8px;
  padding: 8px 10px;
  border-radius: 8px;
  font-size: 12.5px;
  font-weight: 600;
}
.ep-ia-loading { background: rgba(61, 232, 255, 0.12); border: 1px solid var(--cyan); color: var(--cyan); }
.ep-ia-err { background: rgba(255, 77, 109, 0.14); border: 1px solid var(--bad); color: #ff99ac; }
.ep-ia-ok { background: rgba(46, 230, 166, 0.14); border: 1px solid var(--ok); color: var(--ok); }

/* Lista de universos / temáticas */
.ep-temas-lista {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.ep-tema-card {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--radius);
  border: 2px solid var(--line);
  background: var(--panel);
  cursor: pointer;
  transition: border-color 0.15s, box-shadow 0.15s, transform 0.1s;
}
.ep-tema-card:hover {
  border-color: rgba(245, 196, 81, 0.65);
}
.ep-tema-card.activo {
  border-color: var(--gold);
  background: linear-gradient(135deg, rgba(245, 196, 81, 0.16), rgba(35, 23, 64, 0.95));
  box-shadow: 0 0 0 1px var(--gold), 0 0 16px rgba(245, 196, 81, 0.25);
}
.ep-tema-icono {
  width: 46px;
  height: 46px;
  border-radius: 10px;
  background: var(--bg-2);
  border: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
}
.ep-tema-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  margin-bottom: 2px;
}
.ep-tema-cat {
  font-family: var(--font-hud);
  font-size: 7.5px;
  color: var(--cyan);
  letter-spacing: 0.06em;
}
.ep-tema-count {
  font-family: var(--font-hud);
  font-size: 7.5px;
  color: var(--gold);
}
.ep-tema-nombre {
  font-weight: 700;
  font-size: 15px;
  color: var(--text);
}
.ep-tema-desc {
  font-size: 12.5px;
  color: var(--muted);
  line-height: 1.3;
}
.ep-tema-borrar {
  background: transparent;
  border: 1px solid rgba(255, 77, 109, 0.45);
  border-radius: 7px;
  padding: 6px 8px;
  cursor: pointer;
  font-size: 14px;
}
.ep-acciones-pie {
  margin-top: 4px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* Cortina de privacidad y selector de personaje */
.ep-cortina-box {
  background: var(--panel);
  border: 2px solid var(--line);
  border-radius: var(--radius);
  padding: 22px 16px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  box-shadow: 0 8px 26px rgba(0, 0, 0, 0.45);
}
.ep-cortina-box.ep-color-j1 {
  border-color: var(--cyan);
  box-shadow: 0 0 22px rgba(61, 232, 255, 0.22);
}
.ep-cortina-box.ep-color-j2 {
  border-color: var(--rosa);
  box-shadow: 0 0 22px rgba(255, 110, 199, 0.22);
}
.ep-cortina-avatar {
  width: 84px;
  height: 84px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--gold);
  box-shadow: 0 0 18px rgba(245, 196, 81, 0.35);
}
.ep-color-j1 .ep-cortina-avatar { border-color: var(--cyan); box-shadow: 0 0 18px rgba(61, 232, 255, 0.4); }
.ep-color-j2 .ep-cortina-avatar { border-color: var(--rosa); box-shadow: 0 0 18px rgba(255, 110, 199, 0.4); }
.ep-cortina-etiqueta {
  font-family: var(--font-hud);
  font-size: 8px;
  letter-spacing: 0.1em;
  color: var(--gold);
}
.ep-cortina-titulo {
  margin: 0;
  font-family: var(--font-logo);
  font-size: clamp(20px, 5.5vw, 26px);
  line-height: 1.2;
}
.ep-color-j1 .ep-cortina-titulo span { color: var(--cyan); }
.ep-color-j2 .ep-cortina-titulo span { color: var(--rosa); }
.ep-cortina-aviso {
  margin: 2px 0 8px;
  font-size: 13.5px;
  color: var(--muted);
  max-width: 360px;
}

.ep-selector-barra {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  padding: 10px 12px;
  border-radius: var(--radius);
  background: var(--panel);
  border: 1px solid var(--line);
}
.ep-selector-barra.ep-color-j1 { border-color: rgba(61, 232, 255, 0.55); }
.ep-selector-barra.ep-color-j2 { border-color: rgba(255, 110, 199, 0.55); }
.ep-selector-izq {
  display: flex;
  align-items: center;
  gap: 8px;
}
.ep-avatar-mini {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  object-fit: cover;
}
.ep-selector-tit {
  font-family: var(--font-hud);
  font-size: 8px;
  color: var(--gold);
}
.ep-selector-sub {
  font-size: 12px;
  color: var(--muted);
}
.ep-selector-controles {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.ep-tabs-opciones {
  display: flex;
  gap: 4px;
}
.ep-tab-op {
  font-family: var(--font-text);
  font-size: 12px;
  font-weight: 700;
  padding: 5px 8px;
  border-radius: 6px;
  border: 1px solid var(--line);
  background: var(--bg-2);
  color: var(--muted);
  cursor: pointer;
}
.ep-tab-op.activo {
  border-color: var(--gold);
  color: var(--gold);
  background: rgba(245, 196, 81, 0.14);
}
.ep-btn-reroll {
  font-family: var(--font-text);
  font-size: 12.5px;
  font-weight: 700;
  padding: 6px 10px;
  border-radius: 7px;
  border: 1px solid var(--cyan);
  background: rgba(61, 232, 255, 0.15);
  color: var(--cyan);
  cursor: pointer;
}
.ep-sin-cambios {
  font-size: 11px;
  color: var(--muted);
}

/* Carta de Personaje */
.ep-carta {
  background: linear-gradient(180deg, var(--panel-2), var(--panel));
  border: 2px solid var(--gold);
  border-radius: var(--radius);
  padding: 14px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4), inset 0 0 18px rgba(245, 196, 81, 0.08);
}
.ep-carta.ep-color-j1 {
  border-color: var(--cyan);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4), 0 0 16px rgba(61, 232, 255, 0.18);
}
.ep-carta.ep-color-j2 {
  border-color: var(--rosa);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4), 0 0 16px rgba(255, 110, 199, 0.18);
}
.ep-carta-cab {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}
.ep-carta-avatar {
  width: 52px;
  height: 52px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--gold), var(--rosa));
  color: #160d29;
  font-family: var(--font-logo);
  font-size: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 3px 0 #09030f;
}
.ep-color-j1 .ep-carta-avatar { background: linear-gradient(135deg, var(--cyan), #2a8aff); }
.ep-color-j2 .ep-carta-avatar { background: linear-gradient(135deg, var(--rosa), #ff9e6e); }
.ep-carta-universo {
  font-family: var(--font-hud);
  font-size: 7.5px;
  color: var(--gold);
  letter-spacing: 0.06em;
  display: block;
}
.ep-carta-nombre {
  margin: 2px 0;
  font-family: var(--font-logo);
  font-size: clamp(18px, 5vw, 23px);
  color: var(--text);
  line-height: 1.15;
}
.ep-carta-alias {
  font-size: 13px;
  font-weight: 700;
  color: var(--cyan);
}
.ep-color-j2 .ep-carta-alias { color: var(--rosa); }
.ep-carta-desc {
  margin: 0 0 12px;
  font-size: 13.5px;
  color: var(--text);
  line-height: 1.42;
  background: rgba(11, 6, 22, 0.45);
  padding: 9px 11px;
  border-radius: 8px;
  border-left: 3px solid var(--gold);
}
.ep-rasgos-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px;
  margin-bottom: 12px;
}
.ep-rasgo {
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 7px 9px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.ep-rasgo-full {
  grid-column: 1 / -1;
}
.ep-rasgo-k {
  font-family: var(--font-hud);
  font-size: 7px;
  color: var(--muted);
  letter-spacing: 0.04em;
}
.ep-rasgo-v {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
}
.ep-pistas {
  background: rgba(245, 196, 81, 0.09);
  border: 1px dashed rgba(245, 196, 81, 0.55);
  border-radius: 9px;
  padding: 9px 11px;
}
.ep-pistas-tit {
  font-family: var(--font-hud);
  font-size: 7.5px;
  color: var(--gold);
  margin-bottom: 6px;
  letter-spacing: 0.04em;
}
.ep-pistas-lista {
  margin: 0;
  padding-left: 18px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 12.5px;
  color: var(--text);
}

/* Marcador de Combate */
.ep-marcador-duelo {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 8px;
  align-items: center;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 10px;
}
.ep-marcador-jug {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 8px 6px;
  border-radius: 9px;
  background: var(--bg-2);
  border: 2px solid transparent;
  text-align: center;
}
.ep-marcador-jug.ep-j1.activo {
  border-color: var(--cyan);
  box-shadow: 0 0 14px rgba(61, 232, 255, 0.25);
}
.ep-marcador-jug.ep-j2.activo {
  border-color: var(--rosa);
  box-shadow: 0 0 14px rgba(255, 110, 199, 0.25);
}
.ep-marcador-avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  object-fit: cover;
}
.ep-marcador-nom {
  font-weight: 700;
  font-size: 13.5px;
  max-width: 110px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ep-corazones {
  display: flex;
  gap: 3px;
  font-size: 15px;
}
.ep-corazon.roto {
  opacity: 0.4;
}
.ep-badge-turno, .ep-badge-espera {
  font-family: var(--font-hud);
  font-size: 6.5px;
  padding: 3px 6px;
  border-radius: 4px;
  letter-spacing: 0.05em;
}
.ep-badge-turno {
  background: var(--gold);
  color: #160d29;
}
.ep-badge-espera {
  background: var(--panel);
  color: var(--muted);
}
.ep-marcador-centro {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
}
.ep-vs-circulo {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--panel-2);
  border: 2px solid var(--gold);
  color: var(--gold);
  font-family: var(--font-logo);
  font-size: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.ep-ronda-txt {
  font-family: var(--font-hud);
  font-size: 7px;
  color: var(--muted);
}
.ep-btn-pasar {
  font-family: var(--font-text);
  font-size: 11px;
  font-weight: 700;
  padding: 5px 8px;
  border-radius: 6px;
  border: 1px solid var(--line);
  background: var(--bg-2);
  color: var(--cyan);
  cursor: pointer;
}

.ep-aviso-combate {
  padding: 10px 12px;
  border-radius: 9px;
  font-size: 13px;
  font-weight: 700;
  background: rgba(255, 77, 109, 0.16);
  border: 1px solid var(--bad);
  color: #ffb3c1;
}
.ep-panel-turno.ep-turno-j1 { border-color: rgba(61, 232, 255, 0.6); }
.ep-panel-turno.ep-turno-j2 { border-color: rgba(255, 110, 199, 0.6); }
.ep-turno-cab {
  font-family: var(--font-hud);
  font-size: 9px;
  color: var(--gold);
  margin-bottom: 5px;
}
.ep-turno-inst {
  margin: 0 0 10px;
  font-size: 13.5px;
  color: var(--text);
}
.ep-turno-botones-principales .btn {
  width: 100%;
}

/* Espiar carta secreta en combate */
.ep-espiar-cab, .ep-adivinar-tit {
  font-family: var(--font-hud);
  font-size: 8.5px;
  color: var(--gold);
  margin-bottom: 8px;
  letter-spacing: 0.05em;
}
.ep-espiar-btns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.ep-btn-espiar {
  font-family: var(--font-text);
  font-weight: 700;
  font-size: 12.5px;
  padding: 9px 8px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--bg-2);
  color: var(--text);
  cursor: pointer;
}
.ep-btn-espiar.ep-j1 { border-color: rgba(61, 232, 255, 0.5); color: var(--cyan); }
.ep-btn-espiar.ep-j2 { border-color: rgba(255, 110, 199, 0.5); color: var(--rosa); }
.ep-btn-espiar.activo {
  background: rgba(245, 196, 81, 0.18);
  border-color: var(--gold);
  color: var(--gold);
}
.ep-espiar-contenedor {
  margin-top: 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.ep-espiar-alerta {
  font-size: 12px;
  color: var(--gold);
  background: rgba(245, 196, 81, 0.12);
  border: 1px solid rgba(245, 196, 81, 0.4);
  padding: 6px 10px;
  border-radius: 7px;
  text-align: center;
}

/* Panel adivinar personaje */
.ep-adivinar-sub {
  margin: 0 0 9px;
  font-size: 13px;
  color: var(--muted);
}
.ep-btn-verificar-lista {
  width: 100%;
  margin-bottom: 8px;
}
.ep-adivinar-manual {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.ep-btn-fallo, .ep-btn-acierto {
  font-family: var(--font-text);
  font-weight: 700;
  font-size: 12px;
  padding: 9px 8px;
  border-radius: 8px;
  cursor: pointer;
}
.ep-btn-fallo {
  background: rgba(255, 77, 109, 0.14);
  border: 1px solid var(--bad);
  color: #ff8fa3;
}
.ep-btn-acierto {
  background: rgba(46, 230, 166, 0.14);
  border: 1px solid var(--ok);
  color: var(--ok);
}
.ep-btn-catalogo {
  width: 100%;
}

/* Victoria */
.ep-victoria-hero {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 18px 14px;
  border-width: 2px;
}
.ep-victoria-hero.ep-color-j1 { border-color: var(--cyan); }
.ep-victoria-hero.ep-color-j2 { border-color: var(--rosa); }
.ep-victoria-avatar {
  width: 76px;
  height: 76px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--gold);
  box-shadow: 0 0 18px rgba(245, 196, 81, 0.45);
}
.ep-victoria-Corona {
  font-family: var(--font-hud);
  font-size: 9px;
  color: var(--gold);
  letter-spacing: 0.08em;
}
.ep-victoria-nombre {
  margin: 0;
  font-family: var(--font-logo);
  font-size: clamp(20px, 5.5vw, 26px);
  color: var(--gold);
}
.ep-victoria-motivo {
  margin: 0;
  font-size: 14px;
  color: var(--text);
}
.ep-victoria-stats {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 6px;
  font-size: 12.5px;
  color: var(--muted);
}
.ep-victoria-cartas {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.ep-victoria-etiqueta {
  display: flex;
  align-items: center;
  gap: 7px;
  font-family: var(--font-hud);
  font-size: 8.5px;
  margin-bottom: 6px;
}
.ep-victoria-etiqueta.ep-j1 { color: var(--cyan); }
.ep-victoria-etiqueta.ep-j2 { color: var(--rosa); }

/* Modales de Estoy Pensando */
.ep-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(8, 4, 16, 0.85);
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 14px;
}
.ep-modal-box {
  width: 100%;
  max-width: 440px;
  max-height: 88vh;
  background: var(--panel);
  border: 2px solid var(--gold);
  border-radius: var(--radius);
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.65);
}
.ep-modal-grande {
  height: 82vh;
}
.ep-modal-cab {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.ep-modal-cab h3 {
  margin: 0;
  font-family: var(--font-logo);
  font-size: 16px;
  color: var(--gold);
}
.ep-modal-x {
  background: var(--bg-2);
  border: 1px solid var(--line);
  color: var(--text);
  border-radius: 7px;
  width: 30px;
  height: 30px;
  cursor: pointer;
  font-weight: 700;
}
.ep-modal-body {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 13.5px;
  line-height: 1.4;
}
.ep-regla-item {
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 10px;
}
.ep-modal-p {
  margin: 0;
  font-size: 13px;
  color: var(--muted);
}
.ep-modal-acciones {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.ep-inp-buscar {
  width: 100%;
  padding: 9px 11px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--bg-2);
  color: var(--text);
  font-size: 14px;
}
.ep-lista-modal {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding-right: 2px;
}
.ep-item-personaje {
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}
.ep-item-personaje.expandido {
  border-color: var(--cyan);
}
.ep-item-fila {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 9px 11px;
  cursor: pointer;
}
.ep-item-nombre {
  font-weight: 700;
  font-size: 14px;
  color: var(--text);
}
.ep-item-sub {
  font-size: 12px;
  color: var(--muted);
}
.ep-item-sub span {
  color: var(--cyan);
}
.ep-btn-elegir-verif {
  font-family: var(--font-text);
  font-weight: 700;
  font-size: 12px;
  padding: 6px 10px;
  border-radius: 7px;
  border: 1px solid var(--gold);
  background: rgba(245, 196, 81, 0.18);
  color: var(--gold);
  cursor: pointer;
  white-space: nowrap;
}
.ep-item-detalle {
  padding: 0 11px 10px;
  border-top: 1px solid var(--line);
  font-size: 12.5px;
  color: var(--text);
}
.ep-item-detalle p {
  margin: 8px 0;
}
.ep-rasgos-mini {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}
.ep-rasgos-mini span {
  font-size: 11.5px;
  background: var(--panel);
  border: 1px solid var(--line);
  padding: 3px 7px;
  border-radius: 6px;
}
.ep-sin-resultados {
  text-align: center;
  padding: 20px;
  color: var(--muted);
  font-size: 13px;
}
