/* Alfabetización en IA · página /alfabetizacion-ia
 * Se carga después de style.css y reutiliza sus variables y componentes
 * (cabecera, pie, botones, .section-index, .eyebrow). Aquí solo va lo propio.
 */
.alfabetizacion-page {
  --blue-deep: #031d47;
  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --ease-io: cubic-bezier(.65, 0, .35, 1);
  --header-h: 81px;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --condensed: "Arial Narrow", "Roboto Condensed", Impact, sans-serif;
  overflow-x: clip;
}
html.sala-abierta { overflow: hidden; }
html.sala-abierta body { padding-right: var(--barra, 0px); }
.alfabetizacion-page .site-header { background: rgba(246, 248, 251, .96); }
.alfabetizacion-page button { font: inherit; }

/* ============ entrada de la página ============ */
.alfa-hero { position: relative; overflow: hidden; padding: 92px 0 84px; background: var(--paper); }
.alfa-hero::after { content: ""; position: absolute; z-index: 0; right: -14vw; top: -30%; width: 58vw; aspect-ratio: 1; border: 70px solid rgba(6, 75, 174, .05); border-radius: 50%; pointer-events: none; }
.alfa-hero-grid { position: relative; z-index: 1; display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); gap: 56px; align-items: center; }
.alfa-hero-grid > * { min-width: 0; }
.alfa-hero h1 { display: grid; margin: 0 0 30px; font-size: var(--h1-size, clamp(3rem, 5vw, 5.4rem)); font-weight: 900; line-height: .8; letter-spacing: -.065em; text-transform: uppercase; }
.alfa-hero h1 span { display: block; width: max-content; max-width: 100%; animation: alfa-linea .9s .1s both var(--ease-out); }
.alfa-hero h1 span + span { position: relative; z-index: 1; margin-left: 8%; color: var(--blue); font-size: .7em; letter-spacing: -.04em; animation-delay: .22s; }
.alfa-hero h1 span + span::after { content: ""; position: absolute; z-index: -1; left: -1%; right: -1%; bottom: -.03em; height: .12em; background: var(--yellow); transform-origin: left; animation: alfa-subrayado 1s .65s both var(--ease-out); }
@keyframes alfa-linea { from { opacity: 0; transform: translateY(60px) rotateX(-20deg); } }
@keyframes alfa-subrayado { from { transform: scaleX(0); } }
.alfa-lead { max-width: 560px; margin-bottom: 32px; color: var(--muted); font-size: 1.14rem; }
.alfa-lead::first-letter { text-transform: uppercase; }
.alfa-hero .hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 24px; }

