/* «استمع»: قائمة استماع بصوت الجهاز (listen.js) — زر البدء وشريط التحكم. وحدة مستقلة: حذف هذا الملف وسطره في index.html يكفي. */
.lsn-cta { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 60px; margin: 12px 0 4px; padding: 10px 12px; border-radius: 18px; cursor: pointer; text-align: start; color: var(--ink);
  background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); transition: transform .15s, border-color .2s; }
.lsn-cta:hover { border-color: color-mix(in srgb, var(--accent) 40%, var(--line)); }
.lsn-cta:active { transform: scale(.985); }
.lsn-cta:focus-visible, .lsn button:focus-visible { outline: 3px solid color-mix(in srgb, var(--accent) 55%, transparent); outline-offset: 2px; }
.lsn-ci { width: 40px; height: 40px; flex: none; border-radius: 13px; display: grid; place-items: center; color: var(--accent); background: color-mix(in srgb, var(--accent) 12%, var(--surface)); }
.lsn-ci svg { width: 22px; height: 22px; }
.lsn-cb { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.lsn-cb b { font-size: 15px; font-weight: 700; }
.lsn-cb small { color: var(--muted); font-size: 12.5px; }
.lsn-cp { width: 44px; height: 44px; flex: none; border-radius: 50%; display: grid; place-items: center; background: var(--coral, var(--amber)); color: #fff; }
.lsn-cp svg { width: 20px; height: 20px; }
#sv > .lsn-cta { margin-top: 0; }

/* الشريط: فوق التنقل السفلي مثل المشغّل، بسطرين — ما يُقرأ الآن ثم التحكم */
.lsn { position: fixed; inset-inline: 10px; bottom: calc(var(--nav-h) + var(--safe-b) + 8px); z-index: 41; max-width: 660px; margin: 0 auto; padding: 10px 12px 8px;
  background: var(--ink); color: var(--bg); border-radius: 20px; box-shadow: 0 14px 34px -10px rgba(9, 12, 28, .45); animation: lsnIn .28s cubic-bezier(.2, .9, .3, 1.2); }
#nav[hidden] ~ .lsn { bottom: calc(var(--safe-b) + 10px); }
@keyframes lsnIn { from { transform: translateY(16px); opacity: 0; } }
.lsn button { border: 0; background: none; color: inherit; cursor: pointer; font: inherit; }
.lsn button:disabled { opacity: .35; cursor: default; }
.lsn-top { display: flex; align-items: center; gap: 10px; }
.lsn-wv { width: 34px; height: 34px; flex: none; border-radius: 11px; display: grid; place-items: center; background: color-mix(in srgb, var(--bg) 14%, transparent); }
.lsn-wv svg { width: 20px; height: 20px; }
.lsn-wv.on svg path { animation: lsnWave 1.1s ease-in-out infinite; transform-origin: center; transform-box: fill-box; }
.lsn-wv.on svg path:nth-child(2) { animation-delay: .15s; } .lsn-wv.on svg path:nth-child(3) { animation-delay: .3s; } .lsn-wv.on svg path:nth-child(4) { animation-delay: .45s; }
@keyframes lsnWave { 50% { transform: scaleY(.45); } }
.lsn-t { flex: 1; min-width: 0; display: flex; flex-direction: column; text-align: start; padding: 2px 0; min-height: 44px; justify-content: center; }
.lsn-t small { font-size: 11.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: flex; align-items: center; gap: 8px; }
.lsn-t small > :not(.lsn-k), .lsn-t small { color: color-mix(in srgb, currentColor 72%, transparent); }
.lsn-k { flex: none; padding: 0 7px; border-radius: 999px; font-weight: 700; font-variant-numeric: tabular-nums; color: inherit; background: color-mix(in srgb, var(--bg) 16%, transparent); }
:root[data-palette="tayf"][data-palette] .lsn-k { background: var(--accent-soft); color: var(--accent); }
.lsn-t b { font-size: 14px; font-weight: 600; line-height: 1.5; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lsn-x { width: 44px; height: 44px; flex: none; display: grid; place-items: center; border-radius: 50%; }
.lsn-x svg { width: 20px; height: 20px; }
.lsn-prog { display: flex; gap: 3px; margin: 6px 2px 4px; }
.lsn-prog i { flex: 1; height: 3px; border-radius: 3px; background: color-mix(in srgb, var(--bg) 22%, transparent); position: relative; overflow: hidden; }
.lsn-prog i.done { background: var(--coral, var(--amber)); }
.lsn-prog em { position: absolute; inset-block: 0; inset-inline-start: 0; background: var(--coral, var(--amber)); border-radius: 3px; transition: width .4s; }
.lsn-ctl { display: flex; align-items: center; justify-content: center; gap: 6px; }
.lsn-ctl > button { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 50%; }
.lsn-ctl > button svg { width: 22px; height: 22px; }
.lsn-ctl .lsn-pp { width: 52px; height: 52px; background: var(--coral, var(--amber)); color: #fff; }
.lsn-ctl .lsn-pp svg { width: 24px; height: 24px; }
.lsn-rate { font-size: 13px !important; font-weight: 800 !important; font-variant-numeric: tabular-nums; }
.lsn-sp { width: 44px; }
.lsn-ctl .lsn-txt { width: auto; padding: 0 16px; border-radius: 999px; font-weight: 700; font-size: 14px; background: color-mix(in srgb, var(--bg) 14%, transparent); }
body.has-listen #app { padding-bottom: calc(var(--nav-h) + var(--safe-b) + 170px); }
body.has-listen .gc { padding-bottom: 160px; }
body.has-listen #player { display: none; }

.lsn-nv { text-align: center; padding: 6px 4px 4px; }
.lsn-nv .lsn-wv { margin: 0 auto 12px; width: 52px; height: 52px; border-radius: 16px; color: var(--accent); background: var(--accent-soft); }
.lsn-nv .lsn-wv svg { width: 28px; height: 28px; }
.lsn-nv h2 { margin: 0 0 6px; font-size: 18px; }
.lsn-nv p { margin: 0 0 14px; color: var(--ink-2); font-size: 14.5px; line-height: 1.8; }

/* «طيف»: سطح زجاجي داكن وحزمة الطيف للتقدّم */
:root[data-palette="tayf"][data-palette] .lsn { background: color-mix(in srgb, var(--surface-2) 88%, transparent); color: var(--ink); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); border: 1px solid var(--line-2); border-radius: 24px; }
:root[data-palette="tayf"][data-palette] .lsn-wv { background: var(--accent-soft); color: var(--accent); }
:root[data-palette="tayf"][data-palette] .lsn-prog i { background: var(--line-2); }
:root[data-palette="tayf"][data-palette] .lsn-prog i.done, :root[data-palette="tayf"][data-palette] .lsn-prog em { background: var(--tf-spec); }
:root[data-palette="tayf"][data-palette] .lsn-ctl .lsn-pp, :root[data-palette="tayf"][data-palette] .lsn-cp { background: var(--accent); color: var(--accent-ink); }
:root[data-palette="tayf"][data-palette] .lsn-ctl .lsn-txt { background: var(--accent-soft); color: var(--accent); }
:root[data-palette="tayf"][data-palette] .lsn-cta { background: var(--tf-glass); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-radius: 20px; box-shadow: none; }
:root[data-palette="tayf"][data-palette] .lsn-cb b { font-family: var(--f-head); }
@media (prefers-reduced-motion: reduce) { .lsn { animation: none; } .lsn-wv.on svg path { animation: none; } .lsn-prog em { transition: none; } }
