/* ============================================================
   GlassFM — 网络收音机 设计系统
   CarPlay 毛玻璃风格，浅白/深黑双主题

   ── 车机 / 画中画（PiP）健壮性约定 ─────────────────────────
   1) clamp()/min() 只允许出现在 @supports 内，且不用于自定义属性。
      原因：老 WebView（Chrome < 79）里 `--x: clamp(...)` 仍是"合法 token"，
      var() 替换后值非法 → 该属性变成 unset（不会回退到 var() 兜底值），
      于是 width/height 退化成 auto，按钮只剩字形大小 —— 在画中画小窗里
      就会"缩成一团"。纯 px 令牌 + @supports 渐进增强可以彻底规避。
   2) 关键间距一律用 margin 实现，不用 flex gap（Chrome < 84 不支持）。
   3) 横屏尺寸由 --l-* 令牌驱动，按窗口高度/宽度分档：画中画窗口可能又矮又窄，
      控件尺寸优先保住，先牺牲声波、收藏条等次要内容。
   ============================================================ */

/* --- Google Fonts --- */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

/* ============================================================
   1. 设计 Token — CSS 自定义属性
   ============================================================ */
:root {
  /* --- 浅色主题（默认） --- */
  --bg-primary: #f2f2f7;
  --bg-secondary: #e5e5ea;
  --bg-gradient: linear-gradient(145deg, #f5f5f7 0%, #e8e8ed 50%, #dcdce2 100%);

  /* 毛玻璃 */
  --glass-bg: rgba(255, 255, 255, 0.65);
  --glass-bg-hover: rgba(255, 255, 255, 0.80);
  --glass-border: rgba(255, 255, 255, 0.45);
  --glass-shadow: 0 8px 32px rgba(0, 0, 0, 0.06);
  --glass-blur: blur(14px) saturate(155%);

  /* 文字 */
  --text-primary: #1d1d1f;
  --text-secondary: #86868b;
  --text-tertiary: #aeaeb2;

  /* 强调色 */
  --accent: #007AFF;
  --accent-hover: #0056CC;
  --accent-light: rgba(0, 122, 255, 0.12);

  /* 功能色 */
  --success: #34C759;
  --warning: #FF9500;
  --danger: #FF3B30;

  /* 分割线 / 背景块 */
  --divider: rgba(0, 0, 0, 0.06);
  --surface: rgba(0, 0, 0, 0.03);

  /* 动画 */
  --ease-out: cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --transition-fast: 0.2s var(--ease-out);
  --transition-normal: 0.35s var(--ease-out);
  --transition-theme: 0.45s cubic-bezier(0.4, 0, 0.2, 1);

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

  /* 间距 */
  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 16px;
  --space-lg: 24px;
  --space-xl: 32px;
  --space-2xl: 48px;

  /* 字体 */
  --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-size-xs: 11px;
  --font-size-sm: 13px;
  --font-size-base: 15px;
  --font-size-lg: 17px;
  --font-size-xl: 22px;
  --font-size-2xl: 28px;
  --font-size-3xl: 34px;

  /* 控件尺寸（纯 px 兜底值：任何 WebView 都能解析） */
  --btn-circle-size: 64px;
  --btn-circle-font: 24px;
  --btn-play-size: 80px;
  --btn-play-font: 32px;

  /* 滚动条 */
  --scrollbar-bg: transparent;
  --scrollbar-thumb: rgba(0, 0, 0, 0.15);
}

/* --- 深色主题 --- */
[data-theme="dark"] {
  --bg-primary: #1c1c1e;
  --bg-secondary: #2c2c2e;
  --bg-gradient: linear-gradient(145deg, #1c1c1e 0%, #2c2c2e 50%, #1a1a1c 100%);

  --glass-bg: rgba(44, 44, 46, 0.65);
  --glass-bg-hover: rgba(58, 58, 60, 0.78);
  --glass-border: rgba(255, 255, 255, 0.08);
  --glass-shadow: 0 8px 32px rgba(0, 0, 0, 0.35);

  --text-primary: #f5f5f7;
  --text-secondary: #98989d;
  --text-tertiary: #636366;

  --accent: #0A84FF;
  --accent-hover: #409CFF;
  --accent-light: rgba(10, 132, 255, 0.18);

  --divider: rgba(255, 255, 255, 0.10);
  --surface: rgba(255, 255, 255, 0.045);

  --scrollbar-thumb: rgba(255, 255, 255, 0.15);
}

/* --- 老引擎兜底：不支持 backdrop-filter 时提高底色不透明度，保证车机可读性 --- */
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  :root {
    --glass-bg: rgba(255, 255, 255, 0.93);
    --glass-bg-hover: rgba(255, 255, 255, 0.99);
    --glass-shadow: 0 8px 32px rgba(0, 0, 0, 0.10);
  }
  [data-theme="dark"] {
    --glass-bg: rgba(44, 44, 46, 0.95);
    --glass-bg-hover: rgba(58, 58, 60, 0.99);
  }
}

/* ============================================================
   2. 基础重置 & 全局样式
   ============================================================ */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html {
  font-size: 16px;
  height: 100%;
  overflow: hidden;
}

body {
  font-family: var(--font-family);
  background: var(--bg-gradient);
  color: var(--text-primary);
  height: 100%;
  overflow: hidden;
  user-select: none;
  -webkit-user-select: none;
}

/* 主题切换时直接切换，避免人为延时和卡顿感 */
* {
  transition-property: none;
  transition-duration: 0s;
  transition-timing-function: linear;
}

/* 滚动条美化 */
::-webkit-scrollbar {
  width: 4px;
  height: 4px;
}
::-webkit-scrollbar-track {
  background: var(--scrollbar-bg);
}
::-webkit-scrollbar-thumb {
  background: var(--scrollbar-thumb);
  border-radius: var(--radius-round);
}

/* ============================================================
   3. 毛玻璃组件库
   ============================================================ */

/* 毛玻璃卡片 */
.glass-card {
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--glass-shadow);
}

/* 毛玻璃按钮 */
.glass-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-family: var(--font-family);
  font-size: var(--font-size-base);
  font-weight: 500;
  cursor: pointer;
  padding: var(--space-sm) var(--space-md);
  transition: transform 0.15s var(--ease-spring), background 0.2s;
  outline: none;
  position: relative;
  overflow: hidden;
}
.glass-btn:active {
  transform: scale(0.93);
}
.glass-btn:hover {
  background: var(--glass-bg-hover);
}

/* 大号圆形按钮（播放控制） */
.glass-btn-circle {
  width: var(--btn-circle-size);
  height: var(--btn-circle-size);
  /* 兜底下限：即使某些环境把上面的尺寸解析失败，也绝不会塌缩成字形大小 */
  min-width: 44px;
  min-height: 44px;
  border-radius: 50%;
  padding: 0;
  font-size: var(--btn-circle-font);
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  border: 1px solid var(--glass-border);
}
.glass-btn-circle.large {
  width: var(--btn-play-size);
  height: var(--btn-play-size);
  min-width: 56px;
  min-height: 56px;
  font-size: var(--btn-play-font);
}

/* 强调色按钮 */
.glass-btn-accent {
  background: var(--accent);
  color: #fff;
  border-color: transparent;
}
.glass-btn-accent:hover {
  background: var(--accent-hover);
}

/* 胶囊标签 */
.glass-pill {
  display: inline-flex;
  align-items: center;
  padding: 6px 14px;
  border-radius: var(--radius-round);
  background: var(--surface);
  color: var(--text-secondary);
  font-size: var(--font-size-sm);
  font-weight: 500;
  cursor: pointer;
  transition:
    background-color var(--transition-fast),
    border-color var(--transition-fast),
    transform var(--transition-fast);
  white-space: nowrap;
  border: 1.5px solid transparent;
  flex: none;
}
.glass-pill:hover {
  background: var(--accent-light);
  color: var(--accent);
}
.glass-pill.active {
  background: var(--accent-light);
  color: var(--accent);
  border-color: var(--accent);
  font-weight: 600;
}

/* ------------------------------------------------------------
   内联 SVG 图标
   尺寸跟随 font-size（1em），颜色跟随 currentColor。
   避免依赖系统 emoji 字体 —— 不同车机 WebView 上 emoji 的字号、
   基线、配色都不可控，正是按钮"缩成一团 / 花掉"的来源之一。
   ------------------------------------------------------------ */
.ico {
  width: 1em;
  height: 1em;
  display: block;
  flex: none;
  pointer-events: none;
}

/* 播放/暂停互斥显示（class 由 app.js 切换） */
#btn-play .ico-pause { display: none; }
#btn-play.playing .ico-play { display: none; }
#btn-play.playing .ico-pause { display: block; }
/* ▶ 三角形视觉重心偏左，轻微右移做光学居中 */
#btn-play:not(.playing) { padding-left: 4px; }

/* 收藏/未收藏互斥显示 */
.fav-btn .ico-fav-on { display: none; }
.fav-btn.active .ico-fav-off { display: none; }
.fav-btn.active .ico-fav-on { display: block; }

/* ============================================================
   4. 应用主布局
   ============================================================ */
#app {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* --- 顶部栏 --- */
.top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-sm) var(--space-md);
  flex: none;
  min-height: 48px;
  z-index: 10;
}
.top-bar .app-title {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.2px;
  white-space: nowrap;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.top-bar .top-actions {
  display: flex;
  align-items: center;
}
.top-bar .top-actions > * + * {
  margin-left: var(--space-sm);
}
.top-bar .icon-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--surface);
  border: none;
  color: var(--text-secondary);
  font-size: 18px;
  cursor: pointer;
  transition:
    background-color var(--transition-fast),
    transform var(--transition-fast);
}
.top-bar .icon-btn:hover {
  background: var(--accent-light);
  color: var(--accent);
}

/* --- 分类标签栏 --- */
.category-bar {
  display: flex;
  padding: 0 var(--space-md);
  overflow-x: auto;
  overflow-y: hidden;
  flex: none;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  padding-bottom: var(--space-sm);
}
.category-bar > * + * {
  margin-left: var(--space-sm);
}
.category-bar::-webkit-scrollbar {
  display: none;
}

/* --- 主内容区域 --- */
.main-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 0 var(--space-md);
  min-height: 0;
}
.main-content > * + * {
  margin-top: var(--main-gap, var(--space-md));
}

/* ============================================================
   5. 播放器卡片
   ============================================================ */
.player-card {
  padding: var(--card-pad, var(--space-lg));
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: none;
  min-width: 0;
  position: relative;
  overflow: hidden;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
  transition: transform 0.25s ease, filter 0.25s ease;
}
.player-card.card-pressing {
  transform: scale(0.985);
  filter: brightness(1.05);
}
.player-card > * + * {
  margin-top: var(--card-gap, var(--space-md));
}

/* 背景装饰光晕 */
.player-card::before {
  content: '';
  position: absolute;
  width: 200px;
  height: 200px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--accent) 0%, transparent 70%);
  opacity: 0.06;
  top: -60px;
  right: -60px;
  pointer-events: none;
  transition: opacity var(--transition-theme);
}
[data-theme="dark"] .player-card::before {
  opacity: 0.1;
}

/* 电台信息区域 */
.station-info {
  display: flex;
  align-items: center;
  width: 100%;
}
.station-info > * + * {
  margin-left: var(--space-md);
}

.station-logo {
  width: var(--logo-size, 72px);
  height: var(--logo-size, 72px);
  border-radius: var(--radius-md);
  object-fit: cover;
  background: var(--surface);
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--logo-font, 32px);
  overflow: hidden;
  box-shadow: 0 4px 16px rgba(0,0,0,0.08);
}
.station-logo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.station-text {
  flex: 1;
  min-width: 0;
}
.station-name-row {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.station-name {
  font-size: var(--station-font, var(--font-size-xl));
  font-weight: 700;
  letter-spacing: -0.4px;
  line-height: 1.2;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
/* 左上角电台名称旁不再显示重复频率徽章，已统一由频谱上方大字展示 */
.station-freq-badge {
  display: none !important;
}
.station-freq-badge .sfb-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #38bdf8;
  box-shadow: 0 0 6px #38bdf8;
  flex: none;
}
[data-theme="light"] .station-freq-badge {
  background: rgba(0, 0, 0, 0.05);
  color: var(--text-primary, #0f172a);
  border-color: rgba(0, 0, 0, 0.1);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.05);
}
[data-theme="light"] .station-freq-badge .sfb-dot {
  background: #0284c7;
  box-shadow: none;
}
.station-desc {
  font-size: var(--station-desc-font, var(--font-size-sm));
  color: var(--text-secondary);
  margin-top: 4px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ============================================================
   无在线 Logo 时的拟真收音机频标徽章 (Premium Radio Station Badge)
   ============================================================ */
.radio-freq-badge-logo {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  /* 高级金属表盘同心沉浸质感 */
  background: radial-gradient(circle at 50% 28%, #242d3c 0%, #121620 58%, #080a0e 100%);
  border-radius: inherit;
  box-sizing: border-box;
  padding: 4px;
  position: relative;
  overflow: hidden;
  border: 1.5px solid rgba(255, 255, 255, 0.16);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08),
              inset 0 2px 6px rgba(0, 0, 0, 0.6),
              inset 0 -2px 6px rgba(0, 0, 0, 0.8),
              0 6px 18px rgba(0, 0, 0, 0.35);
  user-select: none;
}

[data-theme="light"] .radio-freq-badge-logo {
  background: radial-gradient(circle at 50% 26%, #ffffff 0%, #f1f5f9 60%, #e2e8f0 100%);
  border: 1.5px solid rgba(0, 0, 0, 0.12);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.95),
              inset 0 1px 3px rgba(0, 0, 0, 0.08),
              0 4px 14px rgba(0, 0, 0, 0.08);
}

/* 顶部微弧高光反光线 */
.radio-freq-badge-logo::before {
  content: '';
  position: absolute;
  top: 0;
  left: 14%;
  right: 14%;
  height: 1.5px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.55), transparent);
  pointer-events: none;
  z-index: 3;
}

[data-theme="light"] .radio-freq-badge-logo::before {
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.95), transparent);
}

/* 内部同心圆调谐刻度虚线环（精密工业仪表感） */
.radio-freq-badge-logo::after {
  content: '';
  position: absolute;
  inset: 3px;
  border-radius: inherit;
  border: 1px dashed rgba(255, 255, 255, 0.1);
  pointer-events: none;
  z-index: 1;
}

[data-theme="light"] .radio-freq-badge-logo::after {
  border: 1px dashed rgba(0, 0, 0, 0.08);
}

.rfb-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  width: 100%;
  height: 100%;
  box-sizing: border-box;
  position: relative;
  z-index: 2;
  text-align: center;
}