/* índice de secciones con aspecto de caja de herramientas (como la Biblioteca) */
.alfa-indice { overflow: hidden; background: #f4f6f9; border: 1px solid rgba(6, 75, 174, .5); border-radius: 4px 22px 22px; box-shadow: 0 26px 60px rgba(20, 45, 78, .16); animation: alfa-linea .9s .34s both var(--ease-out); }
.alfa-indice-bar { display: flex; justify-content: space-between; gap: 12px; padding: 12px 16px; color: #c7d3e6; background: var(--blue-dark); font: 800 .62rem/1 var(--mono); letter-spacing: .1em; text-transform: uppercase; }
.alfa-indice-bar b { color: var(--yellow); }
.alfa-indice ol { margin: 0; padding: 8px; list-style: none; }
.alfa-indice button { display: grid; grid-template-columns: 34px minmax(0, 1fr) auto; align-items: center; gap: 12px; width: 100%; padding: 10px 10px; text-align: left; color: var(--ink); background: none; border: 0; border-radius: 2px 9px 9px 4px; cursor: pointer; transition: background .25s, transform .4s var(--ease-out); }
.alfa-indice button:hover, .alfa-indice button:focus-visible { background: var(--white); transform: translateX(4px); }
.alfa-indice button > span { display: grid; place-items: center; height: 28px; color: var(--acc-ink, var(--white)); background: var(--acc, var(--blue)); border: 1px solid rgba(17, 24, 32, .14); border-radius: 2px 8px 8px; font: 800 .7rem/1 var(--mono); }
.alfa-indice strong { overflow: hidden; font-family: var(--condensed); font-size: 1.12rem; line-height: 1.05; letter-spacing: -.02em; text-overflow: ellipsis; text-transform: uppercase; white-space: nowrap; }
.alfa-indice em { display: flex; gap: 4px; color: var(--muted); font: 700 .62rem/1 var(--mono); font-style: normal; }
.alfa-indice em s { width: 6px; height: 6px; border: 1px solid #b9c3d1; border-radius: 50%; }
.alfa-indice em s.is-visto { background: var(--blue); border-color: var(--blue); }

/* imán: los botones siguen ligeramente al puntero (JS fija --mx/--my) */
[data-magnetic] { transform: translate3d(var(--mx, 0px), var(--my, 0px), 0); transition: transform .45s var(--ease-out), box-shadow .2s, background .2s; }
[data-magnetic].is-near { transition: transform .12s linear, box-shadow .2s, background .2s; }

/* ============ cabecera: secciones con indicador deslizante ============ */
.lit-bar { position: absolute; z-index: 5; top: 0; left: 0; right: 0; padding: 8px 0; background: rgba(246, 248, 251, .82); border-bottom: 1px solid rgba(6, 75, 174, .1); backdrop-filter: blur(14px); }
.lit-steps { position: relative; width: 100%; }
.lit-steps-track { display: grid; grid-template-columns: repeat(var(--n, 7), minmax(0, 1fr)); gap: 8px; }
.lit-step { position: relative; z-index: 1; display: grid; gap: 7px; padding: 8px 8px 9px; color: var(--muted); font: 700 .62rem/1 var(--mono); letter-spacing: .1em; text-transform: uppercase; text-decoration: none; white-space: nowrap; border-radius: 3px 10px 10px; transition: color .3s; }
.lit-step > span:first-child { display: flex; align-items: center; gap: 6px; overflow: hidden; }
.lit-step > span:first-child::before { content: ""; width: 7px; height: 7px; flex: none; background: #b9c3d1; border-radius: 50%; transition: background .3s, transform .3s var(--ease-out), box-shadow .3s; }
.lit-step > span:first-child b { font-weight: inherit; }
.lit-step > i { position: relative; height: 2px; overflow: hidden; background: var(--line); }
.lit-step > i b { position: absolute; inset: 0; background: var(--acc, var(--blue)); transform: scaleX(var(--fill, 0)); transform-origin: left; }
.lit-step .lit-step-vistos { position: absolute; top: 7px; right: 8px; display: flex; gap: 3px; }
.lit-step .lit-step-vistos s { width: 5px; height: 5px; border: 1px solid #b9c3d1; border-radius: 50%; transition: background .3s, border-color .3s; }
.lit-step .lit-step-vistos s.is-visto { background: var(--blue); border-color: var(--blue); }
.lit-step .lit-step-nombre { position: absolute; left: 50%; top: calc(100% + 10px); z-index: 3; padding: 6px 9px; color: var(--white); background: var(--ink); border-radius: 2px 8px 8px; opacity: 0; pointer-events: none; transform: translate(-50%, -4px); transition: opacity .2s, transform .3s var(--ease-out); }
.lit-step:hover .lit-step-nombre, .lit-step:focus-visible .lit-step-nombre { opacity: 1; transform: translate(-50%, 0); }
.lit-step.is-done > span:first-child::before { background: var(--acc, var(--blue)); }
.lit-step.is-active { color: var(--ink); }
.lit-step.is-active > span:first-child::before { background: var(--red); transform: scale(1.35); box-shadow: 0 0 0 5px rgba(255, 23, 56, .12); }
.lit-step:hover { color: var(--blue); }
.lit-steps-thumb { position: absolute; z-index: 0; top: 0; left: 0; height: 100%; width: var(--tw, 0px); background: var(--white); border: 1px solid var(--line); border-radius: 3px 10px 10px; box-shadow: 0 6px 16px rgba(20, 45, 78, .08); transform: translateX(var(--tx, 0px)); transition: transform .55s var(--ease-out), width .55s var(--ease-out); }

/* ============ mundo con scroll ============ */
.lit-world { position: relative; }
.lit-sticky { position: sticky; top: var(--header-h); height: calc(100vh - var(--header-h)); height: calc(100svh - var(--header-h)); min-height: 600px; overflow: hidden; }
.lit-canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.lit-canvas.is-pointer { cursor: pointer; }
.lit-copy-wrap { position: relative; z-index: 2; height: 100%; display: flex; align-items: center; padding-top: 56px; pointer-events: none; }
.lit-copy { width: min(500px, 42%); pointer-events: auto; opacity: var(--copy-a, 1); transform: translate3d(0, var(--copy-y, 0px), 0); will-change: opacity, transform; }
.lit-copy[data-hidden="true"] { visibility: hidden; }
.lit-index { display: flex; align-items: center; gap: 10px; margin-bottom: 18px; }
.lit-index i { width: 14px; height: 14px; background: var(--acc, var(--blue)); border: 1px solid rgba(17, 24, 32, .18); border-radius: 2px 6px 6px; transform: rotate(calc((1 - var(--rv, 1)) * -90deg)); }
.lit-index em { font-style: normal; color: var(--muted); }

/* titular: letras que suben con el scroll (JS fija --rv de 0 a 1) */
.lit-title { display: grid; margin: 0 0 22px; text-transform: uppercase; }
.lit-title-pre { margin-bottom: .12em; color: var(--blue); font-size: clamp(1.5rem, 2.4vw, 2.4rem); line-height: .95; letter-spacing: -.035em; }
.lit-title-pre:empty { display: none; }
.lit-title-main { position: relative; width: max-content; max-width: 100%; color: var(--ink); font-size: var(--title-size, clamp(3.2rem, 6vw, 6rem)); line-height: .86; letter-spacing: -.055em; }
.lit-title-main::after { content: ""; position: absolute; z-index: -1; left: -1%; right: -1%; bottom: .02em; height: .12em; background: var(--yellow); transform: scaleX(var(--underline, 1)); transform-origin: left; }
.w { display: inline-block; overflow: clip; overflow-clip-margin: .08em; vertical-align: top; padding-bottom: .06em; margin-bottom: -.06em; }
.ch { display: inline-block; --k: clamp(0, calc((var(--rv, 1) * (var(--n, 10) + 5) - var(--i, 0)) / 5), 1); transform: translate3d(0, calc((1 - var(--k)) * 105%), 0) rotate(calc((1 - var(--k)) * 8deg)); transform-origin: left bottom; }
.lit-lead { max-width: 440px; margin-bottom: 22px; color: var(--muted); font-size: 1.08rem; opacity: clamp(0, calc(var(--rv, 1) * 2 - .4), 1); }

/* tarjetas de vídeo en la columna de texto */
.lit-media { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 22px; }
.lit-media:empty { display: none; }
.vcard { --k: clamp(0, calc(var(--rv, 1) * 2.2 - .7 - var(--d, 0) * .25), 1); position: relative; display: grid; gap: 9px; padding: 0; text-align: left; background: none; border: 0; cursor: pointer; opacity: var(--k); transform: translate3d(0, calc((1 - var(--k)) * 26px), 0); }
.vcard-img { position: relative; overflow: hidden; aspect-ratio: 16 / 9; background: var(--blue-dark); border: 1px solid rgba(17, 24, 32, .14); border-radius: 3px 14px 14px; box-shadow: 0 10px 24px rgba(20, 45, 78, .12); transition: box-shadow .4s var(--ease-out), transform .5s var(--ease-out); }
.vcard-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s var(--ease-out), filter .4s; }
.vcard-img::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 45%, rgba(3, 29, 71, .55)); }
.vcard-num, .vcard-dur { position: absolute; z-index: 1; bottom: 8px; padding: 3px 6px; font: 800 .62rem/1 var(--mono); letter-spacing: .08em; border-radius: 2px 6px 6px; }
.vcard-num { left: 8px; color: var(--blue-dark); background: var(--yellow); }
.vcard-dur { right: 8px; color: var(--white); background: rgba(17, 24, 32, .7); }
.vcard-play { position: absolute; z-index: 1; left: 50%; top: 50%; width: 46px; height: 46px; margin: -23px 0 0 -23px; background: var(--white); border-radius: 50%; box-shadow: 0 8px 20px rgba(3, 29, 71, .35); transform: scale(.6); opacity: 0; transition: transform .45s var(--ease-out), opacity .25s; }
.vcard-play::after { content: ""; position: absolute; left: 18px; top: 14px; border-left: 13px solid var(--blue); border-top: 9px solid transparent; border-bottom: 9px solid transparent; }
.vcard-prog { position: absolute; z-index: 2; left: 0; right: 0; bottom: 0; height: 3px; background: rgba(255, 255, 255, .25); }
.vcard-prog b { display: block; height: 100%; width: calc(var(--p, 0) * 100%); background: var(--red); }
.vcard-visto { position: absolute; z-index: 2; top: 8px; right: 8px; display: none; align-items: center; gap: 5px; padding: 3px 6px; color: var(--white); background: var(--blue); border-radius: 2px 6px 6px; font: 800 .58rem/1 var(--mono); letter-spacing: .08em; text-transform: uppercase; }
.vcard.is-visto .vcard-visto { display: inline-flex; }
.vcard-titulo { display: -webkit-box; overflow: hidden; -webkit-line-clamp: 2; -webkit-box-orient: vertical; color: var(--ink); font-size: .86rem; font-weight: 700; line-height: 1.3; transition: color .2s; }
.vcard:hover .vcard-img, .vcard:focus-visible .vcard-img { box-shadow: 0 16px 34px rgba(6, 75, 174, .25); transform: translateY(-3px); }
.vcard:hover .vcard-img img, .vcard:focus-visible .vcard-img img { transform: scale(1.06); }
.vcard:hover .vcard-play, .vcard:focus-visible .vcard-play { opacity: 1; transform: scale(1); }
.vcard:hover .vcard-titulo { color: var(--blue); }
.vcard:focus-visible { outline: none; }
.vcard:focus-visible .vcard-img { outline: 3px solid var(--yellow); outline-offset: 3px; }

/* Ágora: accesos rápidos a cada sección */
.lit-chips { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }
.lit-chip { --k: clamp(0, calc(var(--rv, 1) * 2.4 - .6 - var(--d, 0) * .18), 1); display: inline-flex; align-items: center; gap: 8px; padding: 8px 12px 8px 9px; color: var(--ink); background: var(--white); border: 1px solid var(--line); border-radius: 3px 12px 12px; cursor: pointer; font-size: .84rem; font-weight: 700; opacity: var(--k); transform: translate3d(0, calc((1 - var(--k)) * 18px), 0); transition: border-color .2s, box-shadow .3s, color .2s; }
.lit-chip b { display: grid; place-items: center; width: 22px; height: 22px; color: var(--acc-ink, var(--blue-dark)); background: var(--acc, var(--yellow)); border: 1px solid rgba(17, 24, 32, .14); border-radius: 2px 7px 7px; font: 800 .66rem/1 var(--mono); }
.lit-chip:hover { color: var(--blue); border-color: var(--blue); box-shadow: 0 8px 18px rgba(6, 75, 174, .14); }

.lit-cta { opacity: clamp(0, calc(var(--rv, 1) * 2.4 - 1.2), 1); }
.lit-cta-arrow { display: inline-block; transition: transform .35s var(--ease-out); }
.lit-cta:hover .lit-cta-arrow { transform: translateX(4px); }

.lit-status { position: absolute; z-index: 3; left: 0; right: 0; bottom: 0; display: grid; grid-template-columns: auto minmax(100px, 1fr) auto; align-items: center; gap: 18px; padding: 14px 0 22px; color: var(--muted); font: 700 .62rem/1 var(--mono); letter-spacing: .1em; text-transform: uppercase; pointer-events: none; }
.lit-status span b { color: var(--blue); font-size: 1rem; }
.lit-status > i { height: 2px; background: rgba(6, 75, 174, .14); }
.lit-status > i b { display: block; width: 100%; height: 100%; background: var(--blue); transform: scaleX(var(--p, 0)); transform-origin: left; }
.lit-status em { display: flex; align-items: center; gap: 12px; font-style: normal; color: var(--blue); opacity: var(--cue, 1); }
.lit-status em::after { content: ""; width: 56px; height: 1px; background: linear-gradient(90deg, var(--red) 0 40%, rgba(6, 75, 174, .2) 40%); background-size: 200% 100%; animation: lit-cue 2.2s infinite var(--ease-out); }
@keyframes lit-cue { from { background-position: 100% 0; } to { background-position: -100% 0; } }

.lit-error { position: fixed; inset: auto 16px 16px; z-index: 600; padding: 14px 16px; color: var(--white); background: var(--ink); border-radius: 4px 14px 14px; font: 600 .85rem/1.5 var(--mono); }

/* ============ sala de proyección ============ */
.sala { position: fixed; inset: 0; width: 100vw; height: 100vh; height: 100dvh; max-width: none; max-height: none; margin: 0; padding: 0; color: var(--white); background: transparent; border: 0; overflow: hidden; }
.sala::backdrop { background: transparent; }
.sala-fondo { position: absolute; inset: 0; background: radial-gradient(circle at 88% 10%, rgba(255, 229, 0, .12), transparent 30%), radial-gradient(circle at 8% 92%, rgba(6, 75, 174, .5), transparent 40%), linear-gradient(135deg, var(--blue-dark), var(--blue-deep) 72%); }
.sala-fondo::before { content: ""; position: absolute; inset: 0; opacity: .1; background-image: linear-gradient(rgba(255, 255, 255, .14) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, .14) 1px, transparent 1px); background-size: 42px 42px; }
.sala-shell { position: relative; display: grid; grid-template-rows: auto 1fr; height: 100%; padding: 18px clamp(16px, 3vw, 40px) 26px; overflow-y: auto; overscroll-behavior: contain; }
.sala-top { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-bottom: 16px; }
.sala-index { display: flex; align-items: center; gap: 10px; margin: 0; color: var(--yellow); }
.sala-index i { width: 14px; height: 14px; background: var(--acc, var(--yellow)); border: 1px solid rgba(255, 255, 255, .35); border-radius: 2px 6px 6px; }
.sala-cerrar { position: relative; width: 46px; height: 46px; color: var(--white); background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .22); border-radius: 50%; cursor: pointer; transition: background .2s, transform .4s var(--ease-out); }
.sala-cerrar i::before, .sala-cerrar i::after { content: ""; position: absolute; left: 13px; top: 22px; width: 18px; height: 2px; background: currentColor; border-radius: 2px; transform: rotate(45deg); }
.sala-cerrar i::after { transform: rotate(-45deg); }
.sala-cerrar:hover { color: var(--blue-dark); background: var(--yellow); transform: rotate(90deg); }
.sala-grid { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: clamp(20px, 2.6vw, 40px); align-items: start; min-height: 0; }

