/* ==========================================================================
   UNMUSIC v3 — Liquid Glass
   1. tokens   2. reset/base   3. shell   4. sidebar   5. topbar
   6. views    7. cards & lists   8. controls & atoms
   ========================================================================== */

/* ---------------------------------------------------------------- 1. tokens */
:root {
  /* fluid type */
  --text-xs: clamp(0.75rem, 0.7rem + 0.2vw, 0.8125rem);
  --text-sm: clamp(0.875rem, 0.82rem + 0.25vw, 0.9375rem);
  --text-base: clamp(1rem, 0.95rem + 0.2vw, 1.0625rem);
  --text-lg: clamp(1.125rem, 1rem + 0.6vw, 1.375rem);
  --text-xl: clamp(1.5rem, 1.2rem + 1.1vw, 2.125rem);
  --text-2xl: clamp(2rem, 1.4rem + 2.2vw, 3rem);

  /* spacing */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;

  /* radii */
  --r-sm: 10px;
  --r-md: 16px;
  --r-lg: 22px;
  --r-xl: 30px;
  --r-pill: 999px;

  /* fonts */
  --font-display: "Clash Display", "Satoshi", "Segoe UI", sans-serif;
  --font-body: "Satoshi", "Inter", "Segoe UI", system-ui, sans-serif;

  /* artwork-driven accents (overwritten live by palette.js) */
  --art-1: #7c6cff;
  --art-2: #3fd8c2;
  --art-3: #ff7ac6;
  --art-1-soft: rgba(124, 108, 255, 0.42);
  --art-2-soft: rgba(63, 216, 194, 0.32);
  --art-3-soft: rgba(255, 122, 198, 0.26);

  /* motion */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-spring: cubic-bezier(0.34, 1.46, 0.44, 1);
  --ease-glide: cubic-bezier(0.4, 0, 0.2, 1);
  --dur-1: 140ms;
  --dur-2: 240ms;
  --dur-3: 420ms;
  --dur-4: 680ms;

  /* layout */
  --sidebar-w: 264px;
  --dock-h: 92px;
  --gutter: clamp(1rem, 2.4vw, 2.5rem);
  --safe-b: env(safe-area-inset-bottom, 0px);
}

/* dark (default) */
:root,
[data-theme="dark"] {
  color-scheme: dark;
  --bg-0: #06070c;
  --bg-1: #0a0c14;
  --ink-1: #f4f5fb;
  --ink-2: rgba(235, 238, 250, 0.72);
  --ink-3: rgba(226, 230, 248, 0.48);
  --ink-4: rgba(226, 230, 248, 0.28);

  --glass-bg: rgba(255, 255, 255, 0.052);
  --glass-bg-2: rgba(255, 255, 255, 0.082);
  --glass-brd: rgba(255, 255, 255, 0.09);
  --glass-brd-hi: rgba(255, 255, 255, 0.16);
  --glass-shadow: 0 24px 60px -28px rgba(0, 0, 0, 0.85);
  --sheen: linear-gradient(180deg, rgba(255, 255, 255, 0.13), rgba(255, 255, 255, 0) 42%);
  --blur: 26px;
  --hover: rgba(255, 255, 255, 0.07);
  --press: rgba(255, 255, 255, 0.12);
  --track: rgba(255, 255, 255, 0.14);
  --ambient-strength: 1;
}

[data-theme="light"] {
  color-scheme: light;
  --bg-0: #eef0f7;
  --bg-1: #f7f8fc;
  --ink-1: #0d1018;
  --ink-2: rgba(16, 20, 32, 0.7);
  --ink-3: rgba(16, 20, 32, 0.5);
  --ink-4: rgba(16, 20, 32, 0.42);

  --glass-bg: rgba(255, 255, 255, 0.55);
  --glass-bg-2: rgba(255, 255, 255, 0.74);
  --glass-brd: rgba(14, 18, 30, 0.08);
  --glass-brd-hi: rgba(14, 18, 30, 0.14);
  --glass-shadow: 0 22px 50px -26px rgba(20, 26, 48, 0.4);
  --sheen: linear-gradient(180deg, rgba(255, 255, 255, 0.85), rgba(255, 255, 255, 0) 46%);
  --blur: 22px;
  --hover: rgba(14, 18, 30, 0.05);
  --press: rgba(14, 18, 30, 0.1);
  --track: rgba(14, 18, 30, 0.14);
  --ambient-strength: 0.55;
}

