/* JustVibeMe — Apple Music-inspired visual system.
   Loaded last so it can restyle the existing component set without removing
   the playback, catalogue, and radio behavior underneath. */

:root {
  --font-display: "SF Pro Display", "SF Pro Text", -apple-system, BlinkMacSystemFont, "Segoe UI Variable Display", "Segoe UI", sans-serif;
  --font-text: "SF Pro Text", -apple-system, BlinkMacSystemFont, "Segoe UI Variable Text", "Segoe UI", sans-serif;
  --accent: var(--art-accent, #f0f0f2);
  --accent-hover: var(--art-glow, #d0d0d6);
  --accent-soft: var(--art-glass, rgba(255, 255, 255, .08));
  --bg: #000;
  --side: #0a0a0a;
  --surface: #121212;
  --raised: #2a2a2c;
  --text: #f5f5f7;
  --muted: rgba(255, 255, 255, .65);
  --muted-2: rgba(255, 255, 255, .40);
  --line: rgba(255, 255, 255, .12);
  --line-strong: rgba(255, 255, 255, .20);
  --green: var(--accent);
  --paper: #000;
  --sidebar: 252px;
  --room: 300px;
  --player: 76px;
  --radius: 10px;
  --radius-lg: 18px;
  --shadow-card: 0 14px 34px rgba(0, 0, 0, .36);
  --shadow-float: 0 30px 90px rgba(0, 0, 0, .65);
}

* { box-sizing: border-box; }
html { background: var(--bg); }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-text);
  font-size: 14px;
  letter-spacing: -.01em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
h1, h2, h3, h4, .brand-name, .footer-brand, .hero-tag, .am-mix-art strong { font-family: var(--font-display); }
h2 { font-weight: 700; letter-spacing: -.045em; }
button, input, select, textarea { font-family: inherit; }
a { color: inherit; }
::selection { background: var(--accent); color: #fff; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, .16); border-radius: 10px; border: 2px solid #000; }
::-webkit-scrollbar-thumb:hover { background: rgba(255, 255, 255, .28); }

.icon-btn { color: var(--muted); border-radius: 50%; }
.icon-btn:hover { color: var(--text); background: rgba(255, 255, 255, .08); }
.small-link { color: var(--muted); font-size: 12.5px; gap: 7px; }
.small-link:hover { color: var(--text); }
.small-link span { font-size: 17px; }

/* ───────────────────────── Account gate / welcome ───────────────────────── */

body.auth-locked { overflow: hidden; }
body.auth-locked .sidebar,
body.auth-locked .main-shell,
body.auth-locked .listening-panel,
body.auth-locked .player { filter: blur(20px) saturate(.8); transform: scale(1.015); pointer-events: none; user-select: none; }

.auth-screen {
  position: fixed;
  inset: 0;
  z-index: 400;
  display: grid;
  grid-template-columns: 1.12fr .88fr;
  background: #050506;
  overflow: auto;
}
.auth-screen[hidden] { display: none !important; }
.auth-visual {
  position: relative;
  display: flex;
  align-items: flex-end;
  min-height: 100%;
  padding: clamp(38px, 5vw, 84px);
  overflow: hidden;
  background:
    #1b1b1f;
}
.auth-collage {
  position: absolute;
  inset: -12% -10% auto auto;
  width: 72%;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
  transform: rotate(-9deg) translate(9%, -4%);
  opacity: .83;
  filter: saturate(.9);
  pointer-events: none;
}
.auth-collage img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 14px;
}
.auth-collage img:nth-child(2n) { transform: translateY(28px); }
.auth-collage img:nth-child(3n) { transform: translateY(-16px); }
.auth-visual:after {
  content: "";
  position: absolute;
  inset: 0;
  background: #050506;
  pointer-events: none;
}
.auth-visual-copy { position: relative; z-index: 2; max-width: 620px; }
.auth-mini-brand { display: inline-flex; align-items: center; gap: 9px; font-weight: 650; letter-spacing: -.02em; color: rgba(255,255,255,.8); margin-bottom: 28px; }
.auth-mini-brand svg { width: 19px; height: 19px; }
.auth-visual-copy h2 { font-size: clamp(44px, 5.2vw, 82px); line-height: .98; letter-spacing: -.055em; font-weight: 700; margin: 0 0 24px; }
.auth-visual-copy h2 em { font-style: normal; color: var(--accent); }
.auth-visual-copy > p { max-width: 420px; color: rgba(255,255,255,.68); font-size: clamp(14px, 1.2vw, 17px); line-height: 1.55; }
.auth-people { display: flex; align-items: center; margin-top: 40px; }
.auth-people span { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 50%; background: #2c2c2e; border: 2px solid #0b0b0c; margin-right: -8px; font-size: 12px; font-weight: 600; color: #d2d2d7; }
.auth-people span:nth-child(2) { background: #3b2f3f; }
.auth-people span:nth-child(3) { background: #2c3b34; }
.auth-people span:nth-child(4) { background: #3d3230; }
.auth-people b { margin-left: 22px; font-weight: 450; font-size: 12px; color: rgba(255,255,255,.56); }
.auth-panel {
  display: grid;
  place-items: center;
  min-height: 100%;
  padding: 42px clamp(28px, 4vw, 72px);
  background: #0d0d0f;
  border-left: 1px solid var(--line);
}
.auth-panel-inner { width: min(420px, 100%); }
.auth-logo { margin-bottom: 48px; padding: 0; }
.auth-logo .brand-name { display: inline-block; }
.auth-logo .brand-mark { display: flex; }
.auth-panel .eyebrow { color: var(--muted-2); }
.auth-panel h1 { font-size: clamp(28px, 2.6vw, 38px); line-height: 1.1; letter-spacing: -.045em; margin: 12px 0 10px; }
.auth-lead { color: var(--muted); font-size: 13.5px; line-height: 1.6; margin-bottom: 26px; }
.auth-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; background: #1c1c1e; border-radius: 10px; margin-bottom: 24px; }
.auth-tabs button { padding: 10px; border-radius: 7px; font-size: 13px; font-weight: 550; color: var(--muted); }
.auth-tabs button[aria-selected="true"] { background: #3a3a3c; color: #fff; }
.auth-form { display: grid; gap: 8px; }
.auth-form label { font-size: 11.5px; font-weight: 550; color: var(--muted); margin-top: 8px; }
.auth-form input {
  width: 100%;
  padding: 12px 13px;
  background: #1c1c1e;
  border: 1px solid transparent;
  border-radius: 9px;
  color: var(--text);
  font-size: 14px;
  outline: 0;
  transition: border-color .16s, background .16s;
}
.auth-form input:focus { border-color: rgba(255, 255, 255, .1); background: #202022; }
.auth-form input::placeholder { color: #636368; }
.auth-field-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.auth-field-pair > div { display: grid; gap: 8px; }
.auth-error { min-height: 18px; margin: 8px 0 0; color: #ff6b7d; font-size: 12px; line-height: 1.4; }
.auth-submit {
  margin-top: 8px;
  width: 100%;
  padding: 12px 18px;
  border-radius: 9px;
  background: var(--accent);
  color: #fff;
  font-size: 14px;
  font-weight: 650;
  transition: background .16s, transform .16s;
}
.auth-submit:hover { background: var(--accent-hover); }
.auth-submit:active { transform: scale(.99); }
.auth-submit:disabled { opacity: .6; cursor: wait; }
.auth-guest { display: block; margin: 24px auto 0; color: var(--muted); font-size: 12.5px; }
.auth-guest:hover { color: var(--text); text-decoration: underline; text-underline-offset: 3px; }
.auth-note { margin-top: 30px; color: var(--muted-2); font-size: 10.5px; line-height: 1.6; text-align: center; }

/* ─────────────────────────────── Sidebar ──────────────────────────────── */

.sidebar {
  position: fixed;
  inset: 0 auto var(--player) 0;
  width: var(--sidebar);
  padding: 22px 14px 14px;
  display: flex;
  flex-direction: column;
  background: rgba(29, 29, 31, .7);
  backdrop-filter: blur(38px) saturate(1.5);
  -webkit-backdrop-filter: blur(38px) saturate(1.5);
  border-right: 1px solid var(--line);
  z-index: 20;
}
.logo { display: flex; align-items: center; gap: 10px; padding: 0 8px; margin-bottom: 30px; font: 700 21px/1 var(--font-display); letter-spacing: -.035em; }
.brand-mark { display: flex; align-items: center; justify-content: center; gap: 2px; width: 31px; height: 31px; margin: 0; transform: none; border-radius: 8px; background: #3be07a; }
.brand-mark i { width: 2px; border-radius: 2px; background: #fff; height: 7px; }
.brand-mark i:nth-child(2) { height: 13px; }
.brand-mark i:nth-child(3) { height: 10px; }
.brand-mark i:nth-child(4) { height: 5px; }
.brand-name { white-space: nowrap; }
.logo-accent { color: var(--accent); }
.side-label { display: flex; align-items: center; justify-content: space-between; padding: 0 10px; margin: 16px 0 7px; color: var(--muted-2); font-size: 10.5px; font-weight: 600; letter-spacing: .07em; }
.side-label .icon-btn { width: 22px; height: 22px; }
.side-label svg { width: 15px; height: 15px; }
.main-nav { display: grid; gap: 1px; margin-bottom: 4px; }
.nav-button {
  position: relative;
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 8px 10px;
  border-radius: 8px;
  color: #d2d2d7;
  font-size: 13.5px;
  font-weight: 450;
  text-align: left;
  transition: background .15s, color .15s;
}
.nav-button svg { width: 19px; height: 19px; color: #8e8e93; stroke-width: 1.8; transition: color .15s; }
.nav-button:hover { background: rgba(255, 255, 255, .06); color: #fff; }
.nav-button.active { background: rgba(255, 255, 255, .1); color: #fff; font-weight: 550; }
.nav-button.active svg { color: var(--accent); }
.nav-button.active:before { display: none; }
.radio-nav-dot { margin-left: auto; width: 6px; height: 6px; background: var(--accent); border-radius: 50%; }
.library-nav .nav-button svg { color: #8e8e93; }
.saved-link { display: flex; align-items: center; gap: 11px; width: 100%; margin: 2px 0; padding: 7px 10px; border-radius: 8px; color: #d2d2d7; font-size: 13.5px; text-align: left; }
.saved-link:hover { background: rgba(255,255,255,.06); }
.saved-link.active { background: rgba(255,255,255,.1); }
.saved-art { width: 28px; height: 28px; border-radius: 6px; display: grid; place-items: center; background: #1ed760; color: #fff; flex-shrink: 0; }
.saved-art svg { width: 15px; height: 15px; }
.saved-link small { display: block; margin-top: 2px; color: var(--muted-2); font-size: 10.5px; }
#sidebar-playlists { max-height: 30vh; overflow: auto; padding: 0 2px; }
.playlist-link { display: block; width: 100%; padding: 7px 10px; border-radius: 7px; color: #a1a1a6; font-size: 12.5px; text-align: left; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.playlist-link:before { content: ""; display: inline-block; width: 9px; height: 9px; margin-right: 9px; border-radius: 2px; background: #3a3a3c; vertical-align: 0; }
.playlist-link:hover { background: rgba(255,255,255,.05); color: #fff; }
.user-button { margin-top: auto; display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 9px; border-radius: 10px; text-align: left; background: rgba(255, 255, 255, .055); border: 1px solid rgba(255,255,255,.05); }
.user-button:hover { background: rgba(255, 255, 255, .09); }
.user-button:after { content: none; }
.avatar { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; flex-shrink: 0; background: #5e5ce6; color: #fff; font-size: 12px; font-weight: 650; }
.user-button > span:nth-child(2) { min-width: 0; overflow: hidden; }
.user-button strong { display: block; color: #f5f5f7; font-size: 12.5px; font-weight: 550; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-button small { display: block; color: var(--muted-2); font-size: 10px; margin-top: 2px; }
.user-button > svg { width: 16px; height: 16px; margin-left: auto; color: var(--muted-2); }

/* ──────────────────────────────── Topbar ──────────────────────────────── */

.main-shell { margin-left: var(--sidebar); margin-right: var(--room); padding-bottom: var(--player); min-height: 100vh; }
.topbar {
  position: sticky;
  top: 0;
  z-index: 15;
  height: 64px;
  padding: 0 30px;
  display: flex;
  align-items: center;
  gap: 20px;
  background: rgba(0, 0, 0, .72);
  backdrop-filter: blur(30px) saturate(1.6);
  -webkit-backdrop-filter: blur(30px) saturate(1.6);
  border-bottom: 1px solid var(--line);
}
.topbar-context { display: flex; align-items: center; gap: 9px; margin-right: auto; color: var(--muted); font-size: 12.5px; }
#connection-status { width: 6px; height: 6px; border-radius: 50%; background: #30d158; font-size: 0; }
#connection-status:empty { visibility: hidden; }
.breadcrumb { color: var(--muted); white-space: nowrap; }
.search-box { display: flex; align-items: center; gap: 9px; width: 330px; padding: 8px 12px; background: rgba(255, 255, 255, .1); border: 1px solid transparent; border-radius: 9px; color: var(--muted); transition: background .15s, border-color .15s; }
.search-box:focus-within { background: rgba(255, 255, 255, .14); border-color: rgba(255,255,255,.16); }
.search-box svg { width: 16px; height: 16px; }
.search-box input { width: 100%; min-width: 0; padding: 0; border: 0; outline: 0; background: transparent; color: var(--text); font-size: 12.5px; }
.search-box input::placeholder { color: var(--muted-2); }
.search-box kbd { padding: 0 4px; border: 1px solid rgba(255,255,255,.16); border-radius: 4px; color: var(--muted-2); font-size: 10px; }

/* ─────────────────────────────── Heading ─────────────────────────────── */

main { max-width: 1500px; margin: 0 auto; padding: 34px 34px 0; }
.intro { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 26px; }
.intro .eyebrow { color: var(--muted-2); font-size: 10px; letter-spacing: .13em; font-weight: 650; }
h1 { font-size: clamp(30px, 3.1vw, 42px); line-height: 1.06; letter-spacing: -.055em; font-weight: 700; margin-top: 8px; }
h1 span { color: inherit; }
#view-subtitle { margin-top: 7px; color: var(--muted); font-size: 13.5px; letter-spacing: -.005em; }
.mood-buttons { display: flex; gap: 6px; }

/* ─────────────────────────────── Hero ───────────────────────────────── */

.am-hero {
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(240px, .9fr);
  align-items: center;
  min-height: 336px;
  margin-bottom: 42px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: #161618;
  border: 1px solid rgba(255, 255, 255, .06);
}
.hero-backdrop { position: absolute; inset: -18%; z-index: -2; }
.hero-backdrop img { width: 100%; height: 100%; object-fit: cover; filter: blur(54px) saturate(1.5); opacity: .55; transform: scale(1.12); }
.hero-backdrop:after { content: ""; position: absolute; inset: 0; background: rgba(0, 0, 0, 0.28); }
.am-hero-copy { position: relative; z-index: 2; display: flex; flex-direction: column; justify-content: center; padding: 40px 24px 40px 44px; }
.hero-tag { display: flex; align-items: center; gap: 8px; color: var(--accent); font-size: 10.5px; font-weight: 700; letter-spacing: .14em; }
.hero-tag .mini-mark { font-size: 10px; }
.am-hero h2 { max-width: 600px; margin: 13px 0 0; font-size: clamp(36px, 4.2vw, 60px); line-height: 1.02; letter-spacing: -.06em; font-weight: 700; overflow-wrap: anywhere; }
.am-hero h2.long { font-size: clamp(29px, 3.2vw, 45px); line-height: 1.05; letter-spacing: -.05em; }
#hero-subtitle { max-width: 460px; margin-top: 14px; color: rgba(255, 255, 255, .72); font-size: 14px; line-height: 1.57; }
.hero-actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 24px; }
.hero-byline { margin-top: 19px; color: rgba(255,255,255,.48); font-size: 10.5px; letter-spacing: .08em; }
.hero-number { position: absolute; right: 28px; bottom: 20px; z-index: 3; color: rgba(255,255,255,.5); font-size: 11px; letter-spacing: .1em; }
.hero-number span { font-size: 8px; letter-spacing: .18em; }
.am-hero-art { position: relative; z-index: 2; display: grid; place-items: center; padding: 34px 42px 34px 8px; }
.am-hero-art img { width: min(272px, 100%); aspect-ratio: 1; object-fit: cover; border-radius: 12px; transform: rotate(1deg); }
.green-button, .dark-button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 10px 20px; border-radius: 980px; background: var(--accent); color: #fff; font-size: 13px; font-weight: 600; transition: background .15s, transform .15s; }
.green-button:hover, .dark-button:hover { background: var(--accent-hover); color: #fff; }
.green-button svg, .dark-button svg { width: 15px; height: 15px; }
.green-button:disabled { opacity: .45; transform: none; }
.outline-button { display: inline-flex; align-items: center; justify-content: center; gap: 10px; padding: 9px 17px; border: 1px solid rgba(255,255,255,.18); border-radius: 980px; background: rgba(255,255,255,.04); color: #f5f5f7; font-size: 12.5px; font-weight: 500; transition: background .15s, border-color .15s; }
.outline-button:hover { background: rgba(255,255,255,.1); border-color: rgba(255,255,255,.28); color: #fff; }
.hero-secondary[hidden] { display: none; }

/* ─────────────────────────────── Shelves ─────────────────────────────── */

.shelves { margin-bottom: 42px; }
.section-title { display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; margin-bottom: 15px; }
.section-title h2 { font-size: 21px; line-height: 1.18; letter-spacing: -.045em; font-weight: 700; }
.section-title > span, .shelf-tag { color: var(--muted-2); font-size: 9.5px; letter-spacing: .11em; font-weight: 600; }
.shelf-sub { margin-top: 4px; color: var(--muted); font-size: 12px; line-height: 1.45; }
.shelf-action { flex-shrink: 0; }
.shelf-row {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 172px;
  gap: 20px;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 2px 2px 8px;
  scroll-snap-type: x proximity;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.shelf-row::-webkit-scrollbar { display: none; }
.shelf-row:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; border-radius: 10px; }
.shelf-row > * { scroll-snap-align: start; }
.artist-shelf, .artist-strip {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 128px;
  gap: 18px;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 2px 2px 8px;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.artist-shelf::-webkit-scrollbar, .artist-strip::-webkit-scrollbar { display: none; }
.artist-strip:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; border-radius: 10px; }
.artist-card { display: flex; flex-direction: column; align-items: center; gap: 9px; min-width: 0; text-align: center; }
.artist-card img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 50%; filter: none; transition: transform .2s; }
.artist-card strong { width: 100%; font-size: 12px; font-weight: 550; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.artist-card small { margin-top: -4px; color: var(--muted-2); font-size: 10.5px; }
.artist-card span.artist-fallback { width: 100%; aspect-ratio: 1; border-radius: 50%; display: grid; place-items: center; background: #3a3a3c; color: var(--muted); font-size: 26px; font-weight: 600; }

/* Cards generated by home.js */
.am-card { min-width: 0; text-align: left; }
.am-card-art { position: relative; display: block; width: 100%; aspect-ratio: 1; padding: 0; border-radius: 9px; overflow: hidden; background: #242426; }
.am-card-art img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s cubic-bezier(.2,.7,.2,1), filter .25s; }
.am-card-art:hover img { filter: brightness(.88); }
.am-card-art:focus-visible img { filter: brightness(.8); }
.am-card-play { position: absolute; right: 9px; bottom: 9px; width: 31px; height: 31px; display: grid; place-items: center; border-radius: 50%; background: rgba(0,0,0,.62); backdrop-filter: blur(10px); color: #fff; opacity: 0; transform: translateY(5px); transition: opacity .18s, transform .18s; }
.am-card-play svg { width: 14px; height: 14px; }
.am-card-art:focus-visible .am-card-play { opacity: 1; transform: none; }
.am-card-art:hover .am-card-play { opacity: 1; }
.am-badge { position: absolute; top: 8px; left: 8px; padding: 3px 7px; border-radius: 5px; background: var(--accent); color: #fff; font-size: 8px; font-weight: 700; letter-spacing: .08em; }
.am-card h3 { margin-top: 9px; font-size: 13px; font-weight: 550; line-height: 1.35; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.am-card p { margin-top: 3px; color: var(--muted); font-size: 11.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.am-card p + p { margin-top: 2px; color: var(--muted-2); font-size: 10.5px; }
.am-skeleton .am-card-art { background: #1c1c1e; background-size: 200% 100%; animation: am-shimmer 1.5s infinite linear; }
.am-skeleton .am-skeleton-line { height: 11px; margin-top: 10px; border-radius: 4px; background: #1c1c1e; }
.am-skeleton .am-skeleton-line.short { width: 58%; }
@keyframes am-shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }
.shelf-empty { grid-column: 1 / -1; padding: 24px 2px; color: var(--muted); font-size: 12.5px; line-height: 1.6; }

/* Made for You mixes */
.mix-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; }
.am-mix-card { min-width: 0; text-align: left; }
.am-mix-art {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  width: 100%;
  aspect-ratio: 1;
  padding: 15px;
  border-radius: 10px;
  overflow: hidden;
  isolation: isolate;
  background: var(--mix-a, #5e5ce6);
  transition: transform .22s, box-shadow .22s;
}
.am-mix-art img { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; object-fit: cover; opacity: .34; filter: saturate(1.35); }
.am-mix-art:after { content: ""; position: absolute; inset: 0; z-index: -1; background: rgba(0, 0, 0, 0.26); }
.am-mix-art > span:first-child { color: rgba(255,255,255,.78); font-size: 8px; font-weight: 650; letter-spacing: .12em; }
.am-mix-art strong { position: relative; margin-top: auto; color: #fff; font-size: clamp(20px, 1.8vw, 27px); line-height: 1.06; letter-spacing: -.045em; font-weight: 700; text-wrap: balance; }
.am-mix-art small { position: relative; margin-top: 7px; color: rgba(255,255,255,.72); font-size: 10.5px; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.am-mix-play { position: absolute; right: 12px; bottom: 12px; width: 33px; height: 33px; display: grid; place-items: center; border-radius: 50%; background: rgba(255,255,255,.18); backdrop-filter: blur(10px); color: #fff; opacity: 0; transform: translateY(4px); transition: .18s; }
.am-mix-play svg { width: 14px; height: 14px; }
.am-mix-art:hover .am-mix-play { opacity: 1; }
.am-mix-card h3 { margin-top: 9px; font-size: 13px; font-weight: 550; }
.am-mix-card p { margin-top: 3px; color: var(--muted); font-size: 11.5px; }

/* Legacy cover cards are still used by search and the listening panel. */
.cover-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 18px; }
.cover-card { min-width: 0; text-align: left; }
.cover-button { display: block; width: 100%; padding: 0; position: relative; border-radius: 9px; overflow: hidden; aspect-ratio: 1; background: #242426; }
.cover-button img { display: block; width: 100%; height: 100%; object-fit: cover; filter: none; transition: transform .3s; }
.cover-card h3 { margin-top: 9px; font-size: 13px; font-weight: 550; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cover-card .artist-link { margin-top: 3px; font-size: 11.5px; color: var(--muted); }
.mix-play { position: absolute; right: 9px; bottom: 9px; width: 31px; height: 31px; display: grid; place-items: center; border-radius: 50%; background: rgba(0,0,0,.62); color: #fff; opacity: 0; transform: translateY(5px); transition: .2s; backdrop-filter: blur(10px); }
.mix-play svg { width: 14px; height: 14px; }
.cover-button:focus-visible .mix-play { opacity: 1; transform: none; }
.cover-button:hover .mix-play { opacity: 1; }
.album-caption { margin-top: 4px; color: var(--muted-2); font-size: 10.5px; text-transform: none; }

/* ──────────────────────── Radio block on the home page ─────────────────── */

.personal-home { margin: 4px 0 42px; }
.personal-home > .section-title { align-items: flex-end; margin-bottom: 15px; }
.personal-home > .section-title .eyebrow { margin-bottom: 6px; color: var(--accent); font-size: 9px; letter-spacing: .13em; }
.personal-home > .section-title h2 { font-size: 21px; }
.personal-home-grid { display: grid; grid-template-columns: minmax(250px, .8fr) 1.35fr; gap: 18px; }
.radio-home-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  min-height: 246px;
  padding: 22px;
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 12px;
  overflow: hidden;
  text-align: left;
  background:
    #2b1b22;
}
.radio-home-card:after { content: ""; position: absolute; width: 230px; height: 230px; right: -110px; top: 28px; border: 1px solid rgba(255,255,255,.09); border-radius: 50%; transform: scaleY(1.35); pointer-events: none; }
.radio-home-card:hover { border-color: rgba(255,255,255,.16); }
.radio-home-card > span { display: flex; align-items: center; gap: 7px; color: rgba(255,255,255,.68); font-size: 8.5px; font-weight: 650; letter-spacing: .12em; }
.radio-home-card > span svg { width: 15px; height: 15px; color: var(--accent); }
.radio-home-card strong { margin: 22px 0 12px; color: #fff; font: 700 36px/1.02 var(--font-display); letter-spacing: -.055em; }
.radio-home-card small { max-width: 230px; color: rgba(255,255,255,.63); font-size: 11px; line-height: 1.5; }
.radio-home-card b { margin-top: auto; padding-top: 18px; color: #fff; font-size: 10.5px; font-weight: 500; }
.personal-picks { display: grid; align-content: center; gap: 2px; }
.personal-picks > article { display: flex; align-items: center; gap: 12px; padding: 8px 6px; border-bottom: 1px solid var(--line); border-radius: 7px; }
.personal-picks > article:last-child { border-bottom: 0; }
.personal-picks > article:hover { background: rgba(255,255,255,.05); }
.personal-picks img { width: 46px; height: 46px; border-radius: 5px; object-fit: cover; }
.personal-picks .track-title { display: block; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12.5px; font-weight: 550; }
.personal-picks small { display: block; margin-top: 2px; color: var(--muted); font-size: 11px; }
.personal-picks article > div > span { display: block; margin-top: 3px; color: var(--muted-2); font-size: 10px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.personal-picks > p { color: var(--muted); font-size: 12px; line-height: 1.65; padding: 20px 6px; }

/* ─────────────────────────────── Track rows ────────────────────────────── */

.am-track-list { border-top: 1px solid var(--line); padding-top: 5px; }
.track-row { display: grid; grid-template-columns: 24px 46px minmax(0, 1fr) 46px 32px 32px; align-items: center; gap: 13px; min-height: 60px; padding: 7px 9px; border-radius: 7px; }
.track-row:nth-child(even) { background: transparent; }
.track-row:hover { background: rgba(255,255,255,.06); }
.track-row.playing { background: var(--accent-soft); }
.track-index { color: var(--muted-2); font-size: 11px; text-align: center; }
.track-row.playing .track-index, .track-row.playing .track-title { color: var(--accent); }
.track-art { width: 44px; height: 44px; border-radius: 5px; object-fit: cover; }
.track-main { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; min-width: 0; }
.track-title { max-width: 100%; padding: 0; overflow: hidden; text-align: left; text-overflow: ellipsis; white-space: nowrap; color: var(--text); font-size: 13.5px; font-weight: 500; }
.track-title:hover { text-decoration: underline; text-underline-offset: 3px; }
.artist-link { padding: 0; color: var(--muted); font-size: 11.5px; font-weight: 400; text-align: left; }
.artist-link:hover { color: var(--text); text-decoration: underline; text-underline-offset: 3px; }
.track-time { color: var(--muted-2); font-size: 11px; font-variant-numeric: tabular-nums; text-align: right; }
.track-row .icon-btn { width: 28px; height: 28px; }
.track-row svg { width: 16px; height: 16px; }
.liked { color: var(--accent) !important; }
.liked svg { fill: var(--accent); }
.track-row .add-track { opacity: 0; }
.track-row:hover .add-track, .track-row:focus-within .add-track { opacity: 1; }
.song-list-label { border-bottom: 1px solid var(--line); color: var(--muted-2); }
.radio-song { border-bottom: 1px solid var(--line); }
.radio-song-context { color: var(--muted-2); }
.radio-song-context > span { color: var(--muted); }
.radio-song-context button:hover { color: var(--accent); }

/* ───────────────────────────── Misc app chrome ─────────────────────────── */

.page-footer { display: flex; align-items: center; justify-content: space-between; margin-top: 24px; padding: 26px 0; border-top: 1px solid var(--line); color: var(--muted-2); font-size: 10.5px; }
.footer-brand { color: var(--muted); font-size: 14px; font-weight: 700; letter-spacing: -.03em; }
.page-footer a { color: var(--muted); }
.page-footer a:hover { color: var(--text); }
.eyebrow { color: var(--muted-2); font-size: 9.5px; font-weight: 600; letter-spacing: .12em; }
.empty { color: var(--muted); }
.loading-dot { background: var(--accent); }
select { color: var(--text); background: #1c1c1e; border: 1px solid var(--line); border-radius: 8px; padding: 9px 11px; font-size: 11.5px; }
.inline-search { background: #1c1c1e; border: 1px solid var(--line); border-radius: 8px; color: var(--muted); }
.inline-search input { color: var(--text); font-size: 12px; }
.inline-search input::placeholder { color: var(--muted-2); }
.inline-search:focus-within { border-color: rgba(255, 255, 255, .1); }
.filter-tabs { gap: 4px; }
.filter-tabs button { padding: 7px 14px; border: 0; border-radius: 980px; background: rgba(255,255,255,.07); color: var(--muted); font-size: 12px; }
.filter-tabs button:hover:not([aria-pressed="true"]) { background: rgba(255,255,255,.12); color: var(--text); }
.filter-tabs button[aria-pressed="true"] { background: #f5f5f7; color: #000; font-weight: 600; }
.browse-toolbar { margin: 22px 0; }

/* Search */
.results-heading h2 { font-size: 22px; }
.search-artist-strip { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 12px; }
.search-artist-chip { display: flex; align-items: center; gap: 11px; min-width: 0; padding: 11px 13px; border: 1px solid var(--line); border-radius: 10px; background: #161618; color: var(--text); font-size: 12.5px; text-align: left; }
.search-artist-chip:hover { background: #202022; border-color: var(--line-strong); }
.search-artist-chip img { width: 44px; height: 44px; object-fit: cover; border-radius: 50%; }
.search-artist-chip span { display: block; width: auto; height: auto; background: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.recent-searches button { display: flex; align-items: center; gap: 10px; padding: 11px 13px; border: 1px solid var(--line); border-radius: 9px; background: #141416; color: #d2d2d7; font-size: 12px; }
.recent-searches button:hover { background: #202022; }
.recent-searches svg { color: var(--muted); }
.browse-moods { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.browse-mood { position: relative; isolation: isolate; min-height: 190px; padding: 24px; border-radius: 12px; overflow: hidden; text-align: left; background: #2b1b22; }
.browse-mood:nth-child(1) { background: #3a2230; }
.browse-mood:nth-child(2) { background: #31263a; }
.browse-mood:nth-child(3) { background: #1f2b35; }
.browse-mood:nth-child(4) { background: #342b22; }
.browse-mood small { color: rgba(255,255,255,.62); font-size: 8px; letter-spacing: .14em; }
.browse-mood strong { display: block; max-width: 190px; margin: 20px 0 0; color: #fff; font: 700 26px/1.05 var(--font-display); letter-spacing: -.045em; }
.browse-mood > span { display: block; margin-top: 18px; color: rgba(255,255,255,.6); font-size: 10.5px; }
.browse-mood img { position: absolute; right: -14px; bottom: -18px; z-index: -1; width: 43%; aspect-ratio: 1; object-fit: cover; border-radius: 8px; opacity: .72; transform: rotate(13deg); filter: saturate(.9); transition: transform .35s; }
.top-result { display: flex; align-items: center; gap: 18px; margin-bottom: 22px; padding: 18px; border: 1px solid var(--line); border-radius: 12px; background: #161618; }
.top-result > img { width: 96px; height: 96px; border-radius: 8px; object-fit: cover; }
.top-result h3 { margin: 4px 0 3px; font-size: 20px; letter-spacing: -.03em; }
.top-result small { color: var(--muted-2); font-size: 10px; letter-spacing: .1em; }
.circle-button { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; background: var(--accent); color: #fff; }
.circle-button:hover { background: var(--accent-hover); color: #fff; }
.circle-button svg { width: 16px; height: 16px; }
.search-results { margin-top: 8px; }
#result-status, #artist-status { color: var(--muted); font-size: 12.5px; line-height: 1.6; }

/* Collection / library */
.collection-hero { display: flex; align-items: center; gap: 26px; min-height: 210px; padding: 28px; border-radius: 14px; background: #2c2c2e; overflow: hidden; }
.collection-hero h1 { margin: 10px 0 8px; font-size: clamp(30px, 3.4vw, 48px); line-height: 1.1; letter-spacing: -.055em; }
.collection-hero > div > p:not(.eyebrow) { color: var(--muted); font-size: 12.5px; line-height: 1.55; }
.collection-hero small { display: block; margin-top: 18px; color: var(--muted); font-size: 11.5px; }
.collection-hero small span { color: var(--muted-2); }
.collection-hero>.collection-art { width: 150px; height: 150px; flex-shrink: 0; border-radius: 10px; }
.liked-hero { background: #301820; }
.liked-emblem { width: 150px; height: 150px; flex-shrink: 0; display: grid; place-items: center; border-radius: 12px; overflow: hidden; background: #3be07a; }
.liked-emblem > svg { width: 62px; height: 62px; color: #fff; fill: rgba(255,255,255,.14); transform: rotate(-8deg); z-index: 1; }
.liked-emblem i { border-color: rgba(255,255,255,.14); }
.collection-art { width: 100%; aspect-ratio: 1; display: grid; place-items: center; overflow: hidden; border-radius: 9px; background: #3a3a3c; color: var(--muted); }
.collection-art > img { width: 100%; height: 100%; object-fit: cover; }
.library-feature { display: grid; grid-template-columns: 1.05fr 1fr; gap: 14px; margin: 8px 0 26px; }
.library-feature-card { display: flex; align-items: center; gap: 16px; min-height: 132px; padding: 22px; border: 1px solid var(--line); border-radius: 12px; text-align: left; background: #2a1b21; position: relative; overflow: hidden; }
.library-feature-card:hover { border-color: var(--line-strong); }
.library-feature-card > span:first-child { width: 50px; height: 50px; display: grid; place-items: center; flex-shrink: 0; border-radius: 10px; background: var(--accent-soft); color: var(--accent); }
.library-feature-card > span:first-child svg { width: 26px; height: 26px; transform: none; }
.library-feature-card small { color: var(--muted-2); font-size: 8px; letter-spacing: .13em; }
.library-feature-card strong { display: block; margin-top: 6px; font-size: 20px; letter-spacing: -.04em; }
.library-feature-card p { margin-top: 5px; color: var(--muted); font-size: 11.5px; }
.library-feature-card .feature-arrow { margin-left: auto; color: var(--muted-2); font-size: 20px; }
.history-feature { background: #1e2429; }
.history-feature > span:first-child { background: rgba(94,92,230,.16); color: #7d7aff; }
.library-grid { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 22px 18px; }
.collection-card { display: block; padding: 0; border: 0; border-radius: 10px; background: transparent; text-align: left; min-width: 0; }
.collection-card:hover { background: transparent; }
.collection-card .collection-art { border-radius: 9px; transition: transform .25s; }
.collection-card strong { display: block; margin-top: 9px; font-size: 13px; font-weight: 550; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.collection-card small { display: block; margin-top: 3px; color: var(--muted); font-size: 11.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.collection-card .card-open { display: none; }
.crafted-cover { padding: 18px; background: #3a2530; }
.crafted-cover.cover-tone-1 { background: #272c42; }
.crafted-cover.cover-tone-2 { background: #3a2f25; }
.collection-empty { border: 1px dashed var(--line-strong); background: #101011; color: var(--muted); }
.collection-empty > svg { color: var(--accent); }
.collection-empty h3 { font-size: 17px; letter-spacing: -.03em; }
.collection-empty p { color: var(--muted); }
.library-grid .library-card { background: #1c1c1e; border: 1px solid var(--line); border-radius: 12px; padding: 22px; min-height: 170px; }
.library-card > svg { color: var(--accent); }
.library-card p { color: var(--muted); }
.browse-mood, .mood-rose, .mood-blue, .mood-sand { filter: none; }

/* Artist and album pages */
.artist-back { margin-bottom: 20px; }
.artist-hero { display: flex; align-items: center; gap: 26px; padding: 28px; border-radius: 14px; background: #242426; border: 1px solid var(--line); }
.artist-hero > img { width: 176px; height: 176px; object-fit: cover; border-radius: 50%; }
.album-hero > img { border-radius: 10px; }
.artist-hero h2 { margin: 8px 0 10px; font-size: clamp(32px, 3.7vw, 50px); line-height: 1.06; letter-spacing: -.055em; }
.artist-hero #artist-description { color: var(--muted); font-size: 12.5px; line-height: 1.6; }
.artist-hero .green-button { margin-top: 18px; }
.artist-list-heading { margin: 28px 0 10px; }
.catalogue-note { color: var(--muted-2); font-size: 10.5px; }
.album-section { margin-top: 32px; }
.album-grid { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 24px 18px; }
.album-grid .cover-button { border-radius: 9px; }
#album-status { color: var(--muted); }
#album-more, #artist-more { margin: 24px auto; display: flex; }
.version-option { border-bottom: 1px solid var(--line); }
.version-option img { border-radius: 6px; }
.version-option small { color: var(--muted); }
.dialog-option { border-bottom: 1px solid var(--line); }
.dialog-option:hover { color: var(--accent); }

/* Radio page */
.radio-hero { border: 1px solid var(--line); border-radius: 16px; background: #24171c; }
.radio-hero h1 { font-size: clamp(40px, 4.2vw, 62px); letter-spacing: -.06em; font-weight: 700; }
.radio-hero h1 em { color: var(--accent); }
.radio-hero-copy > .eyebrow { color: var(--muted); }
#radio-intro { color: var(--muted); }
.radio-orbit > span { background: #3be07a; border-color: rgba(255,255,255,.2); color: #fff; }
.radio-orbit > i { border-color: rgba(255,255,255,.1); }
.radio-orbit small { color: var(--muted); }
.radio-frequency { color: var(--muted-2); }
.radio-tuning { border-bottom: 1px solid var(--line); }
.radio-tuning p { color: var(--muted); }
.radio-basis > span { color: var(--muted-2); }
#radio-seeds > span { border: 1px solid var(--line); background: #141416; color: var(--text); }
#radio-seeds small { color: var(--muted-2); }
#radio-status { color: var(--muted); }
.radio-footnote { color: var(--muted-2); }
.radio-starters button { color: var(--muted); }
.radio-starters img { border: 1px solid var(--line); }
.radio-home-card { border-color: var(--line); }
.radio-active .radio-orbit > i { border-color: rgba(255, 255, 255, .1); }

/* ─────────────────────────────── Dialogs ─────────────────────────────── */

dialog { width: 460px; max-width: 92vw; padding: 30px; border: 1px solid var(--line-strong); border-radius: 16px; background: #1c1c1e; color: var(--text); }
dialog::backdrop { background: rgba(0,0,0,.66); backdrop-filter: blur(14px); }
dialog h2 { margin: 10px 0 12px; font-size: 25px; line-height: 1.2; letter-spacing: -.045em; }
dialog p { color: var(--muted); font-size: 12.5px; line-height: 1.65; }
.dialog-kicker { display: block; margin: 4px 0 12px; color: var(--accent); font-size: 9px; font-weight: 650; letter-spacing: .14em; }
.dialog-close { top: 14px; right: 14px; }
.dialog-art { border-radius: 10px; }
.dialog-artist { font-size: 13px; color: var(--muted); }
.dialog-option { padding: 14px 0; color: var(--text); font-size: 12.5px; }
#playlist-form label, #rename-form label { color: var(--muted); font-size: 11px; }
#playlist-form input, .name-field input, #rename-name { padding: 11px 12px; border: 1px solid var(--line); border-radius: 8px; background: #2c2c2e; color: var(--text); font-size: 13px; }
#playlist-form input:focus, .name-field input:focus, #rename-name:focus { border-color: rgba(255, 255, 255, .1); outline: 0; }
input[type="range"] { height: 3px; border-radius: 3px; accent-color: var(--accent); background: rgba(255,255,255,.22); }
input[type="range"]::-webkit-slider-thumb { background: #fff; }
.toast { left: 50%; bottom: calc(var(--player) + 18px); padding: 11px 18px; border-radius: 9px; background: #f5f5f7; color: #111; font-size: 12.5px; font-weight: 500; z-index: 100; }
.toast.visible { opacity: 1; transform: translate(-50%, 0); }

/* Account dialog */
#account-dialog { width: 600px; max-height: 88dvh; overflow: auto; padding: 32px 34px; border-radius: 18px; background: #1c1c1e; }
.account-close { top: 14px; right: 14px; }
.account-header { display: flex; align-items: center; gap: 18px; margin-bottom: 24px; }
.account-avatar { width: 62px; height: 62px; display: grid; place-items: center; flex-shrink: 0; border: 0; border-radius: 50%; background: #5e5ce6; color: #fff; font: 650 25px/1 var(--font-display); }
.account-header h2 { margin: 6px 0 3px; font-size: 27px; letter-spacing: -.045em; }
.account-header p:last-child { color: var(--muted); font-size: 11.5px; }
.account-identity { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin: 4px 0 22px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 10px; background: #141416; }
.account-identity small { display: block; color: var(--muted-2); font-size: 8.5px; letter-spacing: .13em; }
.account-identity strong { display: block; margin-top: 4px; color: var(--text); font-size: 12.5px; font-weight: 500; overflow-wrap: anywhere; }
.account-identity span { display: block; margin-top: 4px; color: var(--muted-2); font-size: 10px; }
.account-identity span.sync-ok { color: #30d158; }
.account-identity span.sync-busy { color: #ffd60a; }
.account-identity span.sync-guest { color: var(--muted-2); }
#profile-form > label, #rename-form > label { margin-bottom: 8px; }
.name-field { display: flex; gap: 9px; }
.name-field .outline-button { white-space: nowrap; border-radius: 8px; }
#profile-feedback { color: #30d158; }
.settings-heading { margin-top: 20px; padding-top: 20px; border-top: 1px solid var(--line); font-size: 13px; letter-spacing: -.02em; }
.listening-settings .crossfade-label label { color: var(--text); font-size: 12.5px; }
.listening-settings p, .settings-help { color: var(--muted-2) !important; }
.settings-volume { border-top: 1px solid var(--line); color: var(--text); font-size: 12.5px; }
.settings-volume output { color: var(--muted); }
.account-footer { margin-top: 24px; padding-top: 18px; border-top: 1px solid var(--line); color: var(--muted-2); }
.account-footer kbd { border: 1px solid var(--line-strong); border-radius: 4px; color: var(--muted); }
.radio-account { border-top: 1px solid var(--line); margin-top: 20px; padding-top: 20px; }
.radio-account h3 { font-size: 13px; letter-spacing: -.02em; }
.radio-account p { color: var(--muted-2); }
#radio-hidden-list div { border-bottom: 1px solid var(--line); }
#radio-hidden-list .small-link { color: var(--accent); }

/* ─────────────────────────────── Listening panel ─────────────────────── */

.listening-panel {
  position: fixed;
  inset: 0 0 var(--player) auto;
  width: var(--room);
  padding: 24px 20px;
  overflow: auto;
  background: rgba(14, 14, 15, .78);
  backdrop-filter: blur(38px) saturate(1.4);
  -webkit-backdrop-filter: blur(38px) saturate(1.4);
  border-left: 1px solid var(--line);
}
.panel-heading { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; }
.panel-heading h2 { color: var(--text); font-size: 14px; font-weight: 650; letter-spacing: -.02em; }
.live-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--muted-2); }
.is-playing .live-dot { background: var(--accent); }
.now-art { position: relative; width: 100%; aspect-ratio: 1; overflow: hidden; border-radius: 10px; background: #242426; }
.now-art img { width: 100%; height: 100%; object-fit: cover; filter: none; }
.now-art:after { content: ""; position: absolute; inset: 42% 0 0; background: rgba(0, 0, 0, 0.28); }
.art-caption { position: absolute; left: 13px; bottom: 12px; z-index: 1; color: rgba(255,255,255,.72); font-size: 8px; letter-spacing: .14em; }
.now-info { margin-top: 18px; }
.now-info .eyebrow { color: var(--muted-2); font-size: 8.5px; letter-spacing: .12em; }
.now-info h3 { margin: 8px 0 4px; font-size: 17px; line-height: 1.3; letter-spacing: -.035em; }
.now-info .artist-link { color: var(--muted); font-size: 12px; }
.room-actions { display: flex; align-items: center; justify-content: space-between; margin-top: 18px; }
.room-actions .outline-button { border-radius: 980px; }
.room-divider { height: 1px; margin: 24px 0; background: var(--line); }
.listening-panel .section-title h2 { font-size: 13px; }
.listening-panel .section-title > span { font-size: 8px; }
.room-track { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.room-track img { width: 38px; height: 38px; border-radius: 4px; object-fit: cover; }
.room-track .track-title { font-size: 11.5px; }
.room-track .artist-link { font-size: 10.5px; color: var(--muted-2); }
.room-note { display: flex; align-items: center; gap: 13px; margin-top: 24px; padding: 14px; border-radius: 10px; background: rgba(255,255,255,.045); }
.room-note > span { color: var(--accent); font-size: 22px; }
.room-note p { color: var(--muted); font-size: 10.5px; line-height: 1.55; }

/* ──────────────────────────────── Player ──────────────────────────────── */

.player {
  position: fixed;
  inset: auto 0 0;
  z-index: 50;
  height: var(--player);
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 0 22px;
  background: rgba(22, 22, 23, .82);
  backdrop-filter: blur(40px) saturate(1.6);
  -webkit-backdrop-filter: blur(40px) saturate(1.6);
  border-top: 1px solid var(--line);
}
.player-track-group { position: relative; width: 270px; min-width: 0; flex-shrink: 0; padding-left: 60px; }
.current-track { display: flex; align-items: center; width: 100%; height: 21px; padding: 0; text-align: left; }
.current-art { position: absolute; left: 0; top: -4px; width: 46px; height: 46px; border-radius: 5px; overflow: hidden; background: #2c2c2e; }
.current-art img { width: 100%; height: 100%; object-fit: cover; }
.current-track span { width: 100%; min-width: 0; }
.current-track strong { display: block; overflow: hidden; color: var(--text); font-size: 12.5px; font-weight: 550; text-overflow: ellipsis; white-space: nowrap; }
.player-track-group > .artist-link { display: block; max-width: 100%; margin-top: 2px; overflow: hidden; color: var(--muted); font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.player-like { margin-right: auto; }
.player-center { position: absolute; left: 50%; transform: translateX(-50%); width: 36%; max-width: 560px; }
.transport { display: flex; align-items: center; justify-content: center; gap: 18px; margin-bottom: 6px; }
.transport .icon-btn { width: 24px; height: 24px; }
.transport .icon-btn:nth-child(2), .transport .icon-btn:nth-child(4) { color: #d2d2d7; }
.transport svg { width: 16px; height: 16px; }
.main-play { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: var(--accent); color: #fff; transition: transform .14s, background .14s; }
.main-play:hover { background: var(--accent-hover); color: #fff; }
.main-play svg { width: 15px; height: 15px; }
#turntable-play { width: 40px; height: 40px; background: var(--accent); color: #fff; }
#turntable-play svg { width: 17px; height: 17px; }
.toggle[aria-pressed="true"] { color: var(--accent); }
.play-progress { display: flex; align-items: center; gap: 10px; color: var(--muted-2); font-size: 9.5px; font-variant-numeric: tabular-nums; }
.play-progress span { width: 30px; }
.play-progress span:last-child { text-align: right; }
.play-progress input { flex: 1; min-width: 0; }
.volume-control { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.volume-control input { width: 90px; }
.queue-toggle { display: none; }

/* Mobile tab bar: keeps Discover, Radio and Library reachable when the
   desktop sidebar collapses. */
.mobile-tabs { display: none; }
@media (max-width: 720px) {
  .mobile-tabs {
    position: fixed;
    left: 0;
    right: 0;
    bottom: var(--player);
    z-index: 49;
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    height: 56px;
    padding: 4px 6px 5px;
    background: rgba(22, 22, 23, .94);
    backdrop-filter: blur(30px) saturate(1.5);
    -webkit-backdrop-filter: blur(30px) saturate(1.5);
    border-top: 1px solid var(--line);
  }
  .mobile-tabs button { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; border-radius: 8px; color: var(--muted); font-size: 9px; }
  .mobile-tabs button svg { width: 20px; height: 20px; }
  .mobile-tabs button.active { color: var(--accent); background: rgba(30, 215, 96, .08); }
  .main-shell { padding-bottom: calc(var(--player) + 56px); }
  .am-hero-art { justify-content: center; }
}

/* ────────────────────────── Immersive now playing ─────────────────────── */

#immersive { background: #08080a; color: var(--text); }
#immersive::backdrop { background: #000; }
.room-ambience { filter: blur(110px) saturate(1.4); opacity: .4; }
.room-veil { background: rgba(0,0,0,.55); }
.immersive-header { border-bottom: 1px solid var(--line); }
.immersive-brand { color: #f5f5f7; }
.immersive-brand > span { color: var(--accent); }
.room-kicker { color: var(--muted); }
.immersive-header > .icon-btn { background: rgba(255,255,255,.08); }
.immersive-art > button > img { border-radius: 14px; }
.immersive-art > button > span { background: rgba(0,0,0,.55); border-color: rgba(255,255,255,.16); }
.art-footnote { color: var(--muted-2); }
.immersive-details > .eyebrow { color: var(--muted); }
#room-title { letter-spacing: -.055em; font-weight: 700; }
#room-artist { color: #f5f5f7; }
#room-album { color: var(--muted); }
.room-progress > div { color: var(--muted); }
.room-next-card { border: 1px solid var(--line); background: rgba(255,255,255,.045); border-radius: 10px; }
.room-next-card:hover { background: rgba(255,255,255,.08); }
.room-next-card span { color: var(--muted-2); }
.room-song-tools .small-link { color: var(--muted); }
.room-song-tools .small-link:hover { color: var(--accent); }
.room-settings-link { color: var(--muted); }
.room-settings-link:hover { color: var(--text); }

/* ─────────────────────────────── Responsive ───────────────────────────── */

@media (min-width: 1700px) {
  :root { --sidebar: 272px; --room: 324px; }
  main { padding: 38px 42px 0; }
  .shelf-row { grid-auto-columns: 190px; gap: 22px; }
  .am-hero-art img { width: 300px; }
}
@media (max-width: 1400px) {
  :root { --sidebar: 232px; --room: 272px; }
  main { padding: 30px 28px 0; }
  .topbar { padding: 0 24px; }
  .search-box { width: 290px; }
  .am-hero-copy { padding-left: 34px; }
  .am-hero-art { padding-right: 30px; }
  .shelf-row { grid-auto-columns: 158px; gap: 17px; }
  .am-mix-art strong { font-size: 22px; }
  .library-grid, .album-grid { grid-template-columns: repeat(3, minmax(0,1fr)); }
  .mix-grid { grid-template-columns: repeat(4, minmax(0,1fr)); gap: 14px; }
}
@media (max-width: 1180px) {
  :root { --room: 0px; --sidebar: 224px; }
  .listening-panel { display: none; }
  .main-shell { margin-right: 0; }
  .player-track-group { width: 235px; }
  .am-hero { grid-template-columns: minmax(0,1.2fr) minmax(210px,.8fr); }
  .am-hero-art img { width: 230px; }
}
@media (max-width: 980px) {
  :root { --sidebar: 76px; --player: 76px; }
  .sidebar { padding: 20px 10px 10px; }
  .sidebar .brand-name, .sidebar .side-label, .sidebar .saved-link > span:last-child, .sidebar .playlist-link, .sidebar .user-button > span:nth-child(2), .sidebar .user-button > svg { display: none; }
  .logo { justify-content: center; padding: 0; margin-bottom: 28px; }
  .side-label { justify-content: center; height: 18px; margin: 8px 0 4px; overflow: hidden; }
  .side-label .icon-btn { display: none; }
  .main-nav { gap: 6px; }
  .nav-button { justify-content: center; padding: 11px; gap: 0; font-size: 0; }
  .nav-button svg { width: 21px; height: 21px; }
  .nav-button.active { background: rgba(255,255,255,.12); }
  .radio-nav-dot { position: absolute; top: 7px; right: 7px; margin: 0; }
  .saved-link { justify-content: center; padding: 8px; }
  .saved-art { width: 30px; height: 30px; }
  .user-button { justify-content: center; padding: 7px; }
  .avatar { width: 32px; height: 32px; }
  .main-shell { margin-left: var(--sidebar); }
  .topbar { padding: 0 20px; }
  .search-box { width: min(360px, 100%); }
  main { padding: 24px 20px 0; }
  .am-hero { grid-template-columns: minmax(0,1fr) 220px; min-height: 300px; }
  .am-hero-copy { padding: 30px; }
  .am-hero h2 { font-size: clamp(32px, 5vw, 46px); }
  .am-hero-art { padding: 25px 25px 25px 0; }
  .am-hero-art img { width: 200px; }
  .mix-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .library-feature, .personal-home-grid { grid-template-columns: 1fr; }
  .radio-home-card { min-height: 200px; }
}
@media (max-width: 720px) {
  :root { --sidebar: 0px; --player: 112px; }
  .sidebar { display: none; }
  .main-shell { margin-left: 0; }
  .topbar { height: 58px; padding: 0 16px; gap: 12px; }
  .topbar-context { display: none; }
  .search-box { width: 100%; }
  main { padding: 18px 16px 0; }
  .intro { margin-bottom: 20px; }
  h1 { font-size: 28px; }
  #view-subtitle { font-size: 12px; }
  .am-hero { grid-template-columns: 1fr; min-height: 0; padding-top: 8px; }
  .hero-backdrop { inset: -30%; }
  .am-hero-copy { padding: 28px 22px 12px; }
  .am-hero h2 { font-size: 38px; }
  #hero-subtitle { font-size: 12.5px; }
  .hero-actions { margin-top: 18px; }
  .hero-byline, .hero-number { display: none; }
  .am-hero-art { padding: 12px 22px 26px; justify-content: center; }
  .am-hero-art img { width: 180px; }
  .shelf-row { grid-auto-columns: 140px; gap: 14px; }
  .artist-shelf, .artist-strip { grid-auto-columns: 96px; gap: 14px; }
  .section-title { align-items: flex-start; }
  .section-title h2 { font-size: 18px; }
  .shelf-sub { font-size: 11px; }
  .mix-grid { grid-template-columns: repeat(2, minmax(0,1fr)); gap: 12px; }
  .am-mix-art { padding: 12px; }
  .am-mix-art strong { font-size: 18px; }
  .am-mix-art small { font-size: 9.5px; }
  .library-grid, .album-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .collection-hero { flex-direction: column; align-items: flex-start; padding: 20px; gap: 18px; }
  .collection-hero > .collection-art, .liked-emblem { width: 112px; height: 112px; }
  .collection-hero h1 { font-size: 30px; }
  .artist-hero { flex-direction: column; align-items: flex-start; padding: 20px; gap: 18px; }
  .artist-hero > img { width: 108px; height: 108px; }
  .artist-hero h2 { font-size: 30px; }
  .search-artist-strip { grid-template-columns: 1fr; }
  .browse-moods { grid-template-columns: 1fr; }
  .top-result > img { width: 72px; height: 72px; }
  .track-row { grid-template-columns: 20px 38px minmax(0,1fr) 38px 26px; gap: 9px; min-height: 52px; padding: 6px 4px; }
  .track-art { width: 38px; height: 38px; }
  .track-time { font-size: 10px; }
  .track-row .add-track { display: none; }
  .player { flex-wrap: wrap; padding: 8px 14px; gap: 6px 10px; }
  .player-track-group { width: calc(100% - 44px); padding-left: 50px; }
  .current-art { width: 40px; height: 40px; top: -2px; }
  .player-like { margin: 0; position: absolute; right: 12px; top: 12px; }
  .player-center { position: static; transform: none; width: 100%; order: 3; }
  .play-progress { display: none; }
  .transport { gap: 22px; margin: 0; justify-content: center; }
  .volume-control { display: none; }
  .auth-screen { grid-template-columns: 1fr; }
  .auth-visual { display: none; }
  .auth-panel { padding: 28px 22px; min-height: 100dvh; align-items: start; padding-top: 42px; }
  .auth-logo { margin-bottom: 36px; }
  .auth-field-pair { grid-template-columns: 1fr; }
  dialog { padding: 24px; }
  #account-dialog { padding: 26px 20px; }
  .account-header { gap: 13px; }
  .account-avatar { width: 48px; height: 48px; font-size: 20px; }
  .account-header h2 { font-size: 22px; }
  .account-identity { align-items: flex-start; flex-direction: column; }
  .name-field { flex-direction: column; }
}
@media (hover: none) {
  .am-card-play, .am-mix-play, .mix-play { opacity: 1; transform: none; }
  .track-row .add-track { opacity: 1; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .auth-collage img, .am-hero-art img { transform: none !important; }
}
