.music-bilibili-native {
    position: fixed;
    left: -4px;
    top: -4px;
    width: 1px;
    height: 1px;
    overflow: hidden;
    opacity: .01;
    pointer-events: none;
    z-index: 0;
}
.music-bilibili-native audio {
    display: block;
    width: 1px;
    height: 1px;
    border: 0;
}
.music-bilibili-frame {
    position: fixed;
    left: -10000px;
    top: -10000px;
    width: 320px;
    height: 180px;
    opacity: 0;
    pointer-events: none;
    overflow: hidden;
}
.music-bilibili-frame iframe {
    display: block;
    width: 320px;
    height: 180px;
    border: 0;
}

.music-capsule,
.music-capsule.motion-reveal {
    opacity: 1 !important;
    transform: none !important;
    pointer-events: auto !important;
    contain: none !important;
}
.music-capsule-toggle > * {
    pointer-events: none !important;
}
.music-capsule-toggle > .music-capsule-action,
.music-capsule-toggle > .music-capsule-action .music-action-item {
    pointer-events: auto !important;
}
.music-capsule-panel {
    background: rgba(255, 255, 255, 0.96) !important;
    border-color: rgba(35, 48, 70, 0.12) !important;
    box-shadow: 0 22px 54px rgba(35, 48, 70, 0.18), inset 0 1px 0 rgba(255,255,255,0.85) !important;
}
html[data-theme] body .music-capsule-panel {
    background: rgba(255, 255, 255, 0.96) !important;
    border-color: rgba(35, 48, 70, 0.12) !important;
    box-shadow: 0 22px 54px rgba(35, 48, 70, 0.18), inset 0 1px 0 rgba(255,255,255,0.85) !important;
}
.music-panel-head {
    color: var(--text) !important;
    font-size: 0.82rem;
    font-weight: 600 !important;
    letter-spacing: -0.01em;
}
.music-search input {
    background: rgba(242, 245, 249, 0.94) !important;
    border-color: rgba(35, 48, 70, 0.08) !important;
    color: var(--text) !important;
}
.music-results {
    display: grid;
    gap: 0;
    padding: 0.05rem 0;
}
.music-result {
    grid-template-columns: 2.72rem minmax(0, 1fr) 1.76rem !important;
    gap: 0.66rem;
    min-height: 3.42rem;
    padding: 0.42rem 0.34rem;
    border: 0 !important;
    border-bottom: 1px solid rgba(35, 48, 70, 0.08) !important;
    border-radius: 0;
    background: transparent !important;
    box-shadow: none !important;
    color: var(--text);
    transition: background-color 140ms ease, border-radius 140ms ease;
}
.music-result:last-child {
    border-bottom-color: transparent !important;
}
.music-result:hover,
.music-result:focus-visible {
    background: rgba(35, 48, 70, 0.045) !important;
    border-radius: 10px;
    outline: none;
}
.music-result:active {
    transform: none;
}
.music-result.is-current {
    background: color-mix(in srgb, var(--accent-soft) 13%, transparent) !important;
    border-radius: 10px;
    border-bottom-color: transparent !important;
}
.music-result-art {
    width: 2.72rem;
    height: 2.72rem;
    border-radius: 9px;
    background-color: rgba(35, 48, 70, 0.08);
    background-position: center;
    background-size: cover;
    box-shadow: none;
}
.music-result-copy {
    display: grid;
    min-width: 0;
    gap: 0.06rem;
    align-content: center;
}
.music-result-copy strong,
.music-result-copy small,
.music-result-album {
    display: block;
    max-width: 100%;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
    overflow-wrap: normal;
    line-height: 1.25;
}
.music-result-copy strong {
    color: var(--text);
    font-size: 0.88rem;
    font-weight: 560;
    letter-spacing: -0.008em;
}
.music-result-artist {
    color: var(--text);
    font-size: 0.75rem;
    font-weight: 450;
}
.music-result-album {
    color: var(--muted);
    font-size: 0.67rem;
    font-weight: 420;
}
.music-result-action {
    position: relative;
    display: grid;
    place-items: center;
    width: 1.72rem;
    height: 1.72rem;
    border-radius: 50%;
    background: transparent;
    color: var(--muted);
}
.music-result-action::before {
    content: "";
    width: 0;
    height: 0;
    margin-left: 0.11rem;
    border-top: 0.25rem solid transparent;
    border-bottom: 0.25rem solid transparent;
    border-left: 0.38rem solid currentColor;
}
.music-result.is-current .music-result-action {
    background: var(--text);
    color: #fff;
}
.music-result.is-current .music-result-action::before {
    width: 0.38rem;
    height: 0.5rem;
    margin-left: 0;
    border: 0;
    background: linear-gradient(90deg, currentColor 0 35%, transparent 35% 65%, currentColor 65% 100%);
}
[data-theme="dark"] .music-capsule-panel {
    background: rgba(25, 31, 43, 0.97) !important;
    border-color: rgba(224, 232, 245, 0.14) !important;
    box-shadow: 0 22px 54px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255,255,255,0.08) !important;
}
html[data-theme="dark"] body .music-capsule-panel {
    background: rgba(25, 31, 43, 0.97) !important;
    border-color: rgba(224, 232, 245, 0.14) !important;
    box-shadow: 0 22px 54px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255,255,255,0.08) !important;
}
[data-theme="dark"] .music-search input {
    background: rgba(11, 16, 25, 0.74) !important;
    border-color: rgba(224, 232, 245, 0.14) !important;
}
[data-theme="dark"] .music-result {
    border-bottom-color: rgba(224, 232, 245, 0.1) !important;
}
[data-theme="dark"] .music-result:hover,
[data-theme="dark"] .music-result:focus-visible {
    background: rgba(224, 232, 245, 0.07) !important;
}
@media (max-width: 640px) {
    .music-capsule {
        left: 12px !important;
        right: 12px !important;
        width: auto !important;
        max-width: none !important;
    }
    .music-capsule.has-track .music-capsule-toggle,
    .music-capsule.is-open .music-capsule-toggle {
        width: 100% !important;
        min-width: 0 !important;
    }
    .music-capsule-panel {
        left: 12px !important;
        right: 12px !important;
        width: auto !important;
    }
    .music-result {
        grid-template-columns: 2.62rem minmax(0, 1fr) 1.72rem !important;
        min-height: 3.28rem;
        padding: 0.38rem 0.28rem;
    }
    .music-result-art {
        width: 2.62rem;
        height: 2.62rem;
        border-radius: 8px;
    }
}

/* Apple Music-inspired sheet: a single translucent surface, generous album art,
   and quiet metadata rows. The media/search behavior remains unchanged. */
html[data-theme] body .music-capsule-panel {
    position: absolute !important;
    right: 0 !important;
    bottom: calc(100% + 0.72rem) !important;
    width: min(24rem, calc(100vw - 1.5rem)) !important;
    max-height: min(74vh, 38rem) !important;
    overflow: hidden !important;
    padding: 1.05rem 1rem 0.9rem !important;
    border: 1px solid rgba(255, 255, 255, 0.42) !important;
    border-radius: 28px !important;
    background:
        linear-gradient(145deg, rgba(250,255,246,0.38), rgba(255,255,255,0.08) 58%, rgba(20,34,39,0.16)),
        rgba(74, 88, 84, 0.58) !important;
    -webkit-backdrop-filter: blur(34px) saturate(138%) !important;
    backdrop-filter: blur(34px) saturate(138%) !important;
    box-shadow:
        0 24px 68px rgba(8, 18, 30, 0.28),
        inset 0 1px 0 rgba(255,255,255,0.48) !important;
    color: rgba(6, 27, 63, 0.99) !important;
}

html[data-theme="dark"] body .music-capsule-panel {
    border-color: rgba(224, 232, 245, 0.22) !important;
    background:
        linear-gradient(145deg, rgba(68,91,124,0.82), rgba(12,20,33,0.86) 65%),
        rgba(18, 27, 42, 0.9) !important;
    box-shadow:
        0 24px 68px rgba(0, 0, 0, 0.42),
        inset 0 1px 0 rgba(255,255,255,0.1) !important;
    color: rgba(249, 252, 255, 0.99) !important;
}

html[data-theme] body .music-capsule-panel .music-panel-head {
    display: flex !important;
    align-items: center !important;
    gap: 0.52rem !important;
    margin: 0 0 0.9rem !important;
    color: inherit !important;
}

html[data-theme] body .music-capsule-panel .music-panel-head .ui-icon {
    width: 1.18rem !important;
    height: 1.18rem !important;
    color: currentColor !important;
    opacity: 0.92 !important;
}

