/* Theme-only rules: shared by every role, including signed-out and legal pages. */
:root { color-scheme:light; }
.theme-picker { display:flex; align-items:center; gap:8px; margin-left:auto; font-size:.8rem; white-space:nowrap; }
.theme-picker select { width:auto; min-height:44px; padding:8px 28px 8px 10px; }
:focus-visible { outline:3px solid var(--gold); outline-offset:3px; }

/* Override inline account colors only in dark mode; branding identity is retained. */
:root[data-theme="dark"] {
  color-scheme:dark;
  --forest:#a4dac5!important; --forest-2:#b6e6d4!important;
  --cream:#111b18!important; --paper:#1c2a25!important;
  --ink:#edf3ef!important; --muted:#b3c2ba!important;
  --gold:#efbb5b!important; --accent-text:#182a22!important;
  --coral:#f19882; --line:#708579!important;
  --shadow:0 14px 40px rgba(0,0,0,.22)!important;
  --brand-neutral:#16221d!important; --brand-neutral-line:#40554a!important;
  --brand-warm:#3a3020!important; --brand-warm-line:#92743c!important;
  --brand-cool:#263f33!important; --brand-cool-line:#7b9e8b!important;
  --brand-on-dark:#d0e2d8!important;
}
:root[data-theme="dark"] body { background:var(--cream); }
:root[data-theme="dark"] { --gold-text:var(--gold); }
:root[data-theme="dark"] .topbar { background:rgba(17,27,24,.96); border-color:var(--line); }
:root[data-theme="dark"] .section-tabs { background:var(--paper); }
:root[data-theme="dark"] :is(.hero-card,.card,.modal-card) { border-color:var(--line); }
:root[data-theme="dark"] :is(input,textarea,select,.list-item,.generated-clues details,.record-row,.photo-voting-card,.rating-options label,.pace-options label,.admin-hunt,.admin-event-metrics span,.admin-rating-row span,.team-submission,.chat-message,.submitted-clue,.modal-card .check,.event-change-list,.split-clue-grid,.legal-consent .check) { background:var(--paper); }
:root[data-theme="dark"] .settings-fields:disabled :is(input,textarea,select) { background:var(--cream); }
:root[data-theme="dark"] :is(.button,.nav-button.active,.section-tab.active,.login-card,.card.forest,.help,.feedback-thanks > span) { background:#285a45; color:#fff; }
:root[data-theme="dark"] .card.forest .muted { color:var(--brand-on-dark); }
:root[data-theme="dark"] .button:hover { background:#347356; }
:root[data-theme="dark"] .button.secondary { color:var(--forest); background:var(--brand-cool); }
:root[data-theme="dark"] .button.gold { color:var(--accent-text); background:var(--gold); }
:root[data-theme="dark"] .button.danger { color:#fff; background:#a5392b; }
:root[data-theme="dark"] .difficulty-medium { color:#182a22; }
:root[data-theme="dark"] .rejection-note { background:#42251f; border-color:#cc8c7e; }
:root[data-theme="dark"] .pill.approved { color:#b9f0d2; background:#214b35; }
:root[data-theme="dark"] .pill.rejected { color:#ffcec1; background:#593027; }
:root[data-theme="dark"] .chat-message.mine { background:var(--brand-cool); }
:root[data-theme="dark"] #toast,:root[data-theme="dark"] .help:after { color:var(--cream); background:var(--ink); }
:root[data-theme="dark"] a { color:var(--forest-2); }
:root[data-theme="dark"] .button { color:#fff; }
:root[data-theme="dark"] .button.gold { color:var(--accent-text); }
:root[data-theme="dark"] .button.secondary { color:var(--forest); }
/* QR codes and photos keep their original colors, not an inversion filter. */
@media print { :root[data-theme="dark"] { --cream:#fff!important; --paper:#fff!important; --ink:#1f2926!important; --forest:#143c36!important; --forest-2:#21584e!important; --muted:#68736f!important; --line:#dcd8ce!important; color-scheme:light; } }
