/* =================================================================
   Claudio — 个人 AI 电台
   美学：深夜 FM 电台 / 电子管暖光 / 工程制图笔记
   ================================================================= */

:root {
  /* 暖色系深夜背景 */
  --bg:            #0b0907;
  --bg-2:          #141110;
  --surface:       #1a1614;
  --surface-hi:    #241e1a;
  --hairline:      #2a2320;

  /* 电子管琥珀光 */
  --amber:         #e8a87c;
  --amber-hot:     #f4c28c;
  --amber-dim:     #8a6b55;
  --amber-glow:    rgba(232, 168, 124, 0.15);
  --solara-mint:   #47d7b9;
  --solara-coral:  #f27568;
  --solara-gold:   #f2a45d;
  --track-accent:  var(--solara-gold);
  --track-accent-soft: rgba(242, 164, 93, 0.18);
  --track-warm:    var(--solara-gold);
  --track-warm-soft: rgba(242, 164, 93, 0.16);
  --track-cool:    var(--solara-mint);
  --track-cool-soft: rgba(71, 215, 185, 0.16);
  --glass:         rgba(255, 255, 255, 0.075);
  --glass-strong:  rgba(255, 255, 255, 0.12);
  --glass-line:    rgba(255, 255, 255, 0.14);

  /* 文字 */
  --text:          #f4ede4;
  --text-dim:      #a89989;
  --text-faint:    #6b5e53;

  /* 提示 */
  --live:          #e06c5a;

  /* 字体 */
  --font-display:  'Fraunces', 'Source Han Serif', serif;
  --font-mono:     'JetBrains Mono', 'Source Han Mono', monospace;
  --font-body:     'Fraunces', 'Source Han Serif', serif;

  /* 尺寸 */
  --r-sm: 6px;
  --r-md: 12px;
  --r-lg: 20px;
  --pad:  20px;
}

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

html, body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-feature-settings: 'ss01', 'ss02';
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

body {
  padding-bottom: calc(82px + env(safe-area-inset-bottom, 0px)); /* compose 固定栏 */
  max-width: 720px;
  margin: 0 auto;
  position: relative;
  background:
    radial-gradient(ellipse 80% 50% at 50% 0%, var(--track-cool-soft), transparent 60%),
    radial-gradient(ellipse 90% 65% at 50% 100%, var(--track-warm-soft), transparent 62%),
    var(--bg);
}

.ambient-stage {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
  background:
    radial-gradient(circle at 20% 12%, var(--track-cool-soft), transparent 30%),
    radial-gradient(circle at 82% 18%, var(--track-warm-soft), transparent 28%),
    linear-gradient(145deg, #06100f 0%, #10151f 48%, #08090e 100%);
}
.ambient-stage__blur {
  position: absolute;
  inset: -32px;
  background-image: var(--cover-image);
  background-size: cover;
  background-position: center;
  opacity: 0;
  filter: blur(34px) saturate(1.35) brightness(0.82);
  transform: scale(1.12);
  transition: opacity 0.6s ease, filter 0.6s ease;
}
body[style*="--cover-image"] .ambient-stage__blur {
  opacity: 0.42;
}
.ambient-stage__veil {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 50% 18%, rgba(255, 255, 255, 0.08), transparent 34%),
    linear-gradient(180deg, rgba(4, 6, 10, 0.32), rgba(4, 6, 10, 0.88));
}

/* 胶片颗粒噪点 */
.grain {
  pointer-events: none;
  position: fixed;
  inset: 0;
  z-index: 1;
  opacity: 0.045;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='200' height='200'><filter id='n'><feTurbulence baseFrequency='0.85' numOctaves='2' /></filter><rect width='100%25' height='100%25' filter='url(%23n)' /></svg>");
}

/* -----------------------------------------------------------------
   Station header
   ----------------------------------------------------------------- */
.station {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px var(--pad) 16px;
  background: linear-gradient(to bottom, rgba(6, 8, 11, 0.86) 70%, transparent);
  backdrop-filter: blur(16px);
}

.logotype {
  display: flex;
  align-items: baseline;
  gap: 10px;
}
.call-sign {
  font-family: var(--font-display);
  font-variation-settings: 'opsz' 144, 'wght' 500, 'SOFT' 80;
  font-size: 28px;
  letter-spacing: 0.02em;
  color: #f6f9f7;
  text-shadow: 0 0 24px var(--track-cool-soft);
}
.logotype .dot {
  width: 4px; height: 4px; border-radius: 50%;
  background: var(--text-faint);
  transform: translateY(-5px);
}
.freq {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.15em;
  color: var(--text-faint);
  text-transform: uppercase;
}

.live {
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.2em;
  color: var(--live);
}
.live-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--live);
  box-shadow: 0 0 12px var(--live);
  animation: pulse 1.6s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%      { opacity: 0.4; transform: scale(0.8); }
}
.btn-reload {
  background: none;
  border: none;
  color: var(--text-faint);
  font-size: 16px;
  cursor: pointer;
  padding: 2px 4px;
  line-height: 1;
  touch-action: manipulation;
  transition: color 0.15s, transform 0.3s;
}
.btn-reload:hover { color: var(--amber); }
.btn-reload.spinning { animation: spin 0.5s linear; }
@keyframes spin { to { transform: rotate(360deg); } }

/* -----------------------------------------------------------------
   Views
   ----------------------------------------------------------------- */
.view {
  display: none;
  padding: 12px var(--pad) 0;
  position: relative;
  z-index: 2;
}
.view.active { display: block; }

/* DJ card - teletype feel */
.dj-card {
  background: linear-gradient(145deg, rgba(255,255,255,0.105), rgba(255,255,255,0.045));
  border: 1px solid var(--glass-line);
  border-radius: 18px;
  padding: 18px 20px;
  margin-bottom: 16px;
  position: relative;
  overflow: hidden;
  backdrop-filter: blur(22px);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.24);
}
.dj-card::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(to right, transparent, var(--track-cool), transparent);
}
.dj-label {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--track-cool);
  margin-bottom: 8px;
}
.dj-say {
  font-family: var(--font-display);
  font-variation-settings: 'opsz' 72, 'wght' 350;
  font-size: 18px;
  line-height: 1.55;
  color: var(--text);
  min-height: 1.55em;
}
.dj-say::after {
  content: "▊";
  color: var(--amber);
  animation: blink 1s steps(2) infinite;
  margin-left: 2px;
}
.dj-say.done::after { display: none; }
@keyframes blink { 50% { opacity: 0; } }