html[data-theme] body .music-capsule-panel .music-panel-head strong {
    color: inherit !important;
    font-size: 1.02rem !important;
    font-weight: 560 !important;
    letter-spacing: 0.01em;
}

html[data-theme] body .music-capsule-panel .music-search {
    grid-template-columns: minmax(0, 1fr) 3.18rem !important;
    align-items: center !important;
    gap: 0.62rem !important;
    margin: 0 !important;
}

html[data-theme] body .music-capsule-panel .music-search label {
    position: relative !important;
    display: block !important;
    min-width: 0 !important;
}

html[data-theme] body .music-capsule-panel .music-search label > span {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

html[data-theme] body .music-capsule-panel .music-search input {
    width: 100% !important;
    min-height: 3.18rem !important;
    padding: 0 1.12rem !important;
    border: 1px solid rgba(255,255,255,0.62) !important;
    border-radius: 999px !important;
    background: rgba(255,255,255,0.95) !important;
    color: #102b59 !important;
    font-size: 1.02rem !important;
    box-shadow:
        inset 0 1px 2px rgba(25, 40, 62, 0.08),
        0 4px 12px rgba(6, 15, 28, 0.08) !important;
}

html[data-theme] body .music-capsule-panel .music-search input::placeholder {
    color: rgba(22, 49, 91, 0.78) !important;
    opacity: 1 !important;
}

html[data-theme] body .music-capsule-panel .music-search-button {
    width: 3.18rem !important;
    height: 3.18rem !important;
    min-width: 3.18rem !important;
    border: 1px solid rgba(255,255,255,0.48) !important;
    border-radius: 50% !important;
    background: linear-gradient(145deg, rgba(63,94,145,0.96), rgba(34,59,102,0.92)) !important;
    color: #f8fbff !important;
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,0.26),
        0 7px 18px rgba(10, 22, 39, 0.22) !important;
}

html[data-theme] body .music-capsule-panel .music-search-button .ui-icon {
    width: 1.22rem !important;
    height: 1.22rem !important;
}

html[data-theme] body .music-capsule-panel .music-player-bar {
    align-items: center !important;
    gap: 0.72rem !important;
    margin: 1rem 0.08rem 0.12rem !important;
    padding: 0 !important;
}

html[data-theme] body .music-capsule-panel .music-progress {
    height: 0.24rem !important;
    background: rgba(255,255,255,0.28) !important;
    box-shadow: inset 0 1px 1px rgba(18, 30, 47, 0.1) !important;
}

html[data-theme] body .music-capsule-panel .music-progress-fill {
    background: linear-gradient(90deg, rgba(78,119,177,0.96), rgba(163,193,226,0.96)) !important;
    box-shadow: 0 0 7px rgba(82, 135, 197, 0.5) !important;
}

html[data-theme] body .music-capsule-panel .music-progress-fill::after {
    right: -0.58rem !important;
    width: 1.16rem !important;
    height: 1.16rem !important;
    border: 2px solid rgba(255,255,255,0.94) !important;
    box-shadow: 0 2px 8px rgba(4, 13, 26, 0.28) !important;
}

html[data-theme] body .music-capsule-panel .music-time {
    flex: 0 0 auto !important;
    min-width: 4.9rem !important;
    color: rgba(5, 28, 66, 0.98) !important;
    font-size: 0.78rem !important;
    font-variant-numeric: tabular-nums;
    opacity: 0.96;
    text-align: right;
    white-space: nowrap;
}

html[data-theme] body .music-capsule-panel .music-play-toggle {
    flex: 0 0 2.72rem !important;
    width: 2.72rem !important;
    height: 2.72rem !important;
    border: 1px solid rgba(255,255,255,0.48) !important;
    border-radius: 50% !important;
    background: rgba(255,255,255,0.3) !important;
    color: inherit !important;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.34) !important;
}

html[data-theme] body .music-capsule-panel .music-results {
    display: grid !important;
    gap: 0.14rem !important;
    max-height: min(42vh, 19rem) !important;
    margin-top: 0.92rem !important;
    padding: 0.08rem 0 0.14rem !important;
    overflow-y: auto !important;
    overscroll-behavior: contain;
    scrollbar-width: thin;
}

html[data-theme] body .music-capsule-panel .music-result {
    grid-template-columns: 3.35rem minmax(0, 1fr) 2.1rem !important;
    align-items: center !important;
    gap: 0.78rem !important;
    min-height: 3.76rem !important;
    padding: 0.4rem 0.28rem !important;
    border: 0 !important;
    border-bottom: 1px solid rgba(255,255,255,0.3) !important;
    border-radius: 14px !important;
    background: transparent !important;
    color: rgba(5, 28, 66, 0.98) !important;
    box-shadow: none !important;
}

html[data-theme] body .music-capsule-panel .music-result:last-child {
    border-bottom-color: transparent !important;
}

html[data-theme] body .music-capsule-panel .music-result:hover,
html[data-theme] body .music-capsule-panel .music-result:focus-visible {
    background: rgba(245,252,255,0.2) !important;
    outline: none !important;
}

html[data-theme] body .music-capsule-panel .music-result.is-current {
    background: rgba(245,252,255,0.23) !important;
    border-bottom-color: transparent !important;
}

html[data-theme] body .music-capsule-panel .music-result-art {
    width: 3.35rem !important;
    height: 3.35rem !important;
    border-radius: 10px !important;
    box-shadow: 0 5px 14px rgba(8, 19, 34, 0.2) !important;
}

html[data-theme] body .music-capsule-panel .music-result-copy {
    display: grid !important;
    align-content: center !important;
    min-width: 0 !important;
    gap: 0.12rem !important;
}

html[data-theme] body .music-capsule-panel .music-result-copy strong {
    color: rgba(5, 28, 66, 0.98) !important;
    font-size: 0.98rem !important;
    font-weight: 560 !important;
    line-height: 1.22 !important;
}

html[data-theme] body .music-capsule-panel .music-result-artist {
    color: rgba(9, 42, 92, 0.94) !important;
    font-size: 0.83rem !important;
    font-weight: 450 !important;
    line-height: 1.25 !important;
    opacity: 0.96;
}

html[data-theme] body .music-capsule-panel .music-result-album {
    color: rgba(18, 49, 91, 0.9) !important;
    font-size: 0.72rem !important;
    font-weight: 430 !important;
    line-height: 1.25 !important;
    opacity: 0.82;
}

html[data-theme] body .music-capsule-panel .music-result-action {
    width: 2.1rem !important;
    height: 2.1rem !important;
    color: rgba(6, 27, 63, 0.98) !important;
    opacity: 0;
}

html[data-theme] body .music-capsule-panel .music-result:hover .music-result-action,
html[data-theme] body .music-capsule-panel .music-result:focus-visible .music-result-action,
html[data-theme] body .music-capsule-panel .music-result.is-current .music-result-action {
    opacity: 1;
}

html[data-theme] body .music-capsule-panel .music-result.is-current .music-result-action {
    background: rgba(15, 40, 81, 0.92) !important;
    color: #fff !important;
}

html[data-theme] body .music-capsule-panel .music-empty,
html[data-theme] body .music-capsule-panel .music-note {
    color: inherit !important;
    opacity: 0.75;
}

html[data-theme] body .music-capsule-toggle {
    grid-template-columns: 3.1rem minmax(0, 1fr) 2.7rem !important;
    width: min(20.5rem, calc(100vw - 1.5rem)) !important;
    min-height: 3.8rem !important;
    padding: 0.48rem 0.5rem 0.48rem 0.55rem !important;
    gap: 0.7rem !important;
    border: 1px solid rgba(255,255,255,0.55) !important;
    background:
        linear-gradient(145deg, rgba(255,255,255,0.88), rgba(244,248,255,0.56)),
        rgba(214, 226, 241, 0.72) !important;
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,0.78),
        0 18px 44px rgba(10, 21, 38, 0.18) !important;
}

html[data-theme="dark"] body .music-capsule-toggle {
    border-color: rgba(224,232,245,0.2) !important;
    background:
        linear-gradient(145deg, rgba(61,80,111,0.9), rgba(18,27,42,0.88)),
        rgba(20, 30, 46, 0.92) !important;
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,0.1),
        0 18px 44px rgba(0,0,0,0.36) !important;
}

html[data-theme] body .music-capsule-toggle .music-capsule-art {
    flex: 0 0 3.1rem !important;
    width: 3.1rem !important;
    height: 3.1rem !important;
    border-radius: 10px !important;
}

html[data-theme] body .music-capsule-toggle .music-capsule-art .music-icon {
    width: 1.34rem !important;
    height: 1.34rem !important;
}

