/* ═══════════════════ المشاهد الحية: الأساس المشترك ═══════════════════
   src/views/scenes → <div class="scene scene-<kind> scene--<variant>" data-scene aria-hidden="true">.
   هنا: ألوان المشاهد للثيمين (--sc-*)، إطار النافذة (.sc-window)، مقاس ومكان كل نوع عرض (card / hero / mini)
   وأقنعة التلاشي، أماكن الاستضافة (.hero-stage، .page-hero-grid)، قاعدة الإيقاف (.scene بدون is-live = الحركة
   واقفة)، وبدون حركة (prefers-reduced-motion = ولا حركة أبدًا). ستايل كل مشهد في <kind>.css تحت .scene-<kind>.
   المقاسات بـ em: خط المشهد = عرض صندوقه ÷ --sc-em (card 30، hero 50، mini 28)، فكل شي يكبر ويصغر مع الصندوق. */

/* ── الألوان: الداكن (الافتراضي) ── */
:root {
  --sc-mono: 'Cascadia Code', Consolas, 'SF Mono', Menlo, monospace;
  --sc-sans: var(--font);
  --sc-radius: 1.15em;
  --sc-radius-sm: 0.6em;
  /* النافذة: زجاج كحلي غامق، حد فضي خفيف، ظل عميق */
  --sc-win-bg: linear-gradient(180deg, rgba(23, 27, 42, 0.94), rgba(11, 14, 24, 0.96));
  --sc-win-bar: rgba(255, 255, 255, 0.035);
  --sc-win-line: rgba(255, 255, 255, 0.12);
  --sc-win-hi: rgba(255, 255, 255, 0.08);
  --sc-win-shadow: 0 1.8em 3.6em -1.6em rgba(0, 0, 0, 0.85), 0 0 0 1px rgba(0, 0, 0, 0.3);
  --sc-win-shadow-hero: 0 1em 1.8em -1em rgba(0, 0, 0, 0.8), 0 0 0 1px rgba(0, 0, 0, 0.3);
  /* داخل النافذة: ألواح، فواصل، نصوص (من الأقوى للأخف) */
  --sc-panel: rgba(255, 255, 255, 0.035);
  --sc-panel-2: rgba(255, 255, 255, 0.065);
  --sc-line: rgba(255, 255, 255, 0.07);
  --sc-line-2: rgba(255, 255, 255, 0.14);
  --sc-ink: #e8ecf4;
  --sc-ink-2: #aab3c3;
  --sc-ink-3: #6f7a8f;
  --sc-ink-4: #444d60;
  --sc-caret: #eef1f6;
  --sc-sel: rgba(167, 139, 250, 0.26);
  --sc-hl: rgba(255, 255, 255, 0.045);
  /* ألوان الكود */
  --sc-syn-keyword: #c4a7ff;
  --sc-syn-string: #7ee2b8;
  --sc-syn-func: #7cc4ff;
  --sc-syn-number: #f6c177;
  --sc-syn-comment: #66718a;
  --sc-syn-punct: #8f9ab0;
  --sc-syn-var: #e6ebf5;
  --sc-syn-type: #67e8f9;
  --sc-syn-prop: #f5a8d0;
  --sc-syn-tag: #ff9e9e;
  /* ألوان الحركة (نفس ألوان الموقع) */
  --sc-a1: var(--accent-1);
  --sc-a2: var(--accent-2);
  --sc-a3: var(--accent-3);
  --sc-ok: var(--ok);
  --sc-warn: var(--warn);
  --sc-danger: #ff6b81;
  --sc-pink: #f472b6;
  --sc-live: #ff4d5e;
  --sc-discord: #5865f2;
  --sc-dot-1: #ff6b6b;
  --sc-dot-2: #f6c453;
  --sc-dot-3: #4fd18b;
  /* توهج خلف المشهد الكبير */
  --sc-glow: rgba(124, 92, 255, 0.24);
  --sc-glow-2: rgba(56, 140, 245, 0.16);
  /* الشفافية حسب نوع العرض (البطاقة خفيفة عشان النص فوقها يبقى واضح) */
  --sc-card-op: 0.5;
  --sc-card-op-hover: 0.8;
  --sc-hero-op: 1;
  --sc-mini-op: 1;
}

/* ── الألوان: الفاتح (زجاج أبيض، كود بألوان أغمق) ── */
:root[data-theme='light'] {
  --sc-win-bg: linear-gradient(180deg, rgba(255, 255, 255, 0.97), rgba(245, 247, 252, 0.95));
  --sc-win-bar: rgba(22, 29, 46, 0.03);
  --sc-win-line: rgba(22, 29, 46, 0.12);
  --sc-win-hi: rgba(255, 255, 255, 0.95);
  --sc-win-shadow: 0 1.6em 3.2em -1.6em rgba(30, 40, 80, 0.38), 0 0 0 1px rgba(22, 29, 46, 0.03);
  --sc-win-shadow-hero: 0 1em 1.8em -1em rgba(30, 40, 80, 0.32), 0 0 0 1px rgba(22, 29, 46, 0.03);
  --sc-panel: rgba(22, 29, 46, 0.035);
  --sc-panel-2: rgba(22, 29, 46, 0.065);
  --sc-line: rgba(22, 29, 46, 0.08);
  --sc-line-2: rgba(22, 29, 46, 0.15);
  --sc-ink: #172033;
  --sc-ink-2: #4a5468;
  --sc-ink-3: #868fa2;
  --sc-ink-4: #c3c9d4;
  --sc-caret: #172033;
  --sc-sel: rgba(124, 92, 240, 0.18);
  --sc-hl: rgba(22, 29, 46, 0.04);
  --sc-syn-keyword: #7c3aed;
  --sc-syn-string: #0f7b55;
  --sc-syn-func: #2563eb;
  --sc-syn-number: #b45309;
  --sc-syn-comment: #8a94a8;
  --sc-syn-punct: #5b6578;
  --sc-syn-var: #1f2937;
  --sc-syn-type: #0e8fa3;
  --sc-syn-prop: #c0267a;
  --sc-syn-tag: #d23b3b;
  --sc-danger: #e0364f;
  --sc-pink: #db2777;
  --sc-live: #e5283c;
  --sc-dot-1: #ff6159;
  --sc-dot-2: #ffbd2e;
  --sc-dot-3: #28c941;
  --sc-glow: rgba(124, 92, 240, 0.17);
  --sc-glow-2: rgba(59, 130, 246, 0.13);
  --sc-card-op: 0.62;
  --sc-card-op-hover: 0.9;
}

/* ── الجذر: طبقة زينة فوق مكانها، ما تاخذ ماوس ولا تحديد، وحاوية مقاس (cqi / cqh للمحتوى) ── */
.scene {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  contain: layout paint style;
  container-type: size;
  pointer-events: none;
  user-select: none;
  -webkit-user-select: none;
  color: var(--sc-ink);
  font-family: var(--sc-sans);
  font-weight: 400;
  line-height: 1.45;
  letter-spacing: normal;
  text-align: start;
  --sc-em: 30;
  --sc-fs-min: 6.5px;
  --sc-fs-max: 12px;
}
/* 1em داخل المشهد = عرض الصندوق ÷ --sc-em (بحدود) */
.scene > * { font-size: clamp(var(--sc-fs-min), calc(100cqi / var(--sc-em)), var(--sc-fs-max)); }
.scene *, .scene *::before, .scene *::after { box-sizing: border-box; }
.scene svg { display: block; overflow: visible; }

/* ── إطار النافذة (sceneWindow) ── */
.scene .sc-window {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  border-radius: var(--sc-radius);
  background: var(--sc-win-bg);
  border: 1px solid var(--sc-win-line);
  box-shadow: var(--sc-win-shadow), inset 0 1px 0 var(--sc-win-hi);
  overflow: hidden;
  color: var(--sc-ink);
}
.scene .sc-titlebar { position: relative; display: flex; align-items: center; gap: 0.75em; flex: none; height: 2.5em; padding-inline: 0.95em; background: var(--sc-win-bar); border-bottom: 1px solid var(--sc-line); }
.scene .sc-dots { display: inline-flex; gap: 0.42em; flex: none; }
.scene .sc-dots i { display: block; width: 0.66em; height: 0.66em; border-radius: 50%; background: var(--sc-dot-1); }
.scene .sc-dots i:nth-child(2) { background: var(--sc-dot-2); }
.scene .sc-dots i:nth-child(3) { background: var(--sc-dot-3); }
.scene .sc-title { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-family: var(--sc-mono); font-size: 0.8em; color: var(--sc-ink-3); }
.scene .sc-bar { display: flex; align-items: center; gap: 0.5em; margin-inline-start: auto; flex: none; }
.scene .sc-body { position: relative; flex: 1; min-height: 0; overflow: hidden; }

/* ── أدوات مشتركة: مؤشر الكتابة، ألوان الكود، حركة طفو اختيارية ── */
.scene .sc-mono { font-family: var(--sc-mono); }
.scene .sc-caret { display: inline-block; width: 0.14em; height: 1.15em; margin-inline-start: 0.06em; vertical-align: -0.22em; border-radius: 1px; background: var(--sc-caret); animation: sc-blink 1.06s steps(1, end) infinite; }
@keyframes sc-blink { 50% { opacity: 0; } }
.scene .sc-k { color: var(--sc-syn-keyword); }
.scene .sc-s { color: var(--sc-syn-string); }
.scene .sc-f { color: var(--sc-syn-func); }
.scene .sc-n { color: var(--sc-syn-number); }
.scene .sc-c { color: var(--sc-syn-comment); font-style: italic; }
.scene .sc-p { color: var(--sc-syn-punct); }
.scene .sc-v { color: var(--sc-syn-var); }
.scene .sc-t { color: var(--sc-syn-type); }
.scene .sc-pr { color: var(--sc-syn-prop); }
.scene .sc-tg { color: var(--sc-syn-tag); }
/* طفو هادي للنافذة (اختياري: sceneWindow({ cls: 'sc-float' })) — يتأخر حسب ترتيب المشهد عشان ما يتحركون سوا */
.scene .sc-float { animation: sc-float 9s ease-in-out calc(var(--sc-i, 0) * -1.7s) infinite; }
@keyframes sc-float { 0%, 100% { translate: 0 0; } 50% { translate: 0 -0.5em; } }

/* ═════ البطاقة (card): نافذة خفيفة مايلة في الزاوية العلوية جهة النهاية، تتلاشى ناحية النص ═════
   صندوق 16:10 بعرض 62% من البطاقة (حد 380px)؛ القناع يخليه واضح عند الزاوية ويختفي قبل العنوان والوصف. */
