/*
 * R'aesh's journal · the cartographer's worktable
 * Load after style.css. Decoration is drawn in CSS, not fictional world imagery.
 * Keep all original controls, previews, source notes and native disclosure behavior.
 */

:root {
  --ink: #1c2b29;
  --paper: #eee5cf;
  --gold: #c6a66d;
  --muted: #a5b0a1;
  --line: #c5aa7238;
  --j-desk: #101d1d;
  --j-desk-light: #1d3030;
  --j-ink: #263630;
  --j-ink-soft: #59624e;
  --j-paper: #f0e8d6;
  --j-paper-edge: #ded0ad;
  --j-ochre: #a78144;
  --j-rust: #985841;
  --j-rule: #59624738;
  --j-serif: 'Cormorant Garamond', Georgia, 'Times New Roman', serif;
  --j-sans: 'DM Sans', Arial, sans-serif;
  --j-paper-texture: radial-gradient(ellipse at 22% 8%, #fffdf477, transparent 58%),
    repeating-linear-gradient(2deg, #8b785707 0, #8b785707 1px, transparent 1px, transparent 5px),
    repeating-linear-gradient(92deg, #9b8a6705 0, #9b8a6705 1px, transparent 1px, transparent 7px);
}

html { scroll-padding-top: 30px; }
body {
  background: var(--j-desk);
  color: var(--j-paper);
  font-family: var(--j-sans);
  -webkit-font-smoothing: antialiased;
}
body::selection { color: #f9f0db; background: #936342; }
body a, body button, body input, body select, body summary { -webkit-tap-highlight-color: transparent; }
body button, body input, body select { font-family: var(--j-sans); }
body :is(a, button, input, select, summary, canvas):focus-visible {
  outline: 2px solid #ba8249;
  outline-offset: 5px;
}
body button:disabled { cursor: default; }
body h1, body h2, body h3, body h4 { text-wrap: balance; }
body h1, body h2, body h3 { font-family: var(--j-serif); }
body p { text-wrap: pretty; }
body .eyebrow { font-size: 10px; font-weight: 500; letter-spacing: .19em; line-height: 1.7; }
body .main-link { font-size: 11px; letter-spacing: .035em; }
body .main-link span { font-size: 23px; }
body [hidden] { display: none !important; }

/* The narrow leather binding above the open worktable. */
body > header {
  position: relative;
  height: 86px;
  padding: 0 5.4%;
  gap: 30px;
  background: #111e1e;
  border-bottom: 1px solid #d9bd7c3d;
  box-shadow: inset 0 -5px 0 #070e0d26;
  z-index: 20;
}
body > header .wordmark {
  color: #f1e6c9;
  font: 500 24px/1 var(--j-serif);
  letter-spacing: .16em;
  gap: 12px;
  white-space: nowrap;
}
body > header .sigil { font-size: 36px; color: #c8a770; }
body > header .wordmark small {
  width: 94px;
  padding-left: 17px;
  border-left: 1px solid #bc9e674d;
  color: #b7b7a1;
  font: 8px/1.7 var(--j-sans);
  letter-spacing: .16em;
  white-space: normal;
}
body > header nav { gap: 27px; font-size: 11px; }
body > header nav a { padding: 13px 0; color: #d7d6c2; transition: color .18s; }
body > header nav a:hover { color: #e8ba7b; }
body > header nav button {
  padding: 11px 15px;
  background: #d4ba7820;
  color: #eee0bc;
  border: 1px solid #c4a46c60;
  border-radius: 1px 2px 1px 2px;
  font-size: 10px;
  letter-spacing: .035em;
}
body > header nav button span { color: #e6bd78; padding-left: 12px; }

/* A single large instrument, with a working paper slip at its left. */
#home.hero {
  height: calc(100svh - 86px);
  min-height: 860px;
  max-height: 1120px;
  padding: 0;
  isolation: isolate;
  overflow: hidden;
  background:
    radial-gradient(ellipse at 77% 41%, #52604d3b 0, #25382e26 38%, transparent 68%),
    linear-gradient(108deg, #102120 0%, #142524 46%, #101b1b 100%);
  border-bottom: 1px solid #ac91574d;
}
#home.hero::before {
  content: '';
  position: absolute;
  inset: 22px;
  z-index: -1;
  pointer-events: none;
  border: 1px solid #d0b98416;
  background:
    repeating-linear-gradient(0deg, transparent 0, transparent 95px, #d9c69704 95px, #d9c69704 96px),
    repeating-linear-gradient(90deg, transparent 0, transparent 95px, #d9c69704 95px, #d9c69704 96px);
}
#home.hero::after {
  content: '';
  position: absolute;
  left: 31px;
  top: 31px;
  width: 32px;
  height: 32px;
  border-top: 1px solid #d5b47a70;
  border-left: 1px solid #d5b47a70;
  pointer-events: none;
}
#home .atlas-console {
  position: relative;
  display: block;
  width: min(340px, 30vw);
  max-width: none;
  margin-left: 5.4%;
  padding: 47px 0 28px;
  z-index: 8;
}
#home .atlas-console > .eyebrow {
  color: #c1aa7b;
  font-size: 9px;
  letter-spacing: .16em;
  margin: 0 0 26px;
}
#home .atlas-console h1 {
  margin: 0 0 20px;
  color: #f3ead4;
  font-size: clamp(48px, 4.4vw, 70px);
  line-height: .99;
  letter-spacing: -.035em;
}
#home .atlas-console h1 em { color: #d8b77b; }
#home .console-note {
  margin: 0 0 28px;
  padding-left: 15px;
  border-left: 1px solid #c4a97170;
  color: #b7bba7;
  font: italic 20px/1.45 var(--j-serif);
}
#home .atlas-console > label {
  display: block;
  color: #c1b797;
  font-size: 9px;
  letter-spacing: .18em;
  margin-bottom: 10px;
}
#home .select-frame {
  position: relative;
  border: 1px solid #bb9b6480;
  background: #223431;
  box-shadow: 0 4px 13px #00000014, inset 0 0 0 3px #111c1a40;
}
#home .select-frame select {
  min-height: 53px;
  width: 100%;
  padding: 12px 14px;
  color: #f2e7cb;
  background: transparent;
  border: 0;
  font: 500 23px/1.2 var(--j-serif);
  appearance: auto;
}
#home .select-frame :is(option, optgroup) { background: #1a2b28; color: #efe4c8; }
#home .select-frame optgroup { font-style: normal; font-family: var(--j-sans); }
#home .globe-place-note {
  position: relative;
  margin: 22px 0 0;
  padding: 25px 24px 23px;
  color: var(--j-ink);
  background-color: var(--j-paper);
  background-image: var(--j-paper-texture);
  border: 1px solid #c6b58b;
  border-radius: 1px 3px 2px 1px;
  box-shadow: 3px 5px 0 #06141040, 0 9px 25px #00000020;
}
#home .globe-place-note::before {
  content: '';
  position: absolute;
  inset: 8px;
  border: 1px solid #75684a30;
  border-radius: 2px 1px 3px 1px;
  pointer-events: none;
}
#home .globe-place-note > .eyebrow {
  margin: 0 0 11px;
  color: #956145;
  font-size: 8px;
  letter-spacing: .17em;
}
#home .globe-place-note h2 { color: #263b32; font-size: 37px; letter-spacing: -.025em; margin: 0 0 9px; }
#home .globe-place-note > p:not(.eyebrow) {
  color: #53604e;
  font-size: 12px;
  line-height: 1.85;
  margin: 11px 0 12px;
  max-width: none;
  min-height: 0;
}
#home .globe-place-note .political-context {
  color: #8d6747 !important;
  font-size: 9px !important;
  line-height: 1.6 !important;
  letter-spacing: .04em;
  padding-bottom: 10px;
  border-bottom: 1px solid #7b75522b;
}
#home .globe-place-note .political-context:empty { display: none; }
#home .globe-place-note .main-link {
  position: relative;
  padding: 8px 0 5px;
  margin: 0;
  color: #754e31;
  font-size: 10px;
  border-bottom-color: #a2865466;
}
#home .globe-place-note .lore-noun:hover { color: #9a573d; }
#home .console-bottom {
  margin-top: 24px;
  padding: 0;
  border: 0;
  gap: 11px 20px;
  line-height: 1.7;
}
#home .console-bottom a, #home .console-bottom button {
  padding: 0;
  color: #c3bb9a;
  font-size: 10px;
  border: 0;
  background: none;
}
#home .console-bottom a:hover, #home .console-bottom button:hover { color: #edce91; }
#home .instrument {
  position: absolute;
  left: auto;
  right: -.4%;
  top: 45%;
  width: min(69vw, calc(100svh - 132px), 940px);
  height: min(69vw, calc(100svh - 132px), 940px);
  max-width: none;
  max-height: none;
  margin: 0;
  transform: translateY(-50%);
  z-index: 2;
}
#home .instrument::before {
  width: 108%;
  height: 1px;
  background: linear-gradient(90deg, transparent 3%, #c4ad783b 15%, #c4ad783b 85%, transparent 97%);
  transform: rotate(-25deg);
}
#home .instrument::after {
  content: '';
  position: absolute;
  inset: 2%;
  border-radius: 50%;
  border: 1px solid #bd9e6129;
  box-shadow: 0 0 0 7px #cfb47a05, 0 0 0 8px #cfb47a12;
  pointer-events: none;
}
#home .globe-wrap {
  width: 82%;
  height: 82%;
  border-radius: 50%;
  background: transparent;
  box-shadow: 20px 29px 52px #00000062, 0 0 75px #cead6915;
  z-index: 2;
}
#home .globe-wrap canvas { touch-action: none; }
#home .orbit-one { width: 92%; height: 92%; border-width: 1px; border-color: #d2af6c54; }
#home .orbit-two { width: 98%; height: 98%; border-color: #cfb57a24; border-style: dashed; }
#home .compass { font: 11px/1 Georgia, serif; color: #bd9e6a; letter-spacing: .08em; }
#home .north { top: -3px; }
#home .south { bottom: -3px; }
#home .east { right: -5px; }
#home .west { left: -5px; }
#home .moon-tracks { opacity: .55; }
#home .globe-controls { bottom: 2.5%; gap: 6px; z-index: 60; }
#home .globe-controls button {
  min-height: 34px;
  padding: 8px 13px;
  color: #dcd2b6;
  background: #152522f0;
  border: 1px solid #b89a655c;
  border-radius: 1px;
  font-size: 9px;
  letter-spacing: .035em;
  backdrop-filter: blur(8px);
}
#home .globe-controls button:hover { background: #334337; border-color: #c0a06b; }
#home .instrument-caption { bottom: -3.4%; color: #bcad87; font-size: 8px; letter-spacing: .21em; }
#home .moon-register { top: 105%; left: 16%; width: 68%; }
#home .moon-register p { color: #aab39e; font-size: 10px; line-height: 1.7; }
#home .moon-register p span { color: #829482; font-size: 8px; line-height: 1.6; }
#home #veilmoonStatus { color: #c4ae7d; font-size: 9px; }
#home .orbiting-moon .moon-name {
  color: #e8d9b4;
  background: #142320e8;
  border-radius: 1px;
  font: italic 18px/1.2 var(--j-serif);
}
#home .folio { top: auto; bottom: 34px; right: 36px; writing-mode: horizontal-tb; font-size: 7px; letter-spacing: .18em; color: #9b9b7c; }
#home .globe-pin { width: 32px; height: 32px; }
#home .pin-jewel { background: #f7e5a5; box-shadow: 0 0 0 2px #172722d0, 0 0 10px #f5e1a755; }
#home .pin-label { top: 30px; color: #f4e8cb; background: #182b26ed; border-color: #d1b27b66; font-size: 17px; padding: 5px 10px; }
#home .globe-region { color: #f1d99c; font-weight: 400; text-shadow: 0 1px 4px #071915, 0 0 8px #071915; }