/* Now playing */
.now-card {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 16px;
  background: linear-gradient(145deg, rgba(18, 22, 30, 0.78), rgba(9, 11, 16, 0.68));
  border: 1px solid var(--glass-line);
  border-radius: 22px;
  padding: 16px;
  margin-bottom: 16px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.34);
  backdrop-filter: blur(24px);
}
.now-meta {
  min-width: 0;
}
.now-art {
  aspect-ratio: 1;
  background: radial-gradient(circle at 48% 50%, #1a1d25 0%, #05070c 68%, #000 100%);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  position: relative;
  overflow: hidden;
  box-shadow: inset 0 0 22px rgba(0,0,0,0.7), 0 22px 44px rgba(0,0,0,0.42);
}
.now-art::before {
  content: "";
  position: absolute;
  inset: 7%;
  border-radius: 50%;
  background:
    radial-gradient(circle at 50% 50%, rgba(255,255,255,0.14) 0%, rgba(255,255,255,0.05) 12%, transparent 42%),
    conic-gradient(from 90deg, rgba(255,255,255,0.12), transparent 55deg, transparent 190deg, rgba(255,255,255,0.08), transparent 360deg);
  opacity: 0.45;
  pointer-events: none;
  z-index: 1;
}
.now-cover {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.24s ease;
  z-index: 0;
}
.now-cover.loaded {
  opacity: 1;
}
.vinyl {
  width: 32px; height: 32px; border-radius: 50%;
  background: linear-gradient(135deg, var(--solara-coral), var(--solara-gold));
  box-shadow: 0 0 0 6px rgba(4, 5, 8, 0.84), 0 0 0 7px rgba(255,255,255,0.16), 0 0 24px rgba(242, 164, 93, 0.28);
  animation: spin 6s linear infinite;
  animation-play-state: paused;
  z-index: 2;
}
.now-card.playing .vinyl { animation-play-state: running; }
@keyframes spin { to { transform: rotate(360deg); } }

.now-label {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.48);
  margin-bottom: 4px;
}
.now-title {
  font-family: var(--font-display);
  font-variation-settings: 'opsz' 144, 'wght' 500;
  font-size: 20px;
  line-height: 1.2;
  margin-bottom: 2px;
  overflow-wrap: anywhere;
  color: #ffffff;
}
.now-artist {
  font-family: var(--font-body);
  font-style: italic;
  font-variation-settings: 'opsz' 72, 'wght' 300;
  color: var(--text-dim);
  font-size: 14px;
  margin-bottom: 6px;
}
.now-reason {
  font-family: var(--font-mono);
  font-size: 11px;
  color: rgba(71, 215, 185, 0.72);
  margin-bottom: 6px;
  min-height: 1em;
  overflow-wrap: anywhere;
}
.now-spec {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-faint);
  letter-spacing: 0.05em;
  margin-bottom: 10px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.player-bar {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.controls-row {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.volume-group {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
}
.volume-group input[type="range"] {
  width: 72px;
  accent-color: var(--amber);
  cursor: pointer;
}
.btn-icon {
  width: 34px; height: 34px;
  border-radius: 50%;
  border: 1px solid var(--glass-line);
  background: var(--glass);
  color: #f5f7fa;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.15s;
  display: flex; align-items: center; justify-content: center;
  flex: 0 0 auto;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}
.btn-icon:hover {
  background: var(--glass-strong);
  box-shadow: 0 10px 24px rgba(0,0,0,0.22);
}
#btn-play {
  background: linear-gradient(135deg, var(--track-accent), var(--track-warm));
  color: #151515;
  border-color: transparent;
  box-shadow: 0 14px 28px var(--track-accent-soft);
}
.btn-icon.liked    { color: #ff6b8a; border-color: #ff6b8a; background: rgba(255,107,138,0.12); }
.btn-icon.disliked { color: #666; border-color: #555; background: rgba(255,255,255,0.04); }
.btn-icon.repeating { color: var(--amber); border-color: var(--amber); background: rgba(232,168,124,0.15); }
.transport {
  font-size: 0;
}
.transport-glyph {
  position: relative;
  display: block;
  width: 16px;
  height: 14px;
}
.transport-glyph::before,
.transport-glyph::after {
  content: "";
  position: absolute;
  top: 1px;
  width: 0;
  height: 0;
  border-top: 6px solid transparent;
  border-bottom: 6px solid transparent;
}
.transport-prev .transport-glyph::before,
.transport-prev .transport-glyph::after {
  border-right: 8px solid currentColor;
}
.transport-next .transport-glyph::before,
.transport-next .transport-glyph::after {
  border-left: 8px solid currentColor;
}
.transport-prev .transport-glyph::before { left: 0; }
.transport-prev .transport-glyph::after { left: 7px; }
.transport-next .transport-glyph::before { right: 7px; }
.transport-next .transport-glyph::after { right: 0; }
.progress-row {
  display: flex;
  align-items: center;
  gap: 8px;
}
.progress-seek {
  flex: 1;
  height: 4px;
  -webkit-appearance: none;
  appearance: none;
  background: transparent;
  cursor: pointer;
  position: relative;
}
.progress-seek::-webkit-slider-runnable-track {
  height: 6px;
  border-radius: 999px;
  background: linear-gradient(
    to right,
    var(--solara-gold) 0%,
    var(--solara-gold) var(--pct, 0%),
    rgba(255,255,255,0.14) var(--pct, 0%),
    rgba(255,255,255,0.14) 100%
  );
}
.progress-seek::-moz-range-track {
  height: 4px;
  border-radius: 2px;
  background: var(--hairline);
}
.progress-seek::-moz-range-progress {
  height: 4px;
  border-radius: 2px;
  background: var(--amber);
}
.progress-seek::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--solara-gold);
  margin-top: -4px;
  box-shadow: 0 0 4px rgba(232,168,124,.4);
  transition: transform .15s;
}
.progress-seek:hover::-webkit-slider-thumb { transform: scale(1.3); }
.progress-seek::-moz-range-thumb {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--amber-hot);
  border: none;
}
.time {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-faint);
  min-width: 36px;
  text-align: right;
}

.lyrics-card {
  background: linear-gradient(145deg, rgba(255,255,255,0.085), rgba(255,255,255,0.035));
  border: 1px solid var(--glass-line);
  border-radius: 18px;
  padding: 14px 16px;
  margin-bottom: 16px;
  backdrop-filter: blur(20px);
}
.lyrics-status {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-faint);
  margin-bottom: 10px;
}
.lyrics-list {
  list-style: none;
  max-height: 240px;
  overflow-y: auto;
  padding: 0 4px 0 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  scroll-behavior: smooth;
}
.lyrics-spacer {
  height: 0;
  flex: 0 0 auto;
  pointer-events: none;
}
.lyrics-line {
  font-family: var(--font-display);
  font-variation-settings: 'opsz' 72, 'wght' 360;
  font-size: 15px;
  line-height: 1.55;
  color: var(--text-dim);
  opacity: 0.58;
  transition: opacity 0.18s, color 0.18s, transform 0.18s;
}
.lyrics-line.active {
  color: var(--track-accent);
  opacity: 1;
  transform: translateX(4px);
  text-shadow: 0 0 18px var(--track-accent-soft);
}
.lyrics-main {
  color: inherit;
}
.lyrics-sub {
  margin-top: 2px;
  font-family: var(--font-body);
  font-size: 12px;
  line-height: 1.45;
  color: var(--text-faint);
  opacity: 0.95;
}
.lyrics-line.empty {
  color: var(--text-faint);
  opacity: 1;
}

