/* =========================================================================
 * 全局播放条 / 播放列表抽屉 / 沉浸式播放页（五套年代皮肤）
 * ========================================================================= */

/* ============================== 底部播放条 ============================== */
.playerbar {
  position: fixed;
  z-index: 80;
  /* ★ 与 .app 的左内边距同源：必须带上 --nav-left（导航条的 left 偏移），
     否则播放条左端会与导航条右边缘严丝合缝贴住。 */
  left: calc(var(--nav-left) + var(--nav-w) + var(--nav-gap));
  right: 18px;
  bottom: 16px;
  height: var(--player-h);
  display: grid;
  grid-template-columns: auto minmax(120px, 1.05fr) minmax(280px, 2.2fr) auto;
  align-items: center;
  gap: 16px;
  padding: 0 18px;
  border-radius: var(--r-lg);
  background: var(--glass-2);
  border: 1px solid var(--hair);
  box-shadow: var(--shadow-2), 0 20px 50px -30px var(--tint);
  backdrop-filter: blur(24px) saturate(1.6);
  -webkit-backdrop-filter: blur(24px) saturate(1.6);
  transition: left var(--dur) var(--ease), background var(--dur), box-shadow 0.7s var(--ease);
  overflow: hidden;
}
.pb-tint {
  position: absolute;
  top: 0; right: 0; bottom: 0; left: 0;
  background: linear-gradient(100deg, color-mix(in srgb, var(--tint) 16%, transparent), transparent 46%);
  pointer-events: none;
  transition: background 1s var(--ease);
}
.playerbar > *:not(.pb-tint) { position: relative; z-index: 1; }

.pb-cover {
  position: relative;
  width: 58px; height: 58px;
  border-radius: 15px;
  overflow: hidden;
  flex: none;
  background: var(--panel-2);
  box-shadow: var(--shadow-1);
  transition: transform 0.34s var(--ease-out);
}
.pb-cover img { width: 100%; height: 100%; object-fit: cover; }
.pb-cover:hover { transform: scale(1.05); }
.pb-cover-play {
  position: absolute; top: 0; right: 0; bottom: 0; left: 0;
  display: grid; place-items: center;
  background: rgba(6, 6, 10, 0.5);
  color: #fff;
  opacity: 0;
  transition: opacity var(--dur);
}
.pb-cover-play .ic { width: 24px; height: 24px; }
.pb-cover:hover .pb-cover-play { opacity: 1; }
.playerbar.is-playing .pb-cover-play { opacity: 0; }

.pb-meta { min-width: 0; display: flex; flex-direction: column; justify-content: center; }
.pb-title { font-size: 14px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pb-sub { display: flex; align-items: center; gap: 7px; margin-top: 1px; font-size: 11.5px; color: var(--mute); min-width: 0; }
.pb-sub > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.pb-main { display: flex; flex-direction: column; align-items: center; gap: 2px; min-width: 0; width: 100%; }
.pb-controls { display: flex; align-items: center; gap: 4px; }
.pb-controls .icon-btn { width: 34px; height: 34px; }
.pb-play {
  width: 44px; height: 44px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  color: var(--on-brand);
  box-shadow: 0 8px 22px -8px var(--brand);
  transition: transform 0.24s var(--ease), filter var(--dur);
  margin: 0 4px;
}
.pb-play .ic { width: 22px; height: 22px; }
.pb-play:hover { transform: scale(1.07); filter: brightness(1.06); }
.pb-play:active { transform: scale(0.97); }
.pb-progress { display: flex; align-items: center; gap: 10px; width: 100%; max-width: 640px; }
.pb-time { font-size: 11px; color: var(--mute); font-family: var(--font-num); flex: none; min-width: 34px; text-align: center; }

.pb-right { display: flex; align-items: center; gap: 2px; justify-content: flex-end; }
.vol-wrap { display: flex; align-items: center; }
.range-vol { width: 76px; }

/* ------------------------------ 进度条 / 音量 ------------------------------ */
.range { position: relative; flex: 1; height: 20px; display: flex; align-items: center; cursor: pointer; touch-action: none; }
.range-track { position: relative; width: 100%; height: 5px; border-radius: 99px; background: var(--panel-3); overflow: visible; }
.range-buf { position: absolute; left: 0; top: 0; bottom: 0; width: 0; border-radius: 99px; background: color-mix(in srgb, var(--text) 16%, transparent); }
.range-fill {
  position: absolute; left: 0; top: 0; bottom: 0; width: 0;
  border-radius: 99px;
  background: linear-gradient(90deg, var(--brand), var(--brand-2));
  transition: width 0.08s linear;
}
.range-dot {
  position: absolute; top: 50%; left: 0;
  width: 12px; height: 12px;
  margin: -6px 0 0 -6px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4), 0 0 0 0 var(--glow);
  opacity: 0;
  transition: opacity var(--dur), box-shadow var(--dur), transform var(--dur);
}
.range:hover .range-dot, .range.is-drag .range-dot { opacity: 1; }
.range:hover .range-track { height: 6px; }
.range.is-drag .range-dot { transform: scale(1.25); box-shadow: 0 2px 10px rgba(0, 0, 0, 0.5), 0 0 0 6px var(--glow); }
.range:focus-visible { outline: none; }
.range:focus-visible .range-dot { opacity: 1; box-shadow: 0 0 0 5px var(--glow); }
.range-lg { height: 26px; }
.range-lg .range-track { height: 6px; }

/* ============================== 播放列表抽屉 ============================== */
.queue {
  position: fixed;
  /**
   * ★ 必须高于 .stage(110)：播放页是 position:fixed; inset:0 的全屏层，
   *   原来这里是 100 —— 于是在播放页点「加入列表」时，抽屉虽然存在于 DOM、
   *   却被整个盖在下面，用户看到的是"加了但什么都没有"。
   *   线上实测：elementFromPoint 在抽屉中心命中的是播放页的歌词层（clickable:false）。
   *   保持低于 .modal(120)：弹窗仍应压在播放列表之上。
   */
  z-index: 115;
  right: 16px;
  bottom: calc(var(--player-h) + 26px);
  width: min(400px, calc(100vw - 32px));
  max-height: min(62vh, 620px);
  display: flex;
  flex-direction: column;
  border-radius: var(--r-lg);
  background: var(--glass-2);
  border: 1px solid var(--hair);
  box-shadow: var(--shadow-3);
  backdrop-filter: blur(26px) saturate(1.6);
  -webkit-backdrop-filter: blur(26px) saturate(1.6);
  overflow: hidden;
  animation: queueIn 0.36s var(--ease-out) both;
}
@keyframes queueIn { from { opacity: 0; transform: translateY(18px) scale(0.98); } to { opacity: 1; transform: none; } }
.queue-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 15px 16px; border-bottom: 1px solid var(--line); }
.queue-head b { font-size: 14.5px; }
.queue-head span { font-size: 11.5px; margin-left: 8px; }
.queue-head-actions { display: flex; align-items: center; gap: 4px; }
.queue-body { overflow-y: auto; padding: 8px; display: flex; flex-direction: column; gap: 2px; }
.queue-row { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 11px; cursor: pointer; transition: background var(--dur); }
.queue-row:hover { background: var(--panel-2); }
.queue-row.on { background: color-mix(in srgb, var(--brand) 13%, transparent); }
.queue-row img { width: 38px; height: 38px; border-radius: 9px; object-fit: cover; flex: none; }
.queue-row .qm { min-width: 0; flex: 1; }
.queue-row .qm b { font-size: 12.5px; font-weight: 600; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.queue-row .qm span { font-size: 11px; color: var(--mute); }

/* ============================== 沉浸式播放页 ============================== */
.stage {
  position: fixed;
  /**
   * ★★ 这里**必须**写四个长写属性，不能写 `inset: 0` ★★
   *
   *   实测（Android 9 模拟器 ys_ph3，WebView = Chrome 69.0.3497.100，minSdk 24 覆盖到 Android 7）：
   *     `CSS.supports('inset','0')` → **false**
   *   而 `inset` 简写是 Chrome 87 才有的。不支持时整条声明被丢弃 =
   *   `position: fixed` 没了定位锚点，元素退回**静态位置** ——
   *   于是播放页被摆到**文档末尾**：实测 `top: 11764.7px`、`bottom: -11704.8px`，
   *   而视口只有 758px 高。用户看到的是"点了迷你条毫无反应"，
   *   屏幕上**根本没有播放页**（`#stage` 的 `hidden=false`，DOM 查得到，肉眼看不到）。
   *   这比"按钮太小"严重得多，而且**不报错、控制台一行日志都没有**。
   *
   *   同一批实测还发现这些在 Chrome 69 上**不支持**（全部静默降级）：
   *     inset / clamp() / min() / color-mix() / backdrop-filter / aspect-ratio / flex 的 gap
   *   —— 所以本文件的布局一律避免依赖它们做**关键几何**（间距用 margin，
   *   尺寸给一组固定值兜底）。兼容性探针见 `.deploy/pkg/eval-compat.js`。
   *
   *   注意 `top/right/bottom/left` 四个长写在任何引擎上都等价于 `inset: 0`，
   *   改回来只是为了让老 WebView 也能正确定位。
   */
  top: 0; right: 0; bottom: 0; left: 0;
  z-index: 110;
  display: grid;
  /* ★★ 必须显式声明列宽：grid 的隐式列默认 `auto`（≈ max-content），
     窄屏下会被头部/操作区的内容撑宽（实测 390/360/320 三个视口下都被撑成同一个 475px），
     右侧内容（分享/全屏、皮肤条的末项、部分操作按钮）直接被裁到视口外。
     而且因为这层是 position:fixed，溢出不会计入 documentElement.scrollWidth，
     常规「横向溢出探针」查不出来 —— 只能靠逐元素的 getBoundingClientRect().right > vw 判定。 */
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: auto minmax(0, 1fr) auto;
  background: var(--bg-0);
  animation: stageIn 0.42s var(--ease-out) both;
}
@keyframes stageIn { from { opacity: 0; transform: translateY(26px); } to { opacity: 1; transform: none; } }
.stage.closing { animation: stageOut 0.3s var(--ease) both; }
@keyframes stageOut { to { opacity: 0; transform: translateY(18px); } }

.stage-bg { position: absolute; top: 0; right: 0; bottom: 0; left: 0; overflow: hidden; z-index: 0; }
.stage-bg-img {
  position: absolute;
  top: -22%; right: -22%; bottom: -22%; left: -22%;
  background-size: cover;
  background-position: center;
  filter: blur(74px) saturate(1.5);
  transform: scale(1.16);
  opacity: 0.5;
  transition: background-image 0.9s var(--ease), opacity 0.6s;
}
.stage-bg::after {
  content: "";
  position: absolute; top: 0; right: 0; bottom: 0; left: 0;
  background:
    radial-gradient(72% 68% at 50% 42%, transparent, var(--bg-0) 78%),
    linear-gradient(to bottom, color-mix(in srgb, var(--bg-0) 42%, transparent), var(--bg-0) 96%);
}
.stage-top, .stage-body, .stage-bottom { position: relative; z-index: 2; min-width: 0; }

.stage-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 20px; }
.stage-skin-switch { display: flex; gap: 3px; padding: 4px; border-radius: 999px; background: var(--panel); border: 1px solid var(--line); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); overflow-x: auto; scrollbar-width: none; }
.stage-skin-switch::-webkit-scrollbar { display: none; }
.stage-skin-switch button { height: 30px; padding: 0 14px; border-radius: 999px; font-size: 12px; font-weight: 600; color: var(--mute); white-space: nowrap; transition: background var(--dur), color var(--dur); }
.stage-skin-switch button:hover { color: var(--text); }
.stage-skin-switch button.on { background: linear-gradient(135deg, var(--brand), var(--brand-2)); color: var(--on-brand); }
.stage-top-right { display: flex; gap: 4px; }

