:root { --dock-h: 80px; --cover: var(--soft); }
html { overflow: clip; }
body { margin: 0; padding: 0; height: 100vh; height: 100dvh; overflow: clip; }
#app { max-width: 1080px; margin: auto; height: 100%; padding: 0 clamp(16px, 4vw, 40px) calc(var(--dock-h) + 16px); display: flex; flex-direction: column; isolation: isolate; }
.header, .drawer-title, .transport, .player-top, .station-open, .mood { display: flex; align-items: center; }
.drawer-title { justify-content: space-between; gap: 12px; }
.header { justify-content: center; min-height: 76px; }
.logo-mark { flex: none; }
.logo-wordmark { line-height: 1; transform: translateY(-.08em); }
.station-index, .station-desc, .dock-copy small, .drawer-title p, .station-copy small, .station-bpm small { color: var(--muted); }
.station-tag, .filter { border-radius: 999px; padding: 6px 12px; border: 1px solid var(--line); }
.eyebrow { font-size: 11px; font-weight: 750; letter-spacing: .1em; }


.play { background: var(--accent); }
.stage { flex: 1; display: grid; place-items: center; padding: 28px 0; }
.player { text-align: center; min-width: 0; }
.station-pages { position: relative; overflow: clip; }
.station-page { display: flow-root; }
.station-page[aria-hidden] { position: absolute; inset: 0; pointer-events: none; }
.player-top, .transport { justify-content: center; gap: 16px; }
.player .eyebrow { margin: 0; color: var(--accent); }
.station-index { margin: 12px 0; font-variant-numeric: tabular-nums; }
.station-title { margin: 0; font-size: clamp(36px, 7vw, 80px); overflow-wrap: anywhere; }
.station-desc { font-size: 14px; margin: 12px 0 24px; }
.play, .icon-button { display: grid; place-items: center; border-radius: 50%; height: 48px; width: 48px; }
.play { width: 64px; height: 64px; color: white; }
.play svg { width: 26px; fill: currentColor; }
.icon-button svg, .station-open svg { width: 22px; height: 22px; flex: none; }
.icon-button:hover, .station-open:hover, .filter:hover, .mood:hover { background: var(--shade); }
.play:hover { filter: brightness(.94); }
.error { display: none; }
.error.show { display: block; color: var(--ink); }
.playing .spectrum-bg { opacity: .8; }
.spectrum-bg { opacity: 0; transition: opacity 450ms ease-in-out; position: fixed; inset: 0; width: 100%; height: 100%; z-index: -1; pointer-events: none; }
.dock { position: fixed; z-index: 3; inset: auto 0 0; background: var(--panel); border-top: 1px solid var(--line); padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); }
.station-open { gap: 12px; margin: auto; width: min(100%, 440px); min-height: 54px; text-align: left; padding: 8px 12px; border-radius: 12px; }
.mini { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 9px; background: var(--soft); color: var(--accent); flex: none; }
.dock-copy, .station-copy { display: grid; flex: 1; min-width: 0; }
.scrim { position: fixed; inset: 0; z-index: 1; background: rgb(0 0 0 / 40%); visibility: hidden; opacity: 0; transition: .2s; }
.scrim.open { visibility: visible; opacity: 1; }
.drawer { position: fixed; z-index: 2; left: 50%; bottom: var(--dock-h); width: min(980px, 100%); height: min(740px, calc(100dvh - var(--dock-h) - 12px)); display: flex; flex-direction: column; overflow: hidden; background: var(--bg); border: 1px solid var(--line); border-radius: 20px 20px 0 0; transform: translate(-50%, 110%); visibility: hidden; transition: transform .24s, visibility .24s; }
.drawer.open { visibility: visible; transform: translate(-50%, 0); }
.drawer-header, .drawer-list { padding: 12px clamp(14px, 3vw, 24px); }
.handle { width: 40px; height: 4px; background: var(--line); border-radius: 4px; margin: 0 auto 8px; }
.drawer-title h2, .drawer-title p { margin: 0; }
.station-filters { display: flex; overflow-x: auto; overscroll-behavior-x: contain; gap: 8px; margin-top: 12px; padding-block: 4px; scrollbar-width: thin; }
.filter { flex: none; white-space: nowrap; }
.filter.selected { background: var(--ink); color: var(--bg); }
.drawer-list { overflow-y: auto; overscroll-behavior: contain; }
.stations { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); gap: 10px; }
.mood { text-align: left; gap: 10px; padding: 12px; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; }
.mood.active { border-color: var(--accent); }
.mini { background: color-mix(in srgb, var(--mini) 25%, var(--panel)); color: var(--ink); }
.station-bpm { text-align: right; }
.station-bpm small { display: block; }
[hidden] { display: none !important; }
@media (max-width: 650px) {
    .header { min-height: 62px; }

}
@media (prefers-reduced-motion: reduce) {
    .scrim, .drawer, .spectrum-bg { transition: none; }
}

@media (max-height: 580px) {
    .header { min-height: 44px; }
    .stage { padding-block: 4px; }
    .station-index, .station-desc { margin-block: 4px; }
    .station-title { font-size: clamp(26px, 5vh, 36px); }
    .play { width: 48px; height: 48px; }
    .dock { padding-top: 4px; padding-bottom: calc(4px + env(safe-area-inset-bottom)); }
    .drawer { overflow-y: auto; }
    .drawer-list { overflow: visible; }
}
