/* ياسين ومريم — سماء صافية، ورق أبيض، نجوم صفرا. الطفل: كروت كبيرة. الأدمن: هادي ومنظّم. */
:root {
  --sky: #FFF4E2;
  --paper: #FFFFFF;
  --ink: #2E2640;
  --muted: #6F6578;
  --line: #F1DFC3;
  --soft: #FFF8EC;
  --leaf: #2F9461;
  --leaf-ink: #FFFFFF;
  --sun: #FFC83D;
  --sun-ink: #3A2A00;
  --berry: #D94A70;
  --sea: #2E8FBF;
  --good-bg: #DDF3E6; --good: #1E7A4B;
  --warn-bg: #FFEFC7; --warn: #8A5A00;
  --bad-bg: #FBE0E6; --bad: #B4304F;
  --shadow: 0 1px 2px rgba(120, 72, 20, .06), 0 8px 24px rgba(160, 100, 30, .10);
  --f-display: "Baloo Bhaijaan 2", "Readex Pro", system-ui, sans-serif;
  --f-body: "Readex Pro", "Segoe UI", Tahoma, system-ui, sans-serif;
  --r: 18px;
}
:root[data-theme="dark"] {
  --sky: #121A28; --paper: #1B2537; --ink: #EDF2F8; --muted: #9AA8BC; --line: #2B3950; --soft: #18212F;
  --leaf: #45BE80; --leaf-ink: #0B1F14; --sun: #FFD45E; --berry: #F0779A; --sea: #5BB2DE;
  --good-bg: #173A29; --good: #7EDCA9; --warn-bg: #3B300F; --warn: #FFD670; --bad-bg: #401C27; --bad: #FF9AB2;
  --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .25);
  color-scheme: dark;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { min-height: 100%; }
