* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --bg-1: #0a0714;
  --bg-2: #0f0c1d;
  --bg-3: #0a0714;

  /* 玻璃 */
  --card-bg: rgba(28, 24, 44, 0.38);
  --card-border: rgba(180, 160, 230, 0.18);
  /* 卡片光晕：用大幅 blur + 低 opacity 让光晕平滑融到墙面，避免在卡片两侧形成"光晕边界"竖带 */
  --card-glow: 0 0 360px rgba(120, 90, 200, 0.14), 0 0 60px rgba(120, 90, 200, 0.12);
  --card-inset:
    inset 0 1px 0 rgba(255, 255, 255, 0.07),
    inset 0 -1px 0 rgba(0, 0, 0, 0.25);

  --dot-color: rgba(255, 255, 255, 0.045);
  --dot-size: 14px;

  --text: #ece9f5;
  --text-dim: rgba(236, 233, 245, 0.6);
  --text-faint: rgba(236, 233, 245, 0.32);

  --accent-green: #4ade80;
  --accent-green-dim: rgba(74, 222, 128, 0.5);
  --accent-purple: #a48ce0;
  --accent-purple-dim: rgba(164, 140, 224, 0.5);

  --separator: rgba(180, 160, 230, 0.1);

  /* 信号橙：dark / light 共用 */
  --orange: #e54a1f;
  --orange-glow: rgba(229, 74, 31, 0.55);

  --font-display: 'DotGothic16', 'Courier New', monospace;
  --font-mono: 'JetBrains Mono', 'SF Mono', 'Menlo', monospace;
  --font-sans: -apple-system, 'PingFang SC', 'Helvetica Neue', sans-serif;
}

html, body {
  height: 100dvh;
  overflow: hidden;
  background-color: var(--bg-2);  /* 兜底色和 bg-fill 一致，无论怎么暴露都是同一个色 */
}
body {
  font-family: var(--font-sans);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  letter-spacing: 0.01em;
  background: transparent;
}

/* 兜底背景：完全单色，无任何渐变。
   之前的 radial / linear 渐变在 transparent 边缘都会留下肉眼可见的过渡线，
   只要还有渐变就一定能看到"分界线"。彻底删掉。 */
#bg-fill {
  position: fixed;
  top: -50px; left: -50px; right: -50px; bottom: -50px;
  z-index: -1;
  pointer-events: none;
  background: var(--bg-2);
}

/* 鼠标 spotlight 已移除（在卡片两侧形成可见竖条，破坏「长条形播放器」观感）。
   如需恢复，重新加上 body::before / body::after 即可。 */

#app {
  width: 100%;
  max-width: 480px;
  margin: 0 auto;
  height: 100dvh;            /* 严格等于视口高度，不会溢出导致滑动 */
  /* 居中容器：用 flex 让卡片垂直水平居中 */
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding:
    calc(env(safe-area-inset-top, 0px) + 14px)
    calc(env(safe-area-inset-right, 0px) + 14px)
    calc(env(safe-area-inset-bottom, 0px) + 14px)
    calc(env(safe-area-inset-left, 0px) + 14px);
  position: relative;
  z-index: 2;
  overflow: hidden;
}

.view { display: none; flex-direction: column; width: 100%; }
.view.active { display: flex; }

/* Dark 模式播放器上下留白 */
[data-theme="dark"] #player-view {
  padding-top: 15vh;
  padding-bottom: 15vh;
}

/* === 浮动光斑（让 blur 有内容） === */
.ambient-blobs {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}
.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.55;
}
/* blob 位置全部推到画面外更远处，避免边缘形成肉眼可见的"光柱" */
.blob-1 {
  width: 480px; height: 480px;
  top: -10%; left: -30%;
  background: radial-gradient(circle, #6645b8 0%, transparent 70%);
  animation: drift1 22s ease-in-out infinite;
}
.blob-2 {
  width: 420px; height: 420px;
  top: 60%; right: -35%;
  background: radial-gradient(circle, #4d3aa5 0%, transparent 70%);
  animation: drift2 28s ease-in-out infinite;
}
.blob-3 {
  width: 360px; height: 360px;
  bottom: -10%; left: 35%;
  background: radial-gradient(circle, #7e5cd1 0%, transparent 70%);
  animation: drift3 32s ease-in-out infinite;
}
@keyframes drift1 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(40px, 60px) scale(1.1); }
}
@keyframes drift2 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(-50px, -40px) scale(1.05); }
}
@keyframes drift3 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(60px, -50px) scale(1.15); }
}

/* === 玻璃主卡 === */
#glass-card {
  /* flex: 1 会把卡片拉到撑满父容器，导致底部一大片死空白；改成按内容自适应 */
  display: flex;
  flex-direction: column;
  width: 100%;
  background:
    /* 顶部光泽 */
    linear-gradient(180deg, rgba(255,255,255,0.05) 0%, transparent 30%),
    /* 点阵网格 */
    radial-gradient(circle at center, var(--dot-color) 1px, transparent 1px),
    /* 主底色 */
    var(--card-bg);
  background-size: 100% 100%, var(--dot-size) var(--dot-size), 100% 100%;
  backdrop-filter: blur(40px) saturate(160%);
  -webkit-backdrop-filter: blur(40px) saturate(160%);
  border: 1px solid var(--card-border);
  border-radius: 28px;
  box-shadow: var(--card-glow), var(--card-inset);
  padding: 16px 16px 12px;
  position: relative;
  overflow: hidden;
}

/* 玻璃高光边（顶部细亮线） */
.card-highlight {
  position: absolute;
  inset: 0;
  border-radius: 28px;
  pointer-events: none;
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.18) 0%,
    rgba(255, 255, 255, 0.04) 0.5%,
    transparent 8%
  );
  mix-blend-mode: overlay;
  z-index: 1;
}

/* 卡内鼠标 spotlight：跟基础点阵对齐的细发光点 */
.cursor-spotlight {
  position: absolute;
  inset: 0;
  border-radius: 28px;
  pointer-events: none;
  z-index: 0;
  background-image: radial-gradient(circle at center, rgba(210, 180, 255, 0.95) 0.6px, transparent 1.2px);
  background-size: var(--dot-size) var(--dot-size);
  filter: drop-shadow(0 0 1.8px rgba(190, 160, 240, 0.85));
  -webkit-mask: radial-gradient(circle 170px at var(--cmx, 50%) var(--cmy, 50%), black 0%, rgba(0,0,0,0.45) 50%, transparent 72%);
          mask: radial-gradient(circle 170px at var(--cmx, 50%) var(--cmy, 50%), black 0%, rgba(0,0,0,0.45) 50%, transparent 72%);
  opacity: var(--cursor-on, 0);
  transition: opacity 0.3s;
}

#glass-card > *:not(.cursor-spotlight):not(.card-highlight) {
  position: relative;
  z-index: 2;
}

/* === Header === */
#radio-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--separator);
  margin-bottom: 8px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 7px;
  flex-shrink: 0;
}

/* 不播放时 brand-dot 是灰的、无 glow —— 绝对不可能"脉动" */
.brand-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.18);
  box-shadow: none;
  opacity: 1;
  transition: background 0.5s, box-shadow 0.5s;
  animation: none !important;
}
body.is-playing .brand-dot {
  background: var(--accent-green);
  box-shadow: 0 0 10px var(--accent-green);
  animation: pulse 2.4s ease-in-out infinite !important;
}

.brand-name {
  font-family: var(--font-display);
  font-size: 16px;
  letter-spacing: 0.04em;
  color: var(--text);
}

.header-clock {
  font-family: var(--font-display);
  font-size: 22px;
  letter-spacing: 0.06em;
  color: var(--text);
  text-shadow: 0 0 12px rgba(164, 140, 224, 0.3);
  margin: 0 8px 0 4px;
  line-height: 1;
}

.header-tabs {
  display: flex;
  gap: 2px;
  margin-left: auto;
  background: transparent;       /* 去掉胶囊底色，避免未选中那一格看起来像选中 */
  border: 1px solid var(--separator);
  border-radius: 999px;
  padding: 2px;
}

.theme-tab {
  background: transparent;
  border: none;
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.14em;
  padding: 4px 10px;
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.18s;
}
/* dark 模式专属：明确未选中是纯透明 + 白字（最高优先级） */
[data-theme="dark"] .theme-tab:not(.active) {
  background: transparent !important;
  color: #ffffff !important;
}
[data-theme="dark"] .theme-tab.active {
  background: rgba(236, 233, 245, 0.95);
  color: #14101f;
  font-weight: 500;
}
.theme-tab:not(.active):hover { opacity: 0.7; }

.icon-btn {
  background: none;
  border: 1px solid var(--separator);
  color: var(--text-dim);
  font-size: 18px;
  cursor: pointer;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  transition: all 0.18s;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.icon-btn:hover { color: var(--text); border-color: var(--accent-purple-dim); }

#clock-meta {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.16em;
  color: var(--text-dim);
  text-transform: uppercase;
  display: flex;
  gap: 8px;
  align-items: center;
  padding: 6px 0 12px;
}
.dim-sep { color: var(--text-faint); }
@keyframes pulse {
  0%, 100% { opacity: 0.5; }
  50% { opacity: 1; }
}

/* === 大封面区 === */
#cover-area {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  padding: 14px 0 16px;
}

#cover-img {
  width: 100%;
  max-width: 280px;
  aspect-ratio: 1;
  border-radius: 14px;
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--separator);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  box-shadow:
    0 20px 60px rgba(0,0,0,0.4),
    0 0 0 1px rgba(255,255,255,0.04) inset;
  transition: box-shadow 0.4s;
}

/* 播放时封面保持稳定，不做脉动 */

#cover-img img { width: 100%; height: 100%; object-fit: cover; }

#cover-placeholder {
  font-family: var(--font-display);
  font-size: 56px;
  color: var(--text-faint);
}

#visualizer {
  display: block;
  width: 100%;
  height: 32px;
  margin: 6px 0 4px;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.4s;
}
#visualizer.playing { opacity: 0.85; }

#song-info {
  text-align: center;
  width: 100%;
}

#song-name {
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  padding: 0 12px;
}

#song-meta {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.06em;
  color: var(--text-dim);
}

#playing-indicator {
  font-family: var(--font-mono);
  font-size: 8px;
  letter-spacing: 0.18em;
  color: var(--text-faint);
  text-transform: uppercase;
  padding: 2px 6px;
  border: 1px solid var(--separator);
  border-radius: 3px;
}
#playing-indicator.playing {
  color: var(--accent-green);
  border-color: var(--accent-green-dim);
}

/* === 进度 === */
#progress-area { padding: 6px 4px 6px; }

#progress {
  width: 100%; height: 2px;
  -webkit-appearance: none; appearance: none;
  background: rgba(255,255,255,0.08);
  border-radius: 1px;
  outline: none;
  cursor: pointer;
}
#progress::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--text);
  cursor: pointer;
  box-shadow: 0 0 0 3px rgba(164, 140, 224, 0.2);
}

#time-info {
  display: flex; justify-content: space-between;
  font-family: var(--font-mono); font-size: 10px;
  color: var(--text-dim); margin-top: 5px;
  letter-spacing: 0.06em;
}
#current-time.seeking { color: var(--text); }

/* === 控件行：控件居中，反馈靠左悬浮 === */
#control-row {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px 4px 12px;
  gap: 12px;
}
#feedback-area {
  position: absolute;
  left: 4px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  gap: 6px;
}
.fb-btn {
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--separator);
  color: var(--text-dim);
  cursor: pointer;
  width: 36px; height: 36px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.15s;
}
.fb-btn:hover { color: var(--text); border-color: var(--accent-purple-dim); background: rgba(164,140,224,0.08); }
.fb-btn:active { transform: scale(0.92); }
.fb-btn:disabled { opacity: 0.3; cursor: not-allowed; }
.fb-btn.active-like {
  background: rgba(74, 222, 128, 0.14);
  border-color: var(--accent-green-dim);
  color: var(--accent-green);
}
.fb-btn.active-dislike {
  background: rgba(239, 68, 68, 0.14);
  border-color: rgba(239, 68, 68, 0.5);
  color: rgb(248, 113, 113);
}

