/* ============================================================
   أنا وأخي — Design System v1
   طبقة توكنز موحّدة فوق app.css. أي مكوّن جديد يستخدم المتغيرات دي بس.
   ============================================================ */
:root {
  /* Spacing (4pt grid) */
  --sp-1: 4px; --sp-2: 8px; --sp-3: 12px; --sp-4: 16px; --sp-5: 20px; --sp-6: 24px; --sp-8: 32px; --sp-10: 40px; --sp-12: 48px;
  /* Radius */
  --rad-sm: 10px; --rad-md: 14px; --rad-lg: 20px; --rad-xl: 28px; --rad-pill: 999px;
  /* Type scale */
  --fs-xs: .78rem; --fs-sm: .88rem; --fs-md: 1rem; --fs-lg: 1.15rem; --fs-xl: 1.45rem; --fs-2xl: clamp(1.9rem, 5vw, 2.6rem);
  --fw-reg: 400; --fw-med: 500; --fw-bold: 700;
  /* Elevation */
  --sh-1: 0 1px 2px rgba(46, 38, 64, .06), 0 1px 3px rgba(46, 38, 64, .05);
  --sh-2: 0 2px 6px rgba(46, 38, 64, .06), 0 10px 24px rgba(120, 72, 20, .09);
  --sh-3: 0 8px 20px rgba(46, 38, 64, .10), 0 24px 48px rgba(120, 72, 20, .12);
  /* Motion */
  --dur-fast: 120ms; --dur-med: 240ms; --dur-slow: 420ms;
  --ease-out: cubic-bezier(.2, .8, .2, 1); --ease-spring: cubic-bezier(.34, 1.56, .64, 1);
  /* Semantic surfaces */
  --surface: var(--paper); --surface-2: var(--soft); --border: var(--line); --focus: var(--sea);
  --control-h: 48px;
  --skel-a: #F3E9DA; --skel-b: #FBF4EA;
}
:root[data-theme="dark"] {
  --sh-1: 0 1px 2px rgba(0, 0, 0, .35);
  --sh-2: 0 2px 6px rgba(0, 0, 0, .3), 0 10px 24px rgba(0, 0, 0, .28);
  --sh-3: 0 8px 20px rgba(0, 0, 0, .35), 0 24px 48px rgba(0, 0, 0, .35);
  --skel-a: #1F2B3F; --skel-b: #26344B;
}

/* انتقال ناعم بين الفاتح والغامق */
html.theme-anim, html.theme-anim * { transition: background-color var(--dur-slow) var(--ease-out), border-color var(--dur-slow) var(--ease-out), color var(--dur-med) var(--ease-out) !important; }

/* ---------- Typography ---------- */
body { text-rendering: optimizeLegibility; -webkit-font-smoothing: antialiased; }
:lang(ar) body, [dir="rtl"] body { letter-spacing: 0; word-spacing: .02em; }
[dir="rtl"] p, [dir="rtl"] li { line-height: 1.75; }

/* ---------- Focus & a11y ---------- */
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: var(--rad-sm); }
.sr-only { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; inset-inline-start: var(--sp-3); top: -60px; z-index: 100; background: var(--ink); color: var(--paper); padding: var(--sp-2) var(--sp-4); border-radius: var(--rad-md); font-weight: var(--fw-bold); }
.skip-link:focus { top: var(--sp-3); }

