/* =====================================================================
   ACADEMIA MIRARI · estilos (v2, octubre 2026)
   Tintas y letras de la web de la sala (salamirari.com), adaptadas a una
   herramienta de estudio: la letra de cartel (Abril Fatface) solo en el
   título de cada pantalla; todo lo demás en Archivo, en minúsculas y con
   frases normales. Oro = acción, latón = detalle.
   ===================================================================== */

/* ---------- Fuentes locales (SIL OFL, juego latino) ---------- */
@font-face { font-family: "Abril Fatface"; font-weight: 400; font-display: swap; src: url(../fuentes/abril-fatface.woff2) format("woff2"); }
@font-face { font-family: "Archivo"; font-weight: 400 700; font-display: swap; src: url(../fuentes/archivo.woff2) format("woff2"); }
@font-face { font-family: "Archivo"; font-style: italic; font-weight: 400; font-display: swap; src: url(../fuentes/archivo-italic.woff2) format("woff2"); }
@font-face { font-family: "Archivo Narrow"; font-weight: 500 700; font-display: swap; src: url(../fuentes/archivo-narrow.woff2) format("woff2"); }

:root {
  --tinta: #050B14;
  --noche: #0B1728;
  --noche-2: #10203A;
  --azul-mirari: #132D52;
  --oro: #FDE69D;
  --oro-claro: #FFF1C4;
  --oro-suave: rgba(253, 230, 157, .1);
  --laton: #D9A548;
  --papel: #F1E9DA;
  --papel-suave: rgba(241, 233, 218, .82);
  --niebla: #97A1B4;
  --linea: rgba(241, 233, 218, .1);
  --linea-fuerte: rgba(241, 233, 218, .2);
  --filete: rgba(217, 165, 72, .26);
  --filete-fuerte: rgba(217, 165, 72, .5);
  --verde: #8CCB95;
  --rojo: #F0948A;

  --f-display: "Abril Fatface", "Bodoni 72", Didot, "Times New Roman", serif;
  --f-texto: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --f-estrecha: "Archivo Narrow", "Arial Narrow", "Helvetica Neue", Arial, sans-serif;

  --ancho: 1120px;
  --lectura: 44rem;
  --margen: clamp(1rem, .4rem + 2.6vw, 2.5rem);
  --cab: 4rem;
  --pestanas: 4rem;
  --r: 10px;
  --r-peq: 6px;
  --ease: cubic-bezier(.2, .7, .2, 1);

  color-scheme: dark;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--cab) + 1rem); }
