/* ============================================================
   ATLAS DC — ESTILO «ARCHIVO HOLOGRÁFICO»
   Espacio realista + interfaz táctica en azul DC.
============================================================ */
:root {
  --fondo: #02040a;
  --cristal: rgba(4, 10, 22, 0.76);
  --cristal-fuerte: rgba(4, 10, 22, 0.91);
  /* Azul DC (mismos valores que la web Enciclopedia DC). El verde queda solo para lo Green Lantern. */
  --acento-rgb: 43, 127, 255;
  --linea: rgba(var(--acento-rgb), 0.24);
  --linea-fuerte: rgba(var(--acento-rgb), 0.58);
  --acento: #2B7FFF;
  --dc: #0476F2;
  --cian: #8FC1FF;
  --verde-lantern: #57F2A8;
  --texto: #E6EEF8;
  --suave: #8C9DB5;
  --peligro: #FF6A4D;
  --aviso: #FFB347;
  --titulos: "Rajdhani", "Arial Narrow", sans-serif;
  --cuerpo: "Inter", system-ui, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; overflow: hidden; background: var(--fondo); color: var(--texto); font-family: var(--cuerpo); }
#escena { position: fixed; inset: 0; }
#escena canvas { display: block; }
.capa-etiquetas { position: absolute; inset: 0; pointer-events: none; }
button { font: inherit; color: inherit; }

/* ---------- Esquinas táctiles (marco holográfico) ---------- */
#panel, #leyenda, #cabecera .marca, #buscador, #controles > *, #botonIndice, #listaIndice, #barraRuta {
  background: var(--cristal);
  backdrop-filter: blur(14px) saturate(1.2);
  -webkit-backdrop-filter: blur(14px) saturate(1.2);
  border: 1px solid var(--linea);
}

/* ---------- CABECERA ---------- */
#cabecera {
  position: fixed; top: 16px; left: 16px; right: 16px; z-index: 8;
  display: flex; align-items: center; gap: 14px; pointer-events: none;
}
#cabecera > * { pointer-events: auto; }
.marca { display: flex; align-items: center; gap: 11px; padding: 9px 16px 9px 12px; border-radius: 3px; }
.marca-icono {
  width: 26px; height: 26px; border: 1.5px solid var(--acento); transform: rotate(45deg);
  box-shadow: 0 0 14px rgba(var(--acento-rgb), .5), inset 0 0 8px rgba(var(--acento-rgb), .4); position: relative;
}
.marca-icono::after { content: ""; position: absolute; inset: 6px; background: var(--acento); box-shadow: 0 0 10px var(--acento); }
.marca strong { display: block; font-family: var(--titulos); font-size: 19px; letter-spacing: 3px; line-height: 1; }
.marca small { display: block; font-size: 10px; letter-spacing: 1.6px; color: var(--suave); text-transform: uppercase; margin-top: 3px; }

#ruta { display: flex; align-items: center; gap: 6px; font-family: var(--titulos); font-size: 14px; letter-spacing: 1.6px; text-transform: uppercase; }
#ruta button { background: none; border: 0; padding: 4px 2px; cursor: pointer; color: var(--suave); letter-spacing: inherit; text-transform: inherit; }
#ruta button:not(:disabled):hover { color: var(--acento); }
#ruta button:disabled { opacity: .45; cursor: default; }
#ruta i { color: var(--linea-fuerte); font-style: normal; }
#rutaActual { color: var(--acento); text-shadow: 0 0 12px rgba(var(--acento-rgb), .5); }

#buscador { margin-left: auto; position: relative; width: 300px; border-radius: 3px; }
#buscar { width: 100%; background: transparent; border: 0; outline: 0; padding: 11px 40px 11px 14px; color: var(--texto); font: 14px var(--cuerpo); }
#buscar::placeholder { color: var(--suave); }
#buscador:focus-within { border-color: var(--linea-fuerte); box-shadow: 0 0 0 3px rgba(var(--acento-rgb), .08); }
#buscador kbd { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); font: 11px var(--cuerpo); color: var(--suave); border: 1px solid var(--linea); padding: 1px 6px; border-radius: 3px; }
#resultados { position: absolute; top: calc(100% + 6px); left: 0; right: 0; margin: 0; padding: 6px; list-style: none; background: var(--cristal-fuerte); border: 1px solid var(--linea); border-radius: 3px; backdrop-filter: blur(14px); }
#resultados li { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 2px; cursor: pointer; }
#resultados li.sel, #resultados li:hover { background: rgba(var(--acento-rgb), .1); }
#resultados li strong { display: block; font-size: 14px; }
#resultados li small { display: block; font-size: 11px; color: var(--suave); }
#resultados .nada { color: var(--suave); cursor: default; font-size: 13px; }
.punto { width: 9px; height: 9px; border-radius: 50%; background: var(--c); box-shadow: 0 0 8px var(--c); flex: none; }
.punto.personaje { border-radius: 2px; transform: rotate(45deg); background: var(--acento); box-shadow: 0 0 8px var(--acento); }

