/* رياضيات لينا — أسلوب «ملصقات الحكايات»: كريمي دافئ، حدود سميكة، ظلال مزاحة، ألوان فصول دلالية. */
@font-face { font-family: Cairo; font-weight: 400; font-display: swap; src: url(../fonts/cairo-arabic-400-normal.woff2) format("woff2"); }
@font-face { font-family: Cairo; font-weight: 700; font-display: swap; src: url(../fonts/cairo-arabic-700-normal.woff2) format("woff2"); }
@font-face { font-family: Cairo; font-weight: 800; font-display: swap; src: url(../fonts/cairo-arabic-800-normal.woff2) format("woff2"); }

:root {
  --ink: #2b2250; --ink-2: #5b5380; --paper: #fff8ee; --card: #ffffff; --line: #2b2250;
  --pink: #ff6fa5; --pink-bg: #ffe3ee; --orange: #ff9a3d; --orange-bg: #ffecd6;
  --teal: #19b99a; --teal-bg: #d8f6ee; --violet: #8b6bff; --violet-bg: #e8e1ff;
  --blue: #3d9bff; --blue-bg: #dcecff; --gold: #ffc83d; --good: #22b573; --good-bg: #dcf8ea; --bad: #ee5a6f;
  --accent: var(--violet); --accent-bg: var(--violet-bg);
  --r: 22px; --shadow: 0 5px 0 var(--line); --gut: clamp(14px, 3vw, 28px);
  --f: Cairo, "Segoe UI", Tahoma, system-ui, sans-serif;
}
.pink { --accent: var(--pink); --accent-bg: var(--pink-bg); }
.orange { --accent: var(--orange); --accent-bg: var(--orange-bg); }
.teal { --accent: var(--teal); --accent-bg: var(--teal-bg); }
.violet { --accent: var(--violet); --accent-bg: var(--violet-bg); }
.blue { --accent: var(--blue); --accent-bg: var(--blue-bg); }