/* ------------------------------------------------------------ 2. reset/base */
*,
*::before,
*::after {
  box-sizing: border-box;
}
* {
  margin: 0;
}
html {
  -webkit-text-size-adjust: 100%;
}
[hidden] {
  display: none !important;
}

body {
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--bg-0);
  color: var(--ink-1);
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img,
svg {
  display: block;
  max-width: 100%;
}
button,
input {
  font: inherit;
  color: inherit;
}
button {
  background: none;
  border: 0;
  cursor: pointer;
}
h1,
h2,
h3 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.08;
  letter-spacing: -0.015em;
  /* spasi Clash Display sangat rapat — dilebarkan supaya kata tidak menempel */
  word-spacing: 0.14em;
}
ul {
  list-style: none;
  padding: 0;
}
:focus-visible {
  outline: 2px solid var(--art-1);
  outline-offset: 3px;
  border-radius: var(--r-sm);
}
::selection {
  background: var(--art-1);
  color: #fff;
}
.sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}
.skip-link {
  position: fixed;
  top: -100px;
  left: var(--space-4);
  z-index: 999;
  padding: var(--space-3) var(--space-4);
  border-radius: var(--r-sm);
  background: var(--art-1);
  color: #fff;
  text-decoration: none;
}
.skip-link:focus {
  top: var(--space-4);
}
.tiny {
  font-size: var(--text-xs);
  color: var(--ink-3);
}
.hint {
  font-size: var(--text-xs);
  color: var(--ink-3);
}
.yt-host {
  position: fixed;
  left: -9999px;
  top: -9999px;
  width: 320px;
  height: 180px;
  opacity: 0;
  pointer-events: none;
}

/* scrollbars */
* {
  scrollbar-width: thin;
  scrollbar-color: var(--ink-4) transparent;
}
*::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}
*::-webkit-scrollbar-thumb {
  background: var(--ink-4);
  border: 3px solid transparent;
  background-clip: content-box;
  border-radius: 99px;
}
*::-webkit-scrollbar-thumb:hover {
  background: var(--ink-3);
  background-clip: content-box;
}

/* glass primitive */
.glass {
  position: relative;
  background: var(--glass-bg);
  border: 1px solid var(--glass-brd);
  -webkit-backdrop-filter: blur(var(--blur)) saturate(180%);
  backdrop-filter: blur(var(--blur)) saturate(180%);
  box-shadow: var(--glass-shadow);
}
.glass::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: var(--sheen);
  opacity: 0.9;
  pointer-events: none;
}

/* ---------------------------------------------------------------- 3. shell */
.ambient {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  background: radial-gradient(120% 90% at 50% -10%, var(--bg-1), var(--bg-0) 68%);
}
.ambient__blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  opacity: calc(0.55 * var(--ambient-strength));
  transition: background var(--dur-4) var(--ease-glide), opacity var(--dur-4) var(--ease-glide);
  will-change: transform;
}
.ambient__blob--a {
  width: 58vw;
  height: 58vw;
  min-width: 420px;
  min-height: 420px;
  top: -18vw;
  left: -10vw;
  background: var(--art-1-soft);
  animation: drift-a 26s var(--ease-glide) infinite alternate;
}
.ambient__blob--b {
  width: 46vw;
  height: 46vw;
  min-width: 360px;
  min-height: 360px;
  right: -12vw;
  top: 12vh;
  background: var(--art-2-soft);
  animation: drift-b 32s var(--ease-glide) infinite alternate;
}
.ambient__blob--c {
  width: 52vw;
  height: 52vw;
  min-width: 380px;
  min-height: 380px;
  left: 22vw;
  bottom: -26vw;
  background: var(--art-3-soft);
  animation: drift-c 38s var(--ease-glide) infinite alternate;
}
.ambient__grain {
  position: absolute;
  inset: -50%;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)'/%3E%3C/svg%3E");
  pointer-events: none;
}

