/* ==========================================================================
   UNMUSIC — style.css
   Design system + app shell + semua komponen inti.
   Palet: charcoal gelap, permukaan translusen, aksen diambil dari artwork.
   ========================================================================== */

/* ---------- 1. TOKENS ---------- */
:root {
  /* Surface */
  --bg: #08080a;
  --bg-deep: #050507;
  --surface-1: #101014;
  --surface-2: #16161c;
  --surface-3: #1e1e26;
  --line: rgba(255, 255, 255, 0.07);
  --line-strong: rgba(255, 255, 255, 0.13);

  /* Text */
  --text: #f2f2f5;
  --text-2: #a8a8b4;
  --text-3: #6e6e7c;

  /* Accent — di-override runtime oleh artwork color engine */
  --accent: #6ee7d0;
  --accent-soft: rgba(110, 231, 208, 0.14);
  --accent-ink: #04120f;
  --art-1: #1b2a2f;
  --art-2: #0b0d11;

  /* Type */
  --font-display: "Cabinet Grotesk", "Satoshi", system-ui, sans-serif;
  --font-body: "Satoshi", ui-sans-serif, system-ui, -apple-system, sans-serif;
  --text-xs: 0.75rem;
  --text-sm: 0.875rem;
  --text-base: 1rem;
  --text-lg: 1.125rem;
  --text-xl: 1.5rem;
  --text-2xl: 2rem;

  /* Space */
  --sp-1: 4px;
  --sp-2: 8px;
  --sp-3: 12px;
  --sp-4: 16px;
  --sp-5: 24px;
  --sp-6: 32px;
  --sp-7: 48px;

  /* Shape */
  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 18px;
  --r-xl: 26px;
  --r-full: 999px;

  --shadow-1: 0 1px 2px rgba(0, 0, 0, 0.4);
  --shadow-2: 0 12px 30px -12px rgba(0, 0, 0, 0.7);
  --shadow-3: 0 30px 70px -25px rgba(0, 0, 0, 0.85);

  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  /* Easing khusus transisi lirik: mulai tegas lalu mengendap panjang. */
  --ease-lyric: cubic-bezier(0.33, 1, 0.24, 1);
  --ease-lyric-active: cubic-bezier(0.2, 1.12, 0.28, 1);

  --sidebar-w: 252px;
  --topbar-h: 66px;
  --player-h: 88px;
  --botnav-h: 0px;
}

/* ---------- 2. RESET ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}
/* Atribut hidden harus selalu menang atas display milik komponen. */
[hidden] {
  display: none !important;
}
html,
body {
  height: 100%;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow: hidden;
}
h1,
h2,
h3,
p {
  margin: 0;
}
h1,
h2,
h3 {
  font-family: var(--font-display);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.15;
}
img {
  display: block;
  max-width: 100%;
}
button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  cursor: pointer;
}
input {
  font: inherit;
  color: inherit;
}
ul {
  margin: 0;
  padding: 0;
  list-style: none;
}
svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
  flex: none;
}
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 6px;
}
::selection {
  background: var(--accent);
  color: var(--accent-ink);
}
.skip-link {
  position: fixed;
  top: -60px;
  left: 12px;
  z-index: 200;
  padding: 10px 16px;
  border-radius: var(--r-sm);
  background: var(--surface-3);
  color: var(--text);
  text-decoration: none;
  transition: top 0.2s var(--ease);
}
.skip-link:focus {
  top: 12px;
}
.tiny {
  font-size: var(--text-xs);
  color: var(--text-3);
}
.yt-host {
  position: fixed;
  left: -9999px;
  top: 0;
  width: 320px;
  height: 180px;
  opacity: 0.01;
  pointer-events: none;
}

/* Scrollbar */
*::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}
*::-webkit-scrollbar-track {
  background: transparent;
}
*::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 99px;
  border: 3px solid transparent;
  background-clip: padding-box;
}
*::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.22);
  background-clip: padding-box;
}

/* ---------- 3. APP SHELL ---------- */
.app {
  position: fixed;
  inset: 0 0 var(--player-h) 0;
  display: grid;
  grid-template-columns: var(--sidebar-w) minmax(0, 1fr);
  grid-template-rows: var(--topbar-h) minmax(0, 1fr);
  grid-template-areas: "sidebar topbar" "sidebar main";
  background:
    radial-gradient(1200px 640px at 80% -10%, color-mix(in srgb, var(--art-1) 42%, transparent), transparent 70%),
    linear-gradient(180deg, #0b0b0e, var(--bg) 42%);
  transition: background 1s var(--ease);
}

/* ---------- 4. SIDEBAR ---------- */
.sidebar {
  grid-area: sidebar;
  display: flex;
  flex-direction: column;
  gap: var(--sp-5);
  padding: var(--sp-5) var(--sp-4) var(--sp-4);
  border-right: 1px solid var(--line);
  background: rgba(10, 10, 13, 0.6);
  backdrop-filter: blur(20px);
  min-height: 0;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-left: 6px;
  color: var(--accent);
}
.brand__mark {
  width: 28px;
  height: 28px;
  object-fit: contain;
  display: block;
}
.brand__text {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: var(--text-lg);
  letter-spacing: 0.06em;
  color: var(--text);
}
.brand__text span {
  color: var(--text-3);
  font-weight: 700;
  margin-left: 4px;
}
.nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.nav__item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 12px;
  border-radius: var(--r-md);
  color: var(--text-2);
  font-size: var(--text-sm);
  font-weight: 500;
  position: relative;
  transition: color 0.16s, background 0.16s;
}
.nav__item svg {
  opacity: 0.75;
}
.nav__item:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.045);
}
.nav__item.is-active {
  color: var(--text);
  background: rgba(255, 255, 255, 0.07);
}
.nav__item.is-active svg {
  color: var(--accent);
  opacity: 1;
}
.nav__item.is-active::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  translate: -6px -50%;
  width: 3px;
  height: 18px;
  border-radius: 3px;
  background: var(--accent);
}
.sidebar__section {
  display: flex;
  flex-direction: column;
  min-height: 0;
  flex: 1;
  border-top: 1px solid var(--line);
  padding-top: var(--sp-4);
}
.sidebar__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 8px 8px 12px;
}
.sidebar__head h2 {
  font-family: var(--font-body);
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--text-3);
}
.playlist-list {
  overflow-y: auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 1px;
}
.playlist-list button {
  width: 100%;
  text-align: left;
  padding: 8px 12px;
  border-radius: var(--r-sm);
  font-size: var(--text-sm);
  color: var(--text-2);
  display: flex;
  justify-content: space-between;
  gap: 8px;
  transition: background 0.16s, color 0.16s;
}
.playlist-list button:hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
}
.playlist-list button span:last-child {
  color: var(--text-3);
  font-size: var(--text-xs);
  flex: none;
}
.playlist-list__empty {
  padding: 6px 12px;
  font-size: var(--text-xs);
  color: var(--text-3);
  line-height: 1.5;
}
.sidebar__footer {
  padding-left: 12px;
}