#controls { display: flex; align-items: center; gap: 12px; }
.ctrl-btn {
  background: none; border: none;
  color: var(--text-dim); cursor: pointer;
  width: 36px; height: 36px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.15s;
}
.ctrl-btn:hover { color: var(--text); background: rgba(255,255,255,0.05); }
.ctrl-btn:active { transform: scale(0.9); }
.ctrl-main {
  width: 48px; height: 48px;
  background: rgba(236, 233, 245, 0.95);
  color: #14101f;
  box-shadow: 0 0 24px rgba(164, 140, 224, 0.3);
}
.ctrl-main:hover { background: var(--text); color: #14101f; }

/* === 对话流 === */
#chat-flow {
  /* 用 min-height 把卡片整体撑成「长条形」（与 light 模式视觉等高） */
  flex: 0 0 auto;
  min-height: 32vh;
  max-height: 32vh;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 10px 4px;
  margin-top: 6px;
  border-top: 1px solid var(--separator);
  scroll-behavior: smooth;
}
#chat-flow::-webkit-scrollbar { width: 4px; }
#chat-flow::-webkit-scrollbar-thumb { background: var(--separator); border-radius: 2px; }

.msg {
  display: flex;
  flex-direction: column;
  max-width: 85%;
  font-size: 13px;
  line-height: 1.55;
  animation: msg-in 0.95s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: transform, opacity, filter;
}
@keyframes msg-in {
  0% {
    opacity: 0;
    transform: translateY(32px) scale(0.93);
    filter: blur(12px);
  }
  35% {
    opacity: 0.55;
    filter: blur(6px);
  }
  70% {
    opacity: 0.95;
    filter: blur(1.5px);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: blur(0);
  }
}

.msg-dj {
  align-self: flex-start;
  background: rgba(0, 0, 0, 0.28);
  border: 1px solid var(--separator);
  border-radius: 14px 14px 14px 4px;
  padding: 10px 14px;
  color: var(--text);
}
.msg-dj .role {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.14em;
  color: var(--accent-green);
  margin-bottom: 4px;
  text-transform: uppercase;
}

.msg-user {
  align-self: flex-end;
  background: rgba(164, 140, 224, 0.18);
  border: 1px solid var(--accent-purple-dim);
  border-radius: 14px 14px 4px 14px;
  padding: 10px 14px;
  color: var(--text);
}

.msg-upcoming {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 10px;
}
.upcoming-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--separator);
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.1s ease;
}
.upcoming-card:hover {
  background: rgba(164, 140, 224, 0.08);
  border-color: var(--accent-purple-dim);
}
.upcoming-card:active { transform: scale(0.98); }
.upcoming-card.is-missed { cursor: default; }
.upcoming-card.is-now-playing { cursor: pointer; }
/* 已播过的卡片仍然可点击重播，不再 cursor: default */
.upcoming-card.is-loading {
  animation: cardLoadingPulse 1.2s ease-in-out infinite;
}
@keyframes cardLoadingPulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.55; }
}
/* 正在播：橙色描边（dark / light 都用同一色） */
.upcoming-card.is-now-playing {
  background: rgba(229, 74, 31, 0.06);
  border-color: var(--orange, rgba(229, 74, 31, 0.75));
  box-shadow: 0 0 0 1px var(--orange, rgba(229, 74, 31, 0.75)) inset;
}
/* 已播过的卡片：保留正常外观，可重复点击 */
.upcoming-card.is-played { opacity: 1; }
.upcoming-card.is-missed {
  opacity: 0.35;
  text-decoration: line-through;
  text-decoration-color: var(--text-faint);
}
details.upcoming-more {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
details.upcoming-more > summary {
  cursor: pointer;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  color: var(--text-faint);
  padding: 4px 6px;
  list-style: none;
  user-select: none;
}
details.upcoming-more > summary::-webkit-details-marker { display: none; }
details.upcoming-more[open] > summary { color: var(--text-dim); }
details.upcoming-more > .upcoming-card { margin-top: 6px; }

.msg-queue {
  align-self: flex-start;
  max-width: 92%;
  padding: 6px 10px;
  margin: 4px 0;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  color: var(--text-faint);
  background: transparent;
}
.msg-queue .msg-body { padding: 0; }
.upcoming-cover {
  width: 32px;
  height: 32px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(164, 140, 224, 0.12);
  border: 1px solid var(--separator);
  border-radius: 4px;
  color: var(--text-faint);
  font-size: 16px;
}
.upcoming-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 1px;
}
.upcoming-label {
  font-family: var(--font-mono);
  font-size: 8px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-faint);
}
.upcoming-card.is-now-playing .upcoming-label {
  color: var(--accent-green);
}
.upcoming-name {
  font-size: 13px;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.upcoming-artist {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-faint);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sm-song-status {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(20, 16, 31, 0.4);
  margin-bottom: 8px;
  transition: color 0.4s ease;
}
.sm-song-status.is-now-playing {
  color: #16a34a;
}

.msg-thinking { padding: 8px 14px 6px; }
.thinking-elapsed {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.04em;
  color: var(--text-faint);
  padding: 2px 0 0;
}
.thinking-dots {
  display: flex;
  gap: 5px;
  padding: 4px 0 2px;
}
.thinking-dots span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--text-dim);
  animation: think 1.3s ease-in-out infinite;
}
.thinking-dots span:nth-child(2) { animation-delay: 0.18s; }
.thinking-dots span:nth-child(3) { animation-delay: 0.36s; }
@keyframes think {
  0%, 70%, 100% { opacity: 0.25; transform: translateY(0); }
  35% { opacity: 1; transform: translateY(-4px); }
}

#status-bubble {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-dim);
  text-align: center;
  padding: 4px;
  display: none;
}
#status-bubble.active { display: block; }

/* === 输入 === */
#chat-input-wrap {
  display: flex;
  gap: 8px;
  align-items: center;
  padding-top: 8px;
}
#chat-input {
  flex: 1;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--separator);
  border-radius: 999px;
  padding: 10px 16px;
  font-size: 13px;
  font-family: var(--font-mono);
  color: var(--text);
  outline: none;
  min-width: 0;
  transition: all 0.18s;
}
#chat-input:focus {
  border-color: var(--accent-purple-dim);
  background: rgba(0, 0, 0, 0.4);
  box-shadow: 0 0 0 3px rgba(164, 140, 224, 0.1);
}
#chat-input::placeholder { color: var(--text-faint); font-size: 8px; }

#btn-send {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: rgba(236, 233, 245, 0.95);
  color: #14101f;
  border: none;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  flex-shrink: 0;
  transition: all 0.18s;
}
#btn-send:disabled { opacity: 0.3; cursor: default; }
#btn-send:not(:disabled):hover { background: var(--text); transform: scale(1.05); }

/* === Footer === */
#radio-footer {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--separator);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.18em;
  color: var(--text-faint);
  text-transform: uppercase;
}
.ws-status { display: inline-flex; align-items: center; gap: 6px; }
.led-dim {
  width: 5px; height: 5px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.22);
  box-shadow: none;
  opacity: 1;
  transition: background 0.5s, box-shadow 0.5s;
}
body.is-playing .led-dim {
  background: var(--accent-green);
  box-shadow: 0 0 4px var(--accent-green);
}
.ws-status.disconnected .led-dim {
  background: #c97070;
  box-shadow: 0 0 4px #c97070;
}

/* === 设置视图 === */
/* 进入设置时把 glass-card 拉满 app 高度，给内部滚动一个固定容器 */
body.in-settings #glass-card {
  align-self: stretch;
  height: auto;
  flex: 1 1 auto;
  min-height: 0;
  padding-top: 14px;
  padding-bottom: 14px;
}
body.in-settings [data-theme="dark"] #player-view,
body.in-settings #player-view { padding: 0; }

#settings-view {
  padding: 0;
  height: 100%;
  display: flex;
  flex-direction: column;
  min-height: 0;
  flex: 1 1 auto;
}
#settings-view.active { display: flex; }
#settings-header {
  display: flex; align-items: center; gap: 10px;
  padding: 4px 4px 14px;
  flex-shrink: 0;
}
[data-theme="light"] #settings-header { color: var(--ink); }
.settings-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 4px 4px 24px;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,0.18) transparent;
}
.settings-body::-webkit-scrollbar { width: 6px; }
.settings-body::-webkit-scrollbar-track { background: transparent; }
.settings-body::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,0.18);
  border-radius: 3px;
}
.settings-body::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.28); }
#settings-header h2 {
  font-family: var(--font-display);
  font-size: 18px;
  letter-spacing: 0.04em;
  color: var(--text);
}
#btn-back {
  background: rgba(255,255,255,0.06);
  border: 1px solid var(--separator);
  color: var(--text);
  font-size: 16px;
  cursor: pointer;
  width: 34px; height: 34px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
#btn-back:hover { background: rgba(255,255,255,0.12); }

.settings-section {
  margin-bottom: 14px;
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid var(--separator);
  border-radius: 12px;
  padding: 14px 16px;
}
.settings-section h3 {
  font-family: var(--font-mono);
  font-size: 11px; font-weight: 500;
  letter-spacing: 0.16em;
  color: var(--text-dim);
  text-transform: uppercase;
  margin-bottom: 10px;
}
.settings-section .hint {
  font-size: 12px;
  color: var(--text-faint);
  margin-bottom: 12px;
  line-height: 1.6;
}

#import-form { display: flex; gap: 8px; }
#import-url, #ocr-name {
  flex: 1;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid var(--separator);
  border-radius: 8px;
  padding: 9px 12px;
  font-size: 12px;
  font-family: var(--font-mono);
  color: var(--text);
  outline: none;
  min-width: 0;
}
#import-url:focus, #ocr-name:focus { border-color: var(--accent-purple-dim); }
#import-url::placeholder, #ocr-name::placeholder { color: var(--text-faint); }
#ocr-name { width: 100%; margin-bottom: 10px; }

#btn-import, #btn-ocr-import {
  background: rgba(236, 233, 245, 0.95);
  color: #14101f;
  border: none;
  border-radius: 8px;
  padding: 0 16px;
  font-size: 12px; font-weight: 600;
  font-family: var(--font-mono);
  letter-spacing: 0.08em;
  cursor: pointer;
  flex-shrink: 0;
}
#btn-ocr-import { width: 100%; padding: 10px; }
#btn-import:disabled, #btn-ocr-import:disabled { opacity: 0.35; }

#import-status, #ocr-status {
  font-family: var(--font-mono); font-size: 11px;
  color: var(--text-dim); min-height: 16px;
  margin-top: 8px;
}
#import-status.error, #ocr-status.error { color: #c97070; }
#import-status.success, #ocr-status.success { color: var(--accent-green); }

#taste-display, #imports-list {
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid var(--separator);
  border-radius: 10px;
  padding: 14px 16px;
  font-size: 12px;
  line-height: 1.7;
  color: var(--text-dim);
}
#taste-display strong { color: var(--text); font-weight: 500; }

#ocr-platform {
  display: flex; gap: 14px; margin-bottom: 10px;
  font-size: 12px; font-family: var(--font-mono);
  color: var(--text-dim);
}
#ocr-platform label { display: flex; align-items: center; gap: 4px; cursor: pointer; }
#ocr-platform input[type="radio"] { accent-color: var(--accent-purple); }

#ocr-file-label {
  display: block;
  background: rgba(0, 0, 0, 0.2);
  border: 1px dashed var(--separator);
  border-radius: 10px;
  padding: 14px;
  text-align: center;
  font-size: 12px;
  color: var(--text-dim);
  cursor: pointer;
  margin-bottom: 10px;
}
#ocr-file-label:hover { border-color: var(--accent-purple-dim); }

#ocr-preview { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
#ocr-preview img {
  width: 56px; height: 56px;
  object-fit: cover;
  border-radius: 6px;
  border: 1px solid var(--separator);
}

