/* Sonic-topography / AETHER style music room */

#music-room {
    --aether-accent: #33d1ff;
    --aether-text: #94a3b8;
    --viz-bg-top: #070d1a;
    --viz-bg-mid: #020408;
    --viz-bg-deep: #0a0818;
    --viz-bg-accent: #33d1ff;
    background: linear-gradient(165deg, var(--viz-bg-top) 0%, var(--viz-bg-mid) 48%, var(--viz-bg-deep) 100%);
    transition: background 1.4s ease;
    font-family: "Helvetica Neue", Arial, sans-serif;
    color: var(--aether-text);
}

.music-viz-ambient {
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
    background:
        radial-gradient(ellipse 85% 65% at 50% 36%, color-mix(in srgb, var(--viz-bg-accent, var(--aether-accent)) 16%, transparent), transparent 72%),
        radial-gradient(circle at 12% 18%, color-mix(in srgb, var(--viz-bg-accent, var(--aether-accent)) 8%, transparent), transparent 42%),
        radial-gradient(circle at 88% 78%, color-mix(in srgb, var(--viz-bg-top, #070d1a) 55%, transparent), transparent 38%),
        radial-gradient(ellipse 120% 80% at 50% 100%, color-mix(in srgb, var(--viz-bg-deep, #081020) 92%, transparent), transparent 55%);
    opacity: 1;
    transition: opacity 1.6s ease, background 1.4s ease;
}

.music-viz-ambient::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image:
        radial-gradient(1px 1px at 10% 20%, rgba(255, 255, 255, 0.35), transparent),
        radial-gradient(1px 1px at 30% 65%, rgba(255, 255, 255, 0.2), transparent),
        radial-gradient(1px 1px at 55% 15%, rgba(255, 255, 255, 0.28), transparent),
        radial-gradient(1px 1px at 72% 42%, rgba(255, 255, 255, 0.18), transparent),
        radial-gradient(1px 1px at 88% 28%, rgba(255, 255, 255, 0.25), transparent),
        radial-gradient(1.5px 1.5px at 22% 38%, rgba(200, 230, 255, 0.22), transparent),
        radial-gradient(1px 1px at 48% 72%, rgba(255, 255, 255, 0.15), transparent),
        radial-gradient(1px 1px at 65% 88%, rgba(255, 255, 255, 0.2), transparent),
        radial-gradient(1px 1px at 92% 62%, rgba(255, 255, 255, 0.16), transparent);
    opacity: 0.55;
    animation: ambientStars 22s ease-in-out infinite alternate;
    animation-play-state: running;
    will-change: transform, opacity;
}

.music-viz-ambient::after {
    content: "";
    position: absolute;
    inset: -10%;
    background: radial-gradient(ellipse 55% 40% at 50% 45%, color-mix(in srgb, var(--viz-bg-accent, var(--aether-accent)) 8%, transparent), transparent 70%);
    transition: background 1.4s ease;
    animation: ambientGlow 14s ease-in-out infinite alternate;
}

#music-room.viz-active .music-viz-ambient {
    opacity: 0.42;
}

@keyframes ambientStars {
    from { opacity: 0.4; transform: translateY(0); }
    to { opacity: 0.65; transform: translateY(-6px); }
}

@keyframes ambientGlow {
    from { opacity: 0.5; transform: scale(1); }
    to { opacity: 0.85; transform: scale(1.06); }
}

#music-viz-host {
    position: absolute;
    inset: 0;
    z-index: 1;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

#music-viz-host canvas {
    display: block;
    width: 100%;
    height: 100%;
    touch-action: none;
}

#bg-audio {
    position: fixed;
    width: 0;
    height: 0;
    opacity: 0;
    pointer-events: none;
    clip: rect(0 0 0 0);
    overflow: hidden;
    border: 0;
}

.aether-ui {
    position: absolute;
    inset: 0;
    z-index: 10;
    pointer-events: none;
    -webkit-tap-highlight-color: transparent;
}

.aether-ui button,
.aether-ui input {
    touch-action: manipulation;
}

body.music-room-open #music-room {
    display: block;
}

body.music-room-open .footer-notice {
    visibility: hidden;
}

.aether-brand {
    position: absolute;
    top: 40px;
    left: 100px;
    font-size: 24px;
    font-weight: 900;
    letter-spacing: -0.04em;
    color: #fff;
    user-select: none;
    text-shadow: 0 0 30px rgba(51, 209, 255, 0.25);
}

.aether-sidebar-rail {
    position: absolute;
    left: 0;
    top: 0;
    width: 20px;
    height: 100%;
    z-index: 60;
    pointer-events: auto;
}

.aether-sidebar-rail:hover { width: 60px; }

.aether-sidebar {
    position: absolute;
    left: 0;
    top: 0;
    width: 60px;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    padding: 24px 0 20px;
    background: rgba(2, 4, 10, 0.82);
    border-right: 1px solid rgba(255, 255, 255, 0.05);
    transform: translateX(-100%);
    transition: transform 0.3s ease;
}

.aether-sidebar-rail:hover .aether-sidebar {
    transform: translateX(0);
}

.aether-sidebar-top,
.aether-sidebar-bottom {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
}

.aether-sidebar-bottom {
    margin-top: auto;
    padding-top: 12px;
    gap: 8px;
}

.aether-nav-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 76px;
    padding: 0;
    border: none;
    background: transparent;
    color: rgba(148, 163, 184, 0.45);
    font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    white-space: nowrap;
    cursor: pointer;
    margin-bottom: 28px;
    transform: rotate(90deg);
    transform-origin: center center;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    transition: color 0.2s, opacity 0.2s;
    pointer-events: auto;
}

.aether-nav-btn:hover,
.aether-nav-btn.is-active {
    color: var(--aether-accent);
    opacity: 1;
}

.aether-nav-btn-action {
    margin-bottom: 0;
}

body.music-room-open .aether-sidebar-rail {
    animation: aetherPanelIn 0.7s cubic-bezier(0.16, 1, 0.3, 1) 0.1s backwards;
}

.aether-lyrics {
    position: absolute;
    left: 132px;
    top: 50%;
    transform: translateY(-50%);
    width: min(1020px, 74vw);
    height: 74vh;
    overflow: hidden;
    pointer-events: none;
    z-index: 45;
    isolation: isolate;
    perspective: 1800px;
    perspective-origin: 0% 50%;
    -webkit-mask-image: linear-gradient(to bottom, transparent 0%, black 4%, black 96%, transparent 100%);
    mask-image: linear-gradient(to bottom, transparent 0%, black 4%, black 96%, transparent 100%);
    --lyric-glow-color: var(--aether-accent, #33d1ff);
    --lyric-glow-text: color-mix(in srgb, var(--lyric-glow-color) 34%, #ffffff);
    --lyric-glow-dim: color-mix(in srgb, var(--lyric-glow-color) 42%, rgba(255, 255, 255, 0.38));
    --lyric-glow-shadow-core: 0 0 8px color-mix(in srgb, var(--lyric-glow-color) 88%, transparent);
    --lyric-glow-shadow-mid: 0 0 22px color-mix(in srgb, var(--lyric-glow-color) 62%, transparent);
    --lyric-glow-shadow-outer: 0 0 44px color-mix(in srgb, var(--lyric-glow-color) 38%, transparent);
}

#lyrics-list.is-scrubbing .lyric-body {
    cursor: grabbing;
    user-select: none;
    -webkit-user-select: none;
}

#lyrics-list.is-scrubbing li {
    transition: none;
}

