/* ==================== 主题变量 ==================== */
/* 默认浅色；深色通过 <html data-theme="dark"> 覆盖（由 index.html 脚本与切换按钮设置） */
:root {
  color-scheme: light;

  --c-bg: #ffffff;
  --c-surface: #ffffff;
  --c-text: #2b2f36;
  --c-text-soft: #5f6670;
  --c-muted: #8a9099;
  --c-link: #1d5a94;
  --c-accent: #1d5a94;
  --c-on-accent: #ffffff;
  --c-line: #ebedf0;
  --c-line-strong: #d9dee5;
  --c-side: #f7f8fa;
  --c-hover: #f1f4f8;
  --c-active: #e6edf6;
  --c-tag-bg: #f1f3f6;
  --c-tag-hover: #e4e9f0;
  --c-code-bg: #f3f4f6;
  --c-pre-bg: #f7f8fa;
  --c-quote-bg: #f8fafc;
  --c-quote-border: #d7dde6;
  --c-node: #c3cad4;
  --c-entry-hover: #f7f9fc;
  --c-input-focus: #b9c9dc;
  --c-shadow: rgba(0, 0, 0, 0.08);
  --c-csdn: #d6402a;
  --c-csdn-bg: #fff6f3;
  --c-csdn-border: #f5c2b6;
  --c-wechat: #108a4a;
  --c-wechat-bg: #f2fbf6;
  --c-wechat-border: #b5e4c9;

  --sidebar-w: 260px;
  --content-w: 680px;
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans CJK SC", sans-serif;
  --font-mono: Consolas, "Cascadia Mono", Menlo, monospace;
}

:root[data-theme="dark"] {
  color-scheme: dark;

  --c-bg: #101317;
  --c-surface: #171b21;
  --c-text: #e3e6ea;
  --c-text-soft: #b3bac4;
  --c-muted: #7f8794;
  --c-link: #7cb2ea;
  --c-accent: #3b7bbf;
  --c-on-accent: #ffffff;
  --c-line: #262c35;
  --c-line-strong: #343c47;
  --c-side: #14181e;
  --c-hover: #1c222b;
  --c-active: #233040;
  --c-tag-bg: #1f252e;
  --c-tag-hover: #2a323d;
  --c-code-bg: #1d232c;
  --c-pre-bg: #14181e;
  --c-quote-bg: #161b22;
  --c-quote-border: #3a4350;
  --c-node: #4a5361;
  --c-entry-hover: #171c24;
  --c-input-focus: #3d5873;
  --c-shadow: rgba(0, 0, 0, 0.45);
  --c-csdn: #ff8a72;
  --c-csdn-bg: #2a1a17;
  --c-csdn-border: #5a2f27;
  --c-wechat: #5fd39a;
  --c-wechat-bg: #13251c;
  --c-wechat-border: #245a40;
}

/* 阅读主题：沿用统一的颜色变量，确保文章、书影音与旅行页面一致。 */
:root[data-theme="paper"] {
  color-scheme: light;
  --c-bg:#f7f1e7; --c-surface:#fffaf2; --c-text:#38312b; --c-text-soft:#67594d;
  --c-muted:#77695b; --c-link:#964a31; --c-accent:#964a31; --c-on-accent:#fff;
  --c-line:#e9dccb; --c-line-strong:#d7c5af; --c-side:#f0e6d6; --c-hover:#e9ddcc;
  --c-active:#e4d3bf; --c-tag-bg:#efe4d5; --c-tag-hover:#e5d5c1; --c-code-bg:#efe5d8;
  --c-pre-bg:#f3eadf; --c-quote-bg:#f3e8d9; --c-quote-border:#c5a78d;
  --c-node:#c9b299; --c-entry-hover:#f4eadc; --c-input-focus:#a66a4d;
  --c-shadow:rgba(87,59,37,.12);
}
:root[data-theme="forest"] {
  color-scheme: light;
  --c-bg:#f3f7f1; --c-surface:#fbfdf9; --c-text:#243b30; --c-text-soft:#536b5c;
  --c-muted:#647a69; --c-link:#286b4d; --c-accent:#286b4d; --c-on-accent:#fff;
  --c-line:#dae8d8; --c-line-strong:#c4d7c3; --c-side:#e8f1e6; --c-hover:#e0ecde;
  --c-active:#d4e7d2; --c-tag-bg:#e4f0e1; --c-tag-hover:#d4e7d1; --c-code-bg:#e7f0e4;
  --c-pre-bg:#ecf4e9; --c-quote-bg:#eaf4e8; --c-quote-border:#a9cbae;
  --c-node:#a5c5a8; --c-entry-hover:#edf5eb; --c-input-focus:#5f9873;
  --c-shadow:rgba(34,74,44,.1);
}
:root[data-theme="ocean"] {
  color-scheme: light;
  --c-bg:#f1f7fa; --c-surface:#fbfdff; --c-text:#213b4c; --c-text-soft:#526e7d;
  --c-muted:#637d8b; --c-link:#1e688d; --c-accent:#1e688d; --c-on-accent:#fff;
  --c-line:#d8e8ef; --c-line-strong:#bfd5e0; --c-side:#e5f1f6; --c-hover:#ddecf3;
  --c-active:#cfe5ef; --c-tag-bg:#e3f0f5; --c-tag-hover:#d3e8f1; --c-code-bg:#e7f1f5;
  --c-pre-bg:#eaf3f7; --c-quote-bg:#e7f3f8; --c-quote-border:#a8cad9;
  --c-node:#9dbfce; --c-entry-hover:#eaf4f8; --c-input-focus:#619ab4;
  --c-shadow:rgba(29,75,99,.1);
}
