:root {
  --font-sans: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", system-ui, sans-serif;
  --font-serif: "Songti SC", "STSong", "Noto Serif SC", "Source Han Serif SC", Georgia, serif;
  --font-mono: "SF Mono", ui-monospace, Menlo, Consolas, monospace;

  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 18px;
  --r-xl: 22px;

  --ease: cubic-bezier(0.22, 1, 0.36, 1);

  /* 亮色默认：暖白清透工作台 */
  --bg: #F7F7F5;
  --surface: #FFFFFF;
  --surface-2: #F1F0EC;
  --surface-hover: #ECEAE4;
  --ink: #161618;
  --ink-2: #4A4C52;
  --ink-3: #6E7179;
  --line: rgba(22, 22, 24, 0.085);
  --line-strong: rgba(22, 22, 24, 0.16);

  --live: #16A34A;
  --live-soft: rgba(22, 163, 74, 0.12);
  --warn: #B45309;
  --warn-soft: rgba(180, 83, 9, 0.10);
  --danger: #B91C1C;
  --danger-soft: rgba(185, 28, 28, 0.10);

  /* 默认强调色：琥珀金 */
  --accent: #B8862D;
  --accent-ink: #FFFFFF;
  --accent-soft: rgba(184, 134, 45, 0.10);

  /* 蓝图金卡专属材质 */
  --bp-bg: linear-gradient(155deg, #FFFDF7 0%, #FAF3E0 100%);
  --bp-border: rgba(184, 134, 45, 0.58);
  --bp-gold: #9A6B16;
  --bp-sheen: rgba(232, 188, 92, 0.32);
  --diff-bg: rgba(184, 134, 45, 0.13);

  --shadow-card: 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow-bp: 0 10px 28px -12px rgba(184, 134, 45, 0.28);
  --shadow-modal: 0 24px 60px -16px rgba(0, 0, 0, 0.22);
}

html[data-theme="dark"] {
  --bg: #0F1012;
  --surface: #17181B;
  --surface-2: #202226;
  --surface-hover: #272A30;
  --ink: #F2F2F0;
  --ink-2: #B0B4BC;
  --ink-3: #8E939E;
  --line: rgba(255, 255, 255, 0.085);
  --line-strong: rgba(255, 255, 255, 0.16);

  --live: #22C55E;
  --live-soft: rgba(34, 197, 94, 0.16);
  --warn: #F59E0B;
  --warn-soft: rgba(245, 158, 11, 0.15);
  --danger: #F87171;
  --danger-soft: rgba(248, 113, 113, 0.15);

  --accent: #E0B45A;
  --accent-ink: #141310;
  --accent-soft: rgba(224, 180, 90, 0.14);

  --bp-bg: linear-gradient(155deg, #1E1A12 0%, #16140F 100%);
  --bp-border: rgba(224, 180, 90, 0.45);
  --bp-gold: #E7BE6A;
  --bp-sheen: rgba(245, 208, 122, 0.18);
  --diff-bg: rgba(224, 180, 90, 0.16);

  --shadow-card: 0 1px 3px rgba(0, 0, 0, 0.28);
  --shadow-bp: 0 12px 32px -12px rgba(224, 180, 90, 0.22);
  --shadow-modal: 0 28px 64px -16px rgba(0, 0, 0, 0.65);
}

/* 四套主题强调色 */
html[data-accent="amber"] {
  --accent: #B8862D;
  --accent-ink: #FFFFFF;
  --accent-soft: rgba(184, 134, 45, 0.10);
}
html[data-theme="dark"][data-accent="amber"] {
  --accent: #E0B45A;
  --accent-ink: #141310;
  --accent-soft: rgba(224, 180, 90, 0.14);
}

html[data-accent="ink"] {
  --accent: #18181B;
  --accent-ink: #FFFFFF;
  --accent-soft: rgba(24, 24, 27, 0.08);
}
html[data-theme="dark"][data-accent="ink"] {
  --accent: #E4E4E7;
  --accent-ink: #141416;
  --accent-soft: rgba(228, 228, 231, 0.12);
}

html[data-accent="teal"] {
  --accent: #0F766E;
  --accent-ink: #FFFFFF;
  --accent-soft: rgba(15, 118, 110, 0.10);
}
html[data-theme="dark"][data-accent="teal"] {
  --accent: #2DD4BF;
  --accent-ink: #0B1918;
  --accent-soft: rgba(45, 212, 191, 0.14);
}

html[data-accent="indigo"] {
  --accent: #4338CA;
  --accent-ink: #FFFFFF;
  --accent-soft: rgba(67, 56, 202, 0.10);
}
html[data-theme="dark"][data-accent="indigo"] {
  --accent: #818CF8;
  --accent-ink: #0F1022;
  --accent-soft: rgba(129, 140, 248, 0.14);
}

@keyframes livePulse {
  0% { box-shadow: 0 0 0 0 rgba(22, 163, 74, 0.45); }
  70% { box-shadow: 0 0 0 7px rgba(22, 163, 74, 0); }
  100% { box-shadow: 0 0 0 0 rgba(22, 163, 74, 0); }
}

@keyframes goldSweep {
  0% {
    transform: translateY(3px) scale(0.995);
    filter: brightness(1.03);
  }
  45% {
    transform: translateY(-2px) scale(1.005);
  }
  100% {
    transform: translateY(0) scale(1);
    filter: brightness(1);
  }
}

@keyframes cardSheen {
  0% { transform: translateX(-120%) skewX(-18deg); opacity: 0; }
  35% { opacity: 1; }
  100% { transform: translateX(220%) skewX(-18deg); opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