#lyrics-list.is-scrubbing li.scrub-focus {
    opacity: 1;
    transform: scale(1) translateZ(24px) translateX(var(--lyric-curve-x, 8px));
    filter: blur(0);
    z-index: 2;
}

#lyrics-list.is-scrubbing li.scrub-focus .lyric-text {
    color: var(--lyric-glow-text);
    font-weight: 600;
    transform: scale(1);
    text-shadow:
        var(--lyric-glow-shadow-core),
        var(--lyric-glow-shadow-mid),
        var(--lyric-glow-shadow-outer),
        0 2px 14px rgba(0, 0, 0, 0.82);
}

#lyrics-list.is-scrubbing li.scrub-focus .lyric-trans {
    opacity: 0.96;
    transform: scale(1);
    color: color-mix(in srgb, var(--lyric-glow-color) 28%, rgba(255, 255, 255, 0.92));
    text-shadow:
        0 0 12px color-mix(in srgb, var(--lyric-glow-color) 52%, transparent),
        0 0 24px color-mix(in srgb, var(--lyric-glow-color) 30%, transparent);
}

#lyrics-list.is-scrubbing li.scrub-focus .lyric-line-chunks .lyric-chunk {
    opacity: 1;
    transform: scale(1);
    color: var(--lyric-glow-text);
    text-shadow:
        var(--lyric-glow-shadow-core),
        var(--lyric-glow-shadow-mid);
}

#lyrics-list.is-scrubbing li:not(.scrub-focus) {
    opacity: 0.28;
    filter: blur(0.35px);
}

.aether-lyrics-inner {
    position: relative;
    padding-left: 48px;
    z-index: 1;
    width: 100%;
    height: 100%;
    opacity: 1;
    transform-style: preserve-3d;
    transform: rotateY(20deg) rotateX(3deg);
    transform-origin: left center;
}

.aether-lyrics-scroll {
    will-change: transform;
    width: 100%;
    transform-style: preserve-3d;
}

#lyrics-list {
    transform-style: preserve-3d;
    list-style: none;
    margin: 0;
    padding: 46vh 10% 46vh 32px;
}

#lyrics-list li .lyric-body {
    display: inline-block;
    width: fit-content;
    max-width: none;
    pointer-events: auto;
    cursor: grab;
    touch-action: none;
    transform-style: preserve-3d;
    backface-visibility: hidden;
    overflow: visible;
}

body.music-room-open .aether-lyrics-inner {
    animation: aetherLyricIn 0.85s cubic-bezier(0.16, 1, 0.3, 1) 0.12s both;
}

@media (prefers-reduced-motion: reduce) {
    .music-viz-ambient::before,
    .music-viz-ambient::after {
        animation: none !important;
    }

    body.music-room-open .aether-lyrics-inner {
        animation: none;
        opacity: 1;
        transform: none;
    }

    #lyrics-list li {
        transform: scale(var(--lyric-scale, 0.84)) !important;
    }
}

@keyframes aetherLyricIn {
    from {
        opacity: 0;
        transform: rotateY(20deg) rotateX(3deg) translate3d(-12px, 0, -24px);
    }
    to {
        opacity: 1;
        transform: rotateY(20deg) rotateX(3deg) translate3d(0, 0, 0);
    }
}

#lyrics-list li .lyric-dot {
    display: none;
}

#lyrics-list li {
    position: relative;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    padding: 16px 0;
    transform-style: preserve-3d;
    transform-origin: left center;
    --lyric-beat: 0;
    --lyric-curve-x: 8px;
    opacity: 0.62;
    transform: scale(0.84) translateZ(-18px) translateX(var(--lyric-curve-x));
    filter: blur(0.25px);
    overflow: visible;
    transition:
        opacity 0.38s cubic-bezier(0.33, 1, 0.52, 1),
        transform 0.38s cubic-bezier(0.33, 1, 0.52, 1),
        filter 0.38s ease;
}

/* ）形排版：正在唱的靠右，越远离当前行越靠左 */
#lyrics-list li[data-dist="0"] { --lyric-curve-x: 72px; }
#lyrics-list li[data-dist="1"] { --lyric-curve-x: 42px; }
#lyrics-list li[data-dist="2"] { --lyric-curve-x: 14px; }
#lyrics-list li[data-dist="3"] { --lyric-curve-x: -8px; }
#lyrics-list li[data-dist="4"] { --lyric-curve-x: -24px; }

#lyrics-list li.past {
    opacity: 0.46;
    transform: scale(0.88) translateZ(-12px) translateX(var(--lyric-curve-x));
    filter: blur(0.35px);
}

#lyrics-list li[data-dist="2"]:not(.active):not(.next) {
    opacity: 0.36;
    transform: scale(0.86) translateZ(-28px) translateX(var(--lyric-curve-x));
    filter: blur(0.5px);
}

#lyrics-list li[data-dist="3"]:not(.active):not(.next),
#lyrics-list li[data-dist="4"]:not(.active):not(.next) {
    opacity: 0.22;
    transform: scale(0.82) translateZ(-42px) translateX(var(--lyric-curve-x));
    filter: blur(1px);
}

#lyrics-list li.next {
    opacity: 0.54;
    transform: scale(0.9) translateZ(6px) translateX(var(--lyric-curve-x));
    filter: blur(0);
}

#lyrics-list li.active {
    opacity: 1;
    transform: scale(1) translateZ(20px) translateX(var(--lyric-curve-x));
    filter: blur(0);
}

#lyrics-list li.active .lyric-text {
    color: var(--lyric-glow-text);
    font-weight: 600;
    font-family: "Noto Serif SC", "Noto Serif JP", serif;
    letter-spacing: 0.04em;
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: break-word;
    transform: scale(1);
    text-shadow:
        var(--lyric-glow-shadow-core),
        var(--lyric-glow-shadow-mid),
        var(--lyric-glow-shadow-outer),
        0 2px 14px rgba(0, 0, 0, 0.82);
}

#lyrics-list li.active .lyric-line-chunks .lyric-chunk {
    display: inline-block;
    transform-origin: center bottom;
    opacity: 0.62;
    transform: scale(0.88);
    color: var(--lyric-glow-dim);
    text-shadow:
        0 0 10px color-mix(in srgb, var(--lyric-glow-color) 34%, transparent),
        0 2px 10px rgba(0, 0, 0, 0.72);
    transition:
        transform 0.08s cubic-bezier(0.33, 1, 0.45, 1),
        opacity 0.08s ease,
        color 0.08s ease,
        text-shadow 0.08s ease;
}

#lyrics-list li.active .lyric-line-chunks .lyric-chunk-letter {
    letter-spacing: 0.02em;
}

#lyrics-list li.active .lyric-line-chunks .lyric-chunk.lit {
    opacity: 1;
    transform: scale(1.16);
    color: var(--lyric-glow-text);
    text-shadow:
        var(--lyric-glow-shadow-core),
        var(--lyric-glow-shadow-mid),
        var(--lyric-glow-shadow-outer),
        0 2px 10px rgba(0, 0, 0, 0.72);
}