.import-item { padding: 8px 0; border-bottom: 1px solid var(--separator); }
.import-item:last-child { border-bottom: none; }
.import-item .name { color: var(--text); font-size: 12px; }
.import-item .meta {
  color: var(--text-faint); font-size: 10px;
  margin-top: 2px; font-family: var(--font-mono);
}

@keyframes spin { to { transform: rotate(360deg); } }

/* ============ Speaking Mode 抽屉 ============ */
#speaking-mode {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: stretch;
  justify-content: center;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.4s ease;
}
#speaking-mode.active {
  pointer-events: auto;
  opacity: 1;
}

.sm-backdrop {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 80% 60% at 50% 50%, rgba(50, 35, 90, 0.6) 0%, rgba(10, 7, 20, 0.92) 70%);
  backdrop-filter: blur(20px) saturate(140%);
  -webkit-backdrop-filter: blur(20px) saturate(140%);
}

.sm-nebula {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0.65;
}

.sm-panel {
  position: relative;
  width: 100%;
  max-width: 460px;
  margin: auto;
  padding: 22px 22px env(safe-area-inset-bottom, 22px);
  display: flex;
  flex-direction: column;
  gap: 18px;
  transform: translateY(40px) scale(0.96);
  opacity: 0;
  transition: transform 0.55s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.45s ease;
}
#speaking-mode.active .sm-panel {
  transform: translateY(0) scale(1.2);
  opacity: 1;
}

.sm-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.sm-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-display);
  color: var(--text);
}

.sm-led {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent-green);
  box-shadow: 0 0 8px var(--accent-green);
  animation: pulse 1.6s ease-in-out infinite;
}

.sm-name {
  font-size: 17px;
  letter-spacing: 0.04em;
}

.sm-status {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.16em;
  color: var(--accent-green);
  text-transform: uppercase;
  margin-left: 4px;
}

.sm-close {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.12);
  color: var(--text);
  cursor: pointer;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.18s;
}
.sm-close:hover {
  background: rgba(255, 255, 255, 0.12);
  transform: scale(1.05);
}
.sm-close:active { transform: scale(0.92); }

.sm-wave {
  width: 100%;
  height: 56px;
  display: block;
  opacity: 0.85;
}

.sm-card {
  background: #fafaf7;
  color: #14101f;
  border-radius: 12px;
  padding: 26px 26px 22px;
  box-shadow:
    0 30px 80px rgba(0,0,0,0.5),
    0 0 0 1px rgba(255,255,255,0.06),
    inset 0 1px 0 rgba(255,255,255,1);
  display: flex;
  flex-direction: column;
}

.sm-song-name {
  font-family: 'Source Serif Pro', 'Georgia', 'Times New Roman', serif;
  font-size: 28px;
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.015em;
  color: #14101f;
  margin-bottom: 4px;
}

.sm-song-meta {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  color: rgba(20, 16, 31, 0.5);
  margin-bottom: 18px;
}

.sm-transcript {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-height: 38vh;
  overflow-y: auto;
  font-family: -apple-system, 'PingFang SC', 'Source Serif Pro', sans-serif;
}
.sm-transcript::-webkit-scrollbar { width: 0; }

.sm-line {
  opacity: 1;
}
.sm-line-ts {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.04em;
  color: rgba(20, 16, 31, 0.22);
  margin-bottom: 3px;
  transition: color 0.6s ease;
}
.sm-line-text {
  font-size: 15px;
  line-height: 1.6;
  color: rgba(20, 16, 31, 0.25);
  transition: color 0.6s ease;
}
/* 已经读过的：中度灰 */
.sm-line.sm-line-visible .sm-line-ts {
  color: rgba(20, 16, 31, 0.45);
}
.sm-line.sm-line-visible .sm-line-text {
  color: rgba(20, 16, 31, 0.55);
}
/* 当前句：全黑 + 时间戳变绿（Claudio 风格）*/
.sm-line.sm-line-active .sm-line-ts {
  color: var(--accent-green);
}
.sm-line.sm-line-active .sm-line-text {
  color: #14101f;
  font-weight: 500;
}

.sm-hint {
  text-align: center;
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.2em;
  color: rgba(232, 229, 240, 0.28);
  text-transform: uppercase;
  margin-top: 4px;
}

/* =====================================================
   手机适配（iPhone 等窄屏）
   ===================================================== */
@media (max-width: 430px) {
  #app {
    /* 卡片上下边距 = 100pt（从手机可视边缘算起，不叠加 safe-area） */
    padding-left: calc(env(safe-area-inset-left, 0px) + 48px);
    padding-right: calc(env(safe-area-inset-right, 0px) + 48px);
    padding-top: 60px;        /* 上移：原 120 → 60，多出 60pt 留给 chat */
    padding-bottom: env(safe-area-inset-bottom, 0px);  /* 吃掉 80pt 底部留白，只留 home indicator 安全区 */
    justify-content: stretch;
  }
  #glass-card {
    padding: 12px 14px 10px;
    border-radius: 18px;
    max-width: none;
    width: 100%;
    height: 100%;                   /* 卡片占满 #app 整个高度 */
    margin: 0;
  }
  .view {
    width: 100%;
    height: 100%;                   /* view 也撑满，glass-card 才有"100%"参照 */
    align-items: stretch;
  }
  /* chat 区域填满 cover/controls 和 input 之间的所有空白 —— 不允许 empty 时隐藏 */
  #chat-flow {
    flex: 1 1 auto;
    max-height: none;
    min-height: 60px;
  }
  #chat-flow:empty {
    display: flex;     /* 覆盖全局 :empty { display: none }，让空 chat 仍然占位 */
  }

  /* Header 整体压紧 */
  #radio-header { gap: 4px; padding-bottom: 4px; margin-bottom: 4px; }
  .brand-name { font-size: 9px; }
  .brand-dot { width: 4px; height: 4px; }
  .header-clock { font-size: 11px; margin: 0 2px; }
  .theme-tab { padding: 1px 5px; font-size: 6px; letter-spacing: 0.06em; }
  .icon-btn { width: 18px; height: 18px; font-size: 9px; }

  #clock-meta { font-size: 6px; padding: 2px 0 4px; gap: 5px; }

  /* 封面 + 标题 —— 再缩一半 */
  #cover-area { gap: 4px; padding: 2px 0 4px; }
  #cover-img { max-width: 45vw; border-radius: 10px; }
  #cover-placeholder { font-size: 22px; }
  #song-name { font-size: 11px; padding: 0 6px; margin-bottom: 2px; }
  #song-meta { font-size: 8px; gap: 5px; }
  #playing-indicator { font-size: 6px; padding: 1px 4px; }

  #visualizer { height: 14px; margin: 1px 0; }

  /* 进度条 + 时间 */
  #progress-area { padding: 2px 2px; }
  #progress { height: 1.5px; }
  #progress::-webkit-slider-thumb { width: 7px; height: 7px; box-shadow: 0 0 0 2px rgba(164,140,224,0.2); }
  #time-info { font-size: 8px; margin-top: 2px; }

  /* 控件按钮再缩 */
  #control-row { padding: 3px 2px 5px; gap: 6px; }
  #controls { gap: 6px; }
  .ctrl-btn { width: 24px; height: 24px; }
  .ctrl-btn svg { width: 14px; height: 14px; }
  .ctrl-main { width: 30px; height: 30px; box-shadow: 0 0 10px rgba(164, 140, 224, 0.2); }
  .ctrl-main svg { width: 16px; height: 16px; }
  .fb-btn { width: 22px; height: 22px; }
  .fb-btn svg { width: 12px; height: 12px; }
  #feedback-area { left: 2px; gap: 3px; }

  /* 对话流：撑满 controls 和 input 之间的所有空间，把 input + footer 推到卡片底部 */
  /* 注意：上面 (~L1177) 已经定义了 #chat-flow，这里只补样式细节，不再重复 flex/display */
  .msg { font-size: 11px; max-width: 92%; line-height: 1.45; }
  .msg-dj .role { font-size: 7px; }

  /* 输入框 */
  #chat-input-wrap { padding-top: 4px; gap: 5px; }
  #chat-input { padding: 6px 10px; font-size: 8px; }  /* 跟 placeholder 一致；viewport maximum-scale=1 阻止 iOS 缩放 */
  #btn-send { width: 24px; height: 24px; font-size: 12px; }

  /* Footer */
  #radio-footer { margin-top: 4px; padding-top: 4px; font-size: 7px; }

  /* === Speaking Mode 再缩 50% === */
  .sm-panel { padding: 10px 12px env(safe-area-inset-bottom, 10px); gap: 8px; max-width: 280px; }
  .sm-header { gap: 6px; }
  .sm-name { font-size: 11px; }
  .sm-status { font-size: 7px; }
  .sm-led { width: 5px; height: 5px; }
  .sm-close { width: 22px; height: 22px; font-size: 9px; }
  .sm-wave { height: 28px; }
  .sm-card { padding: 12px 12px 10px; border-radius: 8px; }
  .sm-song-status { font-size: 7px; }
  .sm-song-name { font-size: 14px; line-height: 1.15; margin-bottom: 2px; }
  .sm-song-meta { font-size: 8px; margin-bottom: 8px; }
  .sm-transcript { gap: 6px; max-height: 44vh; }
  .sm-line-ts { font-size: 7px; margin-bottom: 1px; }
  .sm-line-text { font-size: 11px; line-height: 1.5; }
  .sm-hint { font-size: 7px; }
}

/* PWA 全屏（加到主屏幕打开）：跟移动端保持一致的卡片位置，
   safe-area-inset-top 兜住 Dynamic Island，再加 120pt 保持视觉一致 */
@media (display-mode: standalone) {
  #app { padding-top: calc(env(safe-area-inset-top, 0px) + 60px); }
}

/* =====================================================
   两侧浮起的粒子（播放时显形）
   - 永远在 DOM 里，但默认隐形
   - body.is-playing 时淡入并持续向上飘
   ===================================================== */
/* 两侧粒子区：
   - 锁在屏幕外侧，跟卡片之间留一段固定空白（80px 缓冲区）
   - 用 mask 让粒子在靠近卡片那一侧渐隐到 0，远离形成的不再是"墙体"而是"扩散尘埃"
   - viewport 太窄（<=640px）时直接 0 宽度，等于不显示 */
.side-gutter {
  display: block;
  position: fixed;
  top: 0; bottom: 0;
  width: max(0px, calc((100vw - 480px) / 2 - 40px));
  pointer-events: none;
  z-index: 1;
  overflow: hidden;
  opacity: 0;
  transition: opacity 1.2s ease;
}
.side-gutter-left {
  left: 0;
  -webkit-mask: linear-gradient(to right, rgba(0,0,0,0.95) 0%, rgba(0,0,0,0.6) 80%, transparent 100%);
          mask: linear-gradient(to right, rgba(0,0,0,0.95) 0%, rgba(0,0,0,0.6) 80%, transparent 100%);
}
.side-gutter-right {
  right: 0;
  -webkit-mask: linear-gradient(to left, rgba(0,0,0,0.95) 0%, rgba(0,0,0,0.6) 80%, transparent 100%);
          mask: linear-gradient(to left, rgba(0,0,0,0.95) 0%, rgba(0,0,0,0.6) 80%, transparent 100%);
}
/* 播放时淡入（dark = 紫色气泡；light 模式不显示粒子，留给后续重新设计） */
body.is-playing .side-gutter { opacity: 1; }
[data-theme="light"] .side-gutter { display: none !important; }