/* ---------- 5. TOPBAR + SEARCH ---------- */
.topbar {
  grid-area: topbar;
  display: flex;
  align-items: center;
  gap: var(--sp-4);
  padding: 0 var(--sp-6) 0 var(--sp-5);
  border-bottom: 1px solid var(--line);
  background: rgba(8, 8, 11, 0.55);
  backdrop-filter: blur(18px);
  z-index: 20;
}
.topbar__nav {
  display: flex;
  gap: 4px;
}
.topbar__actions {
  display: none;
}
.topbar__account {
  display: flex;
  align-items: center;
  margin-left: auto;
}
.searchbar {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  max-width: 460px;
  padding: 0 12px 0 14px;
  height: 42px;
  border-radius: var(--r-full);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.045);
  transition: border-color 0.2s, background 0.2s;
}
.searchbar:focus-within {
  border-color: var(--line-strong);
  background: rgba(255, 255, 255, 0.075);
}
.searchbar__icon {
  color: var(--text-3);
  width: 18px;
  height: 18px;
}
.searchbar:focus-within .searchbar__icon {
  color: var(--accent);
}
.searchbar__input {
  flex: 1;
  min-width: 0;
  border: 0;
  background: none;
  font-size: var(--text-sm);
  outline: none;
}
.searchbar__input::-webkit-search-cancel-button {
  display: none;
}
.searchbar__input::placeholder {
  color: var(--text-3);
}
.searchbar__kbd {
  font-family: var(--font-body);
  font-size: 11px;
  color: var(--text-3);
  border: 1px solid var(--line-strong);
  border-radius: 5px;
  padding: 1px 6px;
}
.searchbar:focus-within .searchbar__kbd {
  display: none;
}
.searchbar__clear {
  display: flex;
  color: var(--text-3);
}
.searchbar__clear svg {
  width: 16px;
  height: 16px;
}
.searchbar__clear:hover {
  color: var(--text);
}
.suggest {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  padding: 6px;
  border-radius: var(--r-md);
  border: 1px solid var(--line-strong);
  background: rgba(20, 20, 25, 0.94);
  backdrop-filter: blur(24px);
  box-shadow: var(--shadow-3);
  max-height: 380px;
  overflow-y: auto;
  z-index: 40;
}
.suggest__label {
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-3);
  padding: 8px 10px 4px;
}
.suggest__item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 8px 10px;
  border-radius: var(--r-sm);
  text-align: left;
  font-size: var(--text-sm);
  color: var(--text-2);
}
.suggest__item img {
  width: 36px;
  height: 36px;
  border-radius: 6px;
  object-fit: cover;
  background: var(--surface-3);
}
.suggest__item strong {
  display: block;
  color: var(--text);
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.suggest__item small {
  color: var(--text-3);
}
.suggest__item > div {
  min-width: 0;
  flex: 1;
}
.suggest__item:hover,
.suggest__item.is-cursor {
  background: rgba(255, 255, 255, 0.07);
  color: var(--text);
}

/* ---------- 6. MAIN / VIEWS ---------- */
.main {
  grid-area: main;
  overflow-y: auto;
  overflow-x: hidden;
  min-height: 0;
  scroll-behavior: smooth;
}
.view {
  display: none;
}
.view.is-active {
  display: block;
}
.view__inner {
  max-width: 1320px;
  margin: 0 auto;
  padding: var(--sp-6) var(--sp-6) 80px;
  display: flex;
  flex-direction: column;
  gap: var(--sp-7);
}
.view__title {
  font-size: var(--text-2xl);
}
.view__sub {
  color: var(--text-2);
  font-size: var(--text-sm);
  margin-top: 6px;
}
.greeting__eyebrow {
  font-size: var(--text-xs);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 700;
}
.greeting__title {
  font-size: var(--text-2xl);
  margin-top: 8px;
}
.block {
  display: flex;
  flex-direction: column;
  gap: var(--sp-4);
}
.block__head {
  display: flex;
  align-items: baseline;
  gap: var(--sp-3);
}
.block__head h2 {
  font-size: var(--text-xl);
}
.badge {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  background: var(--accent-soft);
  padding: 3px 9px;
  border-radius: var(--r-full);
}
.link-btn {
  margin-left: auto;
  font-size: var(--text-sm);
  color: var(--text-3);
  font-weight: 500;
}
.link-btn:hover {
  color: var(--text);
  text-decoration: underline;
}

/* ---------- 7. FEATURED ---------- */
.featured {
  position: relative;
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: var(--sp-6);
  align-items: center;
  padding: var(--sp-6);
  border-radius: var(--r-xl);
  border: 1px solid var(--line);
  overflow: hidden;
  background: linear-gradient(115deg, color-mix(in srgb, var(--art-1) 60%, #101014), #0d0d11 65%);
  min-height: 240px;
}
.featured::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(600px 300px at 12% 20%, rgba(255, 255, 255, 0.055), transparent 65%);
  pointer-events: none;
}
.featured__art {
  position: relative;
  aspect-ratio: 1;
  border-radius: var(--r-lg);
  overflow: hidden;
  box-shadow: var(--shadow-3);
}
.featured__art img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.featured__body {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
  min-width: 0;
}
.featured__eyebrow {
  font-size: var(--text-xs);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 700;
}
.featured__title {
  font-size: clamp(1.6rem, 3.4vw, 2.4rem);
  line-height: 1.08;
}
.featured__artist {
  color: var(--text-2);
  font-size: var(--text-base);
}
.featured__actions {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  margin-top: var(--sp-3);
  flex-wrap: wrap;
}

/* ---------- 8. BUTTONS ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 42px;
  padding: 0 20px;
  border-radius: var(--r-full);
  border: 1px solid var(--line-strong);
  background: rgba(255, 255, 255, 0.06);
  font-size: var(--text-sm);
  font-weight: 500;
  transition: background 0.16s, transform 0.12s var(--ease), border-color 0.16s;
}
.btn:hover {
  background: rgba(255, 255, 255, 0.12);
}
.btn:active {
  transform: scale(0.97);
}
.btn--accent {
  background: var(--accent);
  color: var(--accent-ink);
  border-color: transparent;
  font-weight: 700;
}
.btn--accent:hover {
  background: color-mix(in srgb, var(--accent) 84%, white);
}
.btn--ghost {
  background: rgba(255, 255, 255, 0.05);
  height: 38px;
  padding: 0 16px;
}
.btn svg {
  width: 18px;
  height: 18px;
}
.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  width: 36px;
  height: 36px;
  border-radius: var(--r-full);
  color: var(--text-2);
  transition: color 0.16s, background 0.16s, transform 0.12s;
}
.icon-btn:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.08);
}
.icon-btn:active {
  transform: scale(0.92);
}
.icon-btn--sm {
  width: 28px;
  height: 28px;
}
.icon-btn--sm svg {
  width: 16px;
  height: 16px;
}
.icon-btn__label {
  display: none;
}
.icon-btn.is-on {
  color: var(--accent);
}
.icon-btn.is-on::after {
  content: "";
  position: absolute;
}
.icon-btn--heart svg {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
}
.icon-btn--heart[aria-pressed="true"] {
  color: var(--accent);
}
.icon-btn--heart[aria-pressed="true"] svg {
  fill: currentColor;
  stroke: currentColor;
}
.row-actions {
  display: flex;
  gap: var(--sp-3);
  flex-wrap: wrap;
}

/* ---------- 9. HORIZONTAL RAIL + CARDS ---------- */
.hscroll {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 178px;
  gap: var(--sp-4);
  overflow-x: auto;
  padding-bottom: 6px;
  scroll-snap-type: x proximity;
  scrollbar-width: thin;
}
.card {
  scroll-snap-align: start;
  display: flex;
  flex-direction: column;
  gap: 10px;
  text-align: left;
  padding: 0;
  border-radius: var(--r-md);
  transition: transform 0.24s var(--ease-out);
}
.card:hover {
  transform: translateY(-3px);
}
.card__art {
  position: relative;
  aspect-ratio: 1;
  border-radius: var(--r-md);
  overflow: hidden;
  background: var(--surface-2);
  box-shadow: var(--shadow-2);
}
.card__art img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s var(--ease-out), filter 0.3s;
}
.card:hover .card__art img {
  transform: scale(1.06);
}
.card__play {
  position: absolute;
  right: 10px;
  bottom: 10px;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: var(--r-full);
  background: var(--accent);
  color: var(--accent-ink);
  box-shadow: var(--shadow-2);
  opacity: 0;
  transform: translateY(8px) scale(0.9);
  transition: opacity 0.2s, transform 0.24s var(--ease-out);
}
.card:hover .card__play,
.card:focus-visible .card__play,
.card.is-playing .card__play {
  opacity: 1;
  transform: none;
}
.card__dur {
  position: absolute;
  left: 8px;
  bottom: 8px;
  font-size: 11px;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 5px;
  background: rgba(0, 0, 0, 0.66);
  backdrop-filter: blur(6px);
}
.card__art,
.card__title,
.card__artist {
  display: block;
}
.card__title {
  font-size: var(--text-sm);
  font-weight: 500;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.card__artist {
  font-size: var(--text-xs);
  color: var(--text-3);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.card.is-playing .card__title {
  color: var(--accent);
}

/* mood tiles */
.mood-row {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: var(--sp-3);
}
.mood {
  position: relative;
  height: 86px;
  padding: var(--sp-4);
  border-radius: var(--r-md);
  overflow: hidden;
  text-align: left;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: var(--text-lg);
  border: 1px solid var(--line);
  transition: transform 0.2s var(--ease-out), border-color 0.2s;
}
.mood:hover {
  transform: translateY(-2px);
  border-color: var(--line-strong);
}
.mood span {
  position: relative;
  z-index: 1;
}
.mood small {
  display: block;
  font-family: var(--font-body);
  font-size: var(--text-xs);
  font-weight: 500;
  color: rgba(255, 255, 255, 0.6);
  margin-top: 3px;
}
.mood::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(130deg, var(--m1), var(--m2));
  opacity: 0.34;
}

/* ---------- 10. SONG ROWS ---------- */
.song-list {
  display: flex;
  flex-direction: column;
}
.grid-rows {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 2px var(--sp-5);
}
.row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto auto;
  align-items: center;
  gap: var(--sp-4);
  padding: 8px 10px;
  border-radius: var(--r-md);
  text-align: left;
  position: relative;
  transition: background 0.15s;
}
.row:hover {
  background: rgba(255, 255, 255, 0.05);
}
.row__index {
  width: 22px;
  text-align: right;
  font-size: var(--text-sm);
  font-variant-numeric: tabular-nums;
  color: var(--text-3);
}
.song-list:not(.song-list--ranked) .row__index {
  display: none;
}
.row__art {
  position: relative;
  width: 44px;
  height: 44px;
  border-radius: 7px;
  overflow: hidden;
  background: var(--surface-2);
  flex: none;
}
.row__art img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.row__art-play {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  opacity: 0;
  transition: opacity 0.16s;
}
.row__art-play svg {
  width: 18px;
  height: 18px;
}
.row:hover .row__art-play {
  opacity: 1;
}
.row__hit {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  align-items: center;
  gap: var(--sp-3);
  min-width: 0;
  padding: 0;
  text-align: left;
}
.row__meta {
  min-width: 0;
  display: block;
}
.row__title {
  display: block;
  font-size: var(--text-sm);
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.row__artist {
  display: block;
  font-size: var(--text-xs);
  color: var(--text-3);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.row__index {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 2px;
}
.row__dur {
  font-size: var(--text-xs);
  color: var(--text-3);
  font-variant-numeric: tabular-nums;
}
.row__ctl {
  display: flex;
  align-items: center;
  gap: 2px;
  opacity: 0;
  transition: opacity 0.16s;
}
.row:hover .row__ctl,
.row:focus-within .row__ctl {
  opacity: 1;
}
.row__ctl .icon-btn {
  width: 32px;
  height: 32px;
}
.row__ctl .icon-btn svg {
  width: 17px;
  height: 17px;
}
.row__ctl .icon-btn--heart[aria-pressed="true"] {
  opacity: 1;
}
.row:has(.icon-btn--heart[aria-pressed="true"]) .row__ctl {
  opacity: 1;
}
.row.is-playing {
  background: rgba(255, 255, 255, 0.05);
}
.row.is-playing .row__title {
  color: var(--accent);
}
.row.is-playing .row__index {
  color: var(--accent);
}

/* ---------- 11. CHIPS / TABS ---------- */
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-2);
}
.chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 34px;
  padding: 0 8px 0 14px;
  border-radius: var(--r-full);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
  font-size: var(--text-sm);
  color: var(--text-2);
  transition: background 0.16s, color 0.16s;
}
.chip:hover {
  background: rgba(255, 255, 255, 0.09);
  color: var(--text);
}
.chip--plain {
  padding-right: 14px;
}
.chip__x {
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  color: var(--text-3);
}
.chip__x svg {
  width: 13px;
  height: 13px;
}
.chip__x:hover {
  background: rgba(255, 255, 255, 0.14);
  color: var(--text);
}
.tabs {
  display: flex;
  gap: 4px;
  overflow-x: auto;
  border-bottom: 1px solid var(--line);
  padding-bottom: 0;
}
.tab {
  padding: 10px 14px;
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--text-3);
  border-bottom: 2px solid transparent;
  white-space: nowrap;
}
.tab:hover {
  color: var(--text-2);
}
.tab.is-active {
  color: var(--text);
  border-bottom-color: var(--accent);
}
.section-title {
  font-size: var(--text-lg);
  margin-bottom: var(--sp-3);
}

