@font-face {
  font-family: "Plus Jakarta Sans";
  src: url("fonts/PlusJakartaSans-Variable.woff2") format("woff2");
  font-weight: 200 800;
  font-display: swap;
}

:root {
  --bg: #000;
  --surface: #121212;
  --card: #242424;
  --card-hover: #2c2c2c;
  --line: rgb(255 255 255 / 0.1);
  --text: #fff;
  --muted: #a7a7a7;
  --green: #1ed760;
  --red: #f15e6c;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  color-scheme: dark;
}

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

html, body, #app { height: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 500 14px/1.45 "Plus Jakarta Sans", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
}

button, input, textarea { font: inherit; color: inherit; }
button { background: none; border: 0; padding: 0; cursor: pointer; text-align: inherit; -webkit-tap-highlight-color: transparent; }
button:disabled { cursor: default; }
img { display: block; }
h1, h2, h3, p { margin: 0; }
i, em { font-style: normal; }
b { font-weight: 700; }
[hidden] { display: none !important; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

:focus-visible { outline: 2px solid #fff; outline-offset: 2px; border-radius: 4px; }

.ic { width: 1.5em; height: 1.5em; flex: none; }

.icon-btn {
  display: inline-grid;
  place-items: center;
  width: 2.4em;
  height: 2.4em;
  border-radius: 50%;
  color: var(--muted);
  position: relative;
  transition: color 0.15s, background-color 0.15s, transform 0.15s;
}
.icon-btn:hover { color: var(--text); }
.icon-btn:active { transform: scale(0.92); }
.icon-btn.has-dot::after { content: ""; position: absolute; top: 0.45em; right: 0.5em; width: 0.5em; height: 0.5em; border-radius: 50%; background: var(--green); }

.like.is-on { color: var(--green); }
.like.is-on .ic { fill: currentColor; }
.like.pop .ic { animation: pop 0.35s var(--ease); }
@keyframes pop { 40% { transform: scale(1.35); } }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.6em;
  padding: 0 1.4em;
  border-radius: 99px;
  background: var(--green);
  color: #000;
  font-weight: 700;
  transition: transform 0.15s, opacity 0.15s, background-color 0.15s;
}
.btn:hover:not(:disabled) { transform: scale(1.04); background: #3be477; }
.btn:disabled { opacity: 0.35; }
.btn--ghost { background: none; color: var(--text); }
.btn--ghost:hover:not(:disabled) { background: none; transform: none; text-decoration: underline; }
.btn--sm { min-height: 2.2em; padding: 0 1em; }

.text-link { color: var(--text); font-weight: 700; padding: 0.5em 0; }
.text-link:hover { text-decoration: underline; }
.text-link--lg { font-size: 1.2em; margin: 0.6em 0 0; }

/* ---------- Desktop shell ---------- */
.desk { height: 100%; display: flex; flex-direction: column; background: var(--bg); }
.desk-chrome { display: flex; gap: 8px; padding: 12px 16px 10px; flex: none; }
.desk-chrome i { width: 11px; height: 11px; border-radius: 50%; background: #ff5f57; }
.desk-chrome i:nth-child(2) { background: #febc2e; }
.desk-chrome i:nth-child(3) { background: #28c840; }
.desk-body { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(0, 1fr) clamp(290px, 31%, 350px); gap: 10px; padding: 0 10px 10px; }

.album { overflow-y: auto; border-radius: 10px; background: linear-gradient(#1c1c1c, var(--surface) 60%); scrollbar-width: thin; scrollbar-color: #444 transparent; }
.album-top { padding: 18px 20px 20px; background: linear-gradient(#9a9a9a, #4a4a4a); }
.album-nav { display: flex; gap: 8px; margin-bottom: 26px; }
.round { width: 30px; height: 30px; border-radius: 50%; background: rgb(0 0 0 / 0.55); display: grid; place-items: center; font-size: 12px; }
.round:disabled { color: rgb(255 255 255 / 0.6); }
.round--fan { margin-left: auto; background: #fff; color: #000; font-size: 13px; transition: transform 0.15s; }
.round--fan:hover { transform: scale(1.08); }
.album-id { display: flex; align-items: flex-end; gap: 20px; }
.album-id img { width: clamp(120px, 22vw, 230px); height: auto; aspect-ratio: 1; box-shadow: 0 8px 30px rgb(0 0 0 / 0.4); }
.album-id span { font-size: 13px; font-weight: 600; }
.album-id h1 { font-size: clamp(28px, 4.6vw, 46px); font-weight: 800; letter-spacing: -0.02em; line-height: 1.15; margin: 2px 0 6px; }
.album-id p { font-size: 13.5px; }
.album-id p i { color: rgb(255 255 255 / 0.6); }

.album-actions { display: flex; align-items: center; gap: 8px; padding: 14px 20px; font-size: 17px; }
.play-big { width: 58px; height: 58px; border-radius: 50%; background: var(--green); color: #000; display: grid; place-items: center; font-size: 20px; margin-right: 12px; transition: transform 0.15s; }
.play-big:hover { transform: scale(1.06); }
.play-big:active { transform: scale(0.97); }

[data-tip]::after {
  content: attr(data-tip);
  position: absolute;
  bottom: calc(100% + 6px);
  left: 50%;
  translate: -50% 4px;
  padding: 5px 9px;
  border-radius: 5px;
  background: #2f2f2f;
  color: #fff;
  font-size: 11.5px;
  font-weight: 600;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s, translate 0.15s;
  z-index: 3;
  box-shadow: 0 4px 14px rgb(0 0 0 / 0.5);
}
[data-tip]:hover::after, [data-tip]:focus-visible::after { opacity: 1; translate: -50% 0; }

.tracks { padding: 0 20px 20px; font-size: 13.5px; }
.tracks-head, .track { display: grid; grid-template-columns: minmax(0, 1fr) 110px 76px 56px; align-items: center; }
.tracks-head { grid-template-columns: 34px minmax(0, 1fr) 110px 76px 56px; color: var(--muted); font-size: 12px; padding: 0 0 8px; border-bottom: 1px solid rgb(255 255 255 / 0.25); margin-bottom: 8px; }
.tracks-head span:nth-child(1) { text-align: center; }
.tracks-head span:nth-child(3) { text-align: right; }
.tracks-head span:nth-child(4) { grid-column: 5; text-align: center; font-size: 10px; }
.track { border-radius: 6px; color: var(--muted); }
.track:hover, .track:focus-within { background: rgb(255 255 255 / 0.07); }
.track-main { display: grid; grid-template-columns: 34px minmax(0, 1fr); align-items: center; padding: 7px 0; min-width: 0; }
.track-n { text-align: center; }
.track-eq { display: none; height: 12px; justify-content: center; align-items: flex-end; gap: 2px; }
.track-eq i { width: 2.5px; height: 100%; background: var(--green); transform-origin: bottom; animation: eq 0.9s ease-in-out infinite alternate; }
.track-eq i:nth-child(2) { animation-delay: -0.4s; }
.track-eq i:nth-child(3) { animation-delay: -0.7s; }
@keyframes eq { from { transform: scaleY(0.25); } to { transform: scaleY(1); } }
.track.is-playing .track-n { display: none; }
.track.is-playing .track-eq { display: flex; }
.track-title b, .track-title i { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.track-title b { color: var(--text); font-weight: 500; font-size: 14.5px; }
.track-title i { font-size: 12.5px; }
.track.is-current .track-title b, .track.is-current .track-n { color: var(--green); }
.track-plays { text-align: right; font-variant-numeric: tabular-nums; }
.track-dur { text-align: center; font-variant-numeric: tabular-nums; }
.track-tools { display: flex; justify-content: flex-end; font-size: 12px; opacity: 0; transition: opacity 0.12s; }
.track:hover .track-tools, .track:focus-within .track-tools { opacity: 1; }

/* Desktop now-playing bar */
.dplayer { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr) minmax(0, 1fr); align-items: center; gap: 16px; padding: 4px 16px 12px; font-size: 13px; }
.dplayer-song { display: flex; align-items: center; gap: 10px; min-width: 0; }
.dplayer-song img { width: 44px; height: 44px; border-radius: 4px; flex: none; }
.dplayer-song span { min-width: 0; line-height: 1.35; }
.dplayer-song b, .dplayer-song i { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dplayer-song:hover b { text-decoration: underline; }
.dplayer-song i, .dplayer-time { color: var(--muted); font-size: 12px; }
.dplayer-mid { display: flex; align-items: center; gap: 12px; }
.dplayer-play { width: 34px; height: 34px; border-radius: 50%; background: #fff; color: #000; display: grid; place-items: center; flex: none; font-size: 12px; transition: transform 0.15s; }
.dplayer-play:hover { transform: scale(1.07); }
.dplayer-bar { flex: 1; height: 4px; border-radius: 4px; background: rgb(255 255 255 / 0.2); overflow: hidden; }
.dplayer-bar i { display: block; height: 100%; background: #fff; transform-origin: left; transform: scaleX(0.72); }
.dplayer.is-playing .dplayer-bar i { background: var(--green); animation: progress 240s linear forwards; }
.dplayer-time { font-variant-numeric: tabular-nums; }
.dplayer-fan { display: flex; align-items: center; justify-content: flex-end; gap: 12px; }
.dplayer-posts { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-variant-numeric: tabular-nums; }
.dplayer-posts:hover { color: var(--text); }
.dplayer-posts .ic { width: 18px; height: 18px; }
.btn--line { background: none; color: var(--text); border: 1px solid rgb(255 255 255 / 0.4); gap: 8px; white-space: nowrap; }
.btn--line:hover:not(:disabled) { background: rgb(255 255 255 / 0.08); border-color: #fff; transform: none; }
.btn--line .ic { width: 16px; height: 16px; }
.desk-body { padding-bottom: 8px; }
@media (max-width: 860px) { .dplayer-posts, .dplayer-time { display: none; } }

/* ---------- Mobile shell ---------- */
.phone { height: 100%; max-width: 440px; margin: 0 auto; display: flex; flex-direction: column; background: var(--bg); position: relative; }
.phone .panel { flex: 1; min-height: 0; }

.mini { position: relative; display: flex; align-items: center; gap: 2px; margin: 0 8px; padding: 6px 6px 8px; border-radius: 6px; background: var(--mini); font-size: 15px; transition: background-color 0.4s; }
.mini-song { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0; }
.mini-song img { width: 42px; height: 42px; border-radius: 4px; }
.mini-song span { min-width: 0; }
.mini-song b, .mini-song i { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mini-song b { font-size: 14px; }
.mini-song i { font-size: 12.5px; color: rgb(255 255 255 / 0.7); }
.mini .icon-btn { color: #fff; }
.mini .like.is-on { color: var(--green); }
.mini-bar { position: absolute; left: 8px; right: 8px; bottom: 0; height: 2px; background: rgb(255 255 255 / 0.25); border-radius: 2px; overflow: hidden; }
.mini-bar i { display: block; height: 100%; width: 100%; background: #fff; transform-origin: left; transform: scaleX(0.72); }
.mini.is-playing .mini-bar i { animation: progress 240s linear forwards; }
@keyframes progress { from { transform: scaleX(0); } to { transform: scaleX(1); } }

.tabs { display: grid; grid-template-columns: repeat(4, 1fr); padding: 8px 4px max(8px, env(safe-area-inset-bottom)); }
.tabs button { display: grid; justify-items: center; gap: 3px; color: var(--muted); font-size: 11px; font-weight: 500; padding: 4px 0; }
.tabs .ic { width: 26px; height: 26px; }
.tabs .is-on { color: #fff; font-weight: 700; }
.tabs .is-on .ic { fill: currentColor; }

/* ---------- Fanbase panel ---------- */
.panel { --fs: 13px; font-size: var(--fs); display: flex; flex-direction: column; min-height: 0; overflow: hidden; background: var(--surface); border-radius: 10px; position: relative; }
html[data-layout="mobile"] .panel { --fs: 15px; background: var(--bg); border-radius: 0; }

.panel.go-forward > * { animation: slide-in 0.26s var(--ease); }
.panel.go-back > * { animation: slide-back 0.26s var(--ease); }
@keyframes slide-in { from { opacity: 0; transform: translateX(18px); } }
@keyframes slide-back { from { opacity: 0; transform: translateX(-18px); } }

.p-head { display: flex; align-items: center; gap: 0.3em; padding: 1em 1em 0.6em; flex: none; }
.p-head h1 { font-size: 1.15em; font-weight: 700; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.p-head > .icon-btn:first-child { margin-left: -0.6em; }
.p-head-actions { display: flex; align-items: center; gap: 0.2em; }
.p-head-actions .icon-btn { color: var(--text); }
.p-head-actions .av { margin-left: 0.4em; }
html[data-layout="mobile"] .p-head { padding: 1.4em 1.1em 0.6em; }
html[data-layout="mobile"] .p-head h1 { font-size: 1.5em; font-weight: 800; letter-spacing: -0.01em; }
html[data-layout="mobile"] .p-head--big h1 { font-size: 1.4em; }

.p-body { flex: 1; min-height: 0; overflow-y: auto; padding: 0.3em 0.8em 1.2em; scrollbar-width: thin; scrollbar-color: #3a3a3a transparent; }

.label { display: flex; align-items: center; gap: 0.5em; font-size: 1em; font-weight: 700; margin: 0.9em 0.3em 0.7em; }
.label .ic { width: 1.25em; height: 1.25em; }
.h2 { font-size: 1.4em; font-weight: 700; margin: 1.3em 0 0.7em; }

/* Feed tabs */
.feed-tabs { display: flex; gap: 0.5em; margin: 0.2em 0 0.9em; }
html[data-layout="mobile"] .feed-tabs { margin-top: 1.2em; }
.feed-tabs button { height: 2.3em; padding: 0 1.1em; border-radius: 99px; background: var(--card); font-weight: 600; transition: background-color 0.15s, color 0.15s; }
.feed-tabs button:hover { background: var(--card-hover); }
.feed-tabs button[aria-selected="true"] { background: #fff; color: #000; }
.suggest { display: flex; align-items: center; gap: 0.8em; padding: 0.5em 0.3em; }
.suggest .av-follow { display: none; }
.pill--sm { height: 2.1em; padding: 0 1em; font-size: 0.92em; }
.empty--tight { padding: 1.6em 1em 0.6em; }
.tag { font-weight: 600; color: inherit; display: inline; }
.tag:hover { text-decoration: underline; color: var(--green); }

/* Avatars */
.av { position: relative; display: inline-block; flex: none; width: 2.5em; height: 2.5em; }
.av-face { display: block; width: 100%; height: 100%; border-radius: 50%; overflow: hidden; }
.av-face img { width: 100%; height: 100%; object-fit: cover; }
.av-face span { display: grid; place-items: center; width: 100%; height: 100%; font-size: 0.8em; font-weight: 700; color: #fff; letter-spacing: 0.02em; }
.av--xs { width: 1.4em; height: 1.4em; }
.av--xs .av-face span { font-size: 0.5em; }
.av--sm { width: 1.9em; height: 1.9em; }
.av--sm .av-face span { font-size: 0.62em; }
.av--xl { width: 8.4em; height: 8.4em; }
.av--xl .av-face span { font-size: 2.6em; }
.av-follow { position: absolute; right: -0.25em; bottom: -0.25em; width: 1.15em; height: 1.15em; border-radius: 50%; background: #fff; color: #000; display: grid; place-items: center; box-shadow: 0 0 0 2px var(--card); transition: background-color 0.2s, transform 0.2s var(--ease); }
.av-follow::before { content: ""; position: absolute; inset: -0.6em; }
.av-follow .ic { width: 0.8em; height: 0.8em; stroke-width: 3; }
.av-follow:hover { transform: scale(1.15); }
.av-follow.is-on { background: var(--green); }

/* Posts */
.posts { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0.7em; }
.post { background: var(--card); border-radius: 0.7em; padding: 0.9em 0.9em 0.5em; position: relative; }
.post--fresh { border-radius: 0.7em; animation: fresh 1.6s var(--ease); }
@keyframes fresh { 0% { opacity: 0; transform: translateY(-10px) scale(0.98); } 25% { opacity: 1; transform: none; box-shadow: 0 0 0 1.5px var(--green); } 100% { box-shadow: 0 0 0 1.5px transparent; } }
.post-repost { display: flex; align-items: center; gap: 0.5em; color: var(--muted); font-size: 0.85em; margin: -0.2em 0 0.6em 0.7em; }
.post-repost .ic { width: 1.1em; height: 1.1em; }
.post-head { display: flex; align-items: center; gap: 0.8em; }
.post-user { flex: 1; min-width: 0; line-height: 1.3; }
.post-user b, .post-user i { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.post-user b { font-weight: 600; }
.post-user:hover b { text-decoration: underline; }
.post-user i { color: var(--muted); font-size: 0.85em; }
.post-menu-wrap { position: relative; margin-right: -0.5em; }
.menu { position: absolute; right: 0.3em; top: 100%; z-index: 5; min-width: 11em; padding: 0.3em; border-radius: 0.5em; background: #2f2f2f; box-shadow: 0 10px 30px rgb(0 0 0 / 0.6); animation: menu-in 0.14s var(--ease); }
@keyframes menu-in { from { opacity: 0; transform: translateY(-4px); } }
.menu button { display: flex; align-items: center; gap: 0.7em; width: 100%; padding: 0.6em 0.7em; border-radius: 0.3em; font-weight: 600; }
.menu button:hover { background: rgb(255 255 255 / 0.1); }
.menu .ic { width: 1.2em; height: 1.2em; }
.post-text { margin: 0.7em 0 0.8em; overflow-wrap: anywhere; line-height: 1.5; }
.post-text[data-act] { cursor: pointer; }

.chip { display: flex; align-items: center; gap: 0.6em; }
.chip-main { display: flex; align-items: center; gap: 0.8em; flex: 1; min-width: 0; border-radius: 0.4em; }
.chip-main img { width: 3.2em; height: 3.2em; border-radius: 0.2em; flex: none; }
.chip-main span { min-width: 0; line-height: 1.3; }
.chip-main b, .chip-main i { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chip-main b { font-size: 1.08em; }
.chip-main:hover b { text-decoration: underline; }
.chip-main i { color: var(--muted); }
.chip-play { width: 2.6em; height: 2.6em; border-radius: 50%; background: #fff; color: #000; display: grid; place-items: center; flex: none; transition: transform 0.15s; }
.chip-play:hover { transform: scale(1.07); }
.chip-play:active { transform: scale(0.95); }

.post-actions { display: grid; grid-template-columns: 1fr 1fr 1fr auto; margin-top: 0.5em; color: var(--muted); }
.post-actions button { display: inline-flex; align-items: center; gap: 0.7em; padding: 0.55em 0; justify-self: start; font-variant-numeric: tabular-nums; transition: color 0.15s; }
.post-actions button:hover { color: var(--text); }
.post-actions .ic { width: 1.45em; height: 1.45em; transition: transform 0.15s; }
.post-actions button:active .ic { transform: scale(0.88); }
.post-actions .is-on { color: var(--green); }

.post--flat { background: none; border-radius: 0; padding: 0.9em 0.3em 0.4em; border-bottom: 1px solid var(--line); }
.post--flat .av-follow { box-shadow: 0 0 0 2px var(--surface); }
.post--lead .post-text { font-size: 1.05em; }
.posts--flat { gap: 0; }
.p-body--thread { padding-top: 0; }

.end-note { color: var(--muted); text-align: center; font-size: 0.9em; padding: 1.4em 1em 0.4em; }

.empty { display: grid; justify-items: center; gap: 0.5em; text-align: center; padding: 2.4em 1em; color: var(--muted); }
.empty .ic { width: 2.4em; height: 2.4em; }
.empty b { color: var(--text); font-size: 1.15em; }
.empty .btn { margin-top: 0.8em; }

/* Reply box */
.reply { display: flex; align-items: center; gap: 0.6em; padding: 0.7em 0.8em; border-top: 1px solid var(--line); flex: none; background: inherit; }
.reply input { flex: 1; min-width: 0; height: 2.6em; padding: 0 1em; border-radius: 99px; border: 1px solid transparent; background: var(--card); outline: none; }
.reply input::placeholder, textarea::placeholder, .search input::placeholder { color: #8a8a8a; }
.reply input:focus { border-color: rgb(255 255 255 / 0.5); }

/* Song screen */
.song-hero { display: flex; align-items: center; gap: 1em; padding: 0.3em 0.2em 0.9em; }
.song-hero img { width: 4.6em; height: 4.6em; border-radius: 0.2em; }
.song-hero > div { flex: 1; min-width: 0; }
.song-hero b { display: block; font-size: 1.15em; }
.song-hero i { display: block; color: var(--muted); font-size: 0.9em; }
.song-bar { display: flex; align-items: center; justify-content: space-between; padding: 0 0.2em 0.5em; }
.song-bar h2 { font-size: 1.05em; font-weight: 700; }
.song-bar .icon-btn { color: var(--text); }

/* Compose */
.p-body--compose { display: flex; flex-direction: column; }
.search { display: flex; align-items: center; gap: 0.6em; height: 2.9em; padding: 0 0.9em; border-radius: 0.5em; background: var(--card); color: var(--muted); border: 1px solid transparent; flex: none; }
.search:focus-within { border-color: rgb(255 255 255 / 0.5); color: var(--text); }
.search .ic { width: 1.3em; height: 1.3em; }
.search input { flex: 1; min-width: 0; background: none; border: 0; outline: none; }
.search input::-webkit-search-cancel-button { filter: invert(1); cursor: pointer; }
.list-label { font-size: 0.95em; font-weight: 700; margin: 1.2em 0.2em 0.5em; }
.crumb { display: flex; align-items: center; gap: 0.5em; margin: 0.9em 0 0; font-weight: 700; }
.crumb .ic { width: 1.1em; height: 1.1em; color: var(--muted); }
.result { display: flex; align-items: center; gap: 0.9em; width: 100%; padding: 0.45em 0.4em; border-radius: 0.4em; }
.result:hover, .result:focus-visible { background: rgb(255 255 255 / 0.08); }
.result img { width: 2.9em; height: 2.9em; border-radius: 0.2em; flex: none; }
.result--artist img { border-radius: 50%; }
.result span { flex: 1; min-width: 0; line-height: 1.35; }
.result b, .result i { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.result b { font-weight: 600; }
.result i { color: var(--muted); font-size: 0.9em; }
.result .ic { width: 1.1em; height: 1.1em; color: var(--muted); }
#compose-results { padding-top: 0.2em; }
.p-body--compose .chip { margin: 0.3em 0 0.9em; }
.p-body--compose textarea { width: 100%; min-height: 11em; resize: none; padding: 0.9em; border-radius: 0.5em; border: 1px solid transparent; background: var(--card); outline: none; line-height: 1.5; }
.p-body--compose textarea:focus { border-color: rgb(255 255 255 / 0.5); }
.compose-count { text-align: right; color: var(--muted); font-size: 0.9em; padding: 0.4em 0.2em; font-variant-numeric: tabular-nums; }
.compose-count.is-low { color: var(--red); }
.compose-actions { display: flex; justify-content: flex-end; gap: 0.4em; margin-top: 0.6em; }

/* Trending card (mobile) */
.trend { background: var(--trend); border-radius: 0.7em; padding: 0.7em 0.8em 0.8em; transition: background-color 0.5s; overflow: hidden; }
.trend-top { display: flex; align-items: center; justify-content: space-between; }
.trend-label { font-size: 0.8em; font-weight: 600; color: rgb(255 255 255 / 0.85); }
.trend-toggle { width: 1.8em; height: 1.8em; border-radius: 50%; background: rgb(0 0 0 / 0.55); display: grid; place-items: center; transition: transform 0.25s var(--ease); }
.trend-toggle .ic { width: 1.1em; height: 1.1em; }
.trend.is-open .trend-toggle { transform: rotate(180deg); }
.segs { display: flex; gap: 0.35em; margin: 0.45em 0 0.8em; }
.seg { flex: 1; padding: 0.4em 0; }
.seg span { display: block; height: 2.5px; border-radius: 2px; background: rgb(255 255 255 / 0.3); overflow: hidden; position: relative; }
.seg span::after { content: ""; position: absolute; inset: 0; background: #fff; transform-origin: left; transform: scaleX(0); }
.seg.is-done span::after { transform: none; }
.seg.is-now span::after { animation: seg 6s linear forwards; }
.segs.is-paused .seg.is-now span::after { animation: none; transform: none; }
@keyframes seg { to { transform: scaleX(1); } }
.trend-song { display: flex; align-items: center; gap: 0.9em; width: 100%; }
.trend-song img { width: 3.4em; height: 3.4em; border-radius: 0.2em; flex: none; }
.trend-song span { min-width: 0; line-height: 1.3; }
.trend-song > span:nth-child(2) { flex: 1; }
.trend-song b, .trend-song i { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.trend-song b { font-size: 1.05em; }
.trend-song i { color: rgb(255 255 255 / 0.7); }
.trend-count { display: flex; align-items: center; gap: 0.5em; color: rgb(255 255 255 / 0.7); font-variant-numeric: tabular-nums; }
.trend-count .ic { width: 1.3em; height: 1.3em; }
.trend.is-open .trend-song { flex-direction: column; text-align: center; gap: 0.7em; position: relative; animation: trend-open 0.3s var(--ease); }
.trend.is-open .trend-song img { width: 11em; height: 11em; box-shadow: 0 8px 26px rgb(0 0 0 / 0.35); }
.trend.is-open .trend-song > span:nth-child(2) { flex: none; }
.trend.is-open .trend-count { position: absolute; right: 0; bottom: -2.4em; }
@keyframes trend-open { from { opacity: 0; transform: scale(0.96); } }
.trend-more { margin-top: 0.9em; animation: trend-open 0.3s var(--ease); }
.trend-more h3 { font-size: 0.95em; font-weight: 700; margin-bottom: 0.5em; }
.trend-post { display: flex; align-items: center; gap: 0.6em; width: 100%; padding: 0.45em 0; }
.trend-post > span:nth-child(2) { flex: 1; min-width: 0; font-size: 0.85em; line-height: 1.4; }
.trend-post .av { align-self: flex-start; margin-top: 0.1em; }
.trend-post b { display: block; font-weight: 600; }
.trend-post b i { color: rgb(255 255 255 / 0.6); font-weight: 500; }
.trend-post em { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; color: rgb(255 255 255 / 0.9); }
.trend-post .ic { width: 1em; height: 1em; color: rgb(255 255 255 / 0.7); }

/* Profile */
.p-body--profile { padding-top: 0; }
.profile-top { margin: 0 -0.8em; padding: 1.2em 1.4em 1.4em; background: linear-gradient(hsl(var(--hue) 75% 32%) 30%, transparent); }
.profile-top > .icon-btn { color: #fff; margin-left: -0.6em; }
.profile-id { display: flex; align-items: center; gap: 1.2em; margin: 1.2em 0 1.4em; }
.profile-id h1 { font-size: 1.9em; font-weight: 800; letter-spacing: -0.01em; line-height: 1.2; }
.profile-id p { color: rgb(255 255 255 / 0.75); margin-top: 0.3em; }
.profile-id p b { color: #fff; }
html[data-layout="desktop"] .av--xl { width: 6em; height: 6em; }
html[data-layout="mobile"] .av--xl { width: 7em; height: 7em; }
html[data-layout="mobile"] .profile-id h1 { font-size: 1.7em; }
html[data-layout="desktop"] .profile-id h1 { font-size: 1.5em; }
.pill { display: inline-flex; align-items: center; height: 2.5em; padding: 0 1.2em; border-radius: 99px; border: 1.5px solid rgb(255 255 255 / 0.7); font-weight: 700; transition: border-color 0.15s, background-color 0.15s, color 0.15s, transform 0.15s; }
.pill:hover { border-color: #fff; transform: scale(1.03); }
.pill.is-on { background: #fff; color: #000; border-color: #fff; }
.pill--ghost { border-color: rgb(255 255 255 / 0.3); color: rgb(255 255 255 / 0.8); font-weight: 600; }
.pill--ghost:hover { transform: none; border-color: rgb(255 255 255 / 0.3); }
.playlist { display: flex; align-items: center; gap: 1em; padding: 0.4em 0; }
.playlist img { width: 4em; height: 4em; }
.playlist b { display: block; font-size: 1.1em; }
.playlist i { color: var(--muted); }

/* Notifications */
.notifs { display: grid; }
.notif { display: flex; gap: 0.9em; align-items: flex-start; padding: 0.9em 0.3em; border-bottom: 1px solid var(--line); line-height: 1.45; }
.notif:hover { background: rgb(255 255 255 / 0.05); }
.notif i { display: block; color: var(--muted); font-size: 0.85em; }

/* Toast */
.toast { position: absolute; left: 50%; bottom: 84px; translate: -50% 0; z-index: 20; max-width: calc(100% - 32px); padding: 10px 16px; border-radius: 8px; background: #fff; color: #000; font-size: 13px; font-weight: 700; text-align: center; box-shadow: 0 10px 30px rgb(0 0 0 / 0.5); animation: toast-in 0.25s var(--ease); }
button.toast::after { content: "  View"; color: #0a7a33; }
html[data-layout="desktop"] .toast { bottom: 24px; }
html[data-layout="mobile"] .toast { bottom: 142px; }
@keyframes toast-in { from { opacity: 0; translate: -50% 10px; } }

/* Fanbase's buttons on the album page, kept together so focus mode can leave them bright. */
.fan-actions { display: inline-flex; align-items: center; gap: 8px; }

/* ?focus: Spotify's own UI steps back so the Fanbase parts carry the attention. */
html.focus .album-top, html.focus .album-actions > :not(.fan-actions), html.focus .tracks-head,
html.focus .track-main, html.focus .track-plays, html.focus .track-dur,
html.focus .dplayer-song, html.focus .dplayer-mid { opacity: 0.38; transition: opacity 0.3s; }
html.focus .track:hover .track-main, html.focus .track.is-hover .track-main,
html.focus .track.is-current .track-main { opacity: 1; }

/* ---------- Guided flows (tour.js) ---------- */
#app { position: relative; }
.tour-cursor { position: absolute; top: 0; left: 0; z-index: 50; width: 0; height: 0; pointer-events: none; transition: transform 0.6s cubic-bezier(0.45, 0.05, 0.25, 1); animation: cursor-in 0.3s; }
@keyframes cursor-in { from { opacity: 0; } }
.tour-cursor svg { position: absolute; left: -5px; top: -3px; width: 26px; height: 26px; fill: #fff; stroke: #000; stroke-width: 1.4; stroke-linejoin: round; filter: drop-shadow(0 2px 4px rgb(0 0 0 / 0.5)); transition: transform 0.12s; }
.tour-cursor i { position: absolute; left: -18px; top: -18px; width: 36px; height: 36px; border-radius: 50%; background: rgb(255 255 255 / 0.35); opacity: 0; transform: scale(0.4); transition: opacity 0.4s, transform 0.4s; }
.tour-cursor.is-down svg { transform: scale(0.86); }
.tour-cursor.is-down i { opacity: 1; transform: scale(1); transition-duration: 0.1s; }
.tour-cursor--mobile svg { display: none; }
.tour-cursor--mobile::before { content: ""; position: absolute; left: -15px; top: -15px; width: 30px; height: 30px; border-radius: 50%; background: rgb(255 255 255 / 0.3); border: 1.5px solid rgb(255 255 255 / 0.85); box-shadow: 0 2px 8px rgb(0 0 0 / 0.4); transition: transform 0.12s; }
.tour-cursor--mobile.is-down::before { transform: scale(0.8); }
.tour-cursor--mobile i { left: -24px; top: -24px; width: 48px; height: 48px; }

.tour-caption { position: absolute; z-index: 49; left: 20px; bottom: 20px; max-width: min(360px, calc(100% - 40px)); padding: 10px 14px; border-radius: 10px; background: #fff; color: #000; font-size: 13px; font-weight: 700; line-height: 1.4; box-shadow: 0 10px 30px rgb(0 0 0 / 0.5); pointer-events: none; }
.tour-caption:empty, .is-embedded > .tour-caption { display: none; }
html[data-layout="mobile"] .tour-caption { left: 12px; right: 12px; bottom: auto; top: 8px; max-width: none; text-align: center; }

.track.is-hover { background: rgb(255 255 255 / 0.07); }
.track.is-hover .track-tools { opacity: 1; }
.search.is-focus, .p-body--compose textarea.is-focus, .reply input.is-focus { border-color: rgb(255 255 255 / 0.5); }

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

/* Phones don't show a scrollbar; hide it in the mobile layout so the frame reads as a real phone. */
html[data-layout="mobile"] * { scrollbar-width: none; }
html[data-layout="mobile"] *::-webkit-scrollbar { display: none; }