.particle {
  position: absolute;
  bottom: -12px;
  width: 6px; height: 6px;
  border-radius: 50%;
  /* dark：白色核心 + 4 层光晕，更"灼烧"感的气泡 */
  background: #ffffff;
  box-shadow:
    0 0 6px #ffffff,
    0 0 18px rgba(220, 195, 255, 1),
    0 0 36px rgba(180, 130, 245, 0.85),
    0 0 70px rgba(140, 90, 220, 0.5);
  will-change: transform, opacity;
  animation: particle-rise linear infinite;
}
/* 7 颗粒子（dark 模式紫色气泡） —— 不同水平位置、时长、延迟 */
.particle.p1 { left: 20%; width: 4px; height: 4px; animation-duration: 9s;  animation-delay: 0s; }
.particle.p2 { left: 70%; width: 6px; height: 6px; animation-duration: 12s; animation-delay: 2s; }
.particle.p3 { left: 40%; width: 3px; height: 3px; animation-duration: 7s;  animation-delay: 4s; }
.particle.p4 { left: 85%; width: 5px; height: 5px; animation-duration: 10s; animation-delay: 5.5s; }
.particle.p5 { left: 10%; width: 4px; height: 4px; animation-duration: 11s; animation-delay: 7s; }
.particle.p6 { left: 55%; width: 5px; height: 5px; animation-duration: 8.5s; animation-delay: 8.5s; }
.particle.p7 { left: 30%; width: 3px; height: 3px; animation-duration: 13s; animation-delay: 10s; }

/* 右侧镜像，错开半个周期 */
.side-gutter-right .particle { animation-delay: calc(var(--mirror-offset, 1.5s)); }
.side-gutter-right .particle.p1 { left: 70%; animation-delay: 1s; }
.side-gutter-right .particle.p2 { left: 30%; animation-delay: 3.5s; }
.side-gutter-right .particle.p3 { left: 50%; animation-delay: 5s; }
.side-gutter-right .particle.p4 { left: 15%; animation-delay: 6.5s; }
.side-gutter-right .particle.p5 { left: 80%; animation-delay: 8s; }
.side-gutter-right .particle.p6 { left: 40%; animation-delay: 9.5s; }
.side-gutter-right .particle.p7 { left: 65%; animation-delay: 11s; }

@keyframes particle-rise {
  0%   { transform: translateY(0) translateX(0)    scale(0.4); opacity: 0; }
  8%   { opacity: 0.9; }
  50%  { transform: translateY(-50vh) translateX(6px) scale(1); }
  92%  { opacity: 0.9; }
  100% { transform: translateY(-105vh) translateX(-4px) scale(0.6); opacity: 0; }
}

/* 减少动效偏好时，粒子完全不动 */
@media (prefers-reduced-motion: reduce) {
  .particle { animation: none !important; opacity: 0 !important; }
}

/* ===================================================================
   LIGHT 主题 —— Braun 风格乳白机身
   触发：body[data-theme="light"]
   原则：覆盖现有 dark 样式；隐藏 ambient / 粒子 / 可视化 / 玻璃态
   =================================================================== */

/* 默认所有 light-only 元素隐藏（在 dark 模式下不渲染） */
.light-only { display: none !important; }

[data-theme="light"] {
  --case: #ebe6d9;
  --case-top: #f0ebde;
  --case-edge: #d9d3c3;
  --case-deep: #ddd6c5;
  --case-darker: #c4bca8;
  --ink: #1c1a16;
  --ink-2: #5a554c;
  --ink-faint: #9a948a;
  --orange: #e54a1f;
  --orange-soft: #f06b3f;
  --orange-deep: #b73d18;
  --orange-glow: rgba(229, 74, 31, 0.55);
  --knob: #807a72;
  --dot-dim: rgba(60, 50, 35, 0.35);
  --dot-on: #fdf6dd;
  --dot-glow: rgba(252, 240, 200, 0.8);
  --chrome-hi: #fafafa;
  --chrome-lite: #e6e4e0;
  --chrome-mid: #a8a6a1;
  --chrome-shade: #5a5853;
  --chrome-dark: #2a2926;
  --hair: rgba(40, 35, 25, 0.14);
  --hair-soft: rgba(40, 35, 25, 0.07);
}

/* 显示 light-only 元素 */
[data-theme="light"] .light-only { display: flex !important; }
[data-theme="light"] #light-panel.light-only { display: grid !important; }

/* 隐藏 dark 模式的氛围装饰 */
[data-theme="light"] .ambient-blobs,
[data-theme="light"] .side-gutter,
[data-theme="light"] .cursor-spotlight,
[data-theme="light"] .card-highlight,
[data-theme="light"] #visualizer,
[data-theme="light"] #clock-meta,
[data-theme="light"] #big-clock {
  display: none !important;
}
/* light 模式也要 footer（版本号 + 连接状态），但用乳白主题色 */
[data-theme="light"] #radio-footer {
  display: flex !important;
  justify-content: space-between !important;
  align-items: center !important;
  padding: 6px 16px 10px !important;
  margin-top: 0 !important;
  border-top: 1px solid var(--hair-soft) !important;
  font-family: 'JetBrains Mono', monospace !important;
  font-size: 7px !important;
  color: var(--ink-faint) !important;
  letter-spacing: 0.2em !important;
  text-transform: uppercase !important;
  background: transparent !important;
}
[data-theme="light"] #radio-footer .footer-mark { color: var(--ink-faint) !important; }
[data-theme="light"] #radio-footer .ws-status { color: var(--ink-faint) !important; }
[data-theme="light"] #radio-footer .led-dim {
  display: inline-block;
  width: 4px; height: 4px;
  background: var(--orange);
  border-radius: 50%;
  box-shadow: 0 0 3px var(--orange-glow);
  margin-right: 5px;
}

/* 背景：暖灰墙面 */
[data-theme="light"],
[data-theme="light"] body,
[data-theme="light"] #bg-fill {
  /* 单色暖灰墙面（去掉 radial 椭圆，椭圆在卡片侧边会形成可见的色带） */
  background: #c9c2b3 !important;
  background-color: #c9c2b3 !important;
}

[data-theme="light"] body {
  color: var(--ink);
  font-family: 'Inter', -apple-system, 'PingFang SC', 'Helvetica Neue', sans-serif;
}

[data-theme="light"] #player-view {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: calc(env(safe-area-inset-top, 0px) + 24px) 18px
           calc(env(safe-area-inset-bottom, 0px) + 24px) 18px;
  position: relative;
  height: 100dvh;
}

/* 机身：完全重做 glass-card */
[data-theme="light"] #glass-card {
  background: linear-gradient(180deg, var(--case-top) 0%, var(--case) 8%, var(--case) 90%, var(--case-edge) 100%) !important;
  border: none !important;
  border-radius: 6px !important;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.9),
    inset 0 -2px 0 rgba(150, 140, 120, 0.3),
    inset 2px 0 4px -2px rgba(120, 110, 90, 0.2),
    inset -2px 0 4px -2px rgba(120, 110, 90, 0.2),
    0 1px 0 rgba(255, 255, 255, 0.4),
    0 3px 0 rgba(60, 50, 35, 0.2),
    /* 阴影主要在卡片正下方（X 偏 0），用大 blur 让左右扩散平滑融到墙面，避免两侧"硬边" */
    0 18px 32px -8px rgba(40, 32, 20, 0.35),
    0 40px 80px -16px rgba(40, 32, 20, 0.42) !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  width: 100%;
  max-width: 460px;
  flex: 1;
  display: flex !important;
  flex-direction: column;
  overflow: hidden;
  position: relative;
  z-index: 2;
}

/* ========== 金属支架 ========== */
[data-theme="light"] .bracket {
  position: relative;
  width: 100%;
  max-width: 460px;
  height: 18px;
  pointer-events: none;
  z-index: 1;
}
[data-theme="light"] .bracket-leg {
  position: absolute;
  width: 5px; height: 14px;
  background: linear-gradient(90deg,
    var(--chrome-dark) 0%, var(--chrome-shade) 20%,
    var(--chrome-mid) 38%, var(--chrome-hi) 50%,
    var(--chrome-mid) 62%, var(--chrome-shade) 80%,
    var(--chrome-dark) 100%);
  box-shadow: 0 0 1px rgba(0, 0, 0, 0.4), 0 2px 3px rgba(0, 0, 0, 0.3);
}
[data-theme="light"] .bracket.top .bracket-leg { bottom: 0; border-radius: 2px 2px 0 0; }
[data-theme="light"] .bracket.bottom .bracket-leg { top: 0; border-radius: 0 0 2px 2px; }
[data-theme="light"] .bracket-leg.left { left: 14%; }
[data-theme="light"] .bracket-leg.right { right: 14%; }

[data-theme="light"] .bracket-bar {
  position: absolute;
  left: 12%; right: 12%;
  height: 7px;
  background: linear-gradient(180deg,
    var(--chrome-dark) 0%, var(--chrome-shade) 8%,
    var(--chrome-mid) 22%, var(--chrome-hi) 38%,
    var(--chrome-hi) 50%, var(--chrome-lite) 60%,
    var(--chrome-mid) 75%, var(--chrome-shade) 88%,
    var(--chrome-dark) 100%);
  border-radius: 4px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.6), inset 0 -1px 0 rgba(0,0,0,0.45), 0 2px 4px rgba(0,0,0,0.35);
}
[data-theme="light"] .bracket.top .bracket-bar { top: 0; }
[data-theme="light"] .bracket.bottom .bracket-bar { bottom: 0; }

[data-theme="light"] .bracket-bar::before,
[data-theme="light"] .bracket-bar::after {
  content: '';
  position: absolute;
  top: -1px;
  width: 9px; height: 9px;
  background: radial-gradient(circle at 35% 28%,
    var(--chrome-hi) 0%, var(--chrome-lite) 25%,
    var(--chrome-mid) 60%, var(--chrome-shade) 90%,
    var(--chrome-dark) 100%);
  border-radius: 50%;
  box-shadow: 0 1px 2px rgba(0,0,0,0.5), inset 0 -1px 1px rgba(0,0,0,0.3), inset 0 1px 1px rgba(255,255,255,0.4);
}
[data-theme="light"] .bracket-bar::before { left: -4px; }
[data-theme="light"] .bracket-bar::after { right: -4px; }

/* ========== 头部 ========== */
[data-theme="light"] #radio-header {
  padding: 12px 16px 10px !important;
  border-bottom: 1px solid var(--hair-soft) !important;
  display: flex; align-items: center; justify-content: space-between;
  background: transparent !important;
}
[data-theme="light"] #radio-header .brand {
  display: flex; align-items: baseline; gap: 5px;
  font-weight: 700; font-size: 15px; letter-spacing: -0.04em;
  color: var(--ink);
}
[data-theme="light"] #radio-header .brand-dot { display: none; }
[data-theme="light"] #radio-header .brand-name { color: var(--ink); font-family: 'Inter'; }
[data-theme="light"] .header-tabs { display: flex; border: 1px solid var(--case-darker); border-radius: 2px; overflow: hidden; }
[data-theme="light"] .theme-tab {
  background: transparent !important;
  border: 0 !important;
  padding: 3px 7px !important;
  font-family: 'JetBrains Mono', monospace !important;
  font-size: 7px !important;
  letter-spacing: 0.18em !important;
  color: var(--ink-faint) !important;
  text-transform: uppercase !important;
  cursor: pointer;
}
[data-theme="light"] .theme-tab.active {
  background: var(--ink) !important;
  color: var(--case) !important;
}
[data-theme="light"] #btn-settings {
  background: transparent !important;
  border: 1px solid var(--case-darker) !important;
  color: var(--ink-2) !important;
  width: 32px !important;
  height: 32px !important;
  border-radius: 4px !important;
  font-size: 16px !important;
}

