:root {
    --space-black: #03040f;
    --space-deep: #07081d;
    --space-panel: rgba(9, 10, 35, .82);
    --space-panel-solid: #0b0d2b;
    --cosmic-cyan: #25e6ff;
    --cosmic-violet: #9a4dff;
    --cosmic-purple: #6637ff;
    --cosmic-green: #26dcae;
    --star-white: #f3f1ff;
    --muted-white: #aaaed0;
    --danger: #ff7897;
    --player-height: 112px;
}

* {
    box-sizing: border-box;
}

html {
    min-width: 320px;
    background: var(--space-black);
}

body {
    min-width: 320px;
    min-height: 100vh;
    margin: 0;
    padding-bottom: var(--player-height);
    overflow-x: hidden;
    color: var(--star-white);
    background:
        radial-gradient(ellipse at 80% 10%, rgba(58, 38, 170, .34), transparent 34%),
        radial-gradient(ellipse at 12% 74%, rgba(18, 93, 160, .26), transparent 32%),
        radial-gradient(ellipse at 52% 44%, rgba(42, 16, 107, .28), transparent 45%),
        linear-gradient(135deg, var(--space-black), #08061e 52%, #02030c);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
.landing-hero {
    position: relative;
    min-height: 100vh;
    background-image:
        linear-gradient(
            180deg,
            rgba(7, 8, 29, .35),
            rgba(7, 8, 29, .78)
        ),
        url('../img/cosmic-player-landing-background.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: scroll;
}

/*body::before,
body::after {
    position: fixed;
    inset: 0;
    z-index: -2;
    content: "";
    pointer-events: none;
    background-image:
        radial-gradient(circle at 8% 15%, rgba(255,255,255,.9) 0 1px, transparent 1.5px),
        radial-gradient(circle at 32% 74%, rgba(125,228,255,.85) 0 1px, transparent 1.5px),
        radial-gradient(circle at 71% 18%, rgba(255,255,255,.95) 0 1px, transparent 1.5px),
        radial-gradient(circle at 88% 64%, rgba(191,145,255,.9) 0 1px, transparent 1.5px),
        radial-gradient(circle at 55% 42%, rgba(255,255,255,.7) 0 1px, transparent 1.5px);
    background-size: 230px 190px, 330px 290px, 280px 240px, 370px 320px, 430px 350px;
    opacity: .48;
    animation: cosmic-drift 40s linear infinite;
}*/

/*body::after {
    z-index: -3;
    transform: scale(1.25);
    opacity: .18;
    animation-duration: 75s;
    animation-direction: reverse;
}*/

@keyframes cosmic-drift {
    from { transform: translate3d(0, 0, 0); }
    to { transform: translate3d(-50px, 30px, 0); }
}

button,
input,
select,
textarea {
    font: inherit;
}

button,
a {
    -webkit-tap-highlight-color: transparent;
}

a {
    color: inherit;
    text-decoration: none;
}

button {
    cursor: pointer;
}

button:focus-visible,
a:focus-visible,
input:focus-visible {
    outline: 2px solid var(--cosmic-cyan);
    outline-offset: 3px;
}

/* Homepage structure */
#page-content {
    min-height: calc(100vh - var(--player-height));
}

.cosmic-home {
    position: relative;
    min-height: calc(100vh - var(--player-height));
    overflow: hidden;
}

.cosmic-topbar {
    position: relative;
    z-index: 30;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
    width: min(1500px, 100%);
    min-height: 78px;
    margin: 0 auto;
    padding: 0 clamp(1rem, 4vw, 4rem);
    border-bottom: 1px solid rgba(153, 120, 255, .12);
    background: rgba(3, 4, 15, .28);
    /*backdrop-filter: blur(13px);*/
}

.cosmic-brand {
    display: inline-flex;
    align-items: center;
    gap: .7rem;
    font-size: clamp(1rem, 2vw, 1.35rem);
    font-weight: 750;
    letter-spacing: -.035em;
    white-space: nowrap;
}

.brand-orbit {
    display: grid;
    width: 38px;
    height: 38px;
    place-items: center;
    border: 2px solid var(--cosmic-cyan);
    border-radius: 50%;
    color: var(--cosmic-violet);
    box-shadow: 0 0 18px rgba(37, 230, 255, .68), inset 0 0 12px rgba(154, 77, 255, .6);
}

.cosmic-nav-links {
    display: flex;
    align-items: center;
    gap: clamp(.75rem, 3vw, 2.2rem);
    color: var(--muted-white);
    font-size: .92rem;
}

.cosmic-nav-links a {
    padding: .45rem 0;
    border-bottom: 2px solid transparent;
    transition: color .2s ease, border-color .2s ease;
}

.cosmic-nav-links a:hover,
.cosmic-nav-links a.active {
    border-bottom-color: var(--cosmic-cyan);
    color: white;
}

.galaxy-intro {
    position: relative;
    z-index: 3;
    padding-top: 2vh;
    text-align: center;
}

.eyebrow {
    margin: 0;
    color: var(--cosmic-cyan);
    font-size: .7rem;
    font-weight: 800;
    letter-spacing: .28em;
}

.galaxy-intro h1 {
    margin: .55rem 0 .3rem;
    font-size: clamp(2.35rem, 6vw, 5.8rem);
    line-height: .98;
    background: linear-gradient(90deg, #a9f6ff, var(--cosmic-cyan) 42%, #9b6cff 90%);
    color: transparent;
    background-clip: text;
    -webkit-background-clip: text;
}

.galaxy-intro p {
    margin: .9rem 0;
    color: var(--muted-white);
}

/* Orbit */
.orbit-stage,
#orbit-stage {
    position: relative;
    height: clamp(420px, 58vh, 630px);
    margin-top: -1rem;
    overflow: hidden;
    perspective: 1500px;
    perspective-origin: 50% 47%;
    isolation: isolate;
}

.orbit-stage::before,
#orbit-stage::before {
    position: absolute;
    top: 52%;
    left: 50%;
    z-index: 1;
    width: min(96vw, 1450px);
    height: min(25vw, 270px);
    border: 1px solid rgba(37, 230, 255, .7);
    border-radius: 50%;
    box-shadow: 0 0 24px rgba(37, 230, 255, .5), 0 0 90px rgba(151, 70, 255, .25);
    content: "";
    pointer-events: none;
    transform: translate(-50%, -50%) rotateX(68deg);
}

.orbit-stage::after,
#orbit-stage::after {
    position: absolute;
    top: 50%;
    left: 50%;
    z-index: 0;
    width: min(62vw, 760px);
    height: min(40vw, 440px);
    border-radius: 50%;
    background: radial-gradient(ellipse, rgba(108, 58, 255, .4), rgba(37, 230, 255, .08) 38%, transparent 72%);
    content: "";
    /*filter: blur(28px);*/
    pointer-events: none;
    transform: translate(-50%, -50%);
}

