/* ==========================================================================
   Now Playing 沉浸面板
   - 两列：左侧曲目（封面 / 控件）+ 右侧视图（歌词 · 歌单）
   - 左侧封面上方是悬停才浮出的「歌词 / 歌单」导航，默认歌词
   - 歌单视图：上方专辑介绍，下方可搜索的曲目列表
   - 背景由封面主色晕染（--fxp-tint / --fxp-tint-2 由脚本取色注入）
   ========================================================================== */

#fx-music-panel {
    --fxp-ink: #ffffff;
    --fxp-muted: rgba(255, 255, 255, 0.58);
    --fxp-faint: rgba(255, 255, 255, 0.34);
    --fxp-line: rgba(255, 255, 255, 0.09);
    --fxp-surface: rgba(255, 255, 255, 0.05);
    --fxp-surface-strong: rgba(255, 255, 255, 0.1);
    --fxp-base: #0b0e15;
    /* 兜底主色：封面取色失败时仍是一套完整的冷灰蓝 */
    --fxp-tint: 214 46% 46%;
    --fxp-tint-2: 208 40% 30%;
    /* 左列除封面外占用的垂直高度，用于按可用空间反推封面尺寸 */
    --fxp-stage-chrome: 308px;
    position: fixed;
    inset: 0;
    z-index: 10050;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
        "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
    -webkit-font-smoothing: antialiased;
}

#fx-music-panel[hidden] {
    display: none !important;
}

#fx-music-panel :focus-visible {
    outline: 2px solid rgba(255, 255, 255, 0.9);
    outline-offset: 2px;
}

.fxm-panel__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(6, 8, 13, 0.7);
    -webkit-backdrop-filter: blur(14px);
    backdrop-filter: blur(14px);
    opacity: 0;
    transition: opacity 0.24s ease;
}

#fx-music-panel.is-open .fxm-panel__backdrop {
    opacity: 1;
}

/* ------------------------------ 外壳 ------------------------------ */
.fxm-panel__dialog {
    position: relative;
    width: min(1000px, 92vw);
    height: min(660px, 88vh);
    border-radius: 22px;
    overflow: hidden;
    display: grid;
    grid-template-columns: minmax(0, min(40%, 560px)) minmax(0, 1fr);
    /* 行高锁死在面板高度内，否则歌词内容会把整行撑高 */
    grid-template-rows: minmax(0, 1fr);
    background: var(--fxp-base);
    box-shadow:
        0 50px 120px -40px rgba(0, 0, 0, 0.85),
        0 0 0 1px rgba(255, 255, 255, 0.07) inset;
    transform: translateY(12px) scale(0.99);
    opacity: 0;
    transition:
        transform 0.32s cubic-bezier(0.2, 0.8, 0.2, 1),
        opacity 0.24s ease;
}

#fx-music-panel.is-open .fxm-panel__dialog {
    transform: none;
    opacity: 1;
}

/* 打开时焦点落在对话框本身，避免一进来就给关闭按钮描亮边 */
.fxm-panel__dialog:focus {
    outline: none;
}

/* 封面虚化层：只提供织物般的质感，颜色交给下一层晕染 */
.fxm-panel__dialog::before {
    content: "";
    position: absolute;
    inset: -16%;
    background-image: var(--fxm-cover, none);
    background-size: cover;
    background-position: center;
    filter: blur(72px) saturate(1.15) brightness(0.62);
    transform: scale(1.06);
    opacity: 0.4;
    pointer-events: none;
    transition: opacity 0.5s ease;
}

/* 主色晕染：左上取自封面主色，右下取自主色的暗部，再压一层暗幕保可读性 */
.fxm-panel__dialog::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(80% 68% at 6% 0%, hsl(var(--fxp-tint) / 0.72) 0%, transparent 62%),
        radial-gradient(72% 62% at 96% 102%, hsl(var(--fxp-tint-2) / 0.6) 0%, transparent 64%),
        linear-gradient(180deg, rgba(9, 12, 18, 0.42) 0%, rgba(9, 12, 18, 0.7) 58%, rgba(9, 12, 18, 0.82) 100%);
    pointer-events: none;
}

/* ------------------------------ 顶部工具条 ------------------------------ */
.fxm-panel__top {
    position: absolute;
    z-index: 6;
    top: 0;
    left: 0;
    right: 0;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 12px 0 34px;
    pointer-events: none;
}

.fxm-panel__top > * {
    pointer-events: auto;
}

