/* The library as a room (rd/library.js). Nothing applies without .rd-lib; the flat shelf stays underneath for readers and as the fallback. */
/* The section overlaps the end of the chapter before it and the start of the one after (--lib-e of a screen each): the hall is
   entered through the chapter's picture frame and left through the next one, so it sits above their pins (z 41) and has no ground of its own. */
#books.rd-lib { display: block !important; position: relative; z-index: 42 !important; padding: 0 !important; min-height: 0; background: none !important; pointer-events: none;
    margin-top: calc(-100svh - var(--lib-e, 0svh)) !important; margin-bottom: calc(-100svh - var(--lib-e, 0svh)) !important; }
.lib-pin { pointer-events: auto; will-change: clip-path; }
#books.rd-lib > :not(.lib) { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); padding: 0; margin: 0; }
.lib { position: relative; width: 100%; }
.lib-pin { position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden; color: #f2ede4; background: #0b0705; }
.lib-pin.is-point, .lib-pin.is-point * { cursor: pointer !important; }
.lib-cv { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.lib-pin p, .lib-pin h2, .lib-pin h3 { margin: 0; }
.lib-head { position: absolute; left: var(--rd-gutter); top: 17vh; pointer-events: none; text-shadow: 0 2px 40px rgba(0, 0, 0, .6); }
.lib-k { font: 500 11px/1 var(--rd-mono); letter-spacing: .1em; text-transform: uppercase; color: var(--rd-accent); margin-bottom: 18px !important; }
.lib-h { font: 400 clamp(54px, 9.4vw, 168px)/.9 var(--rd-serif); letter-spacing: -.045em; text-transform: none; }
.lib-h span, .lib-h em { display: block; } .lib-h em { font-style: italic; padding-left: .5em; }
.lib-info { position: absolute; left: var(--rd-gutter); bottom: 108px; width: min(440px, calc(100vw - 2 * var(--rd-gutter))); pointer-events: none; opacity: 0; text-shadow: 0 1px 24px rgba(0, 0, 0, .9), 0 0 2px rgba(0, 0, 0, .8); transition: opacity .3s; }
.lib-info::before { content: ''; position: absolute; z-index: -1; inset: -90px -160px -140px -90px; background: radial-gradient(closest-side, rgba(8, 5, 3, .82), rgba(8, 5, 3, 0)); }
.lib-cat { font: 500 11px/1 var(--rd-mono); letter-spacing: .1em; text-transform: uppercase; color: var(--rd-accent); }
.lib-title { margin-top: 14px !important; font: 400 clamp(30px, 3.5vw, 56px)/1 var(--rd-serif); letter-spacing: -.03em; }
.lib-author { margin-top: 10px !important; font: italic 400 clamp(16px, 1.3vw, 20px)/1.2 var(--rd-serif); }
.lib-note { margin-top: 16px !important; font: 400 15px/1.5 var(--rd-sans); color: rgba(242, 237, 228, .78); }
.lib-info.is-in > * { animation: libUp .55s var(--rd-ease) both; } .lib-info.is-in > :nth-child(2) { animation-delay: .04s; } .lib-info.is-in > :nth-child(3) { animation-delay: .08s; } .lib-info.is-in > :nth-child(4) { animation-delay: .12s; }
@keyframes libUp { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.lib-cnt, .lib-hint { position: absolute; right: var(--rd-gutter); font: 500 11px/1 var(--rd-mono); letter-spacing: .1em; text-transform: uppercase; opacity: 0; pointer-events: none; text-shadow: 0 1px 12px rgba(0, 0, 0, .9); font-variant-numeric: tabular-nums; }
.lib-cnt { top: 96px; } .lib-hint { bottom: 150px; }
.lib-pin.is-open .lib-hint { visibility: hidden; }
@media (max-width: 760px) {
    .lib-head { top: 15vh; }
    .lib-info { bottom: 132px; }
    .lib-note { font-size: 14px; }
    .lib-hint { display: none; }
    .lib-cnt { top: 76px; }
}