.orbit-ring {
    position: absolute;
    inset: 0;
    z-index: 2;
    pointer-events: none;
}

.orbit-ring::before,
.orbit-ring::after {
    position: absolute;
    top: 52%;
    left: 50%;
    width: min(90vw, 1300px);
    height: min(24vw, 250px);
    border: 1px solid rgba(154, 77, 255, .36);
    border-radius: 50%;
    content: "";
    transform: translate(-50%, -50%) rotateX(68deg);
}

.orbit-ring::after {
    width: min(76vw, 1060px);
    height: min(19vw, 190px);
    border-color: rgba(37, 230, 255, .15);
}

.album-orbit,
#album-orbit {
    position: absolute;
    inset: 0;
    z-index: 5;
    transform-style: preserve-3d;
}

.orbit-card {
    position: absolute;
    top: 48%;
    left: 50%;
    z-index: 5;
    display: block;
    width: clamp(150px, 17vw, 245px);
    padding: 10px;
    border: 1px solid rgba(154, 77, 255, .55);
    border-radius: 17px;
    color: white;
    background: rgba(5, 7, 28, .88);
    /*box-shadow: 0 20px 65px rgba(0, 0, 0, .7), 0 0 24px rgba(117, 65, 255, .35);*/
    text-align: center;
    /*backdrop-filter: blur(7px);*/
    transform-origin: center center;
    transform-style: preserve-3d;
    transition: transform 1.15s cubic-bezier(.2, .8, .2, 1), opacity 1.15s, filter 1.15s, border-color .45s, box-shadow .45s;
    /*will-change: transform, opacity, filter;*/
}

