/* =====================================================================
   Gogo Forever — app stylesheet (v1, Oct 2026 redesign)
   Replaces styles.css + design.css. Layout model follows Apple Music /
   TIDAL: sidebar + content on desktop, tab bar + floating mini player on
   phones, and an artwork-tinted Now Playing sheet.
   ===================================================================== */

/* Geist (SIL Open Font License, see assets/fonts/Geist-OFL.txt). Self-hosted so the
   native app and offline PWA never wait on a font CDN. */
@font-face {
    font-family: "Geist";
    src: url("assets/fonts/Geist-Variable.woff2") format("woff2");
    font-weight: 100 900;
    font-style: normal;
    font-display: swap;
}

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

:root {
    /* Canvas & surfaces */
    --bg: #07080a;
    --bg-elev-1: #0e1013;
    --bg-elev-2: #171a1e;
    --bg-elev-3: #21252a;
    --fill: rgba(255, 255, 255, 0.08);
    --fill-2: rgba(255, 255, 255, 0.13);
    --fill-3: rgba(255, 255, 255, 0.2);
    --sep: rgba(255, 255, 255, 0.09);
    --glass: rgba(20, 22, 26, 0.74);
    --glass-edge: inset 0 1px 0 rgba(255, 255, 255, 0.07), inset 0 0 0 1px rgba(255, 255, 255, 0.05);
    --shadow-float: 0 18px 50px rgba(0, 4, 10, 0.6);
    --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 .55 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");

    /* Labels (Apple dark-mode label scale) */
    --label: #ffffff;
    --label-2: rgba(235, 235, 245, 0.64);
    --label-3: rgba(235, 235, 245, 0.4);

    /* Brand tint (Gogo cyan) and its chrome partner */
    /* One accent: the logo's cyan, desaturated so it sits with the neutrals */
    --tint: #4cc9ec;
    --tint-ink: #02161c;
    --tint-soft: rgba(76, 201, 236, 0.14);
    --violet: #8b5cff;
    /* The chrome gradient belongs to the logo only */
    --chrome: linear-gradient(135deg, #36e0ff 0%, #8b5cff 100%);
    --danger: #ff453a;

    /* Type */
    /* SF on Apple devices (as in Apple Music), Geist everywhere else */
    --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Geist", "Segoe UI", system-ui, sans-serif;
    --font-display: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Geist", "Segoe UI", system-ui, sans-serif;

    /* Geometry */
    --sidebar-w: 248px;
    --bar-h: 88px;
    --topbar-h: 56px;
    --gutter: 40px;
    --art-r: 8px;
    --card-w: 188px;
    --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
    --tab-h: 0px;
    --mini-h: 0px;

    /* Legacy names still used by inline-styled settings / paywall pages */
    --bg-primary: var(--bg);
    --bg-secondary: var(--bg-elev-1);
    --bg-tertiary: var(--bg-elev-2);
    --bg-card: var(--bg-elev-1);
    --bg-hover: var(--bg-elev-2);
    --bg-active: var(--bg-elev-3);
    --surface: var(--bg-elev-2);
    --text-primary: var(--label);
    --text-secondary: var(--label-2);
    --text-tertiary: var(--label-3);
    --accent: var(--tint);
    --accent-purple: var(--violet);
    --accent-gradient: linear-gradient(#17789a, #17789a);
    --border: var(--sep);
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 14px;
    --transition: 0.2s ease;
}

html {
    font-size: 100%;
    -webkit-text-size-adjust: 100%;
    color-scheme: dark;
    background: var(--bg);
    overscroll-behavior: none;
}

body {
    font-family: var(--font);
    font-size: 15px;
    line-height: 1.35;
    background: var(--bg);
    color: var(--label);
    height: 100vh;
    height: 100dvh;
    overflow: hidden;
    display: grid;
    grid-template-columns: var(--sidebar-w) minmax(0, 1fr);
    grid-template-rows: minmax(0, 1fr) var(--bar-h);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overscroll-behavior: none;
}

button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: none; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
svg { flex-shrink: 0; }
:focus { outline: none; }
:focus-visible { outline: 2px solid var(--tint); outline-offset: 2px; border-radius: 6px; }

.sr-only {
    position: absolute !important; width: 1px; height: 1px; overflow: hidden;
    clip: rect(0 0 0 0); white-space: nowrap; border: 0; padding: 0; margin: -1px;
}

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.14); border-radius: 10px; border: 3px solid transparent; background-clip: padding-box; }
::-webkit-scrollbar-thumb:hover { background-color: rgba(255,255,255,0.24); }

/* ===================================================================
   Sidebar
   =================================================================== */
.sidebar {
    grid-row: 1;
    grid-column: 1;
    background: var(--bg-elev-1);
    border-right: 1px solid var(--sep);
    overflow-y: auto;
    padding: max(18px, env(safe-area-inset-top)) 12px 24px;
    display: flex;
    flex-direction: column;
    gap: 18px;
    scrollbar-width: thin;
}
.sidebar-brand {
    display: flex; align-items: center; gap: 10px;
    padding: 4px 10px 2px;
    font-weight: 750; font-size: 15px; letter-spacing: -0.01em;
}
.brand-mark { width: 30px; height: 30px; color: var(--tint); }
.brand-mark use { stroke: url(#gfChrome); }
.sidebar-search {
    display: flex; align-items: center; gap: 8px;
    height: 34px; padding: 0 10px; border-radius: 9px;
    background: var(--fill); color: var(--label-2);
    font-size: 14px; text-align: left; width: 100%;
    transition: background 0.15s;
}
.sidebar-search:hover { background: var(--fill-2); }
.sidebar-search svg { width: 16px; height: 16px; }
.sidebar-search span { flex: 1; }
.sidebar-search kbd {
    font: 600 11px var(--font); color: var(--label-3);
    border: 1px solid var(--sep); border-radius: 5px; padding: 1px 6px;
}
.sidebar-group { display: flex; flex-direction: column; gap: 1px; }
.sidebar-label {
    font-size: 12px; font-weight: 600; color: var(--label-3);
    padding: 0 10px 6px;
}
.sidebar-link, .sidebar-playlist-link {
    display: flex; align-items: center; gap: 11px;
    height: 34px; padding: 0 10px; border-radius: 8px;
    font-size: 14px; font-weight: 500; color: var(--label);
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
    transition: background 0.12s;
}
.sidebar-link svg, .sidebar-playlist-link svg { width: 19px; height: 19px; color: var(--tint); }
.sidebar-link:hover, .sidebar-playlist-link:hover { background: var(--fill); }
.sidebar-link.active, .sidebar-playlist-link.active { background: var(--fill-2); }
.sidebar-playlist-link span { overflow: hidden; text-overflow: ellipsis; }
.sidebar-playlist-new { color: var(--label-2); }
.sidebar-playlist-new svg { color: var(--label-2); }

/* ===================================================================
   Main content & top bar
   =================================================================== */
.main-content {
    grid-row: 1;
    grid-column: 2;
    position: relative;
    overflow-y: auto;
    overflow-x: hidden;
    overscroll-behavior-y: contain;
    scroll-behavior: auto;
}
.top-bar {
    position: sticky; top: 0; z-index: 50;
    height: var(--topbar-h);
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    padding: 0 calc(var(--gutter) - 12px);
    margin-bottom: calc(-1 * var(--topbar-h));
    transition: background 0.25s, border-color 0.25s, backdrop-filter 0.25s;
    border-bottom: 1px solid transparent;
    pointer-events: none;
}
.top-bar > * { pointer-events: auto; }
.top-bar.scrolled {
    background: rgba(12, 12, 14, 0.78);
    -webkit-backdrop-filter: saturate(180%) blur(24px);
    backdrop-filter: saturate(180%) blur(24px);
    border-bottom-color: var(--sep);
}
.top-bar-left { display: flex; gap: 8px; align-items: center; }
.top-bar-right { display: flex; justify-content: flex-end; align-items: center; }
.top-bar-title {
    font-weight: 650; font-size: 15px; letter-spacing: -0.01em;
    max-width: 46vw; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
    opacity: 0; transform: translateY(4px);
    transition: opacity 0.2s, transform 0.2s;
    pointer-events: none;
}
.top-bar.scrolled .top-bar-title.has-title { opacity: 1; transform: none; }
.nav-btn {
    width: 32px; height: 32px; border-radius: 50%;
    display: grid; place-items: center;
    background: rgba(0, 0, 0, 0.45);
    -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
    color: var(--label);
    transition: background 0.15s, opacity 0.15s;
}
.nav-btn:hover { background: rgba(40, 40, 44, 0.9); }
.nav-btn svg { width: 17px; height: 17px; }
.nav-btn[disabled] { opacity: 0.35; cursor: default; }

.user-avatar-wrapper { position: relative; }
.user-avatar {
    width: 32px; height: 32px; border-radius: 50%;
    background: var(--bg-elev-3); color: var(--label);
    display: grid; place-items: center; overflow: hidden;
    font-weight: 650; font-size: 13px;
    box-shadow: 0 0 0 1px rgba(255,255,255,0.12);
}
.user-avatar img { width: 100%; height: 100%; object-fit: cover; }
.user-menu {
    position: absolute; top: calc(100% + 8px); right: 0; z-index: 400;
    min-width: 236px; padding: 6px;
    background: rgba(32, 32, 36, 0.92);
    -webkit-backdrop-filter: saturate(180%) blur(30px); backdrop-filter: saturate(180%) blur(30px);
    border: 1px solid rgba(255,255,255,0.1); border-radius: 13px;
    box-shadow: 0 18px 50px rgba(0,0,0,0.55);
    opacity: 0; visibility: hidden; transform: scale(0.97) translateY(-4px); transform-origin: top right;
    transition: opacity 0.16s, transform 0.16s var(--ease), visibility 0.16s;
}
.user-menu.open { opacity: 1; visibility: visible; transform: none; }
.user-menu-header { padding: 8px 10px 10px; }
.user-menu-name { font-weight: 650; font-size: 14px; }
.user-menu-email { color: var(--label-2); font-size: 12px; margin-top: 2px; overflow: hidden; text-overflow: ellipsis; }
.user-menu-divider { height: 1px; background: var(--sep); margin: 5px 8px; }
.user-menu-item {
    display: flex; align-items: center; gap: 10px; width: 100%;
    padding: 7px 10px; border-radius: 7px; font-size: 14px; text-align: left;
}
.user-menu-item svg { width: 17px; height: 17px; color: var(--label-2); }
.user-menu-item:hover { background: var(--tint); color: var(--tint-ink); }
.user-menu-item:hover svg { color: var(--tint-ink); }

/* ===================================================================
   Pages & type
   =================================================================== */
.page-container { min-height: 100%; }
.page {
    display: none;
    padding: calc(var(--topbar-h) + 4px) var(--gutter) 64px;
    max-width: 1680px;
    margin: 0 auto;
}
.page.active { display: block; animation: page-in 0.28s var(--ease); }
.page-detail { padding-top: 0; }
@keyframes page-in { from { opacity: 0; } to { opacity: 1; } }

.large-title, .page-title {
    font-family: var(--font-display);
    font-size: clamp(28px, 2.3vw, 34px);
    font-weight: 750;
    letter-spacing: -0.025em;
    line-height: 1.1;
    margin: 8px 0 22px;
}
.title-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; }
.title-row .large-title { margin-bottom: 22px; }
.page-sub { color: var(--label-2); font-size: 14px; margin: -14px 0 22px; }

.section { margin-bottom: 40px; }
.section-header, .shelf-header {
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
    margin-bottom: 12px;
}
.section-title, .shelf-title {
    font-family: var(--font-display);
    font-size: 21px; font-weight: 720; letter-spacing: -0.02em; line-height: 1.2;
}
.shelf-title a, .shelf-title button {
    display: inline-flex; align-items: center; gap: 2px; text-align: left;
}
.shelf-title svg { width: 17px; height: 17px; color: var(--label-3); transition: transform 0.15s; }
.shelf-title a:hover svg, .shelf-title button:hover svg { transform: translateX(2px); color: var(--label-2); }
.section-sub { color: var(--label-2); font-size: 13px; margin-top: 2px; }
.section-link, .see-all {
    color: var(--tint); font-size: 14px; font-weight: 500; white-space: nowrap;
}
.section-link:hover, .see-all:hover { text-decoration: underline; }
.content-section { margin-bottom: 40px; }

/* Horizontal shelves */
.shelf-wrap { position: relative; }
.shelf {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: var(--card-w);
    gap: 20px;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scroll-snap-type: x mandatory;
    scroll-padding-inline: var(--gutter);
    margin-inline: calc(-1 * var(--gutter));
    padding-inline: var(--gutter);
    padding-bottom: 6px;
    scrollbar-width: none;
}
.shelf::-webkit-scrollbar { display: none; }
.shelf > * { scroll-snap-align: start; }
.shelf--wide { grid-auto-columns: minmax(300px, calc((100% - 2 * var(--gutter) - 40px) / 3)); }
.shelf--picks { grid-auto-columns: minmax(230px, 268px); }
.shelf--video { grid-auto-columns: minmax(260px, 330px); }
.shelf--artists { grid-auto-columns: 164px; }
.shelf-arrows { display: flex; gap: 6px; }
.shelf-arrow {
    width: 28px; height: 28px; border-radius: 50%;
    display: grid; place-items: center; background: var(--fill); color: var(--label);
}
.shelf-arrow:hover { background: var(--fill-2); }
.shelf-arrow svg { width: 14px; height: 14px; }
.shelf-arrow[disabled] { opacity: 0.3; cursor: default; }

.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
    gap: 28px 20px;
}
.card-grid--artists { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.card-grid-wide { grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); }