body {
  margin: 0; min-height: 100vh; min-height: 100dvh;
  background: var(--tinta); color: var(--papel);
  font-family: var(--f-texto); font-size: 1.0625rem; line-height: 1.6;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
  overflow-x: hidden; overflow-x: clip;
}
img, video, svg, iframe { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
h1, h2, h3 { margin: 0; text-wrap: balance; font-weight: 600; line-height: 1.2; }
h1 { font-family: var(--f-display); font-weight: 400; font-size: clamp(2.1rem, 1.5rem + 2.4vw, 3.2rem); line-height: 1.05; letter-spacing: .005em; }
h2 { font-size: 1.3rem; letter-spacing: -.005em; }
h3 { font-size: 1.1rem; }
p { margin: 0; text-wrap: pretty; }
p + p { margin-top: .85em; }
ul, ol { margin: 0; padding: 0; }
figure { margin: 0; }
::selection { background: var(--oro); color: var(--tinta); }
:focus-visible { outline: 2px solid var(--oro); outline-offset: 3px; border-radius: 4px; }
[tabindex="-1"]:focus { outline: none; }

.caja { width: 100%; max-width: var(--ancho); margin-inline: auto; padding-inline: var(--margen); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.saltar { position: absolute; left: 1rem; top: -5rem; z-index: 90; background: var(--oro); color: var(--tinta); padding: .7rem 1rem; border-radius: var(--r-peq); font-weight: 600; text-decoration: none; }
.saltar:focus { top: 1rem; }

.icono { width: 1.2em; height: 1.2em; flex: none; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.icono--lleno { fill: currentColor; }

/* Textos de apoyo */
.rotulo { font-size: .9rem; font-weight: 500; color: var(--niebla); line-height: 1.4; }
.rotulo--laton { color: var(--laton); }
.rotulo--niebla { color: var(--niebla); }
.entradilla { font-size: 1.1rem; color: var(--papel-suave); max-width: 40rem; }
.nota { font-size: .95rem; color: var(--niebla); }
.cifra { font-family: var(--f-display); font-weight: 400; line-height: 1; color: var(--oro); font-variant-numeric: lining-nums; }

/* ---------- Botones ---------- */
/* Botón principal: la entrada de teatro de la web (muescas laterales), con texto normal */
.boton {
  --muesca: 6px;
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  font-weight: 600; font-size: 1rem; line-height: 1; letter-spacing: .005em;
  color: var(--tinta); background: var(--oro);
  padding: .95em 1.5em; border: 0; border-radius: var(--r-peq);
  text-decoration: none; white-space: nowrap; cursor: pointer;
  -webkit-mask: radial-gradient(circle var(--muesca) at 0 50%, #0000 97%, #000) 0 0 / 51% 100% no-repeat,
                radial-gradient(circle var(--muesca) at 100% 50%, #0000 97%, #000) 100% 0 / 51% 100% no-repeat;
          mask: radial-gradient(circle var(--muesca) at 0 50%, #0000 97%, #000) 0 0 / 51% 100% no-repeat,
                radial-gradient(circle var(--muesca) at 100% 50%, #0000 97%, #000) 100% 0 / 51% 100% no-repeat;
  transition: transform .18s var(--ease), background-color .18s ease;
}
.boton:hover { background: var(--oro-claro); }
.boton:active { transform: scale(.98); }
.boton:focus-visible { outline: none; box-shadow: inset 0 0 0 2px var(--tinta), inset 0 0 0 4px var(--oro); }
.boton .icono { width: 1.1em; height: 1.1em; }
.boton--peq { --muesca: 5px; font-size: .92rem; padding: .78em 1.2em; }
.boton--ancho { width: 100%; }
.boton--sombra { background: transparent; color: var(--papel); box-shadow: inset 0 0 0 1px var(--linea-fuerte); -webkit-mask: none; mask: none; }
.boton--sombra:hover { background: rgba(241, 233, 218, .06); }
.boton--peligro { background: var(--rojo); }
.boton--peligro:hover { background: #F6B0A8; }
.boton[disabled], .boton[aria-disabled="true"] { opacity: .5; pointer-events: none; }

.enlace {
  display: inline-flex; align-items: center; gap: .4em;
  font-weight: 500; font-size: 1rem; line-height: 1.4; color: var(--oro);
  background: none; border: 0; padding: .2em 0; cursor: pointer;
  text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: .25em; text-decoration-color: rgba(253, 230, 157, .4);
  transition: color .18s ease, text-decoration-color .18s ease;
}
.enlace:hover { color: var(--oro-claro); text-decoration-color: currentColor; }
.enlace .icono { width: 1em; height: 1em; }
.enlace--niebla { color: var(--niebla); text-decoration-color: rgba(151, 161, 180, .4); }
.enlace--niebla:hover { color: var(--papel); }

/* Volver: siempre arriba a la izquierda en las pantallas interiores */
.volver {
  display: inline-flex; align-items: center; gap: .35rem; margin: 0 0 1.1rem -.55rem; padding: .45rem .8rem .45rem .5rem;
  border-radius: 999px; font-weight: 500; font-size: .98rem; color: var(--papel-suave); text-decoration: none;
  transition: background-color .18s ease, color .18s ease;
}
.volver:hover { background: rgba(241, 233, 218, .07); color: var(--papel); }
.volver .icono { width: 1.15rem; height: 1.15rem; }

.boton-icono {
  display: inline-grid; place-items: center; width: 2.6rem; height: 2.6rem; flex: none;
  background: transparent; border: 1px solid var(--linea-fuerte); border-radius: 50%; color: var(--papel-suave);
  transition: color .18s ease, border-color .18s ease, background-color .18s ease;
}
.boton-icono:hover { color: var(--oro); border-color: var(--filete-fuerte); }

.sello { display: inline-block; padding: .2em .55em; border: 1px solid currentColor; border-radius: 4px; font-size: .8rem; font-weight: 600; color: var(--oro); }

/* Chip (filtros y etiquetas) */
.chip {
  display: inline-flex; align-items: center; gap: .35em;
  font-size: .9rem; font-weight: 500; line-height: 1;
  color: var(--papel-suave); background: rgba(241, 233, 218, .05); border: 1px solid var(--linea); border-radius: var(--r-peq);
  padding: .5em .75em; text-decoration: none; white-space: nowrap; cursor: pointer;
  transition: color .18s ease, border-color .18s ease, background-color .18s ease;
}
.chip:hover { color: var(--papel); border-color: var(--linea-fuerte); }
.chip[aria-pressed="true"] { color: var(--tinta); background: var(--oro); border-color: var(--oro); }
.chip--quieto { cursor: default; }
.chip--quieto:hover { color: var(--papel-suave); border-color: var(--linea); }
.chip button { display: grid; place-items: center; width: 1.2rem; height: 1.2rem; margin: -.2rem -.3rem -.2rem .1rem; border: 0; border-radius: 50%; background: none; color: inherit; }
.chips { display: flex; flex-wrap: wrap; gap: .45rem; }

/* ---------- Estado de un juego: círculo como en cualquier curso ---------- */
.check { position: relative; display: inline-grid; place-items: center; width: 1.6rem; height: 1.6rem; flex: none; border-radius: 50%; box-shadow: inset 0 0 0 1.6px var(--linea-fuerte); color: var(--tinta); }
.check--visto { box-shadow: inset 0 0 0 1.6px var(--niebla); }
.check--visto::after { content: ""; width: .45rem; height: .45rem; border-radius: 50%; background: var(--niebla); }
.check--practicando { box-shadow: inset 0 0 0 1.6px var(--laton); background: conic-gradient(var(--laton) 0 50%, transparent 50%); }
.check--dominado { background: var(--oro); box-shadow: none; }
.check .icono { width: .95rem; height: .95rem; stroke-width: 2.6; }
.estado { display: inline-flex; align-items: center; gap: .4em; font-size: .88rem; font-weight: 500; color: var(--niebla); white-space: nowrap; }
.estado--practicando { color: var(--laton); }
.estado--dominado { color: var(--oro); }

/* Barra de progreso */
.barra { position: relative; height: 6px; background: rgba(241, 233, 218, .08); border-radius: 99px; overflow: hidden; }
.barra__relleno { position: absolute; inset: 0 auto 0 0; background: var(--oro); border-radius: 99px; transition: width .6s var(--ease); }
.barra__practica { position: absolute; inset: 0 auto 0 0; background: rgba(217, 165, 72, .45); border-radius: 99px; }

/* =====================================================================
   CABECERA Y NAVEGACIÓN
   ===================================================================== */
.cab { position: sticky; top: 0; z-index: 50; background: rgba(5, 11, 20, .92); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); border-bottom: 1px solid var(--linea); padding-top: env(safe-area-inset-top, 0px); }
.cab__barra { display: flex; align-items: center; gap: 1.5rem; height: var(--cab); }
.cab__marca { display: flex; align-items: center; gap: .7rem; text-decoration: none; flex: none; }
.cab__marca img { height: 2.4rem; width: auto; }
.cab__marca span { padding-left: .7rem; border-left: 1px solid var(--linea-fuerte); font-weight: 500; font-size: .98rem; color: var(--papel-suave); }
.cab__nav { display: flex; gap: .25rem; margin-left: .75rem; }
.cab__nav a { padding: .45rem .8rem; border-radius: 999px; font-weight: 500; font-size: .98rem; text-decoration: none; color: var(--papel-suave); transition: background-color .18s ease, color .18s ease; }
.cab__nav a:hover { color: var(--papel); background: rgba(241, 233, 218, .06); }
.cab__nav a[aria-current="page"] { color: var(--tinta); background: var(--oro); }
.cab__herramientas { display: flex; align-items: center; gap: .6rem; margin-left: auto; }

.buscador-cab { position: relative; width: min(20rem, 30vw); }
.buscador-cab input { width: 100%; height: 2.5rem; padding: 0 1rem 0 2.5rem; background: rgba(241, 233, 218, .06); border: 1px solid var(--linea); border-radius: 999px; color: var(--papel); font-size: .95rem; transition: border-color .18s ease, background-color .18s ease; }
.buscador-cab input::placeholder { color: var(--niebla); }
.buscador-cab input:focus { outline: none; border-color: var(--filete-fuerte); background: rgba(241, 233, 218, .09); }
.buscador-cab .icono { position: absolute; left: .9rem; top: 50%; transform: translateY(-50%); color: var(--niebla); pointer-events: none; }

.cuenta { position: relative; }
.cuenta__boton { display: grid; place-items: center; width: 2.5rem; height: 2.5rem; border-radius: 50%; background: var(--azul-mirari); color: var(--oro); border: 1px solid var(--filete-fuerte); font-weight: 600; font-size: 1rem; }
.cuenta__boton:hover { border-color: var(--oro); }
.menu { position: absolute; right: 0; top: calc(100% + .6rem); z-index: 60; min-width: 15rem; background: var(--noche); border: 1px solid var(--linea-fuerte); border-radius: var(--r); box-shadow: 0 24px 50px -20px #000; padding: .4rem; }
.menu__cabeza { padding: .6rem .7rem .7rem; border-bottom: 1px solid var(--linea); margin-bottom: .3rem; }
.menu__cabeza strong { display: block; font-weight: 600; }
.menu__cabeza span { font-size: .85rem; color: var(--niebla); word-break: break-all; }
.menu a, .menu button { display: flex; align-items: center; gap: .7rem; width: 100%; padding: .6rem .7rem; background: none; border: 0; border-radius: var(--r-peq); text-align: left; text-decoration: none; color: var(--papel-suave); font-size: .95rem; }
.menu a:hover, .menu button:hover { background: rgba(241, 233, 218, .06); color: var(--papel); }
.menu hr { border: 0; border-top: 1px solid var(--linea); margin: .3rem 0; }

.pestanas { display: none; position: fixed; left: 0; right: 0; bottom: 0; z-index: 50; background: rgba(5, 11, 20, .97); border-top: 1px solid var(--linea); padding-bottom: env(safe-area-inset-bottom, 0px); }
.pestanas ul { list-style: none; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); height: var(--pestanas); }
.pestanas a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .25rem; height: 100%; font-size: .75rem; font-weight: 500; text-decoration: none; color: var(--niebla); }
.pestanas .icono { width: 1.4rem; height: 1.4rem; }
.pestanas a[aria-current="page"] { color: var(--oro); }

.franja { background: var(--azul-mirari); color: var(--papel); font-size: .95rem; }
.franja .caja { display: flex; flex-wrap: wrap; align-items: center; gap: .3rem 1.25rem; padding-block: .6rem; }

/* =====================================================================
   VISTAS
   ===================================================================== */
.vista { padding-block: clamp(1.5rem, 3.5vw, 2.5rem) clamp(4rem, 8vw, 6rem); min-height: 60vh; }
.vista--lectura { max-width: calc(var(--lectura) + var(--margen) * 2); }
.cabecera { padding-bottom: 1.5rem; }
.cabecera .rotulo { margin-bottom: .4rem; }
.cabecera .entradilla { margin-top: .7rem; }
.cabecera__acciones { display: flex; flex-wrap: wrap; align-items: center; gap: .8rem 1.4rem; margin-top: 1.4rem; }

.seccion { margin-top: clamp(2.25rem, 4vw, 3rem); }
.seccion__cab { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: .4rem 1.5rem; margin-bottom: .9rem; }
.rejilla-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 clamp(1.5rem, 4vw, 3rem); }

.tarjeta { position: relative; padding: clamp(1.15rem, 3vw, 1.6rem); background: var(--noche); border: 1px solid var(--linea); border-radius: var(--r); }
.tarjeta--plana { background: transparent; }

/* ---------- Inicio ---------- */
.saludo { display: grid; gap: .6rem; padding-bottom: 1.75rem; }
.saludo h1 { font-size: clamp(2.2rem, 1.5rem + 2.8vw, 3.4rem); }
.frase { position: relative; max-width: 38rem; margin-top: .4rem; padding: .2rem 0 .2rem 1.1rem; border-left: 2px solid var(--laton); }
.frase p { font-style: italic; font-size: 1.12rem; line-height: 1.5; color: var(--papel); }
.frase small { display: block; margin-top: .35rem; font-size: .82rem; color: var(--niebla); }
.resumen { display: grid; gap: .55rem; max-width: 30rem; }
.resumen p { color: var(--papel-suave); }
.resumen strong { color: var(--papel); font-weight: 600; }

.continuar { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 1rem 1.5rem; align-items: center; padding: clamp(1.2rem, 3vw, 1.75rem); background: linear-gradient(120deg, var(--noche-2), var(--noche)); border: 1px solid var(--filete); border-radius: var(--r); }
.continuar__titulo { font-size: clamp(1.35rem, 1.1rem + 1vw, 1.75rem); margin-top: .2rem; }
.continuar__meta { margin-top: .35rem; color: var(--niebla); font-size: .95rem; }

/* ---------- Listas (juegos y clases) ---------- */
.lista { list-style: none; border-top: 1px solid var(--linea); }
.lista > li { border-bottom: 1px solid var(--linea); }
.fila { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: .2rem 1rem; align-items: center; padding: .95rem .35rem; text-decoration: none; color: inherit; border-radius: var(--r-peq); transition: background-color .15s ease; }
a.fila:hover { background: rgba(241, 233, 218, .04); }
a.fila:hover .fila__titulo { color: var(--oro); }
.fila__titulo { display: block; font-weight: 600; font-size: 1.03rem; line-height: 1.35; transition: color .15s ease; }
.fila__meta { display: block; margin-top: .15rem; font-size: .9rem; color: var(--niebla); }
.fila__extra { display: block; margin-top: .3rem; font-size: .92rem; color: var(--papel-suave); }
.fila__lado { display: flex; align-items: center; gap: .7rem; color: var(--niebla); }
.fila__lado .icono { width: 1.1rem; height: 1.1rem; }
.fila__estrella { color: var(--oro); }
.fila__estrella .icono { fill: currentColor; width: 1rem; height: 1rem; }

/* Clase en la lista de clases */
.num-clase { display: grid; place-items: center; width: 2.9rem; height: 2.9rem; border-radius: var(--r-peq); background: var(--noche-2); border: 1px solid var(--filete); font-family: var(--f-display); font-size: 1.35rem; color: var(--oro); font-variant-numeric: lining-nums; }
.num-clase--hecha { background: var(--oro); border-color: var(--oro); color: var(--tinta); }
.fila--clase .fila__meta { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.fila--clase .fila__lado { display: grid; justify-items: end; gap: .35rem; min-width: 7rem; }
.fila--clase .fila__lado .barra { width: 7rem; }
.fila--clase .fila__lado span { font-size: .85rem; }

/* Clase todavía cerrada: número y fecha nítidos; el resto difuminado (sin datos reales detrás) */
.fila--cerrada { cursor: default; }
.fila--cerrada .num-clase { color: var(--niebla); border-color: var(--linea-fuerte); background: transparent; }
.difuminado { display: block; filter: blur(5px); opacity: .55; user-select: none; pointer-events: none; }
.difuminado i { display: inline-block; height: .7em; margin: .25em .4em .1em 0; border-radius: 4px; background: var(--papel-suave); vertical-align: middle; }
.cerrada__fecha { display: inline-flex; align-items: center; gap: .4rem; font-weight: 600; color: var(--papel); }
.cerrada__fecha .icono { width: 1rem; height: 1rem; color: var(--laton); }
.aviso-cerrada { display: flex; gap: 1rem; align-items: flex-start; padding: 1.25rem; border: 1px dashed var(--filete-fuerte); border-radius: var(--r); }
.aviso-cerrada .icono { width: 1.5rem; height: 1.5rem; color: var(--laton); margin-top: .1rem; }
.etiqueta-gestion { display: inline-block; margin-left: .5rem; padding: .1em .45em; border-radius: 4px; background: rgba(217, 165, 72, .15); color: var(--laton); font-size: .78rem; font-weight: 600; vertical-align: .15em; }

/* ---------- Ficha de juego (una sola columna, como una lección) ---------- */
.juego-meta { margin-top: .65rem; color: var(--niebla); font-size: 1rem; }
.reproductor { margin-top: 1.5rem; }
.reproductor__pantalla { position: relative; aspect-ratio: 16 / 9; background: #02060C; border-radius: var(--r); overflow: hidden; box-shadow: 0 0 0 1px var(--linea), 0 30px 60px -35px #000; }
.reproductor__pantalla iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.reproductor__portada { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: .8rem; width: 100%; padding: 1.5rem; border: 0; text-align: center; color: var(--papel); background: radial-gradient(70% 90% at 50% 45%, var(--azul-mirari), #03070D); }
.reproductor__play { display: grid; place-items: center; width: 4.2rem; height: 4.2rem; border-radius: 50%; background: var(--oro); color: var(--tinta); transition: transform .2s var(--ease); }
.reproductor__play .icono { width: 1.6rem; height: 1.6rem; margin-left: .2rem; }
.reproductor__portada:hover .reproductor__play { transform: scale(1.06); }
.reproductor__titulo { font-weight: 500; font-size: .98rem; color: var(--papel-suave); }
.reproductor__barra { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .6rem 1rem; margin-top: .75rem; }
.reproductor__lista { display: flex; flex-wrap: wrap; gap: .4rem; }
.reproductor__aviso { margin-top: .5rem; font-size: .88rem; color: var(--niebla); }

/* Acciones del alumno bajo el vídeo */
.acciones { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 1.25rem; padding-bottom: 1.5rem; border-bottom: 1px solid var(--linea); }
.accion {
  display: inline-flex; align-items: center; gap: .5rem; min-height: 2.75rem; padding: .55rem 1rem;
  background: rgba(241, 233, 218, .05); border: 1px solid var(--linea-fuerte); border-radius: 999px;
  font-weight: 500; font-size: .95rem; color: var(--papel); transition: background-color .18s ease, border-color .18s ease, color .18s ease;
}
.accion:hover { background: rgba(241, 233, 218, .09); }
.accion .icono { width: 1.1rem; height: 1.1rem; }
.accion[aria-pressed="true"] { background: var(--oro); border-color: var(--oro); color: var(--tinta); }
.accion--practica[aria-pressed="true"] { background: var(--laton); border-color: var(--laton); }
.accion--reloj { font-variant-numeric: tabular-nums; }
.accion--reloj.activa { background: var(--azul-mirari); border-color: var(--filete-fuerte); color: var(--oro); }
.acciones__nota { width: 100%; font-size: .88rem; color: var(--niebla); }

/* Marcadores */
.marcadores { margin-top: .9rem; display: flex; flex-wrap: wrap; align-items: center; gap: .45rem; }
.marcador { display: inline-flex; align-items: center; gap: .45rem; padding: .3rem .35rem .3rem .7rem; border: 1px solid var(--linea); border-radius: 999px; font-size: .88rem; color: var(--papel-suave); }
.marcador time { font-weight: 600; color: var(--oro); font-variant-numeric: tabular-nums; }
.marcador button { display: grid; place-items: center; width: 1.5rem; height: 1.5rem; border-radius: 50%; border: 0; background: transparent; color: var(--niebla); }
.marcador button:hover { color: var(--rojo); }
.marcador button .icono { width: .85rem; height: .85rem; }
.marcador-form { display: flex; flex-wrap: wrap; gap: .45rem; align-items: center; width: 100%; }
.marcador-form input { height: 2.5rem; padding: 0 .75rem; background: var(--tinta); border: 1px solid var(--linea-fuerte); border-radius: var(--r-peq); }
.marcador-form input:focus { outline: none; border-color: var(--oro); }
.marcador-form input[name="minuto"] { width: 5.5rem; font-variant-numeric: tabular-nums; }
.marcador-form input[name="texto"] { flex: 1 1 12rem; min-width: 0; }

/* Texto de la lección */
.apartado { margin-top: 2rem; }
.apartado > h2 { margin-bottom: .7rem; }
.apartado p { color: var(--papel-suave); }
.apartado--efecto p { font-size: 1.12rem; color: var(--papel); }
.materiales { list-style: none; display: grid; gap: .1rem; }
.materiales li { position: relative; padding: .35rem 0 .35rem 1.3rem; color: var(--papel-suave); }
.materiales li::before { content: ""; position: absolute; left: .15rem; top: .95rem; width: .4rem; height: .4rem; border-radius: 50%; background: var(--laton); }
.pasos { list-style: none; counter-reset: paso; display: grid; gap: .9rem; }
.pasos li { counter-increment: paso; display: grid; grid-template-columns: 2rem minmax(0, 1fr); gap: 0 .8rem; color: var(--papel-suave); }
.pasos li::before { content: counter(paso); display: grid; place-items: center; width: 1.75rem; height: 1.75rem; margin-top: .05rem; border-radius: 50%; background: var(--noche-2); border: 1px solid var(--filete); font-weight: 600; font-size: .88rem; color: var(--oro); }
.nota-profesor { padding: 1rem 1.15rem; background: var(--noche); border-radius: var(--r); border-left: 3px solid var(--laton); color: var(--papel-suave); }
.enlaces-escena { list-style: none; display: grid; gap: .45rem; }
.enlace-escena { display: flex; align-items: center; gap: .8rem; padding: .75rem .95rem; text-decoration: none; background: var(--noche); border: 1px solid var(--linea); border-radius: var(--r-peq); transition: border-color .18s ease; }
.enlace-escena:hover { border-color: var(--filete-fuerte); }
.enlace-escena .icono { color: var(--oro); }
.enlace-escena span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .97rem; }
.enlace-escena small { font-size: .85rem; color: var(--niebla); }
.relacionados { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 13rem), 1fr)); gap: .6rem; list-style: none; }
.relacionado { display: block; height: 100%; padding: .9rem 1rem; text-decoration: none; background: var(--noche); border: 1px solid var(--linea); border-radius: var(--r-peq); transition: border-color .18s ease; }
.relacionado:hover { border-color: var(--filete-fuerte); }
.relacionado strong { display: block; font-weight: 600; line-height: 1.3; margin-top: .2rem; }
.relacionado span { font-size: .85rem; color: var(--niebla); }
.notas textarea { width: 100%; min-height: 8rem; resize: vertical; padding: .85rem .95rem; line-height: 1.55; background: var(--noche); border: 1px solid var(--linea-fuerte); border-radius: var(--r); color: var(--papel); }
.notas textarea:focus { outline: none; border-color: var(--filete-fuerte); }
.notas__estado { margin-top: .35rem; min-height: 1.2em; font-size: .85rem; color: var(--niebla); }

/* Siguiente / anterior */
.siguiente { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .2rem 1rem; align-items: center; margin-top: 2.5rem; padding: 1.15rem 1.3rem; text-decoration: none; background: var(--noche); border: 1px solid var(--filete); border-radius: var(--r); transition: border-color .18s ease, background-color .18s ease; }
.siguiente:hover { border-color: var(--oro); background: var(--noche-2); }
.siguiente span { font-size: .9rem; color: var(--niebla); }
.siguiente strong { font-weight: 600; font-size: 1.12rem; line-height: 1.3; }
.siguiente .icono { grid-row: 1 / 3; grid-column: 2; width: 1.4rem; height: 1.4rem; color: var(--oro); }
.anterior { margin-top: .9rem; }

/* Flotante del cronómetro */
.flotante { position: fixed; right: 1rem; bottom: 1rem; z-index: 55; display: flex; align-items: center; gap: .8rem; padding: .5rem .5rem .5rem 1rem; background: var(--azul-mirari); border: 1px solid var(--filete-fuerte); border-radius: 999px; box-shadow: 0 20px 40px -18px #000; }
.flotante a { text-decoration: none; display: grid; line-height: 1.2; }
.flotante strong { font-weight: 600; font-size: 1.05rem; color: var(--oro); font-variant-numeric: tabular-nums; }
.flotante small { font-size: .8rem; color: var(--papel-suave); max-width: 12rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- Clase ---------- */
.clase-progreso { display: grid; gap: .45rem; max-width: 24rem; margin-top: 1rem; }
.clase-progreso p { font-size: .95rem; color: var(--niebla); }
.cultura { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 18rem); gap: clamp(1.25rem, 4vw, 3rem); align-items: start; }
.cultura__texto p { color: var(--papel-suave); }
.cultura__texto--plegado { max-height: 14rem; overflow: hidden; -webkit-mask: linear-gradient(#000 55%, transparent); mask: linear-gradient(#000 55%, transparent); }
.cultura h2 { margin-bottom: .7rem; }

/* ---------- Buscar ---------- */
.buscador-grande { position: relative; max-width: 40rem; }
.buscador-grande input { width: 100%; height: 3.3rem; padding: 0 1.1rem 0 3rem; font-size: 1.1rem; background: var(--noche); border: 1px solid var(--linea-fuerte); border-radius: var(--r); color: var(--papel); }
.buscador-grande input:focus { outline: none; border-color: var(--filete-fuerte); }
.buscador-grande .icono { position: absolute; left: 1rem; top: 50%; transform: translateY(-50%); color: var(--niebla); width: 1.3rem; height: 1.3rem; }
.filtros { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: 1rem; }
.filtros select { height: 2.6rem; padding: 0 2.3rem 0 .85rem; background-color: var(--noche); border: 1px solid var(--linea-fuerte); border-radius: var(--r-peq); color: var(--papel); appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--niebla) 50%), linear-gradient(135deg, var(--niebla) 50%, transparent 50%);
  background-position: calc(100% - 1.1rem) 52%, calc(100% - .8rem) 52%; background-size: .3rem .3rem; background-repeat: no-repeat; }
.filtros select:focus { outline: none; border-color: var(--filete-fuerte); }
.resultado-cuenta { margin: 1.5rem 0 .4rem; }

.pestanas-internas { display: flex; gap: .3rem; margin-bottom: 1.25rem; overflow-x: auto; scrollbar-width: none; }
.pestanas-internas button { flex: none; padding: .5rem .9rem; background: none; border: 1px solid transparent; border-radius: 999px; font-weight: 500; font-size: .95rem; color: var(--niebla); }
.pestanas-internas button:hover { color: var(--papel); background: rgba(241, 233, 218, .05); }
.pestanas-internas button[aria-selected="true"] { color: var(--tinta); background: var(--oro); }
.pestanas-internas small { margin-left: .3em; opacity: .75; }

/* ---------- Progreso ---------- */
.datos { display: grid; grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr)); gap: .75rem; }
.dato { padding: 1rem 1.1rem; background: var(--noche); border: 1px solid var(--linea); border-radius: var(--r); }
.dato strong { display: block; font-size: 1.6rem; font-weight: 600; line-height: 1.1; color: var(--papel); font-variant-numeric: tabular-nums; }
.dato span { font-size: .9rem; color: var(--niebla); }
.actividad { display: grid; grid-template-columns: repeat(30, minmax(0, 1fr)); gap: 3px; align-items: end; height: 6rem; }
.actividad span { display: block; background: rgba(241, 233, 218, .08); min-height: 3px; border-radius: 2px; }
.actividad span.si { background: var(--oro); }
.actividad__eje { display: flex; justify-content: space-between; margin-top: .4rem; font-size: .82rem; color: var(--niebla); }
.categorias-progreso { list-style: none; display: grid; gap: .8rem; }
.categorias-progreso li { display: grid; grid-template-columns: minmax(0, 11rem) minmax(0, 1fr) 3.5rem; gap: 1rem; align-items: center; font-size: .95rem; }
.categorias-progreso span:last-child { text-align: right; color: var(--niebla); font-variant-numeric: tabular-nums; }

/* ---------- Vacíos, carga, avisos y diálogos ---------- */
.vacio { padding: 2rem 1.25rem; text-align: center; border: 1px dashed var(--linea-fuerte); border-radius: var(--r); }
.vacio .engranaje { width: 2.6rem; height: 2.6rem; margin: 0 auto .8rem; opacity: .7; }
.vacio h3 { font-size: 1.15rem; }
.vacio p { margin-top: .4rem; color: var(--niebla); max-width: 30rem; margin-inline: auto; }
.vacio .boton, .vacio .enlace { margin-top: 1rem; }
.cargando { display: grid; place-items: center; gap: .8rem; padding: 5rem 1rem; color: var(--niebla); font-size: .95rem; }
.cargando img { width: 2.8rem; height: 2.8rem; animation: girar 6s linear infinite; }
@keyframes girar { to { transform: rotate(360deg); } }

.dialogo { width: min(30rem, calc(100vw - 2rem)); padding: 0; border: 1px solid var(--linea-fuerte); border-radius: var(--r); background: var(--noche); color: var(--papel); box-shadow: 0 40px 80px -30px #000; }
.dialogo::backdrop { background: rgba(2, 6, 12, .72); }
.dialogo__cuerpo { padding: 1.5rem 1.5rem 1.15rem; }
.dialogo__cuerpo h2 { font-size: 1.3rem; }
.dialogo__cuerpo p { margin-top: .6rem; color: var(--papel-suave); }
.dialogo__acciones { display: flex; flex-wrap: wrap; justify-content: flex-end; align-items: center; gap: .7rem 1.2rem; padding: 0 1.5rem 1.4rem; }

.avisos { position: fixed; left: 50%; bottom: 1.25rem; z-index: 95; display: grid; gap: .5rem; transform: translateX(-50%); width: min(26rem, calc(100vw - 2rem)); pointer-events: none; }
.aviso-breve { padding: .75rem 1rem; background: var(--azul-mirari); color: var(--papel); border: 1px solid var(--filete); border-radius: var(--r-peq); font-size: .95rem; box-shadow: 0 20px 40px -20px #000; animation: aparecer .25s var(--ease); }
.aviso-breve--error { border-color: rgba(240, 148, 138, .6); }
@keyframes aparecer { from { opacity: 0; transform: translateY(6px); } }
.aviso { padding: .9rem 1.05rem; border: 1px solid var(--linea-fuerte); border-left: 3px solid var(--laton); border-radius: var(--r-peq); background: var(--noche); font-size: .95rem; }
.aviso--ok { border-left-color: var(--verde); }
.aviso--error { border-left-color: var(--rojo); }
.aviso strong { color: var(--oro); font-weight: 600; }

/* =====================================================================
   FORMULARIOS
   ===================================================================== */
.formulario { display: grid; gap: 1.1rem; }
.formulario__fila { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.1rem; }
.campo { margin: 0; min-width: 0; }
.campo > label, .campo > .etiqueta { display: block; margin-bottom: .4rem; font-weight: 500; font-size: .95rem; color: var(--papel-suave); }
.campo > label small, .campo > .etiqueta small { font-weight: 400; color: var(--niebla); font-size: .88rem; }
.campo input, .campo select, .campo textarea { width: 100%; min-height: 2.9rem; padding: .65rem .85rem; font-size: 1rem; color: var(--papel); background: var(--noche); border: 1px solid var(--linea-fuerte); border-radius: var(--r-peq); transition: border-color .18s ease, box-shadow .18s ease; }
.campo input[readonly] { color: var(--niebla); border-style: dashed; }
.campo select { appearance: none; padding-right: 2.3rem; background-image: linear-gradient(45deg, transparent 50%, var(--niebla) 50%), linear-gradient(135deg, var(--niebla) 50%, transparent 50%); background-position: calc(100% - 1.1rem) 52%, calc(100% - .8rem) 52%; background-size: .3rem .3rem; background-repeat: no-repeat; }
.campo textarea { resize: vertical; min-height: 7.5rem; line-height: 1.55; }
.campo textarea.alto { min-height: 15rem; }
.campo input:focus, .campo select:focus, .campo textarea:focus { outline: none; border-color: var(--filete-fuerte); box-shadow: 0 0 0 3px rgba(253, 230, 157, .12); }
.campo__ayuda { margin-top: .35rem; font-size: .88rem; color: var(--niebla); }
.campo--casilla { display: flex; gap: .65rem; align-items: flex-start; }
.campo--casilla input { width: 1.15rem; min-height: 0; height: 1.15rem; margin-top: .25rem; flex: none; accent-color: var(--oro); }
.campo--casilla label { margin: 0; font-weight: 400; font-size: .98rem; color: var(--papel); }
.campo-clave { position: relative; }
.campo-clave input { padding-right: 3.1rem; }
.campo-clave button { position: absolute; right: .3rem; top: 50%; transform: translateY(-50%); width: 2.4rem; height: 2.4rem; display: grid; place-items: center; background: none; border: 0; color: var(--niebla); }
.campo-clave button:hover { color: var(--oro); }
.fuerza { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; margin-top: .5rem; }
.fuerza span { height: 3px; background: rgba(241, 233, 218, .1); border-radius: 2px; transition: background-color .3s ease; }
.fuerza[data-nivel="1"] span:nth-child(-n+1) { background: var(--rojo); }
.fuerza[data-nivel="2"] span:nth-child(-n+2) { background: var(--laton); }
.fuerza[data-nivel="3"] span:nth-child(-n+3) { background: var(--oro); }
.fuerza[data-nivel="4"] span { background: var(--verde); }

/* =====================================================================
   ACCESO (login, nueva contraseña, verificación)
   ===================================================================== */
.acceso { min-height: 100vh; min-height: 100dvh; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.acceso__escena { position: relative; overflow: hidden; display: flex; flex-direction: column; justify-content: space-between; padding: clamp(1.5rem, 4vw, 3rem);
  background: linear-gradient(180deg, rgba(0, 0, 0, .35), rgba(0, 0, 0, 0) 18%, rgba(0, 0, 0, 0) 75%, rgba(0, 0, 0, .55)), repeating-linear-gradient(90deg, #0A1830 0, #16325D 2.3%, #0C1D3A 4.6%, #071326 6.9%);
  box-shadow: inset -2px 0 0 rgba(217, 165, 72, .55); }
.acceso__escena::before { content: ""; position: absolute; left: 0; right: 0; bottom: 30px; height: 3px; background: var(--laton); }
.acceso__escena::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 30px; background: repeating-linear-gradient(90deg, var(--laton) 0 2px, transparent 2px 6px); -webkit-mask: linear-gradient(#000 40%, transparent); mask: linear-gradient(#000 40%, transparent); }
.acceso__logo { position: relative; width: clamp(9rem, 15vw, 12rem); }
.acceso__lema { position: relative; max-width: 28rem; padding-bottom: 3.5rem; }
.acceso__lema h1 { font-size: clamp(2.3rem, 1.4rem + 3vw, 3.8rem); }
.acceso__lema p { margin-top: .9rem; color: var(--papel-suave); font-size: 1.1rem; }
.acceso__engranaje { display: none; }
.acceso__lado { display: flex; flex-direction: column; justify-content: center; padding: clamp(2rem, 6vw, 5rem) clamp(1.25rem, 6vw, 5rem); }
.acceso__caja { width: 100%; max-width: 24rem; margin-inline: auto; }
.acceso__caja h2 { font-size: 1.6rem; margin-bottom: .4rem; }
.acceso__caja .formulario { margin-top: 1.6rem; }
.acceso__pie { margin-top: 2.5rem; padding-top: 1.1rem; border-top: 1px solid var(--linea); display: flex; flex-wrap: wrap; gap: .3rem 1.2rem; font-size: .85rem; color: var(--niebla); }
.acceso__pie a { color: var(--niebla); text-decoration: none; }
.acceso__pie a:hover { color: var(--oro); }
.resultado { text-align: center; }
.resultado__icono { width: 4rem; height: 4rem; margin: 0 auto 1.1rem; display: grid; place-items: center; border-radius: 50%; color: var(--tinta); background: var(--oro); }
.resultado__icono--error { background: var(--rojo); }
.resultado__icono .icono { width: 1.9rem; height: 1.9rem; stroke-width: 2.2; }

.cookies { position: fixed; left: 1rem; right: 1rem; bottom: 1rem; z-index: 90; max-width: 34rem; margin-inline: auto; display: flex; flex-wrap: wrap; align-items: center; gap: .7rem 1.2rem; padding: .95rem 1.1rem; background: var(--noche); border: 1px solid var(--linea-fuerte); border-radius: var(--r); box-shadow: 0 20px 40px -18px #000; font-size: .9rem; color: var(--papel-suave); }
.cookies p { flex: 1 1 16rem; }
.cookies a { color: var(--oro); }

/* =====================================================================
   PÁGINAS SENCILLAS (perfil, legales) Y TABLAS
   ===================================================================== */
.pagina { padding-block: clamp(1.5rem, 4vw, 2.75rem) clamp(4rem, 8vw, 6rem); }
.pagina__rejilla { display: grid; grid-template-columns: 13rem minmax(0, 1fr); gap: clamp(1.5rem, 4vw, 3rem); align-items: start; margin-top: 1.5rem; }
.lateral { position: sticky; top: calc(var(--cab) + 1.25rem); display: grid; gap: .15rem; }
.lateral a, .lateral button { display: flex; align-items: center; gap: .65rem; padding: .6rem .8rem; width: 100%; text-align: left; background: none; border: 0; border-radius: var(--r-peq); text-decoration: none; font-weight: 500; font-size: .97rem; color: var(--papel-suave); }
.lateral a:hover, .lateral button:hover { color: var(--papel); background: rgba(241, 233, 218, .05); }
.lateral [aria-current="page"], .lateral [aria-selected="true"] { color: var(--tinta); background: var(--oro); }
.lateral .icono { width: 1.1rem; height: 1.1rem; }
.texto-legal { max-width: var(--lectura); }
.texto-legal h1 { margin: .3rem 0 1rem; }
.texto-legal h2 { font-size: 1.25rem; margin: 2rem 0 .7rem; }
.texto-legal h3 { font-size: 1.05rem; margin: 1.4rem 0 .5rem; }
.texto-legal p, .texto-legal li { color: var(--papel-suave); }
.texto-legal ul, .texto-legal ol { padding-left: 1.3rem; margin-top: .6rem; }
.texto-legal li + li { margin-top: .35rem; }
.texto-legal a { color: var(--oro); }
.texto-legal table { width: 100%; border-collapse: collapse; margin-top: 1rem; font-size: .9rem; }
.texto-legal th, .texto-legal td { text-align: left; padding: .6rem .75rem .6rem 0; border-bottom: 1px solid var(--linea); vertical-align: top; }
.texto-legal th { font-weight: 600; color: var(--papel); }
.texto-legal .lead { font-size: 1.1rem; color: var(--papel); }
.texto-legal .updated { margin-top: .7rem; font-size: .88rem; color: var(--niebla); }
.texto-legal .toc { margin-top: 1.6rem; padding: 1rem 1.2rem; background: var(--noche); border-radius: var(--r); }
.texto-legal .toc strong { font-weight: 600; }
.texto-legal .toc a { color: var(--papel-suave); text-decoration: none; }
.texto-legal .toc a:hover { color: var(--oro); }
.texto-legal .placeholder { padding: 0 .35em; border: 1px dashed var(--laton); border-radius: 4px; color: var(--oro); }
.tabla-caja { overflow-x: auto; }
.tabla { width: 100%; border-collapse: collapse; font-size: .95rem; }
.tabla th, .tabla td { text-align: left; vertical-align: middle; padding: .75rem .9rem .75rem 0; border-bottom: 1px solid var(--linea); }
.tabla th { font-weight: 500; font-size: .88rem; color: var(--niebla); white-space: nowrap; }
.tabla td { color: var(--papel-suave); }
.tabla td strong { color: var(--papel); font-weight: 600; }

.pie { border-top: 1px solid var(--linea); padding-block: 1.6rem; font-size: .85rem; color: var(--niebla); }
.pie .caja { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .5rem 1.5rem; }
.pie nav { display: flex; flex-wrap: wrap; gap: .3rem 1.2rem; }
.pie a { color: var(--niebla); text-decoration: none; }
.pie a:hover { color: var(--oro); }

/* =====================================================================
   RESPONSIVE
   ===================================================================== */
@media (max-width: 1000px) {
  .buscador-cab { width: 14rem; }
}
@media (max-width: 860px) {
  :root { --cab: 3.6rem; }
  .cab__nav, .buscador-cab { display: none; }
  .cab__marca img { height: 2.1rem; }
  .pestanas { display: block; }
  body.con-pestanas { padding-bottom: calc(var(--pestanas) + env(safe-area-inset-bottom, 0px)); }
  .flotante, .avisos { bottom: calc(var(--pestanas) + 1rem + env(safe-area-inset-bottom, 0px)); }
  .rejilla-2, .cultura { grid-template-columns: minmax(0, 1fr); }
  .continuar { grid-template-columns: minmax(0, 1fr); }
  .continuar .boton { justify-self: start; }
  .acceso { grid-template-columns: minmax(0, 1fr); }
  .acceso__escena { min-height: 14rem; }
  .acceso__lema { padding-bottom: 2.75rem; }
  .acceso__lema h1 { font-size: clamp(2rem, 1.3rem + 4vw, 2.7rem); }
  .pagina__rejilla { grid-template-columns: minmax(0, 1fr); }
  .lateral { position: static; display: flex; overflow-x: auto; gap: .3rem; scrollbar-width: none; }
  .lateral a, .lateral button { width: auto; flex: none; }
  .formulario__fila { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 560px) {
  .fila { gap: .15rem .8rem; }
  .fila--clase .fila__lado { min-width: 0; }
  .fila--clase .fila__lado .barra { width: 4.5rem; }
  .fila__lado .estado { display: none; }
  .accion { flex: 1 1 calc(50% - .5rem); justify-content: center; }
  .categorias-progreso li { grid-template-columns: minmax(0, 1fr) 3rem; }
  .categorias-progreso .barra { grid-column: 1 / -1; grid-row: 2; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}
@media print {
  .cab, .pestanas, .reproductor, .acciones, .siguiente, .anterior, .flotante, .avisos, .pie, .notas, .volver { display: none !important; }
  body { background: #fff; color: #000; }
  .apartado p, .pasos li, .materiales li { color: #000; }
}