.search-card {
  background: linear-gradient(145deg, rgba(255,255,255,0.085), rgba(255,255,255,0.035));
  border: 1px solid var(--glass-line);
  border-radius: 18px;
  padding: 14px 16px;
  margin-bottom: 16px;
  backdrop-filter: blur(20px);
}
.search-row {
  display: flex;
  gap: 8px;
  align-items: center;
}
.search-input {
  flex: 1;
  background: rgba(255,255,255,0.07);
  border: 1px solid var(--glass-line);
  border-radius: var(--r-md);
  padding: 11px 14px;
  font-family: var(--font-body);
  font-size: 16px;
  color: var(--text);
  outline: none;
  -webkit-appearance: none;
}
.search-input:focus {
  border-color: var(--solara-mint);
  box-shadow: 0 0 0 3px rgba(71, 215, 185, 0.16);
}
.search-input::placeholder { color: var(--text-faint); }
.search-btn {
  min-width: 84px;
  height: 42px;
}
.search-tools {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
}
.search-source-filter {
  display: flex;
  gap: 6px;
  overflow-x: auto;
}
.search-source {
  min-height: 30px;
  padding: 0 10px;
  border-radius: 999px;
  border: 1px solid var(--glass-line);
  background: var(--glass);
  color: var(--text-faint);
  font-family: var(--font-mono);
  font-size: 10px;
  white-space: nowrap;
  cursor: pointer;
}
.search-source.active {
  color: #101316;
  border-color: transparent;
  background: linear-gradient(135deg, var(--track-accent), var(--track-warm));
}
.search-status {
  margin-top: 10px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-faint);
}
.search-results {
  list-style: none;
  margin-top: 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 360px;
  overflow-y: auto;
  padding-right: 2px;
}
.search-item {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 10px 12px;
  border: 1px solid var(--hairline);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.055);
  backdrop-filter: blur(14px);
}
.search-meta {
  min-width: 0;
}
.search-title {
  font-family: var(--font-display);
  font-variation-settings: 'opsz' 72, 'wght' 420;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.search-artist {
  margin-top: 2px;
  font-size: 12px;
  color: var(--text-faint);
  font-style: italic;
}
.search-play-btn {
  padding: 0 14px;
  height: 36px;
}
.search-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

/* Queue */
.queue {
  margin-bottom: 16px;
}
.queue-label {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.2em;
  color: var(--text-faint);
  margin-bottom: 10px;
  padding-left: 4px;
}
.queue-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 1px;
  background: rgba(255,255,255,0.08);
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--hairline);
}
.queue-item {
  display: grid;
  grid-template-columns: 28px 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  background: rgba(255,255,255,0.055);
  font-size: 14px;
}
.queue-item .idx {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--amber-dim);
  font-variant-numeric: tabular-nums;
}
.queue-item .q-title {
  font-family: var(--font-display);
  font-variation-settings: 'opsz' 72, 'wght' 400;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.queue-item .q-artist {
  font-family: var(--font-body);
  font-style: italic;
  font-size: 12px;
  color: var(--text-faint);
}
.queue-item.err .q-title { color: var(--live); }
.src-tag {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.05em;
  padding: 1px 4px;
  border-radius: 3px;
  margin-left: 5px;
  vertical-align: middle;
  opacity: 0.8;
}
.src-netease  { background: #c20c0c; color: #fff; }
.src-youtube  { background: #ff0000; color: #fff; }
.src-bilibili { background: #00a1d6; color: #fff; }

/* Delete button in queue / played items */
.btn-del {
  width: 22px; height: 22px;
  border-radius: 50%;
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-faint);
  font-size: 13px;
  line-height: 1;
  cursor: pointer;
  transition: all 0.15s;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.btn-del:hover {
  background: rgba(224, 108, 90, 0.15);
  border-color: var(--live);
  color: var(--live);
}
.queue-item.played-item { cursor: pointer; transition: background 0.15s; }
.queue-item.played-item:hover { background: rgba(232, 168, 124, 0.08); }
.queue-item.played-item:hover .q-title { color: var(--text); }
.queue-item.played-item .q-title { color: var(--text-faint); }
.queue-item.played-item .q-artist { color: var(--text-faint); opacity: 0.7; }

/* Played today section */
.played { margin-bottom: 16px; }
.played .queue-list {
  max-height: 280px;
  overflow-y: auto;
}

/* Compose — 固定在底部 tab 上方 */
.compose {
  position: fixed;
  left: 0; right: 0;
  bottom: calc(50px + env(safe-area-inset-bottom, 0px));
  max-width: 720px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  background: rgba(6, 8, 12, 0.88);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  z-index: 9;
  backdrop-filter: blur(24px);
}
.compose.hidden { display: none; }
#compose-input {
  flex: 1;
  height: 42px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--r-md);
  padding: 0 14px;
  font-family: var(--font-body);
  font-size: 16px; /* iOS Safari: <16px 会触发页面缩放导致输入框跳位 */
  line-height: 42px;
  color: var(--text);
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  -webkit-appearance: none;
  touch-action: manipulation;
  box-shadow: none;
}
#compose-input::placeholder { color: rgba(164, 148, 132, 0.6); }
#compose-input:focus {
  border-color: rgba(71, 215, 185, 0.4);
  box-shadow: 0 0 0 2px rgba(71, 215, 185, 0.1);
}
#compose-send {
  height: 42px;
  min-width: 68px;
  padding: 0 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.btn-primary {
  background: linear-gradient(135deg, var(--solara-coral), var(--solara-gold));
  color: #16120f;
  border: none;
  border-radius: var(--r-md);
  padding: 0 20px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.1em;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s;
  touch-action: manipulation;
  -webkit-appearance: none;
}
.btn-primary:hover {
  filter: brightness(1.06);
  box-shadow: 0 14px 28px rgba(242, 117, 104, 0.28);
}
.btn-primary:disabled {
  background: var(--amber-dim);
  cursor: wait;
  opacity: 0.6;
}

/* Profile view */
.profile-card, .settings-card {
  background: linear-gradient(145deg, rgba(255,255,255,0.085), rgba(255,255,255,0.035));
  border: 1px solid var(--glass-line);
  border-radius: 18px;
  padding: 18px 20px;
  margin-bottom: 16px;
  backdrop-filter: blur(20px);
}
.section-title {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--solara-mint);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.tag {
  font-size: 9px;
  color: var(--text-faint);
  padding: 2px 6px;
  border: 1px solid var(--hairline);
  border-radius: 3px;
  letter-spacing: 0.1em;
}
.md-content {
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.65;
  color: var(--text-dim);
  white-space: pre-wrap;
  word-wrap: break-word;
}
.profile-hint {
  font-family: var(--font-body);
  font-style: italic;
  color: var(--text-faint);
  font-size: 13px;
  text-align: center;
  margin-top: 24px;
}
.profile-hint code {
  font-family: var(--font-mono);
  font-size: 11px;
  background: var(--surface);
  padding: 2px 6px;
  border-radius: 3px;
  color: var(--amber);
}

/* Settings */
.slot-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 8px;
}
.slot-btn {
  background: var(--bg-2);
  border: 1px solid var(--hairline);
  border-radius: var(--r-sm);
  padding: 14px;
  font-family: var(--font-body);
  font-size: 14px;
  color: var(--text);
  cursor: pointer;
  transition: all 0.15s;
  text-align: left;
}
.slot-btn:hover {
  border-color: var(--amber);
  background: var(--surface-hi);
  transform: translateY(-1px);
}
.slot-btn:active { transform: translateY(0); }

.history-list {
  list-style: none;
  font-family: var(--font-mono);
  font-size: 12px;
}
.history-list li {
  padding: 8px 0;
  border-bottom: 1px dashed var(--hairline);
  color: var(--text-dim);
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
}
.history-list li:last-child { border-bottom: none; }
.history-list .h-time { color: var(--text-faint); font-size: 10px; }
.history-list .skipped { text-decoration: line-through; opacity: 0.5; }
.favorite-item {
  cursor: pointer;
}
.favorite-actions {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}
.favorite-actions .pl-tool-btn {
  min-height: 28px;
  padding: 0 9px;
}

.settings-card.muted { opacity: 0.85; }