#lyrics-list li.active .lyric-line-chunks .lyric-chunk.lit-current {
    opacity: calc(0.62 + var(--chunk-beat, 0) * 0.38);
    transform: scale(calc(0.88 + var(--chunk-beat, 0) * 0.3));
    color: color-mix(
        in srgb,
        var(--lyric-glow-text) calc(38% + var(--chunk-beat, 0) * 62%),
        var(--lyric-glow-dim)
    );
    text-shadow:
        0 0 calc(10px + var(--chunk-beat, 0) * 24px) color-mix(in srgb, var(--lyric-glow-color) calc(52% + var(--chunk-beat, 0) * 36%), transparent),
        0 0 calc(22px + var(--chunk-beat, 0) * 34px) color-mix(in srgb, var(--lyric-glow-color) calc(34% + var(--chunk-beat, 0) * 28%), transparent),
        0 2px 10px rgba(0, 0, 0, 0.72);
}

#lyrics-list li.past .lyric-line-chunks .lyric-chunk {
    opacity: 1;
    transform: scale(1);
    color: inherit;
}

#lyrics-list li .lyric-text {
    font-size: clamp(28px, 3.4vw, 46px);
    line-height: 1.45;
    color: color-mix(in srgb, var(--lyric-glow-color) 24%, rgba(255, 255, 255, 0.72));
    font-family: "Noto Serif SC", "Noto Serif JP", serif;
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: break-word;
    transform: scale(0.42);
    transform-origin: left center;
    transition:
        opacity 0.38s cubic-bezier(0.33, 1, 0.52, 1),
        transform 0.38s cubic-bezier(0.33, 1, 0.52, 1),
        color 0.38s ease,
        filter 0.38s ease,
        text-shadow 0.38s ease;
    text-shadow:
        0 0 12px color-mix(in srgb, var(--lyric-glow-color) 32%, transparent),
        0 2px 14px rgba(0, 0, 0, 0.88);
}

#lyrics-list li.next .lyric-text {
    transform: scale(0.48);
    color: color-mix(in srgb, var(--lyric-glow-color) 30%, rgba(255, 255, 255, 0.78));
    text-shadow:
        0 0 14px color-mix(in srgb, var(--lyric-glow-color) 36%, transparent),
        0 2px 12px rgba(0, 0, 0, 0.82);
}

#lyrics-list li.past .lyric-text {
    transform: scale(0.46);
    color: color-mix(in srgb, var(--lyric-glow-color) 18%, rgba(255, 255, 255, 0.62));
    font-weight: 400;
    text-shadow:
        0 0 10px color-mix(in srgb, var(--lyric-glow-color) 24%, transparent),
        0 2px 12px rgba(0, 0, 0, 0.78);
}

#lyrics-list li[data-dist="2"]:not(.active):not(.next) .lyric-text {
    transform: scale(0.44);
    color: color-mix(in srgb, var(--lyric-glow-color) 14%, rgba(255, 255, 255, 0.54));
}

#lyrics-list li .lyric-trans {
    margin-top: 8px;
    font-size: clamp(16px, 2.2vw, 28px);
    color: color-mix(in srgb, var(--lyric-glow-color) 20%, rgba(255, 255, 255, 0.56));
    font-family: "LXGW WenKai", "LXGW WenKai GB", "KaiTi", serif;
    font-weight: 400;
    letter-spacing: 0.06em;
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: break-word;
    transform: scale(0.45);
    transform-origin: left top;
    transition:
        opacity 0.38s cubic-bezier(0.33, 1, 0.52, 1),
        transform 0.38s cubic-bezier(0.33, 1, 0.52, 1),
        color 0.38s ease,
        text-shadow 0.38s ease;
    text-shadow:
        0 0 10px color-mix(in srgb, var(--lyric-glow-color) 28%, transparent),
        0 2px 12px rgba(0, 0, 0, 0.82);
}

#lyrics-list li.next .lyric-trans {
    transform: scale(0.48);
    color: color-mix(in srgb, var(--lyric-glow-color) 24%, rgba(255, 255, 255, 0.52));
}

#lyrics-list li.past .lyric-trans {
    transform: scale(0.46);
    color: color-mix(in srgb, var(--lyric-glow-color) 16%, rgba(255, 255, 255, 0.42));
}

#lyrics-list li.active .lyric-trans {
    color: color-mix(in srgb, var(--lyric-glow-color) 30%, rgba(255, 255, 255, 0.96));
    font-weight: 500;
    font-family: "LXGW WenKai", "LXGW WenKai GB", "KaiTi", serif;
    letter-spacing: 0.05em;
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: break-word;
    transform: scale(1);
    text-shadow:
        0 0 10px color-mix(in srgb, var(--lyric-glow-color) 58%, transparent),
        0 0 22px color-mix(in srgb, var(--lyric-glow-color) 36%, transparent),
        0 2px 12px rgba(0, 0, 0, 0.82);
}

#lyrics-list li.active .lyric-trans.lyric-line-chunks .lyric-chunk {
    display: inline-block;
    transform-origin: center bottom;
    opacity: 0.52;
    transform: scale(0.92);
    color: color-mix(in srgb, var(--lyric-glow-color) 28%, rgba(255, 255, 255, 0.52));
    text-shadow: 0 0 8px color-mix(in srgb, var(--lyric-glow-color) 26%, transparent);
    transition:
        transform 0.08s cubic-bezier(0.33, 1, 0.45, 1),
        opacity 0.08s ease,
        color 0.08s ease,
        text-shadow 0.08s ease;
}

#lyrics-list li.active .lyric-trans.lyric-line-chunks .lyric-chunk.lit {
    opacity: 1;
    transform: scale(1.1);
    color: color-mix(in srgb, var(--lyric-glow-color) 34%, rgba(255, 255, 255, 0.98));
    text-shadow:
        0 0 12px color-mix(in srgb, var(--lyric-glow-color) 62%, transparent),
        0 0 24px color-mix(in srgb, var(--lyric-glow-color) 34%, transparent);
}

#lyrics-list li.active .lyric-trans.lyric-line-chunks .lyric-chunk.lit-current {
    opacity: calc(0.52 + var(--chunk-beat, 0) * 0.48);
    transform: scale(calc(0.92 + var(--chunk-beat, 0) * 0.2));
    color: color-mix(
        in srgb,
        color-mix(in srgb, var(--lyric-glow-color) 34%, rgba(255, 255, 255, 0.98)) calc(40% + var(--chunk-beat, 0) * 60%),
        color-mix(in srgb, var(--lyric-glow-color) 28%, rgba(255, 255, 255, 0.52))
    );
    text-shadow:
        0 0 calc(8px + var(--chunk-beat, 0) * 16px) color-mix(in srgb, var(--lyric-glow-color) calc(40% + var(--chunk-beat, 0) * 30%), transparent),
        0 0 calc(18px + var(--chunk-beat, 0) * 22px) color-mix(in srgb, var(--lyric-glow-color) calc(24% + var(--chunk-beat, 0) * 22%), transparent);
}

#lyrics-list li.lyric-placeholder .lyric-text {
    font-size: 14px;
    font-style: italic;
    color: rgba(255, 255, 255, 0.35);
}

.aether-player {
    position: absolute;
    top: 88px;
    right: 32px;
    width: min(320px, calc(100vw - 64px));
    padding: 14px 20px 12px 16px;
    border-radius: 2px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-left: 2px solid color-mix(in srgb, var(--aether-accent) 45%, transparent);
    background: rgba(2, 4, 10, 0.48);
    pointer-events: auto;
    box-sizing: border-box;
    overflow: hidden;
}