/* The accounts: an actual reading surface, not a second dashboard. */
#stories.stories-section {
  position: relative;
  padding: 90px max(6.4vw, calc((100vw - 1220px)/2)) 94px;
  color: var(--j-ink);
  background-color: var(--j-paper);
  background-image: var(--j-paper-texture);
  border-top: 9px solid #dbc9a2;
  border-bottom: 1px solid #b8a37b;
  box-shadow: inset 0 2px 0 #9a825933;
}
#stories::before {
  content: '';
  position: absolute;
  inset: 20px 22px;
  border: 1px solid #8d78542b;
  pointer-events: none;
}
body .section-heading { align-items: end; gap: 50px; margin-bottom: 40px; }
body .section-heading h2 { font-size: clamp(50px, 5.2vw, 76px); line-height: .98; letter-spacing: -.035em; }
body .section-heading .eyebrow { margin-bottom: 20px; font-size: 9px; letter-spacing: .18em; }
body .section-heading > p { max-width: 320px; margin-bottom: 3px; line-height: 1.9; font-size: 12px; }
#stories .section-heading .eyebrow, #people .section-heading .eyebrow { color: var(--j-rust); }
#stories h2, #stories h3, #stories h4, #people h2 { color: #243a31; }
#stories em, #people em { color: #9b6e43; }
#stories .section-heading > p { color: #646751; }
#stories .story-shelf {
  position: relative;
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  align-items: stretch;
  gap: 8px;
  margin-top: 47px;
  padding: 0 0 14px;
  overflow: visible;
  border-bottom: 1px solid #65594360;
}
#stories .book {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 24px;
  min-width: 0;
  min-height: 225px;
  height: 100%;
  padding: 22px 17px 18px 23px;
  color: #ede3c9;
  background: #293d34;
  border: 1px solid #22382b;
  border-radius: 1px 3px 3px 1px;
  box-shadow: inset 4px 0 0 #10201666, inset 5px 0 0 #d5bb7338, 2px 3px 0 #76633c20;
  transform: none;
  transition: transform .2s, box-shadow .2s, background .2s;
}
#stories .book::after { content: ''; position: absolute; inset: 8px 7px 8px 13px; border: 1px solid #e4c78d28; pointer-events: none; }
#stories .book:nth-child(2) { background: #684937; }
#stories .book:nth-child(3) { background: #304b4d; }
#stories .book:nth-child(4) { background: #695d3c; }
#stories .book:nth-child(5) { background: #4e454b; }
#stories .book:nth-child(6) { background: #714633; }
#stories .book small { font-size: 7px; line-height: 1.7; letter-spacing: .12em; color: #d5c29a; }
#stories .book strong { font: 500 clamp(23px, 2vw, 30px)/1.07 var(--j-serif); letter-spacing: -.015em; }
#stories .book > span { font-size: 20px; color: #d5b67d; }
#stories .book.active, #stories .book:hover { transform: translateY(-7px); border-color: #a78144; box-shadow: inset 4px 0 0 #10201666, inset 5px 0 0 #d5bb7380, 2px 10px 13px #51422223; }
#stories .book.active::before { content: ''; position: absolute; left: 20px; top: -3px; width: 9px; height: 27px; background: #c49b5c; clip-path: polygon(0 0,100% 0,100% 100%,50% 80%,0 100%); }
#stories .reading-desk {
  position: relative;
  max-width: 920px;
  margin: 49px auto 0;
  padding: 0 58px 0 76px;
  border: 0;
  border-left: 1px solid #a5684f36;
  background: none;
}
#stories .reading-desk > .eyebrow { color: #986143; font-size: 9px; letter-spacing: .16em; margin-bottom: 17px; }
#stories .reading-desk h3 { font-size: clamp(40px, 4.3vw, 61px); line-height: 1.05; letter-spacing: -.035em; margin-bottom: 20px; }
#stories .reading-desk > p:not(.eyebrow) { color: #4d5b48; font-size: 15px; line-height: 1.95; }
#stories #storyChips { gap: 8px; margin-top: 24px; }
#stories #storyChips span { color: #756145; border: 1px solid #8b744a44; background: #d8c8a226; padding: 5px 9px; font-size: 9px; letter-spacing: .04em; }
#stories .story-reader { margin: 32px 0; padding-top: 29px; border-top: 1px solid #8a775744; max-width: none; }
#stories .story-reader > .eyebrow { color: #9b6749; font-size: 8px; margin-bottom: 22px; }
#stories .journal-chapter { margin: 0 0 25px; padding: 0; border: 0; }
body .chapter-number, body .entry-number { display: none; }
#stories .journal-chapter h4 { margin: 0 0 11px; font: 500 32px/1.15 var(--j-serif); letter-spacing: -.015em; }
#stories .journal-chapter p { color: #4b5848; font-size: 14px; line-height: 1.95; max-width: 69ch; }
#stories .later-chapters, #stories .sealed-page { border-color: #8a775744; }
#stories .later-chapters > summary, #stories .sealed-page summary { color: #835331; font-size: 11px; line-height: 1.7; border-top-color: #8a775744; padding: 14px 0; }
#stories .sealed-page p, #stories .map-era-context { color: #4b5848; }
#stories .reading-desk .reader-note {
  color: #826c48 !important;
  font: italic 21px/1.5 var(--j-serif) !important;
  padding-left: 19px;
  border-left: 1px solid #9b7f4b6b;
  margin: 29px 0 0;
}
#stories .cast-links small { color: #8a7150; font-size: 8px; letter-spacing: .16em; }
#stories .cast-links a, #stories .cast-links button, #stories .story-place { color: #6d5235; border-bottom-color: #92754b66; font-size: 11px; }
#stories .related-stories { border-top-color: #8a775744; }
#stories .related-stories small { color: #8a7150; }
#stories .related-stories button { color: #6d5235; }
#stories .lore-noun { border-bottom-color: #9a7758; }
#stories .lore-noun:hover { color: #99573b; }