.app {
  display: grid;
  grid-template-columns: var(--sidebar-w) minmax(0, 1fr);
  grid-template-rows: auto minmax(0, 1fr);
  grid-template-areas: "side top" "side main";
  min-height: 100dvh;
  gap: var(--space-4);
  padding: var(--space-4) var(--space-4) 0;
}

/* -------------------------------------------------------------- 4. sidebar */
.sidebar {
  grid-area: side;
  position: sticky;
  top: var(--space-4);
  height: calc(100dvh - var(--dock-h) - var(--space-8));
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
  padding: var(--space-5) var(--space-4);
  border-radius: var(--r-xl);
  overflow: hidden;
}
.brand {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding-inline: var(--space-2);
  color: var(--ink-1);
  text-decoration: none;
}
.brand__mark {
  width: 34px;
  height: 34px;
  color: var(--art-1);
  filter: drop-shadow(0 0 14px var(--art-1-soft));
  transition: transform var(--dur-3) var(--ease-spring);
}
.brand:hover .brand__mark {
  transform: rotate(-12deg) scale(1.06);
}
.brand__text {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: 0.14em;
}
.brand__text span {
  color: var(--ink-3);
  font-weight: 500;
}

.nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.nav__item {
  position: relative;
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3);
  border-radius: var(--r-md);
  color: var(--ink-2);
  font-size: var(--text-sm);
  font-weight: 500;
  transition: color var(--dur-1), background var(--dur-2);
}
.nav__item svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
  flex: 0 0 auto;
}
.nav__item:hover {
  background: var(--hover);
  color: var(--ink-1);
}
.nav__item.is-active {
  color: var(--ink-1);
  background: var(--glass-bg-2);
  box-shadow: inset 0 1px 0 var(--glass-brd-hi);
}
.nav__item.is-active::after {
  content: "";
  position: absolute;
  left: 0;
  top: 22%;
  bottom: 22%;
  width: 3px;
  border-radius: 99px;
  background: var(--art-1);
  box-shadow: 0 0 12px var(--art-1);
}

.sidebar__section {
  display: flex;
  flex-direction: column;
  min-height: 0;
  flex: 1;
  gap: var(--space-2);
}
.sidebar__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-inline: var(--space-3);
}
.sidebar__head h2 {
  font-family: var(--font-body);
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.playlist-list {
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 1px;
  padding-right: 2px;
}
.playlist-list__item {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  width: 100%;
  padding: var(--space-2) var(--space-3);
  border-radius: var(--r-sm);
  color: var(--ink-2);
  font-size: var(--text-sm);
  text-align: left;
  transition: background var(--dur-1), color var(--dur-1);
}
.playlist-list__item:hover {
  background: var(--hover);
  color: var(--ink-1);
}
.playlist-list__item.is-active {
  color: var(--art-1);
}
.playlist-list__dot {
  width: 26px;
  height: 26px;
  flex: 0 0 auto;
  border-radius: 8px;
  background: linear-gradient(140deg, var(--art-1), var(--art-3));
  opacity: 0.85;
}
.playlist-list__name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.playlist-list__n {
  margin-left: auto;
  font-size: var(--text-xs);
  color: var(--ink-4);
}

.sidebar__footer {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}
.taste-card {
  padding: var(--space-3);
  border-radius: var(--r-md);
  background: var(--glass-bg-2);
  border: 1px solid var(--glass-brd);
  display: grid;
  gap: 6px;
}
.taste-card__label {
  font-size: var(--text-xs);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-4);
}
.taste-card__mood {
  font-family: var(--font-display);
  font-size: var(--text-sm);
  font-weight: 600;
}
.taste-card__meter {
  height: 4px;
  border-radius: 99px;
  background: var(--track);
  overflow: hidden;
}
.taste-card__meter i {
  display: block;
  height: 100%;
  border-radius: 99px;
  background: linear-gradient(90deg, var(--art-2), var(--art-1));
  transition: width var(--dur-4) var(--ease-out);
}
.taste-card__hint {
  font-size: var(--text-xs);
  color: var(--ink-4);
}
.theme-toggle {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-3);
  border-radius: var(--r-pill);
  border: 1px solid var(--glass-brd);
  color: var(--ink-2);
  font-size: var(--text-xs);
  transition: background var(--dur-1), color var(--dur-1);
}
.theme-toggle:hover {
  background: var(--hover);
  color: var(--ink-1);
}
.theme-toggle svg {
  width: 15px;
  height: 15px;
  fill: currentColor;
}
[data-theme="dark"] .theme-toggle .ico-sun,
[data-theme="light"] .theme-toggle .ico-moon {
  display: none;
}

