/* =========================================================
   LA ISLA DEL CÓDIGO VIVO · Hoja de estilos
   ========================================================= */

:root {
  --noche-1: #1b1140;
  --noche-2: #2a1b5e;
  --noche-3: #3a2580;
  --panel: #241a52;
  --panel-claro: #322463;
  --texto: #f5f0ff;
  --texto-tenue: #c5b9ef;
  --oro: #ffd34d;
  --oro-2: #f7b733;
  --azul: #43c6ff;
  --azul-2: #2aa7e0;
  --verde: #5fd068;
  --rojo: #ff5b6e;
  --rojo-2: #e23d54;
  --sombra: 0 10px 30px rgba(0, 0, 0, 0.45);
  --radio: 16px;
  --fuente-display: 'Luckiest Guy', 'Trebuchet MS', system-ui, sans-serif;
  --fuente-texto: 'Fredoka', 'Segoe UI', system-ui, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  height: 100%;
  font-family: var(--fuente-texto);
  color: var(--texto);
  background:
    radial-gradient(1200px 800px at 50% -10%, #4a2da3 0%, transparent 60%),
    linear-gradient(160deg, var(--noche-2), var(--noche-1));
  overflow: hidden;
}

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

/* ---------- Sistema de pantallas ---------- */
.pantalla {
  position: fixed;
  inset: 0;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: clamp(8px, 2vw, 24px);
  animation: aparecer 0.45s ease;
}
.pantalla.activa { display: flex; }

@keyframes aparecer {
  from { opacity: 0; transform: scale(0.98); }
  to   { opacity: 1; transform: scale(1); }
}

/* ---------- Escenario 16:9 (imágenes a pantalla completa) ---------- */
.escenario {
  position: relative;
  width: 100%;
  max-width: 100%;
  max-height: 100%;
  aspect-ratio: 16 / 9;
  border-radius: var(--radio);
  overflow: hidden;
  box-shadow: var(--sombra);
}
.escenario__fondo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  user-select: none;
  -webkit-user-drag: none;
}

/* ---------- Botón EMPEZAR (hotspot sobre la imagen de inicio) ---------- */
.hotspot-empezar {
  position: absolute;
  left: 29%;
  top: 80%;
  width: 42%;
  height: 14%;
  border: none;
  border-radius: 999px;
  background: transparent;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.2s ease, background 0.2s ease;
}
.hotspot-empezar:hover,
.hotspot-empezar:focus-visible {
  background: rgba(255, 211, 77, 0.18);
  box-shadow: 0 0 0 4px rgba(255, 211, 77, 0.55), 0 0 40px rgba(255, 211, 77, 0.6);
  transform: scale(1.03);
  outline: none;
}
.hotspot-empezar::after {
  content: "▶";
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: clamp(18px, 3vw, 30px);
  color: #fff;
  opacity: 0;
  transition: opacity 0.2s ease;
  text-shadow: 0 2px 8px rgba(0,0,0,.6);
}
.hotspot-empezar:hover::after { opacity: 0.85; }

/* =========================================================
   PANTALLA MAPA
   ========================================================= */
.barra-superior {
  width: 100%;
  max-width: 1400px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px clamp(10px, 2vw, 20px);
  margin-bottom: clamp(6px, 1.4vh, 14px);
  background: linear-gradient(180deg, rgba(58, 37, 128, 0.9), rgba(36, 26, 82, 0.85));
  border: 1px solid rgba(255, 211, 77, 0.25);
  border-radius: var(--radio);
  box-shadow: var(--sombra);
  backdrop-filter: blur(4px);
}
.barra-superior__titulo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--fuente-display);
  font-size: clamp(14px, 2.4vw, 22px);
  letter-spacing: 0.5px;
  color: var(--oro);
  text-shadow: 0 2px 0 rgba(0,0,0,.35);
}
.barra-superior__icono { font-size: 1.4em; }

