/* A reading lamp in the upper right. This layer never takes clicks or focus. */
.reading-room-light{position:fixed;inset:0;z-index:3;pointer-events:none;user-select:none;overflow:hidden;contain:strict;opacity:0;transition:opacity 1.2s ease;background:radial-gradient(ellipse 100% 125% at 98% 0%,#30271b00 3%,#30271b18 26%,#30271b36 58%,#30271b4a 100%)}
.reading-room-light::before{content:'';position:absolute;inset:-15%;background:conic-gradient(from 192deg at 85% 0%,transparent 0deg,#fff0c940 8deg,#fff8de99 13deg,#fff0cc33 19deg,transparent 23deg,#ffefc15c 29deg,#fff8dd80 33deg,transparent 40deg);mask-image:linear-gradient(#000e,#000c 50%,transparent 100%)}
.reading-room-light::after{content:'';position:absolute;inset:0;background:radial-gradient(ellipse 42% 55% at 98% -4%,#ffe6a86b 0%,#fff0c32b 33%,transparent 75%);pointer-events:none}
.reading-room-light>canvas{position:relative;z-index:1;display:block;width:100%;height:100%}
.room-lit .reading-room-light{opacity:1}
/* A quiet column of independently changing literary bookplates. */
.literary-echoes{position:absolute;z-index:2;left:12px;top:104px;bottom:24px;width:86px;display:grid;gap:12px;pointer-events:none}
.literary-echoes[hidden]{display:none}
.literary-slot{position:relative;min-height:0}
.literary-echo{position:absolute;inset:0;display:flex;flex-direction:column;align-items:center;justify-content:center;opacity:0}
.literary-emblem{display:block;width:100%;aspect-ratio:1;background-image:url('/assets/literary-emblems.webp');background-size:300% 200%;background-repeat:no-repeat;mask-image:radial-gradient(ellipse 54% 56% at 50% 50%,#000 50%,#000a 73%,transparent 100%);filter:sepia(.5) saturate(.65)}
.emblem-hemingway{background-position:0 0}.emblem-tolkien{background-position:50% 0}.emblem-maas{background-position:100% 0}.emblem-yarros{background-position:0 100%}.emblem-marquez{background-position:50% 100%}.emblem-krasznahorkai{background-position:100% 100%}
.literary-classic{background-image:url('/assets/literary-emblems-classics.webp')}
.emblem-christie{background-position:0 0}.emblem-doyle{background-position:50% 0}.emblem-saint-exupery{background-position:100% 0}.emblem-carroll{background-position:0 100%}.emblem-lewis{background-position:100% 100%}
.literary-library{background-image:url('/assets/literary-emblems-library.webp');background-size:300% 300%}
.emblem-shakespeare{background-position:0 0}.emblem-williams{background-position:50% 0}.emblem-mann{background-position:100% 0}.emblem-huxley{background-position:50% 50%}.emblem-austen{background-position:100% 50%}.emblem-cervantes{background-position:0 100%}.emblem-verne{background-position:50% 100%}.emblem-baum{background-position:100% 100%}
.literary-story{background-image:url('/assets/literary-emblems-stories.webp');background-size:300% 300%}
.emblem-rowling{background-position:0 0}.emblem-travers{background-position:50% 0}.emblem-barrie{background-position:100% 0}.emblem-dickens{background-position:0 50%}.emblem-hugo{background-position:50% 50%}.emblem-dumas{background-position:100% 50%}.emblem-fitzgerald{background-position:0 100%}.emblem-montgomery{background-position:50% 100%}.emblem-potter{background-position:100% 100%}
.literary-tale{background-image:url('/assets/literary-emblems-tales.webp');background-size:300% 100%}
.emblem-orwell-1984{background-position:0 0}.emblem-homer{background-position:50% 0}.emblem-boccaccio{background-position:100% 0}
.literary-world-a{background-image:url('/assets/literary-emblems-world-a.webp')}
.emblem-shelley{background-position:0 0}.emblem-tolstoy{background-position:50% 0}.emblem-andersen{background-position:100% 0}.emblem-lagerlof{background-position:0 100%}.emblem-ibsen{background-position:50% 100%}.emblem-capek{background-position:100% 100%}
.literary-world-b{background-image:url('/assets/literary-emblems-world-b.webp')}
.emblem-brlic{background-position:0 0}.emblem-multatuli{background-position:50% 0}.emblem-sienkiewicz{background-position:100% 0}.emblem-saramago{background-position:0 100%}.emblem-eminescu{background-position:50% 100%}.emblem-hviezdoslav{background-position:100% 100%}
.literary-reader{background-image:url('/assets/literary-emblems-readers.webp');background-size:300% 300%}
.emblem-milne{background-position:0 0}.emblem-brown{background-position:50% 0}.emblem-carnegie{background-position:100% 0}.emblem-frank{background-position:0 50%}.emblem-dahl{background-position:50% 50%}.emblem-twain{background-position:100% 50%}.emblem-james{background-position:0 100%}
.literary-echo figcaption{color:#66543a;text-align:center;font:italic 12px/1.45 var(--serif);letter-spacing:.2px;margin-top:9px}
@media(min-width:1200px){.header.page-width,.library.page-width{margin-left:max(110px,calc((100% - 1560px)/2))}}
@media(max-width:1199px),(max-height:650px){.literary-echoes{display:none}}
/* Half a cup peeks into the desktop gutter; steam rises from the coffee. */
.reading-room-coffee{--cup-size:clamp(210px,15vw,300px);position:absolute;z-index:2;right:calc(var(--cup-size) * -.5);bottom:clamp(24px,4vh,48px);width:var(--cup-size);height:var(--cup-size);pointer-events:none}
.reading-room-coffee img{display:block;width:100%;height:100%;filter:drop-shadow(-5px 12px 11px #49341f24)}
.coffee-steam{position:absolute;left:10%;bottom:60%;width:68%;height:90%;display:block;pointer-events:none;filter:blur(.6px)}
@media(max-width:1100px),(max-height:650px){.reading-room-coffee{display:none}}
.ambience-toggle{display:inline-grid;place-items:center;flex-shrink:0;width:34px;height:34px;padding:6px;border:1px solid var(--line);border-radius:50%;background:transparent;color:var(--muted);cursor:pointer;transition:color .2s,background .2s,border-color .2s}
.ambience-toggle[aria-pressed=true]{color:#986d32;background:#fff8e6;border-color:#cbb58c}
.ambience-toggle:hover{border-color:#986d32}
.ambience-toggle .icon{width:19px;height:19px}
.ambience-toggle[hidden]{display:none}
.dictionary::after{content:'';position:absolute;inset:-1px;border-radius:10px;pointer-events:none;opacity:0;border:1px solid #c6a365;background:linear-gradient(115deg,transparent 10%,#fff9e533 32%,#fffce7a8 46%,#fff5cf26 60%,transparent 78%);box-shadow:0 0 18px #c4a46b20}
.room-lit .dictionary.is-sunlit::after{animation:book-sunlight 3.2s ease-in-out both}
@keyframes book-sunlight{0%,100%{opacity:0}42%{opacity:.65}68%{opacity:.3}}
@media(max-width:760px){.header-actions{gap:8px}.ambience-toggle{width:30px;height:30px;padding:5px}.reading-room-light{background:radial-gradient(ellipse 120% 100% at 100% 0%,#30271b00 3%,#30271b20 40%,#30271b36 100%)}.reading-room-light::before{opacity:.8}.reading-room-light::after{opacity:.85}}
@media(max-width:530px){.header.page-width{margin-left:18px;margin-right:18px}.header .brand{font-size:20px}.header .brand .icon{display:none}.header-actions{gap:6px}.language-control select{width:96px;max-width:96px}}
@media(max-width:370px){.header .brand{font-size:18px}.ambience-toggle{width:28px;height:28px}.language-control select{width:82px;max-width:82px}}
@media(prefers-reduced-motion:reduce){html:not(.room-explicit-motion) .reading-room-light{display:none!important}html:not(.room-explicit-motion) .dictionary::after{display:none;animation:none!important}.room-explicit-motion.room-lit .dictionary.is-sunlit::after{animation:book-sunlight 3.2s ease-in-out both!important}}