/* --------------------------------------------------------------- 5. topbar */
.topbar {
  grid-area: top;
  position: sticky;
  top: var(--space-4);
  z-index: 40;
  display: flex;
  align-items: center;
  gap: var(--space-3);
}
/* kabut di belakang topbar supaya konten tidak menembus saat digulir */
.topbar::before {
  content: "";
  position: absolute;
  inset: calc(var(--space-5) * -1) calc(var(--space-6) * -1) calc(var(--space-4) * -1);
  background: linear-gradient(to bottom, var(--bg-0) 40%, color-mix(in srgb, var(--bg-0) 70%, transparent) 75%, transparent);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  -webkit-mask-image: linear-gradient(to bottom, #000 62%, transparent);
  mask-image: linear-gradient(to bottom, #000 62%, transparent);
  pointer-events: none;
  z-index: -1;
}
.topbar__nav,
.topbar__actions,
.topbar__account {
  display: flex;
  gap: var(--space-2);
}
.searchbar {
  position: relative;
  flex: 1;
  max-width: 620px;
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: 0 var(--space-3);
  height: 46px;
  border-radius: var(--r-pill);
  transition: box-shadow var(--dur-2), border-color var(--dur-2);
}
.searchbar:focus-within {
  border-color: var(--glass-brd-hi);
  box-shadow: var(--glass-shadow), 0 0 0 3px var(--art-1-soft);
}
.searchbar__icon {
  width: 18px;
  height: 18px;
  fill: var(--ink-3);
  flex: 0 0 auto;
}
.searchbar__input {
  flex: 1;
  min-width: 0;
  border: 0;
  background: none;
  font-size: var(--text-sm);
}
.searchbar__input::placeholder {
  color: var(--ink-4);
}
.searchbar__input:focus {
  outline: none;
}
.searchbar__input::-webkit-search-cancel-button {
  display: none;
}
.searchbar__kbd {
  font-size: 11px;
  font-family: var(--font-body);
  color: var(--ink-4);
  border: 1px solid var(--glass-brd);
  border-radius: 6px;
  padding: 1px 6px;
}
.searchbar:focus-within .searchbar__kbd {
  display: none;
}
.searchbar__clear {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  color: var(--ink-3);
}
.searchbar__clear svg {
  width: 14px;
  height: 14px;
  fill: currentColor;
}
.searchbar__clear:hover {
  background: var(--hover);
  color: var(--ink-1);
}

.suggest {
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  right: 0;
  z-index: 60;
  max-height: min(60vh, 460px);
  overflow-y: auto;
  padding: var(--space-2);
  border-radius: var(--r-lg);
  display: flex;
  flex-direction: column;
  gap: 2px;
  /* panel harus cukup pekat supaya konten di belakang tidak menembus */
  background: color-mix(in srgb, var(--bg-1) 98%, transparent);
  border: 1px solid var(--glass-brd);
  box-shadow: 0 30px 60px -24px rgba(0, 0, 0, 0.75);
  -webkit-backdrop-filter: blur(var(--blur)) saturate(140%);
  backdrop-filter: blur(var(--blur)) saturate(140%);
  animation: pop-in var(--dur-2) var(--ease-out) both;
}
.suggest__item {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  width: 100%;
  padding: var(--space-2);
  border-radius: var(--r-sm);
  text-align: left;
  transition: background var(--dur-1);
}
.suggest__item img {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  object-fit: cover;
}
.suggest__item:hover,
.suggest__item.is-cursor {
  background: var(--glass-bg-2);
}
.suggest__txt {
  min-width: 0;
}
.suggest__title {
  display: block;
  font-size: var(--text-sm);
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.suggest__artist {
  display: block;
  font-size: var(--text-xs);
  color: var(--ink-3);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.suggest__head {
  padding: var(--space-2) var(--space-2) var(--space-1);
  font-size: var(--text-xs);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-4);
}

/* ---------------------------------------------------------------- 6. views */
.main {
  grid-area: main;
  min-width: 0;
  position: relative;
}
.view {
  display: none;
}
.view.is-active {
  display: block;
}
.view__inner {
  padding: var(--space-6) 0 calc(var(--dock-h) + var(--space-16));
  display: flex;
  flex-direction: column;
  gap: var(--space-10);
  animation: view-in var(--dur-3) var(--ease-out) both;
}
.view__title {
  font-size: var(--text-xl);
}
.view__sub {
  color: var(--ink-3);
  font-size: var(--text-sm);
}
.search-head {
  display: grid;
  gap: var(--space-2);
}

.hero {
  display: grid;
  gap: var(--space-2);
}
.hero__eyebrow {
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--art-1);
}
.hero__title {
  font-size: var(--text-2xl);
  font-weight: 600;
  background: linear-gradient(96deg, var(--ink-1) 20%, var(--art-1) 120%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero__sub {
  color: var(--ink-3);
  font-size: var(--text-sm);
  max-width: 52ch;
}

.block {
  display: grid;
  gap: var(--space-4);
}
.block__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--space-4);
}
.block__head h2 {
  font-size: var(--text-lg);
}
.link-btn {
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--ink-3);
  padding: var(--space-1) var(--space-2);
  border-radius: var(--r-sm);
  transition: color var(--dur-1), background var(--dur-1);
}
.link-btn:hover {
  color: var(--ink-1);
  background: var(--hover);
}
.badge {
  font-size: var(--text-xs);
  font-weight: 600;
  padding: 3px 10px;
  border-radius: var(--r-pill);
  background: var(--glass-bg-2);
  border: 1px solid var(--glass-brd);
  color: var(--ink-2);
}

/* spotlight ------------------------------------------------------------- */
.spotlight {
  position: relative;
  overflow: hidden;
  border-radius: var(--r-xl);
  border: 1px solid var(--glass-brd);
  background: var(--glass-bg);
  -webkit-backdrop-filter: blur(var(--blur));
  backdrop-filter: blur(var(--blur));
  box-shadow: var(--glass-shadow);
  min-height: 260px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(200px, 320px);
  gap: var(--space-6);
  padding: var(--space-8);
  align-items: center;
}
.spotlight__glow {
  position: absolute;
  inset: -40% -10% auto -10%;
  height: 140%;
  background: radial-gradient(60% 60% at 20% 20%, var(--art-1-soft), transparent 70%),
    radial-gradient(50% 50% at 90% 30%, var(--art-3-soft), transparent 70%);
  pointer-events: none;
}
.spotlight__body {
  position: relative;
  display: grid;
  gap: var(--space-4);
  align-content: center;
}
.spotlight__kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--art-2);
}
.spotlight__kicker svg {
  width: 14px;
  height: 14px;
  fill: currentColor;
}
.spotlight h2 {
  font-size: var(--text-xl);
  max-width: 24ch;
}
.spotlight__meta {
  color: var(--ink-3);
  font-size: var(--text-sm);
}
.spotlight__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  margin-top: var(--space-2);
}
.spotlight__art {
  position: relative;
  aspect-ratio: 1;
  border-radius: var(--r-lg);
  overflow: hidden;
  box-shadow: 0 30px 60px -24px rgba(0, 0, 0, 0.7);
  transform: rotate(2deg);
  transition: transform var(--dur-3) var(--ease-spring);
}
.spotlight:hover .spotlight__art {
  transform: rotate(0) scale(1.02);
}
.spotlight__art img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* rails & cards --------------------------------------------------------- */
.rail {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(154px, 176px);
  gap: var(--space-4);
  overflow-x: auto;
  scroll-snap-type: x proximity;
  padding-bottom: var(--space-2);
  scrollbar-width: none;
}
.rail::-webkit-scrollbar {
  display: none;
}
.card {
  scroll-snap-align: start;
  display: grid;
  gap: var(--space-3);
  padding: var(--space-3);
  border-radius: var(--r-lg);
  text-align: left;
  border: 1px solid transparent;
  transition: background var(--dur-2), border-color var(--dur-2), transform var(--dur-2) var(--ease-out);
}
.card:hover {
  background: var(--glass-bg);
  border-color: var(--glass-brd);
  transform: translateY(-3px);
}
.card__art {
  position: relative;
  aspect-ratio: 1;
  border-radius: var(--r-md);
  overflow: hidden;
  background: var(--glass-bg-2);
}
.card__art img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--dur-3) var(--ease-out);
}
.card:hover .card__art img {
  transform: scale(1.06);
}
.card__play {
  position: absolute;
  right: 8px;
  bottom: 8px;
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--art-1);
  color: #fff;
  opacity: 0;
  transform: translateY(8px) scale(0.9);
  box-shadow: 0 10px 24px -8px rgba(0, 0, 0, 0.8);
  transition: opacity var(--dur-2), transform var(--dur-2) var(--ease-spring);
}
.card__play svg {
  width: 17px;
  height: 17px;
  fill: currentColor;
}
.card:hover .card__play,
.card:focus-visible .card__play {
  opacity: 1;
  transform: translateY(0) scale(1);
}
.card__title {
  font-size: var(--text-sm);
  font-weight: 600;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.card__artist {
  font-size: var(--text-xs);
  color: var(--ink-3);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.card.is-playing .card__title {
  color: var(--art-1);
}

/* mood row -------------------------------------------------------------- */
.mood-row {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: var(--space-3);
}
.mood {
  position: relative;
  overflow: hidden;
  min-height: 104px;
  padding: var(--space-4);
  border-radius: var(--r-lg);
  border: 1px solid var(--glass-brd);
  display: grid;
  align-content: end;
  gap: 2px;
  text-align: left;
  isolation: isolate;
  transition: transform var(--dur-2) var(--ease-out), border-color var(--dur-2);
}
.mood::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(150deg, var(--mood-a, var(--art-1)), var(--mood-b, var(--art-3)));
  opacity: 0.34;
  transition: opacity var(--dur-3);
}
.mood:hover {
  transform: translateY(-3px);
  border-color: var(--glass-brd-hi);
}
.mood:hover::after {
  opacity: 0.55;
}
.mood__name {
  font-family: var(--font-display);
  font-size: var(--text-base);
  font-weight: 600;
}
.mood__desc {
  font-size: var(--text-xs);
  color: var(--ink-2);
}

/* song list ------------------------------------------------------------- */
.song-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.grid-rows {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 2px var(--space-6);
}
.row {
  position: relative;
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto auto;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-2) var(--space-3);
  border-radius: var(--r-md);
  text-align: left;
  width: 100%;
  transition: background var(--dur-1);
}
.row:hover {
  background: var(--hover);
}
/* hanya daftar berperingkat punya kolom nomor di depan */
.song-list--ranked .row {
  grid-template-columns: auto 44px minmax(0, 1fr) auto auto;
}
.row__rank {
  width: 22px;
  text-align: right;
  font-size: var(--text-xs);
  font-variant-numeric: tabular-nums;
  color: var(--ink-4);
}
.song-list:not(.song-list--ranked) .row__rank {
  display: none;
}
.row__art {
  position: relative;
  width: 44px;
  height: 44px;
  border-radius: 10px;
  overflow: hidden;
  background: var(--glass-bg-2);
  flex: 0 0 auto;
}
.row__art img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.row__art::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.45) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white'%3E%3Cpath d='M8 4.9 19.4 12 8 19.1z'/%3E%3C/svg%3E") center / 15px no-repeat;
  opacity: 0;
  transition: opacity var(--dur-1);
}
.row:hover .row__art::after {
  opacity: 1;
}
.row__txt {
  min-width: 0;
  display: grid;
  gap: 1px;
}
.row__title {
  font-size: var(--text-sm);
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.row__sub {
  font-size: var(--text-xs);
  color: var(--ink-3);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.row__reason {
  color: var(--art-2);
}
.row__time {
  font-size: var(--text-xs);
  color: var(--ink-4);
  font-variant-numeric: tabular-nums;
}
.row__tools {
  display: flex;
  align-items: center;
  gap: 2px;
  opacity: 0;
  transition: opacity var(--dur-1);
}
.row:hover .row__tools,
.row:focus-within .row__tools {
  opacity: 1;
}
.row.is-playing {
  background: var(--glass-bg-2);
}
.row.is-playing .row__title {
  color: color-mix(in srgb, var(--art-1) 55%, var(--ink-1));
  font-weight: 600;
}
.row.is-playing .row__rank {
  color: var(--art-1);
}

/* bars equalizer used in rows */
.bars {
  /* hanya tampil pada baris yang sedang diputar, menimpa kolom durasi */
  position: absolute;
  right: 86px;
  top: 50%;
  transform: translateY(-50%);
  display: none;
  align-items: flex-end;
  gap: 2px;
  height: 14px;
  width: 22px;
  pointer-events: none;
}
.row.is-playing .bars {
  display: flex;
}
.row.is-playing .row__time {
  opacity: 0;
}
.bars i {
  flex: 1;
  background: var(--art-1);
  border-radius: 2px;
  height: 30%;
  animation: bounce 1s ease-in-out infinite alternate;
}
.bars i:nth-child(2) {
  animation-delay: 0.18s;
}
.bars i:nth-child(3) {
  animation-delay: 0.36s;
}

/* ------------------------------------------------------- 7. atoms & states */
.icon-btn {
  position: relative;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: var(--r-md);
  color: var(--ink-2);
  transition: color var(--dur-1), background var(--dur-1), transform var(--dur-1);
}
.icon-btn svg {
  width: 19px;
  height: 19px;
  fill: currentColor;
}
.icon-btn:hover {
  background: var(--hover);
  color: var(--ink-1);
}
.icon-btn:active {
  transform: scale(0.94);
}
.icon-btn--sm {
  width: 30px;
  height: 30px;
  border-radius: var(--r-sm);
}
.icon-btn--sm svg {
  width: 15px;
  height: 15px;
}
.icon-btn[aria-pressed="true"] {
  color: var(--art-1);
}
.icon-btn--heart[aria-pressed="true"] {
  color: #ff5c8a;
}
.icon-btn--heart[aria-pressed="true"] svg {
  filter: drop-shadow(0 0 10px rgba(255, 92, 138, 0.6));
  animation: heart-pop var(--dur-3) var(--ease-spring);
}
.icon-btn.is-on {
  color: var(--art-1);
}
.icon-btn.is-on::after {
  content: "";
  position: absolute;
  bottom: 5px;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: currentColor;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-5);
  border-radius: var(--r-pill);
  border: 1px solid var(--glass-brd);
  background: var(--glass-bg-2);
  color: var(--ink-1);
  font-size: var(--text-sm);
  font-weight: 600;
  transition: transform var(--dur-1) var(--ease-out), background var(--dur-1), border-color var(--dur-1);
}
.btn svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
}
.btn:hover {
  border-color: var(--glass-brd-hi);
  transform: translateY(-1px);
}
.btn:active {
  transform: translateY(0) scale(0.985);
}
.btn--accent {
  background: linear-gradient(120deg, var(--art-1), var(--art-3));
  border-color: transparent;
  color: #fff;
  box-shadow: 0 14px 30px -14px var(--art-1);
}
.btn--ghost {
  background: none;
}
.btn--wide {
  width: 100%;
  justify-content: center;
}
.btn--sm {
  padding: var(--space-2) var(--space-4);
  font-size: var(--text-xs);
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}
.chip {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: 7px var(--space-3);
  border-radius: var(--r-pill);
  border: 1px solid var(--glass-brd);
  background: var(--glass-bg);
  color: var(--ink-2);
  font-size: var(--text-xs);
  transition: background var(--dur-1), color var(--dur-1);
}
.chip:hover {
  background: var(--glass-bg-2);
  color: var(--ink-1);
}
.chip__x {
  color: var(--ink-4);
  display: grid;
  place-items: center;
}
.chip__x svg {
  width: 11px;
  height: 11px;
  fill: currentColor;
}

