/* Woodland Museum. All surfaces are scoped to the existing forest theme. */
body.theme-forest {
  --woodland-green: #172a21;
  --woodland-moss: #516448;
  --woodland-brass: #a18c61;
  --woodland-gold: #e6d2a5;
  --woodland-paper: #f4f1e6;
  --woodland-ink: #273226;
  --woodland-rule: #b4a582;
  --woodland-serif: Georgia, "Noto Serif SC", "Songti SC", SimSun, serif;
  --woodland-frond: url("../scenes/woodland-frond.svg");
  --woodland-sheet: radial-gradient(ellipse at 46% 20%, #f8f4e9, transparent 67%), linear-gradient(120deg, #e6d9b8, #f4f1e6 42%, #ede1c7);
}

body.theme-forest #header,
body.theme-forest #menuSidebar {
  background: linear-gradient(110deg, #112019, #213429);
  color: var(--woodland-gold);
  border-color: #a18c6178;
}
body.theme-forest #menuSidebar :is(button, a, h3, .section-title) {color: #f0e4c9}
body.theme-forest #menuSidebar :is(button, a):hover {background-color: #d7bd7230}
body.theme-forest :is(button, a, input):focus-visible {outline: 2px solid #b38743; outline-offset: 3px}

body.theme-forest .page-view.archive-home {
  background-image: linear-gradient(105deg, #101d15b0, #14251938 55%, #1023188c), url("../scenes/woodland-museum.webp"), url("../scenes/forest.svg") !important;
  background-position: center top !important;
  background-size: cover !important;
  background-color: #172a21;
}
body.theme-forest .archive-home:not([style*="none"]) {
  grid-template-columns: minmax(220px, .72fr) minmax(0, 1.7fr) !important;
  gap: 0 clamp(18px, 3vw, 44px);
}
body.theme-forest .archive-home .archive-header {
  align-self: start;
  justify-content: center;
  align-items: center !important;
  text-align: center !important;
  margin-top: 33px;
  min-height: 470px !important;
  padding: 50px clamp(17px, 3vw, 37px) 32px !important;
  border: 3px double #c5a46b !important;
  border-radius: 49% 49% 12px 12px / 13% 13% 12px 12px !important;
  background: radial-gradient(ellipse at 35% 0%, #40533d, transparent 63%), linear-gradient(155deg, #263a2d, #14231b 78%) !important;
  color: var(--woodland-gold);
  box-shadow: inset 0 0 0 6px #101a146e, 0 12px 30px #080c08a6;
}
body.theme-forest .archive-header .archive-kicker {color: var(--woodland-gold); font-family: var(--woodland-serif); letter-spacing: .17em}
body.theme-forest .archive-header .layout-caption {color: #e2d5b2; letter-spacing: .12em}
body.theme-forest .archive-header .layout-status {display: none}
body.theme-forest .archive-home .archive-title {
  max-width: none;
  margin: 19px 0 10px !important;
  font: 700 clamp(30px, 3.15vw, 48px)/1.25 var(--woodland-serif) !important;
  color: #f3e3b8 !important;
  text-shadow: 0 2px 5px #102019;
}
body.theme-forest .archive-title::after,
body.theme-forest .reader-view .article-meta::after {
  content: "";
  display: block;
  width: min(150px, 62%);
  height: 23px;
  margin: 12px auto 0;
  background: currentColor;
  mask: var(--woodland-frond) center / contain no-repeat;
}
body.theme-forest .archive-home .archive-header .archive-subtitle {
  max-width: 23ch;
  margin: 2px auto 0;
  color: #eee4cc;
  font: 14px/1.85 var(--woodland-serif);
}
body.theme-forest .archive-home .archive-header .archive-meta {
  justify-content: center;
  gap: 6px 12px;
  margin-top: 17px;
  color: var(--woodland-gold);
}
body.theme-forest .archive-home .archive-tools {color: #f3e6c6}
body.theme-forest .archive-home .archive-tools > div {
  padding: 7px 15px;
  background: linear-gradient(135deg, #514027, #261e15);
  border: 3px double #ad8b54;
  box-shadow: 0 3px 9px #090b06a6;
}
body.theme-forest .archive-tools :is(h2, .archive-kicker) {color: #f5e3b5; font-family: var(--woodland-serif)}
body.theme-forest .archive-search {
  min-width: 0;
  background: #18291fee;
  border: 1px solid #a18c61;
  color: #fff0d2;
}
body.theme-forest .archive-search input {color: inherit}
body.theme-forest .archive-search input::placeholder {color: #e2d7bd}
body.theme-forest .archive-home .search-results:not([hidden]) {
  grid-column: 2;
  grid-row: 2;
  padding: 14px 19px;
  border: 1px solid var(--woodland-rule);
  background: var(--woodland-sheet);
  color: var(--woodland-ink);
}
body.theme-forest .archive-home .search-results :is(strong, span, p) {color: var(--woodland-ink)}
body.theme-forest .archive-home .archive-grid[hidden] {display: none !important}
body.theme-forest .archive-home .archive-grid {
  grid-template-rows: repeat(3, minmax(136px, auto)) auto !important;
  gap: 15px 13px !important;
  padding: 14px 13px 17px !important;
  border: 9px ridge #715036 !important;
  background: repeating-linear-gradient(0deg, #ffffff08 0 1px, transparent 1px 5px), linear-gradient(105deg, #37261a, #201a12 58%, #4d3421) !important;
  box-shadow: inset 0 0 22px #100c08, 0 10px 25px #070c07ba;
}
body.theme-forest .archive-home .archive-card.collection-card:nth-child(n) {
  isolation: isolate;
  min-width: 0;
  min-height: 136px !important;
  padding: 16px 16px 12px !important;
  border: 3px double #a79163 !important;
  border-radius: 4px !important;
  background: var(--woodland-sheet) !important;
  box-shadow: 0 5px 0 #24190f, 0 9px 0 #7a5538, 0 12px 7px #130d09b8 !important;
  transform: none !important;
  overflow: hidden;
}
body.theme-forest .archive-home .archive-card.collection-card[data-kind="atlas"]:nth-child(n) {
  min-height: 287px !important;
  justify-content: space-between !important;
}
body.theme-forest .archive-home .archive-card.collection-card:nth-child(n)::before {
  content: "" !important;
  inset: 6px !important;
  border: 1px solid #a18c6163;
  border-radius: 2px;
  pointer-events: none;
}
body.theme-forest .archive-home .archive-card.collection-card:nth-child(n):hover {border-color: #6c6947 !important}
body.theme-forest .archive-home .archive-card .collection-emblem,
body.theme-forest .archive-home .archive-card[data-kind="atlas"]:nth-child(n) .collection-emblem {
  position: absolute;
  right: 8%;
  top: 50%;
  transform: translateY(-50%);
  margin: 0;
  min-height: 0;
  max-height: none;
  opacity: .35;
  color: #5e693d;
  z-index: -1;
}
body.theme-forest .archive-home .archive-card .collection-emblem svg {width: clamp(43px, 6.3vw, 94px); height: auto}
body.theme-forest .archive-home .archive-card[data-kind="atlas"]:nth-child(n) .collection-emblem svg {width: clamp(105px, 15vw, 216px); height: auto}
body.theme-forest .archive-home .archive-card .card-name {
  font: 700 clamp(17px, 1.85vw, 26px)/1.25 var(--woodland-serif) !important;
  overflow-wrap: anywhere;
}
body.theme-forest .archive-home .archive-card .card-subtitle {font: 12px/1.6 var(--woodland-serif) !important}
body.theme-forest .archive-home .archive-card .card-foot {gap: 7px; border-color: #a18c6188}
body.theme-forest .archive-home .archive-card.special-collection:nth-child(n) {
  position: relative;
  min-height: 110px !important;
  justify-content: center !important;
  gap: clamp(8px, 2vw, 23px);
  border: 5px ridge #af8d54 !important;
  background: linear-gradient(155deg, #e1f3b12b 0 16%, transparent 16% 34%, #f9e9ac19 34% 37%, transparent 37%), radial-gradient(ellipse at 52% 100%, #8874449e, transparent 70%), #172a21 !important;
  box-shadow: inset 0 0 15px #070f0a, 0 6px 0 #6c482b !important;
}
body.theme-forest .archive-home .special-collection .collection-emblem {
  position: static;
  transform: none;
  opacity: 1;
  z-index: auto;
}
body.theme-forest .archive-home .special-collection .collection-emblem svg {width: 40px}
body.theme-forest .archive-home .special-collection .card-foot {flex-wrap: wrap}
body.theme-forest .archive-home .archive-lower-panels :is(.archive-summary,.archive-excerpts) {
  background: linear-gradient(145deg, #24392d, #172a21);
  border: 3px double #a18c61;
}

body.theme-forest :is(.book-home, .volume-home) {
  background: var(--woodland-frond) right 26px top 28px / 140px auto no-repeat, var(--woodland-sheet);
  border: 1px solid var(--woodland-rule);
  color: var(--woodland-ink);
}
body.theme-forest :is(.book-title, .volume-title) {font-family: var(--woodland-serif); color: var(--woodland-ink)}
body.theme-forest .volume-directory {border-color: var(--woodland-brass)}
body.theme-forest .volume-directory .volume-directory-item:nth-child(n),
body.theme-forest .volume-chapter-list .volume-chapter-item {
  background: #f7f2e5 !important;
  border: 1px solid #b4a582 !important;
  border-radius: 3px;
  overflow-wrap: anywhere;
}
body.theme-forest :is(.volume-directory-item, .volume-chapter-item):hover {
  box-shadow: inset 4px 0 #718058;
}

body.theme-forest[data-view-layout="article"] {background: #e4dfcc}
body.theme-forest .reader-view .article-column {
  color: var(--woodland-ink);
  background: var(--woodland-sheet);
  border: 1px solid #ac9872;
  border-bottom: 0;
  border-radius: 4px 4px 0 0;
  box-shadow: inset 0 0 0 6px #b5a17c29;
}
body.theme-forest .reader-view .article-header {
  padding: 24px clamp(23px, 6vw, 68px) 9px;
  background: var(--woodland-frond) right 20px top 18px / 110px auto no-repeat;
  text-align: center;
}
body.theme-forest .reader-view .article-breadcrumb {color: #43503a}
body.theme-forest .reader-view .article-kicker {
  display: inline-block;
  max-width: 100%;
  padding: 4px 12px;
  margin: 6px 0 12px;
  border: 3px double #a18c61;
  background: #e8d8b5;
  color: #455039;
  font: 12px/1.5 var(--woodland-serif);
}
body.theme-forest[data-view-layout="article"] .reader-view #chapterTitle {
  text-align: center;
  color: var(--woodland-ink);
  font-family: var(--woodland-serif);
  font-weight: 700;
  overflow-wrap: anywhere;
}
body.theme-forest .reader-view .article-meta {
  display: block;
  margin: 10px 0 0;
  border: 0;
  color: #536446;
}
body.theme-forest .reader-view .article-meta::after {margin-top: 7px}
body.theme-forest[data-view-layout="article"] .reader-view .page-single {
  padding: 15px clamp(23px, 6vw, 68px) 25px;
  border: 0;
  box-shadow: none;
  background: transparent;
  color: var(--woodland-ink);
  font-family: var(--woodland-serif);
  font-size: 17px;
}
body.theme-forest[data-view-layout="article"] .reader-view .page-single :is(h1,h2,h3,h4,p) {color: inherit}
body.theme-forest[data-view-layout="article"] .reader-view .page-single blockquote {
  border-color: #798252;
  background: #6373471b;
  color: var(--woodland-ink);
}
body.theme-forest .reader-view .article-outline {
  background: #f4f1e6;
  border: 1px solid var(--woodland-rule);
  border-left: 3px double var(--woodland-brass);
}
body.theme-forest .reader-view .chapter-nav.article-navigation {
  margin: 0;
  padding: 15px clamp(19px, 4vw, 50px) 24px;
  border: 1px solid #ac9872;
  border-top: 0;
  border-radius: 0 0 4px 4px;
  background: #eee4cb;
  box-shadow: inset 0 -6px #b5a17c29, inset 6px 0 #b5a17c29, inset -6px 0 #b5a17c29;
}
body.theme-forest .article-navigation :is(.article-back, .article-nav-link) {
  color: var(--woodland-ink);
  background: linear-gradient(#f4edd8,#e8d6b0);
  border: 3px double var(--woodland-brass);
  font-family: var(--woodland-serif);
}
body.theme-forest .article-navigation .article-nav-link span {color: #48583e}

body.theme-forest .osi-page .osi-shell {
  background: var(--woodland-frond) right 15px top 18px / 120px auto no-repeat, var(--woodland-sheet);
  border: 3px double var(--woodland-brass);
  color: var(--woodland-ink);
}
body.theme-forest .osi-page .osi-exhibit {border: 0}
body.theme-forest .osi-page .osi-masthead {border-color: var(--woodland-rule)}
body.theme-forest .osi-page .osi-portrait-frame {border-color: #9a8051}
body.theme-forest .osi-page .osi-copy h2::after {
  content: "";
  display: block;
  width: 110px;
  height: 20px;
  background: var(--woodland-moss);
  mask: var(--woodland-frond) center / contain no-repeat;
}

@media (max-width: 820px) {
  body.theme-forest .archive-home:not([style*="none"]) {display: block !important}
  body.theme-forest .archive-home .archive-header {
    min-height: 0 !important;
    margin: 0 auto;
    padding: 21px 17px 17px !important;
    border-radius: 49% 49% 8px 8px / 9% 9% 8px 8px !important;
  }
  body.theme-forest .archive-home .archive-header .archive-title {margin: 8px 0 2px !important}
  body.theme-forest .archive-title::after {height: 15px; margin-top: 5px}
  body.theme-forest .archive-home .archive-header .archive-meta {margin-top: 9px}
  body.theme-forest .archive-home .archive-header .archive-subtitle {max-width: none; margin: 2px auto}
  body.theme-forest .archive-home .archive-tools {gap: 10px; padding: 0}
  body.theme-forest .archive-home .archive-grid {grid-template-rows: auto !important}
  body.theme-forest .archive-home .archive-card.collection-card[data-kind]:nth-child(n) {grid-row: auto !important; grid-column: auto !important}
  body.theme-forest .archive-home .archive-card.collection-card[data-kind="atlas"]:nth-child(n),
  body.theme-forest .archive-home .archive-card.special-collection:nth-child(n) {grid-column: 1 / -1 !important}
  body.theme-forest .archive-home .archive-card.collection-card[data-kind="atlas"]:nth-child(n) {min-height: 189px !important}
}
@media (max-width: 520px) {
  body.theme-forest .archive-home .archive-tools {align-items: stretch; flex-direction: column}
  body.theme-forest .archive-home .archive-tools > div {align-self: flex-start}
  body.theme-forest .archive-home .archive-grid {grid-template-columns: minmax(0,1fr) !important; padding: 8px 7px 13px !important; border-width: 5px !important}
  body.theme-forest .archive-home .archive-card.collection-card:nth-child(n) {min-height: 100px !important; padding: 12px 13px 9px !important}
  body.theme-forest .archive-home .archive-card.special-collection:nth-child(n) {gap: 9px; flex-wrap: wrap}
  body.theme-forest .archive-home .archive-card .collection-emblem svg {width: 65px}
  body.theme-forest .volume-directory .volume-directory-item:nth-child(n) {width: 100%; margin-inline: 0}
  body.theme-forest .volume-directory .volume-directory-item:nth-child(n)::before {display: none}
  body.theme-forest[data-view-layout="article"] .reader-view .article-header {padding: 14px 16px 0 !important; background-size: 60px auto}
  body.theme-forest[data-view-layout="article"] .reader-view .page-single {padding: 12px 18px 22px !important}
  body.theme-forest[data-view-layout="article"] .reader-view .chapter-nav.article-navigation {
    margin: 0 !important;
    padding: 10px 15px 20px !important;
    border: 1px solid #ac9872 !important;
    border-top: 0 !important;
    background: #eee4cb !important;
    box-shadow: inset 0 -6px #b5a17c29, inset 6px 0 #b5a17c29, inset -6px 0 #b5a17c29 !important;
  }
  body.theme-forest .osi-page .osi-portrait {width: min(72%, 220px); margin: 0 auto}
  body.theme-forest .osi-page .osi-exhibit {grid-template-columns: minmax(0, 1fr)}
}

@supports (animation-timeline: scroll(root block)) {
  body.theme-forest[data-view-layout="article"] #header::after {
    content: "";
    position: absolute;
    inset: auto 0 0;
    height: 2px;
    background: #a9b982;
    transform: scaleX(0);
    transform-origin: left;
    pointer-events: none;
    animation: woodland-progress linear both;
    animation-timeline: scroll(root block);
  }
  @keyframes woodland-progress {to {transform: scaleX(1)}}
}