.aether-player-glow {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(135deg, color-mix(in srgb, var(--aether-accent) 6%, transparent), transparent 55%),
        repeating-linear-gradient(90deg, transparent, transparent 11px, rgba(255, 255, 255, 0.015) 11px, rgba(255, 255, 255, 0.015) 12px);
    pointer-events: none;
}

.aether-player-head {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-rows: auto auto;
    gap: 4px 10px;
    align-items: start;
    margin-bottom: 12px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.aether-transport {
    position: relative;
}

body.music-room-open .aether-player {
    animation: aetherPanelIn 0.7s cubic-bezier(0.16, 1, 0.3, 1) 0.18s backwards;
}

@keyframes aetherPanelIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

#aether-song-title,
#song-title {
    grid-column: 1;
    grid-row: 1;
    font-size: 15px;
    font-weight: 400;
    letter-spacing: 0.08em;
    color: rgba(255, 255, 255, 0.92);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin: 0;
    min-width: 0;
}

#aether-song-meta,
#song-artist {
    grid-column: 1;
    grid-row: 2;
    font-size: 9px;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    color: rgba(148, 163, 184, 0.5);
    margin: 0;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.aether-progress-row {
    display: grid;
    grid-template-columns: 34px 1fr 34px;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
}

.aether-progress-wrap {
    position: relative;
    height: 18px;
    display: flex;
    align-items: center;
}

.aether-progress-rail {
    width: 100%;
    height: 1px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 0;
    overflow: visible;
    position: relative;
    transition: height 0.2s ease, background 0.2s ease;
}

.aether-progress-rail::before {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    top: -5px;
    bottom: -5px;
    background: repeating-linear-gradient(90deg, transparent, transparent 7px, rgba(255, 255, 255, 0.03) 7px, rgba(255, 255, 255, 0.03) 8px);
    pointer-events: none;
}

.aether-player:hover .aether-progress-rail,
.aether-progress-wrap.is-dragging .aether-progress-rail {
    height: 2px;
    background: rgba(255, 255, 255, 0.12);
}

.aether-progress-fill,
#progress-fill {
    position: relative;
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, color-mix(in srgb, var(--aether-accent) 35%, transparent), var(--aether-accent));
    border-radius: 0;
    box-shadow: 0 0 10px color-mix(in srgb, var(--aether-accent) 55%, transparent);
    transition: width 0.12s linear;
}

.aether-progress-fill::after,
#progress-fill::after {
    content: "";
    position: absolute;
    right: 0;
    top: 50%;
    width: 6px;
    height: 6px;
    border-radius: 1px;
    background: var(--aether-accent);
    transform: translate(50%, -50%) rotate(45deg);
    box-shadow: 0 0 8px color-mix(in srgb, var(--aether-accent) 80%, transparent);
    opacity: 0.85;
    transition: opacity 0.2s ease, transform 0.2s ease, width 0.2s ease, height 0.2s ease;
}

.aether-player:hover .aether-progress-fill::after,
.aether-progress-wrap.is-dragging .aether-progress-fill::after {
    width: 8px;
    height: 8px;
    opacity: 1;
}

#progress-bar {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    margin: 0;
    opacity: 0;
    cursor: pointer;
}

.aether-controls-row {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    min-width: 0;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: rgba(148, 163, 184, 0.85);
}

.aether-controls-sliders {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 8px 12px;
    width: 100%;
    min-width: 0;
}

.aether-time {
    min-width: 0;
    font-variant-numeric: tabular-nums;
    font-size: 10px;
    font-family: "Courier New", monospace;
    color: rgba(255, 255, 255, 0.38);
    text-align: center;
    white-space: nowrap;
}

.aether-controls-center {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    width: 100%;
    min-width: 0;
}

.aether-ctrl {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 2px;
    background: rgba(255, 255, 255, 0.03);
    color: rgba(255, 255, 255, 0.72);
    cursor: pointer;
    line-height: 1;
    transition:
        color 0.2s ease,
        border-color 0.2s ease,
        background 0.2s ease,
        transform 0.2s cubic-bezier(0.22, 1, 0.36, 1),
        box-shadow 0.2s ease;
}

.aether-icon {
    width: 13px;
    height: 13px;
    stroke: currentColor;
    fill: none;
    stroke-width: 1.65;
    stroke-linecap: round;
    stroke-linejoin: round;
    pointer-events: none;
}

.aether-icon path {
    vector-effect: non-scaling-stroke;
}

.aether-icon-play,
.aether-icon-pause,
.aether-icon-loop-one {
    display: none;
}

.aether-ctrl-main .aether-icon {
    width: 15px;
    height: 15px;
}

.aether-ctrl-main .aether-icon-play {
    display: block;
}

.aether-ctrl-main .aether-icon-play path {
    fill: currentColor;
    stroke: none;
}

.aether-ctrl-main.is-playing .aether-icon-play {
    display: none;
}

.aether-ctrl-main.is-playing .aether-icon-pause {
    display: block;
}

.aether-ctrl.mode-list .aether-icon-loop-list {
    display: block;
}

.aether-ctrl.mode-one .aether-icon-loop-one {
    display: block;
}

.aether-ctrl:hover {
    color: rgba(255, 255, 255, 0.95);
    border-color: rgba(255, 255, 255, 0.18);
    background: rgba(255, 255, 255, 0.07);
    transform: translateY(-1px);
    box-shadow: 0 0 12px color-mix(in srgb, var(--aether-accent) 18%, transparent);
}

.aether-ctrl:active {
    transform: translateY(0) scale(0.96);
}

.aether-ctrl.is-active {
    color: var(--aether-accent);
    border-color: color-mix(in srgb, var(--aether-accent) 42%, rgba(255, 255, 255, 0.1));
    background: color-mix(in srgb, var(--aether-accent) 10%, rgba(255, 255, 255, 0.03));
    box-shadow: 0 0 14px color-mix(in srgb, var(--aether-accent) 28%, transparent);
}

.aether-ctrl-main {
    width: 30px;
    height: 30px;
    color: rgba(255, 255, 255, 0.92);
    border-color: rgba(255, 255, 255, 0.14);
    background: rgba(255, 255, 255, 0.05);
}

.aether-ctrl-main:hover {
    border-color: color-mix(in srgb, var(--aether-accent) 35%, rgba(255, 255, 255, 0.18));
    background: color-mix(in srgb, var(--aether-accent) 8%, rgba(255, 255, 255, 0.06));
}

.aether-volume {
    display: flex;
    align-items: center;
    gap: 5px;
    flex: 0 0 auto;
    min-width: 0;
    width: 100%;
    padding-right: 0;
    box-sizing: border-box;
    color: rgba(255, 255, 255, 0.42);
}

.aether-volume-value {
    min-width: 30px;
    font-size: 9px;
    font-variant-numeric: tabular-nums;
    letter-spacing: 0.04em;
    color: rgba(255, 255, 255, 0.5);
    text-align: right;
    flex-shrink: 0;
}


.aether-icon-volume {
    width: 11px;
    height: 11px;
    flex-shrink: 0;
    opacity: 0.7;
}

.aether-volume #aether-volume-slider,
.aether-volume #volume-slider {
    flex: 1 1 0;
    width: 0;
    min-width: 0;
    max-width: 100%;
    height: 12px;
    margin: 0;
    padding: 0;
    border: none;
    -webkit-appearance: none;
    appearance: none;
    background: transparent;
    accent-color: var(--aether-accent);
    cursor: pointer;
    opacity: 0.9;
    box-sizing: border-box;
}