.stage-body {
  display: grid;
  /* ★ 三列：视觉区 | 信息/歌词 | 播放列表 + 智能推荐（用户要求右侧栏）。
     每列都显式写 minmax(...) —— 隐式列是 auto，会把内容撑出视口造成静默裁切。 */
  grid-template-columns: minmax(240px, 380px) minmax(0, 1fr) minmax(248px, 310px);
  gap: 24px; gap: clamp(18px, 2.4vw, 40px);
  align-content: center;
  /* 前两列维持原来的垂直居中观感；右侧栏单独拉伸，好让内部列表有确定高度可滚动 */
  align-items: center;
  padding: 0 40px 8px; padding: 0 clamp(18px, 4vw, 68px) 8px;
  min-height: 0;
}

/* ------------------------------ 左侧视觉区 ------------------------------ */
/**
 * ★★ 视觉区必须是**正方形且不被裁**（2026-10-17 用户反馈：
 *    「选择 90 年代，光碟底部有一部分被遮挡」）。
 *
 * 旧实现靠 `aspect-ratio: 1/1` + `max-height: min(52vh, 440px)`：
 *   · `aspect-ratio` 在 Android 9 自带内核（Chromium 66）里**不存在** ⇒ 高度退化成 auto；
 *   · 而 `skin-panel` 是 `position:absolute; inset:0` ⇒ 父级高度算出来极小，
 *     再被 `.skin-90s { overflow: hidden }` 一裁，光盘就只剩顶上一条（用户截图的样子）；
 *   · 桌面短窗口下 `52vh` 也能小于宽度，同样会把 80% 宽的光盘裁掉底部。
 * 现在改用**padding-top 占位**（所有引擎都认的方形写法），并把高度上限彻底删掉：
 *   宽度由列宽 / 媒体查询控制，高度恒等于宽度 ⇒ 光盘（宽 80%）永远有 10% 的上下余量。
 */
.stage-visual { position: relative; width: 100%; margin: 0 auto; }
.stage-visual::before { content: ""; display: block; padding-top: 100%; }
.skin-panel { position: absolute; top: 0; right: 0; bottom: 0; left: 0; display: none; place-items: center; }
body[data-skin="70s"] .skin-70s,
body[data-skin="80s"] .skin-80s,
body[data-skin="90s"] .skin-90s,
body[data-skin="00s"] .skin-00s,
body[data-skin="modern"] .skin-modern { display: grid; animation: skinIn 0.5s var(--ease-out) both; }
@keyframes skinIn { from { opacity: 0; transform: scale(0.94) rotate(-1.5deg); } to { opacity: 1; transform: none; } }