/* Credential settings */
.cred-item { margin-bottom: 14px; }
.cred-item:last-child { margin-bottom: 0; }
.cred-row { display: flex; align-items: center; gap: 10px; }
.cred-label { font-size: 13px; font-weight: 600; min-width: 70px; }
.cred-status { font-size: 11px; color: var(--text-faint); flex: 1; }
.cred-status.ok { color: var(--solara-mint); }
.cred-status.warn { color: #ffaa55; }
.cred-edit { margin-top: 10px; display: flex; flex-direction: column; gap: 8px; }
.cred-input { background: rgba(255,255,255,0.07); border: 1px solid var(--hairline); border-radius: 8px; padding: 8px 12px; color: var(--text-primary); font-size: 13px; outline: none; }
.cred-input:focus { border-color: var(--solara-mint); }
.cred-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.cred-paste { background: rgba(255,255,255,0.07); border: 1px solid var(--hairline); border-radius: 8px; padding: 8px 12px; color: var(--text-primary); font-size: 11px; font-family: var(--font-mono); outline: none; resize: vertical; }
.cred-paste:focus { border-color: var(--solara-mint); }
.kv {
  font-family: var(--font-mono);
  font-size: 11px;
}
.kv dt {
  color: var(--text-faint);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-top: 6px;
}
.kv dd { color: var(--text-dim); margin-bottom: 4px; }

/* -----------------------------------------------------------------
   Side tabs
   ----------------------------------------------------------------- */
.tabs {
  position: fixed;
  top: 112px;
  left: max(16px, calc(50% - 478px));
  z-index: 10;
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 72px;
  padding: 10px;
  background: rgba(8, 10, 14, 0.74);
  border: 1px solid var(--glass-line);
  border-radius: 20px;
  backdrop-filter: blur(20px);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.28);
}
.tab {
  min-height: 58px;
  padding: 10px 6px;
  background: none;
  border: 1px solid transparent;
  border-radius: 14px;
  color: var(--text-faint);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  writing-mode: vertical-rl;
  text-orientation: mixed;
  cursor: pointer;
  transition: color 0.15s, background 0.15s, border-color 0.15s;
  position: relative;
}
.tab:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
}
.tab.active {
  color: var(--solara-gold);
  background: rgba(242, 164, 93, 0.12);
  border-color: rgba(242, 164, 93, 0.28);
}
.tab.active::before {
  content: "";
  position: absolute;
  left: -11px;
  top: 14px;
  bottom: 14px;
  width: 2px;
  background: var(--solara-gold);
  box-shadow: 0 0 8px rgba(242, 164, 93, 0.34);
}

/* ---- 桌面/平板：左侧竖排导航布局 (≥641px) ---- */
@media (min-width: 641px) {
  body {
    max-width: 808px; /* 720 内容 + 88 侧边栏 */
    padding-left: 88px;
    padding-bottom: calc(72px + env(safe-area-inset-bottom, 0px));
  }
  .tabs {
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    left: max(4px, calc(50vw - 404px)); /* 侧边栏始终在内容左侧 */
    width: 72px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 10px;
    background: rgba(8, 10, 14, 0.74);
    border: 1px solid var(--glass-line);
    border-radius: 20px;
    backdrop-filter: blur(20px);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.28);
    bottom: auto;
    right: auto;
    max-width: none;
    margin: 0;
    grid-template-columns: unset;
    border-top: 1px solid var(--glass-line);
  }
  .tab {
    min-height: 58px;
    padding: 10px 6px;
    border: 1px solid transparent;
    border-radius: 14px;
    letter-spacing: 0.12em;
    writing-mode: vertical-rl;
    text-orientation: mixed;
  }
  .tab.active {
    color: var(--solara-gold);
    background: rgba(242, 164, 93, 0.12);
    border-color: rgba(242, 164, 93, 0.28);
  }
  .tab.active::before {
    left: -11px;
    top: 14px;
    bottom: 14px;
    right: auto;
    width: 2px;
    height: auto;
  }
  /* compose 对齐内容列左边缘，底部贴底 */
  .compose {
    left: max(88px, calc(50vw - 316px)); /* = body_left + padding_left */
    right: auto;
    width: min(720px, calc(100vw - 88px));
    max-width: 720px;
    margin: 0;
    bottom: env(safe-area-inset-bottom, 0px);
  }
}

/* ---- 手机：底部横排导航 (≤640px) ---- */
@media (max-width: 640px) {
  body {
    padding-bottom: calc(130px + env(safe-area-inset-bottom, 0px));
  }
  .tabs {
    top: auto;
    bottom: 0;
    left: 0;
    right: 0;
    width: auto;
    max-width: 720px;
    margin: 0 auto;
    transform: none;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0;
    padding: 0 0 env(safe-area-inset-bottom, 0px);
    border: none;
    border-top: 1px solid var(--glass-line);
    border-radius: 0;
    background: rgba(8, 10, 14, 0.86);
    box-shadow: none;
  }
  .tab {
    min-height: 0;
    padding: 16px 12px;
    border: none;
    border-radius: 0;
    letter-spacing: 0.2em;
    writing-mode: horizontal-tb;
  }
  .tab.active {
    background: none;
    border-color: transparent;
  }
  .tab.active::before {
    top: -1px;
    left: 20%;
    right: 20%;
    bottom: auto;
    width: auto;
    height: 2px;
  }
}

/* responsive */
@media (max-width: 480px) {
  :root { --pad: 14px; }
  body {
    max-width: none;
    padding-bottom: calc(152px + env(safe-area-inset-bottom, 0px));
    background: #06070d;
  }
  .ambient-stage {
    background:
      radial-gradient(circle at 50% 22%, rgba(242, 164, 93, 0.2), transparent 30%),
      radial-gradient(circle at 50% 64%, rgba(71, 215, 185, 0.12), transparent 36%),
      linear-gradient(180deg, #10131c 0%, #06070d 78%);
  }
  body[style*="--cover-image"] .ambient-stage__blur {
    opacity: 0.54;
    filter: blur(30px) saturate(1.45) brightness(0.76);
  }
  .station {
    padding-top: 14px;
    padding-bottom: 12px;
    background: linear-gradient(to bottom, rgba(6, 7, 13, 0.72), transparent);
  }
  .logotype { gap: 7px; min-width: 0; }
  .call-sign { font-size: 22px; }
  .freq {
    max-width: 112px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .live { letter-spacing: 0.12em; }
  .dj-card {
    padding: 14px 15px;
    margin-bottom: 12px;
  }
  .dj-say { font-size: 16px; }
  .now-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    padding: 18px 14px 16px;
    margin-bottom: 12px;
    background: linear-gradient(180deg, rgba(27, 29, 36, 0.78), rgba(7, 9, 14, 0.82));
    border-radius: 28px;
    box-shadow: 0 32px 90px rgba(0, 0, 0, 0.52);
    overflow: hidden;
  }
  .now-art {
    width: min(74vw, 300px);
    max-width: 300px;
    margin: 0 auto;
  }
  .now-art::after {
    content: "";
    position: absolute;
    left: 50%;
    top: 50%;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #05070c;
    box-shadow: 0 0 0 7px rgba(255,255,255,0.14);
    transform: translate(-50%, -50%);
    z-index: 3;
  }
  .vinyl {
    width: 58%;
    height: 58%;
    background-image: var(--cover-image), linear-gradient(135deg, var(--solara-coral), var(--solara-gold));
    background-size: cover;
    background-position: center;
    box-shadow:
      inset 0 0 0 3px rgba(0,0,0,0.54),
      0 18px 38px rgba(0,0,0,0.42);
  }
  .now-meta {
    width: 100%;
    text-align: center;
  }
  .now-title-row {
    justify-content: center;
  }
  .now-title { font-size: 17px; }
  .now-artist { font-size: 13px; }
  .now-reason {
    font-size: 10px;
    line-height: 1.45;
    margin-bottom: 6px;
  }
  .now-spec {
    font-size: 9px;
    text-align: center;
    margin-bottom: 8px;
  }
  .controls-row {
    display: flex;
    justify-content: center;
    gap: clamp(8px, 3vw, 12px);
    align-items: center;
    flex-wrap: nowrap;
    order: 2;
  }
  .controls-row .btn-icon {
    width: clamp(40px, 11.5vw, 48px);
    height: clamp(40px, 11.5vw, 48px);
    min-width: 0;
    border-radius: 50%;
    background: rgba(255,255,255,0.08);
    border: none;
    box-shadow: 0 12px 28px rgba(0,0,0,0.28);
  }
  .controls-row #btn-play {
    width: clamp(58px, 16vw, 68px);
    height: clamp(58px, 16vw, 68px);
  }
  .controls-row #btn-dislike,
  .controls-row #btn-like {
    display: none;
  }
  .volume-group {
    display: none;
  }
  .volume-num { width: 42px; }
  .player-bar {
    width: 100%;
    gap: 15px;
  }
  .progress-row {
    order: 1;
    display: grid;
    grid-template-columns: 44px 1fr;
    gap: 8px 10px;
  }
  .progress-row .time {
    grid-column: 1;
    grid-row: 2;
    text-align: left;
  }
  .progress-seek {
    grid-column: 1 / -1;
    grid-row: 1;
    width: 100%;
    height: 22px;
  }
  .lyrics-list { max-height: 200px; }
  .lyrics-line { font-size: 14px; }
  .lyrics-card,
  .search-card,
  .profile-card,
  .settings-card {
    padding: 13px 14px;
    margin-bottom: 12px;
  }
  .search-row { align-items: stretch; }
  .search-btn { min-width: 72px; }
  .queue-item {
    grid-template-columns: 24px minmax(0, 1fr) auto;
    gap: 9px;
    padding: 10px 11px;
  }
  .compose {
    gap: 8px;
    padding: 9px 14px;
    border-radius: 20px 20px 0 0;
    background: rgba(6, 8, 12, 0.92);
  }
  #compose-input { height: 40px; padding: 0 12px; line-height: 40px; }
  #compose-send { height: 40px; min-width: 60px; padding: 0 14px; }
  .btn-primary { padding: 0 15px; }
  .tabs {
    top: auto;
    bottom: 0;
    left: 0;
    right: 0;
    width: auto;
    max-width: none;
    margin: 0;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0;
    padding: 0 0 env(safe-area-inset-bottom, 0px);
    border: none;
    border-top: 1px solid var(--glass-line);
    border-radius: 0;
    background: rgba(8, 10, 14, 0.86);
    box-shadow: none;
  }
  .tab {
    padding: 14px 10px;
    min-height: 0;
    border: none;
    border-radius: 0;
    letter-spacing: 0.16em;
    writing-mode: horizontal-tb;
  }
  .tab.active {
    background: none;
    border-color: transparent;
  }
  .tab.active::before {
    top: -1px;
    left: 20%;
    right: 20%;
    bottom: auto;
    width: auto;
    height: 2px;
  }
}