.progreso {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  max-width: 340px;
}
.progreso__barra {
  flex: 1;
  height: 14px;
  background: rgba(0, 0, 0, 0.35);
  border-radius: 999px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.12);
}
.progreso__relleno {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--oro-2), var(--oro));
  border-radius: 999px;
  transition: width 0.6s cubic-bezier(.2,.8,.2,1);
  box-shadow: 0 0 12px rgba(255, 211, 77, 0.7);
}
.progreso__texto { font-size: clamp(12px, 1.6vw, 15px); white-space: nowrap; color: var(--texto-tenue); }
.progreso__texto strong { color: var(--oro); font-size: 1.15em; }

.mapa-zona {
  flex: 1;
  width: 100%;
  max-width: 1400px;
  min-height: 0;
  display: grid;
  place-items: center;
}
.escenario--mapa { width: 100%; }

.pista-mapa {
  margin-top: clamp(6px, 1.2vh, 12px);
  font-size: clamp(12px, 1.6vw, 15px);
  color: var(--texto-tenue);
  text-align: center;
}

/* ---------- Capa de hotspots de territorios ---------- */
.capa-hotspots { position: absolute; inset: 0; }

.hotspot {
  position: absolute;
  border: 2px solid transparent;
  border-radius: 14px;
  background: transparent;
  cursor: pointer;
  transition: background 0.2s ease, box-shadow 0.25s ease, border-color 0.2s ease, transform 0.15s ease;
  -webkit-tap-highlight-color: transparent;
}
.hotspot:focus-visible { outline: none; }

/* Estado: DISPONIBLE — invita a pulsar */
.hotspot--disponible:hover,
.hotspot--disponible:focus-visible {
  background: rgba(67, 198, 255, 0.16);
  border-color: rgba(67, 198, 255, 0.8);
  box-shadow: 0 0 0 3px rgba(67, 198, 255, 0.35), 0 0 28px rgba(67, 198, 255, 0.55);
  transform: scale(1.03);
}
.hotspot--disponible::before {
  content: "";
  position: absolute;
  inset: -2px;
  border-radius: 14px;
  border: 2px dashed rgba(67, 198, 255, 0.55);
  opacity: 0;
  animation: latido 2.4s ease-in-out infinite;
}
@keyframes latido {
  0%, 100% { opacity: 0.0; transform: scale(0.97); }
  50%      { opacity: 0.65; transform: scale(1.0); }
}

/* Estado: COMPLETADO — conquistado, brillo dorado + insignia */
.hotspot--completado {
  background: rgba(255, 211, 77, 0.12);
  border-color: rgba(255, 211, 77, 0.85);
  box-shadow: 0 0 0 3px rgba(255, 211, 77, 0.35), 0 0 30px rgba(255, 211, 77, 0.6);
}
.hotspot--completado:hover { transform: scale(1.02); }
.hotspot__insignia {
  position: absolute;
  top: -14px;
  left: -14px;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  font-size: 20px;
  color: #5a3b00;
  background: radial-gradient(circle at 30% 25%, #fff2bf, var(--oro) 55%, var(--oro-2));
  border: 2px solid #fff7da;
  border-radius: 50%;
  box-shadow: 0 4px 12px rgba(0,0,0,.4), 0 0 18px rgba(255, 211, 77, 0.8);
  animation: aparecer-insignia 0.5s cubic-bezier(.2,1.4,.4,1);
}
.hotspot__insignia--titulo {
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--fuente-display);
  font-size: 11px;
  letter-spacing: .4px;
  color: #5a3b00;
  background: linear-gradient(180deg, var(--oro), var(--oro-2));
  padding: 2px 10px;
  border-radius: 999px;
  white-space: nowrap;
  box-shadow: 0 3px 8px rgba(0,0,0,.4);
  border: 1px solid #fff7da;
}
@keyframes aparecer-insignia {
  from { transform: scale(0) rotate(-40deg); }
  to   { transform: scale(1) rotate(0); }
}

