/* 由 tools/gen-tokens-css.mjs 从 tokens.json 生成 —— 不要手改 */
:root {
  --bg: #ffffff;
  --surface: #f5f6f8;
  --surface-2: #eceef2;
  --border: #dfe3e9;
  --border-input: #7d8796;
  --text: #14181f;
  --text-muted: #5a6472;
  --accent: #AC4B14;
  --on-accent: #ffffff;
  --danger: #C81E1E;
  --success: #1a7f4b;
  --warning: #a15c00;
  --font-sans: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, 'Noto Sans', sans-serif;
  --font-greek: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', 'Noto Sans', sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --fs-xs: 12px;
  --lh-xs: 16px;
  --fw-xs: 500;
  --fs-sm: 14px;
  --lh-sm: 20px;
  --fw-sm: 400;
  --fs-base: 16px;
  --lh-base: 24px;
  --fw-base: 400;
  --fs-lg: 20px;
  --lh-lg: 28px;
  --fw-lg: 600;
  --fs-xl: 28px;
  --lh-xl: 34px;
  --fw-xl: 700;
  --fs-display: 40px;
  --lh-display: 44px;
  --fw-display: 700;
  --space-0: 0px;
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;
  --space-7: 48px;
  --space-8: 64px;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-pill: 999px;
  --shadow-card: 0 1px 2px rgba(16,24,40,.06), 0 1px 3px rgba(16,24,40,.10);
  --shadow-pop: 0 12px 32px rgba(16,24,40,.16);
  --motion-fast: 120ms;
  --motion-base: 200ms;
  --motion-ease: cubic-bezier(.2,.8,.2,1);
  --max-content: 960px;
  --card-max: 720px;
  --header-height: 56px;
  --touch-target-min: 44px;
  --focus-ring: 2px solid var(--accent);
  --focus-offset: 2px;
}

/* 跟随系统（auto 档）：只在没有手动指定 light 时生效 */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0f1216;
    --surface: #171c22;
    --surface-2: #1f262e;
    --border: #2b333d;
    --border-input: #6b7684;
    --text: #e8ecf1;
    --text-muted: #a3adba;
    --accent: #F0A07A;
    --on-accent: #10131a;
    --danger: #ff8a80;
    --success: #6ee7a8;
    --warning: #f0b357;
  }
}

/* 手动强制暗色 */
[data-theme="dark"] {
  --bg: #0f1216;
  --surface: #171c22;
  --surface-2: #1f262e;
  --border: #2b333d;
  --border-input: #6b7684;
  --text: #e8ecf1;
  --text-muted: #a3adba;
  --accent: #F0A07A;
  --on-accent: #10131a;
  --danger: #ff8a80;
  --success: #6ee7a8;
  --warning: #f0b357;
}

/* 动效降级：用户要求减少动效时全部关掉 */
@media (prefers-reduced-motion: reduce) {
  :root {
    --motion-fast: 0ms;
    --motion-base: 0ms;
  }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}