.orbit-card:hover {
    border-color: var(--cosmic-cyan);
}

.orbit-card.active {
    border-color: var(--cosmic-cyan);
    box-shadow: 0 0 36px rgba(37, 230, 255, .75), 0 30px 80px rgba(0, 0, 0, .85);
}

.orbit-cover {
    display: grid;
    height: clamp(145px, 17vw, 225px);
    place-items: center;
    border-radius: 11px;
    background: linear-gradient(135deg, #9a4dff, #25e6ff);
    background-position: center;
    background-size: cover;
    font-size: 3rem;
}

.orbit-card strong,
.orbit-card small {
    display: block;
    margin-top: .65rem;
}

.orbit-card small {
    color: var(--muted-white);
}

.active-album-meta {
    display: none;
    position: absolute;
    top: 76%;
    left: 50%;
    z-index: 10;
    width: min(90vw, 430px);
    text-align: center;
    pointer-events: none;
    transform: translateX(-50%);
}

.active-album-meta h2 {
    margin: 0;
    font-size: clamp(1.3rem, 3vw, 2rem);
}

.active-album-meta p {
    margin: .3rem 0 1rem;
    color: #a9a6dc;
}

.scene-play {
    width: 58px;
    height: 58px;
    border: 2px solid var(--cosmic-cyan);
    border-radius: 50%;
    color: white;
    background: rgba(18, 18, 60, .85);
    box-shadow: 0 0 24px rgba(37, 230, 255, .6), inset 0 0 15px rgba(154, 77, 255, .5);
    font-size: 1.4rem;
    pointer-events: auto;
    transition: transform .2s ease;
}

.scene-play:hover {
    transform: scale(1.1);
}

.orbit-controls {
    position: relative;
    z-index: 12;
    display: flex;
    justify-content: center;
    gap: .8rem;
    margin-top: -1rem;
}

.orbit-controls button {
    width: 38px;
    height: 38px;
    border: 1px solid rgba(154, 77, 255, .8);
    border-radius: 50%;
    color: white;
    background: rgba(10, 8, 35, .78);
    transition: border-color .2s ease, box-shadow .2s ease;
}

.orbit-controls button:hover {
    border-color: var(--cosmic-cyan);
    box-shadow: 0 0 16px rgba(37, 230, 255, .55);
}

/* Album overlay */
.album-overlay {
    position: fixed;
    inset: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    background: rgba(2, 3, 15, .78);
    /*backdrop-filter: blur(17px);*/
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity .3s ease, visibility .3s ease;
}

.album-overlay.is-open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.album-overlay-panel {
    position: relative;
    display: grid;
    grid-template-columns: minmax(220px, 360px) 1fr;
    gap: 2rem;
    width: min(1000px, 94vw);
    max-height: 75vh;
    padding: 1rem;
    overflow: auto;
    border: 1px solid rgba(37, 230, 255, .5);
    border-radius: 24px;
    background: rgba(7, 8, 30, .94);
    box-shadow: 0 0 55px rgba(37, 230, 255, .2), 0 30px 100px rgba(0, 0, 0, .8);
}

.album-overlay-close {
    position: fixed;
    top: 4rem;
    right: 3rem;
    z-index: 2;
    width: 42px;
    height: 42px;
    border: 1px solid rgba(255, 255, 255, .3);
    border-radius: 50%;
    color: white;
    background: rgba(255, 255, 255, .08);
    font-size: 1.8rem;
    transition: background .2s ease, transform .2s ease;
}

.album-overlay-close:hover {
    background: var(--cosmic-violet);
    transform: rotate(90deg);
}

.overlay-art {
    max-height: 350px;
    border-radius: 18px;
    background: linear-gradient(135deg, #9a4dff, #25e6ff);
    background-position: center;
    background-size: contain;
    background-repeat: no-repeat;
}

.overlay-track-list {
    display: grid;
    gap: .45rem;
    margin-top: 1.2rem;
}

.overlay-track-row {
    display: grid;
    grid-template-columns: 42px 1fr auto;
    align-items: center;
    gap: 1rem;
    width: 100%;
    padding: .9rem 1rem;
    border: 1px solid transparent;
    border-radius: 10px;
    color: white;
    background: rgba(255, 255, 255, .055);
    text-align: left;
    transition: border-color .2s ease, background .2s ease;
}

.overlay-track-row:hover {
    border-color: rgba(37, 230, 255, .5);
    background: rgba(37, 230, 255, .12);
}

.overlay-track-row span:first-child {
    color: var(--cosmic-cyan);
}

/* Persistent player */
.cosmic-player,
.player {
    position: fixed;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 80;
    display: flex;
    align-items: center;
    gap: clamp(.7rem, 2vw, 1.4rem);
    min-height: var(--player-height);
    padding: 13px clamp(1rem, 4vw, 3rem);
    border-top: 1px solid rgba(37, 230, 255, .28);
    background: rgba(5, 6, 25, .9);
    box-shadow: 0 -12px 50px rgba(0, 0, 0, .35);
    /*backdrop-filter: blur(18px);*/
}

.player-visualizer,
#visualizer {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: .42;
    pointer-events: none;
}

.player-track,
.player-info,
.player-transport,
.player-progress,
.player-actions {
    position: relative;
    z-index: 2;
}

.player-track {
    display: flex;
    flex: 0 1 260px;
    align-items: center;
    gap: .8rem;
    min-width: 150px;
}

.player-cover {
    display: grid;
    flex: 0 0 58px;
    width: 58px;
    height: 58px;
    place-items: center;
    border: 1px solid rgba(37, 230, 255, .4);
    border-radius: 10px;
    background: linear-gradient(135deg, #9a4dff, #25e6ff);
    background-position: center;
    background-size: cover;
    box-shadow: 0 0 18px rgba(37, 230, 255, .25);
}

.player-info {
    display: grid;
    min-width: 0;
    gap: .25rem;
}

.player-info span,
.player-info small {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.player-info small {
    color: var(--muted-white);
}

.player-transport,
.player-actions {
    display: flex;
    align-items: center;
    gap: .55rem;
}

.player button {
    min-width: 38px;
    min-height: 38px;
    border: 1px solid rgba(154, 77, 255, .7);
    border-radius: 50%;
    color: white;
    background: rgba(12, 11, 44, .8);
    transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease;
}

.player button:hover {
    border-color: var(--cosmic-cyan);
    box-shadow: 0 0 15px rgba(37, 230, 255, .45);
    transform: translateY(-1px);
}

.player .player-play {
    width: 50px;
    height: 50px;
    border-color: var(--cosmic-cyan);
    background: linear-gradient(135deg, rgba(37, 230, 255, .25), rgba(154, 77, 255, .3));
}

.player-progress {
    display: flex;
    flex: 1 1 420px;
    align-items: center;
    gap: .7rem;
    min-width: 120px;
    color: var(--muted-white);
    font-size: .78rem;
}

#seek {
    flex: 1;
    min-width: 80px;
    accent-color: var(--cosmic-cyan);
}

.install-btn,
#install {
    min-width: auto !important;
    padding: .65rem 1rem;
    border: 1px solid var(--cosmic-cyan) !important;
    border-radius: 999px !important;
    color: #03101b !important;
    background: linear-gradient(90deg, var(--cosmic-green), var(--cosmic-cyan)) !important;
    font-weight: 800;
}

.queue-panel {
    position: absolute;
    right: 2rem;
    bottom: calc(100% + .7rem);
    z-index: 10;
    width: min(360px, calc(100vw - 2rem));
    max-height: 55vh;
    overflow: auto;
    padding: 1rem;
    border: 1px solid var(--admin-border, rgba(154, 77, 255, .35));
    border-radius: 16px;
    background: rgba(8, 9, 31, .96);
    box-shadow: 0 20px 70px rgba(0, 0, 0, .6);
}

.queue-heading {
    display: flex;
    justify-content: space-between;
    margin-bottom: .7rem;
}

.queue-item {
    display: grid;
    grid-template-columns: 35px 1fr;
    gap: .7rem;
    width: 100%;
    padding: .7rem;
    border: 0;
    border-radius: 8px;
    color: white;
    background: transparent;
    text-align: left;
}

.queue-item:hover,
.queue-item.current {
    background: rgba(37, 230, 255, .1);
}

.queue-item span {
    color: var(--cosmic-cyan);
}

/* Basic standalone album fallback */
.album-page {
    position: relative;
    display: grid;
    grid-template-columns: minmax(230px, 380px) minmax(0, 1fr);
    gap: 2rem;
    width: min(1100px, calc(100% - 2rem));
    min-height: 450px;
    margin: 4rem auto;
    padding: 2rem;
    border: 1px solid rgba(154, 77, 255, .3);
    border-radius: 24px;
    background:
        radial-gradient(
            circle at 20% 20%,
            rgba(37, 230, 255, .08),
            transparent 35%
        ),
        rgba(9, 10, 35, .86);
    box-shadow:
        0 25px 90px rgba(0, 0, 0, .48),
        0 0 45px rgba(154, 77, 255, .15);
    /*backdrop-filter: blur(18px);*/
}

.album-art {
    min-height: 360px;
    border: 1px solid rgba(37, 230, 255, .35);
    border-radius: 18px;
    background:
        radial-gradient(
            circle,
            rgba(37, 230, 255, .55),
            transparent 50%
        ),
        linear-gradient(135deg, #9a4dff, #25e6ff);
    background-position: center;
    background-size: cover;
    box-shadow: 0 0 35px rgba(37, 230, 255, .22);
}

.album-page-content {
    min-width: 0;
    padding: 1rem .5rem;
}

.album-page-content h1 {
    margin: .55rem 0 .4rem;
    font-size: clamp(2rem, 5vw, 4rem);
    line-height: 1;
    background: linear-gradient(90deg, #a9f6ff, #25e6ff, #9b6cff);
    color: transparent;
    background-clip: text;
    -webkit-background-clip: text;
}

.album-page-content > p {
    color: var(--muted-white);
}

#album-description {
    max-width: 620px;
    line-height: 1.6;
}

.close {
    position: sticky;
    top: .8rem;
    left: 100vw;
    z-index: 3;
    display: grid;
    width: 42px;
    height: 42px;
    place-items: center;
    border: 1px solid rgba(255, 255, 255, .25);
    border-radius: 50%;
    color: white;
    background: rgba(255, 255, 255, .08);
    font-size: 1.8rem;
    cursor: pointer;
    transition: background .2s ease, transform .2s ease;
}

.close:hover {
    background: var(--cosmic-violet);
    transform: rotate(90deg);
}

.standalone-track-list {
    display: grid;
    gap: .45rem;
    margin-top: 1.5rem;
}

.standalone-track-list .track-row {
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr) auto;
    align-items: center;
    gap: 1rem;
    width: 100%;
    padding: .9rem 1rem;
    border: 1px solid transparent;
    border-radius: 10px;
    color: white;
    background: rgba(255, 255, 255, .055);
    text-align: left;
    cursor: pointer;
    transition: background .2s ease, border-color .2s ease;
}

.standalone-track-list .track-row:hover {
    border-color: rgba(37, 230, 255, .5);
    background: rgba(37, 230, 255, .12);
}

.standalone-track-list .track-row span:first-child {
    color: var(--cosmic-cyan);
    font-weight: 800;
}

.standalone-track-list .track-row small {
    color: var(--muted-white);
}

.section-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; margin-bottom: 1rem; }
.track-editor-list { display: grid; gap: .65rem; }
.track-editor-row { display: grid; grid-template-columns: 34px minmax(0, 1.3fr) 90px minmax(150px, .8fr) auto; align-items: center; gap: .65rem; padding: .7rem; border: 1px solid var(--admin-border); border-radius: 9px; background: rgba(0,0,0,.18); }
.track-editor-row input, .track-editor-row select { min-height: 40px; }
.track-editor-number { display: grid; width: 30px; height: 30px; place-items: center; border-radius: 50%; color: var(--admin-cyan); background: rgba(37,230,255,.1); font-weight: 800; }
.remove-track { display: inline-flex !important; grid-template-columns: auto auto !important; align-items: center; gap: .35rem !important; color: #ff91a7 !important; white-space: nowrap; font-size: .76rem !important; }
.remove-track input { width: auto; min-height: auto; }
.empty-inline { color: var(--admin-muted); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

.overlay-art {
    position: relative;
    display: grid;
    place-items: center;
    overflow: hidden;
    background-position: center;
    background-size: cover;
}

.overlay-art::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
        180deg,
        rgba(3, 4, 15, .08),
        rgba(3, 4, 15, .62)
    );
    pointer-events: none;
}

