/* Catalog masthead and page surround. Card and case styles are intentionally independent. */
body:has(#app > :is(.case-selection, .lab-hub, .linked-library)) {
  --shell-paper: #12181c;
  --shell-ink: #d0cabd;
  --shell-muted: #adb5a9;
  --shell-accent: #baa37f;
  --shell-rule: #81908445;
  color-scheme: dark;
}
body:has(#app > :is(.case-selection, .lab-hub, .linked-library)) > #app {
  max-width: 1480px;
  padding: 34px 4.2% 58px;
}
#app > :is(.lab-hub, .linked-library) {
  max-width: none;
  padding: 0;
}
#app > .case-selection > .selection-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 24px;
  animation: night-arrival 1.2s .25s ease-out both;
}
#app > :is(.lab-hub, .linked-library) > .lab-hub-heading {
  max-width: 940px;
  animation: night-arrival 1.2s .25s ease-out both;
}
#app > :is(.case-selection, .lab-hub, .linked-library) > .directory-heading {
  margin: 0 0 28px;
  min-width: 0;
}
#app > .case-selection > .selection-head > div {
  min-width: 0;
}
#app .section-label {
  display: grid;
  grid-template-columns: 5px max-content minmax(0, 1fr);
  align-items: start;
  column-gap: 10px;
  width: fit-content;
  max-width: 100%;
  margin: 0 0 12px;
  color: var(--shell-accent, var(--chrome-accent, var(--gold)));
  font-family: var(--locale-sans, system-ui, -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif);
  font-size: .8125rem;
  font-weight: 600;
  line-height: 1.5;
  letter-spacing: .1em;
}
#app .section-label::before {
  content: "";
  width: 5px;
  height: 14px;
  margin-top: 3px;
  background: currentColor;
}
#app .section-prefix {
  white-space: nowrap;
}
#app .section-name {
  min-width: 0;
  overflow-wrap: anywhere;
}
#app > .case-selection > .selection-head h1,
#app > :is(.lab-hub, .linked-library) > .lab-hub-heading h1 {
  margin: 0;
  color: var(--shell-ink);
  font: 500 clamp(1.875rem, 3.15vw, 2.875rem)/1.45 "Songti SC", "Noto Serif CJK SC", "SimSun", Georgia, serif;
  letter-spacing: .01em;
  text-wrap: balance;
}
#app > :is(.lab-hub, .linked-library) > .lab-hub-heading > p {
  margin: 14px 0 0;
  max-width: 44em;
  color: var(--shell-muted);
  font-size: 1rem;
  line-height: 1.8;
}
#app > .case-selection > .selection-head > a {
  flex-shrink: 0;
  padding: 10px 0;
  margin-bottom: 4px;
  border-bottom: 1px solid var(--shell-ink);
  color: var(--shell-ink);
  font-size: .9375rem;
  line-height: 1.6;
  white-space: nowrap;
}
#app > .case-selection > .selection-foot {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  margin-top: 27px;
  padding-top: 20px;
  border-top: 1px solid var(--shell-rule);
  gap: 12px 24px;
  color: var(--shell-muted);
  font-size: .875rem;
  line-height: 1.8;
}
#app > .case-selection > .selection-foot > a,
#app > :is(.lab-hub, .linked-library) > .lab-hub-heading > .text-link,
#app > .lab-hub > .murdle-book-link {
  color: var(--shell-accent);
}
#app > .linked-library > .more-books {
  border-color: var(--shell-rule);
}
#app > .linked-library > .more-books > summary {
  color: var(--shell-ink);
}
body:has(#app > :is(.case-selection, .lab-hub, .linked-library)) > footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  max-width: 1480px;
  padding: 23px 4.2% 30px;
  border-top: 4px double var(--shell-rule);
  color: var(--shell-muted);
  font-size: .8125rem;
  line-height: 1.8;
  letter-spacing: .05em;
}
@media (hover: hover) {
  #app > .case-selection > .selection-head > a:hover {
    color: var(--shell-accent);
    border-color: var(--shell-accent);
  }
}
@media (max-width: 900px) {
  #app > .case-selection > .selection-head {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 12px 24px;
  }
}
@media (max-width: 640px) {
  body:has(#app > :is(.case-selection, .lab-hub, .linked-library)) > #app {
    padding: 23px 5% 42px;
  }
  #app > .case-selection > .selection-head {
    align-items: flex-start;
    gap: 4px;
  }
  #app .section-label {
    margin-bottom: 9px;
    font-size: .75rem;
    letter-spacing: .08em;
  }
  #app > .case-selection > .selection-head h1,
  #app > :is(.lab-hub, .linked-library) > .lab-hub-heading h1 {
    font-size: clamp(1.5rem, 6.25vw, 1.75rem);
    line-height: 1.5;
    letter-spacing: 0;
    text-wrap: initial;
  }
  #app > .case-selection > .selection-head > a {
    display: flex;
    align-items: center;
    min-height: 44px;
    margin: 0;
    padding: 6px 0;
    font-size: .875rem;
    border-bottom: 0;
    color: var(--shell-accent);
  }
  #app > :is(.case-selection, .lab-hub, .linked-library) > .directory-heading {
    margin-bottom: 18px;
  }
  #app > .case-selection > .selection-foot {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    margin-top: 23px;
    padding-top: 18px;
  }
  body:has(#app > :is(.case-selection, .lab-hub, .linked-library)) > footer {
    flex-direction: column;
    align-items: flex-start;
    padding: 21px 5% 27px;
    gap: 8px;
    font-size: .75rem;
  }
}
@keyframes night-lights {
  0% { opacity: 0; transform: scale(.82); }
  65% { opacity: 1; }
  100% { opacity: .5; transform: scale(1); }
}
@keyframes night-lettering {
  from { opacity: .3; transform: translateY(9px); filter: blur(5px); }
  to { opacity: 1; transform: translateY(0); filter: blur(0); }
}
@keyframes night-rule {
  from { opacity: .2; transform: scaleX(.03); }
  to { opacity: .75; transform: scaleX(1); }
}
@keyframes night-arrival {
  from { opacity: .45; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}
@media (prefers-reduced-motion: reduce) {
}