html[data-theme] body .music-capsule-toggle .music-capsule-copy strong {
    color: #102b59 !important;
    font-size: 0.98rem !important;
    font-weight: 560 !important;
}

html[data-theme] body .music-capsule-toggle .music-capsule-copy small {
    color: rgba(20, 54, 103, 0.86) !important;
    font-size: 0.78rem !important;
    font-weight: 450 !important;
}

html[data-theme] body .music-capsule-toggle .music-capsule-action {
    flex: 0 0 2.7rem !important;
    width: 2.7rem !important;
    height: 2.7rem !important;
}

html[data-theme] body .music-capsule-toggle .music-action-item[data-music-action-control] {
    background: rgba(255,255,255,0.28) !important;
    border: 1px solid rgba(255,255,255,0.46) !important;
    color: var(--qa-mat-ink) !important;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.34) !important;
}

@media (max-width: 640px) {
    html[data-theme] body .music-capsule {
        left: 0.75rem !important;
        right: 0.75rem !important;
        width: auto !important;
        max-width: none !important;
    }

    html[data-theme] body .music-capsule-toggle {
        width: 100% !important;
        max-width: none !important;
        min-width: 0 !important;
    }

    html[data-theme] body .music-capsule-panel {
        left: 0 !important;
        right: 0 !important;
        width: 100% !important;
        max-height: min(68svh, 34rem) !important;
        padding: 1rem 0.9rem 0.82rem !important;
    }

    html[data-theme] body .music-capsule-panel .music-results {
        max-height: min(36svh, 18rem) !important;
    }

    html[data-theme] body .music-capsule-panel .music-result {
        grid-template-columns: 3.2rem minmax(0, 1fr) 2.1rem !important;
        min-height: 3.62rem !important;
        padding: 0.36rem 0.24rem !important;
    }

    html[data-theme] body .music-capsule-panel .music-result-art {
        width: 3.2rem !important;
        height: 3.2rem !important;
    }
}

/* Dark glass needs its own ink tokens; keep the same layout while lifting
   every metadata line above the darker surface. */
html[data-theme="dark"] body .music-capsule-panel .music-time,
html[data-theme="dark"] body .music-capsule-panel .music-result,
html[data-theme="dark"] body .music-capsule-panel .music-result-copy strong,
html[data-theme="dark"] body .music-capsule-panel .music-result-action {
    color: rgba(248, 251, 255, 0.98) !important;
}

html[data-theme="dark"] body .music-capsule-panel .music-result-artist {
    color: rgba(236, 243, 253, 0.92) !important;
}

html[data-theme="dark"] body .music-capsule-panel .music-result-album {
    color: rgba(216, 229, 247, 0.84) !important;
}

html[data-theme="dark"] body .music-capsule-toggle .music-capsule-copy strong {
    color: rgba(248, 251, 255, 0.98) !important;
}

html[data-theme="dark"] body .music-capsule-toggle .music-capsule-copy small {
    color: rgba(220, 232, 248, 0.86) !important;
}

/* The theme's global glass contrast pass has a deliberately strong selector.
   Match it here so the playlist keeps the Apple-like navy ink in light mode
   and bright, saturated ink in dark mode without affecting the rest of the
   site. */
html[data-theme][data-theme] body .music-capsule-panel .music-panel-head strong,
html[data-theme][data-theme] body .music-capsule-panel .music-result-copy strong,
html[data-theme][data-theme] body .music-capsule-panel .music-time {
    color: rgba(5, 28, 66, 0.99) !important;
    font-weight: 560 !important;
}

html[data-theme][data-theme] body .music-capsule-panel .music-result-artist {
    color: rgba(9, 42, 92, 0.96) !important;
    font-weight: 450 !important;
}

html[data-theme][data-theme] body .music-capsule-panel .music-result-album {
    color: rgba(18, 49, 91, 0.9) !important;
    font-weight: 430 !important;
}

html[data-theme="dark"][data-theme] body .music-capsule-panel .music-panel-head strong,
html[data-theme="dark"][data-theme] body .music-capsule-panel .music-result-copy strong,
html[data-theme="dark"][data-theme] body .music-capsule-panel .music-time,
html[data-theme="dark"][data-theme] body .music-capsule-panel .music-result-action {
    color: rgba(248, 251, 255, 0.99) !important;
}

html[data-theme="dark"][data-theme] body .music-capsule-panel .music-result-artist {
    color: rgba(236, 243, 253, 0.94) !important;
}

html[data-theme="dark"][data-theme] body .music-capsule-panel .music-result-album {
    color: rgba(216, 229, 247, 0.86) !important;
}

html[data-theme][data-theme] body.home .music-capsule-toggle .music-capsule-copy strong {
    color: #102b59 !important;
}

html[data-theme][data-theme] body.home .music-capsule-toggle .music-capsule-copy small {
    color: rgba(20, 54, 103, 0.9) !important;
}

html[data-theme="dark"][data-theme] body.home .music-capsule-toggle .music-capsule-copy strong {
    color: rgba(248, 251, 255, 0.99) !important;
}

html[data-theme="dark"][data-theme] body.home .music-capsule-toggle .music-capsule-copy small {
    color: rgba(220, 232, 248, 0.9) !important;
}

/* Some shared glass rules target the toggle through :is() and can otherwise
   make the home-page pill transparent. Keep the playlist's current-track bar
   saturated and readable on both image and plain-content pages. */
html[data-theme][data-theme] body .music-capsule-toggle {
    background-image:
        linear-gradient(145deg, rgba(255,255,255,0.9), rgba(244,248,255,0.58)) !important;
    background-color: rgba(214, 226, 241, 0.76) !important;
    border-color: rgba(185, 204, 229, 0.74) !important;
}

html[data-theme="dark"][data-theme] body .music-capsule-toggle {
    background-image:
        linear-gradient(145deg, rgba(61,80,111,0.94), rgba(18,27,42,0.92)) !important;
    background-color: rgba(20, 30, 46, 0.94) !important;
    border-color: rgba(164, 186, 220, 0.3) !important;
}

/* Mobile empty state: keep the launcher as a small bottom-right circle.
   Opening the panel or selecting a track restores the full-width Apple-style
   panel/player through the rules above. */
@media (max-width: 640px) {
    html[data-theme][data-theme] body .music-capsule:not(.has-track):not(.is-open) {
        left: auto !important;
        right: max(0.75rem, env(safe-area-inset-right)) !important;
        width: 3.7rem !important;
        max-width: 3.7rem !important;
        align-items: flex-end !important;
    }

    html[data-theme][data-theme] body .music-capsule:not(.has-track):not(.is-open) .music-capsule-toggle {
        width: 3.7rem !important;
        min-width: 3.7rem !important;
        max-width: 3.7rem !important;
        min-height: 3.7rem !important;
        height: 3.7rem !important;
        padding: 0 !important;
        display: grid !important;
        grid-template-columns: 1fr !important;
        place-items: center !important;
        gap: 0 !important;
        border-radius: 50% !important;
    }

    html[data-theme][data-theme] body .music-capsule:not(.has-track):not(.is-open) .music-capsule-copy,
    html[data-theme][data-theme] body .music-capsule:not(.has-track):not(.is-open) .music-capsule-action {
        display: none !important;
    }

    html[data-theme][data-theme] body .music-capsule:not(.has-track):not(.is-open) .music-capsule-art {
        flex: 0 0 1.6rem !important;
        width: 1.6rem !important;
        height: 1.6rem !important;
        border-radius: 0 !important;
        background: transparent !important;
        box-shadow: none !important;
    }

    html[data-theme][data-theme] body .music-capsule:not(.has-track):not(.is-open) .music-capsule-art .music-icon {
        width: 1.45rem !important;
        height: 1.45rem !important;
        color: #15376b !important;
    }

    html[data-theme="dark"][data-theme] body .music-capsule:not(.has-track):not(.is-open) .music-capsule-art .music-icon {
        color: rgba(242,248,255,.96) !important;
    }
}

/* Apple Music palette and row interaction: neutral system glass, Apple red
   for the active state, and a fully clickable row without a trailing play
   button. Audio and search behavior remain unchanged. */
html[data-theme][data-theme] body .music-capsule-panel {
    border-color: rgba(255,255,255,0.46) !important;
    background:
        linear-gradient(145deg, rgba(255,255,255,0.24), rgba(242,242,247,0.1) 62%, rgba(229,229,234,0.06)),
        rgba(210,216,216,0.28) !important;
    -webkit-backdrop-filter: blur(30px) saturate(150%) !important;
    backdrop-filter: blur(30px) saturate(150%) !important;
    color: #1d1d1f !important;
}

