/* نغم - design tokens + base. "Dusk": a soft blue-violet night, pastel lilac / peach / mint accents that rest the eyes.
   Marhey (rounded, rhythmic) for display, Alexandria for UI. */
:root {
  --bg: #15141D; --bg2: #1A1824; --s1: #211F2D; --s2: #2A2738; --s3: #363246;
  --line: rgba(226, 218, 255, .08); --line2: rgba(226, 218, 255, .15);
  --txt: #EFEBF7; --sub: #ADA7C0; --mute: #827C97;
  --sun: #B8A6FF; --sun-2: #CBBDFF; --sun-ink: #1C1636; --ember: #FF9F8A; --mint: #8EDFC4; --butter: #FFDC8A;
  /* pastel panels (illustrations sit on these) and the ink that reads on them */
  --pl: #E4DCFF; --pp: #FFDDD2; --pm: #D3F2E6; --pb: #FFF0C7; --ink: #221C38; --ink2: #5A5274;
  --tint: 184, 166, 255; /* rgb of the current song colour (player, headers) */
  --r1: 12px; --r2: 20px; --r3: 28px;
  --ui: 'Alexandria', system-ui, sans-serif; --kufi: 'Marhey', 'Alexandria', sans-serif;
  --nav-h: 64px; --mini-h: 64px; --dock-gap: 12px;
  --safe-b: env(safe-area-inset-bottom, 0px); --safe-t: env(safe-area-inset-top, 0px);
  --ease: cubic-bezier(.22, .9, .3, 1); --spring: cubic-bezier(.34, 1.4, .64, 1);
  color-scheme: dark;
}
* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
html, body { height: 100%; background: var(--bg); color: var(--txt); overscroll-behavior: none; }
body { font: 400 15px/1.65 var(--ui); -webkit-font-smoothing: antialiased; -webkit-user-select: none; user-select: none; -webkit-text-size-adjust: 100%; }
/* aurora: three soft colour clouds drifting slowly behind everything */
body::before { content: ''; position: fixed; inset: -20%; z-index: -1; pointer-events: none; opacity: .55;
  background: radial-gradient(38% 30% at 82% 8%, rgba(184, 166, 255, .22), transparent 70%),
              radial-gradient(34% 28% at 10% 38%, rgba(255, 159, 138, .13), transparent 70%),
              radial-gradient(40% 30% at 70% 88%, rgba(142, 223, 196, .12), transparent 70%);
  animation: aurora 26s ease-in-out infinite alternate; }
@keyframes aurora { to { transform: translate3d(-4%, 3%, 0) rotate(6deg) scale(1.06); } }
img { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
button { background: none; border: 0; cursor: pointer; touch-action: manipulation; }
input, textarea { -webkit-user-select: text; user-select: text; }
a { color: inherit; text-decoration: none; }
.hidden { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.ltr { direction: ltr; unicode-bidi: isolate; }
:focus-visible { outline: 2px solid var(--sun); outline-offset: 2px; border-radius: 10px; }
::selection { background: rgba(184, 166, 255, .35); }

/* type scale */
.t-display { font: 700 34px/1.2 var(--kufi); }
.t-h1 { font: 700 26px/1.3 var(--kufi); }
.t-h2 { font: 600 19px/1.4 var(--kufi); }
.t-kicker { font: 500 12.5px/1.4 var(--ui); color: var(--sun); letter-spacing: .01em; }
.t-sub { color: var(--sub); font-size: 13px; }
.t-cap { color: var(--mute); font-size: 12px; }
.clamp1 { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
/* names come in any script: each one runs in its own direction (an Arabic song inside a French list, an English one inside
   the Arabic app) yet still lines up with the page. Lyrics carry dir="auto" for the same reason. */
.clamp1, .clamp2, .t-sub, .mix-name, #mini .mi-t b, #mini .mi-t span, .artist-hero h1, .h-t, .sh-title, .onb .pick b { unicode-bidi: plaintext; }
[dir=ltr] :is(.clamp1, .clamp2, .t-sub, .mix-name, #mini .mi-t b, #mini .mi-t span, .artist-hero h1, .h-t, .sh-title) { text-align: left; }
[dir=rtl] :is(.clamp1, .clamp2, .t-sub, .mix-name, #mini .mi-t b, #mini .mi-t span, .artist-hero h1, .h-t, .sh-title) { text-align: right; }
#player .p-ctx b, .onb .pick b { text-align: center; }
.clamp2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

svg.i { width: 24px; height: 24px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
svg.i.fill { fill: currentColor; stroke: none; }
.sm svg.i, svg.i.sm { width: 20px; height: 20px; }
[dir=rtl] svg.i.flip { transform: scaleX(-1); }
/* a "go in" chevron points toward the end of the line: right in English, left in Arabic */
[dir=ltr] svg.i.fwd { transform: scaleX(-1); }

@keyframes shimmer { to { background-position: -200% 0; } }
.skel { background: linear-gradient(90deg, var(--s1) 0%, var(--s2) 50%, var(--s1) 100%) 0 0 / 200% 100%; animation: shimmer 1.4s linear infinite; border-radius: var(--r1); }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes float { 50% { transform: translateY(-8px); } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; } }
