/* =====================================================================
   لغة تطبيق الجوال الجديد على الموقع (٧ نوفمبر ٢٠٢٦) — صفحات الطالب، صفحة صفحة.
   المرجع: معاينة التطبيق ونظام التصميم (الروابط في docs/HANDOFF.md)، والتوثيق: docs/APP-DESIGN.md
   - كل القواعد تحت html.ad1 (يضيفه #ad1boot في index.html). ?ad1=0 يرجّع الشكل السابق على الجهاز، ?ad1=1 يرجّعه.
   - CSS فقط: ما يتغيّر أي منطق ولا طلب للخادم.
   - الحافة البارزة: box-shadow: var(--edge) <لون>. لو قاعدة قديمة فيها !important على box-shadow،
     نستخدم filter: drop-shadow(var(--edge) <لون>) بدل ما نزيد !important.
   - لون الفصل: --ch-N و --ch-N-edge من tokens.css.
   ===================================================================== */

/* ---------- ١) الأساس: ألوان الصفحة للطالب (نظام التصميم) ---------- */
html.ad1 body:not(.t2) {
  --ad-bg: #f2f6f3;
  --ad-card: #ffffff;
  --ad-ink: #10302a;
  --ad-muted: #4f6b66;
  --ad-line: #dce7e1;
  --ad-mint: #e3efe8;
}
html.ad1[data-theme="dark"] body:not(.t2) {
  --ad-bg: #0e1714;
  --ad-card: #16221d;
  --ad-ink: #e6eeea;
  --ad-muted: #9db0a7;
  --ad-line: #26352f;
  --ad-mint: #1b2e26;
}
html.ad1 body.stuHd:not(.t2) {
  background: var(--ad-bg);
}
html.ad1 body.stuHd:not(.t2) aside.brand,
html.ad1 body.stuHd:not(.t2) #hx {
  background: var(--ad-bg);
}

/* ---------- ٢) المكوّن المشترك: الشريط السفلي (الجوال، أقل من ١١٠٠) ----------
   ثابت بعرض الشاشة، أبيض بحد علوي، والنشط بكبسولة نعناعية — مثل التطبيق. */
@media (max-width: 1099px) {
  html.ad1 body:not(.t2).hasNav {
    padding-bottom: calc(92px + env(safe-area-inset-bottom, 0px));
  }
  html.ad1 body:not(.t2) #bNav {
    inset-inline: 0;
    bottom: 0;
    width: 100%;
    max-width: none;
    margin-inline: 0;
    padding-block: 8px calc(8px + env(safe-area-inset-bottom, 0px));
    border: 0;
    border-top: 1px solid var(--ad-line);
    border-radius: 0;
    background: var(--ad-card);
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
    box-shadow: none;
  }
  html.ad1[data-theme="dark"] body:not(.t2) #bNav {
    box-shadow: none;
  }
}

/* =====================================================================
   الصفحة ١: الرئيسية (body.hm2)
   ===================================================================== */

/* الشعار: مربع أخضر بحافة */
html.ad1 body.hm2 .home-logo img {
  border-radius: 15px;
  box-shadow: var(--edge) var(--green-edge);
}
/* «مهام اليوم» */
html.ad1 body.hm2 .home-tasks-link {
  background: #fff1cc;
  color: #6b4e00;
}
html.ad1[data-theme="dark"] body.hm2 .home-tasks-link {
  background: #3a3016;
  color: #e8bc52;
}
/* التحية */
html.ad1 body.hm2 #hx h2 {
  font-family: Alexandria, "IBM Plex Sans Arabic", sans-serif;
  font-weight: 700;
  font-size: 1.875rem;
  line-height: 1.3;
}
/* شارات الأيام والنقاط: كبسولات ٤٠px */
html.ad1 body.hm2 .home-streak .ds3c {
  min-height: 40px;
  border-radius: var(--r-pill);
  padding-inline: 14px;
  font-weight: 700;
}
html.ad1 body.hm2 .home-streak .ds3Fire {
  background: #ffe9dd;
  color: #8a3a12;
}
html.ad1 body.hm2 .home-streak .ds3Pts {
  background: #fff4d6;
  color: #6b4e00;
}
html.ad1[data-theme="dark"] body.hm2 .home-streak .ds3Fire {
  background: #3a2216;
  color: #ffb48a;
}
html.ad1[data-theme="dark"] body.hm2 .home-streak .ds3Pts {
  background: #3a3016;
  color: #e8bc52;
}
/* شريط اللقب: أثخن بتدرّج أخضر-ذهبي */
html.ad1 body.hm2 .ds3Lv > i {
  height: 10px;
  border-radius: var(--r-pill);
  background: #e3ebe6;
}
html.ad1[data-theme="dark"] body.hm2 .ds3Lv > i {
  background: #22302b;
}
html.ad1 body.hm2 .ds3Lv > i > i {
  height: 10px;
  border-radius: var(--r-pill);
  background: linear-gradient(270deg, #3dae7a, #f4c430);
}

/* بطاقة البطل «أول درس لم تنجزه / كمّل»: حواف ٢٨ وحافة بارزة، وزر تشغيل ذهبي بحافة */
html.ad1 body.hm2 .contCard#contGo {
  border-radius: var(--r-5xl);
  clip-path: none;
  box-shadow: var(--edge-lg) var(--green-edge);
}
/* الليلي: أخضر التطبيق الهادي #123D30 بدل #1f6b4c الفاتح.
   القاعدة القديمة (app.css: html[data-theme="dark"] body .contCard#contGo) تحط الخلفية بـ !important،
   فنغطيها بظل داخلي بنفس اللون (يترسم فوق الخلفية وتحت المحتوى) بدل ما نزيد !important. */
html.ad1[data-theme="dark"] body.hm2 .contCard#contGo {
  box-shadow: var(--edge-lg) #06201a, inset 0 0 0 999px #123d30;
}
html.ad1[data-theme="dark"] body.hm2 #h2B .ql > a[href="#ask"] {
  box-shadow: inset 0 0 0 999px #123d30;
}
html.ad1 body.hm2 .contCard .course-card-icon {
  box-shadow: var(--edge) var(--gold-edge);
}

/* بطاقات بيضاء (خطة الأسبوع، الاختبار النهائي، مهام اليوم، قائمة الأدوات): حواف ٢٤ وحافة بارزة */
html.ad1 body.hm2 .h2W,
html.ad1 body.hm2 .final-exam-card,
html.ad1 body.hm2 #extraCards .lcard {
  border-radius: var(--r-4xl);
  border: 0;
  box-shadow: var(--edge) var(--card-edge);
}
html.ad1 body.hm2 .h2T {
  box-shadow: var(--edge) #ebd08a;
}

/* الفصول: كل فصل بلونه وحافته بلون أغمق منه.
   القاعدة القديمة (.ds2 .car .cv في base.css) ترسم الخلفية بـ var(--c-green-deep) !important والمختار بـ var(--accent) !important،
   فنغيّر قيمة المتغيرين داخل بطاقة الفصل بدل ما نزيد !important. */
html.ad1 body.hm2 #h2car .cv {
  --ad-ch: var(--ch-1);
  --ad-ch-e: var(--ch-1-edge);
  --c-green-deep: var(--ad-ch);
  --accent: var(--ad-ch);
  border-radius: var(--r-5xl);
  box-shadow: var(--edge-lg) var(--ad-ch-e);
}
html.ad1 body.hm2 #h2car .cv:nth-child(9n + 2) { --ad-ch: var(--ch-2); --ad-ch-e: var(--ch-2-edge); }
html.ad1 body.hm2 #h2car .cv:nth-child(9n + 3) { --ad-ch: var(--ch-3); --ad-ch-e: var(--ch-3-edge); }
html.ad1 body.hm2 #h2car .cv:nth-child(9n + 4) { --ad-ch: var(--ch-4); --ad-ch-e: var(--ch-4-edge); }
html.ad1 body.hm2 #h2car .cv:nth-child(9n + 5) { --ad-ch: var(--ch-5); --ad-ch-e: var(--ch-5-edge); }
html.ad1 body.hm2 #h2car .cv:nth-child(9n + 6) { --ad-ch: var(--ch-6); --ad-ch-e: var(--ch-6-edge); }
html.ad1 body.hm2 #h2car .cv:nth-child(9n + 7) { --ad-ch: var(--ch-7); --ad-ch-e: var(--ch-7-edge); }
html.ad1 body.hm2 #h2car .cv:nth-child(9n + 8) { --ad-ch: var(--ch-8); --ad-ch-e: var(--ch-8-edge); }
html.ad1 body.hm2 #h2car .cv:nth-child(9n + 9) { --ad-ch: var(--ch-9); --ad-ch-e: var(--ch-9-edge); }
/* الفصل المقفل: خلفيته الفاتحة القديمة، وحافة محايدة */
html.ad1 body.hm2 #h2car .cv.lk {
  box-shadow: var(--edge-lg) var(--card-edge);
}
/* نقاط الفصول */
html.ad1 body.hm2 .cdots i.on {
  background: var(--c-green);
}

/* دروس الفصل المختار: بطاقات بيضاء بحافة */
html.ad1 body.hm2 #h2B .lesson-list .lc {
  border-radius: var(--r-3xl);
  box-shadow: var(--edge) var(--card-edge);
}

/* «هذا الأسبوع في المختبر»: بطاقات ملونة بحافة (ألوان التطبيق) */
html.ad1 body.hm2 #mxStrip .lb-tz {
  flex-basis: 200px;
  min-height: 150px;
  border-radius: var(--r-5xl);
  margin-bottom: 6px;
  box-shadow: var(--edge) var(--ad-lb-e, var(--card-edge));
}
html.ad1 body.hm2 #mxStrip .lb-tz.case { --ad-lb-e: #050f0c; background: #0b201b; }
html.ad1 body.hm2 #mxStrip .lb-tz.ask { --ad-lb-e: #bcd0ea; }
html.ad1 body.hm2 #mxStrip .lb-tz.map { --ad-lb-e: #b9dfcb; }
html.ad1 body.hm2 #mxStrip .lb-tz.eco { --ad-lb-e: #c4dda9; }
html.ad1 body.hm2 #mxStrip .lb-tz.trip { --ad-lb-e: #ebd08a; }
html.ad1 body.hm2 #mxStrip .lb-tz.snd { --ad-lb-e: #cfc3f0; }
/* الفاتح: نفس ألوان معاينة التطبيق */
html.ad1:not([data-theme="dark"]) body.hm2 #mxStrip .lb-tz.ask { background: #e1ecf9; }
html.ad1:not([data-theme="dark"]) body.hm2 #mxStrip .lb-tz.ask .k { color: #2f6db3; }
html.ad1:not([data-theme="dark"]) body.hm2 #mxStrip .lb-tz.trip { background: #fff1cc; color: #10302a; }
html.ad1:not([data-theme="dark"]) body.hm2 #mxStrip .lb-tz.trip .k { color: #8a6400; }
html.ad1:not([data-theme="dark"]) body.hm2 #mxStrip .lb-tz.map { background: #e3f5ec; }
html.ad1:not([data-theme="dark"]) body.hm2 #mxStrip .lb-tz.map .k { color: #1e7a55; }
html.ad1:not([data-theme="dark"]) body.hm2 #mxStrip .lb-tz.snd { background: #ede7fb; color: #10302a; }
html.ad1:not([data-theme="dark"]) body.hm2 #mxStrip .lb-tz.snd .k { color: #5b47b0; }
html.ad1:not([data-theme="dark"]) body.hm2 #mxStrip .lb-tz.eco { background: #e6f2da; }
html.ad1:not([data-theme="dark"]) body.hm2 #mxStrip .lb-tz.eco .k { color: #55772a; }
/* الليلي: الخلفيات الأصلية الغامقة، وحافة أغمق */
html.ad1[data-theme="dark"] body.hm2 #mxStrip .lb-tz {
  --ad-lb-e: #050c0a;
}

/* المربعين الكبار (نقاط ضعفي + اسأل معلمك) وقائمة الأدوات تحتهم */
html.ad1 body.hm2:not(.dsk) #h2B .ql a:nth-child(-n + 2) {
  border-radius: var(--r-5xl);
  filter: drop-shadow(var(--edge-lg) var(--ad-ql-e, var(--green-edge)));
}
html.ad1 body.hm2:not(.dsk) #h2B .ql a:nth-child(1) {
  --ad-ql-e: #d29e1e;
}
html.ad1[data-theme="dark"] body.hm2:not(.dsk) #h2B .ql a:nth-child(2) {
  --ad-ql-e: #06201a;
}
html.ad1 body.hm2:not(.dsk) #h2B .ql a:nth-child(n + 3) {
  min-height: 64px;
}
html.ad1 body.hm2:not(.dsk) #h2B .ql a:nth-child(3) {
  border-radius: var(--r-4xl) var(--r-4xl) 0 0;
}
html.ad1 body.hm2:not(.dsk) #h2B .ql a:last-child {
  border-radius: 0 0 var(--r-4xl) var(--r-4xl);
  filter: drop-shadow(var(--edge) var(--card-edge));
}
html.ad1 body.hm2:not(.dsk) #h2B .ql a:nth-child(n + 3) i {
  width: 44px;
  height: 44px;
  border-radius: var(--r-lg);
}


/* الكمبيوتر: الفصول غير المختارة كانت تبهت (saturate) — في التطبيق كل فصل بلونه كامل */
html.ad1 body.dsk.hm2 #h2B .car .cv:not(.sel):not(.lk) {
  filter: none;
}

/* ===== AD-A start: الدرس (الغلاف، الجزء، الأسئلة، النتيجة، اختبار الفصل والتدريب، ورقة الفصل) ===== */
/* لون الفصل: lesson-ui.js يحط --lu-c / --lu-soft على #student. الحافة = لون الفصل أغمق (color-mix) لأن --ch-N-edge ما يوصل للدرس. */
html.ad1 body:not(.t2) #student {
  --ad-luE: color-mix(in srgb, var(--lu-c, var(--c-green)) 62%, #000);
}

/* ---------- الغلاف (#lpHero) ---------- */
/* بطاقة الفصل الملوّنة: حواف ٢٨ وحافة بارزة بلون الفصل الأغمق (اختبار الفصل: الأخضر الأغمق) */
html.ad1 body:not(.t2) #lpHero .lesson-end-cover {
  border-radius: var(--r-5xl);
  box-shadow: var(--edge-lg) color-mix(in srgb, var(--accent) 62%, #000);
  margin-bottom: 6px;
}
html.ad1 body:not(.t2) #lpHero .lesson-end-cover h2 {
  font-family: Alexandria, "IBM Plex Sans Arabic", sans-serif;
  font-weight: 700;
}
/* «ابدأ الدرس»: ذهبي ٥٦px بحافة ذهبية بدل الظل الضبابي */
html.ad1 body:not(.t2) #student .luGo,
html.ad1 body:not(.t2) #luStick .luGo {
  min-height: 56px;
  border-radius: var(--r-3xl);
  background: #ffd166;
  color: #2a1e00;
  font-weight: 700;
  font-size: 1.0625rem;
  box-shadow: 0 5px 0 var(--gold-edge);
}
html.ad1 body:not(.t2) #student .luGo:active {
  transform: translateY(3px);
  box-shadow: 0 2px 0 var(--gold-edge);
}
/* البطاقة البيضاء تحت الغلاف (ستتعلم + أجزاء الدرس) */
html.ad1 body:not(.t2):not(.dsk) #sStart.lp {
  border: 0;
  border-radius: var(--r-5xl);
  box-shadow: var(--edge) var(--card-edge);
  background: var(--ad-card);
}
/* الجزء الحالي في قائمة الأجزاء: بطاقة بحد وحافة */
html.ad1 body:not(.t2) #lpHero .ds3Pt li.cur .t {
  border: 1.5px solid var(--ad-line);
  border-radius: var(--r-2xl);
  box-shadow: var(--edge) var(--card-edge);
}
/* «اختبرني أول»: كبسولة بإطار أخضر وحافة (القاعدة القديمة تخفي الخلفية بـ !important فنخليها شفافة) */
html.ad1 body:not(.t2) #sStart.lp #dgOffer #dgGo {
  min-height: 48px;
  padding: 0 22px;
  border: 2px solid var(--c-green);
  border-radius: var(--r-pill);
  font-weight: 700;
  box-shadow: var(--edge) var(--c-green);
  margin-bottom: 6px;
}
html.ad1[data-theme="dark"] body:not(.t2) #sStart.lp #dgOffer #dgGo {
  border-color: #3fa37d;
  color: #7fd1ae;
  box-shadow: var(--edge) #05201a;
}

/* ---------- الجزء (الفيديو) ---------- */
html.ad1 body:not(.t2):not(.dsk):not(.lu-focus) #sMain.luOn {
  border: 0;
  border-radius: var(--r-5xl);
  box-shadow: var(--edge) var(--card-edge);
  background: var(--ad-card);
}
html.ad1 body:not(.t2) #sMain .luPl:not(.luFull) {
  border-radius: var(--r-3xl);
}
html.ad1 body:not(.t2) #sMain .luFocus {
  border-radius: var(--r-3xl);
  padding: 14px 16px;
}
html.ad1 body:not(.t2) #sMain .luFocus b {
  font-family: Alexandria, "IBM Plex Sans Arabic", sans-serif;
  color: var(--lu-tx);
}
html.ad1 body:not(.t2) #sMain #noteBox {
  border-radius: var(--r-3xl);
}
html.ad1 body:not(.t2) #noteBox .luPin {
  min-height: 48px;
  padding: 0 18px;
  border-radius: var(--r-xl);
  box-shadow: var(--edge) var(--green-edge);
}
html.ad1[data-theme="dark"] body:not(.t2) #noteBox .luPin {
  box-shadow: var(--edge) #1d5a44;
}

/* ---------- أسئلة الجزء واختبار الفصل والتدريب (#quiz، بدون تحصيلي body.tq) ---------- */
/* السؤال داخل بطاقة الجزء البيضاء أصلًا: بدون إطار ثاني (مثل شاشة السؤال في التطبيق) */
html.ad1 body:not(.t2):not(.tq) #quiz .lesson-quiz {
  border: 0;
  box-shadow: none;
  background: var(--ad-card);
}
/* شريط التقدّم: قطع ٨px كبسولات */
html.ad1 body:not(.t2):not(.tq) #quiz .lesson-quiz-dots {
  gap: 6px;
}
html.ad1 body:not(.t2):not(.tq) #quiz .lesson-quiz-dots i {
  border-radius: var(--r-pill);
  background: var(--ad-mint);
}
html.ad1 body:not(.t2):not(.tq) #quiz .lesson-quiz-dots i.now {
  background: var(--lu-c, var(--c-green));
}
html.ad1 body:not(.t2):not(.tq) #quiz .lesson-quiz-dots i.ok {
  background: #1f9d63;
}
html.ad1 body:not(.t2):not(.tq) #quiz .lesson-quiz-dots i.no {
  background: var(--c-danger);
}

/* الخيار (OptionCard): أبيض بحد ١.٥ وحافة ٤px وزوايا ١٨.
   القواعد القديمة تحط الخلفية والحد والزوايا بـ !important عن طريق متغيرات (--card, --line, --r-lg)،
   فنغيّر قيمة المتغيرات داخل الخيار نفسه بدل ما نزيد !important. */
html.ad1 body:not(.t2):not(.tq) #quiz .lesson-quiz-option {
  --r-lg: 18px;
  --card: var(--ad-card);
  --line: var(--ad-line);
  --fg: var(--ad-ink);
  margin-bottom: 4px;
  box-shadow: var(--edge) var(--card-edge);
  font-weight: 500;
}
/* حرف الخيار: دائرة رمادية فاتحة (القديم: --accent-2 / --accent بـ !important) */
html.ad1 body:not(.t2):not(.tq) #quiz .lesson-quiz-option .k {
  --accent-2: var(--ad-bg);
  --accent: var(--ad-muted);
  font-family: Alexandria, "IBM Plex Sans Arabic", sans-serif;
}
/* قرار المعلم: الخيار المختار بلون فصل الدرس — حد وخلفية فاتحة وحافة بنفس اللون.
   الحد القديم ١.٥px بـ !important، فنكمّله لـ ٢.٥ بظل داخلي.
   .wait = اختاره الطالب وينتظر تصحيح الخادم (اختبار الفصل)، :active = لحظة الضغط، .sel = اختيار محفوظ. */
html.ad1 body:not(.t2):not(.tq) #quiz .lesson-quiz-option:is(.wait, .sel, :active:not(:disabled)) {
  --card: var(--lu-soft);
  --line: var(--lu-c, var(--c-green));
  opacity: 1;
  box-shadow: var(--edge) var(--lu-c, var(--c-green)), inset 0 0 0 1px var(--lu-c, var(--c-green));
}
html.ad1 body:not(.t2):not(.tq) #quiz .lesson-quiz-option:is(.wait, .sel, :active:not(:disabled)) .k {
  --accent-2: var(--lu-c, var(--c-green));
  --accent: #fff;
}
@media (hover: hover) and (pointer: fine) {
  html.ad1 body:not(.t2):not(.tq) #quiz .lesson-quiz-option:hover:not(:disabled) {
    --line: var(--lu-c, var(--c-green));
  }
}
/* صح / خطأ: ألوان النجاح والخطأ مع أيقونة ✓ / ✕ (اللون ما يكفي وحده) */
html.ad1 body:not(.t2):not(.tq) #quiz .lesson-quiz-option.ok {
  box-shadow: var(--edge) #b5dcc6;
}
html.ad1 body:not(.t2):not(.tq) #quiz .lesson-quiz-option.no {
  box-shadow: var(--edge) #efc2bb;
}
html.ad1[data-theme="dark"] body:not(.t2):not(.tq) #quiz .lesson-quiz-option:is(.ok, .no) {
  box-shadow: var(--edge) #0a1310;
}
html.ad1 body:not(.t2):not(.tq) #quiz .lesson-quiz-option:is(.ok, .no)::after {
  margin-inline-start: auto;
  font-weight: 700;
  font-size: 1.25rem;
  line-height: 1;
  flex: none;
}
html.ad1 body:not(.t2):not(.tq) #quiz .lesson-quiz-option.ok::after {
  content: "✓";
  color: #1f9d63;
}
html.ad1 body:not(.t2):not(.tq) #quiz .lesson-quiz-option.no::after {
  content: "✕";
  color: var(--c-danger);
}
html.ad1[data-theme="dark"] body:not(.t2):not(.tq) #quiz .lesson-quiz-option.ok::after {
  color: #2bb673;
}
html.ad1[data-theme="dark"] body:not(.t2):not(.tq) #quiz .lesson-quiz-option.no::after {
  color: #e26d5a;
}

/* «ما أعرف» و«تلميح»: كبسولات بيضاء ٤٨px بحد وحافة */
html.ad1 body:not(.t2):not(.tq) #quiz :is(.lqIdk, .lesson-quiz-hint) {
  min-height: 48px;
  padding: 0 20px;
  border: 1.5px solid #cfe6dc;
  border-radius: var(--r-pill);
  background: var(--ad-card);
  color: var(--ad-ink);
  font-weight: 700;
  font-size: 0.9375rem;
  box-shadow: var(--edge) var(--card-edge);
}
html.ad1[data-theme="dark"] body:not(.t2):not(.tq) #quiz :is(.lqIdk, .lesson-quiz-hint) {
  border-color: var(--ad-line);
}

/* نتيجة السؤال (BottomSheet بالشكل): خلفية حسب النتيجة وزوايا ٢٨ وعنوان Alexandria — تبقى في مكانها تحت الخيارات */
html.ad1 body:not(.t2):not(.tq) #quiz .lesson-quiz-feedback {
  border-radius: var(--r-4xl);
  padding: 16px 18px;
  font-size: 0.9375rem;
  color: var(--ad-ink);
}
html.ad1 body:not(.t2):not(.tq) #quiz .lesson-quiz-feedback > b:first-child {
  font-family: Alexandria, "IBM Plex Sans Arabic", sans-serif;
  font-size: 1.25rem;
  margin-bottom: 4px;
}
html.ad1 body:not(.t2):not(.tq) #quiz .lesson-quiz-feedback.g {
  background: #e6f6ee;
}
html.ad1 body:not(.t2):not(.tq) #quiz .lesson-quiz-feedback.b {
  background: #fbeae7;
}
html.ad1 body:not(.t2):not(.tq) #quiz .lesson-quiz-feedback.n {
  background: #fbefd0;
}
html.ad1[data-theme="dark"] body:not(.t2):not(.tq) #quiz .lesson-quiz-feedback.g {
  background: #173a2a;
}
html.ad1[data-theme="dark"] body:not(.t2):not(.tq) #quiz .lesson-quiz-feedback.b {
  background: #3a1e1a;
}
html.ad1[data-theme="dark"] body:not(.t2):not(.tq) #quiz .lesson-quiz-feedback.n {
  background: #3a3016;
}
/* «التالي»: كبسولة خضراء ٥٦px بحافة (الزوايا القديمة var(--r-xl) !important) */
html.ad1 body:not(.t2):not(.tq) #quiz .lesson-quiz-next {
  --r-xl: 999px;
  min-height: 56px;
  border: 0;
  background: var(--c-green);
  color: #fff;
  box-shadow: var(--edge) var(--green-edge);
  margin-bottom: 4px;
}
html.ad1[data-theme="dark"] body:not(.t2):not(.tq) #quiz .lesson-quiz-next {
  background: #3fa37d;
  color: #0e1714;
  box-shadow: var(--edge) #05201a;
}

/* ---------- نهاية الدرس (#lpEnd) ---------- */
/* البطاقة بلون فصل الدرس (مثل التطبيق) بدل التدرّج الأخضر، وحافة أغمق */
html.ad1 body:not(.t2) #lpEnd .lesson-end-inner {
  background: var(--lu-c, var(--c-green));
  border-radius: var(--r-5xl);
  box-shadow: var(--edge-lg) var(--ad-luE);
}
html.ad1 body:not(.t2) #lpEnd .lesson-end-inner::before {
  opacity: 0.3;
}
html.ad1 body:not(.t2) #lpEnd .lesson-end-ring {
  background: conic-gradient(#ffd166 calc(var(--p) * 1%), rgba(255, 255, 255, 0.2) 0);
}
html.ad1 body:not(.t2) #lpEnd .lesson-end-ring > div {
  background: var(--ad-luE);
}
html.ad1 body:not(.t2) #lpEnd .lesson-end-inner small,
html.ad1 body:not(.t2) #lpEnd .lesson-end-inner p,
html.ad1 body:not(.t2) #lpEnd .lesson-end-stats div {
  color: rgba(255, 255, 255, 0.92);
}
html.ad1 body:not(.t2) #lpEnd .lesson-end-stats > div {
  background: rgba(255, 255, 255, 0.14);
}
html.ad1 body:not(.t2) #lpEnd h2 {
  font-weight: 700;
}
/* الأزرار: كبسولات، و«الدرس التالي» ذهبي بحافة ذهبية */
html.ad1 body:not(.t2) #lpEnd .lesson-end-buttons > * {
  --r-lg: 999px;
}
html.ad1 body:not(.t2) #lpEnd .lesson-end-buttons .a {
  color: #2a1e00;
  box-shadow: var(--edge) var(--gold-edge);
  margin-bottom: 4px;
}
/* البطاقات تحتها (الملخص، العجلة، التقييم): حواف ٢٤ وحافة */
html.ad1 body:not(.t2) #sCert.lpDone > .card {
  border: 0;
  border-radius: var(--r-4xl);
  box-shadow: var(--edge) var(--card-edge);
  background: var(--ad-card);
}

/* ---------- ورقة الفصل (الجوال: csOpen من بطاقة الفصل في الرئيسية) ---------- */
html.ad1 body:not(.t2) .chapter-sheet-panel:has(.lesson-list) .chapter-sheet-head i {
  width: 40px;
  height: 4px;
}
html.ad1 body:not(.t2) .chapter-sheet-panel:has(.lesson-list) .chapter-sheet-actions button {
  border-radius: var(--r-3xl);
}
/* دروس الفصل: بطاقات بيضاء ٢٢ بحافة */
html.ad1 body:not(.t2) .chapter-sheet-panel .chapter-sheet-body .lesson-list .lc {
  border-radius: var(--r-3xl);
  border: 0;
  box-shadow: var(--edge) var(--card-edge);
  margin-bottom: 4px;
}
/* «ابدأ …»: كبسولة خضراء ٥٦px بحافة */
html.ad1 body:not(.t2) .chapter-sheet-panel:has(.lesson-list) .chapter-sheet-go {
  min-height: 56px;
  border-radius: var(--r-pill);
  background: var(--c-green);
  color: #fff;
  box-shadow: var(--edge) var(--green-edge);
  margin-bottom: 4px;
}
html.ad1[data-theme="dark"] body:not(.t2) .chapter-sheet-panel:has(.lesson-list) .chapter-sheet-go {
  background: #3fa37d;
  color: #0e1714;
  box-shadow: var(--edge) #05201a;
}
/* ===== AD-A end ===== */

/* ===== AD-B start: الألعاب (المركز، سؤال اليوم، صح أم خطأ ونتيجتها، وردل، التوصيل، تحدي الدقيقة، المبارزة، السؤال الصعب، الصندوق، أكمل الفراغ، رتّب المراحل، بطاقات الحفظ) ===== */
/* كل صفحة لعبة تنعرف من #xv[data-ad="…"] (يحطه xv() في app-core.js مع html.ad1 بس).
   @G = كل شاشات اللعب (بدون مركز الألعاب). */

/* ---------- ١) الإطار المشترك لشاشات اللعب ---------- */
/* البطاقة البيضاء: بدون حد، وحافة بارزة. الحد والظل القديمين فيهم !important:
   الحد يقرأ var(--line) فنخليه شفاف للبطاقة ونرجّعه لأبنائها، والحافة بـ drop-shadow */
html.ad1 body:not(.t2) #xv:is([data-ad="daily"], [data-ad="tf"], [data-ad="wordle"], [data-ad="fill"], [data-ad="match"], [data-ad="order"], [data-ad="cards"], [data-ad="chal"], [data-ad="duel"], [data-ad="hardq"], [data-ad="box"]) > .card {
  --line: transparent;
  padding: 20px;
  filter: drop-shadow(var(--edge) var(--card-edge));
}
html.ad1 body:not(.t2) #xv:is([data-ad="daily"], [data-ad="tf"], [data-ad="wordle"], [data-ad="fill"], [data-ad="match"], [data-ad="order"], [data-ad="cards"], [data-ad="chal"], [data-ad="duel"], [data-ad="hardq"], [data-ad="box"]) > .card > * {
  --line: var(--ad-line);
}
/* رأس البطاقة: اسم الدرس كشارة زرقاء، والنتيجة/العدّاد كبسولات */
html.ad1 body:not(.t2) #xv:is([data-ad="daily"], [data-ad="tf"], [data-ad="wordle"], [data-ad="fill"], [data-ad="match"], [data-ad="order"], [data-ad="cards"], [data-ad="chal"], [data-ad="duel"], [data-ad="hardq"], [data-ad="box"]) .challenge-top {
  gap: 8px;
  flex-wrap: wrap;
}
html.ad1 body:not(.t2) #xv:is([data-ad="daily"], [data-ad="tf"], [data-ad="wordle"], [data-ad="fill"], [data-ad="match"], [data-ad="order"], [data-ad="cards"], [data-ad="chal"], [data-ad="duel"], [data-ad="hardq"], [data-ad="box"]) .challenge-top > h2 {
  font-family: Alexandria, "IBM Plex Sans Arabic", sans-serif;
}
html.ad1 body:not(.t2) #xv:is([data-ad="daily"], [data-ad="tf"], [data-ad="wordle"], [data-ad="fill"], [data-ad="match"], [data-ad="order"], [data-ad="cards"], [data-ad="chal"], [data-ad="duel"], [data-ad="hardq"], [data-ad="box"]) .challenge-top > span {
  min-height: 32px;
  padding-inline: 12px;
  border-radius: var(--r-pill);
  background: var(--ad-bg);
  color: var(--ad-ink);
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-weight: 700;
}
html.ad1 body:not(.t2) #xv:is([data-ad="daily"], [data-ad="tf"], [data-ad="wordle"], [data-ad="fill"], [data-ad="match"], [data-ad="order"], [data-ad="cards"], [data-ad="chal"], [data-ad="duel"], [data-ad="hardq"], [data-ad="box"]) .chT {
  font-family: Alexandria, "IBM Plex Sans Arabic", sans-serif;
  font-size: 1rem;
  background: #fff1cc;
  color: #6b4e00;
}
html.ad1[data-theme="dark"] body:not(.t2) #xv:is([data-ad="daily"], [data-ad="tf"], [data-ad="wordle"], [data-ad="fill"], [data-ad="match"], [data-ad="order"], [data-ad="cards"], [data-ad="chal"], [data-ad="duel"], [data-ad="hardq"], [data-ad="box"]) .chT {
  background: #3a3016;
  color: #e8bc52;
}
html.ad1 body:not(.t2) #xv:is([data-ad="daily"], [data-ad="tf"], [data-ad="wordle"], [data-ad="fill"], [data-ad="match"], [data-ad="order"], [data-ad="cards"], [data-ad="chal"], [data-ad="duel"], [data-ad="hardq"], [data-ad="box"]) .chalPlay > small.hint,
html.ad1 body:not(.t2) #xv:is([data-ad="daily"], [data-ad="tf"], [data-ad="wordle"], [data-ad="fill"], [data-ad="match"], [data-ad="order"], [data-ad="cards"], [data-ad="chal"], [data-ad="duel"], [data-ad="hardq"], [data-ad="box"]) .card > .challenge-top > small.hint {
  justify-self: start;
  min-height: 28px;
  padding-inline: 12px;
  border-radius: var(--r-pill);
  background: #e6eef7;
  color: #1f67ae;
  display: inline-flex;
  align-items: center;
  font-weight: 700;
}
html.ad1[data-theme="dark"] body:not(.t2) #xv:is([data-ad="daily"], [data-ad="tf"], [data-ad="wordle"], [data-ad="fill"], [data-ad="match"], [data-ad="order"], [data-ad="cards"], [data-ad="chal"], [data-ad="duel"], [data-ad="hardq"], [data-ad="box"]) .chalPlay > small.hint,
html.ad1[data-theme="dark"] body:not(.t2) #xv:is([data-ad="daily"], [data-ad="tf"], [data-ad="wordle"], [data-ad="fill"], [data-ad="match"], [data-ad="order"], [data-ad="cards"], [data-ad="chal"], [data-ad="duel"], [data-ad="hardq"], [data-ad="box"]) .card > .challenge-top > small.hint {
  background: #16283b;
  color: #9cc3ea;
}
html.ad1 body:not(.t2) #xv:is([data-ad="daily"], [data-ad="tf"], [data-ad="wordle"], [data-ad="fill"], [data-ad="match"], [data-ad="order"], [data-ad="cards"], [data-ad="chal"], [data-ad="duel"], [data-ad="hardq"], [data-ad="box"]) .challenge-bar {
  height: 8px;
  border-radius: var(--r-pill);
}

/* الخيارات: بيضاء بحافة، والصح/الغلط بألوان النجاح/الخطر + علامة ✓/✕.
   القواعد القديمة (app.css «html.ds3 .challenge-options button») كلها !important على متغيرات:
   الزاوية var(--r-lg)، الحد var(--line)، الخلفية var(--card) — فنغيّر المتغيرات على الزر نفسه */
html.ad1 body:not(.t2) #xv:is([data-ad="daily"], [data-ad="tf"], [data-ad="wordle"], [data-ad="fill"], [data-ad="match"], [data-ad="order"], [data-ad="cards"], [data-ad="chal"], [data-ad="duel"], [data-ad="hardq"], [data-ad="box"]) .challenge-options button {
  --r-lg: 18px;
  --line: var(--ad-line);
  font-weight: 700;
  box-shadow: var(--edge) var(--card-edge);
  display: flex;
  align-items: center;
  gap: 10px;
}
html.ad1 body:not(.t2) #xv:is([data-ad="daily"], [data-ad="tf"], [data-ad="wordle"], [data-ad="fill"], [data-ad="match"], [data-ad="order"], [data-ad="cards"], [data-ad="chal"], [data-ad="duel"], [data-ad="hardq"], [data-ad="box"]) .challenge-options button.ok {
  box-shadow: var(--edge) #1f9d63;
}
html.ad1 body:not(.t2) #xv:is([data-ad="daily"], [data-ad="tf"], [data-ad="wordle"], [data-ad="fill"], [data-ad="match"], [data-ad="order"], [data-ad="cards"], [data-ad="chal"], [data-ad="duel"], [data-ad="hardq"], [data-ad="box"]) .challenge-options button.no {
  box-shadow: var(--edge) #b3261e;
}
html.ad1 body:not(.t2) #xv:is([data-ad="daily"], [data-ad="tf"], [data-ad="wordle"], [data-ad="fill"], [data-ad="match"], [data-ad="order"], [data-ad="cards"], [data-ad="chal"], [data-ad="duel"], [data-ad="hardq"], [data-ad="box"]) .challenge-options button:is(.ok, .no)::after {
  margin-inline-start: auto;
  inline-size: 28px;
  block-size: 28px;
  flex: none;
  border-radius: var(--r-pill);
  display: grid;
  place-items: center;
  color: #fff;
  font-size: 0.9rem;
  font-weight: 700;
}
html.ad1 body:not(.t2) #xv:is([data-ad="daily"], [data-ad="tf"], [data-ad="wordle"], [data-ad="fill"], [data-ad="match"], [data-ad="order"], [data-ad="cards"], [data-ad="chal"], [data-ad="duel"], [data-ad="hardq"], [data-ad="box"]) .challenge-options button.ok::after {
  content: "✓";
  background: #1f9d63;
}
html.ad1 body:not(.t2) #xv:is([data-ad="daily"], [data-ad="tf"], [data-ad="wordle"], [data-ad="fill"], [data-ad="match"], [data-ad="order"], [data-ad="cards"], [data-ad="chal"], [data-ad="duel"], [data-ad="hardq"], [data-ad="box"]) .challenge-options button.no::after {
  content: "✕";
  background: #b3261e;
}

/* رسالة الصح/الغلط: لوحة ناعمة بزوايا ٢٠ */
html.ad1 body:not(.t2) #xv:is([data-ad="daily"], [data-ad="tf"], [data-ad="wordle"], [data-ad="fill"], [data-ad="match"], [data-ad="order"], [data-ad="cards"], [data-ad="chal"], [data-ad="duel"], [data-ad="hardq"], [data-ad="box"]) .msg,
html.ad1 body:not(.t2) #xv:is([data-ad="daily"], [data-ad="tf"], [data-ad="wordle"], [data-ad="fill"], [data-ad="match"], [data-ad="order"], [data-ad="cards"], [data-ad="chal"], [data-ad="duel"], [data-ad="hardq"], [data-ad="box"]) .g2-feedback {
  border-radius: var(--r-3xl);
  padding: 14px 16px;
  background: #e6f6ee;
  color: #0b5a38;
  font-weight: 700;
  line-height: 1.7;
}
html.ad1 body:not(.t2) #xv:is([data-ad="daily"], [data-ad="tf"], [data-ad="wordle"], [data-ad="fill"], [data-ad="match"], [data-ad="order"], [data-ad="cards"], [data-ad="chal"], [data-ad="duel"], [data-ad="hardq"], [data-ad="box"]) .msg.bad,
html.ad1 body:not(.t2) #xv:is([data-ad="daily"], [data-ad="tf"], [data-ad="wordle"], [data-ad="fill"], [data-ad="match"], [data-ad="order"], [data-ad="cards"], [data-ad="chal"], [data-ad="duel"], [data-ad="hardq"], [data-ad="box"]) .g2-feedback.g2-error {
  background: #fbeae7;
  color: #8c1d18;
}
html.ad1[data-theme="dark"] body:not(.t2) #xv:is([data-ad="daily"], [data-ad="tf"], [data-ad="wordle"], [data-ad="fill"], [data-ad="match"], [data-ad="order"], [data-ad="cards"], [data-ad="chal"], [data-ad="duel"], [data-ad="hardq"], [data-ad="box"]) .msg,
html.ad1[data-theme="dark"] body:not(.t2) #xv:is([data-ad="daily"], [data-ad="tf"], [data-ad="wordle"], [data-ad="fill"], [data-ad="match"], [data-ad="order"], [data-ad="cards"], [data-ad="chal"], [data-ad="duel"], [data-ad="hardq"], [data-ad="box"]) .g2-feedback {
  background: #123f2a;
  color: #c8f0dc;
}
html.ad1[data-theme="dark"] body:not(.t2) #xv:is([data-ad="daily"], [data-ad="tf"], [data-ad="wordle"], [data-ad="fill"], [data-ad="match"], [data-ad="order"], [data-ad="cards"], [data-ad="chal"], [data-ad="duel"], [data-ad="hardq"], [data-ad="box"]) .msg.bad,
html.ad1[data-theme="dark"] body:not(.t2) #xv:is([data-ad="daily"], [data-ad="tf"], [data-ad="wordle"], [data-ad="fill"], [data-ad="match"], [data-ad="order"], [data-ad="cards"], [data-ad="chal"], [data-ad="duel"], [data-ad="hardq"], [data-ad="box"]) .g2-feedback.g2-error {
  background: #3a1c1c;
  color: #ffd9d4;
}
html.ad1 body:not(.t2) #xv:is([data-ad="daily"], [data-ad="tf"], [data-ad="wordle"], [data-ad="fill"], [data-ad="match"], [data-ad="order"], [data-ad="cards"], [data-ad="chal"], [data-ad="duel"], [data-ad="hardq"], [data-ad="box"]) .msg small {
  font-weight: 500;
}

/* الأزرار داخل البطاقة: كبسولات ٥٢ بحافة.
   «التالي» (button.ghost) خلفيته وحده !important في base.css (.ds2 button.ghost) — يبقى أبيض ونضيف له الحافة والكبسولة */
html.ad1 body:not(.t2) #xv:is([data-ad="daily"], [data-ad="tf"], [data-ad="wordle"], [data-ad="fill"], [data-ad="match"], [data-ad="order"], [data-ad="cards"], [data-ad="chal"], [data-ad="duel"], [data-ad="hardq"], [data-ad="box"]) .row > button {
  --r-lg: 999px;
  min-height: 52px;
  border-radius: var(--r-pill);
  box-shadow: var(--edge) var(--green-edge);
}
html.ad1 body:not(.t2) #xv:is([data-ad="daily"], [data-ad="tf"], [data-ad="wordle"], [data-ad="fill"], [data-ad="match"], [data-ad="order"], [data-ad="cards"], [data-ad="chal"], [data-ad="duel"], [data-ad="hardq"], [data-ad="box"]) .row > button.ghost {
  box-shadow: var(--edge) var(--card-edge);
}

/* بعد الإجابة: الخيار الصح/الغلط يبقى واضح (الباقي يبهت بالقاعدة القديمة للمعطّل) */
html.ad1 body:not(.t2) #xv:is([data-ad="daily"], [data-ad="tf"], [data-ad="wordle"], [data-ad="fill"], [data-ad="match"], [data-ad="order"], [data-ad="cards"], [data-ad="chal"], [data-ad="duel"], [data-ad="hardq"], [data-ad="box"]) .challenge-options button:is(.ok, .no):disabled {
  opacity: 1;
}

/* ---------- ٢) لوحات games.js (المقدمة، النتيجة، المبارزة، الصندوق) ---------- */
/* الغلاف section.g2 كان بطاقة فوق بطاقة — نخليه شفاف وتبقى البطاقة اللي جوّاه */
html.ad1 body:not(.t2) #xv:is([data-ad="daily"], [data-ad="tf"], [data-ad="wordle"], [data-ad="fill"], [data-ad="match"], [data-ad="order"], [data-ad="cards"], [data-ad="chal"], [data-ad="duel"], [data-ad="hardq"], [data-ad="box"]) > section.g2 {
  background: transparent;
  border: 0;
  padding: 0;
}
html.ad1 body:not(.t2) #xv:is([data-ad="daily"], [data-ad="tf"], [data-ad="wordle"], [data-ad="fill"], [data-ad="match"], [data-ad="order"], [data-ad="cards"], [data-ad="chal"], [data-ad="duel"], [data-ad="hardq"], [data-ad="box"]) .g2-head h2 {
  font-family: Alexandria, "IBM Plex Sans Arabic", sans-serif;
  font-weight: 700;
}
html.ad1 body:not(.t2) #xv:is([data-ad="daily"], [data-ad="tf"], [data-ad="wordle"], [data-ad="fill"], [data-ad="match"], [data-ad="order"], [data-ad="cards"], [data-ad="chal"], [data-ad="duel"], [data-ad="hardq"], [data-ad="box"]) .g2-head a {
  min-height: 40px;
  padding-inline: 14px;
  border-radius: var(--r-pill);
  background: var(--ad-card);
  box-shadow: var(--edge) var(--card-edge);
}
html.ad1 body:not(.t2) #xv:is([data-ad="daily"], [data-ad="tf"], [data-ad="wordle"], [data-ad="fill"], [data-ad="match"], [data-ad="order"], [data-ad="cards"], [data-ad="chal"], [data-ad="duel"], [data-ad="hardq"], [data-ad="box"]) .g2-card {
  border: 0;
  border-radius: var(--r-5xl);
  background: var(--ad-card);
  box-shadow: var(--edge-lg) var(--card-edge);
  margin-block: 12px 18px;
}
html.ad1 body:not(.t2) #xv:is([data-ad="daily"], [data-ad="tf"], [data-ad="wordle"], [data-ad="fill"], [data-ad="match"], [data-ad="order"], [data-ad="cards"], [data-ad="chal"], [data-ad="duel"], [data-ad="hardq"], [data-ad="box"]) .g2-card h3 {
  font-family: Alexandria, "IBM Plex Sans Arabic", sans-serif;
  font-weight: 700;
  font-size: 1.2rem;
}
html.ad1 body:not(.t2) #xv:is([data-ad="daily"], [data-ad="tf"], [data-ad="wordle"], [data-ad="fill"], [data-ad="match"], [data-ad="order"], [data-ad="cards"], [data-ad="chal"], [data-ad="duel"], [data-ad="hardq"], [data-ad="box"]) .g2 button {
  min-height: 50px;
  padding-inline: 20px;
  border-radius: var(--r-pill);
  border: 1.5px solid var(--ad-line);
  background: var(--ad-card);
  color: var(--ad-ink);
  font-weight: 700;
}
html.ad1 body:not(.t2) #xv:is([data-ad="daily"], [data-ad="tf"], [data-ad="wordle"], [data-ad="fill"], [data-ad="match"], [data-ad="order"], [data-ad="cards"], [data-ad="chal"], [data-ad="duel"], [data-ad="hardq"], [data-ad="box"]) .g2 button.g2-primary {
  border: 0;
  background: #0d4f3c;
  color: #fff;
  box-shadow: var(--edge) var(--green-edge);
}
html.ad1[data-theme="dark"] body:not(.t2) #xv:is([data-ad="daily"], [data-ad="tf"], [data-ad="wordle"], [data-ad="fill"], [data-ad="match"], [data-ad="order"], [data-ad="cards"], [data-ad="chal"], [data-ad="duel"], [data-ad="hardq"], [data-ad="box"]) .g2 button.g2-primary {
  background: #1e7a55;
  box-shadow: var(--edge) #06201a;
}
/* النتيجة: الرقم الكبير بخط العناوين، والتقسيم الثلاثي بخلفية نعناعية */
html.ad1 body:not(.t2) #xv:is([data-ad="daily"], [data-ad="tf"], [data-ad="wordle"], [data-ad="fill"], [data-ad="match"], [data-ad="order"], [data-ad="cards"], [data-ad="chal"], [data-ad="duel"], [data-ad="hardq"], [data-ad="box"]) .g2-score {
  font-family: Alexandria, "IBM Plex Sans Arabic", sans-serif;
}
html.ad1 body:not(.t2) #xv:is([data-ad="daily"], [data-ad="tf"], [data-ad="wordle"], [data-ad="fill"], [data-ad="match"], [data-ad="order"], [data-ad="cards"], [data-ad="chal"], [data-ad="duel"], [data-ad="hardq"], [data-ad="box"]) .g2-split {
  border-radius: var(--r-3xl);
  background: var(--ad-mint);
}
html.ad1 body:not(.t2) #xv:is([data-ad="daily"], [data-ad="tf"], [data-ad="wordle"], [data-ad="fill"], [data-ad="match"], [data-ad="order"], [data-ad="cards"], [data-ad="chal"], [data-ad="duel"], [data-ad="hardq"], [data-ad="box"]) .g2-split b {
  font-family: Alexandria, "IBM Plex Sans Arabic", sans-serif;
}
html.ad1 body:not(.t2) #xv:is([data-ad="daily"], [data-ad="tf"], [data-ad="wordle"], [data-ad="fill"], [data-ad="match"], [data-ad="order"], [data-ad="cards"], [data-ad="chal"], [data-ad="duel"], [data-ad="hardq"], [data-ad="box"]) .g2-best {
  border-color: var(--ad-line);
  align-items: center;
}
html.ad1 body:not(.t2) #xv:is([data-ad="daily"], [data-ad="tf"], [data-ad="wordle"], [data-ad="fill"], [data-ad="match"], [data-ad="order"], [data-ad="cards"], [data-ad="chal"], [data-ad="duel"], [data-ad="hardq"], [data-ad="box"]) .g2-best button {
  flex: none;
  white-space: nowrap;
}

/* ---------- ٣) سؤال اليوم والسؤال الصعب: السؤال في بطاقة ملوّنة (أزرق / نيلي التحدي) ----------
   البطاقة نفسها تصير شفافة، والعنوان h2 هو البطاقة الملوّنة، والوسم الصغير يطلع داخلها */
html.ad1 body:not(.t2) #xv:is([data-ad="daily"], [data-ad="hardq"]) > .card.dq {
  --ad-q: #1f67ae;
  --ad-q-e: #154c83;
  --ad-q-k: #cfe3f7;
  position: relative;
  background: transparent;
  padding: 0;
  filter: none;
  gap: 14px;
}
html.ad1 body:not(.t2) #xv[data-ad="hardq"] > .card.dq {
  --ad-q: var(--challenge);
  --ad-q-e: var(--challenge-edge);
  --ad-q-k: #c9cbf2;
}
html.ad1 body:not(.t2) #xv:is([data-ad="daily"], [data-ad="hardq"]) > .card.dq > small.hint {
  position: absolute;
  inset-block-start: 20px;
  inset-inline: 20px;
  z-index: 1;
  color: var(--ad-q-k);
  font-weight: 700;
}
html.ad1 body:not(.t2) #xv:is([data-ad="daily"], [data-ad="hardq"]) > .card.dq > h2 {
  margin: 0 0 6px;
  padding: 52px 20px 22px;
  border-radius: var(--r-5xl);
  background: var(--ad-q);
  color: #fff;
  box-shadow: var(--edge-lg) var(--ad-q-e);
}
/* «محاولة واحدة فقط!» كبسولة ذهبية */
html.ad1 body:not(.t2) #xv[data-ad="hardq"] > .card.dq > p.hint:not(.g2-save) {
  justify-self: start;
  margin: 0;
  min-height: 28px;
  padding-inline: 12px;
  border-radius: var(--r-pill);
  background: #ffd166;
  color: #0b3a2d;
  display: inline-flex;
  align-items: center;
  font-weight: 700;
}

/* ---------- ٤) صح أم خطأ: زرّين كبار، أخضر وأحمر بحافة (مثل التطبيق) ----------
   الأخضر خلفيته var(--accent) !important — نغيّر المتغير.
   الأحمر خلفيته ولونه قيم ثابتة بـ !important — نرسم فوق الخلفية بظل داخلي، ولون النص بـ -webkit-text-fill-color */
html.ad1 body:not(.t2) #xv:is([data-ad="daily"], [data-ad="tf"], [data-ad="wordle"], [data-ad="fill"], [data-ad="match"], [data-ad="order"], [data-ad="cards"], [data-ad="chal"], [data-ad="duel"], [data-ad="hardq"], [data-ad="box"]) .truefalse-buttons {
  gap: 12px;
}
html.ad1 body:not(.t2) #xv:is([data-ad="daily"], [data-ad="tf"], [data-ad="wordle"], [data-ad="fill"], [data-ad="match"], [data-ad="order"], [data-ad="cards"], [data-ad="chal"], [data-ad="duel"], [data-ad="hardq"], [data-ad="box"]) .truefalse-buttons button {
  --r-xl: 24px;
  border: 0;
  font-family: Alexandria, "IBM Plex Sans Arabic", sans-serif;
}
html.ad1 body:not(.t2) #xv:is([data-ad="daily"], [data-ad="tf"], [data-ad="wordle"], [data-ad="fill"], [data-ad="match"], [data-ad="order"], [data-ad="cards"], [data-ad="chal"], [data-ad="duel"], [data-ad="hardq"], [data-ad="box"]) .truefalse-buttons .tfT {
  --accent: #1f9d63;
  color: #fff;
  box-shadow: var(--edge) #0f6b41;
}
html.ad1 body:not(.t2) #xv:is([data-ad="daily"], [data-ad="tf"], [data-ad="wordle"], [data-ad="fill"], [data-ad="match"], [data-ad="order"], [data-ad="cards"], [data-ad="chal"], [data-ad="duel"], [data-ad="hardq"], [data-ad="box"]) .truefalse-buttons .tfF {
  -webkit-text-fill-color: #fff;
  box-shadow: var(--edge) #7a1a14, inset 0 0 0 999px #b3261e;
}
/* بعد الإجابة: الزر المختار يبقى واضح، والثاني يبهت */
html.ad1 body:not(.t2) #xv:is([data-ad="daily"], [data-ad="tf"], [data-ad="wordle"], [data-ad="fill"], [data-ad="match"], [data-ad="order"], [data-ad="cards"], [data-ad="chal"], [data-ad="duel"], [data-ad="hardq"], [data-ad="box"]) .truefalse-buttons button:disabled:not(.ok):not(.no) {
  opacity: 0.45;
}
html.ad1 body:not(.t2) #xv:is([data-ad="daily"], [data-ad="tf"], [data-ad="wordle"], [data-ad="fill"], [data-ad="match"], [data-ad="order"], [data-ad="cards"], [data-ad="chal"], [data-ad="duel"], [data-ad="hardq"], [data-ad="box"]) .truefalse-buttons button:is(.ok, .no) {
  opacity: 1;
  outline: 3px solid var(--ad-ink);
  outline-offset: 3px;
}

/* ---------- ٥) أكمل الفراغ ---------- */
html.ad1 body:not(.t2) #xv[data-ad="fill"] .blank {
  min-width: 90px;
  padding-inline: 10px;
  border-bottom: 3px dashed #1f67ae;
  border-radius: var(--r-sm);
  color: #1f67ae;
}
html.ad1[data-theme="dark"] body:not(.t2) #xv[data-ad="fill"] .blank {
  border-bottom-color: #9cc3ea;
  color: #9cc3ea;
}

/* ---------- ٦) وردل: الشاشة خضراء غامقة، والمربعات بزوايا ١٢ ----------
   ألوان المربعات القديمة: الأخضر var(--accent) !important (نغيّر المتغير)،
   والأصفر والرمادي قيم ثابتة !important (نرسم فوقها بظل داخلي) */
html.ad1 body:not(.t2) #xv[data-ad="wordle"] > .card.wd {
  --line: transparent;
  --ad-wd: #0d4f3c;
  background: var(--ad-wd);
  color: #fff;
  filter: drop-shadow(var(--edge-lg) #073426);
}
html.ad1[data-theme="dark"] body:not(.t2) #xv[data-ad="wordle"] > .card.wd {
  --ad-wd: #123d30;
  filter: drop-shadow(var(--edge-lg) #06201a);
}
html.ad1 body:not(.t2) #xv[data-ad="wordle"] .card.wd > h2 {
  color: #fff;
}
html.ad1 body:not(.t2) #xv[data-ad="wordle"] .card.wd > p.hint:not(.g2-save) {
  margin: 0;
  padding: 10px 12px;
  border-radius: var(--r-xl);
  background: rgba(255, 255, 255, 0.08);
  color: #e3f5ec;
  line-height: 1.9;
}
html.ad1 body:not(.t2) #xv[data-ad="wordle"] .wordle-tile {
  --accent: #1f9d63;
  border-radius: var(--r-md);
  border: 2px solid rgba(255, 255, 255, 0.14);
  background: transparent;
  color: #fff;
  font-family: Alexandria, "IBM Plex Sans Arabic", sans-serif;
}
html.ad1 body:not(.t2) #xv[data-ad="wordle"] .wordle-tile.f {
  border: 2.5px solid #ffd166;
  background: rgba(255, 255, 255, 0.12);
}
html.ad1 body:not(.t2) #xv[data-ad="wordle"] .wordle-tile.g {
  box-shadow: 0 3px 0 rgba(0, 0, 0, 0.18);
}
html.ad1 body:not(.t2) #xv[data-ad="wordle"] .wordle-tile.y {
  color: #0b3a2d;
  box-shadow: 0 3px 0 rgba(0, 0, 0, 0.18), inset 0 0 0 999px #ffd166;
}
html.ad1 body:not(.t2) #xv[data-ad="wordle"] .wordle-tile.b {
  color: #fff;
  box-shadow: 0 3px 0 rgba(0, 0, 0, 0.18), inset 0 0 0 999px #5e7a72;
}
/* مربعات الشرح الصغيرة: بدون حافة */
html.ad1 body:not(.t2) #xv[data-ad="wordle"] .wordle-tile.s {
  border-radius: 7px;
  box-shadow: none;
}
html.ad1 body:not(.t2) #xv[data-ad="wordle"] .wordle-tile.s.y {
  box-shadow: inset 0 0 0 999px #ffd166;
}
html.ad1 body:not(.t2) #xv[data-ad="wordle"] .wordle-tile.s.b {
  box-shadow: inset 0 0 0 999px #5e7a72;
}
/* الكيبورد: أزرار شفافة على الأخضر. الخلفية والحد !important على var(--card) و var(--line) */
html.ad1 body:not(.t2) #xv[data-ad="wordle"] .kb button {
  --card: rgba(255, 255, 255, 0.16);
  --line: transparent;
  --accent: #1f9d63;
  color: #fff;
  box-shadow: none;
  font-family: Alexandria, "IBM Plex Sans Arabic", sans-serif;
}
html.ad1 body:not(.t2) #xv[data-ad="wordle"] .kb button.y {
  color: #0b3a2d;
  box-shadow: inset 0 0 0 999px #ffd166;
}
html.ad1 body:not(.t2) #xv[data-ad="wordle"] .kb button.b {
  color: #fff;
  box-shadow: inset 0 0 0 999px #5e7a72;
}
/* «إدخال» ذهبي بحافة، و«حذف» شفاف. الخلفية !important على var(--accent-2) */
html.ad1 body:not(.t2) #xv[data-ad="wordle"] .kb button[data-k="enter"] {
  --accent-2: #ffd166;
  color: #0b3a2d;
  box-shadow: 0 3px 0 var(--gold-edge);
}
html.ad1 body:not(.t2) #xv[data-ad="wordle"] .kb button[data-k="del"] {
  --accent-2: rgba(255, 255, 255, 0.16);
  color: #fff;
}
html.ad1 body:not(.t2) #xv[data-ad="wordle"] .card.wd .msg {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}
html.ad1 body:not(.t2) #xv[data-ad="wordle"] .card.wd .g2-save {
  color: #9fd3bf;
}

/* ---------- ٧) التوصيل ----------
   الأزرار: الحد !important على var(--line) والزاوية على var(--r-lg) — نغيّر المتغيرات */
html.ad1 body:not(.t2) #xv[data-ad="match"] .match-grid button {
  --r-lg: 18px;
  --line: var(--ad-line);
  min-height: 64px;
  font-weight: 700;
  box-shadow: var(--edge) var(--card-edge);
}
html.ad1 body:not(.t2) #xv[data-ad="match"] .match-grid button.sel {
  --line: #e0a100;
  background: #fff4d6;
  color: #10302a;
  box-shadow: var(--edge) #e0a100;
}
html.ad1[data-theme="dark"] body:not(.t2) #xv[data-ad="match"] .match-grid button.sel {
  background: #3a3016;
  color: #ffe6a3;
}
html.ad1 body:not(.t2) #xv[data-ad="match"] .match-grid button.ok {
  --line: #1f9d63;
  box-shadow: var(--edge) #1f9d63;
}
html.ad1 body:not(.t2) #xv[data-ad="match"] .match-grid button.no {
  --line: #b3261e;
  box-shadow: var(--edge) #b3261e;
}

/* ---------- ٨) رتّب المراحل ---------- */
html.ad1 body:not(.t2) #xv[data-ad="order"] .order-list li {
  min-height: 60px;
  border-radius: var(--r-2xl);
  border: 1.5px solid var(--ad-line);
  background: var(--ad-card);
  box-shadow: var(--edge) var(--card-edge);
}
html.ad1 body:not(.t2) #xv[data-ad="order"] .order-number {
  background: #0d4f3c;
  font-family: Alexandria, "IBM Plex Sans Arabic", sans-serif;
}
html.ad1[data-theme="dark"] body:not(.t2) #xv[data-ad="order"] .order-number {
  background: #1e7a55;
}
/* أزرار الأسهم: الزاوية !important على var(--r-md) */
html.ad1 body:not(.t2) #xv[data-ad="order"] .order-box button {
  --r-md: 14px;
  background: var(--ad-mint);
  color: var(--ad-ink);
}

/* ---------- ٩) بطاقات الحفظ (pages2.js، .p2fc) ---------- */
html.ad1 body:not(.t2) #xv[data-ad="cards"] .p2-card {
  border: 0;
  border-radius: var(--r-3xl);
  background: var(--ad-card);
  box-shadow: var(--edge) var(--card-edge);
}
html.ad1 body:not(.t2) #xv[data-ad="cards"] .p2-goal b {
  font-family: Alexandria, "IBM Plex Sans Arabic", sans-serif;
}
html.ad1 body:not(.t2) #xv[data-ad="cards"] .p2-flip,
html.ad1 body:not(.t2) #xv[data-ad="cards"] .p2-flip .p2-f,
html.ad1 body:not(.t2) #xv[data-ad="cards"] .p2-flip .p2-b {
  border-radius: var(--r-5xl);
}
html.ad1 body:not(.t2) #xv[data-ad="cards"] .p2-flip .p2-f {
  border: 0;
  background: var(--ad-card);
  color: var(--ad-ink);
  box-shadow: var(--edge-lg) var(--card-edge);
}
html.ad1 body:not(.t2) #xv[data-ad="cards"] .p2-flip .p2-f b {
  font-family: Alexandria, "IBM Plex Sans Arabic", sans-serif;
}
/* ظهر البطاقة: أزرق التطبيق بحافة */
html.ad1 body:not(.t2) #xv[data-ad="cards"] .p2-flip .p2-b {
  background: #1f67ae;
  box-shadow: var(--edge-lg) #14467a;
}
html.ad1 body:not(.t2) #xv[data-ad="cards"] .p2-rate {
  min-block-size: 52px;
  border-radius: var(--r-pill);
  box-shadow: var(--edge) rgba(0, 0, 0, 0.14);
}

/* ---------- ١٠) مقدمات الألعاب الملوّنة: تحدي الدقيقة (برتقالي)، المبارزة (وردي)، الصندوق (ذهبي) ---------- */
html.ad1 body:not(.t2) #xv:is([data-ad="chal"], [data-ad="duel"]) .g2-head + .g2-card {
  --ad-h: #b4531f;
  --ad-h-e: #883e16;
  background: var(--ad-h);
  color: #fff;
  box-shadow: var(--edge-lg) var(--ad-h-e);
}
html.ad1 body:not(.t2) #xv[data-ad="duel"] .g2-head + .g2-card {
  --ad-h: #a8366a;
  --ad-h-e: #7c2650;
}
html.ad1 body:not(.t2) #xv:is([data-ad="chal"], [data-ad="duel"]) .g2-head + .g2-card :is(h3, p, small, .g2-muted, .g2-cap, span) {
  color: #fff;
}
html.ad1 body:not(.t2) #xv:is([data-ad="chal"], [data-ad="duel"]) .g2-head + .g2-card .g2-best {
  border-color: rgba(255, 255, 255, 0.22);
}
/* الزر الأساسي على الملوّن: ذهبي بحافة */
html.ad1 body:not(.t2) #xv:is([data-ad="chal"], [data-ad="duel"], [data-ad="box"]) .g2-head + .g2-card button.g2-primary {
  background: #ffd166;
  color: #0b3a2d;
  box-shadow: var(--edge) var(--gold-edge);
}
html.ad1 body:not(.t2) #xv[data-ad="duel"] .g2-head + .g2-card button:not(.g2-primary) {
  border: 0;
  background: #fff;
  color: #7c2650;
  box-shadow: var(--edge) #5e1c3c;
}
html.ad1 body:not(.t2) #xv[data-ad="box"] .g2-head + .g2-card {
  border: 2px solid #f0d58a;
  background: linear-gradient(180deg, #fff4d6, #ffe3a0);
  color: #5a4500;
  box-shadow: var(--edge-lg) #d9a92e;
}
html.ad1 body:not(.t2) #xv[data-ad="box"] .g2-head + .g2-card :is(h3, p) {
  color: #5a4500;
}
/* «أبطال هذا الأسبوع» تحت تحدي الدقيقة */
html.ad1 body:not(.t2) #xv[data-ad="chal"] #g2Top li {
  padding-block: 4px;
}

/* =====================================================================
   مركز الألعاب #games: بطاقات ملوّنة بحافة (ألوان التطبيق)
   ===================================================================== */
html.ad1 body:not(.t2) #xv[data-ad="games"] .games-streak {
  min-height: 38px;
  border: 0;
  border-radius: var(--r-pill);
  padding-inline: 12px;
  background: var(--ad-card);
  box-shadow: var(--edge) var(--card-edge);
  font-family: Alexandria, "IBM Plex Sans Arabic", sans-serif;
}
/* دوري الأسبوع وقضية الأسبوع: حواف ٢٦ وحافة بارزة */
html.ad1 body:not(.t2) #xv[data-ad="games"] .dw-mini {
  border-radius: var(--r-5xl);
  margin-bottom: 16px;
  box-shadow: var(--edge-lg) #062a1f;
}
html.ad1 body:not(.t2) #xv[data-ad="games"] .lb-caseCard {
  border-radius: var(--r-5xl);
  margin-bottom: 16px;
  box-shadow: var(--edge-lg) #050f0c;
}
html.ad1 body:not(.t2) #xv[data-ad="games"] #mxGames .lb-tz {
  border-radius: var(--r-5xl);
  box-shadow: var(--edge-lg) #050f0c;
}
html.ad1 body:not(.t2) #xv[data-ad="games"] #mxGames .lb-tz.prt {
  box-shadow: var(--edge-lg) #b9dfcb;
}
html.ad1[data-theme="dark"] body:not(.t2) #xv[data-ad="games"] #mxGames .lb-tz.prt {
  box-shadow: var(--edge-lg) #050c0a;
}

/* لعبة اليوم (وردل / سؤال اليوم): البانر يحتاج مسافة تحت عشان الحافة ما تنقص */
html.ad1 body:not(.t2) #xv[data-ad="games"] .games-hero {
  border-radius: 0;
  padding-bottom: 6px;
}
html.ad1 body:not(.t2) #xv[data-ad="games"] .games-slide {
  --ad-s: #0d4f3c;
  --ad-s-e: #073426;
  background: var(--ad-s);
  border-bottom: 0;
  border-radius: var(--r-5xl);
  box-shadow: var(--edge-lg) var(--ad-s-e);
}
html.ad1 body:not(.t2) #xv[data-ad="games"] .games-slide[href="#daily"] {
  --ad-s: #1f67ae;
  --ad-s-e: #154c83;
}
html.ad1 body:not(.t2) #xv[data-ad="games"] .games-slide h2 {
  font-family: Alexandria, "IBM Plex Sans Arabic", sans-serif;
  font-weight: 700;
}
html.ad1 body:not(.t2) #xv[data-ad="games"] .games-tag {
  transform: none;
  border-radius: var(--r-pill);
  background: #ffd166;
  color: #0b3a2d;
  font-weight: 700;
  font-size: 0.75rem;
}
html.ad1 body:not(.t2) #xv[data-ad="games"] .games-play {
  min-height: 50px;
  border-bottom: 0;
  border-radius: var(--r-pill);
  background: #ffd166;
  color: #0b3a2d;
  box-shadow: var(--edge) var(--gold-edge);
}
html.ad1 body:not(.t2) #xv[data-ad="games"] .games-slide.done .games-play {
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
  box-shadow: none;
}
html.ad1 body:not(.t2) #xv[data-ad="games"] .games-art-tiles b {
  border-radius: 11px;
  border-bottom: 0;
}
html.ad1 body:not(.t2) #xv[data-ad="games"] .games-art-tiles b.g {
  background: #1f9d63;
  box-shadow: 0 3px 0 #147046;
}
html.ad1 body:not(.t2) #xv[data-ad="games"] .games-art-tiles b.y {
  background: #ffd166;
  color: #0b3a2d;
  box-shadow: 0 3px 0 #e0a100;
}
html.ad1 body:not(.t2) #xv[data-ad="games"] .games-hero-dots i.on {
  background: #0d4f3c;
}
html.ad1[data-theme="dark"] body:not(.t2) #xv[data-ad="games"] .games-hero-dots i.on {
  background: #3dae7a;
}

/* مهام اليوم: بطاقة بيضاء بحواف ٢٦ وحافة */
html.ad1 body:not(.t2) #xv[data-ad="games"] .games-quest {
  border: 0;
  border-radius: var(--r-5xl);
  padding: 18px 16px 16px;
  background: var(--ad-card);
  box-shadow: var(--edge) var(--card-edge);
}
html.ad1 body:not(.t2) #xv[data-ad="games"] .games-quest-head h3,
html.ad1 body:not(.t2) #xv[data-ad="games"] .games-section h3 {
  font-family: Alexandria, "IBM Plex Sans Arabic", sans-serif;
  font-weight: 700;
  font-size: 1.15rem;
}
html.ad1 body:not(.t2) #xv[data-ad="games"] .games-challenge-info {
  border-top: 0;
  padding: 12px 14px;
  border-radius: var(--r-xl);
  background: var(--ad-bg);
}
/* عناوين الأقسام: بدون الخط الفاصل (التطبيق عنوان + وصف بس) */
html.ad1 body:not(.t2) #xv[data-ad="games"] .games-section {
  justify-content: space-between;
}
html.ad1 body:not(.t2) #xv[data-ad="games"] .games-section > i {
  display: none;
}

/* «تدرّب»: كل لعبة بطاقة كاملة بلونها، والنص أبيض، وحافة أغمق */
html.ad1 body:not(.t2) #xv[data-ad="games"] .games-card {
  --ad-g: #1f67ae;
  --ad-g-e: #154c83;
  border: 0;
  border-radius: var(--r-5xl);
  margin-bottom: 6px;
  background: var(--ad-g);
  color: #fff;
  box-shadow: var(--edge-lg) var(--ad-g-e);
}
html.ad1 body:not(.t2) #xv[data-ad="games"] .games-card[href="#cards"] { --ad-g: #8f6510; --ad-g-e: #6a4a0b; }
html.ad1 body:not(.t2) #xv[data-ad="games"] .games-card[href="#fill"] { --ad-g: #4b4fb5; --ad-g-e: #363a8c; }
html.ad1 body:not(.t2) #xv[data-ad="games"] .games-card[href="#match"] { --ad-g: #26784c; --ad-g-e: #1a5636; }
html.ad1 body:not(.t2) #xv[data-ad="games"] .games-card[href="#order"] { --ad-g: #55772a; --ad-g-e: #3d561e; }
html.ad1 body:not(.t2) #xv[data-ad="games"] .games-card[href="#chal"] { --ad-g: #b4531f; --ad-g-e: #883e16; }
html.ad1 body:not(.t2) #xv[data-ad="games"] .games-card:active {
  border-bottom-width: 0;
  margin-bottom: 6px;
  transform: translateY(4px);
  box-shadow: 0 2px 0 var(--ad-g-e);
}
html.ad1 body:not(.t2) #xv[data-ad="games"] .games-card-art {
  background: transparent;
}
html.ad1 body:not(.t2) #xv[data-ad="games"] .games-card-body {
  padding: 4px 14px 16px;
}
html.ad1 body:not(.t2) #xv[data-ad="games"] .games-card-body b {
  font-family: Alexandria, "IBM Plex Sans Arabic", sans-serif;
  font-weight: 700;
  font-size: 1.05rem;
  color: #fff;
}
html.ad1 body:not(.t2) #xv[data-ad="games"] .games-card-body small {
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.88);
}
/* النجوم داخل كبسولة غامقة */
html.ad1 body:not(.t2) #xv[data-ad="games"] .games-day-progress {
  min-height: 24px;
  padding-inline: 9px;
  border-radius: var(--r-pill);
  background: rgba(0, 0, 0, 0.16);
  align-items: center;
}
html.ad1 body:not(.t2) #xv[data-ad="games"] .games-day-progress i {
  color: rgba(255, 255, 255, 0.45);
}
html.ad1 body:not(.t2) #xv[data-ad="games"] .games-day-progress i.on {
  color: #ffd166;
}
html.ad1 body:not(.t2) #xv[data-ad="games"] .games-card-meta em {
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
}

/* «الساحة»: دوري الشعب أخضر، السؤال الصعب بلون التحدي، المبارزة وردي */
html.ad1 body:not(.t2) #xv[data-ad="games"] .games-league-link {
  --ad-a: #0d4f3c;
  --ad-a-e: #073426;
  min-height: 150px;
  border: 0;
  border-radius: var(--r-5xl);
  margin-bottom: 6px;
  padding: 14px 10px;
  background: var(--ad-a);
  color: #fff;
  box-shadow: var(--edge-lg) var(--ad-a-e);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
html.ad1 body:not(.t2) #xv[data-ad="games"] .games-league-link[href="#hardq"] {
  --ad-a: var(--challenge);
  --ad-a-e: var(--challenge-edge);
}
html.ad1 body:not(.t2) #xv[data-ad="games"] .games-league-link[href="#duel"] {
  --ad-a: #a8366a;
  --ad-a-e: #7c2650;
}
html.ad1 body:not(.t2) #xv[data-ad="games"] .games-league-link > span {
  width: 48px;
  height: 48px;
  border-radius: var(--r-xl);
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
}
html.ad1 body:not(.t2) #xv[data-ad="games"] .games-league-link b {
  font-family: Alexandria, "IBM Plex Sans Arabic", sans-serif;
  font-weight: 700;
  font-size: 0.9rem;
}
html.ad1 body:not(.t2) #xv[data-ad="games"] .games-league-link small {
  font-size: 0.72rem;
  color: rgba(255, 255, 255, 0.88);
}
html.ad1 body:not(.t2) #xv[data-ad="games"] .games-new-badge {
  background: #ffd166;
  color: #0b3a2d;
  font-weight: 700;
}

/* «المكافآت»: الصندوق ذهبي، المتجر ذهبي أغمق، كائني نعناعي — نفس الألوان في الليلي */
html.ad1 body:not(.t2) #xv[data-ad="games"] .games-box-link {
  --ad-r: #ffd166;
  --ad-r-e: #e0a100;
  min-height: 130px;
  border: 0;
  border-radius: var(--r-5xl);
  margin-bottom: 6px;
  background: var(--ad-r);
  box-shadow: var(--edge-lg) var(--ad-r-e);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
html.ad1 body:not(.t2) #xv[data-ad="games"] .games-box-link[href="#shop"] {
  --ad-r: #e8bc52;
  --ad-r-e: #b07a00;
}
html.ad1 body:not(.t2) #xv[data-ad="games"] .games-box-link[href="#avatar"] {
  --ad-r: #9fd3bf;
  --ad-r-e: #6fb89c;
}
html.ad1 body:not(.t2) #xv[data-ad="games"] .games-box-link.wait {
  filter: none;
}
html.ad1 body:not(.t2) #xv[data-ad="games"] .games-box-link b,
html.ad1[data-theme="dark"] body:not(.t2) #xv[data-ad="games"] .games-box-link b {
  font-family: Alexandria, "IBM Plex Sans Arabic", sans-serif;
  font-weight: 700;
  color: #0b3a2d;
}
html.ad1 body:not(.t2) #xv[data-ad="games"] .games-box-link small,
html.ad1[data-theme="dark"] body:not(.t2) #xv[data-ad="games"] .games-box-link small {
  color: #4a3800;
}
html.ad1 body:not(.t2) #xv[data-ad="games"] .games-box-link[href="#avatar"] small,
html.ad1[data-theme="dark"] body:not(.t2) #xv[data-ad="games"] .games-box-link[href="#avatar"] small {
  color: #0b3a2d;
}
/* ===== AD-B end ===== */

/* ===== AD-C start: المختبر (#lab #case #ask-it #atlas #trip #eco #sound #print) ===== */
/* كل القواعد على غلاف صفحات المختبر (#xv .lb-page) — ما تلمس شريط الرئيسية ولا بطاقات الألعاب/تقدّمي. */

/* ألوان المختبر تاخذ ألوان الصفحة الجديدة (تنقلب لحالها في الليلي لأن --ad-* تنقلب) */
html.ad1 body:not(.t2) #xv .lb-page {
  --lb-bg: var(--ad-bg);
  --lb-card: var(--ad-card);
  --lb-ink: var(--ad-ink);
  --lb-mute: var(--ad-muted);
  --lb-line: var(--ad-line);
  --lb-soft: var(--ad-mint);
  --ad-lb-tip-b: #ffe3a0;
}
html.ad1[data-theme="dark"] body:not(.t2) #xv .lb-page {
  --ad-lb-tip-b: #5a4612;
}

/* الرأس: سطر صغير أخضر + عنوان Alexandria + وصف */
html.ad1 body:not(.t2) #xv .lb-page .lb-hd .lb-eb {
  font-size: 0.75rem;
  color: var(--lb-g2);
}
html.ad1 body:not(.t2) #xv .lb-page .lb-hd h2 {
  font-weight: 700;
  font-size: 1.32rem;
  line-height: 1.35;
}
html.ad1 body:not(.t2) #xv .lb-page .lb-hd p {
  font-size: 0.875rem;
  line-height: 1.8;
}
/* الشارات: كبسولات ٣٤ */
html.ad1 body:not(.t2) #xv .lb-page .lb-chip {
  min-height: 34px;
  padding-inline: 14px;
  border-radius: var(--r-pill);
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--lb-ink);
}
html.ad1 body:not(.t2) #xv .lb-page .lb-chip.on {
  color: var(--lb-g);
}

/* البطاقة الكبيرة: حواف ٢٦ وحافة بارزة بدل الظل الضبابي */
html.ad1 body:not(.t2) #xv .lb-page .lb-stage {
  border-radius: var(--r-5xl);
  box-shadow: var(--edge) var(--card-edge);
}
/* الزر الأساسي: كبسولة بحافة خضراء */
html.ad1 body:not(.t2) #xv .lb-page .lb-btn {
  min-height: 48px;
  border-radius: var(--r-pill);
  padding-inline: 22px;
  box-shadow: var(--edge) var(--green-edge);
}
html.ad1 body:not(.t2) #xv .lb-page .lb-btn.ghost {
  box-shadow: var(--edge) var(--card-edge);
}
/* صفوف القوائم (الأرشيف، تجارب الكتاب، رحلات/بيئات ثانية) */
html.ad1 body:not(.t2) #xv .lb-page .lb-row {
  min-height: 72px;
  border-radius: var(--r-3xl);
  border: 1.5px solid var(--lb-line);
  padding: 12px 14px;
  gap: 12px;
  margin-bottom: 4px;
  box-shadow: var(--edge) var(--card-edge);
}
html.ad1 body:not(.t2) #xv .lb-page .lb-row .e {
  width: 48px;
  height: 48px;
  flex-basis: 48px;
  border-radius: var(--r-xl);
}
html.ad1 body:not(.t2) #xv .lb-page .lb-row b {
  font-family: "IBM Plex Sans Arabic", sans-serif;
  font-size: 0.94rem;
  line-height: 1.5;
}
html.ad1 body:not(.t2) #xv .lb-page .lb-row.lk {
  opacity: 0.62;
  box-shadow: none;
}

/* ---------- المحور #lab: بطاقات ملونة بحافة ٦ ونص أبيض (ألوان التطبيق) ---------- */
html.ad1 body:not(.t2) #xv .lb-page .lb-hub {
  gap: 12px;
}
html.ad1 body:not(.t2) #xv .lb-page .lb-hub .lb-tz {
  border-radius: var(--r-5xl);
  padding: 16px 14px;
  margin-bottom: 6px;
  color: #fff;
  background: var(--ad-lb-c);
  box-shadow: var(--edge-lg) var(--ad-lb-e);
}
html.ad1 body:not(.t2) #xv .lb-page .lb-hub .lb-tz .k {
  font-size: 0.72rem;
  color: rgba(255, 255, 255, 0.82);
}
html.ad1 body:not(.t2) #xv .lb-page .lb-hub .lb-tz b {
  font-weight: 700;
  color: #fff;
}
html.ad1 body:not(.t2) #xv .lb-page .lb-hub .lb-tz small {
  opacity: 1;
  color: rgba(255, 255, 255, 0.86);
}
html.ad1 body:not(.t2) #xv .lb-page .lb-hub .lb-tz .nw {
  background: #ffd166;
  color: #0b3a2d;
}
html.ad1 body:not(.t2) #xv .lb-page .lb-hub .lb-tz.case { --ad-lb-c: #0f2b33; --ad-lb-e: #071a1f; }
html.ad1 body:not(.t2) #xv .lb-page .lb-hub .lb-tz.case .k { color: #ffd166; }
html.ad1 body:not(.t2) #xv .lb-page .lb-hub .lb-tz.ask { --ad-lb-c: #26784c; --ad-lb-e: #1a5636; }
html.ad1 body:not(.t2) #xv .lb-page .lb-hub .lb-tz.snd { --ad-lb-c: #0b3a2d; --ad-lb-e: #062a1f; }
html.ad1 body:not(.t2) #xv .lb-page .lb-hub .lb-tz.prt { --ad-lb-c: #4b4fb5; --ad-lb-e: #363a8c; }
html.ad1 body:not(.t2) #xv .lb-page .lb-hub .lb-tz.map { --ad-lb-c: #8f6510; --ad-lb-e: #6a4a0b; }
html.ad1 body:not(.t2) #xv .lb-page .lb-hub .lb-tz.trip { --ad-lb-c: #1f67ae; --ad-lb-e: #154c83; }
html.ad1 body:not(.t2) #xv .lb-page .lb-hub .lb-tz.eco { --ad-lb-c: #55772a; --ad-lb-e: #3d561e; }
/* الليلي: نفس الألوان، والحافة أغمق من السطح */
html.ad1[data-theme="dark"] body:not(.t2) #xv .lb-page .lb-hub .lb-tz {
  --ad-lb-e: #040b09;
}
/* الجوال: القضية بعرض كامل والباقي عمودين مثل التطبيق */
@media (max-width: 1099px) {
  html.ad1 body:not(.t2) #xv .lb-page .lb-hub {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  html.ad1 body:not(.t2) #xv .lb-page .lb-hub .lb-tz.case {
    grid-column: 1 / -1;
  }
  html.ad1 body:not(.t2) #xv .lb-page .lb-hub .lb-tz.case b {
    font-size: 1.3rem;
  }
}

/* ---------- المختبر الجنائي #case: لوح التطبيق الأزرق الغامق ---------- */
html.ad1 body:not(.t2) #xv .lb-page .lb-stage:has(> .lb-cr) {
  border-color: #16414b;
  box-shadow: var(--edge-lg) #071a1f;
}
html.ad1 body:not(.t2) #xv .lb-page .lb-cr {
  background-color: #0f2b33;
  background-image: repeating-linear-gradient(0deg, #16414b 0 1px, transparent 1px 35px),
    repeating-linear-gradient(90deg, #16414b 0 1px, transparent 1px 35px);
}
/* ملف القضية: بطاقة داخلية */
html.ad1 body:not(.t2) #xv .lb-page .lb-cr .file {
  background: linear-gradient(160deg, #173f38, #0b2a26);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--r-5xl);
  padding: 16px;
}
html.ad1 body:not(.t2) #xv .lb-page .lb-cr h3 {
  font-weight: 700;
  font-size: 1.375rem;
}
html.ad1 body:not(.t2) #xv .lb-page .lb-cr .brief {
  color: #cfe0e3;
  font-size: 0.875rem;
  line-height: 1.85;
}
html.ad1 body:not(.t2) #xv .lb-page .lb-cr .stamp {
  border-width: 2px;
  border-radius: var(--r-xs);
  padding: 4px 12px;
  font-size: 0.875rem;
  transform: rotate(-5deg);
}
html.ad1 body:not(.t2) #xv .lb-page .lb-cr .score small,
html.ad1 body:not(.t2) #xv .lb-page .lb-cr .file .lbl {
  color: #9db8b0;
}
html.ad1 body:not(.t2) #xv .lb-page .lb-cr > .lbl {
  font: 700 1rem var(--lb-fd);
  color: #bfd6cb;
}
/* كروت الأدلة: عمودين، الوجه منقّط والظهر شفاف فاتح */
html.ad1 body:not(.t2) #xv .lb-page .lb-ev,
html.ad1 body:not(.t2) #xv .lb-page .lb-sus {
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
}
html.ad1 body:not(.t2) #xv .lb-page .lb-evc .fa,
html.ad1 body:not(.t2) #xv .lb-page .lb-evc .ba {
  border-radius: var(--r-3xl);
}
html.ad1 body:not(.t2) #xv .lb-page .lb-evc .fa {
  background: linear-gradient(160deg, #1a3d36, #12302b);
  border-color: #3e6b5f;
  color: #9db8b0;
}
html.ad1 body:not(.t2) #xv .lb-page .lb-evc .fa .ic {
  background: #1f4a40;
  font-size: 1.125rem;
}
html.ad1 body:not(.t2) #xv .lb-page .lb-evc .fa b {
  font-size: 1rem;
}
html.ad1 body:not(.t2) #xv .lb-page .lb-evc .ba {
  background: #1d4049;
  border: 1.5px solid rgba(255, 255, 255, 0.2);
  color: #fff;
  box-shadow: none;
}
html.ad1 body:not(.t2) #xv .lb-page .lb-evc .ba p {
  color: #cfe0e3;
  font-size: 0.8125rem;
  line-height: 1.7;
}
html.ad1 body:not(.t2) #xv .lb-page .lb-evc .ba .tag {
  background: #ffd166;
  color: #0b3a2d;
  border-radius: var(--r-pill);
  padding: 2px 10px;
}
/* المتهمين */
html.ad1 body:not(.t2) #xv .lb-page .lb-su {
  min-height: 128px;
  border-radius: var(--r-3xl);
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(255, 255, 255, 0.16);
  color: #fff;
}
html.ad1 body:not(.t2) #xv .lb-page .lb-su b {
  font-size: 1.0625rem;
}
html.ad1 body:not(.t2) #xv .lb-page .lb-su small {
  color: #9db8b0;
}
html.ad1 body:not(.t2) #xv .lb-page .lb-su.yes {
  background: rgba(31, 157, 99, 0.22);
  border: 2px solid #1f9d63;
}
html.ad1 body:not(.t2) #xv .lb-page .lb-su.no {
  opacity: 0.5;
}
html.ad1 body:not(.t2) #xv .lb-page .lb-whyMsg {
  border-radius: var(--r-2xl);
  background: rgba(179, 38, 30, 0.16);
  border: 1.5px solid #f08a80;
  color: #fbe3e0;
  padding: 12px 14px;
  font-size: 0.875rem;
  line-height: 1.8;
}
/* الحكم: بطاقة بيضاء وختم أخضر وزر بلون القضية */
html.ad1 body:not(.t2) #xv .lb-page .lb-verdict {
  background: #fff;
  color: #10302a;
  border-radius: var(--r-5xl);
  padding: 18px;
}
html.ad1 body:not(.t2) #xv .lb-page .lb-verdict h4 {
  align-self: flex-start;
  padding: 4px 14px;
  border: 3px solid #1f9d63;
  border-radius: var(--r-xs);
  color: #1a7f50;
  font-weight: 700;
  font-size: 1rem;
  transform: rotate(-2deg);
}
html.ad1 body:not(.t2) #xv .lb-page .lb-verdict .lb-btn {
  background: #0f2b33;
  color: #ffd166;
  box-shadow: var(--edge) #071a1f;
}

/* ---------- صوت الطبيعة #sound ---------- */
html.ad1 body:not(.t2) #xv .lb-page .lb-scr {
  background: #04201a;
  gap: 12px;
}
html.ad1 body:not(.t2) #xv .lb-page .lb-scr canvas {
  border-radius: var(--r-xl);
  background: radial-gradient(ellipse at center, #0b3a2d, #04201a);
  box-shadow: inset 0 0 0 1px #1c4a3c;
}
html.ad1 body:not(.t2) #xv .lb-page .lb-scrTop {
  font-size: 0.8125rem;
  color: #7fd8b0;
}
html.ad1 body:not(.t2) #xv .lb-page .lb-scrTop b {
  color: #ffd166;
}
/* زر التشغيل: كبسولة ذهبية ٥٨ بحافة */
html.ad1 body:not(.t2) #xv .lb-page .lb-play {
  min-height: 58px;
  background: #ffd166;
  color: #10302a;
  font-weight: 700;
  font-size: 1.0625rem;
  margin-bottom: 5px;
  box-shadow: 0 5px 0 #a87800;
}
html.ad1 body:not(.t2) #xv .lb-page .lb-snQ b {
  font-weight: 700;
  font-size: 1.125rem;
}
html.ad1 body:not(.t2) #xv .lb-page .lb-dots i {
  width: 26px;
  height: 8px;
  border-radius: var(--r-pill);
}
html.ad1 body:not(.t2) #xv .lb-page .lb-dots i.cur {
  background: #e0a100;
}
/* بطاقات الإجابة: بيضاء بحافة، والصح/الغلط بلونهم وحافتهم */
html.ad1 body:not(.t2) #xv .lb-page .lb-cards {
  gap: 10px;
}
html.ad1 body:not(.t2) #xv .lb-page .lb-cd {
  min-height: 112px;
  border-radius: var(--r-3xl);
  font-size: 1rem;
  margin-bottom: 4px;
  box-shadow: var(--edge) var(--card-edge);
}
html.ad1 body:not(.t2) #xv .lb-page .lb-cd.ok {
  border-width: 2.5px;
  box-shadow: var(--edge) var(--lb-ok);
}
html.ad1 body:not(.t2) #xv .lb-page .lb-cd.no {
  border-width: 2.5px;
  box-shadow: none;
}
html.ad1 body:not(.t2) #xv .lb-page .lb-fact {
  background: var(--ad-bg);
  border-radius: var(--r-3xl);
  padding: 14px;
}
html.ad1 body:not(.t2) #xv .lb-page .lb-fact .q2 button {
  min-height: 46px;
  border-radius: var(--r-xl);
  font-weight: 700;
}
html.ad1 body:not(.t2) #xv .lb-page .lb-how {
  border-radius: var(--r-xl);
}

/* ---------- بصمة الفهم #print ---------- */
html.ad1 body:not(.t2) #xv .lb-page .lb-fpArt .who {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  padding-inline: 22px;
  border-radius: var(--r-xl);
  background: var(--lb-soft);
  font-weight: 700;
}
html.ad1 body:not(.t2) #xv .lb-page .lb-seg button {
  min-height: 44px;
  padding-inline: 16px;
  font-size: 0.875rem;
}
html.ad1 body:not(.t2) #xv .lb-page .lb-seg button[aria-pressed="true"] {
  color: var(--lb-g);
  box-shadow: 0 2px 0 var(--card-edge);
}
html.ad1 body:not(.t2) #xv .lb-page .lb-cl button {
  min-height: 44px;
  font-size: 0.875rem;
}
html.ad1 body:not(.t2) #xv .lb-page .lb-tip {
  border-radius: var(--r-3xl);
  padding: 14px 16px;
  border: 1.5px solid var(--ad-lb-tip-b);
  font-size: 0.875rem;
}

/* ---------- اسأل المخلوق #ask-it ---------- */
html.ad1 body:not(.t2) #xv .lb-page .lb-akSide {
  background: var(--ad-bg);
  gap: 8px;
}
html.ad1 body:not(.t2) #xv .lb-page .lb-who {
  min-height: 60px;
  border-radius: var(--r-2xl);
  border-width: 2px;
}
html.ad1 body:not(.t2) #xv .lb-page .lb-who b {
  font-family: "IBM Plex Sans Arabic", sans-serif;
  font-size: 0.875rem;
}
html.ad1 body:not(.t2) #xv .lb-page .lb-who .lb-av {
  width: 42px;
  height: 42px;
  flex-basis: 42px;
}
html.ad1 body:not(.t2) #xv .lb-page .lb-akHead b {
  font-weight: 700;
  font-size: 1.125rem;
}
html.ad1 body:not(.t2) #xv .lb-page .lb-akHead small {
  font-weight: 700;
}
/* الفقاعات: الطالب يسار (أخضر غامق) والمخلوق يمين (نعناعي) — مثل التطبيق */
html.ad1 body:not(.t2) #xv .lb-page .lb-m {
  padding: 11px 14px;
  font-size: 0.875rem;
  border-radius: var(--r-2xl);
}
html.ad1 body:not(.t2) #xv .lb-page .lb-m.me {
  align-self: flex-end;
  border-end-end-radius: 6px;
}
html.ad1 body:not(.t2) #xv .lb-page .lb-m.it {
  align-self: flex-start;
  border-end-start-radius: 6px;
}
html.ad1 body:not(.t2) #xv .lb-page .lb-typing i {
  background: var(--lb-g2);
}
html.ad1 body:not(.t2) #xv .lb-page .lb-sugg {
  gap: 8px;
}
html.ad1 body:not(.t2) #xv .lb-page .lb-sugg button {
  min-height: 40px;
  padding: 6px 14px;
  border-width: 1.5px;
  font-size: 0.8125rem;
  font-weight: 700;
  margin-bottom: 2px;
  box-shadow: 0 2px 0 var(--lb-line);
}
html.ad1 body:not(.t2) #xv .lb-page .lb-sugg button.used {
  box-shadow: none;
}
html.ad1 body:not(.t2) #xv .lb-page .lb-akIn {
  border-top: 1px solid var(--lb-line);
  padding: 12px 14px 14px;
}
html.ad1 body:not(.t2) #xv .lb-page .lb-akIn input {
  min-height: 48px;
  border-radius: var(--r-xl);
}
html.ad1 body:not(.t2) #xv .lb-page .lb-akIn .lb-btn {
  min-height: 48px;
  min-width: 70px;
  border-radius: var(--r-xl);
  padding-inline: 14px;
}

/* ---------- خريطة المملكة #atlas ---------- */
html.ad1:not([data-theme="dark"]) body:not(.t2) #xv .lb-page .lb-mpMap {
  background: linear-gradient(180deg, #e6effa, #dce8f6);
}
html.ad1 body:not(.t2) #xv .lb-page .lb-pin.sel .dot {
  fill: #ffd166;
  stroke: #e0a100;
}
html.ad1 body:not(.t2) #xv .lb-page .lb-bar i {
  background: #1f9d63;
}
html.ad1 body:not(.t2) #xv .lb-page .lb-spec {
  border-radius: var(--r-3xl);
}
html.ad1 body:not(.t2) #xv .lb-page .lb-spec.locked {
  background: repeating-linear-gradient(135deg, var(--lb-soft) 0 14px, var(--ad-card) 14px 28px);
  font-size: 0.94rem;
}
html.ad1 body:not(.t2) #xv .lb-page .lb-coll {
  gap: 8px;
}
html.ad1 body:not(.t2) #xv .lb-page .lb-coll button {
  min-height: 40px;
  padding-inline: 14px;
  border-width: 1.5px;
  font-size: 0.8125rem;
  font-weight: 700;
}

/* ---------- رحلة داخل الجسم #trip ---------- */
html.ad1:not([data-theme="dark"]) body:not(.t2) #xv .lb-page .lb-bdMap {
  background: linear-gradient(180deg, #e1ebf7, #f7e2df);
}
html.ad1 body:not(.t2) #xv .lb-page .lb-bdTop .st {
  font-weight: 700;
  font-size: 0.8125rem;
}
/* المؤقت: كبسولة غامقة برقم ذهبي */
html.ad1 body:not(.t2) #xv .lb-page .lb-bdTop .tm {
  min-height: 32px;
  display: inline-flex;
  align-items: center;
  padding-inline: 12px;
  border-radius: var(--r-pill);
  background: #10302a;
  color: #ffd166;
  font-size: 0.94rem;
}
html.ad1[data-theme="dark"] body:not(.t2) #xv .lb-page .lb-bdTop .tm {
  background: #ffd166;
  color: #10302a;
}
html.ad1 body:not(.t2) #xv .lb-page .lb-say {
  border-radius: var(--r-3xl);
  border-end-start-radius: 6px;
  padding: 14px 16px;
  font-family: var(--lb-fd);
  font-weight: 700;
  font-size: 1.0625rem;
  line-height: 1.7;
}
html.ad1 body:not(.t2) #xv .lb-page .lb-say small {
  font-family: var(--lb-f);
  font-size: 0.8125rem;
}
/* خيارات المحطة: بيضاء بحافة، والصح بحافة خضراء */
html.ad1 body:not(.t2) #xv .lb-page .lb-op {
  gap: 10px;
}
html.ad1 body:not(.t2) #xv .lb-page .lb-op button {
  min-height: 56px;
  border-radius: var(--r-2xl);
  padding: 12px 16px;
  font-weight: 700;
  font-size: 0.94rem;
  box-shadow: var(--edge) var(--card-edge);
}
html.ad1 body:not(.t2) #xv .lb-page .lb-op button.ok {
  border-width: 2px;
  box-shadow: 0 3px 0 var(--lb-ok);
}
html.ad1 body:not(.t2) #xv .lb-page .lb-op button.no {
  border-width: 2px;
  box-shadow: none;
}
html.ad1 body:not(.t2) #xv .lb-page .lb-fin h4 {
  font-weight: 700;
  font-size: 1.375rem;
}
html.ad1 body:not(.t2) #xv .lb-page .lb-sts div {
  background: var(--ad-bg);
  border-radius: var(--r-xl);
}

/* ---------- السلسلة الغذائية #eco ---------- */
html.ad1 body:not(.t2) #xv .lb-page .lb-wbHud span {
  min-height: 30px;
  padding-inline: 12px;
  font-size: 0.8125rem;
}
/* الأحداث: كبسولات بحافة، والمختار أخضر غامق */
html.ad1 body:not(.t2) #xv .lb-page .lb-acts button {
  min-height: 46px;
  padding: 8px 16px;
  border-radius: var(--r-pill);
  font-size: 0.875rem;
  margin-bottom: 3px;
  box-shadow: 0 3px 0 var(--lb-line);
}
html.ad1 body:not(.t2) #xv .lb-page .lb-acts button.on {
  box-shadow: 0 3px 0 var(--green-edge);
}
/* بطاقة التوقّع: ذهبي فاتح بإطار */
html.ad1 body:not(.t2) #xv .lb-page .lb-pred {
  border-radius: var(--r-3xl);
  padding: 14px;
  border: 1.5px solid var(--ad-lb-tip-b);
}
html.ad1 body:not(.t2) #xv .lb-page .lb-pred b {
  font-weight: 700;
}
html.ad1 body:not(.t2) #xv .lb-page .lb-pred .ch button {
  border-radius: var(--r-pill);
  border-color: var(--lb-gold);
  padding-inline: 16px;
  font-weight: 700;
}
html.ad1 body:not(.t2) #xv .lb-page .lb-pred .ch button[aria-pressed="true"] {
  background: var(--lb-gold-s);
  border-width: 2px;
}
html.ad1 body:not(.t2) #xv .lb-page .lb-note {
  font-size: 0.875rem;
  line-height: 1.85;
}
/* ===== AD-C end ===== */

/* ===== AD-D start: حسابي (#avatar)، مختبر كائنك (#shop)، تقدّمي (#me)، دوري الأسبوع (#dawri)، مجموعة الصف (#chat) ===== */
/* القاعدة: نلبّس البطاقات والأزرار حول الكائن بس — رسم الكائن (organism.js) ما نلمسه. */

/* ---------- حسابي (#xv .pf) ---------- */
/* «بطاقتي» و⚙️: كبسولات ٤٨ بحافة خفيفة */
html.ad1 body:not(.t2) #xv .pf .pfIdBtn,
html.ad1 body:not(.t2) #xv .pf .pfGear {
  min-height: 48px;
  border-radius: var(--r-pill);
  border: 1.5px solid var(--ad-line);
  background: var(--ad-card);
  color: var(--ad-ink);
  font: 700 0.94rem "IBM Plex Sans Arabic", sans-serif;
  padding-inline: 18px;
  box-shadow: 0 3px 0 var(--ad-line);
}
html.ad1 body:not(.t2) #xv .pf .pfGear {
  width: 48px;
  padding: 0;
}
html.ad1 body:not(.t2) #xv .pf .pfTop {
  justify-content: flex-start;
}
/* بطاقة الكائن: حواف ٢٨ وحافة غامقة بدل الظل الضبابي (الرسم نفسه ما تغيّر) */
html.ad1 body:not(.t2) #xv .pf .pfOc {
  border-radius: var(--r-5xl);
  box-shadow: var(--edge-lg) #030c0f;
  margin-bottom: 6px;
}
html.ad1 body:not(.t2) #xv .pf .pfNm {
  font-family: Alexandria, "IBM Plex Sans Arabic", sans-serif;
  font-weight: 700;
}
/* شارك / وش يعني / سمّه: ثلاث كبسولات ٤٨ في صف واحد */
html.ad1 body:not(.t2) #xv .pf .pfOcb {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr;
  gap: 8px;
}
html.ad1 body:not(.t2) #xv .pf .pfOcb .pfBtn {
  min-height: 48px;
  border-radius: var(--r-pill);
  border: 1.5px solid var(--ad-line);
  background: var(--ad-card);
  color: var(--ad-ink);
  font-size: 0.875rem;
  padding-inline: 8px;
  white-space: nowrap;
}
html.ad1 body:not(.t2) #xv .pf .pfOcb .pfBtn[aria-pressed="true"] {
  border-color: var(--c-green);
  background: var(--ad-mint);
}
html.ad1 body:not(.t2) #xv .pf .pfOcb .pfShare {
  border: 0;
  background: #9fd3bf;
  color: #0b3a2d;
  box-shadow: 0 3px 0 #6fb89c;
}
/* كل البطاقات البيضاء: حواف ٢٤ وحافة بارزة بدل الإطار */
html.ad1 body:not(.t2) #xv .pf .pfBox {
  border: 0;
  border-radius: var(--r-4xl);
  padding: 16px;
  background: var(--ad-card);
  box-shadow: var(--edge) var(--card-edge);
  margin-bottom: 4px;
}
html.ad1 body:not(.t2) #xv .pf .pfH {
  font: 700 1.0625rem Alexandria, "IBM Plex Sans Arabic", sans-serif;
}
html.ad1 body:not(.t2) #xv .pf .pfTr b {
  font-size: 0.94rem;
}
/* شريط «باقي … نقطة»: أثخن بتدرّج التطبيق */
html.ad1 body:not(.t2) #xv .pf .pfBar {
  height: 12px;
  background: var(--ad-mint);
}
html.ad1 body:not(.t2) #xv .pf .pfBar i {
  background: linear-gradient(90deg, #1fb5a8, #9fd3bf);
}
/* «لبّس كائنك» صار زر نعناعي عريض مثل التطبيق */
html.ad1 body:not(.t2) #xv .pf .pfLab {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  margin-top: 10px;
  border-radius: var(--r-xl);
  background: var(--ad-mint);
  color: var(--c-green);
  font-size: 0.94rem;
}
html.ad1[data-theme="dark"] body:not(.t2) #xv .pf .pfLab {
  color: #9fd3bf;
}
/* بيئتي */
html.ad1 body:not(.t2) #xv .pf .pfHw {
  border-radius: var(--r-3xl);
}
html.ad1 body:not(.t2) #xv .pf .pfHt span {
  min-height: 30px;
  display: inline-flex;
  align-items: center;
  padding-inline: 12px;
  background: rgba(16, 48, 42, 0.55);
  font-size: 0.75rem;
}
html.ad1 body:not(.t2) #xv .pf .pfPips i {
  background: var(--ad-mint);
}
html.ad1 body:not(.t2) #xv .pf .pfHab .pfLnk {
  min-height: 44px;
  padding-inline: 14px;
  border-radius: var(--r-pill);
  border: 1.5px solid var(--ad-line);
  background: var(--ad-card);
}
/* رف إنجازاتي: خانات ٦٤ بحواف ١٦ */
html.ad1 body:not(.t2) #xv .pf .pfSl {
  min-height: 64px;
  border-radius: var(--r-xl);
  background: var(--ad-mint);
  border: 0;
}
html.ad1 body:not(.t2) #xv .pf .pfSl.e {
  border: 2px dashed var(--ad-line);
  background: transparent;
}
/* أقوى فصل / يحتاج مراجعة */
html.ad1 body:not(.t2) #xv .pf .pfSw > div {
  border-radius: var(--r-3xl);
}
/* «تقدّمي بالتفصيل» */
html.ad1 body:not(.t2) #xv .pf a.pfMore {
  min-height: 60px;
  border: 0;
  border-radius: var(--r-3xl);
  padding-inline: 16px;
  background: var(--ad-card);
  box-shadow: var(--edge) var(--card-edge);
  font-size: 1rem;
  margin-bottom: 4px;
}
/* أوراق حسابي (الإعدادات، بطاقتي، شارك): الأزرار كبسولات والصفوف بخلفية الصفحة */
html.ad1 body:not(.t2) .chapter-sheet-panel .pfGo {
  min-height: 54px;
  border-radius: var(--r-pill);
  background: #9fd3bf;
  color: #0b3a2d;
  box-shadow: 0 4px 0 #6fb89c;
  font-size: 1rem;
  margin-bottom: 4px;
}
html.ad1 body:not(.t2) .chapter-sheet-panel .pfRow {
  border-radius: var(--r-xl);
  background: var(--ad-bg);
}
html.ad1 body:not(.t2) .chapter-sheet-panel .pfIdc.idc {
  border-radius: var(--r-4xl);
  box-shadow: var(--edge-lg) var(--green-edge);
  margin-bottom: 10px;
}
html.ad1 body:not(.t2) .chapter-sheet-panel .pfCodeT,
html.ad1 body:not(.t2) .chapter-sheet-panel .pfSeg .pfPick {
  min-height: 44px;
  border-radius: var(--r-pill);
}
html.ad1 body:not(.t2) .chapter-sheet-panel .pfStory9 {
  border-radius: var(--r-2xl);
  box-shadow: 0 5px 0 #02090c;
}

/* ---------- مختبر كائنك (#xv .sx) ---------- */
html.ad1 body:not(.t2) #xv .sx {
  gap: 16px;
}
/* المسرح: حواف ٢٨ وحافة غامقة */
html.ad1 body:not(.t2) #xv .sx-stage {
  height: 230px;
  border-radius: var(--r-5xl);
  box-shadow: var(--edge-lg) #02090c;
  margin-bottom: 6px;
}
html.ad1 body:not(.t2) #xv .sx-pts {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 32px;
  padding-inline: 12px;
  font-size: 0.875rem;
}
/* الأقسام: كبسولات ٤٤، والمختار أخضر بحافة */
html.ad1 body:not(.t2) #xv .sx-cats {
  padding-bottom: 6px;
}
html.ad1 body:not(.t2) #xv .sx-cats button {
  min-height: 44px;
  padding-inline: 16px;
  border: 1.5px solid var(--ad-line);
  background: var(--ad-card);
  font-size: 0.875rem;
}
html.ad1 body:not(.t2) #xv .sx-cats button[aria-selected="true"] {
  border-color: transparent;
  background: var(--c-green);
  color: #fff;
  box-shadow: 0 3px 0 var(--green-edge);
}
html.ad1[data-theme="dark"] body:not(.t2) #xv .sx-cats button[aria-selected="true"] {
  background: #1f7a55;
  color: #fff;
  box-shadow: 0 3px 0 #06201a;
}
html.ad1 body:not(.t2) #xv .sx-lead {
  font-size: 0.875rem;
}
/* العناصر: بطاقات ٢٢ بحافة؛ المختار حدّه وحافته أخضر (كان ذهبي) */
html.ad1 body:not(.t2) #xv .sx-grid {
  gap: 12px;
  padding-bottom: 4px;
}
html.ad1 body:not(.t2) #xv .sx-it {
  border-radius: var(--r-3xl);
  padding: 14px 10px 12px;
  gap: 5px;
  border: 1.5px solid var(--ad-line);
  background: var(--ad-card);
  box-shadow: var(--edge) var(--card-edge);
}
html.ad1 body:not(.t2) #xv .sx-it.on,
html.ad1 body:not(.t2) #xv .sx-it[aria-pressed="true"] {
  border: 2px solid var(--c-green);
  box-shadow: var(--edge) var(--c-green);
}
html.ad1[data-theme="dark"] body:not(.t2) #xv .sx-it.on,
html.ad1[data-theme="dark"] body:not(.t2) #xv .sx-it[aria-pressed="true"] {
  border-color: #63c79e;
  box-shadow: var(--edge) #2f7a5c;
}
html.ad1 body:not(.t2) #xv .sx-it i {
  font-size: 36px;
  height: 54px;
}
html.ad1 body:not(.t2) #xv .sx-it b {
  font-size: 0.94rem;
  font-weight: 700;
}
html.ad1 body:not(.t2) #xv .sx-it small {
  font-size: 0.75rem;
  line-height: 1.6;
}
html.ad1 body:not(.t2) #xv .sx-pr {
  min-height: 24px;
  display: inline-flex;
  align-items: center;
  padding-inline: 12px;
  background: #fff1cc;
  color: #7a5600;
  font-size: 0.75rem;
}
html.ad1[data-theme="dark"] body:not(.t2) #xv .sx-pr {
  background: #3a3016;
  color: #e8bc52;
}
html.ad1 body:not(.t2) #xv .sx-tag,
html.ad1 body:not(.t2) #xv .sx-lim {
  min-height: 22px;
  display: inline-flex;
  align-items: center;
  padding-inline: 9px;
  font-size: 0.69rem;
}
/* زر الشراء: كبسولة ذهبية ٥٦ بحافة؛ لو النقاط ما تكفي رمادي بدون حافة */
html.ad1 body:not(.t2) #xv .sx-buy {
  min-height: 56px;
  border-radius: var(--r-pill);
  background: #ffd166;
  color: #0b3a2d;
  box-shadow: 0 5px 0 var(--gold-edge);
  font-weight: 700;
  font-size: 1rem;
  margin-bottom: 5px;
}
html.ad1 body:not(.t2) #xv .sx-buy:disabled {
  background: var(--ad-mint);
  color: var(--ad-muted);
  box-shadow: none;
}
html.ad1 body:not(.t2) #xv .sx-buy.sx-go {
  background: var(--c-green);
  color: #fff;
  box-shadow: 0 5px 0 var(--green-edge);
}
/* القوى والبيضة والعرض النادر */
html.ad1 body:not(.t2) #xv .sx-have span {
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--r-xl);
  background: var(--ad-card);
}
html.ad1 body:not(.t2) #xv .sx-pwi,
html.ad1 body:not(.t2) #xv .sx-egg {
  border: 0;
  border-radius: var(--r-3xl);
  background: var(--ad-card);
  box-shadow: var(--edge) var(--card-edge);
}
html.ad1 body:not(.t2) #xv .sx-mini {
  min-height: 40px;
  border-radius: var(--r-pill);
  background: #ffd166;
  color: #0b3a2d;
  box-shadow: 0 3px 0 var(--gold-edge);
}
html.ad1 body:not(.t2) #xv .sx-mini:disabled {
  background: var(--ad-mint);
  color: var(--ad-muted);
  box-shadow: none;
}
html.ad1 body:not(.t2) #xv .sx-wk {
  border-radius: var(--r-4xl);
  box-shadow: var(--edge-lg) #1a0a38;
  margin-bottom: 6px;
}
html.ad1 body:not(.t2) #xv .sx-wk .sx-buy {
  background: #ffd166;
}
html.ad1 body:not(.t2) #xv .sx-note {
  font-size: 0.8125rem;
}

/* ---------- تقدّمي (#me): بطاقة الدوري الصغيرة + الطالب الجديد + بعد الدروس ----------
   الصفحة ما لها كلاس خاص، فنحددها بـ#xv اللي فيه .p2me (جديد) أو .profile-hero (بعد الدروس).
   بطاقة الدوري الصغيرة نفسها تطلع في «الألعاب» — ما نلمسها هناك. */
html.ad1 body:not(.t2) #xv:has(> .p2me, > .profile-hero) > .dw-mini {
  border-radius: var(--r-5xl);
  padding: 14px 16px;
  background: linear-gradient(135deg, #1f7a55, #0d4f3c);
  box-shadow: var(--edge-lg) #073426;
  margin-block: 4px 18px;
}
html.ad1 body:not(.t2) #xv:has(> .p2me, > .profile-hero) > .dw-mini .mr {
  width: 62px;
  height: 62px;
  flex-basis: 62px;
}
html.ad1 body:not(.t2) #xv:has(> .p2me, > .profile-hero) > .dw-mini strong {
  font: 700 1.0625rem Alexandria, "IBM Plex Sans Arabic", sans-serif;
}
html.ad1 body:not(.t2) #xv:has(> .p2me, > .profile-hero) > .dw-mini .go {
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  padding-inline: 12px;
  border-radius: var(--r-pill);
  background: rgba(255, 209, 102, 0.18);
  color: #ffd166;
}
html.ad1[data-theme="dark"] body:not(.t2) #xv:has(> .p2me, > .profile-hero) > .dw-mini {
  background: #123d30;
  box-shadow: var(--edge-lg) #06201a;
}
/* الطالب الجديد: «رحلتك تبدأ هنا» أخضر بحافة، وزر ذهبي كبسولة */
html.ad1 body:not(.t2) #xv .p2me {
  gap: 16px;
}
html.ad1 body:not(.t2) #xv .p2me .p2-hero {
  border-radius: var(--r-5xl);
  padding: 22px 18px 20px;
  background: #0d4f3c;
  box-shadow: var(--edge-lg) #073426;
  margin-bottom: 6px;
}
html.ad1[data-theme="dark"] body:not(.t2) #xv .p2me .p2-hero {
  background: #123d30;
  box-shadow: var(--edge-lg) #06201a;
}
html.ad1 body:not(.t2) #xv .p2me .p2-hero b {
  font: 700 1.5rem Alexandria, "IBM Plex Sans Arabic", sans-serif;
}
html.ad1 body:not(.t2) #xv .p2me .p2-hero p {
  color: #cfe6dc;
  opacity: 1;
}
html.ad1 body:not(.t2) #xv .p2me .p2-btn.p2-gold {
  min-height: 52px;
  margin-top: 8px;
  margin-bottom: 4px;
  padding-inline: 26px;
  border-radius: var(--r-pill);
  background: #ffd166;
  color: #0b3a2d;
  box-shadow: var(--edge) var(--gold-edge);
  font-size: 1rem;
}
html.ad1 body:not(.t2) #xv .p2me .p2-card {
  border: 0;
  border-radius: var(--r-4xl);
  padding: 16px;
  background: var(--ad-card);
  box-shadow: var(--edge) var(--card-edge);
  margin-bottom: 4px;
}
html.ad1 body:not(.t2) #xv .p2me .p2-card h3 {
  font-size: 1.0625rem;
  font-weight: 700;
}
html.ad1 body:not(.t2) #xv .p2me .p2-steps li > span {
  inline-size: 44px;
  block-size: 44px;
  border-radius: var(--r-lg);
  background: #e6eef7;
}
html.ad1 body:not(.t2) #xv .p2me .p2-steps li:nth-child(2) > span {
  background: #e6f6ee;
}
html.ad1 body:not(.t2) #xv .p2me .p2-steps li:nth-child(3) > span {
  background: var(--ad-mint);
}
html.ad1[data-theme="dark"] body:not(.t2) #xv .p2me .p2-steps li > span {
  background: var(--ad-mint);
}
html.ad1 body:not(.t2) #xv .p2me .p2-steps li {
  border-block-start-color: var(--ad-mint);
}
/* «الأرقام والتقويم يطلعون هنا…» صار بطاقة منقّطة مثل التطبيق */
html.ad1 body:not(.t2) #xv .p2me .p2-mut.p2-c {
  background: var(--ad-card);
  border: 1.5px dashed var(--ad-line);
  border-radius: var(--r-3xl);
  padding: 16px;
  line-height: 1.6;
}
/* بعد الدروس: البطل أخضر بحافة، والتبويبات كبسولة، والبطاقات بيضاء بحافة */
html.ad1 body:not(.t2) #xv > .profile-hero {
  border-radius: var(--r-5xl);
  padding: 18px;
  background: #0d4f3c;
  box-shadow: var(--edge-lg) #073426;
  margin-bottom: 18px;
}
html.ad1[data-theme="dark"] body:not(.t2) #xv > .profile-hero {
  background: #123d30;
  box-shadow: var(--edge-lg) #06201a;
}
html.ad1 body:not(.t2) #xv > .profile-hero .profile-mini div {
  border-radius: var(--r-lg);
}
html.ad1 body:not(.t2) #xv > .profile-tabs {
  border-radius: var(--r-pill);
  background: var(--ad-mint);
  padding: 4px;
  border: 0;
  box-shadow: none;
}
html.ad1 body:not(.t2) #xv > .profile-tabs::before {
  border-radius: var(--r-pill);
  background: var(--c-green);
}
html.ad1 body:not(.t2) #xv > .profile-tabs button {
  border-radius: var(--r-pill);
}
html.ad1 body:not(.t2) #xv:has(> .profile-hero) > :is(.profile-card, .card.heatmap-cell, .card.labCard),
html.ad1 body:not(.t2) #xv:has(> .p2me) > .card.labCard {
  border: 0;
  border-radius: var(--r-4xl);
  padding: 16px;
  background: var(--ad-card);
  box-shadow: var(--edge) var(--card-edge);
  margin-bottom: 14px;
}
html.ad1 body:not(.t2) #xv:has(> .profile-hero) > .profile-card h4,
html.ad1 body:not(.t2) #xv:has(> .profile-hero) > .card.heatmap-cell h3 {
  font: 700 1.0625rem Alexandria, "IBM Plex Sans Arabic", sans-serif;
}
html.ad1 body:not(.t2) #xv:has(> .profile-hero) > .profile-actions > * {
  border-radius: var(--r-3xl);
  box-shadow: var(--edge) var(--card-edge);
  min-height: 60px;
}
html.ad1 body:not(.t2) #xv:has(> .profile-hero) > .profile-actions {
  margin-bottom: 14px;
}

/* ---------- دوري الأسبوع (#xv .dw-page) ---------- */
html.ad1 body:not(.t2) #xv .dw-page {
  gap: 16px;
}
html.ad1 body:not(.t2) #xv .dw-page .dw-top h2 {
  font-weight: 700;
  font-size: 1.5rem;
}
/* أسبوعي / الصدارة (والنطاق): شريط نعناعي، والمختار أبيض بحافة صغيرة */
html.ad1 body:not(.t2) #xv .dw-page .dw-seg {
  background: var(--ad-mint);
}
html.ad1 body:not(.t2) #xv .dw-page .dw-seg button {
  min-height: 44px;
  font-size: 0.875rem;
}
html.ad1 body:not(.t2) #xv .dw-page .dw-seg button[aria-pressed="true"] {
  background: var(--ad-card);
  color: var(--ad-ink);
  box-shadow: 0 2px 0 var(--card-edge);
}
/* بطاقة الأسبوع: أخضر مسطّح بحافة بدل التدرّج والظل */
html.ad1 body:not(.t2) #xv .dw-page .dw-wk {
  border-radius: var(--r-5xl);
  padding: 18px;
  gap: 16px;
  background: #0d4f3c;
  box-shadow: var(--edge-lg) #073426;
  margin-bottom: 6px;
}
html.ad1[data-theme="dark"] body:not(.t2) #xv .dw-page .dw-wk {
  background: #123d30;
  box-shadow: var(--edge-lg) #06201a;
}
html.ad1 body:not(.t2) #xv .dw-page .dw-wk h3 {
  font-size: 1.25rem;
  font-weight: 700;
}
html.ad1 body:not(.t2) #xv .dw-page .dw-wk p {
  color: #cfe6dc;
}
html.ad1 body:not(.t2) #xv .dw-page .dw-wk .rk {
  min-height: 30px;
  padding-inline: 12px;
  color: #ffd166;
}
/* البطاقات البيضاء */
html.ad1 body:not(.t2) #xv .dw-page .dw-card {
  border: 0;
  border-radius: var(--r-4xl);
  padding: 16px;
  gap: 12px;
  background: var(--ad-card);
  box-shadow: var(--edge) var(--card-edge);
  margin-bottom: 4px;
}
html.ad1 body:not(.t2) #xv .dw-page .dw-sec b {
  font-weight: 700;
  font-size: 1.0625rem;
}
/* «من وين جت نقاطك»: أيقونة في مربع ٣٤ وشريط أثخن */
html.ad1 body:not(.t2) #xv .dw-page .dw-brk {
  gap: 12px;
}
html.ad1 body:not(.t2) #xv .dw-page .dw-brk > div {
  grid-template-columns: 34px 1fr auto;
  gap: 6px 10px;
  font-size: 0.875rem;
}
html.ad1 body:not(.t2) #xv .dw-page .dw-brk i {
  inline-size: 34px;
  block-size: 34px;
  border-radius: var(--r-md);
  display: grid;
  place-items: center;
  background: var(--ad-mint);
}
html.ad1 body:not(.t2) #xv .dw-page .dw-brk .bar {
  height: 10px;
  background: var(--ad-mint);
}
html.ad1 body:not(.t2) #xv .dw-page .dw-detail {
  border-radius: var(--r-xl);
  background: var(--ad-mint);
}
/* خزانة الكؤوس: إطار ذهبي بحافة بدل الظل الضبابي */
html.ad1 body:not(.t2) #xv .dw-page .dw-cab2 {
  border-radius: var(--r-5xl);
  background: linear-gradient(135deg, #f2c14e, #b07a00);
  box-shadow: var(--edge-lg) #7a5600;
  margin-bottom: 6px;
}
html.ad1 body:not(.t2) #xv .dw-page .dw-cab2 .in {
  border-radius: var(--r-3xl);
}
/* الصدارة: المنصّة أخضر مسطّح، وصفوف ٥٢ */
html.ad1 body:not(.t2) #xv .dw-page .dw-stage {
  border-radius: var(--r-4xl) var(--r-4xl) 0 0;
  background: radial-gradient(90% 70% at 50% 0%, rgba(255, 209, 102, 0.22), transparent 70%), #0d4f3c;
}
html.ad1[data-theme="dark"] body:not(.t2) #xv .dw-page .dw-stage {
  background: radial-gradient(90% 70% at 50% 0%, rgba(255, 209, 102, 0.16), transparent 70%), #123d30;
}
html.ad1 body:not(.t2) #xv .dw-page .dw-lst div {
  min-height: 52px;
  border-radius: var(--r-xl);
  font-size: 0.94rem;
}
/* «باقي … وتتجاوز»: بطاقة ذهبية فاتحة بحد، بدون حافة */
html.ad1 body:not(.t2) #xv .dw-page .dw-card.dw-gap {
  border: 2px solid #ffd166;
  border-radius: var(--r-3xl);
  background: #fff4d6;
  box-shadow: none;
}
html.ad1[data-theme="dark"] body:not(.t2) #xv .dw-page .dw-card.dw-gap {
  border-color: #8a6a1f;
  background: #3a3016;
}
html.ad1 body:not(.t2) #xv .dw-page .dw-race,
html.ad1 body:not(.t2) #xv .dw-page .dw-ann,
html.ad1 body:not(.t2) #xv .dw-page .dw-news,
html.ad1 body:not(.t2) #xv .dw-page .dw-last {
  border-radius: var(--r-3xl);
}
html.ad1 body:not(.t2) .dw .dw-btn {
  border-radius: var(--r-pill);
}

/* ---------- مجموعة الصف (#xv .chatWrap — الطالب؛ لوحة المعلم داخل #pChat ما تتأثر) ---------- */
html.ad1 body:not(.t2) #xv .chatWrap {
  border: 0;
  border-radius: var(--r-4xl);
  background: var(--ad-bg);
  padding: 2px 2px 0;
}
/* رأس المجموعة: أخضر بحافة */
html.ad1 body:not(.t2) #xv .chatHead {
  border-radius: var(--r-3xl);
  padding: 12px 14px;
  margin-bottom: 7px;
  background: #0d4f3c;
  box-shadow: 0 5px 0 var(--green-edge);
}
html.ad1[data-theme="dark"] body:not(.t2) #xv .chatHead {
  background: #123d30;
  box-shadow: 0 5px 0 #06201a;
}
html.ad1 body:not(.t2) #xv .chatHead b {
  font: 700 1.125rem Alexandria, "IBM Plex Sans Arabic", sans-serif;
}
html.ad1 body:not(.t2) #xv .chatHead span {
  color: #cfe6dc;
}
/* «رجوع» أبيض: القاعدة القديمة تخلّي خلفيته شفافة بـ !important فنلوّنه بظل داخلي */
html.ad1 body:not(.t2) #xv .chatHead .chat-back {
  min-height: 44px;
  border-radius: var(--r-lg);
  border-color: transparent;
  color: #10302a;
  box-shadow: inset 0 0 0 999px #fff;
}
/* الليلي: لون الكتابة تفرضه قاعدة قديمة فاتح، فنخلي الزر شفاف فاتح بدل الأبيض */
html.ad1[data-theme="dark"] body:not(.t2) #xv .chatHead .chat-back {
  box-shadow: inset 0 0 0 999px rgba(255, 255, 255, 0.14);
}
/* المثبّت: إعلان ذهبي بحد */
html.ad1 body:not(.t2) #xv .chat-pins {
  margin: 4px 10px 0;
  border: 1.5px solid #ffd166;
  border-radius: var(--r-3xl);
  background: #fff4d6;
  max-height: 96px;
}
html.ad1[data-theme="dark"] body:not(.t2) #xv .chat-pins {
  border-color: #8a6a1f;
  background: #3a3016;
}
html.ad1 body:not(.t2) #xv .chat-pins div {
  padding: 10px 14px;
  line-height: 1.7;
}
html.ad1[data-theme="dark"] body:not(.t2) #xv .chat-pins div {
  color: #f3dfa8;
}
/* الخلفية المنقّطة */
html.ad1 body:not(.t2) #xv .chatBox {
  gap: 10px;
  background: var(--ad-bg) radial-gradient(#d5e0d9 1.2px, transparent 1.2px) 0 0/22px 22px;
}
html.ad1[data-theme="dark"] body:not(.t2) #xv .chatBox {
  background: var(--ad-bg) radial-gradient(#22312b 1.2px, transparent 1.2px) 0 0/22px 22px;
}
html.ad1 body:not(.t2) #xv .chat-day span {
  border-radius: var(--r-pill);
  padding: 4px 12px;
  background: var(--ad-card);
  color: var(--ad-muted);
}
/* الفقاعات: الزملاء أبيض، المعلم بحد أخضر، رسائلي أخضر غامق */
html.ad1 body:not(.t2) #xv .chat-msg {
  border: 0;
  border-radius: var(--r-3xl);
  border-end-start-radius: 6px;
  padding: 9px 13px;
  background: var(--ad-card);
  box-shadow: none;
  font-size: 0.94rem;
}
html.ad1 body:not(.t2) #xv .chat-msg.tch:not(.mine) {
  border: 2px solid var(--c-green);
}
html.ad1[data-theme="dark"] body:not(.t2) #xv .chat-msg.tch:not(.mine) {
  border-color: #46b088;
}
/* رسائلي: نغيّر --accent داخلها لأن أزرار «رد/حذف» تقرأه بـ !important (أخضر على أخضر ما ينقرا) */
html.ad1 body:not(.t2) #xv .chat-msg.mine {
  --accent: #ffd166;
  border-radius: var(--r-3xl);
  border-end-end-radius: 6px;
  background: #0d4f3c;
  color: #fff;
}
html.ad1[data-theme="dark"] body:not(.t2) #xv .chat-msg.mine {
  background: #1f7a55;
}
html.ad1 body:not(.t2) #xv .chat-msg.mine .chat-meta,
html.ad1 body:not(.t2) #xv .chat-msg.mine .chat-quote {
  color: #cfe6dc;
}
html.ad1 body:not(.t2) #xv .chat-msg.mine .chat-quote {
  background: rgba(255, 255, 255, 0.1);
}
html.ad1 body:not(.t2) #xv .chat-msg.mine .chat-text a {
  color: #ffd166;
}
/* الكتابة: حقل كبسولة وزر إرسال دائري أخضر بسهم ذهبي */
html.ad1 body:not(.t2) #xv .chat-compose {
  padding: 10px 12px 12px;
  background: var(--ad-card);
  border-top-color: var(--ad-line);
}
html.ad1 body:not(.t2) #xv .chat-compose textarea {
  --r-lg: 24px;
  border: 1.5px solid var(--ad-line);
  background: var(--ad-bg);
}
html.ad1 body:not(.t2) #xv #cSend {
  width: 48px;
  height: 48px;
  background: var(--c-green);
  color: #ffd166;
}
html.ad1[data-theme="dark"] body:not(.t2) #xv #cSend {
  background: #1f7a55;
}
/* ===== AD-D end ===== */

/* ===== AD-E start: تحصيلي (ثالث ثانوي) + اسأل معلمك، أبو العلم، دفتري، المساعدة، عن المنصة، الإشعارات، البحث، القائمة، خطة اليوم، الحالات، شاشة الدخول ===== */

/* ---------- تحصيلي: الرئيسية (body.t3) — بهوية التطبيق النيلية (قرار المعلم ٧ نوفمبر، الألوان في AD-H) ---------- */
/* «خطوتك التالية»: نيلي البطل بحافة أغمق */
html.ad1 body.t3:not(.t2) .t3Nx {
  border-radius: var(--r-5xl);
  box-shadow: var(--edge-lg) var(--t3-hero-edge);
}
/* زر المحاكي نيلي بحافة أغمق، والتدريب الحر أبيض بإطار نيلي */
html.ad1 body.t3:not(.t2) .t3Cta {
  border-radius: var(--r-4xl);
  margin-bottom: 6px;
  box-shadow: var(--edge-lg) var(--t3-edge);
}
html.ad1 body.t3:not(.t2) .t3Cta.g {
  box-shadow: var(--edge-lg) var(--t3-soft-edge);
}
/* بطاقات الوحدات: بيضاء بلا حد، بحافة بارزة.
   الزوايا القديمة فيها !important (r-2xl) وقريبة من ٢٤، فنتركها. */
html.ad1 body.t3:not(.t2) .t3U {
  gap: 14px;
}
html.ad1 body.t3:not(.t2) .t3U > button,
html.ad1 body.t3:not(.t2) .t3GlB,
html.ad1 body.t3:not(.t2) .t3Ch a {
  border-color: transparent;
  box-shadow: var(--edge) var(--card-edge);
}
html.ad1 body.t3:not(.t2) .t3U > button em {
  border-radius: var(--r-pill);
  box-shadow: 0 3px 0 var(--t3-edge);
}
html.ad1 body.t3:not(.t2) .t3Ch a {
  border-radius: var(--r-pill);
}
/* درجتك المتوقعة: بطاقة البطل بحافة */
html.ad1 body.t3:not(.t2) #xv .t3Pred {
  border-radius: var(--r-3xl);
  box-shadow: var(--edge) var(--t3-hero-edge);
}

/* نافذة اختيار المستوى والعدد (tUnit / tCount): خيارات كبسولية بحافة، والمختار نيلي بحافته */
html.ad1 body.t3:not(.t2) .tourO .challenge-options button {
  border-radius: var(--r-pill);
  box-shadow: 0 3px 0 var(--card-edge);
}
html.ad1 body.t3:not(.t2) .tourO .challenge-options button.on {
  box-shadow: 0 3px 0 var(--t3-edge);
}
html.ad1 body.t3:not(.t2) .tourO .tahsili-unit-go {
  min-height: 56px;
  border-radius: var(--r-pill);
  box-shadow: var(--edge) var(--t3-edge);
}
html.ad1 body.t3:not(.t2) .tourO .ghost {
  border-radius: var(--r-pill);
}

/* ---------- تحصيلي: الاختبار المحاكي (#tmock) ----------
   ألوان الورقة (--sh-*) صارت نيلية في AD-H؛ هنا الأشكال والحواف. */
html.ad1 body.t3:not(.t2) .mock-exam-intro .mock-exam-rules div {
  border-radius: var(--r-3xl);
  border-color: transparent;
  box-shadow: var(--edge) var(--card-edge);
}
html.ad1 body.t3:not(.t2) .mock-exam-intro #tmGo {
  min-height: 56px;
  border-radius: var(--r-pill);
  box-shadow: var(--edge) var(--t3-edge);
}
html.ad1 body.t3:not(.t2) .mock-exam {
  padding-bottom: 8px;
}
html.ad1 body.t3:not(.t2) .mock-exam-head {
  border-radius: 0 0 var(--r-4xl) var(--r-4xl);
}
html.ad1 body.t3:not(.t2) .mock-exam .mock-exam-clock {
  border-radius: var(--r-pill);
}
html.ad1 body.t3:not(.t2) .mock-exam-sheet,
html.ad1 body.t3:not(.t2) .mock-exam-side {
  border-radius: var(--r-4xl);
  border-color: transparent;
  box-shadow: var(--edge) var(--sh-line);
}
html.ad1 body.t3:not(.t2) .mock-exam-number b {
  border-radius: var(--r-md);
}
html.ad1 body.t3:not(.t2) .mock-exam-flag {
  border-radius: var(--r-pill);
}
/* الخيارات: كل خيار بطاقة لحاله بحد وحافة بلون خط الورق.
   الحد القديم var(--line) !important، فنغيّر قيمة --line داخل الخيار بدل ما نزيد !important. */
html.ad1 body.t3:not(.t2) .mock-exam .lesson-quiz-option {
  --line: var(--sh-line);
  min-height: 56px;
  margin-bottom: 10px; /* الحاوية display:block !important، فالمسافة بالهامش */
  border-radius: var(--r-2xl);
  box-shadow: 0 3px 0 var(--sh-line);
}
/* المختار: حد وحافة نيلية، والتعبئة الهادية بظل داخلي (الخلفية القديمة !important) */
html.ad1 body.t3:not(.t2) .mock-exam .lesson-quiz-option.sel {
  --line: var(--t3-sel);
  box-shadow: 0 3px 0 var(--t3-sel), inset 0 0 0 999px var(--t3-soft);
}
/* أزرار التنقل والتسليم: كبسولات ٥٢ بحافة */
html.ad1 body.t3:not(.t2) .mock-exam-nav-btn {
  min-height: 52px;
  border-radius: var(--r-pill);
  box-shadow: 0 4px 0 var(--sh-line);
}
html.ad1 body.t3:not(.t2) .mock-exam-nav-btn.p {
  box-shadow: 0 4px 0 var(--t3-edge);
}
html.ad1 body.t3:not(.t2) .mock-exam-nav-btn.end {
  box-shadow: 0 4px 0 #5a1a13;
}
/* الليلي: الحافة أغمق من السطح (خط الورق الليلي أفتح منه) */
html.ad1[data-theme="dark"] body.t3:not(.t2) .mock-exam-sheet,
html.ad1[data-theme="dark"] body.t3:not(.t2) .mock-exam-side,
html.ad1[data-theme="dark"] body.t3:not(.t2) .mock-exam .lesson-quiz-option:not(.sel),
html.ad1[data-theme="dark"] body.t3:not(.t2) .mock-exam-nav-btn:not(.p):not(.end) {
  box-shadow: 0 4px 0 var(--card-edge);
}
html.ad1 body.t3:not(.t2) .mock-exam-nav-btn:disabled {
  box-shadow: none;
}

/* ---------- تحصيلي: النتيجة والمراجعة وتقريري (نتائجي) ----------
   بطاقة #xv .card ظلها none !important، فالحافة بـ filter: drop-shadow. */
html.ad1 body.t3:not(.t2) #xv .mock-exam-result,
html.ad1 body.t3:not(.t2) #xv .t3R {
  filter: drop-shadow(var(--edge) var(--card-edge));
}
html.ad1 body.t3:not(.t2) #xv .mock-exam-result .row > button {
  border-radius: var(--r-pill);
}
html.ad1 body.t3:not(.t2) #xv .mock-exam-result #tmRev {
  box-shadow: 0 4px 0 var(--t3-edge);
}
html.ad1 body.t3:not(.t2) #xv .mock-exam-review-q.g {
  filter: drop-shadow(var(--edge) #b9dfcb);
}
html.ad1 body.t3:not(.t2) #xv .mock-exam-review-q.b {
  filter: drop-shadow(var(--edge) #efc9c3);
}
html.ad1[data-theme="dark"] body.t3:not(.t2) #xv .mock-exam-review-q {
  filter: drop-shadow(var(--edge) var(--card-edge));
}
html.ad1 body.t3:not(.t2) #xv .t3K div,
html.ad1 body.t3:not(.t2) #xv .t3BA > div {
  border-radius: var(--r-3xl);
  border-color: transparent;
  background: var(--ad-mint);
}
html.ad1 body.t3:not(.t2) #xv .t3Rec button {
  border-color: var(--ad-line);
  box-shadow: 0 3px 0 var(--card-edge);
}
html.ad1 body.t3:not(.t2) #xv .t3T .small {
  border-radius: var(--r-pill);
}

/* ---------- اسأل معلمك + أبو العلم + دفتري (pages2: .p2ask / .p2as / .p2nb) ----------
   محصورة بالصفحات الثلاث: «تقدّمي» للجديد (.p2me) وبطاقات اليوم (cards) لفريق ثاني. */
html.ad1 body:not(.t2) #xv .p2:is(.p2ask, .p2as, .p2nb) .p2-card {
  border-color: transparent;
  border-radius: var(--r-4xl);
  padding: 16px;
  box-shadow: var(--edge) var(--card-edge);
}
/* صورة المعلم: ذهبي بحافة */
html.ad1 body:not(.t2) #xv .p2-tav {
  inline-size: 56px;
  block-size: 56px;
  box-shadow: 0 3px 0 var(--gold-edge);
}
html.ad1 body:not(.t2) #xv .p2-who b {
  font-size: 1.125rem;
}
/* الفقاعات: رد المعلم/المساعد أبيض بحافة، وسؤال الطالب أخضر */
html.ad1 body:not(.t2) #xv .p2-bub {
  border-radius: var(--r-3xl);
  padding: 12px 16px;
}
html.ad1 body:not(.t2) #xv .p2-bub.p2-th {
  border-color: transparent;
  border-end-end-radius: 6px;
  box-shadow: 0 3px 0 var(--card-edge);
}
html.ad1 body:not(.t2) #xv .p2-bub.p2-me {
  border-end-start-radius: 6px;
}
/* أبو العلم: بطاقة البطل بحافة */
html.ad1 body:not(.t2) #xv .p2-owl {
  border-radius: var(--r-5xl);
  padding: 18px;
  box-shadow: var(--edge-lg) var(--green-edge);
}
html.ad1[data-theme="dark"] body:not(.t2) #xv .p2-owl {
  box-shadow: var(--edge-lg) #05140f;
}
/* الاقتراحات: كبسولات ٤٤ بحافة */
html.ad1 body:not(.t2) #xv .p2:is(.p2ask, .p2as, .p2nb) .p2-chip {
  min-block-size: 44px;
  border-width: 1.5px;
  border-color: var(--ad-line);
  padding-inline: 16px;
  box-shadow: 0 3px 0 var(--ad-line);
}
html.ad1 body:not(.t2) #xv .p2:is(.p2ask, .p2as, .p2nb) .p2-chip.p2-sm {
  min-block-size: 36px;
  padding-inline: 10px;
  box-shadow: 0 2px 0 var(--ad-line);
}
html.ad1 body:not(.t2) #xv .p2:is(.p2ask, .p2as, .p2nb) .p2-chip.p2-fw {
  border-color: transparent;
  box-shadow: 0 2px 0 #c9dcd1;
}
html.ad1[data-theme="dark"] body:not(.t2) #xv .p2:is(.p2ask, .p2as, .p2nb) .p2-chip.p2-fw {
  box-shadow: 0 2px 0 var(--card-edge);
}
/* الأزرار: كبسولات بحافة خضراء */
html.ad1 body:not(.t2) #xv .p2:is(.p2ask, .p2as, .p2nb) .p2-btn {
  min-block-size: 52px;
  border-radius: var(--r-pill);
  padding-inline: 20px;
  box-shadow: 0 4px 0 var(--green-edge);
}
/* دفتري: زرّين جنب بعض — حشوة أقل عشان النص يبقى سطر واحد */
html.ad1 body:not(.t2) #xv .p2:is(.p2ask, .p2as, .p2nb) .p2-row2 .p2-btn {
  padding-inline: 12px;
}
html.ad1 body:not(.t2) #xv .p2:is(.p2ask, .p2as, .p2nb) .p2-btn.p2-soft {
  box-shadow: 0 4px 0 #c9dcd1;
}
html.ad1[data-theme="dark"] body:not(.t2) #xv .p2:is(.p2ask, .p2as, .p2nb) .p2-btn.p2-soft {
  box-shadow: 0 4px 0 var(--card-edge);
}
html.ad1 body:not(.t2) #xv .p2:is(.p2ask, .p2as, .p2nb) .p2-btn:disabled {
  box-shadow: none;
}
/* خانة الكتابة */
html.ad1 body:not(.t2) #xv .p2:is(.p2ask, .p2as, .p2nb) .p2-in {
  min-block-size: 52px;
  border-radius: var(--r-xl);
  border-width: 1.5px;
  border-color: var(--ad-line);
}
html.ad1 body:not(.t2) #xv .p2:is(.p2ask, .p2as, .p2nb) .p2-send {
  align-items: stretch;
}
/* دفتري: الورقة بحافة، والتبويب بلون الفصل نفسه */
html.ad1 body:not(.t2) #xv .p2-paper {
  border-color: transparent;
  border-block-start-color: var(--p2c);
  border-radius: 0 0 var(--r-4xl) var(--r-4xl);
  box-shadow: var(--edge) var(--card-edge);
}
html.ad1 body:not(.t2) #xv .p2-tabs button {
  border-radius: var(--r-xl) var(--r-xl) 0 0;
}
html.ad1 body:not(.t2) #xv .p2-tm {
  min-block-size: 34px;
}
html.ad1 body:not(.t2) #xv .p2nb .p2-empty > i {
  font-size: 52px;
}

/* ---------- المساعدة (#help) وعن المنصة (#about) ----------
   كل بطاقة #xv .card ظلها none !important وزواياها ٢٠ !important، فالحافة بـ filter. محصورة بالصفحتين بـ :has. */
html.ad1 body:not(.t2) #xv:has(#hTour) > .card,
html.ad1 body:not(.t2) #xv:has(> .aboutHero) > .card:not(.aboutHero) {
  --line: transparent;
  filter: drop-shadow(var(--edge) var(--card-edge));
}
/* الأسئلة الشائعة: خط فاصل بين الأسئلة (كان من --line) */
html.ad1 body:not(.t2) #xv:has(#hTour) > .card details {
  border-color: var(--ad-line);
}
html.ad1 body:not(.t2) #xv .helpC {
  padding: 16px;
}
html.ad1 body:not(.t2) #xv .helpC > i {
  width: 48px;
  height: 48px;
  border-radius: var(--r-xl);
  background: var(--ad-mint);
}
html.ad1 body:not(.t2) #xv .helpC h2 {
  font-size: 1.125rem;
}
html.ad1 body:not(.t2) #xv #hTour {
  min-height: 52px;
  border-radius: var(--r-pill);
  box-shadow: 0 4px 0 var(--green-edge);
}
html.ad1 body:not(.t2) #xv > .aboutHero {
  --line: transparent;
  border-radius: var(--r-5xl);
  padding-block: 26px 22px;
  filter: drop-shadow(var(--edge-lg) #062a20);
}
html.ad1 body:not(.t2) #xv > .aboutHero h1 {
  font-family: Alexandria, "IBM Plex Sans Arabic", sans-serif;
  font-weight: 700;
  font-size: 1.875rem;
}
/* أرقام المنصة: بطاقتين بيضاء، الدروس بأزرق الفصل ٢ والأسئلة ببرتقالي الفصل ١ (مثل التطبيق) */
html.ad1 body:not(.t2) #xv #abK {
  gap: 12px;
}
html.ad1 body:not(.t2) #xv #abK > div {
  border-color: transparent;
  border-radius: var(--r-3xl);
  background: var(--ad-card);
  box-shadow: var(--edge) var(--card-edge);
}
html.ad1 body:not(.t2) #xv #abK > div b {
  font-family: Alexandria, "IBM Plex Sans Arabic", sans-serif;
  color: var(--ch-2);
}
html.ad1 body:not(.t2) #xv #abK > div:nth-child(2) b {
  color: var(--ch-1);
}
html.ad1[data-theme="dark"] body:not(.t2) #xv #abK > div b {
  color: #8ec3f5;
}
html.ad1[data-theme="dark"] body:not(.t2) #xv #abK > div:nth-child(2) b {
  color: #ffb48a;
}
html.ad1 body:not(.t2) #xv:has(> .aboutHero) .btnlink {
  min-height: 52px;
  border-radius: var(--r-pill);
  box-shadow: 0 4px 0 var(--green-edge);
}

/* ---------- لوحة الإشعارات (الجرس) ---------- */
html.ad1 body:not(.t2) .lvO:has(> .live-panel) {
  background: rgba(4, 25, 20, 0.45);
}
html.ad1 body:not(.t2) .lvO > .live-panel {
  background: var(--ad-bg);
  color: var(--ad-ink);
  border-radius: var(--r-5xl) var(--r-5xl) 0 0;
  padding-inline: 20px;
}
html.ad1 body:not(.t2) .lvO > .live-panel h3 {
  font-family: Alexandria, "IBM Plex Sans Arabic", sans-serif;
  font-size: 1.375rem;
}
html.ad1 body:not(.t2) .lvO > .live-panel h3 button {
  min-width: 44px;
  min-height: 44px;
  border-radius: var(--r-pill);
}
html.ad1 body:not(.t2) .lvO > .live-panel [data-perm] {
  min-height: 50px;
  border-radius: var(--r-pill);
  box-shadow: 0 4px 0 var(--green-edge);
}
html.ad1 body:not(.t2) .live-panel .live-note {
  border-color: transparent;
  border-radius: var(--r-3xl);
  background: var(--ad-card);
  box-shadow: var(--edge) var(--card-edge);
}
/* الجديد: تعبئة ذهبية هادية بحافة ذهبية */
html.ad1 body:not(.t2) .live-panel .live-note.new {
  background: #fff8e3;
  box-shadow: var(--edge) #ebd08a;
}
html.ad1[data-theme="dark"] body:not(.t2) .live-panel .live-note.new {
  background: #2e2814;
  box-shadow: var(--edge) #0a0803;
}
@media (min-width: 700px) {
  html.ad1 body:not(.t2) .lvO > .live-panel {
    border-radius: var(--r-5xl);
  }
}

/* ---------- قائمة الحساب (من صورة الطالب) ---------- */
html.ad1 body:not(.t2) .hdM {
  border-color: transparent;
  border-radius: var(--r-4xl);
  box-shadow: var(--edge) var(--card-edge), 0 16px 40px rgba(4, 25, 20, 0.18);
}
html.ad1 body:not(.t2) .hdM button {
  min-height: 48px;
  border-radius: var(--r-lg);
}

/* ---------- البحث (الجوال، body.srOpen) ---------- */
@media (max-width: 1099px) {
  html.ad1 body.srOpen:not(.t2) #srchBox #srchIn {
    height: 54px;
    border-radius: var(--r-2xl);
    border: 2px solid var(--c-green);
    box-shadow: 0 0 0 4px var(--ad-mint);
  }
  html.ad1[data-theme="dark"] body.srOpen:not(.t2) #srchBox #srchIn {
    border-color: #46b088;
  }
  /* كل نتيجة بطاقة بيضاء بحافة */
  /* :not([hidden]) — الصفحة تخفي النتائج بالخاصية hidden، فما نغلبها بـ display */
  html.ad1 body.srOpen:not(.t2) #srchBox #srchRes:not([hidden]) {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding-block: 4px 12px;
  }
  html.ad1 body.srOpen:not(.t2) #srchRes button {
    border: 0;
    border-radius: var(--r-3xl);
    background: var(--ad-card);
    padding: 12px 14px;
    box-shadow: var(--edge) var(--card-edge);
  }
}

/* ---------- خطة اليوم (#planCard، assets/plan.js) ---------- */
html.ad1 body:not(.t2) #planCard {
  border-color: transparent;
  border-radius: var(--r-4xl);
  box-shadow: var(--edge) var(--card-edge);
}
html.ad1 body:not(.t2) #planCard .planI {
  border-color: var(--ad-line);
  border-width: 1.5px;
  border-radius: var(--r-2xl);
  box-shadow: 0 3px 0 var(--ad-line);
}
html.ad1 body:not(.t2) #planCard .planI.ok {
  box-shadow: none;
}
html.ad1 body:not(.t2) #planCard .planI .st {
  min-height: 36px;
  box-shadow: 0 3px 0 var(--green-edge);
}
html.ad1 body:not(.t2) #planCard .planI.ok .st {
  box-shadow: none;
}

/* ---------- الحالات: شريط بدون نت، هياكل التحميل، الحالة الفاضية ---------- */
/* بدون نت: أخضر التطبيق الغامق بزوايا سفلية وحافة، بدل الأحمر (مو خطأ — تقدّمه محفوظ) */
html.ad1 body:not(.t2) #netBar {
  background: #123d30;
  color: #ffffff;
  border-radius: 0 0 var(--r-3xl) var(--r-3xl);
  font-weight: 500;
  box-shadow: var(--edge) #06201a;
}
/* هياكل التحميل: ألوان التطبيق الهادية */
html.ad1 body:not(.t2) .skel i,
html.ad1 body:not(.t2) .skeleton-line {
  border-radius: var(--r-lg);
  background: linear-gradient(90deg, #e3ebe6 25%, #f2f6f3 50%, #e3ebe6 75%);
  background-size: 200% 100%;
}
html.ad1[data-theme="dark"] body:not(.t2) .skel i,
html.ad1[data-theme="dark"] body:not(.t2) .skeleton-line {
  background: linear-gradient(90deg, #1b2a24 25%, #22342d 50%, #1b2a24 75%);
  background-size: 200% 100%;
}
html.ad1 body:not(.t2) .t3Empty {
  border-color: transparent;
  border-radius: var(--r-4xl);
  box-shadow: var(--edge) var(--card-edge);
}

/* ---------- شاشة الدخول (#gate، قبل الدخول) — لمسات بصرية فقط ---------- */
/* «عندي حساب» و«الدخول برمز حسابي»: حافة خفيفة مثل باقي الأزرار */
html.ad1 #gate.duLoginDesign .duEntryButtons .duAuthAction:not(.duEntryPrimary),
html.ad1 #gate.duLoginDesign .duAuth .duAuthAction:not(.duAuthPrimary) {
  box-shadow: 0 4px 0 #cde1d6;
}
html.ad1 #gate.duLoginDesign .duEntryButtons .duEntryPrimary {
  box-shadow: 0 5px 0 var(--green-edge);
}
/* التسجيل: خيارات الصف والشعبة بطاقات بحافة، والمختار بحافة خضراء */
html.ad1 #gate.lab .login-tiles button {
  box-shadow: 0 4px 0 #cde1d6;
}
html.ad1 #gate.lab .login-tiles button[aria-pressed="true"] {
  box-shadow: 0 4px 0 var(--green-edge);
}
html.ad1 #gate.lab #gName {
  border-radius: var(--r-2xl);
}
html.ad1 #gate.lab .login-bubble {
  box-shadow: 0 3px 0 #cde1d6;
}
html.ad1[data-theme="dark"] #gate.duLoginDesign .duEntryButtons .duAuthAction:not(.duEntryPrimary),
html.ad1[data-theme="dark"] #gate.duLoginDesign .duAuth .duAuthAction:not(.duAuthPrimary),
html.ad1[data-theme="dark"] #gate.lab .login-tiles button,
html.ad1[data-theme="dark"] #gate.lab .login-bubble {
  box-shadow: 0 4px 0 #061611;
}
html.ad1[data-theme="dark"] #gate.lab .login-tiles button[aria-pressed="true"] {
  box-shadow: 0 4px 0 #04100c;
}

/* ===== AD-E end ===== */

/* ===== AD-G start: صفحة الإشعارات #notifs (assets/notifs.js) ===== */
/* نفس إعلانات المعلم اللي في لوحة الجرس، بشكل شاشة التطبيق: عدّاد غير المقروء، «قراءة الكل»، بطاقة التنبيهات، ومجموعات اليوم/الأسبوع/أقدم. */
html.ad1 body:not(.t2) #xv[data-ad="notifs"] .nf {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
  max-width: 640px;
  margin-inline: auto;
  padding-block: 4px 24px;
  color: var(--ad-ink);
}
html.ad1 body:not(.t2) #xv[data-ad="notifs"] .nf-head {
  display: flex;
  align-items: center;
  gap: 8px;
}
html.ad1 body:not(.t2) #xv[data-ad="notifs"] .nf-head h2 {
  margin: 0;
  font-family: Alexandria, "IBM Plex Sans Arabic", sans-serif;
  font-weight: 700;
  font-size: 1.375rem;
  color: var(--ad-ink);
}
/* في الجوال العنوان الكبير موجود فوق (#ih)، فنكتفي بالعدّاد والزر */
html.ad1 body.inner:not(.t2):has(#ih) #xv[data-ad="notifs"] .nf-head h2 {
  position: absolute;
  inline-size: 1px;
  block-size: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
html.ad1 body:not(.t2) #xv[data-ad="notifs"] .nf-count {
  min-width: 24px;
  height: 24px;
  padding-inline: 6px;
  border-radius: var(--r-pill);
  background: #d1495b;
  color: #ffffff;
  font-size: 0.75rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
html.ad1 body:not(.t2) #xv[data-ad="notifs"] .nf-cl {
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--ad-muted);
}
html.ad1 body:not(.t2) #xv[data-ad="notifs"] .nf-read {
  margin-inline-start: auto;
  min-height: 44px;
  padding-inline: 16px;
  border-radius: var(--r-pill);
  border: 1.5px solid #0d4f3c;
  background: var(--ad-card);
  color: #0d4f3c;
  font: inherit;
  font-weight: 700;
  font-size: 0.8125rem;
  box-shadow: none;
  cursor: pointer;
}
html.ad1[data-theme="dark"] body:not(.t2) #xv[data-ad="notifs"] .nf-read {
  border-color: #7fd6a8;
  color: #7fd6a8;
}
html.ad1 body:not(.t2) #xv[data-ad="notifs"] .nf-read:disabled {
  border-color: var(--ad-line);
  background: transparent;
  color: var(--ad-muted);
  cursor: default;
}
/* بطاقة «فعّل تنبيهات الجوال»: أخضر غامق بحافة، والزر ذهبي */
html.ad1 body:not(.t2) #xv[data-ad="notifs"] .nf-push {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-block-start: 4px;
  padding: 14px;
  border-radius: var(--r-3xl);
  background: #0d4f3c;
  color: #ffffff;
  box-shadow: 0 5px 0 var(--green-edge);
}
html.ad1[data-theme="dark"] body:not(.t2) #xv[data-ad="notifs"] .nf-push {
  background: #123d30;
  box-shadow: 0 5px 0 #06201a;
}
html.ad1 body:not(.t2) #xv[data-ad="notifs"] .nf-push-row {
  display: flex;
  align-items: center;
  gap: 12px;
}
html.ad1 body:not(.t2) #xv[data-ad="notifs"] .nf-push-row p {
  flex: 1;
  margin: 0;
  font-size: 0.8125rem;
  line-height: 1.7;
  color: #d7ede3;
}
html.ad1 body:not(.t2) #xv[data-ad="notifs"] .nf-ring {
  flex-shrink: 0;
  transform-origin: 32px 12px;
  animation: nfRing 2.4s ease-in-out infinite;
}
@keyframes nfRing {
  0%, 60%, 100% { transform: rotate(0); }
  10% { transform: rotate(14deg); }
  20% { transform: rotate(-12deg); }
  30% { transform: rotate(8deg); }
  40% { transform: rotate(-4deg); }
}
html.ad1 body:not(.t2) #xv[data-ad="notifs"] .nf-push-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  min-height: 50px;
  border: 0;
  border-radius: var(--r-pill);
  background: #ffd166;
  color: #0b3a2d;
  font: inherit;
  font-weight: 700;
  font-size: 0.9375rem;
  box-shadow: 0 4px 0 var(--gold-edge);
  cursor: pointer;
}
html.ad1 body:not(.t2) #xv[data-ad="notifs"] .nf-push-btn:disabled {
  opacity: 0.7;
}
html.ad1 body:not(.t2) #xv[data-ad="notifs"] .nf-push-on {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 48px;
  margin-block-start: 4px;
  border-radius: var(--r-xl);
  background: #e6f6ee;
  color: #1f7a55;
  font-weight: 700;
  font-size: 0.875rem;
}
html.ad1[data-theme="dark"] body:not(.t2) #xv[data-ad="notifs"] .nf-push-on {
  background: #173126;
  color: #7fd6a8;
}
html.ad1 body:not(.t2) #xv[data-ad="notifs"] .nf-gh {
  margin: 8px 0 0;
  font-family: inherit;
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--ad-muted);
}
html.ad1 body:not(.t2) #xv[data-ad="notifs"] .nf-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
/* المقروء: شفاف بحد خفيف. الجديد: أبيض بحافة ونقطة خضراء */
html.ad1 body:not(.t2) #xv[data-ad="notifs"] .nf-card {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid var(--ad-line);
  border-radius: var(--r-3xl);
  background: transparent;
}
html.ad1 body:not(.t2) #xv[data-ad="notifs"] .nf-card.new {
  border-color: transparent;
  background: var(--ad-card);
  box-shadow: 0 3px 0 var(--card-edge);
}
html.ad1 body:not(.t2) #xv[data-ad="notifs"] .nf-ic {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  border-radius: var(--r-lg);
  display: flex;
  align-items: center;
  justify-content: center;
}
html.ad1 body:not(.t2) #xv[data-ad="notifs"] .nf-ann {
  background: #fff4d6;
  color: #8a5a00;
}
html.ad1 body:not(.t2) #xv[data-ad="notifs"] .nf-hw {
  background: #fbeae0;
  color: #a2461a;
}
html.ad1 body:not(.t2) #xv[data-ad="notifs"] .nf-msg {
  background: #e3f5ec;
  color: #1f7a55;
}
html.ad1[data-theme="dark"] body:not(.t2) #xv[data-ad="notifs"] .nf-ann {
  background: #3a2f12;
  color: #ffd98a;
}
html.ad1[data-theme="dark"] body:not(.t2) #xv[data-ad="notifs"] .nf-hw {
  background: #3a2418;
  color: #ffb48a;
}
html.ad1[data-theme="dark"] body:not(.t2) #xv[data-ad="notifs"] .nf-msg {
  background: #173126;
  color: #7fd6a8;
}
html.ad1 body:not(.t2) #xv[data-ad="notifs"] .nf-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
html.ad1 body:not(.t2) #xv[data-ad="notifs"] .nf-t {
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--ad-ink);
}
html.ad1 body:not(.t2) #xv[data-ad="notifs"] .nf-card.new .nf-t {
  font-weight: 700;
}
html.ad1 body:not(.t2) #xv[data-ad="notifs"] .nf-d {
  margin: 0;
  font-size: 0.8125rem;
  line-height: 1.6;
  color: var(--ad-muted);
  overflow-wrap: anywhere;
}
html.ad1 body:not(.t2) #xv[data-ad="notifs"] .nf-d a {
  color: #1f67ae;
}
html.ad1[data-theme="dark"] body:not(.t2) #xv[data-ad="notifs"] .nf-d a {
  color: #8ec3f5;
}
html.ad1 body:not(.t2) #xv[data-ad="notifs"] .nf-time {
  font-size: 0.75rem;
  color: var(--ad-muted);
}
html.ad1 body:not(.t2) #xv[data-ad="notifs"] .nf-dot {
  flex-shrink: 0;
  width: 10px;
  height: 10px;
  margin-block-start: 6px;
  border-radius: var(--r-pill);
  background: #1f9d63;
}
html.ad1 body:not(.t2) #xv[data-ad="notifs"] .nf-body .rxR {
  margin-block-start: 6px;
}
html.ad1 body:not(.t2) #xv[data-ad="notifs"] .sr-only {
  position: absolute;
  inline-size: 1px;
  block-size: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
/* لا إشعارات: الجرس المبتسم من التطبيق */
html.ad1 body:not(.t2) #xv[data-ad="notifs"] .nf-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  margin-block-start: 8px;
  padding: 28px 20px;
  border-radius: var(--r-4xl);
  background: var(--ad-card);
  box-shadow: var(--edge) var(--card-edge);
  text-align: center;
}
html.ad1 body:not(.t2) #xv[data-ad="notifs"] .nf-empty b {
  font-size: 0.9375rem;
}
html.ad1 body:not(.t2) #xv[data-ad="notifs"] .nf-empty p {
  margin: 0;
  font-size: 0.8125rem;
  color: var(--ad-muted);
}
@media (prefers-reduced-motion: reduce) {
  html.ad1 body:not(.t2) #xv[data-ad="notifs"] .nf-ring {
    animation: none;
  }
}
/* ===== AD-G end ===== */

/* ===== AD-F start: صفحة الإعدادات (#settings، assets/settings.js) — موجودة بس مع html.ad1 ===== */
html.ad1 #xv[data-ad="settings"] {
  --st-on: var(--c-green);
  --st-off: #c9d8cf;
  --st-seg: var(--ad-bg);
}
html.ad1[data-theme="dark"] #xv[data-ad="settings"] {
  --st-on: #3fa37d;
  --st-off: #2c3b35;
  --st-seg: #0e1714;
}
html.ad1 #xv[data-ad="settings"] .st {
  display: flex;
  flex-direction: column;
  gap: 14px;
  max-width: 560px;
  margin-inline: auto;
  padding-block-end: 12px;
  color: var(--ad-ink);
}
/* العنوان يطلع في رأس الصفحة (#ih ياخذه من هنا) — نخليه للقارئ الصوتي بس */
html.ad1 #xv[data-ad="settings"] .st-h {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
/* البطاقة البيضاء بحافة */
html.ad1 #xv[data-ad="settings"] .st-card {
  display: flex;
  flex-direction: column;
  border-radius: var(--r-3xl);
  overflow: hidden;
  background: var(--ad-card);
  box-shadow: var(--edge) var(--card-edge);
}
html.ad1 #xv[data-ad="settings"] .st-sec {
  margin: 4px 4px -4px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 700;
  color: var(--ad-muted);
}
/* صف: ٥٢px، فاصل بين الصفوف */
html.ad1 #xv[data-ad="settings"] .st-row {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 52px;
  margin: 0;
  padding: 10px 16px;
  border: 0;
  border-radius: 0;
  border-block-start: 1px solid var(--ad-line);
  background: transparent;
  box-shadow: none;
  color: var(--ad-ink);
  font: inherit;
  font-size: 15px;
  font-weight: 700;
  text-align: start;
  text-decoration: none;
  cursor: pointer;
}
html.ad1 #xv[data-ad="settings"] .st-card > .st-row:first-child {
  border-block-start: 0;
}
html.ad1 #xv[data-ad="settings"] .st-row[hidden] {
  display: none;
}
html.ad1 #xv[data-ad="settings"] .st-row:focus-visible,
html.ad1 #xv[data-ad="settings"] .st-seg button:focus-visible,
html.ad1 #xv[data-ad="settings"] .st-bars button:focus-visible,
html.ad1 #xv[data-ad="settings"] .st-del:focus-visible {
  outline: 3px solid var(--st-on);
  outline-offset: -3px;
}
html.ad1 #xv[data-ad="settings"] .st-ic {
  display: grid;
  place-items: center;
  width: 28px;
  flex: none;
  color: var(--st-on);
}
html.ad1 #xv[data-ad="settings"] .st-t,
html.ad1 #xv[data-ad="settings"] .st-tx {
  flex: 1;
  min-width: 0;
}
html.ad1 #xv[data-ad="settings"] .st-tx {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
html.ad1 #xv[data-ad="settings"] .st-tx small,
html.ad1 #xv[data-ad="settings"] .st-v {
  font-size: 12px;
  font-weight: 500;
  line-height: 1.6;
  color: var(--ad-muted);
}
html.ad1 #xv[data-ad="settings"] .st-ch {
  display: grid;
  color: var(--ad-muted);
}
html.ad1 #xv[data-ad="settings"] .st-new {
  display: flex;
  align-items: center;
  height: 24px;
  padding-inline: 10px;
  border-radius: var(--r-xs);
  background: var(--c-gold);
  color: #5a3f00;
  font-size: 12px;
  font-style: normal;
  font-weight: 700;
}
html.ad1 #xv[data-ad="settings"] .st-row.st-warn,
html.ad1 #xv[data-ad="settings"] .st-row.st-warn .st-ic {
  color: var(--c-danger);
}
html.ad1[data-theme="dark"] #xv[data-ad="settings"] .st-row.st-warn,
html.ad1[data-theme="dark"] #xv[data-ad="settings"] .st-row.st-warn .st-ic {
  color: #f4a39a;
}
html.ad1 #xv[data-ad="settings"] .st-info {
  cursor: default;
}
html.ad1 #xv[data-ad="settings"] .st-pill {
  flex: none;
  padding: 3px 10px;
  border-radius: var(--r-pill);
  background: var(--ad-mint);
  color: var(--st-on);
  font-size: 12px;
  font-weight: 700;
}
/* رأس البطاقة: الصورة والاسم والرمز */
html.ad1 #xv[data-ad="settings"] .st-who {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px;
}
html.ad1 #xv[data-ad="settings"] .st-who > .av {
  flex: none;
  width: 56px;
  height: 56px;
  font-size: 30px;
}
html.ad1 #xv[data-ad="settings"] .st-nm {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
html.ad1 #xv[data-ad="settings"] .st-nm b {
  font-size: 16px;
}
html.ad1 #xv[data-ad="settings"] .st-code {
  align-self: flex-start;
  font-family: ui-monospace, Menlo, monospace;
  font-size: 14px;
  color: var(--ad-muted);
}
/* المظهر */
html.ad1 #xv[data-ad="settings"] .st-blk {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 14px 16px;
}
html.ad1 #xv[data-ad="settings"] .st-blk + .st-blk {
  border-block-start: 1px solid var(--ad-line);
}
html.ad1 #xv[data-ad="settings"] .st-lbl {
  font-size: 15px;
}
html.ad1 #xv[data-ad="settings"] .st-ln {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}
html.ad1 #xv[data-ad="settings"] .st-seg {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 4px;
  padding: 4px;
  border-radius: var(--r-pill);
  background: var(--st-seg);
}
html.ad1 #xv[data-ad="settings"] .st-seg button {
  min-height: 44px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: var(--r-pill);
  background: transparent;
  box-shadow: none;
  color: var(--ad-muted);
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
}
html.ad1 #xv[data-ad="settings"] .st-seg button[aria-checked="true"] {
  background: var(--st-on);
  color: #ffffff;
}
html.ad1[data-theme="dark"] #xv[data-ad="settings"] .st-seg button[aria-checked="true"] {
  color: #0e1714;
}
html.ad1 #xv[data-ad="settings"] .st-fs {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 700;
}
html.ad1 #xv[data-ad="settings"] .st-fs .st-a1 {
  font-size: 13px;
}
html.ad1 #xv[data-ad="settings"] .st-fs .st-a2 {
  font-size: 22px;
}
html.ad1 #xv[data-ad="settings"] .st-bars {
  flex: 1;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
}
/* الزر ٤٤px للمس، والشريط المرسوم ١٠px في نصه */
html.ad1 #xv[data-ad="settings"] .st-bars button {
  position: relative;
  min-height: 44px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: var(--r-md);
  background: transparent;
  box-shadow: none;
  cursor: pointer;
}
html.ad1 #xv[data-ad="settings"] .st-bars button::before {
  content: "";
  position: absolute;
  inset-inline: 0;
  inset-block: 17px;
  border-radius: var(--r-pill);
  background: var(--st-off);
}
html.ad1 #xv[data-ad="settings"] .st-bars button.on::before {
  background: var(--st-on);
}
html.ad1 #xv[data-ad="settings"] .st-sample {
  margin: 0;
  line-height: 1.8;
  color: var(--ad-ink);
}
/* الشكل القديم (من حسابي): بدون إطار إضافي داخل البطاقة */
html.ad1 #xv[data-ad="settings"] .st-old .pfOld {
  border: 0;
  padding: 0;
}
/* المفتاح: مسار ٥٢×٣٢ ومقبض أبيض ٢٤ */
html.ad1 #xv[data-ad="settings"] .st-tr {
  position: relative;
  flex: none;
  width: 52px;
  height: 32px;
  border-radius: var(--r-pill);
  background: var(--st-off);
  transition: background-color 0.2s;
}
html.ad1 #xv[data-ad="settings"] .st-tr i {
  position: absolute;
  inset-block-start: 4px;
  inset-inline-start: 4px;
  width: 24px;
  height: 24px;
  border-radius: var(--r-pill);
  background: #ffffff;
  box-shadow: 0 1px 2px rgba(4, 25, 20, 0.25);
  transition: inset-inline-start 0.2s;
}
html.ad1 #xv[data-ad="settings"] .st-sw[aria-checked="true"] .st-tr {
  background: var(--st-on);
}
html.ad1 #xv[data-ad="settings"] .st-sw[aria-checked="true"] .st-tr i {
  inset-inline-start: 24px;
}
html.ad1 #xv[data-ad="settings"] .st-sub {
  min-height: 48px;
  padding-block: 6px;
  font-size: 14px;
}
/* مفاتيح أنواع التنبيهات: تحت «تنبيهات الجوال» بإزاحة وخلفية نعناعية، عشان ما تختلط بالمفاتيح اللي بعدها */
html.ad1 #xv[data-ad="settings"] [data-pfw],
html.ad1 #xv[data-ad="settings"] .st-sw.st-sub {
  padding-inline-start: 28px;
  background: var(--ad-mint);
}
html.ad1 #xv[data-ad="settings"] [data-pfw] .st-t {
  font-size: 13px;
  color: var(--ad-muted);
}
html.ad1 #xv[data-ad="settings"] .st-sel {
  width: auto;
  min-height: 40px;
  margin: 0;
  padding-inline: 12px;
  border: 1px solid var(--ad-line);
  border-radius: var(--r-md);
  background: var(--st-seg);
  color: var(--ad-ink);
  font: inherit;
  font-size: 14px;
}
html.ad1 #xv[data-ad="settings"] .st-del {
  align-self: center;
  min-height: 44px;
  margin: 0;
  padding-inline: 16px;
  border: 0;
  background: transparent;
  box-shadow: none;
  color: var(--ad-muted);
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  text-decoration: underline;
  cursor: pointer;
}
@media (prefers-reduced-motion: reduce) {
  html.ad1 #xv[data-ad="settings"] .st-tr,
  html.ad1 #xv[data-ad="settings"] .st-tr i {
    transition: none;
  }
}
/* ورقة «طلب حذف الحساب» (bSheet العامة): الزرين فوق بعض، كبسولات */
html.ad1 .bottom-sheet.st-delS .sheet-foot {
  --r-lg: 999px;
  grid-auto-flow: row;
}
html.ad1 .bottom-sheet.st-delS .sheet-foot .st-no {
  min-height: 52px;
  border: 0;
  background: var(--c-green);
  color: #ffffff;
  box-shadow: var(--edge) var(--green-edge);
}
html.ad1 .bottom-sheet.st-delS .sheet-foot .st-yes {
  border: 1.5px solid #d1495b;
  background: transparent;
  box-shadow: none;
  color: #d1495b;
}
/* #stDelGo: قاعدة الأزرار الداكنة القديمة في base.css عالية الخصوصية (لونها أبيض) */
html.ad1[data-theme="dark"] .bottom-sheet.st-delS #stDelGo {
  border-color: #f08a97;
  color: #f08a97;
}
html.ad1 .bottom-sheet.st-delS .st-delM.bad {
  color: var(--c-danger);
}
/* ===== AD-F end ===== */

/* ===== AD-I start: إضافات نهاية الدرس (#lpEnd: الترويسة بلون الفصل، أخطاؤك، مصطلحات الدرس، بعد الدرس جرّب) — assets/lesson-end.js ===== */
/* الترويسة: بعرض الشاشة في الجوال بلون الفصل وزوايا سفلية ٣٢ (مثل التطبيق)، وعلامة الصح فوقها تنشال لأن الحلقة تكفي */
html.ad1 body:not(.t2) #sCert.leOn > .certCk {
  display: none;
}
@media (max-width: 1099px) {
  /* #lpEnd عرضه 100% (!important قديمة)، فنمد البطاقة نفسها لحواف الشاشة */
  html.ad1 body:not(.t2) #sCert.leOn #lpEnd {
    margin-block-start: -12px;
  }
  html.ad1 body:not(.t2) #sCert.leOn #lpEnd .lesson-end-inner {
    margin-inline: calc(50% - 50vw);
    border-radius: 0 0 32px 32px;
    padding-inline: 20px;
  }
}
/* «أنهيت الدرس» واسم الدرس صاروا سطر واحد (.leT)، والمدة صارت تحته (.leS) */
html.ad1 body:not(.t2) #lpEnd .lesson-end-inner > small,
html.ad1 body:not(.t2) #lpEnd .lesson-end-inner > p,
html.ad1 body:not(.t2) #lpEnd .lesson-end-stats > .leDup {
  display: none;
}
html.ad1 body:not(.t2) #lpEnd .leHd {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  margin-block: 2px 4px;
}
html.ad1 body:not(.t2) #lpEnd .leT {
  font: 700 1.05rem "Alexandria", sans-serif;
  color: #fff;
}
html.ad1 body:not(.t2) #lpEnd .leS {
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.9);
}
/* قصاصات خفيفة: ست قطع تنزل مرتين بعد احتفال النهاية (ما تتكرر للأبد)، وتنطفي مع «تقليل الحركة» */
html.ad1 body:not(.t2) #sCert.leOn #lpEnd .lesson-end-inner::before {
  display: none;
}
html.ad1 body:not(.t2) #lpEnd .lesson-end-inner > .leConf {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}
html.ad1 body:not(.t2) #lpEnd .leConf i {
  position: absolute;
  inset-block-start: 0;
  width: 8px;
  height: 14px;
  border-radius: 2px;
  background: #ffd166;
  opacity: 0;
  animation: leConf 2.6s ease-in 1.2s 2;
}
html.ad1 body:not(.t2) #lpEnd .leConf i:nth-child(2) {
  inset-inline-start: 22%;
  background: #fff;
  width: 7px;
  height: 12px;
  animation-delay: 1.6s;
}
html.ad1 body:not(.t2) #lpEnd .leConf i:nth-child(3) {
  inset-inline-end: 16%;
  background: #f4a261;
  animation-delay: 2s;
}
html.ad1 body:not(.t2) #lpEnd .leConf i:nth-child(4) {
  inset-inline-end: 38%;
  width: 6px;
  height: 11px;
  animation-delay: 2.3s;
}
html.ad1 body:not(.t2) #lpEnd .leConf i:nth-child(5) {
  inset-inline-start: 40%;
  background: #fff;
  animation-delay: 1.4s;
}
html.ad1 body:not(.t2) #lpEnd .leConf i:nth-child(1) {
  inset-inline-start: 8%;
}
html.ad1 body:not(.t2) #lpEnd .leConf i:nth-child(6) {
  inset-inline-end: 6%;
  background: #f4a261;
  animation-delay: 2.6s;
}
@keyframes leConf {
  0% {
    transform: translateY(-20px) rotate(0);
    opacity: 0;
  }
  20% {
    opacity: 1;
  }
  100% {
    transform: translateY(220px) rotate(260deg);
    opacity: 0;
  }
}
@media (prefers-reduced-motion: reduce) {
  html.ad1 body:not(.t2) #lpEnd .leConf {
    display: none;
  }
}

/* البطاقات الجديدة: بيضاء ٢٤ بحافة (نفس بطاقات الملخص والعجلة تحت) */
html.ad1 body:not(.t2) #sCert .leCard {
  display: flex;
  justify-self: stretch;
  box-sizing: border-box;
  flex-direction: column;
  gap: 10px;
  margin-block: 0 16px;
  padding: 16px;
  border-radius: var(--r-4xl);
  background: var(--ad-card);
  color: var(--ad-ink);
  box-shadow: var(--edge) var(--card-edge);
  text-align: start;
}
html.ad1 body:not(.t2) #sCert .leCard .leH {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
html.ad1 body:not(.t2) #sCert .leCard h3 {
  margin: 0;
  font: 700 1.0625rem "Alexandria", sans-serif;
  color: var(--ad-ink);
}
/* أخطاؤك */
html.ad1 body:not(.t2) #sCert .leBadge {
  padding: 4px 10px;
  border-radius: var(--r-pill);
  background: #fdecea;
  color: #8c1d18;
  font-size: 0.75rem;
  font-weight: 700;
}
html.ad1 body:not(.t2) #sCert .leQ {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 10px 12px;
  border-radius: var(--r-lg);
  background: var(--ad-bg);
}
html.ad1 body:not(.t2) #sCert .leQ b {
  font-size: 0.875rem;
  line-height: 1.7;
}
html.ad1 body:not(.t2) #sCert .leQ span {
  font-size: 0.8125rem;
  font-weight: 700;
  color: #0b6b43;
}
html.ad1 body:not(.t2) #sCert .leMore {
  margin: 0;
  font-size: 0.8125rem;
  color: var(--ad-muted);
}
html.ad1 body:not(.t2) #sCert .leGo {
  min-height: 48px;
  margin-block-end: 4px;
  border: 0;
  border-radius: var(--r-pill);
  background: #0d4f3c;
  color: #fff;
  font: 700 0.9375rem inherit;
  font-family: inherit;
  box-shadow: var(--edge) var(--green-edge);
  cursor: pointer;
}
/* مصطلحات الدرس: كبسولات، والمختار بلون الفصل */
html.ad1 body:not(.t2) #sCert .leChips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
html.ad1 body:not(.t2) #sCert .leChip {
  min-height: 44px;
  padding: 0 14px;
  border: 1.5px solid var(--ad-line);
  border-radius: var(--r-pill);
  background: var(--ad-card);
  color: var(--ad-ink);
  font-family: inherit;
  font-size: 0.875rem;
  font-weight: 700;
  cursor: pointer;
}
html.ad1 body:not(.t2) #sCert .leChip[aria-pressed="true"] {
  border-color: var(--lu-c, var(--c-green));
  background: var(--lu-c, var(--c-green));
  color: #fff;
}
html.ad1 body:not(.t2) #sCert .leDef {
  margin: 0;
  padding: 10px 12px;
  border-radius: var(--r-lg);
  background: var(--ad-bg);
  font-size: 0.875rem;
  line-height: 1.8;
}
html.ad1 body:not(.t2) #sCert .leDef small {
  color: var(--ad-muted);
}
/* بعد الدرس جرّب: كبسولات بحافة — «اسأل» أزرق، والأنشطة ذهبي فاتح (مثل صندوق المختبر في الدرس) */
html.ad1 body:not(.t2) #sCert .lePills {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
}
html.ad1 body.dsk:not(.t2) #sCert .lePills {
  flex-direction: row;
  flex-wrap: wrap;
}
html.ad1 body:not(.t2) #sCert .lePill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  margin-block-end: 4px;
  padding-block: 6px;
  padding-inline: 6px 16px;
  border-radius: var(--r-pill);
  font-size: 0.9375rem;
  font-weight: 700;
  text-decoration: none;
}
html.ad1 body:not(.t2) #sCert .lePill em {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 34px;
  height: 34px;
  border-radius: var(--r-pill);
  background: var(--ad-card);
  font-style: normal;
  font-size: 1.05rem;
}
html.ad1 body:not(.t2) #sCert .lePill.ask {
  background: #e6eff8;
  color: #1f67ae;
  box-shadow: var(--edge) #c5d8ec;
}
html.ad1 body:not(.t2) #sCert .lePill.act {
  background: #fff4d6;
  color: #0b3a2d;
  box-shadow: var(--edge) #f2d891;
}
/* الداكن */
html.ad1[data-theme="dark"] body:not(.t2) #sCert .leBadge {
  background: #3a1a18;
  color: #f2a39c;
}
html.ad1[data-theme="dark"] body:not(.t2) #sCert .leQ span {
  color: #7fd6a8;
}
html.ad1[data-theme="dark"] body:not(.t2) #sCert .leGo {
  background: #3fa37d;
  color: #0e1714;
  box-shadow: var(--edge) #05201a;
}
html.ad1[data-theme="dark"] body:not(.t2) #sCert .leChip[aria-pressed="true"] {
  border-color: var(--lu-td, #9ee6c4);
  background: var(--lu-sd, #173f34);
  color: var(--lu-td, #9ee6c4);
}
html.ad1[data-theme="dark"] body:not(.t2) #sCert .lePill.ask {
  background: #14304a;
  color: #8ec3f5;
  box-shadow: var(--edge) #0a1a29;
}
html.ad1[data-theme="dark"] body:not(.t2) #sCert .lePill.act {
  background: #3a3016;
  color: #e8bc52;
  box-shadow: var(--edge) #1f190a;
}
/* ===== AD-I end ===== */

/* ===== AD-H start: تحصيلي بهوية التطبيق النيلية (body.t3: الرئيسية، الوحدات، نافذة الوحدة والمستوى، القاموس، الاختبار المحاكي ونتيجته، نتائجي، الشريط السفلي) ===== */
/* قرار المعلم: تحصيلي ياخذ نيلي التطبيق (Tahsili.dc / TahsiliQuiz.dc) بدل الذهبي.
   الذهبي يبقى بس على السطح النيلي الغامق (أيقونة «خطوتك التالية» وحلقة الدرجة المتوقعة) وللنقاط والمكافآت.
   ألوان الصح/الخطأ ومستويات الصعوبة تبقى كما هي. طلاب ثاني وأول ثانوي ما يتأثرون (كل شي تحت body.t3). */

/* ---------- الرموز: نيلي التطبيق + ألوان الصفحة لطالب تحصيلي ---------- */
html.ad1 body.t3:not(.t2) {
  --t3: #4b4fb5; /* الأزرار والمختار */
  --t3-ink: #4b4fb5; /* نص نيلي على أبيض (٦٫٨:١) */
  --t3-sel: #4b4fb5; /* حد المختار */
  --t3-deep: #262a6b; /* سطح البطل والرأس */
  --t3-hero-edge: #1b1f55; /* حافة سطح البطل */
  --t3-edge: #262a6b; /* حافة الزر النيلي */
  --t3-soft: #eeeffb; /* تعبئة هادية */
  --t3-soft-edge: #c9cbf5;
  --t3-line2: #dadcf0;
  --t3-on-dark: #c9cbf5; /* نص ثانوي على النيلي الغامق */
  --ad-bg: #f3f3fb;
  --ad-muted: #5b5f8c;
  --ad-line: #e6e7f5;
  --ad-mint: #eeeffb;
  --card-edge: #e6e7f5;
  /* رأس الصفحات الداخلية والأوراق المنبثقة تقرأ --hx* (كريمي/أخضر)؛ نوجّهها لرموز الصفحة النيلية */
  --hxB: var(--ad-bg);
  --hxS: var(--ad-card);
  --hxR: var(--ad-line);
  --hxT: var(--ad-ink);
  --hxM: var(--ad-muted);
  --hxA: var(--t3-ink); /* يُستخدم كنص؛ الأزرار المعبّأة نلوّنها صراحة */
}
html.ad1[data-theme="dark"] body.t3:not(.t2) {
  --t3: #4b4fb5; /* أبيض عليه ٦٫٨:١ */
  --t3-ink: #b4b7f5;
  --t3-sel: #8f93e6;
  --t3-deep: #23265e;
  --t3-hero-edge: #0b0c22;
  --t3-edge: #14163d;
  --t3-soft: #262955;
  --t3-soft-edge: #0b0c22;
  --t3-line2: #363968;
  --t3-on-dark: #c9cbf5;
  --ad-bg: #0f1024;
  --ad-card: #1a1b38;
  --ad-muted: #a9abd0;
  --ad-line: #2b2d57;
  --ad-mint: #232650;
  --card-edge: #08091a;
  /* بطاقات الموقع القديمة تقرأ --card و --line؛ في الليلي نخليها نيلية عشان ما تطلع خضراء على خلفية نيلية */
  --card: #1a1b38;
  --line: #2b2d57;
  --dv-card: #1a1b38;
  --dv-chip: #232650;
  --dv-chip-ink: #c9cbf5;
}

/* ---------- الشريط السفلي (والقائمة الجانبية في المكتب): النشط نيلي بكبسولة هادية ---------- */
html.ad1 body.t3:not(.t2) #bNav,
html.ad1 body.t3:not(.t2) #dNav {
  --accent: var(--t3-ink);
  --accent-2: var(--t3-soft);
}

/* ---------- الرئيسية (#h2B) ---------- */
/* «خطوتك التالية»: نيلي غامق، والأيقونة ذهبية على مربع أغمق (مثل شعار رأس التطبيق).
   خلفية الأيقونة القديمة !important، فنرسم فوقها بظل داخلي. */
html.ad1 body.t3:not(.t2) .t3Nx {
  background: var(--t3-deep);
}
html.ad1 body.t3:not(.t2) .t3Nx .t3NxI {
  border-radius: var(--r-xl);
  color: #ffd166;
  box-shadow: inset 0 0 0 999px var(--t3-hero-edge);
}
html.ad1 body.t3:not(.t2) .t3Nx .tx small:first-child,
html.ad1 body.t3:not(.t2) .t3Nx .tx small {
  --c-mint: var(--t3-on-dark);
  color: var(--t3-on-dark);
}
/* زر المحاكي: نيلي ونص أبيض */
html.ad1 body.t3:not(.t2) .t3Cta {
  background: var(--t3);
  color: #ffffff;
}
/* التدريب الحر: أبيض بإطار نيلي (الزر الثانوي في التطبيق) */
html.ad1 body.t3:not(.t2) .t3Cta.g {
  background: var(--ad-card);
  color: var(--t3-ink);
  border: 2px solid var(--t3-sel);
}
/* الليلي: الخلفية القديمة #1f6b4c !important — نرسم فوقها بظل داخلي، والنص الأبيض يبقى (مقروء) */
html.ad1[data-theme="dark"] body.t3:not(.t2) .t3Cta.g {
  box-shadow: var(--edge-lg) var(--t3-soft-edge), inset 0 0 0 999px var(--ad-card);
}
/* بطاقات الوحدات: أيقونة نيلية هادية، شريط تقدّم نيلي، «ابدأ» نيلي */
html.ad1 body.t3:not(.t2) .t3U > button .ic,
html.ad1 body.t3:not(.t2) .t3GlB .ic {
  color: var(--t3-ink);
  box-shadow: inset 0 0 0 999px var(--t3-soft);
}
html.ad1 body.t3:not(.t2) .t3U > button .pb {
  background: var(--ad-line);
}
html.ad1 body.t3:not(.t2) .t3U > button .pb i {
  box-shadow: inset 0 0 0 999px var(--t3);
}
html.ad1 body.t3:not(.t2) .t3U > button em {
  background: var(--t3);
  color: #ffffff;
}

/* خطة اليوم على رئيسية تحصيلي: الحلقة والأزرار تقرأ --accent و --dv-accent */
html.ad1 body.t3:not(.t2) #planCard {
  --accent: var(--t3-sel);
  --dv-accent: var(--t3);
}
html.ad1 body.t3:not(.t2) #planCard .planI .st {
  box-shadow: 0 3px 0 var(--t3-edge);
}
html.ad1 body.t3:not(.t2) #planCard .planI.ok .st {
  color: var(--t3-ink);
  box-shadow: none;
}

/* ---------- نافذة الوحدة والقاموس (الورقة المشتركة .chapter-sheet-panel) ---------- */
html.ad1 body.t3:not(.t2) .chapter-sheet-panel .games-search {
  background: var(--ad-card);
  border-color: var(--ad-line);
}
/* الصورة المصغّرة لونها inline، فنرسم فوقه بظل داخلي */
html.ad1 body.t3:not(.t2) .chapter-sheet-panel .chapter-sheet-thumb {
  box-shadow: inset 0 0 0 999px var(--t3);
}
html.ad1 body.t3:not(.t2) .chapter-sheet-panel .chapter-sheet-actions .r1,
html.ad1 body.t3:not(.t2) .chapter-sheet-panel .chapter-sheet-actions .r3 {
  background: var(--t3-soft);
  color: var(--t3-ink);
}
html.ad1 body.t3:not(.t2) .chapter-sheet-panel .chapter-sheet-info b {
  color: var(--t3-ink);
}
html.ad1 body.t3:not(.t2) .chapter-sheet-panel .chapter-sheet-go {
  background: var(--t3);
  color: #ffffff;
  border-radius: var(--r-pill);
  box-shadow: var(--edge) var(--t3-edge);
}
html.ad1 body.t3:not(.t2) .chapter-sheet-panel .games-filter button.on {
  background: var(--t3);
  box-shadow: 0 3px 0 var(--t3-edge);
}

/* ---------- نافذة المستوى والعدد (.tourO) ---------- */
/* الأزرار القديمة تقرأ --accent (بـ !important)، فنغيّر المتغيّر داخل النافذة */
html.ad1 body.t3:not(.t2) .tourO {
  --accent: var(--t3);
  --accent-2: var(--t3-soft);
  background: rgba(38, 42, 107, 0.5);
}
html.ad1 body.t3:not(.t2) .tourO h2 .t3i {
  --accent: var(--t3-ink);
}

/* ---------- تأكيد التسليم (.askO) ---------- */
html.ad1 body.t3:not(.t2) .askO .ask-box .y:not(.del) {
  background: var(--t3);
  box-shadow: 0 4px 0 var(--t3-edge);
}

/* ---------- الاختبار المحاكي: المقدمة ---------- */
html.ad1 body.t3:not(.t2) .mock-exam-intro .mock-exam-rules b {
  color: var(--t3-ink);
}
html.ad1 body.t3:not(.t2) .mock-exam-intro #tmGo {
  background: var(--t3);
  border-color: var(--t3);
  color: #ffffff;
}

/* ---------- الاختبار المحاكي: الورقة ---------- */
/* ألوان الورقة من رموز الصفحة النيلية بدل الورق الكريمي */
html.ad1 body.t3:not(.t2) .mock-exam {
  --sh-paper: var(--ad-card);
  --sh-bg: var(--ad-bg);
  --sh-line: var(--ad-line);
  --sh-ink: var(--ad-ink);
  --sh-mut: var(--ad-muted);
  --sh-brand: var(--t3);
  --accent: var(--t3-ink); /* حرف الخيار يقرأ --accent بـ !important */
}
/* الرأس نيلي غامق، والوقت كبسولة بإطار ذهبي مثل زر «تقريري» في رأس التطبيق */
html.ad1 body.t3:not(.t2) .mock-exam-head {
  background: var(--t3-deep);
}
html.ad1 body.t3:not(.t2) .mock-exam .mock-exam-clock:not(.low) {
  background: transparent;
  color: #ffd166;
  border: 2px solid #ffd166;
}
html.ad1 body.t3:not(.t2) .mock-exam .lesson-quiz-option .k {
  border-color: var(--t3-line2);
}
html.ad1 body.t3:not(.t2) .mock-exam .lesson-quiz-option.sel .k {
  border-color: var(--t3);
}
/* المُجاب في شبكة الأسئلة: نيلي هادي (الخلفية القديمة !important) */
html.ad1 body.t3:not(.t2) .mock-exam .mock-exam-grid .a:not(.f) {
  border-color: var(--t3-soft-edge);
  color: var(--t3-ink);
  box-shadow: inset 0 0 0 999px var(--t3-soft);
}
html.ad1 body.t3:not(.t2) .mock-exam-legend i.a {
  background: var(--t3-soft);
  border-color: var(--t3-soft-edge);
}

/* ---------- النتيجة ونتائجي ---------- */
html.ad1 body.t3:not(.t2) #xv .mock-exam-result {
  --c-green-bright: var(--t3);
}
html.ad1 body.t3:not(.t2) #xv .mock-exam-history i {
  background: var(--t3);
}
html.ad1 body.t3:not(.t2) #xv .mock-exam-result #tmRev {
  background: var(--t3);
  border-color: var(--t3);
  color: #ffffff;
}
html.ad1 body.t3:not(.t2) #xv .mock-exam-result .row > a.btnlink {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--ad-card);
  border: 2px solid var(--t3-sel);
  color: var(--t3-ink);
}
/* الدرجة المتوقعة: نيلي غامق، والحلقة تبقى ذهبية */
html.ad1 body.t3:not(.t2) #xv .t3Pred {
  background: var(--t3-deep);
}
html.ad1 body.t3:not(.t2) #xv .t3Pred small {
  color: var(--t3-on-dark);
}
html.ad1 body.t3:not(.t2) #xv .t3Rg span {
  background: var(--t3-hero-edge);
}
html.ad1 body.t3:not(.t2) #xv .t3R .t3K b {
  color: var(--t3-ink);
}
html.ad1 body.t3:not(.t2) #xv .t3R .t3Rec i {
  background: var(--t3-soft);
  color: var(--t3-ink);
}
html.ad1 body.t3:not(.t2) #xv .t3R .t3T button.small {
  background: var(--t3);
  border-color: var(--t3);
  color: #ffffff;
  box-shadow: 0 3px 0 var(--t3-edge);
}

/* ===== AD-H end ===== */

/* ===== AD-Q start: الاختبار القبلي الإلزامي (.ptO — assets/pretest.js): شاشة كاملة، خيارات بلون الفصل، «ما أعرف»، والنتيجة ===== */
/* النافذة: شاشة بيضاء كاملة بدل البطاقة الوسطية (مثل شاشة السؤال في التطبيق). ما فيها زر إغلاق ولا تنسكر بالضغط برّا */
html.ad1.ptOn body:not(.t2) {
  overflow: hidden;
}
html.ad1 body:not(.t2) .tourO.ptO {
  display: block;
  padding: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  background: var(--ad-card);
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}
html.ad1 body:not(.t2) .ptO .tourB.ptB {
  display: flex;
  flex-direction: column;
  gap: 14px;
  max-width: 480px;
  min-height: 100%;
  margin-inline: auto;
  padding: calc(16px + env(safe-area-inset-top, 0px)) 20px calc(24px + env(safe-area-inset-bottom, 0px));
  border-radius: 0;
  background: var(--ad-card);
  box-shadow: none;
  color: var(--ad-ink);
  text-align: start;
  animation: none;
}
/* شريط التقدّم: قطع ٨px — اللي خلص بلون الفصل، والحالي أفتح (ما نكشف صح أو خطأ) */
html.ad1 body:not(.t2) .ptO .ptDots {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(0, 1fr);
  gap: 6px;
}
html.ad1 body:not(.t2) .ptO .ptDots i {
  height: 8px;
  border-radius: var(--r-pill);
  background: var(--ad-mint);
  transition: background-color 0.3s;
}
html.ad1 body:not(.t2) .ptO .ptDots i.ok {
  background: var(--lu-c, var(--c-green));
}
html.ad1 body:not(.t2) .ptO .ptDots i.now {
  background: color-mix(in srgb, var(--lu-c, var(--c-green)) 45%, var(--ad-mint));
}
html.ad1 body:not(.t2) .ptO .ptHd {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-top: 8px;
}
html.ad1 body:not(.t2) .ptO .ptHd b {
  font-family: Alexandria, "IBM Plex Sans Arabic", sans-serif;
  font-size: 1rem;
  color: var(--ad-ink);
}
html.ad1 body:not(.t2) .ptO .ptHd small,
html.ad1 body:not(.t2) .ptO .ptNote {
  font-size: 0.8125rem;
  color: var(--ad-muted);
}
html.ad1 body:not(.t2) .ptO .ptQ {
  margin: 4px 0 2px;
  font-family: Alexandria, "IBM Plex Sans Arabic", sans-serif;
  font-weight: 700;
  font-size: 1.375rem;
  line-height: 1.6;
  color: var(--ad-ink);
}
html.ad1 body:not(.t2) .ptO .ptFig img {
  display: block;
  max-width: 100%;
  max-height: 34vh;
  margin-inline: auto;
  border-radius: var(--r-2xl);
}
/* الخيار (OptionCard): أبيض بحد وحافة ٤px. القديمة (html.ds3 .challenge-options button) بـ !important على متغيرات، فنغيّر المتغيرات */
html.ad1 body:not(.t2) .ptO .ptOpts {
  display: flex;
  flex-direction: column;
}
html.ad1 body:not(.t2) .ptO .ptOpt {
  --r-lg: 18px;
  --card: var(--ad-card);
  --line: var(--ad-line);
  --fg: var(--ad-ink);
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 60px;
  margin: 0;
  font-weight: 500;
  line-height: 1.6;
  text-align: start;
  box-shadow: var(--edge) var(--card-edge);
}
html.ad1 body:not(.t2) .ptO .ptOpt .k {
  display: grid;
  place-items: center;
  flex: none;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--ad-bg);
  color: var(--ad-muted);
  font-family: Alexandria, "IBM Plex Sans Arabic", sans-serif;
  font-weight: 600;
  font-size: 0.875rem;
}
html.ad1 body:not(.t2) .ptO .ptOpt .t {
  flex: 1;
  min-width: 0;
}
/* قرار المعلم: المختار بلون فصل الدرس — حد وخلفية فاتحة وحافة بنفس اللون (الحد القديم ١.٥ بـ !important فنكمّله بظل داخلي) */
html.ad1 body:not(.t2) .ptO .ptOpt:is(.on, :active:not(:disabled)) {
  --card: var(--lu-s, #e3f3eb);
  --line: var(--lu-c, var(--c-green));
  opacity: 1;
  box-shadow: var(--edge) var(--lu-c, var(--c-green)), inset 0 0 0 1px var(--lu-c, var(--c-green));
}
html.ad1[data-theme="dark"] body:not(.t2) .ptO .ptOpt:is(.on, :active:not(:disabled)) {
  --card: var(--lu-sd, #173f34);
}
html.ad1 body:not(.t2) .ptO .ptOpt:is(.on, :active:not(:disabled)) .k {
  background: var(--lu-c, var(--c-green));
  color: #fff;
}
html.ad1 body:not(.t2) .ptO .ptOpt:disabled:not(.on) {
  opacity: 0.6;
}
@media (hover: hover) and (pointer: fine) {
  html.ad1 body:not(.t2) .ptO .ptOpt:hover:not(:disabled) {
    --line: var(--lu-c, var(--c-green));
  }
}
/* «ما أعرف»: كبسولة بيضاء بحد (مثل شاشة السؤال في التطبيق) */
html.ad1 body:not(.t2) .ptO .ptFoot {
  display: flex;
  justify-content: center;
  margin-top: 4px;
}
html.ad1 body:not(.t2) .ptO .ptIdk {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 52px;
  padding-inline: 24px;
  border: 1.5px solid var(--ad-line);
  border-radius: var(--r-pill);
  background: var(--ad-card);
  color: var(--ad-ink);
  font-weight: 700;
  font-size: 0.9375rem;
  box-shadow: var(--edge) var(--card-edge);
}
html.ad1 body:not(.t2) .ptO .ptIdk.on {
  border-color: var(--lu-c, var(--c-green));
  box-shadow: var(--edge) var(--lu-c, var(--c-green));
}
html.ad1 body:not(.t2) .ptO .ptNote {
  margin-top: auto;
  text-align: center;
  line-height: 1.8;
}

/* ---------- النتيجة: بطاقة بلون الفصل + الأجزاء + «ابدأ الدرس» الذهبي ---------- */
html.ad1 body:not(.t2) .ptO .ptHero {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: 8px;
  padding: 22px;
  border-radius: var(--r-5xl);
  background: var(--lu-c, var(--c-green));
  color: #fff;
  box-shadow: var(--edge-lg) color-mix(in srgb, var(--lu-c, var(--c-green)) 62%, #000);
}
html.ad1 body:not(.t2) .ptO .ptHero .ptEm {
  font-size: 2.25rem;
  line-height: 1.2;
}
html.ad1 body:not(.t2) .ptO .ptHero .ptQ {
  margin: 0;
  color: #fff;
  font-size: 1.5rem;
}
html.ad1 body:not(.t2) .ptO .ptHero .ptMsg {
  font-size: 0.875rem;
  line-height: 1.8;
  color: #fff;
  opacity: 0.92;
}
html.ad1 body:not(.t2) .ptO .ptPh {
  margin-top: 6px;
  font-family: Alexandria, "IBM Plex Sans Arabic", sans-serif;
  font-size: 1rem;
}
html.ad1 body:not(.t2) .ptO .ptParts {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}
html.ad1 body:not(.t2) .ptO .ptParts li {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: var(--r-2xl);
  background: #fff4d6;
  color: #6b4e00;
}
html.ad1 body:not(.t2) .ptO .ptParts li.ok {
  background: #e3f5ec;
  color: #0b6b43;
}
html.ad1[data-theme="dark"] body:not(.t2) .ptO .ptParts li {
  background: #3a3016;
  color: #f0cf7a;
}
html.ad1[data-theme="dark"] body:not(.t2) .ptO .ptParts li.ok {
  background: #143526;
  color: #9fe0bd;
}
html.ad1 body:not(.t2) .ptO .ptParts li > div {
  flex: 1;
  min-width: 0;
}
html.ad1 body:not(.t2) .ptO .ptParts li b {
  font-size: 0.9375rem;
  color: inherit;
}
html.ad1 body:not(.t2) .ptO .ptParts .n {
  display: grid;
  place-items: center;
  flex: none;
  width: 30px;
  height: 30px;
  border-radius: var(--r-sm);
  background: rgb(255 255 255 / 0.7);
  font-family: Alexandria, "IBM Plex Sans Arabic", sans-serif;
  font-weight: 700;
  font-size: 0.875rem;
}
html.ad1[data-theme="dark"] body:not(.t2) .ptO .ptParts .n {
  background: rgb(0 0 0 / 0.25);
}
html.ad1 body:not(.t2) .ptO .ptParts .pt-tag {
  flex: none;
  padding: 0;
  background: none;
  color: inherit;
  font-size: 0.8125rem;
  font-weight: 700;
}
html.ad1 body:not(.t2) .ptO .ptGo {
  width: 100%;
  min-height: 56px;
  margin-top: 6px;
  border: 0;
  border-radius: var(--r-3xl);
  background: #ffd166;
  color: #2a1e00;
  font-weight: 700;
  font-size: 1.0625rem;
  box-shadow: 0 5px 0 var(--gold-edge);
}
/* الداكن: base.css «:root[data-theme=dark] button:not(.ghost)…» يبيّض النص بخصوصية عالية، فنثبّت لون النص بالـ id */
html.ad1 body:not(.t2) .ptO #ptGo {
  color: #2a1e00;
}
html.ad1 body:not(.t2) .ptO .ptGo:active {
  transform: translateY(3px);
  box-shadow: 0 2px 0 var(--gold-edge);
}
/* ===== AD-Q end ===== */

/* ===== AD-S start: ملاحظاتي من نافذة تحت (زر «ملاحظاتي» العائم تحت الفيديو + .nsSheet — assets/notes-sheet.js) ===== */
/* البطاقة البيضاء تحت الفيديو تنشال من الصفحة (كانت تكسر خفوت السينما) — نفس المربع ينتقل للنافذة وقت الفتح */
html.ad1 body:not(.t2) #sMain #noteBox {
  display: none;
}
/* الزر العائم: يبان في الوضع العادي بعد (كان للسينما بس)، بدون نقاط الأجزاء */
html.ad1 body:not(.t2) .luCine.nsOn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 12px;
}
html.ad1 body:not(.t2) .luCine.nsOn[hidden] {
  display: none;
}
html.ad1 body:not(.t2):not(.lu-focus) .luCine.nsOn .luCd {
  display: none;
}
html.ad1 body:not(.t2) .luCine.nsOn .luQN {
  margin-inline-start: auto;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 18px;
  border-radius: var(--r-pill);
  border: 2px solid var(--lu-c, var(--c-green));
  background: var(--ad-card);
  color: var(--lu-tx);
  font: 700 0.9rem "IBM Plex Sans Arabic", sans-serif;
  box-shadow: var(--edge) var(--lu-c, var(--green-edge));
  backdrop-filter: none;
  cursor: pointer;
}
html.ad1 body:not(.t2) .luCine.nsOn .luQN svg {
  width: 20px;
  height: 20px;
  flex: none;
}
html.ad1 body:not(.t2) .luCine.nsOn .nsN {
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  border-radius: var(--r-pill);
  background: var(--lu-c, var(--c-green));
  color: #fff;
  font: 700 0.75rem "IBM Plex Sans Arabic", sans-serif;
  display: inline-grid;
  place-items: center;
}
html.ad1 body:not(.t2) .luCine.nsOn .nsN[hidden] {
  display: none;
}
html.ad1[data-theme="dark"] body:not(.t2) .luCine.nsOn .luQN {
  border-color: var(--lu-td, #9ee6c4);
  box-shadow: var(--edge) #05201a;
}
html.ad1[data-theme="dark"] body:not(.t2) .luCine.nsOn .nsN {
  background: var(--lu-td, #9ee6c4);
  color: #06140f;
}
/* السينما: كل شي تحت الفيديو يخفت (البطاقة انشالت)، والزر بس واضح فوق الطبقة السوداء */
html.ad1 body.lu-focus:not(.t2) .luCine.nsOn .luQN {
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.28);
  color: #fff;
  box-shadow: none;
  backdrop-filter: blur(6px);
}
html.ad1 body.lu-focus:not(.t2) .luCine.nsOn .nsN {
  background: var(--lu-td, #9ee6c4);
  color: #06140f;
}

/* النافذة: نفس مربع #noteBox بداخلها (بدون عنوانه، العنوان في رأس النافذة) */
html.ad1 body:not(.t2) .nsSheet {
  --lu-soft: var(--lu-s, #e3f3eb);
  --lu-tx: var(--lu-c, var(--c-green));
}
html.ad1[data-theme="dark"] body:not(.t2) .nsSheet {
  --lu-soft: var(--lu-sd, #173f34);
  --lu-tx: var(--lu-td, #9ee6c4);
}
html.ad1 body:not(.t2) .nsSheet .sheet-head .sheet-item-icon {
  background: var(--lu-soft);
  color: var(--lu-tx);
}
html.ad1 body:not(.t2) .nsSheet #bShH span {
  display: inline-grid;
  place-items: center;
  min-width: 24px;
  height: 24px;
  padding: 0 7px;
  margin-inline-start: 4px;
  border-radius: var(--r-pill);
  background: var(--lu-c, var(--c-green));
  color: #fff;
  font-size: 0.8rem;
  vertical-align: middle;
}
html.ad1[data-theme="dark"] body:not(.t2) .nsSheet #bShH span {
  background: var(--lu-td, #9ee6c4);
  color: #06140f;
}
html.ad1 body:not(.t2) .nsSheet #noteBox {
  display: block;
  border: 0;
  padding: 0;
  margin: 0;
  background: none;
  box-shadow: none;
}
html.ad1 body:not(.t2) .nsSheet #noteBox > summary {
  display: none;
}
html.ad1 body:not(.t2) .nsSheet #noteTx {
  inline-size: 100%;
  min-height: 96px;
  border: 2px solid var(--ad-line);
  border-radius: var(--r-2xl);
  background: var(--ad-bg);
  color: var(--ad-ink);
  padding: 12px 14px;
  font: 500 1rem/1.7 "IBM Plex Sans Arabic", sans-serif;
  resize: vertical;
}
html.ad1 body:not(.t2) .nsSheet #noteTx:focus {
  outline: none;
  border-color: var(--lu-c, var(--c-green));
}
html.ad1[data-theme="dark"] body:not(.t2) .nsSheet #noteTx:focus {
  border-color: var(--lu-td, #9ee6c4);
}
html.ad1 body:not(.t2) .nsSheet #noteBox .luPin {
  display: none;
}
html.ad1 body:not(.t2) .nsSheet .luNRow {
  margin-top: 12px;
}
html.ad1 body:not(.t2) .nsSheet .nsSave {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 52px;
  border: 0;
  border-radius: var(--r-pill);
  background: var(--c-green);
  color: #fff;
  font: 700 1rem Alexandria, "IBM Plex Sans Arabic", sans-serif;
  box-shadow: var(--edge) var(--green-edge);
  cursor: pointer;
}
html.ad1 body:not(.t2) .nsSheet .nsSave svg {
  width: 20px;
  height: 20px;
}
html.ad1[data-theme="dark"] body:not(.t2) .nsSheet .nsSave {
  background: #46b088;
  color: #06140f;
  box-shadow: var(--edge) #1d5a44;
}
html.ad1 body:not(.t2) .nsSheet .luNl {
  margin-top: 14px;
  gap: 8px;
}
html.ad1 body:not(.t2) .nsSheet .luNl button[data-nt] {
  min-height: 48px;
  align-items: center;
  border: 0;
  border-radius: var(--r-xl);
  background: var(--ad-card);
  color: var(--ad-ink);
  padding: 10px 12px;
  box-shadow: inset 0 0 0 2px var(--ad-line);
}
html.ad1 body:not(.t2) .nsSheet .luNl em {
  flex: none;
  min-width: 52px;
  padding: 3px 10px;
  border-radius: var(--r-pill);
  background: var(--lu-soft);
  color: var(--lu-tx);
  text-align: center;
}
html.ad1 body:not(.t2) .nsSheet .luNd {
  width: 44px;
  color: var(--ad-muted);
}
html.ad1 body:not(.t2) .nsSheet #noteSt {
  display: block;
  margin-top: 8px;
  color: var(--ad-muted);
}
/* ===== AD-S end ===== */

/* ===== AD-R start: بقايا التصميم القديم (رأس الصفحات الداخلية #ih، ومتغيرات الألوان القديمة --hx* وغيرها) ===== */

/* ١) المتغيرات القديمة: رأس الصفحات والأوراق المنبثقة والبحث والدخول تقرأ --hx* (كريمي #f6f4ee / #ece8de / #e6e1d5).
   نوجّهها لألوان التطبيق بدل ما نلاحق كل قاعدة (كثير منها !important على المتغير نفسه).
   تحصيلي (body.t3) يوجّهها لرموزه النيلية في AD-H بمحدِّد أقوى، فيبقى كما هو. */
html.ad1 body:not(.t2) {
  --hxB: var(--ad-bg);
  --hxS: var(--ad-card);
  --hxR: var(--ad-line);
  --hxT: var(--ad-ink);
  --hxM: var(--ad-muted);
  --hxBr: color-mix(in srgb, var(--ad-bg) 92%, transparent);
}
/* متغيرات «نقاء» (design-v2.css) والأساس (base.css): خلفية #f3f6f5/#0b1513 وبطاقة ليلية #14221f ونعناعي #e8efec
   وظل ضبابي — نوجّهها لألوان التطبيق، والظل الضبابي يصير الحافة البارزة. */
html.ad1 body:not(.t2) {
  --bg: var(--ad-bg);
  --card: var(--ad-card);
  --line: var(--ad-line);
  --accent-2: var(--ad-mint);
  --dv-bg-top: var(--ad-bg);
  --dv-bg: var(--ad-bg);
  --dv-card: var(--ad-card);
  --dv-chip: var(--ad-mint);
  --dv-shadow: var(--edge) var(--card-edge);
  --dv-shadow-sm: var(--edge) var(--card-edge);
  /* هذي تُحسب على :root من --dv-card و --c-line، فما توصلها القيم الجديدة إلا لو وجّهناها هنا.
     الليلي فيها أخضر قديم (#21463b حدود، #11302a / #0a231d خلفيات). */
  --lu-card: var(--ad-card);
  --lu-line: var(--ad-line);
  --p2-card: var(--ad-card);
  --p2-bg: var(--ad-bg);
  --p2-line: var(--ad-line);
  --pf-card: var(--ad-card);
  --pf-line: var(--ad-line);
  --p2-soft: var(--ad-mint);
  --pf-soft: var(--ad-mint);
}
/* أزرار صفحات الطالب ٢ و«حسابي» في الليلي (اسأل معلمك، أبو العلم، دفتري): #46b088 القديم ← أخضر التطبيق الليلي */
html.ad1[data-theme="dark"] body:not(.t2) {
  --p2-g: #3fa37d;
  --pf-g2: #3fa37d;
}
/* الأخضر القديم #0f5c3f ← أخضر التطبيق (الليلي #7fd1ae يبقى) */
html.ad1:not([data-theme="dark"]) body:not(.t2):not(.t3) {
  --hxA: var(--c-green);
}

/* ٢) رأس الصفحات الداخلية (#ih): بدون شريط ولا خط فاصل — خلفية الصفحة تكمّل لفوق،
   وزر رجوع كبسولة بيضاء، وجرس دائري أبيض، ومربع الشخصية النعناعي، والعنوان بخط Alexandria (مثل معاينة «عن المنصة»). */
@media (max-width: 1099px) {
  html.ad1 body.stuHd.inner:not(.t2) aside.brand {
    border-bottom: 0;
  }
  html.ad1 body.stuHd.inner:not(.t2) #ih {
    padding-block: 12px 4px;
    gap: 14px;
  }
}
html.ad1 body:not(.t2) #ih .page-header {
  height: auto;
  min-height: 44px;
  gap: 8px;
}
html.ad1 body:not(.t2) #ih .page-back-btn {
  min-height: 40px;
  height: 40px;
  gap: 4px;
  padding-inline: 10px 14px;
  border: 1px solid var(--ad-line);
  border-radius: var(--r-pill);
  background: var(--ad-card);
  color: var(--hxA);
  font-size: 0.875rem;
  font-weight: 700;
}
html.ad1 body:not(.t2) #ih .page-back-btn svg {
  width: 16px;
  height: 16px;
  stroke-width: 2.4;
}
html.ad1 body:not(.t2) #ih .home-bell-btn {
  border: 1px solid var(--ad-line);
  background: var(--ad-card);
  color: var(--ad-ink);
}
/* نقطة «جديد» تنقطع بلون الجرس الأبيض */
html.ad1 body:not(.t2) #ih .home-bell-btn i {
  box-shadow: 0 0 0 2px var(--ad-card);
}
html.ad1 body:not(.t2) #ih .page-avatar-btn {
  width: 44px;
  height: 44px;
  border-radius: 15px;
  background: var(--ad-mint);
}
/* حجم الشخصية مثبّت ١٩px بـ !important (app.css .page-avatar-btn .av)، فنكبّرها بالتحجيم */
html.ad1 body:not(.t2) #ih .page-avatar-btn .av {
  transform: scale(1.3);
}
html.ad1 body:not(.t2) #ih .page-title {
  margin: 0;
  padding-inline-start: 0;
  font-family: Alexandria, "IBM Plex Sans Arabic", sans-serif;
  font-size: 1.75rem;
  line-height: 1.3;
  color: var(--ad-ink);
}
/* الوزن مثبّت ٦٠٠ بـ !important (app.css: html.ds3 #ih .page-title)؛ السطر الأول عنصر مستقل يقبل وزنه الخاص */
html.ad1 body:not(.t2) #ih .page-title::first-line {
  font-weight: 700;
}
html.ad1 body:not(.t2) #ih .page-subtitle {
  padding-inline-start: 0;
  color: var(--ad-muted);
}
/* ٣) الفصل المقفل في الرئيسية: كان بيج #e9e4d8 (base.css: .ds2 .car .cv.lk، !important) حتى في الليلي.
   نرسم فوقه رمادي-أخضر التطبيق بظل داخلي، مع حافته المحايدة (AD الرئيسية)، والنص على الأبناء. */
html.ad1 body.hm2 #h2car .cv.lk {
  box-shadow: var(--edge-lg) var(--card-edge), inset 0 0 0 999px #e3ebe6;
}
html.ad1[data-theme="dark"] body.hm2 #h2car .cv.lk {
  box-shadow: var(--edge-lg) var(--card-edge), inset 0 0 0 999px var(--ad-mint);
}
html.ad1 body.hm2 #h2car .cv.lk > * {
  color: var(--ad-muted);
}
html.ad1 body.hm2 #h2car .cv.lk b {
  color: var(--ad-ink);
}
html.ad1 body.hm2 #h2car .cv.lk .pg {
  background: var(--ad-card);
  color: var(--ad-muted);
}
/* رسمة الفصل المقفل خطوطها بيج (#b9b19f !important) — نطفّي لونها */
html.ad1 body.hm2 #h2car .cv.lk .big {
  filter: grayscale(1);
}

/* ٤) الليلي: الفصل المختار كان يصير أخضر «نقاء» #17644c (design-v2.css ٢٦) بدل لون الفصل */
html.ad1[data-theme="dark"] body.hm2 #h2car .cv.sel {
  --accent: var(--ad-ch);
  --g: var(--ad-ch);
}
/* أزرار «ابدأ» في خطة اليوم: أخضر «نقاء» الليلي #1f7a5c ← أخضر الهوية الثاني (أبيض عليه ٥:١) */
html.ad1[data-theme="dark"] body:not(.t2):not(.t3) {
  --dv-accent: var(--c-green-2);
}
/* شعار الرئيسية: ظل ضبابي (app.css: #hx .home-logo img بمحدِّد أقوى من قاعدة الرئيسية) ← حافة */
html.ad1 body.hm2 #hx .home-logo img {
  box-shadow: var(--edge) var(--green-edge);
}
/* زر تشغيل الفيديو الكبير: ظل ضبابي ← حافة */
html.ad1 body:not(.t2) #luPl .luBig {
  box-shadow: var(--edge) rgba(0, 0, 0, 0.35);
}
/* «ثبّت» في الملاحظات (الليلي): نعناعي قديم #46b088 ← أخضر التطبيق الليلي */
html.ad1[data-theme="dark"] body:not(.t2) #noteBox .luPin {
  background: #3fa37d;
  color: var(--ad-bg);
  box-shadow: var(--edge) var(--green-edge);
}

/* ٥) ألوان المختبر خارج صفحاته (#mxLesson داخل الدرس، ونافذة «اسأل المخلوق»): AD-C يوجّهها داخل .lb-page بس،
   وبرّاها تبقى ألوان المختبر الليلية القديمة (#0a1613 / #12221e / #21362f). نوجّه الأسطح المحايدة فقط؛ ألوان الأنشطة كما هي. */
html.ad1 body:not(.t2) .lb {
  --lb-bg: var(--ad-bg);
  --lb-card: var(--ad-card);
  --lb-ink: var(--ad-ink);
  --lb-mute: var(--ad-muted);
  --lb-line: var(--ad-line);
  --lb-soft: var(--ad-mint);
}
/* زر المختبر الأساسي في الليلي: #46b088 القديم ← أخضر التطبيق الليلي */
html.ad1[data-theme="dark"] body:not(.t2) .lb {
  --lb-g: #3fa37d;
  --lb-on: var(--ad-bg);
}

/* ٦) عناوين بقيت بخط النص: عنوان الورقة السفلية، وعناوين بطاقات نتائج تحصيلي.
   (عناوين الأقسام الصغيرة ١٣px مثل «المظهر» تبقى بخط النص — كذا في معاينة التطبيق.
   نص السؤال (#xv .dq h2 وأسئلة الدرس) مثبّت بخط النص بـ !important في app.css — قرار قراءة، ما لمسناه) */
html.ad1 body:not(.t2) #bShH,
html.ad1 body:not(.t2) #xv .league-heading,
html.ad1 body:not(.t2) #xv .card.t3R > h3 {
  font-family: Alexandria, "IBM Plex Sans Arabic", sans-serif;
}

/* ٧) ظلال ضبابية باقية ← حافة بارزة (الورقة السفلية وحدها تبقى بظلها) */
html.ad1 body:not(.t2) #sStart.lp #sGo {
  box-shadow: var(--edge) var(--green-edge);
}
html.ad1 body:not(.t2) .isl.show {
  box-shadow: var(--edge) rgba(0, 0, 0, 0.35);
}
html.ad1 body:not(.t2) #wheel {
  box-shadow: var(--edge-lg) rgba(0, 0, 0, 0.22);
}

/* تباين: زر «ابدأ …» في ورقة الفصل بالليلي (أبيض على #3fa37d ≈ ٢٫٩:١) — النظام يقول النص على الأخضر الفاتح غامق */
html.ad1[data-theme="dark"] body:not(.t2) .chapter-sheet-panel .chapter-sheet-go {
  color: #0e1714;
}
/* ===== AD-R end ===== */
/* ===== AD-T start: رأس الصفحات الداخلية مضغوط — الجرس والشخصية في الرئيسية بس =====
   الجرس والشخصية ينشالون من رأس كل الصفحات الداخلية (يبقون في الرئيسية).
   بالجوال: سهم الرجوع والعنوان في سطر واحد (١١٠ ← ٦٠ بكسل). غلاف الدرس (بدون عنوان) يبقى فيه زر الرجوع بالاسم.
   :has() غير مدعوم بمتصفحات قديمة → تبقى الإزالة بس، بنفس الترتيب القديم. */
html.ad1 body:not(.t2) #ih .home-bell-btn,
html.ad1 body:not(.t2) #ih .page-avatar-btn {
  display: none;
}
@media (max-width: 1099px) {
  html.ad1 body.stuHd.inner:not(.t2) #ih:has(.page-title) {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    column-gap: 12px;
    row-gap: 0;
    align-items: center;
    padding-block: 10px 6px;
  }
  html.ad1 body:not(.t2) #ih:has(.page-title) .page-header {
    grid-row: 1 / span 2;
    min-height: 44px;
    height: 44px;
  }
  html.ad1 body:not(.t2) #ih:has(.page-title) .page-back-btn {
    margin: 0;
    width: 44px;
    min-width: 44px;
    height: 44px;
    min-height: 44px;
    padding: 0;
    justify-content: center;
    border-radius: 15px;
  }
  html.ad1 body:not(.t2) #ih:has(.page-title) .page-back-btn span {
    display: none;
  }
  html.ad1 body:not(.t2) #ih:has(.page-title) .page-back-btn svg {
    width: 20px;
    height: 20px;
  }
  html.ad1 body:not(.t2) #ih .page-title {
    font-size: 1.375rem;
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  html.ad1 body:not(.t2) #ih .page-subtitle {
    grid-column: 2;
    font-size: 0.8125rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
}
/* ===== AD-T end ===== */
/* ===== AD-U start: نتيجة السؤال كبطاقة من تحت (#lqFb.qsOn) + «بعد الفيديو: ٣ أسئلة» تحت الفيديو (.qsAfter) — assets/lesson-qs.js ===== */
/* البطاقة: نفس #lqFb (النتيجة + «السؤال التالي») ثابت تحت الشاشة. التصحيح فوري مثل قبل، والصفحة تنزل خلفها.
   اللون حسب النتيجة: qsG صح، qsB خطأ، qsN «ما أعرف». الحافة البارزة فوق بدل الظل. */
html.ad1 body:not(.t2):not(.tq) #quiz #lqFb.qsOn {
  --qs-bg: #e6f6ee;
  --qs-edge: #b5dcc6;
  --qs-ic: #1f9d63;
  --qs-gl: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E");
  --qs-btn: #1f9d63;
  --qs-btn-edge: #157a4b;
  --qs-btn-tx: #fff;
  position: fixed;
  inset-inline: 0;
  inset-block-end: 0;
  z-index: 70;
  display: flex;
  flex-direction: column;
  gap: 14px;
  max-block-size: min(62vh, 560px);
  overflow-y: auto;
  overscroll-behavior: contain;
  margin: 0;
  padding: 10px 20px calc(18px + env(safe-area-inset-bottom, 0px));
  border-radius: var(--r-5xl) var(--r-5xl) 0 0;
  background: var(--qs-bg);
  color: var(--ad-ink);
  box-shadow: 0 -3px 0 var(--qs-edge);
  animation: adQsUp 0.28s cubic-bezier(0.16, 1, 0.3, 1);
}
html.ad1 body:not(.t2):not(.tq) #quiz #lqFb.qsOn.qsB {
  --qs-bg: #fbeae7;
  --qs-edge: #efc2bb;
  --qs-ic: #b3261e;
  --qs-gl: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='2.6' stroke-linecap='round'%3E%3Cpath d='M7 7l10 10M17 7L7 17'/%3E%3C/svg%3E");
  --qs-btn: var(--c-green);
  --qs-btn-edge: var(--green-edge);
}
html.ad1 body:not(.t2):not(.tq) #quiz #lqFb.qsOn.qsN {
  --qs-bg: #fff4d6;
  --qs-edge: #f0d58a;
  --qs-ic: #c98f00;
  --qs-gl: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='2.8' stroke-linecap='round'%3E%3Cpath d='M12 6.5v7M12 17.5h.01'/%3E%3C/svg%3E");
  --qs-btn: var(--c-green);
  --qs-btn-edge: var(--green-edge);
}
html.ad1[data-theme="dark"] body:not(.t2):not(.tq) #quiz #lqFb.qsOn {
  --qs-bg: #173a2a;
  --qs-edge: #0a2419;
  --qs-ic: #2bb673;
  --qs-btn: #2bb673;
  --qs-btn-edge: #0a3a24;
  --qs-btn-tx: #06140f;
}
html.ad1[data-theme="dark"] body:not(.t2):not(.tq) #quiz #lqFb.qsOn.qsB {
  --qs-bg: #3a1e1a;
  --qs-edge: #1f0f0c;
  --qs-ic: #c9483a;
  --qs-btn: #3fa37d;
  --qs-btn-edge: #05201a;
}
html.ad1[data-theme="dark"] body:not(.t2):not(.tq) #quiz #lqFb.qsOn.qsN {
  --qs-bg: #3a3016;
  --qs-edge: #1f190a;
  --qs-ic: #b98a12;
  --qs-btn: #3fa37d;
  --qs-btn-edge: #05201a;
}
/* مقبض صغير فوق (شكل النافذة) */
html.ad1 body:not(.t2):not(.tq) #quiz #lqFb.qsOn::before {
  content: "";
  flex: none;
  align-self: center;
  inline-size: 40px;
  block-size: 4px;
  border-radius: var(--r-pill);
  background: currentColor;
  opacity: 0.18;
}
/* المحتوى نفسه بدون صندوق (البطاقة هي الخلفية) */
html.ad1 body:not(.t2):not(.tq) #quiz #lqFb.qsOn > .lesson-quiz-feedback {
  background: transparent;
  border-radius: 0;
  box-shadow: none;
  margin: 0;
  font-size: 0.9375rem;
  color: var(--ad-ink);
}
/* العنوان: دائرة ٤٨ فيها ✓ / ✕ / ! + «أحسنت!» أو «إجابة خاطئة» (أيقونة الرموز القديمة تنشال هنا بس) */
html.ad1 body:not(.t2):not(.tq) #quiz #lqFb.qsOn > .lesson-quiz-feedback > b:first-child {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 6px;
  font-family: Alexandria, "IBM Plex Sans Arabic", sans-serif;
  font-size: 1.25rem;
  line-height: 1.4;
}
html.ad1 body:not(.t2):not(.tq) #quiz #lqFb.qsOn > .lesson-quiz-feedback > b:first-child::before {
  content: "";
  flex: none;
  inline-size: 48px;
  block-size: 48px;
  border-radius: var(--r-pill);
  background: var(--qs-gl) center / 24px no-repeat, var(--qs-ic);
}
html.ad1 body:not(.t2):not(.tq) #quiz #lqFb.qsOn > .lesson-quiz-feedback > b:first-child .t3i {
  display: none;
}
/* «التالي»: آخر شي في البطاقة وبعرضها، أخضر النجاح لو صح وأخضر الموقع غير كذا، ولاصق تحت لو طال المحتوى */
html.ad1 body:not(.t2):not(.tq) #quiz #lqFb.qsOn > .lesson-quiz-next {
  order: 9;
  position: sticky;
  inset-block-end: 0;
  z-index: 1;
  flex: none;
  inline-size: 100%;
  margin: 0 0 4px;
  background: var(--qs-btn);
  color: var(--qs-btn-tx);
  box-shadow: var(--edge) var(--qs-btn-edge);
}
html.ad1 body:not(.t2):not(.tq) #quiz #lqFb.qsOn > .lxBox {
  margin: 0;
}
/* مسافة تحت الأسئلة بطول البطاقة (--qs-h من JS) عشان الخيارات ما تنغطى، والتنبيهات فوق البطاقة */
html.ad1 body.qsOpen:not(.t2):not(.tq) #quiz::after {
  content: "";
  display: block;
  block-size: var(--qs-h, 0px);
}
html.ad1 body.qsOpen:not(.t2) .toast {
  bottom: calc(var(--qs-h, 0px) + 12px);
}
/* الكمبيوتر (١١٠٠ وفوق): ما تنضاف qsOn أصلًا (lesson-qs.js) — النتيجة تبقى تحت الخيارات */
@keyframes adQsUp {
  from {
    transform: translateY(100%);
  }
  to {
    transform: none;
  }
}

/* «بعد الفيديو: ٣ أسئلة قصيرة»: كبسولة ذهبية بحافة تحت الفيديو (وتحت زر «ملاحظاتي») */
html.ad1 body:not(.t2) .qsAfter {
  display: flex;
  align-items: center;
  gap: 12px;
  inline-size: 100%;
  min-block-size: 56px;
  margin-block-start: 12px;
  padding: 8px 18px 8px 16px;
  border: 0;
  border-radius: var(--r-pill);
  background: var(--c-gold);
  color: #2a1e00;
  box-shadow: var(--edge) var(--gold-edge);
  font-family: "IBM Plex Sans Arabic", sans-serif;
  text-align: start;
  cursor: pointer;
  transition: transform 0.12s, box-shadow 0.12s;
}
html.ad1 body:not(.t2) .qsAfter[hidden] {
  display: none;
}
html.ad1 body:not(.t2) .qsAfter:active {
  transform: translateY(3px);
  box-shadow: 0 1px 0 var(--gold-edge);
}
html.ad1 body:not(.t2) .qsAfter:focus-visible {
  outline: 3px solid var(--ad-ink);
  outline-offset: 3px;
}
html.ad1 body:not(.t2) .qsAfter svg {
  inline-size: 22px;
  block-size: 22px;
  flex: none;
}
html.ad1 body:not(.t2) .qsAfter .qsAfterI {
  display: inline-grid;
  place-items: center;
  flex: none;
}
html.ad1 body:not(.t2) .qsAfter .qsAfterT {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-inline-size: 0;
  line-height: 1.4;
}
html.ad1 body:not(.t2) .qsAfter .qsAfterT b {
  font-weight: 700;
  font-size: 0.9375rem;
}
html.ad1 body:not(.t2) .qsAfter .qsAfterT small {
  font-size: 0.8125rem;
  font-weight: 500;
  color: #5a4300;
}
html.ad1 body:not(.t2) .qsAfter .qsAfterGo {
  inline-size: 18px;
  block-size: 18px;
}
html.ad1[data-theme="dark"] body:not(.t2) .qsAfter {
  background: #e8bc52;
  color: #241a00;
  box-shadow: var(--edge) #6b4e00;
}
html.ad1[data-theme="dark"] body:not(.t2) .qsAfter .qsAfterT small {
  color: #3d2c00;
}
html.ad1[data-theme="dark"] body:not(.t2) .qsAfter:active {
  box-shadow: 0 1px 0 #6b4e00;
}
@media (prefers-reduced-motion: reduce) {
  html.ad1 body:not(.t2):not(.tq) #quiz #lqFb.qsOn {
    animation: none;
  }
  html.ad1 body:not(.t2) .qsAfter {
    transition: none;
  }
}
/* ===== AD-U end ===== */
/* ===== AD-Q2 start: «أبلغ عن مشكلة في السؤال» — علم في رأس السؤال + «السؤال فيه خطأ؟» في بطاقة النتيجة + نافذة البلاغ (#eiReportDialog) — assets/q-report.js ===== */
/* الرابط القديم (بين السؤال والخيارات) يختفي بس لما q-report.js يحط بديله (.qfOld) — ضغطه نفسه يصير من الأزرار الجديدة */
html.ad1 body:not(.t2) .ei.qfOld {
  display: none;
}
/* «بلّغ عن خطأ»: كبسولة نعناعية صغيرة (علم + نص) في زاوية رأس السؤال — واضحة بس أهدأ من الخيارات */
html.ad1 body:not(.t2) :is(#quiz, #xv, .ptO) .qfFlag {
  --qf-c: var(--c-green);
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  block-size: 44px;
  min-block-size: 44px;
  margin-inline-start: 2px;
  padding: 0 12px 0 14px;
  border: 0;
  border-radius: var(--r-pill);
  background: var(--ad-mint);
  color: var(--qf-c);
  font: 700 0.8125rem/1 "IBM Plex Sans Arabic", sans-serif;
  white-space: nowrap;
  cursor: pointer;
  transition: transform 0.12s, background 0.12s;
}
html.ad1 body:not(.t2) :is(#quiz, #xv, .ptO) .qfFlag svg {
  flex: none;
  inline-size: 17px;
  block-size: 17px;
}
html.ad1 body:not(.t2) :is(#quiz, #xv, .ptO) .qfFlag:hover {
  background: color-mix(in srgb, var(--qf-c) 16%, var(--ad-mint));
}
html.ad1 body:not(.t2) :is(#quiz, #xv, .ptO) .qfFlag:active {
  transform: scale(0.95);
}
/* الاختبار القبلي: النقاط والكبسولة في سطر واحد */
html.ad1 body:not(.t2) .ptO .ptTop:has(.qfFlag) {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
html.ad1 body:not(.t2) #eiReportDialog.qfD .qfKind[hidden] {
  display: none;
}
html.ad1 body:not(.t2) :is(#quiz, #xv, .ptO) :is(.qfFlag, .qfChip):focus-visible {
  outline: 3px solid var(--ad-ink);
  outline-offset: 2px;
}
html.ad1[data-theme="dark"] body:not(.t2) :is(#quiz, #xv, .ptO) .qfFlag {
  --qf-c: #7fd3ab;
}
/* الكبسولة «السؤال فيه خطأ؟»: ثانوية وهادية (بدون تعبئة) — في بطاقة النتيجة فوق «التالي»، أو آخر السؤال لو ما له رأس */
html.ad1 body:not(.t2) :is(#quiz, #xv, .ptO) .qfChip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-block-size: 44px;
  padding: 0 16px;
  border: 1.5px solid color-mix(in srgb, currentColor 28%, transparent);
  border-radius: var(--r-pill);
  background: transparent;
  color: var(--ad-muted);
  font: 600 0.875rem/1.4 "IBM Plex Sans Arabic", sans-serif;
  cursor: pointer;
  transition: transform 0.12s, background 0.12s;
}
html.ad1 body:not(.t2) :is(#quiz, #xv, .ptO) .qfChip svg {
  inline-size: 16px;
  block-size: 16px;
  flex: none;
}
html.ad1 body:not(.t2) :is(#quiz, #xv, .ptO) .qfChip:hover {
  background: color-mix(in srgb, currentColor 8%, transparent);
}
html.ad1 body:not(.t2) :is(#quiz, #xv, .ptO) .qfChip:active {
  transform: scale(0.96);
}
html.ad1 body:not(.t2) :is(#quiz, #xv, .ptO) .qfChip.qfRes {
  margin: 2px 0 10px;
}
html.ad1 body:not(.t2):not(.tq) #quiz #lqFb.qsOn > .qfChip.qfRes {
  order: 8;
  align-self: center;
  margin: -2px 0 0;
}
html.ad1 body:not(.t2) :is(#quiz, #xv, .ptO) .qfChip.qfEnd {
  margin-block-start: 12px;
}

/* النافذة: بطاقة في الوسط على الكمبيوتر، ونافذة من تحت على الجوال (تحت) */
html.ad1 body:not(.t2) #eiReportDialog.qfD {
  inline-size: min(460px, calc(100% - 32px));
  max-block-size: 90dvh;
  padding: 22px 22px 24px;
  border: 0;
  border-radius: var(--r-5xl);
  background: var(--ad-card);
  color: var(--ad-ink);
  box-shadow: var(--edge-lg) var(--card-edge);
}
html.ad1 body:not(.t2) #eiReportDialog.qfD::backdrop {
  background: #10302a8c;
  backdrop-filter: blur(3px);
}
html.ad1 body:not(.t2) #eiReportDialog.qfD .eiClose {
  float: none;
  position: absolute;
  inset-block-start: 14px;
  inset-inline-end: 14px;
  display: grid;
  place-items: center;
  inline-size: 40px;
  min-block-size: 40px;
  block-size: 40px;
  padding: 0;
  border: 0;
  border-radius: var(--r-pill);
  background: var(--ad-mint);
  color: var(--ad-ink);
  font-size: 22px;
  line-height: 1;
}
/* الخلية بعدستها + العنوان الدافي */
html.ad1 body:not(.t2) #eiReportDialog.qfD .qfCellW {
  display: flex;
  justify-content: center;
  margin-block-start: 2px;
}
html.ad1 body:not(.t2) #eiReportDialog.qfD .qfCell {
  inline-size: 92px;
  block-size: 84px;
  animation: adQfBob 2.8s ease-in-out infinite;
}
html.ad1 body:not(.t2) #eiReportDialog.qfD h2 {
  margin: 6px 0 0;
  font: 700 1.25rem/1.6 Alexandria, "IBM Plex Sans Arabic", sans-serif;
  text-align: center;
  color: var(--ad-ink);
}
html.ad1 body:not(.t2) #eiReportDialog.qfD .qfSub {
  margin: 2px 0 0;
  font-size: 0.875rem;
  line-height: 1.7;
  text-align: center;
  color: var(--ad-muted);
}
/* اسم الدرس كبسولة صغيرة، ونص السؤال في صندوق اقتباس ناعم */
html.ad1 body:not(.t2) #eiReportDialog.qfD .eiTopic {
  inline-size: fit-content;
  max-inline-size: 100%;
  margin: 14px 0 6px;
  padding: 2px 12px;
  border-radius: var(--r-pill);
  background: var(--ad-mint);
  color: var(--ad-muted);
  font-size: 0.8125rem;
  font-weight: 600;
}
html.ad1 body:not(.t2) #eiReportDialog.qfD .eiTopic:empty {
  display: none;
}
html.ad1 body:not(.t2) #eiReportDialog.qfD #eiReportQuestion {
  position: relative;
  max-block-size: 8.5em;
  overflow-y: auto;
  margin: 0 0 14px;
  padding: 12px 16px 12px 14px;
  border: 0;
  border-inline-start: 4px solid var(--qf-q, #1f9d63);
  border-radius: var(--r-2xl);
  border-start-start-radius: 6px;
  border-end-start-radius: 6px;
  background: var(--ad-bg);
  color: var(--ad-ink);
  font-weight: 600;
  line-height: 1.8;
}
html.ad1[data-theme="dark"] body:not(.t2) #eiReportDialog.qfD #eiReportQuestion {
  --qf-q: #2bb673;
}
/* نوع المشكلة: الـselect مخفي (الإرسال يقرأه مثل قبل) والاختيار من الكبسولات */
html.ad1 body:not(.t2) #eiReportDialog.qfD label {
  margin: 0 0 8px;
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--ad-ink);
}
html.ad1 body:not(.t2) #eiReportDialog.qfD .qfKindL {
  position: relative;
  pointer-events: none;
}
html.ad1 body:not(.t2) #eiReportDialog.qfD .qfKindL select {
  position: absolute;
  inset-inline-start: 0;
  inset-block-start: 0;
  inline-size: 1px;
  block-size: 1px;
  padding: 0;
  border: 0;
  opacity: 0;
  overflow: hidden;
  clip-path: inset(50%);
}
html.ad1 body:not(.t2) #eiReportDialog.qfD .qfKinds {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 16px;
}
html.ad1 body:not(.t2) #eiReportDialog.qfD .qfKind {
  min-block-size: 44px;
  padding: 6px 16px;
  border: 1.5px solid var(--ad-line);
  border-radius: var(--r-pill);
  background: var(--ad-card);
  color: var(--ad-ink);
  font-size: 0.875rem;
  font-weight: 600;
  box-shadow: 0 3px 0 var(--card-edge);
}
html.ad1 body:not(.t2) #eiReportDialog.qfD .qfKind[aria-pressed="true"] {
  border-color: #1f9d63;
  background: #e6f6ee;
  color: #0d4f3c;
  box-shadow: 0 3px 0 #b5dcc6;
}
html.ad1[data-theme="dark"] body:not(.t2) #eiReportDialog.qfD .qfKind[aria-pressed="true"] {
  border-color: #2bb673;
  background: #173a2a;
  color: #c9f0dc;
  box-shadow: 0 3px 0 #0a2419;
}
html.ad1 body:not(.t2) #eiReportDialog.qfD textarea {
  margin-block-start: 6px;
  padding: 12px 14px;
  border: 1.5px solid var(--ad-line);
  border-radius: var(--r-2xl);
  background: var(--ad-bg);
  color: var(--ad-ink);
  font-weight: 400;
  line-height: 1.7;
  resize: vertical;
}
html.ad1 body:not(.t2) #eiReportDialog.qfD textarea::placeholder {
  color: var(--ad-muted);
  opacity: 0.85;
}
html.ad1 body:not(.t2) #eiReportDialog.qfD textarea:focus {
  border-color: #1f9d63;
}
/* زر الإرسال: الأخضر الأساسي بحافته */
html.ad1 body:not(.t2) #eiReportDialog.qfD .eiPrimary {
  inline-size: 100%;
  min-block-size: 56px;
  margin-block-start: 6px;
  border: 0;
  border-radius: var(--r-pill);
  background: var(--c-green);
  color: #fff;
  font: 700 1rem/1.4 Alexandria, "IBM Plex Sans Arabic", sans-serif;
  box-shadow: var(--edge) var(--green-edge);
}
html.ad1 body:not(.t2) #eiReportDialog.qfD .eiPrimary:active {
  transform: translateY(3px);
  box-shadow: 0 1px 0 var(--green-edge);
}
html.ad1 body:not(.t2) #eiReportDialog.qfD .eiPrimary:disabled {
  opacity: 0.7;
}
html.ad1[data-theme="dark"] body:not(.t2) #eiReportDialog.qfD .eiPrimary {
  background: #2bb673;
  color: #06140f;
  box-shadow: var(--edge) #0a3a24;
}
html.ad1[data-theme="dark"] body:not(.t2) #eiReportDialog.qfD .eiPrimary:active {
  box-shadow: 0 1px 0 #0a3a24;
}
html.ad1 body:not(.t2) #eiReportDialog.qfD #eiReportMsg:not(:empty) {
  margin-block-end: 8px;
}
/* الجوال: نافذة من تحت بزوايا ٢٨ ومقبض (تنقفل بـ✕ وEsc ولمسة برّا) */
@media (max-width: 699px) {
  html.ad1 body:not(.t2) #eiReportDialog.qfD {
    inline-size: 100%;
    max-inline-size: 100%;
    max-block-size: 92dvh;
    margin: auto 0 0;
    padding: 10px 20px calc(20px + env(safe-area-inset-bottom, 0px));
    border-radius: var(--r-5xl) var(--r-5xl) 0 0;
    box-shadow: 0 -3px 0 var(--card-edge);
    animation: adQfUp 0.28s cubic-bezier(0.16, 1, 0.3, 1);
  }
  html.ad1 body:not(.t2) #eiReportDialog.qfD::before {
    content: "";
    display: block;
    inline-size: 40px;
    block-size: 4px;
    margin: 0 auto 6px;
    border-radius: var(--r-pill);
    background: currentColor;
    opacity: 0.18;
  }
  html.ad1 body:not(.t2) #eiReportDialog.qfD .eiClose {
    inset-block-start: 16px;
  }
}
@keyframes adQfUp {
  from {
    transform: translateY(100%);
  }
  to {
    transform: none;
  }
}
@keyframes adQfBob {
  50% {
    transform: translateY(-3px) rotate(-2deg);
  }
}
@media (prefers-reduced-motion: reduce) {
  html.ad1 body:not(.t2) #eiReportDialog.qfD,
  html.ad1 body:not(.t2) #eiReportDialog.qfD .qfCell {
    animation: none;
  }
  html.ad1 body:not(.t2) :is(#quiz, #xv, .ptO) :is(.qfFlag, .qfChip) {
    transition: none;
  }
}
/* ===== AD-Q2 end ===== */
/* ===== AD-W start: الألعاب — رسومات الشخصيات، حلقة مؤقت تحدي الدقيقة، النتيجة كبطاقة من تحت (assets/games-art.js) ===== */
/* مركز الألعاب: رسمة الشخصية مكان الرسمة الهندسية (القديمة مخفية بس، عشان ?ad1=0 يرجع كما هو) */
html.ad1 body:not(.t2) #xv[data-ad="games"] .games-card-art {
  height: 104px;
}
html.ad1 body:not(.t2) #xv[data-ad="games"] .games-card-art > svg.gx-old {
  display: none;
}
html.ad1 body:not(.t2) #xv[data-ad="games"] .games-card-art > svg.gx-art {
  width: 140px;
  height: 104px;
}
/* رأس اللعبة: الشخصية فوق بطاقة البداية الملونة، وصغيرة جنب عنوان اللعب */
html.ad1 body:not(.t2) #xv svg.gx-hero {
  display: block;
  width: 128px;
  height: 95px;
  margin-inline: auto;
  margin-block-end: 4px;
}
html.ad1 body:not(.t2) #xv h2.gx-h {
  display: flex;
  align-items: center;
  gap: 8px;
}
html.ad1 body:not(.t2) #xv svg.gx-mini {
  flex-shrink: 0;
  width: 60px;
  height: 45px;
}
/* حلقة تحدي الدقيقة: الرقم من نفس المؤقت (#g2Time)، والحبة القديمة تبقى لقارئ الشاشة بس */
html.ad1 body:not(.t2) #xv[data-ad="chal"] .gx-chal {
  --gx-arc: #e0a100;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  gap: 16px;
  margin-block-end: 14px;
  padding: 14px 18px;
  border-radius: var(--r-5xl);
  background: #b4531f;
  color: #fff;
  box-shadow: var(--edge-lg) #883e16;
}
html.ad1[data-theme="dark"] body:not(.t2) #xv[data-ad="chal"] .gx-chal {
  background: #8f4119;
  box-shadow: var(--edge-lg) #4f220b;
}
html.ad1 body:not(.t2) #xv[data-ad="chal"] .gx-chal::before {
  content: "";
  position: absolute;
  inset-block-start: -60px;
  inset-inline-end: -50px;
  width: 150px;
  height: 150px;
  border-radius: var(--r-pill);
  background: rgba(255, 255, 255, 0.08);
}
html.ad1 body:not(.t2) #xv[data-ad="chal"] .gx-chal.hurry {
  --gx-arc: #d9483b;
}
html.ad1 body:not(.t2) #xv[data-ad="chal"] .gx-ring {
  position: relative;
  flex-shrink: 0;
  width: 112px;
  height: 112px;
}
html.ad1 body:not(.t2) #xv[data-ad="chal"] .gx-ring svg {
  display: block;
  width: 100%;
  height: 100%;
}
html.ad1 body:not(.t2) #xv[data-ad="chal"] .gx-ring-bg {
  fill: #fff4d6;
}
html.ad1 body:not(.t2) #xv[data-ad="chal"] :is(.gx-ring-tr, .gx-ring-arc) {
  fill: none;
  stroke-width: 10;
}
html.ad1 body:not(.t2) #xv[data-ad="chal"] .gx-ring-tr {
  stroke: rgba(136, 62, 22, 0.25);
}
html.ad1 body:not(.t2) #xv[data-ad="chal"] .gx-ring-arc {
  stroke: var(--gx-arc);
  stroke-linecap: round;
  transition: stroke-dashoffset 0.25s linear, stroke 0.3s;
}
html.ad1 body:not(.t2) #xv[data-ad="chal"] .gx-ring-n {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #883e16;
}
html.ad1 body:not(.t2) #xv[data-ad="chal"] .gx-ring-n b {
  font-family: Alexandria, "IBM Plex Sans Arabic", sans-serif;
  font-weight: 700;
  font-size: 2.1rem;
  line-height: 1;
}
html.ad1 body:not(.t2) #xv[data-ad="chal"] .gx-ring-n small {
  font-size: 0.75rem;
  font-weight: 700;
}
html.ad1 body:not(.t2) #xv[data-ad="chal"] .gx-chal-t {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
html.ad1 body:not(.t2) #xv[data-ad="chal"] .gx-chal-t b {
  font-family: Alexandria, "IBM Plex Sans Arabic", sans-serif;
  font-size: 1.2rem;
}
html.ad1 body:not(.t2) #xv[data-ad="chal"] .gx-chal-t span {
  font-size: 0.85rem;
  line-height: 1.7;
  color: #ffe3cf;
}
html.ad1 body:not(.t2) #xv[data-ad="chal"] .chalPlay.gx-timed .chT {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
/* النتيجة كبطاقة من تحت: نفس بطاقة النتيجة (.g2-result) أو بطاقة وردل، ثابتة تحت الشاشة فوق خلفية معتمة */
html.ad1 body:not(.t2) #xv .gx-scrim {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(4, 25, 27, 0.45);
}
html.ad1 body:not(.t2) #xv .gx-sheet {
  position: fixed;
  inset-inline: 0;
  inset-block-end: 0;
  z-index: 1001;
  max-height: 88vh;
  max-height: 88dvh;
  overflow-y: auto;
  overscroll-behavior: contain;
  margin: 0;
  padding: 12px 20px calc(22px + env(safe-area-inset-bottom, 0px));
  border: 0;
  border-radius: var(--r-5xl) var(--r-5xl) 0 0;
  background: var(--ad-card);
  color: var(--ad-ink);
  box-shadow: none;
  animation: gx-up 0.32s ease-out;
}
html.ad1 body:not(.t2) #xv .gx-sheet:focus {
  outline: none;
}
html.ad1 body:not(.t2) #xv .gx-sheet:focus-visible {
  outline: 3px solid var(--ad-mint);
  outline-offset: -3px;
}
html.ad1 body.dsk:not(.t2) #xv .gx-sheet {
  inset-block-end: 24px;
  max-width: 560px;
  margin-inline: auto;
  border-radius: var(--r-5xl);
}
html.ad1 body:not(.t2) #xv .gx-sheet .gx-grab {
  display: block;
  width: 40px;
  height: 4px;
  margin: 0 auto 4px;
  border-radius: var(--r-pill);
  background: var(--ad-line);
}
html.ad1 body:not(.t2) #xv .gx-sheet .gx-x {
  position: absolute;
  inset-block-start: 12px;
  inset-inline-end: 14px;
  width: 44px;
  height: 44px;
  min-height: 44px;
  padding: 0;
  border: 0;
  border-radius: var(--r-pill);
  background: var(--ad-bg);
  color: var(--ad-ink);
  display: grid;
  place-items: center;
  box-shadow: none;
  cursor: pointer;
}
html.ad1 body:not(.t2) #xv svg.gx-face {
  display: block;
  width: 124px;
  height: 90px;
  margin-inline: auto;
}
/* وردل: العنوان والمصطلح بحروف، ثم الرسالة وسطر النقاط والزر من الصفحة نفسها */
html.ad1 body:not(.t2) #xv[data-ad="wordle"] .gx-wsheet {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  margin-block-start: 14px;
  padding: 18px;
  border-radius: var(--r-5xl);
  background: var(--ad-card);
  color: var(--ad-ink);
  text-align: center;
  box-shadow: var(--edge) var(--card-edge);
}
html.ad1 body:not(.t2) #xv[data-ad="wordle"] .gx-wsheet.gx-sheet {
  margin-block-start: 0;
  padding-block-start: 12px;
  box-shadow: none;
}
html.ad1 body:not(.t2) #xv[data-ad="wordle"] .gx-st {
  font-family: Alexandria, "IBM Plex Sans Arabic", sans-serif;
  font-weight: 700;
  font-size: 1.4rem;
}
html.ad1 body:not(.t2) #xv[data-ad="wordle"] .gx-tiles {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
}
html.ad1 body:not(.t2) #xv[data-ad="wordle"] .gx-tiles span {
  width: 46px;
  height: 46px;
  border-radius: var(--r-md);
  background: #5e7a72;
  color: #fff;
  display: grid;
  place-items: center;
  font-family: Alexandria, "IBM Plex Sans Arabic", sans-serif;
  font-weight: 700;
  font-size: 1.25rem;
}
html.ad1 body:not(.t2) #xv[data-ad="wordle"] .gx-tiles.won span {
  background: #1f9d63;
  box-shadow: 0 3px 0 #147046;
}
html.ad1 body:not(.t2) #xv[data-ad="wordle"] .gx-wsheet > .msg {
  margin: 0;
  padding: 0;
  background: none;
  color: var(--ad-muted);
  font-size: 0.95rem;
  line-height: 1.7;
}
html.ad1 body:not(.t2) #xv[data-ad="wordle"] .gx-wsheet > .msg b {
  color: var(--ad-ink);
}
/* ‏.card عليها حد إجباري قديم في app.css يقرأ --line، فنصفّره هنا */
html.ad1 body:not(.t2) #xv[data-ad="wordle"] .gx-wsheet > .card {
  --line: transparent;
  width: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  box-shadow: none;
}
html.ad1 body:not(.t2) #xv[data-ad="wordle"] .gx-wsheet > .card .row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 12px;
}
html.ad1 body:not(.t2) #xv[data-ad="wordle"] .gx-wsheet #g2Games {
  flex: 1 1 100%;
  min-height: 52px;
  border-radius: var(--r-pill);
}
/* الحركة: بس لمن ما طلب تقليل الحركة */
@keyframes gx-up {
  from { transform: translateY(100%); }
  to { transform: none; }
}
@keyframes gx-bob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-4px); }
}
@keyframes gx-tw {
  0%, 100% { opacity: 0.4; transform: scale(0.8); }
  50% { opacity: 1; transform: scale(1); }
}
@keyframes gx-sway {
  0%, 100% { transform: rotate(-3deg); }
  50% { transform: rotate(3deg); }
}
@keyframes gx-spin {
  to { transform: rotate(360deg); }
}
@keyframes gx-blink {
  0%, 92%, 100% { transform: scaleY(1); }
  96% { transform: scaleY(0.1); }
}
@media (prefers-reduced-motion: no-preference) {
  html.ad1 body:not(.t2) #xv svg.gx-art .gx-bob { animation: gx-bob 2.6s ease-in-out infinite; }
  html.ad1 body:not(.t2) #xv svg.gx-art .gx-bob.d2 { animation-delay: 1.3s; }
  html.ad1 body:not(.t2) #xv svg.gx-art .gx-tw { animation: gx-tw 2.4s ease-in-out infinite; }
  html.ad1 body:not(.t2) #xv svg.gx-art .gx-tw.d2 { animation-delay: 1.2s; }
  html.ad1 body:not(.t2) #xv svg.gx-art .gx-sway { animation: gx-sway 3s ease-in-out infinite; }
  html.ad1 body:not(.t2) #xv svg.gx-art .gx-sweep { animation: gx-spin 3s linear infinite; }
  html.ad1 body:not(.t2) #xv svg.gx-art .gx-blink { animation: gx-blink 4s infinite; }
}
@media (prefers-reduced-motion: reduce) {
  html.ad1 body:not(.t2) #xv .gx-sheet { animation: none; }
  html.ad1 body:not(.t2) #xv[data-ad="chal"] .gx-ring-arc { transition: none; }
}
/* ===== AD-W end ===== */
/* ===== AD-X start: تقدّمي (#me: «آخر ٧ أيام» و«مهارات تحتاج تقوية») + الدوري (#dawri: «سباق الشعب» بأعمدة) — assets/me-insights.js ===== */
/* ألوان المربعات والأعمدة (من شاشة التطبيق)، والليلي أغمق */
html.ad1 body:not(.t2) #xv {
  --mx-0: var(--ad-mint);
  --mx-1: #9fd3bf;
  --mx-2: #2bb673;
  --mx-3: #17784a;
  --mx-gold: #ffd166;
  --mx-warn: #fff4d6;
  --mx-warn-ink: #6b5300;
  --mx-warn-ic: #8a6400;
  --mx-bar-me: var(--c-green);
  --mx-bar-1: #9fd3bf;
  --mx-bar-2: #cfe6dc;
}
html.ad1[data-theme="dark"] body:not(.t2) #xv {
  --mx-1: #2c5a48;
  --mx-2: #1f8a57;
  --mx-3: #2bb673;
  --mx-warn: #2e2814;
  --mx-warn-ink: #e8d29a;
  --mx-warn-ic: #f0c75e;
  --mx-bar-me: #2bb673;
  --mx-bar-1: #2c5a48;
  --mx-bar-2: #24443a;
}
/* «نشاطي هذا الأسبوع» القديمة تنخفي مع ad1 بس — مكانها «آخر ٧ أيام» */
/* قرار المعلم: «تقويم حضورك» (٥ أسابيع) يتكرر مع «آخر ٧ أيام» → ينشال مع ad1 */
html.ad1 body:not(.t2) #xv:has(> #mxWk) > .heatmap-cell,
html.ad1 body:not(.t2) #xv:has(> #mxWk) > .profile-card:has(.profile-week) {
  display: none;
}
html.ad1 body:not(.t2) #xv > .mxWk h4 span {
  font: 400 0.75rem "IBM Plex Sans Arabic", sans-serif;
  color: var(--ad-muted);
}
html.ad1 body:not(.t2) #xv .mxWk-g {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 6px;
  margin-block-start: 12px;
  text-align: center;
}
html.ad1 body:not(.t2) #xv .mxWk-c {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 0.6875rem;
  color: var(--ad-muted);
}
html.ad1 body:not(.t2) #xv .mxWk-g i,
html.ad1 body:not(.t2) #xv .mxWk-k i {
  display: block;
  height: 36px;
  border-radius: var(--r-sm);
  background: var(--mx-0);
}
html.ad1 body:not(.t2) #xv :is(.mxWk-g, .mxWk-k) i.l1 { background: var(--mx-1); }
html.ad1 body:not(.t2) #xv :is(.mxWk-g, .mxWk-k) i.l2 { background: var(--mx-2); }
html.ad1 body:not(.t2) #xv :is(.mxWk-g, .mxWk-k) i.l3 { background: var(--mx-3); }
/* اليوم: حلقة ذهبية */
html.ad1 body:not(.t2) #xv .mxWk-g i.td {
  box-shadow: 0 0 0 3px var(--mx-gold);
}
html.ad1 body:not(.t2) #xv .mxWk-c:has(i.td) small {
  color: var(--ad-ink);
  font-weight: 700;
}
html.ad1 body:not(.t2) #xv .mxWk-k {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
  margin-block-start: 12px;
  font-size: 0.75rem;
  color: var(--ad-muted);
}
html.ad1 body:not(.t2) #xv .mxWk-k span {
  display: flex;
  align-items: center;
  gap: 6px;
}
html.ad1 body:not(.t2) #xv .mxWk-k i {
  width: 14px;
  height: 14px;
  border-radius: 4px;
}
/* حالة فاضية: مربع منقّط مثل شاشة «طالب جديد» */
html.ad1 body:not(.t2) #xv .mxEmpty {
  margin: 12px 0 0;
  padding: 12px 14px;
  border: 1.5px dashed var(--ad-line);
  border-radius: var(--r-xl);
  font-size: 0.875rem;
  line-height: 1.6;
  color: var(--ad-muted);
}
/* مهارات تحتاج تقوية: صف أصفر فاتح وزر أخضر حبة */
html.ad1 body:not(.t2) #xv .mxSk-r {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-block-start: 10px;
  padding: 12px;
  border-radius: var(--r-xl);
  background: var(--mx-warn);
}
html.ad1 body:not(.t2) #xv .mxSk-i {
  display: flex;
  flex-shrink: 0;
  color: var(--mx-warn-ic);
}
html.ad1 body:not(.t2) #xv .mxSk-t {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
html.ad1 body:not(.t2) #xv .mxSk-t b {
  font-size: 0.875rem;
  color: var(--ad-ink);
}
html.ad1 body:not(.t2) #xv .mxSk-t small {
  font-size: 0.75rem;
  color: var(--mx-warn-ink);
}
html.ad1 body:not(.t2) #xv .mxSk-b {
  flex-shrink: 0;
  min-width: 64px;
  min-height: 44px;
  margin: 0;
  padding: 0 16px;
  border: 0;
  border-radius: var(--r-pill);
  background: var(--c-green);
  color: #fff;
  font: 700 0.8125rem "IBM Plex Sans Arabic", sans-serif;
  box-shadow: var(--edge) var(--green-edge);
  cursor: pointer;
}
html.ad1 body:not(.t2) #xv .mxSk-b:active {
  transform: translateY(2px);
  box-shadow: 0 2px 0 var(--green-edge);
}
html.ad1[data-theme="dark"] body:not(.t2) #xv .mxSk-b {
  background: #1f8a57;
  box-shadow: var(--edge) #0b3a2d;
}
html.ad1 body:not(.t2) #xv :is(.mxSk-b, .mxRace-go):focus-visible {
  outline: 3px solid var(--mx-gold);
  outline-offset: 2px;
}

/* سباق الشعب بأعمدة (الصدارة) */
html.ad1 body:not(.t2) #xv .dw-page .mxRace .dw-sec {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
html.ad1 body:not(.t2) #xv .dw-page .mxRace-go {
  min-height: 44px;
  margin: 0;
  padding: 0 4px;
  border: 0;
  background: none;
  color: var(--ad-muted);
  font: 700 0.8125rem "IBM Plex Sans Arabic", sans-serif;
  cursor: pointer;
}
html.ad1 body:not(.t2) #xv .dw-page .mxRace-l {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
html.ad1 body:not(.t2) #xv .dw-page .mxRace-r {
  display: flex;
  align-items: center;
  gap: 10px;
}
html.ad1 body:not(.t2) #xv .dw-page .mxRace-n {
  width: 64px;
  flex-shrink: 0;
  font-size: 0.8125rem;
  color: var(--ad-muted);
}
html.ad1 body:not(.t2) #xv .dw-page .mxRace-r.mine .mxRace-n {
  color: var(--ad-ink);
  font-weight: 700;
}
html.ad1 body:not(.t2) #xv .dw-page .mxRace-t {
  flex: 1;
  height: 28px;
  border-radius: var(--r-pill);
  background: var(--ad-mint);
  overflow: hidden;
}
html.ad1 body:not(.t2) #xv .dw-page .mxRace-f {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  height: 100%;
  min-width: max-content;
  padding-inline: 10px;
  box-sizing: border-box;
  border-radius: var(--r-pill);
  background: var(--mx-bar-2);
  color: var(--ad-ink);
}
html.ad1 body:not(.t2) #xv .dw-page .mxRace-r.k0 .mxRace-f,
html.ad1 body:not(.t2) #xv .dw-page .mxRace-r.k1 .mxRace-f {
  background: var(--mx-bar-1);
}
html.ad1 body:not(.t2) #xv .dw-page .mxRace-r.mine .mxRace-f {
  background: var(--mx-bar-me);
  color: var(--mx-gold);
}
html.ad1[data-theme="dark"] body:not(.t2) #xv .dw-page .mxRace-r.mine .mxRace-f {
  color: #0b201b;
}
html.ad1 body:not(.t2) #xv .dw-page .mxRace-f b {
  font: 700 0.8125rem Alexandria, sans-serif;
  white-space: nowrap;
}
/* الحركة: الأعمدة تكبر من الصفر (بس لو الطالب ما طلب تقليل الحركة) */
@media (prefers-reduced-motion: no-preference) {
  html.ad1 body:not(.t2) #xv .dw-page .mxRace-f {
    animation: mxFill 0.9s ease-out both;
  }
  html.ad1 body:not(.t2) #xv .dw-page .mxRace-r:nth-child(2) .mxRace-f { animation-delay: 0.1s; }
  html.ad1 body:not(.t2) #xv .dw-page .mxRace-r:nth-child(n + 3) .mxRace-f { animation-delay: 0.2s; }
}
@keyframes mxFill {
  from { width: 0; }
}
/* ===== AD-X end ===== */
/* ===== AD-Y start: تحصيلي — ورقة «إعداد التدريب» (.tps-sheet: وحدات متعددة، نوع التدريب، المستوى، العدد) ===== */
/* المرجع Tahsili.dc. الورقة نفسها csOpen (.chapter-sheet-panel)، والسلوك في assets/tah-setup.js.
   الألوان من رموز تحصيلي النيلية (--t3* في AD-H). الأزرار القديمة تاخذ لون/حشو base.css، فنعيد كل شي هنا. */
html.ad1 .tps-sheet .tps {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-block-end: 8px;
}
html.ad1 .tps-sheet .tps-sum {
  margin: 0;
  font-size: 13px;
  color: var(--ad-muted);
}
html.ad1 .tps-sheet .tps-h {
  margin: 8px 0 0;
  font-family: Alexandria, "IBM Plex Sans Arabic", sans-serif;
  font-size: 16px;
  font-weight: 700;
  color: var(--ad-ink);
}
/* الوحدات: شبكة عمودين، المختارة نيلي هادي بحافة */
html.ad1 .tps-sheet .tps-units {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  padding-block-end: 4px;
}
html.ad1 .tps-sheet .tps-unit {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  min-height: 100px;
  margin: 0;
  padding: 12px;
  border: 2px solid var(--ad-line);
  border-radius: var(--r-3xl);
  background: var(--ad-card);
  color: var(--ad-ink);
  text-align: start;
  font-weight: 500;
  box-shadow: var(--edge) var(--ad-line);
  cursor: pointer;
  transition: background-color 0.2s, border-color 0.2s;
}
html.ad1 .tps-sheet .tps-unit.on {
  border-color: var(--t3-sel);
  background: var(--t3-soft);
  box-shadow: var(--edge) var(--t3-sel);
}
html.ad1 .tps-sheet .tps-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  margin-block-end: 4px;
}
html.ad1 .tps-sheet .tps-ab {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: var(--r-md);
  background: var(--ad-bg);
  color: var(--ad-muted);
  font-family: Alexandria, "IBM Plex Sans Arabic", sans-serif;
  font-weight: 700;
}
html.ad1 .tps-sheet .tps-chk {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: var(--r-pill);
  border: 2px solid var(--t3-line2);
  color: transparent;
}
html.ad1 .tps-sheet .tps-unit.on .tps-ab,
html.ad1 .tps-sheet .tps-unit.on .tps-chk {
  background: var(--t3);
  border-color: var(--t3);
  color: #ffffff;
}
html.ad1 .tps-sheet .tps-unit b {
  font-size: 15px;
  font-weight: 700;
}
html.ad1 .tps-sheet .tps-unit small,
html.ad1 .tps-sheet .tps-mode small {
  font-size: 12.5px;
  color: var(--ad-muted);
}
/* «اقرأ ملخص الوحدة» (لما تكون وحدة وحدة لها ملخص) */
html.ad1 .tps-sheet .tps-sumb {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  margin: 0;
  padding: 0 16px;
  border: 1.5px solid var(--t3-line2);
  border-radius: var(--r-pill);
  background: var(--ad-card);
  color: var(--t3-ink);
  font-weight: 700;
}
html.ad1 .tps-sheet .tps-sumb[hidden] {
  display: none;
}
/* نوع التدريب: صفوف راديو */
html.ad1 .tps-sheet .tps-modes {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
html.ad1 .tps-sheet .tps-mode {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 56px;
  margin: 0;
  padding: 6px 12px;
  border: 1.5px solid var(--ad-line);
  border-radius: var(--r-xl);
  background: var(--ad-card);
  color: var(--ad-ink);
  text-align: start;
  font-weight: 500;
  cursor: pointer;
}
html.ad1 .tps-sheet .tps-mode.on {
  border: 2px solid var(--t3-sel);
  background: var(--t3-soft);
}
html.ad1 .tps-sheet .tps-mode:disabled {
  cursor: default;
  background: var(--ad-bg);
}
html.ad1 .tps-sheet .tps-mode:disabled .tps-mt b,
html.ad1 .tps-sheet .tps-mode:disabled .tps-mi {
  opacity: 0.55;
}
html.ad1 .tps-sheet .tps-mi {
  display: grid;
  place-items: center;
  flex: none;
  width: 34px;
  height: 34px;
  border-radius: var(--r-sm);
  background: var(--ad-bg);
  color: var(--ad-muted);
}
html.ad1 .tps-sheet .tps-mode.on .tps-mi {
  background: var(--t3);
  color: #ffffff;
}
html.ad1 .tps-sheet .tps-mt {
  display: flex;
  flex: 1;
  flex-direction: column;
  min-width: 0;
  line-height: 1.45;
}
html.ad1 .tps-sheet .tps-mt b {
  font-size: 15px;
  font-weight: 700;
}
html.ad1 .tps-sheet .tps-dot {
  flex: none;
  box-sizing: border-box;
  width: 20px;
  height: 20px;
  border-radius: var(--r-pill);
  border: 2px solid var(--t3-line2);
}
html.ad1 .tps-sheet .tps-mode.on .tps-dot {
  border: 6px solid var(--t3-sel);
  background: var(--ad-card);
}
/* المستوى والعدد: شريط مقسّم */
html.ad1 .tps-sheet .tps-seg {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
  padding: 5px;
  border-radius: var(--r-xl);
  background: var(--ad-bg);
}
html.ad1 .tps-sheet .tps-seg button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-height: 44px;
  margin: 0;
  padding: 0 4px;
  border: 0;
  border-radius: var(--r-md);
  background: transparent;
  color: var(--ad-muted);
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
}
html.ad1 .tps-sheet .tps-seg button small {
  font-weight: 500;
  font-size: 11.5px;
  opacity: 0.85;
}
html.ad1 .tps-sheet .tps-seg button.on {
  background: var(--t3);
  color: #ffffff;
  box-shadow: 0 3px 0 var(--t3-edge);
}
html.ad1 .tps-sheet .tps-seg button:disabled {
  opacity: 0.4;
  cursor: default;
}
html.ad1 .tps-sheet .tps-note {
  margin: 0;
  font-size: 13px;
  text-align: center;
  color: var(--ad-muted);
}
html.ad1 .tps-sheet .tps-note:empty {
  display: none;
}
html.ad1 .tps-sheet .tps-note.bad {
  padding: 8px 10px;
  border-radius: var(--r-md);
  background: #fdecea;
  color: #8c1d18;
  font-weight: 700;
}
html.ad1[data-theme="dark"] .tps-sheet .tps-note.bad {
  background: #3a1c1c;
  color: #ffb4ab;
}
/* زر البدء: نفس الزر النيلي في AD-H، ورمادي لو ما فيه أسئلة */
html.ad1 .tps-sheet .chapter-sheet-go {
  min-height: 56px;
  margin-block-start: 10px;
}
html.ad1 body.t3:not(.t2) .tps-sheet .chapter-sheet-go[aria-disabled="true"] {
  background: var(--t3-line2);
  box-shadow: none;
}
html.ad1 .tps-sheet .tps-unit:focus-visible,
html.ad1 .tps-sheet .tps-mode:focus-visible,
html.ad1 .tps-sheet .tps-seg button:focus-visible,
html.ad1 .tps-sheet .tps-sumb:focus-visible {
  outline: 3px solid var(--t3-sel);
  outline-offset: 2px;
}
@media (prefers-reduced-motion: reduce) {
  html.ad1 .tps-sheet .tps-unit {
    transition: none;
  }
}
/* ===== AD-Y end ===== */
/* ===== AD-Z start: حالات «بدون نت» و«تعذّر التحميل» برسمة + البحث بأقسام (assets/ad-states.js) ===== */
/* ---------- بطاقة الحالة: رسمة + عنوان + سطر + «حاول مرة ثانية» ---------- */
/* الرسالة الأصلية تبقى في الصفحة بس مخفية — البطاقة تحل مكانها */
html.ad1 body:not(.t2) #xv .adz-src {
  display: none;
}
html.ad1 body:not(.t2) #xv .adz-st {
  --adz-fill: #9fd8b9;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 24px 16px 28px;
  text-align: center;
  color: var(--ad-ink);
}
html.ad1 body:not(.t2) #xv .adz-st-err {
  --adz-fill: #f4a9a0;
}
html.ad1 body:not(.t2) #xv .adz-st-t {
  font-family: Alexandria, "IBM Plex Sans Arabic", sans-serif;
  font-weight: 700;
  font-size: 1.25rem;
  line-height: 1.5;
}
html.ad1 body:not(.t2) #xv .adz-st-p {
  max-width: 30ch;
  font-size: 0.9375rem;
  line-height: 1.8;
  color: var(--ad-muted);
}
html.ad1 body:not(.t2) #xv .adz-st-go {
  margin-top: 8px;
  min-height: 54px;
  padding-inline: 30px;
  border: 0;
  border-radius: var(--r-pill);
  background: var(--c-green);
  color: #ffffff;
  font: inherit;
  font-weight: 700;
  font-size: 1rem;
  box-shadow: var(--edge) var(--green-edge);
  cursor: pointer;
}
html.ad1 body:not(.t2) #xv .adz-st-go:active {
  transform: translateY(3px);
  box-shadow: 0 1px 0 var(--green-edge);
}
html.ad1[data-theme="dark"] body:not(.t2) #xv .adz-st-go {
  background: #1e7a55;
  box-shadow: var(--edge) #06201a;
}

/* ---------- الرسومات (مشتركة: الحالة والبحث) ---------- */
html.ad1 body:not(.t2) .adz-art {
  --adz-ink: #10302a;
  display: block;
  overflow: visible;
}
html.ad1 body:not(.t2) .adz-art .adz-halo {
  fill: var(--adz-fill, #9fd8b9);
  opacity: 0.3;
}
html.ad1 body:not(.t2) .adz-art .adz-body {
  fill: var(--adz-fill, #9fd8b9);
  stroke: var(--adz-ink);
  stroke-width: 4;
}
html.ad1 body:not(.t2) .adz-art .adz-shine {
  fill: #ffffff;
  opacity: 0.4;
}
html.ad1 body:not(.t2) .adz-art .adz-ink {
  fill: var(--adz-ink);
}
html.ad1 body:not(.t2) .adz-art .adz-glint {
  fill: #ffffff;
}
html.ad1 body:not(.t2) .adz-art .adz-line {
  fill: none;
  stroke: var(--adz-ink);
  stroke-width: 4;
  stroke-linecap: round;
  stroke-linejoin: round;
}
html.ad1 body:not(.t2) .adz-art .adz-thin {
  stroke-width: 3;
}
html.ad1 body:not(.t2) .adz-art .adz-cl {
  fill: #ffffff;
  stroke: #9db0a7;
  stroke-width: 2.4;
}
html.ad1 body:not(.t2) .adz-art .adz-cut {
  fill: none;
  stroke: #d1495b;
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
}
html.ad1 body:not(.t2) .adz-art .adz-shadow {
  fill: var(--ad-line);
}
html.ad1 body:not(.t2) .adz-art .adz-lens {
  fill: var(--ad-card);
  stroke: var(--c-green);
  stroke-width: 7;
}
html.ad1 body:not(.t2) .adz-art .adz-handle {
  fill: none;
  stroke: var(--c-green);
  stroke-width: 9;
  stroke-linecap: round;
}
/* الوضع الداكن: الحبر فاتح على الخلية والعدسة، والغيمة أغمق */
html.ad1[data-theme="dark"] body:not(.t2) .adz-art .adz-body {
  stroke: #e6eeea;
}
html.ad1[data-theme="dark"] body:not(.t2) .adz-art .adz-cl {
  fill: #26352f;
  stroke: #9db0a7;
}
html.ad1[data-theme="dark"] body:not(.t2) .adz-art .adz-lens,
html.ad1[data-theme="dark"] body:not(.t2) .adz-art .adz-handle {
  stroke: #46b088;
}
html.ad1[data-theme="dark"] body:not(.t2) .adz-art-s {
  --adz-ink: #e6eeea;
}
html.ad1[data-theme="dark"] body:not(.t2) .adz-art-s .adz-glint {
  fill: var(--ad-card);
}
/* حركة هادية — بس لمن ما طلب تقليل الحركة */
@media (prefers-reduced-motion: no-preference) {
  html.ad1 body:not(.t2) .adz-art .adz-bob {
    animation: adzBob 3s ease-in-out infinite;
  }
  html.ad1 body:not(.t2) .adz-art .adz-cloud {
    animation: adzDrift 3s ease-in-out infinite;
  }
  html.ad1 body:not(.t2) .adz-art .adz-look {
    animation: adzLook 3.4s ease-in-out infinite;
  }
}
@keyframes adzBob {
  50% {
    transform: translateY(-6px);
  }
}
@keyframes adzDrift {
  50% {
    transform: translateX(6px);
  }
}
@keyframes adzLook {
  50% {
    transform: translate(-8px, 3px);
  }
}

/* ---------- البحث بأقسام (#srchRes — الجوال والكمبيوتر) ---------- */
html.ad1 body:not(.t2) #srchRes .adz-sec {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
html.ad1 body:not(.t2) #srchRes .adz-sec + .adz-sec {
  margin-top: 10px;
}
html.ad1 body:not(.t2) #srchRes .adz-sh {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 4px 0 0;
  padding-inline: 4px;
  font-family: Alexandria, "IBM Plex Sans Arabic", sans-serif;
  font-weight: 700;
  font-size: 0.9375rem;
  color: var(--ad-muted);
}
html.ad1 body:not(.t2) #srchRes .adz-n {
  min-width: 24px;
  height: 24px;
  padding-inline: 7px;
  border-radius: var(--r-pill);
  background: var(--ad-mint);
  color: var(--ad-ink);
  font-family: "IBM Plex Sans Arabic", sans-serif;
  font-size: 0.8125rem;
  line-height: 24px;
  text-align: center;
}
html.ad1 body:not(.t2) #srchRes button.adz-r {
  flex-direction: row;
  align-items: center;
  gap: 12px;
  min-height: 64px;
  border: 0;
  border-radius: var(--r-3xl);
  background: var(--ad-card);
  color: var(--ad-ink);
  padding: 12px 14px;
  box-shadow: var(--edge) var(--card-edge);
}
html.ad1 body:not(.t2) #srchRes button.adz-r-t {
  align-items: flex-start;
}
html.ad1 body:not(.t2) #srchRes .adz-tx {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
  font-size: 1rem;
  color: var(--ad-ink);
}
html.ad1 body:not(.t2) #srchRes .adz-tx b {
  font-weight: 700;
  font-size: 1rem;
}
html.ad1 body:not(.t2) #srchRes .adz-tx small {
  font-size: 0.75rem;
  color: var(--ad-muted);
}
/* سطر الملخص أو السؤال: ثلاث أسطر بالكثير */
html.ad1 body:not(.t2) #srchRes .adz-d {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  overflow: hidden;
  font-size: 0.875rem;
  line-height: 1.7;
  color: var(--ad-ink);
}
/* الشارة: رقم الفصل بلونه، أو أيقونة على خلفية فاتحة */
html.ad1 body:not(.t2) #srchRes .adz-b {
  --adz-c: var(--c-green);
  display: flex;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: var(--r-lg);
  background: var(--adz-c);
  color: #ffffff;
  font-family: Alexandria, "IBM Plex Sans Arabic", sans-serif;
  font-weight: 700;
  font-size: 1.0625rem;
}
html.ad1 body:not(.t2) #srchRes .adz-b.adz-soft {
  background: color-mix(in srgb, var(--adz-c) 13%, var(--ad-card));
  color: var(--adz-c);
}
html.ad1[data-theme="dark"] body:not(.t2) #srchRes .adz-b.adz-soft {
  background: color-mix(in srgb, var(--adz-c) 28%, var(--ad-card));
  color: color-mix(in srgb, var(--adz-c) 45%, #ffffff);
}
html.ad1 body:not(.t2) #srchRes .adz-ch1 { --adz-c: var(--ch-1); }
html.ad1 body:not(.t2) #srchRes .adz-ch2 { --adz-c: var(--ch-2); }
html.ad1 body:not(.t2) #srchRes .adz-ch3 { --adz-c: var(--ch-3); }
html.ad1 body:not(.t2) #srchRes .adz-ch4 { --adz-c: var(--ch-4); }
html.ad1 body:not(.t2) #srchRes .adz-ch5 { --adz-c: var(--ch-5); }
html.ad1 body:not(.t2) #srchRes .adz-ch6 { --adz-c: var(--ch-6); }
html.ad1 body:not(.t2) #srchRes .adz-ch7 { --adz-c: var(--ch-7); }
html.ad1 body:not(.t2) #srchRes .adz-ch8 { --adz-c: var(--ch-8); }
html.ad1 body:not(.t2) #srchRes .adz-ch9 { --adz-c: var(--ch-9); }
html.ad1 body:not(.t2) #srchRes .adz-g { --adz-c: var(--ch-8); }
html.ad1 body:not(.t2) #srchRes .adz-p { --adz-c: var(--c-green); }
html.ad1[data-theme="dark"] body:not(.t2) #srchRes .adz-p { --adz-c: #46b088; }
html.ad1 body:not(.t2) #srchRes .adz-chev {
  flex-shrink: 0;
  color: #9db0a7;
}
/* ما فيه نتائج */
html.ad1 body:not(.t2) #srchRes .adz-none {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 36px 16px 28px;
  text-align: center;
}
html.ad1 body:not(.t2) #srchRes .adz-none strong {
  font-family: Alexandria, "IBM Plex Sans Arabic", sans-serif;
  font-weight: 700;
  font-size: 1.0625rem;
  color: var(--ad-ink);
}
html.ad1 body:not(.t2) #srchRes .adz-none span {
  font-size: 0.875rem;
  color: var(--ad-muted);
}
/* ===== AD-Z end ===== */
/* ===== AD-A2 start: «أنهِ الدرس وشوف الملخص» في بطاقة النتيجة (.seEnd) + «عادي / وضع السينما» تحت الفيديو (#seCine) + صف «مهام اليوم» في ورقة الفصل (.seTasks) — assets/study-extras.js ===== */
/* (١) رابط نصي تحت «التالي» — يطلع بس في آخر سؤال من آخر جزء والطالب ناجح */

/* (٢) مفتاحين في كبسولة بيضاء (يمين الصف)، و«ملاحظاتي» يسار */
html.ad1 body:not(.t2) .luCine.nsOn .seCine {
  display: inline-flex;
  flex: none;
  gap: 4px;
  padding: 4px;
  border-radius: var(--r-pill);
  background: var(--ad-card);
  border: 1px solid var(--ad-line);
}
html.ad1 body:not(.t2) .luCine.nsOn .seCine[hidden] {
  display: none;
}
html.ad1 body:not(.t2) .luCine.nsOn .seCine button {
  min-block-size: 36px;
  padding: 0 14px;
  border: 0;
  border-radius: var(--r-pill);
  background: transparent;
  color: var(--ad-muted);
  box-shadow: none;
  font: 700 0.8125rem "IBM Plex Sans Arabic", sans-serif;
  white-space: nowrap;
  cursor: pointer;
}
html.ad1 body:not(.t2) .luCine.nsOn .seCine button[aria-pressed="true"] {
  background: var(--lu-c, var(--c-green));
  color: #fff;
}
html.ad1[data-theme="dark"] body:not(.t2) .luCine.nsOn .seCine button[aria-pressed="true"] {
  background: var(--lu-td, #9ee6c4);
  color: #06140f;
}
/* وقت السينما: شفاف فوق الطبقة السوداء مثل زر «ملاحظاتي» */
html.ad1 body.lu-focus:not(.t2) .luCine.nsOn .seCine {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.22);
}
html.ad1 body.lu-focus:not(.t2) .luCine.nsOn .seCine button {
  color: rgba(255, 255, 255, 0.78);
}
html.ad1 body.lu-focus:not(.t2) .luCine.nsOn .seCine button[aria-pressed="true"] {
  background: #fff;
  color: #06140f;
}
html.ad1[data-theme="dark"] body.lu-focus:not(.t2) .luCine.nsOn .seCine button[aria-pressed="true"] {
  background: #fff;
  color: #06140f;
}
/* السينما: المفتاح أخذ مكان نقاط الأجزاء الطويلة — نخليها أقصر */
html.ad1 body.lu-focus:not(.t2) .luCine.nsOn:has(.seCine:not([hidden])) .luCd {
  max-inline-size: 64px;
}

/* (٣) صف «مهام اليوم» تحت أزرار الفصل: بطاقة بيضاء بحافة، أيقونة ذهبية، نقاط المهام، و«تحدي» */
html.ad1 body:not(.t2) .chapter-sheet-panel .seTasks {
  display: flex;
  align-items: center;
  gap: 10px;
  inline-size: 100%;
  min-block-size: 60px;
  margin: 0 0 12px;
  padding: 10px 12px;
  border: 0;
  border-radius: var(--r-3xl);
  background: var(--ad-card);
  color: var(--ad-ink);
  box-shadow: var(--edge) var(--card-edge);
  font: inherit;
  text-align: start;
  cursor: pointer;
}
html.ad1 body:not(.t2) .chapter-sheet-panel .seTasks:active {
  transform: translateY(3px);
  box-shadow: 0 1px 0 var(--card-edge);
}
@media (prefers-reduced-motion: reduce) {
  html.ad1 body:not(.t2) .chapter-sheet-panel .seTasks:active {
    transform: none;
  }
}
html.ad1 body:not(.t2) .chapter-sheet-panel .seTasks .seTi {
  flex: none;
  display: grid;
  place-items: center;
  inline-size: 40px;
  block-size: 40px;
  border-radius: var(--r-lg);
  background: #fff1cc;
  color: #8a6400;
}
html.ad1 body:not(.t2) .chapter-sheet-panel .seTasks svg {
  inline-size: 20px;
  block-size: 20px;
}
html.ad1 body:not(.t2) .chapter-sheet-panel .seTasks .seTt {
  flex: 1;
  min-inline-size: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
html.ad1 body:not(.t2) .chapter-sheet-panel .seTasks .seTt b {
  font-size: 0.9375rem;
}
html.ad1 body:not(.t2) .chapter-sheet-panel .seTasks .seTt small {
  overflow: hidden;
  color: var(--ad-muted);
  font-size: 0.75rem;
  white-space: nowrap;
  text-overflow: ellipsis;
}
html.ad1 body:not(.t2) .chapter-sheet-panel .seTasks .seTh {
  display: flex;
  align-items: center;
  gap: 8px;
}
html.ad1 body:not(.t2) .chapter-sheet-panel .seTasks .seTd {
  flex: none;
  display: flex;
  gap: 4px;
}
html.ad1 body:not(.t2) .chapter-sheet-panel .seTasks .seTd i {
  display: grid;
  place-items: center;
  inline-size: 16px;
  block-size: 16px;
  border-radius: var(--r-pill);
  border: 2px solid var(--ad-line);
  box-sizing: border-box;
}
html.ad1 body:not(.t2) .chapter-sheet-panel .seTasks .seTd i.ok {
  border-color: var(--c-green);
  background: var(--c-green);
  color: #fff;
}
html.ad1 body:not(.t2) .chapter-sheet-panel .seTasks .seTd i svg {
  inline-size: 10px;
  block-size: 10px;
}
html.ad1 body:not(.t2) .chapter-sheet-panel .seTasks .seTc {
  flex: none;
  display: inline-flex;
  align-items: center;
  block-size: 28px;
  padding: 0 10px;
  border-radius: var(--r-pill);
  background: #fff4d6;
  color: #8a6400;
  font-weight: 700;
  font-size: 0.75rem;
}
html.ad1 body:not(.t2) .chapter-sheet-panel .seTasks .seTa {
  flex: none;
  display: grid;
  color: var(--ad-muted);
}
html.ad1 body:not(.t2) .chapter-sheet-panel .seTasks .seTa svg {
  inline-size: 18px;
  block-size: 18px;
}
html.ad1[data-theme="dark"] body:not(.t2) .chapter-sheet-panel .seTasks .seTi,
html.ad1[data-theme="dark"] body:not(.t2) .chapter-sheet-panel .seTasks .seTc {
  background: #3a3016;
  color: #f2c14e;
}
html.ad1[data-theme="dark"] body:not(.t2) .chapter-sheet-panel .seTasks .seTd i.ok {
  border-color: #3fa37d;
  background: #3fa37d;
  color: #06140f;
}
/* ===== AD-A2 end ===== */
/* ===== AD-B2 start: الألعاب ٢ — فقاعة الخلية في المحور، «أنت ضد المنافس» في المبارزة، رسمة الصندوق ونقاطه، مبدّل التمارين، نتيجة سؤال اليوم والسؤال الصعب من تحت (assets/games-plus.js + games-art.js) ===== */
/* فقاعة الخلية: الشخصية يمين والكلام في فقاعة بيضاء، زاويتها الصغيرة جهة الشخصية. الفقاعة كلها زر */
html.ad1 body:not(.t2) #xv[data-ad="games"] .gx-say {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  width: 100%;
  margin-block: 2px 14px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--ad-ink);
  font: inherit;
  text-align: start;
  box-shadow: none;
  cursor: pointer;
}
html.ad1 body:not(.t2) #xv[data-ad="games"] .gx-say svg.gx-say-art {
  flex-shrink: 0;
  width: 84px;
  height: 61px;
}
html.ad1 body:not(.t2) #xv[data-ad="games"] .gx-say-b {
  position: relative;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-height: 44px;
  margin-block-end: 10px;
  padding: 12px 14px;
  padding-inline-end: 40px;
  border-radius: var(--r-3xl);
  border-end-start-radius: 6px;
  background: var(--ad-card);
  box-shadow: var(--edge) var(--card-edge);
}
html.ad1 body:not(.t2) #xv[data-ad="games"] .gx-say-b b {
  font-family: Alexandria, "IBM Plex Sans Arabic", sans-serif;
  font-weight: 700;
  font-size: 0.95rem;
}
html.ad1 body:not(.t2) #xv[data-ad="games"] .gx-say-b small {
  font-size: 0.82rem;
  line-height: 1.6;
  color: var(--ad-muted);
}
html.ad1 body:not(.t2) #xv[data-ad="games"] .gx-say-go {
  position: absolute;
  inset-inline-end: 12px;
  inset-block-start: 50%;
  margin-block-start: -10px;
  color: var(--ad-muted);
}
html.ad1 body:not(.t2) #xv[data-ad="games"] .gx-say:focus-visible .gx-say-b {
  outline: 3px solid #1f9d63;
  outline-offset: 2px;
}
html.ad1 body:not(.t2) #xv[data-ad="games"] .gx-say:active .gx-say-b {
  transform: translateY(2px);
  box-shadow: 0 2px 0 var(--card-edge);
}
/* المبارزة: بطاقتك وبطاقة منافسك متقابلتين، و«ضد» بينهم */
html.ad1 body:not(.t2) #xv[data-ad="duel"] .gx-vs {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  margin-block-end: 14px;
  padding: 12px;
  border-radius: var(--r-5xl);
  background: var(--ad-card);
  box-shadow: var(--edge) var(--card-edge);
}
html.ad1 body:not(.t2) #xv[data-ad="duel"] .gx-vs-c {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  min-width: 0;
  padding: 12px 8px;
  border-radius: var(--r-3xl);
  background: var(--ad-bg);
  color: var(--ad-ink);
  text-align: center;
}
html.ad1 body:not(.t2) #xv[data-ad="duel"] .gx-vs-c.me {
  background: #f7e4ee;
  color: #10302a;
}
html.ad1 body:not(.t2) #xv[data-ad="duel"] .gx-vs-c.win {
  box-shadow: inset 0 0 0 2px #e0a100;
}
html.ad1 body:not(.t2) #xv[data-ad="duel"] .gx-vs-av {
  width: 46px;
  height: 46px;
  margin-block-end: 4px;
  border-radius: var(--r-pill);
  display: grid;
  place-items: center;
  background: #ffd166;
  color: #5a4500;
  box-shadow: 0 3px 0 #e0a100;
  font-family: Alexandria, "IBM Plex Sans Arabic", sans-serif;
  font-weight: 700;
  font-size: 1.2rem;
}
html.ad1 body:not(.t2) #xv[data-ad="duel"] .gx-vs-c.me .gx-vs-av {
  background: #a8366a;
  color: #fff;
  box-shadow: 0 3px 0 #7c2650;
}
html.ad1 body:not(.t2) #xv[data-ad="duel"] .gx-vs-c b {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.85rem;
  color: var(--ad-muted);
}
html.ad1 body:not(.t2) #xv[data-ad="duel"] .gx-vs-c.me b {
  color: #7c2650;
}
html.ad1 body:not(.t2) #xv[data-ad="duel"] .gx-vs-c strong {
  font-family: Alexandria, "IBM Plex Sans Arabic", sans-serif;
  font-weight: 700;
  font-size: 1.7rem;
  line-height: 1.3;
}
html.ad1 body:not(.t2) #xv[data-ad="duel"] .gx-vs-c strong span {
  font-size: 0.95rem;
  color: var(--ad-muted);
}
html.ad1 body:not(.t2) #xv[data-ad="duel"] .gx-vs-c.me strong span {
  color: #7c2650;
}
html.ad1 body:not(.t2) #xv[data-ad="duel"] .gx-vs-c small {
  font-size: 0.75rem;
  line-height: 1.5;
  color: var(--ad-muted);
}
html.ad1 body:not(.t2) #xv[data-ad="duel"] .gx-vs-c.me small {
  color: #6b4a5b;
}
html.ad1 body:not(.t2) #xv[data-ad="duel"] .gx-vs-c em {
  position: absolute;
  inset-block-start: -9px;
  inset-inline-start: 50%;
  transform: translateX(50%);
  padding: 2px 10px;
  border-radius: var(--r-pill);
  background: #ffd166;
  color: #5a4500;
  font-style: normal;
  font-size: 0.72rem;
  font-weight: 700;
  white-space: nowrap;
}
html.ad1 body:not(.t2) #xv[data-ad="duel"] .gx-vs-x {
  font-family: Alexandria, "IBM Plex Sans Arabic", sans-serif;
  font-weight: 700;
  font-size: 1rem;
  color: #a8366a;
}
html.ad1[data-theme="dark"] body:not(.t2) #xv[data-ad="duel"] .gx-vs-c.me {
  background: #3d1a2c;
  color: #f7e4ee;
}
html.ad1[data-theme="dark"] body:not(.t2) #xv[data-ad="duel"] :is(.gx-vs-c.me b, .gx-vs-c.me strong span, .gx-vs-c.me small, .gx-vs-x) {
  color: #f0a9cb;
}
/* الصندوق: رسمة الكنز فوق بطاقة البداية والنتيجة (بدل رسمة AD-W الصغيرة)، والحالة في شارة بالزاوية */
html.ad1 body:not(.t2) #xv[data-ad="box"] svg.gx-hero {
  display: none;
}
html.ad1 body:not(.t2) #xv[data-ad="box"] :is(.g2-intro, .g2-result) {
  position: relative;
}
html.ad1 body:not(.t2) #xv[data-ad="box"] .gx-chest {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  margin-block-end: 6px;
  text-align: center;
}
html.ad1 body:not(.t2) #xv[data-ad="box"] svg.gx-chest-art {
  display: block;
  width: 170px;
  height: 131px;
  overflow: visible;
}
html.ad1 body:not(.t2) #xv[data-ad="box"] .gx-chest > b {
  color: #5a4500;
  font-family: Alexandria, "IBM Plex Sans Arabic", sans-serif;
  font-weight: 700;
  font-size: 1.25rem;
}
html.ad1 body:not(.t2) #xv[data-ad="box"] .gx-chest-tag {
  position: absolute;
  inset-block-start: 14px;
  inset-inline-start: 14px;
  padding: 3px 11px;
  border: 2px solid #fff;
  border-radius: var(--r-pill);
  background: #8a7a55;
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
}
html.ad1 body:not(.t2) #xv[data-ad="box"] .gx-chest-tag.ready {
  background: #c23b2f;
}
html.ad1 body:not(.t2) #xv[data-ad="box"] .gx-chest-tag.done {
  background: #1a7f4f;
}
/* في النتيجة الرسمة والعنوان يكفون، فعنوان «نتيجتك محفوظة» ونص الجائزة يصغرون تحتها */
html.ad1 body:not(.t2) #xv[data-ad="box"] .g2-result .gx-chest ~ h3 {
  justify-content: center;
  font-size: 0.95rem;
}
html.ad1 body:not(.t2) #xv[data-ad="box"] .g2-result .gx-chest ~ .g2-score {
  color: #5a4500;
  font-size: 1.15rem;
  line-height: 1.6;
}
/* مبدّل التمارين: ٤ تبويبات في شريط أبيض، والحالي أخضر غامق */
html.ad1 body:not(.t2) #xv > .gx-tabs {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
  margin-block-end: 14px;
  padding: 5px;
  border-radius: var(--r-2xl);
  background: var(--ad-card);
  box-shadow: var(--edge) var(--card-edge);
}
html.ad1 body:not(.t2) #xv > .gx-tabs a {
  min-height: 44px;
  display: grid;
  place-items: center;
  border-radius: var(--r-lg);
  color: var(--ad-muted);
  font-weight: 700;
  font-size: 0.85rem;
  text-decoration: none;
  white-space: nowrap;
}
html.ad1 body:not(.t2) #xv > .gx-tabs a[aria-current="page"] {
  background: #0d4f3c;
  color: #fff;
}
html.ad1[data-theme="dark"] body:not(.t2) #xv > .gx-tabs a[aria-current="page"] {
  background: #9fd3bf;
  color: #06201a;
}
html.ad1 body:not(.t2) #xv > .gx-tabs a:focus-visible {
  outline: 3px solid #1f9d63;
  outline-offset: -3px;
}
/* سؤال اليوم والسؤال الصعب: النتيجة من تحت، لونها حسب الإجابة */
html.ad1 body:not(.t2) #xv:is([data-ad="daily"], [data-ad="hardq"]) .gx-dsheet {
  --gx-d: #1f9d63;
  --gx-ds: #e6f6ee;
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-block-start: 14px;
  padding: 16px;
  border-radius: var(--r-4xl);
  background: var(--gx-ds);
  color: var(--ad-ink);
}
html.ad1 body:not(.t2) #xv:is([data-ad="daily"], [data-ad="hardq"]) .gx-dsheet.no {
  --gx-d: #b3261e;
  --gx-ds: #fbeae7;
}
html.ad1[data-theme="dark"] body:not(.t2) #xv:is([data-ad="daily"], [data-ad="hardq"]) .gx-dsheet {
  --gx-ds: #12352a;
}
html.ad1[data-theme="dark"] body:not(.t2) #xv:is([data-ad="daily"], [data-ad="hardq"]) .gx-dsheet.no {
  --gx-ds: #3b1a17;
}
/* الخلفية الملونة تغلب خلفية بطاقة AD-W البيضاء */
html.ad1 body:not(.t2) #xv:is([data-ad="daily"], [data-ad="hardq"]) .gx-dsheet.gx-sheet {
  margin-block-start: 0;
  background: var(--gx-ds);
}
html.ad1 body:not(.t2) #xv .gx-dsheet .gx-dhead {
  display: flex;
  align-items: center;
  gap: 12px;
}
html.ad1 body:not(.t2) #xv .gx-dsheet .gx-dic {
  flex-shrink: 0;
  width: 46px;
  height: 46px;
  border-radius: var(--r-pill);
  display: grid;
  place-items: center;
  background: var(--gx-d);
  color: #fff;
}
html.ad1 body:not(.t2) #xv .gx-dsheet .gx-dtx {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
html.ad1 body:not(.t2) #xv .gx-dsheet .gx-dtx b {
  font-family: Alexandria, "IBM Plex Sans Arabic", sans-serif;
  font-weight: 700;
  font-size: 1.2rem;
}
html.ad1 body:not(.t2) #xv .gx-dsheet .gx-dtx small {
  font-size: 0.9rem;
  color: var(--ad-muted);
}
html.ad1 body:not(.t2) #xv .gx-dsheet .gx-dpts {
  font-family: Alexandria, "IBM Plex Sans Arabic", sans-serif;
  font-weight: 700;
  font-size: 1.15rem;
  color: #157a4b;
}
html.ad1[data-theme="dark"] body:not(.t2) #xv .gx-dsheet .gx-dpts {
  color: #7fd6ae;
}
html.ad1 body:not(.t2) #xv .gx-dsheet > p.hint {
  margin: 0;
  padding: 10px 12px;
  border-radius: var(--r-lg);
  background: var(--ad-card);
  color: var(--ad-ink);
  font-size: 0.9rem;
  line-height: 1.8;
}
/* ‏.msg.bad في AD-B أقوى، فنرفع التحديد بـ :is */
html.ad1 body:not(.t2) #xv:is([data-ad="daily"], [data-ad="hardq"]) .gx-dsheet > .msg:is(.msg, .bad) {
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  color: var(--ad-muted);
  font-size: 0.8rem;
  font-weight: 400;
  line-height: 1.7;
  box-shadow: none;
}
html.ad1 body:not(.t2) #xv .gx-dsheet > .row {
  display: flex;
  margin: 0;
}
/* الزر ghost: لونه في base.css إجباري ويقرأ --card و--fg، فنغيّر المتغيرين على الزر نفسه */
html.ad1 body:not(.t2) #xv .gx-dsheet #g2Games {
  --card: #0d4f3c;
  --fg: #fff;
  flex: 1;
  min-height: 50px;
  border: 0;
  border-radius: var(--r-pill);
  background: #0d4f3c;
  color: #fff;
  font-weight: 700;
  box-shadow: 0 4px 0 #082f24;
}
html.ad1[data-theme="dark"] body:not(.t2) #xv .gx-dsheet #g2Games {
  --card: #9fd3bf;
  --fg: #06201a;
  background: #9fd3bf;
  color: #06201a;
  box-shadow: 0 4px 0 #4f8f78;
}
/* الحركة: الكنز يهتز وهو مقفل، والأشعة تلف وهو مفتوح — بس لمن ما طلب تقليل الحركة */
@keyframes gx-wig {
  0%, 100% { transform: rotate(0); }
  20% { transform: rotate(-3deg); }
  40% { transform: rotate(3deg); }
  60% { transform: rotate(-1.5deg); }
}
@media (prefers-reduced-motion: no-preference) {
  html.ad1 body:not(.t2) #xv[data-ad="box"] svg.gx-chest-art .gx-wig { transform-origin: 65px 94px; animation: gx-wig 2.6s ease-in-out infinite; }
  html.ad1 body:not(.t2) #xv[data-ad="box"] svg.gx-chest-art .gx-rays { transform-origin: 65px 44px; animation: gx-spin 9s linear infinite; }
}
/* ===== AD-B2 end ===== */
/* ===== AD-C2 start: المختبر — رسومات بطاقات المحور (#lab)، «من جديد» في حكم القضية، صفحة القضية كلها لوح غامق (#case)، أرقام نهاية صوت الطبيعة والرحلة، خط مسح البصمة (#print) — assets/lab-art.js ===== */

/* ---------- المحور: الرسمة فوق والنص تحت مثل التطبيق ---------- */
html.ad1 body:not(.t2) #xv .lb-page .lb-hub .lb-tz.adl-hasArt {
  justify-content: flex-end;
  gap: 3px;
  padding-block-start: 112px;
}
html.ad1 body:not(.t2) #xv .lb-page .lb-hub .lb-tz .adl-art {
  position: absolute;
  inset-block-start: 12px;
  inset-inline: 0;
  margin-inline: auto;
  width: 120px;
  height: 96px;
  pointer-events: none;
}
/* النص فوق دائرة الخلفية والرسمة */
html.ad1 body:not(.t2) #xv .lb-page .lb-hub .lb-tz.adl-hasArt > :not(.adl-art):not(.nw) {
  position: relative;
}
/* شارة «جديد» في أول البطاقة (يمين)، بعيد عن الرسمة */
html.ad1 body:not(.t2) #xv .lb-page .lb-hub .lb-tz .nw {
  position: absolute;
  inset-block-start: 16px;
  inset-inline-start: 16px;
  inset-inline-end: auto;
  z-index: 2;
  padding: 3px 10px;
  font-size: 0.6875rem;
}
/* لوح القضية بشبكة في كل الشاشات */
html.ad1 body:not(.t2) #xv .lb-page .lb-hub .lb-tz.case.adl-hasArt {
  background-image: repeating-linear-gradient(0deg, #16414b 0 1px, transparent 1px 35px),
    repeating-linear-gradient(90deg, #16414b 0 1px, transparent 1px 35px);
}
/* الجوال: القضية بعرض كامل، فالرسمة على الطرف والنص جنبها */
@media (max-width: 1099px) {
  html.ad1 body:not(.t2) #xv .lb-page .lb-hub .lb-tz.case.adl-hasArt {
    padding-block-start: 96px;
    padding-inline-end: 132px;
  }
  html.ad1 body:not(.t2) #xv .lb-page .lb-hub .lb-tz.case .adl-art {
    inset-block-start: 10px;
    inset-inline: auto 8px;
    margin-inline: 0;
    width: 130px;
    height: 130px;
  }
}
/* الحركة بس لمن ما طلب تقليلها */
@media (prefers-reduced-motion: no-preference) {
  html.ad1 body:not(.t2) #xv .lb-page .adl-art .adl-scan { animation: adlScanLens 3.2s ease-in-out infinite; }
  html.ad1 body:not(.t2) #xv .lb-page .adl-art .adl-sway { animation: adlSway 3s ease-in-out infinite; }
  html.ad1 body:not(.t2) #xv .lb-page .adl-art .adl-bob { animation: adlBob 1.8s ease-in-out infinite; }
  html.ad1 body:not(.t2) #xv .lb-page .adl-art .adl-climb { animation: adlClimb 3s ease-in-out infinite alternate; }
  html.ad1 body:not(.t2) #xv .lb-page .adl-art .adl-tw { animation: adlTw 1.6s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
  html.ad1 body:not(.t2) #xv .lb-page .adl-art .adl-wave { animation: adlWave 1s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
  html.ad1 body:not(.t2) #xv .lb-page .adl-art .d1 { animation-delay: 0.2s; }
  html.ad1 body:not(.t2) #xv .lb-page .adl-art .d2 { animation-delay: 0.4s; }
  html.ad1 body:not(.t2) #xv .lb-page .adl-art .d3 { animation-delay: 0.6s; }
}
@keyframes adlScanLens { 0%, 100% { transform: translate(0, 0); } 50% { transform: translate(-18px, 10px); } }
@keyframes adlSway { 0%, 100% { transform: rotate(-5deg); } 50% { transform: rotate(5deg); } }
@keyframes adlBob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-5px); } }
@keyframes adlClimb { from { transform: translateY(22px); } to { transform: translateY(-14px); } }
@keyframes adlTw { 0%, 100% { opacity: 0.35; transform: scale(0.75); } 50% { opacity: 1; transform: scale(1); } }
@keyframes adlWave { 0%, 100% { transform: scaleY(0.4); } 50% { transform: scaleY(1); } }

/* ---------- صفحة القضية كلها لوح المختبر الجنائي (فاتح وليلي) ---------- */
/* الصفحة تتعرف من محتواها (.lb-cr داخل #xv الظاهر) — تطلع منها ترجع الخلفية لحالها */
html.ad1 body:not(.t2):has(#xv:not([hidden]) .lb-cr) {
  background-color: #0f2b33;
  background-image: repeating-linear-gradient(0deg, #133844 0 1px, transparent 1px 40px),
    repeating-linear-gradient(90deg, #133844 0 1px, transparent 1px 40px);
  color: #fff;
}
/* رأس الصفحة يصير شفاف فوق اللوح */
html.ad1 body:not(.t2):has(#xv:not([hidden]) .lb-cr) aside.brand,
html.ad1 body:not(.t2):has(#xv:not([hidden]) .lb-cr) #ih {
  --hxB: transparent; /* app.css يلوّن الرأس بـ var(--hxB) بقاعدة مؤكدة، فنغيّر المتغير */
  background: transparent;
}
html.ad1 body:not(.t2):has(#xv:not([hidden]) .lb-cr) #ih .page-title {
  color: #fff;
}
html.ad1 body:not(.t2):has(#xv:not([hidden]) .lb-cr) #ih .page-header button {
  background: rgba(255, 255, 255, 0.12);
  border-color: transparent;
  color: #fff;
  box-shadow: none;
}
html.ad1 body:not(.t2):has(#xv:not([hidden]) .lb-cr) #xv .lb-page {
  --lb-ink: #fff;
  --lb-mute: #9db8b0;
  --lb-line: rgba(255, 255, 255, 0.14);
  color: #fff;
}
html.ad1 body:not(.t2):has(#xv:not([hidden]) .lb-cr) #xv .lb-page .lb-hd .lb-eb {
  color: #ffd166;
}
html.ad1 body:not(.t2):has(#xv:not([hidden]) .lb-cr) #xv .lb-page .lb-hd h2,
html.ad1 body:not(.t2):has(#xv:not([hidden]) .lb-cr) #xv .lb-page > h3 {
  color: #fff;
}
html.ad1 body:not(.t2):has(#xv:not([hidden]) .lb-cr) #xv .lb-page .lb-hd p,
html.ad1 body:not(.t2):has(#xv:not([hidden]) .lb-cr) #xv .lb-page .lb-muted {
  color: #9db8b0;
}
/* اللوح نفسه يذوب في الصفحة: بدون إطار ولا شبكة ثانية */
html.ad1 body:not(.t2):has(#xv:not([hidden]) .lb-cr) #xv .lb-page .lb-stage:has(> .lb-cr) {
  background: transparent;
  border-color: transparent;
  box-shadow: none;
  overflow: visible;
}
html.ad1 body:not(.t2):has(#xv:not([hidden]) .lb-cr) #xv .lb-page .lb-cr {
  background-color: transparent;
  background-image: none;
  padding-inline: 0;
}
/* أرشيف القضايا: صفوف شفافة على اللوح */
html.ad1 body:not(.t2):has(#xv:not([hidden]) .lb-cr) #xv .lb-page .lb-row {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.12);
  color: #fff;
  box-shadow: none;
}
html.ad1 body:not(.t2):has(#xv:not([hidden]) .lb-cr) #xv .lb-page .lb-row .e {
  background: rgba(255, 209, 102, 0.14);
}
html.ad1 body:not(.t2):has(#xv:not([hidden]) .lb-cr) #xv .lb-page .lb-row small {
  color: #9db8b0;
}
html.ad1 body:not(.t2):has(#xv:not([hidden]) .lb-cr) #xv .lb-page .lb-row .r {
  color: #ffd166;
}

/* ---------- حكم القضية: «من جديد» جنب «كل أنشطة المختبر» ---------- */
html.ad1 body:not(.t2) #xv .lb-page .lb-verdict .adl-acts {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
html.ad1 body:not(.t2) #xv .lb-page .lb-verdict .adl-acts > * {
  flex: 1 1 130px;
  min-height: 50px;
}
html.ad1 body:not(.t2) #xv .lb-page .lb-verdict .adl-acts > a {
  flex-grow: 1.4;
}
html.ad1 body:not(.t2) #xv .lb-page .lb-verdict .lb-btn.adl-again {
  background: #fff;
  color: #10302a;
  border: 1.5px solid #dce7e1;
  box-shadow: var(--edge) #dce7e1;
}

/* ---------- نهاية صوت الطبيعة والرحلة: ٣ أرقام وزر «العب مرة ثانية» ---------- */
html.ad1 body:not(.t2) #xv .lb-page .lb-fact .adl-sts,
html.ad1 body:not(.t2) #xv .lb-page .lb-fin .lb-sts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  align-self: stretch;
}
html.ad1 body:not(.t2) #xv .lb-page .lb-fact .adl-sts div,
html.ad1 body:not(.t2) #xv .lb-page .lb-fin .lb-sts div {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 10px 6px;
  border-radius: var(--r-xl);
  font-size: 0.75rem;
  color: var(--ad-muted);
}
html.ad1 body:not(.t2) #xv .lb-page .lb-fact .adl-sts div {
  background: var(--ad-card);
}
html.ad1 body:not(.t2) #xv .lb-page .lb-fact .adl-sts b,
html.ad1 body:not(.t2) #xv .lb-page .lb-fin .lb-sts b {
  font: 700 1.125rem "Alexandria", sans-serif;
  color: var(--ad-ink);
}
/* زر الأخضر: نص بلون --lb-on (أبيض في الفاتح) بدل لون الحبر اللي كان يضيع عليه */
html.ad1 body:not(.t2) #xv .lb-page .lb-fact .lb-btn,
html.ad1 body:not(.t2) #xv .lb-page .lb-fin .lb-btn {
  color: var(--lb-on);
}
html.ad1 body:not(.t2) #xv .lb-page .lb-fin #mxBR {
  align-self: stretch;
  min-height: 52px;
  font-size: 1rem;
}

/* ---------- البصمة: خط مسح يمشي فوقها (يوقف مع تقليل الحركة) ---------- */
html.ad1 body:not(.t2) #xv .lb-page .lb-fpArt {
  position: relative;
  overflow: hidden;
}
@media (prefers-reduced-motion: no-preference) {
  html.ad1 body:not(.t2) #xv .lb-page .lb-fpArt::after {
    content: "";
    position: absolute;
    inset-inline: 10%;
    inset-block-start: 6%;
    height: 2px;
    border-radius: 2px;
    background: linear-gradient(90deg, transparent, var(--lb-g2), transparent);
    box-shadow: 0 0 10px var(--lb-g2);
    opacity: 0.6;
    pointer-events: none;
    animation: adlFpScan 3.5s ease-in-out infinite alternate;
  }
}
@keyframes adlFpScan { from { inset-block-start: 6%; } to { inset-block-start: 76%; } }
/* ===== AD-C2 end ===== */
/* ===== AD-D2 start: حسابي (الصفات النادرة صفوف، ورقتا «سمّ كائنك» و«شارك»)، تقدّمي (٣ مربعات)، الدوري والمجموعة (دوائر الحروف) — assets/ad-faces.js ===== */
/* ---------- الصفات النادرة: صف = مربع رسمة + اسم وطريقة الحصول + «عندك» أو قفل ---------- */
html.ad1 body:not(.t2) #xv .pf .adTr .pfH {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  margin: 0 0 10px;
}
html.ad1 body:not(.t2) #xv .pf .adTr .pfH small {
  font: 500 0.8rem "IBM Plex Sans Arabic", sans-serif;
  color: var(--ad-muted);
}
html.ad1 body:not(.t2) #xv .pf .adTr-l {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
html.ad1 body:not(.t2) #xv .pf .adTr-r {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}
html.ad1 body:not(.t2) #xv .pf .adTr-i {
  flex: none;
  width: 40px;
  height: 40px;
  border-radius: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
}
html.ad1 body:not(.t2) #xv .pf .adTr-r.k-c .adTr-i {
  background: #fff1cc;
}
html.ad1 body:not(.t2) #xv .pf .adTr-r.k-a .adTr-i {
  background: #f7dce8;
  color: #a8366a;
}
html.ad1 body:not(.t2) #xv .pf .adTr-r.k-s .adTr-i {
  background: #e1e2f7;
  color: #4b4fb5;
}
html.ad1[data-theme="dark"] body:not(.t2) #xv .pf .adTr-r.k-c .adTr-i {
  background: #3a3016;
}
html.ad1[data-theme="dark"] body:not(.t2) #xv .pf .adTr-r.k-a .adTr-i {
  background: #3a1d2b;
  color: #f08cbb;
}
html.ad1[data-theme="dark"] body:not(.t2) #xv .pf .adTr-r.k-s .adTr-i {
  background: #24264a;
  color: #a9acf2;
}
/* اللي ما وصلها: الرسمة باهتة شوي، والنص بلون ثانوي */
html.ad1 body:not(.t2) #xv .pf .adTr-r:not(.on) .adTr-i svg {
  opacity: 0.55;
}
html.ad1 body:not(.t2) #xv .pf .adTr-t {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
html.ad1 body:not(.t2) #xv .pf .adTr-t b {
  font-size: 0.94rem;
  color: var(--ad-ink);
}
html.ad1 body:not(.t2) #xv .pf .adTr-r:not(.on) .adTr-t b {
  color: var(--ad-muted);
}
html.ad1 body:not(.t2) #xv .pf .adTr-t small {
  font-size: 0.8rem;
  line-height: 1.6;
  color: var(--ad-muted);
}
html.ad1 body:not(.t2) #xv .pf .adTr-t .adTr-n {
  font-weight: 700;
  color: var(--c-gold-text);
}
html.ad1[data-theme="dark"] body:not(.t2) #xv .pf .adTr-t .adTr-n {
  color: #ffe29a;
}
html.ad1 body:not(.t2) #xv .pf .adTr-g {
  flex: none;
  height: 26px;
  padding: 0 10px;
  border-radius: var(--r-pill);
  background: #ffd166;
  color: #4a3500;
  font-size: 0.75rem;
  font-weight: 700;
  display: flex;
  align-items: center;
}
html.ad1 body:not(.t2) #xv .pf .adTr-k {
  flex: none;
  color: var(--ad-muted);
  padding-top: 2px;
}

/* ---------- ورقة «سمّ كائنك»: شبكة أسماء بخلفية فاتحة، المختار أخضر غامق، وحقل نعناعي ---------- */
html.ad1 body:not(.t2) .chapter-sheet-panel .pfGrid .pfPick[data-nk] {
  min-height: 44px;
  border: 1.5px solid var(--ad-line);
  border-radius: var(--r-lg);
  background: var(--ad-bg);
  color: var(--ad-ink);
  font-size: 0.875rem;
}
html.ad1 body:not(.t2) .chapter-sheet-panel .pfGrid .pfPick[data-nk][aria-pressed="true"] {
  border-color: #0d4f3c;
  background: #0d4f3c;
  color: #fff;
}
html.ad1[data-theme="dark"] body:not(.t2) .chapter-sheet-panel .pfGrid .pfPick[data-nk][aria-pressed="true"] {
  border-color: #1f7a55;
  background: #1f7a55;
}
html.ad1 body:not(.t2) .chapter-sheet-panel .pfNkF {
  gap: 8px;
}
html.ad1 body:not(.t2) .chapter-sheet-panel .pfNkF input {
  min-height: 50px;
  border: 1.5px solid var(--ad-line);
  border-radius: var(--r-xl);
  padding-inline: 14px;
  background: var(--ad-bg);
  color: var(--ad-ink);
  font-size: 0.94rem;
}
html.ad1 body:not(.t2) .chapter-sheet-panel .pfNkF .pfPick {
  min-height: 50px;
  padding-inline: 20px;
  border: 0;
  border-radius: var(--r-xl);
  background: #0d4f3c;
  color: #fff;
  font-size: 0.94rem;
}
html.ad1[data-theme="dark"] body:not(.t2) .chapter-sheet-panel .pfNkF .pfPick {
  background: #1f7a55;
}
html.ad1 body:not(.t2) .chapter-sheet-panel .pfPend {
  border-radius: var(--r-lg);
  padding: 10px 14px;
  font-weight: 700;
}

/* ---------- ورقة «شارك كائنك»: معاينة أصغر (يبان زر «شارك» بدون نزول) ومفتاح بدل المربع ---------- */
html.ad1 body:not(.t2) .chapter-sheet-panel .pfTabs {
  border-radius: var(--r-pill);
  background: var(--ad-mint);
}
html.ad1 body:not(.t2) .chapter-sheet-panel .pfTabs [role="tab"] {
  min-height: 40px;
  border-radius: var(--r-pill);
}
html.ad1 body:not(.t2) .chapter-sheet-panel .pfStory9 {
  width: 150px;
}
html.ad1 body:not(.t2) .chapter-sheet-panel .pfRow:has(#pfFull) {
  justify-content: space-between;
  padding-inline: 14px;
  font-weight: 700;
  margin-top: 8px;
  cursor: pointer;
}
/* المفتاح (مراجعة المعلم ٨ نوفمبر: كان المسار المطفي ما يبان): مسار رمادي بإطار واضح ٥٢×٣٢ وقرص أبيض بظل.
   مطفي القرص عند بداية السطر (يمين)، شغّال المسار أخضر والقرص عند نهايته. نفس الشكل لمفاتيح «رابط بروفايلي» (.pfSw).
   مساحة الضغط: الصف كله (label / button) ارتفاعه ٤٨ */
html.ad1 body:not(.t2) .chapter-sheet-panel #pfFull,
html.ad1 body:not(.t2) .chapter-sheet-panel .pfRow > .pfSw {
  appearance: none;
  position: relative;
  flex: none;
  box-sizing: border-box;
  /* app.css يفرض عرض ٢٠ إجباري على كل checkbox داخل label، وmin-width يغلبه */
  width: 52px;
  min-width: 52px;
  height: 32px;
  padding: 0;
  order: 1;
  margin: 0;
  border: 2px solid #7f958b;
  border-radius: var(--r-pill);
  background: #d5dfda;
  cursor: pointer;
  transition: background-color 0.2s, border-color 0.2s;
}
html.ad1 body:not(.t2) .chapter-sheet-panel #pfFull::before,
html.ad1 body:not(.t2) .chapter-sheet-panel .pfRow > .pfSw::after {
  content: "";
  position: absolute;
  inset-block-start: 2px;
  inset-inline-start: 2px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.35);
  transition: inset-inline-start 0.2s;
}
html.ad1 body:not(.t2) .chapter-sheet-panel #pfFull:checked,
html.ad1 body:not(.t2) .chapter-sheet-panel .pfRow[aria-checked="true"] > .pfSw {
  border-color: #17794e;
  background: #1f9d63;
}
html.ad1 body:not(.t2) .chapter-sheet-panel #pfFull:checked::before,
html.ad1 body:not(.t2) .chapter-sheet-panel .pfRow[aria-checked="true"] > .pfSw::after {
  inset-inline-start: 22px;
}
html.ad1[data-theme="dark"] body:not(.t2) .chapter-sheet-panel #pfFull:not(:checked),
html.ad1[data-theme="dark"] body:not(.t2) .chapter-sheet-panel .pfRow:not([aria-checked="true"]) > .pfSw {
  border-color: #8aa298;
  background: #2b3b35;
}
html.ad1[data-theme="dark"] body:not(.t2) .chapter-sheet-panel #pfFull:not(:checked)::before,
html.ad1[data-theme="dark"] body:not(.t2) .chapter-sheet-panel .pfRow:not([aria-checked="true"]) > .pfSw::after {
  background: #e4ece8;
}
html.ad1[data-theme="dark"] body:not(.t2) .chapter-sheet-panel #pfFull:checked,
html.ad1[data-theme="dark"] body:not(.t2) .chapter-sheet-panel .pfRow[aria-checked="true"] > .pfSw {
  border-color: #6fd3a0;
  background: #1f9d63;
}
html.ad1 body:not(.t2) .chapter-sheet-panel #pfFull:focus-visible {
  outline: 3px solid #ffd166;
  outline-offset: 2px;
}
@media (prefers-reduced-motion: reduce) {
  html.ad1 body:not(.t2) .chapter-sheet-panel #pfFull,
  html.ad1 body:not(.t2) .chapter-sheet-panel #pfFull::before,
  html.ad1 body:not(.t2) .chapter-sheet-panel .pfRow > .pfSw,
  html.ad1 body:not(.t2) .chapter-sheet-panel .pfRow > .pfSw::after {
    transition: none;
  }
}

/* ---------- تقدّمي: ٣ مربعات أرقام ---------- */
html.ad1 body:not(.t2) #xv > .adNum {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}
html.ad1 body:not(.t2) #xv > .adNum .adNum-c {
  border-radius: var(--r-3xl);
  padding: 14px 8px;
  background: var(--ad-card);
  box-shadow: var(--edge) var(--card-edge);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  text-align: center;
}
html.ad1 body:not(.t2) #xv > .adNum b {
  font: 700 1.5rem/1.2 Alexandria, "IBM Plex Sans Arabic", sans-serif;
}
html.ad1 body:not(.t2) #xv > .adNum span {
  font-size: 0.75rem;
  color: var(--ad-muted);
}
html.ad1 body:not(.t2) #xv > .adNum .b b {
  color: #1f67ae;
}
html.ad1 body:not(.t2) #xv > .adNum .g b {
  color: #1a8754;
}
html.ad1 body:not(.t2) #xv > .adNum .o b {
  color: #c25e00;
}
html.ad1[data-theme="dark"] body:not(.t2) #xv > .adNum .b b {
  color: #7fb3ea;
}
html.ad1[data-theme="dark"] body:not(.t2) #xv > .adNum .g b {
  color: #5fc79a;
}
html.ad1[data-theme="dark"] body:not(.t2) #xv > .adNum .o b {
  color: #ffa94d;
}
/* الدروس والمعدل صارت في المربعات: نشيلها من بطاقة الطالب (يبقى الأوسمة والترتيب) */
html.ad1 body:not(.t2) #xv:has(> .adNum) > .profile-hero .profile-mini > div:nth-child(-n + 2) {
  display: none;
}

/* ---------- دائرة الحرف (الدوري والمجموعة) ---------- */
html.ad1 body:not(.t2) #xv .adAv {
  flex: none;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--av, #26784c);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font: 700 0.875rem/1 Alexandria, "IBM Plex Sans Arabic", sans-serif;
}
/* المعلم: أخضر غامق بقبعة ذهبية وحلقة ذهبية */
html.ad1 body:not(.t2) #xv .adAv.tch {
  background: #0d4f3c;
  color: #ffd166;
  box-shadow: 0 0 0 2px #ffd166;
}
html.ad1 body:not(.t2) #xv .dw-page .dw-lst .adNm {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
/* المجموعة: الرسالة والدائرة في صف (الدائرة عند بداية السطر وتحت) */
html.ad1 body:not(.t2) #xv .chatBox .cItem.adF {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 8px;
}
html.ad1 body:not(.t2) #xv .chatBox .cItem.adF > .chat-day {
  flex-basis: 100%;
}
html.ad1 body:not(.t2) #xv .chatBox .cItem.adF > .adAv {
  width: 32px;
  height: 32px;
}
html.ad1 body:not(.t2) #xv .chatBox .cItem.adF > .chat-msg {
  max-width: min(calc(100% - 48px), 520px);
}
/* ===== AD-D2 end ===== */
/* ===== AD-E2 start: تحصيلي «تقريري» (.trp-sheet) + صفحة «خطتي» برحلة اليوم (#xv[data-ad="plan"]) + شرائح شاشة الدخول (.lgs) ===== */
/* السلوك: assets/tah-report.js و assets/plan-journey.js و assets/login-slides.js. المراجع: Tahsili.dc، Plan.dc، Login.dc.
   الأزرار القديمة تاخذ حشو/لون base.css، فنعيد كل شي هنا. */

/* ---------- ١) تحصيلي: زر «تقريري» جنب «الوحدات» ---------- */
html.ad1 body.t3:not(.t2) #h2B .sh2 .trp-open {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  margin: 0;
  margin-inline-start: auto;
  padding: 0 16px;
  border: 2px solid var(--t3-sel);
  border-radius: var(--r-pill);
  background: var(--ad-card);
  color: var(--t3-ink);
  font-family: "IBM Plex Sans Arabic", sans-serif;
  font-size: 14px;
  font-weight: 700;
  box-shadow: 0 3px 0 var(--t3-line2);
  cursor: pointer;
}
html.ad1 body.t3:not(.t2) #h2B .sh2:has(.trp-open) {
  display: flex;
  align-items: center;
  gap: 10px;
}
/* ورقة «تقريري» (csOpen) */
html.ad1 .trp-sheet .trp {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-block-end: 8px;
}
html.ad1 .trp-sheet .trp-line {
  margin: 0;
  font-size: 15px;
  line-height: 1.7;
  color: var(--ad-ink);
}
html.ad1 .trp-sheet .trp-line b {
  color: var(--t3-ink);
}
html.ad1 .trp-sheet .trp-nw {
  margin: 0;
  font-size: 13px;
  color: var(--ad-muted);
}
html.ad1 .trp-sheet .trp-h {
  margin: 6px 0 0;
  font-family: Alexandria, "IBM Plex Sans Arabic", sans-serif;
  font-size: 16px;
  font-weight: 700;
  color: var(--ad-ink);
}
html.ad1 .trp-sheet .trp-list {
  display: flex;
  flex-direction: column;
  margin: 0;
  padding: 0;
  list-style: none;
}
html.ad1 .trp-sheet .trp-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-block-end: 1px solid var(--ad-line);
}
html.ad1 .trp-sheet .trp-tx {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}
html.ad1 .trp-sheet .trp-tx b {
  font-size: 15px;
  font-weight: 700;
  color: var(--ad-ink);
}
html.ad1 .trp-sheet .trp-tx small {
  font-size: 12.5px;
  color: var(--ad-muted);
}
html.ad1 .trp-sheet .trp-bar {
  display: block;
  max-inline-size: 200px;
  block-size: 6px;
  border-radius: var(--r-pill);
  background: var(--ad-line);
  overflow: hidden;
}
html.ad1 .trp-sheet .trp-bar i {
  display: block;
  inline-size: var(--trp-w);
  block-size: 100%;
  border-radius: var(--r-pill);
  background: var(--t3);
}
html.ad1 .trp-sheet .trp-pc {
  display: flex;
  flex: none;
  flex-direction: column;
  align-items: flex-end;
  min-inline-size: 88px;
  color: var(--ad-muted);
}
html.ad1 .trp-sheet .trp-pc b {
  font-family: Alexandria, "IBM Plex Sans Arabic", sans-serif;
  font-size: 17px;
  font-weight: 700;
}
html.ad1 .trp-sheet .trp-pc small {
  font-size: 12px;
  font-weight: 700;
}
/* المستوى بلونه + كلمة (ما نعتمد على اللون بس) */
html.ad1 .trp-sheet .lv-hi .trp-pc {
  color: #17794e;
}
html.ad1 .trp-sheet .lv-mid .trp-pc {
  color: #8a5d00;
}
html.ad1 .trp-sheet .lv-low .trp-pc {
  color: #b3261e;
}
html.ad1 .trp-sheet .trp-more {
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  min-height: 44px;
  color: var(--t3-ink);
  font-size: 14px;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 4px;
}
html.ad1 .trp-sheet .chapter-sheet-go[hidden] {
  display: none;
}
html.ad1 .trp-sheet .chapter-sheet-go {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 56px;
  margin-block-start: 10px;
}
html.ad1 .trp-sheet button:focus-visible,
html.ad1 .trp-sheet .trp-more:focus-visible,
html.ad1 body.t3:not(.t2) #h2B .trp-open:focus-visible {
  outline: 3px solid var(--t3-sel);
  outline-offset: 2px;
}
html.ad1[data-theme="dark"] .trp-sheet .lv-hi .trp-pc {
  color: #6fd3a0;
}
html.ad1[data-theme="dark"] .trp-sheet .lv-mid .trp-pc {
  color: #f2c65a;
}
html.ad1[data-theme="dark"] .trp-sheet .lv-low .trp-pc {
  color: #ffb4ab;
}

/* ---------- ٢) «خطتي»: رحلة اليوم (#plan) ---------- */
/* لون الرحلة: أخضر دروسي، ولطالب تحصيلي النيلي (AD-H) */
html.ad1 body:not(.t2) #xv[data-ad="plan"],
html.ad1 body:not(.t2) #planCard {
  --pj-c: #0d4f3c;
  --pj-deep: #0d4f3c;
  --pj-edge: var(--green-edge);
  --pj-ink: #0d4f3c;
  --pj-sel: #0d4f3c;
}
html.ad1[data-theme="dark"] body:not(.t2) #xv[data-ad="plan"],
html.ad1[data-theme="dark"] body:not(.t2) #planCard {
  --pj-c: #1e7a55;
  --pj-deep: #12402f;
  --pj-edge: #05201a;
  --pj-ink: #9fd3bf;
  --pj-sel: #4fb98a;
}
html.ad1 body.t3:not(.t2) #xv[data-ad="plan"],
html.ad1 body.t3:not(.t2) #planCard {
  --pj-c: var(--t3);
  --pj-deep: var(--t3-deep);
  --pj-edge: var(--t3-hero-edge);
  --pj-ink: var(--t3-ink);
  --pj-sel: var(--t3-sel);
}
html.ad1 body:not(.t2) #xv[data-ad="plan"] .sr-only {
  position: absolute;
  inline-size: 1px;
  block-size: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
html.ad1 body:not(.t2) #xv[data-ad="plan"] .pj {
  display: flex;
  flex-direction: column;
  gap: 18px;
  max-inline-size: 720px;
  margin-inline: auto;
  padding-block-end: 24px;
  color: var(--ad-ink);
}
/* البطاقة الغامقة فوق: التقدّم + الزر الكبير */
html.ad1 body:not(.t2) #xv[data-ad="plan"] .pj-hero {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 18px;
  border-radius: var(--r-5xl);
  background: var(--pj-deep);
  color: #ffffff;
  box-shadow: var(--edge-lg) var(--pj-edge);
}
html.ad1 body:not(.t2) #xv[data-ad="plan"] .pj-top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}
html.ad1 body:not(.t2) #xv[data-ad="plan"] .pj-top b {
  font-family: Alexandria, "IBM Plex Sans Arabic", sans-serif;
  font-size: 20px;
  font-weight: 700;
}
html.ad1 body:not(.t2) #xv[data-ad="plan"] .pj-cnt {
  color: #ffd166;
  font-size: 14px;
  font-weight: 700;
}
html.ad1 body:not(.t2) #xv[data-ad="plan"] .pj-bar {
  block-size: 10px;
  border-radius: var(--r-pill);
  background: rgba(255, 255, 255, 0.18);
  overflow: hidden;
}
html.ad1 body:not(.t2) #xv[data-ad="plan"] .pj-bar i {
  display: block;
  inline-size: var(--pj-w);
  block-size: 100%;
  border-radius: var(--r-pill);
  background: #ffd166;
}
html.ad1 body:not(.t2) #xv[data-ad="plan"] .pj-meta {
  margin: 0;
  color: #d6ebe2;
  font-size: 13.5px;
}
html.ad1 body.t3:not(.t2) #xv[data-ad="plan"] .pj-meta {
  color: var(--t3-on-dark);
}
html.ad1 body:not(.t2) :is(#xv[data-ad="plan"], #planCard) .pj-go {
  display: flex;
  align-items: center;
  gap: 12px;
  inline-size: 100%;
  min-height: 68px;
  margin: 4px 0 6px;
  padding: 10px 22px;
  border: 0;
  border-radius: var(--r-pill);
  background: #ffd166;
  color: #0b3a2d;
  font-family: "IBM Plex Sans Arabic", sans-serif;
  text-align: start;
  box-shadow: var(--edge) var(--gold-edge);
  cursor: pointer;
}
html.ad1 body:not(.t2) :is(#xv[data-ad="plan"], #planCard) .pj-go:active {
  transform: translateY(3px);
  box-shadow: 0 1px 0 var(--gold-edge);
}
html.ad1 body:not(.t2) :is(#xv[data-ad="plan"], #planCard) .pj-gt {
  display: flex;
  flex: 1;
  flex-direction: column;
  min-width: 0;
}
html.ad1 body:not(.t2) :is(#xv[data-ad="plan"], #planCard) .pj-gt b {
  font-family: Alexandria, "IBM Plex Sans Arabic", sans-serif;
  font-size: 18px;
  font-weight: 700;
}
html.ad1 body:not(.t2) :is(#xv[data-ad="plan"], #planCard) .pj-gt small {
  overflow: hidden;
  font-size: 13px;
  font-weight: 500;
  text-overflow: ellipsis;
  white-space: nowrap;
}
html.ad1 body:not(.t2) :is(#xv[data-ad="plan"], #planCard) .pj-go svg {
  flex: none;
}
/* المسار: نقطة لكل خطوة وخط يوصلها */
html.ad1 body:not(.t2) #xv[data-ad="plan"] .pj-path {
  display: flex;
  flex-direction: column;
  margin: 0;
  padding: 0;
  list-style: none;
}
html.ad1 body:not(.t2) #xv[data-ad="plan"] .pj-step {
  position: relative;
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  align-items: start;
  gap: 12px;
  padding-block-end: 18px;
}
html.ad1 body:not(.t2) #xv[data-ad="plan"] .pj-step::before {
  content: "";
  position: absolute;
  /* من وسط هذي النقطة لوسط اللي بعدها (النقطة على بعد ١٢ من أول البطاقة) */
  inset-block: 34px -34px;
  inset-inline-start: 20px;
  inline-size: 4px;
  border-radius: var(--r-pill);
  background: repeating-linear-gradient(to bottom, var(--ad-line) 0 8px, transparent 8px 14px);
}
html.ad1 body:not(.t2) #xv[data-ad="plan"] .pj-step.done::before {
  background: #1f9d63;
}
html.ad1 body:not(.t2) #xv[data-ad="plan"] .pj-end::before {
  content: none;
}
html.ad1 body:not(.t2) #xv[data-ad="plan"] .pj-node {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  box-sizing: border-box;
  inline-size: 44px;
  block-size: 44px;
  margin-block-start: 12px;
  border: 3px solid var(--ad-line);
  border-radius: 50%;
  background: var(--ad-card);
  color: var(--ad-muted);
  font-family: Alexandria, "IBM Plex Sans Arabic", sans-serif;
  font-size: 16px;
  font-weight: 700;
}
html.ad1 body:not(.t2) #xv[data-ad="plan"] .pj-step.done .pj-node {
  border-color: #1f9d63;
  background: #1f9d63;
  color: #ffffff;
}
html.ad1 body:not(.t2) #xv[data-ad="plan"] .pj-step.cur .pj-node {
  border-color: var(--pj-c);
  background: var(--pj-c);
  color: #ffffff;
  box-shadow: 0 0 0 6px color-mix(in srgb, var(--pj-c) 22%, transparent);
}
html.ad1 body:not(.t2) #xv[data-ad="plan"] .pj-card {
  display: flex;
  align-items: center;
  gap: 12px;
  inline-size: 100%;
  min-height: 68px;
  margin: 0;
  padding: 12px 14px;
  border: 1.5px solid var(--ad-line);
  border-radius: var(--r-3xl);
  background: var(--ad-card);
  color: var(--ad-ink);
  font-family: "IBM Plex Sans Arabic", sans-serif;
  text-align: start;
  box-shadow: var(--edge) var(--card-edge);
  cursor: pointer;
}
html.ad1 body:not(.t2) #xv[data-ad="plan"] .pj-step.cur .pj-card {
  border: 2px solid var(--pj-sel);
  box-shadow: var(--edge) var(--pj-sel);
}
html.ad1 body:not(.t2) #xv[data-ad="plan"] .pj-step.done .pj-card {
  background: transparent;
  box-shadow: none;
}
html.ad1 body:not(.t2) #xv[data-ad="plan"] .pj-step.done .pj-tx b {
  color: var(--ad-muted);
}
html.ad1 body:not(.t2) #xv[data-ad="plan"] .pj-ic {
  display: grid;
  flex: none;
  place-items: center;
  inline-size: 40px;
  block-size: 40px;
  border-radius: var(--r-md);
  background: var(--ad-mint);
  color: var(--pj-ink);
}
html.ad1 body:not(.t2) #xv[data-ad="plan"] .pj-tx {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
html.ad1 body:not(.t2) #xv[data-ad="plan"] .pj-tx b {
  font-size: 15px;
  font-weight: 700;
  line-height: 1.5;
}
html.ad1 body:not(.t2) #xv[data-ad="plan"] .pj-tx small {
  color: var(--ad-muted);
  font-size: 12.5px;
  line-height: 1.6;
}
html.ad1 body:not(.t2) #xv[data-ad="plan"] .pj-tag {
  flex: none;
  padding: 4px 10px;
  border-radius: var(--r-pill);
  background: var(--ad-bg);
  color: var(--ad-muted);
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}
html.ad1 body:not(.t2) #xv[data-ad="plan"] .pj-tag.ok {
  background: #e3f5ec;
  color: #17794e;
}
html.ad1 body:not(.t2) #xv[data-ad="plan"] .pj-tag.now {
  background: var(--pj-c);
  color: #ffffff;
}
/* آخر المسار: رسمة العلم */
html.ad1 body:not(.t2) #xv[data-ad="plan"] .pj-end .pj-node {
  border-style: dashed;
  color: var(--ad-muted);
}
html.ad1 body:not(.t2) #xv[data-ad="plan"] .pj-end.done .pj-node {
  border: 3px solid #e0a100;
  background: #ffd166;
  color: #0b3a2d;
}
html.ad1 body:not(.t2) #xv[data-ad="plan"] .pj-endc {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border: 2px dashed var(--ad-line);
  border-radius: var(--r-3xl);
}
html.ad1 body:not(.t2) #xv[data-ad="plan"] .pj-endc > span {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
html.ad1 body:not(.t2) #xv[data-ad="plan"] .pj-endc b {
  font-family: Alexandria, "IBM Plex Sans Arabic", sans-serif;
  font-size: 15px;
  font-weight: 700;
}
html.ad1 body:not(.t2) #xv[data-ad="plan"] .pj-endc small {
  color: var(--ad-muted);
  font-size: 12.5px;
  line-height: 1.6;
}
html.ad1 body:not(.t2) #xv[data-ad="plan"] .pj-art {
  flex: none;
  inline-size: 104px;
  block-size: auto;
}
html.ad1 body:not(.t2) #xv[data-ad="plan"] .pj-a-gr {
  fill: var(--ad-line);
}
html.ad1 body:not(.t2) #xv[data-ad="plan"] .pj-a-hill {
  fill: var(--ad-mint);
}
html.ad1 body:not(.t2) #xv[data-ad="plan"] .pj-a-ink {
  stroke: var(--pj-ink);
  fill: none;
}
html.ad1 body:not(.t2) #xv[data-ad="plan"] .pj-a-flag,
html.ad1 body:not(.t2) #xv[data-ad="plan"] .pj-a-star,
html.ad1 body:not(.t2) #xv[data-ad="plan"] .pj-a-sun {
  fill: #ffd166;
  stroke: #e0a100;
  stroke-width: 2.5;
  stroke-linejoin: round;
}
html.ad1 body:not(.t2) #xv[data-ad="plan"] .pj-a-dot {
  fill: #1f9d63;
}
html.ad1 body:not(.t2) #xv[data-ad="plan"] .pj-a-leaf {
  fill: #9fd3bf;
}
html.ad1 body:not(.t2) #xv[data-ad="plan"] .pj-a-leaf2 {
  fill: #1f9d63;
}
html.ad1 body:not(.t2) #xv[data-ad="plan"] .pj-note {
  margin: 0;
  color: var(--ad-muted);
  font-size: 12.5px;
  line-height: 1.7;
  text-align: center;
}
/* ما فيه خطة اليوم */
html.ad1 body:not(.t2) #xv[data-ad="plan"] .pj-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 28px 20px;
  border-radius: var(--r-4xl);
  background: var(--ad-card);
  text-align: center;
  box-shadow: var(--edge) var(--card-edge);
}
html.ad1 body:not(.t2) #xv[data-ad="plan"] .pj-empty .pj-art {
  inline-size: 150px;
}
html.ad1 body:not(.t2) #xv[data-ad="plan"] .pj-empty b {
  font-family: Alexandria, "IBM Plex Sans Arabic", sans-serif;
  font-size: 18px;
}
html.ad1 body:not(.t2) #xv[data-ad="plan"] .pj-empty p {
  margin: 0;
  color: var(--ad-muted);
  font-size: 14px;
  line-height: 1.8;
}
html.ad1 body:not(.t2) #xv[data-ad="plan"] .pj-home {
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  margin-block-start: 6px;
  padding: 0 22px;
  border-radius: var(--r-pill);
  background: var(--pj-c);
  color: #ffffff;
  font-weight: 700;
  text-decoration: none;
  box-shadow: var(--edge) var(--pj-edge);
}
html.ad1 body:not(.t2) #xv[data-ad="plan"] button:focus-visible,
html.ad1 body:not(.t2) #xv[data-ad="plan"] a:focus-visible,
html.ad1 body:not(.t2) #planCard .pj-link:focus-visible {
  outline: 3px solid var(--pj-sel);
  outline-offset: 3px;
}
/* المدخل: رابط «رحلة اليوم» تحت بطاقة خطة اليوم */
html.ad1 body:not(.t2) #planCard .pj-link {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 46px;
  margin-block-start: 12px;
  border: 1.5px solid var(--ad-line);
  border-radius: var(--r-pill);
  color: var(--pj-ink);
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
}
@media (prefers-reduced-motion: reduce) {
  html.ad1 body:not(.t2) :is(#xv[data-ad="plan"], #planCard) .pj-go:active {
    transform: none;
  }
}

/* ---------- ٣) شاشة الدخول: شرائح «وش في دروسي» بدل الرسمة الثابتة ---------- */
html.ad1 #gate.duLoginDesign .duVisual.lgs-on {
  --lgs-ink: #0d4f3c;
  --lgs-bg: #d3ecdf;
  --lgs-dot: #bfd5cb;
  --lgs-muted: #4f6b66;
  height: auto;
  overflow: visible;
}
html.ad1 #gate.duLoginDesign .duVisual.lgs-on > .login-scene,
html.ad1 #gate.duLoginDesign .duVisual.lgs-on > .duShadow,
html.ad1 #gate.duLoginDesign .duVisual.lgs-on > .duCaption {
  display: none;
}
html.ad1 #gate .lgs {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  inline-size: min(100%, 340px);
  margin-inline: auto;
}
html.ad1 #gate .lgs-vp {
  display: grid;
  inline-size: 100%;
  touch-action: pan-y;
  user-select: none;
}
html.ad1 #gate .lgs-slide {
  grid-area: 1 / 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  opacity: 0;
  visibility: hidden;
  transform: translateX(-24px);
  transition: opacity 0.35s ease, transform 0.35s ease, visibility 0.35s;
}
html.ad1 #gate .lgs-slide.on {
  opacity: 1;
  visibility: visible;
  transform: none;
}
html.ad1 #gate .lgs-slide svg {
  inline-size: 100%;
  max-inline-size: 250px;
  block-size: auto;
}
html.ad1 #gate .lgs .lgs-bg {
  fill: var(--lgs-bg);
}
html.ad1 #gate .lgs .k {
  stroke: var(--lgs-ink);
}
html.ad1 #gate .lgs-fa {
  animation: lgsFloatA 4s ease-in-out infinite;
}
html.ad1 #gate .lgs-fb {
  animation: lgsFloatB 5s ease-in-out infinite;
}
@keyframes lgsFloatA {
  50% {
    transform: translateY(-5px);
  }
}
@keyframes lgsFloatB {
  50% {
    transform: translateY(4px);
  }
}
html.ad1 #gate .lgs-cap {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin: 0;
  text-align: center;
}
html.ad1 #gate .lgs-cap b {
  color: var(--lgs-ink);
  font-family: Alexandria, "IBM Plex Sans Arabic", sans-serif;
  font-size: 17px;
  font-weight: 700;
}
html.ad1 #gate .lgs-cap span {
  color: var(--lgs-muted);
  font-size: 13.5px;
  line-height: 1.7;
}
html.ad1 #gate .lgs-ctl {
  display: flex;
  align-items: center;
  gap: 6px;
}
html.ad1 #gate .lgs-dots {
  display: flex;
}
html.ad1 #gate .lgs-dot,
html.ad1 #gate .lgs-pp {
  display: grid;
  place-items: center;
  min-width: 0;
  min-height: 0;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--lgs-ink);
  box-shadow: none;
  cursor: pointer;
}
html.ad1 #gate .lgs-dot {
  inline-size: 30px;
  block-size: 44px;
}
html.ad1 #gate .lgs-dot i {
  display: block;
  inline-size: 8px;
  block-size: 8px;
  border-radius: var(--r-pill);
  background: var(--lgs-dot);
  transition: inline-size 0.25s, background-color 0.25s;
}
html.ad1 #gate .lgs-dot[aria-current="true"] i {
  inline-size: 24px;
  background: var(--lgs-ink);
}
html.ad1 #gate .lgs-pp {
  inline-size: 44px;
  block-size: 44px;
  border-radius: 50%;
}
html.ad1 #gate .lgs-pp svg {
  box-sizing: content-box;
  padding: 6px;
  border: 1.5px solid var(--lgs-dot);
  border-radius: 50%;
}
html.ad1 #gate .lgs-pp .lgs-pl,
html.ad1 #gate .lgs-pp[aria-pressed="true"] .lgs-ps {
  display: none;
}
html.ad1 #gate .lgs-pp[aria-pressed="true"] .lgs-pl {
  display: block;
}
html.ad1 #gate .lgs-dot:focus-visible,
html.ad1 #gate .lgs-pp:focus-visible {
  outline: 3px solid var(--lgs-ink);
  outline-offset: -4px;
  border-radius: var(--r-md);
}
html.ad1[data-theme="dark"] #gate.duLoginDesign .duVisual.lgs-on {
  --lgs-ink: #cfe6dc;
  --lgs-bg: #173d31;
  --lgs-dot: #3b5a4e;
  --lgs-muted: #a9c4b9;
}
/* شاشة قصيرة: الرسمة أصغر */
@media (max-width: 900px) and (max-height: 700px) {
  html.ad1 #gate .lgs-slide svg {
    max-inline-size: 170px;
  }
}
/* الكمبيوتر: الرسمة أكبر في عمود الرسمة */
@media (min-width: 901px) {
  html.ad1 #gate .lgs {
    inline-size: min(100%, 420px);
  }
  html.ad1 #gate .lgs-slide svg {
    max-inline-size: 380px;
  }
  html.ad1 #gate .lgs-cap b {
    font-size: 20px;
  }
}
@media (prefers-reduced-motion: reduce) {
  html.ad1 #gate .lgs-slide,
  html.ad1 #gate .lgs-dot i {
    transform: none;
    transition: none;
  }
  html.ad1 #gate .lgs-fa,
  html.ad1 #gate .lgs-fb {
    animation: none;
  }
}
/* ===== AD-E2 end ===== */
/* ===== AD-F2 start: إصلاحات مراجعة المعلم (٨ نوفمبر) — زر «شارك» وخيارات ورقة المشاركة، زر الصندوق، نتيجة المبارزة، زر «ابدأ الخطوة الجاية» في بطاقة الخطة ===== */
/* مفتاح «اكتب اسمي الكامل» صار في قسم AD-D2 نفسه. خلل «أقوى فصل» في حسابي انحل في assets/profile.css (.pfRow > .pfSw). */

/* ---------- ١) الأزرار الأساسية في أوراق حسابي («شارك»، «احفظ»…) و«شارك كائني»: أخضر غامق بنص أبيض وحافة (كان نعناعي باهت ويبان معطّل) ---------- */
html.ad1 body:not(.t2) .chapter-sheet-panel .pfGo:not(.gold),
html.ad1 body:not(.t2) #xv .pf .pfOcb .pfShare {
  border: 0;
  background: #0d4f3c;
  color: #fff;
  box-shadow: var(--edge) var(--green-edge);
}
html.ad1[data-theme="dark"] body:not(.t2) .chapter-sheet-panel .pfGo:not(.gold),
html.ad1[data-theme="dark"] body:not(.t2) #xv .pf .pfOcb .pfShare {
  background: #1e7a55;
  color: #fff;
  box-shadow: var(--edge) #06201a;
}
html.ad1 body:not(.t2) .chapter-sheet-panel .pfGo:not(.gold):active,
html.ad1 body:not(.t2) #xv .pf .pfOcb .pfShare:active {
  transform: translateY(3px);
  box-shadow: 0 1px 0 var(--green-edge);
}
/* «صورة / مقطع ٥ ثواني»: المختار معبّى أخضر بنص أبيض، والثاني بطاقة عادية */
html.ad1 body:not(.t2) .chapter-sheet-panel .pfSeg .pfPick {
  padding-inline: 16px;
  border: 1.5px solid var(--ad-line);
  background: var(--ad-card);
  color: var(--ad-ink);
  box-shadow: 0 3px 0 var(--card-edge);
}
html.ad1 body:not(.t2) .chapter-sheet-panel .pfSeg .pfPick[aria-pressed="true"] {
  border-color: #0d4f3c;
  background: #0d4f3c;
  color: #fff;
  box-shadow: 0 3px 0 var(--green-edge);
}
html.ad1[data-theme="dark"] body:not(.t2) .chapter-sheet-panel .pfSeg .pfPick[aria-pressed="true"] {
  border-color: #1e7a55;
  background: #1e7a55;
  box-shadow: 0 3px 0 #06201a;
}
/* التبويبين فوق («مقطع أو صورة / رابط بروفايلي»): المختار أبيض بحافة ونص أخضر عريض، والثاني باهت */
html.ad1 body:not(.t2) .chapter-sheet-panel .pfTabs [role="tab"][aria-selected="true"] {
  background: var(--ad-card);
  color: var(--c-green);
  box-shadow: 0 3px 0 var(--card-edge);
}
html.ad1[data-theme="dark"] body:not(.t2) .chapter-sheet-panel .pfTabs [role="tab"][aria-selected="true"] {
  color: #9fd3bf;
  box-shadow: inset 0 0 0 1.5px #3fa37d, 0 3px 0 #06201a;
}
html.ad1 body:not(.t2) .chapter-sheet-panel .pfTabs [role="tab"][aria-selected="false"] {
  color: var(--ad-muted);
}

/* ---------- ٢) الصندوق: «الألعاب والتحديات» على البطاقة الذهبية زر أخضر غامق بحافة، وحافة البطاقة ٤ بدل ٦ ---------- */
html.ad1 body:not(.t2) #xv[data-ad="box"] .g2-head + .g2-card {
  border-width: 1.5px;
  box-shadow: var(--edge) #d9a92e;
}
html.ad1 body:not(.t2) #xv[data-ad="box"] .g2-result #g2Games {
  min-height: 52px;
  border: 0;
  border-radius: var(--r-pill);
  background: #0d4f3c;
  color: #fff;
  font-weight: 700;
  box-shadow: var(--edge) var(--green-edge);
}

/* ---------- ٣) نتيجة المبارزة (والألعاب كلها): الصفر رقم واضح بلون هادي، و«نقاط الجولة» صف ورقمه في كبسولة ---------- */
/* «٠» العربي نقطة صغيرة بنفس حجم الأرقام، فنكبّر الحرف نفسه (معيّن واضح) بلون هادي ونثبّت ارتفاع الخانة على ارتفاع الأرقام الثانية */
html.ad1 body:not(.t2) #xv .g2-result .g2-split b.gx-zero {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 2.45rem;
  overflow: visible;
  color: var(--ad-muted);
  font-size: 3rem;
  line-height: 1;
}
html.ad1 body:not(.t2) #xv .g2-result .g2-best {
  align-items: center;
}
html.ad1 body:not(.t2) #xv .g2-result .g2-best > b {
  flex: none;
  min-width: 44px;
  padding: 4px 14px;
  border-radius: var(--r-pill);
  background: var(--ad-mint);
  color: var(--c-green);
  font-family: Alexandria, "IBM Plex Sans Arabic", sans-serif;
  text-align: center;
}
html.ad1[data-theme="dark"] body:not(.t2) #xv .g2-result .g2-best > b {
  color: #9fd3bf;
}
/* الصندوق ذهبي: الكبسولة بيضاء عليه */
html.ad1 body:not(.t2) #xv[data-ad="box"] .g2-result .g2-best > b {
  background: #fff;
  color: #5a4500;
}
/* أزرار المبارزة: سطر واحد بأيقونة؛ «حدّث النتيجة» أساسي لين يخلّص المنافس */
html.ad1 body:not(.t2) #xv[data-ad="duel"] .g2-result .gx-dacts button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 50px;
  padding-inline: 12px;
  border-radius: var(--r-pill);
  white-space: nowrap;
}
html.ad1 body:not(.t2) #xv[data-ad="duel"] .g2-result .gx-dacts button svg {
  flex: none;
}
html.ad1 body:not(.t2) #xv[data-ad="duel"] .g2-result .gx-dacts button.gx-pri {
  border: 0;
  background: #0d4f3c;
  color: #fff;
  box-shadow: var(--edge) var(--green-edge);
}
html.ad1[data-theme="dark"] body:not(.t2) #xv[data-ad="duel"] .g2-result .gx-dacts button.gx-pri {
  background: #1e7a55;
  box-shadow: var(--edge) #06201a;
}

/* أزرار النتيجة («جولة جديدة» + «الألعاب والتحديات»): سطر واحد دايم — لو ما وسعهم الصف ينزل الثاني تحت بدل ما ينكسر الاسم */
html.ad1 body:not(.t2) #xv .g2-result .g2-actions button {
  flex: 1 1 auto;
  white-space: nowrap;
}
/* وردل: «الألعاب والتحديات» الزر الوحيد في بطاقة النتيجة، فيصير أساسي أخضر مثل سؤال اليوم (كان أبيض باهت) */
html.ad1 body:not(.t2) #xv[data-ad="wordle"] .gx-wsheet #g2Games {
  --card: #0d4f3c;
  --fg: #fff;
  border: 0;
  background: #0d4f3c;
  color: #fff;
  font-weight: 700;
  box-shadow: var(--edge) var(--green-edge);
}
html.ad1[data-theme="dark"] body:not(.t2) #xv[data-ad="wordle"] .gx-wsheet #g2Games {
  --card: #1e7a55;
  background: #1e7a55;
  box-shadow: var(--edge) #06201a;
}

/* ---------- ٤) بطاقة خطة اليوم في الرئيسية: زر «ابدأ الخطوة الجاية» (شكله من AD-E2) فوق البنود ---------- */
html.ad1 body:not(.t2) #planCard .pj-go {
  margin-block: 12px 10px;
}
html.ad1 body:not(.t2) #planCard .pj-go:focus-visible {
  outline: 3px solid var(--pj-sel);
  outline-offset: 3px;
}
/* ===== AD-F2 end ===== */
/* ===== AD-G2 start: إصلاحات ٨ نوفمبر (الصبح) — رسمة غلاف الدرس فوق، الشريط المثبّت يختفي، «‹ الألعاب» المكرر =====
   ١) .lesson-end-icon مكانه مقفول بـ !important (app.css) ← نخفيه ونعرض نسخة .seArt فوق (study-extras.js).
   ٢) #hxBar (الشريط اللي يثبت فوق وقت النزول — بقايا الهيدر القديم، شفاف ومغبّش وفيه الشخصية) ← يختفي (قرار المعلم).
   ٣) «‹ الألعاب» في بطاقات الحفظ يكرر زر الرجوع وتبويبات التمارين ← يختفي. */
html.ad1 body:not(.t2) #lpHero .lesson-end-icon {
  visibility: hidden;
}
html.ad1 body:not(.t2) #lpHero .seArt {
  position: absolute;
  inset-block-start: -22px;
  inset-inline-end: -24px;
  width: 112px;
  height: 112px;
  transform: rotate(-14deg);
  z-index: 0;
  pointer-events: none;
}
html.ad1 body:not(.t2) #lpHero .seArt svg {
  width: 100%;
  height: 100%;
  display: block;
}
html.ad1 body:not(.t2) #hxBar {
  display: none;
}
html.ad1 body:not(.t2) #xv .p2-ch {
  display: none;
}
/* ٤) شارة «🔥 2 ورا بعض» في رأس السؤال كانت تنكسر سطرين بعد ما انضاف «بلّغ عن خطأ» */
html.ad1 body:not(.t2) #quiz .lesson-quiz-head .cmbC {
  white-space: nowrap;
  flex-shrink: 0;
}
html.ad1 body:not(.t2) #quiz .lesson-quiz-head:has(.cmbC) {
  flex-wrap: wrap;
  row-gap: 8px;
}
/* ٥) رأس الصفحات الداخلية (قرار المعلم ٨ نوفمبر، «الخيار ١»): اسم الصفحة داخل زر الرجوع («‹ الألعاب») بنفس شكل «‹ الرئيسية».
   app-enhancements.js يحط .pbT على الزر والعنوان h1.pbH مخفي لقارئ الشاشة. ما فيه .page-title فقواعد AD-T المضغوطة ما تنطبق. */
html.ad1 body:not(.t2) #ih .pbH {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}
html.ad1 body:not(.t2) #ih .page-back-btn.pbT span {
  max-width: 62vw;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
/* ٦) المجموعة: زر «رجوع» داخل بطاقة «مجموعة الصف» يكرر «‹ المجموعة» فوق (قرار المعلم ٨ نوفمبر) */
html.ad1 body:not(.t2) #xv .chatHead a.chat-back {
  /* display مقفول بـ !important في app.css (html.ds3 .chat-back) → نخفيه بـ visibility ونطلعه من التخطيط */
  visibility: hidden;
  position: absolute;
  pointer-events: none;
}
/* ===== AD-G2 end ===== */
/* ===== AD-UX3: تباين النصوص (مراجعة تجربة ٩ نوفمبر، axe color-contrast ≥ 4.5) ===== */
/* ١) عدّاد «0 من 2» في الفصل المقفل: قاعدة ds3 في app.css (#h2B .car .cv .pg → color:#fff) كانت تغلب قاعدة .lk هنا، فيطلع أبيض على فاتح (١٫٢٦) */
html.ad1 body.hm2:not(.dsk) #h2car.car .cv.lk .pg {
  color: var(--ad-muted);
}
/* ٢) «أول درس لم تنجزه» في الليلي: النعناعي #9fd3bf على #17644c (٤٫٢٣) → أفتح. اللون مقفول بـ !important فنغيّر المتغير بدل القاعدة */
html.ad1[data-theme="dark"] body.hm2 .contCard .course-card-title small:first-child {
  --c-mint: #c4e8da;
}
/* ٣) زر «رهيب!» في نافذة اللقب/الوسام بالليلي: أبيض على #3fa37d (٣٫١١) → نص غامق (٥٫٤٩) */
/* قاعدة الأزرار الليلية في base.css خصوصيتها (0,7,1) — #_ داخل :is يرفعنا لمستوى id بدون !important */
html.ad1[data-theme="dark"] :is(.lvUpO, .badge-card, #_) button {
  color: #06201a;
}
/* ٤) «قوّها» في تقدّمي بالليلي: أبيض على #1f8a57 (٤٫٣٥) → أخضر أغمق (٥٫١٣) */
html.ad1[data-theme="dark"] body:not(.t2) #xv .mxSk-b {
  background: #1c7d4f;
}
/* ٥) عناوين بطاقات المختبر في الرئيسية (الفاتح): الأزرق والذهبي والزيتي والأخضر تحت ٤٫٥ مع شفافية .9 → أغمق */
html.ad1:not([data-theme="dark"]) body.hm2 .lb-tz.ask .k,
html.ad1:not([data-theme="dark"]) body.hm2 #mxStrip .lb-tz.ask .k { color: #1d5596; }
html.ad1:not([data-theme="dark"]) body.hm2 .lb-tz.trip .k,
html.ad1:not([data-theme="dark"]) body.hm2 #mxStrip .lb-tz.trip .k { color: #6b4d00; }
html.ad1:not([data-theme="dark"]) body.hm2 .lb-tz.eco .k,
html.ad1:not([data-theme="dark"]) body.hm2 #mxStrip .lb-tz.eco .k { color: #3d5a1a; }
html.ad1:not([data-theme="dark"]) body.hm2 .lb-tz.map .k,
html.ad1:not([data-theme="dark"]) body.hm2 #mxStrip .lb-tz.map .k { color: #155e41; }
/* ===== AD-UX3 end ===== */
/* ١٠ نوفمبر: رصيد الجواهر 💎 جنب النقاط في رأس الصفحة الداخلية (يفتح المتجر) — نفس شكل .bottom-menu-mini span */
.bottom-menu-mini .bm-gems {
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: var(--r-pill);
  padding: 2px 10px;
  font-size: 0.78rem;
  font-weight: 700;
  color: #fff;
  text-decoration: none;
}
