/* 音序 v3 · 沉浸式播放页（views/play.js）。这是「听」的页面：没有顶栏、页脚和播放条，只有封面、歌名、歌词和一条通栏波形。
   背景是封面本身的大幅虚化再压暗（CSS 滤镜，不读像素，所以封面在别的域名上也能用），不叠毛玻璃卡片。
   绿色只出现在：已播波形、段落小标签、当前句左侧 2px 竖线、编号。播放键是象牙白，不是绿圆。黄色只有播放位置那一根线。 */
body[data-route=play] { padding-bottom: 0; overflow: hidden; }
body[data-route=play] > .top, body[data-route=play] > .foot, body[data-route=play] > #player, body[data-route=play] > .skip { display: none; }
body[data-route=play] .toasts { bottom: 150px; }

.pp { position: relative; isolation: isolate; height: 100dvh; display: grid; grid-template-rows: var(--top) minmax(0, 1fr) auto; overflow: hidden; background: var(--bg-deep);
  --wave: rgba(232, 230, 225, .3); --wave-soft: rgba(232, 230, 225, .16); }
.pp-bg { position: absolute; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
.pp-bg i { position: absolute; inset: -14%; background: center / cover no-repeat; filter: blur(84px) saturate(1.25) brightness(.8); opacity: .4; transform: translateZ(0); }
.pp-bg::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(10, 12, 15, .66) 0%, rgba(10, 12, 15, .78) 46%, rgba(10, 12, 15, .96) 100%); }

/* 顶行：左字标（和站内顶栏同一位置，进出不跳），右收起 */
.pp-top { display: flex; align-items: center; gap: 12px; padding: 0 var(--gut); min-width: 0; }
.pp-brand { display: inline-flex; align-items: center; opacity: .92; }
.pp-brand img { display: block; height: 28px; width: auto; }
.pp-x { order: 9; margin-left: auto; display: inline-flex; align-items: center; gap: 8px; height: 32px; padding: 0 6px 0 10px; border-radius: var(--r); font-size: 13px; color: rgba(232, 230, 225, .72); }
.pp-x:hover { color: var(--fg); background: rgba(255, 255, 255, .08); }
.pp-x kbd { font-size: 11px; padding: 1px 6px; border: 1px solid var(--line-2); border-radius: 4px; color: rgba(232, 230, 225, .6); }
.pp-seg, .pp-more { display: none; }

