/* public/css/la3-dark.css — الوضع الليلي لموقع لعبني (4 نوفمبر 2026)
   - يشتغل بس لما يكون على <html> كلاس la3-dark (يحطه زر الهلال في الهيدر ويُحفظ في المتصفح).
   - بدون الكلاس هذا الملف ما يغيّر أي شي، فالوضع النهاري يبقى مثل ما هو تماماً.
   - أي عنصر داخل .la3-light يبقى بألوانه النهارية (للألعاب اللي تصميمها فاتح من الأساس).
   - القواعد بين علامتي GENERATED مولّدة تلقائياً من كلاسات Tailwind المستخدمة في الموقع. */

html.la3-dark{
    --la3d-bg:#0e131c;
    --la3d-surface:#171e2b;
    --la3d-surface2:#1d2535;
    --la3d-border:#2a3446;
    --la3d-text:#e3e8ef;
    --la3d-muted:#9aa4b3;
    --la3d-accent:#8f87ff;
    color-scheme:dark;
    background-color:#0e131c;
}
html.la3-dark body{background-color:var(--la3d-bg);color:var(--la3d-text)}

/* انتقال ناعم لحظة الضغط على الزر فقط (ما يأثر على تحميل الصفحة) */
html.la3-theme-anim, html.la3-theme-anim *{transition:background-color .25s ease,border-color .25s ease,color .25s ease !important}

