/* الصفحة الرئيسية بهوية «ليلة الديوانية» (من توب 10 بموافقة المالك 2026-10-19).
   أُعيد بناؤها بخطة مهارة آبل كاملة (2026-11-06): مهمة الصفحة واحدة، أن تدخل الشلة اللعبة الصحيحة بلمسة واحدة.
   - داكن فقط بقرار المالك: لعب ليلي في الديوانية وعلى التلفزيون. قيم الوضع الفاتح محجوزة في الخطة ولا تُشحن.
   - الزعفران له معنيان فقط: تعبئة الإجراء الرئيسي، وكتابة الروابط. وشارات «تجريبي» الذهبية باقية بقرار المالك وتتميز بشكلها.
   - كل المقاسات بـ rem من خط المتصفح، فتكبر مع إعداد صاحب الجهاز.
   - حركة مقصودة واحدة (تركيب الشعار مرة واحدة، على الجوال والكمبيوتر)، والخلفية ساكنة، وبعدها لا يتحرك شي إلا ردّاً على لمسة أو مؤشر.
   المتغيرات الأساسية من style.css. */

/* ---------- الجذر ---------- */
html:has(> body.home) { -webkit-text-size-adjust: auto; text-size-adjust: auto; }
/* سفاري الآيفون بالعرض يضخّم النص مع auto؛ نثبّته هناك فقط */
@media (orientation: landscape) and (max-height: 500px) { html:has(> body.home) { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; } }
/* حجم الخط من إعداد الآيفون (Dynamic Type)، والخط يبقى تجوّل.
   شرط اللمس لا يعرفه إلا سفاري الآيفون: سفاري الماك يدعم الخط النظامي وقيمته هناك 13، فيصغر كل النص تحت 1600 */
@supports (font: -apple-system-body) and (-webkit-touch-callout: none) {
  html:has(> body.home) { font: -apple-system-body; }
  body.home { font-family: "Tajawal", "Geeza Pro", system-ui, sans-serif; }
  html[lang="en"] > body.home { font-family: "Rubik", "Tajawal", system-ui, sans-serif; }
}
body.home {
  --rule: #5C69A3;          /* حدود وظيفية: 3.52 على الليل، 3.11 على اللوح */
  --rim: #8F9BD0;           /* حافة خلية الخطوة وحد التحويم: 6.03 على اللوح */
  --cell: #202A55;          /* تعبئة خلية الخطوة: الرقم الكريمي فوقها 12.11 */
  --measure: 880px;
  --gbg-color: var(--line-strong);   /* الرسم الحرفي في الخلفية بلا زعفران */
  font-size: 1.0625rem;
  letter-spacing: normal;
}
/* حلقة تركيز كريمية لكل طريقة إدخال: تختلف عن تعبئة الزعفران، وتغلب صفر الخصوصية في home-nav.css */
body.home :focus-visible { outline: 3px solid var(--text); outline-offset: 3px; }
body.home :focus:not(:focus-visible) { outline: none; }
/* ومضة لمس كريمية خفيفة بدل الزرقاء، فتبقى للمسة إشارة حتى لو لم يطبق سفاري :active (مراجعة آبل 2026-11-06) */
body.home a, body.home button, body.home summary { -webkit-tap-highlight-color: rgba(246, 240, 224, .10); }
body.home ::selection { background: var(--rim); color: var(--night); }

.home .wrap { max-width: calc(var(--measure) + 40px); }
.home section { padding-block: 30px; }
/* مخفي للعين وظاهر لقارئ الشاشة: عنوان قائمة الألعاب */
.home .vh { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; contain: paint; clip-path: inset(50%); white-space: nowrap; border: 0; }   /* contain بدل overflow حتى لا يعدّه حارس الفيض نصاً مقصوصاً */
.home h2 { text-align: center; margin: 0 0 20px; font: 800 clamp(1.375rem, 1.1rem + 1.2vw, 1.75rem)/1.35 var(--font-display); color: var(--text); text-wrap: balance; }

/* ---------- سطر اللغة ---------- */
.home .lang-row .wrap { display: flex; justify-content: flex-end; padding-block: 4px 0; }
.home .lang-row a { min-height: 44px; display: inline-flex; align-items: center; padding-inline: 12px; color: var(--muted); font-size: .9375rem; text-decoration: none; border-radius: 999px; }

