/*
 * Landing de ModoProfe. Página estática, sin dependencias ni pedidos a terceros (la fuente va en ./fuentes).
 * Los colores salen de src/tema.ts y el logo de assets/marca: si cambian allá, se cambian acá.
 * El amarillo (#FBBF24) no es texto sobre fondo claro (contraste 1,7): sólo relleno o texto sobre el verde oscuro.
 */
@font-face {
  font-family: 'Outfit';
  src: url('fuentes/outfit-latin-wght-normal.woff2') format('woff2-variations');
  font-weight: 100 900;
  font-display: swap;
}

:root {
  --fondo: #f1f7f5;
  --superficie: #ffffff;
  --tinta: #0f172a;
  --tinta-suave: #475569;
  --verde: #0f766e;
  --verde-hondo: #134e4a;
  --menta: #ccfbf1;
  --amarillo: #fbbf24;
  --linea: rgba(15, 23, 42, 0.12);
  --enlace: #0f766e;
  --boton: #0f766e;
  --boton-texto: #ffffff;
  --pista: #0f766e;
  --tilde: #fbbf24;
  --rojo: #b91c1c;
  --curva: cubic-bezier(0.2, 0.9, 0.25, 1);
  --rebote: cubic-bezier(0.34, 1.56, 0.64, 1);
  --ancho: 1180px;
  color-scheme: light;
}

/* El lado del alumno: la misma marca dada vuelta (fondo verde hondo, acción en amarillo). */
html[data-modo='alumno'] {
  --fondo: #0b3b38;
  --superficie: #0f4a46;
  --tinta: #f0fdfa;
  --tinta-suave: #b6ddd7;
  --linea: rgba(240, 253, 250, 0.18);
  --enlace: #5eead4;
  --boton: #fbbf24;
  --boton-texto: #0f172a;
  --pista: #fbbf24;
  --tilde: #0f766e;
  --menta: #115e59;
  --logo-pista: #14b8a6;
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: 'Outfit', ui-rounded, 'Segoe UI', system-ui, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.55;
  color: var(--tinta);
  background: var(--fondo);
  transition: background-color 0.6s var(--curva), color 0.6s var(--curva);
  overflow-x: clip;
}

h1,
h2,
h3,
p {
  margin: 0;
}

a {
  color: var(--enlace);
}

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

html[data-modo='alumno'] :focus-visible {
  outline-color: #ffffff;
}

.contenedor {
  width: min(var(--ancho), 100% - 2.5rem);
  margin-inline: auto;
}

/* Lo que cambia de texto según el lado. */
html[data-modo='profe'] .solo-alumno,
html[data-modo='alumno'] .solo-profe {
  display: none;
}

/* ---------- Cabecera ---------- */
.cabecera {
  position: sticky;
  top: 0;
  z-index: 40;
  background: color-mix(in srgb, var(--fondo) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--linea);
  transition: background-color 0.6s var(--curva);
}

.cabecera .contenedor {
  display: flex;
  align-items: center;
  gap: 1rem;
  height: 60px;
}

.logo {
  display: block;
  height: 30px;
  width: auto;
  margin-right: auto;
}

.logo .pista-logo {
  fill: var(--logo-pista, #0f766e);
  transition: fill 0.6s var(--curva);
}

.logo .letras {
  fill: var(--tinta);
  transition: fill 0.6s var(--curva);
}

.selector {
  display: inline-grid;
  grid-template-columns: 1fr 1fr;
  position: relative;
  padding: 3px;
  border: 1px solid var(--linea);
  border-radius: 999px;
  background: var(--superficie);
  font: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--tinta-suave);
  cursor: pointer;
}

.selector span {
  position: relative;
  z-index: 1;
  padding: 0.3rem 0.85rem;
  transition: color 0.3s;
}

.selector::before {
  content: '';
  position: absolute;
  inset: 3px 50% 3px 3px;
  border-radius: 999px;
  background: var(--boton);
  transition: transform 0.45s var(--rebote), background-color 0.4s;
}

html[data-modo='alumno'] .selector::before {
  transform: translateX(100%);
}

html[data-modo='profe'] .selector .op-profe,
html[data-modo='alumno'] .selector .op-alumno {
  color: var(--boton-texto);
}

.boton {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0.7rem 1.4rem;
  border-radius: 14px;
  background: var(--boton);
  color: var(--boton-texto);
  font-weight: 650;
  text-decoration: none;
  transition: transform 0.2s var(--curva), background-color 0.4s, color 0.4s;
}

