/* Rimay · campus de inglés. Azul Titicaca + rojo andino, fondo claro, componentes planos.
   Un bloque por componente; los colores salen solo de estas variables. */

@font-face { font-family: "Fredoka"; src: url("fuentes/fredoka.woff2") format("woff2"); font-weight: 300 700; font-display: swap; }
:root {
    --letra: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --titulo: "Fredoka", var(--letra);
    --azul: #2f6ad0; --azul-fuerte: #2353a8; --azul-suave: #e4eefc; --rojo: #e0457b;
    --rosa: #e0457b; --rosa-suave: #fde6ee; --lila: #7a5cc8; --lila-suave: #eee8fb;
    --amarillo: #b98300; --amarillo-suave: #fff4c7; --verde: #2e9a5f; --verde-suave: #e1f5e9;
    --ambar: #b45309; --error: #c0392b;
    --fondo: #fffaf3; --superficie: #fff; --superficie-2: #faf5ee; --borde: #eadfd2; --borde-fuerte: #d9cbbb;
    --texto: #2b2238; --suave: #5b5168; --tenue: #857a90; --renglon: rgb(47 106 208 / .06);
    --radio: 16px; --sombra: 0 2px 0 #efe4d6;
    color-scheme: light;
}
[data-tema="oscuro"] {
    --azul: #8bb3f5; --azul-fuerte: #b0cbf8; --azul-suave: #1d2a44; --rojo: #f48fb1;
    --rosa: #f48fb1; --rosa-suave: #3a2130; --lila: #b9a5f2; --lila-suave: #2a2442; --amarillo: #f2c94c; --amarillo-suave: #3a3218;
    --verde: #6fd39b; --verde-suave: #1b3326; --ambar: #fbbf24; --error: #f87171;
    --fondo: #17141f; --superficie: #201b2b; --superficie-2: #272135; --borde: #362e47; --borde-fuerte: #463c5a;
    --texto: #f1ecf7; --suave: #c3b9d1; --tenue: #9a8fab; --renglon: rgb(255 255 255 / .03); --sombra: none; color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
    [data-tema="auto"] {
        --azul: #8bb3f5; --azul-fuerte: #b0cbf8; --azul-suave: #1d2a44; --rojo: #f48fb1;
        --rosa: #f48fb1; --rosa-suave: #3a2130; --lila: #b9a5f2; --lila-suave: #2a2442; --amarillo: #f2c94c; --amarillo-suave: #3a3218;
        --verde: #6fd39b; --verde-suave: #1b3326; --ambar: #fbbf24; --error: #f87171;
        --fondo: #17141f; --superficie: #201b2b; --superficie-2: #272135; --borde: #362e47; --borde-fuerte: #463c5a;
        --texto: #f1ecf7; --suave: #c3b9d1; --tenue: #9a8fab; --renglon: rgb(255 255 255 / .03); --sombra: none; color-scheme: dark;
    }
}
/* Nombres que usan las prácticas antiguas: todos apuntan a la paleta institucional. */
:root, [data-tema] { --acento: var(--azul); --acento-2: var(--azul); --sol: var(--azul); --coral: var(--rojo); --lago: var(--azul);
    --bien: var(--verde); --duda: var(--ambar); --falta: var(--error); --vidrio: var(--superficie-2); --vidrio-2: var(--borde); }

/* ─── Base ─────────────────────────────────────────────────────────────── */
* { box-sizing: border-box; }
body { margin: 0; font: 15.5px/1.55 var(--letra); color: var(--texto); -webkit-font-smoothing: antialiased;
    background: repeating-linear-gradient(var(--fondo) 0 31px, var(--renglon) 31px 32px), var(--fondo); }
