/* مغامرات أبطال الحروف — هوية بصرية واحدة مبهجة (سماء، حلوى، أزرار كبيرة). */
/* التخطيط: شاشة واحدة في كل مرة، عمود مركزي حتى 980px، أزرار لمس لا تقل عن 56px. */
:root {
  --sky1: #5B8CFF; --sky2: #9FD3FF; --sun: #FFC93C; --berry: #FF5D8F; --mint: #2EC4B6; --grape: #7B61FF;
  --ink: #23264A; --ink2: #5A5F8C; --card: #FFFFFF; --soft: #F3F6FF; --line: #DDE3FF;
  --ok: #2DC653; --warn: #FF9F1C; --bad: #FF6B6B;
  --ui: "Baloo Bhaijaan 2", "Segoe UI", Tahoma, system-ui, sans-serif;
  --letter: "Noto Naskh Arabic", "Baloo Bhaijaan 2", serif;
  --r: 22px; --shadow: 0 6px 0 rgba(35, 38, 74, .14), 0 12px 24px rgba(35, 38, 74, .12);
  color-scheme: light;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; min-height: 100%; }
body { font-family: var(--ui); color: var(--ink); background: linear-gradient(180deg, var(--sky1), var(--sky2) 60%, #D9F2FF); background-attachment: fixed; overflow-x: hidden; user-select: none; -webkit-user-select: none; font-size: 18px; }
input, select { user-select: text; -webkit-user-select: text; }
button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; touch-action: manipulation; }
button:focus-visible, input:focus-visible, select:focus-visible { outline: 4px solid var(--sun); outline-offset: 3px; }
h1, h2, h3 { margin: 0; text-wrap: balance; line-height: 1.25; }
.num, .counter, .goal { font-variant-numeric: tabular-nums; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* سماء متحركة */
.sky { position: fixed; inset: 0; z-index: -1; pointer-events: none; overflow: hidden; }
.cloud { position: absolute; width: 160px; height: 52px; background: #fff; border-radius: 60px; opacity: .85; animation: drift 60s linear infinite; }
.cloud::before, .cloud::after { content: ""; position: absolute; background: #fff; border-radius: 50%; }
.cloud::before { width: 70px; height: 70px; top: -34px; right: 26px; } .cloud::after { width: 50px; height: 50px; top: -22px; right: 82px; }
.c1 { top: 12%; animation-duration: 70s; } .c2 { top: 38%; animation-duration: 95s; animation-delay: -40s; transform: scale(.7); } .c3 { top: 70%; animation-duration: 80s; animation-delay: -20s; }
@keyframes drift { from { right: -200px; } to { right: 110%; } }

#app { max-width: 980px; margin: 0 auto; padding: 12px 16px 16px; min-height: calc(100vh - 60px); }
.credit { display: block; width: fit-content; max-width: calc(100% - 32px); margin: 4px auto 20px; text-align: center; color: var(--ink); background: rgba(255,255,255,.92); border-radius: 18px; font-size: 19px; font-weight: 800; padding: 6px 18px; box-shadow: var(--shadow); }
.profile-chip { display: flex; align-items: center; gap: 8px; background: var(--card); border-radius: 99px; padding: 3px 4px 3px 14px; box-shadow: var(--shadow); max-width: 52vw; }
.profile-chip .avatar.sm { width: 44px; height: 44px; box-shadow: none; padding: 1px; background: var(--soft); flex: none; }
.profile-chip .ptext { display: grid; line-height: 1.15; text-align: right; min-width: 0; }
.profile-chip .pname { font-weight: 800; font-size: 18px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.profile-chip .plevel { font-size: 12px; color: var(--ink2); white-space: nowrap; }
.screen { transition: opacity .25s, transform .25s; }
.screen.enter { opacity: 0; transform: translateY(14px) scale(.99); }
.loading { color: #fff; text-align: center; padding: 30vh 0; font-size: 24px; }
.fx-layer { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 90; }

/* الشريط العلوي */
.hud { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.hud-title { font-size: 22px; color: #fff; text-shadow: 0 2px 0 rgba(0,0,0,.15); flex: 1; min-width: 120px; }
.counters { display: flex; gap: 8px; margin-inline-start: auto; }
.counter { background: var(--card); border-radius: 99px; padding: 4px 14px; font-weight: 800; box-shadow: var(--shadow); font-size: 18px; }
.toggles { display: flex; gap: 6px; }
.round-btn { width: 48px; height: 48px; border-radius: 50%; background: var(--card); display: grid; place-items: center; font-size: 22px; box-shadow: var(--shadow); color: var(--grape); transition: transform .1s; }
.round-btn:active { transform: translateY(3px); box-shadow: none; }
.round-btn.off { color: #B8BCD9; position: relative; }
.round-btn.off::after { content: ""; position: absolute; width: 60%; height: 3px; background: var(--bad); transform: rotate(-45deg); border-radius: 2px; }
.round-btn.back { width: 56px; height: 56px; font-size: 26px; background: var(--sun); color: var(--ink); }
.avatar { width: 64px; height: 64px; } .avatar svg { width: 100%; height: 100%; display: block; }
.avatar.sm { width: 54px; height: 54px; background: #fff; border-radius: 50%; padding: 3px; box-shadow: var(--shadow); }
.avatar.lg { width: 110px; height: 110px; } .avatar.xl { width: min(240px, 52vw); height: min(240px, 52vw); }
.bob { animation: bob 2.4s ease-in-out infinite; } @keyframes bob { 50% { transform: translateY(-10px); } }
.jump { animation: jump 1s ease-in-out infinite; } @keyframes jump { 0%,100% { transform: translateY(0) scale(1); } 40% { transform: translateY(-18px) scale(1.05, .95); } }

/* أزرار */
.btn { background: var(--card); border-radius: 18px; padding: 10px 20px; font-weight: 800; font-size: 19px; box-shadow: 0 5px 0 rgba(35,38,74,.18); transition: transform .08s, box-shadow .08s; min-height: 52px; }
.btn:active { transform: translateY(4px); box-shadow: 0 1px 0 rgba(35,38,74,.18); }
.btn.primary { background: var(--berry); color: #fff; box-shadow: 0 5px 0 #C9386A; }
.btn.ghost { background: var(--soft); }
.btn.danger { background: var(--bad); color: #fff; box-shadow: 0 5px 0 #C94747; }
.btn.mega { font-size: 28px; padding: 18px 28px; border-radius: 28px; width: 100%; min-height: 80px; }
.btn.daily { background: var(--sun); box-shadow: 0 6px 0 #D9A21C; } .btn.daily.done { background: #E8F8EC; color: #1F8B3A; box-shadow: 0 6px 0 #B9E5C4; }

/* الرئيسية */
.home-hero { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 10px; margin: 4px 0 18px; }
.logo { display: grid; color: #fff; text-shadow: 0 4px 0 rgba(35,38,74,.25); }
.logo .l1 { font-size: 30px; font-weight: 700; } .logo .l2 { font-size: clamp(40px, 8vw, 66px); font-weight: 800; line-height: 1; color: var(--sun); -webkit-text-stroke: 2px #B7701B; paint-order: stroke fill; }
.logo small { font-size: 20px; margin-top: 6px; }
.logo.big { text-align: center; margin: 10px 0 16px; }
.hero-stage { display: grid; justify-items: center; }
.bubble { background: #fff; border-radius: 22px; padding: 10px 16px; font-weight: 700; position: relative; box-shadow: var(--shadow); max-width: 240px; text-align: center; }
.bubble::after { content: ""; position: absolute; bottom: -12px; left: 50%; border: 12px solid transparent; border-top-color: #fff; border-bottom: 0; transform: translateX(-50%); }
.home-actions { display: grid; gap: 14px; max-width: 560px; margin: 0 auto; }
.home-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.tile-btn { display: grid; justify-items: center; gap: 4px; padding: 16px; font-size: 22px; border-radius: 24px; }
.tile-btn .ti { font-size: 40px; }
.switch-child { text-align: center; color: #fff; margin-top: 16px; display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; align-items: center; }
.chip-btn { background: rgba(255,255,255,.9); border-radius: 99px; padding: 4px 14px; font-weight: 700; }
.parent-link { display: flex; gap: 6px; align-items: center; margin: 26px auto 0; color: #fff; opacity: .85; font-size: 15px; padding: 8px 12px; }
.voice-note { text-align: center; color: #fff; font-size: 14px; opacity: .9; }

/* الإعداد الأول */
.ob-card { background: var(--card); border-radius: 30px; padding: 22px; max-width: 560px; margin: 0 auto; display: grid; gap: 12px; box-shadow: var(--shadow); }
.ob-card h2 { font-size: 24px; text-align: center; }
.char-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.char-pick { background: var(--soft); border-radius: 22px; padding: 8px; display: grid; justify-items: center; font-weight: 700; border: 4px solid transparent; }
.char-pick .avatar.lg { width: 100%; max-width: 92px; height: auto; aspect-ratio: 1; }
.char-pick.on { border-color: var(--berry); background: #FFE9F0; }
.age-row { display: grid; grid-template-columns: repeat(5, 64px); gap: 10px; justify-content: center; }
.age { width: 64px; height: 64px; border-radius: 50%; background: var(--soft); font-size: 30px; font-weight: 800; }
.age.on { background: var(--grape); color: #fff; transform: scale(1.08); }
.ob-card input, .gate-in, .parent input, .parent select { font: inherit; font-size: 20px; padding: 10px 14px; border-radius: 14px; border: 3px solid var(--line); width: 100%; background: #fff; color: var(--ink); }
.lbl { font-weight: 700; color: var(--ink2); }
.fine { font-size: 14px; color: var(--ink2); margin: 0; }

/* الخريطة */
.suggest { display: flex; align-items: center; gap: 12px; background: var(--card); border-radius: 24px; padding: 12px 14px; box-shadow: var(--shadow); margin-bottom: 12px; }
.sg-icon { font-size: 44px; } .sg-text { display: grid; flex: 1; } .sg-text span { color: var(--ink2); font-size: 16px; }
.daily-strip { width: 100%; background: var(--sun); border-radius: 20px; padding: 12px; font-weight: 800; font-size: 20px; margin-bottom: 14px; box-shadow: 0 5px 0 #D9A21C; }
.worlds { display: grid; gap: 16px; }
.world { background: var(--card); border-radius: 30px; padding: 14px; box-shadow: var(--shadow); border-top: 10px solid var(--wc); animation: pop .4s backwards; }
@keyframes pop { from { opacity: 0; transform: scale(.94); } }
.world-head { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; } .world-head h2 { font-size: 26px; color: var(--wc); filter: brightness(.8); } .scene { font-size: 40px; }
.world-games { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; }
.game-tile { background: var(--soft); border-radius: 22px; padding: 14px; display: grid; justify-items: center; gap: 4px; font-size: 21px; transition: transform .1s; border: 3px solid transparent; }
.game-tile:hover { border-color: var(--wc); } .game-tile:active { transform: scale(.97); }
.game-tile .gi { font-size: 52px; } .gp { font-size: 15px; color: var(--ink2); }
.bar { width: 100%; height: 10px; background: #fff; border-radius: 9px; overflow: hidden; } .bar i { display: block; height: 100%; background: var(--sun); border-radius: 9px; }

/* المراحل */
.stage-intro { display: flex; gap: 12px; align-items: center; background: rgba(255,255,255,.92); border-radius: 22px; padding: 10px 14px; margin-bottom: 14px; }
.stage-intro .gi { font-size: 46px; } .stage-intro p { margin: 0; font-size: 19px; }
.stage-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(86px, 1fr)); gap: 12px; }
.stage { aspect-ratio: 1; border-radius: 24px; background: var(--card); box-shadow: var(--shadow); display: grid; place-items: center; align-content: center; gap: 2px; font-size: 30px; }
.stage .st { font-size: 16px; color: var(--sun); letter-spacing: 1px; -webkit-text-stroke: .5px #B7701B; }
.stage.done { background: #FFF6D8; } .stage.locked { background: rgba(255,255,255,.55); color: #9AA0C8; box-shadow: none; } .stage.locked span[html] { font-size: 26px; }

/* اللعب العام */
.game-root { position: relative; }
.play .hud-title { font-size: 19px; }
.intro-ov { position: absolute; inset: 0; z-index: 20; display: grid; place-items: center; background: rgba(35,38,74,.35); border-radius: 26px; backdrop-filter: blur(2px); min-height: 360px; transition: opacity .25s; }
.intro-ov.out { opacity: 0; }
.intro-card { background: var(--card); border-radius: 30px; padding: 18px 20px; display: grid; justify-items: center; gap: 10px; max-width: 420px; margin: 12px; box-shadow: var(--shadow); text-align: center; }
.intro-text { font-size: 22px; font-weight: 700; margin: 0; }
.big-play { width: 96px; height: 96px; border-radius: 50%; background: var(--ok); color: #fff; font-size: 44px; box-shadow: 0 7px 0 #1E9B3C; animation: pulse 1.4s infinite; }
@keyframes pulse { 50% { transform: scale(1.08); } }
.speaker { width: 56px; height: 56px; border-radius: 50%; background: var(--grape); color: #fff; font-size: 28px; display: grid; place-items: center; box-shadow: 0 5px 0 #5640D6; flex: none; }
.float-text { position: absolute; top: 30%; left: 50%; transform: translateX(-50%); font-size: 34px; font-weight: 800; z-index: 30; pointer-events: none; animation: floatUp 1.2s ease-out forwards; text-shadow: 0 3px 0 #fff, 0 -2px 0 #fff, 2px 0 0 #fff, -2px 0 0 #fff; white-space: nowrap; }
.float-text.good { color: var(--ok); } .float-text.soft { color: var(--grape); font-size: 26px; }
@keyframes floatUp { from { opacity: 0; transform: translate(-50%, 20px) scale(.8); } 20% { opacity: 1; transform: translate(-50%, 0) scale(1.1); } to { opacity: 0; transform: translate(-50%, -60px); } }
.shake { animation: shake .45s; } @keyframes shake { 20%,60% { transform: translateX(-8px); } 40%,80% { transform: translateX(8px); } }
.hint { animation: glow 1s infinite; } @keyframes glow { 50% { box-shadow: 0 0 0 8px rgba(255,201,60,.8), 0 0 24px 10px rgba(255,201,60,.6); } }
.pic { font-size: 64px; line-height: 1; } .pop-in { animation: pop .4s; }
.goal { background: var(--sun); border-radius: 99px; padding: 2px 14px; font-weight: 800; }

/* سباق الكلمات */
.race-wrap { display: grid; gap: 12px; }
.race-q { background: var(--card); border-radius: 26px; padding: 12px; display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 14px; box-shadow: var(--shadow); min-height: 104px; }
.word-slots { display: flex; gap: 8px; direction: rtl; }
.slot { width: 62px; height: 72px; border-radius: 16px; background: var(--soft); display: grid; place-items: center; font-family: var(--letter); font-size: 44px; font-weight: 700; border: 3px solid var(--line); }
.slot.blank { border: 3px dashed var(--berry); color: var(--berry); background: #FFF0F5; animation: pulse 1.2s infinite; }
.slot.filled { background: #E5F9EA; border-color: var(--ok); color: var(--ink); animation: pop .3s; }
.voc { width: 100%; text-align: center; font-family: var(--letter); font-size: 40px; color: var(--grape); animation: pop .4s; }
.track-box { position: relative; border-radius: 26px; overflow: hidden; box-shadow: var(--shadow); }
.race-canvas { display: block; width: 100%; height: clamp(190px, 34vh, 300px); }
.race-prog { position: absolute; top: 10px; right: 12px; left: 12px; height: 10px; background: rgba(255,255,255,.6); border-radius: 9px; overflow: hidden; } .race-prog i { display: block; height: 100%; width: 0; background: var(--berry); border-radius: 9px; }
.theme-tag { position: absolute; bottom: 8px; left: 12px; background: rgba(255,255,255,.85); border-radius: 99px; padding: 0 10px; font-size: 14px; }
.choices { display: flex; justify-content: center; gap: 16px; min-height: 104px; align-items: center; }
.choice { width: 100px; height: 100px; border-radius: 28px; background: var(--card); font-family: var(--letter); font-size: 58px; font-weight: 700; box-shadow: 0 7px 0 rgba(35,38,74,.2); transition: transform .08s; }
.choice:active { transform: translateY(5px); box-shadow: 0 2px 0 rgba(35,38,74,.2); }
.choice.right { background: var(--ok); color: #fff; } .choice:disabled:not(.right) { opacity: .45; }
.go-finish { font-size: 28px; font-weight: 800; color: #fff; text-shadow: 0 3px 0 rgba(0,0,0,.2); }

/* صاروخ الحركات */
.rk-wrap { display: grid; gap: 10px; }
.rk-head { display: flex; align-items: center; gap: 12px; background: var(--card); border-radius: 24px; padding: 8px 14px; box-shadow: var(--shadow); flex-wrap: wrap; font-size: 22px; font-weight: 800; justify-content: center; }
.rk-sample { font-family: var(--letter); font-size: 54px; color: var(--grape); line-height: 1.2; min-width: 70px; text-align: center; }
.rk-canvas { display: block; width: 100%; height: clamp(360px, 62vh, 620px); border-radius: 26px; touch-action: none; box-shadow: var(--shadow); cursor: grab; }
.rk-demo { display: flex; gap: 14px; }
.demo-card { border-radius: 20px; padding: 6px 16px; display: grid; justify-items: center; font-weight: 700; }
.demo-card b { font-family: var(--letter); font-size: 54px; line-height: 1.3; }
.demo-card.yes { background: #E5F9EA; color: #1F8B3A; } .demo-card.no { background: #FFECEC; color: #C94747; }

/* مصنع الكلمات */
.fx-wrap { display: grid; gap: 14px; justify-items: center; }
.machine { position: relative; width: min(340px, 90%); background: linear-gradient(#FFB347, #FF8C42); border-radius: 30px 30px 18px 18px; padding: 18px; box-shadow: var(--shadow); display: grid; justify-items: center; transition: transform .3s; }
.machine.party { animation: party .6s 2; } @keyframes party { 25% { transform: rotate(-3deg) scale(1.04); } 75% { transform: rotate(3deg) scale(1.04); } }
.chimney { position: absolute; top: -34px; right: 30px; width: 34px; height: 40px; background: #9C6644; border-radius: 6px 6px 0 0; }
.chimney i { position: absolute; width: 20px; height: 20px; background: #fff; border-radius: 50%; left: 7px; top: -14px; opacity: 0; animation: smoke 2.4s infinite; } .chimney i:nth-child(2) { animation-delay: .8s; } .chimney i:nth-child(3) { animation-delay: 1.6s; }
.machine.party .chimney i { background: var(--sun); animation-duration: .8s; }
@keyframes smoke { 0% { opacity: .9; transform: translate(0, 0) scale(.6); } 100% { opacity: 0; transform: translate(-10px, -50px) scale(1.6); } }
.fx-screen { background: #1D3557; border: 8px solid #6C757D; border-radius: 20px; width: 100%; display: flex; align-items: center; justify-content: center; gap: 14px; padding: 10px; min-height: 120px; }
.fx-screen .pic { font-size: 84px; }
.fx-round { margin-top: 8px; background: rgba(255,255,255,.8); border-radius: 99px; padding: 0 12px; font-weight: 800; }
.fx-slots { display: flex; gap: 10px; direction: rtl; min-height: 84px; align-items: center; }
.fx-slots .slot { width: 70px; height: 80px; font-size: 50px; }
.fx-slots .slot.next { border: 4px dashed var(--grape); background: #F1EEFF; animation: pulse 1.2s infinite; }
.built-word { font-family: var(--letter); font-size: 64px; font-weight: 700; color: #fff; text-shadow: 0 4px 0 var(--grape); animation: pop .4s; }
.belt { width: 100%; overflow: hidden; background: repeating-linear-gradient(90deg, #495057 0 30px, #343A40 30px 60px); border-radius: 22px; padding: 16px 8px; box-shadow: inset 0 6px 0 rgba(0,0,0,.25), var(--shadow); animation: beltMove 1.2s linear infinite; }
@keyframes beltMove { to { background-position: 60px 0; } }
.belt.paused, .belt.paused .belt-track { animation-play-state: paused; }
.belt-track { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; animation: slide 10s ease-in-out infinite alternate; }
@keyframes slide { from { transform: translateX(-6%); } to { transform: translateX(6%); } }
.tile { width: 72px; height: 72px; border-radius: 18px; background: #FFF8E1; font-family: var(--letter); font-size: 46px; font-weight: 700; box-shadow: 0 6px 0 #D9A21C; display: grid; place-items: center; touch-action: none; }
.tile.used { visibility: hidden; } .tile.ghost { opacity: .3; }
.tile.dragging, .tile.flying { position: fixed; z-index: 95; pointer-events: none; transform: scale(1.1); box-shadow: 0 12px 24px rgba(0,0,0,.25); }
.tile.flying { transition: transform .36s cubic-bezier(.3,1.3,.6,1); transform: none; }

/* ذاكرة الحروف */
.mem-wrap { display: grid; gap: 10px; }
.mem-head { display: flex; justify-content: center; gap: 8px; align-items: center; color: #fff; font-weight: 800; font-size: 20px; }
.mem-grid { display: grid; gap: 12px; max-width: 620px; margin: 0 auto; width: 100%; }
.mcard { aspect-ratio: 3/4; perspective: 800px; }
.mcard .inner { position: relative; width: 100%; height: 100%; transition: transform .45s; transform-style: preserve-3d; }
.mcard.on .inner, .mcard.done .inner { transform: rotateY(180deg); }
.face { position: absolute; inset: 0; border-radius: 20px; backface-visibility: hidden; -webkit-backface-visibility: hidden; display: grid; place-items: center; box-shadow: var(--shadow); }
.face.back { background: linear-gradient(135deg, var(--grape), var(--berry)); color: rgba(255,255,255,.9); font-size: 46px; font-weight: 800; }
.face.front { background: #fff; transform: rotateY(180deg); }
.face.letter { font-family: var(--letter); font-size: clamp(50px, 11vw, 76px); font-weight: 700; color: var(--grape); }
.face.pic { align-content: center; gap: 0; } .face.pic .emo { font-size: clamp(40px, 9vw, 60px); } .face.pic small { font-family: var(--letter); font-size: 18px; }
.mcard.done .face.front { background: #E5F9EA; }
.focus-letter { display: flex; align-items: center; gap: 14px; background: var(--soft); border-radius: 20px; padding: 6px 18px; } .focus-letter b { font-family: var(--letter); font-size: 64px; color: var(--berry); } .focus-letter span { font-family: var(--letter); font-size: 24px; }

/* النتيجة والنوافذ */
.modal-back { position: fixed; inset: 0; background: rgba(35,38,74,.45); display: grid; place-items: center; z-index: 80; padding: 16px; animation: fadeIn .2s; }
@keyframes fadeIn { from { opacity: 0; } }
.modal { background: var(--card); border-radius: 30px; padding: 20px; max-width: 460px; width: 100%; box-shadow: var(--shadow); animation: pop .3s; max-height: 92vh; overflow: auto; }
.result { display: grid; justify-items: center; gap: 8px; text-align: center; }
.result h2 { font-size: 28px; }
.res-stars { display: flex; gap: 6px; direction: ltr; }
.rs { font-size: 62px; color: #E3E6F5; line-height: 1; }
.rs.on { color: var(--sun); -webkit-text-stroke: 2px #D9A21C; animation: starIn .5s backwards; }
@keyframes starIn { from { transform: scale(0) rotate(-90deg); } 70% { transform: scale(1.3); } }
.res-lines { list-style: none; padding: 0; margin: 0; display: grid; gap: 2px; font-size: 17px; color: #9AA0C8; } .res-lines .ok { color: var(--ok); font-weight: 700; }
.res-coins { font-size: 26px; font-weight: 800; } .res-coins small { font-size: 14px; color: var(--ink2); }
.res-badge { background: #FFF6D8; border-radius: 16px; padding: 6px 14px; font-weight: 800; animation: pop .5s; }
.res-actions { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; margin-top: 6px; }
.confirm p { font-size: 20px; } .row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; justify-content: space-between; }
.report-pre { white-space: pre-wrap; font-family: var(--ui); font-size: 16px; }

/* مجموعتي */
.col-body { display: grid; gap: 12px; }
.showcase { background: var(--card); border-radius: 30px; padding: 16px; display: flex; gap: 16px; align-items: center; box-shadow: var(--shadow); flex-wrap: wrap; justify-content: center; }
.showcase h2 { font-size: 30px; } .showcase p { margin: 2px 0; }
.outfits { display: flex; gap: 10px; }
.outfit { width: 58px; height: 58px; border-radius: 50%; border: 4px solid #fff; box-shadow: var(--shadow); font-size: 14px; font-weight: 800; color: #fff; text-shadow: 0 1px 2px rgba(0,0,0,.4); }
.outfit.on { outline: 4px solid var(--ink); }
.sec { color: #fff; font-size: 24px; text-shadow: 0 2px 0 rgba(0,0,0,.15); }
.shop-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.shop-item { background: var(--card); border-radius: 24px; padding: 10px; display: grid; justify-items: center; gap: 4px; box-shadow: var(--shadow); border: 4px solid transparent; }
.shop-item.on { border-color: var(--ok); } .shop-item.lockedish .avatar, .shop-item.lockedish .car-ico { filter: grayscale(.7) opacity(.7); }
.shop-item .price { background: var(--soft); border-radius: 99px; padding: 0 12px; font-weight: 800; }
.car-ico { width: 110px; } .car-ico svg { width: 100%; display: block; }

/* الإنجازات */
.ach-sum { text-align: center; color: #fff; font-size: 24px; font-weight: 800; margin: 0 0 12px; }
.badge-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; }
.badge { background: rgba(255,255,255,.6); border-radius: 24px; padding: 14px; display: grid; justify-items: center; text-align: center; gap: 4px; color: var(--ink2); }
.badge.on { background: var(--card); color: var(--ink); box-shadow: var(--shadow); } .badge .bi { font-size: 48px; } .badge small { font-size: 14px; }

/* بوابة ولوحة ولي الأمر — هادئة ومعلوماتية */
.gate-card { background: var(--card); border-radius: 24px; padding: 22px; max-width: 440px; margin: 10vh auto 0; display: grid; gap: 12px; box-shadow: var(--shadow); }
.gate-msg { color: var(--bad); margin: 0; min-height: 1.4em; }
.parent { background: #F6F7FB; border-radius: 26px; padding: 16px; font-size: 16px; user-select: text; -webkit-user-select: text; }
.p-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; gap: 10px; flex-wrap: wrap; } .p-head h1 { font-size: 26px; }
.p-card { background: #fff; border-radius: 18px; padding: 14px; border: 1px solid var(--line); display: grid; gap: 8px; align-content: start; }
.p-card h2 { font-size: 21px; } .p-card h3 { font-size: 18px; }
.p-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 12px; margin: 12px 0; } .p-card.wide { grid-column: 1 / -1; }
.kids { display: flex; gap: 8px; flex-wrap: wrap; } .kid { background: var(--soft); border-radius: 12px; padding: 6px 12px; font-weight: 700; } .kid.on { background: var(--grape); color: #fff; }
.add-kid { display: grid; grid-template-columns: 1fr auto auto; gap: 8px; align-items: end; } .add-kid label:first-child { grid-column: 1 / -1; font-weight: 700; }
.parent select { width: auto; font-size: 16px; padding: 6px 10px; } .parent .add-kid input { font-size: 16px; padding: 8px 10px; }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 8px; }
.kpi { background: var(--soft); border-radius: 14px; padding: 8px 12px; display: grid; } .kpi small { color: var(--ink2); } .kpi b { font-size: 22px; font-variant-numeric: tabular-nums; }
.legend { display: flex; gap: 8px; flex-wrap: wrap; font-size: 13px; }
.lg::before { content: ""; display: inline-block; width: 12px; height: 12px; border-radius: 4px; margin-inline-end: 4px; vertical-align: -1px; }
.lg.mastered::before, .lm.mastered { background: #CFF5D9; } .lg.learning::before, .lm.learning { background: #FFF1C9; } .lg.weak::before, .lm.weak { background: #FFD6D6; } .lg.new::before, .lm.new { background: #EEF0F8; }
.letters-map { display: grid; grid-template-columns: repeat(7, 1fr); gap: 5px; }
.lm { font-family: var(--letter); font-size: 24px; text-align: center; border-radius: 10px; padding: 2px 0; }
.lm.weak { outline: 2px solid var(--bad); }
.note { background: #FFF6D8; border-radius: 12px; padding: 8px 10px; margin: 0; font-size: 15px; }
.hbar { display: grid; grid-template-columns: 130px 1fr 40px; gap: 8px; align-items: center; font-size: 15px; }
.hbar b { font-family: var(--letter); font-size: 20px; }
.track { height: 12px; background: #EEF0F8; border-radius: 9px; overflow: hidden; } .track i { display: block; height: 100%; border-radius: 9px; background: var(--warn); }
.track i.mastered { background: var(--ok); } .track i.weak { background: var(--bad); }
.words { display: flex; flex-wrap: wrap; gap: 6px; } .wd { background: var(--soft); border-radius: 10px; padding: 2px 10px; font-family: var(--letter); font-size: 18px; }
.gline { display: flex; justify-content: space-between; border-bottom: 1px solid var(--line); padding: 4px 0; }
.week { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; align-items: end; min-height: 130px; text-align: center; }
.day { display: grid; justify-items: center; gap: 2px; } .day .col { width: 70%; background: linear-gradient(var(--grape), #A895FF); border-radius: 8px 8px 3px 3px; } .day small { font-size: 12px; color: var(--ink2); }
.tog { display: flex; gap: 8px; align-items: center; } .tog input { width: 22px; height: 22px; accent-color: var(--grape); }
.empty { color: var(--ink2); }

@media (max-width: 560px) {
  body { font-size: 17px; }
  .home-hero { grid-template-columns: 1fr; justify-items: center; text-align: center; }
  .hero-stage { order: -1; }
  .round-btn { width: 42px; height: 42px; font-size: 19px; }
  .counter { padding: 3px 10px; font-size: 16px; }
  .slot { width: 52px; height: 62px; font-size: 36px; }
  .fx-slots .slot { width: 56px; height: 66px; font-size: 40px; }
  .choice { width: 86px; height: 86px; font-size: 50px; }
  .tile { width: 62px; height: 62px; font-size: 40px; }
  .hbar { grid-template-columns: 110px 1fr 36px; }
  .age { width: 52px; height: 52px; font-size: 24px; }
  .age-row { grid-template-columns: repeat(5, 52px); gap: 8px; }
  .profile-chip .plevel { display: none; }
  .profile-chip { padding-left: 10px; }
  .ob-card { padding: 16px; }
  .char-pick { padding: 6px 2px; font-size: 15px; }
  #app { padding: 10px 12px 28px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

/* ===== المرحلة الثانية ===== */
.speaker.big { width: 76px; height: 76px; font-size: 38px; animation: pulse 1.6s infinite; }

/* وحش الحركات */
.mo-wrap { display: grid; gap: 12px; justify-items: center; }
.mo-hp { display: flex; gap: 6px; background: rgba(255,255,255,.85); border-radius: 99px; padding: 6px 12px; }
.mo-hp i { width: 26px; height: 14px; border-radius: 8px; background: var(--berry); transition: background .3s, transform .3s; }
.mo-hp i.gone { background: #E3E6F5; transform: scale(.7); }
.mo-stage { min-height: clamp(250px, 38vh, 330px); display: grid; place-items: center; }
.mo-scale { position: relative; transition: transform .5s cubic-bezier(.3,1.5,.6,1); display: flex; flex-direction: column; align-items: center; width: clamp(190px, 46vw, 260px); }
.mo-body { width: 100%; animation: bob 2.2s ease-in-out infinite; }
.mo-body svg { width: 100%; display: block; }
.mo-body.ouch { animation: shake .45s; } .mo-body.laugh { animation: jump .6s; }
.mo-body.poof { animation: poof .6s forwards; } @keyframes poof { to { transform: scale(0) rotate(40deg); opacity: 0; } }
.mo-letter { position: relative; margin-top: -34px; background: #fff; border-radius: 20px; padding: 0 18px; font-family: var(--letter); font-size: 58px; font-weight: 700; box-shadow: var(--shadow); min-width: 80px; text-align: center; }
.mo-letter:empty { display: none; }
.mo-listen { display: flex; align-items: center; gap: 12px; color: #fff; font-size: 22px; font-weight: 800; text-shadow: 0 2px 0 rgba(0,0,0,.2); }
.mo-opts { display: flex; gap: 14px; flex-wrap: wrap; justify-content: center; }
.mo-opt { width: 112px; height: 124px; border-radius: 26px; background: var(--card); box-shadow: 0 7px 0 rgba(35,38,74,.2); display: grid; place-items: center; align-content: center; }
.mo-opt b { font-family: var(--letter); font-size: 60px; line-height: 1.35; }
.mo-opt small { font-size: 15px; color: var(--ink2); }
.mo-opt.right { background: var(--ok); color: #fff; } .mo-opt.right small { color: #fff; } .mo-opt:disabled:not(.right) { opacity: .45; }
.mo-treasure { font-size: 90px; animation: bob 1.4s infinite; }

/* تنين الحروف */
.dr-wrap { display: grid; gap: 12px; }
.dr-progress { display: flex; gap: 6px; justify-content: center; } .dr-progress i { width: 34px; height: 12px; border-radius: 8px; background: rgba(255,255,255,.6); } .dr-progress i.on { background: var(--ok); }
.dr-scene { position: relative; display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 8px; background: linear-gradient(#A7E3A0, #6FC36A); border-radius: 30px; padding: 16px; box-shadow: var(--shadow); min-height: 220px; overflow: hidden; }
.dr-thought { justify-self: center; position: relative; background: #fff; border-radius: 50% 50% 46% 54%; padding: 18px 26px; display: flex; gap: 10px; align-items: center; box-shadow: var(--shadow); }
.dr-thought::after { content: ""; position: absolute; left: -22px; bottom: 6px; width: 22px; height: 22px; border-radius: 50%; background: #fff; box-shadow: -18px 14px 0 -6px #fff; }
.dr-thought .pic { font-size: 74px; }
.dr-body { position: relative; width: clamp(150px, 36vw, 220px); }
.dr-dragon svg { width: 100%; display: block; } .dr-dragon { transform-origin: bottom center; }
.dr-dragon.chomp { animation: chomp .5s 2; } @keyframes chomp { 50% { transform: scale(1.1, .9); } }
.dr-dragon.no { animation: shake .45s; } .dr-dragon.happy { animation: jump .8s infinite; }
.dr-mouth { position: absolute; top: 48%; left: 50%; width: 10px; height: 10px; }
.dr-belly { position: absolute; bottom: 18%; left: 50%; transform: translateX(-50%); font-size: 36px; }
.dr-plates { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; }
.plate { touch-action: none; min-width: 130px; padding: 10px 16px; border-radius: 50% / 40%; background: radial-gradient(#fff 55%, #E9ECF5 56%); box-shadow: 0 7px 0 rgba(35,38,74,.18); display: grid; justify-items: center; gap: 0; transition: transform .15s; }
.plate .food { font-size: 30px; } .plate b { font-family: var(--letter); font-size: 34px; line-height: 1.4; }
.plate.lifting { transition: none; z-index: 40; position: relative; box-shadow: 0 16px 24px rgba(0,0,0,.2); }

/* نحلة الكلمات */
.bee-wrap { display: grid; gap: 10px; }
.bee-top { display: flex; align-items: center; justify-content: center; gap: 14px; flex-wrap: wrap; background: var(--card); border-radius: 26px; padding: 10px; box-shadow: var(--shadow); }
.bee-pic { display: flex; gap: 10px; align-items: center; } .bee-pic .pic.dance { animation: jump .7s 3; }
.built-word.dark { color: var(--grape); text-shadow: none; font-size: 52px; }
.garden { position: relative; height: clamp(330px, 52vh, 480px); border-radius: 30px; overflow: hidden; box-shadow: var(--shadow); background: radial-gradient(circle at 20% 15%, #FFF8C5 0 40px, transparent 42px), linear-gradient(#BDE7FF 0 22%, #9BE08F 22%, #6FC36A); }
.flower { position: absolute; width: 84px; height: 84px; display: grid; place-items: center; animation: pop .4s backwards; }
.flower .petals { position: absolute; inset: 0; border-radius: 50%; background: radial-gradient(circle at 50% 12%, var(--pc) 0 18px, transparent 19px), radial-gradient(circle at 88% 50%, var(--pc) 0 18px, transparent 19px), radial-gradient(circle at 50% 88%, var(--pc) 0 18px, transparent 19px), radial-gradient(circle at 12% 50%, var(--pc) 0 18px, transparent 19px), radial-gradient(circle at 22% 22%, var(--pc) 0 15px, transparent 16px), radial-gradient(circle at 78% 22%, var(--pc) 0 15px, transparent 16px), radial-gradient(circle at 78% 78%, var(--pc) 0 15px, transparent 16px), radial-gradient(circle at 22% 78%, var(--pc) 0 15px, transparent 16px); animation: sway 3s ease-in-out infinite; }
@keyframes sway { 50% { transform: rotate(8deg); } }
.flower b { position: relative; width: 50px; height: 50px; border-radius: 50%; background: #FFF3B0; display: grid; place-items: center; font-family: var(--letter); font-size: 34px; font-weight: 700; box-shadow: inset 0 -4px 0 #F2C94C; }
.flower.picked { opacity: .35; transform: scale(.85); transition: .3s; }
.bee-sprite { position: absolute; width: 70px; height: 70px; transition: left .5s cubic-bezier(.4,1.3,.6,1), top .5s cubic-bezier(.4,1.3,.6,1); pointer-events: none; z-index: 5; animation: hover .4s ease-in-out infinite alternate; }
.bee-sprite svg { width: 100%; height: 100%; } .bee-sprite.face-left svg { transform: scaleX(-1); }
.bee-sprite.buzz { animation: shake .45s; } @keyframes hover { to { margin-top: -6px; } }

/* حرب الفضائيين */
.al-target { font-family: var(--letter); font-size: 54px; color: var(--berry); line-height: 1.2; min-width: 60px; text-align: center; }
.al-canvas { cursor: crosshair; }

@media (max-width: 560px) {
  .mo-opt { width: 92px; height: 108px; } .mo-opt b { font-size: 50px; }
  .flower { width: 72px; height: 72px; } .flower b { width: 42px; height: 42px; font-size: 28px; }
  .plate { min-width: 110px; } .plate b { font-size: 28px; }
  .dr-scene { grid-template-columns: 1fr; justify-items: center; }
}

/* ===== المرحلة الثالثة ===== */
/* أسئلة مشتركة */
.qz { display: grid; gap: 10px; justify-items: center; }
.qz-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; justify-content: center; }
.qz-q { margin: 0; font-size: 22px; font-weight: 800; text-align: center; }
.qz-big { font-family: var(--letter); font-size: 54px; line-height: 1.2; min-width: 64px; text-align: center; }
.qz-pic { font-size: 64px; line-height: 1; }
.qz-opts { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; }
.qz-opt { min-width: 86px; height: 86px; padding: 0 14px; border-radius: 24px; background: var(--soft); font-family: var(--letter); font-size: 46px; font-weight: 700; box-shadow: 0 6px 0 rgba(35,38,74,.18); }
.qz-opts.words .qz-opt { font-size: 32px; min-width: 110px; }
.qz-opt.right { background: var(--ok); color: #fff; } .qz-opt:disabled:not(.right) { opacity: .45; }
.qz-hint { margin: 0; min-height: 1.4em; color: var(--grape); font-weight: 700; text-align: center; }
.tr-panel { background: var(--card); border-radius: 26px; padding: 14px; box-shadow: var(--shadow); min-height: 120px; display: grid; place-items: center; }
.tr-tip { margin: 0; font-size: 22px; font-weight: 800; }

/* كنز الحروف */
.tr-wrap { display: grid; gap: 12px; }
.tr-bag { display: flex; gap: 6px; align-items: center; background: rgba(255,255,255,.9); border-radius: 99px; padding: 4px 14px; font-size: 28px; min-height: 50px; justify-self: center; }
.loot { font-size: 26px; }
.island { position: relative; height: clamp(280px, 42vh, 400px); border-radius: 30px; overflow: hidden; box-shadow: var(--shadow);
  background: radial-gradient(ellipse 62% 58% at 50% 54%, #F7DFA0 0 70%, #EBC77A 71% 74%, transparent 75%), radial-gradient(circle at 50% 50%, #4CC9F0, #1F8FCF); }
.palm { position: absolute; font-size: 46px; } .palm.p1 { left: 8%; top: 40%; } .palm.p2 { right: 10%; top: 12%; }
.ship { position: absolute; font-size: 38px; right: 4%; bottom: 6%; animation: bob 2.6s infinite; }
.chest { position: absolute; width: 72px; height: 60px; animation: pop .4s backwards; }
.chest .box { position: absolute; bottom: 0; left: 0; right: 0; height: 38px; background: #A0522D; border-radius: 6px 6px 10px 10px; border: 3px solid #6B3A1E; }
.chest .lid { position: absolute; top: 4px; left: 0; right: 0; height: 24px; background: #C0703A; border-radius: 20px 20px 4px 4px; border: 3px solid #6B3A1E; transform-origin: bottom left; transition: transform .4s; }
.chest .lock { position: absolute; left: 50%; top: 20px; transform: translateX(-50%); font-size: 20px; }
.chest.active { outline: 4px dashed var(--sun); outline-offset: 6px; border-radius: 12px; animation: pulse 1s infinite; }
.chest.opened .lid { transform: rotate(-60deg) translateY(-6px); } .chest.opened .lock { display: none; }
.chest .gem { position: absolute; left: 50%; top: -10px; transform: translateX(-50%); font-size: 30px; animation: gemUp .7s ease-out forwards; }
@keyframes gemUp { from { transform: translate(-50%, 20px) scale(.3); } to { transform: translate(-50%, -18px) scale(1.1); } }

/* المحقق الصغير */
.dt-wrap { display: grid; gap: 12px; justify-items: center; }
.dt-tools { display: flex; gap: 8px; background: rgba(255,255,255,.9); border-radius: 99px; padding: 6px 14px; }
.tool { font-size: 28px; filter: grayscale(1) opacity(.35); transition: .3s; } .tool.got { filter: none; transform: scale(1.15); }
.dt-board { background: #FFF8E7; border: 4px dashed #C9A66B; border-radius: 26px; padding: 14px; display: grid; gap: 10px; justify-items: center; width: min(560px, 100%); box-shadow: var(--shadow); }
.dt-clue { display: flex; gap: 12px; align-items: center; }
.dt-tile { cursor: zoom-in; } .dt-tile.caught { border-color: var(--berry); background: #FFE5EC; transform: scale(1.1); }
.dt-step { margin: 0; color: #fff; font-size: 21px; font-weight: 800; text-shadow: 0 2px 0 rgba(0,0,0,.2); text-align: center; }

/* بناء المملكة */
.kg-wrap { display: grid; gap: 12px; }
.kg-title { text-align: center; color: #fff; font-size: 28px; text-shadow: 0 3px 0 rgba(0,0,0,.2); }
.kg-town { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; background: linear-gradient(#9BE08F, #6FC36A); border-radius: 26px; padding: 12px; box-shadow: var(--shadow); }
.plot { aspect-ratio: 1; border-radius: 18px; display: grid; place-items: center; align-content: center; position: relative; background: rgba(255,255,255,.35); }
.plot .bi { font-size: clamp(30px, 7vw, 52px); line-height: 1; } .plot small { font-size: 12px; font-weight: 700; }
.plot.built { background: rgba(255,255,255,.7); } .plot.empty { opacity: .55; }
.plot.site { background: #FFF6D8; outline: 3px dashed var(--warn); }
.plot.site.rising .bi { animation: rise .8s cubic-bezier(.3,1.6,.6,1); } @keyframes rise { from { transform: translateY(30px) scale(.2); } }
.plot .folk { position: absolute; top: 2px; left: 4px; font-size: 16px; animation: bob 2s infinite; }
.kg-res { background: var(--card); border-radius: 22px; padding: 10px 14px; display: grid; gap: 6px; box-shadow: var(--shadow); }
.kg-r { display: grid; grid-template-columns: 110px 1fr 60px; gap: 8px; align-items: center; font-weight: 700; }

/* مغامرة الحروف */
.adv-wrap { display: grid; gap: 10px; }
.adv-canvas { display: block; width: 100%; height: clamp(300px, 52vh, 500px); touch-action: manipulation; }
.coin-g { background: #FFF3C4; }
.jump-btn { justify-self: center; width: min(320px, 80%); height: 74px; border-radius: 40px; background: var(--ok); color: #fff; font-size: 30px; font-weight: 800; box-shadow: 0 7px 0 #1E9B3C; }
.jump-btn:active { transform: translateY(5px); box-shadow: 0 2px 0 #1E9B3C; }
.door-panel { position: absolute; inset: 10px; background: rgba(255,255,255,.97); border-radius: 22px; display: grid; place-items: center; padding: 10px; z-index: 5; overflow: auto; }
.door-panel.hidden { display: none; }

@media (max-width: 560px) {
  .kg-town { grid-template-columns: repeat(5, 1fr); gap: 5px; padding: 8px; } .plot small { display: none; }
  .kg-r { grid-template-columns: 86px 1fr 52px; font-size: 15px; }
  .qz-opt { min-width: 74px; height: 74px; font-size: 38px; } .qz-opts.words .qz-opt { font-size: 26px; min-width: 96px; }
  .chest { transform: scale(.85); }
}

/* ===== عالم القراءة ===== */
.tn-wrap, .rd-wrap { display: grid; gap: 12px; }
.tn-clue { display: flex; gap: 12px; align-items: center; justify-content: center; background: var(--card); border-radius: 26px; padding: 10px; box-shadow: var(--shadow); }
.tn-clue .pic { font-size: 70px; }
.rail { position: relative; overflow: hidden; padding: 16px 8px 22px; border-radius: 22px; background: linear-gradient(transparent 82%, #8B5A2B 82% 86%, transparent 86%), repeating-linear-gradient(90deg, transparent 0 22px, #6D4C41 22px 30px) bottom / 100% 14px no-repeat, rgba(255,255,255,.35); }
.train { display: flex; gap: 6px; align-items: flex-end; justify-content: flex-start; flex-wrap: nowrap; overflow-x: auto; transition: transform 1.2s ease-in; padding-bottom: 6px; }
.train.go { transform: translateX(-120%); }
.engine { font-size: 64px; line-height: 1; position: relative; flex: none; transform: scaleX(-1); }
.engine .smoke { position: absolute; top: -10px; left: 14px; width: 16px; height: 16px; border-radius: 50%; background: #fff; animation: smoke 1.8s infinite; }
.car { position: relative; flex: none; min-width: 86px; height: 70px; padding: 0 10px; border-radius: 12px 12px 6px 6px; background: #FFD166; border: 3px solid #E09F3E; display: grid; place-items: center; }
.car:nth-child(odd) { background: #8ECAE6; border-color: #219EBC; } .car:nth-child(3n) { background: #FFAFCC; border-color: #F15BB5; }
.car .wheel { position: absolute; bottom: -12px; width: 20px; height: 20px; border-radius: 50%; background: #2B2D42; border: 3px solid #ADB5BD; } .car .w1 { right: 10px; } .car .w2 { left: 10px; }
.car-word { font-family: var(--letter); font-size: 28px; font-weight: 700; }
.car.next { outline: 4px dashed var(--grape); outline-offset: 3px; animation: pulse 1.2s infinite; } .car.filled { animation: pop .3s; }
.tn-cards { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; min-height: 70px; }
.wcard { padding: 8px 18px; border-radius: 18px; background: var(--card); font-family: var(--letter); font-size: 30px; font-weight: 700; box-shadow: 0 6px 0 rgba(35,38,74,.18); }
.wcard.used { visibility: hidden; }
.built-sentence { font-family: var(--letter); font-size: clamp(30px, 6vw, 44px); font-weight: 700; color: #fff; text-shadow: 0 3px 0 var(--grape); text-align: center; animation: pop .4s; }
.book { background: linear-gradient(90deg, #F1E3C8, #FFF9EC 6%, #FFF9EC 94%, #F1E3C8); border-radius: 20px; border: 6px solid #8B5A2B; padding: 18px; box-shadow: var(--shadow); perspective: 900px; }
.book-page { display: grid; justify-items: center; gap: 10px; }
.book-page.flip { animation: pageFlip .55s ease-out; } @keyframes pageFlip { from { transform: rotateY(-70deg); opacity: 0; } }
.rd-sentence { margin: 0; display: flex; flex-wrap: wrap; gap: 6px 10px; justify-content: center; line-height: 1.9; border-radius: 12px; transition: box-shadow .3s; }
.rd-sentence.glow { box-shadow: 0 0 0 6px rgba(255,201,60,.6); }
.rd-word { font-family: var(--letter); font-size: clamp(32px, 7vw, 48px); font-weight: 700; padding: 0 4px; border-radius: 10px; color: var(--ink); }
.rd-word:hover, .rd-word.heard { background: #FFF3C4; }
.rd-q { background: var(--card); border-radius: 26px; padding: 14px; box-shadow: var(--shadow); display: grid; gap: 10px; justify-items: center; }
.qz-opts.pics .qz-opt { font-size: 52px; min-width: 96px; }

/* ===== الرياضيات ===== */
.eq { display: flex; direction: rtl; align-items: center; justify-content: center; gap: 10px; flex-wrap: wrap; font-family: var(--ui); }
.eq-n { min-width: 64px; padding: 2px 12px; border-radius: 16px; background: var(--soft); font-size: clamp(36px, 8vw, 54px); font-weight: 800; text-align: center; font-variant-numeric: tabular-nums; }
.eq-op { font-size: clamp(30px, 7vw, 46px); font-weight: 800; color: var(--grape); }
.eq-q { border: 3px dashed var(--berry); color: var(--berry); background: #FFF0F5; animation: pulse 1.2s infinite; }
.eq-q.solved, .eq-n.solved { border: 3px solid var(--ok); color: #1F8B3A; background: #E5F9EA; animation: pop .3s; }
.num-opts { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; min-height: 90px; }
.num-opt { min-width: 92px; height: 92px; padding: 0 14px; border-radius: 26px; background: var(--card); font-size: 40px; font-weight: 800; box-shadow: 0 7px 0 rgba(35,38,74,.2); font-variant-numeric: tabular-nums; }
.num-opt.right { background: var(--ok); color: #fff; } .num-opt:disabled:not(.right) { opacity: .45; }
.dots-aid { display: flex; gap: 10px; justify-content: center; align-items: center; background: rgba(255,255,255,.9); border-radius: 18px; padding: 6px 14px; font-size: 22px; letter-spacing: 3px; flex-wrap: wrap; }
.dots-aid.grid { flex-direction: column; gap: 0; line-height: 1.1; }
.dg.a { color: var(--grape); } .dg.b { color: var(--berry); } .dg.x { color: #B8BCD9; }
.aid-box:empty { display: none; } .aid-box { display: grid; justify-items: center; }

/* بالونات العد */
.cnt-wrap { display: grid; gap: 12px; justify-items: center; }
.cnt-box { background: var(--card); border-radius: 26px; padding: 14px; box-shadow: var(--shadow); display: grid; gap: 8px; justify-items: center; min-width: min(420px, 100%); transition: box-shadow .3s; }
.cnt-box.glow { box-shadow: 0 0 0 6px rgba(255,201,60,.7); }
.tenframe { display: grid; grid-template-columns: repeat(5, 1fr); gap: 4px; } .obj { font-size: clamp(28px, 7vw, 40px); }
.big-num { font-size: 84px; font-weight: 800; color: var(--grape); }
.balloon-mode .num-opt { position: relative; border-radius: 50% 50% 46% 46%; width: 96px; height: 112px; background: var(--bc, var(--berry)); color: #fff; text-shadow: 0 2px 0 rgba(0,0,0,.2); box-shadow: inset -10px -10px 0 rgba(0,0,0,.1); animation: floaty 2.4s ease-in-out infinite; }
.balloon-mode .num-opt::after { content: ""; position: absolute; bottom: -22px; left: 50%; width: 2px; height: 22px; background: #8D99AE; }
.balloon-mode .num-opt:nth-child(2) { animation-delay: -.6s; } .balloon-mode .num-opt:nth-child(3) { animation-delay: -1.2s; } .balloon-mode .num-opt:nth-child(4) { animation-delay: -1.8s; }
.balloon-mode .num-opt.right { animation: popB .35s forwards; } @keyframes popB { to { transform: scale(1.6); opacity: 0; } }
@keyframes floaty { 50% { transform: translateY(-12px); } }

/* جسر العمليات */
.br-wrap { display: grid; gap: 12px; }
.river { position: relative; height: 150px; border-radius: 26px; overflow: hidden; box-shadow: var(--shadow); display: flex; align-items: center; background: repeating-linear-gradient(-20deg, #4CC9F0 0 18px, #48BFE3 18px 36px); animation: water 3s linear infinite; }
@keyframes water { to { background-position: 80px 0; } }
.bank { width: 18%; height: 100%; background: linear-gradient(#7BC96F, #5DAE52); display: grid; place-items: center; position: relative; z-index: 2; }
.planks { flex: 1; display: flex; gap: 4px; padding: 0 4px; align-items: center; height: 100%; }
.plank { flex: 1; height: 26px; border-radius: 6px; background: rgba(255,255,255,.25); border: 2px dashed rgba(255,255,255,.6); transition: .3s; }
.plank.on { background: #A0522D; border: 2px solid #6B3A1E; animation: pop .3s; }
.walker { width: 64px; height: 64px; position: absolute; top: 40px; right: 6%; z-index: 3; transition: right .6s ease; right: calc(6% + var(--step, 0) * 70%); }
.walker.arrived { animation: jump .6s 3; }
.chest-goal { font-size: 42px; animation: bob 2s infinite; }
.splash { position: absolute; left: 50%; top: 50%; font-size: 40px; animation: floatUp .9s forwards; z-index: 4; }
.eq-box { display: flex; gap: 12px; align-items: center; justify-content: center; flex-wrap: wrap; background: var(--card); border-radius: 26px; padding: 12px; box-shadow: var(--shadow); }

/* تمساح المقارنة */
.cmp-wrap { display: grid; gap: 14px; justify-items: center; }
.cmp-row { display: flex; align-items: center; gap: 12px; justify-content: center; width: 100%; }
.cmp-card { flex: 1; max-width: 220px; min-height: 140px; border-radius: 26px; background: var(--card); box-shadow: 0 7px 0 rgba(35,38,74,.2); display: grid; place-items: center; align-content: center; padding: 10px; }
.cmp-card b { font-size: clamp(34px, 8vw, 56px); font-weight: 800; } .cmp-card .dots { color: var(--grape); font-size: 16px; letter-spacing: 2px; word-break: break-all; }
.cmp-card.right { background: #E5F9EA; outline: 4px solid var(--ok); }
.croc { font-size: 72px; transition: transform .3s; } .croc.chomp { animation: chomp .4s 2; }
.croc.face-right { transform: scaleX(-1); } .croc.face-left { transform: none; }
.eq-btn { font-size: 24px; } .eq-btn.right { background: var(--ok); color: #fff; }
.cmp-sentence { margin: 0; min-height: 1.5em; font-size: 26px; font-weight: 800; color: #fff; text-shadow: 0 2px 0 rgba(0,0,0,.2); text-align: center; }

/* مكعبات المنازل */
.pv-wrap { display: grid; gap: 12px; justify-items: center; }
.pv-target { display: flex; gap: 12px; align-items: center; background: var(--card); border-radius: 22px; padding: 8px 16px; box-shadow: var(--shadow); font-size: 22px; font-weight: 800; }
.pv-target b { font-size: 50px; color: var(--grape); font-variant-numeric: tabular-nums; }
.pv-cols { display: flex; direction: ltr; gap: 10px; justify-content: center; width: 100%; }
.pv-col { flex: 1; max-width: 230px; background: var(--card); border-radius: 22px; padding: 10px; display: grid; gap: 6px; justify-items: center; box-shadow: var(--shadow); direction: rtl; transition: .2s; }
.pv-col.bad { outline: 4px solid var(--bad); }
.pv-items { min-height: 120px; display: flex; flex-wrap: wrap; gap: 3px; justify-content: center; align-content: flex-end; width: 100%; }
.pv-flat { width: 40px; height: 40px; background: repeating-linear-gradient(0deg, #FF9F1C 0 3.6px, #E08600 3.6px 4px), repeating-linear-gradient(90deg, transparent 0 3.6px, #E08600 3.6px 4px); background-blend-mode: multiply; border-radius: 3px; }
.pv-rod { width: 8px; height: 60px; background: repeating-linear-gradient(0deg, #3A86FF 0 5.4px, #1D5BBF 5.4px 6px); border-radius: 2px; }
.pv-cube { width: 14px; height: 14px; background: var(--ok); border-radius: 3px; }
.pv-n { font-size: 34px; font-weight: 800; } .pv-btns { display: flex; gap: 10px; } .pv-btns .round-btn { font-size: 30px; font-weight: 800; color: var(--ink); }

/* مسائل الأبطال */
.story-card { background: var(--card); border-radius: 26px; padding: 16px; box-shadow: var(--shadow); display: grid; gap: 8px; justify-items: center; max-width: 620px; }
.story-pic { font-size: 44px; letter-spacing: 6px; }
.story-text { margin: 0; font-size: clamp(22px, 5vw, 28px); font-weight: 700; line-height: 1.7; text-align: center; }

/* لوحة جدول الضرب */
.tb-wrap { display: grid; gap: 10px; justify-items: center; }
.tb-head { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; justify-content: center; background: var(--card); border-radius: 22px; padding: 8px 16px; box-shadow: var(--shadow); font-size: 21px; font-weight: 800; }
.tb-head b { font-size: 40px; color: var(--grape); }
.hundred { display: grid; grid-template-columns: repeat(10, 1fr); gap: 3px; width: min(560px, 100%); direction: ltr; background: var(--card); padding: 6px; border-radius: 18px; box-shadow: var(--shadow); }
.hc { aspect-ratio: 1; border-radius: 8px; background: var(--soft); font-size: clamp(11px, 3vw, 17px); font-weight: 800; font-variant-numeric: tabular-nums; }
.hc.on { background: var(--grape); color: #fff; animation: pop .3s; }
.tb-facts:empty { display: none; }

/* القسمة العادلة */
.sh-wrap { display: grid; gap: 12px; justify-items: center; }
.sh-pile { background: var(--card); border-radius: 22px; padding: 8px 14px; box-shadow: var(--shadow); display: flex; gap: 10px; align-items: center; max-width: 100%; }
.sh-pile b { font-size: 32px; } .sh-items { font-size: 24px; letter-spacing: 2px; word-break: break-all; }
.sh-plates { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.sh-plate { width: 110px; min-height: 140px; border-radius: 24px; background: var(--card); box-shadow: 0 6px 0 rgba(35,38,74,.18); display: grid; justify-items: center; align-content: start; padding: 8px; gap: 2px; }
.sh-plate .fr { font-size: 40px; } .sh-plate .got { font-size: 18px; min-height: 48px; word-break: break-all; } .sh-plate .n { font-size: 24px; font-weight: 800; }
.sh-q { font-size: 22px; font-weight: 800; color: #fff; text-shadow: 0 2px 0 rgba(0,0,0,.2); text-align: center; display: grid; gap: 6px; justify-items: center; }
.sh-q .eq { color: var(--ink); text-shadow: none; } .rem { background: #FFF3C4; color: var(--ink); text-shadow: none; border-radius: 12px; padding: 2px 12px; }

/* الساعة والكسور */
.clock-face, .pizza { width: min(260px, 70vw); filter: drop-shadow(0 8px 14px rgba(35,38,74,.2)); }
.clock-face svg, .pizza svg { width: 100%; display: block; }
.clock-opts .num-opt { font-size: 24px; min-width: 150px; height: 74px; }
.pizza .slice { fill: #FFE7A3; stroke: #C1440E; stroke-width: 2.5; cursor: pointer; transition: fill .2s; } .pizza .slice.on { fill: #FF6B6B; }
.frac { display: inline-grid; justify-items: center; line-height: 1; font-weight: 800; vertical-align: middle; }
.frac b { font-size: 1em; } .frac i { display: block; width: 1.2em; height: 3px; background: currentColor; margin: 3px 0; border-radius: 2px; }
.num-opt .frac { font-size: 30px; } .pz-q .frac { font-size: 30px; margin: 0 6px; }
.hidden-btn { display: none; }
.tables-map { grid-template-columns: repeat(9, 1fr); } .tables-map .lm { font-family: var(--ui); font-size: 18px; font-weight: 800; }

@media (max-width: 560px) {
  .num-opt { min-width: 78px; height: 78px; font-size: 32px; } .clock-opts .num-opt { min-width: 140px; font-size: 20px; }
  .sh-plate { width: 92px; } .pv-flat { width: 30px; height: 30px; } .pv-rod { height: 46px; }
  .river { height: 120px; } .walker { width: 52px; height: 52px; top: 30px; }
}

/* ===== مهارات لغتي ===== */
.lg-wrap { display: grid; gap: 12px; justify-items: center; }
.lg-title { display: flex; gap: 10px; align-items: center; background: var(--card); border-radius: 22px; padding: 6px 14px; box-shadow: var(--shadow); font-size: 22px; }
.lg-rule { margin: 0; max-width: 620px; background: #FFF6D8; border-radius: 16px; padding: 8px 14px; font-size: 18px; font-weight: 700; text-align: center; }
.lg-rule:empty { display: none; }
.sort-card { background: var(--card); border-radius: 28px; padding: 14px 24px; box-shadow: var(--shadow); display: flex; gap: 12px; align-items: center; min-height: 110px; transition: transform .5s, opacity .5s; }
.sort-card.fly { transform: translateY(80px) scale(.5); opacity: 0; }
.sort-word { font-family: var(--letter); font-size: clamp(40px, 9vw, 60px); font-weight: 700; }
.bins { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; }
.bin { width: clamp(110px, 28vw, 160px); min-height: 130px; border-radius: 10px 10px 34px 34px; background: linear-gradient(#FFD8A8, #F4A261); border: 4px solid #C1440E; display: grid; justify-items: center; align-content: center; gap: 2px; box-shadow: 0 7px 0 rgba(35,38,74,.2); }
.bin-ic { font-size: 40px; font-family: var(--letter); font-weight: 700; } .bin b { font-size: 20px; } .bin-n { background: #fff; border-radius: 99px; padding: 0 10px; font-weight: 800; }
.pairs-board { position: relative; display: grid; grid-template-columns: 1fr 1fr; gap: clamp(40px, 14vw, 120px); width: min(620px, 100%); }
.pcol { display: grid; gap: 12px; position: relative; z-index: 2; }
.pword { padding: 12px; border-radius: 20px; background: var(--card); font-family: var(--letter); font-size: clamp(24px, 6vw, 32px); font-weight: 700; box-shadow: 0 6px 0 rgba(35,38,74,.18); border: 4px solid transparent; }
.pword.sel { border-color: var(--grape); transform: scale(1.05); } .pword.done { border-color: var(--pc); background: #fff; color: var(--pc); }
.pair-lines { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 1; overflow: visible; }
.word-opts .num-opt, .letter-opts .num-opt { font-family: var(--letter); font-size: clamp(24px, 6vw, 34px); font-weight: 700; min-width: 120px; }
.letter-opts .num-opt { font-size: 50px; min-width: 96px; }
.pl-machine { display: flex; align-items: center; gap: 10px; background: linear-gradient(#B8C0FF, #8E9AFF); border-radius: 26px; padding: 14px; box-shadow: var(--shadow); }
.pl-in, .pl-out { background: #fff; border-radius: 18px; padding: 8px 12px; display: grid; justify-items: center; min-width: 120px; }
.pl-in b, .pl-out b { font-family: var(--letter); font-size: 28px; } .pl-in .pic, .pl-out .pic { font-size: 34px; }
.pl-gear { font-size: 40px; } .pl-machine.run .pl-gear { animation: spin .7s linear; } @keyframes spin { to { transform: rotate(360deg); } }
.sp-word { display: flex; align-items: center; gap: 2px; background: var(--card); border-radius: 26px; padding: 12px 20px; box-shadow: var(--shadow); font-family: var(--letter); font-size: clamp(44px, 10vw, 64px); font-weight: 700; }
.sp-box { border: 4px dashed var(--berry); border-radius: 14px; padding: 0 10px; color: var(--berry); background: #FFF0F5; min-width: 60px; text-align: center; }
.sp-full { color: var(--grape); }
.flask { font-size: 44px; animation: bob 2s infinite; }
.gr-sentence { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: center; background: var(--card); border-radius: 26px; padding: 14px 18px; box-shadow: var(--shadow); font-family: var(--letter); font-size: clamp(28px, 6.5vw, 40px); font-weight: 700; max-width: 680px; }
.gap { border: 4px dashed var(--berry); border-radius: 14px; padding: 0 16px; color: var(--berry); background: #FFF0F5; min-width: 70px; text-align: center; }
.gap.filled { border-style: solid; border-color: var(--ok); color: #1F8B3A; background: #E5F9EA; }

/* ===== الهندسة والقياس والنقود والأنماط ===== */
.shape-stage { width: min(220px, 56vw); background: var(--card); border-radius: 26px; padding: 14px; box-shadow: var(--shadow); } .shape-stage svg { width: 100%; display: block; }
.solid-pic { font-size: 110px; text-align: center; line-height: 1.2; }
.ms-stage { background: var(--card); border-radius: 26px; padding: 16px; box-shadow: var(--shadow); width: min(560px, 100%); display: grid; place-items: center; }
.bars { width: 100%; display: grid; gap: 14px; direction: ltr; } .bar-row { display: flex; align-items: center; gap: 10px; } .bar-row span { font-weight: 800; font-size: 24px; width: 30px; } .bar-row i { height: 30px; border-radius: 15px; display: block; }
.ruler { width: 100%; max-width: 460px; }
.balance { position: relative; width: 300px; height: 170px; } .balance .post { position: absolute; left: 146px; top: 70px; width: 8px; height: 90px; background: #6D4C41; border-radius: 4px; }
.balance .beam { position: absolute; left: 30px; top: 66px; width: 240px; height: 8px; background: #8D6E63; border-radius: 4px; transition: transform .6s; }
.balance .pan { position: absolute; top: 14px; width: 80px; height: 56px; display: grid; place-items: center; font-size: 42px; border-bottom: 6px solid #8D6E63; border-radius: 0 0 40px 40px; transition: transform .6s; }
.balance .pan.r { right: 10px; } .balance .pan.l { left: 10px; }
.balance.tilt-r .beam { transform: rotate(-10deg); } .balance.tilt-r .pan.r { transform: translateY(22px); } .balance.tilt-r .pan.l { transform: translateY(-18px); }
.balance.tilt-l .beam { transform: rotate(10deg); } .balance.tilt-l .pan.l { transform: translateY(22px); } .balance.tilt-l .pan.r { transform: translateY(-18px); }
.shop-shelf { display: flex; gap: 14px; align-items: center; background: linear-gradient(#FFF1D6, #FFE0A8); border: 4px solid #C9A26B; border-radius: 24px; padding: 10px 18px; box-shadow: var(--shadow); }
.shop-shelf .pic { font-size: 64px; } .shop-shelf b { font-size: 24px; display: block; } .price { background: var(--berry); color: #fff; border-radius: 99px; padding: 2px 14px; font-weight: 800; font-size: 22px; }
.tray-box { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; justify-content: center; background: rgba(255,255,255,.9); border-radius: 20px; padding: 8px 14px; min-height: 64px; width: min(620px, 100%); font-weight: 800; }
.tray-total { font-size: 30px; color: var(--grape); } .tray { display: flex; gap: 4px; flex-wrap: wrap; }
.wallet { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }
.note { display: inline-grid; place-items: center; width: 84px; height: 46px; border-radius: 8px; background: var(--nc); border: 3px solid rgba(0,0,0,.18); color: #23264A; line-height: 1; box-shadow: inset 0 0 0 4px rgba(255,255,255,.35); }
.note b { font-size: 20px; } .note small { font-size: 11px; font-weight: 700; }
.tray .note { width: 56px; height: 32px; } .tray .note b { font-size: 14px; } .tray .note small { display: none; }
.note-btn { padding: 4px; border-radius: 12px; background: var(--card); box-shadow: 0 5px 0 rgba(35,38,74,.18); }
.row.center { justify-content: center; }
.pt-row { display: flex; gap: 6px; align-items: flex-end; flex-wrap: wrap; justify-content: center; }
.pt-engine { font-size: 54px; transform: scaleX(-1); }
.pt-car { min-width: 64px; min-height: 64px; padding: 4px 8px; border-radius: 12px; background: var(--card); border: 3px solid #219EBC; display: grid; place-items: center; font-size: 30px; font-weight: 800; letter-spacing: 1px; word-break: break-all; max-width: 110px; }
.pt-car.q { border-style: dashed; border-color: var(--berry); color: var(--berry); } .pt-car.solved { border-style: solid; border-color: var(--ok); }
@media (max-width: 560px) { .pt-row { flex-wrap: nowrap; overflow-x: auto; max-width: 100%; padding-bottom: 6px; } .pt-car { min-width: 46px; min-height: 52px; font-size: 22px; } .pt-engine { font-size: 40px; } }

/* ===== العلوم ===== */
.sort-pic { font-size: 64px; line-height: 1; } .sort-word.small { font-size: clamp(28px, 7vw, 40px); }
.cyc-track { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; justify-content: center; background: var(--card); border-radius: 26px; padding: 12px; box-shadow: var(--shadow); transition: box-shadow .4s; }
.cyc-track.cycle-done { box-shadow: 0 0 0 6px rgba(45,198,83,.5); }
.cyc-slot { width: clamp(72px, 19vw, 104px); height: clamp(84px, 22vw, 112px); border-radius: 18px; border: 3px dashed var(--line); display: grid; place-items: center; align-content: center; background: var(--soft); text-align: center; }
.cyc-slot .pic { font-size: 40px; } .cyc-slot small { font-size: 13px; font-weight: 700; line-height: 1.2; }
.cyc-slot.next { border-color: var(--grape); animation: pulse 1.2s infinite; } .cyc-slot.filled { border-style: solid; border-color: var(--ok); background: #E5F9EA; }
.cyc-n { font-size: 26px; font-weight: 800; color: #B8BCD9; } .cyc-arrow { color: var(--grape); font-size: 20px; }
.cyc-cards { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }
.cyc-card { width: 120px; padding: 10px 6px; border-radius: 20px; background: var(--card); box-shadow: 0 6px 0 rgba(35,38,74,.18); display: grid; justify-items: center; gap: 4px; }
.cyc-card .pic { font-size: 44px; } .cyc-card b { font-size: 16px; } .cyc-card.used { visibility: hidden; }
.solid-pic.small { font-size: 64px; }
.sci-opts .num-opt { font-family: var(--ui); font-size: clamp(18px, 4.6vw, 24px); min-width: 140px; height: auto; min-height: 76px; padding: 8px 16px; }

/* ===== اختبار تحديد المستوى ===== */
.placement { display: grid; gap: 14px; justify-items: center; padding-top: 6px; }
.pl-card { background: var(--card); border-radius: 30px; padding: 20px; max-width: 560px; width: 100%; display: grid; gap: 12px; justify-items: center; text-align: center; box-shadow: var(--shadow); }
.pl-card h1 { font-size: 30px; color: var(--grape); } .pl-card p { margin: 0; font-size: 19px; line-height: 1.7; }
.pl-subjects { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; } .pl-subjects span { background: var(--soft); border-radius: 99px; padding: 4px 14px; font-weight: 800; }
.pl-head { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; justify-content: center; background: var(--card); border-radius: 22px; padding: 8px 16px; box-shadow: var(--shadow); font-size: 20px; }
.pl-head small { color: var(--ink2); } .pl-dots { display: flex; gap: 5px; } .pl-dots i { width: 16px; height: 16px; border-radius: 50%; background: var(--line); } .pl-dots i.on { background: var(--grape); }
.pl-q { background: var(--card); border-radius: 26px; padding: 14px 18px; box-shadow: var(--shadow); display: grid; gap: 8px; justify-items: center; max-width: 620px; width: 100%; transition: opacity .25s, transform .25s; }
.pl-q.out { opacity: 0; transform: translateX(-30px); }
.pq-big { font-size: 60px; } .pq-pic { font-size: 74px; line-height: 1.1; } .pq-pic.small { font-size: 40px; letter-spacing: 4px; }
.pq-sentence { font-family: var(--letter); font-size: clamp(28px, 7vw, 40px); font-weight: 700; }
.pq-clock { width: 180px; } .pq-clock svg { width: 100%; }
.dont-know { font-size: 18px; }
.pl-results { display: grid; gap: 10px; width: 100%; }
.pl-res { display: grid; grid-template-columns: 120px 1fr auto; gap: 10px; align-items: center; text-align: right; }
.pl-band { background: #FFF6D8; border-radius: 99px; padding: 2px 12px; font-weight: 800; white-space: nowrap; }
.home-row { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 560px) { .pl-res { grid-template-columns: 1fr auto; } .pl-res .track { grid-column: 1 / -1; grid-row: 2; } .home-row .tile-btn { font-size: 17px; padding: 12px 6px; } }

/* ===== المراحل المئة ===== */
.stage-block { background: rgba(255,255,255,.35); border-radius: 26px; padding: 10px; margin-bottom: 12px; }
.stage-block.certified { background: rgba(255,214,112,.45); }
.block-head { display: flex; justify-content: space-between; align-items: center; color: #fff; text-shadow: 0 2px 0 rgba(0,0,0,.18); margin: 0 6px 8px; flex-wrap: wrap; gap: 6px; }
.block-head b { font-size: 20px; } .block-cert { font-size: 14px; background: rgba(255,255,255,.9); color: var(--ink); text-shadow: none; border-radius: 99px; padding: 2px 10px; font-weight: 700; }
.stage-block .stage-grid { grid-template-columns: repeat(5, 1fr); gap: 8px; }
.stage { font-size: 24px; } .stage.current { outline: 4px solid var(--berry); animation: pulse 1.4s infinite; }
.stage.passed { background: #E5F9EA; }
.world-trophy { margin-inline-start: auto; font-size: 34px; animation: bob 2s infinite; }
.outfit.gold { box-shadow: 0 0 0 3px #fff, 0 0 14px 4px rgba(227,181,5,.7); }

/* ===== الشهادات ===== */
.cert-modal { display: grid; gap: 12px; } .modal:has(.cert-modal) { max-width: 760px; }
.cert { background: #FFFDF5; border-radius: 14px; padding: 10px; color: #3B2F1E; font-family: var(--ui); }
.cert-frame { position: relative; border: 3px solid #C9A227; outline: 6px double #C9A227; outline-offset: 4px; border-radius: 8px; padding: 26px 22px 16px; display: grid; gap: 10px; text-align: center; background: radial-gradient(circle at 50% 0%, #FFF6D8, transparent 60%); }
.cert.world .cert-frame { background: radial-gradient(circle at 50% 0%, #FFE7A3, #FFFBEA 70%); border-color: #B8860B; }
.cert-corner { position: absolute; width: 34px; height: 34px; border: 4px solid #C9A227; }
.cert-corner.tl { top: 6px; left: 6px; border-right: 0; border-bottom: 0; } .cert-corner.tr { top: 6px; right: 6px; border-left: 0; border-bottom: 0; }
.cert-corner.bl { bottom: 6px; left: 6px; border-right: 0; border-top: 0; } .cert-corner.br { bottom: 6px; right: 6px; border-left: 0; border-top: 0; }
.cert-top { display: flex; justify-content: space-between; align-items: center; } .cert-logo { font-weight: 800; color: #8C6A12; } .cert-ribbon { font-size: 40px; }
.cert-head { font-size: clamp(30px, 6vw, 44px); color: #8C6A12; font-weight: 800; letter-spacing: .5px; }
.cert-body { margin: 0 auto; max-width: 560px; font-size: clamp(17px, 3.6vw, 21px); line-height: 1.9; font-weight: 600; }
.cert-trophy { font-size: 24px; font-weight: 800; color: #8C6A12; }
.cert-foot { display: grid; grid-template-columns: 1fr auto 1fr; align-items: end; gap: 10px; margin-top: 6px; }
.cert-sig { display: grid; gap: 2px; } .cert-sig small { color: #8C7A5A; } .cert-sig .line { display: block; border-bottom: 2px solid #8C7A5A; height: 22px; margin: 0 12px; }
.cert-seal { width: 84px; height: 84px; border-radius: 50%; background: radial-gradient(#FFE27A, var(--gold)); border: 4px dashed #8C6A12; display: grid; place-items: center; align-content: center; color: #6B4F0A; box-shadow: 0 4px 10px rgba(0,0,0,.15); }
.cert-seal span { font-size: 30px; line-height: 1; } .cert-seal small { font-size: 10px; font-weight: 800; }
.cert-credit { margin: 4px 0 0; font-size: 15px; font-weight: 800; color: #5A4A2A; }
.cert-btn { cursor: pointer; border: 2px solid #E3B505; }
.cert-gallery { display: grid; gap: 10px; margin-bottom: 12px; }
.trophy-row, .cert-list { display: flex; flex-wrap: wrap; gap: 10px; }
.trophy { background: linear-gradient(#FFF6D8, #FFE7A3); border-radius: 20px; padding: 10px 14px; display: grid; justify-items: center; min-width: 110px; box-shadow: var(--shadow); }
.trophy span { font-size: 40px; } .trophy small { font-weight: 800; text-align: center; }
.cert-mini { background: #FFFDF5; border: 3px solid #E3B505; border-radius: 16px; padding: 8px 12px; display: grid; justify-items: center; min-width: 130px; box-shadow: var(--shadow); }
.cert-mini .ci { font-size: 30px; } .cert-mini small { color: var(--ink2); } .cert-mini.world { background: #FFF3C4; }
.empty.light { color: #fff; text-shadow: 0 1px 0 rgba(0,0,0,.2); margin: 0; }
#print-area { display: none; }
@media print {
  body.printing > *:not(#print-area) { display: none !important; }
  body.printing #print-area { display: block !important; }
  body.printing { background: #fff !important; }
  @page { size: A4 landscape; margin: 10mm; }
  #print-area .cert { box-shadow: none; } #print-area .cert-body { font-size: 20px; }
}

/* ===== لوحة الإدارة ===== */
.admin .adm-tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 12px; }
.adm-tab { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 8px 12px; font-weight: 700; font-size: 15px; }
.adm-tab.on { background: var(--grape); color: #fff; border-color: var(--grape); }
.adm-msg { margin: 0; font-weight: 700; } .adm-msg.ok { color: #1F8B3A; } .adm-msg.err { color: #C94747; } .adm-msg:empty { display: none; }
.adm-list { display: grid; gap: 6px; max-height: 520px; overflow: auto; padding-inline-end: 4px; }
.adm-item { display: flex; gap: 8px; align-items: center; background: var(--soft); border-radius: 12px; padding: 6px 10px; flex-wrap: wrap; }
.adm-item b { font-family: var(--letter); font-size: 18px; flex: 1; min-width: 120px; } .adm-item .tag { background: #fff; border-radius: 99px; padding: 0 8px; color: var(--ink2); }
.adm-item.has { background: #E5F9EA; } .adm-list.audio .adm-item b { font-size: 16px; }
.adm-pic { font-size: 26px; width: 40px; text-align: center; } .adm-pic .pic-img, .adm-prev .pic-img { width: 36px; height: 36px; object-fit: contain; }
.adm-prev { font-size: 48px; min-height: 10px; } .adm-prev .pic-img { width: 80px; height: 80px; }
.btn.sm { padding: 4px 10px; min-height: 34px; font-size: 14px; box-shadow: none; border: 1px solid var(--line); }
.adm-world { display: grid; gap: 6px; } .adm-world h3 { margin-top: 8px; }
.adm-game { display: grid; grid-template-columns: 1fr auto auto; gap: 10px; align-items: center; background: var(--soft); border-radius: 12px; padding: 6px 10px; }
.adm-table-wrap { overflow-x: auto; } .adm-table { width: 100%; border-collapse: collapse; font-size: 15px; }
.adm-table th, .adm-table td { border-bottom: 1px solid var(--line); padding: 6px 8px; text-align: right; white-space: nowrap; } .adm-table th { color: var(--ink2); font-weight: 700; }
.adm-log { display: grid; gap: 4px; max-height: 220px; overflow: auto; font-size: 15px; }
.weak-chip { background: #FFE5E5 !important; font-family: var(--ui) !important; }
.parent input[type=file] { font-size: 14px; border: 1px dashed var(--line); }
.pic-img { width: 1.1em; height: 1.1em; object-fit: contain; vertical-align: middle; border-radius: 12px; }
.pic .pic-img, .qz-pic .pic-img, .pq-pic .pic-img { width: 1em; height: 1em; }
@media (max-width: 560px) { .adm-game { grid-template-columns: 1fr auto; } .adm-game small { display: none; } }
.parent input.sr { position: absolute; width: 1px; height: 1px; padding: 0; border: 0; overflow: hidden; clip: rect(0 0 0 0); }
.admin { overflow-x: hidden; } .adm-item small.fine { word-break: break-all; }
.parent-gear { width: 44px; height: 44px; font-size: 20px; color: var(--ink2); background: rgba(255,255,255,.92); }
@media (max-width: 560px) { .parent-gear { width: 38px; height: 38px; font-size: 17px; } }
.kpis.owner { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); } .kpi.big b { font-size: 30px; color: var(--grape); }
.week.month { grid-template-columns: repeat(30, 1fr); gap: 2px; min-height: 140px; } .week.month .col { width: 80%; } .week.month small { font-size: 9px; }
.edit-dlg { display: grid; gap: 6px; } .edit-dlg input, .edit-dlg select { font: inherit; font-size: 17px; padding: 8px 10px; border-radius: 12px; border: 2px solid var(--line); }
.steps { line-height: 1.9; } .wide-note { grid-column: 1 / -1; }
.rec-btn.rec { background: #E5484D; color: #fff; animation: pulse 1s infinite; }
.adm-list.audio .adm-item b { flex: 1; font-size: 20px; }
.sr-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
/* ---------- الحركات الملونة ---------- */
:root { --hk-f: #E03131; --hk-d: #2B8A3E; --hk-k: #1971C2; --hk-s: #F08C00; --hk-sh: #9C36B5; --hk-t: #D6336C; --hk-m: #0C8599; }
.vw { position: relative; display: inline-block; font-size: 1.15em; line-height: 1.9; }
.vw .vt { color: transparent; }
.vw .hl { position: absolute; inset: 0; font-style: normal; pointer-events: none; white-space: pre; }
.vw .hl::before { content: attr(data-l); }
.vw .hl-base { color: inherit; }
.hl-f { color: var(--hk-f); } .hl-d { color: var(--hk-d); } .hl-k { color: var(--hk-k); } .hl-s { color: var(--hk-s); }
.hl-sh { color: var(--hk-sh); } .hl-t { color: var(--hk-t); } .hl-m { color: var(--hk-m); }
.hk-legend { display: flex; flex-wrap: wrap; gap: 6px 12px; font-size: 15px; }
.hk-legend b { font-size: 22px; }
.voice-box { display: grid; gap: 6px; padding: 8px 0; } .voice-pick.on { background: var(--grape); color: #fff; }
.vw .vt, .vw .hl:not(.hl-base) { text-shadow: none !important; -webkit-text-stroke: 0 !important; }
.gen-bar { height: 12px; background: var(--line, #e6e6f0); border-radius: 8px; overflow: hidden; margin: 8px 0; } .gen-bar i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, #7048E8, #2B8A3E); transition: width .3s; }
/* ---------- قراءة الإجابات ---------- */
.opt-voice .num-opt, .opt-voice .qz-opt, .opt-voice .choice { position: relative; }
.opt-spk { position: absolute; top: -10px; inset-inline-start: -10px; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: #7048E8; color: #fff; box-shadow: 0 3px 0 #4b2fb0; cursor: pointer; z-index: 2; touch-action: manipulation; }
.opt-spk.pulse { animation: spk .5s; } @keyframes spk { 50% { transform: scale(1.25); } }