.fxm-panel__eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    letter-spacing: 0.08em;
    color: var(--fxp-muted);
}

.fxm-panel__live {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: hsl(var(--fxp-tint) / 1);
    box-shadow: 0 0 0 3px hsl(var(--fxp-tint) / 0.2);
    animation: fxp-live 2.6s ease-in-out infinite;
}

@keyframes fxp-live {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.34; }
}

#fx-music-panel.is-paused .fxm-panel__live {
    background: rgba(255, 255, 255, 0.36);
    box-shadow: none;
    animation: none;
}

.fxm-panel__tools {
    display: flex;
    gap: 2px;
}

.fxm-panel__tool {
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: var(--fxp-muted);
    cursor: pointer;
    transition: background 0.16s ease, color 0.16s ease;
}

.fxm-panel__tool svg {
    width: 18px;
    height: 18px;
}

.fxm-panel__tool:hover {
    background: var(--fxp-surface-strong);
    color: var(--fxp-ink);
}

/* ------------------------------ 左列：曲目 ------------------------------ */
.fxm-panel__stage {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
    min-width: 0;
    padding: 54px 30px 22px 34px;
    overflow: hidden;
}

/* 导航：默认隐藏，鼠标进入面板或键盘聚焦时浮出 */
.fxm-panel__nav {
    display: flex;
    align-items: center;
    gap: 22px;
    height: 26px;
    opacity: 0;
    transition: opacity 0.22s ease;
}

.fxm-panel__dialog:hover .fxm-panel__nav,
.fxm-panel__nav:focus-within {
    opacity: 1;
}

.fxm-panel__nav button {
    position: relative;
    padding: 0 0 7px;
    border: 0;
    background: none;
    font-family: inherit;
    font-size: 12px;
    letter-spacing: 0.12em;
    color: rgba(255, 255, 255, 0.42);
    cursor: pointer;
    transition: color 0.16s ease;
}

.fxm-panel__nav button:hover {
    color: var(--fxp-ink);
}

.fxm-panel__nav button[aria-selected="true"] {
    color: var(--fxp-ink);
}

.fxm-panel__nav button[aria-selected="true"]::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 2px;
    border-radius: 2px;
    background: hsl(var(--fxp-tint) / 1);
}

.fxm-panel__stage-main {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 0;
    width: 100%;
    /* 面板高度 - 左列非封面高度 = 封面可用边长；矮屏自动收窄而不是硬切到固定值 */
    max-width: max(180px, calc(min(660px, 88vh) - var(--fxp-stage-chrome)));
}

.fxm-panel__art {
    width: 100%;
    max-width: 100%;
    aspect-ratio: 1 / 1;
    border-radius: 16px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.06);
    box-shadow:
        0 30px 60px -30px rgba(0, 0, 0, 0.95),
        0 0 0 1px rgba(255, 255, 255, 0.1) inset;
    flex: 0 0 auto;
}

.fxm-panel__cover {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.fxm-panel__meta {
    margin-top: 18px;
    min-width: 0;
}

.fxm-panel__title {
    margin: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 25px;
    font-weight: 700;
    line-height: 1.3;
    letter-spacing: 0.01em;
    color: var(--fxp-ink);
}

.fxm-panel__artist {
    margin: 5px 0 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 13px;
    color: var(--fxp-muted);
}

.fxm-panel__progress {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 14px;
}

.fxm-panel__time {
    flex: 0 0 36px;
    font-size: 11px;
    color: var(--fxp-muted);
    font-variant-numeric: tabular-nums;
}

.fxm-panel__time--dur {
    text-align: right;
}

.fxm-panel__bar {
    position: relative;
    flex: 1;
    min-width: 0;
    height: 18px;
    display: flex;
    align-items: center;
    cursor: pointer;
    touch-action: none;
}

.fxm-panel__bar::before,
.fxm-panel__bar-loaded,
.fxm-panel__bar-played {
    position: absolute;
    left: 0;
    height: 3px;
    border-radius: 999px;
}

.fxm-panel__bar::before {
    content: "";
    right: 0;
    background: rgba(255, 255, 255, 0.16);
}

.fxm-panel__bar-loaded {
    background: rgba(255, 255, 255, 0.26);
    width: 0;
}

.fxm-panel__bar-played {
    background: var(--fxp-ink);
    width: 0;
}

.fxm-panel__bar-played i {
    position: absolute;
    right: -4px;
    top: 50%;
    width: 9px;
    height: 9px;
    margin-top: -4.5px;
    border-radius: 50%;
    background: var(--fxp-ink);
    box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.16);
    opacity: 0;
    transition: opacity 0.16s ease;
}