/* ===================================================================
   Artwork
   =================================================================== */
.art {
    /* Cover typography scales with the cover itself, wherever it is drawn. */
    container-type: inline-size;
    --art-size: 100cqw;
    position: relative;
    aspect-ratio: 1 / 1;
    width: 100%;
    border-radius: var(--art-r);
    overflow: hidden;
    background: var(--bg-elev-2);
    isolation: isolate;
    box-shadow: inset 0 0 0 0.5px rgba(255,255,255,0.1);
}
.art::after { /* hairline on top of images */
    content: ''; position: absolute; inset: 0; border-radius: inherit;
    box-shadow: inset 0 0 0 0.5px rgba(255,255,255,0.12); pointer-events: none; z-index: 5;
}
.art--round { border-radius: 50%; }
.art-bg { position: absolute; inset: 0; z-index: 0; }
.art-bg::after { /* grain, so composed covers read as printed J-cards rather than flat vectors */
    content: ''; position: absolute; inset: 0;
    background-image: var(--grain); background-size: 180px;
    opacity: 0.22; mix-blend-mode: overlay;
}
.art-img {
    position: absolute; inset: 0; width: 100%; height: 100%;
    object-fit: cover; z-index: 1;
    opacity: 0; transition: opacity 0.35s;
}
.art-img.loaded { opacity: 1; }
.art-initials {
    position: absolute; inset: 0; z-index: 0;
    display: grid; place-items: center;
    font-family: var(--font-display); font-weight: 800; letter-spacing: -0.02em;
    color: rgba(255,255,255,0.92);
    font-size: calc(var(--art-size, 160px) * 0.3);
    text-shadow: 0 2px 16px rgba(0,0,0,0.25);
}
.art-glyph { position: absolute; inset: 0; display: grid; place-items: center; z-index: 0; color: rgba(255,255,255,0.85); }
.art-glyph svg { width: 34%; height: 34%; }

/* Live-tape covers: artist photo under a scrim with the venue + date set in type */
.art--tape .art-img { filter: saturate(0.9) brightness(0.62); }
/* Generated artist badges carry their own lettering: under a cover's type they
   become a soft colour field so the venue and date read cleanly. */
