/* ==========================================================================
   Estantería de la portada: escenario (número · libro 3D · información) + riel de portadas.
   Sirve para 3 o para 40 libros. Los botones son los del sistema (botones.css): aquí no hay estilos de botón.
   ========================================================================== */
.ee { padding: clamp(40px, 6vw, 88px) 0 clamp(40px, 6vw, 80px); overflow: hidden; }
.ee-ancho { width: min(1160px, 100% - 32px); margin-inline: auto; }
.ee-cabeza { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 20px; }
.ee-ceja { display: flex; align-items: center; gap: 10px; margin: 0 0 12px; font-size: 13px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: var(--n-ambar, #F4A93B); }
.ee-ceja::before { content: ""; width: 26px; height: 2px; background: currentColor; }
.ee-titulo { margin: 0; font-size: clamp(34px, 4.6vw, 58px); line-height: 1.02; letter-spacing: -.035em; font-weight: 900; color: var(--n-tinta, #EEF3F2); }
.ee-titulo em { color: var(--n-ambar, #F4A93B); }

/* ---- Filtros por tema ---- */
.ee-chips { display: flex; gap: 8px; margin: 26px 0 0; padding: 0 0 4px; overflow-x: auto; scrollbar-width: none; }
.ee-chips::-webkit-scrollbar { display: none; }
.ee-chip { flex: none; min-height: 44px; padding: 0 18px; border: 0; border-radius: 999px; font: 700 15px/1 inherit; color: var(--n-niebla, #A7B6C2); cursor: pointer; background: rgba(238, 243, 242, .06); box-shadow: inset 0 0 0 1px rgba(238, 243, 242, .14); transition: background .25s, color .25s; }
.ee-chip:hover { color: var(--n-tinta, #EEF3F2); background: rgba(238, 243, 242, .12); }
.ee-chip[aria-pressed="true"] { color: var(--n-noche, #0A1622); background: var(--n-tinta, #EEF3F2); box-shadow: none; }
.ee-chip:focus-visible, .ee-mini:focus-visible, .ee-flecha:focus-visible, .ee-mini-todos:focus-visible { outline: 3px solid var(--n-ambar, #F4A93B); outline-offset: 3px; }

/* ---- Escenario: tres zonas sin solapes ---- */
.ee-escenas { margin-top: 22px; touch-action: pan-y; }
.ee-escena[hidden] { display: none; }
.ee-escena { --esc: #6FB396; position: relative; display: grid; grid-template-columns: minmax(120px, .8fr) minmax(220px, 1.05fr) minmax(0, 2fr); align-items: center; gap: clamp(20px, 3.4vw, 52px); padding: clamp(28px, 4vw, 56px); border-radius: clamp(28px, 3.4vw, 44px); overflow: hidden; isolation: isolate;
	background: radial-gradient(80% 110% at 18% 20%, color-mix(in srgb, var(--esc) 55%, #0A1622), transparent 70%), linear-gradient(160deg, #11263A, #0A1622); box-shadow: inset 0 0 0 1px rgba(238, 243, 242, .12), 0 50px 90px -50px rgba(0, 0, 0, .9); }
.ee-escena::after { content: ""; position: absolute; inset: 0; z-index: -1; opacity: .25; mix-blend-mode: overlay; pointer-events: none; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.5'/%3E%3C/svg%3E"); }
.ee-num { display: grid; justify-items: start; gap: 6px; }
.ee-num b { font-size: clamp(120px, 15vw, 220px); font-weight: 900; line-height: .8; letter-spacing: -.07em; color: transparent; -webkit-text-stroke: 2px color-mix(in srgb, var(--esc) 70%, #fff); }
.ee-num span { font-size: 12.5px; font-weight: 800; letter-spacing: .2em; text-transform: uppercase; color: rgba(238, 243, 242, .7); }
.ee-libro { position: relative; justify-self: center; width: min(100%, 290px); aspect-ratio: 2 / 3; perspective: 1100px; }
.ee-libro::after { content: ""; position: absolute; left: 4%; right: -6%; bottom: -26px; height: 34px; border-radius: 50%; background: radial-gradient(closest-side, rgba(0, 0, 0, .6), transparent); filter: blur(6px); }
.ee-libro-in { position: relative; display: block; width: 100%; height: 100%; transform-style: preserve-3d; transform: rotateY(-18deg) rotateX(2deg); transition: transform .9s cubic-bezier(.2, .7, .2, 1); }
.ee-escena:hover .ee-libro-in { transform: rotateY(-8deg) rotateX(1deg) translateY(-8px); }
.ee-libro-in::before { content: ""; position: absolute; top: .6%; bottom: .6%; left: -16px; width: 17px; background: linear-gradient(90deg, #0b0b0d, #3d3d44 55%, #1b1b1f); transform: rotateY(-90deg); transform-origin: right center; border-radius: 2px 0 0 2px; }
.ee-libro-in::after { content: ""; position: absolute; inset: 0; border-radius: 3px 8px 8px 3px; pointer-events: none; background: linear-gradient(105deg, rgba(255, 255, 255, .24) 0%, rgba(255, 255, 255, 0) 32%, rgba(0, 0, 0, .2) 100%); }
.ee-libro img, .ee-libro .ee-vacio { display: block; width: 100%; height: 100%; object-fit: cover; border-radius: 3px 8px 8px 3px; box-shadow: 0 0 0 1px rgba(255, 255, 255, .16), 0 36px 50px -22px rgba(0, 0, 0, .8); }
.ee-vacio { display: grid; place-items: center; padding: 18px; text-align: center; font-weight: 800; line-height: 1.15; font-size: 20px; color: rgba(255, 255, 255, .9); background: linear-gradient(160deg, color-mix(in srgb, var(--esc, #8FA9C4) 70%, #0f1c2b), #0f1c2b); }
.ee-info { display: grid; gap: 16px; min-width: 0; }
.ee-estado { justify-self: start; padding: 7px 13px; border-radius: 999px; font-size: 12.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: #fff; background: rgba(10, 22, 34, .5); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .2); }
.ee-info h3 { margin: 0; font-size: clamp(28px, 3.1vw, 44px); line-height: 1.08; letter-spacing: -.03em; font-weight: 800; color: #fff; text-wrap: balance; }
.ee-perlas { display: grid; gap: 12px; margin: 4px 0 0; padding: 0; list-style: none; }
.ee-perlas li { position: relative; padding: 2px 0 2px 20px; font-size: clamp(16px, 1.35vw, 18.5px); line-height: 1.5; font-style: italic; color: rgba(238, 243, 242, .9); }
.ee-perlas li::before { content: ""; position: absolute; left: 0; top: 4px; bottom: 4px; width: 3px; border-radius: 3px; background: linear-gradient(180deg, var(--n-ambar, #F4A93B), rgba(244, 169, 59, .2)); }
.ee-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin: 0; font-size: 15.5px; color: #C4D0D8; }
.ee-meta i { font-weight: 700; color: var(--n-tinta, #EEF3F2); }
.ee-tema { padding: 5px 11px; border-radius: 999px; font-size: 12.5px; font-weight: 700; color: var(--n-leer, #8EC5F0); background: rgba(142, 197, 240, .12); }
.ee-acciones { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; margin-top: 6px; }
.ee-cambia { animation: ee-in .55s cubic-bezier(.2, .7, .2, 1); }
@keyframes ee-in { from { opacity: 0; transform: translateY(10px); } }

/* ---- Riel de portadas (escala a muchos libros) ---- */
.ee-riel-zona { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 14px; margin-top: 26px; }
.ee-riel { display: flex; gap: 14px; margin: 0; padding: 10px 6px 14px; list-style: none; overflow-x: auto; scroll-snap-type: x proximity; scrollbar-width: none; }
.ee-riel::-webkit-scrollbar { display: none; }
.ee-riel li { flex: none; scroll-snap-align: center; margin: 0; }
.ee-mini { position: relative; display: block; width: 74px; aspect-ratio: 2 / 3; padding: 0; border: 0; border-radius: 4px 8px 8px 4px; overflow: hidden; cursor: pointer; background: #11263A; opacity: .55; transform: scale(.94); transition: opacity .3s, transform .35s cubic-bezier(.2, .7, .2, 1), box-shadow .3s; box-shadow: 0 14px 24px -14px rgba(0, 0, 0, .8); }
.ee-mini:hover { opacity: .9; transform: translateY(-4px) scale(.98); }
.ee-mini[aria-current="true"] { opacity: 1; transform: translateY(-6px) scale(1.04); box-shadow: 0 0 0 2px var(--n-ambar, #F4A93B), 0 20px 30px -14px rgba(0, 0, 0, .9); }
.ee-mini img { display: block; width: 100%; height: 100%; object-fit: cover; }
.ee-mini .ee-vacio { font-size: 9.5px; padding: 6px; box-shadow: none; border-radius: 0; }
.ee-mini-todos { display: grid; place-items: center; width: 74px; aspect-ratio: 2 / 3; padding: 6px; border-radius: 4px 8px 8px 4px; text-align: center; font-size: 12.5px; font-weight: 800; line-height: 1.2; text-decoration: none; color: var(--n-ambar, #F4A93B); background: rgba(244, 169, 59, .08); box-shadow: inset 0 0 0 1.5px rgba(244, 169, 59, .5); }
.ee-flecha { display: grid; place-items: center; width: 52px; height: 52px; padding: 0; border: 0; border-radius: 50%; color: var(--n-tinta, #EEF3F2); background: transparent; cursor: pointer; box-shadow: inset 0 0 0 1px rgba(238, 243, 242, .22); transition: background .25s, color .25s; }
.ee-flecha:hover:not(:disabled) { background: var(--n-ambar, #F4A93B); color: var(--n-noche, #0A1622); }
.ee-flecha:disabled { opacity: .3; cursor: default; }
.ee-pie { display: flex; align-items: center; gap: 18px; margin-top: 4px; }
.ee-cuenta { font-variant-numeric: tabular-nums; font-size: 15px; color: var(--n-niebla, #A7B6C2); }
.ee-cuenta b { font-size: 22px; color: var(--n-tinta, #EEF3F2); }
.ee-prog { flex: 1; height: 3px; border-radius: 3px; background: rgba(238, 243, 242, .14); overflow: hidden; }
.ee-prog i { display: block; height: 100%; width: 10%; background: var(--n-ambar, #F4A93B); transition: width .4s; }

/* ---- Celular ---- */
@media (max-width: 960px) {
	.ee { padding-top: 40px; }
	.ee-escena { grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); grid-template-areas: "num libro" "info info"; gap: 18px 14px; padding: 22px 18px 24px; border-radius: 28px; align-items: end; }
	.ee-num { grid-area: num; align-self: center; }
	.ee-num b { font-size: clamp(88px, 28vw, 130px); }
	.ee-libro { grid-area: libro; width: min(100%, 190px); }
	.ee-info { grid-area: info; gap: 14px; }
	.ee-info h3 { font-size: clamp(25px, 7vw, 32px); }
	.ee-perlas li:nth-child(n+2) { display: none; }
	.ee-acciones { display: grid; }
	.ee-acciones .lv-btn { width: 100%; justify-content: center; }
	.ee-flecha { display: none; }
	.ee-riel-zona { grid-template-columns: minmax(0, 1fr); margin-top: 20px; }
	.ee-mini, .ee-mini-todos { width: 58px; }
}
@media (prefers-reduced-motion: reduce) { .ee-libro-in, .ee-mini, .ee-prog i { transition: none; } .ee-cambia { animation: none; } }

/* Celular: más compacto (la tarjeta no debe ser una pantalla entera) */
@media (max-width: 960px) {
	.ee-escena { padding: 18px 16px 20px; gap: 14px 10px; }
	.ee-libro { width: min(100%, 158px); }
	.ee-libro::after { bottom: -18px; height: 24px; }
	.ee-num b { font-size: clamp(80px, 25vw, 112px); }
	.ee-info { gap: 12px; }
	.ee-info h3 { font-size: clamp(23px, 6.3vw, 28px); }
	.ee-perlas li { font-size: 15.5px; }
	.ee-meta .ee-tema { display: none; }
	.ee-acciones { gap: 10px; margin-top: 2px; }
}

/* Todas las tarjetas del mismo tamaño: se apilan en la misma celda y la más alta marca la altura de todas */
.ee-escenas { display: grid; }
.ee-escenas > .ee-escena, .ee-escenas > .ee-escena[hidden] { grid-area: 1 / 1; display: grid; }
.ee-escenas > .ee-escena[hidden] { visibility: hidden; opacity: 0; pointer-events: none; }
.ee-escenas > .ee-escena { align-content: center; transition: opacity .35s ease; }
@media (prefers-reduced-motion: reduce) { .ee-escenas > .ee-escena { transition: none; } }

/* ===== Tarjeta más alargada: menos aire arriba y abajo, botones siempre en horizontal ===== */
@media (min-width: 961px) {
	.ee-escena { padding: clamp(22px, 2.6vw, 34px) clamp(28px, 4vw, 56px); gap: clamp(18px, 3vw, 44px); }
	.ee-libro { width: min(100%, 236px); }
	.ee-num b { font-size: clamp(110px, 13vw, 190px); }
	.ee-info { gap: 12px; }
	.ee-info h3 { font-size: clamp(26px, 2.7vw, 38px); }
	.ee-perlas { gap: 9px; margin-top: 0; }
	.ee-perlas li { font-size: clamp(15.5px, 1.25vw, 17.5px); line-height: 1.45; }
	.ee-acciones { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 8px; max-width: 520px; }
	.ee-acciones .lv-btn { justify-content: flex-start; width: 100%; min-width: 0; }
}
@media (max-width: 960px) {
	.ee-escena { padding: 16px 14px 18px; gap: 12px 8px; }
	.ee-libro { width: min(100%, 150px); }
	.ee-num b { font-size: clamp(76px, 24vw, 104px); }
	.ee-info { gap: 10px; }
	.ee-perlas li { font-size: 15px; }
	.ee-acciones { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 4px; }
	.ee-acciones .lv-btn { width: 100%; min-width: 0; justify-content: flex-start; min-height: 60px; padding: 6px 10px 6px 6px; gap: 8px; }
	.ee-acciones .lv-btn .lv-btn__ico { width: 46px; height: 46px; flex: none; }
	.ee-acciones .lv-btn .lv-btn__txt small { font-size: 10px; }
	.ee-acciones .lv-btn .lv-btn__txt b { font-size: 15px; white-space: nowrap; }
}
.ee-acciones .lv-btn:only-child { grid-column: 1 / -1; }
@media (min-width: 961px) { .ee-acciones:has(.lv-btn:only-child) { max-width: 247px; } }
@media (max-width: 960px) {
	.ee-acciones .lv-btn { padding: 6px 8px 6px 6px; gap: 6px; }
	.ee-acciones .lv-btn .lv-btn__ico { width: 40px; height: 40px; }
	.ee-acciones .lv-btn .lv-btn__ico svg { width: 18px; height: 18px; }
	.ee-acciones .lv-btn .lv-btn__txt b { font-size: 14px; }
}

/* Ficha final del riel: «Ver toda la biblioteca» legible, del alto de las portadas */
.ee-riel li.ee-riel-fin { align-self: stretch; display: flex; }
body .ee-mini-todos { aspect-ratio: auto; width: 132px; height: 111px; display: flex; flex-direction: column; justify-content: space-between; align-items: flex-start; gap: 6px; padding: 12px 14px; text-align: left; font-size: 14px; font-weight: 800; line-height: 1.2; letter-spacing: -.005em; text-wrap: balance; transition: background .25s, box-shadow .25s; }
body .ee-mini-todos::after { content: "→"; display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; font-size: 15px; line-height: 1; color: var(--n-noche, #0A1622); background: var(--n-ambar, #F4A93B); transition: transform .25s; }
body .ee-mini-todos:hover { background: rgba(244, 169, 59, .16); box-shadow: inset 0 0 0 1.5px var(--n-ambar, #F4A93B); }
body .ee-mini-todos:hover::after { transform: translateX(3px); }
@media (max-width: 960px) { body .ee-mini-todos { width: 112px; height: 87px; padding: 9px 11px; font-size: 12.5px; } body .ee-mini-todos::after { width: 24px; height: 24px; font-size: 13px; } }

/* Hover y foco dentro de la paleta (el reset del tema padre los pinta de rosa y azul oscuro) */
.ee-mini:is(:hover, :focus, :active) { background-color: #11263A; color: inherit; }
.ee-flecha:is(:focus, :active), .ee-flecha:disabled:is(:hover, :focus) { background-color: transparent; color: var(--n-tinta, #EEF3F2); }
.ee-flecha:hover:not(:disabled) { background-color: var(--n-ambar, #F4A93B); color: var(--n-noche, #0A1622); }
.ee-chip:is(:focus, :active):not([aria-pressed="true"]) { background-color: rgba(238, 243, 242, .06); color: var(--n-niebla, #A7B6C2); }
.ee-chip:hover:not([aria-pressed="true"]) { background-color: rgba(238, 243, 242, .12); color: var(--n-tinta, #EEF3F2); }
.ee-chip[aria-pressed="true"]:is(:hover, :focus, :active) { background-color: var(--n-tinta, #EEF3F2); color: var(--n-noche, #0A1622); }
.ee-mini-todos:is(:hover, :focus, :active) { color: var(--n-ambar-claro, #FFD89B); }
