/* ALERTA ESPACIAL — Estilos del sitio (usa tokens.css y fuentes.css) */

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  color: #F4EFFA;
  background:
    radial-gradient(1100px 650px at 75% -8%, var(--acento-morado), transparent 60%),
    radial-gradient(900px 600px at -10% 40%, var(--espacio-2), transparent 55%),
    var(--espacio-1);
  line-height: 1.6;
}
img { max-width: 100%; height: auto; }
a { color: var(--juego-cielo); }
:focus-visible { outline: 3px solid var(--astro-ambar); outline-offset: 2px; border-radius: 4px; }

/* Todos los títulos usan Patria (tipografía institucional de Gobierno de México) */
.display {
  font-family: var(--font-heading);
  font-style: normal; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.02em; line-height: 1.12;
}
h1, h2, h3, h4, .nav-logo, .seccion h2, .jg-h { font-family: var(--font-heading); font-weight: 700; }
.hero-texto h1 { text-transform: none; }
.heading { font-family: var(--font-heading); font-weight: 700; }

/* ---------- Navegación ---------- */
.nav {
  position: sticky; top: 0; z-index: 100;
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  padding: 10px 18px;
  background: rgba(39, 29, 68, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(255,255,255,0.14);
}
.nav-logo { font-size: 18px; color: #FFF; text-decoration: none; }
.nav-links { margin-left: auto; display: flex; gap: 6px; flex-wrap: wrap; }
.nav-links a {
  color: #F4EFFA; text-decoration: none; font-weight: 700; font-size: 14px;
  padding: 8px 12px; border-radius: 10px;
}
.nav-links a:hover { background: rgba(255,255,255,0.12); }

/* ---------- Secciones ---------- */
.seccion { max-width: 1020px; margin: 0 auto; padding: 56px 18px; }
.seccion h2 {
  font-size: clamp(26px, 4vw, 38px); margin: 0 0 8px;
}
.seccion .sub { opacity: 0.85; max-width: 640px; margin-top: 0; }

/* ---------- Hero / Historia ---------- */
.hero { display: flex; align-items: center; gap: 32px; flex-wrap: wrap; padding-top: 40px; }
.hero-logo {
  background: #FFF; border-radius: 50%;
  width: min(260px, 62vw); aspect-ratio: 1; flex: 0 0 auto;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 0 90px rgba(146, 66, 146, 0.45);
  margin-inline: auto;
}
.hero-logo .display { color: var(--ceav-morado); font-size: clamp(30px, 5vw, 44px); text-align: center; transform: skewX(-6deg); }
.hero-texto { flex: 1 1 340px; }
.hero-texto h1 { font-size: clamp(24px, 3.6vw, 34px); margin: 0 0 12px; }
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 18px; }

.historia { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 18px; margin-top: 30px; }
.historia .paso {
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.16);
  border-radius: 16px; padding: 18px;
}
.historia .paso .num {
  display: inline-flex; width: 34px; height: 34px; border-radius: 50%;
  background: var(--astro-ambar); color: #3A2412; font-weight: 900;
  align-items: center; justify-content: center; margin-bottom: 8px;
}
.personajes { display: flex; gap: 20px; align-items: flex-end; justify-content: center; margin-top: 34px; flex-wrap: wrap; }
.personajes figure { margin: 0; text-align: center; }
.personajes img { max-height: 320px; width: auto; filter: drop-shadow(0 10px 26px rgba(0,0,0,0.45)); }
.personajes figcaption { font-weight: 700; margin-top: 8px; }