/* ========== 「现在播放」放大版：大封面居中 + 信息下方 ========== */
[data-theme="light"] #cover-area {
  margin: 16px 16px 8px !important;
  background: transparent !important;
  border: none !important;
  border-radius: 0 !important;
  padding: 0 !important;
  box-shadow: none !important;
  position: relative !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  gap: 10px !important;
}
[data-theme="light"] #cover-area::before { content: none !important; }
[data-theme="light"] #cover-area::after { content: none !important; }
[data-theme="light"] #cover-img {
  width: 180px !important; height: 180px !important;
  position: relative !important;
  top: auto !important; right: auto !important;
  background: linear-gradient(180deg, #f5f1e6 0%, #ddd6c2 100%) !important;
  border: 1px solid var(--case-darker) !important;
  border-radius: 4px !important;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.7),
    0 2px 4px rgba(40,35,25,0.18),
    0 8px 16px rgba(40,35,25,0.18) !important;
  overflow: hidden;
  flex-shrink: 0;
}
/* 封面右上角红色 LED 状态点 */
[data-theme="light"] #cover-img::after {
  content: '';
  position: absolute;
  top: 7px; right: 7px;
  width: 5px; height: 5px;
  background: var(--orange);
  border-radius: 50%;
  box-shadow: 0 0 6px var(--orange-glow);
  z-index: 2;
}
[data-theme="light"] #cover-placeholder {
  color: var(--ink-faint) !important;
  font-size: 48px !important;
}
[data-theme="light"] #cover-img img {
  width: 100% !important; height: 100% !important;
  object-fit: cover;
}
[data-theme="light"] #song-info {
  text-align: center !important;
  padding: 0 12px !important;
  width: auto !important;
}
[data-theme="light"] #song-name {
  font-family: 'Inter', sans-serif !important;
  font-size: 17px !important;
  font-weight: 500 !important;
  color: var(--ink) !important;
  letter-spacing: -0.01em !important;
  line-height: 1.2 !important;
  text-align: center !important;
  margin-bottom: 4px !important;
  padding: 0 !important;
  white-space: normal !important;
}
/* artist 一行 + PLAYING 单独一行（用 flex column） */
[data-theme="light"] #song-meta {
  display: flex !important;
  flex-direction: column !important;
  gap: 4px !important;
  align-items: center !important;
  justify-content: center !important;
  margin-top: 0 !important;
}
[data-theme="light"] #song-artist {
  font-size: 11px !important;
  color: var(--ink-2) !important;
  letter-spacing: 0 !important;
  font-family: 'Inter', sans-serif !important;
}
[data-theme="light"] #playing-indicator {
  font-family: 'JetBrains Mono', monospace !important;
  font-size: 8px !important;
  color: var(--ink-faint) !important;
  letter-spacing: 0.14em !important;
  text-transform: uppercase !important;
  background: transparent !important;
  border: none !important;
  padding: 0 !important;
}

/* 进度条：调台尺风格 —— 用 ::before 在轨道层画 21 根刻度（5 大 16 小） */
[data-theme="light"] #progress-area {
  margin: 0 16px 8px !important;
  padding: 8px 12px !important;
  background: linear-gradient(180deg, #f5f1e6 0%, #ece7d8 100%) !important;
  border: 1px solid var(--case-darker) !important;
  border-radius: 2px !important;
  box-shadow: inset 0 1px 2px rgba(40, 35, 25, 0.08) !important;
  position: relative !important;
}
[data-theme="light"] #progress-area::before {
  content: '';
  position: absolute;
  left: 12px; right: 12px;
  top: 11px;
  height: 11px;
  background:
    /* 长刻度：每 25%（4+1=5 根） */
    repeating-linear-gradient(90deg,
      rgba(28, 26, 22, 0.85) 0 1px,
      transparent 1px 25%
    ),
    /* 短刻度：每 5%（约 21 根，覆盖长刻度的位置都正好对齐） */
    repeating-linear-gradient(90deg,
      rgba(28, 26, 22, 0.5) 0 1px,
      transparent 1px 5%
    );
  background-size:
    100% 11px,    /* 长刻度占满 11px */
    100% 5px;     /* 短刻度只占 5px 高 */
  background-repeat: no-repeat;
  background-position: 0 0, 0 6px;
  pointer-events: none;
}
[data-theme="light"] #progress {
  -webkit-appearance: none !important;
  appearance: none !important;
  background: transparent !important;
  width: 100%;
  height: 14px;
  cursor: pointer;
  position: relative;
  z-index: 1;  /* 确保 thumb 在刻度之上 */
}
[data-theme="light"] #progress::-webkit-slider-runnable-track {
  height: 1px;
  background: transparent;  /* 让出底层，刻度自己作底 */
  margin-top: 6px;
}
[data-theme="light"] #progress::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 2px;
  height: 14px;
  background: var(--orange);
  border: none;
  border-radius: 0;
  margin-top: -6px;
  box-shadow: 0 0 4px var(--orange-glow);
}
[data-theme="light"] #progress::-moz-range-track {
  height: 1px;
  background: var(--case-darker);
}
[data-theme="light"] #progress::-moz-range-thumb {
  width: 2px;
  height: 14px;
  background: var(--orange);
  border: none;
  border-radius: 0;
  box-shadow: 0 0 4px var(--orange-glow);
}
[data-theme="light"] #time-info {
  display: flex; justify-content: space-between;
  font-family: 'JetBrains Mono', monospace !important;
  font-size: 8px !important;
  color: var(--ink-faint) !important;
  letter-spacing: 0.05em !important;
  margin-top: 2px !important;
}

/* ========== 控制面板：旋钮 + LED 时钟 ========== */
[data-theme="light"] #light-panel {
  margin: 0 16px !important;
  padding: 14px 4px !important;
  display: grid;
  grid-template-columns: 1fr 1.3fr;
  gap: 12px;
  border-top: 1px solid var(--hair-soft);
  border-bottom: 1px solid var(--hair-soft);
  align-items: center;
}
[data-theme="light"] .knobs {
  display: flex; justify-content: space-around; align-items: flex-start;
}
[data-theme="light"] .knob-cell {
  display: flex; flex-direction: column; align-items: center; gap: 5px;
}
[data-theme="light"] .knob-wrap {
  position: relative;
  width: 56px; height: 56px;
  display: flex; align-items: center; justify-content: center;
}
[data-theme="light"] .knob {
  width: 38px; height: 38px;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  position: relative;
  background: radial-gradient(circle at 38% 30%, #b8b2a6 0%, #8e887e 55%, #6d685f 100%);
  box-shadow:
    inset 1px 1px 1px rgba(255, 255, 255, 0.35),
    inset -1px -2px 3px rgba(0, 0, 0, 0.25),
    0 1px 1px rgba(20, 18, 14, 0.3),
    0 4px 6px rgba(20, 18, 14, 0.22),
    0 8px 14px rgba(20, 18, 14, 0.12);
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}
[data-theme="light"] .knob:active {
  transform: translateY(1px);
  box-shadow:
    inset 1px 1px 1px rgba(255, 255, 255, 0.25),
    inset -1px -1px 2px rgba(0, 0, 0, 0.2),
    0 1px 1px rgba(20, 18, 14, 0.25),
    0 2px 4px rgba(20, 18, 14, 0.18);
}
[data-theme="light"] .knob::after {
  content: '';
  position: absolute;
  top: 5px; left: 50%;
  width: 4px; height: 4px;
  background: var(--orange);
  border-radius: 50%;
  transform: translateX(-50%);
  transform-origin: 50% 14px;
  box-shadow: 0 0 2px rgba(0, 0, 0, 0.3);
}
[data-theme="light"] .knob-wrap .tick {
  position: absolute;
  width: 2px; height: 2px;
  background: var(--ink-2);
  border-radius: 50%;
  opacity: 0.55;
}
[data-theme="light"] .knob-label {
  font-size: 11px;
  color: var(--ink);
  letter-spacing: 0.02em;
  text-transform: lowercase;
  font-weight: 500;
}
[data-theme="light"] .knob-value {
  font-family: 'JetBrains Mono', monospace;
  font-size: 9px;
  color: var(--orange);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  margin-top: 0;
  font-weight: 500;
}

/* LED 点阵时钟 */
[data-theme="light"] .led-panel {
  background: var(--case-deep);
  border-radius: 3px;
  padding: 8px 10px 6px;
  box-shadow: inset 0 1px 2px rgba(40, 35, 25, 0.18), inset 0 -1px 0 rgba(255, 255, 255, 0.4);
  display: flex; flex-direction: column;
  gap: 4px;
  min-height: 76px;
}
[data-theme="light"] .led-grid {
  display: grid;
  grid-template-columns: repeat(21, 1fr);
  grid-template-rows: repeat(7, 1fr);
  gap: 2px;
  flex: 1;
  place-items: center;
}
[data-theme="light"] .gdot {
  width: 2px; height: 2px;
  border-radius: 50%;
  background: var(--dot-dim);
  transition: background 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}
[data-theme="light"] .gdot.lit {
  background: var(--dot-on);
  box-shadow:
    0 0 2px #ffffff,
    0 0 5px var(--dot-glow),
    0 0 10px rgba(250, 235, 195, 0.4),
    0 0 18px rgba(250, 230, 185, 0.2);
  transform: scale(1.7);
}
[data-theme="light"] .led-foot {
  display: flex; justify-content: flex-end;
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  font-size: 7.5px;
  letter-spacing: -0.01em;
  color: var(--ink-2);
  opacity: 0.7;
}

/* ========== 播放行：5 圆盘按键 ========== */
[data-theme="light"] #control-row {
  margin: 14px 16px 12px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 14px !important;
  background: transparent !important;
  padding: 0 !important;
}
[data-theme="light"] #feedback-area {
  display: contents !important;
}
[data-theme="light"] #controls {
  display: contents !important;
}
/* fb-btn 和 ctrl-btn 都长成圆盘 */
[data-theme="light"] .fb-btn,
[data-theme="light"] .ctrl-btn {
  width: 42px !important; height: 42px !important;
  border-radius: 50% !important;
  border: none !important;
  cursor: pointer;
  display: flex !important; align-items: center; justify-content: center;
  position: relative;
  background: radial-gradient(circle at 40% 32%, #f6f1e3 0%, #ece6d6 55%, #ddd6c2 100%) !important;
  box-shadow:
    inset 1px 1px 1px rgba(255, 255, 255, 0.85),
    inset -1px -2px 3px rgba(120, 110, 90, 0.25),
    0 1px 1px rgba(40, 35, 25, 0.25),
    0 4px 6px rgba(40, 35, 25, 0.18),
    0 8px 14px rgba(40, 35, 25, 0.1) !important;
  color: var(--ink-2) !important;
  transition: transform 0.1s ease, box-shadow 0.1s ease !important;
  margin: 0 !important;
  opacity: 1 !important;
  padding: 0 !important;
}
[data-theme="light"] .fb-btn:active,
[data-theme="light"] .ctrl-btn:active {
  transform: translateY(1px) !important;
  box-shadow:
    inset 1px 1px 1px rgba(255, 255, 255, 0.5),
    inset -1px -1px 2px rgba(120, 110, 90, 0.2),
    0 1px 1px rgba(40, 35, 25, 0.2),
    0 2px 4px rgba(40, 35, 25, 0.15) !important;
}
/* 喜欢 / 不喜欢激活态：橙色填充 + 浅橙背景 */
[data-theme="light"] .fb-btn.active-like,
[data-theme="light"] .fb-btn.active-dislike {
  color: var(--orange) !important;
  background: radial-gradient(circle at 40% 32%, #fde9df 0%, #fadac9 55%, #f4c2a8 100%) !important;
  box-shadow:
    inset 1px 1px 1px rgba(255,255,255,0.7),
    inset -1px -2px 3px rgba(180,60,25,0.2),
    0 1px 1px rgba(120,30,10,0.2),
    0 4px 6px rgba(120,30,10,0.15) !important;
}

[data-theme="light"] .ctrl-main {
  width: 56px !important; height: 56px !important;
  background: radial-gradient(circle at 40% 30%, #f47445 0%, var(--orange) 55%, #c43d15 100%) !important;
  box-shadow:
    inset 1px 1px 1px rgba(255, 220, 200, 0.6),
    inset -1px -2px 3px rgba(120, 30, 10, 0.35),
    0 1px 2px rgba(120, 30, 10, 0.35),
    0 5px 8px rgba(120, 30, 10, 0.3),
    0 10px 18px rgba(180, 60, 25, 0.18) !important;
  color: #fff !important;
}
[data-theme="light"] .ctrl-main:active {
  transform: translateY(1px) !important;
  box-shadow:
    inset 1px 1px 1px rgba(255, 220, 200, 0.4),
    inset -1px -1px 2px rgba(120, 30, 10, 0.3),
    0 1px 2px rgba(120, 30, 10, 0.3),
    0 3px 5px rgba(120, 30, 10, 0.22) !important;
}

/* 按钮顺序：dislike, prev, play, next, like
   现有 HTML 顺序：feedback-area(dislike,like), controls(prev,play,next)
   用 order 重排 */
[data-theme="light"] #btn-dislike { order: 1; }
[data-theme="light"] #btn-prev    { order: 2; }
[data-theme="light"] #btn-play    { order: 3; }
[data-theme="light"] #btn-next    { order: 4; }
[data-theme="light"] #btn-like    { order: 5; }

/* ========== 铭牌 ========== */
[data-theme="light"] #typeplate {
  margin: 0 16px !important;
  padding: 5px 0 !important;
  display: flex !important;
  justify-content: space-between !important;
  align-items: center !important;
  border-top: 1px solid var(--hair-soft);
  border-bottom: 1px solid var(--hair-soft);
  font-family: 'JetBrains Mono', monospace;
  font-size: 7px;
  color: var(--ink-faint);
  letter-spacing: 0.2em;
  text-transform: uppercase;
}
[data-theme="light"] .typeplate-led {
  display: inline-block;
  width: 4px; height: 4px;
  background: var(--orange);
  border-radius: 50%;
  box-shadow: 0 0 3px var(--orange-glow);
  margin-right: 5px;
  vertical-align: 1px;
}
/* 当前 mood/pace 实时提示：右侧铭牌位置 */
[data-theme="light"] .mood-indicator {
  letter-spacing: 0.15em;
}
[data-theme="light"] #mood-pace-tag {
  color: var(--orange);
  font-weight: 500;
  letter-spacing: 0.18em;
  transition: opacity 0.2s;
}
[data-theme="light"] #mood-pace-tag.just-changed {
  animation: tagPulse 0.6s ease;
}
@keyframes tagPulse {
  0%   { opacity: 0.3; transform: scale(0.95); }
  50%  { opacity: 1; transform: scale(1.08); }
  100% { opacity: 1; transform: scale(1); }
}

