/* shine — كولاج: ورق، قص، شريط لاصق، وحبرين ريزو
   الألوان كلها تجي من themes.js؛ هذي قيم احتياطية (ليل) */
:root {
  --paper: #141414;
  --scrap: #262626;
  --scrap-2: #333333;
  --text: #f3f1ec;
  --muted: #a29e96;
  --ink-1: #ffe800;
  --ink-2: #3d7bff;
  --on-ink-1: #141414;
  --on-ink-2: #ffffff;
  --scrap-ink: #141414;
  --scrap-muted: #5d5a55;
  --danger: #ff4b3e;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
  --display: "Lalezar", "Readex Pro", system-ui, sans-serif;
  --body: "Readex Pro", -apple-system, "SF Arabic", "Geeza Pro", Tahoma, sans-serif;
  --ease: cubic-bezier(.2, .8, .2, 1);
  --torn-a: url(torn-a.svg);
  --torn-b: url(torn-b.svg);
  --tape: rgba(222, 203, 150, .78);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; background: var(--paper); color: var(--text); }
body {
  font: 400 16px/1.5 var(--body);
  min-height: 100dvh;
  -webkit-font-smoothing: antialiased;
  overscroll-behavior-y: none;
}
/* حبيبات الورق فوك كلشي */
body::after {
  content: ""; position: fixed; inset: 0; z-index: 60; pointer-events: none; opacity: .16;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 .6 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
.dark body::after {
  opacity: .1;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 .6 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
input { font: inherit; color: inherit; }
svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
svg .fill { fill: currentColor; }
svg.flip { transform: scaleX(-1); }
[hidden] { display: none !important; }
:focus-visible { outline: 2.5px solid var(--text); outline-offset: 3px; }
.muted { color: var(--muted); }
.error { color: var(--danger); font-size: 14px; margin: 0; font-weight: 600; }

/* ---------- الاسم: حروف مقصوصة من أوراق مختلفة ---------- */
.ransom {
  direction: ltr; display: inline-flex; align-items: center; gap: 1px; margin: 0; position: relative;
  font: 400 30px/1 var(--display); letter-spacing: 0;
}
.ransom b { font-weight: 400; display: inline-block; padding: .14em .2em .02em; }
.ransom b:nth-of-type(1) { background: var(--ink-1); color: var(--on-ink-1); transform: rotate(-6deg); clip-path: polygon(4% 2%, 100% 0, 95% 100%, 0 93%); }
.ransom b:nth-of-type(2) { background: var(--text); color: var(--paper); transform: rotate(3deg) translateY(2px); clip-path: polygon(0 5%, 97% 0, 100% 96%, 6% 100%); }
.ransom b:nth-of-type(3) { background: var(--scrap); color: var(--scrap-ink); font-family: var(--body); font-weight: 700; font-size: .8em; transform: rotate(-2deg) translateY(-3px); padding: .2em .26em .12em; }
.ransom b:nth-of-type(4) { background: var(--ink-2); color: var(--on-ink-2); transform: rotate(7deg); clip-path: polygon(3% 0, 100% 7%, 94% 100%, 0 96%); }
.ransom b:nth-of-type(5) { background: var(--scrap-2); color: var(--scrap-ink); transform: rotate(-4deg) translateY(1px); clip-path: polygon(0 0, 100% 4%, 98% 100%, 5% 95%); }
.ransom.big { font-size: 64px; gap: 3px; }
.sun-sticker {
  position: absolute; z-index: -1; width: 1.5em; aspect-ratio: 1; left: -.55em; top: -.5em; border-radius: 50%;
  background: radial-gradient(circle, var(--ink-1) 1.3px, transparent 1.7px) 0 0 / 5px 5px;
}
.ransom.big .sun-sticker { background-size: 8px 8px; background-image: radial-gradient(circle, var(--ink-1) 2.2px, transparent 2.7px); }

/* ---------- الدخول ---------- */
.screen { min-height: 100dvh; display: grid; place-items: center; padding: 24px; }
.login-card { width: min(340px, 100%); text-align: center; }
.login-card .ransom { margin: 30px 0 18px; }
.tagline { margin: 0 0 30px; transform: rotate(-1.5deg); }
.tagline span, .empty-title span, .strip-title span {
  background: var(--scrap); color: var(--scrap-ink); padding: .05em .35em;
  -webkit-box-decoration-break: clone; box-decoration-break: clone;
}
.tagline span { font: 400 20px/1.7 var(--display); }
#login-form { display: grid; gap: 12px; }
#login-form input {
  background: var(--scrap); color: var(--scrap-ink); border: 0; padding: 15px 16px; font-size: 16px; text-align: left; border-radius: 0;
  -webkit-mask: var(--torn-a) center / 100% 100% no-repeat; mask: var(--torn-a) center / 100% 100% no-repeat;
}
#login-form input:nth-child(2) { -webkit-mask-image: var(--torn-b); mask-image: var(--torn-b); }
#login-form input:focus { outline: none; background: var(--scrap-2); }
#login-form input::placeholder { color: var(--scrap-muted); text-align: right; }
.btn { padding: 14px; font-weight: 700; }
.btn.primary {
  background: var(--ink-1); color: var(--on-ink-1); box-shadow: 5px 5px 0 var(--ink-2); margin: 6px 5px 0 0;
  transition: transform .12s, box-shadow .12s;
}
.btn.primary:active { transform: translate(3px, 3px); box-shadow: 2px 2px 0 var(--ink-2); }
.btn:disabled { opacity: .5; }

/* ---------- الهيدر ---------- */
#app { padding: 0 16px calc(120px + var(--safe-b)); max-width: 640px; margin: 0 auto; }
.top { position: sticky; top: 0; z-index: 5; background: var(--paper); padding: calc(var(--safe-t) + 18px) 0 10px; }
.top-row { display: flex; align-items: center; gap: 12px; padding-inline-end: 6px; }
.top-row .ransom { margin-inline-start: auto; order: 3; }
.net { order: 2; font-size: 13px; font-weight: 700; background: var(--danger); color: #fff; padding: 2px 10px; transform: rotate(-3deg); }
.menu-btn { order: 1; position: relative; width: 44px; height: 44px; }
.mood-dot { position: absolute; width: 24px; height: 24px; border-radius: 50%; background: var(--ink-1); top: 6px; right: 4px; }
.mood-dot.two { background: var(--ink-2); top: 14px; right: 16px; mix-blend-mode: multiply; }
.dark .mood-dot.two { mix-blend-mode: screen; }
.icon-btn { width: 44px; height: 44px; display: grid; place-items: center; color: var(--text); flex: none; }
.icon-btn:active { transform: scale(.9); }

.add { display: flex; gap: 10px; margin: 20px 0 14px; align-items: stretch; }
.add-strip { flex: 1; min-width: 0; display: flex; transform: rotate(-.8deg); position: relative; isolation: isolate; }
.add-strip::before {
  content: ""; position: absolute; inset: 0; z-index: -1; background: var(--scrap);
  -webkit-mask: var(--torn-b) center / 100% 100% no-repeat; mask: var(--torn-b) center / 100% 100% no-repeat;
}
.add input { flex: 1; min-width: 0; color: var(--scrap-ink); background: none; border: 0; padding: 13px 14px; font-size: 16px; text-align: left; }
.add input::placeholder { color: var(--scrap-muted); text-align: right; }
.add input:focus { outline: none; }
.add-strip:focus-within::before { background: var(--scrap-2); }
.add-btn {
  background: var(--ink-1); color: var(--on-ink-1); font: 400 19px/1 var(--display); padding: 6px 18px 0; flex: none;
  box-shadow: 4px 4px 0 var(--ink-2); transform: rotate(1.5deg); transition: transform .12s, box-shadow .12s;
}
.add-btn:active { transform: rotate(1.5deg) translate(3px, 3px); box-shadow: 1px 1px 0 var(--ink-2); }
.add-btn.ghost { background: var(--text); color: var(--paper); width: 48px; padding: 0; display: grid; place-items: center; box-shadow: none; transform: rotate(-2deg); }
.add-btn:disabled { opacity: .6; }

.filters { display: flex; gap: 8px; align-items: center; overflow-x: auto; scrollbar-width: none; padding: 4px 2px 6px; }
.filters::-webkit-scrollbar { display: none; }
.chip { background: var(--scrap); color: var(--scrap-ink); padding: 6px 13px; font-size: 14px; font-weight: 600; white-space: nowrap; flex: none; transition: transform .12s; }
.chip:nth-child(1) { transform: rotate(-2deg); }
.chip:nth-child(2) { transform: rotate(1.5deg); }
.chip:nth-child(3) { transform: rotate(-1deg); }
.chip.on { background: var(--text); color: var(--paper); }
.search { flex: 1; min-width: 80px; background: none; border: 0; border-bottom: 2px solid var(--text); padding: 5px 4px; font-size: 16px; border-radius: 0; }
.search::placeholder { color: var(--muted); }
.search:focus { outline: none; border-color: var(--ink-1); }

/* ---------- القائمة: شرايط ورق ---------- */
.list { list-style: none; margin: 6px 0 0; padding: 0; }
.song { color: var(--scrap-ink); display: flex; align-items: center; gap: 8px; padding: 12px 12px 12px 4px; margin: 8px 0; position: relative; isolation: isolate; }
.song::before {
  content: ""; position: absolute; inset: 0; z-index: -1; background: var(--scrap);
  -webkit-mask: var(--torn-a) center / 100% 100% no-repeat; mask: var(--torn-a) center / 100% 100% no-repeat;
}
.list > .song:nth-child(even) { transform: rotate(.5deg); }
.list > .song:nth-child(odd) { transform: rotate(-.4deg); }
.list > .song:nth-child(even)::before { -webkit-mask-image: var(--torn-b); mask-image: var(--torn-b); }
.list > .song:nth-child(3n)::before { background: var(--scrap-2); }
.song-main { flex: 1; min-width: 0; display: flex; align-items: center; gap: 14px; text-align: start; }

.cut { position: relative; flex: none; width: 56px; height: 56px; background: #fff; padding: 3px; transform: rotate(-3deg); }
.list > .song:nth-child(even) .cut { transform: rotate(2.5deg); }
.cut img { width: 100%; height: 100%; object-fit: cover; display: block; filter: grayscale(1) contrast(1.15); }
.cut::after { content: ""; position: absolute; width: 28px; height: 10px; background: var(--tape); top: -5px; left: 50%; transform: translateX(-50%) rotate(-6deg); }

.song .meta { flex: 1; min-width: 0; display: grid; }
.song .title { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.song .sub { font-size: 13px; color: var(--scrap-muted); display: flex; gap: 8px; align-items: center; white-space: nowrap; overflow: hidden; }
.song .sub .artist { overflow: hidden; text-overflow: ellipsis; }
.where { display: inline-flex; gap: 3px; flex: none; }
.where svg { width: 14px; height: 14px; stroke-width: 2.3; }
.where .off { opacity: .25; }
.song .more { width: 40px; height: 44px; color: var(--scrap-ink); }

.list > .song.playing::before { background: var(--ink-1); }
.song.playing, .song.playing .sub { color: var(--on-ink-1); }
.song.playing .more { color: var(--on-ink-1); }
.song.playing .cut img { filter: none; }
.song.unavailable .song-main { opacity: .38; }
.song .busy { position: absolute; right: 15px; top: 50%; width: 50px; height: 50px; transform: translateY(-50%); background: rgba(0,0,0,.55); display: grid; place-items: center; }
.spin { width: 20px; height: 20px; border: 2px solid rgba(255,255,255,.25); border-top-color: #fff; border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.pending:not(:empty) { margin-bottom: 8px; }
.pending .song { padding: 12px; gap: 12px; color: var(--text); }
.pending .song::before { background: transparent; -webkit-mask: none; mask: none; outline: 2px dashed var(--muted); outline-offset: -2px; }
.pending .cut { width: 46px; height: 46px; }
.pbar { display: block; height: 8px; background: var(--scrap-2); margin-top: 6px; overflow: hidden; }
.pbar i { display: block; height: 100%; background: var(--ink-1); width: 0; transition: width .4s; margin-inline-start: 0; }
.pending .err { color: var(--danger); font-weight: 600; }
.small-btn { font-size: 13px; font-weight: 700; padding: 6px 12px; background: var(--text); color: var(--paper); flex: none; }

.empty { text-align: center; margin-top: 70px; }
.empty p { margin: 8px 0; }
.empty-title { transform: rotate(-2deg); }
.empty-title span { font: 400 26px/1.6 var(--display); background: var(--ink-1); color: var(--on-ink-1); }
.stats { text-align: center; color: var(--muted); font-size: 13px; margin-top: 26px; }

/* ---------- المشغل الصغير ---------- */
.mini {
  position: fixed; inset-inline: 8px; bottom: calc(8px + var(--safe-b)); z-index: 10;
  max-width: 624px; margin: 0 auto; isolation: isolate;
  display: flex; align-items: center; gap: 6px; padding: 14px 10px 16px;
}
.mini::before {
  content: ""; position: absolute; inset: 0; z-index: -1; background: var(--text);
  -webkit-mask: var(--torn-b) center / 100% 100% no-repeat; mask: var(--torn-b) center / 100% 100% no-repeat;
}
.mini, .mini .icon-btn { color: var(--paper); }
.mini-open { flex: 1; min-width: 0; display: flex; align-items: center; gap: 12px; text-align: start; }
.mini-photo { flex: none; width: 48px; height: 48px; background: #fff; padding: 3px; transform: rotate(-4deg); }
.mini-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.mini-text { flex: 1; min-width: 0; display: grid; }
.mini-text b, .mini-text span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mini-text b { font-weight: 600; }
.mini-text span { font-size: 13px; opacity: .7; }
.mini-play { width: 46px; height: 46px; border-radius: 50%; background: var(--ink-1); color: var(--on-ink-1); display: grid; place-items: center; flex: none; box-shadow: 3px 3px 0 var(--ink-2); }
.mini-play:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--ink-2); }
.mini-play svg { width: 22px; height: 22px; }
.mini-bar { position: absolute; inset-inline: 18px; bottom: 8px; height: 3px; background: color-mix(in srgb, var(--paper) 25%, transparent); overflow: hidden; }
.mini-bar i { display: block; height: 100%; width: 0; background: var(--ink-1); }

/* ---------- المشغل الكامل: بوستر كولاج ---------- */
.full {
  position: fixed; inset: 0; z-index: 20; background: var(--paper);
  display: flex; flex-direction: column; align-items: center;
  padding: calc(var(--safe-t) + 6px) 22px calc(var(--safe-b) + 26px);
  animation: up .34s var(--ease); overflow: hidden;
}
@keyframes up { from { transform: translateY(56px); opacity: 0; } }
.close-tab { width: 64px; height: 34px; display: grid; place-items: center; background: var(--scrap); color: var(--scrap-ink); transform: rotate(-2deg); flex: none; }
.close-tab svg { width: 26px; height: 26px; }

.stage { position: relative; width: min(100%, 380px); aspect-ratio: 1 / .92; margin: auto 0 0; flex: none; }
.shape-a {
  position: absolute; inset: 10% 2% 12% 12%; background: var(--ink-2); transform: rotate(6deg);
  -webkit-mask: var(--torn-b) center / 100% 100% no-repeat; mask: var(--torn-b) center / 100% 100% no-repeat;
}
.shape-b {
  position: absolute; width: 50%; height: 15%; left: -2%; bottom: 6%; background: var(--text); transform: rotate(-9deg);
  -webkit-mask: var(--torn-a) center / 100% 100% no-repeat; mask: var(--torn-a) center / 100% 100% no-repeat;
}
.halftone-sun {
  position: absolute; width: 50%; aspect-ratio: 1; top: -3%; right: -5%; border-radius: 50%;
  background:
    radial-gradient(circle, var(--ink-1) 0 31%, transparent 31.5%),
    radial-gradient(circle, var(--ink-1) 2.2px, transparent 2.7px) 0 0 / 9px 9px;
  animation: turn 40s linear infinite;
}
.full.paused .halftone-sun { animation-play-state: paused; }
@keyframes turn { to { transform: rotate(360deg); } }
.photo {
  position: absolute; margin: 0; width: 60%; left: 20%; top: 14%; background: #fff; padding: 9px;
  transform: rotate(-4deg); transition: transform .45s var(--ease);
}
.photo img { width: 100%; aspect-ratio: 1; object-fit: cover; display: block; transition: filter .45s; }
.full.paused .photo { transform: rotate(-1deg) scale(.95); }
.full.paused .photo img { filter: grayscale(1) contrast(1.1); }
.tape { position: absolute; width: 74px; height: 22px; background: var(--tape); }
.tape.t1 { top: -9px; right: -22px; transform: rotate(35deg); }
.tape.t2 { bottom: -6px; left: -24px; transform: rotate(28deg); }

.full-text { width: 100%; max-width: 420px; display: grid; justify-items: start; gap: 8px; margin: 16px 0 0; }
.strip-title {
  margin: 0; font: 400 30px/1.55 var(--display); transform: rotate(-1.5deg); max-width: 100%;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; padding: 2px 4px;
}
.label { display: inline-block; background: var(--ink-1); color: var(--on-ink-1); font-weight: 600; font-size: 14px; padding: 3px 12px; transform: rotate(2deg); margin-inline-start: 10px; }
.label:empty { display: none; }

.seek { position: relative; width: 100%; max-width: 420px; height: 44px; margin-top: 14px; touch-action: none; cursor: pointer; flex: none; }
.seek:focus-visible { outline-offset: 0; }
.seek-track {
  position: absolute; inset-inline: 0; top: 50%; height: 16px; transform: translateY(-50%); background: var(--scrap-2); overflow: hidden;
  -webkit-mask: var(--torn-a) center / 100% 100% no-repeat; mask: var(--torn-a) center / 100% 100% no-repeat;
}
.seek-track i { position: absolute; top: 0; bottom: 0; right: 0; width: 0; background: var(--ink-1); }
.seek-sun {
  position: absolute; top: 50%; right: 0; width: 34px; height: 34px; transform: translate(50%, -50%);
  background: var(--ink-1); pointer-events: none;
  clip-path: polygon(50% 0, 59% 22%, 79% 9%, 76% 32%, 100% 32%, 82% 50%, 100% 68%, 76% 68%, 79% 91%, 59% 78%, 50% 100%, 41% 78%, 21% 91%, 24% 68%, 0 68%, 18% 50%, 0 32%, 24% 32%, 21% 9%, 41% 22%);
}
.seek-sun::after { content: ""; position: absolute; inset: 30%; border-radius: 50%; background: var(--ink-2); }
.times { width: 100%; max-width: 420px; display: flex; justify-content: space-between; font-size: 13px; font-weight: 500; color: var(--muted); font-variant-numeric: tabular-nums; flex: none; }
.controls { width: 100%; max-width: 420px; display: flex; align-items: center; justify-content: space-between; margin: 14px 0 auto; flex: none; }
.controls .icon-btn { width: 52px; height: 52px; }
.controls .icon-btn svg { width: 30px; height: 30px; }
.controls .toggle svg { width: 22px; height: 22px; }
.toggle { color: var(--muted); position: relative; }
.toggle.on { color: var(--text); }
.toggle.on::after { content: ""; position: absolute; bottom: 6px; left: 50%; width: 6px; height: 6px; border-radius: 50%; background: var(--ink-1); transform: translateX(-50%); }
.toggle small { position: absolute; top: 8px; right: 8px; font-size: 11px; font-weight: 700; }
.play-btn {
  width: 80px; height: 80px; border-radius: 50%; background: var(--ink-1); color: var(--on-ink-1); display: grid; place-items: center;
  box-shadow: 6px 6px 0 var(--ink-2); transition: transform .12s, box-shadow .12s;
}
.play-btn svg { width: 34px; height: 34px; }
.play-btn:active { transform: translate(4px, 4px); box-shadow: 2px 2px 0 var(--ink-2); }

/* ---------- الورقة ---------- */
.sheet-bg { position: fixed; inset: 0; background: rgba(0,0,0,.45); z-index: 30; animation: fade .2s; }
@keyframes fade { from { opacity: 0; } }
.sheet {
  position: fixed; inset-inline: 0; bottom: 0; z-index: 31; max-width: 640px; margin: 0 auto;
  max-height: 88dvh; overflow-y: auto; background: var(--scrap); color: var(--scrap-ink); padding: 30px 20px calc(20px + var(--safe-b));
  -webkit-mask: url(torn-top.svg) top / 100% 16px no-repeat, linear-gradient(#000, #000) 0 15px / 100% calc(100% - 15px) no-repeat;
  mask: url(torn-top.svg) top / 100% 16px no-repeat, linear-gradient(#000, #000) 0 15px / 100% calc(100% - 15px) no-repeat;
  animation: up .28s var(--ease);
}
.sheet h3 { margin: 0; font: 400 24px/1.4 var(--display); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sheet h4 { margin: 22px 0 10px; font: 400 19px/1.4 var(--display); }
.sheet .hint { color: var(--scrap-muted); font-size: 13px; margin: 2px 0 14px; }
.row { display: flex; align-items: center; gap: 12px; padding: 13px 0; width: 100%; text-align: start; }
.row + .row { border-top: 2px dotted color-mix(in srgb, var(--scrap-ink) 25%, transparent); }
.row .lbl { flex: 1; display: grid; font-weight: 500; }
.row .lbl small { color: var(--scrap-muted); font-size: 12px; font-weight: 400; }
.row.danger { color: var(--danger); font-weight: 600; }
.row:disabled { opacity: .45; }
.switch { width: 52px; height: 30px; background: var(--scrap-2); position: relative; flex: none; transition: background .2s; }
.switch::after { content: ""; position: absolute; top: 4px; right: 4px; width: 22px; height: 22px; background: var(--scrap-ink); transition: right .2s var(--ease), background .2s; }
.switch.on { background: var(--ink-1); }
.switch.on::after { right: 26px; background: var(--on-ink-1); }

/* المودات: عينة ورق وعليها حبرين */
.moods { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; }
.mood { display: grid; gap: 6px; justify-items: center; font-size: 12px; font-weight: 500; color: var(--scrap-muted); }
.mood i {
  width: 100%; aspect-ratio: 3 / 4; display: block; position: relative; background: var(--p);
  transition: transform .15s;
}
.mood:nth-child(odd) i { transform: rotate(-3deg); }
.mood:nth-child(even) i { transform: rotate(2deg); }
.mood i::before, .mood i::after { content: ""; position: absolute; width: 46%; aspect-ratio: 1; border-radius: 50%; }
.mood i::before { background: var(--a); top: 22%; right: 16%; }
.mood i::after { background: var(--b); top: 42%; right: 38%; mix-blend-mode: multiply; }
.mood.auto i { background: conic-gradient(#d6e8df 0 25%, #e9eaec 0 50%, #ffcbb5 0 75%, #141414 0); }
.mood.auto i::before { background: #ffe800; }
.mood.auto i::after { background: #ff48b0; }
.mood.on { color: var(--scrap-ink); font-weight: 700; }
.mood.on i { outline: 3px solid var(--scrap-ink); outline-offset: 3px; }
.accents { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.swatch { width: 34px; height: 34px; border-radius: 50%; outline: 3px solid transparent; outline-offset: 2px; }
.swatch.on { outline-color: var(--scrap-ink); }
.swatch.custom { display: grid; place-items: center; background: conic-gradient(#ff48b0 0 25%, #ffe800 0 50%, #00838a 0 75%, #0078bf 0); position: relative; overflow: hidden; }
.swatch.custom input { position: absolute; inset: 0; opacity: 0; width: 100%; height: 100%; cursor: pointer; }

/* ---------- تنبيه ---------- */
.toast {
  position: fixed; left: 50%; bottom: calc(104px + var(--safe-b)); z-index: 40;
  background: var(--ink-2); color: var(--on-ink-2); padding: 10px 16px; font-size: 14px; font-weight: 600;
  width: max-content; max-width: calc(100% - 32px); text-align: center; transform: translateX(-50%) rotate(-1.5deg);
  animation: fade .2s;
}

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

/* ================= الإضافات ================= */
.btn.wide { width: calc(100% - 5px); margin-top: 14px; }
.spin.dark { border-color: color-mix(in srgb, var(--scrap-ink) 20%, transparent); border-top-color: var(--scrap-ink); }
.heart-mini { display: inline-flex; vertical-align: -2px; margin-inline-end: 4px; color: var(--ink-2); }
.heart-mini svg { width: 15px; height: 15px; fill: currentColor; stroke: none; }
.song.playing .heart-mini { color: var(--on-ink-1); }
.more-pending .meta { padding-inline-start: 6px; }

/* ---------- الرف: بلاي لستات مقصوصة ---------- */
.shelf { display: flex; gap: 14px; overflow-x: auto; scrollbar-width: none; padding: 14px 4px 8px; margin: 0 -16px; padding-inline: 16px; }
.shelf::-webkit-scrollbar { display: none; }
.pl-card { flex: none; width: 104px; display: grid; gap: 6px; text-align: start; transition: transform .15s; }
.pl-card:nth-child(odd) { transform: rotate(-1.5deg); }
.pl-card:nth-child(even) { transform: rotate(1.2deg); }
.pl-card:active { transform: scale(.95); }
.pl-cover { width: 104px; height: 104px; display: grid; place-items: center; position: relative; overflow: hidden; }
.pl-cover svg { width: 46px; height: 46px; stroke-width: 2; }
.pl-cover.fav { background: var(--ink-1); color: var(--on-ink-1); }
.pl-cover.fav svg { fill: currentColor; stroke: none; }
.pl-cover.recent { background: var(--scrap); color: var(--scrap-ink); }
.pl-cover.top { background: var(--ink-2); color: var(--on-ink-2); }
.pl-cover.top b { font: 400 64px/1 var(--display); padding-top: 12px; }
.pl-cover.add { outline: 2px dashed var(--muted); outline-offset: -2px; color: var(--muted); }
.pl-cover.empty { background: var(--scrap-2); }
.pl-cover.collage { background: var(--scrap-2); }
.pl-cover.collage img { position: absolute; width: 66%; aspect-ratio: 1; object-fit: cover; border: 3px solid #fff; filter: grayscale(1) contrast(1.15); }
.pl-cover.collage img:nth-child(1) { top: 6%; right: 4%; transform: rotate(5deg); z-index: 3; }
.pl-cover.collage img:nth-child(2) { bottom: 4%; left: 4%; transform: rotate(-7deg); z-index: 2; }
.pl-cover.collage img:nth-child(3) { top: 10%; left: 8%; transform: rotate(-2deg); z-index: 1; }
.pl-cover.collage.n1 img { width: 82%; top: 9%; right: 9%; }
.pl-name { font-weight: 600; font-size: 14px; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.pl-card small { font-size: 12px; color: var(--muted); margin-top: -4px; }
.pl-card.on .pl-cover { outline: 3px solid var(--text); outline-offset: 3px; }
.pl-card.on .pl-cover.collage img { filter: none; }

/* ---------- راس القائمة ---------- */
.list-head:empty { display: none; }
.list-head { margin: 6px 0 2px; }
.sort-btn { font-size: 13px; color: var(--muted); padding: 6px 2px; }
.sort-btn b { color: var(--text); font-weight: 600; border-bottom: 2px solid var(--ink-1); }
.view-head { display: flex; align-items: center; gap: 8px; }
.view-title { flex: 1; min-width: 0; font-size: 28px; }
.view-actions { display: flex; align-items: center; gap: 10px; margin: 10px 0 6px; }
.view-actions .add-btn { padding: 12px 18px 8px; }
.view-actions .chip:disabled, .view-actions .add-btn:disabled { opacity: .4; }
.view-actions small { color: var(--muted); font-size: 13px; margin-inline-start: auto; }

.drag { flex: none; width: 30px; height: 44px; display: grid; place-items: center; color: var(--scrap-muted); touch-action: none; cursor: grab; }
.drag svg { width: 18px; height: 18px; }
.song.playing .drag { color: var(--on-ink-1); }
.dragging { z-index: 5; position: relative; transition: none !important; }
[data-id] { transition: transform .18s var(--ease); }

/* ---------- المشغل: القلب، الكلمات، الأدوات ---------- */
.full .stage { width: min(100%, 330px, 40dvh); }
.title-row { display: flex; align-items: flex-start; gap: 10px; width: 100%; }
.title-row .strip-title { flex: 1; min-width: 0; }
.fav-btn { flex: none; width: 44px; height: 44px; display: grid; place-items: center; color: var(--text); margin-top: 4px; }
.fav-btn svg { width: 28px; height: 28px; }
.fav-btn.on { color: var(--ink-1); }
.fav-btn.on svg { fill: currentColor; animation: pop .3s var(--ease); }
@keyframes pop { 50% { transform: scale(1.3) rotate(-8deg); } }

.lyrics { display: none; }
.full.lyrics-on .stage { display: none; }
.full.lyrics-on .lyrics {
  display: block; flex: 1; min-height: 0; width: 100%; max-width: 440px; overflow-y: auto; padding: 30px 4px 40px; margin-top: 8px;
  -webkit-mask-image: linear-gradient(transparent, #000 12%, #000 85%, transparent); mask-image: linear-gradient(transparent, #000 12%, #000 85%, transparent);
  scrollbar-width: none;
}
.lyrics::-webkit-scrollbar { display: none; }
.lyrics p { margin: 0 0 14px; font-size: 19px; font-weight: 500; line-height: 1.55; color: var(--muted); cursor: pointer; transition: color .25s; }
.lyrics p.now { color: var(--text); font: 400 27px/1.6 var(--display); text-decoration: underline 5px var(--ink-1); text-underline-offset: 6px; text-decoration-skip-ink: none; }
.lyrics .ly-src { font-size: 12px; color: var(--muted); margin-top: 24px; cursor: default; }
.ly-plain { white-space: pre-line; font-size: 18px; line-height: 1.8; color: var(--text); }
.ly-msg { display: grid; justify-items: center; gap: 16px; padding-top: 40px; text-align: center; }
.ly-msg .strip-title { font-size: 24px; }

.tools { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; width: calc(100% + 44px); margin: 4px -22px 0; padding: 6px 22px 4px; flex: none; }
.tools::-webkit-scrollbar { display: none; }
.tool { flex: none; background: var(--scrap); color: var(--scrap-ink); font-size: 14px; font-weight: 600; padding: 8px 14px; white-space: nowrap; }
.tool:nth-child(odd) { transform: rotate(-1.5deg); }
.tool:nth-child(even) { transform: rotate(1deg); }
.tool.on { background: var(--ink-1); color: var(--on-ink-1); }

/* الموجة والعلامات */
.seek.wave .seek-track { height: 34px; }
.marks { position: absolute; inset: 0; pointer-events: none; }
.mark { position: absolute; transform: translateX(50%); pointer-events: auto; }
.mark.note { top: -4px; width: 14px; height: 16px; background: var(--ink-2); clip-path: polygon(0 0, 100% 0, 100% 70%, 50% 100%, 0 70%); padding: 0; }
.mark.note::before { content: ""; position: absolute; inset: -12px; }
.mark.chap { bottom: 6px; width: 3px; height: 8px; background: var(--text); opacity: .5; pointer-events: none; }

/* ---------- أوراق: نتائج البحث، الطابور، الحقول ---------- */
.search-wait { display: grid; place-items: center; padding: 30px; }
.results, .queue { list-style: none; margin: 4px 0 0; padding: 0; }
.results li, .queue li { display: flex; align-items: center; gap: 12px; padding: 10px 0; }
.results li + li, .queue li + li { border-top: 2px dotted color-mix(in srgb, var(--scrap-ink) 20%, transparent); }
.results .cut, .queue .cut { width: 50px; height: 50px; }
.results .cut img { filter: none; }
.results .meta, .q-main { flex: 1; min-width: 0; display: grid; text-align: start; }
.results b, .q-main b { font-weight: 600; font-size: 15px; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.results small, .q-main small { color: var(--scrap-muted); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.results .small-btn { background: var(--ink-1); color: var(--on-ink-1); }
.have { font-size: 13px; font-weight: 600; color: var(--scrap-muted); flex: none; }
.queue li.mine .q-main b::after { content: "، ضفتها"; font-weight: 400; font-size: 12px; color: var(--scrap-muted); }
.queue .drag { color: var(--scrap-muted); }
.queue li { background: var(--scrap); }

.fields { display: grid; gap: 12px; margin-top: 10px; }
.fields label { display: grid; gap: 4px; font-size: 13px; color: var(--scrap-muted); font-weight: 500; }
.fields input { background: var(--scrap-2); color: var(--scrap-ink); border: 0; border-radius: 0; padding: 12px 14px; font-size: 16px; }
.fields input:focus { outline: 2px solid var(--scrap-ink); }
.fields.inline { display: flex; gap: 8px; margin: 10px 0 12px; }
.fields.inline input { flex: 1; min-width: 0; }
.fields.inline .add-btn { transform: none; box-shadow: 3px 3px 0 var(--ink-2); padding: 8px 14px 4px; }
.speeds { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 8px; }
.speeds .chip { font-size: 16px; padding: 10px 16px; background: var(--scrap-2); }
.speeds .chip.on { background: var(--scrap-ink); color: var(--scrap); }
.note-row .lbl, .chap-row .lbl { text-align: start; }
.note-row .lbl { display: block; flex: 1; line-height: 1.6; }
.note-row .t, .chap-row .t { display: inline-block; }
.note-row .t, .chap-row .t { font-weight: 700; color: var(--scrap-ink); background: var(--ink-1); color: var(--on-ink-1); padding: 1px 6px; margin-inline-end: 6px; font-size: 13px; }
.chap-row .t { background: var(--scrap-2); color: var(--scrap-ink); }
.chap-row.now .t { background: var(--ink-1); color: var(--on-ink-1); }
.chap-row { gap: 10px; }
.wrapped-row { background: var(--ink-1); color: var(--on-ink-1); padding: 14px 16px; margin: 0 0 14px; transform: rotate(-1deg); border: 0 !important; }
.wrapped-row .lbl { font: 400 22px/1.3 var(--display); }
.wrapped-row .lbl small { font: 500 12px/1.4 var(--body); color: inherit; opacity: .8; }
.hint.err { color: var(--danger); font-weight: 600; }

/* ---------- الملخص السنوي ---------- */
.wrapped { position: fixed; inset: 0; z-index: 50; background: var(--paper); color: var(--text); padding: calc(var(--safe-t) + 12px) 22px calc(var(--safe-b) + 24px); display: flex; flex-direction: column; animation: up .3s var(--ease); outline: none; }
.wp-bar { display: flex; gap: 4px; }
.wp-bar i { flex: 1; height: 5px; background: color-mix(in srgb, var(--text) 18%, transparent); overflow: hidden; }
.wp-bar i b { display: block; height: 100%; width: 0; background: var(--ink-1); }
.wp-bar i.done b { width: 100%; }
.wp-bar i.now b { width: 100%; transition: width 6s linear; animation: grow 6s linear; }
@keyframes grow { from { width: 0; } }
.wp-close { align-self: flex-start; margin-top: 6px; }
.wp-stage { flex: 1; position: relative; }
.wp { position: absolute; inset: 0; display: none; flex-direction: column; justify-content: center; align-items: flex-start; gap: 18px; }
.wp.on { display: flex; animation: up .35s var(--ease); }
.wp-kicker span { background: var(--text); color: var(--paper); font: 400 24px/1.6 var(--display); padding: .05em .4em; }
.wp-kicker { margin: 0; transform: rotate(-2deg); }
.wp-big { margin: 0; font: 400 min(30vw, 150px)/1 var(--display); letter-spacing: -2px; transform: rotate(-3deg); }
.wp-big.small { font-size: min(14vw, 64px); }
.wp-label { margin: 0; transform: rotate(1.5deg); }
.wp-label span { background: var(--ink-1); color: var(--on-ink-1); font-weight: 600; font-size: 17px; padding: 4px 12px; }
.wp-sun { position: absolute; width: 60%; aspect-ratio: 1; left: -14%; bottom: 2%; border-radius: 50%; z-index: -1;
  background: radial-gradient(circle, var(--ink-2) 0 30%, transparent 30.5%), radial-gradient(circle, var(--ink-2) 2.4px, transparent 2.9px) 0 0 / 10px 10px; animation: turn 40s linear infinite; }
.wp-photo { position: relative; width: 62%; left: auto; top: auto; align-self: center; }
.wp-song .strip-title { font-size: 30px; }
.wp-list { list-style: none; padding: 0; margin: 0; width: 100%; display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; counter-reset: n; }
.wp-list li { min-width: 0; counter-increment: n; display: flex; align-items: center; gap: 12px; background: var(--scrap); color: var(--scrap-ink); padding: 8px 12px; }
.wp-list li:nth-child(odd) { transform: rotate(-1deg); }
.wp-list li:nth-child(even) { transform: rotate(.8deg); }
.wp-list li:first-child { background: var(--ink-1); color: var(--on-ink-1); }
.wp-list li::before { content: counter(n); font: 400 30px/1 var(--display); width: 22px; padding-top: 6px; }
.wp-list .cut { width: 46px; height: 46px; }
.wp-list .cut img { filter: none; }
.wp-list b { flex: 1; min-width: 0; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wp-list small { font-size: 13px; opacity: .75; }
.wp-ransom { display: flex; flex-wrap: wrap; gap: 3px; margin: 0; max-width: 100%; }
.wp-ransom b { font: 400 54px/1 var(--display); padding: .16em .16em .02em; }
.wp-ransom b:nth-child(5n+1) { background: var(--ink-1); color: var(--on-ink-1); transform: rotate(-5deg); }
.wp-ransom b:nth-child(5n+2) { background: var(--text); color: var(--paper); transform: rotate(3deg); }
.wp-ransom b:nth-child(5n+3) { background: var(--scrap); color: var(--scrap-ink); transform: rotate(-2deg); }
.wp-ransom b:nth-child(5n+4) { background: var(--ink-2); color: var(--on-ink-2); transform: rotate(6deg); }
.wp-ransom b:nth-child(5n) { background: var(--scrap-2); color: var(--scrap-ink); transform: rotate(-4deg); }
.wp-bars { width: 100%; height: 160px; display: flex; align-items: flex-end; gap: 5px; direction: rtl; }
.wp-bars i { flex: 1; background: var(--scrap-2); }
.wp-bars i.on { background: var(--ink-1); }
.wp-end { align-items: center; text-align: center; }

.wp-ransom.words b { font-size: 44px; padding: .2em .3em .05em; }