@media (prefers-color-scheme: dark) {
  :root { --ink: #f4efff; --ink-2: #c9c0ee; --paper: #1d1838; --card: #2a2354; --line: #0e0a22; }
  .pink { --accent-bg: #4a2540; } .orange { --accent-bg: #4a3320; } .teal { --accent-bg: #1c4a44; }
  .violet { --accent-bg: #3a2f78; } .blue { --accent-bg: #1f3c66; }
  .hintbox { color: var(--ink); } .qvis, .key { color: var(--ink); }
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; min-height: 100%; background: var(--paper); color: var(--ink); font-family: var(--f); font-weight: 700; touch-action: manipulation; overscroll-behavior: none; }
body { font-size: clamp(17px, 2.2vw, 22px); line-height: 1.55; -webkit-user-select: none; user-select: none; }
#app { min-height: 100vh; min-height: 100dvh; padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left); }
button { font: inherit; color: inherit; cursor: pointer; }
:focus-visible { outline: 4px solid var(--blue); outline-offset: 3px; }
.ex { direction: ltr; unicode-bidi: isolate; display: inline-block; }
b { font-weight: 800; }

/* ---------- خلفيات ---------- */
.bg-start { background: radial-gradient(circle at 20% 15%, #ffe3ee 0 22%, transparent 23%), radial-gradient(circle at 85% 80%, #dcecff 0 25%, transparent 26%), var(--paper); }
.bg-home, .bg-rewards, .bg-parent { background: linear-gradient(180deg, #fff1fa 0, var(--paper) 60%); }
.bg-chapter, .bg-lesson { background: linear-gradient(180deg, var(--accent-bg) 0, var(--paper) 55%); }
@media (prefers-color-scheme: dark) { .bg-start, .bg-home, .bg-rewards, .bg-parent, .bg-chapter, .bg-lesson { background: var(--paper); } }

/* ---------- أزرار ---------- */
.btn { border: 3px solid var(--line); background: var(--accent); color: #fff; border-radius: 18px; padding: 10px 22px; min-height: 56px; box-shadow: var(--shadow); font-weight: 800; transition: transform .12s, box-shadow .12s; text-shadow: 0 1px 0 rgba(0,0,0,.18); }
.btn:active { transform: translateY(4px); box-shadow: 0 1px 0 var(--line); }
.btn.big { min-height: 68px; font-size: 1.15em; padding: 12px 30px; }
.btn.huge { min-height: 84px; font-size: 1.45em; padding: 14px 36px; background: var(--pink); }
.btn.ghost { background: var(--card); color: var(--ink); text-shadow: none; }
.btn.danger { background: var(--bad); }
.btn:disabled { opacity: .5; }
.pulse { animation: pulse 1.6s ease-in-out infinite; }
@keyframes pulse { 50% { transform: scale(1.04); } }
.iconbtn { width: 56px; height: 56px; border-radius: 50%; border: 3px solid var(--line); background: var(--card); box-shadow: var(--shadow); font-size: 1.4em; }
.iconbtn:active { transform: translateY(4px); box-shadow: 0 1px 0 var(--line); }
.row { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; margin-top: 14px; }
.chip { border: 3px solid var(--line); background: var(--card); border-radius: 999px; padding: 4px 18px; box-shadow: var(--shadow); }

/* ---------- شاشة البداية ---------- */
.start { min-height: 100dvh; display: grid; place-items: center; padding: var(--gut); text-align: center; }
.start-card { display: grid; gap: 8px; justify-items: center; }
.start .mascot { width: min(46vw, 260px); animation: bob 3s ease-in-out infinite; }
.start h1 { margin: 0; font-size: clamp(2.2rem, 7vw, 3.6rem); letter-spacing: -.5px; color: var(--violet); text-shadow: 0 4px 0 var(--line); -webkit-text-stroke: 2px var(--line); paint-order: stroke fill; }
.start p { margin: 0 0 16px; color: var(--ink-2); }
@keyframes bob { 50% { transform: translateY(-10px) rotate(2deg); } }

/* ---------- الشريط العلوي ---------- */
.topbar { display: flex; align-items: center; gap: 12px; padding: var(--gut); padding-block-end: 8px; }
.topbar h2 { margin: 0; font-size: 1.3em; }
.spacer { flex: 1; }
.ltitle { display: grid; line-height: 1.25; } .ltitle small { color: var(--ink-2); font-weight: 400; }

/* ---------- الرئيسية ---------- */
.home, .chapter, .rewards, .parent { max-width: 1000px; margin: 0 auto; padding-bottom: 40px; }
.hero { display: flex; align-items: center; gap: 18px; padding: 0 var(--gut); }
.mascot-wrap { flex: none; width: clamp(130px, 26vw, 210px); cursor: pointer; }
.mascot-wrap.sm { width: clamp(84px, 14vw, 120px); }
.mascot { width: 100%; height: auto; display: block; overflow: visible; }
.mascot.cheer { animation: hop .6s ease 2; } .mascot.think { animation: tilt 1s ease; }
@keyframes hop { 40% { transform: translateY(-22px) scale(1.04); } }
@keyframes tilt { 30% { transform: rotate(-6deg); } 70% { transform: rotate(5deg); } }
.bubble { position: relative; background: var(--card); border: 3px solid var(--line); border-radius: var(--r); padding: 12px 18px; box-shadow: var(--shadow); flex: 1; }
.bubble::before { content: ""; position: absolute; inset-inline-start: -14px; top: 50%; width: 22px; height: 22px; background: var(--card); border-inline-start: 3px solid var(--line); border-block-end: 3px solid var(--line); transform: translateY(-50%) rotate(45deg); }
.cont { display: grid; margin: 22px var(--gut) 8px; width: calc(100% - 2 * var(--gut)); text-align: center; background: var(--pink); }
.cont small { font-weight: 400; opacity: .95; font-size: .6em; }
.allwon { text-align: center; font-size: 1.5em; margin: 20px; }
.chapters { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 18px; padding: 18px var(--gut); }
.chcard { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; align-items: center; text-align: start; border: 3px solid var(--line); border-radius: var(--r); background: var(--accent-bg); box-shadow: var(--shadow); padding: 16px 18px; min-height: 120px; }
.chcard:nth-child(even) { transform: rotate(.6deg); } .chcard:nth-child(odd) { transform: rotate(-.6deg); }
.chcard:active { transform: translateY(4px); box-shadow: 0 1px 0 var(--line); }
.chcard .em { font-size: 3rem; line-height: 1; } .chcard .t { display: grid; line-height: 1.2; } .chcard .t b { font-size: 1.25em; color: var(--accent); filter: brightness(.7); }
.prog { grid-column: 1 / -1; height: 14px; background: #fff; border: 3px solid var(--line); border-radius: 99px; overflow: hidden; }
.prog i { display: block; height: 100%; background: var(--accent); }
.chcard small { grid-column: 1 / -1; color: var(--ink-2); font-weight: 400; }
.foot { text-align: center; color: var(--ink-2); font-weight: 400; font-size: .75em; padding: 10px; }

/* ---------- مسار الفصل ---------- */
.path { list-style: none; margin: 0; padding: 8px var(--gut); display: grid; gap: 14px; }
.node { display: grid; grid-template-columns: auto 1fr auto; gap: 14px; align-items: center; width: 100%; text-align: start; padding: 12px 16px; border: 3px solid var(--line); border-radius: var(--r); background: var(--card); box-shadow: var(--shadow); min-height: 84px; }
.node:active { transform: translateY(4px); box-shadow: 0 1px 0 var(--line); }
.node .idx { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 50%; background: var(--accent); color: #fff; border: 3px solid var(--line); font-size: 1.3em; }
.node.done .idx { background: var(--good); }
.node.game { background: #fff6cf; } .node.boss { background: var(--accent-bg); }
.node .nt { display: grid; line-height: 1.3; } .node small { font-weight: 400; color: var(--ink-2); }
.node .meta { display: grid; justify-items: end; gap: 2px; } .page { font-size: .78em; color: var(--ink-2); font-weight: 400; }
.node:disabled { opacity: .55; }
.st { color: #d9d3ee; font-size: 1.4em; } .st.on { color: var(--gold); text-shadow: 0 2px 0 #b57f00; }

/* ---------- الدرس ---------- */
.lesson { max-width: 900px; margin: 0 auto; display: grid; grid-template-columns: minmax(0, 1fr); grid-template-rows: auto 1fr auto; min-height: 100dvh; }
.play { padding: 0 var(--gut) 12px; }
.dock { display: flex; align-items: center; gap: 12px; padding: 8px var(--gut) 12px; background: linear-gradient(0deg, var(--paper) 70%, transparent); }
.dock .bubble { font-size: .9em; padding: 8px 14px; }
.qcard { background: var(--card); border: 3px solid var(--line); border-radius: 28px; box-shadow: var(--shadow); padding: clamp(14px, 3vw, 26px); display: grid; gap: 12px; }
.qtop { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.dots { display: flex; gap: 6px; flex-wrap: wrap; } .dots i { width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--line); background: #fff; }
.dots i.done { background: var(--good); } .dots i.now { background: var(--gold); transform: scale(1.25); }
.speakbtn { width: 48px; height: 48px; border-radius: 50%; border: 3px solid var(--line); background: var(--accent-bg); font-size: 1.2em; }
.stepchip { justify-self: start; background: var(--accent); color: #fff; padding: 2px 16px; border-radius: 99px; border: 3px solid var(--line); }
.qprompt { margin: 0; font-size: 1.15em; }
.qvis { display: grid; place-items: center; background: var(--accent-bg); border-radius: 20px; padding: 14px; min-height: 90px; overflow-x: auto; }
.ex.big { font-size: 1.9em; font-weight: 800; letter-spacing: 2px; }
.seq { direction: ltr; display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; } .seq b { min-width: 56px; padding: 6px 10px; text-align: center; background: #fff; color: #2b2250; border: 3px solid var(--line); border-radius: 14px; font-size: 1.3em; } .seq b.q { background: var(--gold); }
.bigNum { direction: ltr; display: flex; gap: 6px; } .bigNum b { width: 54px; height: 64px; display: grid; place-items: center; background: #fff; color: #2b2250; border: 3px solid var(--line); border-radius: 12px; font-size: 1.8em; } .bigNum b.on { background: var(--gold); transform: translateY(-4px); }
.words { text-align: center; font-size: 1.25em; color: var(--accent); filter: brightness(.75); padding: 4px; }
.ask { font-size: 1.1em; text-align: center; } .tnum { font-size: 1.5em; color: var(--pink); }
.tbl { display: grid; gap: 4px; direction: ltr; } .tbl div { display: flex; justify-content: space-between; gap: 30px; background: #fff; color: #2b2250; padding: 2px 14px; border-radius: 10px; border: 2px solid var(--line); }

/* الاختيارات */
.choices { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 12px; }
.choices.n2 { grid-template-columns: 1fr 1fr; }
.choice { min-height: 72px; font-size: 1.35em; background: #fff; color: #2b2250; border: 3px solid var(--line); border-radius: 18px; box-shadow: var(--shadow); padding: 8px 12px; font-weight: 800; }
.choice:active:not(:disabled) { transform: translateY(4px); box-shadow: 0 1px 0 var(--line); }
.choice.ok { background: var(--good); color: #fff; } .choice.bad { background: #ffd4da; opacity: .75; text-decoration: line-through; }
.choice:disabled { cursor: default; }
.slots { display: flex; gap: 10px; justify-content: center; } .slot { width: 78px; height: 64px; display: grid; place-items: center; border: 3px dashed var(--ink-2); border-radius: 14px; font-size: 1.4em; } .slot.full { border-style: solid; background: var(--gold); color: #2b2250; border-color: var(--line); }

/* لوحة الأرقام */
.numpad { max-width: 330px; margin: 0 auto; width: 100%; display: grid; gap: 10px; }
.numpad.off { opacity: .5; pointer-events: none; }
.np-out { display: block; text-align: center; font-size: 2.2em; font-weight: 800; background: #fff; color: #2b2250; border: 3px solid var(--line); border-radius: 16px; min-height: 66px; direction: rtl; }
.np-keys { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.key { min-height: 64px; font-size: 1.6em; font-weight: 800; background: #fff; color: #2b2250; border: 3px solid var(--line); border-radius: 16px; box-shadow: var(--shadow); }
.key:active { transform: translateY(4px); box-shadow: 0 1px 0 var(--line); }
.key.ok { background: var(--good); color: #fff; } .key.alt { background: #ffe3b3; }
.shake { animation: shake .4s; } @keyframes shake { 25% { transform: translateX(-8px); } 75% { transform: translateX(8px); } }

/* التغذية الراجعة */
.hintbox { background: #fff7d6; color: #2b2250; border: 3px solid var(--line); border-radius: 16px; padding: 10px 14px; margin-top: 4px; }
.hintbox.good { background: var(--good-bg); } .hintbox.reveal { background: #ffe5ea; }
.nextbtn { margin-top: 10px; width: 100%; }
.qfeed:empty { display: none; }

/* خط الأعداد */
.nl { width: min(100%, 640px); height: auto; } .nl-line { stroke: var(--ink); stroke-width: 5; stroke-linecap: round; } .nl-tick { stroke: var(--ink); stroke-width: 4; }
.nl-txt { fill: var(--ink); font: 800 22px Cairo, sans-serif; } .nl-n { fill: var(--pink); font: 800 24px Cairo, sans-serif; }
.nl-dot { fill: var(--pink); stroke: var(--line); stroke-width: 4; } .nl-dot.landed { fill: var(--good); }

/* الشبكات */
.arr { display: grid; grid-template-columns: repeat(var(--c), 1fr); gap: 5px; direction: ltr; width: fit-content; max-width: 100%; }
.arr i { width: 30px; height: 30px; border-radius: 8px; background: var(--accent); border: 2px solid var(--line); }
.arr.small i { width: 18px; height: 18px; border-radius: 5px; border-width: 2px; }
.arr.live i { animation: pop .25s backwards; } .arr.spin { animation: spin .7s; }
@keyframes pop { from { transform: scale(0); } } @keyframes spin { from { transform: rotate(-90deg) scale(.6); } }
.stage { flex-direction: column; gap: 8px; }
.stepper { display: flex; gap: 22px; justify-content: center; flex-wrap: wrap; } .stepper > div { display: flex; align-items: center; gap: 10px; background: var(--accent-bg); border-radius: 16px; padding: 6px 12px; }
.stepper.off { opacity: .5; pointer-events: none; } .stepper b { min-width: 34px; text-align: center; font-size: 1.5em; }
.mini { width: 46px; height: 46px; border-radius: 12px; border: 3px solid var(--line); background: #fff; color: #2b2250; font-size: 1.5em; font-weight: 800; box-shadow: 0 3px 0 var(--line); }
.mini:active { transform: translateY(3px); box-shadow: none; }
.bags { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; direction: ltr; }
.bag { display: flex; flex-wrap: wrap; gap: 4px; width: 92px; min-height: 64px; padding: 8px; border: 3px solid var(--line); border-radius: 22px 22px 14px 14px; background: #fff0c9; align-content: flex-start; justify-content: center; }
.bag i { width: 20px; height: 20px; border-radius: 50%; background: var(--pink); border: 2px solid var(--line); }

/* مكعبات المنازل */
.board { display: flex; gap: 10px; justify-content: center; direction: ltr; }
.col { flex: 1; min-width: 0; max-width: 190px; display: grid; gap: 6px; justify-items: center; background: var(--accent-bg); border: 3px solid var(--line); border-radius: 18px; padding: 8px 4px; align-content: start; }
.col.over { background: #ffe5ea; } .chead { font-size: .8em; text-align: center; line-height: 1.2; }
.stack { display: flex; flex-wrap: wrap; justify-content: center; align-items: flex-end; gap: 3px; min-height: 96px; width: 100%; padding: 2px; align-content: flex-end; }
.ctl { display: flex; align-items: center; gap: 6px; } .ctl .mini { width: 38px; height: 38px; font-size: 1.2em; } .cnt { font-size: 1.3em; min-width: 1.2em; text-align: center; }
.pack { border: 3px solid var(--line); border-radius: 12px; background: var(--gold); color: #2b2250; padding: 2px 8px; font-size: .8em; animation: pulse 1.2s infinite; }
.pc { display: inline-block; border: 2px solid var(--line); border-radius: 4px; flex: none; }
.pc0 { width: 16px; height: 16px; background: #ffd23f; }
.pc1 { width: 16px; height: 56px; background: repeating-linear-gradient(0deg, #4cd7a5 0 5px, #36b88a 5px 5.6px); }
.pc2 { width: 52px; height: 52px; background: repeating-linear-gradient(90deg, transparent 0 4.6px, rgba(0,0,0,.25) 4.6px 5.2px), repeating-linear-gradient(0deg, #6aa8ff 0 4.6px, #4f8fe8 4.6px 5.2px); }
.pc3 { width: 58px; height: 58px; background: linear-gradient(135deg, #ff9fc2, #ff6fa5); box-shadow: 5px 5px 0 #c83e7a; border-radius: 6px; }
.pc4 { width: 62px; height: 62px; background: linear-gradient(135deg, #b9a5ff, #7c5cff); box-shadow: 6px 6px 0 #4b32b8; border-radius: 6px; }
.col:has(.pc2) .stack .pc2, .col:has(.pc3) .stack .pc3, .col:has(.pc4) .stack .pc4 { transform: scale(.72); margin: -8px; }
.tray { display: flex; justify-content: center; gap: 16px; direction: ltr; padding: 10px; border: 3px dashed var(--ink-2); border-radius: 18px; flex-wrap: wrap; }
.traypc { display: grid; justify-items: center; gap: 2px; touch-action: none; cursor: grab; padding: 4px 8px; border-radius: 12px; } .traypc small { font-size: .65em; font-weight: 400; } .traypc:active { background: var(--accent-bg); }
.dragpc { position: fixed; left: 0; top: 0; pointer-events: none; z-index: 50; }
.readout { text-align: center; font-size: 2em; } .ro-n { padding: 0 18px; border: 3px solid var(--line); border-radius: 14px; background: #fff; color: #2b2250; }
.board.view .col { max-width: 160px; }

/* محاكي إعادة التجميع */
.rg { direction: ltr; background: var(--accent-bg); border-radius: 18px; padding: 10px; display: grid; gap: 4px; }
.rgrow { display: flex; gap: 6px; justify-content: center; position: relative; }
.rgrow.opr { padding-inline: 0; } .op { position: absolute; left: 0; top: 10px; font-size: 2em; font-weight: 800; }
.cell { flex: 1; max-width: 190px; min-height: 52px; display: grid; justify-items: center; align-content: start; gap: 2px; padding: 4px; border-radius: 12px; }
.cell.cur { background: rgba(255, 255, 255, .7); outline: 3px dashed var(--accent); }
.cell .ph { font-size: .72em; } .dg { font-size: 1.7em; } .dg.res { color: var(--good); }
.cell .blocks { display: flex; flex-wrap: wrap; gap: 2px; justify-content: center; max-width: 150px; }
.cell .pc0 { width: 11px; height: 11px; } .cell .pc1 { width: 11px; height: 36px; } .cell .pc2 { width: 34px; height: 34px; }
.blocks.take .pc { opacity: .55; background-image: none; background-color: #ffb3c1; }
.chip.bor, .cell .chip { background: var(--gold); color: #2b2250; border: 2px solid var(--line); border-radius: 99px; padding: 0 10px; box-shadow: none; font-size: .9em; }
.line { height: 5px; background: var(--ink); border-radius: 4px; margin: 2px 8px; }
.rgmsg { background: #fff; color: #2b2250; border: 3px solid var(--line); border-radius: 14px; padding: 8px 12px; }

/* الألعاب */
.clue { text-align: center; background: var(--accent-bg); border-radius: 16px; padding: 6px; } .clue b { display: block; font-size: 2em; }
.secret { display: flex; gap: 10px; justify-content: center; } .secret span { width: 62px; height: 76px; display: grid; place-items: center; font-size: 2em; background: #fff; color: #2b2250; border: 3px solid var(--line); border-radius: 14px; } .secret span.cur { background: var(--gold); transform: translateY(-4px); }
.tiles { display: flex; gap: 8px; justify-content: center; } .tiles i { width: 34px; height: 22px; border: 3px solid var(--line); background: #fff; border-radius: 6px; } .tiles i.shade { background: var(--bad); }
.sheets { display: flex; gap: 14px; justify-content: center; } .sheet { flex: 1; max-width: 220px; text-align: center; background: #fff; color: #2b2250; border: 3px solid var(--line); border-radius: 16px; padding: 6px; } .sheet b { display: block; font-size: 2.2em; } .sheet.bot { background: #dcecff; }
.dicebox { display: flex; gap: 16px; justify-content: center; } .die { width: 76px; height: 76px; display: grid; place-items: center; background: #fff; color: #2b2250; border: 3px solid var(--line); border-radius: 18px; font-size: 2.4em; box-shadow: var(--shadow); }
.strip { display: flex; gap: 6px; justify-content: center; } .fac { position: relative; flex: 1; min-width: 0; max-width: 56px; height: 62px; padding: 0; font-size: 1.5em; font-weight: 800; background: #fff; color: #2b2250; border: 3px solid var(--line); border-radius: 14px; box-shadow: 0 4px 0 var(--line); } .fac.pick { background: var(--gold); }
.tok { position: absolute; inset-inline: 0; top: -14px; margin: auto; width: 20px; height: 20px; border-radius: 50%; background: var(--pink); border: 3px solid var(--line); } .tok.sel { background: var(--gold); transform: scale(1.3); }
.eqbar { text-align: center; font-size: 1.6em; min-height: 1.4em; justify-self: center; }
.tboard { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; max-width: 420px; margin: 0 auto; width: 100%; } .tc { aspect-ratio: 1; font-size: 1.3em; font-weight: 800; background: #fff; color: #2b2250; border: 3px solid var(--line); border-radius: 12px; }
.tc.live { background: #fffbe0; } .tc.L { background: var(--pink); color: #fff; } .tc.C { background: var(--blue); color: #fff; } .tc.win { outline: 4px solid var(--gold); animation: pulse 1s infinite; } .tc:disabled { opacity: 1; }
.mt { display: grid; gap: 3px; direction: ltr; } .mtrow { display: grid; grid-template-columns: repeat(11, 1fr); gap: 3px; } .mtrow.head span, .rh { text-align: center; font-size: .75em; background: var(--accent); color: #fff; border-radius: 6px; }
.mc { aspect-ratio: 1.1; font-size: .72em; padding: 0; background: #fff; color: #2b2250; border: 2px solid var(--line); border-radius: 6px; font-weight: 700; } .mc.hit { background: var(--good); color: #fff; } .mc.nope { background: #ffd4da; }
@media (min-width: 600px) { .mc { font-size: .95em; } }

/* النتيجة والجوائز */
.result { text-align: center; background: var(--card); border: 3px solid var(--line); border-radius: 28px; box-shadow: var(--shadow); padding: 24px; }
.bigstars .st { font-size: 4rem; display: inline-block; animation: starIn .6s backwards; } @keyframes starIn { from { transform: scale(0) rotate(-90deg); } }
.badges { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 14px; padding: 18px var(--gut); } .newbadges { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin: 10px 0; }
.badge { display: grid; justify-items: center; text-align: center; gap: 2px; padding: 12px 8px; border: 3px solid var(--line); border-radius: 20px; background: var(--card); opacity: .55; filter: grayscale(.7); } .badge.on { opacity: 1; filter: none; background: #fff6cf; color: #2b2250; box-shadow: var(--shadow); } .badge span { font-size: 2.4rem; line-height: 1.1; } .badge small { font-weight: 400; font-size: .72em; }
.confetti { position: fixed; inset: 0; pointer-events: none; z-index: 100; }

/* لوحة ولي الأمر */
.parent { padding: var(--gut); } .parent.gate { display: grid; gap: 10px; justify-items: center; text-align: center; padding-top: 8vh; }
.kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; padding: 0 var(--gut); } .kpis div { background: var(--card); border: 3px solid var(--line); border-radius: 18px; padding: 10px; text-align: center; box-shadow: var(--shadow); } .kpis b { font-size: 1.8em; display: block; } .kpis small { font-weight: 400; }
.card { background: var(--card); border: 3px solid var(--line); border-radius: 22px; margin: 16px var(--gut) 0; padding: 14px 18px; } .card h3 { margin: 0 0 8px; font-size: 1.05em; }
.week { width: 100%; max-width: 480px; direction: ltr; } .bar { fill: var(--violet); } .bl { fill: var(--ink-2); font: 700 11px Cairo, sans-serif; } .bv { fill: var(--ink); font: 800 11px Cairo, sans-serif; }
.focus { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; } .focus li { display: grid; grid-template-columns: 1fr auto; gap: 0 10px; padding: 8px 10px; border-radius: 12px; background: var(--accent-bg); } .focus small { grid-column: 1 / -1; font-weight: 400; color: var(--ink-2); } .cnt { color: var(--bad); }
.card table { width: 100%; border-collapse: collapse; font-size: .85em; } .card td { padding: 5px 4px; border-bottom: 1px solid rgba(128,128,160,.25); } .card details summary { cursor: pointer; padding: 8px 0; }
.muted { color: var(--ink-2); font-weight: 400; font-size: .85em; } .tog { display: flex; gap: 10px; align-items: center; padding: 6px 0; } .tog input { width: 26px; height: 26px; } .row.wrap { justify-content: flex-start; }

@media (max-width: 520px) { .board { gap: 6px; } .col { padding: 6px 2px; } .ctl { display: grid; grid-template-columns: 1fr 1fr; gap: 3px; } .ctl .cnt { grid-column: 1 / -1; order: -1; } .ctl .mini { width: 38px; height: 38px; } .tray { gap: 8px; } .hero { flex-direction: column; text-align: center; } .bubble::before { display: none; } .kpis b { font-size: 1.4em; } .stack { min-height: 70px; } .pc2 { width: 42px; height: 42px; } .pc3 { width: 46px; height: 46px; } .fac { height: 52px; font-size: 1.15em; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; } }
