:root {
  --button-radius: var(--radius-sm);
  --button-height: 40px;
  --button-height-small: 36px;
  --accent-contrast: var(--surface);
  --accent-hover-mix: var(--text);

  --font-size-caption: 11px;
  --font-size-label: 12px;
  --font-size-action: 13px;
  --font-size-body: 14px;
  --font-size-input: 14px;
  --font-size-section: 16px;
  --font-size-title: 22px;

  --font: -apple-system, "SF Pro Text", "Segoe UI Variable", "Segoe UI", "Inter", Roboto, Helvetica, Arial, sans-serif;

  --bg: #f4f5f7;
  --bg-soft: #eef0f3;
  --surface: #ffffff;
  --surface-2: #f1f2f5;
  --text: #1c1d21;
  --muted: #5f6368;
  --faint: #80868b;
  --border: #e2e4e8;
  --border-strong: #cfd2d8;

  --accent: #5b5bf0;
  --accent-2: #5b5bf0;
  --accent-grad: var(--accent);
  --accent-soft: #eceeff;
  --accent-text: #4a4ae0;

  --free: #1a8a5e;
  --free-soft: #e6f4ee;
  --warn: #b5680a;
  --warn-soft: #fbf0df;
  --danger: #c5221f;
  --danger-soft: #fbe9e8;
  --done: #1a8a5e;
  --now: #c5221f;

  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 16px;
  --radius-pill: 999px;

  --shadow-sm: 0 1px 2px rgba(20, 20, 30, .06);
  --shadow: 0 2px 8px rgba(20, 20, 30, .08), 0 1px 2px rgba(20, 20, 30, .06);
  --shadow-lg: 0 8px 28px rgba(20, 20, 30, .16), 0 2px 6px rgba(20, 20, 30, .08);
  --shadow-accent: none;

  color-scheme: light;
}

:root[data-theme="dark"] {
  --bg: #131316;
  --bg-soft: #18181c;
  --surface: #1e1f23;
  --surface-2: #26272c;
  --text: #ecedf0;
  --muted: #9b9ea3;
  --faint: #717479;
  --border: #303136;
  --border-strong: #3c3d43;

  --accent: #8f8fff;
  --accent-2: #8f8fff;
  --accent-grad: var(--accent);
  --accent-soft: #28283f;
  --accent-text: #b2b2ff;

  --free: #4cbd8c;
  --free-soft: #16281f;
  --warn: #e3a648;
  --warn-soft: #2c2210;
  --danger: #ef8784;
  --danger-soft: #311319;
  --done: #4cbd8c;
  --now: #ef8784;

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .4);
  --shadow: 0 2px 10px rgba(0, 0, 0, .45);
  --shadow-lg: 0 10px 32px rgba(0, 0, 0, .55);
  --shadow-accent: none;

  color-scheme: dark;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #131316;
    --bg-soft: #18181c;
    --surface: #1e1f23;
    --surface-2: #26272c;
    --text: #ecedf0;
    --muted: #9b9ea3;
    --faint: #717479;
    --border: #303136;
    --border-strong: #3c3d43;

    --accent: #8f8fff;
    --accent-2: #8f8fff;
    --accent-grad: var(--accent);
    --accent-soft: #28283f;
    --accent-text: #b2b2ff;

    --free: #4cbd8c;
    --free-soft: #16281f;
    --warn: #e3a648;
    --warn-soft: #2c2210;
    --danger: #ef8784;
    --danger-soft: #311319;
    --done: #4cbd8c;
    --now: #ef8784;

    --shadow-sm: 0 1px 2px rgba(0, 0, 0, .4);
    --shadow: 0 2px 10px rgba(0, 0, 0, .45);
    --shadow-lg: 0 10px 32px rgba(0, 0, 0, .55);
    --shadow-accent: none;

    color-scheme: dark;
  }
}

/* Pages and dialogs share input sizing; 16px also avoids focus zoom on phones. */
@media (max-width: 600px) {
  :root { --font-size-input: 16px; }
}
