/* The scholar's cabinet. All source images keep their original appearance. */
:root {
  --header-h: 80px;
  --paper: #f1e6cc; --panel: #faf2df; --sunk: #e7d9ba;
  --ink: #30271e; --ink-2: #574735; --ink-3: #716149;
  --rule: #bba785; --rule-soft: #d6c6a6;
  --verdigris: #795026; --gamboge: #82581e;
  --font-heading: "IM Fell English", Georgia, serif;
  --font-display: "Newsreader", Georgia, serif;
  --gold: #d7b674; --night: #221b16; --burgundy: #572b2a;
}
.cabinet { font-family: var(--font-display); font-size: 1.1rem; line-height: 1.6; }
.cabinet h1, .cabinet h2, .cabinet h3 { font-family: var(--font-heading); font-weight: 400; }
.cabinet h1 { line-height: 1.06; }
.cabinet :is(#explore, #front-passage, [id^="p-W"]) { scroll-margin-top: calc(var(--header-h) + 24px); }
.cabinet :is(button, input, select) { font: inherit; }
.cabinet :is(.eyebrow, .small, .psg-meta, .psg-links, .pills, .filterbar label, .basis, .chip, .collection-note, .search-status, .global-search-label) { font-family: var(--font-body); }
.cabinet :is(button, a, input, select, summary):focus-visible { outline: 3px solid #a66f24; outline-offset: 4px; }
.cabinet :is(.btn, .pill) { min-height: 44px; border-radius: 2px; }
.cabinet .btn { gap: 9px; }
.cabinet .btn.primary { background: #58332c; border-color: #58332c; color: #fff3d8; box-shadow: inset 0 0 0 3px #ffffff0c, 0 3px 0 #35221b; }
.cabinet .btn.primary:hover { background: #724635; }
.atlas-icon { display: inline-block; width: 23px; height: 23px; flex: 0 0 23px; vertical-align: middle; }
.sr-only { position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important; overflow: hidden !important; clip: rect(0,0,0,0) !important; white-space: nowrap !important; }

/* A single consistent navigation system, with real links even without JS. */
.cabinet .cabinet-header { position: sticky; top: 0; background: #211a16; color: #f1e1be; border-bottom: 1px solid #8c6a3c; z-index: 40; padding-inline: clamp(16px, 3.2vw, 48px); }
.cabinet .cabinet-header .bar { min-height: 80px; max-width: 1560px; flex-wrap: nowrap; gap: 26px; padding: 0; }
.atlas-brand { display: flex; gap: 13px; align-items: center; text-decoration: none; color: #f1e1be; flex-shrink: 0; }
.atlas-brand:hover { color: #fff5da; }
.brand-seal { width: 42px; height: 42px; border: 1px solid #a48650; border-radius: 50%; display: grid; place-items: center; color: #d7b674; box-shadow: inset 0 0 0 4px #211a16, inset 0 0 0 5px #79603d; }
.brand-seal .atlas-icon { width: 31px; height: 31px; }
.atlas-brand b { display: block; font: 2rem/1 "IM Fell English SC", Georgia, serif; letter-spacing: .055em; }
.atlas-brand small { display: block; margin-top: 7px; font: .49rem/1.2 var(--font-body); letter-spacing: .2em; color: #c6b28d; }
.cabinet .site-nav { margin-left: auto; width: auto; padding: 0; gap: 18px; flex-wrap: nowrap; overflow: visible; background: none; }
.cabinet .site-nav a { font: 1.02rem var(--font-display); color: #d7c6a5; padding: 26px 0; white-space: nowrap; }
.cabinet .site-nav a:hover { background: transparent; color: #fff1ce; }
.cabinet .site-nav a[aria-current] { color: #f5d699; box-shadow: inset 0 -2px #c99f55; }
.cabinet-actions { display: flex; align-items: center; gap: 8px; }
.cabinet-tool, .atlas-menu > summary { border: 0; background: transparent; color: inherit; display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 8px 12px; cursor: pointer; font: .83rem var(--font-body) !important; }
.cabinet-tool:hover { color: #ac752a; }
.cabinet-header .cabinet-tool:hover { color: #ffdf9c; }
.cabinet-tool small { font-size: .65rem; color: #e0bd7f; border: 1px solid #665236; border-radius: 50%; min-width: 18px; height: 18px; line-height: 17px; }
.atlas-menu { position: static; }
.atlas-menu > summary { border: 1px solid #8a7049; color: #f5dfb7; padding-inline: 14px; list-style: none; }
.atlas-menu > summary::-webkit-details-marker { display: none; }
.atlas-menu[open] > summary { background: #d6b572; color: #2e2115; }
.cabinet-menu { position: absolute; top: calc(100% + 1px); right: 22px; width: min(980px, calc(100vw - 44px)); padding: 30px; background: #f3e7cbd9; background-image: url("home-parchment.webp"); color: #30271e; box-shadow: 0 20px 50px #160f0b66; border: 1px solid #a5874c; max-height: calc(100dvh - 100px); overflow: auto; }
.menu-heading { border-bottom: 1px solid #beac8c; padding-bottom: 15px; }
.menu-index { display: flex; justify-content: center; flex-wrap: wrap; gap: 12px 30px; padding-top: 20px; font-size: 1rem; }
.menu-index a { color: #654124; }

/* Opening the atlas: original cartography set on a dimensional table. */
.study-table { background: #23180e url("scholars-desk.webp") center 50% / cover; color: #f5e6c7; border-bottom: 5px solid #aa8245; position: relative; }
.study-table::before { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, #160f0bd9, #160f0b80 42%, #160f0b22); pointer-events: none; }
.atlas-home .study-table .front-opening { position: relative; max-width: 1560px; display: grid; grid-template-columns: .8fr 1.3fr; gap: clamp(25px, 4vw, 75px); align-items: center; padding: 64px clamp(22px, 4vw, 64px) 52px; }
.atlas-home .front-intro { display: block; padding: 0; }
.atlas-home .front-intro .front-kicker { color: #d1ac6e; font: .62rem var(--font-body); letter-spacing: .22em; }
.atlas-home .front-intro h1 { color: #f7eacb; font-size: clamp(2.8rem, 4.3vw, 5rem); line-height: 1.06; margin: 22px 0 24px; letter-spacing: -.02em; }
.atlas-home .front-intro h1 em { color: #d4b16f; font-weight: 400; }
.study-invitation { color: #d8c8a9; max-width: 31ch; font: 1.22rem/1.6 var(--font-display); }
.study-actions { display: flex; flex-wrap: wrap; gap: 24px; align-items: center; margin-top: 32px; }
.atlas-home .study-actions .btn.primary { background: linear-gradient(#e0c18a, #c39a56); color: #2e2114; border: 1px solid #e8cb92; box-shadow: inset 0 0 0 3px #fff5d31c, 0 4px 12px #0005; padding: 13px 22px; }
.study-read { color: #ecdbb9; font-size: 1rem; text-underline-offset: 6px; }
.study-totals { display: flex; flex-wrap: wrap; gap: 28px; margin: 42px 0 0; border-top: 1px solid #ad8c5144; padding-top: 22px; }
.study-totals span { color: #c2ad86; font: .65rem var(--font-body); }
.study-totals b { display: block; color: #e1cc9f; font: 1.5rem var(--font-display); margin-bottom: 4px; }
.study-map { min-width: 0; perspective: 1400px; }
.atlas-home .study-map .front-map-mount { background: #c7ae75; border: 1px solid #e6cd94; outline: none; padding: 8px; transform: rotateY(-5deg) rotateZ(1.3deg); box-shadow: 2px 3px 0 #a7864e, 4px 6px 0 #846236, 7px 9px 0 #593f22, 15px 28px 38px #0009; transition: transform .55s ease, box-shadow .55s ease; }
.atlas-home .study-map .front-map-mount:hover { transform: rotateY(0) rotateZ(0); box-shadow: 2px 4px 0 #9d7b46, 8px 20px 32px #0008; }
.atlas-home .study-map .front-stage { height: clamp(330px, 36vw, 535px); background: #d8c49a; border: 1px solid #79673f; }
.atlas-home .study-map .front-tools { top: 10px; right: 10px; }
.atlas-home .study-map .front-tools .btn { font-size: .72rem; padding-inline: 10px; min-height: 38px; color: #443019; background: #f6e8cddd; }
.atlas-home .study-map .front-map-caption { color: #d6c49e; padding: 22px 2px 0; }
.atlas-home .study-map .front-credit { font-size: .88rem; }
.study-map .front-credit a { color: #e7ce9d; }
.atlas-home .study-map .front-credit > span { font-size: .56rem; color: #bbaa86; }
.atlas-home .study-map .front-how { font: .57rem var(--font-body); gap: 12px; color: #ccbfa6; }
html.roaming .study-map { perspective: none; }
html.roaming .study-map .front-map-mount { transform: none; }
.atlas-home .study-map .front-stage.roam { height: auto; }

/* Six crafted objects, all ordinary accessible links. */
.cabinet-home-content { max-width: 1420px; padding-top: 60px; padding-bottom: 0; }
.cabinet-section-head { text-align: center; margin-bottom: 30px; }
.cabinet-section-head .eyebrow { font-size: .6rem; letter-spacing: .2em; margin-bottom: 8px; }
.cabinet-section-head h2 { font-size: clamp(2rem, 3vw, 2.7rem); }
.room-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 16px; }
.room-door { display: flex; flex-direction: column; align-items: center; position: relative; color: #34291f; text-decoration: none; min-width: 0; padding: 20px 12px 25px; border: 1px solid #bba57f; background: linear-gradient(135deg, #fffaedaa, #e3d0a950); box-shadow: 0 2px 0 #c4ad823b, inset 0 0 0 4px #fffaea50; transform: perspective(700px) rotateX(var(--tilt-x, 0deg)) rotateY(var(--tilt-y, 0deg)); transition: transform .25s ease, background .25s, box-shadow .25s; }
.room-door:hover { background: #fff8e2; color: #592c25; box-shadow: 0 12px 25px -16px #4b2f18aa, inset 0 0 0 4px #c8ae7030; }
.room-number { position: absolute; top: 13px; left: 14px; color: #927852; font: .6rem var(--font-display); letter-spacing: .12em; }
.room-name { font: 1.18rem/1.2 var(--font-heading); text-align: center; }
.room-note { font: .62rem/1.5 var(--font-body); color: #786448; text-align: center; margin-top: 8px; }
.room-enter { margin-top: 14px; color: #926b32; }
.room-enter .atlas-icon { width: 18px; height: 18px; }
.room-object { display: grid; place-items: center; width: 120px; max-width: 100%; height: 126px; perspective: 650px; margin: 2px 0 15px; }
.obj-book { display: flex; flex-direction: column; align-items: center; justify-content: center; width: 77px; height: 99px; background: radial-gradient(at 0 0, #74423c, #402220); color: #d5b471; border: 2px solid #321f18; border-radius: 2px 5px 5px 2px; transform: rotateY(-28deg) rotateX(13deg) rotateZ(-9deg); box-shadow: 6px 5px 0 -1px #ddd0ac, 8px 7px 0 #532f27, 12px 15px 14px #49371e44, inset 0 0 0 5px #5d352d, inset 0 0 0 6px #a57d46; transition: transform .4s; }
.obj-book::before { content: "❦"; font-size: 1.6rem; }
.obj-book b { font: .37rem var(--font-heading); letter-spacing: .11em; margin-top: 8px; }
.obj-book small { font: .29rem var(--font-heading); margin-top: 5px; letter-spacing: .15em; }
.obj-book i { position: absolute; top: 0; bottom: 0; left: 4px; width: 3px; background: #281a1955; }
.room-door:hover .obj-book { transform: rotateY(-12deg) rotateX(5deg) rotateZ(-5deg) translateY(-5px); }
.obj-map { position: relative; display: block; width: 98px; height: 76px; background: #dacaab url("dial/delisle-1706.webp") center / cover; border: 6px solid #ede0bd; transform: rotateX(25deg) rotateZ(-12deg); box-shadow: 3px 5px 0 #bca982, 12px 20px 16px #523a233d; transition: transform .4s; }
.obj-map::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, transparent 31%, #72502640 32%, #fff8d640 34%, transparent 36%, transparent 64%, #60401f40 66%, #fffbd855 68%, transparent 71%); }
.obj-map b { display: none; }
.room-door:hover .obj-map { transform: rotateX(5deg) rotateZ(-5deg) translateY(-5px); }
.obj-astrolabe { position: relative; display: grid; place-items: center; width: 94px; height: 94px; border-radius: 50%; border: 3px solid #c6a15f; background: radial-gradient(circle, #a7803c 0%, #ead299 47%, #92713d 49%, #d9ba78 54%, #876132 59%, #e9cf90 63%, #91703c 66%, #c8a766 68%); color: #5d4220; box-shadow: 2px 4px 0 #77522b, 4px 7px 0 #9a7541, 10px 16px 16px #44331c44; transform: rotateX(30deg) rotateZ(-20deg); transition: transform .5s; }
.obj-astrolabe::before { content: ""; position: absolute; inset: 10px; border-radius: 50%; border: 1px dashed #79572f; }
.obj-astrolabe i { position: absolute; inset: -6px; border: 1px solid #d1af6c; border-radius: 50%; }
.obj-astrolabe .atlas-icon { width: 49px; height: 49px; }
.obj-astrolabe em { position: absolute; width: 8px; height: 8px; border-radius: 50%; background: #684427; box-shadow: 1px 2px 2px #0004; }
.room-door:hover .obj-astrolabe { transform: rotateX(12deg) rotateZ(15deg) translateY(-5px); }
.obj-cards { position: relative; display: block; width: 63px; height: 92px; transform-style: preserve-3d; transform: rotateX(15deg) rotateZ(3deg); }
.obj-cards i { position: absolute; inset: 0; border-radius: 4px; background: #432829; color: #d0ae69; border: 3px solid #e4cf9e; box-shadow: inset 0 0 0 2px #57372b, inset 0 0 0 3px #b9934e, 4px 7px 10px #38221555; display: grid; place-items: center; font-size: 2rem; font-style: normal; transition: transform .4s; }
.obj-cards i:first-child { transform: rotate(-19deg) translateX(-16px); }
.obj-cards i:last-child { transform: rotate(19deg) translateX(16px); }
.room-door:hover .obj-cards i:first-child { transform: rotate(-27deg) translateX(-21px); }
.room-door:hover .obj-cards i:last-child { transform: rotate(27deg) translateX(21px); }
.obj-route { width: 91px; height: 80px; position: relative; border: 1px solid #bca476; background: linear-gradient(160deg, #f0dfb9, #d9bc87); transform: rotateX(24deg) rotateZ(8deg); box-shadow: 4px 7px 0 #b19869, 10px 14px 15px #67462744; }
.obj-route i { position: absolute; width: 52px; height: 32px; border: 2px dashed #785135; border-left: 0; top: 25px; left: 16px; border-radius: 0 20px 20px 0; }
.obj-route b { position: absolute; top: 9px; left: 9px; font-size: 1.3rem; color: #77412d; }
.obj-route em { position: absolute; bottom: 18px; left: 17px; width: 7px; height: 7px; background: #905938; border-radius: 50%; }
.compact.room-grid { grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 18px; }
.compact .room-door { padding: 20px; min-height: 150px; }
.compact .room-door > .atlas-icon { width: 30px; height: 30px; margin: 2px 0 14px; color: #865e27; }
.compact .room-enter { display: none; }

/* The anthology and the cabinet below it. */
.atlas-home .front-body { margin-top: 58px; padding-top: 34px; border-top: 1px solid #bca980; }
.atlas-home .front-margin { grid-template-columns: 1fr auto; padding: 0 10px 20px; gap: 5px 30px; }
.atlas-home .front-margin .front-kicker { font: .65rem var(--font-body); }
.atlas-home .front-margin h2 { grid-row: 2; font-family: var(--font-heading); font-size: 2.5rem; }
.atlas-home .front-margin > a { grid-column: 2; grid-row: 2; font-family: var(--font-display); font-size: 1rem; }
.atlas-home .front-margin > p.front-independent { grid-column: 1 / -1; font-size: .79rem; max-width: none; color: #746147; }
.atlas-home .passage-book .hero-card-head h2 { display: none; }
.atlas-home .passage-book .hero-card-head { justify-content: flex-end; }
.atlas-home .passage-book .book-source-title { font-size: clamp(1.65rem, 2.4vw, 2.4rem); }
.atlas-home .home.cabinet-home-bottom { padding-top: 10px; }
.cabinet-home-bottom .band-head { text-align: center; }
.cabinet-home-bottom .trails { gap: 16px; }
.cabinet-home-bottom .trail { border: 1px solid #c6b18a; background: #f9efd9; box-shadow: 3px 5px 0 #ddcba7; transition: transform .25s; }
.cabinet-home-bottom .trail:hover { transform: translateY(-5px); }
.cabinet-home-bottom .trail-blurb { display: none; }
.cabinet-home-bottom .trail-q { font-family: var(--font-heading); font-size: 1.15rem; }
.archive-cabinet { margin-top: 45px; border-top: 3px double #af9870; border-bottom: 1px solid #bca783; }
.archive-cabinet > summary { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 25px 8px; cursor: pointer; font: 1.4rem var(--font-heading); }
.archive-cabinet > summary small { font: .7rem var(--font-body); color: #796748; }
.archive-cabinet > summary .atlas-icon { margin-right: 12px; }
.archive-cabinet > summary::after { content: "+"; }
.archive-cabinet[open] > summary::after { content: "−"; }

/* The reading room: quotation first, context when wanted. */
.cabinet .page { max-width: 1380px; }
.cabinet .page-head { margin-top: 10px; margin-bottom: 30px; }
.cabinet .page-head h1 { font-size: clamp(2.5rem, 4vw, 4rem); }
.cabinet .page-head h1.long { font-size: clamp(1.8rem, 3vw, 3rem); }
.cabinet .page-head .eyebrow { font-size: .65rem; letter-spacing: .17em; }
.cabinet .page-head .lede { font: 1.12rem/1.5 var(--font-display); max-width: 64ch; }
.cabinet .page-top > .orn.head { opacity: .6; max-width: 120px; }
.cabinet .px-layout { grid-template-columns: 236px minmax(0, 1fr); gap: 38px; }
.cabinet .px-side { background: #e6d4af66; border: 1px solid #c4ad7f; padding: 20px; align-self: start; }
.cabinet .filterbar label { font-size: .7rem; letter-spacing: .02em; }
.cabinet .filterbar :is(input, select), .cabinet .gallery-find input { font-family: var(--font-display); font-size: 1rem; min-height: 46px; background: #fcf5e5; border: 1px solid #bba47d; border-radius: 0; }
.cabinet .trailtabs { gap: 0; border-block: 1px solid #b7a27b; padding: 0; margin-bottom: 32px; }
.cabinet .trailtabs a { border-radius: 0; border: 0; padding: 14px 20px; font-family: var(--font-heading); background: transparent; }
.cabinet .trailtabs a[aria-current] { background: #58332c; color: #fce8c3; }
.reading-mode-bar { display: flex; justify-content: flex-end; margin-bottom: 12px; }
.reading-mode-bar .btn { font: 1rem var(--font-display); }
.cabinet .psg:not(.book-entry) { background: linear-gradient(100deg, #b0986710, transparent 4%), #fbf3e1; border: 1px solid #c7b58e; padding: clamp(23px, 3vw, 38px); box-shadow: 3px 4px 0 #e4d6b8, 3px 5px 0 #c8b690; position: relative; }
.cabinet .psg:not(.book-entry)::before { content: ""; position: absolute; inset: 9px auto 9px 8px; border-left: 1px solid #bfa87c44; pointer-events: none; }
.cabinet .psg:not(.book-entry) h3 { font-size: clamp(1.55rem, 2vw, 1.95rem); margin-top: 10px; }
.cabinet .psg:not(.book-entry) blockquote { margin: 22px 0; border-left: 0; padding: 0; font-size: 1.28rem; line-height: 1.7; color: #382a20; }
.cabinet .psg blockquote > p:first-child::first-letter { font-family: var(--font-heading); color: #7b4331; }
.psg-context { margin: 12px 0 20px; font: .85rem var(--font-body); color: #736045; }
.psg-context > summary { cursor: pointer; min-height: 36px; padding-block: 8px; width: fit-content; }
.psg-context .gloss { font: 1.05rem/1.6 var(--font-display); margin-top: 10px; }
.cabinet .psg-foot .who { font-family: var(--font-display); font-size: 1rem; }
.cabinet .psg-links { flex-wrap: wrap; gap: 12px 20px; align-items: center; }
.passage-action { display: inline-flex; align-items: center; gap: 6px; border: 0; background: none; color: #754e27; padding: 6px 0; min-height: 44px; cursor: pointer; font: .75rem var(--font-body) !important; }
.passage-action .atlas-icon { width: 17px; height: 17px; flex-basis: 17px; }
.passage-action[aria-pressed="true"] { color: #873c32; }
.passage-action[aria-pressed="true"] .atlas-icon { fill: #873c3222; }
.cabinet .psg-notes { border-left: 2px solid #b47a50; padding-left: 13px; font: .84rem/1.6 var(--font-body); }
.cabinet .psg-tale { background: #e6d5b448; border-top: 1px solid #cdb990; padding: 16px; margin-top: 24px; }

/* Maps are framed as objects; typography and controls stay flat and legible. */
.cabinet .gallery { gap: 30px 24px; }
.cabinet .mapcard { background: transparent; border: 0; padding: 0 0 12px; box-shadow: none; transition: transform .25s; }
.cabinet .mapcard:hover { transform: translateY(-4px); }
.cabinet .mapcard-img { padding: 9px; background: #edddba; border: 1px solid #a68a57; box-shadow: 2px 3px 0 #ad936a, 5px 9px 15px #4c371b22; }
.cabinet .mapcard-img img { background: #d8c9a3; }
.cabinet .mapcard-t { font: 1.4rem var(--font-heading); padding-inline: 4px; }
.cabinet .mapcard-when { color: #8a5e2e; margin-top: 17px; padding-inline: 4px; }
.cabinet .mapcard-sub { font-family: var(--font-display); padding-inline: 4px; }
.cabinet .gallery-bar { background: #e5d2ae66; border-block: 1px solid #b8a17b; padding: 20px; }
.cabinet .gallery-bar .pill { border-radius: 0; }
.cabinet .ridecard { background: #faf1dd; border: 1px solid #bba67b; box-shadow: 4px 5px 0 #d9c5a0; padding: 24px; transition: transform .3s; }
.cabinet .ridecard:hover { transform: translateY(-5px); }
.cabinet .ridecard-t { font-family: var(--font-heading); }
.cabinet .ride-sheet { border: 7px solid #a78d5a; box-shadow: 0 0 0 1px #634824, 5px 8px 0 #c0a774, 10px 17px 25px #4b331933; background: #e4d2ae; }
.cabinet .ride-bar { padding: 10px 15px; background: #eadcbd; border: 1px solid #ac9569; }
.cabinet .ride-num { background: #704338; color: #fbecc7; border-color: #4f2c24; }
.cabinet .ride-stop { scroll-margin-top: 105px; }
.journey-progress { height: 4px; background: #d3be94; overflow: hidden; }
.journey-progress i { display: block; height: 100%; width: var(--progress, 0%); background: #8a5932; transition: width .35s; }
.cabinet .explorer .side { background: #eee1c6; box-shadow: -8px 0 18px #291b111a; }
.cabinet .side-sec h1 { font-size: 2rem; }
.cabinet .side-sec h2 { font-family: var(--font-heading); font-size: 1.3rem; }
.cabinet .side-sec.intro > p { display: none; }
.cabinet .map-note { font: .6rem var(--font-body); }

/* The time instrument. The new wheel controls the existing source selector. */
.cabinet .dial-workbench { border: 1px solid #826133; background: #2c2117 url("scholars-desk.webp") center / cover; padding: 24px; gap: 26px; box-shadow: inset 0 0 0 6px #241b10, inset 0 0 0 7px #9d7b40, 0 18px 35px -25px #1e130cbb; }
.cabinet .dial-scroll { border: 6px solid #d0b881; box-shadow: 4px 7px 0 #826234, 8px 15px 18px #0005; }
.cabinet .dial-console { color: #efdfbc; gap: 14px; }
.cabinet .dial-console h2 { color: #f5e7c7; }
.cabinet .dial-current { border: 0; padding: 0; }
.cabinet .dial-current > .eyebrow { color: #bdad8b; }
.cabinet .dial-current-sheet, .cabinet .dial-view-state { color: #c2af8b; }
.cabinet .dial-view-state { font: .64rem/1.5 var(--font-body); }
.cabinet .dial-current-year { color: #e6c583; }
.cabinet .dial-select-label { color: #d6c3a0; font: .66rem var(--font-body); }
.cabinet .dial-console select { width: 100%; background: #f3e7cb; color: #37281a; border: 1px solid #bd9e66; border-radius: 0; min-height: 42px; }
.cabinet .dial-console .dial-toggles .pill { color: #e7d6b2; border: 1px solid #7e673f; background: #24190f88; font-size: .89rem; border-radius: 2px; }
.cabinet .dial-console .pill[aria-pressed="true"] { color: #281d13; background: #c6a467; }
.cabinet .dial-console .btn.primary { background: #c4a062; color: #2b1d11; border-color: #e1c384; }
.cabinet .dial-scale { color: #d0b37d; }
.cabinet .dial-rule { border-color: #b99659; }
.cabinet .dial-scale-note { color: #c8b693; font: .63rem var(--font-body); }
.cabinet .dial-pan-hint { color: #c8b693; }
.chronometer { position: relative; width: 174px; height: 174px; border-radius: 50%; margin: 1px auto 17px; background: radial-gradient(circle, #292016 0%, #49371f 58%, #bd9b58 59%, #e6cd92 61%, #81602f 63%, #cfb574 65%, #a58448 68%, #e6d09c 70%); box-shadow: 0 4px 0 #78562e, 0 7px 0 #ba9854, 0 12px 16px #0007, inset 0 0 0 1px #e2c17e; cursor: grab; touch-action: none; user-select: none; }
.chronometer:active { cursor: grabbing; }
.chronometer::before { content: ""; position: absolute; inset: 13px; border: 1px dashed #c7a365; border-radius: 50%; }
.chronometer i { position: absolute; inset: 17px; transform: rotate(var(--angle, 0deg)); transition: transform .22s; }
.chronometer i::before { content: ""; position: absolute; top: -8px; left: calc(50% - 5px); width: 10px; height: 17px; background: #edd395; clip-path: polygon(50% 0, 100% 100%, 0 100%); }
.chronometer .chrono-value { position: absolute; inset: 51px 25px; display: grid; place-items: center; align-content: center; font: 2.15rem/1.1 var(--font-heading); color: #efd8a3; text-align: center; pointer-events: none; }
.chrono-value small { font: .47rem var(--font-body); letter-spacing: .22em; margin-top: 10px; color: #c4a46a; }
.cabinet .dial-card { background: #f8eed7; padding: 27px; border: 1px solid #bca67c; }
.cabinet .dial-how > summary { cursor: pointer; font: 1.5rem var(--font-heading); padding-block: 12px; }
.cabinet .dial-how p { max-width: 85ch; }
.cabinet .dial-reading-note { font: .74rem/1.6 var(--font-body); }

/* A game table with physical cards. */
.cabinet .deck .page-head { margin-inline: auto; text-align: center; max-width: 55rem; }
.cabinet .deck-table { position: relative; padding: 42px 55px 65px; gap: 52px; background: #211811 url("scholars-desk.webp") center / cover; border: 1px solid #ad8e54; box-shadow: inset 0 0 0 9px #20150eaa, inset 0 0 0 10px #ae8c4c88, 0 18px 30px -20px #321d11aa; }
.cabinet .deck-table::before { content: ""; position: absolute; pointer-events: none; inset: 25px; border: 1px solid #ad915342; }
.cabinet .deck-table .spread { position: relative; }
.cabinet .deck-table .spread-k { color: #d3b77e; font: .66rem var(--font-body); letter-spacing: .2em; padding-bottom: 8px; }
.cabinet .deck { --card-back: #47272a; --card-line: #d2b578; --card: #f6e9c9; --card-ink: #392b1c; --card-ink-2: #614a31; }
.cabinet .pc-back-in { border-radius: 0; background-image: repeating-linear-gradient(45deg, #e3bd6b05 0 1px, transparent 1px 5px); }
.cabinet .pc-back { border: 2px solid #d6bd89; box-shadow: 3px 4px 0 #a99773, 5px 6px 0 #684331, 7px 16px 20px #0008; }
.cabinet .pc-back-in::after { content: "✧"; color: #cfb16c; position: absolute; bottom: 13%; left: 46%; font-size: 1rem; }
.cabinet .pcard, .cabinet .pc-back, .cabinet .pc-face { border-radius: 5px; }
.cabinet .pcard:hover { transform: translateY(-9px) rotate(-1deg); }
.cabinet .pcard.sel { transform: translateY(-13px); }
.deck-table-legend { position: absolute; bottom: 22px; left: 0; right: 0; text-align: center; color: #b69a63; font: .55rem var(--font-body); pointer-events: none; }
.cabinet .deck-stack-k { color: #e5cf9c; }

/* Native dialogs provide Escape, keyboard trapping, and focus restoration. */
.atlas-dialog { color: #30271e; border: 1px solid #ad8c50; background: #f2e6ca url("home-parchment.webp") center / 760px; box-shadow: 0 30px 100px #120b0999, inset 0 0 0 5px #f6eacb; width: min(760px, calc(100vw - 32px)); max-height: calc(100dvh - 48px); padding: 30px; overflow: auto; overscroll-behavior: contain; }
.atlas-dialog::backdrop { background: #16100dc9; backdrop-filter: blur(4px); }
body:has(.atlas-dialog[open]) { overflow: hidden; }
.dialog-head { display: flex; align-items: center; justify-content: space-between; gap: 20px; border-bottom: 1px solid #b6a17c; padding-bottom: 16px; margin-bottom: 22px; }
.dialog-head h2 { font: 2rem var(--font-heading); }
.dialog-head .eyebrow { font-size: .57rem; }
.dialog-close { color: #6e4c28; flex-shrink: 0; }
.global-search-label { display: block; font-size: .74rem; color: #6d5c42; margin-bottom: 9px; }
.global-search-box { display: flex; align-items: center; gap: 15px; padding: 12px 16px; border: 1px solid #9e8151; background: #fff8e9; }
.global-search-box input { width: 100%; border: 0; background: none; color: #30271e; font-size: 1.2rem; min-height: 30px; padding: 0; }
.search-status { font-size: .7rem; color: #6b593e; margin: 15px 0; }
.search-result { display: block; text-decoration: none; color: #35281c; padding: 15px 13px; border-top: 1px solid #cbb994; }
.search-result:hover { background: #dfcca64d; }
.search-result small { display: block; color: #8a5b2d; font: .59rem var(--font-body); text-transform: uppercase; letter-spacing: .1em; }
.search-result strong { display: block; font: 1.18rem/1.25 var(--font-heading); margin: 5px 0; }
.search-result span { display: block; color: #746045; font-size: .85rem; }
.collection-note { font-size: .69rem; color: #776343; margin-top: -11px; margin-bottom: 22px; }
.collection-empty { text-align: center; padding: 45px 30px; border: 1px dashed #b9a078; }
.collection-empty .atlas-icon { width: 40px; height: 40px; color: #936b33; margin-bottom: 16px; }
.collection-empty h3 { font-size: 1.5rem; }
.collection-empty p { max-width: 35ch; font-size: 1rem; color: #79664b; margin: 14px auto; }
.collection-item { display: flex; gap: 16px; align-items: center; border-top: 1px solid #c8b38c; }
.collection-item .search-result { flex: 1; border: 0; }
.collection-item button { flex-shrink: 0; }
.atlas-toast { position: fixed; bottom: 25px; left: 50%; transform: translateX(-50%); z-index: 100; padding: 12px 22px; background: #382a1f; color: #f6dfb2; box-shadow: 0 5px 22px #1f140b55; border: 1px solid #c7a46a; font: .78rem var(--font-body); max-width: calc(100vw - 40px); }
.reader-dialog { width: min(1130px, calc(100vw - 40px)); background: #281d14 url("scholars-desk.webp") center / cover; color: #e9d6ad; padding: 25px 32px; }
.reader-dialog .dialog-head { border-color: #9b7c4566; margin-bottom: 25px; }
.reader-dialog .dialog-head h2 { font-size: 1.4rem; }
.reader-dialog .dialog-close { color: #dfc28c; }
.reader-document { color: #392a1e; }
.reader-spread { display: grid; grid-template-columns: .9fr 1.1fr; background: #efe1bb; border: 7px solid #552e24; border-radius: 6px 10px 10px 6px; box-shadow: 0 3px 0 #a58b59, 0 6px 0 #d7c49a, 0 9px 0 #a0885e, 0 12px 0 #4b2b21, 0 25px 25px #0007; perspective: 1400px; }
.reader-left, .reader-right { padding: clamp(23px, 3.5vw, 48px); background: url("home-parchment.webp") center / 760px; min-width: 0; }
.reader-left { border-right: 1px solid #b49a6b; box-shadow: inset -16px 0 28px -12px #63442466; text-align: center; }
.reader-right { box-shadow: inset 17px 0 25px -18px #4f321c88; transform-origin: left center; }
.reader-document .reader-running { font: .55rem var(--font-body); letter-spacing: .17em; text-transform: uppercase; color: #806440; margin-bottom: 24px; }
.reader-left h3 { font: 1.8rem/1.2 var(--font-heading); margin-bottom: 20px; }
.reader-left .who { font: 1rem/1.5 var(--font-display); color: #796044; }
.reader-left .psg-context { text-align: left; margin-top: 30px; border-top: 1px solid #bba57b; padding-top: 15px; }
.reader-left .psg-context .gloss { font-size: 1.08rem; }
.reader-right h3 { font: 1.75rem/1.25 var(--font-heading); text-align: center; margin-bottom: 25px; }
.reader-document blockquote { font: 1.3rem/1.75 var(--font-display); margin: 0; padding: 0; border: 0; }
.reader-document blockquote .q-tag { font: .61rem var(--font-body); color: #785c35; margin-top: 14px; }
.reader-right blockquote > p:first-child::first-letter { font: 3.1rem/.9 var(--font-heading); float: left; margin: 8px 7px 0 0; color: #773e2c; }
.reader-apparatus { margin-top: 30px; padding: 21px; background: #efe1c4; font-size: .85rem; }
.reader-apparatus .psg-links { display: flex; gap: 12px 22px; align-items: center; }
.reader-apparatus .psg-foot { margin-bottom: 15px; }
.reader-apparatus .psg-notes { margin-top: 16px; }
.reader-nav { display: flex; justify-content: space-between; gap: 15px; align-items: center; padding-top: 24px; }
.reader-nav [data-reader-count] { font: .69rem var(--font-body); color: #e0c896; }
.reader-nav .btn { font-size: 1rem; }
.reader-right.turning { animation: reader-leaf .5s ease both; }
@keyframes reader-leaf { from { opacity: .2; transform: rotateY(-45deg); } to { opacity: 1; transform: rotateY(0); } }
.cabinet .site-footer { border-top: 1px solid #8b6d3d; background: #211a16; color: #d9c7a5; padding-block: 35px; }
.cabinet .site-footer a { color: #d7b77a; font-size: .88rem; }
.cabinet .site-footer .orn { color: #b79356; }

@media (max-width: 1190px) {
  .cabinet .site-nav { gap: 15px; }
  .cabinet-header .cabinet-tool > span { display: none; }
  .cabinet .cabinet-header .bar { gap: 16px; }
  .room-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .room-door { padding-block: 18px 21px; }
  .room-object { height: 115px; }
  .cabinet .deck-table { padding-inline: 30px; gap: 35px; }
}
@media (max-width: 960px) {
  .cabinet .site-nav { display: none; }
  .cabinet-actions { margin-left: auto; }
  .atlas-home .study-table .front-opening { padding-top: 40px; gap: 28px; grid-template-columns: .8fr 1fr; }
  .atlas-home .front-intro h1 { font-size: 3rem; }
  .study-invitation { font-size: 1.05rem; }
  .study-totals { gap: 20px; margin-top: 26px; }
  .atlas-home .study-map .front-stage { height: 350px; }
  .atlas-home .study-map .front-how { display: none; }
  .cabinet .px-layout { grid-template-columns: 1fr; gap: 18px; }
  .cabinet .px-side { padding: 15px; }
  .cabinet .px-side .basis-legend { display: none; }
  .cabinet .dial-workbench { grid-template-columns: 1fr; padding: 20px; }
  .cabinet .dial-console { display: grid; grid-template-columns: 150px 1fr 1fr; align-items: center; gap: 10px 20px; }
  .chronometer { grid-column: 1; grid-row: 1 / 6; width: 142px; height: 142px; margin: 0; }
  .chronometer .chrono-value { inset: 38px 18px; font-size: 1.9rem; }
  .cabinet .dial-console .dial-current { grid-column: 2; grid-row: 1 / 4; padding: 0; border: 0; }
  .cabinet .dial-current-year { display: none; }
  .cabinet .dial-console .dial-select-label { grid-column: 3; }
  .cabinet .dial-console select { grid-column: 3; }
  .cabinet .dial-console .dial-bar { grid-column: 2 / 4; }
  .cabinet .dial-console .dial-toggles { grid-column: 2 / 4; }
  .cabinet .dial-console :is(.dial-view-state, .dial-load-state, .dial-transition) { grid-column: 1 / -1; }
}
@media (max-width: 700px) {
  :root { --header-h: 68px; }
  .cabinet .cabinet-header .bar { min-height: 68px; }
  .atlas-brand { gap: 8px; }
  .atlas-brand b { font-size: 1.75rem; }
  .atlas-brand small { font-size: .38rem; letter-spacing: .12em; }
  .brand-seal { width: 33px; height: 33px; }
  .brand-seal .atlas-icon { width: 25px; height: 25px; }
  .cabinet-actions { gap: 1px; }
  .cabinet-tool { padding-inline: 7px; }
  .atlas-menu > summary { padding: 8px 10px; font-size: .76rem !important; }
  .atlas-menu > summary > .atlas-icon { display: none; }
  .cabinet-tool small { position: absolute; top: 9px; margin-left: 21px; font-size: .54rem; min-width: 14px; height: 14px; line-height: 13px; background: #2d2017; }
  .cabinet-menu { right: 10px; width: calc(100vw - 20px); max-height: calc(100dvh - 80px); padding: 20px; }
  .compact.room-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .compact .room-door { padding: 18px 10px; min-height: 133px; }
  .compact .room-name { font-size: 1.08rem; }
  .compact .room-note { font-size: .57rem; }
  .menu-heading .eyebrow { font-size: .57rem; }
  .atlas-home .study-table .front-opening { display: block; padding: 35px 23px 28px; }
  .study-table::before { background: linear-gradient(180deg, #1e130ed9, #160f0b44); }
  .atlas-home .front-intro { max-width: 540px; margin: auto; }
  .atlas-home .front-intro h1 { font-size: clamp(2.8rem, 8.5vw, 4rem); margin: 18px 0; }
  .study-invitation { font-size: 1.12rem; max-width: 39ch; }
  .study-actions { margin-top: 23px; gap: 22px; }
  .study-totals { margin: 24px 0 28px; gap: 26px; padding-top: 15px; }
  .study-totals b { font-size: 1.3rem; }
  .atlas-home .study-map .front-map-mount { transform: rotateZ(.6deg); padding: 5px; }
  .atlas-home .study-map .front-stage { height: 330px; }
  .atlas-home .study-map .front-tools .btn { min-height: 40px; }
  .atlas-home .study-map .front-map-caption { padding-top: 17px; }
  .atlas-home .study-map .front-credit { font-size: .79rem; }
  .cabinet-home-content { padding-top: 38px; }
  .room-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 13px; }
  .room-object { height: 111px; margin-bottom: 9px; }
  .room-door { padding: 17px 8px; }
  .room-name { font-size: 1.13rem; }
  .room-note { font-size: .58rem; }
  .room-enter { margin-top: 10px; }
  .atlas-home .front-margin { display: block; padding: 0 0 10px; }
  .atlas-home .front-margin h2 { font-size: 2rem; margin-block: 10px; }
  .atlas-home .front-margin > a { display: inline-block; margin: 4px 0 12px; }
  .atlas-home .front-body { margin-top: 35px; }
  .atlas-home .passage-book { padding-inline: 0; }
  .archive-cabinet > summary { align-items: flex-start; font-size: 1.2rem; }
  .archive-cabinet > summary small { display: none; }
  .cabinet .page-head h1 { font-size: 2.5rem; }
  .cabinet .page-top > .orn.head { display: none; }
  .cabinet .trailtabs { overflow-x: auto; flex-wrap: nowrap; }
  .cabinet .trailtabs a { white-space: nowrap; padding: 13px 17px; }
  .cabinet .psg:not(.book-entry) { padding: 24px; }
  .cabinet .psg:not(.book-entry) blockquote { font-size: 1.2rem; }
  .reading-mode-bar { justify-content: stretch; }
  .reading-mode-bar .btn { width: 100%; }
  .cabinet .gallery-bar { padding: 14px; }
  .cabinet .dial-workbench { padding: 17px 12px; }
  .cabinet .dial-console { grid-template-columns: 125px minmax(0, 1fr); gap: 12px 17px; }
  .chronometer { width: 120px; height: 120px; grid-row: 1 / 3; }
  .chronometer .chrono-value { inset: 31px 13px; font-size: 1.65rem; }
  .chrono-value small { font-size: .38rem; margin-top: 6px; }
  .cabinet .dial-console .dial-current { grid-column: 2; grid-row: 1 / 3; }
  .cabinet .dial-current h2 { font-size: 1.2rem; }
  .cabinet .dial-current-sheet { font-size: .8rem; }
  .cabinet .dial-console .dial-select-label { grid-column: 1 / -1; margin-top: 6px; }
  .cabinet .dial-console select { grid-column: 1 / -1; }
  .cabinet .dial-console :is(.dial-bar, .dial-toggles) { grid-column: 1 / -1; }
  .cabinet .dial-card { padding: 20px; }
  .cabinet .deck-table { padding: 30px 20px 58px; gap: 20px; }
  .cabinet .deck-table::before { inset: 14px; }
  .cabinet .deck-table .spread-k { font-size: .52rem; letter-spacing: .12em; }
  .cabinet .deck-stack { max-width: 77px; }
  .cabinet .deck-stack-k { font-size: .7rem; }
  .reader-dialog { width: calc(100vw - 14px); padding: 17px 13px; max-height: calc(100dvh - 14px); }
  .reader-spread { grid-template-columns: 1fr; border-width: 5px; }
  .reader-left, .reader-right { padding: 27px; }
  .reader-left { border-right: 0; border-bottom: 1px solid #bba57b; }
  .reader-left .psg-context { margin-top: 16px; }
  .reader-left h3 { font-size: 1.5rem; }
  .reader-right { box-shadow: none; }
  .reader-document blockquote { font-size: 1.19rem; }
  .reader-nav { gap: 8px; }
  .reader-nav .btn { font-size: .83rem; padding-inline: 10px; }
  .reader-nav [data-reader-count] { font-size: .6rem; }
  .atlas-dialog:not(.reader-dialog) { padding: 22px; }
  .dialog-head h2 { font-size: 1.75rem; }
}
@media (max-width: 380px) {
  .cabinet .cabinet-header { padding-inline: 10px; }
  .cabinet .cabinet-header .bar { gap: 6px; }
  .brand-seal { display: none; }
  .atlas-brand b { font-size: 1.6rem; }
  .atlas-brand small { font-size: .35rem; }
  .cabinet-actions .atlas-icon { width: 20px; height: 20px; flex-basis: 20px; }
  .cabinet .deck-table { padding-inline: 14px; }
  .room-name { font-size: 1.05rem; }
  .room-note { font-size: .54rem; }
}
/* Reading paper is consistently warm; system dark mode affects the surroundings,
   not the contrast of historical images, quotations, or interactive controls. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) { --paper: #eaddc1; --panel: #faf2df; --sunk: #e0cda7; --ink: #30271e; --ink-2: #574735; --ink-3: #716149; --rule: #bba785; --rule-soft: #d6c6a6; --verdigris: #795026; --verdigris-soft: #eadbb8; --gamboge: #82581e; --carmine: #843d36; --carmine-soft: #efdbca; --paper-wash: #f4eacfbb; --mark: #fbe29a; color-scheme: light; }
}
@media (prefers-reduced-motion: reduce) {
  .cabinet *, .cabinet *::before, .cabinet *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .room-door, .atlas-home .study-map .front-map-mount { transform: none !important; }
}

.cabinet .reader-dialog .reader-document { background: none; border: 0; padding: 0; box-shadow: none; }
.cabinet .reader-dialog .reader-document::before { display: none; }
.cabinet .reader-dialog .reader-document blockquote { padding: 0; margin: 0; border: 0; }
.journey-itinerary { width: 100%; min-height: 44px; background: #f3e7ca; border: 1px solid #ad9567; color: #4b3522; padding: 8px 12px; border-radius: 0; }

.cabinet .psg blockquote::before { display: none; }
.reader-introduction { margin-top: 30px; padding-top: 22px; border-top: 1px solid #bda578; text-align: left; }
.reader-introduction h4 { font: .65rem var(--font-display); text-transform: uppercase; letter-spacing: .14em; color: #745633; margin: 0 0 15px; }
.reader-introduction .gloss { font: 1.08rem/1.6 var(--font-display); color: #635039; }
.reader-dialog .reader-nav { position: sticky; top: -26px; z-index: 5; background: #2b2017; margin: -8px -7px 25px; padding: 12px; border: 1px solid #a2834d55; }
.reader-apparatus > details:not(.psg-notes) { margin-top: 18px; }
.reader-apparatus > details summary { cursor: pointer; padding-block: 8px; }
@media(max-width:700px) { .reader-dialog .reader-nav { top: -18px; margin-inline: -2px; } .reader-introduction { margin-top: 22px; } }
@media (max-width: 600px) {
  .cabinet .deck-table .spread { display: flex; gap: 18px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 10px 8px 20px; scrollbar-color: #a6874f #2b1d12; scrollbar-width: thin; }
  .cabinet .deck-table .spread-slot { flex: 0 0 85%; scroll-snap-align: center; }
  .cabinet .deck-table .spread-k { font-size: .63rem; }
  .cabinet .deck-acts { display: flex; flex-wrap: wrap; gap: 12px; }
  .cabinet .deck-table { padding-bottom: 55px; }
  .cabinet .page-top { margin-bottom: 20px; }
}

.reader-mobile-byline { display: none; }
@media (max-width: 700px) {
  .reader-spread { display: flex; flex-direction: column; }
  .reader-left { order: 2; border-top: 1px solid #bba57b; border-bottom: 0; }
  .reader-right { order: 1; }
  .reader-mobile-byline { display: block; margin-top: 24px; padding-top: 18px; border-top: 1px solid #c5af86; color: #71593c; font: .91rem/1.5 var(--font-display); }
}

.cabinet .gallery .mapcard { min-width: 0; }
.cabinet .mapcard-t, .cabinet .mapcard-sub { overflow-wrap: anywhere; }
.cabinet-menu { width: min(980px, calc(100% - 44px)); }
@media (max-width:700px) { .cabinet-menu { width: calc(100% - 20px); } }
@media (max-width:450px) { .cabinet .gallery { grid-template-columns: minmax(0, 1fr); } }
