/*
 * «بيتنا نور» — مقاسات الكلام على الموبايل والتابلت (شاشات اللمس بس).
 *
 * التطبيق متصمم للتلفزيون بمقاسات vw جوه إطار 16:9. على موبايل بالعرض الإطار حوالي 730px، فأصغر خط (1.3vw) بيطلع حوالي 9.5px،
 * وده صغير على إيد وعين على بعد 30 سم. الملف ده بيرفع أي كلام لحد أدنى حوالي 1.8vw (≈13px على 732px).
 *
 * - الشرط `pointer: coarse` (اللمس هو الأساسي): الشاشات (ريموت LG، Android TV، سامسونج) والكمبيوتر مش بيتأثروا خالص.
 * - المقاسات كلها vw، فالتخطيط واحد على أي موبايل أو تابلت (الإطار دايمًا 16:9)، واللي اتجرّب على مقاس واحد ينفع على الكل.
 * - كل selector مسبوق بـ`html:root` عشان يغلب قواعد الثيم (`html[data-theme="paper"] …`) من غير !important.
 * - القياس: `node tools/mobile-text.js` (بيفشل لو فيه كلام ظاهر تحت 13px على 732×412)، و`--shots` للقطات في design/mobile-text/.
 */
@media (pointer: coarse) {

  /* ── مراجعة UX (U7): دايرة زرار OK بتاع الريموت جوه الأزرار ملهاش معنى على اللمس ── */
  html:root .dn .okb { display: none; }
  html:root .dn .remote-art .okb { display: block; } /* رسمة الريموت نفسها (شرح الماوس على LG) */

  /* ── مراجعة UX (U30): على اللمس الكارت المتحدد من الأول كان بيلمّح بالإجابة (الدوسة بتختار على طول، فمفيش داعي لحلقة) ── */
  html.ptr .dn-wudu .wd-cards.show .wd-card.foc { box-shadow: 0 .55vw 0 rgba(40, 25, 10, .4); transform: none; }

  /* ── البيت ── */
  html:root .hb-st { font-size: max(1.9vw, 13px); }
  html:root .hb-pray { font-size: max(1.9vw, 13px); }
  html:root .hb-par { font-size: max(1.85vw, 13px); }
  html:root .hb-d { width: 12.9vw; padding-left: .3vw; padding-right: .3vw; } /* «رحلة النهارده» من غير ما تلمس حرف الباب */
  html:root .hb-d b { font-size: max(1.78vw, 13px); }
  html:root .hb-head p { font-size: max(1.8vw, 13px); padding: 0 27vw 0 2vw; } /* بعيد عن فقاعة نور (يمين) لما الفقاعة تبقى سطرين */
  html:root .hb-bub { font-size: max(1.8vw, 13px); width: 21vw; }
  html:root .hb-m b { font-size: max(2vw, 13px); }
  html:root .hb-m small { font-size: max(1.8vw, 13px); }
  html:root .hb-m .hb-sx { font-size: max(1.8vw, 13px); }
  html:root .hb-go { font-size: max(1.85vw, 13px); top: -3.6vw; } /* فوق الصورة، بعيد عن «المحطة ١ من ٣» */

  /* ── شريط «رجوع + النجوم» ── */
  html:root #bnbar { height: 4.6vw; font-size: max(1.95vw, 13px); }
  html:root #bnbar > div { height: 4.6vw; }
  html:root #bnbar .st { font-size: max(1.95vw, 13px); }
  html:root #bnbar .bk svg { width: 2.3vw; height: 2.3vw; }

  /* ── اسم «نور» فوق البالونة ── */
  html:root .dn .dn-who { font-size: max(1.8vw, 13px); top: -1.6vw; }
  html:root .dn .nbub .bs { font-size: max(1.8vw, 13px); }

  /* ── «نتعلّم» ── */
  html:root .dn-learn .ln-next,
  html:root .dn-learn .ln-tracks.n5 .ln-next,
  html:root .dn-learn .ln-tracks.n6 .ln-next { font-size: max(1.8vw, 13px); }
  html:root .dn-learn .ln-title span { font-size: max(1.9vw, 13px); }
  html:root .dn-learn .ln-count { font-size: max(1.85vw, 13px); }
  html:root .dn-learn .ln-chip { font-size: max(1.9vw, 13px); }

  /* ── الرحلة والقرآن والتلوين والحديقة و«مين هيلعب؟» ── */
  html:root .dn .ctt span { font-size: max(1.85vw, 13px); }
  /* «وردة النهارده» على سطرين في نص الوردة (على سطر واحد كانت بتخرج بره الشاشة) */
  html:root .dn-jour .jn-goal { left: 4vw; width: 10vw; }
  html:root .dn-jour .jn-goal svg { margin: 0 auto; }
  html:root .dn-jour .jn-goal b { font-size: max(1.9vw, 13px); white-space: normal; line-height: 1.2; }
  html:root .dn-ses .hname span { font-size: max(1.85vw, 13px); }
  html:root .dn-color .cl-title { font-size: max(1.85vw, 13px); height: 4.2vw; max-width: 24vw; }
  html:root .dn-garden .gd-sign b { font-size: max(1.9vw, 13px); }
  html:root .dn-picker .meta { font-size: max(1.8vw, 13px); line-height: 1.35; }
  html:root .dn-picker .meta span { white-space: normal; } /* «لسه مفيش فوانيس» كانت بتتقص بـ«…» */

  /* ── خريطة الحارة ── */
  html:root .dn .gsign { font-size: max(1.8vw, 13px); }
  html:root .dn .kid span { font-size: max(1.8vw, 13px); }
  html:root .dn .hcount { font-size: max(1.8vw, 13px); }
  html:root .dn .hnum { font-size: max(1.8vw, 13px); }

  /* ── ركن الأهل والرقم السري والربط ── */
  html:root .adult .sec { font-size: max(1.8vw, 13px); }
  html:root .adult .sub { font-size: max(1.9vw, 13px); }
  html:root .adult .row { font-size: max(2.1vw, 13px); }
  /* المكتبة الصوتية والربط بشكل ركن الأهل (parent.css .libx أخصّ من القواعد اللي فوق) */
  html:root .scr.adult.libx > .sub { font-size: max(1.6vw, 13px); }
  html:root .scr.adult.libx .row { font-size: max(1.8vw, 13px); }
  html:root .scr.adult.libx .row .rv { font-size: max(1.5vw, 13px); }
  html:root .scr.adult.libx .row small { font-size: max(1.3vw, 13px); }
  html:root .scr.adult.libx .row[data-row="toparent"], html:root .scr.adult.libx .row[data-row="tolib"] { font-size: max(1.6vw, 13px); }
  html:root .row small { font-size: max(1.75vw, 13px); }
  /* «عندكم حساب؟» و«لقينا ولادكم» */
  html:root .meet .mt-have { font-size: max(1.7vw, 13px); }
  html:root .found .fd-kid b { font-size: max(2.2vw, 14px); }
  html:root .found .fd-kid small, html:root .found .note { font-size: max(1.6vw, 13px); }
  html:root .step, html:root .pinhelp { font-size: max(1.8vw, 13px); }
  html:root .link .lbl { font-size: max(1.85vw, 13px); }
  html:root .link .wait { font-size: max(1.9vw, 13px); }
  html:root .link .url { font-size: max(1.9vw, 13px); }

  /* ── ركن الأهل الجديد (parent.css) ── */
  html:root .pc-hi small, html:root .pc-chips span, html:root .pc-sub, html:root .pc-note, html:root .pc-tx small, html:root .pc-lt small,
  html:root .pc-kn small, html:root .pc-today span, html:root .pc-more, html:root .pc-add small, html:root .pc-pl, html:root .pc-badge { font-size: max(1.8vw, 13px); }
  html:root .pc-stats span, html:root .pc-week { font-size: max(1.8vw, 13px); }
  html:root .pc-ttl { font-size: max(1.85vw, 13px); }
  html:root .pc-back, html:root .pc-tab, html:root .pc-seg span, html:root .pc-cyc b, html:root .pc-pn small, html:root .pc-lt b { font-size: max(1.95vw, 13px); }
  html:root .pc-tx b, html:root .pc-today b, html:root .pc-pn b { font-size: max(2.05vw, 13px); }
  html:root .pc-pl { margin: 0 1vw 0 .5vw; }
  html:root .pc-rail { width: 17vw; }
  html:root .pc-tab { padding: .9vw 1vw; }
  html:root .pc-tab .pc-ico { margin-left: .6vw; }
  html:root .pc-sb { width: 3.6vw; height: 3.6vw; line-height: 3.4vw; }
  html:root .pc-tog { width: 6vw; height: 3.3vw; }
  html:root .pc-tog i { width: 2.7vw; height: 2.7vw; }
  html:root .pc-tog.is-on i { right: 3vw; }
  /* الهيدر أصغر على الموبايل: من غير «ركن الأهل» الصغيرة ولا الساعة، والكبسولات سطر واحد */
  html:root .pc { padding-top: 1vw; }
  html:root .pc-head { padding: .5vw 1.4vw .7vw; margin-bottom: .9vw; }
  html:root .pc .pc-hi h1 { font-size: max(2.6vw, 13px); }
  html:root .pc-hi small, html:root .pc-chips .pc-clock { display: none; }
  html:root .pc-chips { flex-wrap: nowrap; }
  html:root .pc-kid { width: calc(100% - 1.2vw); }
  html:root .pc-add { min-height: 0; padding: 1.4vw; }
  /* صفحة الطفل: على الموبايل الكبسولات المهمة بس، و«رجوع» قصيرة */
  html:root .pc-kidpage .pc-chips .pc-opt, html:root .pc-back .pc-long { display: none; }
  html:root .pc .pc-hi h1 .pc-ttl { font-size: max(1.95vw, 13px); }
  html:root .pc-dd small, html:root .pc-dm, html:root .pc-trk small, html:root .pc-chipl span { font-size: max(1.8vw, 13px); }
  html:root .pc-acts li, html:root .pc-dw, html:root .pc-btn, html:root .pc-dd b, html:root .pc-trk div, html:root .pc-msg { font-size: max(1.95vw, 13px); }
  html:root .pc-dd { width: 11vw; }

  /* ── دفتر رحلتي: سطر حالة السورة («اتدرّبنا عليها») كان 11.6px ── */
  html:root .dn-diary .dy-row small { font-size: max(1.85vw, 13px); }
  /* مراجعة UX (U5): على 844×390 التاريخ والعدّاد كانوا 12.3px، واسم المسار في «سطح النجوم» (٥ مسارات) 12.4px */
  html:root .dn-diary .dy-date span, html:root .dn-diary .dy-count { font-size: max(1.8vw, 13px); }
  html:root .dn-learn .ln-tracks.n5 .ln-track > b, html:root .dn-learn .ln-tracks.n6 .ln-track > b { font-size: max(1.8vw, 13px); }
  html:root .dn-garden .gd-first span, html:root .pc-stats b { font-size: max(1.8vw, 13px); }
  /* موبايلات 800×360 (المسرح 640): كل اللي مقاسه 1.8–2vw بينزل تحت 13px. نفس المقاس الأصلي، بحد أدنى 13px */
  html:root .hb-hi > b { font-size: max(2vw, 13px); }
  html:root .hb-c.main .hb-m > b { font-size: max(1.9vw, 13px); }
  html:root .dn-wudu .wd-bub .bt, html:root .dn-garden .gd-bub .bt, html:root .dn-learn .ln-bub .bt { font-size: max(2vw, 13px); }
  html:root .dn-story .st-title span, html:root .dn-diary .dy-title span { font-size: max(1.9vw, 13px); }
  html:root .pc-card h2 { font-size: max(2vw, 13px); }
  html:root .pc .pc-sb { font-size: max(2vw, 13px); }
  html:root .pc-kn b { font-size: max(1.9vw, 13px); }
  html:root .yay .yay-count { font-size: max(1.8vw, 13px); }

  /* ── «لوّن وارسم» (قسم التلوين بنوافذ): ٤ كروت في الصف بدل ٥ عشان الكلام يكبر ── */
  html:root .ch-head p { font-size: max(1.85vw, 13px); }
  html:root .ch-bub { font-size: max(1.85vw, 13px); max-width: 19vw; }
  html:root .ch-tt b { font-size: max(2.3vw, 13px); }
  html:root .ch-tt small { font-size: max(1.85vw, 13px); }
  html:root .ch-chip { height: 4.2vw; font-size: max(1.95vw, 13px); }
  html:root .ch-chip .ch-ico { width: 2.5vw; height: 2.5vw; }
  html:root .ch-card { width: 22vw; margin-left: 1.33vw; }
  html:root .ch-card:nth-child(5n) { margin-left: 1.33vw; }
  html:root .ch-card:nth-child(4n) { margin-left: 0; }
  html:root .ch-card .ch-pic { height: 12.6vw; }
  html:root .ch-type, html:root .ch-meta em, html:root .ch-ok, html:root .ch-bdg, html:root .ch-frame.fresh:after { font-size: max(1.85vw, 13px); }
  html:root .ch-type .ch-ico { width: 2.3vw; height: 2.3vw; }
  html:root .ch-meta b, html:root .ch-frame .ch-meta b { font-size: max(2.1vw, 13px); }
  html:root .ch-frame .ch-meta small { font-size: max(1.85vw, 13px); }
  html:root .ch-pr { width: 6vw; }
  html:root .ch-empty b { font-size: max(2.5vw, 13px); }
  html:root .ch-empty p { font-size: max(1.9vw, 13px); }
  html:root .dn-color .cl-mode { font-size: max(1.85vw, 13px); }
  html:root .dn-color .cl-count { font-size: max(1.9vw, 13px); }
}