.overlay-album-play-container {
    position: absolute;
    z-index: 2;
    inset: 0;
    display: grid;
    place-items: center;
    pointer-events: none;
}

.overlay-album-play {
    display: grid;
    width: clamp(58px, 11vw, 88px);
    height: clamp(58px, 11vw, 88px);
    place-items: center;
    padding-left: .2em;
    border: 2px solid rgba(255, 255, 255, .86);
    border-radius: 50%;
    color: #03101b;
    background: linear-gradient(135deg, var(--admin-green, #26dcae), var(--admin-cyan, #25e6ff));
    box-shadow: 0 0 0 8px rgba(37, 230, 255, .12), 0 0 35px rgba(37, 230, 255, .55);
    font-size: clamp(1.35rem, 4vw, 2rem);
    cursor: pointer;
    pointer-events: auto;
    transition: transform .2s ease, box-shadow .2s ease, opacity .2s ease;
}

.overlay-album-play:hover,
.overlay-album-play:focus-visible {
    transform: scale(1.1);
    box-shadow: 0 0 0 12px rgba(37, 230, 255, .16), 0 0 48px rgba(37, 230, 255, .75);
    outline: none;
}

.overlay-album-play:active {
    transform: scale(.96);
}


@media (max-width: 850px) { .track-editor-row { grid-template-columns: 34px minmax(0, 1fr) 80px; } .track-editor-row > div:nth-of-type(3) { grid-column: 2 / -1; } .track-editor-row .remove-track { grid-column: 2 / -1; } }

@media (max-width: 760px) {
    .album-page {
        grid-template-columns: 1fr;
        width: min(100% - 1rem, 620px);
        margin: 1rem auto;
        padding: 1rem;
    }

    .album-art {
        min-height: 270px;
    }

    .album-page-content {
        padding: .5rem 0;
    }
}


.track-row {
    display: grid;
    grid-template-columns: 42px 1fr auto;
    align-items: center;
    gap: 1rem;
    width: 100%;
    padding: .8rem;
    border: 0;
    border-bottom: 1px solid rgba(255, 255, 255, .09);
    color: white;
    background: transparent;
    text-align: left;
}

.track-row:hover {
    background: rgba(37, 230, 255, .1);
}

@media (max-width: 760px) {
    :root {
        --player-height: 142px;
    }

    .cosmic-topbar {
        min-height: 64px;
    }

    .cosmic-nav-links {
        gap: .65rem;
        font-size: .78rem;
    }

    .cosmic-nav-links a:nth-child(3) {
        display: none;
    }

    .orbit-stage,
    #orbit-stage {
        height: 50vh;
        min-height: 350px;
    }

    .orbit-card {
        width: 155px;
    }

    .active-album-meta {
        display: none;
        top: 77%;
    }

    .album-overlay-panel,
    .album-page {
        grid-template-columns: 1fr;
        top: -4rem;
    }

    .overlay-art,
    .album-art {
        min-height: 220px;
    }

    .cosmic-player,
    .player {
        flex-wrap: wrap;
        gap: .55rem;
        padding: 9px 1rem;
    }

    .player-track {
        flex: 1 1 55%;
    }

    .player-progress {
        order: 5;
        flex-basis: 100%;
    }

    .player-actions {
        margin-left: auto;
    }

    #install {
        padding: .5rem .7rem;
        font-size: .75rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        animation-duration: .001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .001ms !important;
    }
}