/* ---------- ETIQUETAS 3D ---------- */
.etiqueta {
  pointer-events: auto; cursor: pointer; text-align: center; padding-bottom: 6px; white-space: nowrap;
  transition: opacity .35s ease, transform .35s ease; user-select: none;
}
.etiqueta::after { content: ""; display: block; width: 1px; height: 10px; margin: 3px auto 0; background: linear-gradient(var(--linea-fuerte), transparent); }
.etq-nombre { display: block; font-family: var(--titulos); font-weight: 600; font-size: 14px; letter-spacing: 1.8px; text-transform: uppercase; color: var(--texto); text-shadow: 0 0 10px rgba(0, 0, 0, .9), 0 0 2px #000; }
.etq-sub { display: block; font-size: 9.5px; letter-spacing: 1.4px; text-transform: uppercase; color: var(--suave); margin-top: 1px; text-shadow: 0 0 6px #000; }
.etq-estrella .etq-nombre { font-size: 18px; color: #FFE9A8; }
.etq-tecnoplaneta .etq-nombre { font-size: 17px; color: var(--acento); text-shadow: 0 0 12px rgba(var(--acento-rgb), .55), 0 0 2px #000; }
.etq-satelite .etq-nombre { font-size: 11px; letter-spacing: 1.2px; }
.etq-satelite .etq-sub { display: none; }
.etiqueta.oculta { opacity: 0; pointer-events: none; transform: translateY(4px); }
.etiqueta.hover .etq-nombre, .etiqueta.seleccionada .etq-nombre { color: var(--acento); }
.etiqueta.destruida .etq-nombre { color: var(--peligro); text-decoration: line-through; text-decoration-thickness: 1px; }
.rotulo-sector { font-family: var(--titulos); font-weight: 700; font-size: 22px; letter-spacing: 6px; color: rgba(var(--acento-rgb), .55); text-shadow: 0 0 18px rgba(var(--acento-rgb), .35); pointer-events: none; }
.rotulo-sector small { display: block; font-size: 10px; letter-spacing: 3px; color: rgba(139, 163, 168, .8); margin-top: 2px; }
.rotulo-grado { font: 600 10px var(--titulos); letter-spacing: 2px; color: rgba(var(--acento-rgb), .4); pointer-events: none; }

/* ---------- PANEL EXPEDIENTE ---------- */
#panel {
  position: fixed; top: 78px; right: 16px; bottom: 16px; width: 390px; z-index: 6;
  border-radius: 3px; overflow-y: auto; overflow-x: hidden;
  transform: translateX(calc(100% + 30px)); opacity: 0; transition: transform .55s cubic-bezier(.2, .8, .2, 1), opacity .4s;
  scrollbar-width: thin; scrollbar-color: var(--linea) transparent;
}
#panel.abierto { transform: none; opacity: 1; }
#panel::before, #panel::after { content: ""; position: sticky; display: block; width: 18px; height: 18px; border-color: var(--acento); border-style: solid; z-index: 3; pointer-events: none; }
#panel::before { top: 0; margin-bottom: -18px; border-width: 2px 0 0 2px; }
#panel::after { bottom: 0; margin-left: auto; margin-top: -18px; border-width: 0 2px 2px 0; }
#cerrarPanel { position: absolute; top: 10px; right: 10px; z-index: 4; width: 32px; height: 32px; border-radius: 50%; border: 1px solid var(--linea); background: rgba(2, 6, 10, .6); font-size: 20px; line-height: 1; cursor: pointer; }
#cerrarPanel:hover { border-color: var(--acento); color: var(--acento); }
#panelContenido { padding: 0 0 22px; }
.cabecera-imagen { position: relative; height: 190px; overflow: hidden; }
.cabecera-imagen img { width: 100%; height: 100%; object-fit: cover; object-position: center 30%; display: block; filter: saturate(1.05) contrast(1.05); }
.cabecera-imagen .velo { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(4, 10, 22, 0) 35%, rgba(4, 10, 22, .96) 100%), repeating-linear-gradient(0deg, rgba(var(--acento-rgb), .05) 0 1px, transparent 1px 3px); }
.sin-imagen { height: 100%; display: grid; place-items: center; background: radial-gradient(circle at 50% 60%, color-mix(in srgb, var(--c) 45%, transparent), transparent 55%), repeating-linear-gradient(90deg, rgba(var(--acento-rgb), .07) 0 1px, transparent 1px 22px), repeating-linear-gradient(0deg, rgba(var(--acento-rgb), .07) 0 1px, transparent 1px 22px); }
.sin-imagen span { font: 600 11px var(--titulos); letter-spacing: 3px; text-transform: uppercase; color: var(--suave); padding: 5px 10px; border: 1px dashed var(--linea); background: rgba(2, 6, 10, .5); }
.antetitulo { margin: -26px 22px 0; position: relative; font: 600 11px var(--titulos); letter-spacing: 2.6px; text-transform: uppercase; color: var(--acento); }
#panel h2 { position: relative; margin: 2px 22px 0; font: 700 34px/1.05 var(--titulos); letter-spacing: 1.5px; text-transform: uppercase; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 14px 22px 4px; }
.chip { font: 600 10.5px var(--titulos); letter-spacing: 1.5px; text-transform: uppercase; padding: 4px 9px; border: 1px solid var(--linea); color: var(--texto); border-radius: 2px; background: rgba(var(--acento-rgb), .05); }
.chip-ok { border-color: rgba(var(--acento-rgb), .6); color: var(--acento); }
.chip-peligro { border-color: rgba(255, 106, 77, .6); color: var(--peligro); background: rgba(255, 106, 77, .07); }
.chip-aviso { border-color: rgba(255, 179, 71, .6); color: var(--aviso); }
.chip-neutro { color: var(--suave); }
.chip-doc { border-color: rgba(92, 200, 255, .55); color: var(--cian); }
.chip-esquema { border-style: dashed; color: var(--suave); }
.pestanas { display: flex; gap: 2px; margin: 16px 22px 0; border-bottom: 1px solid var(--linea); }
.pestana { background: none; border: 0; padding: 9px 10px; cursor: pointer; font: 600 13px var(--titulos); letter-spacing: 1.8px; text-transform: uppercase; color: var(--suave); border-bottom: 2px solid transparent; margin-bottom: -1px; }
.pestana b { font-weight: 700; color: var(--acento); margin-left: 3px; }
.pestana.activa { color: var(--texto); border-bottom-color: var(--acento); }
.pestana:hover { color: var(--texto); }
.pestana-panel { padding: 6px 22px 0; }
.grupo { margin-top: 16px; }
.grupo h4 { margin: 0 0 9px; font: 600 11px var(--titulos); letter-spacing: 2.6px; text-transform: uppercase; color: var(--acento); display: flex; align-items: center; gap: 10px; }
.grupo h4::after { content: ""; flex: 1; height: 1px; background: linear-gradient(90deg, var(--linea), transparent); }
.campo { display: grid; grid-template-columns: 118px 1fr; gap: 10px; padding: 6px 0; border-bottom: 1px solid rgba(var(--acento-rgb), .07); }
.campo-titulo { font-size: 10.5px; letter-spacing: 1.1px; text-transform: uppercase; color: var(--suave); padding-top: 2px; }
.campo-valor { font-size: 13.5px; line-height: 1.45; }
.lista { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.campo .lista { gap: 3px; }
.lista li { font-size: 13.5px; line-height: 1.4; padding-left: 14px; position: relative; }
.lista li::before { content: ""; position: absolute; left: 0; top: .55em; width: 5px; height: 5px; background: var(--acento); transform: rotate(45deg); box-shadow: 0 0 6px var(--acento); }
.lista li span { display: block; font-size: 12px; color: var(--suave); }
.texto p { font-size: 14px; line-height: 1.7; color: #CFDDE0; margin: 14px 0 0; }
.texto p:first-child::first-letter { font: 700 40px/0.9 var(--titulos); float: left; margin: 4px 8px 0 0; color: var(--acento); }
.vacio, .nota { color: var(--suave); font-size: 12.5px; }
.nota { margin-top: 16px; padding: 10px 12px; border: 1px dashed var(--linea); line-height: 1.5; }
.tarjeta { display: flex; align-items: center; gap: 12px; width: 100%; margin-top: 12px; padding: 10px; text-align: left; cursor: pointer; background: rgba(var(--acento-rgb), .04); border: 1px solid var(--linea); border-radius: 2px; transition: background .2s, border-color .2s; }
.tarjeta:hover { background: rgba(var(--acento-rgb), .1); border-color: var(--linea-fuerte); }
.tarjeta img, .tarjeta .avatar { width: 62px; height: 62px; object-fit: cover; object-position: top; border-radius: 2px; flex: none; }
.tarjeta .avatar { display: grid; place-items: center; background: #0a1a33; font: 700 18px var(--titulos); color: var(--acento); }
.tarjeta strong { display: block; font: 700 17px var(--titulos); letter-spacing: 1px; text-transform: uppercase; }
.tarjeta small { display: block; font-size: 12px; color: var(--suave); margin-top: 2px; }
.tarjeta i { margin-left: auto; font-style: normal; font-size: 22px; color: var(--acento); }
.volver { position: absolute; top: 12px; left: 12px; z-index: 4; background: rgba(2, 6, 10, .7); border: 1px solid var(--linea); padding: 6px 11px; border-radius: 2px; cursor: pointer; font: 600 12px var(--titulos); letter-spacing: 1.4px; text-transform: uppercase; }
.volver:hover { color: var(--acento); border-color: var(--acento); }
.boton-principal { display: block; width: calc(100% - 44px); margin: 20px 22px 0; padding: 12px; cursor: pointer; background: rgba(var(--acento-rgb), .12); border: 1px solid var(--acento); color: var(--acento); font: 700 14px var(--titulos); letter-spacing: 2px; text-transform: uppercase; }

/* ---------- LEYENDA Y CONTROLES ---------- */
#leyenda { position: fixed; left: 16px; bottom: 16px; z-index: 5; width: 270px; padding: 14px 16px; border-radius: 3px; }
#leyenda h3 { margin: 0 0 10px; font: 600 11px var(--titulos); letter-spacing: 2.6px; text-transform: uppercase; color: var(--acento); }
#leyenda ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
#leyenda li { display: flex; align-items: center; gap: 10px; font-size: 12px; color: #C8D6D9; }
#leyenda p { margin: 12px 0 0; font-size: 11px; line-height: 1.45; color: var(--suave); }
.ley { width: 16px; height: 16px; border-radius: 50%; flex: none; }
.ley-doc { background: radial-gradient(circle at 35% 35%, #4fb58a, #0d3a2a 70%); box-shadow: 0 0 6px rgba(98, 216, 255, .6); }
.ley-holo { border: 1px solid #8a9ebf; background: repeating-linear-gradient(0deg, rgba(160, 190, 230, .35) 0 1px, transparent 1px 4px), repeating-linear-gradient(90deg, rgba(160, 190, 230, .35) 0 1px, transparent 1px 4px); box-shadow: 0 0 8px rgba(160, 190, 230, .4); }
.ley-destruido { border: 1px solid var(--peligro); background: repeating-linear-gradient(0deg, rgba(255, 106, 77, .4) 0 1px, transparent 1px 4px); box-shadow: 0 0 8px rgba(255, 106, 77, .5); }
.ley-orbita { height: 2px; border-radius: 0; background: linear-gradient(90deg, transparent, var(--acento)); box-shadow: 0 0 6px var(--acento); }

#controles { position: fixed; left: 50%; bottom: 16px; transform: translateX(-50%); z-index: 5; display: flex; gap: 10px; align-items: stretch; }
#epoca { display: flex; align-items: center; gap: 2px; padding: 4px; border-radius: 3px; }
#epoca span { font: 600 10px var(--titulos); letter-spacing: 2px; text-transform: uppercase; color: var(--suave); padding: 0 10px 0 8px; }
#epoca button, #botonAnimar { background: none; border: 1px solid transparent; padding: 8px 13px; cursor: pointer; font: 600 12.5px var(--titulos); letter-spacing: 1.6px; text-transform: uppercase; color: var(--suave); border-radius: 2px; }
#epoca button.activa { color: var(--texto); background: rgba(var(--acento-rgb), .12); border-color: var(--linea-fuerte); }
#epoca button[data-modo="documentado"].activa { color: var(--peligro); background: rgba(255, 106, 77, .1); border-color: rgba(255, 106, 77, .5); }
#botonAnimar { display: flex; align-items: center; gap: 9px; border-radius: 3px; color: var(--texto); }
#botonAnimar b { width: 10px; height: 12px; border-left: 3px solid var(--acento); border-right: 3px solid var(--acento); }
#botonAnimar.pausado b { width: 0; height: 0; border-style: solid; border-width: 6px 0 6px 10px; border-color: transparent transparent transparent var(--acento); }
#botonAnimar:hover, #epoca button:hover { color: var(--texto); }

#ayuda { position: fixed; right: 18px; top: 74px; pointer-events: none; z-index: 4; font-size: 11px; letter-spacing: .4px; color: var(--suave); transition: opacity .4s; }
#panel.abierto ~ #ayuda { opacity: 0; }
.sello-demo { position: fixed; top: 74px; left: 16px; z-index: 4; font: 600 10px var(--titulos); letter-spacing: 2.4px; text-transform: uppercase; color: var(--aviso); border: 1px dashed rgba(255, 179, 71, .5); padding: 3px 8px; }

/* ---------- INTRO ---------- */
#intro { position: fixed; inset: 0; z-index: 9; display: grid; place-content: center; text-align: center; pointer-events: none; opacity: 0; transition: opacity 1.1s ease; }
#intro.visible { opacity: 1; }
#intro.salida { opacity: 0; }
#intro small { font: 600 12px var(--titulos); letter-spacing: 6px; text-transform: uppercase; color: var(--suave); }
#intro strong { font: 700 clamp(48px, 8vw, 104px)/1 var(--titulos); letter-spacing: 14px; text-transform: uppercase; color: var(--acento); text-shadow: 0 0 40px rgba(var(--acento-rgb), .55); margin: 12px 0 6px; }
#intro span { font: 600 16px var(--titulos); letter-spacing: 6px; text-transform: uppercase; color: var(--texto); }

/* ---------- VISOR DE FICHAS ---------- */
#visorFicha { position: fixed; inset: 0; z-index: 20; display: flex; flex-direction: column; background: rgba(0, 2, 6, .94); backdrop-filter: blur(6px); }
#visorFicha[hidden] { display: none; }
.visor-barra { display: flex; justify-content: space-between; align-items: center; padding: 12px 20px; border-bottom: 1px solid var(--linea); font: 700 15px var(--titulos); letter-spacing: 2px; text-transform: uppercase; }
#cerrarVisor { background: none; border: 0; font-size: 28px; cursor: pointer; }
#visorPaginas { flex: 1; overflow-y: auto; display: flex; flex-direction: column; align-items: center; gap: 18px; padding: 20px; }
#visorPaginas img { width: min(1200px, 100%); }

@media (max-width: 900px) {
  #ruta, #ayuda, .sello-demo { display: none; }
  #buscador { width: auto; flex: 1; }
  #leyenda { display: none; }
  #panel { left: 8px; right: 8px; width: auto; top: auto; height: 62vh; bottom: 8px; }
  #controles { bottom: auto; top: 74px; }
}

/* ============================================================
   ATLAS COMPLETO — AÑADIDOS
============================================================ */
#ruta button[data-ir] { color: var(--suave); }
.miga-inactiva { color: var(--suave); opacity: .6; }
#ayuda kbd { font: 10px var(--cuerpo); border: 1px solid var(--linea); padding: 0 5px; border-radius: 3px; }

/* Índice */
#indice { position: relative; }
#botonIndice { height: 100%; padding: 12px 16px; border-radius: 3px; cursor: pointer; font: 600 14px var(--titulos); letter-spacing: 2px; text-transform: uppercase; }
#botonIndice i { font-style: normal; color: var(--acento); margin-left: 4px; }
#botonIndice:hover, #botonIndice.activo { border-color: var(--linea-fuerte); color: var(--acento); }
#listaIndice { position: absolute; top: calc(100% + 6px); left: 0; width: 320px; max-height: 70vh; overflow-y: auto; margin: 0; padding: 8px; list-style: none; border-radius: 3px; background: var(--cristal-fuerte); }
.indice-sector { font: 600 11px var(--titulos); letter-spacing: 2.6px; text-transform: uppercase; color: var(--acento); padding: 10px 8px 4px; }
#listaIndice button { display: flex; align-items: center; gap: 10px; width: 100%; padding: 7px 8px; text-align: left; background: none; border: 0; border-radius: 2px; cursor: pointer; }
#listaIndice button:hover { background: rgba(var(--acento-rgb), .1); }
#listaIndice strong { display: block; font-size: 13.5px; font-weight: 500; }
#listaIndice small { display: block; font-size: 11px; color: var(--suave); }

/* Etiquetas de sistema (vista Universo) */
.etq-sistema { pointer-events: auto; cursor: pointer; text-align: center; transform: translateY(-22px); transition: opacity .4s; white-space: nowrap; }
.etq-sistema .etq-nombre { display: block; font: 700 15px var(--titulos); letter-spacing: 2.4px; text-transform: uppercase; color: var(--texto); text-shadow: 0 0 10px #000, 0 0 2px #000; }
.etq-sistema .etq-sub { display: block; font-size: 9.5px; letter-spacing: 1.4px; text-transform: uppercase; color: var(--suave); text-shadow: 0 0 6px #000; }
.etq-sistema:hover .etq-nombre { color: var(--acento); }
.etq-sistema.oculta, .rotulo-sector.oculta, .rotulo-incierto.oculta { opacity: 0; pointer-events: none; }
.rotulo-sector, .rotulo-incierto { transition: opacity .5s; }
.rotulo-sector-universo { transform: translateY(18px); font: 700 15px var(--titulos); letter-spacing: 6px; color: rgba(var(--acento-rgb), .6); text-shadow: 0 0 18px rgba(var(--acento-rgb), .35); cursor: pointer; transition: opacity .5s; }
.rotulo-sector-universo:hover { color: var(--acento); }
.rotulo-incierto { font: 600 10px var(--titulos); letter-spacing: 2.4px; text-transform: uppercase; color: var(--suave); border: 1px dashed rgba(139, 163, 168, .5); padding: 2px 8px; pointer-events: none; }

/* Chips de aspecto */
.chip-real { border-color: rgba(92, 200, 255, .55); color: var(--cian); }
.boton-principal.pendiente { border-style: dashed; color: var(--suave); border-color: var(--linea); background: none; text-align: center; cursor: default; }
a.boton-principal { text-align: center; text-decoration: none; box-sizing: border-box; }

/* Botón de ruta en el expediente del personaje */
.boton-ruta { display: flex; align-items: center; gap: 12px; width: calc(100% - 44px); margin: 14px 22px 2px; padding: 11px 14px; cursor: pointer; text-align: left;
  background: linear-gradient(90deg, rgba(255, 179, 71, .14), rgba(255, 179, 71, .03)); border: 1px solid rgba(255, 179, 71, .55); border-radius: 2px; }
.boton-ruta b { color: var(--aviso); font-size: 18px; text-shadow: 0 0 10px var(--aviso); }
.boton-ruta span { font: 700 15px var(--titulos); letter-spacing: 1.8px; text-transform: uppercase; color: var(--aviso); }
.boton-ruta small { display: block; font: 500 11px var(--cuerpo); letter-spacing: .3px; text-transform: none; color: var(--suave); }
.boton-ruta i { margin-left: auto; font-style: normal; font-size: 22px; color: var(--aviso); }
.boton-ruta:hover { background: rgba(255, 179, 71, .2); }

/* Marcas de etapa en 3D */
.marca-ruta { pointer-events: auto; cursor: pointer; display: flex; align-items: center; gap: 6px; padding: 3px 9px 3px 3px; white-space: nowrap;
  background: rgba(20, 12, 2, .7); border: 1px solid rgba(255, 179, 71, .45); border-radius: 2px; transition: opacity .3s; }
.marca-ruta b { font: 700 11px var(--titulos); color: #1a1004; background: var(--aviso); padding: 1px 5px; border-radius: 1px; }
.marca-ruta span { font: 600 11px var(--titulos); letter-spacing: 1.2px; text-transform: uppercase; color: #ffd9a0; }
.marca-ruta.actual { border-color: var(--aviso); box-shadow: 0 0 16px rgba(255, 179, 71, .45); }
.marca-ruta:not(.actual):not(.pasada) { opacity: .55; }

/* Barra de la ruta biográfica */
#barraRuta { position: fixed; left: 302px; right: 422px; bottom: 76px; z-index: 5; max-width: 980px; margin: 0 auto; padding: 12px 14px 14px; border-radius: 3px; border-color: rgba(255, 179, 71, .45); }
#barraRuta[hidden] { display: none; }
.ruta-cabecera { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.ruta-cabecera small { display: block; font: 600 10px var(--titulos); letter-spacing: 2.6px; text-transform: uppercase; color: var(--aviso); }
.ruta-cabecera strong { font: 700 19px var(--titulos); letter-spacing: 1.6px; text-transform: uppercase; }
.ruta-cabecera em { font-style: normal; font-size: 11px; color: var(--suave); margin-left: 12px; }
.ruta-botones { display: flex; gap: 6px; }
.ruta-botones button { width: 34px; height: 34px; border-radius: 2px; border: 1px solid var(--linea); background: rgba(2, 6, 10, .5); cursor: pointer; font-size: 20px; line-height: 1; }
.ruta-botones button:hover:not(:disabled) { border-color: var(--aviso); color: var(--aviso); }
.ruta-botones button:disabled { opacity: .3; cursor: default; }
#rutaEtapas { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 4px; margin: 0; padding: 0; list-style: none; position: relative; }
#rutaEtapas li button { width: 100%; height: 100%; text-align: left; background: rgba(255, 255, 255, .02); border: 1px solid rgba(255, 179, 71, .18); border-top: 3px solid rgba(255, 179, 71, .25); padding: 7px 8px; cursor: pointer; border-radius: 1px; }
#rutaEtapas b { display: block; font: 700 12px var(--titulos); color: var(--aviso); letter-spacing: 1px; }
#rutaEtapas span { display: block; font: 600 12px/1.2 var(--titulos); letter-spacing: .8px; text-transform: uppercase; margin-top: 2px; }
#rutaEtapas small { display: block; font-size: 10.5px; color: var(--suave); margin-top: 3px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#rutaEtapas li.pasada button { border-top-color: var(--aviso); }
#rutaEtapas li.actual button { border-color: var(--aviso); border-top-color: var(--aviso); background: rgba(255, 179, 71, .12); box-shadow: 0 0 18px rgba(255, 179, 71, .18); }
#rutaEtapas li button:hover { background: rgba(255, 179, 71, .08); }

/* Leyenda: nuevas muestras */
.ley-estructura { border-radius: 2px; border: 1px solid var(--acento); background: rgba(2, 9, 22, .9); box-shadow: 0 0 6px rgba(var(--acento-rgb), .5); transform: rotate(45deg) scale(.8); }
.ley-ruta { height: 2px; border-radius: 0; background: repeating-linear-gradient(90deg, var(--aviso) 0 5px, transparent 5px 8px); box-shadow: 0 0 6px var(--aviso); }

/* Logo = volver al universo entero / ver la ruta entera */
button.marca { font: inherit; color: var(--texto); text-align: left; cursor: pointer; transition: border-color .2s, box-shadow .2s; }
button.marca:hover { border-color: var(--linea-fuerte); box-shadow: 0 0 18px rgba(var(--acento-rgb), .18); }
button.marca:hover .marca-icono { filter: brightness(1.35); }
button.marca:focus-visible { outline: 1px solid var(--acento); outline-offset: 2px; }
.ruta-botones #rutaCompleta { width: auto; padding: 0 12px; font: 600 12px var(--titulos); letter-spacing: 1.6px; text-transform: uppercase; color: var(--aviso); border-color: rgba(255, 179, 71, .45); }
.ruta-botones #rutaCompleta.activo { background: rgba(255, 179, 71, .16); border-color: var(--aviso); }
#botonAnimar span { white-space: nowrap; }
#leyenda p.creditos { margin-top: 6px; font-size: 10.5px; opacity: .8; }

/* ============================================================
   MAPA EXTRADIMENSIONAL
============================================================ */
#selectorMapa { display: flex; gap: 2px; padding: 4px; border-radius: 3px; background: var(--cristal); backdrop-filter: blur(14px) saturate(1.2); border: 1px solid var(--linea); }
#selectorMapa button { background: none; border: 1px solid transparent; padding: 7px 12px; cursor: pointer; font: 600 12px var(--titulos); letter-spacing: 1.6px; text-transform: uppercase; color: var(--suave); border-radius: 2px; white-space: nowrap; }
#selectorMapa button:hover { color: var(--texto); }
#selectorMapa button.activo { color: var(--texto); background: rgba(var(--acento-rgb), .12); border-color: var(--linea-fuerte); }
#selectorMapa button[data-modo="extra"].activo { color: #E6DAFF; background: rgba(180, 156, 255, .14); border-color: rgba(180, 156, 255, .6); }

#leyendaExtra { display: none; position: fixed; left: 16px; bottom: 16px; z-index: 5; width: 290px; padding: 14px 16px; border-radius: 3px;
  background: var(--cristal); backdrop-filter: blur(14px) saturate(1.2); border: 1px solid rgba(180, 156, 255, .35); }
#leyendaExtra h3 { margin: 0 0 10px; font: 600 11px var(--titulos); letter-spacing: 2.6px; text-transform: uppercase; color: #C9B6FF; }
#leyendaExtra ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
#leyendaExtra button { width: 100%; display: flex; align-items: center; gap: 10px; padding: 5px 6px; background: none; border: 0; border-radius: 2px; cursor: pointer; text-align: left; font-size: 12.5px; color: #D6CFE8; }
#leyendaExtra button:hover { background: rgba(180, 156, 255, .1); color: #fff; }
#leyendaExtra button small { margin-left: auto; font: 600 11px var(--titulos); color: var(--aviso); }
#leyendaExtra .punto { width: 10px; height: 10px; border-radius: 50%; flex: none; background: var(--c); box-shadow: 0 0 8px var(--c); }
#leyendaExtra p { margin: 12px 0 0; font-size: 11px; line-height: 1.5; color: var(--suave); }
#leyendaExtra .ley { display: inline-block; width: 16px; vertical-align: middle; }
.ley-hilo { height: 2px; border-radius: 0; background: repeating-linear-gradient(90deg, #B49CFF 0 5px, transparent 5px 8px); box-shadow: 0 0 6px #B49CFF; }

body.modo-extra #leyenda, body.modo-extra #controles, body.modo-extra #indice, body.modo-extra #buscador, body.modo-extra #barraRuta { display: none; }
body.modo-extra #leyendaExtra { display: block; }
body.modo-extra { --linea: rgba(180, 156, 255, 0.24); --linea-fuerte: rgba(180, 156, 255, 0.6); }

.etq-reino { pointer-events: auto; cursor: pointer; text-align: center; white-space: nowrap; transition: opacity .3s; }
.etq-reino .etq-nombre { font-size: 15px; letter-spacing: 2.2px; text-shadow: 0 0 12px var(--c), 0 0 3px #000; }
.etq-reino .etq-sub { max-width: 240px; margin: 1px auto 0; white-space: normal; }
.etq-universo .etq-nombre { font-size: 18px; color: #fff; }
.etq-interno { pointer-events: auto; cursor: pointer; text-align: center; white-space: nowrap; }
.etq-interno .etq-nombre { font-size: 12px; }
.etq-interno .etq-sub { font-size: 8.5px; }

.boton-portal { width: 100%; border-color: rgba(180, 156, 255, .7) !important; color: #E6DAFF !important; background: rgba(180, 156, 255, .14) !important; cursor: pointer; }
.boton-portal:hover { background: rgba(180, 156, 255, .26) !important; box-shadow: 0 0 22px rgba(180, 156, 255, .35); }

.miniaturas { display: flex; gap: 6px; margin: 10px 0 4px; }
.miniaturas button { width: 54px; height: 54px; padding: 0; border: 1px solid var(--linea); border-radius: 2px; overflow: hidden; background: #000; cursor: pointer; opacity: .6; }
.miniaturas button.activa, .miniaturas button:hover { opacity: 1; border-color: var(--linea-fuerte); }
.miniaturas img { width: 100%; height: 100%; object-fit: cover; display: block; }
.tarjeta.actual { border-color: var(--aviso); }
.avatar.etapa { font: 700 12px var(--titulos); color: #1a1004; background: var(--aviso); }

#transicion { position: fixed; inset: 0; z-index: 30; pointer-events: none; opacity: 0;
  background: radial-gradient(circle at 50% 50%, rgba(230, 218, 255, .95), rgba(120, 80, 220, .6) 35%, rgba(2, 4, 10, 0) 75%); }
#transicion.activa { animation: cruzar 1.4s ease-out; }
@keyframes cruzar { 0% { opacity: 0; transform: scale(.6); } 25% { opacity: 1; transform: scale(1.1); } 100% { opacity: 0; transform: scale(1.6); } }
.etq-reino.lejos .etq-sub { display: none; }
.etq-reino.lejos .etq-nombre { font-size: 13px; }
.etq-reino.lejos.etq-universo .etq-nombre { font-size: 16px; }
.etq-reino.lejos .n-resto { display: none; }

/* Cabecera: que nada se parta en dos líneas */
#cabecera .marca, #selectorMapa, #indice, #botonIndice { flex: none; white-space: nowrap; }
#ruta { flex: 1 1 auto; min-width: 0; overflow: hidden; white-space: nowrap; mask-image: linear-gradient(90deg, #000 88%, transparent); }
#ruta button, #ruta span { white-space: nowrap; }
#buscador { flex: 0 1 300px; min-width: 200px; }
@media (max-width: 1500px) { #selectorMapa button { padding: 7px 9px; letter-spacing: 1.2px; } #cabecera .marca small { display: none; } }

/* ============================================================
   ATLAS DE LA TIERRA (modo Tierra)
============================================================ */
#capaTierra { position: fixed; inset: 0; z-index: 2; pointer-events: none; overflow: hidden; }
#leyendaTierra, #controlesTierra, #panelCapas, #ayudaTierra, #avisoTierra { display: none; }
body.modo-tierra #leyenda, body.modo-tierra #controles, body.modo-tierra #ayuda { display: none; }
body.modo-tierra #leyendaTierra { display: block; }
body.modo-tierra #controlesTierra { display: flex; }
body.modo-tierra #ayudaTierra { display: block; }
body.modo-tierra #avisoTierra { display: block; }
#leyendaTierra, #controlesTierra > *, #panelCapas {
  background: var(--cristal); backdrop-filter: blur(14px) saturate(1.2); -webkit-backdrop-filter: blur(14px) saturate(1.2);
  border: 1px solid var(--linea);
}
#leyendaTierra { position: fixed; left: 16px; bottom: 16px; z-index: 5; width: 290px; padding: 14px 16px; border-radius: 3px; }
#leyendaTierra h3 { margin: 0 0 10px; font: 600 11px var(--titulos); letter-spacing: 2.6px; text-transform: uppercase; color: var(--acento); }
#leyendaTierra ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 7px; }
#leyendaTierra li { display: flex; align-items: center; gap: 10px; font-size: 12px; color: #C8D6D9; }
#leyendaTierra p { margin: 10px 0 0; font-size: 11px; line-height: 1.45; color: var(--suave); }
#leyendaTierra p.creditos { font-size: 10px; opacity: .8; }
.ley-zona { width: 16px; height: 10px; border: 1.5px solid #E65100; background: rgba(230, 81, 0, .2); }
.ley-marcador { width: 9px; height: 9px; transform: rotate(45deg); background: var(--cian); box-shadow: 0 0 8px var(--cian); margin: 0 3px; }
.ley-edificio { width: 3px; height: 14px; background: linear-gradient(transparent, var(--acento)); box-shadow: 0 0 8px var(--acento); margin: 0 6px; }
.ley-personaje { width: 10px; height: 10px; border-radius: 50%; border: 2px solid var(--aviso); margin: 0 3px; }
.ley-maqueta { width: 16px; height: 12px; background: linear-gradient(90deg, #444 0 20%, transparent 20% 30%, #555 30% 55%, transparent 55% 65%, #3a3a3a 65%); border-bottom: 2px solid #FFB04A; }
.ley-real { width: 16px; height: 0; border-top: 1px solid #8FE9FF; opacity: .8; }

#controlesTierra { position: fixed; left: 50%; bottom: 16px; transform: translateX(-50%); z-index: 5; gap: 10px; align-items: stretch; }
#luzTierra { display: flex; align-items: center; gap: 2px; padding: 4px; border-radius: 3px; }
#luzTierra span { font: 600 10px var(--titulos); letter-spacing: 2px; text-transform: uppercase; color: var(--suave); padding: 0 10px 0 8px; }
#luzTierra button, #botonCapas { background: none; border: 1px solid transparent; padding: 8px 13px; cursor: pointer; font: 600 12.5px var(--titulos); letter-spacing: 1.6px; text-transform: uppercase; color: var(--suave); border-radius: 2px; }
#luzTierra button.activa { color: var(--texto); background: rgba(var(--acento-rgb), .12); border-color: var(--linea-fuerte); }
#luzTierra button:hover, #botonCapas:hover { color: var(--texto); }
#botonCapas { border: 1px solid var(--linea); border-radius: 3px; color: var(--texto); }
#botonCapas i { font-style: normal; color: var(--acento); margin-left: 4px; }
#botonCapas.activo { border-color: var(--linea-fuerte); }
#lecturaTierra { display: flex; align-items: center; padding: 0 14px; border-radius: 3px; font: 500 11.5px var(--cuerpo); color: var(--suave); white-space: nowrap; font-variant-numeric: tabular-nums; min-width: 300px; }
#panelCapas { position: fixed; left: 50%; bottom: 70px; transform: translateX(-50%); z-index: 6; width: 340px; max-height: 60vh; overflow: auto; padding: 12px 16px 14px; border-radius: 3px; }
#panelCapas h4 { margin: 10px 0 6px; font: 600 11px var(--titulos); letter-spacing: 2.2px; text-transform: uppercase; color: var(--acento); }
#panelCapas h4:first-child { margin-top: 2px; }
#panelCapas label { display: flex; align-items: center; gap: 9px; padding: 4px 0; font-size: 12.5px; color: #C8D6D9; cursor: pointer; }
#panelCapas label small { margin-left: auto; color: var(--suave); font-size: 11px; }
#panelCapas input { accent-color: var(--acento); }
#panelCapas p { margin: 10px 0 0; font-size: 11px; color: var(--suave); line-height: 1.4; }
#ayudaTierra { position: fixed; right: 18px; top: 74px; z-index: 4; pointer-events: none; font-size: 11px; color: var(--suave); max-width: 520px; text-align: right; transition: opacity .4s; }
#panel.abierto ~ #ayudaTierra { opacity: 0; }
#avisoTierra { position: fixed; left: 50%; top: 82px; transform: translate(-50%, -8px); z-index: 7; padding: 9px 18px; border: 1px solid var(--linea-fuerte); background: var(--cristal-fuerte);
  font: 600 13px var(--titulos); letter-spacing: 2px; text-transform: uppercase; color: var(--acento); opacity: 0; transition: opacity .5s, transform .5s; pointer-events: none; border-radius: 3px; }
#avisoTierra.visible { opacity: 1; transform: translate(-50%, 0); }
#avisoTierra:empty { display: none; }

/* Etiquetas sobre el globo */
.etq-t { position: absolute; left: 0; top: 0; display: flex; align-items: center; gap: 6px; white-space: nowrap; pointer-events: auto; cursor: pointer;
  margin-top: -8px; margin-left: -5px; will-change: transform; }
.etq-t.pasiva { pointer-events: none; cursor: default; }
.etq-t-punto { width: 8px; height: 8px; flex: none; transform: rotate(45deg); background: var(--c, var(--cian)); box-shadow: 0 0 8px var(--c, var(--cian)); border: 1px solid rgba(255,255,255,.6); }
.etq-t-texto { display: flex; flex-direction: column; line-height: 1.05; text-shadow: 0 0 4px #000, 0 0 10px rgba(0,0,0,.9); }
.etq-t-texto b { font: 700 12.5px var(--titulos); letter-spacing: 1.3px; color: #EAF6F4; }
.etq-t-texto small { font: 500 9.5px var(--cuerpo); letter-spacing: .8px; text-transform: uppercase; color: var(--c, var(--suave)); filter: brightness(1.5) saturate(.7); }
.etq-t:hover .etq-t-texto b { color: var(--acento); }
.etq-kml.etq-zona .etq-t-punto { width: 7px; height: 7px; transform: none; border-radius: 1px; }
.etq-kml.etq-personaje .etq-t-punto { transform: none; border-radius: 50%; background: transparent; border: 2px solid var(--aviso); box-shadow: 0 0 8px rgba(255,179,71,.8); }
.etq-kml.etq-personaje .etq-t-texto small { color: var(--aviso); filter: none; }
.etq-kml.etq-edificio .etq-t-punto { width: 0; height: 0; transform: none; background: none; border: 0; border-left: 5px solid transparent; border-right: 5px solid transparent; border-bottom: 9px solid var(--c); box-shadow: none; filter: drop-shadow(0 0 4px var(--c)); }
.etq-kml.en-ruta::before { content: attr(data-n); font: 700 11px var(--titulos); color: #02040a; background: var(--aviso); padding: 1px 4px; border-radius: 2px; }
.etq-real { margin-top: -6px; }
.etq-real .etq-t-texto b { font: 500 11px var(--cuerpo); letter-spacing: .3px; color: rgba(214, 232, 236, .72); }
.etq-real .etq-t-punto { width: 4px; height: 4px; transform: none; border-radius: 50%; background: rgba(214,232,236,.7); box-shadow: none; border: 0; }
.etq-real.capital .etq-t-punto { width: 5px; height: 5px; border: 1px solid rgba(214,232,236,.9); background: transparent; }
.etq-real-pais .etq-t-texto b { font: 600 11px var(--titulos); letter-spacing: 3px; text-transform: uppercase; color: rgba(222, 238, 240, .55); }
.etq-real-mar .etq-t-texto b { font: italic 400 11.5px var(--cuerpo); letter-spacing: 1.5px; color: rgba(140, 200, 255, .6); }
#panelContenido .subtitulo { font: 600 11px var(--titulos); letter-spacing: 2px; text-transform: uppercase; color: var(--acento); margin: 18px 0 6px; }
.enlace-secundario { display: block; margin: 8px 22px 0; font-size: 12px; color: var(--suave); text-decoration: none; }
.enlace-secundario:hover { color: var(--acento); }
.tarjeta .avatar[style] { width: 36px; height: 36px; color: var(--c); background: rgba(255,255,255,.03); border: 1px solid var(--c); font-size: 14px; }
.tarjeta .avatar[style] + span strong { font-size: 15px; }

/* ============================================================
   RUTA BIOGRÁFICA PLEGABLE (16.11.2026)
============================================================ */
.ruta-plegar { display: flex; align-items: center; gap: 12px; flex: 1; min-width: 0; padding: 2px 6px 2px 0; background: none; border: 0; cursor: pointer; text-align: left; }
.ruta-plegar .ruta-icono { color: var(--aviso); font-size: 18px; text-shadow: 0 0 10px var(--aviso); }
.ruta-plegar .ruta-textos { min-width: 0; }
.ruta-plegar .ruta-textos strong { white-space: nowrap; }
.ruta-plegar #rutaIndicador { color: var(--aviso); font-weight: 600; letter-spacing: .6px; }
.ruta-plegar .ruta-flecha { margin-left: auto; font-style: normal; color: var(--aviso); font-size: 14px; transition: transform .25s; }
.ruta-plegar[aria-expanded="true"] .ruta-flecha { transform: rotate(180deg); }
.ruta-plegar:hover strong { color: var(--aviso); }
#barraRuta.plegada { bottom: 76px; padding: 8px 12px; }
#barraRuta.plegada .ruta-cabecera { margin-bottom: 0; }
#barraRuta.plegada #rutaEtapas { display: none; }
#barraRuta.plegada #rutaContinuidad { display: none; }

/* ============================================================
   LUGARES DENTRO DE UN PLANETA Y MAPA PLANETARIO (no oficial)
============================================================ */
.icono-lugar { color: var(--c) !important; background: rgba(255, 255, 255, .03) !important; font-size: 22px !important; text-shadow: 0 0 12px var(--c); }
.tarjeta-lugar img, .tarjeta-lugar .avatar { width: 44px !important; height: 44px !important; }
.grupo h4 .cuenta { color: var(--acento); margin-left: 4px; }
.boton-mapa { width: 100%; cursor: pointer; }

#mapaPlaneta { position: fixed; inset: 0; z-index: 25; display: grid; place-items: center; background: rgba(1, 3, 6, .82); backdrop-filter: blur(6px); }
#mapaPlaneta[hidden] { display: none; }
.mp-marco { position: relative; width: min(1480px, 94vw); background: var(--cristal-fuerte); border: 1px solid var(--linea-fuerte); border-radius: 3px; padding: 16px 18px 12px; box-shadow: 0 0 60px rgba(var(--acento-rgb), .08); }
.mp-cabecera { display: flex; align-items: baseline; gap: 14px; margin-bottom: 10px; }
.mp-cabecera small { font: 600 10px var(--titulos); letter-spacing: 2.6px; text-transform: uppercase; color: var(--acento); }
.mp-cabecera h2 { margin: 0; font: 700 24px var(--titulos); letter-spacing: 2px; text-transform: uppercase; }
.mp-sello { margin-left: auto; font: 700 11px var(--titulos); letter-spacing: 2px; text-transform: uppercase; color: var(--aviso); border: 1px solid rgba(255, 179, 71, .5); padding: 4px 9px; border-radius: 2px; }
.mp-cerrar { width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--linea); background: rgba(2, 6, 10, .6); cursor: pointer; font-size: 20px; line-height: 1; }
.mp-cerrar:hover { border-color: var(--acento); color: var(--acento); }
.mp-cuerpo { display: grid; grid-template-columns: 1fr 330px; gap: 14px; }
.mp-lienzo { position: relative; aspect-ratio: 2 / 1; border: 1px solid var(--linea); border-radius: 2px; overflow: hidden; background: #050709; }
.mp-lienzo canvas, .mp-lienzo img.mp-imagen { position: absolute; inset: 0; width: 100%; height: 100%; display: block; object-fit: cover; }
.mp-reticula { position: absolute; inset: 0; pointer-events: none;
  background-image: linear-gradient(rgba(var(--acento-rgb), .09) 1px, transparent 1px), linear-gradient(90deg, rgba(var(--acento-rgb), .09) 1px, transparent 1px);
  background-size: calc(100% / 12) calc(100% / 6); box-shadow: inset 0 0 80px rgba(0, 0, 0, .65); }
.mp-zona { position: absolute; transform: translate(-50%, -50%); border-radius: 50%; border: 1px dashed rgba(var(--acento-rgb), .55); background: radial-gradient(circle, rgba(var(--acento-rgb), .13), transparent 70%); pointer-events: none; }
.mp-zona span { position: absolute; left: 50%; top: -22px; transform: translateX(-50%); white-space: nowrap; font: 600 11px var(--titulos); letter-spacing: 1.8px; text-transform: uppercase; color: #bdf7da; text-shadow: 0 0 8px #000; }
.mp-marcador { position: absolute; transform: translate(-50%, -100%); display: flex; flex-direction: column; align-items: center; gap: 2px; background: none; border: 0; cursor: pointer; padding: 0; }
.mp-marcador i { width: 14px; height: 14px; transform: rotate(45deg); background: var(--c); box-shadow: 0 0 0 3px rgba(0, 0, 0, .55), 0 0 16px var(--c); transition: transform .2s; }
.mp-marcador b { order: -1; white-space: nowrap; font: 700 12px var(--titulos); letter-spacing: 1.4px; text-transform: uppercase; color: #fff; text-shadow: 0 0 6px #000, 0 0 2px #000; padding: 2px 6px; background: rgba(2, 6, 10, .55); border-radius: 2px; }
.mp-marcador:hover i, .mp-marcador.activo i { transform: rotate(45deg) scale(1.35); }
.mp-marcador.activo b { color: var(--c); }
.mp-marcador.pequeno b { font-size: 10px; letter-spacing: 1px; }
.mp-ficha { border: 1px solid var(--linea); border-radius: 2px; padding: 14px; overflow-y: auto; max-height: calc(min(1480px, 94vw) / 2 - 340px / 2); min-height: 200px; }
.mp-ficha h3 { margin: 4px 0 2px; font: 700 20px var(--titulos); letter-spacing: 1.5px; text-transform: uppercase; }
.mp-ficha .mp-tipo { font: 600 10px var(--titulos); letter-spacing: 2px; text-transform: uppercase; color: var(--acento); }
.mp-ficha p { font-size: 13px; line-height: 1.55; color: #C9D8DB; }
.mp-ficha .mp-vacio { color: var(--suave); font-size: 13px; }
.mp-ficha .tarjeta { margin-top: 8px; }
.mp-ficha .boton-principal { width: 100%; margin-top: 12px; cursor: pointer; }
.mp-pie { margin: 10px 0 0; font-size: 11.5px; color: var(--suave); line-height: 1.45; }
.mp-pie b { color: var(--aviso); font-weight: 600; }

/* ============================================================
   CUSTODIOS DE SECTOR
============================================================ */
.rotulo-custodio { pointer-events: auto; cursor: pointer; text-align: center; white-space: nowrap; transition: opacity .4s; }
.rotulo-custodio .cust-cuerpo { display: block; font: 600 9.5px var(--titulos); letter-spacing: 2px; text-transform: uppercase; color: var(--c); text-shadow: 0 0 8px #000; }
.rotulo-custodio strong { display: block; font: 700 14px var(--titulos); letter-spacing: 1.8px; text-transform: uppercase; color: #fff; text-shadow: 0 0 12px var(--c), 0 0 3px #000; }
.rotulo-custodio small { display: block; font-size: 9.5px; letter-spacing: 1px; color: var(--suave); text-shadow: 0 0 6px #000; }
.rotulo-custodio.antiguo strong { opacity: .8; }
.rotulo-custodio:hover strong { color: var(--c); }
#barraRuta.plegada .ruta-textos em, .ruta-plegar #rutaIndicador { white-space: nowrap; }
.mp-ficha .boton-principal { display: block; width: 100%; margin: 12px 0 0; box-sizing: border-box; }
.mp-lista h4 { margin: 14px 0 6px; font: 600 10.5px var(--titulos); letter-spacing: 2px; text-transform: uppercase; color: var(--suave); }
.mp-lista h4 b { color: var(--acento); }
.mp-lista button, .mp-volver { display: flex; align-items: center; gap: 9px; width: 100%; padding: 7px 8px; margin-top: 3px; background: rgba(255, 255, 255, .02); border: 1px solid var(--linea); border-radius: 2px; cursor: pointer; text-align: left; font: 600 12.5px var(--titulos); letter-spacing: 1px; text-transform: uppercase; }
.mp-lista button i { width: 9px; height: 9px; transform: rotate(45deg); background: var(--c); box-shadow: 0 0 8px var(--c); flex: none; }
.mp-lista button small { margin-left: auto; font: 500 10.5px var(--cuerpo); letter-spacing: 0; text-transform: none; color: var(--suave); }
.mp-lista button:hover, .mp-volver:hover { border-color: var(--linea-fuerte); background: rgba(var(--acento-rgb), .06); }
.mp-volver { margin: 0 0 10px; color: var(--suave); }
.mp-marcador.pequeno b { opacity: 0; transition: opacity .2s; pointer-events: none; }
.mp-marcador.pequeno:hover b, .mp-marcador.pequeno.activo b { opacity: 1; }
.mp-marcador.pequeno i { width: 12px; height: 12px; }
.rotulo-custodio { transform: translateY(-34px); }
.rotulo-oa { transform: translateY(-20px); }
.rotulo-oa strong { font-size: 12px; }

/* ============================================================
   RECORRIDOS GUIADOS — cámara cinematográfica + subtítulos
   (JS/recorridos.js · guiones en DATOS/RECORRIDOS/)
============================================================ */
#botonRecorrido { display: flex; align-items: center; gap: 9px; padding: 8px 15px 8px 12px; white-space: nowrap; border-radius: 3px; cursor: pointer;
  font: 600 12.5px var(--titulos); letter-spacing: 1.6px; text-transform: uppercase; color: var(--texto); border-color: var(--linea-fuerte); }
#botonRecorrido[hidden] { display: none; }
#botonRecorrido b { width: 0; height: 0; border-style: solid; border-width: 6px 0 6px 10px; border-color: transparent transparent transparent var(--acento); filter: drop-shadow(0 0 4px var(--acento)); }
#botonRecorrido:hover { color: var(--acento); box-shadow: 0 0 18px rgba(var(--acento-rgb), .18); }
#botonRecorrido.aparece { animation: recAparece 2.4s ease-out; }
@keyframes recAparece { 0% { opacity: 0; transform: translateY(8px); } 18% { opacity: 1; transform: none; box-shadow: 0 0 0 0 rgba(var(--acento-rgb), .5); } 60% { box-shadow: 0 0 0 10px rgba(var(--acento-rgb), 0); } }

#recorrido[hidden] { display: none; }
#recorrido { position: fixed; inset: 0; z-index: 7; pointer-events: none; }
#recorrido button { pointer-events: auto; }

/* Franjas de cine (solo mientras se reproduce) */
.rec-franja { position: absolute; left: 0; right: 0; height: 0; background: #000; transition: height 1.1s cubic-bezier(.4, 0, .2, 1); }
.rec-franja-arriba { top: 0; }
.rec-franja-abajo { bottom: 0; }
body.en-recorrido:not(.recorrido-pausa) .rec-franja { height: 8.5vh; }

/* Lo demás se retira mientras se reproduce */
body.en-recorrido #controles, body.en-recorrido #leyenda, body.en-recorrido #ayuda, body.en-recorrido #barraRuta { display: none; }
body.en-recorrido:not(.recorrido-pausa) #panel { opacity: 0; pointer-events: none; transform: translateX(calc(100% + 30px)); }
body.en-recorrido:not(.recorrido-pausa) #cabecera { opacity: .18; transition: opacity .8s; }
body.en-recorrido:not(.recorrido-pausa) #cabecera:hover { opacity: 1; }
body.en-recorrido:not(.recorrido-pausa) .capa-etiquetas { opacity: .7; }

/* Rótulo de cada parada (tercio inferior izquierdo) */
.rec-titulo { position: absolute; left: max(5vw, 32px); bottom: calc(8.5vh + 118px); max-width: min(560px, 80vw); opacity: 0; transform: translateX(-14px); transition: opacity 1s ease, transform 1.2s cubic-bezier(.2, .8, .2, 1); }
.rec-titulo.visible { opacity: 1; transform: none; }
.rec-titulo small { display: block; font: 600 12px var(--titulos); letter-spacing: 4px; text-transform: uppercase; color: var(--acento); text-shadow: 0 0 12px rgba(var(--acento-rgb), .45); }
.rec-titulo strong { display: block; margin: 4px 0 6px; padding-left: 14px; border-left: 2px solid var(--acento); font: 700 clamp(40px, 5.4vw, 74px)/1 var(--titulos); letter-spacing: 6px; text-transform: uppercase; color: var(--texto); text-shadow: 0 2px 30px rgba(0, 0, 0, .8); }
.rec-titulo em { display: block; font: 500 11px var(--cuerpo); font-style: normal; letter-spacing: .4px; color: var(--suave); }

/* Subtítulos */
.rec-subtitulo { position: absolute; left: 50%; bottom: calc(8.5vh + 26px); transform: translateX(-50%); margin: 0; width: min(820px, 88vw); text-align: center;
  font: 500 clamp(16px, 1.45vw, 21px)/1.45 var(--cuerpo); color: #F2F7F8; text-shadow: 0 1px 2px #000, 0 0 18px rgba(0, 0, 0, .9);
  opacity: 0; transition: opacity .45s ease; }
.rec-subtitulo.visible { opacity: 1; }
body.recorrido-pausa .rec-subtitulo { bottom: 84px; }
body.recorrido-pausa .rec-titulo { bottom: 150px; }

/* Barra del reproductor */
.rec-barra { position: absolute; left: 50%; bottom: 14px; transform: translateX(-50%); width: min(860px, calc(100vw - 32px)); display: flex; align-items: center; gap: 6px;
  padding: 6px 8px; border-radius: 3px; pointer-events: auto; background: rgba(4, 10, 22, .62); border: 1px solid var(--linea); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  opacity: .55; transition: opacity .4s; }
.rec-barra:hover, body.recorrido-pausa .rec-barra { opacity: 1; }
.rec-barra > button { flex: none; height: 32px; min-width: 32px; padding: 0 9px; border: 1px solid transparent; border-radius: 2px; background: none; cursor: pointer;
  font: 600 18px/1 var(--titulos); color: var(--suave); }
.rec-barra > button:hover { color: var(--texto); border-color: var(--linea); }
.rec-play { display: grid; place-items: center; border-color: var(--linea-fuerte) !important; }
.rec-play b { width: 10px; height: 12px; border-left: 3px solid var(--acento); border-right: 3px solid var(--acento); }
.rec-play.pausado b { width: 0; height: 0; border-style: solid; border-width: 6px 0 6px 10px; border-color: transparent transparent transparent var(--acento); }
body.recorrido-pausa .rec-play { box-shadow: 0 0 14px rgba(var(--acento-rgb), .3); animation: recLatido 1.8s ease-in-out infinite; }
@keyframes recLatido { 50% { box-shadow: 0 0 0 6px rgba(var(--acento-rgb), 0), 0 0 18px rgba(var(--acento-rgb), .4); } }
.rec-info { flex: none; display: flex; flex-direction: column; justify-content: center; min-width: 118px; padding: 0 8px; line-height: 1.1; }
.rec-info small { font: 600 10px var(--titulos); letter-spacing: 2px; color: var(--suave); }
.rec-info span { font: 700 14px var(--titulos); letter-spacing: 1.6px; text-transform: uppercase; color: var(--texto); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 170px; }
.rec-progreso { flex: 1; display: flex; gap: 3px; list-style: none; margin: 0; padding: 0 6px; min-width: 120px; }
.rec-progreso li { min-width: 8px; }
.rec-progreso button { display: block; width: 100%; height: 18px; padding: 7px 0; border: 0; background: none; cursor: pointer; }
.rec-progreso button::before { content: ""; display: block; height: 4px; background: rgba(139, 163, 168, .28); border-radius: 1px; }
.rec-progreso i { display: block; height: 4px; margin-top: -4px; background: var(--acento); box-shadow: 0 0 8px rgba(var(--acento-rgb), .6); transform-origin: left; transform: scaleX(0); border-radius: 1px; }
.rec-progreso li.actual button::before { background: rgba(139, 163, 168, .45); }
.rec-progreso button:hover::before { background: rgba(228, 240, 242, .5); }
.rec-pausa { display: none; flex: none; font: 600 11px var(--titulos); letter-spacing: 1.8px; text-transform: uppercase; color: var(--aviso); padding: 0 6px; white-space: nowrap; }
body.recorrido-pausa:not(.recorrido-fin) .rec-pausa { display: block; }
.rec-velocidad { font: 600 13px var(--titulos) !important; letter-spacing: 1px; min-width: 42px !important; }
.rec-cerrar { font-size: 22px !important; }

/* Tarjeta final */
.rec-fin { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); text-align: center; padding: 26px 34px 24px; pointer-events: auto;
  background: rgba(4, 10, 22, .78); border: 1px solid var(--linea-fuerte); border-radius: 3px; backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); animation: recFin .8s ease-out; }
.rec-fin[hidden] { display: none; }
@keyframes recFin { from { opacity: 0; transform: translate(-50%, -46%); } }
.rec-fin small { font: 600 11px var(--titulos); letter-spacing: 4px; text-transform: uppercase; color: var(--suave); }
.rec-fin strong { display: block; margin: 6px 0 18px; font: 700 34px/1 var(--titulos); letter-spacing: 4px; text-transform: uppercase; color: var(--acento); }
.rec-fin div { display: flex; gap: 10px; justify-content: center; }
.rec-fin button { padding: 9px 16px; border: 1px solid var(--linea); border-radius: 2px; background: none; cursor: pointer; font: 600 13px var(--titulos); letter-spacing: 1.6px; text-transform: uppercase; color: var(--texto); }
.rec-fin button:hover { border-color: var(--linea-fuerte); }
.rec-fin button.principal { border-color: var(--linea-fuerte); background: rgba(var(--acento-rgb), .12); }

@media (max-width: 900px) {
  .rec-info { display: none; }
  .rec-titulo { bottom: calc(8.5vh + 96px); }
}
@media (prefers-reduced-motion: reduce) {
  .rec-titulo, .rec-franja { transition: none; }
  #botonRecorrido.aparece, body.recorrido-pausa .rec-play { animation: none; }
}
/* En las paradas de un cuerpo solo se ve su etiqueta */
body.en-recorrido.rec-con-foco:not(.recorrido-pausa) .capa-etiquetas .etiqueta:not(.rec-foco) { opacity: 0 !important; pointer-events: none; }

/* ============================================================
   FASE 1 · 17.11.2026 — azul DC, tipos del mapa, custodios, expediente
============================================================ */
/* Tipos del mapa general: color + forma (círculo, anillo, rombo) para que no dependa solo del color */
.etq-sistema .etq-nombre::before { content: ""; display: inline-block; width: 7px; height: 7px; margin: 0 8px 2px 0; vertical-align: middle;
  border-radius: 50%; background: var(--tipo, var(--acento)); box-shadow: 0 0 7px var(--tipo, var(--acento)); }
.etq-sistema.tipo-sinSector .etq-nombre::before { background: transparent; border: 1.5px solid var(--tipo); width: 5px; height: 5px; }
.etq-sistema.tipo-pulsar .etq-nombre::before { border-radius: 1px; transform: rotate(45deg); }
#listaIndice .punto.tipo-sinSector, .ley-tipo.tipo-sinSector { background: transparent; border: 1.5px solid var(--c); }
#listaIndice .punto.tipo-pulsar, .ley-tipo.tipo-pulsar { border-radius: 1px; transform: rotate(45deg) scale(.85); }
.ley-tipo { width: 10px; height: 10px; margin: 0 3px; background: var(--c); box-shadow: 0 0 7px var(--c); }
.ley-custodio { height: 2px; border-radius: 0; background: linear-gradient(90deg, transparent, var(--c)); box-shadow: 0 0 6px var(--c); }
#leyenda h4 { margin: 12px 0 8px; font: 600 10px var(--titulos); letter-spacing: 2.2px; text-transform: uppercase; color: var(--suave); }
#resultados .punto.personaje.extra { background: #B49CFF; }
#resultados .punto.extra { background: var(--c); box-shadow: 0 0 8px #B49CFF; outline: 1px solid rgba(180, 156, 255, .7); outline-offset: 2px; }

/* Icono propio de farol (no es el emblema oficial de ningún Cuerpo) */
.icono-farol { width: 1.25em; height: 1.25em; flex: none; vertical-align: -0.28em; filter: drop-shadow(0 0 4px currentColor); }

/* Rótulo del custodio: «Green Lantern · Sector 112», nombre y estado */
.rotulo-custodio .cust-cuerpo { display: inline-flex; align-items: center; gap: 6px; font-size: 10.5px; letter-spacing: 2.2px; }
.rotulo-custodio .cust-cuerpo .icono-farol { width: 17px; height: 17px; vertical-align: 0; }
.rotulo-custodio strong { display: flex; align-items: center; justify-content: center; gap: 8px; margin-top: 2px; }
.cust-estado { font: 600 9px var(--titulos); font-style: normal; letter-spacing: 1.6px; text-transform: uppercase; color: #D9DEE3;
  padding: 2px 6px 1px; border: 1px solid rgba(200, 208, 216, .55); border-radius: 2px; background: rgba(20, 24, 30, .75); text-shadow: none; }
.cust-estado:empty { display: none; }
.rotulo-custodio small { margin-top: 2px; }
.rotulo-custodio.apagado .cust-cuerpo { color: #9AA6B2; }
.rotulo-custodio.apagado strong { color: #C9D1D8; text-shadow: 0 0 10px rgba(150, 165, 178, .6), 0 0 3px #000; opacity: 1; }
.rotulo-custodio.apagado .icono-farol { filter: none; opacity: .75; }
.rotulo-custodio:hover strong .cust-nombre { color: var(--c); }
.rotulo-custodio.apagado:hover strong .cust-nombre { color: #fff; }

/* Chips del expediente */
.chip-fallecido { border-color: rgba(200, 208, 216, .55); color: #D9DEE3; background: rgba(160, 170, 180, .1); }
.chip-cuerpo { display: inline-flex; align-items: center; gap: 6px; color: var(--c); border-color: color-mix(in srgb, var(--c) 60%, transparent);
  background: color-mix(in srgb, var(--c) 9%, transparent); }
.chip-cuerpo .icono-farol { width: 14px; height: 14px; }

/* Expediente general del personaje */
.boton-ruta.boton-expediente { border-color: var(--linea-fuerte); background: rgba(var(--acento-rgb), .08); margin-top: 8px; }
.boton-ruta.boton-expediente b, .boton-ruta.boton-expediente i { color: var(--cian); text-shadow: 0 0 10px rgba(var(--acento-rgb), .8); }
.boton-ruta.boton-expediente span { color: var(--texto); }
.boton-ruta.boton-expediente:hover { background: rgba(var(--acento-rgb), .18); }
a.boton-principal.boton-web { box-sizing: border-box; text-align: center; text-decoration: none; background: transparent; border-color: var(--linea-fuerte); color: var(--cian); margin-top: 10px; }
a.boton-principal.boton-web:hover { background: rgba(var(--acento-rgb), .12); color: #fff; }
.nota.nota-arriba { margin: 4px 0 2px; }
.tarjeta-lugar .icono-lugar { font: 700 13px var(--titulos) !important; letter-spacing: 1px; }

/* ============================================================
   FASE 2 · 17.11.2026 — leyenda plegable, sonido,
   entrada al archivo, holograma, hilos, exploración y logros
============================================================ */
/* ---------- Leyendas plegables (pestaña abajo; se abren hacia arriba) ---------- */
#leyenda.plegable, #leyendaExtra.plegable, #leyendaTierra.plegable { padding: 0; width: auto; max-width: 300px; }
.plegable.abierta { width: 290px; }
.leyenda-cabeza { display: flex; align-items: center; }
#leyendaExtra .leyenda-pestana:hover { background: none; }
.leyenda-pestana, #leyendaExtra .leyenda-pestana { flex: 1; width: auto; display: flex; align-items: center; gap: 10px; padding: 9px 14px; background: none; border: 0; cursor: pointer; white-space: nowrap;
  font: 600 11px var(--titulos); letter-spacing: 2.6px; text-transform: uppercase; color: var(--acento); text-align: left; }
#leyendaExtra .leyenda-pestana { color: #C9B6FF; }
.leyenda-pestana i { font-style: normal; font-size: 12px; transition: transform .3s; }
.plegable.abierta .leyenda-pestana i { transform: rotate(180deg); }
.leyenda-pestana:hover { color: var(--texto); }
.plegable .leyenda-chincheta, #leyendaExtra.plegable .leyenda-chincheta { display: none; width: 30px; height: 30px; margin-right: 6px; place-items: center; background: none; border: 1px solid transparent; border-radius: 2px; color: var(--suave); cursor: pointer; }
.plegable.abierta .leyenda-chincheta, #leyendaExtra.plegable.abierta .leyenda-chincheta { display: grid; width: 30px; padding: 0; }
.leyenda-chincheta svg { width: 15px; height: 15px; transform: rotate(35deg); transition: transform .2s; }
.leyenda-chincheta:hover { color: var(--texto); border-color: var(--linea); }
.plegable.fijada .leyenda-chincheta { color: var(--acento); border-color: var(--linea-fuerte); background: rgba(var(--acento-rgb), .1); }
.plegable.fijada .leyenda-chincheta svg { transform: rotate(0deg); }
.leyenda-cuerpo { display: none; padding: 12px 16px 6px; max-height: calc(100vh - 230px); overflow: auto; border-bottom: 1px solid var(--linea); }
.plegable.abierta .leyenda-cuerpo { display: block; animation: leyendaAbre .28s ease-out; }
@keyframes leyendaAbre { from { opacity: 0; transform: translateY(8px); } }

/* ---------- Altavoz ---------- */
#botonSonido { flex: none; width: 42px; height: 42px; display: grid; place-items: center; cursor: pointer; border-radius: 3px; color: var(--suave);
  background: var(--cristal); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border: 1px solid var(--linea); }
#botonSonido svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
#botonSonido .altavoz { fill: currentColor; fill-opacity: .25; }
#botonSonido .ondas { display: none; }
#botonSonido.activo { color: var(--acento); border-color: var(--linea-fuerte); box-shadow: 0 0 14px rgba(var(--acento-rgb), .25); }
#botonSonido.activo .ondas { display: inline; animation: ondas 1.6s ease-in-out infinite; }
#botonSonido.activo .tachado { display: none; }
#botonSonido:hover { color: var(--texto); }
@keyframes ondas { 50% { opacity: .45; } }

/* ---------- Exploración y logros ---------- */
#exploracion { position: fixed; top: 82px; left: 16px; z-index: 5; display: flex; align-items: center; gap: 10px; padding: 7px 12px; border-radius: 3px;
  background: var(--cristal); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border: 1px solid var(--linea);
  font: 600 10.5px var(--titulos); letter-spacing: 2px; text-transform: uppercase; color: var(--suave); pointer-events: auto; }
#exploracion b { color: var(--texto); font-weight: 700; letter-spacing: 1.4px; }
#exploracion em { width: 64px; height: 3px; background: rgba(var(--acento-rgb), .15); border-radius: 2px; overflow: hidden; }
#exploracion i { display: block; height: 100%; background: var(--acento); box-shadow: 0 0 6px var(--acento); transform-origin: left; transform: scaleX(0); transition: transform .8s ease; }
body.modo-extra #exploracion, body.modo-tierra #exploracion, body.en-recorrido #exploracion { display: none; }
#logro { position: fixed; top: 84px; left: 50%; z-index: 12; transform: translate(-50%, -14px); opacity: 0; pointer-events: none; text-align: center;
  padding: 10px 22px 11px; border-radius: 3px; background: var(--cristal-fuerte); border: 1px solid var(--linea-fuerte);
  box-shadow: 0 0 30px rgba(var(--acento-rgb), .25), inset 0 0 18px rgba(var(--acento-rgb), .08); transition: opacity .45s, transform .45s; }
#logro.visible { opacity: 1; transform: translate(-50%, 0); }
#logro small { display: block; font: 600 10px var(--titulos); letter-spacing: 3px; text-transform: uppercase; color: var(--acento); }
#logro strong { display: block; margin-top: 2px; font: 700 16px var(--titulos); letter-spacing: 2px; text-transform: uppercase; color: var(--texto); }
.etiqueta.sin-explorar:not(.oculta):not(.seleccionada):not(.hover) { opacity: .62; }
.etq-sistema.sin-explorar:not(.oculta) .etq-nombre { opacity: .72; }
#listaIndice .indice-salto button { border-bottom: 1px solid var(--linea); margin-bottom: 4px; }
#listaIndice .indice-salto b { width: 9px; text-align: center; color: var(--acento); text-shadow: 0 0 10px var(--acento); font-size: 14px; }
#listaIndice .indice-salto strong { color: var(--acento); }

/* ---------- Hilos de conexión ---------- */
.rotulo-hilo { pointer-events: none; transform: translateY(-14px); white-space: nowrap; transition: opacity .3s; }
.rotulo-hilo span { font: 600 10px var(--titulos); letter-spacing: 1.6px; text-transform: uppercase; color: var(--c);
  padding: 2px 7px; border-radius: 2px; background: rgba(2, 6, 14, .7); border: 1px solid color-mix(in srgb, var(--c) 35%, transparent); text-shadow: 0 0 6px #000; }

/* ---------- Holograma del personaje ---------- */
.holograma { position: relative; height: 250px; margin: 14px 22px 0; overflow: hidden; border: 1px solid var(--linea); border-radius: 2px;
  background: radial-gradient(ellipse at 50% 92%, color-mix(in srgb, var(--c) 22%, transparent), transparent 60%),
    repeating-linear-gradient(0deg, rgba(var(--acento-rgb), .05) 0 1px, transparent 1px 18px),
    repeating-linear-gradient(90deg, rgba(var(--acento-rgb), .05) 0 1px, transparent 1px 18px), rgba(2, 6, 14, .7); }
.holograma canvas { position: absolute; inset: 0; display: block; }
.holo-rotulo { position: absolute; top: 8px; left: 10px; z-index: 1; font: 600 9.5px var(--titulos); letter-spacing: 2px; text-transform: uppercase; color: var(--c); opacity: .85; }
.holo-cargando { position: absolute; inset: 0; display: grid; place-items: center; font: 600 11px var(--titulos); letter-spacing: 3px; text-transform: uppercase; color: var(--suave); animation: ondas 1.2s infinite; }
.holograma.cargado .holo-cargando { display: none; }
.holograma.sin-figura .holo-cargando { animation: none; }
.holograma.sin-figura .holo-cargando::after { content: " · no disponible"; }

/* ---------- Entrada al archivo ---------- */
#introCine { position: fixed; inset: 0; z-index: 20; display: grid; place-items: center; align-content: center; gap: 26px; pointer-events: auto; cursor: pointer; opacity: 0; transition: opacity .6s; }
#introCine.visible { opacity: 1; }
#introCine.fuera { opacity: 0; transition: opacity .9s; pointer-events: none; }
.ic-velo { position: absolute; inset: 0; background: radial-gradient(circle at 50% 50%, rgba(2, 8, 22, .78), rgba(0, 0, 0, .95) 70%); transition: opacity 1.6s ease; }
#introCine.abrir .ic-velo { opacity: 0; }
.ic-anillo { position: relative; width: min(300px, 46vw); height: min(300px, 46vw); filter: drop-shadow(0 0 12px rgba(var(--acento-rgb), .8)); transition: transform 1.8s cubic-bezier(.5, 0, .2, 1), opacity 1.6s; }
#introCine.abrir .ic-anillo { transform: scale(3.2); opacity: 0; }
.ic-anillo circle, .ic-anillo line { fill: none; stroke: var(--acento); }
.ic-a1 { stroke-width: 1.6; stroke-dasharray: 541; stroke-dashoffset: 541; animation: icTraza 1.6s .1s ease-out forwards; }
.ic-a2 { stroke-width: .8; stroke-dasharray: 6 5; opacity: .7; transform-origin: 100px 100px; animation: icGira 9s linear infinite; }
.ic-a3 { stroke-width: .6; stroke-dasharray: 90 40 20 40; opacity: .55; transform-origin: 100px 100px; animation: icGira 14s linear infinite reverse; }
.ic-marcas line { stroke-width: 1.2; opacity: 0; animation: icAparece .5s .9s forwards; }
.ic-nucleo { fill: var(--acento); opacity: 0; animation: icAparece .4s 1.2s forwards, icLatido 1.4s 1.6s ease-in-out infinite; }
@keyframes icTraza { to { stroke-dashoffset: 0; } }
@keyframes icGira { to { transform: rotate(360deg); } }
@keyframes icAparece { to { opacity: 1; } }
@keyframes icLatido { 50% { opacity: .45; } }
.ic-terminal { position: relative; min-height: 120px; font: 600 13px "Courier New", monospace; letter-spacing: 2.4px; color: var(--cian); text-align: left; transition: opacity 1s; }
#introCine.abrir .ic-terminal { opacity: 0; }
.ic-terminal p { margin: 0 0 6px; overflow: hidden; white-space: nowrap; width: 0; border-right: 2px solid var(--cian);
  animation: icEscribe .45s steps(var(--n)) forwards, icCursor .5s .45s forwards; }
.ic-terminal p:first-child { color: var(--texto); }
.ic-terminal p:last-child { color: var(--acento); }
@keyframes icEscribe { to { width: calc(var(--n) * 1ch + var(--n) * 2.4px); } }
@keyframes icCursor { to { border-color: transparent; } }
.ic-saltar { position: absolute; bottom: 28px; left: 0; right: 0; text-align: center; font: 600 10.5px var(--titulos); letter-spacing: 3px; text-transform: uppercase; color: var(--suave); opacity: .7; }

.holo-flecha { position: absolute; top: 50%; left: 6px; z-index: 2; width: 30px; height: 44px; transform: translateY(-50%); cursor: pointer; border-radius: 2px;
  font: 400 26px/1 var(--titulos); color: var(--c); background: rgba(2, 6, 14, .55); border: 1px solid color-mix(in srgb, var(--c) 35%, transparent); }
.holo-flecha.sig { left: auto; right: 6px; }
.holo-flecha:hover { background: color-mix(in srgb, var(--c) 18%, transparent); color: #fff; }
.holo-version { position: absolute; top: 24px; left: 10px; z-index: 1; font: 600 9.5px var(--titulos); letter-spacing: 1.6px; text-transform: uppercase; color: var(--texto); opacity: .85; }

/* ---------- Recorridos: datos rápidos, voz y música (17.11.2026) ---------- */
.rec-datos { position: absolute; right: max(4vw, 28px); top: calc(8.5vh + 74px); width: min(330px, 36vw); margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 8px; pointer-events: none; }
.rec-dato { position: relative; overflow: hidden; padding: 9px 14px 10px 16px; background: rgba(5, 13, 19, .62); border: 1px solid var(--linea); border-left: 2px solid var(--acento); border-radius: 2px;
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); opacity: 0; transform: translateX(26px) scale(.96);
  transition: opacity .38s ease, transform .5s cubic-bezier(.2, 1.4, .3, 1); }
.rec-dato.entra { opacity: 1; transform: none; }
.rec-dato.sale { opacity: 0; transform: translateX(14px); transition: opacity .35s, transform .35s; }
.rec-dato::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .14), transparent); transform: translateX(-100%); pointer-events: none; }
.rec-dato.entra::after { animation: recBrillo .9s ease-out .1s both; }
@keyframes recBrillo { to { transform: translateX(100%); } }
.rec-dato b { display: block; font: 700 30px/1 var(--titulos); letter-spacing: 1px; color: var(--acento); text-shadow: 0 0 16px color-mix(in srgb, var(--acento) 55%, transparent); font-variant-numeric: tabular-nums; }
.rec-dato span { display: block; margin-top: 3px; font: 600 12.5px/1.25 var(--titulos); letter-spacing: 1.6px; text-transform: uppercase; color: var(--texto); }
.rec-dato small { display: block; margin-top: 3px; font: 500 11.5px/1.35 var(--cuerpo); color: var(--suave); }
.rec-dato em { display: block; margin-top: 4px; font: 500 9.5px var(--cuerpo); font-style: normal; letter-spacing: .6px; text-transform: uppercase; color: var(--suave); opacity: .75; }
.rec-dato.etiqueta { padding: 7px 14px 8px 16px; }
.rec-dato.etiqueta span { margin: 0; color: var(--acento); letter-spacing: 1.8px; font-size: 11px; }
.rec-dato.tono-peligro { border-left-color: var(--peligro); }
.rec-dato.tono-peligro span { color: var(--peligro); }
body.recorrido-pausa .rec-datos { opacity: 0; transition: opacity .3s; }

.rec-barra > .rec-icono { display: grid; place-items: center; padding: 0 7px; }
.rec-icono svg { width: 19px; height: 19px; }
.rec-icono .tachado { display: none; }
.rec-icono.apagado { color: var(--suave); opacity: .6; }
.rec-icono.apagado .tachado { display: inline; }
.rec-icono.apagado .ondas { display: none; }
.rec-icono:not(.apagado) { color: var(--acento); }

.rec-aviso-sonido { position: absolute; left: 50%; top: calc(8.5vh + 18px); transform: translateX(-50%); padding: 8px 16px; border-radius: 20px; cursor: pointer;
  background: rgba(5, 13, 19, .8); border: 1px solid var(--linea-fuerte); font: 600 12px var(--titulos); letter-spacing: 1.6px; text-transform: uppercase; color: var(--texto);
  animation: recLatido 1.8s ease-in-out infinite; }
.rec-aviso-sonido[hidden] { display: none; }

@media (max-width: 900px) { .rec-datos { width: 46vw; top: calc(8.5vh + 60px); } .rec-dato b { font-size: 24px; } }
@media (prefers-reduced-motion: reduce) { .rec-dato { transition: opacity .3s; transform: none; } .rec-dato.entra::after { animation: none; } }

/* ---------- Recorridos: imagen de la etapa (archivo) ---------- */
.rec-imagen { position: absolute; left: max(4vw, 28px); top: calc(8.5vh + 74px); width: min(280px, 30vw); margin: 0; padding: 8px 8px 10px; background: rgba(5, 13, 19, .66);
  border: 1px solid var(--linea); border-top: 2px solid var(--acento); border-radius: 2px; backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  opacity: 0; transform: translateX(-22px) scale(.97); transition: opacity .5s ease, transform .7s cubic-bezier(.2, 1.2, .3, 1); pointer-events: none; }
.rec-imagen.visible { opacity: 1; transform: none; }
.rec-imagen img { display: block; width: 100%; max-height: 38vh; object-fit: cover; object-position: center top; border-radius: 1px; filter: saturate(.92) contrast(1.03); }
.rec-imagen figcaption { margin-top: 7px; font: 600 10.5px var(--titulos); letter-spacing: 1.4px; text-transform: uppercase; color: var(--suave); line-height: 1.35; }
.rec-imagen figcaption:empty { display: none; }
body.recorrido-pausa .rec-imagen { opacity: 0; }

/* Paradas de ruta completa: solo las marcas de la ruta, sin el resto de nombres */
body.en-recorrido.rec-vista-ruta:not(.recorrido-pausa) .capa-etiquetas > :not(.marca-ruta) { opacity: 0 !important; transition: opacity .6s; }
/* Títulos largos (relaciones de las rutas biográficas) */
.rec-titulo.largo { max-width: min(640px, 62vw); }
.rec-titulo.largo strong { font-size: clamp(26px, 3.1vw, 44px); letter-spacing: 3.5px; line-height: 1.06; }
/* El botón de recorrido, con una ruta abierta, ofrece la película de la ruta */
#botonRecorrido.es-ruta { color: var(--aviso); border-color: rgba(255, 179, 71, .55); }

/* ---------- Atlas de la Tierra · entradas procesadas y capas por continuidad (chat 2, 18.11.2026) ---------- */
.etq-kml.etq-entrada .etq-t-punto { transform: none; width: 9px; height: 9px; border-radius: 50%; background: rgba(255,179,71,.25); border: 2px solid var(--aviso); box-shadow: 0 0 10px rgba(255,179,71,.9); }
.etq-kml.etq-entrada .etq-t-texto b { color: #FFE2B8; }
.etq-kml.etq-entrada .etq-t-texto small { color: var(--aviso); filter: none; }
.rotulo-entradas { margin: 18px 22px 0; font: 600 11px var(--titulos); letter-spacing: 2.6px; text-transform: uppercase; color: var(--aviso); }
.selector-continuidad { display: flex; gap: 6px; margin: 10px 22px 2px; }
.selector-continuidad button { flex: 1; padding: 6px 10px; cursor: pointer; font: 600 12px var(--titulos); letter-spacing: 1.6px; text-transform: uppercase; color: var(--suave); background: rgba(255,179,71,.05); border: 1px solid rgba(255,179,71,.3); border-radius: 2px; }
.selector-continuidad button.activa { color: #02040a; background: var(--aviso); border-color: var(--aviso); }
.selector-continuidad button:not(.activa):hover { color: var(--aviso); background: rgba(255,179,71,.14); }
.avatar.avatar-etapa { width: 44px; height: 44px; color: var(--aviso); border: 1px solid rgba(255,179,71,.5); background: rgba(255,179,71,.08); font-size: 16px; }
.etapa-relacion { font: 600 16px var(--titulos); letter-spacing: .6px; color: var(--aviso); margin: 12px 0 6px; }
.lista-fuentes, .lista-enlaces { margin: 0; padding-left: 18px; font-size: 13px; line-height: 1.6; }
.lista-enlaces { padding: 8px 0 0 18px; }
.lista-enlaces a, .miembro h4 a { color: var(--texto); text-decoration: none; }
.lista-enlaces a small, .miembro h4 a small { color: var(--suave); font-size: 11px; letter-spacing: .4px; }
.lista-enlaces a:hover, .miembro h4 a:hover { color: var(--acento); }
.grupo.miembro h4 { text-transform: none; letter-spacing: .6px; font-size: 13px; color: var(--texto); }
.boton-ruta.boton-enlace { text-decoration: none; box-sizing: border-box; }
.boton-ruta.boton-enlace b { color: var(--acento); text-shadow: none; }
.tarjeta.tarjeta-kml { width: calc(100% - 44px); margin: 12px 22px 0; }
.tarjeta.tarjeta-kml .avatar { width: 40px; height: 40px; color: var(--c); }
.muestra-ruta { display: inline-block; width: 16px; height: 2px; margin: 0 8px 3px 0; vertical-align: middle; background: repeating-linear-gradient(90deg, var(--aviso) 0 5px, transparent 5px 8px); box-shadow: 0 0 6px var(--aviso); }
#leyendaTierra .ley-ruta { width: 16px; }
/* El panel de capas no llegaba a mostrarse nunca (solo tenía display: none) */
body.modo-tierra #panelCapas:not([hidden]) { display: block; }

/* ---------- Lugares reales en detalle (Hollywood: OpenStreetMap + Sentinel-2) ---------- */
.ley-detalle { width: 16px; height: 12px; background: linear-gradient(0deg, #C8C0B4 0 45%, transparent 45%) 0 100% / 4px 100% no-repeat, linear-gradient(0deg, #A9B3BD 0 80%, transparent 80%) 6px 100% / 4px 100% no-repeat, linear-gradient(0deg, #C8C0B4 0 60%, transparent 60%) 12px 100% / 4px 100% no-repeat; border-bottom: 2px solid #9FD4FF; }
.etq-kml.etq-sitio .etq-t-punto { width: 6px; height: 6px; border-radius: 50%; transform: none; background: #E9D6A8; border: 1px solid rgba(0,0,0,.5); box-shadow: 0 0 6px rgba(233,214,168,.7); }
.etq-kml.etq-sitio .etq-t-texto b { font-size: 11.5px; color: #F4E8CC; letter-spacing: .01em; }
.etq-kml.etq-sitio .etq-t-texto small { color: #CDBB8E; filter: none; text-transform: lowercase; }
/* Marcadores de la zona de detalle: lugar real (Hollywood, en grande) y edificio de una entrada (Astro Films) */
.etq-kml.etq-detalle-lugar { margin-left: -13px; margin-top: -18px; gap: 9px; }
.etq-kml.etq-detalle-lugar .etq-t-punto { width: 22px; height: 22px; transform: none; border-radius: 50%; background: radial-gradient(circle, var(--c) 0 4px, rgba(94,200,255,.16) 5px); border: 2px solid var(--c); box-shadow: 0 0 16px var(--c), inset 0 0 8px rgba(94,200,255,.5); animation: latidoLugar 2.4s ease-in-out infinite; }
.etq-kml.etq-detalle-lugar .etq-t-texto b { font-size: 21px; letter-spacing: 3px; text-transform: uppercase; color: #E6F7FF; }
.etq-kml.etq-detalle-lugar .etq-t-texto small { font-size: 10.5px; color: var(--c); filter: none; }
@keyframes latidoLugar { 50% { box-shadow: 0 0 26px var(--c), inset 0 0 10px rgba(94,200,255,.7); } }
.etq-kml.etq-detalle-edificio .etq-t-punto { width: 11px; height: 11px; transform: none; border-radius: 2px; background: rgba(124,240,176,.25); border: 2px solid var(--c); box-shadow: 0 0 10px var(--c); }
.etq-kml.etq-detalle-edificio .etq-t-texto b { color: #D9FFE9; }
.etq-kml.etq-detalle-edificio .etq-t-texto small { color: var(--c); filter: none; }
.ley-lugar-detalle { width: 11px; height: 11px; border-radius: 50%; border: 2px solid #5EC8FF; box-shadow: 0 0 6px #5EC8FF; }
.ley-edificio-entrada { width: 9px; height: 9px; border-radius: 2px; border: 2px solid #7CF0B0; box-shadow: 0 0 6px #7CF0B0; }
.ley-organizacion { width: 9px; height: 9px; border-radius: 50%; border: 2px solid #FFB347; box-shadow: 0 0 6px #FFB347; }
@media (prefers-reduced-motion: reduce) { .etq-kml.etq-detalle-lugar .etq-t-punto { animation: none; } }

/* ---------- Jerarquía de ubicaciones (criterio del usuario, 18.11.2026): un color y un tamaño por nivel ---------- */
.etq-kml.etq-nivel .etq-t-punto { transform: none; border-radius: 50%; background: color-mix(in srgb, var(--c) 28%, transparent); border: 2px solid var(--c); box-shadow: 0 0 10px var(--c); }
.etq-kml.etq-nivel .etq-t-texto small { color: var(--c); filter: none; }
.etq-kml.etq-nivel-pais { margin-left: -10px; margin-top: -12px; gap: 8px; }
.etq-kml.etq-nivel-pais .etq-t-punto { width: 18px; height: 18px; background: radial-gradient(circle, var(--c) 0 3px, color-mix(in srgb, var(--c) 22%, transparent) 4px); box-shadow: 0 0 16px var(--c); }
.etq-kml.etq-nivel-pais .etq-t-texto b { font-size: 17px; letter-spacing: 2.6px; color: #EAF2FF; }
.etq-kml.etq-nivel-estado { margin-left: -8px; margin-top: -10px; }
.etq-kml.etq-nivel-estado .etq-t-punto { width: 13px; height: 13px; }
.etq-kml.etq-nivel-estado .etq-t-texto b { font-size: 14px; letter-spacing: 1.8px; color: #F1EAFF; }
.etq-kml.etq-nivel-ciudad .etq-t-punto { width: 10px; height: 10px; border-radius: 2px; }
.etq-kml.etq-nivel-ciudad .etq-t-texto b { font-size: 12.5px; color: #E4FFFA; }
.etq-kml.etq-nivel-barrio .etq-t-punto { width: 8px; height: 8px; border-width: 1.5px; }
.etq-kml.etq-nivel-barrio .etq-t-texto b { font-size: 11.5px; letter-spacing: .9px; color: #F0FFE4; }
.etq-kml.etq-nivel-edificio .etq-t-punto { width: 0; height: 0; border-radius: 0; background: none; border: 0; border-left: 4.5px solid transparent; border-right: 4.5px solid transparent; border-bottom: 8px solid var(--c); box-shadow: none; filter: drop-shadow(0 0 4px var(--c)); }
.etq-kml.etq-nivel-edificio .etq-t-texto b { font-size: 11px; letter-spacing: .8px; }
/* Personajes y organizaciones: puntitos pequeños de su color */
.etq-kml.etq-actor .etq-t-punto { width: 6px; height: 6px; transform: none; border-radius: 50%; background: var(--c); border: 1px solid rgba(0,0,0,.55); box-shadow: 0 0 7px var(--c); }
.etq-kml.etq-actor .etq-t-texto b { font-size: 10.5px; letter-spacing: .6px; color: color-mix(in srgb, var(--c) 35%, #fff); }
.etq-kml.etq-actor .etq-t-texto small { color: var(--c); filter: none; font-size: 8.5px; }
/* El marcador de Hollywood sigue su nivel (barrio), con un latido porque abre el mapa de detalle */
.etq-kml.etq-detalle-lugar { margin-left: -5px; margin-top: -8px; gap: 6px; }
.etq-kml.etq-detalle-lugar .etq-t-punto { width: 11px; height: 11px; background: color-mix(in srgb, var(--c) 30%, transparent); border: 2px solid var(--c); box-shadow: 0 0 10px var(--c); animation: latidoLugar 2.4s ease-in-out infinite; }
.etq-kml.etq-detalle-lugar .etq-t-texto b { font-size: 13px; letter-spacing: 1.4px; text-transform: none; color: #F0FFE4; }
.etq-kml.etq-detalle-edificio .etq-t-texto b { color: #F4F8FC; }
/* Leyenda */
.ley-nivel { width: var(--t); height: var(--t); border-radius: 50%; border: 2px solid var(--c); background: color-mix(in srgb, var(--c) 28%, transparent); box-shadow: 0 0 6px var(--c); }
.ley-actor { width: 6px; height: 6px; border-radius: 50%; background: var(--c); box-shadow: 0 0 6px var(--c); margin: 0 3px; }
/* Desplegable del contenido de un lugar */
.arbol { list-style: none; margin: 0; padding: 0 0 0 14px; border-left: 1px solid rgba(255,255,255,.08); }
.arbol.arbol-raiz { padding-left: 0; border-left: 0; }
.arbol li { margin: 2px 0; }
.arbol details > summary { list-style: none; cursor: pointer; display: flex; align-items: center; }
.arbol details > summary::-webkit-details-marker { display: none; }
.arbol details > summary::before { content: "▸"; width: 14px; flex: none; color: var(--suave); font-size: 11px; transition: transform .15s; }
.arbol details[open] > summary::before { transform: rotate(90deg); }
.arbol li > .nodo-arbol { margin-left: 14px; }
.nodo-arbol { display: flex; align-items: baseline; gap: 8px; width: calc(100% - 14px); padding: 5px 8px; border: 0; border-radius: 4px; background: transparent; color: #EAF2FF; font: 500 13.5px var(--cuerpo); text-align: left; cursor: pointer; }
.nodo-arbol:hover, .nodo-arbol:focus-visible { background: color-mix(in srgb, var(--c) 14%, transparent); outline: none; }
.nodo-arbol .punto-nivel { width: 8px; height: 8px; flex: none; align-self: center; border-radius: 50%; border: 2px solid var(--c); box-shadow: 0 0 6px var(--c); }
.nodo-arbol.nodo-actor .punto-nivel { width: 6px; height: 6px; border: 0; background: var(--c); }
.nodo-arbol.nodo-actor { font-size: 12.5px; color: color-mix(in srgb, var(--c) 30%, #fff); }
.nodo-arbol small { margin-left: auto; color: var(--c); font: 500 10px var(--cuerpo); letter-spacing: .6px; text-transform: uppercase; white-space: nowrap; }

/* ---------- Ficha de un punto de una entrada (quién es y qué pasó en ese sitio) ---------- */
.grupo-aqui h4 { color: var(--aviso); }
.etapa-aqui { margin: 0 0 14px; padding: 12px 12px 10px; border: 1px solid rgba(255,179,71,.28); border-left: 3px solid var(--aviso); background: rgba(255,179,71,.05); }
.etapa-aqui-cab { display: flex; gap: 12px; align-items: center; margin-bottom: 8px; }
.etapa-aqui-cab small { display: block; font: 600 10.5px var(--titulos); letter-spacing: 1.8px; text-transform: uppercase; color: var(--suave); }
.etapa-aqui-cab strong { display: block; font: 600 15px var(--titulos); letter-spacing: .4px; color: var(--aviso); line-height: 1.3; margin-top: 2px; }
.etapa-aqui .avatar-etapa { flex: none; display: grid; place-items: center; font: 600 16px var(--titulos); }
.etapa-aqui .chips { margin: 0 0 6px; }
.etapa-aqui .nota { margin-top: 10px; }
.desplegable-fuentes { margin: 8px 0 0; font-size: 12.5px; color: var(--suave); }
.desplegable-fuentes summary { cursor: pointer; font: 600 10.5px var(--titulos); letter-spacing: 2px; text-transform: uppercase; color: var(--acento); }
.desplegable-fuentes summary b { color: var(--texto, #fff); margin-left: 4px; }
.desplegable-fuentes ul { margin-top: 6px; }
.tarjeta.tarjeta-mini { margin-top: 10px; padding: 7px 10px; min-height: 0; font: 600 11px var(--titulos); letter-spacing: 1.6px; text-transform: uppercase; color: var(--aviso); }
.grupo .tarjeta .avatar-etapa { font-size: 12px; min-width: 44px; width: auto; padding: 0 4px; }

/* ---------- Personajes y organizaciones con presencia (se ven desde lejos) ---------- */
.etq-kml.etq-actor .etq-t-punto { width: 11px; height: 11px; background: radial-gradient(circle, #fff 0 1.5px, var(--c) 2.5px); border: 1.5px solid rgba(0,0,0,.6); box-shadow: 0 0 0 2px color-mix(in srgb, var(--c) 45%, transparent), 0 0 12px var(--c); }
.etq-kml.etq-actor .etq-t-texto b { font-size: 12.5px; letter-spacing: .8px; color: color-mix(in srgb, var(--c) 25%, #fff); text-shadow: 0 0 6px rgba(0,0,0,.9), 0 1px 2px #000; }
.etq-kml.etq-actor .etq-t-texto small { font-size: 9px; }
/* Cabecera con foto de la Enciclopedia */
.cabecera-imagen.cabecera-figura { background: #05080F; }
.cabecera-figura .fondo-difuso { position: absolute; inset: -20px; width: calc(100% + 40px); height: calc(100% + 40px); object-fit: cover; filter: blur(18px) saturate(1.2) brightness(.55); }
.cabecera-figura img:not(.fondo-difuso) { position: relative; object-fit: contain; object-position: center; }
.cabecera-imagen.cabecera-portada img { object-position: center 25%; }

/* ---------- Google Earth 3D (prueba) ---------- */
#panelCapas .etq-prueba { font: 600 9px var(--titulos); letter-spacing: 1.6px; color: var(--aviso); border: 1px solid rgba(255,179,71,.5); padding: 1px 5px; margin-left: 6px; }
.clave-google { display: flex; gap: 6px; margin: 6px 0 4px; }
.clave-google input { flex: 1; min-width: 0; background: rgba(0,0,0,.35); border: 1px solid var(--linea); color: inherit; padding: 6px 8px; font: 12px var(--texto-fuente, Inter, sans-serif); }
.clave-google button { background: rgba(var(--acento-rgb), .12); border: 1px solid var(--linea-fuerte); color: inherit; padding: 6px 10px; cursor: pointer; font: 600 11px var(--titulos); letter-spacing: 1.4px; text-transform: uppercase; }
#estadoGoogle.estado-activo { color: #9BE15D; }
#estadoGoogle.estado-error { color: #FF8A7A; }

/* ============================================================
   UNIVERSO LIMPIO · 19.11.2026 (pedido de Marcos)
   Al entrar casi sin nombres: el sistema se nombra al pasar el ratón,
   los sectores en gris pequeño bajo su anillo, opciones y ayuda en un botón.
============================================================ */
.etq-sistema .etq-sub { display: none; }
.etq-sistema .etq-nombre { font-size: 13px; letter-spacing: 2px; }
.rotulo-sector-universo { transform: translateY(16px); font: 600 10px var(--titulos); letter-spacing: 3px; text-transform: uppercase;
  color: rgba(170, 182, 198, .55); text-shadow: 0 0 6px #000; }
.rotulo-sector-universo:hover { color: rgba(220, 228, 238, .95); }
.rotulo-custodio { transition: opacity .25s; }
/* Cuerpos de Lanterns: un punto de su color, sin dibujo */
.icono-farol { display: inline-block; width: 8px !important; height: 8px !important; border-radius: 50%; background: currentColor; vertical-align: 1px !important; box-shadow: 0 0 6px currentColor; filter: none !important; }
.ley-tonos { display: inline-flex; width: auto; height: auto; gap: 2px; border-radius: 0; }
.ley-tonos i { width: 7px; height: 7px; border-radius: 50%; }
#listaIndice .indice-sector button { all: unset; cursor: pointer; }
#listaIndice .indice-sector button:hover { color: var(--texto); }
#resultados .punto.sector { background: transparent; border: 1.5px dashed var(--c); box-shadow: none; }
/* Opciones y ayuda escondidas tras un botón */
#ayuda { display: none; }
#controles { bottom: 58px; }
/* El botón «Recorrido guiado» sigue a la vista; lo demás, al abrir Opciones */
body:not(.opciones-abiertas) #controles > :not(#botonRecorrido) { display: none; }
body.opciones-abiertas #ayuda { display: block; top: auto; bottom: 116px; left: 50%; right: auto; transform: translateX(-50%); text-align: center; white-space: nowrap; }
#botonOpciones { position: fixed; left: 50%; bottom: 16px; transform: translateX(-50%); z-index: 5; background: rgba(4, 10, 20, .6); border: 1px solid var(--linea);
  border-radius: 3px; padding: 7px 14px; cursor: pointer; font: 600 11px var(--titulos); letter-spacing: 2px; text-transform: uppercase; color: var(--suave); opacity: .7; transition: opacity .3s; }
#botonOpciones:hover, body.opciones-abiertas #botonOpciones { opacity: 1; color: var(--texto); }
#botonOpciones i { font-style: normal; display: inline-block; margin-left: 4px; transition: transform .3s; }
body.opciones-abiertas #botonOpciones i { transform: rotate(180deg); }
body.modo-extra #botonOpciones, body.modo-tierra #botonOpciones, body.en-recorrido #botonOpciones,
body.modo-tierra.opciones-abiertas #controles, body.modo-tierra.opciones-abiertas #ayuda,
body.en-recorrido.opciones-abiertas #ayuda { display: none; }
@media (max-width: 900px) { body.opciones-abiertas #ayuda { display: none; } #controles { top: auto; } }

/* ---------- Mapa planetario: cartografía oficial (Krypton, póster «Map of Krypton») ---------- */
.mp-sello.oficial { color: #9FE8C4; border-color: rgba(159, 232, 196, .5); }
.mp-pie b.oficial { color: #9FE8C4; }
.mp-vistas { display: flex; gap: 4px; margin-left: auto; }
.mp-vistas:empty { display: none; }
.mp-vistas + .mp-sello { margin-left: 8px; }
.mp-vistas button { font: 600 10.5px var(--titulos); letter-spacing: 1.4px; text-transform: uppercase; padding: 4px 9px; border: 1px solid var(--linea); border-radius: 2px; background: rgba(2, 6, 10, .6); cursor: pointer; color: var(--suave); }
.mp-vistas button.activa { color: var(--acento); border-color: var(--acento); }
.mp-rotulo { position: absolute; transform: translate(-50%, -50%); pointer-events: none; white-space: nowrap; font: italic 600 10px var(--titulos); letter-spacing: 1.6px; text-transform: uppercase; text-shadow: 0 0 6px #000, 0 0 2px #000; opacity: .7; }
.mp-rotulo.mar { color: #9fd6ea; }
.mp-rotulo.region { color: #f0e2b8; font-style: normal; }
.mp-rotulo.continente { color: #ffffff; font-size: 11px; letter-spacing: 3px; }
.mp-marcador.numerado { transform: translate(-50%, -50%); }
.mp-marcador.numerado i { transform: none; width: 17px; height: 17px; border-radius: 50%; background: #c8352b; border: 1.5px solid #1a0a08;
  font: 700 9.5px/14px var(--titulos); font-style: normal; color: #fff; text-align: center; box-shadow: 0 0 0 2px rgba(0, 0, 0, .35), 0 0 10px var(--c); }
.mp-marcador.numerado:hover i, .mp-marcador.numerado.activo i { transform: scale(1.3); background: var(--c); color: #071016; }
.mp-marcador.numerado b { position: absolute; bottom: 100%; margin-bottom: 4px; }
@media (max-width: 700px) { .mp-rotulo { font-size: 8px; letter-spacing: 1px; } .mp-rotulo.region { display: none; } }

/* ---------- Botón «Enciclopedia» (cabecera, en todos los modos) ---------- */
#botonEnciclopedia { flex: none; height: 42px; display: flex; align-items: center; gap: 7px; padding: 0 13px 0 11px; border-radius: 3px;
  color: var(--suave); text-decoration: none; white-space: nowrap; font: 600 11px var(--titulos); letter-spacing: 1.8px; text-transform: uppercase;
  background: var(--cristal); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border: 1px solid var(--linea);
  transition: color .2s, border-color .2s, box-shadow .2s; }
#botonEnciclopedia svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
#botonEnciclopedia:hover { color: var(--texto); border-color: var(--linea-fuerte); box-shadow: 0 0 14px rgba(var(--acento-rgb), .2); }
#botonEnciclopedia:focus-visible { outline: 1px solid var(--acento); outline-offset: 2px; }
#botonEnciclopedia:not([href]) { display: none; }
@media (max-width: 1500px) { #botonEnciclopedia span { display: none; } #botonEnciclopedia { width: 42px; padding: 0; justify-content: center; } }

/* ============================================================
   LÍNEA DEL TIEMPO POR ERAS (JS/eras.js · DATOS/eras.js)
   Franja inferior: Pre-Crisis · Post-Crisis (Edad Moderna) · Futuro,
   con sus etapas en pequeño (solo referencia). A la izquierda, el botón
   «Pasado» cuando el sector tiene un momento histórico.
============================================================ */
#lineaEras { position: fixed; left: 50%; bottom: 14px; transform: translateX(-50%); z-index: 5; display: flex; align-items: stretch; }
.eras-franja { display: flex; gap: 3px; padding: 4px; border-radius: 3px; background: var(--cristal); border: 1px solid var(--linea);
  backdrop-filter: blur(14px) saturate(1.2); -webkit-backdrop-filter: blur(14px) saturate(1.2); }
#lineaEras .era { --c: #2FA8F2; display: grid; grid-template-columns: auto auto; align-items: baseline; column-gap: 10px; row-gap: 5px; text-align: left;
  min-width: 128px; padding: 7px 12px 6px; cursor: pointer; background: none; border: 1px solid transparent; border-radius: 2px;
  color: var(--suave); opacity: .62; transition: opacity .25s, background .25s, border-color .25s; }
#lineaEras .era[data-era="postcrisis"] { min-width: 220px; }
#lineaEras .era:hover { opacity: .9; }
#lineaEras .era.activa { opacity: 1; color: var(--texto); border-color: color-mix(in srgb, var(--c) 70%, transparent);
  background: linear-gradient(180deg, color-mix(in srgb, var(--c) 20%, transparent), color-mix(in srgb, var(--c) 6%, transparent));
  box-shadow: 0 0 18px color-mix(in srgb, var(--c) 22%, transparent); }
.era-nombre { font: 700 13px var(--titulos); letter-spacing: 2px; text-transform: uppercase; white-space: nowrap; }
.era.activa .era-nombre { color: color-mix(in srgb, var(--c) 55%, #fff); }
.era-nombre em { font-style: normal; font-weight: 600; opacity: .75; }
.era-fechas { font: 600 10px var(--titulos); letter-spacing: 1.2px; text-align: right; white-space: nowrap; opacity: .8; }
.era-etapas { grid-column: 1 / -1; display: flex; gap: 2px; height: 5px; }
.era-etapas i { position: relative; flex: 1; background: var(--t, var(--c)); opacity: .55; border-radius: 1px; }
.era.activa .era-etapas i { opacity: .95; }
.era-etapas i.difusa { background: linear-gradient(90deg, color-mix(in srgb, var(--c) 80%, transparent), transparent); }
/* El nombre de cada etapa, solo al pasar el ratón por la era activa */
.era-etapas i span { position: absolute; left: 50%; bottom: 9px; transform: translateX(-50%); font: 600 9px var(--titulos); letter-spacing: 1px;
  white-space: nowrap; color: var(--texto); opacity: 0; pointer-events: none; transition: opacity .2s; text-shadow: 0 0 4px #000, 0 0 2px #000; }
.era-etapas i.difusa span { display: none; }
#lineaEras .era.activa:hover .era-etapas i span { opacity: .9; }
#lineaEras .era.activa:hover .era-nombre, #lineaEras .era.activa:hover .era-fechas { opacity: .15; }

#botonPasado { position: absolute; right: calc(100% + 10px); bottom: 0; display: flex; align-items: center; gap: 10px; padding: 8px 14px 8px 12px;
  cursor: pointer; text-align: left; width: max-content; max-width: 250px; border-radius: 3px; color: #F6D9A8; background: rgba(28, 18, 6, .72);
  border: 1px solid rgba(255, 190, 110, .55); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 0 16px rgba(255, 170, 80, .18); animation: pasado-entra .5s ease-out; }
#botonPasado[hidden] { display: none; }
#botonPasado b { font-size: 15px; color: #FFC27A; }
#botonPasado small { display: block; white-space: nowrap; font: 600 9.5px var(--titulos); letter-spacing: 1.8px; text-transform: uppercase; opacity: .7; }
#botonPasado strong { display: block; font: 700 13px var(--titulos); letter-spacing: 1px; }
#botonPasado:hover { border-color: #FFC27A; }
#botonPasado.activo { background: rgba(255, 176, 80, .2); border-color: #FFC27A; box-shadow: 0 0 22px rgba(255, 176, 80, .35); }
@keyframes pasado-entra { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
/* En el pasado, un velo cálido muy suave en los bordes de la pantalla */
body.en-pasado #escena::after { content: ""; position: fixed; inset: 0; pointer-events: none;
  background: radial-gradient(ellipse at center, transparent 55%, rgba(120, 70, 20, .22) 100%); }

/* Sitio para la franja: lo de abajo sube un poco y «Opciones» va a la esquina */
#botonOpciones { left: auto; right: 16px; transform: none; }
#controles { bottom: 92px; }
body.opciones-abiertas #ayuda { bottom: 140px; }
#barraRuta, #barraRuta.plegada { bottom: 142px; }
.chip-era { border-color: rgba(176, 124, 255, .45); }
body.modo-extra #lineaEras, body.modo-tierra #lineaEras, body.en-recorrido #lineaEras { display: none; }
@media (max-width: 900px) {
  #lineaEras { left: 8px; right: 8px; transform: none; bottom: 8px; }
  .eras-franja { flex: 1; }
  #lineaEras .era, #lineaEras .era[data-era="postcrisis"] { min-width: 0; flex: 1; grid-template-columns: 1fr; padding: 6px 8px; }
  .era-nombre em, .era-fechas { display: none; }
  #botonPasado { right: 0; bottom: calc(100% + 8px); }
  #botonOpciones { bottom: 70px; }
}
@media (min-width: 901px) and (max-width: 1320px) {
  #botonPasado { right: auto; left: 0; bottom: calc(100% + 8px); }
  #controles { bottom: 150px; }
  #barraRuta, #barraRuta.plegada { bottom: 200px; }
}
@media (max-width: 900px) {
  body:has(#botonPasado:not([hidden])) #controles { bottom: 186px; }
  body:has(#botonPasado:not([hidden])) #botonOpciones { bottom: 136px; }
}
