/* ============================================================
   tokens.css — 设计令牌（亮色/暗色双主题）
   ============================================================ */
:root{
  color-scheme: light dark;

  /* —— 色彩：朱砂红品牌 + 宣纸中性 —— */
  --brand-h:4; --brand-s:82%; --brand-l:56%;
  --brand: hsl(var(--brand-h) var(--brand-s) var(--brand-l));
  --brand-2: hsl(calc(var(--brand-h) + 18) 84% 61%);      /* 渐变副色（玫红） */
  --brand-ink: hsl(var(--brand-h) 76% 42%);               /* 深朱砂（按压/文字） */
  --brand-soft: hsl(var(--brand-h) 82% 56% / .12);

  --bg: #faf8f5;                 /* 宣纸暖白 */
  --bg-elev: #fffdfb;            /* 浮起层 */
  --bg-glass: rgb(255 253 250 / .66);
  --surface: rgb(255 255 255 / .82);      /* 卡片 */
  --surface-2: #f3efe9;          /* 次级卡片/输入底 */
  --surface-3: #ece7df;          /* 按压底 */

  --text: #211d19; --text-2: rgb(33 29 25 / .66); --text-3: rgb(33 29 25 / .42);
  --line: rgb(33 29 25 / .09); --line-2: rgb(33 29 25 / .16);

  --ok: #18805a; --ok-soft: rgb(24 128 90 / .12);
  --warn: #a9701b; --warn-soft: rgb(169 112 27 / .13);
  --err: #d13b35; --err-soft: rgb(209 59 53 / .12);
  --info: #2f5d8c; --info-soft: rgb(47 93 140 / .12);

  /* 音质徽标渐变 */
  --q-hi: linear-gradient(135deg,#7c3aed,#d946ef);
  --q-flac: linear-gradient(135deg,#0e9f6e,#22b8a8);
  --q-320: linear-gradient(135deg,#2563eb,#38bdf8);
  --q-higher: linear-gradient(135deg,#7c5cf0,#9aa5ff);
  --q-std: linear-gradient(135deg,#8b8794,#b9b3c0);

  /* —— 光影 —— */
  --sh-1: 0 1px 2px rgb(40 25 10 / .05), 0 2px 8px rgb(40 25 10 / .04);
  --sh-2: 0 4px 14px rgb(40 25 10 / .08), 0 14px 34px rgb(40 25 10 / .08);
  --sh-3: 0 10px 26px rgb(40 25 10 / .12), 0 30px 66px rgb(40 25 10 / .14);
  --sh-brand: 0 6px 18px hsl(var(--brand-h) 80% 50% / .28);
  --ring: 0 0 0 3px hsl(var(--brand-h) 82% 56% / .22);

  /* 玻璃参数 */
  --glass-blur: 22px; --glass-sat: 175%;
  --glass-edge: rgb(255 255 255 / .72);        /* 顶边高光 */

  /* —— 字体 —— */
  --font: "Inter","SF Pro Display","PingFang SC","HarmonyOS Sans SC","Microsoft YaHei","Noto Sans SC",system-ui,-apple-system,sans-serif;
  --mono: "SF Mono",ui-monospace,"JetBrains Mono",Consolas,monospace;
  --fs-1: clamp(1.5rem,2.6vw + .6rem,2rem);    /* 大标题 */
  --fs-2: 1.125rem; --fs-3: .95rem; --fs-4: .875rem; --fs-5: .78rem;

  /* —— 几何 —— */
  --r-sm: 10px; --r: 16px; --r-lg: 22px; --r-xl: 30px; --r-pill: 999px;

  /* —— 动效 —— */
  --ease: cubic-bezier(.22,1,.36,1);
  --spring: cubic-bezier(.34,1.56,.64,1);
  --out-quint: cubic-bezier(.22,1,.36,1);
  --d-1: 120ms; --d-2: 240ms; --d-3: 380ms;

  /* —— 布局尺寸 —— */
  --app-h: 100dvh; --app-h: 100svh;
  --top-h: 58px;          /* 顶栏 */
  --rail-w: 236px;        /* 桌面左侧栏 */
  --player-h: 84px;       /* 桌面底播放条 */
  --mini-h: 62px;         /* 移动端迷你播放条 */
  --tabbar-h: 58px;       /* 移动端底部标签栏 */
  --safe-b: env(safe-area-inset-bottom,0px);
  --safe-t: env(safe-area-inset-top,0px);
  --pad: clamp(12px,2.4vw,26px);

  /* 文本阴影（玻璃上文字可读性） */
  --t-glow: 0 1px 8px rgb(0 0 0 / .18);

  /* 占位图渐变 */
  --ph: linear-gradient(150deg,#e6dfd5,#d5cbbd);
}

/* —— 暗色 —— */
[data-theme="dark"]{
  color-scheme: dark;
  --brand-h:3; --brand-s:90%; --brand-l:63%;
  --brand: hsl(var(--brand-h) var(--brand-s) var(--brand-l));
  --brand-2: hsl(calc(var(--brand-h) + 30) 92% 68%);
  --brand-ink: hsl(var(--brand-h) 80% 74%);
  --brand-soft: hsl(var(--brand-h) 92% 63% / .15);

  --bg: #0d0e12;
  --bg-elev: #121318;
  --bg-glass: rgb(14 15 20 / .62);
  --surface: rgb(26 27 34 / .86);
  --surface-2: #1c1d24;
  --surface-3: #262833;

  --text: #edeae6; --text-2: rgb(237 234 230 / .64); --text-3: rgb(237 234 230 / .4);
  --line: rgb(255 255 255 / .09); --line-2: rgb(255 255 255 / .17);

  --ok: #43c28c; --ok-soft: rgb(67 194 140 / .14);
  --warn: #e0a94e; --warn-soft: rgb(224 169 78 / .14);
  --err: #ff6b64; --err-soft: rgb(255 107 100 / .14);
  --info: #6fa8e0; --info-soft: rgb(111 168 224 / .14);

  --sh-1: 0 1px 2px rgb(0 0 0 / .35), 0 2px 10px rgb(0 0 0 / .25);
  --sh-2: 0 6px 18px rgb(0 0 0 / .42), 0 18px 44px rgb(0 0 0 / .38);
  --sh-3: 0 12px 30px rgb(0 0 0 / .52), 0 36px 90px rgb(0 0 0 / .5);
  --sh-brand: 0 6px 20px hsl(var(--brand-h) 90% 55% / .35);

  --glass-edge: rgb(255 255 255 / .14);
  --ph: linear-gradient(150deg,#26262e,#1a1a22);
  --t-glow: 0 1px 10px rgb(0 0 0 / .5);
}