.cosmic-topbar {
    position: relative;
    z-index: 100;
}

.cosmic-brand {
    position: relative;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    gap: .7rem;
    pointer-events: auto;
    cursor: pointer;
}

.cosmic-brand:hover,
.cosmic-brand:focus-visible {
    color: var(--admin-cyan, #25e6ff);
}

.cosmic-nav-links {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.client-notification-wrap {
    position: relative;
    z-index: 5;
    display: flex;
    align-items: center;
}

.client-notification-bell {
    pointer-events: auto;
}

@media (max-width: 600px) {
    .cosmic-topbar {
        gap: .55rem;
    }

    .cosmic-brand {
        min-width: 0;
        flex: 1;
    }

    .cosmic-brand > span:last-child {
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .cosmic-nav-links {
        gap: .45rem;
    }

    .cosmic-nav-links a {
        white-space: nowrap;
    }
    
}

@media (max-width: 650px) {
    .landing-hero {
        background-image:
            linear-gradient(
                180deg,
                rgba(7, 8, 29, .25),
                rgba(7, 8, 29, .68)
            ),
            url('../img/cosmic-player-landing-background.png');

        background-size: cover;
        background-position: 42% 38%;
        background-repeat: no-repeat;
        background-attachment: scroll;
        min-height: 100svh;
    }
}


/* Reduce decorative animation while audio is playing. */
body.audio-playing body::before,
body.audio-playing body::after {
    animation-play-state: paused;
}

/* Reduce star-layer work during visualizer fullscreen. */
body.visualizer-active body::before,
body.visualizer-active body::after {
    animation: none;
    opacity: .18;
}

/* Remove expensive orbit effects while visualizer is active. */
body.visualizer-active .orbit-stage::after,
body.visualizer-active #orbit-stage::after {
    filter: none;
    opacity: .25;
}

body.visualizer-active .orbit-card {
    backdrop-filter: none;
    box-shadow: 0 10px 30px rgba(0, 0, 0, .45);
    will-change: auto;
    transition: transform .35s ease, opacity .35s ease;
}

body.visualizer-active .orbit-card.active {
    box-shadow: 0 0 18px rgba(37, 230, 255, .35);
}

/* Reduce decorative animation while audio is playing. */
body.audio-playing::before,
body.audio-playing::after {
    animation-play-state: paused;
}

/* Strongly reduce decorative work during visualizer fullscreen. */
body.visualizer-active::before,
body.visualizer-active::after {
    animation: none;
    opacity: .14;
}

body.visualizer-active .orbit-stage::after,
body.visualizer-active #orbit-stage::after {
    filter: none;
    opacity: .22;
}

body.visualizer-active .orbit-card {
    backdrop-filter: none;
    box-shadow: 0 10px 30px rgba(0, 0, 0, .45);
    will-change: auto;
    transition:
        transform .35s ease,
        opacity .35s ease;
}

body.visualizer-active .orbit-card.active {
    box-shadow: 0 0 18px rgba(37, 230, 255, .35);
}