/* Design Tokens v2 —— 深色霓虹 + 柔和卡片，兼顾长时观看 */
:root {
  /* 背景层 */
  --bg-0: #0B0E1C;
  --bg-1: #121731;
  --bg-2: #1A2142;
  --surface: rgba(30, 38, 72, .72);
  --surface-solid: #1B2243;
  --surface-hi: rgba(46, 56, 99, .75);
  --border: rgba(150, 165, 225, .16);
  --border-hi: rgba(150, 165, 225, .32);

  /* 文本 */
  --ink-0: #F5F7FF;
  --ink-1: #D6DCF5;
  --ink-2: #A3AED6;
  --ink-3: #7682AE;

  /* 品牌 */
  --brand-400: #8B8CF6;
  --brand-500: #6C6FF0;
  --brand-600: #5659DE;
  --brand-glow: rgba(108, 111, 240, .45);

  /* 角色语义色 */
  --role-ref: #A78BFA;
  --role-ref-soft: rgba(167, 139, 250, .16);
  --role-a: #5AB0FF;
  --role-a-soft: rgba(90, 176, 255, .16);
  --role-b: #FF7FB0;
  --role-b-soft: rgba(255, 127, 176, .16);

  /* 功能色 */
  --pos: #43D9A3;
  --pos-soft: rgba(67, 217, 163, .15);
  --neg: #FF6B7A;
  --neg-soft: rgba(255, 107, 122, .15);
  --warn: #FFC15E;
  --warn-soft: rgba(255, 193, 94, .14);

  /* 卡背 */
  --g-card-back: linear-gradient(145deg, #4A47C6 0%, #6C6FF0 55%, #8B5CF6 100%);

  /* 字体 */
  --font: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Segoe UI", Roboto, sans-serif;
  --fs-display: 2.6rem;
  --fs-h1: 2rem;
  --fs-h2: 1.35rem;
  --fs-h3: 1.1rem;
  --fs-body: 1rem;
  --fs-sm: .875rem;
  --fs-xs: .75rem;

  /* 间距 */
  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 20px;
  --s6: 24px; --s8: 32px; --s10: 40px; --s12: 48px;

  /* 圆角 */
  --r-sm: 8px; --r-md: 14px; --r-lg: 20px; --r-xl: 28px; --r-full: 999px;

  /* 阴影 */
  --sh-1: 0 2px 10px rgba(0,0,0,.18);
  --sh-2: 0 12px 36px rgba(0,0,0,.32);
  --sh-glow: 0 12px 40px var(--brand-glow);

  /* 动效 */
  --ease: cubic-bezier(.4,0,.2,1);
  --d-flip: 600ms;      /* 词卡翻牌时长（规范：600ms） */
  --d-stagger: 120ms;   /* 错峰入场间隔 */
  --t-fast: 160ms;
  --t: 260ms;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; min-height: 100%; }
body {
  font-family: var(--font);
  color: var(--ink-1);
  background:
    radial-gradient(1200px 600px at 12% -8%, rgba(108,111,240,.20), transparent 60%),
    radial-gradient(900px 500px at 92% 4%, rgba(167,139,250,.14), transparent 55%),
    linear-gradient(180deg, var(--bg-0), var(--bg-1) 60%, var(--bg-0));
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  line-height: 1.5;
}
button, input, select { font: inherit; color: inherit; }
a { color: var(--brand-400); text-decoration: none; }
:focus-visible { outline: 2px solid var(--brand-400); outline-offset: 2px; }
.muted { color: var(--ink-3); }
.tiny { font-size: var(--fs-xs); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .15ms !important; transition-duration: .15ms !important; }
}
