:root {
  --simple-font: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

.nav .font-toggle,
.admin-header-links .font-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 36px;
  padding: 6px 10px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--ink);
  font: 400 14px/1.5 var(--simple-font);
  white-space: nowrap;
  flex-shrink: 0;
}

.font-toggle::before {
  content: "";
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 14px;
  height: 14px;
  border: 1px solid currentColor;
  font: 12px/1 var(--simple-font);
}

.font-toggle[aria-pressed="true"]::before {
  content: "✓";
  background: var(--red-dark);
  border-color: var(--red-dark);
  color: var(--paper);
}

.nav .font-toggle:hover,
.admin-header-links .font-toggle:hover {
  background: #eae5da;
}

html[data-font="simple"] {
  --brush: var(--simple-font);
}

/* Existing components set their own font families, including dynamic cards. */
html[data-font="simple"] body,
html[data-font="simple"] body * {
  font-family: var(--simple-font) !important;
  font-weight: 400 !important;
  font-synthesis: none;
}

html[data-font="simple"] body :is(h1, h2, h3, h4, h5, h6, strong, b, th) {
  font-weight: 500 !important;
}

html[data-font="simple"] .hero h1 {
  -webkit-text-stroke: 0;
}

html[data-font="simple"] body :is(code, pre, .row-receipt, .detail-id, .receipt-number, .binding-steam-id, .sponsor-record-id, #lookup-player-id, #binding-code, #recovery-code, #binding-change-code) {
  font-family: ui-monospace, "Consolas", monospace !important;
}

html[data-font="simple"] .nav {
  min-width: 0;
}

@media (max-width: 700px) {
  html[data-font="simple"] .nav {
    gap: 6px 12px;
    font-size: 16px;
  }
  .nav .font-toggle,
  .admin-header-links .font-toggle {
    min-height: 40px;
  }
}
