/* The Journal of the Ghostly Wanderer (Jason's private journal): page + image viewer + sidebar. */
/* The Journal of the Ghostly Wanderer (journal/ghostly-wanderer/*): six tab pages ported from
   LegendKeeper. Loaded only by those pages. Site typography and dark palette; the LK structure
   (h1 name, h5 pronunciation, h3 title, italic h4 epithet, blockquoted h5 sayings, h6 captions,
   rules, full-width art) is kept, LK's own CSS is not used. */
body.gw-page main.read.gw { max-width: 993px; } /* same column as Journal chapters: 993 box, 865 text */
body.gw-page main.read .gw-banner {
  margin: 0 0 32px; height: 300px; overflow: hidden; position: relative;
}
body.gw-page main.read .gw-banner img {
  width: 100%; height: 100%; max-height: none; object-fit: cover; object-position: center 26%; display: block;
  /* bottom fade into the page (LK hero fade); on the img so the figure keeps the nav-fade mask */
  -webkit-mask-image: linear-gradient(to bottom, #000 40%, rgba(0,0,0,.55) 72%, transparent 100%);
          mask-image: linear-gradient(to bottom, #000 40%, rgba(0,0,0,.55) 72%, transparent 100%);
}
body.gw-page main.read > h1.gw-title {
  position: relative; margin: -72px 0 40px; padding: 0; border: 0;
  font-family: "Iowan Old Style", Palatino, "Palatino Linotype", serif;
  font-size: calc((34px) * var(--fs,1.5094)); line-height: 1.2; font-weight: 400; letter-spacing: 0.01em;
  text-align: left; color: #f3eee6; text-shadow: 0 2px 18px rgba(0,0,0,.9);
}
body.gw-page main.read > h1[id] {
  margin: 0 0 6px; padding: 0; border: 0; text-align: left;
  font-family: "Iowan Old Style", Palatino, "Palatino Linotype", serif;
  font-size: calc((30px) * var(--fs,1.5094)); line-height: 1.2; font-weight: 600; letter-spacing: 0.01em; color: #f3eee6;
  scroll-margin-top: 116px;
}
body.gw-page main.read > h1[id] strong { font-weight: inherit; }
body.gw-page main.read h3 {
  font-family: "Iowan Old Style", Palatino, "Palatino Linotype", serif;
  font-size: calc((20px) * var(--fs,1.5094)); line-height: 1.3; font-weight: 600; letter-spacing: 0; text-transform: none;
  color: #ece6db; margin: 14px 0 4px;
}
body.gw-page main.read h3 strong { font-weight: inherit; }
body.gw-page main.read h4 {
  font-family: "Iowan Old Style", Palatino, "Palatino Linotype", serif;
  font-size: calc((17px) * var(--fs,1.5094)); line-height: 1.45; font-weight: 600; color: #cfc6b8; margin: 4px 0 14px;
}
body.gw-page main.read h5 {
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: calc((14px) * var(--fs,1.5094)); line-height: 1.5; font-weight: 600; letter-spacing: 0.04em; color: #b9b1a5; margin: 2px 0 10px;
}
body.gw-page main.read h6 {
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: calc((13px) * var(--fs,1.5094)); line-height: 1.5; font-weight: 600; letter-spacing: 0.02em; color: #cfc6b8;
  margin: 10px 0 0; text-transform: none;
}
body.gw-page main.read blockquote {
  margin: 18px 0 8px; padding: 2px 0 2px 18px; border: 0; border-left: 2px solid rgba(243,238,230,0.22);
}
body.gw-page main.read blockquote h5 {
  font-family: "Iowan Old Style", Palatino, "Palatino Linotype", serif;
  font-size: calc((17px) * var(--fs,1.5094)); line-height: 1.6; font-weight: 600; letter-spacing: 0; color: #e6dfd3; margin: 0;
}
body.gw-page main.read hr {
  border: 0; border-top: 1px solid rgba(243,238,230,0.16); margin: 36px 0; height: 0;
}
/* fsp1: figure margins come from html.css (site-wide). */
body.gw-page main.read figure.gw-fig img { display: block; width: 100%; height: auto; border-radius: 8px; }
body.gw-page main.read ul { margin: 10px 0 22px; padding-left: 1.3em; list-style: disc; }
body.gw-page main.read li {
  font-size: calc((18px) * var(--fs,1.5094)); line-height: 1.7; color: #f0e9de; margin: 0 0 8px;
  font-family: "Iowan Old Style", Palatino, "Palatino Linotype", serif;
}
body.gw-page main.read li::marker { color: #8f8a82; }
body.gw-page main.read > p { margin: 0 0 16px; }
@media (max-width: 800px) {
  body.gw-page main.read .gw-banner { height: 180px; margin-left: -22px; margin-right: -22px; margin-bottom: 24px; }
  body.gw-page main.read > h1.gw-title { font-size: calc((26px) * var(--fs,1.5094)); margin: -48px 0 28px; }
  body.gw-page main.read > h1[id] { font-size: calc((26px) * var(--fs,1.5094)); scroll-margin-top: 170px; }
  body.gw-page main.read li { font-size: calc((17px) * var(--fs,1.5094)); }
}
/* Phone: six tabs do not fit the one-row secondary bar, so the row scrolls sideways
   (same height and type as every other #section-bar); ghostly.js centres the active tab. */
@media (max-width: 800px) {
  body.gw-page #section-bar {
    justify-content: flex-start !important; flex-wrap: nowrap !important;
    overflow-x: auto !important; overflow-y: hidden !important;
    scrollbar-width: none; -webkit-overflow-scrolling: touch;
    padding-left: 10px !important; padding-right: 10px !important;
  }
  body.gw-page #section-bar::-webkit-scrollbar { display: none; }
  body.gw-page #section-bar a { flex: 0 0 auto; white-space: nowrap; }
}
/* Entity names link to their Index article; same colour as the heading, underline on hover. */
body.gw-page main.read > h1[id] a { color: inherit; text-decoration: none; }
body.gw-page main.read > h1[id] a:hover { text-decoration: underline; text-underline-offset: 5px; text-decoration-thickness: 1px; }

main.read.gw img.gw-zoomable { cursor: zoom-in; }
main.read.gw img.gw-zoomable:focus { outline: none; }
main.read.gw img.gw-zoomable:focus-visible { outline: 1px solid rgba(243,238,230,.35); outline-offset: 3px; }
#map-zoom.gw-zoom, #map-zoom.gw-zoom img { cursor: zoom-out; touch-action: manipulation; }
#map-zoom.gw-zoom img { transform: none; -webkit-tap-highlight-color: transparent; }

main.read.gw img[data-gwm]:not([src]){background:rgba(243,238,230,.035)}
/* Phone: the Chapters drop lists three groups; keep their small labels (Journals, tab name). */
@media (max-width: 800px) {
  body.gw-page .toc-drop > .toc-list > h3.toc-more { display: block; margin: 16px 0 6px !important; font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; font-size: calc((10px) * var(--fs,1.5094)); font-weight: 400; letter-spacing: .22em; text-transform: uppercase; color: #8f8a82; }
}