/* —— 70 年代：黑胶 + 木质面板 —— */
.skin-70s .wood {
  position: relative;
  width: 100%; height: 100%;
  border-radius: 22px;
  background:
    repeating-linear-gradient(92deg, rgba(0, 0, 0, 0.06) 0 2px, transparent 2px 5px),
    linear-gradient(140deg, #6b4423, #4a2c14 60%, #5a3620);
  box-shadow: inset 0 0 0 3px rgba(255, 214, 150, 0.16), var(--shadow-2);
  display: grid; place-items: center;
  overflow: hidden;
}
.skin-70s .wood::before {
  content: "";
  position: absolute; top: 12px; right: 12px; bottom: 12px; left: 12px;
  border-radius: 14px;
  border: 1px dashed rgba(255, 220, 160, 0.2);
}
.skin-70s .disc {
  position: relative;
  width: 74%; aspect-ratio: 1;
  border-radius: 50%;
  background:
    repeating-radial-gradient(circle at 50% 50%, #15100b 0 3px, #1d1611 3px 4.4px);
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.6), inset 0 0 0 1px rgba(255, 255, 255, 0.06);
  display: grid; place-items: center;
}
.skin-70s .disc::after {
  content: "";
  position: absolute; top: 6%; right: 6%; bottom: 6%; left: 6%;
  border-radius: 50%;
  background: conic-gradient(from 0deg, transparent 0 12%, rgba(255, 220, 150, 0.12) 22%, transparent 34%, rgba(255, 220, 150, 0.08) 62%, transparent 76%);
}
.skin-70s .disc-label {
  width: 34%; aspect-ratio: 1;
  border-radius: 50%;
  overflow: hidden;
  box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.5);
  z-index: 1;
}
.skin-70s .disc-label img { width: 100%; height: 100%; object-fit: cover; }
.skin-70s .disc-label::after {
  content: "";
  position: absolute;
  width: 8px; height: 8px; margin: -4px 0 0 -4px;
  left: 50%; top: 50%;
  border-radius: 50%;
  background: #0d0a07;
}
.skin-70s .tonearm {
  position: absolute;
  right: 7%; top: 4%;
  width: 5px; height: 46%;
  border-radius: 4px;
  background: linear-gradient(to bottom, #d9c9a8, #8a7355);
  transform-origin: top center;
  transform: rotate(24deg);
  transition: transform 0.7s var(--ease-out);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.5);
}
.skin-70s .tonearm::after { content: ""; position: absolute; left: -4px; bottom: -7px; width: 13px; height: 13px; border-radius: 3px; background: #cfc0a0; }
.is-playing .skin-70s .tonearm { transform: rotate(6deg); }
.is-playing .skin-70s .disc { animation: spin 3.4s linear infinite; }
.skin-70s .platter-hint { position: absolute; bottom: -28px; left: 0; right: 0; text-align: center; font-size: 11.5px; color: var(--mute); letter-spacing: 0.1em; }

/* —— 80 年代：磁带 + 霓虹网格 —— */
.skin-80s { place-items: center; }
.skin-80s .grid80 {
  position: absolute; top: -10%; right: -10%; bottom: 6%; left: -10%;
  background-image:
    linear-gradient(rgba(255, 0, 200, 0.36) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 220, 255, 0.32) 1px, transparent 1px);
  background-size: 34px 34px, 34px 34px;
  transform: perspective(320px) rotateX(58deg);
  transform-origin: bottom center;
  mask-image: linear-gradient(to top, #000, transparent 74%);
  -webkit-mask-image: linear-gradient(to top, #000, transparent 74%);
  animation: gridScroll 5s linear infinite;
}
@keyframes gridScroll { to { background-position: 0 34px, 34px 0; } }
.skin-80s .cassette {
  position: relative;
  width: 78%; aspect-ratio: 1.52 / 1;
  border-radius: 14px;
  background: linear-gradient(160deg, #2a1035, #15081f 70%);
  border: 2px solid rgba(255, 60, 200, 0.5);
  box-shadow: 0 0 30px rgba(255, 0, 200, 0.36), inset 0 0 26px rgba(0, 220, 255, 0.14), var(--shadow-2);
  padding: 11px;
  display: flex; flex-direction: column; gap: 8px;
}
.skin-80s .cassette-label {
  flex: 1;
  border-radius: 8px;
  overflow: hidden;
  display: flex; align-items: center; gap: 10px;
  padding: 8px;
  background: linear-gradient(120deg, rgba(255, 0, 200, 0.24), rgba(0, 220, 255, 0.14));
  border: 1px solid rgba(255, 255, 255, 0.14);
}
.skin-80s .cassette-label img { width: 42px; height: 42px; border-radius: 6px; object-fit: cover; flex: none; }
.skin-80s .cassette-title { font-size: 12.5px; font-weight: 700; color: #ffd6ff; letter-spacing: 0.06em; text-transform: uppercase; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-family: var(--font-num); }
.skin-80s .cassette-reels { display: flex; justify-content: center; gap: 22px; padding-bottom: 3px; }
.skin-80s .reel-sm {
  width: 34px; height: 34px;
  border-radius: 50%;
  background: repeating-conic-gradient(from 0deg, #ff3cc8 0 16deg, #1a0a24 16deg 32deg);
  box-shadow: inset 0 0 0 8px #12061b, 0 0 12px rgba(255, 60, 200, 0.5);
  position: relative;
}
.skin-80s .reel-sm::after { content: ""; position: absolute; top: 43%; right: 43%; bottom: 43%; left: 43%; border-radius: 50%; background: #ffd6ff; }
.is-playing .skin-80s .reel-sm { animation: spin 1.5s linear infinite; }
.skin-80s .reel-sm:last-child { animation-direction: reverse; }
.skin-80s .platter-hint { display: none; }

/* —— 90 年代：CD 光盘 + 激光 —— */
.skin-90s { overflow: hidden; }
.skin-90s .cd {
  position: relative;
  width: 80%; aspect-ratio: 1;
  border-radius: 50%;
  background:
    conic-gradient(from 210deg, #7dd3fc, #a78bfa, #f0abfc, #67e8f9, #818cf8, #7dd3fc);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.55), inset 0 0 40px rgba(255, 255, 255, 0.36);
  display: grid; place-items: center;
  opacity: 0.94;
}
.skin-90s .cd::before {
  content: "";
  position: absolute; top: 16%; right: 16%; bottom: 16%; left: 16%;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.5);
  box-shadow: inset 0 0 24px rgba(255, 255, 255, 0.3);
}
.skin-90s .cd-hole { width: 32%; aspect-ratio: 1; border-radius: 50%; overflow: hidden; box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.34), 0 0 26px rgba(139, 92, 246, 0.6); position: relative; }
.skin-90s .cd-hole img { width: 100%; height: 100%; object-fit: cover; }
.skin-90s .cd-hole::after { content: ""; position: absolute; left: 50%; top: 50%; width: 12px; height: 12px; margin: -6px; border-radius: 50%; background: rgba(10, 10, 20, 0.6); }
.is-playing .skin-90s .cd { animation: spin 4.6s linear infinite; }
.skin-90s .cd-laser {
  position: absolute; left: 8%; right: 8%; bottom: 6%;
  height: 2px;
  background: linear-gradient(90deg, transparent, #22d3ee, transparent);
  box-shadow: 0 0 18px 2px rgba(34, 211, 238, 0.7);
  animation: laser 2.6s ease-in-out infinite;
}
@keyframes laser { 0%, 100% { transform: translateY(-160px) scaleX(0.5); opacity: 0.3; } 50% { transform: translateY(-260px) scaleX(1); opacity: 1; } }

/* —— 00 年代：iPod 白色界面 —— */
.skin-00s { place-items: center; }
.skin-00s .ipod {
  width: 62%; aspect-ratio: 0.62 / 1;
  border-radius: 30px;
  background: linear-gradient(165deg, #ffffff, #e6e8ee);
  box-shadow: 0 22px 52px rgba(0, 0, 0, 0.4), inset 0 0 0 1px rgba(255, 255, 255, 0.9);
  padding: 16px 14px;
  display: flex; flex-direction: column; gap: 14px;
}
.skin-00s .ipod-screen {
  flex: 1.1;
  border-radius: 8px;
  background: linear-gradient(180deg, #dfe7f5, #c9d6ee);
  border: 2px solid #9aa6bd;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
  overflow: hidden;
  padding: 8px;
}
.skin-00s .ipod-screen img { width: 52%; aspect-ratio: 1; object-fit: cover; border-radius: 4px; box-shadow: 0 3px 8px rgba(0, 0, 0, 0.25); }
.skin-00s .ipod-screen span { font-size: 10.5px; color: #2b3245; font-weight: 700; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.skin-00s .clickwheel {
  position: relative;
  flex: 1;
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle at 50% 50%, #f7f8fa 0 40%, #eceef3 40% 100%);
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.08), 0 3px 12px rgba(0, 0, 0, 0.14);
  font-size: 8.5px; color: #7b8497; font-weight: 700;
  align-self: center;
  width: 78%;
}
.skin-00s .clickwheel .cw-center { position: absolute; left: 50%; top: 50%; width: 38%; aspect-ratio: 1; transform: translate(-50%, -50%); border-radius: 50%; background: linear-gradient(160deg, #fff, #e9ebf1); box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.07); }
.skin-00s .clickwheel span { position: absolute; }
.skin-00s .cw-menu { top: 9%; left: 50%; transform: translateX(-50%); }
.skin-00s .cw-play { bottom: 9%; left: 50%; transform: translateX(-50%); }
.skin-00s .cw-prev { left: 8%; top: 50%; transform: translateY(-50%); }
.skin-00s .cw-next { right: 8%; top: 50%; transform: translateY(-50%); }
.is-playing .skin-00s .clickwheel { animation: spin 8s linear infinite; }
.skin-00s .platter-hint { display: none; }

/* —— 10 年代+：现代毛玻璃 + 频谱波形 —— */
.skin-modern { place-items: center; }
.skin-modern .coverwrap {
  position: relative;
  width: 86%; aspect-ratio: 1;
  border-radius: 26px;
  overflow: hidden;
  box-shadow: var(--shadow-3), 0 0 60px -20px var(--tint);
}
.skin-modern .coverwrap img { width: 100%; height: 100%; object-fit: cover; }
.skin-modern .cover-glow {
  position: absolute; top: 0; right: 0; bottom: 0; left: 0;
  background: linear-gradient(200deg, transparent 40%, color-mix(in srgb, var(--tint) 36%, transparent));
  mix-blend-mode: soft-light;
}
.is-playing .skin-modern .coverwrap { animation: floaty 5.5s ease-in-out infinite; }
@keyframes floaty { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-9px); } }
.skin-modern .wavebars { position: absolute; left: 0; right: 0; bottom: -34px; height: 26px; display: flex; align-items: flex-end; justify-content: center; gap: 3px; }
.skin-modern .wavebars i { width: 3.5px; border-radius: 3px; background: linear-gradient(to top, var(--wave-1), var(--wave-2)); height: 20%; transition: height 0.14s ease; }
.is-playing .skin-modern .wavebars i { animation: waveJump 1.1s ease-in-out infinite; }
@keyframes waveJump { 0%, 100% { height: 16%; } 50% { height: 100%; } }

/* ------------------------------ 右侧信息区 ------------------------------ */
.stage-info { display: flex; flex-direction: column; gap: 18px; min-width: 0; min-height: 0; }
.stage-head { display: flex; flex-direction: column; gap: 8px; }
/* ★ column flex 默认 align-items:stretch，会把「音乐」药丸拉成整行宽的空白长条 */
.stage-head > .chip { align-self: flex-start; }
.stage-title { font-size: 30px; font-size: clamp(22px, 2.8vw, 40px); line-height: 1.15; letter-spacing: -0.02em; }
.stage-sub { font-size: 14px; font-size: clamp(12px, 1.1vw, 15px); color: var(--dim); }
.stage-tags { display: flex; gap: 7px; flex-wrap: wrap; }
.stage-mid { position: relative; min-height: 0; flex: 1; }
.stage-lyric {
  /* ★ --lh 不能写成 min(38vh, 320px)：自定义属性的值**不在解析期校验**，
     `--lh: min(...)` 在老引擎上会被原样存下，等到 `height: var(--lh)` 才判定非法
     ⇒ height 整条失效。所以这里用「38vh + max-height 封顶」表达同一个 min()。 */
  --lh: 38vh;
  height: var(--lh);
  max-height: 320px;
  overflow-y: auto;
  mask-image: linear-gradient(to bottom, transparent, #000 16%, #000 84%, transparent);
  -webkit-mask-image: linear-gradient(to bottom, transparent, #000 16%, #000 84%, transparent);
  scrollbar-width: none;
  scroll-behavior: smooth;
}
.stage-lyric::-webkit-scrollbar { display: none; }

/* ---------------------- 全屏歌词（#stage 加 .lyr-fs，v1.3.5） ----------------------
 * 用户原话：「音乐页面点击歌词要显示全屏，就是上面的播放器和选择播放器样式消失，
 * 再点击歌词还原」。点击歌词区由 ui.js 切换 .lyr-fs，这里只管布局：
 *   藏掉：.stage-visual（年代播放器视觉）、#skinSwitch（皮肤切换条）、
 *         .stage-actions（动作栏）、.stage-side（右栏）；
 *   保留：顶栏（关闭/列表/分享/全屏还在）、歌名信息、底部三行（进度/音质/遥控）。
 * ★ 全用 display:none + 覆盖既有属性，不引入新几何手段 —— 老 WebView 兼容面
 *   （见文件头 .stage 的注释）对这里同样适用。 */
.stage.lyr-fs .stage-visual,
.stage.lyr-fs .stage-side,
.stage.lyr-fs .stage-actions { display: none; }
/* 皮肤条用 visibility 而不是 display：顶栏是 flex space-between，
   中间元素整个摘掉后左右两撮会挤到一起，留个空位布局才稳 */
.stage.lyr-fs .stage-skin-switch { visibility: hidden; }
.stage.lyr-fs .stage-body { grid-template-columns: minmax(0, 1fr); }
.stage.lyr-fs .stage-info { width: 100%; max-width: 860px; margin: 0 auto; }
.stage.lyr-fs .stage-lyric { --lh: 58vh; height: var(--lh); max-height: 58vh; }

/* ---------------------- MV 播放态（#stage 加 .is-mv，v1.3.6 续修） ----------------------
 * 用户原话：「播放 MV 的界面，不要音乐播放的年代和下面的播放图，因为 mv 主要是看视频，
 *           直接显示（视频）」—— 附了一张真机截图，红框圈住「70年代…10年代+」那排胶囊
 *           和它下面那张黑胶唱片图。
 *
 * 这两样在 MV 态下都是**纯负担**：
 *   · #skinSwitch（年代皮肤切换条）只负责切换左侧那张唱片/磁带/CD 的皮肤。
 *     MV 态下那张图不显示 ⇒ 五颗胶囊点下去界面**毫无变化**（又一处"死按钮"，
 *     而且是最难查的那种：DOM 里查得到、点得动、控制台干净）。
 *   · .stage-visual 是装饰，手机上实测占 21vh，把视频和底部控制条一起往下挤。
 *
 * 所以 MV 态把两者摘掉；歌名信息 / 动作栏 / 右侧列表与推荐**一个都不少**
 * （与 .lyr-fs 的差别正在这里：那边是"全屏歌词"，连动作栏和右栏都藏）。
 *
 * ★ 摘掉第一列后必须**显式重写跨列** —— grid 的隐式列是 auto，不重写会让
 *   信息区被压进 240px 宽的第一列（视觉区原来那一列）。
 *   这里用「.stage-info 跨前两列」而不是逐断点重写 grid-template-columns，
 *   因为它一份规则在所有断点都成立：
 *     · >1023（3 列）：跨「视觉列 + 信息列」，右栏仍在第 3 列；
 *     · ≤1023（2 列，右栏 1 / -1 跨行铺在下一行）：1 / 3 正好 == 1 / -1，跨满两列；
 *     · ≤767（.stage-body 已是 display:block）：跨列属性自动失效，无害。
 *   —— 少写三处断点，就少三处"漏了某断点导致静默错位"的机会。
 *
 * ★ 皮肤条这里用 display:none（不是 .lyr-fs 那处的 visibility:hidden）：
 *   那边留空位是为了桌面端顶栏两端对齐不挤；手机端皮肤条本来就独占一行
 *   （order:3 / width:100%），visibility 会白留一条约 37px 的空行，
 *   看着就像"没删干净"。顶栏只剩「收起 + 右侧三颗」两项时 space-between
 *   依旧两端对齐。 */
.stage.is-mv .stage-visual,
.stage.is-mv .stage-skin-switch { display: none; }
.stage.is-mv .stage-info { grid-column: 1 / 3; }

/* ★ 上下留白必须按「容器高度」算，不能写 padding:42% ——
   CSS 竖向 padding 的百分比是按【宽度】解析的，847px 宽会算出 356px 留白，
   直接把歌词顶到可视区之外（表现为「歌词区一片空白」）。
   这里用 --lh 显式按高度计算，保证当前行落在可视区内。 */
.lyric-inner { display: flex; flex-direction: column; gap: 12px; padding: calc(var(--lh, 320px) * 0.42) 0; }
.lyric-line {
  font-size: 15px;
  line-height: 1.5;
  color: var(--mute);
  transition: color 0.32s var(--ease), transform 0.32s var(--ease), opacity 0.32s, font-size 0.32s;
  cursor: pointer;
  transform-origin: left center;
}
.lyric-line:hover { color: var(--dim); }
.lyric-line.on { color: var(--text); font-size: 18px; font-weight: 700; transform: scale(1.02); text-shadow: 0 0 26px var(--glow-tint, var(--glow)); }
.lyric-line.tr { font-size: 12.5px; color: var(--mute); margin-top: -8px; }
.lyric-line.tr.on { font-size: 13.5px; }
.lyric-empty { color: var(--mute); font-size: 13px; }

/* 视频区（MV） */
.stage-video { position: relative; border-radius: var(--r-md); overflow: hidden; background: #000; }
.stage-video video { width: 100%; display: block; max-height: 400px; max-height: min(46vh, 400px); background: #000; }
.stage-video[hidden] { display: none; }
.danmaku-layer { position: absolute; top: 0; right: 0; bottom: 0; left: 0; overflow: hidden; pointer-events: none; }
/* ★ 弹幕开关关掉时整层隐藏（由 player.js 的 applyDanmakuPref() 挂 .off）。
   只靠 spawnDanmaku 里拦新弹幕是不够的：已经在飞的十几条会照旧飘完，
   用户点开关后画面几乎没变化，观感就是"按钮没反应"。 */
.danmaku-layer.off { display: none; }
.dm-item {
  position: absolute;
  white-space: nowrap;
  font-size: 15px;
  font-weight: 600;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.9), 0 0 2px rgba(0, 0, 0, 0.9);
  will-change: transform;
}
@keyframes dmRun { from { transform: translateX(100%); } to { transform: translateX(-100%); } }
.danmaku-bar { position: absolute; left: 10px; right: 10px; bottom: 10px; display: flex; gap: 8px; z-index: 3; }
/**
 * ★ `hidden` 属性必须显式给规则，否则完全不生效。
 *   `.danmaku-bar { display: flex }` 是**作者样式**，而 `[hidden] { display: none }`
 *   只来自 UA 默认样式表 —— 作者样式永远赢，于是 `bar.hidden = true` 在视觉上毫无作用。
 *   这类"hidden 被 display 吃掉"的坑在本项目已经出现过（`.stage-video[hidden]` 也是显式补的）。
 *   `.danmaku-bar[hidden]`（0,2,0）比 `.danmaku-bar`（0,1,0）优先级高，所以不需要 !important。
 */
.danmaku-bar[hidden] { display: none; }
.danmaku-bar input {
  flex: 1; height: 36px; padding: 0 14px;
  border-radius: 999px;
  background: rgba(10, 10, 16, 0.62);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: #fff; font-size: 12.5px;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.danmaku-bar input::placeholder { color: rgba(255, 255, 255, 0.55); }
.danmaku-bar .btn { background: rgba(255, 255, 255, 0.16); border-color: rgba(255, 255, 255, 0.2); color: #fff; backdrop-filter: blur(10px); }

.stage-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.stage-actions .icon-btn { border: 1px solid var(--line); background: var(--panel); }
.stage-actions .icon-btn.is-on { color: var(--brand); border-color: color-mix(in srgb, var(--brand) 40%, transparent); }

/* ★★ 播放传输控制（v1.3.3 新增，v1.3.4 按参考图搬到 .stage-bottom）
      = 播放模式 + 上一首 + 播放/暂停 + 下一首 + 播放列表

   由来（两次用户反馈叠起来才看清）：
     · v1.3.3 用户说「播放页面没有上一首，下一首切换按钮，无语了」。查出的根因不是
       漏写按钮，而是**整块能力被浮层盖住**：换歌那几颗只存在于底部播放条，
       而 .stage 是 z-index:110 的全屏浮层、播放条是 80 ⇒ 进播放页等于把播放条整个盖住。
       当时把它们做成一簇塞进了动作栏（.stage-actions）。
     · v1.3.4 用户发了张参考图，追问后确认要的是「播放页面简约」+「是改播放器上一首
       下一首这些功能上，不是风格皮肤」。参考图的结构差别在于：传输控制是
       **独立一排、居中、常驻底部**；而塞在 .stage-actions 里会随内容滚走，
       视觉上也只是"一堆按钮里的又一个"，用户依然觉得"这页没有换歌按钮"。
       ⇒ 搬到 .stage-bottom 的静态 HTML（#stageTransport），并补上参考图的第五颗「列表」。

   ★ 尺寸梯度 38 / 44 / 54 是刻意的：
     播放键最大、且是唯一有底色的（主控件）；换歌键次之（最常点）；
     模式与列表最小且是纯线性图标（低频，不该抢视线）。
   ★ 不许用 :where() 压权重（v1.3.3 实打实踩过）：.icon-btn 的全局基础样式
     （border + background）会把它整条吃掉，症状是"这排控件看起来根本不存在"。*/
.stage-transport {
  display: flex;
  align-items: center;
  justify-content: center;
  /* 同上：间距用相邻兄弟 margin 而不是 flex 的 gap（Chrome 69 上 gap 无效，
     五颗会紧紧贴在一起 —— 正好把用户抱怨的"太小、不好按"放大成"挤成一团"）。 */
}
.stage-transport > * + * { margin-left: 20px; margin-left: clamp(10px, 2.4vw, 26px); }
.stage-transport .icon-btn {
  flex: none;
  border-color: transparent;
  background: transparent;
  color: var(--text);
  transition: color 0.18s var(--ease), transform 0.18s var(--ease);
}
.stage-transport .icon-btn:hover { color: var(--brand); }
/* 模式 / 列表：最小、纯线性，低频且不该抢视线 */
.stage-transport .stage-mode-btn,
.stage-transport .stage-list-btn { width: 38px; height: 38px; color: var(--mute); }
.stage-transport .stage-mode-btn .ic,
.stage-transport .stage-list-btn .ic { width: 18px; height: 18px; }
/* 非「顺序播放」时点亮：与底部播放条 #pbRepeat 的 .is-on 语义一致 */
.stage-transport .stage-mode-btn.is-on { color: var(--brand); }
/* 上一首 / 下一首：比模式键大一圈，是这一排里最常点的两颗 */
.stage-transport .stage-step-btn { width: 44px; height: 44px; }
.stage-transport .stage-step-btn .ic { width: 22px; height: 22px; }
/* 主控件：最大 + 品牌渐变（沿用 v1.2.17 的取舍），让它读起来是"主控件"而不是"又一个图标" */
.stage-transport .stage-play-btn {
  width: 54px;
  height: 54px;
  border-color: transparent;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  color: var(--on-brand);
  box-shadow: 0 10px 26px -12px var(--brand);
}
.stage-transport .stage-play-btn .ic { width: 24px; height: 24px; }
/* ★ hover 必须显式写回 --on-brand：上面那条 `.stage-transport .icon-btn:hover { color: var(--brand) }`
   是 (0,3,0)，会把播放键的反色文字盖成品色 —— 深色主题下就是"白字变深绿"，几乎看不见。 */
.stage-transport .stage-play-btn:hover { color: var(--on-brand); filter: brightness(1.06); transform: translateY(-1px); }
/* --------------------- 原声 / 伴唱（两段式，必须有明显选中态） ---------------------
   ★ 用户反馈「原唱和伴唱不明显」。实测旧实现是一颗普通 .btn，只有**文案**在变
     （原声 ↔ 伴唱中），color / background-color / border-color 与旁边的「定时关闭」
     **完全相同** —— 在整排按钮里看不出当前是哪一档。
   现在：未选中 = 透明 + 暗色文字；选中 = 品牌渐变填充 + 反色文字 + 辉光。
   用与 .btn-primary 相同的一对变量（--brand / --on-brand），
   实测这 15 套主题 + :root 都定义了这两个变量 → 每套主题下对比度都有保证。
   ★ 选择器写成三段（.stage-actions .vocal-switch .btn）是为了压过窄屏媒体查询里的
     .stage-actions .btn { height: 34px; padding: 0 14px; } —— 以选择器权重取胜，与书写顺序无关。 */
.stage-actions .vocal-switch {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 3px;
  border-radius: 999px;
  background: var(--panel);
  border: 1px solid var(--line);
}
.stage-actions .vocal-switch .btn {
  height: 28px;
  padding: 0 13px;
  font-size: 12px;
  border-radius: 999px;
  background: transparent;
  border-color: transparent;
  color: var(--dim);
  box-shadow: none;
}
.stage-actions .vocal-switch .btn:hover { background: var(--panel-3); color: var(--text); transform: none; }
.stage-actions .vocal-switch .btn.is-on,
.stage-actions .vocal-switch .btn[aria-pressed="true"] {
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  color: var(--on-brand);
  border-color: transparent;
  box-shadow: 0 6px 18px -8px var(--brand);
}

/* ============ 右侧栏：播放列表 + 智能推荐（用户要求） ============
 * ★ 布局要点：两块共用同一列，各自 flex:1 且 min-height:0 —— 这样列表内部滚动，
 *   不会把播放页整体撑高、把底部的进度条顶出视口。
 *   （min-height:0 是必须的：flex 子项默认 min-height:auto 会拒绝收缩，
 *    列表一长就把父容器撑破 —— 这个坑在本项目已经踩过一次。）
 */
.stage-side { display: flex; flex-direction: column; gap: 12px; min-width: 0; min-height: 0; max-height: 100%; align-self: stretch; }
.side-block {
  display: flex; flex-direction: column; flex: 1 1 0; min-height: 0;
  background: color-mix(in srgb, var(--panel) 78%, transparent);
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow: hidden;
}
.side-head { display: flex; align-items: center; gap: 8px; padding: 9px 10px 9px 12px; flex: none; }
.side-toggle {
  display: flex; align-items: center; gap: 7px; flex: 1 1 auto; min-width: 0;
  background: none; border: 0; padding: 0; margin: 0;
  color: inherit; font: inherit; text-align: left; cursor: default;
}
.side-toggle b { font-size: 13px; font-weight: 650; }
.side-toggle .ic { opacity: 0.75; flex: none; }
.side-count { font-size: 11.5px; color: var(--dim); font-variant-numeric: tabular-nums; }
.side-caret { display: none; margin-left: auto; transition: transform 0.18s ease; }
.side-head-actions { display: flex; align-items: center; gap: 6px; flex: none; }
.icon-btn-sm { width: 28px; height: 28px; }
.side-body { display: flex; flex-direction: column; min-height: 0; flex: 1 1 auto; }
.side-sub { margin: 0; padding: 0 12px 8px; font-size: 11.5px; color: var(--dim); flex: none; }
.side-list { overflow-y: auto; overscroll-behavior: contain; min-height: 0; padding: 0 8px 10px; display: flex; flex-direction: column; gap: 3px; }
.side-empty { padding: 18px 12px; font-size: 12px; color: var(--dim); text-align: center; }

.side-item {
  display: grid; grid-template-columns: 34px minmax(0, 1fr) auto;
  gap: 9px; align-items: center;
  padding: 5px 6px; border-radius: 10px; cursor: pointer; border: 0; background: none; color: inherit; text-align: left; font: inherit;
}
.side-item:hover { background: color-mix(in srgb, var(--brand) 10%, transparent); }
.side-item.on { background: color-mix(in srgb, var(--brand) 18%, transparent); }
.side-item.on .si-name { color: var(--brand); font-weight: 650; }
.side-item img { width: 34px; height: 34px; border-radius: 8px; object-fit: cover; background: var(--panel); display: block; }
.side-item .si-main { min-width: 0; }
.side-item .si-name { font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.side-item .si-artist { font-size: 11px; color: var(--dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 1px; }
.side-item .si-index { font-size: 11px; color: var(--dim); font-variant-numeric: tabular-nums; text-align: center; }
.side-item .si-ops { display: flex; align-items: center; gap: 1px; opacity: 0; transition: opacity 0.15s ease; }
.side-item:hover .si-ops,
.side-item:focus-within .si-ops { opacity: 1; }
.side-item .si-ops button {
  width: 24px; height: 24px; border-radius: 7px; border: 0; background: none;
  color: var(--dim); display: inline-grid; place-items: center; cursor: pointer;
}
.side-item .si-ops button:hover { background: color-mix(in srgb, var(--brand) 20%, transparent); color: var(--text); }
.side-item .si-ops .ic { width: 15px; height: 15px; }
.side-item .si-ops button[data-op="up"] .ic { transform: rotate(180deg); }
/* ★ 触屏没有 hover：操作按钮必须常显，否则手机上永远点不到「上移/删除」 */
@media (hover: none) { .side-item .si-ops { opacity: 1; } }

/* =========================================================================
 * 播放页底部（v1.3.4 按参考图拆成三行）
 *   行1 进度条 ｜ 行2 时间 · 音质 · 总时长 · 音量 ｜ 行3 传输控制
 *   ★ 为什么拆：参考图把「进度」和「播放遥控」放在同一块底部区域里上下相邻，
 *     视线不用在页面里来回找；原来进度条独占一行，而遥控散在滚动区的动作栏里。
 *   ★ 这一块是 .stage 的 grid 第 3 行（auto），高度完全由内容决定 ——
 *     它每长高一点，中间内容区就少一点，所以尺寸取"够用即可"，
 *     窄屏还要再压一档（见文件末尾的媒体查询）。
 * ========================================================================= */
.stage-bottom {
  display: flex;
  flex-direction: column;
  /**
   * ★ 不能用 flex 的 `gap` 做这三行的间距（实测 Chrome 69 的 WebView 上
   *   `CSS.supports('gap','8px')` 返回 **true 但实际无效** —— 它只是"语法合法"，
   *   flex 容器的 gap 是 Chrome 84 才实现的，而 `CSS.supports` 判不出显示上下文）。
   *   实测间距结果是 0/0，三行贴在一起。
   *   改用相邻兄弟 margin：所有引擎都支持，且与 gap 视觉完全一致。
   */
  padding: 10px 40px 20px; padding: 10px clamp(18px, 4vw, 68px) 20px;
}
.stage-bottom > * + * { margin-top: 9px; }
.stage-progress-row { display: flex; align-items: center; }
.stage-progress-row .range { flex: 1; }
/* 时间 · 音质 · 总时长 · 音量：音质居中，总时长与音量靠右 */
.stage-meta-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 10px;
}
.stage-meta-row .stage-quality { justify-self: center; }
/* 音质胶囊（v1.3.4 从动作栏搬来）：常显当前档位，点击进音质设置。
   颜色一律由 --text / --mute 派生，浅色主题下自动是"浅底深字"。 */
.stage-quality {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 24px;
  padding: 0 10px;
  border-radius: 999px;
  /* ★ 每条 color-mix 前面都先给一条"老引擎能懂"的实色兜底：
     Chrome 69（Android 9 WebView）不支持 color-mix()，整条声明会被丢弃 ——
     只写 color-mix 的话这颗胶囊在老机器上**没有边框也没有底色**，
     读起来像一段普通文字，看不出是个可点的控件。 */
  border: 1px solid var(--line);
  border: 1px solid color-mix(in srgb, var(--text) 14%, transparent);
  background: var(--panel);
  background: color-mix(in srgb, var(--text) 6%, transparent);
  color: var(--mute);
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
  transition: color 0.18s var(--ease), border-color 0.18s var(--ease);
}
.stage-quality .ic { width: 13px; height: 13px; }
.stage-quality:hover { color: var(--text); border-color: color-mix(in srgb, var(--text) 28%, transparent); }
.stage-time { font-size: 11.5px; color: var(--mute); font-family: var(--font-num); min-width: 40px; text-align: center; }
/*
 * ★ 播放页内的音量组（v1.3.3）。
 *   位置刻意与底部播放条一致 —— 进度条在中间、音量在最右，两处布局同构。
 *   flex:none 让它不被进度条的 flex:1 挤扁（.range 是 flex:1，若不写会被压成 0 宽）。
 *   ≤1279 由下面的媒体查询隐藏：那个断点下底栏自己也是隐藏 vol-wrap 的
 *   （.pb-right .vol-wrap { display: none }），两边口径保持一致；
 *   再说手机/平板上音量本来就该走系统键。
 */
.stage-vol { display: flex; align-items: center; gap: 6px; flex: none; }
.stage-vol .range-vol { width: 88px; }
.stage-vol .icon-btn { border: 1px solid var(--line); background: var(--panel); color: var(--mute); }
.stage-vol .icon-btn:hover { color: var(--text); }
/* 静音态给个明确的点亮反馈（和 #pbMute 只是换图标不同 —— 那条在播放条里够醒目，
   这条在进度条右侧容易被忽略，多一层颜色更好认） */
.stage-vol .icon-btn.is-on { color: var(--brand); border-color: var(--brand); border-color: color-mix(in srgb, var(--brand) 40%, transparent); }
/* ---------------------------------------------------------------- 正版声明
   ★ 它原来是**完全没有样式**的裸 p：落进 .stage 的 grid 第 4 行，
     默认 margin:1em 0 + 16px 字号 + 正常行高，实测占掉约 45px 纵向空间。
     而 .stage 的高度是 100vh —— 这 45px 是从「视觉区 / 歌词区 / 动作栏」里硬挤出来的，
     在 653px 高的手机上直接把动作栏挤出可视区（本轮"点不到原声/伴唱"的隐性推手）。
   补样式后压到 1 行（约 25px）：小字、弱色、居中、超长省略。
   完整声明另有专门页面（#/about）与设置中心「关于本站」，信息不会丢。 */
.stage-legal {
  margin: 0;
  padding: 0 40px 12px; padding: 0 clamp(18px, 4vw, 68px) 12px;
  font-size: 11.5px;
  line-height: 1.5;
  color: var(--mute);
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* =========================================================================
 * 全屏（两条独立路径，因为用户诉求不同）
 *   ① #stageFull  → .stage 整体全屏：看歌词/操作区时用
 *   ② 视频全屏     → .stage-video 全屏：看 MV 画面时用（连弹幕一起带上）
 *   ★ 两条都必须显式处理，因为 .stage 是 grid:
 *     - .stage-video video 平时被 max-height: min(46vh,400px) 压着，
 *       全屏时若不解除，画面只会占屏幕 46% 高，看着像"没全屏"；
 *     - .stage-visual 也被 max-height 压着，全屏下要放开才有沉浸感。
 *   两套选择器都带 -webkit- 前缀：老 WebKit 只认 :-webkit-full-screen。
 * ========================================================================= */
.stage:fullscreen,
.stage:-webkit-full-screen { width: 100vw; height: 100vh; border-radius: 0; }
.stage:fullscreen .stage-video video,
.stage:-webkit-full-screen .stage-video video { max-height: none; }
.stage:fullscreen .stage-visual,
.stage:-webkit-full-screen .stage-visual { width: 64vh; width: min(64vh, 620px); }
.stage:fullscreen .stage-lyric,
.stage:-webkit-full-screen .stage-lyric { --lh: 46vh; max-height: 420px; }

.stage-video:fullscreen,
.stage-video:-webkit-full-screen { border-radius: 0; background: #000; }
.stage-video:fullscreen video,
.stage-video:-webkit-full-screen video {
  width: 100%; height: 100%; max-height: none; object-fit: contain;
}

/* -------------------------------------------------------------------------
 * 视频全屏的退出按钮（#vidFsExit，位于 .stage-video 内部）
 *   ★ 平时 `display: none`，只有在全屏状态下才出现。
 *   ★ 显示条件同时认两条：`:fullscreen` 伪类 **和** `.is-fs` 类。
 *     为什么两条都要：
 *       · `:fullscreen` 是权威状态，但它**无法在 DOM 上被断言**（除非真进全屏），
 *         而在部分受控环境（无头浏览器、无窗口管理器）里 requestFullscreen 会被拒绝；
 *       · `.is-fs` 由 ui.js 的 syncFs() 在 fullscreenchange 里挂上，是同一份状态的
 *         可断言投影，也让"没真进全屏但状态已置位"这种中间态有兜底样式。
 *   ★ 为什么不做成"悬停才出现"：这正是本缺陷的成因 —— 用户找不到出口。
 *     全屏时它**常显**（半透明，不挡戏），悬停/聚焦时变实。
 * ----------------------------------------------------------------------- */
.vid-fs-exit {
  display: none;
  position: absolute; top: 14px; right: 14px; z-index: 5;
  align-items: center; gap: 6px;
  height: 36px; padding: 0 14px;
  border-radius: 999px; border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(12, 12, 18, 0.62); color: #fff;
  font-size: 12.5px; font-weight: 600; cursor: pointer;
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  transition: background 0.18s var(--ease), opacity 0.18s var(--ease);
}
.vid-fs-exit .ic { width: 16px; height: 16px; }
.vid-fs-exit:hover { background: rgba(12, 12, 18, 0.86); }
.stage-video.is-fs .vid-fs-exit,
.stage-video:fullscreen .vid-fs-exit,
.stage-video:-webkit-full-screen .vid-fs-exit { display: inline-flex; }
/* 触屏没有悬停，按钮要更实一些，保证一眼能看到 */
@media (hover: none) {
  .stage-video.is-fs .vid-fs-exit,
  .stage-video:fullscreen .vid-fs-exit,
  .stage-video:-webkit-full-screen .vid-fs-exit { background: rgba(12, 12, 18, 0.78); }
}

/* 全屏看片时弹幕输入条先淡出，悬停或聚焦再出现，别一直压在画面上。
 * ★ v1.3.6 起显示条件补上 `.is-fs` 投影：原来只认 `:fullscreen`，
 *   在"只有 webkitfullscreenchange 事件、伪类不生效"的内核里，弹幕输入条
 *   会与全屏 HUD 挤在同一块底部区域叠着画出来（本轮无头截图里已能看见）。
 *   本文件对 .vid-fs-exit 早已是三条件同写，这里补齐同口径。 */
.stage-video:fullscreen .danmaku-bar,
.stage-video:-webkit-full-screen .danmaku-bar,
.stage-video.is-fs .danmaku-bar { opacity: 0; transition: opacity 0.3s var(--ease); }
.stage-video:fullscreen:hover .danmaku-bar,
.stage-video:fullscreen:focus-within .danmaku-bar,
.stage-video:-webkit-full-screen:hover .danmaku-bar,
.stage-video:-webkit-full-screen:focus-within .danmaku-bar,
.stage-video.is-fs:hover .danmaku-bar,
.stage-video.is-fs:focus-within .danmaku-bar { opacity: 1; }

/* -------------------------------------------------------------------------
 * 视频全屏控制 HUD（#vidFsHud，v1.3.6）
 *   用户原话：「全屏后，手指点击后出现进度条和上一首，播放/暂停、和下一首」。
 *   ★ 结构上与 #vidFsExit 同理，必须待在 .stage-video 内部（全屏只渲染子树）。
 *   ★ 显隐：默认 display:none；全屏 + .hud-on（由 Player.toggleVideoHud 控制，
 *     单击画面唤起，3.5s 无操作自动收起）才显示。三条选择器同 .vid-fs-exit 的口径
 *     （:fullscreen / -webkit- / .is-fs 投影，防老 WebView 与无头环境漏判）。
 *   ★ 老 WebView 兼容：不用 flex gap 排按钮（关键几何），用 margin 兜底 ——
 *     本项目弹幕条/歌词全屏都吃过 gap 的亏。
 * ----------------------------------------------------------------------- */
.vid-fs-hud {
  display: none;
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 6;
  padding: 26px 16px 14px;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.78), rgba(0, 0, 0, 0.38) 62%, transparent);
}
.stage-video.is-fs .vid-fs-hud.hud-on,
.stage-video:fullscreen .vid-fs-hud.hud-on,
.stage-video:-webkit-full-screen .vid-fs-hud.hud-on { display: block; }
/**
 * ★ 进度条这一行必须显式写 flex（本轮踩过）：漏了它整行会退化成块级流，
 *   两个 .pb-time 各自独占一行、进度条被挤到第三行 —— 截图里就是
 *   "00:11 在上、04:58 在下"，看着像时间标错了位置。
 */
.vid-fs-hud-progress { display: flex; align-items: center; }
/* 间距用 margin 而不是 gap（老 WebView 兼容口径，同 .vid-fs-hud-btns） */
.vid-fs-hud-progress .pb-time { margin-left: 8px; }
.vid-fs-hud-progress .pb-time:first-child { margin-left: 0; }
.vid-fs-hud .pb-time { color: rgba(255, 255, 255, 0.92); }
.vid-fs-hud .range .range-track { background: rgba(255, 255, 255, 0.28); }
.vid-fs-hud .range .range-dot { opacity: 1; } /* 触屏没有 hover，拖点常显才好抓 */
.vid-fs-hud-btns { display: flex; align-items: center; justify-content: center; margin-top: 8px; }
.vid-fs-hud-btns .icon-btn {
  width: 46px; height: 46px;
  margin: 0 17px; /* gap 的老 WebView 兜底：用 margin 播开间距 */
  color: #fff; border: none; background: transparent;
}
.vid-fs-hud-btns .icon-btn:active { color: var(--brand); }
.vid-fs-hud-btns .vid-fs-play {
  width: 60px; height: 60px; margin: 0 12px;
}
.vid-fs-hud-btns .vid-fs-play .ic { width: 30px; height: 30px; }
.vid-fs-hud-btns .icon-btn .ic { width: 24px; height: 24px; }

/* 全屏中的按钮要有「已全屏」的视觉反馈 */
.stage-top-right .icon-btn.is-on {
  color: var(--brand);
  border-color: color-mix(in srgb, var(--brand) 40%, transparent);
  background: color-mix(in srgb, var(--brand) 14%, transparent);
}

/* 年代皮肤下的整页色调联动 */
body[data-skin="70s"] .stage-bg::after { background: radial-gradient(72% 68% at 50% 42%, transparent, #150e05 78%), linear-gradient(to bottom, rgba(21, 14, 5, 0.5), #150e05 96%); }
body[data-skin="70s"] .stage-bg-img { filter: blur(80px) sepia(0.5) saturate(1.2); opacity: 0.42; }
body[data-skin="80s"] .stage-bg::after { background: radial-gradient(72% 68% at 50% 42%, transparent, #14061f 78%), linear-gradient(to bottom, rgba(20, 6, 31, 0.5), #14061f 96%); }
body[data-skin="80s"] .stage-title { color: #ffd6ff; text-shadow: 0 0 22px rgba(255, 60, 200, 0.55); }
body[data-skin="90s"] .stage-bg::after { background: radial-gradient(72% 68% at 50% 42%, transparent, #070d1c 78%), linear-gradient(to bottom, rgba(7, 13, 28, 0.5), #070d1c 96%); }
body[data-skin="00s"] .stage-bg::after { background: radial-gradient(72% 68% at 50% 42%, transparent, var(--bg-0) 78%), linear-gradient(to bottom, color-mix(in srgb, var(--bg-0) 50%, transparent), var(--bg-0) 96%); }
body[data-skin="70s"] .lyric-line.on { color: #ffe6b8; }
body[data-skin="80s"] .lyric-line.on { color: #ff9ee8; }

/* ============================== 响应式 ============================== */
@media (max-width: 1279px) {
  .playerbar { grid-template-columns: auto minmax(90px, 1fr) minmax(230px, 2fr) auto; gap: 12px; padding: 0 14px; }
  .pb-right .vol-wrap { display: none; }
  /* ★ 与上一条同断点、同口径：底栏不收音量了，播放页那条也跟着收 ——
     否则会出现"窄屏底栏没有音量、播放页却有"的不一致。 */
  .stage-vol { display: none; }
}

@media (max-width: 1439px) {
  /* 空间收紧一档：右侧栏变窄，间距变小，保证中间歌词区仍有足够宽度 */
  .stage-body { grid-template-columns: minmax(210px, 320px) minmax(0, 1fr) minmax(220px, 268px); gap: 20px; gap: clamp(14px, 1.8vw, 26px); }
}

@media (max-width: 1023px) {
  .playerbar { left: calc(var(--nav-left) + var(--nav-w) + var(--nav-gap-sm)); right: 14px; bottom: 14px; }
  .stage-body { grid-template-columns: minmax(200px, 300px) minmax(0, 1fr); gap: 26px; }
  /**
   * ★★ 这一档原来写的是 `max-height: min(40vh, 320px)` —— 与手机上那个 bug **同源**：
   *   压的是**高度**，而方形高度是由宽度推出来的 ⇒ 一旦 40vh 小于列宽（横屏平板最典型，
   *   实测 844×500 时 40vh=200 < 列宽 300），`.skin-panel` 被压成 300×200，
   *   再被 `.skin-90s{overflow:hidden}` 裁掉上下两截，光盘又变回"半张"。
   *   现在压的是**宽度**：方形高度随之而来，四边都不可能越出面板。
   *   ★ `min()` 前必须有定值兜底（老引擎不认 min，后一句整体失效）。
   */
  .stage-visual { max-width: 300px; max-width: min(40vh, 300px); }
  .stage-lyric { --lh: 30vh; max-height: 240px; }
  /**
   * ★ 1023 以下没有"右侧"可言 —— 右侧栏改为整行铺开（跨两列）并横向并排两块，
   *   这样不会把歌词区再挤窄，也不会把播放页拉得很长。
   * ★ 同时启用折叠：两块都可点标题收起，默认在窄屏收起（由 stage.js 里的初始逻辑决定）。
   */
  .stage-side { grid-column: 1 / -1; flex-direction: row; align-self: auto; max-height: none; }
  .stage-side .side-block { min-width: 0; }
  .stage-side .side-caret { display: block; }
  .stage-side .side-toggle { cursor: pointer; }
  .stage-side .side-block.collapsed .side-body { display: none; }
  .stage-side .side-block.collapsed .side-caret { transform: rotate(-90deg); }
  .stage-side .side-list { max-height: 34vh; }
}

@media (max-width: 767px) {
  .playerbar { display: none; }
  .queue { right: 8px; left: 8px; width: auto; bottom: 124px; max-height: 58vh; }
  .stage { grid-template-rows: auto minmax(0, 1fr) auto; }
  /**
   * ★★ 窄屏必须改**块级流**，不能继续用 grid。
   *
   *   实测（390×844）：
   *     #stageActions  y 674 → 752
   *     #stageSide     y 731 → 747     ← DOM 在后，命中优先
   *     elementFromPoint 在「原声 / 伴唱 / 定时关闭」三颗按钮中心**全部**返回 #stageSide
   *     → 这三颗按钮在手机上根本点不动（.click() 能过，是因为它绕过命中测试）。
   *
   *   根因：.stage-body 的高度由 .stage 的 minmax(0, 1fr) 定死，
   *   而它的隐式行高是按子项的"内容贡献"算的 —— .stage-info 是 flex 列 +
   *   .stage-mid{flex:1;min-height:0}，实测渲染高度 448 却只拿到约 427 的行，
   *   溢出的部分正好伸进下一行，被 .stage-side 盖住。
   *   ★「定时关闭」本轮一个字符都没改，同样命中 #stageSide —— 说明这是**既有**缺陷。
   *
   *   块级流下行高就是内容高，子项按文档顺序竖向排布，**结构上不可能再重叠**；
   *   超出部分由下面已有的 overflow-y:auto 承接，滚动可达。
   */
  .stage-body { display: block; padding: 6px 16px 0; overflow-y: auto; }
  /**
   * ★★ 改成块级流之后**必须把对齐属性归零**（`align-content / align-items`）。
   *   基础规则里有 `align-content: center`，而现代浏览器对**块级容器**也认 `align-content`
   *   （CSS Box Alignment L3）。手机端内容比容器高时，居中会让内容**上下平分溢出**：
   *   实测 390×844 下 `.stage-visual` 的 top=41 而 `.stage-body` 的 top=93
   *   ⇒ CD 上沿有 32px 永远在 header 底下，且 `scrollTop` 已经是 0、**滚不回来**
   *   （这正是用户说的"光碟被遮挡"，只不过发生在**上沿**）。
   *   ★ 判据只能靠探针：`cdTopVsBodyTop < 0` + `elementFromPoint(cd 上沿)` 命中 `#skinSwitch`。
   */
  .stage-body { align-content: normal; align-items: normal; }
  /* 手机上视觉区是纯装饰，压一档：把「原声 / 伴唱」那排动作按钮尽量顶进首屏。
     ★ v1.3.3：26vh → 21vh。动作栏新增了模式/上一首/下一首/下载四颗，
       会多占一行 —— 不把装饰区再压一档，最后一行（原声/伴唱/定时关闭）
       就会被挤出首屏、需要滚动才点得到。实测校准见下方 .stage-actions 那段注释。 */
  /* ★ 手机端只限宽（方形高度随之而来），**不再写 max-height** ——
     21vh 在手机上常小于宽度，正是光盘被裁的直接原因。 */
  .stage-visual { width: 52vw; width: min(52vw, 210px); margin-bottom: 12px; }
  .stage-info { gap: 11px; margin-bottom: 14px; }
  /* 声明行在手机上压到 1 行小字（见下方 .stage-legal 的说明） */
  .stage-legal { padding: 0 16px 8px; font-size: 10.5px; }
  .stage-lyric { --lh: 26vh; }
  /* 全屏歌词（手机端）：.stage-body 是块级流，藏掉视觉区/动作栏/侧栏后
     歌词自然上移放大；高度给到 50vh（桌面那条 58vh 在小屏太高，压一档）。
     ★ 必须 overrides 基础里的 max-height:320px，否则 50vh 在矮屏被偷偷截断。 */
  .stage.lyr-fs .stage-visual,
  .stage.lyr-fs .stage-actions,
  .stage.lyr-fs .stage-side { display: none; }
  .stage.lyr-fs .stage-info { margin-bottom: 0; }
  .stage.lyr-fs .stage-lyric { --lh: 50vh; max-height: 50vh; }
  .lyric-line { font-size: 14px; }
  .lyric-line.on { font-size: 16.5px; }
  .stage-skin-switch { padding: 3px; }
  .stage-skin-switch button { height: 27px; padding: 0 11px; font-size: 11px; }
  .stage-top { padding: 10px 12px; }
  /* ★ 窄屏下把年代皮肤条单独占一行并居中：
     否则它与「收起/分享/全屏」挤在一行，只拿到约 240px，五个年代按钮（合计 333px）必被裁。
     换行后可用宽 = 视口 - 24px padding，390/430 下可完整展示，320 以下才需内部滑动。 */
  .stage-top { flex-wrap: wrap; row-gap: 8px; }
  .stage-skin-switch { order: 3; width: 100%; justify-content: center; }
  /* 单列时右侧栏也竖排，两块都折叠着出现，避免播放页被拉成一长条 */
  .stage-side { flex-direction: column; }
  /*
   * ★★ 「手机版播放页下面有两条线」的根因就在这里 ★★
   *   .side-block 的 flex 是 1 1 0（为宽屏 grid 拉伸而写）。≤767 时 .stage-body
   *   已改成 display:block —— 块级流里 .stage-side 的高度是 auto，flex-basis:0
   *   又无处可分剩余空间 ⇒ 每块被压成 0 高，只剩 border-box 的上下各 1px 边框。
   *   于是两张卡在屏幕上就是**两条贯穿的细线**。
   *   实测：390×844 两块 y=809/823、h=2；MV 430×932 溢出=0 时它们落在首屏内，
   *   不滚动也看得见 —— 与用户"音乐和MV都有两个线"的描述完全吻合。
   *   改回 0 0 auto 后收起态就是设计本意的"一条可点的标题栏"。
   */
  .stage-side .side-block { flex: 0 0 auto; }
  .stage-side .side-list { max-height: none; }
  .stage-bottom { padding: 8px 16px 18px; gap: 8px; }
  .stage-video video { max-height: 32vh; }
  .danmaku-bar { left: 8px; right: 8px; bottom: 8px; }
  .stage-actions .btn { height: 34px; padding: 0 14px; font-size: 12.5px; }
  /**
   * ★★ 窄屏必须把这一排"压扁"，否则会把「原声 / 伴唱」挤出首屏（v1.3.3 实测）。
   *
   *   实测（390×844，改动前 = 线上 v1.3.2 / 改动后 = 本地）：
   *     v1.3.2  动作栏高 **78px / 2 行**，.stage-body 溢出 85px  → 全部按钮无需滚动即可点到
   *     v1.3.3  动作栏高 **140px / 3 行**，.stage-body 溢出 147px → 最后一行（原声/伴唱/定时关闭）
   *             落到首屏之下，必须滚动才点得到
   *     v1.3.3 收敛后 130px / 3 行、溢出 109px → 全部可点
   *
   *   多出来的这一行是**新增控件的必然代价**（模式 / 上一首 / 下一首 / 下载）——
   *   功能是该加的，但"把原来够得着的按钮顶下去"是**不能接受**的副作用：
   *   「原声 / 伴唱」正是上一轮用户专门反馈过的那排（"原唱和伴唱不太明显"）。
   *
   *   ★ v1.3.4 的新情况：传输控制**搬出了动作栏**（→ .stage-bottom 的 #stageTransport），
   *     所以两处的净高度都变了，必须重新量：
   *       · 动作栏少一整行（省下约 48px）→ 缓解首屏压力；
   *       · 底部多出「时间·音质行 + 控制栏行」（但底部是 .stage 的 fixed 行，
   *         它占的是**滚动区**高度，不是动作栏的高度）。
   *     结论：动作栏里那些按钮更宽松了，但**滚动区变短**，
   *     所以底部这两行仍要在 390×844 上实测量过（见 .deploy 里的播放页探针）。
   */
  .stage-actions { column-gap: 6px; row-gap: 6px; }
  /* 底部控制栏在手机上**不许缩小** —— 这一排正是用户抱怨"太小、不方便人手操作"的地方。
     ★ v1.3.4 第一版这里还沿用着 v1.3.3 的"缩小一档"（主键 54→48、换歌 44→40、模式/列表 38→34），
       实测 390×844：换歌键只有 40×40 —— 低于触控目标的通行下限
       （Apple HIG 44pt / Material 48dp），用户的抱怨原样成立。
       改成**往上加一档**：换歌键 48（正好是通行下限）、主键 56、模式/列表 40。
       横向够放：40+48+56+48+40 + 4×20 = 312px ≤ 可用宽 358px（实测），不会折行。
       纵向代价 +8px（控制栏 48→56），实测 `.stage-body` 溢出 71→79px，
       而动作栏最后一行（定时关闭）底边 627.7 仍远在 674 之上 —— 首屏不受影响。 */
  .stage-transport { gap: 20px; }
  .stage-transport .stage-play-btn { width: 56px; height: 56px; }
  .stage-transport .stage-play-btn .ic { width: 26px; height: 26px; }
  .stage-transport .stage-step-btn { width: 48px; height: 48px; }
  .stage-transport .stage-step-btn .ic { width: 24px; height: 24px; }
  .stage-transport .stage-mode-btn,
  .stage-transport .stage-list-btn { width: 40px; height: 40px; }
  .stage-transport .stage-mode-btn .ic,
  .stage-transport .stage-list-btn .ic { width: 18px; height: 18px; }
  /* 时间·音质行：手机上把音质胶囊收小一点，别和两端的时间挤在一起 */
  .stage-meta-row { gap: 8px; }
  .stage-quality { height: 22px; padding: 0 8px; font-size: 11px; }
}

/* 折叠屏外屏 */
@media (max-width: 380px) {
  .stage-visual { width: 64vw; width: min(64vw, 190px); }
  .lyric-line.on { font-size: 15.5px; }
  /* 极窄屏再压一档，让五个年代按钮仍能完整排下（≈293px < 296px 可用宽） */
  .stage-skin-switch button { padding: 0 8px; font-size: 10.5px; }
}
