:root{--ink:#1d1d1f;--grey:#6e6e73;--soft:#f5f5f7;--line:#e6e6ea;--mg:#F53BEB;--cy:#55FAFF;--gr:#51F900;--ye:#FFE600;--hh:66px;--alice:#686868}
*{box-sizing:border-box}
html,body{height:100%}
body{margin:0;background:#fff;color:var(--ink);font:15px/1.45 "Helvetica Neue",Helvetica,Arial,sans-serif;-webkit-font-smoothing:antialiased;overflow:hidden}
a{color:inherit;text-decoration:none}
button,select,input{font:inherit;color:inherit}
button{cursor:pointer}
mark{background:var(--ye);padding:0 1px}
.xh{height:var(--hh);background:#fff;display:flex;align-items:center;justify-content:space-around;padding:0 24px;gap:18px;position:relative;z-index:80}
.xh a{font-family:Helvetica,sans-serif;font-weight:600;font-size:26px;color:#000;white-space:nowrap}
.xh a.brand{font-size:40px;font-weight:700}
.xh .icons{display:flex;gap:8px}
.xh .icons a{width:34px;height:34px;border-radius:50%;background:#ddd;display:flex;align-items:center;justify-content:center}
.xh .icons svg{width:16px;height:16px;fill:#000}
.xsearch input{border:0;outline:0;background:none;font:600 26px Helvetica,sans-serif;color:#000;width:150px;padding:0}
.xsearch input::placeholder{color:#000;opacity:1}
.xsearch input::-webkit-search-cancel-button{display:none}
@media(max-width:1100px){.xh a,.xsearch input{font-size:15px}.xh a.brand{font-size:24px}.xh .icons{display:none}.xsearch input{width:80px}}
#stage{position:relative;height:calc(100% - var(--hh));overflow:hidden;background:#fff}
#map{position:absolute;inset:0;width:100%;height:100%;cursor:grab;touch-action:none}
.tip{position:absolute;display:none;pointer-events:none;background:#fff;box-shadow:0 2px 14px rgba(0,0,0,.16);border-radius:10px;padding:8px 12px;font-size:12px;max-width:300px;z-index:40;line-height:1.35}
.tip b{display:block;font-size:13px;font-weight:600}
.tip span{color:var(--grey)}
/* ---- Ask Alice (Alice's own look: Times, grey, cyan / green / magenta) ---- */
#mapwrap{position:absolute;top:0;bottom:0;right:0;left:0;overflow:hidden}
#alice{position:absolute;z-index:50;left:50%;top:10px;transform:translateX(-50%);width:min(1240px,calc(100% - 20px));background:rgba(255,255,255,.95);border-radius:34px;padding:8px 22px 8px 16px;display:flex;flex-direction:column;max-height:calc(100% - 90px)}
#alice .askrow{display:flex;flex-direction:row;align-items:center;gap:18px;padding-right:0}
.asklogo{display:block;flex:0 0 132px;width:132px}.asklogo img{width:100%;height:auto;display:block}
.asklogo b{font:700 20px Helvetica,sans-serif}
.askcol{flex:1;min-width:0}
.askbox{position:relative;display:flex;align-items:center;min-height:48px;margin:0;padding:0 22px 0 58px;border-radius:30px;box-shadow:0 3px 15px -10px #000;background:#fff}
.askbox svg{position:absolute;left:20px;top:50%;width:26px;height:26px;margin-top:-13px;fill:var(--alice)}
.askbox input{flex:1;min-width:0;border:0;outline:0;background:none;margin:0;padding:0;font:18px/1.4 "Times New Roman",Times,serif;color:var(--alice)}
.askbox input::placeholder{color:var(--alice);opacity:.75}
.askmode{font:18px/1.4 "Times New Roman",Times,serif;color:var(--alice);white-space:nowrap;margin-left:12px}
.askmode button{all:unset;cursor:pointer;font:inherit;color:var(--alice);padding:6px 2px}.askmode button.on{color:var(--cy)}
.askmode button:focus-visible,.control:focus-visible{outline:2px solid var(--cy);outline-offset:2px}
.bubble{position:relative;flex:none;display:flex;align-items:center;gap:8px;min-height:48px;padding:0 20px;border-radius:30px;box-shadow:0 3px 15px -10px #000;background:#fff;font:16px/1.3 "Times New Roman",Times,serif;color:var(--alice);white-space:nowrap;cursor:text}
.bubble input,.bubble select{border:0;outline:0;background:none;font:16px "Times New Roman",Times,serif;padding:0;margin:0}
.bubble.topic input{color:#3fc400;width:92px}
.bubble.brain select{color:var(--mg);max-width:215px;cursor:pointer}
.sugg{position:absolute;left:0;top:calc(100% + 6px);min-width:100%;background:#fff;border-radius:16px;box-shadow:0 6px 24px rgba(0,0,0,.16);padding:6px 0;display:none;z-index:70}
.sugg div{padding:5px 20px;cursor:pointer;color:#3fc400;display:flex;justify-content:space-between;gap:14px}.sugg div small{color:#bbb}
.sugg div:hover,.sugg div.on{background:var(--soft)}
#anshead{display:none;font:12px/1.3 "Times New Roman",Times,serif;color:var(--alice);margin:8px 6px 2px 186px;align-items:center;gap:14px;flex-wrap:wrap}
#anshead button{all:unset;cursor:pointer;font:italic 14px "Times New Roman",Times,serif;color:var(--gr)}#anshead button:hover{color:var(--mg)}
#ansbody{display:none;overflow:auto;margin:6px -8px 4px 0;padding:0 40px 30px 186px;min-height:0}
.wait{height:340px;display:flex;align-items:center;justify-content:center}.wait img{width:96px;height:96px}
body.asked #alice{border-radius:30px;box-shadow:0 8px 30px -18px #000}
body.asked #anshead{display:flex}
body.asked:not(.folded) #ansbody{display:block}
#alice .askrow{flex-wrap:nowrap}
.askcol{min-width:150px}
@media(max-width:1250px){.bubble>span{display:none}.bubble{padding:0 14px;min-height:44px}.bubble.topic input{width:70px}.bubble.brain select{max-width:150px}#anshead{margin-left:10px}#ansbody{padding-left:10px;padding-right:14px}}
@media(max-width:700px){#alice .askrow{flex-wrap:wrap;gap:8px}.asklogo{flex-basis:80px;width:80px}.askcol{flex-basis:calc(100% - 100px)}.askmode{display:none}}
.concepts{margin:8px 0 2px;font:16px/1.5 "Times New Roman",Times,serif;color:#3fc400}
.concepts span{cursor:pointer;margin-right:10px;display:inline-block}.concepts span:hover{color:var(--mg)}
/* ---- panels ---- */
.panel{position:absolute;top:0;bottom:0;width:min(470px,100%);background:rgba(255,255,255,.97);z-index:45;overflow:auto;padding:0 22px 60px;transition:transform .35s cubic-bezier(.2,.8,.2,1);box-shadow:0 0 0 1px var(--line)}
.panel.left{left:0;transform:translateX(-102%)}
.panel.right{top:96px;right:14px;bottom:66px;transform:translateX(calc(100% + 30px));width:min(480px,calc(100% - 28px));border-radius:18px;box-shadow:0 2px 24px rgba(0,0,0,.14);z-index:55;padding-bottom:30px}
.panel.right .ph{border-radius:18px 18px 0 0}
.panel.open{transform:none}
.panel .ph{position:sticky;top:0;background:rgba(255,255,255,.97);display:flex;justify-content:space-between;align-items:center;gap:10px;padding:14px 0 8px;font-size:13px;color:var(--grey);z-index:3}
.x{border:0;background:var(--soft);width:28px;height:28px;border-radius:50%;font-size:17px;line-height:1;flex:none}
.chips{display:flex;flex-wrap:wrap;gap:5px}
.chip{border:0;background:var(--soft);border-radius:999px;padding:4px 11px;font-size:12px;cursor:pointer;color:var(--ink);display:inline-block}
.chip:hover{background:#e9e9ee}.chip.on{background:var(--ink);color:#fff}.chip.mg{background:var(--mg);color:#fff}
.chip[disabled]{opacity:.35;cursor:default}
h4{font-size:11px;letter-spacing:.08em;text-transform:uppercase;color:var(--grey);margin:18px 0 6px;font-weight:600}
.cap{font-size:11.5px;color:var(--grey);margin:4px 0 8px;line-height:1.4}
/* answers */
.hit{display:grid;grid-template-columns:38px 1fr;gap:12px;padding:8px 0;cursor:pointer}
.hit canvas,.hit img{width:38px;height:57px;object-fit:cover;border-radius:2px;background:var(--soft)}
.hit b{font-weight:500;display:block;line-height:1.25}
.hit span{font-size:12px;color:var(--grey)}
.hit:hover b{color:var(--mg)}
.askres{list-style:none;margin:6px 0 0;padding:0}
.askres li{font:16px/22px "Times New Roman",Times,serif;color:var(--alice);margin:0 0 6px;padding:0}
.askres .bk{font:italic 17.6px/1.2 "Times New Roman",Times,serif;color:var(--alice);cursor:pointer;margin:30px 0 10px;display:flex;align-items:center;gap:11px}
.askres li:first-child .bk{margin-top:14px}
.askres .bk:hover{color:var(--mg)}
.askres .ico{position:relative;width:60px;height:40px;flex:none;background:#111 center/cover;image-rendering:pixelated;display:flex;align-items:center;justify-content:center;color:#fff;font:normal 17px "Times New Roman",Times,serif;text-shadow:0 0 3px #000}
.loadmore{all:unset;cursor:pointer;font:italic 14.5px/20px "Times New Roman",Times,serif;color:var(--gr);display:block;margin:0 0 8px}.loadmore:hover{color:var(--mg)}
.askres .bk:hover{color:var(--mg)}
.askres .actions{margin:4px 0 2px}
.control,a.control{all:unset;display:inline-block;margin-right:12px;cursor:pointer;font:italic 14.5px/20px "Times New Roman",Times,serif;color:var(--gr)}
.control.selected,.control:hover{color:var(--mg)}
.askres p{margin:0 0 10px;font:16px/22px "Times New Roman",Times,serif;color:var(--alice)}
.askmore{margin:10px 0 0}.askmore button{all:unset;cursor:pointer;font:16px "Times New Roman",Times,serif;color:var(--alice);border-radius:30px;box-shadow:0 3px 15px -10px #000;padding:9px 22px}
/* book */
.btop{display:grid;grid-template-columns:120px 1fr;gap:16px;margin-top:2px}
.btop img,.btop canvas{width:120px;height:auto;border-radius:4px;background:var(--soft);display:block}
.btop h2{font-size:22px;font-weight:600;letter-spacing:-.02em;margin:0 0 6px;line-height:1.15}
.idc{font-size:13px;line-height:1.5;color:var(--grey)}.idc b{font-weight:500;color:var(--ink)}
.acts{display:flex;flex-wrap:wrap;gap:6px;margin:12px 0 2px}
.nums{display:grid;grid-template-columns:repeat(4,1fr);gap:6px;margin-top:6px}
.nums div{background:var(--soft);border-radius:10px;padding:8px 10px;font-size:11px;color:var(--grey)}
.nums div b{display:block;font-size:17px;font-weight:600;color:var(--ink)}
.shelf{display:grid;grid-template-columns:repeat(6,1fr);gap:8px;font-size:10.5px;line-height:1.2}
.shelf div{cursor:pointer;min-width:0}
.shelf canvas,.shelf img{width:100%;aspect-ratio:2/3;object-fit:cover;border-radius:3px;background:var(--soft);display:block;margin-bottom:3px}
.shelf span{color:var(--grey)}.shelf div:hover{color:var(--mg)}
.anti{font-size:13px;padding:6px 0 6px 12px;border-left:2px solid var(--mg);color:#3a3a3c}
.inask{margin-top:6px}
.inask .askbox{min-height:42px;padding-left:48px}.inask .askbox svg{left:16px;width:22px;height:22px;margin-top:-11px}.inask .askbox input{font-size:16px}
.inask .askn{position:static;margin:6px 0 0 20px}
iframe.profile{width:100%;border:0;display:block;height:2400px;margin-top:8px}
/* controls */
.ctl{position:absolute;left:14px;bottom:66px;z-index:46;background:rgba(255,255,255,.96);border-radius:16px;padding:12px 14px;width:min(520px,calc(100% - 28px));box-shadow:0 2px 20px rgba(0,0,0,.08);display:none}
.ctl.open{display:block}
.ctl .row{display:flex;gap:10px;align-items:flex-start;margin-bottom:7px;font-size:13px}
.ctl .row b{width:52px;flex:none;font-weight:500;color:var(--grey);padding-top:3px}
.ctl .note{font-size:12px;color:var(--grey);margin:4px 0 0;line-height:1.4}
.legend{display:flex;flex-wrap:wrap;gap:3px 12px;font-size:11.5px;color:var(--grey);margin-top:6px}
.legend i{display:inline-block;width:10px;height:10px;border-radius:2px;margin-right:4px;vertical-align:-1px}
.legend span{cursor:pointer}.legend span:hover{color:var(--ink)}
.ctl select{border:0;background:var(--soft);border-radius:999px;padding:3px 9px;font-size:12px}
/* dock */
.dock{position:absolute;left:50%;bottom:14px;transform:translateX(-50%);z-index:50;display:flex;align-items:center;gap:6px;background:#fff;border-radius:999px;padding:6px 8px;box-shadow:0 2px 16px rgba(0,0,0,.14);white-space:nowrap}
.dock button{border:0;background:transparent;border-radius:999px;padding:7px 14px;font-size:14px;font-weight:500}
.dock button:hover{background:var(--soft)}.dock button.on{background:var(--ink);color:#fff}
.dock .sep{width:1px;height:22px;background:var(--line);margin:0 4px}
.dock .cnt{font-size:12px;color:var(--grey);padding:0 10px 0 4px}
.selbar{position:absolute;left:50%;bottom:64px;transform:translateX(-50%);z-index:49;display:none;gap:6px;background:#fff;border-radius:999px;padding:6px 8px 6px 14px;font-size:13px;box-shadow:0 2px 12px rgba(0,0,0,.1);align-items:center;white-space:nowrap}
.selbar.open{display:flex}.selbar b{color:var(--mg)}
/* statistics */
.overlay{position:absolute;inset:0;background:transparent;z-index:60;overflow:auto;display:none}
.obox{width:min(1180px,76%);margin:0 auto;min-height:100%;background:rgba(255,255,255,.7);backdrop-filter:blur(5px);-webkit-backdrop-filter:blur(5px)}
@media(max-width:800px){.obox{width:92%}}
.overlay.open{display:block}
.oh{position:sticky;top:0;background:rgba(255,255,255,.75);display:flex;justify-content:space-between;align-items:center;padding:18px 32px 10px;z-index:2}
.oh h1{margin:0;font-size:34px;font-weight:700;letter-spacing:-.03em}
.oh h1 small{font-size:14px;font-weight:400;color:var(--grey);margin-left:14px;letter-spacing:0}
.oin{padding:4px 32px 80px;max-width:1500px;margin:0 auto}
.lead{color:var(--grey);font-size:15px;max-width:820px;margin:0 0 18px}
.grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(310px,1fr));gap:14px}
.card{background:rgba(245,245,247,.7);border-radius:16px;padding:16px 18px 14px;display:flex;flex-direction:column;min-width:0}
.card.w2{grid-column:span 2}
@media(max-width:700px){.card.w2{grid-column:span 1}}
.card h3{margin:0 0 2px;font-size:16px;font-weight:600}
.card .ccap{font-size:12px;color:var(--grey);margin-bottom:10px;line-height:1.4}
.card .foot{font-size:11.5px;margin-top:10px;display:flex;flex-wrap:wrap;gap:4px 12px}
.card .foot a{color:var(--mg);cursor:pointer}
.big{font-size:34px;font-weight:600;letter-spacing:-.02em;line-height:1}.big small{font-size:13px;color:var(--grey);font-weight:400;margin-left:6px}
.bars .b{display:grid;grid-template-columns:42% 1fr 44px;gap:8px;align-items:center;font-size:12.5px;padding:2px 0;cursor:pointer}
.bars .b .t{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.bars .b .bar{height:9px;background:var(--ink);border-radius:5px;min-width:2px}
.bars .b .n{text-align:right;color:var(--grey);font-size:12px}
.bars .b:hover .t{color:var(--mg)}
.kv{display:grid;grid-template-columns:1fr auto;gap:10px;font-size:13px;padding:4px 0}.kv span:last-child{color:var(--grey)}
.lib{background:var(--soft);border-radius:14px;padding:12px 14px;margin-bottom:10px}
.lib h3{margin:0;font-size:15px;font-weight:600}
svg text{font-family:inherit}

body.sheet .xh,body.sheet #alice,body.sheet .ctl,body.sheet .dock,body.sheet .selbar,body.sheet .panel{display:none!important}
body.sheet #stage{height:100%}

.panel.right{max-width:calc(100% - 60px)}
#anshead .hbs{margin-left:auto;display:flex;gap:10px}
#anshead button.hb{all:unset;cursor:pointer;font:16px/1 "Times New Roman",Times,serif;color:var(--alice);background:#fff;border-radius:30px;box-shadow:0 3px 15px -10px #000;padding:10px 18px;white-space:nowrap}
#anshead button.hb:hover{color:var(--ink)}
#anshead button.hb.clear{background:var(--mg);color:#fff}
#anshead button.hb.clear:hover{background:#d91fd0;color:#fff}
#anshead{margin-right:0;font-size:14px}

.circ{all:unset;flex:none;width:48px;height:48px;border-radius:50%;background:#fff;box-shadow:0 3px 15px -10px #000;display:flex;align-items:center;justify-content:center;cursor:pointer;color:var(--alice)}
.circ[hidden]{display:none}.circ svg{width:22px;height:22px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.circ:hover{color:var(--ink)}.circ.reset{color:var(--mg)}.circ.reset:hover{background:var(--mg);color:#fff}
#alice .askrow{gap:12px}
@media(max-width:1250px){.circ{width:44px;height:44px}}
#ctl{position:absolute}#ctlx{position:absolute;top:10px;right:10px;cursor:pointer;z-index:2}#ctlx:hover{background:var(--ink);color:#fff}#ctl .row:first-of-type{padding-right:34px}

/* round of 15 Nov, 20:30 — windows overlap like on a desktop, the one touched last on top */
.anote{font:17px/1.4 "Times New Roman",Times,serif;color:var(--mg);margin:14px 0 10px;max-width:760px}
#anshead button{font:italic 14px "Times New Roman",Times,serif;color:var(--mg);margin-left:6px;text-decoration:underline}
.dock .cnt{display:flex;align-items:center;gap:6px}.dock .cnt .chip{border:0;border-radius:999px;padding:5px 11px;font-size:12px;background:var(--mg);color:#fff;cursor:pointer;max-width:230px;overflow:hidden;text-overflow:ellipsis}
.dock .cnt .chip:hover{background:#d91fd0}
#alice,#book,#ctl{box-shadow:0 6px 30px -12px rgba(0,0,0,.45)}
body:not(.asked) #alice{box-shadow:none}
body.asked:not(.folded) #alice{background:rgba(255,255,255,.94);backdrop-filter:blur(7px);-webkit-backdrop-filter:blur(7px)}

/* find a book — a bubble under the place where the book window appears */
.findb{position:absolute;right:14px;bottom:12px;z-index:50;width:min(300px,calc(100% - 28px));min-height:44px;padding:0 16px;gap:10px}
.findb svg{width:20px;height:20px;fill:var(--alice);flex:none}
.findb input{flex:1;min-width:0;color:var(--ink)}.findb input::placeholder{color:#9a9a9a;font-style:italic}
.sugg.up{top:auto;bottom:calc(100% + 8px);left:auto;right:0;width:min(400px,calc(100vw - 28px));max-height:min(520px,60vh);overflow:auto;padding:6px 0}
.sugg.up div{display:grid;grid-template-columns:30px 1fr;gap:10px;align-items:center;justify-content:start;padding:6px 14px;color:var(--ink);white-space:normal;font:14px/1.25 "Helvetica Neue",Helvetica,Arial,sans-serif}
.sugg.up canvas{width:30px;height:45px;border-radius:2px;background:var(--soft)}
.sugg.up b{font-weight:500;display:block}.sugg.up span{font-size:12px;color:var(--grey)}
.sugg.up p{margin:0;padding:8px 16px;color:var(--grey);font:13px "Helvetica Neue",Helvetica,Arial,sans-serif}
@media(max-width:1100px){.findb{bottom:64px}.selbar{bottom:114px}}
/* the rolling sign sits in the middle of the white window */
#ansbody:has(.wait){padding-left:0!important;padding-right:0!important;margin-right:0!important}.wait{margin-left:6px}

/* find a book sits at the top of the book window; the dock switches the four main things on and off */
.panel .ph{z-index:5;gap:12px}
#book .findb{position:relative;right:auto;bottom:auto;flex:1;width:auto;min-width:0;min-height:42px;z-index:auto}
.sugg.bk{top:calc(100% + 8px);left:0;right:auto;width:100%;max-height:min(560px,62vh);overflow:auto;padding:6px 0}
.sugg.bk div{display:grid;grid-template-columns:30px 1fr;gap:10px;align-items:center;justify-content:start;padding:6px 14px;color:var(--ink);white-space:normal;font:14px/1.25 "Helvetica Neue",Helvetica,Arial,sans-serif}
.sugg.bk canvas{width:30px;height:45px;border-radius:2px;background:var(--soft)}
.sugg.bk b{font-weight:500;display:block}.sugg.bk span{font-size:12px;color:var(--grey)}
.sugg.bk p{margin:0;padding:8px 16px;color:var(--grey);font:13px "Helvetica Neue",Helvetica,Arial,sans-serif}
@media(max-width:1100px){.selbar{bottom:64px}}
body.noalice #alice{display:none}
.bkempty{color:var(--grey);font-size:14px;line-height:1.5;padding:26px 4px}

/* the command bar at the bottom stays above everything, statistics too */
.dock{z-index:78}.selbar{z-index:77}
.oin{padding-bottom:90px}

/* the book window is only the search bubble until a book is chosen */
#book.empty{bottom:auto;overflow:visible;padding-bottom:12px;background:transparent;box-shadow:none;backdrop-filter:none;-webkit-backdrop-filter:none}
#book.empty .ph{background:transparent;padding:0}#book.empty #bookbody{display:none}

/* statistics is a window on the desktop like the others: it overlaps them a bit, the one touched last lies on top */
#stats.overlay{inset:auto;left:max(14px,calc(50% - 660px));top:112px;bottom:70px;width:min(900px,calc(100% - 28px));border-radius:18px;background:rgba(255,255,255,.82);backdrop-filter:blur(7px);-webkit-backdrop-filter:blur(7px);box-shadow:0 6px 30px -12px rgba(0,0,0,.45)}
#stats .obox{width:100%;min-height:0;background:transparent;backdrop-filter:none;-webkit-backdrop-filter:none}
#stats .oh{background:rgba(255,255,255,.86);border-radius:18px 18px 0 0;padding:16px 24px 8px}#stats .oin{padding:4px 24px 40px}
#stats .oh h1{font-size:28px}#stats .grid{grid-template-columns:repeat(auto-fill,minmax(260px,1fr))}
#statsin .b{cursor:pointer}#statsin .b.on .t{color:var(--mg);font-weight:600}#statsin .b.on .bar{background:var(--mg)}

/* the book is always three floating pieces: the "find a book" bubble, its x, and under them the book itself */
#book,#book.empty{background:transparent;box-shadow:none;backdrop-filter:none;-webkit-backdrop-filter:none;overflow:visible;padding:0;display:flex;flex-direction:column;gap:10px;pointer-events:none}
#book>*{pointer-events:auto}
#book .ph,#book.empty .ph{position:relative;top:auto;background:transparent;padding:0;border-radius:0;flex:none}
#book .ph .x{width:44px;height:44px;background:#fff;box-shadow:0 3px 15px -10px #000;font-size:20px;cursor:pointer}#book .ph .x:hover{background:var(--ink);color:#fff}
#book .findb{min-height:44px}
#bookbody{flex:1;min-height:0;overflow:auto;background:rgba(255,255,255,.94);backdrop-filter:blur(7px);-webkit-backdrop-filter:blur(7px);border-radius:18px;box-shadow:0 6px 30px -12px rgba(0,0,0,.45);padding:18px 22px 30px}
#book.empty{bottom:auto}

/* nothing jumps: what opens grows or fades in */
@keyframes xpop{from{opacity:0;transform:translateY(-8px) scale(.97)}to{opacity:1;transform:none}}
@keyframes xfade{from{opacity:0}to{opacity:1}}
@keyframes xdrop{from{max-height:0;opacity:0}to{max-height:calc(100vh - 240px);opacity:1}}
@keyframes xcirc{from{width:0;margin-left:-12px;opacity:0;transform:scale(.4)}to{opacity:1;transform:none}}
@keyframes xrise{from{opacity:0;transform:translateY(14px)}to{opacity:1;transform:none}}
.sugg{transform-origin:top center;animation:xpop .22s cubic-bezier(.2,.8,.2,1)}
body.asked:not(.folded) #ansbody{animation:xdrop .5s cubic-bezier(.2,.8,.2,1)}
body.asked #anshead{animation:xfade .35s ease}
.wait{animation:xfade .4s ease}.askres.fresh,.anote{animation:xrise .45s cubic-bezier(.2,.8,.2,1)}
.circ{animation:xcirc .3s cubic-bezier(.2,.8,.2,1);overflow:hidden}
#bookbody.in{animation:xrise .38s cubic-bezier(.2,.8,.2,1)}
.ctl.open{animation:xrise .28s cubic-bezier(.2,.8,.2,1)}
#stats.overlay.open{animation:xrise .32s cubic-bezier(.2,.8,.2,1)}
.selbar.open{animation:xrise .25s ease}.dock .cnt .chip{animation:xfade .3s ease}
#alice{transition:box-shadow .3s ease,border-radius .3s ease,background .3s ease}
@media(prefers-reduced-motion:reduce){*{animation:none!important}}

/* smoothness: no blur behind windows (it is recomputed on every frame the map moves), and openings move only by opacity and position */
#alice,#bookbody,#stats.overlay,#stats .obox,.obox,body.asked:not(.folded) #alice{backdrop-filter:none!important;-webkit-backdrop-filter:none!important}
body.asked:not(.folded) #alice{background:rgba(255,255,255,.985)}
#bookbody{background:rgba(255,255,255,.985)}#stats.overlay{background:rgba(255,255,255,.97)}
@keyframes xopen{from{opacity:0;transform:translateY(-12px)}to{opacity:1;transform:none}}
body.asked:not(.folded) #ansbody{animation:xopen .32s cubic-bezier(.2,.8,.2,1)}
.sugg,#ansbody,#bookbody,.ctl,#stats.overlay{will-change:transform,opacity}

/* ---------- phone (up to 760 px wide) ---------- */
html,body{height:100dvh}
html.phone{--hh:46px;
  .xh{padding:0 10px;gap:12px;justify-content:flex-start;overflow-x:auto;scrollbar-width:none}.xh::-webkit-scrollbar{display:none}
  .xh a{font-size:12px}.xh a.brand{font-size:19px}.xsearch input{font-size:16px;width:86px}
  #alice{top:6px;width:calc(100% - 12px);padding:6px 8px;border-radius:26px;max-height:calc(100% - 70px)}
  #alice .askrow{flex-wrap:wrap;gap:6px 6px;align-items:center}
  .asklogo{flex:0 0 58px;width:58px;order:1}.asklogo img{width:100%}
  .askcol{order:2;flex:1 1 calc(100% - 70px);min-width:0}
  .askbox{min-height:42px}.askbox input{font-size:16px!important}
  .askmode{display:inline!important;font-size:13px!important;margin-left:4px!important}
  .bubble{min-height:38px;padding:0 12px}.bubble input,.bubble select{font-size:16px}
  .bubble.topic{order:3;flex:0 0 auto}.bubble.topic input{width:64px}
  .bubble.brain{order:4;flex:1 1 0;min-width:0}.bubble.brain select{max-width:none;width:100%}
  .circ{order:5;width:38px;height:38px}
  #anshead{margin:6px 6px 2px;font-size:13px;gap:4px 10px}
  #ansbody{padding:0 10px 24px 8px!important;margin-right:0}
  .wait{height:220px}
  .dock{bottom:8px;gap:2px;padding:5px 6px;max-width:calc(100% - 8px)}
  .dock button{padding:7px 9px;font-size:13px}.dock .sep{margin:0 1px}
  #bstats{font-size:0}#bstats::after{content:"Stats";font-size:13px}
  .dock .cnt{position:absolute;left:50%;bottom:calc(100% + 6px);transform:translateX(-50%);background:#fff;border-radius:999px;padding:3px 10px;font-size:11px;box-shadow:0 2px 10px rgba(0,0,0,.12);white-space:nowrap}
  .selbar{bottom:86px!important;max-width:calc(100% - 12px);overflow-x:auto}
  .ctl{left:6px;right:6px;width:auto;bottom:84px;max-height:60%;overflow:auto}.ctl .note{display:none}
  .panel.right,#book,#book.empty{top:6px;right:6px;left:6px;width:auto;max-width:none;bottom:84px}
  #book.empty{bottom:auto}
  #bookbody{padding:14px 14px 24px}
  .btop{grid-template-columns:92px 1fr;gap:12px}.btop img,.btop canvas{width:92px}.btop h2{font-size:19px}
  .nums{grid-template-columns:repeat(2,1fr)!important}
  #stats.overlay{left:6px;right:6px;width:auto;top:6px;bottom:84px}
  #stats .oh{padding:12px 14px 6px}#stats .oh h1{font-size:22px}#stats .oh h1 small{display:block;margin:2px 0 0}#stats .oin{padding:4px 12px 30px}
  #stats .grid{grid-template-columns:1fr}.card.w2{grid-column:span 1}
  .sugg.bk{max-height:60vh}
  .tip{display:none!important}
}

html,body{touch-action:manipulation;overscroll-behavior:none;-webkit-text-size-adjust:100%}
@media(max-width:760px),(pointer:coarse){input,select,textarea{font-size:16px!important}}

html.touch,html.touch body{position:fixed;inset:0;width:100%;overflow:hidden}
html.touch input,html.touch select,html.touch textarea{font-size:16px!important;transform:none}

html.phone input,html.phone select,html.phone textarea{font-size:16px!important}
html.phone,html.phone body{overscroll-behavior:none}

input.mirrored::placeholder{color:transparent!important}
.mir .car{display:inline-block;width:1.5px;height:1.15em;background:#686868;margin:0 1px;animation:xcar 1s steps(1) infinite}
@keyframes xcar{50%{opacity:0}}

/* Ask Alice like the book: no white backing behind the bar; the bubbles float on the map and the quotes are their own window below */
#alice,body.asked #alice,body.asked:not(.folded) #alice{background:transparent!important;box-shadow:none!important;padding:8px 0;pointer-events:none}
#alice>*{pointer-events:auto}
#anshead{margin:10px 0 0!important;padding:12px 22px 10px 24px;background:rgba(255,255,255,.985);border-radius:18px 18px 0 0;box-shadow:0 6px 30px -12px rgba(0,0,0,.45)}
body.asked.folded #anshead{border-radius:18px;align-self:flex-start}
#ansbody{margin:0!important;padding:4px 30px 30px 24px;background:rgba(255,255,255,.985);border-radius:0 0 18px 18px;box-shadow:0 14px 30px -14px rgba(0,0,0,.45)}
.circ.cx{font:20px/1 "Helvetica Neue",Helvetica,Arial,sans-serif;color:var(--ink);animation:none;width:44px;height:44px}.circ.cx:hover{background:var(--ink);color:#fff}
/* the close circles of Ask Alice and of the book are half the size of the other circles */
.circ.cx,#book .ph .x{width:22px;height:22px;min-width:22px;flex:none;font-size:13px;line-height:1;align-self:center;padding:0}
/* the Maps panel closes with the same small circle as the book and Ask Alice, outside its corner */
#ctl{overflow:visible}
#ctlx{position:absolute;top:0;right:-30px;left:auto;width:22px;height:22px;min-width:22px;padding:0;border:0;border-radius:50%;background:#fff;box-shadow:0 3px 15px -10px #000;font-size:13px;line-height:1;display:flex;align-items:center;justify-content:center;color:var(--ink)}
#ctl .row:first-of-type{padding-right:0}
#lay .br{flex-basis:100%;height:0}
.ctl{width:min(476px,calc(100% - 28px))}
.ctl{max-width:calc(100% - 28px)}.ctl .note{font-size:11.5px}
/* ---- header: measured on xenotheka.com so that it does not jump when moving between the three sites ----
   everything scales with the window width, as there: links 1.7vw, XENOTHEKA 2.8vw, round icons 2.4vw, bar 3.974vw high */
header.xh{position:relative;display:block;height:calc(3.22vw + 13.6px);min-height:0;padding:0;margin:0;gap:0;background:#fff;overflow:visible;flex-wrap:nowrap}
header.xh>a,header.xh>.icons,header.xh>form{position:absolute;top:50%;transform:translateY(-50%);margin:0}
header.xh a,header.xh form input{font:600 1.7vw/1.17 Helvetica,Arial,sans-serif;color:#000;letter-spacing:0;white-space:nowrap;text-decoration:none;opacity:1}
header.xh>a:nth-of-type(1){left:3.74vw;margin-top:.06vw}
header.xh>a:nth-of-type(2){left:17.36vw;font-size:2.8vw;line-height:1.15;font-weight:600}
header.xh>a:nth-of-type(3){left:42.43vw}
header.xh>a:nth-of-type(4){left:66.57vw}
header.xh>.icons{left:77.91vw;display:flex;flex-direction:row;gap:.29vw}
header.xh .icons a{width:2.4vw;height:2.4vw;border-radius:50%;background:#dfdfdf;display:flex;align-items:center;justify-content:center}
header.xh .icons svg{width:1.2vw;height:1.2vw;fill:#000}
header.xh>a:nth-of-type(5),header.xh>form{left:87.2vw}
header.xh form input{width:9vw;border:0;outline:0;background:none;padding:0;margin:0;display:block}
header.xh form input::placeholder{color:#000;opacity:1}
@media (max-width:767px){
  header.xh{display:flex;align-items:center;justify-content:space-between;gap:1.6vw;height:13.2vw;padding:0 2.8vw}
  header.xh>a,header.xh>.icons,header.xh>form{position:static;transform:none;margin:0}
  header.xh a,header.xh form input{font-size:2.6vw}
  header.xh>a:nth-of-type(2){font-size:3.6vw}
  header.xh>.icons{flex-direction:column;gap:.4vw}
  header.xh .icons a{width:4vw;height:4vw}header.xh .icons svg{width:2vw;height:2vw}
  header.xh form input{width:13vw}
}
:root,html.phone{--hh:calc(3.22vw + 13.6px)}
@media (max-width:767px){:root,html.phone{--hh:13.2vw}}

/* statistics, "what this collection holds": numbers as tiles and the span of time as a line */
.tiles{display:grid;grid-template-columns:1fr 1fr;gap:8px}
.tile{background:#fff;border-radius:12px;padding:10px 12px 9px;display:flex;flex-direction:column;gap:2px;min-width:0}
.tile b{font-size:22px;font-weight:600;line-height:1.1;letter-spacing:-.01em;color:var(--ink);white-space:nowrap}
.tile b i{font-style:normal;font-size:12px;font-weight:500;margin-left:4px;color:var(--grey);letter-spacing:0}
.tile span{font-size:11.5px;color:var(--grey);line-height:1.25}
.tile.hero{grid-column:span 2;background:var(--ink);padding:14px 14px 12px}.tile.hero b{font-size:44px;color:#fff;letter-spacing:-.02em}.tile.hero span{color:rgba(255,255,255,.7);font-size:13px}
.span{position:relative;display:flex;justify-content:space-between;margin:16px 4px 2px;padding-top:14px}
.span>i{position:absolute;left:4px;right:4px;top:4px;height:2px;background:var(--ink);border-radius:2px}
.span>div{position:relative;display:flex;flex-direction:column;gap:1px}
.span>div::before{content:"";position:absolute;top:-14px;left:0;width:10px;height:10px;border-radius:50%;background:var(--ink)}
.span>div:nth-of-type(2){align-items:center}.span>div:nth-of-type(2)::before{left:50%;margin-left:-5px;background:var(--mg)}
.span>div:nth-of-type(3){align-items:flex-end}.span>div:nth-of-type(3)::before{left:auto;right:0}
.span b{font-size:14px;font-weight:600}.span span{font-size:11px;color:var(--grey)}
a.ico{text-decoration:none;cursor:pointer}a.ico:hover{outline:2px solid var(--mg);outline-offset:1px}

/* brain menu, as in Ask Alice */
.csel{position:relative;font:16px "Times New Roman",Times,serif}
.csel .selected{all:unset;display:flex;align-items:center;gap:2px;color:var(--mg);cursor:pointer;font:16px "Times New Roman",Times,serif;white-space:nowrap;max-width:230px}
.csel .selected span{overflow:hidden;text-overflow:ellipsis}.csel .selected svg{width:24px;height:24px;fill:var(--mg);flex:none}
.csel .select-scroll{position:absolute;top:calc(100% + 14px);left:-15px;min-width:calc(100% + 30px);background:#fff;border-radius:3px;box-shadow:0 2px 4px -1px rgba(0,0,0,.2),0 4px 5px 0 rgba(0,0,0,.14),0 1px 10px 0 rgba(0,0,0,.12);padding:14px 0;max-height:340px;overflow:auto;z-index:5}
.csel .select-scroll[hidden]{display:none}
.csel ul{list-style:none;margin:0;padding:1.5px 15px}
.csel li{font:15.2px/30.4px "Times New Roman",Times,serif;color:#686868;cursor:pointer;white-space:nowrap}
.csel li:hover,.csel li.on{color:var(--mg)}
@media(max-width:1250px){.csel .selected{max-width:170px}}
