/* =========================================================================
 * 音悦声 · 设计系统底座
 *  - 六套全局主题（CSS 变量驱动）
 *  - 应用四区布局（顶部导航 / 左侧菜单 / 主内容区 / 底部播放条）
 *  - 响应式：PC / 平板 / 手机 / 折叠屏
 * ========================================================================= */

/* ------------------------------ 主题变量 ------------------------------ */
:root {
  --top-h: 68px;
  --player-h: 88px;
  --nav-w: 86px;
  --nav-w-wide: 238px;
  /* ★ 导航条的左侧外偏移（与 .sidenav 的 left 保持一致）。
     内容区与底部播放条的左边界必须把它算进去 —— 否则在 --nav-w 变窄的断点（1023 以下）
     会出现「导航条右边缘 == 内容区左边界」，两者严丝合缝贴在一起（实测间隙 0px），
     看起来就是「导航和右侧挤压在一起」。 */
  --nav-left: 14px;
  /* ★ 导航条圆角（四个导航风格统一走这两个变量，见 nav.css）：
       --nav-r       左上 / 左下 半径
       --nav-r-right 右上 / 右下 半径  ←「右侧两角直角」试验开关
     ★★ 一键还原：把 --nav-r-right 的值改回 var(--nav-r)，
        导航条立刻恢复成原本的四角全圆，其余什么都不用动。 */
  --nav-r: var(--r-xl);
  --nav-r-right: 0px;
  --r-xs: 8px;
  --r-sm: 12px;
  --r-md: 18px;
  --r-lg: 26px;
  --r-xl: 34px;
  --dur: 0.28s;
  --ease: cubic-bezier(0.22, 0.68, 0.32, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --tint: #f5c451;          /* 随封面主色动态更新的强调色 */
  --tint-2: #ff7a59;
  --font: "PingFang SC", "HarmonyOS Sans SC", "Microsoft YaHei UI", "Microsoft YaHei",
    system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-num: "SF Mono", "JetBrains Mono", ui-monospace, "Cascadia Mono", Consolas, monospace;
}

/* 经典黑：深色 + 金色点缀 */
html[data-theme="classic-dark"] {
  --bg-0: #08080c;
  --bg-1: #0d0d14;
  --bg-2: #12121c;
  --panel: rgba(255, 255, 255, 0.052);
  --panel-2: rgba(255, 255, 255, 0.082);
  --panel-3: rgba(255, 255, 255, 0.12);
  --text: #f2f0ea;
  --dim: rgba(242, 240, 234, 0.66);
  --mute: rgba(242, 240, 234, 0.4);
  --line: rgba(255, 255, 255, 0.09);
  --line-2: rgba(255, 255, 255, 0.16);
  --brand: #f5c451;
  --brand-2: #e0964a;
  --accent: #ff7a59;
  --on-brand: #1a1206;
  --glow: rgba(245, 196, 81, 0.28);
  --shadow-1: 0 4px 16px rgba(0, 0, 0, 0.4);
  --shadow-2: 0 16px 44px rgba(0, 0, 0, 0.56);
  --shadow-3: 0 30px 80px rgba(0, 0, 0, 0.66);
  --glass: rgba(16, 16, 24, 0.66);
  --glass-2: rgba(20, 20, 30, 0.84);
  --hair: rgba(255, 255, 255, 0.14);
  --scheme: dark;
  --wave-1: #f5c451;
  --wave-2: #ff7a59;
}

/* 纯净白：浅色 + 蓝色主调 */
html[data-theme="pure-white"] {
  --bg-0: #f4f6fb;
  --bg-1: #ffffff;
  --bg-2: #eef2fa;
  --panel: rgba(255, 255, 255, 0.86);
  --panel-2: rgba(255, 255, 255, 0.96);
  --panel-3: rgba(238, 242, 250, 0.96);
  --text: #131722;
  --dim: rgba(19, 23, 34, 0.66);
  --mute: rgba(19, 23, 34, 0.42);
  --line: rgba(19, 23, 34, 0.09);
  --line-2: rgba(19, 23, 34, 0.16);
  --brand: #2563eb;
  --brand-2: #4f8bf7;
  --accent: #0ea5e9;
  --on-brand: #ffffff;
  --glow: rgba(37, 99, 235, 0.22);
  --shadow-1: 0 4px 14px rgba(24, 40, 80, 0.08);
  --shadow-2: 0 14px 38px rgba(24, 40, 80, 0.12);
  --shadow-3: 0 28px 70px rgba(24, 40, 80, 0.16);
  --glass: rgba(255, 255, 255, 0.72);
  --glass-2: rgba(255, 255, 255, 0.9);
  --hair: rgba(19, 23, 34, 0.1);
  --scheme: light;
  --wave-1: #2563eb;
  --wave-2: #0ea5e9;
}

/* 霓虹紫：赛博朋克 */
html[data-theme="neon-purple"] {
  --bg-0: #0a0616;
  --bg-1: #120a24;
  --bg-2: #1a1033;
  --panel: rgba(168, 85, 247, 0.1);
  --panel-2: rgba(168, 85, 247, 0.16);
  --panel-3: rgba(236, 72, 153, 0.2);
  --text: #f4ecff;
  --dim: rgba(244, 236, 255, 0.68);
  --mute: rgba(244, 236, 255, 0.42);
  --line: rgba(196, 132, 252, 0.18);
  --line-2: rgba(236, 72, 153, 0.34);
  --brand: #c084fc;
  --brand-2: #f472b6;
  --accent: #22d3ee;
  --on-brand: #1a0730;
  --glow: rgba(196, 132, 252, 0.36);
  --shadow-1: 0 4px 18px rgba(88, 28, 135, 0.5);
  --shadow-2: 0 16px 46px rgba(88, 28, 135, 0.6);
  --shadow-3: 0 30px 84px rgba(59, 7, 100, 0.7);
  --glass: rgba(26, 12, 48, 0.66);
  --glass-2: rgba(32, 14, 58, 0.86);
  --hair: rgba(196, 132, 252, 0.24);
  --scheme: dark;
  --wave-1: #c084fc;
  --wave-2: #f472b6;
}

/* 森林绿：自然清新 */
html[data-theme="forest-green"] {
  --bg-0: #f1f6f1;
  --bg-1: #ffffff;
  --bg-2: #e8f1e9;
  --panel: rgba(255, 255, 255, 0.88);
  --panel-2: rgba(255, 255, 255, 0.97);
  --panel-3: rgba(232, 241, 233, 0.96);
  --text: #14231a;
  --dim: rgba(20, 35, 26, 0.66);
  --mute: rgba(20, 35, 26, 0.42);
  --line: rgba(20, 35, 26, 0.1);
  --line-2: rgba(22, 101, 52, 0.22);
  --brand: #15803d;
  --brand-2: #2f9e5f;
  --accent: #65a30d;
  --on-brand: #ffffff;
  --glow: rgba(21, 128, 61, 0.22);
  --shadow-1: 0 4px 14px rgba(20, 60, 35, 0.08);
  --shadow-2: 0 14px 38px rgba(20, 60, 35, 0.12);
  --shadow-3: 0 28px 70px rgba(20, 60, 35, 0.16);
  --glass: rgba(246, 251, 246, 0.74);
  --glass-2: rgba(255, 255, 255, 0.92);
  --hair: rgba(20, 35, 26, 0.12);
  --scheme: light;
  --wave-1: #15803d;
  --wave-2: #65a30d;
}

/* 暖阳橙：活力温暖 */
html[data-theme="warm-orange"] {
  --bg-0: #1a0f07;
  --bg-1: #26160c;
  --bg-2: #331d10;
  --panel: rgba(251, 146, 60, 0.1);
  --panel-2: rgba(251, 146, 60, 0.16);
  --panel-3: rgba(250, 204, 21, 0.18);
  --text: #fff4e6;
  --dim: rgba(255, 244, 230, 0.68);
  --mute: rgba(255, 244, 230, 0.42);
  --line: rgba(251, 146, 60, 0.2);
  --line-2: rgba(250, 204, 21, 0.34);
  --brand: #fb923c;
  --brand-2: #facc15;
  --accent: #ef4444;
  --on-brand: #2a1405;
  --glow: rgba(251, 146, 60, 0.34);
  --shadow-1: 0 4px 18px rgba(120, 53, 15, 0.46);
  --shadow-2: 0 16px 46px rgba(120, 53, 15, 0.58);
  --shadow-3: 0 30px 84px rgba(69, 26, 3, 0.7);
  --glass: rgba(38, 22, 12, 0.66);
  --glass-2: rgba(46, 26, 14, 0.86);
  --hair: rgba(251, 146, 60, 0.26);
  --scheme: dark;
  --wave-1: #fb923c;
  --wave-2: #facc15;
}

/* =========================================================================
 * 情绪配色主题（9 套）
 *   ★ 每条都必须给齐全部 token —— 少一个就会退回 :root 的深色默认值，
 *     表现为「切到浅色主题后某处还是黑的」，是这套体系里最容易出的错。
 *   ★ --on-brand 必须与 --brand 形成 ≥4.5:1 ——
 *     它是叠在 --brand 上的文字色（徽标、选中胶囊、按钮），
 *     浅色主题一律给近白、深色主题一律给近黑，brand 的明度按此反推着选。
 *   命名前缀沿用现有的英文 id，中文名在 server.js /api/meta 与 ui.js 色卡里配。
 * ========================================================================= */

/* 治愈奶咖：米棕暖调 + 拿铁奶油 */
html[data-theme="cream"] {
  --bg-0: #f7f2ea;
  --bg-1: #fffdf9;
  --bg-2: #f1e9dd;
  --panel: rgba(255, 253, 249, 0.86);
  --panel-2: rgba(255, 253, 249, 0.96);
  --panel-3: rgba(241, 233, 221, 0.96);
  --text: #2b2118;
  --dim: rgba(43, 33, 24, 0.66);
  --mute: rgba(43, 33, 24, 0.42);
  --line: rgba(43, 33, 24, 0.09);
  --line-2: rgba(43, 33, 24, 0.16);
  --brand: #8f5c2c;
  --brand-2: #b98047;
  --accent: #d97706;
  --on-brand: #fffaf2;
  --glow: rgba(143, 92, 44, 0.22);
  --shadow-1: 0 4px 14px rgba(74, 50, 25, 0.08);
  --shadow-2: 0 14px 38px rgba(74, 50, 25, 0.12);
  --shadow-3: 0 28px 70px rgba(74, 50, 25, 0.16);
  --glass: rgba(255, 253, 249, 0.74);
  --glass-2: rgba(255, 253, 249, 0.92);
  --hair: rgba(43, 33, 24, 0.1);
  --scheme: light;
  --wave-1: #8f5c2c;
  --wave-2: #d97706;
}

/* 深海静谧：幽蓝水光 + 薄荷气泡 */
html[data-theme="ocean"] {
  --bg-0: #050d16;
  --bg-1: #08131f;
  --bg-2: #0c1b2a;
  --panel: rgba(76, 201, 240, 0.09);
  --panel-2: rgba(76, 201, 240, 0.14);
  --panel-3: rgba(99, 230, 213, 0.18);
  --text: #e6f2fb;
  --dim: rgba(230, 242, 251, 0.66);
  --mute: rgba(230, 242, 251, 0.42);
  --line: rgba(140, 200, 255, 0.14);
  --line-2: rgba(76, 201, 240, 0.3);
  --brand: #4cc9f0;
  --brand-2: #63e6d5;
  --accent: #ffd166;
  --on-brand: #04141c;
  --glow: rgba(76, 201, 240, 0.3);
  --shadow-1: 0 4px 18px rgba(2, 12, 24, 0.5);
  --shadow-2: 0 16px 46px rgba(2, 12, 24, 0.6);
  --shadow-3: 0 30px 84px rgba(1, 8, 18, 0.7);
  --glass: rgba(9, 21, 34, 0.66);
  --glass-2: rgba(12, 26, 42, 0.86);
  --hair: rgba(76, 201, 240, 0.2);
  --scheme: dark;
  --wave-1: #4cc9f0;
  --wave-2: #63e6d5;
}

/* 樱粉甜心：樱花粉 + 奶油白 */
html[data-theme="sakura"] {
  --bg-0: #fdf5f7;
  --bg-1: #fffbfc;
  --bg-2: #fae9ee;
  --panel: rgba(255, 251, 252, 0.86);
  --panel-2: rgba(255, 251, 252, 0.96);
  --panel-3: rgba(250, 233, 238, 0.96);
  --text: #3a1f2b;
  --dim: rgba(58, 31, 43, 0.66);
  --mute: rgba(58, 31, 43, 0.42);
  --line: rgba(58, 31, 43, 0.09);
  --line-2: rgba(58, 31, 43, 0.16);
  --brand: #b8145a;
  --brand-2: #e2568f;
  --accent: #ff8fab;
  --on-brand: #fff9fb;
  --glow: rgba(184, 20, 90, 0.22);
  --shadow-1: 0 4px 14px rgba(96, 24, 56, 0.08);
  --shadow-2: 0 14px 38px rgba(96, 24, 56, 0.12);
  --shadow-3: 0 28px 70px rgba(96, 24, 56, 0.16);
  --glass: rgba(255, 251, 252, 0.74);
  --glass-2: rgba(255, 251, 252, 0.92);
  --hair: rgba(58, 31, 43, 0.1);
  --scheme: light;
  --wave-1: #b8145a;
  --wave-2: #f472b6;
}

/* 墨韵国风：宣纸底 + 朱砂 + 描金 */
html[data-theme="ink"] {
  --bg-0: #f5f1e8;
  --bg-1: #fdfbf6;
  --bg-2: #ebe5d8;
  --panel: rgba(253, 251, 246, 0.86);
  --panel-2: rgba(253, 251, 246, 0.96);
  --panel-3: rgba(235, 229, 216, 0.96);
  --text: #1c1a17;
  --dim: rgba(28, 26, 23, 0.66);
  --mute: rgba(28, 26, 23, 0.42);
  --line: rgba(28, 26, 23, 0.1);
  --line-2: rgba(28, 26, 23, 0.18);
  --brand: #9c2b1f;
  --brand-2: #b8432f;
  --accent: #c8a04a;
  --on-brand: #fdf7ee;
  --glow: rgba(156, 43, 31, 0.2);
  --shadow-1: 0 4px 14px rgba(44, 34, 22, 0.08);
  --shadow-2: 0 14px 38px rgba(44, 34, 22, 0.13);
  --shadow-3: 0 28px 70px rgba(44, 34, 22, 0.17);
  --glass: rgba(253, 251, 246, 0.76);
  --glass-2: rgba(253, 251, 246, 0.93);
  --hair: rgba(28, 26, 23, 0.12);
  --scheme: light;
  --wave-1: #9c2b1f;
  --wave-2: #c8a04a;
}

/* 极光幻境：北境紫 + 极光青 */
html[data-theme="aurora"] {
  --bg-0: #060b18;
  --bg-1: #0a1022;
  --bg-2: #101a33;
  --panel: rgba(155, 134, 255, 0.1);
  --panel-2: rgba(155, 134, 255, 0.16);
  --panel-3: rgba(74, 217, 196, 0.18);
  --text: #e8ecff;
  --dim: rgba(232, 236, 255, 0.66);
  --mute: rgba(232, 236, 255, 0.42);
  --line: rgba(155, 134, 255, 0.18);
  --line-2: rgba(74, 217, 196, 0.3);
  --brand: #9b86ff;
  --brand-2: #4ad9c4;
  --accent: #ff7ac6;
  --on-brand: #0b0a1f;
  --glow: rgba(155, 134, 255, 0.34);
  --shadow-1: 0 4px 18px rgba(8, 6, 30, 0.5);
  --shadow-2: 0 16px 46px rgba(8, 6, 30, 0.62);
  --shadow-3: 0 30px 84px rgba(5, 4, 20, 0.72);
  --glass: rgba(12, 14, 38, 0.66);
  --glass-2: rgba(18, 20, 48, 0.86);
  --hair: rgba(155, 134, 255, 0.24);
  --scheme: dark;
  --wave-1: #9b86ff;
  --wave-2: #4ad9c4;
}

/* 石墨灰：中性专业，无彩干扰 */
html[data-theme="graphite"] {
  --bg-0: #0b0c0e;
  --bg-1: #121417;
  --bg-2: #191d21;
  --panel: rgba(233, 236, 239, 0.055);
  --panel-2: rgba(233, 236, 239, 0.09);
  --panel-3: rgba(233, 236, 239, 0.13);
  --text: #e9ecef;
  --dim: rgba(233, 236, 239, 0.66);
  --mute: rgba(233, 236, 239, 0.4);
  --line: rgba(233, 236, 239, 0.1);
  --line-2: rgba(233, 236, 239, 0.18);
  --brand: #9aa6b2;
  --brand-2: #c3cdd8;
  --accent: #6ee7b7;
  --on-brand: #0c1013;
  --glow: rgba(154, 166, 178, 0.26);
  --shadow-1: 0 4px 16px rgba(0, 0, 0, 0.42);
  --shadow-2: 0 16px 44px rgba(0, 0, 0, 0.56);
  --shadow-3: 0 30px 80px rgba(0, 0, 0, 0.66);
  --glass: rgba(16, 18, 21, 0.68);
  --glass-2: rgba(22, 25, 29, 0.86);
  --hair: rgba(233, 236, 239, 0.14);
  --scheme: dark;
  --wave-1: #9aa6b2;
  --wave-2: #6ee7b7;
}

/* 落日蜜桃：晚霞橙粉 */
html[data-theme="sunset"] {
  --bg-0: #17090f;
  --bg-1: #211016;
  --bg-2: #2c161f;
  --panel: rgba(255, 158, 122, 0.1);
  --panel-2: rgba(255, 158, 122, 0.16);
  --panel-3: rgba(255, 107, 157, 0.18);
  --text: #fff0ec;
  --dim: rgba(255, 240, 236, 0.66);
  --mute: rgba(255, 240, 236, 0.42);
  --line: rgba(255, 158, 122, 0.2);
  --line-2: rgba(255, 107, 157, 0.32);
  --brand: #ff9e7a;
  --brand-2: #ff6b9d;
  --accent: #ffd166;
  --on-brand: #2b0f16;
  --glow: rgba(255, 158, 122, 0.34);
  --shadow-1: 0 4px 18px rgba(60, 12, 28, 0.48);
  --shadow-2: 0 16px 46px rgba(60, 12, 28, 0.6);
  --shadow-3: 0 30px 84px rgba(42, 8, 20, 0.7);
  --glass: rgba(33, 16, 22, 0.66);
  --glass-2: rgba(43, 20, 28, 0.86);
  --hair: rgba(255, 158, 122, 0.24);
  --scheme: dark;
  --wave-1: #ff9e7a;
  --wave-2: #ff6b9d;
}

/* 薄荷清氧：薄荷绿 + 冷白 */
html[data-theme="mint"] {
  --bg-0: #f0faf6;
  --bg-1: #fbfffd;
  --bg-2: #e2f4ec;
  --panel: rgba(251, 255, 253, 0.86);
  --panel-2: rgba(251, 255, 253, 0.96);
  --panel-3: rgba(226, 244, 236, 0.96);
  --text: #10251d;
  --dim: rgba(16, 37, 29, 0.66);
  --mute: rgba(16, 37, 29, 0.42);
  --line: rgba(16, 37, 29, 0.09);
  --line-2: rgba(16, 37, 29, 0.16);
  --brand: #0f7a63;
  --brand-2: #16a085;
  --accent: #34d399;
  --on-brand: #f2fffb;
  --glow: rgba(15, 122, 99, 0.22);
  --shadow-1: 0 4px 14px rgba(12, 56, 44, 0.08);
  --shadow-2: 0 14px 38px rgba(12, 56, 44, 0.12);
  --shadow-3: 0 28px 70px rgba(12, 56, 44, 0.16);
  --glass: rgba(251, 255, 253, 0.74);
  --glass-2: rgba(251, 255, 253, 0.92);
  --hair: rgba(16, 37, 29, 0.11);
  --scheme: light;
  --wave-1: #0f7a63;
  --wave-2: #34d399;
}

/* 暗夜酒红：酒窖红 + 香槟金 */
html[data-theme="wine"] {
  --bg-0: #150507;
  --bg-1: #1e0a0e;
  --bg-2: #291016;
  --panel: rgba(224, 177, 85, 0.09);
  --panel-2: rgba(224, 177, 85, 0.15);
  --panel-3: rgba(240, 90, 106, 0.18);
  --text: #fbeef0;
  --dim: rgba(251, 238, 240, 0.66);
  --mute: rgba(251, 238, 240, 0.42);
  --line: rgba(224, 177, 85, 0.18);
  --line-2: rgba(240, 90, 106, 0.3);
  --brand: #e0b155;
  --brand-2: #f05a6a;
  --accent: #ff8fa3;
  --on-brand: #241008;
  --glow: rgba(224, 177, 85, 0.32);
  --shadow-1: 0 4px 18px rgba(38, 4, 10, 0.5);
  --shadow-2: 0 16px 46px rgba(38, 4, 10, 0.62);
  --shadow-3: 0 30px 84px rgba(26, 2, 7, 0.72);
  --glass: rgba(30, 10, 14, 0.68);
  --glass-2: rgba(40, 14, 20, 0.87);
  --hair: rgba(224, 177, 85, 0.22);
  --scheme: dark;
  --wave-1: #e0b155;
  --wave-2: #c8102e;
}

/* 跟随系统：默认走经典黑，系统浅色时切换为纯净白 */
html[data-theme="auto"] { color-scheme: light dark; }
@media (prefers-color-scheme: light) {
  html[data-theme="auto"] {
    --bg-0: #f4f6fb; --bg-1: #ffffff; --bg-2: #eef2fa;
    --panel: rgba(255, 255, 255, 0.86); --panel-2: rgba(255, 255, 255, 0.96); --panel-3: rgba(238, 242, 250, 0.96);
    --text: #131722; --dim: rgba(19, 23, 34, 0.66); --mute: rgba(19, 23, 34, 0.42);
    --line: rgba(19, 23, 34, 0.09); --line-2: rgba(19, 23, 34, 0.16);
    --brand: #2563eb; --brand-2: #4f8bf7; --accent: #0ea5e9; --on-brand: #fff;
    --glow: rgba(37, 99, 235, 0.22);
    --shadow-1: 0 4px 14px rgba(24, 40, 80, 0.08); --shadow-2: 0 14px 38px rgba(24, 40, 80, 0.12);
    --shadow-3: 0 28px 70px rgba(24, 40, 80, 0.16);
    --glass: rgba(255, 255, 255, 0.72); --glass-2: rgba(255, 255, 255, 0.9); --hair: rgba(19, 23, 34, 0.1);
    --scheme: light; --wave-1: #2563eb; --wave-2: #0ea5e9;
  }
}
@media (prefers-color-scheme: dark) {
  html[data-theme="auto"] {
    --bg-0: #08080c; --bg-1: #0d0d14; --bg-2: #12121c;
    --panel: rgba(255, 255, 255, 0.052); --panel-2: rgba(255, 255, 255, 0.082); --panel-3: rgba(255, 255, 255, 0.12);
    --text: #f2f0ea; --dim: rgba(242, 240, 234, 0.66); --mute: rgba(242, 240, 234, 0.4);
    --line: rgba(255, 255, 255, 0.09); --line-2: rgba(255, 255, 255, 0.16);
    --brand: #f5c451; --brand-2: #e0964a; --accent: #ff7a59; --on-brand: #1a1206;
    --glow: rgba(245, 196, 81, 0.28);
    --shadow-1: 0 4px 16px rgba(0, 0, 0, 0.4); --shadow-2: 0 16px 44px rgba(0, 0, 0, 0.56);
    --shadow-3: 0 30px 80px rgba(0, 0, 0, 0.66);
    --glass: rgba(16, 16, 24, 0.66); --glass-2: rgba(20, 20, 30, 0.84); --hair: rgba(255, 255, 255, 0.14);
    --scheme: dark; --wave-1: #f5c451; --wave-2: #ff7a59;
  }
}

/* ------------------------------- 基础重置 ------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { color-scheme: var(--scheme); -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font);
  background: var(--bg-0);
  color: var(--text);
  font-size: 14px;
  line-height: 1.6;
  min-height: 100vh;
  min-height: 100dvh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  transition: background var(--dur) var(--ease), color var(--dur) var(--ease);
}
/* 背景氛围光：随当前封面染色 */
body::before {
  content: "";
  position: fixed;
  inset: -20% -10% auto -10%;
  height: 68vh;
  background:
    radial-gradient(46% 60% at 18% 12%, var(--glow), transparent 68%),
    radial-gradient(40% 52% at 82% 0%, color-mix(in srgb, var(--brand-2) 26%, transparent), transparent 70%);
  filter: blur(30px);
  opacity: 0.9;
  pointer-events: none;
  z-index: 0;
  transition: background 1.2s var(--ease);
}
h1, h2, h3, h4, h5 { margin: 0; font-weight: 700; letter-spacing: -0.01em; }
p { margin: 0; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { background: none; border: 0; cursor: pointer; padding: 0; }
input, select, textarea { outline: none; }
img { display: block; max-width: 100%; }
ul, ol { margin: 0; padding: 0; list-style: none; }
::selection { background: var(--brand); color: var(--on-brand); }

.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.ic { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.ic-sm { width: 16px; height: 16px; }
.ic-lg { width: 26px; height: 26px; }
.muted { color: var(--mute); }
.dim { color: var(--dim); }
.nowrap { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hidden { display: none !important; }
[hidden] { display: none !important; }

/* 滚动条 */
* { scrollbar-width: thin; scrollbar-color: var(--line-2) transparent; }
*::-webkit-scrollbar { width: 10px; height: 10px; }
*::-webkit-scrollbar-track { background: transparent; }
*::-webkit-scrollbar-thumb { background: var(--line-2); border-radius: 99px; border: 3px solid transparent; background-clip: content-box; }
*::-webkit-scrollbar-thumb:hover { background: var(--brand); background-clip: content-box; }

/* 焦点可见（无障碍） */
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; border-radius: 6px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
/* 窄屏下可省的文字（保留图标，避免按钮撑破标题栏） */
@media (max-width: 767px) { .hide-sm { display: none; } }

/* ------------------------------- 应用布局 ------------------------------- */
.app {
  position: relative;
  z-index: 1;
  min-height: 100dvh;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: var(--top-h) minmax(0, 1fr);
  grid-template-areas: "top" "main";
  /* ★ 左内边距 = 导航条左偏移 + 导航条宽度 + 期望间隙。
     必须把 --nav-left 一起算进去：导航条是 `position: fixed; left: var(--nav-left); width: var(--nav-w)`，
     右边缘 = nav-left + nav-w。只按 nav-w 算会让内容区左边界正好落在导航条右边缘上（实测间隙 0px）。 */
  padding-left: calc(var(--nav-left) + var(--nav-w) + 18px);
  padding-right: 18px;
  padding-bottom: calc(var(--player-h) + 22px);
  transition: padding-left var(--dur) var(--ease);
}
.topbar { grid-area: top; }
.content { grid-area: main; min-width: 0; }

/* 桌面端导航「展开」态（鼠标悬停自动展开 / 点按钮固定展开，JS 会给 body 加 .nav-wide）
   ★ 这里原本缺了相应规则 —— 结果是：标签文字淡入了，导航条宽度却仍是 --nav-w（86px），
   而 .sidenav / .nav-list 都是 overflow: hidden，于是标签被切掉一大半。
   实测（1440）：导航条 86px、面板右端 100px，标签 x=80 宽 28 → 右端 108px，
   最后 8px 被裁；.nav-list 内容区只到 88px，可见部分不足 30%。
   --nav-w-wide 这个变量原本在 4 个断点都定义了却从没被引用，显然就是留给这里用的。 */
@media (min-width: 1024px) {
  body.nav-wide .sidenav { width: var(--nav-w-wide); }
  /* 导航条变宽 → 内容区与底部播放条必须同步右移相同的量，间隙保持 18px 不变。 */
  body.nav-wide .app { padding-left: calc(var(--nav-left) + var(--nav-w-wide) + 18px); }
  body.nav-wide .playerbar { left: calc(var(--nav-left) + var(--nav-w-wide) + 18px); }
}

/* ------------------------------- 顶栏 ------------------------------- */
.topbar {
  display: flex;
  align-items: center;
  gap: 14px;
  height: var(--top-h);
  position: sticky;
  top: 0;
  z-index: 40;
  background: linear-gradient(to bottom, color-mix(in srgb, var(--bg-0) 92%, transparent), transparent);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.brand { display: flex; align-items: center; gap: 10px; flex: none; }
.brand-mark {
  width: 38px; height: 38px; flex: none;
  display: grid; place-items: center;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  color: var(--on-brand);
  box-shadow: 0 6px 18px var(--glow);
}
.brand-mark .ic { width: 22px; height: 22px; stroke-width: 2.1; }
.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-text b { font-size: 17px; letter-spacing: 0.02em; }
.brand-text i { font-style: normal; font-size: 11px; color: var(--mute); }

.search {
  flex: 1 1 auto;
  min-width: 0;            /* ★ 必须：否则内容最小宽度(≈203px)会锁死搜索框，窄屏把顶栏顶出视口 */
  max-width: 560px;
  height: 42px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 6px 0 14px;
  border-radius: 999px;
  background: var(--panel);
  border: 1px solid var(--line);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  transition: border-color var(--dur), box-shadow var(--dur), background var(--dur);
}
.search:focus-within { border-color: color-mix(in srgb, var(--brand) 60%, transparent); box-shadow: 0 0 0 4px var(--glow); background: var(--panel-2); }
.search-ic { color: var(--mute); }
.search input {
  flex: 1; min-width: 0; height: 100%;
  background: none; border: 0; color: var(--text);
  font-size: 13.5px;
}
.search input::placeholder { color: var(--mute); }
.search input::-webkit-search-cancel-button { -webkit-appearance: none; }
.search-scope {
  flex: none; height: 30px; padding: 0 6px;
  border-radius: 999px; border: 1px solid var(--line);
  background: var(--panel-2); color: var(--dim);
  font-size: 12px; cursor: pointer;
}
.search-go {
  flex: none; height: 32px; padding: 0 16px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  color: var(--on-brand); font-size: 13px; font-weight: 600;
  transition: transform var(--dur), filter var(--dur);
}
.search-go:hover { transform: translateY(-1px); filter: brightness(1.06); }

.topbar-actions { margin-left: auto; display: flex; align-items: center; gap: 6px; flex: none; }
.icon-btn {
  position: relative;
  width: 38px; height: 38px; flex: none;
  display: grid; place-items: center;
  border-radius: 12px;
  color: var(--dim);
  transition: background var(--dur), color var(--dur), transform var(--dur);
}
.icon-btn:hover { background: var(--panel-2); color: var(--text); }
.icon-btn:active { transform: scale(0.94); }
.icon-btn.is-on { color: var(--brand); background: color-mix(in srgb, var(--brand) 14%, transparent); }
.icon-btn.txt-only { width: auto; padding: 0 10px; }
.txt-btn { font-size: 12px; font-weight: 600; letter-spacing: 0.02em; }
.icon-btn .dot {
  position: absolute; top: 8px; right: 8px;
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--accent); box-shadow: 0 0 0 2px var(--bg-0);
}
.user-chip {
  display: flex; align-items: center; gap: 8px;
  height: 38px; padding: 0 12px 0 5px;
  border-radius: 999px; border: 1px solid var(--line);
  background: var(--panel);
  transition: border-color var(--dur), background var(--dur), transform var(--dur);
}
.user-chip:hover { border-color: var(--line-2); background: var(--panel-2); }
.user-chip:active { transform: scale(0.97); }
.avatar {
  width: 28px; height: 28px; flex: none;
  display: grid; place-items: center;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  color: var(--on-brand); font-size: 12px; font-weight: 700;
}
.user-chip-text { font-size: 13px; color: var(--dim); max-width: 90px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* 主内容区 */
.content { padding-top: 6px; padding-bottom: 30px; }
.content:focus { outline: none; }

/* 页面通用容器 */
.page { max-width: 1560px; margin: 0 auto; display: flex; flex-direction: column; gap: 30px; animation: fadeUp 0.44s var(--ease-out) both; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.page-title { font-size: 30px; line-height: 1.2; letter-spacing: -0.02em; display: flex; align-items: center; gap: 12px; }
.page-title .ic { width: 28px; height: 28px; color: var(--brand); }
.page-desc { color: var(--mute); font-size: 13px; margin-top: 6px; }
.page-tools { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

/* 通用分区 */
.section { display: flex; flex-direction: column; gap: 16px; }
.section-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; }
.section-title { font-size: 19px; display: flex; align-items: center; gap: 10px; min-width: 0; }
.section-title small { font-size: 12px; font-weight: 400; color: var(--mute); margin-left: 2px; }
.section-sub { font-size: 12px; color: var(--mute); display: flex; align-items: center; gap: 6px; }
.section-actions { display: flex; align-items: center; gap: 8px; }

/* 响应式栅格
   ★ --fit-min = 卡片最小宽度，是「每行排满」算法的唯一输入（JS 见 util.js 的 fitGrids）。
     下面的 auto-fill 只作为无 JS 时的兜底；有 JS 时列数会被内联样式按条目数重新算，
     保证每行都排满而不是留一条空轨道。所有断点因此只需要改这一个变量。 */
.grid { display: grid; gap: 18px; }
.grid-auto { --fit-min: 168px; grid-template-columns: repeat(auto-fill, minmax(var(--fit-min), 1fr)); }
.grid-cards { --fit-min: 210px; grid-template-columns: repeat(auto-fill, minmax(var(--fit-min), 1fr)); }
.grid-mini { --fit-min: 150px; grid-template-columns: repeat(auto-fill, minmax(var(--fit-min), 1fr)); }

/* 横向滚动轨道 */
.rail { display: flex; gap: 16px; overflow-x: auto; padding: 4px 2px 14px; scroll-snap-type: x proximity; scroll-behavior: smooth; }
.rail > * { scroll-snap-align: start; flex: none; }
.rail::-webkit-scrollbar { height: 8px; }

/* =============================== 响应式 =============================== */

/* 平板横屏 / 小笔电 */
@media (max-width: 1279px) {
  :root { --nav-w: 78px; --nav-w-wide: 218px; }
  .page-title { font-size: 26px; }
  .brand-text i { display: none; }
}

/* 平板竖向 */
@media (max-width: 1023px) {
  :root { --top-h: 62px; --player-h: 78px; --nav-w: 72px; --nav-w-wide: 72px; }
  .app { padding-left: calc(var(--nav-left) + var(--nav-w) + 14px); padding-right: 14px; }
  .grid-cards { --fit-min: 186px; }
  .grid-auto { --fit-min: 152px; }
}

/* 手机（含折叠屏外屏） */
@media (max-width: 767px) {
  /* ≤767 导航栏变成 off-canvas 抽屉（见 nav.css：left:0 + translateX(-104%)），
     已不占左侧空间，故 --nav-left 归零 —— 这样折叠屏展开态那条 calc() 不会在抽屉态下多留 14px 空白。 */
  :root { --top-h: 58px; --player-h: 66px; --nav-left: 0px; }
  .app {
    padding-left: 12px;
    padding-right: 12px;
    padding-bottom: calc(var(--player-h) + 74px);
  }
  .topbar { gap: 8px; min-width: 0; }
  .search { min-width: 0; flex: 1 1 60px; }
  .brand-text { display: none; }
  .brand-mark { width: 34px; height: 34px; }
  .search { height: 38px; padding-left: 11px; }
  .search-scope { display: none; }
  .search-go { display: none; }
  .user-chip { padding: 0 6px; }
  .user-chip-text { display: none; }
  .icon-btn { width: 34px; height: 34px; }
  .page { gap: 22px; }
  .page-title { font-size: 21px; }
  .page-title .ic { width: 22px; height: 22px; }
  .grid { gap: 12px; }
  .grid-cards { --fit-min: 140px; }
  .grid-auto { --fit-min: 132px; }
  .rail { gap: 12px; }
  .section-title { font-size: 17px; }
}

/* 折叠屏外屏 / 超窄屏 */
@media (max-width: 400px) {
  .app { padding-left: 10px; padding-right: 10px; }
  /* 超窄屏（折叠屏外屏）：顶栏只保留必要控件，把宽度让给搜索框 */
  .topbar { gap: 6px; }
  .icon-btn { width: 30px; height: 30px; }
  .brand-mark { width: 30px; height: 30px; }
  #btnTheme, #btnNavStyle { display: none; }
  .search { flex: 1 1 72px; }
  .section-title small { display: none; }
  .grid-cards { --fit-min: 124px; }
  .grid-auto { --fit-min: 112px; }
  .page-title { font-size: 19px; }
}

/* 折叠屏展开态（双视口分段）：铰链把视口一分为二，主内容整体右移一档，避开折痕。
   ★ 必须带上 --nav-left（导航竖条仍以 left:14px 定位），否则又会出现「导航贴着内容」。
   ★★ 还必须限定 min-width:768px。原因（实测）：折叠屏展开后 innerWidth 常仍在 ≤767 区间
      （实测 673 / 717），此时 nav.css 的 ≤767 规则已把导航栏变成 off-canvas 抽屉
      （left:0 + translateX(-278.72px)，x=-279 完全在屏外），左侧根本没有导航栏；
      若这条规则仍无条件生效，就会给页面强行留出 94px（72+22）的**空左带**，
      右侧只剩 12px —— 内容整体偏右、左边一片空白。 */
@media (horizontal-viewport-segments: 2) and (min-width: 768px) {
  .app { padding-left: calc(var(--nav-left) + var(--nav-w) + 22px); }
}

/* 横屏手机 */
@media (max-width: 900px) and (orientation: landscape) and (max-height: 500px) {
  :root { --top-h: 52px; --player-h: 58px; }
}

/* 大屏 */
@media (min-width: 1680px) {
  :root { --nav-w: 96px; --nav-w-wide: 252px; }
  .grid-cards { --fit-min: 232px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
}