/* ===== كلاسات Tailwind (مولّدة) ===== */
html.la3-dark .active\:bg-emerald-50:not(.la3-light *):active{background-color:rgb(16 185 129 / 0.1)}
html.la3-dark .active\:bg-violet-200:not(.la3-light *):active{background-color:rgb(139 92 246 / 0.24)}
html.la3-dark .active\:bg-violet-50:not(.la3-light *):active{background-color:rgb(139 92 246 / 0.1)}
html.la3-dark .bg-amber-100:not(.la3-light *){background-color:rgb(245 158 11 / 0.16)}
html.la3-dark .bg-amber-200:not(.la3-light *){background-color:rgb(245 158 11 / 0.24)}
html.la3-dark .bg-amber-50:not(.la3-light *){background-color:rgb(245 158 11 / 0.1)}
html.la3-dark .bg-blue-100:not(.la3-light *){background-color:rgb(59 130 246 / 0.16)}
html.la3-dark .bg-blue-50:not(.la3-light *){background-color:rgb(59 130 246 / 0.1)}
html.la3-dark .bg-emerald-100:not(.la3-light *){background-color:rgb(16 185 129 / 0.16)}
html.la3-dark .bg-emerald-50:not(.la3-light *){background-color:rgb(16 185 129 / 0.1)}
html.la3-dark .bg-gray-100:not(.la3-light *){background-color:#1f2838}
html.la3-dark .bg-gray-200:not(.la3-light *){background-color:#283244}
html.la3-dark .bg-gray-300:not(.la3-light *){background-color:#334056}
html.la3-dark .bg-gray-50:not(.la3-light *){background-color:#1b2331}
html.la3-dark .bg-green-100:not(.la3-light *){background-color:rgb(34 197 94 / 0.16)}
html.la3-dark .bg-green-50:not(.la3-light *){background-color:rgb(34 197 94 / 0.1)}
html.la3-dark .bg-indigo-50:not(.la3-light *){background-color:rgb(99 102 241 / 0.1)}
html.la3-dark .bg-orange-100:not(.la3-light *){background-color:rgb(249 115 22 / 0.16)}
html.la3-dark .bg-orange-200:not(.la3-light *){background-color:rgb(249 115 22 / 0.24)}
html.la3-dark .bg-orange-50:not(.la3-light *){background-color:rgb(249 115 22 / 0.1)}
html.la3-dark .bg-pink-100:not(.la3-light *){background-color:rgb(236 72 153 / 0.16)}
html.la3-dark .bg-pink-50:not(.la3-light *){background-color:rgb(236 72 153 / 0.1)}
html.la3-dark .bg-purple-50:not(.la3-light *){background-color:rgb(168 85 247 / 0.1)}
html.la3-dark .bg-red-100:not(.la3-light *){background-color:rgb(239 68 68 / 0.16)}
html.la3-dark .bg-red-50:not(.la3-light *){background-color:rgb(239 68 68 / 0.1)}
html.la3-dark .bg-rose-50:not(.la3-light *){background-color:rgb(244 63 94 / 0.1)}
html.la3-dark .bg-sky-50:not(.la3-light *){background-color:rgb(14 165 233 / 0.1)}
html.la3-dark .bg-tile-amber:not(.la3-light *){background-color:rgb(245 158 11 / .14)}
html.la3-dark .bg-tile-blue:not(.la3-light *){background-color:rgb(59 130 246 / .14)}
html.la3-dark .bg-tile-coral:not(.la3-light *){background-color:rgb(249 115 22 / .14)}
html.la3-dark .bg-tile-gray:not(.la3-light *){background-color:rgb(148 163 184 / .14)}
html.la3-dark .bg-tile-green:not(.la3-light *){background-color:rgb(34 197 94 / .14)}
html.la3-dark .bg-tile-pink:not(.la3-light *){background-color:rgb(236 72 153 / .14)}
html.la3-dark .bg-tile-purple:not(.la3-light *){background-color:rgb(139 92 246 / .14)}
html.la3-dark .bg-tile-teal:not(.la3-light *){background-color:rgb(20 184 166 / .14)}
html.la3-dark .bg-violet-100:not(.la3-light *){background-color:rgb(139 92 246 / 0.16)}
html.la3-dark .bg-violet-50:not(.la3-light *){background-color:rgb(139 92 246 / 0.1)}
html.la3-dark .bg-white:not(.la3-light *){background-color:var(--la3d-surface)}
html.la3-dark .bg-white\/50:not(.la3-light *){background-color:rgb(23 30 43 / .5)}
html.la3-dark .bg-white\/95:not(.la3-light *){background-color:rgb(23 30 43 / .95)}
html.la3-dark .bg-yellow-50:not(.la3-light *){background-color:rgb(234 179 8 / 0.1)}
html.la3-dark .border-amber-100:not(.la3-light *){border-color:rgb(245 158 11 / .4)}
html.la3-dark .border-amber-300:not(.la3-light *){border-color:rgb(245 158 11 / .4)}
html.la3-dark .border-blue-100:not(.la3-light *){border-color:rgb(59 130 246 / .4)}
html.la3-dark .border-blue-300:not(.la3-light *){border-color:rgb(59 130 246 / .4)}
html.la3-dark .border-brand-border:not(.la3-light *){border-color:var(--la3d-border)}
html.la3-dark .border-emerald-100:not(.la3-light *){border-color:rgb(16 185 129 / .4)}
html.la3-dark .border-emerald-300:not(.la3-light *){border-color:rgb(16 185 129 / .4)}
html.la3-dark .border-gray-100:not(.la3-light *){border-color:var(--la3d-border)}
html.la3-dark .border-gray-200:not(.la3-light *){border-color:var(--la3d-border)}
html.la3-dark .border-gray-300:not(.la3-light *){border-color:var(--la3d-border)}
html.la3-dark .border-gray-300\/40:not(.la3-light *){border-color:var(--la3d-border)}
html.la3-dark .border-green-100:not(.la3-light *){border-color:rgb(34 197 94 / .4)}
html.la3-dark .border-green-200:not(.la3-light *){border-color:rgb(34 197 94 / .4)}
html.la3-dark .border-green-300:not(.la3-light *){border-color:rgb(34 197 94 / .4)}
html.la3-dark .border-orange-300:not(.la3-light *){border-color:rgb(249 115 22 / .4)}
html.la3-dark .border-purple-300:not(.la3-light *){border-color:rgb(168 85 247 / .4)}
html.la3-dark .border-red-100:not(.la3-light *){border-color:rgb(239 68 68 / .4)}
html.la3-dark .border-red-200:not(.la3-light *){border-color:rgb(239 68 68 / .4)}
html.la3-dark .border-red-300:not(.la3-light *){border-color:rgb(239 68 68 / .4)}
html.la3-dark .border-rose-100:not(.la3-light *){border-color:rgb(244 63 94 / .4)}
html.la3-dark .border-sky-100:not(.la3-light *){border-color:rgb(14 165 233 / .4)}
html.la3-dark .border-violet-100:not(.la3-light *){border-color:rgb(139 92 246 / .4)}
html.la3-dark .border-violet-300:not(.la3-light *){border-color:rgb(139 92 246 / .4)}
html.la3-dark .border-white:not(.la3-light *){border-color:var(--la3d-border)}
html.la3-dark .focus\:bg-gray-100:not(.la3-light *):focus{background-color:#1f2838}
html.la3-dark .focus\:bg-gray-50:not(.la3-light *):focus{background-color:#1b2331}
html.la3-dark .focus\:bg-gray-700:not(.la3-light *):focus{background-color:#3a465c}
html.la3-dark .focus\:bg-indigo-100:not(.la3-light *):focus{background-color:rgb(99 102 241 / 0.16)}
html.la3-dark .focus\:border-gray-300:not(.la3-light *):focus{border-color:var(--la3d-border)}
html.la3-dark .focus\:text-gray-500:not(.la3-light *):focus{color:#9aa4b3}
html.la3-dark .focus\:text-gray-700:not(.la3-light *):focus{color:#cdd4de}
html.la3-dark .focus\:text-gray-800:not(.la3-light *):focus{color:#e3e8ef}
html.la3-dark .focus\:text-indigo-800:not(.la3-light *):focus{color:#a5b4fc}
html.la3-dark .from-amber-50:not(.la3-light *){--tw-gradient-from:rgb(245 158 11 / .14) var(--tw-gradient-from-position);--tw-gradient-to:rgb(0 0 0 / 0) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-from),var(--tw-gradient-to)}
html.la3-dark .from-sky-100:not(.la3-light *){--tw-gradient-from:rgb(14 165 233 / .14) var(--tw-gradient-from-position);--tw-gradient-to:rgb(0 0 0 / 0) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-from),var(--tw-gradient-to)}
html.la3-dark .from-violet-50:not(.la3-light *){--tw-gradient-from:rgb(139 92 246 / .14) var(--tw-gradient-from-position);--tw-gradient-to:rgb(0 0 0 / 0) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-from),var(--tw-gradient-to)}
html.la3-dark .hover\:bg-amber-100:not(.la3-light *):hover{background-color:rgb(245 158 11 / 0.16)}
html.la3-dark .hover\:bg-amber-200:not(.la3-light *):hover{background-color:rgb(245 158 11 / 0.24)}
html.la3-dark .hover\:bg-blue-100:not(.la3-light *):hover{background-color:rgb(59 130 246 / 0.16)}
html.la3-dark .hover\:bg-blue-50:not(.la3-light *):hover{background-color:rgb(59 130 246 / 0.1)}
html.la3-dark .hover\:bg-emerald-200:not(.la3-light *):hover{background-color:rgb(16 185 129 / 0.24)}
html.la3-dark .hover\:bg-gray-100:not(.la3-light *):hover{background-color:#1f2838}
html.la3-dark .hover\:bg-gray-200:not(.la3-light *):hover{background-color:#283244}
html.la3-dark .hover\:bg-gray-300:not(.la3-light *):hover{background-color:#334056}
html.la3-dark .hover\:bg-gray-50:not(.la3-light *):hover{background-color:#1b2331}
html.la3-dark .hover\:bg-gray-700:not(.la3-light *):hover{background-color:#3a465c}
html.la3-dark .hover\:bg-green-100:not(.la3-light *):hover{background-color:rgb(34 197 94 / 0.16)}
html.la3-dark .hover\:bg-orange-100:not(.la3-light *):hover{background-color:rgb(249 115 22 / 0.16)}
html.la3-dark .hover\:bg-purple-100:not(.la3-light *):hover{background-color:rgb(168 85 247 / 0.16)}
html.la3-dark .hover\:bg-red-100:not(.la3-light *):hover{background-color:rgb(239 68 68 / 0.16)}
html.la3-dark .hover\:bg-red-200:not(.la3-light *):hover{background-color:rgb(239 68 68 / 0.24)}
html.la3-dark .hover\:bg-red-50:not(.la3-light *):hover{background-color:rgb(239 68 68 / 0.1)}
html.la3-dark .hover\:bg-violet-50:not(.la3-light *):hover{background-color:rgb(139 92 246 / 0.1)}
html.la3-dark .hover\:border-gray-300:not(.la3-light *):hover{border-color:var(--la3d-border)}
html.la3-dark .hover\:text-amber-700:not(.la3-light *):hover{color:#fcd34d}
html.la3-dark .hover\:text-brand-primary:not(.la3-light *):hover{color:#6aa8ec}
html.la3-dark .hover\:text-gray-500:not(.la3-light *):hover{color:#9aa4b3}
html.la3-dark .hover\:text-gray-700:not(.la3-light *):hover{color:#cdd4de}
html.la3-dark .hover\:text-gray-800:not(.la3-light *):hover{color:#e3e8ef}
html.la3-dark .hover\:text-gray-900:not(.la3-light *):hover{color:#eef1f6}
html.la3-dark .ring-gray-200:not(.la3-light *){--tw-ring-color:var(--la3d-border)}
html.la3-dark .text-amber-600:not(.la3-light *){color:#fbbf24}
html.la3-dark .text-amber-700:not(.la3-light *){color:#fcd34d}
html.la3-dark .text-amber-800:not(.la3-light *){color:#fcd34d}
html.la3-dark .text-amber-900:not(.la3-light *){color:#fcd34d}
html.la3-dark .text-amber-950:not(.la3-light *){color:#fcd34d}
html.la3-dark .text-blue-600:not(.la3-light *){color:#60a5fa}
html.la3-dark .text-blue-700:not(.la3-light *){color:#93c5fd}
html.la3-dark .text-blue-800:not(.la3-light *){color:#93c5fd}
html.la3-dark .text-blue-900:not(.la3-light *){color:#93c5fd}
html.la3-dark .text-brand-primary:not(.la3-light *){color:#6aa8ec}
html.la3-dark .text-emerald-600:not(.la3-light *){color:#34d399}
html.la3-dark .text-emerald-700:not(.la3-light *){color:#6ee7b7}
html.la3-dark .text-emerald-800:not(.la3-light *){color:#6ee7b7}
html.la3-dark .text-emerald-900:not(.la3-light *){color:#6ee7b7}
html.la3-dark .text-gray-300:not(.la3-light *){color:#5d6878}
html.la3-dark .text-gray-400:not(.la3-light *){color:#8590a0}
html.la3-dark .text-gray-500:not(.la3-light *){color:#9aa4b3}
html.la3-dark .text-gray-600:not(.la3-light *){color:#b0b9c6}
html.la3-dark .text-gray-700:not(.la3-light *){color:#cdd4de}
html.la3-dark .text-gray-800:not(.la3-light *){color:#e3e8ef}
html.la3-dark .text-gray-900:not(.la3-light *){color:#eef1f6}
html.la3-dark .text-green-600:not(.la3-light *){color:#4ade80}
html.la3-dark .text-green-700:not(.la3-light *){color:#86efac}
html.la3-dark .text-green-800:not(.la3-light *){color:#86efac}
html.la3-dark .text-green-900:not(.la3-light *){color:#86efac}
html.la3-dark .text-indigo-700:not(.la3-light *){color:#a5b4fc}
html.la3-dark .text-orange-700:not(.la3-light *){color:#fdba74}
html.la3-dark .text-orange-800:not(.la3-light *){color:#fdba74}
html.la3-dark .text-orange-900:not(.la3-light *){color:#fdba74}
html.la3-dark .text-pink-700:not(.la3-light *){color:#f9a8d4}
html.la3-dark .text-pink-800:not(.la3-light *){color:#f9a8d4}
html.la3-dark .text-pink-900:not(.la3-light *){color:#f9a8d4}
html.la3-dark .text-purple-700:not(.la3-light *){color:#d8b4fe}
html.la3-dark .text-purple-800:not(.la3-light *){color:#d8b4fe}
html.la3-dark .text-purple-900:not(.la3-light *){color:#d8b4fe}
html.la3-dark .text-red-600:not(.la3-light *){color:#f87171}
html.la3-dark .text-red-700:not(.la3-light *){color:#fca5a5}
html.la3-dark .text-red-800:not(.la3-light *){color:#fca5a5}
html.la3-dark .text-red-900:not(.la3-light *){color:#fca5a5}
html.la3-dark .text-rose-600:not(.la3-light *){color:#fb7185}
html.la3-dark .text-rose-700:not(.la3-light *){color:#fda4af}
html.la3-dark .text-rose-800:not(.la3-light *){color:#fda4af}
html.la3-dark .text-rose-900:not(.la3-light *){color:#fda4af}
html.la3-dark .text-sky-600:not(.la3-light *){color:#38bdf8}
html.la3-dark .text-sky-700:not(.la3-light *){color:#7dd3fc}
html.la3-dark .text-sky-800:not(.la3-light *){color:#7dd3fc}
html.la3-dark .text-sky-900:not(.la3-light *){color:#7dd3fc}
html.la3-dark .text-violet-700:not(.la3-light *){color:#c4b5fd}
html.la3-dark .text-violet-800:not(.la3-light *){color:#c4b5fd}
html.la3-dark .text-violet-900:not(.la3-light *){color:#c4b5fd}
html.la3-dark .text-yellow-700:not(.la3-light *){color:#fde047}
html.la3-dark .to-blue-50:not(.la3-light *){--tw-gradient-to:rgb(59 130 246 / .14) var(--tw-gradient-to-position)}
html.la3-dark .to-orange-50:not(.la3-light *){--tw-gradient-to:rgb(249 115 22 / .14) var(--tw-gradient-to-position)}
html.la3-dark .to-violet-100:not(.la3-light *){--tw-gradient-to:rgb(139 92 246 / .14) var(--tw-gradient-to-position)}
html.la3-dark .to-white:not(.la3-light *){--tw-gradient-to:var(--la3d-surface) var(--tw-gradient-to-position)}

/* ===== مكوّنات app.css ===== */
html.la3-dark .bg-brand-bg:not(.la3-light *){background-color:var(--la3d-bg)}
html.la3-dark .game-card:not(.la3-light *){background-color:var(--la3d-surface);border-color:var(--la3d-border)}
html.la3-dark .game-card:not(.la3-light *):hover{border-color:#4f8fd6;box-shadow:0 6px 18px rgb(0 0 0 / .35)}
html.la3-dark .category-pill-inactive:not(.la3-light *){background-color:var(--la3d-surface);color:#cdd4de;border-color:var(--la3d-border)}
html.la3-dark .category-pill-active:not(.la3-light *){background-color:#e3e8ef;color:#0e131c}
html.la3-dark .btn-secondary:not(.la3-light *){background-color:var(--la3d-surface2);color:#e3e8ef;border-color:var(--la3d-border)}
html.la3-dark .bg-gray-800:not(.la3-light *){background-color:#334155}
html.la3-dark .bg-gray-900:not(.la3-light *){background-color:#3b4760}
html.la3-dark .hover\:bg-gray-700:not(.la3-light *):hover{background-color:#475569}
html.la3-dark .border-gray-900:not(.la3-light *){border-color:#64748b}
html.la3-dark .bg-\[\#FCFBF9\]:not(.la3-light *){background-color:var(--la3d-surface)}
html.la3-dark .shadow-sm:not(.la3-light *),html.la3-dark .shadow:not(.la3-light *){--tw-shadow-color:rgb(0 0 0 / .4)}

/* ===== الهيدر والتصنيفات والفوتر ===== */
html.la3-dark #site-header{background-color:rgb(23 30 43 / .97);border-color:var(--la3d-border)}
html.la3-dark .la3-nav-bar{background:var(--la3d-surface) !important;border-bottom-color:var(--la3d-border) !important}
html.la3-dark .la3-nav-pill:not(.is-active){background:var(--la3d-surface2) !important;color:#d3d9e2 !important}
html.la3-dark .la3-nav-pill.la3-nav-online:not(.is-active){background:rgb(34 197 94 / .16) !important;color:#86efac !important}
html.la3-dark .la3-nav-pill.la3-nav-edu:not(.is-active){background:rgb(20 184 166 / .16) !important;color:#5eead4 !important}
html.la3-dark #site-footer{background-color:var(--la3d-surface)}
html.la3-dark .la3-ad{border-top-color:var(--la3d-border)}
html.la3-dark .la3-ad-label{color:#7d8796}
html.la3-dark a.hover\:text-brand-primary:hover{color:#8cbcf2}

/* حقول الإدخال الافتراضية (تسجيل الدخول، التواصل، الملف الشخصي) */
html.la3-dark input:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=color]):not([type=submit]):not([type=button]):not(.la3-light *):not([style*="background"]),
html.la3-dark select:not(.la3-light *),
html.la3-dark textarea:not(.la3-light *){background-color:#121926;color:var(--la3d-text);border-color:#334056}
html.la3-dark input::placeholder,html.la3-dark textarea::placeholder{color:#6b7584}

/* ===== ألوان مكتوبة داخل style="" (الرئيسية والصفحات) ===== */
html.la3-dark :is([style*="background:#fff;"],[style*="background: #fff;"],[style*="background:#ffffff"],[style*="background:white"],[style*="background: white"],[style*="background-color:#fff"],[style*="background:#fafaff"],[style*="background:#f9fafb"],[style*="background:#f8fafc"],[style*="background:#fcfcff"]):not(.la3-light *):not(.la3-light){background:var(--la3d-surface) !important}
html.la3-dark :is([style*="background:#f3f4f6"],[style*="background:#f1f5f9"],[style*="background:#f3f0ff"],[style*="background:#eef2ff"],[style*="background:#f5f3ff"],[style*="background:#ede9fe"]):not(.la3-light *):not(.la3-light){background:#232c3d !important}
html.la3-dark :is([style*="background:#fff7ed"],[style*="background:#fffbeb"],[style*="background:#fef3c7"]):not(.la3-light *){background:rgb(245 158 11 / .14) !important}
html.la3-dark :is([style*="background:#f0fdf4"],[style*="background:#dcfce7"],[style*="background:#ecfdf5"],[style*="background:#f0fdfa"]):not(.la3-light *){background:rgb(34 197 94 / .14) !important}
html.la3-dark :is([style*="background:#fef2f2"],[style*="background:#fee2e2"],[style*="background:#fff1f2"]):not(.la3-light *){background:rgb(239 68 68 / .14) !important}
html.la3-dark :is([style*="background:#eff6ff"],[style*="background:#e0f2fe"],[style*="background:#dbeafe"]):not(.la3-light *){background:rgb(59 130 246 / .14) !important}
html.la3-dark :is([style*="color:#111827"],[style*="color:#1f2937"],[style*="color:#0f172a"],[style*="color:#1e293b"],[style*="color: #111827"],[style*="color:#111"]):not(.la3-light *):not(.la3-light){color:var(--la3d-text) !important}
html.la3-dark :is([style*="color:#374151"],[style*="color:#334155"],[style*="color:#4b5563"],[style*="color:#475569"]):not(.la3-light *):not(.la3-light){color:#cdd4de !important}
html.la3-dark :is([style*="color:#6b7280"],[style*="color:#64748b"]):not(.la3-light *):not(.la3-light){color:#9aa4b3 !important}
html.la3-dark :is([style*="color:#534AB7"],[style*="color:#534ab7"]):not(.la3-light *){color:#a9a2ff !important}
html.la3-dark :is([style*="color:#c2410c"],[style*="color:#9a3412"]):not(.la3-light *){color:#fdba74 !important}
html.la3-dark :is([style*="color:#166534"],[style*="color:#15803d"],[style*="color:#14532d"]):not(.la3-light *){color:#86efac !important}
html.la3-dark :is([style*="color:#0f766e"]):not(.la3-light *):not([style*="background:#0f766e"]){color:#5eead4 !important}
html.la3-dark :is([style*="border:1px solid #ece9fb"],[style*="border:1px solid #e5e7eb"],[style*="border:1px solid #eee"],[style*="border:1px solid #f1f5f9"],[style*="border:1px solid #e2e8f0"]):not(.la3-light *){border-color:var(--la3d-border) !important}

/* ===== ساحة الألعاب =====
   ساحة اللعب نفسها (#game-focus-engine) عليها class la3-light فتبقى بألوانها الأصلية في الليلي،
   وكذلك ملء الشاشة يبقى فاتح مثل ما هو. اللي يتغيّر هو الصفحة حولها. */
/* جزيرة فاتحة: لعبة تصميمها فاتح وما تناسب الليلي، تبقى مثل ما هي */
html.la3-dark .la3-light{color-scheme:light;color:#1f2937;background-color:#fff;border-radius:12px}

/* ===== زر الوضع الليلي ===== */
.la3-theme-btn{display:inline-flex;align-items:center;justify-content:center;gap:6px;height:34px;min-width:34px;padding:0 10px;border-radius:999px;border:1px solid #E5E7EB;background:#fff;color:#374151;font-size:12px;font-weight:700;cursor:pointer;line-height:1;transition:background-color .2s,border-color .2s;-webkit-tap-highlight-color:transparent;flex-shrink:0}
.la3-theme-btn:hover{border-color:#9ca3af}
.la3-theme-btn:focus-visible{outline:2px solid #534AB7;outline-offset:2px}
.la3-theme-btn svg{width:18px;height:18px;flex-shrink:0}
.la3-theme-btn .la3-ico-sun{display:none}
html.la3-dark .la3-theme-btn{background:#232c3d;border-color:#3a465c;color:#fcd34d}
html.la3-dark .la3-theme-btn:hover{border-color:#64748b}
html.la3-dark .la3-theme-btn .la3-ico-sun{display:block}
html.la3-dark .la3-theme-btn .la3-ico-moon{display:none}
@media (max-width:639px){.la3-theme-btn{padding:0;width:34px}.la3-theme-btn .la3-theme-txt{display:none}}

/* ===== تلميع صفحات لها CSS خاص (بدون تعديل ملفاتها) ===== */
/* الرئيسية: بطاقات الألغاز اليومية */
html.la3-dark .hm-puzzle{background:linear-gradient(135deg,rgb(245 158 11 / .16),rgb(245 158 11 / .08));border-color:rgb(245 158 11 / .45);color:#fde68a}
html.la3-dark .hm-pz-icon{background:#232c3d}
html.la3-dark .hm-pz-status{color:#fbbf24}
html.la3-dark .hm-puzzle.done{background:linear-gradient(135deg,rgb(34 197 94 / .16),rgb(34 197 94 / .08));border-color:rgb(34 197 94 / .45);color:#bbf7d0}
html.la3-dark .hm-puzzle.done .hm-pz-status{color:#86efac}
html.la3-dark .hm-puzzle.lost{background:var(--la3d-surface2);border-color:var(--la3d-border);color:#cdd4de}
html.la3-dark .hm-puzzle.lost .hm-pz-status{color:#9aa4b3}

/* صفحات التصنيفات */
html.la3-dark .category-game-card{background:var(--la3d-surface);border-color:var(--la3d-border);box-shadow:none}
html.la3-dark .category-game-card:hover{border-color:#3b6fb0}
html.la3-dark .category-game-cover{background:linear-gradient(135deg,#1d2535,#263042)}
html.la3-dark .category-game-title{color:var(--la3d-text)}
html.la3-dark .category-game-card:hover .category-game-title,html.la3-dark .category-game-start{color:#7cb4f5}
html.la3-dark .category-game-footer{border-top-color:var(--la3d-border)}

/* شريط «العب التالي» */
html.la3-dark .la3-next{background:var(--la3d-surface);border-color:var(--la3d-border);color:var(--la3d-text);box-shadow:0 18px 40px rgb(0 0 0 / .55)}
html.la3-dark .la3-next-title small,html.la3-dark .la3-next-txt small{color:#9aa4b3}
html.la3-dark .la3-next-x{background:#232c3d;color:#cdd4de}
html.la3-dark .la3-next-x:hover{background:#2c3850}
html.la3-dark .la3-next-card{background:var(--la3d-surface2);border-color:var(--la3d-border);color:var(--la3d-text)!important}
html.la3-dark .la3-next-card.is-main{background:rgb(59 130 246 / .16);border-color:#3b6fb0}
html.la3-dark .la3-next-img{background:#232c3d}

/* الكلمات المتقاطعة: صفحة لغز اليوم والأرشيف */
html.la3-dark .cwd-crumbs,html.la3-dark .cwd-crumbs a{color:#9aa4b3}
html.la3-dark .cwd-head h1,html.la3-dark .cwd-card h2,html.la3-dark .cwa-hero h1,html.la3-dark .cwa-month h2{color:var(--la3d-text)}
html.la3-dark .cwd-head p,html.la3-dark .cwd-text,html.la3-dark .cwa-hero p{color:#b0b9c6}
html.la3-dark .cwd-nav a,html.la3-dark .cwd-nav span{background:var(--la3d-surface);border-color:var(--la3d-border);color:#cdd4de}
html.la3-dark .cwd-shell,html.la3-dark .cwd-card,html.la3-dark .cwa-hero,html.la3-dark .cwa-month{background:var(--la3d-surface);border-color:var(--la3d-border)}
html.la3-dark .cwd-cols li{color:#cdd4de}
html.la3-dark .cwd-cols h3,html.la3-dark .cwd-cols li b,html.la3-dark .cwd details summary{color:#a5b4fc}
html.la3-dark .cwd-ans{background:rgb(16 185 129 / .16);color:#6ee7b7}
html.la3-dark .cwd-links a{background:rgb(99 102 241 / .16);color:#c7d2fe}
html.la3-dark .cwa-day{border-color:var(--la3d-border);color:#cdd4de}
html.la3-dark .cwa-day:hover{background:rgb(99 102 241 / .16);border-color:#6366f1;color:#c7d2fe}
html.la3-dark .cwa-day.today{background:rgb(245 158 11 / .14);border-color:rgb(245 158 11 / .5);color:#fde68a}

/* أرشيف خمّن الكلمة */
html.la3-dark .gwa-hero,html.la3-dark .gwa-item,html.la3-dark .gwa-empty{background:var(--la3d-surface);border-color:var(--la3d-border)}
html.la3-dark .gwa-hero h1,html.la3-dark .gwa-word{color:var(--la3d-text)}
html.la3-dark .gwa-hero p,html.la3-dark .gwa-meaning,html.la3-dark .gwa-empty{color:#b0b9c6}
html.la3-dark .gwa-num{background:rgb(16 185 129 / .16);color:#6ee7b7}
html.la3-dark .gwa-cat{background:rgb(59 130 246 / .16);color:#93c5fd}
html.la3-dark .gwa-toggle{background:var(--la3d-surface2);border-color:var(--la3d-border);color:#cdd4de}

/* الألعاب التعليمية: الفهرس والدروس */
html.la3-dark .edu-hero,html.la3-dark .edl-hero{background:linear-gradient(135deg,rgb(20 184 166 / .14),rgb(6 182 212 / .08));border-color:rgb(20 184 166 / .4)}
html.la3-dark .edu-hero-icon,html.la3-dark .edl-label{background:#232c3d}
html.la3-dark .edu-hero h1,html.la3-dark .edl-hero h1{color:var(--la3d-text)}
html.la3-dark .edu-hero p,html.la3-dark .edl-hero p,html.la3-dark .edu-crumbs{color:#b0b9c6}
html.la3-dark .edu-kicker,html.la3-dark .edu-crumbs a,html.la3-dark .edl-crumbs a,html.la3-dark .edl-game>span,html.la3-dark .edl-progress,html.la3-dark .edl-label{color:#5eead4}
html.la3-dark .edu-card,html.la3-dark .edl-game{background:var(--la3d-surface);border-color:var(--la3d-border);color:var(--la3d-text)}
html.la3-dark .edu-card-icon,html.la3-dark .edl-game-icon{background:rgb(20 184 166 / .14)}
html.la3-dark .edl-chips em{background:rgb(20 184 166 / .14);border-color:rgb(20 184 166 / .35);color:#5eead4}
html.la3-dark main.la3-light{border-radius:0}
html.la3-dark .cwa-day,html.la3-dark .cwa-day span{background-color:transparent}
html.la3-dark .cwa-day{background-color:var(--la3d-surface2)}
html.la3-dark .cwa-day span:not(.ok){color:#cdd4de}
html.la3-dark .cwd-text a{color:#a5b4fc !important}
/* الجوال: الشعار ما ينضغط، واسم العضو في زر القائمة هو اللي يختصر (…) حسب المساحة،
   عشان زر الوضع الليلي ما يغطي كلمة «لعبني» (كانت تتغطى أصلاً مع الأسماء الطويلة على الشاشات الصغيرة). */
@media (max-width:639px){
    #site-header > div > a:first-child{flex-shrink:0}
    #site-header > div > div:last-child{min-width:0;flex-shrink:1}
    #site-header > div > div:last-child > *{flex-shrink:0}
    #site-header #user-menu-wrapper{flex-shrink:1;min-width:0}
    #user-menu-wrapper > button{max-width:100%;min-width:0;overflow:hidden}
    #user-menu-wrapper > button .truncate{min-width:0;max-width:100px}
}