.sala.is-dentro .reveal { opacity: 1; transform: none; }

/* reproductor */
.player { position: relative; overflow: hidden; aspect-ratio: 16 / 9; max-height: calc(100svh - 230px); margin-inline: auto; background: #000; border: 1px solid rgba(255, 255, 255, .16); border-radius: 4px 24px 24px; box-shadow: 0 30px 70px rgba(0, 0, 0, .35); isolation: isolate; }
.player video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; background: #000; }
.player video::cue { color: var(--white); background: rgba(17, 24, 32, .82); font-family: Inter, system-ui, sans-serif; font-size: 1.05em; }
.player-capa { position: absolute; inset: 0; z-index: 1; background: linear-gradient(180deg, rgba(3, 29, 71, .55), transparent 22%, transparent 62%, rgba(3, 29, 71, .85)); opacity: 1; transition: opacity .4s; pointer-events: none; }
.player-capitulo { position: absolute; z-index: 2; left: 16px; bottom: 70px; margin: 0; padding: 5px 8px; color: var(--blue-dark); background: var(--yellow); border-radius: 2px 8px 8px; font: 800 .66rem/1 var(--mono); letter-spacing: .1em; text-transform: uppercase; transition: opacity .4s, transform .5s var(--ease-out); }
.player-capitulo.is-cambio { animation: cap-in .6s var(--ease-out); }
@keyframes cap-in { from { opacity: 0; transform: translateY(-8px); } }
.player-grande { position: absolute; z-index: 3; left: 50%; top: 50%; width: 92px; height: 92px; margin: -46px 0 0 -46px; color: var(--blue-dark); background: var(--yellow); border: 0; border-radius: 50%; cursor: pointer; box-shadow: 0 0 0 0 rgba(255, 229, 0, .5); animation: latido 2.4s infinite; transition: transform .5s var(--ease-out), opacity .3s; }
.player-grande i { position: absolute; left: 36px; top: 28px; border-left: 28px solid var(--blue-dark); border-top: 18px solid transparent; border-bottom: 18px solid transparent; }
.player-grande:hover { transform: scale(1.08); }
@keyframes latido { 70% { box-shadow: 0 0 0 22px rgba(255, 229, 0, 0); } 100% { box-shadow: 0 0 0 0 rgba(255, 229, 0, 0); } }
.player[data-estado="play"] .player-grande { opacity: 0; transform: scale(.6); pointer-events: none; }

.player-barra { position: absolute; z-index: 4; left: 0; right: 0; bottom: 0; padding: 0 16px 10px; transition: opacity .35s, transform .45s var(--ease-out); }
.player.is-quieto[data-estado="play"] .player-barra, .player.is-quieto[data-estado="play"] .player-capitulo { opacity: 0; transform: translateY(8px); }
.player.is-quieto[data-estado="play"] .player-capa { opacity: 0; }
.player.is-quieto[data-estado="play"] { cursor: none; }

.pista { position: relative; height: 22px; cursor: pointer; touch-action: none; }
.pista:focus-visible { outline-offset: 0; }
.pista-tramos { position: absolute; left: 0; right: 0; top: 9px; display: flex; gap: 3px; height: 4px; transition: height .2s, top .2s; }
.pista:hover .pista-tramos, .pista.is-arrastre .pista-tramos { top: 7px; height: 8px; }
.tramo { position: relative; flex: var(--w) 1 0; overflow: hidden; background: rgba(255, 255, 255, .22); border-radius: 2px; }
.tramo i, .tramo b { position: absolute; inset: 0; transform-origin: left; }
.tramo i { background: rgba(255, 255, 255, .35); transform: scaleX(var(--buf, 0)); }
.tramo b { background: var(--yellow); transform: scaleX(var(--jug, 0)); }
.tramo.is-hover { background: rgba(255, 255, 255, .4); }
.pista-cabeza { position: absolute; top: 4px; left: calc(var(--p, 0) * 100%); width: 14px; height: 14px; margin-left: -7px; background: var(--yellow); border: 2px solid var(--blue-dark); border-radius: 50%; transform: scale(0); transition: transform .25s var(--ease-out); pointer-events: none; }
.pista:hover .pista-cabeza, .pista:focus-visible .pista-cabeza, .pista.is-arrastre .pista-cabeza { transform: scale(1); }
.pista-tip { position: absolute; bottom: 26px; left: var(--x, 0px); display: grid; gap: 4px; min-width: 120px; max-width: 260px; padding: 7px 9px; color: var(--ink); background: var(--white); border-radius: 3px 10px 10px; box-shadow: 0 10px 26px rgba(0, 0, 0, .3); transform: translateX(-50%); pointer-events: none; }
.pista-tip[hidden], .pb[hidden], .fin-siguiente[hidden] { display: none; }
.pista-tip b { font: 800 .62rem/1.2 var(--mono); letter-spacing: .06em; color: var(--blue); text-transform: uppercase; }
.pista-tip em { font: 700 .78rem/1 var(--mono); font-style: normal; color: var(--muted); }
.player-botones { display: flex; align-items: center; gap: 6px; }
.pb { position: relative; display: grid; place-items: center; min-width: 38px; height: 38px; padding: 0 8px; color: var(--white); background: transparent; border: 0; border-radius: 8px; cursor: pointer; transition: background .2s; }
.pb:hover { background: rgba(255, 255, 255, .12); }
.pb-texto { font: 800 .72rem/1 var(--mono); letter-spacing: .06em; }
.pb[aria-pressed="true"] { color: var(--blue-dark); background: var(--yellow); }
.player-tiempo { margin-left: 4px; font: 700 .76rem/1 var(--mono); color: #d6deea; font-variant-numeric: tabular-nums; }
.player-hueco { flex: 1; }
.ico { position: relative; display: block; width: 18px; height: 18px; }
.ico-play::before { content: ""; position: absolute; left: 4px; top: 2px; border-left: 13px solid currentColor; border-top: 7px solid transparent; border-bottom: 7px solid transparent; }
.player[data-estado="play"] .ico-play::before, .player[data-estado="play"] .ico-play::after { content: ""; position: absolute; top: 2px; width: 5px; height: 14px; border: 0; background: currentColor; border-radius: 1px; }
.player[data-estado="play"] .ico-play::before { left: 3px; }
.player[data-estado="play"] .ico-play::after { left: 10px; }
.ico-vol::before { content: ""; position: absolute; left: 1px; top: 6px; width: 5px; height: 6px; background: currentColor; }
.ico-vol::after { content: ""; position: absolute; left: 4px; top: 2px; border-right: 8px solid currentColor; border-top: 7px solid transparent; border-bottom: 7px solid transparent; }
#b-mute::after { content: ""; position: absolute; left: 50%; top: 50%; width: 22px; height: 2px; margin: -1px 0 0 -11px; background: var(--red); border-radius: 2px; transform: rotate(-45deg) scaleX(0); transition: transform .3s var(--ease-out); }
.is-mudo #b-mute::after { transform: rotate(-45deg) scaleX(1); }
.ico-full::before, .ico-full::after { content: ""; position: absolute; width: 6px; height: 6px; border: 2px solid currentColor; }
.ico-full::before { left: 1px; top: 1px; border-right: 0; border-bottom: 0; }
.ico-full::after { right: 1px; bottom: 1px; border-left: 0; border-top: 0; }

.player-fin { position: absolute; z-index: 5; inset: 0; display: grid; place-content: center; justify-items: center; gap: 14px; padding: 16px; background: rgba(3, 29, 71, .78); backdrop-filter: blur(6px); animation: cap-in .5s var(--ease-out); }
.player-fin[hidden] { display: none; }
.player-fin .section-index { margin: 0; color: var(--yellow); }
.fin-siguiente { display: grid; grid-template-columns: 180px minmax(0, 260px) 40px; align-items: center; gap: 16px; padding: 10px 16px 10px 10px; text-align: left; color: var(--ink); background: var(--white); border: 0; border-radius: 4px 18px 18px; cursor: pointer; box-shadow: 0 20px 50px rgba(0, 0, 0, .35); transition: transform .4s var(--ease-out); }
.fin-siguiente:hover { transform: translateY(-3px); }
.fin-siguiente img { width: 180px; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 3px 12px 12px; }
.fin-siguiente b { display: block; margin-bottom: 4px; color: var(--blue); font: 800 .66rem/1 var(--mono); letter-spacing: .1em; }
.fin-siguiente strong { font-size: .98rem; line-height: 1.25; }
.fin-siguiente svg { width: 40px; height: 40px; transform: rotate(-90deg); }
.fin-siguiente circle { fill: none; stroke: var(--line); stroke-width: 3; }
.fin-siguiente #fin-anillo { stroke: var(--red); stroke-dasharray: 106.8; stroke-dashoffset: var(--off, 106.8); }
.fin-cancelar { padding: 8px 12px; color: var(--white); background: none; border: 1px solid rgba(255, 255, 255, .3); border-radius: 8px; cursor: pointer; font: 700 .72rem/1 var(--mono); letter-spacing: .08em; text-transform: uppercase; }
.fin-cancelar:hover { background: rgba(255, 255, 255, .1); }

.sala-pie { display: grid; grid-template-columns: auto 1fr; align-items: baseline; column-gap: 16px; padding: 20px 4px 0; }
.sala-num { margin: 0; color: var(--blue-dark); background: var(--yellow); padding: 4px 8px; border-radius: 2px 8px 8px; font: 800 .8rem/1 var(--mono); letter-spacing: .08em; }
.sala-titulo { margin: 0; font-size: clamp(1.8rem, 3vw, 3rem); line-height: .92; text-transform: uppercase; }
.sala-teclas { grid-column: 1 / -1; margin: 14px 0 0; color: #8fa3c0; font: 600 .66rem/1.5 var(--mono); letter-spacing: .06em; }

/* columna lateral */
.sala-lado { display: grid; grid-template-columns: minmax(0, 1fr); align-content: start; gap: 0; min-width: 0; }
.sala-cabeza { padding-bottom: 18px; margin-bottom: 18px; border-bottom: 1px solid rgba(255, 255, 255, .14); }
.sala-nombre { display: grid; margin: 0 0 10px; font-size: var(--nombre-size, clamp(2rem, 3.2vw, 3.1rem)); line-height: .86; letter-spacing: -.05em; text-transform: uppercase; }
.sala-nombre .lit-title-pre { color: var(--yellow); font-size: .55em; }
.sala-sub { margin: 0; color: #c7d3e6; font-size: .95rem; }
.sala-lado > .section-index { margin: 0 0 10px; color: #8fa3c0; }
.sala-videos { display: grid; gap: 8px; margin: 0 0 22px; padding: 0; list-style: none; }
.svid { display: grid; grid-template-columns: 112px minmax(0, 1fr); align-items: center; gap: 12px; width: 100%; padding: 7px; text-align: left; color: var(--white); background: rgba(255, 255, 255, .05); border: 1px solid rgba(255, 255, 255, .1); border-radius: 3px 14px 14px; cursor: pointer; transition: background .25s, border-color .25s, transform .4s var(--ease-out); }
.svid:hover { background: rgba(255, 255, 255, .1); transform: translateX(3px); }
.svid[aria-current="true"] { color: var(--ink); background: var(--white); border-color: var(--white); }
.svid-img { position: relative; overflow: hidden; aspect-ratio: 16 / 9; border-radius: 2px 9px 9px; }
.svid-img img { width: 100%; height: 100%; object-fit: cover; }
.svid-img .vcard-prog { height: 3px; }
.svid b { display: block; margin-bottom: 3px; color: var(--yellow); font: 800 .62rem/1 var(--mono); letter-spacing: .1em; }
.svid[aria-current="true"] b { color: var(--blue); }
.svid strong { display: -webkit-box; overflow: hidden; -webkit-line-clamp: 2; -webkit-box-orient: vertical; font-size: .86rem; line-height: 1.25; }
.svid em { display: block; margin-top: 4px; color: #8fa3c0; font: 700 .64rem/1 var(--mono); font-style: normal; }
.svid[aria-current="true"] em { color: var(--muted); }
.sala-capitulos { position: relative; display: grid; gap: 2px; margin: 0 0 22px; padding: 0; list-style: none; }
.cap { position: relative; display: grid; grid-template-columns: 44px 1fr; gap: 10px; width: 100%; padding: 8px 10px; text-align: left; color: #c7d3e6; background: none; border: 0; border-radius: 3px 10px 10px; cursor: pointer; font: 700 .7rem/1.3 var(--mono); letter-spacing: .05em; transition: color .2s, background .2s; }
.cap span { color: #8fa3c0; font-variant-numeric: tabular-nums; }
.cap:hover { color: var(--white); background: rgba(255, 255, 255, .07); }
.cap[aria-current="true"] { color: var(--blue-dark); background: var(--yellow); }
.cap[aria-current="true"] span { color: var(--blue); }
.cap::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: var(--red); transform: scaleX(var(--cp, 0)); transform-origin: left; opacity: 0; }
.cap[aria-current="true"]::after { opacity: 1; }
.sala-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.sala-salto { display: grid; gap: 4px; padding: 12px 14px; text-align: left; color: var(--white); background: rgba(255, 255, 255, .05); border: 1px solid rgba(255, 255, 255, .16); border-radius: 3px 14px 14px; cursor: pointer; transition: background .25s, border-color .25s; }
.sala-salto span { color: #8fa3c0; font: 700 .6rem/1 var(--mono); letter-spacing: .1em; text-transform: uppercase; }
.sala-salto b { font-family: var(--condensed); font-size: 1.1rem; line-height: 1; text-transform: uppercase; }
.sala-salto-next { text-align: right; }
.sala-salto:hover { background: rgba(255, 255, 255, .12); border-color: var(--yellow); }
.sala-salto[hidden] { display: grid; visibility: hidden; }

/* transición entre vídeos / secciones dentro de la sala */
.sala-escena, .sala-lado { transition: opacity .3s ease, transform .5s var(--ease-out); }
.sala.is-cambio .sala-escena .sala-pie, .sala.is-cambio-seccion .sala-lado { opacity: 0; transform: translate3d(0, 10px, 0); }

/* ============ responsive ============ */
@media (max-width: 1180px) {
  .sala-grid { grid-template-columns: minmax(0, 1fr) 300px; }
  .svid { grid-template-columns: 92px minmax(0, 1fr); }
}
@media (max-width: 1100px) { .lit-steps-track { gap: 4px; } .lit-step { padding-inline: 6px; } }
@media (max-width: 960px) {
  .sala-grid { grid-template-columns: 1fr; }
  .player { max-height: none; }
  .sala-teclas { display: none; }
}
@media (max-width: 899px) {
  .lit-step > span:first-child b, .lit-step .lit-step-nombre { display: none; }
  .lit-step .lit-step-vistos { top: 6px; right: 4px; }
  .lit-copy-wrap { align-items: flex-end; padding-top: 50px; padding-bottom: 64px; }
  .lit-copy { width: 100%; padding: 16px 16px 18px; background: rgba(246, 248, 251, .94); border: 1px solid var(--line); border-radius: 4px 18px 18px; backdrop-filter: blur(10px); box-shadow: var(--shadow); }
  .lit-index { margin-bottom: 10px; }
  .lit-title-main { --title-size: clamp(2.2rem, 10vw, 3.4rem); }
  .lit-title { margin-bottom: 10px; }
  .lit-lead { margin-bottom: 12px; font-size: .95rem; line-height: 1.45; }
  .lit-media { gap: 10px; margin-bottom: 12px; }
  .vcard-titulo { font-size: .76rem; }
  .vcard-play { display: none; }
  .lit-chip { padding: 6px 10px 6px 7px; font-size: .78rem; }
  .lit-cta { width: 100%; min-height: 44px; }
    .sala-shell { padding: 12px 12px 22px; }
  .sala-top { padding-bottom: 10px; }
  .player { border-radius: 3px 14px 14px; margin-inline: -4px; }
  .player-grande { width: 68px; height: 68px; margin: -34px 0 0 -34px; }
  .player-grande i { left: 27px; top: 20px; border-left-width: 21px; border-top-width: 14px; border-bottom-width: 14px; }
  .player-barra { padding: 0 8px 4px; }
  .pb { min-width: 34px; height: 34px; padding: 0 5px; }
  .player-tiempo { font-size: .68rem; }
  .fin-siguiente { grid-template-columns: 96px minmax(0, 1fr) 32px; gap: 10px; }
  .fin-siguiente img { width: 96px; }
  .sala-pie { padding-top: 14px; }
  .player-capitulo { display: none; }
}
@media (max-height: 760px) and (min-width: 900px) {
  .lit-title-main { --title-size: clamp(2.6rem, 5vw, 4.6rem); }
  .lit-lead { margin-bottom: 14px; font-size: 1rem; }
  .lit-media { margin-bottom: 14px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; }
  .ch, .vcard, .lit-chip { transform: none !important; opacity: 1 !important; }
  .lit-lead, .lit-cta { opacity: 1 !important; }
  [data-magnetic] { transform: none !important; }
    .vcard-img, .vcard-img img, .lit-steps-thumb, .svid { transition: none; }
}

@media (max-width: 1020px) {
  .alfa-hero-grid { grid-template-columns: 1fr; gap: 40px; }
  .alfa-indice { max-width: 560px; }
}
@media (max-width: 780px) {
  .alfabetizacion-page { --header-h: 71px; }
  .alfa-hero { padding: 60px 0 56px; }
  .alfa-hero h1 { font-size: clamp(2.3rem, 11vw, 4.6rem); }
  .alfa-hero h1 span + span { margin-left: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .alfa-hero h1 span, .alfa-hero h1 span + span::after, .alfa-indice { animation: none !important; }
  .alfa-indice button { transition: none; }
}