html[data-theme][data-theme] body .music-capsule-panel .music-panel-head,
html[data-theme][data-theme] body .music-capsule-panel .music-panel-head strong,
html[data-theme][data-theme] body .music-capsule-panel .music-time {
    color: #1d1d1f !important;
}

html[data-theme][data-theme] body .music-capsule-panel .music-search input {
    color: #1d1d1f !important;
    caret-color: #fa2d48 !important;
    border-color: rgba(60,60,67,0.12) !important;
    background: rgba(255,255,255,0.94) !important;
}

html[data-theme][data-theme] body .music-capsule-panel .music-search input::placeholder {
    color: rgba(60,60,67,0.72) !important;
}

html[data-theme][data-theme] body .music-capsule-panel .music-search-button {
    border-color: rgba(255,255,255,0.5) !important;
    background: linear-gradient(145deg, rgba(63,94,145,0.86), rgba(34,59,102,0.78)) !important;
    color: #fff !important;
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,0.28),
        0 7px 18px rgba(10,22,39,0.18) !important;
}

html[data-theme][data-theme] body .music-capsule-panel .music-progress-fill {
    background: linear-gradient(90deg, rgba(78,119,177,0.94), rgba(163,193,226,0.92)) !important;
    box-shadow: 0 0 7px rgba(82,135,197,0.36) !important;
}

html[data-theme][data-theme] body .music-capsule-panel .music-play-toggle {
    background: rgba(255,255,255,0.34) !important;
    color: #173762 !important;
}

html[data-theme][data-theme] body .music-capsule-panel .music-result,
html[data-theme][data-theme] body .music-capsule-panel .music-result:hover,
html[data-theme][data-theme] body .music-capsule-panel .music-result:focus-visible,
html[data-theme][data-theme] body .music-capsule-panel .music-result.is-current {
    grid-template-columns: 3.35rem minmax(0, 1fr) !important;
}

html[data-theme][data-theme] body .music-capsule-panel .music-result {
    color: #1d1d1f !important;
    transition:
        background-color 180ms ease,
        box-shadow 180ms ease,
        transform 160ms cubic-bezier(.2,.75,.25,1) !important;
}

html[data-theme][data-theme] body .music-capsule-panel .music-result:hover,
html[data-theme][data-theme] body .music-capsule-panel .music-result:focus-visible {
    background: rgba(255,255,255,0.38) !important;
}

html[data-theme][data-theme] body .music-capsule-panel .music-result:active {
    transform: scale(0.985) !important;
}

html[data-theme][data-theme] body .music-capsule-panel .music-result.is-current {
    background: rgba(255,255,255,0.14) !important;
    box-shadow:
        inset 0 0 0 1px rgba(255,255,255,0.24),
        0 5px 16px rgba(28,28,30,0.05) !important;
    animation: qa-music-row-selected 260ms cubic-bezier(.2,.75,.25,1) both;
}

html[data-theme][data-theme] body .music-capsule-panel .music-result-copy strong {
    color: #1d1d1f !important;
}

html[data-theme][data-theme] body .music-capsule-panel .music-result.is-current .music-result-copy strong {
    color: #1d1d1f !important;
}

html[data-theme][data-theme] body .music-capsule-panel .music-result-artist {
    color: rgba(60,60,67,0.9) !important;
}

html[data-theme][data-theme] body .music-capsule-panel .music-result-album {
    color: rgba(60,60,67,0.7) !important;
}

html[data-theme][data-theme] body .music-capsule-panel .music-result-action {
    display: none !important;
}

html[data-theme][data-theme] body .music-capsule-panel .music-results:has(.music-result)::after {
    content: "Apple Music";
    display: block;
    padding: 0.68rem 0.18rem 0.04rem;
    color: rgba(60,60,67,0.66);
    font-size: 0.76rem;
    font-weight: 430;
    line-height: 1.2;
}

html[data-theme][data-theme] body .music-capsule-toggle .music-action-item[data-music-action-control] {
    background: rgba(255,255,255,0.34) !important;
    border-color: rgba(255,255,255,0.48) !important;
    color: #173762 !important;
}

html[data-theme][data-theme] body .music-capsule-toggle .music-action-item[data-music-action-control] .ui-icon {
    color: #173762 !important;
    stroke: currentColor !important;
}

html[data-theme="dark"][data-theme] body .music-capsule-panel {
    border-color: rgba(255,255,255,0.16) !important;
    background:
        linear-gradient(145deg, rgba(58,58,60,0.42), rgba(28,28,30,0.52) 68%),
        rgba(28,28,30,0.46) !important;
    color: rgba(255,255,255,0.96) !important;
}

html[data-theme="dark"][data-theme] body .music-capsule-panel .music-results:has(.music-result)::after {
    color: rgba(235,235,245,0.64);
}

html[data-theme="dark"][data-theme] body .music-capsule-panel .music-panel-head,
html[data-theme="dark"][data-theme] body .music-capsule-panel .music-panel-head strong,
html[data-theme="dark"][data-theme] body .music-capsule-panel .music-time,
html[data-theme="dark"][data-theme] body .music-capsule-panel .music-result-copy strong {
    color: rgba(255,255,255,0.96) !important;
}

html[data-theme="dark"][data-theme] body .music-capsule-panel .music-result-artist {
    color: rgba(235,235,245,0.78) !important;
}

html[data-theme="dark"][data-theme] body .music-capsule-panel .music-result-album {
    color: rgba(235,235,245,0.6) !important;
}

html[data-theme="dark"][data-theme] body .music-capsule-panel .music-result:hover,
html[data-theme="dark"][data-theme] body .music-capsule-panel .music-result:focus-visible {
    background: rgba(255,255,255,0.08) !important;
}

html[data-theme="dark"][data-theme] body .music-capsule-panel .music-result.is-current {
    background: rgba(255,255,255,0.12) !important;
    box-shadow: inset 0 0 0 1px rgba(255,255,255,0.08) !important;
}

html[data-theme="dark"][data-theme] body .music-capsule-panel .music-result.is-current .music-result-copy strong {
    color: rgba(255,255,255,0.96) !important;
}

html[data-theme="dark"][data-theme] body .music-capsule-panel .music-play-toggle,
html[data-theme="dark"][data-theme] body .music-capsule-toggle .music-action-item[data-music-action-control],
html[data-theme="dark"][data-theme] body .music-capsule-toggle .music-action-item[data-music-action-control] .ui-icon {
    color: rgba(242,248,255,0.96) !important;
}

@keyframes qa-music-row-selected {
    0% { transform: scale(0.982); }
    100% { transform: scale(1); }
}

@media (prefers-reduced-motion: reduce) {
    html[data-theme][data-theme] body .music-capsule-panel .music-result.is-current {
        animation: none !important;
    }
}

/* Reference lock — reproduces the supplied frosted playlist composition.
   Existing icons and all player behavior stay unchanged. */
html[data-theme][data-theme] body .music-capsule-panel {
    padding: 1.05rem 1rem 0.9rem !important;
    border: 1px solid rgba(255,255,255,0.42) !important;
    border-radius: 28px !important;
    background:
        linear-gradient(155deg, rgba(255,255,255,0.24), rgba(244,248,245,0.08) 46%, rgba(190,207,178,0.04)),
        rgba(206,214,207,0.14) !important;
    -webkit-backdrop-filter: blur(18px) saturate(128%) !important;
    backdrop-filter: blur(18px) saturate(128%) !important;
    box-shadow:
        0 22px 58px rgba(8,18,30,0.22),
        inset 0 1px 0 rgba(255,255,255,0.52) !important;
}

html[data-theme][data-theme] body .music-capsule-panel .music-search-button {
    background: linear-gradient(145deg, rgba(63,94,145,0.74), rgba(34,59,102,0.64)) !important;
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,0.24),
        0 6px 16px rgba(10,22,39,0.16) !important;
}

html[data-theme][data-theme] body .music-capsule-panel .music-results {
    gap: 0 !important;
    margin-top: 0.86rem !important;
    padding: 0.04rem 0 0.12rem !important;
}

html[data-theme][data-theme] body .music-capsule-panel .music-result,
html[data-theme][data-theme] body .music-capsule-panel .music-result:hover,
html[data-theme][data-theme] body .music-capsule-panel .music-result:focus-visible,
html[data-theme][data-theme] body .music-capsule-panel .music-result.is-current {
    grid-template-columns: 2.75rem minmax(0, 1fr) !important;
}

