/* Panamá por venir · mapa interactivo. Tipografías de la marca FARO (Travesía), servidas desde el sitio. */

@font-face { font-family: 'Barlow Condensed'; src: url('../assets/fuentes/BarlowCondensed-Medium.woff2') format('woff2'); font-weight: 500; font-display: swap; }
@font-face { font-family: 'Barlow Condensed'; src: url('../assets/fuentes/BarlowCondensed-SemiBold.woff2') format('woff2'); font-weight: 600; font-display: swap; }
@font-face { font-family: 'Familjen Grotesk'; src: url('../assets/fuentes/FamiljenGrotesk-Regular.woff2') format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Familjen Grotesk'; src: url('../assets/fuentes/FamiljenGrotesk-SemiBold.woff2') format('woff2'); font-weight: 600; font-display: swap; }
@font-face { font-family: 'Familjen Grotesk'; src: url('../assets/fuentes/FamiljenGrotesk-Bold.woff2') format('woff2'); font-weight: 700; font-display: swap; }
/* Alias para los rótulos del mapa: MapLibre dibuja el texto con la familia que lleva el nombre de la pila. */
@font-face { font-family: 'MapaSemi'; src: url('../assets/fuentes/BarlowCondensed-SemiBold.woff2') format('woff2'); font-weight: 400; font-display: block; }
@font-face { font-family: 'MapaMedio'; src: url('../assets/fuentes/BarlowCondensed-Medium.woff2') format('woff2'); font-weight: 400; font-display: block; }

:root {
  --fondo: #0b0f16;
  --fondo-2: #121824;
  --fondo-3: #1a2233;
  --borde: rgba(168, 205, 255, 0.14);
  --borde-2: rgba(168, 205, 255, 0.28);
  --texto: #f3f6fb;
  --texto-2: #b4bfd2;
  --texto-3: #8490a8;
  --hielo: #a8cdff;
  --cobalto: #3f6cf0;
  --nuevo: #ffd21e;
  --obra: #ff8a1f;
  --porvenir: #a97bff;
  --confirmar: #9aa3b8;
  --panel: 368px;
  --riel: 58px;
  --izq: var(--panel);
  --alto-tiempo: 104px;
  --cond: 'Barlow Condensed', 'Arial Narrow', sans-serif;
  --texto-f: 'Familjen Grotesk', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --suave: cubic-bezier(0.22, 1, 0.36, 1);
}

* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body {
  background: var(--fondo); color: var(--texto); font: 400 14px/1.4 var(--texto-f);
  -webkit-font-smoothing: antialiased; overflow: hidden; overscroll-behavior: none;
}
body.plegado, body.intro { --izq: 0px; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
a { color: var(--hielo); }
ul, ol { list-style: none; margin: 0; padding: 0; }
h1, h2, h3, p, dl, dd { margin: 0; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--hielo); outline-offset: 2px; }
svg.i { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
svg.i.lleno { fill: currentColor; stroke: none; }

#mapa { position: fixed; top: 0; right: 0; bottom: 0; left: var(--izq); background: #2b83ab; }
.maplibregl-canvas { outline: none; }

/* ------------------------------------------------------------------ piezas comunes */

.cuadro {
  width: 40px; height: 40px; display: grid; place-items: center; flex: none;
  background: rgba(11, 15, 22, 0.93); border: 1px solid var(--borde); border-radius: 3px; color: var(--texto);
  transition: background 0.16s, border-color 0.16s, color 0.16s;
}
.cuadro:hover { background: var(--fondo-3); border-color: var(--borde-2); }
.cuadro[aria-pressed='true'] { background: #fff; color: var(--fondo); border-color: #fff; }

.boton {
  height: 36px; padding: 0 14px; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 1px solid rgba(255, 255, 255, 0.3); border-radius: 3px; color: #fff; background: transparent;
  font: 600 14.5px/1 var(--cond); letter-spacing: 0.09em; text-transform: uppercase; white-space: nowrap;
  transition: background 0.16s, border-color 0.16s, color 0.16s;
}
.boton:hover { background: rgba(255, 255, 255, 0.09); border-color: rgba(255, 255, 255, 0.55); }
.boton.lleno, .boton[aria-pressed='true'] { background: #fff; color: var(--fondo); border-color: #fff; }
.boton.lleno:hover { background: var(--hielo); border-color: var(--hielo); }
.boton.marca-borde {
  border-color: transparent;
  background: linear-gradient(var(--fondo), var(--fondo)) padding-box, linear-gradient(90deg, var(--cobalto), var(--hielo)) border-box;
}
.boton.marca-borde:hover { background: linear-gradient(var(--fondo-3), var(--fondo-3)) padding-box, linear-gradient(90deg, var(--cobalto), var(--hielo)) border-box; }

.blip { width: 30px; height: 30px; flex: none; display: block; }

/* ------------------------------------------------------------------ panel */

#panel {
  position: fixed; z-index: 10; top: 0; bottom: 0; left: 0; width: var(--panel);
  background: var(--fondo); border-right: 1px solid var(--borde);
  display: flex; flex-direction: column; transition: transform 0.42s var(--suave);
}
body.plegado #panel, body.intro #panel { transform: translateX(-101%); }

.cabecera { height: 66px; flex: none; display: flex; align-items: center; gap: 12px; padding: 0 12px 0 14px; border-bottom: 1px solid var(--borde); }
.marca { display: grid; place-items: center; width: 34px; flex: none; }
.titulo { min-width: 0; flex: 1; display: grid; gap: 4px; }
.titulo strong { font: 600 24px/0.95 var(--cond); letter-spacing: 0.045em; text-transform: uppercase; white-space: nowrap; }
.titulo span { font-size: 10.5px; line-height: 1; letter-spacing: 0.15em; text-transform: uppercase; color: var(--texto-3); white-space: nowrap; }
#plegar { width: 34px; height: 34px; background: transparent; }
#abrir-panel { position: fixed; z-index: 9; top: 14px; left: 14px; opacity: 0; pointer-events: none; transition: opacity 0.2s; }
body.plegado:not(.intro) #abrir-panel { opacity: 1; pointer-events: auto; }

.cuerpo { flex: 1; min-height: 0; display: grid; grid-template-columns: var(--riel) minmax(0, 1fr); }
.riel { border-right: 1px solid var(--borde); display: flex; flex-direction: column; padding-top: 6px; }
.riel button {
  position: relative; height: 58px; display: grid; place-items: center; align-content: center; gap: 5px; color: var(--texto-3);
  font: 500 10px/1 var(--cond); letter-spacing: 0.06em; text-transform: uppercase; transition: color 0.16s, background 0.16s;
}
.riel button:hover { color: #fff; background: rgba(255, 255, 255, 0.04); }
.riel button[aria-selected='true'] { color: #fff; background: rgba(168, 205, 255, 0.08); }
.riel button[aria-selected='true']::before { content: ''; position: absolute; left: 0; top: 10px; bottom: 10px; width: 2px; background: var(--hielo); }
.riel button b { position: absolute; top: 9px; right: 9px; min-width: 15px; height: 15px; padding: 0 3px; display: grid; place-items: center; font: 600 10.5px/1 var(--cond); background: var(--nuevo); color: var(--fondo); border-radius: 2px; letter-spacing: 0; }
.riel svg.i { width: 20px; height: 20px; }

.vistas { min-width: 0; min-height: 0; }
.vista, .rueda { overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: #2a3448 transparent; }
.vista { height: 100%; padding: 14px 14px 22px; }
.vista::-webkit-scrollbar, .rueda::-webkit-scrollbar { width: 8px; }
.vista::-webkit-scrollbar-thumb, .rueda::-webkit-scrollbar-thumb { background: #2a3448; border: 2px solid var(--fondo); border-radius: 4px; }
/* Capas: buscador y botones fijos arriba, la lista corre en medio, el pie queda fijo. */
.vista.fija { display: flex; flex-direction: column; padding: 0; overflow: hidden; }
.vista.fija[hidden] { display: none; }
.tope { flex: none; padding: 14px 14px 12px; border-bottom: 1px solid var(--borde); }
.rueda { flex: 1; min-height: 0; padding: 0 14px 20px; }
.pie-panel { flex: none; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding: 10px 14px 12px; border-top: 1px solid var(--borde); }
.pie-panel .boton { padding: 0 8px; }

.buscar { position: relative; display: block; }
.buscar svg.i { position: absolute; left: 12px; top: 11px; color: var(--texto-3); pointer-events: none; }
.buscar input {
  width: 100%; height: 40px; padding: 0 36px 0 38px; background: var(--fondo-2); border: 1px solid var(--borde); border-radius: 3px;
  font-size: 14px; color: #fff; transition: border-color 0.16s, background 0.16s;
}
.buscar input::placeholder { color: var(--texto-3); }
.buscar input:hover { border-color: var(--borde-2); }
.buscar input:focus { outline: none; border-color: var(--hielo); background: #151c2a; }
.buscar input::-webkit-search-cancel-button { display: none; }
.buscar .limpiar { position: absolute; right: 4px; top: 4px; width: 32px; height: 32px; display: grid; place-items: center; color: var(--texto-2); }
.buscar .limpiar:hover { color: #fff; }

.pareja { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 10px; }
.ajustes { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; margin-top: 8px; align-items: center; }
.selector { position: relative; }
.selector select {
  width: 100%; height: 36px; padding: 0 30px 0 12px; appearance: none; -webkit-appearance: none; background: var(--fondo-2);
  border: 1px solid var(--borde); border-radius: 3px; font: 600 13.5px/1 var(--cond); letter-spacing: 0.09em; text-transform: uppercase; color: #fff; cursor: pointer;
}
.selector select:hover { border-color: var(--borde-2); }
.selector svg.i { position: absolute; right: 9px; top: 10px; width: 16px; height: 16px; pointer-events: none; color: var(--texto-2); }
.casilla { display: inline-flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--texto-2); cursor: pointer; user-select: none; white-space: nowrap; }
.casilla input { position: absolute; opacity: 0; pointer-events: none; }
.casilla i { width: 16px; height: 16px; border: 1px solid rgba(255, 255, 255, 0.4); border-radius: 2px; display: grid; place-items: center; transition: background 0.16s, border-color 0.16s; }
.casilla input:checked + i { background: #fff; border-color: #fff; }
.casilla input:checked + i::after { content: ''; width: 8px; height: 4px; border-left: 2px solid var(--fondo); border-bottom: 2px solid var(--fondo); transform: translateY(-1px) rotate(-45deg); }
.casilla input:focus-visible + i { outline: 2px solid var(--hielo); outline-offset: 2px; }
.casilla:hover { color: #fff; }

.grupo { margin-top: 18px; }
.grupos > .grupo:first-child { margin-top: 8px; }
.grupo-cab { display: flex; align-items: center; height: 34px; border-bottom: 1px solid var(--borde); }
.grupo-nombre { flex: 1; min-width: 0; height: 100%; display: flex; align-items: baseline; gap: 8px; padding-top: 9px; text-align: left; font: 600 15px/1 var(--cond); letter-spacing: 0.11em; text-transform: uppercase; color: #fff; }
.grupo-nombre small { font: 500 13px/1 var(--cond); letter-spacing: 0.04em; color: var(--texto-3); }
.grupo-cab .mini { width: 30px; height: 30px; display: grid; place-items: center; color: var(--texto-2); border-radius: 3px; }
.grupo-cab .mini:hover { color: #fff; background: rgba(255, 255, 255, 0.06); }
.grupo-cab .mini svg.i { width: 17px; height: 17px; transition: transform 0.2s; }
.grupo.cerrado .giro svg.i { transform: rotate(-90deg); }
.grupo.cerrado .filas { display: none; }
.grupo.apagado .grupo-nombre { color: var(--texto-3); }

.fila-cab { display: flex; align-items: center; border-radius: 3px; }
.fila-cab:hover { background: rgba(255, 255, 255, 0.045); }
.fila-ver { flex: 1; min-width: 0; height: 38px; display: flex; align-items: center; gap: 8px; padding: 0 4px 0 2px; text-align: left; }
.fila-n { flex: 1; min-width: 0; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fila-c { font: 500 14.5px/1 var(--cond); letter-spacing: 0.03em; color: var(--texto-2); font-variant-numeric: tabular-nums; }
.fila-abrir { width: 30px; height: 38px; display: grid; place-items: center; color: var(--texto-3); }
.fila-abrir:hover { color: #fff; }
.fila-abrir svg.i { width: 15px; height: 15px; transition: transform 0.2s; }
.fila.abierta .fila-abrir svg.i { transform: rotate(90deg); }
.fila.apagada .fila-ver { opacity: 0.36; }
.fila.vacia .fila-c { color: var(--texto-3); }
.linea-color { width: 30px; height: 30px; flex: none; display: grid; place-items: center; }
.linea-color i { width: 20px; height: 6px; border-radius: 1px; box-shadow: 0 0 0 1.5px #05080d; }

.lista { margin: 2px 0 10px 16px; border-left: 1px solid var(--borde); }
.lista li button { width: 100%; display: grid; gap: 1px; padding: 6px 8px 6px 14px; text-align: left; border-radius: 0 3px 3px 0; }
.lista li button:hover { background: rgba(255, 255, 255, 0.05); }
.lista li button[aria-current='true'] { background: rgba(168, 205, 255, 0.1); box-shadow: inset 2px 0 0 var(--hielo); }
.lista b { font-weight: 400; font-size: 13.5px; line-height: 1.25; }
.lista small { font-size: 11.5px; color: var(--texto-3); line-height: 1.3; }
.lista .sub-cab { padding: 9px 8px 3px 14px; font: 600 11.5px/1 var(--cond); letter-spacing: 0.12em; text-transform: uppercase; color: var(--texto-3); }
.lista .nota-lista { padding: 6px 8px 4px 14px; font-size: 11.5px; color: var(--texto-3); line-height: 1.35; }
.punto-fase { display: inline-block; width: 8px; height: 8px; border-radius: 2px; margin-right: 6px; box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.5); vertical-align: 1px; }

.resultados { margin-top: 12px; }
.res { width: 100%; display: flex; align-items: center; gap: 8px; padding: 5px 6px 5px 2px; text-align: left; border-radius: 3px; }
.res:hover, .res:focus-visible { background: rgba(255, 255, 255, 0.06); }
.res span { min-width: 0; display: grid; }
.res b { font-weight: 400; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.res small { font-size: 11.5px; color: var(--texto-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vacio { margin-top: 18px; font-size: 13.5px; color: var(--texto-2); line-height: 1.5; }

.acciones-vista { display: grid; margin-top: 22px; }
.cab-vista { font: 600 20px/1 var(--cond); letter-spacing: 0.08em; text-transform: uppercase; margin: 4px 0 6px; }
.bajada { font-size: 13px; color: var(--texto-2); line-height: 1.5; }

.agenda-anio { margin-top: 18px; }
.agenda-anio > button { width: 100%; display: flex; align-items: baseline; gap: 10px; padding-bottom: 6px; border-bottom: 1px solid var(--borde); text-align: left; }
.agenda-anio > button strong { font: 600 24px/1 var(--cond); letter-spacing: 0.03em; }
.agenda-anio > button span { font-size: 11.5px; color: var(--texto-3); letter-spacing: 0.08em; text-transform: uppercase; }
.agenda-anio.activo > button strong { color: var(--nuevo); }
.agenda-anio .resultados { margin-top: 6px; }

.texto-largo { font-size: 13px; color: var(--texto-2); line-height: 1.55; }
.texto-largo h3 { font: 600 14px/1 var(--cond); letter-spacing: 0.12em; text-transform: uppercase; color: #fff; margin: 20px 0 8px; }
.texto-largo p + p { margin-top: 8px; }
.texto-largo ul { display: grid; gap: 7px; }
.texto-largo li { padding-left: 12px; position: relative; }
.texto-largo li::before { content: ''; position: absolute; left: 0; top: 0.62em; width: 4px; height: 4px; background: var(--texto-3); }
.clave { display: grid; gap: 7px; }
.clave li { display: flex; align-items: center; gap: 8px; padding: 0; }
.clave li::before { display: none; }
.clave .blip { width: 26px; height: 26px; }

/* ------------------------------------------------------------------ controles del mapa */

#controles { position: fixed; z-index: 5; right: 14px; top: 50%; transform: translateY(-50%); display: flex; flex-direction: column; gap: 6px; transition: opacity 0.4s; }
#controles .hueco { height: 8px; }
#controles .modo { height: auto; padding: 7px 0 6px; gap: 4px; align-content: center; font: 600 9.5px/1 var(--cond); letter-spacing: 0.08em; text-transform: uppercase; }
#lectura {
  position: fixed; z-index: 2; right: 14px; bottom: calc(var(--alto-tiempo) + 22px); font: 500 13px/1 var(--cond); letter-spacing: 0.1em; text-transform: uppercase;
  color: #fff; background: rgba(11, 15, 22, 0.86); padding: 6px 9px 5px; border-radius: 2px; white-space: nowrap; pointer-events: none; transition: opacity 0.4s;
}
#lectura:empty { display: none; }
#lectura b { font-weight: 600; }
/* créditos y coordenadas van sobre una franja oscura, como la lectura del mapa del juego: se leen sobre cualquier fondo */
#creditos { position: fixed; z-index: 2; left: calc(var(--izq) + 14px); bottom: calc(var(--alto-tiempo) + 22px); font-size: 10.5px; line-height: 1; color: rgba(255, 255, 255, 0.92); background: rgba(11, 15, 22, 0.86); padding: 6px 8px; border-radius: 2px; white-space: nowrap; transition: left 0.42s var(--suave), bottom 0.5s var(--suave); }
body.intro #creditos { left: auto; right: 14px; bottom: 10px; }
#creditos a { color: inherit; }

#rotulo {
  position: fixed; z-index: 14; left: 0; top: 0; pointer-events: none; opacity: 0; transition: opacity 0.12s;
  background: rgba(11, 15, 22, 0.95); border: 1px solid var(--borde-2); border-radius: 3px; padding: 6px 10px 6px; max-width: 280px;
}
#rotulo.visible { opacity: 1; }
#rotulo b { display: block; font: 600 14.5px/1.1 var(--cond); letter-spacing: 0.05em; text-transform: uppercase; }
#rotulo span { display: block; margin-top: 3px; font-size: 11.5px; color: var(--texto-2); }

#aviso {
  position: fixed; z-index: 40; top: 16px; left: calc(var(--izq) + (100vw - var(--izq)) / 2); transform: translate(-50%, -12px);
  background: #fff; color: var(--fondo); font-weight: 600; font-size: 13px; padding: 9px 14px; border-radius: 3px; opacity: 0; pointer-events: none;
  transition: opacity 0.2s, transform 0.2s; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
}
#aviso.visible { opacity: 1; transform: translate(-50%, 0); }

/* ------------------------------------------------------------------ línea de tiempo */

#tiempo {
  position: fixed; z-index: 5; bottom: 14px; left: calc(var(--izq) + (100vw - var(--izq)) / 2); transform: translateX(-50%);
  width: min(1180px, calc(100vw - var(--izq) - 32px));
  background: #0b0f16; border: 1px solid var(--borde); border-radius: 4px; box-shadow: 0 14px 40px rgba(0, 0, 0, 0.38);
  display: grid; grid-template-columns: auto auto minmax(0, 1fr); column-gap: 14px; align-items: center; padding: 9px 16px 8px 10px;
  transition: opacity 0.4s, transform 0.5s var(--suave), left 0.42s var(--suave);
}
#reproducir { width: 44px; height: 44px; }
.anio { display: grid; gap: 4px; width: 82px; }   /* ancho fijo: la pista no se corre al cambiar de año */
.anio strong { font: 600 42px/0.86 var(--cond); letter-spacing: 0.01em; font-variant-numeric: tabular-nums; }
.anio span { font-size: 10px; line-height: 1.1; letter-spacing: 0.1em; text-transform: uppercase; color: var(--texto-2); white-space: nowrap; }
.pista { position: relative; height: 52px; cursor: pointer; touch-action: none; user-select: none; -webkit-user-select: none; }
.pista:focus-visible { outline-offset: 4px; }
.cols { display: flex; height: 100%; }
.col { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; }
.col i { width: min(62%, 16px); min-height: 2px; background: rgba(255, 255, 255, 0.3); border-radius: 1px 1px 0 0; transition: background 0.2s; }
.col.anuncio i { background: repeating-linear-gradient(135deg, rgba(255, 255, 255, 0.42) 0 2px, rgba(255, 255, 255, 0.08) 2px 4px); }
.col.activo i { background: var(--nuevo); }
.col.activo.anuncio i { background: repeating-linear-gradient(135deg, var(--nuevo) 0 2px, rgba(255, 210, 30, 0.22) 2px 4px); }
.col b { width: 100%; margin-top: 4px; padding-top: 5px; border-top: 1px solid rgba(255, 255, 255, 0.22); text-align: center; font: 500 12px/1 var(--cond); letter-spacing: 0.04em; color: var(--texto-3); font-variant-numeric: tabular-nums; transition: color 0.2s; }
.col.activo b { color: #fff; font-weight: 600; }
.col.hoy b { color: var(--hielo); }
.col.activo.hoy b { color: #fff; }
.col:hover i { background: rgba(255, 255, 255, 0.6); }
.col.activo:hover i { background: var(--nuevo); }
.cursor { position: absolute; top: 0; bottom: 17px; width: 0; border-left: 1px solid var(--nuevo); pointer-events: none; transition: left 0.28s var(--suave); }
.cursor::before { content: ''; position: absolute; top: 0; left: -5px; width: 9px; height: 9px; background: var(--nuevo); border-radius: 2px; }
.leyenda { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; gap: 5px 18px; margin-top: 7px; padding-top: 7px; border-top: 1px solid var(--borde); font-size: 11.5px; color: var(--texto-2); }
.leyenda li { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.leyenda i { width: 10px; height: 10px; border-radius: 2px; box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.6); flex: none; }
.leyenda i.hueco { background: #161d2a !important; box-shadow: inset 0 0 0 2px #fff, 0 0 0 1px rgba(0, 0, 0, 0.6); }
.leyenda i.raya { height: 0; width: 14px; border-top: 2px dashed #fff; box-shadow: none; border-radius: 0; }
.leyenda .fin { margin-left: auto; color: var(--texto-3); }

/* ------------------------------------------------------------------ ficha */

.ficha {
  width: 348px; max-width: calc(100vw - 20px); max-height: min(610px, calc(100vh - var(--alto-tiempo) - 124px)); display: flex; flex-direction: column;
  background: var(--fondo); border: 1px solid rgba(168, 205, 255, 0.24); border-radius: 4px; overflow: hidden; color: var(--texto);
  box-shadow: 0 22px 60px rgba(0, 0, 0, 0.55); font: 400 14px/1.4 var(--texto-f); position: relative;
}
.ficha-foto { position: relative; flex: none; height: 168px; background: var(--fondo-2); }
.ficha-foto img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ficha-foto::after { content: ''; position: absolute; inset: auto 0 0 0; height: 46px; background: linear-gradient(transparent, rgba(11, 15, 22, 0.72)); }
.ficha-foto span { position: absolute; z-index: 1; left: 12px; bottom: 7px; right: 12px; font-size: 10px; color: rgba(255, 255, 255, 0.86); }
.ficha-cerrar { position: absolute; z-index: 2; top: 8px; right: 8px; width: 30px; height: 30px; background: rgba(11, 15, 22, 0.88); }
.ficha-cuerpo { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 14px 16px 12px; scrollbar-width: thin; scrollbar-color: #2a3448 transparent; }
.ficha.sin-foto .ficha-cuerpo { padding-top: 16px; }
.ficha.sin-foto .ficha-tipo { padding-right: 34px; }
.ficha-tipo { display: flex; align-items: center; gap: 7px; font: 500 12.5px/1.15 var(--cond); letter-spacing: 0.12em; text-transform: uppercase; color: var(--texto-2); }
.ficha-tipo .blip { width: 28px; height: 28px; margin: -3px 0 -3px -4px; }
.ficha-tipo .linea-color { width: 22px; height: 22px; }
.ficha h2 { margin: 8px 0 8px; font: 600 27px/1 var(--cond); letter-spacing: 0.025em; text-transform: uppercase; text-wrap: balance; }
.ficha-estado { display: flex; align-items: baseline; gap: 8px; font-size: 13.5px; line-height: 1.35; color: var(--texto); }
.ficha-estado i { width: 10px; height: 10px; border-radius: 2px; flex: none; transform: translateY(0.5px); box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.6); }
.ficha-estado + .ficha-estado { margin-top: 4px; }
.ficha-estado.tenue { color: var(--texto-2); font-size: 12.5px; }
.datos { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 16px; margin: 14px 0 0; padding: 13px 0; border-top: 1px solid var(--borde); border-bottom: 1px solid var(--borde); }
.datos div { min-width: 0; }
.datos .ancho { grid-column: 1 / -1; }
.datos dt { font-size: 10.5px; line-height: 1; letter-spacing: 0.11em; text-transform: uppercase; color: var(--texto-3); }
.datos dd { margin-top: 5px; font-weight: 600; font-size: 15px; line-height: 1.25; color: #fff; }
.datos dd small { display: block; margin-top: 3px; font-weight: 400; font-size: 11px; line-height: 1.3; color: var(--texto-3); }
.ficha .desc { margin-top: 13px; font-size: 13.5px; line-height: 1.52; color: #c9d2e1; }
.ficha .desc + .desc { margin-top: 8px; }
.ficha h3 { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin: 18px 0 6px; font: 600 13.5px/1 var(--cond); letter-spacing: 0.13em; text-transform: uppercase; color: #fff; }
.ficha h3 small { font: 400 10.5px/1 var(--texto-f); letter-spacing: 0.02em; text-transform: none; color: var(--texto-3); }
.cerca li button { width: calc(100% + 12px); margin: 0 -6px; display: grid; grid-template-columns: 26px minmax(0, 1fr) auto; align-items: center; gap: 8px; padding: 4px 6px; text-align: left; border-radius: 3px; }
.cerca li button:hover { background: rgba(255, 255, 255, 0.06); }
.cerca .blip { width: 26px; height: 26px; }
.cerca .linea-color { width: 26px; height: 26px; }
.cerca span { min-width: 0; display: grid; }
.cerca b { font-weight: 400; font-size: 13px; line-height: 1.25; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cerca small { font-size: 11px; color: var(--texto-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cerca em { font: 500 14px/1 var(--cond); font-style: normal; letter-spacing: 0.03em; color: var(--hielo); white-space: nowrap; }
.amenidades { font-size: 12.5px; line-height: 1.5; color: var(--texto-2); }
.pie-lista { margin-top: 5px; font-size: 11px; line-height: 1.4; color: var(--texto-3); }
.ficha .nota { margin-top: 13px; padding: 1px 0 1px 10px; border-left: 2px solid var(--confirmar); font-size: 12px; line-height: 1.45; color: var(--texto-2); }
.ficha .nota b { color: #fff; font-weight: 600; }
.ficha .fuente { margin-top: 13px; font-size: 11.5px; line-height: 1.5; color: var(--texto-3); }
.ficha .fuente a { color: var(--hielo); text-underline-offset: 2px; }
.ficha .fuente li + li { margin-top: 3px; }
.ficha-pie { flex: none; display: flex; align-items: center; gap: 4px; padding: 7px 8px; border-top: 1px solid var(--borde); background: #0d121b; }
.ficha-pie .accion { width: 34px; height: 34px; display: grid; place-items: center; color: var(--texto-2); border-radius: 3px; }
.ficha-pie .accion:hover { color: #fff; background: rgba(255, 255, 255, 0.07); }
.ficha-pie .accion[aria-pressed='true'] { color: var(--nuevo); }
.ficha-pie .accion[aria-pressed='true'] svg.i { fill: currentColor; }
.paginador { margin-left: auto; display: flex; align-items: center; height: 30px; border: 1px solid rgba(255, 210, 30, 0.6); border-radius: 3px; color: var(--nuevo); font: 600 13.5px/1 var(--cond); letter-spacing: 0.06em; font-variant-numeric: tabular-nums; }
.paginador button { width: 28px; height: 28px; display: grid; place-items: center; }
.paginador button:hover { background: rgba(255, 210, 30, 0.14); }
.paginador svg.i { width: 14px; height: 14px; }
.paginador span { padding: 0 4px; min-width: 52px; text-align: center; }

.maplibregl-popup.ficha-pop { max-width: none !important; z-index: 6; }
.ficha-pop .maplibregl-popup-content { background: none; padding: 0; box-shadow: none; border-radius: 0; }
.ficha-pop .maplibregl-popup-tip { border-width: 9px; }
.ficha-pop.maplibregl-popup-anchor-bottom .maplibregl-popup-tip { border-top-color: #0d121b; }
.ficha-pop.maplibregl-popup-anchor-top .maplibregl-popup-tip { border-bottom-color: var(--fondo); }
.ficha-pop.maplibregl-popup-anchor-left .maplibregl-popup-tip { border-right-color: var(--fondo); }
.ficha-pop.maplibregl-popup-anchor-right .maplibregl-popup-tip { border-left-color: var(--fondo); }
.ficha-pop { animation: sube 0.26s var(--suave); }
@keyframes sube { from { opacity: 0; } to { opacity: 1; } }

/* Ficha acoplada: lo que no tiene un punto que señalar (un tramo, una zona, algo sin ubicación) va junto al panel. */
#hoja { position: fixed; z-index: 12; left: calc(var(--izq) + 16px); top: 16px; transition: left 0.42s var(--suave); }
#hoja:empty { display: none; }
#hoja.der { left: auto; right: 76px; }   /* lo elegido queda al borde oeste del mapa: la ficha se pasa al otro lado */
#hoja .ficha { max-height: min(640px, calc(100vh - var(--alto-tiempo) - 50px)); }
body.plegado #hoja { top: 66px; }
body.plegado #hoja .ficha { max-height: min(640px, calc(100vh - var(--alto-tiempo) - 100px)); }
body.plegado #hoja.der { top: 16px; }
body.plegado #hoja.der .ficha { max-height: min(640px, calc(100vh - var(--alto-tiempo) - 50px)); }

/* ------------------------------------------------------------------ entrada */

#intro { position: fixed; z-index: 30; inset: 0; pointer-events: none; opacity: 0; visibility: hidden; transition: opacity 0.8s, visibility 0s 0.8s; }
body.intro #intro { opacity: 1; visibility: visible; transition: opacity 0.5s; }
.intro-velo { position: absolute; inset: 0; background: linear-gradient(90deg, rgba(6, 9, 15, 0.88) 0%, rgba(6, 9, 15, 0.6) 34%, rgba(6, 9, 15, 0.08) 68%, rgba(6, 9, 15, 0) 100%), linear-gradient(0deg, rgba(6, 9, 15, 0.55) 0%, rgba(6, 9, 15, 0) 36%); }
.intro-texto { position: absolute; left: clamp(22px, 6vw, 104px); bottom: clamp(34px, 11vh, 132px); max-width: 640px; }
.intro-sobre { font: 500 14px/1.2 var(--cond); letter-spacing: 0.22em; text-transform: uppercase; color: var(--hielo); }
#intro h1 { margin: 16px 0 20px; font: 600 clamp(68px, 11.5vw, 176px)/0.83 var(--cond); letter-spacing: -0.005em; text-transform: uppercase; color: #fff; }
.intro-bajada { max-width: 44ch; font-size: clamp(15px, 1.25vw, 18.5px); line-height: 1.5; color: #e3eaf5; }
#explorar { margin-top: 26px; height: 50px; padding: 0 28px; font-size: 17px; pointer-events: auto; }
body.cargando #explorar { opacity: 0.55; pointer-events: none; }
.intro-nota { margin-top: 16px; font-size: 11.5px; color: rgba(255, 255, 255, 0.72); }
body.intro #controles, body.intro #tiempo, body.intro #lectura { opacity: 0; pointer-events: none; }
body.intro #tiempo { transform: translate(-50%, 24px); }
.sin-js { position: fixed; inset: 0; display: grid; place-items: center; background: var(--fondo); z-index: 99; }

/* ------------------------------------------------------------------ pantallas angostas */

@media (max-width: 1500px) {
  .leyenda .fin { display: none; }
}
@media (max-width: 1180px) {
  .col:nth-child(even) b { color: transparent; }
  .col.activo:nth-child(even) b { color: #fff; }
}

@media (max-width: 760px) {
  :root { --izq: 0px; --panel: min(90vw, 370px); }
  body.plegado { --izq: 0px; }
  #mapa { left: 0; }
  #panel { box-shadow: 0 0 0 100vmax rgba(4, 7, 12, 0.5); }
  body.plegado #panel { box-shadow: none; }
  #abrir-panel { top: 10px; left: 10px; width: 44px; height: 44px; }
  #controles { right: 10px; top: 10px; transform: none; gap: 5px; }
  #controles .solo-escritorio { display: none; }
  #lectura { display: none; }
  #creditos { left: 8px; bottom: calc(var(--alto-tiempo) + 14px); }
  body.intro #creditos { left: 8px; right: auto; bottom: 8px; }
  #tiempo { left: 8px; right: 8px; bottom: calc(8px + env(safe-area-inset-bottom)); width: auto; transform: none; grid-template-columns: auto minmax(0, 1fr); column-gap: 10px; padding: 8px 10px 8px 8px; }
  body.intro #tiempo { transform: translateY(24px); }
  #reproducir { width: 40px; height: 40px; }
  .anio { grid-auto-flow: column; align-items: baseline; justify-content: start; gap: 8px; width: auto; }
  .anio strong { font-size: 32px; }
  .pista { grid-column: 1 / -1; height: 46px; margin-top: 6px; }
  .col:nth-child(even) b { color: transparent; }
  .col.activo b { color: #fff !important; }
  .leyenda { gap: 4px 12px; font-size: 10.5px; margin-top: 6px; padding-top: 6px; }
  .leyenda .fin { display: none; }
  #hoja, body.plegado #hoja, #hoja.der { left: 0; right: 0; top: auto; bottom: 0; z-index: 20; }
  #hoja .ficha, body.plegado #hoja .ficha { width: 100%; max-width: none; max-height: min(72vh, 620px); max-height: max(300px, min(72vh, 620px, calc(100dvh - 262px))); border-radius: 10px 10px 0 0; border-width: 1px 0 0; padding-bottom: env(safe-area-inset-bottom); animation: desliza 0.34s var(--suave); }
  #hoja .ficha-foto { height: 132px; }
  #aviso { left: 50%; top: 62px; }
  .intro-texto { right: 20px; }
  .intro-velo { background: linear-gradient(0deg, rgba(6, 9, 15, 0.92) 0%, rgba(6, 9, 15, 0.62) 46%, rgba(6, 9, 15, 0.1) 78%); }
  #rotulo { display: none; }
}
@keyframes desliza { from { transform: translateY(40px); opacity: 0; } to { transform: none; opacity: 1; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
}
