@font-face{font-family:Cinzel;src:url("./vendor/Cinzel-Medium.ttf") format("truetype");font-display:swap;font-weight:400 700}
:root{--paper:#f7f4eb;--ink:#242b26;--muted:#65675d;--line:#d5d0c1;--accent:#813b28;--radius-field:6px;--border:1px;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Arial,sans-serif;color:var(--ink);background:var(--paper);font-size:16px;color-scheme:light}
*{box-sizing:border-box}
body{margin:0;background:radial-gradient(ellipse at 12% 1%,#fbf9f1,transparent 60%),var(--paper)}
button{font:inherit;cursor:pointer;color:inherit;-webkit-tap-highlight-color:transparent}
button:focus-visible,a:focus-visible,[tabindex]:focus-visible{outline:3px solid #ad6f40;outline-offset:4px}
button:disabled{cursor:default;opacity:.4}
svg{display:inline-block;flex:none;width:17px;height:17px;fill:none;stroke:currentColor;stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round}
.definitions,.sr-only{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap}
[hidden]{display:none!important}
.skip{position:absolute;left:1rem;top:0;transform:translateY(-125%);padding:.8rem;background:var(--paper);z-index:7;color:var(--ink)}
.skip:focus{transform:none}
.masthead{height:70px;border-bottom:1px solid var(--line);display:flex;align-items:center;justify-content:space-between;padding:0 max(4.5vw,calc((100vw - 1344px)/2));gap:10px}
.brand{display:flex;align-items:center;gap:13px;font-family:Cinzel,Georgia,serif;font-size:23px;line-height:1.1;white-space:nowrap}
.brandmark{width:30px;height:30px;stroke-width:1.1;color:var(--accent)}
.shortlist-btn,.keep-button,.mode-switch button{display:inline-flex;align-items:center;justify-content:center;gap:8px;font-size:13px;font-weight:550;line-height:1.15}
.shortlist-btn,.keep-button{background:transparent;border:1px solid #aaa694;border-radius:4px;padding:9px 13px;min-height:38px}
.shortlist-btn{border-color:transparent}
.shortlist-btn span{min-width:21px;padding:3px 5px;border:1px solid var(--line);border-radius:50%;font-size:11px}
.shortlist-btn:hover,.keep-button:hover,.mode-switch button:hover{background:#e9e4d6}
.shortlist-btn[aria-pressed="true"],.keep-button[aria-pressed="true"]{color:#753a29;background:#efe2d3;border-color:#c5a995}
button[aria-pressed="true"] svg:has(use[href="#bookmark"]){fill:currentColor}
main{max-width:1460px;margin:auto;padding:0 clamp(20px,4.5vw,68px)}
.titlebar{display:flex;justify-content:space-between;align-items:flex-end;gap:14px;padding:clamp(22px,3.6vw,56px) 0 26px}
h1,h2,h3,p{margin:0}
h1,.caption h3,#empty h3{font-family:Georgia,"Times New Roman",serif;font-weight:400}
h1{font-size:clamp(43px,5vw,76px);line-height:1.02;letter-spacing:-.06em}
.byline{font-size:13px;color:var(--muted);margin:9px 0 0}
.mode-switch button{min-height:36px;min-width:65px;border-color:#bcb8aa;background:transparent;padding:7px 12px}
.mode-switch button[aria-pressed="true"]{background:#313d33;border-color:#313d33;color:white}
.workspace{display:grid;grid-template-columns:minmax(195px,23%) minmax(0,1fr);gap:clamp(28px,4.3vw,72px);border-top:1px solid var(--line)}
.volumes{padding-top:22px}
.smallcap,.viewer-heading h2,.position,.volume-id,.cell span:first-child,.caption .smallcap{font-size:10px;font-weight:650;letter-spacing:.16em;text-transform:uppercase}
.volumes h2{padding-bottom:13px;color:var(--muted)}
#volume-list{display:grid}
.volume{position:relative;display:grid;grid-template-columns:minmax(0,1fr) 18px;gap:7px;width:100%;min-height:80px;padding:16px 12px;text-align:left;background:transparent;border:0;border-bottom:1px solid var(--line)}
.volume:first-child{border-top:1px solid var(--line)}
.volume:hover{background:#eee9da}
.volume[aria-current="true"]{background:#eee7d8}
.volume[aria-current="true"]::before{content:"";position:absolute;left:0;top:0;bottom:0;width:3px;background:var(--accent)}
.volume-id{grid-column:1;color:#785642}
.volume-name{font:clamp(16px,1.46vw,22px)/1.18 Georgia,serif;grid-column:1;overflow-wrap:anywhere}
.volume svg{grid-column:2;grid-row:1/3;align-self:center;width:14px;color:#725a45}
.viewer{min-width:0}
.viewer-heading{min-height:53px;display:flex;align-items:center;justify-content:space-between;gap:12px}
.viewer-heading h2{letter-spacing:.15em}
.viewer-heading>span,.position{font-size:12px;color:var(--muted)}
.stage{height:clamp(340px,49vw,520px);position:relative;display:grid;place-items:center;isolation:isolate;overflow:hidden;border:1px solid #d0cabc;background:radial-gradient(ellipse at 55% 83%,#aea99b70 0,transparent 43%),linear-gradient(108deg,#cac8ba 0,#dedccc 23%,#ece7d7 60%,#d9d6c7 100%);perspective:1250px;touch-action:pan-y}
.stage::before{content:"";position:absolute;inset:0;background:linear-gradient(121deg,transparent 0 64%,#fff7 65%,transparent 75%);pointer-events:none;opacity:.42}
.book-cover{--book-w:clamp(135px,calc(49vw * .5),262px);width:var(--book-w);max-width:51%;aspect-ratio:5/8;position:relative;display:block;border:0;padding:0;background:#f1e7d2;box-shadow:3px 3px 0 #d8d2c3,4px 3px 0 #918b7d,5px 4px 0 #e3ddcf,6px 4px 0 #9e9684,7px 5px 0 #d3ccbc,12px 16px 20px #211e2035,21px 26px 36px #211b1c37;transform:rotate(-2deg);transform-style:preserve-3d;border-radius:1px 3px 3px 1px}
.book-cover::after{content:"";position:absolute;inset:0;pointer-events:none;background:linear-gradient(90deg,#05060452 0,transparent 1.2%,#fff3 1.9%,#0002 2.4%,transparent 3.8%);z-index:3}
#leaf,.cover-page{display:block;width:100%;height:100%;border-radius:inherit}
.cover-page{object-fit:contain;background:#272b25}
.turn-leaf{position:absolute;inset:0;z-index:2;transform-origin:0 50%;pointer-events:none;backface-visibility:hidden;animation:turn-left .47s cubic-bezier(.46,.06,.28,.96) forwards;box-shadow:3px 1px 4px #0003}
.turn-leaf.reverse{transform-origin:100% 50%;animation-name:turn-right}
@keyframes turn-left{0%{transform:rotateY(0);filter:brightness(1)}65%{filter:brightness(.75)}100%{transform:rotateY(-94deg);filter:brightness(.48)}}
@keyframes turn-right{0%{transform:rotateY(0);filter:brightness(1)}65%{filter:brightness(.75)}100%{transform:rotateY(94deg);filter:brightness(.48)}}
.turn,.enlarge{border:1px solid #a6a392;background:#f8f5edcd;display:grid;place-items:center;position:absolute}
.turn{top:50%;transform:translateY(-50%);border-radius:50%;width:44px;height:44px}
.previous{left:clamp(9px,3.1vw,46px)}.next{right:clamp(9px,3.1vw,46px)}
.turn:hover,.enlarge:hover{background:#fffcf5}
.position{position:absolute;bottom:16px;left:18px;letter-spacing:.1em;font-variant-numeric:tabular-nums;color:#494b42}
.enlarge{bottom:12px;right:12px;width:32px;height:32px;border-radius:4px}
.caption{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:18px 0 6px}
.caption .smallcap{color:var(--accent);margin-bottom:5px}
.caption h3{font-size:clamp(21px,2.4vw,34px);line-height:1.12;letter-spacing:-.025em;overflow-wrap:anywhere}
.keep-button{white-space:nowrap}
.credit{font-size:12px;color:var(--muted);margin:9px 0}.credit a{color:inherit}
.contact-sheet{display:grid;grid-template-columns:repeat(auto-fill,minmax(min(135px,42%),1fr));gap:22px 16px;align-items:start;padding-bottom:16px}
.cell{position:relative;appearance:none;text-align:left;background:none;padding:0;border:0;min-width:0}
.cell img{width:100%;aspect-ratio:5/8;object-fit:contain;background:#dbd7c9;display:block;box-shadow:0 4px 8px #302a2219}
.cell:hover img{outline:2px solid #a47d57;outline-offset:2px}
.cell .cell-info{display:block;margin-top:8px;font-size:13px;line-height:1.35;color:#353a32}
.cell .marker{position:absolute;top:6px;right:6px;background:var(--paper);padding:4px;border-radius:3px;color:#793a29;box-shadow:0 1px 5px #0003}
.cell .marker svg{fill:currentColor;width:14px;height:14px;display:block}
#empty{padding:55px 24px;background:#eeeadd;text-align:center}
#empty h3{font-size:26px}#empty p{margin:10px 0 20px;color:var(--muted)}
footer{display:flex;justify-content:space-between;gap:10px;border-top:1px solid var(--line);padding:16px 0 24px;margin-top:27px;color:var(--muted);font-size:11px}
footer span:first-child{font:12px Cinzel,Georgia,serif}
dialog{position:fixed;border:0;padding:16px;max-width:94vw;max-height:96vh;background:#272b26;box-shadow:0 15px 75px #0007;color:white}
dialog::backdrop{background:#141912d9}
dialog img{display:block;max-height:86vh;max-height:86dvh;max-width:83vw;width:auto;object-fit:contain}
dialog button{position:absolute;right:4px;top:4px;display:grid;place-items:center;border:1px solid #989a88;background:#272b26;color:white;width:32px;height:32px;border-radius:50%}
.is-embed .masthead,.is-embed .volumes,.is-embed footer span:first-child,.is-embed .byline{display:none}
.is-embed .workspace{display:block}
.is-embed main{max-width:1060px;margin:auto;padding:0 clamp(8px,3.5vw,36px)}
.is-embed .titlebar{padding:12px 0 13px}
.is-embed h1{font-size:clamp(27px,4vw,45px);letter-spacing:-.045em}
.is-embed .viewer-heading{min-height:42px}
.is-embed .stage{height:clamp(295px,58vw,510px)}
.is-embed footer{justify-content:flex-end;margin-top:12px;padding:8px 0}
.is-embed #saved-filter{display:inline-flex}
.embed-actions{display:flex;align-items:center;justify-content:flex-end;flex-wrap:wrap;gap:8px}
@media(max-width:720px){
.masthead{height:57px;padding:0 16px}
main{padding:0 16px}
.brand{font-size:18px;gap:8px}.brandmark{width:24px;height:24px}
.shortlist-btn{font-size:12px;padding:6px 2px;gap:5px}
.titlebar{padding:20px 0 18px;align-items:center}
h1{font-size:40px}.byline{font-size:12px;margin-top:5px}
.workspace{display:block}
.volumes{padding:0}.volumes h2{display:none}
#volume-list{grid-template-columns:repeat(3,minmax(0,1fr));border-bottom:1px solid var(--line)}
.volume,.volume:first-child{display:flex;align-items:center;justify-content:center;border:0;padding:12px 4px;min-height:42px}.volume-name,.volume svg{display:none}
.volume[aria-current="true"]::before{top:auto;width:100%;height:2px}
.viewer-heading{min-height:43px}
.stage,.is-embed .stage{height:clamp(300px,69vw,430px)}
.book-cover{width:clamp(145px,38vw,220px)}
.turn{width:36px;height:36px}
.caption{padding-top:14px}.keep-button{font-size:12px;gap:5px;padding:8px 10px}
.mode-switch button{min-width:0;padding:7px 9px;font-size:12px;gap:5px}
footer{margin-top:18px}
}
@media(max-width:430px){.titlebar{gap:8px}h1{font-size:34px}.brand{font-size:16px}.mode-switch button{padding:7px}.mode-switch svg{width:14px}.caption h3{font-size:22px}.is-embed .titlebar{align-items:flex-start;flex-direction:column}.is-embed .embed-actions{width:100%;justify-content:space-between}.is-embed .shortlist-btn{padding:3px}.is-embed .stage{height:300px}.is-embed footer{margin-top:8px}}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{animation-duration:.01ms!important;transition-duration:.01ms!important;scroll-behavior:auto!important}}
[hidden]{display:none!important}
