/* ==========================================================================
   Mfariji — design system
   Layered surfaces on a deep plum ground, one raspberry accent, fluid type.
   Every colour, radius and shadow used elsewhere is declared here once.
   ========================================================================== */

:root {
  /* Brand */
  --brand: #e0257f;
  --brand-strong: #b31a63;
  --brand-soft: #f4a9cc;
  --teal: #12a594;
  --amber: #f0821e;
  --indigo: #5b78ff;

  /* Surfaces — the design's plum family. --bg is its --plum, --bg-2 its
     --wine, and --surface-2 its --card. */
  --bg: #210a1c;
  --bg-2: #180614;
  --surface: #2a0f24;
  --surface-2: #33122a;
  --surface-3: #3a1330;
  --overlay: rgba(24, 6, 20, 0.72);

  /* Ink */
  --text: #fbeaf3;
  --text-muted: #c79cb6;
  --text-faint: #91708a;

  /* Lines & focus */
  --line: rgba(255, 255, 255, 0.08);
  --line-strong: rgba(255, 255, 255, 0.16);
  --focus: #ffd9ec;

  /* Radii */
  --r-xs: 8px;
  --r-sm: 12px;
  --r-cover: 18px;
  --r-md: 16px;
  --r-lg: 22px;
  --r-full: 999px;

  /* Shadow */
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 12px 32px -8px rgba(0, 0, 0, 0.55);
  --shadow-lg: 0 28px 70px -20px rgba(0, 0, 0, 0.75);
  --glow: 0 0 0 1px rgba(224, 37, 127, 0.35), 0 12px 40px -12px rgba(224, 37, 127, 0.5);

  /* Motion */
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --dur: 0.22s;

  /* Metrics */
  --sidebar-w: 268px;
  --sidebar-w-collapsed: 76px;
  --topbar-h: 68px;
  --player-h: 92px;
  /* Anchors must clear the sticky topbar, or a jump lands under it. */
  --scroll-offset: calc(var(--topbar-h) + 22px);

  color-scheme: dark;
}

/* --------------------------------------------------------------- reset -- */

*,
*::before,
*::after { box-sizing: border-box; }

* { margin: 0; }

/* Author `display` rules outrank the user-agent [hidden] rule, so state this
   once and loudly — every JS `el.hidden = true` in the app depends on it. */
