/* ── LIBRERÍA: se arma por piezas (bahía con arco que se repite + postes), sirve para 1..N libros ── */
.libreria { --poste: clamp(20px, 2.6vw, 40px); display: flex; flex-direction: column; align-items: center; margin: 0 auto; }
.lib-nivel { display: grid; grid-template-columns: var(--poste) auto var(--poste); }
.lib-poste { background: url('/images/portada/poste-capitel.webp') top center / 100% auto no-repeat,
                         url('/images/portada/poste-base.webp') bottom center / 100% auto no-repeat,
                         url('/images/portada/poste-fuste.webp') center top / 100% auto repeat-y; }
.lib-poste.der { transform: scaleX(-1); }
.lib-centro { width: calc(var(--n) * var(--col)); }
.lib-hueco { position: relative; height: calc(var(--col) * 1.47); display: flex; justify-content: center; align-items: flex-end;
    padding-bottom: calc(var(--col) * .165); background: url('/images/portada/estante-bahia.webp') left top / var(--col) 100% repeat-x; }
.lib-nivel:first-child .lib-hueco::before { content: ''; position: absolute; top: -1%; left: 50%; transform: translateX(-50%); z-index: 2;
    width: calc(var(--col) * .55); aspect-ratio: 170 / 82; background: url('/images/portada/estante-adorno.webp') center / contain no-repeat; pointer-events: none; }
.lib-libro { width: var(--col); height: 100%; display: flex; justify-content: center; align-items: flex-end; }
.lib-tapa { background: none; border: 0; padding: 0; cursor: pointer; height: calc(var(--col) * .98); display: flex; align-items: flex-end; justify-content: center; }
.lib-tapa img { max-height: 100%; max-width: calc(var(--col) * .76); width: auto; height: auto; object-fit: contain;
    filter: drop-shadow(0 6px 10px rgba(0,0,0,.75)); transition: transform .5s ease; }
.lib-tapa:hover img, .lib-tapa:focus-visible img { transform: translateY(-6px); }
.lib-tapa:focus-visible { outline: 2px solid #e9c97a; outline-offset: 3px; border-radius: 4px; }
.lib-rotulos { display: flex; justify-content: center; padding: 10px 0 calc(14px + var(--col) * .1);
    background: url('/images/portada/estante-riel.webp') left bottom / var(--col) auto repeat-x, linear-gradient(180deg, #0f0b07, #070504); }
.lib-info { width: var(--col); padding: 0 6px; text-align: center; }
.lib-info h3 { font-family: 'Cinzel', serif; font-weight: 700; font-size: clamp(10.5px, calc(var(--col) * .068), 15px); letter-spacing: .06em;
    color: #f0e0b8; text-transform: uppercase; line-height: 1.2; margin: 0; }
.lib-info p { font-family: 'Cormorant Garamond', serif; font-style: italic; font-size: clamp(11px, calc(var(--col) * .07), 15px); color: #b99c6b; margin: 2px 0 6px; }
.lib-btn { display: block; width: 100%; margin: 5px 0 0; padding: 5px 4px; font-family: 'Cinzel', serif; font-weight: 600;
    font-size: clamp(8.5px, calc(var(--col) * .05), 11px); letter-spacing: .08em; color: #e8d4a8; background: rgba(12,8,5,.85);
    border: 1px solid rgba(200,169,107,.55); border-radius: 6px; text-decoration: none; cursor: pointer; text-align: center; }
.lib-btn:hover, .lib-btn:focus-visible { border-color: #e9c97a; color: #fff3d0; box-shadow: 0 0 10px rgba(233,201,122,.35); outline: none; }
html.oc-liviano .lib-tapa img { transition: none; }
