/* Pantalla proyectada. Todo se diseña sobre un escenario fijo de 1600 × 900
   que se escala al tamaño del proyector (--escala, calculado en motor.js). */

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

html, body { height: 100%; }

body {
  margin: 0;
  overflow: hidden;
  background: var(--marco);
  color: var(--tinta);
  font-family: var(--f-texto);
  font-size: var(--t-texto);
  line-height: 1.35;
  font-synthesis: weight;
}

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

:focus-visible {
  outline: 4px solid var(--azul);
  outline-offset: 4px;
}

/* ---------- Escenario ---------- */

.escenario {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 1600px;
  height: 900px;
  overflow: hidden;
  background: var(--papel);
  transform: translate(-50%, -50%) scale(var(--escala, 1));
  outline: none;
}

.lienzo,
.diapo {
  position: absolute;
  inset: 0;
}

.diapo {
  display: flex;
  flex-direction: column;
  padding: 64px 96px 112px;
}

.diapo__cuerpo {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.titulo-diapo {
  margin: 0 0 36px;
  max-width: 26ch;
  font-family: var(--f-titulo);
  font-size: var(--t-titulo);
  font-weight: 800;
  font-stretch: 100%;
  line-height: 1.05;
  letter-spacing: -0.01em;
  text-wrap: balance;
}

/* Bordes clicables para avanzar y retroceder */
.borde {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 72px;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  z-index: 5;
}
.borde--anterior { left: 0; cursor: w-resize; }
.borde--siguiente { right: 0; cursor: e-resize; }

/* ---------- Cartel de bloque (como la señal de un pasillo) ---------- */

.cartel {
  display: inline-grid;
  place-items: center;
  flex: none;
  width: 88px;
  height: 88px;
  border-radius: 28px 0 0 0;
  background: var(--azul);
  color: var(--papel);
  font-family: var(--f-titulo);
  font-size: 56px;
  font-weight: 900;
  font-stretch: 100%;
  line-height: 1;
}

.cartel--chico {
  width: 48px;
  height: 48px;
  border-radius: 16px 0 0 0;
  font-size: 28px;
  margin-right: 16px;
  vertical-align: middle;
}

/* ---------- Riel superior ---------- */

.riel {
  display: flex;
  align-items: center;
  gap: 24px;
  margin-bottom: 44px;
}

.riel__textos {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.riel__bloque {
  font-size: var(--t-chico);
  color: var(--tinta-suave);
}

.riel__tema {
  font-size: 28px;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.riel__tipo {
  margin-left: auto;
  flex: none;
  padding: 6px 20px;
  border: 3px solid var(--azul);
  border-radius: 999px;
  color: var(--azul);
  font-size: var(--t-chico);
  font-weight: 700;
}

/* ---------- Pie: progreso del tema + logo ---------- */

.pie {
  position: absolute;
  left: 96px;
  right: 96px;
  bottom: 0;
  z-index: 4;
  display: flex;
  align-items: center;
  gap: 40px;
  padding: 20px 0 36px;
  background: linear-gradient(180deg, transparent, var(--papel) 36%, var(--papel));
}

.progreso {
  flex: 1;
  display: flex;
  gap: 8px;
}

.progreso__tramo {
  flex: 1;
  height: 8px;
  border-radius: 4px;
  background: var(--linea);
}
.progreso__tramo.es-pasado { background: #9DB2FA; }
.progreso__tramo.es-actual { background: var(--azul); }

.pie__logo {
  height: 44px;
  width: auto;
}

.pie--sobre-color {
  left: 0;
  right: 0;
  padding: 20px 96px 36px;
  background: transparent;
}

.pie--sobre-color .progreso {
  display: none;
}

/* ---------- Portada general y cierre ---------- */

.diapo--portada {
  justify-content: center;
  padding: 120px 160px;
}

/* Los dos trazos curvos del logotipo, a escala de la diapositiva */
.arco {
  position: absolute;
  width: 560px;
  height: 240px;
  pointer-events: none;
}
.arco--rojo {
  top: 56px;
  left: 56px;
  border-top: 32px solid var(--rojo);
  border-left: 32px solid var(--rojo);
  border-top-left-radius: 200px;
}
.arco--azul {
  right: 56px;
  bottom: 56px;
  border-right: 32px solid var(--azul);
  border-bottom: 32px solid var(--azul);
  border-bottom-right-radius: 200px;
}

.portada__logo {
  position: absolute;
  top: 88px;
  right: 120px;
  width: 300px;
  height: auto;
}

.portada__titulo {
  margin: 0;
  max-width: 17ch;
  color: var(--azul);
  font-family: var(--f-titulo);
  font-size: var(--t-portada);
  font-weight: 900;
  font-stretch: 100%;
  line-height: 0.98;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

.portada__bajada {
  margin: 40px 0 0;
  max-width: 40ch;
  font-size: var(--t-texto);
  color: var(--tinta-suave);
}

/* ---------- Agenda ---------- */

.diapo--agenda .titulo-diapo { margin-bottom: 28px; }

.agenda {
  margin: 0;
  padding: 0;
  list-style: none;
  max-width: 1180px;
}

.agenda__fila {
  display: grid;
  grid-template-columns: 130px 1fr auto;
  align-items: center;
  gap: 24px;
  min-height: 60px;
  border-bottom: 2px solid var(--linea);
  font-size: 28px;
}

.agenda__hora {
  font-family: var(--f-titulo);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.agenda__nombre { display: flex; align-items: center; }

.agenda__fila--bloque .agenda__nombre { font-weight: 700; }

.agenda__fila--corte {
  color: var(--tinta-suave);
  font-size: 24px;
  min-height: 48px;
}

.agenda__parte {
  margin-left: 12px;
  font-weight: 400;
  color: var(--tinta-suave);
}

.agenda__detalle {
  font-size: var(--t-chico);
  color: var(--tinta-suave);
}

.agenda__fin {
  margin: 20px 0 0;
  font-size: var(--t-chico);
  color: var(--tinta-suave);
}

/* ---------- Portada de bloque ---------- */

.diapo--bloque {
  flex-direction: row;
  align-items: center;
  gap: 72px;
  padding: 96px 120px 120px;
  background: var(--azul);
  color: var(--papel);
}

.diapo--bloque .arco--rojo { top: 48px; left: 48px; width: 420px; height: 200px; }

.bloque__numero {
  flex: none;
  width: 420px;
  font-family: var(--f-titulo);
  font-size: 480px;
  font-weight: 900;
  font-stretch: 100%;
  line-height: 0.8;
  text-align: center;
}

.bloque__info { flex: 1; min-width: 0; }

.bloque__titulo {
  margin: 0 0 32px;
  font-family: var(--f-titulo);
  font-size: 88px;
  font-weight: 900;
  font-stretch: 100%;
  line-height: 1;
}

.bloque__temas {
  margin: 0;
  padding: 0 0 0 1.4em;
  font-size: 26px;
  line-height: 1.25;
}

.bloque__temas li {
  padding: 5px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.28);
}

.bloque__temas li > span { display: inline-block; }
.bloque__tema { width: calc(100% - 110px); }
.bloque__min {
  width: 100px;
  text-align: right;
  font-variant-numeric: tabular-nums;
  opacity: 0.85;
}

.bloque__total {
  margin: 24px 0 0;
  font-size: var(--t-chico);
  font-weight: 700;
}

/* ---------- Portada de tema ---------- */

.tema { justify-content: center; }

.tema__titulo {
  margin: 0;
  max-width: 20ch;
  color: var(--azul);
  font-family: var(--f-titulo);
  font-size: var(--t-portada);
  font-weight: 900;
  font-stretch: 100%;
  line-height: 0.98;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

.tema__objetivo {
  margin: 40px 0 0;
  max-width: 48ch;
  font-size: var(--t-texto);
}

.tema__duracion {
  align-self: flex-start;
  margin: 40px 0 0;
  padding: 8px 22px;
  border-radius: 999px;
  background: var(--azul-suave);
  color: var(--azul-oscuro);
  font-size: var(--t-chico);
  font-weight: 700;
}

/* ---------- Concepto (revelado progresivo) ---------- */

.puntos {
  margin: 0;
  padding: 0;
  list-style: none;
  max-width: 1340px;
}

.puntos li {
  position: relative;
  padding: 0 0 22px 56px;
  font-size: 36px;
  line-height: 1.3;
  transition: opacity 0.3s ease;
}

.puntos li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.45em;
  width: 24px;
  height: 24px;
  border-radius: 8px 0 0 0;
  background: var(--azul);
}

.es-oculto { opacity: 0; }
.es-visible { opacity: 1; }

.concepto__cierre {
  margin: 24px 0 0;
  flex: none;
  padding: 16px 24px;
  border-left: 10px solid var(--azul);
  background: var(--azul-suave);
  font-size: 28px;
  font-weight: 700;
  transition: opacity 0.3s ease;
}

/* ---------- En el supermercado: flejes de góndola ---------- */

.flejes {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
  min-height: 0;
  overflow: hidden;
}

.fleje__boton {
  display: flex;
  align-items: stretch;
  width: 100%;
  min-height: 0;
  padding: 0;
  border: 0;
  border-bottom: 4px solid var(--azul);
  background: var(--gondola);
  color: var(--tinta);
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.fleje__area {
  flex: none;
  width: 320px;
  display: flex;
  align-items: center;
  padding: 6px 16px;
  background: var(--azul);
  color: var(--papel);
  font-family: var(--f-titulo);
  font-size: 20px;
  font-weight: 800;
  font-stretch: 100%;
  line-height: 1.15;
}

.fleje__resumen {
  flex: 1;
  min-width: 0;
  padding: 6px 18px;
  font-size: 20px;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.fleje__boton[aria-expanded="true"] { background: var(--azul-suave); }

.fleje__detalle {
  margin: 0;
  padding: 4px 18px 2px 336px;
  font-size: 20px;
  line-height: 1.25;
  font-style: italic;
  color: var(--tinta);
}

/* ---------- Ejemplos: lugar para el componente ---------- */

.componente {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.componente__pendiente {
  flex: 1;
  display: grid;
  place-items: center;
  margin: 0;
  padding: 40px;
  border: 4px dashed var(--linea);
  color: var(--tinta-suave);
  font-size: 28px;
  text-align: center;
}

/* ---------- Cuidado con ---------- */

.riesgos {
  margin: 0;
  padding: 0 0 8px;
  list-style: none;
  max-width: 1240px;
  flex: 1;
  min-height: 0;
  overflow: hidden;
}

.riesgos li {
  display: flex;
  gap: 20px;
  padding: 0 0 16px;
  font-size: 30px;
  line-height: 1.28;
}

.riesgos li:last-child {
  padding-bottom: 4px;
}

.riesgo__marca {
  display: grid;
  place-items: center;
  flex: none;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--rojo);
  color: var(--papel);
  font-family: var(--f-titulo);
  font-size: 28px;
  font-weight: 900;
}

/* ---------- Actividad ---------- */

.actividad {
  flex: 1;
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 48px;
  min-height: 0;
}

.actividad .titulo-diapo {
  margin-bottom: 16px;
}

.actividad__consigna {
  min-height: 0;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.actividad__pregunta {
  margin: 0;
  max-width: 30ch;
  color: var(--azul);
  font-family: var(--f-titulo);
  font-size: 34px;
  font-weight: 700;
  font-stretch: 100%;
  line-height: 1.2;
  flex: none;
}

.actividad__pasos {
  margin: 0;
  padding-left: 1.3em;
  font-size: 22px;
  line-height: 1.3;
  flex: none;
  color: var(--tinta-suave);
}

.actividad__pasos li { padding-bottom: 6px; }

.actividad__panel {
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-height: 0;
  overflow: hidden;
}

.qr {
  padding: 16px 20px;
  border: 3px solid var(--azul);
  border-radius: 28px 0 0 0;
  text-align: center;
  flex: none;
}

.qr__titulo {
  margin: 0 0 10px;
  font-size: 22px;
  font-weight: 700;
}

.qr__codigo {
  width: 220px;
  height: 220px;
  margin: 0 auto;
  background:
    repeating-linear-gradient(0deg, var(--gondola) 0 22px, transparent 22px 44px),
    repeating-linear-gradient(90deg, var(--linea) 0 22px, var(--papel) 22px 44px);
}

.qr__nota {
  margin: 8px 0 0;
  font-size: 16px;
  color: var(--tinta-suave);
  line-height: 1.3;
}

.qr__figura {
  width: 156px;
  height: 156px;
  margin: 0 auto;
  background: #fff;
}
.qr__figura svg,
.qr__img {
  display: block;
  width: 156px;
  height: 156px;
  background: #fff;
}

.qr__sala {
  margin: 10px 0 0;
  font-size: 22px;
  font-weight: 700;
}
.qr__sala strong {
  display: block;
  margin-top: 2px;
  font-size: 40px;
  letter-spacing: 0.16em;
}

.qr--manual {
  border-color: var(--rojo, #EF3237);
}

.resultados {
  margin: 0;
  padding: 12px 16px;
  background: var(--papel, #fff);
  border-left: 6px solid var(--azul);
  flex: 1 1 auto;
  min-height: 120px;
  overflow-y: auto;
}

.resultados__cuerpo {
  font-size: 24px;
  color: var(--tinta-suave);
}

.resultados__titulo {
  margin: 0 0 12px;
  font-size: 22px;
  font-weight: 700;
}

.resultados__meta {
  margin: 0 0 8px;
  font-size: 18px;
  font-weight: 700;
  color: var(--rojo, #EF3237);
}

.barras {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
}

.barras li {
  display: grid;
  grid-template-columns: minmax(80px, 140px) 1fr 40px;
  gap: 12px;
  align-items: center;
  font-size: 22px;
}

.barras__pista {
  height: 18px;
  background: var(--fondo-suave, #E7ECFE);
  border-radius: 999px;
  overflow: hidden;
}

.barras__lleno {
  display: block;
  height: 100%;
  background: var(--azul);
}

.muro {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
  font-size: 22px;
}

.muro li {
  padding: 10px 14px;
  background: var(--fondo-suave, #E7ECFE);
  border-radius: 8px;
}

.muro--pendiente li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: #fff;
  border: 2px dashed var(--rojo, #EF3237);
}

.muro__texto {
  flex: 1;
  min-width: 0;
}

.muro__btn {
  flex: none;
  border: 0;
  border-radius: 8px;
  padding: 8px 14px;
  background: var(--azul);
  color: #fff;
  font: inherit;
  font-size: 18px;
  font-weight: 700;
  cursor: pointer;
}

.muro__btn:disabled {
  opacity: 0.5;
  cursor: wait;
}

.reloj {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 20px;
  background: var(--gondola);
  flex: none;
}

.reloj__tiempo {
  font-family: var(--f-titulo);
  font-size: 48px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}

.reloj.es-terminado .reloj__tiempo { color: var(--rojo-texto); }

.reloj__boton {
  padding: 10px 22px;
  border: 0;
  border-radius: 999px;
  background: var(--azul);
  color: var(--papel);
  font: inherit;
  font-size: 22px;
  font-weight: 700;
  cursor: pointer;
}

/* ---------- Idea clave ---------- */

.diapo--idea {
  justify-content: center;
  padding: 96px 160px 140px;
  background: var(--rojo);
  color: var(--papel);
}

.idea__tema {
  margin: 0 0 40px;
  font-size: 28px;
  font-weight: 700;
}

.idea__frase {
  margin: 0;
  max-width: 24ch;
  font-family: var(--f-titulo);
  font-size: 68px;
  font-weight: 800;
  font-stretch: 100%;
  line-height: 1.08;
  text-wrap: balance;
}

.diapo--idea .pie {
  left: 0;
  right: 0;
  padding: 20px 96px 36px;
  background: transparent;
}

.diapo--idea .progreso {
  display: none;
}

/* ---------- Repaso del bloque ---------- */

.diapo--repaso .titulo-diapo {
  margin: 0 0 16px;
  font-size: 48px;
}

.repaso {
  margin: 0;
  padding: 0 0 0 1.4em;
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: repeat(var(--filas, 4), min-content);
  grid-auto-flow: column;
  gap: 8px 36px;
  align-content: start;
}

.repaso li { font-size: 20px; line-height: 1.25; }
.repaso__tema { display: block; font-size: 16px; line-height: 1.2; color: var(--tinta-suave); }
.repaso__frase { display: block; font-weight: 700; }
.repaso__vacio { color: var(--tinta-suave); font-size: 28px; }

/* ---------- Índice ---------- */

.indice {
  position: absolute;
  inset: 0;
  z-index: 20;
  display: flex;
  padding: 48px;
  background: rgba(10, 18, 51, 0.72);
}

.indice[hidden], .notas[hidden] { display: none; }

.indice__caja {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 40px 48px;
  background: var(--papel);
  overflow: auto;
}

.indice__titulo {
  margin: 0 0 24px;
  font-family: var(--f-titulo);
  font-size: 44px;
  font-weight: 800;
}

.indice__bloques {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px;
}

.indice__bloque h3 {
  display: flex;
  align-items: center;
  margin: 0 0 12px;
  font-family: var(--f-titulo);
  font-size: 28px;
  font-weight: 800;
}

.indice__bloque ol {
  margin: 0;
  padding-left: 1.4em;
  font-size: 20px;
  line-height: 1.3;
}

.indice__bloque li { padding: 4px 0; }
.indice__bloque a { color: var(--tinta); text-decoration-color: var(--linea); text-underline-offset: 4px; }
.indice__bloque a:hover { color: var(--azul); }
.indice__pendiente { color: var(--tinta-suave); font-size: 16px; }

.indice__ayuda {
  margin: auto 0 0;
  padding-top: 24px;
  font-size: 18px;
  color: var(--tinta-suave);
}

/* ---------- Notas del facilitador (modo una sola pantalla) ---------- */

.notas {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 15;
  max-height: 46%;
  display: flex;
  flex-direction: column;
  padding: 20px 96px 24px;
  background: var(--marco);
  color: var(--papel);
  font-size: 22px;
}

.notas__estado {
  display: flex;
  gap: 24px;
  margin-bottom: 12px;
  font-weight: 700;
}

.notas__desvio--atrasado { color: #FF9A9D; }
.notas__desvio--adelantado { color: #9DB2FA; }
.notas__opcional { color: #FFD166; }

.notas__texto { overflow: auto; }
.notas__texto p { margin: 0 0 8px; }
.notas__vacio { opacity: 0.7; }

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}
