/* Design Tokens — Harmonized with the sage-ivory botanical chibi virtual companion */

:root {
  --font-sans: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", "Fira Code", "SFMono-Regular", Menlo, Consolas, monospace;

  /* Light Botanical Mist Theme */
  --bg-canvas: #eef4ef;
  --bg-canvas-accent: radial-gradient(circle at 12% 10%, rgba(133, 189, 155, 0.24), transparent 45%),
                      radial-gradient(circle at 88% 12%, rgba(236, 198, 198, 0.22), transparent 42%),
                      radial-gradient(circle at 80% 90%, rgba(167, 206, 180, 0.2), transparent 45%);
  --bg-sidebar: rgba(248, 251, 248, 0.92);
  --bg-surface: rgba(255, 255, 255, 0.92);
  --bg-surface-solid: #ffffff;
  --bg-elevated: #f5f9f6;
  --bg-hover: rgba(83, 138, 108, 0.09);
  --bg-active: rgba(83, 138, 108, 0.16);

  --border-subtle: rgba(74, 114, 92, 0.14);
  --border-strong: rgba(74, 114, 92, 0.28);

  --text-primary: #1d2c24;
  --text-secondary: #566b60;
  --text-muted: #7f9488;

  --accent: #4c8567;
  --accent-hover: #3d7155;
  --accent-soft: rgba(76, 133, 103, 0.13);
  --accent-text: #ffffff;

  --blush: #d97070;
  --blush-soft: rgba(217, 112, 112, 0.14);

  --bubble-user-bg: linear-gradient(135deg, #528c6d 0%, #3f7558 100%);
  --bubble-user-text: #ffffff;
  --bubble-ai-bg: rgba(255, 255, 255, 0.96);
  --bubble-ai-border: rgba(76, 133, 103, 0.16);

  --code-bg: #1e2823;
  --code-header: #27342e;
  --code-text: #e6f0ea;
  --inline-code-bg: rgba(76, 133, 103, 0.12);
  --inline-code-text: #2c5b43;

  --shadow-sm: 0 2px 8px rgba(29, 54, 41, 0.06);
  --shadow-md: 0 10px 30px rgba(29, 54, 41, 0.09);
  --shadow-lg: 0 18px 48px rgba(29, 54, 41, 0.14);
  --avatar-shadow: drop-shadow(0 10px 18px rgba(45, 86, 65, 0.18));

  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 22px;
  --radius-pill: 999px;

  --sidebar-width: 276px;
  --header-height: 64px;
}

[data-theme="dark"] {
  --bg-canvas: #0e1512;
  --bg-canvas-accent: radial-gradient(circle at 12% 10%, rgba(92, 168, 127, 0.14), transparent 45%),
                      radial-gradient(circle at 88% 12%, rgba(217, 128, 134, 0.11), transparent 40%),
                      radial-gradient(circle at 75% 88%, rgba(74, 140, 106, 0.12), transparent 45%);
  --bg-sidebar: rgba(20, 29, 25, 0.94);
  --bg-surface: rgba(24, 34, 29, 0.92);
  --bg-surface-solid: #18221d;
  --bg-elevated: #202d27;
  --bg-hover: rgba(126, 198, 159, 0.1);
  --bg-active: rgba(126, 198, 159, 0.18);

  --border-subtle: rgba(164, 212, 185, 0.12);
  --border-strong: rgba(164, 212, 185, 0.26);

  --text-primary: #e8f2ec;
  --text-secondary: #a2bab0;
  --text-muted: #728c80;

  --accent: #6cb88f;
  --accent-hover: #80ca9f;
  --accent-soft: rgba(108, 184, 143, 0.18);
  --accent-text: #0f1c15;

  --blush: #eb8484;
  --blush-soft: rgba(235, 132, 132, 0.18);

  --bubble-user-bg: linear-gradient(135deg, #3f7a5c 0%, #2f6047 100%);
  --bubble-user-text: #f4faf6;
  --bubble-ai-bg: rgba(31, 44, 38, 0.92);
  --bubble-ai-border: rgba(154, 207, 178, 0.14);

  --code-bg: #111915;
  --code-header: #1a2620;
  --code-text: #e3efe8;
  --inline-code-bg: rgba(126, 198, 159, 0.16);
  --inline-code-text: #9fe0bc;

  --shadow-sm: 0 2px 10px rgba(0, 0, 0, 0.25);
  --shadow-md: 0 12px 32px rgba(0, 0, 0, 0.36);
  --shadow-lg: 0 22px 54px rgba(0, 0, 0, 0.5);
  --avatar-shadow: drop-shadow(0 10px 22px rgba(108, 184, 143, 0.22));
}

*, *::before, *::after {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  font-family: var(--font-sans);
  color: var(--text-primary);
  background: var(--bg-canvas);
  background-image: var(--bg-canvas-accent);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
}

button, input, textarea {
  font-family: inherit;
  color: inherit;
}

.hidden {
  display: none !important;
}
