/* ============================================================
   旷帧 · 品牌覆盖层 v1
   情绪词：影调 / 克制 / 温润
   品牌强调色：黄铜金 oklch(72% .085 78)
   说明：只重映射设计令牌 + 少量结构微调，不碰组件结构。
   回滚：删除 index.html 中的引用行即可。
   ============================================================ */

/* ===== 暗色主题（画布 / 主应用）===== */
html.dark {
  /* 中性阶梯整体转暖（低彩度、hue 85 暖调），替换原纯灰 */
  --color-neutral-950: oklch(14.5% 0.006 85);
  --color-neutral-900: oklch(20.5% 0.006 85);
  --color-neutral-800: oklch(26.9% 0.007 85);
  --color-neutral-700: oklch(37.1% 0.008 85);
  --color-neutral-600: oklch(43.9% 0.009 85);
  --color-neutral-500: oklch(55.6% 0.011 85);
  --color-neutral-400: oklch(68% 0.013 85);
  --color-neutral-300: oklch(80% 0.012 85);
  --color-neutral-200: oklch(90% 0.010 85);
  --color-neutral-100: oklch(96% 0.007 85);

  /* 核心表面与文字：暖近黑底 + 暖白墨 */
  --background: #100e0b;
  --bg: #100e0b;
  --bg-secondary: #15120e;
  --bg-tertiary: #1a1712;
  --card: #1a1712;
  --border: #2a251e;
  --foreground: #f2ede3;
  --muted-foreground: #a89f92;

  /* 品牌强调色：黄铜金（按钮 / 焦点环 / 选中态） */
  --accent: oklch(72% 0.085 78);
  --accent-foreground: oklch(18% 0.012 85);
  --primary: oklch(72% 0.085 78);
  --primary-foreground: oklch(18% 0.012 85);
  --ring: oklch(72% 0.085 78);

  /* 圆角基准收敛（8/12/16 三档中的主档 12px） */
  --radius: 0.75rem;
}

/* ===== 亮色主题（设置 / 登录 / 管理页）===== */
html:root:not(.dark) {
  --background: #faf7f0;
  --bg: #faf7f0;
  --bg-secondary: #f4efe5;
  --bg-tertiary: #efe9dd;
  --border: #e3dccc;
  --foreground: #1f1b14;
  --muted-foreground: #6f6a5e;
  --accent: oklch(52% 0.075 78);
  --accent-foreground: #faf7f0;
  --ring: oklch(52% 0.075 78);
  --auth-page-bg: #faf7f0;
  --auth-card-bg: #ffffff;
  --auth-muted: #6f6a5e;
  --auth-accent: oklch(52% 0.075 78);
}

/* 页面底色（应用 JS 会在 body 写内联样式，需 !important 压制） */
html:not(.dark) body {
  background: #faf7f0 !important;
}

html.dark body {
  background: #100e0b !important;
}

/* ===== 通用微调 ===== */

/* 危险字号兜底：正文可读性下限 12px */
html.dark [style*="font-size:7px"],
html.dark [style*="font-size:10px"] {
  font-size: 12px !important;
}

/* 选中态用品牌色 */
html.dark ::selection {
  background: oklch(72% 0.085 78 / 0.30);
}

/* 焦点可见性：品牌色描边 */
html.dark :focus-visible {
  outline: 2px solid oklch(72% 0.085 78 / 0.7);
  outline-offset: 2px;
}