@media (max-width: 480px) {
  .btn-icon { font-size: 13px; }
}

@media (max-width: 360px) {
  .now-art { width: min(72vw, 250px); }
  .controls-row { gap: 7px; }
  .controls-row .btn-icon {
    width: 38px;
    height: 38px;
  }
  .controls-row #btn-play {
    width: 56px;
    height: 56px;
  }
  .search-row {
    display: grid;
    grid-template-columns: 1fr;
  }
  .search-btn {
    width: 100%;
    min-height: 40px;
  }
}

@media (min-width: 481px) and (max-width: 720px) {
  .now-card {
    grid-template-columns: 150px minmax(0, 1fr);
  }
  .now-art {
    width: 150px;
  }
}

/* ── 播放列表抽屉 ── */
.playlist-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.55);
  z-index: 200;
}
.playlist-backdrop.open { display: block; }

.playlist-drawer {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  max-height: 70vh;
  background: var(--bg-2);
  border-top: 1px solid var(--hairline);
  border-radius: 18px 18px 0 0;
  z-index: 201;
  display: flex;
  flex-direction: column;
  transform: translateY(100%);
  transition: transform .28s cubic-bezier(.32,.72,0,1);
}
.playlist-drawer.open { transform: translateY(0); }

.drawer-handle {
  width: 36px; height: 4px;
  background: var(--hairline);
  border-radius: 2px;
  margin: 12px auto 0;
  flex-shrink: 0;
  cursor: pointer;
}
.drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 20px 8px;
  flex-shrink: 0;
}
.drawer-title {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .15em;
  color: var(--text-faint);
}
.drawer-close {
  background: none;
  border: none;
  color: var(--text-faint);
  font-size: 18px;
  cursor: pointer;
  padding: 4px 8px;
  line-height: 1;
}
.drawer-body {
  overflow-y: auto;
  flex: 1;
  padding: 0 12px 24px;
}
.drawer-item {
  display: grid;
  grid-template-columns: 28px 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 10px 8px;
  border-bottom: 1px solid var(--hairline);
  cursor: default;
}
.drawer-item.is-playing {
  background: var(--surface-hi);
  border-radius: 8px;
}
.drawer-item.is-playing .d-title { color: var(--amber); }
.drawer-item.is-past .d-title,
.drawer-item.is-past .d-artist { color: var(--text-faint); opacity: .6; }
.drawer-item .d-idx { font-family: var(--font-mono); font-size: 10px; color: var(--text-faint); text-align: right; }
.drawer-item.is-playing .d-idx { color: var(--amber); }
.drawer-item .d-title { font-size: 14px; color: var(--text); line-height: 1.3; }
.drawer-item .d-artist { font-size: 12px; color: var(--text-faint); margin-top: 2px; }

/* 队列按钮 */
#btn-queue {
  font-size: 14px;
  opacity: .7;
}
#btn-queue:hover { opacity: 1; }

/* 自动续播 spinner */
.refilling-badge {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--amber-dim);
  letter-spacing: .1em;
  padding: 4px 0;
  text-align: center;
  display: none;
}
.refilling-badge.show { display: block; }

.volume-num {
  width: 36px;
  background: none;
  border: none;
  border-bottom: 1px solid var(--hairline);
  color: var(--text-faint);
  font-family: var(--font-mono);
  font-size: 11px;
  text-align: center;
  padding: 1px 0;
  -moz-appearance: textfield;
}
.volume-num::-webkit-outer-spin-button,
.volume-num::-webkit-inner-spin-button { -webkit-appearance: none; }
.volume-num:focus {
  outline: none;
  border-bottom-color: var(--amber);
  color: var(--text);
}

.d-del {
  flex-shrink: 0;
  background: none;
  border: none;
  color: var(--text-faint);
  font-size: 16px;
  cursor: pointer;
  padding: 4px 6px;
  line-height: 1;
  border-radius: 4px;
  transition: color .15s, background .15s;
}
.d-del:hover { color: var(--live); background: rgba(224,108,90,.12); }

@media (max-width: 480px) {
  .playlist-backdrop {
    background: rgba(4, 6, 10, 0.62);
    backdrop-filter: blur(4px);
  }
  .playlist-drawer {
    left: 50%;
    right: auto;
    width: 100%;
    max-width: 420px;
    max-height: calc(100dvh - 118px);
    background: rgba(13, 16, 24, 0.96);
    border-top: 1px solid rgba(255,255,255,0.12);
    border-radius: 28px 28px 0 0;
    box-shadow: 0 -28px 60px rgba(0,0,0,0.58);
    backdrop-filter: blur(28px);
    transform: translate(-50%, 100%);
  }
  .playlist-drawer.open {
    transform: translate(-50%, 0);
  }
  .drawer-handle {
    width: 56px;
    background: rgba(255,255,255,0.28);
  }
  .drawer-header {
    padding: 14px 20px 10px;
  }
  .drawer-body {
    padding: 0 14px 24px;
  }
  .drawer-item {
    background: rgba(255,255,255,0.05);
    border: none;
    border-radius: 14px;
    margin-bottom: 6px;
    padding: 12px 10px;
  }
  .drawer-item.is-playing {
    background: rgba(242, 164, 93, 0.22);
  }
}

/* ================================================================
   v20260423h — Play mode / Download / Drawer tabs / Mobile toolbar
   ================================================================ */

/* --- Play mode button variants --- */
.btn-play-mode { font-size: 16px; }
.btn-play-mode.mode-single {
  color: var(--amber);
  border-color: var(--amber);
  background: rgba(232, 168, 124, 0.15);
}
.btn-play-mode.mode-random {
  color: var(--solara-mint);
  border-color: var(--solara-mint);
  background: rgba(71, 215, 185, 0.12);
}

/* --- Download button in drawer items --- */
.drawer-item-actions {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}
.d-dl {
  flex-shrink: 0;
  background: none;
  border: none;
  color: var(--text-faint);
  font-size: 13px;
  cursor: pointer;
  padding: 4px 6px;
  line-height: 1;
  border-radius: 4px;
  transition: color .15s, background .15s;
}
.d-dl:hover { color: var(--solara-mint); background: rgba(71, 215, 185, 0.1); }