/* ========== 对话流 ========== */
/* light 模式：撑满 controls 和 input 之间所有剩余空间，把 input 推到底
   覆盖 dark 模式的 max-height: 32vh / flex: 0 0 auto */
[data-theme="light"] #chat-flow {
  flex: 1 1 0 !important;
  min-height: 0 !important;
  max-height: none !important;
  overflow-y: auto !important;
  padding: 10px 16px 6px !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 8px !important;
  background: transparent !important;
}
[data-theme="light"] #chat-flow .msg {
  font-size: 12px !important;
  line-height: 1.6 !important;
  padding: 8px 11px !important;
  border-radius: 2px !important;
  max-width: 92% !important;
  font-family: 'Inter', -apple-system, 'PingFang SC', sans-serif !important;
}
[data-theme="light"] #chat-flow .msg-dj,
[data-theme="light"] #chat-flow .msg.dj {
  background: #f3eee2 !important;
  border: 1px solid var(--case-darker) !important;
  color: var(--ink) !important;
  align-self: flex-start !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6) !important;
}
/* DJ 标签：从绿色改成橙色 */
[data-theme="light"] .msg-dj .role {
  color: var(--orange) !important;
}
/* 思考中的卡片：跳点 + 计时文字在 light 下需要可见的颜色 */
[data-theme="light"] .thinking-dots span {
  background: var(--orange) !important;
  opacity: 0.8;
}
[data-theme="light"] .thinking-elapsed {
  color: var(--ink-faint) !important;
}
[data-theme="light"] #chat-flow .msg-user,
[data-theme="light"] #chat-flow .msg.user {
  align-self: flex-end !important;
  background: var(--ink) !important;
  color: var(--case) !important;
  border: 1px solid var(--ink) !important;
}
[data-theme="light"] #chat-flow .upcoming-card {
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
  padding: 8px 10px !important;
  background: #f3eee2 !important;
  border: 1px solid var(--case-darker) !important;
  border-radius: 4px !important;
  font-size: 11px !important;
  color: var(--ink-2) !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.6) !important;
  cursor: pointer;
}
[data-theme="light"] #chat-flow .upcoming-card:hover {
  background: #fbe7d8 !important;
  border-color: rgba(229,74,31,0.4) !important;
}
/* upcoming-card 子元素文字颜色：从 dark 的 var(--text)/var(--text-faint) 改成 ink */
[data-theme="light"] .upcoming-name { color: var(--ink) !important; font-size: 13px !important; }
[data-theme="light"] .upcoming-artist { color: var(--ink-2) !important; }
[data-theme="light"] .upcoming-label { color: var(--ink-faint) !important; }
[data-theme="light"] .upcoming-cover {
  background: var(--case-deep) !important;
  border: 1px solid var(--case-darker) !important;
  color: var(--ink-faint) !important;
}
/* 正在播放的卡片：橙色描边（不变背景，避免和已播过的视觉差太大） */
[data-theme="light"] .upcoming-card.is-now-playing {
  border-color: var(--orange) !important;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.6),
    0 0 0 1px var(--orange) inset !important;
}
[data-theme="light"] .upcoming-card.is-now-playing .upcoming-label {
  color: var(--orange) !important;
}
/* 折叠展开的"还有 N 首"summary */
[data-theme="light"] details.upcoming-more > summary {
  color: var(--ink-faint) !important;
}
[data-theme="light"] details.upcoming-more[open] > summary {
  color: var(--ink-2) !important;
}
/* 跳过的 / 缺失的 */
[data-theme="light"] .upcoming-card.is-missed {
  text-decoration-color: var(--ink-faint) !important;
}
/* 队列提示行（msg-queue）颜色也修一下 */
[data-theme="light"] .msg-queue {
  color: var(--ink-faint) !important;
}

/* ========== 输入条：永远置底 ========== */
[data-theme="light"] #chat-input-wrap {
  display: flex !important;
  gap: 6px !important;
  padding: 10px 16px !important;
  border-top: 1px solid var(--hair-soft) !important;
  background: linear-gradient(180deg, var(--case) 0%, var(--case-edge) 100%) !important;
  flex-shrink: 0 !important;  /* 永不被对话流挤压 */
  margin-top: auto;            /* chat 区为空时仍贴 #case 底 */
}
[data-theme="light"] #chat-input {
  flex: 1 !important;
  background: #f4efe2 !important;
  border: 1px solid var(--case-darker) !important;
  border-radius: 2px !important;
  padding: 7px 10px !important;
  font-family: 'Inter', sans-serif !important;
  font-size: 11px !important;
  color: var(--ink) !important;
  outline: none !important;
  box-shadow: inset 0 1px 2px rgba(40, 35, 25, 0.08) !important;
}
[data-theme="light"] #chat-input::placeholder {
  color: var(--ink-faint) !important;
}
[data-theme="light"] #btn-send {
  width: 32px !important; height: 32px !important;
  background: var(--ink) !important;
  color: var(--case) !important;
  border: 1px solid var(--ink) !important;
  border-radius: 2px !important;
  cursor: pointer;
  font-size: 13px !important;
  padding: 0 !important;
}

/* ========== 设置视图：跟随 light 主题色 ========== */
[data-theme="light"] #settings-view {
  background: linear-gradient(180deg, var(--case-top) 0%, var(--case) 100%) !important;
  color: var(--ink) !important;
}
[data-theme="light"] #settings-header h2 {
  color: var(--ink) !important;
}
[data-theme="light"] #settings-view input[type="text"],
[data-theme="light"] #settings-view input[type="url"] {
  background: #f4efe2 !important;
  border: 1px solid var(--case-darker) !important;
  color: var(--ink) !important;
}
[data-theme="light"] #settings-view button {
  background: var(--ink) !important;
  color: var(--case) !important;
  border: 1px solid var(--ink) !important;
}
[data-theme="light"] .settings-section h3 {
  color: var(--ink) !important;
}
[data-theme="light"] .settings-section {
  background: var(--case) !important;
  border-color: var(--case-darker) !important;
}
[data-theme="light"] .hint {
  color: var(--ink-2) !important;
}

/* status-bubble 在 light 下走低调灰 */
[data-theme="light"] #status-bubble {
  background: var(--case-deep) !important;
  color: var(--ink-2) !important;
  border: 1px solid var(--case-darker) !important;
}


/* ===================================================================
   LIGHT 模式 · Speaking Mode 抽屉
   =================================================================== */
/* dark 模式专属：星云 canvas 和波形 canvas 在 light 模式隐藏 */
[data-theme="light"] .sm-nebula,
[data-theme="light"] .sm-wave {
  display: none !important;
}

/* 半透暖白沙尘背板：代替 dark 的紫色 backdrop */
[data-theme="light"] .sm-backdrop {
  background:
    radial-gradient(ellipse 60% 50% at 50% 35%, rgba(255, 240, 220, 0.75) 0%, transparent 70%),
    radial-gradient(ellipse 80% 60% at 50% 50%, rgba(235, 230, 217, 0.78) 0%, rgba(201, 194, 179, 0.88) 70%) !important;
  backdrop-filter: blur(20px) saturate(115%) !important;
  -webkit-backdrop-filter: blur(20px) saturate(115%) !important;
}

/* 稀疏暖白点阵：替代深色版的 nebula */
[data-theme="light"] .sm-dots {
  display: block !important;
  position: absolute; inset: 0;
  pointer-events: none;
  background-image:
    radial-gradient(circle, rgba(255, 240, 200, 0.55) 0.8px, transparent 1px);
  background-size: 28px 28px;
  opacity: 0.6;
  -webkit-mask: radial-gradient(ellipse 70% 60% at 50% 50%, black 30%, transparent 70%);
          mask: radial-gradient(ellipse 70% 60% at 50% 50%, black 30%, transparent 70%);
}

/* 顶部 brand */
[data-theme="light"] .sm-header {
  padding-bottom: 12px;
  border-bottom: 1px solid var(--hair-soft);
}
[data-theme="light"] .sm-brand {
  font-family: 'Inter', sans-serif !important;
  color: var(--ink) !important;
}
[data-theme="light"] .sm-led {
  background: var(--orange) !important;
  box-shadow: 0 0 8px var(--orange-glow) !important;
  animation: smLedPulseLight 1.4s ease-in-out infinite;
}
@keyframes smLedPulseLight {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}
[data-theme="light"] .sm-name {
  color: var(--ink) !important;
  font-weight: 600 !important;
  font-size: 15px !important;
  letter-spacing: -0.01em !important;
}
[data-theme="light"] .sm-status {
  color: var(--orange) !important;
  font-family: 'JetBrains Mono', monospace !important;
  font-size: 8px !important;
  letter-spacing: 0.22em !important;
  text-transform: uppercase !important;
}
[data-theme="light"] .sm-close {
  background: var(--case) !important;
  border: 1px solid var(--case-darker) !important;
  color: var(--ink-2) !important;
  border-radius: 50% !important;
  box-shadow: 0 2px 4px rgba(40,35,25,0.15) !important;
}

/* 中央卡片：暖卡纸质感 */
[data-theme="light"] .sm-card {
  background: var(--case) !important;
  border: 1px solid var(--case-darker) !important;
  border-radius: 6px !important;
  padding: 18px !important;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.7),
    0 2px 4px rgba(40,35,25,0.12),
    0 8px 16px rgba(40,35,25,0.15) !important;
}
[data-theme="light"] .sm-song-status {
  font-family: 'JetBrains Mono', monospace !important;
  font-size: 8px !important;
  letter-spacing: 0.22em !important;
  color: var(--ink-faint) !important;
  text-transform: uppercase !important;
  margin-bottom: 6px !important;
}
[data-theme="light"] .sm-song-status.is-now-playing {
  color: var(--orange) !important;
}
[data-theme="light"] .sm-song-name {
  font-size: 18px !important;
  font-weight: 500 !important;
  color: var(--ink) !important;
  letter-spacing: -0.01em !important;
  line-height: 1.3 !important;
}
[data-theme="light"] .sm-song-meta {
  font-size: 11px !important;
  color: var(--ink-2) !important;
  margin-top: 3px !important;
}
/* 逐句转录：已念/正念/待念三态 */
[data-theme="light"] .sm-transcript {
  margin-top: 14px !important;
  padding-top: 12px !important;
  border-top: 1px solid var(--hair-soft) !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 6px !important;
}
[data-theme="light"] .sm-line {
  font-size: 13px !important;
  line-height: 1.6 !important;
  color: var(--ink-faint) !important;
  transition: color 0.35s;
}
[data-theme="light"] .sm-line.spoken { color: var(--ink-2) !important; }
[data-theme="light"] .sm-line.current {
  color: var(--ink) !important;
  font-weight: 500 !important;
}
[data-theme="light"] .sm-line.upcoming { opacity: 0.6 !important; }