/* ---------- 12. STATES (empty / error / skeleton) ---------- */
.state {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: var(--sp-3);
  padding: var(--sp-7) var(--sp-4);
  color: var(--text-2);
}
.state svg {
  width: 34px;
  height: 34px;
  color: var(--text-3);
}
.state h3 {
  font-size: var(--text-lg);
  color: var(--text);
}
.state p {
  font-size: var(--text-sm);
  max-width: 380px;
}
.skel {
  background: linear-gradient(90deg, var(--surface-2) 25%, var(--surface-3) 37%, var(--surface-2) 63%);
  background-size: 400% 100%;
  border-radius: var(--r-sm);
}
.skel-row {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) 44px;
  gap: var(--sp-4);
  align-items: center;
  padding: 8px 10px;
}
.skel-row__art {
  width: 44px;
  height: 44px;
  border-radius: 7px;
}
.skel-line {
  height: 10px;
  border-radius: 4px;
}
.skel-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.skel-card__art {
  aspect-ratio: 1;
  border-radius: var(--r-md);
}

/* ---------- 13. BOTTOM PLAYER ---------- */
.player {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  height: var(--player-h);
  z-index: 60;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 42%) minmax(0, 1fr);
  align-items: center;
  gap: var(--sp-4);
  padding: 0 var(--sp-5);
  border-top: 1px solid var(--line-strong);
  background: linear-gradient(
      180deg,
      color-mix(in srgb, var(--art-1) 30%, rgba(12, 12, 15, 0.92)),
      rgba(9, 9, 12, 0.95)
    );
  backdrop-filter: blur(26px) saturate(1.2);
  transition: background 0.9s var(--ease);
}
.player[data-empty="true"] .player__center .seek,
.player[data-empty="true"] .eq {
  opacity: 0.35;
  pointer-events: none;
}
.player__left {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  min-width: 0;
}
.player__art {
  position: relative;
  width: 58px;
  height: 58px;
  border-radius: var(--r-sm);
  overflow: hidden;
  flex: none;
  background: var(--surface-2);
  box-shadow: var(--shadow-1);
}
.player__art img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.player__art-expand {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  opacity: 0;
  transition: opacity 0.18s;
}
.player__art:hover .player__art-expand {
  opacity: 1;
}
.player__meta {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 1px;
}
.player__title {
  font-size: var(--text-sm);
  font-weight: 500;
  text-align: left;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 100%;
}
.player__title:hover {
  text-decoration: underline;
}
.player__artist {
  font-size: var(--text-xs);
  color: var(--text-3);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.player__center {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}
.controls {
  display: flex;
  align-items: center;
  gap: 6px;
}
.controls--full {
  gap: var(--sp-4);
  justify-content: center;
}
.play-btn {
  position: relative;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: var(--r-full);
  background: var(--text);
  color: #0a0a0c;
  transition: transform 0.14s var(--ease), background 0.2s;
}
.play-btn:hover {
  transform: scale(1.07);
}
.play-btn:active {
  transform: scale(0.94);
}
.play-btn--lg {
  width: 64px;
  height: 64px;
}
.play-btn--lg svg {
  width: 26px;
  height: 26px;
}
.ico-pause,
.play-btn__spinner {
  display: none;
}
body[data-playing="true"] .play-btn .ico-play {
  display: none;
}
body[data-playing="true"] .play-btn .ico-pause {
  display: block;
}
body[data-buffering="true"] .play-btn .ico-play,
body[data-buffering="true"] .play-btn .ico-pause {
  visibility: hidden;
}
body[data-buffering="true"] .play-btn__spinner {
  display: block;
  position: absolute;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 2px solid rgba(0, 0, 0, 0.25);
  border-top-color: #0a0a0c;
  animation: spin 0.7s linear infinite;
}
.repeat-one {
  display: none;
  position: absolute;
  font-size: 9px;
  font-weight: 800;
  translate: 0 1px;
}
#btn-repeat,
#fp-repeat {
  position: relative;
}
#btn-repeat[data-mode="one"] .repeat-one,
#fp-repeat[data-mode="one"] .repeat-one {
  display: block;
}
#btn-repeat[data-mode="one"] .ico-repeat,
#fp-repeat[data-mode="one"] .ico-repeat {
  opacity: 0.35;
}