/* ---------- شريط السدو: درزة واحدة تحت الواجهة، بخيط كريمي لا زعفراني ---------- */
.sadu { height: 16px; margin: 6px auto; max-width: 720px; opacity: .35;
  background: url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='16' viewBox='0 0 32 16'%3E%3Cpath d='M0 13 L8 3 L16 13 L24 3 L32 13' fill='none' stroke='%23F6F0E0' stroke-width='1.6' stroke-linejoin='round'/%3E%3Ccircle cx='16' cy='7.5' r='1.4' fill='%23F6F0E0'/%3E%3C/svg%3E") repeat-x center / 32px 16px;
  -webkit-mask: linear-gradient(90deg, transparent, #000 18%, #000 82%, transparent); mask: linear-gradient(90deg, transparent, #000 18%, #000 82%, transparent); }

/* ---------- الواجهة ---------- */
.home .hero2 { text-align: center; padding: 8px 0 26px; }   /* .home يغلب حشوة الأقسام العامة */
.hero2 .logo { display: block; width: min(70%, 420px); height: auto; margin: 0 auto 10px; aspect-ratio: 726 / 240; }
.hero2 h1 { margin: 0 auto 8px; max-width: 22em; font: 800 clamp(1.75rem, 1.2rem + 2.4vw, 2.5rem)/1.3 var(--font-display); color: var(--text); text-wrap: balance; }
.hero2 .lead { margin: 0 auto; max-width: 34em; color: var(--muted); font-size: 1.0625rem; line-height: 1.65; text-wrap: pretty; }
.hero2 .cta { display: flex; flex-direction: column; align-items: center; gap: 14px; margin-top: 18px; }

/* ---------- بطاقات الألعاب: كل بطاقة رابط واحد، والإعداد تحت الاسم ---------- */
.hero2 .games { display: grid; grid-template-columns: 1fr; gap: 12px; width: 100%; margin: 0; padding: 0; list-style: none; }
.hero2 .games > li { display: flex; min-width: 0; }
.hero2 .games > li > .game-card { flex: 1; }
.hero2 .game-card { position: relative; display: flex; flex-direction: column; align-items: stretch; gap: 4px; min-width: 0; padding: 14px 18px; border-radius: 20px;
  text-align: start; text-decoration: none; color: var(--text); background: var(--panel); border: 2px solid var(--rule);
  transition: transform 160ms var(--ease-out), border-color 160ms ease; }
.hero2 .game-card b { font: 800 clamp(1.3125rem, 1.05rem + 1.3vw, 1.6875rem)/1.25 var(--font-display); color: var(--text); }
.hero2 .g-desc { font-size: .9375rem; line-height: 1.6; color: var(--text); text-wrap: pretty; }
.hero2 .g-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 12px; margin-top: auto; padding-top: 6px; }
.hero2 .g-cue { display: inline-flex; align-items: center; gap: 6px; font-size: .875rem; line-height: 1.4; color: var(--muted); }
/* رسم الإعداد بنفس خط الرسوم الحرفية في الخلفية: 1.8 مستدير، فيُقرأ رسماً باليد لا أيقونة جاهزة */
.hero2 .g-cue svg { flex: none; width: 1.25em; height: 1.25em; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.hero2 .game-card .beta, .hero2 .game-card .kids-pilot { display: inline-block; vertical-align: middle; margin-inline-start: 6px; padding: 1px 7px 2px; border-radius: 6px; border: 0; background: rgba(251, 172, 40, .14); font: 700 .8125rem/1.4 var(--font-display); white-space: nowrap; }   /* وسم حالة مربع معبأ، لا حبة محددة مثل الأزرار: الذهب على تعبئته 6.6 */
.kids-pilot{color:var(--gold-text)}
.hero2 .game-card .beta { color: var(--gold-text); }
/* الزر داخل البطاقة شكل فقط (الرابط هو البطاقة)، ونصه جزء من اسم البطاقة. واحد معبّأ بالزعفران للعبة الأساسية،
   والباقي حدّ محايد كريمي: الذهب على البطاقة التجريبية للشارة وحدها (حالة لا إجراء).
   يلتف ويصغر داخل البطاقة عند تكبير 200% بدل أن يخرج من حدها. */
.hero2 .g-foot > * { min-width: 0; }
.hero2 .game-card .play-btn { display: inline-flex; align-items: center; justify-content: center; min-width: 0; max-width: 100%; min-height: 44px; padding: 8px clamp(12px, 5vw, 22px); border-radius: 999px;
  white-space: normal; text-align: center; background: transparent; color: var(--text); box-shadow: inset 0 0 0 2px var(--rim); font: 800 1.0625rem/1.2 var(--font-display);
  transition: transform 160ms var(--ease-out), box-shadow 160ms var(--ease-out); }
.hero2 .game-card.primary .play-btn { background: var(--saffron-tex) center / 360px, var(--gold); color: var(--ink); box-shadow: 0 4px 15px rgba(0, 0, 0, .35); }
.hero2 .game-card:active { transform: scale(.98); }
.hero2 .game-card:active .play-btn { transform: translateY(2px); }
/* النجمة تلف حول الزر الأساسي عند التحويم أو التركيز فقط، لا دائماً */
.home .fx-star::before { animation: none; opacity: 0; transition: opacity 200ms ease; }
@media (hover: hover) and (pointer: fine) {
  .hero2 .game-card:hover { transform: translateY(-3px); border-color: var(--rim); }
  .hero2 .game-card:not(.primary):hover .play-btn { box-shadow: inset 0 0 0 2px var(--text); }
  /* لفة واحدة 1.6 ثانية ثم تختفي: لا حركة بلا نهاية ما دام التركيز باقياً على البطاقة (motion.md › Providing feedback) */
  .hero2 .game-card:is(:hover, :focus-visible) .fx-star::before { animation: home-orbit-once 1.6s var(--ease-out) 1 both; }
}
@keyframes home-orbit-once { 0% { --fx-a: 0deg; opacity: 0; } 15%, 80% { opacity: 1; } 100% { --fx-a: 360deg; opacity: 0; } }
/* الجوال: وصف الأطفال المختصر حتى تظهر البطاقات الثلاث في أول شاشة */
@media (max-width: 600px) {
  .hero2 .g-desc .g-more { display: none; }
  .hero2 .g-foot .play-btn { margin-inline-start: auto; }   /* إذا التف الزر تحت الإعداد يبقى في طرفه نفسه */
}
/* عرض متوسط: الأساسية صف كامل والزر على الطرف، والتجريبيتان عمودان متساويان تحتها */
@media (min-width: 601px) {
  .hero2 .games { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hero2 .game-card .g-foot { flex-direction: column; align-items: flex-start; justify-content: flex-end; }
}
/* اللمس بأي عرض (آيباد بالعرض، الشاشة الداخلية لجهاز يطوي) يبقى على 2+1 الزوجي، فلا تقع بطاقة على خط الطي */
@media (min-width: 601px) and (max-width: 999px), (min-width: 1000px) and (hover: none), (min-width: 1000px) and (pointer: coarse) {
  .hero2 .games > li:has(> .primary) { grid-column: 1 / -1; }
  .hero2 .game-card.primary { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 20px; align-items: center; }
  .hero2 .game-card.primary > b, .hero2 .game-card.primary > .g-desc { grid-column: 1; }
  .hero2 .game-card.primary .g-foot { grid-column: 2; grid-row: 1 / span 2; margin: 0; padding: 0; align-items: center; }
}
/* الكمبيوتر: ثلاثة أعمدة متساوية؛ الأساسية تتميز بالتعبئة لا بالعرض */
@media (min-width: 1000px) and (hover: hover) and (pointer: fine) { .hero2 .games { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

/* ---------- سطر الإثبات وسطر التلفزيون ---------- */
.hero2 .proof { margin: 4px auto 0; max-width: 34em; color: var(--muted); font-size: .9375rem; line-height: 1.6; text-wrap: balance; }
.hero2 .proof b { color: var(--text); font: 700 1.125em var(--font-display); font-variant-numeric: tabular-nums; }
.hero2 .proof span, .hero2 .tv-line > span { display: block; }
.hero2 .tv-line { margin: 0 auto; max-width: 40em; color: var(--muted); font-size: .9375rem; line-height: 1.6; text-wrap: balance; }
.hero2 .tv-line a { display: inline-flex; align-items: center; min-height: 44px; padding-inline: 4px; color: var(--gold-text); }

/* ---------- صور الألعاب: شريط يُسحب، وخمس صور في صف على الكمبيوتر ---------- */
.home .shots { display: grid; grid-auto-flow: column; grid-template-columns: none; grid-auto-columns: min(72%, 280px); gap: 16px; align-items: start;
  max-width: none; margin: 0; overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding-inline: 20px; padding: 4px 4px 10px; }
.home .shots:focus-visible { outline-offset: -3px; }
.home .shots figure { margin: 0; scroll-snap-align: start; }
.home .shots img { display: block; width: 100%; height: auto; border: 2px solid var(--line); border-radius: 20px; box-shadow: 0 12px 28px rgba(0, 0, 0, .4); filter: brightness(.94); }
.home .shots img[src*="6-kids"] { filter: brightness(.75); }   /* صورة ورق أبيض بين صور داكنة: تُعتّم حتى لا تتوهج أكثر من الشعار */
.home .shots figcaption { margin-top: 8px; text-align: center; color: var(--muted); font: 700 .9375rem/1.4 var(--font-display); }
.shots-nav { display: flex; justify-content: center; gap: 12px; margin-top: 10px; }
.shots-nav[hidden], .home .shots-hint[hidden] { display: none; }
.shots-nav button { display: grid; place-items: center; width: 44px; height: 44px; padding: 0; border-radius: 50%; border: 2px solid var(--rule); background: var(--panel); color: var(--text); cursor: pointer; transition: background-color 160ms ease; }
.shots-nav svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.shots-nav button:active { background: var(--panel-2); }
.shots-nav button[aria-disabled="true"] { opacity: .4; cursor: default; }
.home .shots-hint { display: block; margin: 6px 0 0; color: var(--muted); font-size: .9375rem; text-align: center; }
@media (min-width: 1000px) and (hover: hover) and (pointer: fine) {
  .home .shots { grid-auto-flow: row; grid-template-columns: repeat(5, minmax(0, 1fr)); grid-auto-columns: auto; overflow: visible; scroll-snap-type: none; gap: 14px; }
}

/* ---------- الأكثر لعباً ---------- */
.top-cats .top-hint { margin: -12px 0 16px; text-align: center; color: var(--muted); font-size: .9375rem; }
.top-cats ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }
.top-cats a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 20px; border-radius: 999px; border: 2px solid var(--rule); background: var(--panel); color: var(--text); text-decoration: none; font-weight: 700; font-size: 1rem; transition: transform 160ms var(--ease-out), border-color 160ms ease; }
.top-cats a:active { transform: scale(.97); }

/* ---------- الخطوات: خلية النقاط السداسية من لوحة اللعبة تحمل رقم الخطوة؛ ألوان محايدة لا زعفران ---------- */
.home .steps { gap: 14px; }
.home .steps li { isolation: isolate; background: transparent; border: 0; border-top: 1px solid var(--line); border-radius: 0; padding: 18px 20px; padding-inline-start: 72px; }   /* معلومة لا لمسة: صف بخط فاصل مثل المزايا، والإطار الملون للمس وحده */
.home .steps li::after { content: ""; position: absolute; inset-inline-start: 18px; top: 18px; width: 38px; height: 44px; background: var(--rim); z-index: 0;
  clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%); }
.home .steps li::before { inset-inline-start: 20px; top: 20px; width: 34px; height: 40px; border-radius: 0; background: var(--cell); box-shadow: none; color: var(--text); z-index: 1;
  clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%); font: 700 1.0625rem/1 var(--font-display); }
.home .steps b { color: var(--text); font-size: 1.0625rem; }
.home .steps span { display: block; font-size: .9375rem; line-height: 1.6; }

/* ---------- شرح توب 10: عنوان حقيقي خارج المطوي ---------- */
#top10-journey { scroll-margin-top: 24px; }
#top10-journey h2 { margin-bottom: 4px; }
.journey-more > p { max-width: 65ch; margin: 4px auto 18px; line-height: 1.8; color: var(--muted); text-align: center; }

/* ---------- المزايا: قائمة بخطوط فاصلة، عمودان على الكمبيوتر حتى لا يضيق السطر ---------- */
.feat { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 32px; }
.feat li { min-width: 0; display: grid; grid-template-columns: 30px 1fr; column-gap: 12px; row-gap: 2px; align-content: start; padding: 18px 0 20px; border-top: 1px solid var(--line); }
.feat svg { grid-row: 1 / span 2; width: 28px; height: 28px; margin-top: 2px; fill: none; stroke: var(--muted); stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.feat b { font-size: 1.0625rem; line-height: 1.45; color: var(--text); }
.feat p { margin: 0; color: var(--muted); font-size: .9375rem; line-height: 1.7; overflow-wrap: anywhere; text-wrap: pretty; }
/* داخل الفقرة: سطري بحشوة عمودية توسّع اللمس إلى نحو 44 بلا كسر السطر */
.feat a[href] { display: inline; min-width: 0; min-height: 0; padding-block: 15px; color: var(--gold-text); }
.feat-more { margin-top: 4px; padding-top: 6px; border-top: 1px solid var(--line); }
.feat-more summary { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; cursor: pointer; color: var(--text); font: 700 1rem var(--font-display); list-style: none; border-radius: 12px; transition: background-color 160ms ease; }
.feat-more summary::-webkit-details-marker { display: none; }
.feat-more summary::after { content: ""; width: 9px; height: 9px; border: solid var(--gold-text); border-width: 0 2px 2px 0; transform: rotate(45deg) translateY(-2px); transition: transform 250ms var(--ease-out); }
.feat-more[open] summary::after { transform: rotate(-135deg) translateY(-2px); }
.journey-more { border-top: 0; padding-top: 0; }

/* ---------- النداء الأخير ---------- */
.final-cta { display: flex; flex-direction: column; align-items: center; gap: 12px; padding-block: 8px 28px; text-align: center; }
.final-cta h2 { margin: 0; }
.final-cta .play-btn { display: inline-flex; align-items: center; justify-content: center; min-height: 52px; padding: 0 32px; border-radius: 999px; background: var(--saffron-tex) center / 360px, var(--gold); color: var(--ink); font: 800 1.1875rem var(--font-display); text-decoration: none; box-shadow: 0 4px 15px rgba(0, 0, 0, .35); transition: transform 160ms var(--ease-out), box-shadow 160ms var(--ease-out); }
.final-cta .play-btn:active { transform: translateY(3px); box-shadow: 0 1px 6px rgba(0, 0, 0, .35); }
.final-cta .more-games { margin: 0; color: var(--muted); font-size: .9375rem; }
.final-cta .more-games a { color: var(--gold-text); }

/* ---------- التذييل ---------- */
.home footer { border-top: 0; margin-top: 10px; padding-block: 8px 34px; }
.home footer .wrap { flex-direction: column; align-items: center; gap: 14px; }
.flinks, .social { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }
.flinks a, .social a { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; min-width: 44px; padding: 0 14px; border-radius: 999px; color: var(--text); text-decoration: none; font-size: .9375rem; transition: background-color 160ms ease; }
.flinks svg, .social svg { width: 24px; height: 24px; flex: none; }
.flinks svg { fill: none; stroke: var(--muted); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.social svg { fill: currentColor; }
.motion-btn { min-height: 44px; padding: 0 16px; border: 1px solid var(--rule); border-radius: 999px; background: none; color: var(--text); font: inherit; font-size: .9375rem; cursor: pointer; transition: background-color 160ms ease; }
.motion-btn[aria-pressed="true"] { background: var(--panel-2); }
.soon-line { margin: 0; color: var(--muted); font-size: .875rem; text-align: center; }
.copy { font-size: .875rem; color: var(--muted); }

/* ---------- الضغط والتحويم ---------- */
.flinks a:active, .social a:active, .feat-more summary:active, .motion-btn:active, .home .lang-row a:active { background: var(--panel-2); }
.tv-line a:active, .feat a:active, .more-games a:active, .steps a:active { opacity: .7; }
@media (hover: hover) and (pointer: fine) {
  .top-cats a:hover { border-color: var(--rim); }
  .flinks a:hover, .social a:hover, .motion-btn:hover, .home .lang-row a:hover { background: var(--panel); }
  .feat-more summary:hover { color: var(--gold-text); }
  .shots-nav button:not([aria-disabled="true"]):hover { background: var(--panel-2); }
  .tv-line a:hover, .feat a:hover, .steps a:hover, .more-games a:hover { text-decoration-thickness: 2px; }
  .final-cta .play-btn:hover { transform: translateY(-2px); }
}

/* ---------- المقاسات ---------- */
@media (max-width: 460px) { .feat { grid-template-columns: 1fr; } }
/* تكبير 200% أو جوال ضيق جداً: الخلية فوق النص حتى يبقى للنص عرض يُقرأ */
@media (max-width: 340px) {
  .home .steps li { padding: 68px 16px 16px; }
  .home .steps li::after { inset-inline-start: 16px; top: 14px; }
  .home .steps li::before { inset-inline-start: 18px; top: 16px; }
  .feat li { grid-template-columns: 1fr; }
  .feat svg { grid-row: auto; margin-bottom: 4px; }
  .hero2 .game-card { padding-inline: 14px; }
}
/* شاشة قصيرة (جوال بالعرض، أو نافذة قصيرة حتى 560 مثل آيباد مقسوم بالعرض): الواجهة أصغر حتى تظهر البطاقات بلا تمرير طويل */
@media (max-height: 560px) {
  .home .hero2 { padding-top: 4px; }
  .hero2 .logo { width: min(210px, 74%); margin-bottom: 4px; }
  .hero2 h1 { font-size: 1.75rem; margin-bottom: 2px; }
  .hero2 .lead { font-size: .9375rem; }
  .hero2 .cta { margin-top: 14px; gap: 12px; }
  .hero2 .game-card { padding-block: 12px 14px; }
}
/* جوال بالعرض: الألعاب الثلاث في صف واحد حتى تظهر أزرارها الثلاثة في أول شاشة كما كانت قبل التعديل */
@media (max-height: 560px) and (min-width: 601px) {
  .home .lang-row .wrap { padding-block: 0; }
  .hero2 .logo { width: min(170px, 40%); }
  .hero2 h1 { font-size: 1.5rem; }
  .hero2 .lead { display: none; }
  .hero2 .cta { margin-top: 10px; }
  .hero2 .games { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
  .hero2 .games > li:has(> .primary) { grid-column: auto; }
  .hero2 .game-card.primary { display: flex; align-items: stretch; }   /* يلغي توسيط العرض المتوسط حتى يبدأ العنوان من طرفه مثل البطاقتين */
  .hero2 .game-card.primary .g-foot { grid-column: auto; grid-row: auto; margin: 0; margin-top: auto; padding-top: 6px; align-items: flex-start; }
  .hero2 .game-card .g-foot { flex-direction: column; align-items: flex-start; }
  .hero2 .g-desc .g-more { display: none; }
  /* سلم العناوين يبقى تحت العنوان الرئيسي (24): البطاقة 20 والقسم 22، فتتسع «ألعاب الأطفال تجريبي» في سطر */
  .hero2 .game-card b { font-size: 1.25rem; }
  .home h2 { font-size: 1.375rem; }
}
/* تكبير 200% (عرض 260 فأقل؛ أصغر جوال 320 لا يصل له): سطر الوصف يتكرر في الخطوات، فيُخفى حتى تطلع أول بطاقة في أول شاشة. بعد قواعد الشاشة القصيرة عمداً لأن 422 طولاً قصيرة أيضاً */
@media (max-width: 260px) {
  .hero2 .lead { display: none; }
  .hero2 h1 { font-size: 1.5rem; line-height: 1.3; }
  .home .hero2 { padding-top: 0; }
  .hero2 .logo { width: min(130px, 66%); margin-bottom: 2px; }
  .hero2 .cta { margin-top: 10px; }
}
/* جهاز يطوي شاشته (آيفون ديو وغيره) بالداخل مفتوحاً: عمودان زوجيان حتى لا تقع البطاقة الوسطى على الطية */
/* الجهاز مفتوح بطية عمودية: لوحان، الهوية في قطعة والألعاب في الأخرى، ولا شي على الطية. وما تحت الواجهة كله في قطعة واحدة.
   القطعتان متساويتان في آيفون ديو، فترتيب الأعمدة في الاتجاه من اليمين لا يغير العرض (designing-for-iphone-duo.md › Reserved regions) */
@media (horizontal-viewport-segments: 2) {
  .home .hero2 > .wrap { max-width: none; padding-inline: 0; display: grid; align-items: center; grid-template-rows: 1fr auto auto auto 1fr;
    grid-template-columns: env(viewport-segment-width 0 0) env(viewport-segment-width 1 0);
    column-gap: calc(env(viewport-segment-left 1 0) - env(viewport-segment-right 0 0)); }
  .hero2 .logo, .hero2 h1, .hero2 .lead { grid-column: 1; }
  .hero2 .logo { grid-row: 2; } .hero2 h1 { grid-row: 3; } .hero2 .lead { grid-row: 4; }   /* الهوية مجموعة واحدة في وسط قطعتها */
  .hero2 h1, .hero2 .lead { padding-inline: 20px; }
  .hero2 .cta { grid-column: 2; grid-row: 1 / -1; margin: 0; padding-inline: 20px; }
  .hero2 .games { grid-template-columns: 1fr; }
  .hero2 .games > li:has(> .primary) { grid-column: auto; }
  .hero2 .game-card.primary { display: flex; align-items: stretch; }
  .hero2 .game-card.primary .g-foot { grid-column: auto; grid-row: auto; margin: 0; margin-top: auto; padding-top: 6px; align-items: flex-start; }
  .home .sadu { margin-inline: 20px calc(env(viewport-segment-width 0 0) + env(viewport-segment-left 1 0) - env(viewport-segment-right 0 0) + 20px); }
  .home main > .wrap, .home footer .wrap { max-width: none; padding-inline: 20px calc(env(viewport-segment-width 0 0) + env(viewport-segment-left 1 0) - env(viewport-segment-right 0 0) + 20px); }
}
/* الطية أفقية: الواجهة والبطاقات في القطعة العليا، وما يُمرَّر تحت الطية */
@media (vertical-viewport-segments: 2) {
  .home .hero2 { min-height: env(viewport-segment-top 0 1); box-sizing: border-box; padding-bottom: calc(env(viewport-segment-top 0 1) - env(viewport-segment-bottom 0 0) + 12px); }
  /* القطعة العليا قصيرة: نفس ترتيب الشاشة القصيرة، الشعار أصغر والألعاب الثلاث في صف */
  .hero2 .logo { width: min(170px, 40%); margin-bottom: 4px; }
  .hero2 h1 { font-size: 1.5rem; }
  .hero2 .lead { display: none; }
  .hero2 .cta { margin-top: 10px; }
  .hero2 .games { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
  .hero2 .games > li:has(> .primary) { grid-column: auto; }
  .hero2 .game-card.primary { display: flex; align-items: stretch; }
  .hero2 .game-card.primary .g-foot { grid-column: auto; grid-row: auto; margin: 0; margin-top: auto; padding-top: 6px; align-items: flex-start; }
  .hero2 .game-card .g-foot { flex-direction: column; align-items: flex-start; }
  .hero2 .g-desc .g-more { display: none; }
  .hero2 .proof span, .hero2 .tv-line { display: none; }   /* شرح توب 10 تحت الطية مباشرة، فرابطه هنا يقع على الطية بلا فايدة */
}
/* التلفزيون والشاشات الكبيرة: عرض أوسع وكل الخط أكبر بنسبة واحدة من إعداد المتصفح، فيُقرأ من بعيد */
@media (min-width: 1600px) {
  html:has(> body.home) { font-size: 118.75%; }
  body.home { --measure: 1040px; }
}

/* ---------- إعدادات الإتاحة ---------- */
@media (prefers-contrast: more) {
  body.home { --line: #5C69A3; --rule: #8F9BD0; --muted: #D6D9EA; --panel: #0D1326; }
  body.home .gbg { display: none; }
}
@media (forced-colors: active) {
  body.home .gbg { display: none; }
  .hero2 .game-card { border: 2px solid CanvasText; }
  /* الألوان المفروضة تمحو الظل الداخلي، فالزر الثانوي يحتاج حداً حقيقياً والأساسي تعبئة */
  .hero2 .game-card .play-btn { box-shadow: none; border: 2px solid LinkText; }
  .hero2 .game-card.primary .play-btn { background: LinkText; color: Canvas; border-color: LinkText; box-shadow: none; forced-color-adjust: none; }
  .home .steps li::after, .home .steps li::before { forced-color-adjust: none; }
}
/* تقليل الشفافية: الرسم الخلفي الشفاف يختفي، والسدو يصير خطاً كاملاً بلا تلاشي، والسهم المعطل يتميز بلونه لا بشفافيته */
@media (prefers-reduced-transparency: reduce) {
  body.home .gbg { display: none; }
  .home .sadu { opacity: 1; -webkit-mask: none; mask: none;
    background-image: url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='16' viewBox='0 0 32 16'%3E%3Cpath d='M0 13 L8 3 L16 13 L24 3 L32 13' fill='none' stroke='%235C69A3' stroke-width='1.6' stroke-linejoin='round'/%3E%3Ccircle cx='16' cy='7.5' r='1.4' fill='%235C69A3'/%3E%3C/svg%3E"); }
  .shots-nav button[aria-disabled="true"] { opacity: 1; color: var(--rule); border-color: var(--line); }
}
/* الخلفية المرسومة ساكنة في الرئيسية: لا انجراف ولا لمعان بلا نهاية خلف النص (الحركة المقصودة الوحيدة هي الشعار) */
body.home .gbg svg, body.home .gbg .far, body.home .gbg .mid, body.home .gbg .near, body.home .gbg .tw { animation: none !important; }
body.home .gbg .tw { opacity: .6; }
@media (prefers-reduced-motion: reduce) {
  .hero2 .game-card, .hero2 .game-card .play-btn, .top-cats a, .final-cta .play-btn { transition: none; }
}

/* ---------- الشعار الحي (2026-10-16، ملاحظة المالك «ليش الشعارات مو حيه؟») ----------
   الشعار مفكك إلى قطع الورق الأصلية (art/logo-paper-v1/logo-3.png ← app/media/brand/live/) فتتحرك كل قطعة وحدها:
   الحروف تطلع من اليمين لليسار، وصدفة الاستفهام تنفتح، واللؤلؤ يسقط ويرتد ثم يلمع. transform وopacity فقط.
   هذه هي الحركة المقصودة الوحيدة في الصفحة. */
.live-logo { position: relative; display: block; aspect-ratio: 3.0083; margin-inline: auto; }
.live-logo .ll { position: absolute; display: block; height: auto; pointer-events: none; }
/* قبل قرار الحركة القطع مخفية (بالجافاسكربت فقط)، فلا تظهر قطعة وصلت مبكراً ثم تختفي وتعيد (launching.md › Launch screens) */
.live-logo.pending .ll { opacity: 0; }
.live-logo .ll-q { left: 0.0%; top: 0.0%; width: 24.2%; }
.live-logo .ll-ghain { left: 61.32%; top: 0.17%; width: 38.68%; }
.live-logo .ll-ya { left: 19.59%; top: 6.51%; width: 29.58%; }
.live-logo .ll-waw { left: 42.45%; top: 6.51%; width: 20.14%; }
.live-logo .ll-p1 { left: 85.41%; top: 16.36%; width: 7.1%; }
.live-logo .ll-p4 { left: 4.33%; top: 75.46%; width: 13.32%; }
.live-logo .ll-p2 { left: 32.19%; top: 75.79%; width: 6.83%; }
.live-logo .ll-p3 { left: 25.58%; top: 79.3%; width: 7.05%; }
.live-logo.play .ll-ghain { animation: ll-rise 600ms var(--ease-out) both; }
.live-logo.play .ll-waw { animation: ll-rise 600ms var(--ease-out) 70ms both; }
.live-logo.play .ll-ya { animation: ll-rise 600ms var(--ease-out) 140ms both; }
.live-logo.play .ll-q { transform-origin: 70% 95%; animation: ll-open 760ms linear 210ms both; }
.live-logo.play .ll-p1 { animation: ll-drop 1000ms linear 600ms both; }
.live-logo.play .ll-p2 { animation: ll-drop 1000ms linear 690ms both; }
.live-logo.play .ll-p3 { animation: ll-drop 1000ms linear 780ms both; }
.live-logo.play .ll-p4 { animation: ll-drop 1000ms linear 870ms both; }
@keyframes ll-rise { from { opacity: 0; transform: translateY(24%) scale(.92); } to { opacity: 1; transform: none; } }
@keyframes ll-open {
  0% { opacity: 0; transform: translateY(30%) rotate(-18deg); animation-timing-function: var(--ease-out); }
  55% { opacity: 1; transform: rotate(5deg); animation-timing-function: cubic-bezier(0.2,0,0,1); }
  80% { transform: rotate(-2deg); }
  100% { opacity: 1; transform: none; }
}
@keyframes ll-drop {
  0% { opacity: 0; transform: translateY(-160%); animation-timing-function: cubic-bezier(0.3,0,0.8,0.15); }
  34% { opacity: 1; transform: translateY(0) scale(1.1, .88); animation-timing-function: var(--ease-out); }
  48% { transform: translateY(-22%) scale(.96, 1.04); animation-timing-function: cubic-bezier(0.3,0,0.8,0.15); }
  60% { transform: none; }
  80% { transform: scale(1.16); animation-timing-function: cubic-bezier(0.2,0,0,1); }
  100% { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) { .live-logo .ll { animation: none !important; } }
/* سياسة الحركة المشتركة (shared/motion-policy.css) توقف الشعار على كل شاشة حتى 900 وكل لمس، فلا يرى الجوال لحظة الصفحة الوحيدة.
   هنا نستثني شعار الرئيسية وحده: مرة واحدة أقل من ثانيتين، ويتوقف مع «تقليل الحركة» في النظام ومع زر «حركة أقل». */
@media (prefers-reduced-motion: no-preference) {
  html:not([data-reduced-motion="true"]) body.home .hero2 .live-logo.play .ll-ghain { animation: ll-rise 600ms var(--ease-out) both !important; }
  html:not([data-reduced-motion="true"]) body.home .hero2 .live-logo.play .ll-waw { animation: ll-rise 600ms var(--ease-out) 70ms both !important; }
  html:not([data-reduced-motion="true"]) body.home .hero2 .live-logo.play .ll-ya { animation: ll-rise 600ms var(--ease-out) 140ms both !important; }
  html:not([data-reduced-motion="true"]) body.home .hero2 .live-logo.play .ll-q { animation: ll-open 760ms linear 210ms both !important; }
  html:not([data-reduced-motion="true"]) body.home .hero2 .live-logo.play .ll-p1 { animation: ll-drop 1000ms linear 600ms both !important; }
  html:not([data-reduced-motion="true"]) body.home .hero2 .live-logo.play .ll-p2 { animation: ll-drop 1000ms linear 690ms both !important; }
  html:not([data-reduced-motion="true"]) body.home .hero2 .live-logo.play .ll-p3 { animation: ll-drop 1000ms linear 780ms both !important; }
  html:not([data-reduced-motion="true"]) body.home .hero2 .live-logo.play .ll-p4 { animation: ll-drop 1000ms linear 870ms both !important; }
}