/* 橙色发光点阵波形：替代 canvas */
[data-theme="light"] .sm-wave-bars {
  display: grid !important;
  grid-template-columns: repeat(40, 1fr) !important;
  gap: 3px;
  height: 36px;
  align-items: center;
  padding: 4px 8px;
}
[data-theme="light"] .sm-wave-bars span {
  display: block;
  background: var(--orange);
  width: 2px;
  height: var(--h, 6px);
  border-radius: 1px;
  opacity: 0.85;
  box-shadow: 0 0 4px var(--orange-glow);
  animation: smBarLight 1.2s ease-in-out infinite;
  animation-delay: var(--d, 0s);
}
@keyframes smBarLight {
  0%, 100% { height: var(--h, 6px); }
  50% { height: calc(var(--h, 6px) * 2.2); }
}

[data-theme="light"] .sm-hint {
  font-family: 'JetBrains Mono', monospace !important;
  font-size: 8px !important;
  letter-spacing: 0.22em !important;
  color: var(--ink-faint) !important;
  text-transform: uppercase !important;
  text-align: center !important;
  margin-top: 4px !important;
}


/* ===================================================================
   Onboarding 欢迎层（首次访问/设置里手动打开）
   =================================================================== */
#onboarding {
  position: fixed; inset: 0;
  z-index: 200;
  display: flex; align-items: center; justify-content: center;
  background: radial-gradient(ellipse at 50% 30%, rgba(10, 7, 20, 0.92) 0%, rgba(5, 3, 12, 0.97) 70%);
  backdrop-filter: blur(40px) saturate(140%);
  -webkit-backdrop-filter: blur(40px) saturate(140%);
  padding: 24px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease;
}
#onboarding.hidden { display: none; }
#onboarding.active {
  opacity: 1;
  pointer-events: auto;
}
.ob-card {
  width: 100%;
  max-width: 460px;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.04) 0%, transparent 30%),
    radial-gradient(circle at center, rgba(255,255,255,0.045) 1px, transparent 1px),
    rgba(28, 24, 44, 0.7);
  background-size: 100% 100%, 14px 14px, 100% 100%;
  border: 1px solid rgba(180, 160, 230, 0.22);
  border-radius: 20px;
  box-shadow: 0 0 80px rgba(120, 90, 200, 0.3), inset 0 1px 0 rgba(255,255,255,0.08);
  padding: 28px 24px;
  color: var(--text);
  font-family: var(--font-sans);
}
.ob-brand {
  display: flex; align-items: center; gap: 8px;
  font-family: var(--font-display);
  font-size: 14px;
  letter-spacing: 0.02em;
  margin-bottom: 6px;
  color: var(--text-dim);
}
.ob-led {
  width: 8px; height: 8px;
  background: var(--accent-green);
  border-radius: 50%;
  box-shadow: 0 0 8px var(--accent-green);
}
.ob-title {
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin: 0 0 8px 0;
}
.ob-lead {
  font-size: 13.5px;
  line-height: 1.75;
  color: var(--text-dim);
  margin: 0 0 22px 0;
}
.ob-lead .ob-accent {
  color: var(--text);
  font-weight: 500;
}
.ob-section-label {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--separator);
}
.ob-features {
  display: flex; flex-direction: column;
  gap: 14px;
  margin: 0 0 22px 0;
}
.ob-feature {
  display: flex; gap: 12px; align-items: flex-start;
}
.ob-feature-num {
  width: 22px; height: 22px;
  border-radius: 50%;
  background: rgba(164, 140, 224, 0.12);
  border: 1px solid rgba(164, 140, 224, 0.3);
  color: var(--accent-purple);
  font-size: 11px;
  font-weight: 600;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  margin-top: 1px;
  font-family: var(--font-sans);
}
.ob-feature-body { flex: 1; min-width: 0; }
.ob-feature-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 3px;
  letter-spacing: 0.01em;
}
.ob-feature-text {
  font-size: 12px;
  line-height: 1.65;
  color: var(--text-dim);
}
.ob-feature-text b { color: var(--text); font-weight: 500; }
.ob-feature-future .ob-feature-num {
  background: transparent;
  border-style: dashed;
  color: var(--text-faint);
}
.ob-feature-future .ob-feature-title { color: var(--text-dim); }
.ob-choose {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.18em;
  color: var(--text-faint);
  text-transform: uppercase;
  margin-bottom: 8px;
}
.ob-actions {
  display: flex; flex-direction: column;
  gap: 8px;
  margin-bottom: 14px;
}
.ob-btn {
  display: flex; flex-direction: column;
  align-items: flex-start;
  gap: 3px;
  padding: 14px 16px;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--separator);
  border-radius: 10px;
  color: var(--text);
  cursor: pointer;
  text-align: left;
  transition: all 0.18s;
  font-family: inherit;
}
.ob-btn:hover {
  background: rgba(164, 140, 224, 0.1);
  border-color: var(--accent-purple-dim);
}
.ob-btn-title { font-size: 14px; font-weight: 500; }
.ob-btn-sub { font-size: 11px; color: var(--text-dim); font-family: var(--font-mono); letter-spacing: 0.02em; }
.ob-btn.primary {
  background: linear-gradient(180deg, rgba(164, 140, 224, 0.22), rgba(120, 90, 200, 0.18));
  border-color: var(--accent-purple-dim);
}
.ob-btn.primary:hover {
  background: linear-gradient(180deg, rgba(164, 140, 224, 0.32), rgba(120, 90, 200, 0.26));
}
.ob-owner-link {
  background: transparent;
  border: none;
  padding: 8px 0;
  margin: 0 auto;
  display: block;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  color: var(--text-faint);
  text-transform: uppercase;
  cursor: pointer;
}
.ob-owner-link:hover { color: var(--text-dim); }

/* ===================================================================
   访客模式（继承品味）：隐藏反馈按钮，禁用部分功能
   =================================================================== */
body.is-inherit-taste #feedback-area,
body.is-inherit-taste .owner-only {
  display: none !important;
}
/* 反馈在 light 模式是圆盘按钮，在 control-row 里。隐藏整组 */
body.is-inherit-taste [data-theme="light"] #btn-like,
body.is-inherit-taste [data-theme="light"] #btn-dislike,
body[data-theme="light"].is-inherit-taste #btn-like,
body[data-theme="light"].is-inherit-taste #btn-dislike {
  display: none !important;
}

/* ===================================================================
   设置页：profile 卡 + 整体布局
   =================================================================== */
.settings-profile {
  background: rgba(164, 140, 224, 0.08);
  border: 1px solid var(--accent-purple-dim);
  border-radius: 10px;
  padding: 14px 16px !important;
}
#profile-card .profile-name {
  font-size: 16px;
  font-weight: 500;
  color: var(--text);
  margin-bottom: 3px;
}
#profile-card .profile-meta {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-faint);
  letter-spacing: 0.05em;
}
.profile-actions {
  margin-top: 12px;
  display: flex; gap: 8px;
}
.profile-actions .secondary {
  background: transparent;
  border: 1px solid var(--separator);
  color: var(--text-dim);
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 11px;
  cursor: pointer;
  font-family: var(--font-mono);
  letter-spacing: 0.06em;
}
.profile-actions .secondary:hover {
  color: var(--text); border-color: var(--accent-purple-dim);
}

/* 折叠式 OCR 区 */
.settings-details {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--separator);
}
.settings-details > summary {
  cursor: pointer;
  font-size: 12px;
  color: var(--text-dim);
  list-style: none;
  user-select: none;
  font-family: var(--font-mono);
  letter-spacing: 0.06em;
  padding: 4px 0;
}
.settings-details > summary::-webkit-details-marker { display: none; }
.settings-details > summary::before {
  content: '▸ ';
  color: var(--text-faint);
  transition: transform 0.2s;
}
.settings-details[open] > summary::before { content: '▾ '; }

/* light 模式同步：profile 卡 */
[data-theme="light"] .settings-profile {
  background: #fde9df !important;
  border-color: rgba(229, 74, 31, 0.4) !important;
}
[data-theme="light"] #profile-card .profile-name { color: var(--ink) !important; }
[data-theme="light"] #profile-card .profile-meta { color: var(--ink-faint) !important; }
[data-theme="light"] .profile-actions .secondary {
  background: var(--case) !important;
  border-color: var(--case-darker) !important;
  color: var(--ink-2) !important;
}
[data-theme="light"] .settings-details > summary { color: var(--ink-2) !important; }

/* ===================================================================
   "DJ 对你的整体了解" 卡：突出色块
   =================================================================== */
.settings-taste-card {
  background: rgba(108, 196, 255, 0.06);
  border: 1px solid rgba(108, 196, 255, 0.18);
  border-radius: 10px;
  padding: 14px 16px !important;
}
.settings-taste-card #taste-display {
  background: transparent;
  border: none;
  padding: 0;
}
[data-theme="light"] .settings-taste-card {
  background: #f4efe2 !important;
  border-color: var(--case-darker) !important;
}

/* ===================================================================
   "📱 不知道怎么拿链接？" 行内链接按钮
   =================================================================== */
.link-btn {
  background: none;
  border: none;
  padding: 0;
  margin-left: 6px;
  color: var(--accent-purple, #a48ce0);
  font-size: 12px;
  font-family: inherit;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
  text-decoration-color: rgba(164,140,224,0.35);
}
.link-btn:hover { color: #c4b3ea; }
[data-theme="light"] .link-btn { color: var(--orange) !important; text-decoration-color: rgba(229,74,31,0.4) !important; }
[data-theme="light"] .link-btn:hover { color: #c43f1a !important; }

/* ===================================================================
   已导入：按平台区分样式
   =================================================================== */
#imports-list {
  display: flex; flex-direction: column; gap: 8px;
  background: transparent;
  border: none;
  padding: 0;
}
.import-item {
  display: block;
  background: rgba(0,0,0,0.22);
  border: 1px solid var(--separator);
  border-radius: 8px;
  font-size: 12px;
  overflow: hidden;
}
.import-item .ii-badge {
  width: 26px; height: 26px;
  border-radius: 6px;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px;
  font-weight: 600;
  background: rgba(255,255,255,0.06);
  border: 1px solid var(--separator);
  color: var(--text-dim);
  flex-shrink: 0;
}
.import-item .ii-body { flex: 1; min-width: 0; }
.import-item .ii-name {
  color: var(--text);
  font-weight: 500;
  margin-bottom: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.import-item .ii-meta {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-faint);
  letter-spacing: 0.04em;
}
.import-item .ii-platform-tag {
  font-size: 10px;
  font-weight: 500;
  padding: 1px 6px;
  border-radius: 4px;
  margin-right: 6px;
  background: rgba(255,255,255,0.06);
  color: var(--text-faint);
  letter-spacing: 0.04em;
}

[data-theme="light"] .import-item {
  background: var(--case-deep) !important;
  border-color: var(--case-darker) !important;
}
[data-theme="light"] .import-item .ii-name { color: var(--ink) !important; }
[data-theme="light"] .import-item .ii-meta { color: var(--ink-faint) !important; }
[data-theme="light"] .import-item .ii-badge {
  background: var(--case) !important;
  border-color: var(--case-darker) !important;
  color: var(--ink-2) !important;
}
[data-theme="light"] .import-item .ii-platform-tag {
  background: var(--case) !important;
  color: var(--ink-faint) !important;
}

/* ===================================================================
   NCM 引导 Modal
   =================================================================== */
.modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.modal.hidden { display: none; }
.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(8, 6, 18, 0.72);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.modal-card {
  position: relative;
  background: linear-gradient(180deg, #1a1428 0%, #14101f 100%);
  border: 1px solid rgba(164, 140, 224, 0.25);
  border-radius: 16px;
  padding: 22px 18px 18px;
  width: 100%;
  max-width: 880px;
  max-height: calc(100dvh - 32px);
  overflow-y: auto;
  box-shadow: 0 24px 60px rgba(0,0,0,0.5);
}
.modal-card::-webkit-scrollbar { width: 6px; }
.modal-card::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.18); border-radius: 3px; }
.modal-close {
  position: absolute;
  top: 10px; right: 12px;
  width: 30px; height: 30px;
  border-radius: 50%;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.12);
  color: var(--text-dim);
  font-size: 18px;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}