.aether-volume #volume-slider::-webkit-slider-runnable-track {
    height: 4px;
    border-radius: 2px;
    background: rgba(255, 255, 255, 0.14);
}

.aether-volume #volume-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 8px;
    height: 8px;
    margin-top: -2px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 0 6px color-mix(in srgb, var(--aether-accent) 45%, transparent);
}

.aether-volume #volume-slider::-moz-range-track {
    height: 4px;
    border-radius: 2px;
    background: rgba(255, 255, 255, 0.14);
}

.aether-volume #volume-slider::-moz-range-thumb {
    width: 8px;
    height: 8px;
    border: none;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 0 6px color-mix(in srgb, var(--aether-accent) 45%, transparent);
}


.aether-stats {
    position: absolute;
    left: 100px;
    bottom: 40px;
    display: flex;
    gap: 32px;
    padding: 0;
    pointer-events: none;
    z-index: 30;
}

.aether-stat label {
    display: block;
    font-size: 10px;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.72);
    opacity: 1;
    margin-bottom: 6px;
    text-shadow: 0 1px 6px rgba(0, 0, 0, 0.85);
}

.aether-stat output {
    display: block;
    font-family: "Courier New", monospace;
    font-size: 16px;
    font-weight: 700;
    color: #fff;
    margin-bottom: 8px;
    text-shadow:
        0 0 10px color-mix(in srgb, var(--aether-accent) 65%, transparent),
        0 1px 8px rgba(0, 0, 0, 0.9);
}

.aether-stat-bar {
    width: 108px;
    height: 4px;
    background: rgba(255, 255, 255, 0.22);
    border-radius: 2px;
    overflow: hidden;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06);
}

.aether-stat-bar span {
    display: block;
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, color-mix(in srgb, var(--aether-accent) 85%, #fff), var(--aether-accent));
    border-radius: 2px;
    box-shadow:
        0 0 10px color-mix(in srgb, var(--aether-accent) 75%, transparent),
        0 0 18px color-mix(in srgb, var(--aether-accent) 35%, transparent);
    transition: width 0.08s linear;
}

.aether-hint {
    position: absolute;
    right: 40px;
    bottom: 40px;
    font-size: 10px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    opacity: 0.28;
    user-select: none;
}

body.music-room-open .page-nav-btn {
    z-index: 1002;
    top: 22px;
    right: 28px;
}

body.music-room-open .aether-brand {
    animation: aetherPanelIn 0.65s cubic-bezier(0.16, 1, 0.3, 1) 0.05s backwards;
}

body.music-room-open .aether-stats {
    animation: aetherPanelIn 0.7s cubic-bezier(0.16, 1, 0.3, 1) 0.28s backwards;
}

#music-room .playlist-backdrop {
    z-index: 1100;
    background: rgba(0, 0, 0, 0.55);
}

#music-room .playlist-drawer {
    z-index: 1110;
    background: rgba(5, 10, 15, 0.88);
    backdrop-filter: blur(22px);
    -webkit-backdrop-filter: blur(22px);
    border-color: rgba(255, 255, 255, 0.08);
    padding-top: 88px;
    padding-left: 20px;
    padding-right: 16px;
    isolation: isolate;
}

#music-room .playlist-drawer::before {
    content: '';
    position: absolute;
    inset: 0;
    pointer-events: none;
    opacity: 0.045;
    z-index: 0;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

#music-room .playlist-drawer > * {
    position: relative;
    z-index: 1;
}

#music-room .playlist-drawer-header {
    color: var(--aether-accent);
    font-size: 10px;
    letter-spacing: 0.25em;
}

#music-room .playlist-drawer .netease-playlists-status {
    font-size: 11px;
    letter-spacing: 0.04em;
    color: rgba(255, 255, 255, 0.48);
    margin: 0 0 14px;
    padding-left: 2px;
}

#music-room .playlist-drawer .netease-playlist-section {
    flex-shrink: 0;
    margin-bottom: 10px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

#music-room .netease-playlist-section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 8px;
    padding: 0 4px;
}

#music-room .netease-playlist-section-title {
    font-size: 12px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.72);
    letter-spacing: 0.04em;
}

#music-room .netease-playlist-section-count {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.38);
    font-variant-numeric: tabular-nums;
}

#music-room .netease-playlist-tracks-section {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
}

#music-room .playlist-track-search {
    flex-shrink: 0;
    margin-bottom: 8px;
}

#music-room .playlist-track-search input {
    width: 100%;
    box-sizing: border-box;
    padding: 9px 12px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.05);
    color: #fff;
    font-family: inherit;
    font-size: 12px;
    letter-spacing: 0.02em;
}

#music-room .playlist-track-search input::placeholder {
    color: rgba(255, 255, 255, 0.38);
}

#music-room .playlist-track-search input:focus {
    outline: none;
    border-color: color-mix(in srgb, var(--aether-accent) 45%, rgba(255, 255, 255, 0.12));
    background: rgba(255, 255, 255, 0.08);
}

#music-room .playlist-track-search input::-webkit-search-cancel-button {
    filter: invert(0.85);
}

#music-room .playlist-drawer .netease-cloud-playlists {
    display: flex;
    flex-direction: column;
    flex-wrap: nowrap;
    gap: 2px;
    margin-bottom: 0;
    max-height: min(44vh, 340px);
    overflow-y: auto;
    overflow-x: hidden;
    padding: 2px 4px 4px 0;
}

#music-room .netease-cloud-playlist {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    border: none;
    background: transparent;
    color: rgba(255, 255, 255, 0.82);
    padding: 8px 10px;
    border-radius: 10px;
    font-size: 13px;
    line-height: 1.4;
    cursor: pointer;
    font-family: inherit;
    text-align: left;
    transition: background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

#music-room .netease-playlist-cover {
    width: 42px;
    height: 42px;
    border-radius: 7px;
    object-fit: cover;
    flex-shrink: 0;
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.28);
}

#music-room .netease-playlist-cover.is-placeholder {
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.03)),
        rgba(255, 255, 255, 0.06);
}

#music-room .netease-playlist-meta {
    flex: 1;
    min-width: 0;
}

#music-room .netease-playlist-name {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
    word-break: break-word;
    color: rgba(255, 255, 255, 0.88);
    font-size: 13px;
    line-height: 1.45;
}

#music-room .netease-cloud-playlist:hover {
    background: rgba(255, 255, 255, 0.07);
    color: #fff;
}

#music-room .netease-cloud-playlist.is-active {
    background: color-mix(in srgb, var(--aether-accent) 16%, rgba(255, 255, 255, 0.08));
    box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--aether-accent) 35%, transparent);
}

#music-room .netease-cloud-playlist.is-active .netease-playlist-name {
    color: #fff;
}

#music-room .playlist-drawer .netease-playlists-songs,
#music-room #local-playlists-songs {
    flex: 1;
    overflow: auto;
    list-style: none;
    margin: 0;
    padding: 0 2px 8px 0;
}

#music-room .netease-playlist-song {
    padding: 12px 14px;
    border-radius: 10px;
    cursor: pointer;
    margin-bottom: 4px;
    transition: background 0.2s ease, transform 0.15s ease;
}

#music-room .netease-playlist-song:hover {
    background: rgba(255, 255, 255, 0.07);
}

