/* Illustrated paper relics, floating above the sanctuary with commands exposed. */
dialog.floating-relic{position:fixed;inset:auto;left:50%;top:calc((100svh - 175px)/2);transform:translate(-50%,-50%);margin:0;padding:0;border:0;background:none;color:#2b2925;overflow:visible;max-width:none;max-height:none;z-index:90;filter:drop-shadow(0 18px 20px #151b2045)}
dialog.floating-relic[open]{animation:relic-unfold .48s cubic-bezier(.2,.75,.2,1) both}
@keyframes relic-unfold{from{opacity:0;clip-path:inset(46% -20% 46% -20%);translate:0 20px}to{opacity:1;clip-path:inset(-20%);translate:0 0}}
.floating-relic .relic-close{position:absolute;right:9%;top:8%;width:36px;height:36px;border:1px solid #77756c;border-radius:49% 43% 48% 44%;background:#faf9f3;font:26px/1 Georgia,serif;z-index:3;box-shadow:1px 2px 0 #7774}
.floating-relic .relic-close:hover{background:#e8e6dc}
.floating-relic .relic-kicker{font:9px/1.6 monospace;letter-spacing:.18em;text-transform:uppercase;color:#6f6a60}
dialog.ethos-scroll{width:min(580px,calc(100vw - 30px));height:min(630px,calc(100svh - 225px))}
.relic-scroll-art{position:absolute;inset:0;width:100%;height:100%;pointer-events:none}
.scroll-reading{position:absolute;inset:16% 14% 15%;overflow:auto;text-align:center;scrollbar-width:thin;scrollbar-color:#918b7f transparent;padding:0 5px;overscroll-behavior:contain}
.floating-relic.ethos-scroll h2{font:43px/1.1 Pirata,Georgia,serif;margin:5px 0 18px}
.ethos-copy{font:17px/1.55 Bodoni,Georgia,serif;text-wrap:pretty}
.ethos-copy p+p{margin-top:17px}.ethos-copy em{font-style:italic}.scroll-signature{font:19px/1.2 Pirata,Georgia,serif;margin:20px 0 8px;letter-spacing:.07em}
dialog.lore-book{width:min(810px,calc(100vw - 40px));height:min(620px,calc(100svh - 195px));perspective:1300px}
.book-binding{position:absolute;inset:0 0 32px;padding:9px 10px 15px;background:#504c45;border:2px solid #292824;border-radius:12px 9px 18px 13px;box-shadow:0 4px 0 #c1bdb1,0 6px 0 #514d45,4px 9px 0 #26241f;transform:rotate(-.4deg)}
.book-pages{position:relative;height:100%;display:grid;grid-template-columns:1fr 1fr;gap:0;background:#f7f5ed;border-radius:6px 9px 5px 7px;box-shadow:0 2px 0 #777267,0 5px 0 #e3e0d7,0 7px 0 #918b7d;overflow:hidden}
.book-page{position:relative;min-width:0;overflow:hidden;padding:30px 34px 38px;background:linear-gradient(90deg,#faf9f3 85%,#e3dfd4 98%,#b6afa0);border:1px solid #b5afa0;border-radius:6px 2px 2px 6px;overscroll-behavior:contain}
.book-page+.book-page{background:linear-gradient(90deg,#b6afa0,#e7e3d9 3%,#fffdf7 15%);border-radius:2px 7px 7px 2px}
.book-pages{perspective:1600px}
.book-measure{position:absolute;inset:0 auto 0 0;visibility:hidden;pointer-events:none}
.book-measure>.book-page{height:100%}
.book-turn-leaf{position:absolute;top:0;bottom:0;left:50%;width:50%;z-index:5;transform-origin:left center;transform-style:preserve-3d;pointer-events:none}
.book-turn-leaf.is-previous{left:0;transform-origin:right center}
.book-turn-face{position:absolute;inset:0;backface-visibility:hidden;-webkit-backface-visibility:hidden;box-shadow:0 0 16px #29231930}
.book-turn-face.book-turn-back{transform:rotateY(180deg)}
.book-turn-face:after{content:'';position:absolute;inset:0;background:linear-gradient(90deg,#29231924,transparent 25%,transparent 70%,#29231910);pointer-events:none}
.book-turn-under{position:absolute;top:0;bottom:0;left:0;width:50%;z-index:2;pointer-events:none}
.book-turn-under.is-right{left:50%}
@media(max-width:620px){.book-turn-leaf,.book-turn-leaf.is-previous{left:0;width:100%}}
.book-page:before{content:'';position:absolute;inset:10px 11px;border:1px solid #8a817e35;border-radius:2px 4px 5px 3px;pointer-events:none}
.book-page h3{font:31px/1.12 Pirata,Georgia,serif;margin:13px 0 19px;max-width:245px}
.book-prose{font:17px/1.48 Bodoni,Georgia,serif;text-wrap:pretty}.book-prose p+p{margin-top:15px}
.book-prose p:first-child:first-letter{float:left;font:44px/.9 Pirata,Georgia,serif;margin:7px 5px 0 0}
.book-colophon{font:10px/1.6 monospace;letter-spacing:.08em;text-transform:uppercase;color:#777166;margin-top:25px}
.book-folio{display:block;text-align:center;font:11px Georgia,serif;margin-top:17px;color:#827b6e}
.book-ribbon{position:absolute;left:49%;top:-3px;width:17px;height:45px;background:#68635a;clip-path:polygon(0 0,100% 0,100% 100%,50% 80%,0 100%);filter:drop-shadow(1px 2px 2px #0006)}
.lore-book .relic-close{top:-16px;right:-12px}
.book-controls{position:absolute;bottom:-17px;left:10%;right:10%;display:flex;align-items:center;justify-content:space-between;padding:6px 12px;background:#faf9f1f5;border:1px solid #777166;border-radius:3px 7px 4px 6px;box-shadow:1px 3px #0002}
.book-controls button{min-height:34px;min-width:90px;font:24px/1 Georgia,serif;padding:3px 8px}.book-controls button span{font:14px Bodoni,Georgia,serif}.book-count{font:10px monospace;letter-spacing:.12em;color:#6e675a}
.lore-command[aria-expanded="true"] .relic-aura{opacity:1;stroke:#181818}.lore-command[aria-expanded="true"] span{text-decoration:underline;text-underline-offset:5px}
.scroll-reading{scrollbar-gutter:stable}
@media(max-width:620px){dialog.floating-relic{top:calc((100svh - 185px)/2)}dialog.ethos-scroll{height:calc(100svh - 235px);max-height:630px}.ethos-copy{font-size:16px;line-height:1.48}.scroll-reading{inset:16% 13% 15%}.floating-relic.ethos-scroll h2{font-size:34px;margin-bottom:12px}dialog.lore-book{width:calc(100vw - 46px);height:calc(100svh - 195px);max-height:620px}.book-pages{grid-template-columns:1fr}.book-page{padding:23px 27px 28px}.book-page h3{font-size:30px}.book-prose{font-size:18px}.book-ribbon{left:auto;right:25px}.book-controls{left:0;right:0}.floating-relic .relic-kicker{font-size:8px}.book-controls button{min-width:78px}}
@media(max-height:550px){dialog.floating-relic{top:calc((100svh - 140px)/2)}dialog.ethos-scroll,dialog.lore-book{height:calc(100svh - 175px)}.ethos-copy,.book-prose{font-size:16px}}
.reduced-motion dialog.floating-relic[open]{animation:none}

@media(max-width:620px){dialog.lore-book{top:calc((100svh - 155px)/2)}.lore-book .relic-close{top:-8px}}

/* A typeset memoir: centered as a complete object, navigation on the paper. */
dialog.lore-book{top:50%;width:min(960px,calc(100vw - 64px));height:min(700px,calc(100svh - 80px));max-height:none}
.book-binding{inset:0;padding:10px 11px 15px;transform:none;background:linear-gradient(90deg,#49463f,#696258 48%,#39352f 50%,#696258 52%,#49463f)}
.book-page{height:100%;padding:34px 40px 68px;display:flex;flex-direction:column}
.book-content{flex:1;min-height:0;display:flex;flex-direction:column;position:relative}
.book-page:before{inset:13px 14px;border-color:#8a817e26}
.book-page .relic-kicker{flex:none;font:9px/1.5 monospace;letter-spacing:.16em;margin:0;color:#777063}
.book-page h3{flex:none;font:clamp(29px,3.3vw,38px)/1.03 Pirata,Georgia,serif;letter-spacing:.005em;margin:17px 0 23px;max-width:none;text-wrap:balance}
.book-prose{flex:none;font:18px/1.48 Bodoni,Georgia,serif;text-wrap:pretty;font-kerning:normal;font-variant-ligatures:common-ligatures;hyphens:none}
.book-prose p{margin:0;widows:3;orphans:3}
.book-prose p+p{margin-top:13px}
.book-prose p:first-child:first-letter{float:none;font:inherit;margin:0}
.book-page:not(.is-closing) .book-prose p:first-child:first-letter{float:left;font:51px/.85 Pirata,Georgia,serif;margin:6px 7px 0 0}
.book-colophon{flex:none;font:9px/1.5 monospace;letter-spacing:.12em;text-transform:uppercase;color:#797265;margin:22px 0 0;padding-top:9px;border-top:1px solid #a79d8955;text-wrap:balance}
.book-folio{position:absolute;bottom:51px;left:0;right:0;margin:0;font:10px Georgia,serif;color:#8a8171}
.book-controls{bottom:20px;left:35px;right:35px;padding:0;border:0;background:none;box-shadow:none;z-index:8;pointer-events:none}
.book-controls button{pointer-events:auto;border:0;background:none;min-height:36px;min-width:90px;padding:3px 9px;color:#49443b;font:24px Georgia,serif}
.book-controls button span{font:italic 15px Bodoni,Georgia,serif}
.book-controls button:hover:not(:disabled){background:transparent;text-decoration:underline;text-underline-offset:4px}
.book-controls button:disabled{opacity:.28}.book-controls button:focus-visible{outline:1px dashed #665c4d;outline-offset:2px}
.book-count{font:9px monospace;letter-spacing:.12em;color:#81776a;background:#eee9dd;padding:3px 6px;border-radius:40%}
.book-ribbon{width:12px;height:40px;left:calc(50% - 6px);opacity:.8}
.lore-book .relic-close{top:-14px;right:-12px}
.book-plate{min-height:0;flex:1;display:flex;flex-direction:column;margin:0}
.book-plate>img{width:100%;height:0;min-height:0;flex:1;object-fit:contain;mix-blend-mode:multiply}
.book-plate figcaption{flex:none;display:grid;gap:5px;padding-top:12px;font:italic 12px/1.3 Bodoni,Georgia,serif;color:#666052}
.is-illustrated h3{font-size:27px;line-height:1.08;margin:11px 0 12px}
.is-illustrated .book-colophon{margin-top:14px;font-size:8px}
.book-island{display:flex;align-items:center;gap:21px;margin:24px 0 0;padding:16px 0;border-top:1px solid #958a7555}
.book-island>img{width:47px;height:91px;object-fit:contain;transform:rotate(-7deg)}
.book-island div{display:flex;flex-direction:column;gap:5px}.book-island strong{font:23px Pirata,Georgia,serif}.book-island span{font:italic 14px Bodoni,Georgia,serif}.book-island a{font:10px/1.5 monospace;text-decoration:underline;text-underline-offset:3px}.book-island small{font:8px/1.5 monospace;color:#7c7569}
.book-pullquote{margin:auto 0 0;padding:24px 3px 0;font:italic 23px/1.25 Bodoni,Georgia,serif;text-wrap:balance;color:#716654;transform:rotate(-2deg)}
.book-portrait{flex:1;min-height:60px;display:flex;flex-direction:column;margin:17px 0 0;position:relative}
.book-portrait img{flex:1;min-height:0;height:0;width:100%;object-fit:contain;mix-blend-mode:multiply}
.book-portrait figcaption{font:italic 11px/1.3 Bodoni,Georgia,serif;text-align:center;color:#7c7263;margin-top:5px}
.is-closing .book-prose{font-style:italic;font-size:21px;line-height:1.3;max-width:250px}
.is-closing .book-colophon{font:18px Pirata,Georgia,serif;text-align:right;letter-spacing:.04em;text-transform:none}
@media(max-width:800px){.book-page{padding:28px 28px 66px}.book-prose{font-size:17px;line-height:1.43}.book-island{gap:12px;margin-top:17px}.book-island a{font-size:9px}.book-page h3{margin-bottom:18px}.book-controls{left:24px;right:24px}}
@media(max-width:620px){dialog.lore-book{top:50%;width:calc(100vw - 36px);height:min(720px,calc(100svh - 70px));max-height:none}.book-page{padding:26px 28px 70px}.book-prose{font-size:18px;line-height:1.46}.book-page h3{font-size:33px}.book-page.is-illustrated h3{font-size:27px}.book-controls{left:24px;right:24px;bottom:22px}.book-count{font-size:8px}.book-ribbon{left:auto;right:24px}.lore-book .relic-close{top:-12px;right:-7px}.book-pullquote{font-size:20px;padding-top:17px}.book-colophon{margin-top:16px}.book-plate figcaption{font-size:12px}.book-island{padding:10px 0;margin-top:17px}}
@media(max-height:550px){dialog.lore-book{height:calc(100svh - 40px);top:50%}.book-page{padding:18px 27px 60px}.book-page h3{font-size:26px;margin:8px 0 12px}.book-prose{font-size:16px;line-height:1.38}.book-prose p+p{margin-top:9px}.book-colophon{margin-top:12px;font-size:8px}.book-pullquote{font-size:18px;padding-top:12px}.book-island{margin:10px 0 0;padding:7px 0}.book-island>img{height:60px}.book-controls{bottom:15px}.book-plate figcaption{font-size:10px;gap:2px}.book-portrait{min-height:0}}

/* A personal field journal: stitched cover, irregular leaves and written ink. */
.lore-book{--journal-ink:#433f37;--journal-paper:#f5f1e7}
.lore-book .book-binding{padding:13px 13px 17px;border-radius:5px 12px 8px 4px;background:repeating-linear-gradient(19deg,#48443d 0 1px,#4c4840 1px 4px);box-shadow:0 3px #bdb6a6,0 6px #5c5548,3px 10px 0 #29271f,0 20px 36px #17140c30}
.book-binding:before{content:'';position:absolute;inset:6px;border:1px dashed #aaa18b77;border-radius:4px 8px 6px 3px;pointer-events:none}
.lore-book .book-pages{background:#716857;border-radius:0;clip-path:polygon(.4% .3%,8% .5%,15% 0,24% .5%,33% .2%,43% .6%,50% 0,58% .4%,67% .1%,75% .6%,86% .1%,95% .5%,99.5% .2%,99.8% 9%,99.5% 18%,100% 28%,99.7% 42%,100% 57%,99.5% 70%,99.8% 86%,99.4% 94%,100% 99.4%,91% 99.8%,82% 99.4%,71% 100%,62% 99.6%,50% 100%,39% 99.5%,27% 100%,18% 99.6%,9% 100%,.5% 99.3%,.2% 90%,.6% 79%,0 66%,.5% 53%,.2% 39%,.6% 26%,0 14%)}
.lore-book .book-page{border:0;border-radius:0;padding:29px 43px 67px;color:var(--journal-ink);background:radial-gradient(ellipse at 0 28%,#aaa08726,transparent 22%),radial-gradient(ellipse at 78% 96%,#a2917417,transparent 26%),linear-gradient(90deg,#e6dfcf 0%,var(--journal-paper) 5%,#f8f5ec 83%,#d7d0bf 99%,#736b5a)}
.lore-book .book-page+.book-page{background:radial-gradient(ellipse at 98% 4%,#ad9a7926,transparent 25%),linear-gradient(90deg,#736b5a,#d7d0bf 1%,#f8f5ec 17%,var(--journal-paper) 95%,#e6dfcf)}
.lore-book .book-page:before{inset:9px 11px;border:0;border-bottom:1px solid #b2a28633;border-right:1px solid #b2a28633;transform:rotate(.15deg);border-radius:0;opacity:.8}
.lore-book .book-page:after{content:'';position:absolute;right:3px;top:21%;width:9px;height:24px;border-left:1px solid #a7987c44;transform:rotate(19deg);pointer-events:none}
.lore-book .relic-kicker{font:15px/1.1 MarckScript,cursive;letter-spacing:.015em;text-transform:none;color:#8a7d67;transform:rotate(-1deg);margin:0 0 3px}
.lore-book .book-page h3{font:35px/1.08 MarckScript,cursive;font-weight:400;letter-spacing:0;margin:13px 0 20px;transform:rotate(-.7deg);text-wrap:balance;max-width:95%}
.lore-book .book-page h3:after{content:'';display:block;width:43%;height:4px;border-top:1px solid #76694d77;border-bottom:1px solid #76694d33;transform:rotate(-1deg);margin-top:7px;border-radius:50%}
.lore-book .book-prose,.lore-book .is-closing .book-prose{font:21px/1.24 MarckScript,cursive;letter-spacing:.005em;font-weight:400;max-width:none}
.lore-book .book-prose p+p{margin-top:12px}
.lore-book .book-page .book-prose p:first-child:first-letter{float:none;font:inherit;margin:0}
.lore-book .book-colophon{font:17px/1.2 MarckScript,cursive;letter-spacing:0;text-transform:none;border:0;margin:14px 0 0;padding:0;color:#82735b;transform:rotate(-2deg)}
.lore-book .is-closing .book-colophon{font:26px MarckScript,cursive;margin-top:30px;align-self:flex-end;transform:rotate(-5deg)}
.lore-book .book-folio{font:14px MarckScript,cursive;color:#8d806a;bottom:46px}
.lore-book .book-controls button span{font:19px MarckScript,cursive}.lore-book .book-controls button{color:#665c48}.lore-book .book-count{background:none;font:12px MarckScript,cursive;letter-spacing:.04em}.lore-book .book-ribbon{display:none}
.journal-binding{position:absolute;left:calc(50% - 20px);top:15%;bottom:15%;width:40px;display:flex;flex-direction:column;justify-content:space-between;z-index:7;pointer-events:none}
.journal-binding i{position:relative;width:40px;height:15px;border:3px solid #847a65;border-top-color:#c1b9a4;border-bottom-color:#4e483b;border-radius:50%;box-shadow:0 2px 2px #211d1655,0 -1px 1px #fff6;transform:rotate(-8deg)}
.journal-binding i:before,.journal-binding i:after{content:'';position:absolute;top:1px;width:6px;height:7px;background:#363025;border-radius:50%;box-shadow:0 0 0 2px #afa58d77;z-index:-1}.journal-binding i:before{left:-3px}.journal-binding i:after{right:-3px}
.lore-book .book-island{border:0;padding:0;gap:0;display:flex;flex-direction:column;align-items:stretch;margin:14px 0 0;min-height:0;flex:1}
.journal-map .map-drawing{display:block;min-height:100px;flex:1;max-height:230px}.island-sketch{width:100%;height:100%;overflow:visible}
.journal-map .map-caption{display:grid;grid-template-columns:1fr;gap:0;position:relative;transform:rotate(-1.5deg)}
.journal-map .map-caption strong{font:25px MarckScript,cursive}.journal-map .map-caption span{font:16px MarckScript,cursive}.journal-map .map-caption a{font:12px/1.4 MarckScript,cursive;text-decoration:none;margin-top:3px}.journal-map .map-caption a:hover{text-decoration:underline}.journal-map .map-caption .map-source{font-size:11px;color:#887b67}
.lore-book .book-plate figcaption{position:relative;gap:7px;padding-top:6px;font:18px/1.15 MarckScript,cursive;transform:rotate(-1.5deg);color:#736449}
.book-plate figcaption span{position:relative;padding-left:23px}.book-plate figcaption span:before{content:'↳';position:absolute;left:1px;top:-2px;transform:rotate(-20deg)}
.lore-book .is-illustrated h3{font:30px/1.1 MarckScript,cursive;margin-bottom:8px}.lore-book .is-illustrated h3:after{display:none}
.journal-doodles{display:flex;align-items:center;justify-content:center;min-height:58px;max-height:135px;flex:1;margin:17px -11px 0;transform:rotate(-2deg)}
.journal-doodles img{width:100%;height:100%;max-height:135px;object-fit:contain;mix-blend-mode:multiply}
.lore-book .is-continuation h3{font-size:27px;margin:8px 0 13px}
@media(max-width:800px){.lore-book .book-page{padding:25px 31px 67px}.lore-book .book-prose,.lore-book .is-closing .book-prose{font-size:20px;line-height:1.23}.lore-book .book-page h3{font-size:32px}}
@media(max-width:620px){.journal-binding{left:4px;width:25px}.journal-binding i{width:25px;height:12px;border-width:2px}.lore-book .book-page{padding:25px 30px 67px}.lore-book .book-prose,.lore-book .is-closing .book-prose{font-size:21px;line-height:1.25}.lore-book .book-page h3{font-size:32px}.lore-book .relic-kicker{font-size:14px}.journal-map .map-drawing{max-height:185px}.lore-book .book-plate figcaption{font-size:16px}.journal-doodles{max-height:100px;min-height:52px}.lore-book .book-folio{bottom:49px}}
@media(max-height:550px){.lore-book .book-page{padding:18px 30px 57px}.lore-book .book-page h3{font-size:26px;margin:8px 0 13px}.lore-book .book-prose,.lore-book .is-closing .book-prose{font-size:18px;line-height:1.2}.lore-book .book-prose p+p{margin-top:9px}.journal-map .map-drawing{min-height:100px;max-height:130px}.journal-map .map-caption span{font-size:13px}.journal-map .map-caption strong{font-size:20px}.journal-map .map-caption a{font-size:10px}.journal-doodles{min-height:40px;max-height:80px;margin-top:9px}.lore-book .book-plate figcaption{font-size:15px;gap:4px}.lore-book .relic-kicker{font-size:12px}}
@media(min-width:621px) and (min-height:551px){dialog.lore-book{height:min(760px,calc(100svh - 70px));width:min(1040px,calc(100vw - 64px))}.journal-map .map-drawing{max-height:180px;min-height:100px}}
@media(min-width:621px){.lore-book .has-doodles .book-prose{font-size:20px;line-height:1.23}.has-doodles .journal-doodles{max-height:92px;min-height:44px}.has-doodles .journal-doodles img{max-height:92px}}
.journal-doodles{mix-blend-mode:multiply}
.lore-book .is-illustrated .book-content{padding-bottom:10px}
.lore-book .journal-map{padding-bottom:8px}

/* The same graphite world as the scenes: drawn book, blackletter, written notes. */
@font-face{font-family:Caveat;src:url('assets/caveat.ttf') format('truetype');font-weight:400 700;font-display:swap}
.lore-book{--journal-ink:#292929;--journal-paper:#fff}
.lore-book .book-binding{padding:5% 4.5% 5.5%;background:url('assets/lore-book/book-pencil-v5-trnsprnt.png') center/100% 100% no-repeat;border:0;border-radius:0;box-shadow:none}
.lore-book .book-binding:before,.lore-book .book-page:before,.lore-book .book-page:after,.lore-book .journal-binding{display:none}
.lore-book .book-pages{background:none;box-shadow:none;clip-path:none;overflow:visible}
.lore-book .book-page,.lore-book .book-page+.book-page{background:none;padding:16px 32px 48px;border:0;overflow:hidden}
.lore-book .book-page .book-content{padding-bottom:3px}
.lore-book .book-page h3,.lore-book .is-illustrated h3{font:36px/1.08 Pirata,Georgia,serif;color:#222;transform:none;letter-spacing:.005em;margin:12px 0 18px;max-width:none;text-wrap:balance}
.lore-book .book-page h3:after{display:none}
.lore-book .relic-kicker{font:14px/1.15 Caveat,cursive;color:#626262;transform:none;letter-spacing:.06em}
.lore-book .book-prose,.lore-book .is-closing .book-prose,.lore-book .has-doodles .book-prose{font:23px/1.23 Caveat,cursive;font-weight:400;letter-spacing:0;color:#303030;text-wrap:pretty}
.lore-book .book-prose p+p{margin-top:12px}
.lore-book .book-colophon,.lore-book .book-folio,.lore-book .book-count,.lore-book .book-controls button span{font-family:Caveat,cursive;color:#555}
.lore-book .book-controls{left:7%;right:7%;bottom:6.2%}
.lore-book .book-controls button span{font-size:20px}
.lore-book .book-count{font-size:14px}
.lore-book .book-folio{bottom:34px;font-size:13px}
.lore-book .relic-close{top:1%;right:0;background:#fff;border-color:#555;box-shadow:2px 1px 0 #7776}
.lore-book .book-turn-face{background:#fcfcfa!important;box-shadow:inset -7px 0 12px #7772,0 0 12px #2222}
.lore-book .book-turn-face:after{display:block;background:repeating-linear-gradient(0deg,transparent 0 27px,#44400008 27px 28px)}
.lore-book .journal-map{margin-top:9px;padding-bottom:8px;mix-blend-mode:multiply}
.lore-book .journal-map .map-drawing{max-height:205px;min-height:105px}
.island-sketch{object-fit:contain;mix-blend-mode:multiply}
.journal-map .map-caption{transform:none;grid-template-columns:1fr auto;align-items:center;column-gap:8px}
.journal-map .map-caption strong{font:24px Pirata,serif;color:#333}
.journal-map .map-caption span{font:16px Caveat,cursive;color:#555;grid-column:1}
.journal-map .map-caption a{font:12px Caveat,cursive;color:#666;grid-column:2;grid-row:1}
.journal-map .map-caption .map-source{font:11px Caveat,cursive;grid-row:2}
.lore-book .book-plate{mix-blend-mode:multiply}
.lore-book .book-plate figcaption{font:18px/1.1 Caveat,cursive;color:#444;transform:none;display:grid;grid-template-columns:1fr 1fr;gap:7px 15px;padding-top:8px}
.lore-book .book-plate figcaption span{padding-left:0}.lore-book .book-plate figcaption span:before{display:none}
.journal-portrait{flex:1;min-height:85px;max-height:230px;margin:10px 0 0;display:flex;justify-content:center;mix-blend-mode:multiply}
.journal-portrait img{width:100%;height:100%;min-height:0;object-fit:contain}
.journal-portrait.is-crest{max-height:130px;min-height:90px}
.lore-book .is-closing .book-colophon{font:25px Caveat,cursive;margin-top:5px}
.lore-book .journal-doodles{margin-top:8px}
@media(max-width:800px){.lore-book .book-page,.lore-book .book-page+.book-page{padding:13px 23px 48px}.lore-book .book-prose,.lore-book .is-closing .book-prose,.lore-book .has-doodles .book-prose{font-size:21px}.lore-book .book-page h3{font-size:31px}}
@media(max-width:620px){.lore-book .book-binding{background-size:200% 100%;background-position:left center;padding:8% 8% 10% 5%}.lore-book .book-page,.lore-book .book-page+.book-page{padding:12px 17px 55px}.lore-book .book-prose,.lore-book .is-closing .book-prose,.lore-book .has-doodles .book-prose{font-size:22px}.lore-book .book-controls{bottom:6.5%;left:8%;right:11%}.lore-book .book-page h3{font-size:31px}.lore-book .journal-map .map-drawing{max-height:170px}.journal-map .map-caption{display:flex;flex-direction:column;align-items:flex-start;gap:0}.lore-book .book-plate figcaption{font-size:16px}.journal-portrait{max-height:180px}.journal-portrait.is-crest{max-height:110px}.lore-book .book-folio{bottom:40px}}
@media(max-height:550px){.lore-book .book-page,.lore-book .book-page+.book-page{padding:8px 20px 45px}.lore-book .book-page h3{font-size:26px;margin:6px 0 10px}.lore-book .book-prose,.lore-book .is-closing .book-prose,.lore-book .has-doodles .book-prose{font-size:19px;line-height:1.2}.lore-book .book-prose p+p{margin-top:8px}.lore-book .journal-map .map-drawing{max-height:120px;min-height:80px}.journal-portrait{min-height:70px;max-height:125px}.journal-portrait.is-crest{max-height:90px;min-height:65px}.lore-book .book-controls{bottom:5%}}
/* Trim the asset's exterior margin while retaining the drawn leather edge. */
.lore-book .book-binding{clip-path:none}
.lore-book .book-prose,.lore-book .is-closing .book-prose,.lore-book .has-doodles .book-prose{font-size:22px}
.lore-book .journal-doodles,.lore-book .is-closing .book-colophon{transform:none}
@media(max-height:550px){.lore-book .book-prose,.lore-book .is-closing .book-prose,.lore-book .has-doodles .book-prose{font-size:19px}}

/* Keep type inside the clear paper, away from the illustrated edges and cords. */
.lore-book .book-page,.lore-book .book-page+.book-page{padding:25px 58px 79px}
.lore-book .book-page h3,.lore-book .is-illustrated h3{text-align:center;margin:13px 0 22px}
.lore-book .book-page .relic-kicker{text-align:center}
.lore-book .book-controls{left:0;right:0;bottom:9.5%;display:grid;grid-template-columns:1fr 1fr;align-items:center;justify-items:center}
.lore-book .book-controls button{min-height:40px;padding:3px 14px}
.lore-book .book-next{grid-column:2}.lore-book .book-prev{grid-column:1}
.lore-book .book-count{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}
.lore-book .book-folio{bottom:21px}
.lore-book .journal-doodles{margin-left:0;margin-right:0}
.journal-map .map-caption{display:flex;flex-direction:column;align-items:flex-start;gap:1px}
.lore-book .journal-map .map-drawing{max-height:180px;min-height:90px}
@media(max-width:800px){.lore-book .book-page,.lore-book .book-page+.book-page{padding:22px 40px 76px}}
@media(max-width:620px){.lore-book .book-binding{padding-left:9%;padding-right:9%}.lore-book .book-page,.lore-book .book-page+.book-page{padding:21px 23px 85px}.lore-book .book-controls{left:16%;right:15%;bottom:10%}.lore-book .book-folio{bottom:18px}.lore-book .book-controls button{padding:3px 5px;min-width:80px}.lore-book .book-page h3{margin-bottom:17px}.lore-book .journal-map .map-drawing{max-height:145px;min-height:75px}}
@media(max-height:550px){.lore-book .book-page,.lore-book .book-page+.book-page{padding:14px 40px 65px}.lore-book .book-page h3{margin:7px 0 12px}.lore-book .book-controls{bottom:8%}.lore-book .book-folio{bottom:15px}}
.lore-book .book-folio{bottom:50px}
@media(max-width:620px){.lore-book .book-folio{bottom:49px}}
@media(max-height:550px){.lore-book .book-folio{bottom:43px}}
@media(min-width:801px) and (min-height:551px){
 .lore-book .book-prose,.lore-book .is-closing .book-prose,.lore-book .has-doodles .book-prose{font-size:21px}
 .lore-book .book-page h3,.lore-book .is-illustrated h3{font-size:34px;margin:11px 0 19px}
 .lore-book .journal-portrait.is-crest{min-height:65px}
}

/* Selected pairing: outlined Pirata, IM Fell English writing, Zeyada notes. */
@font-face{font-family:LoreIMFell;src:url('assets/im-fell-english.ttf') format('truetype');font-weight:400;font-display:swap}
@font-face{font-family:LoreZeyada;src:url('font-study/fonts/Zeyada.ttf') format('truetype');font-weight:400;font-display:swap}
.lore-book .book-page h3,.lore-book .is-illustrated h3{font:400 38px/1.08 Pirata,Georgia,serif;letter-spacing:0;color:#292929;text-align:center}
@supports(-webkit-text-stroke:1px black){.lore-book .book-page h3,.lore-book .is-illustrated h3{color:transparent;-webkit-text-stroke:1.2px #292929}}
.lore-book .book-prose,.lore-book .is-closing .book-prose,.lore-book .has-doodles .book-prose{font:400 19px/1.45 LoreIMFell,Georgia,serif;letter-spacing:0;color:#3d3d3d;text-align:center;width:92%;max-width:32ch;margin-inline:auto}
.lore-book .book-plate figcaption,.lore-book .book-colophon,.lore-book .is-closing .book-colophon,.lore-book .journal-map .map-caption span{font:400 29px/1.1 LoreZeyada,cursive;letter-spacing:0}
.lore-book .relic-kicker,.lore-book .book-page .relic-kicker{font-family:LoreZeyada,cursive;font-size:20px;letter-spacing:.03em}
.lore-book .journal-map .map-caption a{font-family:LoreZeyada,cursive;font-size:20px;line-height:1.15}
.lore-book .journal-map .map-caption .map-source{font-size:19px}
@media(max-height:550px){.lore-book .book-page h3,.lore-book .is-illustrated h3{font-size:30px}.lore-book .book-prose,.lore-book .is-closing .book-prose,.lore-book .has-doodles .book-prose{font-size:18px}.lore-book .book-plate figcaption,.lore-book .book-colophon,.lore-book .journal-map .map-caption span{font-size:24px}}

/* Let the map yield space to the flowing script before splitting origins. */
.lore-book .journal-map .map-drawing{min-height:60px}

.lore-book .is-illustrated .book-content{padding-bottom:0}

.lore-book .book-plate figcaption{padding-bottom:9px}

/* Prevent old/new writing showing through the same illustrated sheet. */
.lore-book .book-page.book-turn-covered > *{visibility:hidden}

/* Smaller writing leaves the sketches room to tell the story. */
.lore-book .book-prose,.lore-book .is-closing .book-prose,.lore-book .has-doodles .book-prose{font-size:17px;line-height:1.4;width:96%;max-width:36ch}
.lore-book .journal-map .map-drawing{max-height:280px;min-height:125px}
.lore-book .journal-map .map-caption{align-items:center;text-align:center;gap:0}
.lore-book .journal-map .map-caption strong{font-size:19px}
.lore-book .journal-map .map-caption span{font-size:18px;line-height:1.05}
.lore-book .journal-map .map-caption .map-estimate{font:11px/1.3 LoreIMFell,Georgia,serif;margin-top:3px}
.lore-book .book-plate figcaption{grid-template-columns:1fr;text-align:center;font-size:18px;line-height:1.1;gap:2px;padding-top:4px;padding-bottom:0}
.lore-book .is-illustrated h3{font-size:30px;margin:8px 0 9px}
.lore-book .is-illustrated .relic-kicker{font-size:16px}
.lore-book .journal-portrait.is-crest{min-height:165px;max-height:300px}
.lore-book .journal-doodles{margin-top:auto;padding-top:15px;flex:0 1 105px;max-height:120px;min-height:70px}
.lore-book .is-continuation .book-content{padding-top:8px}
.lore-book .is-closing .journal-portrait{min-height:140px;max-height:290px}
.lore-book .is-closing .book-colophon{align-self:center;margin-top:8px}
.ethos-crest{display:block;width:92%;height:auto;margin:0 auto 14px;mix-blend-mode:multiply}
.ethos-divider{display:flex;align-items:center;justify-content:center;gap:12px;color:#625f56;margin:6px 0 15px}
.ethos-divider:before,.ethos-divider:after{content:'';width:38px;border-top:1px solid #625f56}
@media(max-height:550px){.lore-book .book-prose,.lore-book .is-closing .book-prose,.lore-book .has-doodles .book-prose{font-size:16px}.lore-book .journal-map .map-drawing{min-height:95px}.lore-book .journal-portrait.is-crest{min-height:110px}.lore-book .is-closing .journal-portrait{min-height:100px}.lore-book .book-plate figcaption{font-size:16px}}
.lore-book .has-map h3{font-size:30px;margin:10px 0 15px;white-space:nowrap}
.lore-book .has-map .book-prose{width:100%;max-width:none}
.lore-book .has-map .journal-map{margin-top:5px}
@media(max-width:800px){.lore-book .has-map h3{font-size:26px;white-space:normal}}
/* Reserve the handwritten descenders on the compact geography plate. */
.lore-book .book-plate figcaption{padding-bottom:8px}

/* Carry the journal's handwritten annotations into the main menu subtitles. */
.game-dock .dock-command .dock-label>span{font-family:LoreZeyada,cursive;font-size:20px;font-weight:400;line-height:18px}
@media(max-width:700px){.game-dock .dock-command .dock-label>span{font-size:18px;line-height:16px}}

/* The drawings lead these plates; annotations remain small margin notes. */
.lore-book .journal-map .map-drawing{max-height:340px}
.lore-book .book-plate figcaption{font-size:15px;line-height:1.05;gap:1px;padding-top:2px}
.lore-book .is-illustrated h3{font-size:26px;margin:5px 0 4px}
.lore-book .is-illustrated .relic-kicker{font-size:14px}
.lore-book .closing-art{display:flex;flex-direction:column;flex:1;min-height:300px;max-height:460px;gap:16px;margin-top:8px}
.lore-book .closing-art .journal-portrait{flex:1;min-height:0;max-height:none;margin:0}
@media(max-height:550px){.lore-book .closing-art{min-height:180px;gap:10px}}

/* Read slowly, or take over with the wheel, touch, keyboard, or this control. */
.scroll-reading:focus-visible{outline:1px dashed #777;outline-offset:3px}

/* Text dissolves at the reading aperture; the parchment itself stays intact. */
.ethos-scroll .scroll-reading{scrollbar-width:none;scrollbar-gutter:auto;padding:20px 5px 25px;
 -webkit-mask-image:linear-gradient(to bottom,transparent,#000 23px,#000 calc(100% - 25px),transparent);
 mask-image:linear-gradient(to bottom,transparent,#000 23px,#000 calc(100% - 25px),transparent)}
.ethos-scroll .scroll-reading::-webkit-scrollbar{display:none;width:0;height:0}
.ethos-scroll .scroll-reading:focus-visible{outline:none}
.ethos-scroll:focus-within .relic-scroll-art{filter:drop-shadow(0 0 1px #625f56)}

/* Illustrated ancient parchment, in the same graphite hand as the lore book. */
dialog.ethos-scroll{width:min(580px,calc(100vw - 26px));height:min(677px,calc(100svh - 215px));filter:drop-shadow(0 14px 14px #11182745)}
.ethos-scroll .illustrated-scroll{object-fit:fill;opacity:1;
 -webkit-mask:url('assets/lore-book/ethos-scroll-silhouette-v1.svg') center/100% 100% no-repeat;
 mask:url('assets/lore-book/ethos-scroll-silhouette-v1.svg') center/100% 100% no-repeat}
.ethos-scroll .scroll-reading{inset:15% 15% 15%}
.ethos-scroll .relic-close{right:9%;top:13%}
.ethos-scroll:focus-within .relic-scroll-art{filter:none}
@media(max-width:620px){dialog.ethos-scroll{width:calc(100vw - 22px);height:min(630px,calc(100svh - 220px))}.ethos-scroll .scroll-reading{inset:15% 14% 15%}}

/* Turn the illustrated leaf itself; never substitute a rectangular card. */
.lore-book .book-binding{--book-paper:url('assets/lore-book/book-pencil-v5-trnsprnt.png'),url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1000 750' preserveAspectRatio='none'%3E%3Cpath fill='white' d='M70 40Q240 25 480 40L500 50 520 40Q780 25 930 40L960 100 964 635 935 700Q750 716 520 700L500 693 480 700Q240 716 65 700L36 645 38 100Z'/%3E%3C/svg%3E");background-image:var(--book-paper);perspective:1800px}
.book-flip-leaf{position:absolute;inset:0 0 0 50%;z-index:6;transform-origin:left center;transform-style:preserve-3d;pointer-events:none;will-change:transform}
.book-flip-leaf.is-previous{inset:0 50% 0 0;transform-origin:right center}
.book-flip-face{position:absolute;inset:0;backface-visibility:hidden;-webkit-backface-visibility:hidden;background-image:var(--book-paper);background-size:200% 100%;background-repeat:no-repeat}
.book-flip-face.is-back{transform:rotateY(180deg)}
.book-flip-face .book-page{margin:0;max-width:none}
.lore-book[data-turning] .book-controls{pointer-events:none}
.lore-book[data-turning] .book-controls button{pointer-events:none}
.book-flip-leaf.is-single{inset:0;transform-origin:left center}
.book-flip-leaf.is-single.is-previous{transform-origin:right center}

/* A single loose journal leaf for phones: readable at native size, with no flip. */
.lore-book.mobile-reader{width:calc(100vw - 14px)!important;height:calc(100dvh - 18px)!important;max-width:540px;max-height:none;filter:drop-shadow(0 5px 9px #0002);padding:0;overflow:visible}
.lore-book.mobile-reader .book-binding{inset:0;padding:55px 18px 72px;border:10px solid transparent;border-image:url('assets/game-panel.svg') 18 fill / 10px / 0 stretch;background:none;perspective:none;transform:none;box-shadow:none}
.lore-book.mobile-reader .book-binding::before,.lore-book.mobile-reader .book-ribbon,.lore-book.mobile-reader .journal-binding,.lore-book.mobile-reader .book-folio{display:none}
.lore-book.mobile-reader .book-pages{display:block;height:100%;overflow-y:auto;overflow-x:hidden;overscroll-behavior:contain;scrollbar-width:none;scroll-behavior:auto;clip-path:none;background:repeating-linear-gradient(to bottom,transparent 0 25px,#5555550b 25px 26px);box-shadow:none}
.lore-book.mobile-reader .book-pages::-webkit-scrollbar{display:none}
.lore-book.mobile-reader .book-page{display:block;width:100%;height:auto;min-height:100%;padding:0 3px 12px;overflow:visible;background:none}
.lore-book.mobile-reader .book-content{display:flex;flex-direction:column;min-height:100%;height:auto;overflow:visible;padding:0}
.lore-book.mobile-reader .book-page h3{font-size:32px;line-height:1.1;margin:7px 0 18px;white-space:normal}
.lore-book.mobile-reader .book-page .relic-kicker{text-align:center;font-size:22px;margin:0}
.lore-book.mobile-reader .book-prose{font-size:18px;line-height:1.48;width:100%;max-width:34ch}
.lore-book.mobile-reader .book-prose p+p{margin-top:15px}
.lore-book.mobile-reader .journal-map{margin:14px 0 0;flex:none}
.lore-book.mobile-reader .journal-map .map-drawing{height:220px;min-height:0;max-height:none}
.lore-book.mobile-reader .map-caption{display:flex;align-items:center;flex-direction:column}
.lore-book.mobile-reader .book-plate{display:flex;flex-direction:column;margin:0;flex:none;min-height:0}
.lore-book.mobile-reader .book-plate img{width:100%;height:370px;max-height:52dvh;object-fit:contain;flex:none}
.lore-book.mobile-reader .book-plate figcaption{font-size:21px;line-height:1.16;gap:3px;flex:none;padding:10px 0}
.lore-book.mobile-reader .journal-doodles{height:110px;flex:none;min-height:0;max-height:none;margin-top:18px}
.lore-book.mobile-reader .journal-portrait{height:240px;min-height:0;max-height:none;flex:none;margin:18px 0 0}
.lore-book.mobile-reader .closing-art{display:flex;flex-direction:column;align-items:center;flex:none;min-height:0;margin-top:18px}
.lore-book.mobile-reader .closing-art .journal-portrait{width:100%;height:220px;margin:0}
.lore-book.mobile-reader .closing-art .is-crest{height:160px}
.lore-book.mobile-reader .book-colophon{font-size:32px;margin:10px auto 0}
.lore-book.mobile-reader .book-controls{left:20px;right:20px;bottom:17px;height:44px;display:flex;align-items:center;justify-content:space-between;background:#fff;z-index:3}
.lore-book.mobile-reader .book-controls button{height:44px;min-width:88px;padding:4px 7px;font-size:24px}
.lore-book.mobile-reader .book-controls button span{font:23px LoreZeyada,cursive}
.lore-book.mobile-reader .book-count{font:12px monospace;letter-spacing:.08em}
.lore-book.mobile-reader .relic-close{top:10px;right:12px;min-width:44px;min-height:44px;z-index:4}
.lore-book.mobile-reader .book-count{position:static;width:auto;height:auto;overflow:visible;clip-path:none;flex:none}
.lore-book.mobile-reader .journal-map .map-drawing{height:200px}

/* Native-size single sheets paginate prose instead of hiding it below the fold. */
.lore-book.mobile-reader .book-pages{overflow-y:auto}
.lore-book.mobile-reader .book-measure .book-page{min-height:0;height:auto}
.lore-book.mobile-reader .book-content{min-height:0}
.lore-book.mobile-reader .book-plate img{height:370px;max-height:calc(var(--reader-space,450px) - 140px)}
.lore-book.mobile-reader .journal-map .map-drawing{height:200px;max-height:calc(var(--reader-space,450px) - 105px)}
.lore-book.mobile-reader .journal-portrait{max-height:calc(var(--reader-space,450px) - 55px)}
.lore-book.mobile-reader .closing-art{margin-top:0;max-height:none}
.lore-book.mobile-reader .closing-art .journal-portrait{flex:none}
.lore-book.mobile-reader .closing-art .is-crest{height:calc((var(--reader-space,450px) - 64px)*.38)}
.lore-book.mobile-reader .closing-art .journal-portrait:not(.is-crest){height:calc((var(--reader-space,450px) - 64px)*.62)}

/* The final facing plates fill their individual pages, with a single sign-off. */
.lore-book:not(.mobile-reader) .book-page.is-final-plate{padding:22px 26px 79px}
.lore-book:not(.mobile-reader) .is-final-plate .book-content{padding-top:0}
.lore-book:not(.mobile-reader) .is-final-plate .closing-art{flex:1;min-height:0;max-height:none;margin:0}
.lore-book:not(.mobile-reader) .is-final-plate .journal-portrait{flex:1;min-height:0;max-height:none;margin:0;width:100%}
.lore-book:not(.mobile-reader) .is-final-plate .book-colophon{flex:none;margin:8px 0 0;text-align:center}

.lore-book .closing-art .is-crest{position:relative}
.lore-book .crest-motion{position:absolute;inset:0;width:100%;height:100%;object-fit:contain;opacity:0;pointer-events:none}
.lore-book .crest-motion.is-playing{opacity:1}
.lore-book .is-crest:has(.crest-motion.is-playing)>img{opacity:0}
.lore-book:not(.mobile-reader) .is-final-plate>.book-content>.journal-portrait{overflow:hidden}
.lore-book:not(.mobile-reader) .is-final-plate>.book-content>.journal-portrait img{object-fit:contain;transform:scale(1.3);transform-origin:50% 50%}

/* Keep the pensive figure's feet and sword inside the paper. */
.lore-book:not(.mobile-reader) .is-final-plate>.book-content>.journal-portrait.is-meditating img{transform:none}
.lore-book .journal-portrait.is-meditating{position:relative;overflow:hidden}
.lore-book .pensive-motion{position:absolute;inset:0;width:100%;height:100%;object-fit:contain;opacity:0;pointer-events:none}
.lore-book .pensive-motion.is-playing{opacity:1}
.lore-book .is-meditating:has(.pensive-motion.is-playing)>img{opacity:0}

/* A single thin sheet lifts; the illustrated cover, binding and stack stay put. */
.book-flip-face{background-image:none}
.book-flip-face::before{content:"";position:absolute;inset:0;background-image:var(--book-paper);background-size:200% 100%;background-position:right center;background-repeat:no-repeat;clip-path:polygon(0 6%,9% 3%,72% 3%,83% 4%,86% 7%,87% 28%,86% 49%,88% 72%,85% 91%,81% 95%,27% 95%,4% 94%,0 91%)}
.book-flip-face[data-side="left"]::before{background-position:left center;clip-path:polygon(100% 6%,91% 3%,28% 3%,17% 4%,14% 7%,13% 28%,14% 49%,12% 72%,15% 91%,19% 95%,73% 95%,96% 94%,100% 91%)}
.book-flip-face::after{content:"";position:absolute;top:6%;bottom:7%;left:0;width:12%;background:linear-gradient(90deg,#28282820,transparent);pointer-events:none}
.book-flip-face[data-side="left"]::after{left:auto;right:0;transform:scaleX(-1)}
/* A filter on the turning parent flattens its 3D faces in WebKit/Chrome. */
.book-flip-leaf{filter:none}
.book-flip-face::before{filter:drop-shadow(0 3px 3px #2223)}
.lore-book .journal-portrait:has(.crest-motion),.lore-book .journal-portrait.is-meditating{mix-blend-mode:normal}
.lore-book .journal-portrait:has(.crest-motion)>img,.lore-book .journal-portrait.is-meditating>img,.lore-book .crest-motion,.lore-book .pensive-motion{filter:url(#lore-paper-ink)}
