/* Owner-approved 2.5D library: static room plates, real localized DOM books. Public scope only. */
html[data-library-theme] { background:#142c2b; }
body:has(.library-room) { overflow:hidden; }
/* The room owns the viewport; only the content workspace scrolls. */
.library-room.learning-public { --gold:#edce8d; --glass:rgba(13,37,40,.68); --text:#fff7e9; --muted:#e2d7c2; --faint:#cebfaa; --line:rgba(250,230,192,.2); --line-strong:rgba(250,230,192,.35); --surface:rgba(15,38,40,.88); --surface-2:rgba(29,57,56,.94); --paper:#173033; --room-inset:clamp(12px,2.4vw,36px); color:var(--text); position:relative; isolation:isolate; display:grid; grid-template-columns:minmax(0,1fr); grid-template-rows:auto auto minmax(0,1fr); height:100dvh; min-height:0; max-width:none; padding:0; overflow:hidden; scrollbar-gutter:auto; }
.room-workspace { grid-column:1; grid-row:3; display:flex; flex-direction:column; min-width:0; min-height:0; overflow:auto; overscroll-behavior:contain; padding:0 var(--room-inset); scrollbar-gutter:stable; }
.room-workspace>* { flex-shrink:0; min-width:0; }
.room-workspace>.learning-footer { margin-top:auto; }
.room-home .room-workspace { grid-row:1/-1; display:grid; grid-template-columns:minmax(0,1fr); grid-template-rows:minmax(0,1fr) auto; padding:0; overflow:hidden; scrollbar-gutter:auto; }
.room-home .room-catalog { grid-column:1; grid-row:1/-1; min-height:0; }
.room-home .room-workspace>.learning-footer { grid-column:1; grid-row:2; align-self:end; margin:0; }
.library-room .room-backdrop { position:fixed; inset:0; z-index:-2; pointer-events:none; }
.room-backdrop img { width:100%; height:100%; object-fit:cover; }
.library-room:not(.room-home) .room-backdrop { filter:blur(6px); transform:scale(1.025); }
.library-room:not(.room-home)::before { content:''; position:fixed; inset:0; z-index:-1; background:linear-gradient(#10362fe8 0 165px,#10362fbd 320px,#102b25bb); pointer-events:none; }
.library-room.learning-public>header { grid-column:1; grid-row:1; position:relative; z-index:5; gap:12px; min-height:44px; padding:0; margin:8px var(--room-inset) 0; flex-wrap:nowrap; }
.room-home.library-room>header,.room-home.library-room>.public-toolbar { margin-inline:16% 7%; }
.library-room .brand { color:var(--gold); text-decoration:none; text-shadow:0 1px 2px #1b110a,0 0 8px #1b110a; }
.library-room .brand .meta { color:#e2d7c2; }
.library-room .library-actions { flex-wrap:nowrap; gap:3px; }
.library-room .public-toolbar { grid-column:1; grid-row:2; position:relative; z-index:4; gap:8px 12px; margin:4px var(--room-inset) 8px; }
/* Engraved brass controls: no coloured shells, no backdrop effects. */
.library-room .input,.library-room .btn,.library-room .room-appearance,.room-filter-menu>summary { background:transparent; color:var(--gold); border:0; box-shadow:none; backdrop-filter:none; -webkit-backdrop-filter:none; border-radius:3px; min-height:44px; text-shadow:0 1px 2px #1b110a,0 0 8px #1b110ac9; }
.library-room header .input,.library-room .public-toolbar .input,.library-room .public-toolbar .btn { background:transparent; border:0; color:var(--gold); }
.library-room .input option { background:#26352c; color:#fff7e9; text-shadow:none; }
.library-room .input::placeholder { color:var(--gold); opacity:.85; }
.library-room .public-toolbar .btn { font-family:Georgia,'Times New Roman',serif; font-size:15px; font-weight:400; position:relative; }
.library-room .public-toolbar .btn[aria-pressed=true] { background:transparent; color:#fff0c6; border:0; }
.library-room .public-tabs .btn[aria-pressed=true]::after { content:''; position:absolute; bottom:3px; left:12px; right:12px; height:1px; background:linear-gradient(90deg,transparent,var(--gold),transparent); }
.library-room .btn:hover,.library-room .room-appearance:hover,.room-filter-menu>summary:hover { background:transparent; color:#fff4d1; }
.library-room .btn:disabled { opacity:.45; }
.library-room :is(.btn,.input,.room-appearance,a,summary):focus-visible { outline:2px solid #ffe4a5; outline-offset:2px; }
.library-room .pwa-install { position:static; inset:auto; width:44px; height:44px; min-width:44px; flex:0 0 44px; padding:10px; margin:0; display:grid; place-items:center; background:transparent; border:0; border-radius:3px; color:var(--gold); box-shadow:none; }
.library-room .pwa-install svg { color:inherit; }
.library-room .pwa-install>span { display:none; }
.library-room .room-appearance { flex:0 0 44px; width:44px; padding:10px; display:grid; place-items:center; cursor:pointer; }
.room-appearance svg { width:22px; height:22px; }
.room-filter-menu { display:contents; }
.room-filter-menu>summary { display:none; }
.room-filter-menu:not([open])>.library-filters { content-visibility:visible; display:flex; }
.library-room .public-toolbar .library-filters { flex:1 1 280px; gap:5px; }
.library-room .public-toolbar .lib-tools { flex:1 1 240px; }
.library-room .public-toolbar .search-wrap>.library-icon { color:var(--gold); }
.room-overview { position:relative; margin:0; width:100%; height:100%; min-height:0; }
.room-scene { position:absolute; inset:0; }
.room-scene img { width:100%; height:100%; display:block; }
.room-bays { position:absolute; inset:0; }
.room-bay { position:absolute; left:13.1%; top:24.1%; width:19.6%; height:42.9%; }
.room-bay:nth-child(2) { left:34.1%; }
.room-bay:nth-child(3) { left:54.1%; }
.room-bay:nth-child(4) { left:74%; }
.room-bay-open { position:relative; display:flex; flex-direction:column; align-items:center; justify-content:space-between; width:100%; height:100%; color:#fff3cc; padding:0 5px 6px; border:0; background:transparent; text-align:center; font-family:Georgia,'Times New Roman',serif; text-shadow:0 1px 2px #1d110a,0 2px 8px #1d110a; border-radius:8px; }
.room-bay-open:focus-visible { outline:3px solid #d5fbdc; outline-offset:5px; }
.room-bay-title { font:400 clamp(14px,1.55vw,23px)/1.08 Georgia,'Times New Roman',serif; text-wrap:balance; overflow-wrap:normal; hyphens:auto; width:84%; padding-top:2px; }
.room-bay-count { position:absolute; left:6%; bottom:-8%; font-size:10px; letter-spacing:.05em; padding-top:9px; }
.room-miniatures { position:absolute; bottom:48%; display:flex; align-items:flex-end; justify-content:center; gap:4px; height:34%; width:86%; padding-bottom:0; }
.room-miniatures.second-row { bottom:.4%; height:34%; }
.mini-face { height:100%; width:auto; aspect-ratio:2/3; flex:none; transform:perspective(400px) rotateY(-9deg); box-shadow:4px 4px 5px #0009; }
.mini-face .physical-cover { height:100%; min-height:0; }
.mini-face .physical-title { min-height:0; overflow:hidden; font-size:clamp(5px,.55vw,9px); line-height:1.18; padding:4px 3px; }
.mini-face .physical-cover>img { flex:0 0 53%; }
.mini-face .physical-imprint,.mini-face .physical-access { display:none; }
.mini-spine { width:18%; height:90%; padding:8px 2px; writing-mode:vertical-rl; text-orientation:mixed; font:400 clamp(8px,.67vw,10px)/1.15 Georgia,'Times New Roman',serif; background:linear-gradient(90deg,#081b18,#28544e 25%,#123a34 70%,#071a17); border:1px solid #c4a36566; border-radius:3px 2px 0 0; box-shadow:3px 2px 3px #0009; color:#f0dcb1; text-shadow:0 1px #000; overflow:hidden; }
.mini-spine:nth-child(even) { background:linear-gradient(90deg,#2d160d,#754227 30%,#482715 80%,#23140d); }
.room-bay-open:hover .room-miniatures { transform:translateY(-3px); }
.room-miniatures { transition:transform .2s ease; }
.room-home .library-motto { position:absolute; top:116px; left:16%; right:16%; z-index:2; margin:0; pointer-events:none; color:#f8e8c6; font:italic 13px/1.4 Georgia,'Times New Roman',serif; text-shadow:0 1px 3px #100b06,0 0 9px #100b06; }
.library-room .library-breadcrumb { margin:2px 0 12px; color:#fff6de; font:400 17px/1.5 Georgia,'Times New Roman',serif; }
/* Public test selection uses the workspace scroll, like the quiz and answers. */
.library-room .public-test .test-book-list { max-height:none; overflow:visible; }
.library-room .learning-footer { position:relative; padding:2px 0 max(4px,env(safe-area-inset-bottom)); color:#eee0c7; border-top:1px solid #cbbfa733; }
.room-home .learning-footer { z-index:2; border:0; background:linear-gradient(transparent,#0b241d70); }
.library-room .learning-footer a { color:inherit; text-shadow:0 1px 3px #100b06,0 0 8px #100b06; }
.library-room .footer-links { gap:0 12px; }
.close-shelves { min-height:50dvh; display:grid; gap:26px; padding:12px clamp(0px,3vw,50px) 30px; }
.timber-row { position:relative; display:flex; align-items:flex-end; justify-content:center; gap:clamp(5px,1vw,16px); min-width:0; padding:25px 20px 21px; border-radius:8px 8px 3px 3px; background:linear-gradient(90deg,#112f28b3,#263d2b70 18%,#1b342680 85%,#102b25b3); box-shadow:inset 0 12px 24px #071b1640; }
.timber-row::after { content:''; position:absolute; bottom:0; left:0; right:0; height:16px; border-top:2px solid #d0a66a; border-bottom:3px solid #3d2919; background:linear-gradient(#ad7945,#8a572e 28%,#a46e3e 45%,#7d4e2c 75%,#5a361e); box-shadow:0 13px 16px #0006,inset 0 3px 3px #d5ad7755; border-radius:2px 2px 4px 4px; }
.shelf-volume { flex:1 1 90px; min-width:0; max-width:115px; height:260px; position:relative; }
.shelf-volume.is-face { flex:2.2 1 175px; max-width:210px; height:290px; margin-right:10px; }
.shelf-volume .book-open { display:block; height:100%; width:100%; border:0; padding:0; background:transparent; color:inherit; border-radius:4px; transition:transform .18s ease; }
.shelf-volume .book-open:hover { transform:translateY(-5px) rotate(-.5deg); }
.shelf-volume .book-open:focus-visible { outline:3px solid #d5fbdc; outline-offset:4px; }
.book-spine { display:flex; flex-direction:column; align-items:center; height:100%; padding:12px 6px; border:1px solid #d1ba795c; border-radius:6px 4px 1px 1px; background:linear-gradient(90deg,#0a2422,#28534e 15%,#173d38 65%,#08211f); box-shadow:5px 0 2px #030d0b99,inset 3px 0 3px #b4c49c22,inset -5px 0 6px #03171188; color:#f5e3ba; }
.shelf-volume:nth-child(3n) .book-spine { background:linear-gradient(90deg,#331c15,#80503a 20%,#623525 70%,#2d1812); }
.shelf-volume:nth-child(4n) .book-spine { background:linear-gradient(90deg,#1d2635,#3f5870 20%,#293e56 70%,#101e2b); }
.spine-title { writing-mode:vertical-rl; text-orientation:mixed; flex:1; min-height:0; font:400 clamp(15px,1.2vw,19px)/1.22 Georgia,'Times New Roman',serif; padding:10px 0; overflow-wrap:normal; hyphens:auto; text-align:start; overflow:visible; }
.spine-title[data-density=long] { font-size:clamp(13.5px,1.05vw,17px); }
.spine-title[data-density=dense] { font-size:clamp(12px,.92vw,15px); }
.spine-imprint { font-size:8px; letter-spacing:.05em; border-bottom:1px solid #d4b97688; width:100%; text-align:center; padding-bottom:8px; }
.spine-access { border-top:1px solid #d4b97688; font-size:9px; padding-top:8px; width:100%; text-align:center; overflow-wrap:anywhere; }
.physical-cover { display:flex; flex-direction:column; position:relative; overflow:hidden; height:100%; min-height:0; background:linear-gradient(100deg,#081c1f 0%,#1e4040 9%,#173234 90%,#0a2024); border:1px solid #b5b19b7d; border-radius:3px 8px 8px 3px; box-shadow:5px 2px 0 #d8cfb1,8px 3px 0 #0a1515,12px 10px 20px #0007; padding:8% 7% 6% 10%; color:#f7ebd2; }
.physical-cover::before { content:''; position:absolute; inset:0 auto 0 3%; width:3px; background:#030d0b66; box-shadow:2px 0 2px #c4d1bd22; }
.physical-imprint { font:500 8px/1.4 Manrope,var(--sans); text-align:center; letter-spacing:.09em; padding:0 0 7%; color:#e4d3af; }
.physical-cover>img { display:block; object-fit:cover; width:100%; height:53%; min-height:0; border:1px solid #cfb7829e; border-radius:2px; }
.physical-title { flex:1; display:grid; place-content:center; padding:7% 2% 4%; font:400 clamp(12px,1.2vw,18px)/1.16 Georgia,'Times New Roman',serif; text-align:center; text-wrap:balance; overflow-wrap:normal; hyphens:auto; }
.shelf-volume .physical-title[data-density=long] { font-size:clamp(11px,1.05vw,16px); }
.shelf-volume .physical-title[data-density=dense] { font-size:clamp(10.5px,.95vw,14px); }
.physical-access { font:500 9px/1.4 Manrope,var(--sans); text-align:center; letter-spacing:.05em; opacity:.9; }
.room-empty { padding:25px; background:var(--surface); border-radius:12px; }
.room-book-dialog { width:min(520px,calc(100vw - 24px)); max-height:calc(100dvh - 24px); border:0; padding:45px 36px 24px; background:transparent; color:#fff7e9; overflow:auto; }
.room-book-dialog::backdrop { background:#0c242b9c; backdrop-filter:blur(9px); -webkit-backdrop-filter:blur(9px); }
.room-book-close { position:absolute; right:3px; top:0; font-size:24px; }
.held-book { display:block; width:min(260px,70vw); aspect-ratio:2/3; margin:auto; background:none; border:0; padding:0; color:inherit; transform:perspective(1000px) rotateY(-9deg) rotateZ(-1deg); transition:transform .2s; }
.held-book:hover { transform:perspective(1000px) rotateY(-3deg); }
.held-book .physical-title { font-size:20px; }
.held-book .physical-imprint { font-size:9px; }
.held-summary { text-align:center; font-size:13px; line-height:1.65; margin:24px 0 14px; text-shadow:0 2px 3px #000; }
.held-read,.held-locked { display:flex; justify-content:center; margin:0 auto; align-items:center; gap:8px; }
.room-book-dialog .btn { min-height:44px; min-width:44px; padding:8px 16px; border-radius:3px; color:#edce8d; border:0; background:transparent; box-shadow:none; text-shadow:0 1px 3px #100b06; }
.room-book-dialog .btn:hover { background:transparent; color:#fff4d1; }
.room-book-dialog .btn:focus-visible { outline:2px solid #ffe4a5; outline-offset:2px; }
.library-room.is-reading { grid-template-rows:auto minmax(0,1fr); }
.library-room.is-reading .room-workspace { grid-row:2; padding-top:8px; }

.library-room .learning-reader { position:relative; max-width:1420px; margin:0 auto 16px; padding:14px; background:var(--paper); border:1px solid #b0bbae66; border-radius:5px 14px 14px 5px; box-shadow:4px 3px 0 #c8c6ac,7px 5px 0 #3a4942,0 22px 70px #0008,inset 5px 0 10px #0b232b55; }
.library-room .learning-reader .learning-page { background:transparent; border:0; box-shadow:none; border-radius:0; }
.library-room .learning-reader .learning-page>figure { background:transparent; }
.library-room .learning-reader-top { padding:0 0 9px; }
.library-room .reader-title { font-size:clamp(16px,2vw,23px); }
.library-room .learning-reader-content { border-top:1px solid var(--line); padding-top:10px; }
.library-room .learning-reader-nav { padding-top:12px; background:transparent; }
html[data-library-theme=light] .library-room .learning-reader-nav .meta { color:#6e4816; }
.library-room .learning-reader.window-fullscreen,.library-room .learning-reader:fullscreen { position:fixed; inset:0; width:100%; height:100vh; height:100dvh; z-index:100; margin:0; max-width:none; background:var(--paper); padding:max(14px,env(safe-area-inset-top)) max(14px,env(safe-area-inset-right)) max(14px,env(safe-area-inset-bottom)) max(14px,env(safe-area-inset-left)); }
.library-room .card { background:var(--surface); backdrop-filter:blur(15px); }
html[data-library-theme=light] .library-room:not(.room-home) { --paper:#f2ead8; --text:#1a3434; --muted:#405856; --faint:#586b64; --surface:rgba(247,240,223,.94); --surface-2:#e1dec9; --line:rgba(27,59,50,.18); }
html[data-library-theme=light] .library-room .learning-reader .input,html[data-library-theme=light] .library-room .learning-reader .btn,html[data-library-theme=light] .library-room :is(.public-test,.public-ask) .input,html[data-library-theme=light] .library-room :is(.public-test,.public-ask) .btn { background:transparent; color:#6e4816; text-shadow:none; }
html[data-library-theme=light] .library-room .learning-reader .pwa-install { color:#6e4816; text-shadow:none; }
html[data-library-theme=light] .library-room .learning-reader .input option { color:#183e3d; background:#f2ead8; }
html[data-library-theme=light] .library-room .learning-reader { --cyan:#006672; --sky:#006672; --peach:#80502c; }
html[data-library-theme=light] .library-room .public-test,html[data-library-theme=light] .library-room .public-ask { --glass:rgba(218,228,211,.95); --cyan:#006672; --sky:#006672; color-scheme:light; }
html[data-library-theme=light] .library-room .public-test .input option,html[data-library-theme=light] .library-room .public-ask .input option { background:#f2ead8; color:#183e3d; }
html[data-library-theme=light] .library-room:not(.room-home)>.public-toolbar,html[data-library-theme=light] .library-room:not(.room-home)>header,html[data-library-theme=light] .library-room .learning-footer { --text:#fff7e9; --muted:#e2d7c2; --line:rgba(250,230,192,.25); color:#fff7e9; }

@media(min-width:701px) and (max-width:1050px) {
 .library-room .public-toolbar { flex-wrap:nowrap; gap:4px; }
 .library-room .public-toolbar .lib-tools { flex:1 1 200px; }
 .library-room .public-toolbar .library-filters { flex:1 1 230px; }
 .library-room .public-toolbar .public-tabs { flex:0 0 auto; }
 .library-room .public-tabs .btn { padding-inline:7px; font-size:13px; }
 .library-room .lib-tools .reader-language { max-width:90px; padding-inline:3px; }
 .library-room .public-toolbar .input { padding-inline:5px; font-size:11px; }
 .library-room .public-toolbar .search-wrap .search { padding-left:32px; }
 .room-bay-title { font-size:clamp(14px,1.8vw,21px); }
 .shelf-volume.is-face { height:265px; }
 .shelf-volume { height:240px; }
}
@media(max-width:700px) {
 .library-room.learning-public>header { gap:4px; }
 .library-room .brand { font-size:18px; gap:5px; }
 .library-room .brand img { width:27px; height:27px; }
 .library-room .brand .meta,.library-room .company-link>span { display:none; }
 .room-home.library-room>header,.room-home.library-room>.public-toolbar { margin-inline:15% 6%; }
 .room-home .brand-name { display:none; }
 .library-room .library-actions { gap:0; }
 .library-room header .reader-language { max-width:88px; padding-inline:4px; font-size:11px; min-width:66px; }
 .library-room .public-toolbar { display:grid; grid-template-columns:minmax(0,1fr) 44px; gap:0 4px; margin:0 var(--room-inset) 4px; }
 .library-room .public-tabs { grid-column:1; display:flex; min-width:0; }
 .library-room .public-tabs .btn { flex:1; flex-direction:column; justify-content:center; padding:2px; gap:2px; font:500 10px/1.2 Manrope,var(--sans); min-width:0; white-space:nowrap; }
 .library-room .public-tabs .btn:first-child { flex:1; }
 .library-room .public-tabs .library-icon { width:19px; height:19px; flex-shrink:0; }
 .room-filter-menu { display:block; position:relative; grid-column:2; grid-row:1; }
 .room-filter-menu>summary { width:44px; padding:10px; display:grid; place-items:center; cursor:pointer; list-style:none; }
 .room-filter-menu>summary::-webkit-details-marker { display:none; }
 .room-filter-menu:not([open])>.library-filters { display:none; }
 .library-room .room-filter-menu>.library-filters { position:absolute; top:48px; right:0; width:min(320px,calc(100vw - 24px)); display:flex; flex-direction:column; gap:8px; padding:12px; border:1px solid #c6a35c77; border-radius:6px; background:#20372af5; box-shadow:0 10px 28px #0007; }
 .library-room .room-filter-menu .library-filter { flex:none; }
 .library-room .room-filter-menu .library-filter>span { position:static; width:auto; height:auto; clip-path:none; color:#e2d7c2; font-size:11px; }
 .library-room .public-toolbar .lib-tools { grid-column:1/-1; display:flex; gap:6px; }
 .library-room .lib-tools .search-wrap { flex:1; }
 .library-room .lib-tools .reader-language { max-width:96px; font-size:11px; padding-inline:5px; }
 .library-room .public-toolbar .input { font-size:12px; }
 .room-home .library-motto { top:151px; left:20%; right:12%; font-size:11px; text-align:center; }
 .room-bay { left:12.2%; top:28.5%; width:39%; height:22.2%; }
 .room-bay:nth-child(odd) { left:12.2%; }
 .room-bay:nth-child(2n) { left:55%; }
 .room-bay:nth-child(n+3) { top:54.1%; height:21.9%; }
 .room-bay-title { font-size:clamp(12px,3.6vw,18px); line-height:1.06; width:84%; }
 .room-bay-title[data-density=long],.room-bay-title[data-density=dense] { font-size:clamp(11.5px,3.3vw,16px); }
 .room-bay-count { display:none; }
 .room-miniatures { height:62%; bottom:0; gap:3px; width:87%; }
 .room-miniatures.second-row { display:none; }
 .mini-face .physical-title { font-size:7px; }
 .mini-spine { width:18%; font-size:7px; }
 .library-room .library-breadcrumb { font-size:15px; gap:8px; }
 .close-shelves { gap:17px; padding:0 0 18px; }
 .timber-row { padding:16px 8px 16px; gap:6px; justify-content:center; }
 .shelf-volume { flex:1 1 64px; max-width:84px; height:208px; }
 .shelf-volume.is-face { flex:1.55 1 106px; max-width:136px; height:226px; margin-right:2px; }
 .spine-title { font-size:clamp(14px,3.8vw,15.5px); padding:8px 0; }
 .spine-title[data-density=long] { font-size:clamp(12px,3.5vw,14px); }
 .spine-title[data-density=dense] { font-size:clamp(11.5px,3.2vw,12.75px); }
 .spine-imprint { font-size:7px; }
 .spine-access { font-size:8px; }
 .physical-title { font-size:12px; }
 .shelf-volume .physical-title[data-density=long] { font-size:11.5px; }
 .shelf-volume .physical-title[data-density=dense] { font-size:11px; }
 .physical-imprint { font-size:7px; }
 .physical-access { font-size:8px; }
 .library-room .learning-reader { padding:10px; margin:0 1px 12px; }
 .library-room .learning-reader-top { flex-wrap:wrap; gap:8px; }
 .library-room .reader-title { order:3; flex-basis:100%; font-size:17px; }
 .library-room .reader-acts { margin-left:auto; }
 .room-book-dialog { padding:48px 20px 20px; }
 .held-book { width:min(230px,65vw); }
 .held-book .physical-title { font-size:18px; }
}
@media(max-width:350px) { .library-room .brand-name { display:none; } .library-room .public-tabs .btn,.library-room .public-tabs .btn:first-child { flex:1 1 44px; min-width:44px; } }
@media(max-width:700px) and (max-height:650px) { .room-home .library-motto { display:none; } .room-bay-title { font-size:12px; } .room-miniatures { height:54%; } }
@media(min-width:701px) and (max-height:520px) { .library-room .public-tabs .btn>span { display:none; } .room-home .library-motto { display:none; } .room-bay-title { font-size:12px; } .room-bay-title[data-density=long],.room-bay-title[data-density=dense] { font-size:11px; } .room-bay-count { display:none; } .library-room .brand .meta { display:none; } }
/* A short landscape screen uses the wide room, not a stretched portrait scene. */
@media(max-width:700px) and (orientation:landscape) {
 .library-room .public-toolbar { display:flex; flex-wrap:nowrap; gap:4px; }
 .library-room .public-tabs { flex:0 0 auto; }
 .library-room .public-tabs .btn { flex:0 0 44px; width:44px; min-width:44px; }
 .library-room .public-tabs .btn>span { display:none; }
 .library-room .room-filter-menu { flex:0 0 44px; }
 .library-room .public-toolbar .lib-tools { flex:1 1 140px; }
 .room-bay,.room-bay:nth-child(odd) { left:13.1%; top:24.1%; width:19.6%; height:42.9%; }
 .room-bay:nth-child(2) { left:34.1%; }
 .room-bay:nth-child(3) { left:54.1%; }
 .room-bay:nth-child(4) { left:74%; }
 .room-bay:nth-child(n+3) { top:24.1%; height:42.9%; }
 .room-bay-title { font-size:12px; }
 .room-bay-title[data-density=long],.room-bay-title[data-density=dense] { font-size:11px; }
 .room-home .library-motto { display:none; }
}
@media(orientation:landscape) and (max-height:520px) {
 .library-room.learning-public>header { margin-top:0; }
 .library-room .public-toolbar { margin-top:0; }
 .room-miniatures { bottom:0; height:60%; }
 .room-miniatures.second-row { display:none; }
 .room-bay-count { bottom:-14%; }
}
/* Dynamic future fields use normal shelves rather than disappearing behind a painted wall. */
.room-home:has(.room-expanded) .room-workspace { display:flex; overflow:auto; padding-top:160px; }
.room-home:has(.room-expanded) .room-catalog { flex:none; }
.room-overview.room-expanded { height:auto; min-height:0; }
.room-expanded .room-scene { display:none; }
.room-expanded .room-bays { position:relative; display:grid; grid-template-columns:repeat(auto-fit,minmax(210px,1fr)); gap:20px; padding:20px; }
.room-expanded .room-bay { position:relative; left:auto; top:auto; width:auto; height:310px; background:#51311dbd; border-bottom:16px solid #936237; padding:16px; }
.room-home:has(.room-expanded) .learning-footer { margin-top:auto; }
.room-home:has(.room-expanded) .library-motto { position:static; }
@media(prefers-reduced-motion:reduce) { .library-room *,.room-book-dialog * { transition:none!important; animation:none!important; scroll-behavior:auto!important; } }
@media(forced-colors:active) { .room-scene,.room-backdrop { display:none; } .room-bay-open,.book-spine,.physical-cover { background:Canvas; color:CanvasText; border:1px solid CanvasText; text-shadow:none; } .room-bay-open { outline:1px solid ButtonText; } .room-book-dialog { background:Canvas; color:CanvasText; } }