.art--tape .art-img.is-gen { filter: blur(calc(var(--art-size, 180px) * 0.045)) brightness(0.6) saturate(1.4); transform: scale(1.22); }
.art-tape-by {
    font-weight: 650; opacity: 0.82; letter-spacing: -0.01em;
    font-size: calc(var(--art-size, 180px) * 0.052);
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.art--md .art-tape-by { display: none; }
.art-tape-scrim {
    position: absolute; inset: 0; z-index: 2;
    background: linear-gradient(180deg, rgba(0,0,0,0) 30%, rgba(0,0,0,0.78) 100%);
}
.art-tape-label {
    position: absolute; left: 9%; right: 9%; bottom: 8%; z-index: 3;
    display: flex; flex-direction: column; gap: 0.25em;
    color: #fff; text-shadow: 0 1px 12px rgba(0,0,0,0.4);
}
.art-tape-venue {
    font-family: var(--font-display);
    font-weight: 800; letter-spacing: -0.03em; line-height: 0.98;
    font-size: calc(var(--art-size, 180px) * 0.135);
    display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
    overflow-wrap: break-word; hyphens: auto; text-wrap: balance;
}
.art-tape-date {
    font-weight: 600; opacity: 0.82;
    font-size: calc(var(--art-size, 180px) * 0.068);
    font-variant-numeric: tabular-nums;
}
.art-tape-rule {
    width: 22%; height: 2px; border-radius: 2px; background: var(--tint); margin-bottom: 0.45em;
}
.art-badge {
    position: absolute; top: 7%; left: 7%; z-index: 3;
    display: inline-flex; align-items: center; gap: 5px;
    padding: 3px 7px 3px 6px; border-radius: 5px;
    background: rgba(4, 8, 12, 0.72);
    font-size: clamp(9px, calc(var(--art-size, 180px) * 0.055), 12px); font-weight: 750; letter-spacing: 0.06em;
    color: #fff;
}
.art-badge::before { content: ''; width: 0.55em; height: 0.55em; border-radius: 50%; background: var(--tint); }
.art--sm .art-tape-label, .art--sm .art-badge, .art--xs .art-tape-label, .art--xs .art-badge { display: none; }
.art--sm .art-tape-scrim, .art--xs .art-tape-scrim { display: none; }
.art--sm .art-img, .art--xs .art-img { filter: none; }
.art--xs { border-radius: 4px; }
.art--sm { border-radius: 6px; }

/* ===================================================================
   Cards
   =================================================================== */
.card {
    position: relative;
    display: flex; flex-direction: column;
    min-width: 0;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}
.card-media { position: relative; margin-bottom: 9px; border-radius: var(--art-r); }
.card--artist .card-media { border-radius: 50%; }
.card .art { transition: transform 0.3s var(--ease); }
.card-title {
    font-size: 14px; font-weight: 550; line-height: 1.25;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.card-subtitle {
    font-size: 13px; color: var(--label-2); line-height: 1.3; margin-top: 2px;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.card-subtitle .link:hover { text-decoration: underline; color: var(--label); }
.card--artist { text-align: center; }
.card--artist .card-title { font-weight: 600; }
.card-hover {
    position: absolute; z-index: 6; inset: 0;
    border-radius: inherit;
    background: linear-gradient(180deg, rgba(0,0,0,0) 45%, rgba(0,0,0,0.5));
    opacity: 0; transition: opacity 0.18s;
}
.card-play, .card-more {
    position: absolute; z-index: 7;
    display: grid; place-items: center;
    border-radius: 50%;
    opacity: 0; transform: scale(0.9);
    transition: opacity 0.18s, transform 0.18s var(--ease), background 0.15s;
}
.card-play { left: 8px; bottom: 8px; width: 38px; height: 38px; background: var(--tint); color: var(--tint-ink); box-shadow: 0 6px 18px rgba(0,8,14,0.4); }
.card-play svg { width: 16px; height: 16px; margin-left: 2px; }
.card-more { right: 8px; bottom: 8px; width: 30px; height: 30px; background: rgba(28,31,36,0.86); color: #fff; }
.card-more svg { width: 17px; height: 17px; }
.card-more:hover { background: rgba(70,70,76,0.9); }
@media (hover: hover) {
    .card:hover .card-hover, .card:focus-visible .card-hover { opacity: 1; }
    .card:hover .card-play, .card:hover .card-more,
    .card:focus-visible .card-play, .card:focus-visible .card-more { opacity: 1; transform: none; }
    .card-play:hover { transform: scale(1.06) !important; }
}
.card:active .card-media .art { transform: scale(0.97); }

/* Top Picks (tall hero cards) */
.pick-card {
    position: relative; display: flex; flex-direction: column;
    cursor: pointer; min-width: 0;
}
.pick-kicker { font-size: 13px; color: var(--label-2); margin-bottom: 7px; font-weight: 500; }
.pick-body {
    position: relative; overflow: hidden;
    aspect-ratio: 0.78;
    border-radius: 12px;
    background: var(--bg-elev-2);
    isolation: isolate;
    box-shadow: inset 0 0 0 0.5px rgba(255,255,255,0.12);
    transition: transform 0.25s var(--ease);
}
.pick-card:active .pick-body { transform: scale(0.98); }
.pick-body .art { position: absolute; inset: 0; aspect-ratio: auto; border-radius: 0; height: 100%; box-shadow: none; }
.pick-body .art::after { display: none; }
.pick-body > .art .art-img.is-gen, .video-thumb > .art .art-img.is-gen { filter: blur(calc(var(--art-size, 270px) * 0.05)) brightness(0.72) saturate(1.45); transform: scale(1.25); }
.pick-body > .art--round, .video-thumb > .art--round { border-radius: 0; }
.pick-badge {
    position: absolute; z-index: 4; left: 50%; top: 38%; width: 54%;
    transform: translate(-50%, -50%);
    border-radius: var(--art-r);
    box-shadow: 0 18px 40px rgba(0, 4, 10, 0.5);
    transition: transform 0.35s var(--ease);
}
.pick-badge--round { border-radius: 50%; }
.pick-badge .art { position: relative; inset: auto; height: auto; aspect-ratio: 1; }
.pick-badge--round .art { border-radius: 50%; }
.pick-badge:not(.pick-badge--round) .art { border-radius: var(--art-r); }
@media (hover: hover) { .pick-card:hover .pick-badge { transform: translate(-50%, -52%) scale(1.03); } }
.pick-foot {
    position: absolute; inset: auto 0 0; z-index: 8;
    padding: 46px 16px 16px;
    background: linear-gradient(180deg, transparent, var(--pick-tone, rgba(0,0,0,0.85)) 46%);
}
.pick-foot-title {
    font-family: var(--font-display);
    font-size: 19px; font-weight: 760; letter-spacing: -0.02em; line-height: 1.12;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.pick-foot-sub { font-size: 13px; color: rgba(255,255,255,0.75); margin-top: 4px; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.pick-play {
    position: absolute; right: 14px; top: 14px; z-index: 9;
    width: 36px; height: 36px; border-radius: 50%;
    display: grid; place-items: center;
    background: rgba(255,255,255,0.92); color: #000;
    box-shadow: 0 6px 16px rgba(0,0,0,0.3);
    transition: transform 0.15s;
}
.pick-play:hover { transform: scale(1.07); }
.pick-play svg { width: 15px; height: 15px; margin-left: 2px; }

/* Wide feature banners (Browse hero) */
.feature-card { cursor: pointer; min-width: 0; display: flex; flex-direction: column; }
.feature-kicker { font-size: 12px; color: var(--tint); font-weight: 650; margin-bottom: 3px; }
.feature-title { font-family: var(--font-display); font-size: 20px; font-weight: 700; letter-spacing: -0.02em; line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.feature-sub { color: var(--label-2); font-size: 14px; margin-bottom: 10px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.feature-media {
    position: relative; overflow: hidden; border-radius: 12px;
    aspect-ratio: 16 / 9; background: var(--bg-elev-2); isolation: isolate;
    box-shadow: inset 0 0 0 0.5px rgba(255,255,255,0.12);
}
.feature-media .art { position: absolute; inset: 0; aspect-ratio: auto; height: 100%; border-radius: 0; }
.feature-media .art::after { display: none; }
.feature-media .art-tape-venue { font-size: clamp(24px, 2.3vw, 36px); -webkit-line-clamp: 2; }
.feature-media .art-tape-date { font-size: 14px; }
.feature-media .art-tape-by { font-size: 14px; }
.feature-media .art-tape-label { left: 5%; bottom: 10%; right: 5%; }
.feature-art-side {
    position: absolute; z-index: 4; right: 5%; top: 50%; transform: translateY(-50%);
    width: 34%; aspect-ratio: 1; border-radius: 8px; overflow: hidden;
    box-shadow: 0 20px 40px rgba(0,0,0,0.5);
}
.feature-art-side .art { position: static; height: auto; aspect-ratio: 1; }

/* Video cards */
.video-card { cursor: pointer; min-width: 0; }
.video-thumb {
    position: relative; aspect-ratio: 16 / 9; border-radius: 10px; overflow: hidden;
    background: var(--bg-elev-2); margin-bottom: 9px; isolation: isolate;
    box-shadow: inset 0 0 0 0.5px rgba(255,255,255,0.12);
}
.video-thumb .art { position: absolute; inset: 0; aspect-ratio: auto; height: 100%; border-radius: 0; }
.video-thumb .art .art-img { filter: brightness(0.7) saturate(1.05); }
.video-thumb-title {
    position: absolute; left: 14px; right: 60px; bottom: 12px; z-index: 6;
    font-family: var(--font-display); font-weight: 780; font-size: 17px; letter-spacing: -0.02em; line-height: 1.1;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
    text-shadow: 0 2px 14px rgba(0,0,0,0.5);
}
.video-thumb::before {
    content: ''; position: absolute; inset: 0; z-index: 5;
    background: linear-gradient(180deg, transparent 35%, rgba(0,0,0,0.7));
}
.video-play {
    position: absolute; right: 12px; bottom: 12px; z-index: 7;
    width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center;
    background: rgba(255,255,255,0.9); color: #000;
}
.video-play svg { width: 14px; height: 14px; margin-left: 2px; }
.video-tag {
    position: absolute; left: 12px; top: 12px; z-index: 7;
    font-size: 11px; font-weight: 700; padding: 3px 7px; border-radius: 5px;
    background: rgba(4,8,12,0.72);
}

/* Category tiles (Search / Browse) */
.tile-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px;
}
.tile {
    position: relative; overflow: hidden; isolation: isolate;
    aspect-ratio: 16 / 9; border-radius: 12px; padding: 14px 16px;
    display: flex; align-items: flex-end;
    text-align: left; color: #fff;
    background: var(--tile-bg, #333);
    transition: transform 0.2s var(--ease), filter 0.2s;
}
.tile:hover { filter: brightness(1.08); }
.tile:active { transform: scale(0.97); }
.tile-name { position: relative; z-index: 2; font-family: var(--font-display); font-size: 19px; font-weight: 760; letter-spacing: -0.02em; line-height: 1.1; }
.tile-art {
    position: absolute; right: -6%; bottom: -12%; width: 46%; aspect-ratio: 1; z-index: 1;
    border-radius: 8px; overflow: hidden; transform: rotate(18deg);
    box-shadow: -8px 8px 24px rgba(0,0,0,0.35);
}
.tile-art .art { box-shadow: none; }
.tile-big {
    position: absolute; right: 10px; top: -8px; z-index: 1;
    font-family: var(--font-display); font-size: 78px; font-weight: 850; letter-spacing: -0.05em;
    color: rgba(255,255,255,0.16); line-height: 1;
}

/* ===================================================================
   Track lists
   =================================================================== */
.track-list { display: flex; flex-direction: column; }
.track-header {
    display: grid;
    grid-template-columns: var(--track-cols);
    gap: 14px; align-items: center;
    padding: 0 12px 8px; margin-bottom: 4px;
    border-bottom: 1px solid var(--sep);
    color: var(--label-3); font-size: 12px; font-weight: 500;
}
.track-list {
    --track-cols: 34px minmax(0, 4fr) minmax(0, 3fr) 56px 64px;
}
.track-list--album { --track-cols: 34px minmax(0, 1fr) 56px 64px; }
.track-list--album .track-album-name, .track-list--album .track-header .col-album { display: none; }
.track-row {
    position: relative;
    display: grid;
    grid-template-columns: var(--track-cols);
    gap: 14px; align-items: center;
    min-height: 54px; padding: 6px 12px;
    border-radius: 8px;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}
.track-row::after {
    content: ''; position: absolute; left: 60px; right: 12px; bottom: 0; height: 1px; background: var(--sep);
}
.track-list--album .track-row::after { left: 58px; }
.track-row:last-child::after { display: none; }
@media (hover: hover) {
    .track-row:hover { background: var(--fill); }
    .track-row:hover::after, .track-row:hover + .track-row::after { opacity: 0; }
}
.track-row:active { background: var(--fill-2); }
.track-num {
    position: relative; width: 34px; height: 34px;
    display: grid; place-items: center;
    color: var(--label-3); font-size: 14px; font-variant-numeric: tabular-nums;
}
.track-list--album .track-num { width: 26px; justify-self: center; }
.track-num .art { position: absolute; inset: 0; }
.track-play-icon { display: none; width: 14px; height: 14px; color: var(--label); position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); z-index: 8; }
.track-row .track-num-text { position: relative; z-index: 1; }
@media (hover: hover) {
    .track-row:hover .track-num-text { visibility: hidden; }
    .track-row:hover .track-play-icon { display: block; }
    .track-row:hover .track-num .art .art-img, .track-row:hover .track-num .art .art-initials { filter: brightness(0.45); }
}
.track-list--art .track-num { width: 40px; height: 40px; }
.track-list--art { --track-cols: 40px minmax(0, 4fr) minmax(0, 3fr) 56px 64px; }
.track-list--art .track-row::after { left: 66px; }
.track-info { min-width: 0; display: flex; align-items: center; gap: 12px; }
.track-meta { min-width: 0; }
.track-name {
    font-size: 15px; font-weight: 450; line-height: 1.25;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.track-artist-name, .track-album-name {
    font-size: 13px; color: var(--label-2); line-height: 1.3;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.track-artist-name[onclick]:hover, .track-album-name[onclick]:hover { text-decoration: underline; color: var(--label); }
.track-list--album .track-artist-name { display: none; }
.track-list--album .track-row.has-artist .track-artist-name { display: block; }
.track-duration { color: var(--label-2); font-size: 13px; text-align: right; font-variant-numeric: tabular-nums; }
.track-actions { display: flex; align-items: center; justify-content: flex-end; gap: 2px; }
.track-like-btn, .track-more-btn {
    width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; color: var(--label-2);
}
.track-like-btn svg { width: 17px; height: 17px; }
.track-more-btn svg { width: 19px; height: 19px; }
.track-like-btn { opacity: 0; }
.track-like-btn.liked { opacity: 1; color: var(--tint); }
.track-more-btn { opacity: 0; color: var(--tint); }
.track-like-btn:hover, .track-more-btn:hover { background: var(--fill-2); color: var(--label); }
@media (hover: hover) {
    .track-row:hover .track-like-btn, .track-row:hover .track-more-btn, .track-row:focus-within .track-more-btn { opacity: 1; }
}
@media (hover: none) { .track-more-btn { opacity: 1; } }
.track-row.playing .track-name { color: var(--tint); }
.track-row.playing .track-num-text { visibility: hidden; }
.track-row.playing .track-num .art .art-img, .track-row.playing .track-num .art .art-initials { filter: brightness(0.45); }
.eq-bars {
    display: none; position: absolute; z-index: 8; left: 50%; top: 50%; transform: translate(-50%, -50%);
    align-items: flex-end; gap: 2px; height: 13px;
}
.track-row.playing .eq-bars { display: flex; }
.track-row.playing .track-play-icon { display: none !important; }
.eq-bar { width: 3px; border-radius: 1px; background: var(--tint); height: 4px; }
.track-row.audio-active .eq-bar { animation: eq 0.9s ease-in-out infinite; }
.track-row.audio-active .eq-bar:nth-child(2) { animation-delay: -0.4s; }
.track-row.audio-active .eq-bar:nth-child(3) { animation-delay: -0.7s; }
.track-row.audio-active .eq-bar:nth-child(4) { animation-delay: -0.2s; }
.track-row:not(.audio-active) .eq-bar:nth-child(1) { height: 6px; }
.track-row:not(.audio-active) .eq-bar:nth-child(2) { height: 10px; }
.track-row:not(.audio-active) .eq-bar:nth-child(3) { height: 7px; }
.track-row:not(.audio-active) .eq-bar:nth-child(4) { height: 4px; }
.track-row.playing .track-num .art + .eq-bars .eq-bar { background: #fff; }
@keyframes eq { 0%, 100% { height: 3px; } 50% { height: 13px; } }
.track-list-foot { color: var(--label-2); font-size: 13px; line-height: 1.6; padding: 16px 12px 0; }

/* Quick picks: songs laid out in columns of four, scrolling sideways */
.quick-grid {
    display: grid; grid-auto-flow: column;
    grid-template-rows: repeat(4, auto);
    grid-auto-columns: minmax(300px, calc((100% - 2 * var(--gutter) - 40px) / 3));
    column-gap: 20px;
    overflow-x: auto; scroll-snap-type: x mandatory;
    margin-inline: calc(-1 * var(--gutter)); padding-inline: var(--gutter);
    scroll-padding-inline: var(--gutter);
    scrollbar-width: none;
}
.quick-grid::-webkit-scrollbar { display: none; }
.quick-row {
    display: grid; grid-template-columns: 48px minmax(0, 1fr) 30px; gap: 12px; align-items: center;
    padding: 6px 0; min-height: 60px; position: relative; cursor: pointer;
    scroll-snap-align: start;
    -webkit-tap-highlight-color: transparent;
}
.quick-row::after { content: ''; position: absolute; left: 60px; right: 0; bottom: 0; height: 1px; background: var(--sep); }
.quick-row:nth-child(4n)::after { display: none; }
.quick-row .art { }
.quick-row .track-more-btn { opacity: 1; }
.quick-row.playing .track-name { color: var(--tint); }
.quick-row:active { opacity: 0.7; }

/* ===================================================================
   Buttons
   =================================================================== */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 7px;
    height: 36px; padding: 0 20px; border-radius: 9px;
    font-size: 15px; font-weight: 600; white-space: nowrap;
    transition: filter 0.15s, background 0.15s, transform 0.12s;
}
.btn svg { width: 15px; height: 15px; }
.btn:active { transform: scale(0.97); }
.btn-play { background: var(--tint); color: var(--tint-ink); }
.btn-play:hover { filter: brightness(1.08); }
.btn-fill { background: var(--fill-2); color: var(--tint); }
.btn-fill:hover { background: var(--fill-3); }
.btn-ghost { background: transparent; color: var(--tint); }
.btn-icon {
    width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center;
    background: var(--fill-2); color: var(--tint);
}
.btn-icon:hover { background: var(--fill-3); }
.btn-icon svg { width: 19px; height: 19px; }
.btn-icon.liked { color: var(--tint); }
.btn-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.text-btn { color: var(--tint); font-size: 16px; padding: 6px 4px; }
.text-btn-strong { font-weight: 650; }

/* Legacy buttons (settings, paywall, errors) */
.btn-primary {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    min-height: 44px; padding: 0 22px; border-radius: 12px;
    background: var(--tint); color: var(--tint-ink);
    font-size: 15px; font-weight: 650; border: none; cursor: pointer;
    transition: filter 0.15s, transform 0.12s;
}
.btn-primary:hover { filter: brightness(1.08); }
.btn-primary:active { transform: scale(0.98); }
.btn-primary svg { width: 16px; height: 16px; }
.btn-secondary {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    min-height: 44px; padding: 0 22px; border-radius: 12px;
    background: var(--fill-2); color: var(--label);
    font-size: 15px; font-weight: 600; border: none; cursor: pointer;
}
.btn-secondary:hover { background: var(--fill-3); }
.back-btn {
    display: inline-flex; align-items: center; gap: 2px;
    color: var(--tint); font-size: 16px; padding: 6px 0; margin: 4px 0 6px -4px;
}
.back-btn svg { width: 20px; height: 20px; }

/* ===================================================================
   Album / playlist header
   =================================================================== */
.album-hero {
    position: relative;
    display: grid; grid-template-columns: 270px minmax(0, 1fr);
    gap: 32px; align-items: end;
    padding: calc(var(--topbar-h) + 24px) 0 30px;
}
.album-hero-bg {
    position: absolute; z-index: -1; pointer-events: none;
    left: calc(-1 * var(--gutter)); right: calc(-1 * var(--gutter)); top: 0; height: 520px;
    background:
        radial-gradient(60% 80% at 15% 0%, var(--tone-a, rgba(51,214,255,0.22)), transparent 70%),
        radial-gradient(50% 70% at 70% 10%, var(--tone-b, rgba(139,92,255,0.18)), transparent 70%);
    -webkit-mask-image: linear-gradient(180deg, #000 30%, transparent);
    mask-image: linear-gradient(180deg, #000 30%, transparent);
    opacity: 0.85;
}
.album-hero .art { box-shadow: 0 24px 60px rgba(0,0,0,0.55), inset 0 0 0 0.5px rgba(255,255,255,0.12); }
.album-hero-info { min-width: 0; display: flex; flex-direction: column; gap: 4px; padding-bottom: 2px; }
.album-hero-title {
    font-family: var(--font-display);
    font-size: clamp(26px, 2.6vw, 38px); font-weight: 760; letter-spacing: -0.025em; line-height: 1.08;
    overflow-wrap: anywhere;
}
.album-hero-artist {
    font-family: var(--font-display);
    font-size: clamp(19px, 1.7vw, 24px); font-weight: 500; color: var(--tint); line-height: 1.2;
    align-self: flex-start;
}
button.album-hero-artist:hover { text-decoration: underline; }
.album-hero-meta { color: var(--label-2); font-size: 13px; font-weight: 500; margin-top: 4px; display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: center; }
.album-hero-meta .live-pill {
    display: inline-flex; align-items: center; gap: 5px;
    font-size: 11px; font-weight: 750; letter-spacing: 0.05em; color: var(--label);
    padding: 2px 7px; border-radius: 5px; background: var(--tint-soft);
}
.album-hero-meta .live-pill::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--tint); }
.album-hero-desc { color: var(--label-2); font-size: 14px; line-height: 1.5; margin-top: 6px; max-width: 64ch; }
.album-hero .btn-row { margin-top: 18px; }
.album-hero-more { margin-left: auto; }

/* ===================================================================
   Artist header
   =================================================================== */
.artist-hero {
    position: relative; isolation: isolate;
    margin: 0 calc(-1 * var(--gutter)) 28px;
    height: min(58vh, 520px); min-height: 340px;
    display: flex; align-items: flex-end;
    padding: 0 var(--gutter) 30px;
    overflow: hidden;
}
.artist-hero-media { position: absolute; inset: 0; z-index: -2; }
.artist-hero-media .art { position: absolute; inset: 0; aspect-ratio: auto; height: 100%; border-radius: 0; box-shadow: none; }
.artist-hero-media .art::after { display: none; }
.artist-hero-media .art-img { object-position: center 35%; }
.artist-hero-media .art-initials { font-size: 22vh; opacity: 0.35; }
.artist-hero::after {
    content: ''; position: absolute; inset: 0; z-index: -1;
    background:
        linear-gradient(180deg, rgba(0,0,0,0.35) 0%, rgba(0,0,0,0) 30%, rgba(0,0,0,0.2) 55%, #000 100%),
        linear-gradient(90deg, rgba(0,0,0,0.5), transparent 60%);
}
.artist-hero-content { display: flex; align-items: flex-end; gap: 22px; width: 100%; }
.artist-hero-text { min-width: 0; flex: 1; }
.artist-hero-avatar { width: 148px; flex: 0 0 148px; border-radius: 50%; box-shadow: 0 20px 50px rgba(0, 4, 10, 0.55); }
.artist-hero-avatar .art { }
.artist-hero--field { height: min(46vh, 420px); min-height: 300px; }
.artist-hero--field .artist-hero-media .art-img.is-gen { filter: blur(34px) brightness(0.62) saturate(1.5); transform: scale(1.3); }
.artist-hero--field .artist-hero-media .art-initials { display: none; }
.artist-hero-play {
    width: 52px; height: 52px; border-radius: 50%; flex: 0 0 auto;
    display: grid; place-items: center;
    background: var(--tint); color: var(--tint-ink);
    box-shadow: 0 10px 30px rgba(0,0,0,0.45);
    transition: transform 0.15s;
}
.artist-hero-play:hover { transform: scale(1.06); }
.artist-hero-play svg { width: 21px; height: 21px; margin-left: 3px; }
.artist-hero-name {
    font-family: var(--font-display);
    font-size: clamp(36px, 5.2vw, 72px); font-weight: 800; letter-spacing: -0.035em; line-height: 0.98;
    text-shadow: 0 4px 40px rgba(0,0,0,0.35);
    overflow-wrap: anywhere;
}
.artist-hero-sub { color: rgba(255,255,255,0.75); font-size: 14px; margin-top: 8px; font-weight: 500; }
.artist-hero-actions { margin-left: auto; display: flex; gap: 10px; align-items: center; flex: 0 0 auto; }
.artist-hero-actions .btn-icon { background: rgba(255,255,255,0.16); color: #fff; }

.about-card {
    max-width: 760px; color: var(--label-2); line-height: 1.6; font-size: 15px;
    background: var(--bg-elev-1); border-radius: 12px; padding: 18px 20px;
}
.about-card strong { color: var(--label); font-weight: 600; }

/* ===================================================================
   Library
   =================================================================== */
.lib-list { display: flex; flex-direction: column; margin-bottom: 36px; max-width: 720px; }
.lib-row {
    display: flex; align-items: center; gap: 14px;
    min-height: 50px; padding: 0 4px; position: relative;
    font-size: 19px; font-weight: 450; text-align: left; width: 100%;
    -webkit-tap-highlight-color: transparent;
}
.lib-row::after { content: ''; position: absolute; left: 42px; right: 0; bottom: 0; height: 1px; background: var(--sep); }
.lib-row:last-child::after { display: none; }
.lib-row > svg:first-child { width: 24px; height: 24px; color: var(--tint); }
.lib-row span { flex: 1; }
.lib-row .lib-count { flex: 0 0 auto; color: var(--label-3); font-size: 15px; }
.lib-row > svg:last-child { width: 14px; height: 14px; color: var(--label-3); }
.lib-row:active { opacity: 0.6; }
@media (hover: hover) { .lib-row:hover span { color: var(--tint); } }

.playlist-create-btn {
    display: flex; align-items: center; gap: 14px; width: 100%; text-align: left;
    padding: 6px 0 18px; color: var(--tint); font-size: 16px; font-weight: 500;
}
.playlist-create-btn .pp-icon { width: 56px; height: 56px; border-radius: 8px; background: var(--fill); display: grid; place-items: center; }
.playlist-create-btn svg { width: 22px; height: 22px; }

/* ===================================================================
   Search
   =================================================================== */
.search-head {
    position: sticky; top: var(--topbar-h); z-index: 20;
    padding: 2px 0 12px; margin-bottom: 8px;
    background: linear-gradient(180deg, var(--bg) 75%, transparent);
}
.search-field {
    display: flex; align-items: center; gap: 8px;
    height: 40px; padding: 0 12px; border-radius: 11px;
    background: var(--fill); color: var(--label-2);
    max-width: 720px;
    transition: background 0.15s, box-shadow 0.15s;
}
.search-field:focus-within { background: var(--fill-2); box-shadow: 0 0 0 2px rgba(51,214,255,0.35); }
.search-field svg { width: 18px; height: 18px; }
.search-field input {
    flex: 1; min-width: 0; height: 100%;
    background: none; border: none; outline: none;
    color: var(--label); font-size: 16px;
}
.search-field input::placeholder { color: var(--label-3); }
.search-field input::-webkit-search-cancel-button { -webkit-appearance: none; }
.search-clear { width: 22px; height: 22px; border-radius: 50%; background: var(--fill-3); color: var(--bg); display: none; place-items: center; }
.search-clear svg { width: 12px; height: 12px; }
.search-field.has-value .search-clear { display: grid; }
.segmented {
    display: inline-flex; padding: 2px; border-radius: 9px; background: var(--fill);
    margin-top: 12px; max-width: 100%; overflow-x: auto; scrollbar-width: none;
}
.segmented::-webkit-scrollbar { display: none; }
.segmented button {
    height: 28px; padding: 0 14px; border-radius: 7px; font-size: 13px; font-weight: 550; color: var(--label);
    white-space: nowrap;
}
.segmented button[aria-pressed="true"] { background: #636366; box-shadow: 0 2px 6px rgba(0,0,0,0.3); }
.search-results { display: none; }
.search-results.visible { display: block; }
.search-genres.hidden { display: none; }
.top-result {
    display: flex; align-items: center; gap: 18px;
    padding: 16px; border-radius: 14px; background: var(--bg-elev-1);
    cursor: pointer; max-width: 560px;
    transition: background 0.15s;
}
.top-result:hover { background: var(--bg-elev-2); }
.top-result .art { width: 96px; flex: 0 0 96px; }
.top-result-name { font-family: var(--font-display); font-size: 22px; font-weight: 740; letter-spacing: -0.02em; line-height: 1.15; overflow-wrap: anywhere; }
.top-result-kind { color: var(--label-2); font-size: 13px; margin-top: 4px; }
.top-result .btn-icon { margin-left: auto; background: var(--tint); color: var(--tint-ink); width: 44px; height: 44px; flex: 0 0 auto; }
.top-result .btn-icon svg { margin-left: 2px; width: 17px; height: 17px; }
.search-recents { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 30px; }
.chip {
    display: inline-flex; align-items: center; gap: 6px;
    height: 32px; padding: 0 14px; border-radius: 16px;
    background: var(--fill); color: var(--label); font-size: 14px;
}
.chip:hover { background: var(--fill-2); }
.chip svg { width: 14px; height: 14px; color: var(--label-3); }

/* ===================================================================
   Now Playing bar (desktop)
   =================================================================== */
.now-playing-bar {
    grid-row: 2; grid-column: 1 / -1;
    position: relative; z-index: 900;
    display: grid;
    grid-template-columns: minmax(220px, 1fr) minmax(320px, 620px) minmax(220px, 1fr);
    align-items: center; gap: 24px;
    padding: 0 20px;
    background: rgba(18, 18, 20, 0.94);
    -webkit-backdrop-filter: saturate(180%) blur(30px); backdrop-filter: saturate(180%) blur(30px);
    border-top: 1px solid var(--sep);
}
.np-track-info { display: flex; align-items: center; gap: 12px; min-width: 0; }
.np-artwork {
    width: 56px; height: 56px; flex: 0 0 56px; border-radius: 6px; overflow: hidden;
    background: var(--bg-elev-3); display: grid; place-items: center; color: var(--label-3);
    cursor: pointer; position: relative;
    box-shadow: 0 4px 14px rgba(0,0,0,0.4);
}
.np-artwork > svg { width: 24px; height: 24px; }
.np-artwork .art { position: absolute; inset: 0; border-radius: 0; }
.np-details { min-width: 0; cursor: pointer; }
.np-title { font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.np-artist { font-size: 13px; color: var(--label-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 1px; }
.np-title span:hover, .np-artist span:hover { text-decoration: underline; }
.icon-btn {
    display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%;
    color: var(--label-2); transition: color 0.15s, background 0.15s, transform 0.12s;
}
.icon-btn:hover { color: var(--label); }
.icon-btn:active { transform: scale(0.92); }
.icon-btn svg { width: 19px; height: 19px; }
.icon-btn.active, .icon-btn[aria-pressed="true"] { color: var(--tint); }
.np-like.liked, .fs-like.liked { color: var(--tint); }
.np-center { display: flex; flex-direction: column; align-items: center; gap: 6px; min-width: 0; }
.np-buttons { display: flex; align-items: center; gap: 14px; }
.np-buttons .control-btn svg { width: 20px; height: 20px; }
.np-prev svg, .np-next svg { width: 24px !important; height: 24px !important; color: var(--label); }
.play-btn {
    width: 40px; height: 40px; border-radius: 50%;
    display: grid; place-items: center;
    background: var(--label); color: #000;
    transition: transform 0.12s;
}
.play-btn:hover { transform: scale(1.05); }
.play-btn:active { transform: scale(0.94); }
.play-btn svg { width: 18px; height: 18px; }
.play-btn #playIcon { margin-left: 2px; }
.np-scrubber { width: 100%; display: flex; align-items: center; gap: 10px; }
.np-time { font-size: 11px; color: var(--label-3); font-variant-numeric: tabular-nums; min-width: 34px; }
.np-time:first-child { text-align: right; }
.np-scrubber-bar, .volume-slider {
    position: relative; flex: 1; height: 16px; cursor: pointer; touch-action: none;
}
.np-scrubber-bar::before, .volume-slider::before {
    content: ''; position: absolute; left: 0; right: 0; top: 50%; height: 4px; margin-top: -2px;
    border-radius: 4px; background: var(--fill-2);
}
.np-scrubber-fill, .volume-fill {
    position: absolute; left: 0; top: 50%; height: 4px; margin-top: -2px; border-radius: 4px;
    background: var(--label-2); width: 0; pointer-events: none;
}
.np-scrubber-bar:hover .np-scrubber-fill, .volume-slider:hover .volume-fill { background: var(--label); }
.np-scrubber-handle, .volume-handle {
    position: absolute; top: 50%; width: 12px; height: 12px; margin: -6px 0 0 -6px; border-radius: 50%;
    background: #fff; box-shadow: 0 1px 4px rgba(0,0,0,0.4); opacity: 0; transition: opacity 0.12s; pointer-events: none;
}
.np-scrubber-bar:hover .np-scrubber-handle, .volume-slider:hover .volume-handle { opacity: 1; }
.np-extra { display: flex; align-items: center; justify-content: flex-end; gap: 6px; }
.volume-control { display: flex; align-items: center; gap: 4px; width: 150px; }
.np-mini-progress { display: none; }
.now-playing-bar:not(.visible) .np-center,
.now-playing-bar:not(.visible) .np-like { opacity: 0.4; pointer-events: none; }

/* ===================================================================
   Full-screen Now Playing
   =================================================================== */
.fullscreen-player {
    position: fixed; inset: 0; z-index: 3000;
    display: flex; flex-direction: column;
    color: #fff;
    background: #0b0b0d;
    transform: translateY(100%);
    visibility: hidden;
    transition: transform 0.5s var(--ease), visibility 0s linear 0.5s;
    overflow: hidden;
    padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
}
.fullscreen-player.open { transform: none; visibility: visible; transition: transform 0.5s var(--ease), visibility 0s; }
.fs-bg { position: absolute; inset: 0; z-index: 0; overflow: hidden; background: var(--amb-base, #15151a); transition: background 0.8s; }
.fs-blob {
    position: absolute; width: 75vmax; height: 75vmax; border-radius: 50%;
    filter: blur(90px); opacity: 0.85; mix-blend-mode: normal;
    transition: background 1s;
}
.fs-blob-a { background: var(--amb-1, #2b4c7e); top: -30vmax; left: -20vmax; animation: drift-a 26s ease-in-out infinite alternate; }
.fs-blob-b { background: var(--amb-2, #5b2b7e); bottom: -35vmax; right: -25vmax; animation: drift-b 31s ease-in-out infinite alternate; }
.fs-blob-c { background: var(--amb-3, #1b6a7a); top: 20%; left: 30%; width: 55vmax; height: 55vmax; opacity: 0.6; animation: drift-c 37s ease-in-out infinite alternate; }
.fs-blob-veil { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,0.12), rgba(0,0,0,0.38)); }
.fullscreen-player:not(.open) .fs-blob { animation-play-state: paused; }
@keyframes drift-a { to { transform: translate(18vmax, 12vmax) rotate(40deg) scale(1.1); } }
@keyframes drift-b { to { transform: translate(-16vmax, -14vmax) rotate(-30deg) scale(1.15); } }
@keyframes drift-c { to { transform: translate(-14vmax, 10vmax) scale(0.85); } }

.fs-top {
    position: relative; z-index: 2;
    display: grid; grid-template-columns: 44px 1fr 44px; align-items: center;
    padding: 14px 20px 0; min-height: 58px;
}
.fs-close, .fs-top-more {
    width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center;
    background: rgba(255,255,255,0.12); color: #fff;
    transition: background 0.15s;
}
.fs-close:hover, .fs-top-more:hover { background: rgba(255,255,255,0.22); }
.fs-close svg { width: 20px; height: 20px; }
.fs-top-more svg { width: 20px; height: 20px; }
.fs-top-more { justify-self: end; }
.fs-grabber { display: none; }
.fs-source { justify-self: center; text-align: center; font-size: 12px; color: rgba(255,255,255,0.7); line-height: 1.3; max-width: 60vw; }
.fs-source strong { display: block; color: #fff; font-weight: 650; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.fs-layout {
    position: relative; z-index: 1; flex: 1; min-height: 0;
    display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 420px);
    gap: clamp(32px, 6vw, 96px);
    padding: 12px clamp(28px, 6vw, 96px) 28px;
    align-items: center;
    max-width: 1500px; width: 100%; margin: 0 auto;
}
.fs-main { display: flex; flex-direction: column; align-items: stretch; width: min(100%, 520px, calc(100dvh - 390px)); min-width: min(100%, 320px); justify-self: center; min-height: 0; }
.fs-stage { position: relative; width: 100%; }
.fs-artwork {
    width: 100%; aspect-ratio: 1;
    border-radius: 12px; overflow: hidden; position: relative;
    box-shadow: 0 30px 80px rgba(0,0,0,0.5);
    transition: transform 0.55s cubic-bezier(0.34, 1.4, 0.5, 1), box-shadow 0.4s;
    background: rgba(255,255,255,0.08);
}
.fs-artwork .art { position: absolute; inset: 0; border-radius: 0; box-shadow: none; }
.fullscreen-player.paused .fs-artwork { transform: scale(0.84); box-shadow: 0 16px 40px rgba(0,0,0,0.35); }
.fs-mini-head { display: none; }
.fs-queue-mobile { display: none; }
.fs-info { display: flex; align-items: center; gap: 12px; margin: 30px 0 18px; }
.fs-info-text { flex: 1; min-width: 0; }
.fs-title {
    font-family: var(--font-display);
    font-size: 21px; font-weight: 700; letter-spacing: -0.015em; line-height: 1.2;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.fs-artist { font-size: 19px; color: rgba(255,255,255,0.68); line-height: 1.3; margin-top: 1px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fs-artist span { cursor: pointer; }
.fs-artist span:hover { text-decoration: underline; color: #fff; }
.fs-like { width: 36px; height: 36px; background: rgba(255,255,255,0.14); color: #fff; }
.fs-like svg { width: 19px; height: 19px; }
.fs-like.liked { color: #fff; background: rgba(255,255,255,0.28); }
.fs-progress { margin-bottom: 10px; }
.fs-progress-bar {
    position: relative; height: 22px; cursor: pointer; touch-action: none;
}
.fs-progress-bar::before {
    content: ''; position: absolute; left: 0; right: 0; top: 50%; height: 6px; margin-top: -3px;
    border-radius: 6px; background: rgba(255,255,255,0.22);
    transition: height 0.2s, margin 0.2s;
}
.fs-progress-bar .progress-fill {
    position: absolute; left: 0; top: 50%; height: 6px; margin-top: -3px;
    border-radius: 6px 0 0 6px; background: rgba(255,255,255,0.85); width: 0; pointer-events: none;
    transition: height 0.2s, margin 0.2s;
}
.fs-progress-bar .progress-handle { display: none; }
.fs-progress-bar.dragging::before, .fs-progress-bar.dragging .progress-fill { height: 11px; margin-top: -5.5px; }
.fs-progress-bar.dragging .progress-fill { background: #fff; }
.fs-times { display: flex; justify-content: space-between; font-size: 12px; font-weight: 600; color: rgba(255,255,255,0.55); font-variant-numeric: tabular-nums; margin-top: 2px; }
.fs-controls { display: flex; align-items: center; justify-content: space-evenly; margin: 10px 0 22px; }
.fs-ctrl { width: 64px; height: 64px; color: #fff; border-radius: 50%; }
.fs-ctrl svg { width: 40px; height: 40px; }
.fs-ctrl:hover { color: #fff; background: rgba(255,255,255,0.08); }
.fs-play-btn { width: 76px; height: 76px; border-radius: 50%; display: grid; place-items: center; color: #fff; transition: transform 0.15s, background 0.15s; }
.fs-play-btn:hover { background: rgba(255,255,255,0.08); }
.fs-play-btn:active { transform: scale(0.88); }
.fs-play-btn svg { width: 52px; height: 52px; }
.fs-volume { display: flex; align-items: center; gap: 12px; color: rgba(255,255,255,0.6); }
.fs-volume > svg { width: 18px; height: 18px; }
.fs-volume-slider { height: 22px; }
.fs-volume-slider::before { height: 6px; margin-top: -3px; background: rgba(255,255,255,0.22); }
.fs-volume-slider .volume-fill { height: 6px; margin-top: -3px; background: rgba(255,255,255,0.85); }
.fs-volume-slider:hover .volume-fill { background: #fff; }
.fs-bottom { display: flex; justify-content: space-evenly; margin-top: 20px; }
.fs-toggle { width: 42px; height: 42px; color: rgba(255,255,255,0.65); border-radius: 10px; }
.fs-toggle svg { width: 22px; height: 22px; }
.fs-toggle:hover { color: #fff; }
.fs-toggle.active, .fs-toggle[aria-pressed="true"] { color: #000; background: rgba(255,255,255,0.85); }
.fs-side {
    align-self: stretch; min-height: 0; display: flex; flex-direction: column;
    padding: 8px 0;
}
.fullscreen-player.hide-queue .fs-layout { grid-template-columns: minmax(0, 1fr); }
.fullscreen-player.hide-queue .fs-side { display: none; }

/* Queue lists (shared by the Now Playing sheet and the desktop panel) */
.q-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin: 6px 0 4px; }
.q-title { font-family: var(--font-display); font-size: 17px; font-weight: 700; letter-spacing: -0.01em; }
.q-sub { font-size: 13px; color: var(--label-2); margin-bottom: 8px; }
.fullscreen-player .q-sub { color: rgba(255,255,255,0.6); }
.q-clear { color: var(--tint); font-size: 14px; font-weight: 500; }
.fullscreen-player .q-clear { color: rgba(255,255,255,0.85); }
.q-list { flex: 1; min-height: 0; overflow-y: auto; margin-right: -8px; padding-right: 8px; scrollbar-width: thin; overscroll-behavior: contain; }
.q-empty { color: var(--label-3); font-size: 14px; padding: 12px 0; }
.fullscreen-player .q-empty { color: rgba(255,255,255,0.55); }
.queue-track {
    display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; gap: 12px; align-items: center;
    padding: 6px 8px; margin: 0 -8px; border-radius: 8px; cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}
.queue-track:hover { background: var(--fill); }
.fullscreen-player .queue-track:hover { background: rgba(255,255,255,0.1); }
.queue-track.dragging { opacity: 0.4; }
.queue-track.drop-before { box-shadow: inset 0 2px 0 var(--tint); }
.queue-track-art { width: 44px; height: 44px; position: relative; }
.queue-track-art .art { }
.queue-track-info { min-width: 0; }
.queue-track-title { font-size: 14px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.queue-track-artist { font-size: 13px; color: var(--label-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fullscreen-player .queue-track-artist { color: rgba(255,255,255,0.6); }
.queue-track-actions { display: flex; align-items: center; gap: 0; }
.queue-track-actions button { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; color: var(--label-3); }
.fullscreen-player .queue-track-actions button { color: rgba(255,255,255,0.55); }
.queue-track-actions button:hover { color: var(--label); background: var(--fill-2); }
.queue-track-actions svg { width: 16px; height: 16px; }
.queue-grip { cursor: grab; touch-action: none; }
.queue-now { display: grid; grid-template-columns: 56px minmax(0, 1fr); gap: 12px; align-items: center; margin-bottom: 18px; }
.queue-now .art { }

/* Desktop Playing Next panel */
.queue-panel {
    position: fixed; z-index: 950;
    top: 10px; right: 10px; bottom: calc(var(--bar-h) + 10px);
    width: 340px; max-width: calc(100vw - 20px);
    display: flex; flex-direction: column;
    background: rgba(26, 26, 29, 0.9);
    -webkit-backdrop-filter: saturate(180%) blur(30px); backdrop-filter: saturate(180%) blur(30px);
    border: 1px solid rgba(255,255,255,0.08); border-radius: 14px;
    box-shadow: 0 24px 70px rgba(0,0,0,0.6);
    padding: 14px 16px;
    transform: translateX(calc(100% + 20px)); visibility: hidden;
    transition: transform 0.35s var(--ease), visibility 0s linear 0.35s;
}
.queue-panel.open { transform: none; visibility: visible; transition: transform 0.35s var(--ease), visibility 0s; }
.queue-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.queue-header h3 { font-family: var(--font-display); font-size: 19px; font-weight: 720; letter-spacing: -0.015em; }
.queue-body { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.queue-body #queueNextUp { flex: 1; min-height: 0; display: flex; flex-direction: column; }

/* ===================================================================
   Context menu (popover on desktop, action sheet on phones)
   =================================================================== */
.ctx-backdrop { display: none; position: fixed; inset: 0; z-index: 2499; background: transparent; }
.context-menu {
    position: fixed; z-index: 2500;
    min-width: 248px; max-width: 300px; padding: 5px;
    background: rgba(36, 36, 40, 0.9);
    -webkit-backdrop-filter: saturate(180%) blur(30px); backdrop-filter: saturate(180%) blur(30px);
    border: 1px solid rgba(255,255,255,0.1); border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.6);
    display: none;
    transform-origin: top left;
}
.context-menu.visible { display: block; animation: menu-in 0.14s var(--ease); }
@keyframes menu-in { from { opacity: 0; transform: scale(0.96); } }
.ctx-head { display: none; }
.ctx-item {
    display: flex; align-items: center; justify-content: space-between; gap: 14px;
    width: 100%; padding: 7px 10px; border-radius: 7px;
    font-size: 14px; text-align: left; color: var(--label);
}
.ctx-item svg { width: 17px; height: 17px; color: var(--label-2); }
.ctx-item:hover { background: var(--tint); color: var(--tint-ink); }
.ctx-item:hover svg { color: var(--tint-ink); }
.ctx-item.danger { color: var(--danger); }
.ctx-item.danger svg { color: var(--danger); }
.ctx-item.danger:hover { background: var(--danger); color: #fff; }
.ctx-item.danger:hover svg { color: #fff; }
.ctx-divider { height: 1px; background: var(--sep); margin: 5px 8px; }
.ctx-group { display: contents; }
.ctx-cancel { display: none; }

/* ===================================================================
   Modals: playlist picker, new playlist, auth, generic
   =================================================================== */
.playlist-picker-overlay, .playlist-modal-overlay, .auth-modal-overlay {
    position: fixed; inset: 0; z-index: 4000;
    display: flex; align-items: center; justify-content: center; padding: 20px;
    background: rgba(0,0,0,0.55);
    -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
    opacity: 0; visibility: hidden; transition: opacity 0.2s, visibility 0s linear 0.2s;
}
.playlist-picker-overlay.open, .playlist-modal-overlay.open, .auth-modal-overlay.open { opacity: 1; visibility: visible; transition: opacity 0.2s, visibility 0s; }
.playlist-picker, .playlist-modal {
    width: min(420px, 100%); max-height: min(640px, 86vh);
    display: flex; flex-direction: column;
    background: var(--bg-elev-2); border-radius: 16px;
    border: 1px solid rgba(255,255,255,0.08);
    box-shadow: 0 30px 90px rgba(0,0,0,0.6);
    padding: 14px 16px 16px;
    transform: translateY(10px) scale(0.98); transition: transform 0.25s var(--ease);
}
.open > .playlist-picker, .open > .playlist-modal { transform: none; }
.playlist-picker-header { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; margin-bottom: 10px; }
.playlist-picker-header h3 { grid-column: 2; font-size: 16px; font-weight: 650; text-align: center; }
.playlist-picker-header .playlist-picker-close { grid-column: 3; justify-self: end; }
.playlist-picker-header .text-btn:first-child { justify-self: start; }
.playlist-picker-header .text-btn:last-child { justify-self: end; }
.playlist-picker-close { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--fill-2); color: var(--label-2); }
.playlist-picker-close svg { width: 14px; height: 14px; }
.playlist-picker-create, .playlist-picker-item {
    display: flex; align-items: center; gap: 12px; width: 100%; text-align: left;
    padding: 6px 4px; border-radius: 8px;
}
.playlist-picker-create { color: var(--tint); font-size: 15px; font-weight: 500; }
.playlist-picker-create:hover, .playlist-picker-item:hover { background: var(--fill); }
.playlist-picker-list { overflow-y: auto; min-height: 0; }
.pp-icon { width: 48px; height: 48px; border-radius: 6px; overflow: hidden; display: grid; place-items: center; flex: 0 0 auto; position: relative; }
.pp-icon .art { }
.pp-icon-new { background: var(--fill); color: var(--tint); }
.pp-icon-new svg { width: 20px; height: 20px; }
.pp-info { min-width: 0; }
.pp-name { font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pp-count { font-size: 13px; color: var(--label-2); }
.playlist-modal-body { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 8px 4px 4px; }
.playlist-modal-art {
    width: 140px; height: 140px; border-radius: 10px; margin-bottom: 8px;
    display: grid; place-items: center; color: rgba(255,255,255,0.9);
    background: hsl(196 38% 22%);
}
.playlist-modal-art svg { width: 54px; height: 54px; }
.playlist-modal-body .auth-field { width: 100%; }
.playlist-modal-actions { display: none; }

.auth-modal {
    position: relative; width: min(400px, 100%);
    max-height: 92vh; overflow-y: auto;
    background: var(--bg-elev-1); border: 1px solid rgba(255,255,255,0.09);
    border-radius: 18px; padding: 34px 28px 26px;
    box-shadow: 0 30px 100px rgba(0,0,0,0.65);
    text-align: center;
}
.auth-modal-close { position: absolute; top: 14px; right: 14px; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--fill-2); color: var(--label-2); }
.auth-modal-close svg { width: 14px; height: 14px; }
.auth-modal-logo {
    font-weight: 750; font-size: 14px; margin-bottom: 14px; color: var(--label-2); letter-spacing: 0;
}
.auth-modal h2 { font-family: var(--font-display); font-size: 28px; font-weight: 760; letter-spacing: -0.025em; }
.auth-modal-subtitle { color: var(--label-2); font-size: 14px; margin: 6px 0 22px; }
.auth-form { display: flex; flex-direction: column; gap: 10px; }
.auth-field input {
    width: 100%; height: 46px; padding: 0 14px; border-radius: 11px;
    background: var(--fill); border: 1px solid transparent; color: var(--label);
    font-size: 16px; outline: none; transition: border-color 0.15s, background 0.15s;
}
.auth-field input:focus { border-color: rgba(51,214,255,0.6); background: var(--fill-2); }
.auth-field input::placeholder { color: var(--label-3); }
.auth-submit { width: 100%; margin-top: 4px; }
.auth-divider { display: flex; align-items: center; gap: 12px; margin: 20px 0 14px; color: var(--label-3); font-size: 12px; }
.auth-divider::before, .auth-divider::after { content: ''; flex: 1; height: 1px; background: var(--sep); }
.auth-social { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.auth-social-btn {
    display: flex; align-items: center; justify-content: center; gap: 8px;
    height: 44px; border-radius: 11px; background: var(--fill); font-size: 14px; font-weight: 600;
}
.auth-social-btn:hover { background: var(--fill-2); }
.auth-toggle { margin-top: 18px; color: var(--label-2); font-size: 14px; }
.auth-toggle a { color: var(--tint); font-weight: 600; margin-left: 4px; }

/* ===================================================================
   Feedback: toast, empty, error, skeleton
   =================================================================== */
.toast {
    position: fixed; left: 50%; z-index: 5000;
    bottom: calc(var(--bar-h) + 18px);
    transform: translate(-50%, 12px); opacity: 0; pointer-events: none;
    padding: 10px 16px; border-radius: 12px; max-width: min(420px, calc(100vw - 32px));
    background: rgba(44, 44, 48, 0.94);
    -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px);
    border: 1px solid rgba(255,255,255,0.08);
    box-shadow: 0 12px 40px rgba(0,0,0,0.5);
    font-size: 14px; font-weight: 500; text-align: center;
    transition: opacity 0.2s, transform 0.25s var(--ease);
}
.toast.visible { opacity: 1; transform: translate(-50%, 0); }
.empty-state {
    display: flex; flex-direction: column; align-items: center; text-align: center;
    padding: 64px 20px; color: var(--label-2); max-width: 420px; margin: 0 auto;
}
.empty-state svg { width: 52px; height: 52px; color: var(--label-3); margin-bottom: 14px; }
.empty-state h3 { font-family: var(--font-display); font-size: 21px; font-weight: 700; color: var(--label); margin-bottom: 6px; letter-spacing: -0.01em; }
.empty-state p { font-size: 15px; line-height: 1.5; }
.empty-state .btn-primary, .empty-state .btn { margin-top: 18px; }
.skeleton {
    border-radius: 6px;
    background: linear-gradient(90deg, rgba(255,255,255,0.05) 0%, rgba(255,255,255,0.1) 50%, rgba(255,255,255,0.05) 100%);
    background-size: 200% 100%;
    animation: shimmer 1.4s linear infinite;
}
@keyframes shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }
.load-more { display: flex; justify-content: center; margin-top: 32px; }

/* ===================================================================
   Settings / legal / profile pages (markup built in app.js)
   =================================================================== */
#settingsPage { padding-top: calc(var(--topbar-h) + 4px); }
.settings-wrap { max-width: 640px; margin: 0 auto; padding: 8px 0 40px; }
.settings-row { display: flex; align-items: center; gap: 16px; padding: 14px 18px; }
.settings-row > div:first-child { flex: 1 1 auto; min-width: 0; }
.settings-select {
    flex: 0 0 auto; max-width: 50%; min-height: 36px;
    background: var(--fill-2); color: var(--label);
    border: none; border-radius: 9px; padding: 6px 10px; font-size: 14px;
}
.legal-link { display: inline-block; padding: 10px 2px; color: var(--tint); font-size: 13px; font-weight: 600; }
#settingsPage a:not(.legal-link):not(.btn-primary) { color: var(--tint); }

/* ===================================================================
   Welcome / sign-in gate
   =================================================================== */
.auth-gate {
    --gf-paper: #f5f5f7; --gf-muted: rgba(235,235,245,0.62);
    position: fixed; inset: 0; z-index: 10000; overflow-y: auto;
    display: flex; flex-direction: column; background: #000; color: var(--gf-paper);
    padding: max(28px, env(safe-area-inset-top)) max(36px, env(safe-area-inset-right)) max(20px, env(safe-area-inset-bottom)) max(36px, env(safe-area-inset-left));
    isolation: isolate; overscroll-behavior: contain;
}
.auth-gate::before {
    content: ''; position: fixed; inset: -20%; z-index: -1; pointer-events: none;
    background:
        radial-gradient(40% 40% at 78% 30%, rgba(54,224,255,0.22), transparent 70%),
        radial-gradient(40% 45% at 88% 85%, rgba(139,92,255,0.24), transparent 70%),
        radial-gradient(30% 30% at 10% 90%, rgba(54,224,255,0.08), transparent 70%);
    filter: blur(20px);
}
.welcome-top, .welcome-layout, .welcome-bottom { width: min(1200px, 100%); margin-inline: auto; }
.welcome-top { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.gf-wordmark { display: inline-flex; align-items: center; gap: 10px; font-size: 16px; font-weight: 760; letter-spacing: -0.01em; }
.gf-mark { color: var(--tint); width: 30px; height: 32px; }
.welcome-signin { min-height: 40px; padding: 0 18px; border-radius: 20px; background: var(--fill-2); color: var(--gf-paper); font-size: 14px; font-weight: 600; }
.welcome-signin:hover { background: var(--fill-3); }
.welcome-layout { display: grid; grid-template-columns: 1.05fr 1fr; align-items: center; gap: 32px; flex: 1; padding-block: 40px 28px; }
.welcome-eyebrow { color: var(--tint); font-size: 15px; font-weight: 600; }
.welcome-title {
    margin: 14px 0 20px;
    font-family: var(--font-display);
    font-size: clamp(46px, 5.6vw, 84px); letter-spacing: -0.045em; line-height: 0.98; font-weight: 800;
}
.welcome-title { text-wrap: balance; max-width: 20ch; }
.welcome-description { max-width: 420px; color: var(--gf-muted); font-size: 18px; line-height: 1.5; margin-bottom: 28px; }
.welcome-cta {
    display: inline-flex; align-items: center; justify-content: center; gap: 12px;
    min-height: 52px; padding: 0 26px; border-radius: 26px;
    background: var(--tint); color: var(--tint-ink);
    font-size: 17px; font-weight: 650; transition: filter 0.15s, transform 0.15s;
}
.welcome-cta:hover { filter: brightness(1.08); }
.welcome-cta:active { transform: scale(0.98); }
.welcome-cta svg { width: 18px; height: 18px; }
.welcome-trial { margin-top: 12px; font-size: 13px; color: var(--gf-muted); }
.welcome-benefits { display: flex; gap: 22px; flex-wrap: wrap; margin-top: 34px; padding-top: 22px; border-top: 1px solid var(--sep); max-width: 460px; }
.welcome-benefits span { font-size: 14px; color: rgba(235,235,245,0.8); display: flex; align-items: center; gap: 8px; }
.welcome-benefits svg { width: 17px; height: 17px; color: var(--tint); }
.welcome-art { position: relative; min-width: 0; }
.welcome-art img { width: 100%; max-height: 640px; object-fit: contain; display: block; filter: drop-shadow(0 30px 40px rgba(0,0,0,0.6)); }
.welcome-art-caption { position: absolute; right: 6%; bottom: 3%; color: var(--gf-muted); font-size: 12px; }
.welcome-bottom { display: flex; align-items: center; justify-content: space-between; gap: 20px; border-top: 1px solid var(--sep); padding-top: 18px; color: var(--gf-muted); font-size: 13px; }
.welcome-bottom strong { color: var(--gf-paper); font-weight: 600; }
.welcome-bottom nav { display: flex; gap: 22px; }
.welcome-bottom a { color: var(--gf-muted); min-height: 32px; display: inline-flex; align-items: center; }
.welcome-bottom a:hover { color: #fff; }

/* Video player overlay (markup built in playHeroVideo) */
#videoPlayerModal > div { -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px); }

/* Tab bar hidden on desktop */
.mobile-nav { display: none; }

/* Lists with no known durations drop the Time column */
.track-list.no-duration .track-duration, .track-list.no-duration .col-time { display: none; }
.track-list.no-duration { --track-cols: 34px minmax(0, 4fr) minmax(0, 3fr) 64px; }
.track-list--art.no-duration { --track-cols: 40px minmax(0, 4fr) minmax(0, 3fr) 64px; }
.track-list--album.no-duration { --track-cols: 34px minmax(0, 1fr) 64px; }
.queue-track.drop-after { box-shadow: inset 0 -2px 0 var(--tint); }
.card-grid--video { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.card-grid--video .video-card .card-title { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.top-bar-more { margin-right: 10px; }
.top-bar-more[hidden] { display: none; }
.btn-danger { background: var(--danger); color: #fff; }
.btn[disabled] { opacity: 0.4; pointer-events: none; }
.confirm-modal { text-align: center; padding: 22px 20px 18px; }
.confirm-modal h3 { font-size: 18px; font-weight: 700; margin-bottom: 6px; text-wrap: balance; }
.confirm-modal p { color: var(--label-2); font-size: 14px; line-height: 1.5; margin-bottom: 18px; }
.confirm-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.confirm-actions .btn { height: 44px; }
.skip-link {
    position: fixed; left: 12px; top: -60px; z-index: 6000;
    padding: 10px 14px; border-radius: 10px; background: var(--tint); color: var(--tint-ink); font-weight: 650;
    transition: top 0.15s;
}
.skip-link:focus { top: 12px; }
.main-content:focus { outline: none; }
.large-title, .album-hero-title, .artist-hero-name, .empty-state h3, .pick-foot-title { text-wrap: balance; }
.empty-state p, .album-hero-desc, .page-sub { text-wrap: pretty; }
.tile::after { content: ''; position: absolute; inset: 0; background-image: var(--grain); background-size: 180px; opacity: 0.18; mix-blend-mode: overlay; pointer-events: none; }
.fs-bg::after { content: ''; position: absolute; inset: 0; background-image: var(--grain); background-size: 180px; opacity: 0.1; mix-blend-mode: overlay; pointer-events: none; }
.now-playing-bar, .user-menu, .context-menu, .queue-panel { box-shadow: var(--glass-edge), var(--shadow-float); }
.now-playing-bar { box-shadow: var(--glass-edge); }

/* ===================================================================
   Medium widths: tighten gutters
   =================================================================== */
@media (max-width: 1280px) {
    :root { --gutter: 32px; --card-w: 172px; }
    .now-playing-bar { grid-template-columns: minmax(200px, 1fr) minmax(280px, 520px) minmax(160px, 1fr); gap: 16px; }
    .volume-control { width: 110px; }
}
@media (max-width: 1100px) {
    .fs-layout { grid-template-columns: minmax(0, 1fr); }
    .fs-side { display: none; }
    .fullscreen-player.show-queue .fs-side {
        display: flex; position: absolute; inset: 0; z-index: 5;
        padding: 12px clamp(28px, 6vw, 96px) 28px;
        background: rgba(0,0,0,0.35); -webkit-backdrop-filter: blur(30px); backdrop-filter: blur(30px);
    }
}

/* ===================================================================
   Phones (and small touch tablets): tab bar + floating mini player
   =================================================================== */
@media (max-width: 767px), (pointer: coarse) and (max-width: 900px) {
    :root {
        --gutter: 20px;
        --card-w: 158px;
        --tab-h: calc(56px + env(safe-area-inset-bottom));
        --mini-h: 64px;
        --topbar-h: 52px;
    }
    body {
        display: block;
        padding: 0;
    }
    .sidebar { display: none; }
    .main-content {
        position: fixed; inset: 0;
        padding-top: env(safe-area-inset-top);
        padding-bottom: calc(var(--tab-h) + 12px);
    }
    body.has-player .main-content { padding-bottom: calc(var(--tab-h) + var(--mini-h) + 18px); }
    .page { padding: calc(var(--topbar-h) - 6px) var(--gutter) 28px; }
    .page-detail { padding-top: 0; }
    .top-bar { padding: 0 12px; top: 0; }
    .top-bar.scrolled { background: rgba(14, 14, 16, 0.8); }
    .nav-btn-fwd { display: none !important; }
    .top-bar:not(.can-back) #backBtn { display: none; }
    .nav-btn { width: 34px; height: 34px; }
    .large-title, .page-title { font-size: 32px; margin: 4px 0 18px; letter-spacing: -0.02em; }
    .title-row .large-title { margin-bottom: 18px; }
    .section, .content-section { margin-bottom: 32px; }
    .section-title, .shelf-title { font-size: 20px; }
    .shelf-arrows { display: none; }
    .shelf { gap: 14px; }
    .shelf--wide { grid-auto-columns: calc(100% - 28px); }
    .shelf--picks { grid-auto-columns: 74%; }
    .shelf--video { grid-auto-columns: 82%; }
    .shelf--artists { grid-auto-columns: 128px; }
    .quick-grid { grid-auto-columns: calc(100% - 44px); column-gap: 16px; }
    .card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px 14px; }
    .card-grid--artists { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px 12px; }
    .card-grid-wide { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .card-title { font-size: 13px; }
    .card-subtitle { font-size: 12px; }
    .card-play, .card-more, .card-hover { display: none; }
    .tile-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
    .tile { aspect-ratio: 1.45; padding: 10px 12px; }
    .tile-name { font-size: 16px; }
    .tile-big { font-size: 56px; }
    .pick-foot-title { font-size: 18px; }

    /* Track rows: title/artist + ⋯ (iOS) */
    .track-list[class] { --track-cols: 44px minmax(0, 1fr) 34px; }
    .track-list--album[class] { --track-cols: 26px minmax(0, 1fr) 34px; }
    .track-header { display: none; }
    .track-album-name, .track-duration, .track-like-btn { display: none !important; }
    .track-row { padding: 4px 0; min-height: 56px; gap: 12px; border-radius: 0; }
    .track-row::after { left: 56px; right: 0; }
    .track-list--album .track-row::after { left: 38px; }
    .track-list--art .track-row::after { left: 56px; }
    .track-num, .track-list--art .track-num { width: 44px; height: 44px; }
    .track-list--album .track-num { width: 26px; height: 26px; }
    .track-more-btn { opacity: 1; color: var(--label); width: 34px; height: 34px; }
    .track-row:active { background: var(--fill); }

    /* Album header: centered, iOS style */
    .album-hero {
        grid-template-columns: 1fr; justify-items: center; text-align: center;
        gap: 18px; padding: calc(var(--topbar-h) + 10px) 0 22px;
    }
    .album-hero .art { width: min(68vw, 300px); }
    .album-hero-info { align-items: center; width: 100%; }
    .album-hero-title { font-size: 22px; }
    .album-hero-artist { font-size: 20px; align-self: center; }
    .album-hero-meta { justify-content: center; }
    .album-hero-desc { text-align: center; }
    .album-hero .btn-row { width: 100%; display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 14px; }
    .album-hero .btn { height: 46px; border-radius: 11px; font-size: 16px; }
    .album-hero .btn-play { background: var(--fill-2); color: var(--tint); }
    .album-hero-more { display: none; }

    .artist-hero { height: 62vh; min-height: 300px; max-height: 520px; padding-bottom: 22px; margin-bottom: 22px; }
    .artist-hero--field { height: auto; min-height: 0; padding-top: calc(var(--topbar-h) + 28px); }
    .artist-hero--field .artist-hero-content { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 16px 14px; }
    .artist-hero--field .artist-hero-avatar { grid-column: 1 / -1; }
    .artist-hero-avatar { width: 112px; flex-basis: 112px; }
    .artist-hero-avatar .art { }
    .artist-hero-name { font-size: clamp(34px, 11vw, 52px); }
    .artist-hero-play { width: 50px; height: 50px; }
    .artist-hero-content { flex-wrap: nowrap; }
    .artist-hero--field .artist-hero-actions { margin-left: 0; }
    .artist-hero-actions .btn-icon { display: none; }

    .lib-row { font-size: 20px; min-height: 52px; }
    .top-result { padding: 14px; }
    .top-result .art { width: 72px; flex-basis: 72px; }
    .top-result-name { font-size: 19px; }
    .search-head { top: calc(var(--topbar-h) - 4px); }

    /* Floating mini player */
    .now-playing-bar {
        position: fixed; z-index: 900;
        left: 10px; right: 10px;
        bottom: calc(var(--tab-h) + 8px);
        height: var(--mini-h);
        display: none;
        grid-template-columns: minmax(0, 1fr) auto;
        gap: 6px; padding: 0 8px 0 8px;
        border-radius: 16px;
        background: rgba(34, 37, 42, 0.86);
        -webkit-backdrop-filter: saturate(180%) blur(28px); backdrop-filter: saturate(180%) blur(28px);
        border: none;
        box-shadow: var(--glass-edge), 0 12px 40px rgba(0, 4, 10, 0.55);
        overflow: hidden;
    }
    .now-playing-bar.visible { display: grid; animation: mini-in 0.35s var(--ease); }
    @keyframes mini-in { from { transform: translateY(12px); opacity: 0; } }
    .np-track-info { gap: 11px; }
    .np-artwork { width: 46px; height: 46px; flex-basis: 46px; border-radius: 7px; }
    .np-title { font-size: 15px; font-weight: 550; }
    .np-artist { font-size: 13px; }
    .np-like, .np-extra, .np-scrubber, .np-shuffle, .np-repeat, .np-prev { display: none !important; }
    .np-center { flex-direction: row; }
    .np-buttons { gap: 2px; }
    .play-btn { width: 44px; height: 44px; background: transparent; color: var(--label); }
    .play-btn svg { width: 24px; height: 24px; }
    .np-next { width: 44px; height: 44px; }
    .np-next svg { width: 28px !important; height: 28px !important; }
    .np-mini-progress { display: block; position: absolute; left: 14px; right: 14px; bottom: 0; height: 2px; background: rgba(255,255,255,0.1); border-radius: 2px; overflow: hidden; }
    .np-mini-progress div { height: 100%; width: 0; background: rgba(255,255,255,0.7); }

    /* Tab bar */
    .mobile-nav {
        display: block;
        position: fixed; left: 0; right: 0; bottom: 0; z-index: 890;
        height: var(--tab-h);
        padding-bottom: env(safe-area-inset-bottom);
        background: rgba(18, 18, 20, 0.84);
        -webkit-backdrop-filter: saturate(180%) blur(28px); backdrop-filter: saturate(180%) blur(28px);
        border-top: 1px solid var(--sep);
    }
    .mobile-nav-items { display: grid; grid-template-columns: repeat(4, 1fr); height: 56px; }
    .mobile-nav-item {
        display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
        color: rgba(235,235,245,0.5); font-size: 10.5px; font-weight: 550;
        -webkit-tap-highlight-color: transparent;
    }
    .mobile-nav-item svg { width: 25px; height: 25px; }
    .mobile-nav-item.active { color: var(--tint); }
    body:has(.fullscreen-player.open) .mobile-nav { visibility: hidden; }
    .keyboard-open .mobile-nav, .keyboard-open .now-playing-bar { display: none !important; }

    .toast { bottom: calc(var(--tab-h) + 16px); }
    body.has-player .toast { bottom: calc(var(--tab-h) + var(--mini-h) + 22px); }
    .queue-panel { display: none; }

    /* Now Playing sheet */
    .fullscreen-player { border-radius: 0; }
    .fs-top { grid-template-columns: 40px 1fr 40px; padding: 10px 18px 0; min-height: 50px; }
    .fs-close { background: transparent; }
    .fs-close svg { width: 26px; height: 26px; }
    .fs-top-more { background: rgba(255,255,255,0.14); width: 32px; height: 32px; }
    .fs-grabber { display: block; justify-self: center; width: 38px; height: 5px; border-radius: 3px; background: rgba(255,255,255,0.35); grid-column: 2; grid-row: 1; align-self: start; margin-top: -2px; }
    .fs-source { grid-column: 2; grid-row: 1; margin-top: 14px; }
    .fs-layout { padding: 6px 28px 18px; display: flex; flex-direction: column; justify-content: center; gap: 0; }
    .fs-main { width: 100%; height: 100%; max-width: 480px; justify-content: space-between; }
    .fs-stage { flex: 1; min-height: 0; display: flex; align-items: center; justify-content: center; }
    .fs-artwork { width: min(100%, 46vh); margin: 0 auto; border-radius: 10px; }
    .fs-info { margin: 18px 0 12px; }
    .fs-title { font-size: 20px; }
    .fs-artist { font-size: 18px; }
    .fs-controls { margin: 6px 0 16px; }
    .fs-ctrl { width: 60px; height: 60px; }
    .fs-ctrl svg { width: 36px; height: 36px; }
    .fs-play-btn svg { width: 46px; height: 46px; }
    .fs-bottom { margin-top: 18px; }

    /* Queue view inside the sheet */
    .fullscreen-player.show-queue .fs-stage { flex: 0 0 auto; display: block; }
    .fullscreen-player.show-queue .fs-artwork, .fullscreen-player.show-queue .fs-info { display: none; }
    .fullscreen-player.show-queue .fs-mini-head {
        display: grid; grid-template-columns: 64px minmax(0, 1fr) 36px; gap: 14px; align-items: center;
        padding: 8px 0 14px;
    }
    .fs-mini-head .art { box-shadow: 0 8px 20px rgba(0,0,0,0.35); }
    .fs-mini-head .t { font-weight: 650; font-size: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
    .fs-mini-head .a { color: rgba(255,255,255,0.65); font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
    .fullscreen-player.show-queue .fs-queue-mobile { display: flex; flex-direction: column; flex: 1; min-height: 0; margin-bottom: 10px; }
    .fullscreen-player .fs-side, .fullscreen-player.show-queue .fs-side { display: none !important; }

    /* Action sheet */
    .ctx-backdrop { background: rgba(0,0,0,0.45); }
    .context-menu {
        left: 8px !important; right: 8px !important; top: auto !important;
        bottom: calc(8px + env(safe-area-inset-bottom));
        min-width: 0; max-width: none; width: auto;
        padding: 0; border-radius: 16px; border: none;
        background: transparent;
        -webkit-backdrop-filter: none; backdrop-filter: none;
        box-shadow: none;
        max-height: 82vh; overflow-y: auto;
    }
    .context-menu.visible { animation: sheet-in 0.3s var(--ease); }
    @keyframes sheet-in { from { transform: translateY(40px); opacity: 0; } }
    .ctx-sheet {
        background: rgba(40, 40, 44, 0.92);
        -webkit-backdrop-filter: saturate(180%) blur(30px); backdrop-filter: saturate(180%) blur(30px);
        border-radius: 14px; overflow: hidden;
    }
    .ctx-head {
        display: grid; grid-template-columns: 48px minmax(0, 1fr); gap: 12px; align-items: center;
        padding: 12px 14px; border-bottom: 1px solid var(--sep);
    }
    .ctx-head .art { }
    .ctx-head-title { font-weight: 600; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
    .ctx-head-sub { color: var(--label-2); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
    .ctx-item { padding: 0 16px; min-height: 50px; border-radius: 0; font-size: 17px; border-bottom: 1px solid var(--sep); }
    .ctx-item:last-child { border-bottom: none; }
    .ctx-item svg { width: 20px; height: 20px; color: var(--label); }
    .ctx-item:hover { background: transparent; color: var(--label); }
    .ctx-item:hover svg { color: var(--label); }
    .ctx-item:active { background: var(--fill-2); }
    .ctx-item.danger:hover { background: transparent; color: var(--danger); }
    .ctx-item.danger:hover svg { color: var(--danger); }
    .ctx-divider { height: 8px; margin: 0; background: rgba(0,0,0,0.25); }
    .ctx-cancel {
        display: block; width: 100%; margin-top: 8px; min-height: 56px; border-radius: 14px;
        background: rgba(40, 40, 44, 0.95); color: var(--tint); font-size: 17px; font-weight: 650;
    }

    /* Bottom-sheet modals */
    .playlist-picker-overlay, .playlist-modal-overlay { align-items: flex-end; padding: 0; }
    .playlist-picker, .playlist-modal { width: 100%; max-height: 88vh; border-radius: 14px 14px 0 0; padding-bottom: calc(16px + env(safe-area-inset-bottom)); transform: translateY(40px); }

    .settings-wrap { padding-top: 0; }
    .auth-modal { padding: 30px 22px 22px; }

    /* Welcome gate */
    .auth-gate { padding: max(18px, env(safe-area-inset-top)) 22px max(16px, env(safe-area-inset-bottom)); }
    .welcome-layout { grid-template-columns: 1fr; gap: 0; padding-block: 32px 18px; }
    .welcome-title { font-size: clamp(44px, 13vw, 64px); }
    .welcome-description { font-size: 16px; }
    .welcome-cta { width: 100%; }
    .welcome-benefits { gap: 14px; margin-top: 26px; }
    .welcome-benefits span { font-size: 13px; }
    .welcome-art { width: 84%; margin: 18px auto 0; }
    .welcome-art img { max-height: 300px; }
    .welcome-art-caption { display: none; }
    .welcome-bottom { font-size: 12px; flex-wrap: wrap; }
}

/* Landscape phones: keep the Now Playing sheet usable */
@media (orientation: landscape) and (max-height: 500px) {
    .fs-layout { grid-template-columns: minmax(0, 0.8fr) minmax(0, 1fr) !important; display: grid !important; padding: 4px 24px 10px; }
    .fs-main { display: contents; }
    .fs-stage { grid-row: 1 / span 6; align-self: center; }
    .fs-artwork { width: min(100%, 62vh) !important; }
    .fs-side { display: none; }
    .fs-volume, .fs-bottom { margin-top: 6px; }
    .fs-info { margin: 0 0 6px; }
}

/* Native app chrome */
.capacitor-app { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; -webkit-tap-highlight-color: transparent; }
.capacitor-app input, .capacitor-app textarea { -webkit-user-select: text; user-select: text; }
@media (max-width: 767px), (pointer: coarse) and (max-width: 900px) {
    .card, .track-row, .quick-row, .now-playing-bar, .fullscreen-player, .mobile-nav, .context-menu, .lib-row, .tile {
        -webkit-touch-callout: none; -webkit-user-select: none; user-select: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
    .fs-blob { animation: none !important; }
}

/* Top Picks: the badge carries the identity; the field behind it stays wordless. */
.pick-body:has(.pick-badge) > .art .art-initials { display: none; }
