/* Follow the system theme without a stored preference or a JavaScript startup step. */
:root {
  color-scheme: light dark;
  /* Shared console typography, field sizing and spacing. Phone previews keep iOS sizes. */
  --font-ui: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  --text-xs: 12px;
  --text-sm: 13px;
  --text-base: 14px;
  --text-heading: 16px;
  --line-note: 18px;
  --line-label: 20px;
  --line-body: 22px;
  --line-heading: 24px;
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-8: 32px;
  --field-gap: var(--space-2);
  --form-gap: var(--space-5);
  --control-height: 40px;
  --control-compact: 36px;
  --control-radius: 8px;
  --canvas: #f4f6f9;
  --surface: #fff;
  --surface-subtle: #f7f9fc;
  --surface-hover: #e9eef6;
  --row-hover: #fafbfd;
  --field: #fff;
  --field-border: #d8dee5;
  --ink: #18202b;
  --text-secondary: #475467;
  --muted: #667085;
  --line: #e1e6ee;
  --accent: #2863c5;
  --accent-fill: #2863c5;
  --accent-fill-hover: #1f51a4;
  --on-accent: #fff;
  --accent-soft: #edf3fc;
  --focus-ring: #2863c526;
  --green: #067647;
  --success-soft: #eaf7ef;
  --warning: #8b5b17;
  --warning-soft: #fff5e6;
  --error: #b42318;
  --error-soft: #fef0ee;
  --state-surface: #f1f4f7;
  --state-ink: #526170;
  --drop-border: #aeb8c5;
  --info-ink: #426185;
  --info-border: #d9e4f5;
  --toast-surface: #8e2a20;
  --toast-ink: #fff;
  --shadow: #0002;
  background: var(--canvas);
}

@media (prefers-color-scheme: dark) {
  :root {
    --canvas: #101419;
    --surface: #1b222b;
    --surface-subtle: #222c38;
    --surface-hover: #2a3543;
    --row-hover: #202934;
    --field: #171e27;
    --field-border: #65748a;
    --ink: #edf1f6;
    --text-secondary: #b9c4d3;
    --muted: #a3adbb;
    --line: #343f4d;
    --accent: #85b4ff;
    --accent-fill: #3569bd;
    --accent-fill-hover: #3e72c5;
    --accent-soft: #24364f;
    --focus-ring: #85b4ff33;
    --green: #7fd5a6;
    --success-soft: #18382b;
    --warning: #edc27d;
    --warning-soft: #3b2e1c;
    --error: #ff9c91;
    --error-soft: #472725;
    --state-surface: #2a3441;
    --state-ink: #b4c0d0;
    --drop-border: #617085;
    --info-ink: #abc8ee;
    --info-border: #344d72;
    --toast-surface: #572923;
    --toast-ink: #ffebe8;
    --shadow: #0006;
  }
}
