/* ==========================================================================
   Visor de presentaciones — Juan José Forero Hernández
   La pantalla de precarga, la barra de botones, la ayuda (tecla ?), los
   avisos y los colores de los controles de reveal.js. Mismos colores y tipografía que el resto del sitio
   (assets/css/styles.css). Lo usa includes/visor/visor.php.
   ========================================================================== */

/* ---------- 1. Fuente (la del sitio) ---------- */

@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("../../fonts/inter-latin-wght-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("../../fonts/inter-latin-ext-wght-normal.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* ---------- 2. Variables (las del sitio) ---------- */

:root {
  --navy-950: #061238;
  --navy-900: #0a1a4a;
  --navy-800: #0c2766;
  --navy-700: #0b3a83;
  --blue-700: #0a4a9c;
  --blue-600: #1257b5;
  --blue-500: #2a7be0;
  --blue-400: #5aa0ee;
  --blue-300: #93c2f6;
  --blue-200: #c6e0fc;
  --blue-100: #e2effd;
  --blue-50: #eff6fe;

  --text: #252d4f;
  --text-soft: #4a5577;
  --muted: #6a7491;
  --line: #dce8f7;
  --line-strong: #c8dbf3;

  --grad-primary: linear-gradient(180deg, #0d4ca3 0%, #093b85 100%);
  --grad-primary-hover: linear-gradient(180deg, #1159b9 0%, #0a4597 100%);

  --radius-sm: 12px;
  --radius: 16px;
  --radius-lg: 22px;

  --shadow-sm: 0 1px 2px rgb(10 26 74 / 0.05), 0 8px 22px -10px rgb(10 40 100 / 0.18);
  --shadow: 0 2px 4px rgb(10 26 74 / 0.04), 0 22px 44px -20px rgb(10 50 120 / 0.32);
  --shadow-btn: 0 10px 20px -10px rgb(9 60 134 / 0.7);

  --gutter: clamp(16px, 4.5vw, 32px);
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  --font: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  /* el color de los controles de reveal.js: claro sobre fondo oscuro y al revés */
  --acento: #93c2f6;
  --acento-suave: rgb(147 194 246 / 0.22);
}

.visor--claro {
  --acento: #1257b5;
  --acento-suave: rgb(18 87 181 / 0.16);
}

/* ---------- 3. Base ---------- */

*,
*::before,
*::after { box-sizing: border-box; }

html.visor,
html.visor body {
  height: 100%;
  margin: 0;
}

html.visor body {
  background: var(--visor-fondo, #0b1220);
  font-family: var(--font);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

html.visor button { font: inherit; }

html.visor .icon {
  display: inline-block;
  flex-shrink: 0;
  width: 1.15em;
  height: 1.15em;
  vertical-align: middle;
}

:focus-visible {
  outline: 3px solid var(--blue-400);
  outline-offset: 3px;
  border-radius: 6px;
}

/* Mientras carga, la presentación no se ve (reveal.js aún no ha arrancado). */
html.visor:not(.visor--en-marcha):not(.visor--receptor) .reveal { visibility: hidden; }

.visor-sin-js {
  position: fixed;
  inset: auto 16px 16px;
  z-index: 200;
  margin: 0;
  padding: 14px 18px;
  border-radius: 12px;
  background: #fff;
  color: var(--navy-900);
  font-weight: 600;
  text-align: center;
  box-shadow: var(--shadow);
}

.visor-sin-js a { color: var(--blue-700); }

kbd {
  display: inline-grid;
  place-items: center;
  min-width: 26px;
  height: 26px;
  padding: 0 7px;
  border: 1px solid var(--line-strong);
  border-bottom-width: 2px;
  border-radius: 8px;
  background: linear-gradient(180deg, #ffffff 0%, #f3f8ff 100%);
  color: var(--navy-800);
  font: 650 0.78rem/1 var(--font);
  white-space: nowrap;
  box-shadow: 0 1px 0 rgb(10 26 74 / 0.04);
}

/* ---------- 4. Pantalla de precarga ---------- */

.cargador {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  isolation: isolate;
  background:
    radial-gradient(55% 60% at 86% 38%, rgb(226 239 253 / 0.75) 0%, rgb(226 239 253 / 0) 72%),
    linear-gradient(180deg, #ffffff 0%, #f3f8ff 100%);
  color: var(--text);
  transition: opacity 0.6s var(--ease), transform 0.6s var(--ease), visibility 0s linear 0.6s;
}

.cargador--saliendo {
  opacity: 0;
  visibility: hidden;
  transform: scale(1.02);
  pointer-events: none;
}

.cargador[hidden] { display: none; }

/* Ondas de líneas finas, como en la cabecera del sitio */
.cargador__ondas {
  position: absolute;
  left: 0;
  bottom: clamp(8px, 2vw, 26px);
  z-index: -1;
  width: 100%;
  height: clamp(110px, 21vw, 250px);
  pointer-events: none;
  user-select: none;
}

.cargador__cabecera {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  width: 100%;
  max-width: calc(1200px + var(--gutter) * 2);
  margin: 0 auto;
  padding: 18px var(--gutter) 0;
}

.cargador__marca {
  padding: 6px 0;
  font-size: 1.55rem;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.05em;
  color: var(--navy-900);
  text-decoration: none;
  transition: color 0.2s;
}

.cargador__marca:hover { color: var(--blue-700); }

.cargador__ficha {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 0 14px;
  border-radius: 999px;
  color: var(--blue-700);
  font-size: 0.92rem;
  font-weight: 650;
  text-decoration: none;
  transition: background-color 0.2s, color 0.2s;
}

.cargador__ficha:hover { background: var(--blue-50); color: var(--blue-600); }

.cargador__cuerpo {
  flex: 1;
  display: grid;
  align-content: center;
  gap: clamp(22px, 4vw, 60px);
  width: 100%;
  max-width: calc(1200px + var(--gutter) * 2);
  margin: 0 auto;
  padding: clamp(18px, 4vh, 44px) var(--gutter) clamp(70px, 10vw, 130px);
}

@media (min-width: 1000px) {
  .cargador__cuerpo {
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
    align-items: center;
  }
}

.cargador__antetitulo {
  margin: 0;
  font-size: 0.78rem;
  font-weight: 750;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--blue-700);
}

.cargador__titulo {
  margin: 10px 0 0;
  font-size: clamp(1.5rem, 0.95rem + 2vw, 2.4rem);
  font-weight: 800;
  line-height: 1.12;
  letter-spacing: -0.03em;
  color: var(--navy-900);
  text-wrap: balance;
}

.cargador__filete {
  display: block;
  width: 72px;
  height: 3px;
  margin-top: 16px;
  border-radius: 2px;
  background: var(--blue-500);
}

.cargador__autores {
  margin: 14px 0 0;
  font-size: clamp(0.92rem, 0.88rem + 0.2vw, 1.02rem);
  line-height: 1.5;
  color: var(--text-soft);
}

.cargador__autores strong { font-weight: 650; color: var(--navy-900); }

/* La portada, a la derecha (arriba en pantallas estrechas) */
.cargador__portada { margin: 0; }

.cargador__marco {
  position: relative;
  display: block;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: var(--radius-lg);
  background: var(--visor-fondo, #0b1220);
  box-shadow: 0 34px 60px -32px rgb(10 40 100 / 0.6), 0 0 0 1px rgb(10 26 74 / 0.07);
}

.cargador__marco img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cargador__portada figcaption {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
  font-size: 0.86rem;
  color: var(--muted);
}

.cargador__portada figcaption .icon { color: var(--blue-600); }

@media (max-width: 999.98px) {
  .cargador__portada { order: -1; max-width: 520px; }
}

@media (max-width: 639.98px) {
  .cargador__portada { max-width: 64%; }
  .cargador__portada figcaption { display: none; }
  .cargador__marco { border-radius: var(--radius); }
}

.cargador__pie {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 22px;
  margin: 0;
  padding: 0 var(--gutter) 22px;
  font-size: 0.82rem;
  color: var(--text-soft);
}

.cargador__pie span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

@media (hover: none) and (pointer: coarse) {
  .cargador__pie { display: none; }
}

/* La tarjeta del progreso */
.progreso {
  margin-top: clamp(20px, 3.2vh, 32px);
  padding: clamp(18px, 2.4vw, 26px);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: rgb(255 255 255 / 0.94);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  box-shadow: var(--shadow);
}

.progreso__fila {
  display: flex;
  align-items: center;
  gap: clamp(14px, 2vw, 22px);
}

.progreso__cifra {
  flex-shrink: 0;
  min-width: 2.7ch;
  margin: 0;
  font-size: clamp(2.5rem, 1.9rem + 2.3vw, 3.5rem);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.05em;
  font-variant-numeric: tabular-nums;
  background: linear-gradient(180deg, var(--blue-500), var(--navy-800));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.progreso__signo {
  margin-left: 2px;
  font-size: 0.5em;
  letter-spacing: 0;
}

.progreso__resumen { min-width: 0; }

.progreso__estado {
  margin: 0;
  font-weight: 700;
  line-height: 1.35;
  color: var(--navy-900);
}

.progreso__detalle {
  margin: 4px 0 0;
  font-size: 0.86rem;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.progreso__barra {
  position: relative;
  height: 10px;
  margin-top: 16px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--blue-100);
  box-shadow: inset 0 1px 2px rgb(10 40 100 / 0.08);
}

.progreso__relleno {
  position: absolute;
  inset: 0 auto 0 0;
  width: 0;
  overflow: hidden;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--blue-400) 0%, var(--blue-600) 55%, var(--navy-700) 100%);
  /* sin transición: se repinta en cada fotograma y así nunca va por detrás de la cifra */
}

/* Un brillo que recorre la barra mientras descarga */
.progreso__relleno::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(110deg, rgb(255 255 255 / 0) 35%, rgb(255 255 255 / 0.5) 50%, rgb(255 255 255 / 0) 65%);
  background-size: 220% 100%;
  animation: visor-brillo 1.7s linear infinite;
}

.progreso--completo .progreso__relleno::after { animation: none; opacity: 0; }

@keyframes visor-brillo {
  from { background-position: 120% 0; }
  to { background-position: -120% 0; }
}

/* Las fases: miniaturas, vídeos y vídeos invertidos */
.fases {
  display: grid;
  gap: 9px;
  margin: 16px 0 0;
  padding: 14px 0 0;
  border-top: 1px solid var(--line);
  list-style: none;
}

.fase {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  font-size: 0.9rem;
  line-height: 1.35;
  color: var(--text-soft);
}

.fase[hidden] { display: none; }

.fase__icono {
  width: 20px;
  height: 20px;
  border: 2px solid var(--line-strong);
  border-radius: 50%;
}

.fase[data-estado-fase="activa"] .fase__icono {
  border-color: var(--blue-100);
  border-top-color: var(--blue-600);
  animation: visor-giro 0.8s linear infinite;
}

.fase[data-estado-fase="lista"] .fase__icono {
  border-color: var(--blue-600);
  background: var(--blue-600) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") center / 12px no-repeat;
}

.fase[data-estado-fase="error"] .fase__icono {
  border-color: #d14343;
  background: #d14343 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.2' stroke-linecap='round'%3E%3Cpath d='M12 6v7M12 18h.01'/%3E%3C/svg%3E") center / 12px no-repeat;
}

.fase[data-estado-fase="lista"] { color: var(--navy-900); }

.fase__detalle {
  margin-left: 4px;
  font-size: 0.8rem;
  color: var(--muted);
  white-space: nowrap;
}

.fase__pct {
  font-size: 0.85rem;
  font-weight: 650;
  color: var(--navy-800);
  font-variant-numeric: tabular-nums;
}

.fase[data-estado-fase="lista"] .fase__pct { color: var(--blue-700); }
.fase[data-estado-fase="espera"] .fase__pct { color: var(--muted); font-weight: 500; }

@keyframes visor-giro { to { transform: rotate(360deg); } }

.progreso__acciones {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
  animation: visor-aparece 0.45s var(--ease) both;
}

.progreso__acciones[hidden],
.progreso__error[hidden] { display: none; }

@keyframes visor-aparece {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: none; }
}

.progreso__nota {
  margin: 14px 0 0;
  font-size: 0.82rem;
  line-height: 1.5;
  color: var(--muted);
}

.progreso__nota button {
  padding: 0;
  border: 0;
  background: none;
  color: var(--blue-700);
  font-size: inherit;
  font-weight: 600;
  text-decoration: underline;
  text-decoration-color: rgb(18 87 181 / 0.35);
  text-underline-offset: 3px;
  cursor: pointer;
}

.progreso__error {
  margin-top: 16px;
  padding: 14px 16px;
  border: 1px solid #fecdca;
  border-radius: 12px;
  background: #fef3f2;
  color: #b42318;
  font-size: 0.92rem;
}

.progreso__error p { margin: 0; font-weight: 600; }

.progreso__error-acciones {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

/* Botones (los del sitio, en píldora) */
.vboton {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6em;
  min-height: 48px;
  padding: 0 1.4em;
  border: 1.5px solid transparent;
  border-radius: 999px;
  font-size: 0.98rem;
  font-weight: 650;
  line-height: 1.1;
  letter-spacing: -0.005em;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 0.2s, color 0.2s, border-color 0.2s, box-shadow 0.25s, transform 0.25s var(--ease);
}

.vboton:active { transform: translateY(1px); }

.vboton--primario {
  background: #0b4494 linear-gradient(180deg, #0d4ca3 0%, #093b85 100%);
  color: #fff;
  box-shadow: var(--shadow-btn);
}

.vboton--primario:hover {
  background: #0e50a8 linear-gradient(180deg, #1159b9 0%, #0a4597 100%);
  box-shadow: 0 14px 26px -12px rgb(9 60 134 / 0.75);
  transform: translateY(-1px);
}

.vboton--contorno {
  background: #fff;
  border-color: #2b5ca6;
  color: var(--navy-700);
}

.vboton--contorno:hover {
  background: var(--blue-50);
  border-color: var(--blue-600);
  color: var(--blue-700);
}

.vboton--claro {
  min-height: 40px;
  background: #fff;
  border-color: #fda29b;
  color: #b42318;
}

.vboton--claro:hover { background: #fff5f4; }

.vboton--fantasma {
  min-height: 40px;
  background: transparent;
  color: #912018;
}

.vboton--fantasma:hover { background: rgb(180 35 24 / 0.08); }

@media (max-width: 479.98px) {
  .progreso__acciones .vboton { width: 100%; }
}

/* ---------- 5. reveal.js con los colores del sitio ---------- */

.reveal-viewport {
  background: var(--visor-fondo, #0b1220);
  --r-background-color: var(--visor-fondo, #0b1220);
  --r-main-font: var(--font);
  --r-link-color: var(--acento);
  --r-selection-background-color: var(--acento);
}

.reveal .controls { color: var(--acento); }

.reveal .progress {
  height: 4px;
  color: var(--acento);
  background: var(--acento-suave);
}

.reveal .slide-number {
  padding: 6px 10px;
  border-radius: 999px;
  background: rgb(6 18 56 / 0.58);
  color: #fff;
  font: 650 12.5px/1 var(--font);
  font-variant-numeric: tabular-nums;
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}

.reveal .slide-number a { color: inherit; text-decoration: none; }

/* G: el cuadro de «ir a la diapositiva» */
.reveal .jump-to-slide { top: 18px; left: 50%; transform: translateX(-50%); }

.reveal .jump-to-slide-input {
  width: min(300px, 80vw);
  padding: 12px 18px;
  border: 1px solid rgb(255 255 255 / 0.18);
  border-radius: 14px;
  background: rgb(6 18 56 / 0.86);
  color: #fff;
  font: 650 18px/1.2 var(--font);
  text-align: center;
  box-shadow: 0 20px 40px -20px rgb(0 0 0 / 0.7);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}

.reveal .jump-to-slide-input::placeholder { color: rgb(255 255 255 / 0.6); }

/* Cuando el navegador no deja arrancar un vídeo */
.reveal button.r-media-play-button,
.reveal .r-media-play-button {
  padding: 12px 22px;
  border: 0;
  border-radius: 999px;
  background: #0b4494 linear-gradient(180deg, #0d4ca3 0%, #093b85 100%);
  color: #fff;
  font: 650 1rem/1.1 var(--font);
  box-shadow: var(--shadow-btn);
  cursor: pointer;
}

/* El vídeo invertido (⇧R), justo encima del original */
.slide-background-content video.visor-reverso {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  opacity: 0;
}

.slide-background-content video.visor-reverso.is-lista { opacity: 1; }

/* ---------- 6. Barra de botones (abajo a la izquierda) ---------- */

.visor-barra {
  position: fixed;
  left: max(14px, env(safe-area-inset-left));
  bottom: max(14px, env(safe-area-inset-bottom));
  z-index: 40;
  display: flex;
  gap: 4px;
  padding: 5px;
  border: 1px solid rgb(255 255 255 / 0.14);
  border-radius: 999px;
  background: rgb(6 18 56 / 0.58);
  -webkit-backdrop-filter: blur(12px) saturate(1.4);
  backdrop-filter: blur(12px) saturate(1.4);
  box-shadow: 0 12px 30px -14px rgb(0 0 0 / 0.7);
  transition: opacity 0.35s var(--ease), transform 0.35s var(--ease);
}

.visor-barra[hidden] { display: none; }

.visor-barra.is-oculta {
  opacity: 0;
  transform: translateY(10px);
  pointer-events: none;
}

.visor-barra:focus-within {
  opacity: 1;
  transform: none;
  pointer-events: auto;
}

.visor-boton {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: rgb(255 255 255 / 0.88);
  cursor: pointer;
  transition: background-color 0.2s, color 0.2s;
}

.visor-boton:hover { background: rgb(255 255 255 / 0.15); color: #fff; }
.visor-boton .icon { width: 20px; height: 20px; }
.visor-boton__salir { display: none !important; }
.visor--pantalla .visor-boton__entrar { display: none !important; }
.visor--pantalla .visor-boton__salir { display: inline-block !important; }

/* ---------- 7. La ayuda (tecla ?) ---------- */

.ayuda-visor {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgb(6 18 56 / 0.6);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s var(--ease), visibility 0s linear 0.25s;
}

.ayuda-visor.is-abierta {
  opacity: 1;
  visibility: visible;
  transition: opacity 0.25s var(--ease);
}

.ayuda-visor__tarjeta {
  width: min(940px, 100%);
  max-height: calc(100dvh - 36px);
  overflow-y: auto;
  padding: clamp(20px, 3vw, 32px);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: #fff;
  color: var(--text);
  box-shadow: 0 40px 90px -30px rgb(0 0 0 / 0.6);
  transform: translateY(12px) scale(0.985);
  transition: transform 0.35s var(--ease);
}

.ayuda-visor.is-abierta .ayuda-visor__tarjeta { transform: none; }

.ayuda-visor__cabecera {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.ayuda-visor__eyebrow {
  margin: 0;
  font-size: 0.74rem;
  font-weight: 750;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--blue-700);
}

.ayuda-visor__titulo {
  margin: 6px 0 0;
  font-size: clamp(1.3rem, 1.1rem + 0.8vw, 1.7rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.025em;
  color: var(--navy-900);
}

.ayuda-visor__sub {
  margin: 6px 0 0;
  font-size: 0.9rem;
  color: var(--muted);
}

.ayuda-visor__filete {
  display: block;
  width: 56px;
  height: 3px;
  margin-top: 12px;
  border-radius: 2px;
  background: var(--blue-500);
}

.ayuda-visor__cerrar {
  flex-shrink: 0;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  padding: 0;
  border: 1.5px solid var(--line-strong);
  border-radius: 50%;
  background: #fff;
  color: var(--navy-800);
  cursor: pointer;
  transition: background-color 0.2s, border-color 0.2s;
}

.ayuda-visor__cerrar:hover { background: var(--blue-50); border-color: var(--blue-400); }
.ayuda-visor__cerrar .icon { width: 20px; height: 20px; }

.ayuda-visor__columnas {
  display: grid;
  gap: 0 40px;
  margin-top: 6px;
}

@media (min-width: 760px) {
  .ayuda-visor__columnas { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

.ayuda-visor__grupo h3 {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 20px 0 6px;
  font-size: 0.74rem;
  font-weight: 750;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--blue-700);
}

.ayuda-visor__grupo h3 .icon { width: 16px; height: 16px; }

.ayuda-visor__fila {
  display: grid;
  grid-template-columns: minmax(120px, 0.8fr) minmax(0, 1.2fr);
  align-items: center;
  gap: 12px;
  padding: 8px 0;
  border-top: 1px solid var(--blue-50);
  font-size: 0.92rem;
  line-height: 1.4;
}

.ayuda-visor__teclas {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
}

.ayuda-visor__o {
  font-size: 0.75rem;
  color: var(--muted);
}

/* ---------- 8. Avisos y pistas ---------- */

.aviso-visor {
  position: fixed;
  top: max(16px, env(safe-area-inset-top));
  left: 50%;
  z-index: 130;
  max-width: min(640px, calc(100vw - 32px));
  padding: 11px 18px;
  border: 1px solid rgb(255 255 255 / 0.14);
  border-radius: 14px;
  background: rgb(6 18 56 / 0.86);
  color: #fff;
  font: 500 0.92rem/1.45 var(--font);
  text-align: center;
  box-shadow: 0 20px 40px -20px rgb(0 0 0 / 0.7);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  transform: translate(-50%, -8px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s var(--ease), transform 0.3s var(--ease);
}

.aviso-visor.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

.aviso-visor kbd {
  min-width: 22px;
  height: 22px;
  margin: 0 2px;
  border-color: rgb(255 255 255 / 0.25);
  background: rgb(255 255 255 / 0.12);
  color: #fff;
  box-shadow: none;
}

/* ---------- 9. Señalador (el punto que sigue al ratón) ---------- */

.senalador {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 95;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  pointer-events: none;
  mix-blend-mode: multiply;
  opacity: 0;
  transition: opacity 0.2s, background 0.2s ease, box-shadow 0.2s ease;
  will-change: transform;
}

.senalador.is-visible { opacity: 1; }

html.visor--senalador.visor--en-marcha .reveal,
html.visor--senalador.visor--en-marcha .reveal * { cursor: none !important; }

/* ---------- 10. Accesibilidad ---------- */

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