/* 主体：左封面与曲目信息，右歌词 */
.pp-main { display: grid; grid-template-columns: minmax(280px, 42fr) minmax(0, 58fr); grid-template-rows: minmax(0, 1fr); gap: clamp(36px, 5vw, 88px); padding: 0 var(--gut); min-height: 0; }
.pp-side { align-self: center; display: flex; flex-direction: column; gap: 26px; min-width: 0; padding-bottom: 3vh; }
.pp-cover { display: block; width: min(100%, 50vh, 520px); border-radius: 4px; overflow: hidden; box-shadow: 0 28px 64px rgba(0, 0, 0, .46); cursor: default; }
.pp-id { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.pp-no { display: flex; align-items: center; gap: 10px; color: var(--acc); letter-spacing: .08em; }
.pp-no .tg { letter-spacing: 0; }
.pp-title { font-size: 34px; font-weight: 700; line-height: 1.22; letter-spacing: .01em; overflow-wrap: anywhere; }
.pp-meta { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 14px; font-size: 13px; color: rgba(232, 230, 225, .66); }
.pp-meta .num { font-size: 12px; }
.pp-ab { display: inline-flex; align-self: flex-start; margin-top: 8px; border: 1px solid var(--line-2); border-radius: var(--r); overflow: hidden; }
.pp-ab button { height: 30px; padding: 0 14px; font-size: 13px; color: rgba(232, 230, 225, .66); }
.pp-ab button + button { border-left: 1px solid var(--line-2); }
.pp-ab button:hover { color: var(--fg); }
.pp-ab button[aria-checked=true] { background: var(--fg); color: var(--bg); font-weight: 600; }
.pp-peek { display: none; }

.pp-stage { position: relative; min-height: 0; min-width: 0; display: flex; }
.lyr.is-stage { flex: 1; min-height: 0; display: flex; }
.lyr.is-stage .lyr-scroll { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: none;
  -webkit-mask-image: linear-gradient(180deg, transparent 0, transparent 4%, #000 22%, #000 62%, transparent 91%, transparent 100%); mask-image: linear-gradient(180deg, transparent 0, transparent 4%, #000 22%, #000 62%, transparent 91%, transparent 100%); }
/* 没有逐句时间：从上面开始排（和封面顶边齐），顶部只留很短的渐隐 */
.lyr.is-stage[data-state=static] .lyr-scroll { -webkit-mask-image: linear-gradient(180deg, transparent 0, #000 7%, #000 62%, transparent 91%, transparent 100%); mask-image: linear-gradient(180deg, transparent 0, #000 7%, #000 62%, transparent 91%, transparent 100%); }
.lyr.is-stage[data-state=static] .lyr-in { padding-top: calc(var(--lyr-pad) * .27); }
.lyr.is-stage .lyr-scroll::-webkit-scrollbar { display: none; }
.lyr.is-stage .lyr-in { padding: var(--lyr-pad) 0 calc(var(--lyr-pad) * 1.7) 22px; }
.lyr.is-stage .lyr-l { position: relative; max-width: 21em; font-size: clamp(24px, 1.5vw + 1.6vh + 2px, 46px); line-height: 1.4; font-weight: 700; letter-spacing: .01em; padding: .34em 0; opacity: .3; text-wrap: pretty; transition: opacity .4s ease; }
.lyr.is-stage button.lyr-l:hover { opacity: .7; }
.lyr.is-stage .lyr-l.is-near { opacity: .46; }
.lyr.is-stage .lyr-l.is-past { opacity: .22; }
.lyr.is-stage .lyr-l[aria-current] { opacity: 1; }
.lyr.is-stage .lyr-l::before { left: -22px; top: .52em; bottom: .52em; }
.lyr.is-stage .lyr-gap { position: relative; }
.lyr.is-stage .lyr-gap::before { content: ""; position: absolute; left: -22px; top: 8px; bottom: 8px; width: 2px; background: var(--acc); opacity: 0; transition: opacity .3s ease; }
.lyr.is-stage .lyr-gap[aria-current]::before { opacity: 1; }
.lyr.is-stage[data-live=false] .lyr-l, .lyr.is-stage[data-state=static] .lyr-l { opacity: .78; }
.lyr.is-stage .lyr-tag { font-size: 12px; margin-top: 2.4em; padding-bottom: .5em; }
.lyr.is-stage .lyr-in > .lyr-tag:first-child, .lyr.is-stage .lyr-note + .lyr-tag { margin-top: 0; }
.lyr.is-stage .lyr-gap { margin: 1.1em 0 .5em; padding: 10px 0; gap: 16px; }
.lyr.is-stage .lyr-gap .lyr-tag { margin: 0; padding: 0; }
.lyr.is-stage .lyr-dots { gap: 9px; }
.lyr.is-stage .lyr-dots i { width: 7px; height: 7px; }
.lyr.is-stage .lyr-note { font-size: 13px; padding-bottom: 2.2em; color: rgba(232, 230, 225, .6); }
.lyr.is-stage[data-state=loading] .lyr-note, .lyr.is-stage[data-state=error] .lyr-note { font-size: 15px; }

/* 纯音乐：以播放位置为中心的波形窗 */
.pp-inst { flex: 1; align-self: center; display: flex; flex-direction: column; gap: 22px; min-width: 0; padding-left: 22px; }
.pp-scope { position: relative; height: min(28vh, 250px); --wave-on: var(--acc); }
.pp-scope canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.pp-inst-c { display: flex; align-items: baseline; gap: 14px; font-size: 13px; color: rgba(232, 230, 225, .6); }
.pp-inst-c b { font-size: 12px; font-weight: 400; letter-spacing: .14em; color: var(--acc); }

/* 底部：通栏波形 + 一行控制 */
.pp-bar { padding: 14px var(--gut) calc(18px + env(safe-area-inset-bottom)); }
.pp-wave { height: 56px; }
.pp-head { position: absolute; top: -4px; bottom: -4px; width: 2px; margin-left: -1px; background: var(--hi); pointer-events: none; }
.pp-row { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: 20px; margin-top: 10px; min-height: 64px; }
.pp-l { display: flex; align-items: center; gap: 28px; min-width: 0; }
.pp-time { display: flex; gap: 8px; white-space: nowrap; }
.pp-time .num { font-size: 13px; }
.pp-sep, .pp-total { color: rgba(232, 230, 225, .55); }
.pp-vol { display: flex; align-items: center; gap: 8px; color: rgba(232, 230, 225, .6); }
.pp-ctl { display: flex; align-items: center; gap: 14px; }
.pp-ctl .pl { width: 44px; height: 44px; }
.pp-ctl .pl:hover { background: rgba(255, 255, 255, .1); }
.pp-ctl .pp-play { width: 60px; height: 60px; background: var(--fg); color: var(--bg-deep); }
.pp-ctl .pp-play:hover { background: #fff; }
.pp-play .ic { width: 20px; height: 20px; }
.pp-act { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 4px 24px; min-width: 0; }
.pp-act .tx { color: rgba(232, 230, 225, .68); padding: 6px 0; }
.pp-act .tx:hover { color: var(--fg); }
.pp-loading { margin-top: 18px; min-height: 56px; color: rgba(232, 230, 225, .6); }

/* 加载骨架 / 打不开 */
.pp-sk { display: block; background: rgba(255, 255, 255, .08); border-radius: 4px; animation: sk 1.4s ease-in-out infinite; box-shadow: none; }
.pp-cover.pp-sk { aspect-ratio: 1; }
.pp-sk-a { height: 12px; width: 120px; }
.pp-sk-b { height: 30px; width: min(280px, 80%); margin: 4px 0; }
.pp-skl { flex: 1; align-self: center; display: flex; flex-direction: column; gap: 30px; padding-left: 22px; }
.pp-skl i { height: 28px; }
.pp-wave.pp-sk { opacity: .7; }
.pp[data-state=message] .pp-main { display: flex; align-items: center; }
.pp-msg { display: flex; flex-direction: column; align-items: flex-start; gap: 12px; max-width: 30em; padding-bottom: 4vh; text-wrap: pretty; }
.pp-wave-ghost { --wave: rgba(232, 230, 225, .16); margin-bottom: 74px; }
.pp-sk-peek { display: none; }
.pp-kick { color: var(--acc); letter-spacing: .12em; }
.pp-msg-d { font-size: 15px; color: rgba(232, 230, 225, .7); }
.pp-msg-a { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; }

@media (max-width: 1180px) { .pp-vol { display: none; } .pp-main { gap: 40px; } }
@media (min-width: 901px) and (max-height: 640px) { .pp-side { gap: 14px; } .pp-cover { width: min(100%, 38vh); } .pp-title { font-size: 26px; } }

/* 手机与竖屏平板：竖向全屏，在「封面 / 歌词」两种显示之间切换 */
@media (max-width: 900px) {
  body[data-route=play] .toasts { bottom: 190px; }
  .pp-top { padding: 0 6px; gap: 0; }
  .pp-brand { display: none; }
  .pp-x { order: 0; margin: 0; width: 44px; height: 44px; padding: 0; justify-content: center; color: var(--fg); }
  .pp-x span, .pp-x kbd { display: none; }
  .pp-x .ic { width: 18px; height: 18px; }
  .pp-seg { display: inline-flex; margin: 0 auto; }
  .pp-seg button { position: relative; min-width: 64px; height: 44px; padding: 0 16px; font-size: 14px; color: rgba(232, 230, 225, .55); }
  .pp-seg button[aria-selected=true] { color: var(--fg); font-weight: 600; }
  .pp-seg button[aria-selected=true]::after { content: ""; position: absolute; left: 16px; right: 16px; bottom: 7px; height: 2px; background: var(--acc); }
  .pp-seg.is-one { align-items: center; letter-spacing: .14em; color: var(--acc); }
  .pp-more { display: grid; place-items: center; width: 44px; height: 44px; border-radius: var(--r); color: var(--fg); }
  .pp-more .ic { width: 18px; height: 18px; }
  .pp[data-state=loading] .pp-x, .pp[data-state=message] .pp-x { margin-right: auto; }

  .pp-main { display: flex; flex-direction: column; gap: 0; padding: 0 24px; }
  .pp-side { align-self: stretch; flex: 1; min-height: 0; justify-content: center; gap: 22px; padding: 0 0 8px; }
  .pp-cover { align-self: center; width: max(150px, min(100%, 100dvh - 520px)); cursor: pointer; }
  .pp-title { font-size: 26px; }
  .pp-peek { display: flex; flex-direction: column; gap: 4px; min-height: 62px; padding: 0 0 0 14px; text-align: left; border-left: 2px solid var(--acc); }
  .pp-peek b { font-size: 17px; font-weight: 700; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
  .pp-peek span { font-size: 14px; color: rgba(232, 230, 225, .5); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .pp-peek.is-wait { border-left-color: var(--line-2); }
  .pp-peek.is-wait b { color: rgba(232, 230, 225, .62); }
  .pp[data-view=cover] .pp-stage { display: none; }
  .pp.is-inst .pp-stage { display: none; }
  .pp-sk-peek { display: block; height: 62px; width: 70%; }
  .pp-wave-ghost { margin-bottom: 150px; }

  .pp[data-view=lyrics] .pp-side { flex: none; flex-direction: row; align-items: center; justify-content: flex-start; gap: 14px; padding: 6px 0 4px; }
  .pp-ab button { height: 44px; padding: 0 18px; }
  .lyr.is-stage .lyr-gap { min-height: 44px; }
  .pp[data-view=lyrics] .pp-cover { width: 52px; flex: none; box-shadow: none; }
  .pp[data-view=lyrics] .pp-id { gap: 2px; }
  .pp[data-view=lyrics] .pp-title { font-size: 17px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .pp[data-view=lyrics] .pp-meta, .pp[data-view=lyrics] .pp-ab, .pp[data-view=lyrics] .pp-peek, .pp[data-view=lyrics] .pp-no .tg { display: none; }
  .pp[data-view=lyrics] .pp-stage { flex: 1; }
  .lyr.is-stage .lyr-in { padding-left: 16px; }
  .lyr.is-stage .lyr-l { font-size: clamp(21px, 5.9vw, 30px); max-width: none; }
  .lyr.is-stage .lyr-l::before { left: -16px; }
  .lyr.is-stage .lyr-scroll { -webkit-mask-image: linear-gradient(180deg, transparent 0, transparent 3%, #000 24%, #000 76%, transparent 100%); mask-image: linear-gradient(180deg, transparent 0, transparent 3%, #000 24%, #000 76%, transparent 100%); }

  .pp-bar { padding: 8px 24px calc(28px + env(safe-area-inset-bottom)); }
  .pp-wave { height: 44px; }
  .pp-row { display: flex; flex-direction: column; align-items: stretch; gap: 2px; margin-top: 6px; }
  .pp-l { justify-content: space-between; }
  .pp-time { flex: 1; justify-content: space-between; }
  .pp-sep { display: none; }
  .pp-ctl { justify-content: center; gap: 30px; padding: 4px 0 2px; }
  .pp-ctl .pl { width: 52px; height: 52px; }
  .pp-ctl .pl .ic { width: 17px; height: 17px; }
  .pp-ctl .pp-play { width: 68px; height: 68px; }
  .pp-ctl .pp-play .ic { width: 22px; height: 22px; }
  .pp-act { display: none; }
  .pp-skl { padding: 0; }
  .pp[data-state=loading] .pp-stage { display: none; }
  .pp[data-state=message] .pp-main { align-items: flex-start; padding-top: 12dvh; }
  .pp-msg { padding-bottom: 0; }
  .pp-msg-a .btn { flex: 1; }
}
@media (max-width: 900px) and (min-width: 600px) { .pp-main { padding: 0 max(24px, 12vw); } .pp-bar { padding-left: max(24px, 12vw); padding-right: max(24px, 12vw); } }