/* seek */
.seek {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
}
.seek__time {
  font-size: 11px;
  color: var(--text-3);
  font-variant-numeric: tabular-nums;
  width: 38px;
  text-align: center;
  flex: none;
}
.seek__bar {
  flex: 1;
  padding: 7px 0;
  cursor: pointer;
  min-width: 0;
}
.seek__track {
  height: 4px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.16);
  overflow: visible;
  position: relative;
}
.seek__fill {
  position: absolute;
  inset: 0 auto 0 0;
  width: 0%;
  border-radius: 99px;
  background: var(--text);
}
.seek__thumb {
  position: absolute;
  right: 0;
  top: 50%;
  translate: 50% -50%;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.5);
  opacity: 0;
  transition: opacity 0.16s;
}
.seek__bar:hover .seek__fill,
.seek__bar.is-drag .seek__fill {
  background: var(--accent);
}
.seek__bar:hover .seek__thumb,
.seek__bar.is-drag .seek__thumb,
.seek__bar:focus-visible .seek__thumb {
  opacity: 1;
}
.seek--full .seek__track {
  height: 5px;
}
.player__right {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
}
.volume {
  display: flex;
  align-items: center;
  gap: 6px;
}
.volume__bar {
  width: 92px;
  padding: 7px 0;
  cursor: pointer;
}
.volume__track {
  height: 4px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.16);
  position: relative;
}
.volume__fill {
  position: absolute;
  inset: 0 auto 0 0;
  width: 80%;
  border-radius: 99px;
  background: var(--text-2);
}
.volume__thumb {
  position: absolute;
  right: 0;
  top: 50%;
  translate: 50% -50%;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: #fff;
  opacity: 0;
  transition: opacity 0.16s;
}
.volume__bar:hover .volume__fill {
  background: var(--accent);
}
.volume__bar:hover .volume__thumb,
.volume__bar:focus-visible .volume__thumb {
  opacity: 1;
}
.ico-muted {
  display: none;
}
body[data-muted="true"] .ico-vol {
  display: none;
}
body[data-muted="true"] .ico-muted {
  display: block;
}
.eq {
  display: flex;
  align-items: flex-end;
  gap: 2px;
  height: 16px;
  margin-right: 6px;
  opacity: 0;
  transition: opacity 0.25s var(--ease);
}
body[data-playing="true"] .eq {
  opacity: 1;
}
.eq i {
  width: 3px;
  border-radius: 2px;
  background: var(--accent);
  height: 4px;
}
.player__progress-mobile,
.player__mobile-play,
.player__mobile-lyrics,
.botnav {
  display: none;
}

