:root,
:root[data-theme="light"] {
  color-scheme: light;
  --theme-page: #f5f7fa;
  --theme-surface: #ffffff;
  --theme-surface-raised: #f8fafc;
  --theme-text: #263449;
  --theme-muted: #64748b;
  --theme-line: #d6dce4;
  --theme-input: #ffffff;
  --theme-button: #e8edf3;
  --theme-button-hover: #dce4ed;
  --theme-shadow: 0 14px 34px #1d2b3a1f;
  --theme-focus: #2563eb;
  --theme-success: #257145;
  --theme-warning: #8a5b0a;
  --theme-danger: #a3363e;
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --theme-page: #09090b;
  --theme-surface: #18181b;
  --theme-surface-raised: #27272a;
  --theme-text: #f4f4f5;
  --theme-muted: #a1a1aa;
  --theme-line: #3f3f46;
  --theme-input: #111113;
  --theme-button: #27272a;
  --theme-button-hover: #3f3f46;
  --theme-shadow: 0 18px 40px #0006;
  --theme-focus: #a78bfa;
  --theme-success: #86efac;
  --theme-warning: #facc15;
  --theme-danger: #fca5a5;
}

.app-theme-switch {
  display: inline-grid;
  place-items: center;
  width: 42px;
  height: 42px;
  padding: 0;
  border: 1px solid var(--theme-line);
  border-radius: 999px;
  background: var(--theme-button);
  color: var(--theme-muted);
  box-shadow: none;
  cursor: pointer;
}
.app-theme-switch:hover { background: var(--theme-button-hover); }
.app-theme-switch:focus-visible { outline: 2px solid var(--theme-focus); outline-offset: 2px; }
.app-theme-switch__icon { width: 20px; height: 20px; fill: currentColor; }
:root[data-theme="light"] .app-theme-switch { color: #b56a00; background: #fff4c2; border-color: #e5b84d; }
:root[data-theme="light"] .app-theme-switch__icon { filter: drop-shadow(0 0 5px #fbbf24); }