.tabs {
  display: flex;
  gap: var(--space-1);
  overflow-x: auto;
  padding-bottom: 2px;
  scrollbar-width: none;
}
.tabs::-webkit-scrollbar {
  display: none;
}
.tab {
  flex: 0 0 auto;
  padding: var(--space-2) var(--space-4);
  border-radius: var(--r-pill);
  color: var(--ink-3);
  font-size: var(--text-sm);
  font-weight: 500;
  transition: background var(--dur-1), color var(--dur-1);
}
.tab:hover {
  color: var(--ink-1);
  background: var(--hover);
}
.tab.is-active {
  color: var(--ink-1);
  background: var(--glass-bg-2);
  box-shadow: inset 0 0 0 1px var(--glass-brd);
}

.row-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
}

/* playlist / detail header */
.detail {
  display: grid;
  grid-template-columns: minmax(160px, 220px) minmax(0, 1fr);
  gap: var(--space-6);
  align-items: end;
}
.detail__art {
  aspect-ratio: 1;
  border-radius: var(--r-lg);
  overflow: hidden;
  background: linear-gradient(140deg, var(--art-1), var(--art-3));
  box-shadow: 0 30px 60px -28px rgba(0, 0, 0, 0.75);
  display: grid;
  place-items: center;
}
.detail__art img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.detail__info {
  display: grid;
  gap: var(--space-3);
}
.detail__kicker {
  font-size: var(--text-xs);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.detail__title {
  font-size: var(--text-xl);
}

/* empty / error / skeleton */
.state {
  display: grid;
  justify-items: center;
  gap: var(--space-3);
  padding: var(--space-12) var(--space-6);
  text-align: center;
  border-radius: var(--r-xl);
  border: 1px dashed var(--glass-brd);
  background: var(--glass-bg);
}
.state svg {
  width: 34px;
  height: 34px;
  fill: var(--ink-4);
}
.state h3 {
  font-size: var(--text-lg);
}
.state p {
  color: var(--ink-3);
  font-size: var(--text-sm);
  max-width: 46ch;
}
.skeleton {
  border-radius: var(--r-md);
  background: linear-gradient(100deg, var(--glass-bg) 20%, var(--glass-bg-2) 40%, var(--glass-bg) 60%);
  background-size: 220% 100%;
  animation: shimmer 1.5s linear infinite;
}
.sk-row {
  height: 60px;
  margin-bottom: 2px;
}
.sk-card {
  aspect-ratio: 0.78;
}
.sk-rail {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(154px, 176px);
  gap: var(--space-4);
  overflow: hidden;
}

.art--logo {
  object-fit: contain !important;
  padding: 14%;
  opacity: 0.45;
  background: var(--glass-bg-2);
}

/* ikon di blok kosong/error */
.state__icon {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  border-radius: var(--r-lg);
  background: var(--glass-bg-2);
  border: 1px solid var(--glass-brd);
}
.state__icon svg {
  width: 26px;
  height: 26px;
  fill: var(--ink-4);
}

/* tombol putar melayang di atas artwork baris */
.row__art-play {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  opacity: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(2px);
  transition: opacity var(--dur-1);
  z-index: 1;
}
.row__art-play svg {
  width: 15px;
  height: 15px;
  fill: #fff;
}
.row:hover .row__art-play,
.row:focus-visible .row__art-play {
  opacity: 1;
}
.row__art::after {
  display: none;
}

/* kunci scroll saat overlay penuh terbuka */
body.is-locked {
  overflow: hidden;
}

/* teks di dalam chip pencarian terakhir */
.chip__txt {
  background: none;
  border: 0;
  color: inherit;
  font: inherit;
  cursor: pointer;
  padding: 0;
}