#music-room .netease-playlist-song.is-active {
    background: color-mix(in srgb, var(--aether-accent) 16%, rgba(255, 255, 255, 0.08));
    box-shadow: inset 2px 0 0 var(--aether-accent);
}

#music-room .netease-playlist-song.is-active .netease-song-title {
    color: #fff;
}

#music-room .playlist-source-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 14px;
}

#music-room .playlist-source-tab {
    flex: 1;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.04);
    color: rgba(255, 255, 255, 0.72);
    padding: 8px 10px;
    border-radius: 6px;
    font-family: inherit;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    cursor: pointer;
    transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

#music-room .playlist-source-tab:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
}

#music-room .playlist-source-tab.is-active {
    background: color-mix(in srgb, var(--aether-accent) 18%, rgba(255, 255, 255, 0.06));
    border-color: color-mix(in srgb, var(--aether-accent) 55%, rgba(255, 255, 255, 0.12));
    color: #fff;
}

#music-room .playlist-source-panel {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
}

#music-room .playlist-source-panel[hidden] {
    display: none !important;
}

#music-room .netease-song-title {
    display: block;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.92);
    line-height: 1.45;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

#music-room .netease-song-artist {
    display: block;
    margin-top: 3px;
    font-size: 11px;
    color: rgba(255, 255, 255, 0.42);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

#music-room .playlist-drawer .netease-cloud-playlists::-webkit-scrollbar,
#music-room .playlist-drawer .netease-playlists-songs::-webkit-scrollbar {
    width: 4px;
}

#music-room .playlist-drawer .netease-cloud-playlists::-webkit-scrollbar-thumb,
#music-room .playlist-drawer .netease-playlists-songs::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.16);
    border-radius: 999px;
}

#music-room .playlist-drawer .netease-cloud-playlists::-webkit-scrollbar-track,
#music-room .playlist-drawer .netease-playlists-songs::-webkit-scrollbar-track {
    background: transparent;
}

#music-room .netease-drawer {
    z-index: 1110;
    background: rgba(5, 10, 15, 0.94);
    backdrop-filter: blur(20px);
    border-color: rgba(255, 255, 255, 0.08);
    padding-top: 88px;
}

#music-room .netease-drawer-header {
    color: var(--aether-accent);
    font-size: 10px;
    letter-spacing: 0.25em;
}

#music-room .netease-search-bar input {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.1);
}

#music-room .netease-search-bar button {
    background: var(--aether-accent);
    color: #020408;
    border-color: color-mix(in srgb, var(--aether-accent) 60%, rgba(255, 255, 255, 0.14));
}

@media (max-width: 900px) {
    .music-viz-ambient::before,
    .music-viz-ambient::after {
        animation: none;
    }

    #music-viz-host {
        touch-action: none;
    }

    .aether-brand {
        left: max(16px, env(safe-area-inset-left));
        top: max(14px, env(safe-area-inset-top));
        font-size: 17px;
    }

    body.music-room-open .page-nav-btn {
        top: max(14px, env(safe-area-inset-top));
        right: max(12px, env(safe-area-inset-right));
        padding: 8px 14px;
        font-size: 12px;
        z-index: 1003;
    }

    body.music-room-open .aether-brand {
        display: none;
    }

    .aether-sidebar-rail {
        width: 52px;
    }

    .aether-sidebar-rail:hover {
        width: 52px;
    }

    body.music-room-open .aether-sidebar-rail.is-open {
        width: min(78vw, 220px);
    }

    body.music-room-open .aether-sidebar-rail.is-open .aether-sidebar {
        width: min(78vw, 220px);
    }

    body.music-room-open .aether-sidebar-rail.is-open .aether-nav-btn {
        width: 100%;
        height: auto;
        min-height: 40px;
        padding: 8px 10px;
    }

    .aether-sidebar {
        transform: translateX(0);
        width: 52px;
        padding-top: max(72px, calc(env(safe-area-inset-top) + 60px));
        padding-bottom: max(16px, env(safe-area-inset-bottom));
    }

    .aether-nav-btn {
        width: 44px;
        height: 68px;
        margin-bottom: 18px;
        font-size: 10px;
        letter-spacing: 0.12em;
    }

    .aether-sidebar-theme .theme-picker-panel {
        left: calc(100% + 6px);
    }

    .aether-lyrics {
        left: max(16px, env(safe-area-inset-left));
        right: max(16px, env(safe-area-inset-right));
        width: auto;
        top: max(72px, calc(env(safe-area-inset-top) + 60px));
        bottom: auto;
        height: min(34vh, 240px);
        max-height: calc(100dvh - env(safe-area-inset-top) - env(safe-area-inset-bottom) - 220px);
        transform: none;
        perspective: none;
        overflow-x: hidden;
        -webkit-mask-image: linear-gradient(to bottom, transparent 0%, black 10%, black 90%, transparent 100%);
        mask-image: linear-gradient(to bottom, transparent 0%, black 10%, black 90%, transparent 100%);
    }

    .aether-lyrics-inner {
        transform: none;
        padding-left: 12px;
    }

    #lyrics-list {
        padding: 28vh 0 28vh 8px;
    }

    #lyrics-list li,
    #lyrics-list li.past,
    #lyrics-list li.next,
    #lyrics-list li.active,
    #lyrics-list li[data-dist="2"]:not(.active):not(.next),
    #lyrics-list li[data-dist="3"]:not(.active):not(.next),
    #lyrics-list li[data-dist="4"]:not(.active):not(.next) {
        transform: scale(0.84) translateX(var(--lyric-curve-x, 0px));
    }

    #lyrics-list li[data-dist="0"] { --lyric-curve-x: 20px; }
    #lyrics-list li[data-dist="1"] { --lyric-curve-x: 10px; }
    #lyrics-list li[data-dist="2"] { --lyric-curve-x: 2px; }
    #lyrics-list li[data-dist="3"] { --lyric-curve-x: -4px; }
    #lyrics-list li[data-dist="4"] { --lyric-curve-x: -8px; }

    #lyrics-list li.past {
        transform: scale(0.88) translateX(var(--lyric-curve-x, 0px));
    }

    #lyrics-list li.next {
        transform: scale(0.9) translateX(var(--lyric-curve-x, 0px));
    }

    #lyrics-list li.active {
        transform: scale(1) translateX(var(--lyric-curve-x, 0px));
    }

    #lyrics-list.is-scrubbing li.scrub-focus {
        transform: scale(1) translateX(var(--lyric-curve-x, 0px));
    }

    #lyrics-list li[data-dist="2"]:not(.active):not(.next) {
        transform: scale(0.86) translateX(var(--lyric-curve-x, 0px));
    }

    #lyrics-list li[data-dist="3"]:not(.active):not(.next),
    #lyrics-list li[data-dist="4"]:not(.active):not(.next) {
        transform: scale(0.82) translateX(var(--lyric-curve-x, 0px));
    }

    #lyrics-list {
        padding: 28vh 0;
    }

    #lyrics-list li {
        padding: 10px 0;
    }

    #lyrics-list li .lyric-text {
        font-size: clamp(20px, 5.6vw, 30px);
        transform: scale(0.42);
    }

    #lyrics-list li .lyric-trans {
        font-size: clamp(14px, 4vw, 20px);
        transform: scale(0.45);
    }

    #lyrics-list li.active .lyric-text {
        transform: scale(1);
    }

    #lyrics-list li.active .lyric-trans {
        transform: scale(1);
    }

    #lyrics-list li.next .lyric-text {
        transform: scale(0.48);
    }

    .aether-stats {
        left: max(16px, env(safe-area-inset-left));
        bottom: max(168px, calc(env(safe-area-inset-bottom) + 156px));
        gap: 10px 14px;
        padding: 0;
        flex-wrap: wrap;
        max-width: calc(100vw - 32px - env(safe-area-inset-left) - env(safe-area-inset-right));
        z-index: 4;
    }

    .aether-stat {
        flex: 0 1 auto;
        min-width: 68px;
    }

    .aether-stat-bar {
        width: 72px;
    }

    .aether-stat output {
        font-size: 14px;
    }

    .aether-player {
        left: max(12px, env(safe-area-inset-left));
        right: max(12px, env(safe-area-inset-right));
        width: auto;
        top: auto;
        bottom: max(12px, env(safe-area-inset-bottom));
        padding: 12px 14px 10px;
        animation: none;
        z-index: 6;
        max-height: calc(100dvh - env(safe-area-inset-top) - env(safe-area-inset-bottom) - 120px);
        overflow: hidden;
    }

    .aether-controls-row {
        gap: 6px;
    }

    .aether-controls-sliders {
        gap: 6px 10px;
    }

    .aether-controls-center {
        gap: 3px;
    }

    .aether-ctrl {
        width: 30px;
        height: 30px;
    }

    .aether-ctrl-main {
        width: 34px;
        height: 34px;
    }

    .aether-volume-value {
        min-width: 26px;
        font-size: 8px;
    }

    .aether-hint {
        display: none;
    }

    #music-room .playlist-drawer,
    #music-room .netease-drawer {
        width: min(100vw, 340px);
        padding-top: max(76px, calc(env(safe-area-inset-top) + 60px));
        padding-bottom: max(20px, env(safe-area-inset-bottom));
    }
}

