/* ActitudFit Display — ventanas */

.dlg {
  padding: 0; border: 0; background: transparent; color: var(--texto); max-width: none; max-height: none;
  width: min(1760px, 96vw); margin: auto; overflow: visible;
  /* La ventana entera se cierra al tocarla (y la ampliación lleva cursor de mano): el navegador táctil la trata como un
     elemento pulsable y, sin esto, pinta encima su resaltado translúcido mientras el dedo la toca para cerrarla (octava
     corrección de RC3). Los campos de los formularios siguen igual; los indicadores de foco no cambian */
  -webkit-tap-highlight-color: transparent;
}
/* Ventanas de ejercicios (ampliación, alternativas, acciones): para mirar y tocar, sin selección, menú de pulsación larga
   ni arrastre de imágenes o vídeos. No tienen campos de texto */
.dlg-visor, .dlg-rel, .dlg-acciones { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
.dlg :is(img, video) { -webkit-user-drag: none; }
.dlg::backdrop { background: rgb(10 12 15 / .9); }
.dlg[open] { animation: dlg-entra .28s var(--ease) both; }
.dlg[open]::backdrop { animation: dlg-fondo .28s ease both; }
@keyframes dlg-entra { from { opacity: 0; transform: translateY(18px) scale(.98); } }
@keyframes dlg-fondo { from { opacity: 0; } }

.dlg-caja {
  background: var(--fondo-2); border: 1px solid var(--linea); border-radius: var(--radio-l);
  max-height: 92vh; display: grid; grid-template-rows: auto minmax(0, 1fr); overflow: hidden;
  box-shadow: 0 30px 80px rgb(0 0 0 / .5);
}
.dlg-cab { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 16px 18px 12px 28px; }
.dlg-titulo { font: 600 42px/1 var(--fuente-titulo); text-wrap: balance; }
.dlg-cerrar {
  flex: 0 0 auto; width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center;
  background: var(--sol); color: var(--sol-texto); transition: transform .2s var(--ease);
}
.dlg-cerrar:hover { transform: scale(1.06) rotate(4deg); }
.dlg-cerrar svg { width: 30px; height: 30px; }
.dlg-cuerpo { overflow: auto; padding: 4px 28px 28px; overscroll-behavior: contain; }

/* ---- Visor ---------------------------------------------------------------------------------------- */
.dlg-visor { width: min(1500px, 96vw); }
.dlg-visor .dlg-titulo { font-size: 38px; }
.dlg-caja.sin-cab { grid-template-rows: minmax(0, 1fr); }
.dlg-caja.sin-cab .dlg-cuerpo { padding-top: 28px; }
.dlg-visor { cursor: pointer; }
.dlg-visor .visor-acciones { cursor: default; }
.visor-nombre { font: 600 38px/1.05 var(--fuente-titulo); text-align: center; text-wrap: balance; }
.visor { display: grid; justify-items: center; gap: 20px; }
.visor-escena {
  position: relative; background: #fff; border-radius: 18px; overflow: hidden; aspect-ratio: var(--ratio, 16 / 9);
  width: min(100%, calc(62vh * var(--ratio-num, 1.7778)));
}
.visor-escena video { width: 100%; height: 100%; object-fit: contain; background: #fff; cursor: pointer; }
.visor-hueco { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 10px; padding: 40px; text-align: center; background: repeating-linear-gradient(135deg, #eef1f4 0 18px, #e5e9ee 18px 36px); color: #3c4651; }
.visor-hueco b { font: 600 56px/1 var(--fuente-titulo); text-wrap: balance; }
.visor-hueco small { font-size: 20px; color: #5f6b78; }
.visor-escena.sin-medio { aspect-ratio: 16 / 7; width: 100%; }
.visor-acciones { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px; }

/* ---- Relaciones ------------------------------------------------------------------------------------- */
.rel-cab { display: flex; align-items: center; gap: 20px; min-width: 0; }
.rel-tit { display: grid; gap: 4px; min-width: 0; }
.rel-base { font-size: 17px; color: var(--apagado); }
.insignia { cursor: default; pointer-events: none; }

.rel { display: grid; gap: 18px; }
.rel-direccion { display: flex; align-items: center; gap: 16px; padding: 10px 22px 10px 12px; border-radius: 99px; background: var(--fondo); width: fit-content; max-width: 100%; }
.rel-direccion .glifo { width: 44px; height: 44px; border-radius: 50%; background: #000; color: var(--sol); font: 700 36px/42px var(--fuente-titulo); text-align: center; flex: 0 0 auto; }
.rel-direccion p { font: 600 28px/1.05 var(--fuente-titulo); }
.rel-tabs { display: flex; flex-wrap: wrap; gap: 10px; }
.rel-tab { min-height: 54px; padding: 0 24px; border-radius: 99px; background: var(--fondo); border: 2px solid var(--linea); font: 600 28px/1 var(--fuente-titulo); }
.rel-tab[aria-selected="true"] { background: var(--texto); color: var(--fondo); border-color: var(--texto); }
.rel-grid { display: grid; grid-template-columns: repeat(var(--cols, 3), minmax(0, 1fr)); gap: 16px; align-items: start; }
.rel-grid:not(.ordenado) { grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); }
.rel-vacio { color: var(--apagado); font-size: 22px; padding: 30px 6px; }
.dlg-rel .ej-titulo { font-size: 24px; }

/* ---- Mensajes ------------------------------------------------------------------------------------------ */
.dlg-msg { width: min(1100px, 96vw); }
.mensaje { display: grid; gap: 16px; padding-top: 6px; }
.msg-linea { font: 500 36px/1.18 var(--fuente-titulo); text-wrap: pretty; max-width: 62ch; }
.msg-linea strong { color: var(--sol); font-weight: 700; }
/* Instrucciones del programa (11/11/2026): letra grande, párrafos y listas bien separados; el cuerpo de la ventana se desplaza */
.dlg-instrucciones { width: min(1200px, 96vw); }
.instrucciones { display: grid; gap: 24px; padding-top: 6px; font: 500 36px/1.3 var(--fuente-titulo); max-width: 64ch; -webkit-user-select: none; user-select: none; }
.instrucciones p { margin: 0; text-wrap: pretty; }
.instrucciones :is(ul, ol) { margin: 0; padding-left: 1.3em; display: grid; gap: 14px; }
.instrucciones ul { list-style: disc; }   /* base.css quita las viñetas a todas las listas */
.instrucciones li { padding-left: .2em; }
.instrucciones li::marker { color: var(--nivel); font-weight: 700; }

/* ---- Selector de semana ----------------------------------------------------------------------------------- */
.dlg-semanas { width: min(980px, 96vw); }
.semanas { display: grid; gap: 14px; }
.semanas-fila { display: grid; grid-template-columns: 120px repeat(4, minmax(0, 1fr)); gap: 12px; align-items: stretch; }
.semanas-mes { display: grid; place-items: center; font: 600 34px/1 var(--fuente-titulo); color: var(--apagado); }
.semana-btn {
  min-height: 92px; border-radius: var(--radio-m); background: var(--fondo); border: 2px solid var(--linea);
  display: grid; align-content: center; justify-items: center; gap: 4px; font: 600 40px/1 var(--fuente-titulo);
}
.semana-btn small { font: 500 14px/1 var(--fuente-texto); color: var(--apagado); }
.semana-btn:hover { border-color: var(--texto); }
.semana-btn[aria-current="true"] { background: var(--sol); color: var(--sol-texto); border-color: var(--sol); }
.semana-btn[aria-current="true"] small { color: rgb(20 24 29 / .72); }
.semana-btn.hoy small { color: #3be07a; font-weight: 600; }
.semana-btn.hoy[aria-current="true"] small { color: var(--sol-texto); }
.semanas-pie { display: flex; justify-content: space-between; align-items: center; gap: 14px; flex-wrap: wrap; padding-top: 6px; color: var(--apagado); }
.btn-hoy { min-height: 56px; padding: 0 26px; border-radius: 99px; background: var(--texto); color: var(--fondo); font: 700 30px/1 var(--fuente-titulo); }

@media (max-width: 760px) {
  .dlg-titulo { font-size: 30px; }
  .dlg-cerrar { width: 52px; height: 52px; }
  .dlg-cab { padding: 12px 12px 8px 18px; }
  .dlg-cuerpo { padding: 4px 16px 20px; }
  .rel-grid, .rel-grid:not(.ordenado) { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .semanas-fila { grid-template-columns: 70px repeat(4, minmax(0, 1fr)); gap: 8px; }
  .semana-btn { min-height: 70px; font-size: 32px; }
  .msg-linea { font-size: 28px; }
}

.dlg-acciones .visor-acciones { flex-direction: column; align-items: stretch; }
.dlg-acciones .btn-ico-txt { justify-content: flex-start; }