.fxm-panel__bar:hover .fxm-panel__bar-played i,
.fxm-panel__bar.is-dragging .fxm-panel__bar-played i,
.fxm-panel__bar:focus-visible .fxm-panel__bar-played i {
    opacity: 1;
}

.fxm-panel__controls {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
    margin-top: 12px;
}

.fxm-panel__btn {
    width: 40px;
    height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: rgba(255, 255, 255, 0.66);
    cursor: pointer;
    transition: background 0.16s ease, color 0.16s ease, transform 0.16s ease;
}

.fxm-panel__btn svg {
    width: 19px;
    height: 19px;
    fill: currentColor;
}

.fxm-panel__btn:hover {
    background: var(--fxp-surface-strong);
    color: var(--fxp-ink);
}

.fxm-panel__btn[aria-pressed="true"] {
    color: var(--fxp-ink);
    background: var(--fxp-surface-strong);
}

.fxm-panel__btn--play {
    width: 52px;
    height: 52px;
    background: var(--fxp-ink);
    color: #0b0e15;
    box-shadow: 0 12px 26px -12px rgba(0, 0, 0, 0.9);
}

.fxm-panel__btn--play svg {
    width: 21px;
    height: 21px;
}

.fxm-panel__btn--play:hover {
    background: var(--fxp-ink);
    color: #0b0e15;
    transform: scale(1.04);
}

.fxm-panel__volume {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 8px;
}

.fxm-panel__volume .fxm-panel__btn {
    width: 30px;
    height: 30px;
    color: var(--fxp-muted);
}

.fxm-panel__volume .fxm-panel__btn svg {
    width: 16px;
    height: 16px;
}

.fxm-panel__volbar {
    position: relative;
    flex: 1;
    max-width: 120px;
    height: 16px;
    display: flex;
    align-items: center;
    cursor: pointer;
    touch-action: none;
}

.fxm-panel__volbar::before {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    height: 3px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.16);
}

.fxm-panel__volfill {
    position: absolute;
    left: 0;
    height: 3px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.7);
    width: 70%;
}

/* ------------------------------ 右列：视图容器 ------------------------------ */
.fxm-panel__right {
    position: relative;
    z-index: 2;
    min-width: 0;
    height: 100%;
}

.fxm-panel__view {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
    padding: 58px 38px 30px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);
    transition:
        opacity 0.26s ease,
        transform 0.32s cubic-bezier(0.2, 0.8, 0.2, 1),
        visibility 0.26s;
}

.fxm-panel__view.is-active {
    opacity: 1;
    visibility: visible;
    transform: none;
}

/* 逐字 / 逐行：分段控件，比单个文字按钮更能说明「这是一个二选一」 */
.fxm-panel__switch {
    display: inline-flex;
    padding: 2px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.07);
}

.fxm-panel__switch button {
    height: 22px;
    padding: 0 12px;
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: var(--fxp-muted);
    font-size: 11px;
    font-family: inherit;
    line-height: 22px;
    cursor: pointer;
    transition: background 0.18s ease, color 0.18s ease;
}

.fxm-panel__switch button:hover {
    color: var(--fxp-ink);
}

.fxm-panel__switch button[aria-pressed="true"] {
    background: rgba(255, 255, 255, 0.92);
    color: #101319;
    font-weight: 600;
}

/* ------------------------------ 歌词视图 ------------------------------ */
.fxm-panel__view-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    height: 26px;
    padding-bottom: 12px;
    /* 与下方内容同宽同轴：全屏下头部不再比列表更宽 */
    width: 100%;
    max-width: 620px;
    margin-left: auto;
    margin-right: auto;
}

.fxm-panel__label {
    display: inline-flex;
    align-items: center;
    font-size: 11px;
    letter-spacing: 0.14em;
    color: var(--fxp-faint);
}

.fxm-panel__head-note {
    font-size: 11px;
    color: var(--fxp-faint);
    font-variant-numeric: tabular-nums;
}