/* Estado: BLOQUEADO — solo en modo secuencial */
.hotspot--bloqueado {
  cursor: not-allowed;
  background: rgba(0, 0, 0, 0.42);
  border-color: rgba(255,255,255,.08);
}
.hotspot--bloqueado::after {
  content: "🔒";
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: clamp(20px, 3vw, 32px);
  filter: drop-shadow(0 3px 6px rgba(0,0,0,.6));
}

/* =========================================================
   BOTONES
   ========================================================= */
.boton {
  font-family: var(--fuente-texto);
  font-weight: 600;
  font-size: clamp(13px, 1.6vw, 16px);
  color: #fff;
  background: linear-gradient(180deg, var(--azul), var(--azul-2));
  border: none;
  border-radius: 999px;
  padding: 10px 18px;
  cursor: pointer;
  box-shadow: 0 6px 16px rgba(0,0,0,.35);
  transition: transform 0.12s ease, box-shadow 0.2s ease, filter 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.boton:hover { transform: translateY(-2px); filter: brightness(1.08); }
.boton:active { transform: translateY(0); }
.boton--peligro { background: linear-gradient(180deg, var(--rojo), var(--rojo-2)); }
.boton--secundario { background: linear-gradient(180deg, #6a5aa8, #4a3d80); }
.boton--exito { background: linear-gradient(180deg, var(--verde), #3aa84a); }
.boton--oro { background: linear-gradient(180deg, var(--oro), var(--oro-2)); color: #5a3b00; }
.boton--grande { font-size: clamp(15px, 2vw, 19px); padding: 14px 28px; }
.boton--volver { background: linear-gradient(180deg, #6a5aa8, #4a3d80); }
.boton:disabled { opacity: 0.5; cursor: not-allowed; transform: none; filter: grayscale(.3); }

/* =========================================================
   PANTALLA DE PRUEBA (modal)
   ========================================================= */
.pantalla--prueba {
  background: rgba(10, 6, 28, 0.86);
  backdrop-filter: blur(6px);
  z-index: 50;
}
.prueba {
  width: min(960px, 100%);
  max-height: 100%;
  display: flex;
  flex-direction: column;
  background: linear-gradient(180deg, var(--panel-claro), var(--panel));
  border: 1px solid rgba(255, 211, 77, 0.3);
  border-radius: 20px;
  box-shadow: var(--sombra);
  overflow: hidden;
}
.prueba__cabecera {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 20px;
  background: linear-gradient(180deg, rgba(74, 45, 163, 0.6), transparent);
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.prueba__titulo-grupo { display: flex; align-items: center; gap: 14px; }
.prueba__numero {
  width: 46px; height: 46px;
  flex: none;
  display: grid; place-items: center;
  font-family: var(--fuente-display);
  font-size: 22px;
  color: #5a3b00;
  background: radial-gradient(circle at 30% 25%, #fff2bf, var(--oro) 60%, var(--oro-2));
  border-radius: 12px;
  box-shadow: 0 4px 10px rgba(0,0,0,.35);
}
.prueba__titulo { font-family: var(--fuente-display); font-size: clamp(18px, 3vw, 26px); color: var(--oro); letter-spacing: .5px; }
.prueba__tipo { font-size: 13px; color: var(--texto-tenue); text-transform: uppercase; letter-spacing: 1.2px; }

.prueba__cuerpo {
  padding: 20px;
  overflow-y: auto;
  flex: 1;
}
.prueba__descripcion {
  font-size: clamp(14px, 1.8vw, 17px);
  line-height: 1.55;
  color: var(--texto);
  background: rgba(0,0,0,.18);
  border-left: 4px solid var(--oro);
  border-radius: 10px;
  padding: 14px 16px;
  margin-bottom: 18px;
}
.prueba__descripcion ul { margin: 8px 0 0 20px; }
.prueba__descripcion li { margin: 4px 0; }
.prueba__contenido { margin-top: 6px; }
.prueba__pie {
  padding: 14px 20px;
  border-top: 1px solid rgba(255,255,255,.08);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 10px;
}

/* ---------- Formulario de código del profesor ---------- */
.codigo-form {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  text-align: center;
  background: rgba(0,0,0,.2);
  border: 1px dashed rgba(255, 211, 77, 0.4);
  border-radius: 16px;
  padding: clamp(18px, 4vw, 32px);
}
.codigo-form__etiqueta { font-size: 15px; color: var(--texto-tenue); }
.codigo-form__fila { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }
.codigo-input {
  font-family: var(--fuente-texto);
  font-size: 20px;
  font-weight: 600;
  letter-spacing: 2px;
  text-align: center;
  color: var(--texto);
  background: rgba(0,0,0,.35);
  border: 2px solid rgba(67, 198, 255, 0.5);
  border-radius: 12px;
  padding: 12px 18px;
  width: min(260px, 70vw);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.codigo-input:focus {
  outline: none;
  border-color: var(--azul);
  box-shadow: 0 0 0 4px rgba(67, 198, 255, 0.25);
}
.codigo-input--error { border-color: var(--rojo) !important; animation: temblor 0.4s; }
@keyframes temblor {
  0%,100% { transform: translateX(0); }
  20% { transform: translateX(-8px); }
  40% { transform: translateX(8px); }
  60% { transform: translateX(-5px); }
  80% { transform: translateX(5px); }
}
.codigo-mensaje { font-size: 14px; min-height: 20px; font-weight: 600; }
.codigo-mensaje--error { color: var(--rojo); }
.codigo-mensaje--ok { color: var(--verde); }
.codigo-nota { font-size: 12px; color: var(--texto-tenue); opacity: .8; }

/* Cartel de territorio ya completado */
.completado-cartel {
  text-align: center;
  background: rgba(255, 211, 77, 0.1);
  border: 1px solid rgba(255, 211, 77, 0.5);
  border-radius: 16px;
  padding: 24px;
}
.completado-cartel__icono { font-size: 48px; }
.completado-cartel__titulo { font-family: var(--fuente-display); color: var(--oro); font-size: 24px; margin: 8px 0; }

/* =========================================================
   MINIJUEGOS (estilos compartidos)
   ========================================================= */
.juego { display: flex; flex-direction: column; align-items: center; gap: 16px; }
.juego__barra {
  display: flex; gap: 16px; flex-wrap: wrap; justify-content: center;
  font-size: 15px; color: var(--texto-tenue);
}
.juego__dato strong { color: var(--oro); font-size: 1.15em; }
.juego__instr { font-size: 14px; color: var(--texto-tenue); text-align: center; max-width: 560px; }

/* ----- Acueducto Binario (tuberías) ----- */
.tuberias {
  display: grid;
  gap: 6px;
  background: rgba(0,0,0,.3);
  padding: 12px;
  border-radius: 16px;
  border: 1px solid rgba(67,198,255,.25);
}
.tuberia-celda {
  width: clamp(36px, 8.2vw, 52px);
  height: clamp(36px, 8.2vw, 52px);
  background: linear-gradient(160deg, #2c2350, #1d1740);
  border-radius: 10px;
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: transform 0.12s ease, background 0.2s ease;
  border: 1px solid rgba(255,255,255,.06);
}
.tuberia-celda:hover { background: linear-gradient(160deg, #38306a, #251d54); transform: scale(1.04); }
.tuberia-celda--fija { cursor: default; }
.tuberia-celda--fija:hover { transform: none; }
.tuberia-celda svg { width: 100%; height: 100%; display: block; transition: transform 0.18s cubic-bezier(.3,1.3,.5,1); }
.tuberia-celda .trazo { stroke: #6f7da6; stroke-width: 13; fill: none; stroke-linecap: round; transition: stroke 0.25s ease; }
.tuberia-celda--agua .trazo { stroke: var(--azul); filter: drop-shadow(0 0 5px rgba(67,198,255,.9)); }
.tuberia-celda--origen { background: linear-gradient(160deg, #1d5a7a, #143f5a); }
.tuberia-celda--destino { background: linear-gradient(160deg, #1d7a52, #14563a); }

/* ----- Jardín Memory ----- */
.memory {
  display: grid;
  gap: 10px;
  perspective: 900px;
}
.carta {
  aspect-ratio: 3 / 4;
  width: clamp(58px, 14vw, 92px);
  position: relative;
  cursor: pointer;
  transform-style: preserve-3d;
  transition: transform 0.45s;
  border-radius: 12px;
}
.carta--volteada, .carta--encontrada { transform: rotateY(180deg); }
.carta--encontrada { cursor: default; }
.carta__cara {
  position: absolute;
  inset: 0;
  backface-visibility: hidden;
  border-radius: 12px;
  display: grid;
  place-items: center;
  font-size: clamp(26px, 6vw, 42px);
  box-shadow: 0 4px 10px rgba(0,0,0,.35);
}
.carta__dorso {
  background: linear-gradient(160deg, #4a2da3, #2a1b5e);
  border: 2px solid rgba(255, 211, 77, 0.4);
  color: var(--oro);
  font-size: clamp(20px, 5vw, 30px);
}
.carta__frente {
  background: linear-gradient(160deg, #2d6a3a, #1d4a2a);
  border: 2px solid rgba(95, 208, 104, 0.6);
  transform: rotateY(180deg);
}
.carta--encontrada .carta__frente {
  border-color: var(--oro);
  box-shadow: 0 0 18px rgba(255, 211, 77, 0.7);
}

/* ----- Observatorio del Enigma ----- */
.enigma { width: min(560px, 100%); }
.enigma__pregunta {
  font-size: clamp(16px, 2.2vw, 20px);
  font-weight: 600;
  text-align: center;
  background: rgba(0,0,0,.25);
  border-radius: 14px;
  padding: 20px;
  margin-bottom: 16px;
  border: 1px solid rgba(67,198,255,.3);
  line-height: 1.5;
}
.enigma__opciones { display: grid; gap: 10px; }
.enigma-opcion {
  font-family: var(--fuente-texto);
  font-size: 16px;
  color: var(--texto);
  text-align: left;
  background: var(--panel-claro);
  border: 2px solid rgba(255,255,255,.1);
  border-radius: 12px;
  padding: 14px 18px;
  cursor: pointer;
  transition: transform 0.12s ease, border-color 0.2s ease, background 0.2s ease;
}
.enigma-opcion:hover { transform: translateY(-2px); border-color: var(--azul); background: #3a2b72; }
.enigma-opcion--correcta { border-color: var(--verde); background: rgba(95, 208, 104, 0.22); }
.enigma-opcion--incorrecta { border-color: var(--rojo); background: rgba(255, 91, 110, 0.22); }
.enigma-opcion:disabled { cursor: default; }

/* ----- Torre de Secuencias (Simon) ----- */
.simon {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
  width: min(360px, 80vw);
}
.simon-boton {
  aspect-ratio: 1;
  border: none;
  border-radius: 18px;
  cursor: pointer;
  opacity: 0.55;
  transition: opacity 0.12s ease, transform 0.12s ease, box-shadow 0.12s ease;
  box-shadow: inset 0 -6px 14px rgba(0,0,0,.35);
}
.simon-boton:hover { transform: scale(1.02); }
.simon-boton--activo { opacity: 1; transform: scale(1.05); box-shadow: 0 0 30px currentColor, inset 0 -6px 14px rgba(0,0,0,.2); }
.simon-boton[data-color="0"] { background: #ff5b6e; color: #ff5b6e; }
.simon-boton[data-color="1"] { background: #43c6ff; color: #43c6ff; }
.simon-boton[data-color="2"] { background: #5fd068; color: #5fd068; }
.simon-boton[data-color="3"] { background: #ffd34d; color: #ffd34d; }
.simon-centro {
  text-align: center;
  font-family: var(--fuente-display);
  font-size: 20px;
  color: var(--oro);
  margin-bottom: 4px;
}

/* =========================================================
   MODAL DE CONFIRMACIÓN
   ========================================================= */
.modal-fondo {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(10, 6, 28, 0.78);
  backdrop-filter: blur(4px);
  z-index: 100;
  padding: 20px;
}
.modal-fondo.activa { display: flex; animation: aparecer 0.25s ease; }
.modal {
  width: min(420px, 100%);
  background: linear-gradient(180deg, var(--panel-claro), var(--panel));
  border: 1px solid rgba(255, 91, 110, 0.4);
  border-radius: 20px;
  padding: 26px;
  text-align: center;
  box-shadow: var(--sombra);
}
.modal__titulo { font-family: var(--fuente-display); font-size: 24px; color: var(--oro); margin-bottom: 10px; }
.modal__texto { font-size: 15px; color: var(--texto-tenue); line-height: 1.5; margin-bottom: 22px; }
.modal__botones { display: flex; gap: 12px; justify-content: center; }

/* =========================================================
   AVISOS (toasts)
   ========================================================= */
.avisos {
  position: fixed;
  bottom: 22px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 200;
  pointer-events: none;
  width: min(460px, 92vw);
}
.aviso {
  background: linear-gradient(180deg, var(--panel-claro), var(--panel));
  border: 1px solid rgba(255,255,255,.15);
  border-left: 5px solid var(--azul);
  border-radius: 12px;
  padding: 12px 16px;
  font-size: 14px;
  box-shadow: var(--sombra);
  animation: subir 0.3s ease;
}
.aviso--ok { border-left-color: var(--verde); }
.aviso--error { border-left-color: var(--rojo); }
.aviso--oro { border-left-color: var(--oro); }
@keyframes subir {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* =========================================================
   CONFETI (festejo al completar)
   ========================================================= */
.confeti {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 300;
  overflow: hidden;
  display: none;
}
.confeti.activo { display: block; }
.confeti span {
  position: absolute;
  top: -20px;
  width: 11px;
  height: 11px;
  border-radius: 2px;
  animation: caer linear forwards;
}
@keyframes caer {
  to { transform: translateY(105vh) rotate(720deg); opacity: 0.9; }
}

/* =========================================================
   ACCIONES PANTALLA FINAL
   ========================================================= */
.final-acciones {
  position: absolute;
  bottom: 4%;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  justify-content: center;
}

/* =========================================================
   AURA DEL CÓDIGO
   ========================================================= */
.hotspot__aura {
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--fuente-texto);
  font-weight: 700;
  font-size: 11px;
  color: #5a3b00;
  background: linear-gradient(180deg, #ffe79a, var(--oro-2));
  padding: 1px 8px;
  border-radius: 999px;
  white-space: nowrap;
  border: 1px solid #fff7da;
  box-shadow: 0 2px 6px rgba(0, 0, 0, .4);
}

.aura-panel {
  background: linear-gradient(180deg, rgba(255, 211, 77, .12), rgba(255, 211, 77, .04));
  border: 1px solid rgba(255, 211, 77, 0.4);
  border-radius: 14px;
  padding: 12px 16px;
  margin-bottom: 16px;
}
.aura-panel__cab {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--fuente-display);
  letter-spacing: .5px;
  color: var(--oro);
  font-size: 16px;
}
.aura-panel__cab strong { margin-left: auto; color: var(--texto); }
.aura-puntos { display: inline-flex; gap: 2px; }
.aura-punto { filter: grayscale(1) opacity(.35); font-size: 16px; transition: filter .3s, transform .3s; }
.aura-punto--on { filter: none; transform: scale(1.15); text-shadow: 0 0 8px rgba(255, 211, 77, .9); }
.aura-panel__nota { font-size: 13px; color: var(--texto-tenue); margin-top: 6px; line-height: 1.4; }
.aura-panel__ok { color: var(--verde); font-weight: 700; }

/* Barra de cuenta atrás de los minijuegos con tiempo */
.tiempo-barra {
  width: min(420px, 90%);
  height: 8px;
  background: rgba(0, 0, 0, .35);
  border-radius: 999px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, .1);
}
.tiempo-relleno {
  height: 100%;
  width: 100%;
  background: linear-gradient(90deg, var(--verde), var(--oro), var(--rojo));
  border-radius: 999px;
  transition: width 1s linear;
}

/* Avisos dentro de un minijuego */
.juego__aviso { min-height: 20px; font-size: 14px; font-weight: 600; text-align: center; }
.juego__aviso--ok { color: var(--verde); }
.juego__aviso--error { color: var(--rojo); }
.juego__aviso--oro { color: var(--oro); }
.juego__pista { font-size: 12px; color: var(--texto-tenue); }

/* Botón de pista en los enigmas */
.enigma-pista {
  margin-top: 12px;
  font-family: var(--fuente-texto);
  font-size: 13px;
  color: var(--oro);
  background: transparent;
  border: 1px dashed rgba(255, 211, 77, .5);
  border-radius: 999px;
  padding: 6px 14px;
  cursor: pointer;
}
.enigma-pista:hover { background: rgba(255, 211, 77, .12); }
.enigma-pista:disabled { opacity: .5; cursor: default; }

/* =========================================================
   DEMOS · pistas visuales de las pruebas del profe
   ========================================================= */
.demo {
  background: rgba(0, 0, 0, .22);
  border: 1px solid rgba(67, 198, 255, .3);
  border-radius: 16px;
  padding: 16px;
  margin-bottom: 18px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}
.demo__titulo { font-family: var(--fuente-display); color: var(--azul); letter-spacing: .5px; font-size: 16px; }
.demo__pista { font-size: 13px; color: var(--texto-tenue); line-height: 1.45; max-width: 460px; }
.demo-canvas {
  image-rendering: pixelated;
  background: linear-gradient(160deg, #0e1430, #1a2147);
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, .1);
}
.demo-escenario {
  position: relative;
  width: min(440px, 100%);
  height: 120px;
  background: linear-gradient(180deg, #16224a, #0e1838);
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(95, 208, 104, .3);
}
.demo-clon { position: absolute; top: -28px; font-size: 24px; animation: demo-caer linear forwards; }
@keyframes demo-caer { to { transform: translateY(150px); } }
.demo-nombre, .demo-chiste {
  font-family: var(--fuente-display);
  font-size: clamp(16px, 3vw, 22px);
  color: var(--oro);
  background: rgba(0, 0, 0, .3);
  border-radius: 12px;
  padding: 14px 18px;
  min-height: 28px;
  width: min(460px, 100%);
  line-height: 1.4;
}
.demo-chiste { font-family: var(--fuente-texto); font-size: clamp(14px, 2.4vw, 18px); color: var(--texto); }
.demo-nombre--pop { animation: pop .35s cubic-bezier(.2, 1.5, .4, 1); }
@keyframes pop { from { transform: scale(.85); } to { transform: scale(1); } }

/* =========================================================
   RESPONSIVE
   ========================================================= */
@media (max-width: 720px) {
  .barra-superior { flex-wrap: wrap; }
  .barra-superior__titulo { font-size: 15px; }
  .boton__texto { display: none; }
  .progreso { order: 3; max-width: 100%; width: 100%; }
  .prueba__numero { width: 38px; height: 38px; font-size: 18px; }
}

@media (orientation: portrait) and (max-width: 920px) {
  .pista-mapa::after {
    content: " · Gira el dispositivo en horizontal para verlo mejor 📱↔️";
    color: var(--oro);
  }
}

/* Respeta a quien prefiere menos animación */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}