[hidden] { display: none !important; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  min-height: 100dvh;
  font-family: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 15px;
  line-height: 1.55;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img, svg, video { display: block; max-width: 100%; }

input, button, textarea, select { font: inherit; color: inherit; }

button { cursor: pointer; border: 0; background: none; }

a { color: inherit; text-decoration: none; }

h1, h2, h3, h4 {
  font-family: "Plus Jakarta Sans", "Inter", system-ui, sans-serif;
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

p { text-wrap: pretty; }

::selection { background: var(--brand); color: #fff; }

:where(a, button, input, select, textarea, [tabindex]):focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
  border-radius: var(--r-xs);
}

/* Scrollbars */
* {
  scrollbar-width: thin;
  scrollbar-color: var(--surface-3) transparent;
}
*::-webkit-scrollbar { width: 10px; height: 10px; }
*::-webkit-scrollbar-track { background: transparent; }
*::-webkit-scrollbar-thumb {
  background: var(--surface-3);
  border: 3px solid transparent;
  border-radius: var(--r-full);
  background-clip: content-box;
}
*::-webkit-scrollbar-thumb:hover { background-color: var(--brand-strong); background-clip: content-box; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ------------------------------------------------------------ utilities -- */

.icon { flex: none; }
.icon--fill { fill: currentColor; stroke: none; }

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.skip-link {
  position: fixed;
  inset-inline-start: 12px;
  inset-block-start: -100px;
  z-index: 200;
  padding: 10px 18px;
  border-radius: var(--r-sm);
  background: var(--brand);
  color: #fff;
  font-weight: 600;
  transition: inset-block-start var(--dur) var(--ease);
}
.skip-link:focus { inset-block-start: 12px; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: var(--brand-soft);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

/* --------------------------------------------------------------- shell -- */

.shell {
  display: grid;
  grid-template-columns: var(--sidebar-w) minmax(0, 1fr);
  min-height: 100dvh;
  transition: grid-template-columns var(--dur) var(--ease);
}

.shell[data-sidebar="collapsed"] { grid-template-columns: var(--sidebar-w-collapsed) minmax(0, 1fr); }

.main {
  min-width: 0;
  display: flex;
  flex-direction: column;
  background:
    radial-gradient(900px 520px at 88% -8%, rgba(224, 37, 127, 0.16), transparent 62%),
    radial-gradient(700px 420px at 4% 4%, rgba(91, 120, 255, 0.1), transparent 60%),
    var(--bg);
}

.page {
  flex: 1;
  width: min(1240px, 100%);
  margin-inline: auto;
  padding: 28px clamp(16px, 3vw, 40px) calc(var(--player-h) + 96px);
  display: flex;
  flex-direction: column;
  gap: clamp(28px, 4vw, 48px);
}

.page--flat { padding-bottom: 96px; }

/* Anything the sidebar or a hash link can jump to. */
.page [id] { scroll-margin-top: var(--scroll-offset); }

/* ------------------------------------------------------------- sidebar -- */

.sidebar {
  position: sticky;
  top: 0;
  align-self: start;
  height: 100dvh;
  display: flex;
  flex-direction: column;
  border-inline-end: 1px solid var(--line);
  background: linear-gradient(180deg, var(--bg-2), #110410);
  overflow: hidden;
  z-index: 60;
}

.sidebar__brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 18px 20px 14px;
  min-height: var(--topbar-h);
}

.sidebar__mark { width: 128px; flex: none; transition: width var(--dur) var(--ease); }
.sidebar__mark :is(svg, img) { width: 100%; height: auto; max-height: 46px; object-fit: contain; object-position: left center; }

.sidebar__toggle {
  margin-inline-start: auto;
  display: grid;
  place-items: center;
  width: 34px; height: 34px;
  border-radius: var(--r-sm);
  border: 1px solid var(--line);
  color: var(--text-muted);
  transition: background var(--dur) var(--ease), color var(--dur) var(--ease);
}
.sidebar__toggle:hover { background: var(--surface-2); color: var(--text); }

.sidebar__scroll {
  flex: 1;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 4px 12px 16px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.nav-group { display: flex; flex-direction: column; gap: 2px; }

.nav-group__label {
  padding: 10px 12px 6px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #8a5f78;
  white-space: nowrap;
}

.nav-link {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 9px 12px;
  border-radius: var(--r-sm);
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
  width: 100%;
  text-align: start;
  transition: background var(--dur) var(--ease), color var(--dur) var(--ease);
}

.nav-link:hover { background: var(--surface-2); color: var(--text); }

.nav-link[aria-current="true"],
.nav-link.is-active {
  background: linear-gradient(90deg, rgba(179, 26, 99, 0.35), rgba(179, 26, 99, 0.05));
  color: #fff;
  font-weight: 600;
  box-shadow: inset 3px 0 0 var(--brand);
}

.nav-link__text { overflow: hidden; text-overflow: ellipsis; }

.nav-link__count {
  margin-inline-start: auto;
  padding: 1px 8px;
  border-radius: var(--r-full);
  background: var(--surface-3);
  color: var(--text-muted);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
}

.sidebar__note {
  margin: 4px 12px 16px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: linear-gradient(160deg, rgba(179, 26, 99, 0.22), rgba(18, 165, 148, 0.12));
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--brand-soft);
}
.sidebar__note b { display: block; color: var(--text); margin-bottom: 4px; }

/* Collapsed rail */
.shell[data-sidebar="collapsed"] .sidebar__mark { width: 38px; overflow: hidden; }
.shell[data-sidebar="collapsed"] .sidebar__mark img { object-position: center; }
.shell[data-sidebar="collapsed"] .nav-link__text,
.shell[data-sidebar="collapsed"] .nav-link__count,
.shell[data-sidebar="collapsed"] .nav-group__label,
.shell[data-sidebar="collapsed"] .sidebar__note { display: none; }
.shell[data-sidebar="collapsed"] .nav-link { justify-content: center; padding-inline: 0; }
.shell[data-sidebar="collapsed"] .nav-group { gap: 4px; }
.shell[data-sidebar="collapsed"] .nav-group + .nav-group { margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line); }

/* -------------------------------------------------------------- topbar -- */

.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: var(--topbar-h);
  padding: 12px clamp(16px, 3vw, 40px);
  border-block-end: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(33, 10, 28, 0.92), rgba(33, 10, 28, 0.55));
  backdrop-filter: blur(14px);
}

.topbar__menu {
  display: none;
  place-items: center;
  width: 40px; height: 40px;
  border-radius: var(--r-sm);
  border: 1px solid var(--line);
  color: var(--text);
}

.search {
  flex: 1;
  max-width: 460px;
  display: flex;
  align-items: center;
  gap: 10px;
  height: 42px;
  padding-inline: 14px;
  border: 1px solid var(--line);
  border-radius: var(--r-full);
  background: rgba(255, 255, 255, 0.07);
  color: var(--text-faint);
  transition: border-color var(--dur) var(--ease), background var(--dur) var(--ease);
}
.search:focus-within {
  border-color: var(--brand);
  background: var(--surface-2);
  box-shadow: 0 0 0 4px rgba(224, 37, 127, 0.14);
}
.search input {
  flex: 1;
  min-width: 0;
  border: 0;
  background: none;
  color: var(--text);
  outline: none;
}
.search input::placeholder { color: #a87894; }

.search__kbd {
  flex: none;
  padding: 2px 7px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface-2);
  font-size: 11px;
  font-family: ui-monospace, "SFMono-Regular", monospace;
  color: var(--text-faint);
}

.topbar__spacer { flex: 1; }

.topbar__tagline {
  display: none;
  font-size: 12.5px;
  font-style: italic;
  color: var(--text-faint);
}
@media (min-width: 1180px) { .topbar__tagline { display: block; } }

/* --------------------------------------------------------------- chips -- */

.chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 38px;
  padding-inline: 14px;
  border: 1px solid var(--line);
  border-radius: var(--r-full);
  background: var(--surface);
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  transition: background var(--dur) var(--ease), color var(--dur) var(--ease), border-color var(--dur) var(--ease);
}
.chip:hover { background: var(--surface-2); color: var(--text); border-color: var(--line-strong); }
.chip--accent { border-color: rgba(224, 37, 127, 0.4); color: var(--brand-soft); }
.chip--accent:hover { background: rgba(224, 37, 127, 0.16); color: #fff; }

.avatar {
  display: grid;
  place-items: center;
  width: 38px; height: 38px;
  border-radius: var(--r-full);
  background: linear-gradient(150deg, var(--brand), var(--brand-strong));
  color: #fff;
  font-weight: 700;
  font-size: 14px;
  flex: none;
}

/* ------------------------------------------------------------- buttons -- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 44px;
  padding-inline: 20px;
  border-radius: var(--r-full);
  font-weight: 600;
  font-size: 14.5px;
  white-space: nowrap;
  transition: transform var(--dur) var(--ease), background var(--dur) var(--ease),
              box-shadow var(--dur) var(--ease), border-color var(--dur) var(--ease), opacity var(--dur) var(--ease);
}
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }

.btn--primary {
  background: var(--brand);
  color: #fff;
  box-shadow: 0 10px 30px -8px rgba(224, 37, 127, 0.7);
}
.btn--primary:hover:not(:disabled) {
  background: #fff;
  color: var(--brand-strong);
  transform: translateY(-2px);
}

.btn--ghost {
  border: 1px solid rgba(255, 255, 255, 0.28);
  background: none;
  color: #fff;
}
.btn--ghost:hover:not(:disabled) { background: rgba(255, 255, 255, 0.1); }

.btn--danger {
  background: linear-gradient(140deg, #e03a3a, #a01f1f);
  color: #fff;
}
.btn--danger:hover:not(:disabled) { filter: brightness(1.08); }

.btn--sm { min-height: 36px; padding-inline: 14px; font-size: 13px; }
.btn--block { width: 100%; }

.icon-btn {
  display: grid;
  place-items: center;
  width: 38px; height: 38px;
  border-radius: var(--r-full);
  color: var(--text-muted);
  transition: background var(--dur) var(--ease), color var(--dur) var(--ease);
}
.icon-btn:hover { background: var(--surface-2); color: var(--text); }
.icon-btn.is-active { color: var(--brand); background: rgba(224, 37, 127, 0.14); }
.icon-btn:disabled { opacity: 0.4; cursor: not-allowed; }

/* -------------------------------------------------------------- panels -- */

.panel {
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: linear-gradient(180deg, var(--surface), var(--bg-2));
  box-shadow: var(--shadow-md);
}

.panel__head {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  padding: 20px 22px;
  border-block-end: 1px solid var(--line);
}
.panel__head h2, .panel__head h3 { font-size: 17px; }
.panel__head p { font-size: 13px; color: var(--text-muted); width: 100%; }

.panel__body { padding: 22px; }

/* --------------------------------------------------------------- forms -- */

.field { display: flex; flex-direction: column; gap: 7px; }

.field > label,
.field__label {
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--text-muted);
}