.fxm-panel__lyrics {
    position: relative;
    flex: 1;
    min-height: 0;
    overflow: hidden;
    padding: 14px 4px;
    -webkit-mask-image: linear-gradient(180deg, transparent 0, #000 12%, #000 84%, transparent 100%);
    mask-image: linear-gradient(180deg, transparent 0, #000 12%, #000 84%, transparent 100%);
}

.fxm-panel__lyrics-inner {
    position: relative;
    transition: transform 0.46s cubic-bezier(0.2, 0.8, 0.2, 1);
    will-change: transform;
}

.fxm-panel__line {
    padding: 13px 0;
    font-size: 20px;
    line-height: 1.6;
    text-align: center;
    color: rgba(255, 255, 255, 0.3);
    cursor: pointer;
    transition: color 0.28s ease, font-size 0.28s ease;
    user-select: none;
}

.fxm-panel__line.is-near {
    color: rgba(255, 255, 255, 0.46);
}

.fxm-panel__line:hover {
    color: rgba(255, 255, 255, 0.74);
}

.fxm-panel__line.is-current {
    color: var(--fxp-ink);
    font-size: 28px;
    font-weight: 600;
    letter-spacing: 0.01em;
}

/* 逐字：只有当前行的字参与明暗变化，其余行沿用整行颜色，避免残留高亮 */
.fxm-panel__char {
    color: inherit;
    transition: color 0.14s linear, text-shadow 0.18s ease;
}

.fxm-panel__line.is-current .fxm-panel__char {
    color: rgba(255, 255, 255, 0.38);
}

.fxm-panel__line.is-current .fxm-panel__char.is-sung {
    color: var(--fxp-ink);
    text-shadow: 0 0 22px hsl(var(--fxp-tint) / 0.55);
}

.fxm-panel__empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding-top: 12vh;
    color: var(--fxp-muted);
    font-size: 14px;
}

.fxm-panel__empty span {
    font-size: 11px;
    letter-spacing: 0.1em;
    color: var(--fxp-faint);
}

/* ------------------------------ 专辑视图 ------------------------------ */
/* 上半：专辑卡横向滚动区；下半：选中专辑的曲目列表 */
.fxm-panel__albums {
    display: flex;
    flex-direction: row;
    align-items: stretch;
    gap: 12px;
    flex: 0 0 auto;
    min-height: 0;
    max-width: 620px;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x proximity;
    overscroll-behavior-x: contain;
    width: 100%;
    box-sizing: border-box;
    margin-left: auto;
    margin-right: auto;
    padding: 2px 4px 8px 0;
}

.fxm-panel__albums::-webkit-scrollbar {
    height: 4px;
}

.fxm-panel__album-list::-webkit-scrollbar {
    width: 4px;
}

.fxm-panel__albums::-webkit-scrollbar-thumb,
.fxm-panel__album-list::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.14);
    border-radius: 4px;
}

.fxm-panel__album-card {
    display: grid;
    grid-template-columns: 72px minmax(0, 1fr);
    gap: 4px 12px;
    align-items: center;
    flex: 0 0 300px;
    box-sizing: border-box;
    padding: 12px 14px 12px 12px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.07);
    background: rgba(255, 255, 255, 0.04);
    cursor: pointer;
    scroll-snap-align: start;
    transition: background 0.16s ease, border-color 0.16s ease;
}

.fxm-panel__album-card:hover {
    background: rgba(255, 255, 255, 0.08);
}

.fxm-panel__album-card.is-selected {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.22);
}

/* CD 唱片：圆形封面 + 中孔 */
.fxm-panel__album-card-disc {
    position: relative;
    width: 72px;
    height: 72px;
    border-radius: 50%;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.06);
    box-shadow: 0 14px 26px -16px rgba(0, 0, 0, 0.9), 0 0 0 1px rgba(255, 255, 255, 0.1);
}

.fxm-panel__album-card-disc img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.fxm-panel__album-card-disc::after {
    content: '';
    position: absolute;
    left: 50%;
    top: 50%;
    width: 14px;
    height: 14px;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    background: var(--fxp-base);
    box-shadow: 0 0 0 2px rgba(11, 14, 21, 0.5), 0 0 0 3px rgba(255, 255, 255, 0.14);
}

.fxm-panel__album-card-body {
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-width: 0;
}

.fxm-panel__album-card-name {
    display: flex;
    align-items: center;
    gap: 8px;
    overflow: hidden;
    font-size: 16px;
    font-weight: 600;
    color: var(--fxp-ink);
    white-space: nowrap;
}

.fxm-panel__album-card-name::after {
    content: '';
    flex: 1;
    min-width: 0;
}

.fxm-panel__album-card.is-playing .fxm-panel__album-card-name::before {
    content: '';
    width: 7px;
    height: 7px;
    border-radius: 50%;
    flex: 0 0 auto;
    background: hsl(var(--fxp-tint) / 1);
    box-shadow: 0 0 10px hsl(var(--fxp-tint) / 0.8);
}

