/* iCrea · Biblioteca digital escolar
   Idea visual: el cuaderno escolar. Papel blanco azulado, renglones celestes,
   la línea de margen naranja y la tinta azul marino. Los libros se ven como libros. */

:root {
  --tinta: #15325c;
  --tinta-2: #24497f;
  --tinta-suave: #e8eef7;
  --naranja: #f0663a;
  --naranja-hover: #d9532a;
  --naranja-suave: #fff0ea;
  --papel: #f5f8fc;
  --renglon: #dce6f3;
  --grafito: #3a4658;
  --gris: #6b778a;
  --blanco: #ffffff;
  --verde: #1f8a5b;
  --verde-suave: #e5f5ed;
  --ambar: #a86a00;
  --ambar-suave: #fff5df;
  --rojo: #c0392b;

  --serif: 'Literata', Georgia, 'Times New Roman', serif;
  --sans: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;

  --r-libro: 3px;
  --r-control: 10px;
  --r-panel: 16px;
  --sombra-libro: 0 1px 1px rgba(21, 50, 92, .08), 0 8px 18px -6px rgba(21, 50, 92, .35);
  --sombra-panel: 0 1px 2px rgba(21, 50, 92, .06), 0 10px 30px -18px rgba(21, 50, 92, .35);
  --ancho: 1160px;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
html, body { overflow-x: clip; }
body {
  margin: 0; font-family: var(--sans); font-size: 16px; line-height: 1.55; color: var(--grafito);
  background: var(--papel); -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--tinta-2); }