/* A dark engraved register between the two paper sections. */
#gods.lore-section {
  position: relative;
  padding: 90px max(6.4vw, calc((100vw - 1220px)/2)) 86px;
  background: radial-gradient(ellipse at 90% 0, #44533c23, transparent 70%), #182826;
  border-top: 1px solid #e4c38c38;
  border-bottom: 1px solid #a5854944;
}
#gods .section-heading .eyebrow { color: #bf9e65; }
#gods .section-heading h2 { color: #ede5ce; }
#gods .section-heading h2 em { color: #c7a974; }
#gods .section-heading > p { color: #a9b19c; }
body .lore-tabs { gap: 0; margin: 34px 0 35px; border-bottom: 1px solid #c4ab753b; }
body .lore-tabs button { min-height: 43px; padding: 11px 20px; border: 0; border-bottom: 2px solid transparent; color: #afb69f; background: transparent; font-size: 10px; letter-spacing: .04em; }
body .lore-tabs button:first-child { padding-left: 0; padding-right: 23px; }
body .lore-tabs button[aria-pressed=true] { color: #ead8ad; border-bottom-color: #c6a366; background: none; }
#gods #godEntries { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 34px; max-width: none; }
#gods .entity-index-link {
  display: flex;
  align-items: center;
  min-height: 84px;
  margin: 0;
  padding: 20px 0;
  border-bottom: 1px solid #d2b57c2b;
  color: #dedac2;
  font: 400 28px/1.15 var(--j-serif);
  transition: color .18s, padding-left .18s;
}
#gods .entity-index-link:hover { color: #e8bc77; padding-left: 6px; }
#gods .browse-all { grid-column: 1/-1; margin-top: 30px; color: #c8af7d; font-size: 11px; }

/* Collected lives, mounted rather than cropped. */
#people.people-section {
  position: relative;
  padding: 90px max(6.4vw, calc((100vw - 1220px)/2)) 100px;
  color: var(--j-ink);
  background-color: #e8dfc9;
  background-image: var(--j-paper-texture);
  border-top: 8px solid #d7c7a2;
}
#people .section-heading > p { color: #65705a; }
#people .lore-tabs { border-bottom-color: #7b6b4d45; }
#people .lore-tabs button { color: #687257; }
#people .lore-tabs button[aria-pressed=true] { color: #805332; border-bottom-color: #916337; }
#peopleEntries, body .character-card-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: start; gap: 32px; max-width: none; }
body .character-card {
  position: relative;
  min-width: 0;
  margin: 0;
  overflow: hidden;
  color: #26362e;
  background: var(--j-paper-texture), #f3ecd9;
  border: 1px solid #b8a57d;
  border-radius: 2px 1px 3px 1px;
  box-shadow: 3px 5px 0 #8b74451a, 0 7px 22px #66502a0d;
  transform: none;
  transition: transform .22s, box-shadow .22s;
}
body .character-card::before { inset: 7px; border-color: #98845833; border-radius: 1px 3px 1px 2px; }
body .character-card:hover, body .character-card:focus-visible { transform: translateY(-5px); box-shadow: 3px 8px 0 #8b74451a, 0 14px 24px #66502a20; outline: 2px solid #a88652; outline-offset: 4px; }
body .character-art {
  position: relative;
  height: 310px;
  margin: 17px 17px 0;
  background: radial-gradient(ellipse at center, #566051, #25362d 90%);
  border: 1px solid #76634155;
  overflow: hidden;
}
body .character-art::after {
  content: '';
  position: absolute;
  inset: 6px;
  pointer-events: none;
  border: 1px solid #cbb58032;
  box-shadow: 0 0 0 7px #17231a16;
}
body .character-art img { width: 100%; height: 100%; display: block; object-fit: contain; object-position: center; }
body .character-inscription { padding: 23px 27px 28px; }
body .card-kicker { color: #977449; font-size: 8px; letter-spacing: .17em; }
body .character-inscription h3 { color: #2d4033; font: 500 34px/1.02 var(--j-serif); letter-spacing: -.025em; margin: 10px 0 !important; }
body .character-inscription .card-role { color: #7c725a !important; font-size: 10px !important; letter-spacing: .025em; line-height: 1.6; margin: 9px 0 15px !important; }
body .character-inscription .card-observation { color: #52604b !important; font: italic 20px/1.4 var(--j-serif) !important; margin: 0 !important; }
body .card-open { color: #936443; font-size: 8px; letter-spacing: .15em; margin-top: 23px; padding-top: 14px; border-top: 1px solid #a18b603b; }
body .character-art.unillustrated {
  background: radial-gradient(ellipse at center, #d9caa457, transparent 63%), #e5dac0;
  border: 1px solid #a8926d65;
}
body .portrait-monogram { width: 132px; height: 132px; color: #8b7652; border-color: #b39a6866; border-radius: 48% 52% 49% 51%; font: italic 72px/1 var(--j-serif); box-shadow: 0 0 0 7px #ad956214, 0 0 0 8px #ad956222; }
body .portrait-pending { margin-top: 24px; color: #938364; font: italic 15px/1.4 var(--j-serif); }
#people .browse-all { color: #805b36; border-bottom-color: #a18b6055; font-size: 11px; margin-top: 5px; }

/* Full entries are open folios. The right-hand margin holds the source portrait. */
#entityPage {
  position: relative;
  min-height: 72vh;
  width: min(1260px, calc(100% - 80px));
  margin: 38px auto 55px;
  padding: 50px 74px 80px;
  color: var(--j-ink);
  background-color: var(--j-paper);
  background-image: var(--j-paper-texture);
  border: 1px solid #c5b287;
  border-radius: 2px 3px 1px 2px;
  box-shadow: 5px 7px 0 #b49d6e20, 0 24px 70px #00000030;
  isolation: isolate;
}
#entityPage::before {
  content: '';
  position: absolute;
  inset: 12px 14px;
  border: 1px solid #947c4e55;
  border-radius: 3px 1px 4px 2px;
  z-index: -1;
  pointer-events: none;
}
#entityPage::after {
  content: '';
  position: absolute;
  top: 28px;
  left: 31px;
  bottom: 28px;
  width: 8px;
  border-left: 1px solid #a17d5444;
  border-right: 1px solid #a17d541b;
  transform: rotate(.045deg);
  z-index: -1;
  pointer-events: none;
}
#entityPage:has(.entity-body) { display: grid; grid-template-columns: minmax(0, 1fr) 286px; column-gap: 56px; align-items: start; }
#entityPage:has(.entity-body) > .entry-back { grid-column: 1/-1; grid-row: 1; }
#entityPage:has(.entity-body) > .eyebrow { grid-column: 1/-1; grid-row: 2; }
#entityPage:has(.entity-body) > h1 { grid-column: 1; grid-row: 3; }
#entityPage:has(.entity-body) > .entry-lead { grid-column: 1; grid-row: 4; }
#entityPage:has(.entity-body) > .entity-body { grid-column: 1; grid-row: 5; }
#entityPage .entry-back { width: fit-content; color: #896b43; font-size: 10px; letter-spacing: .04em; margin: 0 0 43px; border-bottom: 1px solid #a38d6340; padding-bottom: 8px; }
#entityPage > .eyebrow { color: #9b6245; max-width: 780px; font-size: 9px; line-height: 1.8; letter-spacing: .16em; margin: 0 0 18px; }
#entityPage > h1 { color: #293e32; font-size: clamp(47px, 5.7vw, 80px); line-height: .98; letter-spacing: -.045em; margin: 0 0 24px; overflow-wrap: break-word; text-wrap: balance; }
#entityPage .entry-lead { color: #667052; max-width: 720px; margin: 0 0 23px; padding-bottom: 26px; border-bottom: 1px solid #b59b6a55; font: italic 27px/1.5 var(--j-serif); }
#entityPage .entity-body { max-width: 70ch; min-width: 0; }
#entityPage .entity-body > h2 { color: #334631; font: 500 34px/1.15 var(--j-serif); letter-spacing: -.025em; margin: 32px 0 13px; }
#entityPage .entity-body > h2:first-child { margin-top: 12px; }
#entityPage .entity-body > p, #entityPage .entity-body details > p { color: #475441; font: 15px/1.95 var(--j-sans); margin: 0 0 24px; }
#entityPage .entity-body .later-chapters { margin-top: 28px; }
#entityPage .entity-body .later-chapters > summary { color: #8d5e3b; line-height: 1.7; font-size: 11px; border-top: 1px solid #a18b6040; border-bottom: 1px solid #a18b6026; padding: 15px 0; }
#entityPage .entity-body .later-chapters[open] > summary { margin-bottom: 20px; }
#entityPage .lore-noun { border-bottom: 1px dotted #8b7e54; text-decoration: none; }
#entityPage .lore-noun:hover { color: #a15e3c; border-bottom-style: solid; }
#entityPage .cast-links { margin-top: 35px; padding-top: 22px; border-top: 1px solid #a18b6040; }
#entityPage .cast-links small { color: #917045; font-size: 8px; letter-spacing: .16em; }
#entityPage .cast-links a { color: #7a5a38; font-size: 11px; border-bottom-color: #a18b6066; }
#entityPage .browse-all { color: #7a5a38; font-size: 11px; line-height: 1.7; border-bottom-color: #a18b6066; }
#entityPage .source-links { color: #85775c; margin-top: 41px; padding-top: 18px; border-top: 1px solid #a18b602f; font-size: 10px; }
#entityPage .source-links summary { width: fit-content; }
#entityPage .source-links a { color: #7b6747; text-decoration: underline; text-decoration-color: #aa8f6655; text-underline-offset: 4px; }
#entityPage .entry-character-card, #entityPage .entry-portrait {
  grid-column: 2;
  grid-row: 3 / span 3;
  float: none;
  width: 100%;
  max-width: none;
  margin: 5px 0 0;
  align-self: start;
}
#entityPage .entry-character-card {
  padding: 0;
  border: 0;
  background: none;
  border-radius: 0;
  box-shadow: none;
  transform: rotate(-.65deg);
  overflow: visible;
}
#entityPage .entry-character-card::before { display: none; }
#entityPage .entry-character-card:hover { transform: rotate(-.65deg); box-shadow: none; outline: 0; }
#entityPage .entry-character-card .character-art { height: 330px; margin: 0; padding: 10px; background: #e3d6b8; border: 1px solid #9e875777; box-shadow: 3px 4px 0 #8e784027; }
#entityPage .entry-character-card .character-art::after { inset: 5px; border-color: #a78d5b44; box-shadow: none; }
#entityPage .entry-character-card .character-art img { background: #344536; }
#entityPage .entry-character-card .character-art.unillustrated { background: radial-gradient(ellipse, #d9caa457, transparent 65%), #e8ddc4; padding: 25px; }
#entityPage .entry-character-card .character-inscription { position: relative; padding: 22px 4px 0 18px; margin: 15px 0 0 10px; border-left: 1px solid #a1775144; }
#entityPage .entry-character-card .card-kicker { font-size: 7px; }
#entityPage .entry-character-card .character-inscription h3 { font-size: 29px; }
#entityPage .entry-character-card .card-role { font-size: 9px !important; }
#entityPage .entry-character-card .card-observation { font-size: 19px !important; line-height: 1.45 !important; }
#entityPage .entry-portrait { padding: 10px; border: 1px solid #a38a5d7a; transform: rotate(.5deg); box-shadow: 3px 4px 0 #8e784027; }
#entityPage .entry-portrait img { border: 0; background: #d6c8a5; }
#entityPage .entry-portrait figcaption { color: #7e7153; font: italic 17px/1.5 var(--j-serif); padding: 3px 2px; }
/* Entries without a portrait retain a quiet working margin, not a blank card. */
#entityPage:has(.entity-body):not(:has(.entry-character-card, .entry-portrait)) { grid-template-columns: minmax(0, 760px) minmax(45px, 1fr); }

/* Alphabetical finding aid, printed on the same paper stock. */
#entityPage .entity-search { gap: 13px; margin: 36px 0 24px; }
#entityPage .entity-search label { color: #8b6f47; font-size: 9px; letter-spacing: .13em; text-transform: uppercase; }
#entityPage .entity-search input, #entityPage .entity-search select { min-height: 48px; color: #33472e; background: #e8dcc264; border: 1px solid #a68e6166; padding: 12px 15px; font-size: 13px; }
#entityPage .entity-search input::placeholder { color: #91866b; }
#entityPage .index-count { font: italic 18px/1.5 var(--j-serif); color: #96805b; margin: 0 0 24px; }
#entityPage .entity-result-list:not(.character-card-grid) { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); column-gap: 45px; }
#entityPage .entity-result { border-top: 1px solid #a18b6040; padding: 23px 0; grid-template-columns: 63px 1fr; gap: 8px 16px; }
#entityPage .entity-result small { color: #a3744b; font-size: 9px; line-height: 1.6; }
#entityPage .entity-result strong { color: #314932; font: 500 29px/1.1 var(--j-serif); }
#entityPage .entity-result span { color: #7a8068; font-size: 10px; line-height: 1.65; }
#entityPage .entity-result:hover strong { color: #9e6240; }
#entityPage .index-pager { color: #8d7957; margin-top: 37px; font-size: 10px; }
#entityPage .index-pager button { color: #775a36; border: 1px solid #a18b6066; padding: 12px 17px; min-height: 44px; background: transparent; }
#entityPage .index-pager button:disabled { opacity: .35; }
#entityPage .character-card-grid { gap: 25px; }
#entityPage .character-card-grid .character-art { height: 250px; margin: 13px 13px 0; }
#entityPage .character-card-grid .character-inscription { padding: 20px; }
#entityPage .character-card-grid .character-inscription h3 { font-size: 30px; }

/* Contextual slips remain usable with a mouse, keyboard or touch. */
body .entity-popover {
  color: #334730;
  background: var(--j-paper-texture), #f1e7cf;
  border: 1px solid #b59b6e;
  border-radius: 2px 1px 3px 1px;
  box-shadow: 4px 5px 0 #332b1a22, 0 15px 45px #020e0b50;
  padding: 26px 26px 23px;
  max-height: min(460px, 80svh);
}
body .entity-popover::before { content: ''; position: absolute; inset: 7px; border: 1px solid #a78d5b38; pointer-events: none; }
body .entity-popover small { color: #a0774f; font-size: 8px; letter-spacing: .14em; }
body .entity-popover h3 { color: #2d4430; padding-right: 15px; margin: 12px 0; font-size: 34px; }
body .entity-popover p { color: #56634a; font-size: 12px; line-height: 1.85; }
body .entity-popover > a { position: relative; color: #8c5a36; font-size: 11px; border-bottom: 1px solid #9b7e4b66; padding-bottom: 5px; }
body .entity-popover .preview-close { color: #8b7047; right: 12px; top: 6px; min-width: 35px; min-height: 35px; font-size: 26px; }

/* Fold-out map and saved slips. */
body dialog { color: var(--j-ink); background: var(--j-paper-texture), var(--j-paper); border: 1px solid #b39c6c; box-shadow: 6px 8px 0 #89713e24, 0 20px 75px #00000035; }
body dialog::backdrop { background: #051311cc; backdrop-filter: blur(7px); }
body dialog .eyebrow { color: #9a6946; font-size: 9px; }
body dialog h2 { color: #31452f; }
body dialog > p { color: #6c735a; }
body dialog .outline-button { color: #7c5b35; border-color: #a08a5e77; }
body #journal { padding: 43px; border-radius: 2px 3px 1px 2px; }
body #journal #closeJournal { color: #8c7046; min-height: 40px; min-width: 40px; }
body #journal #savedList button { color: #3c5136; border-bottom-color: #a08a5e40; }
body #flatMapDialog { width: min(1250px, 95vw); padding: 37px; background: var(--j-paper-texture), #ece1c9; border: 1px solid #b39c6c; }
#flatMapDialog h2 { font-size: 46px; color: #33492f; }
#flatMapDialog .eyebrow { color: #966744; }
#flatMapDialog .close-chart { min-width: 42px; min-height: 42px; color: #8c7046; }
#flatMapDialog .atlas-desk { border-color: #8f7d5555; box-shadow: 3px 4px 0 #87703b13; }
#flatMapDialog .place-index { background: #e6d8ba; border-color: #8f7d5555; padding: 26px 22px; }
#flatMapDialog .place-index label { color: #8c6940; }
#flatMapDialog .search-wrap { border-bottom-color: #8d795766; }
#flatMapDialog .place-list button { color: #4d5b3f; border-color: #8d79572b; font-size: 22px; padding: 11px 5px; }
#flatMapDialog .place-list button.active { color: #9b5b39; background: #c8b28333; }
#flatMapDialog .map-toolbar { color: #716344; background: #e0d0ad; border-color: #8f7d5544; }
#flatMapDialog .map-toolbar button { color: #5c593f; min-width: 32px; min-height: 32px; border-color: #8f7d5555; }
#flatMapDialog .map-credit { color: #786849; background: #e1d4b6; line-height: 1.8; }
#flatMapDialog .field-entry { display: grid; grid-template-columns: 1fr auto; gap: 30px; margin-top: 25px; padding-top: 25px; border-top: 1px solid #9e875d40; }
#flatMapDialog .field-entry > div { min-width: 0; }
#flatMapDialog .field-entry h3 { color: #344b30; }
#flatMapDialog .field-entry p:not(.eyebrow) { color: #5e6a50; }
#flatMapDialog .field-entry > button { grid-column: auto; }

/* Colophon: quiet, dark, and clearly the end of this volume. */
#atlasMain > .closing { position: relative; padding: 88px 24px 92px; background: radial-gradient(ellipse at center, #3e493030, transparent 60%), #152421; border-top: 1px solid #9c834b50; }
#atlasMain > .closing .closing-mark { color: #b59257; font-size: 40px; margin-bottom: 22px; }
#atlasMain > .closing .eyebrow { color: #b89a66; font-size: 8px; letter-spacing: .2em; }
#atlasMain > .closing h2 { color: #e9dfc5; font-size: clamp(50px, 5.4vw, 77px); line-height: 1.02; letter-spacing: -.035em; }
#atlasMain > .closing h2 em { color: #c8a66b; }
#atlasMain > .closing p:not(.eyebrow) { color: #a7b19b; font-size: 12px; line-height: 1.8; margin-top: 23px; }
#atlasMain > .closing .main-link { color: #d6c397; border-bottom-color: #b99b6155; }
body > footer { padding: 35px 5.4%; gap: 50px; background: #101d1b; border-top: 1px solid #b698602d; color: #8e9d88; }
body > footer > div { color: #c9ab72; font: 500 17px/1.3 var(--j-serif); letter-spacing: .14em; min-width: 210px; }
body > footer span { font: 8px/1.8 var(--j-sans); color: #94a18c; letter-spacing: .02em; margin-top: 6px; }
body > footer p { font-size: 9px; line-height: 1.85; max-width: 530px; }
body > footer > a { font-size: 10px; color: #b9ac85; }

/* Intermediate widths preserve both the instrument and its working index. */
@media (min-width: 1600px) {
  #home .atlas-console { width: 380px; margin-left: max(6%, calc((100vw - 1450px)/2)); }
  #home .instrument { right: max(3%, calc((100vw - 1510px)/2)); }
  #home .globe-place-note { padding: 29px 29px 26px; }
}
@media (max-width: 1180px) and (min-width: 701px) {
  body > header { padding: 0 4%; gap: 20px; }
  body > header .wordmark { font-size: 22px; letter-spacing: .12em; }
  body > header .wordmark small { display: none; }
  body > header nav { gap: 21px; }
  #home.hero { min-height: 850px; }
  #home .atlas-console { width: 300px; margin-left: 4.7%; padding-top: 43px; }
  #home .atlas-console h1 { font-size: 55px; }
  #home .atlas-console > .eyebrow { font-size: 8px; }
  #home .console-note { font-size: 19px; }
  #home .instrument { width: min(69vw, 780px); height: min(69vw, 780px); right: -9.5%; top: 43%; }
  #home .globe-place-note { padding: 25px 22px 22px; }
  #home .globe-place-note h2 { font-size: 34px; }
  #home .moon-register { left: 20%; width: 60%; }
  #home .folio { font-size: 6px; }
  #stories .story-shelf { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
  #stories .book { min-height: 175px; padding: 23px 25px 20px; }
  #stories .book strong { font-size: 31px; max-width: 170px; }
  #stories .reading-desk { padding-right: 30px; padding-left: 48px; }
  body .character-art { height: 275px; }
  #peopleEntries, body .character-card-grid { gap: 23px; }
  body .character-inscription { padding: 22px; }
  body .character-inscription h3 { font-size: 30px; }
  #entityPage { width: calc(100% - 50px); padding: 44px 49px 65px; }
  #entityPage:has(.entity-body) { grid-template-columns: minmax(0, 1fr) 246px; column-gap: 36px; }
  #entityPage .entry-character-card .character-art { height: 290px; }
  #entityPage .entry-lead { font-size: 25px; }
  #entityPage .entity-body > p, #entityPage .entity-body details > p { font-size: 14px; }
  #entityPage .character-card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 900px) and (min-width: 701px) {
  #home .atlas-console { width: 275px; margin-left: 4.7%; }
  #home .atlas-console h1 { font-size: 49px; }
  #home .instrument { right: -15%; top: 39%; width: 72vw; height: 72vw; }
  #home .moon-register { left: 22%; width: 50%; }
  #home .instrument-caption { max-width: 66%; text-align: center; line-height: 1.6; }
  #home .folio { bottom: 48px; right: 7%; max-width: 33%; text-align: right; line-height: 1.8; }
  #gods #godEntries { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  #peopleEntries, body .character-card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  #entityPage:has(.entity-body) { grid-template-columns: minmax(0, 1fr) 220px; column-gap: 27px; }
  #entityPage .entry-character-card .character-art { height: 260px; }
  #entityPage .entry-character-card .card-observation { font-size: 18px !important; }
  #entityPage .entity-result-list:not(.character-card-grid) { column-gap: 24px; }
  body > footer { gap: 25px; }
}

/* Pocket journal. The globe keeps its full gesture surface; previews become sheets. */
@media (max-width: 700px) {
  html { scroll-padding-top: 15px; }
  body > header { height: auto; min-height: 110px; padding: 19px 23px 13px; gap: 13px; flex-wrap: wrap; }
  body > header .wordmark { font-size: 23px; gap: 10px; letter-spacing: .15em; }
  body > header .wordmark small { display: block; width: 94px; font-size: 7px; padding-left: 13px; margin-left: 1px; }
  body > header .sigil { font-size: 31px; }
  body > header nav { width: 100%; justify-content: space-between; gap: 12px; }
  body > header nav a, body > header nav a:first-child, body > header nav a[href='#atlas'] { display: inline; font-size: 10px; padding: 5px 0; }
  body > header nav button { font-size: 9px; min-height: 34px; padding: 6px 9px; }
  body > header nav button span { padding-left: 7px; }
  #home.hero { display: flex; flex-direction: column; height: auto; min-height: 0; max-height: none; padding: 0 0 37px; overflow: hidden; }
  #home.hero::before { inset: 13px; }
  #home.hero::after { display: none; }
  #home .atlas-console { display: contents; }
  #home .atlas-console > .eyebrow { order: 0; font-size: 8px; letter-spacing: .15em; margin: 31px 26px 17px; }
  #home .atlas-console h1 { order: 1; max-width: 450px; font-size: clamp(43px, 10.6vw, 64px); line-height: 1; letter-spacing: -.035em; margin: 0 26px 23px; }
  #home .atlas-console h1 br { display: none; }
  #home .console-note { display: none; }
  #home .atlas-console > label { order: 2; margin: 0 26px 9px; font-size: 8px; }
  #home .select-frame { order: 3; margin: 0 26px; z-index: 6; }
  #home .select-frame select { font-size: 23px; min-height: 53px; padding: 11px 13px; }
  #home .instrument { order: 4; position: relative; left: auto; right: auto; top: auto; width: 100vw; height: 100vw; min-height: 0; max-width: none; max-height: none; transform: none; margin: 20px 0 111px; flex-shrink: 0; }
  #home .globe-wrap { width: 83%; height: 83%; box-shadow: 10px 20px 35px #00000065, 0 0 60px #cead6915; }
  #home .instrument::after { inset: 3%; }
  #home .orbit-one { width: 92%; height: 92%; }
  #home .orbit-two { width: 97%; height: 97%; }
  #home .instrument::before { width: 110%; }
  #home .north, #home .south, #home .east, #home .west { display: none; }
  #home .globe-controls { bottom: 0; gap: 6px; }
  #home .globe-controls button { min-height: 36px; font-size: 9px; padding: 8px 12px; }
  #home .instrument-caption { bottom: -7%; font-size: 7px; line-height: 1.6; letter-spacing: .13em; margin: 0; }
  #home .moon-register { top: 110%; left: 14%; width: 72%; }
  #home .moon-register p { font-size: 9px; line-height: 1.7; margin: 0; }
  #home .moon-register p span { display: inline; padding: 0; font-size: 7px; }
  #home #veilmoonStatus { font-size: 8px; }
  #home .orbiting-moon .moon-name { font-size: 16px; }
  #home .folio { display: none; }
  #home .globe-place-note { order: 5; margin: 0 26px; padding: 25px 25px 24px; }
  #home .globe-place-note > .eyebrow { font-size: 8px; }
  #home .globe-place-note h2 { font-size: 37px; }
  #home .globe-place-note > p:not(.eyebrow) { font-size: 12px; line-height: 1.85; }
  #home .globe-place-note .main-link { font-size: 10px; padding: 10px 0 6px; }
  #home .console-bottom { order: 6; margin: 22px 26px 0; justify-content: space-between; gap: 13px; font-size: 9px; }
  #home .console-bottom a, #home .console-bottom button { font-size: 9px; line-height: 1.7; }
  #home .pin-label { font-size: 15px; padding: 4px 7px; }
  #home .globe-region { font-size: 10px; }
  #home .globe-place-note.place-sheet-open {
    position: fixed;
    z-index: 85;
    left: 0;
    right: 0;
    bottom: 0;
    margin: 0;
    max-height: 53svh;
    overflow: auto;
    padding: 29px 29px max(29px, env(safe-area-inset-bottom));
    border: 1px solid #bda474;
    border-radius: 8px 8px 0 0;
    background: var(--j-paper-texture), #efe5cd;
    box-shadow: 0 -15px 50px #00000050;
    backdrop-filter: none;
  }
  #home .place-sheet-open #closePlaceSheet { display: block; color: #8e6d44; top: 9px; right: 16px; min-width: 40px; min-height: 40px; padding: 4px; font-size: 28px; z-index: 1; }
  #home .place-sheet-open h2 { padding-right: 29px; }
  #stories.stories-section, #gods.lore-section, #people.people-section { padding: 59px 26px 64px; }
  #stories::before { inset: 12px; }
  body .section-heading { display: block; margin-bottom: 30px; }
  body .section-heading .eyebrow { font-size: 8px; letter-spacing: .15em; margin-bottom: 17px; }
  body .section-heading h2 { font-size: clamp(48px, 11.7vw, 65px); line-height: .99; }
  body .section-heading > p { max-width: 370px; font-size: 12px; line-height: 1.85; margin: 24px 0 0; }
  #stories .story-shelf { display: flex; gap: 10px; align-items: stretch; overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x proximity; margin: 32px -1px 0; padding: 8px 1px 17px; scrollbar-width: thin; scrollbar-color: #a18b5e #dfd1ad; }
  #stories .book { flex: 0 0 162px; min-width: 162px; min-height: 207px; height: auto; padding: 24px 19px 20px 23px; scroll-snap-align: start; }
  #stories .book strong { font-size: 28px; }
  #stories .book small { font-size: 7px; }
  #stories .book.active, #stories .book:hover { transform: translateY(-5px); }
  #stories .reading-desk { max-width: none; margin-top: 36px; padding: 0 0 0 17px; border-left-color: #a5684f33; }
  #stories .reading-desk > .eyebrow { font-size: 8px; letter-spacing: .12em; }
  #stories .reading-desk h3 { font-size: 40px; line-height: 1.06; margin-bottom: 19px; }
  #stories .reading-desk > p:not(.eyebrow), #stories .journal-chapter p { font-size: 13px; line-height: 1.9; }
  #stories .journal-chapter { padding: 0; margin-bottom: 27px; }
  #stories .journal-chapter h4 { font-size: 29px; }
  #stories .story-reader { margin: 28px 0; padding-top: 26px; }
  #stories .story-reader > .eyebrow { font-size: 7px; letter-spacing: .12em; }
  #stories .reading-desk .reader-note { font-size: 20px !important; }
  body .lore-tabs { flex-wrap: nowrap; overflow-x: auto; margin: 28px 0; }
  body .lore-tabs button { flex-shrink: 0; white-space: nowrap; font-size: 10px; padding: 11px 16px; }
  #gods #godEntries { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 24px; }
  #gods .entity-index-link { font-size: 25px; min-height: 83px; padding: 18px 0; }
  #gods .browse-all { margin-top: 23px; }
  #peopleEntries, body .character-card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; max-width: none; margin: 0; }
  body .character-art { height: 245px; margin: 13px 13px 0; }
  body .character-inscription { padding: 20px 21px 24px; }
  body .character-inscription h3 { font-size: 32px; }
  body .character-inscription .card-observation { font-size: 20px !important; }
  #entityPage { width: calc(100% - 24px); margin: 15px auto 25px; padding: 32px 25px 50px; border-radius: 1px; box-shadow: 3px 4px 0 #b49d6e20, 0 15px 35px #00000020; }
  #entityPage::before { inset: 7px; border-color: #947c4e3b; }
  #entityPage::after { left: 16px; top: 22px; bottom: 22px; width: 0; border-right: 0; border-left-color: #a17d5422; }
  #entityPage:has(.entity-body), #entityPage:has(.entity-body):not(:has(.entry-character-card, .entry-portrait)) { display: flex; flex-direction: column; gap: 0; }
  #entityPage .entry-back { margin: 0 0 32px; font-size: 10px; }
  #entityPage > .eyebrow { font-size: 8px; letter-spacing: .12em; margin-bottom: 16px; }
  #entityPage > h1 { width: 100%; font-size: clamp(43px, 11.5vw, 66px); line-height: 1; letter-spacing: -.035em; margin-bottom: 23px; }
  #entityPage .entry-lead { font-size: 25px; line-height: 1.5; margin-bottom: 24px; padding-bottom: 23px; }
  #entityPage .entry-character-card, #entityPage .entry-portrait { width: min(100%, 380px); max-width: none; margin: 2px auto 31px; float: none; }
  #entityPage .entry-character-card { transform: rotate(-.5deg); }
  #entityPage .entry-character-card:hover { transform: rotate(-.5deg); }
  #entityPage .entry-character-card .character-art { height: 365px; }
  #entityPage .entry-character-card .character-inscription { margin: 18px 0 0 6px; padding: 4px 0 4px 16px; }
  #entityPage .entry-character-card .character-inscription h3 { font-size: 30px; }
  #entityPage .entry-character-card .card-observation { font-size: 20px !important; }
  #entityPage .entity-body { width: 100%; max-width: none; }
  #entityPage .entity-body > h2 { margin-top: 29px; font-size: 31px; }
  #entityPage .entity-body > p, #entityPage .entity-body details > p { font-size: 13px; line-height: 1.95; margin-bottom: 22px; }
  #entityPage .entity-body .later-chapters > summary { font-size: 10px; }
  #entityPage .entity-search { margin-top: 28px; gap: 10px; width: 100%; }
  #entityPage .entity-search input { min-width: 0; width: 100%; flex-basis: 100%; }
  #entityPage .entity-search select { width: 100%; }
  #entityPage .index-count { font-size: 17px; }
  #entityPage .entity-result-list:not(.character-card-grid) { display: block; width: 100%; }
  #entityPage .entity-result { grid-template-columns: 54px 1fr; gap: 8px 14px; padding: 21px 0; }
  #entityPage .entity-result strong { font-size: 29px; }
  #entityPage .index-pager { gap: 9px; width: 100%; font-size: 9px; }
  #entityPage .index-pager button { font-size: 9px; padding: 10px 12px; }
  #entityPage .character-card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; width: 100%; }
  #entityPage .character-card-grid .character-art { height: 270px; }
  body .entity-popover { top: auto !important; bottom: 0; left: 0 !important; right: 0; width: 100% !important; max-height: 53svh; padding: 29px 29px max(33px, env(safe-area-inset-bottom)) !important; border-radius: 8px 8px 0 0; background: var(--j-paper-texture), #f0e6ce; backdrop-filter: none; }
  body .entity-popover h3 { padding-right: 27px; font-size: 36px; }
  body .entity-popover p { font-size: 13px; }
  body .entity-popover > a { padding: 9px 0; font-size: 11px; }
  body .entity-popover .preview-close { right: 14px; top: 7px; min-width: 44px; min-height: 44px; }
  body #journal { width: calc(100% - 32px); padding: 32px 27px; max-height: 85svh; }
  body #flatMapDialog { width: calc(100% - 20px); max-width: none; max-height: 95svh; padding: 30px 17px 26px; }
  #flatMapDialog h2 { font-size: 36px; padding-right: 20px; }
  #flatMapDialog .eyebrow { font-size: 7px; letter-spacing: .13em; }
  #flatMapDialog .atlas-desk { margin-top: 24px; display: flex; flex-direction: column; }
  #flatMapDialog .place-index { border-right: 0; border-bottom: 1px solid #8f7d5555; padding: 18px; }
  #flatMapDialog .place-list { height: 105px; display: flex; flex-wrap: wrap; gap: 5px; }
  #flatMapDialog .place-list button { width: auto; border: 1px solid #8f7d5544; font-size: 18px; padding: 5px 9px; }
  #flatMapDialog .map-toolbar { padding: 8px 10px; height: auto; min-height: 50px; gap: 10px; font-size: 7px; letter-spacing: .09em; }
  #flatMapDialog .map-toolbar > div { display: flex; flex-shrink: 0; gap: 4px; }
  #flatMapDialog .map-toolbar button { font-size: 11px; padding: 4px 8px; }
  #flatMapDialog #mapViewport { height: 43svh; }
  #flatMapDialog .field-entry { grid-template-columns: 1fr; gap: 23px; padding-top: 24px; }
  #flatMapDialog .field-entry > button { grid-column: 1; justify-self: start; }
  #flatMapDialog .field-entry h3 { font-size: 37px; }
  #flatMapDialog .field-entry p:not(.eyebrow) { font-size: 12px; }
  #atlasMain > .closing { padding: 64px 26px 68px; }
  #atlasMain > .closing h2 { font-size: 52px; }
  body > footer { display: block; padding: 33px 26px; }
  body > footer p { margin: 19px 0 22px; max-width: 440px; }
}
@media (max-width: 560px) {
  #peopleEntries, body .character-card-grid, #entityPage .character-card-grid { grid-template-columns: 1fr; max-width: 390px; margin-left: auto; margin-right: auto; gap: 29px; }
  body .character-art { height: 350px; margin: 17px 17px 0; }
  body .character-inscription { padding: 23px 26px 28px; }
  body .character-inscription h3 { font-size: 36px; }
  #entityPage .character-card-grid .character-art { height: 330px; margin: 15px 15px 0; }
  #entityPage .character-card-grid .character-inscription { padding: 22px; }
}
@media (max-width: 370px) {
  body > header { padding-left: 20px; padding-right: 20px; }
  body > header .wordmark { font-size: 21px; letter-spacing: .1em; }
  body > header .wordmark small { font-size: 6px; width: 87px; }
  body > header nav { gap: 8px; }
  body > header nav a, body > header nav a:first-child, body > header nav a[href='#atlas'] { font-size: 9px; }
  #home .atlas-console > .eyebrow { font-size: 7px; }
  #home .instrument { margin-bottom: 119px; }
  #home .globe-place-note { padding: 25px 22px; }
  #gods #godEntries { column-gap: 17px; }
  #gods .entity-index-link { font-size: 23px; }
  #entityPage { padding-left: 23px; padding-right: 23px; }
  #entityPage .entry-character-card .character-art { height: 325px; }
  body .character-art { height: 320px; }
}
@media (prefers-reduced-motion: reduce) {
  html, body #mapViewport { scroll-behavior: auto; }
  body *, body *::before, body *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  #stories .book.active, #stories .book:hover, body .character-card:hover, body .character-card:focus-visible { transform: none; }
  #entityPage .entry-character-card, #entityPage .entry-character-card:hover { transform: none; }
}
@media print {
  body { background: #fff; color: #202b23; }
  body > header, body > footer, body .entity-popover, #entityPage .entry-back, #entityPage .source-links { display: none !important; }
  #entityPage { width: 100%; margin: 0; padding: 20px; background: #fff; border: 0; box-shadow: none; }
  #entityPage::before, #entityPage::after { display: none; }
  #entityPage .entity-body > p { font-size: 11pt; line-height: 1.6; }
  #entityPage .entry-character-card { break-inside: avoid; }
}

/* A readable bridge into divine history, added by the content integration. */
#gods .pantheon-transition {
  display: grid;
  grid-template-columns: .85fr 1.6fr;
  column-gap: 60px;
  row-gap: 17px;
  margin: 13px 0 39px;
  padding: 30px 0;
  border-top: 1px solid #bda3733d;
  border-bottom: 1px solid #bda3732b;
}
#gods .pantheon-transition h3 { grid-column: 1; grid-row: 1 / span 3; margin: 0; color: #d9c49c; font: italic 35px/1.12 var(--j-serif); letter-spacing: -.025em; }
#gods .pantheon-transition > p { grid-column: 2; margin: 0; color: #b3bca5; font-size: 13px; line-height: 1.95; max-width: 69ch; }
#gods .pantheon-transition details { grid-column: 2; margin: 0; }
#gods .pantheon-transition details > summary { color: #c7ad7a; padding: 9px 0; border: 0; font-size: 10px; line-height: 1.7; cursor: pointer; }
#gods .pantheon-transition details p { color: #abb69f; font-size: 12px; line-height: 1.9; }
#gods .pantheon-transition .source-links { padding-top: 6px; border-top: 1px solid #bda37324; font-size: 10px; color: #a4ad94; }
#gods .pantheon-transition .source-links a { color: #bda778; font-size: 10px; }
@media (max-width: 1180px) and (min-width: 701px) { body > header nav { gap: 18px; } }
@media (max-width: 700px) {
  body > header nav { flex-wrap: wrap; justify-content: flex-start; gap: 3px 16px; }
  body > header nav a, body > header nav a:first-child, body > header nav a[href='#atlas'] { min-height: 31px; display: inline-flex; align-items: center; }
  body > header nav button { margin-left: auto; }
  #gods .pantheon-transition { display: block; padding: 26px 0; margin-bottom: 30px; }
  #gods .pantheon-transition h3 { font-size: 32px; margin-bottom: 19px; }
  #gods .pantheon-transition > p { font-size: 12px; margin-bottom: 16px; }
}

/* Two slightly uneven pen strokes frame the page without manufacturing a sketch. */
#entityPage::before {
  border: 0;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='600' height='800' viewBox='0 0 600 800' preserveAspectRatio='none'%3E%3Cpath d='M5 7 Q123 4 258 6 T596 5 L594 178 Q597 328 594 462 L595 793 Q431 795 287 792 T6 794 L5 628 Q3 463 6 301 Z' fill='none' stroke='%23947c4e' stroke-opacity='.48' stroke-width='.8' vector-effect='non-scaling-stroke'/%3E%3Cpath d='M9 10 Q134 8 272 11 L591 9 M9 13 L10 298 Q7 469 9 621 L10 789' fill='none' stroke='%23947c4e' stroke-opacity='.17' stroke-width='.7' vector-effect='non-scaling-stroke'/%3E%3C/svg%3E") center / 100% 100% no-repeat;
}
@media print { #entityPage::before { display: none; } }

/* These pages are for sustained reading, including on a 390px phone. */
#stories .reading-desk > p:not(.eyebrow),
#stories .journal-chapter p,
#stories .sealed-page p,
#stories .map-era-context,
#entityPage .entity-body > p,
#entityPage .entity-body details > p,
#gods .pantheon-transition > p,
#gods .pantheon-transition details p {
  font-size: 16px;
  line-height: 1.9;
}
@media (max-width: 700px) {
  #stories .reading-desk > p:not(.eyebrow),
  #stories .journal-chapter p,
  #stories .sealed-page p,
  #stories .map-era-context,
  #entityPage .entity-body > p,
  #entityPage .entity-body details > p,
  #gods .pantheon-transition > p,
  #gods .pantheon-transition details p { font-size: 16px; line-height: 1.85; }
}
/* Original campaign title impressions, preserved rather than re-lettered. */
#stories .book.illustrated-binding {justify-content:flex-start;gap:16px}
.book-title-art {width:100%;height:105px;object-fit:contain;display:block;margin:auto 0;}
#stories .book.illustrated-binding strong {font-size:18px;line-height:1.25}
.story-title-plate {background:#21302e;padding:25px 34px;margin:0 0 26px;box-shadow:inset 0 0 0 1px #b39b6355, 2px 4px 0 #312b1c18;transform:rotate(-.4deg);}
.story-title-art {display:block;width:100%;height:170px;object-fit:contain;}
@media(max-width:700px){.book-title-art{height:85px}.story-title-plate{padding:20px}.story-title-art{height:130px}}

#entityPage .entry-portrait.journal-study { background:transparent; border:0; box-shadow:none; padding:0; }
#entityPage .entry-portrait.journal-study img { background:transparent; object-fit:contain; }

.local-map-inventory { margin:30px 0; padding:20px 0; border-top:1px solid #a38a5d66; }
.local-map-inventory input { width:100%; padding:10px; margin:16px 0; border:1px solid #a38a5d88; background:#f5ebd5; color:#29251e; font:inherit; }
.local-map-feature { border-bottom:1px solid #a38a5d44; padding:10px 0; }
.local-map-feature summary { cursor:pointer; font-weight:600; }
.local-map-feature p { line-height:1.7; }
.local-map-feature small { display:block; line-height:1.6; color:#665a45; }
.local-map-feature[hidden] { display:none; }

.portrait-spoiler { width:100%; height:100%; }
.portrait-spoiler summary { padding:12px; cursor:pointer; font:16px/1.4 var(--j-serif); color:#51452f; }
.portrait-spoiler:not([open]) { min-height:100px; height:auto; }
.portrait-spoiler img { max-height:calc(100% - 50px); }

.era-illustration { border-top:1px solid #a38a5d66; padding:14px 0; margin-bottom:22px; }
.era-illustration summary { cursor:pointer; font-weight:600; }
#entityPage .era-illustration .entry-portrait { float:none; width:min(100%,340px); margin:18px auto; transform:none; }