.scene--card {
  inset-block: 16px auto;
  inset-inline: auto 16px;
  width: min(62%, 380px);
  height: auto;
  aspect-ratio: 16 / 10;
  z-index: -1;
  opacity: var(--sc-card-op);
  --sc-em: 30;
  --sc-fs-min: 6.5px;
  --sc-fs-max: 12px;
  --sc-corner: 100%;
  --sc-tilt: 9deg;
  --sc-fade-x: to left;
  /* تلاشي بالعرض (ناحية النص: بداية السطر) × تلاشي لتحت (ناحية الوصف والشارات) */
  -webkit-mask-image: linear-gradient(var(--sc-fade-x), #000 40%, rgba(0, 0, 0, 0.4) 68%, transparent 94%), linear-gradient(to bottom, #000 38%, rgba(0, 0, 0, 0.45) 70%, transparent 100%);
  mask-image: linear-gradient(var(--sc-fade-x), #000 40%, rgba(0, 0, 0, 0.4) 68%, transparent 94%), linear-gradient(to bottom, #000 38%, rgba(0, 0, 0, 0.45) 70%, transparent 100%);
  -webkit-mask-composite: source-in;
  mask-composite: intersect;
  transition: opacity 0.6s var(--ease, ease);
}
[dir='rtl'] .scene--card { --sc-corner: 0%; --sc-tilt: -9deg; --sc-fade-x: to right; }
.scene--card > .sc-window { transform: perspective(60em) rotateY(var(--sc-tilt)) rotateX(5deg); transform-origin: var(--sc-corner) 0%; }
:is(:hover, :focus-visible) > .scene--card { opacity: var(--sc-card-op-hover); }

/* ═════ الكبير (hero): داخل .hero-stage، صندوق 16:10، واضح بالكامل ═════ */
.scene--hero { opacity: var(--sc-hero-op); --sc-em: 50; --sc-fs-min: 7px; --sc-fs-max: 13px; --sc-win-shadow: var(--sc-win-shadow-hero); }
/* مسافة حول النافذة عشان ظلها ما ينقص عند حد الصندوق (overflow: hidden) */
.scene--hero > .sc-window { inset: 3% 3% 8%; }

/* ═════ المصغّر (mini): لتكوين الاستوديو في الرئيسية؛ المكان والمقاس من الحاوية ═════ */
.scene--mini { opacity: var(--sc-mini-op); --sc-em: 28; --sc-fs-min: 6.5px; --sc-fs-max: 11px; }

/* ═════ أماكن الاستضافة ═════
   .hero-stage.solo        → المشهد لحاله (صفحة البوتات، أو قسم بدون بنر): صندوق 16:10.
   .hero-stage.has-banner  → المشهد فوق، والبنر قدّامه يغطي آخره (من 44% من العرض) بعرض 86% بالوسط. */
.hero-stage { position: relative; isolation: isolate; }
/* التوهج ينتهي عند حد المسرح من تحت ويتلاشى قبله (القسم overflow: hidden: لو طلع تحت ينقص بخط واضح) */
.hero-stage::before { content: ''; position: absolute; z-index: -1; inset: -12% -8% 0; pointer-events: none; background: radial-gradient(46% 50% at 50% 42%, var(--sc-glow), transparent 72%), radial-gradient(34% 38% at 80% 66%, var(--sc-glow-2), transparent 70%); -webkit-mask-image: linear-gradient(to bottom, #000 62%, transparent 100%); mask-image: linear-gradient(to bottom, #000 62%, transparent 100%); }
.hero-stage.solo { aspect-ratio: 16 / 10; }
.hero-stage.has-banner { padding-top: 44%; }
.hero-stage.has-banner > .scene--hero { inset: 0 0 auto 0; height: auto; aspect-ratio: 16 / 10; }
.hero-stage.has-banner > img { position: relative; z-index: 1; width: 86%; margin-inline: auto; box-shadow: var(--shadow-media), 0 0 0 1px rgba(var(--fg), 0.06); }
.product-hero-grid > .hero-stage { align-self: center; }
@media (max-width: 920px) {
  .hero-stage { width: 100%; max-width: 600px; margin-inline: auto; }
}

/* رأس صفحة داخلية بعمودين (النص + مشهد): صفحة البوتات */
.page-hero-grid { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 44px; align-items: center; }
.page-hero-grid > * { min-width: 0; }
@media (max-width: 920px) {
  .page-hero-grid { grid-template-columns: 1fr; gap: 28px; }
}

/* ═════ البطاقات الصغيرة في الإنجليزي (العناوين أطول): المشهد أضيق ويتلاشى أبكر ناحية النص ═════ */
@media (min-width: 1081px) {
  [dir='ltr'] .dept-count-5 > :nth-child(n + 3) > .scene--card {
    width: min(54%, 300px);
    -webkit-mask-image: linear-gradient(var(--sc-fade-x), #000 30%, rgba(0, 0, 0, 0.35) 62%, transparent 85%), linear-gradient(to bottom, #000 34%, rgba(0, 0, 0, 0.4) 64%, transparent 94%);
    mask-image: linear-gradient(var(--sc-fade-x), #000 30%, rgba(0, 0, 0, 0.35) 62%, transparent 85%), linear-gradient(to bottom, #000 34%, rgba(0, 0, 0, 0.4) 64%, transparent 94%);
  }
}

/* ═════ الجوال: البطاقة أصغر، أوضح فوق (جنب الأيقونة) وتختفي قبل العنوان ═════ */
@media (max-width: 640px) {
  .scene--card {
    width: min(60%, 260px);
    inset-block: 12px auto;
    inset-inline: auto 12px;
    --sc-card-op: 0.6;
    -webkit-mask-image: linear-gradient(var(--sc-fade-x), #000 40%, rgba(0, 0, 0, 0.4) 68%, transparent 94%), linear-gradient(to bottom, #000 30%, transparent 78%);
    mask-image: linear-gradient(var(--sc-fade-x), #000 40%, rgba(0, 0, 0, 0.4) 68%, transparent 94%), linear-gradient(to bottom, #000 30%, transparent 78%);
  }
  :root[data-theme='light'] .scene--card { --sc-card-op: 0.62; }
  /* مؤشر الكتابة ثابت (رمشته = إطار كامل للصفحة مرتين بالثانية على معالج أضعف) */
  .scene .sc-caret { animation: none; }
}

/* ═════ «يرتاح» (index.js): المحتوى يتلاشى، يرجع للإطار الكامل، ويطلع من جديد — الإطار والنقاط ثابتين ═════ */
.scene .sc-window > .sc-body,
.scene .sc-title,
.scene .sc-bar { transition: opacity 0.3s ease; }
.scene.is-resting .sc-window > .sc-body,
.scene.is-resting .sc-title,
.scene.is-resting .sc-bar,
.scene.is-resting > :not(.sc-window) { opacity: 0; transition: opacity 0.3s ease; }

/* ═════ الإيقاف: المشهد اللي مو على الشاشة (أو الصفحة مخفية) كل حركته واقفة؛ index.js يحط is-live ═════
   بدون JavaScript: تبقى واقفة على أول إطار (أو الإطار اللي يحدده animation-delay السالب). */
.scene:not(.is-live),
.scene:not(.is-live)::before,
.scene:not(.is-live)::after,
.scene:not(.is-live) *,
.scene:not(.is-live) *::before,
.scene:not(.is-live) *::after { animation-play-state: paused !important; }

/* ═════ بدون حركة: ولا حركة أبدًا — الستايل الأساسي (بدون keyframes) هو الإطار الثابت ═════ */
@media (prefers-reduced-motion: reduce) {
  .scene,
  .scene::before,
  .scene::after,
  .scene *,
  .scene *::before,
  .scene *::after { animation: none !important; transition: none !important; }
}
.scene.is-static,
.scene.is-static *,
.scene.is-static *::before,
.scene.is-static *::after { animation: none !important; transition: none !important; }

@media print {
  .scene, .hero-stage::before { display: none !important; }
}

/* مشهد «البوتات» (src/views/scenes/bots.mjs + public/js/scenes/bots.js): شات ديسكورد حي وبوت يرد بـ embed.
   كل محدد يبدأ بـ .scene-bots. ألوان ديسكورد مكيّفة على ثيمي الموقع (--bots-*، والمشترك من base.css --sc-*).
   الستايل الأساسي = الإطار الثابت (كل شي ظاهر)؛ حركات الدخول بس على اللي يضيفه JS (.is-in / .is-pending …). */

/* ── الألوان: الداكن ── */
.scene-bots {
  --bots-blurple: var(--sc-discord);
  --bots-blurple-ink: #c3c8ff;
  --bots-rail: rgba(3, 5, 12, 0.36);
  --bots-side: rgba(255, 255, 255, 0.022);
  --bots-embed: rgba(255, 255, 255, 0.042);
  --bots-embed-line: rgba(255, 255, 255, 0.065);
  --bots-input: rgba(255, 255, 255, 0.06);
  --bots-pop: rgba(24, 28, 44, 0.98);
  --bots-pop-shadow: 0 1em 2.4em -0.8em rgba(0, 0, 0, 0.75);
  --bots-chip: rgba(88, 101, 242, 0.26);
  --bots-link: #7cc4ff;
  --bots-track: rgba(255, 255, 255, 0.09);
  --bots-hover: rgba(255, 255, 255, 0.06);
  --bots-react: rgba(255, 255, 255, 0.06);
  --bots-react-on: rgba(88, 101, 242, 0.2);
  --bots-ring-bg: #121626;
  --bots-n1: #c4b5fd;
  --bots-n2: #6ee7b7;
  --bots-n3: #f9a8d4;
  --bots-n4: #fcd34d;
  --bots-bot: #a5b4fc;
  --bots-danger-bg: rgba(255, 77, 94, 0.13);
  --bots-dir: -1;
}
/* ── الألوان: الفاتح ── */
:root[data-theme='light'] .scene-bots {
  --bots-blurple-ink: #3b45c4;
  --bots-rail: rgba(22, 29, 46, 0.055);
  --bots-side: rgba(22, 29, 46, 0.022);
  --bots-embed: rgba(22, 29, 46, 0.032);
  --bots-embed-line: rgba(22, 29, 46, 0.07);
  --bots-input: rgba(22, 29, 46, 0.055);
  --bots-pop: rgba(255, 255, 255, 0.99);
  --bots-pop-shadow: 0 1em 2.4em -0.9em rgba(30, 40, 80, 0.35);
  --bots-chip: rgba(88, 101, 242, 0.14);
  --bots-link: #2563eb;
  --bots-track: rgba(22, 29, 46, 0.09);
  --bots-hover: rgba(22, 29, 46, 0.05);
  --bots-react: rgba(22, 29, 46, 0.05);
  --bots-react-on: rgba(88, 101, 242, 0.12);
  --bots-ring-bg: #eef0f6;
  --bots-n1: #6d28d9;
  --bots-n2: #047857;
  --bots-n3: #be185d;
  --bots-n4: #a16207;
  --bots-bot: #4f46e5;
  --bots-danger-bg: rgba(229, 40, 60, 0.08);
}
/* اتجاه تعبئة الشريط: LTR من اليسار، RTL من اليمين */
.scene-bots .sc-window[dir='rtl'] { --bots-dir: 1; }

/* ═════ الهيكل: سيرفرات | رومات | الشات ═════ */
.scene-bots .bots-app > .sc-body { display: flex; }
.scene-bots .bots-main { position: relative; flex: 1; min-width: 0; display: flex; flex-direction: column; }

/* شريط العنوان: العنوان بخط عادي (العربي ما يركب على الخط الثابت)، المتصلين، وهوية البوت */
.scene-bots .bots-app .sc-title { font-family: var(--sc-sans); font-size: 0.74em; font-weight: 600; letter-spacing: 0.01em; }
.scene-bots .bots-botchip { display: inline-flex; align-items: center; gap: 0.4em; padding: 0.22em 0.55em 0.22em 0.25em; border-radius: 2em; background: var(--sc-panel-2); box-shadow: inset 0 0 0 1px var(--sc-line); font-size: 0.8em; white-space: nowrap; }
.scene-bots .sc-window[dir='rtl'] .bots-botchip { padding: 0.22em 0.25em 0.22em 0.55em; }
.scene-bots .bots-botchip .bots-av { font-size: 0.68em; }
.scene-bots .bots-botchip b { font-size: 0.86em; font-weight: 700; color: var(--bots-bot); letter-spacing: 0.02em; }
.scene-bots .bots-botchip .bots-tag { font-size: 0.6em; }
.scene-bots .bots-st { width: 0.5em; height: 0.5em; border-radius: 50%; background: var(--sc-ok); }
.scene-bots .bots-botchip.is-busy .bots-st { background: var(--sc-a1); animation: bots-talk 0.8s ease-in-out infinite; }
.scene-bots .bots-online { display: inline-flex; align-items: center; gap: 0.35em; font-size: 0.72em; color: var(--sc-ink-3); white-space: nowrap; }
.scene-bots .bots-online i { width: 0.55em; height: 0.55em; border-radius: 50%; background: var(--sc-ok); box-shadow: 0 0 0 0.2em color-mix(in srgb, var(--sc-ok) 22%, transparent); }
.scene-bots .bots-online b { font-weight: 600; color: var(--sc-ink-2); font-variant-numeric: tabular-nums; }

/* ── شريط السيرفرات ── */
.scene-bots .bots-rail { flex: none; display: flex; flex-direction: column; align-items: center; gap: 0.5em; width: 3.5em; padding: 0.7em 0; background: var(--bots-rail); border-inline-end: 1px solid var(--sc-line); }
.scene-bots .bots-srv { position: relative; display: grid; place-items: center; flex: none; width: 2.8em; height: 2.8em; border-radius: 50%; background: var(--sc-panel-2); font-size: 0.82em; font-style: normal; font-weight: 800; line-height: 1; color: var(--sc-ink-2); }
.scene-bots .bots-srv.is-on { border-radius: 0.85em; background: linear-gradient(140deg, var(--sc-a1), var(--sc-a2) 70%, var(--sc-a3)); color: #fff; letter-spacing: 0.02em; box-shadow: 0 0.4em 1em -0.4em var(--sc-a1); }
.scene-bots .bots-srv.is-on::before { content: ''; position: absolute; inset-inline-start: -0.62em; top: 24%; bottom: 24%; width: 0.22em; border-start-end-radius: 0.3em; border-end-end-radius: 0.3em; background: var(--sc-ink-2); }
.scene-bots .bots-srv.is-add { background: transparent; box-shadow: inset 0 0 0 1px var(--sc-line-2); }
.scene-bots .bots-srv.is-add::before,
.scene-bots .bots-srv.is-add::after { content: ''; grid-area: 1 / 1; width: 0.95em; height: 0.14em; border-radius: 1px; background: var(--sc-ok); }
.scene-bots .bots-srv.is-add::after { transform: rotate(90deg); }
/* سيرفر فيه جديد (bots.js يحطها ويشيلها) */
.scene-bots .bots-srv.is-ping::after { content: ''; position: absolute; inset-inline-end: -0.1em; bottom: -0.1em; width: 0.85em; height: 0.85em; border-radius: 50%; background: var(--sc-danger); box-shadow: 0 0 0 0.2em var(--bots-ring-bg); animation: bots-ping 0.5s cubic-bezier(0.3, 1.6, 0.5, 1) both; }
.scene-bots .bots-sep { flex: none; width: 1.3em; height: 0.14em; border-radius: 1px; background: var(--sc-line-2); }

/* ── قائمة الرومات ── */
.scene-bots .bots-side { flex: none; display: flex; flex-direction: column; width: 10.8em; background: var(--bots-side); border-inline-end: 1px solid var(--sc-line); }
.scene-bots .bots-guild { display: flex; align-items: center; justify-content: space-between; flex: none; height: 2.7em; padding-inline: 0.9em; border-bottom: 1px solid var(--sc-line); }
.scene-bots .bots-guild b { font-size: 0.76em; font-weight: 800; letter-spacing: 0.08em; color: var(--sc-ink); white-space: nowrap; }
.scene-bots .bots-guild::after { content: ''; width: 0.42em; height: 0.42em; margin-top: -0.25em; border-right: 0.13em solid var(--sc-ink-3); border-bottom: 0.13em solid var(--sc-ink-3); transform: rotate(45deg); }
.scene-bots .bots-chans { flex: 1; min-height: 0; display: flex; flex-direction: column; gap: 0.1em; padding: 0.35em 0.5em; overflow: hidden; }
.scene-bots .bots-cat { padding: 0.95em 0.55em 0.3em; font-size: 0.56em; font-weight: 700; letter-spacing: 0.09em; text-transform: uppercase; color: var(--sc-ink-3); white-space: nowrap; }
.scene-bots .bots-ch { display: flex; align-items: center; gap: 0.45em; flex: none; height: 2.05em; padding-inline: 0.55em; border-radius: 0.45em; font-size: 0.78em; color: var(--sc-ink-3); white-space: nowrap; }
.scene-bots .bots-ch::before { content: '#'; font-size: 1.2em; font-weight: 400; color: var(--sc-ink-4); }
.scene-bots .bots-ch.is-on { background: var(--sc-panel-2); color: var(--sc-ink); font-weight: 600; }
.scene-bots .bots-ch.is-on::before { color: var(--sc-ink-3); }
.scene-bots .bots-ch.is-unread { color: var(--sc-ink); font-weight: 600; }
.scene-bots .bots-ch.is-unread b { margin-inline-start: auto; min-width: 1.5em; padding: 0.1em 0.4em; border-radius: 1em; background: var(--sc-danger); color: #fff; font-size: 0.78em; text-align: center; font-variant-numeric: tabular-nums; }
.scene-bots .bots-ch.is-voice::before { content: ''; width: 0.85em; height: 0.85em; background: var(--sc-ink-3); clip-path: polygon(0 32%, 32% 32%, 70% 0, 70% 100%, 32% 68%, 0 68%); }
.scene-bots .bots-vc { display: flex; align-items: center; gap: 0.5em; flex: none; height: 1.95em; padding-inline-start: 1.9em; font-size: 0.72em; color: var(--sc-ink-2); white-space: nowrap; }
.scene-bots .bots-vc .bots-av { font-size: 0.62em; }
.scene-bots .bots-me { display: flex; align-items: center; gap: 0.5em; flex: none; height: 3em; padding-inline: 0.6em; background: var(--bots-rail); }
.scene-bots .bots-me .bots-av { font-size: 0.8em; }
.scene-bots .bots-me-n { display: flex; flex-direction: column; min-width: 0; line-height: 1.25; }
.scene-bots .bots-me-n b { font-size: 0.74em; font-weight: 600; }
.scene-bots .bots-me-n span { font-size: 0.6em; color: var(--sc-ink-3); }
.scene-bots .bots-gear { margin-inline-start: auto; font-size: 0.95em; font-style: normal; color: var(--sc-ink-3); }

/* ── رأس الشات ── */
.scene-bots .bots-head { display: flex; align-items: center; gap: 0.7em; flex: none; height: 2.7em; padding-inline: 1em; border-bottom: 1px solid var(--sc-line); }
.scene-bots .bots-head b { flex: none; font-size: 0.86em; font-weight: 700; white-space: nowrap; }
.scene-bots .bots-head b::before { content: '#'; margin-inline-end: 0.3em; font-weight: 400; color: var(--sc-ink-3); }
.scene-bots .bots-head span { min-width: 0; padding-inline-start: 0.8em; border-inline-start: 1px solid var(--sc-line-2); font-size: 0.7em; color: var(--sc-ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.scene-bots .bots-search { position: relative; flex: none; width: 7em; height: 1.55em; margin-inline-start: auto; border-radius: 0.4em; background: var(--bots-input); }
.scene-bots .bots-search::after { content: ''; position: absolute; inset-inline-end: 0.55em; top: 0.36em; width: 0.5em; height: 0.5em; border: 0.12em solid var(--sc-ink-3); border-radius: 50%; }
.scene-bots .bots-search::before { content: ''; position: absolute; inset-inline-end: 0.42em; top: 0.92em; width: 0.28em; height: 0.12em; border-radius: 1px; background: var(--sc-ink-3); transform: rotate(45deg); }
.scene-bots .sc-window[dir='rtl'] .bots-search::before { transform: rotate(-45deg); }

/* ═════ الرسائل ═════ */
/* السجل: الرسائل تنضاف تحت والقديمة تطلع لفوق (الكبير)؛ البطاقة والمصغّر: الرد فوق */
.scene-bots .bots-log { position: relative; flex: 1; min-height: 0; display: flex; flex-direction: column; justify-content: flex-end; padding: 0 1em 0.55em; overflow: hidden; -webkit-mask-image: linear-gradient(to bottom, transparent, #000 2.4em); mask-image: linear-gradient(to bottom, transparent, #000 2.4em); }
.scene-bots .bots-feed { display: flex; flex-direction: column; gap: 0.85em; }
.scene-bots .bots-feed.is-shift-a { animation: bots-shift-a 0.55s cubic-bezier(0.2, 0.8, 0.2, 1); }
.scene-bots .bots-feed.is-shift-b { animation: bots-shift-b 0.55s cubic-bezier(0.2, 0.8, 0.2, 1); }

.scene-bots .bots-msg { position: relative; display: grid; grid-template-columns: 2.3em minmax(0, 1fr); column-gap: 0.8em; align-items: start; }
.scene-bots .bots-mb { position: relative; min-width: 0; }
.scene-bots .bots-mh { display: flex; align-items: baseline; gap: 0.45em; min-width: 0; line-height: 1.35; white-space: nowrap; }
.scene-bots .bots-mh b { font-size: 0.86em; font-weight: 600; }
.scene-bots .bots-mh span { font-size: 0.6em; color: var(--sc-ink-3); overflow: hidden; text-overflow: ellipsis; }
.scene-bots .bots-mh .a1 { color: var(--bots-n1); }
.scene-bots .bots-mh .a2 { color: var(--bots-n2); }
.scene-bots .bots-mh .a3 { color: var(--bots-n3); }
.scene-bots .bots-mh .a4 { color: var(--bots-n4); }
.scene-bots .bots-mh .is-botname { color: var(--bots-bot); }
.scene-bots .bots-mh .is-spamname { color: var(--sc-ink-2); }
.scene-bots .bots-tag { display: inline-flex; align-items: center; gap: 0.25em; align-self: center; direction: ltr; padding: 0.12em 0.42em; border-radius: 0.3em; background: var(--bots-blurple); color: #fff; font-size: 0.56em; font-style: normal; font-weight: 700; letter-spacing: 0.04em; line-height: 1.3; }
.scene-bots .bots-tag::before { content: '✓'; font-size: 0.95em; }
.scene-bots .bots-text { margin-top: 0.1em; font-size: 0.84em; line-height: 1.45; color: var(--sc-ink); opacity: 0.88; }
.scene-bots .bots-text u { color: var(--bots-link); text-decoration-thickness: 1px; text-underline-offset: 0.15em; unicode-bidi: isolate; direction: ltr; }

/* سطر «فلان استخدم /أمر» فوق رد البوت، بخط يوصل لصورته */
.scene-bots .bots-ref { position: relative; grid-column: 1 / -1; display: flex; align-items: center; gap: 0.4em; min-width: 0; margin-bottom: 0.2em; padding-inline-start: 3.3em; font-size: 0.7em; line-height: 1.7; color: var(--sc-ink-3); white-space: nowrap; }
.scene-bots .bots-ref::before { content: ''; position: absolute; inset-inline-start: 1.62em; top: 0.85em; width: 1.4em; height: 1.1em; border-top: 0.14em solid var(--sc-line-2); border-inline-start: 0.14em solid var(--sc-line-2); border-start-start-radius: 0.55em; }
.scene-bots .bots-ref b { font-weight: 600; }
.scene-bots .bots-ref .a1 { color: var(--bots-n1); }
.scene-bots .bots-slash { color: var(--bots-blurple-ink); font-weight: 600; }

/* ── الصور الدائرية: حرف على تدرّج، والبوت وجه روبوت يرمش ── */
.scene-bots .bots-av { position: relative; display: inline-grid; place-items: center; flex: none; width: 2.3em; height: 2.3em; border-radius: 50%; background: linear-gradient(140deg, #8b93a7, #5b6478); color: #fff; font-style: normal; font-weight: 700; font-size: 1em; line-height: 1; }
.scene-bots .bots-av.is-xs { font-size: 0.62em; }
.scene-bots .bots-av.a1 { background: linear-gradient(140deg, #a78bfa, #60a5fa); }
.scene-bots .bots-av.a2 { background: linear-gradient(140deg, #34d399, #22b8cf); }
.scene-bots .bots-av.a3 { background: linear-gradient(140deg, #f472b6, #a78bfa); }
.scene-bots .bots-av.a4 { background: linear-gradient(140deg, #fbbf24, #f97316); }
.scene-bots .bots-av.is-spam { background: linear-gradient(140deg, #4b5263, #2f3542); font-size: 0.95em; }
.scene-bots .bots-av.is-bot { background: linear-gradient(145deg, #5865f2, #8b7cf8 55%, #60a5fa); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.18); }
.scene-bots .bots-av.is-bot::before { content: ''; grid-area: 1 / 1; width: 58%; height: 38%; border-radius: 0.32em; background: rgba(255, 255, 255, 0.95); }
.scene-bots .bots-av.is-bot::after { content: ''; grid-area: 1 / 1; width: 58%; height: 38%; background: radial-gradient(circle at 31% 50%, #3730a3 0 0.15em, transparent 0.16em), radial-gradient(circle at 69% 50%, #3730a3 0 0.15em, transparent 0.16em); animation: bots-blink 5s ease-in-out infinite; animation-delay: calc(var(--sc-i, 0) * -1.3s); }
.scene-bots .bots-av.is-on::after { content: ''; position: absolute; inset-inline-end: -0.08em; bottom: -0.08em; width: 0.7em; height: 0.7em; border-radius: 50%; background: var(--sc-ok); box-shadow: 0 0 0 0.18em var(--bots-ring-bg); }
.scene-bots .bots-av.is-talk::after { content: ''; position: absolute; inset: -0.2em; border-radius: 50%; border: 0.16em solid var(--sc-ok); animation: bots-talk 1.5s ease-in-out infinite; }

/* ── رد البوت: «يفكّر…» (وقت الانتظار بس)، الـ embed، التفاعلات ── */
.scene-bots .bots-think { display: none; align-items: center; gap: 0.3em; margin-top: 0.2em; font-size: 0.78em; font-style: italic; color: var(--sc-ink-3); }
.scene-bots .bots-think i { width: 0.36em; height: 0.36em; border-radius: 50%; background: currentColor; animation: bots-dot 1.1s ease-in-out infinite; }
.scene-bots .bots-think i:first-of-type { margin-inline-start: 0.15em; }
.scene-bots .bots-think i:nth-of-type(2) { animation-delay: 0.15s; }
.scene-bots .bots-think i:nth-of-type(3) { animation-delay: 0.3s; }
.scene-bots .bots-msg.is-pending .bots-think { display: flex; }
.scene-bots .bots-msg.is-pending .bots-embed,
.scene-bots .bots-msg.is-pending .bots-reacts { display: none; }

.scene-bots .bots-embed { --bots-accent: var(--sc-a1); position: relative; max-width: 25em; margin-top: 0.4em; padding: 0.72em 0.85em 0.78em; border-radius: 0.45em; background: var(--bots-embed); border: 1px solid var(--bots-embed-line); border-inline-start: 0.26em solid var(--bots-accent); overflow: hidden; }
/* لمعة تمر على الـ embed لما ينفتح (بلون القسم) */
.scene-bots .bots-embed::after { content: ''; position: absolute; inset-block: 0; inset-inline-start: 0; width: 45%; background: linear-gradient(90deg, transparent, color-mix(in srgb, var(--bots-accent) 15%, transparent), transparent); opacity: 0; pointer-events: none; }
.scene-bots .bots-embed.is-bank { --bots-accent: var(--sc-ok); }
.scene-bots .bots-embed.is-shield { --bots-accent: var(--sc-danger); }
.scene-bots .bots-et { display: flex; align-items: center; justify-content: space-between; gap: 0.6em; }
.scene-bots .bots-et b { min-width: 0; font-size: 0.8em; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.scene-bots .bots-pill { flex: none; padding: 0.15em 0.55em; border-radius: 1em; background: color-mix(in srgb, var(--bots-accent) 16%, transparent); color: var(--bots-accent); font-size: 0.56em; font-weight: 800; letter-spacing: 0.08em; white-space: nowrap; }
.scene-bots .bots-pill.is-ok { background: color-mix(in srgb, var(--sc-ok) 16%, transparent); color: var(--sc-ok); letter-spacing: 0.02em; }
.scene-bots .bots-ltr { direction: ltr; unicode-bidi: isolate; }

/* بطاقة الرانك */
.scene-bots .bots-rk { display: flex; align-items: center; gap: 0.7em; }
.scene-bots .bots-ring { position: relative; display: grid; place-items: center; flex: none; width: 3.1em; height: 3.1em; }
.scene-bots .bots-ring svg { position: absolute; inset: 0; width: 100%; height: 100%; transform: rotate(-90deg); }
.scene-bots .bots-ring circle { fill: none; stroke-width: 2.6; }
.scene-bots .bots-ring-t { stroke: var(--bots-track); }
.scene-bots .bots-ring-f { stroke: var(--sc-a1); stroke-linecap: round; stroke-dasharray: 100; stroke-dashoffset: 22; }
.scene-bots .bots-ring .bots-av { width: 2.3em; height: 2.3em; font-size: 0.95em; }
.scene-bots .bots-who { display: flex; flex-direction: column; min-width: 0; line-height: 1.3; }
.scene-bots .bots-who b { font-size: 0.86em; font-weight: 700; white-space: nowrap; }
.scene-bots .bots-who span { font-size: 0.64em; color: var(--sc-ink-3); white-space: nowrap; }
.scene-bots .bots-lvl { position: relative; display: flex; flex-direction: column; align-items: center; margin-inline-start: auto; line-height: 1; }
/* شرار «لفل أب» حول الرقم (يطلع مرة لما الـ embed ينفتح) */
.scene-bots .bots-lvl::before,
.scene-bots .bots-lvl::after { content: ''; position: absolute; left: 50%; top: 60%; width: 3.6em; height: 3.6em; margin: -1.8em 0 0 -1.8em; border-radius: 50%; pointer-events: none; opacity: 0; background: radial-gradient(circle at 50% 6%, var(--sc-a1) 0 0.13em, transparent 0.15em), radial-gradient(circle at 92% 38%, var(--sc-a3) 0 0.11em, transparent 0.13em), radial-gradient(circle at 78% 88%, var(--sc-warn) 0 0.12em, transparent 0.14em), radial-gradient(circle at 18% 86%, var(--sc-a2) 0 0.11em, transparent 0.13em), radial-gradient(circle at 6% 36%, var(--sc-pink) 0 0.12em, transparent 0.14em); }
.scene-bots .bots-lvl::after { transform: rotate(36deg); }
.scene-bots .bots-lvl span { font-size: 0.52em; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--sc-ink-3); }
.scene-bots .bots-lvl b { margin-top: 0.08em; font-family: var(--font-display, var(--sc-sans)); font-size: 1.85em; font-weight: 800; font-variant-numeric: tabular-nums; background: linear-gradient(135deg, var(--sc-a1), var(--sc-a2) 55%, var(--sc-a3)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.scene-bots .bots-xp { position: relative; display: flex; align-items: center; gap: 0.6em; margin-top: 0.62em; }
.scene-bots .bots-bar { position: relative; flex: 1; height: 0.5em; border-radius: 1em; background: var(--bots-track); overflow: hidden; }
.scene-bots .bots-bar i { --p: 78%; display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--sc-a1), var(--sc-a2), var(--sc-a3)); transform: translateX(calc(var(--bots-dir) * (100% - var(--p)))); }
.scene-bots .sc-window[dir='rtl'] .bots-bar i { background: linear-gradient(270deg, var(--sc-a1), var(--sc-a2), var(--sc-a3)); }
.scene-bots .bots-xpn { flex: none; direction: ltr; unicode-bidi: isolate; font-size: 0.62em; color: var(--sc-ink-3); font-variant-numeric: tabular-nums; white-space: nowrap; }
.scene-bots .bots-xpn b { font-weight: 700; color: var(--sc-ink); }
.scene-bots .bots-chips { display: flex; flex-wrap: wrap; gap: 0.4em; margin-top: 0.6em; }
.scene-bots .bots-chips span { padding: 0.25em 0.65em; border-radius: 1em; background: var(--sc-panel-2); font-size: 0.62em; color: var(--sc-ink-2); white-space: nowrap; }
/* «+45 XP» تطير من أرقام الخبرة (اتجاهها ltr، فمكانها بالجهات الفعلية) */
.scene-bots .bots-gain { position: absolute; right: 0; bottom: 100%; margin-bottom: 0.35em; padding: 0.15em 0.55em; border-radius: 1em; background: color-mix(in srgb, var(--sc-a1) 22%, transparent); color: var(--sc-a1); font-size: 0.6em; font-style: normal; font-weight: 800; direction: ltr; unicode-bidi: isolate; opacity: 0; }

/* رصيد البنك */
.scene-bots .bots-bk { display: flex; align-items: flex-end; justify-content: space-between; gap: 0.8em; margin-top: 0.45em; }
.scene-bots .sc-window[dir='rtl'] .bots-gain { right: auto; left: 0; }

.scene-bots .bots-big { display: flex; flex-wrap: wrap; align-items: baseline; column-gap: 0.35em; min-width: 0; line-height: 1.1; }
.scene-bots .bots-big b { font-family: var(--font-display, var(--sc-sans)); font-size: 1.6em; font-weight: 800; font-variant-numeric: tabular-nums; letter-spacing: -0.01em; color: var(--sc-ink); }
.scene-bots .bots-big i { font-size: 1em; font-style: normal; }
.scene-bots .bots-big em { flex-basis: 100%; margin-top: 0.25em; font-size: 0.62em; font-style: normal; font-weight: 700; color: var(--sc-ok); white-space: nowrap; }
.scene-bots .bots-big em span { direction: ltr; unicode-bidi: isolate; }
.scene-bots .bots-spark { flex: none; width: 8.5em; height: auto; }
.scene-bots .bots-area { fill: var(--sc-ok); opacity: 0.13; }
.scene-bots .bots-line { fill: none; stroke: var(--sc-ok); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 100; stroke-dashoffset: 0; }
.scene-bots .bots-tip { fill: var(--sc-ok); transform-box: fill-box; transform-origin: center; animation: bots-tip 1.8s ease-in-out infinite; }
.scene-bots .bots-fields { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.5em; margin-top: 0.6em; }
.scene-bots .bots-fields span { display: grid; justify-items: start; min-width: 0; line-height: 1.35; }
.scene-bots .bots-fields i { font-size: 0.56em; font-style: normal; font-weight: 700; letter-spacing: 0.04em; color: var(--sc-ink-3); }
.scene-bots .bots-fields b { max-width: 100%; font-size: 0.74em; font-weight: 600; color: var(--sc-ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-variant-numeric: tabular-nums; }
.scene-bots .bots-fields b.is-up { color: var(--sc-ok); }

/* تقرير الحماية */
.scene-bots .bots-embed.is-shield .bots-fields { margin-top: 0.5em; }
.scene-bots .bots-foot { margin-top: 0.55em; font-size: 0.56em; color: var(--sc-ink-3); }

/* رسالة النصّاب: تنصاد (وميض أحمر + هزّة) ثم تنحذف */
.scene-bots .bots-msg.is-spam::before { content: ''; position: absolute; inset: -0.3em -0.5em; border-radius: 0.5em; background: var(--bots-danger-bg); border-inline-start: 0.2em solid var(--sc-danger); opacity: 0; }
.scene-bots .bots-del { position: absolute; inset-inline: 0; bottom: 0; display: flex; align-items: center; font-size: 0.74em; font-style: italic; color: var(--sc-danger); white-space: nowrap; opacity: 0; }
.scene-bots .bots-msg.is-caught::before { animation: bots-flash 0.7s ease-out forwards; }
.scene-bots .bots-msg.is-caught .bots-mb { animation: bots-shake 0.45s ease-in-out; }
.scene-bots .bots-msg.is-gone .bots-text { opacity: 0; transition: opacity 0.35s; }
.scene-bots .bots-msg.is-gone .bots-del { opacity: 1; transition: opacity 0.35s 0.15s; }
.scene-bots .bots-msg.is-gone > .bots-av { opacity: 0.4; transition: opacity 0.35s; }

/* التفاعلات */
.scene-bots .bots-reacts { display: flex; flex-wrap: wrap; gap: 0.32em; margin-top: 0.42em; }
.scene-bots .bots-react { display: inline-flex; align-items: center; gap: 0.32em; height: 1.75em; padding-inline: 0.5em; border-radius: 0.5em; background: var(--bots-react); border: 1px solid transparent; font-size: 0.74em; line-height: 1; }
.scene-bots .bots-react i { font-style: normal; font-size: 1.05em; }
.scene-bots .bots-react b { font-size: 0.9em; font-weight: 600; color: var(--sc-ink-2); font-variant-numeric: tabular-nums; }
.scene-bots .bots-react.is-mine { background: var(--bots-react-on); border-color: color-mix(in srgb, var(--bots-blurple) 70%, transparent); }
.scene-bots .bots-react.is-mine b { color: var(--bots-blurple-ink); }

/* ═════ خانة الكتابة + قائمة الأوامر + «يكتب…» ═════ */
.scene-bots .bots-compose { position: relative; z-index: 2; flex: none; padding: 0 1em 0.15em; }
.scene-bots .bots-input { display: flex; align-items: center; gap: 0.6em; height: 2.7em; padding-inline: 0.8em; border-radius: 0.65em; background: var(--bots-input); white-space: nowrap; overflow: hidden; }
.scene-bots .bots-plus { position: relative; display: grid; place-items: center; flex: none; width: 1.35em; height: 1.35em; border-radius: 50%; background: var(--sc-ink-3); opacity: 0.75; }
.scene-bots .bots-plus::before,
.scene-bots .bots-plus::after { content: ''; grid-area: 1 / 1; width: 0.6em; height: 0.12em; border-radius: 1px; background: var(--bots-ring-bg); }
.scene-bots .bots-plus::after { transform: rotate(90deg); }
.scene-bots .bots-ph { min-width: 0; font-size: 0.8em; color: var(--sc-ink-3); overflow: hidden; text-overflow: ellipsis; }
.scene-bots .bots-typed { font-size: 0.84em; color: var(--sc-ink); white-space: pre; }
.scene-bots .bots-input .sc-caret { display: none; height: 1.25em; }
.scene-bots .bots-input.has-text .bots-ph { display: none; }
.scene-bots .bots-input:not(.has-text) .bots-typed { display: none; }
.scene-bots .bots-input.has-text .sc-caret,
.scene-bots .bots-input.is-typing .sc-caret { display: inline-block; }
.scene-bots .bots-input.is-chip .bots-typed { padding: 0.12em 0.5em; border-radius: 0.38em; background: var(--bots-chip); color: var(--bots-blurple-ink); font-weight: 700; }
.scene-bots .bots-typing { display: flex; align-items: center; gap: 0.4em; height: 1.7em; padding-inline: 0.25em; font-size: 0.68em; color: var(--sc-ink-3); white-space: nowrap; opacity: 0; transition: opacity 0.25s; }
.scene-bots .bots-typing b { font-weight: 700; color: var(--sc-ink-2); }
.scene-bots .bots-typing.is-on { opacity: 1; }
.scene-bots .bots-dots { display: inline-flex; gap: 0.22em; }
.scene-bots .bots-dots i { width: 0.42em; height: 0.42em; border-radius: 50%; background: var(--sc-ink-2); animation: bots-dot 1.1s ease-in-out infinite; }
.scene-bots .bots-dots i:nth-child(2) { animation-delay: 0.15s; }
.scene-bots .bots-dots i:nth-child(3) { animation-delay: 0.3s; }
.scene-bots .bots-typing:not(.is-on) .bots-dots i { animation: none; }

.scene-bots .bots-pop { position: absolute; inset-inline-start: 1em; bottom: calc(100% + 0.1em); width: min(24em, calc(100% - 2em)); padding: 0.35em; border-radius: 0.65em; background: var(--bots-pop); border: 1px solid var(--sc-win-line); box-shadow: var(--bots-pop-shadow); opacity: 0; transform: translateY(0.6em) scale(0.98); transform-origin: 50% 100%; transition: opacity 0.14s, transform 0.24s cubic-bezier(0.2, 0.8, 0.2, 1); }
.scene-bots .bots-pop.is-open { opacity: 1; transform: none; }
.scene-bots .bots-pop-h { display: flex; align-items: center; gap: 0.45em; padding: 0.35em 0.5em 0.45em; font-size: 0.6em; font-weight: 800; letter-spacing: 0.08em; color: var(--sc-ink-3); }
.scene-bots .bots-pop-h .bots-av { font-size: 0.75em; }
.scene-bots .bots-opt { display: flex; align-items: baseline; gap: 0.65em; padding: 0.45em 0.6em; border-radius: 0.45em; white-space: nowrap; overflow: hidden; }
.scene-bots .bots-opt b { flex: none; font-size: 0.8em; font-weight: 700; color: var(--sc-ink); }
.scene-bots .bots-opt span { min-width: 0; font-size: 0.66em; color: var(--sc-ink-3); overflow: hidden; text-overflow: ellipsis; }
.scene-bots .bots-opt.is-sel { background: var(--bots-hover); }
.scene-bots .bots-opt.is-pick { background: var(--bots-chip); }
.scene-bots .bots-opt.is-pick b { color: var(--bots-blurple-ink); }
.scene-bots .bots-opt.is-out { display: none; }

/* ═════ البطاقة: بدون سيرفرات ولا رومات؛ الرد فوق وخانة الكتابة تحت. الرسائل بنفس اتجاه الصفحة بس مركونة في
   الزاوية الواضحة (نهاية السطر) — بدايته جهة نص البطاقة وتتلاشى. ═════ */
.scene-bots.scene--card { --sc-card-op: 0.62; --sc-card-op-hover: 0.9; }
:root[data-theme='light'] .scene-bots.scene--card { --sc-card-op: 0.7; }
.scene-bots .bots-card .bots-log { justify-content: flex-start; padding: 0.75em 0.95em 0.3em; -webkit-mask-image: none; mask-image: none; }
.scene-bots .bots-card .bots-msg { margin-inline-start: auto; width: 80%; max-width: 80%; }
.scene-bots .bots-card .bots-embed { max-width: none; }
.scene-bots .bots-card .bots-compose { padding-inline: 0.95em; }

/* ═════ المصغّر: شريط سيرفرات نحيف + شات ═════ */
.scene-bots .bots-mini .bots-rail { width: 3em; gap: 0.45em; padding-top: 0.6em; }
.scene-bots .bots-mini .bots-srv { font-size: 0.72em; }
.scene-bots .bots-mini .bots-srv.is-on::before { inset-inline-start: -0.6em; }
.scene-bots .bots-mini .bots-log { justify-content: flex-start; padding: 0.75em 0.85em 0.2em; -webkit-mask-image: none; mask-image: none; }
.scene-bots .bots-mini .bots-embed { max-width: none; }
.scene-bots .bots-mini .bots-reacts { display: none; }
.scene-bots .bots-mini .bots-compose { padding-inline: 0.85em; }
.scene-bots .bots-mini .bots-input { height: 2.4em; }
.scene-bots .bots-mini .bots-pop { inset-inline-start: 0.85em; width: calc(100% - 1.7em); }

/* ═════ الكبير على الشاشات الصغيرة (الجوال): بدون قائمة الرومات، والشات أكبر شوي ═════ */
@container (max-width: 470px) {
  .scene-bots .bots-hero .bots-side { display: none; }
  .scene-bots .bots-hero .bots-main { font-size: 1.22em; }
  .scene-bots .bots-hero .bots-rail { width: 3.1em; }
  .scene-bots .bots-hero .bots-srv { font-size: 0.74em; }
}
/* البطاقة الصغيرة جدًا: بدون التفاعلات (تزحم) */
@container (max-width: 250px) {
  .scene-bots .bots-card .bots-reacts { display: none; }
}
/* الجوال: رسم الحلقة وخط الأسهم (SVG = على المعالج الرئيسي كل إطار) والرمش ثابتين — الشريط والعدّاد يكفون */
@media (max-width: 640px) {
  .scene-bots .bots-msg.is-in .bots-ring-f,
  .scene-bots .bots-msg.is-in .bots-line,
  .scene-bots .bots-tip,
  .scene-bots .bots-av.is-bot::after { animation: none; }
}

/* ═════ الحركة (بس على اللي يضيفه bots.js) ═════ */
.scene-bots .bots-msg.is-in { animation: bots-in 0.5s cubic-bezier(0.2, 0.8, 0.2, 1) both; }
.scene-bots .bots-msg.is-out { animation: bots-out 0.36s cubic-bezier(0.4, 0, 1, 1) forwards; }
.scene-bots .bots-msg.is-in .bots-embed { animation: bots-embed 0.55s cubic-bezier(0.2, 0.8, 0.2, 1) both; }
.scene-bots .bots-msg.is-in .bots-bar i { animation: bots-fill 1.3s 0.25s cubic-bezier(0.2, 0.8, 0.2, 1) both; }
.scene-bots .bots-msg.is-in .bots-ring-f { animation: bots-ring 1.3s 0.25s cubic-bezier(0.2, 0.8, 0.2, 1) both; }
.scene-bots .bots-msg.is-in .bots-line { animation: bots-draw 1.5s 0.2s ease-out both; }
.scene-bots .bots-msg.is-in .bots-area { animation: bots-area 1.2s 0.6s ease-out both; }
.scene-bots .bots-msg.is-in .bots-gain { animation: bots-gain 2.2s 0.9s ease-out both; }
.scene-bots .bots-msg.is-in .bots-embed::after { animation: bots-scan 1.5s 0.35s ease-in-out; }
.scene-bots .bots-msg.is-in .bots-embed.is-shield::after { animation-iteration-count: 2; }
.scene-bots .bots-msg.is-in .bots-lvl b { animation: bots-bump 0.55s 1.3s cubic-bezier(0.3, 1.7, 0.5, 1) both; }
.scene-bots .bots-msg.is-in .bots-lvl::before { animation: bots-burst 0.9s 1.3s cubic-bezier(0.2, 0.8, 0.2, 1) both; }
.scene-bots .bots-msg.is-in .bots-lvl::after { animation: bots-burst-2 1s 1.4s cubic-bezier(0.2, 0.8, 0.2, 1) both; }
.scene-bots .bots-msg.is-in .bots-react { animation: bots-pop 0.55s cubic-bezier(0.3, 1.7, 0.5, 1) both; animation-delay: 1s; }
.scene-bots .bots-msg.is-in .bots-react:nth-child(2) { animation-delay: 1.22s; }
.scene-bots .bots-msg.is-in .bots-react:nth-child(3) { animation-delay: 1.44s; }
.scene-bots .bots-msg.is-in .bots-react.is-bump { animation: bots-bump 0.45s cubic-bezier(0.3, 1.7, 0.5, 1) both; }
.scene-bots .bots-msg.is-in.is-pending .bots-think { animation: bots-fade 0.3s both; }
.scene-bots .bots-ch.is-unread b.is-bump { animation: bots-bump 0.45s cubic-bezier(0.3, 1.7, 0.5, 1); }
.scene-bots .bots-ch.is-unread b.is-bump-2 { animation: bots-bump-2 0.45s cubic-bezier(0.3, 1.7, 0.5, 1); }

@keyframes bots-in { from { opacity: 0; transform: translateY(0.8em) scale(0.985); } }
@keyframes bots-out { to { opacity: 0; transform: translateY(-1.4em) scale(0.985); } }
@keyframes bots-embed { from { opacity: 0; transform: translateY(0.5em) scale(0.97); } }
@keyframes bots-shift-a { from { transform: translateY(var(--bots-shift, 0)); } }
@keyframes bots-shift-b { from { transform: translateY(var(--bots-shift, 0)); } }
@keyframes bots-fill { from { transform: translateX(calc(var(--bots-dir) * 100%)); } }
@keyframes bots-ring { from { stroke-dashoffset: 100; } }
@keyframes bots-draw { from { stroke-dashoffset: 100; } }
@keyframes bots-area { from { opacity: 0; } }
@keyframes bots-fade { from { opacity: 0; } }
@keyframes bots-gain {
  0% { opacity: 0; transform: translateY(0.8em) scale(0.8); }
  18%, 70% { opacity: 1; transform: none; }
  100% { opacity: 0; transform: translateY(-1.4em); }
}
@keyframes bots-scan {
  0% { opacity: 0; transform: translateX(calc(var(--bots-dir) * 110%)); }
  30%, 70% { opacity: 1; }
  100% { opacity: 0; transform: translateX(calc(var(--bots-dir) * -260%)); }
}
@keyframes bots-pop {
  0% { opacity: 0; transform: scale(0.3); }
  60% { opacity: 1; transform: scale(1.14); }
  100% { opacity: 1; transform: none; }
}
@keyframes bots-bump { 45% { transform: scale(1.2); } }
@keyframes bots-bump-2 { 45% { transform: scale(1.2); } }
@keyframes bots-ping { from { transform: scale(0); } }
@keyframes bots-burst { 0% { opacity: 0; transform: scale(0.35); } 25% { opacity: 1; } 100% { opacity: 0; transform: scale(1.25); } }
@keyframes bots-burst-2 { 0% { opacity: 0; transform: rotate(36deg) scale(0.3); } 25% { opacity: 1; } 100% { opacity: 0; transform: rotate(60deg) scale(1.15); } }
@keyframes bots-dot { 0%, 60%, 100% { transform: none; opacity: 0.45; } 30% { transform: translateY(-0.32em); opacity: 1; } }
@keyframes bots-talk { 50% { opacity: 0.25; } }
@keyframes bots-blink { 0%, 90%, 100% { transform: none; } 94% { transform: scaleY(0.12); } }
@keyframes bots-tip { 50% { transform: scale(1.55); opacity: 0.55; } }
@keyframes bots-shake { 20%, 60% { transform: translateX(-0.28em); } 40%, 80% { transform: translateX(0.28em); } }
@keyframes bots-flash { 0% { opacity: 0; } 30% { opacity: 1; } 100% { opacity: 0.6; } }

/* مشهد «التصاميم» (src/views/scenes/designs.mjs + public/js/scenes/designs.js): لوحة تصميم حية — القلم يرسم بمنحنيات
   ونقاط ومقابض، الإهليلج يتسحب، الفرشاة تلوّن، تعبئة بتدرج، مربع تحديد يكبر، ولون ينختار. كل محدد تحت .scene-designs.
   الستايل الأساسي (بدون كلاسات الحركة) = الإطار الثابت: الشعار مكتمل ومحدد. الكلاسات اللي تضيفها الحركة:
   is-off (قطعة مخفية)، no-fill / no-pop (قيد الرسم)، is-alt (اللون البديل)، is-blank (مسار ما بدأ)، is-cut (بدون انتقال)،
   is-edit (وضع تعديل المسار: النقاط والمقابض وشبكة الإطار)، is-lit (توهج خلف الشغلة). */

/* ── الألوان: الداكن ── */
.scene-designs {
  --dz-k: 1;
  --dz-canvas-bg: rgba(3, 5, 12, 0.34);
  --dz-dot: rgba(255, 255, 255, 0.075);
  --dz-tick: rgba(255, 255, 255, 0.13);
  --dz-tick-2: rgba(255, 255, 255, 0.26);
  --dz-paper: linear-gradient(155deg, #19213a 0%, #0f1528 100%);
  --dz-paper-solid: #151c31;
  --dz-paper-line: rgba(255, 255, 255, 0.09);
  --dz-paper-shadow: rgba(0, 0, 0, 0.75);
  --dz-grid: rgba(244, 114, 182, 0.04);
  --dz-glow: rgba(167, 139, 250, 0.3);
  --dz-pen: #c0aeff;
  --dz-sel: #a78bfa;
  --dz-chip-bg: #8b5cf6;
  --dz-grip: #ffffff;
  --dz-cur-fill: #ffffff;
  --dz-cur-ink: #0b0d14;
  --dz-cur-line: #ffffff;
  --dz-mate: #f472b6;
  --dz-sticker: #ffffff;
  --dz-glint: #ffffff;
  --dz-core: rgba(255, 255, 255, 0.6);
  --dz-dark: #0a0e1b;
  --dz-rim: #a78bfa;
  --dz-hl: rgba(167, 139, 250, 0.2);
  --dz-hl-ink: #d9ccff;
  --dz-row-sel: rgba(167, 139, 250, 0.16);
  --dz-spark-1: #ffffff;
  --dz-spark-2: #cdc1ff;
  --dz-spark-3: #8b6cf6;
  --dz-aurora-1: #67e8f9;
  --dz-aurora-2: #60a5fa;
  --dz-aurora-3: #a78bfa;
  --dz-flame-1: #a78bfa;
  --dz-flame-2: #f472b6;
  --dz-flame-3: #fcd34d;
  --dz-ink-1: #f6f8fc;
  --dz-ink-2: #b9c1d2;
  --dz-ink-3: #7d879d;
  --dz-sw-1: #a78bfa;
  --dz-sw-2: #60a5fa;
  --dz-sw-3: #67e8f9;
  --dz-sw-4: #f472b6;
  --dz-sw-5: #f3c552;
  --dz-sw-6: #46d6a0;
  --dz-thumb: linear-gradient(135deg, #2b1d5c 0%, #1d3b8a 55%, #0e6b86 100%);
}

/* ── الألوان: الفاتح (ورقة بيضاء، تدرجات أعمق عشان تبان) ── */
:root[data-theme='light'] .scene-designs {
  --dz-canvas-bg: rgba(22, 29, 46, 0.03);
  --dz-dot: rgba(22, 29, 46, 0.11);
  --dz-tick: rgba(22, 29, 46, 0.16);
  --dz-tick-2: rgba(22, 29, 46, 0.3);
  --dz-paper: linear-gradient(155deg, #ffffff 0%, #fbfbff 100%);
  --dz-paper-solid: #ffffff;
  --dz-paper-line: rgba(22, 29, 46, 0.09);
  --dz-paper-shadow: rgba(30, 40, 80, 0.28);
  --dz-grid: rgba(219, 39, 119, 0.035);
  --dz-glow: rgba(124, 92, 240, 0.16);
  --dz-pen: #7c3aed;
  --dz-sel: #7c3aed;
  --dz-chip-bg: #7c3aed;
  --dz-cur-ink: #111827;
  --dz-cur-line: #111827;
  --dz-mate: #db2777;
  --dz-glint: #8b5cf6;
  --dz-core: rgba(255, 255, 255, 0.62);
  --dz-dark: #131a2c;
  --dz-rim: #7c3aed;
  --dz-hl: rgba(124, 58, 237, 0.12);
  --dz-hl-ink: #6d28d9;
  --dz-row-sel: rgba(124, 58, 237, 0.1);
  --dz-spark-1: #c4b5fd;
  --dz-spark-2: #8b5cf6;
  --dz-spark-3: #4c1d95;
  --dz-aurora-1: #22d3ee;
  --dz-aurora-2: #3b82f6;
  --dz-aurora-3: #7c3aed;
  --dz-flame-1: #7c3aed;
  --dz-flame-2: #ec4899;
  --dz-flame-3: #f59e0b;
  --dz-ink-1: #64748b;
  --dz-ink-2: #334155;
  --dz-ink-3: #1e293b;
  --dz-sw-1: #8b5cf6;
  --dz-sw-2: #3b82f6;
  --dz-sw-3: #06b6d4;
  --dz-sw-4: #ec4899;
  --dz-sw-5: #f59e0b;
  --dz-sw-6: #10b981;
  --dz-thumb: linear-gradient(135deg, #c4b5fd 0%, #93c5fd 55%, #a5f3fc 100%);
}
.scene-designs.scene--card { --dz-k: 1.35; --dz-glow: rgba(167, 139, 250, 0.42); }
:root[data-theme='light'] .scene-designs.scene--card { --dz-glow: rgba(124, 92, 240, 0.2); }
.scene-designs.scene--mini { --dz-k: 1.5; }

/* ── الكانفس: نقاط شبكة خفيفة ── */
.scene-designs .dz-canvas {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at center, var(--dz-dot) 0 0.07em, transparent 0.1em) 0 0 / 1.2em 1.2em, var(--dz-canvas-bg);
}
.scene-designs .dz-ruler {
  position: absolute;
  inset: 0 0 auto;
  height: 1em;
  border-bottom: 1px solid var(--sc-line);
  background:
    repeating-linear-gradient(90deg, var(--dz-tick) 0 1px, transparent 1px 1.2em) left bottom / 100% 32% no-repeat,
    repeating-linear-gradient(90deg, var(--dz-tick-2) 0 1px, transparent 1px 6em) left bottom / 100% 70% no-repeat,
    var(--sc-win-bar);
}

/* ── اللوحة (الإطار) والرسمة ── */
.scene-designs .dz-stage { position: absolute; }
.scene-designs .dz-flabel { position: absolute; bottom: calc(100% + 0.5em); left: 0; font-family: var(--sc-mono); font-size: 0.68em; line-height: 1; color: var(--sc-ink-3); white-space: nowrap; }
.scene-designs .dz-flabel::before { content: '#'; margin-inline-end: 0.45em; color: var(--sc-ink-4); }
.scene-designs .dz-frame { position: absolute; inset: 0; overflow: hidden; border-radius: 0.2em; background: var(--dz-paper); box-shadow: 0 0 0 1px var(--dz-paper-line), 0 1.4em 2.6em -1.2em var(--dz-paper-shadow); }
/* شبكة الأعمدة (تبان وقت تعديل المسار) */
.scene-designs .dz-frame::before {
  content: '';
  position: absolute;
  inset: 0 7%;
  opacity: 0;
  background: linear-gradient(90deg, var(--dz-grid) 0 21.5%, transparent 21.5% 26.17%, var(--dz-grid) 26.17% 47.67%, transparent 47.67% 52.33%, var(--dz-grid) 52.33% 73.83%, transparent 73.83% 78.5%, var(--dz-grid) 78.5% 100%);
  transition: opacity 0.5s;
}
/* توهج خلف الشغلة بعد التعبئة */
.scene-designs .dz-frame::after { content: ''; position: absolute; inset: 8%; border-radius: 50%; background: radial-gradient(closest-side, var(--dz-glow), transparent); opacity: 0; transition: opacity 0.9s; }
.scene-designs .dz-stage.is-edit .dz-frame::before,
.scene-designs .dz-stage.is-lit .dz-frame::after { opacity: 1; }
.scene-designs .dz-art { position: absolute; inset: 0; width: 100%; height: 100%; }

/* التدرجات (ألوانها من الثيم) */
.scene-designs .dz-g-spark .dz-s1 { stop-color: var(--dz-spark-1); }
.scene-designs .dz-g-spark .dz-s2 { stop-color: var(--dz-spark-2); }
.scene-designs .dz-g-spark .dz-s3 { stop-color: var(--dz-spark-3); }
.scene-designs .dz-g-aurora .dz-s1 { stop-color: var(--dz-aurora-1); }
.scene-designs .dz-g-aurora .dz-s2 { stop-color: var(--dz-aurora-2); }
.scene-designs .dz-g-aurora .dz-s3 { stop-color: var(--dz-aurora-3); }
.scene-designs .dz-g-flame .dz-s1 { stop-color: var(--dz-flame-1); }
.scene-designs .dz-g-flame .dz-s2 { stop-color: var(--dz-flame-2); }
.scene-designs .dz-g-flame .dz-s3 { stop-color: var(--dz-flame-3); }
.scene-designs .dz-g-ink .dz-s1 { stop-color: var(--dz-ink-1); }
.scene-designs .dz-g-ink .dz-s2 { stop-color: var(--dz-ink-2); }
.scene-designs .dz-g-ink .dz-s3 { stop-color: var(--dz-ink-3); }

/* القطع: تتبدل بتلاشي؛ المسار يرتسم بـ stroke-dashoffset (pathLength=1: 1 = فاضي، 0 = كامل) */
.scene-designs .dz-piece { transition: opacity 0.45s var(--ease, ease); }
.scene-designs .dz-piece.is-off { opacity: 0; }
.scene-designs .dz-trace { stroke-dasharray: 1 2; stroke-dashoffset: 0; stroke-linecap: round; stroke-linejoin: round; }
.scene-designs .dz-shape { stroke: var(--dz-pen); stroke-width: 1.1; stroke-opacity: 0; fill-opacity: 1; transition: fill-opacity 0.65s, stroke-opacity 0.5s, stroke 0.5s, stroke-width 0.5s; }
.scene-designs .dz-sticker { stroke: var(--dz-sticker); stroke-width: 2.4; stroke-opacity: 0.95; }
.scene-designs .dz-ring { stroke-width: 1.7; }
.scene-designs .dz-brush { stroke-width: 10; stroke-opacity: 0.5; transition: stroke-opacity 0.4s; }
.scene-designs .dz-band { stroke: var(--dz-dark); stroke-width: 3.4; transition: stroke 0.5s, stroke-width 0.5s; }
.scene-designs .no-fill .dz-shape { fill-opacity: 0; stroke: var(--dz-pen); stroke-width: 1.1; stroke-opacity: 1; }
.scene-designs .no-fill .dz-band { stroke: var(--dz-pen); stroke-width: 1.1; }
.scene-designs .dz-trace.is-blank,
.scene-designs .no-fill .dz-shape.is-blank { stroke-opacity: 0; }
/* اللون البديل: تحت الأصلي، والأصلي يتلاشى فوقه */
.scene-designs .dz-alt { opacity: 0; transition: opacity 0.4s; }
.scene-designs .is-alt .dz-alt { opacity: 1; }
/* وقت الرسم: الشكل الجاي يبان سكتش باهت تحت القلم (مثل طبقة مرجع) — اللوحة ما تبان فاضية أبد */
.scene-designs .dz-stage.is-edit .no-fill .dz-alt { opacity: 0.16; }
.scene-designs .is-alt .dz-shape.has-alt { fill-opacity: 0; }
/* العناصر اللي تنحط بعد الرسم (لمعات، قلب اللهب، السماعة) */
.scene-designs .dz-pop { transform-box: fill-box; transform-origin: center; transition: opacity 0.35s, transform 0.55s cubic-bezier(0.3, 1.6, 0.5, 1); }
.scene-designs .no-pop .dz-pop { opacity: 0; transform: scale(0.3); }
.scene-designs .dz-glint { fill: var(--dz-glint); }
.scene-designs .dz-core { fill: var(--dz-core); }
.scene-designs .dz-cups { fill: var(--dz-dark); stroke: var(--dz-rim); stroke-width: 0.9; }
.scene-designs .dz-piece.is-cut,
.scene-designs .dz-piece.is-cut * { transition: none !important; }

/* ── الواجهة فوق الرسمة: نقاط المسار، المقابض، التحديد، المؤشر ── */
.scene-designs .dz-anchors { fill: var(--dz-paper-solid); stroke: var(--dz-sel); stroke-width: calc(0.55px * var(--dz-k)); }
.scene-designs .dz-handle { fill: var(--dz-sel); stroke: var(--dz-sel); stroke-width: calc(0.6px * var(--dz-k)); }
.scene-designs .dz-knot { fill: var(--dz-sel); transform-box: fill-box; transform-origin: center; }
.scene-designs .dz-anchors,
.scene-designs .dz-handle,
.scene-designs .dz-knot { opacity: 0; transition: opacity 0.3s; }
.scene-designs .dz-stage.is-edit .dz-anchors,
.scene-designs .dz-stage.is-edit .dz-handle,
.scene-designs .dz-stage.is-edit .dz-knot { opacity: 1; }
.scene-designs .dz-sel { transition: opacity 0.3s; }
.scene-designs .dz-sel.is-hide { opacity: 0; }
.scene-designs .dz-sel-box { fill: none; stroke: var(--dz-sel); stroke-width: calc(0.6px * var(--dz-k)); }
.scene-designs .dz-grips { fill: var(--dz-grip); stroke: var(--dz-sel); stroke-width: calc(0.55px * var(--dz-k)); }
.scene-designs .dz-chip-bg { fill: var(--dz-chip-bg); }
.scene-designs .dz-chip-tx { fill: #ffffff; font-family: var(--sc-mono); font-size: calc(4px * var(--dz-k)); font-weight: 600; letter-spacing: 0.02em; }
.scene-designs .dz-ripple { fill: none; stroke: var(--dz-sel); stroke-width: 0.8; opacity: 0; transform-box: fill-box; transform-origin: center; }
.scene-designs .dz-ico { display: none; }
.scene-designs .dz-i-move { fill: var(--dz-cur-ink); stroke: #ffffff; stroke-width: 0.85; stroke-linejoin: round; }
.scene-designs .dz-i-pen { fill: var(--dz-cur-fill); stroke: var(--dz-cur-ink); stroke-width: 0.75; stroke-linejoin: round; }
.scene-designs .dz-i-ink { fill: none; stroke-linecap: round; }
.scene-designs .dz-i-brush { fill: none; stroke: var(--dz-cur-line); stroke-width: 0.6; }
.scene-designs .dz-i-cross { fill: none; stroke: var(--dz-cur-line); stroke-width: 0.75; stroke-linecap: round; }
.scene-designs .dz-cur[data-tool='move'] .dz-i-move,
.scene-designs .dz-cur[data-tool='pen'] .dz-i-pen,
.scene-designs .dz-cur[data-tool='brush'] .dz-i-brush,
.scene-designs .dz-cur[data-tool='ellipse'] .dz-i-cross,
.scene-designs .dz-cur[data-tool='frame'] .dz-i-cross { display: inline; }

/* ── شريط الأدوات: خلية لكل أداة، والخلفية تتحرك للأداة المختارة (--dz-t من الحركة) ── */
.scene-designs .dz-rail {
  --dz-cell: 2.5em;
  position: absolute;
  padding: 0.3em 0;
  width: var(--dz-cell);
  border-radius: 0.8em;
  background: var(--sc-panel-2);
  border: 1px solid var(--sc-line);
  box-shadow: 0 0.8em 1.6em -1em rgba(0, 0, 0, 0.5);
  color: var(--sc-ink-2);
}
.scene-designs .dz-rail svg { position: relative; width: var(--dz-cell); height: calc(var(--dz-cell) * 6); fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.scene-designs .dz-rail path { transition: stroke 0.3s; }
.scene-designs .dz-rail path.is-on { stroke: var(--dz-hl-ink); }
.scene-designs .dz-hl { position: absolute; top: calc(0.3em + var(--dz-cell) * 0.1); left: calc(var(--dz-cell) * 0.1 - 1px); width: calc(var(--dz-cell) * 0.8); height: calc(var(--dz-cell) * 0.8); border-radius: 0.45em; background: var(--dz-hl); box-shadow: inset 0 0 0 1px var(--dz-hl); transform: translateY(calc(var(--dz-t, 0) * var(--dz-cell))); transition: transform 0.4s var(--ease, ease); }

/* ── الألوان (swatches) والحلقة على المختار (--dz-sw من الحركة) ── */
.scene-designs .dz-swatches { position: absolute; display: flex; gap: 0.55em; }
.scene-designs .dz-sw { display: block; flex: none; width: 1.2em; height: 1.2em; border-radius: 50%; background: var(--dz-sw-1); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.18); }
.scene-designs .dz-sw:nth-child(2) { background: var(--dz-sw-2); }
.scene-designs .dz-sw:nth-child(3) { background: var(--dz-sw-3); }
.scene-designs .dz-sw:nth-child(4) { background: var(--dz-sw-4); }
.scene-designs .dz-sw:nth-child(5) { background: var(--dz-sw-5); }
.scene-designs .dz-sw:nth-child(6) { background: var(--dz-sw-6); }
.scene-designs .dz-swr { position: absolute; top: -0.22em; left: -0.22em; width: 1.64em; height: 1.64em; border-radius: 50%; border: 0.13em solid var(--sc-ink); transform: translateX(calc(var(--dz-sw, 0) * 1.75em)); transition: transform 0.45s var(--ease, ease); }

/* ═════ الكبير (hero): كانفس + شريط أدوات + لوحة خصائص ═════ */
.scene-designs .dz-hero .dz-canvas { right: 12.6em; }
.scene-designs .dz-hero .dz-rail { top: 1.7em; left: 0.7em; }
.scene-designs .dz-hero .dz-stage { top: 3.3em; right: 10.7em; width: 13em; height: 13em; }
/* أعمال ثانية على الكانفس (بنر وإيموجيات) يسار اللوحة */
.scene-designs .dz-thumbs { position: absolute; top: 0.1em; right: calc(100% + 1.25em); display: grid; grid-template-columns: 1fr 1fr; gap: 0.45em; width: 5.7em; opacity: 0.85; }
.scene-designs .dz-tl { grid-column: 1 / -1; font-family: var(--sc-mono); font-size: 0.6em; line-height: 1; color: var(--sc-ink-3); }
.scene-designs .dz-tl + .dz-tb { margin-top: -0.2em; }
.scene-designs .dz-tb { position: relative; grid-column: 1 / -1; display: block; height: 3.3em; margin-bottom: 0.5em; overflow: hidden; border-radius: 0.2em; background: var(--dz-thumb); box-shadow: 0 0 0 1px var(--dz-paper-line); }
.scene-designs .dz-tb::before { content: ''; position: absolute; inset: 45% -10% -20%; background: linear-gradient(180deg, rgba(10, 12, 28, 0.55), rgba(10, 12, 28, 0.85)); clip-path: polygon(0 60%, 18% 20%, 32% 48%, 52% 0, 70% 42%, 84% 22%, 100% 52%, 100% 100%, 0 100%); }
.scene-designs .dz-tb::after { content: ''; position: absolute; top: 18%; right: 16%; width: 0.8em; height: 0.8em; border-radius: 50%; background: radial-gradient(circle, #ffffff, rgba(255, 255, 255, 0.2) 60%, transparent 70%); }
.scene-designs .dz-te { display: grid; place-items: center; height: 2.6em; border-radius: 0.2em; background: var(--dz-paper); box-shadow: 0 0 0 1px var(--dz-paper-line); font-size: 1em; font-style: normal; line-height: 1; }
/* تعليق الزميلة (يطلع بعد التعبئة) */
.scene-designs .dz-comment { position: absolute; top: 0.6em; left: calc(100% + 0.7em); display: flex; align-items: flex-start; gap: 0.4em; transform-origin: 0 0; opacity: 0; transform: scale(0.6) translateY(0.4em); transition: opacity 0.3s, transform 0.45s cubic-bezier(0.3, 1.5, 0.5, 1); }
.scene-designs .dz-comment.is-on { opacity: 1; transform: none; }
.scene-designs .dz-pin { display: grid; place-items: center; flex: none; width: 2.3em; height: 2.3em; border-radius: 50% 50% 50% 0.25em; background: var(--dz-mate); color: #ffffff; font-size: 0.7em; font-style: normal; font-weight: 700; box-shadow: 0 0 0 0.18em var(--sc-panel-2); }
.scene-designs .dz-msg { width: max-content; max-width: 10.4em; padding: 0.5em 0.75em; border-radius: 0.3em 1em 1em 1em; background: var(--sc-panel-2); border: 1px solid var(--sc-line-2); box-shadow: 0 0.6em 1.2em -0.6em rgba(0, 0, 0, 0.45); color: var(--sc-ink); font-size: 0.72em; line-height: 1.35; }
:root[data-theme='light'] .scene-designs .dz-msg { background: #ffffff; }

/* لوحة الخصائص */
.scene-designs .dz-panel { position: absolute; top: 0; right: 0; bottom: 0; width: 12.6em; border-left: 1px solid var(--sc-line); background: var(--sc-panel); }
.scene-designs .dz-tabs { position: absolute; inset: 0 0 auto; display: flex; align-items: center; gap: 1.1em; height: 2.3em; padding-inline: 0.95em; border-bottom: 1px solid var(--sc-line); }
.scene-designs .dz-tabs b,
.scene-designs .dz-tabs span { font-size: 0.72em; }
.scene-designs .dz-tabs b { color: var(--sc-ink); font-weight: 600; }
.scene-designs .dz-tabs span { color: var(--sc-ink-3); }
.scene-designs .dz-sec { position: absolute; left: calc(0.95em / 0.66); font-size: 0.66em; line-height: 1; font-weight: 600; color: var(--sc-ink-2); }
.scene-designs .dz-sec-fill { top: calc(3em / 0.66); }
.scene-designs .dz-sec-layers { top: calc(8.55em / 0.66); }
.scene-designs .dz-fill { --dz-chip: var(--dz-sw-1); position: absolute; top: 4.25em; left: 0.95em; right: 0.95em; display: flex; align-items: center; gap: 0.5em; height: 1.65em; padding-inline: 0.3em 0.55em; border-radius: 0.45em; background: var(--sc-panel-2); }
.scene-designs .dz-chip { display: block; flex: none; width: 1.1em; height: 1.1em; border-radius: 0.28em; background: var(--dz-chip); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.2); transition: background-color 0.4s; }
.scene-designs .dz-hex { font-family: var(--sc-mono); font-size: 0.68em; color: var(--sc-ink); }
.scene-designs .dz-pct { margin-inline-start: auto; font-family: var(--sc-mono); font-size: 0.64em; color: var(--sc-ink-3); }
.scene-designs .dz-hero .dz-swatches { top: 6.4em; left: 0.95em; }
.scene-designs .dz-layers { position: absolute; top: 9.65em; left: 0.5em; right: 0.5em; display: flex; flex-direction: column; gap: 0.12em; }
.scene-designs .dz-row { display: flex; align-items: center; gap: 0.6em; height: calc(1.5em / 0.7); padding-inline: 0.75em; border-radius: 0.55em; font-size: 0.7em; color: var(--sc-ink-2); white-space: nowrap; opacity: 0; transform: translateX(-0.6em); transition: opacity 0.35s, transform 0.4s var(--ease, ease); }
.scene-designs .dz-row.is-on { opacity: 1; transform: none; }
.scene-designs .dz-row + .dz-row { padding-inline-start: 1.9em; }
.scene-designs .dz-row.is-sel { background: var(--dz-row-sel); color: var(--sc-ink); }
.scene-designs .dz-row::before { content: ''; flex: none; width: 0.82em; height: 0.82em; border: 0.13em solid currentColor; border-radius: 0.18em; opacity: 0.75; }
.scene-designs .dz-row[data-ico='f']::before { content: '#'; width: auto; height: auto; border: 0; font-family: var(--sc-mono); line-height: 1; }
.scene-designs .dz-row[data-ico='o']::before { border-radius: 50%; }
.scene-designs .dz-row[data-ico='v']::before { border-radius: 0.1em; transform: rotate(45deg) scale(0.82); }
.scene-designs .dz-row[data-ico='s']::before { border-radius: 0 50%; transform: rotate(45deg) scale(0.8); }
.scene-designs .dz-row[data-ico='b']::before { border-radius: 50% 0; }
.scene-designs .dz-export { position: absolute; bottom: 0.95em; left: 0.95em; right: 0.95em; display: flex; align-items: center; justify-content: space-between; height: 1.7em; padding-inline: 0.6em; border-radius: 0.45em; border: 1px solid var(--sc-line); }
.scene-designs .dz-export span { font-size: 0.66em; font-weight: 600; color: var(--sc-ink-2); }
.scene-designs .dz-export b { font-family: var(--sc-mono); font-size: 0.62em; font-weight: 400; color: var(--sc-ink-3); }

/* مؤشر الزميلة: يطير بين التعليق والألوان (data-at + --dz-mk من الحركة)؛ الإحداثيات من زاوية اللوحة */
.scene-designs .dz-mate { --dz-mx: -10.15em; --dz-my: 6.4em; position: absolute; top: 0; left: 0; display: flex; align-items: flex-start; transform: translate(var(--dz-mx), var(--dz-my)); transition: transform 0.85s cubic-bezier(0.45, 0, 0.2, 1); }
.scene-designs .dz-mate[data-at='sw'] { --dz-mx: calc(1.42em + var(--dz-mk, 0) * 1.75em); --dz-my: 6.9em; }
.scene-designs .dz-mate[data-at='rest'] { --dz-mx: 8.3em; --dz-my: 12.7em; }
.scene-designs .dz-mate svg { width: 1em; height: 1.17em; fill: var(--dz-mate); stroke: #ffffff; stroke-width: 0.9; stroke-linejoin: round; transform-origin: 0 0; }
.scene-designs .dz-tag { margin: 1em 0 0 -0.1em; padding: 0.25em 0.6em; border-radius: 0.25em 0.8em 0.8em 0.8em; background: var(--dz-mate); color: #ffffff; font-size: 0.6em; font-weight: 600; line-height: 1.2; white-space: nowrap; }

/* شريط العنوان: المتواجدين + مشاركة + التكبير */
.scene-designs .dz-avs { display: flex; }
.scene-designs .dz-av { display: grid; place-items: center; width: 2.3em; height: 2.3em; border-radius: 50%; background: var(--dz-mate); color: #ffffff; font-size: 0.66em; font-style: normal; font-weight: 700; box-shadow: 0 0 0 0.16em var(--sc-win-bar), 0 0 0 0.2em var(--sc-line); }
.scene-designs .dz-av-me { margin-inline-start: -0.5em; background: linear-gradient(135deg, var(--sc-a2), var(--sc-a1)); }
.scene-designs .dz-share { padding: 0.32em 0.85em; border-radius: 0.5em; background: var(--dz-chip-bg); color: #ffffff; font-size: 0.66em; font-weight: 600; }
.scene-designs .dz-zoom { font-family: var(--sc-mono); font-size: 0.66em; color: var(--sc-ink-3); }

/* ═════ البطاقة (card): أدوات يسار، ألوان يمين، والرسمة جهة الزاوية الواضحة (النهاية حسب لغة الصفحة) ═════ */
.scene-designs .dz-card .dz-rail,
.scene-designs .dz-mini .dz-rail { --dz-cell: 1.9em; top: 0.6em; left: 0.6em; border-radius: 0.65em; }
.scene-designs .dz-card .dz-swatches,
.scene-designs .dz-mini .dz-swatches { top: 0.75em; right: 0.7em; flex-direction: column; gap: 0.42em; padding: 0.3em; border-radius: 0.9em; background: var(--sc-panel-2); border: 1px solid var(--sc-line); }
.scene-designs .dz-card .dz-sw,
.scene-designs .dz-mini .dz-sw { width: 1.1em; height: 1.1em; }
.scene-designs .dz-card .dz-swr,
.scene-designs .dz-mini .dz-swr { top: 0.08em; left: 0.08em; width: 1.54em; height: 1.54em; transform: translateY(calc(var(--dz-sw, 0) * 1.52em)); }
.scene-designs .dz-card .dz-stage { top: 1.75em; right: 3.4em; width: 9.8em; height: 9.8em; }
[dir='rtl'] .scene-designs .dz-card .dz-stage { right: auto; left: 3.5em; }

/* ═════ المصغّر (mini) ═════ */
.scene-designs .dz-mini .dz-stage { top: max(1.9em, calc(50% - 5.2em)); left: calc(50% - 5.6em); width: 11.2em; height: 11.2em; }

/* ═════ الجوال: أخف — بدون الأعمال الجانبية والتصدير ═════ */
@media (max-width: 640px) {
  .scene-designs .dz-thumbs,
  .scene-designs .dz-export,
  .scene-designs .dz-ruler { display: none; }
  .scene-designs .dz-canvas { background: var(--dz-canvas-bg); }
}

/* ═══════════ مشهد «المونتاج والإنتاج» (src/views/scenes/montage.mjs + public/js/scenes/montage.js) ═══════════
   برنامج مونتاج: شاشة عرض بلقطات تتبدّل + تايملاين بمؤشر تشغيل، موجة صوت، keyframes، ومقص. كل محدد تحت .scene-montage.
   كل الحركة المتزامنة دورة وحدة --mt-T (12 ثانية = التايملاين من 00:00:08 لين 00:00:20). خريطة الدورة (0 → 1):
     V1  city 0–.26 | dunes .26–.56 | drift .56–.78 (ينقص عند .67) | title .78–1   ← نفس اللقطة في الشاشة
     V2  Grade .28–.52 | Title .80–.98 (keyframes عند .80 .84 .95 .98)
     A2  whoosh .23–.30 | .53–.60 | .75–.82
     المقص: يجي .38 → يقص .45 → المقطع ينسحب .48 → يرجع يلزق (snap) .52
   الإطار الثابت (بدون حركة، أو قبل ما يشتغل) = .3611 من الدورة: 00:00:12:08 فوق الكثبان؛ --mt-d يبدأ الدورة منه.
   اللي ينبض «يصير» عند نقطة معيّنة (keyframe، انتقال، علامة) ياخذ --at ويتأخر بـ --at × الدورة (mt-pop). */

/* ── الألوان والدورة (الداكن) ── */
.scene-montage {
  --mt-T: 12s;
  --mt-d: calc(-4.333s - var(--sc-i, 0) * 1.3s);
  --mt-ph: #ff5d73;
  --mt-ph-glow: rgba(255, 93, 115, 0.6);
  --mt-vid: 108, 150, 255;
  --mt-fx: 167, 139, 250;
  --mt-gfx: 244, 114, 182;
  --mt-aud: 70, 214, 160;
  --mt-sfx: 103, 232, 249;
  --mt-fill: 0.2;
  --mt-edge: 0.72;
  --mt-clip-ink: rgba(242, 245, 255, 0.94);
  --mt-lane: rgba(255, 255, 255, 0.028);
  --mt-tick: rgba(255, 255, 255, 0.16);
  --mt-tick-2: rgba(255, 255, 255, 0.3);
  --mt-paste: rgba(3, 5, 12, 0.5);
  --mt-vu-off: rgba(7, 9, 18, 0.88);
  --mt-tc: var(--sc-a3);
  --mt-kf: #ffffff;
  --mt-cut: #ffffff;
  --mt-scr-shadow: 0 0 0 1px rgba(255, 255, 255, 0.08), 0 0.7em 1.4em -0.6em rgba(0, 0, 0, 0.8);
  /* اللقطات (نفسها في الثيمين: هذا «فيديو») — تنفع خلفية للشاشة وللمصغّرات وشريط الفريمات في المقاطع */
  --mt-g-city: radial-gradient(70% 40% at 64% 100%, rgba(255, 110, 170, 0.55), transparent 70%), linear-gradient(180deg, #050816 0%, #0e1640 40%, #281a5c 66%, #6a2a76 86%, #c94d93 100%);
  --mt-g-dunes: radial-gradient(circle at 70% 60%, rgba(255, 240, 200, 0.95) 0 2%, rgba(255, 196, 128, 0.6) 9%, transparent 34%), linear-gradient(180deg, #211a50 0%, #5d2b74 28%, #c0527c 52%, #f48a5a 70%, #ffcd86 85%, #ffe2a6 100%);
  --mt-g-drift: radial-gradient(42% 36% at 50% 45%, rgba(103, 232, 249, 0.3), transparent 70%), linear-gradient(180deg, #02040b 0%, #08102b 50%, #131f4c 100%);
  --mt-g-title: radial-gradient(58% 90% at 50% 56%, #2d2470 0%, #0e0d26 55%, #04050b 100%);
  --mt-g-music: repeating-linear-gradient(90deg, rgba(70, 214, 160, 0.9) 0 0.1em, transparent 0.1em 0.28em) center / 100% 46% no-repeat, linear-gradient(160deg, #0d2b25, #0a1a1f);
  --mt-g-sfx: repeating-linear-gradient(90deg, rgba(103, 232, 249, 0.9) 0 0.1em, transparent 0.1em 0.4em) center / 60% 30% no-repeat, linear-gradient(160deg, #0b2533, #0a141f);
}

/* ── الفاتح: ألواح بيضاء، مقاطع بألوان أغمق، الشاشة تبقى غامقة (فيديو) ── */
:root[data-theme='light'] .scene-montage {
  --mt-ph: #e8344e;
  --mt-ph-glow: rgba(232, 52, 78, 0.35);
  --mt-vid: 59, 108, 230;
  --mt-fx: 124, 92, 240;
  --mt-gfx: 219, 39, 119;
  --mt-aud: 10, 150, 104;
  --mt-sfx: 8, 145, 178;
  --mt-fill: 0.14;
  --mt-edge: 0.55;
  --mt-clip-ink: #1b2438;
  --mt-lane: rgba(22, 29, 46, 0.035);
  --mt-tick: rgba(22, 29, 46, 0.16);
  --mt-tick-2: rgba(22, 29, 46, 0.32);
  --mt-paste: rgba(22, 29, 46, 0.055);
  --mt-vu-off: rgba(228, 232, 241, 0.94);
  --mt-tc: #0b7f95;
  --mt-kf: #25304a;
  --mt-cut: #1b2338;
  --mt-scr-shadow: 0 0 0 1px rgba(22, 29, 46, 0.12), 0 0.7em 1.4em -0.7em rgba(30, 40, 80, 0.45);
}

/* ═════ الهيكل: صف علوي (شاشة + ألواح) وتحته التايملاين ═════ */
.scene-montage .sc-body { display: flex; flex-direction: column; gap: 0.55em; padding: 0.55em; }
.scene-montage .mt-top { display: flex; gap: 0.55em; flex: none; min-width: 0; height: 6.2em; }
.scene-montage .mt-pan { position: relative; display: flex; flex-direction: column; flex: none; min-width: 0; min-height: 0; overflow: hidden; border-radius: var(--sc-radius-sm); background: var(--sc-panel); border: 1px solid var(--sc-line); }
.scene-montage .mt-pt { display: flex; align-items: center; justify-content: space-between; gap: 0.6em; flex: none; height: 2.1em; padding-inline: 0.9em; font-size: 0.56em; font-weight: 600; letter-spacing: 0.02em; color: var(--sc-ink-2); white-space: nowrap; border-bottom: 1px solid var(--sc-line); }
.scene-montage .mt-pt b { min-width: 0; overflow: hidden; text-overflow: ellipsis; font-family: var(--sc-mono); font-weight: 500; color: var(--sc-a2); }

/* ── التايم كود ── */
.scene-montage .mt-tc { font-family: var(--sc-mono); font-weight: 600; font-variant-numeric: tabular-nums; letter-spacing: 0.02em; color: var(--mt-tc); white-space: nowrap; }
.scene-montage .mt-tc-bar { display: inline-flex; align-items: center; gap: 0.55em; font-size: 0.74em; }
.scene-montage .mt-tc-bar::before { content: ''; width: 0.55em; height: 0.55em; border-radius: 50%; background: var(--mt-ph); box-shadow: 0 0 0.6em var(--mt-ph-glow); animation: mt-blink 1.6s ease-in-out infinite; }
.scene-montage .mt-spec { font: 500 0.5em/1 var(--sc-mono); color: var(--sc-ink-3); white-space: nowrap; }
.scene-montage .mt-transport { flex: none; width: 3.6em; height: 0.64em; fill: var(--sc-ink-2); }

/* ═════ شاشة العرض: أربع لقطات فوق بعض + تظليل سينمائي + حدود الأمان ═════ */
.scene-montage .mt-scr { position: relative; flex: none; aspect-ratio: 2.4 / 1; overflow: hidden; isolation: isolate; border-radius: 0.34em; background: #04050a; box-shadow: var(--mt-scr-shadow); }
.scene-montage .mt-scr::before { content: ''; position: absolute; inset: 0; z-index: 2; background: radial-gradient(120% 120% at 50% 50%, transparent 55%, rgba(0, 0, 0, 0.42) 100%); }
.scene-montage .mt-scr::after { content: ''; position: absolute; inset: 8% 5%; z-index: 3; border: 1px solid rgba(255, 255, 255, 0.1); border-radius: 0.15em; }
.scene-montage .mt-shot { position: absolute; inset: 0; opacity: 0; background: var(--mt-g); transform-origin: 50% 58%; }
.scene-montage .mt-art { position: absolute; inset: 0; width: 100%; height: 100%; }
.scene-montage .mt-s-city { --mt-g: var(--mt-g-city); animation: mt-city var(--mt-T) linear var(--mt-d) infinite; }
.scene-montage .mt-s-dunes { --mt-g: var(--mt-g-dunes); opacity: 1; transform: scale(1.034); animation: mt-dunes var(--mt-T) linear var(--mt-d) infinite; }
.scene-montage .mt-s-drift { --mt-g: var(--mt-g-drift); animation: mt-drift var(--mt-T) linear var(--mt-d) infinite; }
.scene-montage .mt-s-title { --mt-g: var(--mt-g-title); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0.5em; animation: mt-title var(--mt-T) linear var(--mt-d) infinite; }

/* حركات داخل اللقطة (رسم SVG): تشتغل بس واللقطة على الشاشة — montage.js يحط is-run عليها من قبل ما تبان بشوي
   لين بعد ما تختفي. بدون JS (أو بدون حركة) تبقى على الإطار الثابت. */
.scene-montage .mt-win { opacity: 0.85; }
.scene-montage .mt-sun { transform: translateY(-1.6px); }
.scene-montage .mt-dn-1 { transform: translateX(-2px); }
.scene-montage .mt-dn-2 { transform: translateX(-3.4px); }
.scene-montage .mt-birds { transform: translateX(2.7px); }
.scene-montage .mt-tr { stroke-dasharray: 18 12; }
.scene-montage .mt-tr-4 { stroke-dasharray: 10 14; }
.scene-montage[data-scene-mounted] .mt-sun { transform: translateY(-5px); }
.scene-montage[data-scene-mounted] .mt-dn-1,
.scene-montage[data-scene-mounted] .mt-dn-2,
.scene-montage[data-scene-mounted] .mt-birds { transform: none; }
/* المدينة: النوافذ تتنفس، ضوء البرج يومض */
.scene-montage .mt-s-city.is-run .mt-win { animation: mt-breathe 1.8s ease-in-out infinite alternate; }
.scene-montage .mt-s-city.is-run .mt-beacon { animation: mt-blink 1.4s steps(1, end) infinite; }
/* الكثبان: الشمس تغيب، طبقات الرمل تتحرك بعمق (parallax)، الطيور تمشي */
.scene-montage .mt-s-dunes.is-run .mt-sun { animation: mt-sun 4.4s linear both; }
.scene-montage .mt-s-dunes.is-run .mt-dn-1 { animation: mt-par-1 4.4s linear both; }
.scene-montage .mt-s-dunes.is-run .mt-dn-2 { animation: mt-par-2 4.4s linear both; }
.scene-montage .mt-s-dunes.is-run .mt-birds { animation: mt-birds 4.4s linear both; }
/* خطوط السرعة: الأنوار تمشي ناحية نقطة التلاشي */
.scene-montage .mt-s-drift.is-run .mt-tr { animation: mt-dash 0.9s linear infinite; }
.scene-montage .mt-s-drift.is-run .mt-tr-2 { animation-duration: 1.15s; }
.scene-montage .mt-s-drift.is-run .mt-tr-3 { animation-duration: 0.75s; }
.scene-montage .mt-s-drift.is-run .mt-tr-4 { animation-duration: 1.3s; }
/* تسريب ضوء دافي يعبر الشاشة مع الانتقالات (.26 و .56) */
.scene-montage .mt-leak { position: absolute; inset: -30% -20%; z-index: 1; background: radial-gradient(34% 55% at 50% 50%, rgba(255, 214, 150, 0.9), rgba(255, 130, 150, 0.45) 45%, transparent 72%); opacity: 0; transform: translateX(-55%); animation: mt-leak var(--mt-T) linear var(--mt-d) infinite; }

/* شاشة العنوان: العنوان يدخل بزووم، خط يتمدد، والعنوان الفرعي يطلع */
.scene-montage .mt-ttl { font-family: var(--font-display, var(--sc-sans)); font-weight: 800; font-size: 1.3em; line-height: 1; letter-spacing: 0.32em; padding-inline-start: 0.32em; white-space: nowrap; background: linear-gradient(180deg, #ffffff 12%, #d3d9e8 55%, #8e98b0 92%); -webkit-background-clip: text; background-clip: text; color: transparent; animation: mt-ttl var(--mt-T) linear var(--mt-d) infinite; }
.scene-montage .mt-ttl-sub { display: flex; flex-direction: column; align-items: center; gap: 0.9em; font: 600 0.4em/1 var(--sc-mono); letter-spacing: 0.55em; padding-inline-start: 0.55em; color: rgba(222, 229, 246, 0.78); white-space: nowrap; animation: mt-ttl-sub var(--mt-T) linear var(--mt-d) infinite; }
.scene-montage.scene--card .mt-ttl,
.scene-montage.scene--mini .mt-ttl { font-size: 0.8em; }
.scene-montage.scene--card .mt-ttl-sub,
.scene-montage.scene--mini .mt-ttl-sub { font-size: 0.3em; }
.scene-montage .mt-ttl-sub::before { content: ''; display: block; width: 160%; height: 1px; background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.75), transparent); animation: mt-rule var(--mt-T) linear var(--mt-d) infinite; }

/* الترجمة (الهيرو) */
.scene-montage .mt-cc { position: absolute; z-index: 4; inset-inline: 0; bottom: 11%; text-align: center; font: 600 0.66em/1.2 var(--sc-sans); color: #fff; text-shadow: 0 1px 2px rgba(0, 0, 0, 0.9), 0 0 0.6em rgba(0, 0, 0, 0.6); animation: mt-cc var(--mt-T) linear var(--mt-d) infinite; }

/* ── عدّاد الصوت: العمود ملوّن ثابت، والغطا الغامق فوقه يتحرك (scaleY) ── */
.scene-montage .mt-vu { display: flex; gap: 0.16em; flex: none; padding: 0.16em; border-radius: 0.28em; background: var(--sc-panel-2); }
.scene-montage .mt-vu i { position: relative; width: 0.36em; overflow: hidden; border-radius: 0.1em; background: linear-gradient(to top, #34d399 0%, #34d399 56%, #f3c552 74%, #ff5d73 90%); }
.scene-montage .mt-vu i::after { content: ''; position: absolute; inset: 0; background: var(--mt-vu-off); transform-origin: 50% 0; transform: scaleY(0.38); animation: mt-vu 1.9s linear infinite; }
.scene-montage .mt-vu i + i::after { transform: scaleY(0.44); animation-duration: 2.3s; animation-delay: -0.7s; }

/* ── مصغّرات المقاطع ── */
.scene-montage .mt-thumb { display: block; border-radius: 0.3em; background: var(--mt-g); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.1); transition: box-shadow 0.3s; }
.scene-montage .mt-t-city { --mt-g: var(--mt-g-city); }
.scene-montage .mt-t-dunes { --mt-g: var(--mt-g-dunes); }
.scene-montage .mt-t-drift { --mt-g: var(--mt-g-drift); }
.scene-montage .mt-t-title { --mt-g: var(--mt-g-title); }
.scene-montage .mt-t-music { background: var(--mt-g-music); }
.scene-montage .mt-t-sfx { background: var(--mt-g-sfx); }
.scene-montage .mt-thumb.is-on,
.scene-montage .is-on > .mt-thumb { box-shadow: 0 0 0 0.13em var(--sc-a2), 0 0 0.9em -0.1em var(--sc-a2); }

/* ═════ التايملاين ═════ */
.scene-montage .mt-tl { position: relative; flex: 1; min-height: 0; display: grid; grid-template-columns: 3em minmax(0, 1fr); grid-template-rows: 1.15em 1.45em 2.05em 1.8em 1.4em; column-gap: 0.3em; row-gap: 0.14em; align-content: start; padding: 0.3em 0.35em; border-radius: var(--sc-radius-sm); background: var(--sc-panel); border: 1px solid var(--sc-line); }
.scene-montage .mt-th { display: flex; align-items: center; justify-content: space-between; min-width: 0; padding-inline: 0.8em 0.6em; border-radius: 0.5em; background: var(--sc-panel-2); box-shadow: inset 0.5em 0 0 -0.2em rgba(var(--mt-vid), 0.85); font: 600 0.5em/1 var(--sc-mono); color: var(--sc-ink-2); }
.scene-montage .mt-th::after { content: ''; width: 1em; height: 1em; border-radius: 0.25em; border: 1px solid var(--sc-line-2); }
.scene-montage .mt-th-a { box-shadow: inset 0.5em 0 0 -0.2em rgba(var(--mt-aud), 0.85); }
.scene-montage .mt-th-r { background: none; box-shadow: none; }
.scene-montage .mt-th-r::after { display: none; }

/* المسطرة: علامات كل ثانيتين (وكل نص ثانية أصغر) */
.scene-montage .mt-ruler { position: relative; display: flex; min-width: 0; background-image: linear-gradient(90deg, var(--mt-tick-2) 1px, transparent 1px), linear-gradient(90deg, var(--mt-tick) 1px, transparent 1px); background-size: calc(100% / 6) 100%, calc(100% / 24) 36%; background-position: 0 0, 0 100%; background-repeat: repeat-x; border-bottom: 1px solid var(--sc-line-2); }
/* شريط الرندر تحت المسطرة (أخضر جاهز، أصفر يحتاج رندر) */
.scene-montage .mt-ruler::after { content: ''; position: absolute; inset-inline: 0; bottom: 0; height: 0.13em; border-radius: 0.1em; background: linear-gradient(90deg, var(--sc-ok) 0 56%, var(--sc-warn) 56% 78%, var(--sc-ok) 78%); opacity: 0.75; }
.scene-montage .mt-ruler span { flex: 1; min-width: 0; padding: 0.4em 0 0 0.6em; font: 500 0.44em/1 var(--sc-mono); color: var(--sc-ink-3); white-space: nowrap; }
.scene-montage .mt-mk { position: absolute; top: 0.08em; left: calc(var(--at) * 100%); width: 0.56em; height: 0.62em; margin-left: -0.28em; background: var(--sc-warn); clip-path: polygon(0 0, 100% 0, 100% 58%, 50% 100%, 0 58%); animation: mt-pop var(--mt-T) linear calc(var(--mt-d) + var(--at) * var(--mt-T)) infinite; }
.scene-montage .mt-m1 { --at: 0.26; background: var(--sc-ok); }
.scene-montage .mt-m2 { --at: 0.56; }
.scene-montage .mt-m3 { --at: 0.78; background: var(--sc-a1); }

/* المسارات والمقاطع: المكان من --a / --b (نسبة من التايملاين) */
.scene-montage .mt-lane { position: relative; min-width: 0; border-radius: 0.28em; background: var(--mt-lane); }
.scene-montage .mt-clip { --mt-c: var(--mt-vid); position: absolute; top: 0.1em; bottom: 0.1em; left: calc(var(--a) * 100%); width: calc((var(--b) - var(--a)) * 100% - 0.12em); display: block; overflow: hidden; border-radius: 0.3em; background: rgba(var(--mt-c), var(--mt-fill)); border: 1px solid rgba(var(--mt-c), var(--mt-edge)); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1); transition: box-shadow 0.3s, border-color 0.3s; }
.scene-montage .mt-clip b { position: relative; z-index: 1; display: block; padding: 0.3em 0.6em 0; font: 600 0.44em/1.25 var(--sc-mono); color: var(--mt-clip-ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* V1: شريط فريمات من اللقطة نفسها */
.scene-montage .mt-v1 .mt-clip::before { content: ''; position: absolute; inset: 44% 0 0; background: linear-gradient(90deg, rgba(0, 0, 0, 0.55) 1px, transparent 1px) 0 0 / 2.4em 100%, var(--mt-g) 0 0 / 2.4em 100%; opacity: 0.92; }
.scene-montage .mt-v1 .mt-clip b { padding-left: 2.3em; }
.scene-montage .mt-v1 .mt-c-city b { padding-left: 0.7em; }
.scene-montage .mt-v2 .mt-clip b { text-align: center; }
.scene-montage .mt-v1 .mt-clip.is-on { border-color: rgba(var(--mt-c), 1); box-shadow: inset 0 0 0 1px rgba(var(--mt-c), 0.9), 0 0 0.9em -0.1em rgba(var(--mt-c), 0.85); }
.scene-montage .mt-c-city { --a: 0; --b: 0.26; --mt-g: var(--mt-g-city); }
.scene-montage .mt-c-dunes { --a: 0.26; --b: 0.56; --mt-g: var(--mt-g-dunes); }
.scene-montage .mt-c-drift { --a: 0.56; --b: 0.67; --mt-g: var(--mt-g-drift); width: 11%; border-right: 0; border-start-end-radius: 0; border-end-end-radius: 0; }
.scene-montage .mt-c-drift2 { --a: 0.67; --b: 0.78; --mt-g: var(--mt-g-drift); z-index: 1; border-left: 0; border-start-start-radius: 0; border-end-start-radius: 0; animation: mt-split var(--mt-T) linear var(--mt-d) infinite; }
.scene-montage .mt-c-title { --a: 0.78; --b: 1; --mt-g: var(--mt-g-title); }
/* V2: طبقة تلوين (مخططة) + عنوان */
.scene-montage .mt-c-lut { --a: 0.28; --b: 0.52; --mt-c: var(--mt-fx); background: repeating-linear-gradient(135deg, rgba(var(--mt-c), 0.32) 0 0.3em, rgba(var(--mt-c), 0.12) 0.3em 0.6em); }
.scene-montage .mt-c-gfx { --a: 0.8; --b: 0.98; --mt-c: var(--mt-gfx); background: linear-gradient(90deg, rgba(var(--mt-c), 0.1), rgba(var(--mt-c), 0.34) 22%, rgba(var(--mt-c), 0.34) 83%, rgba(var(--mt-c), 0.1)); }
/* A1: موسيقى بموجة */
.scene-montage .mt-c-music { --a: 0; --b: 1; --mt-c: var(--mt-aud); }
.scene-montage .mt-wave { position: absolute; left: 0; top: 30%; width: 100%; height: 66%; fill: rgba(var(--mt-c), 0.9); transform-origin: 50% 50%; animation: mt-wave 1.15s ease-in-out infinite alternate; }
.scene-montage .mt-wave-b { fill: rgba(var(--mt-c), 0.6); animation-duration: 0.85s; animation-delay: -0.45s; }
/* A2: مؤثرات صوتية قصيرة */
.scene-montage .mt-a2 .mt-clip { --mt-c: var(--mt-sfx); background: repeating-linear-gradient(90deg, rgba(var(--mt-c), 0.75) 0 0.1em, transparent 0.1em 0.3em) center / 100% 38% no-repeat, repeating-linear-gradient(90deg, rgba(var(--mt-c), 0.45) 0 0.1em, transparent 0.1em 0.5em) center / 100% 72% no-repeat, rgba(var(--mt-c), var(--mt-fill)); }
.scene-montage .mt-c-s1 { --a: 0.23; --b: 0.3; }
.scene-montage .mt-c-s2 { --a: 0.53; --b: 0.6; }
.scene-montage .mt-c-s3 { --a: 0.75; --b: 0.82; }

/* الانتقالات (cross dissolve / dip to black) ونقاط الـ keyframes: تنبض لما المؤشر يمر عليها */
.scene-montage .mt-x { position: absolute; z-index: 2; top: 0.1em; bottom: 0.1em; left: calc(var(--at) * 100%); width: 1.7em; margin-left: -0.85em; border-radius: 0.25em; background: linear-gradient(to top right, rgba(255, 255, 255, 0.62) 49.5%, rgba(255, 255, 255, 0.2) 50.5%); border: 1px solid rgba(255, 255, 255, 0.75); box-shadow: 0 0 0.5em rgba(0, 0, 0, 0.35); --mt-pop: 1.22; animation: mt-pop var(--mt-T) linear calc(var(--mt-d) + var(--at) * var(--mt-T)) infinite; }
.scene-montage .mt-x1 { --at: 0.26; }
.scene-montage .mt-x2 { --at: 0.56; }
.scene-montage .mt-x3 { --at: 0.78; background: linear-gradient(to top right, rgba(0, 0, 0, 0.78) 49.5%, rgba(255, 255, 255, 0.24) 50.5%); }
.scene-montage .mt-kf { position: absolute; z-index: 2; top: 50%; left: calc(var(--at) * 100%); width: 0.62em; height: 0.62em; margin: -0.31em 0 0 -0.31em; background: var(--sc-ink-2); clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%); animation: mt-pop var(--mt-T) linear calc(var(--mt-d) + var(--at) * var(--mt-T)) infinite; }
.scene-montage .mt-v2 .mt-kf { background: var(--mt-kf); }
.scene-montage .mt-k1 { --at: 0.28; }
.scene-montage .mt-k2 { --at: 0.52; }
.scene-montage .mt-k3 { --at: 0.8; }
.scene-montage .mt-k4 { --at: 0.84; }
.scene-montage .mt-k5 { --at: 0.95; }
.scene-montage .mt-k6 { --at: 0.98; }
.scene-montage .mt-k7 { --at: 0.26; }
.scene-montage .mt-k8 { --at: 0.56; }
.scene-montage .mt-k9 { --at: 0.78; }
.scene-montage .mt-k10 { --at: 0.76; }

/* مؤشر التشغيل: عنصر بعرض منطقة المسارات يتحرك من 0 لـ 100% من عرضه (الخط والرأس على طرفه) */
.scene-montage .mt-play { position: absolute; z-index: 4; grid-column: 2; grid-row: 1 / -1; inset: 0; pointer-events: none; transform: translateX(36.11%); animation: mt-play var(--mt-T) linear var(--mt-d) infinite; }
.scene-montage .mt-play::before { content: ''; position: absolute; top: 0.25em; bottom: 0; left: -0.06em; width: 0.12em; border-radius: 0.06em; background: var(--mt-ph); box-shadow: 0 0 0.55em var(--mt-ph-glow); }
.scene-montage .mt-play::after { content: ''; position: absolute; top: 0; left: -0.42em; width: 0.84em; height: 0.95em; background: var(--mt-ph); clip-path: polygon(0 0, 100% 0, 100% 58%, 50% 100%, 0 58%); }

/* المقص: يجي فوق مقطع drift، يقص (وميض)، النص الثاني ينسحب ويرجع يلزق (snap) */
.scene-montage .mt-cut { position: absolute; z-index: 3; left: 67%; top: -0.05em; bottom: -0.05em; width: 0.12em; margin-left: -0.06em; border-radius: 0.06em; background: var(--mt-cut); opacity: 0.7; animation: mt-cut var(--mt-T) linear var(--mt-d) infinite; }
.scene-montage .mt-snap { position: absolute; z-index: 3; left: 67%; top: -0.4em; bottom: -0.4em; width: 0.1em; margin-left: -0.05em; background: var(--sc-warn); box-shadow: 0 0 0.5em var(--sc-warn); opacity: 0; animation: mt-snap var(--mt-T) linear var(--mt-d) infinite; }
.scene-montage .mt-razor { position: absolute; z-index: 5; left: 67%; top: -1.3em; width: 1.5em; height: 1.5em; margin-left: -0.75em; fill: none; stroke: #f6f8fc; stroke-width: 1.6; stroke-linecap: round; opacity: 0; animation: mt-razor var(--mt-T) linear var(--mt-d) infinite; }
.scene-montage .mt-razor .mt-razor-o { stroke: #0b0e18; stroke-opacity: 0.85; stroke-width: 3.4; }

/* ═════ الهيرو: مكتبة + شاشة + مؤثرات فوق، التايملاين تحت (أهم شي فوق ~65%: البنر يغطي آخره) ═════ */
.scene-montage.scene--hero .mt-top { height: 10.2em; }
.scene-montage .mt-tab { font-size: 0.58em; font-weight: 600; padding: 0.32em 0.85em; border-radius: 99px; color: var(--sc-ink-3); }
.scene-montage .mt-tab.is-on { color: var(--sc-ink); background: var(--sc-panel-2); box-shadow: inset 0 0 0 1px var(--sc-line-2); }
.scene-montage .mt-bin { width: 9.2em; }
.scene-montage .mt-grid { flex: 1; min-height: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-rows: repeat(3, minmax(0, 1fr)); gap: 0.35em; padding: 0.45em; }
.scene-montage .mt-it { display: flex; flex-direction: column; gap: 0.2em; min-width: 0; min-height: 0; }
.scene-montage .mt-it .mt-thumb { flex: 1; min-height: 0; }
.scene-montage .mt-it b { font: 500 0.44em/1.2 var(--sc-mono); color: var(--sc-ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.scene-montage .mt-it.is-on b { color: var(--sc-ink); }
.scene-montage.scene--hero .mt-mon { flex: 1; padding: 0.3em; background: var(--mt-paste); --mt-scr-w: 19.9em; }
.scene-montage .mt-stage { flex: 1; min-height: 0; display: grid; place-items: center; overflow: hidden; }
.scene-montage.scene--hero .mt-scr { width: min(100%, var(--mt-scr-w)); }
.scene-montage .mt-ctl { flex: none; display: flex; align-items: center; justify-content: space-between; gap: 0.6em; height: 1.3em; padding-inline: 0.35em; }
.scene-montage .mt-ctl .mt-tc { font-size: 0.64em; }
.scene-montage .mt-ins { width: 13em; display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-rows: auto minmax(0, 1fr); }
.scene-montage .mt-ins .mt-pt { grid-column: 1 / -1; }
.scene-montage .mt-ins .mt-props { grid-column: 1; grid-row: 2; }
.scene-montage .mt-props { position: relative; display: grid; grid-template-columns: auto auto minmax(0, 1fr); grid-template-rows: repeat(4, 1.6em); column-gap: 0.45em; align-items: center; align-content: start; padding: 0.55em 0.5em 0.5em 0.7em; }
.scene-montage .mt-pn { font-size: 0.5em; color: var(--sc-ink-2); white-space: nowrap; }
.scene-montage .mt-pv { min-width: 4.9em; font: 600 0.48em/1 var(--sc-mono); font-variant-numeric: tabular-nums; color: var(--mt-tc); white-space: nowrap; }
.scene-montage .mt-kl { position: relative; height: 100%; }
.scene-montage .mt-kl::before { content: ''; position: absolute; inset-inline: 0; top: 50%; height: 1px; background: var(--sc-line-2); }
.scene-montage .mt-kl .mt-kf { width: 0.5em; height: 0.5em; margin: -0.25em 0 0 -0.25em; }
.scene-montage .mt-play-k { grid-column: 3; z-index: 1; }
.scene-montage .mt-play-k::before { top: 0.1em; width: 0.08em; left: -0.04em; box-shadow: none; }
.scene-montage .mt-play-k::after { display: none; }
.scene-montage .mt-ins .mt-vu { grid-column: 2; grid-row: 2; margin: 0.55em 0.55em 0.55em 0; }
/* بدون بنر (صفحة بدون صورة): الشاشة أكبر والمسارات تعبي الطول */
.hero-stage.solo > .scene-montage .mt-top { height: 12em; }
.hero-stage.solo > .scene-montage .mt-mon { --mt-scr-w: 24em; }
.hero-stage.solo > .scene-montage .mt-tl { grid-template-rows: 1.2em 1.4fr 2fr 1.8fr 1.4fr; }

/* ═════ البطاقة: الشاشة في الزاوية الواضحة (يسار في العربي، يمين في الإنجليزي)، التايملاين تحت ═════ */
.scene-montage .mt-mon { display: flex; gap: 0.35em; flex: none; height: 100%; }
.scene-montage .mt-mon .mt-scr { height: 100%; }
.scene-montage.scene--hero .mt-mon .mt-scr { height: auto; }
.scene-montage .mt-mini-bin { flex: 1; min-width: 0; display: grid; grid-template-columns: repeat(2, 4.2em); grid-template-rows: repeat(2, minmax(0, 1fr)); gap: 0.4em; justify-content: start; }
/* البطاقة تتلاشى لتحت: الشاشة أقصر عشان التايملاين يطلع فوق، والمقاطع أوضح */
.scene-montage.scene--card { --mt-fill: 0.3; --mt-edge: 0.85; }
:root[data-theme='light'] .scene-montage.scene--card { --mt-fill: 0.22; --mt-edge: 0.7; }
.scene-montage.scene--card .mt-top { height: 5.5em; }
.scene-montage.scene--card .mt-tl { grid-template-columns: 2.3em minmax(0, 1fr); grid-template-rows: 1em 1.35em 2.5em 2.05em; padding: 0.25em 0.3em; }
.scene-montage.scene--card .mt-ruler,
.scene-montage.scene--mini .mt-ruler { background-size: calc(100% / 3) 100%, calc(100% / 12) 36%; }
.scene-montage.scene--card .mt-x,
.scene-montage.scene--mini .mt-x { width: 1.3em; margin-left: -0.65em; }
:root[dir='ltr'] .scene-montage.scene--card .mt-top,
:root[dir='ltr'] .scene-montage.scene--card .mt-mon { flex-direction: row-reverse; }
:root[dir='ltr'] .scene-montage.scene--card .mt-mini-bin { justify-content: end; }

/* ═════ المصغّر: شاشة + عدّاد + تايم كود كبير، تايملاين مختصر ═════ */
.scene-montage.scene--mini .mt-top { height: 38%; min-height: 5.4em; }
.scene-montage .mt-info { flex: 1; min-width: 0; display: flex; flex-direction: column; justify-content: center; align-items: flex-start; gap: 0.55em; padding: 0.5em 0.75em; border-radius: var(--sc-radius-sm); background: var(--sc-panel); border: 1px solid var(--sc-line); }
.scene-montage .mt-info .mt-tc { font-size: 1.02em; }
/* الصندوق ممكن يكون أكبر من 28em (الخط واقف عند حده): المسارات تكبر وتعبي الطول */
.scene-montage.scene--mini .mt-tl { grid-template-columns: 2.2em minmax(0, 1fr); grid-template-rows: 1em minmax(1.45em, 1.45fr) minmax(2.3em, 2.3fr) minmax(1.95em, 1.95fr); align-content: stretch; padding: 0.25em 0.3em; }
.scene-montage.scene--mini .mt-v1 .mt-clip::before { inset: 24% 0 0; }
.scene-montage.scene--mini .mt-wave { top: 14%; height: 72%; }

/* ═════ الجوال: بدون النصوص الصغيرة (تصير نقاط) وبدون الحركات الجانبية — يبقى المؤشر واللقطات والمقص ═════ */
@media (max-width: 640px) {
  .scene-montage .mt-clip b,
  .scene-montage .mt-ruler span,
  .scene-montage .mt-it b,
  .scene-montage .mt-spec { color: transparent; }
  .scene-montage .mt-wave,
  .scene-montage .mt-vu i::after,
  .scene-montage .mt-shot.is-run .mt-art *,
  /* نبضات العلامات (keyframes / انتقالات / ماركرز) ثابتة: كل حركة شغّالة تنحسب مع كل إطار للصفحة */
  .scene-montage .mt-kf,
  .scene-montage .mt-mk,
  .scene-montage .mt-x { animation: none; }
}

/* ═════ الحركات ═════ */
@keyframes mt-play { from { transform: translateX(0); } to { transform: translateX(100%); } }
@keyframes mt-pop { 0% { transform: scale(var(--mt-pop, 1.75)); opacity: 1; } 7% { transform: scale(1); } 100% { transform: scale(1); } }
@keyframes mt-blink { 50% { opacity: 0.25; } }
@keyframes mt-breathe { from { opacity: 0.68; } to { opacity: 0.95; } }
@keyframes mt-dash { to { stroke-dashoffset: -30; } }
@keyframes mt-wave { from { transform: scaleY(0.84); } to { transform: scaleY(1.08); } }
@keyframes mt-vu {
  0% { transform: scaleY(0.5); }
  9% { transform: scaleY(0.26); }
  17% { transform: scaleY(0.42); }
  24% { transform: scaleY(0.18); }
  33% { transform: scaleY(0.46); }
  41% { transform: scaleY(0.3); }
  50% { transform: scaleY(0.56); }
  58% { transform: scaleY(0.24); }
  66% { transform: scaleY(0.4); }
  74% { transform: scaleY(0.2); }
  83% { transform: scaleY(0.48); }
  91% { transform: scaleY(0.3); }
  100% { transform: scaleY(0.5); }
}
/* اللقطات: ظهور واختفاء مع مقاطع V1 + زووم بطيء (Ken Burns) */
@keyframes mt-city {
  0% { opacity: 0; transform: scale(1); }
  1.6% { opacity: 1; }
  24% { opacity: 1; }
  28% { opacity: 0; transform: scale(1.08); }
  100% { opacity: 0; transform: scale(1.08); }
}
@keyframes mt-dunes {
  0%, 24% { opacity: 0; transform: scale(1); }
  28%, 54% { opacity: 1; }
  58% { opacity: 0; transform: scale(1.08); }
  100% { opacity: 0; transform: scale(1.08); }
}
@keyframes mt-drift {
  0%, 54% { opacity: 0; transform: scale(1.07); }
  58%, 76% { opacity: 1; }
  78.4% { opacity: 0; transform: scale(1); }
  100% { opacity: 0; transform: scale(1); }
}
@keyframes mt-title {
  0%, 78.6% { opacity: 0; transform: scale(1.06); }
  80.6%, 96% { opacity: 1; }
  99.4% { opacity: 0; transform: scale(1); }
  100% { opacity: 0; transform: scale(1); }
}
@keyframes mt-ttl {
  0%, 81% { opacity: 0; transform: scale(1.22); }
  85% { opacity: 1; transform: scale(1); }
  95% { opacity: 1; transform: scale(0.97); }
  97.6%, 100% { opacity: 0; transform: scale(0.96); }
}
@keyframes mt-ttl-sub {
  0%, 84% { opacity: 0; transform: translateY(0.6em); }
  87.5% { opacity: 1; transform: none; }
  95% { opacity: 1; }
  97.6%, 100% { opacity: 0; }
}
@keyframes mt-rule { 0%, 85% { transform: scaleX(0); } 89%, 100% { transform: scaleX(1); } }
@keyframes mt-cc {
  0%, 30% { opacity: 0; transform: translateY(0.35em); }
  32% { opacity: 1; transform: none; }
  50% { opacity: 1; }
  52%, 100% { opacity: 0; }
}
@keyframes mt-sun { from { transform: translateY(-5px); } to { transform: translateY(5px); } }
@keyframes mt-par-1 { from { transform: none; } to { transform: translateX(-6px); } }
@keyframes mt-par-2 { from { transform: none; } to { transform: translateX(-10px); } }
@keyframes mt-birds { from { transform: none; } to { transform: translateX(8px); } }
@keyframes mt-leak {
  0%, 23.6% { opacity: 0; transform: translateX(-55%); }
  26% { opacity: 0.7; }
  29%, 53.6% { opacity: 0; transform: translateX(45%); }
  53.7% { transform: translateX(-55%); }
  56% { opacity: 0.6; }
  59%, 100% { opacity: 0; transform: translateX(45%); }
}
/* المقص */
@keyframes mt-razor {
  0%, 35% { opacity: 0; transform: translate(1.6em, -0.5em); }
  39% { opacity: 1; transform: translate(0.9em, -0.25em); animation-timing-function: cubic-bezier(0.3, 0.7, 0.3, 1); }
  43.5% { opacity: 1; transform: translate(0, 0); }
  45% { transform: translate(0, 0.35em); }
  46.5% { transform: translate(0, 0); }
  50% { opacity: 1; transform: translate(0.2em, -0.2em); }
  54%, 100% { opacity: 0; transform: translate(1em, -0.6em); }
}
@keyframes mt-cut {
  0%, 38% { opacity: 0; transform: scaleY(1); }
  40%, 44.8% { opacity: 0.4; transform: scaleY(1); }
  45.2% { opacity: 1; transform: scaleY(1.4); }
  47.5% { opacity: 0.7; transform: scaleY(1); }
  99.4% { opacity: 0.7; transform: scaleY(1); }
  100% { opacity: 0; transform: scaleY(1); }
}
@keyframes mt-split {
  0%, 46% { transform: translate(0, 0); animation-timing-function: cubic-bezier(0.3, 0.6, 0.3, 1); }
  48.5%, 50% { transform: translate(1em, -0.2em); animation-timing-function: cubic-bezier(0.6, 0, 0.4, 1); }
  52.2% { transform: translate(-0.08em, 0); }
  53%, 100% { transform: translate(0, 0); }
}
@keyframes mt-snap { 0%, 52% { opacity: 0; } 52.4%, 55% { opacity: 1; } 58%, 100% { opacity: 0; } }

/* ═══════════════════ مشهد «البرمجة والتقنية» ═══════════════════
   src/views/scenes/tech.mjs يرسم الإطار الثابت (أول ملف مكتوب كامل + نتيجته في الطرفية)، و public/js/scenes/tech.js
   يفتح الملفات الثانية ويكتبها حرف حرف ويشغّلها. card: محرر + طرفية جانبية (جهة نص البطاقة) + إشعار النتيجة ·
   hero: محرر كامل + طرفية عايمة يمينه + مؤشر زميل · mini: محرر + سطرين طرفية. المقاسات بـ em، والألوان من
   base.css (--sc-*) + ألوان المشهد هنا.
   كل محدد تحت .scene-tech (بدون فواصل داخل :is() عشان فحص الاختبار). */

/* ── ألوان المشهد: الداكن ── */
.scene-tech {
  --tech-accent: var(--sc-a3);
  --tech-ok: var(--sc-ok);
  --tech-ps: #6cb6ff;
  --tech-js: #f2d34f;
  --tech-html: #ff8a65;
  --tech-json: #f6c177;
  --tech-prompt: #67e8f9;
  --tech-mate: var(--sc-pink);
  --tech-term-bg: rgba(3, 5, 12, 0.4);
  --tech-tab-on: rgba(255, 255, 255, 0.05);
  --tech-pop-bg: rgba(26, 30, 47, 0.98);
  --tech-pop-shadow: 0 0.9em 1.8em -0.7em rgba(0, 0, 0, 0.8);
  --tech-tw-bg: linear-gradient(180deg, rgba(19, 22, 37, 0.97), rgba(8, 10, 19, 0.98));
  --tech-status: linear-gradient(90deg, rgba(124, 92, 255, 0.8), rgba(56, 140, 245, 0.74));
  --tech-sheen: rgba(255, 255, 255, 0.06);
  --tech-lh: 1.62em;
  --tech-gutter: 2.8em;
}
/* ── الفاتح: زجاج أبيض، والطرفية العايمة تبقى غامقة (تباين حلو) ── */
:root[data-theme='light'] .scene-tech {
  --tech-ok: #0a7d52;
  --tech-ps: #2563eb;
  --tech-js: #a66a00;
  --tech-html: #e2572b;
  --tech-json: #b45309;
  --tech-prompt: #0e8fa3;
  --tech-term-bg: rgba(22, 29, 46, 0.035);
  --tech-tab-on: rgba(255, 255, 255, 0.95);
  --tech-pop-bg: rgba(255, 255, 255, 0.99);
  --tech-pop-shadow: 0 0.9em 1.8em -0.7em rgba(30, 40, 80, 0.35);
  --tech-tw-bg: linear-gradient(180deg, rgba(30, 35, 54, 0.97), rgba(16, 19, 33, 0.98));
  --tech-status: linear-gradient(90deg, #7c5cf0, #3b82f6);
  --tech-sheen: rgba(124, 92, 240, 0.07);
}

/* ── لمعة زجاج تمر على النافذة كل شوي (وقت ما المشهد حي بس) ── */
.scene-tech .tech-win::after { content: ''; position: absolute; inset: 0; z-index: 5; pointer-events: none; border-radius: inherit; background: linear-gradient(105deg, transparent 36%, var(--tech-sheen) 50%, transparent 64%); transform: translateX(-130%); }
.scene-tech.is-live .tech-win::after { animation: tech-sheen 13s ease-in-out calc(var(--sc-i, 0) * -1.3s) infinite; }
@keyframes tech-sheen {
  0%, 72% { transform: translateX(-130%); }
  92%, 100% { transform: translateX(130%); }
}

/* ── زر التشغيل وصور الفريق في شريط العنوان ── */
.scene-tech .tech-run { display: inline-flex; align-items: center; gap: 0.45em; padding: 0.18em 0.7em 0.18em 0.6em; border-radius: 2em; font-size: 0.72em; font-weight: 700; line-height: 1.4; color: var(--tech-ok); background: color-mix(in srgb, var(--tech-ok) 12%, transparent); border: 1px solid color-mix(in srgb, var(--tech-ok) 32%, transparent); }
.scene-tech .tech-run::before { content: ''; width: 0; height: 0; border-style: solid; border-width: 0.32em 0 0.32em 0.52em; border-color: transparent transparent transparent currentColor; }
.scene-tech .tech-run.is-run { box-shadow: 0 0 1em -0.2em color-mix(in srgb, var(--tech-ok) 70%, transparent); }
.scene-tech .tech-run.is-run::before { animation: tech-pulse 0.7s ease-in-out infinite alternate; }
.scene-tech .tech-team { display: inline-flex; }
.scene-tech .tech-team i { display: block; width: 1.25em; height: 1.25em; border-radius: 50%; border: 0.14em solid var(--sc-win-line); background: linear-gradient(135deg, var(--sc-a1), var(--sc-a2)); }
.scene-tech .tech-team i + i { margin-inline-start: -0.4em; background: linear-gradient(135deg, var(--tech-mate), var(--sc-a1)); }
@keyframes tech-pulse { to { opacity: 0.35; transform: scale(0.8); } }

/* ═════ المحرر ═════ */
.scene-tech .tech-editor { position: relative; min-width: 0; min-height: 0; overflow: hidden; }
.scene-tech .tech-code { position: relative; padding-top: 0.55em; font-family: var(--sc-mono); font-size: 0.86em; line-height: var(--tech-lh); white-space: pre; color: var(--sc-syn-var); transform: translateY(calc(var(--tech-row, 0) * var(--tech-lh) * -1)); transition: transform 0.5s cubic-bezier(0.2, 0.7, 0.2, 1), opacity 0.24s ease; }
.scene-tech .tech-code.is-out { opacity: 0; }
.scene-tech .tech-row { position: relative; height: var(--tech-lh); padding-inline-end: 0.6em; }
.scene-tech .tech-row.is-cur { background: var(--sc-hl); box-shadow: inset 0 1px 0 var(--sc-line), inset 0 -1px 0 var(--sc-line); }
.scene-tech .tech-ln { display: inline-block; width: var(--tech-gutter); padding-inline-end: 1.15em; text-align: right; font-size: 0.9em; color: var(--sc-ink-4); }
.scene-tech .tech-row.is-cur .tech-ln { color: var(--sc-ink-2); }

/* المؤشر: خط يرمش بلون مميز، وتحته قائمة الاقتراحات */
.scene-tech .tech-cur { position: relative; display: inline-block; width: 0; height: 1em; }
.scene-tech .tech-cur .sc-caret { position: absolute; left: 0; top: -0.04em; width: 0.13em; height: 1.24em; margin: 0; background: var(--tech-accent); box-shadow: 0 0 0.7em color-mix(in srgb, var(--tech-accent) 70%, transparent); }
/* وقت الكتابة المؤشر ثابت (ما يرمش) مثل المحررات الحقيقية */
.scene-tech .tech-cur.is-typing .sc-caret { animation: none; }
.scene-tech .tech-ac { position: absolute; top: 1.45em; left: -0.7em; z-index: 3; width: max-content; min-width: 10em; padding: 0.28em; border-radius: 0.55em; background: var(--tech-pop-bg); border: 1px solid var(--sc-line-2); box-shadow: var(--tech-pop-shadow); font-size: 0.9em; line-height: 1.65; opacity: 0; transform: translateY(-0.35em) scale(0.97); transform-origin: 0 0; transition: opacity 0.16s ease, transform 0.2s ease; }
.scene-tech .tech-cur.is-ac .tech-ac { opacity: 1; transform: none; }
.scene-tech .tech-ac b { position: relative; display: block; padding: 0 0.8em 0 1.75em; border-radius: 0.32em; font-weight: 400; color: var(--sc-ink-2); }
.scene-tech .tech-ac b:empty { display: none; }
.scene-tech .tech-ac b::before { content: ''; position: absolute; left: 0.55em; top: 50%; width: 0.62em; height: 0.62em; margin-top: -0.31em; border-radius: 0.16em; background: var(--sc-syn-keyword); }
.scene-tech .tech-ac b + b::before { background: var(--sc-syn-func); opacity: 0.8; }
.scene-tech .tech-ac b.is-sel { color: var(--sc-ink); background: var(--sc-sel); }
.scene-tech .tech-cur.is-pick .tech-ac b.is-sel { background: color-mix(in srgb, var(--tech-accent) 38%, transparent); }

/* مؤشر الزميل (الكبير): خط وردي وفوقه اسمه، ينط بين الأسطر بنعومة */
.scene-tech .tech-mate { position: relative; display: inline-block; width: 0; height: 1em; margin-inline-start: 0.2em; transition: opacity 0.26s ease; }
.scene-tech .tech-mate::before { content: ''; position: absolute; left: 0; top: -0.04em; width: 0.13em; height: 1.24em; border-radius: 0.06em; background: var(--tech-mate); }
.scene-tech .tech-mate b { position: absolute; left: 0; bottom: 1.12em; padding: 0 0.42em; border-radius: 0.35em 0.35em 0.35em 0; font-family: var(--sc-sans); font-size: 0.6em; font-weight: 800; line-height: 1.55; letter-spacing: 0.05em; white-space: nowrap; color: #fff; background: var(--tech-mate); box-shadow: 0 0.3em 0.8em -0.3em color-mix(in srgb, var(--tech-mate) 80%, transparent); }
.scene-tech .tech-mate.is-hop { opacity: 0; }

/* اقتراح رمادي (يتقبّل بـ Tab) */
.scene-tech .tech-ghost { color: var(--sc-ink-3); font-style: italic; }
.scene-tech .tech-ghost > span { color: var(--sc-ink-3); }
.scene-tech .tech-ghost::after { content: 'Tab'; display: inline-block; margin-inline-start: 0.7em; padding: 0 0.42em; border: 1px solid var(--sc-line-2); border-radius: 0.3em; font-size: 0.74em; line-height: 1.55; font-style: normal; color: var(--sc-ink-2); background: var(--sc-panel-2); vertical-align: 0.12em; }

/* أيقونات الملفات (تبويبات + مستكشف) */
.scene-tech .tech-tab::before { flex: none; font-family: var(--sc-mono); font-size: 0.82em; font-weight: 800; letter-spacing: -0.04em; }
.scene-tech .tech-file::before { flex: none; width: 1.5em; font-family: var(--sc-mono); font-size: 0.82em; font-weight: 800; letter-spacing: -0.04em; text-align: center; }
.scene-tech .is-ps::before { content: '>_'; color: var(--tech-ps); }
.scene-tech .is-js::before { content: 'JS'; color: var(--tech-js); }
.scene-tech .is-html::before { content: '<>'; color: var(--tech-html); }
.scene-tech .is-json::before { content: '{}'; color: var(--tech-json); }

/* ═════ الطرفية ═════ */
.scene-tech .tech-term { position: relative; min-width: 0; overflow: hidden; padding: 0.6em 0.85em; font-family: var(--sc-mono); font-size: 0.8em; line-height: 1.7; white-space: nowrap; color: var(--sc-ink-2); background: var(--tech-term-bg); }
.scene-tech .tech-tl { overflow: hidden; text-overflow: ellipsis; transition: opacity 0.5s ease; }
.scene-tech .tech-tl.is-old { opacity: 0.42; }
.scene-tech .tech-prompt::before { content: '\276F\00a0'; font-weight: 800; color: var(--tech-prompt); }
.scene-tech .tech-cmd { color: var(--sc-ink); }
.scene-tech .tech-ok::before { content: '\2713\00a0'; font-weight: 800; color: var(--tech-ok); }
.scene-tech .tech-tcur { display: inline-block; width: 0.55em; height: 1.1em; margin-inline-start: 0.12em; vertical-align: -0.2em; border-radius: 0.08em; background: var(--tech-prompt); opacity: 0.85; animation: tech-blink 1.1s steps(1, end) infinite; }
@keyframes tech-blink { 50% { opacity: 0; } }
/* النتيجة: الرقم يعدّ والعداد يتعبّى */
.scene-tech .tech-metric { display: flex; align-items: center; gap: 0.6em; margin-block: 0.4em 0.3em; padding: 0.3em 0.65em; border-radius: 0.6em; background: color-mix(in srgb, var(--tech-ok) 11%, transparent); border: 1px solid color-mix(in srgb, var(--tech-ok) 30%, transparent); }
.scene-tech .tech-metric b { flex: none; font-size: 0.8em; font-weight: 700; letter-spacing: 0.12em; color: var(--sc-ink-3); }
.scene-tech .tech-num { flex: none; min-width: 2.1em; font-size: 1.32em; font-weight: 800; line-height: 1.25; font-variant-numeric: tabular-nums; color: var(--tech-ok); text-shadow: 0 0 0.9em color-mix(in srgb, var(--tech-ok) 55%, transparent); }
.scene-tech .tech-num::after { content: attr(data-unit); margin-inline-start: 0.1em; font-size: 0.58em; font-weight: 700; }
.scene-tech .tech-meter { position: relative; flex: 1; min-width: 1.5em; height: 0.38em; overflow: hidden; border-radius: 1em; background: var(--sc-line-2); }
.scene-tech .tech-meter::after { content: ''; position: absolute; inset: 0; border-radius: inherit; background: linear-gradient(90deg, var(--sc-a2), var(--tech-ok)); transform-origin: 0 50%; }
.scene-tech .tech-delta { flex: none; font-size: 0.8em; font-weight: 800; color: var(--tech-ok); }
/* الأسطر الجديدة (من tech.js) تطلع بنعومة، والعداد يتعبّى من نسبته */
.scene-tech .tech-new { animation: tech-in 0.4s cubic-bezier(0.2, 0.7, 0.2, 1) both; }
.scene-tech .tech-metric.tech-new .tech-meter::after { animation: tech-fill 1.3s cubic-bezier(0.25, 0.8, 0.25, 1) both; }
@keyframes tech-in { from { opacity: 0; transform: translateY(0.5em); } }
@keyframes tech-fill { from { transform: scaleX(var(--tech-from, 0.5)); } }

/* ═════ البطاقة: محرر + طرفية جانبية جهة نص البطاقة (الكتابة تبقى عند الزاوية الواضحة) ═════ */
.scene-tech .tech-card > .sc-body { display: flex; }
:root[dir='ltr'] .scene-tech .tech-card > .sc-body { flex-direction: row-reverse; }
.scene-tech .tech-card .tech-editor { flex: 1; }
.scene-tech .tech-card .tech-code { font-size: 1.04em; padding-top: 0.5em; }
.scene-tech .tech-card .tech-term { flex: none; width: 9.6em; padding-top: 0.8em; border-left: 1px solid var(--sc-line); }
:root[dir='ltr'] .scene-tech .tech-card .tech-term { border-left: 0; border-right: 1px solid var(--sc-line); }
.scene-tech .tech-card .tech-metric { gap: 0.45em; padding-inline: 0.5em; }
.scene-tech .tech-card .tech-delta { display: none; }
/* إشعار النتيجة عند الزاوية الواضحة (يطلع من tech.js بعد التشغيل) */
.scene-tech .tech-toast { position: absolute; top: 0.6em; left: 0.7em; z-index: 4; display: flex; align-items: center; gap: 0.5em; padding: 0.32em 0.75em 0.32em 0.6em; border-radius: 0.7em; font-family: var(--sc-mono); white-space: nowrap; background: var(--tech-pop-bg); border: 1px solid color-mix(in srgb, var(--tech-ok) 42%, transparent); box-shadow: var(--tech-pop-shadow), 0 0 1.4em -0.3em color-mix(in srgb, var(--tech-ok) 55%, transparent); opacity: 0; transform: translateY(-0.6em) scale(0.94); transition: opacity 0.3s ease, transform 0.42s cubic-bezier(0.2, 0.8, 0.25, 1.25); }
:root[dir='ltr'] .scene-tech .tech-toast { left: auto; right: 0.7em; }
.scene-tech .tech-toast::before { content: '\2713'; font-weight: 800; color: var(--tech-ok); }
.scene-tech .tech-toast b { font-size: 0.72em; letter-spacing: 0.12em; color: var(--sc-ink-3); }
.scene-tech .tech-toast span { font-size: 1.15em; font-weight: 800; color: var(--tech-ok); }
.scene-tech .tech-toast.is-on { opacity: 1; transform: none; }

/* ═════ الصغير: محرر + سطرين طرفية تحت ═════ */
.scene-tech .tech-mini > .sc-body { display: flex; flex-direction: column; }
.scene-tech .tech-mini .tech-editor { flex: 1; }
.scene-tech .tech-mini .tech-code { font-size: 0.86em; padding-top: 0.45em; }
.scene-tech .tech-mini .tech-term { flex: none; height: 5.6em; padding-block: 0.45em 0.2em; border-top: 1px solid var(--sc-line); }
.scene-tech .tech-mini .tech-prompt::before { content: 'PS C:\\dwl>\00a0'; font-weight: 600; }
.scene-tech .tech-mini .tech-metric { margin-block: 0.25em; transition: opacity 0.25s ease; }
/* لقطة الاستوديو (tech.js beat): السطر اللي يتنفذ يتلوّن، والنتيجة تخف لين يخلص التشغيل */
.scene-tech .tech-mini .tech-row { transition: background-color 0.18s ease; }
.scene-tech .tech-mini .tech-row.is-exec { background: color-mix(in srgb, var(--tech-ok) 16%, transparent); box-shadow: inset 0.16em 0 0 var(--tech-ok); }
.scene-tech .tech-mini .tech-metric.is-wait { opacity: 0.3; }

/* ═════ الكبير: محرر كامل (أدوات، مستكشف، تبويبات، شريط حالة) ═════ */
.scene-tech .tech-hero > .sc-body { display: grid; grid-template-columns: 2.4em 7.8em minmax(0, 1fr); grid-template-rows: minmax(0, 1fr) 1.75em; }
.scene-tech .tech-act { display: flex; flex-direction: column; align-items: center; gap: 1.2em; padding-top: 1em; background: var(--sc-panel); border-right: 1px solid var(--sc-line); }
.scene-tech .tech-act i { position: relative; display: block; width: 1.1em; height: 1.1em; border: 0.13em solid var(--sc-ink-4); border-radius: 0.26em; }
.scene-tech .tech-act i.is-on { border-color: var(--sc-ink-2); }
.scene-tech .tech-act i.is-on::before { content: ''; position: absolute; top: -0.3em; bottom: -0.3em; left: -0.82em; width: 0.15em; border-radius: 1em; background: var(--tech-accent); }
.scene-tech .tech-act i.is-on::after { content: ''; position: absolute; top: 0.18em; left: 0.18em; right: 0.32em; height: 0.13em; background: currentColor; color: var(--sc-ink-2); box-shadow: 0 0.26em 0 currentColor; }
.scene-tech .tech-act i:nth-child(2) { width: 0.95em; height: 0.95em; border-radius: 50%; }
.scene-tech .tech-act i:nth-child(2)::after { content: ''; position: absolute; right: -0.4em; bottom: -0.28em; width: 0.42em; height: 0.13em; background: var(--sc-ink-4); transform: rotate(45deg); }
.scene-tech .tech-act i:nth-child(3) { width: 0.5em; height: 0.5em; border-radius: 50%; box-shadow: 0.4em 0.75em 0 -0.06em var(--sc-ink-4); }
.scene-tech .tech-act i:nth-child(4) { border-style: dashed; }
.scene-tech .tech-side { display: flex; flex-direction: column; gap: 0.12em; min-width: 0; overflow: hidden; padding-block: 0.85em; font-size: 0.76em; white-space: nowrap; background: var(--sc-panel); border-right: 1px solid var(--sc-line); }
.scene-tech .tech-side-h { padding: 0 1.15em 0.55em; font-size: 0.86em; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--sc-ink-3); }
.scene-tech .tech-folder { padding: 0.18em 1.15em; font-size: 0.9em; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; color: var(--sc-ink-2); }
.scene-tech .tech-folder::before { content: '\25BE\00a0'; color: var(--sc-ink-3); }
.scene-tech .tech-file { display: flex; align-items: center; gap: 0.35em; padding: 0.2em 0.8em 0.2em 1.4em; font-family: var(--sc-mono); color: var(--sc-ink-2); }
.scene-tech .tech-file.is-on { color: var(--sc-ink); background: var(--sc-sel); box-shadow: inset 0.16em 0 0 var(--tech-accent); }
.scene-tech .tech-main { display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.scene-tech .tech-tabs { display: flex; flex: none; height: 2.35em; overflow: hidden; background: var(--sc-panel); border-bottom: 1px solid var(--sc-line); }
.scene-tech .tech-tab { position: relative; display: flex; flex: none; align-items: center; gap: 0.5em; padding: 0 0.95em; font-family: var(--sc-mono); font-size: 0.74em; white-space: nowrap; color: var(--sc-ink-3); border-right: 1px solid var(--sc-line); }
.scene-tech .tech-tab::after { content: '\00d7'; margin-inline-start: 0.3em; font-size: 1.1em; color: transparent; }
.scene-tech .tech-tab.is-on { color: var(--sc-ink); background: var(--tech-tab-on); box-shadow: inset 0 0.16em 0 var(--tech-accent); }
.scene-tech .tech-tab.is-on::after { color: var(--sc-ink-3); }
.scene-tech .tech-tab.is-dirty::after { content: '\25CF'; font-size: 0.8em; color: var(--sc-ink-2); }
.scene-tech .tech-crumb { display: flex; flex: none; align-items: center; height: 1.85em; padding: 0 1.1em; font-family: var(--sc-mono); font-size: 0.7em; white-space: nowrap; color: var(--sc-ink-3); }
.scene-tech .tech-crumb::before { content: 'days-we-live\00a0\203A\00a0'; }
.scene-tech .tech-crumb span { color: var(--sc-ink-2); }
.scene-tech .tech-hero .tech-editor { flex: 1; }
.scene-tech .tech-hero .tech-code { padding-top: 0.25em; font-size: 0.92em; }
/* شريط الحالة: هادي (يطل شوي من جنب البنر)، والفرع بشريحة ملونة */
.scene-tech .tech-status { grid-column: 1 / -1; display: flex; align-items: center; gap: 1.3em; min-width: 0; overflow: hidden; padding-inline-end: 1em; font-size: 0.7em; font-weight: 600; white-space: nowrap; color: var(--sc-ink-3); background: var(--sc-panel-2); border-top: 1px solid var(--sc-line); }
.scene-tech .tech-st-git { align-self: stretch; display: flex; align-items: center; padding: 0 1em; color: #fff; background: var(--tech-status); }
.scene-tech .tech-st-git::before { content: ''; display: inline-block; width: 0.5em; height: 0.5em; margin-inline-end: 0.45em; border: 0.14em solid currentColor; border-radius: 50%; }
.scene-tech .tech-st-ok::before { content: '\2713\00a0'; color: var(--tech-ok); }
.scene-tech .tech-st-pos { margin-inline-start: auto; }
/* مع البنر: شريط الحالة تحته وما يطل منه غير أطراف نص مقصوصة — نخفيه (يبان في المسرح بدون بنر) */
.hero-stage.has-banner > .scene-tech .tech-status { visibility: hidden; }

/* نافذة الطرفية العايمة: يمين المحرر وتحت التبويبات، وتخلص قبل حد البنر (الحركة كلها في أعلى 70%) */
.scene-tech.scene--hero > .tech-termwin { inset: 19.5% 4.2% auto auto; width: 35%; height: 49.5%; --sc-radius: 0.95em; background: var(--tech-tw-bg); box-shadow: 0 1.6em 2.8em -1.1em rgba(0, 0, 0, 0.8), 0 0 0 1px rgba(0, 0, 0, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.07); }
.scene-tech.is-live > .tech-termwin { animation: tech-float 9s ease-in-out calc(var(--sc-i, 0) * -1.3s) infinite; }
/* وقت التشغيل: حد النافذة يتوهج */
.scene-tech .tech-termwin::after { content: ''; position: absolute; inset: 0; z-index: 2; pointer-events: none; border-radius: inherit; box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--tech-prompt) 55%, transparent), inset 0 0 2.4em -0.8em color-mix(in srgb, var(--tech-prompt) 60%, transparent); opacity: 0; transition: opacity 0.6s ease; }
.scene-tech .tech-termwin.is-run::after { opacity: 1; }
.scene-tech .tech-termwin .sc-titlebar { height: 2.1em; }
.scene-tech .tech-termwin .tech-term { height: 100%; padding: 0.7em 1em; background: none; }
.scene-tech .tech-termwin .tech-prompt::before { content: 'PS C:\\dwl>\00a0'; font-weight: 600; }
.scene-tech .tech-termwin .tech-metric { margin-block: 0.55em 0.4em; padding: 0.45em 0.75em; }
.scene-tech .tech-termwin .tech-num { font-size: 1.6em; }
.scene-tech .tech-live { display: block; width: 0.55em; height: 0.55em; border-radius: 50%; background: var(--tech-ok); box-shadow: 0 0 0.7em var(--tech-ok); opacity: 0.55; }
.scene-tech .tech-live.is-run { opacity: 1; animation: tech-pulse 0.6s ease-in-out infinite alternate; }
@keyframes tech-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-0.5em); }
}
:root[data-theme='light'] .scene-tech .tech-termwin {
  --sc-ink: #e8ecf4;
  --sc-ink-2: #b6bfce;
  --sc-ink-3: #808a9e;
  --sc-ink-4: #4b5468;
  --sc-line: rgba(255, 255, 255, 0.07);
  --sc-line-2: rgba(255, 255, 255, 0.15);
  --sc-win-bar: rgba(255, 255, 255, 0.035);
  --sc-win-line: rgba(10, 14, 28, 0.5);
  --tech-ok: #46d6a0;
  --tech-prompt: #67e8f9;
  box-shadow: 0 1.6em 2.8em -1.1em rgba(30, 40, 80, 0.55), 0 0 0 1px rgba(10, 14, 28, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

/* ═════ صناديق صغيرة (الجوال): بدون شريط الأدوات والمستكشف، والكود أكبر ═════ */
@container (max-width: 460px) {
  .scene-tech .tech-hero > .sc-body { grid-template-columns: minmax(0, 1fr); }
  .scene-tech .tech-hero .tech-act { display: none; }
  .scene-tech .tech-hero .tech-side { display: none; }
  .scene-tech .tech-hero .tech-code { font-size: 1em; }
  .scene-tech .tech-hero .tech-crumb { display: none; }
  .scene-tech.scene--hero > .tech-termwin { top: 16%; width: 49%; height: 53%; }
}

/* الجوال: مؤشر الطرفية ثابت، والطرفية العايمة ما تطفو (كل حركة دايمة = إطار كامل للصفحة على معالج أضعف) */
@media (max-width: 640px) {
  .scene-tech .tech-tcur,
  .scene-tech.is-live > .tech-termwin { animation: none; }
}

/* ═══════════════════ مشهد «الستريمرز»: استوديو بث مباشر ═══════════════════
   src/views/scenes/streamers.mjs (الشكل) + public/js/scenes/streamers.js (العدّادات، الشات، التنبيهات).
   المعاينة (.st-view) فيها لعبة سباق نيون (.st-game: سماء، شمس مخططة، جبال تتحرك بطبقات، أرضية شبكة ثلاثية
   الأبعاد تجري، خطوط سرعة، جواهر، سيارة)، وفوقها طبقات البث (كام، مشاهدين، هدف، تنبيه بقصاصات).
   كل محدد تحت .scene-streamers، وأسماء الحركات streamers-*. مقاسات اللعبة بـ cqw/cqh (حاوية .st-game) عشان
   شكلها واحد بكل الأحجام؛ الباقي بـ em المشهد. الستايل بدون keyframes = الإطار الثابت (بدون حركة). */

/* ── الألوان: الداكن (ليل نيون) ── */
.scene-streamers {
  --st-u1: #c4b5fd;
  --st-u2: #7cc4ff;
  --st-u3: #67e8f9;
  --st-u4: #6ee7b7;
  --st-u5: #f6c177;
  --st-u6: #f9a8d4;
  --st-sky-1: #070a1f;
  --st-sky-2: #161244;
  --st-sky-3: #3f1f6c;
  --st-sky-4: #9a3d79;
  --st-haze: rgba(255, 108, 168, 0.5);
  --st-sun-1: #ffe9a8;
  --st-sun-2: #ff8db4;
  --st-sun-3: #a855f7;
  --st-mt-1: #2a2163;
  --st-mt-2: #120e33;
  --st-rim: rgba(199, 184, 255, 0.7);
  --st-floor-1: #150d38;
  --st-floor-2: #05061a;
  --st-grid: rgba(103, 232, 249, 0.6);
  --st-road: rgba(7, 6, 24, 0.92);
  --st-edge: rgba(244, 114, 182, 0.95);
  --st-dash: rgba(255, 233, 168, 0.9);
  --st-star: rgba(255, 255, 255, 0.92);
  --st-streak: rgba(236, 240, 255, 0.75);
  --st-car-1: #1c2044;
  --st-car-2: #0a0c1e;
  --st-glass: #34437c;
  --st-tail: #ff4d8d;
  --st-tail-glow: rgba(255, 77, 141, 0.6);
  --st-ov: rgba(9, 11, 26, 0.76);
  --st-ov-solid: rgba(12, 14, 30, 0.94);
  --st-ov-line: rgba(255, 255, 255, 0.16);
  --st-ov-ink: #f4f6fb;
  --st-ov-ink-2: rgba(226, 231, 242, 0.74);
  --st-room-1: #2b1c63;
  --st-room-2: #0a0f2c;
  --st-me: #090c1f;
  --st-me-rim: rgba(103, 232, 249, 0.8);
  --st-set: #a78bfa;
  --st-tag: rgba(0, 0, 0, 0.58);
  --st-hl: rgba(167, 139, 250, 0.22);
}

/* ── الفاتح (فجر باستيل: نفس اللعبة بألوان الصبح) ── */
:root[data-theme='light'] .scene-streamers {
  --st-u1: #7c3aed;
  --st-u2: #2563eb;
  --st-u3: #0e7490;
  --st-u4: #047857;
  --st-u5: #b45309;
  --st-u6: #db2777;
  --st-sky-1: #bfd0ff;
  --st-sky-2: #d8d2ff;
  --st-sky-3: #f1d4ff;
  --st-sky-4: #ffd3dc;
  --st-haze: rgba(255, 176, 128, 0.6);
  --st-sun-1: #fff5c8;
  --st-sun-2: #ffad86;
  --st-sun-3: #f2649f;
  --st-mt-1: #b7a6f4;
  --st-mt-2: #8a72e6;
  --st-rim: rgba(255, 255, 255, 0.9);
  --st-floor-1: #f1ecff;
  --st-floor-2: #ddd2fb;
  --st-grid: rgba(124, 58, 237, 0.42);
  --st-road: rgba(83, 60, 170, 0.86);
  --st-edge: rgba(236, 72, 153, 0.95);
  --st-dash: rgba(255, 255, 255, 0.95);
  --st-star: rgba(255, 255, 255, 0.9);
  --st-streak: rgba(255, 255, 255, 0.95);
  --st-car-1: #2b315f;
  --st-car-2: #171a38;
  --st-glass: #7486d4;
  --st-tail: #ff3d7f;
  --st-tail-glow: rgba(255, 61, 127, 0.45);
  --st-ov: rgba(255, 255, 255, 0.86);
  --st-ov-solid: rgba(255, 255, 255, 0.96);
  --st-ov-line: rgba(22, 29, 46, 0.1);
  --st-ov-ink: #172033;
  --st-ov-ink-2: #4a5468;
  --st-room-1: #cbbcff;
  --st-room-2: #eef0ff;
  --st-me: #363c72;
  --st-me-rim: rgba(255, 255, 255, 0.95);
  --st-set: #7c3aed;
  --st-tag: rgba(255, 255, 255, 0.86);
  --st-hl: rgba(124, 58, 237, 0.13);
}

/* ═════ شريط العنوان: LIVE ينبض + المشاهدين + مدة البث ═════ */
.scene-streamers .st-live { position: relative; display: inline-flex; align-items: center; gap: 0.42em; height: 1.75em; padding-inline: 0.55em 0.65em; border-radius: 0.45em; background: var(--sc-live); color: #fff; font: 800 0.64em/1 var(--sc-sans); letter-spacing: 0.1em; box-shadow: 0 0.3em 1em -0.3em var(--sc-live); }
.scene-streamers .st-live i { display: block; width: 0.55em; height: 0.55em; border-radius: 50%; background: #fff; animation: streamers-dot 1.5s ease-in-out infinite; }
.scene-streamers .st-live::after { content: ''; position: absolute; inset: 0; border-radius: inherit; border: 1px solid var(--sc-live); opacity: 0; animation: streamers-ring 2.4s ease-out infinite; }
.scene-streamers .st-views { display: inline-flex; align-items: center; gap: 0.35em; height: 1.75em; padding-inline: 0.45em 0.55em; border-radius: 0.45em; background: var(--sc-panel-2); color: var(--sc-ink); font: 700 0.64em/1 var(--sc-mono); }
.scene-streamers .st-views b { font-weight: 700; }
.scene-streamers .st-ico { width: 1.25em; height: 1.25em; flex: none; fill: var(--sc-live); }
.scene-streamers .st-views.is-bump { animation: streamers-bump 0.8s cubic-bezier(0.2, 1.6, 0.4, 1); }
.scene-streamers .st-up { font: 600 0.68em/1 var(--sc-mono); color: var(--sc-ink-2); letter-spacing: 0.04em; }

/* ═════ التخطيط حسب نوع العرض ═════ */
.scene-streamers .st-hero > .sc-body { display: grid; grid-template-columns: minmax(0, 1fr) 13.4em; grid-template-rows: auto minmax(0, 1fr); gap: 0.7em; padding: 0.7em; }
.scene-streamers .st-hero .st-view { grid-area: 1 / 1; }
.scene-streamers .st-hero .st-chat { grid-area: 1 / 2; contain: size; }
.scene-streamers .st-hero .st-dock { grid-area: 2 / 1; }
.scene-streamers .st-hero .st-foot { grid-area: 2 / 2; }
/* البطاقة: الشات جهة النص (يتلاشى) والمعاينة جهة الزاوية الواضحة */
.scene-streamers .st-card > .sc-body { display: grid; grid-template-columns: 9.6em minmax(0, 1fr); grid-template-rows: minmax(0, 1fr); gap: 0.55em; padding: 0.55em; }
.scene-streamers .st-main { display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.scene-streamers .st-mini > .sc-body { padding: 0.45em; }
.scene-streamers .st-mini .st-view { position: absolute; inset: 0.45em; aspect-ratio: auto; }

/* ═════ المعاينة + اللعبة ═════ */
.scene-streamers .st-view { position: relative; isolation: isolate; overflow: hidden; flex: none; aspect-ratio: 16 / 9; border-radius: 0.75em; background: var(--st-sky-1); box-shadow: 0 0 0 1px var(--sc-line-2), 0 1em 2em -1.2em rgba(0, 0, 0, 0.7); }
.scene-streamers .st-game { position: absolute; inset: 0; overflow: hidden; container-type: size; background: radial-gradient(58% 32% at 50% 58%, var(--st-haze), transparent 72%), linear-gradient(180deg, var(--st-sky-1), var(--st-sky-2) 24%, var(--st-sky-3) 44%, var(--st-sky-4) 58%); }
.scene-streamers .st-game > * { position: absolute; display: block; }

/* نجوم (الداكن) / غيوم (الفاتح) */
.scene-streamers .st-stars {
  inset: 0 0 44%;
  background-image:
    radial-gradient(circle at 6% 16%, var(--st-star) 0.2cqw, transparent 0.32cqw),
    radial-gradient(circle at 15% 44%, var(--st-star) 0.14cqw, transparent 0.26cqw),
    radial-gradient(circle at 23% 9%, var(--st-star) 0.18cqw, transparent 0.3cqw),
    radial-gradient(circle at 34% 30%, var(--st-star) 0.12cqw, transparent 0.24cqw),
    radial-gradient(circle at 46% 6%, var(--st-star) 0.16cqw, transparent 0.28cqw),
    radial-gradient(circle at 62% 13%, var(--st-star) 0.2cqw, transparent 0.32cqw),
    radial-gradient(circle at 71% 38%, var(--st-star) 0.12cqw, transparent 0.24cqw),
    radial-gradient(circle at 80% 7%, var(--st-star) 0.16cqw, transparent 0.28cqw),
    radial-gradient(circle at 89% 27%, var(--st-star) 0.2cqw, transparent 0.32cqw),
    radial-gradient(circle at 96% 52%, var(--st-star) 0.12cqw, transparent 0.24cqw);
  animation: streamers-twinkle 3.4s ease-in-out infinite alternate;
}
:root[data-theme='light'] .scene-streamers .st-stars {
  inset: 4% -20% 46% -20%;
  background-image:
    radial-gradient(16cqw 3.2cqh at 18% 30%, rgba(255, 255, 255, 0.85), transparent 70%),
    radial-gradient(11cqw 2.4cqh at 27% 24%, rgba(255, 255, 255, 0.7), transparent 70%),
    radial-gradient(18cqw 3.6cqh at 74% 18%, rgba(255, 255, 255, 0.8), transparent 70%),
    radial-gradient(10cqw 2.2cqh at 84% 26%, rgba(255, 255, 255, 0.65), transparent 70%);
  animation: streamers-drift 46s ease-in-out infinite alternate;
}

/* الشمس المخططة (نص فوق كامل، النص تحت شرائط) */
.scene-streamers .st-sun {
  left: 33cqw;
  top: 11cqh;
  width: 34cqw;
  aspect-ratio: 1;
  border-radius: 50%;
  background: linear-gradient(180deg, var(--st-sun-1) 8%, var(--st-sun-2) 50%, var(--st-sun-3) 84%);
  -webkit-mask-image: linear-gradient(#000 0 47%, transparent 47%), repeating-linear-gradient(180deg, #000 0 2.7cqw, transparent 2.7cqw 3.6cqw);
  mask-image: linear-gradient(#000 0 47%, transparent 47%), repeating-linear-gradient(180deg, #000 0 2.7cqw, transparent 2.7cqw 3.6cqw);
}

/* الجبال: طبقتين تمشي بسرعات مختلفة (المسار متكرر مرتين: نزيح نصه ويلف) */
.scene-streamers .st-mt { left: 0; bottom: 42%; width: 200%; max-width: none; height: 21%; animation: streamers-pan 80s linear calc(var(--sc-i, 0) * -7s) infinite; }
.scene-streamers .st-mt path { fill: var(--st-mt-1); stroke: var(--st-rim); stroke-width: 1; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.scene-streamers .st-mt-near { height: 12%; animation-duration: 38s; }
.scene-streamers .st-mt-near path { fill: var(--st-mt-2); stroke-opacity: 0.55; }

/* الأرضية: مستوى ثلاثي الأبعاد (الطريق + الشبكة عليه) يتحرك خانة وحدة ويلف */
.scene-streamers .st-floor { inset: 58% 0 0; overflow: hidden; perspective: 12cqh; perspective-origin: 50% 0; background: linear-gradient(180deg, var(--st-floor-1), var(--st-floor-2)); }
.scene-streamers .st-floor::after { content: ''; position: absolute; inset: 0 0 auto; height: 46%; background: linear-gradient(180deg, var(--st-floor-1) 12%, transparent); }
.scene-streamers .st-plane {
  position: absolute;
  left: -160cqw;
  right: -160cqw;
  bottom: 0;
  height: 300cqh;
  transform-origin: 50% 100%;
  transform: rotateX(78deg);
  background:
    linear-gradient(90deg, transparent calc(50% - 13cqw), var(--st-edge) calc(50% - 13cqw) calc(50% - 12.2cqw), var(--st-road) calc(50% - 12.2cqw) calc(50% + 12.2cqw), var(--st-edge) calc(50% + 12.2cqw) calc(50% + 13cqw), transparent calc(50% + 13cqw)),
    repeating-linear-gradient(0deg, var(--st-grid) 0 0.45cqw, transparent 0.45cqw 8cqw),
    repeating-linear-gradient(90deg, var(--st-grid) 0 0.45cqw, transparent 0.45cqw 8cqw);
  background-position: 0 100%, 0 100%, 50% 0;
  animation: streamers-drive 0.62s linear infinite;
}
.scene-streamers .st-plane::before { content: ''; position: absolute; left: calc(50% - 0.5cqw); width: 1cqw; top: 0; bottom: 0; background: repeating-linear-gradient(0deg, var(--st-dash) 0 4cqw, transparent 4cqw 8cqw); background-position: 0 100%; }
.scene-streamers .st-horizon { left: 0; right: 0; top: 58%; height: 0.7cqh; margin-top: -0.35cqh; background: linear-gradient(90deg, transparent, var(--st-edge) 26%, var(--st-sun-1) 50%, var(--st-edge) 74%, transparent); box-shadow: 0 0 3cqh 0.4cqh var(--st-haze); }

/* خطوط السرعة: تطلع من نقطة التلاشي للأطراف */
.scene-streamers .st-speed { left: 50%; top: 58%; width: 0; height: 0; }
.scene-streamers .st-speed i { position: absolute; left: -0.16cqw; top: 0; width: 0.32cqw; height: 16cqh; border-radius: 1cqw; background: linear-gradient(180deg, transparent, var(--st-streak)); transform-origin: 50% 0; opacity: 0; animation: streamers-streak 1.25s cubic-bezier(0.5, 0, 1, 0.6) infinite; }
.scene-streamers .st-speed i:nth-child(1) { --a: 64deg; animation-delay: -0.15s; }
.scene-streamers .st-speed i:nth-child(2) { --a: -70deg; animation-delay: -0.55s; }
.scene-streamers .st-speed i:nth-child(3) { --a: 82deg; animation-delay: -0.9s; }
.scene-streamers .st-speed i:nth-child(4) { --a: -84deg; animation-delay: -0.35s; }
.scene-streamers .st-speed i:nth-child(5) { --a: 96deg; animation-delay: -0.75s; }
.scene-streamers .st-speed i:nth-child(6) { --a: -98deg; animation-delay: -1.05s; }

/* جواهر على الطريق تقرّب */
.scene-streamers .st-gems { left: 50%; top: 58%; width: 0; height: 0; }
.scene-streamers .st-gems i { position: absolute; left: -1.1cqw; top: -1.1cqw; width: 2.2cqw; height: 2.2cqw; border-radius: 0.35cqw; background: linear-gradient(135deg, #fff 8%, var(--sc-a3) 42%, var(--sc-a1) 92%); box-shadow: 0 0 1.6cqw var(--sc-a3); transform: translate(calc(var(--gx) * var(--gk)), var(--gy)) scale(var(--gs)) rotate(45deg); animation: streamers-gem 2.7s cubic-bezier(0.6, 0, 0.92, 0.45) infinite; }
/* الإطار الثابت: كل جوهرة على عمق مختلف على خط مسارها (--gy بعدها عن الأفق، --gk = 3.3 × gy ÷ 46، --gs حجمها) */
.scene-streamers .st-gems i:nth-child(1) { --gx: -6cqw; --gy: 9cqh; --gk: 0.65; --gs: 0.8; animation-delay: -1.6s; }
.scene-streamers .st-gems i:nth-child(2) { --gx: 6.5cqw; --gy: 22cqh; --gk: 1.58; --gs: 1.6; animation-delay: -0.5s; }
.scene-streamers .st-gems i:nth-child(3) { --gx: -2cqw; --gy: 3.5cqh; --gk: 0.25; --gs: 0.45; animation-delay: -2.3s; background: linear-gradient(135deg, #fff 8%, var(--sc-warn) 45%, var(--sc-pink) 92%); box-shadow: 0 0 1.6cqw var(--sc-warn); }

/* السيارة: تلف يمين ويسار مع ميلان خفيف، وتوهج الأنوار الخلفية */
.scene-streamers .st-car { left: 39cqw; bottom: 3.5cqh; width: 22cqw; animation: streamers-steer 8s ease-in-out calc(var(--sc-i, 0) * -1.3s) infinite; }
.scene-streamers .st-car svg { position: relative; width: 100%; height: auto; }
.scene-streamers .st-car::after { content: ''; position: absolute; left: -12%; right: -12%; top: 26%; height: 56%; background: radial-gradient(closest-side, var(--st-tail-glow), transparent); }
.scene-streamers .st-car-sh { fill: rgba(0, 0, 0, 0.5); }
.scene-streamers .st-car-body { fill: var(--st-car-1); stroke: var(--st-rim); stroke-width: 0.35; stroke-opacity: 0.6; }
.scene-streamers .st-car-glass { fill: var(--st-glass); }
.scene-streamers .st-car-tail { fill: var(--st-tail); }
.scene-streamers .st-car-trim { fill: var(--st-car-2); }
.scene-streamers .st-car-tire { fill: #05060f; }

/* ═════ طبقات البث فوق اللعبة ═════ */
.scene-streamers .st-view > .st-views { position: absolute; z-index: 2; top: 0.6em; inset-inline-start: 0.6em; height: 1.9em; background: var(--st-ov); color: var(--st-ov-ink); box-shadow: 0 0 0 1px var(--st-ov-line); }

/* هدف الاشتراكات (--st-goal من 0 لـ 1؛ الحركة تغيّره) */
.scene-streamers .st-goal { --st-goal: 0.87; position: absolute; z-index: 2; top: 0.6em; inset-inline-end: 0.6em; width: 9.8em; padding: 0.45em 0.6em 0.55em; border-radius: 0.6em; background: var(--st-ov); color: var(--st-ov-ink); box-shadow: 0 0 0 1px var(--st-ov-line); }
.scene-streamers .st-goal-h { display: flex; align-items: baseline; justify-content: space-between; gap: 0.5em; font-size: 0.62em; line-height: 1.2; white-space: nowrap; }
.scene-streamers .st-goal-h b { font-weight: 800; }
.scene-streamers .st-goal-h > span { font-family: var(--sc-mono); color: var(--st-ov-ink-2); direction: ltr; unicode-bidi: isolate; }
.scene-streamers .st-goal-h em { font-style: normal; font-weight: 700; color: var(--st-ov-ink); }
.scene-streamers .st-goal-bar { position: relative; display: block; height: 0.5em; margin-top: 0.4em; border-radius: 1em; background: var(--sc-line-2); overflow: hidden; }
.scene-streamers .st-goal-bar i { position: absolute; inset: 0; overflow: hidden; border-radius: inherit; background: linear-gradient(90deg, var(--sc-a1), var(--sc-a2) 60%, var(--sc-a3)); transform-origin: 0 50%; transform: scaleX(var(--st-goal)); transition: transform 1.2s cubic-bezier(0.2, 0.8, 0.2, 1); }
.scene-streamers .sc-window[dir='rtl'] .st-goal-bar i { transform-origin: 100% 50%; background: linear-gradient(270deg, var(--sc-a1), var(--sc-a2) 60%, var(--sc-a3)); }
.scene-streamers .st-goal-bar i::after { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, transparent 20%, rgba(255, 255, 255, 0.6) 50%, transparent 80%); transform: translateX(-100%); animation: streamers-shine 3.2s ease-in-out 1s infinite; }
.scene-streamers .st-goal.is-full { box-shadow: 0 0 0 1px var(--sc-a1), 0 0 1.4em -0.2em var(--sc-a1); }

/* التنبيه: بطاقة بحد متدرج، أيقونة، والقصاصات */
.scene-streamers .st-alert {
  position: absolute;
  z-index: 3;
  top: 19%;
  inset-inline: 0;
  margin-inline: auto;
  width: max-content;
  max-width: 82%;
  display: flex;
  align-items: center;
  gap: 0.6em;
  padding-block: 0.45em;
  padding-inline: 0.45em 0.9em;
  border: 1px solid transparent;
  border-radius: 0.85em;
  background: linear-gradient(var(--st-ov-solid), var(--st-ov-solid)) padding-box, linear-gradient(120deg, var(--sc-a1), var(--sc-a3) 55%, var(--sc-pink)) border-box;
  color: var(--st-ov-ink);
  box-shadow: 0 0.8em 2em -0.8em rgba(0, 0, 0, 0.75), 0 0 1.8em -0.5em var(--sc-a1);
  transition: opacity 0.5s ease, transform 0.5s ease;
}
.scene-streamers .st-al-ic { position: relative; display: grid; place-items: center; width: 2.15em; height: 2.15em; flex: none; border-radius: 0.6em; background: linear-gradient(135deg, var(--sc-a1), var(--sc-a2)); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35); font-size: 1em; line-height: 1; }
.scene-streamers .st-alert[data-st-type='follow'] .st-al-ic { background: linear-gradient(135deg, var(--sc-pink), var(--sc-a1)); }
.scene-streamers .st-alert[data-st-type='raid'] .st-al-ic { background: linear-gradient(135deg, var(--sc-warn), var(--sc-pink)); }
.scene-streamers .st-alert[data-st-type='gift'] .st-al-ic { background: linear-gradient(135deg, var(--sc-ok), var(--sc-a3)); }
.scene-streamers .st-al-tx { display: grid; min-width: 0; line-height: 1.25; white-space: nowrap; }
.scene-streamers .st-al-tx b { font-size: 0.86em; font-weight: 800; letter-spacing: 0.01em; }
.scene-streamers .st-al-tx small { font-size: 0.68em; color: var(--st-ov-ink-2); overflow: hidden; text-overflow: ellipsis; }
.scene-streamers .st-burst { position: absolute; z-index: -1; left: 50%; top: 50%; width: 0; height: 0; }
.scene-streamers .st-burst i { position: absolute; left: -0.16em; top: -0.32em; width: 0.32em; height: 0.64em; border-radius: 0.08em; background: var(--c, var(--sc-a1)); opacity: 0.9; transform: translate(var(--x), var(--y)) rotate(var(--r)); }
.scene-streamers .st-burst i:nth-child(1) { --x: -7.6em; --y: -1.7em; --r: 28deg; --c: var(--sc-a1); }
.scene-streamers .st-burst i:nth-child(2) { --x: 7.2em; --y: -1.9em; --r: -24deg; --c: var(--sc-a3); }
.scene-streamers .st-burst i:nth-child(3) { --x: -5.4em; --y: 2.3em; --r: -40deg; --c: var(--sc-warn); }
.scene-streamers .st-burst i:nth-child(4) { --x: 5.8em; --y: 2.2em; --r: 52deg; --c: var(--sc-pink); }
.scene-streamers .st-burst i:nth-child(5) { --x: -9em; --y: 0.4em; --r: 70deg; --c: var(--sc-ok); }
.scene-streamers .st-burst i:nth-child(6) { --x: 8.8em; --y: 0.2em; --r: -66deg; --c: var(--sc-a2); }
.scene-streamers .st-burst i:nth-child(7) { --x: -2.6em; --y: -2.7em; --r: 12deg; --c: var(--sc-pink); }
.scene-streamers .st-burst i:nth-child(8) { --x: 2.9em; --y: 2.8em; --r: -14deg; --c: var(--sc-a1); }
.scene-streamers .st-burst i:nth-child(9) { --x: 3.4em; --y: -2.8em; --r: 36deg; --c: var(--sc-warn); }
.scene-streamers .st-burst i:nth-child(10) { --x: -3.2em; --y: 2.9em; --r: -30deg; --c: var(--sc-a3); }
/* مع الحركة: القصاصات تطلع بس وقت الدخول، والتنبيه يدخل وينط ويطلع */
.scene-streamers[data-scene-mounted] .st-burst i { opacity: 0; }
.scene-streamers .st-alert.is-in { animation: streamers-pop 0.9s cubic-bezier(0.2, 1.5, 0.4, 1) both; }
.scene-streamers .st-alert.is-in .st-al-ic { animation: streamers-wiggle 1.1s 0.35s ease-in-out both; }
.scene-streamers .st-alert.is-in .st-burst i { animation: streamers-confetti 1.4s cubic-bezier(0.12, 0.7, 0.3, 1) 0.12s both; }
.scene-streamers .st-alert.is-out { opacity: 0; transform: translateY(-0.8em) scale(0.9); }

/* كام الستريمر: غرفة بإضاءة RGB، شخص بسماعة يتكلم، اسمه ومؤشر صوته */
.scene-streamers .st-cam {
  position: absolute;
  z-index: 2;
  bottom: 0.6em;
  inset-inline-start: 0.6em;
  width: 7.4em;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border: 0.14em solid transparent;
  border-radius: 0.65em;
  background:
    radial-gradient(70% 60% at 18% 12%, rgba(167, 139, 250, 0.6), transparent 70%) padding-box,
    radial-gradient(60% 60% at 92% 30%, rgba(103, 232, 249, 0.38), transparent 70%) padding-box,
    linear-gradient(180deg, var(--st-room-1), var(--st-room-2)) padding-box,
    linear-gradient(135deg, var(--sc-a1), var(--sc-a3)) border-box;
  box-shadow: 0 0.7em 1.4em -0.7em rgba(0, 0, 0, 0.8);
}
.scene-streamers .st-cam::before { content: ''; position: absolute; left: 0; top: 30%; width: 200%; height: 0.22em; background: linear-gradient(90deg, var(--sc-pink), var(--sc-a1), var(--sc-a3), var(--sc-ok), var(--sc-pink), var(--sc-a1), var(--sc-a3), var(--sc-ok), var(--sc-pink)); opacity: 0.85; box-shadow: 0 0 0.6em var(--sc-a1); animation: streamers-pan 6s linear infinite; }
/* هزّة الكلام على الـ <svg> نفسه (عنصر CSS ينحرك بالكرت) — على <g> داخله كانت تشغّل الصفحة كل إطار */
.scene-streamers .st-cam svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: hidden; transform-origin: 50% 100%; animation: streamers-talk 3.6s ease-in-out infinite; }
.scene-streamers .st-me-body, .scene-streamers .st-me-head { fill: var(--st-me); stroke: var(--st-me-rim); stroke-width: 0.45; }
.scene-streamers .st-me-set { fill: none; stroke: var(--st-set); stroke-width: 1.5; stroke-linecap: round; }
.scene-streamers .st-me-ear { fill: var(--st-set); }
.scene-streamers .st-me-mic { fill: none; stroke: var(--st-set); stroke-width: 0.85; stroke-linecap: round; }
.scene-streamers .st-cam-tag { position: absolute; bottom: 0.45em; inset-inline-start: 0.45em; display: inline-flex; align-items: center; gap: 0.35em; padding: 0.2em 0.45em; border-radius: 0.4em; background: var(--st-tag); color: var(--st-ov-ink); font: 700 0.5em/1.2 var(--sc-mono); unicode-bidi: isolate; }
.scene-streamers .st-eq { display: inline-flex; align-items: flex-end; gap: 0.14em; height: 0.95em; }
.scene-streamers .st-eq i { display: block; width: 0.2em; height: 100%; border-radius: 0.1em; background: var(--sc-ok); transform-origin: 50% 100%; transform: scaleY(0.55); animation: streamers-eq 0.8s ease-in-out infinite alternate; }
.scene-streamers .st-eq i:nth-child(2) { transform: scaleY(0.9); animation-duration: 0.55s; animation-delay: -0.3s; }
.scene-streamers .st-eq i:nth-child(3) { transform: scaleY(0.4); animation-duration: 0.7s; animation-delay: -0.5s; }

/* تفاعلات المشاهدين: إيموجي تطلع وتتمايل وتختفي (حركة بس: الإطار الثابت بدونها) */
.scene-streamers .st-reacts { --st-rise: 8em; position: absolute; z-index: 2; bottom: 3.2em; inset-inline-end: 1.3em; width: 0; height: 0; }
.scene-streamers .st-reacts i { position: absolute; left: -0.55em; bottom: 0; font-style: normal; font-size: 1.1em; line-height: 1; opacity: 0; animation: streamers-react 4.5s ease-out infinite; }
.scene-streamers .st-reacts i::before { content: '\1F49C'; }
.scene-streamers .st-reacts i:nth-child(2) { --sx: -0.9em; animation-delay: -0.9s; }
.scene-streamers .st-reacts i:nth-child(2)::before { content: '\1F525'; }
.scene-streamers .st-reacts i:nth-child(3) { --sx: 0.4em; animation-delay: -1.8s; font-size: 0.95em; }
.scene-streamers .st-reacts i:nth-child(3)::before { content: '\1F602'; }
.scene-streamers .st-reacts i:nth-child(4) { --sx: -0.5em; animation-delay: -2.7s; }
.scene-streamers .st-reacts i:nth-child(4)::before { content: '\2B50'; }
.scene-streamers .st-reacts i:nth-child(5) { --sx: 0.8em; animation-delay: -3.6s; font-size: 0.9em; }
.scene-streamers .st-reacts i:nth-child(5)::before { content: '\1F44F'; }

/* عدّاد السرعة (من اللعبة) */
.scene-streamers .st-hud { position: absolute; z-index: 2; bottom: 0.55em; inset-inline-end: 0.75em; display: grid; justify-items: end; color: #fff; text-shadow: 0 0 0.8em var(--st-edge), 0 0.1em 0.3em rgba(0, 0, 0, 0.6); line-height: 1; }
:root[data-theme='light'] .scene-streamers .st-hud { color: #3a2a86; text-shadow: 0 0 0.7em rgba(255, 255, 255, 0.95), 0 0 0.2em rgba(255, 255, 255, 0.9); }
.scene-streamers .st-hud > * { direction: ltr; unicode-bidi: isolate; }
.scene-streamers .st-hud b { font: 800 1.5em/1 var(--sc-mono); letter-spacing: -0.02em; }
.scene-streamers .st-hud small { margin-top: 0.3em; font: 700 0.5em/1 var(--sc-mono); letter-spacing: 0.12em; opacity: 0.9; }

/* ═════ الشات (باتجاه الصفحة) ═════ */
.scene-streamers .st-chat { position: relative; display: flex; flex-direction: column; min-width: 0; min-height: 0; overflow: hidden; border-radius: 0.75em; background: var(--sc-panel); box-shadow: inset 0 0 0 1px var(--sc-line); }
.scene-streamers .st-chat-h { flex: none; display: flex; align-items: center; justify-content: space-between; gap: 0.4em; height: 2.2em; padding-inline: 0.75em; border-bottom: 1px solid var(--sc-line); white-space: nowrap; }
.scene-streamers .st-chat-h b { font-size: 0.68em; font-weight: 800; letter-spacing: 0.02em; color: var(--sc-ink-2); }
.scene-streamers .st-chat-h span { font: 600 0.6em/1 var(--sc-mono); color: var(--sc-ink-3); }
.scene-streamers .st-list { --st-row: 2.05em; --st-slide: -1.4em; position: relative; flex: 1; min-height: 0; display: flex; flex-direction: column; justify-content: flex-end; overflow: hidden; padding: 0.5em 0.5em 0.55em; font-size: 0.78em; -webkit-mask-image: linear-gradient(180deg, transparent, #000 32%); mask-image: linear-gradient(180deg, transparent, #000 32%); }
.scene-streamers .sc-window[dir='rtl'] .st-list { --st-slide: 1.4em; }
.scene-streamers .st-feed { display: flex; flex-direction: column; gap: 0.3em; flex: none; }
.scene-streamers .st-feed.st-push-a { animation: streamers-push-a 0.5s cubic-bezier(0.2, 0.8, 0.2, 1); }
.scene-streamers .st-feed.st-push-b { animation: streamers-push-b 0.5s cubic-bezier(0.2, 0.8, 0.2, 1); }
.scene-streamers .st-msg { --st-name: var(--st-u1); display: flex; align-items: center; gap: 0.4em; height: 1.75em; padding-inline: 0.35em; border-radius: 0.45em; white-space: nowrap; overflow: hidden; color: var(--sc-ink); }
.scene-streamers .st-msg.st-in-a { animation: streamers-in-a 0.55s ease-out; }
.scene-streamers .st-msg.st-in-b { animation: streamers-in-b 0.55s ease-out; }
.scene-streamers .st-msg b { flex: none; font-weight: 700; color: var(--st-name); unicode-bidi: isolate; }
.scene-streamers .st-msg span { min-width: 0; overflow: hidden; text-overflow: ellipsis; color: var(--sc-ink); }
.scene-streamers .st-msg.c2 { --st-name: var(--st-u2); }
.scene-streamers .st-msg.c3 { --st-name: var(--st-u3); }
.scene-streamers .st-msg.c4 { --st-name: var(--st-u4); }
.scene-streamers .st-msg.c5 { --st-name: var(--st-u5); }
.scene-streamers .st-msg.c6 { --st-name: var(--st-u6); }
.scene-streamers .st-msg.is-hl { background: linear-gradient(90deg, var(--st-hl), transparent); box-shadow: inset 0.2em 0 0 var(--sc-a1); }
.scene-streamers .sc-window[dir='rtl'] .st-msg.is-hl { background: linear-gradient(270deg, var(--st-hl), transparent); box-shadow: inset -0.2em 0 0 var(--sc-a1); }
.scene-streamers .st-msg.is-hl span { font-weight: 700; }
/* شارات: مشترك (نجمة)، مشرف (سيف)، VIP (جوهرة) */
.scene-streamers .st-bd { display: none; position: relative; flex: none; width: 1.05em; height: 1.05em; border-radius: 0.26em; }
.scene-streamers .st-bd::before { content: ''; position: absolute; inset: 0.2em; background: #fff; }
.scene-streamers .st-bd.b-sub { display: block; background: linear-gradient(135deg, var(--sc-a1), var(--sc-a2)); }
.scene-streamers .st-bd.b-sub::before { clip-path: polygon(50% 0, 63% 35%, 100% 38%, 71% 61%, 81% 100%, 50% 78%, 19% 100%, 29% 61%, 0 38%, 37% 35%); }
.scene-streamers .st-bd.b-mod { display: block; background: #1db37a; }
.scene-streamers .st-bd.b-mod::before { clip-path: polygon(78% 0, 100% 22%, 40% 76%, 52% 88%, 40% 100%, 0 60%, 12% 48%, 24% 60%); }
.scene-streamers .st-bd.b-vip { display: block; background: var(--sc-pink); }
.scene-streamers .st-bd.b-vip::before { clip-path: polygon(50% 4%, 96% 42%, 50% 96%, 4% 42%); }

/* ═════ تحت المعاينة: لوحة التحكم (hero) / معلومات البث (card) ═════ */
.scene-streamers .st-dock { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.6em; min-height: 0; }
.scene-streamers .st-panel { display: flex; flex-direction: column; gap: 0.32em; min-width: 0; min-height: 0; overflow: hidden; padding: 0.5em 0.6em; border-radius: 0.6em; background: var(--sc-panel); box-shadow: inset 0 0 0 1px var(--sc-line); }
.scene-streamers .st-ph { font: 800 0.54em/1.2 var(--sc-sans); letter-spacing: 0.12em; text-transform: uppercase; color: var(--sc-ink-3); }
.scene-streamers .st-scn { display: flex; align-items: center; gap: 0.45em; height: 1.55em; padding-inline: 0.5em; border-radius: 0.4em; font-size: 0.62em; color: var(--sc-ink-2); white-space: nowrap; }
.scene-streamers .st-scn.is-on { background: var(--sc-sel); color: var(--sc-ink); font-weight: 700; }
.scene-streamers .st-scn i { display: block; width: 0.55em; height: 0.55em; border-radius: 50%; background: var(--sc-live); box-shadow: 0 0 0.5em var(--sc-live); }
.scene-streamers .st-mix { display: grid; grid-template-columns: 4.2em minmax(0, 1fr); align-items: center; gap: 0.5em; height: 1.55em; font-size: 0.62em; color: var(--sc-ink-2); }
.scene-streamers .st-mix em { font-style: normal; }
.scene-streamers .st-mix i { position: relative; display: block; height: 0.55em; overflow: hidden; border-radius: 1em; background: var(--sc-panel-2); }
.scene-streamers .st-mix b { position: absolute; inset: 0; border-radius: inherit; background: linear-gradient(90deg, var(--sc-ok) 50%, var(--sc-warn) 78%, var(--sc-danger)); transform-origin: 0 50%; transform: scaleX(0.66); animation: streamers-level 1.1s ease-in-out infinite; }
.scene-streamers .st-mix:nth-child(3) b { transform: scaleX(0.52); animation-duration: 1.6s; animation-delay: -0.6s; }
.scene-streamers .st-mix:nth-child(4) b { transform: scaleX(0.3); animation-duration: 2.3s; animation-delay: -1.1s; }
.scene-streamers .st-stat { font: 600 0.6em/1.55 var(--sc-mono); color: var(--sc-ink-3); white-space: nowrap; }
.scene-streamers .st-stat b { color: var(--sc-ink); }
.scene-streamers .st-stat.st-ok { color: var(--sc-ok); }
.scene-streamers .st-foot { display: flex; flex-direction: column; gap: 0.45em; min-width: 0; }
.scene-streamers .st-input { display: flex; align-items: center; justify-content: space-between; gap: 0.4em; height: 2.3em; padding-inline: 0.7em; border-radius: 0.6em; background: var(--sc-panel); box-shadow: inset 0 0 0 1px var(--sc-line-2); }
.scene-streamers .st-input span { font-size: 0.66em; color: var(--sc-ink-3); white-space: nowrap; }
.scene-streamers .st-input i { font-style: normal; font-size: 0.8em; opacity: 0.8; }
.scene-streamers .st-foot-row { display: flex; align-items: center; justify-content: space-between; gap: 0.4em; }
.scene-streamers .st-pts { font: 700 0.6em/1 var(--sc-mono); color: var(--sc-ink-2); }
.scene-streamers .st-send { padding: 0.45em 1em; border-radius: 0.5em; background: linear-gradient(135deg, var(--sc-a1), var(--sc-a2)); color: #fff; font-size: 0.62em; font-weight: 800; }
.scene-streamers .st-info { display: flex; align-items: center; gap: 0.55em; min-width: 0; margin-top: 0.6em; }
.scene-streamers .st-av { display: block; flex: none; width: 2em; height: 2em; border-radius: 50%; background: radial-gradient(circle at 35% 30%, var(--sc-a3), var(--sc-a1) 58%, var(--sc-a2)); outline: 0.14em solid var(--sc-live); outline-offset: 0.12em; }
.scene-streamers .st-info-t { display: grid; min-width: 0; line-height: 1.3; }
.scene-streamers .st-info-t b { font-size: 0.74em; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.scene-streamers .st-info-t small { font-size: 0.62em; color: var(--sc-ink-3); white-space: nowrap; }

/* ═════ البطاقة: كل شي أكبر شوي بالنسبة لصندوقها الصغير ═════ */
.scene-streamers .st-card .st-alert { top: 14%; font-size: 1.02em; }
.scene-streamers .st-card .st-reacts { --st-rise: 4.6em; bottom: 5.1em; inset-inline-end: 1.5em; }
.scene-streamers .st-card .st-cam { width: 5.6em; bottom: 0.5em; inset-inline: auto 0.5em; }
.scene-streamers .st-card .st-cam-tag { font-size: 0.46em; }
.scene-streamers .st-card .st-list { font-size: 0.8em; padding-inline: 0.35em; }
.scene-streamers .st-card .st-chat-h { height: 2em; padding-inline: 0.6em; }

/* ═════ المصغّر: الشات فوق اللعبة كفقاعات ═════ */
.scene-streamers .st-mini .st-alert { top: 12%; }
.scene-streamers .st-mini .st-reacts { --st-rise: 5.2em; bottom: 5.4em; inset-inline-end: 1.6em; }
.scene-streamers .st-mini .st-cam { width: 6.2em; bottom: 0.5em; inset-inline-start: 0.5em; }
/* بدون mask هنا: فوق طبقة الأرضية المتحركة الـ mask يبهّت الفقاعات في بعض المتصفحات؛ الأقدم تخف بالشفافية بداله */
.scene-streamers .st-mini .st-list.st-over { position: absolute; z-index: 2; bottom: 0.45em; inset-inline-end: 0.5em; width: 15em; height: 6.4em; padding: 0; font-size: 0.72em; -webkit-mask-image: none; mask-image: none; }
.scene-streamers .st-mini .st-over .st-feed { align-items: flex-end; }
.scene-streamers .st-mini .st-over .st-msg:first-child { opacity: 0.5; }
.scene-streamers .st-mini .st-over .st-msg { max-width: 100%; padding-inline: 0.4em 0.55em; background: var(--st-ov); box-shadow: 0 0 0 1px var(--st-ov-line); color: var(--st-ov-ink); }
.scene-streamers .st-mini .st-over .st-msg span { color: var(--st-ov-ink); }

/* ═════ الجوال: أخف (البطاقة بدون خطوط السرعة والجواهر والتفاعلات؛ الكبير بنصها، والمؤشرات الصغيرة ثابتة) —
   كل حركة شغّالة تنحسب مع كل إطار للصفحة على معالج أضعف ═════ */
@media (max-width: 640px) {
  .scene-streamers.scene--card .st-speed,
  .scene-streamers.scene--card .st-gems,
  .scene-streamers.scene--card .st-reacts,
  .scene-streamers.scene--card .st-stars { display: none; }
  .scene-streamers .st-speed i:nth-child(n + 4),
  .scene-streamers .st-gems i:nth-child(n + 2),
  .scene-streamers .st-reacts i:nth-child(n + 3) { display: none; }
  .scene-streamers .st-eq i,
  .scene-streamers .st-mix b { animation: none; }
}

/* ═════ الحركات ═════ */
@keyframes streamers-dot { 50% { opacity: 0.35; transform: scale(0.7); } }
@keyframes streamers-ring { 0% { opacity: 0.9; transform: none; } 100% { opacity: 0; transform: scale(1.25, 1.7); } }
@keyframes streamers-bump { 0% { transform: scale(1); } 40% { transform: scale(1.22); } 100% { transform: scale(1); } }
@keyframes streamers-twinkle { from { opacity: 0.45; } to { opacity: 1; } }
@keyframes streamers-drift { from { transform: translateX(-6cqw); } to { transform: translateX(6cqw); } }
@keyframes streamers-pan { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@keyframes streamers-drive { from { transform: rotateX(78deg) translateY(0); } to { transform: rotateX(78deg) translateY(8cqw); } }
@keyframes streamers-streak {
  0% { opacity: 0; transform: rotate(var(--a)) translateY(5cqh) scaleY(0.3); }
  30% { opacity: 0.9; }
  100% { opacity: 0; transform: rotate(var(--a)) translateY(62cqh) scaleY(1.5); }
}
@keyframes streamers-gem {
  0% { opacity: 0; transform: translate(0, 0) scale(0.12) rotate(45deg); }
  14% { opacity: 1; }
  86% { opacity: 1; }
  100% { opacity: 0; transform: translate(calc(var(--gx) * 3.3), 46cqh) scale(2.3) rotate(45deg); }
}
@keyframes streamers-steer {
  0%, 100% { transform: translateX(0) rotate(0deg); }
  24% { transform: translateX(-6.5cqw) rotate(-1.8deg); }
  48% { transform: translateX(-1.5cqw) rotate(0.6deg); }
  74% { transform: translateX(6.5cqw) rotate(1.9deg); }
}
@keyframes streamers-shine { 0% { transform: translateX(-100%); } 60%, 100% { transform: translateX(100%); } }
@keyframes streamers-pop {
  0% { opacity: 0; transform: translateY(-1.2em) scale(0.55); }
  55% { opacity: 1; transform: translateY(0.2em) scale(1.06); }
  100% { opacity: 1; transform: none; }
}
@keyframes streamers-wiggle {
  0%, 100% { transform: none; }
  25% { transform: rotate(-12deg) scale(1.15); }
  50% { transform: rotate(10deg) scale(1.1); }
  75% { transform: rotate(-5deg); }
}
@keyframes streamers-confetti {
  0% { opacity: 1; transform: translate(0, 0) rotate(0deg) scale(0.4); }
  70% { opacity: 1; }
  100% { opacity: 0; transform: translate(var(--x), calc(var(--y) + 1em)) rotate(calc(var(--r) * 5)) scale(1); }
}
@keyframes streamers-talk {
  0%, 100% { transform: none; }
  28% { transform: rotate(-2.4deg) translateY(-0.04em); }
  52% { transform: rotate(1.2deg); }
  76% { transform: rotate(-0.8deg) translateY(-0.03em); }
}
@keyframes streamers-eq { from { transform: scaleY(0.25); } to { transform: scaleY(1); } }
@keyframes streamers-react {
  0% { opacity: 0; transform: translate(0, 0) scale(0.5); }
  14% { opacity: 1; }
  50% { transform: translate(var(--sx, 0.6em), calc(var(--st-rise) * -0.5)) scale(1); }
  78% { opacity: 0.85; }
  100% { opacity: 0; transform: translate(calc(var(--sx, 0.6em) * -0.4), calc(var(--st-rise) * -1)) scale(1.08); }
}
@keyframes streamers-level {
  0%, 100% { transform: scaleX(0.62); }
  18% { transform: scaleX(0.8); }
  34% { transform: scaleX(0.48); }
  52% { transform: scaleX(0.9); }
  70% { transform: scaleX(0.58); }
  86% { transform: scaleX(0.74); }
}
@keyframes streamers-push-a { from { transform: translateY(var(--st-row)); } }
@keyframes streamers-push-b { from { transform: translateY(var(--st-row)); } }
@keyframes streamers-in-a { from { opacity: 0; transform: translateX(var(--st-slide)); } }
@keyframes streamers-in-b { from { opacity: 0; transform: translateX(var(--st-slide)); } }

/* ═══════════════════ «الاستوديو»: شاشات حية خلف هيرو الرئيسية ═══════════════════
   studio(ctx) في src/views/scenes/index.mjs: المشاهد الخمسة بنسخة mini كشاشات عايمة بعمق حول الشعار — كود يكتب
   نفسه، شات بوت، لوحة تصميم، مونتاج، بث مباشر. كلها خلف المحتوى (hero-bg) وتتلاشى ناحية النص.
   .studio-screen  → المكان والمقاس + الحركة مع الماوس (translate من site.js) + ضوء لون القسم (::before) + الشارة
   .studio-float   → الطفو البطيء (translate) + الميلان 3D + قناع التلاشي + الشفافية
   الشاشة اللي قسمها في عنوان الهيرو الحين تنوّر وتشغّل لقطتها (is-on)، والباقي data-hold = على إطارها الكامل (site.js).
   الكمبيوتر: خمس (التصاميم فوق عمود النص جنب أول سطر). التابلت: أربع حول الشعار. الجوال: شاشتين خفيفات فوق الشعار. */

.studio {
  position: absolute;
  inset: 0;
  pointer-events: none;
  /* حد المحتوى (.container): الشاشات تنحسب منه عشان تبقى حول عمود الشعار في كل المقاسات */
  --st-edge: max(20px, (100% - 1200px) / 2);
  --st-flip: -1;
  --st-out: to left;
  --st-op: 0.5;
  --st-op-on: 0.9;
  --st-glow: 0.3;
  --st-glow-on: 0.6;
}
[dir='rtl'] .studio { --st-flip: 1; --st-out: to right; }
:root[data-theme='light'] .studio { --st-op: 0.66; --st-op-on: 0.97; --st-glow: 0.32; --st-glow-on: 0.55; }

.studio-screen {
  position: absolute;
  top: var(--y);
  inset-inline-end: calc(var(--st-edge) + var(--x, 0px));
  width: var(--w);
  aspect-ratio: 16 / 10;
  --tone: var(--accent-1);
}
/* ضوء الشاشة على اللي حولها (ثابت؛ يقوى للشاشة النشطة) */
.studio-screen::before {
  content: '';
  position: absolute;
  inset: -24% -18%;
  border-radius: 50%;
  background: radial-gradient(closest-side, var(--tone), transparent 72%);
  opacity: calc(var(--st-glow) * var(--depth-op, 1));
  transition: opacity 1s var(--ease);
}
.studio-screen.is-on::before { opacity: var(--st-glow-on); }

.studio-float {
  position: absolute;
  inset: 0;
  opacity: calc(var(--st-op) * var(--depth-op, 1));
  transform: perspective(1500px) rotateY(calc(var(--ry, 0deg) * var(--st-flip))) rotateX(var(--rx, 4deg));
  -webkit-mask-image: linear-gradient(var(--st-out), #000 var(--fade-x, 62%), transparent 100%), linear-gradient(to bottom, #000 var(--fade-y, 62%), transparent 100%);
  mask-image: linear-gradient(var(--st-out), #000 var(--fade-x, 62%), transparent 100%), linear-gradient(to bottom, #000 var(--fade-y, 62%), transparent 100%);
  -webkit-mask-composite: source-in;
  mask-composite: intersect;
  transition: opacity 1s var(--ease), scale 1.2s var(--ease);
  animation: studio-drift var(--drift, 16s) ease-in-out var(--drift-delay, 0s) infinite alternate;
}
.studio-screen.is-on .studio-float { opacity: calc(var(--st-op-on) * var(--depth-on, 1)); scale: 1.03; }
@keyframes studio-drift { from { translate: 0 0; } to { translate: 0 var(--drift-y, -12px); } }
/* الطفو يوقف لما الهيرو يطلع من الشاشة (site.js يحط is-away) */
.studio.is-away .studio-float { animation-play-state: paused; }

/* المصغّر داخل الاستوديو: 1em = عرض الشاشة ÷ 28 بدون حد أعلى، فالتصميم نفسه يكبر ويصغر مع الشاشة */
.studio .scene--mini { --sc-fs-min: 5px; --sc-fs-max: 15px; }
/* مؤشر الكتابة في شاشة خلفية صغيرة ما يحتاج يرمش (كل رمشة = إطار كامل للصفحة) */
.studio .sc-caret { animation: none; }

/* الشارة: أيقونة خطية + اسم القسم بأحرف متباعدة، فوق زاوية الشاشة الداخلية (برّا النافذة: ما تغطي شريط عنوانها) */
.studio-tag {
  position: absolute;
  bottom: calc(100% + 7px);
  inset-inline-start: 14px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px 3px 8px;
  border-radius: 9px;
  border: 1px solid var(--line-2);
  background: var(--chip-glass);
  box-shadow: 0 10px 24px -14px rgba(0, 0, 0, 0.8);
  color: var(--text-2);
  font-size: 0.64rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  line-height: 1.5;
  white-space: nowrap;
  direction: ltr;
  opacity: 0.66;
  transition: opacity 0.6s var(--ease), color 0.6s, border-color 0.6s, box-shadow 0.8s var(--ease);
}
.studio-tag svg { flex: none; width: 13px; height: 13px; opacity: 0.85; }
.studio-screen.is-on .studio-tag { opacity: 1; color: var(--strong); border-color: var(--line-3); box-shadow: 0 10px 24px -14px rgba(0, 0, 0, 0.8), 0 0 22px -6px var(--tone); }
:root[data-theme='light'] .studio-tag { box-shadow: 0 8px 20px -14px rgba(30, 40, 80, 0.45); }

/* ═════ الكمبيوتر: أربع شاشات حول عمود الشعار (inset-inline-end = جهة الشعار في اللغتين) ═════
   الإزاحة للخارج (--x سالب) ما تطلّع الشاشة من حد الصفحة: أقصاها لين 12px من الحد. */
.studio-tech { --x: max(-96px, calc(12px - var(--st-edge))); --y: 40px; --w: clamp(250px, 22vw, 320px); --ry: 20deg; --tone: var(--accent-3); --drift: 15s; --fade-x: 72%; }
.studio-bots { --x: 238px; --y: 40px; --w: clamp(214px, 19vw, 276px); --ry: 7deg; --tone: var(--discord); --drift: 19s; --drift-delay: -7s; --depth-op: 0.86; }
.studio-montage { --x: max(-70px, calc(12px - var(--st-edge))); --y: 470px; --w: clamp(236px, 21vw, 304px); --ry: 17deg; --rx: -3deg; --tone: #f59e0b; --drift: 18s; --drift-delay: -4s; --fade-x: 72%; }
.studio-streamers { --x: 268px; --y: 542px; --w: clamp(196px, 17.5vw, 254px); --ry: 8deg; --rx: -3deg; --tone: #f472b6; --drift: 21s; --drift-delay: -11s; --depth-op: 0.86; }
/* التصاميم: فوق عمود النص (الفراغ اللي جنب أول سطر من العنوان)، تتلاشى لتحت قبل السطر الثاني */
.studio-designs { inset-inline-end: auto; inset-inline-start: 38%; --y: 36px; --w: clamp(196px, 17vw, 250px); --ry: -6deg; --tone: var(--accent-1); --drift: 23s; --drift-delay: -2s; --depth-op: 0.86; --fade-y: 58%; }
/* شارة المونتاج (تحت الشعار) والتصاميم (جنب أول النص) على الزاوية البعيدة */
.studio-montage .studio-tag, .studio-designs .studio-tag { inset-inline-start: auto; inset-inline-end: 18px; }

/* الشاشات مكان شارات الأقسام والأيقونات الطايرة اللي كانت حول الشعار */
.page-home .floating-chips, .studio ~ .hero-float { display: none; }
/* حلقات الشعار: نصها اللي تحت يخف (كانت خطوطها تقطع شاشتي المونتاج والبث) */
.page-home .emblem-ring {
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 1.5px), #000 calc(100% - 1px)), linear-gradient(to bottom, #000 52%, transparent 88%);
  -webkit-mask-composite: source-in;
  mask: radial-gradient(farthest-side, transparent calc(100% - 1.5px), #000 calc(100% - 1px)) intersect, linear-gradient(to bottom, #000 52%, transparent 88%);
}

/* ═════ لابتوب صغير: الشاشات أصغر شوي وأقرب للشعار (الإزاحة للخارج بحدها؛ الشارة البعيدة تبقى داخل الصفحة) ═════ */
@media (max-width: 1180px) {
  .studio-tech { --x: max(-70px, calc(12px - var(--st-edge))); }
  .studio-montage { --x: max(-56px, calc(12px - var(--st-edge))); }
  .studio-bots { --x: 214px; }
  .studio-streamers { --x: 236px; }
}

/* ═════ التابلت: أربع شاشات على جنبي الشعار (فوق النص)؛ البث يختفي (أثقل وحدة على المعالج) ═════ */
@media (max-width: 920px) {
  .studio-screen { inset-inline-end: auto; --w: clamp(190px, 27vw, 250px); --depth-op: 1; --fade-y: 58%; }
  .studio-tech { inset-inline-end: 1.5%; --y: 48px; --ry: 16deg; }
  .studio-montage { inset-inline-end: 0.5%; --y: 222px; --ry: 14deg; }
  .studio-designs { inset-inline-start: 1.5%; --y: 48px; --ry: -16deg; }
  .studio-bots { inset-inline-start: 0.5%; --y: 222px; --ry: -14deg; }
  .studio-streamers { display: none; }
  .studio-float { --st-out: to bottom; }
}

/* ═════ الجوال: شاشتين خفيفات كاملات (ما ينقصهن حد الشاشة) ورا زوايا الشعار العلوية، مايلات أكثر ═════ */
@media (max-width: 640px) {
  .studio { --st-op: 0.4; --st-op-on: 0.56; --st-glow: 0.2; --st-glow-on: 0.32; }
  :root[data-theme='light'] .studio { --st-op: 0.5; --st-op-on: 0.66; --st-glow: 0.28; --st-glow-on: 0.4; }
  .studio-screen { --w: 44vw; }
  .studio-tech { inset-inline-end: 3vw; --y: 14px; --ry: 22deg; }
  .studio-designs { inset-inline-start: 3vw; --y: 14px; --ry: -22deg; }
  .studio-bots, .studio-streamers, .studio-montage { display: none; }
  /* أخف على الجوال: بدون طفو، وقناع واحد بس (يتلاشى لتحت) */
  .studio-float {
    animation: none;
    -webkit-mask-image: linear-gradient(to bottom, #000 50%, transparent 100%);
    mask-image: linear-gradient(to bottom, #000 50%, transparent 100%);
  }
  .studio-screen.is-on .studio-float { scale: 1; }
  /* الشعار يغطي زوايا الشاشات الداخلية هنا: بدون شارات */
  .studio-tag { display: none; }
}

/* بدون حركة: الشاشات ثابتة (إطار المشهد الثابت)، بدون طفو */
@media (prefers-reduced-motion: reduce) {
  .studio-float { animation: none; transition: none; }
  .studio-screen::before, .studio-tag { transition: none; }
}
@media print {
  .studio { display: none; }
}
