/* 心语 · 设计令牌 v3（暖色调 · 温馨治愈）
   视觉语言：奶油底色 + 陶土橙主色 + 暖褐文字；比纯白/纯黑柔和，长时间阅读不刺眼。
   层级仍用 border 分隔，卡片加一层极淡的暖色投影增加"软"的感觉。
   动效曲线/时长沿用 emil 标准。 */

:root {
  color-scheme: light dark;

  --font-sans: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto,
    "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  --font-mono: ui-monospace, "Cascadia Code", "SF Mono", Consolas, monospace;

  /* —— 动效（emil 标准：强自定义曲线，UI 动画 < 300ms） —— */
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);       /* 进入/退出 */
  --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);   /* 屏上移动/变形 */
  --dur-1: 100ms;   /* 瞬时反馈 */
  --dur-2: 160ms;   /* 按钮按下 */
  --dur-3: 200ms;   /* 常规进出场 */
  --dur-4: 300ms;   /* 上限 */
  /* 旧名兼容（页面内联样式仍引用） */
  --dur-fast: var(--dur-2);
  --dur-slow: var(--dur-4);

  /* —— 圆角（手账纸片感：比常规 UI 更大） —— */
  --radius-s: 10px;
  --radius-m: 18px;
  --radius-l: 26px;

  /* —— 间距（4 基数） —— */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;
  --space-7: 48px;

  --content-width: 680px;
  --header-h: 52px;

  /* —— 浅色：奶油 + 陶土橙 —— */
  --c-bg: #fdf7f0;             /* 奶油底，不用纯白 */
  --c-surface: #fffdfb;        /* 卡片近白，带一丝暖 */
  --c-surface-2: #f8efe5;
  --c-surface-3: #f1e4d6;
  --c-border: #eddfd0;
  --c-border-strong: #dcc7b2;
  --c-text: #3d332b;           /* 暖褐黑，比 #18181b 柔和 */
  --c-text-2: #6e5f52;
  --c-text-3: #9a8878;
  --c-accent: #cf6440;         /* 陶土橙 */
  --c-accent-weak: #fdeee7;
  --c-danger: #c4462e;
  --c-danger-weak: #fbece8;
  --c-success: #6d9160;        /* 暖橄榄绿 */
  --c-success-weak: #eef4e9;
  --c-warn: #c8873a;           /* 暖琥珀 */
  --c-warn-weak: #fdf3e3;

  /* 状态点（点 + 文字，无彩底） */
  --c-dot-pending: #c8873a;
  --c-dot-review: #cf6440;
  --c-dot-resolved: #6d9160;
  --c-dot-committee: #cf6440;
  --c-dot-income: #6d9160;
  --c-dot-expense: #c4462e;

  /* 页面角落的两团"环境光"，让底色不那么平 */
  --bg-glow-1: rgb(255 215 183 / 0.55);
  --bg-glow-2: rgb(255 237 214 / 0.65);

  /* 手账纸感：极淡的点阵底纹 + 信纸横格线 */
  --paper-dot: rgb(186 152 118 / 0.18);
  --paper-line: rgb(190 152 112 / 0.46);

  /* 半透明材质（导航悬浮层） */
  --c-header-bg: rgb(253 247 240 / 0.72);
  --c-header-border: rgb(237 223 208 / 0.85);

  /* 投影一律带暖色调，纯黑投影在奶油底上会发灰；纸片式的双层投影 */
  --shadow-card: 0 2px 4px rgb(124 88 60 / 0.06), 0 16px 30px -14px rgb(124 88 60 / 0.22);
  --shadow-pop: 0 6px 22px rgb(124 88 60 / 0.16), 0 1px 3px rgb(124 88 60 / 0.10);
  /* 旧名兼容 */
  --shadow-1: none;
  --shadow-2: var(--shadow-pop);
}

[data-theme="dark"] {
  color-scheme: dark;
  /* —— 深色：暖夜（褐底而非纯黑） —— */
  --c-bg: #1b1613;
  --c-surface: #241d18;
  --c-surface-2: #2e251f;
  --c-surface-3: #382d26;
  --c-border: #3b2f27;
  --c-border-strong: #4d3e33;
  --c-text: #f7f0e8;
  --c-text-2: #c6b6a7;
  --c-text-3: #a4927f;
  --c-accent: #f0895f;
  --c-accent-weak: #3b2318;
  --c-danger: #ef8574;
  --c-danger-weak: #3b1f19;
  --c-success: #9cbf8b;
  --c-success-weak: #262f1f;
  --c-warn: #e3b566;
  --c-warn-weak: #3a2b14;

  --c-dot-pending: #e3b566;
  --c-dot-review: #f0895f;
  --c-dot-resolved: #9cbf8b;
  --c-dot-committee: #f0895f;
  --c-dot-income: #9cbf8b;
  --c-dot-expense: #ef8574;

  --bg-glow-1: rgb(122 70 45 / 0.35);
  --bg-glow-2: rgb(92 60 40 / 0.30);
  --paper-dot: rgb(214 186 158 / 0.10);
  --paper-line: rgb(214 186 158 / 0.15);

  --c-header-bg: rgb(27 22 19 / 0.72);
  --c-header-border: rgb(59 47 39 / 0.85);

  --shadow-card: 0 2px 4px rgb(0 0 0 / 0.35), 0 16px 30px -14px rgb(0 0 0 / 0.55);
  --shadow-pop: 0 6px 22px rgb(0 0 0 / 0.50), 0 1px 3px rgb(0 0 0 / 0.30);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]):not([data-theme="dark"]) {
    color-scheme: dark;
    --c-bg: #1b1613;
    --c-surface: #241d18;
    --c-surface-2: #2e251f;
    --c-surface-3: #382d26;
    --c-border: #3b2f27;
    --c-border-strong: #4d3e33;
    --c-text: #f7f0e8;
    --c-text-2: #c6b6a7;
    --c-text-3: #a4927f;
    --c-accent: #f0895f;
    --c-accent-weak: #3b2318;
    --c-danger: #ef8574;
    --c-danger-weak: #3b1f19;
    --c-success: #9cbf8b;
    --c-success-weak: #262f1f;
    --c-warn: #e3b566;
    --c-warn-weak: #3a2b14;
    --c-dot-pending: #e3b566;
    --c-dot-review: #f0895f;
    --c-dot-resolved: #9cbf8b;
    --c-dot-committee: #f0895f;
    --c-dot-income: #9cbf8b;
    --c-dot-expense: #ef8574;
    --bg-glow-1: rgb(122 70 45 / 0.35);
    --bg-glow-2: rgb(92 60 40 / 0.30);
    --paper-dot: rgb(214 186 158 / 0.10);
    --paper-line: rgb(220 186 150 / 0.22);
    --c-header-bg: rgb(27 22 19 / 0.72);
    --c-header-border: rgb(59 47 39 / 0.85);
    --shadow-card: 0 2px 4px rgb(0 0 0 / 0.35), 0 16px 30px -14px rgb(0 0 0 / 0.55);
    --shadow-pop: 0 6px 22px rgb(0 0 0 / 0.50), 0 1px 3px rgb(0 0 0 / 0.30);
  }
}