/* 顶部波段发光胶囊 (清晰醒目大字标) */
.rfb-header {
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.rfb-band {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, sans-serif;
  font-size: 11.5px;
  font-weight: 800;
  letter-spacing: 0.8px;
  line-height: 1;
  text-transform: uppercase;
  padding: 1.5px 7px;
  border-radius: 999px;
  background: rgba(56, 189, 248, 0.18);
  color: #38bdf8;
  border: 1px solid rgba(56, 189, 248, 0.45);
  box-shadow: 0 0 8px rgba(56, 189, 248, 0.25);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.radio-freq-badge-logo.band-am .rfb-band {
  background: rgba(251, 191, 36, 0.18);
  color: #fbbf24;
  border-color: rgba(251, 191, 36, 0.45);
  box-shadow: 0 0 8px rgba(251, 191, 36, 0.25);
}

[data-theme="light"] .rfb-band {
  background: rgba(2, 132, 199, 0.1);
  color: #0284c7;
  border-color: rgba(2, 132, 199, 0.32);
  box-shadow: none;
}
[data-theme="light"] .radio-freq-badge-logo.band-am .rfb-band {
  background: rgba(217, 119, 6, 0.1);
  color: #d97706;
  border-color: rgba(217, 119, 6, 0.32);
  box-shadow: none;
}

/* 中间核心数字（超大、极简白字、沉稳微光） */
.rfb-body {
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.rfb-num {
  font-family: "DIN Alternate", -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  font-size: 34px;
  font-weight: 900;
  color: #ffffff;
  line-height: 0.95;
  letter-spacing: -0.6px;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.8), 0 0 16px rgba(255, 255, 255, 0.18);
  font-variant-numeric: tabular-nums;
}

/* 4位字符（如 99.0 或 4位AM）适配 */
.radio-freq-badge-logo.is-med .rfb-num {
  font-size: 28px;
  letter-spacing: -0.7px;
}

/* 5位及以上长数字（如 103.9、107.0）紧凑适配 */
.radio-freq-badge-logo.is-long .rfb-num {
  font-size: 23px;
  letter-spacing: -0.8px;
}

[data-theme="light"] .rfb-num {
  color: #0f172a;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.12);
}

/* 底部单位与精细校准光点 */
.rfb-footer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  line-height: 1;
}

.rfb-unit {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", sans-serif;
  font-size: 11px;
  font-weight: 800;
  color: rgba(255, 255, 255, 0.88);
  letter-spacing: 1px;
  text-transform: uppercase;
}

[data-theme="light"] .rfb-unit {
  color: #475569;
}

.rfb-unit-dot {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: #38bdf8;
  opacity: 0.85;
  box-shadow: 0 0 4px #38bdf8;
  flex: none;
}

.radio-freq-badge-logo.band-am .rfb-unit-dot {
  background: #fbbf24;
  box-shadow: 0 0 4px #fbbf24;
}

[data-theme="light"] .rfb-unit-dot {
  background: #0284c7;
  box-shadow: none;
}
[data-theme="light"] .radio-freq-badge-logo.band-am .rfb-unit-dot {
  background: #d97706;
  box-shadow: none;
}

/* 在播放器大Logo（方块，~72px-96px）中的适配增强 */
.station-logo .radio-freq-badge-logo {
  padding: 6px;
}

.station-logo .radio-freq-badge-logo .rfb-band {
  font-size: 12.5px;
  padding: 2px 8.5px;
}

.station-logo .radio-freq-badge-logo .rfb-num {
  font-size: 38px;
}

.station-logo .radio-freq-badge-logo.is-med .rfb-num {
  font-size: 31px;
}

.station-logo .radio-freq-badge-logo.is-long .rfb-num {
  font-size: 26px;
}

.station-logo .radio-freq-badge-logo .rfb-unit {
  font-size: 12px;
}

/* 在收藏圆形列表中的精细比例适配 */
.fav-item .fav-icon .radio-freq-badge-logo {
  padding: 2px;
}

.fav-item .fav-icon .radio-freq-badge-logo .rfb-band {
  font-size: 9.5px;
  padding: 1px 5px;
}

.fav-item .fav-icon .radio-freq-badge-logo .rfb-num {
  font-size: 24px;
}

.fav-item .fav-icon .radio-freq-badge-logo.is-med .rfb-num {
  font-size: 20px;
}

.fav-item .fav-icon .radio-freq-badge-logo.is-long .rfb-num {
  font-size: 17px;
}

.fav-item .fav-icon .radio-freq-badge-logo .rfb-unit {
  font-size: 9px;
}

/* 在侧边栏/抽屉小图标（~24-32px）中的紧凑呈现 */
.fav-small-icon .radio-freq-badge-logo {
  padding: 1px;
}
.fav-small-icon .rfb-header,
.fav-small-icon .rfb-footer {
  display: none;
}
.fav-small-icon .rfb-num {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
}

/* ============================================================
   拟真收音机调谐仪表盘 (Realistic Radio Tuner Display)
   默认隐藏，后台设置为 radio 时激活
   ============================================================ */
/* ============================================================
   拟真发烧级复古收音机控制台 (Braun GT-01 / T-01 Analog Masterwork)
   默认隐藏，后台选择 radio 风格时激活
   ============================================================ */
.radio-tuner-panel {
  display: none;
}

[data-player-style="radio"] .radio-tuner-panel {
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 580px;
  background: radial-gradient(circle at 50% 0%, #1c1e23 0%, #101114 100%);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 20px;
  padding: 16px 20px 18px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.85), inset 0 1px 0 rgba(255, 255, 255, 0.12), inset 0 -1px 0 rgba(0, 0, 0, 0.8);
  box-sizing: border-box;
  animation: retroTunerFadeIn 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  overflow: hidden;
}

@keyframes retroTunerFadeIn {
  from { opacity: 0; transform: translateY(-6px) scale(0.99); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

[data-player-style="radio"] .visualizer,
[data-player-style="radio"] .player-freq-display,
[data-player-style="radio"] .player-controls {
  display: none !important;
}

/* 拟真风格下播放卡片与背景质感调优 */
[data-player-style="radio"] .player-card {
  background: linear-gradient(180deg, #141519 0%, #0d0e11 100%) !important;
  border-color: rgba(255, 255, 255, 0.08) !important;
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.9) !important;
}

[data-player-style="radio"] .station-info {
  display: none !important; /* 拟真风格下电台名由核心视窗呈现，隐藏顶部冗余 */
}

/* 拟真风格下音量与收藏条美化，与复古面板浑然一体 */
[data-player-style="radio"] .volume-control {
  margin-top: 14px;
  max-width: 580px;
  width: 100%;
  padding: 0 4px;
}

[data-player-style="radio"] .volume-control .vol-icon {
  color: rgba(255, 255, 255, 0.35);
}

[data-player-style="radio"] .volume-slider {
  background: rgba(255, 255, 255, 0.12) !important;
}

[data-player-style="radio"] .volume-slider::-webkit-slider-thumb {
  background: #ff9e3b !important;
  box-shadow: 0 0 10px rgba(255, 158, 59, 0.5) !important;
}

/* 拟真风格下收藏按钮：复古车载 Hi-Fi 机械 MEMORY 按键 */
.retro-fav-label {
  display: none;
}

[data-player-style="radio"] .volume-control .fav-btn {
  width: auto !important;
  min-width: 68px !important;
  height: 38px !important;
  padding: 0 12px !important;
  border-radius: 10px !important;
  background: linear-gradient(180deg, #25272e 0%, #16171b 100%) !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.15), inset 0 -1px 0 rgba(0, 0, 0, 0.7) !important;
  color: rgba(255, 255, 255, 0.55) !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 6px !important;
  cursor: pointer !important;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1) !important;
  box-sizing: border-box !important;
}

[data-player-style="radio"] .volume-control .fav-btn .ico {
  width: 16px !important;
  height: 16px !important;
  flex: none;
}

[data-player-style="radio"] .volume-control .fav-btn .retro-fav-label {
  display: inline-block !important;
  font-family: 'Space Grotesk', -apple-system, sans-serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  user-select: none;
  line-height: 1;
}

[data-player-style="radio"] .volume-control .fav-btn:hover {
  background: linear-gradient(180deg, #30333d 0%, #1c1d22 100%) !important;
  border-color: rgba(255, 255, 255, 0.22) !important;
  color: rgba(255, 255, 255, 0.85) !important;
  transform: translateY(-1px);
}

[data-player-style="radio"] .volume-control .fav-btn:active {
  transform: translateY(1px);
  background: #121316 !important;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.9) !important;
}

/* 收藏激活状态：琥珀金宝石背光灯亮起 */
[data-player-style="radio"] .volume-control .fav-btn.active {
  background: radial-gradient(circle at 50% 0%, rgba(255, 158, 59, 0.25) 0%, rgba(26, 27, 33, 0.98) 100%) !important;
  border-color: rgba(255, 158, 59, 0.75) !important;
  color: #ff9e3b !important;
  box-shadow: 0 0 16px rgba(255, 158, 59, 0.35), inset 0 1px 0 rgba(255, 200, 120, 0.3), inset 0 -1px 0 rgba(0, 0, 0, 0.7) !important;
}

[data-player-style="radio"] .volume-control .fav-btn.active .ico {
  fill: #ff9e3b !important;
  color: #ff9e3b !important;
  filter: drop-shadow(0 0 6px rgba(255, 158, 59, 0.7));
}

[data-player-style="radio"] .volume-control .fav-btn.active .retro-fav-label {
  color: #ff9e3b !important;
  text-shadow: 0 0 8px rgba(255, 158, 59, 0.5);
}

/* ============================================================
   拟真风格预设收藏快捷栏 (Braun GT-01 Preset Bank)
   ============================================================ */
.favs-title-retro,
.favs-hint-retro {
  display: none;
}

[data-player-style="radio"] .favs-title-classic {
  display: none !important;
}

[data-player-style="radio"] .favs-title-retro {
  display: inline !important;
  font-family: 'Space Grotesk', -apple-system, sans-serif;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #a8a59e;
}

[data-player-style="radio"] .favs-hint-retro {
  display: inline-block !important;
  font-family: 'Space Mono', monospace;
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: rgba(255, 158, 59, 0.85);
  background: rgba(255, 158, 59, 0.1);
  border: 1px solid rgba(255, 158, 59, 0.25);
  padding: 2px 7px;
  border-radius: 6px;
}

[data-player-style="radio"] .favorites-section .section-title {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  padding: 0 4px;
  margin-bottom: 8px;
}

[data-player-style="radio"] .favorites-scroll {
  gap: 10px;
  padding: 4px 2px 8px;
}

[data-player-style="radio"] .favorites-scroll > * + * {
  margin-left: 0 !important;
}

/* 预设频段卡片 (Preset Card) */
.retro-preset-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex: 0 0 auto;
  min-width: 140px;
  max-width: 180px;
  height: 52px;
  padding: 7px 12px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.09);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.05);
  cursor: pointer;
  text-align: left;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  box-sizing: border-box;
  position: relative;
  outline: none;
  user-select: none;
}

.retro-preset-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.18);
  transform: translateY(-1px);
}

.retro-preset-btn:active {
  transform: translateY(1px) scale(0.98);
  background: rgba(0, 0, 0, 0.4);
}

.retro-preset-info {
  display: flex;
  flex-direction: column;
  min-width: 0;
  flex: 1;
  padding-right: 8px;
}

.retro-preset-freq-line {
  display: flex;
  align-items: baseline;
  gap: 5px;
}

.retro-preset-freq {
  font-family: 'Space Grotesk', -apple-system, sans-serif;
  font-size: 15.5px;
  font-weight: 700;
  color: #e5e5e8;
  letter-spacing: 0.02em;
  line-height: 1.1;
  transition: color 0.2s ease;
}

.retro-preset-band {
  font-family: 'Space Mono', monospace;
  font-size: 9.5px;
  font-weight: 700;
  color: #8e8d89;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  line-height: 1;
}

.retro-preset-name {
  font-family: 'Space Grotesk', -apple-system, sans-serif;
  font-size: 11px;
  font-weight: 500;
  color: #8e8d89;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  margin-top: 3px;
  line-height: 1.2;
  transition: color 0.2s ease;
}

/* 预设卡片右侧状态微光 LED 指示灯 */
.retro-preset-led {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.18);
  flex: none;
  transition: all 0.25s ease;
}

/* 激活收听中的预设卡片高亮 */
.retro-preset-btn.active-preset {
  background: radial-gradient(circle at 40% 0%, rgba(255, 158, 59, 0.2) 0%, rgba(24, 25, 30, 0.96) 100%) !important;
  border: 1px solid rgba(255, 158, 59, 0.65) !important;
  box-shadow: 0 4px 16px rgba(245, 166, 35, 0.18), inset 0 1px 0 rgba(255, 200, 120, 0.2) !important;
}

.retro-preset-btn.active-preset .retro-preset-freq {
  color: #ff9e3b !important;
  text-shadow: 0 0 10px rgba(255, 158, 59, 0.45);
}

.retro-preset-btn.active-preset .retro-preset-band {
  color: rgba(255, 158, 59, 0.9) !important;
}

.retro-preset-btn.active-preset .retro-preset-name {
  color: #f3f3f5 !important;
  font-weight: 600;
}

.retro-preset-btn.active-preset .retro-preset-led {
  background: #ff9e3b !important;
  box-shadow: 0 0 8px rgba(255, 158, 59, 0.95);
  transform: scale(1.2);
}

/* 侧边栏预设卡片（横屏车机端） */
.retro-preset-btn.side-preset {
  width: 100% !important;
  max-width: 100% !important;
  margin-bottom: 6px !important;
  height: 48px !important;
}

/* 浅色模式下预设卡片对比度优化 */
[data-theme="light"] .retro-preset-btn {
  background: #ffffff !important;
  border: 1px solid rgba(0, 0, 0, 0.12) !important;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06) !important;
}
[data-theme="light"] .retro-preset-btn .retro-preset-freq {
  color: #d97706 !important;
}
[data-theme="light"] .retro-preset-btn .retro-preset-band {
  color: #6b7280 !important;
}
[data-theme="light"] .retro-preset-btn .retro-preset-name {
  color: #1f2937 !important;
}
[data-theme="light"] .retro-preset-btn .retro-preset-led {
  background: rgba(0, 0, 0, 0.2) !important;
}
[data-theme="light"] .retro-preset-btn.active-preset {
  background: linear-gradient(180deg, #fffbeb 0%, #fef3c7 100%) !important;
  border-color: #f59e0b !important;
  box-shadow: 0 0 12px rgba(245, 158, 11, 0.25) !important;
}
[data-theme="light"] .retro-preset-btn.active-preset .retro-preset-name {
  color: #78350f !important;
}
[data-theme="light"] .retro-preset-btn.active-preset .retro-preset-led {
  background: #f59e0b !important;
  box-shadow: 0 0 8px rgba(245, 158, 11, 0.8) !important;
}

/* 1. 顶部规格身份行 */
.retro-cockpit-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  margin-bottom: 12px;
}

.retro-brand-spec {
  display: flex;
  align-items: center;
  gap: 7px;
}

.retro-power-led {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #f5a623;
  box-shadow: 0 0 10px rgba(245, 166, 35, 0.9);
  animation: retroLedPulse 2.5s ease-in-out infinite;
}

@keyframes retroLedPulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.75; transform: scale(0.92); }
}

.retro-brand-name {
  font-family: 'Space Grotesk', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.22em;
  color: #e3e2e6;
  text-transform: uppercase;
}

/* 移除无用冗余英文装饰文字，彻底净化界面视觉空间 */
.retro-spec-badge,
.retro-carrier-tag,
.retro-ruler-footer,
.retro-rotor-caption {
  display: none !important;
}

.retro-center-status {
  display: flex;
  align-items: center;
}

.retro-stereo-capsule {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: #15171b;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 20px;
  padding: 2.5px 9px;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.8);
  opacity: 0.45;
  transition: opacity 0.3s ease, border-color 0.3s ease;
}

.retro-stereo-capsule.playing {
  opacity: 1;
  border-color: rgba(52, 211, 153, 0.3);
}

.retro-stereo-capsule .stereo-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #34d399;
  box-shadow: 0 0 8px rgba(52, 211, 153, 0.9);
}

.retro-stereo-capsule.playing .stereo-dot {
  animation: retroStereoBlink 1.8s ease-in-out infinite alternate;
}

@keyframes retroStereoBlink {
  from { box-shadow: 0 0 5px rgba(52, 211, 153, 0.6); }
  to { box-shadow: 0 0 12px rgba(52, 211, 153, 1), 0 0 18px rgba(52, 211, 153, 0.4); }
}

.retro-stereo-capsule .stereo-text {
  font-family: 'Space Mono', monospace;
  font-size: 10px;
  font-weight: 700;
  color: #34d399;
  letter-spacing: 0.12em;
}

.retro-stereo-capsule .stereo-divider {
  color: rgba(255, 255, 255, 0.2);
  font-size: 10px;
}

.retro-stereo-capsule .stereo-lock-text {
  font-family: 'Space Mono', monospace;
  font-size: 9.5px;
  color: #a39e97;
  letter-spacing: 0.05em;
}

.retro-band-pill {
  font-family: 'Space Mono', monospace;
  font-size: 10px;
  font-weight: 700;
  color: #ffc880;
  background: rgba(245, 166, 35, 0.12);
  border: 1px solid rgba(245, 166, 35, 0.35);
  border-radius: 4px;
  padding: 2px 7px;
  letter-spacing: 0.08em;
}

/* 2. 核心超大主频舞台 */
.retro-hero-stage {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 6px 0 10px;
  position: relative;
}

.retro-carrier-tag {
  display: flex;
  align-items: center;
  gap: 7px;
  font-family: 'Space Mono', monospace;
  font-size: 9.5px;
  letter-spacing: 0.22em;
  color: rgba(255, 200, 128, 0.7);
  text-transform: uppercase;
  margin-bottom: 2px;
}

.retro-dot-sep {
  color: rgba(255, 200, 128, 0.4);
}

.retro-hero-freq-row {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 6px;
  user-select: none;
}

.retro-freq-val {
  font-family: 'Space Grotesk', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 54px;
  font-weight: 700;
  line-height: 1;
  color: #ffc880;
  letter-spacing: -0.02em;
  text-shadow: 0 0 32px rgba(245, 166, 35, 0.4), 0 2px 8px rgba(0, 0, 0, 0.9);
  font-variant-numeric: tabular-nums;
  transition: color 0.2s ease, text-shadow 0.2s ease;
}

.retro-freq-unit {
  font-family: 'Space Mono', monospace;
  font-size: 16px;
  font-weight: 500;
  color: rgba(255, 200, 128, 0.75);
  letter-spacing: 0.1em;
}

.retro-station-meta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 6px;
  max-width: 90%;
}

.retro-station-name {
  font-family: 'Space Grotesk', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 16px;
  font-weight: 600;
  color: #e3e2e6;
  letter-spacing: 0.02em;
  max-width: 200px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.retro-meta-sep {
  color: rgba(255, 255, 255, 0.25);
  font-size: 14px;
}

.retro-station-desc {
  font-family: 'Hanken Grotesk', -apple-system, sans-serif;
  font-size: 13px;
  color: #d4c5a3;
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* 3. 包豪斯精密调谐刻度标尺 */
.retro-ruler-card {
  background: #0d0e11;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 14px;
  padding: 10px 14px 8px;
  margin-top: 4px;
  box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.9), 0 4px 14px rgba(0, 0, 0, 0.5);
  display: flex;
  flex-direction: column;
  gap: 4px;
  position: relative;
}

.retro-ruler-numbers {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: 'Space Mono', monospace;
  font-size: 11px;
  color: #7a7670;
  padding: 0 var(--track-pad, 10px);
  user-select: none;
}

.retro-ruler-numbers span {
  cursor: pointer;
  width: 0;
  display: flex;
  justify-content: center;
  overflow: visible;
  white-space: nowrap;
  transition: color 0.2s ease, text-shadow 0.2s ease, transform 0.2s ease;
}

.retro-ruler-numbers span:hover {
  color: #ffc880;
}

.retro-ruler-numbers span.active {
  color: #ffc880;
  font-weight: 700;
  text-shadow: 0 0 8px rgba(245, 166, 35, 0.8);
  transform: scale(1.08);
}

.retro-tuning-track {
  position: relative;
  width: 100%;
  height: 28px;
  display: flex;
  align-items: center;
  cursor: pointer;
  user-select: none;
}

.retro-track-rail {
  width: 100%;
  height: 2px;
  background: #23252a;
  border-radius: 2px;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.8);
}

.retro-track-ticks {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 var(--track-pad, 10px);
  pointer-events: none;
  opacity: 0.45;
}

.retro-track-ticks .tick-l {
  width: 1.5px;
  height: 12px;
  background: #ffffff;
  border-radius: 1px;
}

.retro-track-ticks .tick-m {
  width: 1px;
  height: 8px;
  background: rgba(255, 255, 255, 0.7);
  border-radius: 1px;
}

.retro-track-ticks .tick-s {
  width: 1px;
  height: 5px;
  background: rgba(255, 255, 255, 0.4);
  border-radius: 0.5px;
}