button, input, select { font: inherit; color: inherit; }
h1, h2, h3 { font-family: var(--serif); color: var(--tinta); line-height: 1.15; margin: 0; font-weight: 700; }
h1 { font-size: clamp(2.1rem, 5.2vw, 3.6rem); letter-spacing: -.015em; }
h2 { font-size: clamp(1.5rem, 3vw, 2rem); }
h3 { font-size: 1.15rem; }
p { margin: 0; }
:focus-visible { outline: 3px solid var(--naranja); outline-offset: 2px; border-radius: 4px; }
.oculto { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.envoltura { width: min(var(--ancho), 100% - 40px); margin-inline: auto; }

/* ── Logo: el punto de la i tiene el mismo grosor que su trazo ─────────── */
.logo { display: inline-flex; align-items: center; gap: .6rem; flex: none; text-decoration: none; color: var(--tinta); }
.logo__img { height: 26px; width: auto; display: block; }
.logo__sub { font-size: .78rem; color: var(--gris); font-weight: 500; }

/* ── Barra superior ─────────────────────────────────────────────────────── */
.barra { position: sticky; top: 0; z-index: 20; background: rgba(245, 248, 252, .92);
  backdrop-filter: saturate(1.4) blur(10px); border-bottom: 1px solid var(--renglon); }
.barra__fila { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 64px; }
.barra__nav { display: flex; align-items: center; gap: 6px; }
.barra__enlace { display: inline-flex; align-items: center; gap: 6px; padding: 8px 12px; border-radius: var(--r-control); text-decoration: none; color: var(--tinta); font-weight: 500; font-size: .95rem; }
.barra__enlace svg { width: 18px; height: 18px; display: none; }
.barra__enlace:hover { background: var(--tinta-suave); }
.barra__enlace[aria-current='page'] { background: var(--tinta-suave); }

/* ── Botones y campos ───────────────────────────────────────────────────── */
.boton { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px;
  padding: 0 20px; border-radius: var(--r-control); border: 1.5px solid transparent; font-weight: 600;
  text-decoration: none; cursor: pointer; transition: background .15s, border-color .15s, transform .1s; white-space: nowrap; }
.boton:active { transform: translateY(1px); }
.boton--primario { background: var(--naranja); color: #fff; }
.boton--primario:hover { background: var(--naranja-hover); }
.boton--tinta { background: var(--tinta); color: #fff; }
.boton--tinta:hover { background: var(--tinta-2); }
.boton--borde { background: var(--blanco); border-color: var(--renglon); color: var(--tinta); }
.boton--borde:hover { border-color: var(--tinta-2); }
.boton--texto { background: none; color: var(--tinta); padding: 0 10px; }
.boton--texto:hover { background: var(--tinta-suave); }
.boton--chico { min-height: 36px; padding: 0 14px; font-size: .9rem; }
.boton[disabled] { opacity: .55; cursor: progress; }
.boton svg { width: 18px; height: 18px; flex: none; }

.campo { display: grid; gap: 6px; }
.campo label { font-weight: 600; color: var(--tinta); font-size: .92rem; }
.campo small { color: var(--gris); font-size: .84rem; }
.entrada { width: 100%; min-height: 48px; padding: 0 14px; border: 1.5px solid var(--renglon); border-radius: var(--r-control);
  background: var(--blanco); color: var(--tinta); }
.entrada:focus { outline: none; border-color: var(--tinta-2); box-shadow: 0 0 0 4px var(--tinta-suave); }
.entrada--codigo { font-family: ui-monospace, 'SF Mono', Menlo, Consolas, monospace; font-size: 1.25rem; letter-spacing: .12em;
  text-transform: uppercase; text-align: center; }
select.entrada { padding-right: 32px; }

.entrada-clave { position: relative; }
.entrada-clave .entrada { padding-right: 52px; }
.ojo { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); width: 42px; height: 40px; display: grid; place-items: center;
  border: 0; background: none; border-radius: 8px; color: var(--gris); cursor: pointer; }
.ojo:hover { background: var(--tinta-suave); color: var(--tinta); }
.ojo svg { width: 20px; height: 20px; }
.acceso__legal { font-size: .84rem; color: var(--gris); text-align: center; }
.acceso__ayuda { margin-top: 18px; font-size: .93rem; text-align: center; }
.acceso__ayuda summary { cursor: pointer; color: var(--tinta-2); text-decoration: underline; }
.acceso__ayuda p { margin-top: 10px; color: var(--grafito); text-align: left; background: var(--papel); padding: 12px 14px; border-radius: var(--r-control); }
.legal { max-width: 46rem; }
.legal h1 { margin-bottom: 8px; }
.legal h2 { font-size: 1.3rem; margin: 30px 0 8px; }
.legal p, .legal li { margin-bottom: 8px; }
.legal ul { padding-left: 22px; }
.aviso { padding: 12px 14px; border-radius: var(--r-control); font-size: .93rem; }
.aviso--error { background: #fdecea; color: #8e2a1f; }
.aviso--ok { background: var(--verde-suave); color: #14603f; }
.aviso--info { background: var(--tinta-suave); color: var(--tinta); }

/* ── Portada (inicio) ───────────────────────────────────────────────────── */
.portada { position: relative; overflow: hidden; padding: 56px 0 64px;
  background:
    linear-gradient(90deg, transparent 0 calc(50% - var(--ancho) / 2 - 29px), var(--naranja) calc(50% - var(--ancho) / 2 - 29px) calc(50% - var(--ancho) / 2 - 27px), transparent 0),
    repeating-linear-gradient(180deg, transparent 0 35px, var(--renglon) 35px 36px);
}
.portada__grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: 48px; align-items: center; }
.portada__texto p { font-size: 1.15rem; max-width: 34ch; margin-top: 18px; color: var(--grafito); }
.portada__acciones { margin-top: 28px; }
.activar-rapido { background: var(--blanco); border: 1.5px solid var(--renglon); border-radius: var(--r-panel);
  padding: 22px; box-shadow: var(--sombra-panel); max-width: 440px; }
.activar-rapido h2 { font-size: 1.25rem; }
.activar-rapido p { font-size: .95rem; margin: 6px 0 14px; color: var(--gris); }
.activar-rapido form { display: flex; gap: 10px; }
.activar-rapido .entrada { flex: 1; min-width: 0; }
.portada__ingresar { margin-top: 14px; font-size: .95rem; }

.estante { position: relative; padding: 18px 0 0; display: grid; gap: 34px; }
.estante__libros { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; align-items: end; padding: 0 14px; }
.estante__libros img { width: 100%; height: auto; border-radius: var(--r-libro); box-shadow: var(--sombra-libro); aspect-ratio: 550 / 781; object-fit: cover;
  transform-origin: bottom center; animation: subir .7s cubic-bezier(.2, .8, .2, 1) both; }
.estante__libros img:nth-child(2) { animation-delay: .08s; }
.estante__libros img:nth-child(3) { animation-delay: .16s; }
.estante__libros img:nth-child(4) { animation-delay: .24s; }
.estante__piso:nth-child(2) img { animation-delay: .3s; }
.estante__piso:nth-child(2) img:nth-child(2) { animation-delay: .38s; }
.estante__piso:nth-child(2) img:nth-child(3) { animation-delay: .46s; }
.estante__piso:nth-child(2) img:nth-child(4) { animation-delay: .54s; }
.estante__tabla { height: 14px; margin-top: -2px; background: var(--tinta); border-radius: 3px 3px 0 0;
  box-shadow: 0 6px 0 -2px #0e2341; }
@keyframes subir { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .estante__libros img { animation: none; } }

.pasos { padding: 72px 0; }
.pasos__titulo { max-width: 26ch; }
.pasos__lista { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; margin: 32px 0 0; padding: 0; list-style: none; counter-reset: paso; }
.pasos__lista li { counter-increment: paso; padding-top: 18px; border-top: 2px solid var(--tinta); }
.pasos__lista li::before { content: counter(paso); font-family: var(--serif); font-size: 2.4rem; font-weight: 700; color: var(--naranja); line-height: 1; }
.pasos__lista h3 { margin: 10px 0 6px; }
.pasos__icono { width: 28px; height: 28px; color: var(--tinta); float: right; }

.colegios { background: var(--tinta); color: #dfe8f5; padding: 64px 0; }
.colegios h2 { color: #fff; }
.colegios__grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: 40px; align-items: center; }
.colegios ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 14px; }
.colegios li { display: flex; gap: 12px; align-items: flex-start; }
.colegios li svg { width: 22px; height: 22px; flex: none; color: var(--naranja); margin-top: 2px; }
.colegios p { margin-top: 14px; max-width: 46ch; }

.pie { padding: 28px 0 40px; font-size: .88rem; color: var(--gris); }
.pie .envoltura { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }

/* ── Formularios de acceso ──────────────────────────────────────────────── */
.acceso { min-height: calc(100vh - 64px); display: grid; place-items: start center; padding: 48px 20px; }
.acceso__caja { width: min(480px, 100%); background: var(--blanco); border-radius: var(--r-panel); box-shadow: var(--sombra-panel);
  padding: 32px; border-left: 4px solid var(--naranja); }
.acceso__caja h1 { font-size: 1.9rem; }
.acceso__caja > p { margin: 8px 0 22px; color: var(--gris); }
.acceso form { display: grid; gap: 16px; }
.acceso__pie { margin-top: 18px; font-size: .93rem; text-align: center; }
.progreso-pasos { display: flex; gap: 8px; margin-bottom: 18px; }
.progreso-pasos span { height: 4px; flex: 1; border-radius: 4px; background: var(--renglon); }
.progreso-pasos span.hecho { background: var(--naranja); }

.vista-codigo { display: grid; grid-template-columns: 84px 1fr; gap: 16px; align-items: center; padding: 14px;
  background: var(--papel); border-radius: var(--r-control); margin-bottom: 6px; }
.vista-codigo img { border-radius: var(--r-libro); box-shadow: var(--sombra-libro); }
.vista-codigo h3 { font-size: 1.1rem; }
.vista-codigo dl { margin: 6px 0 0; display: grid; grid-template-columns: auto 1fr; gap: 2px 10px; font-size: .88rem; }
.vista-codigo dt { color: var(--gris); }
.vista-codigo dd { margin: 0; color: var(--tinta); font-weight: 600; }

/* ── Mi biblioteca ──────────────────────────────────────────────────────── */
.pagina { padding: 36px 0 64px; }
.pagina__cabecera { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; flex-wrap: wrap; margin-bottom: 28px; }
.pagina__cabecera p { color: var(--gris); margin-top: 6px; }

.continuar { display: grid; grid-template-columns: 150px 1fr; gap: 28px; align-items: center; background: var(--blanco);
  border-radius: var(--r-panel); padding: 24px; box-shadow: var(--sombra-panel); margin-bottom: 40px; position: relative; overflow: hidden; }
.continuar::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--naranja); }
.continuar img { border-radius: var(--r-libro); box-shadow: var(--sombra-libro); }
.continuar__etiqueta { color: var(--naranja-hover); font-weight: 600; font-size: .92rem; }
.continuar h2 { margin: 4px 0 10px; }
.continuar__acciones { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 18px; }

.barra-progreso { height: 8px; background: var(--tinta-suave); border-radius: 8px; overflow: hidden; }
.barra-progreso span { display: block; height: 100%; background: var(--tinta); border-radius: 8px; }
.barra-progreso--naranja span { background: var(--naranja); }
.progreso-texto { font-size: .85rem; color: var(--gris); margin-top: 6px; }

.repisa { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 32px 24px; }
.libro { display: grid; gap: 10px; align-content: start; text-decoration: none; color: inherit; }
.libro__tapa { position: relative; }
.libro__tapa img { width: 100%; height: auto; aspect-ratio: 550 / 781; object-fit: cover; border-radius: var(--r-libro); box-shadow: var(--sombra-libro); transition: transform .2s; }
a.libro:hover .libro__tapa img { transform: translateY(-4px); }
.libro h3 { font-size: 1.02rem; }
.libro__meta { font-size: .85rem; color: var(--gris); }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 99px; font-size: .78rem; font-weight: 600; width: fit-content; }
.chip svg { width: 14px; height: 14px; }
.chip--ok { background: var(--verde-suave); color: var(--verde); }
.chip--pronto { background: var(--ambar-suave); color: var(--ambar); }
.chip--fin { background: #eef0f3; color: var(--gris); }
.libro__candado { position: absolute; inset: auto 10px 10px auto; width: 38px; height: 38px; border-radius: 50%; background: var(--blanco);
  display: grid; place-items: center; box-shadow: var(--sombra-panel); color: var(--tinta); }
.libro__candado svg { width: 18px; height: 18px; }

.canje { margin-top: 48px; display: grid; grid-template-columns: 1fr auto; gap: 24px; align-items: center; padding: 22px 24px;
  border: 1.5px dashed var(--renglon); border-radius: var(--r-panel); background: var(--blanco); }
.canje form { display: flex; gap: 10px; }
.canje .entrada { width: 230px; }

.vacio { text-align: center; padding: 56px 20px; background: var(--blanco); border-radius: var(--r-panel); }
.vacio svg { width: 44px; height: 44px; color: var(--naranja); margin: 0 auto 12px; }
.vacio p { color: var(--gris); margin: 8px auto 18px; max-width: 40ch; }

/* ── Paneles (docente y dueño) ──────────────────────────────────────────── */
.pestanas { display: flex; gap: 4px; border-bottom: 1px solid var(--renglon); margin-bottom: 28px; overflow-x: auto; scrollbar-width: none; }
.pestanas::-webkit-scrollbar { display: none; }
.pestanas button { background: none; border: 0; padding: 12px 16px; font-weight: 600; color: var(--gris); cursor: pointer;
  border-bottom: 3px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.pestanas button[aria-selected='true'] { color: var(--tinta); border-bottom-color: var(--naranja); }

.cifras { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 16px; margin-bottom: 32px; }
.cifra { background: var(--blanco); border-radius: var(--r-panel); padding: 18px 20px; box-shadow: var(--sombra-panel); }
.cifra strong { display: block; font-family: var(--serif); font-size: 2rem; color: var(--tinta); line-height: 1.1; }
.cifra span { font-size: .88rem; color: var(--gris); }

.tarjeta { background: var(--blanco); border-radius: var(--r-panel); padding: 22px; box-shadow: var(--sombra-panel); }
.tarjeta + .tarjeta { margin-top: 20px; }
.tarjeta__cabecera { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.rejilla-form { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 14px; align-items: end; }

.tabla-envoltura { overflow-x: auto; border: 1px solid var(--renglon); border-radius: var(--r-control); }
table { border-collapse: collapse; width: 100%; font-size: .92rem; }
th, td { padding: 11px 14px; text-align: left; border-bottom: 1px solid var(--renglon); vertical-align: middle; }
th { background: var(--papel); color: var(--tinta); font-weight: 600; white-space: nowrap; }
tr:last-child td { border-bottom: 0; }
td .barra-progreso { width: 110px; display: inline-block; vertical-align: middle; margin-right: 8px; }
.codigo-texto { font-family: ui-monospace, Menlo, Consolas, monospace; letter-spacing: .04em; color: var(--tinta); }

.aulas { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; }
.aula { text-align: left; background: var(--blanco); border: 1.5px solid var(--renglon); border-radius: var(--r-panel); padding: 18px; cursor: pointer; }
.aula:hover { border-color: var(--tinta-2); }
.aula strong { font-family: var(--serif); font-size: 1.5rem; color: var(--tinta); display: block; }
.aula span { color: var(--gris); font-size: .9rem; }
.casillas { display: flex; flex-wrap: wrap; gap: 8px; }
.casilla { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border: 1.5px solid var(--renglon); border-radius: 99px; cursor: pointer; font-size: .9rem; background: var(--blanco); }
.casilla:has(input:checked) { border-color: var(--tinta); background: var(--tinta-suave); }
.casilla input { accent-color: var(--tinta); }

.dialogo { border: 0; border-radius: var(--r-panel); padding: 28px; width: min(460px, 92vw); box-shadow: 0 30px 80px -20px rgba(21,50,92,.5); }
.dialogo::backdrop { background: rgba(21, 50, 92, .35); }

.notificacion { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 100; background: var(--tinta); color: #fff;
  padding: 12px 18px; border-radius: var(--r-control); box-shadow: var(--sombra-panel); font-weight: 500; max-width: 92vw; }
.notificacion--error { background: var(--rojo); }

.cargando { display: grid; place-items: center; padding: 80px 0; color: var(--gris); }

.aliado { margin-top: 40px; display: flex; justify-content: space-between; align-items: center; gap: 20px; flex-wrap: wrap;
  padding: 20px 24px; border: 1.5px dashed var(--renglon); border-radius: var(--r-panel); background: var(--blanco); }
.aliado h2 { font-size: 1.15rem; margin-bottom: 4px; }
.aliado p { color: var(--gris); font-size: .93rem; max-width: 52ch; }

/* ── Lector ─────────────────────────────────────────────────────────────── */
.lector { --fondo-lector: #e9eef5; position: fixed; inset: 0; display: grid; grid-template-rows: auto minmax(0, 1fr) auto; grid-template-columns: minmax(0, 1fr); background: var(--fondo-lector);
  user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; }
.lector[data-tema='sepia'] { --fondo-lector: #efe6d4; }
.lector[data-tema='noche'] { --fondo-lector: #10161f; color: #c9d3df; }
.lector__barra { display: flex; align-items: center; gap: 8px; padding: 8px 12px; background: var(--blanco); border-bottom: 1px solid var(--renglon); transition: transform .25s; }
.lector[data-tema='noche'] .lector__barra, .lector[data-tema='noche'] .lector__pie { background: #18202b; border-color: #26303d; }
.lector__titulo { flex: 1; min-width: 0; text-align: center; }
.lector__titulo strong { display: block; font-family: var(--serif); color: var(--tinta); font-size: 1rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lector[data-tema='noche'] .lector__titulo strong { color: #e6edf5; }
.lector__titulo span { font-size: .8rem; color: var(--gris); }
.icono-boton { width: 42px; height: 42px; display: grid; place-items: center; border-radius: var(--r-control); border: 0; background: none; color: var(--tinta); cursor: pointer; flex: none; }
.icono-boton:hover { background: var(--tinta-suave); }
.lector[data-tema='noche'] .icono-boton { color: #c9d3df; }
.lector[data-tema='noche'] .icono-boton:hover { background: #26303d; }
.icono-boton svg { width: 22px; height: 22px; }
.icono-boton[aria-pressed='true'] { background: var(--tinta-suave); }

.lector__escena { position: relative; overflow: hidden; min-width: 0; min-height: 0; display: grid; place-items: center; touch-action: pan-y pinch-zoom; }
.lector__hoja { position: relative; width: 100%; height: 100%; display: flex; justify-content: center; align-items: center; padding: 14px; }
/* La página escala para caber entera en la pantalla, sin deformarse. */
.lector__hoja canvas { width: auto; height: auto; max-width: 100%; max-height: 100%; background: #fff; box-shadow: 0 10px 34px -12px rgba(21, 50, 92, .45); }
.lector__hoja--doble canvas { max-width: 50%; }
.lector__hoja--doble canvas:first-child { box-shadow: -6px 10px 30px -14px rgba(21, 50, 92, .45); }
.lector__zona { position: absolute; top: 0; bottom: 0; width: 28%; z-index: 2; border: 0; background: none; cursor: pointer; }
.lector__zona--prev { left: 0; cursor: w-resize; }
.lector__zona--next { right: 0; cursor: e-resize; }
.lector__zona:focus-visible { outline-offset: -6px; }
.lector--zoom .lector__escena { overflow: auto; place-items: start center; touch-action: auto; }
.lector--zoom .lector__hoja { height: auto; display: block; padding: 10px; }
.lector--zoom .lector__hoja canvas { display: block; margin: 0 auto; width: min(1100px, 200vw); height: auto; max-width: none; max-height: none; }
.lector--zoom .lector__zona { display: none; }

.lector__texto { height: 100%; overflow-y: auto; width: 100%; padding: 24px 16px 48px; }
.hoja-texto { --papel-hoja: #ffffff; --margen: rgba(240, 102, 58, .28); position: relative; max-width: 40rem; margin: 0 auto;
  background: var(--papel-hoja); border-radius: 6px; box-shadow: 0 1px 2px rgba(21, 50, 92, .06), 0 14px 40px -24px rgba(21, 50, 92, .45);
  padding: 34px 48px 26px 64px; font-family: var(--serif); font-size: var(--tam-texto, 1.15rem); line-height: 1.75; color: #22303f; }
/* Línea de margen de cuaderno: apenas visible, no compite con la lectura. */
.hoja-texto::before { content: ''; position: absolute; top: 0; bottom: 0; left: 40px; width: 1.5px; background: var(--margen); }
.lector[data-tema='sepia'] .hoja-texto { --papel-hoja: #fbf5e8; color: #3b3021; }
.lector[data-tema='noche'] .hoja-texto { --papel-hoja: #18202b; --margen: rgba(240, 102, 58, .35); color: #d5dde7; box-shadow: none; }
.hoja-texto__cabecera { font-family: var(--sans); font-size: .8rem; color: var(--gris); margin-bottom: 18px; }
.hoja-texto__cuerpo p { margin: 0 0 1em; text-indent: 1.3em; }
.hoja-texto__cuerpo p.titular { text-indent: 0; font-weight: 700; color: var(--tinta); font-size: 1.2em; margin: .4em 0 .9em; }
.lector[data-tema='noche'] .hoja-texto__cuerpo p.titular { color: #e6edf5; }
.hoja-texto__ilustracion { display: block; width: 100%; height: auto; border-radius: 3px; }
.hoja-texto__pie { font-family: var(--sans); font-size: .8rem; color: var(--gris); text-align: center; margin-top: 18px; font-variant-numeric: tabular-nums; }
.hoja-texto__nav { max-width: 40rem; margin: 18px auto 0; display: flex; justify-content: space-between; gap: 12px; }
.lector__texto .sin-texto { display: grid; justify-items: center; gap: 12px; text-indent: 0; text-align: center; color: var(--gris); font-family: var(--sans); font-size: .95rem; padding: 40px 0; }

.lector__pie { display: flex; align-items: center; gap: 14px; padding: 10px 16px; background: var(--blanco); border-top: 1px solid var(--renglon); }
.lector__pie input[type='range'] { flex: 1; accent-color: var(--naranja); }
.lector__pie output { font-size: .85rem; color: var(--gris); min-width: 90px; text-align: right; font-variant-numeric: tabular-nums; }

.panel-lateral { position: fixed; top: 0; bottom: 0; right: 0; width: min(360px, 88vw); background: var(--blanco); z-index: 30;
  box-shadow: -20px 0 50px -20px rgba(21, 50, 92, .4); padding: 20px; overflow-y: auto; transform: translateX(105%); transition: transform .25s; color: var(--grafito); }
.panel-lateral[data-abierto='false'] { visibility: hidden; box-shadow: none; transition: transform .25s, visibility 0s .25s; }
.panel-lateral[data-abierto='true'] { transform: none; }
.panel-lateral h2 { font-size: 1.3rem; margin-bottom: 14px; }
.panel-lateral ol { list-style: none; margin: 0; padding: 0; }
.panel-lateral li button { width: 100%; display: flex; justify-content: space-between; gap: 10px; padding: 11px 10px; border: 0; background: none;
  border-radius: 8px; cursor: pointer; text-align: left; color: var(--tinta); }
.panel-lateral li button:hover { background: var(--tinta-suave); }
.panel-lateral li button span { color: var(--gris); font-variant-numeric: tabular-nums; }
.panel-lateral li button[aria-current='true'] { background: var(--naranja-suave); font-weight: 600; }
.ajustes-grupo { margin-bottom: 22px; }
.ajustes-grupo h3 { font-family: var(--sans); font-size: .9rem; color: var(--gris); font-weight: 600; margin-bottom: 8px; }
.segmentado { display: flex; gap: 6px; }
.segmentado button { flex: 1; min-height: 44px; border: 1.5px solid var(--renglon); border-radius: var(--r-control); background: var(--blanco); cursor: pointer; font-weight: 600; color: var(--tinta); }
.segmentado button[aria-pressed='true'] { border-color: var(--tinta); background: var(--tinta-suave); }

/* ── Adaptación a pantallas ─────────────────────────────────────────────── */
@media (max-width: 900px) {
  .portada { background: repeating-linear-gradient(180deg, transparent 0 35px, var(--renglon) 35px 36px); padding-top: 36px; }
  .portada__grid { grid-template-columns: 1fr; gap: 32px; }
  .estante__libros { grid-template-columns: repeat(4, 1fr); gap: 10px; }
  .pasos__lista { grid-template-columns: 1fr; }
  .colegios__grid { grid-template-columns: 1fr; }
  .canje { grid-template-columns: 1fr; }
  .canje .entrada { width: 100%; }
}
@media (max-width: 600px) {
  .barra__fila { height: 58px; gap: 8px; }
  .logo__sub { display: none; }
  .barra__enlace--secundario { display: none; }
  .barra__nav { gap: 2px; }
  .barra__enlace { padding: 9px 10px; }
  .barra__enlace svg { display: block; width: 21px; height: 21px; }
  .barra__nav:has(.barra__enlace + .barra__enlace) .barra__texto { display: none; }
  .activar-rapido form, .canje form { flex-direction: column; }
  .continuar { grid-template-columns: 96px 1fr; gap: 16px; padding: 18px; }
  .continuar h2 { font-size: 1.3rem; }
  .repisa { grid-template-columns: repeat(2, 1fr); gap: 24px 16px; }
  .acceso__caja { padding: 24px 20px; }
  .lector__hoja { padding: 6px; }
  .lector__barra { padding: 6px; gap: 2px; }
  .icono-boton { width: 40px; height: 40px; }
  .lector__titulo strong { font-size: .92rem; }
  .lector__pie output { min-width: 70px; }
  .lector__texto { padding: 10px 8px 32px; }
  .hoja-texto { padding: 22px 18px 18px 34px; border-radius: 4px; }
  .hoja-texto::before { left: 20px; }
}

/* Las obras no se imprimen: la impresión sale en blanco. */
@media print { body * { display: none !important; } body::after { content: 'La impresión de las obras no está permitida.'; display: block; padding: 40px; font: 16px sans-serif; } }