/* ---------- Videos ---------- */
.videos { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 16px; margin-top: 24px; }
.videos video { width: 100%; border-radius: 14px; background: #000; border: 1px solid rgba(255,255,255,0.18); }
.video-nota { font-size: 13px; opacity: 0.75; }

/* ---------- Botones ---------- */
.btn {
  border: none; border-radius: 14px; cursor: pointer;
  font-family: inherit; font-weight: 800; font-size: 16px;
  padding: 13px 24px;
}
.btn-p { background: var(--astro-ambar); color: #3A2412; box-shadow: 0 4px 0 var(--gob-dorado); }
.btn-p:hover { filter: brightness(1.06); }
.btn-s {
  background: rgba(255,255,255,0.12); color: #F4EFFA;
  border: 1.5px solid rgba(255,255,255,0.35); font-size: 14px; padding: 10px 16px; border-radius: 12px;
}
.btn:disabled { opacity: 0.55; cursor: default; }

/* ---------- Juego ---------- */
#juego-root { position: relative; min-height: 560px; }
.jg-centro {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; gap: 18px; padding: 30px 10px; min-height: 520px;
}
.jg-logo {
  background: #FFF; border-radius: 50%; width: 220px; height: 220px;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 0 80px rgba(146, 66, 146, 0.45);
}
.jg-logo .display { color: var(--ceav-morado); font-size: 36px; transform: skewX(-6deg); }
.jg-intro { max-width: 440px; font-size: 16px; }
.jg-nota, .jg-mini { font-size: 13px; opacity: 0.75; }
.jg-h { font-size: 24px; margin: 0; }
.jg-pjs { display: flex; gap: 14px; flex-wrap: wrap; justify-content: center; }
.jg-pj {
  background: rgba(255,255,255,0.07); border: 2px solid rgba(255,255,255,0.25);
  border-radius: 18px; padding: 18px 16px; cursor: pointer; color: #F4EFFA;
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  font-family: inherit; font-weight: 800; font-size: 15px;
}
.jg-pj.sel { border-color: var(--astro-ambar); background: rgba(223,154,78,0.18); }

.jg-tablero-wrap { display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 8px 0 16px; }
.jg-hud {
  width: 100%; max-width: 720px; display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  background: rgba(255,255,255,0.08); border: 1px solid rgba(255,255,255,0.18);
  border-radius: 16px; padding: 10px 14px;
}
.jg-hud .display { font-size: 16px; }
.hud-item { display: flex; gap: 4px; align-items: center; }
.hud-item small { opacity: 0.8; }
.chip-fuel { width: 14px; height: 18px; background: var(--astro-coral); border-radius: 3px; display: inline-block; }
.hud-frags { margin-left: auto; display: flex; gap: 5px; }
.frag {
  width: 26px; height: 26px; border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(255,255,255,0.12); border: 1.5px solid rgba(255,255,255,0.3);
  font-size: 13px; font-weight: 900; color: #3A2412;
}
.frag.on { background: var(--astro-ambar); }

.jg-svg { width: 100%; max-width: 620px; display: block; }
.cas-txt { font-size: 15px; font-weight: 900; }
.cas-txt.oscuro { fill: #3A2412; }
.cas-txt.blanco { fill: #FFF; font-size: 13px; }
.cas-txt.g { font-size: 17px; }
.cas-planeta { font-size: 10.5px; font-weight: 900; fill: #FFF; letter-spacing: 0.5px; }
.cas-cai { font-size: 13px; font-weight: 900; fill: var(--juego-rosa); }
.anillo-giro { transform-origin: 350px 350px; transition: transform 0.9s ease; }
.contra-giro { transition: transform 0.9s ease; transform-origin: center; transform-box: fill-box; }

.jg-barra { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; justify-content: center; }
.jg-dado {
  width: 52px; height: 52px; border-radius: 12px; background: #FFF; color: var(--espacio-1);
  display: flex; align-items: center; justify-content: center; font-size: 24px; font-weight: 900;
}

.jg-velo {
  position: absolute; inset: 0; z-index: 60;
  background: rgba(15,8,28,0.78);
  display: flex; align-items: center; justify-content: center; padding: 12px;
  border-radius: 18px;
}
.jg-modal {
  background: linear-gradient(160deg, var(--espacio-2), var(--espacio-1));
  border: 1.5px solid rgba(255,255,255,0.22); border-radius: 18px;
  padding: 22px 20px; max-width: 420px; width: 96%;
  box-shadow: 0 16px 50px rgba(0,0,0,0.55);
  max-height: 92%; overflow-y: auto;
}
.jg-modal h4 { font-size: 20px; margin: 0 0 10px; }
.jg-modal-botones { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; }
.jg-q { font-size: 16.5px; font-weight: 700; }
.jg-opcion {
  display: block; width: 100%; text-align: left; margin: 8px 0;
  background: rgba(255,255,255,0.08); color: #F4EFFA;
  border: 1.5px solid rgba(255,255,255,0.25); border-radius: 12px;
  padding: 12px 14px; font-size: 15px; cursor: pointer; font-family: inherit; line-height: 1.45;
}
.jg-opcion:hover { background: rgba(255,255,255,0.16); }
.jg-premio {
  background: rgba(223,154,78,0.15); border: 1.5px solid var(--astro-ambar);
  border-radius: 12px; padding: 12px; margin: 10px 0;
}
.jg-refl { border-left: 3px solid var(--astro-ambar); padding-left: 10px; }
.jg-scroll { max-height: 280px; overflow-y: auto; }
.jg-toast {
  position: absolute; bottom: 14px; left: 50%; transform: translateX(-50%); z-index: 90;
  background: var(--astro-ambar); color: #3A2412; border-radius: 14px;
  padding: 12px 18px; font-weight: 800; max-width: 88%;
}
.jg-slots { display: flex; gap: 10px; justify-content: center; }
.jg-slot-col { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.jg-simbolo { font-size: 30px; color: #F2C14E; font-weight: 900; }
.jg-simbolo-mini { font-size: 12px; color: #F2C14E; }
.jg-slot {
  width: 44px; height: 50px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(255,255,255,0.1); border: 2px dashed rgba(255,255,255,0.4);
  font-size: 24px; font-weight: 900;
}
.jg-teclado { display: grid; grid-template-columns: repeat(4, 58px); gap: 10px; }
.jg-tecla {
  width: 58px; height: 58px; border-radius: 12px; font-size: 18px; font-weight: 900; cursor: pointer;
  background: rgba(255,255,255,0.12); color: #F4EFFA;
  border: 1.5px solid rgba(255,255,255,0.35); font-family: inherit;
}
.jg-frase {
  background: linear-gradient(160deg, var(--espacio-2), var(--espacio-1));
  border: 1.5px solid rgba(255,255,255,0.22); border-radius: 18px;
  padding: 20px; max-width: 480px; color: #F2C14E;
  font-style: normal; font-size: 16px; line-height: 1.5;
}
.c-amarillo { color: #F2C14E; } .c-verde { color: var(--acento-verde); }
.c-naranja { color: var(--acento-naranja); } .c-ambar { color: var(--asteroide-2, #E39C4E); }

/* ---------- Descargables ---------- */
.descargas { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; margin-top: 24px; }
.descarga {
  background: rgba(255,255,255,0.07); border: 1px solid rgba(255,255,255,0.16);
  border-radius: 16px; padding: 18px; display: flex; flex-direction: column; gap: 8px;
}
.descarga h3 { margin: 0; font-size: 17px; }
.descarga p { margin: 0; font-size: 14px; opacity: 0.85; flex: 1; }
.descarga .btn { text-decoration: none; text-align: center; }
.recorte { font-size: 13px; opacity: 0.75; margin-top: 18px; }

/* ---------- CEAV / Footer ---------- */
.ceav-caja {
  background: rgba(255,255,255,0.07); border: 1px solid rgba(255,255,255,0.16);
  border-radius: 16px; padding: 22px; margin-top: 20px;
}
.valores { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 14px; padding: 0; list-style: none; }
.valores li {
  background: rgba(223,154,78,0.16); border: 1px solid var(--astro-ambar);
  border-radius: 999px; padding: 6px 14px; font-size: 13.5px; font-weight: 700;
}
.footer {
  border-top: 1px solid rgba(255,255,255,0.14);
  padding: 26px 18px; text-align: center; font-size: 13px; opacity: 0.8;
}
.footer a { color: var(--juego-cielo); }

@media (max-width: 560px) {
  .seccion { padding: 40px 14px; }
  .jg-teclado { grid-template-columns: repeat(4, 52px); }
  .jg-tecla { width: 52px; height: 52px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation: none !important; transition: none !important; }
}

/* ---------- Iteración 2: ritmo, historia y compañero ---------- */
.jg-narran {
  position: absolute; left: 6px; bottom: 6px; z-index: 40;
  display: flex; align-items: flex-end; gap: 8px; max-width: 320px;
  pointer-events: none;
}
.jg-cara { height: 96px; width: auto; filter: drop-shadow(0 6px 14px rgba(0,0,0,0.5)); }
.jg-cara-alien { height: 120px; display: block; margin: 0 auto 6px; }
.jg-burbuja {
  background: #FFF; color: #2A1A30; font-weight: 700; font-size: 13.5px;
  border-radius: 14px 14px 14px 4px; padding: 10px 12px; line-height: 1.4;
  box-shadow: 0 6px 18px rgba(0,0,0,0.4);
}
.jg-video { width: 100%; border-radius: 12px; background: #000; margin: 8px 0; }
.jg-resumen { font-size: 14px; opacity: 0.9; }
.jg-cap {
  display: block; width: 100%; text-align: left; margin: 6px 0;
  background: rgba(255,255,255,0.08); color: #F4EFFA;
  border: 1.5px solid rgba(255,255,255,0.25); border-radius: 12px;
  padding: 10px 12px; font-size: 14px; font-weight: 700; cursor: pointer; font-family: inherit;
}
.jg-cap.off { opacity: 0.5; cursor: default; }
.jg-frase-caja {
  background: linear-gradient(160deg, var(--espacio-2), var(--espacio-1));
  border: 1.5px solid rgba(255,255,255,0.22); border-radius: 18px;
  padding: 16px 18px; max-width: 480px; width: 100%;
}
@media (max-width: 560px) {
  .jg-cara { height: 68px; }
  .jg-narran { max-width: 240px; }
}

/* ---------- Iteración 3: layout compacto, recorrido, animaciones y jugo ---------- */
.jg-tablero-wrap { gap: 8px; }
.jg-board { position: relative; width: 100%; display: flex; justify-content: center; }
.jg-svg { max-height: 60vh; width: auto; max-width: 100%; }
.jg-board.shake { animation: sacudida 0.45s; }
@keyframes sacudida {
  0%,100% { transform: translate(0,0); } 20% { transform: translate(-7px,3px); }
  40% { transform: translate(6px,-4px); } 60% { transform: translate(-5px,-3px); } 80% { transform: translate(4px,3px); }
}

/* Barra principal: dado + estatus siempre juntos y a la vista */
.jg-barra-hud {
  width: 100%; max-width: 720px;
  background: rgba(255,255,255,0.09); border: 1px solid rgba(255,255,255,0.2);
  border-radius: 16px; padding: 8px 12px;
}
.jg-barra-hud .hud-item {
  font-size: 17px; font-weight: 900; display: inline-flex; align-items: center; gap: 3px;
  background: rgba(0,0,0,0.25); border-radius: 10px; padding: 6px 10px;
}
.jg-barra-hud .hud-item b { font-size: 18px; }
.jg-barra-hud .pts { color: #F2C14E; }
.jg-barra-hud .racha { color: #F07F3A; }
.hud-item.pulso { animation: latido 0.5s; }
.hud-frags.pulso { animation: latido 0.5s; }
@keyframes latido { 0%{transform:scale(1)} 40%{transform:scale(1.35)} 100%{transform:scale(1)} }
.jg-mute {
  margin-left: auto; background: transparent; border: none; font-size: 20px; cursor: pointer;
  padding: 4px 6px; border-radius: 8px;
}
.jg-mute:hover { background: rgba(255,255,255,0.12); }

/* Dado */
.jg-dado.rodando { animation: dadogira 0.14s infinite; }
@keyframes dadogira { 0%{transform:rotate(-8deg) scale(1.05)} 50%{transform:rotate(8deg) scale(0.95)} 100%{transform:rotate(-8deg) scale(1.05)} }

/* Ficha y casillas */
.ficha.salto { animation: saltito 0.2s ease; transform-box: fill-box; transform-origin: center; }
@keyframes saltito { 0%{translate:0 0} 50%{translate:0 -9px} 100%{translate:0 0} }
.celda .cuerpo { transition: filter 0.2s; }
.celda:hover .cuerpo { filter: brightness(1.15); }
.halo { transition: opacity 0.3s; }
.halo.on { opacity: 0.55; }
.halo.actual { opacity: 1; animation: haloPulso 1.1s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
@keyframes haloPulso { 0%,100%{transform:scale(1);opacity:1} 50%{transform:scale(1.14);opacity:0.55} }
.tw { animation: parpadeo 2.6s ease-in-out infinite; opacity: 0.25; }
@keyframes parpadeo { 0%,100%{opacity:0.15} 50%{opacity:0.85} }
.brilla { animation: brillo 1.8s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
@keyframes brillo { 0%,100%{transform:scale(1)} 50%{transform:scale(1.22)} }
.giro-lento { animation: giro 5s linear infinite; transform-box: fill-box; transform-origin: center; }
@keyframes giro { to { transform: rotate(360deg); } }
.flota { animation: flotaNave 3.4s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
@keyframes flotaNave { 0%,100%{transform:translateY(0)} 50%{transform:translateY(-5px)} }

/* Ganancias flotantes y confeti */
.jg-zona-toast { position: absolute; top: 8px; left: 0; right: 0; display: flex; justify-content: center; pointer-events: none; }
.jg-zona-toast .jg-toast { position: static; transform: none; animation: toastIn 0.25s ease; }
@keyframes toastIn { from { opacity: 0; translate: 0 -8px; } to { opacity: 1; translate: 0 0; } }
.jg-flota {
  position: absolute; top: 46%; z-index: 45; pointer-events: none;
  font-weight: 900; font-size: 21px; color: #F2C14E;
  text-shadow: 0 2px 8px rgba(0,0,0,0.6);
  animation: sube 1.35s ease-out forwards;
}
.jg-flota.racha { color: #F07F3A; font-size: 18px; }
@keyframes sube { from { opacity: 1; translate: 0 0; } to { opacity: 0; translate: 0 -70px; } }
.jg-conf {
  position: absolute; top: -12px; width: 9px; height: 13px; z-index: 44;
  border-radius: 2px; pointer-events: none;
  animation: cae linear forwards;
}
@keyframes cae { to { top: 102%; transform: rotate(540deg); } }

/* Portada con personajes */
.jg-portada { position: relative; overflow: hidden; }
.jg-flotante-pj { position: absolute; bottom: -8px; max-height: 46%; opacity: 0.96; filter: drop-shadow(0 10px 24px rgba(0,0,0,0.5)); }
.jg-flotante-pj.izq { left: 2%; animation: pjFlota 4.2s ease-in-out infinite; }
.jg-flotante-pj.der { right: 2%; animation: pjFlota 5.1s ease-in-out 0.8s infinite; }
@keyframes pjFlota { 0%,100%{transform:translateY(0) rotate(-1.5deg)} 50%{transform:translateY(-14px) rotate(1.5deg)} }
@media (max-width: 700px) { .jg-flotante-pj { max-height: 26%; opacity: 0.65; } }

/* Compañero Narán: dentro del tablero, sin tocar la barra */
.jg-narran { position: absolute; left: 2px; bottom: 2px; z-index: 30; max-width: 300px; }
.jg-cara { height: 88px; }

/* Capítulos con póster */
.jg-video-marco { position: relative; }
.jg-escena { position: relative; border-radius: 12px; overflow: hidden; }
.jg-escena img { width: 100%; display: block; animation: kenburns 9s ease-in-out infinite alternate; }
@keyframes kenburns { from { transform: scale(1); } to { transform: scale(1.09) translate(1.5%, -1.5%); } }
.jg-escena-cinta {
  position: absolute; left: 0; right: 0; bottom: 0;
  background: linear-gradient(transparent, rgba(0,0,0,0.78));
  color: #FFF; font-size: 12px; font-weight: 700; padding: 22px 10px 8px; text-align: center;
}
.jg-cap { display: flex; align-items: center; gap: 10px; }
.jg-cap img { width: 62px; border-radius: 8px; flex: 0 0 auto; }
.jg-score { font-size: 16px; font-weight: 800; color: #F2C14E; }

/* ---------- Tablero con arte oficial ---------- */
.cas-planeta {
  font-size: 12px; font-weight: 900; fill: #FFF; letter-spacing: 0.6px;
  stroke: #2A1030; stroke-width: 3px; paint-order: stroke;
}
.celda .cuerpo { transition: transform 0.2s; transform-box: fill-box; transform-origin: center; }
.celda:hover .cuerpo { transform: scale(1.08); filter: none; }
.celda.planeta .cuerpo { animation: planetaFlota 5s ease-in-out infinite; }
@keyframes planetaFlota { 0%,100%{transform:translateY(0)} 50%{transform:translateY(-4px)} }

/* ---------- Fondo integrado y solo Narán ---------- */
#juego-root {
  background:
    linear-gradient(rgba(39,29,68,0.45), rgba(30,20,55,0.8)),
    url("../img/tablero/fondo.jpg") center / cover no-repeat;
  border-radius: 20px; padding: 10px; box-sizing: border-box;
  border: 1px solid rgba(255,255,255,0.12);
}
.jg-svg { overflow: visible; }
.jg-board { padding-top: 16px; }
.jg-hud-cara { width: 42px; height: 42px; object-fit: contain; }
.jg-sel-naran { max-height: 280px; filter: drop-shadow(0 12px 28px rgba(0,0,0,0.5)); animation: pjFlota 4.2s ease-in-out infinite; }

/* Botón de rescate de reproducción */
.jg-play {
  position: absolute; inset: 0; margin: auto; width: 84px; height: 84px;
  border-radius: 50%; border: none; cursor: pointer;
  background: rgba(223,154,78,0.95); color: #3A2412; font-size: 34px; font-weight: 900;
  box-shadow: 0 8px 30px rgba(0,0,0,0.55); animation: latido 1.2s infinite;
}

/* Pantalla de cine para decisiones y finales */
.jg-cine { max-width: 560px; margin: 0 auto; }
.jg-cine .jg-video-marco { width: 100%; }
.jg-cine-botones { display: flex; gap: 12px; width: 100%; }
.jg-cine-botones .btn { flex: 1; font-size: 20px; padding: 16px; }
.jg-cine-botones.col { flex-direction: column; }
.jg-cine-botones.col .btn { font-size: 16px; }

/* Dado con puntitos y métricas etiquetadas */
.pips { display: grid; grid-template-columns: repeat(3, 1fr); width: 32px; height: 32px; gap: 2px; }
.pips i { border-radius: 50%; }
.pips i.on { background: #1B0B30; }
.jg-barra-hud .hud-item, .jg-barra-hud .hud-frags {
  display: inline-flex; flex-direction: column; align-items: center; gap: 1px;
  background: rgba(0,0,0,0.25); border-radius: 10px; padding: 5px 10px;
}
.hud-lbl { font-size: 9.5px; font-weight: 700; opacity: 0.75; letter-spacing: 0.3px; text-transform: uppercase; }
.frag-fila { display: flex; gap: 4px; }

/* Logotipos oficiales y selección de naves */
.logos { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 18px; }
.logo-chip { background: #FFF; border-radius: 12px; padding: 10px 16px; display: inline-flex; align-items: center; }
.logo-chip img { height: 52px; width: auto; }
.jg-pjs .jg-pj img { width: 120px; height: auto; }
.jg-pjs .jg-pj { padding: 12px; }
.jg-pjs .jg-pj.sel { transform: scale(1.06); }

/* Portada con arte de rocas */
.hero-arte { width: min(460px, 92vw); border-radius: 22px; box-shadow: 0 18px 60px rgba(0,0,0,0.5); margin-inline: auto; }
.jg-portada-arte { width: min(420px, 88%); border-radius: 20px; box-shadow: 0 14px 44px rgba(0,0,0,0.5); }

/* Marcador con íconos oficiales */
.hud-chip { display: inline-flex; align-items: center; gap: 5px; font-size: 17px; font-weight: 900; }
.hud-chip img { height: 26px; width: auto; }
.frag-fila img { height: 22px; width: auto; }


/* Portada: arte de referencia a mayor presencia */
.hero { justify-content: center; }
.hero-arte { width: min(560px, 94vw); }
.jg-portada-arte { width: min(480px, 92%); }

/* Portada principal (PNG transparente): sin marco ni sombra de caja */
.hero-arte, .jg-portada-arte { border-radius: 0; box-shadow: none; filter: drop-shadow(0 12px 30px rgba(0,0,0,0.35)); }
.hero-arte { width: min(640px, 96vw); }
.jg-portada-arte { width: min(560px, 96%); }

/* ---------- Portada del sitio: ilustración a la izquierda, textos a la derecha ---------- */
.hero { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); align-items: center; gap: 40px; justify-content: stretch; }
.hero-arte { width: 100%; max-width: 680px; margin: 0; justify-self: start; }
@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr; gap: 20px; }
  .hero-arte { justify-self: center; max-width: 520px; }
}

/* ---------- Portada del juego: rocas + título, naves de Narán y el alien ---------- */
.jg-portada { position: relative; overflow: hidden; padding-bottom: 40px; }
.jg-portada-arte { width: min(520px, 90%); filter: drop-shadow(0 12px 28px rgba(0,0,0,0.4)); }
.jg-portada .jg-intro, .jg-portada .btn, .jg-portada .jg-nota { position: relative; z-index: 2; }
.jg-nave { position: absolute; z-index: 1; pointer-events: none; filter: drop-shadow(0 10px 18px rgba(0,0,0,0.45)); }
.jg-nave-naran { left: 3%; bottom: 8%; width: min(200px, 24%); animation: naveNaran 5.5s ease-in-out infinite; }
.jg-nave-alien { right: 3%; bottom: 14%; width: min(210px, 25%); animation: naveAlien 6.5s ease-in-out infinite; }
@keyframes naveNaran {
  0%   { transform: translate(0, 0) rotate(-3deg); }
  25%  { transform: translate(14px, -16px) rotate(1deg); }
  50%  { transform: translate(26px, -4px) rotate(-1deg); }
  75%  { transform: translate(10px, 10px) rotate(-4deg); }
  100% { transform: translate(0, 0) rotate(-3deg); }
}
@keyframes naveAlien {
  0%   { transform: translate(0, 0) rotate(4deg); }
  30%  { transform: translate(-18px, -12px) rotate(-2deg); }
  60%  { transform: translate(-6px, 12px) rotate(3deg); }
  100% { transform: translate(0, 0) rotate(4deg); }
}
.jg-nave-modal { height: 110px; width: auto; animation: naveAlien 6.5s ease-in-out infinite; }
@media (max-width: 640px) {
  .jg-nave-naran, .jg-nave-alien { width: 28%; bottom: 2%; opacity: 0.9; }
}

/* ---------- Logotipos oficiales (texto blanco sobre fondo oscuro) ---------- */
.logos { margin-top: 22px; }
.logos img { width: min(420px, 100%); height: auto; display: block; }
@media (max-width: 640px) {
  .jg-portada { padding-bottom: 120px; }
  .jg-nave-naran, .jg-nave-alien { width: 32%; bottom: 14px; opacity: 1; }
}

/* Logotipos oficiales centrados */
.logos { justify-content: center; align-items: center; width: 100%; margin: 22px auto 0; }
.logos img { display: block; margin-inline: auto; max-width: min(520px, 100%); height: auto; }

/* ---------- Historia en video (Conoce la historia de Narán) ---------- */
.historia-video { max-width: 820px; margin: 24px auto 0; display: flex; flex-direction: column; gap: 14px; align-items: center; }
.hs-marco { position: relative; width: 100%; border-radius: 20px; overflow: hidden; background: #000; box-shadow: 0 16px 50px rgba(0,0,0,0.5); aspect-ratio: 16 / 9; }
.hs-poster, .hs-video { width: 100%; height: 100%; object-fit: contain; display: block; background: #000; }
.hs-inicio .hs-poster { opacity: 0.85; }
.hs-play {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  width: 88px; height: 88px; border-radius: 50%; border: 3px solid #FFF;
  background: var(--astro-ambar, #DF9A4E); color: #3A2412; font-size: 34px; cursor: pointer;
  box-shadow: 0 8px 30px rgba(0,0,0,0.55); padding-left: 6px;
}
.hs-play:hover, .hs-play:focus-visible { transform: translate(-50%, -50%) scale(1.08); }
.hs-leyenda { position: absolute; left: 0; right: 0; bottom: 0; margin: 0; padding: 12px 16px; text-align: center; font-weight: 800; background: linear-gradient(transparent, rgba(0,0,0,0.75)); }
.hs-opciones { display: flex; gap: 14px; flex-wrap: wrap; justify-content: center; min-height: 52px; }
.hs-grande { min-width: 130px; font-size: 22px; padding: 14px 28px; }
.hs-saltar { background: transparent; color: inherit; border: 1.5px dashed rgba(255,255,255,0.45); border-radius: 999px; padding: 10px 18px; font: inherit; font-weight: 700; cursor: pointer; opacity: 0.85; }
.hs-camino { display: flex; gap: 8px; justify-content: center; }
.hs-paso { width: 30px; height: 30px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-weight: 900; font-size: 14px; background: rgba(255,255,255,0.14); border: 1.5px solid rgba(255,255,255,0.35); }
.hs-paso.actual { background: var(--astro-ambar, #DF9A4E); color: #3A2412; border-color: var(--astro-ambar, #DF9A4E); }

/* ---------- Descifrador con el abecedario alien oficial ---------- */
.jg-frase-alien { display: flex; flex-wrap: wrap; gap: 14px 22px; justify-content: center; max-width: 640px; }
.jg-palabra { display: flex; gap: 6px; }
.jg-glifo { width: 34px; height: 34px; object-fit: contain; }
.jg-glifo-mini { width: 20px; height: 20px; object-fit: contain; display: block; margin: 2px auto 0; }
.jg-frase-alien .jg-slot { width: 36px; height: 42px; font-size: 20px; }
.jg-slot.actual { border-style: solid; border-color: var(--astro-ambar, #DF9A4E); box-shadow: 0 0 0 3px rgba(223,154,78,0.3); }
.jg-teclado { grid-template-columns: repeat(6, 58px); justify-content: center; }
.jg-tecla { display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1; }
.jg-tecla.error { background: rgba(230,80,80,0.35); border-color: #E65050; animation: tiembla 0.35s; }
@keyframes tiembla { 25% { transform: translateX(-4px); } 75% { transform: translateX(4px); } }
.jg-descifrar-botones { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }

.btn-pendiente { opacity: 0.55; cursor: not-allowed; pointer-events: none; }

@media (max-width: 560px) {
  .jg-teclado { grid-template-columns: repeat(4, 52px); }
  .jg-frase-alien { gap: 10px 14px; }
  .jg-frase-alien .jg-slot { width: 30px; height: 36px; font-size: 17px; }
  .jg-glifo { width: 28px; height: 28px; }
  .hs-play { width: 70px; height: 70px; font-size: 28px; }
  .hs-grande { min-width: 110px; font-size: 19px; }
}

/* Avisos fuera del tablero (descifrado): arriba para no tapar los botones */
#juego-root > .jg-toast { bottom: auto; top: 14px; }
.hs-aviso { position: absolute; left: 12px; right: 12px; bottom: 12px; margin: 0; padding: 10px 14px; border-radius: 12px; background: rgba(0,0,0,0.8); text-align: center; font-weight: 700; }

/* Logotipo oficial del juego en la barra (Racing Engine, no Patria) */
.nav-logo {
  font-family: 'Racing Engine Sharps', 'Racing Engine', 'Arial Black', sans-serif;
  font-weight: 400; font-style: normal; text-transform: uppercase;
  display: inline-flex; flex-direction: column; line-height: 0.92;
  font-size: 19px; letter-spacing: 0.5px; color: #EFE8DC;
}
.nav-logo span:last-child { margin-left: -2px; }

/* Ilustración en el hueco de la cuadrícula de descargables */
.descarga-arte { display: flex; align-items: center; justify-content: center; padding: 4px; }
.descarga-arte img { width: 100%; max-width: 300px; height: auto; filter: drop-shadow(0 10px 24px rgba(0,0,0,0.35)); }
@media (max-width: 560px) { .descarga-arte img { max-width: 220px; } }
.descargas { align-items: start; }
.descarga-arte { align-self: center; }
.descarga-arte img { max-height: 190px; width: auto; }
.descarga-arte img { filter: none; }

/* Logotipo oficial (trazado de la identidad gráfica, tipografía Airstrike) */
.nav-logo { display: inline-flex; align-items: center; line-height: 0; }
.nav-logo img { height: 34px; width: auto; display: block; }
@media (max-width: 560px) { .nav-logo img { height: 28px; } }

/* Luna integrada en el hueco de Descargables: más grande, sin estirar la fila */
.descarga-arte { position: relative; align-self: stretch; min-height: 150px; padding: 0; }
.descarga-arte img {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -48%);
  width: min(360px, 115%); max-width: none; max-height: none; height: auto;
}
@media (max-width: 560px) {
  .descarga-arte { min-height: 0; }
  .descarga-arte img { position: static; transform: none; width: min(280px, 90%); }
}
@media (min-width: 561px) {
  .descarga-arte img { width: min(300px, 100%); transform: translate(-50%, -35%); }
}

/* ---- Descargables: botones al mismo nivel y luna centrada en el espacio libre ---- */
.descargas { align-items: stretch; }
.descarga { justify-content: flex-start; }
.descarga .btn { margin-top: auto; }
.descargas .recorte { margin: 0; align-self: start; }
@media (min-width: 900px) {
  .descargas { grid-template-columns: repeat(3, 1fr); grid-template-rows: auto auto minmax(170px, auto); }
  .descargas .recorte { grid-column: 1 / 3; grid-row: 3; padding-top: 6px; }
  .descarga-arte {
    grid-column: 3; grid-row: 2 / 4; position: static; min-height: 0;
    display: flex; align-items: center; justify-content: center; align-self: stretch;
  }
  .descarga-arte img { position: static; transform: none; width: min(330px, 100%); max-height: none; }
  #descargables { padding-bottom: 24px; }
}
@media (min-width: 900px) {
  .descargas { grid-template-rows: auto auto minmax(200px, auto); }
  /* La luna ocupa desde la 2ª fila hasta el inicio de la sección CEAV y queda centrada en ese espacio */
  .descarga-arte { margin-bottom: -80px; position: relative; z-index: 1; }
  .descarga-arte img { width: min(380px, 112%); }
}

/* Distribución final: sin franja vacía; la luna baja junto al título de CEAV */
@media (min-width: 900px) {
  .descargas { grid-template-rows: auto auto auto; }
  .descargas .recorte { grid-row: 3; }
  .descarga-arte { grid-row: 2 / 4; margin-bottom: 0; position: relative; display: block; min-height: 0; }
  .descarga-arte img {
    position: absolute; top: -4px; left: 50%; transform: translateX(-50%);
    width: min(360px, 115%); z-index: 2;
  }
  #descargables { padding-bottom: 12px; }
  #ceav { padding-top: 28px; }
  #ceav > h2, #ceav > .sub { max-width: 640px; }
}
@media (min-width: 900px) { #ceav > h2, #ceav > .sub { max-width: min(640px, 64%); } }

/* ---- Sección CEAV: recuadro centrado con la frase estelar en Patria ---- */
.ceav-caja { text-align: center; }
.frase-estelar {
  font-family: var(--font-heading); font-weight: 700;
  font-size: clamp(18px, 2.4vw, 24px); line-height: 1.35;
  color: #FFF; margin: 0 auto; max-width: min(46ch, 100%); text-wrap: balance;
}
.ceav-portal { margin: 18px 0 0; }
.ceav-caja .logos { margin-top: 22px; }