/* --- Drawer tabs --- */
.drawer-tabs {
  display: flex;
  gap: 2px;
  align-items: center;
  flex: 1;
}
.drawer-tab {
  background: none;
  border: none;
  color: var(--text-faint);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  padding: 6px 10px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s;
  touch-action: manipulation;
}
.drawer-tab.active {
  color: var(--amber);
  background: rgba(232, 168, 124, 0.1);
}
.drawer-tab:hover:not(.active) { color: var(--text-dim); }

/* --- Drawer panels --- */
.playlist-drawer { overflow: hidden; }

.drawer-panel {
  display: none;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  overflow: hidden;
}
.drawer-panel.active { display: flex; }

#dpanel-queue .drawer-body {
  overflow-y: auto;
  flex: 1;
  min-height: 0;
}

.drawer-lyrics-status {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-faint);
  padding: 2px 16px 10px;
  flex-shrink: 0;
}
.drawer-lyrics-list {
  list-style: none;
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 0 16px 24px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  scroll-behavior: smooth;
}
.drawer-played-list {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 0 12px 24px;
}

/* --- Mobile toolbar (hidden on desktop) --- */
.mobile-toolbar {
  display: none;
  align-items: center;
  justify-content: space-between;
  padding: 8px var(--pad) 4px;
  position: sticky;
  top: 0;
  z-index: 10;
  background: linear-gradient(to bottom, rgba(6, 8, 11, 0.86) 70%, transparent);
  backdrop-filter: blur(16px);
}
.mobile-toolbar-title {
  font-family: var(--font-display);
  font-variation-settings: 'opsz' 144, 'wght' 500, 'SOFT' 80;
  font-size: 20px;
  letter-spacing: 0.02em;
  color: #f6f9f7;
  text-shadow: 0 0 20px rgba(71, 215, 185, 0.22);
}
.mobile-toolbar-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}
.mobile-toolbar-btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid var(--glass-line);
  background: var(--glass);
  color: var(--text);
  font-size: 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s, transform 0.15s;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}
.mobile-toolbar-btn:active {
  background: var(--glass-strong);
  transform: scale(0.92);
}
.mobile-reload-btn.spinning { animation: spin 0.5s linear; }

/* --- Mobile close-search button (hidden on desktop) --- */
.mobile-close-search {
  display: none;
  background: none;
  border: none;
  color: var(--text-faint);
  font-size: 18px;
  cursor: pointer;
  padding: 0 0 0 8px;
  line-height: 1;
  touch-action: manipulation;
}
.mobile-close-search:hover { color: var(--text); }

/* --- Mobile overrides --- */
@media (max-width: 480px) {
  /* Station replaced by mobile-toolbar */
  .station { display: none; }
  .mobile-toolbar {
    display: flex;
    padding-top: calc(env(safe-area-inset-top, 0px) + 10px);
  }

  /* queue-label becomes flex to accommodate close button */
  .queue-label {
    display: flex;
    align-items: center;
  }
  .mobile-close-search { display: block; }

  /* Search card becomes fullscreen overlay */
  #search-card {
    position: fixed;
    inset: 0;
    z-index: 160;
    background: rgba(6, 9, 14, 0.97);
    backdrop-filter: blur(28px);
    border-radius: 0;
    border: none;
    margin: 0;
    padding: calc(env(safe-area-inset-top, 0px) + 32px) var(--pad) 24px;
    transform: translateY(-105%);
    opacity: 0;
    pointer-events: none;
    transition: transform 0.4s cubic-bezier(0.33, 1, 0.68, 1), opacity 0.28s;
    overflow-y: auto;
    max-height: 100dvh;
  }
  #search-card.mobile-open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }

  /* Lyrics and played hidden from main view — live in drawer tabs */
  #lyrics-card { display: none; }
  .played { display: none; }
}

/* ================================================================
   歌单 (Playlists)
   ================================================================ */

/* now-title row with save button */
.now-title-row {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-bottom: 2px;
}
.now-title-row .now-title { flex: 1; margin-bottom: 0; }
.btn-save-now {
  flex-shrink: 0;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 1px solid var(--glass-line);
  background: var(--glass);
  color: var(--text-faint);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s;
  margin-top: 2px;
}
.btn-save-now:hover { color: var(--amber); border-color: var(--amber); background: rgba(232,168,124,0.12); }

/* Tabs — profile hidden */
@media (max-width: 480px) {
  .tabs { grid-template-columns: repeat(3, 1fr); }
}

/* Create row */
.pl-create-row {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
}
.pl-tools {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin: -8px 0 14px;
}
.pl-tool-btn {
  min-height: 32px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid var(--glass-line);
  background: var(--glass);
  color: var(--text-dim);
  font-family: var(--font-mono);
  font-size: 11px;
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s, background 0.15s;
}
.pl-tool-btn:hover {
  color: var(--track-accent);
  border-color: var(--track-accent);
  background: var(--track-accent-soft);
}
.pl-new-input {
  flex: 1;
  background: rgba(255,255,255,0.07);
  border: 1px solid var(--glass-line);
  border-radius: var(--r-md);
  padding: 11px 14px;
  font-family: var(--font-body);
  font-size: 16px;
  color: var(--text);
  outline: none;
  -webkit-appearance: none;
}
.pl-new-input:focus {
  border-color: var(--solara-mint);
  box-shadow: 0 0 0 3px rgba(71,215,185,0.14);
}
.pl-new-input::placeholder { color: var(--text-faint); }

/* Playlist list */
.pl-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.pl-item {
  display: grid;
  grid-template-columns: 44px 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  background: linear-gradient(145deg, rgba(255,255,255,0.085), rgba(255,255,255,0.035));
  border: 1px solid var(--glass-line);
  border-radius: 14px;
  backdrop-filter: blur(14px);
  cursor: pointer;
  transition: background 0.15s;
}
.pl-item:hover { background: linear-gradient(145deg, rgba(255,255,255,0.12), rgba(255,255,255,0.06)); }
.pl-item-cover {
  width: 44px;
  height: 44px;
  border-radius: 8px;
  background: var(--surface-hi);
  overflow: hidden;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-faint);
  font-size: 18px;
}
.pl-item-cover img { width: 100%; height: 100%; object-fit: cover; }
.pl-item-info { min-width: 0; }
.pl-item-name {
  font-family: var(--font-display);
  font-variation-settings: 'opsz' 72, 'wght' 420;
  font-size: 15px;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.pl-item-count {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-faint);
  margin-top: 2px;
}
.pl-item-actions {
  display: flex;
  gap: 6px;
  align-items: center;
}
.pl-item-play {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid var(--glass-line);
  background: linear-gradient(135deg, var(--solara-coral), var(--solara-gold));
  color: #151515;
  font-size: 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s;
}
.pl-item-play:hover { filter: brightness(1.08); box-shadow: 0 8px 20px rgba(242,117,104,0.28); }
.pl-item-del {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1px solid transparent;
  background: none;
  color: var(--text-faint);
  font-size: 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s;
}
.pl-item-del:hover { color: var(--live); background: rgba(224,108,90,0.12); border-color: var(--live); }

