main:has(> [data-sphere]) { container-type: inline-size; }
.sphere-layout {
    display: grid;
    grid-template-columns: minmax(260px, .85fr) minmax(0, 1.15fr);
    gap: clamp(24px, 4vw, 64px);
    height: var(--sphere-height, calc(100dvh - 240px));
    min-height: 420px;
    isolation: isolate;
    font-family: Manrope, ui-sans-serif, system-ui, sans-serif;
}
.sphere-recommendations {
    grid-column: 1;
    grid-row: 1;
    min-width: 0;
    min-height: 0;
    display: flex;
    flex-direction: column;
}
.sphere-recommendations > h2 { flex-shrink: 0; margin: 0 0 16px; }
.sphere-tracklist { min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding-right: 12px; }
.sphere-tracklist > div { transition: background-color .2s; border-radius: 8px; padding-inline: 8px; }
.sphere-tracklist > div:hover { background: rgb(128 128 128 / .08); }
.sphere-tracklist > [aria-current="true"] { background: rgb(37 99 235 / .1); }
.sphere-tracklist > [aria-current="true"] > div > a { color: #3b82f6; }
.sphere-track-control { display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; border-radius: 50%; }
.sphere-track-control:hover { background: rgb(37 99 235 / .12); }
.sphere-track-control:disabled { opacity: .5; }
.sphere-track-control:focus-visible { outline: 2px solid #3b82f6; outline-offset: 2px; }
.sphere-stage {
    grid-column: 2;
    grid-row: 1;
    display: grid;
    grid-template-rows: auto minmax(0, 1fr) auto;
    min-width: 0;
    min-height: 0;
    padding: 8px 0;
    text-align: center;
}
.sphere-heading { max-width: 420px; margin-inline: auto; }
.sphere-heading > span { font-size: 10px; letter-spacing: .18em; }
.sphere-heading > h1 { font-size: clamp(32px, 3vw, 46px); line-height: 1.1; margin-top: 10px; }
.sphere-heading > p { font-size: 13px; line-height: 1.6; margin-top: 12px; text-wrap: balance; }
.sphere-space { position: relative; min-height: 0; overflow: hidden; }
.sphere-orb {
    position: absolute;
    top: 50%;
    left: 50%;
    width: var(--sphere-orb-size, 360px);
    aspect-ratio: 1;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    background: radial-gradient(circle at 38% 32%, var(--sphere-light, #dfcfff), var(--sphere-accent, #9470ef) 22%, var(--sphere-base, #6130cb) 50%, transparent 72%);
}
.sphere-orb-rendered { background: none; border-radius: 0; }
.sphere-orb:not(.sphere-orb-rendered) {
    transform: translate(-50%, -50%) scale(calc(1 + var(--sphere-beat, 0) * .15));
    filter: brightness(calc(1 + var(--sphere-beat, 0) * .4));
}
.sphere-orb-rendered canvas { display: block; width: 100%; height: 100%; pointer-events: none; }
.sphere-controls { position: relative; z-index: 1; padding-top: 8px; }
.sphere-controls > button {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-height: 46px;
    background-color: rgb(37 99 235 / .72);
    -webkit-backdrop-filter: blur(16px) saturate(140%);
    backdrop-filter: blur(16px) saturate(140%);
    transition: background-color .2s;
}
.sphere-controls > button:hover { background-color: rgb(29 78 216 / .82); }
.sphere-controls > button::before { content: ''; border-left: 9px solid currentColor; border-top: 6px solid transparent; border-bottom: 6px solid transparent; }
.sphere-controls > button[aria-pressed="true"]::before { width: 9px; height: 12px; border: 0; border-left: 3px solid currentColor; border-right: 3px solid currentColor; }
.sphere-controls > p { min-height: 20px; margin-top: 12px; font-size: 12px; }
@media (max-width: 760px) {
    .sphere-layout { grid-template-columns: 1fr; height: auto; min-height: 0; gap: 32px; }
    .sphere-stage { grid-column: 1; grid-row: 1; height: 510px; max-height: 80dvh; min-height: 390px; }
    .sphere-recommendations { grid-column: 1; grid-row: 2; }
    .sphere-tracklist { max-height: 480px; }
}
@container (max-width: 680px) {
    .sphere-layout { grid-template-columns: 1fr; height: auto; min-height: 0; gap: 32px; }
    .sphere-stage { grid-column: 1; grid-row: 1; height: 510px; max-height: 80dvh; min-height: 390px; }
    .sphere-recommendations { grid-column: 1; grid-row: 2; }
    .sphere-tracklist { max-height: 480px; }
}
@media (max-height: 560px) and (min-width: 761px) {
    .sphere-layout { min-height: 380px; }
}
