/* K.Music — shared tokens.
   Layout concept: a late-night listening room. Deep ink ground, each artist lights the room in their own accent colour,
   big poster-like names, and a floating player dock that follows you from page to page. */
:root {
  --bg: #0F0D12;
  --bg-raise: #16131B;
  --surface: #1D1923;
  --surface-2: #26212E;
  --line: #322B3C;
  --ink: #F4EFE6;
  --muted: #A69EB2;
  --faint: #6F677B;
  --brand: #E6A43B;          /* saffron brass, the K.Music default */
  --accent: var(--brand);    /* replaced per artist */
  --accent-ink: #14100A;
  --good: #57C78A; --warn: #E6A43B; --bad: #F06A5E;

  --f-display: "Unbounded", "Reem Kufi", "Readex Pro", system-ui, sans-serif;
  --f-body: "Readex Pro", "Segoe UI", Tahoma, system-ui, sans-serif;
  --f-lyric: "Readex Pro", "Cairo", Tahoma, sans-serif;

  --r-s: 6px; --r-m: 12px; --r-l: 20px;
  --dock-h: 76px;
  --wrap: 1240px;
  color-scheme: dark;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; background: var(--bg); }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--f-body); font-size: 15px; line-height: 1.55; -webkit-font-smoothing: antialiased; }
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }
h1, h2, h3, h4 { margin: 0; text-wrap: balance; font-weight: 600; }
p { margin: 0; }
.ic { flex: none; display: block; }
[dir="rtl"] .flip .ic { transform: scaleX(-1); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
::selection { background: color-mix(in srgb, var(--accent) 45%, transparent); }
[hidden] { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.num { font-variant-numeric: tabular-nums; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding-left: max(20px, env(safe-area-inset-left, 0px)); padding-right: max(20px, env(safe-area-inset-right, 0px)); }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 0; border-radius: 999px; padding: 11px 20px; font-weight: 600; font-size: 14px; cursor: pointer; background: var(--surface-2); color: var(--ink); white-space: nowrap; transition: transform .12s, background .2s, opacity .2s; }
.btn:hover { background: color-mix(in srgb, var(--surface-2) 70%, var(--ink) 12%); }
.btn:active { transform: scale(.97); }
.btn.primary { background: var(--accent); color: var(--accent-ink); }
.btn.primary:hover { background: color-mix(in srgb, var(--accent) 88%, white 12%); }
.btn.ghost { background: transparent; box-shadow: inset 0 0 0 1px var(--line); }
.btn.ghost:hover { box-shadow: inset 0 0 0 1px var(--muted); background: transparent; }
.btn.small { padding: 7px 14px; font-size: 13px; }
.btn.danger { background: color-mix(in srgb, var(--bad) 18%, transparent); color: var(--bad); }
.btn:disabled { opacity: .45; cursor: default; transform: none; }
.icon-btn { display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; border: 0; background: transparent; color: var(--muted); cursor: pointer; transition: color .15s, background .15s, transform .12s; }
.icon-btn:hover { color: var(--ink); background: color-mix(in srgb, var(--ink) 8%, transparent); }
.icon-btn:active { transform: scale(.94); }
.icon-btn.on { color: var(--accent); }
.play-btn { display: inline-grid; place-items: center; width: 56px; height: 56px; border-radius: 50%; border: 0; background: var(--accent); color: var(--accent-ink); cursor: pointer; transition: transform .15s, box-shadow .2s; box-shadow: 0 8px 28px -8px color-mix(in srgb, var(--accent) 70%, transparent); }
.play-btn:hover { transform: scale(1.05); }
.play-btn:active { transform: scale(.96); }
.play-btn.sm { width: 44px; height: 44px; }

.pill { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; background: var(--surface-2); color: var(--muted); white-space: nowrap; }
.pill.accent { background: color-mix(in srgb, var(--accent) 18%, transparent); color: var(--accent); }
.pill.good { background: color-mix(in srgb, var(--good) 16%, transparent); color: var(--good); }
.pill.warn { background: color-mix(in srgb, var(--warn) 16%, transparent); color: var(--warn); }
.eyebrow { font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
[lang="ar"] .eyebrow { letter-spacing: 0; text-transform: none; font-size: 13px; }

#toast { position: fixed; left: 50%; bottom: calc(var(--dock-h) + 24px + env(safe-area-inset-bottom, 0px)); transform: translate(-50%, 20px); opacity: 0; pointer-events: none; background: var(--ink); color: var(--bg); padding: 10px 18px; border-radius: 999px; font-weight: 600; font-size: 14px; z-index: 100; transition: opacity .25s, transform .25s; max-width: calc(100vw - 32px); text-align: center; }
#toast.on { opacity: 1; transform: translate(-50%, 0); }

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; } }