/* Playlist detail */
.pl-detail-header {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 16px;
}
.pl-detail-hero {
  flex: 1;
  min-width: 0;
  display: flex;
  gap: 14px;
  align-items: center;
}
.pl-detail-cover {
  width: 72px;
  height: 72px;
  flex-shrink: 0;
  border-radius: 10px;
  background: var(--surface-hi);
  background-size: cover;
  background-position: center;
}
.pl-detail-cover:not(.has-cover)::after {
  content: '♪';
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  font-size: 28px;
  color: var(--text-faint);
}
.pl-detail-meta {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.pl-detail-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.pl-back-btn {
  background: none;
  border: none;
  color: var(--text-faint);
  font-family: var(--font-mono);
  font-size: 12px;
  cursor: pointer;
  padding: 6px 0;
  transition: color 0.15s;
}
.pl-back-btn:hover { color: var(--amber); }
.pl-detail-title {
  font-family: var(--font-display);
  font-variation-settings: 'opsz' 72, 'wght' 500;
  font-size: 17px;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.pl-play-all-btn { height: 34px; padding: 0 14px; font-size: 11px; }

.pl-songs {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.pl-song-item {
  display: grid;
  grid-template-columns: 24px 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(255,255,255,0.045);
  border: 1px solid transparent;
  transition: background 0.12s;
}
.pl-song-item:hover { background: rgba(255,255,255,0.08); }
.pl-song-idx {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--amber-dim);
  text-align: right;
}
.pl-song-info { min-width: 0; }
.pl-song-title {
  font-family: var(--font-display);
  font-variation-settings: 'opsz' 72, 'wght' 400;
  font-size: 14px;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.pl-song-artist {
  font-size: 12px;
  color: var(--text-faint);
  font-style: italic;
  margin-top: 1px;
}
.pl-song-del {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: none;
  background: none;
  color: var(--text-faint);
  font-size: 13px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.12s;
}
.pl-song-del:hover { color: var(--live); background: rgba(224,108,90,0.12); }

/* Save-to-playlist modal */
.pl-modal {
  position: fixed;
  inset: 0;
  z-index: 500;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}
.pl-modal[hidden] { display: none; }
.pl-modal-bg {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.55);
  backdrop-filter: blur(4px);
}
.pl-modal-sheet {
  position: relative;
  width: 100%;
  max-width: 480px;
  background: var(--bg-2);
  border-radius: 22px 22px 0 0;
  border-top: 1px solid var(--hairline);
  padding: 20px 20px calc(20px + env(safe-area-inset-bottom, 0px));
  display: flex;
  flex-direction: column;
  gap: 14px;
  max-height: 70vh;
  overflow-y: auto;
}
.pl-modal-title {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.15em;
  color: var(--text-faint);
  text-transform: uppercase;
}
.pl-modal-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.pl-modal-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(255,255,255,0.05);
  cursor: pointer;
  transition: background 0.12s;
  border: 1px solid transparent;
}
.pl-modal-item:hover { background: rgba(232,168,124,0.1); border-color: rgba(232,168,124,0.2); }
.pl-modal-item-name {
  font-family: var(--font-display);
  font-variation-settings: 'opsz' 72, 'wght' 400;
  font-size: 15px;
  color: var(--text);
}
.pl-modal-item-count {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-faint);
}
.pl-modal-new {
  display: flex;
  gap: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--hairline);
}
.pl-modal-new .pl-new-input { font-size: 15px; }
.pl-modal-new .btn-primary { height: 42px; padding: 0 16px; white-space: nowrap; }

/* Drawer save button */
.d-save {
  flex-shrink: 0;
  background: none;
  border: none;
  color: var(--text-faint);
  font-size: 16px;
  cursor: pointer;
  padding: 4px 5px;
  line-height: 1;
  border-radius: 4px;
  transition: color .15s, background .15s;
}
.d-save:hover { color: var(--amber); background: rgba(232,168,124,0.1); }

/* Empty playlist hint */
.pl-empty {
  text-align: center;
  padding: 40px 20px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-faint);
  line-height: 1.8;
}

/* ================================================================
   v20260424a — Restore desktop Solara shell
   ================================================================ */

.desktop-main-grid {
  display: block;
}

.bottom-dock {
  display: contents;
}

.desktop-queue-card {
  display: none;
}