.modal-close:hover { color: var(--text); background: rgba(255,255,255,0.12); }
.modal-title {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 4px;
  text-align: center;
}
.modal-subtitle {
  font-size: 11px;
  color: var(--text-faint);
  text-align: center;
  margin-bottom: 16px;
  line-height: 1.5;
}
[data-theme="light"] .modal-subtitle { color: var(--ink-faint) !important; }
[data-theme="light"] .modal-card {
  background: linear-gradient(180deg, var(--case) 0%, var(--case-deep) 100%) !important;
  border-color: var(--case-darker) !important;
}
[data-theme="light"] .modal-title { color: var(--ink-2) !important; }
[data-theme="light"] .modal-close {
  background: var(--case-deep) !important;
  border-color: var(--case-darker) !important;
  color: var(--ink) !important;
}

/* ===== NCM 3 屏 mini phones ===== */
.ncm-phones-mini {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}
@media (max-width: 640px) {
  .ncm-phones-mini { grid-template-columns: 1fr; }
}
.ncm-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}
.ncm-step-num {
  width: 22px; height: 22px;
  border-radius: 50%;
  background: var(--accent-purple, #a48ce0);
  color: #14101f;
  font-size: 12px;
  font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}
[data-theme="light"] .ncm-step-num {
  background: var(--orange) !important;
  color: #fff !important;
}
.ncm-cap {
  font-size: 11px;
  color: var(--text-dim);
  text-align: center;
  line-height: 1.5;
  max-width: 200px;
}
.ncm-cap b { color: var(--text); font-weight: 600; }
[data-theme="light"] .ncm-cap { color: var(--ink-2) !important; }
[data-theme="light"] .ncm-cap b { color: var(--ink) !important; }

.ncm-phone {
  width: 200px;
  height: 380px;
  background: #2a2a2a;
  border-radius: 22px;
  padding: 6px;
  box-shadow: 0 16px 36px rgba(0,0,0,0.35);
}
.ncm-screen {
  width: 100%; height: 100%;
  background: #f5f5f5;
  border-radius: 16px;
  overflow: hidden;
  color: #222;
  font-size: 9px;
  position: relative;
  display: flex; flex-direction: column;
}
.ncm-statusbar {
  display: flex; justify-content: space-between;
  padding: 5px 12px 3px;
  font-size: 8px;
  font-weight: 600;
  color: #222;
  flex-shrink: 0;
}
.ncm-statusbar.light { color: #fff; }
.ncm-topbar {
  display: flex; justify-content: space-between; align-items: center;
  padding: 4px 12px 8px;
  flex-shrink: 0;
}
.ncm-icon { font-size: 14px; color: #222; }
.ncm-title { font-size: 13px; font-weight: 700; color: #222; }

.ncm-user-row {
  display: flex; gap: 8px; align-items: center;
  padding: 4px 12px 10px;
  flex-shrink: 0;
}
.ncm-av {
  width: 26px; height: 26px;
  border-radius: 50%;
  background: linear-gradient(135deg, #d0d0d0, #b0b0b0);
  flex-shrink: 0;
}
.ncm-blank-stack {
  display: flex; flex-direction: column; gap: 3px;
  flex: 1;
  min-width: 0;
}
.ncm-blank {
  height: 7px;
  background: #d0d0d0;
  border-radius: 2px;
}
.ncm-blank.thin { height: 5px; background: #e0e0e0; }
.ncm-blank.light { background: rgba(255,255,255,0.78); }
.ncm-blank.thin.light { background: rgba(255,255,255,0.5); }
.ncm-blank.w40 { width: 40%; }
.ncm-blank.w50 { width: 50%; }
.ncm-blank.w60 { width: 60%; }
.ncm-blank.w70 { width: 70%; }
.ncm-blank.w90 { width: 90%; }

.ncm-section-h {
  display: flex; justify-content: space-between;
  padding: 4px 12px 6px;
  font-size: 9px;
  color: #888;
  flex-shrink: 0;
}
.ncm-section-h .ncm-tiny { font-size: 8px; }
.ncm-pl-row {
  display: flex; gap: 8px; align-items: center;
  padding: 5px 12px;
  background: #fff;
  flex-shrink: 0;
  position: relative;
}
.ncm-cover {
  width: 26px; height: 26px;
  border-radius: 4px;
  flex-shrink: 0;
}
.ncm-cover.c1 { background: linear-gradient(135deg, #ffd194, #d1913c); }
.ncm-cover.c2 { background: linear-gradient(135deg, #a8c8ec, #4a7fb8); }
.ncm-cover.c3 { background: linear-gradient(135deg, #e8a5b8, #b85c7e); }
.ncm-cover.c4 { background: linear-gradient(135deg, #c8b8e0, #7a5fa8); }

.ncm-bottombar {
  margin-top: auto;
  display: flex; justify-content: space-around;
  padding: 6px 0 10px;
  background: rgba(255,255,255,0.95);
  border-top: 1px solid #ececec;
  font-size: 9px;
  color: #888;
  flex-shrink: 0;
}
.ncm-bottombar .bb-active {
  color: #d33a31;
  font-weight: 700;
  position: relative;
}

/* Step 2 hero */
.ncm-pl-hero {
  height: 140px;
  background: linear-gradient(180deg, #b85c7e 0%, #8a3f5d 100%);
  padding: 4px 12px 8px;
  color: #fff;
  flex-shrink: 0;
}
.ncm-pl-hero-bar {
  display: flex; justify-content: space-between;
  font-size: 13px;
  margin-bottom: 6px;
}
.ncm-pl-hero-info {
  display: flex; gap: 8px;
}
.ncm-cover-big {
  width: 60px; height: 60px;
  border-radius: 6px;
  background: linear-gradient(135deg, #f5b8c8, #c47090);
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.ncm-actionrow {
  display: flex; justify-content: space-around;
  background: #fff;
  padding: 10px 6px;
  border-bottom: 1px solid #f0f0f0;
  flex-shrink: 0;
}
.ncm-act {
  display: flex; flex-direction: column; align-items: center;
  gap: 3px;
  font-size: 9px;
  color: #888;
  position: relative;
  padding: 2px 4px;
  border-radius: 6px;
}
.ncm-act .ncm-act-i {
  width: 22px; height: 22px;
  border-radius: 50%;
  background: #f3f3f3;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px;
}
.ncm-songlist {
  background: #fff;
  flex: 1;
  overflow: hidden;
}
.ncm-song {
  display: flex; align-items: center; gap: 8px;
  padding: 6px 12px;
  font-size: 9px;
  color: #888;
}
.ncm-song span { width: 12px; text-align: center; }
.ncm-song .ncm-blank { flex: 1; }

/* Step 3 share sheet */
.ncm-share-sheet {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  background: #f7f7f7;
  border-radius: 10px 10px 0 0;
  padding-bottom: 4px;
}
.ncm-share-h {
  text-align: center;
  padding: 8px;
  font-size: 9px;
  color: #888;
  border-bottom: 1px solid #ececec;
}
.ncm-share-row {
  display: flex; gap: 4px;
  padding: 10px 6px;
}
.ncm-share-i {
  display: flex; flex-direction: column; align-items: center;
  gap: 4px;
  flex: 1;
  font-size: 9px;
  color: #222;
  position: relative;
  padding: 2px;
  border-radius: 6px;
}
.ncm-share-i .bub {
  width: 28px; height: 28px;
  border-radius: 50%;
  background: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px;
}
.ncm-share-cancel {
  background: #fff;
  text-align: center;
  padding: 8px;
  margin-top: 4px;
  font-size: 11px;
  color: #222;
}

/* 高亮：克制的虚线框，无脉冲，无 emoji */
.ncm-pl-row.hl,
.ncm-act.hl,
.ncm-share-i.hl {
  outline: 1.5px dashed rgba(140, 110, 70, 0.55);
  outline-offset: -1px;
  border-radius: 6px;
  background: rgba(255, 220, 130, 0.10);
}

/* ===================================================================
   整体品味卡：标签风格 + 重新生成按钮
   =================================================================== */
.taste-card-head {
  display: flex; align-items: baseline; justify-content: space-between;
  margin-bottom: 10px;
}
.taste-card-head h3 { margin: 0; }
#btn-regen-overall {
  font-size: 11px;
  letter-spacing: 0.04em;
}

.ov-group {
  margin-bottom: 10px;
}
.ov-group:last-child { margin-bottom: 0; }
.ov-label {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin-bottom: 6px;
}
.ov-text {
  font-size: 13px;
  line-height: 1.6;
  color: var(--text-dim);
}
.ov-pills {
  display: flex; flex-wrap: wrap; gap: 6px;
}
.ov-pill {
  display: inline-flex; align-items: center;
  background: rgba(164, 140, 224, 0.14);
  border: 1px solid rgba(164, 140, 224, 0.3);
  color: #d9c9ff;
  font-size: 12px;
  padding: 4px 10px;
  border-radius: 999px;
  letter-spacing: 0.02em;
}
.ov-line {
  font-size: 12px;
  color: var(--text-dim);
  line-height: 1.6;
  margin: 4px 0;
}
.ov-empty {
  font-size: 12px;
  color: var(--text-dim);
  line-height: 1.7;
}

[data-theme="light"] .ov-label { color: var(--ink-faint) !important; }
[data-theme="light"] .ov-text { color: var(--ink) !important; }
[data-theme="light"] .ov-pill {
  background: rgba(229, 74, 31, 0.08) !important;
  border-color: rgba(229, 74, 31, 0.35) !important;
  color: var(--orange) !important;
}
[data-theme="light"] .ov-empty { color: var(--ink-2) !important; }

/* ===================================================================
   已导入：每条 details，summary 展示 + 展开看分析
   =================================================================== */
.import-item {
  /* 复用之前的 .import-item，details 包裹 */
  cursor: pointer;
}
.import-item > summary {
  list-style: none;
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px;
  margin: 0;
}
.import-item > summary::-webkit-details-marker { display: none; }
.import-item .ii-caret {
  margin-left: auto;
  font-size: 11px;
  color: var(--text-faint);
  transition: transform 0.2s;
  flex-shrink: 0;
}
.import-item[open] .ii-caret { transform: rotate(180deg); }

.ii-analysis {
  border-top: 1px dashed var(--separator);
  padding: 12px 14px 4px;
  margin: 0 -1px;
}
.pa-row {
  display: flex;
  gap: 8px;
  margin-bottom: 6px;
  font-size: 12px;
  line-height: 1.6;
  align-items: baseline;
}
.pa-row:last-child { margin-bottom: 0; }
.pa-label {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.06em;
  color: var(--text-faint);
  flex-shrink: 0;
  min-width: 60px;
  margin-top: 1px;
}
.pa-text { color: var(--text-dim); }
.pa-line {
  font-size: 12px;
  line-height: 1.6;
  color: var(--text-dim);
  margin-bottom: 4px;
}
.ii-no-analysis {
  font-size: 11px;
  color: var(--text-faint);
  font-style: italic;
}

[data-theme="light"] .ii-caret { color: var(--ink-faint) !important; }
[data-theme="light"] .ii-analysis { border-top-color: var(--case-darker) !important; }
[data-theme="light"] .pa-label { color: var(--ink-faint) !important; }
[data-theme="light"] .pa-text { color: var(--ink) !important; }
[data-theme="light"] .pa-line { color: var(--ink) !important; }