/* ---------- Buttons ---------- */
.btn { min-height: var(--control-h); border-radius: var(--rad-md); transition: transform var(--dur-fast) var(--ease-out), box-shadow var(--dur-med) var(--ease-out), filter var(--dur-med); position: relative; overflow: hidden; }
.btn.sm { min-height: 36px; }
.btn:hover { filter: brightness(1.04); }
.btn:active { transform: scale(.97); }
.btn-leaf { box-shadow: 0 4px 0 color-mix(in srgb, var(--leaf) 70%, #000); }
.btn-leaf:active { box-shadow: 0 1px 0 color-mix(in srgb, var(--leaf) 70%, #000); transform: translateY(3px); }
.btn.busy { opacity: 1; color: transparent !important; }
.btn.busy::after { content: ""; position: absolute; inset: 0; margin: auto; width: 20px; height: 20px; border-radius: 50%; border: 2.5px solid currentColor; border-color: var(--leaf-ink) var(--leaf-ink) transparent transparent; animation: ds-spin .7s linear infinite; }
.btn-ghost.busy::after, .btn-sun.busy::after { border-color: var(--ink) var(--ink) transparent transparent; }
@keyframes ds-spin { to { transform: rotate(360deg); } }

/* ---------- Forms ---------- */
.form { gap: var(--sp-4); }
.form label { gap: var(--sp-2); font-size: var(--fs-sm); color: var(--ink); font-weight: var(--fw-med); }
.form input, .form select { min-height: var(--control-h); border-radius: var(--rad-md); padding: var(--sp-3) var(--sp-4); background: var(--surface); transition: border-color var(--dur-med), box-shadow var(--dur-med); }
.form input:hover { border-color: color-mix(in srgb, var(--line) 50%, var(--muted)); }
.form input:focus, .form select:focus { border-color: var(--focus); box-shadow: 0 0 0 4px color-mix(in srgb, var(--focus) 18%, transparent); }
.form input[aria-invalid="true"] { border-color: var(--bad); box-shadow: 0 0 0 4px color-mix(in srgb, var(--bad) 14%, transparent); }
.field-hint { font-size: var(--fs-xs); color: var(--muted); font-weight: var(--fw-reg); }
.field-err { font-size: var(--fs-xs); color: var(--bad); font-weight: var(--fw-med); }
.pw-wrap { position: relative; display: block; }
.pw-wrap input { padding-inline-end: 52px; }
.pw-eye { position: absolute; top: 50%; transform: translateY(-50%); inset-inline-end: 6px; width: 40px; height: 40px; border: 0; background: transparent; color: var(--muted); border-radius: var(--rad-sm); display: grid; place-items: center; }
[dir="ltr"] .pw-wrap input[dir="ltr"] { padding-inline-end: 52px; }
.pw-wrap input[dir="ltr"] { padding-right: 52px; padding-left: var(--sp-4); }
.pw-wrap .pw-eye { right: 6px; left: auto; }
.pw-eye:hover { color: var(--ink); background: var(--surface-2); }
.err, .ok { border-radius: var(--rad-md); padding: var(--sp-3) var(--sp-4); display: flex; gap: var(--sp-2); align-items: flex-start; animation: ds-shake var(--dur-slow) var(--ease-out); }
.ok { animation: ds-pop var(--dur-slow) var(--ease-spring); }
@keyframes ds-shake { 20%, 60% { transform: translateX(-4px); } 40%, 80% { transform: translateX(4px); } }
@keyframes ds-pop { from { transform: scale(.94); opacity: 0; } }

/* ---------- Cards & tabs ---------- */
.card { border-radius: var(--rad-lg); box-shadow: var(--sh-2); border: 1px solid color-mix(in srgb, var(--line) 55%, transparent); }
.tabs { border-radius: var(--rad-md); padding: var(--sp-1); }
.tabs button { min-height: 40px; border-radius: var(--rad-sm); transition: background var(--dur-med), color var(--dur-med), box-shadow var(--dur-med); }
.tabs button.on { box-shadow: var(--sh-1); }
.toast { border-radius: var(--rad-pill); padding: var(--sp-3) var(--sp-5); box-shadow: var(--sh-3); animation: ds-toast var(--dur-slow) var(--ease-spring); }
@keyframes ds-toast { from { transform: translate(-50%, 16px); opacity: 0; } }

/* ---------- Page transitions & stagger ---------- */
#app > * { animation: ds-enter var(--dur-slow) var(--ease-out) both; }
@keyframes ds-enter { from { opacity: 0; transform: translateY(10px); } }
.ds-stagger > * { animation: ds-enter var(--dur-slow) var(--ease-out) both; }
.ds-stagger > *:nth-child(2) { animation-delay: 40ms; } .ds-stagger > *:nth-child(3) { animation-delay: 80ms; }
.ds-stagger > *:nth-child(4) { animation-delay: 120ms; } .ds-stagger > *:nth-child(5) { animation-delay: 160ms; }
.ds-stagger > *:nth-child(6) { animation-delay: 200ms; } .ds-stagger > *:nth-child(n+7) { animation-delay: 240ms; }

/* ---------- Splash / loading ---------- */
.splash { min-height: 100vh; min-height: 100svh; display: grid; place-content: center; justify-items: center; gap: var(--sp-5); padding: var(--sp-6); text-align: center; }
.splash-logo { width: 112px; height: 112px; border-radius: var(--rad-xl); box-shadow: var(--sh-3); animation: ds-logo 1.1s var(--ease-spring) both, ds-float 3s ease-in-out 1.1s infinite; }
.splash-name { font-family: var(--f-display); font-size: var(--fs-xl); animation: ds-enter var(--dur-slow) var(--ease-out) .25s both; }
.splash-bar { width: 140px; height: 5px; border-radius: var(--rad-pill); background: var(--line); overflow: hidden; }
.splash-bar i { display: block; height: 100%; width: 40%; border-radius: inherit; background: var(--leaf); animation: ds-bar 1.2s var(--ease-out) infinite; }
@keyframes ds-logo { from { transform: scale(.4) rotate(-12deg); opacity: 0; } }
@keyframes ds-float { 50% { transform: translateY(-6px); } }
@keyframes ds-bar { from { transform: translateX(-110%); } to { transform: translateX(260%); } }
[dir="rtl"] .splash-bar i { animation-direction: reverse; }

/* Skeleton */
.skel { background: linear-gradient(90deg, var(--skel-a) 25%, var(--skel-b) 50%, var(--skel-a) 75%); background-size: 200% 100%; animation: ds-shimmer 1.3s linear infinite; border-radius: var(--rad-md); }
.skel-line { height: 14px; border-radius: var(--rad-pill); }
.skel-wrap { display: grid; gap: var(--sp-3); padding: var(--sp-4) 0; }
.skel-card { height: 92px; }
@keyframes ds-shimmer { to { background-position: -200% 0; } }
.loading.sm { min-height: 0; display: block; animation: none; }

/* ---------- Empty & error states ---------- */
.state { display: grid; justify-items: center; text-align: center; gap: var(--sp-3); padding: var(--sp-8) var(--sp-4); max-width: 420px; margin: 0 auto; }
.state-ill { width: 88px; height: 88px; border-radius: 50%; display: grid; place-items: center; font-size: 42px; background: var(--surface-2); border: 1px solid var(--border); animation: ds-pop var(--dur-slow) var(--ease-spring) both; }
.state h3 { font-size: var(--fs-lg); }
.state p { color: var(--muted); font-size: var(--fs-sm); }
.state .row { display: flex; gap: var(--sp-2); flex-wrap: wrap; justify-content: center; margin-top: var(--sp-2); }
.state.is-error .state-ill { background: var(--bad-bg); border-color: transparent; }
p.empty { display: grid; justify-items: center; gap: var(--sp-2); padding: var(--sp-6) var(--sp-4); color: var(--muted); font-size: var(--fs-sm); }
p.empty::before { content: "🌿"; width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center; font-size: 26px; background: var(--surface-2); border: 1px solid var(--border); }

/* ============================================================
   Welcome / Auth
   ============================================================ */
.auth { background: var(--sky); }
.auth-hero { background: linear-gradient(160deg, #BFE3F5, #FFE9C7); }
.auth-scene { object-fit: cover; object-position: center 30%; animation: ds-kenburns 18s ease-in-out infinite alternate; }
@keyframes ds-kenburns { to { transform: scale(1.06); } }
.auth-hero::after { height: 100%; background: linear-gradient(180deg, rgba(255, 255, 255, .55) 0%, rgba(255, 255, 255, 0) 38%, rgba(0, 0, 0, 0) 70%, rgba(30, 20, 40, .18) 100%); }
.auth-brand { display: grid; gap: var(--sp-2); justify-items: start; }
.auth-logo { width: 64px; height: 64px; border-radius: var(--rad-lg); box-shadow: var(--sh-3); border: 3px solid #fff; animation: ds-logo 1s var(--ease-spring) both; }
.auth-brand h1 { animation: ds-enter var(--dur-slow) var(--ease-out) .12s both; color: #2E2640; }
.auth-brand p { animation: ds-enter var(--dur-slow) var(--ease-out) .22s both; color: #2E2640; }
.auth-box { align-content: center; gap: var(--sp-5); max-width: 520px; width: 100%; margin-inline: auto; }
.auth-head { display: grid; gap: var(--sp-1); }
.auth-head h2 { font-size: var(--fs-xl); }
.auth-head p { color: var(--muted); font-size: var(--fs-sm); }
.auth-feats { display: flex; flex-wrap: wrap; gap: var(--sp-2); padding: 0; margin: 0; list-style: none; }
.auth-feats li { display: inline-flex; align-items: center; gap: var(--sp-1); padding: 6px 12px; border-radius: var(--rad-pill); background: var(--surface); border: 1px solid var(--border); font-size: var(--fs-xs); font-weight: var(--fw-med); box-shadow: var(--sh-1); }
.auth-card { background: var(--surface); border: 1px solid color-mix(in srgb, var(--line) 60%, transparent); border-radius: var(--rad-xl); padding: var(--sp-6); box-shadow: var(--sh-3); display: grid; gap: var(--sp-4); }
.auth-box .fine { line-height: 1.6; }
@media (max-width: 860px) {
  .auth { grid-template-columns: 1fr; }
  .auth-hero { min-height: 46svh; }
  .auth-box { margin-top: calc(-1 * var(--sp-10)); position: relative; z-index: 2; padding-top: 0; }
  .auth-card { padding: var(--sp-5); border-radius: var(--rad-xl); }
}
:root[data-theme="dark"] .auth-hero::after { background: linear-gradient(180deg, rgba(18, 26, 40, .35), rgba(18, 26, 40, 0) 40%, rgba(18, 26, 40, .55) 100%); }
:root[data-theme="dark"] .auth-brand h1, :root[data-theme="dark"] .auth-brand p { color: #fff; text-shadow: 0 2px 12px rgba(0, 0, 0, .55); }

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 1ms !important; animation-iteration-count: 1 !important; transition-duration: 1ms !important; }
}

/* بطاقة زجاجية للعنوان فوق الصورة عشان القراءة */
.auth-brand { padding: 0 !important; top: var(--sp-4); inset-inline-start: var(--sp-4); inset-inline-end: auto; max-width: min(78%, 420px); }
.auth-brand > * { position: relative; }
.auth-brand::before { content: ""; position: absolute; inset: calc(-1 * var(--sp-3)); border-radius: var(--rad-lg); background: rgba(255, 255, 255, .62); -webkit-backdrop-filter: blur(10px) saturate(1.2); backdrop-filter: blur(10px) saturate(1.2); box-shadow: var(--sh-2); }
.auth-brand { margin: var(--sp-3); }
.auth-brand h1 { font-size: clamp(2rem, 6vw, 3.4rem); text-shadow: none; }
.auth-brand p { text-shadow: none; font-size: var(--fs-md); }
:root[data-theme="dark"] .auth-brand::before { background: rgba(18, 26, 40, .55); }
:root[data-theme="dark"] .auth-brand h1, :root[data-theme="dark"] .auth-brand p { text-shadow: none; }

/* ============================================================
   Phase 2 — App shell: header, tabbar, sections, modals
   ============================================================ */
/* Header زجاجي ثابت */
.kid-top, .ad-top { background: color-mix(in srgb, var(--paper) 82%, transparent); -webkit-backdrop-filter: blur(14px) saturate(1.3); backdrop-filter: blur(14px) saturate(1.3); box-shadow: 0 1px 0 color-mix(in srgb, var(--line) 70%, transparent), var(--sh-1); }
.kid-top-in, .ad-top-in { min-height: 60px; }
.kid-top h1, .kid-top .brand, .ad-top h1 { font-size: clamp(1.05rem, 4.2vw, 1.35rem); line-height: 1.15; }
.pref-btn { border-radius: var(--rad-md); transition: background var(--dur-med), border-color var(--dur-med), transform var(--dur-fast); }
.pref-btn:active { transform: scale(.94); }

/* Tabbar موحّد: كل الأيقونات هادية، والمختار بلونه ومؤشر */
.tabbar { background: color-mix(in srgb, var(--paper) 88%, transparent); -webkit-backdrop-filter: blur(16px) saturate(1.3); backdrop-filter: blur(16px) saturate(1.3); padding: 6px max(6px, env(safe-area-inset-left, 0px)) calc(6px + env(safe-area-inset-bottom, 0px)); gap: 2px; }
.tabbar button, .tabbar button:nth-child(n) { color: var(--muted); background: transparent; position: relative; min-height: 56px; border-radius: var(--rad-md); transition: color var(--dur-med), background var(--dur-med); }
.tabbar button:nth-child(1) { --tab-c: var(--sea); } .tabbar button:nth-child(2) { --tab-c: var(--berry); }
.tabbar button:nth-child(3) { --tab-c: #E07A2E; } .tabbar button:nth-child(4) { --tab-c: #8B5CF6; }
.tabbar button:nth-child(5) { --tab-c: var(--leaf); } .tabbar button:nth-child(6) { --tab-c: #C2410C; }
.tabbar button .ic { width: 26px; height: 26px; transition: transform var(--dur-med) var(--ease-spring); }
.tabbar button.on { color: var(--tab-c, var(--leaf)); background: color-mix(in srgb, var(--tab-c, var(--leaf)) 12%, transparent); }
.tabbar button.on .ic { transform: translateY(-1px) scale(1.08); }
.tabbar button.on::before { content: ""; position: absolute; top: 2px; left: 50%; width: 18px; height: 3px; margin-left: -9px; border-radius: var(--rad-pill); background: var(--tab-c, var(--leaf)); }
.tabbar button span { font-weight: var(--fw-med); }
.tabbar button.on span { font-weight: var(--fw-bold); }
body:has(.tabbar) main { padding-bottom: calc(96px + env(safe-area-inset-bottom, 0px)); }

/* زرار المساعد أصغر عشان ما يغطيش المحتوى */
.hb-fab { width: 52px; height: 52px; box-shadow: var(--sh-3); }
.hb-fab-wa { width: 22px; height: 22px; } .hb-fab-wa svg { width: 18px; height: 18px; }

/* عناوين الأقسام */
.sec-h { align-items: center; margin-bottom: var(--sp-3); }
.sec-h h2, .sec-h h3 { font-size: var(--fs-xl); }
.sec-h .link, .sec-h .muted { font-size: var(--fs-sm); }

/* Modals: دخول بانزلاق، bottom-sheet على الموبايل */
.modal { -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); animation: ds-fade var(--dur-med) var(--ease-out); }
.modal-card { border-radius: var(--rad-xl); padding: var(--sp-6); box-shadow: var(--sh-3); border: 1px solid color-mix(in srgb, var(--line) 50%, transparent); animation: ds-sheet var(--dur-slow) var(--ease-spring); }
@keyframes ds-fade { from { opacity: 0; } }
@keyframes ds-sheet { from { transform: translateY(24px) scale(.98); opacity: 0; } }
@media (max-width: 560px) {
  .modal { place-items: end center; padding: 0; }
  .modal-card { width: 100%; border-radius: var(--rad-xl) var(--rad-xl) 0 0; padding-bottom: calc(var(--sp-6) + env(safe-area-inset-bottom, 0px)); max-height: 92vh; }
  .modal-card::before { content: ""; display: block; width: 40px; height: 4px; border-radius: var(--rad-pill); background: var(--line); margin: calc(-1 * var(--sp-3)) auto var(--sp-1); }
}

/* لمسات تفاعلية على كل الكروت القابلة للضغط */
.card[role="button"], button.card, a.card, .tile, .gr-card, .t-card, .kg-tile, .lp-tile { transition: transform var(--dur-fast) var(--ease-out), box-shadow var(--dur-med) var(--ease-out); }
.card[role="button"]:active, button.card:active, a.card:active, .tile:active, .gr-card:active, .t-card:active, .kg-tile:active, .lp-tile:active { transform: scale(.97); }
@media (hover: hover) {
  .card[role="button"]:hover, button.card:hover, a.card:hover, .tile:hover, .gr-card:hover, .kg-tile:hover, .lp-tile:hover { box-shadow: var(--sh-3); transform: translateY(-2px); }
}

/* جداول الأدمن */
table { border-collapse: separate; border-spacing: 0; width: 100%; }
th { font-size: var(--fs-xs); text-transform: none; color: var(--muted); font-weight: var(--fw-bold); text-align: start; padding: var(--sp-2) var(--sp-3); background: var(--surface-2); position: sticky; top: 0; }
td { padding: var(--sp-3); border-bottom: 1px solid var(--border); }
tbody tr { transition: background var(--dur-fast); }
tbody tr:hover { background: color-mix(in srgb, var(--surface-2) 60%, transparent); }

/* Desktop: تابار عائم */
@media (min-width: 721px) {
  .tabbar { border-radius: var(--rad-xl); box-shadow: var(--sh-3); bottom: var(--sp-3); }
  .tabbar button.on::before { top: 4px; }
}

/* أسماء الحلقات بالإنجليزي: تقسيم كلمات صحيح بدل الكسر في نص الكلمة */
:lang(en) .t-v { overflow-wrap: break-word; word-break: normal; -webkit-hyphens: auto; hyphens: auto; font-size: .72rem; letter-spacing: -.01em; }

/* إصلاح: قاعدة .ad-grid بتاعة قسم تاني كانت بتكسر لوحة الأدمن على الموبايل */
.admin .ad-grid { grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: var(--sp-4); }
@media (max-width: 860px) { .admin .ad-grid { grid-template-columns: minmax(0, 1fr); } }
.admin .ad-grid > * { min-width: 0; }
.admin .ad-tabs { scroll-snap-type: x proximity; -webkit-overflow-scrolling: touch; }
.admin .ad-tabs button { scroll-snap-align: start; white-space: nowrap; min-height: 44px; }
.admin { overflow-x: clip; }

/* أزرار الحذف */
.btn-danger { background: var(--bad); color: #fff; box-shadow: 0 4px 0 color-mix(in srgb, var(--bad) 70%, #000); }
.btn-danger.busy::after { border-color: #fff #fff transparent transparent; }
.danger-link { color: var(--bad); justify-self: center; font-size: var(--fs-sm); margin-top: var(--sp-2); }

/* ============================================================
   Phase M2 — لوحة الطفل ولوحة الأهل
   ============================================================ */
/* لوحة الطفل */
.kid-hub { margin: var(--sp-2) 0 var(--sp-5); }
.kh-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: var(--sp-3); }
.kh-head h2 { font-size: var(--fs-xl); }
.kh-streak { background: var(--surface); border: 1px solid var(--border); border-radius: var(--rad-pill); padding: 4px 12px; font-weight: var(--fw-bold); box-shadow: var(--sh-1); }
.kh-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: var(--sp-2); }
.kh-tile { --c: var(--sea); display: grid; justify-items: center; align-content: center; gap: 2px; min-height: 96px; padding: var(--sp-2) var(--sp-1); border-radius: var(--rad-lg); border: 0; color: var(--ink);
  background: linear-gradient(160deg, color-mix(in srgb, var(--c) 22%, var(--surface)), color-mix(in srgb, var(--c) 8%, var(--surface))); box-shadow: var(--sh-1), inset 0 0 0 1px color-mix(in srgb, var(--c) 25%, transparent);
  transition: transform var(--dur-fast) var(--ease-out), box-shadow var(--dur-med); cursor: pointer; font: inherit; }
.kh-tile:active { transform: scale(.95); }
@media (hover: hover) { .kh-tile:hover { transform: translateY(-2px); box-shadow: var(--sh-2), inset 0 0 0 1px color-mix(in srgb, var(--c) 35%, transparent); } }
.kh-ic { font-size: 30px; line-height: 1; filter: drop-shadow(0 2px 3px rgba(0, 0, 0, .12)); }
.kh-tile b { font-size: var(--fs-sm); line-height: 1.2; }
.kh-tile small { font-size: var(--fs-xs); color: var(--muted); font-weight: var(--fw-bold); }
.kh-learn { --c: #8B5CF6; } .kh-stories { --c: var(--berry); } .kh-games { --c: #E07A2E; } .kh-ach { --c: #EAB308; } .kh-fav { --c: #EC4899; }
@media (max-width: 380px) { .kh-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

/* شيتات الإنجازات والمفضّلة */
.dash-sheet { display: grid; gap: var(--sp-4); }
.dash-sheet h3 { font-size: var(--fs-xl); }
.ach-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--sp-2); }
.ach-stats div, .kpi { background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--rad-md); padding: var(--sp-3) var(--sp-2); display: grid; justify-items: center; gap: 2px; text-align: center; }
.ach-stats b, .kpi b { font-size: var(--fs-xl); line-height: 1.1; }
.ach-stats small, .kpi small { font-size: var(--fs-xs); color: var(--muted); }
.badge-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--sp-2); }
.badge { display: grid; justify-items: center; gap: 4px; padding: var(--sp-3) var(--sp-1); border-radius: var(--rad-md); background: var(--surface-2); opacity: .55; filter: grayscale(.8); text-align: center; }
.badge span { font-size: 30px; }
.badge small { font-size: var(--fs-xs); font-weight: var(--fw-med); }
.badge.ok { opacity: 1; filter: none; background: color-mix(in srgb, #EAB308 16%, var(--surface)); box-shadow: inset 0 0 0 1px color-mix(in srgb, #EAB308 40%, transparent); animation: ds-pop var(--dur-slow) var(--ease-spring) both; }
.fav-list { display: grid; gap: var(--sp-2); max-height: 50vh; overflow: auto; }
.fav-row { display: flex; align-items: center; gap: var(--sp-2); background: var(--surface-2); border-radius: var(--rad-md); padding: var(--sp-1); }
.fav-open { flex: 1; display: flex; align-items: center; gap: var(--sp-3); background: none; border: 0; font: inherit; color: var(--ink); text-align: start; padding: var(--sp-2); cursor: pointer; min-height: 44px; }
.fav-open span { font-size: 24px; }
.fav-x { width: 40px; height: 40px; border-radius: var(--rad-sm); border: 0; background: transparent; color: var(--muted); font-size: 16px; cursor: pointer; flex: none; }
.fav-x:hover, .fav-x.warn { color: var(--bad); background: var(--bad-bg); width: auto; padding: 0 var(--sp-2); }

/* قلب المفضّلة على الكروت */
.fav-btn { position: absolute; top: 6px; inset-inline-end: 6px; z-index: 3; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font-size: 15px; line-height: 1;
  background: color-mix(in srgb, var(--paper) 85%, transparent); box-shadow: var(--sh-1); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); cursor: pointer; transition: transform var(--dur-fast) var(--ease-spring); }
.fav-btn.pop { transform: scale(1.35); }
.fav-btn:focus-visible { outline-offset: 1px; }

/* لوحة الأهل */
.pdash { display: grid; gap: var(--sp-4); }
.pd-head h3 { font-size: var(--fs-lg); }
.pd-tabs { display: flex; overflow-x: auto; scrollbar-width: none; }
.pd-tabs button { flex: 1 0 auto; white-space: nowrap; padding-inline: var(--sp-3); }
.pd-body { display: grid; gap: var(--sp-4); animation: ds-enter var(--dur-med) var(--ease-out); }
.pd-body h4 { font-size: var(--fs-md); margin-top: var(--sp-1); }
.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--sp-2); }
.kpi span { font-size: 20px; }
@media (max-width: 420px) { .kpis, .ach-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.pd-note { background: color-mix(in srgb, var(--leaf) 9%, var(--surface)); border: 1px solid color-mix(in srgb, var(--leaf) 25%, transparent); border-radius: var(--rad-md); padding: var(--sp-3) var(--sp-4); }
.pd-note ul { margin: var(--sp-2) 0 0; padding-inline-start: var(--sp-5); display: grid; gap: var(--sp-1); }
.bars { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: var(--sp-2); align-items: end; height: 170px; padding: var(--sp-2) 0; }
.bar { display: grid; grid-template-rows: 1fr auto auto; justify-items: center; height: 100%; gap: 2px; }
.bar i { align-self: end; width: 70%; max-width: 34px; border-radius: var(--rad-sm) var(--rad-sm) 4px 4px; background: linear-gradient(180deg, var(--leaf), color-mix(in srgb, var(--leaf) 60%, var(--sea))); transition: height var(--dur-slow) var(--ease-out); }
.bar b { font-size: var(--fs-xs); } .bar small { font-size: 11px; color: var(--muted); }
.split { display: grid; gap: var(--sp-2); }
.split-row { display: grid; grid-template-columns: 6.5em 1fr 3em; align-items: center; gap: var(--sp-2); font-size: var(--fs-sm); }
.split-bar { height: 10px; border-radius: var(--rad-pill); background: var(--surface-2); overflow: hidden; border: 1px solid var(--border); }
.split-bar i { display: block; height: 100%; border-radius: inherit; background: var(--sea); }
.pg-sum { display: grid; gap: var(--sp-2); }
.pg-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(52px, 1fr)); gap: var(--sp-2); }
.pg-cell { display: grid; justify-items: center; gap: 2px; padding: var(--sp-2) 2px; border-radius: var(--rad-sm); background: var(--surface-2); border: 1px solid var(--border); }
.pg-cell small { font-size: 10px; letter-spacing: -2px; }
.pg-cell.done { background: color-mix(in srgb, var(--leaf) 14%, var(--surface)); border-color: color-mix(in srgb, var(--leaf) 35%, transparent); }
.kid-list { display: grid; gap: var(--sp-2); }
.kid-row { display: flex; align-items: center; gap: var(--sp-3); padding: var(--sp-2) var(--sp-3); border-radius: var(--rad-md); background: var(--surface-2); border: 1px solid var(--border); }
.kid-row > div { flex: 1; display: grid; } .kid-row small { color: var(--muted); font-size: var(--fs-xs); }
.kid-row.on { border-color: var(--leaf); box-shadow: 0 0 0 3px color-mix(in srgb, var(--leaf) 15%, transparent); }
.kid-av { font-size: 28px; }
.kid-add .row2 { grid-template-columns: 2fr 1fr; }
.cc-list { display: grid; gap: var(--sp-1); }
.cc-row { display: flex; align-items: center; gap: var(--sp-3); padding: var(--sp-2) var(--sp-3); border-radius: var(--rad-md); min-height: 52px; cursor: pointer; }
.cc-row:hover { background: var(--surface-2); }
.cc-row b { flex: 1; font-weight: var(--fw-med); } .cc-row > span { font-size: 22px; }
.switch { appearance: none; -webkit-appearance: none; width: 48px; height: 28px; border-radius: var(--rad-pill); background: var(--line); position: relative; cursor: pointer; transition: background var(--dur-med); flex: none; margin: 0; }
.switch::after { content: ""; position: absolute; top: 3px; inset-inline-start: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; box-shadow: var(--sh-1); transition: transform var(--dur-med) var(--ease-spring); }
.switch:checked { background: var(--leaf); }
.switch:checked::after { transform: translateX(20px); }
[dir="rtl"] .switch:checked::after { transform: translateX(-20px); }
.seg { display: flex; flex-wrap: wrap; gap: var(--sp-2); }
.seg button { min-height: 40px; padding: 0 var(--sp-4); border-radius: var(--rad-pill); border: 1px solid var(--border); background: var(--surface); font: inherit; font-weight: var(--fw-med); color: var(--ink); cursor: pointer; }
.seg button.on { background: var(--leaf); border-color: var(--leaf); color: #fff; }

/* قفل الوقت */
.time-lock { position: fixed; inset: 0; z-index: 200; display: grid; place-items: center; background: color-mix(in srgb, var(--paper) 92%, transparent); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); animation: ds-fade var(--dur-slow); }

/* إخفاء الأقسام حسب تحكّم الأهل */
.cc-no-games [data-tab-go="secGames"], .cc-no-learn [data-tab-go="secLearnPg"], .cc-no-quran [data-tab-go="secQuran"],
.cc-no-tales #secTales, .cc-no-tales [data-tale], .cc-no-painter [data-tool="painter"], .cc-no-painter [data-painter], .cc-no-painter .lp-painter,
.cc-no-helper .hb-fab { display: none !important; }
.cc-no-games .tabbar, .cc-no-learn .tabbar, .cc-no-quran .tabbar { grid-template-columns: repeat(auto-fit, minmax(0, 1fr)) !important; }
.badge { opacity: 1; filter: none; color: var(--ink); }
.badge span { filter: grayscale(1); opacity: .45; }
.badge small { color: var(--muted); }
.badge.ok span { filter: none; opacity: 1; }
.badge.ok small { color: var(--ink); font-weight: var(--fw-bold); }
main.parent > *, .pdash, .pd-body, .pd-body > * { min-width: 0; max-width: 100%; }
.pd-tabs { max-width: 100%; }
.pd-tabs { display: grid !important; grid-template-columns: repeat(5, minmax(0, 1fr)); overflow: visible; }
.pd-tabs button { padding-inline: 2px; font-size: var(--fs-xs); white-space: normal; line-height: 1.2; }
@media (min-width: 480px) { .pd-tabs button { font-size: var(--fs-sm); } }
.cur-pick { margin-bottom: var(--sp-3); }
.cur-pick button { flex: 1; }
.cp-group { display: grid; gap: var(--sp-1); padding: var(--sp-3); border: 1px solid var(--border); border-radius: var(--rad-md); margin-bottom: var(--sp-2); }
.cp-group h4 { font-size: var(--fs-md); }
.ctl-game { min-width: 0; }
.ctl-game span { min-width: 0; overflow-wrap: break-word; hyphens: auto; line-height: 1.3; font-size: var(--fs-sm); }

/* كارت المشترك في الأدمن */
.u-row { cursor: pointer; }
.u-row:focus-visible { outline: 3px solid var(--focus); outline-offset: -3px; }
.uc { display: grid; gap: var(--sp-3); max-height: 82vh; overflow: auto; }
.uc h4 { font-size: var(--fs-md); margin-top: var(--sp-2); }
.uc-head h3 { font-size: var(--fs-xl); }
.uc-fb { padding: var(--sp-3); border-radius: var(--rad-md); background: var(--surface-2); border: 1px solid var(--border); display: grid; gap: var(--sp-2); }
.uc-fb-h { display: flex; justify-content: space-between; align-items: center; gap: var(--sp-2); font-size: var(--fs-sm); }
.uc-stars { color: #EAB308; letter-spacing: 1px; } .uc-stars i { color: var(--line); font-style: normal; }
.uc-tags { display: flex; flex-wrap: wrap; gap: var(--sp-1); }
.uc-c { margin: 0; font-size: var(--fs-sm); white-space: pre-wrap; }

/* كتابة الحروف: شريط التقدّم وأزرار السابق/التالي */
.tr-prog { display: flex; align-items: center; gap: var(--sp-2); padding: 0 var(--sp-2); }
.tr-bar { flex: 1; height: 10px; border-radius: var(--rad-pill); background: var(--surface-2); border: 1px solid var(--border); overflow: hidden; }
.tr-bar i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--leaf), var(--sea)); transition: width var(--dur-slow) var(--ease-out); }
[dir="rtl"] .tr-bar i { margin-inline-start: 0; }
.tr-prog small { font-weight: var(--fw-bold); font-size: var(--fs-sm); min-width: 3.5em; text-align: center; }
.tr-stage { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: var(--sp-1); flex: 1; min-height: 0; }
.tr-stage .tr-wrap { min-width: 0; }
.tr-nav { width: 44px; height: 64px; font-size: 32px; font-weight: 700; line-height: 1; border-radius: var(--rad-md); }
.tr-nav[disabled] { opacity: .3; pointer-events: none; }
.tr-stage .tr-wrap { width: 100%; max-width: 520px; justify-self: center; }
.tr-prog, .tr-stage { width: 100%; max-width: 640px; margin-inline: auto; }

/* ============================================================
   أكاديمية التعلّم
   ============================================================ */
.acad-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: var(--sp-3); }
.acad-tile { --c: var(--leaf); display: grid; gap: 4px; justify-items: start; text-align: start; padding: var(--sp-4); border-radius: var(--rad-lg); border: 0; font: inherit; color: var(--ink); cursor: pointer;
  background: linear-gradient(150deg, color-mix(in srgb, var(--c) 22%, var(--surface)), var(--surface)); box-shadow: var(--sh-1), inset 0 0 0 1px color-mix(in srgb, var(--c) 28%, transparent); }
.acad-tile:active { transform: scale(.97); }
.at-ic { font-size: 34px; line-height: 1; }
.acad-tile b { font-size: var(--fs-md); } .acad-tile small { color: var(--muted); font-size: var(--fs-xs); font-weight: var(--fw-bold); }
.at-bar { display: block; width: 100%; height: 6px; border-radius: var(--rad-pill); background: color-mix(in srgb, var(--c) 15%, var(--surface-2)); overflow: hidden; }
.at-bar i { display: block; height: 100%; background: var(--c); border-radius: inherit; }

body.acad-open { overflow: hidden; }
.acad { position: fixed; inset: 0; z-index: 120; background: var(--sky, var(--paper)); overflow-y: auto; -webkit-overflow-scrolling: touch; animation: ds-fade var(--dur-med); }
.acad-top { position: sticky; top: 0; z-index: 2; display: flex; align-items: center; gap: var(--sp-2); padding: calc(var(--sp-2) + env(safe-area-inset-top, 0px)) var(--sp-3) var(--sp-2);
  background: color-mix(in srgb, var(--paper) 86%, transparent); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); box-shadow: 0 1px 0 var(--border); }