html[data-theme][data-theme] body .music-capsule-panel .music-result {
    gap: 0.72rem !important;
    min-height: 3.35rem !important;
    padding: 0.3rem 0.36rem !important;
    border: 0 !important;
    border-radius: 10px !important;
    background: transparent !important;
    box-shadow: none !important;
}

html[data-theme][data-theme] body .music-capsule-panel .music-result:hover,
html[data-theme][data-theme] body .music-capsule-panel .music-result:focus-visible {
    background: rgba(255,255,255,0.16) !important;
}

html[data-theme][data-theme] body .music-capsule-panel .music-result.is-current {
    background: transparent !important;
    box-shadow: none !important;
}

html[data-theme][data-theme] body .music-capsule-panel .music-result-art {
    width: 2.75rem !important;
    height: 2.75rem !important;
    border-radius: 9px !important;
    box-shadow: 0 4px 12px rgba(8,19,34,0.16) !important;
}

html[data-theme][data-theme] body .music-capsule-panel .music-result-copy {
    display: flex !important;
    flex-wrap: wrap !important;
    align-content: center !important;
    gap: 0.04rem 0.35rem !important;
}

html[data-theme][data-theme] body .music-capsule-panel .music-result-copy strong {
    flex: 0 0 100% !important;
    font-size: 0.92rem !important;
    line-height: 1.2 !important;
}

html[data-theme][data-theme] body .music-capsule-panel .music-result-artist,
html[data-theme][data-theme] body .music-capsule-panel .music-result-album {
    flex: 0 1 auto !important;
    max-width: 100% !important;
    font-size: 0.74rem !important;
    line-height: 1.22 !important;
}

html[data-theme][data-theme] body .music-capsule-panel .music-result-album:not(:empty)::before {
    content: "· ";
}

html[data-theme][data-theme] body .music-capsule-panel .music-result-action {
    display: none !important;
}

html[data-theme][data-theme] body .music-capsule-toggle {
    grid-template-columns: 2.9rem minmax(0, 1fr) 2.55rem !important;
    min-height: 3.55rem !important;
    padding: 0.38rem 0.44rem 0.38rem 0.5rem !important;
    background-image:
        linear-gradient(145deg, rgba(255,255,255,0.72), rgba(244,248,255,0.36)) !important;
    background-color: rgba(226,232,238,0.44) !important;
    -webkit-backdrop-filter: blur(22px) saturate(145%) !important;
    backdrop-filter: blur(22px) saturate(145%) !important;
}

html[data-theme][data-theme] body .music-capsule-toggle .music-capsule-art {
    flex: 0 0 2.9rem !important;
    width: 2.9rem !important;
    height: 2.9rem !important;
}

html[data-theme][data-theme] body .music-capsule-toggle .music-capsule-action {
    flex: 0 0 2.55rem !important;
    width: 2.55rem !important;
    height: 2.55rem !important;
}

@media (min-width: 641px) {
    html[data-theme][data-theme] body .music-capsule {
        width: auto !important;
        max-width: calc(100vw - 36px) !important;
    }

    html[data-theme][data-theme] body .music-capsule-toggle {
        display: flex !important;
        align-items: center !important;
        width: min(248px, calc(100vw - 36px)) !important;
        min-height: 58px !important;
        padding: 7px 10px 7px 8px !important;
        gap: 10px !important;
        border-radius: 29px !important;
    }

    html[data-theme][data-theme] body .music-capsule-toggle .music-capsule-art {
        flex: 0 0 44px !important;
        width: 44px !important;
        height: 44px !important;
    }

    html[data-theme][data-theme] body .music-capsule-toggle .music-capsule-action {
        flex: 0 0 26px !important;
        width: 26px !important;
        height: 26px !important;
    }
}

html[data-theme="dark"][data-theme] body .music-capsule-panel {
    border-color: rgba(255,255,255,0.14) !important;
    background:
        linear-gradient(155deg, rgba(78,82,84,0.22), rgba(28,30,31,0.28) 68%),
        rgba(28,30,31,0.22) !important;
}

html[data-theme="dark"][data-theme] body .music-capsule-toggle {
    background-image:
        linear-gradient(145deg, rgba(61,80,111,0.66), rgba(18,27,42,0.6)) !important;
    background-color: rgba(20,30,46,0.6) !important;
}

/* Keep every music control on the same liquid-glass material as the
   reference pause button.  The shared theme tokens preserve the light/dark
   hue while normalising opacity, edge, blur, and depth; page controls outside
   the music capsule are intentionally untouched. */
html[data-theme][data-theme] body .music-capsule-panel .music-search-button,
html[data-theme][data-theme] body .music-capsule-panel .music-play-toggle,
html[data-theme][data-theme] body .music-capsule-toggle .music-action-item[data-music-action-control] {
    background-image: var(--qa-mat-bg) !important;
    background-color: transparent !important;
    border-color: var(--qa-mat-border) !important;
    box-shadow: var(--qa-mat-shadow) !important;
    -webkit-backdrop-filter: var(--qa-mat-blur) !important;
    backdrop-filter: var(--qa-mat-blur) !important;
    color: var(--qa-mat-ink) !important;
}

html[data-theme][data-theme] body .music-capsule-toggle .music-action-item[data-music-action-control] .ui-icon {
    color: var(--qa-mat-ink) !important;
}

@media (max-width: 640px) {
    html[data-theme][data-theme] body .music-capsule-panel .music-result,
    html[data-theme][data-theme] body .music-capsule-panel .music-result:hover,
    html[data-theme][data-theme] body .music-capsule-panel .music-result:focus-visible,
    html[data-theme][data-theme] body .music-capsule-panel .music-result.is-current {
        grid-template-columns: 2.75rem minmax(0, 1fr) !important;
        min-height: 3.35rem !important;
        padding: 0.3rem 0.36rem !important;
    }

    html[data-theme][data-theme] body .music-capsule-panel .music-result-art {
        width: 2.75rem !important;
        height: 2.75rem !important;
    }
}

/* The collapsed player keeps the reference liquid-glass material at rest.
   This is deliberately scoped to the music capsule so the rest of the site
   keeps its existing interaction styling; hovering only remains an optional
   interaction and is no longer required to reveal the intended appearance. */
html[data-theme][data-theme] body .music-capsule-toggle,
html[data-theme][data-theme] body .music-capsule-toggle:hover,
html[data-theme][data-theme] body .music-capsule-toggle:focus-visible {
    background-image: var(--qa-mat-bg) !important;
    background-color: transparent !important;
    border-color: var(--qa-mat-border) !important;
    box-shadow: var(--qa-mat-shadow) !important;
    -webkit-backdrop-filter: var(--qa-mat-blur) !important;
    backdrop-filter: var(--qa-mat-blur) !important;
    transform: none !important;
}

/* High-contrast music typography.  The moving hero and frosted sheet can
   shift the perceived value of text from frame to frame, so keep the music
   layer on saturated blue ink (light theme) or a clean near-white (dark
   theme), with a restrained edge shadow for legibility. */
html[data-theme][data-theme] body .music-capsule-panel {
    --qa-music-primary: #0b2f63;
    --qa-music-secondary: #2b537f;
    --qa-music-faint: #4b6681;
    --qa-music-edge: 0 1px 1px rgba(255,255,255,0.68), 0 0 1px rgba(255,255,255,0.34);
}

html[data-theme="dark"][data-theme] body .music-capsule-panel {
    --qa-music-primary: #f4f8ff;
    --qa-music-secondary: #d7e6f7;
    --qa-music-faint: #b9cde2;
    --qa-music-edge: 0 1px 2px rgba(0,0,0,0.56), 0 0 1px rgba(0,0,0,0.42);
}

html[data-theme][data-theme] body .music-capsule-panel :is(.music-panel-head, .music-panel-head strong, .music-panel-head .ui-icon, .music-result-copy strong, .music-time) {
    color: var(--qa-music-primary) !important;
    opacity: 1 !important;
    font-weight: 560 !important;
    text-shadow: var(--qa-music-edge) !important;
}

html[data-theme][data-theme] body .music-capsule-panel :is(.music-result-artist, .music-result-album, .music-note, .music-empty) {
    color: var(--qa-music-secondary) !important;
    opacity: 1 !important;
    font-weight: 500 !important;
    text-shadow: var(--qa-music-edge) !important;
}

html[data-theme][data-theme] body .music-capsule-panel .music-results:has(.music-result)::after {
    color: var(--qa-music-faint) !important;
    opacity: 1 !important;
    font-weight: 500 !important;
    text-shadow: var(--qa-music-edge) !important;
}

