/* App-wide theme tokens. Faction, warning and punishment colors remain semantic. */
:root {
  --text:#e3e9f0; --theme-bg:#0d1117; --theme-topbar:#111821; --theme-raised:#202b39;
  --theme-input:#101720; --theme-hover:#2d3b4e; --theme-selected:#243124;
  --theme-accent-hover:#ceff8f; --theme-on-accent:#142105; --theme-border:#3b485b;
  --theme-table:#19222d; --theme-subtle:#1a222c;
}
:root[data-theme="obsidian"] {
  --theme-bg:#050607; --theme-topbar:#090c0f; --panel:#101316; --theme-raised:#1a2026;
  --theme-input:#080b0e; --theme-hover:#26323d; --theme-selected:#1c303a;
  --line:#303840; --theme-border:#455461; --text:#eaf1f6; --muted:#9eacb9;
  --accent:#a6d7ee; --theme-accent-hover:#c9e9f8; --theme-on-accent:#0b2632;
  --theme-table:#171c21; --theme-subtle:#161d23;
}
:root[data-theme="navy"] {
  --theme-bg:#091321; --theme-topbar:#0c1828; --panel:#101f31; --theme-raised:#1c324b;
  --theme-input:#0b1726; --theme-hover:#294661; --theme-selected:#203b58;
  --line:#304965; --theme-border:#506c8b; --text:#eaf2fc; --muted:#a3b8cf;
  --accent:#9bc6ff; --theme-accent-hover:#c5dfff; --theme-on-accent:#0b2441;
  --theme-table:#192c42; --theme-subtle:#172a3f;
}
:root[data-theme="graphite"] {
  --theme-bg:#161514; --theme-topbar:#1c1a17; --panel:#211f1c; --theme-raised:#322d26;
  --theme-input:#171612; --theme-hover:#443c30; --theme-selected:#3d3426;
  --line:#494138; --theme-border:#6b5e4c; --text:#f1ede6; --muted:#b6ac9e;
  --accent:#e6c58b; --theme-accent-hover:#f6deb4; --theme-on-accent:#30220d;
  --theme-table:#2c2823; --theme-subtle:#2c2821;
}
.theme-picker {display:flex;align-items:center;gap:8px;margin:0;font-size:.8rem;color:var(--muted);white-space:nowrap}
.theme-picker select {width:112px;min-height:36px;padding:6px 9px;font-size:.8rem;border-color:var(--line);background:var(--theme-input)}
.theme-picker select:focus-visible {outline:2px solid var(--accent);outline-offset:3px}
:root[data-theme]:not([data-theme="classic"]) {color:var(--text);background:var(--theme-bg);color-scheme:dark}
:root[data-theme]:not([data-theme="classic"]) body {background:var(--theme-bg);color:var(--text)}
:root[data-theme]:not([data-theme="classic"]) .topbar {background:var(--theme-topbar)}
:root[data-theme]:not([data-theme="classic"]) .login-screen {background:var(--theme-bg)}
:root[data-theme]:not([data-theme="classic"]) :is(.login-card,.data-panel,.player-panel,.control-panel,dialog) {background:var(--panel);border-color:var(--line);color:var(--text)}
:root[data-theme]:not([data-theme="classic"]) dialog {border-color:var(--theme-border);box-shadow:0 24px 100px #000a}
:root[data-theme]:not([data-theme="classic"]) dialog::backdrop {background:#000b}
:root[data-theme]:not([data-theme="classic"]) :is(.control-card,.control-output) {background:var(--theme-input);border-color:var(--line)}
:root[data-theme]:not([data-theme="classic"]) button {background:var(--theme-raised);border-color:var(--theme-border);color:var(--text)}
:root[data-theme]:not([data-theme="classic"]) button:hover {background:var(--theme-hover)}
:root[data-theme]:not([data-theme="classic"]) :is(input,select,textarea) {background:var(--theme-input);border-color:var(--theme-border);color:var(--text);accent-color:var(--accent)}
:root[data-theme]:not([data-theme="classic"]) :is(input,textarea)::placeholder {color:var(--muted)}
:root[data-theme]:not([data-theme="classic"]) :is(button,input,select,textarea,a,summary):focus-visible {outline:2px solid var(--accent);outline-offset:3px}
:root[data-theme]:not([data-theme="classic"]) .primary {background:var(--accent);border-color:var(--accent);color:var(--theme-on-accent)}
:root[data-theme]:not([data-theme="classic"]) .primary:hover {background:var(--theme-accent-hover)}
:root[data-theme]:not([data-theme="classic"]) .danger {color:#ffb2ad;border-color:#8e5559;background:#38252d}
:root[data-theme]:not([data-theme="classic"]) .danger:hover {background:#513038}
:root[data-theme]:not([data-theme="classic"]) .quiet {background:transparent;border-color:transparent;color:var(--muted)}
:root[data-theme]:not([data-theme="classic"]) .quiet:hover {background:var(--theme-hover);color:var(--text)}
:root[data-theme]:not([data-theme="classic"]) :is(.name-button,.tab) {background:transparent;border-color:transparent;color:var(--text)}
:root[data-theme]:not([data-theme="classic"]) .name-button:hover {background:transparent;color:var(--accent)}
:root[data-theme]:not([data-theme="classic"]) .tab {color:var(--muted)}
:root[data-theme]:not([data-theme="classic"]) :is(.tab.active,.control-nav .active,.task-tabs .active) {background:var(--theme-selected);color:var(--accent);border-color:var(--accent)}
:root[data-theme]:not([data-theme="classic"]) .brand-symbol {color:var(--theme-on-accent)}
:root[data-theme]:not([data-theme="classic"]) .avatar {background:var(--theme-selected);color:var(--accent)}
:root[data-theme]:not([data-theme="classic"]) th {background:var(--theme-table);color:var(--muted)}
:root[data-theme]:not([data-theme="classic"]) td {border-top-color:var(--line)}
:root[data-theme]:not([data-theme="classic"]) tr:hover td {background:var(--theme-subtle)}
:root[data-theme]:not([data-theme="classic"]) :is(.victim,.time-cell,footer,.case-row small,.case-entry small,.case-health-grid small,.key-evidence small) {color:var(--muted)}
:root[data-theme]:not([data-theme="classic"]) :is(.review-row,.case-row) {background:var(--theme-input);border-color:var(--line)}
:root[data-theme]:not([data-theme="classic"]) :is(.review-row:hover,.case-row:hover) {background:var(--theme-subtle)}
:root[data-theme]:not([data-theme="classic"]) :is(.review-row.active,.case-row.active) {background:var(--theme-selected);border-color:var(--accent)}
:root[data-theme]:not([data-theme="classic"]) .review-row.priority {border-left-color:#efb96b}
:root[data-theme]:not([data-theme="classic"]) :is(.review-row strong,.case-row strong,.reason-line,.next-step) {color:var(--text)}
:root[data-theme]:not([data-theme="classic"]) :is(.case-entry,.case-form) {border-color:var(--line)}
:root[data-theme]:not([data-theme="classic"]) :is(.case-health,.brief-stats,.longrange-evidence,.risk-blocks>section,.key-evidence article,.repeat-review) {background:var(--theme-subtle)}
:root[data-theme]:not([data-theme="classic"]) .control-panel>.case-health {background:transparent}
:root[data-theme]:not([data-theme="classic"]) .badge.dim {background:var(--theme-raised);color:var(--muted)}
:root[data-theme]:not([data-theme="classic"]) .server-ban-summary {background:var(--theme-subtle);color:var(--text);border-color:var(--theme-border)}
:root[data-theme]:not([data-theme="classic"]) .server-ban-summary.active {background:#342d21;color:#f4dba9;border-color:#d6ad66}
:root[data-theme]:not([data-theme="classic"]) .review-return {background:var(--panel);border-bottom-color:var(--accent);box-shadow:0 6px 18px #0008}
:root[data-theme]:not([data-theme="classic"]) .review-return button {background:var(--theme-selected);color:var(--accent);border-color:var(--accent)}
:root[data-theme]:not([data-theme="classic"]) .review-return span {color:var(--muted)}
:root[data-theme]:not([data-theme="classic"]) .target {color:var(--accent)}
:root[data-theme]:not([data-theme="classic"]) .moderation-controls :is(#playerWhisperButton,#playerChangeTeamButton) {background:var(--theme-selected);border-color:var(--theme-border);color:var(--accent)}
:root[data-theme]:not([data-theme="classic"]) .moderation-controls :is(#playerWhisperButton,#playerChangeTeamButton):hover {background:var(--theme-hover)}
:root[data-theme]:not([data-theme="classic"]) :is(.weapon-runtime,.weapon-savebar) {background:var(--theme-subtle)}
:root[data-theme]:not([data-theme="classic"]) .weapon-option:hover {background:var(--theme-hover)}
:root[data-theme]:not([data-theme="classic"]) .weapon-option.is-selected {background:var(--theme-selected)}
:root[data-theme]:not([data-theme="classic"]) .weapon-unverified .weapon-option:hover {background:transparent}
:root[data-theme]:not([data-theme="classic"]) #weaponSelectedCount {color:var(--text)}
@media(prefers-reduced-motion:reduce) {.theme-picker select {scroll-behavior:auto}}
