/* /library/: Sam's books standing in a real walnut bookcase, a photograph the page zooms into (README, Library).
   Loaded after /style.css and relies on its tokens (--wall, --paper, --ink, --accent, --r, --ease, --photo...) and its
   shell, nav and floor classes; it never redefines them. The photo is one box (.frame); inside it a camera (.cam) holds
   the overview picture, the sharp region tiles, the lifted item layers and one button per item, all placed in percent
   of the photo, and moves with transform only. On phones the stage goes full screen and the camera is the view: a
   pinch and a pan move it (library.js), the bar and the selected book's card sit over it. Flat planes: no shadows, no
   gradients, no depth tricks. */

[hidden]{display:none!important}
@font-face{font-family:"Lib Ellipsis";src:local("Georgia"),local("Times New Roman"),local("Noto Serif"),local("DejaVu Serif");unicode-range:U+2026}
:root{--zoom-ease:cubic-bezier(.65,0,.35,1);--dim:color-mix(in srgb,var(--frame) 58%,transparent)}
/* the phone layout (library.js PHONE): a coarse pointer or a narrow screen. Its rules sit under this same query. */
.sr{position:absolute;width:1px;height:1px;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
.safe-probe{position:fixed;left:0;top:0;width:0;height:0;visibility:hidden;pointer-events:none;
  padding:env(safe-area-inset-top,0px) env(safe-area-inset-right,0px) env(safe-area-inset-bottom,0px) env(safe-area-inset-left,0px)}

/* ---------------------------------------------------------------- layout: text column beside the photo, or above it */
/* Beside it, the photo wants the viewport's height (--pw wide); where the row is short of room the text column gives
   way first, down to 232px, and only then the photo (the shrink is weighted by flex-shrink x basis) */
.lib-wrap{display:grid;grid-template-columns:minmax(0,1fr);row-gap:32px;align-items:start}
.lib-head{min-width:0}
.room{min-width:0}
@media (min-width:1100px),(min-aspect-ratio:3/2) and (min-width:640px){
  .lib-wrap{--pw:max(280px,calc((100dvh - 88px) * .7831));display:flex;align-items:flex-start;column-gap:clamp(32px,4.4vw,72px)}
  .lib-head{flex:0 1000 340px;min-width:232px;position:sticky;top:44px}
  .room{flex:0 1 var(--pw)}
  .list{flex:1 1 0;max-width:1180px}
  html[data-view=list] .lib-head{flex-shrink:0}
}
/* a phone on its side: the site's bar and the page's padding sit above the photo, so it is sized to fit under them
   and the whole room shows without scrolling */
@media (min-aspect-ratio:3/2) and (min-width:640px) and (max-width:899px) and (max-height:520px){
  .lib-wrap{--pw:max(170px,calc((100dvh - 136px) * .7831));column-gap:28px}
}

/* ---------------------------------------------------------------- the wall: title, intro, count, tools */
.lib-head h1{font:400 42px/1.12 var(--serif);letter-spacing:-.012em;margin:0 0 14px;text-wrap:balance}
.lib-head h1 .rest{visibility:hidden}
.lib-head h1 .caret{display:inline-block;width:1px;height:.9em;margin:0 -3px 0 2px;vertical-align:-.08em;background:var(--accent)}
.lib-head h1 .caret.blink{animation:lib-blink 1.06s steps(1,end) 4}
@keyframes lib-blink{0%{opacity:1}50%{opacity:0}100%{opacity:0}}
.type-wait .lib-head h1 .txt{visibility:hidden;animation:lib-reveal 0s 2.5s forwards}
@keyframes lib-reveal{to{visibility:visible}}
.lib-intro{color:var(--mid);margin:0 0 12px;max-width:46ch;text-wrap:pretty}
.count{font-size:13px;color:var(--soft);margin:0 0 26px;font-variant-numeric:tabular-nums}
.count .reset{font:inherit;color:var(--ink);background:none;border:0;border-radius:0;padding:0;margin-left:4px;cursor:pointer;
  text-decoration:underline 1px var(--accent);text-underline-offset:4px}
.count .reset:hover{color:var(--accent)}
.find{display:flex;flex-direction:column;gap:2px;max-width:320px;margin:0 0 14px}
.find span{font-size:12.5px;color:var(--soft)}
.find input{font:inherit;font-size:14px;color:var(--ink);background:transparent;border:0;border-bottom:1px solid var(--line);border-radius:0;
  padding:4px 0 6px;width:100%;outline:0;-webkit-appearance:none;appearance:none}
.find input::placeholder{color:var(--soft);opacity:1}
.find input:focus{border-bottom-color:var(--accent)}
.find input::-webkit-search-decoration,.find input::-webkit-search-cancel-button{-webkit-appearance:none;appearance:none}
.filters{display:flex;flex-wrap:wrap;gap:0 18px;font-size:14px}
.filters button{position:relative;font:inherit;color:var(--mid);background:none;border:0;border-radius:0;padding:5px 0 7px;cursor:pointer;transition:color .2s}
.filters button::after{content:"";position:absolute;left:0;right:0;bottom:2px;height:1px;background:var(--accent);transform:scaleX(0);transform-origin:left;transition:transform .35s var(--ease)}
.filters button:hover,.filters button[aria-pressed=true]{color:var(--ink)}
.filters button[aria-pressed=true]::after{transform:scaleX(1)}
.filters button:active{transform:translateY(1px)}
.tally{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:8px 16px}
.tools{display:flex;align-items:center;gap:10px}
/* Room or List: one paper tag with two halves; the one showing reads dark on washi */
.view{display:inline-flex;border:1px solid var(--rule);border-radius:var(--r);overflow:hidden}
.view button{height:34px;padding:0 13px;font:inherit;font-size:13.5px;color:var(--mid);background:none;border:0;border-radius:0;cursor:pointer;
  transition:color .2s,background-color .2s;-webkit-tap-highlight-color:transparent}
.view button+button{border-left:1px solid var(--rule)}
.view button:hover{color:var(--ink)}
.view button[aria-pressed=true]{color:var(--ink);background-color:var(--washi)}
.view button:active{transform:translateY(1px)}
.view button:focus-visible{outline-offset:-3px}
.find-open,.find-head,.find-scrim{display:none}
/* the list view: every cover at true relative size, one scale for all (--tall is the tallest title, --h each title's
   height as a fraction of it, --a its cover's aspect, set by build-library.py), standing on a common floor line per row
   under a caption of two lines at most, grouped under headings. The non-matches of a filter leave the list. */
.list{--tall:220px;min-width:0}
.list .lg{margin:0 0 44px}
.list .lg[hidden]{display:none}
.list h2{font:400 16px/1.3 var(--serif);color:var(--ink);margin:0 0 18px;padding:0 0 8px;border-bottom:1px solid var(--rule)}
.list ul{list-style:none;margin:0;padding:0;display:flex;flex-wrap:wrap;align-items:flex-end;gap:30px 22px}
.list li[hidden]{display:none}
.lc{display:flex;flex-direction:column;align-items:flex-start;min-width:92px;margin:0;padding:0;border:0;border-radius:0;background:none;cursor:pointer;
  font:inherit;text-align:left;color:var(--ink);-webkit-tap-highlight-color:transparent}
.lcv{position:relative;display:block;width:calc(var(--tall) * var(--h) * var(--a));height:calc(var(--tall) * var(--h));background:var(--mat);
  transition:transform .35s var(--ease)}
.lcv::after{content:"";position:absolute;inset:0;box-shadow:inset 0 0 0 1px var(--spine-edge);pointer-events:none}
.lcv img,.lcv svg{display:block;width:100%;height:100%;object-fit:fill;filter:var(--img)}
.lc:hover .lcv,.lc:focus-visible .lcv{transform:translateY(-4px)}
.lc:active .lcv{transform:translateY(-1px)}
.lt{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden;height:34px;margin:9px 0 0;font:400 12.5px/17px var(--serif);
  text-wrap:pretty;max-width:max(100%,160px)}
.ly{display:block;height:16px;font-size:11.5px;line-height:16px;color:var(--soft);font-variant-numeric:tabular-nums}
.lempty{margin:8px 0 0;font-size:14px;color:var(--mid)}
.lempty .lclear{font:inherit;color:var(--ink);background:none;border:0;border-radius:0;padding:0;margin-left:4px;cursor:pointer;
  text-decoration:underline 1px var(--accent);text-underline-offset:4px}
html[data-view=list] .hint{display:none}
@media (max-width:767.98px){.list{--tall:150px}.list .lg{margin-bottom:34px}.list ul{gap:22px 14px}.lc{min-width:76px}.lt{font-size:12px;max-width:max(100%,124px)}}
.hint{display:none;font-size:12.5px;color:var(--soft);margin:12px 0 0}
.hint-f{display:flex;flex-wrap:wrap;align-items:center;gap:0 10px}
.hint-n{color:var(--mid);font-variant-numeric:tabular-nums}
.hint-clear{height:40px;margin:-10px 0;padding:0 4px;font:inherit;color:var(--ink);background:none;border:0;border-radius:0;cursor:pointer;
  text-decoration:underline 1px var(--accent);text-underline-offset:4px}
.hint-clear:active{color:var(--accent)}
html:not(.js) .controls,html:not(.js) .find-open,html:not(.js) .hint,html:not(.js) .areas{display:none!important}
@media (min-width:1100px),(min-aspect-ratio:3/2) and (min-width:640px){
  .filters{flex-direction:column;align-items:flex-start;gap:0}
}
@media (max-width:899px){.lib-head h1{font-size:34px}}
@media (max-width:559px){.lib-head h1{font-size:30px;margin-bottom:10px}.count{margin-bottom:20px}.filters{gap:0 16px;font-size:14.5px}.filters button{padding:7px 0 9px}}

/* phones: the photo first. A short header (the title, one line, the count beside a quiet "Search and filter"),
   then the photo; the search and the filters open in a small sheet from the bottom (library.js openFind). */
@media (pointer:coarse),(max-width:767.98px){
  .lib-wrap{row-gap:18px}
  .lib-head h1{margin-bottom:6px}
  .lib-intro{margin-bottom:12px}
  .lib-intro .more{display:none}
  .count{margin:0}
  .tally{margin:0}
  .tally{flex-direction:column;align-items:stretch;gap:10px}
  .tools{justify-content:space-between}
  .view button{height:36px}
  .find-open{display:inline-flex;align-items:center;gap:7px;height:36px;padding:0 12px 0 10px;font:inherit;font-size:13.5px;color:var(--ink);background:none;
    border:1px solid var(--rule);border-radius:var(--r);cursor:pointer;transition:border-color .2s,background-color .15s;-webkit-tap-highlight-color:transparent}
  .find-open svg{width:15px;height:15px;fill:none;stroke:currentColor;stroke-width:1.4;stroke-linecap:round}
  .find-open:active{background-color:var(--washi)}
  .find-open.on{border-color:var(--accent)}
  .find-open.on span::after{content:"";display:inline-block;width:5px;height:5px;margin:0 0 1px 7px;border-radius:var(--r);background:var(--accent);vertical-align:middle}
  .controls{position:fixed;z-index:36;left:0;right:0;bottom:0;max-height:min(70dvh,420px);overflow-y:auto;overscroll-behavior:contain;background:var(--paper);border-top:1px solid var(--rule);
    padding:6px max(16px,env(safe-area-inset-right,0px)) calc(20px + env(safe-area-inset-bottom,0px)) max(16px,env(safe-area-inset-left,0px));
    transform:translateY(100%);visibility:hidden;transition:transform .36s var(--ease),visibility 0s .36s}
  html.find-on .controls{transform:none;visibility:visible;transition:transform .36s var(--ease)}
  .find-head{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;column-gap:12px;margin:0 0 6px}
  .find-n{grid-column:1;grid-row:1;margin:0;font-size:12.5px;line-height:1.4;color:var(--soft);font-variant-numeric:tabular-nums;min-width:0;text-wrap:pretty}
  .find-done{grid-column:2;grid-row:1}
  .find-done{flex:none;height:44px;padding:0 4px 0 16px;font:inherit;font-size:14.5px;color:var(--ink);background:none;border:0;border-radius:0;cursor:pointer;
    text-decoration:underline 1px var(--accent);text-underline-offset:5px}
  .find-done:active{color:var(--accent)}
  .find{max-width:none;margin:0 0 10px}
  .find input{font-size:16px;padding:8px 0 9px}
  .filters{flex-direction:row;align-items:center;gap:0 2px;margin:0 -10px}
  .filters button{min-height:44px;min-width:44px;padding:0 10px}
  .filters button::after{left:10px;right:10px;bottom:9px}
  .find-scrim{display:block;position:fixed;z-index:35;inset:0;background:transparent}
  /* beside the photo (a phone on its side, a tablet across) the header is sticky, a stacking context of its own: it
     rises over the scrim and the photo while the sheet is open, or every control in the sheet sits under the scrim */
  html.find-on .lib-head{z-index:37}
  .find-reset{grid-column:1;grid-row:2;justify-self:start;height:44px;margin:-6px 0 0;padding:0;font:inherit;font-size:14px;color:var(--ink);background:none;border:0;border-radius:0;cursor:pointer;
    text-decoration:underline 1px var(--accent);text-underline-offset:5px}
  .find-reset:active{color:var(--accent)}
  .find-scrim[hidden]{display:none}
  .hint{display:block}
  .schedule{margin-top:40px}
}
/* a short phone held upright (375 x 667): the header tightens so the whole bookcase, the wall and the bench fit on
   the first screen, and the filters run in one row the finger scrolls, so the sheet leaves the photo in sight */
@media (pointer:coarse) and (max-height:700px) and (orientation:portrait),(max-width:767.98px) and (max-height:700px) and (orientation:portrait){
  body.lib main{padding-top:16px}
  .lib-wrap{row-gap:12px}
  .lib-head h1{font-size:26px;margin-bottom:4px}
  .lib-intro{display:none}
  .filters{flex-wrap:nowrap;overflow-x:auto;overscroll-behavior-x:contain;scrollbar-width:none;margin-right:-16px;padding-right:16px;
    -webkit-mask:linear-gradient(90deg,white calc(100% - 40px),transparent);mask:linear-gradient(90deg,white calc(100% - 40px),transparent)}
  .filters::-webkit-scrollbar{display:none}
  .filters button{flex:none}
}
/* a phone on its side, a tablet across: the photo stands beside the text, so the sheet opens over the text column
   from the left and leaves the photo (and its dimming) in sight */
@media (pointer:coarse) and (min-width:1100px),(pointer:coarse) and (min-aspect-ratio:3/2) and (min-width:640px),(max-width:767.98px) and (min-aspect-ratio:3/2) and (min-width:640px){
  .controls{top:0;right:auto;width:min(400px,calc(100vw - var(--pw) - 64px));max-height:none;border-top:0;border-right:1px solid var(--rule);
    padding-top:calc(10px + env(safe-area-inset-top,0px));transform:translateX(-100%)}
}
/* a phone on its side: the photo is narrow, so it stands in the middle of the space the text leaves */
@media (min-aspect-ratio:3/2) and (min-width:640px) and (max-width:899px) and (max-height:520px){.room{margin:0 auto}}

/* ---------------------------------------------------------------- the photo: one box, the photo's own aspect */
/* beside the text it fills the viewport height (44px above, 44px below); stacked it is capped by the viewport height;
   phones run it edge to edge */
.frame{position:relative;width:min(100%,max(300px,calc((100dvh - 48px) * .7831)));background:var(--skirt)}
@media (max-width:767.98px){.frame{width:auto;margin:0 calc(-1 * var(--gut))}}
@media (min-width:1100px),(min-aspect-ratio:3/2) and (min-width:640px){.frame{width:min(100%,var(--pw));margin:0}}
.stage{position:absolute;inset:0;overflow:hidden;container-type:inline-size;touch-action:manipulation;-webkit-tap-highlight-color:transparent;-webkit-user-select:none;user-select:none;
  -webkit-touch-callout:none;outline:0}
.cam{position:absolute;left:0;top:0;width:100%;height:100%;transform-origin:0 0;transition:transform .7s var(--zoom-ease);filter:var(--photo)}
.cam.still{transition:none}
.cam picture,.cam .ov{position:absolute;left:0;top:0;width:100%;height:100%;display:block}
.cam .ov{object-fit:fill}
.stage.z-in{cursor:zoom-in}
.stage.z-out{cursor:zoom-out}
.stage.z-pick{cursor:pointer}

/* the sharp tile of a region, laid over the overview; library.js feathers the edges where it meets the overview (two
   gradients, intersected) so no seam shows where it ends */
.tiles img{position:absolute;display:block;opacity:0;transition:opacity .3s linear;pointer-events:none;-webkit-mask-composite:source-in;mask-composite:intersect}
.tiles img.on{opacity:1}
/* the sharp tile over it (library.js sharpIn): a wrapper per region that carries the feather, its cells (placed in the
   camera's px) fading in together once all the view needs have decoded. A phone has two such sets per region (its own
   grid and the desktop's, for a pinch, library.js setGrid): the one not in use fades out (.off) over the other */
.tiles .sh{position:absolute;pointer-events:none;-webkit-mask-composite:source-in;mask-composite:intersect;transition:opacity .3s linear}
.tiles .sh.off{opacity:0}

/* lifted items: the photo behind it, then the item's own layer moved a few millimetres, then (advent) what stands on it */
.lay,.bhs,.lys,.frs{position:absolute;inset:0;pointer-events:none}
.lay img,.lay .g{position:absolute;display:block}
.bhs img,.frs img{visibility:hidden}
.bhs img.on,.frs img.on{visibility:visible}
.lys .g{transition:transform .32s var(--ease)}
.lys .g.up{transform:var(--lift)}
.lys .g.cut{transition:none}
.lys .ly{position:absolute;inset:0;width:100%;height:100%;visibility:hidden}
.lys .g.on .ly{visibility:visible}
/* the sharp layers (while the region shows its sharp tile): the lifted book's sharp layer and behind show at once, or,
   when the region turns sharp under a lifted book, fade in over the ordinary ones with the tile (.fade), which then go
   (.solo) so their softer fringe never shows past the sharp edge */
.lys .ly.s{opacity:0}
.lys .g.sh .ly.s.cur{opacity:1}
.lys .g.fade .ly.s{transition:opacity .3s linear}
.lys .g.solo .ly:not(.cur){visibility:hidden}
.bhs img.s,.frs img.s{opacity:0}
.bhs img.s.on,.frs img.s.on{opacity:1}
.bhs img.s.fade,.frs img.s.fade{transition:opacity .3s linear}
/* filtered out: a soft darkening cut to the item's own shape: its polygon (clip-path, set by library.js), then its
   layer's alpha as the mask once the layer is loaded anyway (.m). The spotlight uses the same shade, lighter: zoomed
   with a book pulled, the rest of its shelf darkens by about 44 percent (.spot); the pulled book never (.sel). On a
   phone an accent mark edged in paper (so it reads on walnut and on plaster) also stands on the shelf under the pulled
   book (or beside the pile); it is drawn the same size at any zoom (--k). Its edge is the 1px inset shadow, not a
   border: a border under the camera's scale is rounded up to a whole layout px, 2 or 3 css px, and would swallow the
   accent; a shadow's spread is not. */
.selmark{position:absolute;display:block;box-sizing:border-box;background:var(--accent);box-shadow:inset 0 0 0 calc(1px / var(--k, 1)) var(--paper);border-radius:var(--r);
  pointer-events:none;opacity:0;transition:opacity .2s linear}
.selmark.on{opacity:1}
.selmark.hush{opacity:0;transition:none}
.stage:not(.fs) .selmark{display:none}
.lys .shade{position:absolute;inset:0;background:var(--dim);opacity:0;transition:opacity .3s linear}
.lys .shade.m{-webkit-mask:var(--m) 0 0/100% 100% no-repeat;mask:var(--m) 0 0/100% 100% no-repeat}
/* an item with another standing in front of it (a frame leaning on a frame, a magazine in front of a magazine): its
   polygon less theirs, so the one behind never darkens the one in front (--cut, library.js layer) */
.lys .shade.cut{-webkit-mask:var(--cut) 0 0/100% 100% no-repeat;mask:var(--cut) 0 0/100% 100% no-repeat}
.lys .shade.cut.m{-webkit-mask:var(--m) 0 0/100% 100% no-repeat,var(--cut) 0 0/100% 100% no-repeat;-webkit-mask-composite:source-in;
  mask:var(--m) 0 0/100% 100% no-repeat,var(--cut) 0 0/100% 100% no-repeat;mask-composite:intersect}
.lys .g.spot .shade{opacity:.76}
.lys .g.out .shade{opacity:1}
.lys .g.sel .shade{opacity:0}
/* with a filter on, the matches on the shelf stay nearly bright (the non-matches carry the full shade), and a
   selected book outside the filter keeps half of it */
.lys.filtering .g.spot:not(.out) .shade{opacity:.3}
.lys .g.sel.out .shade{opacity:.5}
/* the spotlight's second half: the rest of the walnut niche (the shelves above and below the open one, or all three
   from the wall and the bench) takes the same shade, so the open shelf is the brightest part of the view. Its edges
   fall on the boards and the niche's sides, never across plain plaster (library.js veilFor). */
.veil{position:absolute;inset:0;pointer-events:none;opacity:0;transition:opacity .3s linear}
.veil.on{opacity:.76}
.veil i{position:absolute;display:block;background:var(--dim)}
/* the open shelf itself: one band over the whole compartment (books, their heads, the walnut between them), under the
   lifted book's layers, so no per-book mask edge can show. With a filter on it lightens so the matches read brighter
   than the non-matches, which carry their own shade. The veil lies between the behind patches and the layers, so the
   lifted book's slot takes exactly the band's dim and the book itself none */
.veil.lite i.cmp{opacity:.4}
/* the shelf view, the pulled book panned or pinched out of sight (library.js spotFar): the shade lightens, so the
   screen never shows only dimmed books */
.stage.fs .cam.far .veil.on{opacity:.3}
.stage.fs .cam.far .lys .g.spot .shade{opacity:.3}

/* one button per item, over its box: the accessible handle and the keyboard's focus ring (picking is done in photo
   coordinates by library.js, so the buttons take no pointer events). The ring is drawn 2px at any zoom (--k). */
.its{position:absolute;inset:0}
.it{position:absolute;display:none;margin:0;padding:0;border:0;border-radius:0;background:none;pointer-events:none}
.js .it{display:block}
.it:focus{outline:none}
.it:focus-visible{outline:calc(2px / var(--k, 1)) solid var(--accent);outline-offset:calc(3px / var(--k, 1))}

/* ---------------------------------------------------------------- the caption tag: paper, a 1px accent stem */
.tag{position:absolute;z-index:4;left:0;top:0;width:0;height:0;pointer-events:none;opacity:0;visibility:hidden;transition:opacity .16s linear,visibility 0s .16s}
.tag.on{opacity:1;visibility:visible;transition:opacity .16s linear}
.tag .stem{position:absolute;background:var(--accent)}
.tag .card{position:absolute;left:0;top:0;width:max-content;max-width:272px;background:var(--paper);border:1px solid var(--rule);border-radius:var(--r);padding:6px 10px 7px}
.tag b{display:block;font:400 14.5px/1.3 var(--serif);color:var(--ink);text-wrap:balance}
.tag span{display:block;font-size:11.5px;line-height:1.4;color:var(--soft);margin-top:1px}
.tag span:empty{display:none}

/* ---------------------------------------------------------------- the region tags: what a tap opens */
/* One small paper tag per region (build-library.py render_areas), pinned just above its group with a 1px accent stem.
   They fade in once the photo has loaded and stay, light, on a phone; on desktop they show while the pointer is over
   the photo at rest. A tap anywhere in the region opens it; the tag is the button for keyboards and screen readers. */
.areas{position:absolute;z-index:3;inset:0;pointer-events:none;opacity:0;transition:opacity .7s var(--ease)}
.areas.in{opacity:1}
.area{position:absolute;display:flex;align-items:baseline;gap:6px;margin:0;padding:4px 8px 5px;white-space:nowrap;pointer-events:auto;cursor:pointer;
  font:inherit;font-size:11.5px;line-height:1.2;color:var(--ink);background:var(--paper);background:color-mix(in srgb,var(--paper) 92%,transparent);border:1px solid var(--rule);
  border-radius:var(--r);--stem:9px;transform:translateY(calc(-100% - var(--stem) - var(--up,0px)));transition:background-color .15s,border-color .2s,opacity .25s linear;-webkit-tap-highlight-color:transparent}
.area.r{transform:translate(-100%,calc(-100% - var(--stem) - var(--up,0px)))}
.area::after{content:"";position:absolute;left:10px;top:100%;width:1px;height:calc(var(--stem) + var(--up,0px));margin-top:1px;background:var(--accent)}
.area.r::after{left:auto;right:10px}
.area b{font:400 13px/1.2 var(--serif)}
.area i{font-style:normal;color:var(--soft);font-variant-numeric:tabular-nums}
.area:hover{border-color:var(--line)}
.area:active{background-color:var(--washi);border-color:var(--accent)}
.area:focus-visible{outline-offset:2px}
.stage.zoomed .areas,.stage.fs .areas{opacity:0;visibility:hidden;transition:opacity .16s linear,visibility 0s .16s}
/* desktop: only while the pointer is over the photo at rest, or a tag has the keyboard's focus */
.areas.in .area{opacity:0}
.stage:hover .areas.in .area,.areas.in:focus-within .area{opacity:1}
@media (pointer:coarse),(max-width:767.98px){.areas.in .area{opacity:1}}
/* with a filter on, a tag counts the matches on its shelf; a region with none goes light */
.areas.in .area.none,.stage:hover .areas.in .area.none{opacity:.5}
/* a narrow photo (a phone on its side): smaller tags, names only, so neighbours never overlap */
@container (max-width:320px){.area{padding:2px 5px 3px;gap:0;--stem:7px}.area b{font-size:10.5px}.area i{display:none}}

/* ---------------------------------------------------------------- zoomed: the bar over the photo */
.zbar{position:absolute;z-index:5;left:12px;right:12px;top:12px;display:flex;align-items:center;gap:6px;pointer-events:none}
.zbar>*{pointer-events:auto}
.zbar button{display:inline-flex;flex:none;align-items:center;gap:6px;height:34px;padding:0 12px;font:inherit;font-size:13.5px;white-space:nowrap;color:var(--ink);background:var(--paper);
  border:1px solid var(--rule);border-radius:var(--r);cursor:pointer;transition:border-color .2s,color .2s}
.zbar button:hover{border-color:var(--line)}
.zbar button:active{transform:translateY(1px)}
.zbar button[aria-disabled=true]{color:var(--soft);cursor:default}
.zbar button[aria-disabled=true] svg{opacity:.4}
.zbar button[aria-disabled=true]:hover{border-color:var(--rule)}
.zbar svg{width:16px;height:16px;fill:none;stroke:currentColor;stroke-width:1.4;stroke-linecap:round;stroke-linejoin:round}
.zbar .zback{padding-left:8px}
.zbar .zup,.zbar .zdown{width:34px;padding:0;justify-content:center}
.zbar .zname{margin:0 4px 0 auto;height:34px;display:flex;align-items:center;padding:0 12px;font-size:13.5px;color:var(--ink);background:var(--paper);
  border:1px solid var(--rule);border-radius:var(--r);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;min-width:0}
.zbar .zname i{font-style:normal;color:var(--soft);margin-left:8px;font-variant-numeric:tabular-nums}
.zbar.show{animation:lib-in .28s var(--ease) both}
@keyframes lib-in{from{opacity:0;transform:translateY(-6px)}to{opacity:1;transform:none}}
/* a narrow photo: the shelf's name drops its count, then "Back to the room" keeps only its arrow (the words stay for
   screen readers), then the name goes */
@container (max-width:600px){.stage:not(.fs) .zbar .zname i{display:none}}
@container (max-width:440px){.stage:not(.fs) .zbar .zback span{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
  .stage:not(.fs) .zbar .zback{width:34px;padding:0;justify-content:center}}
@container (max-width:300px){.stage:not(.fs) .zbar .zname{display:none}}

/* ---------------------------------------------------------------- phones: the shelf view, full screen */
/* The photo fills the screen between the bar and the card and takes every touch itself (touch-action none: the page
   never scrolls or zooms under it; library.js pinches, pans, scrubs and swipes the camera). */
html.fs-on{overflow:hidden}
html.fs-on body{overflow:hidden}
.stage.fs{position:fixed;z-index:30;inset:0;overflow:hidden;contain:strict;overscroll-behavior:none;touch-action:none}
.stage.fs::before{content:"";position:absolute;inset:0;background:var(--wall);opacity:0;transition:opacity .3s linear}
.stage.fs.in::before{opacity:1}
.stage.fs .zbar{left:0;right:0;top:0;gap:0;padding:env(safe-area-inset-top,0px) max(4px,env(safe-area-inset-right,0px)) 0 max(4px,env(safe-area-inset-left,0px));
  background:var(--paper);border-bottom:1px solid var(--rule);transform:translateY(-100%);transition:transform .4s var(--ease)}
.stage.fs.in .zbar{transform:none}
.stage.fs .zbar.show{animation:none}
.stage.fs .zbar button{height:48px;min-width:48px;border:0;background:none;font-size:15px}
.stage.fs .zbar .zback{padding:0 12px 0 8px}
.stage.fs .zbar .zname{display:none}
/* the middle of the phone's bar: the place (Top shelf) and "1 of 5"; "Back to the room" keeps only "Back" in sight
   (the whole stays its name) */
.zbar .zmid,.zbar .zpos,.zbar .zback .brief{display:none}
.stage.fs .zbar .zmid{display:flex;flex:1 1 auto;min-width:0;align-items:baseline;justify-content:center;gap:8px;margin:0 4px}
.stage.fs .zbar .zpos{display:block;flex:none;margin:0;font-size:12.5px;color:var(--soft);font-variant-numeric:tabular-nums;white-space:nowrap}
.pname{margin:0;outline:0;font:400 15px/1.25 var(--serif);min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.stage.fs .zbar .zback .full{position:absolute;width:1px;height:1px;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
.stage.fs .zbar .zback .brief{display:inline}
.stage.fs .zbar svg{width:20px;height:20px}
/* the move into the shelf view and between shelves is a little quicker than desktop's 700 ms (library.js camMs); a
   snap (the camera settling after a pinch or a pan, a double tap) is quicker still */
.stage.fs .cam{transition-duration:.56s}
.cam.snap,.stage.fs .cam.snap{transition-duration:.28s}
/* a tile still loading: a hairline under the bar */
.zload{position:absolute;z-index:6;left:0;right:var(--panel-w,0px);top:var(--bar-h,0px);height:2px;overflow:hidden;pointer-events:none;opacity:0;transition:opacity .25s linear}
.stage:not(.fs) .zload{top:0;right:0}
.zload.on{opacity:1}
.zload::before{content:"";position:absolute;left:0;top:0;bottom:0;width:34%;background:var(--accent);transform:translateX(-100%)}
.zload.on::before{animation:lib-load 1.15s var(--zoom-ease) infinite}
@keyframes lib-load{from{transform:translateX(-100%)}to{transform:translateX(300%)}}

/* the panel: the selected book's card under the photo (beside it on a phone on its side), with the only Open */
.panel{position:absolute;z-index:5;left:0;right:0;bottom:0;background:var(--paper);border-top:1px solid var(--rule);transform:translateY(100%);transition:transform .45s var(--ease)}
.stage.fs.in .panel{transform:none}
.pcard{display:grid;grid-template-columns:auto minmax(0,1fr) auto;align-items:center;column-gap:14px;height:calc(88px + env(safe-area-inset-bottom,0px));
  padding:0 max(16px,env(safe-area-inset-right,0px)) env(safe-area-inset-bottom,0px) max(16px,env(safe-area-inset-left,0px))}
.pthumb{display:block;height:56px;min-width:40px;transition:opacity .2s linear}
.pthumb.wait{opacity:.35}
.pthumb img{display:block;height:56px;width:auto;max-width:72px;object-fit:contain;filter:var(--img);outline:1px solid var(--spine-edge);outline-offset:-1px}
.pthumb img:not([src]){visibility:hidden}
.ptext{min-width:0}
.pt{margin:0;font:400 16.5px/1.25 "Lib Ellipsis",var(--serif);display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden;text-wrap:balance}
.pt.long{font-size:15px}
.pm{margin:3px 0 0;font-size:12.5px;line-height:1.35;color:var(--soft);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
/* a one-line title leaves the meta line room for a second line */
.pcard.one .pm{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;white-space:normal}
/* nothing selected: what a tap and a pinch do, in place of the book */
.phint{display:none;grid-column:1/-1;margin:0;font-size:14px;line-height:1.45;color:var(--mid);text-wrap:pretty}
.pcard.empty .pthumb,.pcard.empty .ptext{display:none}
.pcard.empty .phint{display:block}
.popen{height:44px;padding:0 20px;font:inherit;font-size:14.5px;color:var(--paper);background:var(--ink);border:1px solid var(--ink);border-radius:var(--r);cursor:pointer;
  transition:opacity .15s linear}
.popen:active{opacity:.8;transform:translateY(1px)}
/* landscape (a phone on its side, a tablet across): the card stands at the right, under the bar, the cover larger */
@media (min-aspect-ratio:4/3){
  .panel{left:auto;top:var(--bar-h,49px);width:min(40%,300px);display:flex;flex-direction:column;justify-content:center;border-top:0;border-left:1px solid var(--rule);transform:translateX(100%)}
  .pcard{grid-template-columns:minmax(0,1fr);row-gap:12px;align-items:start;height:auto;
    padding:16px max(16px,env(safe-area-inset-right,0px)) calc(16px + env(safe-area-inset-bottom,0px)) 16px}
  .pthumb,.pthumb img{height:96px}
  .pthumb img{max-width:120px}
  .pt{-webkit-line-clamp:3}
  .popen{justify-self:start}
}

/* ---------------------------------------------------------------- the schedule: every title as a list */
.schedule{margin:64px 0 0;font-size:13px;color:var(--mid)}
.schedule summary{display:inline-block;padding:8px 0;cursor:pointer;list-style:none;color:var(--ink);transition:text-decoration-color .2s;
  text-decoration:underline 1px var(--line);text-underline-offset:4px}
.schedule summary::-webkit-details-marker{display:none}
.schedule summary:hover,.schedule[open] summary{text-decoration-color:var(--accent)}
.schedule .runs{columns:2 380px;column-gap:56px;padding:18px 0 8px;max-width:1180px}
.schedule section{break-inside:avoid-column;margin:0 0 26px}
.schedule h3{font:400 14.5px/1.3 var(--serif);color:var(--ink);margin:0 0 8px}
.schedule ol{list-style:none;margin:0;padding:0}
.schedule li{display:grid;grid-template-columns:minmax(0,1fr) auto 12.5em;gap:14px;padding:2px 0;font-variant-numeric:tabular-nums}
.schedule li a{color:var(--ink);text-decoration:underline 1px transparent;text-underline-offset:3px;transition:text-decoration-color .2s}
.schedule li a:hover{text-decoration-color:var(--accent)}
.schedule .sz{text-align:right;color:var(--soft)}
@media (max-width:559px){.schedule li{grid-template-columns:minmax(0,1fr) auto;row-gap:0}.schedule .sz{grid-column:1/-1;text-align:left;font-size:12px}.schedule section{break-inside:auto}}
.floor-end .boards a{text-decoration:underline 1px var(--line);text-underline-offset:3px;transition:color .2s,text-decoration-color .2s}
.floor-end .boards a:hover{color:var(--ink);text-decoration-color:var(--accent)}

/* ---------------------------------------------------------------- the reader: the book open, its pages turning */
/* Over the whole page: a bar (Put it back, the title, Details on phones, Copy link), then the book on the wall colour
   beside its details on paper (under them on phones, where the body scrolls). The book is a box at the spread's true
   proportion (library.js sizeBook): two page slots, each showing half of a spread image, and one leaf that folds about
   the spine when a page turns. Nothing here casts a shadow; the fold and what it casts are flat gradients that only
   show while a page is turning. */
html.sheet-on{overflow:hidden;scrollbar-gutter:stable}
.sheet-scrim{position:fixed;inset:0;z-index:40;background:color-mix(in srgb,var(--wall) 72%,transparent);opacity:0;transition:opacity .42s var(--ease)}
.reader{position:fixed;inset:0;z-index:41;display:flex;flex-direction:column;background:var(--paper);color:var(--ink);opacity:0;transform:translateY(14px);
  transition:opacity .42s var(--ease),transform .42s var(--ease)}
.reader.open,.sheet-scrim.open{opacity:1;transform:none}
.reader.instant,.sheet-scrim.instant{transition:none}
.rbar{flex:none;display:flex;align-items:center;gap:8px;height:calc(52px + env(safe-area-inset-top,0px));
  padding:env(safe-area-inset-top,0px) max(12px,env(safe-area-inset-right,0px)) 0 max(12px,env(safe-area-inset-left,0px));border-bottom:1px solid var(--rule)}
.rbar button{display:inline-flex;flex:none;align-items:center;gap:6px;height:36px;padding:0 12px;font:inherit;font-size:13.5px;white-space:nowrap;color:var(--ink);background:none;
  border:1px solid var(--rule);border-radius:var(--r);cursor:pointer;transition:border-color .2s,color .2s,background-color .15s;-webkit-tap-highlight-color:transparent}
.rbar button:hover{border-color:var(--line)}
.rbar button:active{transform:translateY(1px)}
.rbar svg{width:16px;height:16px;fill:none;stroke:currentColor;stroke-width:1.4;stroke-linecap:round;stroke-linejoin:round}
.rbar .back{padding-left:8px;color:var(--paper);background:var(--ink);border-color:var(--ink)}
.rbar .back:hover{border-color:var(--ink);background-color:var(--mid)}
.rname{flex:1 1 auto;min-width:0;margin:0 6px;font:400 15px/1.3 var(--serif);text-align:center;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.rbar .rdet{display:none}
.copy.done{color:var(--accent);border-color:var(--accent)}
.rbody{flex:1 1 auto;min-height:0;display:grid;grid-template-columns:minmax(0,1fr) min(380px,36%);transition:opacity .15s linear}
.rbody.swap{opacity:0}
.rview{position:relative;min-width:0;min-height:0;overflow:hidden;background:var(--wall);display:grid;place-items:center;padding:28px 64px 48px;
  touch-action:pan-y pinch-zoom;-webkit-user-select:none;user-select:none;-webkit-touch-callout:none;outline:0}
.rview.zoomed{touch-action:pinch-zoom;cursor:grab}
.rview.zoomed.dragging{cursor:grabbing}
/* a spread still on its way: a hairline under the bar, like the room's */
.rload{position:absolute;z-index:6;left:0;right:0;top:0;height:2px;overflow:hidden;pointer-events:none;opacity:0;transition:opacity .25s linear}
.rload.on{opacity:1}
.rload::before{content:"";position:absolute;left:0;top:0;bottom:0;width:34%;background:var(--accent);transform:translateX(-100%)}
.rload.on::before{animation:lib-load 1.15s var(--zoom-ease) infinite}
.zoomer{position:relative;transform-origin:0 0}
/* --shift: the closed book stands in the middle of the view (its spread-sized box moved left by half a page) and
   slides into place as the cover opens (library.js show, turn) */
.book{position:relative;width:calc(var(--pw) * 2);height:var(--ph);transform:translateX(var(--shift,0%))}
.book.single,.book.whole{width:var(--pw)}
.pg{position:absolute;top:0;width:50%;height:100%;overflow:hidden;background:var(--mat)}
.pg.l{left:0}
.pg.r{left:50%}
.book.single .pg,.book.whole .pg{left:0;width:100%}
.book.single .pg.l,.book.whole .pg.l{display:none}
.pg.none{visibility:hidden}
.pg::after{content:"";position:absolute;inset:0;z-index:3;box-shadow:inset 0 0 0 1px var(--spine-edge);pointer-events:none}
/* the pages are printed paper: in a dark room they dim far less than the site's photographs (--pgf, not --img) */
.reader{--pgf:none}
.pg img,.face img{position:absolute;top:0;left:0;height:100%;width:200%;filter:var(--pgf);-webkit-user-drag:none;user-select:none}
.pg[data-side=r] img,.face[data-side=r] img{left:-100%}
.pg[data-side=w] img,.face[data-side=w] img{width:100%;object-fit:contain}
/* the cover, closed: the book's own shape (the page's mat does not show past it) */
.pg[data-side=c],.face[data-side=c],.pg[data-side=w]{background:none}
.pg[data-side=c]::after,.pg[data-side=w]::after{display:none}
.pg[data-side=c] img,.face[data-side=c] img{width:100%;object-fit:contain;object-position:left top}
.book.whole .pg[data-side=c] img,.book.single .pg[data-side=c] img{object-position:center top}
/* a cover file that still carries the studio shadow on its right and bottom edges (b.cin, --cx and --cy from
   library.js sizeBook): drawn a touch larger so the band falls outside the slot and the printed cover shares the
   pages' edge exactly */
.book.cin .pg[data-side=c] img,.book.cin .face[data-side=c] img{width:calc(100% * var(--cx,1));height:calc(100% * var(--cy,1));object-fit:fill}
/* the address, when Copy link cannot reach the clipboard: text to select, over the book */
.rsaid{position:absolute;z-index:7;left:16px;right:16px;top:12px;margin:0 auto;max-width:560px;padding:10px 14px;font-size:13px;line-height:1.45;color:var(--ink);
  background:var(--paper);border:1px solid var(--rule);border-radius:var(--r);-webkit-user-select:text;user-select:text;overflow-wrap:anywhere}
.rsaid b{font-weight:500}
/* the gutter: a breath of shade where the pages meet, in the open spread only */
.book.spread .pg.l::before,.book.spread .pg.r::before{content:"";position:absolute;top:0;bottom:0;width:5%;z-index:2;pointer-events:none}
.book.spread .pg.l::before{right:0;background:linear-gradient(90deg,transparent,color-mix(in srgb,var(--ink) 9%,transparent))}
.book.spread .pg.r::before{left:0;background:linear-gradient(270deg,transparent,color-mix(in srgb,var(--ink) 9%,transparent))}
.book.spread .pg[data-side=c]::before{display:none}
/* what the turning leaf casts on the page beneath it (library.js turn animates the opacity) */
.cast{position:absolute;inset:0;z-index:2;opacity:0;pointer-events:none;background:linear-gradient(90deg,color-mix(in srgb,var(--ink) 42%,transparent),transparent 60%)}
.pg.l .cast{background:linear-gradient(270deg,color-mix(in srgb,var(--ink) 42%,transparent),transparent 60%)}
/* reader-3d */
.book{perspective:2800px}
.leaf{position:absolute;top:0;left:50%;width:50%;height:100%;z-index:4;transform-origin:0 50%;transform-style:preserve-3d;pointer-events:none}
.leaf.bwd{left:0;transform-origin:100% 50%}
.book.single .leaf{left:0;width:100%;transform-origin:0 50%}
.book.single .leaf.bwd{transform-origin:0 50%}
.face{position:absolute;inset:0;overflow:hidden;background:var(--mat);backface-visibility:hidden;-webkit-backface-visibility:hidden}
.face::after{content:"";position:absolute;inset:0;z-index:3;box-shadow:inset 0 0 0 1px var(--spine-edge);pointer-events:none}
.face.b{transform:rotateY(180deg)}
.face[data-side=c]::after{display:none}
.leaf.single .face.b{display:none}
/* /reader-3d */
/* the fold's shading on the turning leaf: dark at the spine */
.fold{position:absolute;inset:0;z-index:2;opacity:0;pointer-events:none;background:linear-gradient(90deg,color-mix(in srgb,var(--ink) 42%,transparent),transparent 55%)}
.leaf.fwd .face.b .fold,.leaf.bwd .face.f .fold{background:linear-gradient(270deg,color-mix(in srgb,var(--ink) 42%,transparent),transparent 55%)}
/* the arrows at the sides: on desktop while the pointer is over the book, always for the keyboard */
.turn{position:absolute;top:50%;z-index:5;width:40px;height:40px;margin-top:-20px;display:inline-flex;align-items:center;justify-content:center;padding:0;color:var(--ink);
  background:var(--paper);border:1px solid var(--rule);border-radius:var(--r);cursor:pointer;opacity:0;transition:opacity .25s linear,border-color .2s,color .2s}
.tprev{left:12px}
.tnext{right:12px}
.turn svg{width:16px;height:16px;fill:none;stroke:currentColor;stroke-width:1.4;stroke-linecap:round;stroke-linejoin:round}
.rview:hover .turn,.turn:focus-visible{opacity:1}
.turn:hover{border-color:var(--line)}
.turn:active{transform:translateY(1px)}
.turn[aria-disabled=true]{color:var(--soft);cursor:default}
.turn[aria-disabled=true]:hover{border-color:var(--rule)}
.rview:hover .turn[aria-disabled=true]{opacity:.4}
.rcount{position:absolute;left:0;right:0;bottom:14px;margin:0;text-align:center;font-size:12.5px;line-height:1.4;color:var(--soft);font-variant-numeric:tabular-nums;pointer-events:none}
.rcount i{font-style:normal;color:var(--mid)}
.rview.zoomed .rcount{opacity:0}
.rcount{transition:opacity .2s linear}
/* the details, on paper */
.details{min-width:0;min-height:0;overflow-y:auto;overscroll-behavior:contain;border-left:1px solid var(--rule);padding:30px 32px 0;display:flex;flex-direction:column;container-type:inline-size}
.details .meta{font-size:12.5px;color:var(--soft);margin:0 0 8px}
.details h2{font:400 28px/1.15 var(--serif);letter-spacing:-.01em;margin:0 0 6px;text-wrap:balance}
.details h2:focus{outline:none}
.details .subt{font-size:14.5px;color:var(--mid);margin:0 0 14px}
.details .subt:empty{display:none}
.details .blurb{font-size:14.5px;line-height:1.6;max-width:46ch;margin:0 0 20px}
.details .blurb:empty{display:none}
.facts{display:grid;grid-template-columns:88px minmax(0,1fr);gap:4px 12px;margin:0 0 20px;font-size:13px;font-variant-numeric:tabular-nums}
.facts dt{color:var(--soft)}
.facts dd{margin:0}
.details .credit{font-size:13px;color:var(--ink);margin:-8px 0 18px}
.details .credit::before{content:"";display:inline-block;width:9px;height:1px;background:var(--accent);vertical-align:middle;margin:0 8px 2px 0}
.details .credit:empty{display:none}
.details .note{font-size:13px;line-height:1.5;color:var(--mid);margin:-8px 0 20px;max-width:40ch}
.details .note:empty{display:none}
.links{display:flex;flex-wrap:wrap;gap:6px 22px;font-size:14px;margin:0 0 26px}
.links:empty{display:none}
.links a{text-decoration:underline 1px var(--rule);text-underline-offset:4px;transition:color .2s,text-decoration-color .2s}
.links a:hover{color:var(--accent);text-decoration-color:var(--accent)}
.drawing{margin:0 0 26px;min-width:0}
.plan{position:relative;width:100%;height:200px}
.plan .obj{position:absolute;left:0;top:0;display:block;overflow:hidden;background:var(--c,var(--rule))}
.plan .obj::after{content:"";position:absolute;inset:0;box-shadow:inset 0 0 0 1px var(--spine-edge)}
.plan .obj img,.plan .obj svg{display:block;width:100%;height:100%;object-fit:fill;filter:var(--img)}
.plan .obj.f img{width:calc(100% * var(--cx,1));height:calc(100% * var(--cy,1))}
.plan .obj.typeset{background:none}
.plan .obj.typeset text{font-family:var(--sans)}
.plan .dims{position:absolute;left:0;top:0;overflow:visible;pointer-events:none}
.plan .dims line{stroke:var(--line);stroke-width:1;shape-rendering:crispEdges}
.plan .dims text{font:400 11px var(--sans);fill:var(--soft);font-variant-numeric:tabular-nums}
.drawing figcaption{font-size:12px;color:var(--soft);margin:6px 0 0}
/* the rest of the series: small covers in rows (every one in sight, nothing to scroll sideways), the open one marked */
.series{margin:0 0 20px}
.series[hidden]{display:none}
.series h3{font:400 13px/1.3 var(--serif);color:var(--ink);margin:0 0 10px}
.srow{position:relative;display:flex;flex-wrap:wrap;gap:7px;padding:4px 0 8px}
.sc{flex:none;height:44px;margin:0;padding:0;border:0;border-radius:0;background:none;cursor:pointer;-webkit-tap-highlight-color:transparent}
.sc img{display:block;height:100%;width:auto;filter:var(--img);outline:1px solid var(--spine-edge);outline-offset:-1px;transition:transform .3s var(--ease)}
.sc:hover img{transform:translateY(-3px)}
.sc[aria-current=true] img{outline:2px solid var(--accent);outline-offset:-2px}
.sc[aria-current=true]{cursor:default}
.sc[aria-current=true]:hover img{transform:none}
.acts{position:sticky;bottom:0;z-index:2;margin-top:auto;display:flex;align-items:center;gap:10px;background:var(--paper);border-top:1px solid var(--rule);
  padding:14px 0 calc(14px + env(safe-area-inset-bottom,0px))}
.acts button{height:40px;padding:0 14px;font:inherit;font-size:14px;color:var(--ink);background:none;border:1px solid var(--rule);border-radius:var(--r);cursor:pointer;transition:border-color .2s,color .2s}
.acts button:hover{border-color:var(--line)}
.acts button:active{transform:translateY(1px)}
.acts .next{margin-left:auto}
/* a narrow details column: the facts stack */
@container (max-width:300px){.facts{grid-template-columns:76px minmax(0,1fr)}}
/* a tablet across (an iPad on its side): the details column gives way so the book is not smaller than on a phone */
@media (min-width:900px) and (max-width:1099.98px){
  .rbody{grid-template-columns:minmax(0,1fr) 300px}
  .rview{padding:24px 48px 44px}
  .details{padding:24px 22px 0}
}
/* a deep link on a phone: the head's script keeps the room out of sight under the reader until it closes, so the
   stage going full screen under it never shifts the page (library.js close) */
html.deep .room{visibility:hidden}
/* phones and narrow tablets: the book takes the first screen, the details follow under it; the body scrolls */
@media (max-width:899.98px){
  .rbody{display:block;overflow-y:auto;overscroll-behavior:contain;-webkit-overflow-scrolling:touch}
  .rview{height:var(--rv-h,calc(100dvh - 52px - env(safe-area-inset-top,0px)));padding:16px 16px 44px}
  .details{border-left:0;border-top:1px solid var(--rule);overflow:visible;padding:22px max(16px,env(safe-area-inset-right,0px)) 0 max(16px,env(safe-area-inset-left,0px))}
  .details h2{font-size:26px}
  .rbar .rdet{display:inline-flex}
  .acts{position:static}
}
/* the arrows stay for screen readers and keyboards on a touch screen, out of sight */
@media (pointer:coarse){.turn{position:absolute;width:1px;height:1px;margin:-1px;padding:0;border:0;overflow:hidden;clip-path:inset(50%);white-space:nowrap;opacity:1}
  .turn:focus-visible{width:40px;height:40px;margin-top:-20px;clip-path:none}}
/* a phone on its side: the bar keeps to 44px and the view fits under it */
@media (max-width:899.98px) and (max-height:480px){
  .rbar{height:calc(44px + env(safe-area-inset-top,0px))}
  .rbar button{height:32px}
  .rview{height:var(--rv-h,calc(100dvh - 44px - env(safe-area-inset-top,0px)));padding:12px 44px 36px}
  .rcount{bottom:10px}
}
/* small phones: the words of Put it back and Copy link go (they stay for screen readers), the title keeps the middle */
@media (max-width:559px){
  .rbar{gap:6px}
  .rbar .back span,.rbar .copy span{position:absolute;width:1px;height:1px;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
  .rbar .back,.rbar .copy{width:40px;padding:0;justify-content:center}
  .rbar .back{padding:0}
  .rname{font-size:13.5px;line-height:1.25;white-space:normal;text-overflow:clip;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2}
  .acts button{height:44px}
}
@media (prefers-color-scheme:dark){:root:not([data-theme=light]) .reader{--pgf:brightness(.94)}}
:root[data-theme=dark] .reader{--pgf:brightness(.94)}

/* ---------------------------------------------------------------- reduced motion: no scaling, no sliding, short fades */
@media (prefers-reduced-motion:reduce){
  .cam,.lys .g,.filters button::after{transition:none!important}
  .zbar.show{animation:none}
  .stage.fs .zbar,.panel,.reader,.sheet-scrim,.tag,.controls,.lcv,.sc img{transition:opacity .12s linear,visibility 0s!important}
  .stage.fs .zbar,.panel,.reader,.controls,.lcv,.sc img{transform:none!important}
  .rload.on::before{animation-duration:2.4s}
  .stage.fs .zbar,.panel{opacity:0}
  .stage.fs.in .zbar,.stage.fs.in .panel{opacity:1}
  .zload.on::before{animation-duration:2.4s}
}

/* ── The open book's backdrop: its own most photographic spread, soft and faint behind the closed book (2026-11-17) ── */
.rview{isolation:isolate}
.rview::before{content:"";position:absolute;inset:-10%;z-index:-1;background:var(--bd,none) center/cover no-repeat;filter:blur(28px) saturate(.85);opacity:0;transition:opacity .7s var(--ease);pointer-events:none;-webkit-mask:linear-gradient(to bottom,transparent,var(--ink) 18%,var(--ink) 72%,transparent);mask:linear-gradient(to bottom,transparent,var(--ink) 18%,var(--ink) 72%,transparent)}
.reader.at-cover .rview::before{opacity:.34}
@media (prefers-reduced-motion:reduce){.rview::before{transition:none}}
