#theme-toggle {
  display: inline-grid;
  place-items: center;
  flex: 0 0 44px;
  width: 44px;
  height: 44px;
  margin: 0;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: transparent;
  color: var(--ink);
}
#theme-toggle[hidden], #theme-toggle .sun,
html[data-theme="dark"] #theme-toggle .moon { display: none; }
html[data-theme="dark"] #theme-toggle .sun { display: block; }
#theme-toggle:hover { background: var(--rose-light); }
#theme-toggle svg { width: 20px; height: 20px; }
@media (max-width: 900px) {
  header.site-header .brand { flex-shrink: 1; max-width: calc(100% - 9.5rem); }
  header.site-header #site-nav { order: 1; }
}
html[data-theme="dark"] {
  color-scheme: dark;
  --paper: #19181b;
  --surface: #26242a;
  --ink: #f6f1eb;
  --muted: #cbbfc5;
  --line: #635761;
  --rose: #efafc5;
  --rose-light: #463441;
  --gold: #dec18a;
}
html[data-theme="dark"] body { background: var(--paper); color: var(--ink); }
html[data-theme="dark"] :is(header.site-header, .site-footer, #site-nav .nav-list, .card,
  .download-card, .intro-art, .role-popup[popover], .reflection, .stem article:not(.christ-bubble),
  .branches article, .bishop-row article, #world-mass, #mass-rubrics, #seminar-details,
  .notice, input, select, textarea, .seat, .monitor-page #navigation, .monitor-page .image-panel) {
  background: var(--surface); color: var(--ink); border-color: var(--line);
}
html[data-theme="dark"] .site-header .brand { background: #fff; border-radius: 4px; }
html[data-theme="dark"] .site-header #site-nav :is(a,summary),
html[data-theme="dark"] .site-header .menu-toggle { color: var(--ink); }
html[data-theme="dark"] .site-header #site-nav :is(a,summary):is(:hover,:active,[aria-current]),
html[data-theme="dark"] .site-header #site-nav details:is([open],:has([aria-current])) > summary {
  color: var(--rose); background: var(--rose-light);
}
html[data-theme="dark"] :is(a, .lay-key button, .role-links button, #site-nav .nav-list strong) { color: var(--rose); }
html[data-theme="dark"] a:hover { color: #ffd7e8; }
html[data-theme="dark"] :is(button, .button, .main-btn) { background-color: #753951; color: #fff; }
html[data-theme="dark"] .feature-grid .card { color: var(--ink); }
html[data-theme="dark"] :is(.lay-key span, .seat:has(:checked)) { color: var(--ink); background: var(--rose-light); }
html[data-theme="dark"] .role-links button { background: transparent; }
html[data-theme="dark"] .christ-bubble .role-links button { color: #45385c; }
html[data-theme="dark"] .mass-embed {
  color-scheme: dark; --paper: #19181b; --line: #635761; --green: #aed5ca; color: var(--ink);
}
html[data-theme="dark"] .mass-embed :is(aside, .now, button, select, .filelabel, input[type=search]) {
  background: var(--surface); color: var(--ink);
}
html[data-theme="dark"] .mass-embed :is(.chapter.active,.chapter:hover) { background: var(--rose-light); }
html[data-theme="dark"] .mass-embed :is(.support,.kicker,.now p,.indexhead p,#count,.chapter small,.chapter time,.group,.empty) { color: var(--muted); }