html[data-theme][data-theme] body .music-capsule-panel .music-search input {
    color: var(--qa-music-primary) !important;
    caret-color: #174f91 !important;
    font-weight: 500 !important;
    text-shadow: none !important;
}

html[data-theme][data-theme] body .music-capsule-panel .music-search input::placeholder {
    color: var(--qa-music-faint) !important;
    opacity: 1 !important;
}

html[data-theme="dark"][data-theme] body .music-capsule-panel .music-search input {
    caret-color: #b9d8ff !important;
}

html[data-theme][data-theme] body .music-capsule-toggle .music-capsule-copy strong {
    color: #0b2f63 !important;
    opacity: 1 !important;
    font-weight: 560 !important;
    text-shadow: 0 1px 1px rgba(255,255,255,0.7), 0 0 2px rgba(255,255,255,0.34) !important;
}

html[data-theme][data-theme] body .music-capsule-toggle .music-capsule-copy small {
    color: #2b537f !important;
    opacity: 1 !important;
    font-weight: 500 !important;
    text-shadow: 0 1px 1px rgba(255,255,255,0.7), 0 0 2px rgba(255,255,255,0.34) !important;
}

html[data-theme][data-theme] body .music-capsule-toggle .music-capsule-action .ui-icon {
    color: #123b70 !important;
    text-shadow: 0 1px 1px rgba(255,255,255,0.72) !important;
}

/* Desktop home capsules float over the film hero rather than the pale dock;
   use a bright, saturated reading layer there so dark frames never swallow
   the track title or artist. */
@media (min-width: 761px) {
    html[data-theme][data-theme] body.home .music-capsule-toggle .music-capsule-copy strong {
        color: #0b2f63 !important;
        text-shadow: 0 0 1px rgba(255,255,255,0.92), 0 1px 2px rgba(2,8,16,0.78) !important;
        -webkit-text-stroke: 0.16px rgba(255,255,255,0.56);
    }

    html[data-theme][data-theme] body.home .music-capsule-toggle .music-capsule-copy small {
        color: #2b537f !important;
        text-shadow: 0 0 1px rgba(255,255,255,0.92), 0 1px 2px rgba(2,8,16,0.72) !important;
        -webkit-text-stroke: 0.12px rgba(255,255,255,0.5);
    }

    html[data-theme][data-theme] body.home .music-capsule-toggle .music-capsule-action .ui-icon {
        color: #123b70 !important;
        text-shadow: 0 0 1px rgba(255,255,255,0.92), 0 1px 2px rgba(2,8,16,0.78) !important;
    }
}

html[data-theme="dark"][data-theme] body .music-capsule-panel :is(.music-panel-head, .music-panel-head strong, .music-panel-head .ui-icon, .music-result-copy strong, .music-time),
html[data-theme="dark"][data-theme] body .music-capsule-toggle .music-capsule-copy strong {
    color: #f4f8ff !important;
    text-shadow: 0 1px 2px rgba(0,0,0,0.56), 0 0 1px rgba(0,0,0,0.42) !important;
}

html[data-theme="dark"][data-theme] body .music-capsule-panel :is(.music-result-artist, .music-result-album, .music-note, .music-empty),
html[data-theme="dark"][data-theme] body .music-capsule-toggle .music-capsule-copy small {
    color: #d7e6f7 !important;
    text-shadow: 0 1px 2px rgba(0,0,0,0.52) !important;
}

html[data-theme="dark"][data-theme] body .music-capsule-panel .music-results:has(.music-result)::after {
    color: #b9cde2 !important;
    text-shadow: 0 1px 2px rgba(0,0,0,0.52) !important;
}

html[data-theme="dark"][data-theme] body .music-capsule-toggle .music-capsule-action .ui-icon {
    color: #f4f8ff !important;
    text-shadow: 0 1px 2px rgba(0,0,0,0.56) !important;
}

/* On phones the capsule sits over the pale bottom dock, so return the
   collapsed copy to saturated navy while retaining the same edge treatment. */
@media (max-width: 760px) {
    html[data-theme][data-theme] body.home .music-capsule-toggle .music-capsule-copy strong {
        color: #0b2f63 !important;
        text-shadow: 0 1px 1px rgba(255,255,255,0.72), 0 0 2px rgba(255,255,255,0.38) !important;
    }

    html[data-theme][data-theme] body.home .music-capsule-toggle .music-capsule-copy small {
        color: #2b537f !important;
        text-shadow: 0 1px 1px rgba(255,255,255,0.72), 0 0 2px rgba(255,255,255,0.38) !important;
    }

    html[data-theme][data-theme] body.home .music-capsule-toggle .music-capsule-action .ui-icon {
        color: #123b70 !important;
        text-shadow: 0 1px 1px rgba(255,255,255,0.72) !important;
    }
}

/* Match the language pill to the neighbouring sun control's glass material.
   The pill keeps its wider text-friendly shape, but uses the same depth,
   transparency, edge, and blur so the two header controls read as one set. */
html[data-theme="light"][data-theme][data-theme] body .site-header .lang-toggle:not([data-adaptive-disabled]),
html[data-theme="light"][data-theme][data-theme] body .site-header .lang-toggle:not([data-adaptive-disabled]):hover,
html[data-theme="light"][data-theme][data-theme] body .site-header .lang-toggle:not([data-adaptive-disabled]):focus-visible {
    background-color: transparent !important;
    background-image: linear-gradient(145deg, rgba(255,255,255,0.24), rgba(229,239,248,0.1) 48%, rgba(161,184,205,0.14)) !important;
    border-color: rgba(255,255,255,0.36) !important;
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,0.34),
        inset 0 -8px 15px rgba(38,57,79,0.07),
        0 8px 20px rgba(19,32,49,0.12) !important;
    -webkit-backdrop-filter: blur(20px) saturate(138%) brightness(1.04) !important;
    backdrop-filter: blur(20px) saturate(138%) brightness(1.04) !important;
}

html[data-theme="light"][data-theme][data-theme] body .site-header .lang-toggle:not([data-adaptive-disabled]) > span[data-lang-current],
html[data-theme="light"][data-theme][data-theme] body .site-header .lang-toggle:not([data-adaptive-disabled]) .lang-toggle-icon,
html[data-theme="light"][data-theme][data-theme] body .site-header .lang-toggle:not([data-adaptive-disabled]) .lang-caret {
    color: #1b2638 !important;
    -webkit-text-fill-color: #1b2638 !important;
    mix-blend-mode: normal !important;
    text-shadow: 0 1px 1px rgba(255,255,255,0.58) !important;
}

html[data-theme="dark"][data-theme] body .site-header .lang-toggle,
html[data-theme="dark"][data-theme] body .site-header .lang-toggle:hover,
html[data-theme="dark"][data-theme] body .site-header .lang-toggle:focus-visible {
    background-color: transparent !important;
    background-image: linear-gradient(145deg, rgba(90,110,134,0.28), rgba(40,54,72,0.14) 48%, rgba(8,16,26,0.26)) !important;
    border-color: rgba(151,176,204,0.24) !important;
    box-shadow:
        inset 0 1px 0 rgba(151,176,204,0.16),
        inset 0 -9px 16px rgba(1,6,13,0.12),
        0 6px 16px rgba(3,8,15,0.14) !important;
    -webkit-backdrop-filter: blur(24px) saturate(160%) brightness(0.85) !important;
    backdrop-filter: blur(24px) saturate(160%) brightness(0.85) !important;
}

html[data-theme="dark"][data-theme] body .site-header .lang-toggle > span[data-lang-current],
html[data-theme="dark"][data-theme] body .site-header .lang-toggle .lang-toggle-icon,
html[data-theme="dark"][data-theme] body .site-header .lang-toggle .lang-caret {
    color: #eef2f8 !important;
    -webkit-text-fill-color: #eef2f8 !important;
    mix-blend-mode: normal !important;
    text-shadow: 0 1px 2px rgba(0,0,0,0.5) !important;
}

/* The floating menu/dock button uses that exact same material as the sun and
   language controls; only its circular geometry remains distinct. */
html[data-theme="light"][data-theme] body .site-dock > .site-dock-toggle,
html[data-theme="light"][data-theme] body .site-dock > .site-dock-toggle:hover,
html[data-theme="light"][data-theme] body .site-dock > .site-dock-toggle:focus-visible {
    background-color: transparent !important;
    background-image: linear-gradient(145deg, rgba(255,255,255,0.24), rgba(229,239,248,0.1) 48%, rgba(161,184,205,0.14)) !important;
    border-color: rgba(255,255,255,0.36) !important;
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,0.34),
        inset 0 -8px 15px rgba(38,57,79,0.07),
        0 8px 20px rgba(19,32,49,0.12) !important;
    -webkit-backdrop-filter: blur(20px) saturate(138%) brightness(1.04) !important;
    backdrop-filter: blur(20px) saturate(138%) brightness(1.04) !important;
}