/* ---------- 14. FULL PLAYER OVERLAY ---------- */
.fullplayer,
.lyricsview {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: flex;
  flex-direction: column;
  background: var(--bg-deep);
  opacity: 0;
  visibility: hidden;
  transform: translateY(18px) scale(0.985);
  transition: opacity 0.32s var(--ease-out), transform 0.36s var(--ease-out), visibility 0.36s;
}
.fullplayer.is-open,
.lyricsview.is-open {
  opacity: 1;
  visibility: visible;
  transform: none;
}
.fullplayer__bg,
.lyricsview__bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(900px 700px at 20% 0%, color-mix(in srgb, var(--art-1) 75%, transparent), transparent 70%),
    radial-gradient(900px 700px at 85% 100%, color-mix(in srgb, var(--art-2) 65%, transparent), transparent 70%),
    linear-gradient(180deg, #0b0b0f, #050507);
  transition: background 1s var(--ease);
}
.fullplayer__bg::after,
.lyricsview__bg::after {
  content: "";
  position: absolute;
  inset: 0;
  backdrop-filter: blur(70px);
  background: rgba(6, 6, 9, 0.42);
}
.fullplayer__top,
.lyricsview__top {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-4);
  padding: var(--sp-4) var(--sp-5);
}
.fullplayer__label,
.lyricsview__label {
  font-size: var(--text-xs);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-2);
  font-weight: 700;
}
.lyricsview__source {
  font-size: var(--text-xs);
  color: var(--text-3);
  min-width: 92px;
  text-align: right;
}
.fullplayer__body {
  position: relative;
  z-index: 2;
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: var(--sp-5);
  align-items: center;
  justify-content: center;
  width: min(560px, 100%);
  margin: 0 auto;
  padding: 0 var(--sp-5) var(--sp-6);
}
.fullplayer__artwrap {
  position: relative;
  width: min(380px, 62vh);
  aspect-ratio: 1;
}
.fullplayer__art {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: var(--r-lg);
  box-shadow: 0 40px 90px -30px rgba(0, 0, 0, 0.9);
  position: relative;
  z-index: 1;
}
.fullplayer__disc {
  position: absolute;
  right: -46px;
  top: 50%;
  translate: 0 -50%;
  width: 62%;
  aspect-ratio: 1;
  border-radius: 50%;
  background:
    radial-gradient(circle at 50% 50%, #16161a 22%, #0e0e12 23%, #14141a 60%, #0b0b0f 61%);
  border: 1px solid rgba(255, 255, 255, 0.07);
  opacity: 0.9;
}
.fullplayer__info {
  display: flex;
  align-items: center;
  gap: var(--sp-4);
  width: 100%;
}
.fullplayer__titles {
  min-width: 0;
  flex: 1;
}
.fullplayer__titles h2 {
  font-size: var(--text-xl);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.fullplayer__titles p {
  color: var(--text-2);
  font-size: var(--text-sm);
  margin-top: 4px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.fullplayer__extra {
  display: flex;
  gap: var(--sp-3);
}

/* ---------- 15. FULL LYRICS ---------- */
.lyricsview__body {
  position: relative;
  z-index: 2;
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: var(--sp-7);
  max-width: 1180px;
  width: 100%;
  margin: 0 auto;
  padding: 0 var(--sp-6);
}
.lyricsview__side {
  align-self: center;
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
}
.lyricsview__art {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: var(--r-lg);
  box-shadow: 0 30px 70px -28px rgba(0, 0, 0, 0.9);
}
.lyricsview__side h2 {
  font-size: var(--text-lg);
  margin-top: 6px;
}
.lyricsview__side p {
  color: var(--text-2);
  font-size: var(--text-sm);
}
.lyricsview__sidectl {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  margin-top: var(--sp-2);
}
.lyricsview__scroll {
  overflow-y: auto;
  min-height: 0;
  padding: 26vh 0 42vh;
  /* Gulir dikendalikan requestAnimationFrame di ui.js, bukan scroll-behavior
     bawaan browser, agar bisa dialihkan di tengah animasi. */
  scroll-behavior: auto;
  overscroll-behavior: contain;
  mask-image: linear-gradient(180deg, transparent, #000 16%, #000 78%, transparent);
  -webkit-mask-image: linear-gradient(180deg, transparent, #000 16%, #000 78%, transparent);
  scrollbar-width: none;
}
.lyricsview__scroll::-webkit-scrollbar {
  display: none;
}
.lyrics {
  display: flex;
  flex-direction: column;
  gap: 10px;
  /* Baris aktif diperbesar 1,05x dari tepi kiri, jadi sisi kanan perlu ruang
     cadangan; tanpa ini baris panjang terpotong saat aktif. */
  padding-right: 6%;
  /* Lapisan komposit sendiri supaya gulir dan transisi baris tidak saling
     memicu repaint. */
  will-change: transform;
}
.lyric-line {
  /* Nilai dasar; diisi ulang per baris oleh ui.js sesuai jarak dari baris aktif. */
  --d: 6;
  --dir: 1;
  position: relative;
  font-family: var(--font-display);
  font-size: clamp(1.35rem, 2.5vw, 2.15rem);
  font-weight: 800;
  line-height: 1.24;
  letter-spacing: -0.02em;
  text-align: left;
  padding: 8px 14px;
  border-radius: var(--r-md);
  color: #fff;
  width: 100%;
  transform-origin: left center;
  /* Opacity dan blur turun bertahap sesuai kedalaman, jadi perpindahan
     terasa berlapis, bukan hidup-mati. Nilai baris tetangga tetap 0.35. */
  opacity: clamp(0.12, calc(0.52 - var(--d) * 0.085), 0.35);
  filter: blur(calc(min(var(--d), 4) * 0.45px));
  transform: translate3d(0, 0, 0) scale(0.985);
  /* Hanya transform, opacity, dan filter yang dianimasikan: tanpa layout. */
  transition:
    opacity 520ms var(--ease-lyric),
    transform 640ms var(--ease-lyric),
    filter 520ms var(--ease-lyric),
    color 420ms linear;
}
.lyric-line.is-near {
  transform: translate3d(calc(var(--d) * var(--dir) * -0.6px), 0, 0) scale(0.985);
}
.lyric-line:hover {
  opacity: 0.68;
  filter: none;
}
.lyric-line.active {
  opacity: 1;
  transform: translate3d(0, 0, 0) scale(1.05);
  filter: none;
  color: color-mix(in srgb, var(--accent) 34%, #ffffff);
  text-shadow: 0 6px 34px color-mix(in srgb, var(--accent) 24%, transparent);
  transition:
    opacity 380ms var(--ease-lyric),
    transform 560ms var(--ease-lyric-active),
    filter 380ms var(--ease-lyric),
    color 320ms linear;
}
.lyric-line.is-past {
  opacity: clamp(0.1, calc(0.3 - var(--d) * 0.05), 0.24);
}
/* Lapisan teks: dasar selalu tampil, lapisan isi menyapu dari kiri ke kanan
   mengikuti waktu lagu sehingga baris aktif tidak terasa statis. */
.lyric-line__text {
  position: relative;
  display: inline-block;
}
.lyric-line__fill {
  position: absolute;
  inset: 0;
  white-space: pre-wrap;
  pointer-events: none;
  opacity: 0;
  transition: opacity 240ms var(--ease-lyric);
}
/* Setiap kata menyala satu per satu mengikuti waktu lagu. Yang berubah hanya
   opacity, jadi tidak ada reflow saat sorotan berjalan. */
.lyric-word {
  color: var(--accent);
  opacity: 0;
  transition: opacity 260ms var(--ease-lyric);
}
.lyric-word.is-lit {
  opacity: 1;
}
.lyric-line.active .lyric-line__fill {
  opacity: 1;
}
.lyric-line--plain {
  font-family: var(--font-body);
  font-size: var(--text-lg);
  font-weight: 500;
  opacity: 0.75;
  filter: none;
  cursor: default;
}
.lyrics-note {
  font-size: var(--text-sm);
  color: var(--text-3);
  padding: 8px 14px;
}
.lyricsview__mini {
  position: relative;
  z-index: 2;
  padding: var(--sp-4) var(--sp-6) var(--sp-5);
  max-width: 1180px;
  width: 100%;
  margin: 0 auto;
}

/* ---------- 16. QUEUE DRAWER ---------- */
.scrim {
  position: fixed;
  inset: 0;
  z-index: 70;
  background: rgba(0, 0, 0, 0.5);
  opacity: 0;
  transition: opacity 0.25s;
  backdrop-filter: blur(2px);
}
.scrim.is-open {
  opacity: 1;
}
.queue {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: 380px;
  max-width: 92vw;
  z-index: 90;
  display: flex;
  flex-direction: column;
  border-left: 1px solid var(--line-strong);
  background: rgba(14, 14, 18, 0.93);
  backdrop-filter: blur(30px);
  transform: translateX(102%);
  visibility: hidden;
  transition: transform 0.36s var(--ease-out), visibility 0.36s;
  box-shadow: -20px 0 60px -20px rgba(0, 0, 0, 0.8);
}
.queue.is-open {
  transform: none;
  visibility: visible;
}
.queue__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--sp-4) var(--sp-4) var(--sp-3) var(--sp-5);
  border-bottom: 1px solid var(--line);
}
.queue__head h2 {
  font-size: var(--text-lg);
}
.queue__headctl {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
}
.queue__body {
  flex: 1;
  overflow-y: auto;
  padding: var(--sp-3) var(--sp-3) var(--sp-6);
}
.queue__label {
  font-size: 11px;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--text-3);
  font-weight: 700;
  padding: var(--sp-4) 10px var(--sp-2);
}
.qrow {
  display: grid;
  grid-template-columns: 22px 40px minmax(0, 1fr) auto;
  align-items: center;
  gap: var(--sp-3);
  padding: 7px 8px;
  border-radius: var(--r-md);
  transition: background 0.15s;
}
.qrow:hover {
  background: rgba(255, 255, 255, 0.055);
}
.qrow.is-current {
  background: var(--accent-soft);
}
.qrow.is-current .qrow__title {
  color: var(--accent);
}
.qrow__grip {
  display: grid;
  place-items: center;
  color: var(--text-3);
  cursor: grab;
  height: 30px;
}
.qrow__grip svg {
  width: 15px;
  height: 15px;
}
.qrow__art {
  width: 40px;
  height: 40px;
  border-radius: 6px;
  overflow: hidden;
  background: var(--surface-2);
}
.qrow__art img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.qrow__main {
  min-width: 0;
  text-align: left;
}
.qrow__main {
  padding: 0;
}
.qrow__title {
  display: block;
  font-size: var(--text-sm);
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.qrow__artist {
  display: block;
  font-size: var(--text-xs);
  color: var(--text-3);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.qrow__x {
  opacity: 0;
}
.qrow:hover .qrow__x,
.qrow:focus-within .qrow__x {
  opacity: 1;
}
.qrow.is-dragging {
  opacity: 0.4;
}
.qrow.is-over {
  box-shadow: inset 0 2px 0 var(--accent);
}

/* ---------- 17. CONTEXT MENU / TOAST / MODAL ---------- */
.ctxmenu {
  position: fixed;
  z-index: 120;
  min-width: 216px;
  padding: 6px;
  border-radius: var(--r-md);
  border: 1px solid var(--line-strong);
  background: rgba(22, 22, 28, 0.96);
  backdrop-filter: blur(24px);
  box-shadow: var(--shadow-3);
}
.ctxmenu button {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 8px 10px;
  border-radius: var(--r-sm);
  font-size: var(--text-sm);
  color: var(--text-2);
  text-align: left;
}
.ctxmenu button svg {
  width: 16px;
  height: 16px;
  opacity: 0.7;
}
.ctxmenu button:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
}
.ctxmenu button[disabled] {
  opacity: 0.4;
  cursor: not-allowed;
}
.ctxmenu button[disabled]:hover {
  background: none;
  color: var(--text-2);
}
.ctxmenu__sep {
  height: 1px;
  background: var(--line);
  margin: 5px 4px;
}
.ctxmenu__note {
  font-size: 11px;
  color: var(--text-3);
  padding: 4px 10px 8px;
  line-height: 1.45;
}
.toasts {
  position: fixed;
  left: 50%;
  bottom: calc(var(--player-h) + var(--botnav-h) + 18px);
  translate: -50% 0;
  z-index: 140;
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: center;
  pointer-events: none;
}
.toast {
  padding: 10px 18px;
  border-radius: var(--r-full);
  border: 1px solid var(--line-strong);
  background: rgba(24, 24, 30, 0.96);
  backdrop-filter: blur(20px);
  font-size: var(--text-sm);
  box-shadow: var(--shadow-2);
  max-width: 88vw;
  text-align: center;
  display: flex;
  align-items: center;
  gap: 12px;
  justify-content: center;
}
.toast__text {
  min-width: 0;
  flex: 1 1 auto;
  text-wrap: pretty;
}
/* Pesan panjang dengan tombol aksi memakai bentuk kartu, bukan pil, agar
   teksnya tidak terpecah satu kata per baris. */
.toast:has(.toast__action) {
  border-radius: var(--r-lg);
  text-align: left;
  padding: 12px 12px 12px 18px;
  line-height: 1.45;
}
.toast__action {
  pointer-events: auto;
  flex: none;
  padding: 5px 12px;
  border-radius: var(--r-full);
  border: 1px solid var(--line-strong);
  background: var(--accent);
  color: var(--accent-ink);
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.01em;
}
.toast__action:hover {
  filter: brightness(1.08);
}
.toast--warn {
  border-color: rgba(255, 176, 92, 0.35);
  color: #ffd7a8;
}
.modal {
  position: fixed;
  inset: 0;
  z-index: 150;
  display: grid;
  place-items: center;
  padding: var(--sp-4);
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
}
.modal__panel {
  width: min(420px, 100%);
  padding: var(--sp-5);
  border-radius: var(--r-lg);
  border: 1px solid var(--line-strong);
  background: var(--surface-1);
  box-shadow: var(--shadow-3);
  display: flex;
  flex-direction: column;
  gap: var(--sp-4);
}
.modal__panel h3 {
  font-size: var(--text-lg);
}
.field {
  width: 100%;
  height: 44px;
  padding: 0 14px;
  border-radius: var(--r-md);
  border: 1px solid var(--line-strong);
  background: rgba(255, 255, 255, 0.05);
  outline: none;
}
.field:focus {
  border-color: var(--accent);
}
/* Isi modal disusun vertikal supaya modal akun yang punya banyak baris rapi. */
#modal-body {
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
}
.modal__actions {
  display: flex;
  justify-content: flex-end;
  gap: var(--sp-2);
  margin-top: var(--sp-4);
}
.modal__list {
  display: flex;
  flex-direction: column;
  gap: 2px;
  max-height: 40vh;
  overflow-y: auto;
}
.modal__list button {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--r-sm);
  font-size: var(--text-sm);
  text-align: left;
}
.modal__list button:hover {
  background: rgba(255, 255, 255, 0.07);
}
.modal__list span:last-child {
  color: var(--text-3);
  font-size: var(--text-xs);
}

/* ---------- 18. PLAYLIST DETAIL HEADER ---------- */
.detail-head {
  display: grid;
  grid-template-columns: 200px minmax(0, 1fr);
  gap: var(--sp-5);
  align-items: end;
}
.detail-head__art {
  aspect-ratio: 1;
  border-radius: var(--r-lg);
  overflow: hidden;
  background: linear-gradient(135deg, var(--art-1), var(--art-2));
  box-shadow: var(--shadow-3);
  display: grid;
  place-items: center;
  color: rgba(255, 255, 255, 0.5);
}
.detail-head__art img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.detail-head__art svg {
  width: 48px;
  height: 48px;
}
.detail-head__eyebrow {
  font-size: var(--text-xs);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-3);
  font-weight: 700;
}
.detail-head h1 {
  font-size: clamp(1.7rem, 4vw, 2.6rem);
  margin: 8px 0;
}
.detail-head__sub {
  color: var(--text-2);
  font-size: var(--text-sm);
}
.detail-head__actions {
  display: flex;
  gap: var(--sp-3);
  margin-top: var(--sp-4);
  flex-wrap: wrap;
}

.detail-head__body {
  min-width: 0;
}
.detail-head__body .row-actions {
  margin-top: var(--sp-4);
}

/* ---------- 22. PLAYLIST GRID (library) ---------- */
.plist-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: var(--sp-4);
  margin-top: var(--sp-4);
}
.plist-card {
  border-radius: var(--r-md);
  border: 1px solid var(--line);
  background: var(--surface-1);
  transition: border-color 0.2s, transform 0.2s var(--ease-out);
}
.plist-card:hover {
  border-color: var(--line-strong);
  transform: translateY(-2px);
}
.plist-card__hit {
  display: block;
  width: 100%;
  padding: var(--sp-4);
  text-align: left;
}
.plist-card__art {
  display: grid;
  place-items: center;
  aspect-ratio: 1;
  border-radius: var(--r-sm);
  background: linear-gradient(135deg, var(--art-1), var(--art-2));
  margin-bottom: var(--sp-3);
}
.plist-card__art svg {
  width: 34px;
  height: 34px;
  color: rgba(255, 255, 255, 0.85);
}
.plist-card__name {
  display: block;
  font-weight: 500;
  font-size: var(--text-sm);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.plist-card__meta {
  display: block;
  font-size: var(--text-xs);
  color: var(--text-3);
  margin-top: 2px;
}
.chip__text {
  font-size: inherit;
  color: inherit;
  white-space: nowrap;
}

/* =================================================================
   LOGO SEBAGAI ARTWORK CADANGAN
   Dipakai saat thumbnail lagu tidak tersedia. Selektor ganda agar
   menang atas aturan object-fit: cover pada masing-masing artwork.
   ================================================================= */
.art--logo.art--logo {
  object-fit: contain;
  padding: 22%;
  background: var(--surface-2);
}

/* ==========================================================================
   AKUN & SINKRONISASI CLOUD
   ========================================================================== */
.account {
  position: relative;
  overflow: visible;
}
.account__face {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  overflow: hidden;
  background: var(--surface-3);
}
.account__face img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.account__initial {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.02em;
  color: var(--text-1);
}
.account__glyph svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}
/* Titik status kecil, bukan lampu neon. */
.account__dot {
  position: absolute;
  right: 3px;
  bottom: 3px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: 2px solid var(--surface-1);
  background: var(--text-3);
  transition: background 0.2s ease;
}
.account[data-status="signed"] .account__dot,
.account[data-status="guest"] .account__dot {
  background: var(--accent);
}
.account[data-status="saving"] .account__dot,
.account[data-status="connecting"] .account__dot {
  background: var(--text-2);
  animation: pulse-soft 1.4s ease-in-out infinite;
}
.account[data-status="offline"] .account__dot {
  background: #d9a13a;
}
.account[data-status="disabled"] .account__dot {
  background: var(--text-3);
}

