/* The approved sculpted wordmark keeps its color in both library themes.
   Live subtitle text stays readable at mobile sizes and follows screen theme. */
.moem-brand {
  display: inline-flex;
  flex: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
  width: 136px;
  min-height: 44px;
  border-radius: 10px;
  color: #583917;
  font-family: var(--sans);
  letter-spacing: 0;
  white-space: nowrap;
}
.moem-wordmark { display: block; width: 100%; height: auto; object-fit: contain; }
.moem-tagline { display: block; color: inherit; font: 800 12px/1.35 var(--sans); letter-spacing: -.025em; }
.footer-brand.moem-brand { width: 112px; }
[data-theme=dark] .moem-brand { color: #f2dfbe; }
.moem-brand:focus-visible { outline: 3px solid var(--accent); outline-offset: 5px; }
.appearance-controls button, #appearance-settings { min-width: 44px; min-height: 44px; }
@media (max-width: 900px) {
  .mast-inner { gap: 8px; padding-block: 8px; }
  .brand.moem-brand { width: 120px; }
  .menu-toggle { min-width: 44px; min-height: 44px; }
  #site-navigation { max-height: calc(100dvh - 104px - env(safe-area-inset-top)); }
  html { scroll-padding-top: calc(100px + env(safe-area-inset-top)); }
}
@media (max-width: 660px) {
  .mast-inner { padding-inline: 12px; }
  .brand.moem-brand { width: 112px; }
  .appearance-controls { gap: 2px; }
  .appearance-controls button { font-size: 11px; }
  #appearance-settings { width: 44px; }
}
@media (max-width: 374px) {
  #library-toggle { width: 44px; padding: 0; justify-content: center; }
  /* Keep the label in the accessibility tree when its visual text is hidden. */
  #library-toggle [data-mode-label] { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
}