html[data-theme="light"][data-theme] body .site-dock > .site-dock-toggle .site-dock-toggle-icon,
html[data-theme="light"][data-theme] body .site-dock > .site-dock-toggle .ui-icon {
    color: #1b2638 !important;
    -webkit-text-fill-color: #1b2638 !important;
    mix-blend-mode: normal !important;
    filter: none !important;
    text-shadow: 0 1px 1px rgba(255,255,255,0.58) !important;
}

html[data-theme="dark"][data-theme] body .site-dock > .site-dock-toggle,
html[data-theme="dark"][data-theme] body .site-dock > .site-dock-toggle:hover,
html[data-theme="dark"][data-theme] body .site-dock > .site-dock-toggle:focus-visible {
    background-color: transparent !important;
    background-image: linear-gradient(145deg, rgba(90,110,134,0.28), rgba(40,54,72,0.14) 48%, rgba(8,16,26,0.26)) !important;
    border-color: rgba(151,176,204,0.24) !important;
    box-shadow:
        inset 0 1px 0 rgba(151,176,204,0.16),
        inset 0 -9px 16px rgba(1,6,13,0.12),
        0 6px 16px rgba(3,8,15,0.14) !important;
    -webkit-backdrop-filter: blur(24px) saturate(160%) brightness(0.85) !important;
    backdrop-filter: blur(24px) saturate(160%) brightness(0.85) !important;
}

html[data-theme="dark"][data-theme] body .site-dock > .site-dock-toggle .site-dock-toggle-icon,
html[data-theme="dark"][data-theme] body .site-dock > .site-dock-toggle .ui-icon {
    color: #eef2f8 !important;
    -webkit-text-fill-color: #eef2f8 !important;
    mix-blend-mode: normal !important;
    filter: none !important;
    text-shadow: 0 1px 2px rgba(0,0,0,0.5) !important;
}

/* Player copy only: a neutral black/white reading layer removes the former
   blue outline while leaving the capsule surface, controls, and layout intact. */
html[data-theme][data-theme] body .music-capsule-toggle .music-capsule-copy strong {
    color: #0b0d12 !important;
    -webkit-text-fill-color: #0b0d12 !important;
    -webkit-text-stroke: 0 !important;
    font-weight: 560 !important;
    text-shadow: 0 1px 1px rgba(255,255,255,0.72) !important;
}

html[data-theme][data-theme] body .music-capsule-toggle .music-capsule-copy small {
    color: #353b45 !important;
    -webkit-text-fill-color: #353b45 !important;
    -webkit-text-stroke: 0 !important;
    font-weight: 500 !important;
    text-shadow: 0 1px 1px rgba(255,255,255,0.72) !important;
}

html[data-theme][data-theme] body .music-capsule-panel :is(.music-panel-head, .music-panel-head strong, .music-panel-head .ui-icon, .music-result-copy strong, .music-time) {
    color: #0b0d12 !important;
    -webkit-text-fill-color: #0b0d12 !important;
    font-weight: 560 !important;
    text-shadow: 0 1px 1px rgba(255,255,255,0.7) !important;
}

html[data-theme][data-theme] body .music-capsule-panel :is(.music-result-artist, .music-result-album, .music-note, .music-empty) {
    color: #353b45 !important;
    -webkit-text-fill-color: #353b45 !important;
    font-weight: 500 !important;
    text-shadow: 0 1px 1px rgba(255,255,255,0.7) !important;
}

html[data-theme][data-theme] body .music-capsule-panel .music-results:has(.music-result)::after {
    color: #59616c !important;
    -webkit-text-fill-color: #59616c !important;
    font-weight: 500 !important;
    text-shadow: 0 1px 1px rgba(255,255,255,0.7) !important;
}

html[data-theme][data-theme] body .music-capsule-panel .music-search input {
    color: #0b0d12 !important;
    -webkit-text-fill-color: #0b0d12 !important;
}

html[data-theme][data-theme] body .music-capsule-panel .music-search input::placeholder {
    color: #59616c !important;
    opacity: 1 !important;
}

/* The desktop home capsule overlays the moving film.  Keep its text white
   with a dark edge; phones place the capsule on the pale dock and use the
   black treatment above instead. */
@media (min-width: 761px) {
    html[data-theme][data-theme] body.home .music-capsule-toggle .music-capsule-copy strong {
        color: #f7f8fa !important;
        -webkit-text-fill-color: #f7f8fa !important;
        text-shadow: 0 1px 2px rgba(0,0,0,0.78), 0 0 2px rgba(0,0,0,0.42) !important;
    }

    html[data-theme][data-theme] body.home .music-capsule-toggle .music-capsule-copy small {
        color: #dfe4eb !important;
        -webkit-text-fill-color: #dfe4eb !important;
        text-shadow: 0 1px 2px rgba(0,0,0,0.74), 0 0 2px rgba(0,0,0,0.38) !important;
    }
}

html[data-theme="dark"][data-theme] body .music-capsule-panel :is(.music-panel-head, .music-panel-head strong, .music-panel-head .ui-icon, .music-result-copy strong, .music-time),
html[data-theme="dark"][data-theme] body .music-capsule-toggle .music-capsule-copy strong {
    color: #f7f8fa !important;
    -webkit-text-fill-color: #f7f8fa !important;
    text-shadow: 0 1px 2px rgba(0,0,0,0.58) !important;
}

html[data-theme="dark"][data-theme] body .music-capsule-panel :is(.music-result-artist, .music-result-album, .music-note, .music-empty),
html[data-theme="dark"][data-theme] body .music-capsule-toggle .music-capsule-copy small {
    color: #dfe4eb !important;
    -webkit-text-fill-color: #dfe4eb !important;
    text-shadow: 0 1px 2px rgba(0,0,0,0.54) !important;
}

html[data-theme="dark"][data-theme] body .music-capsule-panel .music-results:has(.music-result)::after {
    color: #bbc4cf !important;
    -webkit-text-fill-color: #bbc4cf !important;
    text-shadow: 0 1px 2px rgba(0,0,0,0.54) !important;
}

html[data-theme="dark"][data-theme] body .music-capsule-panel .music-search input {
    color: #f7f8fa !important;
    -webkit-text-fill-color: #f7f8fa !important;
}

html[data-theme="dark"][data-theme] body .music-capsule-panel .music-search input::placeholder {
    color: #bbc4cf !important;
}

/* Home-film header copy follows the changing frame for contrast.  The glass
   shell remains untouched; difference blending is limited to the language
   label/icon/caret so the text stays readable on both bright sky and dark
   footage. */
html[data-theme][data-theme] body.home .site-header .lang-toggle > span[data-lang-current],
html[data-theme][data-theme] body.home .site-header .lang-toggle .lang-toggle-icon,
html[data-theme][data-theme] body.home .site-header .lang-toggle .lang-caret {
    color: rgba(255,255,255,0.96) !important;
    -webkit-text-fill-color: rgba(255,255,255,0.96) !important;
    mix-blend-mode: difference !important;
    text-shadow: 0 1px 2px rgba(0,0,0,0.42) !important;
}

/* Match the final adaptive-header selector weight so the home-film contrast
   layer wins over the older static language color rule. */
html[data-theme][data-theme][data-theme] body.home .site-header .lang-toggle:not([data-adaptive-disabled]) > span[data-lang-current],
html[data-theme][data-theme][data-theme] body.home .site-header .lang-toggle:not([data-adaptive-disabled]) .lang-toggle-icon,
html[data-theme][data-theme][data-theme] body.home .site-header .lang-toggle:not([data-adaptive-disabled]) .lang-caret {
    color: rgba(255,255,255,0.96) !important;
    -webkit-text-fill-color: rgba(255,255,255,0.96) !important;
    mix-blend-mode: difference !important;
    text-shadow: 0 1px 2px rgba(0,0,0,0.42) !important;
}

/* Apply the same adaptive reading treatment to the floating menu glyph on
   the home film.  Its circular glass shell and geometry stay unchanged. */
html[data-theme][data-theme][data-theme] body.home .site-dock > .site-dock-toggle .site-dock-toggle-icon,
html[data-theme][data-theme][data-theme] body.home .site-dock > .site-dock-toggle .ui-icon {
    color: rgba(255,255,255,0.96) !important;
    -webkit-text-fill-color: rgba(255,255,255,0.96) !important;
    mix-blend-mode: difference !important;
    filter: none !important;
    text-shadow: 0 1px 2px rgba(0,0,0,0.42) !important;
}

