/* Presentador de cursos Gecko: escenario fijo 1920x1080 escalado y centrado (letterbox negro) */
html, body { margin: 0; height: 100%; background: #000; overflow: hidden; }
body.pz-oculto-cursor, body.pz-oculto-cursor * { cursor: none !important; }

#pz-escenario { position: fixed; inset: 0; background: #000; overflow: hidden; touch-action: none; user-select: none; -webkit-user-select: none; }
#pz-lienzo { position: absolute; left: 0; top: 0; width: 1920px; height: 1080px; transform-origin: 0 0; overflow: hidden; background: #000; }

.pz-capa { position: absolute; inset: 0; opacity: 0; transition: opacity 450ms ease; }
.pz-capa.pz-visible { opacity: 1; }
.pz-capa.pz-sin-transicion { transition: none; }

/* La diapositiva: maquetada en absoluto a 1920x1080 */
.pz-capa > section { position: absolute; left: 0; top: 0; width: 1920px; height: 1080px; box-sizing: border-box; overflow: hidden; }
:where(.pz-capa > section) :where(h1, h2, h3, h4, p, ul, ol, li, figure, blockquote) { margin: 0; }
/* Sin padding propio en ul/ol: el original usa los 40px del navegador (deck.css no lo fija). */
/* Las notas <aside> las quita el build; esta regla es solo una red por si se cuela alguna. */
.pz-capa > section aside { display: none; }

/* Diapositiva viva: una demo en un iframe a pantalla completa (src solo al ser la diapositiva actual) */
.pz-capa > section.pz-viva-diapo { padding: 0; display: block; background: #9cc7e6; }
.pz-viva-diapo iframe { position: absolute; left: 0; top: 0; width: 1920px; height: 1080px; border: 0; display: block; background: #9cc7e6; }
.pz-viva-diapo .pz-viva-titulo { position: absolute; left: 50%; top: 22px; transform: translateX(-50%); z-index: 2; pointer-events: none;
  font: 400 30px/1 'DM Serif Display', Georgia, serif; color: #F5F1E8; background: rgba(28, 43, 45, .78); padding: 12px 24px; border-radius: 26px; white-space: nowrap; }
.pz-viva-diapo .pz-viva-titulo span { font: 500 18px/1 'DM Sans', Arial, sans-serif; color: #E8A27C; margin-left: 10px; }

/* Pantalla negra (B) */
#pz-negro { position: fixed; inset: 0; background: #000; z-index: 30; display: none; }
#pz-negro.pz-on { display: block; }

/* Numero de diapositiva */
#pz-num { position: fixed; right: 14px; bottom: 10px; z-index: 20; font: 600 13px/1 'DM Sans', Arial, sans-serif;
  color: rgba(255, 255, 255, .55); background: rgba(0, 0, 0, .35); padding: 5px 8px; border-radius: 6px; pointer-events: none;
  transition: opacity 300ms ease; }
#pz-num.pz-apagado { opacity: 0; }

/* Aviso de error */
#pz-aviso { position: fixed; left: 50%; top: 20px; transform: translateX(-50%); z-index: 50; display: none;
  font: 600 16px/1.4 'DM Sans', Arial, sans-serif; color: #fff; background: #B23A2A; padding: 10px 16px; border-radius: 8px; }
#pz-aviso.pz-on { display: block; }

/* ---- Gestos con la camara ---- */
/* Boton discreto arriba a la derecha (se apaga con el cursor quieto, como el numero) */
#pz-manos { position: fixed; right: 14px; top: 12px; z-index: 20; font: 600 13px/1 'DM Sans', Arial, sans-serif; color: rgba(255, 255, 255, .7);
  background: rgba(0, 0, 0, .35); border: 1px solid rgba(255, 255, 255, .25); padding: 7px 10px; border-radius: 6px; cursor: pointer;
  transition: opacity 300ms ease; }
#pz-manos:hover, #pz-manos:focus-visible { color: #fff; background: rgba(0, 0, 0, .6); outline: none; border-color: #E8A27C; }
#pz-manos.pz-apagado { opacity: 0; }
#pz-manos.pz-apagado:hover, #pz-manos.pz-apagado:focus-visible { opacity: 1; }
#pz-manos[data-estado="activo"] { border-color: rgba(120, 200, 140, .7); }
#pz-manos[data-estado="error"] { border-color: rgba(230, 110, 90, .8); }
#pz-manos:disabled { cursor: progress; }

/* Puntero laser */
#pz-laser { position: fixed; left: -11px; top: -11px; width: 22px; height: 22px; border-radius: 50%; z-index: 26; pointer-events: none;
  background: radial-gradient(circle, #fff 0 18%, #ff2a2a 30%, rgba(255, 30, 30, .85) 55%, rgba(255, 0, 0, 0) 72%);
  box-shadow: 0 0 14px 6px rgba(255, 30, 30, .55); display: none; will-change: transform; }
#pz-laser.pz-on { display: block; }

/* Lupa x2 */
#pz-lupa { position: fixed; left: 0; top: 0; z-index: 25; border-radius: 50%; overflow: hidden; pointer-events: none; display: none;
  background: #000; border: 3px solid rgba(255, 255, 255, .9); box-shadow: 0 8px 40px rgba(0, 0, 0, .55); will-change: transform; }
#pz-lupa.pz-on { display: block; }
#pz-lupa .pz-lupa-lienzo { position: absolute; left: 0; top: 0; width: 1920px; height: 1080px; transform-origin: 0 0; overflow: hidden; }
#pz-lupa .pz-capa { opacity: 1; }
#pz-lupa * { animation: none !important; transition: none !important; }

/* Rotulo del gesto reconocido */
#pz-gesto { position: fixed; left: 50%; bottom: 14px; transform: translateX(-50%); z-index: 27; pointer-events: none;
  font: 600 14px/1 'DM Sans', Arial, sans-serif; color: rgba(255, 255, 255, .9); background: rgba(0, 0, 0, .5);
  padding: 6px 12px; border-radius: 14px; opacity: 0; transition: opacity 250ms ease; }
#pz-gesto.pz-on { opacity: 1; }

/* Aviso de camara (motivo del fallo); la presentacion sigue con teclado */
#pz-gestos-aviso { position: fixed; right: 14px; top: 46px; z-index: 28; max-width: 380px; display: none;
  font: 500 14px/1.4 'DM Sans', Arial, sans-serif; color: #fff; background: rgba(120, 40, 30, .92); padding: 10px 12px; border-radius: 8px; }
#pz-gestos-aviso.pz-on { display: block; }

/* Miniatura de la camara (tecla C). Oculta no se quita del flujo: el video tiene que seguir dando fotogramas. */
#pz-camara { position: fixed; left: 14px; bottom: 14px; z-index: 22; width: 240px; height: 180px; border-radius: 8px; overflow: hidden;
  opacity: 0; pointer-events: none; background: #000; }
#pz-camara.pz-on { opacity: .9; }
#pz-camara video, #pz-camara canvas { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
#pz-camara video { transform: scaleX(-1); }

/* Indice de miniaturas (Esc) */
#pz-indice { position: fixed; inset: 0; z-index: 40; display: none; overflow-y: auto; background: rgba(12, 18, 19, .96);
  padding: 28px; box-sizing: border-box; font-family: 'DM Sans', Arial, sans-serif; color: #F5F1E8; }
#pz-indice.pz-on { display: block; }
#pz-indice .pz-indice-cab { display: flex; justify-content: space-between; align-items: baseline; margin: 0 4px 20px; font-size: 18px; }
#pz-indice .pz-indice-cab span { color: #BFC9C6; font-size: 14px; }
#pz-indice .pz-rejilla { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 18px; }
#pz-indice button { all: unset; cursor: pointer; display: flex; flex-direction: column; gap: 6px; }
#pz-indice .pz-mini { position: relative; width: 100%; aspect-ratio: 16 / 9; overflow: hidden; border-radius: 6px;
  outline: 2px solid transparent; background: #222; }
#pz-indice .pz-mini > .pz-capa { opacity: 1; transform-origin: 0 0; width: 1920px; height: 1080px; inset: auto; left: 0; top: 0; pointer-events: none; }
#pz-indice .pz-mini * { animation: none !important; transition: none !important; }
#pz-indice button:hover .pz-mini, #pz-indice button:focus-visible .pz-mini { outline-color: #E8A27C; }
#pz-indice button.pz-actual .pz-mini { outline-color: #C4572A; outline-width: 4px; }
#pz-indice .pz-pie { font-size: 13px; color: #BFC9C6; }
#pz-indice .pz-pie b { color: #F5F1E8; margin-right: 6px; }
