/* أنماط الموقع القديم كما هي (app/globals.css). القالب يُخرج نفس العناصر وأسماء الأصناف. */
:root {
  color-scheme: light dark;
  --bg: #f2f6f4; --surface: #ffffff; --ink: #10263a; --mute: #5b6f7f;
  --line: #d9e3de; --accent: #087a68; --accent-ink: #ffffff; --focus: #8a5200;
  --top: 56px; --nav-h: 62px; --side: 232px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0f1a24; --surface: #172635; --ink: #e8f0f4; --mute: #93a8b6;
    --line: #243749; --accent: #2cc4a8; --accent-ink: #06231d; --focus: #f2b035;
  }
}
/* اختيار الزائر اليدوي للعرض (فاتح/داكن) يتغلّب على إعداد الجهاز */
:root[data-theme="light"] { color-scheme: light; }
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0f1a24; --surface: #172635; --ink: #e8f0f4; --mute: #93a8b6;
  --line: #243749; --accent: #2cc4a8; --accent-ink: #06231d; --focus: #f2b035;
}
* { box-sizing: border-box; margin: 0; }
html { scroll-padding-top: calc(var(--top) + 12px); -webkit-text-size-adjust: 100%; }
html, body { background: var(--bg); color: var(--ink); }
body { min-height: 100dvh; line-height: 1.6; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; padding: 0; }
button, input { font: inherit; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.main:focus { outline: none; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip { position: absolute; inset-inline-start: 8px; top: -60px; background: var(--focus); color: var(--bg); padding: 8px 12px; border-radius: 8px; z-index: 50; }
.skip:focus { top: 8px; }

/* ---------- الهيدر ---------- */
.top {
  position: sticky; top: 0; z-index: 20; height: calc(var(--top) + env(safe-area-inset-top, 0px));
  padding: env(safe-area-inset-top, 0px) 16px 0; display: flex; align-items: center; gap: 12px;
  background: var(--bg); border-bottom: 1px solid var(--line);
}
.brand { font-weight: 700; font-size: 1.35rem; color: var(--accent); }
.search { flex: 1; max-width: 520px; margin-inline: auto; display: flex; align-items: center; gap: 8px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 0 14px; height: 40px; color: var(--mute); }
.search:focus-within { outline: 3px solid var(--focus); outline-offset: 2px; }
.search input { flex: 1; min-width: 0; border: 0; background: none; outline: none; color: var(--ink); }
.search input::placeholder { color: var(--mute); }
.login { background: var(--accent); color: var(--accent-ink); padding: 8px 16px; border-radius: 999px; font-size: .9rem; white-space: nowrap; }

/* ---------- التنقل ---------- */
.side { display: none; }
.navlink { display: flex; align-items: center; gap: 14px; padding: 10px 14px; border-radius: 12px; }
.navlink:hover { background: var(--surface); }
.navlink.on { background: var(--surface); color: var(--accent); font-weight: 600; }
.side hr { border: 0; border-top: 1px solid var(--line); margin: 10px 0; }

.bottom {
  position: fixed; inset-inline: 0; bottom: 0; z-index: 20; display: grid; grid-template-columns: repeat(5, 1fr);
  background: var(--bg); border-top: 1px solid var(--line);
  min-height: calc(var(--nav-h) + env(safe-area-inset-bottom, 0px)); padding-bottom: env(safe-area-inset-bottom, 0px);
}
.bottom .navlink { flex-direction: column; gap: 2px; padding: 8px 2px; border-radius: 0; font-size: .72rem; justify-content: center; align-items: center; }
.bottom .navlink:hover, .bottom .navlink.on { background: none; }

/* ---------- المحتوى ---------- */
.main { padding: 16px 0 calc(var(--nav-h) + 24px + env(safe-area-inset-bottom, 0px)); }

.grid { display: grid; grid-template-columns: 1fr; gap: 34px 22px; }
.card { display: block; border-radius: 14px; }
.thumb {
  position: relative; aspect-ratio: 16 / 9;
  background: linear-gradient(135deg, hsl(var(--h) 60% 52%), hsl(calc(var(--h) + 40) 65% 38%));
}
.dur { position: absolute; inset-inline-end: 8px; bottom: 8px; background: rgba(0,0,0,.78); color: #fff; font-size: .75rem; padding: 1px 6px; border-radius: 6px; }
.card h3 { font-size: 1rem; font-weight: 600; margin: 10px 14px 0; }
.card p { font-size: .82rem; color: var(--mute); margin: 2px 14px 0; }
.card:hover h3 { color: var(--accent); }

.page-title { font-size: 1.15rem; font-weight: 600; padding: 4px 16px 14px; }
.empty-note { color: var(--mute); padding: 24px 16px; }
.empty { padding: 48px 20px; text-align: center; }
.empty p { color: var(--mute); margin-top: 8px; }
.btn { display: inline-block; margin-top: 20px; background: var(--accent); color: var(--accent-ink); padding: 10px 20px; border: 0; border-radius: 999px; cursor: pointer; }

/* ---------- صفحة المشاهدة ---------- */
.watch { display: grid; gap: 28px; }
.player {
  position: relative; display: grid; place-items: center; aspect-ratio: 16 / 9;
  background: linear-gradient(135deg, hsl(var(--h) 60% 40%), hsl(calc(var(--h) + 40) 65% 24%)); color: #fff;
}
.player--frame { background: #000; }
.player iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.player .soon { position: absolute; inset-inline: 0; bottom: 12px; text-align: center; font-size: .85rem; opacity: .9; }
.play { display: grid; place-items: center; width: 68px; height: 68px; border-radius: 50%; background: rgba(0,0,0,.55); }
.watch article > h1 { font-size: 1.25rem; font-weight: 700; margin: 14px 16px 4px; }
.watch .meta { font-size: .85rem; color: var(--mute); margin: 0 16px; }
.watch .desc { margin: 12px 16px 0; max-width: 70ch; }
.watch h2 { font-size: 1.05rem; font-weight: 600; margin: 0 16px 14px; }

/* ---------- تسجيل الدخول ---------- */
.auth { max-width: 380px; margin-inline: auto; padding: 32px 20px; }
.auth h1 { font-size: 1.3rem; margin-bottom: 8px; }
.auth .note { color: var(--mute); margin-bottom: 20px; }
.auth fieldset { border: 0; padding: 0; display: grid; gap: 14px; min-width: 0; }
.auth label { display: grid; gap: 6px; font-size: .9rem; }
.auth input { height: 44px; padding: 0 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); }
.auth button { height: 44px; border: 0; border-radius: 999px; background: var(--accent); color: var(--accent-ink); font-weight: 600; }
.auth fieldset:disabled { opacity: .55; }

@media (min-width: 600px) {
  .main { padding-inline: 16px; }
  .grid { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 38px 16px; }
  .thumb, .player { border-radius: 14px; overflow: hidden; }
  .card h3, .card p, .page-title, .watch .meta, .watch .desc, .watch h2, .watch article > h1, .empty-note { margin-inline: 2px; padding-inline: 0; }
  .page-title, .empty-note { padding-inline: 2px; }
}
@media (min-width: 900px) {
  .side { display: block; position: fixed; inset-block: var(--top) 0; inset-inline-start: 0; width: var(--side);
    padding: 12px; overflow-y: auto; border-inline-end: 1px solid var(--line); }
  .main { margin-inline-start: var(--side); padding-bottom: 32px; padding-inline: 24px; }
  .bottom { display: none; }
}
@media (min-width: 1200px) {
  .watch { grid-template-columns: minmax(0, 1fr) 360px; align-items: start; }
  .grid--side { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; scroll-behavior: auto !important; } }

/* ---------- صفحات الأقسام ---------- */
.groups { display: grid; gap: 10px; padding: 0 16px; max-width: 720px; }
.group { display: flex; align-items: center; gap: 14px; padding: 12px 14px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; }
a.group:hover { border-color: var(--accent); }
.group strong { display: block; font-weight: 600; }
.group small { display: block; color: var(--mute); font-size: .82rem; }
.group--row { justify-content: space-between; }
.avatar { display: grid; place-items: center; flex: none; width: 48px; height: 48px; border-radius: 50%; color: #fff; font-weight: 700;
  background: linear-gradient(135deg, hsl(var(--h) 60% 42%), hsl(calc(var(--h) + 40) 65% 30%)); }
.btn--sm { margin: 0; padding: 6px 16px; font-size: .9rem; }
.actions { margin: 14px 16px 0; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
/* أزرار صفحة الفيديو: أيقونات فقط (والإبلاغ أيقونة + كلمة) */
.ibtn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-width: 44px; height: 44px; padding: 0 12px; border-radius: 999px; cursor: pointer;
  border: 1px solid var(--line); background: var(--surface); color: var(--ink); font: inherit; font-size: .9rem; }
.ibtn:hover:not(:disabled) { border-color: var(--accent); }
.ibtn:disabled { cursor: default; opacity: .7; }
.ibtn--text { padding: 0 16px; }
.ibtn-count { font-size: .9rem; font-variant-numeric: tabular-nums; }
.ibtn.on { color: var(--accent); border-color: var(--accent); }
.ibtn.on svg { fill: currentColor; }
.report-form { flex: 1 1 100%; display: grid; gap: 12px; max-width: 460px; padding: 14px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.report-form .field input, .report-form .field select, .report-form .field textarea { background: var(--bg); }
.prose { max-width: 640px; padding: 8px 20px 24px; }
.prose h1 { font-size: 1.3rem; margin-bottom: 10px; }
.prose h2 { font-size: 1.05rem; margin: 24px 0 8px; }
.prose p { margin-bottom: 12px; }
.prose .groups { padding: 0; margin-bottom: 12px; }
.prose .bullets { list-style: disc; padding-inline-start: 22px; display: grid; gap: 4px; }
.prose .note { color: var(--mute); }
.auth-form { display: grid; gap: 14px; margin-top: 16px; }
.auth-form label { display: grid; gap: 6px; font-size: .9rem; }
.auth-form input, .auth-form textarea { padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); font: inherit; }
.auth-form button { height: 44px; border: 0; border-radius: 999px; background: var(--accent); color: var(--accent-ink); font-weight: 600; cursor: pointer; }
@media (min-width: 600px) { .groups, .actions { padding-inline: 2px; margin-inline: 2px; } .groups { margin-inline: 0; } }

/* ---------- الدخول عبر جوجل وإضافة الفيديو ---------- */
.auth--wide { max-width: 560px; }
.auth code { font-size: .85em; background: var(--surface); padding: 1px 6px; border-radius: 6px; }
.auth .gbtn { display: flex; align-items: center; justify-content: center; gap: 12px; width: 100%; height: 48px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--surface); color: var(--ink); font-weight: 600; cursor: pointer; }
.auth .gbtn:hover:not(:disabled) { border-color: var(--accent); }
.auth .gbtn:disabled { opacity: .6; cursor: default; }
.btn--ghost, .auth .btn--ghost, .auth-form .btn--ghost { background: none; color: var(--ink); border: 1px solid var(--line); font-weight: 400; }
.logout { display: grid; place-items: center; flex: none; width: 36px; height: 36px; padding: 0; border-radius: 50%; overflow: hidden;
  border: 1px solid var(--line); background: var(--surface); color: var(--ink); cursor: pointer; }
.logout img { width: 100%; height: 100%; object-fit: cover; }
.field { display: grid; gap: 6px; font-size: .9rem; }
.field input, .field select, .field textarea { width: 100%; min-height: 44px; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line);
  background: var(--surface); color: var(--ink); font: inherit; }
.field-error { color: #b3261e; font-size: .85rem; margin-top: 6px; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .field-error { color: #ff8a80; } }
:root[data-theme="dark"] .field-error { color: #ff8a80; }
.hint { color: var(--mute); font-size: .82rem; min-height: 1.2em; }
.addrow { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.addrow input { flex: 1; min-width: 140px; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.preview-thumb { position: relative; aspect-ratio: 16 / 9; border-radius: 12px; overflow: hidden; display: grid; place-items: center;
  background: var(--surface); border: 1px solid var(--line); color: var(--mute); font-size: .85rem; }
.preview-thumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.thumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.auth-form button:disabled { opacity: .55; cursor: default; }
.auth .addrow button, .auth-form .addrow button { height: auto; min-height: 40px; padding: 6px 16px; cursor: pointer; }
.auth .addrow .btn:not(.btn--ghost) { background: var(--accent); color: var(--accent-ink); border: 0; }

/* ---------- لوحة التحكم (/admin) ---------- */
.admin { max-width: 960px; margin-inline: auto; padding: 0 16px; }
.admin-note { padding: 32px 16px; max-width: 480px; margin-inline: auto; }
.admin-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 4px 0 12px; }
.admin-head h1 { font-size: 1.3rem; }
.tabs { display: flex; gap: 6px; overflow-x: auto; border-bottom: 1px solid var(--line); margin-bottom: 16px; }
.tab { flex: none; background: none; border: 0; border-bottom: 3px solid transparent; padding: 10px 14px; color: var(--mute); cursor: pointer; }
.tab.on { color: var(--accent); border-bottom-color: var(--accent); font-weight: 600; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 16px; margin-bottom: 20px; max-width: 640px; }
.panel h2 { font-size: 1.05rem; margin-top: 6px; }
.panel .hint { margin-top: -6px; }
.panel fieldset.links { border: 0; padding: 0; display: grid; gap: 8px; min-width: 0; }
.panel .links legend { font-size: .9rem; margin-bottom: 6px; }
.admin-search { margin-bottom: 12px; max-width: 420px; }
.alist { display: grid; gap: 10px; }
.arow { display: grid; grid-template-columns: 96px 1fr; gap: 10px 12px; align-items: start; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 10px; }
.arow-thumb { position: relative; aspect-ratio: 16 / 9; border-radius: 10px; overflow: hidden; background: var(--line); }
.arow-thumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.arow-info { display: grid; gap: 2px; min-width: 0; }
.arow-info strong { font-weight: 600; overflow-wrap: anywhere; }
.arow-info small { color: var(--mute); }
.arow-stats { display: flex; flex-wrap: wrap; gap: 4px 14px; color: var(--mute); font-size: .85rem; }
.arow-stats span { display: inline-flex; align-items: center; gap: 5px; }
.arow-stats b { color: var(--ink); font-weight: 600; font-variant-numeric: tabular-nums; }
.arow-info a:hover strong { color: var(--accent); }
.arow-actions { grid-column: 1 / -1; display: flex; flex-wrap: nowrap; gap: 6px; align-items: center; }
/* أزرار أيقونات متراصة في صف واحد */
.iconbtn { display: inline-grid; place-items: center; flex: none; width: 38px; height: 38px; padding: 0; margin: 0; border-radius: 10px; cursor: pointer;
  border: 1px solid var(--line); background: var(--surface); color: var(--ink); }
.iconbtn:hover:not(:disabled) { border-color: var(--accent); color: var(--accent); }
.iconbtn.on { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.iconbtn.on:hover:not(:disabled) { color: var(--accent-ink); }
.iconbtn:disabled { opacity: .5; cursor: default; }
.iconbtn.danger:hover:not(:disabled) { border-color: currentColor; color: inherit; }
.arow-form { grid-column: 1 / -1; margin-top: 0; }
.arow-form .btn { margin-top: 0; }
.badges { display: flex; gap: 6px; flex-wrap: wrap; }
.badge { font-weight: 500; font-size: .75rem; padding: 1px 10px; border-radius: 999px; background: var(--accent); color: var(--accent-ink); }
.badge--off { background: var(--line); color: var(--ink); }
.danger { color: #b3261e !important; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .danger { color: #ff8a80 !important; } }
:root[data-theme="dark"] .danger { color: #ff8a80 !important; }
.check { display: flex !important; grid-template-columns: none; align-items: center; gap: 10px; font-size: .9rem; }
.check input { width: 20px; height: 20px; min-height: 0; padding: 0; accent-color: var(--accent); }
.grid.grid--shorts { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; padding-inline: 16px; }
.grid--shorts .thumb { aspect-ratio: 9 / 16; }
@media (min-width: 700px) {
  .arow { grid-template-columns: 140px 1fr auto; }
  .arow-actions { grid-column: auto; }
}
@media (min-width: 900px) { .grid.grid--shorts { grid-template-columns: repeat(5, minmax(0, 1fr)); } }

/* ---------- الشعار ---------- */
.brand { display: inline-flex; align-items: center; gap: 8px; min-width: 0; }
.brand-logo { width: auto; max-width: 160px; object-fit: contain; display: block; }
.logo-box { display: grid; gap: 12px; }
.logo-preview { display: flex; align-items: center; gap: 8px; min-height: 56px; padding: 0 16px; background: var(--bg); border: 1px dashed var(--line); border-radius: 12px; }
.brand-prev { color: var(--accent); font-size: 1.35rem; font-weight: 700; }
.filebtn { cursor: pointer; margin: 0; }
.filebtn:focus-within { outline: 3px solid var(--focus); outline-offset: 2px; }
.field input[type="range"] { min-height: 0; padding: 0; accent-color: var(--accent); }

/* ---------- الفيديوهات المقترحة (قائمة مستقلة التمرير) ---------- */
.suggest-list { display: grid; gap: 12px; padding-inline: 16px; }
.sug { display: grid; grid-template-columns: 160px minmax(0, 1fr); gap: 10px; align-items: start; }
.sug-thumb { position: relative; aspect-ratio: 16 / 9; border-radius: 10px; overflow: hidden; background: var(--line); }
.sug-thumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.sug-info { display: grid; gap: 2px; min-width: 0; }
.sug-info strong { font-size: .92rem; font-weight: 600; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.sug-info small { color: var(--mute); font-size: .78rem; }
.sug:hover strong { color: var(--accent); }
.suggest-scroll:focus-visible { outline-offset: -3px; border-radius: 10px; }
@media (min-width: 600px) { .suggest-list { padding-inline: 2px; } }
@media (min-width: 1200px) {
  .suggest { position: sticky; top: calc(var(--top) + 12px); display: flex; flex-direction: column; max-height: calc(100dvh - var(--top) - 28px); }
  .suggest-scroll { overflow-y: auto; overscroll-behavior: contain; min-height: 0; }
}

/* ---------- تسجيل الدخول بالبريد ---------- */
.auth .or { display: flex; align-items: center; gap: 10px; color: var(--mute); font-size: .85rem; margin: 16px 0 0; }
.auth .or::before, .auth .or::after { content: ""; flex: 1; border-top: 1px solid var(--line); }
.auth .switch { display: grid; gap: 8px; margin-top: 16px; justify-items: start; }
.auth .linkbtn { background: none; color: var(--accent); height: auto; padding: 0; border-radius: 0; font-weight: 500; text-decoration: underline; cursor: pointer; }

/* ---------- اسم الموقع (لون/حجم/خط من الإعدادات) + تحصين الهيدر على الجوال ---------- */
.brand { --bc: var(--brand-l, var(--accent)); color: var(--bc); line-height: 1.2; flex: 0 1 auto; min-width: 0; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .brand { --bc: var(--brand-d, var(--accent)); } }
:root[data-theme="dark"] .brand { --bc: var(--brand-d, var(--accent)); }
.brand-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.search { min-width: 0; }
.login, .logout { flex: none; }
.login--icon { display: grid; place-items: center; width: 36px; height: 36px; padding: 0; border-radius: 50%; }
html, body { overflow-x: clip; }
.colorrow { display: flex; align-items: center; gap: 8px; }
.field .colorrow input[type="color"] { width: 56px; min-height: 44px; padding: 4px; cursor: pointer; }
@media (max-width: 480px) {
  .top { gap: 8px; padding-inline: 10px; }
  .login { padding: 8px 12px; font-size: .82rem; }
  .login--icon { padding: 0; }
  .search { padding: 0 10px; gap: 6px; }
  .brand-logo { max-width: 110px; }
}

/* ---------- بحث الهيدر على الجوال: أيقونة تتوسّع عند الضغط ---------- */
.search-ico { display: flex; align-items: center; justify-content: center; cursor: pointer; }
@media (max-width: 600px) {
  .brand { flex: 1 1 auto; }
  .search { flex: none; width: 40px; padding: 0; justify-content: center; margin-inline: 0; }
  .search input { flex: none; width: 0; padding: 0; }
  .search-ico { width: 40px; height: 40px; }
  .search:focus-within { position: fixed; z-index: 40; inset-inline: 10px; top: calc(env(safe-area-inset-top, 0px) + 8px);
    width: auto; padding: 0 4px; justify-content: flex-start; background: var(--surface); outline: 3px solid var(--focus); }
  .search:focus-within input { flex: 1; width: auto; padding: 0 6px; }
}

/* مشغّل درايف على الجوال بنسبة 16:9 مثل يوتيوب تمامًا: كان له ارتفاع أدنى 340px فيظهر فراغ أسود أعلى الفيديو وأسفله.
   أزراره لا تُقصّ لأن الإطار يُرسم أكبر ثم يُصغَّر بـ --dz (انظر أدناه). إن بدت الأزرار ضيقة قلّل --dz قليلًا. */

/* تصغير واجهة مشغّل درايف على الجوال: نُظهر الإطار بعرض أكبر ثم نصغّره بـ scale، فيرسم درايف أزراره بحجم مناسب
   بدل الأزرار الضخمة المتراكبة. لتصغير الأزرار أكثر قلّل --dz (مثلًا .65)، ولتكبيرها زِده (حتى 1 = بلا تصغير). */
@media (max-width: 599px) {
  .player--frame { --dz: .8; overflow: hidden; }
  .player--frame iframe[src*="drive.google.com"] {
    inset: 0 auto auto 0; width: calc(100% / var(--dz)); height: calc(100% / var(--dz));
    transform: scale(var(--dz)); transform-origin: 0 0;
  }
  .mp--mini .player--frame iframe[src*="drive.google.com"] { inset: 0; width: 100%; height: 100%; transform: none; }
}

/* ---------- تبويب المظهر ---------- */
.panel--wide { max-width: 760px; }
.pv-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.pv { display: grid; gap: 10px; padding: 12px; border: 1px solid; border-radius: 14px; line-height: 1.5; }
.pv-bar { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding-bottom: 8px; border-bottom: 1px solid; }
.pv-card { display: grid; gap: 4px; justify-items: start; padding: 10px; border: 1px solid; border-radius: 12px; }
.pv-card h4 { font-size: 1em; font-weight: 600; }
.pv-card p { font-size: .82em; }
.pv-pill { display: inline-block; padding: 3px 12px; border-radius: 999px; font-size: .8em; }
.pv-label { text-align: center; }
.cset { border: 1px solid var(--line); border-radius: 12px; padding: 12px; display: grid; gap: 10px; min-width: 0; }
.cset legend { padding-inline: 6px; font-weight: 600; font-size: .95rem; }
.cgrid { display: grid; grid-template-columns: 1fr; gap: 10px 16px; }
.crow label { display: grid; gap: 0; }
.crow .hint { min-height: 0; margin: 0; }
.colorrow code { font-size: .8rem; color: var(--mute); min-width: 4.5em; }
.warn { color: #8a5200; font-size: .85rem; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .warn { color: #f2b035; } }
:root[data-theme="dark"] .warn { color: #f2b035; }
@media (min-width: 600px) { .cgrid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 420px) { .pv-row { grid-template-columns: 1fr; } }

/* ---------- إدارة التصنيفات والمجموعات ---------- */
.nlist { max-width: none; width: 100%; }
.nrow { min-height: 68px; display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px 12px; padding: 10px 14px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; }
.nrow-info { display: grid; min-width: 0; }
.nrow-info strong { font-weight: 600; overflow-wrap: anywhere; }
.nrow-info small { color: var(--mute); }
.nrow-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.nrow-actions .btn { min-width: 84px; justify-content: center; text-align: center; }
.nrow-edit { flex: 1; min-width: 0; }
.nrow .btn { margin-top: 0; }

/* ---------- تعديل الفيديو من صفحة عرضه + حقلا الإعلان والمقدمة ---------- */
.watch-admin { display: grid; gap: 10px; margin: 14px 16px 0; justify-items: start; }
.watch-admin .btn { margin-top: 0; display: inline-flex; align-items: center; gap: 6px; }
.watch-edit { width: 100%; justify-self: stretch; }
.watch .watch-edit h2 { margin: 0 0 10px; }

/* ---------- ترتيب حلقات المجموعة ---------- */
.nrow-order { flex: 1 1 100%; }
.sorder { display: grid; gap: 10px; margin-top: 4px; }
.sorder h3 { margin: 0; font-size: 1rem; }
.sorder .addrow .btn { margin-top: 0; }
.sorder-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; max-height: 70vh; overflow-y: auto; }
.sorder-row { display: flex; align-items: center; gap: 10px; padding: 8px 10px; background: var(--bg); border: 1px solid var(--line); border-radius: 12px; cursor: grab; }
.sorder-row.is-drag { opacity: .45; }
.sorder-row.is-over { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent) inset; }
.sorder-n { flex: none; min-width: 2ch; text-align: center; color: var(--mute); font-variant-numeric: tabular-nums; }
.sorder-title { display: grid; min-width: 0; flex: 1; }
.sorder-title strong { font-weight: 600; overflow-wrap: anywhere; }
.sorder-title small { color: var(--mute); }
.sorder-btns { display: flex; gap: 6px; flex: none; }
.sorder-btns .btn { margin-top: 0; min-width: 40px; }

/* ---------- لقطة الفيديو العشوائية ---------- */
.preview-busy { position: absolute; inset-inline: 0; bottom: 0; padding: 6px 10px; text-align: center; font-size: .8rem; color: #fff; background: rgba(0,0,0,.62); }
.preview--short { max-width: 180px; }
.preview--short .preview-thumb { aspect-ratio: 9 / 16; }
.thumbedit-img { max-width: 240px; }

/* ---------- البث المباشر (لوحة التحكم + صفحة /live) والبلاغات ---------- */
.report-row { grid-template-columns: 1fr; }
.desc-note { color: var(--ink); font-size: .9rem; overflow-wrap: anywhere; margin-top: 4px; }
.live-admin { max-width: 760px; display: grid; gap: 14px; }
.live-total { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; text-align: center; }
.live-total > div { background: var(--bg); border: 1px solid var(--line); border-radius: 12px; padding: 10px 6px; }
.live-total small { display: block; color: var(--mute); font-size: .8rem; }
.live-total strong { font-size: 1.25rem; font-variant-numeric: tabular-nums; }
.live-on { color: #d93025; }
.live-list { display: grid; gap: 8px; list-style: none; padding: 0; }
.live-row { display: grid; grid-template-columns: 24px 88px 1fr; gap: 8px 10px; align-items: center; border: 1px solid var(--line); border-radius: 12px; padding: 8px; background: var(--bg); }
.live-n { color: var(--mute); text-align: center; font-variant-numeric: tabular-nums; }
.live-btns { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.live-btns .ibtn { min-width: 40px; height: 40px; padding: 0 8px; }
.live-picker { border: 1px solid var(--line); border-radius: 12px; padding: 12px; display: grid; gap: 10px; background: var(--bg); }
.live-pick-list { max-height: 360px; overflow: auto; list-style: none; padding: 0; }
.live-pick { display: grid; grid-template-columns: 88px 1fr; gap: 10px; align-items: center; width: 100%; text-align: start; padding: 6px; cursor: pointer;
  border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--ink); font: inherit; }
.live-pick:hover { border-color: var(--accent); }
@media (min-width: 560px) { .live-row { grid-template-columns: 24px 88px 1fr auto; } .live-btns { grid-column: auto; } }
.live-view { text-align: start; max-width: 960px; margin-inline: auto; display: grid; gap: 8px; }
.live-badge { color: #d93025; font-weight: 700; }
.live-now { font-size: 1.15rem; margin-top: 6px; }
.live-view .live-meta { color: var(--mute); font-size: .88rem; margin-top: 0; }
.live-h { font-size: 1rem; margin-top: 14px; }
.live-queue { list-style: none; padding: 0; display: grid; gap: 6px; }
.live-queue li { display: flex; justify-content: space-between; gap: 10px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
.live-queue li.on { border-color: var(--accent); color: var(--accent); font-weight: 600; }
.live-queue small { color: var(--mute); font-variant-numeric: tabular-nums; }

/* ---------- تخصيص القائمة ---------- */
.menu-admin { max-width: 560px; display: grid; gap: 10px; }
.menu-list { list-style: none; padding: 0; display: grid; gap: 10px; }
.menu-row { display: grid; gap: 4px; }
.menu-row .addrow input { flex: 1; min-width: 120px; min-height: 44px; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--bg); color: var(--ink); font: inherit; }
.icon-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(48px, 1fr)); gap: 6px; padding: 10px; border: 1px solid var(--line); border-radius: 12px; background: var(--bg); }

/* ---------- استيراد مجلد ---------- */
.import-list { max-height: 420px; overflow: auto; list-style: none; padding: 0; }
.import-row { display: grid; grid-template-columns: 24px 1fr; gap: 10px; align-items: start; border: 1px solid var(--line); border-radius: 12px; padding: 8px 10px; background: var(--surface); }
.import-row input[type="checkbox"] { width: 20px; height: 20px; margin-top: 10px; accent-color: var(--accent); }
.import-row .arow-info input { width: 100%; min-height: 40px; padding: 8px 10px; border-radius: 10px; border: 1px solid var(--line); background: var(--bg); color: var(--ink); font: inherit; }

/* ---------- الأعضاء، الحساب، الصور الرمزية، اقتراح كلمة المرور، السجل ---------- */
.menu-row .ibtn.on svg { fill: none; }
.linkbtn--sm { font-size: .82rem; justify-self: start; }
.auth-form .linkbtn { background: none; color: var(--accent); height: auto; padding: 0; border-radius: 0; font-weight: 500; text-decoration: underline; cursor: pointer; }
.pw-suggest { display: grid; gap: 8px; padding: 12px; border: 1px dashed var(--accent); border-radius: 12px; background: var(--surface); }
.pw-suggest p { margin: 0; font-size: .9rem; }
.pw-suggest code { font-size: 1.05rem; letter-spacing: .04em; overflow-wrap: anywhere; user-select: all; background: var(--bg); padding: 8px 10px; border-radius: 8px; text-align: start; }
.pw-used .linkbtn { display: inline; }
.account { display: grid; gap: 24px; }
.account h2 { font-size: 1.05rem; margin-bottom: 10px; }
.account-head { display: flex; align-items: center; gap: 14px; }
.account-head small { color: var(--mute); }
.avatar-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(56px, 1fr)); gap: 8px; }
.auth .avatar-opt { height: auto; width: auto; padding: 4px; border-radius: 50%; background: none; border: 2px solid transparent; cursor: pointer; justify-self: center; }
.auth .avatar-opt:hover:not(:disabled) { border-color: var(--line); }
.auth .avatar-opt.on { border-color: var(--accent); box-shadow: 0 0 0 2px var(--bg) inset; }
.auth .avatar-opt:disabled { opacity: .6; cursor: default; }
.account .addrow input { flex: 1; min-width: 140px; min-height: 44px; padding: 8px 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); font: inherit; }
.member-row { grid-template-columns: 44px minmax(0, 1fr); }
.member-row .perm { color: var(--mute); font-size: .78rem; }
.member-row select { min-height: 40px; padding: 4px 10px; border-radius: 12px; border: 1px solid var(--line); background: var(--bg); color: var(--ink); font: inherit; }
.badge--ban { background: #b3261e; color: #fff; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
@media (min-width: 700px) { .member-row { grid-template-columns: 44px minmax(0, 1fr) auto; } }
.history-bar { padding-inline: 16px; margin-bottom: 12px; }
.history-meta { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 6px 14px 0; color: var(--mute); }
.history-meta .ibtn { min-width: 36px; height: 36px; padding: 0 8px; }
@media (min-width: 600px) { .history-bar { padding-inline: 2px; } .history-meta { margin-inline: 2px; } }

/* ---------- شريط التصنيفات في الرئيسية ---------- */
.chips { position: sticky; top: calc(var(--top) + env(safe-area-inset-top, 0px)); z-index: 10; display: flex; gap: 8px; overflow-x: auto; padding: 8px 16px 12px;
  margin-bottom: 8px; background: var(--bg); scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
/* سحب يمينًا وشمالًا: لمس أصلي على الجوال (pan-x يسمح بالتمرير الأفقي والرأسي معًا) وسحب بالفأرة على الحاسوب. */
.chips { -webkit-overflow-scrolling: touch; overscroll-behavior-x: contain; touch-action: pan-x pan-y; }
.chips.dragging { cursor: grabbing; user-select: none; -webkit-user-select: none; scroll-behavior: auto; }
.chips.dragging .chip { pointer-events: none; }
@media (hover: hover) and (pointer: fine) { .chips { cursor: grab; } }
.chip { flex: none; height: 36px; padding: 0 14px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); cursor: pointer; white-space: nowrap; }
.chip:hover { border-color: var(--accent); }
.chip.on { background: var(--ink); color: var(--bg); border-color: var(--ink); font-weight: 600; }
@media (min-width: 600px) { .chips { padding-inline: 2px; } }

/* ---------- شاشة الشعار عند فتح الرئيسية ---------- */
/* شاشة الشعار: خلفية (.splash) ← خروج (.splash-exit) ← دخول (.splash-brand) ← حركة مستمرة (.splash-motion). المدة الكلية --sp-total. */
.splash { --sp-out: .4s; position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; background: var(--bg); animation: splash-out var(--sp-out) ease calc(var(--sp-total, 1.3s) - var(--sp-out)) forwards; }
.splash[data-out="none"] { animation: splash-hide 0s linear var(--sp-total, 1.3s) forwards; }
.splash--box { position: absolute; z-index: 1; border-radius: inherit; }
.splash-exit { display: grid; place-items: center; }
.splash[data-out="zoom"] .splash-exit { animation: splash-exit-zoom var(--sp-out) ease calc(var(--sp-total, 1.3s) - var(--sp-out)) forwards; }
.splash[data-out="up"] .splash-exit { animation: splash-exit-up var(--sp-out) ease calc(var(--sp-total, 1.3s) - var(--sp-out)) forwards; }
.splash-brand { display: flex; flex-direction: column; align-items: center; gap: 14px; text-align: center; animation: splash-in-fade .6s ease both; }
.splash-brand[data-in="zoom"] { animation-name: splash-in-zoom; }
.splash-brand[data-in="up"] { animation-name: splash-in-up; }
.splash-brand[data-in="down"] { animation-name: splash-in-down; }
.splash-brand[data-in="bounce"] { animation: splash-in-bounce .9s cubic-bezier(.3,1.4,.5,1) both; }
.splash-brand[data-in="blur"] { animation-name: splash-in-blur; animation-duration: .8s; }
.splash-motion { display: grid; place-items: center; }
.splash-motion[data-motion="pulse"] { animation: splash-pulse 1.2s ease-in-out infinite; }
.splash-motion[data-motion="float"] { animation: splash-float 1.8s ease-in-out infinite; }
.splash-motion[data-motion="glow"] { animation: splash-glow 1.4s ease-in-out infinite; }
.splash-motion[data-motion="spin"] { animation: splash-spin 6s linear infinite; }
.splash .brand-logo { width: auto; max-width: 70vw; max-height: 40vh; object-fit: contain; }
.splash--box .brand-logo { max-width: 60%; max-height: 70%; }
@keyframes splash-in-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes splash-in-zoom { from { opacity: 0; transform: scale(.55); } to { opacity: 1; transform: none; } }
@keyframes splash-in-up { from { opacity: 0; transform: translateY(48px); } to { opacity: 1; transform: none; } }
@keyframes splash-in-down { from { opacity: 0; transform: translateY(-48px); } to { opacity: 1; transform: none; } }
@keyframes splash-in-bounce { 0% { opacity: 0; transform: scale(.3); } 55% { opacity: 1; transform: scale(1.12); } 75% { transform: scale(.95); } 100% { transform: none; } }
@keyframes splash-in-blur { from { opacity: 0; filter: blur(18px); transform: scale(1.08); } to { opacity: 1; filter: none; transform: none; } }
@keyframes splash-pulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.08); } }
@keyframes splash-float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
@keyframes splash-glow { 0%, 100% { filter: drop-shadow(0 0 0 transparent); } 50% { filter: drop-shadow(0 0 16px var(--accent)); } }
@keyframes splash-spin { to { transform: rotate(360deg); } }
@keyframes splash-exit-zoom { to { transform: scale(1.35); } }
@keyframes splash-exit-up { to { transform: translateY(-60px); } }
@keyframes splash-out { to { opacity: 0; visibility: hidden; } }
@keyframes splash-hide { to { opacity: 0; visibility: hidden; } }
.splash-box { position: relative; height: 200px; overflow: hidden; border: 1px solid var(--line); border-radius: 14px; background: var(--bg); }
.splash-box .splash { position: absolute; }

/* ---------- طيّ القائمة الجانبية (الشاشات الكبيرة) ---------- */
.side-toggle { display: none; }
.acct-m { display: grid; }
@media (min-width: 900px) {
  .side-toggle { display: grid; place-items: center; flex: none; width: 40px; height: 40px; padding: 0; border: 0; border-radius: 50%; background: none; color: var(--ink); cursor: pointer; }
  .side-toggle:hover { background: var(--surface); }
  html[data-side="mini"] { --side: 80px; }
  html[data-side="mini"] .side { padding-inline: 6px; overflow-x: hidden; }
  html[data-side="mini"] .side .navlink { flex-direction: column; justify-content: center; gap: 4px; padding: 10px 2px; font-size: .68rem; line-height: 1.25; text-align: center; overflow-wrap: anywhere; }
  html[data-side="mini"] .side .side-more { display: block; }
}

/* ---------- نافذة الشخص: تسجيل جديد / دخول (+ القسم الثاني من القائمة على الجوال) ---------- */
.acct-layer { position: fixed; inset: 0; z-index: 60; }
.acct-backdrop { position: absolute; inset: 0; background: rgba(0, 0, 0, .4); }
.acct-menu { position: absolute; inset-inline: 0; top: calc(var(--top) + env(safe-area-inset-top, 0px)); max-height: calc(100dvh - var(--top) - env(safe-area-inset-top, 0px));
  overflow-y: auto; padding: 16px; background: var(--bg); border-bottom: 1px solid var(--line); border-radius: 0 0 18px 18px; box-shadow: 0 12px 32px rgba(0, 0, 0, .25); }
.acct-close { position: absolute; inset-block-start: 8px; inset-inline-end: 8px; display: grid; place-items: center; width: 36px; height: 36px; padding: 0; border: 0; border-radius: 50%;
  background: none; color: var(--mute); cursor: pointer; }
.acct-close:hover { background: var(--surface); color: var(--ink); }
.acct-title { font-weight: 600; margin-bottom: 12px; padding-inline-end: 40px; }
.acct-actions { display: grid; gap: 10px; }
.acct-menu > .acct-actions:first-child { padding-inline-end: 44px; }
.acct-btn { display: flex; align-items: center; justify-content: center; height: 46px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); font-weight: 600; }
.acct-btn:hover { border-color: var(--accent); }
.acct-btn--primary { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.acct-more hr { border: 0; border-top: 1px solid var(--line); margin: 14px 0 8px; }
@media (min-width: 900px) {
  .acct-backdrop { background: transparent; }
  .acct-menu { inset-inline: auto; inset-inline-end: 16px; top: calc(var(--top) + 6px); width: 300px; border: 1px solid var(--line); border-radius: 16px; }
  .acct-more { display: none; }
}

/* ---------- لوحة التحكم: تبويبات رئيسية وفرعية ---------- */
.tabs--main .tab { font-size: 1.02rem; font-weight: 600; padding: 12px 18px; }
.tabs--sub { gap: 8px; border-bottom: 0; margin-bottom: 18px; }
.tabs--sub .tab { border: 1px solid var(--line); border-radius: 999px; padding: 6px 14px; font-size: .92rem; background: var(--surface); }
.tabs--sub .tab.on { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.admin-stack { display: grid; gap: 20px; }

/* ---------- محرّر أزرار صفحة الفيديو ---------- */
.wb-list { list-style: none; padding: 0; display: grid; gap: 10px; }
.wb-row { display: grid; gap: 8px; padding: 10px; border: 1px solid var(--line); border-radius: 14px; background: var(--bg); }
.wb-row .addrow input { flex: 1; min-width: 120px; min-height: 44px; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); font: inherit; }
.wb-name { flex: 1; min-width: 100px; font-weight: 600; }
.wb-row.off .wb-name { color: var(--mute); text-decoration: line-through; }

/* ---------- مجموعاتي: صورة أبرز فيديو + تحرير ---------- */
.series-tools { padding: 0 16px 12px; }
@media (min-width: 600px) { .series-tools { padding-inline: 2px; } }
/* بطاقة المجموعة على طراز قائمة التشغيل في يوتيوب */
.pl { position: relative; padding-top: 12px; }
.pl::before, .pl::after { content: ""; position: absolute; height: 12px; border-radius: 10px 10px 0 0; background: color-mix(in srgb, var(--mute) 38%, var(--bg)); }
.pl::before { top: 0; inset-inline: 12%; opacity: .55; }
.pl::after { top: 6px; inset-inline: 6%; opacity: .85; }
.pl .thumb { position: relative; z-index: 1; border-radius: 12px; overflow: hidden; box-shadow: 0 0 0 2px var(--bg); }
.pl-count { position: absolute; inset-block: 0; inset-inline-end: 0; width: 36%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; background: rgba(0,0,0,.72); color: #fff; backdrop-filter: blur(3px); }
.pl-count strong { font-size: 1.25rem; font-weight: 600; line-height: 1; }
.pl-hover { position: absolute; inset-block: 0; inset-inline-start: 0; width: 64%; display: flex; align-items: center; justify-content: center; gap: 6px; background: rgba(0,0,0,.55); color: #fff; font-weight: 600; font-size: .9rem; opacity: 0; transition: opacity .15s; }
.card--pl:hover .pl-hover, .card--pl:focus-visible .pl-hover { opacity: 1; }
.card--pl .pl-link { font-weight: 600; margin-top: 4px; }
.card--pl:hover .pl-link { color: var(--accent); }
@media (hover: none) { .pl-hover { display: none; } }
.series-letter { position: absolute; inset: 0; display: grid; place-items: center; font-size: 3rem; font-weight: 700; color: #fff; }
.nrow-lead { display: flex; align-items: center; gap: 12px; min-width: 0; flex: 1 1 220px; }
.nrow-thumb { flex: none; width: 80px; height: 45px; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 8px; background: var(--line); display: block; }
.nrow-cover { flex: 1 1 100%; }

/* ---------- لون العرض (تلقائي / فاتح / داكن) داخل نافذة الشخص ---------- */
.acct-mode { margin-top: 14px; }
.acct-mode > span { display: block; font-size: .82rem; color: var(--mute); margin-bottom: 6px; }
.seg { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; padding: 4px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); }
.seg button { display: flex; align-items: center; justify-content: center; gap: 6px; height: 36px; border: 0; border-radius: 999px; background: none; color: var(--mute); font-size: .85rem; cursor: pointer; }
.seg button[aria-checked="true"] { background: var(--accent); color: var(--accent-ink); font-weight: 600; }

/* ---------- المقاطع القصيرة: تمرير عمودي كشورتس يوتيوب ---------- */
.main:has(.shorts-feed) { padding: 0; }
.shorts-wrap { position: relative; }
.shorts-feed {
  --feed-h: calc(100dvh - var(--top) - var(--nav-h) - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px));
  position: relative; height: var(--feed-h); overflow-y: auto; scroll-snap-type: y mandatory; overscroll-behavior-y: contain;
  scrollbar-width: none; background: #000;
}
.shorts-feed::-webkit-scrollbar { display: none; }
@media (min-width: 900px) { .shorts-feed { --feed-h: calc(100dvh - var(--top) - env(safe-area-inset-top, 0px)); background: var(--bg); } }
.short-slide { position: relative; height: var(--feed-h); scroll-snap-align: start; scroll-snap-stop: always; display: grid; place-items: center; }
.short-frame { position: relative; height: 100%; width: 100%; max-width: calc(var(--feed-h) * 9 / 16); background: #000; overflow: hidden; }
@media (min-width: 900px) { .short-frame { height: calc(100% - 24px); border-radius: 16px; } }
.short-frame iframe, .short-frame > img { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; object-fit: cover; }
.short-frame > img { opacity: .55; }
/* طبقة شفافة تلتقط السحب فوق مشغّل درايف (الإطار يبتلع اللمس)، وتترك شريط التحكم السفلي للمشغّل */
.short-swipe { position: absolute; inset: 0 0 64px 0; z-index: 2; touch-action: pan-y; }
.short-info { position: absolute; inset-inline: 0; top: 0; z-index: 3; padding: 12px 14px 28px; color: #fff; pointer-events: none;
  background: linear-gradient(to bottom, rgba(0,0,0,.65), transparent); }
.short-info h2 { font-size: .98rem; font-weight: 600; margin: 0; text-shadow: 0 1px 3px rgba(0,0,0,.6); }
.short-info small { opacity: .85; }
.short-nav { position: absolute; inset-inline-end: 12px; top: 50%; transform: translateY(-50%); z-index: 4; display: none; flex-direction: column; gap: 10px; }
@media (min-width: 900px) { .short-nav { display: flex; inset-inline-end: 24px; } }
.short-nav button { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line); background: var(--surface); color: var(--ink); cursor: pointer; }
.short-nav button:disabled { opacity: .4; cursor: default; }
.short-open { position: absolute; inset-inline-start: 12px; bottom: 76px; z-index: 4; padding: 6px 12px; border-radius: 999px; background: rgba(0,0,0,.55); color: #fff; font-size: .8rem; }
.shorts-empty { padding: 32px 16px; }

/* تحديد الفيديوهات للتعديل الجماعي */
.arow-pick { position: absolute; inset-block-start: 6px; inset-inline-start: 6px; z-index: 2; width: 22px; height: 22px; accent-color: var(--accent); cursor: pointer; }
.bulk-bar { display: grid; gap: 10px; margin-bottom: 14px; }

/* ---------- مشغّل البث المباشر (بلا إيقاف) ---------- */
.live-player, .live-frame { position: relative; background: #000; border-radius: 14px; overflow: hidden; }
.live-player video { display: block; width: 100%; aspect-ratio: 16 / 9; background: #000; pointer-events: none; }
.live-shield { position: absolute; inset: 0; z-index: 2; background: transparent; }
.live-bar { position: absolute; inset-inline: 0; bottom: 0; z-index: 3; display: flex; align-items: center; gap: 10px; padding: 10px 12px;
  background: linear-gradient(transparent, rgba(0,0,0,.75)); color: #fff; }
.live-ibtn { background: none; border: 0; color: #fff; font-size: 1.25rem; cursor: pointer; min-width: 40px; height: 40px; border-radius: 10px; }
.live-ibtn:hover { background: rgba(255,255,255,.18); }
.live-vol { width: min(160px, 38%); accent-color: var(--accent); }
.live-pill { margin-inline-start: auto; font-size: .8rem; font-weight: 700; color: #ff5a4d; }
.live-unmute { position: absolute; z-index: 3; inset-inline: 0; margin-inline: auto; top: 50%; transform: translateY(-50%); width: max-content; max-width: 90%;
  background: rgba(0,0,0,.75); color: #fff; border: 1px solid rgba(255,255,255,.4); border-radius: 999px; padding: 12px 22px; font-size: 1rem; cursor: pointer; }

/* ---------- فقاعة تثبيت التطبيق (مكانها من إعدادات الموقع) ---------- */
.install { position: fixed; z-index: 60; inset-inline: 12px; max-width: 420px; margin-inline: auto;
  background: var(--surface); color: var(--ink); border: 1px solid var(--line); border-radius: 18px; padding: 14px; display: grid; gap: 10px;
  box-shadow: 0 12px 36px rgba(0,0,0,.28); animation: install-in .35s ease-out; }
/* الجوال */
.install--m-bottom { bottom: calc(var(--nav-h) + 12px + env(safe-area-inset-bottom, 0px)); }
.install--m-top { top: calc(var(--top) + env(safe-area-inset-top, 0px) + 10px); }
.install--m-center { top: 50%; translate: 0 -50%; }
/* الكمبيوتر */
@media (min-width: 900px) {
  .install { inset-inline: auto; margin: 0; width: 400px; top: auto; bottom: auto; translate: none; }
  .install--d-bottom-end { bottom: 20px; inset-inline-end: 20px; }
  .install--d-bottom-start { bottom: 20px; inset-inline-start: 20px; }
  .install--d-bottom-center { bottom: 20px; inset-inline-start: 50%; translate: -50% 0; }
  :root[dir="rtl"] .install--d-bottom-center, :root[dir="rtl"] .install--d-top-center { translate: 50% 0; }
  .install--d-top-end { top: calc(var(--top) + 14px); inset-inline-end: 20px; }
  .install--d-top-start { top: calc(var(--top) + 14px); inset-inline-start: 20px; }
  .install--d-top-center { top: calc(var(--top) + 14px); inset-inline-start: 50%; translate: -50% 0; }
  .install--d-center { top: 50%; inset-inline-start: 50%; translate: -50% -50%; }
  :root[dir="rtl"] .install--d-center { translate: 50% -50%; }
}
/* معاينة لوحة التحكم */
.install--preview { position: static; inset: auto; translate: none; margin: 0; width: min(100%, 400px); animation: none; }
.install-head { display: flex; align-items: center; gap: 12px; }
.install-head img { width: 48px; height: 48px; border-radius: 12px; flex: none; }
.install-head strong { display: block; }
.install-head small { color: var(--mute); }
.install-x { margin-inline-start: auto; background: none; border: 0; color: var(--mute); font-size: 1.3rem; cursor: pointer; width: 36px; height: 36px; border-radius: 10px; }
.install .btn { margin: 0; width: 100%; font-weight: 700; }
.install-steps { font-size: .9rem; color: var(--mute); line-height: 1.8; }
@keyframes install-in { from { transform: translateY(18px) scale(.97); opacity: 0; } to { transform: none; opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .install { animation: none; } }

/* ---------- ظل التحميل (هياكل) ---------- */
.skel { position: relative; overflow: hidden; background: var(--line); border-radius: 10px; }
.skel::after { content: ""; position: absolute; inset: 0; transform: translateX(-100%);
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.35), transparent); animation: skel-sweep 1.4s infinite; }
:root[data-theme="dark"] .skel::after { background: linear-gradient(90deg, transparent, rgba(255,255,255,.08), transparent); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .skel::after { background: linear-gradient(90deg, transparent, rgba(255,255,255,.08), transparent); } }
@keyframes skel-sweep { to { transform: translateX(100%); } }
@media (prefers-reduced-motion: reduce) { .skel::after { animation: none; } }
.skel-card .thumb.skel { background: var(--line); border-radius: 14px; }
.skel-card .skel-line { margin: 10px 14px 0; }
.skel-line { height: 14px; width: 80%; }
.skel-line--s { width: 45%; height: 11px; margin-top: 8px; }
.skel-line--title { height: 22px; width: 70%; margin-top: 14px; }
.skel-player { aspect-ratio: 16 / 9; border-radius: 14px; }
.skel-row { height: 64px; border-radius: 14px; }
.skel-short { width: min(360px, 90%); aspect-ratio: 9 / 16; max-height: 70dvh; border-radius: 18px; margin-inline: auto; }
.grid-end { height: 1px; }
.seg button { color: var(--mute); }

/* ---------- ترقيم صفحات لوحة التحكم ---------- */
.pager { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 6px; margin: 20px 0 6px; }
.pager-btn { min-width: 40px; height: 40px; padding: 0 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--ink); font-size: 1rem; cursor: pointer; }
.pager-btn:hover:not(:disabled) { border-color: var(--accent); }
.pager-btn.on { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); font-weight: 700; }
.pager-btn:disabled { opacity: .4; cursor: default; }
.pager-gap { color: var(--mute); padding: 0 4px; }
.pager-info { text-align: center; }

.appicon-prev { width: 64px; height: 64px; border-radius: 14px; object-fit: cover; border: 1px solid var(--line); background: var(--surface); }

/* ---------- شاشة «جاري التشغيل» فوق المشغّل ---------- */
.playload { position: absolute; inset: 0; z-index: 6; display: grid; place-content: center; justify-items: center; gap: 10px; padding: 12px; text-align: center;
  background: radial-gradient(circle at 50% 42%, color-mix(in srgb, var(--accent) 38%, #0c141b) 0%, #070b10 72%); color: #fff;
  transition: opacity .4s ease; container-type: size; }
.playload--out { opacity: 0; pointer-events: none; }
.pl-stage { --sz: clamp(84px, 38cqmin, 170px); position: relative; display: grid; place-items: center; width: var(--sz); aspect-ratio: 1; }
.pl-logo { position: relative; z-index: 2; width: 62%; height: 62%; display: grid; place-items: center; animation: pl-bounce 1.15s cubic-bezier(.45, 0, .55, 1) infinite; filter: drop-shadow(0 8px 14px rgba(0,0,0,.45)); }
.pl-logo img { max-width: 100%; max-height: 100%; object-fit: contain; }
.pl-fallback { display: grid; place-items: center; width: 100%; height: 100%; border-radius: 50%; background: var(--accent); color: var(--accent-ink); }
.pl-ring { position: absolute; inset: 14%; border-radius: 50%; border: 2px solid color-mix(in srgb, var(--accent) 80%, #fff); opacity: 0; animation: pl-ping 1.8s ease-out infinite; }
.pl-orbit { position: absolute; inset: 0; animation: pl-spin 5s linear infinite; }
.pl-orbit i { position: absolute; top: 50%; left: 50%; width: 9px; height: 9px; margin: -4.5px; border-radius: 50%; animation: pl-twinkle 1.2s ease-in-out infinite; }
.pl-orbit i:nth-child(1) { transform: rotate(0deg) translateY(calc(var(--sz) * -.58)); background: #ffd24a; }
.pl-orbit i:nth-child(2) { transform: rotate(60deg) translateY(calc(var(--sz) * -.58)); background: #ff7a6b; animation-delay: .2s; }
.pl-orbit i:nth-child(3) { transform: rotate(120deg) translateY(calc(var(--sz) * -.58)); background: #5ee0c0; animation-delay: .4s; }
.pl-orbit i:nth-child(4) { transform: rotate(180deg) translateY(calc(var(--sz) * -.58)); background: #7db7ff; animation-delay: .6s; }
.pl-orbit i:nth-child(5) { transform: rotate(240deg) translateY(calc(var(--sz) * -.58)); background: #c59bff; animation-delay: .8s; }
.pl-orbit i:nth-child(6) { transform: rotate(300deg) translateY(calc(var(--sz) * -.58)); background: #ffa6d8; animation-delay: 1s; }
.pl-name { font-weight: 700; font-size: 1rem; opacity: .95; }
.pl-text { font-family: var(--font-changa), var(--font-tajawal), sans-serif; font-weight: 700; font-size: clamp(1rem, 4.2cqmin, 1.45rem); letter-spacing: .01em; text-shadow: 0 2px 10px rgba(0,0,0,.5); }
.pl-dots i { font-style: normal; display: inline-block; animation: pl-dot 1.2s ease-in-out infinite; }
.pl-dots i:nth-child(2) { animation-delay: .15s; }
.pl-dots i:nth-child(3) { animation-delay: .3s; }
@keyframes pl-bounce { 0%, 100% { transform: translateY(6%) scale(.96, 1.03); } 50% { transform: translateY(-10%) scale(1.04, .98); } }
@keyframes pl-ping { 0% { transform: scale(.7); opacity: .75; } 100% { transform: scale(1.45); opacity: 0; } }
@keyframes pl-spin { to { transform: rotate(360deg); } }
@keyframes pl-twinkle { 0%, 100% { opacity: .35; scale: .7; } 50% { opacity: 1; scale: 1.25; } }
@keyframes pl-dot { 0%, 60%, 100% { transform: translateY(0); opacity: .5; } 30% { transform: translateY(-.28em); opacity: 1; } }
@media (prefers-reduced-motion: reduce) {
  .pl-logo, .pl-ring, .pl-orbit, .pl-orbit i, .pl-dots i { animation: none !important; }
  .pl-orbit i { opacity: .8; }
}
.live-frame--wait { aspect-ratio: 16 / 9; }
.short-frame .playload { z-index: 2; }

/* ---------- زجاجية الترويسة والقوائم والنوافذ ----------
   القيم تأتي من «إعدادات الموقع ← الزجاجية» عبر المتغيرات:
   --glass-a  شفافية الترويسة والشريط (نسبة لون الخلفية المتبقية)
   --glass-a2 شفافية القوائم والنوافذ
   --glass-b  قوة التمويه      --glass-s  تشبّع الألوان خلف الزجاج */
@supports ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) and (background: color-mix(in srgb, red 50%, transparent)) {
  .top, .bottom, .side { background: color-mix(in srgb, var(--bg) var(--glass-a, 52%), transparent); -webkit-backdrop-filter: blur(var(--glass-b, 19px)) saturate(var(--glass-s, 148%)); backdrop-filter: blur(var(--glass-b, 19px)) saturate(var(--glass-s, 148%)); }
  .top { border-bottom-color: color-mix(in srgb, var(--line) 70%, transparent); box-shadow: inset 0 -1px 0 rgba(255, 255, 255, .08); }
  .bottom { border-top-color: color-mix(in srgb, var(--line) 70%, transparent); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .08); }
  .acct-menu { background: color-mix(in srgb, var(--bg) var(--glass-a2, 60%), transparent); -webkit-backdrop-filter: blur(var(--glass-b, 19px)) saturate(var(--glass-s, 148%)); backdrop-filter: blur(var(--glass-b, 19px)) saturate(var(--glass-s, 148%)); }
  .install { background: color-mix(in srgb, var(--surface) var(--glass-a2, 60%), transparent); -webkit-backdrop-filter: blur(var(--glass-b, 19px)) saturate(var(--glass-s, 148%)); backdrop-filter: blur(var(--glass-b, 19px)) saturate(var(--glass-s, 148%));
    border-color: color-mix(in srgb, var(--line) 60%, rgba(255, 255, 255, .25)); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .18), 0 12px 36px rgba(0, 0, 0, .28); }
  .short-nav button { background: color-mix(in srgb, var(--surface) 78%, transparent); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
}

/* ---------- جرس الإشعارات ---------- */
.bell { position: relative; display: grid; place-items: center; flex: none; width: 36px; height: 36px; padding: 0; border-radius: 50%; border: 1px solid var(--line); background: var(--surface); color: var(--ink); cursor: pointer; }
.bell:hover { border-color: var(--accent); }
.bell-n { position: absolute; inset-block-start: -5px; inset-inline-end: -5px; min-width: 19px; height: 19px; padding: 0 4px; border-radius: 10px; display: grid; place-items: center;
  background: #d92d20; color: #fff; font-size: .7rem; font-weight: 700; line-height: 1; border: 2px solid var(--bg); font-variant-numeric: tabular-nums; }
.notif-layer { position: fixed; inset: 0; z-index: 70; }
.notif-backdrop { position: absolute; inset: 0; background: rgba(0, 0, 0, .35); }
.notif-pop { position: absolute; inset-inline: 8px; top: calc(var(--top) + env(safe-area-inset-top, 0px) + 6px); max-height: min(72dvh, 560px); overflow-y: auto; padding: 14px; outline: 0;
  background: var(--bg); color: var(--ink); border: 1px solid var(--line); border-radius: 16px; box-shadow: 0 12px 32px rgba(0, 0, 0, .25); }
@supports ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) and (background: color-mix(in srgb, red 50%, transparent)) {
  .notif-pop { background: color-mix(in srgb, var(--bg) var(--glass-a2, 60%), transparent); -webkit-backdrop-filter: blur(var(--glass-b, 19px)) saturate(var(--glass-s, 148%)); backdrop-filter: blur(var(--glass-b, 19px)) saturate(var(--glass-s, 148%)); }
}
@media (min-width: 900px) {
  .notif-backdrop { background: transparent; }
  .notif-pop { inset-inline: auto; inset-inline-end: 16px; width: 380px; }
}
.notif-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.notif-x { position: static; }
.notif-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.notif-item { display: grid; gap: 4px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: color-mix(in srgb, var(--surface) 80%, transparent); }
.notif-item.new { border-color: var(--accent); }
.notif-item p { margin: 0; color: var(--ink); font-size: .92rem; overflow-wrap: anywhere; white-space: pre-line; }
.notif-item small { color: var(--mute); }
.notif-more { color: var(--accent); font-weight: 600; font-size: .9rem; justify-self: start; }
.notif-item--report { color: var(--ink); }
.notif-item--report strong { color: #d92d20; }
.notif-admin-form { display: grid; gap: 12px; }
.notif-aud { display: grid; gap: 6px; border: 1px solid var(--line); border-radius: 12px; padding: 10px 14px; }
.notif-aud legend { padding-inline: 6px; font-weight: 600; }

/* البث: نمط عام/أسبوعي */
.live-wrap { display: grid; gap: 14px; max-width: 760px; }
.live-modes { border: 1px solid var(--line); border-radius: 12px; padding: 10px 14px; display: grid; gap: 8px; }
.live-modes legend { padding-inline: 6px; font-weight: 600; }
.live-mode { display: flex; align-items: flex-start; gap: 8px; }
.live-mode small { color: var(--mute); }
.live-days { display: flex; flex-wrap: wrap; gap: 6px; }

/* معاينة الزجاجية في إعدادات الموقع */
.glass-prev { position: relative; overflow: hidden; border-radius: 16px; border: 1px solid var(--line); min-height: 130px; display: grid; place-items: center; padding: 14px;
  background: linear-gradient(135deg, var(--accent) 0%, color-mix(in srgb, var(--accent) 35%, var(--bg)) 45%, var(--bg) 100%); }
.glass-prev::before, .glass-prev::after { content: ""; position: absolute; border-radius: 50%; background: var(--ink); opacity: .22; }
.glass-prev::before { width: 90px; height: 90px; inset-block-start: -20px; inset-inline-start: 18%; }
.glass-prev::after { width: 60px; height: 60px; inset-block-end: -12px; inset-inline-end: 22%; background: var(--accent-ink); opacity: .3; }
.glass-prev-card { position: relative; z-index: 1; width: min(100%, 320px); padding: 12px 16px; border-radius: 14px; border: 1px solid rgba(255, 255, 255, .3); color: var(--ink);
  background: color-mix(in srgb, var(--bg) var(--glass-a2, 60%), transparent); -webkit-backdrop-filter: blur(var(--glass-b, 19px)) saturate(var(--glass-s, 148%)); backdrop-filter: blur(var(--glass-b, 19px)) saturate(var(--glass-s, 148%));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .25), 0 8px 24px rgba(0, 0, 0, .18); }

/* تصفية الفيديوهات في لوحة التحكم */
.admin-filters { display: flex; flex-wrap: wrap; gap: 10px 12px; align-items: end; margin-bottom: 12px; }
.admin-filters .field { margin: 0; min-width: 150px; flex: 1 1 150px; max-width: 240px; }
.admin-filters .btn { margin: 0; }


/* نافذة الأذان */
.adhan-overlay { position: fixed; inset: 0; z-index: 90; display: grid; place-items: center; padding: 16px; background: rgba(6, 14, 22, .72); backdrop-filter: blur(3px); animation: adhan-in .35s ease both; }
.adhan-card { position: relative; width: min(380px, 100%); display: grid; gap: 14px; justify-items: center; padding: 14px 14px 20px; border-radius: 24px; background: var(--surface); color: var(--ink); border: 1px solid var(--line); box-shadow: 0 18px 50px rgba(0,0,0,.45); text-align: center; }
.adhan-art { width: 100%; height: auto; border-radius: 18px; display: block; object-fit: cover; }
.adhan-text { margin: 0; font-size: 1.12rem; font-weight: 700; line-height: 1.7; padding-inline: 6px; }
.adhan-timer { font-size: 2.6rem; font-weight: 800; letter-spacing: .04em; font-variant-numeric: tabular-nums; color: var(--accent); direction: ltr; line-height: 1; }
.adhan-close { position: absolute; z-index: 2; inset-block-start: 22px; inset-inline-start: 22px; width: 34px; height: 34px; border-radius: 50%; border: 0; background: rgba(0,0,0,.55); color: #fff; font-size: 1rem; cursor: pointer; }
.adhan-close:focus-visible, .adhan-sound:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.adhan-sound { display: grid; place-items: center; width: 46px; height: 46px; border: 1px solid var(--line); background: none; color: var(--ink); border-radius: 50%; padding: 0; font: inherit; font-size: 1.35rem; line-height: 1; cursor: pointer; }
.adhan-parent { border: 0; background: none; color: var(--mute); font: inherit; font-size: .9rem; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; padding: 4px 8px; }
.adhan-parent:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.adhan-parent-layer { position: absolute; inset: 0; z-index: 5; display: grid; place-items: center; padding: 14px; border-radius: 24px; background: rgba(6, 14, 22, .78); }
.adhan-parent-box { width: 100%; display: grid; gap: 10px; padding: 18px 16px; border-radius: 18px; background: var(--surface); border: 1px solid var(--line); }
.adhan-parent-box strong { font-size: 1.05rem; margin-bottom: 4px; }
.adhan-preview-wrap { position: relative; display: grid; place-items: center; padding: 14px; border-radius: 16px; background: rgba(6, 14, 22, .55); }
/* فقاعة التنبيه قبل الأذان (زجاجية) */
.adhan-remind { position: fixed; z-index: 80; inset-inline: 12px; bottom: calc(76px + env(safe-area-inset-bottom, 0px)); margin-inline: auto; width: fit-content; max-width: min(460px, calc(100vw - 24px)); display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-radius: 18px; background: var(--surface); color: var(--ink); border: 1px solid var(--line); box-shadow: 0 10px 34px rgba(0,0,0,.35); animation: adhan-rise .4s ease both; }
@supports ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) and (background: color-mix(in srgb, red 50%, transparent)) {
  .adhan-remind { background: color-mix(in srgb, var(--surface) var(--glass-a2, 60%), transparent); -webkit-backdrop-filter: blur(var(--glass-b, 19px)) saturate(var(--glass-s, 148%)); backdrop-filter: blur(var(--glass-b, 19px)) saturate(var(--glass-s, 148%)); }
}
.adhan-remind p { margin: 0; font-weight: 700; line-height: 1.6; }
.adhan-remind-ico { font-size: 1.5rem; }
.adhan-remind-x { flex: none; width: 30px; height: 30px; border-radius: 50%; border: 0; background: rgba(127,127,127,.25); color: inherit; cursor: pointer; font: inherit; }
.adhan-remind-x:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
@keyframes adhan-rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .adhan-remind { animation: none; } }
@keyframes adhan-in { from { opacity: 0; } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .adhan-overlay { animation: none; } }

/* ---- بث: انتظار الموعد، معاينة لوحة التحكم ---- */
.live-badge--wait { color: var(--mute); }
.live-wait { padding: 18px 16px; border: 1px dashed var(--line); border-radius: 12px; background: var(--surface); font-weight: 600; text-align: center; }
.live-preview { border: 1px dashed var(--accent); border-radius: 14px; padding: 12px; display: grid; gap: 10px; background: var(--bg); }
.live-preview > header { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; justify-content: space-between; }
.live-preview .live-view { pointer-events: none; }
.live-frame--mock { aspect-ratio: 16 / 9; border-radius: 12px; background: #000; color: #fff; display: grid; place-items: center; font-size: .9rem; opacity: .85; }
.live-start { border: 1px solid var(--line); border-radius: 12px; padding: 12px; display: grid; gap: 10px; background: var(--bg); }
.live-start legend { font-weight: 600; padding-inline: 6px; }
.live-title-input { width: 100%; min-height: 40px; padding: 6px 10px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); font: inherit; font-weight: 600; }
.live-vars { display: flex; flex-wrap: wrap; gap: 6px; }
.live-vars code { background: var(--surface); border: 1px solid var(--line); border-radius: 6px; padding: 1px 6px; font-size: .8rem; }
.dirty-dot { color: #d97706; font-size: .85rem; }

/* ---------- عدّاد المشاهدات والوقت ---------- */
.card p.meta { margin-top: 1px; }
.watch-stats { margin-top: 2px; }
.short-views { margin-top: 2px; }
/* اسم المجموعة وبجانبه أيقونتا المشاهدات والمدة؛ إن ضاق العرض ينزل الإحصاء لسطر ثانٍ */
.card-sub { display: flex; flex-wrap: wrap; align-items: center; column-gap: 10px; row-gap: 1px; }
.card-sub .card-series { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
.card-sub .card-stats { display: inline-flex; align-items: center; gap: 10px; white-space: nowrap; }
.card-sub .stat { display: inline-flex; align-items: center; gap: 3px; font-size: .78rem; }
.card-sub .stat svg { flex: none; opacity: .85; }
.live-views { color: var(--mute); font-size: .9rem; margin: 0; }

/* ---------- نقطة «بث مباشر» الوامضة ---------- */
.live-dot--on { color: #e5251b; animation: live-blink 1.2s ease-in-out infinite; }
.live-pill .live-dot--on { color: #ff3b30; }
@keyframes live-blink { 0%, 100% { opacity: 1; } 50% { opacity: .12; } }
/* وميض شفافية فقط (لا حركة): نُبقيه حتى مع «تقليل الحركة». */
@media (prefers-reduced-motion: reduce) { .live-dot--on { animation: live-blink 1.6s ease-in-out infinite !important; } }

/* ---------- الرئيسية: أربعة في الصف + صف المقاطع القصيرة ---------- */
@media (min-width: 900px) { .grid.grid--home { grid-template-columns: repeat(4, minmax(0, 1fr)); } .grid.grid--home.grid--cols { grid-template-columns: repeat(var(--cols, 3), minmax(0, 1fr)); } }
.home-shorts { margin: 26px 0; }
.home-shorts-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 0 16px 10px; }
.home-shorts-head h2 { font-size: 1.1rem; font-weight: 600; }
.home-shorts-head a { color: var(--accent); font-size: .88rem; }
.home-shorts-row { list-style: none; margin: 0; padding: 0 16px 6px; display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x proximity; scrollbar-width: none; -ms-overflow-style: none; }
.home-shorts-row::-webkit-scrollbar { display: none; }
.home-shorts-row > li { flex: 0 0 42%; max-width: 200px; scroll-snap-align: start; }
.home-shorts-row .thumb { aspect-ratio: 9 / 16; border-radius: 14px; overflow: hidden; }
.home-shorts-row .card h3 { margin-inline: 2px; font-size: .9rem; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.home-shorts-row .card p { margin-inline: 2px; }
@media (min-width: 600px) {
  .home-shorts-head, .home-shorts-row { padding-inline: 2px; }
  .home-shorts-row > li { flex-basis: calc((100% - 4 * 12px) / 5); max-width: none; }
}

/* ---------- إزالة الإشعار ---------- */
.notif-item { position: relative; }
.notif-del { position: absolute; inset-block-start: 6px; inset-inline-end: 6px; width: 28px; height: 28px; display: grid; place-items: center; padding: 0; border: 0; border-radius: 50%; background: none; color: var(--mute); cursor: pointer; }
.notif-del:hover { background: var(--line); color: var(--ink); }
.notif-item strong { padding-inline-end: 28px; }

/* ---------- صفحة الفيديو على الجوال/اللوح: الفيديو ثابت أعلى الشاشة وقائمة المقترحات تتمرّر تحته ---------- */
@media (max-width: 1199px) {
  .watch { display: block; }
  .watch > article { display: contents; }
  .watch-sticky { position: sticky; top: calc(var(--top) + env(safe-area-inset-top, 0px)); z-index: 15; background: var(--bg); }
  .watch > .suggest { margin-top: 28px; }
}

.tag-link { color: var(--accent); }
.tag-link:hover { text-decoration: underline; }

/* تنبيه البلاغات للمشرف */
.report-toast { position: fixed; z-index: 80; inset-inline: 12px; top: calc(var(--top) + env(safe-area-inset-top, 0px) + 10px); max-width: 360px; margin-inline-start: auto;
  display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-radius: 14px; border: 1px solid #d92d20; background: var(--surface); color: var(--ink); box-shadow: 0 8px 24px rgba(0,0,0,.25); }
.report-toast a { flex: 1; display: grid; gap: 2px; }
.report-toast strong { color: #d92d20; }
.report-toast small { color: var(--mute); }
.report-toast button { width: 28px; height: 28px; display: grid; place-items: center; border: 0; border-radius: 50%; background: none; color: var(--mute); cursor: pointer; }
.report-toast button:hover { background: var(--line); color: var(--ink); }

/* ---------- الأذكار: الإشعار المنبثق وقارئ الشاشة الكاملة (زجاجي) ---------- */
.adhkar-prompt { position: fixed; z-index: 60; inset-inline: 12px; top: calc(var(--top) + env(safe-area-inset-top, 0px) + 10px); margin-inline: auto; width: min(440px, calc(100vw - 24px));
  display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 8px 12px; padding: 14px 16px; border-radius: 20px;
  background: var(--surface); color: var(--ink); border: 1px solid var(--line); box-shadow: 0 12px 36px rgba(0,0,0,.32); animation: adhan-rise .4s ease both; }
.adhkar-prompt--inline { position: relative; inset: auto; top: auto; margin: 0 auto; animation: none; }
.adhkar-prompt-ico { font-size: 1.9rem; line-height: 1; }
.adhkar-prompt p { margin: 0; font-weight: 700; line-height: 1.6; padding-inline-end: 26px; }
.adhkar-prompt-btns { grid-column: 1 / -1; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.adhkar-prompt-x { position: absolute; inset-block-start: 8px; inset-inline-end: 8px; width: 28px; height: 28px; border-radius: 50%; border: 0; background: rgba(127,127,127,.22); color: inherit; font: inherit; font-size: .8rem; cursor: pointer; }
.adhkar-btn { min-height: 44px; padding: 8px 14px; border-radius: 999px; border: 1px solid var(--accent); background: var(--accent); color: var(--accent-ink); font: inherit; font-weight: 700; cursor: pointer; }
.adhkar-btn--ghost { background: transparent; color: var(--ink); border-color: var(--line); font-weight: 600; }
.adhkar-btn:hover { filter: brightness(1.06); }
.adhkar-btn:focus-visible, .adhkar-prompt-x:focus-visible, .adhkar-x:focus-visible, .adhkar-nav:focus-visible, .adhkar-done:focus-visible, .adhkar-dots button:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }

.adhkar-reader { position: fixed; inset: 0; z-index: 95; display: flex; flex-direction: column; padding: env(safe-area-inset-top, 0px) 0 env(safe-area-inset-bottom, 0px); outline: 0;
  background: color-mix(in srgb, var(--bg) 92%, transparent); color: var(--ink); animation: adhan-in .3s ease both; }
@supports ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) and (background: color-mix(in srgb, red 50%, transparent)) {
  .adhkar-reader { background: color-mix(in srgb, var(--bg) var(--glass-a2, 60%), transparent); -webkit-backdrop-filter: blur(calc(var(--glass-b, 19px) + 10px)) saturate(var(--glass-s, 148%)); backdrop-filter: blur(calc(var(--glass-b, 19px) + 10px)) saturate(var(--glass-s, 148%)); }
}
.adhkar-reader { height: 100vh; }
@supports (height: 100dvh) { .adhkar-reader { height: 100dvh; } }
.adhkar-head { display: flex; align-items: center; gap: 12px; padding: 14px 16px 8px; }
.adhkar-head h2 { flex: 1; margin: 0; font-size: 1.1rem; text-align: center; }
.adhkar-x { flex: none; width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line); background: color-mix(in srgb, var(--surface) 70%, transparent); color: inherit; font: inherit; cursor: pointer; }
.adhkar-count { flex: none; min-width: 40px; text-align: center; font-variant-numeric: tabular-nums; color: var(--mute); font-size: .9rem; direction: ltr; }
.adhkar-bar { height: 4px; margin: 0 16px; border-radius: 4px; background: color-mix(in srgb, var(--ink) 14%, transparent); overflow: hidden; }
.adhkar-bar i { display: block; height: 100%; background: var(--accent); border-radius: 4px; transition: width .3s ease; }
.adhkar-stage { position: relative; flex: 1; min-height: 0; display: flex; align-items: center; justify-content: center; padding: 12px 56px; touch-action: pan-y; user-select: none; -webkit-user-select: none; }
.adhkar-wrap { position: relative; display: flex; width: min(720px, 100%); max-height: 100%; min-height: 0; }
.adhkar-card { width: 100%; max-height: 100%; min-height: 0; overflow-y: auto; overflow-x: hidden; display: flex; flex-direction: column; gap: 18px; text-align: center; padding: 28px 22px; border-radius: 28px;
  /* لا نستعمل align-content:center: عند طول النص يُقصّ الجزء العلوي ولا يمكن الوصول إليه بالتمرير. الهوامش التلقائية تتوسّط المحتوى القصير وتبدأ من الأعلى عند الطويل. */
  touch-action: pan-y; overscroll-behavior: contain; -webkit-overflow-scrolling: touch;
  background: color-mix(in srgb, var(--surface) 62%, transparent); border: 1px solid color-mix(in srgb, var(--line) 60%, rgba(255,255,255,.3)); box-shadow: inset 0 1px 0 rgba(255,255,255,.18), 0 18px 50px rgba(0,0,0,.28); }
.adhkar-card.is-next { animation: adhkar-from-left .32s ease both; }
.adhkar-card.is-prev { animation: adhkar-from-right .32s ease both; }
.adhkar-card.is-drag { animation: none; transition: none; }
.adhkar-card > :first-child { margin-top: auto; }
.adhkar-card > :last-child { margin-bottom: auto; }
.adhkar-text { margin: 0; font-size: clamp(1.25rem, 4.6vw, 2.1rem); line-height: 2.1; font-weight: 600; white-space: pre-line; overflow-wrap: anywhere; }
.adhkar-text--sm { font-size: clamp(1.1rem, 4.1vw, 1.65rem); line-height: 2; }
.adhkar-text--xs { font-size: clamp(1rem, 3.7vw, 1.4rem); line-height: 1.95; }
.adhkar-meta { display: grid; gap: 8px; justify-items: center; }
.adhkar-rep { display: inline-block; padding: 6px 16px; border-radius: 999px; background: var(--accent); color: var(--accent-ink); font-weight: 700; font-size: .95rem; }
.adhkar-note { color: var(--mute); font-size: .88rem; line-height: 1.6; }
.adhkar-nav { position: absolute; top: 50%; transform: translateY(-50%); z-index: 2; width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line); background: color-mix(in srgb, var(--surface) 70%, transparent); color: var(--ink); font-size: 1.7rem; line-height: 1; cursor: pointer; }
.adhkar-nav:disabled { opacity: .3; cursor: default; }
.adhkar-nav--start { inset-inline-start: 8px; }
.adhkar-nav--end { inset-inline-end: 8px; }
.adhkar-foot { display: grid; gap: 12px; justify-items: center; padding: 6px 16px 18px; }
.adhkar-hint { margin: 0; color: var(--mute); font-size: .85rem; }
.adhkar-done { min-height: 48px; padding: 10px 28px; border-radius: 999px; border: 0; background: var(--accent); color: var(--accent-ink); font: inherit; font-weight: 800; font-size: 1.05rem; cursor: pointer; }
.adhkar-dots { display: flex; gap: 4px; flex-wrap: wrap; justify-content: center; }
.adhkar-dots button { width: 22px; height: 22px; padding: 0; border: 0; background: none; cursor: pointer; position: relative; }
.adhkar-dots button::after { content: ""; position: absolute; inset: 7px; border-radius: 50%; background: color-mix(in srgb, var(--ink) 28%, transparent); transition: all .2s; }
.adhkar-dots button.on::after { inset: 5px; background: var(--accent); }
@keyframes adhkar-from-left { from { opacity: 0; transform: translateX(-48px); } to { opacity: 1; transform: none; } }
@keyframes adhkar-from-right { from { opacity: 0; transform: translateX(48px); } to { opacity: 1; transform: none; } }
@media (max-width: 520px) { .adhkar-stage { padding-inline: 10px; } .adhkar-nav { display: none; } .adhkar-card { padding: 22px 16px; } }
@media (prefers-reduced-motion: reduce) { .adhkar-card.is-next, .adhkar-card.is-prev, .adhkar-reader, .adhkar-prompt { animation: none; } }

/* زر صوت الذكر: في زاوية بطاقة الذكر؛ يدل على أن الصوت يعمل، والضغط عليه يكتمه. */
.adhkar-card--aud { padding-top: 58px; }
.adhkar-audio { position: absolute; z-index: 3; inset-block-start: 10px; inset-inline-start: 12px; width: 42px; height: 42px; display: grid; place-items: center; border-radius: 50%; border: 1px solid var(--accent); background: color-mix(in srgb, var(--accent) 16%, var(--surface)); color: var(--accent); cursor: pointer; padding: 0; }
.adhkar-audio:hover:not(:disabled) { background: color-mix(in srgb, var(--accent) 28%, var(--surface)); }
.adhkar-audio:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.adhkar-audio.is-muted { border-color: var(--line); color: var(--mute); background: color-mix(in srgb, var(--surface) 70%, transparent); }
.adhkar-audio.is-error { opacity: .45; cursor: default; border-color: var(--line); color: var(--mute); }
.adhkar-audio.is-blocked { animation: adhkar-pulse 1.4s ease-in-out infinite; }
.adhkar-audio.is-playing .adhkar-wave { animation: adhkar-wave 1.2s ease-in-out infinite; }
.adhkar-audio.is-playing .adhkar-wave--2 { animation-delay: .25s; }
@keyframes adhkar-wave { 0%, 100% { opacity: .35; } 50% { opacity: 1; } }
@keyframes adhkar-pulse { 0%, 100% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent) 55%, transparent); } 50% { box-shadow: 0 0 0 9px transparent; } }

/* أسهم اتجاه السحب أسفل البطاقة: لليسار للتالي ولليمين للسابق. */
.adhkar-swipe { direction: ltr; width: min(420px, 100%); display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.adhkar-swipe-side { display: inline-flex; align-items: center; gap: 6px; padding: 6px 14px; border-radius: 999px; font-size: .92rem; font-weight: 700; color: var(--accent); background: color-mix(in srgb, var(--accent) 12%, transparent); transition: opacity .2s; }
.adhkar-swipe-side { border: 0; font-family: inherit; cursor: pointer; min-height: 44px; -webkit-tap-highlight-color: transparent; }
.adhkar-swipe-side:hover:not(:disabled) { background: color-mix(in srgb, var(--accent) 22%, transparent); }
.adhkar-swipe-side:active:not(:disabled) { transform: scale(.96); }
.adhkar-swipe-side:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.adhkar-swipe-side:disabled { cursor: default; }
.adhkar-swipe-side.off { opacity: .22; }
.adhkar-swipe-side--next svg { animation: adhkar-nudge-l 1.6s ease-in-out infinite; }
.adhkar-swipe-side--prev svg { animation: adhkar-nudge-r 1.6s ease-in-out infinite; }
.adhkar-swipe-side.off svg { animation: none; }
@keyframes adhkar-nudge-l { 0%, 100% { transform: translateX(0); } 50% { transform: translateX(-6px); } }
@keyframes adhkar-nudge-r { 0%, 100% { transform: translateX(0); } 50% { transform: translateX(6px); } }
@media (prefers-reduced-motion: reduce) { .adhkar-swipe-side svg, .adhkar-audio.is-blocked, .adhkar-audio.is-playing .adhkar-wave { animation: none; } }

/* معاينة الأذكار في لوحة التحكم */
.adhkar-preview { position: relative; display: grid; gap: 14px; padding: 14px; border-radius: 16px; background: linear-gradient(135deg, rgba(8,122,104,.35), rgba(15,26,36,.6)); min-height: 220px; align-content: center; }
.adhkar-ed { display: grid; gap: 10px; padding: 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--bg); }
.adhkar-ed textarea { width: 100%; min-height: 96px; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); font: inherit; line-height: 1.8; resize: vertical; }
.adhkar-ed .addrow input[type="number"] { flex: 0 0 90px; min-width: 0; }
.adhkar-ed-n { font-weight: 700; color: var(--accent); min-width: 28px; }
.adhkar-bd { border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; margin: 0; min-width: 0; }
.adhkar-bd legend { font-size: .9rem; font-weight: 700; padding-inline: 6px; }
.adhkar-bd .addrow select, .adhkar-bd .addrow input { min-height: 44px; padding: 8px 10px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); font: inherit; flex: 0 0 auto; }

/* ---------- صورة المجموعة بجانب اسم الفيديو (كصورة القناة) ---------- */
.card-row { display: flex; align-items: flex-start; gap: 10px; margin: 10px 14px 0; }
@media (min-width: 600px) { .card-row { margin-inline: 2px; } }
.card-row .card-text { min-width: 0; flex: 1; }
.card-row h3 { margin: 0; font-size: 1rem; }
.card-row p { margin: 2px 0 0; }
.home-shorts-row .card-row { margin-inline: 2px; gap: 8px; }
.home-shorts-row .card-row h3 { margin: 0; }
.s-avatar { position: relative; display: grid; place-items: center; flex: none; border-radius: 50%; overflow: hidden; color: #fff; font-weight: 700; background: hsl(var(--h, 170) 45% 38%); }
.s-avatar img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.watch-series { display: flex; align-items: center; gap: 12px; margin: 14px 16px 0; }
.watch-series-text { display: grid; gap: 1px; min-width: 0; font-weight: 600; }
@media (min-width: 600px) { .watch-series { margin-inline: 2px; } }

/* ---------- فواصل الصفوف وعناوينها وأيقوناتها ---------- */
.home-blocks { display: grid; grid-template-columns: minmax(0, 1fr); gap: 40px; } /* minmax(0,…): بلا ذلك يتمدد العمود بعرض الصفوف الأفقية (تابع المشاهدة/المقاطع) فتخرج الصور عن الشاشة */
.home-blocks > .home-shorts { margin: 0; }
.row-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 0 16px 12px; }
@media (min-width: 600px) { .row-head { padding-inline: 2px; } }
.row-title { display: flex; align-items: center; gap: 8px; font-size: 1.1rem; font-weight: 600; margin: 0; }
.row-title-ic { display: inline-grid; place-items: center; color: var(--accent); flex: none; }
.home-continue .row-head { padding-bottom: 12px; }
.cont-row { list-style: none; margin: 0; padding: 0 16px 6px; display: flex; gap: 14px; overflow-x: auto; scroll-snap-type: x proximity; scrollbar-width: none; -ms-overflow-style: none; }
.cont-row::-webkit-scrollbar { display: none; }
.cont-row > li { flex: 0 0 min(var(--cont-w, 280px), 86%); scroll-snap-align: start; }
/* أبعاد صورة الفيديو واستدارة حوافها في الرئيسية على الجوال فقط (من «العرض» في لوحة التحكم). صف المقاطع القصيرة له نسبته الخاصة. */
@media (max-width: 599.98px) { .home-mthumb .grid .thumb, .home-mthumb .cont-row .thumb { width: var(--m-width, 100%); margin-inline: auto; aspect-ratio: var(--m-ratio, 16 / 9); border-radius: var(--m-radius, 0); overflow: hidden; } }
@media (min-width: 600px) { .cont-row { padding-inline: 2px; } }
.icon-picker { border: 1px solid var(--line); border-radius: 12px; padding: 8px 12px; background: var(--bg); }
.icon-picker summary { display: flex; align-items: center; gap: 10px; cursor: pointer; min-height: 36px; }
.icon-picker-cur { display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 8px; border: 1px solid var(--line); color: var(--accent); }
.icon-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(44px, 1fr)); gap: 6px; padding: 10px 0 4px; max-height: 260px; overflow-y: auto; }
.icon-opt { display: grid; place-items: center; height: 44px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); cursor: pointer; }
.icon-opt:hover { border-color: var(--accent); }
.icon-opt.on { background: var(--ink); color: var(--bg); border-color: var(--ink); }

/* ---------- إعدادات العرض في لوحة التحكم: أقسام مفصولة ---------- */
.dbox > h2 { font-size: 1.15rem; }
.dsec { display: grid; gap: 14px; margin-top: 10px; padding-top: 18px; position: relative; }
/* فاصل مميّز: خط متدرّج بلون الموقع فوق كل قسم */
.dsec::before { content: ""; position: absolute; inset-block-start: 0; inset-inline: 0; height: 3px; border-radius: 3px;
  background: linear-gradient(to left, var(--accent), color-mix(in srgb, var(--accent) 12%, transparent)); }
.dsec-h { margin: 0; display: inline-flex; align-items: center; gap: 8px; justify-self: start; padding: 4px 12px; border-radius: 999px; font-size: .98rem; font-weight: 700;
  background: color-mix(in srgb, var(--accent) 14%, transparent); color: var(--accent); }
.dsec-h::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }

/* محرّر تبويبات الرئيسية */
.tabs-editor { display: grid; gap: 12px; }
.te-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.te-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 8px 10px; border: 1px solid var(--line); border-radius: 12px; background: color-mix(in srgb, var(--surface) 80%, transparent); }
.te-n { flex: none; width: 24px; height: 24px; display: grid; place-items: center; border-radius: 50%; background: var(--line); color: var(--mute); font-size: .78rem; font-variant-numeric: tabular-nums; }
.te-main { flex: 1 1 160px; min-width: 0; display: grid; gap: 2px; }
.te-main input { min-height: 40px; }
.te-main small { color: var(--mute); }
.te-actions { display: flex; gap: 6px; flex: none; }
.te-add { align-items: center; }
.te-add select { flex: 1; min-width: 0; min-height: 44px; padding: 8px 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); font: inherit; }

/* اختيار صورة المجموعة */
.cover-edit { border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; display: grid; gap: 10px; min-width: 0; }
.cover-edit legend { padding-inline: 6px; font-weight: 600; font-size: .9rem; }
.cover-modes { display: flex; flex-wrap: wrap; gap: 6px 16px; }
.cover-preview { width: 100%; max-width: 280px; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 10px; background: var(--line); display: block; }

/* ---------- تابع المشاهدة: حجم المربعات (وضع الصفوف) ---------- */
@media (min-width: 600px) {
  .grid.grid--home.grid--cont { grid-template-columns: repeat(auto-fill, minmax(min(var(--cont-w, 280px), 100%), 1fr)); }
}

/* ---------- معاينة «تابع المشاهدة» في لوحة التحكم ---------- */
.cont-prev-wrap { display: grid; gap: 8px; }
.cont-prev-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.cont-prev-bar .seg { grid-template-columns: repeat(2, auto); }
.cont-prev-bar .seg button { padding-inline: 16px; }
.cont-prev { border: 1px dashed var(--line); border-radius: 14px; padding: 12px 0; background: var(--bg); overflow: hidden; margin-inline: auto; width: 100%; }
.cont-prev--phone { max-width: 360px; }
.cont-prev-title { font-weight: 600; font-size: 1.05rem; padding: 0 16px 10px; }
.cont-prev .cont-row, .cont-prev .cont-prev-grid { pointer-events: none; padding-inline: 16px; }
.cont-prev .cont-row { overflow-x: hidden; }
.cont-prev .cont-prev-grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(min(var(--cont-w, 280px), 100%), 1fr)); }
.cont-prev--phone .cont-prev-grid { grid-template-columns: 1fr; }
.cont-prev .card-row { margin-inline: 2px; }
.cont-prev .thumb { border-radius: 14px; overflow: hidden; }
.cont-prev .card h3, .cont-prev .card p { margin-inline: 0; }

/* ---------- صفحة الفيديو: الموسم والحلقة فوق العنوان ---------- */
.watch article > .watch-se { margin: 14px 16px 0; font-size: .85rem; font-weight: 600; color: var(--accent); }
.watch article > .watch-se + h1 { margin-top: 2px; }
@media (min-width: 600px) { .watch article > .watch-se { margin-inline: 2px; } }

/* ---------- الفيديوهات المقترحة: طرق العرض ---------- */
.sug-thumb .dur { inset-inline-end: 6px; bottom: 6px; }
.suggest-list--cards { gap: 18px; }
.sug.sug--card { display: grid; grid-template-columns: 1fr; gap: 8px; }
.suggest-scroll--scroll { overflow-x: auto; scrollbar-width: none; -ms-overflow-style: none; scroll-snap-type: x proximity; }
.suggest-scroll--scroll::-webkit-scrollbar { display: none; }
.suggest-list--scroll { display: flex; gap: 12px; width: max-content; min-width: 100%; }
.suggest-list--scroll > li { flex: 0 0 min(72vw, 260px); scroll-snap-align: start; }
@media (min-width: 600px) {
  .suggest-list--cards { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px 16px; }
}
@media (min-width: 1200px) {
  .suggest-list--cards { grid-template-columns: 1fr; }
  .suggest-scroll--scroll { overflow-x: hidden; overflow-y: auto; }
  .suggest-list--scroll { display: grid; width: auto; }
  .suggest-list--scroll > li { flex: none; }
}

/* ---------- المشغّل المشترك والمصغّر (الجوال واللوح) ---------- */
/* الصفحة تترك فراغًا بمقاس المشغّل والمقبض، والمشغّل نفسه (.mp) عنصر ثابت يُوضع فوقه. */
.mp-slot { aspect-ratio: 16 / 9; width: 100%; }
/* الفراغ ومشغّل درايف ويوتيوب كلها بنسبة 16:9 على كل المقاسات، فيطابق الفراغُ المشغّلَ تمامًا ولا يبقى فراغ أسود. */
.mp-handle-gap { height: 28px; }
@media (max-width: 1199px) { .main:has(.mp-slot) { padding-top: 0; } }

.mp { position: fixed; z-index: 16; }
.mp--full {
  top: calc(var(--top) + env(safe-area-inset-top, 0px)); left: var(--mp-x, 0); width: var(--mp-w, 100%);
  background: var(--bg); transition: transform .2s ease, opacity .2s ease;
}
.mp--full.mp--drag { transition: none; }
.mp-frame { width: 100%; position: relative; }
/* منطقة سحب شفافة أعلى الفيديو (السحب لأسفل يصغّر المشغّل) + مؤشر صغير يدل عليها */
.mp-swipe { position: absolute; inset-inline: 0; top: 0; height: 72px; z-index: 2; touch-action: none; cursor: grab; display: grid; justify-items: center; align-content: start; padding-top: 8px; }
.mp-swipe::before { content: ""; width: 44px; height: 5px; border-radius: 3px; background: rgba(255, 255, 255, .55); box-shadow: 0 0 0 1px rgba(0, 0, 0, .25); }
.mp-swipe:active { cursor: grabbing; }
.mp-handle { display: flex; align-items: center; height: 28px; background: var(--bg); }
.mp-min { flex: none; width: 48px; height: 28px; display: grid; place-items: center; border: 0; background: none; color: var(--mute); cursor: pointer; }
.mp-min:hover { color: var(--ink); }
.mp-grab { flex: 1; height: 100%; display: grid; place-items: center; touch-action: none; cursor: grab; }
.mp-grab::before { content: ""; width: 44px; height: 5px; border-radius: 3px; background: color-mix(in srgb, var(--mute) 55%, transparent); }
.mp-grab:active { cursor: grabbing; }
.mp-spacer { flex: none; width: 48px; }

/* الشريط المصغّر: فوق الشريط السفلي على الجوال، وفي الزاوية على اللوح */
.mp--mini {
  inset-inline: 8px; bottom: calc(var(--nav-h) + env(safe-area-inset-bottom, 0px) + 8px); height: 64px;
  display: flex; align-items: center; gap: 10px; padding-inline-end: 4px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 14px; overflow: hidden;
  box-shadow: 0 6px 24px rgba(0, 0, 0, .28); animation: mp-in .25s ease;
}
.mp--mini .mp-frame { flex: none; width: 114px; height: 100%; }
.mp--mini .player { height: 100%; aspect-ratio: auto; border-radius: 0; }
.mp--mini .playload { display: none; }
/* معاينة درايف المصغّرة: نرسم الإطار بأربعة أضعاف مقاسه ثم نصغّره بـ scale(.25) فتظهر الصورة كاملة بدل واجهة درايف المقصوصة. */
.mp--mini .player { overflow: hidden; }
.mp--mini .player--frame iframe[src*="drive.google.com"] { inset: 0 auto auto 0; width: 400%; height: 400%; transform: scale(.25); transform-origin: 0 0; pointer-events: none; }
.mp-info { flex: 1; min-width: 0; display: grid; gap: 1px; }
.mp-info strong { font-size: .9rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mp-info small { color: var(--mute); font-size: .78rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mp-hit { position: absolute; inset: 0; z-index: 1; border: 0; background: transparent; cursor: pointer; border-radius: 14px; }
.mp-close { position: relative; z-index: 2; flex: none; width: 44px; height: 44px; display: grid; place-items: center; border: 0; border-radius: 50%; background: none; color: var(--ink); cursor: pointer; }
.mp-close:hover { background: var(--line); }
@keyframes mp-in { from { transform: translateY(24px); opacity: 0; } to { transform: none; opacity: 1; } }
@media (min-width: 900px) {
  .mp--mini { inset-inline: auto; inset-inline-end: 16px; bottom: 16px; width: 360px; }
}
/* مساحة أسفل الصفحات كي لا يغطي الشريط المصغّر آخر المحتوى */
html[data-mp="mini"] .main { padding-bottom: calc(var(--nav-h) + 24px + 80px + env(safe-area-inset-bottom, 0px)); }
@media (min-width: 900px) { html[data-mp="mini"] .main { padding-bottom: 112px; } }
@media (prefers-reduced-motion: reduce) { .mp--mini { animation: none; } }

/* ---------- لوحة التحكم: تبويب الإحصائيات ---------- */
.stats { display: grid; gap: 16px; }
.stats-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.stats-head h2, .stats-head h3 { font-size: 1.05rem; margin: 0; display: inline-flex; align-items: center; gap: 6px; }
.stat-grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.stat-tile, .stat-card { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; min-width: 0; }
.stat-tile { display: grid; gap: 4px; align-content: start; }
.stat-label { color: var(--mute); font-size: .88rem; }
.stat-value { font-size: 1.7rem; line-height: 1.2; font-weight: 700; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.stat-note { color: var(--mute); font-size: .78rem; }
.stat-tile--warn { border-color: var(--accent); }
.stat-tile--warn .stat-value { color: var(--accent); }
.stat-card--full { grid-column: 1 / -1; display: grid; gap: 10px; }
.stat-reports { padding: 0; border: 0; background: none; }
.stat-reports .panel { max-width: none; margin-bottom: 0; }
.stat-chart { width: 100%; height: auto; display: block; }
.stat-grid { stroke: var(--line); stroke-width: 1; }
.stat-axis { fill: var(--mute); font-size: 11px; font-variant-numeric: tabular-nums; }
.stat-bar { fill: var(--accent); }
.stat-bar:hover { opacity: .75; }
.range-seg { display: inline-flex; gap: 4px; padding: 3px; border: 1px solid var(--line); border-radius: 999px; }
.range-seg button { border: 0; background: none; color: var(--mute); border-radius: 999px; padding: 4px 12px; font-size: .82rem; cursor: pointer; }
.range-seg button.on { background: var(--accent); color: var(--accent-ink); font-weight: 600; }
@media (max-width: 380px) { .stat-value { font-size: 1.4rem; } .stat-tile, .stat-card { padding: 12px; } }

/* ---------- لوحة التحكم: تقسيم (ثلثان إعدادات | ثلث معاينة) ---------- */
.admin--split { max-width: 1480px; }
/* زر العين يتبع التمرير: يبقى ظاهرًا تحت الشريط العلوي أثناء النزول والصعود (الحاوية لا تعترض النقر، والزر وحده يلتقطه). */
.admin-pvtoggle { display: flex; justify-content: flex-end; margin-bottom: 10px; position: sticky; top: calc(var(--top) + 8px); z-index: 30; pointer-events: none; }
.admin-pvbtn { pointer-events: auto; display: inline-grid; place-items: center; width: 40px; height: 40px; padding: 0; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); box-shadow: 0 2px 8px rgba(0, 0, 0, .18); }
.admin-split { display: grid; grid-template-columns: minmax(0, 1fr); gap: 20px; align-items: start; }
@media (min-width: 1100px) {
  /* في التبويبات التي لها معاينة يبقى العمودان (ثلثان | ثلث) حتى والمعاينة مخفية، فلا تتمدد المربعات عند إغلاقها؛ يبقى الثلث فارغًا. */
  .admin--split .admin-split { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); }
  .admin-split-side { position: sticky; top: calc(var(--top) + 12px); }
}
.admin-split-main { min-width: 0; }
.admin-split-main .panel { max-width: none; }
.pv { display: grid; gap: 8px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 10px; }
.pv-bar { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.pv-stage { height: min(70dvh, 760px); min-height: 420px; display: grid; justify-content: center; background: var(--bg); border-radius: 10px; overflow: hidden; }
@media (max-width: 1099px) { .pv-stage { height: 70dvh; } }
.pv-device { position: relative; overflow: hidden; border: 1px solid var(--line); background: var(--surface); border-radius: 10px; }
.pv-stage[data-device="mobile"] .pv-device { border-radius: 18px; }
.pv-device iframe { display: block; border: 0; transform-origin: top right; position: absolute; top: 0; right: 0; background: var(--bg); }

/* ---------- لوحة التحكم: أقسام قابلة للنقل + تبويب الترس ---------- */
.msec { min-width: 0; }
.msec-host { align-items: start; }
.msec-from { margin: 0 0 6px; font-weight: 600; }
/* شريط الحفظ الموحّد أعلى إعدادات كل تبويب: الحالة على اليمين والأزرار على اليسار (RTL) */
.savebar { position: sticky; top: calc(var(--top) + env(safe-area-inset-top, 0px) + 8px); z-index: 12; display: flex; align-items: center; gap: 10px 14px; flex-wrap: wrap; margin-bottom: 14px; padding: 10px 14px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 6px 18px rgba(0, 0, 0, .08); }
.savebar-status { flex: 1 1 180px; min-width: 0; font-size: .9rem; }
.savebar-status .field-error { margin-top: 0; }
.savebar-ok { color: var(--accent); font-weight: 600; }
.savebar-btns { display: flex; gap: 8px; flex-wrap: wrap; }
.savebar .btn, .unsaved-box .btn { margin-top: 0; min-height: 40px; padding: 6px 18px; }
.savebar .btn:disabled, .unsaved-box .btn:disabled { opacity: .5; cursor: not-allowed; }
/* نافذة التحذير عند مغادرة تبويب فيه تعديلات غير محفوظة */
.unsaved-overlay { position: fixed; inset: 0; z-index: 95; display: grid; place-items: center; padding: 16px; background: rgba(6, 14, 22, .55); backdrop-filter: blur(2px); }
.unsaved-box { width: min(100%, 420px); display: grid; gap: 12px; padding: 20px; background: var(--surface); color: var(--ink); border: 1px solid var(--line); border-radius: 18px; box-shadow: 0 18px 50px rgba(0, 0, 0, .35); }
.unsaved-box h2 { font-size: 1.1rem; }
.unsaved-box .hint { margin: 0; }
.tab--gear { padding-inline: 14px; display: inline-flex; align-items: center; margin-inline-start: auto; }
.tabs--main { align-items: stretch; }
.layout-ed { display: grid; gap: 16px; }
/* عمودان من البطاقات (عمود واحد على الشاشات الضيقة) */
.layout-cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; align-items: start; }
.layout-col { display: grid; gap: 14px; min-width: 0; align-content: start; }
@media (max-width: 760px) { .layout-cols { grid-template-columns: minmax(0, 1fr); } }
.layout-tab--over { outline: 2px dashed var(--accent); outline-offset: 2px; }
.layout-row[draggable="true"] { cursor: grab; }
.layout-row--drag { opacity: .4; }
.layout-row--before { box-shadow: 0 -3px 0 0 var(--accent); }
.layout-list--end > .layout-row:last-child { box-shadow: 0 3px 0 0 var(--accent); }
.layout-grip { font-style: normal; color: var(--mute); margin-inline-end: 4px; }
.layout-empty--over { color: var(--accent); }
.layout-tab { margin-bottom: 0; max-width: none; }
.layout-tab h3 { margin: 0 0 10px; font-size: 1rem; display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.layout-tab h3 small { color: var(--mute); font-weight: 400; }
.layout-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.layout-row { display: grid; gap: 6px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg); }
.layout-name { display: grid; gap: 2px; min-width: 0; font-weight: 600; overflow-wrap: anywhere; }
.layout-name small { color: var(--accent); font-weight: 400; }
.layout-ctl { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.layout-ctl select { flex: 1 1 140px; min-width: 0; }
/* إدارة التبويبات (تبويب الترس): إضافة وإعادة تسمية وحذف */
.tabs-mgr { display: grid; gap: 12px; }
.tm-add input { flex: 1 1 180px; min-width: 0; min-height: 44px; padding: 8px 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); font: inherit; }
.tm-add select { flex: 1 1 160px; min-width: 0; min-height: 44px; }
.tm-list { display: grid; gap: 12px; }
.tm-group { display: grid; gap: 6px; padding: 10px; border: 1px solid var(--line); border-radius: 12px; background: var(--bg); }
.tm-row { display: flex; gap: 8px; align-items: center; }
.tm-row input { flex: 1; min-width: 0; min-height: 40px; padding: 6px 10px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); font: inherit; }
.tm-row--group input { font-weight: 700; }
.tm-row--tab { margin-inline-start: 18px; }
.tm-kind { flex: 0 0 auto; min-width: 42px; font-size: .75rem; color: var(--mute); }
.tm-sys { margin: 0; }


/* داخل إطار معاينة لوحة التحكم فقط: العنصر الذي يتأثر بالقسم الذي يحرّره المشرف الآن. */
[data-pv-focus] { outline: 3px solid #f59e0b; outline-offset: 4px; border-radius: 10px; animation: pv-focus-pulse 1.4s ease-out 2; }
@keyframes pv-focus-pulse { 0% { outline-color: #f59e0b; } 50% { outline-color: rgba(245, 158, 11, .25); } 100% { outline-color: #f59e0b; } }

/* ---------- الإذاعة (/radio): مشغّل درايف أعلى الصفحة وقائمة أناشيد على لوحة زجاجية مبهجة للأطفال ---------- */
.radio { max-width: 760px; margin-inline: auto; }
.radio-player { padding: 0 16px; display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; }
.radio-player .player { aspect-ratio: 16 / 7; min-height: 150px; }
.radio-now { display: flex; align-items: center; gap: 10px; }
.radio-title { flex: 1; min-width: 0; text-align: center; line-height: 1.35; }
.radio-title strong { display: block; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.radio-title small { color: var(--mute); font-size: .78rem; }
.radio-step { width: 40px; height: 40px; flex: none; display: grid; place-items: center; border-radius: 50%; cursor: pointer;
  background: var(--surface); color: var(--ink); border: 1px solid var(--line); transition: border-color .15s, transform .15s; }
.radio-step:hover:not(:disabled) { border-color: var(--accent); transform: scale(1.06); }
.radio-step:disabled { opacity: .45; cursor: default; }
.radio-step svg { transform: rotate(90deg); }
/* مشغّل الصوت المباشر (عنصر audio) */
.radio-bar { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 18px; background: var(--surface); border: 1px solid var(--line); direction: ltr; }
.radio-play { width: 48px; height: 48px; flex: none; display: grid; place-items: center; border: 0; border-radius: 50%; cursor: pointer; background: var(--accent); color: var(--accent-ink); }
.radio-play svg { width: 26px; height: 26px; }
.radio-play:hover { filter: brightness(1.08); }
.radio-bar input[type="range"] { flex: 1; min-width: 0; accent-color: var(--accent); height: 28px; margin: 0; cursor: pointer; touch-action: pan-y; }
.radio-bar input[type="range"]:disabled { cursor: default; opacity: .5; }
/* الصوت: أيقونة بجانب عداد الوقت؛ بالضغط عليها ينفتح منزلق طولي فوقها ويختفي بعد التحديد. */
.radio-vol { position: relative; flex: none; }
.radio-vol > button { width: 36px; height: 36px; display: grid; place-items: center; padding: 0; border: 0; border-radius: 50%; cursor: pointer; background: transparent; color: var(--mute); }
.radio-vol > button:hover, .radio-vol > button[aria-expanded="true"] { color: var(--accent); }
.radio-vol svg { width: 22px; height: 22px; }
.radio-vol-pop { position: absolute; z-index: 6; top: calc(100% + 8px); right: 0; width: 44px; height: 140px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); box-shadow: 0 8px 24px rgba(0, 0, 0, .35); }
.radio-vol-pop input[type="range"] { position: absolute; left: 50%; top: 50%; flex: none; width: 110px; height: 28px; margin: -14px 0 0 -55px; transform: rotate(-90deg); touch-action: none; }
.radio-time { flex: none; font-size: .82rem; font-variant-numeric: tabular-nums; color: var(--mute); white-space: nowrap; }

/* اللوحة: ألوان فرحة تطفو خلف عناصر زجاجية شفافة (التمويه على العناصر فيظهر اللون من خلفها) */
.radio-glass { position: relative; isolation: isolate; overflow: hidden; margin: 16px 16px 0; padding: 14px 12px 12px; border-radius: 28px;
  background: linear-gradient(135deg, color-mix(in srgb, #ffd54a 26%, var(--surface)), color-mix(in srgb, #6ee7ff 24%, var(--surface)) 55%, color-mix(in srgb, #ff9ad5 26%, var(--surface)));
  border: 1.5px solid rgba(255, 255, 255, .55); box-shadow: 0 10px 30px color-mix(in srgb, #7c5cff 18%, transparent), inset 0 1px 0 rgba(255, 255, 255, .6); }
.radio-glass::before, .radio-glass::after { content: ""; position: absolute; z-index: -1; border-radius: 50%; filter: blur(2px); pointer-events: none; }
.radio-glass::before { width: 190px; height: 190px; top: -50px; inset-inline-start: -40px; background: radial-gradient(circle at 35% 35%, #ff8a5c, #ff4fa3 70%); opacity: .55; animation: radio-float 9s ease-in-out infinite; }
.radio-glass::after { width: 230px; height: 230px; bottom: -70px; inset-inline-end: -50px; background: radial-gradient(circle at 60% 40%, #5ee0ff, #7c5cff 75%); opacity: .5; animation: radio-float 11s ease-in-out infinite reverse; }
.radio-glass-h { display: flex; align-items: center; gap: 8px; padding: 0 6px 10px; font-weight: 700; font-size: 1.02rem; }
.radio-glass-h span { display: inline-block; animation: radio-bounce 2.2s ease-in-out infinite; }

.radio-list { display: grid; gap: 9px; max-height: min(52dvh, 440px); overflow-y: auto; overflow-x: hidden; padding: 4px 10px 6px; scroll-behavior: smooth; overscroll-behavior: contain; touch-action: pan-y; }
.radio-list li { --c: #22b8f0; animation: radio-in .5s cubic-bezier(.2, .9, .3, 1.3) both; animation-delay: calc(var(--i, 0) * 55ms); }
.radio-item { width: 100%; display: flex; align-items: center; gap: 12px; padding: 10px 12px; text-align: start; cursor: pointer; color: var(--ink);
  background: color-mix(in srgb, var(--surface) 55%, transparent); border: 1.5px solid rgba(255, 255, 255, .6); border-radius: 20px;
  -webkit-backdrop-filter: blur(10px) saturate(150%); backdrop-filter: blur(10px) saturate(150%);
  box-shadow: 0 3px 10px color-mix(in srgb, var(--c) 18%, transparent), inset 0 1px 0 rgba(255, 255, 255, .55);
  transition: transform .2s cubic-bezier(.2, .9, .3, 1.4), border-color .18s, background .18s, box-shadow .18s; }
.radio-item:hover { transform: translateX(-5px) scale(1.015); border-color: var(--c); }
.radio-item:active { transform: scale(.985); }
/* اللمس: بلا إزاحة/تكبير عند الضغط كي لا تتجاوز الأسطر عرض القائمة */
@media (hover: none) { .radio-item:hover { transform: none; } }
.radio-item.on { border-color: var(--c); background: color-mix(in srgb, var(--c) 24%, color-mix(in srgb, var(--surface) 55%, transparent)); box-shadow: 0 5px 16px color-mix(in srgb, var(--c) 38%, transparent), inset 0 1px 0 rgba(255, 255, 255, .6); }
.radio-n { width: 38px; height: 38px; flex: none; display: grid; place-items: center; border-radius: 50%; font-size: .9rem; font-weight: 700; color: #fff;
  background: radial-gradient(circle at 32% 28%, color-mix(in srgb, var(--c) 55%, #fff), var(--c) 70%); box-shadow: 0 2px 6px color-mix(in srgb, var(--c) 50%, transparent); text-shadow: 0 1px 2px rgba(0, 0, 0, .25); }
.radio-item.on .radio-n { animation: radio-wiggle 1.6s ease-in-out infinite; }
.radio-t { flex: 1; min-width: 0; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.radio-go { color: var(--c); opacity: 0; transform: translateX(6px); transition: opacity .18s, transform .18s; display: grid; }
.radio-item:hover .radio-go, .radio-item:focus-visible .radio-go { opacity: 1; transform: none; }
.radio-item.on .radio-go { display: none; }
.radio-eq { display: inline-flex; align-items: flex-end; gap: 2px; height: 15px; }
.radio-eq i { width: 3px; height: 100%; background: currentColor; border-radius: 2px; transform-origin: bottom; animation: radio-eq 1s ease-in-out infinite; }
.radio-eq i:nth-child(2) { animation-delay: -.35s; }
.radio-eq i:nth-child(3) { animation-delay: -.7s; }
@keyframes radio-in { from { opacity: 0; transform: translateY(16px) scale(.96); } to { opacity: 1; transform: none; } }
@keyframes radio-eq { 0%, 100% { transform: scaleY(.3); } 50% { transform: scaleY(1); } }
@keyframes radio-float { 0%, 100% { transform: translate(0, 0); } 50% { transform: translate(18px, 14px); } }
@keyframes radio-bounce { 0%, 100% { transform: translateY(0) rotate(-6deg); } 50% { transform: translateY(-4px) rotate(6deg); } }
@keyframes radio-wiggle { 0%, 100% { transform: rotate(-7deg); } 50% { transform: rotate(7deg); } }
@media (max-width: 600px) { .radio-player .player { aspect-ratio: 16 / 9; } .radio-glass { margin-inline: 12px; border-radius: 24px; } }

/* قائمة أناشيد الإذاعة في الإدارة: سطر لكل نشيد وأيقونات (رفع/خفض/تعديل/حذف) */
.rd-row { display: grid; gap: 10px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.rd-line { display: flex; align-items: center; gap: 10px; }
.rd-line .arow-info { flex: 1; }
.rd-line .arow-info strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rd-actions { display: flex; gap: 6px; flex: none; }
.rd-row .iconbtn { width: 38px; height: 38px; min-height: 0; padding: 0; }
.rd-edit { display: grid; gap: 8px; }
.rd-edit input { width: 100%; min-height: 40px; padding: 8px 10px; border-radius: 10px; border: 1px solid var(--line); background: var(--bg); color: var(--ink); font: inherit; }
@media (max-width: 420px) { .rd-actions { gap: 4px; } .rd-row .iconbtn { width: 34px; height: 34px; } }

/* زر الإغلاق أعلى نافذة الحساب لا يغطي أول زر */
.acct-close + .acct-actions { padding-inline-end: 44px; }
.acct-close + .acct-mode { margin-top: 0; padding-inline-end: 44px; }
/* صفحة المشاهدة على الجوال: المشغّل ملاصق للترويسة كما في الموقع القديم */
@media (max-width: 1199px) { .main:has(.watch) { padding-top: 0; } }