.account-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px 6px 10px;
  border-radius: 999px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  font-size: var(--text-xs);
  color: var(--text-2);
  width: max-content;
}
.account-status__dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--text-3);
}
.account-status[data-status="signed"] .account-status__dot,
.account-status[data-status="guest"] .account-status__dot {
  background: var(--accent);
}
.account-status[data-status="saving"] .account-status__dot,
.account-status[data-status="connecting"] .account-status__dot {
  background: var(--text-2);
  animation: pulse-soft 1.4s ease-in-out infinite;
}
.account-status[data-status="offline"] .account-status__dot {
  background: #d9a13a;
}

.account-who__name {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 800;
}
.account-id {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-3);
  padding: 10px 12px;
  border-radius: var(--r-md);
  background: var(--surface-2);
  border: 1px solid var(--line);
}
.account-id code {
  font-size: 12px;
  color: var(--text-1);
  word-break: break-all;
}
.account-form {
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
}
.account-sep {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  color: var(--text-3);
  font-size: var(--text-xs);
}
.account-sep::before,
.account-sep::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line);
}
.btn--wide {
  width: 100%;
  justify-content: center;
}
.btn--sm {
  height: 34px;
  padding: 0 12px;
  font-size: var(--text-xs);
}

.account-steps {
  margin: 0;
  padding-left: 20px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: var(--text-xs);
  color: var(--text-2);
  line-height: 1.55;
}
.account-steps li::marker {
  color: var(--accent);
  font-weight: 700;
}

/* Panel saat aplikasi tampil di dalam frame lain dan login harus pindah tab. */
.account-embed {
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
  padding: var(--sp-4);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--surface-2);
}