/* Final neutral copy lock: keep the player text black/white only, with no
   blue outline or colored fill.  The extra selector weight wins the older
   page-specific music rules without touching the capsule surface. */
html[data-theme][data-theme][data-theme] body .music-capsule-toggle .music-capsule-copy strong {
    color: #0b0d12 !important;
    -webkit-text-fill-color: #0b0d12 !important;
    -webkit-text-stroke: 0 !important;
    text-shadow: 0 1px 1px rgba(255,255,255,0.72) !important;
}

html[data-theme][data-theme][data-theme] body .music-capsule-toggle .music-capsule-copy small {
    color: #353b45 !important;
    -webkit-text-fill-color: #353b45 !important;
    -webkit-text-stroke: 0 !important;
    text-shadow: 0 1px 1px rgba(255,255,255,0.72) !important;
}

html[data-theme][data-theme][data-theme] body .music-capsule-panel :is(.music-panel-head, .music-panel-head strong, .music-panel-head .ui-icon, .music-result-copy strong, .music-time) {
    color: #0b0d12 !important;
    -webkit-text-fill-color: #0b0d12 !important;
    text-shadow: 0 1px 1px rgba(255,255,255,0.7) !important;
}

html[data-theme][data-theme][data-theme] body .music-capsule-panel :is(.music-result-artist, .music-result-album, .music-note, .music-empty) {
    color: #353b45 !important;
    -webkit-text-fill-color: #353b45 !important;
    text-shadow: 0 1px 1px rgba(255,255,255,0.7) !important;
}

html[data-theme][data-theme][data-theme] body .music-capsule-panel .music-results:has(.music-result)::after {
    color: #59616c !important;
    -webkit-text-fill-color: #59616c !important;
    text-shadow: 0 1px 1px rgba(255,255,255,0.7) !important;
}

@media (min-width: 761px) {
    html[data-theme][data-theme][data-theme] body.home .music-capsule-toggle .music-capsule-copy strong {
        color: #f7f8fa !important;
        -webkit-text-fill-color: #f7f8fa !important;
        text-shadow: 0 1px 2px rgba(0,0,0,0.78), 0 0 2px rgba(0,0,0,0.42) !important;
    }

    html[data-theme][data-theme][data-theme] body.home .music-capsule-toggle .music-capsule-copy small {
        color: #dfe4eb !important;
        -webkit-text-fill-color: #dfe4eb !important;
        text-shadow: 0 1px 2px rgba(0,0,0,0.74), 0 0 2px rgba(0,0,0,0.38) !important;
    }
}

html[data-theme="dark"][data-theme][data-theme] body .music-capsule-toggle .music-capsule-copy strong,
html[data-theme="dark"][data-theme][data-theme] body .music-capsule-panel :is(.music-panel-head, .music-panel-head strong, .music-panel-head .ui-icon, .music-result-copy strong, .music-time) {
    color: #f7f8fa !important;
    -webkit-text-fill-color: #f7f8fa !important;
    text-shadow: 0 1px 2px rgba(0,0,0,0.58) !important;
}

html[data-theme="dark"][data-theme][data-theme] body .music-capsule-toggle .music-capsule-copy small,
html[data-theme="dark"][data-theme][data-theme] body .music-capsule-panel :is(.music-result-artist, .music-result-album, .music-note, .music-empty) {
    color: #dfe4eb !important;
    -webkit-text-fill-color: #dfe4eb !important;
    text-shadow: 0 1px 2px rgba(0,0,0,0.54) !important;
}

/* A deliberately quiet, collapsed history affordance. It shares the panel's
   glass surface and never introduces another player or progress control. */
html[data-theme] body .music-capsule-panel .music-history[hidden],
html[data-theme] body .music-capsule-panel .music-history-list[hidden] {
    display: none !important;
}

html[data-theme] body .music-capsule-panel .music-history {
    display: block !important;
    margin: 0.32rem 0.1rem 0;
    border-top: 1px solid rgba(35, 48, 70, 0.08);
    padding-top: 0.2rem;
}

html[data-theme] body .music-capsule-panel .music-history-toggle {
    display: inline-flex !important;
    align-items: center;
    gap: 0.28rem;
    min-height: 1.55rem;
    padding: 0.12rem 0.22rem;
    border: 0 !important;
    border-radius: 8px;
    background: transparent !important;
    color: #59616c !important;
    -webkit-text-fill-color: #59616c !important;
    font: inherit;
    font-size: 0.68rem;
    font-weight: 500;
    letter-spacing: 0.01em;
    opacity: 0.58;
    cursor: pointer;
    transition: opacity 140ms ease, background-color 140ms ease;
}

html[data-theme] body .music-capsule-panel .music-history-toggle:hover,
html[data-theme] body .music-capsule-panel .music-history-toggle:focus-visible {
    opacity: 0.9;
    background: rgba(35, 48, 70, 0.05) !important;
    outline: none;
}

html[data-theme] body .music-capsule-panel .music-history-glyph {
    display: inline-grid;
    place-items: center;
    width: 0.86rem;
    height: 0.86rem;
    font-size: 0.88rem;
    line-height: 1;
}

html[data-theme] body .music-capsule-panel .music-history-list {
    display: grid;
    gap: 0.08rem;
    margin: 0.16rem 0.04rem 0;
}

html[data-theme] body .music-capsule-panel .music-history-item {
    display: grid;
    grid-template-columns: 1.86rem minmax(0, 1fr);
    align-items: center;
    gap: 0.5rem;
    width: 100%;
    min-width: 0;
    min-height: 2.08rem;
    padding: 0.18rem 0.22rem;
    border: 0 !important;
    border-radius: 10px;
    background: transparent !important;
    color: #353b45 !important;
    -webkit-text-fill-color: #353b45 !important;
    text-align: left;
    opacity: 0.76;
    cursor: pointer;
    transition: background-color 140ms ease, opacity 140ms ease;
}

html[data-theme] body .music-capsule-panel .music-history-item:hover,
html[data-theme] body .music-capsule-panel .music-history-item:focus-visible {
    background: rgba(35, 48, 70, 0.05) !important;
    opacity: 1;
    outline: none;
}

html[data-theme] body .music-capsule-panel .music-history-art {
    display: block;
    width: 1.86rem;
    height: 1.86rem;
    border-radius: 7px;
    background: rgba(35, 48, 70, 0.08) center / cover no-repeat;
}

html[data-theme] body .music-capsule-panel .music-history-copy {
    display: grid;
    min-width: 0;
    gap: 0.02rem;
}

html[data-theme] body .music-capsule-panel .music-history-copy strong,
html[data-theme] body .music-capsule-panel .music-history-copy small {
    display: block;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

html[data-theme] body .music-capsule-panel .music-history-copy strong {
    color: #0b0d12 !important;
    -webkit-text-fill-color: #0b0d12 !important;
    font-size: 0.73rem;
    font-weight: 520;
    line-height: 1.2;
}

html[data-theme] body .music-capsule-panel .music-history-copy small {
    color: #59616c !important;
    -webkit-text-fill-color: #59616c !important;
    font-size: 0.64rem;
    line-height: 1.2;
}

html[data-theme="dark"] body .music-capsule-panel .music-history {
    border-top-color: rgba(224, 232, 245, 0.1);
}

html[data-theme="dark"] body .music-capsule-panel .music-history-toggle,
html[data-theme="dark"] body .music-capsule-panel .music-history-item {
    color: #dfe4eb !important;
    -webkit-text-fill-color: #dfe4eb !important;
}

html[data-theme="dark"] body .music-capsule-panel .music-history-copy strong {
    color: #f7f8fa !important;
    -webkit-text-fill-color: #f7f8fa !important;
}

html[data-theme="dark"] body .music-capsule-panel .music-history-copy small,
html[data-theme="dark"] body .music-capsule-panel .music-history-toggle {
    color: #bbc4cf !important;
    -webkit-text-fill-color: #bbc4cf !important;
}

html[data-theme="dark"] body .music-capsule-panel .music-history-toggle:hover,
html[data-theme="dark"] body .music-capsule-panel .music-history-toggle:focus-visible,
html[data-theme="dark"] body .music-capsule-panel .music-history-item:hover,
html[data-theme="dark"] body .music-capsule-panel .music-history-item:focus-visible {
    background: rgba(224, 232, 245, 0.07) !important;
}

@media (max-width: 640px) {
    html[data-theme] body .music-capsule-panel .music-history {
        margin-top: 0.24rem;
    }
}