.field input[type="text"],
.field input[type="email"],
.field input[type="password"],
.field input[type="number"],
.field input[type="file"],
.field select,
.field textarea {
  width: 100%;
  padding: 11px 14px;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  background: var(--bg-2);
  color: var(--text);
  transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}

.field textarea { min-height: 92px; resize: vertical; }

.field :is(input, select, textarea):focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 4px rgba(224, 37, 127, 0.14);
}

.field input[type="file"] { padding: 9px 12px; color: var(--text-muted); }
.field input[type="file"]::file-selector-button {
  margin-inline-end: 12px;
  padding: 7px 14px;
  border: 0;
  border-radius: var(--r-full);
  background: var(--surface-3);
  color: var(--text);
  font-weight: 600;
  cursor: pointer;
}
.field input[type="file"]::file-selector-button:hover { background: var(--brand-strong); }

.field__hint { font-size: 12px; color: var(--text-faint); }
.field__error { font-size: 12.5px; color: #ff9c9c; }

.form-grid { display: grid; gap: 16px; }
@media (min-width: 720px) { .form-grid--2 { grid-template-columns: 1fr 1fr; } }
.form-grid .field--full { grid-column: 1 / -1; }

/* --------------------------------------------------------------- alert -- */

.alert {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 16px;
  border-radius: var(--r-sm);
  border: 1px solid var(--line);
  font-size: 13.5px;
}
.alert--ok { border-color: rgba(18, 165, 148, 0.5); background: rgba(18, 165, 148, 0.12); color: #a9ecdf; }
.alert--error { border-color: rgba(255, 107, 107, 0.5); background: rgba(255, 107, 107, 0.1); color: #ffc4c4; }
.alert--info { background: var(--surface-2); color: var(--text-muted); }

/* ------------------------------------------------------- section + rail -- */

.section { display: flex; flex-direction: column; gap: 14px; }

.section__head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
}

.section__title { font-size: clamp(17px, 2vw, 21px); }

.section__sub {
  display: block;
  margin-top: 3px;
  font-family: "Inter", sans-serif;
  font-size: 13px;
  font-weight: 400;
  letter-spacing: 0;
  color: var(--text-faint);
}

.section__count {
  font-size: 12px;
  color: var(--text-faint);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.rail-wrap { position: relative; }

.rail {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: clamp(150px, 20vw, 186px);
  gap: 16px;
  overflow-x: auto;
  scroll-snap-type: x proximity;
  scroll-padding-inline: 4px;
  padding: 4px 4px 12px;
}
.rail > * { scroll-snap-align: start; }
.rail::-webkit-scrollbar { height: 6px; }

.rail:has(.rail__empty) { grid-auto-flow: row; grid-auto-columns: auto; }

.rail-nav {
  position: absolute;
  top: 42%;
  display: none;
  place-items: center;
  width: 40px; height: 40px;
  border-radius: var(--r-full);
  border: 1px solid var(--line-strong);
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  backdrop-filter: blur(10px);
  color: var(--text);
  box-shadow: var(--shadow-md);
  transform: translateY(-50%);
  z-index: 2;
}
.rail-nav--prev { inset-inline-start: -14px; }
.rail-nav--next { inset-inline-end: -14px; }
.rail-nav:hover { background: var(--brand-strong); }
@media (hover: hover) and (min-width: 900px) {
  .rail-wrap:hover .rail-nav:not([disabled]) { display: grid; }
}

.rail__empty {
  padding: 26px;
  border: 1px dashed var(--line-strong);
  border-radius: var(--r-md);
  color: var(--text-faint);
  font-size: 13.5px;
  text-align: center;
}

/* --------------------------------------------------------------- cards -- */

.card {
  display: block;
  padding: 10px;
  border: 1px solid transparent;
  border-radius: var(--r-md);
  background: transparent;
  text-align: start;
  transition: background var(--dur) var(--ease), border-color var(--dur) var(--ease), transform var(--dur) var(--ease);
}
.card:hover, .card:focus-visible {
  background: var(--surface);
  border-color: var(--line);
  transform: translateY(-3px);
}

.card__cover {
  display: block;
  position: relative;
  width: 100%;
  aspect-ratio: 1;
  border-radius: var(--r-cover);
  overflow: hidden;
  box-shadow: 0 14px 34px -14px rgba(0, 0, 0, 0.7);
  isolation: isolate;
}

/* Without aspect-ratio the cover collapses to zero height and every scene
   inside it disappears - which is what happened on older mobile browsers. */
@supports not (aspect-ratio: 1 / 1) {
  .card__cover::before { content: ""; display: block; padding-top: 100%; }
}

/* The soft highlight from the design, over the gradient but under the artwork. */
.card__glow {
  position: absolute;
  inset: 0;
  background: radial-gradient(62% 58% at 50% 20%, rgba(255, 255, 255, 0.3), transparent 72%);
}

/* Full-bleed, so it never depends on a percentage height resolving. */
.card__scene { position: absolute; inset: 0; width: 100%; height: 100%; }

.card__art {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
}
.card__art.shape-circle {
  inset: 14%;
  width: 72%; height: 72%;
  border-radius: var(--r-full);
  border: 3px solid rgba(255, 255, 255, 0.6);
}

.card__badge {
  position: absolute;
  inset-block-start: 10px;
  inset-inline-start: 10px;
  z-index: 2;
  max-width: calc(100% - 20px);
  padding: 4px 9px;
  border-radius: var(--r-full);
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(6px);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.05em;
  line-height: 1.25;
  text-transform: uppercase;
  color: #fff;
  /* The design lets long labels wrap rather than truncating them; capped at
     two lines so a label can never bury the artwork. */
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* The "mfariji" watermark the design puts on every cover. */
.card__mark {
  position: absolute;
  inset-block-end: 9px;
  inset-inline-start: 12px;
  z-index: 2;
  font-family: "Plus Jakarta Sans", sans-serif;
  font-weight: 800;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.55);
  pointer-events: none;
}
.card__mark i { font-style: normal; color: #7B61FF; }

/* Always visible, as in the design - a hover-only control is unreachable on
   touch devices, where there is no hover state at all. */
.card__play {
  position: absolute;
  inset-block-end: 12px;
  inset-inline-end: 12px;
  z-index: 3;
  display: grid;
  place-items: center;
  width: 46px; height: 46px;
  border-radius: var(--r-full);
  background: var(--brand);
  color: #fff;
  box-shadow: 0 8px 20px -4px rgba(0, 0, 0, 0.6);
  transition: transform var(--dur) var(--ease), background var(--dur) var(--ease);
}
.card:hover .card__play { transform: scale(1.06); }
.card:hover .card__play:hover { background: #fff; color: var(--brand-strong); }

.card.is-playing { background: var(--surface); border-color: rgba(224, 37, 127, 0.35); }

.card__title {
  display: block;
  margin: 12px 2px 3px;
  padding: 0;
  font-weight: 600;
  font-size: 14.5px;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card__meta {
  display: block;
  margin: 0 2px;
  font-size: 12.5px;
  line-height: 1.4;
  color: var(--text-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ------------------------------------------------------------ equaliser */

.eq { display: inline-flex; align-items: flex-end; gap: 2px; height: 14px; }
.eq i {
  width: 3px;
  border-radius: 2px;
  background: var(--brand);
  animation: eq 0.9s ease-in-out infinite;
}
.eq i:nth-child(1) { height: 40%; animation-delay: -0.1s; }
.eq i:nth-child(2) { height: 100%; animation-delay: -0.4s; }
.eq i:nth-child(3) { height: 60%; animation-delay: -0.7s; }
.eq i:nth-child(4) { height: 85%; animation-delay: -0.25s; }
@keyframes eq { 0%, 100% { transform: scaleY(0.35); } 50% { transform: scaleY(1); } }

/* -------------------------------------------------------------- player -- */

.player {
  position: fixed;
  inset-inline: 0;
  inset-block-end: 0;
  z-index: 70;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 2fr) minmax(0, 1fr);
  align-items: center;
  gap: 16px;
  min-height: var(--player-h);
  padding: 12px clamp(12px, 2.4vw, 26px);
  border-block-start: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(24, 6, 20, 0.85), #150512);
  backdrop-filter: blur(18px);
  box-shadow: var(--shadow-lg);
}

.player__now { display: flex; align-items: center; gap: 12px; min-width: 0; }

.player__art {
  position: relative;
  flex: none;
  width: 52px; height: 52px;
  border-radius: 12px;
  overflow: hidden;
  background: linear-gradient(135deg, #b31a63, #f0821e);
}
.player__art svg { position: absolute; inset: 6%; width: 88%; height: 88%; }
.player__art img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.player__art img.shape-circle { inset: 14%; width: 72%; height: 72%; border-radius: var(--r-full); }

.player__meta { min-width: 0; }
.player__title {
  font-weight: 600;
  font-size: 14px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.player__sub {
  font-size: 12.5px;
  color: var(--text-faint);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.player__controls { display: flex; flex-direction: column; align-items: center; gap: 6px; min-width: 0; }
.player__buttons { display: flex; align-items: center; gap: 6px; }

.player__play {
  display: grid;
  place-items: center;
  width: 44px; height: 44px;
  border-radius: var(--r-full);
  background: var(--text);
  color: var(--bg);
  transition: transform var(--dur) var(--ease), background var(--dur) var(--ease);
}
.player__play:hover { transform: scale(1.06); background: #fff; }

.player__progress {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  max-width: 560px;
}

.player__time {
  font-size: 11.5px;
  font-variant-numeric: tabular-nums;
  color: var(--text-faint);
  min-width: 38px;
  text-align: center;
}

.slider {
  flex: 1;
  min-width: 0;
  height: 18px;
  appearance: none;
  -webkit-appearance: none;
  background: none;
  cursor: pointer;
}
.slider::-webkit-slider-runnable-track {
  height: 5px;
  border-radius: var(--r-full);
  background: linear-gradient(90deg, var(--brand) var(--fill, 0%), var(--surface-3) var(--fill, 0%));
}
.slider::-moz-range-track { height: 5px; border-radius: var(--r-full); background: var(--surface-3); }
.slider::-moz-range-progress { height: 5px; border-radius: var(--r-full); background: var(--brand); }
.slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  margin-top: -4.5px;
  width: 14px; height: 14px;
  border-radius: var(--r-full);
  background: #fff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
  opacity: 0;
  transition: opacity var(--dur) var(--ease);
}
.slider::-moz-range-thumb {
  width: 14px; height: 14px;
  border: 0;
  border-radius: var(--r-full);
  background: #fff;
  opacity: 0;
}
.slider:hover::-webkit-slider-thumb, .slider:focus-visible::-webkit-slider-thumb { opacity: 1; }
.slider:hover::-moz-range-thumb, .slider:focus-visible::-moz-range-thumb { opacity: 1; }

.player__extras { display: flex; align-items: center; justify-content: flex-end; gap: 4px; }

.volume { display: flex; align-items: center; gap: 6px; }
.volume .slider { width: 90px; }

.player.is-paused .eq { opacity: 0.25; }
.player.is-paused .eq i { animation-play-state: paused; }

/* --------------------------------------------------------------- toast -- */

.toast {
  position: fixed;
  inset-inline: 0;
  inset-block-end: calc(var(--player-h) + 18px);
  z-index: 90;
  display: flex;
  justify-content: center;
  pointer-events: none;
}
.toast__inner {
  padding: 10px 18px;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-full);
  background: var(--surface-2);
  color: var(--text);
  font-size: 13px;
  box-shadow: var(--shadow-lg);
  opacity: 0;
  transform: translateY(10px);
  transition: opacity var(--dur) var(--ease), transform var(--dur) var(--ease);
}
.toast.is-visible .toast__inner { opacity: 1; transform: none; }

/* -------------------------------------------------------------- footer -- */

.footer {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding-top: 32px;
  border-top: 1px solid var(--line);
  color: var(--text-faint);
  font-size: 13px;
}
.footer__mark { width: 140px; }
.footer__mark :is(svg, img) { width: 100%; height: auto; max-height: 60px; object-fit: contain; object-position: left center; }
.footer p { max-width: 72ch; }
.footer__care {
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--surface);
  font-size: 12.5px;
}

/* ------------------------------------------------------- mobile layout -- */

.sidebar__backdrop {
  position: fixed;
  inset: 0;
  z-index: 55;
  background: var(--overlay);
  backdrop-filter: blur(3px);
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--dur) var(--ease);
}

@media (max-width: 1024px) {
  .shell, .shell[data-sidebar="collapsed"] { grid-template-columns: minmax(0, 1fr); }

  .sidebar {
    position: fixed;
    inset-block: 0;
    inset-inline-start: 0;
    width: min(300px, 84vw);
    transform: translateX(-102%);
    transition: transform var(--dur) var(--ease);
    box-shadow: var(--shadow-lg);
  }
  .shell[data-mobile-nav="open"] .sidebar { transform: none; }
  .shell[data-mobile-nav="open"] .sidebar__backdrop { opacity: 1; pointer-events: auto; }

  /* the collapse rail is meaningless once the sidebar is a drawer */
  .shell[data-sidebar="collapsed"] .nav-link__text,
  .shell[data-sidebar="collapsed"] .nav-group__label,
  .shell[data-sidebar="collapsed"] .nav-link__count,
  .shell[data-sidebar="collapsed"] .sidebar__note { display: revert; }
  .shell[data-sidebar="collapsed"] .nav-link { justify-content: flex-start; padding-inline: 12px; }
  .shell[data-sidebar="collapsed"] .sidebar__mark { width: 128px; }
  .shell[data-sidebar="collapsed"] .nav-group + .nav-group { margin-top: 0; padding-top: 0; border-top: 0; }

  .sidebar__toggle { display: none; }
  .topbar__menu { display: grid; }
}

@media (max-width: 860px) {
  .player {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
    padding-block: 10px;
  }
  .player__controls { grid-column: 1 / -1; order: 3; }
  .player__extras { order: 2; }
  .player__extras .volume,
  .player__extras .player__extra-hide { display: none; }
  .search__kbd { display: none; }
}

/* -------------------------------------------------------- language toggle -- */

.lang-toggle {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 3px;
  flex: none;
  border: 1px solid var(--line);
  border-radius: var(--r-full);
  background: rgba(255, 255, 255, 0.07);
}

.lang-toggle__option {
  display: grid;
  place-items: center;
  min-width: 38px;
  height: 30px;
  padding-inline: 10px;
  border-radius: var(--r-full);
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  transition: background var(--dur) var(--ease), color var(--dur) var(--ease);
}
.lang-toggle__option:hover { color: #fff; }
.lang-toggle__option[aria-current="true"] {
  background: var(--brand);
  color: #fff;
}

@media (max-width: 600px) {
  .lang-toggle__option { min-width: 32px; padding-inline: 7px; }
}