.acad-top h2 { flex: 1; font-size: var(--fs-lg); margin: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.acad-back { width: 44px; height: 44px; border-radius: var(--rad-md); border: 1px solid var(--border); background: var(--surface); display: grid; place-items: center; cursor: pointer; color: var(--ink); }
[dir="ltr"] .acad-back svg { transform: scaleX(-1); }
.acad-body { max-width: 760px; margin: 0 auto; padding: var(--sp-4) var(--sp-4) calc(var(--sp-10) + env(safe-area-inset-bottom, 0px)); display: grid; gap: var(--sp-4); }
.acad-h { font-size: var(--fs-lg); margin: var(--sp-2) 0 0; }
.acad-hero { --c: var(--leaf); display: flex; align-items: center; justify-content: space-between; gap: var(--sp-3); padding: var(--sp-5); border-radius: var(--rad-xl);
  background: linear-gradient(140deg, color-mix(in srgb, var(--c) 30%, var(--surface)), color-mix(in srgb, var(--c) 8%, var(--surface))); box-shadow: var(--sh-2); }
.acad-hero b { font-size: var(--fs-xl); display: block; } .acad-hero p { margin: 4px 0 0; color: var(--muted); font-size: var(--fs-sm); }
.acad-hero.sm { padding: var(--sp-4); } .acad-hero.sm b { font-size: var(--fs-lg); }
.acad-ring { --p: 0; width: 72px; height: 72px; flex: none; border-radius: 50%; display: grid; place-items: center; background: conic-gradient(var(--c) calc(var(--p) * 1%), color-mix(in srgb, var(--c) 15%, var(--surface)) 0); }
.acad-ring span { width: 56px; height: 56px; border-radius: 50%; background: var(--surface); display: grid; place-items: center; font-weight: var(--fw-bold); font-size: var(--fs-sm); }
.acad-units { display: grid; gap: var(--sp-2); }
.acad-unit { --c: var(--leaf); display: flex; align-items: center; gap: var(--sp-3); padding: var(--sp-3) var(--sp-4); min-height: 68px; border-radius: var(--rad-lg); border: 1px solid var(--border); background: var(--surface); font: inherit; color: var(--ink); text-align: start; cursor: pointer; box-shadow: var(--sh-1); }
.acad-unit:active { transform: scale(.98); }
.acad-unit.done { border-color: color-mix(in srgb, var(--c) 45%, transparent); }
.au-ic { width: 46px; height: 46px; border-radius: var(--rad-md); display: grid; place-items: center; font-size: 24px; background: color-mix(in srgb, var(--c) 16%, var(--surface)); flex: none; }
.au-t { flex: 1; display: grid; min-width: 0; } .au-t small { color: var(--muted); font-size: var(--fs-xs); }
.acad-stars i { color: var(--line); font-style: normal; font-size: 18px; } .acad-stars i.on { color: #EAB308; }
.acad-actions { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: var(--sp-3); }
.acad-act { display: grid; gap: 4px; justify-items: center; text-align: center; padding: var(--sp-5) var(--sp-3); border-radius: var(--rad-lg); border: 1px solid var(--border); background: var(--surface); font: inherit; color: var(--ink); cursor: pointer; box-shadow: var(--sh-1); }
.acad-act span { font-size: 34px; } .acad-act small { color: var(--muted); font-size: var(--fs-xs); }
.acad-slides-host { min-height: 360px; }
.acad-slide { display: grid; justify-items: center; align-content: center; gap: var(--sp-3); text-align: center; padding: var(--sp-5) var(--sp-4); min-height: 340px; border-radius: var(--rad-xl); background: var(--surface); box-shadow: var(--sh-2); cursor: pointer; }
.acad-slide h3 { font-size: var(--fs-2xl); margin: 0; } .acad-slide p { color: var(--muted); margin: 0; max-width: 36ch; }
.as-art { display: grid; justify-items: center; gap: var(--sp-2); }
.acad-hint { text-align: center; color: var(--muted); font-size: var(--fs-sm); margin: 0; }
.acad-qbar { display: flex; align-items: center; gap: var(--sp-3); }
.acad-prog { flex: 1; height: 10px; border-radius: var(--rad-pill); background: var(--surface-2); border: 1px solid var(--border); overflow: hidden; }
.acad-prog i { display: block; height: 100%; background: linear-gradient(90deg, var(--leaf), var(--sea)); border-radius: inherit; transition: width var(--dur-slow) var(--ease-out); }
.acad-qbar small { font-weight: var(--fw-bold); white-space: nowrap; }
.acad-q { position: relative; display: grid; justify-items: center; gap: var(--sp-3); padding: var(--sp-5) var(--sp-4); border-radius: var(--rad-xl); background: var(--surface); box-shadow: var(--sh-2); text-align: center; }
.aq-t { font-size: clamp(1.6rem, 7vw, 2.4rem); margin: 0; direction: ltr; unicode-bidi: plaintext; }
.acad-say { position: absolute; top: var(--sp-2); inset-inline-end: var(--sp-2); width: 44px; height: 44px; border-radius: 50%; border: 0; background: var(--surface-2); font-size: 20px; cursor: pointer; }
.acad-choices { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--sp-3); }
.acad-ch { min-height: 72px; border-radius: var(--rad-lg); border: 2px solid var(--border); background: var(--surface); font: inherit; font-size: var(--fs-xl); font-weight: var(--fw-bold); color: var(--ink); cursor: pointer; box-shadow: var(--sh-1); transition: transform var(--dur-fast), background var(--dur-med), border-color var(--dur-med); display: grid; place-items: center; }
.acad-ch:active { transform: scale(.96); }
.acad-ch.ok { background: var(--good-bg); border-color: var(--leaf); animation: ds-pop var(--dur-slow) var(--ease-spring); }
.acad-ch.bad { background: var(--bad-bg); border-color: var(--bad); animation: ds-shake var(--dur-slow); }
.acad-explain { text-align: center; font-size: var(--fs-lg); background: color-mix(in srgb, var(--sea) 10%, var(--surface)); border-radius: var(--rad-md); padding: var(--sp-3); margin: 0; }
.acad-result { display: grid; justify-items: center; gap: var(--sp-3); text-align: center; padding: var(--sp-8) var(--sp-4); }
.acad-result .acad-stars i { font-size: 36px; }
.ar-big { font-size: 72px; animation: ds-pop var(--dur-slow) var(--ease-spring); }
.acad-result .row2 { width: 100%; max-width: 360px; }

/* محتوى الرياضيات */
.mx-objs { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; max-width: 320px; font-size: 30px; line-height: 1; }
.mx-objs i { font-style: normal; animation: ds-pop var(--dur-slow) var(--ease-spring) both; }
.mx-objs i:nth-child(n+2) { animation-delay: 40ms; } .mx-objs i:nth-child(n+5) { animation-delay: 90ms; }
.mx-objs i.gone { opacity: .25; text-decoration: line-through; filter: grayscale(1); }
.mx-objs.in { font-size: 20px; gap: 3px; max-width: 120px; }
.mx-num { font-size: 96px; font-weight: 800; line-height: 1; color: var(--sea); }
.mx-eq { display: flex; align-items: center; justify-content: center; gap: var(--sp-3); flex-wrap: wrap; } .mx-eq > b { font-size: 36px; }
.mx-groups { display: flex; flex-wrap: wrap; gap: var(--sp-2); justify-content: center; max-width: 360px; }
.mx-grp { padding: 6px; border-radius: var(--rad-md); border: 2px dashed color-mix(in srgb, var(--leaf) 50%, transparent); }
.mx-big { font-size: clamp(2rem, 9vw, 3rem); font-weight: 800; direction: ltr; } .mx-big b { color: var(--leaf); }
.mx-frac { display: inline-grid; justify-items: center; line-height: 1.05; font-weight: 800; vertical-align: middle; }
.mx-frac i { display: block; width: 1.3em; height: 3px; background: currentColor; border-radius: 2px; margin: 2px 0; }
.mx-pie { filter: drop-shadow(0 4px 8px rgba(0, 0, 0, .1)); }

/* جدول الضرب */
.tt-quick { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: var(--sp-2); }
.tt-q { display: grid; gap: 2px; justify-items: center; text-align: center; padding: var(--sp-3); border-radius: var(--rad-lg); border: 1px solid var(--border); background: var(--surface); font: inherit; font-size: 26px; color: var(--ink); cursor: pointer; box-shadow: var(--sh-1); }
.tt-q b { font-size: var(--fs-sm); } .tt-q small { font-size: var(--fs-xs); color: var(--muted); font-weight: var(--fw-bold); }
.tt-q.done { border-color: var(--leaf); background: var(--good-bg); }
.tt-n { font-size: 20px; font-weight: 800; }
.tt-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; width: 100%; max-width: 420px; direction: ltr; }
.tt-row { display: flex; justify-content: space-between; padding: 8px 12px; border-radius: var(--rad-sm); border: 1px solid var(--border); background: var(--surface-2); font: inherit; font-size: var(--fs-md); color: var(--ink); cursor: pointer; }
.tt-row b { color: var(--leaf); } .tt-row.said { background: var(--good-bg); }
.tt-grid-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; border-radius: var(--rad-md); }
.tt-grid { display: grid; grid-template-columns: repeat(13, minmax(30px, 1fr)); gap: 2px; min-width: 420px; font-size: 13px; }
.tt-grid span, .tt-grid .cell { display: grid; place-items: center; height: 32px; border-radius: 6px; }
.tt-grid span { font-weight: 800; background: color-mix(in srgb, #8B5CF6 18%, var(--surface)); }
.tt-grid .cell { border: 0; background: var(--surface); font: inherit; color: var(--ink); cursor: pointer; }
.tt-grid .cell.hl { background: color-mix(in srgb, #8B5CF6 14%, var(--surface)); }
.tt-grid .cell.on { background: #8B5CF6; color: #fff; font-weight: 800; transform: scale(1.12); }
.tt-fact { text-align: center; font-size: clamp(1.8rem, 8vw, 2.6rem); font-weight: 800; direction: ltr; min-height: 1.4em; } .tt-fact b { color: #8B5CF6; }
.tt-card { position: relative; display: grid; place-items: center; min-height: 240px; border-radius: var(--rad-xl); border: 0; background: linear-gradient(150deg, color-mix(in srgb, #8B5CF6 25%, var(--surface)), var(--surface)); box-shadow: var(--sh-3); font: inherit; color: var(--ink); cursor: pointer; direction: ltr; }
.tt-card .front, .tt-card .backf { font-size: clamp(2.6rem, 14vw, 4rem); font-weight: 800; }
.tt-card .backf { display: none; color: #8B5CF6; }
.tt-card.flip .front { font-size: 1.6rem; opacity: .6; } .tt-card.flip .backf { display: block; animation: ds-pop var(--dur-slow) var(--ease-spring); }
.tt-card small { position: absolute; bottom: var(--sp-3); color: var(--muted); font-size: var(--fs-xs); }
.acad-body > * { min-width: 0; }
.acad-slides-host { width: 100%; overflow: hidden; }
.tt-grid-wrap { direction: ltr; }

/* مشاهد متحركة */
.acad-scene { position: relative; width: 100%; max-width: 420px; height: 220px; border-radius: var(--rad-xl); overflow: hidden; background: var(--bg); box-shadow: inset 0 -30px 60px rgba(0, 0, 0, .12), var(--sh-2); }
.sc-it { position: absolute; transform: translate(-50%, -50%); line-height: 1; filter: drop-shadow(0 6px 8px rgba(0, 0, 0, .18)); }
.sc-it.float { animation: sc-float 3.6s ease-in-out infinite; }
.sc-it.sway { animation: sc-sway 4s ease-in-out infinite; transform-origin: 50% 100%; }
.sc-it.spin { animation: sc-spin 9s linear infinite; }
.sc-it.pulse { animation: sc-pulse 2.2s ease-in-out infinite; }
.sc-it.drift { animation: sc-drift 14s linear infinite; }
.sc-it.rain { animation: sc-rain 1.4s linear infinite; }
.sc-it.wave { animation: sc-wave 3s ease-in-out infinite; }
.sc-it.glow { animation: sc-glow 2.6s ease-in-out infinite; }
.sc-it.fall { animation: sc-fall 2.4s cubic-bezier(.55, 0, 1, .45) infinite; }
.sc-it.roll { animation: sc-roll 5s linear infinite; }
@keyframes sc-float { 50% { transform: translate(-50%, calc(-50% - 10px)); } }
@keyframes sc-sway { 0%, 100% { transform: translate(-50%, -50%) rotate(-5deg); } 50% { transform: translate(-50%, -50%) rotate(5deg); } }
@keyframes sc-spin { to { transform: translate(-50%, -50%) rotate(360deg); } }
@keyframes sc-pulse { 50% { transform: translate(-50%, -50%) scale(1.15); } }
@keyframes sc-drift { from { transform: translate(-150%, -50%); } to { transform: translate(450%, -50%); } }
@keyframes sc-rain { from { transform: translate(-50%, -120%); opacity: 0; } 20% { opacity: 1; } to { transform: translate(-50%, 260%); opacity: 0; } }
@keyframes sc-wave { 50% { transform: translate(calc(-50% + 8px), calc(-50% + 4px)) rotate(3deg); } }
@keyframes sc-glow { 50% { filter: drop-shadow(0 0 18px rgba(255, 220, 120, .95)); transform: translate(-50%, -50%) scale(1.08); } }
@keyframes sc-fall { from { transform: translate(-50%, -260%); } 85% { transform: translate(-50%, 120%); } to { transform: translate(-50%, 110%); } }
@keyframes sc-roll { from { transform: translate(-250%, -50%) rotate(0); } to { transform: translate(500%, -50%) rotate(720deg); } }
@media (prefers-reduced-motion: reduce) { .sc-it { animation: none !important; } }

/* ============================================================ أكاديمية: العلوم والعالم والكتابة والقصص ============================================================ */
.acad-body .row3 { display: grid; grid-template-columns: 1fr auto 1fr; gap: var(--sp-2); width: 100%; max-width: 560px; }
.exp-box { display: grid; gap: var(--sp-3); justify-items: center; width: 100%; max-width: 520px; margin-inline: auto; }
.exp-note { min-height: 3em; text-align: center; font-weight: var(--fw-bold); color: var(--ink); line-height: 1.7; }
.exp-stage { position: relative; width: 100%; height: 260px; border-radius: var(--rad-xl); background: linear-gradient(180deg, #BFE6FF, #EAF7FF); overflow: hidden; box-shadow: var(--sh-2); transition: background .4s; }
.exp-stage.vac { background: linear-gradient(180deg, #0B1A3A, #312E81); }
.ex-ground { position: absolute; inset-inline: 0; bottom: 0; height: 26px; background: linear-gradient(#86C16A, #5E9C45); }
.ex-obj { position: absolute; top: 14px; font-size: 44px; transform: translateX(-50%); }
.ex-obj.ball { inset-inline-start: 32%; } .ex-obj.feather { inset-inline-start: 68%; }
.exp-stage.go .ex-obj { animation: ex-fall 1.1s cubic-bezier(.55, 0, 1, .45) forwards; }
.exp-stage.go.air .ex-obj.feather { animation: ex-float 3.4s ease-in-out forwards; }
@keyframes ex-fall { to { top: calc(100% - 72px); } }
@keyframes ex-float { 0% { top: 14px; } 20% { top: 50px; transform: translateX(-30%) rotate(20deg); } 45% { top: 100px; transform: translateX(-70%) rotate(-20deg); } 70% { top: 150px; transform: translateX(-30%) rotate(15deg); } 100% { top: calc(100% - 72px); transform: translateX(-50%); } }
.exp-track { position: relative; width: 100%; display: grid; gap: 8px; padding: 12px; border-radius: var(--rad-lg); background: #475569; }
.exp-track .lane { position: relative; height: 48px; border-bottom: 2px dashed rgba(255, 255, 255, .5); }
.exp-track .car { position: absolute; inset-inline-start: 0; top: 4px; font-size: 36px; transform: scaleX(-1); }
[dir=ltr] .exp-track .car { transform: none; }
.exp-track .finish { position: absolute; inset-inline-end: 8px; top: 50%; transform: translateY(-50%); font-size: 30px; }
.exp-sl { display: grid; grid-template-columns: 1fr 2fr auto; align-items: center; gap: 8px; width: 100%; font-weight: var(--fw-med); }
.exp-sl input { width: 100%; accent-color: var(--leaf); } .exp-sl b { min-width: 2ch; text-align: center; }
.exp-prism { position: relative; width: 100%; height: 220px; border-radius: var(--rad-xl); background: #0F172A; overflow: hidden; direction: ltr; }
.exp-prism .beam { position: absolute; left: 0; top: 50%; width: 0; height: 6px; background: #fff; box-shadow: 0 0 12px #fff; transform: translateY(-50%); transition: width .6s; }
.exp-prism .prism { position: absolute; left: 42%; top: 50%; width: 0; height: 0; border-left: 50px solid transparent; border-right: 50px solid transparent; border-bottom: 86px solid rgba(186, 230, 253, .55); transform: translateY(-50%); filter: drop-shadow(0 0 10px rgba(186, 230, 253, .6)); }
.exp-prism .rainbow { position: absolute; left: 58%; top: 50%; width: 40%; display: grid; transform: translateY(-50%) scaleX(0); transform-origin: left; transition: transform .7s .5s; }
.exp-prism .rainbow i { height: 10px; } .exp-prism .rainbow i:nth-child(1) { background: #EF4444; } .exp-prism .rainbow i:nth-child(2) { background: #F97316; } .exp-prism .rainbow i:nth-child(3) { background: #FACC15; } .exp-prism .rainbow i:nth-child(4) { background: #22C55E; } .exp-prism .rainbow i:nth-child(5) { background: #3B82F6; } .exp-prism .rainbow i:nth-child(6) { background: #4F46E5; } .exp-prism .rainbow i:nth-child(7) { background: #A855F7; }
.exp-prism.on .beam { width: 46%; } .exp-prism.on .rainbow { transform: translateY(-50%) scaleX(1); }
.exp-wave { width: 100%; height: 140px; border-radius: var(--rad-lg); background: #0F172A; padding: 10px; }
.exp-wave svg { width: 100%; height: 100%; } .exp-wave path { fill: none; stroke: #38BDF8; stroke-width: 3; transition: d .3s; }
.plate { width: 210px; height: 210px; border-radius: 50%; background: radial-gradient(circle, #fff 55%, #E2E8F0 56%, #fff 70%); box-shadow: var(--sh-2); display: grid; place-items: center; }
.plate-in { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px; max-width: 130px; font-size: 34px; }
.plate-in span { animation: ds-pop .35s ease; }
.food-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; width: 100%; }
.food { font-size: 34px; padding: 8px; border-radius: var(--rad-md); border: 1px solid var(--border); background: var(--surface); cursor: pointer; }
.food:disabled { opacity: .3; } .food.no { animation: ds-shake .4s; background: var(--bad-bg, #FEE2E2); }
.pot { position: relative; width: 220px; height: 230px; display: grid; justify-items: center; align-content: end; }
.pot .soil { width: 150px; height: 70px; border-radius: 0 0 40px 40px; background: linear-gradient(#B45309, #7C2D12); box-shadow: var(--sh-2); }
.pot .grow { font-size: 40px; transition: font-size .5s; margin-bottom: -8px; animation: st-sway 3s ease-in-out infinite; transform-origin: bottom; }
.body-map { position: relative; width: 200px; height: 340px; }
.body-map .silh { position: absolute; inset: 0; margin: auto; width: 120px; height: 330px; border-radius: 60px 60px 30px 30px; background: linear-gradient(180deg, #FBCFE8, #F9A8D4); opacity: .55; }
.body-map .silh::before { content: ''; position: absolute; top: -6px; left: 50%; width: 80px; height: 80px; border-radius: 50%; background: inherit; transform: translateX(-50%); }
.bp { position: absolute; left: 50%; transform: translate(-50%, -50%); font-size: 34px; width: 54px; height: 54px; border-radius: 50%; border: 2px solid transparent; background: rgba(255, 255, 255, .7); cursor: pointer; transition: transform .2s; }
.bp.on { border-color: var(--leaf); transform: translate(-50%, -50%) scale(1.2); box-shadow: 0 0 0 6px rgba(22, 163, 74, .18); }

/* العالم */
.wf { width: 44px; height: 30px; object-fit: cover; border-radius: 4px; box-shadow: 0 1px 3px rgba(0, 0, 0, .25); background: #E2E8F0; vertical-align: middle; }
.wf.big { width: 150px; height: 100px; border-radius: 8px; } .wf.hero { width: 200px; height: 134px; border-radius: 10px; box-shadow: var(--sh-2); } .wf.ch { width: 96px; height: 64px; }
.wf-e { font-size: 30px; line-height: 1; }
.wq-art { display: grid; place-items: center; padding: 8px; }
.w-tools { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: var(--sp-2); }
.w-tool { display: grid; gap: 2px; justify-items: center; text-align: center; padding: var(--sp-3); border-radius: var(--rad-lg); border: 1px solid var(--border); background: var(--surface); font: inherit; font-size: 26px; color: var(--ink); cursor: pointer; box-shadow: var(--sh-1); }
.w-tool b { font-size: var(--fs-sm); } .w-tool small { font-size: var(--fs-xs); color: var(--muted); font-weight: var(--fw-bold); }
.w-search { width: 100%; min-height: 48px; padding: 0 var(--sp-4); border-radius: var(--rad-pill); border: 1px solid var(--border); background: var(--surface); font: inherit; font-size: var(--fs-md); color: var(--ink); }
.w-conts { overflow-x: auto; flex-wrap: nowrap; padding-bottom: 4px; } .w-conts button { white-space: nowrap; }
.w-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 6px; }
.w-row { display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; column-gap: 10px; align-items: center; text-align: start; padding: 8px 12px; border-radius: var(--rad-md); border: 1px solid var(--border); background: var(--surface); font: inherit; color: var(--ink); cursor: pointer; }
.w-row .wf, .w-row .wf-e { grid-row: span 2; } .w-row b { font-size: var(--fs-sm); } .w-row small { color: var(--muted); font-size: var(--fs-xs); }
.w-row.seen { border-color: var(--leaf); }
.w-card { display: grid; gap: var(--sp-3); justify-items: center; text-align: center; padding: var(--sp-5); border-radius: var(--rad-xl); background: linear-gradient(160deg, color-mix(in srgb, var(--c) 14%, #fff), var(--surface)); border: 1px solid color-mix(in srgb, var(--c) 30%, transparent); width: 100%; max-width: 440px; margin-inline: auto; }
.w-card dl { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; width: 100%; margin: 0; }
.w-card dl div { padding: 10px; border-radius: var(--rad-md); background: var(--surface); } .w-card dt { font-size: var(--fs-xs); color: var(--muted); } .w-card dd { margin: 4px 0 0; font-weight: 800; font-size: var(--fs-md); }
.w-fact { padding: 10px 14px; border-radius: var(--rad-md); background: #FEF9C3; color: #713F12; font-weight: var(--fw-med); line-height: 1.7; }
.w-slide { display: grid; place-items: center; height: 200px; border-radius: var(--rad-xl); background: radial-gradient(circle, color-mix(in srgb, var(--c) 22%, #fff), color-mix(in srgb, var(--c) 6%, #fff)); }
.flag-strip { display: flex; gap: 10px; overflow: hidden; padding: 6px 0; mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); direction: ltr; }
.flag-strip .wf { flex: none; animation: w-marq 22s linear infinite; }
@keyframes w-marq { to { transform: translateX(-540px); } }
.mem-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; width: 100%; max-width: 520px; margin-inline: auto; }
.mem { position: relative; aspect-ratio: 1; border: 0; padding: 0; background: none; perspective: 600px; cursor: pointer; font: inherit; }
.mem span { position: absolute; inset: 0; display: grid; place-items: center; border-radius: var(--rad-md); backface-visibility: hidden; transition: transform .4s; box-shadow: var(--sh-1); padding: 4px; }
.mem .mf { background: linear-gradient(135deg, #6366F1, #22D3EE); color: #fff; font-size: 26px; }
.mem .mb { background: var(--surface); transform: rotateY(180deg); font-size: 12px; line-height: 1.3; text-align: center; } .mem .mb .wf { width: 90%; height: auto; aspect-ratio: 3/2; }
.mem.up .mf { transform: rotateY(180deg); } .mem.up .mb { transform: rotateY(360deg); }
.mem.ok .mb { outline: 3px solid var(--leaf); }

/* الكتابة والخط */
.wb { position: relative; width: fit-content; margin-inline: auto; border-radius: var(--rad-lg); background: repeating-linear-gradient(0deg, #FFFDF5, #FFFDF5 31px, #F1E9D2 32px); box-shadow: var(--sh-2); border: 1px solid #EADFC4; }
.wb canvas { display: block; } .wb-ink { position: absolute; inset: 0; cursor: crosshair; }
.wt-top { display: flex; align-items: center; gap: 8px; width: 100%; } .wt-top .acad-prog { flex: 1; }
.wt-word { font-size: 46px; text-align: center; color: var(--ink); line-height: 1.6; }
.wt-mean { text-align: center; color: var(--muted); margin: -8px 0 0; }
.wt-host { width: 100%; }
.wt-colors { display: flex; justify-content: center; gap: 10px; }
.sw { width: 32px; height: 32px; border-radius: 50%; border: 3px solid #fff; box-shadow: 0 0 0 1px var(--border); cursor: pointer; } .sw.on { box-shadow: 0 0 0 3px var(--leaf); }
.wt-res { display: flex; align-items: center; justify-content: center; gap: var(--sp-3); min-height: 70px; }
.wt-res p { margin: 0 0 4px; font-weight: var(--fw-bold); }
.wt-score { width: 74px; height: 74px; border-radius: 50%; display: grid; place-content: center; text-align: center; background: conic-gradient(var(--leaf) calc(var(--p) * 1%), var(--surface-2) 0); position: relative; }
.wt-score::before { content: ''; position: absolute; inset: 7px; border-radius: 50%; background: var(--surface); }
.wt-score b, .wt-score small { position: relative; line-height: 1; } .wt-score b { font-size: 22px; } .wt-score small { font-size: 11px; color: var(--muted); }
.wt-model { font-size: 30px; margin: 0; color: var(--leaf); }
.wr-hero, .cal-strip { display: flex; justify-content: center; gap: 14px; flex-wrap: wrap; padding: var(--sp-3); border-radius: var(--rad-xl); background: linear-gradient(135deg, #EDE9FE, #E0F2FE); font-family: 'Amiri', serif; font-size: 44px; color: #6D28D9; }
.wr-hero span { animation: sc-float 3s ease-in-out infinite; } .wr-hero span:nth-child(2n) { animation-delay: .6s; }
.cal-strip { font-size: 34px; background: linear-gradient(135deg, #FEF3C7, #ECFDF5); }
.wf-forms { display: flex; justify-content: center; gap: 14px; flex-wrap: wrap; padding: 22px; border-radius: var(--rad-xl); background: linear-gradient(135deg, #F5F3FF, #FFF7ED); font-family: 'Amiri', serif; font-size: 52px; color: #4C1D95; direction: rtl; }
.wf-forms b { color: #DB2777; }
.big-glyph { font-family: 'Amiri', serif; font-size: 40px; line-height: 1.2; }
.cal-hero { display: grid; place-items: center; min-height: 180px; padding: 16px; border-radius: var(--rad-xl); background: radial-gradient(circle at 50% 40%, #FFFDF5, color-mix(in srgb, var(--c) 16%, #FFF7E0)); color: var(--c); font-size: 48px; line-height: 1.6; text-align: center; box-shadow: inset 0 0 0 6px rgba(255, 255, 255, .6), var(--sh-1); }
.cal-hero.sm { font-size: 40px; min-height: 150px; }
.ws-sheet { width: 100%; max-width: 640px; margin-inline: auto; padding: 18px; background: #fff; color: #111; border-radius: var(--rad-md); box-shadow: var(--sh-2); }
.ws-sheet h3 { text-align: center; margin: 0 0 10px; }
.ws-row { display: flex; justify-content: space-around; gap: 10px; padding: 8px 0; border-bottom: 1px dashed #CBD5E1; font-size: 34px; }
.ws-ghost { color: #D1D5DB; } .ws-foot { margin-top: 14px; font-size: 14px; color: #475569; }
@media print { body.print-ws > *:not(.acad) { display: none !important; } body.print-ws .acad-top, body.print-ws .acad-body > :not(.ws-sheet) { display: none !important; } body.print-ws .acad { position: static; overflow: visible; background: #fff; } body.print-ws .ws-sheet { box-shadow: none; max-width: none; } }

/* قصص الأنبياء والسيرة */
.st-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; width: 100%; padding: 8px 14px; border-radius: var(--rad-pill); background: color-mix(in srgb, var(--c) 12%, var(--surface)); color: var(--c); font-weight: var(--fw-bold); font-size: var(--fs-sm); }
.st-slide .as-art, .st-end .as-art { width: 100%; display: grid; place-items: center; }
.st-text { font-size: var(--fs-md); line-height: 2; text-align: center; color: var(--ink); max-width: 520px; margin: 4px auto 0; }
.ayah { display: block; margin: 8px auto; padding: 10px 14px; border-radius: var(--rad-md); background: linear-gradient(135deg, #FEF9E7, #ECFDF5); border: 1px solid #E9D8A6; font-family: 'Amiri Quran', 'Amiri', serif; font-size: 1.25em; line-height: 2.1; color: #064E3B; }
.st-pg { color: var(--muted); font-size: var(--fs-xs); }
.st-moral { font-size: var(--fs-lg); font-weight: 800; color: var(--ink); line-height: 1.8; text-align: center; padding: 12px 16px; border-radius: var(--rad-lg); background: #FEF3C7; }
.st-eplist { display: grid; gap: 6px; width: 100%; max-width: 380px; margin-inline: auto; padding: 12px; border-radius: var(--rad-xl); background: linear-gradient(160deg, #FFF7ED, #F0FDF4); text-align: start; font-weight: var(--fw-med); }
.st-stats { display: flex; justify-content: center; gap: 10px; flex-wrap: wrap; } .st-stats span { padding: 6px 12px; border-radius: var(--rad-pill); background: var(--surface-2); font-weight: var(--fw-bold); font-size: var(--fs-sm); }
.sr-salawat { text-align: center; font-family: 'Amiri', serif; font-size: 22px; color: #047857; margin: 0; }
.md-map { position: relative; width: 100%; max-width: 520px; aspect-ratio: 4 / 5; margin-inline: auto; border-radius: var(--rad-xl); overflow: hidden; background: radial-gradient(circle at 52% 50%, #FEF3C7 0 14%, #FDE68A 30%, #F5D08A 60%, #E8B96A 100%); box-shadow: var(--sh-2); direction: ltr; }
.md-roads { position: absolute; inset: 0; width: 100%; height: 100%; } .md-roads circle, .md-roads path { fill: none; stroke: rgba(120, 53, 15, .25); stroke-width: .6; stroke-dasharray: 2 1.5; }
.md-palm { position: absolute; font-size: 22px; opacity: .8; transform: translate(-50%, -50%); }
.md-n { position: absolute; top: 8px; right: 10px; font-size: 12px; font-weight: 800; color: #78350F; }
.md-pin { position: absolute; transform: translate(-50%, -50%); display: grid; justify-items: center; gap: 2px; border: 0; background: none; cursor: pointer; font: inherit; z-index: 2; }
.md-pin span { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: #fff; border: 3px solid var(--c); font-size: 22px; box-shadow: 0 4px 10px rgba(0, 0, 0, .2); animation: st-beat 2.4s ease-in-out infinite; }
.md-pin small { padding: 1px 6px; border-radius: 6px; background: rgba(255, 255, 255, .9); font-size: 10px; font-weight: 800; color: #1F2937; white-space: nowrap; }
.md-pin.seen span { background: var(--c); animation: none; } .md-pin.on span { transform: scale(1.18); box-shadow: 0 0 0 6px color-mix(in srgb, var(--c) 30%, transparent); }
.md-card { display: grid; grid-template-columns: auto 1fr; gap: 12px; align-items: start; width: 100%; max-width: 520px; margin-inline: auto; padding: 14px; border-radius: var(--rad-lg); background: var(--surface); border-inline-start: 6px solid var(--c); box-shadow: var(--sh-2); animation: ds-pop .3s ease; }
.md-card h3 { margin: 0 0 4px; color: var(--c); } .md-card p { margin: 0 0 8px; line-height: 1.9; } .md-ic { font-size: 40px; }
.md-prog { display: flex; align-items: center; gap: 8px; width: 100%; max-width: 520px; margin-inline: auto; } .md-prog .acad-prog { flex: 1; }
.tl { position: relative; display: grid; gap: 10px; width: 100%; max-width: 560px; margin-inline: auto; padding-inline-start: 26px; }
.tl::before { content: ''; position: absolute; inset-block: 8px; inset-inline-start: 20px; width: 4px; border-radius: 2px; background: linear-gradient(#F59E0B, #10B981, #3B82F6); }
.tl-it { position: relative; display: grid; grid-template-columns: auto 1fr; gap: 10px; align-items: center; text-align: start; padding: 10px 12px; border-radius: var(--rad-lg); border: 1px solid var(--border); background: var(--surface); font: inherit; color: var(--ink); cursor: pointer; box-shadow: var(--sh-1); animation: ds-pop .4s ease both; animation-delay: var(--d, 0s); }
.tl-dot { display: grid; place-items: center; width: 42px; height: 42px; margin-inline-start: -32px; border-radius: 50%; background: #fff; border: 3px solid #F59E0B; font-size: 20px; }
.tl-body { display: grid; gap: 2px; } .tl-body small { color: var(--muted); font-weight: var(--fw-bold); } .tl-body em { font-style: normal; color: var(--muted); font-size: var(--fs-sm); max-height: 0; overflow: hidden; transition: max-height .3s; }
.tl-it.open em, .tl-it:hover em { max-height: 6em; } .tl-it.open { border-color: #F59E0B; }
@media (prefers-reduced-motion: reduce) { .flag-strip .wf, .md-pin span, .wr-hero span { animation: none; } }
@keyframes st-sway { 0%, 100% { transform: rotate(-5deg); } 50% { transform: rotate(5deg); } }
@keyframes st-beat { 50% { transform: scale(1.1); } }
/* النبي يُمثَّل بالنور فقط — لا هيئة بشرية */
.pn-light { position: relative; display: grid; justify-items: center; align-content: center; gap: 4px; width: 100%; max-width: 420px; height: 220px; border-radius: var(--rad-xl); overflow: hidden; background: radial-gradient(circle at 50% 42%, #FFFBEB, #FDE68A 35%, color-mix(in srgb, var(--c) 35%, #FEF3C7) 75%); box-shadow: var(--sh-2); }
.pn-light i { width: 110px; height: 110px; border-radius: 50%; background: radial-gradient(circle, #fff 0 30%, rgba(255, 251, 235, .9) 45%, rgba(253, 230, 138, .5) 65%, transparent 72%); box-shadow: 0 0 60px 30px rgba(255, 255, 255, .85), 0 0 120px 60px rgba(253, 224, 71, .45); animation: pn-glow 3.2s ease-in-out infinite; }
.pn-light b { position: relative; font-family: 'Amiri', serif; font-size: 30px; color: #713F12; margin-top: 6px; }
.pn-light small { position: relative; font-family: 'Amiri', serif; color: #92400E; }
@keyframes pn-glow { 50% { transform: scale(1.12); box-shadow: 0 0 80px 40px rgba(255, 255, 255, .95), 0 0 150px 80px rgba(253, 224, 71, .55); } }
@media (prefers-reduced-motion: reduce) { .pn-light i { animation: none; } }
.acad-auto { width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--border); background: var(--surface); font-size: 20px; cursor: pointer; } .acad-auto.on { background: var(--good-bg); border-color: var(--leaf); }
.mx-teen { display: grid; gap: 6px; justify-items: center; } .mx-objs.ten { padding: 4px 8px; border-radius: 12px; outline: 2px dashed var(--leaf); }
.kg-play .kx-dots i { cursor: pointer; }
.mx-line { display: flex; align-items: center; justify-content: center; gap: 8px; flex-wrap: wrap; font-size: 34px; padding: 14px; direction: ltr; }
.mx-line b { min-width: 54px; padding: 6px 12px; border-radius: 14px; background: var(--surface-2); text-align: center; } .mx-line b.hl { background: #FDE68A; } .mx-line i { color: var(--muted); font-style: normal; }
.mx-cmp { display: flex; align-items: center; justify-content: center; gap: 12px; padding: 10px; direction: ltr; } .mx-cmp > b { font-size: 48px; color: #DB2777; } .mx-cmp .mx-objs { max-width: 140px; }
.body2 { position: relative; width: min(300px, 86vw); aspect-ratio: 3 / 4.4; margin-inline: auto; border-radius: var(--rad-xl); background: radial-gradient(circle at 50% 40%, #FFF1F2, #FCE7F3 60%, #EDE9FE); box-shadow: var(--sh-2); direction: ltr; }
.b2-silh { position: absolute; inset: 4% 6%; width: 88%; height: 92%; } .b2-silh * { fill: #FBCFE8; stroke: #F9A8D4; stroke-width: .6; }
.b2-o { position: absolute; transform: translate(-50%, -50%); width: 52px; height: 52px; border-radius: 50%; border: 2px solid rgba(255, 255, 255, .9); background: rgba(255, 255, 255, .75); font-size: 28px; cursor: pointer; box-shadow: 0 3px 8px rgba(0, 0, 0, .12); transition: transform .2s, box-shadow .3s; }
.b2-o.on { box-shadow: 0 0 0 6px rgba(250, 204, 21, .55), 0 0 26px 10px rgba(250, 204, 21, .7); background: #FEF9C3; }
.b2-o.pop span { display: inline-block; animation: b2-pop .6s ease; } .b2-o.no { animation: ds-shake .4s; background: #FEE2E2; }
@keyframes b2-pop { 40% { transform: scale(1.45) rotate(-8deg); } }
.b2-q { margin: 0; text-align: center; font-size: var(--fs-lg); }
.wtr { display: flex; align-items: center; justify-content: center; gap: 30px; width: 100%; height: 200px; border-radius: var(--rad-xl); background: linear-gradient(180deg, #E0F2FE, #FFF7ED); }
.wtr-m { font-size: 96px; transition: transform .4s; } .wtr-m.gas { animation: sc-float 2s ease-in-out infinite; } .wtr-m.ice { filter: drop-shadow(0 0 12px #7DD3FC); }
.wtr-th { position: relative; width: 22px; height: 150px; border-radius: 11px; background: #E5E7EB; overflow: hidden; border: 2px solid #fff; box-shadow: var(--sh-1); }
.wtr-th i { position: absolute; bottom: 0; left: 0; right: 0; background: linear-gradient(0deg, #3B82F6, #EF4444); transition: height .2s; }
.an-prog { text-align: center; color: var(--muted); font-weight: 800; }
.an-pick { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; width: 100%; max-width: 380px; margin-inline: auto; }
.an-p { aspect-ratio: 1; font-size: 72px; border-radius: var(--rad-xl); border: 2px solid var(--border); background: var(--surface); cursor: pointer; box-shadow: var(--sh-1); transition: transform .15s; }
.an-p:active { transform: scale(.95); } .an-p.ok { border-color: var(--leaf); background: var(--good-bg); animation: b2-pop .6s; } .an-p.bad { animation: ds-shake .4s; opacity: .5; }

/* ============================================================ رحلة التعلّم ============================================================ */
.jr { display: grid; gap: var(--sp-3); }
.jr-head { display: flex; align-items: center; gap: 14px; padding: 16px; border-radius: 24px; color: #fff; background: linear-gradient(135deg, #6366F1, #8B5CF6 55%, #EC4899); box-shadow: 0 12px 30px -12px rgba(99, 102, 241, .6); position: relative; overflow: hidden; }
.jr-head::after { content: ''; position: absolute; inset-inline-end: -40px; top: -40px; width: 160px; height: 160px; border-radius: 50%; background: rgba(255, 255, 255, .12); }
.jr-av { flex: none; width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; background: rgba(255, 255, 255, .25); font-size: 36px; overflow: hidden; border: 3px solid rgba(255, 255, 255, .7); }
.jr-av svg, .jr-av img { width: 100%; height: 100%; }
.jr-who { display: grid; gap: 3px; flex: 1; min-width: 0; position: relative; z-index: 1; }
.jr-who b { font-size: 20px; } .jr-who small { opacity: .92; font-weight: 600; }
.jr-xp { height: 10px; border-radius: 6px; background: rgba(255, 255, 255, .3); overflow: hidden; } .jr-xp i { display: block; height: 100%; border-radius: 6px; background: linear-gradient(90deg, #FDE68A, #FBBF24); }
.jr-xpn { font-size: 11px !important; direction: ltr; text-align: end; }
.jr-chips { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.jr-chips span { display: grid; place-items: center; padding: 10px 4px; border-radius: 16px; background: var(--surface); box-shadow: var(--sh-1); font-weight: 800; font-size: 15px; white-space: nowrap; }
.jr-mission, .jr-week { padding: 14px; border-radius: 20px; background: var(--surface); box-shadow: var(--sh-1); display: grid; gap: 8px; }
.jr-mission { background: linear-gradient(160deg, #FFF7ED, #FEF3C7); border: 1px solid #FDE68A; }
.jr-mh { display: flex; justify-content: space-between; align-items: center; gap: 8px; } .jr-mh b { font-size: 17px; } .jr-mh small { font-weight: 800; color: #B45309; }
.jr-mi { display: grid; grid-template-columns: 32px 1fr 26px; align-items: center; gap: 8px; padding: 10px 12px; border-radius: 14px; background: rgba(255, 255, 255, .8); }
.jr-mi span { font-size: 22px; } .jr-mi b { font-weight: 700; font-size: 15px; }
.jr-mi i { width: 24px; height: 24px; border-radius: 50%; border: 2px solid #E5E7EB; display: grid; place-items: center; font-style: normal; color: #fff; font-weight: 900; }
.jr-mi.ok { background: #DCFCE7; } .jr-mi.ok b { text-decoration: line-through; color: #166534; } .jr-mi.ok i { background: #22C55E; border-color: #22C55E; }
.jr-prog { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border-radius: 20px; background: var(--surface); box-shadow: var(--sh-1); }
.jr-prog > div { flex: 1; display: grid; gap: 8px; } .jr-prog strong { font-size: 26px; color: var(--leaf); }
.jr-pbar { height: 14px; border-radius: 8px; background: var(--surface-2); overflow: hidden; } .jr-pbar i { display: block; height: 100%; border-radius: 8px; background: linear-gradient(90deg, #22C55E, #10B981); transition: width .6s; }
.jr-cont { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border: 0; border-radius: 20px; color: #fff; background: linear-gradient(135deg, #10B981, #0EA5E9); box-shadow: 0 10px 24px -12px rgba(16, 185, 129, .8); font: inherit; text-align: start; cursor: pointer; }
.jr-cont > span:nth-child(2) { flex: 1; display: grid; } .jr-cont small { opacity: .9; } .jr-cont b { font-size: 17px; }
.jr-cic { width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; background: rgba(255, 255, 255, .25); font-size: 26px; } .jr-cont > i { font-style: normal; font-size: 20px; }
[dir=rtl] .jr-cont > i { transform: scaleX(-1); }
.jr-bars { display: grid; grid-template-columns: repeat(7, 1fr); gap: 8px; height: 90px; align-items: end; direction: ltr; }
.jr-bar { display: grid; grid-template-rows: 1fr auto; height: 100%; gap: 4px; text-align: center; } .jr-bar i { align-self: end; border-radius: 8px 8px 4px 4px; background: #C7D2FE; } .jr-bar.now i { background: linear-gradient(#8B5CF6, #6366F1); } .jr-bar small { font-size: 11px; color: var(--muted); font-weight: 700; }
.jr-subjects { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
@media (min-width: 700px) { .jr-subjects { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.jr-subj { position: relative; display: grid; gap: 6px; justify-items: start; padding: 16px 14px 14px; border: 0; border-radius: 22px; font: inherit; text-align: start; color: var(--ink); cursor: pointer; background: linear-gradient(160deg, color-mix(in srgb, var(--c) 16%, #fff), #fff 70%); box-shadow: 0 6px 18px -10px color-mix(in srgb, var(--c) 70%, transparent), inset 0 0 0 1px color-mix(in srgb, var(--c) 20%, transparent); transition: transform .15s; overflow: hidden; }
.jr-subj:active { transform: scale(.97); }
.jr-sic { width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center; font-size: 30px; background: var(--c); box-shadow: 0 6px 14px -6px var(--c); }
.jr-subj b { font-size: 16px; } .jr-subj small { font-weight: 800; color: var(--muted); font-size: 12px; }
.jr-sbar { width: 100%; height: 8px; border-radius: 5px; background: rgba(0, 0, 0, .07); overflow: hidden; } .jr-sbar i { display: block; height: 100%; background: var(--c); border-radius: 5px; }
.jr-badges { display: flex; gap: 10px; overflow-x: auto; padding: 4px 2px 10px; scroll-snap-type: x mandatory; }
.jr-badge { flex: none; width: 92px; display: grid; justify-items: center; gap: 6px; text-align: center; scroll-snap-align: start; filter: grayscale(1); opacity: .45; }
.jr-badge span { width: 66px; height: 66px; border-radius: 50%; display: grid; place-items: center; font-size: 32px; background: var(--surface); box-shadow: var(--sh-1); }
.jr-badge.got { filter: none; opacity: 1; } .jr-badge.got span { background: radial-gradient(circle, #FEF3C7, #FCD34D); box-shadow: 0 0 0 3px #FBBF24, 0 8px 18px -8px #F59E0B; }
.jr-badge small { font-size: 11px; font-weight: 800; line-height: 1.3; }
.jr-lib { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.jr-libi { display: grid; justify-items: center; gap: 6px; padding: 14px 6px; border: 0; border-radius: 18px; background: var(--surface); box-shadow: var(--sh-1); font: inherit; color: var(--ink); cursor: pointer; }
.jr-libi span { width: 50px; height: 50px; border-radius: 50%; display: grid; place-items: center; font-size: 26px; background: color-mix(in srgb, var(--c) 15%, #fff); } .jr-libi b { font-size: 12px; text-align: center; }
/* المسار */
.jr-shead { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px; border-radius: 22px; color: #fff; background: linear-gradient(135deg, var(--c), color-mix(in srgb, var(--c) 60%, #000)); }
.jr-shead b { font-size: 20px; display: block; } .jr-shead small { opacity: .9; font-weight: 700; } .jr-shead .acad-ring span { color: var(--ink); }
.jr-level { margin-top: 10px; padding: 12px 16px; border-radius: 18px; background: color-mix(in srgb, var(--c) 12%, var(--surface)); border-inline-start: 6px solid var(--c); display: grid; gap: 2px; }
.jr-level b { font-size: 17px; color: color-mix(in srgb, var(--c) 75%, #000); } .jr-level small { color: var(--muted); font-weight: 700; }
.jr-path { display: grid; gap: 4px; padding: 10px 0 6px; }
.jr-step { display: grid; justify-items: center; gap: 4px; transform: translateX(calc((var(--i) - 1.5) * 52px)); }
[dir=rtl] .jr-step { transform: translateX(calc((var(--i) - 1.5) * -52px)); }
.jr-node { position: relative; width: 78px; height: 72px; border: 0; border-radius: 50%; background: #E5E7EB; box-shadow: 0 7px 0 #CBD5E1; cursor: pointer; transition: transform .1s, box-shadow .1s; font: inherit; }
.jr-node:active { transform: translateY(5px); box-shadow: 0 2px 0 #CBD5E1; }
.jr-node .jr-ic { font-size: 32px; line-height: 72px; } .jr-glyph { font-family: 'Amiri', 'Baloo Bhaijaan 2', serif; font-size: 36px; color: #fff; }
.jr-node.done { background: linear-gradient(#FCD34D, #F59E0B); box-shadow: 0 7px 0 #B45309; }
.jr-node.cur { background: linear-gradient(#34D399, #10B981); box-shadow: 0 7px 0 #047857, 0 0 0 8px rgba(16, 185, 129, .2); animation: jr-bob 1.6s ease-in-out infinite; }
.jr-node.locked { background: #F1F5F9; box-shadow: 0 7px 0 #E2E8F0; } .jr-node.locked .jr-ic { font-size: 24px; opacity: .6; }
.jr-node:not(.done):not(.cur):not(.locked) .jr-glyph { color: #64748B; }
.jr-node.shake { animation: ds-shake .4s; }
.jr-st { position: absolute; bottom: -12px; left: 50%; transform: translateX(-50%); font-style: normal; font-size: 13px; color: #F59E0B; background: #fff; border-radius: 10px; padding: 0 6px; box-shadow: var(--sh-1); white-space: nowrap; letter-spacing: 1px; }
.jr-cap { margin-top: 8px; max-width: 120px; text-align: center; font-weight: 700; font-size: 12px; color: var(--ink); line-height: 1.3; }
@keyframes jr-bob { 50% { transform: translateY(-5px); } }
/* درس الحرف */
.lt-hero { display: flex; align-items: center; gap: 16px; padding: 18px; border-radius: 24px; background: linear-gradient(135deg, #FFF7ED, #FFE4E6); box-shadow: var(--sh-1); }
.lt-big { flex: none; width: 96px; height: 96px; border-radius: 26px; display: grid; place-items: center; font-family: 'Amiri', 'Baloo Bhaijaan 2', serif; font-size: 62px; line-height: 1; color: #fff; background: linear-gradient(135deg, #F97316, #EC4899); box-shadow: 0 10px 22px -10px #EC4899; }
.lt-big small { font-size: 30px; opacity: .85; margin-top: -12px; }
.lt-hero b { font-size: 24px; display: block; } .lt-hero small { font-size: 26px; letter-spacing: 4px; }
.lt-steps { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.lt-step { position: relative; display: grid; justify-items: center; gap: 6px; padding: 18px 10px; border: 0; border-radius: 22px; background: var(--surface); box-shadow: 0 6px 0 #E5E7EB, var(--sh-1); font: inherit; color: var(--ink); cursor: pointer; }
.lt-step:active { transform: translateY(4px); box-shadow: 0 2px 0 #E5E7EB; }
.lt-n { position: absolute; top: 10px; inset-inline-start: 12px; width: 24px; height: 24px; border-radius: 50%; background: var(--surface-2); font-size: 12px; font-weight: 800; display: grid; place-items: center; }
.lt-i { font-size: 40px; } .lt-step b { font-size: 17px; }
.lt-step.done { background: #ECFDF5; box-shadow: 0 6px 0 #A7F3D0; } .lt-step > i { position: absolute; top: 8px; inset-inline-end: 12px; font-style: normal; color: #10B981; font-weight: 900; font-size: 20px; }
.lt-badge { text-align: center; padding: 14px; border-radius: 18px; background: linear-gradient(135deg, #FEF3C7, #FDE68A); font-weight: 800; font-size: 18px; animation: ds-pop .5s ease; }
.lt-show { display: flex; justify-content: center; align-items: center; gap: 20px; height: 210px; border-radius: 24px; background: radial-gradient(circle, #FFF7ED, #FED7AA); }
.lt-anim { font-family: 'Amiri', 'Baloo Bhaijaan 2', serif; font-size: 140px; line-height: 1; color: #EA580C; text-shadow: 0 8px 0 rgba(234, 88, 12, .18); animation: lt-in 1s cubic-bezier(.3, 1.6, .5, 1) both, sc-float-s 3s 1s ease-in-out infinite; }
.lt-anim.lo { font-size: 110px; color: #DB2777; animation-delay: .25s, 1.25s; }
@keyframes lt-in { from { transform: scale(0) rotate(-20deg); opacity: 0; } }
@keyframes sc-float-s { 50% { transform: translateY(-8px); } }
.lt-w { font-family: 'Amiri', serif; font-size: 40px; } .lt-hl { color: #EA580C; font-size: 1.3em; } .lt-inl { font-family: 'Amiri', 'Baloo Bhaijaan 2', serif; font-size: 1.4em; color: #EA580C; }
.lt-pic { display: block; font-size: 46px; line-height: 1.2; }
.acad-ch small { display: block; font-size: 13px; color: var(--muted); }
@media (prefers-reduced-motion: reduce) { .jr-node.cur, .lt-anim { animation: none; } }
.acad-scene .ld { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 0; }
.acad-scene .sc-it { z-index: 1; }
.ld-wave { animation: ld-w 6s ease-in-out infinite; } .ld-wave2 { animation: ld-w 8s ease-in-out infinite reverse; }
.ld-rain { animation: ld-r .8s linear infinite; } .ld-cloud { animation: ld-c 30s linear infinite alternate; }
@keyframes ld-w { 50% { transform: translateX(-18px); } } @keyframes ld-r { to { transform: translateY(26px); } } @keyframes ld-c { to { transform: translateX(30px); } }
@media (prefers-reduced-motion: reduce) { .ld-wave, .ld-wave2, .ld-rain, .ld-cloud { animation: none; } }
.acad-slide .as-art { width: 100%; display: grid; place-items: center; }
/* ===== خريطة عالم المعرفة ===== */
.jm { position: relative; border-radius: 28px; overflow: hidden; background: linear-gradient(180deg, #7DD3FC 0, #38BDF8 18%, #0EA5E9 55%, #0369A1 100%); box-shadow: inset 0 0 0 4px rgba(255, 255, 255, .5), 0 18px 40px -20px rgba(3, 105, 161, .8); direction: ltr; }
.jm::before { content: ''; position: absolute; inset: 0; background: repeating-radial-gradient(circle at 20% 30%, rgba(255, 255, 255, .08) 0 2px, transparent 3px 26px), repeating-linear-gradient(170deg, rgba(255, 255, 255, .07) 0 2px, transparent 2px 40px); animation: jm-sea 14s linear infinite; }
@keyframes jm-sea { to { background-position: 0 200px, 0 120px; } }
.jm-route { position: absolute; inset: 0; width: 100%; height: 100%; }
.jm-road { fill: none; stroke: #FDE68A; stroke-width: 14; stroke-linecap: round; opacity: .55; vector-effect: non-scaling-stroke; }
.jm-dash { fill: none; stroke: #fff; stroke-width: 3; stroke-dasharray: 2 12; stroke-linecap: round; vector-effect: non-scaling-stroke; animation: jm-march 2.4s linear infinite; }
@keyframes jm-march { to { stroke-dashoffset: -28; } }
.jm-isl { position: absolute; transform: translate(-50%, -50%); width: 150px; display: grid; justify-items: center; gap: 4px; border: 0; background: none; padding: 0; cursor: pointer; font: inherit; animation: jm-in .6s var(--d) both cubic-bezier(.3, 1.4, .5, 1); z-index: 2; }
@keyframes jm-in { from { transform: translate(-50%, -30%) scale(.6); opacity: 0; } }
.jm-land { position: relative; width: 132px; height: 86px; border-radius: 50%; background: radial-gradient(ellipse at 50% 35%, #86EFAC 0 46%, #22C55E 47% 60%, #FDE68A 61% 72%, rgba(253, 230, 138, 0) 73%); filter: drop-shadow(0 10px 0 rgba(3, 105, 161, .35)); display: grid; place-items: center; transition: transform .2s; }
.jm-isl:active .jm-land { transform: scale(.94); }
.jm-ring { width: 66px; height: 66px; border-radius: 50%; display: grid; place-items: center; margin-top: -18px; background: conic-gradient(var(--c) calc(var(--p) * 1%), rgba(255, 255, 255, .55) 0); box-shadow: 0 6px 14px -4px rgba(0, 0, 0, .35); }
.jm-ic { width: 54px; height: 54px; border-radius: 50%; display: grid; place-items: center; font-size: 30px; background: #fff; }
.jm-tree { position: absolute; font-style: normal; font-size: 24px; } .jm-tree.t1 { left: 4px; top: 6px; animation: sc-sway 4s ease-in-out infinite; transform-origin: bottom; } .jm-tree.t2 { right: 6px; top: 14px; font-size: 22px; }
.jm-tag { display: grid; justify-items: center; padding: 5px 12px; border-radius: 14px; background: rgba(255, 255, 255, .95); box-shadow: 0 4px 10px -4px rgba(0, 0, 0, .3); direction: rtl; }
[dir=ltr] .jm-tag { direction: ltr; }
.jm-tag b { font-size: 14px; color: var(--c); white-space: nowrap; } .jm-tag small { font-size: 11px; font-weight: 800; color: #475569; }
.jm-isl.here .jm-land { animation: jm-glow 2.4s ease-in-out infinite; }
@keyframes jm-glow { 50% { filter: drop-shadow(0 10px 0 rgba(3, 105, 161, .35)) drop-shadow(0 0 18px rgba(253, 224, 71, .95)); } }
.jm-me { position: absolute; top: -34px; display: grid; justify-items: center; animation: jr-bob 1.4s ease-in-out infinite; z-index: 3; }
.jm-me > svg, .jm-me > img { width: 44px; height: 44px; border-radius: 50%; border: 3px solid #fff; box-shadow: 0 4px 10px rgba(0, 0, 0, .3); background: #fff; }
.jm-me { font-size: 34px; } .jm-me em { font-style: normal; font-size: 10px; font-weight: 900; color: #fff; background: #F43F5E; padding: 1px 7px; border-radius: 8px; margin-top: 2px; white-space: nowrap; }
.jm-flag { position: absolute; top: -10px; right: 18px; font-size: 26px; animation: sc-float 3s ease-in-out infinite; }
.jm-cloud { position: absolute; font-size: 44px; opacity: .9; z-index: 1; animation: jm-drift 40s linear infinite; } .jm-cloud.c1 { top: 10px; left: -60px; } .jm-cloud.c2 { top: 40%; left: -60px; font-size: 34px; animation-duration: 55s; animation-delay: -20s; } .jm-cloud.c3 { top: 75%; left: -60px; animation-duration: 48s; animation-delay: -35s; }
@keyframes jm-drift { to { transform: translateX(560px); } }
.jm-boat { position: absolute; top: 28%; left: 8%; font-size: 30px; z-index: 1; animation: jm-boat 16s ease-in-out infinite alternate; }
@keyframes jm-boat { 50% { transform: translate(70px, 6px) rotate(-6deg); } 100% { transform: translate(140px, 0); } }
.jm-fish { position: absolute; top: 58%; right: 6%; font-size: 22px; z-index: 1; animation: jm-boat 12s ease-in-out infinite alternate-reverse; }
.jm-whale { position: absolute; bottom: 4%; left: 40%; font-size: 36px; z-index: 1; animation: sc-float 5s ease-in-out infinite; opacity: .9; }
@media (prefers-reduced-motion: reduce) { .jm::before, .jm-dash, .jm-cloud, .jm-boat, .jm-fish, .jm-whale, .jm-me, .jm-isl.here .jm-land { animation: none; } }
/* كارت الرئيسية */
.jr-home { display: flex; align-items: center; gap: 12px; width: 100%; margin-top: 12px; padding: 12px 14px; border: 0; border-radius: 22px; color: #fff; background: linear-gradient(135deg, #6366F1, #8B5CF6 55%, #EC4899); box-shadow: 0 10px 24px -14px rgba(99, 102, 241, .9); font: inherit; text-align: start; cursor: pointer; }
.jrh-lv { flex: none; width: 54px; height: 54px; border-radius: 18px; display: grid; place-content: center; text-align: center; background: rgba(255, 255, 255, .22); } .jrh-lv b { font-size: 22px; line-height: 1; } .jrh-lv small { font-size: 10px; opacity: .9; }
.jrh-mid { flex: 1; min-width: 0; display: grid; gap: 4px; } .jrh-mid b { font-size: 16px; } .jrh-mid small { font-size: 12px; opacity: .95; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.jrh-go { flex: none; padding: 8px 12px; border-radius: 14px; background: #fff; color: #6D28D9; font-weight: 900; font-size: 13px; }
.kh-tile b { overflow-wrap: anywhere; line-height: 1.25; text-align: center; }

/* ============================================================ طبقة الإبهار ============================================================ */
/* المشهد: عمق + كاميرا بطيئة + بريق + أشعة */
.acad-scene { isolation: isolate; box-shadow: inset 0 -40px 60px rgba(0, 0, 0, .14), inset 0 0 0 3px rgba(255, 255, 255, .35), 0 18px 34px -18px rgba(0, 0, 0, .45); }
.acad-scene .ld { animation: wow-kb 20s ease-in-out infinite alternate; transform-origin: 50% 60%; }
@keyframes wow-kb { to { transform: scale(1.09) translate(-1.5%, 1%); } }
.acad-scene::after { content: ''; position: absolute; inset: 0; z-index: 2; pointer-events: none; background-image: radial-gradient(2px 2px at 12% 22%, #fff, transparent), radial-gradient(1.5px 1.5px at 78% 18%, #fff, transparent), radial-gradient(2px 2px at 64% 42%, rgba(255, 255, 255, .9), transparent), radial-gradient(1.5px 1.5px at 30% 60%, #fff, transparent), radial-gradient(2px 2px at 88% 66%, rgba(255, 255, 255, .8), transparent), radial-gradient(1.5px 1.5px at 46% 14%, #fff, transparent); animation: wow-twinkle 3.4s ease-in-out infinite; mix-blend-mode: screen; }
@keyframes wow-twinkle { 0%, 100% { opacity: .25; } 50% { opacity: 1; } }
.acad-scene::before { content: ''; position: absolute; inset: 0; z-index: 3; pointer-events: none; background: radial-gradient(120% 90% at 50% 0%, transparent 55%, rgba(0, 0, 0, .18)); }
.acad-scene.ld-dawn .ld, .acad-scene.ld-makkah .ld, .acad-scene.ld-desert .ld, .acad-scene.ld-madinah .ld { filter: saturate(1.15); }
.acad-scene.ld-dawn::before, .acad-scene.ld-makkah::before, .acad-scene.ld-madinah::before { background: repeating-conic-gradient(from 0deg at 50% 105%, rgba(255, 255, 255, .22) 0 6deg, transparent 6deg 18deg), radial-gradient(120% 90% at 50% 0%, transparent 55%, rgba(0, 0, 0, .14)); animation: wow-rays 24s linear infinite; mix-blend-mode: soft-light; }
@keyframes wow-rays { to { filter: hue-rotate(10deg); background-position: 0 0; } }
.acad-scene.ld-night::after { animation-duration: 2s; }
.sc-it { filter: drop-shadow(0 10px 10px rgba(0, 0, 0, .28)); }
/* دخول المشهد والبطاقة بعمق ثلاثي الأبعاد */
.sw-slide.on .acad-slide { animation: wow-card .7s cubic-bezier(.2, 1.3, .4, 1) both; }
@keyframes wow-card { from { transform: perspective(900px) rotateY(-14deg) translateY(16px) scale(.94); opacity: .3; } }
[dir=rtl] .sw-slide.on .acad-slide { animation-name: wow-card-r; } @keyframes wow-card-r { from { transform: perspective(900px) rotateY(14deg) translateY(16px) scale(.94); opacity: .3; } }
.sw-slide.on .acad-scene { animation: wow-scene 1s ease both; } @keyframes wow-scene { from { filter: blur(6px) brightness(1.3); transform: scale(1.04); } }
.sw-slide.on .st-text, .sw-slide.on .acad-slide h3, .sw-slide.on .acad-slide > p { animation: wow-text .7s .35s both; } @keyframes wow-text { from { opacity: 0; transform: translateY(10px); } }
.ayah { box-shadow: 0 0 0 1px #E9D8A6, 0 10px 24px -14px rgba(6, 78, 59, .5); position: relative; overflow: hidden; }
.ayah::after { content: ''; position: absolute; inset: 0; background: linear-gradient(110deg, transparent 30%, rgba(255, 255, 255, .7) 50%, transparent 70%); transform: translateX(-120%); animation: wow-shine 4s 1s ease-in-out infinite; }
@keyframes wow-shine { 40%, 100% { transform: translateX(120%); } }
/* الاختبار: لمعة الإجابة الصحيحة */
.acad-ch.ok { animation: wow-ok .6s cubic-bezier(.3, 1.6, .5, 1); box-shadow: 0 0 0 4px rgba(34, 197, 94, .35), 0 0 30px rgba(34, 197, 94, .45); }
@keyframes wow-ok { 40% { transform: scale(1.08) rotate(-1.5deg); } }
.acad-ch.bad { animation: ds-shake .4s; }
/* القصاصات والنجمة الطائرة */
.wow-cv { position: fixed; inset: 0; width: 100vw; height: 100vh; pointer-events: none; z-index: 9999; }
.wow-fly { position: fixed; z-index: 9999; font-size: 30px; pointer-events: none; filter: drop-shadow(0 0 10px #FDE047); }
/* الصديق المشجّع */
.wow-buddy { position: fixed; z-index: 9998; bottom: 22px; inset-inline-start: 14px; display: flex; align-items: center; gap: 8px; padding: 6px 14px 6px 6px; border-radius: 40px; background: #fff; box-shadow: 0 12px 30px -10px rgba(0, 0, 0, .35); transform: translateY(140%) scale(.6); opacity: 0; transition: transform .45s cubic-bezier(.3, 1.6, .5, 1), opacity .3s; pointer-events: none; }
[dir=rtl] .wow-buddy { padding: 6px 6px 6px 14px; }
.wow-buddy.show { transform: none; opacity: 1; } .wow-buddy img { width: 52px; height: 52px; border-radius: 50%; object-fit: cover; border: 3px solid #FDE047; }
.wow-buddy span { font-weight: 900; font-size: 18px; } .wow-buddy.good span { color: #16A34A; } .wow-buddy.try span { color: #EA580C; } .wow-buddy.try img { border-color: #FDBA74; }
.wow-buddy.show img { animation: wow-nod .6s ease 2; } @keyframes wow-nod { 50% { transform: rotate(-10deg) scale(1.08); } }
/* الاحتفال السينمائي */
.wow-cel { position: fixed; inset: 0; z-index: 9997; display: grid; place-items: center; background: radial-gradient(circle at 50% 40%, rgba(30, 27, 75, .55), rgba(15, 23, 42, .85)); opacity: 0; transition: opacity .3s; cursor: pointer; }
.wow-cel.in { opacity: 1; }
.wow-rays { position: absolute; width: 160vmax; height: 160vmax; background: repeating-conic-gradient(from 0deg, rgba(253, 224, 71, .22) 0 8deg, transparent 8deg 20deg); border-radius: 50%; animation: wow-spin 14s linear infinite; mask-image: radial-gradient(circle, #000 10%, transparent 60%); -webkit-mask-image: radial-gradient(circle, #000 10%, transparent 60%); }
@keyframes wow-spin { to { transform: rotate(360deg); } }
.wow-card { position: relative; display: grid; justify-items: center; gap: 8px; padding: 30px 34px 26px; min-width: 260px; max-width: 86vw; border-radius: 34px; text-align: center; background: linear-gradient(160deg, #FFFFFF, #FEF3C7); box-shadow: 0 30px 80px -20px rgba(0, 0, 0, .6), inset 0 0 0 4px #FDE68A; transform: scale(.4) rotate(-8deg); transition: transform .6s cubic-bezier(.2, 1.6, .4, 1); }
.wow-cel.in .wow-card { transform: none; }
.wow-big { font-size: 96px; line-height: 1; filter: drop-shadow(0 12px 14px rgba(0, 0, 0, .25)); animation: wow-bounce 1.4s .3s ease-in-out infinite; }
@keyframes wow-bounce { 50% { transform: translateY(-10px) scale(1.06); } }
.wow-glyph { display: inline-grid; place-items: center; width: 110px; height: 110px; border-radius: 30px; font-family: 'Amiri', 'Baloo Bhaijaan 2', serif; font-size: 72px; color: #fff; background: linear-gradient(135deg, #F97316, #EC4899); box-shadow: 0 0 0 6px #FDE68A; }
.wow-stars { display: flex; gap: 6px; font-size: 46px; } .wow-stars i { font-style: normal; color: #E5E7EB; transform: scale(0); animation: wow-star .5s var(--d) cubic-bezier(.3, 1.8, .5, 1) forwards; } .wow-stars i.on { color: #FBBF24; text-shadow: 0 0 18px #FDE047; }
@keyframes wow-star { to { transform: scale(1); } }
.wow-card h2 { margin: 4px 0 0; font-size: 28px; color: #7C2D12; } .wow-card p { margin: 0; font-weight: 800; color: #92400E; font-size: 16px; }
.wow-face { position: absolute; bottom: -26px; inset-inline-end: -18px; width: 82px; height: 82px; border-radius: 50%; object-fit: cover; border: 4px solid #fff; box-shadow: 0 10px 22px -8px rgba(0, 0, 0, .5); animation: wow-bounce 1.2s ease-in-out infinite; }
/* الخريطة: تكبير الجزيرة عند الدخول */
.jm-isl.zoom { z-index: 9; animation: none; } .jm-isl.zoom .jm-land { transform: scale(2.6); transition: transform .42s cubic-bezier(.5, 0, .3, 1); filter: drop-shadow(0 0 30px #FDE047); } .jm-isl.zoom .jm-tag { opacity: 0; transition: opacity .2s; }
@media (prefers-reduced-motion: reduce) { .acad-scene .ld, .acad-scene::after, .acad-scene::before, .sw-slide.on .acad-slide, .sw-slide.on .acad-scene, .ayah::after, .wow-rays, .wow-big, .wow-face { animation: none !important; } }

/* ===== عمق المشهد مع الإمالة ===== */
.acad-scene .ld { translate: calc(var(--px, 0) * -8px) calc(var(--py, 0) * -5px); transition: translate .25s ease-out; }
.acad-scene .sc-it { translate: calc(var(--px, 0) * 16px) calc(var(--py, 0) * 10px); transition: translate .25s ease-out; }
.acad-scene .sc-it[style*="z-index"] { translate: calc(var(--px, 0) * 24px) calc(var(--py, 0) * 14px); }
@media (prefers-reduced-motion: reduce) { .acad-scene .ld, .acad-scene .sc-it { translate: none; } }
/* ===== البطل وإكسسواراته ===== */
.hero { position: relative; display: inline-grid; place-items: center; width: var(--hs); height: var(--hs); border-radius: 50%; }
.hero > svg, .hero > img { width: 100%; height: 100%; border-radius: 50%; }
.hero-emo { font-size: calc(var(--hs) * .7); line-height: 1; }
.hero-hat { position: absolute; top: calc(var(--hs) * -.42); left: 50%; transform: translateX(-50%) rotate(-8deg); font-style: normal; font-size: calc(var(--hs) * .58); filter: drop-shadow(0 3px 3px rgba(0, 0, 0, .25)); }
.hero-pet { position: absolute; bottom: calc(var(--hs) * -.12); inset-inline-end: calc(var(--hs) * -.42); font-style: normal; font-size: calc(var(--hs) * .5); animation: hero-pet 1.8s ease-in-out infinite; filter: drop-shadow(0 3px 3px rgba(0, 0, 0, .25)); }
@keyframes hero-pet { 50% { transform: translateY(-5px) rotate(6deg); } }
.hero.fr-gold { box-shadow: 0 0 0 4px #FBBF24, 0 0 14px 3px rgba(251, 191, 36, .7); }
.hero.fr-rainbow::before, .hero.fr-galaxy::before, .hero.fr-fire::before { content: ''; position: absolute; inset: -5px; border-radius: 50%; z-index: -1; animation: wow-spin 4s linear infinite; }
.hero.fr-rainbow::before { background: conic-gradient(#F43F5E, #F59E0B, #FACC15, #22C55E, #3B82F6, #A855F7, #F43F5E); }
.hero.fr-galaxy::before { background: conic-gradient(#1E1B4B, #7C3AED, #22D3EE, #1E1B4B, #EC4899, #1E1B4B); box-shadow: 0 0 16px 4px rgba(124, 58, 237, .6); }
.hero.fr-fire::before { background: conic-gradient(#DC2626, #F97316, #FACC15, #F97316, #DC2626); box-shadow: 0 0 18px 4px rgba(249, 115, 22, .7); }
.hero.fr-rainbow, .hero.fr-galaxy, .hero.fr-fire { isolation: isolate; }
.jr-av { border: 0; padding: 0; cursor: pointer; overflow: visible; font: inherit; }
.jr-coin { display: grid; place-items: center; padding: 6px 4px; border: 0; border-radius: 16px; background: linear-gradient(135deg, #FEF3C7, #FDE68A); box-shadow: var(--sh-1); font: inherit; font-weight: 800; font-size: 15px; cursor: pointer; animation: jr-coin 3s ease-in-out infinite; }
.jr-coin em { font-style: normal; font-size: 10px; color: #92400E; }
@keyframes jr-coin { 50% { box-shadow: 0 0 0 3px rgba(251, 191, 36, .45); } }
/* ===== المتجر ===== */
.shop-top { display: flex; align-items: center; gap: 18px; padding: 20px 18px; border-radius: 26px; background: linear-gradient(135deg, #312E81, #6D28D9 60%, #DB2777); color: #fff; box-shadow: 0 16px 34px -18px rgba(109, 40, 217, .9); }
.shop-hero { flex: none; padding: 26px 26px 8px 8px; }
.shop-coins { display: grid; gap: 4px; } .shop-coins b { font-size: 34px; } .shop-coins small { opacity: .9; font-weight: 600; }
.shop-tabs { justify-content: center; }
.shop-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.shop-it { position: relative; display: grid; justify-items: center; gap: 6px; padding: 16px 6px 12px; border: 0; border-radius: 22px; background: var(--surface); box-shadow: 0 6px 0 #E5E7EB, var(--sh-1); font: inherit; color: var(--ink); cursor: pointer; }
.shop-it:active { transform: translateY(4px); box-shadow: 0 2px 0 #E5E7EB; }
.shop-ic { font-size: 50px; line-height: 1.1; filter: drop-shadow(0 6px 6px rgba(0, 0, 0, .18)); } .shop-it b { font-size: 13px; } .shop-it small { font-weight: 800; color: #B45309; }
.shop-it.has { background: #F0FDF4; box-shadow: 0 6px 0 #BBF7D0; } .shop-it.has small { color: #16A34A; }
.shop-it.on { background: linear-gradient(160deg, #FEF9C3, #FDE68A); box-shadow: 0 6px 0 #F59E0B, 0 0 0 3px #FBBF24; }
.shop-it.no { animation: ds-shake .4s; }
.wow-big .hero { --hs: 100px !important; }
/* ===== سماء الخريطة حسب الوقت ===== */
.jm.tod-dawn { background: linear-gradient(180deg, #FBCFE8 0, #FDBA74 14%, #38BDF8 30%, #0284C7 70%, #075985 100%); }
.jm.tod-sunset { background: linear-gradient(180deg, #7C3AED 0, #F97316 12%, #FB7185 22%, #0EA5E9 40%, #075985 100%); }
.jm.tod-night { background: linear-gradient(180deg, #020617 0, #1E1B4B 18%, #1E3A8A 45%, #0C4A6E 100%); }
.jm.tod-night .jm-road { stroke: #FDE047; opacity: .35; } .jm.tod-night .jm-cloud { opacity: .25; } .jm.tod-night .jm-land { filter: drop-shadow(0 10px 0 rgba(0, 0, 0, .35)) brightness(.85); }
.jm-sun { position: absolute; top: 16px; right: 18px; width: 64px; height: 64px; border-radius: 50%; background: radial-gradient(circle, #FEF9C3, #FDE047 55%, #F59E0B); box-shadow: 0 0 40px 14px rgba(253, 224, 71, .6); z-index: 1; animation: jm-sunp 5s ease-in-out infinite; } .jm-sun.low { top: 40px; background: radial-gradient(circle, #FFEDD5, #FB923C 60%, #EA580C); box-shadow: 0 0 50px 20px rgba(251, 146, 60, .6); }
@keyframes jm-sunp { 50% { box-shadow: 0 0 60px 22px rgba(253, 224, 71, .75); } }
.jm-moon { position: absolute; top: 14px; right: 20px; font-size: 54px; z-index: 1; filter: drop-shadow(0 0 18px rgba(253, 230, 138, .9)); }
.jm-stars { position: absolute; inset: 0 0 auto 0; height: 260px; z-index: 0; background-image: radial-gradient(2px 2px at 10% 20%, #fff, transparent), radial-gradient(1.5px 1.5px at 30% 60%, #fff, transparent), radial-gradient(2px 2px at 55% 30%, #fff, transparent), radial-gradient(1.5px 1.5px at 72% 70%, #fff, transparent), radial-gradient(2px 2px at 88% 40%, #fff, transparent), radial-gradient(1.2px 1.2px at 45% 85%, #fff, transparent), radial-gradient(1.6px 1.6px at 20% 90%, #fff, transparent); animation: wow-twinkle 2.6s ease-in-out infinite; }
/* اللوجو زر تبديل الوضع */
.logo-sw { border: 0; background: none; padding: 0; font: inherit; color: inherit; cursor: pointer; position: relative; border-radius: 16px; -webkit-tap-highlight-color: transparent; transition: transform .15s; }
.logo-sw:active { transform: scale(.95); }
.logo-sw:focus-visible { outline: 3px solid var(--leaf); outline-offset: 3px; }
.logo-swi { font-style: normal; display: inline-grid; place-items: center; width: 22px; height: 22px; margin-inline-start: 4px; border-radius: 50%; background: var(--surface-2); color: var(--muted); font-size: 13px; font-weight: 900; }
.kh-grid:has(> :nth-child(2):last-child) { grid-template-columns: 1fr 1fr; }
/* اشتراك Google Play */
.pb { position: relative; display: grid; gap: 12px; justify-items: center; text-align: center; max-width: 420px; }
.pb-x { position: absolute; top: 10px; inset-inline-end: 10px; width: 34px; height: 34px; border-radius: 50%; border: 0; background: var(--surface-2); cursor: pointer; font-size: 16px; }
.pb-hero { font-size: 64px; filter: drop-shadow(0 10px 14px rgba(245, 158, 11, .5)); animation: wow-bounce 1.6s ease-in-out infinite; }
.pb h3 { margin: 0; font-size: 24px; }
.pb-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; text-align: start; width: 100%; } .pb-list li { padding: 8px 12px; border-radius: 12px; background: var(--surface-2); font-weight: 700; }
.pb-plans { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; width: 100%; }
.pb-plan { position: relative; display: grid; gap: 4px; justify-items: center; padding: 18px 8px 14px; border-radius: 20px; border: 2px solid var(--border); background: var(--surface); font: inherit; color: var(--ink); cursor: pointer; }
.pb-plan.best { border-color: #F59E0B; background: linear-gradient(160deg, #FFFBEB, #FEF3C7); box-shadow: 0 10px 24px -12px rgba(245, 158, 11, .8); }
.pb-best { position: absolute; top: -11px; padding: 2px 10px; border-radius: 10px; background: #F59E0B; color: #fff; font-style: normal; font-size: 11px; font-weight: 900; }
.pb-ic { font-size: 30px; } .pb-plan strong { font-size: 20px; color: #B45309; } .pb-plan small { color: var(--muted); font-weight: 700; }
.pb-err { color: #DC2626; font-weight: 700; margin: 0; } .pb-note { font-size: 12px; color: var(--muted); margin: 0; }
.pb-bg.busy .pb-plans { opacity: .5; pointer-events: none; }
/* التقرير الأسبوعي */
.pd-jr { margin-top: 14px; } .pd-jr h4 { margin: 0 0 8px; }
.rp { display: grid; gap: 12px; }
.rp-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; } .rp-kpis > div { display: grid; justify-items: center; text-align: center; padding: 10px 4px; border-radius: 14px; background: var(--surface-2); } .rp-kpis b { font-size: 20px; color: #6D28D9; } .rp-kpis small { font-size: 11px; color: var(--muted); font-weight: 700; }
.rp h4 { margin: 4px 0 0; font-size: 15px; }
.rp-bars { display: grid; gap: 6px; } .rp-row { display: grid; grid-template-columns: 9.5em 1fr 3em; gap: 8px; align-items: center; font-size: 13px; font-weight: 700; }
.rp-bar { height: 10px; border-radius: 6px; background: var(--surface-2); overflow: hidden; } .rp-bar i { display: block; height: 100%; border-radius: 6px; background: linear-gradient(90deg, #8B5CF6, #EC4899); }
.rp-two { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; } .rp-box { padding: 10px 12px; border-radius: 14px; } .rp-box.good { background: #ECFDF5; } .rp-box.imp { background: #FFF7ED; } .rp-box h4 { margin: 0 0 4px; } .rp-box ul, .rp-tips { margin: 0; padding-inline-start: 18px; font-size: 13px; line-height: 1.8; } .rp-box p { margin: 0; font-size: 13px; color: var(--muted); }
.rp-meta { margin: 0; font-size: 13px; color: var(--muted); font-weight: 700; }
.rp-print { display: none; }
@media print {
  body.print-rp > *:not(.rp-print) { display: none !important; }
  body.print-rp .rp-print { display: block; padding: 18px; color: #111; background: #fff; }
  .rp-print [data-rp-pdf] { display: none; }
  .rp-ph { display: flex; align-items: center; gap: 14px; border-bottom: 3px solid #8B5CF6; padding-bottom: 10px; margin-bottom: 12px; } .rp-ph img { width: 64px; height: 64px; border-radius: 16px; } .rp-ph h1 { margin: 0; font-size: 22px; } .rp-ph p { margin: 2px 0 0; color: #555; }
  .rp-bar, .rp-bar i, .rp-kpis > div, .rp-box { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}
/* سحب وإفلات */
.dd-pool { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; min-height: 70px; padding: 12px; border-radius: 20px; background: var(--surface-2); }
.dd-it { display: grid; place-items: center; width: 62px; height: 62px; border-radius: 18px; background: #fff; box-shadow: 0 6px 0 #E5E7EB, var(--sh-1); font-size: 38px; cursor: grab; user-select: none; -webkit-user-select: none; position: relative; z-index: 1; }
.dd-it.dragging { z-index: 50; cursor: grabbing; box-shadow: 0 18px 30px -10px rgba(0, 0, 0, .4); }
.dd-it.placed { width: 46px; height: 46px; font-size: 28px; box-shadow: none; background: rgba(255, 255, 255, .85); animation: b2-pop .5s; cursor: default; }
.dd-it.nope { animation: ds-shake .4s; }
.dd-bins { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.dd-bin { display: grid; gap: 6px; align-content: start; min-height: 120px; padding: 10px; border-radius: 22px; border: 3px dashed rgba(0, 0, 0, .12); transition: transform .15s, border-color .15s; }
.dd-bin b { font-size: 15px; } .dd-bin .bin-in { display: flex; flex-wrap: wrap; gap: 6px; }
.dd-bin.over { transform: scale(1.04); border-color: var(--leaf); border-style: solid; box-shadow: 0 0 0 6px rgba(34, 197, 94, .2); }
.dd-farm { background: linear-gradient(160deg, #DCFCE7, #BBF7D0); } .dd-wild { background: linear-gradient(160deg, #FEF3C7, #FDE68A); } .dd-sea { background: linear-gradient(160deg, #E0F2FE, #7DD3FC); } .dd-birds { background: linear-gradient(160deg, #F0F9FF, #DBEAFE); }
.dd-basket { min-height: 180px; background: radial-gradient(circle at 50% 100%, #FDE68A, #FEF3C7 70%); text-align: center; } .dd-basket b { font-size: 22px; }
.dd-q { text-align: center; margin: 0; font-size: 22px; } .dd-q span { font-size: 30px; } .dd-top { text-align: center; color: var(--muted); font-weight: 800; }
/* ===== أداء الموبايل: إيقاف الحركات التي تعيد الرسم كل إطار، والإبقاء على حركات المعالج الرسومي فقط ===== */
.jm::before, .jm-dash, .jr-coin, .jm-sun, .jm-isl.here .jm-land { animation: none !important; }
.jm-isl.here .jm-land { filter: drop-shadow(0 10px 0 rgba(3, 105, 161, .35)) drop-shadow(0 0 16px rgba(253, 224, 71, .9)); }
.acad-scene::after { mix-blend-mode: normal; will-change: opacity; }
.acad-scene.ld-dawn::before, .acad-scene.ld-makkah::before, .acad-scene.ld-madinah::before { animation: none; mix-blend-mode: normal; opacity: .55; }
.acad-scene .ld { will-change: transform; }
.jm-cloud, .jm-boat, .jm-fish, .jm-whale, .jm-me, .jr-node.cur, .hero-pet { will-change: transform; }
@media (pointer: coarse) {
  .ld-wave, .ld-wave2, .ld-rain, .ld-cloud { animation: none; }
  .jm-stars { animation: none; }
  .acad-scene .ld { animation-duration: 30s; }
}
.pr-ai { margin: 6px 0 0; padding: 6px 10px; border-radius: 10px; background: #FFF7ED; color: #9A3412; font-size: 13px; font-weight: 700; } .pr-ai.ok { background: #ECFDF5; color: #166534; }

/* هيدر الكبار على الموبايل: الاسم مايركبش على الأزرار */
.logo-sw { min-width: 0; flex: 1 1 auto; display: flex; align-items: center; gap: 8px; }
.logo-sw > b { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kid-top-r { flex-shrink: 0; }
@media (max-width: 480px) {
  #toAdmin2, #parents { font-size: 0; gap: 0; padding-inline: 10px; }
  #toAdmin2 svg, #parents svg { width: 20px; height: 20px; }
  .logo-sw .mode-pill { display: none; }
  .logo-sw > b { font-size: 1.05rem; }
}
