@font-face{font-family:Spectral;src:url("./assets/fonts/Spectral-Regular.ttf") format("truetype");font-display:optional}
@font-face{font-family:Type;src:url("./assets/fonts/SpecialElite-Regular.ttf") format("truetype");font-display:optional}
@font-face{font-family:File;src:url("./assets/fonts/CourierPrime-Regular.ttf") format("truetype");font-display:optional}
:root{--paper:#e9e1ce;--ink:#26221b;--muted:#554d40;--blue:#79332d;--plate:#e0d6be;--rule:#a59b86;--glow:#ae7745;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;color:var(--ink);background:var(--paper);line-height:1.55}
*{box-sizing:border-box}
body{margin:0;min-height:100vh}
[hidden]{display:none!important}
button,input,summary,a{touch-action:manipulation}
button,summary,label{cursor:pointer}
button,a,input,summary{outline-offset:5px}
:focus-visible{outline:3px solid #735eaa}
h1:focus:not(:focus-visible){outline:none}
.mast,main{width:min(1100px,calc(100% - 72px));margin:auto}
.mast{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:24px 0 19px;border-bottom:1px solid var(--ink);color:var(--muted);font-size:.92rem}
.spread{display:grid;grid-template-columns:minmax(0,1.16fr) minmax(0,.84fr);align-items:center;gap:clamp(36px,6vw,84px);padding:clamp(34px,6vw,84px) 0}
.folio{display:flex;gap:9px;align-items:center;color:var(--blue);font-size:.91rem;font-weight:650;margin:0 0 14px}
.folio:before{content:"";height:2px;width:24px;background:currentColor}
h1{font:400 clamp(2.9rem,5.9vw,5.1rem)/.99 Spectral,Georgia,serif;letter-spacing:-.055em;text-wrap:balance;margin:0 0 20px}
p{margin:0 0 14px;max-width:58ch}
.lede{font:400 clamp(1.13rem,1.8vw,1.4rem)/1.44 Spectral,Georgia,serif}
.copy p:not(.lede,.folio),#notes{color:var(--muted)}
.launch{margin-top:24px}
input{accent-color:var(--blue);width:1.1rem;height:1.1rem;margin:0}
button{border:1px solid var(--rule);border-radius:7px;min-height:46px;padding:.68rem 1.1rem;font:inherit;font-weight:600;color:var(--ink);background:transparent}
button:hover{background:#e8eceb}
button.primary{background:var(--blue);border-color:var(--blue);color:white}
button.primary:hover{background:#2a3d74}
.duration,.small{font-size:.89rem;color:var(--muted)}
.duration{display:inline-block;margin:8px 0 8px 10px}
.controls{display:flex;flex-wrap:wrap;gap:8px;align-items:center}
.quiet{color:var(--muted);font-size:.89rem;border-color:transparent;text-decoration:underline;text-underline-offset:3px}
#end{margin:7px 0 0 -.5rem;padding-inline:.5rem}
.plate{margin:0;padding:clamp(14px,2.5vw,28px);background:var(--plate);border-radius:45% 45% 5px 5px / 9% 9% 5px 5px}
.drawing{width:100%;max-height:410px;display:block}
.drawing .registration,.drawing .contour{stroke:#8999aa;stroke-width:1;fill:none}
.drawing .ink{stroke:#465979;stroke-width:1.6;stroke-linejoin:round;stroke-linecap:round}
.band{fill:#a9a3e1;opacity:.22}
.band.active,.band.overview{opacity:.85}
.mark{stroke:#65758a;stroke-width:1.1;fill:none}
.mark text{font:11px Georgia,serif;stroke:none;fill:#394a66}
.mark.active{stroke:#393776;stroke-width:2.2}
.mark.active text{fill:#393776;font-weight:700}
figcaption{display:flex;align-items:baseline;justify-content:space-between;gap:8px;border-top:1px solid #a6b2be;padding-top:11px;margin-top:4px;color:#394c62;font-size:.85rem}
#plateNo{font-family:Spectral,Georgia,serif;font-style:italic}
#plateLabel{text-align:right}
#notes{border-top:1px solid var(--rule);padding:4px 0 38px;display:grid;grid-template-columns:1fr 1fr;align-items:start;gap:0 40px}
summary{font-weight:620;color:var(--ink);padding:15px 0;min-height:48px}
details p,details li,details a{font-size:.94rem}
.route{padding-left:1.35rem;margin:5px 0 16px}
.route li{padding:0 0 7px 4px}
a{color:#334b88;text-underline-offset:3px}
.progress{height:3px;background:#dce1e1;width:min(340px,100%);margin:22px 0 7px}
.progress i{display:block;height:100%;width:0;background:#6c71a7}
body[data-screen="player"] h1{font-size:clamp(2.55rem,5vw,4.35rem)}
@media(max-width:720px){
  .mast,main{width:min(100% - 36px,560px)}
  .mast{padding:16px 0 12px;font-size:.8rem}
  .spread{grid-template-columns:1fr;gap:22px;padding:27px 0}
  .folio{margin-bottom:10px}.launch{margin-top:15px}
  h1{font-size:clamp(2.8rem,9.3vw,3.8rem);margin-bottom:13px}
  .plate{display:flex;align-items:center;justify-content:center;gap:12px;border-radius:5px;padding:10px 14px}
  .drawing{width:58%;height:155px}
  figcaption{flex-direction:column;width:35%;border-top:0;border-left:1px solid #a6b2be;padding:7px 0 7px 14px;margin:0;gap:1px}
  #plateLabel{text-align:left}
  #notes{display:block}
  #notes details+details{border-top:1px solid var(--rule)}
  body[data-screen="player"] .spread{gap:18px}
  body[data-screen="player"] .plate{min-height:130px}
  body[data-screen="player"] .drawing{height:clamp(115px,24svh,200px)}
  .progress{margin-top:17px}
}
@media(max-width:360px){.mast,main{width:calc(100% - 28px)}.mast{font-size:.74rem}.duration{margin-left:0;display:block}.spread{padding:21px 0}.plate{padding:8px}.drawing{height:135px}}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{animation:none!important;transition:none!important;scroll-behavior:auto!important}}

/* Paper, typewriter ink and library slips follow the original field guide. */
body{background:radial-gradient(ellipse at 15% 15%,#f6f0e2a8,transparent 63%),repeating-linear-gradient(0deg,transparent 0 3px,#53412b07 3px 4px),var(--paper)}
body::before{content:"";position:fixed;inset:0;pointer-events:none;z-index:3;opacity:.055;background-image:url("data:image/svg+xml,%3Csvg viewBox='0 0 149 149' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.84' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Cpath fill='%23605036' filter='url(%23g)' d='M0 0h149v149H0z'/%3E%3C/svg%3E")}
.mast{border-bottom:2px solid var(--ink);padding-block:12px 8px}
.mast nav{display:flex;gap:8px;align-items:center}
.mast{flex-wrap:wrap}
.mast nav{max-width:100%;flex-wrap:wrap}
.mast a,.paperLink{display:inline-flex;align-items:center;min-height:44px;color:var(--ink);text-decoration:underline;text-underline-offset:4px}
.mast a{padding:4px 9px;font:1rem File,monospace}
.mast a[aria-current="page"]{background:var(--ink);color:var(--paper);text-decoration:none}
h2{font:400 clamp(1.65rem,2.8vw,2.5rem)/1.1 Type,Georgia,serif;margin:0 0 12px;letter-spacing:-.045em}
.folio{font:1rem File,monospace;line-height:1.3}
.folio:before{width:18px}
button{border-radius:3px}button:hover{background:#ded3bd}button.primary:hover{background:#5e2522}
a{color:#64302c}
.opening{display:grid;grid-template-columns:minmax(0,1.55fr) minmax(220px,.75fr);align-items:center;gap:clamp(40px,7vw,110px);padding:clamp(28px,4vw,57px) 0}
.opening h1{font:400 clamp(3rem,5.9vw,5.45rem)/1 Type,Georgia,serif;letter-spacing:-.055em}
.opening>div{min-width:0}
.opening h1,.mapList b,.sectionLine h2{overflow-wrap:anywhere}
.opening .lede{max-width:46ch}.opening .launch{margin-top:18px}
.coverPlate{margin:8px 7px 8px 0;padding:clamp(16px,2vw,27px);background:linear-gradient(108deg,#ded0b1,#f0e6cf 19%,#e7dbc1 84%);border:1px solid #ab9e80;transform:rotate(1.6deg);box-shadow:3px 4px 0 -1px #e6dcc6,4px 5px 0 -1px #9f9279,0 9px 15px #3a2d1b1c}
.filebar,.coverPlate figcaption,.entryNum,.entryState,#mapCount{font-family:File,monospace}
.filebar{padding-bottom:7px;border-bottom:1px solid var(--ink);display:flex;justify-content:space-between;gap:8px;font-size:.8rem;color:var(--muted)}
.folderTitle{font:clamp(1.65rem,3vw,2.65rem)/1.05 Type,Georgia,serif;letter-spacing:-.05em;margin:23px 0 4px}
.coverPlate svg{display:block;width:100%;height:82px;color:#786b55}
.releaseStamp{border:3px double currentColor;color:#8a3833;transform:rotate(-5deg);width:fit-content;padding:6px 10px 3px;font:1rem/1.05 Type,monospace;text-align:center}
.releaseStamp small{font: .8rem File,monospace}
.coverPlate figcaption{display:block;margin-top:16px;border:0;border-top:1px solid var(--rule);padding:9px 0 0;width:auto;color:var(--muted);font-size:.74rem}
.contents{border-top:2px solid var(--ink);padding:24px 0 16px}
.sectionLine{display:flex;align-items:baseline;gap:8px 25px;flex-wrap:wrap;justify-content:space-between}
.mapList{list-style:none;padding:0;margin:12px 0}
.mapList li{border-top:1px solid var(--rule)}
.mapList li:last-child{border-bottom:1px solid var(--rule)}
.mapList a{display:grid;grid-template-columns:32px minmax(0,1fr) auto;align-items:center;gap:14px;min-height:70px;text-decoration:none;color:var(--ink);padding:10px 8px}
.mapList a:hover,.mapList a:focus-visible{background:#fbf5e677}
.entryNum{font-size:.92rem;color:var(--muted)}
.mapList b{display:block;font:400 1.26rem/1.15 Spectral,Georgia,serif;text-decoration:underline;text-underline-offset:3px}
.mapList small{display:block;color:var(--muted);margin-top:4px}
.entryState,#mapCount{font-size:.88rem;color:var(--muted)}
.entryState[data-state="done"]{color:#34583b}.entryState[data-state="active"]{color:#813a2e}
.archiveEntry{display:flex;align-items:center;justify-content:space-between;gap:18px;border-top:2px solid var(--ink);padding:26px 0}
.returning .opening{display:block;padding-block:22px}
.returning .opening h1{font-size:clamp(2.1rem,4vw,3.2rem);margin:0}
.returning .coverPlate{display:none}
.returning .opening .launch{margin-top:4px}
#showOrigin,#already{padding-inline:0}
.paperLink{flex-shrink:0;font-weight:600}
.transcript{margin-top:20px;border-top:1px solid var(--rule)}
.transcript ol{padding-left:1.5rem;margin:0}.transcript li{padding-bottom:12px}.transcript b{display:block}
.plate{border:1px solid #aba088;border-radius:0;box-shadow:3px 3px 0 #b5a98d50}
.drawing{filter:sepia(.7)}.band{fill:var(--glow)}.mark.active,.mark.active text{stroke:#78372d}.mark.active text{stroke:none;fill:#78372d}
.progress{background:#cec2af}.progress i{background:var(--blue)}
figcaption{border-color:#b7a991;color:var(--muted)}
#notes{display:block}.sr{position:absolute!important;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
body[data-screen="archive"]{height:100vh;height:100dvh;min-height:0;display:flex;flex-direction:column}
body[data-screen="archive"] .mast{flex:0 0 auto}
body[data-screen="archive"] main{width:100%;flex:1;min-height:0}
#archive,#frameSlot,#frameSlot iframe{width:100%;height:100%;border:0;display:block}
@media(max-width:720px){
  .opening{display:flex;flex-direction:column;align-items:stretch;gap:16px;padding:24px 0 18px}
  .coverPlate{display:none}
  .opening .folio{color:var(--blue);border:1px solid var(--blue);width:fit-content;padding:4px 8px 2px;transform:rotate(-1deg)}
  .opening .folio:before{display:none}
  .opening .lede{font-size:1.1rem;line-height:1.42}
  .opening h1{font-size:clamp(2.55rem,9vw,3.6rem)}
  .archiveEntry{display:block}
  .contents{padding-top:19px}.sectionLine{gap:0 8px}
  .mast nav{gap:1px}.mast a{font-size:.86rem;padding-inline:7px}
  .mapList a{gap:8px;padding-inline:2px;grid-template-columns:21px minmax(0,1fr) auto}
  .entryState{max-width:9ch;text-align:right}
}
@media(max-width:360px){
  .mast nav a{white-space:nowrap;padding-inline:5px}
}
