/* V2: readable controls around the approved artwork. */
.collection-search{display:flex;gap:7px;max-width:440px;margin:0 auto 12px;padding:0 16px;position:relative;z-index:1}.collection-search input,.collection-search select{box-sizing:border-box;min-width:0;min-height:44px;border:1px solid #dfbf7d99;border-radius:9px;background:#071b26f2;color:#fff0cf;padding:10px;font:13px/1.3 Arial,sans-serif;box-shadow:0 3px 16px #0004}.collection-search input{width:62%}.collection-search input::placeholder{color:#d4c8ae}.collection-search select{width:38%}.collection-search :focus-visible{outline:2px solid #ffde98;outline-offset:3px}.collection-empty{background:#091f2bec;border:1px solid #a38b5c77;border-radius:12px;padding:22px;margin:12px 20px;color:#f5e8cd;font:16px/1.6 Georgia,serif}.collection-label{font-size:11px;letter-spacing:.16em;margin-bottom:10px}.collection-discover{font-size:11px;letter-spacing:.07em}.collection-count{font-size:12px}.collection-nav button{min-width:44px;min-height:44px}.collection-title{font-size:17px;line-height:1.4;text-shadow:0 2px 5px #000,0 0 10px #000}.collection-book{min-height:44px}#library-collection{top:19%}#genre-dialog .genre-description{font-size:11px}#genre-dialog .genre-book-count{font-size:11px}#genre-dialog .genre-options button{padding-bottom:30px}#genre-dialog [data-genre=all] .genre-description{font-size:11px}
.demo-read-text{position:absolute;z-index:5;right:14px;top:70px;padding:11px 15px;min-height:44px;border:1px solid #e1bf79;border-radius:24px;background:#081c2bf2;color:#ffedc8;font:13px/1.4 Arial,sans-serif;cursor:pointer}.demo-read-text[hidden]{display:none}.demo-text-reader{box-sizing:border-box;width:min(720px,calc(100vw - 24px));max-height:calc(100dvh - 32px);border:1px solid #c4a66c;border-radius:16px;background:#f4ead6;color:#2a231d;padding:0;box-shadow:0 24px 100px #000b;overflow:hidden;font-family:Georgia,serif}.demo-text-reader::backdrop{background:#02111bd9;backdrop-filter:blur(8px)}.demo-text-reader header{display:flex;justify-content:space-between;align-items:center;padding:12px 18px;background:#132a35;color:#f0d39b;font:11px Arial,sans-serif;letter-spacing:.16em}.demo-text-reader button{min-width:44px;min-height:44px;border:1px solid #94774780;border-radius:24px;color:inherit;background:transparent;font:24px Georgia;cursor:pointer}.demo-text-reader header button{border-color:#b2986888}.demo-text-reader h2{font:normal 24px/1.35 Georgia;margin:22px 28px 4px}.text-page-number{font:12px/1.5 Arial,sans-serif;margin:0 28px 12px;color:#655b4a}.demo-text-reader article{max-height:calc(100dvh - 310px);min-height:110px;overflow:auto;white-space:pre-line;font:var(--reading-size,20px)/1.8 Georgia,serif;padding:8px 28px 24px;overscroll-behavior:contain}.demo-text-reader footer{display:flex;justify-content:space-between;gap:10px;align-items:center;border-top:1px solid #bcaa8855;padding:12px 18px;font:12px Arial,sans-serif}.demo-text-reader select{padding:10px 6px;min-height:44px;background:#fff8e9;color:#2a231d;border:1px solid #ad9670;border-radius:8px;font:13px Arial,sans-serif}.demo-text-reader nav{display:flex;align-items:center;gap:10px}.demo-text-reader button:disabled{opacity:.3}.demo-text-reader :focus-visible{outline:2px solid #8b641c;outline-offset:2px}.demo-book-reader h2{font-size:12px;letter-spacing:.06em;right:116px}.demo-reader-hint{font-size:13px}.demo-reader-buy{font-size:12px}
#site-menu{position:fixed;top:max(12px,env(safe-area-inset-top));left:68px;z-index:129;min-height:44px;background:#081c2bf0;color:#ffe6ae}#site-menu[hidden]{display:none}.site-menu-dialog{box-sizing:border-box;width:min(420px,calc(100vw - 30px));padding:32px 24px 24px;border:1px solid #caab70;border-radius:16px;background:radial-gradient(ellipse at top,#25404b,#091c28 75%);color:#f7dfaf;box-shadow:0 20px 100px #000b}.site-menu-dialog::backdrop{background:#020c16b8;backdrop-filter:blur(10px)}.menu-close{position:absolute;right:8px;top:8px;font-size:22px}.site-menu-dialog p{font:10px Arial,sans-serif;letter-spacing:.18em}.site-menu-dialog h2{font:normal 30px/1.3 Georgia}.site-menu-dialog nav{display:grid;gap:8px;margin:24px 0}.site-menu-dialog nav button{display:flex;justify-content:space-between;align-items:center;min-height:58px;border-radius:9px;background:#071a2488;color:#ffe8bc}.site-menu-dialog nav span{font:17px Georgia}.site-menu-dialog [aria-current]{border-color:#f1c979;background:#c29b4933}.site-menu-dialog small{font:9px Arial,sans-serif;letter-spacing:.15em;color:#c6b698}
@media(min-width:900px){.demo-read-text{top:12px;right:166px}.demo-book-reader h2{right:285px}.demo-text-reader article{max-height:min(55dvh,600px)}}@media(max-height:700px){#library-collection{--book-width:108px;top:17%}.collection-search{margin-bottom:6px}.collection-title{font-size:14px}.collection-discover{font-size:10px}.collection-label{margin-bottom:6px}.collection-nav{margin-top:4px}.demo-text-reader h2{margin-top:12px;font-size:20px}.demo-text-reader article{max-height:calc(100dvh - 270px)}}@media(max-height:500px){#library-collection{--book-width:85px;top:15%}.collection-label{display:none}.collection-search input,.collection-search select{min-height:38px}.collection-title{font-size:12px}.collection-discover{display:none}.demo-text-reader{max-height:96dvh}.demo-text-reader article{min-height:50px;max-height:calc(96dvh - 225px)}}
body[data-page=library] #site-menu{top:auto;bottom:max(12px,env(safe-area-inset-bottom));left:50%;transform:translateX(-50%)}

/* Library: spaced original books and black collector controls. */
#library-collection{--book-width:clamp(150px,43vw,185px)}
.collection-track{gap:clamp(100px,30vw,220px);padding-left:calc((100% - var(--book-width))/2);padding-right:calc((100% - var(--book-width))/2);scroll-snap-stop:always}
.collection-book{scroll-snap-stop:always}
.collection-title{margin-left:-18px;margin-right:-18px}
#library-table-links button,.collection-nav button{background:#050505;border-color:#d7b366b3;box-shadow:inset 0 1px 0 #ffe8b525,0 4px 12px #0008}
#library-table-links .library-universe{background:radial-gradient(ellipse at 50% 0,#a8752429,transparent 70%),#030303;border:1px solid #f4d28a;border-radius:10px;padding-top:12px;padding-bottom:13px;isolation:isolate;box-shadow:0 0 0 2px #161008,0 0 0 3px #bc8b3c99,inset 0 0 0 3px #c8994530,inset 0 0 25px #d9a63c16,0 0 22px #edb74755,0 5px 20px #000b}
#library-table-links .library-universe:before,#library-table-links .library-universe:after{content:'✦';position:absolute;left:50%;transform:translateX(-50%);color:#ffe8a3;font:10px/1 Georgia;text-shadow:0 0 9px #ffcf61;pointer-events:none}
#library-table-links .library-universe:before{top:-6px}
#library-table-links .library-universe:after{bottom:-6px}
#library-table-links .library-universe span{font-size:11px;letter-spacing:.28em;margin-bottom:6px}
#library-table-links .library-universe strong{font-size:clamp(8px,2.25vw,12px);filter:drop-shadow(0 1px 0 #794b13) drop-shadow(0 0 5px #ffd67a55)}
body[data-page=library] #flow-back,body[data-page=library] #music-toggle,body[data-page=library] #site-menu{background:#050505;border-color:#d7b366b3}
@media(min-width:600px){#library-collection{width:min(100%,calc(100dvh * 1080 / 1918));--book-width:175px}}
@media(max-height:700px){#library-collection{--book-width:130px}.collection-track{gap:clamp(90px,28vw,180px)}}
@media(max-height:500px){#library-collection{--book-width:85px}}
/* Approved gold glass controls and one centered book per carousel stop. */
#library-collection .collection-window{overflow:hidden}
#library-collection .collection-track{gap:clamp(100px,40vw,500px);padding:14px 0 8px;align-items:start;scroll-padding:0}
#library-collection .collection-book{flex:0 0 100%;width:100%;scroll-snap-align:center;scroll-snap-stop:always}
#library-collection .cover-volume{width:var(--book-width);margin:0 auto}
#library-collection .collection-title{width:calc(var(--book-width) + 36px);max-width:calc(100% - 20px);margin:12px auto 0}
#library-table-links button{border:0!important;box-shadow:none!important;background:transparent url('../assets/ui/gold-side-button.svg') center/100% 100% no-repeat!important;border-radius:0;padding:10px 4px;min-height:48px;height:56px;width:calc(var(--controls-width,360px) * .242);font:clamp(12px,3.1vw,18px)/1.2 Georgia,serif;letter-spacing:.075em;color:#ffedba;text-shadow:0 1px 0 #69400e,0 0 9px #f4b95888;filter:drop-shadow(0 0 5px #ffc55744)}
#library-table-links .library-universe{min-width:0;width:calc(var(--controls-width,360px) * .44);height:80px;min-height:64px;padding:16px 8px!important;background-image:url('../assets/ui/gold-universe-button.svg')!important;display:flex;flex-direction:column;justify-content:center;align-items:center;filter:drop-shadow(0 0 7px #ffcd5966)}
#library-table-links .library-universe:before,#library-table-links .library-universe:after{content:none}
#library-table-links .library-universe span{font-size:clamp(16px,4.4vw,23px);letter-spacing:.12em;margin:0 0 3px;line-height:1.05}
#library-table-links .library-universe strong{font-size:clamp(8px,2.3vw,12px);letter-spacing:.045em;line-height:1.25;filter:drop-shadow(0 1px 0 #65400f)}
#library-collection .collection-nav button{border:1px solid #ffe5a0bb;background:linear-gradient(135deg,#ffdd894d,#94601e66);color:#fff0bd;box-shadow:inset 0 0 12px #ffdc5f22,0 0 9px #ffd55b33}
#library-collection .collection-count{color:#fff1c8;text-shadow:0 1px 4px #522b0d}
#library-table-links button:focus-visible{outline:2px solid #fff0b8!important;outline-offset:4px}
@media(max-width:360px){#library-table-links .library-universe{height:74px}#library-table-links .library-universe span{font-size:15px}#library-table-links .library-universe strong{font-size:8px}}
/* Reference button: sculpted gold relief on glossy midnight-blue enamel. */
#library-table-links .library-universe{background-image:url('../assets/ui/universe-gold-relief.webp')!important;background-size:100% 100%!important;height:80px;padding:18px 9px 15px!important;filter:drop-shadow(0 0 5px #ffc85c55)}
#library-table-links .library-universe span{background:linear-gradient(#fff5ca,#f7d683 42%,#b9812e 56%,#ffe8a3 80%);background-clip:text;-webkit-background-clip:text;filter:drop-shadow(0 1px 0 #6e410b);font-size:clamp(17px,4.5vw,24px);letter-spacing:.09em;margin-bottom:3px}
#library-table-links .library-universe strong{background:linear-gradient(#fff0b8,#e7bc65 50%,#ffe9b1);background-clip:text;-webkit-background-clip:text;font-size:clamp(8px,2.15vw,11px);letter-spacing:.035em}
