/* The night palette lives in style.css. The day palette pairs warm paper with ink and oxidised brass. */
.theme-toggle {
  display: inline-flex; align-items: center; justify-content: center;
  height: 44px; min-width: 44px; padding: 0; border: 0;
  border-radius: 50%; color: var(--gold); background: transparent; touch-action: manipulation;
}
.theme-toggle:is(:hover, :focus-visible) { background: color-mix(in srgb, var(--gold) 12%, transparent); }
.theme-toggle:focus-visible { outline: 2px solid var(--gold); outline-offset: -2px; }
.theme-toggle > span, .theme-toggle .theme-sun { display: none; }
[data-theme="light"] .theme-toggle .theme-sun { display: inline; }
[data-theme="light"] .theme-toggle .theme-moon { display: none; }
@media (min-width: 931px) and (max-width: 1210px) {
  .masthead .top-tools { gap: 5px; }
  .masthead .topbar { gap: 12px; }
}
@media (max-width: 930px) {
  #primary-navigation .theme-toggle {
    justify-content: flex-start; width: 100%; gap: 12px; flex: none;
    height: 48px; margin-top: 6px; padding: 0 8px; border-radius: 0; border-top: 1px solid var(--line-soft);
    color: var(--fg); font-size: 15px;
  }
  #primary-navigation .theme-toggle > span { display: inline; }
  #primary-navigation .theme-toggle svg { color: var(--gold); }
  #primary-navigation .theme-toggle::after {
    content: ""; width: 31px; height: 18px; margin-inline-start: auto; border: 1px solid var(--muted);
    border-radius: 20px; background: radial-gradient(circle at 8px center, var(--muted) 4px, transparent 4.5px);
  }
  #primary-navigation .theme-toggle[aria-pressed="true"]::after {
    border-color: var(--gold); background: radial-gradient(circle at 21px center, #fffdf8 4px, transparent 4.5px), var(--gold);
  }
}
:root[data-theme="light"] {
  color-scheme: light;
  --ink: #f7f5ef;
  --midnight: #f2efe7;
  --deep: #fbfaf6;
  --panel: #fffdf8;
  --line: #c7c7bb;
  --line-soft: #d8d8cc;
  --fg: #26353a;
  --muted: #52615f;
  --gold: #79551f;
  --sky: #255e70;
  --wash: #eeeee4;
  --rule-strong: #7d8277;
}
html[data-theme="light"] :focus-visible { outline-color: #77551d; }
[data-theme="light"] .masthead { background: #f8f6f0; border-color: var(--line-soft); }
[data-theme="light"] .nav-toggle:active { background: #25342e14; }
[data-theme="light"] .brand { color: #233238; }
[data-theme="light"] .brand img { filter: brightness(0) saturate(100%) invert(34%) sepia(43%) saturate(661%) hue-rotate(354deg) brightness(94%); }
[data-theme="light"] .discord-mark img, [data-theme="light"] .discord-note img { filter: brightness(.48) saturate(1.65); }
[data-theme="light"] :is(.topbar nav a, .assaut-menu summary) { color: var(--muted); }
[data-theme="light"] :is(.topbar nav a:hover, .topbar nav a[aria-current], .assaut-menu[open] summary, .assaut-menu summary:hover, .assaut-menu:has([aria-current]) summary) { color: var(--gold); }
[data-theme="light"] .masthead.has-menu-toggle #primary-navigation.is-open { background: var(--panel); box-shadow: 0 12px 24px #25342e18; }
[data-theme="light"] .assaut-menu-links { background: var(--panel); }
[data-theme="light"] #primary-navigation .assaut-menu-links a:is(:hover,:focus-visible),
[data-theme="light"] #primary-navigation a:active { background: var(--wash); }
[data-theme="light"] .masthead nav a:is([href$="/direct/"], [href$="/direct"])::before { background: #b03940; }
[data-theme="light"] .account { border-color: #969d90; }
[data-theme="light"] .hero, [data-theme="light"] .hero:has(.battle-art) {
  background: radial-gradient(ellipse at 68% 48%, #e1e9e3, #f3eee1 48%, #f8f6ef 80%);
  border-color: var(--line-soft);
}
[data-theme="light"] .hero::after { background: linear-gradient(transparent, #e6e3d740); }
[data-theme="light"] .sky {
  background: #4a5e60; mask: url("./assets/ciel.svg") center / cover no-repeat; opacity: .8;
}
[data-theme="light"] :is(.hero h1 em, .page-head h1 em) { color: var(--gold); }
[data-theme="light"] :is(.hero-copy p, .dialog-inner p, .field, .steps, .post-body,
  .editorial :where(p,li), .guide-lead, .guide-section p, .guide-section li, .class-description,
  .guide-item p, .guide-item li, .guide-progression > p, .guide-table) { color: #3c4d50; }
[data-theme="light"] :is(.text-link, .card-arrow, .empty, .diorama figcaption, .model-button,
  .battle-art figcaption, .footer > .wrap, .footer .legal-links, .discord-note) { color: var(--muted); }
[data-theme="light"] .text-link:hover { color: var(--gold); }
[data-theme="light"] .btn.primary, [data-theme="light"] .tabs button[aria-pressed="true"] {
  background: #79551f; color: #fffdf8; border-color: #79551f;
}
[data-theme="light"] .btn.primary:is(:hover, :focus-visible) { background: #614117; }
[data-theme="light"] .feature,
[data-theme="light"] .feature[data-art] { background: linear-gradient(125deg,#fffdf8,#f0ede4); border-color: var(--line); }
[data-theme="light"] .feature[data-art="forum"] { background: linear-gradient(125deg,#fffaf4,#f2e9e3); }
[data-theme="light"] .feature[data-art="lobby"] { background: linear-gradient(125deg,#f8fbf6,#e8efea); }
[data-theme="light"] .feature p, [data-theme="light"] .feature .card-arrow { color: var(--muted); }
[data-theme="light"] .feature .card-art { color: var(--gold); }
[data-theme="light"] .feature[data-art="forum"] .card-art { color: #885044; }
[data-theme="light"] .feature[data-art="lobby"] .card-art { color: var(--sky); }
[data-theme="light"] .footer { background: #eeeee5; }
[data-theme="light"] :is(.error,.form-error) { color: #913c3a; }
[data-theme="light"] :is(.field input,.field textarea,.field select,.search) { background: var(--deep); border-color: var(--rule-strong); }
[data-theme="light"] :is(input,textarea)::placeholder { color: #66706d; opacity: 1; }
[data-theme="light"] :is(.avatar, .chat-face, .chat-face img) { background-color: #dde3da; color: #455951; }
[data-theme="light"] .chat-face-robot, [data-theme="light"] .chat-face-robot img { background: transparent; }
[data-theme="light"] .chip { color: var(--gold); }
[data-theme="light"] :is(.topic-link:hover,.forum-entry:hover) { background: var(--wash); }
[data-theme="light"] :is(.map-wrap,.map-cover,.match-plan) { background: #e6ece5; }
[data-theme="light"] .map { background-color: #e3ebe3; border-color: var(--line); }
[data-theme="light"] .north { color: #fffdf8; }
[data-theme="light"] .team.pink strong { color: #96385d; }
[data-theme="light"] .blue-dot { background: #2272a7; }
[data-theme="light"] dialog { border-color: var(--line); box-shadow: 0 18px 90px #38392538; }
[data-theme="light"] dialog::backdrop { background: #25302fc4; }
[data-theme="light"] .copyline { background: var(--wash); }
[data-theme="light"] .toast { background: #2f403f; color: #fffdf8; }
[data-theme="light"] .map-card, [data-theme="light"] .arena-dialog { background: var(--panel); }
[data-theme="light"] :is(.map-link,.map-close,.map-tool,.arena-tools) { background: var(--panel); border-color: var(--line); }
[data-theme="light"] :is(.map-link:hover,.map-close:hover,.map-tool:hover,.map-tool:focus-visible) { background: var(--wash); }
[data-theme="light"] .assaut-guide { --guide-line: var(--line); --guide-tint: var(--gold); }
[data-theme="light"] .class-select a { color: var(--muted); }
[data-theme="light"] .class-select a[aria-selected="true"] { color: var(--gold); background: #eae3d3; }
[data-theme="light"] .guide-item { border-color: var(--line-soft); }
[data-theme="light"] .level-reward { background: var(--panel); }
[data-theme="light"] .level-picker a { background: var(--deep); border-color: var(--rule-strong); }
[data-theme="light"] .level-picker a[aria-selected="true"] { background: var(--gold); color: #fffdf8; border-color: var(--gold); }
[data-theme="light"] .account-kit[data-kit="scout"] { --kit-color: #366446; }
[data-theme="light"] .account-kit[data-kit="enchanter"] { --kit-color: #755087; }
[data-theme="light"] .account-kit[data-kit="engineer"] { --kit-color: #356180; }
[data-theme="light"] .account-kit-portrait { background: conic-gradient(var(--kit-color) var(--progress), #cdd1c5 0); }
[data-theme="light"] #bbpress-forums a { color: var(--gold); }
[data-theme="light"] #bbpress-forums :is(a.bbp-topic-permalink,a.bbp-forum-title) { color: var(--fg); }
[data-theme="light"] #bbpress-forums :is(li.bbp-header,li.bbp-footer,div.bbp-topic-header,div.bbp-reply-header,div.bbp-forum-header) { background: #e9ebe0; }
[data-theme="light"] #bbpress-forums :is(div.odd,ul.odd) { background: #f6f6ed; }
[data-theme="light"] #bbpress-forums .bbp-template-notice { background: #f2ebd8; border-color: #b4a07d; color: #5e4d32; }
[data-theme="light"] #bbpress-forums .bbp-template-notice.error { background: #f9ebe5; border-color: #c79786; color: #842e2a; }
[data-theme="light"] #bbpress-forums span.bbp-admin-links a { color: var(--gold); }
[data-theme="light"] #bbpress-forums div.bbp-the-content-wrapper input { color: var(--fg); }
[data-theme="light"] .forum-ornament { background: #ede8d9; color: var(--gold); }
[data-theme="light"] .forum-entry:nth-child(2n) .forum-ornament { background: #e6ede7; color: var(--sky); }