:root {
  /* Light Theme — Modern SaaS Clean Canvas (Style C) */
  --bg-page: #ffffff;
  --bg-subtle: #f6f7f9;
  --bg-surface: #ffffff;
  --bg-surface-2: #f1f5f9;
  --bg-header: rgba(255, 255, 255, 0.88);
  --bg-popover: #ffffff;

  --text-primary: #0f172a;
  --text-secondary: #334155;
  --text-muted: #64748b;
  --text-faint: #94a3b8;

  --border-subtle: #e2e8f0;
  --border-strong: #cbd5e1;

  --brand-primary: #e5484d;
  --brand-primary-hover: #d13438;
  --brand-primary-soft: #fff0f0;
  --brand-primary-border: #fecaca;

  --cta-dark: #0f172a;
  --cta-dark-hover: #1e293b;
  --cta-dark-text: #ffffff;

  /* 4-Tone Color System */
  --tone-1: #e5484d; /* Flat */
  --tone-2: #d97706; /* Rising */
  --tone-3: #0d9488; /* Dipping */
  --tone-4: #2563eb; /* Falling */
  --tone-5: #64748b; /* Neutral */

  --tone-1-bg: rgba(229, 72, 77, 0.09);
  --tone-2-bg: rgba(217, 119, 6, 0.1);
  --tone-3-bg: rgba(13, 148, 136, 0.1);
  --tone-4-bg: rgba(37, 99, 235, 0.09);

  /* Difficulty Badges */
  --level-beginner-bg: #ecfdf5;
  --level-beginner-fg: #047857;
  --level-elementary-bg: #eff6ff;
  --level-elementary-fg: #1d4ed8;
  --level-intermediate-bg: #fff7ed;
  --level-intermediate-fg: #c2410c;

  --shadow-xs: 0 1px 2px rgba(15, 23, 42, 0.04);
  --shadow-sm: 0 2px 8px rgba(15, 23, 42, 0.05), 0 1px 2px rgba(15, 23, 42, 0.04);
  --shadow-md: 0 12px 32px rgba(15, 23, 42, 0.08), 0 2px 6px rgba(15, 23, 42, 0.04);
  --shadow-lg: 0 24px 60px rgba(15, 23, 42, 0.12), 0 4px 16px rgba(15, 23, 42, 0.05);

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 22px;
  --radius-pill: 9999px;

  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "PingFang SC", "Noto Sans SC", "Microsoft YaHei", sans-serif;
  --font-cn: "PingFang SC", "Noto Sans SC", "Microsoft YaHei", "Heiti SC", sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, "JetBrains Mono", Menlo, Monaco, Consolas, monospace;

  --container-max: 1240px;
  --header-height: 68px;
}

[data-theme="dark"] {
  --bg-page: #0b1120;
  --bg-subtle: #111827;
  --bg-surface: #151e31;
  --bg-surface-2: #1e293b;
  --bg-header: rgba(11, 17, 32, 0.86);
  --bg-popover: #1a243a;

  --text-primary: #f8fafc;
  --text-secondary: #cbd5e1;
  --text-muted: #94a3b8;
  --text-faint: #64748b;

  --border-subtle: #263248;
  --border-strong: #334155;

  --brand-primary: #f25f64;
  --brand-primary-hover: #ff7377;
  --brand-primary-soft: rgba(242, 95, 100, 0.14);
  --brand-primary-border: rgba(242, 95, 100, 0.35);

  --cta-dark: #f8fafc;
  --cta-dark-hover: #e2e8f0;
  --cta-dark-text: #0f172a;

  --tone-1: #fb7185;
  --tone-2: #fbbf24;
  --tone-3: #2dd4bf;
  --tone-4: #60a5fa;
  --tone-5: #94a3b8;

  --tone-1-bg: rgba(251, 113, 133, 0.14);
  --tone-2-bg: rgba(251, 191, 36, 0.14);
  --tone-3-bg: rgba(45, 212, 191, 0.14);
  --tone-4-bg: rgba(96, 165, 250, 0.14);

  --level-beginner-bg: rgba(16, 185, 129, 0.15);
  --level-beginner-fg: #34d399;
  --level-elementary-bg: rgba(59, 130, 246, 0.16);
  --level-elementary-fg: #60a5fa;
  --level-intermediate-bg: rgba(249, 115, 22, 0.16);
  --level-intermediate-fg: #fb923c;

  --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.25);
  --shadow-sm: 0 4px 12px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 16px 36px rgba(0, 0, 0, 0.45);
  --shadow-lg: 0 24px 64px rgba(0, 0, 0, 0.6);
}