@media (max-width: 1100px) and (min-width: 901px) {
    .aether-brand {
        left: 72px;
        font-size: 20px;
    }

    .aether-lyrics {
        left: 120px;
        width: min(680px, 56vw);
    }

    .aether-stats {
        left: 72px;
        gap: 24px;
    }

    .aether-stat-bar {
        width: 80px;
    }
}

@media (max-width: 600px) {
    .aether-brand {
        font-size: 15px;
        letter-spacing: -0.02em;
    }

    .aether-stats {
        display: none;
    }

    .aether-lyrics {
        top: max(68px, calc(env(safe-area-inset-top) + 56px));
        height: min(32vh, 190px);
        max-height: calc(100dvh - env(safe-area-inset-top) - env(safe-area-inset-bottom) - 196px);
    }

    #lyrics-list li .lyric-text {
        font-size: clamp(18px, 6.4vw, 26px);
    }

    #lyrics-list li .lyric-trans {
        font-size: clamp(13px, 4.8vw, 18px);
    }

    .aether-player-head {
        margin-bottom: 8px;
        padding-bottom: 8px;
    }

    #song-title {
        font-size: 14px;
    }

    .aether-time {
        font-size: 9px;
    }
}

@media (max-height: 520px) and (orientation: landscape) {
    .aether-brand {
        display: none;
    }

    .aether-sidebar {
        padding-top: max(12px, env(safe-area-inset-top));
    }

    .aether-lyrics {
        top: max(12px, env(safe-area-inset-top));
        left: max(72px, calc(env(safe-area-inset-left) + 60px));
        height: calc(100dvh - max(88px, calc(env(safe-area-inset-bottom) + 76px)));
        width: min(52vw, 480px);
    }

    .aether-player {
        bottom: max(8px, env(safe-area-inset-bottom));
        max-width: min(420px, calc(100vw - 24px));
        left: auto;
        right: max(12px, env(safe-area-inset-right));
    }
}

#music-room.player-panel-hidden .aether-player {
    opacity: 0;
    pointer-events: none;
    transform: translateY(12px);
}

.aether-theme-cycle-btn {
    grid-column: 2;
    grid-row: 1 / span 2;
    align-self: start;
    flex-shrink: 0;
    border: 1px solid rgba(255, 255, 255, 0.18);
    background: rgba(255, 255, 255, 0.06);
    color: rgba(255, 255, 255, 0.72);
    font-size: 10px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    padding: 6px 10px;
    border-radius: 999px;
    cursor: pointer;
}

.aether-theme-cycle-btn:hover {
    color: #fff;
    border-color: rgba(255, 255, 255, 0.35);
}

#music-room .sonic-settings-drawer {
    position: fixed;
    top: 0;
    left: 0;
    width: min(400px, 92vw);
    height: 100%;
    z-index: 1110;
    background: rgba(5, 10, 15, 0.9);
    backdrop-filter: blur(22px);
    -webkit-backdrop-filter: blur(22px);
    border-right: 1px solid rgba(255, 255, 255, 0.08);
    transform: translateX(-100%);
    transition: transform 0.45s cubic-bezier(0.25, 0.8, 0.25, 1);
    display: flex;
    flex-direction: column;
    padding: 80px 18px 24px;
    box-shadow: 8px 0 40px rgba(0, 0, 0, 0.5);
    overflow-y: auto;
    overflow-x: hidden;
    isolation: isolate;
}

#music-room .sonic-settings-drawer::before {
    content: '';
    position: absolute;
    inset: 0;
    pointer-events: none;
    opacity: 0.04;
    z-index: 0;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

#music-room .sonic-settings-drawer > * {
    position: relative;
    z-index: 1;
}

#music-room .sonic-settings-drawer.show {
    transform: translateX(0);
}

.sonic-settings-drawer-head,
.sonic-settings-block-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 18px;
}

.sonic-settings-drawer-title,
.sonic-settings-block-title {
    color: #fff;
    font-size: 18px;
    letter-spacing: 0.08em;
    font-weight: 300;
}

.sonic-settings-drawer-sub,
.sonic-settings-block-note,
.sonic-settings-status {
    margin-top: 8px;
    color: rgba(255, 255, 255, 0.45);
    font-size: 11px;
    line-height: 1.6;
}

.sonic-settings-close,
.sonic-settings-block-head button,
.sonic-settings-actions button,
.sonic-settings-tab {
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.03);
    color: rgba(255, 255, 255, 0.72);
    font-size: 11px;
    letter-spacing: 0.06em;
    text-transform: none;
    padding: 8px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-family: inherit;
    transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.sonic-settings-close:hover,
.sonic-settings-block-head button:hover,
.sonic-settings-actions button:hover,
.sonic-settings-tab:hover {
    background: rgba(255, 255, 255, 0.07);
    border-color: rgba(255, 255, 255, 0.2);
    color: #fff;
}

.sonic-settings-actions button.ghost,
.sonic-settings-block-head button.ghost,
.sonic-settings-close.ghost {
    background: transparent;
}

.sonic-settings-actions button:not(.ghost),
.sonic-settings-tab.is-active {
    background: var(--aether-accent);
    color: #000;
    border-color: transparent;
    box-shadow: 0 0 16px color-mix(in srgb, var(--aether-accent) 28%, transparent);
}

.sonic-settings-actions button:not(.ghost):hover,
.sonic-settings-tab.is-active:hover {
    color: #000;
    filter: brightness(1.05);
}