@media (min-width: 821px) {
  html.desktop-view {
    --desktop-glass-border: rgba(255,255,255,0.08);
    --desktop-glass-fill:
      linear-gradient(180deg, rgba(42, 47, 46, 0.88), rgba(24, 28, 29, 0.84)),
      radial-gradient(circle at 18% 0%, rgba(255,255,255,0.05), transparent 34%);
    --desktop-glass-shadow: 0 24px 60px rgba(0, 0, 0, 0.32), inset 0 1px 0 rgba(255,255,255,0.035);
    --desktop-glass-blur: blur(26px);
    --desktop-field-bg: rgba(255,255,255,0.045);
    --desktop-field-border: rgba(255,255,255,0.07);
  }

  html.desktop-view body {
    max-width: 1280px;
    margin: 0 auto;
    padding: 20px 40px 190px 140px;
    background:
      radial-gradient(circle at 50% 0%, rgba(255,255,255,0.05), transparent 28%),
      linear-gradient(180deg, rgba(2, 5, 9, 0.5), rgba(2, 5, 9, 0.08)),
      var(--bg);
  }

  html.desktop-view .station {
    position: relative;
    top: auto;
    z-index: 8;
    margin-bottom: 18px;
    padding: 24px 34px 20px;
    border-radius: 32px 32px 0 0;
    background: linear-gradient(180deg, rgba(7, 9, 14, 0.95), rgba(7, 9, 14, 0.72));
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.36);
  }

  html.desktop-view .call-sign {
    font-family: 'Noto Sans SC', sans-serif;
    font-size: 40px;
    font-weight: 300;
    letter-spacing: 0.06em;
    color: #2fe1c8;
    text-shadow: none;
  }

  html.desktop-view .freq,
  html.desktop-view .live {
    font-family: var(--font-mono);
    font-size: 12px;
    letter-spacing: 0.08em;
  }

  html.desktop-view .tabs {
    position: fixed;
    top: 50%;
    left: max(24px, calc(50vw - 620px));
    transform: translateY(-50%);
    z-index: 12;
    width: 86px;
    max-width: none;
    margin: 0;
    padding: 10px 8px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    background: rgba(79, 85, 82, 0.46);
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 24px;
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.22);
    backdrop-filter: blur(18px);
  }

  html.desktop-view .tab {
    min-height: 0;
    padding: 16px 8px;
    border: none;
    border-radius: 18px;
    writing-mode: vertical-rl;
    text-orientation: mixed;
    font-family: 'Noto Sans SC', sans-serif;
    font-size: 14px;
    letter-spacing: 0;
    color: rgba(255,255,255,0.62);
  }

  html.desktop-view .tab:hover {
    background: rgba(255,255,255,0.06);
  }

  html.desktop-view .tab.active {
    color: #ffffff;
    background: linear-gradient(135deg, #25d4c0, #20c5b2);
  }

  html.desktop-view .tab.active::before {
    display: none;
  }

  html.desktop-view .view {
    padding: 0;
  }

  html.desktop-view #view-player {
    padding-top: 28px;
  }

  html.desktop-view .dj-card {
    display: none;
  }

  html.desktop-view #search-card {
    margin-bottom: 18px;
    padding: 18px 18px 14px;
    border-radius: 30px;
    border: 1px solid var(--desktop-glass-border);
    background: var(--desktop-glass-fill);
    box-shadow: var(--desktop-glass-shadow);
    backdrop-filter: var(--desktop-glass-blur);
  }

  html.desktop-view #search-card .queue-label {
    display: none;
  }

  html.desktop-view #search-card .search-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
  }

  html.desktop-view #search-card .search-input {
    min-height: 52px;
    padding: 0 18px;
    border-radius: 20px;
    background: var(--desktop-field-bg);
    border: 1px solid var(--desktop-field-border);
    font-family: 'Noto Sans SC', sans-serif;
    font-size: 15px;
    color: rgba(255,255,255,0.9);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.02);
  }

  html.desktop-view #search-card .search-btn {
    min-width: 100px;
    height: 52px;
    border-radius: 20px;
    box-shadow: 0 12px 24px rgba(242, 164, 93, 0.2);
  }

  html.desktop-view #search-card .search-tools {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid rgba(255,255,255,0.08);
  }

  html.desktop-view #search-card .search-source {
    min-height: 34px;
    padding: 0 14px;
    border-radius: 999px;
    border-color: rgba(255,255,255,0.1);
    background: rgba(255,255,255,0.035);
    color: rgba(255,255,255,0.56);
    font-size: 11px;
    letter-spacing: 0.02em;
  }

  html.desktop-view #search-card .search-source.active {
    color: #062a27;
    background: linear-gradient(135deg, #7af0e1, #36d7c4);
    box-shadow: 0 8px 18px rgba(54, 215, 196, 0.22);
  }

  html.desktop-view #search-card .pl-tool-btn {
    min-height: 34px;
    border-radius: 999px;
    background: var(--desktop-field-bg);
    border-color: var(--desktop-field-border);
  }

  html.desktop-view .desktop-main-grid {
    display: grid;
    grid-template-columns: 300px minmax(0, 1fr) 400px;
    gap: 18px;
    align-items: stretch;
  }

  html.desktop-view .now-card,
  html.desktop-view .desktop-queue-card,
  html.desktop-view .lyrics-card {
    min-height: 332px;
    margin-bottom: 0;
    border-radius: 22px;
    background: linear-gradient(180deg, rgba(34, 46, 43, 0.8), rgba(28, 38, 37, 0.68));
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.04);
  }

  html.desktop-view .now-card {
    display: flex;
    flex-direction: column;
    grid-template-columns: none;
    gap: 14px;
    padding: 16px;
  }

  html.desktop-view .now-art {
    width: 100%;
    aspect-ratio: 1;
    border-radius: 24px;
    background: radial-gradient(circle at 42% 30%, rgba(255,255,255,0.08), rgba(0,0,0,0.82));
    box-shadow: none;
  }

  html.desktop-view .now-art::before {
    display: none;
  }

  html.desktop-view .vinyl {
    width: 20px;
    height: 20px;
    box-shadow: 0 0 0 6px rgba(0, 0, 0, 0.2);
  }

  html.desktop-view .now-meta {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  html.desktop-view .now-title-row {
    width: 100%;
    justify-content: center;
    align-items: center;
  }

  html.desktop-view .now-title {
    font-family: 'Noto Sans SC', sans-serif;
    font-size: 18px;
    font-weight: 700;
  }

  html.desktop-view .now-artist {
    font-size: 13px;
    margin-bottom: 4px;
  }

  html.desktop-view .now-reason,
  html.desktop-view .now-spec {
    text-align: center;
  }

  html.desktop-view .now-card .player-bar {
    display: none;
  }

  html.desktop-view .desktop-queue-card {
    display: block;
    padding: 18px 18px 12px;
  }

  html.desktop-view .desktop-queue-list {
    height: auto;
    max-height: min(332px, calc(100vh - 430px));
    overflow-y: auto;
    background: rgba(255,255,255,0.04);
    border-radius: 18px;
  }

  html.desktop-view .desktop-queue-list .queue-item {
    grid-template-columns: 42px minmax(0, 1fr) auto;
    padding: 14px 16px;
    background: transparent;
    border-bottom: 1px solid rgba(255,255,255,0.06);
  }

  html.desktop-view .desktop-queue-list .queue-item:last-child {
    border-bottom: none;
  }

  html.desktop-view .desktop-queue-list .idx {
    color: rgba(242, 164, 93, 0.72);
  }

  html.desktop-view .desktop-queue-list .q-title {
    font-family: Georgia, 'Noto Sans SC', serif;
    font-size: 16px;
    color: rgba(244, 225, 198, 0.7);
  }

  html.desktop-view .desktop-queue-list .q-artist {
    font-size: 12px;
  }

  html.desktop-view .lyrics-card {
    padding: 14px 18px 16px;
  }

  html.desktop-view .lyrics-list {
    max-height: 248px;
  }

  html.desktop-view .bottom-dock {
    position: fixed;
    left: calc(50% + 78px);
    bottom: 24px;
    transform: translateX(-50%);
    z-index: 20;
    width: min(940px, calc(100vw - 280px));
    max-width: 940px;
    display: grid;
    grid-template-columns: 316px minmax(0, 1fr);
    gap: 16px;
    align-items: stretch;
    pointer-events: none;
    overflow: visible;
  }

  html.desktop-view .bottom-dock > .player-bar,
  html.desktop-view .bottom-dock > .compose {
    pointer-events: auto;
    position: relative;
    left: auto;
    right: auto;
    bottom: auto;
    width: auto;
    max-width: none;
    margin: 0;
    border: 1px solid var(--desktop-glass-border);
    background: var(--desktop-glass-fill);
    box-shadow: var(--desktop-glass-shadow);
    backdrop-filter: var(--desktop-glass-blur);
  }

  html.desktop-view .bottom-dock > .player-bar {
    padding: 12px 14px;
    border-radius: 28px;
    align-self: end;
  }

  html.desktop-view .bottom-dock > .player-bar .controls-row {
    justify-content: flex-start;
    flex-wrap: nowrap;
    gap: 8px;
  }

  html.desktop-view .bottom-dock > .player-bar .btn-icon {
    width: 38px;
    height: 38px;
    border: 1px solid rgba(255,255,255,0.05);
    background: rgba(255,255,255,0.06);
    color: rgba(255,255,255,0.78);
    box-shadow: none;
  }

  html.desktop-view .bottom-dock > .player-bar #btn-play {
    width: 52px;
    height: 52px;
    background: linear-gradient(135deg, #ff694e, #ff4a3d);
    color: #fff;
    box-shadow: 0 10px 24px rgba(255, 74, 61, 0.28);
  }

  html.desktop-view .bottom-dock > .player-bar #btn-play-mode {
    display: none;
  }

  html.desktop-view .bottom-dock > .player-bar .volume-group {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 8px 0 0;
    width: 100%;
  }

  html.desktop-view .bottom-dock > .player-bar .volume-group input[type="range"] {
    flex: 1;
    width: auto;
    accent-color: var(--amber);
    cursor: pointer;
  }

  html.desktop-view .bottom-dock > .player-bar .progress-row {
    margin-top: 12px;
    gap: 10px;
  }

  html.desktop-view .bottom-dock > .player-bar .time {
    min-width: 34px;
    font-size: 10px;
    color: rgba(255,255,255,0.42);
  }

  html.desktop-view .bottom-dock > .player-bar .progress-seek {
    height: 18px;
  }

  html.desktop-view .bottom-dock > .player-bar .progress-seek::-webkit-slider-runnable-track {
    height: 4px;
    background: linear-gradient(
      to right,
      #ff6d4b 0%,
      #ff6d4b var(--pct, 0%),
      rgba(255,255,255,0.12) var(--pct, 0%),
      rgba(255,255,255,0.12) 100%
    );
  }

  html.desktop-view .bottom-dock > .player-bar .progress-seek::-webkit-slider-thumb {
    width: 10px;
    height: 10px;
    margin-top: -3px;
    background: #ffd0bf;
    box-shadow: 0 0 0 3px rgba(255, 109, 75, 0.18);
  }

  html.desktop-view .bottom-dock > .compose {
    padding: 10px 10px;
    border-radius: 28px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
    align-items: center;
    align-self: end;
  }

  html.desktop-view .bottom-dock > .compose #compose-input {
    height: 50px;
    border-radius: 20px;
    border: 1px solid var(--desktop-field-border);
    background: var(--desktop-field-bg);
  }

  html.desktop-view .bottom-dock > .compose #compose-send {
    height: 50px;
    min-width: 86px;
    border-radius: 20px;
  }

  html.desktop-view #view-playlists,
  html.desktop-view #view-settings {
    padding-top: 34px;
  }

  html.desktop-view .playlist-drawer,
  html.desktop-view .playlist-backdrop {
    display: none !important;
  }
}
