/* 音乐播放器外槽：与底栏留白见 #home-screen 变量 */
.home-music-slot {
    width: 100%;
    max-width: 100%;
    margin-top: 0;
    flex-shrink: 0;
    box-sizing: border-box;
    container-type: inline-size;
    container-name: homeslot;
}

/* 主界面音乐播放器：横向卡片（略压缩高度利落实测一屏） */
.music-player-card {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    height: clamp(96px, 34vw, 118px);
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    overflow: visible;
    background: linear-gradient(135deg, #E8F4F0 0%, #E9E7F5 100%);
    border-radius: clamp(20px, 5.2vw, 28px);
    padding: 8px 12px;
    margin: 0;
    box-shadow: 0 12px 28px rgba(112, 128, 165, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.55);
    border: 1px solid rgba(255, 255, 255, 0.44);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
    transition: background-color 0.35s ease, box-shadow 0.35s ease, border-color 0.35s ease;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    opacity: 0.88;
}

.music-upload-input { display: none; }

.music-player-row {
    display: flex;
    flex-direction: row;
    align-items: center;
    flex: 1;
    min-height: 0;
    gap: 9px;
}

.music-album-wrap {
    height: 100%;
    max-height: 100%;
    width: auto;
    max-width: 36%;
    aspect-ratio: 1;
    flex-shrink: 0;
    border-radius: clamp(8px, 2.4cqw, 12px);
    overflow: hidden;
    background: #d8d8dc;
    cursor: pointer;
    position: relative;
}

.music-album-art {
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.music-album-placeholder {
    font-size: clamp(26px, 8cqw, 40px);
    color: rgba(0, 0, 0, 0.22);
}

.music-upload-hint {
    font-size: clamp(8px, 2.4cqw, 10px);
    color: rgba(0, 0, 0, 0.38);
    margin-top: 4px;
    text-align: center;
    padding: 0 4px;
}

.music-album-art.has-cover .music-album-placeholder,
.music-album-art.has-cover .music-upload-hint {
    display: none;
}

.music-player-col {
    flex: 1;
    min-width: 0;
    min-height: 0;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 2px;
}

.music-player-header-row {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    justify-content: space-between;
    gap: 8px;
}

.music-track-meta {
    flex: 1;
    min-width: 0;
}

.music-title,
.music-artist {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.music-title {
    font-size: clamp(11px, 3.1cqw, 14px);
    font-weight: 700;
    color: #2d3748;
    letter-spacing: -0.01em;
}

.music-artist {
    font-size: clamp(9px, 2.5cqw, 12px);
    font-weight: 400;
    color: #4a5568;
    margin-top: 2px;
    opacity: 0.85;
}

/* 更多 ⋯ */
.music-more-wrap {
    flex-shrink: 0;
    position: relative;
}

.music-more-btn {
    width: clamp(26px, 7cqw, 32px);
    height: clamp(26px, 7cqw, 32px);
    border: 1px solid rgba(255, 255, 255, 0.42);
    background: linear-gradient(135deg, #E8F4F0 0%, #E9E7F5 100%);
    color: #4a5568;
    font-size: clamp(18px, 5cqw, 22px);
    line-height: 1;
    cursor: pointer;
    border-radius: 12px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 18px rgba(112, 128, 165, 0.16), inset 0 1px 0 rgba(255, 255, 255, 0.5);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
}

.music-more-btn:hover {
    background: linear-gradient(135deg, rgba(232, 244, 240, 0.95) 0%, rgba(233, 231, 245, 0.95) 100%);
}

.music-more-dropdown {
    display: none;
    position: absolute;
    top: 0;
    right: 100%;
    margin-top: 0;
    margin-right: 6px;
    min-width: 160px;
    max-width: min(240px, 85vw);
    padding: 8px 0;
    background: linear-gradient(135deg, #E8F4F0 0%, #E9E7F5 100%);
    border-radius: 18px;
    box-shadow: 0 16px 32px rgba(112, 128, 165, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.42);
    z-index: 120;
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
}

.music-more-dropdown.show {
    display: block;
}

.music-more-item {
    display: block;
    width: 100%;
    padding: 10px 14px;
    border: none;
    background: none;
    text-align: left;
    font-size: 14px;
    color: #2d3748;
    cursor: pointer;
}

.music-more-item:hover {
    background: rgba(255, 255, 255, 0.22);
}

.music-more-item.music-repeat-btn.active,
.music-more-item.main-music-island-listen-together-btn.active {
    font-weight: 600;
}

.music-more-volume-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    cursor: default;
}

.music-more-volume-row:hover {
    background: transparent;
}

.music-more-vol-label {
    font-size: 13px;
    color: #44536c;
    flex-shrink: 0;
}

.music-volume-slider {
    flex: 1;
    min-width: 0;
    height: 6px;
    -webkit-appearance: none;
    appearance: none;
    background: rgba(95, 114, 141, 0.18);
    border-radius: 999px;
    outline: none;
}

.music-volume-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 14px;
    height: 14px;
    background: linear-gradient(135deg, #bcc6df 0%, #e9e7f5 52%, #d0dde3 100%);
    border-radius: 50%;
    cursor: pointer;
    border: 1px solid rgba(255, 255, 255, 0.5);
    box-shadow: 0 4px 10px rgba(112, 128, 165, 0.18);
}

.music-volume-slider::-moz-range-thumb {
    width: 14px;
    height: 14px;
    background: linear-gradient(135deg, #bcc6df 0%, #e9e7f5 52%, #d0dde3 100%);
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(112, 128, 165, 0.18);
}

.music-progress {
    margin-top: 0;
}

.music-progress-bar {
    position: relative;
    height: clamp(14px, 4cqw, 18px);
    cursor: pointer;
    margin: 0;
    display: flex;
    align-items: center;
}

.music-progress-bg {
    position: absolute;
    left: 0;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    height: clamp(3px, 1cqw, 4px);
    background: rgba(95, 114, 141, 0.16);
    border-radius: 999px;
    pointer-events: none;
}

.music-progress-fill {
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    height: clamp(5px, 1.5cqw, 7px);
    background: linear-gradient(90deg, #bcc6df 0%, #e9e7f5 52%, #d0dde3 100%);
    border-radius: 999px;
    width: 0%;
    min-width: 0;
    max-width: 100%;
    pointer-events: none;
    z-index: 1;
}

.music-progress-thumb {
    position: absolute;
    top: 50%;
    transform: translate(-50%, -50%);
    width: clamp(9px, 2.8cqw, 12px);
    height: clamp(9px, 2.8cqw, 12px);
    background: linear-gradient(135deg, #bcc6df 0%, #e9e7f5 52%, #d0dde3 100%);
    border-radius: 50%;
    left: 0%;
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.52), 0 4px 10px rgba(112, 128, 165, 0.16);
    pointer-events: none;
    z-index: 2;
}

.music-time {
    display: flex;
    justify-content: space-between;
    font-size: clamp(8px, 2.2cqw, 10px);
    color: rgba(0, 0, 0, 0.45);
    margin-top: 1px;
}

/* 主控：上一首 / 播放 / 下一首 */
.music-controls-main {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: clamp(7px, 2.4cqw, 12px);
    margin-top: 0;
    padding-bottom: 0;
}

.music-controls-main .music-skip-btn {
    width: clamp(28px, 7.5cqw, 34px);
    height: clamp(28px, 7.5cqw, 34px);
    border: 1px solid rgba(255, 255, 255, 0.42);
    background: linear-gradient(135deg, rgba(232, 244, 240, 0.88) 0%, rgba(233, 231, 245, 0.88) 100%);
    font-size: clamp(13px, 3.8cqw, 17px);
    color: #2d3748;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    flex-shrink: 0;
    padding: 0;
    box-shadow: 0 8px 18px rgba(112, 128, 165, 0.16), inset 0 1px 0 rgba(255, 255, 255, 0.5);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
}

.music-controls-main .music-skip-btn:hover {
    background: linear-gradient(135deg, rgba(232, 244, 240, 0.95) 0%, rgba(233, 231, 245, 0.95) 100%);
}

.music-lyrics-toggle-btn svg {
    width: clamp(16px, 4.4cqw, 20px);
    height: clamp(16px, 4.4cqw, 20px);
    display: block;
}

.music-lyrics-toggle-btn.active {
    color: #243247;
    background: linear-gradient(135deg, rgba(210, 219, 240, 1) 0%, rgba(248, 245, 255, 1) 50%, rgba(220, 235, 242, 1) 100%);
    box-shadow: 0 10px 22px rgba(83, 104, 146, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.72);
}

.music-controls-main .music-play-btn {
    width: clamp(32px, 9cqw, 40px);
    height: clamp(32px, 9cqw, 40px);
    border: 1px solid rgba(255, 255, 255, 0.42);
    background: linear-gradient(135deg, rgba(232, 244, 240, 0.96) 0%, rgba(233, 231, 245, 0.96) 100%);
    color: #2d3748;
    font-size: clamp(12px, 3.4cqw, 15px);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    flex-shrink: 0;
    padding: 0;
    box-shadow: 0 10px 20px rgba(112, 128, 165, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.52);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
}

.music-controls-main .music-play-btn:hover {
    background: linear-gradient(135deg, rgba(232, 244, 240, 1) 0%, rgba(233, 231, 245, 1) 100%);
}

/* 无容器查询时 cqw 会回退为视口相关行为；提供 vw 兜底 */
@supports not (width: 1cqw) {
    .music-player-card {
        padding: 7px 11px;
    }
    .music-player-row {
        gap: 9px;
    }
    .music-album-wrap {
        max-width: 36%;
    }
    .music-title {
        font-size: clamp(11px, 3.1vw, 14px);
    }
    .music-artist {
        font-size: clamp(9px, 2.5vw, 12px);
    }
    .music-controls-main {
        gap: clamp(7px, 2.4vw, 12px);
    }
    .music-controls-main .music-skip-btn {
        width: clamp(28px, 7.5vw, 34px);
        height: clamp(28px, 7.5vw, 34px);
        font-size: clamp(13px, 3.8vw, 17px);
    }
    .music-controls-main .music-play-btn {
        width: clamp(32px, 9vw, 40px);
        height: clamp(32px, 9vw, 40px);
        font-size: clamp(12px, 3.4vw, 15px);
    }
}

/* 播放列表 / 联网搜歌模态：须盖过主屏灵动岛与悬浮球容器(100350) */
.music-playlist-modal.modal,
.music-search-modal.modal,
.music-local-upload-modal.modal,
.music-lyrics-modal.modal {
    z-index: 100410;
}

/*
 * 播放列表：与 #main-music-island 同属 #app 坐标系。.modal 默认 position:fixed 相对视口，
 * 小手机外框有外边距时留白与灵动岛错位；改为 absolute 铺满 #app。
 * 另：全局 .modal.show 垂直居中会让卡片顶端与灵动岛重叠，改为贴顶留白。
 */
.music-playlist-modal.modal {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.music-playlist-modal.modal.show {
    --playlist-modal-top-clearance: calc(env(safe-area-inset-top, 0px) + clamp(104px, 26vmin, 212px));
    align-items: flex-start;
    justify-content: center;
    box-sizing: border-box;
    padding-top: var(--playlist-modal-top-clearance);
    padding-bottom: max(16px, env(safe-area-inset-bottom, 0px));
}

.music-playlist-modal.modal.show .music-playlist-content {
    max-height: min(
        calc(70vh + 15px),
        calc(
            100% - var(--playlist-modal-top-clearance) - max(16px, env(safe-area-inset-bottom, 0px)) - 12px
        )
    );
}

.music-playlist-modal .music-playlist-content {
    max-width: 335px;
    width: 90%;
    max-height: calc(70vh + 15px);
    background: #fff;
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

/* 联网搜歌模态框（复用播放列表的视觉规范） */
.music-search-modal .music-search-content {
    max-width: 360px;
    width: 92%;
    max-height: 76vh;
    background: #fff;
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

.music-local-upload-modal .music-local-upload-content,
.music-lyrics-modal .music-lyrics-content {
    max-width: 350px;
    width: 92%;
    background: #fff;
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

.music-search-bar {
    display: flex;
    gap: 10px;
    padding: 12px 16px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.music-search-input {
    flex: 1;
    min-width: 0;
    height: 36px;
    padding: 0 12px;
    border-radius: 10px;
    border: 1px solid rgba(0, 0, 0, 0.12);
    outline: none;
    font-size: 14px;
}

.music-search-input:focus {
    border-color: rgba(0, 0, 0, 0.35);
}

.music-search-btn {
    height: 36px;
    padding: 0 14px;
    border: none;
    border-radius: 10px;
    background: #1a1a1a;
    color: #fff;
    cursor: pointer;
    font-size: 14px;
    flex-shrink: 0;
}

.music-search-btn:hover {
    background: #333;
}

.music-search-status {
    padding: 10px 16px;
    font-size: 12px;
    color: #777;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.music-search-status:empty {
    display: none;
}

.music-search-list {
    flex: 1;
    overflow-y: auto;
    padding: 8px;
    min-height: 140px;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.music-search-list::-webkit-scrollbar {
    width: 0;
    height: 0;
    display: none;
}

.music-search-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 10px;
    transition: background 0.2s;
}

.music-search-item:hover {
    background: rgba(0, 0, 0, 0.04);
}

.music-search-thumb {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    background: rgba(0, 0, 0, 0.06);
    overflow: hidden;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(0, 0, 0, 0.35);
    font-weight: 700;
}

.music-search-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.music-search-meta {
    flex: 1;
    min-width: 0;
}

.music-search-title {
    font-size: 14px;
    color: #333;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.music-search-artist {
    font-size: 12px;
    color: #999;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.music-search-actions {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
}

.music-search-add,
.music-search-play {
    height: 30px;
    padding: 0 10px;
    border-radius: 10px;
    border: none;
    cursor: pointer;
    font-size: 12px;
}

.music-search-play {
    background: rgba(0, 0, 0, 0.06);
    color: #333;
}

.music-search-play:hover {
    background: rgba(0, 0, 0, 0.1);
}

.music-search-add {
    background: #16a34a;
    color: #fff;
}

.music-search-add:hover {
    background: #12823c;
}

.music-upload-panel {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 14px 16px 16px;
}

.music-upload-panel-track {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
    padding: 10px 12px;
    border-radius: 10px;
    background: rgba(0, 0, 0, 0.04);
    color: #333;
}

.music-upload-panel-track span,
.music-upload-panel-track strong {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.music-upload-panel-track span {
    font-size: 13px;
}

.music-upload-panel-track strong {
    font-size: 12px;
    color: #777;
    font-weight: 500;
}

.music-lyrics-editor-shell {
    padding: 0;
    overflow: hidden;
}

.music-lyrics-editor {
    width: 100%;
    min-height: 92px;
    max-height: 180px;
    resize: vertical;
    border: none;
    outline: none;
    background: transparent;
    color: #333;
    font-size: 13px;
    line-height: 1.55;
    padding: 12px 14px;
    font-family: 'LoveMiMusicLyrics', 'LoveMiOfflineNarration', 'Songti SC', serif;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.music-lyrics-editor::-webkit-scrollbar {
    width: 0;
    height: 0;
    display: none;
}

.music-lyrics-editor::placeholder {
    color: rgba(0, 0, 0, 0.45);
}

.music-lyrics-editor:disabled {
    opacity: 0.58;
}

.music-upload-panel-btn,
.music-lyrics-url-btn {
    min-height: 36px;
    border: none;
    border-radius: 10px;
    background: rgba(0, 0, 0, 0.06);
    color: #333;
    font-size: 14px;
    cursor: pointer;
}

.music-upload-panel-btn:hover,
.music-lyrics-url-btn:hover {
    background: rgba(0, 0, 0, 0.1);
}

.music-upload-panel-btn-primary {
    background: #1a1a1a;
    color: #fff;
}

.music-upload-panel-btn-primary:hover {
    background: #333;
}

.music-upload-panel-btn-danger {
    background: rgba(220, 53, 69, 0.12);
    color: #b42334;
}

.music-upload-panel-btn-danger:hover {
    background: rgba(220, 53, 69, 0.2);
}

.music-lyrics-url-row {
    display: flex;
    gap: 8px;
}

.music-lyrics-url-input {
    flex: 1;
    min-width: 0;
    height: 36px;
    padding: 0 11px;
    border-radius: 10px;
    border: 1px solid rgba(0, 0, 0, 0.12);
    outline: none;
    font-size: 13px;
}

.music-lyrics-url-input:focus {
    border-color: rgba(0, 0, 0, 0.35);
}

.music-lyrics-url-btn {
    width: 58px;
    flex-shrink: 0;
}


.music-playlist-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.music-playlist-header h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: #333;
}

.music-playlist-close {
    width: 28px;
    height: 28px;
    border: none;
    background: none;
    font-size: 20px;
    color: #666;
    cursor: pointer;
    border-radius: 4px;
}

.music-playlist-close:hover {
    background: rgba(0, 0, 0, 0.05);
}

.music-playlist-list {
    flex: 1;
    overflow-y: auto;
    padding: 8px;
    min-height: 120px;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.music-playlist-list::-webkit-scrollbar {
    width: 0;
    height: 0;
    display: none;
}

.music-playlist-empty {
    padding: 24px 16px;
    text-align: center;
    color: #999;
    font-size: 14px;
}

.music-playlist-item {
    display: flex;
    align-items: center;
    padding: 10px 12px;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.2s;
}

.music-playlist-item:hover {
    background: rgba(0, 0, 0, 0.04);
}

.music-playlist-item.active {
    background: rgba(0, 0, 0, 0.06);
    font-weight: 500;
}

.music-playlist-item-index {
    width: 24px;
    font-size: 12px;
    color: #999;
}

.music-playlist-item-info {
    flex: 1;
    min-width: 0;
}

.music-playlist-item-title {
    font-size: 14px;
    color: #333;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.music-playlist-item-artist {
    font-size: 12px;
    color: #999;
}

.music-playlist-item-missing .music-playlist-item-title {
    color: #999;
}

.music-playlist-item-lyrics,
.music-playlist-item-delete {
    width: 28px;
    height: 28px;
    border: none;
    background: rgba(0, 0, 0, 0.06);
    color: #666;
    font-size: 18px;
    cursor: pointer;
    border-radius: 50%;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-left: 6px;
    padding: 0;
}

.music-playlist-item-lyrics svg {
    width: 16px;
    height: 16px;
}

.music-playlist-item-lyrics.has-lyrics {
    background: rgba(22, 163, 74, 0.14);
    color: #15803d;
}

.music-playlist-item-lyrics:hover {
    background: rgba(22, 163, 74, 0.2);
    color: #15803d;
}

.music-playlist-item-delete:hover {
    background: rgba(220, 53, 69, 0.2);
    color: #dc3545;
}

.music-playlist-footer {
    display: flex;
    gap: 12px;
    padding: 12px 16px;
    border-top: 1px solid rgba(0, 0, 0, 0.08);
}

.music-playlist-add-btn,
.music-playlist-cancel-btn {
    flex: 1;
    padding: 10px 16px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    cursor: pointer;
}

.music-playlist-add-btn {
    background: #1a1a1a;
    color: #fff;
}

.music-playlist-add-btn:hover {
    background: #333;
}

.music-playlist-cancel-btn {
    background: rgba(0, 0, 0, 0.06);
    color: #333;
}

.music-playlist-cancel-btn:hover {
    background: rgba(0, 0, 0, 0.1);
}

.music-desktop-lyrics {
    position: absolute;
    left: 50%;
    bottom: 108px;
    /* 与 #main-music-island 同档：须高于全屏页（微信/一起看书/旅行约会等 100135～100280+），否则「显示歌词」已开但看不见 */
    z-index: 100355;
    width: min(320px, calc(100% - 42px));
    min-width: 180px;
    min-height: 48px;
    height: 68px;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 0 10px;
    color: rgba(255, 255, 255, 0.96);
    background: transparent;
    border: none;
    border-radius: 0;
    box-shadow: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    opacity: 1;
    transform: none;
    transition: opacity 0.35s ease, text-shadow 0.35s ease;
    touch-action: none;
    user-select: none;
    -webkit-user-select: none;
    cursor: default;
    overflow: visible;
    pointer-events: none;
}

.music-desktop-lyrics.show {
    display: flex;
}

.music-desktop-lyrics.is-idle {
    opacity: 0.52;
}

.music-desktop-lyrics.dragging,
.music-desktop-lyrics.resizing {
    opacity: 0.96;
    cursor: grabbing;
}

.music-desktop-lyrics-inner {
    width: 100%;
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    pointer-events: none;
}

.music-desktop-lyrics-text,
.music-desktop-lyrics-next {
    width: auto;
    max-width: 100%;
    text-align: center;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-family: 'LoveMiMusicLyrics', 'LoveMiOfflineNarration', 'Songti SC', serif;
    text-shadow: 0 2px 6px rgba(0, 0, 0, 0.72), 0 0 2px rgba(0, 0, 0, 0.78);
    pointer-events: auto;
}

.music-desktop-lyrics-text {
    font-size: clamp(17px, 5cqw, 24px);
    line-height: 1.18;
    font-weight: 600;
}

.music-desktop-lyrics-next {
    font-size: clamp(12px, 3.2cqw, 16px);
    line-height: 1.12;
    opacity: 0.68;
}

.music-desktop-lyrics-resize {
    position: absolute;
    right: 4px;
    bottom: 4px;
    width: 12px;
    height: 12px;
    border-right: 1px solid rgba(255, 255, 255, 0.58);
    border-bottom: 1px solid rgba(255, 255, 255, 0.58);
    border-radius: 2px;
    cursor: nwse-resize;
    opacity: 0;
    pointer-events: auto;
    transition: opacity 0.2s ease;
}

.music-desktop-lyrics:hover .music-desktop-lyrics-resize,
.music-desktop-lyrics.resizing .music-desktop-lyrics-resize {
    opacity: 0.55;
}

.music-desktop-lyrics-resize::before {
    content: '';
    position: absolute;
    right: 4px;
    bottom: 4px;
    width: 8px;
    height: 8px;
    border-right: 1px solid rgba(255, 255, 255, 0.42);
    border-bottom: 1px solid rgba(255, 255, 255, 0.42);
}

/* 小屏：音乐区由 .left-section flex + margin-top:auto 上推，不再用大固定 margin */
@media (max-width: 340px) {
    .music-controls-main {
        gap: 10px;
    }

    .music-player-card {
        height: 108px;
    }
}