/* 琥珀金发光游标指针 */
.retro-tuning-needle {
  position: absolute;
  top: 50%;
  transform: translate(-50%, -50%);
  left: calc(var(--track-pad, 10px) + (100% - var(--track-pad, 10px) * 2) * (var(--tuner-pct, 50) / 100));
  width: 4px;
  height: 32px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  pointer-events: none;
  transition: left 0.35s cubic-bezier(0.2, 0.9, 0.3, 1);
  z-index: 10;
}

.needle-glow-top,
.needle-glow-bottom {
  width: 8px;
  height: 2px;
  background: #ffffff;
  border-radius: 2px;
  box-shadow: 0 0 6px #ffffff;
}

.needle-body {
  flex: 1;
  width: 2.5px;
  background: #f5a623;
  box-shadow: 0 0 12px rgba(245, 166, 35, 1);
  border-radius: 2px;
}

.needle-glow-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #ffddb4;
  box-shadow: 0 0 10px rgba(255, 200, 128, 1);
  margin: -3.5px 0;
  z-index: 11;
}

.retro-ruler-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: 'Space Mono', monospace;
  font-size: 8.5px;
  color: rgba(163, 158, 151, 0.65);
  padding: 0 4px;
  margin-top: 1px;
}

.retro-ruler-footer .pll-text {
  color: rgba(255, 200, 128, 0.85);
  letter-spacing: 0.05em;
}

/* 4. 实体铝制滚花旋钮与微调调谐按键 */
.retro-rotor-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 32px;
  margin-top: 12px;
}

.retro-step-btn {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: #1a1b1f;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  color: #a39e97;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
}

.retro-step-btn:hover {
  background: #24252a;
  color: #ffc880;
  border-color: rgba(245, 166, 35, 0.3);
}

.retro-step-btn:active {
  transform: scale(0.92);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.7), inset 0 2px 4px rgba(0, 0, 0, 0.8);
}

.retro-step-icon {
  width: 22px;
  height: 22px;
}

/* 滚花旋钮 */
.retro-rotor-wheel-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  cursor: pointer;
}

.knurled-texture {
  background: radial-gradient(circle at center, #2e2f33 0%, #17181b 100%), repeating-conic-gradient(#3a3b40 0deg 1.5deg, #1b1c20 1.5deg 3deg);
}

.retro-rotor-outer {
  position: relative;
  width: 82px;
  height: 82px;
  border-radius: 50%;
  padding: 4px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.9), inset 0 2px 4px rgba(255, 255, 255, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.2s ease;
}

.retro-rotor-outer:hover {
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.95), 0 0 16px rgba(245, 166, 35, 0.25);
}

.retro-rotor-outer:active {
  transform: scale(0.95);
}