body { margin: 0; background: var(--sky); color: var(--ink); font-family: var(--f-body); font-size: 15px; line-height: 1.6; -webkit-tap-highlight-color: transparent; }
body.no-scroll { overflow: hidden; }
h1, h2, h3 { font-family: var(--f-display); line-height: 1.2; text-wrap: balance; margin: 0; }
h3 { font-size: 1.25rem; }
p { margin: 0; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 3px solid var(--sea); outline-offset: 2px; }
.ic { width: 1.15em; height: 1.15em; flex: none; }
.wrap { max-width: 1080px; margin: 0 auto; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
.muted { color: var(--muted); font-size: .9em; }
.fine { color: var(--muted); font-size: .85rem; text-align: center; }
.err { color: var(--bad); background: var(--bad-bg); padding: 8px 12px; border-radius: 10px; font-size: .9rem; }
.ok { color: var(--good); background: var(--good-bg); padding: 8px 12px; border-radius: 10px; font-size: .9rem; }
.empty { color: var(--muted); padding: 18px 0; text-align: center; }
.sel { user-select: all; }
[dir="rtl"] [dir="ltr"]:not(input) { text-align: right; }
[dir="ltr"] .ic-flip { transform: scaleX(-1); }
.loading { min-height: 60vh; display: grid; place-items: center; animation: bob 1.2s ease-in-out infinite; }
.loading.sm { min-height: 120px; animation: none; color: var(--muted); }

/* أزرار */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 0; border-radius: 14px; padding: 12px 18px; font-weight: 600; font-size: 1rem; transition: transform .12s, filter .12s, background .12s; text-decoration: none; white-space: nowrap; }
.btn:active { transform: scale(.97); }
.btn:disabled, .btn.busy { opacity: .6; pointer-events: none; }
.btn.sm { padding: 7px 12px; font-size: .88rem; border-radius: 11px; }
.btn.wide { width: 100%; }
.btn-leaf { background: var(--leaf); color: var(--leaf-ink); }
.btn-sun { background: var(--sun); color: var(--sun-ink); box-shadow: 0 3px 0 #E0A51A; }
.btn-ink { background: var(--ink); color: var(--paper); }
.btn-ghost { background: var(--paper); color: var(--ink); border: 1.5px solid var(--line); }
.btn-ghost:hover { border-color: var(--muted); }
.btn.danger { color: var(--bad); }
.icon-btn { display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; border: 1.5px solid var(--line); background: var(--paper); color: var(--ink); }
.link { background: none; border: 0; color: var(--sea); font-weight: 600; padding: 4px 0; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
@media (max-width: 420px) { .row2 { grid-template-columns: 1fr; } }

/* حبوب الحالة */
.pill { display: inline-flex; align-items: center; gap: 4px; padding: 3px 10px; border-radius: 99px; font-size: .8rem; font-weight: 600; white-space: nowrap; }
.pill.good { background: var(--good-bg); color: var(--good); }
.pill.warn { background: var(--warn-bg); color: var(--warn); }
.pill.bad { background: var(--bad-bg); color: var(--bad); }
.pill.idle { background: var(--soft); color: var(--muted); border: 1px solid var(--line); }
.chip { justify-self: start; display: inline-block; background: var(--ep, var(--leaf)); color: #fff; padding: 4px 12px; border-radius: 99px; font-size: .85rem; font-weight: 600; }

/* نماذج */
.form { display: grid; gap: 12px; }
.form label { display: grid; gap: 5px; font-size: .9rem; font-weight: 600; color: var(--muted); }
.form input, .form select, .search { width: 100%; border: 1.5px solid var(--line); background: var(--paper); border-radius: 12px; padding: 11px 13px; font-size: 1rem; color: var(--ink); }
.form input:focus, .form select:focus, .search:focus { border-color: var(--sea); outline: none; }
.file { cursor: pointer; }
.file input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.file span { display: flex; align-items: center; gap: 8px; justify-content: center; border: 2px dashed var(--line); border-radius: 14px; padding: 18px; color: var(--ink); background: var(--soft); font-weight: 500; }
.file span em { font-style: normal; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 70vw; }
.file:focus-within span { border-color: var(--sea); }
.card { background: var(--paper); border-radius: var(--r); padding: 18px; box-shadow: var(--shadow); display: grid; gap: 12px; min-width: 0; }
.tabs { display: grid; grid-template-columns: 1fr 1fr; background: var(--soft); border-radius: 14px; padding: 4px; border: 1px solid var(--line); }
.tabs button { border: 0; background: transparent; padding: 9px; border-radius: 10px; font-weight: 600; color: var(--muted); }
.tabs button.on { background: var(--paper); color: var(--ink); box-shadow: var(--shadow); }

/* ===== الدخول ===== */
.auth { min-height: 100vh; min-height: 100svh; display: grid; grid-template-columns: 1.15fr 1fr; }
.auth-hero { position: relative; overflow: hidden; min-height: 320px; background: #BFE3F5; }
.auth-scene { position: absolute; inset: 0; width: 100%; height: 100%; }
.auth-scene g g:nth-child(2) { animation: bob 2.4s ease-in-out infinite; }
.auth-brand { position: absolute; top: 0; inset-inline: 0; padding-inline-end: 110px !important; padding: 28px max(20px, env(safe-area-inset-right, 0px)) 0 max(20px, env(safe-area-inset-left, 0px)); color: #1C2A44; }
.auth-brand h1 { font-size: clamp(2.4rem, 6vw, 4rem); letter-spacing: 0; text-shadow: 0 2px 0 #fff, 0 0 22px rgba(255, 255, 255, .9); }
.auth-brand p { font-size: 1.1rem; max-width: 26ch; font-weight: 600; text-shadow: 0 0 12px rgba(255, 255, 255, .9); }
.auth-box { padding-block: 32px; padding-left: max(20px, env(safe-area-inset-left, 0px)); padding-right: max(20px, env(safe-area-inset-right, 0px)); display: grid; gap: 16px; align-content: center; max-width: 460px; width: 100%; margin: 0 auto; }
.demo-box { background: var(--warn-bg); border-radius: 16px; padding: 14px; display: grid; gap: 8px; }
.demo-box b { color: var(--warn); }
.demo-box p { font-size: .9rem; }
@media (max-width: 780px) {
  .auth { grid-template-columns: 1fr; }
  .auth-hero { min-height: 290px; }
}

/* ===== شاشة الطفل ===== */
.kid-top, .ad-top { background: var(--paper); border-bottom: 1px solid var(--line); position: sticky; top: env(safe-area-inset-top, 0px); z-index: 5; }
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 10; background: var(--paper); }
.kid-top-in, .ad-top-in { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 62px; }
.logo { display: flex; align-items: center; gap: 8px; font-family: var(--f-display); font-size: 1.35rem; }
.logo-faces { display: inline-flex; }
.logo-faces svg { margin-inline-start: -10px; background: var(--soft); border-radius: 50%; }
.logo-faces svg:first-child { margin: 0; }
.prefs { display: inline-flex; gap: 6px; }
.pref-btn { min-width: 36px; height: 36px; padding: 0 8px; display: inline-grid; place-items: center; border-radius: 10px; border: 1.5px solid var(--line); background: var(--paper); color: var(--ink); font-weight: 700; font-size: .9rem; }
.pref-btn:hover { border-color: var(--muted); }
.auth-prefs { position: absolute; top: 16px; inset-inline-end: max(16px, env(safe-area-inset-left, 0px)); z-index: 2; }
.auth-prefs .pref-btn { background: rgba(255, 255, 255, .85); border-color: transparent; color: #1C2A44; }
.tag { font-family: var(--f-body); font-size: .75rem; background: var(--ink); color: var(--paper); padding: 2px 8px; border-radius: 6px; }
.kid-top-r { display: flex; align-items: center; gap: 8px; }
.stars-pill { display: inline-flex; align-items: center; gap: 5px; background: var(--warn-bg); color: var(--warn); padding: 6px 12px; border-radius: 99px; font-weight: 700; font-size: 1.05rem; }
.stars-pill .ic { color: var(--sun); filter: drop-shadow(0 1px 0 #D69A0E); }
.kid { display: grid; gap: 26px; padding-block: 20px 48px; }
.sec-h { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.sub-banner { display: flex; align-items: center; justify-content: space-between; gap: 14px; background: var(--paper); border: 2px solid var(--sun); border-radius: var(--r); padding: 14px 16px; }
.sub-banner.warn { border-color: var(--berry); }
.sub-banner p { color: var(--muted); font-size: .92rem; }

.hero-ep { display: grid; grid-template-columns: 1.4fr 1fr; gap: 0; background: var(--paper); border-radius: 26px; overflow: hidden; box-shadow: var(--shadow); }
.hero-stage { position: relative; border: 0; padding: 0; background: #BFE3F5; aspect-ratio: 16 / 9; max-width: 100%; display: block; width: 100%; }
.hero-stage svg { width: 100%; height: 100%; display: block; }
.big-play { position: absolute; inset: 0; margin: auto; width: 88px; height: 88px; border-radius: 50%; background: var(--sun); color: var(--sun-ink); display: grid; place-items: center; box-shadow: 0 5px 0 #D69A0E, 0 10px 30px rgba(0, 0, 0, .2); animation: pulse 1.8s ease-in-out infinite; }
.big-play .ic { width: 44px; height: 44px; }
.hero-info { padding: 22px; display: grid; gap: 10px; align-content: center; border-inline-start: 6px solid var(--ep); }
.hero-info h2 { font-size: clamp(1.7rem, 3.4vw, 2.5rem); }
.hero-info p { color: var(--muted); font-size: 1.05rem; }
@media (max-width: 720px) { .big-play { width: 66px; height: 66px; } .big-play .ic { width: 32px; height: 32px; } .hero-ep { grid-template-columns: 1fr; } .hero-info { border-inline-start: 0; border-top: 6px solid var(--ep); } }

.games { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
@media (max-width: 720px) { .games { grid-template-columns: repeat(2, 1fr); } }
.game-tile { position: relative; display: grid; justify-items: center; gap: 4px; padding: 14px 8px 12px; border-radius: 22px; border: 0; background: var(--paper); box-shadow: inset 0 -5px 0 var(--g), var(--shadow); font-family: var(--f-display); font-size: 1.1rem; transition: transform .15s; }
.game-tile svg { background: var(--soft); border-radius: 50%; }
.game-tile { padding: 0 0 14px; overflow: hidden; gap: 10px; font-size: 1.2rem; }
.game-cover { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; display: block; }
.game-tile.locked { opacity: 1; }
.game-tile.locked .game-cover { filter: saturate(.35) brightness(.95); }
.game-tile .lk { top: 10px; inset-inline-end: 10px; width: 40px; height: 40px; border-radius: 50%; background: rgba(255,255,255,.92); display: grid; place-items: center; color: var(--ink); box-shadow: var(--shadow); }
.game-tile .lk .ic { width: 22px; height: 22px; }
.game-tile:active { transform: scale(.96); }
.game-tile.locked { opacity: .7; }
.game-tile .lk { position: absolute; top: 10px; inset-inline-end: 10px; color: var(--muted); }

.month { display: grid; grid-template-columns: repeat(6, 1fr); gap: 10px; }
@media (max-width: 640px) { .month { grid-template-columns: repeat(4, 1fr); } }
@media (max-width: 380px) { .month { grid-template-columns: repeat(3, 1fr); } }
.tile { display: grid; grid-template-rows: auto 1fr auto; justify-items: center; gap: 2px; padding: 10px 6px; border-radius: 18px; border: 2px solid transparent; background: var(--paper); min-height: 108px; box-shadow: var(--shadow); text-align: center; transition: transform .12s; }
.tile:active { transform: scale(.96); }
.t-n { font-family: var(--f-display); font-size: 1.7rem; line-height: 1; }
.t-v { font-size: .78rem; color: var(--muted); line-height: 1.3; }
.t-s { display: inline-flex; gap: 2px; align-items: center; color: var(--muted); font-size: .75rem; min-height: 22px; }
.t-open .t-s { color: var(--leaf); }
.t-watched { background: var(--warn-bg); }
.t-watched .t-s .ic { color: var(--sun); filter: drop-shadow(0 1px 0 #D69A0E); width: 20px; height: 20px; }
.t-locked, .t-soon { background: var(--soft); box-shadow: none; border-color: var(--line); }
.t-locked .t-n, .t-soon .t-n { color: var(--muted); }
.t-hero { border-color: var(--leaf); }

/* بوابة الأهل + نوافذ */
.modal { position: fixed; inset: 0; background: rgba(15, 22, 36, .55); display: grid; place-items: center; z-index: 50; padding: 16px; animation: fade .2s; }
.modal-card { background: var(--paper); border-radius: 22px; padding: 20px; width: min(440px, 100%); display: grid; gap: 12px; max-height: 90vh; overflow: auto; }
.gate-q { font-family: var(--f-display); font-size: 1.7rem; text-align: center; margin: 0; }
.gate-ans { font-family: var(--f-display); font-size: 2.2rem; text-align: center; direction: ltr; min-height: 56px; border-radius: 16px; background: var(--soft); border: 2px solid var(--line); display: grid; place-items: center; letter-spacing: .1em; }
.gate-lock { text-align: center; color: var(--berry); font-weight: 600; margin: 0; }
.gate-pad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; direction: ltr; }
.gate-pad .btn { font-size: 1.5rem; min-height: 56px; padding: 0; border-radius: 16px; }
.gate-pad.off { opacity: .4; pointer-events: none; }
.shake { animation: shake .35s; }
.receipt { background: var(--soft); border-radius: 12px; padding: 8px; display: grid; place-items: center; }
.receipt img { max-height: 65vh; border-radius: 8px; }

/* منطقة الأهل */
.parent { display: grid; gap: 22px; padding-block: 20px 48px; max-width: 640px; }
.parent h3 { margin-bottom: 4px; }
.st-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.note { display: flex; gap: 8px; align-items: flex-start; background: var(--warn-bg); color: var(--warn); padding: 10px 12px; border-radius: 12px; font-size: .92rem; }
.plans { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 10px; }
.plan { position: relative; display: grid; gap: 2px; justify-items: start; text-align: start; padding: 16px; border-radius: 18px; border: 2px solid var(--line); background: var(--paper); }
.plan.on { border-color: var(--leaf); box-shadow: 0 0 0 4px var(--good-bg); }
.pl-name { font-weight: 600; color: var(--muted); }
.pl-price { font-family: var(--f-display); font-size: 1.7rem; font-variant-numeric: tabular-nums; }
.save { position: absolute; top: -11px; inset-inline-end: 12px; background: var(--berry); color: #fff; font-size: .75rem; font-weight: 700; padding: 2px 9px; border-radius: 99px; }
.cp { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 1px dashed var(--line); min-width: 0; }
.cp span { color: var(--muted); font-size: .9rem; min-width: 84px; }
.cp b { flex: 1; min-width: 0; overflow-wrap: anywhere; font-variant-numeric: tabular-nums; }
.cp.total { border-bottom: 0; }
.cp.total b { font-family: var(--f-display); font-size: 1.5rem; color: var(--leaf); }
.list { display: grid; gap: 8px; margin-top: 8px; }
.li { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; background: var(--paper); border-radius: 14px; padding: 12px 14px; box-shadow: var(--shadow); }
.li > div { display: grid; min-width: 0; }
.li .full { flex-basis: 100%; }

/* ===== الأدمن ===== */
.admin { min-height: 100%; }
.ad-tabs { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; }
.ad-tabs button { position: relative; display: inline-flex; align-items: center; gap: 6px; border: 0; background: none; padding: 10px 12px; border-bottom: 3px solid transparent; color: var(--muted); font-weight: 600; white-space: nowrap; }
.ad-tabs button.on { color: var(--ink); border-bottom-color: var(--leaf); }
.badge { font-style: normal; background: var(--berry); color: #fff; border-radius: 99px; font-size: .72rem; padding: 0 7px; line-height: 1.6; }
.ad-main { display: grid; gap: 18px; padding-block: 20px 48px; }
.demo-strip { margin-top: 12px; background: var(--warn-bg); color: var(--warn); border-radius: 10px; padding: 8px 12px; font-size: .88rem; }
.kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
@media (max-width: 780px) { .kpis { grid-template-columns: 1fr 1fr; } }
.kpi { background: var(--paper); border-radius: var(--r); padding: 14px 16px; box-shadow: var(--shadow); display: grid; gap: 2px; min-width: 0; }
.kpi span { color: var(--muted); font-size: .85rem; }
.kpi b { font-family: var(--f-display); font-size: 1.7rem; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.kpi em { font-style: normal; font-size: .8rem; color: var(--muted); }
.kpi.warn { box-shadow: inset 0 -4px 0 var(--sun), var(--shadow); }
.ad-grid { display: grid; grid-template-columns: 1.3fr 1fr; gap: 16px; align-items: start; }
.ad-col { display: grid; gap: 16px; min-width: 0; }
@media (max-width: 860px) { .ad-grid { grid-template-columns: 1fr; } }
.bars { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; height: 160px; align-items: end; padding-top: 6px; }
.bar { display: grid; grid-template-rows: auto 1fr auto; height: 100%; justify-items: center; gap: 4px; }
.bar i { align-self: end; width: 70%; min-height: 2px; background: var(--leaf); border-radius: 6px 6px 2px 2px; }
.bar-v { font-size: .72rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.bar-l { font-size: .75rem; color: var(--muted); }
.pays { display: grid; gap: 10px; }
.pay-row { display: grid; grid-template-columns: 1fr auto; gap: 6px 12px; padding: 12px; border-radius: 14px; background: var(--soft); border: 1px solid var(--line); }
.pr-main { display: grid; min-width: 0; }
.pr-meta { display: grid; justify-items: end; text-align: end; }
.pr-meta b { font-variant-numeric: tabular-nums; }
.pr-note { grid-column: 1 / -1; font-size: .88rem; color: var(--muted); }
.pr-act { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.filters { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.chip-btn { border: 1.5px solid var(--line); background: var(--paper); border-radius: 99px; padding: 6px 14px; font-weight: 600; color: var(--muted); }
.chip-btn.on { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.search { flex: 1; min-width: 200px; }
.search.sm { flex: 0 0 auto; width: auto; min-width: 0; }
.tbl-wrap { overflow-x: auto; background: var(--paper); border-radius: var(--r); box-shadow: var(--shadow); }
.tbl { width: 100%; border-collapse: collapse; min-width: 560px; }
.tbl th { text-align: start; font-size: .8rem; color: var(--muted); font-weight: 600; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.tbl td { padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.tbl td b, .tbl td .muted { display: block; }
.tbl .num { font-variant-numeric: tabular-nums; white-space: nowrap; }
.tbl .acts { white-space: nowrap; text-align: end; }
.tbl .acts .btn { margin-inline-start: 4px; }
.eps { display: grid; gap: 8px; }
.ep-row { display: grid; grid-template-columns: 40px minmax(0, 1fr) auto auto auto 36px; align-items: center; gap: 10px; background: var(--paper); border-radius: 14px; padding: 8px 12px; box-shadow: var(--shadow); }
.ep-n { font-family: var(--f-display); font-size: 1.4rem; text-align: center; color: var(--muted); }
.ep-info { display: grid; min-width: 0; }
.ep-title { border: 1px solid transparent; background: transparent; border-radius: 8px; padding: 3px 6px; font-weight: 600; width: 100%; }
.ep-title:hover, .ep-title:focus { border-color: var(--line); background: var(--soft); outline: none; }
.sw { display: inline-flex; align-items: center; gap: 6px; font-size: .85rem; color: var(--muted); }
.sw input { width: 18px; height: 18px; accent-color: var(--leaf); }
.up { cursor: pointer; }
@media (max-width: 640px) {
  .ep-row { grid-template-columns: 34px minmax(0, 1fr) 36px; }
  .ep-row .pill { grid-column: 2; justify-self: start; }
  .ep-row .sw { grid-column: 2; }
  .ep-row .up { grid-column: 2; justify-self: start; }
  .ep-row > :last-child { grid-column: 3; grid-row: 1; }
}
.settings h3 { margin-top: 6px; }

/* ===== المشغّل والألعاب (شاشة كاملة، ثابتة على ليل هادي) ===== */
.player, .game { position: fixed; inset: 0; z-index: 40; background: #0F1726; color: #F4F7FB; display: grid; grid-template-rows: auto 1fr auto auto; padding-top: env(safe-area-inset-top, 0px); padding-bottom: env(safe-area-inset-bottom, 0px); animation: fade .25s; }
.game { grid-template-rows: auto 1fr; background: radial-gradient(120% 80% at 50% 0%, #1E3A5F, #0F1726); }
.pl-top { display: flex; align-items: center; gap: 12px; padding: 10px max(14px, env(safe-area-inset-right, 0px)) 10px max(14px, env(safe-area-inset-left, 0px)); }
.pl-title { flex: 1; display: grid; line-height: 1.25; }
.pl-title b { font-family: var(--f-display); font-size: 1.35rem; }
.pl-day { font-size: .8rem; color: #AFC0D6; }
.pl-btn { width: 48px; height: 48px; border-radius: 16px; border: 0; background: rgba(255, 255, 255, .1); color: #fff; display: grid; place-items: center; }
.pl-btn .ic { width: 24px; height: 24px; }
.pl-btn.off { opacity: .45; }
.pl-play { width: 64px; height: 64px; border-radius: 50%; background: var(--sun); color: #3A2A00; }
.pl-play .ic { width: 30px; height: 30px; }
.pl-stage-wrap { position: relative; display: grid; place-items: center; min-height: 0; overflow: hidden; padding: 0 max(10px, env(safe-area-inset-right, 0px)) 0 max(10px, env(safe-area-inset-left, 0px)); }
.pl-stage { width: 100%; max-height: 100%; aspect-ratio: 16 / 9; max-width: calc((100vh - 260px) * 16 / 9); border-radius: 22px; background: #BFE3F5; display: block; }
@media (max-aspect-ratio: 1/1) { .pl-stage { aspect-ratio: 4 / 3.3; max-width: 100%; } }
.player.video-mode .pl-stage, .player.video-mode .pl-sub, .player.video-mode .pl-choice, .player.video-mode .pl-end { display: none; }
.pl-video { width: 100%; max-height: 100%; border-radius: 18px; background: #000; }
.pl-sub { display: flex; align-items: flex-start; gap: 10px; padding: 14px max(18px, env(safe-area-inset-right, 0px)) 4px max(18px, env(safe-area-inset-left, 0px)); max-width: 980px; margin: 0 auto; width: 100%; min-height: 84px; }
.pl-who { flex: none; font-size: .85rem; font-weight: 700; padding: 3px 10px; border-radius: 99px; background: #2B3A55; color: #fff; margin-top: 6px; }
.pl-who[data-who="yassin"] { background: #3FA66B; }
.pl-who[data-who="mariam"] { background: #E2557A; }
.pl-who[data-who="mama"] { background: #7B6CC4; }
.pl-who[data-who="omar"] { background: #F08A3C; }
.pl-who[data-who="baba"] { background: #2E8FBF; }
.pl-who[data-who="q"] { background: var(--sun); color: #3A2A00; }
.pl-text { font-family: var(--f-display); font-size: clamp(1.3rem, 3.3vw, 2rem); line-height: 1.35; }
.pl-ctrl { display: flex; align-items: center; justify-content: center; gap: 14px; padding: 10px 16px 16px; flex-wrap: wrap; }
.pl-dots { display: flex; gap: 5px; flex-basis: 100%; justify-content: center; order: 5; }
.pl-dots i { width: 8px; height: 8px; border-radius: 99px; background: rgba(255, 255, 255, .2); transition: all .3s; }
.pl-dots i.done { background: rgba(255, 255, 255, .55); }
.pl-dots i.now { width: 22px; background: var(--sun); }
.pl-chip { border: 0; background: rgba(255, 255, 255, .12); color: #fff; border-radius: 99px; padding: 8px 14px; display: inline-flex; gap: 6px; align-items: center; font-weight: 600; }

/* الممثلين والحركة */
.pl-stage .cam { transform-origin: 0 0; transition: transform 2.4s cubic-bezier(.45,.05,.25,1); }
.pl-stage .cam-drift { transform-origin: 400px 260px; animation: kenburns 9s ease-in-out infinite alternate; }
.pl-stage .flash { opacity: 0; }
.pl-stage .flash.go { animation: flashfade .6s ease-out; }
.actor { transition: transform 1.1s cubic-bezier(.4,.1,.3,1); }
.actor .body { transform-box: fill-box; transform-origin: 50% 100%; animation: breathe 2.6s ease-in-out infinite; }
.actor .gshadow { transition: opacity .3s; }
.actor .am, .actor .lg { transform-box: fill-box; transform-origin: 50% 8%; }
.actor .hd { transform-box: fill-box; transform-origin: 50% 92%; }
.actor .eye { transform-box: fill-box; transform-origin: center; animation: blink 4.2s infinite; }
.actor[data-c="mariam"] .eye { animation-delay: 1.3s; }
.actor .mouth { transform-box: fill-box; transform-origin: center; }
.actor.talking .mouth { animation: yap .24s ease-in-out infinite alternate; }
.actor.talking .hd { animation: nod .9s ease-in-out infinite; }
.actor.talking .am-r { animation: gesture 1.4s ease-in-out infinite; }
.actor.talking .am-l { animation: gesture2 1.8s ease-in-out infinite; }
.actor.walking .body { animation: walkbob .32s ease-in-out infinite; }
.actor.walking .lg-l { animation: legA .32s ease-in-out infinite; }
.actor.walking .lg-r { animation: legB .32s ease-in-out infinite; }
.actor.walking .am-l { animation: legB .32s ease-in-out infinite; }
.actor.walking .am-r { animation: legA .32s ease-in-out infinite; }
.actor.holding .am-r { animation: none !important; transform: none !important; }
.actor.m-sad .hd { transform: rotate(-6deg) translateY(4px); transition: transform .5s; }
.actor.m-sad .am { transform: rotate(6deg); }
.actor.m-happy:not(.talking):not(.walking) .am-r { animation: wave 2.6s ease-in-out infinite; }
.actor.cheer .body { animation: cheer .55s cubic-bezier(.3,1.4,.5,1) 2; }
.actor.cheer .am-l { animation: armsup .55s ease-in-out 2; }
.actor.cheer .am-r { animation: armsup2 .55s ease-in-out 2; }
.actor.startle .body { animation: startle .45s ease-out 1; }
.actor.enter .gshadow, .actor.leave .gshadow { opacity: .08; }
.prop { transition: transform 1s cubic-bezier(.3,.1,.3,1), opacity .4s; }
.prop .pin { transform-box: fill-box; transform-origin: 50% 50%; transition: transform 1s cubic-bezier(.3,.1,.3,1); }
.prop.blink { animation: fade .5s; }
.prop.gone { opacity: 0; }
.prop .cup-fall { transform-box: fill-box; transform-origin: 50% 100%; animation: cupfall .55s cubic-bezier(.5,0,.9,.6) forwards; }
.prop .late-in { opacity: 0; animation: fade .2s .5s forwards; }
.float { animation: floatUp 2.2s ease-out both; transform-box: fill-box; }
.pop { animation: popIn .5s cubic-bezier(.3, 1.6, .5, 1) both; transform-box: fill-box; transform-origin: center; }
.dash { animation: dash .8s linear both; stroke-dashoffset: 200; }
@keyframes kenburns { from { transform: scale(1); } to { transform: scale(1.035) translate(-6px, -4px); } }
@keyframes flashfade { 0% { opacity: .9; } 100% { opacity: 0; } }
@keyframes breathe { 50% { transform: scaleY(1.018) scaleX(.995); } }
@keyframes nod { 0%, 100% { transform: rotate(0); } 30% { transform: rotate(3deg); } 70% { transform: rotate(-3deg); } }
@keyframes gesture { 0%, 100% { transform: rotate(0); } 50% { transform: rotate(-38deg); } }
@keyframes gesture2 { 0%, 100% { transform: rotate(0); } 50% { transform: rotate(16deg); } }
@keyframes wave { 0%, 60%, 100% { transform: rotate(0); } 70% { transform: rotate(-120deg); } 80% { transform: rotate(-95deg); } 90% { transform: rotate(-120deg); } }
@keyframes walkbob { 50% { transform: translateY(-9px); } }
@keyframes legA { 50% { transform: rotate(22deg); } }
@keyframes legB { 50% { transform: rotate(-22deg); } }
@keyframes cheer { 50% { transform: translateY(-34px) scaleY(1.04); } }
@keyframes armsup { 50% { transform: rotate(140deg); } }
@keyframes armsup2 { 50% { transform: rotate(-140deg); } }
@keyframes startle { 0% { transform: translateY(0); } 35% { transform: translateY(-16px) scaleX(.97); } 100% { transform: translateY(0); } }
@keyframes cupfall { 0% { transform: translate(0, 0) rotate(0); } 70% { transform: translate(-46px, 92px) rotate(-95deg); opacity: 1; } 100% { transform: translate(-50px, 96px) rotate(-100deg); opacity: 0; } }

/* السؤال */
.pl-choice { position: absolute; inset: 0; margin: auto; display: grid; place-content: center; gap: 18px; background: rgba(15, 23, 38, .78); text-align: center; padding: 16px; animation: fade .3s; border-radius: 22px; }
.ch-q { font-family: var(--f-display); font-size: clamp(1.4rem, 4vw, 2.2rem); }
.ch-q.big { font-size: clamp(1.6rem, 5vw, 2.6rem); text-align: center; }
.ch-opts { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.ch-opt { display: grid; justify-items: center; gap: 8px; padding: 14px 12px; background: #fff; color: #23304A; border: 4px solid transparent; border-radius: 24px; font-family: var(--f-display); font-size: clamp(1rem, 2.6vw, 1.3rem); line-height: 1.25; box-shadow: 0 6px 0 rgba(0, 0, 0, .25); transition: transform .12s; max-width: 260px; }
.ch-opt svg { background: #E4F1F4; border-radius: 50%; max-width: 100%; height: auto; }
.ch-opt:active { transform: translateY(3px); box-shadow: 0 3px 0 rgba(0, 0, 0, .25); }
.ch-opt.right { border-color: #3FA66B; animation: popIn .4s; }
.ch-opt.wrong { animation: shake .4s; border-color: #E2557A; }
.ch-opt.hint { border-color: #FFC83D; animation: glow 1.2s ease-in-out infinite; }
.spark { position: fixed; z-index: 60; color: #FFC83D; pointer-events: none; animation: spark .9s ease-out forwards; }
.spark .ic { width: 26px; height: 26px; }

/* النهاية */
.pl-end { position: absolute; inset: 0; display: grid; place-items: center; background: rgba(15, 23, 38, .93); animation: fade .3s; padding: 16px; }
.end-card { display: grid; gap: 14px; justify-items: center; text-align: center; max-width: 520px; }
.end-badge { background: var(--ep); color: #fff; font-family: var(--f-display); font-size: 1.3rem; padding: 6px 20px; border-radius: 99px; }
.end-moral { font-family: var(--f-display); font-size: clamp(1.6rem, 4.6vw, 2.6rem); line-height: 1.3; }
.end-stars { display: flex; gap: 8px; }
.end-stars i { color: #FFC83D; animation: popIn .5s cubic-bezier(.3, 1.6, .5, 1) both; }
.end-stars i:nth-child(2) { animation-delay: .25s; }
.end-stars .ic { width: 64px; height: 64px; filter: drop-shadow(0 3px 0 #D69A0E); }
.end-actions { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }
.player .btn-ghost, .game .btn-ghost { background: rgba(255, 255, 255, .1); color: #fff; border-color: rgba(255, 255, 255, .2); }

/* الألعاب */
.g-score { display: inline-flex; align-items: center; gap: 6px; background: rgba(255, 255, 255, .1); padding: 8px 14px; border-radius: 99px; font-weight: 700; font-size: 1.2rem; }
.g-score .ic { color: #FFC83D; }
.g-body { position: relative; overflow: hidden; display: grid; place-content: center; gap: 20px; padding: 16px max(16px, env(safe-area-inset-right, 0px)) 24px max(16px, env(safe-area-inset-left, 0px)); min-height: 0; }
.g-opts .ch-opt { max-width: 300px; }
.g-count, .g-hint { text-align: center; color: #AFC0D6; }
.g-hint { font-family: var(--f-display); font-size: 1.3rem; color: #fff; }
.mem { display: grid; gap: 12px; grid-template-columns: repeat(3, minmax(0, 120px)); justify-content: center; }
.mem-8 { grid-template-columns: repeat(4, minmax(0, 120px)); }
.mem-12 { grid-template-columns: repeat(4, minmax(0, 110px)); }
@media (max-width: 480px) { .mem-8, .mem-12 { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.mem-card { position: relative; aspect-ratio: 1; border: 0; border-radius: 20px; padding: 0; background: transparent; perspective: 600px; max-width: 100%; }
.mem-card > span { position: absolute; inset: 0; display: grid; place-items: center; border-radius: 20px; backface-visibility: hidden; transition: transform .4s; }
.mem-back { background: linear-gradient(145deg, #2E8FBF, #3B4F8F); color: #FFC83D; box-shadow: 0 5px 0 rgba(0, 0, 0, .3); }
.mem-back .ic { width: 40%; height: 40%; }
.mem-front { background: #fff; transform: rotateY(180deg); box-shadow: 0 5px 0 rgba(0, 0, 0, .3); }
.mem-front svg { width: 86%; height: auto; }
.mem-card.up .mem-back { transform: rotateY(180deg); }
.mem-card.up .mem-front { transform: rotateY(360deg); }
.mem-card.match .mem-front { box-shadow: 0 0 0 4px #3FA66B, 0 5px 0 rgba(0, 0, 0, .3); }
.sky { position: absolute; inset: 0; z-index: 1; }
.sky-kids { position: absolute; bottom: 0; inset-inline: 0; display: flex; justify-content: center; gap: 4px; pointer-events: none; }
.sky-kids svg { background: rgba(255, 255, 255, .9); border-radius: 50%; animation: bob 2s ease-in-out infinite; }
.balloon { position: absolute; bottom: -140px; width: 100px; border: 0; background: none; padding: 0; animation: rise linear forwards; }
.balloon svg { width: 100%; display: block; animation: sway 2.4s ease-in-out infinite; }
.balloon.popped svg { animation: popOut .3s forwards; }
.g-cheer { display: grid; justify-items: center; gap: 16px; text-align: center; }
.g-cheer-art { display: flex; gap: 6px; }
.g-cheer-art svg { background: #fff; border-radius: 50%; animation: bob 1.4s ease-in-out infinite; }
.g-cheer p { font-family: var(--f-display); font-size: clamp(1.6rem, 5vw, 2.4rem); }

/* إشعار */
.toast { position: fixed; bottom: calc(20px + env(safe-area-inset-bottom, 0px)); left: 50%; transform: translateX(-50%); background: var(--ink); color: var(--paper); padding: 10px 18px; border-radius: 14px; z-index: 70; font-weight: 600; box-shadow: var(--shadow); animation: up .25s; max-width: calc(100% - 32px); text-align: center; }
.toast.good { background: var(--good); color: #fff; }
.toast.bad { background: var(--bad); color: #fff; }
.toast.out { opacity: 0; transition: opacity .4s; }

@keyframes bob { 50% { transform: translateY(-6px); } }
@keyframes talk { 50% { transform: translateY(-5px) scaleY(1.015); } }
@keyframes walk { 50% { transform: translateY(-8px) rotate(2deg); } }
@keyframes yap { from { transform: scaleY(1); } to { transform: scaleY(.35); } }
@keyframes blink { 0%, 94%, 100% { transform: scaleY(1); } 97% { transform: scaleY(.1); } }
@keyframes fade { from { opacity: 0; } }
@keyframes up { from { opacity: 0; transform: translate(-50%, 10px); } }
@keyframes pulse { 50% { transform: scale(1.07); } }
@keyframes shake { 25% { transform: translateX(-8px); } 75% { transform: translateX(8px); } }
@keyframes glow { 50% { box-shadow: 0 0 0 8px rgba(255, 200, 61, .35), 0 6px 0 rgba(0, 0, 0, .25); } }
@keyframes popIn { from { transform: scale(.3); opacity: 0; } }
@keyframes floatUp { from { opacity: 0; transform: translateY(30px) scale(.5); } 30% { opacity: 1; } to { opacity: 0; transform: translateY(-80px) scale(1); } }
@keyframes dash { to { stroke-dashoffset: 0; } }
@keyframes spark { to { transform: translate(var(--dx), var(--dy)) scale(.4); opacity: 0; } }
@keyframes rise { to { transform: translateY(calc(-100vh - 160px)); } }
@keyframes sway { 50% { transform: rotate(6deg) translateX(6px); } }
@keyframes popOut { to { transform: scale(1.6); opacity: 0; } }
@media (prefers-reduced-motion: reduce) {
  .rw-confetti { display: none; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .balloon { animation-duration: 12s !important; animation-iteration-count: 1 !important; }
}

/* فيديو الحلقة */
.hero-poster { width: 100%; height: 100%; object-fit: cover; display: block; }
.player .ch-story { display: none; }
.player.video-mode .ch-story { display: inline-flex; }
.player.video-mode .ch-video, .player.video-mode .pl-ctrl .pl-btn, .player.video-mode .pl-dots { display: none; }
.player.video-mode .pl-stage-wrap { padding-block: 8px; }
.pl-ar-cap { position: absolute; top: 16px; left: 50%; transform: translateX(-50%); z-index: 3; max-width: min(92%, 680px); display: flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 16px; background: rgba(15, 23, 38, .84); color: #fff; pointer-events: none; }
.pl-ar-cap p { margin: 0; font-family: var(--f-display); font-size: clamp(1.05rem, 2.6vw, 1.55rem); line-height: 1.35; }
.pl-ar-cap[hidden], .player:not(.video-mode) .pl-ar-cap { display: none !important; }

/* شكل تطبيق الموبايل */
.install { display: flex; align-items: center; gap: 12px; background: var(--paper); border-radius: var(--r); padding: 10px 12px; box-shadow: var(--shadow); }
.install > div { flex: 1; min-width: 0; }
.install p { color: var(--muted); font-size: .85rem; }
.install-ic svg { background: var(--soft); border-radius: 12px; display: block; }
.steps { margin: 0; padding-inline-start: 22px; display: grid; gap: 8px; font-size: 1.05rem; }
.tabbar { display: none; }
@media (max-width: 720px) {
  .tabbar { display: grid; grid-template-columns: repeat(4, 1fr); position: fixed; inset: auto 0 0 0; z-index: 20; background: var(--paper); border-top: 1px solid var(--line);
    padding: 6px max(8px, env(safe-area-inset-right, 0px)) calc(6px + env(safe-area-inset-bottom, 0px)) max(8px, env(safe-area-inset-left, 0px)); }
  .tabbar button { display: grid; justify-items: center; gap: 2px; border: 0; background: none; color: var(--muted); font-size: .75rem; font-weight: 600; padding: 6px 0; border-radius: 12px; }
  .tabbar button:active { background: var(--soft); color: var(--ink); }
  .tabbar .ic { width: 24px; height: 24px; }
  .kid { padding-bottom: calc(96px + env(safe-area-inset-bottom, 0px)); }
  .kid section[id] { scroll-margin-top: 76px; }
  .kid-top #parents, .kid-top #toAdmin { display: none; }
  .toast { bottom: calc(84px + env(safe-area-inset-bottom, 0px)); }
}
@media (display-mode: standalone) { body { overscroll-behavior: none; -webkit-user-select: none; user-select: none; } input, textarea { -webkit-user-select: text; user-select: text; } }

/* لعبة الجري */
.g-body.g-full { display: block; padding: 0; position: relative; touch-action: none; }
.run-pick { position: absolute; inset: 0; display: grid; place-content: center; gap: 18px; padding: 16px; text-align: center; }
.run-canvas { display: block; width: 100%; height: 100%; touch-action: none; }
.run-hud { position: absolute; top: 10px; inset-inline: 12px; display: flex; justify-content: space-between; align-items: center; pointer-events: none; }
.run-hearts { display: flex; gap: 4px; }
.run-hearts i { color: #E2557A; filter: drop-shadow(0 2px 0 rgba(0,0,0,.2)); }
.run-hearts i.off { color: rgba(255,255,255,.55); }
.run-hearts svg { width: 30px; height: 26px; display: block; }
.run-dist { background: rgba(255,255,255,.85); color: #23304A; font-weight: 700; padding: 4px 12px; border-radius: 99px; font-variant-numeric: tabular-nums; }
.run-pad { position: absolute; bottom: calc(14px + env(safe-area-inset-bottom, 0px)); inset-inline: 0; display: flex; justify-content: center; gap: 18px; }
.run-btn { width: 74px; height: 74px; border-radius: 50%; border: 0; background: rgba(255,255,255,.9); color: #23304A; display: grid; place-items: center; box-shadow: 0 5px 0 rgba(0,0,0,.25); touch-action: none; }
.run-btn:active { transform: translateY(3px); box-shadow: 0 2px 0 rgba(0,0,0,.25); }
.run-btn .ic { width: 38px; height: 38px; }
.run-jump { background: #FFC83D; color: #3A2A00; }
.run-over { position: absolute; inset: 0; display: grid; place-items: center; background: rgba(15,23,38,.72); animation: fade .3s; padding: 16px; }
.run-best { color: #FFE17A; font-weight: 700; }

/* مكافآت الجري والمحل */
.run-wallet { display: inline-flex; align-items: center; gap: 6px; justify-self: center; background: rgba(255,255,255,.12); color: #fff; padding: 6px 14px; border-radius: 99px; font-size: 1.1rem; }
.run-wallet .ic { color: #FFC83D; } .run-wallet b { font-size: 1.3rem; font-variant-numeric: tabular-nums; } .run-wallet span { color: #AFC0D6; font-size: .85rem; }
.run-wallet.sm { padding: 4px 10px; }
.run-gift { justify-self: center; background: #FFC83D; color: #3A2A00; font-weight: 800; padding: 8px 16px; border-radius: 14px; animation: popIn .5s cubic-bezier(.3,1.6,.5,1); }
.run-shopbtn { justify-self: center; }
.run-pw { display: flex; gap: 6px; }
.pw-chip { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: conic-gradient(#FFC83D calc(var(--p) * 360deg), rgba(255,255,255,.35) 0); padding: 4px; }
.pw-chip img { width: 100%; height: 100%; object-fit: contain; background: #fff; border-radius: 50%; padding: 4px; }
.run-banner { position: absolute; top: 22%; left: 50%; transform: translateX(-50%); background: rgba(255,255,255,.95); color: #23304A; font-family: var(--f-display); font-size: clamp(1.3rem, 5vw, 2rem); padding: 8px 22px; border-radius: 18px; box-shadow: 0 6px 0 rgba(0,0,0,.15); white-space: nowrap; pointer-events: none; z-index: 3; }
.run-banner.show { animation: popIn .45s cubic-bezier(.3,1.6,.5,1); }
.run-shop { position: absolute; inset: 0; overflow-y: auto; padding: 12px max(16px, env(safe-area-inset-right, 0px)) 24px max(16px, env(safe-area-inset-left, 0px)); display: grid; gap: 10px; align-content: start; }
.run-shop-top { display: flex; align-items: center; gap: 12px; font-family: var(--f-display); font-size: 1.4rem; }
.run-shop-top b { flex: 1; }
.run-shop h4 { margin: 8px 0 0; font-family: var(--f-display); font-size: 1.15rem; color: #AFC0D6; }
.shop-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 10px; }
.shop-item { display: grid; justify-items: center; gap: 6px; padding: 12px 8px; border-radius: 18px; border: 3px solid transparent; background: #fff; color: #23304A; font-weight: 700; box-shadow: 0 4px 0 rgba(0,0,0,.25); }
.shop-item.on { border-color: #3FA66B; }
.shop-item.poor { opacity: .55; }
.shop-item .sw { width: 54px; height: 54px; border-radius: 50%; box-shadow: inset 0 -4px 0 rgba(0,0,0,.15); }
.shop-item .hatpv { width: 64px; height: 54px; }
.shop-item .nm { font-size: .85rem; text-align: center; }
.shop-item .pr { display: inline-flex; align-items: center; gap: 3px; font-size: .9rem; color: #8A5A00; }
.shop-item .pr .ic { color: #FFC83D; width: 16px; height: 16px; }
.bal-canvas { cursor: pointer; }
.bal-hud { position: absolute; top: 10px; inset-inline: 12px; display: flex; align-items: center; gap: 10px; pointer-events: none; }
.bal-level { background: rgba(255,255,255,.9); color: #23304A; font-weight: 800; padding: 4px 12px; border-radius: 99px; }
.bal-bar { flex: 1; height: 12px; background: rgba(255,255,255,.5); border-radius: 99px; overflow: hidden; }
.bal-bar i { display: block; height: 100%; width: 0; background: #FFC83D; border-radius: 99px; transition: width .3s; }

/* أزرار صوت الألعاب */
.gs-btns { display: inline-flex; gap: 6px; }
.gs-btn { width: 44px; height: 44px; position: relative; }
.gs-btn .ic { width: 22px; height: 22px; }
.gs-btn.off { opacity: .45; }
.gs-btn.off::after { content: ""; position: absolute; width: 26px; height: 3px; background: currentColor; border-radius: 3px; transform: rotate(-45deg); }
@media (max-width: 420px) { .game .pl-title b { font-size: 1.1rem; } .gs-btn { width: 40px; height: 40px; } }

body.no-scroll .toast { bottom: calc(120px + env(safe-area-inset-bottom, 0px)); z-index: 80; }

/* الجري 3D */
.r3-wrap { position: absolute; inset: 0; }
.r3-wrap canvas { display: block; width: 100% !important; height: 100% !important; }
.r3-loading { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 12px; color: #fff; font-family: var(--f-display); font-size: 1.3rem; }
.r3-loading svg { animation: bob 1s ease-in-out infinite; background: #fff; border-radius: 50%; }
.r3-hud { align-items: flex-start; }
.r3-score { background: rgba(255,255,255,.92); color: #23304A; font-family: var(--f-display); font-size: 1.6rem; line-height: 1; padding: 8px 14px; border-radius: 14px; min-width: 70px; text-align: center; font-variant-numeric: tabular-nums; box-shadow: 0 3px 0 rgba(0,0,0,.15); }
.pw-chip b { display: grid; place-items: center; width: 100%; height: 100%; background: #fff; border-radius: 50%; font-size: 1.1rem; color: #8B6CC9; }
.r3-chase { position: absolute; top: 64px; left: 50%; transform: translateX(-50%); display: flex; align-items: center; gap: 8px; background: rgba(226,85,122,.92); color: #fff; font-weight: 800; padding: 6px 14px 6px 6px; border-radius: 99px; animation: pulse 1s ease-in-out infinite; pointer-events: none; }
.r3-chase img { width: 36px; height: 36px; background: #fff; border-radius: 50%; }
.r3-pad { gap: 12px; }
.r3-pad .run-btn { width: 66px; height: 66px; }
.run-roll { background: #8FD0F2; }
.r3-over { overflow-y: auto; }
.r3-card { display: grid; justify-items: center; gap: 10px; text-align: center; color: #fff; max-width: 380px; width: 100%; padding: 8px; }
.r3-pup { width: 96px; height: 96px; background: #fff; border-radius: 50%; animation: popIn .5s cubic-bezier(.3,1.6,.5,1); }
.r3-caught { font-family: var(--f-display); font-size: 1.7rem; }
.r3-stars { display: flex; gap: 6px; }
.r3-stars i { color: rgba(255,255,255,.25); }
.r3-stars i.on { color: #FFC83D; animation: popIn .5s cubic-bezier(.3,1.6,.5,1) both; filter: drop-shadow(0 3px 0 #D69A0E); }
.r3-stars .ic { width: 58px; height: 58px; }
.r3-word { font-family: var(--f-display); font-size: 1.5rem; color: #FFE17A; }
.r3-rows { display: grid; grid-template-columns: 1fr auto; gap: 6px 18px; width: 100%; background: rgba(255,255,255,.1); border-radius: 16px; padding: 12px 16px; text-align: start; }
.r3-rows span { color: #AFC0D6; } .r3-rows b { font-variant-numeric: tabular-nums; }
.r3-rows .tot { color: #fff; font-family: var(--f-display); font-size: 1.3rem; }
.r3-card .btn .ic { color: #3A2A00; width: 18px; height: 18px; }

.r3-over { background: rgba(15,23,38,.86); }

/* ===== شاشة الطفل: أزرار كبيرة وحواف مدوّرة ===== */
.kid-top { border-bottom: 0; box-shadow: 0 2px 12px rgba(160, 100, 30, .08); }
.pref-btn { min-width: 44px; height: 44px; border-radius: 14px; }
.stars-pill { padding: 8px 14px; font-size: 1.2rem; }
.stars-pill .ic { width: 22px; height: 22px; }
.logo-faces svg { border: 2px solid #fff; box-shadow: 0 1px 4px rgba(0,0,0,.12); }
.kid .sec-h h3 { font-size: 1.5rem; }
.hero-ep { border-radius: 30px; }
.hero-stage { background: #FFE3B8; }
.games { gap: 14px; }
.game-tile { border-radius: 26px; }
.tile { border-radius: 22px; min-height: 116px; }
.t-n { font-size: 1.9rem; }
.t-open { background: #EAF7EF; }
.t-hero { border-width: 3px; box-shadow: 0 0 0 4px rgba(47, 148, 97, .15), var(--shadow); }
.sub-banner { border-radius: 24px; }
.btn { border-radius: 16px; }
.btn-sun { box-shadow: 0 4px 0 #E0A51A; }
@media (max-width: 720px) {
  .tabbar { border-top: 0; border-radius: 26px 26px 0 0; box-shadow: 0 -4px 18px rgba(160, 100, 30, .12); padding-top: 8px; }
  .tabbar button { font-size: .8rem; padding: 8px 0; gap: 4px; border-radius: 16px; min-height: 60px; }
  .tabbar .ic { width: 30px; height: 30px; }
  .tabbar button:nth-child(1) { color: var(--sea); }
  .tabbar button:nth-child(2) { color: var(--berry); }
  .tabbar button:nth-child(3) { color: #E07A2E; }
  .kid { padding-bottom: calc(110px + env(safe-area-inset-bottom, 0px)); }
}

/* ===== RTL والموبايل: الهيدر والنصوص الطويلة ===== */
.kid-top-in, .ad-top-in { min-width: 0; }
.kid-top-r { flex-shrink: 0; }
.logo { min-width: 0; }
.logo b { line-height: 1.1; }
.game-tile b { padding-inline: 8px; line-height: 1.25; text-wrap: balance; }
@media (max-width: 520px) {
  .ad-top .tag, .ad-top #kidView .lbl { display: none; }
  .ad-top .kid-top-r { gap: 6px; }
  .ad-top .logo b { font-size: 1.05rem; white-space: nowrap; }
  .ad-top .logo-faces svg:last-child { display: none; }
  .ad-top .pref-btn, .ad-top .btn.sm { min-width: 40px; height: 40px; padding: 0 8px; }
  .game-tile { font-size: 1.05rem; }
  [lang="en"] .kid-top .logo b { font-size: 1.1rem; }
}
.kid, .parent { grid-template-columns: minmax(0, 1fr); }
.games { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 720px) { .games { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.install > div { min-width: 0; }
@media (max-width: 420px) { .kid-top-r > b { display: none; } }
.month { grid-template-columns: repeat(6, minmax(0, 1fr)); }
@media (max-width: 640px) { .month { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (max-width: 380px) { .month { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.t-v { hyphens: auto; }

/* ===== المكافآت: الملصقات والاحتفال ===== */
button.stars-pill { border: 0; cursor: pointer; font-family: inherit; }
button.stars-pill:active { transform: scale(.95); }
.stk { position: relative; display: inline-grid; place-items: center; border-radius: 50%; background: var(--sb, #FFF1CF); border: 4px solid #fff; box-shadow: 0 3px 0 rgba(0,0,0,.08), 0 6px 16px rgba(160,100,30,.18); padding: 4px; }
.stk svg { display: block; border-radius: 50%; }
.stk-off { background: #EFE7DA; }
.stk-off svg { filter: grayscale(1) brightness(.55) contrast(.7); opacity: .35; }
.stk-q { position: absolute; inset: 0; display: grid; place-items: center; font-family: var(--f-display); font-size: 2rem; color: #9C8E7A; }
[data-theme="dark"] .stk-off { background: #2B3950; }
[data-theme="dark"] .stk { border-color: #3A4A66; }

.rw-card { display: flex; align-items: center; gap: 14px; background: var(--paper); border-radius: 26px; padding: 14px 16px; box-shadow: var(--shadow); border: 2px dashed var(--line); }
.rw-next { border: 0; background: none; padding: 0; flex: none; animation: bob 2.4s ease-in-out infinite; }
.rw-mid { flex: 1; min-width: 0; display: grid; gap: 4px; }
.rw-mid b { font-family: var(--f-display); font-size: 1.25rem; }
.rw-dots { display: flex; gap: 6px; }
.rw-dots i { display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: var(--soft); border: 2px solid var(--line); color: var(--line); }
.rw-dots i.on { background: #FFF1CF; border-color: var(--sun); color: var(--sun); }
.rw-dots .ic { width: 22px; height: 22px; }
.rw-dots i.on .ic { filter: drop-shadow(0 1px 0 #D69A0E); }
.rw-book { flex: none; display: grid; justify-items: center; gap: 2px; border: 0; border-radius: 18px; background: var(--sun); color: var(--sun-ink); padding: 10px 12px; font-weight: 700; box-shadow: 0 4px 0 #E0A51A; min-width: 64px; }
.rw-book .ic { width: 28px; height: 28px; }
.rw-book:active, .rw-next:active { transform: scale(.95); }

.rw-layer { position: fixed; inset: 0; z-index: 70; display: grid; place-items: center; padding: 16px; background: rgba(46, 38, 64, .55); animation: fade .2s; }
.rw-sheet { background: var(--paper); color: var(--ink); border-radius: 30px; padding: 22px 18px; width: min(460px, 100%); max-height: 90vh; overflow: auto; display: grid; gap: 14px; justify-items: center; text-align: center; box-shadow: 0 20px 60px rgba(0,0,0,.25); }
.rw-pop { animation: popIn .45s cubic-bezier(.3, 1.6, .5, 1) both; position: relative; z-index: 2; }
.rw-title { font-family: var(--f-display); font-size: 2.4rem; line-height: 1; color: var(--berry); }
.rw-stars { display: flex; gap: 8px; min-height: 76px; }
.rw-stars i { color: var(--sun); animation: starIn .6s cubic-bezier(.3, 1.6, .5, 1) both; }
.rw-stars .ic { width: 72px; height: 72px; filter: drop-shadow(0 4px 0 #D69A0E); }
@keyframes starIn { 0% { transform: translateY(-80px) scale(.2) rotate(-90deg); opacity: 0; } 100% { transform: none; opacity: 1; } }
.rw-new { display: grid; justify-items: center; gap: 8px; }
.rw-new .stk { animation: stickerIn .9s cubic-bezier(.3, 1.6, .5, 1) .9s both, wobble 1.6s ease-in-out 1.8s 2; }
.rw-new b { font-family: var(--f-display); font-size: 1.4rem; }
.rw-ribbon { background: var(--berry); color: #fff; font-weight: 800; padding: 5px 16px; border-radius: 99px; font-size: 1rem; animation: popIn .4s .7s both; }
@keyframes stickerIn { 0% { transform: scale(0) rotate(-200deg); } 100% { transform: scale(1) rotate(-4deg); } }
@keyframes wobble { 25% { transform: rotate(6deg) scale(1.05); } 75% { transform: rotate(-8deg) scale(1.05); } }
.rw-prog { width: 100%; display: grid; gap: 10px; }
.rw-bar { height: 22px; border-radius: 99px; background: var(--soft); border: 2px solid var(--line); overflow: hidden; }
.rw-bar span { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, #FFC83D, #F08A3C); transition: width 1s cubic-bezier(.3, 1.3, .5, 1); }
[dir="rtl"] .rw-bar span { background: linear-gradient(270deg, #FFC83D, #F08A3C); }
.rw-prog-r { display: flex; align-items: center; justify-content: center; gap: 10px; font-weight: 600; color: var(--muted); }
.rw-actions { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }
.rw-actions .btn { min-height: 52px; font-size: 1.1rem; padding-inline: 22px; }

.rw-confetti { position: absolute; inset: 0; overflow: hidden; pointer-events: none; z-index: 1; }
.rw-confetti i { position: absolute; top: -20px; left: var(--x); width: 10px; height: 16px; border-radius: 3px; background: var(--c); animation: confetti 2.6s ease-in var(--d) forwards; }
@keyframes confetti { 0% { transform: translateY(0) rotate(0); opacity: 1; } 100% { transform: translateY(110vh) rotate(var(--rot)); opacity: .9; } }

.rw-bookview .rw-sheet { width: min(560px, 100%); }
.rw-head { width: 100%; display: flex; align-items: center; gap: 10px; }
.rw-head h3 { font-size: 1.5rem; }
.rw-x { margin-inline-start: auto; width: 44px; height: 44px; border-radius: 14px; }
.rw-grid { width: 100%; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px 10px; padding: 6px 0; }
.rw-slot { display: grid; justify-items: center; gap: 6px; }
.rw-slot .stk { transform: rotate(var(--r)); }
.rw-slot.got .stk { animation: popIn .4s both; }
.rw-slot span { font-weight: 700; font-size: .95rem; display: inline-flex; align-items: center; gap: 3px; color: var(--ink); }
.rw-slot:not(.got) span { color: var(--muted); font-size: .85rem; }
.rw-slot span .ic { width: 15px; height: 15px; color: var(--sun); }
@media (max-width: 380px) { .rw-slot .stk svg { width: 70px; height: 70px; } }

/* ===== الحلقات المقفولة: مشوّقة مش فاضية ===== */
.tile { position: relative; overflow: hidden; isolation: isolate; }
.t-peek { position: absolute; inset: 0; z-index: -1; }
.t-peek svg, .t-peek img { width: 100%; height: 100%; object-fit: cover; display: block; filter: blur(3px) saturate(1.1); transform: scale(1.15); opacity: .55; }
.t-locked:has(.t-peek) { background: #FFF1DC; border-color: #F5D9A8; }
.t-locked:has(.t-peek) .t-n, .t-locked:has(.t-peek) .t-v { color: var(--ink); text-shadow: 0 1px 0 rgba(255,255,255,.8); }
.t-badge { display: inline-flex; align-items: center; gap: 3px; border-radius: 99px; padding: 2px 8px; font-size: .72rem; font-weight: 700; white-space: nowrap; }
.t-badge .ic { width: 13px; height: 13px; }
.t-badge.soon { background: #ECE3F7; color: #6A4FB0; }
.t-badge.lockb { background: var(--soft); color: var(--muted); padding: 3px 6px; }
.t-badge.wait { background: rgba(255,255,255,.85); color: var(--warn); }
.t-badge.next { background: var(--berry); color: #fff; animation: pulse 1.6s ease-in-out infinite; }
.t-next { border-color: var(--berry) !important; border-width: 3px !important; box-shadow: 0 0 0 4px rgba(217, 74, 112, .14), var(--shadow) !important; }
.t-cd { font-family: var(--f-display); font-size: .78rem; font-weight: 700; direction: ltr; color: var(--berry); }
.t-soon { background: repeating-linear-gradient(135deg, var(--soft) 0 10px, #F6EEE2 10px 20px); }
.wiggle { animation: wiggle .5s; }
@keyframes wiggle { 20% { transform: rotate(-5deg); } 40% { transform: rotate(5deg); } 60% { transform: rotate(-3deg); } 80% { transform: rotate(2deg); } }

.nx-card { display: flex; align-items: center; gap: 14px; background: var(--paper); border-radius: 26px; padding: 12px; box-shadow: var(--shadow); border: 2px solid #F5C9D5; }
.nx-art { position: relative; flex: none; width: 128px; aspect-ratio: 16 / 10; border-radius: 18px; overflow: hidden; }
.nx-art > svg, .nx-art > img { width: 100%; height: 100%; object-fit: cover; display: block; filter: blur(4px); transform: scale(1.15); }
.nx-gift { position: absolute; inset: 0; margin: auto; width: 46px; height: 46px; border-radius: 50%; background: rgba(255,255,255,.92); display: grid; place-items: center; color: var(--berry); box-shadow: var(--shadow); animation: bob 2s ease-in-out infinite; }
.nx-gift .ic { width: 24px; height: 24px; }
.nx-info { display: grid; gap: 4px; min-width: 0; }
.nx-badge { justify-self: start; background: var(--berry); color: #fff; font-size: .8rem; font-weight: 700; padding: 3px 10px; border-radius: 99px; }
.nx-info b { font-family: var(--f-display); font-size: 1.3rem; line-height: 1.2; }
.nx-cd { display: inline-flex; align-items: center; gap: 6px; font-family: var(--f-display); font-size: 1.35rem; color: var(--berry); }
.nx-cd span { direction: ltr; }

.new-ribbon { justify-self: start; display: inline-flex; align-items: center; gap: 4px; background: var(--sun); color: var(--sun-ink); font-weight: 800; font-size: .85rem; padding: 4px 12px; border-radius: 99px; box-shadow: 0 3px 0 #E0A51A; animation: pulse 1.8s ease-in-out infinite; }
.new-ribbon .ic { width: 16px; height: 16px; }

/* ===== أيام ورا بعض ===== */
.dl-card { background: var(--paper); border-radius: 26px; padding: 14px 16px; box-shadow: var(--shadow); display: grid; gap: 12px; }
.dl-head { display: flex; align-items: center; gap: 10px; }
.dl-flame { display: inline-flex; align-items: center; gap: 4px; background: var(--soft); color: var(--muted); border-radius: 99px; padding: 5px 12px 5px 10px; font-family: var(--f-display); font-size: 1.3rem; }
.dl-flame .ic { width: 26px; height: 26px; }
.dl-flame.hot { background: #FFE9D1; color: #E07A2E; }
.dl-flame.hot .ic { animation: spin 8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.dl-msg { font-family: var(--f-display); font-size: 1.1rem; line-height: 1.3; }
.dl-week { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.dl-day { display: grid; justify-items: center; gap: 4px; }
.dl-day i { width: 40px; height: 40px; max-width: 100%; aspect-ratio: 1; border-radius: 50%; display: grid; place-items: center; background: var(--soft); border: 2px dashed var(--line); color: var(--sun); }
.dl-day.on i { background: #FFF1CF; border: 2px solid var(--sun); }
.dl-day.on .ic { width: 22px; height: 22px; filter: drop-shadow(0 1px 0 #D69A0E); animation: popIn .4s both; }
.dl-day.today i { border-color: var(--leaf); border-style: solid; box-shadow: 0 0 0 3px rgba(47,148,97,.15); }
.dl-day em { font-style: normal; font-size: .72rem; color: var(--muted); font-weight: 600; white-space: nowrap; }
.dl-day.today em { color: var(--leaf); font-weight: 800; }

/* ===== تحية ياسين ومريم ===== */
.gr-layer { position: fixed; inset: 0; z-index: 65; display: grid; align-items: end; justify-items: center; padding: 16px 16px calc(100px + env(safe-area-inset-bottom, 0px)); background: rgba(46, 38, 64, .25); animation: fade .25s; }
.gr-layer.out { animation: fadeOut .35s forwards; }
@keyframes fadeOut { to { opacity: 0; } }
.gr-card { display: flex; align-items: flex-end; gap: 10px; border: 0; background: none; padding: 0; width: min(440px, 100%); animation: greetUp .6s cubic-bezier(.3, 1.5, .5, 1) both; text-align: start; }
.gr-card > svg { flex: none; filter: drop-shadow(0 6px 14px rgba(0,0,0,.2)); animation: bob 1.6s ease-in-out infinite; }
.gr-bubble { position: relative; flex: 1; background: var(--paper); color: var(--ink); border-radius: 24px; padding: 14px 16px; box-shadow: 0 10px 30px rgba(0,0,0,.18); display: grid; gap: 4px; margin-bottom: 40px; }
.gr-bubble b { font-family: var(--f-display); font-size: 1.5rem; color: var(--berry); line-height: 1.1; }
.gr-bubble span { font-size: 1.05rem; font-weight: 600; }
@keyframes greetUp { from { transform: translateY(120px); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .gr-card, .gr-card > svg, .t-badge.next, .new-ribbon, .rw-next, .nx-gift { animation: none !important; } }
.t-v { overflow-wrap: break-word; }
[data-theme="dark"] .t-open { background: #173A29; }
[data-theme="dark"] .t-soon { background: repeating-linear-gradient(135deg, #18212F 0 10px, #1D2839 10px 20px); }
[data-theme="dark"] .t-locked:has(.t-peek) { background: #2E2540; border-color: #6B3F5E; }
[data-theme="dark"] .t-locked:has(.t-peek) .t-n, [data-theme="dark"] .t-locked:has(.t-peek) .t-v { color: var(--ink); text-shadow: 0 1px 2px rgba(0,0,0,.7); }
[data-theme="dark"] .t-peek svg, [data-theme="dark"] .t-peek img { opacity: .35; }
[data-theme="dark"] .t-badge.wait { background: rgba(27,37,55,.85); color: var(--warn); }
[data-theme="dark"] .t-badge.soon { background: #3A2F55; color: #C9B6F2; }
[data-theme="dark"] .nx-card { border-color: #6B3F5E; }
[data-theme="dark"] .dl-flame.hot { background: #4A2E1A; color: #FFB070; }
[data-theme="dark"] .dl-day.on i { background: #3B300F; }
.t-v { overflow-wrap: anywhere; }
[lang="en"] .t-v { font-size: .7rem; }

/* ===== صفحة الاشتراك ===== */
.sub-cta { min-height: 54px; font-size: 1.1rem; }
.perks { justify-items: start; }
.perks-art { display: flex; }
.perks-art svg { border: 3px solid #fff; border-radius: 50%; box-shadow: var(--shadow); }
.perks-art svg + svg { margin-inline-start: -14px; }
.perks ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.perks li { display: flex; align-items: center; gap: 10px; font-weight: 600; }
.perks li .ic { width: 26px; height: 26px; flex: none; padding: 5px; box-sizing: content-box; border-radius: 10px; background: var(--good-bg); color: var(--good); }

/* ===== تحكم الأهل ===== */
.ctl { gap: 16px; }
.ctl h3 { display: flex; align-items: center; gap: 8px; }
.ctl-safe { display: flex; align-items: center; gap: 8px; background: var(--good-bg); color: var(--good); border-radius: 12px; padding: 8px 12px; font-size: .9rem; font-weight: 600; }
.ctl-safe .ic { flex: none; }
.ctl-row { display: grid; gap: 8px; padding-top: 14px; border-top: 1px dashed var(--line); }
.ctl-row > b { font-size: 1.02rem; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chips .chip-btn { min-height: 40px; padding: 6px 14px; }
.ctl-bar { height: 12px; border-radius: 99px; background: var(--soft); border: 1.5px solid var(--line); overflow: hidden; }
.ctl-bar span { display: block; height: 100%; background: linear-gradient(90deg, var(--leaf), var(--sun)); border-radius: 99px; }
.sw { display: flex; align-items: center; gap: 10px; cursor: pointer; }
.sw input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.sw span { position: relative; flex: none; width: 50px; height: 30px; border-radius: 99px; background: var(--line); transition: background .2s; }
.sw span::after { content: ""; position: absolute; top: 3px; inset-inline-start: 3px; width: 24px; height: 24px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.25); transition: transform .2s; }
.sw input:checked + span { background: var(--leaf); }
.sw input:checked + span::after { transform: translateX(20px); }
[dir="rtl"] .sw input:checked + span::after { transform: translateX(-20px); }
.sw input:focus-visible + span { outline: 3px solid var(--sea); outline-offset: 2px; }
.ctl-times { display: flex; gap: 12px; flex-wrap: wrap; }
.ctl-times label { display: flex; align-items: center; gap: 6px; font-weight: 600; }
.ctl-times input, .ctl-loc select { border: 1.5px solid var(--line); background: var(--paper); color: var(--ink); border-radius: 12px; padding: 8px 10px; font: inherit; }
.ctl-pr { display: grid; gap: 10px; }
.ctl-loc { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.ctl-loc > span { display: inline-flex; align-items: center; gap: 6px; }
.ctl-loc select { flex: 1; min-width: 140px; }
.pr-times { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; }
.pr-t { display: grid; justify-items: center; gap: 2px; padding: 8px 4px; border-radius: 14px; background: var(--soft); border: 2px solid var(--line); cursor: pointer; text-align: center; }
.pr-t input { accent-color: var(--leaf); width: 18px; height: 18px; }
.pr-t b { font-size: .85rem; }
.pr-t span { font-size: .78rem; color: var(--muted); direction: ltr; }
.pr-t.next { border-color: var(--leaf); background: var(--good-bg); }
.pr-t:has(input:not(:checked)) { opacity: .55; }
.ctl-games { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.ctl-game { display: flex; align-items: center; gap: 8px; padding: 6px; border-radius: 14px; border: 2px solid var(--line); cursor: pointer; font-weight: 600; font-size: .9rem; }
.ctl-game img { width: 44px; height: 33px; object-fit: cover; border-radius: 8px; flex: none; }
.ctl-game input { accent-color: var(--leaf); width: 20px; height: 20px; flex: none; }
.ctl-game:has(input:not(:checked)) { opacity: .5; }
.ctl-game:has(input:not(:checked)) img { filter: grayscale(1); }

/* شاشة الراحة / النوم / الصلاة */
.rest-layer { position: fixed; inset: 0; z-index: 90; display: grid; place-items: center; padding: 20px; background: linear-gradient(180deg, #FFE7C2, #FFF4E2); animation: fade .3s; }
.rest-bed { background: linear-gradient(180deg, #243259, #3B4C82); }
.rest-prayer { background: linear-gradient(180deg, #DDF3E6, #FFF4E2); }
.rest-card { width: min(440px, 100%); display: grid; gap: 14px; justify-items: center; text-align: center; }
.rest-art { display: grid; justify-items: center; }
.rest-mosque { width: 220px; height: auto; margin-bottom: -18px; }
.rest-kids { display: flex; }
.rest-kids svg { border: 4px solid #fff; border-radius: 50%; box-shadow: 0 6px 18px rgba(0,0,0,.18); animation: bob 2s ease-in-out infinite; }
.rest-kids svg + svg { margin-inline-start: -16px; animation-delay: .4s; }
.rest-card h2 { font-size: clamp(1.8rem, 7vw, 2.4rem); color: var(--berry); }
.rest-card p { font-size: 1.15rem; font-weight: 600; color: #3B2F4A; }
.rest-bed .rest-card h2 { color: #FFD45E; }
.rest-bed .rest-card p, .rest-bed .rest-card h3 { color: #EDF2F8; }
.rest-prayer .rest-card h2 { color: #1E7A4B; }
.rest-cd { display: inline-flex; align-items: center; gap: 6px; font-family: var(--f-display); font-size: 1.3rem !important; color: #1E7A4B !important; }
.rest-parent { margin-top: 8px; background: rgba(255,255,255,.85) !important; color: #2E2640 !important; }
.rest-opts { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }
.rest-opts .btn { min-height: 52px; }

/* ===== دروس التعلّم ===== */
.ln-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.ln-tile { position: relative; display: grid; justify-items: center; gap: 6px; border: 0; border-radius: 24px; padding: 12px 6px 14px; background: var(--paper); box-shadow: inset 0 -5px 0 var(--g), var(--shadow); font-family: var(--f-display); font-size: 1.1rem; color: var(--ink); }
.ln-tile:active { transform: scale(.96); }
.ln-art { width: 76px; height: 76px; display: grid; place-items: center; border-radius: 50%; background: color-mix(in srgb, var(--g) 15%, var(--paper)); }
.ln-art svg { width: 64px; height: 64px; }
.ln-art-num { font-family: var(--f-display); font-size: 1.6rem; color: var(--g); letter-spacing: 1px; }
.ln-tile.locked .ln-art { filter: grayscale(.6); }
.ln-tile .lk { position: absolute; top: 8px; inset-inline-end: 8px; width: 32px; height: 32px; border-radius: 50%; background: var(--paper); display: grid; place-items: center; box-shadow: var(--shadow); }
.ln-tile .lk .ic { width: 18px; height: 18px; }
.learn { background: radial-gradient(120% 80% at 50% 0%, color-mix(in srgb, var(--ep) 55%, #1E3A5F), #0F1726); }
.ln-body { display: grid; grid-template-rows: 1fr auto; min-height: 0; padding: 10px max(14px, env(safe-area-inset-right, 0px)) calc(14px + env(safe-area-inset-bottom, 0px)); gap: 12px; }
.ln-stage { display: grid; place-items: center; min-height: 0; }
.ln-card { width: min(520px, 100%); background: #FFF8EC; color: #2E2640; border-radius: 32px; padding: 20px 16px; display: grid; gap: 12px; justify-items: center; text-align: center; box-shadow: 0 16px 40px rgba(0,0,0,.3); animation: popIn .4s cubic-bezier(.3, 1.5, .5, 1) both; }
.ln-words b { display: block; font-family: var(--f-display); font-size: clamp(2.4rem, 11vw, 3.6rem); line-height: 1.05; color: var(--ep); }
.ln-words span { display: block; font-size: 1.5rem; font-weight: 700; color: #6F6578; }
.ln-hint { color: #6F6578; font-weight: 600; }
.ln-big-n { display: flex; align-items: baseline; gap: 10px; font-family: var(--f-display); color: var(--ep); }
.ln-big-n span { font-size: 4.2rem; line-height: 1; }
.ln-big-n small { font-size: 2.4rem; opacity: .7; }
.ln-objs { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; max-width: 360px; }
.ln-obj { position: relative; width: 62px; height: 62px; border: 0; background: none; padding: 0; animation: popIn .35s both; }
.ln-objs.n1 .ln-obj, .ln-objs.n2 .ln-obj { width: 96px; height: 96px; }
.ln-obj svg { width: 100%; height: 100%; transition: transform .15s; }
.ln-obj:active svg { transform: scale(.9); }
.ln-obj em { position: absolute; inset: auto 0 -4px auto; min-width: 26px; height: 26px; border-radius: 99px; background: var(--ep); color: #fff; font-style: normal; font-weight: 800; display: none; place-items: center; font-size: .95rem; }
.ln-obj.counted em { display: grid; }
.ln-obj.counted svg { transform: scale(1.12); }
.ln-color { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px; padding: 16px; border-radius: 26px; background: color-mix(in srgb, var(--c) 18%, #fff); }
.ln-ci { width: 70px; height: 70px; animation: popIn .4s both; }
.ln-ci svg { width: 100%; height: 100%; filter: drop-shadow(0 2px 0 rgba(0,0,0,.15)); }
.ln-animal { border: 0; background: radial-gradient(circle at 50% 60%, #DDF3E6, transparent 70%); padding: 0; width: min(240px, 60vw); aspect-ratio: 1; }
.ln-animal svg { width: 100%; height: 100%; }
.ln-animal.bounce { animation: animalBounce .6s; }
@keyframes animalBounce { 30% { transform: scale(1.12) rotate(-4deg); } 60% { transform: scale(.96) rotate(3deg); } }
.ln-nav { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.ln-arrow { width: 72px; height: 72px; border-radius: 50%; border: 0; background: var(--sun); color: var(--sun-ink); display: grid; place-items: center; box-shadow: 0 5px 0 #D69A0E; }
.ln-arrow .ic { width: 36px; height: 36px; }
.ln-arrow:active { transform: translateY(3px); box-shadow: 0 2px 0 #D69A0E; }
.ln-dots { display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; }
.ln-dots i { width: 10px; height: 10px; border-radius: 50%; background: rgba(255,255,255,.3); }
.ln-dots i.done { background: rgba(255,255,255,.7); }
.ln-dots i.on { background: var(--sun); width: 24px; border-radius: 99px; }
.ln-end h2 { font-size: 2.4rem; color: var(--berry); }
.ln-card .btn-ghost { background: #fff !important; color: #2E2640 !important; border-color: #E8DCC8 !important; }
[dir="rtl"] .ln-dots { flex-direction: row-reverse; }

/* ===== السور القصيرة ===== */
.q-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
@media (max-width: 520px) { .q-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.q-tile { position: relative; display: grid; justify-items: center; gap: 2px; border: 0; border-radius: 22px; padding: 10px 4px 12px; background: var(--paper); box-shadow: inset 0 -4px 0 #3FA6A0, var(--shadow); color: var(--ink); }
.q-tile:active { transform: scale(.96); }
.q-num { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 50%; background: #E3F4F2; color: #1F7F79; font-family: var(--f-display); font-size: 1.05rem; border: 2px dashed #9ED6D1; }
.q-tile b { font-family: "Amiri", var(--f-display); font-size: 1.15rem; }
.q-c { font-size: .72rem; color: var(--muted); }
.q-tile.done { box-shadow: inset 0 -4px 0 var(--sun), var(--shadow); }
.q-star { position: absolute; top: 6px; inset-inline-end: 8px; color: var(--sun); }
.q-star .ic { width: 18px; height: 18px; filter: drop-shadow(0 1px 0 #D69A0E); }
.quran { background: radial-gradient(120% 80% at 50% 0%, #1F6F6A, #0F1726); }
.q-body { display: grid; grid-template-rows: auto 1fr auto auto; min-height: 0; gap: 10px; padding: 8px max(14px, env(safe-area-inset-right, 0px)) calc(10px + env(safe-area-inset-bottom, 0px)); }
.q-reciters { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.q-rc { flex: none; border: 1.5px solid rgba(255,255,255,.25); background: rgba(255,255,255,.08); color: #fff; border-radius: 99px; padding: 7px 14px; font-weight: 600; font-size: .9rem; display: grid; line-height: 1.15; }
.q-rc em { font-style: normal; font-size: .7rem; color: #FFD45E; }
.q-rc.on { background: #fff; color: #1F6F6A; border-color: #fff; }
.q-stage { position: relative; display: grid; align-content: center; gap: 8px; min-height: 0; }
.q-kids { display: flex; justify-content: center; }
.q-kids svg { border: 3px solid #fff; border-radius: 50%; }
.q-kids svg + svg { margin-inline-start: -12px; }
.q-card { background: #FFF8EC; color: #2E2640; border-radius: 28px; padding: 16px 16px 18px; max-height: 52vh; overflow: auto; box-shadow: 0 16px 40px rgba(0,0,0,.3); border: 3px double #D9B57C; }
.q-basm { text-align: center; font-family: "Amiri", serif; font-size: 1.4rem; color: #1F6F6A; margin-bottom: 8px; }
.q-ayat { font-family: "Amiri", "Scheherazade New", serif; font-size: clamp(1.6rem, 6.5vw, 2.2rem); line-height: 2.1; text-align: center; }
.q-a { border-radius: 12px; padding: 2px 4px; cursor: pointer; transition: background .2s, color .2s; }
.q-a.on { background: #FFE7A3; color: #1F3B6F; }
.q-end { font-style: normal; display: inline-grid; place-items: center; min-width: 1.6em; height: 1.6em; border-radius: 50%; border: 2px solid #D9B57C; font-size: .55em; color: #8A5A00; vertical-align: middle; font-family: var(--f-body); }
.q-load { font-family: var(--f-body); font-size: 1rem; color: #6F6578; }
.q-turn { position: absolute; inset-inline: 0; bottom: -8px; margin: auto; width: max-content; max-width: 92%; display: flex; align-items: center; gap: 8px; background: var(--berry); color: #fff; padding: 6px 14px 6px 6px; border-radius: 99px; box-shadow: 0 8px 20px rgba(0,0,0,.3); }
.q-turn svg { border-radius: 50%; border: 2px solid #fff; }
.q-turn.pop { animation: popIn .35s cubic-bezier(.3, 1.6, .5, 1) both; }
.q-ctrl { display: grid; gap: 8px; justify-items: center; }
.q-opt { display: flex; align-items: center; gap: 8px; color: #fff; font-weight: 600; }
.q-opt input { width: 20px; height: 20px; accent-color: #FFC83D; }
.q-fullmode .q-opt, .q-fullmode .q-btns .ln-arrow { visibility: hidden; }
.q-rep { display: flex; gap: 6px; }
.q-rep .chip-btn { background: rgba(255,255,255,.1); color: #fff; border-color: rgba(255,255,255,.25); }
.q-rep .chip-btn.on { background: #fff; color: #1F6F6A; }
.q-btns { display: flex; align-items: center; gap: 22px; }
.q-play { width: 84px; height: 84px; border-radius: 50%; border: 0; background: var(--sun); color: var(--sun-ink); display: grid; place-items: center; box-shadow: 0 6px 0 #D69A0E; }
.q-play .ic { width: 40px; height: 40px; }
.q-credit { text-align: center; font-size: .7rem; color: rgba(255,255,255,.55); }
.q-done { position: absolute; inset: 0; display: grid; place-items: center; background: rgba(15,23,38,.55); border-radius: 28px; }
.q-done-card { background: #fff; color: #2E2640; border-radius: 26px; padding: 18px; display: grid; justify-items: center; gap: 8px; text-align: center; animation: popIn .4s both; }
.q-done-card h3 { font-size: 1.8rem; color: #1F6F6A; }
.q-done-card .btn { min-height: 50px; }
.mem.mem-big { grid-template-columns: repeat(4, minmax(0, 96px)); gap: 8px; }
.mem.mem-big .mem-front svg { width: 72px; height: 72px; }

/* ===== القرآن: المحور + الفهرس + القرّاء ===== */
.q-hub { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-bottom: 12px; }
.q-big { display: grid; justify-items: center; gap: 4px; border: 0; border-radius: 24px; padding: 12px 6px 14px; background: linear-gradient(160deg, #E3F4F2, #fff); color: var(--ink); box-shadow: inset 0 -5px 0 #3FA6A0, var(--shadow); }
.q-big.az { background: linear-gradient(160deg, #FDE7EF, #fff); box-shadow: inset 0 -5px 0 #E58AA8, var(--shadow); }
.q-big.qb { background: linear-gradient(160deg, #FFF3D1, #fff); box-shadow: inset 0 -5px 0 #E9B949, var(--shadow); }
.q-big:active { transform: scale(.96); }
.q-big-ic svg { width: 52px; height: 52px; display: block; }
.q-big b { font-size: 1.05rem; }
.q-big small { font-size: .72rem; color: var(--muted); }
.q-grp { flex: none; align-self: center; font-size: .72rem; font-weight: 700; color: #FFD45E; padding-inline: 6px 2px; }
.q-rc.na { opacity: .35; }
.q-play.wait { animation: qPulse 1s ease-in-out infinite; }
.q-play.wait .ic { opacity: .5; }
@keyframes qPulse { 50% { transform: scale(.92); box-shadow: 0 2px 0 #D69A0E; } }
.q-done-card .row2 { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }
.q-ix-body { display: grid; grid-template-rows: auto 1fr; gap: 10px; min-height: 0; padding: 8px max(14px, env(safe-area-inset-right, 0px)) calc(10px + env(safe-area-inset-bottom, 0px)); }
.q-search { width: 100%; border: 0; border-radius: 99px; padding: 12px 18px; font: inherit; font-size: 1rem; background: #fff; color: #2E2640; }
.q-list { overflow: auto; display: grid; gap: 8px; align-content: start; padding-bottom: 20px; }
.q-row { position: relative; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 12px; border: 0; border-radius: 18px; padding: 8px 14px; background: rgba(255,255,255,.95); color: #2E2640; text-align: start; }
.q-row[hidden] { display: none; }
.q-row b { font-family: "Amiri", var(--f-display); font-size: 1.25rem; }
.q-row .q-num { width: 36px; height: 36px; font-size: .95rem; }
.q-row.done { box-shadow: inset -4px 0 0 var(--sun); }
.q-row .q-star { position: static; }

/* ===== الأذكار ===== */
.az-body { position: relative; overflow: auto; min-height: 0; padding: 8px max(14px, env(safe-area-inset-right, 0px)) calc(16px + env(safe-area-inset-bottom, 0px)); display: grid; gap: 12px; align-content: start; }
.az-cats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.az-cat { position: relative; display: grid; justify-items: center; gap: 4px; border: 0; border-radius: 26px; padding: 16px 8px; background: #fff; color: #2E2640; box-shadow: inset 0 -6px 0 var(--c), 0 10px 24px rgba(0,0,0,.2); }
.az-cat:active { transform: scale(.96); }
.az-ic svg { width: 60px; height: 60px; display: block; }
.az-cat b { font-size: 1.15rem; }
.az-cat small { color: #6F6578; font-size: .78rem; }
.az-cat .q-star { top: 8px; inset-inline-end: 10px; }
.az-prog { height: 10px; border-radius: 99px; background: rgba(255,255,255,.15); overflow: hidden; position: sticky; top: 0; z-index: 2; }
.az-prog i { display: block; height: 100%; background: var(--sun); border-radius: 99px; transition: width .3s; }
.az-list { display: grid; gap: 12px; }
.az-card { background: #FFF8EC; color: #2E2640; border-radius: 24px; padding: 14px; border-inline-start: 6px solid var(--c); box-shadow: 0 10px 24px rgba(0,0,0,.2); display: grid; gap: 10px; transition: opacity .3s; }
.az-card.done { opacity: .55; }
.az-card.bump { animation: popIn .25s both; }
.az-when { justify-self: start; background: var(--c); color: #fff; border-radius: 99px; padding: 3px 12px; font-size: .8rem; font-weight: 700; }
.az-x { font-family: "Amiri", serif; font-size: clamp(1.3rem, 5.4vw, 1.7rem); line-height: 2; text-align: center; }
.az-basm { display: block; font-size: .85em; color: #1F6F6A; }
.az-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.az-say { width: 52px; height: 52px; border-radius: 50%; border: 0; background: #E3F4F2; color: #1F7F79; display: grid; place-items: center; }
.az-say.on { background: #3FA6A0; color: #fff; animation: qPulse 1s infinite; }
.az-count { flex: 1; display: flex; align-items: center; justify-content: center; gap: 10px; border: 0; border-radius: 99px; padding: 10px 16px; background: var(--c); color: #fff; box-shadow: 0 5px 0 rgba(0,0,0,.18); }
.az-count:active { transform: translateY(3px); box-shadow: 0 2px 0 rgba(0,0,0,.18); }
.az-count b { font-size: 1.6rem; line-height: 1; }
.az-count small { font-size: .85rem; font-weight: 600; }
.az-card.done .az-count { background: #2FB36E; }
.az-beads { justify-items: center; text-align: center; }
.az-phr, .az-goal { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; }
.az-phr .chip-btn, .az-goal .chip-btn { background: rgba(255,255,255,.1); color: #fff; border-color: rgba(255,255,255,.25); font-family: "Amiri", var(--f-body); }
.az-phr .chip-btn.on, .az-goal .chip-btn.on { background: #fff; color: #1F6F6A; }
.az-bead { position: relative; width: min(74vw, 300px); aspect-ratio: 1; border: 0; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #FFE7A3, #F2B33D 70%); color: #5A3A00; display: grid; place-content: center; gap: 4px; box-shadow: 0 10px 0 #C98B16, 0 20px 40px rgba(0,0,0,.3); margin-top: 8px; }
.az-bead:active { transform: translateY(6px); box-shadow: 0 4px 0 #C98B16; }
.az-bead.bump .az-n { animation: popIn .2s both; }
.az-ring { position: absolute; inset: -14px; width: calc(100% + 28px); height: calc(100% + 28px); pointer-events: none; }
.az-arc { transition: stroke-dashoffset .2s; }
.az-ph { font-family: "Amiri", serif; font-size: 1.4rem; }
.az-n { font-size: 4rem; line-height: 1; font-family: var(--f-display); }
.az-reset { margin-top: 18px; }

/* ===== القبلة ===== */
.qb-body { display: grid; justify-items: center; align-content: start; gap: 14px; padding: 10px 16px calc(16px + env(safe-area-inset-bottom, 0px)); color: #fff; text-align: center; overflow: auto; }
.qb-place { font-weight: 600; }
.qb-loc { border: 0; background: none; color: #FFD45E; font: inherit; text-decoration: underline; }
.qb-compass { position: relative; width: min(80vw, 330px); aspect-ratio: 1; }
.qb-dial { position: absolute; inset: 0; transition: transform .15s linear; }
.qb-dial svg { width: 100%; height: 100%; display: block; }
.qb-needle { position: absolute; inset: 0; display: grid; place-items: center; pointer-events: none; }
.qb-needle svg { height: 62%; filter: drop-shadow(0 4px 6px rgba(0,0,0,.35)); }
.qibla.aligned .qb-compass { filter: drop-shadow(0 0 22px rgba(47,179,110,.9)); }
.qibla.aligned .qb-needle path { fill: #2FB36E; }
.qb-msg { background: rgba(255,255,255,.12); border-radius: 18px; padding: 10px 16px; font-weight: 700; font-size: 1.1rem; max-width: 340px; }
.qibla.aligned .qb-msg { background: #2FB36E; }
.qb-info { font-size: .9rem; opacity: .8; }
.az-src { justify-self: center; font-size: .78rem; color: #8A5A00; background: #FBEFD5; border-radius: 99px; padding: 2px 12px; }
.q-hub { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 520px) { .q-hub { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.q-big.hj { background: linear-gradient(160deg, #E8F0FF, #fff); box-shadow: inset 0 -5px 0 #5B7FD6, var(--shadow); }
.az-bead .az-n, .az-bead .az-ph, .az-bead small { display: block; height: auto; line-height: 1.15; overflow: visible; }

/* ===== العمرة والحج ===== */
.hj-body { position: relative; overflow: auto; min-height: 0; display: grid; gap: 12px; align-content: start; padding: 8px max(14px, env(safe-area-inset-right, 0px)) calc(16px + env(safe-area-inset-bottom, 0px)); }
.hj-pick { display: grid; gap: 12px; }
.hj-kind { border: 0; border-radius: 26px; overflow: hidden; background: #fff; color: #2E2640; padding: 0 0 12px; display: grid; gap: 4px; box-shadow: 0 10px 24px rgba(0,0,0,.22); }
.hj-kind b { font-size: 1.4rem; } .hj-kind small { color: #6F6578; }
.hj-art { width: 100%; display: block; border-radius: 20px; }
.hj-note { color: rgba(255,255,255,.85); text-align: center; font-size: .9rem; }
.hj-dots { display: flex; justify-content: center; gap: 6px; }
.hj-dots i { width: 10px; height: 10px; border-radius: 50%; background: rgba(255,255,255,.25); }
.hj-dots i.ok { background: #2FB36E; } .hj-dots i.on { background: var(--sun); transform: scale(1.3); }
.hj-card { background: #FFF8EC; color: #2E2640; border-radius: 26px; padding: 12px; display: grid; gap: 8px; text-align: center; box-shadow: 0 14px 34px rgba(0,0,0,.28); }
.hj-card h3 { font-size: 1.5rem; color: #1F6F6A; }
.hj-card p { font-size: 1.05rem; line-height: 1.8; }
.hj-x { font-family: "Amiri", serif; font-size: 1.35rem !important; background: #FBEFD5; border-radius: 16px; padding: 8px; }
.hj-acts { display: flex; justify-content: center; align-items: center; gap: 12px; }
.hj-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.hj-nav .btn:disabled { opacity: .4; }
.hj-game { justify-items: center; text-align: center; color: #fff; }
.hj-count { font-size: 1.4rem; font-weight: 700; } .hj-count b { font-size: 2.6rem; color: var(--sun); }
.hj-tap { border: 0; padding: 0; background: none; width: 100%; max-width: 420px; border-radius: 22px; overflow: hidden; box-shadow: 0 14px 34px rgba(0,0,0,.3); }
.hj-tap:active { transform: scale(.98); }
.hj-hint { font-weight: 700; font-size: 1.05rem; }

/* ===== الزكاة ===== */
.zk-body { overflow: auto; min-height: 0; display: grid; gap: 12px; align-content: start; padding: 8px max(14px, env(safe-area-inset-right, 0px)) calc(20px + env(safe-area-inset-bottom, 0px)); }
.zk-tabs { display: flex; gap: 8px; justify-content: center; }
.zk-tabs .chip-btn { background: rgba(255,255,255,.1); color: #fff; border-color: rgba(255,255,255,.25); }
.zk-tabs .chip-btn.on { background: #fff; color: #1F6F6A; }
.zk-card { background: #fff; color: #2E2640; border-radius: 22px; padding: 14px; display: grid; gap: 10px; }
.zk-card h3 { font-size: 1.1rem; color: #1F6F6A; }
.zk-f { display: grid; grid-template-columns: 1fr 130px; align-items: center; gap: 10px; font-weight: 600; }
.zk-f span { display: grid; } .zk-f small { font-weight: 400; color: #6F6578; font-size: .75rem; }
.zk-f input, .zk-f select { border: 1.5px solid #E2DCEB; border-radius: 12px; padding: 9px 10px; font: inherit; width: 100%; background: #FAF8FC; color: #2E2640; text-align: center; }
.zk-f select { grid-column: 1 / -1; text-align: start; }
.zk-chk { display: flex; gap: 8px; align-items: center; font-weight: 600; }
.zk-chk input { width: 20px; height: 20px; accent-color: #3FA6A0; }
.zk-hint { font-size: .82rem; color: #6F6578; }
.zk-res { position: sticky; bottom: 0; background: #FFF8EC; color: #2E2640; border-radius: 22px; padding: 14px; display: grid; gap: 6px; box-shadow: 0 -8px 24px rgba(0,0,0,.2); border: 3px double #D9B57C; }
.zk-res:empty { display: none; }
.zk-line { display: flex; justify-content: space-between; gap: 10px; }
.zk-big { font-size: 1.3rem; font-weight: 700; color: #1F6F6A; text-align: center; } .zk-big b { color: #B7791F; }
.zk-big.no { color: #6F6578; font-size: 1rem; }
.zk-res .zk-hint { text-align: center; }
.zk-note { color: rgba(255,255,255,.75); font-size: .8rem; text-align: center; }
.fam-tools .row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

/* ===== المساعد ===== */
.helpbot { display: grid; grid-template-rows: auto 1fr auto auto; }
.hb-log { overflow: auto; min-height: 0; display: flex; flex-direction: column; gap: 10px; padding: 10px 14px; }
.hb-m { max-width: 85%; display: grid; gap: 8px; }
.hb-m p { border-radius: 20px; padding: 10px 14px; line-height: 1.7; }
.hb-m.bot { align-self: flex-start; } .hb-m.bot p { background: #fff; color: #2E2640; border-start-start-radius: 6px; }
.hb-m.me { align-self: flex-end; } .hb-m.me p { background: var(--sun); color: var(--sun-ink); border-start-end-radius: 6px; }
.hb-go { justify-self: start; min-height: 40px; padding: 6px 14px; font-size: .9rem; }
.hb-chips { display: flex; gap: 6px; overflow-x: auto; padding: 4px 14px; scrollbar-width: none; }
.hb-chips .chip-btn { flex: none; background: rgba(255,255,255,.1); color: #fff; border-color: rgba(255,255,255,.25); }
.hb-form { display: flex; gap: 8px; padding: 8px 14px calc(12px + env(safe-area-inset-bottom, 0px)); }
.hb-in { flex: 1; border: 0; border-radius: 99px; padding: 12px 16px; font: inherit; background: #fff; color: #2E2640; min-width: 0; }
.q-hub { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 520px) { .q-hub { grid-template-columns: repeat(2, minmax(0, 1fr)); } .q-hub .q-big:last-child:nth-child(odd) { grid-column: 1 / -1; } }
.q-big.rd { background: linear-gradient(160deg, #EFE8FF, #fff); box-shadow: inset 0 -5px 0 #7C6CF0, var(--shadow); }
.q-index .q-ix-body { grid-template-rows: auto auto 1fr; }
.q-readbtn { width: 100%; }

/* ===== المصحف بالصفحات ===== */
.mushaf { display: grid; grid-template-rows: auto 1fr auto; background: #FBF6EA; }
.mushaf .pl-top { background: #1F6F6A; }
.mushaf .pl-btn.on { background: var(--sun); color: var(--sun-ink); }
.ms-stage { position: relative; min-height: 0; display: grid; place-items: center; overflow: auto; padding: 6px; touch-action: pan-y pinch-zoom; }
.ms-img { max-width: 100%; max-height: 100%; object-fit: contain; user-select: none; -webkit-user-select: none; }
.ms-load { color: #6F6578; text-align: center; padding: 16px; }
.ms-stage .ms-load { position: absolute; }
.ms-load[hidden] { display: none; }
.ms-bar { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 14px calc(10px + env(safe-area-inset-bottom, 0px)); background: #1F6F6A; }
.ms-bar .ms-tafsir { flex: 1; min-height: 46px; }
.ms-sheet { position: absolute; inset: 0; background: rgba(15,23,38,.5); display: flex; align-items: flex-end; z-index: 5; }
.ms-sh-card { width: 100%; max-height: 86%; background: #FFF8EC; color: #2E2640; border-radius: 26px 26px 0 0; display: grid; grid-template-rows: auto 1fr; animation: shUp .25s ease-out; }
@keyframes shUp { from { transform: translateY(40%); opacity: 0; } }
.ms-sh-top { display: flex; align-items: center; justify-content: space-between; padding: 10px 14px 4px; }
.ms-sh-top b { font-size: 1.15rem; color: #1F6F6A; }
.ms-sh-top .pl-btn { background: #EDE6D6; color: #2E2640; }
.ms-sh-body { overflow: auto; padding: 6px 14px calc(16px + env(safe-area-inset-bottom, 0px)); display: grid; gap: 10px; align-content: start; }
.ms-form { display: flex; gap: 8px; } .ms-form .q-search { flex: 1; border: 1.5px solid #E2DCEB; min-width: 0; }
.ms-modes { display: flex; flex-wrap: wrap; gap: 6px; }
.ms-cap { font-weight: 700; color: #6F6578; font-size: .9rem; }
.ms-grid { display: flex; flex-wrap: wrap; gap: 6px; }
.ms-chip { border: 1.5px solid #D9B57C; background: #fff; color: #8A5A00; border-radius: 12px; padding: 6px 10px; font: inherit; font-weight: 600; }
.ms-list { display: grid; gap: 6px; } .ms-list .q-row { box-shadow: 0 2px 0 #EDE6D6; }
.ms-res { display: grid; gap: 10px; }
.ms-ay { background: #fff; border-radius: 18px; padding: 10px 12px; display: grid; gap: 6px; border: 1.5px solid #F0E4C8; }
.ms-ay-h { font-size: .8rem; font-weight: 700; color: #1F6F6A; }
.ms-ay-x { font-family: "Amiri", serif; font-size: 1.35rem; line-height: 2; text-align: center; }
.ms-ay-x mark { background: #FFE7A3; border-radius: 6px; padding: 0 2px; }
.ms-ay-btns { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; }
.ms-taf { background: #E3F4F2; color: #1F4F4B; border-radius: 14px; padding: 10px 12px; line-height: 1.8; font-size: .98rem; }
.ms-taf[hidden] { display: none; }
.q-big.sl { background: linear-gradient(160deg, #E6F7EE, #fff); box-shadow: inset 0 -5px 0 #2FB36E, var(--shadow); }

/* ===== تعلّم الصلاة ===== */
.sl-body { position: relative; overflow: auto; min-height: 0; display: grid; gap: 12px; align-content: start; padding: 8px max(14px, env(safe-area-inset-right, 0px)) calc(16px + env(safe-area-inset-bottom, 0px)); }
.sl-count { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.sl-count div { background: rgba(255,255,255,.12); color: #fff; border-radius: 16px; padding: 6px 2px; display: grid; justify-items: center; }
.sl-count b { font-size: .85rem; } .sl-count span { font-size: 1.6rem; font-weight: 700; color: var(--sun); line-height: 1.1; } .sl-count small { font-size: .65rem; opacity: .8; }
.sl-tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.sl-tile { border: 0; border-radius: 24px; background: #fff; color: #2E2640; padding: 8px 8px 12px; display: grid; gap: 4px; justify-items: center; text-align: center; box-shadow: 0 10px 24px rgba(0,0,0,.2); }
.sl-tile:active { transform: scale(.97); }
.sl-tile .sl-art { width: 100%; max-width: 150px; }
.sl-tile b { font-size: 1rem; } .sl-tile small { color: #6F6578; font-size: .78rem; }
.sl-art { display: block; width: 100%; height: auto; }
.sl-pose { width: 62%; max-width: 230px; justify-self: center; }
.sl-card h3 { margin-top: -2px; }
.sl-badge { justify-self: center; background: var(--c); color: #fff; border-radius: 99px; padding: 3px 14px; font-weight: 700; font-size: .85rem; }
.sl-note { color: rgba(255,255,255,.8); font-size: .85rem; text-align: center; }
.sl-rule { background: #fff; color: #2E2640; border-radius: 22px; padding: 14px; border-top: 6px solid var(--c); display: grid; gap: 8px; }
.sl-rule h3 { color: var(--c); font-size: 1.3rem; display: flex; align-items: center; gap: 8px; }
.sl-rule h3 span { background: var(--c); color: #fff; border-radius: 99px; padding: 0 10px; font-size: .95rem; }
.sl-why { background: #FAF6EE; border-radius: 14px; padding: 8px 10px; font-size: .92rem; line-height: 1.7; }
.sl-rule ol { padding-inline-start: 22px; display: grid; gap: 4px; line-height: 1.6; }
.sl-quiz { justify-items: center; text-align: center; color: #fff; }
.sl-qcard { background: #FFF8EC; color: #2E2640; border-radius: 24px; padding: 26px 16px; font-size: 1.35rem; font-weight: 700; width: 100%; min-height: 140px; display: grid; place-items: center; box-shadow: 0 14px 34px rgba(0,0,0,.28); }
.sl-ans { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; width: 100%; }
.sl-a { border: 0; border-radius: 20px; padding: 16px 4px; background: var(--c); color: #fff; font: inherit; font-size: 1.25rem; font-weight: 700; box-shadow: 0 6px 0 rgba(0,0,0,.2); }
.sl-a:active { transform: translateY(3px); }
.sl-a.right { outline: 4px solid #fff; animation: popIn .3s both; }
.sl-a.wrong { opacity: .45; }
.sl-fb { font-weight: 700; font-size: 1.15rem; min-height: 1.6em; }
.sl-end { justify-self: center; margin-top: 30px; }
.sl-end .row2 { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }

/* ---------- القرّاء: كروت المشايخ + صفحات المصحف مع الصوت ---------- */
.q-index .q-ix-body:not(.sh) { grid-template-rows: 1fr; }
.q-sheikhs { overflow: auto; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; align-content: start; padding: 4px 2px 24px; }
@media (min-width: 640px) { .q-sheikhs { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.q-grp-h { grid-column: 1 / -1; margin: 6px 4px 0; color: #FFD45E; font-weight: 700; font-size: .95rem; }
.q-sheikh { position: relative; display: grid; justify-items: center; gap: 4px; border: 0; border-radius: 22px; padding: 10px 6px 12px; background: rgba(255,255,255,.96); color: #2E2640; box-shadow: 0 6px 18px rgba(0,0,0,.18); text-align: center; }
.q-sheikh:active { transform: scale(.96); }
.q-sheikh.on { box-shadow: 0 0 0 3px #FFD45E, 0 6px 18px rgba(0,0,0,.18); }
.q-sheikh b { font-family: "Amiri", var(--f-display); font-size: 1.02rem; line-height: 1.2; }
.q-sheikh small { color: #6B6478; font-size: .74rem; }
.q-pg-tag { font-style: normal; font-size: .66rem; background: #E3F4F2; color: #1F7F79; border-radius: 99px; padding: 2px 8px; }
.q-face { position: relative; display: block; width: 64px; height: 77px; }
.q-face.big { width: 84px; height: 101px; flex: none; }
.q-face svg, .q-face img { position: absolute; inset: 0; width: 100%; height: 100%; }
.q-face img { object-fit: cover; clip-path: path('M4.8 74V32C4.8 14.4 17.6 4.8 32 3.2c14.4 1.6 27.2 11.2 27.2 28.8V74z'); }
.q-face.big img { clip-path: path('M6.3 97V42C6.3 18.9 23.1 6.3 42 4.2c18.9 2.1 35.7 14.7 35.7 37.8V97z'); }
.q-sh-head { display: flex; align-items: center; gap: 14px; background: rgba(255,255,255,.96); color: #2E2640; border-radius: 22px; padding: 10px 14px; }
.q-sh-head b { display: block; font-family: "Amiri", var(--f-display); font-size: 1.35rem; }
.q-sh-head small { display: block; color: #6B6478; font-size: .82rem; }
.q-index .q-ix-body.sh { grid-template-rows: auto auto 1fr; }
.q-view { display: flex; gap: 6px; justify-content: center; }
.q-page { display: none; justify-items: center; gap: 6px; }
.q-pagemode .q-page { display: grid; }
.q-pagemode .q-card { display: none; }
.q-page img { max-width: 100%; max-height: 54vh; background: #FFF8EC; border-radius: 14px; border: 3px double #D9B57C; box-shadow: 0 16px 40px rgba(0,0,0,.3); }
.q-pg-cap { margin: 0; color: #fff; font-size: .85rem; opacity: .9; }
.q-fullmode.q-pagemode .q-btns .ln-arrow { visibility: visible; }
.q-pagemode .q-kids { display: none; }
.q-pagemode .q-page img { max-height: 60vh; }
img.auth-scene { object-fit: cover; object-position: center 12%; }
img.scene-3d { width: 100%; height: 100%; object-fit: cover; object-position: center 35%; display: block; }
.auth-hero::after { content: ""; position: absolute; inset: 0 0 auto 0; height: 55%; background: linear-gradient(rgba(255,255,255,.75), rgba(255,255,255,0)); pointer-events: none; }
.auth-brand, .auth-prefs { z-index: 1; }

/* الصفحات بدل السكرول الطويل */
.paged > .pg { display: none; }
.paged > .pg.on { display: block; animation: pgIn .25s ease; }
@keyframes pgIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.tabbar { display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; inset: auto 0 0 0; z-index: 20; background: var(--paper); border-top: 1px solid var(--line);
  padding: 6px max(8px, env(safe-area-inset-right, 0px)) calc(6px + env(safe-area-inset-bottom, 0px)) max(8px, env(safe-area-inset-left, 0px)); }
.tabbar button { display: grid; justify-items: center; gap: 2px; border: 0; background: none; color: var(--muted); font-size: .75rem; font-weight: 600; padding: 6px 0; border-radius: 12px; cursor: pointer; }
.tabbar .ic { width: 24px; height: 24px; }
.tabbar button.on { color: var(--green, #2F9461); background: var(--soft); }
.kid.paged { padding-bottom: calc(96px + env(safe-area-inset-bottom, 0px)); min-height: 70vh; }
@media (min-width: 721px) { .tabbar { max-width: 560px; margin: 0 auto 12px; inset: auto 0 0 0; border: 1px solid var(--line); border-radius: 20px; box-shadow: 0 8px 24px rgba(0,0,0,.12); } }

/* ---------- القرآن: وضعين + صفحة مصحف منسّقة + أزرار أصغر ---------- */
.q-modes { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 4px; }
.q-mode { display: grid; justify-items: center; gap: 2px; border: 2px solid transparent; border-radius: 20px; padding: 10px 8px; background: rgba(255,255,255,.14); color: #fff; text-align: center; }
.q-mode.on { background: #fff; color: #1F6F6A; border-color: #FFD45E; }
.q-mode-ic { font-size: 1.6rem; line-height: 1; }
.q-mode b { font-size: 1rem; }
.q-mode small { font-size: .74rem; opacity: .85; line-height: 1.3; }
.q-sep { width: 1px; align-self: stretch; background: rgba(255,255,255,.3); margin: 0 4px; }
.q-view { flex-wrap: wrap; }
.q-view .chip-btn { padding: 5px 12px; font-size: .82rem; }
/* صفحة المصحف */
.q-page { min-height: 0; }
.q-pagemode .q-stage { align-content: stretch; }
.q-mp { background: #FFFBF1; color: #2B2238; border-radius: 18px; border: 2px solid #C9A25E; outline: 6px solid #FFFBF1; outline-offset: -10px; box-shadow: inset 0 0 0 9px #FFFBF1, inset 0 0 0 10.5px #E3C88F, 0 12px 30px rgba(0,0,0,.28); display: grid; grid-template-rows: auto 1fr; max-height: min(58vh, 560px); width: min(100%, 520px); margin: 0 auto; overflow: hidden; }
.q-mp-h { display: flex; justify-content: space-between; align-items: center; padding: 14px 20px 4px; font-family: "Amiri", serif; font-size: .9rem; color: #8A6A2E; }
.q-mp-n { background: #F3E3BE; border-radius: 99px; min-width: 30px; text-align: center; padding: 0 8px; }
.q-mp-t { overflow-y: auto; padding: 2px 20px 18px; scrollbar-width: thin; }
.q-mp-p { margin: 0; font-family: "Amiri Quran", "Amiri", serif; font-size: clamp(1.25rem, 4.8vw, 1.6rem); line-height: 2.25; text-align: justify; text-align-last: center; }
.q-mp-b { margin: 2px 0 6px; text-align: center; font-family: "Amiri Quran", "Amiri", serif; font-size: 1.15em; color: #1F6F6A; }
.q-mp .q-a { padding: 1px 2px; border-radius: 8px; }
.q-mp .q-a.on { background: #FFE08A; color: #1F3B6F; box-shadow: 0 0 0 3px #FFE08A; }
.q-mp .q-end { font-style: normal; font-family: "Amiri", serif; display: inline-grid; place-items: center; min-width: 1.5em; height: 1.5em; margin: 0 2px; border-radius: 50%; border: 1.5px solid #C9A25E; font-size: .62em; color: #8A6A2E; vertical-align: middle; }
.q-pg-cap { margin: 6px 0 0; text-align: center; color: #fff; font-size: .8rem; opacity: .9; }
/* أزرار تشغيل أصغر */
.q-btns { gap: 16px; }
.q-play { width: 58px; height: 58px; box-shadow: 0 4px 0 #D69A0E; }
.q-play .ic { width: 28px; height: 28px; }
.quran .ln-arrow { width: 42px; height: 42px; }
.quran .ln-arrow .ic { width: 20px; height: 20px; }
.q-ctrl { gap: 6px; }
.q-opt { font-size: .85rem; }
.q-rep .chip-btn { padding: 4px 12px; font-size: .8rem; }
/* القراءة المسترسلة: من غير ترديد ولا تكرار ولا وشوش */
.q-flow .q-opt, .q-flow .q-rep, .q-flow .q-kids, .q-flow .q-turn { display: none !important; }
.q-pagemode .q-stage { align-content: start; }
.q-mp { max-height: min(60vh, 600px); }
.az-mean { margin: 4px 0 6px; font-size: .88rem; line-height: 1.5; color: var(--muted, #6B6478); font-style: italic; text-align: left; }
.hajj .az-mean, .salah .az-mean { color: #5B6678; }
.qb-acts { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }
.qb-acts .chip-btn { background: rgba(255,255,255,.16); color: #fff; border: 1px solid rgba(255,255,255,.35); }
.qb-cities { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; max-width: 420px; }
.qb-cities .chip-btn { background: #fff; color: #1F6F6A; }
.qb-compass { width: min(72vw, 42vh, 320px); }

/* ---------- وضع الكبار ---------- */
.mode-pill { margin-inline-start: 6px; font-size: .7rem; font-weight: 700; background: var(--ink, #1C2A44); color: #fff; border-radius: 99px; padding: 2px 8px; vertical-align: middle; }
.adult { display: grid; gap: 14px; padding-top: 12px; padding-bottom: 40px; }
.ad-pray .ad-next { margin: 4px 0 10px; }
.ad-times { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.ad-times div { display: grid; justify-items: center; gap: 2px; background: var(--soft); border-radius: 14px; padding: 8px 2px; }
.ad-times div.next { background: var(--green, #2F9461); color: #fff; }
.ad-times small { font-size: .74rem; opacity: .85; }
.ad-times b { font-size: .95rem; }
.ad-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
@media (min-width: 700px) { .ad-grid { grid-template-columns: repeat(4, 1fr); } }
.ad-tool { display: grid; justify-items: start; gap: 4px; text-align: start; border: 1px solid var(--line); background: var(--paper); color: var(--ink); border-radius: 20px; padding: 14px; box-shadow: 0 4px 14px rgba(0,0,0,.06); cursor: pointer; }
.ad-tool:active { transform: scale(.97); }
.ad-ic { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; background: var(--c); color: #fff; }
.ad-ic svg { width: 30px; height: 30px; }
.ad-tool b { font-size: 1rem; }
.ad-tool small { color: var(--muted); font-size: .8rem; line-height: 1.35; }
.ad-note { text-align: center; font-size: .82rem; }
/* اختيار وضع التطبيق */
.mode-pick { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 8px; }
.mode-opt { display: grid; justify-items: center; gap: 4px; text-align: center; border: 2px solid var(--line); background: var(--paper); color: var(--ink); border-radius: 18px; padding: 12px 8px; cursor: pointer; }
.mode-opt.on { border-color: var(--green, #2F9461); background: var(--soft); box-shadow: 0 0 0 3px rgba(47,148,97,.18); }
.mode-opt small { color: var(--muted); font-size: .78rem; line-height: 1.35; }
.ad-times b { white-space: nowrap; font-size: .85rem; }
@media (max-width: 380px) { .ad-times b { font-size: .78rem; } }

/* ---------- وضوح الألوان في الوضع الليلي والنهاري ---------- */
/* أزرار القرآن: خلفية فاتحة في النهار، وغامقة بلون خفيف في الليل، والكلام دايماً واضح */
[data-theme="dark"] .q-big { background: linear-gradient(160deg, rgba(63,166,160,.30), var(--paper)); color: #F4F1FA; }
[data-theme="dark"] .q-big.az { background: linear-gradient(160deg, rgba(229,138,168,.30), var(--paper)); }
[data-theme="dark"] .q-big.qb { background: linear-gradient(160deg, rgba(233,185,73,.28), var(--paper)); }
[data-theme="dark"] .q-big.hj { background: linear-gradient(160deg, rgba(91,127,214,.32), var(--paper)); }
[data-theme="dark"] .q-big.rd { background: linear-gradient(160deg, rgba(124,108,240,.32), var(--paper)); }
[data-theme="dark"] .q-big.sl { background: linear-gradient(160deg, rgba(47,179,110,.28), var(--paper)); }
[data-theme="dark"] .q-big small { color: #C9C3D6; }
[data-theme="dark"] .q-big-ic svg path[fill="#2E2640"], [data-theme="dark"] .q-big-ic svg path[fill="#1E1A2B"] { fill: #E9E4F5; }
/* ملصقات الأذكار وزرار العدّ: كلام غامق على الألوان الفاتحة */
.az-when { color: #2B2238; background: color-mix(in srgb, var(--c) 35%, #fff); }
.az-count { color: #2B2238; }
.az-card.done .az-count { color: #fff; }
[data-theme="dark"] .az-when { color: #fff; background: color-mix(in srgb, var(--c) 45%, #1B1530); }
/* أركان وواجبات وسنن */
.sl-rule h3 { color: color-mix(in srgb, var(--c) 70%, #1C1426); }
.sl-rule h3 span { color: #1C1426; background: color-mix(in srgb, var(--c) 45%, #fff); }
[data-theme="dark"] .sl-rule h3 { color: color-mix(in srgb, var(--c) 60%, #fff); }
/* شارات الحلقات */
[data-theme="dark"] .nx-badge, [data-theme="dark"] .t-badge.next { background: #E04E7C; color: #fff; }
.stk-q { color: #6E6150; }
[data-theme="dark"] .stk-q { color: #CFC3B0; }
.ad-count { display: flex; align-items: center; justify-content: space-between; gap: 10px; background: linear-gradient(135deg, #2F9461, #1F6F6A); color: #fff; border-radius: 18px; padding: 12px 16px; margin: 6px 0 8px; }
.ad-count-l { font-size: .95rem; }
.ad-count-t { font-size: 1.7rem; font-variant-numeric: tabular-nums; letter-spacing: .5px; direction: ltr; }
.ad-count.soon { background: linear-gradient(135deg, #E9A23B, #D9622B); animation: pulse 1.6s ease-in-out infinite; }
.ad-bell { margin-top: 10px; width: 100%; display: flex; align-items: center; gap: 8px; border: 1px solid var(--line); background: var(--soft); color: var(--ink); border-radius: 14px; padding: 10px 12px; font: inherit; font-weight: 600; cursor: pointer; }
.ad-bell span { flex: 1; text-align: start; }
.ad-bell i { font-style: normal; font-size: .8rem; padding: 2px 10px; border-radius: 99px; background: #C9C3D6; color: #2B2238; }
.ad-bell.on i { background: #2FB36E; color: #fff; }
[data-theme="dark"] .mode-pill { background: #2F9461; color: #fff; }
/* وضع الكبار: زرار الإعدادات ظاهر على الموبايل كمان */
.adult-top #parents { display: inline-flex !important; }
.ad-switch { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.ad-switch p { margin: 2px 0 0; font-size: .85rem; }
.ad-switch .btn { display: inline-flex; align-items: center; gap: 6px; }
.adult-top .logo b { white-space: nowrap; }
@media (max-width: 440px) {
  .adult-top .mode-pill { display: none; }
  .adult-top #parents { font-size: 0; gap: 0; padding: 8px 10px; }
  .adult-top #parents .ic { width: 20px; height: 20px; }
}
.ad-loc { border: 0; background: none; color: var(--muted); font: inherit; font-size: .82rem; cursor: pointer; }
.ad-loc u { color: var(--green, #2F9461); }
.ad-src { margin: 0 0 6px; font-size: .78rem; color: var(--muted); }

/* ---------- بث مباشر ---------- */
.q-big.lvb { background: linear-gradient(160deg, #FDE3E6, #fff); box-shadow: inset 0 -5px 0 #B23A48, var(--shadow); }
[data-theme="dark"] .q-big.lvb { background: linear-gradient(160deg, rgba(178,58,72,.32), var(--paper)); }
.lv-big-ic { font-size: 30px; line-height: 1; }
.lv { display: flex; flex-direction: column; overflow: hidden; }
.lv-body { flex: 1; overflow-y: auto; padding: 14px 16px 28px; display: grid; gap: 12px; align-content: start; max-width: 720px; width: 100%; margin-inline: auto; box-sizing: border-box; }
.lv-stage { background: #000; border-radius: 18px; overflow: hidden; display: grid; }
.lv-stage[hidden] { display: none; }
.lv-now { margin: 0; padding: 8px 12px; color: #fff; background: #1b1b1b; font-size: 14px; display: flex; align-items: center; gap: 6px; }
.lv-dot { width: 9px; height: 9px; border-radius: 50%; background: #E53935; animation: lvPulse 1.2s infinite; }
@keyframes lvPulse { 50% { opacity: .25; } }
.lv-media.video { width: 100%; aspect-ratio: 16 / 9; background: #000; display: block; }
.lv-media.audio { width: calc(100% - 20px); margin: 10px; }
.lv-status { margin: 0; min-height: 1.2em; font-size: 14px; color: #DCE6F2; text-align: center; }
.lv-status.err { color: #FF8A80; }
.lv-list { display: grid; gap: 10px; }
.lv-card { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 0; border-radius: 18px; background: var(--paper, #fff); color: var(--ink, #222); box-shadow: inset 0 -4px 0 var(--c), var(--shadow); text-align: start; font: inherit; cursor: pointer; }
.lv-card.on { outline: 3px solid var(--c); }
.lv-ic { font-size: 28px; width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; background: color-mix(in srgb, var(--c) 16%, transparent); flex: none; }
.lv-t { flex: 1; display: grid; gap: 2px; }
.lv-t b { font-size: 16px; }
.lv-t small { opacity: .75; font-size: 13px; }
.lv-go { width: 38px; height: 38px; border-radius: 50%; background: var(--c); color: #fff; display: grid; place-items: center; flex: none; }
.lv-go svg { width: 18px; height: 18px; }
.lv-stop { display: none; padding: 6px 12px; border-radius: 99px; background: var(--c); color: #fff; font-size: 13px; font-weight: 700; flex: none; }
.lv-card.on .lv-go { display: none; }
.lv-card.on .lv-stop { display: inline-block; }
.lv-note { margin: 4px 0 0; font-size: 12px; color: #DCE6F2; opacity: .8; text-align: center; }
.lv-aud { margin-top: -4px; justify-self: start; border: 0; border-radius: 99px; padding: 7px 14px; font: inherit; font-size: 13px; font-weight: 700; background: rgba(255,255,255,.12); color: #fff; cursor: pointer; }
.lv-aud.on { background: var(--c); }
.paywall { min-height: 80vh; display: grid; place-items: center; }
.pw-card { background: var(--paper); border-radius: 26px; box-shadow: var(--shadow); padding: 28px 22px; max-width: 420px; text-align: center; display: grid; gap: 14px; }
.pw-faces { display: flex; justify-content: center; gap: 10px; }
.pw-card h2 { margin: 0; }
.pw-card p { margin: 0; color: var(--muted); line-height: 1.7; }
.sub-banner.trial { background: linear-gradient(135deg, #E9F7EF, var(--paper)); }
[data-theme="dark"] .sub-banner.trial { background: linear-gradient(135deg, rgba(63,166,107,.25), var(--paper)); }
.ln-animal.photo { background: none; display: grid; place-items: center; }
.ln-animal.photo img { width: 92%; height: 92%; object-fit: cover; border-radius: 50%; border: 6px solid #fff; box-shadow: var(--shadow); }
.ln-art-img { width: 78%; aspect-ratio: 1; object-fit: cover; border-radius: 50%; border: 4px solid #fff; }
.mg-av { border-radius: 50%; object-fit: cover; border: 4px solid #fff; box-shadow: 0 4px 12px rgba(0,0,0,.15); vertical-align: middle; }
.lv-ytbox { width: 100%; aspect-ratio: 16 / 9; background: #000; position: relative; }
.lv-ytbox iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.lv-yt { display: block; padding: 8px 12px; color: #9fd3ff; font-size: 13px; text-align: center; background: #1b1b1b; }

/* ===== الأذكار كصفحات ===== */
.az-body.az-paged { display: grid; grid-template-rows: auto auto 1fr auto; overflow: hidden; height: 100%; align-content: stretch; }
.az-nav { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.az-pos { color: #fff; font-family: var(--f-display); font-size: 1.15rem; }
.az-pg { width: 46px; height: 46px; border-radius: 50%; border: 0; background: rgba(255,255,255,.15); color: #fff; display: grid; place-items: center; }
.az-pg:disabled { opacity: .3; }
.az-pg-n .ic { transform: scaleX(-1); }
[dir="ltr"] .az-pg .ic { transform: scaleX(-1); } [dir="ltr"] .az-pg-n .ic { transform: none; }
.az-list.az-pager { display: flex; gap: 0; overflow-x: auto; overflow-y: hidden; scroll-snap-type: x mandatory; scroll-behavior: smooth; overscroll-behavior-x: contain; scrollbar-width: none; min-height: 0; margin: 0 calc(-1 * max(14px, env(safe-area-inset-right, 0px))); }
.az-pager::-webkit-scrollbar { display: none; }
.az-pager .az-card { flex: 0 0 100%; scroll-snap-align: center; scroll-snap-stop: always; box-sizing: border-box; margin: 0; border-inline-start: 0; border-radius: 0; background: transparent; box-shadow: none; padding: 0 max(14px, env(safe-area-inset-right, 0px)); display: flex; flex-direction: column; overflow-y: auto; }
.az-pager .az-card > * { flex: none; }
.az-pager .az-card::before { content: ""; display: block; flex: 0 0 4px; }
.az-pager .az-card .az-x { background: #FFF8EC; color: #2E2640; border-radius: 26px; padding: 22px 16px; border-top: 6px solid var(--c); box-shadow: 0 10px 24px rgba(0,0,0,.2); margin: 6px 0 10px; font-size: clamp(1.4rem, 6vw, 1.95rem); flex: 0 0 auto; }
.az-pager .az-card .az-when { align-self: center; }
.az-pager .az-card .az-src { align-self: center; }
.az-pager .az-card .az-mean { color: rgba(255,255,255,.8); text-align: center; }
.az-pager .az-card .az-foot { margin-top: auto; padding: 10px 0 4px; }
.az-pager .az-card .az-count { padding: 16px 18px; }
.az-pager .az-card .az-count b { font-size: 2rem; }
.az-pager .az-card.done { opacity: 1; }
.az-pager .az-card.done .az-x { opacity: .7; }
.az-dots { display: flex; justify-content: center; flex-wrap: wrap; gap: 6px; padding: 2px 0; }
.az-dots i { width: 8px; height: 8px; border-radius: 99px; background: rgba(255,255,255,.3); transition: width .2s, background .2s; cursor: pointer; }
.az-dots i.done { background: #2FB36E; }
.az-dots i.on { width: 22px; background: var(--sun); }

/* ===== الأذان ===== */
.adh-layer, .upd-layer { position: fixed; inset: 0; z-index: 90; display: grid; place-items: center; padding: 18px; background: radial-gradient(120% 80% at 50% 0%, #1F6F6A, #0F1726); animation: fade .25s; }
.upd-layer { z-index: 200; }
.adh-card, .upd-card { width: min(440px, 100%); background: var(--paper); color: var(--ink); border-radius: 28px; padding: 22px 18px; display: grid; gap: 12px; text-align: center; box-shadow: 0 20px 50px rgba(0,0,0,.35); max-height: 92vh; overflow: auto; }
.adh-mosque { width: 180px; margin: 0 auto; }
.adh-card h2, .upd-card h2 { font-family: var(--f-display); font-size: 1.5rem; margin: 0; }
.adh-dua { background: #FFF8EC; color: #2E2640; border-radius: 20px; padding: 12px; display: grid; gap: 6px; }
.adh-dua small { color: #8A5A00; font-weight: 700; }
.adh-dua p { font-family: "Amiri", serif; font-size: 1.3rem; line-height: 1.9; margin: 0; }
.adh-btns { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.adh-btns [hidden] { display: none; }
.adh-sec { display: grid; gap: 10px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.adh-sec:last-of-type { border: 0; }
.adh-sub[hidden] { display: none; }
.adh-voices { display: grid; gap: 6px; }
.adh-v { display: flex; align-items: center; gap: 8px; border-radius: 14px; border: 2px solid var(--line); padding: 4px 6px; }
.adh-v.on { border-color: var(--leaf); background: color-mix(in srgb, var(--leaf) 10%, transparent); }
.adh-pick { flex: 1; border: 0; background: none; font: inherit; color: inherit; text-align: start; padding: 8px; font-weight: 600; }
.adh-sheet .chips { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.dk-card { position: fixed; inset-inline: 12px; top: calc(10px + env(safe-area-inset-top, 0px)); z-index: 80; display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 22px; background: linear-gradient(135deg, #1F6F6A, #2F9461); color: #fff; box-shadow: 0 14px 34px rgba(0,0,0,.3); animation: dkIn .35s both; max-width: 520px; margin: 0 auto; }
.dk-card.out { animation: dkOut .35s both; }
.dk-ic { font-size: 1.8rem; }
.dk-tx { flex: 1; display: grid; gap: 2px; }
.dk-tx small { opacity: .8; font-size: .75rem; }
.dk-tx b { font-family: "Amiri", serif; font-size: 1.2rem; line-height: 1.7; font-weight: 700; }
.dk-tx i { font-size: .8rem; opacity: .85; }
.dk-x { border: 0; background: rgba(255,255,255,.18); color: #fff; width: 34px; height: 34px; border-radius: 50%; font-size: 1.3rem; line-height: 1; }
@keyframes dkIn { from { transform: translateY(-30px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes dkOut { to { transform: translateY(-30px); opacity: 0; } }

/* ===== شاشة التحديث ===== */
.upd-art { display: flex; justify-content: center; gap: 4px; }
.upd-note { background: var(--soft, #F3FAF6); border-radius: 14px; padding: 10px; font-size: .9rem; margin: 0; }
.upd-v { color: var(--muted); font-size: .75rem; }

/* ===== المساعد بشكل واتساب ===== */
.helpbot.wa { background: #ECE5DD; display: grid; grid-template-rows: auto 1fr auto; }
[data-theme="dark"] .helpbot.wa { background: #0B141A; }
.wa-log { background-color: transparent; background-image: radial-gradient(rgba(0,0,0,.035) 1.5px, transparent 1.6px); background-size: 18px 18px; padding: 12px 10px 16px; gap: 6px; }
[data-theme="dark"] .wa-log { background-image: radial-gradient(rgba(255,255,255,.04) 1.5px, transparent 1.6px); }
.wa-top { display: flex; align-items: center; gap: 10px; padding: calc(8px + env(safe-area-inset-top, 0px)) 12px 8px; background: #075E54; color: #fff; }
[data-theme="dark"] .wa-top { background: #202C33; }
.wa-back { border: 0; background: none; color: #fff; width: 36px; height: 36px; display: grid; place-items: center; }
.wa-av { width: 40px; height: 40px; border-radius: 50%; overflow: hidden; background: #fff; display: grid; place-items: center; flex: none; }
.wa-av img, .wa-av svg { width: 100%; height: 100%; object-fit: cover; }
.wa-who { display: grid; line-height: 1.25; }
.wa-who b { font-size: 1.05rem; }
.wa-st { font-size: .78rem; opacity: .85; }
.wa-st.typing { color: #B7F5D0; }
.wa-day { align-self: center; margin: 4px 0 8px; }
.wa-day span { background: #E1F2FB; color: #54656F; font-size: .75rem; padding: 4px 12px; border-radius: 8px; box-shadow: 0 1px 1px rgba(0,0,0,.08); }
.helpbot.wa .hb-m { max-width: 82%; }
.helpbot.wa .hb-m p { border-radius: 0; padding: 0; background: none; color: inherit; margin: 0; }
.wa-b { position: relative; padding: 7px 10px 5px; border-radius: 10px; box-shadow: 0 1px 1px rgba(0,0,0,.13); display: grid; gap: 6px; line-height: 1.6; font-size: .97rem; }
.hb-m.bot .wa-b { background: #fff; color: #111B21; border-start-start-radius: 2px; }
.hb-m.me .wa-b { background: #D9FDD3; color: #111B21; border-start-end-radius: 2px; }
[data-theme="dark"] .hb-m.bot .wa-b { background: #202C33; color: #E9EDEF; }
[data-theme="dark"] .hb-m.me .wa-b { background: #005C4B; color: #E9EDEF; }
.wa-meta { justify-self: end; font-size: .68rem; color: #667781; display: flex; gap: 4px; align-items: center; }
.wa-tick { font-style: normal; color: #8696A0; letter-spacing: -3px; }
.wa-tick.read { color: #53BDEB; }
.wa-act { justify-self: stretch; border: 0; border-top: 1px solid rgba(0,0,0,.08); background: none; color: #027EB5; font: 600 .92rem var(--f-body, inherit); padding: 8px 4px 2px; }
.helpbot.wa .wa-typing p { display: flex; gap: 4px; padding: 12px 14px; background: #fff; border-radius: 10px; }
.wa-typing i { width: 7px; height: 7px; border-radius: 50%; background: #8696A0; animation: waDot 1.2s infinite; }
.wa-typing i:nth-child(2) { animation-delay: .2s; } .wa-typing i:nth-child(3) { animation-delay: .4s; }
@keyframes waDot { 0%, 60%, 100% { opacity: .3; transform: none; } 30% { opacity: 1; transform: translateY(-3px); } }
.wa-form { display: flex; align-items: flex-end; gap: 8px; padding: 6px 8px calc(8px + env(safe-area-inset-bottom, 0px)); }
.wa-in-wrap { flex: 1; background: #fff; border-radius: 24px; padding: 4px 14px; box-shadow: 0 1px 1px rgba(0,0,0,.1); }
[data-theme="dark"] .wa-in-wrap { background: #2A3942; }
.wa-in { width: 100%; border: 0; outline: 0; resize: none; background: none; font: inherit; color: inherit; padding: 8px 0; line-height: 1.4; max-height: 120px; }
.wa-send { flex: none; width: 48px; height: 48px; border-radius: 50%; border: 0; background: #00A884; color: #fff; display: grid; place-items: center; box-shadow: 0 2px 4px rgba(0,0,0,.2); }
.wa-send svg { width: 22px; height: 22px; }
[dir="rtl"] .wa-send svg { transform: scaleX(-1); }

/* ===== الدفع الإلكتروني ===== */
.pay-logos { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; }
.pay-logos span { border: 1px solid var(--line); border-radius: 8px; padding: 3px 10px; font: 700 .8rem system-ui, sans-serif; background: #fff; color: #1C2A44; }
.pay-card .mysr-form { min-height: 120px; }
.pay-card .fine .ic { width: 16px; height: 16px; vertical-align: -3px; }

/* ---------- أيقونة المساعد العائمة + الجولة ---------- */
.hb-fab { position: fixed; bottom: calc(20px + env(safe-area-inset-bottom, 0px)); right: 14px; z-index: 30; width: 60px; height: 60px; padding: 0; border: 3px solid #25D366; border-radius: 50%; background: #fff; box-shadow: 0 6px 18px rgba(0,0,0,.22); touch-action: none; transition: transform .15s, box-shadow .15s; animation: hbIn .35s cubic-bezier(.3,1.6,.5,1); }
[dir="rtl"] .hb-fab:not([style*="left"]) { right: auto; left: 14px; }
.hb-fab:active { transform: scale(.93); }
.hb-fab.drag { transition: none; transform: scale(1.08); box-shadow: 0 12px 28px rgba(0,0,0,.3); }
.hb-fab-face { display: block; width: 100%; height: 100%; border-radius: 50%; overflow: hidden; }
.hb-fab-face img, .hb-fab-face svg { width: 100%; height: 100%; object-fit: cover; display: block; }
.hb-fab-wa { position: absolute; bottom: -4px; inset-inline-end: -4px; width: 24px; height: 24px; border-radius: 50%; background: #fff; color: #25D366; display: grid; place-items: center; box-shadow: 0 1px 4px rgba(0,0,0,.2); }
.hb-fab-wa svg { width: 20px; height: 20px; }
.hb-fab-dot { position: absolute; top: -4px; inset-inline-start: -4px; min-width: 20px; height: 20px; border-radius: 10px; background: #E53935; color: #fff; font-size: 12px; font-weight: 700; line-height: 20px; text-align: center; box-shadow: 0 0 0 2px #fff; animation: hbPulse 1.6s infinite; }
@keyframes hbIn { from { transform: scale(0); } to { transform: scale(1); } }
@keyframes hbPulse { 50% { transform: scale(1.18); } }
.hb-tip { position: fixed; z-index: 31; background: var(--paper); color: var(--ink); border-radius: 16px; padding: 14px; box-shadow: 0 10px 30px rgba(0,0,0,.2); display: grid; gap: 10px; animation: up .25s; }
.hb-tip p { line-height: 1.7; }
.hb-tip-b { display: flex; gap: 8px; flex-wrap: wrap; }
.hb-tour { position: fixed; inset: 0; z-index: 90; }
.hb-hole { position: fixed; box-shadow: 0 0 0 9999px rgba(15,22,36,.66); transition: all .3s ease; pointer-events: none; outline: 3px solid var(--sun); }
.hb-card { position: fixed; inset-inline: 14px; max-width: 420px; margin-inline: auto; background: var(--paper); color: var(--ink); border-radius: 18px; padding: 16px; box-shadow: 0 12px 34px rgba(0,0,0,.3); display: grid; gap: 6px; animation: up .25s; }
.hb-n { color: var(--muted); font-weight: 600; }
.hb-t { font-family: var(--f-display); font-size: 1.25rem; }
.hb-d { line-height: 1.75; }
.hb-nav { display: flex; align-items: center; gap: 8px; margin-top: 6px; }
.hb-nav span { flex: 1; }
.hb-nav .btn { min-height: 40px; }

/* الأذكار: الصفحة تملا الشاشة بالظبط، والخط يصغر لوحده لو الذكر طويل */
.az-body.az-paged { gap: 8px; padding-top: 4px; }
.az-paged .az-prog { height: 6px; }
.az-paged .az-pg { width: 40px; height: 40px; }
.az-paged .az-pos { font-size: 1rem; }
.az-pager .az-card { overflow: hidden; }
.az-pager .az-card .az-x { flex: 0 1 auto; min-height: 0; overflow-y: auto; font-size: clamp(1.15rem, 4.8vw, 1.6rem); line-height: 1.9; padding: 14px 14px; border-radius: 20px; border-top-width: 5px; margin: 4px 0 8px; }
.az-pager .az-card .az-when { font-size: .75rem; padding: 2px 10px; }
.az-pager .az-card .az-foot { flex: none; padding: 8px 0 2px; }
.az-pager .az-card .az-count { padding: 12px 16px; }
.az-pager .az-card .az-count b { font-size: 1.6rem; }
.az-pager .az-card .az-say { width: 46px; height: 46px; }
@media (min-height: 760px) { .az-pager .az-card .az-x { padding: 18px 16px; } }
.q-ix-note { margin: 0 14px 4px; padding: 8px 12px; border-radius: 12px; background: rgba(255,255,255,.1); color: #fff; font-size: .88rem; text-align: center; }
.q-face { width: 78px; height: 94px; }
.q-face.big { width: 96px; height: 115px; }
.q-face img { clip-path: path('M5.85 90V39C5.85 17.55 21.45 5.85 39 3.9c17.55 1.95 33.15 13.65 33.15 35.1V90z'); }
.q-face.big img { clip-path: path('M7.2 110V48C7.2 21.6 26.4 7.2 48 4.8c21.6 2.4 40.8 16.8 40.8 43.2V110z'); }

/* فقاعة الكلام فوق الشخصية */
.pl-bubwrap { width: 280px; height: 130px; display: flex; align-items: flex-end; justify-content: center; }
.pl-bub { position: relative; max-width: 270px; background: #fff; color: #23314A; border-radius: 22px; padding: 10px 18px; font-family: var(--f-display); font-size: 25px; line-height: 1.3; font-weight: 700; text-align: center; box-shadow: 0 6px 18px rgba(0,0,0,.18); border: 3px solid var(--bub, #F2B84B); animation: bubIn .35s cubic-bezier(.3,1.6,.5,1) both; transform-origin: 50% 100%; }
.pl-bub::after { content: ''; position: absolute; bottom: -14px; left: calc(50% + var(--tail, 0px) - 12px); border: 12px solid transparent; border-top-color: var(--bub, #F2B84B); border-bottom: 0; }
.pl-bub[data-who="yassin"] { --bub: #4C9BE8; } .pl-bub[data-who="mariam"] { --bub: #EC6A9C; } .pl-bub[data-who="mama"] { --bub: #9B6BD6; } .pl-bub[data-who="baba"] { --bub: #3FA66B; } .pl-bub[data-who="omar"] { --bub: #F08A3C; }
@keyframes bubIn { from { transform: scale(.4) translateY(20px); opacity: 0; } to { transform: none; opacity: 1; } }
.player.bub-on .pl-text { opacity: .55; font-size: clamp(1rem, 2.4vw, 1.35rem); }
.actor.turn .body { animation: walkbob .3s ease-in-out infinite; }
.handoff { transition: transform 1.1s cubic-bezier(.4,.1,.3,1); }
.handoff > g { animation: hopArc 1.1s ease-in-out; }
@keyframes hopArc { 50% { transform: translateY(-70px) scale(.7); } }

/* كادر الحدث المرسوم + حركة كاميرا */
.pl-stage.has-art .cast, .pl-stage.has-art .props { display: none; }
.pl-stage.has-art .cam-drift { animation: none; }
.pl-stage .kb { transform-box: view-box; transform-origin: 50% 50%; animation-duration: 9s; animation-timing-function: ease-in-out; animation-fill-mode: both; }
.pl-stage .kb.kb-in { animation-name: kbIn; } .pl-stage .kb.kb-left { animation-name: kbLeft; } .pl-stage .kb.kb-right { animation-name: kbRight; } .pl-stage .kb.kb-up { animation-name: kbUp; } .pl-stage .kb.kb-out { animation-name: kbOut; }
@keyframes kbFadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes kbIn { from { transform: scale(1.04); } to { transform: scale(1.18) translate(-1%, -1.5%); } }
@keyframes kbOut { from { transform: scale(1.2) translate(1%, -1%); } to { transform: scale(1.04); } }
@keyframes kbLeft { from { transform: scale(1.16) translate(3%, 0); } to { transform: scale(1.16) translate(-3%, -1%); } }
@keyframes kbRight { from { transform: scale(1.16) translate(-3%, -1%); } to { transform: scale(1.16) translate(3%, 0); } }
@keyframes kbUp { from { transform: scale(1.15) translate(0, 3%); } to { transform: scale(1.12) translate(0, -2.5%); } }
@media (prefers-reduced-motion: reduce) { .pl-stage .kb { animation: none !important; } }

/* إخراج: انتقالات بين الكوادر */
.pl-stage .kb.kb-in2 { animation-name: kbIn2; }
@keyframes kbIn2 { from { transform: scale(1.06) translate(1%, 0); } to { transform: scale(1.2) translate(2%, -1.5%); } }
.pl-stage .kb > image { transform-box: view-box; transform-origin: 50% 50%; }
.pl-stage .kb.tr-fade > image { animation: trFade .9s ease-out both; }
.pl-stage .kb.tr-whipl > image { animation: trWhipL .55s cubic-bezier(.2,.8,.2,1) both; }
.pl-stage .kb.tr-whipr > image { animation: trWhipR .55s cubic-bezier(.2,.8,.2,1) both; }
.pl-stage .kb.tr-zoom > image { animation: trZoom .7s cubic-bezier(.2,.8,.2,1) both; }
.pl-stage .kb.tr-iris > image { animation: trIris .8s ease-out both; }
.pl-stage .kb.tr-cut > image { animation: trCut .25s ease-out both; }
@keyframes trFade { from { opacity: 0; } to { opacity: 1; } }
@keyframes trWhipL { from { transform: translateX(60%); filter: blur(14px); opacity: .3; } to { transform: none; filter: none; opacity: 1; } }
@keyframes trWhipR { from { transform: translateX(-60%); filter: blur(14px); opacity: .3; } to { transform: none; filter: none; opacity: 1; } }
@keyframes trZoom { from { transform: scale(1.6); filter: blur(10px); opacity: 0; } to { transform: none; filter: none; opacity: 1; } }
@keyframes trIris { from { clip-path: circle(0% at 50% 50%); } to { clip-path: circle(80% at 50% 50%); } }
@keyframes trCut { from { opacity: .4; } to { opacity: 1; } }
.pl-stage .kb.out { pointer-events: none; }
.pl-stage .kb.out > image { animation: trOut .8s ease-in both; }
.pl-stage .kb.out-tr-whipl > image { animation: trOutL .5s ease-in both; }
.pl-stage .kb.out-tr-whipr > image { animation: trOutR .5s ease-in both; }
.pl-stage .kb.out-cut > image { animation: trOut .25s linear both; }
@keyframes trOut { to { opacity: 0; } }
@keyframes trOutL { to { transform: translateX(-60%); filter: blur(14px); opacity: 0; } }
@keyframes trOutR { to { transform: translateX(60%); filter: blur(14px); opacity: 0; } }
.pl-stage.has-art .flash.go { animation: flashfade .45s ease-out; }

/* كادر الحلقات: الصورة كاملة 16:9 على الموبايل، وحركة كاميرا هادية */
.player.ep-art .pl-stage { aspect-ratio: 16 / 9 !important; max-width: 100% !important; }
@keyframes kbIn { from { transform: scale(1.01); } to { transform: scale(1.08) translate(-.5%, -.8%); } }
@keyframes kbIn2 { from { transform: scale(1.01) translate(.5%, 0); } to { transform: scale(1.08) translate(1%, -.8%); } }
@keyframes kbOut { from { transform: scale(1.08) translate(.5%, -.5%); } to { transform: scale(1.01); } }
@keyframes kbLeft { from { transform: scale(1.06) translate(1.5%, 0); } to { transform: scale(1.06) translate(-1.5%, -.5%); } }
@keyframes kbRight { from { transform: scale(1.06) translate(-1.5%, -.5%); } to { transform: scale(1.06) translate(1.5%, 0); } }
@keyframes kbUp { from { transform: scale(1.06) translate(0, 1.5%); } to { transform: scale(1.06) translate(0, -1.5%); } }
/* مين بيتكلم: اسمه + نقط بتتحرك */
.pl-bub-who { display: flex; align-items: center; justify-content: center; gap: 6px; font-size: 15px; font-weight: 800; color: var(--bub, #F2B84B); margin-bottom: 2px; }
.pl-bub-t { display: block; }
.pl-dots { display: inline-flex; gap: 3px; font-style: normal; }
.pl-dots b { width: 6px; height: 6px; border-radius: 50%; background: var(--bub, #F2B84B); animation: dotUp 1s ease-in-out infinite; }
.pl-dots b:nth-child(2) { animation-delay: .15s; } .pl-dots b:nth-child(3) { animation-delay: .3s; }
@keyframes dotUp { 0%, 60%, 100% { transform: translateY(0); opacity: .5; } 30% { transform: translateY(-5px); opacity: 1; } }
.pl-bub.no-tail::after { display: none; }
.player.ep-art.bub-on .pl-text { opacity: .45; }

.pl-bubwrap.big { width: 440px; height: 170px; align-items: flex-start; }
.pl-bubwrap.big .pl-bub { max-width: 430px; font-size: 38px; padding: 10px 26px 14px; border-width: 4px; border-radius: 30px; }
.pl-bubwrap.big .pl-bub-who { font-size: 24px; }
.pl-bubwrap.big .pl-dots b { width: 9px; height: 9px; }

/* فقاعة زجزاج (زي كلام الكارتون) */
.pl-bubwrap.big { height: 190px; padding-top: 18px; filter: drop-shadow(0 0 2px var(--bubc, #F2B84B)) drop-shadow(0 6px 10px rgba(0,0,0,.25)); }
.pl-bubwrap.big .pl-bub { font-size: 23px; line-height: 1.2; padding: 20px 36px 20px; border: 0; border-radius: 0; background: transparent; box-shadow: none; animation: bubIn .35s cubic-bezier(.3,1.6,.5,1) both; }
.pl-bubwrap.big .pl-bub::before { content: ''; position: absolute; inset: 0; z-index: -1; background: #fff; clip-path: polygon(100.0% 50.0%,92.3% 57.5%,97.0% 67.1%,87.2% 71.5%,88.3% 82.1%,77.6% 82.9%,75.0% 93.3%,64.7% 90.4%,58.7% 99.2%,50.0% 93.0%,41.3% 99.2%,35.3% 90.4%,25.0% 93.3%,22.4% 82.9%,11.7% 82.1%,12.8% 71.5%,3.0% 67.1%,7.7% 57.5%,0.0% 50.0%,7.7% 42.5%,3.0% 32.9%,12.8% 28.5%,11.7% 17.9%,22.4% 17.1%,25.0% 6.7%,35.3% 9.6%,41.3% 0.8%,50.0% 7.0%,58.7% 0.8%,64.7% 9.6%,75.0% 6.7%,77.6% 17.1%,88.3% 17.9%,87.2% 28.5%,97.0% 32.9%,92.3% 42.5%); }
.pl-bubwrap.big .pl-bub.no-tail::after { display: none; }
.pl-bubwrap.big .pl-bub-who { font-size: 15px; }
.pl-bubwrap.big .pl-dots b { width: 5px; height: 5px; }

/* الفقاعة كـ HTML فوق الصورة، حجمها بيتظبط مع عرض الصورة (--k) */
.pl-stage-wrap { position: relative; }
.pl-stage-wrap > .pl-bubwrap { position: absolute; z-index: 5; width: auto; height: auto; display: block; pointer-events: none; padding: 0; filter: none; }
.pl-stage-wrap > .pl-bubwrap .pl-bub { max-width: calc(300px * var(--k) + 60px); font-size: max(12px, calc(25px * var(--k))); padding: calc(8px + 6px * var(--k)) calc(14px + 10px * var(--k)); white-space: normal; }
.pl-stage-wrap > .pl-bubwrap .pl-bub-who { font-size: max(10px, calc(16px * var(--k))); }
.pl-stage-wrap > .pl-bubwrap .pl-dots b { width: max(4px, calc(6px * var(--k))); height: max(4px, calc(6px * var(--k))); }
.pl-stage-wrap > .pl-bubwrap.big { filter: drop-shadow(0 0 1.5px var(--bubc, #F2B84B)) drop-shadow(0 4px 8px rgba(0,0,0,.25)); }
.pl-stage-wrap > .pl-bubwrap.big .pl-bub { padding: calc(10px + 8px * var(--k)) calc(18px + 16px * var(--k)); }
