/* Non-modal resource reader: background navigation and page scrolling stay active. */
body.reader-open { overflow:auto; overflow-x:clip; }
.resource-reader { width:min(560px,44vw); height:calc(100dvh - 24px); max-height:calc(100dvh - 24px); inset:12px 12px auto auto; padding:0; border:1px solid rgb(32 72 46 / .12); border-radius:12px; background:white; box-shadow:-8px 10px 46px rgb(16 40 25 / .13); z-index:20; }
.resource-reader:not([hidden]) { animation:reader-arrive .28s cubic-bezier(.2,.75,.3,1) both; }
.paper-sheet { min-height:100%; padding:28px; background:#fff; box-shadow:none; border-radius:inherit; transform-origin:right center; }
.resource-reader:not([hidden]) .paper-sheet { animation:none; }
.paper-sheet::before,.paper-sheet::after { display:none; }
.detail-toolbar { top:0; margin-top:22px; }
.dialog-top { margin-bottom:24px; }
.dialog-top button { font-size:12px; }
#detail-actions button { display:inline-flex; align-items:center; justify-content:center; gap:9px; }
#detail-actions button svg { width:17px; height:17px; flex-shrink:0; }
#copy-status { font-size:12px; }
@keyframes reader-arrive { from { transform:translateX(30px); opacity:0; } to { transform:none; opacity:1; } }
.hero-cursor-glow { position:absolute; left:0; top:0; width:160px; height:160px; border-radius:50%; background:rgb(255 190 108 / .2); box-shadow:none; filter:blur(22px); mix-blend-mode:screen; pointer-events:none; z-index:8; opacity:0; transition:opacity .3s cubic-bezier(.2,.75,.3,1); }
.scene-stage.cursor-lit .hero-cursor-glow { opacity:1; }
.stand-sign::after { content:''; position:absolute; inset:-5px; z-index:-1; pointer-events:none; background:rgb(255 180 83 / .035); box-shadow:0 0 32px 12px rgb(255 178 81 / .19),0 14px 45px 16px rgb(255 179 83 / .1); opacity:0; transition:opacity .5s cubic-bezier(.2,.75,.3,1); }
.scene-stage.stand-warmed .stand-sign::after { opacity:1; }
.scene-scroll { background:transparent; box-shadow:none; border-radius:0; width:48px; height:62px; padding:8px; color:#9e431d; }
.footsteps { display:block; width:28px; height:38px; }
.step-left,.step-right { transform-box:fill-box; transform-origin:center; }
.scene-scroll:hover .step-left { animation:step-forward .8s cubic-bezier(.2,.75,.3,1) infinite alternate; }
.scene-scroll:hover .step-right { animation:step-forward .8s .3s cubic-bezier(.2,.75,.3,1) infinite alternate; }
@keyframes step-forward { from { opacity:.5; translate:0 2px; } to { opacity:1; translate:0 -2px; } }
@media(max-width:900px) { .resource-reader { width:min(520px,62vw); } }
@media(max-width:650px) { .resource-reader { width:100%; max-width:100%; height:70dvh; max-height:70dvh; inset:auto 0 0; border-radius:14px 14px 0 0; } .paper-sheet { padding:24px; } #detail-art { width:60px; height:60px; } }
@media(hover:none),(pointer:coarse) { .hero-cursor-glow { display:none; } }
@media(prefers-reduced-motion:reduce) { .resource-reader:not([hidden]) { animation:none; } .hero-cursor-glow { transition:none; } .stand-sign::after { transition:none; } .scene-scroll:hover .step-left,.scene-scroll:hover .step-right { animation:none; } }
@media(min-width:901px) { .resource-reader { width:min(480px,42vw); } }
/* Dock the reader beside the page so navigation, search and papers remain reachable. */
@media(min-width:1250px) {
 body.reader-open .page { width:calc(100% - 504px); max-width:none; margin:0; padding:0 32px; }
 body.reader-open header { gap:20px; }
 body.reader-open header nav { gap:14px; }
 body.reader-open header .owner { font-size:12px; }
 body.reader-open .scene-journey { height:auto; }
 body.reader-open .scene-stage { position:relative; height:auto; aspect-ratio:1679 / 937; }
 body.reader-open .scene-world { inset:0; width:100%; height:100%; translate:none; animation:none; }
 body.reader-open .scene-copy { animation:none; transform:none; top:21%; }
 body.reader-open .scene-copy h1 { font-size:clamp(24px,2.1vw,34px); letter-spacing:-1.1px; }
 body.reader-open .scene-copy p { font-size:11px; margin:18px 0; }
 body.reader-open .scene-enter { font-size:10px; padding:6px 6px 6px 14px; gap:14px; }
 body.reader-open .scene-enter span { width:24px; height:24px; font-size:15px; }
 body.reader-open .scene-scroll { animation:none; }
 body.reader-open .category-toolbar { flex-wrap:wrap; gap:14px; }
 body.reader-open .category-toolbar form { width:250px; }
 body.reader-open .library-layout.has-topics { grid-template-columns:145px minmax(0,1fr); gap:24px; }
 body.reader-open .publication-shelf,body.reader-open .recent-grid.rack-view .publication-shelf:nth-child(2) { grid-template-columns:repeat(2,minmax(0,1fr)); gap:24px; }
 body.reader-open .recent-grid.rack-view .publication-shelf .material:nth-child(3) { grid-column:1 / span 2; width:65%; justify-self:center; }
 body.reader-open .recent-grid.rack-view .publication-shelf .material { transform:none; }
 body.reader-open .categories button { padding:12px 8px; gap:6px; }
 body.reader-open .category-name { font-size:12px; }
 body.reader-open .category-count { font-size:10px; }
 body.reader-open .course { grid-template-columns:110px 1fr; }
 body.reader-open .course-action { grid-column:2; }
}
@media(max-width:1249px) {
 .resource-reader { width:100%; max-width:100%; height:65dvh; max-height:65dvh; inset:auto 0 0; border-radius:14px 14px 0 0; }
}
@media(min-width:1250px) {
 body.reader-open .stand-sign { font-size:clamp(18px,1.7vw,27px); white-space:nowrap; }
 body.reader-open #stand-preview-title { font-size:12px; }
 body.reader-open #stand-preview-kind { font-size:8px; }
 body.reader-open #stand-preview-description { display:none; }
 body.reader-open .stand-preview-action { font-size:10px; }
 body.reader-open .scene-hotspot { font-size:9px; padding:5px 7px; gap:5px; }
 body.reader-open .hotspot-dot { width:16px; height:16px; font-size:12px; }
}
.resource-reader { position:fixed; margin:0; overflow-y:auto; overflow-x:hidden; color:var(--ink); font-family:'Poppins',sans-serif; }
.resource-reader[hidden] { display:none; }
.page { container-name:library-page; container-type:inline-size; }
.scene-world { container-type:inline-size; }
/* The photograph and every overlay share one scale, including when the reader docks. */
.stand-sign { font-size:2.55cqw; letter-spacing:-.07cqw; white-space:nowrap; }
.scene-hotspot { font-size:.85cqw; gap:.6cqw; padding:.45cqw .7cqw .45cqw .45cqw; }
.hotspot-dot { width:1.25cqw; height:1.25cqw; font-size:.95cqw; }
.publication-title { font-size:.6cqw; }
.publication-type { font-size:.38cqw; }
#stand-preview-kind { font-size:.6cqw; }
#stand-preview-title { font-size:1.1cqw; }
#stand-preview-description { font-size:.72cqw; }
.stand-preview-action { font-size:.7cqw; }
@media(min-width:1250px) {
 body.reader-open .stand-sign { font-size:2.55cqw; }
 body.reader-open .scene-hotspot { font-size:.85cqw; gap:.6cqw; padding:.45cqw .7cqw .45cqw .45cqw; }
 body.reader-open .hotspot-dot { width:1.25cqw; height:1.25cqw; font-size:.95cqw; }
 body.reader-open #stand-preview-title { font-size:1.2cqw; }
 body.reader-open #stand-preview-kind { font-size:.65cqw; }
 body.reader-open .stand-preview-action { font-size:.8cqw; }
}
@container library-page (max-width:980px) {
 header { gap:16px; }
 header nav { gap:12px; }
 header .owner { font-size:12px; }
 .categories button,.categories button[aria-pressed=true] { padding:12px 8px; gap:7px; grid-template-columns:28px minmax(0,1fr) auto; }
 .categories .cover-art { width:28px; height:28px; }
 .category-name { font-size:12px; }
 .category-count { font-size:10px; }
 .category-toolbar { flex-wrap:wrap; gap:14px; }
 .category-toolbar form { width:250px; }
 .library-layout.has-topics { grid-template-columns:140px minmax(0,1fr); gap:24px; }
 .publication-shelf,.recent-grid.rack-view .publication-shelf:nth-child(2) { grid-template-columns:repeat(2,minmax(0,1fr)); gap:24px; }
 .recent-grid.rack-view .publication-shelf .material:nth-child(3) { grid-column:1 / span 2; width:65%; justify-self:center; }
 .course { grid-template-columns:110px minmax(0,1fr); }
 .course-action { grid-column:2; }
}
@media(max-width:767px) {
 .stand-sign { font-size:clamp(18px,5vw,30px); }
 .publication-title { font-size:7px; }
 .publication-type { font-size:5px; }
}
@media(min-width:768px) { .stand-sign,body.reader-open .stand-sign { font-size:2.4cqw; } }
