/* ChatSpot Apple Music: mounted only for an active local listening session. */
#cs-header-music[hidden]{display:none!important}
#cs-header-music{position:relative;display:flex;align-items:center;gap:9px;min-width:0;width:min(100%,430px);padding:5px 7px 5px 6px;border:1px solid #4a355e;border-radius:15px;background:linear-gradient(110deg,#24182f,#14121c);color:#f5edff;box-shadow:0 3px 14px #0002;overflow:hidden;flex-shrink:1}
#cs-header-music .cshm-track{display:flex;align-items:center;gap:9px;min-width:0;flex:1;color:inherit;text-decoration:none;border:0;background:none;text-align:left;padding:0;cursor:pointer}
#cs-header-music .cshm-art{width:35px;height:35px;flex:none;object-fit:cover;border-radius:9px;background:#38254e}
#cs-header-music .cshm-copy{min-width:0;display:flex;flex-direction:column;gap:1px}
#cs-header-music .cshm-title{font-size:13px;line-height:17px;font-weight:650;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
#cs-header-music .cshm-artist{font-size:11px;line-height:15px;color:#c3b2d4;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
#cs-header-music .cshm-controls{display:flex;align-items:center;flex:none;gap:3px}
#cs-header-music .cshm-control{display:grid;place-items:center;width:36px;height:36px;border:0;border-radius:10px;background:transparent;color:#f2e8ff;cursor:pointer}
#cs-header-music .cshm-control:hover{background:#ffffff14}
#cs-header-music .cshm-control[data-command=pause]{background:#b78aff;color:#211331}
#cs-header-music svg{width:17px;height:17px;fill:currentColor}
#cs-header-music button:focus-visible{outline:2px solid #c5ff32;outline-offset:-2px}
#cs-header-music .cshm-progress{position:absolute;bottom:0;left:0;height:2px;background:#b78aff;width:0;pointer-events:none}
.site-topbar:has(#cs-header-music:not([hidden])) .cshm-header-center{gap:10px;justify-content:flex-end}
.site-topbar:has(#cs-header-music:not([hidden])) #site-palette-trigger{width:auto;min-width:0;padding:0 14px;justify-content:flex-start;flex:1 1 0}
.site-topbar:has(#cs-header-music:not([hidden])) #site-palette-trigger>kbd{display:none}
@media(min-width:768px){.site-topbar:has(#cs-header-music:not([hidden]))>div:first-child>a{width:auto}.site-topbar:has(#cs-header-music:not([hidden])) .site-topbar-chrome{width:auto}}
@media(max-width:767px){.site-topbar:has(#cs-header-music:not([hidden]))>div:first-child{height:auto;min-height:64px;flex-wrap:wrap;padding-top:10px;padding-bottom:10px;gap:8px}.site-topbar:has(#cs-header-music:not([hidden])) .cshm-header-center{order:3;flex-basis:100%;width:100%}.site-topbar:has(#cs-header-music:not([hidden])) .site-topbar-chrome{margin-left:auto}#cs-header-music{width:100%;padding:5px 8px}#cs-header-music .cshm-control{width:40px;height:40px}#cs-header-music .cshm-art{width:38px;height:38px}}
html.cs-music-browsing,html.cs-music-browsing body{height:100%;overflow:hidden!important}
html.cs-music-browsing body> :not(#cs-music-community-view):not(.cs-music-navigation-status){display:none!important}
#cs-music-community-view{position:fixed;inset:0;z-index:2147483000;width:100%;height:100%;border:0;background:#08080b;display:block}
#cs-music-community-view[hidden]{display:none!important}

.cshm-floating{position:fixed;top:max(12px,env(safe-area-inset-top));right:16px;z-index:1000;width:min(430px,calc(100vw - 32px));pointer-events:none}.cshm-floating #cs-header-music{pointer-events:auto;width:100%}

/* Give search priority; keep playback controls compact beside it. */
@media(min-width:768px){
 .site-topbar #cs-header-music{width:250px;max-width:250px;flex:0 1 250px;min-width:210px;gap:7px}
 .site-topbar #cs-header-music .cshm-art{width:30px;height:30px}
 .site-topbar #cs-header-music .cshm-control{width:32px;height:32px}
 .site-topbar #cs-header-music .cshm-track{gap:7px}
}
@media(min-width:768px) and (max-width:1100px){
 .site-topbar:has(#cs-header-music:not([hidden]))>div:first-child{height:auto;min-height:64px;flex-wrap:wrap;padding-top:10px;padding-bottom:10px;gap:10px}
 .site-topbar:has(#cs-header-music:not([hidden])) .cshm-header-center{order:3;flex-basis:100%;width:100%}
 .site-topbar:has(#cs-header-music:not([hidden])) .site-topbar-chrome{margin-left:auto}
}

.cs-music-navigation-status{position:fixed;z-index:2147483001;left:12px;right:12px;bottom:max(12px,env(safe-area-inset-bottom));display:flex;align-items:center;justify-content:center;flex-wrap:wrap;gap:12px;padding:14px;border:1px solid #aaa;border-radius:12px;background:#18151e;color:#fff;font-size:14px;box-shadow:0 4px 20px #0005}.cs-music-navigation-status a{color:#fff!important;text-decoration:underline;min-height:44px;display:inline-flex;align-items:center;padding:8px;font-weight:600}
#cs-header-music .cshm-control[data-command=toggle]{background:#b78aff;color:#211331}
#cs-header-music[data-source=radio] .cshm-progress{width:100%!important;opacity:.5}