.retro-rotor-inner {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: linear-gradient(145deg, #2a2b30 0%, #15161a 100%);
  box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.retro-rotor-indicator-dot {
  position: absolute;
  top: 7px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #f5a623;
  box-shadow: 0 0 8px rgba(245, 166, 35, 1);
  border: 1px solid rgba(255, 200, 128, 0.5);
}

.retro-rotor-center {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #0f1013;
  border: 1px solid rgba(255, 255, 255, 0.06);
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
}

.retro-rotor-core {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #2e3036;
  transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

/* 播放时中央核心微光与旋转动态 */
.retro-rotor-wheel-wrap.is-playing .retro-rotor-core {
  background: #f5a623;
  box-shadow: 0 0 8px rgba(245, 166, 35, 0.8);
}

.retro-rotor-caption {
  font-family: 'Space Grotesk', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 9px;
  color: #7a7670;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  margin-top: 2px;
  user-select: none;
}

/* 横屏车机端强化仪表台沉浸感 */
@media (orientation: landscape) {
  [data-player-style="radio"] .radio-tuner-panel {
    max-width: 640px;
    padding: 18px 24px 20px;
  }
  [data-player-style="radio"] .retro-freq-val {
    font-size: 64px;
  }
  [data-player-style="radio"] .retro-rotor-outer {
    width: 90px;
    height: 90px;
  }
  [data-player-style="radio"] .volume-control {
    max-width: 640px;
    margin-top: 12px;
  }
}

/* ============================================================
   拟真收音机日间/浅色模式 (Braun Dieter Rams Bauhaus Silver-White)
   白昼包豪斯：阳极氧化银白铝面 + 暖金琥珀刻度 + 纯正黑白灰机电质感
   ============================================================ */
[data-theme="light"] [data-player-style="radio"] .player-card,
[data-theme="light"][data-player-style="radio"] .player-card {
  background: linear-gradient(180deg, #ffffff 0%, #f4f5f8 100%) !important;
  border-color: rgba(0, 0, 0, 0.09) !important;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.08), inset 0 1px 0 #ffffff !important;
}

[data-theme="light"] [data-player-style="radio"] .radio-tuner-panel,
[data-theme="light"][data-player-style="radio"] .radio-tuner-panel,
[data-theme="light"] .radio-tuner-panel {
  background: radial-gradient(circle at 50% 0%, #ffffff 0%, #edf0f5 100%) !important;
  border: 1px solid rgba(0, 0, 0, 0.1) !important;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.06), inset 0 1px 0 #ffffff, inset 0 -1px 0 rgba(0, 0, 0, 0.04) !important;
}

/* 顶部规格行日间配色 */
[data-theme="light"] .retro-cockpit-header {
  border-bottom-color: rgba(0, 0, 0, 0.06) !important;
}

[data-theme="light"] .retro-brand-name {
  color: #1f2937 !important;
}

[data-theme="light"] .retro-power-led {
  background: #d97706 !important;
  box-shadow: 0 0 8px rgba(217, 119, 6, 0.6) !important;
}

[data-theme="light"] .retro-stereo-capsule {
  background: #f1f3f7 !important;
  border: 1px solid rgba(0, 0, 0, 0.08) !important;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.06) !important;
  opacity: 0.65 !important;
}

[data-theme="light"] .retro-stereo-capsule.playing {
  background: #ecfdf5 !important;
  border-color: rgba(16, 185, 129, 0.4) !important;
  opacity: 1 !important;
}

[data-theme="light"] .retro-stereo-capsule .stereo-dot {
  background: #10b981 !important;
  box-shadow: 0 0 6px rgba(16, 185, 129, 0.7) !important;
}

[data-theme="light"] .retro-stereo-capsule .stereo-text {
  color: #059669 !important;
}

[data-theme="light"] .retro-stereo-capsule .stereo-divider {
  color: rgba(0, 0, 0, 0.2) !important;
}

[data-theme="light"] .retro-stereo-capsule .stereo-lock-text {
  color: #64748b !important;
}

[data-theme="light"] .retro-stereo-capsule.playing .stereo-lock-text {
  color: #059669 !important;
}

[data-theme="light"] .retro-band-pill {
  color: #b45309 !important;
  background: rgba(245, 158, 11, 0.12) !important;
  border: 1px solid rgba(245, 158, 11, 0.3) !important;
}

/* 核心主频区日间配色 */
[data-theme="light"] .retro-freq-val {
  color: #b45309 !important;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.08) !important;
}

[data-theme="light"] .retro-freq-unit {
  color: #6b7280 !important;
}

[data-theme="light"] .retro-station-name {
  color: #111827 !important;
}

[data-theme="light"] .retro-meta-sep {
  color: rgba(0, 0, 0, 0.25) !important;
}

[data-theme="light"] .retro-station-desc {
  color: #4b5563 !important;
}

/* 刻度标尺日间配色 */
[data-theme="light"] .retro-ruler-card {
  background: linear-gradient(180deg, #f8f9fa 0%, #e9ecef 100%) !important;
  border: 1px solid rgba(0, 0, 0, 0.1) !important;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.08), 0 2px 8px rgba(0, 0, 0, 0.04) !important;
}

[data-theme="light"] .retro-ruler-numbers {
  color: #64748b !important;
}

[data-theme="light"] .retro-ruler-numbers span:hover {
  color: #b45309 !important;
}

[data-theme="light"] .retro-ruler-numbers span.active {
  color: #b45309 !important;
  font-weight: 800 !important;
  text-shadow: 0 0 6px rgba(245, 158, 11, 0.35) !important;
}

[data-theme="light"] .retro-track-rail {
  background: #cbd5e1 !important;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.12) !important;
}

[data-theme="light"] .retro-track-ticks .tick-l {
  background: #334155 !important;
}

[data-theme="light"] .retro-track-ticks .tick-m {
  background: #64748b !important;
}

[data-theme="light"] .retro-track-ticks .tick-s {
  background: #94a3b8 !important;
}

[data-theme="light"] .retro-tuning-needle .needle-body {
  background: #ea580c !important;
  box-shadow: 0 0 6px rgba(234, 88, 12, 0.6) !important;
}

[data-theme="light"] .retro-tuning-needle .needle-glow-dot {
  background: #fed7aa !important;
  box-shadow: 0 0 6px rgba(234, 88, 12, 0.8) !important;
}

[data-theme="light"] .retro-tuning-needle .needle-glow-top,
[data-theme="light"] .retro-tuning-needle .needle-glow-bottom {
  background: #ea580c !important;
  box-shadow: 0 0 4px #ea580c !important;
}

/* 控件：实体滚花旋钮与微调按键日间配色 */
[data-theme="light"] .retro-step-btn {
  background: linear-gradient(180deg, #ffffff 0%, #e5e7eb 100%) !important;
  border: 1px solid rgba(0, 0, 0, 0.12) !important;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.08), inset 0 1px 0 #ffffff !important;
  color: #4b5563 !important;
}

[data-theme="light"] .retro-step-btn:hover {
  color: #b45309 !important;
  border-color: rgba(245, 158, 11, 0.4) !important;
}

[data-theme="light"] .retro-step-btn:active {
  background: #d1d5db !important;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.15) !important;
}

[data-theme="light"] .retro-rotor-outer {
  background: radial-gradient(circle at center, #f3f4f6 0%, #d1d5db 100%), repeating-conic-gradient(#e5e7eb 0deg 2deg, #9ca3af 2deg 4deg) !important;
  border: 1px solid rgba(0, 0, 0, 0.15) !important;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.12), inset 0 1px 2px #ffffff !important;
}

[data-theme="light"] .retro-rotor-inner {
  background: radial-gradient(circle at 40% 35%, #ffffff 0%, #e5e7eb 100%) !important;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.15) !important;
}

[data-theme="light"] .retro-rotor-indicator-dot {
  background: #ea580c !important;
  box-shadow: 0 0 6px rgba(234, 88, 12, 0.8) !important;
}

[data-theme="light"] .retro-rotor-center {
  background: linear-gradient(135deg, #f9fafb 0%, #d1d5db 100%) !important;
  border: 1px solid rgba(0, 0, 0, 0.1) !important;
}

[data-theme="light"] .retro-rotor-core {
  background: #94a3b8 !important;
}

[data-theme="light"] .retro-rotor-wheel-wrap.is-playing .retro-rotor-core {
  background: #ea580c !important;
  box-shadow: 0 0 8px rgba(234, 88, 12, 0.8) !important;
}

[data-theme="light"] .retro-rotor-wheel-wrap.is-playing .retro-rotor-outer,
[data-theme="light"] .retro-rotor-outer.is-playing {
  box-shadow: 0 6px 20px rgba(245, 158, 11, 0.25), 0 0 0 2px rgba(245, 158, 11, 0.4) !important;
}

/* 音量控制与收藏按键日间配色 */
[data-theme="light"] [data-player-style="radio"] .volume-control .vol-icon,
[data-theme="light"][data-player-style="radio"] .volume-control .vol-icon {
  color: #6b7280 !important;
}

[data-theme="light"] [data-player-style="radio"] .volume-slider,
[data-theme="light"][data-player-style="radio"] .volume-slider {
  background: rgba(0, 0, 0, 0.1) !important;
}

[data-theme="light"] [data-player-style="radio"] .volume-slider::-webkit-slider-thumb,
[data-theme="light"][data-player-style="radio"] .volume-slider::-webkit-slider-thumb {
  background: #d97706 !important;
  box-shadow: 0 2px 6px rgba(217, 119, 6, 0.4) !important;
}

[data-theme="light"] [data-player-style="radio"] .volume-control .fav-btn,
[data-theme="light"][data-player-style="radio"] .volume-control .fav-btn {
  background: linear-gradient(180deg, #ffffff 0%, #f1f3f7 100%) !important;
  border: 1px solid rgba(0, 0, 0, 0.12) !important;
  color: #6b7280 !important;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.06), inset 0 1px 0 #ffffff !important;
}

[data-theme="light"] [data-player-style="radio"] .volume-control .fav-btn:hover,
[data-theme="light"][data-player-style="radio"] .volume-control .fav-btn:hover {
  background: linear-gradient(180deg, #ffffff 0%, #e5e7eb 100%) !important;
  border-color: rgba(0, 0, 0, 0.18) !important;
  color: #1f2937 !important;
}

[data-theme="light"] [data-player-style="radio"] .volume-control .fav-btn.active,
[data-theme="light"][data-player-style="radio"] .volume-control .fav-btn.active {
  background: linear-gradient(180deg, #fffbeb 0%, #fef3c7 100%) !important;
  border-color: #f59e0b !important;
  color: #d97706 !important;
  box-shadow: 0 0 14px rgba(245, 158, 11, 0.25), inset 0 1px 0 #ffffff !important;
}

[data-theme="light"] [data-player-style="radio"] .volume-control .fav-btn.active .ico,
[data-theme="light"][data-player-style="radio"] .volume-control .fav-btn.active .ico {
  fill: #d97706 !important;
  color: #d97706 !important;
}

[data-theme="light"] [data-player-style="radio"] .volume-control .fav-btn.active .retro-fav-label,
[data-theme="light"][data-player-style="radio"] .volume-control .fav-btn.active .retro-fav-label {
  color: #d97706 !important;
}

/* 预设栏目日间标题与卡片 */
[data-theme="light"] .favs-title-retro {
  color: #6b7280 !important;
}

[data-theme="light"] .favs-hint-retro {
  color: #d97706 !important;
  background: rgba(245, 158, 11, 0.1) !important;
  border-color: rgba(245, 158, 11, 0.25) !important;
}

[data-theme="light"] .retro-preset-btn {
  background: #ffffff !important;
  border: 1px solid rgba(0, 0, 0, 0.09) !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05), inset 0 1px 0 #ffffff !important;
}

[data-theme="light"] .retro-preset-btn:hover {
  background: #f8fafc !important;
  border-color: rgba(0, 0, 0, 0.16) !important;
}

[data-theme="light"] .retro-preset-btn:active {
  background: #e2e8f0 !important;
}

[data-theme="light"] .retro-preset-freq {
  color: #1f2937 !important;
}

[data-theme="light"] .retro-preset-band {
  color: #64748b !important;
}

[data-theme="light"] .retro-preset-name {
  color: #4b5563 !important;
}

[data-theme="light"] .retro-preset-led {
  background: rgba(0, 0, 0, 0.15) !important;
}

/* 日间激活收听中的预设卡片高亮 */
[data-theme="light"] .retro-preset-btn.active-preset {
  background: radial-gradient(circle at 40% 0%, #fffbeb 0%, #fef3c7 100%) !important;
  border: 1px solid #f59e0b !important;
  box-shadow: 0 4px 14px rgba(245, 158, 11, 0.22), inset 0 1px 0 #ffffff !important;
}

[data-theme="light"] .retro-preset-btn.active-preset .retro-preset-freq {
  color: #b45309 !important;
  text-shadow: none !important;
}

[data-theme="light"] .retro-preset-btn.active-preset .retro-preset-band {
  color: #d97706 !important;
}

[data-theme="light"] .retro-preset-btn.active-preset .retro-preset-name {
  color: #92400e !important;
  font-weight: 600 !important;
}

[data-theme="light"] .retro-preset-btn.active-preset .retro-preset-led {
  background: #d97706 !important;
  box-shadow: 0 0 6px rgba(217, 119, 6, 0.8) !important;
}

/* 播放控制中心区域
   注意：竖屏下父卡片高度由内容撑开，这里不能写 min-height:0，
   否则自动最小尺寸被清掉，控件区会塌成 0。flex:1/min-height:0 只在横屏（卡片定高）时加。 */
.player-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
}
.player-center > * + * {
  margin-top: var(--center-gap, var(--space-md));
}

/* ============================================================
   声波可视化 (Hardware-Accelerated Organic Visualizer)
   18 段高动态振幅 · 底部基线固定 · 纯净无框流光声波
   - 底部绝对固定不动（transform-origin: 50% 100%），竖条单向向上跳跃
   - 移除背景外框，纯净融入卡片
   - 振幅拉大：高度由 40px 扩展至 56px，低音与旋律大幅起伏
   - 频谱三色阶梯流光（青蓝 → 蔚蓝 → 霓紫）
   - 由 JS 仿生音频物理阻尼引擎动态驱动（Fast Attack, Floating Decay），绝不机械重复
   ============================================================ */
.visualizer {
  display: -webkit-flex;
  display: flex;
  -webkit-align-items: flex-end;
  align-items: flex-end;
  -webkit-justify-content: center;
  justify-content: center;
  height: var(--viz-h, 56px);
  padding: 0;
  margin: 0 auto;
  flex: none;
  box-sizing: border-box;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  -webkit-user-select: none;
  user-select: none;
}

.visualizer::before {
  display: none !important;
}

/* 柱子：只作定位容器，自身不做缩放 ——
   这样顶部浮动高光块（.bar-cap）不会被柱体的 scaleY 一起拉伸。
   结构：.bar > .bar-fill（随音量伸缩的柱体） + .bar-cap（顶部高光块） */
.visualizer .bar {
  display: block;
  position: relative;
  width: var(--viz-bar-w, 4.5px);
  height: 100%;
  flex: none;
}

.visualizer .bar + .bar {
  margin-left: var(--viz-gap, 4.5px);
}

.visualizer .bar-fill {
  display: block;
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 100%;
  border-radius: 999px;
  -webkit-transform-origin: 50% 100%;
  transform-origin: 50% 100%;
  -webkit-transform: scaleY(0.05) translateZ(0);
  transform: scaleY(0.05) translateZ(0);
  opacity: 0.35;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  will-change: transform, opacity;
  -webkit-transition: opacity 0.25s ease;
  transition: opacity 0.25s ease;
}

/* 顶部浮动高光块：默认不显示，只有「样式二」启用；
   纵向位置由 app.js 逐帧写 bottom 百分比（不参与柱体缩放，所以不会被拉长） */
.visualizer .bar-cap {
  display: none;
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 3px;
  margin-bottom: 5px;
  border-radius: 999px;
  background: #3a3a3c;
  opacity: 0;
  -webkit-transition: opacity 0.2s ease;
  transition: opacity 0.2s ease;
}
[data-theme="dark"] .visualizer .bar-cap {
  background: #ffffff;
  box-shadow: 0 0 4px rgba(255, 255, 255, 0.6);
}

/* ===== 频谱样式一（默认 style-bars）：三色阶梯流光（青蓝 → 蔚蓝 → 霓紫） ===== */
/* 1~5 柱（低音区：热带亮青） */
.visualizer.style-bars .bar:nth-child(-n+5) > .bar-fill {
  background: -webkit-linear-gradient(top, #00f2fe 0%, #4facfe 100%);
  background: linear-gradient(180deg, #00f2fe 0%, #4facfe 100%);
}
[data-theme="dark"] .visualizer.style-bars .bar:nth-child(-n+5) > .bar-fill {
  background: -webkit-linear-gradient(top, #22d3ee 0%, #06b6d4 100%);
  background: linear-gradient(180deg, #22d3ee 0%, #06b6d4 100%);
}

/* 6~13 柱（中频人声区：经典苹果蓝/蔚蓝） */
.visualizer.style-bars .bar:nth-child(n+6):nth-child(-n+13) > .bar-fill {
  background: -webkit-linear-gradient(top, #38bdf8 0%, #007aff 55%, #3b82f6 100%);
  background: linear-gradient(180deg, #38bdf8 0%, #007aff 55%, #3b82f6 100%);
}
[data-theme="dark"] .visualizer.style-bars .bar:nth-child(n+6):nth-child(-n+13) > .bar-fill {
  background: -webkit-linear-gradient(top, #60a5fa 0%, #3b82f6 50%, #6366f1 100%);
  background: linear-gradient(180deg, #60a5fa 0%, #3b82f6 50%, #6366f1 100%);
}

/* 14~18 柱（高频泛音区：梦幻霓紫） */
.visualizer.style-bars .bar:nth-child(n+14) > .bar-fill {
  background: -webkit-linear-gradient(top, #818cf8 0%, #a855f7 55%, #c084fc 100%);
  background: linear-gradient(180deg, #818cf8 0%, #a855f7 55%, #c084fc 100%);
}
[data-theme="dark"] .visualizer.style-bars .bar:nth-child(n+14) > .bar-fill {
  background: -webkit-linear-gradient(top, #a78bfa 0%, #c084fc 50%, #e879f9 100%);
  background: linear-gradient(180deg, #a78bfa 0%, #c084fc 50%, #e879f9 100%);
}

/* 激活播放态：光晕与饱和度提升 */
.visualizer.style-bars.playing .bar-fill {
  opacity: 0.95;
}
.visualizer.style-bars.playing .bar:nth-child(-n+5) > .bar-fill {
  box-shadow: 0 0 8px rgba(0, 242, 254, 0.45);
}
.visualizer.style-bars.playing .bar:nth-child(n+6):nth-child(-n+13) > .bar-fill {
  box-shadow: 0 0 10px rgba(0, 122, 255, 0.55);
}
.visualizer.style-bars.playing .bar:nth-child(n+14) > .bar-fill {
  box-shadow: 0 0 8px rgba(168, 85, 247, 0.45);
}

[data-theme="dark"] .visualizer.style-bars.playing .bar:nth-child(-n+5) > .bar-fill {
  box-shadow: 0 0 10px rgba(34, 211, 238, 0.6), 0 0 2px rgba(255, 255, 255, 0.8);
}
[data-theme="dark"] .visualizer.style-bars.playing .bar:nth-child(n+6):nth-child(-n+13) > .bar-fill {
  box-shadow: 0 0 12px rgba(59, 130, 246, 0.65), 0 0 2px rgba(255, 255, 255, 0.8);
}
[data-theme="dark"] .visualizer.style-bars.playing .bar:nth-child(n+14) > .bar-fill {
  box-shadow: 0 0 10px rgba(168, 85, 247, 0.6), 0 0 2px rgba(255, 255, 255, 0.8);
}

/* ============================================================
   频谱样式二（style-dash）：三色流光柱（亮青 → 品红 → 薄荷绿）
   + 顶部浮动高光块。点击频谱区域可切换（见 app.js 的 cycleVisualizerStyle）
   ============================================================ */
/* 顶部留出高光块的空间，柱体相应矮一点，高光块才不会被裁掉 */
.visualizer.style-dash {
  padding-top: 10px;
}

.visualizer.style-dash .bar-cap {
  display: block;
}

/* 1~6 柱：亮青 */
.visualizer.style-dash .bar:nth-child(-n+6) > .bar-fill {
  background: -webkit-linear-gradient(top, #6ae8ff 0%, #00a6e0 100%);
  background: linear-gradient(180deg, #6ae8ff 0%, #00a6e0 100%);
}

/* 7~12 柱：品红 / 玫红 */
.visualizer.style-dash .bar:nth-child(n+7):nth-child(-n+12) > .bar-fill {
  background: -webkit-linear-gradient(top, #ff6fae 0%, #dd1466 100%);
  background: linear-gradient(180deg, #ff6fae 0%, #dd1466 100%);
}

/* 13~18 柱：薄荷绿 / 青绿 */
.visualizer.style-dash .bar:nth-child(n+13) > .bar-fill {
  background: -webkit-linear-gradient(top, #62f2c8 0%, #0bb489 100%);
  background: linear-gradient(180deg, #62f2c8 0%, #0bb489 100%);
}

.visualizer.style-dash.playing .bar-fill {
  opacity: 0.95;
}
.visualizer.style-dash.playing .bar:nth-child(-n+6) > .bar-fill {
  box-shadow: 0 0 9px rgba(0, 190, 255, 0.5);
}
.visualizer.style-dash.playing .bar:nth-child(n+7):nth-child(-n+12) > .bar-fill {
  box-shadow: 0 0 9px rgba(232, 30, 120, 0.5);
}
.visualizer.style-dash.playing .bar:nth-child(n+13) > .bar-fill {
  box-shadow: 0 0 9px rgba(16, 200, 150, 0.5);
}

/* 高光块只在「播放中且未静音」时点亮 */
.visualizer.style-dash.playing .bar-cap {
  opacity: 0.95;
}

/* ===== 两种样式共用的状态：静止 / 静音 ===== */
/* 静止/待机状态：底端微拱的静谧基线 */
.visualizer:not(.playing) .bar-fill {
  -webkit-transform: scaleY(0.08) translateZ(0);
  transform: scaleY(0.08) translateZ(0);
  opacity: 0.28;
}
.visualizer:not(.playing) .bar:nth-child(n+7):nth-child(-n+12) > .bar-fill {
  -webkit-transform: scaleY(0.14) translateZ(0);
  transform: scaleY(0.14) translateZ(0);
  opacity: 0.35;
}

/* 静音 / 倒车挂档静音状态 */
.visualizer.muted .bar-fill {
  -webkit-transform: scaleY(0.06) translateZ(0) !important;
  transform: scaleY(0.06) translateZ(0) !important;
  opacity: 0.16 !important;
}

/* 播放控制按钮组（间距用 margin，不依赖 flex gap） */
.player-controls {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: none;
}
.player-controls .glass-btn + .glass-btn {
  margin-left: var(--controls-gap, var(--space-lg));
}

/* ============================================================
   频谱上方大字电台频率展示 (Frameless Player Frequency Display above Visualizer)
   ============================================================ */
.player-freq-display {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 8px;
  margin-bottom: 12px;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  padding: 0 !important;
  white-space: nowrap;
  user-select: none;
  pointer-events: none;
  animation: pfdFadeIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

/* 当切换为收音机拟真仪表盘模式时，隐藏该显示，避免与液晶仪表盘重复 */
[data-player-style="radio"] .player-freq-display {
  display: none !important;
}

@keyframes pfdFadeIn {
  from { opacity: 0; transform: translateY(-4px) scale(0.96); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.player-freq-display .pfd-band {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, sans-serif;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.8px;
  line-height: 1;
  text-transform: uppercase;
  padding: 2.5px 8px;
  border-radius: 999px;
  background: rgba(56, 189, 248, 0.16);
  color: #38bdf8;
  border: 1px solid rgba(56, 189, 248, 0.42);
  box-shadow: 0 0 8px rgba(56, 189, 248, 0.25);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transform: translateY(-4px);
}

.player-freq-display.band-am .pfd-band {
  background: rgba(251, 191, 36, 0.16);
  color: #fbbf24;
  border-color: rgba(251, 191, 36, 0.42);
  box-shadow: 0 0 8px rgba(251, 191, 36, 0.25);
}

[data-theme="light"] .player-freq-display .pfd-band {
  background: rgba(2, 132, 199, 0.1);
  color: #0284c7;
  border-color: rgba(2, 132, 199, 0.35);
  box-shadow: none;
}
[data-theme="light"] .player-freq-display.band-am .pfd-band {
  background: rgba(217, 119, 6, 0.1);
  color: #d97706;
  border-color: rgba(217, 119, 6, 0.35);
  box-shadow: none;
}

.player-freq-display .pfd-num {
  font-family: "DIN Alternate", -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  font-size: 48px;
  font-weight: 900;
  color: #ffffff;
  line-height: 1;
  letter-spacing: -0.5px;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.7), 0 0 20px rgba(56, 189, 248, 0.25);
  font-variant-numeric: tabular-nums;
}

.player-freq-display.band-am .pfd-num {
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.7), 0 0 20px rgba(251, 191, 36, 0.25);
}

.player-freq-display.is-med .pfd-num {
  font-size: 42px;
  letter-spacing: -0.6px;
}

.player-freq-display.is-long .pfd-num {
  font-size: 36px;
  letter-spacing: -0.8px;
}

/* 自定义纯文字频率（如填了 LIVE, CCTV, 音乐 等非广播频段） */
.player-freq-display.is-custom-text .pfd-num {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "PingFang SC", "Microsoft YaHei", "Segoe UI", sans-serif;
  letter-spacing: 0.5px;
  font-variant-numeric: normal;
}
.player-freq-display.is-text-short .pfd-num {
  font-size: 44px;
}
.player-freq-display.is-text-med .pfd-num {
  font-size: 32px;
}
.player-freq-display.is-text-long .pfd-num {
  font-size: 24px;
}

[data-theme="light"] .player-freq-display .pfd-num {
  color: #0f172a;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.12);
}

.player-freq-display .pfd-unit {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", sans-serif;
  font-size: 14px;
  font-weight: 800;
  color: rgba(255, 255, 255, 0.78);
  letter-spacing: 1.2px;
  text-transform: uppercase;
}

[data-theme="light"] .player-freq-display .pfd-unit {
  color: #475569;
}

/* 圆形控制按钮（播放控制区 + 音量行收藏键）优化：浅色模式下增强立体感与边框对比度 */
.player-controls .glass-btn-circle:not(.glass-btn-accent),
.volume-control .glass-btn-circle:not(.glass-btn-accent) {
  background: linear-gradient(180deg, #ffffff 0%, #f4f5f8 100%);
  border: 1.5px solid rgba(0, 0, 0, 0.12);
  color: var(--text-primary);
  box-shadow:
    0 4px 16px rgba(0, 0, 0, 0.08),
    0 1px 3px rgba(0, 0, 0, 0.04),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
  transition:
    transform 0.18s var(--ease-spring),
    background 0.2s var(--ease-out),
    border-color 0.2s var(--ease-out),
    box-shadow 0.2s var(--ease-out),
    color 0.2s var(--ease-out);
}
.player-controls .glass-btn-circle:not(.glass-btn-accent):hover,
.volume-control .glass-btn-circle:not(.glass-btn-accent):hover {
  background: #ffffff;
  border-color: rgba(0, 122, 255, 0.5);
  color: var(--accent);
  box-shadow:
    0 8px 24px rgba(0, 122, 255, 0.2),
    0 2px 6px rgba(0, 0, 0, 0.06);
  transform: scale(1.06);
}
.player-controls .glass-btn-circle:not(.glass-btn-accent):active,
.volume-control .glass-btn-circle:not(.glass-btn-accent):active {
  transform: scale(0.93);
  background: #ebecef;
  border-color: rgba(0, 0, 0, 0.16);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

/* 播放主按钮（大圆）美化 */
.player-controls .glass-btn-circle.glass-btn-accent {
  background: linear-gradient(135deg, #007AFF 0%, #0056cc 100%);
  border: 1.5px solid rgba(255, 255, 255, 0.35);
  color: #ffffff;
  box-shadow:
    0 8px 28px rgba(0, 122, 255, 0.4),
    0 2px 8px rgba(0, 122, 255, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.35);
  transition:
    transform 0.18s var(--ease-spring),
    background 0.2s var(--ease-out),
    box-shadow 0.2s var(--ease-out);
}
.player-controls .glass-btn-circle.glass-btn-accent:hover {
  background: linear-gradient(135deg, #0A84FF 0%, #0060e6 100%);
  box-shadow:
    0 12px 36px rgba(0, 122, 255, 0.52),
    0 4px 12px rgba(0, 122, 255, 0.28);
  transform: scale(1.06);
}
.player-controls .glass-btn-circle.glass-btn-accent:active {
  transform: scale(0.93);
  box-shadow: 0 4px 16px rgba(0, 122, 255, 0.35);
}

/* 深色主题控制按钮适配 */
[data-theme="dark"] .player-controls .glass-btn-circle:not(.glass-btn-accent),
[data-theme="dark"] .volume-control .glass-btn-circle:not(.glass-btn-accent) {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.15) 0%, rgba(255, 255, 255, 0.08) 100%);
  border: 1.5px solid rgba(255, 255, 255, 0.18);
  color: #f5f5f7;
  box-shadow:
    0 6px 20px rgba(0, 0, 0, 0.45),
    inset 0 1px 0 rgba(255, 255, 255, 0.18);
}
[data-theme="dark"] .player-controls .glass-btn-circle:not(.glass-btn-accent):hover,
[data-theme="dark"] .volume-control .glass-btn-circle:not(.glass-btn-accent):hover {
  background: rgba(255, 255, 255, 0.24);
  border-color: var(--accent);
  color: var(--accent);
  box-shadow:
    0 8px 26px rgba(10, 132, 255, 0.35),
    0 2px 8px rgba(0, 0, 0, 0.4);
}
[data-theme="dark"] .player-controls .glass-btn-circle:not(.glass-btn-accent):active,
[data-theme="dark"] .volume-control .glass-btn-circle:not(.glass-btn-accent):active {
  background: rgba(255, 255, 255, 0.09);
  border-color: rgba(255, 255, 255, 0.22);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
}

[data-theme="dark"] .player-controls .glass-btn-circle.glass-btn-accent {
  background: linear-gradient(135deg, #0A84FF 0%, #0066d6 100%);
  border: 1.5px solid rgba(255, 255, 255, 0.25);
  box-shadow:
    0 8px 32px rgba(10, 132, 255, 0.45),
    inset 0 1px 0 rgba(255, 255, 255, 0.3);
}
[data-theme="dark"] .player-controls .glass-btn-circle.glass-btn-accent:hover {
  background: linear-gradient(135deg, #2b95ff 0%, #0074f0 100%);
  box-shadow:
    0 12px 40px rgba(10, 132, 255, 0.6),
    0 4px 14px rgba(10, 132, 255, 0.35);
}

/* 音量控制 */
.volume-control {
  display: flex;
  align-items: center;
  width: 100%;
  max-width: var(--vol-max, 280px);
  flex: none;
}
.volume-control > * + * {
  margin-left: var(--vol-gap, var(--space-sm));
}
.volume-control .vol-icon {
  font-size: var(--vol-icon, 18px);
  color: var(--text-secondary);
  cursor: pointer;
  flex: none;
  display: flex;
  align-items: center;
}
.volume-slider {
  flex: 1;
  /* 关键：range 有固有宽度（约 336px），不写 width 会把父链的 min-content 一路撑大，
     导致播放卡片被撑出屏幕、音量行右侧按钮被挤出可视区。用 0 基准宽度交给 flex 分配。 */
  width: 0;
  min-width: 0;
  -webkit-appearance: none;
  appearance: none;
  height: var(--vol-track-h, 4px);
  border-radius: 2px;
  background: var(--divider);
  outline: none;
  cursor: pointer;
}
.volume-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: var(--vol-thumb, 18px);
  height: var(--vol-thumb, 18px);
  border-radius: 50%;
  background: var(--accent);
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0, 122, 255, 0.3);
  transition: transform 0.15s var(--ease-spring);
}
.volume-slider::-webkit-slider-thumb:active {
  transform: scale(1.2);
}

/* 收藏按钮（并入音量行：圆形玻璃按钮，加大点按区域，紧邻播放控制） */
.volume-control .fav-btn {
  --btn-circle-size: var(--fav-btn-size, 48px);
  --btn-circle-font: var(--fav-btn-font, 21px);
  flex: none;
}
.volume-control .fav-btn.active {
  color: #FF3B30;
  border-color: rgba(255, 59, 48, 0.5);
}
[data-theme="dark"] .volume-control .fav-btn.active {
  color: #FF453A;
  border-color: rgba(255, 69, 58, 0.5);
}
.volume-control .fav-btn:active {
  transform: scale(0.93);
}

/* ============================================================
   6. 收藏快捷栏
   ============================================================ */
.favorites-section {
  flex: none;
}
.section-title {
  font-size: var(--fav-title-font, var(--font-size-sm));
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 0 var(--space-xs);
  margin-bottom: var(--space-sm);
}
.favorites-scroll {
  display: flex;
  overflow-x: auto;
  overflow-y: hidden;
  padding-bottom: var(--space-sm);
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.favorites-scroll > * + * {
  margin-left: var(--fav-gap, var(--space-md));
}
.favorites-scroll::-webkit-scrollbar {
  display: none;
}

.fav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
  flex: none;
  width: var(--fav-item-w, 80px);
  min-width: 76px;
  transition: transform var(--transition-fast);
}
.fav-item > * + * {
  margin-top: 5px;
}
.fav-item:active {
  transform: scale(0.92);
}
.fav-item .fav-icon {
  width: var(--fav-icon-size, 52px);
  height: var(--fav-icon-size, 52px);
  border-radius: 50%;
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1.5px solid var(--glass-border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--fav-icon-font, 24px);
  overflow: hidden;
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}
.fav-item .fav-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.fav-item.playing .fav-icon {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px var(--accent-light);
}
.fav-item .fav-name {
  font-size: var(--fav-name-font, 11.5px);
  color: var(--text-secondary);
  text-align: center;
  width: 100%;
  line-height: 1.3;
  height: 2.6em;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: normal;
  word-break: break-all;
}

/* ============================================================
   7. 播放列表
   ============================================================ */
.playlist-section {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
}

.playlist-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 var(--space-xs);
  margin-bottom: var(--space-sm);
  flex: none;
}
.playlist-header > * {
  white-space: nowrap;
}
.playlist-header .section-title {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.playlist-scroll {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  padding-bottom: env(safe-area-inset-bottom, 16px);
}

.playlist-item {
  display: block;
  padding: 10px 14px;
  margin-bottom: 6px;
  background: var(--surface);
  border: 1px solid var(--divider);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition:
    background-color var(--transition-fast),
    border-color var(--transition-fast),
    transform var(--transition-fast);
  animation: fadeSlideIn 0.3s var(--ease-out) both;
}
.playlist-item:hover {
  background: var(--glass-bg-hover);
  border-color: var(--accent-light);
}
.playlist-item:active {
  background: var(--accent-light);
}
.playlist-item.active {
  background: var(--accent-light);
  border-color: var(--accent);
}

.playlist-item .item-logo {
  display: none !important;
}
.playlist-item .item-logo img {
  display: none !important;
}

.playlist-item .item-info {
  width: 100%;
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.playlist-item .item-name {
  font-size: var(--item-name-font, 18px);
  font-weight: 600;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  white-space: normal;
  word-break: break-all;
  letter-spacing: 0.2px;
  flex: 1;
  min-width: 0;
}
.playlist-item .item-freq-pill {
  display: inline-flex;
  align-items: center;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 700;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  background: rgba(120, 120, 128, 0.12);
  color: var(--text-secondary);
  letter-spacing: 0.5px;
  flex: none;
  white-space: nowrap;
}
.playlist-item.active .item-freq-pill {
  background: rgba(0, 122, 255, 0.18);
  color: var(--accent);
}
.playlist-item .item-desc {
  display: none !important;
}

.playlist-item .item-playing {
  display: none;
}
.playlist-item.active .item-name {
  color: var(--accent);
}

/* 播放列表为空 */
.playlist-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: var(--space-2xl);
  color: var(--text-tertiary);
}
.playlist-empty .empty-icon {
  font-size: 48px;
  opacity: 0.5;
}
.playlist-empty .empty-text {
  font-size: var(--font-size-sm);
  margin-top: var(--space-sm);
}

@keyframes fadeSlideIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* 列表项交错动画 */
.playlist-item:nth-child(1) { animation-delay: 0.02s; }
.playlist-item:nth-child(2) { animation-delay: 0.04s; }
.playlist-item:nth-child(3) { animation-delay: 0.06s; }
.playlist-item:nth-child(4) { animation-delay: 0.08s; }
.playlist-item:nth-child(5) { animation-delay: 0.10s; }
.playlist-item:nth-child(6) { animation-delay: 0.12s; }
.playlist-item:nth-child(7) { animation-delay: 0.14s; }
.playlist-item:nth-child(8) { animation-delay: 0.16s; }
.playlist-item:nth-child(9) { animation-delay: 0.18s; }
.playlist-item:nth-child(10) { animation-delay: 0.20s; }

/* ============================================================
   8. Toast 通知
   ============================================================ */
.toast-container {
  position: fixed;
  top: var(--space-lg);
  left: 50%;
  transform: translateX(-50%);
  z-index: 9999;
  display: flex;
  flex-direction: column;
  pointer-events: none;
}
.toast-container > * + * {
  margin-top: var(--space-sm);
}
.toast {
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-round);
  padding: var(--space-sm) var(--space-lg);
  font-size: var(--font-size-sm);
  font-weight: 500;
  color: var(--text-primary);
  box-shadow: 0 8px 32px rgba(0,0,0,0.12);
  animation: toastIn 0.35s var(--ease-spring) both;
  pointer-events: auto;
}
.toast.out {
  animation: toastOut 0.25s var(--ease-out) both;
}
@keyframes toastIn {
  from { opacity: 0; transform: translateY(-20px) scale(0.9); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes toastOut {
  from { opacity: 1; transform: translateY(0) scale(1); }
  to { opacity: 0; transform: translateY(-10px) scale(0.95); }
}

/* ============================================================
   9. 加载状态
   ============================================================ */
.loading-spinner {
  width: 24px;
  height: 24px;
  border: 3px solid var(--divider);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin {
  to { transform: rotate(360deg); }
}

.skeleton {
  background: linear-gradient(90deg, var(--surface) 25%, var(--divider) 50%, var(--surface) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: var(--radius-sm);
}
@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ============================================================
   10. 竖屏手机布局（默认）
   ============================================================ */
@media (orientation: portrait) {
  .top-bar {
    padding-top: env(safe-area-inset-top, 8px);
    padding-bottom: 2px;
    min-height: 40px;
  }

  /* 竖屏隐藏顶部横向分类胶囊条，将空间释放给下方电台浏览器 */
  .category-bar {
    display: none !important;
  }

  .content-body {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
  }
  .content-body > * + * {
    margin-top: 0;
  }

  /* 紧凑精致的播放器卡片，为下方列表腾出更多纵向可视空间 */
  .player-card {
    margin-bottom: 0;
    flex: none;
    padding: 10px 14px 12px;
    gap: 4px;
    border-radius: var(--radius-lg);
  }
  .player-card .station-info {
    margin-bottom: 2px;
  }
  .player-card .player-freq-display {
    margin-bottom: 2px;
    gap: 6px;
  }
  .player-card .player-freq-display .pfd-num {
    font-size: 32px;
  }
  .player-card .visualizer {
    --viz-h: 26px;
    margin: 2px 0;
  }
  .player-card .player-controls {
    margin: 2px 0;
  }
  .player-card .volume-control {
    margin-top: 2px;
  }

  /* ===== 拟真收音机风格（radio）在竖屏下的极致紧凑瘦身优化 ===== */
  [data-player-style="radio"] .player-card {
    padding: 6px 10px 6px !important;
    gap: 2px !important;
    border-radius: 16px !important;
    margin-bottom: 2px !important;
  }

  [data-player-style="radio"] .radio-tuner-panel {
    padding: 8px 12px 8px !important;
    border-radius: 14px !important;
  }

  /* 1. 顶部规格行：隐藏多余标识，单行紧凑不折行 */
  [data-player-style="radio"] .retro-cockpit-header {
    padding-bottom: 4px !important;
    margin-bottom: 4px !important;
    border-bottom-color: rgba(255, 255, 255, 0.04) !important;
  }

  [data-player-style="radio"] .retro-brand-name {
    font-size: 10.5px !important;
    letter-spacing: 0.12em !important;
    white-space: nowrap !important;
  }

  [data-player-style="radio"] .stereo-lock-text,
  [data-player-style="radio"] .stereo-divider {
    display: none !important;
  }

  [data-player-style="radio"] .retro-stereo-capsule {
    padding: 1.5px 7px !important;
    gap: 4px !important;
  }

  [data-player-style="radio"] .retro-stereo-capsule .stereo-text {
    font-size: 9px !important;
    letter-spacing: 0.08em !important;
  }

  [data-player-style="radio"] .retro-band-pill {
    font-size: 9px !important;
    padding: 1px 5px !important;
  }

  /* 2. 核心主频区极简紧凑化 */
  [data-player-style="radio"] .retro-hero-stage {
    padding: 1px 0 3px !important;
  }

  [data-player-style="radio"] .retro-freq-val {
    font-size: 38px !important;
    line-height: 1 !important;
  }

  [data-player-style="radio"] .retro-freq-unit {
    font-size: 12px !important;
  }

  [data-player-style="radio"] .retro-station-meta {
    margin-top: 2px !important;
    gap: 6px !important;
    max-width: 96% !important;
  }

  [data-player-style="radio"] .retro-station-name {
    font-size: 13.5px !important;
    max-width: 140px !important;
  }

  [data-player-style="radio"] .retro-station-desc {
    font-size: 11px !important;
    max-width: 150px !important;
  }

  /* 3. 刻度标尺紧凑化 */
  [data-player-style="radio"] .retro-ruler-card {
    --track-pad: 8px;
    padding: 4px 8px 3px !important;
    margin-top: 2px !important;
    gap: 2px !important;
    border-radius: 9px !important;
  }

  [data-player-style="radio"] .retro-ruler-numbers {
    font-size: 9px !important;
    padding: 0 var(--track-pad, 8px) !important;
  }

  [data-player-style="radio"] .retro-track-ticks {
    padding: 0 var(--track-pad, 8px) !important;
  }

  [data-player-style="radio"] .retro-tuning-track {
    height: 16px !important;
  }

  [data-player-style="radio"] .retro-tuning-needle {
    height: 20px !important;
  }

  [data-player-style="radio"] .needle-body {
    width: 2px !important;
  }

  [data-player-style="radio"] .retro-track-ticks .tick-l {
    height: 9px !important;
  }

  [data-player-style="radio"] .retro-track-ticks .tick-m {
    height: 6px !important;
  }

  [data-player-style="radio"] .retro-track-ticks .tick-s {
    height: 3px !important;
  }

  /* 4. 旋钮与步进键瘦身 */
  [data-player-style="radio"] .retro-rotor-controls {
    margin-top: 4px !important;
    gap: 18px !important;
  }

  [data-player-style="radio"] .retro-step-btn {
    width: 34px !important;
    height: 34px !important;
    border-radius: 9px !important;
  }

  [data-player-style="radio"] .retro-step-icon {
    width: 16px !important;
    height: 16px !important;
  }

  [data-player-style="radio"] .retro-rotor-outer {
    width: 50px !important;
    height: 50px !important;
    padding: 2px !important;
  }

  [data-player-style="radio"] .retro-rotor-inner {
    padding: 2px !important;
  }

  [data-player-style="radio"] .retro-rotor-indicator-dot {
    top: 2px !important;
    width: 4px !important;
    height: 4px !important;
  }

  [data-player-style="radio"] .retro-rotor-center {
    width: 20px !important;
    height: 20px !important;
  }

  [data-player-style="radio"] .retro-rotor-core {
    width: 5px !important;
    height: 5px !important;
  }

  /* 5. 音量行紧凑化 */
  [data-player-style="radio"] .volume-control {
    margin-top: 4px !important;
    padding: 0 2px !important;
  }

  [data-player-style="radio"] .volume-control .fav-btn {
    min-width: 56px !important;
    height: 30px !important;
    padding: 0 8px !important;
    border-radius: 8px !important;
    gap: 4px !important;
  }

  [data-player-style="radio"] .volume-control .fav-btn .ico {
    width: 14px !important;
    height: 14px !important;
  }

  [data-player-style="radio"] .volume-control .fav-btn .retro-fav-label {
    font-size: 9.5px !important;
  }

  /* 6. 底部预设收藏栏紧凑化 */
  [data-player-style="radio"] .favorites-section.portrait-only {
    margin-top: 0 !important;
    margin-bottom: 2px !important;
    padding-bottom: calc(4px + env(safe-area-inset-bottom, 0px)) !important;
  }

  [data-player-style="radio"] .favorites-section .section-title {
    margin-bottom: 3px !important;
    padding: 0 2px !important;
  }

  [data-player-style="radio"] .favorites-scroll {
    gap: 7px !important;
    padding: 2px 2px 3px !important;
  }

  [data-player-style="radio"] .retro-preset-btn {
    min-width: 120px !important;
    max-width: 140px !important;
    height: 40px !important;
    padding: 4px 8px !important;
    border-radius: 9px !important;
  }

  [data-player-style="radio"] .retro-preset-freq {
    font-size: 13.5px !important;
  }

  [data-player-style="radio"] .retro-preset-band {
    font-size: 8px !important;
  }

  [data-player-style="radio"] .retro-preset-name {
    font-size: 10px !important;
    max-width: 80px !important;
    margin-top: 1px !important;
  }

  [data-player-style="radio"] .retro-preset-led {
    width: 5px !important;
    height: 5px !important;
  }

  /* 浏览区域左右分栏：左边分类垂直滚动，右边电台高密度垂直滚动 */
  .stations-browser {
    flex: 1;
    display: flex;
    flex-direction: row;
    gap: 6px;
    min-height: 0;
    overflow: hidden;
  }

  /* 左栏：分类垂直列表 */
  /* 左栏：分类垂直列表（大字大图标，清晰易触控） */
  .portrait-categories-col {
    width: clamp(112px, 31vw, 130px);
    flex: 0 0 clamp(112px, 31vw, 130px);
    display: flex;
    flex-direction: column;
    min-height: 0;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    overflow: hidden;
    padding: 6px 5px;
  }
  .portrait-categories-col .categories-header {
    font-size: 13.5px;
    font-weight: 800;
    color: var(--text-tertiary);
    padding: 4px 8px 6px;
    flex: none;
    letter-spacing: 0.5px;
  }
  .portrait-categories {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
    gap: 4px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .portrait-categories::-webkit-scrollbar {
    display: none;
  }
  .portrait-categories .cat-item {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 8px;
    min-height: 44px;
    border-radius: 8px;
    cursor: pointer;
    color: var(--text-secondary);
    transition: background-color var(--transition-fast), color var(--transition-fast);
    font-size: 15.5px;
    font-weight: 700;
  }
  .portrait-categories .cat-item .cat-icon {
    font-size: 17px;
    flex: none;
  }
  .portrait-categories .cat-item .cat-name {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 1;
    min-width: 0;
    line-height: 1.25;
    font-size: 15.5px;
    font-weight: 700;
  }
  .portrait-categories .cat-item:active {
    background: var(--glass-bg-hover);
  }
  .portrait-categories .cat-item.active {
    background: rgba(0, 122, 255, 0.16);
    color: var(--accent);
    font-weight: 800;
  }
  [data-theme="dark"] .portrait-categories .cat-item.active {
    background: rgba(10, 132, 255, 0.28);
    color: #38bdf8;
  }

  /* 右栏：电台大字清晰列表 */
  .playlist-section {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    min-height: 0;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    overflow: hidden;
    padding: 6px 8px;
  }

  .playlist-header {
    margin-bottom: 4px;
    flex: none;
    padding: 3px 6px 5px;
  }
  .playlist-header .section-title {
    font-size: 14px;
    font-weight: 800;
  }

  .playlist-scroll {
    display: flex;
    flex-direction: column;
    gap: 5px;
    flex: 1;
    min-height: 0;
    max-height: none;
    overflow-y: auto;
    overflow-x: hidden;
    padding-bottom: 4px;
    -webkit-overflow-scrolling: touch;
  }

  .playlist-item {
    width: 100%;
    min-width: 0;
    min-height: 48px;
    box-sizing: border-box;
    border: 1px solid var(--divider);
    background: var(--surface);
    border-radius: 9px;
    padding: 8px 12px;
    display: flex;
    align-items: center;
    margin-bottom: 0;
    cursor: pointer;
    transition: background-color var(--transition-fast), border-color var(--transition-fast);
  }

  .playlist-item:active {
    background: var(--accent-light);
  }

  .playlist-item.active {
    background: var(--accent-light);
    border-color: var(--accent);
  }

  .playlist-item .item-info {
    width: 100%;
    min-width: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
  }

  .playlist-item .item-name {
    font-size: 17px;
    font-weight: 700;
    line-height: 1.35;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    letter-spacing: 0.2px;
    flex: 1;
    min-width: 0;
  }

  .playlist-item.active .item-name {
    color: var(--accent);
  }

  .playlist-item .item-freq-pill {
    flex: none;
    padding: 2.5px 7px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 800;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    background: rgba(120, 120, 128, 0.12);
    color: var(--text-secondary);
    letter-spacing: 0.4px;
    white-space: nowrap;
  }

  .playlist-item.active .item-freq-pill {
    background: rgba(0, 122, 255, 0.18);
    color: var(--accent);
  }

  .playlist-empty {
    width: 100%;
    min-width: 0;
    padding: var(--space-md);
  }

  /* 车机侧栏在竖屏模式隐藏 */
  .sidebar {
    display: none;
  }

  .main-content {
    --main-gap: var(--space-xs);
    overflow: hidden;
    padding-bottom: env(safe-area-inset-bottom, 0px);
  }

  .volume-control {
    max-width: 100%;
  }

  .favorites-section.portrait-only {
    flex: none;
    margin-top: -2px;
    margin-bottom: 6px;
    padding-bottom: calc(10px + env(safe-area-inset-bottom, 0px));
  }

  .favorites-section.portrait-only .section-title {
    margin-bottom: 6px;
  }

  .favorites-section.portrait-only .favorites-scroll {
    padding-bottom: 0;
  }
}

/* 竖屏矮窗口（如竖向画中画）：优先保播放控件，压缩装饰元素 */
@media (orientation: portrait) and (max-height: 560px) {
  :root {
    --logo-size: 56px;
    --logo-font: 26px;
    --station-font: var(--font-size-lg);
    --viz-h: 28px;
    --btn-circle-size: 54px;
    --btn-circle-font: 20px;
    --btn-play-size: 68px;
    --btn-play-font: 26px;
  }
  .player-card {
    --card-pad: var(--space-md);
    --card-gap: var(--space-sm);
    --center-gap: var(--space-sm);
  }
  .favorites-section.portrait-only .fav-item .fav-icon {
    width: 44px;
    height: 44px;
    font-size: 20px;
  }
  .favorites-section.portrait-only .fav-item {
    width: 76px;
  }
}

@media (orientation: portrait) and (max-height: 430px) {
  :root {
    --logo-size: 44px;
    --logo-font: 20px;
    --viz-h: 0px;
    --viz-display: none;
    --btn-circle-size: 48px;
    --btn-circle-font: 18px;
    --btn-play-size: 60px;
    --btn-play-font: 23px;
    --fav-btn-size: 42px;
    --fav-btn-font: 18px;
  }
  .station-desc {
    display: none;
  }
  .favorites-section.portrait-only {
    display: none;
  }
}

@media (max-width: 480px) and (orientation: portrait) {
  .player-freq-display {
    gap: 6px;
    margin-bottom: 8px;
  }
  .player-freq-display .pfd-band {
    font-size: 11.5px;
    padding: 2px 6.5px;
    transform: translateY(-3px);
  }
  .player-freq-display .pfd-num {
    font-size: 40px;
  }
  .player-freq-display.is-med .pfd-num {
    font-size: 34px;
  }
  .player-freq-display.is-long .pfd-num {
    font-size: 28px;
  }
  .player-freq-display.is-text-short .pfd-num { font-size: 35px; }
  .player-freq-display.is-text-med .pfd-num { font-size: 27px; }
  .player-freq-display.is-text-long .pfd-num { font-size: 20px; }
  .player-freq-display .pfd-unit {
    font-size: 12px;
    letter-spacing: 0.8px;
  }
}

/* ============================================================
   11. 横屏 / 车机布局
   ── 尺寸全部由 --l-* 令牌驱动，令牌只用纯 px（老 WebView 也能解析）
   ── 分档：先按高度（纵向预算），再按宽度（横向预算），互不重叠
   ============================================================ */
@media (orientation: landscape) {
  :root {
    /* 结构 */
    --l-side-w: 236px;
    --l-pad-x: 16px;
    --l-pad-y: 16px;
    --l-card-pad: 24px;
    --l-card-pad-x: 24px;
    --l-panel-pad: 16px;
    --l-toggle: 36px;

    /* 文字 */
    --l-title-font: 24px;
    --l-cat-font: 22px;
    --l-cat-icon: 24px;
    --l-cat-min-h: 56px;
    --l-station-font: 26px;
    --l-station-desc-font: 13px;
    --l-list-font: 21px;
    --l-list-min-h: 52px;
    --l-list-pad-y: 12px;
    --l-fav-title-font: 15px;
    --l-fav-name-font: 13px;

    /* 播放卡片 */
    --l-logo-size: 76px;
    --l-logo-font: 34px;
    --l-center-gap: 22px;
    --l-viz-h: 58px;
    --l-viz-bar: 5px;
    --l-viz-gap: 5px;
    --l-vol-max: 340px;
    --l-vol-gap: 14px;
    --l-vol-icon: 20px;
    --l-vol-track-h: 6px;
    --l-vol-thumb: 22px;

    /* 控件尺寸：画中画下必须守住的视觉尺寸 */
    --l-ctl-side: 76px;
    --l-ctl-play: 100px;
    --l-ctl-side-font: 30px;
    --l-ctl-play-font: 38px;
    --l-ctl-fav: 56px;
    --l-ctl-fav-font: 26px;
    --l-ctl-gap: 28px;

    /* 收藏条 */
    --l-fav-icon: 68px;
    --l-fav-icon-font: 30px;
    --l-fav-item-w: 92px;
    --l-fav-gap: 24px;
    --l-fav-reserve: 176px;

    /* 可见性开关 */
    --l-viz-display: flex;
    --l-fav-display: block;
    --l-sidefav-display: none;
  }

  /* --- 大屏（宽 ≥1280 且高 ≥620）才做流式放大 ---
     放在所有分档之前：一旦命中下面的分档，分档的纯 px值会覆盖它。
     整块包在 @supports 内，老 WebView 直接跳过 → 用上面的纯 px 值。 */
  @supports (width: clamp(1px, 1px, 2px)) {
    @media (min-width: 1280px) and (min-height: 620px) {
      :root {
        --l-side-w: clamp(236px, 16vw, 320px);
        --l-pad-x: clamp(16px, 1.4vw, 26px);
        --l-pad-y: clamp(16px, 2vh, 26px);
        --l-card-pad: clamp(24px, 2.6vh, 32px);
        --l-card-pad-x: clamp(24px, 2.6vh, 40px);
        --l-cat-font: clamp(21px, 1.6vw, 26px);
        --l-title-font: clamp(24px, 2vw, 32px);
        --l-station-font: clamp(26px, 2.1vw, 36px);
        --l-list-font: clamp(20px, 1.45vw, 25px);
        --l-logo-size: clamp(76px, 9vh, 110px);
        --l-logo-font: clamp(34px, 4vh, 48px);
        --l-center-gap: clamp(22px, 3vh, 38px);
        --l-viz-h: clamp(58px, 8vh, 84px);
        --l-viz-bar: clamp(5px, 0.45vw, 8px);
        --l-viz-gap: clamp(5px, 0.45vw, 8px);
        --l-vol-max: clamp(340px, 30vw, 520px);
        --l-ctl-side: clamp(76px, min(7vw, 11vh), 116px);
        --l-ctl-play: clamp(100px, min(9.5vw, 15vh), 148px);
        --l-ctl-side-font: clamp(30px, min(2.8vw, 4.2vh), 44px);
        --l-ctl-play-font: clamp(38px, min(3.8vw, 6vh), 58px);
        --l-ctl-fav: clamp(56px, min(5.4vw, 8.4vh), 84px);
        --l-ctl-fav-font: clamp(26px, min(2.4vw, 3.6vh), 38px);
        --l-ctl-gap: clamp(28px, 3.2vw, 64px);
        --l-fav-icon: clamp(68px, 8vh, 96px);
        --l-fav-icon-font: clamp(30px, 3.6vh, 44px);
        --l-fav-item-w: clamp(92px, 7vw, 128px);
        --l-fav-gap: clamp(24px, 2.2vw, 40px);
        --l-fav-reserve: clamp(176px, 22vh, 250px);
      }
    }
  }

  /* ---------- 高度分档：控制纵向预算 ---------- */
  /* ≤620px：常见车机横屏小窗 */
  @media (max-height: 620px) {
    :root {
      --l-pad-y: 14px;
      --l-card-pad: 20px;
      --l-center-gap: 18px;
      --l-logo-size: 68px;
      --l-logo-font: 30px;
      --l-viz-h: 48px;
      --l-ctl-side: 68px;
      --l-ctl-play: 90px;
      --l-ctl-side-font: 28px;
      --l-ctl-play-font: 34px;
      --l-ctl-fav: 52px;
      --l-ctl-fav-font: 24px;
      --l-fav-icon: 58px;
      --l-fav-icon-font: 26px;
      --l-fav-item-w: 82px;
      --l-fav-reserve: 150px;
      --l-list-min-h: 50px;
      --l-list-pad-y: 14px;
    }
  }
  /* ≤520px */
  @media (max-height: 520px) {
    :root {
      --l-pad-y: 12px;
      --l-card-pad: 16px;
      --l-center-gap: 15px;
      --l-logo-size: 62px;
      --l-logo-font: 28px;
      --l-viz-h: 38px;
      --l-ctl-side: 62px;
      --l-ctl-play: 80px;
      --l-ctl-side-font: 26px;
      --l-ctl-play-font: 30px;
      --l-ctl-fav: 48px;
      --l-ctl-fav-font: 22px;
      --l-fav-icon: 52px;
      --l-fav-icon-font: 24px;
      --l-fav-item-w: 74px;
      --l-fav-reserve: 130px;
      --l-list-min-h: 46px;
      --l-list-pad-y: 12px;
    }
  }
  /* ≤440px：牺牲声波，保住控件 */
  @media (max-height: 440px) {
    :root {
      --l-pad-y: 10px;
      --l-card-pad: 14px;
      --l-center-gap: 12px;
      --l-logo-size: 54px;
      --l-logo-font: 24px;
      --l-viz-h: 0px;
      --l-viz-display: none;
      --l-ctl-side: 56px;
      --l-ctl-play: 72px;
      --l-ctl-side-font: 24px;
      --l-ctl-play-font: 28px;
      --l-ctl-fav: 44px;
      --l-ctl-fav-font: 20px;
      --l-fav-icon: 46px;
      --l-fav-icon-font: 22px;
      --l-fav-item-w: 66px;
      --l-fav-reserve: 112px;
      --l-list-min-h: 42px;
      --l-list-pad-y: 10px;
    }
  }
  /* ≤370px */
  @media (max-height: 370px) {
    :root {
      --l-pad-y: 8px;
      --l-card-pad: 12px;
      --l-center-gap: 10px;
      --l-logo-size: 48px;
      --l-logo-font: 22px;
      --l-ctl-side: 52px;
      --l-ctl-play: 66px;
      --l-ctl-side-font: 22px;
      --l-ctl-play-font: 26px;
      --l-ctl-fav: 40px;
      --l-ctl-fav-font: 18px;
      --l-fav-icon: 40px;
      --l-fav-icon-font: 20px;
      --l-fav-item-w: 58px;
      --l-fav-reserve: 96px;
      --l-list-min-h: 38px;
      --l-list-pad-y: 9px;
    }
  }
  /* ≤310px：极矮窗口，收藏条移到侧栏，卡片底部不再预留 */
  @media (max-height: 310px) {
    :root {
      --l-pad-y: 6px;
      --l-card-pad: 10px;
      --l-center-gap: 8px;
      --l-logo-size: 40px;
      --l-logo-font: 18px;
      --l-ctl-side: 48px;
      --l-ctl-play: 60px;
      --l-ctl-side-font: 20px;
      --l-ctl-play-font: 24px;
      --l-ctl-fav: 38px;
      --l-ctl-fav-font: 17px;
      --l-fav-reserve: 8px;
      --l-fav-display: none;
      --l-sidefav-display: block;
      --l-list-min-h: 34px;
      --l-list-pad-y: 8px;
    }
  }

  /* ---------- 宽度分档：控制横向预算 ---------- */
  @media (max-width: 1280px) {
    :root {
      --l-side-w: 226px;
      --l-pad-x: 16px;
      --l-card-pad-x: 24px;
      --l-panel-pad: 16px;
      --l-cat-font: 21px;
      --l-cat-icon: 23px;
      --l-cat-min-h: 54px;
      --l-station-font: 26px;
      --l-station-desc-font: 13px;
      --l-list-font: 20px;
      --l-title-font: 16px;
      --l-fav-title-font: 15px;
      --l-fav-name-font: 13px;
      --l-ctl-gap: 28px;
      --l-vol-max: 340px;
      --l-vol-icon: 20px;
    }
  }
  @media (max-width: 1080px) {
    :root {
      --l-side-w: 216px;
      --l-pad-x: 14px;
      --l-card-pad-x: 20px;
      --l-panel-pad: 14px;
      --l-toggle: 32px;
      --l-cat-font: 20px;
      --l-cat-icon: 22px;
      --l-cat-min-h: 50px;
      --l-station-font: 24px;
      --l-list-font: 19px;
      --l-title-font: 15.5px;
      --l-ctl-gap: 24px;
      --l-vol-max: 300px;
    }
  }
  @media (max-width: 900px) {
    :root {
      --l-side-w: 196px;
      --l-pad-x: 12px;
      --l-card-pad-x: 18px;
      --l-panel-pad: 12px;
      --l-toggle: 30px;
      --l-cat-font: 19px;
      --l-cat-icon: 21px;
      --l-cat-min-h: 46px;
      --l-station-font: 22px;
      --l-station-desc-font: 12px;
      --l-list-font: 18px;
      --l-title-font: 15px;
      --l-fav-title-font: 14px;
      --l-fav-name-font: 12px;
      --l-ctl-gap: 20px;
      --l-vol-max: 260px;
      --l-vol-icon: 18px;
    }
  }
  @media (max-width: 760px) {
    :root {
      --l-side-w: 186px;
      --l-pad-x: 10px;
      --l-card-pad-x: 14px;
      --l-panel-pad: 10px;
      --l-toggle: 28px;
      --l-cat-font: 17px;
      --l-cat-icon: 19px;
      --l-cat-min-h: 42px;
      --l-station-font: 20px;
      --l-station-desc-font: 11px;
      --l-list-font: 16px;
      --l-title-font: 14.5px;
      --l-ctl-gap: 16px;
      --l-vol-max: 220px;
    }
  }
  @media (max-width: 620px) {
    :root {
      --l-side-w: 172px;
      --l-pad-x: 8px;
      --l-card-pad-x: 12px;
      --l-panel-pad: 8px;
      --l-toggle: 26px;
      --l-cat-font: 16px;
      --l-cat-icon: 17px;
      --l-cat-min-h: 38px;
      --l-station-font: 18px;
      --l-list-font: 15px;
      --l-title-font: 14px;
      --l-ctl-gap: 14px;
      --l-vol-max: 180px;
    }
  }

  /* ---------- 布局 ---------- */
  #app {
    flex-direction: row;
  }

  .top-bar {
    display: none;
  }

  /* 左侧栏：仅分组 */
  .sidebar {
    display: flex;
    flex-direction: column;
    width: var(--l-side-w);
    align-self: stretch;
    min-height: 0;
    margin: var(--l-pad-y) 0 var(--l-pad-y) var(--l-pad-x);
    padding: var(--l-panel-pad);
    flex: none;
    overflow: hidden;
    border-right: 1px solid var(--divider);
  }
  .sidebar > * + * {
    margin-top: var(--space-md);
  }

  .sidebar .sidebar-title {
    font-size: var(--l-title-font);
    font-weight: 700;
    padding: var(--space-xs) 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex: none;
    gap: 6px;
  }
  .sidebar .sidebar-app-title,
  .sidebar .sidebar-title > span {
    font-size: var(--l-title-font);
    font-weight: 700;
    letter-spacing: -0.2px;
    text-decoration: none;
    color: inherit;
    cursor: pointer;
    white-space: nowrap;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    line-height: 1.2;
  }
  .sidebar .sidebar-app-title:hover {
    color: var(--accent);
  }
  .sidebar .sidebar-title-actions {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-shrink: 0;
  }
  /* 侧栏主题按钮 */
  .sidebar .sidebar-title .icon-btn {
    flex: none;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--surface);
    border: none;
    color: var(--text-secondary);
    font-size: 13px;
    cursor: pointer;
    transition: background-color var(--transition-fast), color var(--transition-fast);
  }
  .sidebar .sidebar-title .icon-btn:hover {
    background: var(--accent-light);
    color: var(--accent);
  }

  .sidebar .category-list {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    min-height: 0;
  }
  .sidebar .category-list > * + * {
    margin-top: var(--space-sm);
  }
  .sidebar .category-list::-webkit-scrollbar {
    display: none;
  }

  .sidebar .cat-item {
    display: flex;
    align-items: center;
    padding: 12px 14px;
    background: var(--surface);
    border: 1px solid var(--divider);
    border-radius: var(--radius-md);
    cursor: pointer;
    font-size: var(--l-cat-font);
    font-weight: 600;
    color: var(--text-primary);
    opacity: 0.88;
    transition:
      background-color var(--transition-fast),
      border-color var(--transition-fast),
      opacity var(--transition-fast),
      transform var(--transition-fast);
    min-height: var(--l-cat-min-h);
    flex: none;
  }
  .sidebar .cat-item:hover {
    background: var(--glass-bg-hover);
    border-color: var(--accent-light);
    color: var(--text-primary);
    opacity: 1;
  }
  .sidebar .cat-item.active {
    background: var(--accent-light);
    border-color: var(--accent);
    color: var(--accent);
    font-weight: 700;
    opacity: 1;
  }
  .sidebar .cat-item .cat-icon {
    font-size: var(--l-cat-icon);
    width: var(--l-cat-icon);
    text-align: center;
    flex: none;
  }
  /* 分类名（app.js 输出的是 .cat-icon 后面的裸 <span>） */
  .sidebar .cat-item .cat-icon + span {
    margin-left: 10px;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    letter-spacing: 0.3px;
  }

  /* 收藏列表：默认隐藏，只在极矮窗口（收藏条被移除）时接管 */
  .sidebar .sidebar-favs {
    display: var(--l-sidefav-display);
    flex: none;
    min-height: 0;
    overflow-y: auto;
  }
  .sidebar .fav-list-item {
    display: flex;
    align-items: center;
    padding: 6px 8px;
    border-radius: var(--radius-sm);
    font-size: var(--l-list-font);
    color: var(--text-secondary);
    cursor: pointer;
    user-select: none;
  }
  .sidebar .fav-list-item:hover,
  .sidebar .fav-list-item.playing {
    background: var(--accent-light);
    color: var(--accent);
  }
  .sidebar .fav-list-item .fav-small-icon {
    flex: none;
    width: 22px;
    height: 22px;
    margin-right: var(--space-sm);
    border-radius: 50%;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
  }
  .sidebar .fav-list-item .fav-small-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
  }

  /* 横屏时分类标签栏隐藏 */
  .category-bar {
    display: none;
  }

  /* 主内容区 */
  .main-content {
    position: relative;
    flex: 1;
    flex-direction: column;
    padding: var(--l-pad-y) var(--l-pad-x);
    min-height: 0;
    min-width: 0;
  }
  .main-content > * + * {
    margin-top: var(--l-pad-y);
  }

  /* 播放器 + 列表并排 */
  .content-body {
    flex: 1;
    display: flex;
    min-height: 0;
  }
  .content-body > * + * {
    margin-top: 0;
    margin-left: var(--l-pad-x);
  }

  /* 中间主卡片：底部为收藏横向区域预留空间，视觉上保持单卡片 */
  .player-card {
    --card-pad: var(--l-card-pad);
    --card-gap: var(--l-center-gap);
    flex: 1;
    min-width: 0;
    min-height: 0;
    position: relative;
    display: flex;
    flex-direction: column;
    padding: var(--l-card-pad) var(--l-card-pad-x) calc(var(--l-card-pad) + var(--l-fav-reserve));
  }

  /* 播放卡片内垂直居中控制区 */
  .player-center {
    --center-gap: var(--l-center-gap);
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
  }

  /* 电台信息 */
  .station-logo {
    --logo-size: var(--l-logo-size);
    --logo-font: var(--l-logo-font);
  }
  .station-name {
    font-size: var(--l-station-font);
  }
  .station-desc {
    font-size: var(--l-station-desc-font);
  }

  /* 声波可视化 */
  .visualizer {
    --viz-h: var(--l-viz-h);
    --viz-display: var(--l-viz-display);
    --viz-bar-w: var(--l-viz-bar);
    --viz-gap: var(--l-viz-gap);
  }

  /* 控制按钮：尺寸全部来自纯 px 令牌 */
  .player-controls {
    --controls-gap: var(--l-ctl-gap);
  }
  .player-controls .glass-btn-circle {
    --btn-circle-size: var(--l-ctl-side);
    --btn-circle-font: var(--l-ctl-side-font);
    min-width: var(--l-ctl-side);
    min-height: var(--l-ctl-side);
  }
  .player-controls .glass-btn-circle.large {
    --btn-play-size: var(--l-ctl-play);
    --btn-play-font: var(--l-ctl-play-font);
    min-width: var(--l-ctl-play);
    min-height: var(--l-ctl-play);
  }

  /* 车机横屏大屏下频率更醒目大气 */
  .player-freq-display {
    gap: 10px;
    margin-bottom: 12px;
  }
  .player-freq-display .pfd-band {
    font-size: 14px;
    padding: 2.5px 9px;
    transform: translateY(-4px);
  }
  .player-freq-display .pfd-num {
    font-size: 54px;
  }
  .player-freq-display.is-med .pfd-num {
    font-size: 45px;
  }
  .player-freq-display.is-long .pfd-num {
    font-size: 38px;
  }
  .player-freq-display.is-text-short .pfd-num { font-size: 46px; }
  .player-freq-display.is-text-med .pfd-num { font-size: 36px; }
  .player-freq-display.is-text-long .pfd-num { font-size: 26px; }
  .player-freq-display .pfd-unit {
    font-size: 16px;
    letter-spacing: 1.5px;
  }

  /* 音量控制 */
  .volume-control {
    --vol-max: var(--l-vol-max);
    --vol-gap: var(--l-vol-gap);
    --vol-icon: var(--l-vol-icon);
    --vol-track-h: var(--l-vol-track-h);
    --vol-thumb: var(--l-vol-thumb);
    --fav-btn-size: var(--l-ctl-fav);
    --fav-btn-font: var(--l-ctl-fav-font);
  }

  /* 收藏栏叠加到中间主卡片底部，不再独立成第二张卡 */
  .favorites-section.portrait-only {
    display: var(--l-fav-display);
    position: absolute;
    left: calc(var(--l-pad-x) + var(--l-card-pad-x));
    right: calc(var(--l-side-w) + (var(--l-pad-x) * 2) + var(--l-card-pad-x));
    bottom: calc(var(--l-pad-y) + var(--l-card-pad));
    width: auto;
    max-width: none;
    min-width: 0;
    background: transparent;
    border: none;
    border-radius: 0;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    padding: 0;
    z-index: 4;
  }

  .favorites-section.portrait-only .section-title {
    --fav-title-font: var(--l-fav-title-font);
    margin-bottom: var(--space-sm);
    letter-spacing: 0.3px;
    padding: 0;
  }

  .favorites-section.portrait-only .favorites-scroll {
    --fav-gap: var(--l-fav-gap);
    padding-bottom: var(--space-xs);
  }

  .favorites-section.portrait-only .fav-item {
    --fav-item-w: var(--l-fav-item-w);
    --fav-icon-size: var(--l-fav-icon);
    --fav-icon-font: var(--l-fav-icon-font);
    --fav-name-font: var(--l-fav-name-font);
  }

  /* 右侧电台卡片：宽度与左侧分组栏一致，并且拉到底 */
  .portrait-categories-col {
    display: none !important;
  }
  .stations-browser {
    display: flex;
    flex-direction: column;
    width: var(--l-side-w);
    flex: 0 0 var(--l-side-w);
    align-self: stretch;
    min-height: 0;
  }
  .playlist-section {
    width: 100%;
    flex: 1;
    align-self: stretch;
    min-height: 0;
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    padding: var(--l-panel-pad);
  }

  .playlist-header .section-title {
    font-size: var(--l-title-font);
    font-weight: 700;
    color: var(--text-primary);
  }
  .playlist-header .playlist-count {
    font-size: calc(var(--l-title-font) * 0.65);
    color: var(--text-secondary);
  }

  .playlist-item {
    display: flex;
    align-items: center;
    padding: var(--l-list-pad-y) 14px;
    min-height: var(--l-list-min-h);
    margin-bottom: 7px;
    background: var(--surface);
    border: 1px solid var(--divider);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition:
      background-color var(--transition-fast),
      border-color var(--transition-fast),
      transform var(--transition-fast);
  }
  .playlist-item:hover {
    background: var(--glass-bg-hover);
    border-color: var(--accent-light);
  }
  .playlist-item.active {
    background: var(--accent-light);
    border-color: var(--accent);
  }
  .playlist-item .item-info {
    display: flex;
    align-items: center;
    width: 100%;
    min-width: 0;
  }
  .playlist-item .item-name {
    font-size: var(--l-list-font);
    font-weight: 600;
    line-height: 1.35;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    letter-spacing: 0.3px;
  }
  .playlist-item.active .item-name {
    font-weight: 700;
  }
}

/* ============================================================
   12. 小屏适配（窄竖屏手机 < 380px）
   ============================================================ */
@media (orientation: portrait) and (max-width: 380px) {
  .player-card {
    --card-pad: var(--space-md);
  }
  :root {
    --logo-size: 56px;
    --logo-font: 26px;
    --station-font: var(--font-size-lg);
    --btn-circle-size: 52px;
    --btn-circle-font: 20px;
    --btn-play-size: 64px;
    --btn-play-font: 26px;
    --fav-btn-size: 44px;
    --fav-btn-font: 19px;
  }
}

/* ============================================================
   13. 安全区域适配
   ============================================================ */
@supports (padding: env(safe-area-inset-top)) {
  .top-bar {
    padding-top: calc(env(safe-area-inset-top) + 4px);
  }
  .sidebar {
    padding-left: calc(env(safe-area-inset-left) + var(--space-md));
    padding-top: env(safe-area-inset-top);
    padding-bottom: env(safe-area-inset-bottom);
  }
}

/* ============================================================
   14. 连接状态指示
   ============================================================ */
.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex: none;
}
.status-dot.online { background: var(--success); }
.status-dot.offline { background: var(--danger); }
.status-dot.connecting {
  background: var(--warning);
  animation: pulse 1.2s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.85); }
}

/* ============================================================
   15. 用户中心弹窗与顶部/侧栏用户胶囊按钮样式
   ============================================================ */
.top-bar .icon-btn.user-btn,
.sidebar .icon-btn.user-btn {
  position: relative;
  width: auto;
  min-width: 52px;
  height: 36px;
  padding: 0 12px;
  border-radius: 18px;
  font-size: 13px;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  background: var(--surface);
  color: var(--text-primary);
  border: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s ease;
  user-select: none;
}

[data-theme="dark"] .top-bar .icon-btn.user-btn,
[data-theme="dark"] .sidebar .icon-btn.user-btn {
  border-color: rgba(255, 255, 255, 0.12);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.top-bar .icon-btn.user-btn:hover,
.sidebar .icon-btn.user-btn:hover {
  transform: translateY(-1px);
  background: rgba(0, 0, 0, 0.05);
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.08);
}

[data-theme="dark"] .top-bar .icon-btn.user-btn:hover,
[data-theme="dark"] .sidebar .icon-btn.user-btn:hover {
  background: rgba(255, 255, 255, 0.08);
}

.user-btn .user-name-text {
  display: inline-block;
  max-width: 90px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px;
  font-weight: 600;
  line-height: 1;
}

.user-btn .user-icon {
  font-size: 13px;
  line-height: 1;
  flex-shrink: 0;
}

.sidebar .icon-btn.user-btn {
  min-width: 44px;
  height: 28px;
  padding: 0 8px;
  font-size: 12px;
  border-radius: 14px;
  gap: 3px;
}
.sidebar .icon-btn.user-btn .user-name-text {
  max-width: 60px;
  font-size: 12px;
}
.sidebar .icon-btn.user-btn .user-icon {
  font-size: 12px;
}

.user-btn.is-logged-in {
  background: rgba(0, 122, 255, 0.08);
  border-color: rgba(0, 122, 255, 0.25);
  color: var(--accent, #007AFF);
}

[data-theme="dark"] .user-btn.is-logged-in {
  background: rgba(10, 132, 255, 0.15);
  border-color: rgba(10, 132, 255, 0.35);
  color: #5ac8fa;
}

.user-btn .user-dot {
  position: absolute;
  top: -2px;
  right: -2px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--danger, #FF3B30);
  border: 2px solid #ffffff;
  box-shadow: 0 0 4px rgba(255, 59, 48, 0.6);
}

[data-theme="dark"] .user-btn .user-dot {
  border-color: #1c1c1e;
}

.glass-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 20px;
  animation: fadeIn 0.2s ease;
}

.glass-modal-card {
  width: 100%;
  max-width: 420px;
  background: #ffffff;
  border-radius: 20px;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.35), 0 0 0 1px rgba(0, 0, 0, 0.08);
  padding: 28px 26px;
  animation: scaleUp 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  box-sizing: border-box;
}

[data-theme="dark"] .glass-modal-card {
  background: #252528;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(255, 255, 255, 0.12);
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes scaleUp {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}

.glass-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 22px;
}

.glass-modal-header h3 {
  font-size: 20px;
  font-weight: 700;
  color: #1d1d1f;
  margin: 0;
}

[data-theme="dark"] .glass-modal-header h3 {
  color: #f5f5f7;
}

.glass-modal-close {
  background: rgba(0, 0, 0, 0.06);
  border: none;
  font-size: 16px;
  color: #1d1d1f;
  cursor: pointer;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  font-weight: 700;
}
.glass-modal-close:hover {
  background: rgba(0, 0, 0, 0.14);
  transform: scale(1.06);
}
[data-theme="dark"] .glass-modal-close {
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
}
[data-theme="dark"] .glass-modal-close:hover {
  background: rgba(255, 255, 255, 0.22);
}

.auth-tabs {
  display: flex;
  background: #f0f0f3;
  border-radius: 12px;
  padding: 4px;
  margin-bottom: 20px;
  border: 1px solid rgba(0, 0, 0, 0.06);
}
[data-theme="dark"] .auth-tabs {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.08);
}

.auth-tab-btn {
  flex: 1;
  padding: 10px 14px;
  border: none;
  background: transparent;
  border-radius: 9px;
  font-size: 14px;
  font-weight: 600;
  color: #636366;
  cursor: pointer;
  transition: all 0.2s;
}

.auth-tab-btn.active {
  background: #ffffff;
  color: var(--accent);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.12);
  font-weight: 700;
}
[data-theme="dark"] .auth-tab-btn.active {
  background: #3a3a3c;
  color: #ffffff;
}

.auth-msg {
  padding: 10px 14px;
  border-radius: 10px;
  font-size: 13px;
  margin-bottom: 16px;
  line-height: 1.4;
}
.auth-msg.error {
  background: rgba(255, 59, 48, 0.12);
  color: #d70015;
  border: 1px solid rgba(255, 59, 48, 0.3);
}
[data-theme="dark"] .auth-msg.error {
  color: #ff453a;
}
.auth-msg.success {
  background: rgba(52, 199, 89, 0.12);
  color: #248a3d;
  border: 1px solid rgba(52, 199, 89, 0.3);
}
[data-theme="dark"] .auth-msg.success {
  color: #32d74b;
}

.modal-field {
  margin-bottom: 14px;
}

.modal-field input {
  width: 100%;
  height: 48px;
  padding: 0 16px;
  border-radius: 12px;
  border: 1.5px solid #c7c7cc;
  font-size: 15px;
  font-weight: 500;
  background: #ffffff;
  color: #1d1d1f;
  outline: none;
  box-sizing: border-box;
  transition: all 0.2s ease;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.modal-field input::placeholder {
  color: #8e8e93;
  opacity: 1;
  font-weight: 400;
}

.modal-field input:focus {
  border-color: var(--accent);
  background: #ffffff;
  box-shadow: 0 0 0 3.5px rgba(0, 122, 255, 0.22);
}

[data-theme="dark"] .modal-field input {
  background: #1c1c1e;
  border-color: #545458;
  color: #ffffff;
  box-shadow: none;
}
[data-theme="dark"] .modal-field input::placeholder {
  color: #8e8e93;
}
[data-theme="dark"] .modal-field input:focus {
  border-color: #0A84FF;
  background: #1c1c1e;
  box-shadow: 0 0 0 3.5px rgba(10, 132, 255, 0.3);
}

.modal-primary-btn {
  width: 100%;
  height: 48px;
  padding: 0 16px;
  background: var(--accent);
  color: #ffffff;
  border: none;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  margin-top: 8px;
  box-shadow: 0 4px 14px rgba(0, 122, 255, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-primary-btn:hover {
  background: var(--accent-hover);
  box-shadow: 0 6px 20px rgba(0, 122, 255, 0.45);
  transform: translateY(-1px);
}

.modal-primary-btn:active {
  transform: translateY(0);
}

.modal-tip {
  font-size: 12px;
  color: #636366;
  line-height: 1.5;
  margin-top: 14px;
  padding: 10px 14px;
  background: rgba(0, 122, 255, 0.07);
  border: 1px dashed rgba(0, 122, 255, 0.25);
  border-radius: 10px;
}
[data-theme="dark"] .modal-tip {
  color: #aeaeb2;
  background: rgba(10, 132, 255, 0.12);
  border-color: rgba(10, 132, 255, 0.3);
}

.user-card-profile {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px;
  background: #f5f5f7;
  border-radius: 14px;
  margin-bottom: 18px;
  border: 1px solid rgba(0, 0, 0, 0.05);
}
[data-theme="dark"] .user-card-profile {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.08);
}

.user-big-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  flex-shrink: 0;
}
[data-theme="dark"] .user-big-avatar {
  background: #3a3a3c;
}

.user-big-name {
  font-size: 17px;
  font-weight: 700;
  color: #1d1d1f;
}
[data-theme="dark"] .user-big-name {
  color: #ffffff;
}

.user-big-role {
  font-size: 12px;
  color: #86868b;
  margin-top: 2px;
}

.user-sync-box {
  background: linear-gradient(135deg, rgba(0, 122, 255, 0.10), rgba(52, 199, 89, 0.10));
  border: 1px solid rgba(0, 122, 255, 0.3);
  border-radius: 14px;
  padding: 16px;
  margin-bottom: 18px;
}
[data-theme="dark"] .user-sync-box {
  background: linear-gradient(135deg, rgba(10, 132, 255, 0.16), rgba(52, 199, 89, 0.16));
  border-color: rgba(10, 132, 255, 0.4);
}

.user-sync-box .sync-title {
  font-size: 14px;
  font-weight: 700;
  color: #1d1d1f;
  margin-bottom: 4px;
}
[data-theme="dark"] .user-sync-box .sync-title {
  color: #ffffff;
}

.user-sync-box .sync-desc {
  font-size: 12px;
  color: #636366;
  margin-bottom: 12px;
}
[data-theme="dark"] .user-sync-box .sync-desc {
  color: #aeaeb2;
}

.user-modal-buttons {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.modal-action-link {
  display: block;
  text-align: center;
  padding: 12px;
  background: var(--accent);
  color: #ffffff;
  border-radius: 12px;
  text-decoration: none;
  font-size: 14px;
  font-weight: 700;
  transition: all 0.2s;
  box-shadow: 0 3px 10px rgba(0, 122, 255, 0.25);
}
.modal-action-link:hover {
  background: var(--accent-hover);
  box-shadow: 0 4px 14px rgba(0, 122, 255, 0.35);
}

.modal-action-btn {
  width: 100%;
  padding: 12px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.2s;
  box-sizing: border-box;
}

.modal-action-btn.primary {
  background: #34C759;
  color: #ffffff;
  box-shadow: 0 3px 10px rgba(52, 199, 89, 0.25);
}
.modal-action-btn.primary:hover {
  background: #2ea84b;
  box-shadow: 0 4px 14px rgba(52, 199, 89, 0.35);
}

.modal-action-btn.secondary {
  background: #f0f0f3;
  border-color: rgba(0, 0, 0, 0.08);
  color: #48484a;
}
.modal-action-btn.secondary:hover {
  background: #e5e5ea;
  color: #1d1d1f;
}
[data-theme="dark"] .modal-action-btn.secondary {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.12);
  color: #d1d1d6;
}
[data-theme="dark"] .modal-action-btn.secondary:hover {
  background: rgba(255, 255, 255, 0.14);
  color: #ffffff;
}

.modal-action-btn.danger {
  background: rgba(255, 59, 48, 0.10);
  border-color: rgba(255, 59, 48, 0.25);
  color: #d70015;
}
.modal-action-btn.danger:hover {
  background: rgba(255, 59, 48, 0.18);
}
[data-theme="dark"] .modal-action-btn.danger {
  color: #ff453a;
  background: rgba(255, 69, 58, 0.15);
  border-color: rgba(255, 69, 58, 0.3);
}

/* ===== 免责声明模态框样式 ===== */
.disclaimer-modal-card {
  max-height: 85vh;
  display: flex;
  flex-direction: column;
}

.disclaimer-title-icon {
  margin-right: 8px;
}

.disclaimer-body {
  overflow-y: auto;
  max-height: 56vh;
  padding: 4px 2px 14px 2px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  -webkit-overflow-scrolling: touch;
}

.disclaimer-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  align-self: flex-start;
  padding: 4px 10px;
  border-radius: 20px;
  background: rgba(255, 149, 0, 0.12);
  color: #c97500;
  font-size: 12px;
  font-weight: 600;
}
[data-theme="dark"] .disclaimer-badge {
  background: rgba(255, 159, 10, 0.18);
  color: #ff9f0a;
}

.disclaimer-intro {
  font-size: 13px;
  line-height: 1.55;
  color: var(--text-primary);
  margin: 0;
}

.disclaimer-item {
  background: var(--surface);
  border: 1px solid var(--divider);
  border-radius: 10px;
  padding: 10px 12px;
}

.disclaimer-item-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.disclaimer-item-text {
  font-size: 12px;
  line-height: 1.5;
  color: var(--text-secondary);
}

.disclaimer-actions {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--divider);
}

/* ============================================================
   用户中心通用设置（风格切换与手动更新）
   ============================================================ */
.user-common-settings {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--divider);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.user-setting-group {
  background: var(--surface);
  border: 1px solid var(--divider);
  border-radius: 14px;
  padding: 12px;
}

.user-setting-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.user-setting-label {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text-primary);
}

.user-setting-tag {
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 6px;
  background: rgba(0, 122, 255, 0.12);
  color: var(--accent);
  font-weight: 600;
}
[data-theme="dark"] .user-setting-tag {
  background: rgba(10, 132, 255, 0.2);
}
[data-player-style="radio"] .user-setting-tag {
  background: rgba(245, 158, 11, 0.15) !important;
  color: #d97706 !important;
}
[data-theme="dark"][data-player-style="radio"] .user-setting-tag {
  background: rgba(255, 158, 59, 0.18) !important;
  color: #ff9e3b !important;
}

.user-style-picker {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.user-style-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 12px;
  border-radius: 10px;
  background: var(--glass-bg);
  border: 1px solid var(--divider);
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.user-style-btn:hover {
  background: var(--glass-bg-hover);
  color: var(--text-primary);
  border-color: var(--glass-border);
}

.user-style-btn.active {
  background: var(--accent);
  color: #ffffff !important;
  border-color: var(--accent);
  box-shadow: 0 2px 10px rgba(0, 122, 255, 0.3);
}

[data-player-style="radio"] .user-style-btn.active {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%) !important;
  border-color: #d97706 !important;
  box-shadow: 0 2px 10px rgba(217, 119, 6, 0.35) !important;
}

.user-manual-sync-btn {
  background: linear-gradient(135deg, rgba(0, 122, 255, 0.08), rgba(52, 199, 89, 0.08));
  border: 1px solid rgba(0, 122, 255, 0.25);
  color: var(--text-primary);
  font-weight: 700;
}
.user-manual-sync-btn:hover {
  background: linear-gradient(135deg, rgba(0, 122, 255, 0.16), rgba(52, 199, 89, 0.16));
  border-color: var(--accent);
}

/* ============================================================
   拟真收音机专属风格：分类栏与电台列表全系统深度统一 (Unified Retro Browser)
   ============================================================ */

/* 1. 分类栏头部标题经典/拟真切换与机电化排版 */
.cat-header-retro {
  display: none;
}
.cat-header-classic {
  display: inline-block;
}

[data-player-style="radio"] .cat-header-classic {
  display: none !important;
}

[data-player-style="radio"] .cat-header-retro {
  display: inline-flex !important;
  align-items: center;
  gap: 6px;
  font-family: 'Space Grotesk', -apple-system, sans-serif !important;
  font-size: 11px !important;
  font-weight: 700 !important;
  letter-spacing: 0.08em !important;
  text-transform: uppercase !important;
}

[data-player-style="radio"] .cat-header-led {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #ff9e3b;
  box-shadow: 0 0 7px #ff9e3b;
  flex: none;
  animation: retroLedPulse 2.5s infinite ease-in-out;
}

[data-player-style="radio"] .portrait-categories-col .categories-header {
  font-family: 'Space Grotesk', -apple-system, sans-serif !important;
  font-size: 11.5px !important;
  font-weight: 700 !important;
  letter-spacing: 0.08em !important;
  text-transform: uppercase !important;
  padding: 8px 8px 7px !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  margin-bottom: 5px;
  color: #9ca3af !important;
}

[data-player-style="radio"] .playlist-header {
  padding: 6px 8px 6px !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07) !important;
  margin-bottom: 5px !important;
}

[data-player-style="radio"] .playlist-header .section-title {
  font-family: 'Space Grotesk', -apple-system, sans-serif !important;
  letter-spacing: 0.06em !important;
  text-transform: uppercase !important;
  font-size: 12.5px !important;
}

/* 2. 双立柱外壳容器机电底座统一 (Dark Mode 默认) */
[data-player-style="radio"] .portrait-categories-col,
[data-theme="dark"][data-player-style="radio"] .portrait-categories-col,
[data-player-style="radio"] .playlist-section,
[data-theme="dark"][data-player-style="radio"] .playlist-section {
  background: linear-gradient(180deg, #18191c 0%, #111215 100%) !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05), 0 4px 18px rgba(0, 0, 0, 0.45) !important;
  border-radius: 14px !important;
}

/* 3. 左侧分类波段机械按键 (Dark Mode 默认) - 竖屏与横屏侧边栏统一 */
[data-player-style="radio"] .portrait-categories .cat-item,
[data-theme="dark"][data-player-style="radio"] .portrait-categories .cat-item,
[data-player-style="radio"] .sidebar .cat-item,
[data-theme="dark"][data-player-style="radio"] .sidebar .cat-item {
  background: linear-gradient(180deg, #1f2025 0%, #151619 100%) !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.05) !important;
  border-radius: 8px !important;
  color: #9ca3af !important;
  font-family: 'Space Grotesk', -apple-system, sans-serif !important;
  transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1) !important;
  position: relative;
  overflow: hidden;
}

[data-player-style="radio"] .portrait-categories .cat-item:hover,
[data-theme="dark"][data-player-style="radio"] .portrait-categories .cat-item:hover,
[data-player-style="radio"] .sidebar .cat-item:hover,
[data-theme="dark"][data-player-style="radio"] .sidebar .cat-item:hover {
  background: linear-gradient(180deg, #25262c 0%, #1a1b20 100%) !important;
  border-color: rgba(255, 158, 59, 0.35) !important;
  color: #e5e7eb !important;
  transform: translateY(-1px);
}

[data-player-style="radio"] .portrait-categories .cat-item.active,
[data-theme="dark"][data-player-style="radio"] .portrait-categories .cat-item.active,
[data-player-style="radio"] .sidebar .cat-item.active,
[data-theme="dark"][data-player-style="radio"] .sidebar .cat-item.active {
  background: linear-gradient(90deg, rgba(255, 158, 59, 0.24) 0%, rgba(26, 27, 31, 0.96) 100%) !important;
  border-color: rgba(255, 158, 59, 0.65) !important;
  border-left: 4px solid #ff9e3b !important;
  color: #ffc880 !important;
  box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.5), 0 0 10px rgba(255, 158, 59, 0.15) !important;
  transform: none !important;
}

[data-player-style="radio"] .portrait-categories .cat-item.active .cat-name,
[data-theme="dark"][data-player-style="radio"] .portrait-categories .cat-item.active .cat-name,
[data-player-style="radio"] .sidebar .cat-item.active .cat-name,
[data-player-style="radio"] .sidebar .cat-item.active .cat-icon + span {
  color: #ffc880 !important;
  font-weight: 800 !important;
  text-shadow: 0 0 10px rgba(255, 158, 59, 0.45) !important;
}

/* 4. 右侧电台列表项 (Dark Mode 默认) */
[data-player-style="radio"] .playlist-item,
[data-theme="dark"][data-player-style="radio"] .playlist-item {
  background: linear-gradient(180deg, #191a1d 0%, #121315 100%) !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.04) !important;
  border-radius: 11px !important;
  color: #e5e5e8 !important;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

[data-player-style="radio"] .playlist-item:hover,
[data-theme="dark"][data-player-style="radio"] .playlist-item:hover {
  background: linear-gradient(180deg, #212227 0%, #17181c 100%) !important;
  border-color: rgba(255, 158, 59, 0.3) !important;
  transform: translateY(-1px);
}

[data-player-style="radio"] .playlist-item .item-name,
[data-theme="dark"][data-player-style="radio"] .playlist-item .item-name {
  font-family: 'Space Grotesk', -apple-system, sans-serif !important;
  letter-spacing: 0.01em;
  color: #e5e7eb !important;
}

[data-player-style="radio"] .playlist-item .item-freq-pill,
[data-theme="dark"][data-player-style="radio"] .playlist-item .item-freq-pill {
  font-family: 'Space Mono', monospace !important;
  font-weight: 700 !important;
  background: rgba(255, 158, 59, 0.12) !important;
  border: 1px solid rgba(255, 158, 59, 0.3) !important;
  color: #ff9e3b !important;
  border-radius: 5px !important;
  letter-spacing: 0.04em;
}

[data-player-style="radio"] .playlist-item.active,
[data-theme="dark"][data-player-style="radio"] .playlist-item.active {
  background: linear-gradient(90deg, rgba(255, 158, 59, 0.20) 0%, rgba(26, 27, 31, 0.95) 100%) !important;
  border-color: rgba(255, 158, 59, 0.65) !important;
  border-left: 3.5px solid #ff9e3b !important;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.6), inset 0 1px 0 rgba(255, 200, 128, 0.15) !important;
}

[data-player-style="radio"] .playlist-item.active .item-name,
[data-theme="dark"][data-player-style="radio"] .playlist-item.active .item-name {
  color: #ffc880 !important;
  font-weight: 800 !important;
  text-shadow: 0 0 10px rgba(255, 158, 59, 0.45) !important;
}

[data-player-style="radio"] .playlist-item.active .item-freq-pill,
[data-theme="dark"][data-player-style="radio"] .playlist-item.active .item-freq-pill {
  background: #ff9e3b !important;
  color: #121316 !important;
  font-weight: 800 !important;
  box-shadow: 0 0 8px rgba(255, 158, 59, 0.7) !important;
  border-color: #ff9e3b !important;
}

/* 横屏侧边栏底座 (Dark Mode 默认) */
[data-player-style="radio"] .sidebar,
[data-theme="dark"][data-player-style="radio"] .sidebar {
  background: linear-gradient(180deg, #18191c 0%, #111215 100%) !important;
  border-right: 1px solid rgba(255, 255, 255, 0.08) !important;
  box-shadow: inset -1px 0 0 rgba(255, 255, 255, 0.04), 4px 0 20px rgba(0, 0, 0, 0.3) !important;
}

/* ============================================================
   5. 日间/浅色模式 (Light Mode) 拟真分类与电台列表全系统适配
   ============================================================ */

/* 浅色模式分类头部与 LED */
[data-theme="light"][data-player-style="radio"] .portrait-categories-col .categories-header,
[data-theme="light"] [data-player-style="radio"] .portrait-categories-col .categories-header {
  border-bottom: 1px solid rgba(0, 0, 0, 0.07) !important;
  color: #64748b !important;
}

[data-theme="light"][data-player-style="radio"] .cat-header-led,
[data-theme="light"] [data-player-style="radio"] .cat-header-led {
  background: #d97706 !important;
  box-shadow: 0 0 6px rgba(217, 119, 6, 0.5) !important;
}

/* 浅色模式外壳容器底座 */
[data-theme="light"][data-player-style="radio"] .portrait-categories-col,
[data-theme="light"] [data-player-style="radio"] .portrait-categories-col,
[data-theme="light"][data-player-style="radio"] .playlist-section,
[data-theme="light"] [data-player-style="radio"] .playlist-section {
  background: linear-gradient(180deg, #ffffff 0%, #f4f5f8 100%) !important;
  border: 1px solid rgba(0, 0, 0, 0.08) !important;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.04), inset 0 1px 0 #ffffff !important;
  border-radius: 14px !important;
}

/* 浅色模式左侧分类波段琴键 */
[data-theme="light"][data-player-style="radio"] .portrait-categories .cat-item,
[data-theme="light"] [data-player-style="radio"] .portrait-categories .cat-item,
[data-theme="light"][data-player-style="radio"] .sidebar .cat-item,
[data-theme="light"] [data-player-style="radio"] .sidebar .cat-item {
  background: linear-gradient(180deg, #ffffff 0%, #f3f4f6 100%) !important;
  border: 1px solid rgba(0, 0, 0, 0.09) !important;
  box-shadow: 0 1.5px 3px rgba(0, 0, 0, 0.04), inset 0 1px 0 #ffffff !important;
  border-radius: 8px !important;
  color: #4b5563 !important;
  font-family: 'Space Grotesk', -apple-system, sans-serif !important;
}

[data-theme="light"][data-player-style="radio"] .portrait-categories .cat-item:hover,
[data-theme="light"] [data-player-style="radio"] .portrait-categories .cat-item:hover,
[data-theme="light"][data-player-style="radio"] .sidebar .cat-item:hover,
[data-theme="light"] [data-player-style="radio"] .sidebar .cat-item:hover {
  background: #ffffff !important;
  border-color: rgba(217, 119, 6, 0.35) !important;
  color: #1f2937 !important;
  transform: translateY(-1px);
}

[data-theme="light"][data-player-style="radio"] .portrait-categories .cat-item.active,
[data-theme="light"] [data-player-style="radio"] .portrait-categories .cat-item.active,
[data-theme="light"][data-player-style="radio"] .sidebar .cat-item.active,
[data-theme="light"] [data-player-style="radio"] .sidebar .cat-item.active {
  background: linear-gradient(90deg, #fffbeb 0%, #ffffff 100%) !important;
  border-color: rgba(217, 119, 6, 0.48) !important;
  border-left: 4px solid #d97706 !important;
  color: #b45309 !important;
  box-shadow: inset 0 1.5px 3px rgba(217, 119, 6, 0.12), 0 2px 6px rgba(217, 119, 6, 0.1) !important;
  transform: none !important;
}

[data-theme="light"][data-player-style="radio"] .portrait-categories .cat-item.active .cat-name,
[data-theme="light"] [data-player-style="radio"] .portrait-categories .cat-item.active .cat-name,
[data-theme="light"][data-player-style="radio"] .sidebar .cat-item.active .cat-name,
[data-theme="light"][data-player-style="radio"] .sidebar .cat-item.active .cat-icon + span {
  color: #b45309 !important;
  font-weight: 800 !important;
  text-shadow: none !important;
}

/* 浅色模式右侧电台列表项 */
[data-theme="light"][data-player-style="radio"] .playlist-item,
[data-theme="light"] [data-player-style="radio"] .playlist-item {
  background: #ffffff !important;
  border: 1px solid rgba(0, 0, 0, 0.09) !important;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04), inset 0 1px 0 #ffffff !important;
  color: #1f2937 !important;
}

[data-theme="light"][data-player-style="radio"] .playlist-item:hover,
[data-theme="light"] [data-player-style="radio"] .playlist-item:hover {
  background: #f8fafc !important;
  border-color: rgba(245, 158, 11, 0.35) !important;
}

[data-theme="light"][data-player-style="radio"] .playlist-item .item-name,
[data-theme="light"] [data-player-style="radio"] .playlist-item .item-name {
  color: #111827 !important;
}

[data-theme="light"][data-player-style="radio"] .playlist-item .item-freq-pill,
[data-theme="light"] [data-player-style="radio"] .playlist-item .item-freq-pill {
  background: rgba(245, 158, 11, 0.1) !important;
  border: 1px solid rgba(245, 158, 11, 0.25) !important;
  color: #b45309 !important;
}

[data-theme="light"][data-player-style="radio"] .playlist-item.active,
[data-theme="light"] [data-player-style="radio"] .playlist-item.active {
  background: linear-gradient(90deg, #fffbeb 0%, #ffffff 100%) !important;
  border-color: #f59e0b !important;
  border-left: 3.5px solid #d97706 !important;
  box-shadow: 0 3px 10px rgba(245, 158, 11, 0.15), inset 0 1px 0 #ffffff !important;
}

[data-theme="light"][data-player-style="radio"] .playlist-item.active .item-name,
[data-theme="light"] [data-player-style="radio"] .playlist-item.active .item-name {
  color: #b45309 !important;
  font-weight: 800 !important;
}

[data-theme="light"][data-player-style="radio"] .playlist-item.active .item-freq-pill,
[data-theme="light"] [data-player-style="radio"] .playlist-item.active .item-freq-pill {
  background: #d97706 !important;
  color: #ffffff !important;
  font-weight: 800 !important;
  box-shadow: 0 2px 6px rgba(217, 119, 6, 0.4) !important;
  border-color: #d97706 !important;
}

/* 浅色模式横屏侧边栏底座 */
[data-theme="light"][data-player-style="radio"] .sidebar,
[data-theme="light"] [data-player-style="radio"] .sidebar {
  background: linear-gradient(180deg, #ffffff 0%, #f4f5f8 100%) !important;
  border-right: 1px solid rgba(0, 0, 0, 0.08) !important;
  box-shadow: 2px 0 12px rgba(0, 0, 0, 0.04), inset -1px 0 0 #ffffff !important;
}