h1, h2, h3, .marca, .kpi b, .nota, .precio { font-family: var(--titulo); font-weight: 600; letter-spacing: 0; margin: 0 0 .5rem; }
h1 { font-size: 1.7rem; } h2 { font-size: 1.15rem; } h3 { font-size: 1rem; }
p { margin: 0 0 .75rem; }
a { color: var(--azul); }
img, svg { display: block; }
[hidden] { display: none !important; }
.oculto { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.saltar { position: absolute; top: -99px; left: 1rem; z-index: 99; padding: .5rem 1rem; background: var(--azul); color: #fff; border-radius: 8px; }
.saltar:focus { top: .5rem; }
:focus-visible { outline: 2px solid var(--azul); outline-offset: 2px; }
.icono svg, .boton svg, .icono-boton svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }

/* ─── Campus: barra superior institucional ─────────────────────────────── */
.campus { position: sticky; top: 0; z-index: 20; background: var(--superficie); border-bottom: 3px dashed var(--borde-fuerte); }
.campus-dentro { max-width: 1180px; margin: 0 auto; height: 62px; padding: 0 1.5rem; display: flex; align-items: center; gap: 1.6rem; }
.marca { display: flex; align-items: center; gap: .55rem; color: var(--texto); text-decoration: none; font-weight: 750; font-size: 1.1rem; }
.marca small { font-weight: 500; color: var(--tenue); font-size: .8rem; }
.marca img { border-radius: 7px; }
.menu { display: flex; gap: .2rem; flex: 1; }
.menu a { padding: .45rem .75rem; border-radius: 8px; color: var(--suave); text-decoration: none; font-weight: 600; font-size: .93rem; }
.menu a:hover { color: var(--texto); background: var(--superficie-2); }
.menu a.activo { color: var(--azul); background: var(--azul-suave); }
.menu a .icono { display: none; }
.herramientas { display: flex; align-items: center; gap: .5rem; margin-left: auto; }
.icono-boton { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 8px; border: 1px solid var(--borde); background: var(--superficie); color: var(--suave); cursor: pointer; }
.icono-boton .luna, [data-tema="oscuro"] .icono-boton .sol-i { display: none; }
[data-tema="oscuro"] .icono-boton .luna { display: block; }
@media (prefers-color-scheme: dark) { [data-tema="auto"] .icono-boton .sol-i { display: none; } [data-tema="auto"] .icono-boton .luna { display: block; } }
.plan-etiqueta { padding: .3rem .6rem; border-radius: 6px; font-size: .78rem; font-weight: 700; text-decoration: none; background: var(--azul-suave); color: var(--azul); }
.plan-etiqueta.gratis { background: var(--superficie-2); color: var(--suave); }
.plan-etiqueta.admin-etiqueta { background: #c8372d; color: #fff; }
.usuario-chip { height: 36px; display: flex; align-items: center; padding: 0 .75rem; border-radius: 8px; border: 1px solid var(--borde); color: var(--texto); text-decoration: none; font-weight: 600; font-size: .9rem; max-width: 160px; overflow: hidden; white-space: nowrap; }
.contenido { max-width: 1180px; margin: 0 auto; padding: 1.8rem 1.5rem 4rem; }
.pie-sitio { max-width: 1180px; margin: 0 auto; padding: 1.2rem 1.5rem 2rem; display: flex; gap: 1.2rem; flex-wrap: wrap; color: var(--tenue); font-size: .82rem; border-top: 1px solid var(--borde); }
.pie-sitio a { color: var(--tenue); }
.pestanas-movil { display: none; }

/* ─── Títulos y estructura ─────────────────────────────────────────────── */
.titulo-pagina { margin-bottom: 1.4rem; }
.sub { color: var(--suave); margin: 0; }
.meta { color: var(--tenue); font-size: .85rem; }
.subtitulo, .grupo { margin: 1.8rem 0 .7rem; font-size: .76rem; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--tenue); }
.separado { margin-top: 1.2rem; }
.titulo-fila { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: .75rem; }
.titulo-fila h2 { margin: 0; }
.dos { display: grid; gap: 1rem; grid-template-columns: 1.5fr 1fr; align-items: start; }
.escenario, .ancho-lectura { max-width: 760px; margin: 0 auto; }
.escenario { text-align: center; }
.vacio { color: var(--tenue); padding: .8rem 0; }

/* ─── Tarjetas, cifras, listas ─────────────────────────────────────────── */
.tarjeta { background: var(--superficie); border: 1.5px solid var(--borde); border-radius: var(--radio); padding: 1.2rem 1.3rem; box-shadow: var(--sombra); }
a.tarjeta { display: block; color: var(--texto); text-decoration: none; }
a.tarjeta:hover { border-color: var(--borde-fuerte); }
.practicas, .rejilla, .rejilla-funciones, .accesos { display: grid; gap: .9rem; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.practica { display: flex; flex-direction: column; gap: .35rem; }
.practica p, .funcion p { color: var(--suave); font-size: .92rem; margin: 0; }
.practica .pie { margin-top: auto; padding-top: .5rem; color: var(--tenue); font-size: .82rem; font-weight: 600; }
.icono-grande { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 8px; background: var(--azul-suave); }
.icono-grande svg { width: 20px; height: 20px; fill: none; stroke: var(--azul); stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
.cifras { display: grid; gap: .9rem; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); }
.kpi span, .cifra .que { color: var(--tenue); font-size: .84rem; }
.kpi b, .cifra .numero { display: block; font-size: 1.65rem; font-weight: 700; line-height: 1.2; letter-spacing: -.02em; }
.kpi b small, .cifra .numero small { font-size: .82rem; font-weight: 500; color: var(--tenue); }
.lista { list-style: none; margin: 0; padding: 0; border: 1px solid var(--borde); border-radius: var(--radio); background: var(--superficie); }
.lista > * { display: flex; align-items: center; gap: .8rem; padding: .75rem 1rem; border-bottom: 1px solid var(--borde); color: var(--texto); text-decoration: none; }
.lista > *:last-child { border-bottom: 0; }
.lista > a:hover { background: var(--superficie-2); }
.lista > a { display: grid; gap: .1rem; }
.tabla { width: 100%; border-collapse: collapse; font-size: .92rem; }
.tabla th { text-align: left; padding: .55rem .6rem; border-bottom: 1px solid var(--borde); color: var(--tenue); font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; }
.tabla td { padding: .65rem .6rem; border-bottom: 1px solid var(--borde); vertical-align: middle; }
.tabla tr:last-child td { border-bottom: 0; }
.tabla td a { font-weight: 600; text-decoration: none; }
.desliza { overflow-x: auto; }
.chip { display: inline-flex; align-items: center; gap: .3rem; padding: .15rem .55rem; border-radius: 6px; font-size: .78rem; font-weight: 650; background: var(--superficie-2); color: var(--suave); border: 1px solid var(--borde); }
.chip.sol, .chip.lago { background: var(--azul-suave); color: var(--azul); border-color: transparent; }
.barra-progreso, .barra-avance, .nivel-voz, .progreso { display: block; height: 6px; border-radius: 3px; background: var(--superficie-2); overflow: hidden; }
.barra-progreso > span, .barra-avance > span, .nivel-voz > span, .progreso > span { display: block; height: 100%; width: 0; background: var(--azul); transition: width .25s; }
.ancho-0{width:0}.ancho-1{width:10%}.ancho-2{width:20%}.ancho-3{width:30%}.ancho-4{width:40%}.ancho-5{width:50%}.ancho-6{width:60%}.ancho-7{width:70%}.ancho-8{width:80%}.ancho-9{width:90%}.ancho-10{width:100%}

/* ─── Botones y formularios ────────────────────────────────────────────── */
.boton { display: inline-flex; align-items: center; justify-content: center; gap: .45rem; min-height: 40px; padding: .5rem 1rem; border-radius: 999px;
    border: 1px solid var(--borde-fuerte); background: var(--superficie); color: var(--texto); font: 600 .93rem var(--letra); text-decoration: none; cursor: pointer; }
.boton:hover { background: var(--superficie-2); }
.boton.primario, .boton.lago { background: var(--azul); border-color: var(--azul); color: #fff; }
.boton.primario:hover, .boton.lago:hover { background: var(--azul-fuerte); }
[data-tema="oscuro"] .boton.primario, [data-tema="oscuro"] .boton.lago { color: #0b1626; }
.boton.chico { min-height: 32px; padding: .3rem .7rem; font-size: .85rem; }
.boton.grande { min-height: 46px; padding: .7rem 1.3rem; font-size: 1rem; }
.boton.ancho { width: 100%; }
.boton:disabled { opacity: .5; cursor: default; }
.botones { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
.botones.centro { justify-content: center; }
.enlace { background: none; border: 0; padding: 0; color: var(--azul); font: inherit; cursor: pointer; text-decoration: underline; }
.enlace.quitar { color: var(--error); }
input, textarea, select { width: 100%; padding: .55rem .75rem; border: 1px solid var(--borde-fuerte); border-radius: 8px; background: var(--superficie); color: var(--texto); font: inherit; }
input[type="radio"], input[type="checkbox"] { width: auto; padding: 0; accent-color: var(--azul); }
textarea { min-height: 7rem; resize: vertical; }
.formulario { display: flex; flex-direction: column; gap: .8rem; text-align: left; }
.formulario label { display: flex; flex-direction: column; gap: .3rem; font-size: .88rem; font-weight: 600; color: var(--suave); }
.checkbox { flex-direction: row !important; align-items: center; font-weight: 500 !important; }
fieldset { border: 0; padding: 0; margin: 0 0 1rem; }
legend { margin-bottom: .45rem; font-size: .88rem; font-weight: 600; color: var(--suave); }
fieldset label { display: inline-flex; align-items: center; gap: .45rem; margin: 0 .4rem .4rem 0; padding: .45rem .8rem; border: 1px solid var(--borde-fuerte); border-radius: 8px; cursor: pointer; }
fieldset label:has(input:checked), .segmentos button[aria-pressed="true"] { border-color: var(--azul); background: var(--azul-suave); color: var(--azul); }
.segmentos { display: inline-flex; gap: .3rem; }
.segmentos button { padding: .4rem .8rem; border: 1px solid var(--borde-fuerte); border-radius: 8px; background: var(--superficie); color: var(--texto); font: inherit; cursor: pointer; }

/* ─── Avisos ───────────────────────────────────────────────────────────── */
.aviso, .alerta, .comentario, .retro { padding: .7rem .9rem; border-radius: 8px; border: 1px solid var(--borde); background: var(--azul-suave); margin: .6rem 0; text-align: left; }
.aviso.error, .alerta, .comentario.mal, .retro.mal { background: color-mix(in srgb, var(--error) 8%, transparent); border-color: color-mix(in srgb, var(--error) 30%, transparent); }
.comentario.bien, .retro.bien { background: color-mix(in srgb, var(--verde) 8%, transparent); border-color: color-mix(in srgb, var(--verde) 30%, transparent); }
.toast { position: fixed; left: 50%; bottom: 24px; z-index: 90; transform: translate(-50%, 10px); opacity: 0; pointer-events: none; padding: .6rem 1rem;
    border-radius: 8px; background: var(--texto); color: var(--fondo); font-weight: 600; transition: .2s; max-width: calc(100vw - 32px); }
.toast.visible { opacity: 1; transform: translate(-50%, 0); }
.toast-bien { background: var(--verde); color: #fff; } .toast-mal { background: var(--error); color: #fff; }
.como-funciona { margin-bottom: 1.2rem; padding: 1rem 1.2rem; border: 1px solid var(--borde); border-left: 3px solid var(--azul); border-radius: var(--radio); background: var(--superficie); }
.como-funciona h2 { font-size: 1rem; }
.pasos-como { list-style: none; padding: 0; margin: 0 0 .9rem; display: grid; gap: .5rem; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); color: var(--suave); font-size: .92rem; }
.pasos-como b { color: var(--azul); }
.ayuda-como { margin-bottom: 1rem; padding: 0; border: 0; background: none; color: var(--azul); font: 600 .88rem var(--letra); text-decoration: underline; cursor: pointer; }

/* ─── Curso: portadas de ciclo (estilo plataforma de cursos), libreta y certificado ─── */
.cursos { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); }
.tarjeta.portada-curso, .portada-curso { display: flex; flex-direction: column; overflow: hidden; padding: 0; color: var(--texto); text-decoration: none; }
.portada-curso .cubierta { height: 86px; padding: .8rem 1rem; display: flex; flex-direction: column; justify-content: space-between; color: #fff; background: var(--azul); }
.portada-curso .cubierta b { font-size: 1.6rem; line-height: 1; }
.portada-curso .cubierta span { font-size: .75rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; opacity: .85; }
.nivel-basico .cubierta { background: #2f6ad0; }
.nivel-intermedio .cubierta { background: #2e9a5f; }
.nivel-avanzado .cubierta { background: #7a5cc8; }
.portada-curso .cuerpo { padding: .9rem 1rem 1rem; display: flex; flex-direction: column; gap: .4rem; flex: 1; }
.portada-curso .cuerpo p { color: var(--suave); font-size: .9rem; margin: 0; }
.portada-curso.bloqueado { opacity: .55; }
.modulo { display: flex; align-items: center; gap: .8rem; padding: .7rem 0; border-bottom: 1px solid var(--borde); }
.modulo:last-child { border-bottom: 0; }
.modulo .estado-modulo { width: 22px; height: 22px; flex: none; border-radius: 50%; border: 2px solid var(--borde-fuerte); }
.modulo.hecho .estado-modulo { border-color: var(--verde); background: var(--verde); }
.nota { font-weight: 750; font-variant-numeric: tabular-nums; }
.nota.aprobada { color: var(--verde); } .nota.desaprobada { color: var(--error); }
.certificado { max-width: 820px; margin: 0 auto; padding: 3rem; text-align: center; border: 2px solid var(--azul); outline: 6px double var(--borde); outline-offset: -14px; background: var(--superficie); }
@media print { .campus, .pie-sitio, .pestanas-movil, .no-imprimir { display: none !important; } body { background: #fff; } }

/* ─── Inicio (panel) ───────────────────────────────────────────────────── */
.saludo-panel { display: flex; justify-content: space-between; align-items: flex-end; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.2rem; }
.saludo-panel h1 { margin: 0; }
.continuar-panel { display: grid; grid-template-columns: 1fr auto; gap: 1rem; align-items: center; border-left: 4px solid var(--rojo); }
.etiqueta { font-size: .75rem; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--tenue); }
.tareas { list-style: none; margin: 0; padding: 0; }
.tarea { display: flex; align-items: center; gap: .8rem; padding: .7rem 0; border-bottom: 1px solid var(--borde); }
.tarea:last-child { border-bottom: 0; }
.marca-tarea { width: 20px; height: 20px; flex: none; border-radius: 50%; border: 2px solid var(--borde-fuerte); }
.tarea.hecha .marca-tarea { background: var(--verde); border-color: var(--verde); }
.tarea.hecha b { color: var(--tenue); text-decoration: line-through; }
.que-tarea { flex: 1; display: flex; flex-direction: column; line-height: 1.3; }
.que-tarea span { color: var(--tenue); font-size: .84rem; }
.barras { height: 120px; display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: .4rem; align-items: end; }
.barra { height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: .25rem; font-size: .72rem; color: var(--tenue); }
.barra .columna { width: 100%; max-width: 30px; min-height: 3px; border-radius: 4px 4px 2px 2px; background: var(--azul); }
.barra .columna.vacia { background: var(--borde); }
.barra.hoy .dia { color: var(--texto); font-weight: 700; }
.alto-0{height:3px}.alto-1{height:10%}.alto-2{height:20%}.alto-3{height:30%}.alto-4{height:40%}.alto-5{height:50%}.alto-6{height:60%}.alto-7{height:70%}.alto-8{height:80%}.alto-9{height:90%}.alto-10{height:100%}

/* ─── Historias (práctica a pantalla completa, tipo stories) ──────────── */
.historias-fila { display: flex; gap: .9rem; overflow-x: auto; padding-bottom: .3rem; }
.historia-burbuja { flex: none; width: 76px; display: flex; flex-direction: column; align-items: center; gap: .3rem; color: var(--texto); text-decoration: none; font-size: .78rem; font-weight: 600; text-align: center; }
.historia-burbuja span:first-child { width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-size: 1.1rem; color: #fff;
    background: #2f6ad0; box-shadow: 0 0 0 3px var(--fondo), 0 0 0 5px var(--rosa); }
.historia-burbuja.vista span:first-child { box-shadow: 0 0 0 3px var(--fondo), 0 0 0 5px var(--borde-fuerte); }
.historias { position: fixed; inset: 0; z-index: 100; background: #0b1220; color: #fff; display: flex; justify-content: center; }
.historia { position: relative; width: min(480px, 100%); height: 100%; display: flex; flex-direction: column; padding: 1rem 1.2rem calc(1.2rem + env(safe-area-inset-bottom)); }
.segmentos-historia { display: flex; gap: 4px; }
.segmentos-historia i { flex: 1; height: 3px; border-radius: 2px; background: rgb(255 255 255 / .3); overflow: hidden; }
.segmentos-historia i.vista { background: #fff; }
.segmentos-historia i.actual::after { content: ""; display: block; height: 100%; width: 0; background: #fff; animation: llenar var(--dur, 9s) linear forwards; }
@keyframes llenar { to { width: 100%; } }
.historia-cabeza { display: flex; justify-content: space-between; align-items: center; margin: .8rem 0; font-size: .85rem; opacity: .85; }
.historia-cabeza button { background: none; border: 0; color: #fff; font-size: 1.6rem; line-height: 1; cursor: pointer; }
.historia-cuerpo { flex: 1; display: flex; flex-direction: column; justify-content: center; gap: .8rem; text-align: center; }
.historia-cuerpo .tipo { font-size: .75rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: #f3b1ab; }
.historia-cuerpo .grande { font-size: clamp(1.8rem, 7vw, 2.6rem); font-weight: 750; line-height: 1.15; }
.historia-cuerpo .chica { color: rgb(255 255 255 / .75); font-size: 1.05rem; }
.historia .boton { background: rgb(255 255 255 / .12); border-color: rgb(255 255 255 / .25); color: #fff; }
.historia .boton.primario { background: #fff; color: #0b1220; }
.historia .opciones-ej { display: grid; gap: .5rem; }
.historia .opcion-ej { padding: .8rem; border-radius: 10px; border: 1px solid rgb(255 255 255 / .25); background: rgb(255 255 255 / .08); color: #fff; font: inherit; font-size: 1.05rem; cursor: pointer; }
.historia .opcion-ej.correcta { background: #15803d; border-color: #15803d; }
.historia .opcion-ej.incorrecta { background: #b91c1c; border-color: #b91c1c; }
.zona-toque { position: absolute; top: 80px; height: 30%; width: 35%; z-index: 1; border: 0; background: none; cursor: pointer; }
.zona-toque.izq { left: 0; } .zona-toque.der { right: 0; }

/* ─── Prácticas de voz (frases, responder, ensayar, escuchar, lecciones) ── */
.microfono { position: relative; width: 96px; height: 96px; margin: 1.2rem auto .4rem; display: grid; place-items: center; border: 0; border-radius: 50%;
    background: var(--azul); color: #fff; cursor: pointer; box-shadow: 0 0 0 6px var(--azul-suave); }
.microfono svg { width: 38px; height: 38px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.microfono.grabando { background: var(--error); box-shadow: 0 0 0 6px color-mix(in srgb, var(--error) 18%, transparent); }
.microfono.pensando, .microfono[data-fase="pensando"], .microfono[data-fase="transcribiendo"] { background: var(--tenue); }
.microfono:disabled { opacity: .5; cursor: default; }
.microfono.chico, .chico-mic { width: 64px; height: 64px; margin: 0; }
.nivel-voz { width: 160px; margin: .3rem auto 0; }
.fase-mic, .estado { min-height: 1.5em; margin: .4rem 0; text-align: center; color: var(--suave); font-size: .9rem; }
.boton-voz { width: 38px; height: 38px; flex: none; display: inline-grid; place-items: center; border-radius: 8px; border: 1px solid var(--borde-fuerte); background: var(--superficie); color: var(--azul); cursor: pointer; }
.boton-voz svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.boton-voz.chico { width: 32px; height: 32px; }
.boton-voz.sonando { background: var(--azul-suave); border-color: var(--azul); }
.frase-en, .frase-dia-en { font-size: clamp(1.4rem, 4vw, 2rem); font-weight: 650; line-height: 1.3; margin: .8rem 0 .3rem; }
.frase-en.chica { font-size: 1.25rem; }
.frase-es { color: var(--suave); font-size: 1.05rem; }
.frase-es.borrosa { filter: blur(6px); cursor: pointer; user-select: none; }
.escondida { color: var(--tenue); font-size: 1.2rem; margin: 1rem 0; }
.marcas { font-size: clamp(1.3rem, 3.6vw, 1.8rem); line-height: 1.6; }
.marcas .bien { color: var(--verde); } .marcas .dudosa { color: var(--ambar); text-decoration: underline wavy; } .marcas .falta { color: var(--error); text-decoration: line-through; }
.leyenda { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; font-size: .82rem; color: var(--tenue); }
.oido { color: var(--suave); font-style: italic; }
.puntaje, .latencia { font-size: 2.6rem; font-weight: 750; line-height: 1; margin: .4rem 0; }
.puntaje.alto, .latencia.rapida { color: var(--verde); } .puntaje.medio, .latencia.media { color: var(--ambar); } .puntaje.bajo, .latencia.lenta { color: var(--error); }
.resultado { margin-top: 1rem; padding-top: 1rem; border-top: 1px solid var(--borde); }
.cajas { display: inline-flex; gap: 4px; } .cajas i { width: 9px; height: 9px; border-radius: 50%; background: var(--borde); } .cajas i.llena { background: var(--azul); }
.reloj { position: relative; width: 140px; height: 140px; margin: 0 auto; }
.reloj svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.reloj circle { fill: none; stroke-width: 9; } .reloj .pista { stroke: var(--borde); }
.reloj .avance { stroke: var(--azul); stroke-linecap: round; stroke-dasharray: 427; } .reloj .avance.tarde { stroke: var(--ambar); } .reloj .avance.muy-tarde { stroke: var(--error); }
.reloj .centro { position: absolute; inset: 0; display: grid; place-items: center; font-size: 2rem; font-weight: 700; }
.revelada { margin-top: 1rem; padding: 1rem; border-radius: 8px; background: var(--superficie-2); text-align: left; }
.revelada .fila { display: flex; gap: .6rem; align-items: center; margin-bottom: .5rem; }
.revelada .etiqueta { min-width: 92px; }
.chat { max-width: 760px; margin: 0 auto; padding-bottom: 10rem; display: flex; flex-direction: column; gap: .7rem; }
.burbuja { max-width: 85%; padding: .8rem 1rem; border-radius: 12px; border: 1px solid var(--borde); background: var(--superficie); }
.burbuja.rimay { align-self: flex-start; } .burbuja.ella { align-self: flex-end; background: var(--azul-suave); }
.burbuja .texto { margin: 0; } .burbuja .ayuda { margin: .3rem 0 0; color: var(--suave); font-size: .92rem; }
.burbuja .correccion { margin: .5rem 0 0; padding-top: .5rem; border-top: 1px dashed var(--borde); color: var(--verde); display: flex; gap: .5rem; align-items: center; }
.burbuja .acciones { display: flex; gap: .4rem; margin-top: .4rem; }
.escribiendo { align-self: flex-start; color: var(--tenue); font-style: italic; }
.barra-chat { position: fixed; left: 0; right: 0; bottom: 0; z-index: 15; padding: .8rem 1.5rem calc(.8rem + env(safe-area-inset-bottom)); background: var(--superficie); border-top: 1px solid var(--borde); }
.barra-chat .dentro, .barra-chat .opciones { max-width: 760px; margin: 0 auto; display: flex; gap: .7rem; align-items: center; flex-wrap: wrap; }
.barra-chat form { flex: 1; display: flex; gap: .5rem; }
.barra-chat .microfono { width: 56px; height: 56px; margin: 0; }
.oraciones { display: flex; flex-direction: column; gap: .5rem; }
.oracion { display: flex; gap: .8rem; width: 100%; padding: .75rem 1rem; text-align: left; border-radius: 8px; border: 1px solid var(--borde); background: var(--superficie); color: var(--texto); font: inherit; cursor: pointer; }
.oracion.activa { border-color: var(--azul); background: var(--azul-suave); }
.oracion .n { min-width: 1.5rem; color: var(--tenue); } .oracion .t { flex: 1; }
.p { font-weight: 700; font-size: .85rem; } .p.bien { color: var(--verde); } .p.regular { color: var(--ambar); } .p.baja { color: var(--error); } .p.nueva { color: var(--tenue); }
.panel-ensayo { position: sticky; top: 90px; text-align: center; }
.cifras-mini { display: flex; gap: 1.2rem; justify-content: center; flex-wrap: wrap; color: var(--suave); font-size: .9rem; }
.cifras-mini b { display: block; color: var(--texto); font-size: 1.2rem; }
.guiones { display: grid; gap: .7rem; } .guion { display: flex; gap: 1rem; align-items: center; } .guion .que { flex: 1; }
.pestanas { display: flex; flex-wrap: wrap; gap: .3rem; justify-content: center; }
.pestanas button { min-height: 36px; padding: .35rem .85rem; border-radius: 8px; border: 1px solid var(--borde-fuerte); background: var(--superficie); color: var(--suave); font: 600 .9rem var(--letra); cursor: pointer; }
.pestanas button.activa { background: var(--azul); border-color: var(--azul); color: #fff; }
.leccion { text-align: left; } .leccion h1, .leccion .objetivo, .leccion .frase-en, .leccion .frase-es, .consigna, .final { text-align: center; }
.pasos-leccion { display: flex; justify-content: center; gap: .4rem; flex-wrap: wrap; margin-bottom: .6rem; }
.pasos-leccion span { padding: .2rem .7rem; border-radius: 6px; font-size: .82rem; font-weight: 650; color: var(--tenue); background: var(--superficie-2); }
.pasos-leccion span.activo { background: var(--azul); color: #fff; }
.tabla-leccion { width: 100%; border-collapse: collapse; margin: .4rem 0 1rem; }
.tabla-leccion td { padding: .5rem .6rem; border-bottom: 1px solid var(--borde); } .tabla-leccion td:first-child { font-weight: 650; color: var(--azul); }
.ejemplo-caja { display: flex; gap: .8rem; align-items: center; margin: .5rem 0; padding: .7rem 1rem; border-radius: 8px; background: var(--azul-suave); }
.palabra-grande { text-align: center; } .palabra-grande .en { font-size: clamp(2rem, 6vw, 2.8rem); font-weight: 750; color: var(--azul); margin: .4rem 0 0; }
.palabra-voz { background: none; border: 0; padding: 0; color: inherit; font: inherit; cursor: pointer; text-align: left; }
.palabra-voz:hover { color: var(--azul); text-decoration: underline dotted; }
.irregular-txt, .verbos tr.irregular td:first-child .palabra-voz { color: var(--rojo); font-weight: 650; }
.opciones-ej { display: grid; gap: .6rem; grid-template-columns: repeat(2, 1fr); margin: 1rem 0; }
.opcion-ej, .ficha { padding: .8rem 1rem; border-radius: 8px; border: 1px solid var(--borde-fuerte); background: var(--superficie); color: var(--texto); font: inherit; font-size: 1.02rem; cursor: pointer; }
.opcion-ej:hover:not(:disabled), .ficha:hover:not(:disabled) { border-color: var(--azul); }
.opcion-ej.correcta { background: color-mix(in srgb, var(--verde) 12%, transparent); border-color: var(--verde); }
.opcion-ej.incorrecta { background: color-mix(in srgb, var(--error) 10%, transparent); border-color: var(--error); }
.armado { min-height: 3.2rem; margin: 1rem 0 .6rem; padding: .6rem; display: flex; flex-wrap: wrap; gap: .4rem; justify-content: center; border: 1px dashed var(--borde-fuerte); border-radius: 8px; }
.fichas { display: flex; flex-wrap: wrap; gap: .4rem; justify-content: center; } .ficha { padding: .4rem .75rem; } .ficha:disabled { opacity: .3; }
.pie-leccion { display: flex; justify-content: space-between; gap: .6rem; flex-wrap: wrap; margin-top: 1.4rem; }
.texto-escucha, .pregunta-escucha { text-align: left; }
.oracion-escucha { display: inline; padding: 0 .1em; border: 0; border-radius: 4px; background: none; color: var(--texto); font: inherit; font-size: 1.1rem; line-height: 1.8; cursor: pointer; }
.oracion-escucha:hover, .oracion-escucha.sonando { background: var(--azul-suave); }
.tarjeta-ielts { margin: .6rem 0 1rem; padding: 1rem 1.2rem; border-radius: 8px; background: var(--superficie-2); text-align: left; }
.bandas { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: .6rem; margin: 1rem 0; }
.banda { padding: .8rem; border-radius: 8px; background: var(--superficie-2); text-align: center; } .banda b { display: block; font-size: 1.8rem; color: var(--azul); }
.pares { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; margin: .8rem 0; } .par { display: flex; gap: .4rem; justify-content: center; }
.guardar-flotante { position: absolute; z-index: 50; padding: .35rem .75rem; border: 0; border-radius: 8px; background: var(--azul); color: #fff; font: 600 .85rem var(--letra); cursor: pointer; }
.aviso-flotante { position: fixed; left: 50%; bottom: 90px; z-index: 60; transform: translateX(-50%); padding: .7rem 1rem; border-radius: 8px; background: var(--texto); color: var(--fondo); max-width: 90vw; }
.escribir summary, .hallazgo summary { cursor: pointer; color: var(--azul); font-weight: 650; }
.lista-simple { list-style: none; margin: 0; padding: 0; display: grid; gap: .6rem; text-align: left; }
.oyentes { display: grid; gap: .8rem; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); margin-top: 1rem; }
.oyente { display: flex; flex-direction: column; gap: .3rem; padding: 1rem; text-align: left; font: inherit; color: var(--texto); cursor: pointer; }
.oyente.activa, .grupo-sonido.activa { border-color: var(--azul); background: var(--azul-suave); }
.zona-subida { display: flex; flex-direction: column; align-items: center; gap: .3rem; padding: 1.6rem 1rem; text-align: center; cursor: pointer; border: 1.5px dashed var(--borde-fuerte); border-radius: var(--radio); background: var(--superficie-2); }
.zona-subida:hover, .zona-subida.encima { border-color: var(--azul); background: var(--azul-suave); }
.progreso-subida { padding: 1rem; border-radius: 8px; background: var(--superficie-2); }
.fila-subida { display: flex; justify-content: space-between; gap: 1rem; align-items: center; }
.barra-subida { height: 8px; margin: .6rem 0; border-radius: 4px; background: var(--borde); overflow: hidden; } .barra-subida span { display: block; height: 100%; width: 0; background: var(--azul); transition: width .3s; }

/* ─── Público: portada, precios, acceso, cuenta ────────────────────────── */
.heroe { display: grid; grid-template-columns: 1.1fr .9fr; gap: 2.5rem; align-items: center; padding: 2rem 0; }
.heroe h1 { font-size: clamp(2rem, 4.5vw, 2.7rem); line-height: 1.12; letter-spacing: -.03em; }
.heroe-sub { color: var(--suave); font-size: 1.08rem; max-width: 34rem; }
.etiqueta-heroe { display: inline-block; margin-bottom: .9rem; padding: .25rem .7rem; border-radius: 6px; background: var(--azul-suave); color: var(--azul); font-size: .8rem; font-weight: 650; }
.fila-muestra { display: flex; justify-content: space-between; padding: .55rem 0; border-bottom: 1px solid var(--borde); font-size: .92rem; } .fila-muestra:last-child { border-bottom: 0; }
.seccion-landing { padding: 1.5rem 0; }
.funcion { padding: 1.1rem 1.2rem; border: 1px solid var(--borde); border-radius: var(--radio); background: var(--superficie); }
.llamado { display: flex; justify-content: space-between; align-items: center; gap: 1.2rem; margin: 1.5rem 0; }
.planes { display: grid; grid-template-columns: repeat(2, minmax(0, 360px)); justify-content: center; gap: 1rem; margin: 1rem 0 2rem; }
.plan { position: relative; display: flex; flex-direction: column; gap: .4rem; } .plan.destacado { border: 2px solid var(--azul); }
.cinta { position: absolute; top: -11px; left: 50%; transform: translateX(-50%); padding: .2rem .7rem; border-radius: 6px; background: var(--rojo); color: #fff; font-size: .75rem; font-weight: 700; }
.precio { font-size: 2.2rem; font-weight: 750; margin: 0; } .precio small { font-size: 1rem; color: var(--tenue); }
.incluye { list-style: none; padding: 0; margin: .6rem 0 1rem; display: grid; gap: .45rem; flex: 1; }
.incluye li::before { content: "✓ "; color: var(--verde); font-weight: 700; }
.preguntas-frecuentes { max-width: 720px; margin: 0 auto 2rem; }
.preguntas-frecuentes details { padding: .9rem 0; border-bottom: 1px solid var(--borde); } .preguntas-frecuentes summary { font-weight: 650; cursor: pointer; }
.acceso { max-width: 420px; margin: 2.5rem auto; padding: 1.8rem; }
.legal { max-width: 760px; margin: 0 auto; } .legal p { color: var(--suave); }
.plan-actual { display: flex; gap: .6rem; align-items: center; flex-wrap: wrap; }
.insignia { padding: .2rem .55rem; border-radius: 6px; background: var(--azul-suave); color: var(--azul); font-size: .78rem; font-weight: 700; }

/* ─── Celular: menú en pestañas abajo ──────────────────────────────────── */
@media (max-width: 900px) {
    body { padding-bottom: 64px; }
    .menu, .plan-etiqueta, .marca small { display: none; } .usuario-chip { max-width: 110px; }
    .campus-dentro, .contenido, .pie-sitio { padding-left: 16px; padding-right: 16px; }
    .pestanas-movil { position: fixed; inset: auto 0 0 0; z-index: 30; display: flex; justify-content: space-around;
        padding: .3rem .2rem calc(.3rem + env(safe-area-inset-bottom)); background: var(--superficie); border-top: 1px solid var(--borde); }
    .pestanas-movil a { display: flex; flex-direction: column; align-items: center; gap: .1rem; padding: .3rem .5rem; color: var(--tenue); text-decoration: none; font-size: .7rem; font-weight: 600; }
    .pestanas-movil a.activo { color: var(--azul); }
    .dos, .heroe, .continuar-panel { grid-template-columns: 1fr; }
    .planes, .opciones-ej { grid-template-columns: 1fr; }
    .barra-chat { bottom: 60px; }
    .panel-ensayo { position: static; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
.historia { transition: background .3s; }
.historia.t0 { background: #17407a; } .historia.t1 { background: #0f6b6b; } .historia.t2 { background: #7a2a4a; } .historia.t3 { background: #8a4b12; } .historia.t4 { background: #b23a2f; }
@media (min-width: 600px) { .historia { margin: 1.5rem 0; height: calc(100% - 3rem); border-radius: 16px; } }

/* ─── Cuaderno: fichas de estudio (Guías y secciones con pestaña) ─────── */
.c-rosa { --c: var(--rosa); --cs: var(--rosa-suave); } .c-lila { --c: var(--lila); --cs: var(--lila-suave); }
.c-amarillo { --c: var(--amarillo); --cs: var(--amarillo-suave); } .c-verde { --c: var(--verde); --cs: var(--verde-suave); }
.c-azul { --c: var(--azul); --cs: var(--azul-suave); }
.ficha-titulo { text-align: center; margin: .5rem 0 1.6rem; }
.ficha-titulo h1 { font-size: clamp(2rem, 6vw, 3rem); color: var(--c, var(--texto)); line-height: 1.1; }
.ficha-titulo .cinta-titulo { display: inline-block; padding: .3rem 1.2rem; border-radius: 6px; background: var(--cs, var(--lila-suave)); color: var(--texto); font-family: var(--titulo); }
.fichas-rejilla { display: grid; gap: 1.6rem 1.2rem; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); align-items: start; }
.seccion-ficha { position: relative; margin-top: .9rem; padding: 1.6rem 1.2rem 1.1rem; border: 2px solid var(--c); border-radius: var(--radio); background: var(--superficie); }
.seccion-ficha > .pestana { position: absolute; top: -.95rem; left: 1rem; padding: .2rem .9rem; border-radius: 999px; background: var(--cs); border: 2px solid var(--c);
    color: var(--texto); font: 600 .95rem var(--titulo); }
.puntos { list-style: none; margin: 0; padding: 0; display: grid; gap: .35rem; }
.puntos li { display: flex; align-items: baseline; gap: .5rem; }
.puntos li::before { content: ""; width: 8px; height: 8px; flex: none; border-radius: 50%; background: var(--c, var(--azul)); transform: translateY(-1px); }
.puntos b { color: var(--texto); } .puntos .es { color: var(--suave); }
.puntos .boton-voz { margin-left: auto; }
.tabla-ficha { width: 100%; border-collapse: separate; border-spacing: 0; border: 1.5px solid var(--c); border-radius: 10px; overflow: hidden; font-size: .93rem; }
.tabla-ficha th { background: var(--cs); color: var(--texto); padding: .45rem .6rem; text-align: left; font-family: var(--titulo); font-weight: 600; }
.tabla-ficha td { padding: .45rem .6rem; border-top: 1px solid var(--borde); }
.t-presente { color: var(--azul); } .t-pasado { color: var(--rosa); } .t-futuro { color: var(--verde); }
.tiempos-ficha th.t-presente { background: var(--azul-suave); } .tiempos-ficha th.t-pasado { background: var(--rosa-suave); } .tiempos-ficha th.t-futuro { background: var(--verde-suave); }
.tiempos-ficha td:not(:first-child) { font-family: var(--titulo); font-size: 1.05rem; }
.nota-adhesiva { position: relative; margin: 1rem auto; max-width: 360px; padding: 1.1rem 1.1rem .9rem; background: var(--amarillo-suave); color: var(--texto);
    box-shadow: 0 3px 8px rgb(0 0 0 / .08); transform: rotate(-1.2deg); font-family: var(--titulo); }
.nota-adhesiva::before { content: ""; position: absolute; top: -10px; left: 50%; width: 70px; height: 20px; transform: translateX(-50%) rotate(2deg); background: rgb(224 69 123 / .35); }
.nota-adhesiva b { color: var(--rosa); }
.pasos-ficha { display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; list-style: none; margin: 0; padding: 0; counter-reset: p; }
.pasos-ficha li { counter-increment: p; padding: .35rem .8rem; border-radius: 999px; background: var(--cs, var(--lila-suave)); font-weight: 600; }
.pasos-ficha li::before { content: counter(p) ". "; color: var(--c, var(--lila)); }
.pasos-ficha li + li::after { content: none; }
.regla-ficha p { margin: 0 0 .6rem; }
.ejemplos-ficha { display: grid; gap: .4rem; margin-top: .4rem; }
.ejemplos-ficha > div { display: flex; gap: .6rem; align-items: center; padding: .5rem .7rem; border-radius: 10px; background: var(--cs); }
.ejemplos-ficha .es { display: block; color: var(--c); font-size: .9rem; }
.ejercicio-ficha .linea { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem; padding: .5rem 0; border-bottom: 1px dashed var(--borde-fuerte); }
.ejercicio-ficha .hueco { min-width: 4.5rem; border-bottom: 2px solid var(--c); text-align: center; font-family: var(--titulo); color: var(--c); }
.ejercicio-ficha .linea button { padding: .2rem .7rem; border-radius: 999px; border: 1.5px solid var(--c); background: var(--superficie); color: var(--texto); font: inherit; cursor: pointer; }
.ejercicio-ficha .linea button.bien { background: var(--verde-suave); border-color: var(--verde); }
.ejercicio-ficha .linea button.mal { background: var(--rosa-suave); border-color: var(--rosa); text-decoration: line-through; }
.tarjeta-guia { display: flex; flex-direction: column; gap: .3rem; border: 2px solid var(--c); background: var(--superficie); }
.tarjeta-guia h3 { color: var(--c); font-size: 1.2rem; }
.tarjeta-guia p { color: var(--suave); margin: 0; font-size: .92rem; }
.kpi[class*="c-"] { background: var(--cs); border-color: var(--c); }
.kpi[class*="c-"] span:first-child { color: var(--c); font-weight: 700; }
/* Las tarjetas de práctica rotan los colores del cuaderno */
.practicas > :nth-child(5n+1) { --c: var(--rosa); --cs: var(--rosa-suave); } .practicas > :nth-child(5n+2) { --c: var(--lila); --cs: var(--lila-suave); }
.practicas > :nth-child(5n+3) { --c: var(--amarillo); --cs: var(--amarillo-suave); } .practicas > :nth-child(5n+4) { --c: var(--verde); --cs: var(--verde-suave); }
.practicas > :nth-child(5n) { --c: var(--azul); --cs: var(--azul-suave); }
.practica { border-top: 5px solid var(--c, var(--borde)); }
.practica .icono-grande { background: var(--cs, var(--azul-suave)); border-radius: 12px; }
.practica .icono-grande svg { stroke: var(--c, var(--azul)); }
.practica h3 { font-family: var(--titulo); }
.seccion-ficha:has(.tiempos-ficha) { grid-column: 1 / -1; }