.fxm-panel__album-card-sub {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 12px;
    color: var(--fxp-muted);
    font-variant-numeric: tabular-nums;
}

.fxm-panel__album-card-intro {
    grid-column: 1 / -1;
    margin: 6px 0 0;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    font-size: 12px;
    line-height: 1.7;
    color: rgba(255, 255, 255, 0.48);
}

/* display 是作者样式，会盖掉 [hidden] 的 UA 规则，这里显式还原 */
.fxm-panel__album-card-intro[hidden] {
    display: none;
}

/* 下半：选中专辑的曲目列表（行内不显示专辑列） */
.fxm-panel__album-list {
    position: relative;
    box-sizing: border-box;
    flex: 1;
    min-height: 0;
    max-width: 620px;
    width: 100%;
    margin: 12px auto 0;
    padding: 0 4px 0 0;
    list-style: none;
    overflow-y: auto;
    overscroll-behavior: contain;
}

.fxm-panel__album-list .fxm-panel__qi {
    grid-template-columns: 22px minmax(0, 1fr) minmax(0, 132px) auto;
}

.fxm-panel__album-list .fxm-panel__qi:first-child {
    margin-top: 4px;
}

.fxm-panel__queue-list {
    position: relative;
    box-sizing: border-box;
    flex: 1;
    min-height: 0;
    max-width: 620px;
    width: 100%;
    margin: 0 auto;
    padding: 0 4px 0 0;
    list-style: none;
    overflow-y: auto;
    overscroll-behavior: contain;
}

.fxm-panel__queue-list::-webkit-scrollbar {
    width: 4px;
}

.fxm-panel__queue-list::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.14);
    border-radius: 4px;
}

.fxm-panel__qi {
    display: grid;
    grid-template-columns: 22px minmax(0, 1.1fr) minmax(0, 0.8fr) minmax(0, 0.9fr) auto;
    gap: 14px;
    align-items: center;
    padding: 11px 10px;
    border-radius: 10px;
    cursor: pointer;
    transition: background 0.14s ease;
}

.fxm-panel__qi:hover {
    background: rgba(255, 255, 255, 0.06);
}

.fxm-panel__qi.is-current {
    background: rgba(255, 255, 255, 0.09);
}

.fxm-panel__qi-idx {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    font-size: 11px;
    color: var(--fxp-faint);
    font-variant-numeric: tabular-nums;
}

.fxm-panel__qi-name {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.82);
}

.fxm-panel__qi-artist {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.42);
}

.fxm-panel__qi-album {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.42);
}

.fxm-panel__qi.is-current .fxm-panel__qi-name {
    color: var(--fxp-ink);
    font-weight: 600;
}

.fxm-panel__qi-dur {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.42);
    font-variant-numeric: tabular-nums;
}

/* 正在播放：三根跳动的小竖条替代序号 */
.fxm-panel__qi-eq {
    display: flex;
    align-items: flex-end;
    gap: 2px;
    height: 10px;
    color: hsl(var(--fxp-tint) / 1);
}

.fxm-panel__qi-eq i {
    width: 2px;
    border-radius: 1px;
    background: currentColor;
    animation: fxp-eq 1.05s ease-in-out infinite;
}

.fxm-panel__qi-eq i:nth-child(1) { height: 5px; animation-delay: -0.5s; }
.fxm-panel__qi-eq i:nth-child(2) { height: 10px; animation-delay: -0.2s; }
.fxm-panel__qi-eq i:nth-child(3) { height: 7px; animation-delay: -0.8s; }

#fx-music-panel.is-paused .fxm-panel__qi-eq i {
    animation-play-state: paused;
}

@keyframes fxp-eq {
    0%, 100% { transform: scaleY(0.45); }
    50% { transform: scaleY(1); }
}

.fxm-panel__queue-empty {
    padding: 28px 8px;
    font-size: 12px;
    color: var(--fxp-faint);
    text-align: center;
}

/* ------------------------------ 全屏档 ------------------------------ */
#fx-music-panel.is-max .fxm-panel__dialog {
    width: 100vw;
    height: 100dvh;
    border-radius: 0;
    /* 全屏档左列稍宽于常规 40%/560，为加大左边距后仍保住封面尺寸 */
    grid-template-columns: minmax(0, min(43%, 600px)) minmax(0, 1fr);
}

#fx-music-panel.is-max .fxm-panel__stage {
    padding: 78px 56px 40px 112px;
}

