:root {
  color-scheme: light;
  --ink: #273a32; --muted: #535e53; --red: #963e2d; --dark: #30443a; --gold: #a59570;
  --paper: #f7f4e9; --fine: #c8c5b2; --silk: #e6e5d8;
  --hand: "Scroll Hand", "Kaiti SC", KaiTi, STKaiti, cursive;
  --display: var(--hand);
  --kai: var(--display);
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { background:var(--silk) url("assets/paper.png"); color:var(--ink); font:400 16px/1.6 var(--hand); font-synthesis:none; display:flex; flex-direction:column; height:100vh; height:100dvh; overflow:hidden; }
button { font: inherit; color: inherit; border: 0; padding: 0; background: transparent; cursor: pointer; -webkit-tap-highlight-color: transparent; }
button:focus-visible, [tabindex]:focus-visible { outline: 2px solid #b95132; outline-offset: 3px; }
[hidden] { display: none !important; }
h1,h2,h3,p { margin: 0; }
.icon { width: 19px; height: 19px; display: inline-block; flex: none; vertical-align: middle; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.paper, .folio { background-color: var(--paper); background-image: url("assets/paper.png"); }
.mast { position:relative; isolation:isolate; flex:none; height:70px; display:grid; grid-template-columns:1fr auto 1fr; align-items:center; gap:20px; padding:0 clamp(20px,2.55vw,46px); color:var(--ink); background:#f5f3e8 url("assets/paper.png"); border-bottom:1px solid #9ba596; z-index:6; }
.mast::before { content:""; position:absolute; inset:0 0 1px; z-index:-1; pointer-events:none; background:url("assets/mast-ridges.webp") center bottom / 100% 100% no-repeat; opacity:.62; }
.brand, .mast-actions, .nav-tab, .mast-tool, .main-nav, .folio>span, .tool-group, .map-controls button, .kicker, .journal-foot, .spec-line, .back-link, .button-ink, .button-paper, .goal-head, .clue-actions { display: flex; align-items: center; }
.brand { gap:11px; white-space:nowrap; }
.brand-seal { display:grid; align-content:center; justify-content:center; writing-mode:vertical-rl; text-orientation:upright; height:36px; width:23px; font:650 13px/1 var(--hand); letter-spacing:-.08em; background:#9c4835 url("assets/paper.png"); color:#fff4dc; outline:1px solid #edd8ba; outline-offset:-3px; border-radius:2px 1px 3px 2px; transform:rotate(-3deg); }
.brand h1 { font:400 39px/1.05 var(--display); letter-spacing:.035em; color:#20382f; }
.edition { margin-left:4px; padding-left:12px; border-left:1px solid #aaa993; color:#4c5d50; font:400 14px/1.25 var(--hand); letter-spacing:.08em; }
.main-nav { align-self:stretch; align-items:center; gap:12px; }
.nav-tab { position:relative; isolation:isolate; justify-content:center; gap:7px; height:44px; color:#384c3e; padding:0 19px; font:400 18px/1.3 var(--display); letter-spacing:.035em; }
.nav-tab .icon { width:18px; height:18px; }
.nav-tab:hover,.mast-tool:hover { color:var(--red); }
.nav-tab.current,.nav-tab[aria-expanded="true"] { color:#fff6e1; }
.nav-tab.current::before,.nav-tab[aria-expanded="true"]::before { content:""; position:absolute; z-index:-1; inset:1px -2px; background:url("assets/brush-ink.webp") center/100% 100% no-repeat; }
.mast-actions { justify-self:end; gap:14px; }
.mast-tool { gap:6px; color:#485546; min-height:42px; min-width:36px; justify-content:center; font:400 14px/1.4 var(--hand); }
.mast-tool .icon { width:16px; height:16px; }
.mast-tool[aria-pressed="true"] { color:var(--red); }
.layout { flex:1; min-height:0; display:grid; grid-template-columns:minmax(0,1fr) clamp(292px,24vw,378px); gap:clamp(12px,1.1vw,20px); padding:clamp(9px,1vw,17px) clamp(12px,1.35vw,24px) 0; }
#artboard { position:relative; isolation:isolate; min-width:0; min-height:0; background:#998f6e; overflow:hidden; box-shadow:0 0 0 1px #6e7a69,0 0 0 4px #f4f1e3,0 0 0 5px #a9ad98; }
#artboard::before { content:""; position:absolute; inset:0; z-index:3; pointer-events:none; border:3px double #e8d9b2c9; box-shadow:inset 0 0 0 2px #4b513937; }
#painting { position: absolute; inset: 0; outline-offset: -3px; cursor: grab; touch-action: none; }
#painting:active { cursor: grabbing; }
#painting canvas { display: block; }
#evening,.dusk-wash,.window-lights { position:absolute; inset:0; pointer-events:none; }
#evening { overflow:hidden; }
.dusk-wash { background:linear-gradient(151deg,#e0bb94,#a89999 39%,#617984 90%); mix-blend-mode:multiply; opacity:var(--dusk,0); transition:opacity 1.25s; }
.window-lights { mix-blend-mode:screen; }
.window-lights i { position:absolute; border-radius:50%; }
.return-light { background:radial-gradient(ellipse closest-side,#ffeaa9e8 0%,#ffc15ecf 18%,#f5a54366 38%,#f6ab4f19 71%,transparent); }
.hearth-light { background:radial-gradient(ellipse closest-side,#ffddb293,#f7ab575f 32%,#eaa35519 65%,transparent); }
.map-vignette { position:absolute; inset:0; pointer-events:none; box-shadow:inset 0 0 18px #3b342424; background:linear-gradient(0deg,#30372929,transparent 12%); }
.cartouche { position:absolute; pointer-events:none; top:19px; left:19px; color:#293d30; background:#f5f0dd url("assets/paper.png"); border:1px solid #7a7961; box-shadow:1px 2px 6px #2d281b32; padding:10px 6px; min-width:46px; text-align:center; transition:opacity .3s,transform .3s; }
.cartouche::before { content: ""; position: absolute; inset: 3px; border: 1px solid #9c906a88; }
.cartouche>span { writing-mode: vertical-rl; font: 9px/1 var(--hand); letter-spacing: .12em; left: 9px; top: 14px; position: absolute; }
.cartouche h2 { writing-mode:vertical-rl; margin:3px 1px 7px 11px; font:400 clamp(25px,2.2vw,34px)/1.05 var(--display); letter-spacing:.035em; }
.cartouche b { display:inline-block; font:600 10px/1.35 var(--hand); letter-spacing:.05em; color:#fff3dc; background:var(--red); outline:1px solid #d6aa8f; outline-offset:-2px; padding:1px 3px; transform:rotate(-3deg); }
.cartouche.away { opacity: 0; transform: translateY(-5px); }
#arrival { position:absolute; top:20px; left:50%; transform:translate(-50%,-8px); text-align:center; background:#25352bf0; color:#fff2d7; box-shadow:0 2px 8px #1b251947; border-block:1px solid #c6ad7b; padding:6px 24px 9px; pointer-events:none; opacity:0; transition:opacity .24s,transform .32s; }
#arrival.show { opacity:1; transform:translate(-50%,0); }
#arrival span { display:block; font:550 12px/1.5 var(--hand); color:#f0dabe; letter-spacing:.14em; }
#arrival b { display:block; font:22px/1.3 var(--kai); letter-spacing:.19em; }
#sites,#sense-pins { position: absolute; inset: 0; pointer-events: none; }
.site-pin, .sense-pin { position: absolute; pointer-events: auto; transform: translate(-50%, -100%); white-space: nowrap; touch-action: manipulation; }
.site-pin { color:#2d4034; background:url("assets/paper-slip.webp") center/100% 100% no-repeat; filter:drop-shadow(0 1px 1px #25352c80); padding:6px 13px; display:flex; align-items:center; gap:6px; font:400 18px/1.22 var(--display); letter-spacing:.025em; }
.site-pin::after,.sense-pin::after { content:""; position:absolute; left:calc(50% - .5px); top:100%; width:1px; height:10px; background:#634d36; box-shadow:1px 0 #fff2cbaa; }
.site-pin::before { content:""; position:absolute; left:calc(50% - 2.5px); top:calc(100% + 8px); width:5px; height:5px; background:#a34c36; outline:1px solid #efe1bf; transform:rotate(45deg); }
.site-pin .icon { width:15px; height:15px; color:#7b5340; }
.site-pin:hover,.site-pin:focus-visible { color:#843826; filter:drop-shadow(0 1px 2px #26382cd9) brightness(1.05); }
.site-pin.beyond-left::before,.site-pin.beyond-right::before { top:calc(50% - 3px); width:5px; height:5px; border:solid #884b34; border-width:0 0 1px 1px; background:transparent; outline:0; }
.site-short { display:none; }
.site-pin.beyond-left::before { left:3px; transform:rotate(45deg); }
.site-pin.beyond-right::before { left:auto; right:3px; transform:rotate(225deg); }
.site-pin.beyond-left::after,.site-pin.beyond-right::after { display:none; }
#atlas-instruction { position:absolute; top:calc(50% + min(29vw,180px) + 24px); width:100%; text-align:center; color:#484b39; font:14px var(--kai); letter-spacing:.1em; pointer-events:none; }
.mounted .cartouche { left:50%; transform:translateX(-50%); top:clamp(18px,10%,78px); display:flex; align-items:center; gap:8px; padding:9px 13px; width:max-content; min-width:0; max-width:calc(100% - 28px); }
.mounted .cartouche h2 { writing-mode:horizontal-tb; margin:0; font-size:23px; }
.mounted .cartouche>span { display:none; }
.sense-pin { color:#f8efd8; background:#394d40f2; border:1px solid #cdc0a0; padding:3px 8px; font:500 14px/1.45 var(--hand); }
.sense-pin:hover,.sense-pin:focus-visible { background:#5c4c34; }
#hover-tip,#control-tip { pointer-events:none; background:#26392ff5; padding:4px 9px; color:#fff7e2; border:1px solid #bbab86; font:500 14px/1.4 var(--hand); }
#hover-tip { position:absolute; transform:translate(-50%,-100%); }
#control-tip { position:fixed; z-index:9; max-width:calc(100vw - 16px); text-align:center; }
#reticle { display: none; position: absolute; left: 50%; top: 50%; height: 18px; width: 18px; transform: translate(-50%,-50%); border-radius: 50%; border: 2px solid #fff2cb; box-shadow: 0 0 0 1px #3b4335, inset 0 0 0 1px #3b4335; pointer-events: none; }
#artboard.keyboard #reticle { display:block; }
.map-controls { position: absolute; left: 20px; right: 20px; bottom: 19px; display: flex; align-items: center; justify-content: space-between; gap: 8px; pointer-events: none; }
.map-controls>* { pointer-events: auto; }
.map-controls button { justify-content:center; gap:7px; white-space:nowrap; }
.map-controls button:disabled { opacity:.43; cursor:default; }
.tool-group, #map-location { height:43px; filter:drop-shadow(0 1px 2px #21322a66); }
.tool-group { color:#fff5df; background:url("assets/brush-ink.webp") center/100% 100% no-repeat; padding:0 13px; }
.tool-group button { height:100%; min-width:33px; }
.tool-group button:hover,.tool-group button[aria-pressed="true"] { background:#f1dfb91e; }
.tool-group #sense { padding:0 6px; font:500 14px/1.35 var(--hand); }
.tool-group .icon { width: 16px; height: 16px; }
.tool-group output { min-width:33px; font:500 14px/1.35 var(--hand); font-variant-numeric:tabular-nums; color:#f7ecd5; text-align:center; }
.tool-split { width: 1px; height: 15px; background:#d4d0b750; margin: 0 3px; }
#map-location { padding:0 14px; color:var(--ink); background:url("assets/paper-slip.webp") center/100% 100% no-repeat; font:600 14px/1.4 var(--hand); letter-spacing:.04em; }
#map-location:hover,#map-location[aria-expanded="true"] { color:var(--red); }
#map-location .icon:first-child { color:var(--red); width:17px; }
#map-location .icon:last-child { width:12px; }
.location-wrap { position: relative; }
#location-menu { position:absolute; bottom:calc(100% + 6px); left:0; min-width:146px; max-height:calc(100dvh - 164px); overflow-y:auto; overscroll-behavior:contain; padding:4px 7px; border:1px solid #a99c7c; box-shadow:0 3px 12px #20291e36; }
#location-menu button { justify-content:flex-start; width:100%; min-height:36px; padding:5px 9px; font:14px var(--hand); gap:9px; }
#location-menu button:first-child { border-bottom:1px solid var(--fine); }
#location-menu button .icon { color:#7b6c50; width:16px; }
#location-menu button:hover,#location-menu button[aria-current] { background:#d9d7c0; color:#354437; }
#mobile-ledger,.ledger-curtain { display:none; }
#ledger { --leaf-gutter:clamp(18px,1.5vw,28px); position:relative; min-height:0; min-width:0; isolation:isolate; z-index:3; border:1px solid #a4a892; padding-left:9px; background-color:var(--paper); box-shadow:2px 2px 0 #d9d7c5,3px 3px 0 #9ca48e; }
#ledger::before { content:""; position:absolute; left:0; top:0; bottom:0; width:9px; pointer-events:none;
  background:radial-gradient(ellipse 2px 2px at 6px 50%,#d9d2b7 49%,#374438 65%,transparent 90%) 0 0/100% 25%,
    linear-gradient(transparent calc(50% - 1px),#d1cbb1 50%,transparent calc(50% + 1px)) left top/6px 25% repeat-y,
    linear-gradient(90deg,#45564a 0 55%,#9a9b82 56% 65%,#5e705f 72%); }
#ledger-scroll { height:100%; overflow-y:auto; overscroll-behavior:contain; scrollbar-width:thin; scrollbar-color:#b8b7a1 transparent; display:flex; flex-direction:column; padding:12px var(--leaf-gutter) 16px; }
#ledger-scroll > * { flex-shrink:0; }
.ledger-cover { position:relative; isolation:isolate; display:flex; flex-direction:column; justify-content:center; min-height:90px; margin:0 calc(-1 * var(--leaf-gutter)) 9px; padding:7px var(--leaf-gutter) 11px; }
.ledger-cover::before { content:""; position:absolute; inset:0 0 0 4%; z-index:-1; pointer-events:none; background:url("assets/ledger-peaks.webp") right bottom / auto 100% no-repeat; opacity:.85; }
.ledger-cover .ledger-title { margin:3px 0 0; }
.ledger-cover .kicker { font:550 12px/1.4 var(--hand); letter-spacing:.14em; }
.ledger-cover .kicker::before { width:14px; }
.kicker { font:550 12px/1.5 var(--hand); letter-spacing:.12em; color:var(--red); gap:9px; }
.kicker::before { content:""; display:inline-block; width:23px; height:1px; background:var(--red); }
.ledger-title { font:400 clamp(37px,3.15vw,49px)/1.15 var(--display); letter-spacing:.025em; margin:8px 0; color:#253e32; }
.lede { font:400 16px/1.68 var(--hand); color:#354a3c; }
.ledger-cover + .lede { text-wrap:balance; }
.goal-head { margin:15px 0 16px; padding-block:8px; border-block:1px solid #b5ab8b; gap:12px; font:600 13px var(--hand); }
.goal-head .count { font:520 13px/1.35 var(--hand); font-variant-numeric:tabular-nums; color:#616452; }
.goal-head .count b { color:var(--red); font-size:20px; font-weight:normal; }
.progress-rail { display:flex; flex:1; align-items:center; justify-content:flex-end; gap:7px; }
.progress-rail span { width:5px; height:5px; border:1px solid #959c86; transform:rotate(45deg); }
.progress-rail .done { background:var(--red); border-color:var(--red); }
.trail-heading { display:flex; align-items:center; gap:8px; margin:0 0 5px; color:#2e4739; font:400 20px/1.25 var(--display); letter-spacing:.04em; }
.trail-heading .icon { width:15px; height:15px; stroke-width:1.7; color:var(--red); }
.trail-heading::after { content:""; flex:1; height:1px; background:linear-gradient(90deg,#c6baa0,transparent); }
.goal-list + .trail-heading { margin-top:13px; }
.goal-list { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); }
.goal-card { position:relative; display:grid; justify-items:center; align-content:center; min-width:0; padding:5px 3px 6px; background:transparent; }
.goal-card + .goal-card::before { content:""; position:absolute; top:12%; bottom:7%; left:0; width:1px; background:linear-gradient(transparent,#c9bea1 35%,#c9bea1 75%,transparent); }
.goal-card:hover,.goal-card:focus-visible { color:var(--red); background:#d9cda333; }
.goal-card img { width:100%; height:clamp(50px,7.5vh,70px); object-fit:contain; }
.goal-card strong { font:400 21px/1.2 var(--display); letter-spacing:.045em; }
.goal-card small { color:#485848; font:400 13px/1.45 var(--hand); }
.card-seal,.trail-sign { position:absolute; top:2px; right:3px; writing-mode:vertical-rl; font:600 10px/1.25 var(--hand); letter-spacing:.05em; padding:2px 1px; }
.trail-sign { color:#756044; border:1px solid #b4a281; background:#f5efdf; }
.card-seal { color:#fff4de; background:#94503f; outline:1px solid #ead0a9; outline-offset:-2px; transform:rotate(3deg); }
.journal-foot { margin-top:auto; padding-top:18px; flex-wrap:wrap; gap:8px; }
.atlas { margin-top:clamp(12px,2vh,23px); }
.atlas header,.atlas header>span,.atlas header button { display:flex; align-items:center; }
.atlas header { justify-content:space-between; margin-bottom:7px; color:#5c614f; }
.atlas header>span { gap:6px; font:400 19px/1.35 var(--display); color:var(--ink); }
.atlas header .icon { width:14px; height:14px; }
.atlas header button { gap:4px; font:550 12px/1.5 var(--hand); color:var(--muted); padding:3px; }
.atlas header button:hover { color:var(--red); }
.atlas header button .icon { width:10px; height:10px; }
.atlas-picture { position:relative; width:min(100%,31vh); aspect-ratio:16/9; margin:auto; overflow:hidden; background:#eee9d5; border:1px solid #b0b09a; outline:1px solid #d3d2be; outline-offset:2px; }
.atlas-picture img { width:100%; height:100%; display:block; pointer-events:none; }
.atlas-window { position:absolute; border:1px solid #765a37; box-shadow:0 0 0 260px #4f503122, inset 0 0 0 1px #fff3ccc9; pointer-events:none; }
.atlas-point { position:absolute; transform:translate(-50%,-50%); width:34px; height:30px; display:grid; place-items:center; }
.atlas-point i { width:7px; height:7px; border-radius:50%; border:1px solid #f9f0cf; background:#94442d; outline:1px solid #784832; }
.atlas-point span { font:500 13px/1.1 var(--hand); position:absolute; top:calc(50% + 6px); left:50%; transform:translateX(-50%); white-space:nowrap; color:#453827; background:#f5eddbed; padding:1px 3px; }
.atlas-point[aria-current] span { background:#354939; color:#fff0d7; }
.atlas-point:hover i,.atlas-point:focus-visible i { width:10px; height:10px; }
.rumor { width:100%; text-align:left; border-left:2px solid #a96a50; background:linear-gradient(90deg,#c5ccb33b,#c5ccb309); padding:7px 10px; }
.rumor:hover { background:#d6ca9f47; }
.rumor-title { color:var(--red); font:600 12px var(--hand); letter-spacing:.1em; display:flex; align-items:center; gap:6px; }
.rumor-title .icon { width:15px; }
.rumor p { font:400 18px/1.5 var(--kai); margin-top:5px; }
.rumor small { color:var(--muted); font:500 12px/1.5 var(--hand); display:flex; align-items:center; justify-content:flex-end; gap:4px; }
.rumor small .icon { width:12px; }
.back-link { align-self:flex-start; gap:5px; color:var(--muted); font:13px var(--hand); min-height:35px; }
.back-link .icon { width:14px; }
.beast-cover { min-height:clamp(122px,18vh,172px); margin-bottom:0; padding-right:48%; }
.beast-cover::before { opacity:.34; }
.detail-portrait { position:absolute; right:var(--leaf-gutter); bottom:7%; width:45%; height:90%; object-fit:contain; }
.beast-location { padding:9px 0; border-block:1px solid var(--fine); margin-bottom:14px; }
.spec-line { gap:6px; color:var(--muted); font-size:14px; }
.spec-line .icon { width:13px; color:var(--red); }
.clue-box { margin:17px 0; padding:12px 13px; background:#dbd0b034; border-left:2px solid #a98b60; }
.clue-box p { margin-top:5px; font:16px/1.7 var(--hand); }
.stage-title { display:flex; align-items:center; justify-content:space-between; gap:8px; }
.task-count { font:550 13px/1.4 var(--hand); color:var(--red); }
.sidebar-source { display:block; margin-top:4px; }
.clue-actions { gap:8px; flex-wrap:wrap; }
.button-ink, .button-paper { padding:8px 14px; justify-content:center; gap:7px; min-height:40px; font:500 16px/1.35 var(--hand); }
.button-ink { color:#fff5e2; background:url("assets/brush-ink.webp") center/100% 100% no-repeat; padding-inline:18px; }
.button-ink:hover { filter:brightness(1.12); }
.button-paper { color:#584d36; border:1px solid #afa284; background:#faf5e577; }
.button-paper:hover { background:#fff9e9; }
.button-ink .icon,.button-paper .icon { width:15px; height:15px; }
.hint-text { font:15px/1.7 var(--hand); color:var(--red); margin-top:12px; }
.folio { display:flex; justify-content:space-between; align-items:center; flex:none; height:32px; padding:0 clamp(12px,1.35vw,24px); gap:10px; background-color:transparent; background-image:none; font:12px/1.35 var(--hand); color:#4e594b; letter-spacing:.045em; }
.folio>span { gap:7px; }
.folio .icon { width:13px; height:13px; }
.folio-vol { font-family:var(--hand); }
.vermillion { height:6px; width:6px; background:var(--red); display:inline-block; transform:rotate(45deg); }
.folio-dot { color:#9c977e; margin:0 3px; }
#talk { position:absolute; left:14px; top:14px; padding:0; width:min(395px,calc(100% - 20px)); height:max-content; max-height:calc(100% - 85px); display:flex; flex-direction:column; border:1px solid #91836a; box-shadow:0 3px 16px #17221a40; z-index:4; }
#talk h3 { font:400 25px/1.35 var(--display); }
#talk .talk-text { font:400 17px/1.68 var(--hand); color:#304537; margin:7px 0 0; white-space:pre-line; }
.talk-reading { padding:13px 17px 12px; overflow-y:auto; min-height:0; overscroll-behavior:contain; scrollbar-width:thin; }
.speaker-intro { display:flex; align-items:center; gap:10px; padding-right:28px; }
.speaker-intro img { width:49px; height:56px; object-fit:contain; flex:none; }
.speaker-intro small,.work-heading small { display:block; font:550 12px/1.5 var(--hand); letter-spacing:.1em; color:#794c36; }
.talk-choices { display:flex; align-items:center; flex-wrap:wrap; flex-shrink:0; gap:5px 8px; padding:0 16px 12px; }
.talk-answer,.talk-leave { min-height:34px; padding:4px 8px; font:500 15px/1.4 var(--hand); }
.talk-answer { display:inline-flex; gap:4px; justify-content:space-between; align-items:center; color:#334c39; border:1px solid #a3a189; background:#eeeada; }
.talk-answer:hover { background:#e4e8d5; border-color:#637c61; }
.talk-answer .icon { width:11px; height:11px; }
.talk-leave { color:#605e50; margin-left:auto; text-decoration:underline; text-underline-offset:.25em; }
#talk[data-mode="note"] { width:min(350px,calc(100% - 20px)); pointer-events:none; border-left:3px solid #9a553b; }
#talk[data-mode="note"] .close-button { pointer-events:auto; top:4px; right:4px; }
.field-caption { padding:9px 33px 11px 13px; }
#talk .field-caption h3 { font:bold 13px/1.45 var(--hand); color:var(--red); letter-spacing:.07em; }
#talk .field-caption .talk-text { margin-top:3px; font-size:16px; line-height:1.55; }
#talk[data-mode="craft"] { width:min(436px,calc(100% - 20px)); }
#talk .work-heading { padding-right:33px; display:flex; gap:9px; align-items:baseline; }
#talk .work-heading small { order:1; }
#talk[data-mode="craft"] .talk-choices { padding-top:8px; border-top:1px solid var(--fine); }
.sr-only { position:absolute; width:1px; height:1px; margin:-1px; padding:0; clip-path:inset(50%); overflow:hidden; white-space:nowrap; }
.close-button { position:absolute; top:10px; right:10px; width:32px; height:32px; color:#676650; display:grid; place-items:center; z-index:1; }
.close-button:hover { background:#a08b5e1c; }
.mobile-close { display:none; }
.close-button .icon { width:17px; }
#notice { position:absolute; bottom:70px; left:50%; transform:translate(-50%,5px); pointer-events:none; background:#26382ef2; color:#fff2d9; padding:7px 13px; text-align:center; font-size:13px; box-shadow:0 2px 7px #18231d44; opacity:0; transition:opacity .16s,transform .16s; max-width:85%; width:max-content; z-index:3; }
#notice.show { opacity:1; transform:translate(-50%,0); }
#loading { position:absolute; inset:0; display:flex; align-items:center; justify-content:center; gap:10px; z-index:5; }
#loading>img { position:absolute; inset:0; height:100%; width:100%; object-fit:cover; object-position:48% 51%; transform:scale(1.075); }
.loading-label { position:relative; display:flex; align-items:center; justify-content:center; gap:9px; color:#fff4dc; background:#293b31ed; padding:8px 16px; border:1px solid #d1bb8f; box-shadow:0 3px 12px #19241d44; font:15px var(--hand); }
.loading-label .button-paper { color:var(--ink); background:var(--paper); }
dialog { color:var(--ink); padding:0; border:1px solid #928568; max-width:min(720px,calc(100vw - 24px)); width:100%; max-height:min(88dvh,820px); overflow:auto; box-shadow:0 14px 70px #131d1659; }
dialog::backdrop { background:#18231bd4; }
#dialog-body { padding:clamp(24px,3.5vw,48px); }
#dialog-title { font:bold clamp(29px,3vw,43px)/1.3 var(--hand); margin:9px 0 10px; letter-spacing:.08em; }
.dialog-intro { color:var(--muted); font:15px/1.8 var(--hand); }
.book-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:10px; margin:22px 0 0; }
.book-card { border:1px solid var(--fine); padding:12px 5px; background:#fff8e864; }
.book-card:hover { border-color:#9d8863; }
.book-card img { object-fit:contain; width:100%; height:105px; }
.book-card strong { display:block; font:bold 22px/1.6 var(--hand); }
.book-card small { color:var(--muted); font-size:12px; }
.plate-layout { display:grid; grid-template-columns: 42% minmax(0,1fr); gap:22px; align-items:center; }
.plate-layout>img { width:100%; height:210px; object-fit:contain; }
.quote { font:18px/1.75 var(--kai); margin:15px 0 3px; }
.quote-source,.sidebar-source { color:#505443; font:600 12px/1.55 var(--hand); }
.record-seal { display:inline-block; position:relative; top:-.5em; margin-left:9px; color:var(--red); border:1px solid currentColor; padding:3px 2px; transform:rotate(-6deg); font:bold 11px/.95 var(--kai); letter-spacing:1px; }
.plate-heading { display:flex; align-items:center; }
.field-note { margin:8px 0 0; }
.field-note img { display:block; width:100%; height:clamp(105px,19vh,165px); object-fit:cover; border:1px solid #978a69; }
.field-note figcaption { display:flex; align-items:baseline; gap:9px; margin-top:7px; font:14px/1.75 var(--hand); color:#4e5647; }
.field-note figcaption span { flex:none; color:var(--red); font:550 12px/1.5 var(--hand); }
.dialog-actions { display:flex; flex-wrap:wrap; gap:9px; margin-top:24px; }
#dialog-body:has(> .beast-page) { padding:0; }
.beast-page {
  --page-pad:clamp(24px,3.5vw,48px);
  display:grid;
  grid-template-rows:minmax(0,1fr) auto;
  max-height:calc(min(88dvh,820px) - 2px);
}
.plate-reading {
  min-height:0;
  padding:var(--page-pad) var(--page-pad) 0;
  overflow-y:auto;
  overscroll-behavior:contain;
  scrollbar-width:thin;
  scrollbar-color:#a99c7e transparent;
}
.plate-reading:focus-visible { outline:2px solid var(--red); outline-offset:-4px; }
.beast-page .plate-actions { margin:0; padding:20px var(--page-pad) var(--page-pad); }
@media (max-height:650px) {
  .beast-page { --page-pad:18px; }
  .beast-page .plate-reading { padding-top:24px; padding-bottom:8px; }
  .beast-page .plate-summary { display:contents; }
  .beast-page .plate-layout {
    grid-template-columns:minmax(62px,29%) minmax(0,1fr);
    align-items:center;
    gap:5px 11px;
  }
  .beast-page .plate-layout>img { height:82px; }
  .beast-page .plate-excerpt { grid-column:1 / -1; }
  .beast-page #dialog-title { margin:4px 0; font-size:29px; }
  .beast-page .quote { margin:4px 0 2px; font:16px/1.55 var(--kai); }
  .beast-page .field-note { margin-top:11px; }
  .beast-page .plate-actions { padding:9px var(--page-pad) 12px; border-top:1px solid var(--fine); }
}
@media (max-height:650px) and (min-width:520px) {
  .beast-page .plate-reading:has(.field-note) {
    display:grid;
    grid-template-columns:minmax(0,1fr) minmax(0,1.12fr);
    align-items:start;
    gap:20px;
    padding-top:42px;
  }
  .beast-page .field-note { margin:0; }
  .beast-page .field-note img { height:clamp(85px,25vh,130px); }
}
.guide-list { margin:16px 0 0; padding:0; list-style:none; }
.guide-list li { border-top:1px solid var(--fine); padding:11px 0; display:grid; grid-template-columns:82px 1fr; gap:12px; align-items:baseline; }
.guide-list b { font:bold 16px var(--hand); }
.guide-list span { font-size:13px; color:var(--muted); }
.end-plates { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); margin:15px 0; border-block:1px solid var(--fine); }
.end-plates img { width:100%; height:clamp(68px,11vh,100px); object-fit:contain; }
@media (min-width:761px) and (orientation:landscape) and (min-height:761px) and (max-height:1000px) {
  .ledger-cover:not(.beast-cover) { min-height:76px; padding-block:3px; }
  .goal-head { margin:7px 0; padding-block:6px; }
  .goal-card img { height:clamp(52px,6.8vh,65px); }
  .goal-list + .trail-heading { margin-top:10px; }
  .atlas { margin-top:12px; }
  .atlas-picture { width:min(100%,25vh); }
  .journal-foot { padding-top:9px; }
}
@media (max-height:760px) and (min-width:761px) {
  .mast { height:55px; } .ledger-cover { min-height:72px; } .beast-cover { min-height:114px; }
  .ledger-title { font-size:30px; } .goal-head { margin:10px 0; padding-block:5px; } .goal-card img { height:48px; }
  .goal-list + .trail-heading,.atlas { margin-top:9px; } .journal-foot { padding-top:12px; }
}
@media (max-width:760px), (max-width:1050px) and (orientation:portrait), (max-width:1100px) and (max-height:540px) {
  .mast { height:54px; padding:0 12px; gap:8px; grid-template-columns:1fr auto auto; }
  .mast::before { opacity:.27; background-size:auto 100%; background-position:32% bottom; mask-image:linear-gradient(90deg,transparent 12%,black 45%,#0006 80%,transparent); }
  .brand { gap:6px; } .brand h1 { font-size:29px; letter-spacing:.015em; } .brand-seal { height:29px; width:20px; font-size:11px; }
  .edition,.main-nav #nav-map,.mast-tool span { display:none; }
  .main-nav { gap:4px; } .nav-tab { padding:0 5px; font-size:14px; gap:3px; white-space:nowrap; letter-spacing:0; } .nav-tab .icon { width:15px; }
  .nav-tab.current::before,.nav-tab[aria-expanded="true"]::before { inset:4px -2px; }
  .mast-actions { padding-left:6px; border-left:1px solid var(--fine); gap:0; }
  .mast-tool { min-width:37px; height:44px; } .mast-tool .icon { width:17px; height:17px; }
  #mobile-ledger { display:flex; align-items:center; } #mobile-count { font:550 12px/1.4 var(--hand); color:var(--red); }
  #mobile-ledger[aria-expanded="true"] #mobile-count { color:#f5dec6; }
  .layout { display:block; position:relative; padding:4px 5px 0; } #artboard { width:100%; height:100%; }
  .cartouche { top:14px; left:13px; padding:7px 4px; min-width:39px; } .cartouche h2 { font-size:23px; } .cartouche>span { left:6px; font-size:7px; }
  .site-pin { font-size:17px; min-height:37px; } .map-controls { bottom:10px; left:9px; right:9px; }
  .tool-group,#map-location { height:44px; } .tool-group button { min-width:36px; }
  #ledger { display:none; position:absolute; right:5px; top:4px; bottom:0; width:min(356px,calc(100% - 34px)); z-index:6; box-shadow:-5px 2px 18px #252e2133; }
  #ledger.open,.layout:has(#ledger.open) .ledger-curtain { display:block; }
  .ledger-curtain { position:absolute; inset:4px 5px 0; z-index:5; background:#26322650; }
  .mobile-close { display:grid; width:42px; height:42px; top:3px; right:3px; color:var(--ink); }
  .mobile-close::before { content:""; position:absolute; inset:6px; z-index:-1; background:var(--paper) url("assets/paper.png"); border:1px solid #959f8b; }
  #ledger-scroll { padding-top:9px; } .ledger-title { font-size:39px; }
  .folio { height:24px; padding:0 9px; font-size:11px; } .folio .input-tip { display:none; }
  #talk { max-height:calc(100% - 83px); } #notice { bottom:60px; } .tool-group output { min-width:27px; }
  .plate-layout { grid-template-columns:1fr; gap:0; } .plate-layout>img { height:130px; }
  .book-grid { gap:5px; } .book-card img { height:74px; } .book-card strong { font-size:17px; }
  .dialog-actions { margin-top:16px; } .guide-list li { grid-template-columns:66px 1fr; }
  .atlas-picture { width:min(100%,200px); }
  .mounted .site-pin { font-size:14px; padding:4px 9px; gap:3px; min-height:31px; }
  .mounted .site-pin .icon { width:12px; height:12px; }
}
@media (max-height:790px) and (min-width:761px) and (orientation:landscape) { .atlas-picture { width:min(100%,190px); } }
@media (max-width:460px) { .name-prefix { display:none; } .mast { padding-inline:8px; gap:5px; } .main-nav { gap:4px; } }
@media (max-width:389px) {
  #mobile-ledger .icon { display:none; }
  .mast-actions { padding-left:2px; } .mast-tool { min-width:33px; } .brand h1 { font-size:25px; }
  .nav-tab { padding-inline:3px; }
}
@media (max-width:370px) {
  .tool-group #sense span,#map-location .icon:first-child { display:none; }
  .tool-group button { min-width:34px; } .tool-group { padding-inline:2px; }
}
@media (max-width:340px) {
  .mast { padding-inline:5px; gap:2px; }
  .brand,.main-nav { gap:2px; }
  .brand h1 { font-size:24px; letter-spacing:0; }
}
@media (max-width:600px) {
  .map-controls button { gap:4px; }
  .tool-group { padding-inline:6px; }
  #map-location { padding-inline:10px; font-size:13px; }
  .tool-group #sense { padding-inline:4px; }
  .cartouche:not(.away) { display:flex; align-items:center; gap:5px; padding:8px 9px; }
  .cartouche h2 { writing-mode:horizontal-tb; margin:0; font-size:21px; }
  .cartouche>span { display:none; }
  #arrival { top:15px; }
  .site-pin.beyond-left,.site-pin.beyond-right { padding-inline:11px; font-size:15px; min-width:52px; }
  .site-pin:is(.beyond-left,.beyond-right) :is(.icon,.site-name) { display:none; }
  .site-pin:is(.beyond-left,.beyond-right) .site-short { display:inline; }
}
@media (max-height:480px) and (orientation:landscape) {
  .mast { height:44px; } .folio { height:20px; } .cartouche { top:8px; left:9px; }
  .cartouche:not(.away) h2 { font-size:19px; }
}
@media (max-width:600px) and (orientation:portrait) {
  #artboard:not(.mounted) .cartouche:not(.away) { top:auto; bottom:66px; left:12px; padding:4px 8px; }
  #artboard:not(.mounted) .cartouche h2 { font-size:19px; }
}
@media (prefers-reduced-motion:reduce) { *, *::before, *::after { transition-duration:0s !important; animation-duration:0s !important; scroll-behavior:auto !important; } }