.boton:hover {
  transform: translateY(-2px);
}

.boton:active {
  transform: translateY(0) scale(0.98);
}

.boton.chico {
  min-height: 38px;
  padding: 0.35rem 0.95rem;
  border-radius: 11px;
  font-size: 0.92rem;
}

.boton.linea {
  background: transparent;
  color: var(--tinta);
  box-shadow: inset 0 0 0 1.5px var(--linea);
}

/* ---------- Portada ---------- */
.portada {
  padding: clamp(2.5rem, 7vw, 5.5rem) 0 clamp(3rem, 7vw, 6rem);
}

.portada .contenedor {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  align-items: center;
  gap: clamp(2rem, 5vw, 5rem);
}

.portada h1 {
  font-size: clamp(2.5rem, 6.2vw, 4.9rem);
  font-weight: 750;
  line-height: 0.98;
  letter-spacing: -0.035em;
  text-wrap: balance;
}

.portada h1 .liviana {
  display: block;
  font-weight: 300;
}

.portada .bajada {
  margin-top: 1.5rem;
  max-width: 34rem;
  font-size: clamp(1.1rem, 1.6vw, 1.3rem);
  color: var(--tinta-suave);
}

.portada .acciones {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-top: 2rem;
}

.interruptor-grande {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.interruptor-grande svg {
  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
}

.interruptor-grande .pista {
  fill: var(--pista);
  transition: fill 0.6s var(--curva);
}

.interruptor-grande .perilla {
  transition: transform 0.7s var(--rebote);
}

html[data-modo='alumno'] .interruptor-grande .perilla {
  transform: translateX(-164px);
}

.interruptor-grande .tilde {
  fill: var(--tilde);
  transform-box: fill-box;
  transform-origin: center;
  transition: fill 0.5s var(--curva);
}

.interruptor-grande:hover .perilla circle {
  filter: drop-shadow(0 6px 10px rgba(15, 23, 42, 0.25));
}

.interruptor-grande .sombra {
  filter: drop-shadow(0 10px 14px rgba(15, 23, 42, 0.2));
}

.lados {
  display: flex;
  justify-content: space-between;
  margin-top: 0.9rem;
  padding-inline: 8%;
  font-size: clamp(1rem, 1.5vw, 1.2rem);
  font-weight: 600;
  color: var(--tinta-suave);
}

.lados span {
  transition: color 0.4s, transform 0.5s var(--rebote);
}

html[data-modo='profe'] .lados .op-profe,
html[data-modo='alumno'] .lados .op-alumno {
  color: var(--tinta);
  transform: scale(1.12);
}

.pista-de-uso {
  margin-top: 0.6rem;
  text-align: center;
  font-size: 0.95rem;
  color: var(--tinta-suave);
}

/* El único momento orquestado al cargar: el interruptor se prende y recién ahí aparece el título. */
.js .interruptor-grande .perilla {
  animation: prender 0.9s var(--rebote) 0.25s backwards;
}

.js .interruptor-grande .pista {
  animation: pista-prende 0.7s ease-out 0.25s backwards;
}

.js .interruptor-grande .tilde {
  animation: tilde-aparece 0.5s var(--rebote) 0.85s backwards;
}

.js .portada h1 > span,
.js .portada .bajada,
.js .portada .acciones {
  animation: subir 0.8s var(--curva) backwards;
}

.js .portada h1 > span:nth-child(1) {
  animation-delay: 0.75s;
}

.js .portada h1 > span:nth-child(2) {
  animation-delay: 0.87s;
}

.js .portada .bajada {
  animation-delay: 1s;
}

.js .portada .acciones {
  animation-delay: 1.1s;
}

@keyframes prender {
  from {
    transform: translateX(-164px);
  }
}

@keyframes pista-prende {
  from {
    fill: #94a3b8;
  }
}

@keyframes tilde-aparece {
  from {
    transform: scale(0) rotate(-40deg);
    opacity: 0;
  }
}

@keyframes subir {
  from {
    opacity: 0;
    transform: translateY(28px);
  }
}

/* ---------- La historia: capítulos a la izquierda, teléfonos fijos a la derecha ---------- */
.historia {
  position: relative;
  border-top: 1px solid var(--linea);
}

.historia .contenedor {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  column-gap: clamp(1.5rem, 4vw, 4rem);
}

.intro-historia {
  grid-column: 1 / -1;
  padding: clamp(3rem, 7vw, 5.5rem) 0 0;
  max-width: 46rem;
}

.intro-historia h2,
.bloque h2 {
  font-size: clamp(1.9rem, 4vw, 3.1rem);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.025em;
  text-wrap: balance;
}

.intro-historia p,
.bloque > .contenedor > p {
  margin-top: 1rem;
  max-width: 38rem;
  font-size: 1.15rem;
  color: var(--tinta-suave);
}

.escenario {
  grid-column: 2;
  grid-row: 2 / span 7;
  position: sticky;
  top: 60px;
  height: calc(100vh - 60px);
  height: calc(100svh - 60px);
  align-self: start;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(0.6rem, 2vw, 1.8rem);
}

.capitulo {
  grid-column: 1;
  min-height: 92vh;
  min-height: 92svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 2rem 0;
}

.capitulo h3 {
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

.capitulo .orden {
  display: inline-grid;
  place-items: center;
  width: 2.1rem;
  height: 2.1rem;
  margin-bottom: 1rem;
  border-radius: 50%;
  background: var(--boton);
  color: var(--boton-texto);
  font-weight: 700;
  font-size: 1rem;
  transition: background-color 0.4s, color 0.4s;
}

.capitulo .lado {
  position: relative;
  margin-top: 1.1rem;
  padding-left: 1.1rem;
  max-width: 30rem;
  color: var(--tinta-suave);
  transition: color 0.4s, opacity 0.4s;
}

.capitulo .lado::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.2em;
  bottom: 0.2em;
  width: 3px;
  border-radius: 3px;
  background: var(--linea);
  transition: background-color 0.4s;
}

.capitulo .lado b {
  display: block;
  font-weight: 650;
  color: var(--tinta);
}

html[data-modo='profe'] .capitulo .lado.de-profe,
html[data-modo='alumno'] .capitulo .lado.de-alumno {
  color: var(--tinta);
}

html[data-modo='profe'] .capitulo .lado.de-profe::before,
html[data-modo='alumno'] .capitulo .lado.de-alumno::before {
  background: var(--boton);
}

/* Con JS, el capítulo que no está en foco baja el tono: se lee uno por vez. */
.js .capitulo {
  opacity: 0.32;
  transition: opacity 0.5s;
}

.js .capitulo.activo {
  opacity: 1;
}

/* Riel de capítulos, pegado al escenario. */
.riel {
  position: absolute;
  right: -1.15rem;
  top: 50%;
  transform: translateY(-50%);
  display: grid;
  gap: 0.55rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.riel a {
  display: block;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 2px solid var(--tinta-suave);
  transition: transform 0.35s var(--rebote), background-color 0.3s, border-color 0.3s;
}

.riel a.activo {
  background: var(--boton);
  border-color: var(--boton);
  transform: scale(1.35);
}

.oculto-visual {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* ---------- Teléfonos ---------- */
.telefono {
  position: relative;
  flex: none;
  height: min(68vh, 550px);
  height: min(68svh, 550px);
  aspect-ratio: 9 / 18.6;
  container-type: size;
  border-radius: 9% / 4.4%;
  background: #0f172a;
  padding: 1.6%;
  box-shadow: 0 30px 60px -22px rgba(15, 23, 42, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.08) inset;
  transition: transform 0.7s var(--curva), opacity 0.5s, filter 0.5s;
}

.telefono figcaption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: calc(100% + 0.6rem);
  text-align: center;
  font-size: 0.95rem;
  font-weight: 650;
  color: var(--tinta);
}

html[data-modo='profe'] .telefono.de-alumno,
html[data-modo='alumno'] .telefono.de-profe {
  transform: scale(0.86);
  opacity: 0.92;
}

html[data-modo='profe'] .telefono.de-alumno figcaption,
html[data-modo='alumno'] .telefono.de-profe figcaption {
  font-weight: 500;
  color: var(--tinta-suave);
}

.pantalla {
  position: relative;
  height: 100%;
  overflow: hidden;
  border-radius: 8% / 3.9%;
  background: #f8fafc;
  color: #0f172a;
  font-size: 2.42cqh;
  line-height: 1.3;
  isolation: isolate;
}

.escena {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  padding: 3.4em 1em 0;
  opacity: 0;
  visibility: hidden;
  transform: translateX(8%);
  transition: opacity 0.45s, transform 0.55s var(--curva), visibility 0s 0.45s;
}

.escena.activa {
  opacity: 1;
  visibility: visible;
  transform: none;
  transition: opacity 0.45s, transform 0.55s var(--curva);
}

/* Sin JS se ve la primera escena de cada teléfono, quieta. */
html:not(.js) .escena[data-escena='1'] {
  opacity: 1;
  visibility: visible;
  transform: none;
}

.escena .titulo {
  font-size: 1.5em;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.escena .subtitulo {
  margin-top: 0.15em;
  font-size: 0.86em;
  color: #475569;
}

.hora-del-telefono {
  position: absolute;
  top: 1.05em;
  left: 1.4em;
  right: 1.4em;
  z-index: 3;
  display: flex;
  justify-content: space-between;
  font-size: 0.78em;
  font-weight: 650;
}

.hora-del-telefono i {
  width: 3.3em;
  height: 0.75em;
  border-radius: 1em;
  background: #0f172a;
  opacity: 0.85;
}

.pestanas {
  margin: auto -1em 0;
  display: flex;
  justify-content: space-around;
  padding: 0.6em 0.4em 1.1em;
  border-top: 1px solid #e2e8f0;
  background: #ffffff;
  font-size: 0.66em;
  font-weight: 600;
  color: #64748b;
}

.pestanas b {
  color: #0f766e;
  font-weight: 700;
}

.pestanas span,
.pestanas b {
  display: grid;
  justify-items: center;
  gap: 0.35em;
}

.pestanas span::before,
.pestanas b::before {
  content: '';
  width: 1.5em;
  height: 1.5em;
  border-radius: 0.45em;
  background: currentColor;
  opacity: 0.28;
}

.pestanas b::before {
  opacity: 1;
}

.tarjeta {
  margin-top: 0.75em;
  padding: 0.8em 0.85em;
  border-radius: 1em;
  background: #ffffff;
  box-shadow: 0 1px 0 #e2e8f0, 0 0.5em 1.2em -0.9em rgba(15, 23, 42, 0.5);
}

.tarjeta.menta {
  background: #ccfbf1;
  box-shadow: none;
}

.tarjeta.punteada {
  background: transparent;
  box-shadow: inset 0 0 0 1.5px #cbd5e1;
}

.fila {
  display: flex;
  align-items: center;
  gap: 0.65em;
  padding: 0.55em 0;
  border-bottom: 1px solid #eef2f6;
}

.fila:last-child {
  border-bottom: 0;
}

.fila .crece {
  flex: 1;
  min-width: 0;
}

.fila small,
.tarjeta small {
  display: block;
  font-size: 0.78em;
  color: #64748b;
}

.avatar {
  flex: none;
  display: grid;
  place-items: center;
  width: 2.3em;
  height: 2.3em;
  border-radius: 50%;
  background: #ccfbf1;
  color: #134e4a;
  font-size: 0.82em;
  font-weight: 700;
}

.avatar.ambar {
  background: #fef3c7;
  color: #78350f;
}

.avatar.azul {
  background: #dbeafe;
  color: #1e3a8a;
}

.insignia {
  flex: none;
  padding: 0.18em 0.6em;
  border-radius: 1em;
  background: #ccfbf1;
  color: #134e4a;
  font-size: 0.72em;
  font-weight: 700;
  white-space: nowrap;
}

.insignia.debe {
  background: #fee2e2;
  color: #991b1b;
}

.insignia.ambar {
  background: #fef3c7;
  color: #78350f;
}

.boton-app {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4em;
  margin-top: 0.7em;
  padding: 0.7em;
  border-radius: 0.85em;
  background: #0f766e;
  color: #ffffff;
  font-weight: 650;
  font-size: 0.92em;
}

.boton-app.claro {
  background: #ffffff;
  color: #0f766e;
  box-shadow: inset 0 0 0 1.5px #0f766e;
}

.boton-app.mp {
  background: #009ee3;
}

.cifra {
  font-size: 1.55em;
  font-weight: 750;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}

.negrita {
  font-weight: 650;
}

.gris {
  color: #64748b;
}

.derecha {
  margin-left: auto;
}

.dedo {
  position: absolute;
  z-index: 5;
  left: 50%;
  top: 50%;
  width: 2.6em;
  height: 2.6em;
  margin: -1.3em 0 0 -1.3em;
  border-radius: 50%;
  background: rgba(15, 23, 42, 0.22);
  box-shadow: 0 0 0 0.25em rgba(15, 23, 42, 0.07);
  pointer-events: none;
  opacity: 0;
}

/* --- Línea de tiempo de cada escena: todo lo que tiene .a entra con su retraso (--i, en ms) cuando la escena se activa. --- */
.escena .a {
  opacity: 0;
}

.escena.activa .a {
  animation: entra 0.55s var(--curva) calc(var(--i, 0) * 1ms) both;
}

.escena.activa .a.salta {
  animation-name: salta;
  animation-timing-function: var(--rebote);
}

.escena.activa .a.desliza {
  animation-name: desliza;
}

/* Un estado que cambia: .antes se va y .despues llega en el mismo lugar. */
.cambia {
  display: inline-grid;
}

.cambia > * {
  grid-area: 1 / 1;
}

.escena .despues {
  opacity: 0;
}

.escena.activa .antes {
  animation: se-va 0.35s ease-in calc(var(--i, 0) * 1ms) both;
}

.escena.activa .despues {
  animation: llega 0.5s var(--rebote) calc(var(--i, 0) * 1ms + 200ms) both;
}

.escena.activa .dedo {
  animation: toca 0.9s ease-out calc(var(--i, 0) * 1ms) both;
}

.escena.activa .pulsa {
  animation: pulsa 0.5s ease-out calc(var(--i, 0) * 1ms) both;
}

@keyframes entra {
  from {
    opacity: 0;
    transform: translateY(0.9em);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes salta {
  from {
    opacity: 0;
    transform: scale(0.5);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes desliza {
  from {
    opacity: 0;
    transform: translateX(-1.6em);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes se-va {
  to {
    opacity: 0;
    transform: translateY(-0.5em) scale(0.9);
  }
}

@keyframes llega {
  from {
    opacity: 0;
    transform: translateY(0.5em) scale(0.85);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes toca {
  0% {
    opacity: 0;
    transform: scale(1.5);
  }
  35% {
    opacity: 1;
    transform: scale(1);
  }
  55% {
    opacity: 1;
    transform: scale(0.8);
  }
  100% {
    opacity: 0;
    transform: scale(1.2);
  }
}

@keyframes pulsa {
  40% {
    transform: scale(0.95);
  }
}

/* Sin JS no hay línea de tiempo: se muestra el estado final. */
html:not(.js) .escena .a,
html:not(.js) .escena .despues {
  opacity: 1;
}

html:not(.js) .escena .antes {
  opacity: 0;
}

html:not(.js) .capitulo {
  opacity: 1;
}

/* --- Piezas propias de cada escena --- */
.codigo {
  display: flex;
  gap: 0.28em;
  margin-top: 0.5em;
}

.codigo span {
  flex: 1;
  display: grid;
  place-items: center;
  aspect-ratio: 1 / 1.25;
  border-radius: 0.45em;
  background: #ffffff;
  box-shadow: inset 0 0 0 1.5px #cbd5e1;
  font-weight: 700;
  font-size: 0.95em;
}

.codigo.lleno span {
  background: #0f766e;
  box-shadow: none;
  color: #ffffff;
}

.codigo span i {
  font-style: normal;
}

.semana {
  display: flex;
  justify-content: space-between;
  margin-top: 0.7em;
  font-size: 0.78em;
  font-weight: 600;
  color: #64748b;
  text-align: center;
}

.semana span {
  width: 2.5em;
  padding: 0.35em 0;
  border-radius: 0.8em;
}

.semana b {
  display: block;
  font-size: 1.25em;
  color: #0f172a;
}

.semana .hoy {
  background: #0f766e;
  color: #ccfbf1;
}

.semana .hoy b {
  color: #ffffff;
}

.cupo {
  display: flex;
  gap: 0.28em;
  margin-top: 0.55em;
}

.cupo i {
  flex: 1;
  height: 0.5em;
  border-radius: 0.5em;
  background: #e2e8f0;
}

.cupo i.ocupado {
  background: #0f766e;
}

.escena.activa .cupo i.se-ocupa {
  animation: se-ocupa 0.5s var(--rebote) calc(var(--i, 0) * 1ms) both;
}

@keyframes se-ocupa {
  from {
    background: #e2e8f0;
    transform: scaleY(1);
  }
  50% {
    transform: scaleY(2.4);
  }
  to {
    background: #fbbf24;
    transform: scaleY(1);
  }
}

.tilde-lista {
  flex: none;
  position: relative;
  width: 1.7em;
  height: 1.7em;
  border-radius: 50%;
  box-shadow: inset 0 0 0 1.5px #cbd5e1;
}

.tilde-lista::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: #0f766e
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6 12.5l4 4 8-9' fill='none' stroke='%23fff' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E")
    center / 70% no-repeat;
  transform: scale(0);
}

.tilde-lista.falta::after {
  background-color: #94a3b8;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M7 12h10' fill='none' stroke='%23fff' stroke-width='3' stroke-linecap='round'/%3E%3C/svg%3E");
}

.escena.activa .tilde-lista::after {
  animation: salta 0.4s var(--rebote) calc(var(--i, 0) * 1ms) both;
}

html:not(.js) .tilde-lista::after {
  transform: none;
}

.mes {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 0.4em;
  margin-top: 0.6em;
}

.mes i {
  aspect-ratio: 1;
  border-radius: 0.4em;
  background: #eef2f6;
}

.mes i.vino {
  background: #0f766e;
}

.mes i.falto {
  background: #fbbf24;
}

.mes i.hoy {
  box-shadow: 0 0 0 2px #0f172a;
}

.anillo {
  position: relative;
  width: 6.4em;
  height: 6.4em;
  flex: none;
}

.anillo svg {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.anillo circle {
  fill: none;
  stroke-width: 10;
  stroke-linecap: round;
}

.anillo .fondo {
  stroke: #e2e8f0;
}

/* r = 44: la circunferencia es 276,46. El avance sale de --lleno (0 a 1). */
.anillo .avance {
  stroke: #0f766e;
  stroke-dasharray: 276.46;
  stroke-dashoffset: calc(276.46 * (1 - var(--lleno, 0.64)));
  transition: stroke-dashoffset 1.1s var(--curva);
}

.escena.activa .anillo .avance.sube {
  animation: sube 1.1s var(--curva) calc(var(--i, 0) * 1ms) both;
}

/* De 64 % a 71 % de la circunferencia. */
@keyframes sube {
  from {
    stroke-dashoffset: 99.53;
  }
  to {
    stroke-dashoffset: 80.17;
  }
}

.anillo .centro {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-weight: 750;
  font-size: 1.15em;
  font-variant-numeric: tabular-nums;
}

.serie {
  position: relative;
  display: flex;
  gap: 0.4em;
  margin-top: 0.55em;
}

.serie span {
  position: relative;
  flex: 1;
  padding: 0.4em 0;
  border-radius: 0.6em;
  box-shadow: inset 0 0 0 1.5px #cbd5e1;
  text-align: center;
  font-size: 0.8em;
  font-weight: 650;
  overflow: hidden;
}

.serie span {
  isolation: isolate;
}

.serie span::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background: #0f766e;
  transform: scaleX(0);
  transform-origin: left;
}

.serie span.hecha {
  color: #ffffff;
  box-shadow: none;
}

.serie span.hecha::before {
  transform: none;
}

.escena.activa .serie span.se-hace {
  animation: texto-claro 0.01s linear calc(var(--i, 0) * 1ms + 150ms) both;
}

.escena.activa .serie span.se-hace::before {
  animation: llenar 0.45s var(--curva) calc(var(--i, 0) * 1ms) both;
}

@keyframes llenar {
  to {
    transform: none;
  }
}

@keyframes texto-claro {
  to {
    color: #ffffff;
    box-shadow: none;
  }
}

.descanso {
  display: flex;
  align-items: center;
  gap: 0.8em;
}

.descanso .anillo {
  width: 4.4em;
  height: 4.4em;
}

.descanso .anillo .avance {
  stroke: #fbbf24;
  stroke-dashoffset: 0;
  transition: none;
}

.escena.activa .descanso .anillo .avance {
  animation: vaciar 45s linear calc(var(--i, 0) * 1ms) both;
}

@keyframes vaciar {
  to {
    stroke-dashoffset: 276.46;
  }
}

.chat {
  display: flex;
  flex-direction: column;
  gap: 0.45em;
  margin-top: 0.8em;
  flex: 1;
}

.burbuja {
  max-width: 82%;
  padding: 0.5em 0.75em;
  border-radius: 1.1em 1.1em 1.1em 0.3em;
  background: #ffffff;
  box-shadow: 0 1px 0 #e2e8f0;
  font-size: 0.9em;
  transform-origin: left bottom;
}

.burbuja.mia {
  align-self: flex-end;
  border-radius: 1.1em 1.1em 0.3em 1.1em;
  background: #0f766e;
  color: #ffffff;
  box-shadow: none;
  transform-origin: right bottom;
}

.burbuja small {
  display: block;
  margin-top: 0.15em;
  font-size: 0.72em;
  text-align: right;
  opacity: 0.75;
}

.escribiendo {
  display: inline-flex;
  gap: 0.25em;
  padding: 0.65em 0.8em;
}

.escribiendo i {
  width: 0.42em;
  height: 0.42em;
  border-radius: 50%;
  background: #64748b;
}

.escena.activa .escribiendo i {
  animation: punto 1s ease-in-out infinite;
}

.escribiendo i:nth-child(2) {
  animation-delay: 0.15s !important;
}

.escribiendo i:nth-child(3) {
  animation-delay: 0.3s !important;
}

@keyframes punto {
  0%,
  60%,
  100% {
    transform: none;
    opacity: 0.5;
  }
  30% {
    transform: translateY(-0.3em);
    opacity: 1;
  }
}

.escribiendo.temporal {
  opacity: 0;
}

.escena.activa .escribiendo.temporal {
  animation: aparece-y-se-va 1.6s ease-out calc(var(--i, 0) * 1ms) both;
}

@keyframes aparece-y-se-va {
  0% {
    opacity: 0;
    transform: scale(0.6);
  }
  15%,
  85% {
    opacity: 1;
    transform: none;
  }
  100% {
    opacity: 0;
    transform: scale(0.9);
  }
}

.entrada-chat {
  margin: 0.6em 0 0.9em;
  padding: 0.65em 0.9em;
  border-radius: 1.4em;
  background: #ffffff;
  box-shadow: inset 0 0 0 1.5px #e2e8f0;
  font-size: 0.86em;
  color: #94a3b8;
}

.grafico {
  display: block;
  width: 100%;
  height: auto;
  margin-top: 0.5em;
  overflow: visible;
}

.grafico .eje {
  stroke: #e2e8f0;
  stroke-width: 1;
}

.grafico .trazo {
  fill: none;
  stroke: #0f766e;
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 1;
  stroke-dashoffset: 0;
}

.escena.activa .grafico .trazo {
  animation: dibujar 1.4s var(--curva) calc(var(--i, 0) * 1ms) both;
}

@keyframes dibujar {
  from {
    stroke-dashoffset: 1;
  }
}

.grafico .relleno {
  fill: #ccfbf1;
}

.escena.activa .grafico .relleno {
  animation: entra-suave 0.8s ease-out calc(var(--i, 0) * 1ms + 700ms) both;
}

@keyframes entra-suave {
  from {
    opacity: 0;
  }
}

.grafico .barra {
  fill: #0f766e;
  transform-box: fill-box;
  transform-origin: bottom;
}

.grafico .barra.otra {
  fill: #fbbf24;
}

.escena.activa .grafico .barra {
  animation: crecer 0.7s var(--rebote) calc(var(--i, 0) * 1ms) both;
}

@keyframes crecer {
  from {
    transform: scaleY(0);
  }
}

.grafico .punto-final {
  fill: #fbbf24;
  stroke: #0f172a;
  stroke-width: 2;
  transform-box: fill-box;
  transform-origin: center;
}

.escena.activa .grafico .punto-final {
  animation: salta 0.4s var(--rebote) calc(var(--i, 0) * 1ms) both;
}

.leyenda {
  display: flex;
  gap: 0.9em;
  margin-top: 0.4em;
  font-size: 0.74em;
  color: #475569;
}

.leyenda i {
  display: inline-block;
  width: 0.7em;
  height: 0.7em;
  margin-right: 0.3em;
  border-radius: 0.2em;
  background: #0f766e;
}

.leyenda i.otra {
  background: #fbbf24;
}

/* El tilde del logo, que viaja de un teléfono al otro cuando pasa algo. */
.mensajero {
  position: absolute;
  left: 0;
  top: 0;
  z-index: 6;
  width: 46px;
  height: 46px;
  margin: -23px 0 0 -23px;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 8px 18px -6px rgba(15, 23, 42, 0.55);
  opacity: 0;
  pointer-events: none;
}

.mensajero svg {
  display: block;
  width: 100%;
  height: 100%;
}

/* ---------- Bloques de después de la historia ---------- */
.bloque {
  padding: clamp(3.5rem, 8vw, 6.5rem) 0;
  border-top: 1px solid var(--linea);
}

.rubros {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin: 2rem 0 0;
  padding: 0;
  list-style: none;
}

.rubros button {
  padding: 0.55rem 1rem;
  border: 1.5px solid var(--linea);
  border-radius: 999px;
  background: transparent;
  color: var(--tinta);
  font: inherit;
  font-weight: 550;
  cursor: pointer;
  transition: background-color 0.3s, color 0.3s, border-color 0.3s, transform 0.3s var(--rebote);
}

.rubros button[aria-pressed='true'] {
  background: var(--boton);
  border-color: var(--boton);
  color: var(--boton-texto);
  transform: scale(1.04);
}

.bloque > .contenedor > .frase {
  margin-top: 2.2rem;
  color: var(--tinta);
  max-width: 54rem;
  font-size: clamp(1.5rem, 3.6vw, 2.7rem);
  font-weight: 300;
  line-height: 1.25;
  letter-spacing: -0.02em;
}

.frase .palabra {
  display: inline-block;
  font-weight: 700;
  border-bottom: 0.12em solid var(--amarillo);
  white-space: nowrap;
}

.frase .palabra.cambiando {
  animation: rueda 0.5s var(--curva);
}

@keyframes rueda {
  0% {
    transform: translateY(0);
    opacity: 1;
  }
  45% {
    transform: translateY(-0.5em);
    opacity: 0;
  }
  55% {
    transform: translateY(0.5em);
    opacity: 0;
  }
  100% {
    transform: none;
    opacity: 1;
  }
}

.bloque > .contenedor > .nota-rubro {
  margin-top: 1.4rem;
  max-width: 38rem;
  color: var(--tinta-suave);
}

.cierre {
  text-align: center;
}

.cierre h2 {
  max-width: 18ch;
  margin-inline: auto;
}

.cierre > .contenedor > p {
  margin-inline: auto;
}

.cierre .acciones {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.8rem;
  margin-top: 2rem;
}

.bloque > .contenedor > .donde {
  margin-top: 1.6rem;
  font-size: 0.98rem;
  color: var(--tinta-suave);
}

.pie {
  padding: 2rem 0 2.6rem;
  border-top: 1px solid var(--linea);
  font-size: 0.95rem;
  color: var(--tinta-suave);
}

.pie .contenedor {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.6rem 1.6rem;
}

.pie .logo {
  height: 24px;
  margin-right: auto;
}

/* ---------- Anchos intermedios: no entran dos teléfonos al lado del texto; queda el del lado elegido ---------- */
@media (max-width: 1180px) {
  html[data-modo='profe'] .telefono.de-alumno,
  html[data-modo='alumno'] .telefono.de-profe {
    display: none;
  }

  .mensajero {
    display: none;
  }

  .riel {
    right: 0;
  }
}

/* ---------- Pantallas angostas: un teléfono (el del lado elegido) fijo arriba, el texto corre debajo ---------- */
@media (max-width: 860px) {
  .portada .contenedor {
    grid-template-columns: 1fr;
  }

  .portada .lado-interruptor {
    order: -1;
    width: min(100%, 300px);
    margin-inline: auto;
  }

  .cabecera .boton {
    display: none;
  }

  .historia .contenedor {
    display: block;
  }

  .escenario {
    top: 60px;
    z-index: 2;
    height: 56vh;
    height: 56svh;
    margin-inline: -1.25rem;
    padding-top: 1.9rem;
    align-items: flex-start;
    overflow: hidden;
    background: var(--fondo);
    border-bottom: 1px solid var(--linea);
    transition: background-color 0.6s var(--curva);
  }

  /* El teléfono es más alto que el escenario y se corta abajo: así la letra de adentro no queda diminuta. */
  .telefono {
    height: 74vh;
    height: 74svh;
  }

  .telefono figcaption {
    bottom: calc(100% + 0.25rem);
    font-size: 0.85rem;
  }

  .escenario::after {
    content: '';
    position: absolute;
    inset: auto 0 0;
    height: 3.2rem;
    background: linear-gradient(to top, var(--fondo), transparent);
    pointer-events: none;
  }

  .capitulo {
    min-height: 70vh;
    min-height: 70svh;
    justify-content: flex-start;
    padding: 2.2rem 0 1rem;
  }

  .riel {
    right: 0.6rem;
    z-index: 3;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-delay: 0ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .descanso .anillo .avance {
    animation: none !important;
  }

  .mensajero {
    display: none;
  }
}

/* Chips de filtro y de día (como los de Alumnos y los del selector de día de «Mi rutina»). */
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35em;
  margin: 0.2em 0 0.55em;
}

.chip {
  padding: 0.2em 0.7em;
  border: 1px solid #d6d3d1;
  border-radius: 1em;
  color: #57534e;
  font-size: 0.72em;
  font-weight: 650;
  white-space: nowrap;
}

.chip.activo {
  border-color: #0f766e;
  background: #0f766e;
  color: #ffffff;
}

.progreso-dia {
  margin: 0 0 0.4em;
  font-size: 0.85em;
  font-weight: 700;
}

/* Monto e insignia a la derecha de una fila de cuota, como en Pagos. */
.fila .lado {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.2em;
  font-size: 0.9em;
}