#fx-music-panel.is-max .fxm-panel__stage-main {
    max-width: max(180px, calc(100dvh - 352px));
}

#fx-music-panel.is-max .fxm-panel__top {
    padding: 0 28px 0 112px;
}

#fx-music-panel.is-max .fxm-panel__title {
    font-size: 28px;
}

#fx-music-panel.is-max .fxm-panel__view {
    padding: 78px 72px 48px;
}

#fx-music-panel.is-max .fxm-panel__line {
    font-size: 24px;
    padding: 16px 0;
}

#fx-music-panel.is-max .fxm-panel__line.is-current {
    font-size: 36px;
}

#fx-music-panel.is-max .fxm-panel__qi {
    padding: 13px 10px;
}

/* ------------------------------ 矮屏兜底 ------------------------------ */
@media screen and (max-height: 740px) {
    .fxm-panel__stage,
    #fx-music-panel.is-max .fxm-panel__stage {
        padding-top: 50px;
        padding-bottom: 20px;
    }

    #fx-music-panel {
        --fxp-stage-chrome: 284px;
    }

    .fxm-panel__title,
    #fx-music-panel.is-max .fxm-panel__title {
        font-size: 21px;
    }

    .fxm-panel__meta {
        margin-top: 14px;
    }

    .fxm-panel__view,
    #fx-music-panel.is-max .fxm-panel__view {
        padding-top: 50px;
    }
}

/* ------------------------------ 小屏 ------------------------------ */
@media screen and (max-width: 900px) {
    .fxm-panel__dialog,
    #fx-music-panel.is-max .fxm-panel__dialog {
        width: 100vw;
        height: 100dvh;
        border-radius: 0;
        grid-template-columns: minmax(0, 1fr);
        grid-template-rows: auto minmax(0, 1fr);
        overflow: hidden;
    }

    .fxm-panel__stage,
    #fx-music-panel.is-max .fxm-panel__stage {
        padding: 54px 22px 0;
        overflow: visible;
    }

    /* 触摸设备没有 hover，导航常显 */
    .fxm-panel__nav {
        opacity: 1;
        height: 24px;
    }

    .fxm-panel__stage-main {
        align-items: center;
        justify-content: flex-start;
        max-width: 100%;
    }

    .fxm-panel__art,
    #fx-music-panel.is-max .fxm-panel__art {
        max-width: 176px;
    }

    .fxm-panel__meta,
    #fx-music-panel.is-max .fxm-panel__meta {
        width: 100%;
        margin-top: 14px;
        text-align: center;
    }

    .fxm-panel__title,
    #fx-music-panel.is-max .fxm-panel__title {
        font-size: 19px;
    }

    .fxm-panel__progress,
    .fxm-panel__controls,
    .fxm-panel__volume {
        width: 100%;
    }

    .fxm-panel__progress {
        margin-top: 14px;
    }

    .fxm-panel__controls {
        justify-content: center;
        gap: 10px;
        margin-top: 10px;
    }

    .fxm-panel__volbar {
        max-width: none;
    }

    .fxm-panel__view,
    #fx-music-panel.is-max .fxm-panel__view {
        padding: 6px 20px 22px;
    }

    .fxm-panel__view-head {
        padding-bottom: 8px;
    }

    .fxm-panel__qi {
        grid-template-columns: 20px minmax(0, 1fr) auto;
        gap: 12px;
        padding: 11px 10px;
    }

    .fxm-panel__qi-artist,
    .fxm-panel__qi-album {
        display: none;
    }

    .fxm-panel__line,
    #fx-music-panel.is-max .fxm-panel__line {
        font-size: 16px;
        padding: 9px 0;
    }

    .fxm-panel__line.is-current,
    #fx-music-panel.is-max .fxm-panel__line.is-current {
        font-size: 20px;
    }

    .fxm-panel__album-card {
        flex-basis: 260px;
        grid-template-columns: 56px minmax(0, 1fr);
        gap: 4px 10px;
        padding: 10px 12px 10px 10px;
    }

    .fxm-panel__album-card-disc {
        width: 56px;
        height: 56px;
    }

    .fxm-panel__album-card-disc::after {
        width: 11px;
        height: 11px;
    }

    .fxm-panel__album-card-name {
        font-size: 15px;
    }
}

@media (prefers-reduced-motion: reduce) {
    #fx-music-panel *,
    #fx-music-panel *::before,
    #fx-music-panel *::after {
        animation: none !important;
        transition: none !important;
    }
}