#music-room .sonic-settings-drawer-title {
    color: var(--aether-accent);
    font-size: 10px;
    letter-spacing: 0.25em;
}

.sonic-settings-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    margin-bottom: 14px;
}

.sonic-settings-row select,
.sonic-settings-block > label select {
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(0, 0, 0, 0.28);
    color: rgba(255, 255, 255, 0.85);
    padding: 8px 10px;
    border-radius: 4px;
    font-family: inherit;
    font-size: 12px;
    width: 100%;
    margin-top: 8px;
}

.sonic-settings-block > label select {
    display: block;
}

.sonic-settings-tabs {
    display: flex;
    flex-wrap: nowrap;
    gap: 7px;
    margin-bottom: 16px;
    overflow-x: auto;
    padding-bottom: 4px;
    scrollbar-width: none;
}

.sonic-settings-tabs::-webkit-scrollbar {
    display: none;
}

.sonic-settings-tab {
    flex: 0 0 auto;
    white-space: nowrap;
}

.sonic-settings-migrate {
    margin-bottom: 14px;
}

.sonic-settings-migrate-actions {
    margin-top: 12px;
}

.sonic-settings-block {
    margin-bottom: 16px;
    padding: 16px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.025);
}

.sonic-settings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px;
}

.sonic-settings-grid label,
.sonic-settings-block > label {
    display: grid;
    gap: 8px;
    color: rgba(255, 255, 255, 0.72);
    font-size: 12px;
    letter-spacing: 0.02em;
}

.sonic-settings-check {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: rgba(255, 255, 255, 0.72);
    font-size: 11px;
}

.sonic-settings-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.sonic-eq-canvas,
.sonic-cookie-input {
    width: 100%;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    background: rgba(0, 0, 0, 0.28);
}

.sonic-eq-canvas {
    display: block;
    height: 220px;
    touch-action: none;
    cursor: crosshair;
}

.sonic-cookie-input {
    padding: 12px;
    color: #fff;
    font-family: ui-monospace, monospace;
    font-size: 12px;
    resize: vertical;
}

.sonic-cookie-qr-panel {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    margin: 12px 0 4px;
}

.sonic-cookie-qr-img {
    width: 180px;
    height: 180px;
    border-radius: 8px;
    background: #fff;
    padding: 8px;
}

.sonic-settings-theme-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}

.sonic-theme-chip {
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(0, 0, 0, 0.2);
    color: rgba(255, 255, 255, 0.72);
    padding: 8px 10px;
    border-radius: 6px;
    font-size: 11px;
    cursor: pointer;
    transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.sonic-theme-chip:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.22);
    color: #fff;
}

.sonic-theme-chip.is-active {
    border-color: color-mix(in srgb, var(--aether-accent) 50%, rgba(255, 255, 255, 0.2));
    background: color-mix(in srgb, var(--aether-accent) 14%, rgba(255, 255, 255, 0.08));
    color: #fff;
}

#music-room .sonic-settings-drawer::-webkit-scrollbar {
    width: 4px;
}

#music-room .sonic-settings-drawer::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.16);
    border-radius: 999px;
}

@media (max-width: 768px) {
    #music-room .sonic-settings-drawer {
        width: min(88vw, 400px);
        padding-top: max(72px, calc(env(safe-area-inset-top) + 56px));
    }

    .aether-sidebar-rail {
        width: 28px;
    }

    body.music-room-open .aether-sidebar-rail:hover,
    body.music-room-open .aether-sidebar-rail:focus-within,
    body.music-room-open .aether-sidebar-rail.is-open {
        width: min(78vw, 220px);
    }

    .aether-nav-btn {
        min-height: 44px;
        justify-content: flex-start;
        text-align: left;
        white-space: nowrap;
        width: 100%;
    }
}

/* Netease cloud drawer, upload/capture extras */
#music-room .netease-cloud-drawer {
    position: fixed;
    top: 0;
    left: 0;
    width: min(360px, 88vw);
    height: 100%;
    z-index: 1115;
    background: rgba(5, 10, 15, 0.94);
    backdrop-filter: blur(20px);
    border-right: 1px solid rgba(255, 255, 255, 0.08);
    transform: translateX(-100%);
    transition: transform 0.45s cubic-bezier(0.25, 0.8, 0.25, 1);
    display: flex;
    flex-direction: column;
    padding: 88px 20px 24px;
    box-shadow: 8px 0 40px rgba(0, 0, 0, 0.5);
}

#music-room .netease-cloud-drawer.show {
    transform: translateX(0);
}

.netease-cloud-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 14px;
}

.netease-cloud-tabs button {
    flex: 1;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(0, 0, 0, 0.2);
    color: rgba(255, 255, 255, 0.72);
    padding: 8px 6px;
    border-radius: 4px;
    font-size: 10px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    cursor: pointer;
}

.netease-cloud-tabs button.is-active {
    border-color: var(--aether-accent);
    color: var(--aether-accent);
    background: rgba(255, 255, 255, 0.06);
}

.netease-cloud-playlists {
    display: flex;
    flex-direction: column;
    gap: 2px;
    margin-bottom: 12px;
    max-height: min(44vh, 340px);
    overflow-y: auto;
}

.netease-cloud-playlist {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    border: none;
    background: transparent;
    color: rgba(255, 255, 255, 0.82);
    padding: 8px 10px;
    border-radius: 10px;
    font-size: 13px;
    cursor: pointer;
    text-align: left;
}

.netease-cloud-playlist.is-active {
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
}

.netease-cloud-status {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.45);
    margin: 0 0 10px;
    min-height: 16px;
}

.netease-cloud-results {
    list-style: none;
    margin: 0;
    padding: 0;
    overflow: auto;
    flex: 1;
}

.netease-cloud-results li {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 10px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    cursor: pointer;
}

.netease-cloud-results li:hover {
    color: var(--aether-accent);
}

.netease-song-title {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.88);
}

.netease-song-artist {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.45);
}

.sonic-drop-overlay {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.72);
    backdrop-filter: blur(8px);
    color: #fff;
    font-size: 12px;
    letter-spacing: 0.28em;
    text-transform: uppercase;
    pointer-events: none;
}

.sonic-drop-overlay.hidden {
    display: none;
}

.sonic-side-nav-hint {
    position: fixed;
    left: max(16px, env(safe-area-inset-left));
    top: max(72px, calc(env(safe-area-inset-top) + 56px));
    z-index: 1002;
    padding: 12px 14px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    background: rgba(0, 0, 0, 0.55);
    color: rgba(255, 255, 255, 0.78);
    font-size: 11px;
    line-height: 1.5;
    letter-spacing: 0.06em;
    max-width: min(280px, calc(100vw - 32px));
}

.sonic-side-nav-hint.hidden {
    display: none;
}

#music-room.sonic-capturing .aether-player-head p {
    color: var(--aether-accent);
}

#music-room.sonic-fullscreen .aether-hint,
#music-room.sonic-fullscreen .aether-stats {
    opacity: 0;
    pointer-events: none;
}

@media (max-width: 768px) {
    #music-room .netease-cloud-drawer {
        width: min(88vw, 360px);
        padding-top: max(72px, calc(env(safe-area-inset-top) + 56px));
    }

    .aether-sidebar-bottom {
        gap: 6px;
    }

    .aether-sidebar-bottom .aether-nav-btn {
        font-size: 9px;
        letter-spacing: 0.08em;
        min-height: 36px;
    }
}
