:root{
  --green:#0B6E5F; --green-l:#E3F3EF; --ink:#12201D; --muted:#4A5B57; --bg:#F4F7F6;
  --kid-bg:#FFF8EC; --kid:#F5B23E; --kid-ink:#2A1E05; --kid-muted:#6B5520; --line:#DDE5E3; --danger:#B42318;
}
*{box-sizing:border-box}
[hidden]{display:none!important}
html,body{margin:0;min-height:100%}
body{font-family:'IBM Plex Sans Arabic',system-ui,sans-serif;color:var(--ink);background:#E9EEEC;display:flex;justify-content:center;-webkit-tap-highlight-color:transparent}
button,input{font-family:inherit;font-size:16px}
button{cursor:pointer}
.app{width:100%;max-width:480px;min-height:100vh;background:var(--bg);position:relative;padding-bottom:env(safe-area-inset-bottom)}
.screen{display:none;min-height:100vh;flex-direction:column}
.screen.active{display:flex}
.kidzone{background:var(--kid-bg);color:var(--kid-ink)}
.pad{padding:16px 20px 28px;display:flex;flex-direction:column;gap:16px;flex:1}
.center{align-items:center;justify-content:center;text-align:center}
.muted{color:var(--muted);margin:0;line-height:1.7}
.kidzone .muted{color:var(--kid-muted)}
.small{font-size:13px}

/* header */
.top{display:flex;align-items:center;gap:12px;padding:calc(14px + env(safe-area-inset-top)) 16px 10px}
.top h2{margin:0;font-size:20px;flex:1}
.back{width:44px;height:44px;border-radius:14px;border:none;background:#fff;font-size:28px;line-height:1;color:inherit;flex-shrink:0}
.top-link{border:none;background:transparent;color:var(--green);font-weight:700;min-height:44px}
.stars-pill{padding:8px 12px;border-radius:14px;background:#fff;font-weight:700;white-space:nowrap}

/* welcome */
#s-welcome{padding:calc(48px + env(safe-area-inset-top)) 22px 28px;gap:28px}
.welcome{display:flex;flex-direction:column;align-items:center;gap:10px}
.logo-mark{width:76px;height:76px;border-radius:24px;background:var(--green);display:flex;align-items:center;justify-content:center}
.welcome h1{margin:0;font-size:42px}
.sub{margin:0;color:var(--muted);font-size:17px}
.stack{display:flex;flex-direction:column;gap:14px}
.choice{display:flex;align-items:center;gap:16px;padding:20px;border-radius:20px;border:2px solid;text-align:right;width:100%;color:var(--ink)}
.choice .ic{width:64px;height:64px;flex-shrink:0;border-radius:18px;display:flex;align-items:center;justify-content:center;font-size:34px}
.choice b{display:block;font-size:20px;margin-bottom:4px}
.choice small{font-size:15px;color:var(--muted)}
.choice.kid{background:#FFF4DE;border-color:var(--kid)}.choice.kid .ic{background:var(--kid)}
.choice.adult{background:var(--green-l);border-color:var(--green)}.choice.adult .ic{background:var(--green)}

/* buttons & forms */
.btn{width:100%;min-height:52px;border-radius:16px;border:none;background:var(--green);color:#fff;font-size:18px;font-weight:700;padding:12px 16px}
.btn:disabled{background:#A9C9C2}
.btn.ghost{background:transparent;border:2px dashed #B9CBC6;color:var(--ink)}
.btn.soft{background:#fff;border:2px solid #F3E2BF;color:var(--kid-ink);font-weight:500;font-size:17px}
.link{border:none;background:transparent;color:var(--green);font-size:15px;min-height:44px;text-decoration:underline}
.link.danger{color:var(--danger)}
.form{display:flex;flex-direction:column;gap:14px}
.form label{display:flex;flex-direction:column;gap:6px;font-weight:500}
.form input{min-height:50px;border-radius:14px;border:1px solid #C9D5D2;padding:0 14px;background:#fff}
.form input:focus{outline:3px solid #9FD6CB;border-color:var(--green)}
.msg{margin:0;min-height:1.2em;font-size:15px;color:var(--danger)}
.msg.ok{color:var(--green)}
.tabs{display:flex;background:#E3EAE8;border-radius:14px;padding:4px}
.tab{flex:1;min-height:44px;border:none;border-radius:11px;background:transparent;font-weight:500;color:var(--muted)}
.tab.active{background:#fff;color:var(--ink);font-weight:700}

/* kids list */
.kids-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
.kid-card{display:flex;flex-direction:column;align-items:center;gap:6px;padding:18px 10px;border-radius:20px;border:2px solid #F3E2BF;background:#FFF4DE;color:var(--kid-ink)}
.kid-card .av{font-size:48px;line-height:1}
.kid-card b{font-size:18px}
.kid-card small{color:var(--kid-muted)}
.avatars{border:none;padding:0;margin:0}
.avatars legend{font-weight:500;margin-bottom:8px}
#avatar-pick{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:8px}
#avatar-pick button{aspect-ratio:1;border-radius:14px;border:2px solid #DDE5E3;background:#fff;font-size:28px}
#avatar-pick button[aria-pressed="true"]{border-color:var(--green);background:var(--green-l)}

/* lessons */
.lessons{display:flex;flex-direction:column;gap:12px}
.lesson{display:flex;align-items:center;gap:14px;padding:16px;border-radius:20px;background:#fff;border:none;text-align:right;color:var(--kid-ink);width:100%}
.lesson .li{width:58px;height:58px;border-radius:16px;display:flex;align-items:center;justify-content:center;font-size:30px;flex-shrink:0}
.lesson b{display:block;font-size:18px}
.lesson small{color:var(--kid-muted)}
.lesson .bar{display:block;height:8px;border-radius:4px;background:#F3E2BF;margin-top:8px;overflow:hidden}
.lesson .bar i{display:block;height:100%;background:var(--green);border-radius:4px}

/* play */
.progress{flex:1;height:14px;border-radius:7px;background:#F3E2BF;overflow:hidden}
.progress div{height:100%;width:0;background:var(--green);border-radius:7px;transition:width .3s}
.card{display:flex;flex-direction:column;align-items:center;gap:12px;padding:24px 18px;border-radius:28px;background:#fff}
.pic{width:150px;height:150px;display:flex;align-items:center;justify-content:center;font-size:110px;line-height:1}
.pic .swatch{width:130px;height:130px;border-radius:50%;border:4px solid #EADBB8}
.pic .digit{font-family:'Fredoka',system-ui,sans-serif;font-size:120px;color:#2563EB}
.word{font-family:'Fredoka',system-ui,sans-serif;font-size:54px;line-height:1}
.say{font-size:18px;color:var(--kid-muted)}
.coach{display:flex;gap:10px;align-items:flex-start}
.coach-av{width:44px;height:44px;flex-shrink:0;border-radius:50%;background:var(--green);color:#fff;display:flex;align-items:center;justify-content:center;font-weight:700;font-size:18px}
.coach p{flex:1;margin:0;padding:14px 16px;border-radius:18px;border-top-right-radius:4px;background:#E6F6EA;color:#14421F;font-size:17px;line-height:1.6;min-height:56px}
.coach p.try{background:#FFF1D6;color:#5B3F00}
.actions{margin-top:auto;display:flex;flex-direction:column;align-items:center;gap:12px}
.mic{width:96px;height:96px;border-radius:50%;border:6px solid #FFE3A8;background:var(--kid);font-size:40px}
.mic.listening{animation:pulse 1s infinite;background:#E5484D;border-color:#FBC8CA}
@keyframes pulse{50%{transform:scale(1.08)}}
.mic-label{font-weight:700;font-size:17px}
.manual{display:flex;flex-direction:column;gap:8px;width:100%;text-align:center}
.row{display:flex;gap:10px}
.big-ic{font-size:80px}
@media (prefers-reduced-motion: reduce){.mic.listening{animation:none}}

/* exercises */
.stages{flex:1;display:flex;gap:6px}
.stages i{flex:1;height:10px;border-radius:5px;background:#F3E2BF}
.stages i.on{background:var(--green)}
.stages i.cur{background:var(--kid)}
.ex-title{margin:4px 0 0;font-size:24px}
.en-word{font-family:'Fredoka',system-ui,sans-serif}
.center-text{text-align:center;margin-top:-8px}
.speaker{align-self:center;width:96px;height:96px;border-radius:50%;border:6px solid #CDEBE4;background:var(--green);font-size:40px}
.options{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}
.opt{aspect-ratio:1;border-radius:22px;border:3px solid #F3E2BF;background:#fff;font-size:56px;display:flex;align-items:center;justify-content:center;padding:0;line-height:1}
.opt.good,.tile.good{border:4px solid #16A34A;background:#E6F6EA}
.opt.bad,.tile.bad{border:4px solid #F59E0B;background:#FFF1D6}
.opt .swatch{width:70%;height:70%;border-radius:50%;border:3px solid #EADBB8}
.opt .digit,.tile .digit{font-family:'Fredoka',system-ui,sans-serif;color:#2563EB;font-size:52px}
.match{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}
.match .col{display:flex;flex-direction:column;gap:12px}
.tile{height:76px;border-radius:18px;border:3px solid #F3E2BF;background:#fff;display:flex;align-items:center;justify-content:center;font-size:42px;color:var(--kid-ink);padding:0}
.tile.word{font-family:'Fredoka',system-ui,sans-serif;font-size:24px}
.tile.sel{border:4px solid var(--green);background:var(--green-l)}
.tile.good{opacity:.7}
.tile .swatch{width:48px;height:48px;border-radius:50%;border:3px solid #EADBB8}
.tile .digit{font-size:40px}
.coach p.good-msg{background:#E6F6EA;color:#14421F}

/* adult path */
.usage{display:flex;align-items:center;gap:12px;padding:14px 16px;border-radius:18px;background:var(--green-l)}
.usage-bar{flex:1;display:flex;flex-direction:column;gap:6px;color:#3C5751}
.r-bar{height:8px;border-radius:4px;background:#C9E4DD;overflow:hidden}
.r-bar i{display:block;height:100%;width:0;background:var(--green)}
.scenarios{display:flex;flex-direction:column;gap:12px}
.scenario{display:flex;align-items:center;gap:14px;padding:16px;border-radius:18px;background:#fff;border:2px solid transparent;text-align:right;width:100%;color:var(--ink)}
.scenario .si{width:54px;height:54px;flex-shrink:0;border-radius:16px;display:flex;align-items:center;justify-content:center;font-size:28px}
.scenario b{display:block;font-size:18px}
.scenario small{font-size:14px;color:var(--muted)}
.scenario .tag{font-size:13px;color:var(--muted);white-space:nowrap}
.adult-coach{margin-top:auto}
.adult-coach p{background:#fff;color:var(--ink)}
.chat-top{background:#fff;border-bottom:1px solid var(--line)}
.chat-top .back{background:var(--bg)}
.ttl{flex:1;display:flex;flex-direction:column}
.ttl b{font-size:18px}
.chat{flex:1;padding:16px;display:flex;flex-direction:column;gap:12px}
.ai{display:flex;gap:10px;align-items:flex-start;max-width:92%}
.ai .coach-av{width:38px;height:38px;font-size:15px}
.ai .ai-msg{display:flex;flex-direction:column;gap:4px}
.ai .text{padding:12px 14px;border-radius:16px;border-top-left-radius:4px;background:#fff;font-size:16px;line-height:1.5;text-align:left}
.ai .tr{font-size:13px;color:var(--muted)}
.ai .again{align-self:flex-start;border:none;background:transparent;color:#0B5A4E;font-size:14px;min-height:36px;padding:0}
.me{align-self:flex-end;max-width:82%;padding:12px 14px;border-radius:16px;border-top-right-radius:4px;background:var(--green);color:#fff;font-size:16px;line-height:1.5;text-align:left}
.fix{padding:12px 14px;border-radius:14px;background:#FFF4DE;border:1px solid #F0D08A;font-size:15px;line-height:1.7;color:#3B2A05}
.fix b.t{display:block;color:#6B4A05}
.typing{color:var(--muted);font-size:14px}
.typing.thinking::after{content:'';display:inline-block;width:1.4em;text-align:start;animation:dots 1.2s steps(4,end) infinite}
@keyframes dots{0%{content:''}25%{content:'.'}50%{content:'..'}75%{content:'...'}}
.mic-label{text-align:center;max-width:100%;overflow-wrap:anywhere}
.composer{position:sticky;bottom:0;padding:12px 16px calc(16px + env(safe-area-inset-bottom));background:#fff;border-top:1px solid var(--line);display:flex;flex-direction:column;gap:8px}
.composer-row{align-items:center;justify-content:space-between}
.pill{min-height:44px;padding:8px 14px;border-radius:12px;border:1px solid #C9D5D2;background:#fff;font-size:15px;color:var(--ink)}
.adult-mic{width:76px;height:76px;border-width:5px;border-color:#CDEBE4;background:var(--green);font-size:32px}
.hint{padding:10px 12px;border-radius:12px;background:var(--green-l);font-size:15px;line-height:1.6}
#type-row input{flex:1;min-height:48px;border-radius:14px;border:1px solid #C9D5D2;padding:0 14px;font-size:16px}
.send{width:48px;height:48px;border-radius:14px;border:none;background:var(--green);color:#fff;font-size:20px}
.finish-box{display:flex;flex-direction:column;align-items:center;gap:12px;padding:20px;text-align:center}
.finish-box h3{margin:0;font-size:24px}

.ai .say,.say-line{font-size:14px;color:#0B5A4E}
.say-toggle{font-size:14px;min-height:40px;padding:6px 10px}
.say-toggle[aria-pressed="false"]{opacity:.55;text-decoration:line-through}
.no-say .say,.no-say .say-line{display:none}

/* levels */
.lv-av{font-size:36px;line-height:1}
.review-card{display:flex;align-items:center;gap:12px;padding:14px 16px;border-radius:18px;background:var(--green);color:#fff;border:none;text-align:right;width:100%}
.review-card b{display:block;font-size:17px}.review-card small{font-size:14px;opacity:.85}
.review-card .rc-ic{font-size:30px}
.review-card .rc-go{padding:8px 14px;border-radius:12px;background:#fff;color:var(--green);font-weight:700}
.review-card.done{background:#E6F6EA;color:#14421F}.review-card.done .rc-go{background:transparent;color:#16A34A}
.review-card:disabled{opacity:.6}
.levels{display:flex;flex-direction:column;gap:12px}
.level{display:flex;align-items:center;gap:14px;padding:14px;border-radius:20px;background:#fff;border:2px solid transparent;text-align:right;width:100%;color:var(--kid-ink)}
.level .li{width:52px;height:52px;flex-shrink:0;border-radius:16px;background:#FFF1D6;display:flex;align-items:center;justify-content:center;font-size:26px}
.level b{display:block;font-size:17px}.level small{font-size:13px;color:var(--kid-muted)}
.level .tag{font-size:13px;font-weight:700;white-space:nowrap}
.level.done{border-color:#16A34A}.level.done .tag{color:#16A34A}
.level.current{border:3px solid var(--kid)}.level.current .tag{color:#B7791F}
.level.locked{background:#F6EFE1;opacity:.75}
.level .bar{display:block;height:8px;border-radius:4px;background:#F3E2BF;margin-top:6px;overflow:hidden}
.level .bar i{display:block;height:100%;background:var(--green)}
/* sentence */
.sn-box{min-height:76px;padding:14px;border-radius:20px;background:#fff;border:2px dashed #E3C98A;display:flex;flex-wrap:wrap;gap:10px;align-items:center}
.sn-box.right{border-color:#16A34A;border-style:solid}
.sn-bank{display:flex;flex-wrap:wrap;gap:10px;justify-content:center}
.chip{padding:10px 16px;min-height:48px;border-radius:14px;border:2px solid #F3E2BF;background:#fff;font-family:'Fredoka',system-ui,sans-serif;font-size:22px;color:var(--kid-ink)}
.chip.in{background:var(--green);border-color:var(--green);color:#fff}
.chip.used{opacity:.25}
.sn-say{font-size:15px;color:#0B5A4E}
/* certificate */
.cert{padding:22px 18px;border-radius:24px;background:#fff;border:4px double var(--kid);display:flex;flex-direction:column;align-items:center;gap:10px;text-align:center}
.cert-name{font-size:32px;color:var(--green)}
.cert-foot{display:flex;justify-content:space-between;width:100%;font-size:13px;color:var(--kid-muted);padding-top:10px;border-top:1px solid #F3E2BF}
.btn.kidbtn{background:var(--kid);color:var(--kid-ink)}

/* signature & about */
.signature{margin:auto 0 0;text-align:center;font-size:13px;color:#5E6E6A}
.about{align-items:center;text-align:center}
.about .r-row{width:100%;gap:12px}
.about a{color:var(--green)}
.small-mark{width:56px;height:56px;border-radius:18px}

/* parent */
.report{background:#fff;border-radius:18px;padding:16px;display:flex;flex-direction:column;gap:10px}
.report h3{margin:0;font-size:18px}
.report .r-row{display:flex;justify-content:space-between;font-size:15px}
.report .r-bar{height:8px;border-radius:4px;background:#E3EAE8;overflow:hidden}
.report .r-bar i{display:block;height:100%;background:var(--green)}

.toast{position:fixed;bottom:calc(20px + env(safe-area-inset-bottom));left:50%;transform:translateX(-50%);background:#12201D;color:#fff;padding:12px 18px;border-radius:14px;font-size:15px;max-width:90%;z-index:9}
/* المستوى 3 و4 */
.actions.row{flex-direction:row;justify-content:center;margin-top:0}
.actions.row .btn{flex:1}
.kq{display:flex;gap:10px;align-items:flex-start}
.kq-av{width:52px;height:52px;flex-shrink:0;border-radius:50%;background:#FFE3A8;display:flex;align-items:center;justify-content:center;font-size:30px}
.kq-bubble{flex:1;display:flex;flex-direction:column;gap:4px;padding:14px 16px;border-radius:20px;border-top-right-radius:4px;background:#fff;border:2px solid #F3E2BF}
.kq-who{color:#8A6D2B;font-size:13px}
.kq-row{display:flex;align-items:center;gap:10px;justify-content:space-between}
.kq-en{font-family:'Fredoka',system-ui,sans-serif;font-size:26px;color:var(--kid-ink);text-align:left}
.kq-pic{font-size:44px;line-height:1}
.kq-say,.kq-ar{font-size:15px;color:#6B5520}
.kq-say b{color:#0B5A4E}
.kq-listen{width:48px;height:48px;flex-shrink:0;border-radius:50%;border:2px solid #F3E2BF;background:#fff;font-size:22px;padding:0}
.answers{display:flex;flex-direction:column;gap:10px}
.ans{display:flex;align-items:center;gap:12px;width:100%;padding:12px 14px;border-radius:18px;border:3px solid #F3E2BF;background:#fff;text-align:right;color:var(--kid-ink)}
.ans .a-pic{font-size:36px;line-height:1;flex-shrink:0}
.ans .a-txt{flex:1;display:flex;flex-direction:column;gap:2px}
.ans .a-en{font-family:'Fredoka',system-ui,sans-serif;font-size:21px;direction:ltr;text-align:left}
.ans .a-say{font-size:14px;color:#0B5A4E}
.ans .a-ar{font-size:14px;color:#6B5520}
.ans.good{border-color:#16A34A;background:#E6F6EA}
.ans.bad{border-color:#F59E0B;background:#FFF1D6}
.ans.dim{opacity:.45}
.ans:disabled{cursor:default}
.kc-voice{display:flex;align-items:center;gap:14px;padding:10px 14px;border-radius:20px;background:#FFF1D6}
.kc-voice span{flex:1;font-size:16px;line-height:1.5}
.mic.small-mic{width:68px;height:68px;font-size:28px;border-width:5px;flex-shrink:0}
.st-page{display:flex;flex-direction:column;gap:14px;padding:18px;border-radius:26px;background:#fff;border:2px solid #F3E2BF}
.st-scene{font-size:72px;text-align:center;line-height:1.2;letter-spacing:6px}
.st-lines{display:flex;flex-direction:column;gap:10px}
.st-line{display:flex;flex-direction:column;gap:3px;padding:10px 12px;border-radius:16px;border:2px solid transparent;background:#FFF8EC;text-align:right;width:100%;color:var(--kid-ink)}
.st-line .l-en{font-family:'Fredoka',system-ui,sans-serif;font-size:23px;direction:ltr;text-align:left}
.st-line .l-say{font-size:14px;color:#0B5A4E}
.st-line .l-ar{font-size:14px;color:#6B5520}
.st-line.on{border-color:var(--kid);background:#FFE9B8}
.actions.row.end{margin-top:auto}
/* التحديث */
html,body{overscroll-behavior-y:contain}
.ptr{position:fixed;top:-96px;left:50%;transform:translate(-50%,0);z-index:60;display:flex;flex-direction:column;align-items:center;gap:6px;pointer-events:none}
.ptr-ring{width:44px;height:44px;border-radius:50%;background:var(--green);color:#fff;font-weight:700;font-size:20px;display:flex;align-items:center;justify-content:center;box-shadow:0 4px 14px rgba(0,0,0,.15);border:3px solid #fff}
.ptr-label{font-size:13px;font-weight:700;color:var(--green);background:#fff;padding:3px 10px;border-radius:999px;box-shadow:0 2px 8px rgba(0,0,0,.08);white-space:nowrap}
.ptr.ready .ptr-ring{background:var(--kid);color:var(--kid-ink)}
.ptr.spin .ptr-ring{animation:ptrspin .8s linear infinite}
@keyframes ptrspin{to{transform:rotate(360deg)}}
.update-bar{position:fixed;top:calc(10px + env(safe-area-inset-top));left:50%;transform:translateX(-50%);z-index:70;padding:12px 20px;border:0;border-radius:999px;background:var(--green);color:#fff;font-weight:700;font-size:16px;box-shadow:0 6px 20px rgba(0,0,0,.2);white-space:nowrap}
.lesson small.missing{display:block;color:#B45309;font-weight:700}
.sheet{position:fixed;inset:0;z-index:80;background:rgba(20,16,8,.45);display:flex;align-items:flex-end;justify-content:center}
.sheet-card{width:100%;max-width:480px;background:#FFF8EC;border-radius:26px 26px 0 0;padding:22px 20px calc(22px + env(safe-area-inset-bottom));display:flex;flex-direction:column;gap:10px}
.sheet-card h3{margin:0;font-size:20px}
.sheet-card p{margin:0 0 6px;line-height:1.7;color:#4A3A12}
.sheet-btns{display:flex;flex-direction:column;gap:10px}
.sheet-btns .btn{width:100%}
/* صور الأطفال */
.kid-photo{display:block;border-radius:50%;object-fit:cover;background:#FFE3A8}
.kid-card .kid-photo.av{width:64px;height:64px;border:3px solid #fff;box-shadow:0 2px 8px rgba(0,0,0,.12)}
.lv-av .kid-photo{width:40px;height:40px;border:2px solid #fff}
.photo-pick{display:flex;align-items:center;gap:14px;padding:12px;border-radius:20px;background:#FFF4DE;border:2px dashed #E3C98A}
.photo-circle{width:76px;height:76px;flex-shrink:0;border-radius:50%;border:3px solid #fff;background:#FFE3A8;font-size:30px;padding:0;overflow:hidden;display:flex;align-items:center;justify-content:center;box-shadow:0 2px 8px rgba(0,0,0,.1)}
.photo-circle img{width:100%;height:100%;object-fit:cover;display:block}
.photo-txt{display:flex;flex-direction:column;gap:3px;flex:1}
.photo-txt small{color:var(--kid-muted);font-size:13px;line-height:1.5}
.photo-acts{display:flex;gap:14px;flex-wrap:wrap}
.linkbtn{background:none;border:none;padding:4px 0;color:var(--green);font-weight:700;font-size:15px;font-family:inherit;cursor:pointer}
.linkbtn.danger{color:#B42318}
.cert-photo img{width:96px;height:96px;border-radius:50%;object-fit:cover;border:4px solid var(--kid);display:block}
.r-head{display:flex;align-items:center;gap:12px}
.r-head .r-av{font-size:40px;line-height:1}
.r-head .kid-photo.r-av{width:56px;height:56px}
.r-head-txt{display:flex;flex-direction:column;gap:2px}
/* مقاس الشاشة: نخلي الصفحة على قد الجوال، وزر التالي دايماً ظاهر */
@supports (height:100dvh){.app,.screen{min-height:100dvh}}
.pad.play .actions{position:sticky;bottom:0;z-index:5;margin-top:auto;padding:14px 0 calc(6px + env(safe-area-inset-bottom));background:linear-gradient(to bottom,rgba(255,248,236,0),var(--kid-bg) 16px)}
.pad.play{padding-bottom:10px}
@media (max-height:820px){
  .pad{gap:12px;padding-top:10px}
  .top{padding-bottom:6px}
  .card{padding:16px 14px;gap:8px}
  .pic{width:112px;height:112px;font-size:84px}
  .pic .swatch{width:100px;height:100px}
  .pic .digit{font-size:92px}
  .word{font-size:46px}
  .coach p{padding:10px 14px;min-height:0;font-size:16px}
  .mic{width:80px;height:80px;font-size:34px;border-width:5px}
  .actions{gap:8px}
  .st-scene{font-size:56px}
  .opt{font-size:48px}
}
@media (max-height:690px){
  .pic{width:86px;height:86px;font-size:64px}
  .pic .swatch{width:76px;height:76px}
  .pic .digit{font-size:70px}
  .word{font-size:40px}
  .say{font-size:16px}
  .mic{width:70px;height:70px;font-size:30px}
  .card .btn{min-height:44px;padding-top:8px;padding-bottom:8px}
}
/* صوّر واقرأ */
.tools-row{display:flex;gap:10px}
.tool-card{flex:1;display:flex;flex-direction:column;align-items:flex-start;gap:2px;padding:12px 14px;border-radius:18px;border:2px solid #CDE9E1;background:#E3F3EF;color:#0B3F37;text-align:right}
.tool-card span{font-size:24px;line-height:1}
.tool-card b{font-size:16px}
.tool-card small{font-size:12px;color:#3D6B62}
.snap-card{display:flex;align-items:center;gap:12px;padding:14px 16px;border-radius:20px;border:none;background:#0B6E5F;color:#fff;text-align:right;width:100%}
.snap-card .sc-ic{font-size:28px}
.snap-card b{display:block;font-size:17px}
.snap-card small{font-size:13px;opacity:.85}
.snap-card .sc-go{font-size:24px}
.snapzone{background:#F6F4EE}
.snap-start{display:flex;flex-direction:column;gap:14px}
.snap-hero{display:flex;flex-direction:column;align-items:center;gap:8px;text-align:center;padding:26px 18px;border-radius:24px;background:#fff}
.snap-hero-ic{font-size:56px}
.snap-hero b{font-size:19px}
.snap-hero small{color:#5B6B66;line-height:1.7;font-size:15px}
.snap-type{display:flex;gap:8px}
.snap-type input{flex:1;min-width:0;height:52px;border-radius:16px;border:2px solid #D7E9E3;padding:0 14px;font-size:18px;font-family:'Fredoka',system-ui,sans-serif;text-align:left;background:#fff}
.snap-type .btn{width:auto;padding:0 20px}
.snap-wait{display:flex;flex-direction:column;align-items:center;gap:14px;padding-top:30px;text-align:center}
.snap-wait img{max-width:70%;max-height:220px;border-radius:18px;object-fit:cover}
.snap-wait img:not([src]),.snap-img:not([src]){display:none}
.snap-result{display:flex;flex-direction:column;gap:12px}
.snap-img{width:100%;max-height:150px;object-fit:cover;border-radius:20px;background:#ddd}
.snap-chips{display:flex;flex-wrap:wrap;gap:8px;justify-content:center}
.snap-chips button{padding:8px 14px;border-radius:14px;border:2px solid #D7E9E3;background:#fff;font-family:'Fredoka',system-ui,sans-serif;font-size:18px;color:#1F2A27}
.snap-chips button.on{background:#0B6E5F;border-color:#0B6E5F;color:#fff}
.snap-card-word{display:flex;flex-direction:column;gap:10px;padding:16px;border-radius:24px;background:#fff}
.snap-word-row{display:flex;align-items:center;justify-content:space-between;gap:10px}
.snap-word{font-family:'Fredoka',system-ui,sans-serif;font-size:44px;line-height:1.15;color:#1F2A27;word-break:break-word}
.snap-word .pv,.lg-v{color:#E8590C}
.snap-word .pt{color:#0B8F6E;text-decoration:underline;text-decoration-thickness:3px;text-underline-offset:6px}
.lg-t{color:#0B8F6E}
.snap-word .ps,.lg-s{color:#B9C2BF}
.snap-tags{display:flex;flex-wrap:wrap;gap:8px}
.tag-say{padding:6px 12px;border-radius:12px;background:#E3F3EF;color:#0B5A4E;font-size:16px}
.tag-ar{padding:6px 12px;border-radius:12px;background:#FFF1D6;color:#5B3F00;font-size:16px}
.snap-tip{margin:0;font-size:14px;line-height:1.7;color:#5B6B66}
.snap-tip:empty{display:none}
.snap-card-word .linkbtn{align-self:flex-start}
.snap-legend{display:flex;gap:12px;justify-content:center;flex-wrap:wrap;font-size:12px;color:#5B6B66}
.snapzone .pad.play .actions{background:linear-gradient(to bottom,rgba(246,244,238,0),#F6F4EE 16px)}
/* المستوى 0: أتأسس */
.group-head{display:flex;justify-content:space-between;align-items:baseline;padding:8px 4px 0;color:var(--kid-muted)}
.group-head b{color:var(--kid-ink);font-size:16px}
.group-head span{font-family:'Fredoka',system-ui,sans-serif;font-size:18px;letter-spacing:2px}
.lesson .li.letter{font-family:'Fredoka',system-ui,sans-serif;font-size:24px;font-weight:600}
.found-card{background:#2563EB}
.lt-steps{display:flex;gap:6px;justify-content:space-between}
.lt-steps span{flex:1;text-align:center;font-size:12px;padding:6px 4px;border-radius:999px;background:#F3E2BF;color:#6B5520;white-space:nowrap}
.lt-steps span.done{background:var(--green);color:#fff}
.lt-steps span.now{background:var(--kid);color:var(--kid-ink);font-weight:700}
.lt-pane{display:flex;flex-direction:column;gap:12px}
.lt-hero{display:flex;align-items:center;gap:14px;padding:16px;border-radius:26px;background:#fff}
.lt-big{font-family:'Fredoka',system-ui,sans-serif;font-size:84px;line-height:1;color:#2563EB;font-weight:600}
.lt-big small{font-size:60px;color:#60A5FA}
.lt-facts{flex:1;display:flex;flex-direction:column;gap:8px}
.lt-fact{display:flex;align-items:center;gap:8px;padding:8px 12px;border-radius:14px;border:2px solid #F3E2BF;background:#FFF8EC;text-align:right;color:var(--kid-ink)}
.lt-fact span{font-size:13px;color:var(--kid-muted)}
.lt-fact b{flex:1;font-size:20px}
.lt-fact.main{border-color:var(--green);background:#E6F6EA}
.lt-fact.main b{color:#0B5A4E}
.lt-fact i,.lt-key i{font-style:normal}
.lt-key{display:flex;align-items:center;gap:12px;padding:14px;border-radius:22px;border:none;background:#fff;text-align:right;color:var(--kid-ink)}
.lt-key-pic{font-size:46px;line-height:1}
.lt-key-txt{flex:1;display:flex;flex-direction:column;gap:2px}
.lt-key-txt b{font-family:'Fredoka',system-ui,sans-serif;font-size:28px;text-align:left}
.lt-key-txt b .hl{color:#E8590C;text-decoration:underline;text-underline-offset:5px}
.lt-key-txt small{color:var(--kid-muted);font-size:14px}
.lt-mouth-row{display:flex;gap:14px;align-items:center;padding:14px;border-radius:24px;background:#fff}
.lt-mouth-pic{width:150px;height:110px;flex-shrink:0;border-radius:20px;background:#FFE9C7;display:flex;align-items:center;justify-content:center}
.lt-mouth-txt{display:flex;flex-direction:column;gap:4px}
.lt-mouth-txt b{font-size:34px;color:#0B5A4E}
.lt-tip{display:flex;gap:10px;align-items:flex-start;padding:14px;border-radius:20px;background:#FFF1D6}
.lt-tip span{font-size:22px}
.lt-tip p{margin:0;font-size:16px;line-height:1.8;color:#5B3F00}
.lt-trace-say{margin:0;font-size:16px}
.lt-canvas-wrap{border-radius:24px;background:#fff;padding:6px;touch-action:none}
#lt-canvas{display:block;width:100%;height:260px;touch-action:none}
.lt-trace-btns .btn{flex:1}
.lt-word-card{display:flex;align-items:center;gap:12px;padding:12px 14px;border-radius:22px;background:#fff}
.lt-word-card .lt-word-pic{font-size:48px;line-height:1}
.lt-word-card > span:nth-child(2){flex:1;display:flex;flex-direction:column;gap:2px}
.lt-word-card b{font-size:20px}
.lt-word-card small{color:var(--kid-muted);font-size:14px}
.lt-slots{justify-content:center;min-height:84px}
.lt-slots .slot{width:56px;height:60px;border-radius:14px;border:2px dashed #E3C98A;display:flex;align-items:center;justify-content:center;font-family:'Fredoka',system-ui,sans-serif;font-size:32px;color:var(--kid-ink)}
.lt-slots .slot.full{border-style:solid;border-color:var(--green);background:#E6F6EA}
#lt-bank .chip{min-width:56px;font-size:28px}
.chip.shake{animation:shake .4s}
@keyframes shake{25%{transform:translateX(-6px)}75%{transform:translateX(6px)}}
@media (max-height:760px){.lt-big{font-size:64px}.lt-big small{font-size:46px}.lt-hero{padding:12px}#lt-canvas{height:220px}.lt-key-pic{font-size:38px}}
/* أول مرة */
.onb-dots{display:flex;gap:6px;justify-content:center;padding-top:calc(14px + env(safe-area-inset-top))}
.onb-dots span{width:8px;height:8px;border-radius:4px;background:#CFE3DD}
.onb-dots span.on{width:22px;background:var(--green)}
#s-welcome{padding-top:0;gap:22px}
#s-welcome .welcome{margin-top:10px}
#s-welcome .welcome h1{font-size:32px}
.onb-q{font-size:22px}
.onb-opt{display:flex;align-items:center;gap:14px;padding:14px;border-radius:22px;border:3px solid #E7EFEC;background:#fff;text-align:right;width:100%;color:var(--ink)}
.onb-opt .ic{width:58px;height:58px;flex-shrink:0;border-radius:18px;display:flex;align-items:center;justify-content:center;font-size:30px}
.onb-opt > span:nth-child(2){flex:1;display:flex;flex-direction:column;gap:3px}
.onb-opt b{font-size:19px}
.onb-opt small{font-size:14px;color:var(--muted)}
.onb-opt i{font-style:normal;font-size:22px;color:var(--green);visibility:hidden}
.onb-opt.on{border-color:var(--green)}
.onb-opt.on i{visibility:visible}
.onb-name{display:flex;flex-direction:column;gap:6px;font-weight:500}
.onb-name small{color:var(--muted);font-weight:400}
.onb-name input{height:50px;border-radius:14px;border:2px solid #D7E9E3;padding:0 14px;font-size:17px;font-family:inherit;background:#fff}
.onb-foot{margin-top:auto;display:flex;flex-direction:column;gap:10px;align-items:center}
.onb-foot .btn{width:100%}
.onb-foot .signature{margin:4px 0 0}
.onb-login{font-size:15px;color:var(--muted)}
.link-inline{border:none;background:none;padding:4px 2px;color:var(--green);font-weight:700;font-family:inherit;font-size:inherit;cursor:pointer}
.onb-title{margin:0;font-size:26px}
.onb-sub{margin:-8px 0 0}
.onb-where{display:flex;gap:10px;align-items:flex-start;padding:12px 14px;border-radius:18px;background:#E3F3EF}
.onb-where span{font-size:20px}
.onb-where p{margin:0;font-size:15px;line-height:1.7;color:#0B3F37}
#s-onb2 .actions{position:sticky;bottom:0;padding-bottom:calc(6px + env(safe-area-inset-bottom))}
#s-onb2 .actions .btn{width:100%}
/* البيت */
#s-home{background:#F6F4EE}
.pad.home{padding-top:calc(16px + env(safe-area-inset-top));gap:14px}
.home-top{display:flex;align-items:center;gap:8px}
.home-av{width:46px;height:46px;flex-shrink:0;border-radius:50%;background:#FFE3A8;display:flex;align-items:center;justify-content:center;font-size:26px;overflow:hidden}
.home-av .kid-photo{width:100%;height:100%}
.home-hello{flex:1;min-width:0;display:flex;flex-direction:column}
.home-hello b{font-size:18px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.home-hello small{font-size:12px;color:var(--muted)}
.home-top .stars-pill{padding:6px 9px;font-size:14px}
.home-gear{width:40px;height:40px;border-radius:12px;border:none;background:#fff;font-size:18px;padding:0}
.home-next{display:flex;flex-direction:column;gap:10px;padding:18px;border-radius:26px;border:none;background:var(--green);color:#fff;text-align:right;width:100%}
.hn-label{font-size:13px;opacity:.85}
.hn-row{display:flex;align-items:center;gap:12px}
.hn-ic{width:58px;height:58px;flex-shrink:0;border-radius:18px;background:rgba(255,255,255,.16);display:flex;align-items:center;justify-content:center;font-family:'Fredoka',system-ui,sans-serif;font-size:28px}
.hn-txt{flex:1;display:flex;flex-direction:column;gap:2px}
.hn-txt b{font-size:19px}
.hn-txt small{font-size:14px;opacity:.9}
.hn-bar{height:8px;border-radius:4px;background:rgba(255,255,255,.2);overflow:hidden}
.hn-bar i{display:block;height:100%;width:0;background:var(--kid)}
.hn-go{align-self:stretch;text-align:center;padding:12px;border-radius:14px;background:#fff;color:var(--green);font-weight:700;font-size:17px}
.home-tools{display:flex;gap:10px}
.home-tool{flex:1;display:flex;flex-direction:column;align-items:center;gap:3px;padding:12px 6px;border-radius:20px;border:none;background:#fff;color:var(--ink)}
.home-tool span{font-size:26px;line-height:1.1}
.home-tool b{font-size:13px}
.home-tool small{font-size:11px;color:var(--muted)}
.home-tool small:empty{display:none}
.home-tool.done{opacity:.75}
.home-h{font-size:16px}
.home-paths{display:flex;flex-direction:column;gap:8px}
.home-path{display:flex;align-items:center;gap:12px;padding:12px 14px;border-radius:18px;border:none;background:#fff;text-align:right;width:100%;color:var(--ink)}
.hp-ic{font-size:26px}
.hp-txt{flex:1;display:flex;flex-direction:column}
.hp-txt b{font-size:16px}
.hp-txt small{font-size:12px;color:var(--muted)}
.hp-go{font-size:20px;color:var(--green)}
.home-kids-head{display:flex;align-items:center;justify-content:space-between}
.home-kids{display:flex;gap:12px;flex-wrap:wrap}
.home-kid{display:flex;flex-direction:column;align-items:center;gap:4px;width:84px;border:none;background:none;padding:0;color:var(--ink)}
.home-kid .hk-av{width:62px;height:62px;border-radius:50%;background:#FFE3A8;border:3px solid #fff;box-shadow:0 2px 8px rgba(0,0,0,.1);display:flex;align-items:center;justify-content:center;font-size:32px;overflow:hidden}
.home-kid .hk-av .kid-photo{width:100%;height:100%}
.home-kid b{font-size:14px}
.home-kid small{font-size:11px;color:var(--muted)}
.home-kids .muted{margin:0}
.pad.home .signature{margin-top:auto;padding-top:10px}
/* مقياس القراءة */
.mt-hero{padding:18px;border-radius:24px;background:var(--green);color:#fff;display:flex;flex-direction:column;gap:6px}
.mt-hero small{font-size:14px;opacity:.85}
.mt-hero .big{display:flex;align-items:baseline;gap:8px}
.mt-hero .big b{font-size:52px;line-height:1}
.mt-hero .big span{font-size:19px}
.mt-hero p{margin:0;font-size:15px;line-height:1.6}
.mt-card{padding:16px;border-radius:22px;background:#fff;display:flex;flex-direction:column;gap:10px}
.mt-bars{height:150px;display:flex;align-items:flex-end;gap:12px;padding:0 4px;border-bottom:2px solid #E5E7EB}
.mt-bar{flex:1;display:flex;flex-direction:column;align-items:center;justify-content:flex-end;gap:4px;height:100%}
.mt-bar b{font-size:13px;color:#5B6B66}
.mt-bar i{display:block;width:100%;max-width:44px;border-radius:10px 10px 0 0;background:#A7D8CB;min-height:4px}
.mt-bar.now i{background:var(--green)}
.mt-bar.now b{color:var(--green)}
.mt-bar small{font-size:11px;color:#5B6B66;white-space:nowrap}
.mt-words{display:flex;flex-wrap:wrap;gap:8px}
.mt-words span{padding:6px 12px;border-radius:12px;font-family:'Fredoka',system-ui,sans-serif;font-size:17px}
.mt-words .ok{background:#E6F6EA;color:#166534}
.mt-words .no{background:#FFF1D6;color:#9A3412}
#s-meter .actions{margin-top:auto}
#s-meter .actions .btn{width:100%}
.mq-word-card{display:flex;flex-direction:column;align-items:center;gap:14px;padding:30px 16px;border-radius:26px;background:#fff}
.mq-word{font-family:'Fredoka',system-ui,sans-serif;font-size:64px;line-height:1;color:#1F2A27}
.mq-reveal{display:flex;flex-wrap:wrap;gap:8px;justify-content:center;align-items:center}
.mq-ask{display:flex;flex-direction:column;align-items:center;gap:10px;width:100%}
.mq-ask .btn,#mq-next{width:100%}
#mq-judge{width:100%}
#mq-judge .btn{flex:1}
/* خطي */
.wr-tabs{display:flex;gap:6px;padding:4px;border-radius:16px;background:#F3E2BF}
.wr-tabs button{flex:1;height:40px;border-radius:12px;border:none;background:transparent;color:var(--kid-muted);font-family:inherit;font-size:15px}
.wr-tabs button.on{background:#fff;color:var(--kid-ink);font-weight:700}
.wr-pane{display:flex;flex-direction:column;gap:10px}
.wr-letter-row{display:flex;gap:6px;overflow-x:auto;padding-bottom:4px;-webkit-overflow-scrolling:touch}
.wr-letter-row button{flex-shrink:0;width:44px;height:48px;border-radius:12px;border:2px solid #F3E2BF;background:#fff;font-family:'Fredoka',system-ui,sans-serif;font-size:22px;color:var(--kid-ink);position:relative}
.wr-letter-row button.on{border-color:var(--green);background:#E6F6EA}
.wr-letter-row button.done::after{content:'✓';position:absolute;top:-6px;right:-4px;font-size:12px;color:#fff;background:#16A34A;border-radius:50%;width:16px;height:16px;line-height:16px}
.wr-case{display:flex;gap:8px}
.wr-case button{flex:1;height:40px;border-radius:12px;border:2px solid #F3E2BF;background:#fff;font-family:inherit;font-size:15px;color:var(--kid-ink)}
.wr-case button.on{border-color:var(--green);background:var(--green);color:#fff}
.wr-name-form{display:flex;gap:8px;align-items:flex-end}
.wr-name-form label{flex:1;display:flex;flex-direction:column;gap:6px;font-size:15px}
.wr-name-form input{height:50px;border-radius:14px;border:2px solid #E3C98A;padding:0 14px;font-family:'Fredoka',system-ui,sans-serif;font-size:22px;background:#fff}
.wr-name-form .btn{width:auto;padding:0 18px}
.wr-name-boxes{display:flex;gap:6px;justify-content:center;flex-wrap:wrap}
.wr-name-boxes span{width:40px;height:50px;border-radius:12px;display:flex;align-items:center;justify-content:center;font-family:'Fredoka',system-ui,sans-serif;font-size:28px;background:#F7EEDC;color:#C9A961;border:2px dashed #E7D5AE}
.wr-name-boxes span.done{background:#E6F6EA;color:#16A34A;border:2px solid #16A34A}
.wr-name-boxes span.now{background:#FFF1D6;color:var(--kid-ink);border:2px solid var(--kid)}
#wr-name-edit{align-self:center}
#wr-canvas{display:block;width:100%;height:250px;touch-action:none}
.wr-preview{padding:14px;border-radius:8px;background:#fff;box-shadow:0 6px 20px rgba(0,0,0,.08);display:flex;flex-direction:column;gap:8px;max-height:300px;overflow:hidden}
.wr-preview .pr-row{display:flex;gap:12px;align-items:baseline;border-bottom:2px solid #E7D5AE;font-family:'Fredoka',system-ui,sans-serif;font-size:28px;padding-bottom:2px}
.wr-preview .pr-row i{font-style:normal;color:#E7D5AE}
.print-sheet{display:none}
@media print{
  body *{visibility:hidden}
  .print-sheet,.print-sheet *{visibility:visible}
  .print-sheet{display:block;position:absolute;left:0;top:0;width:100%;padding:10mm;font-family:'Fredoka',system-ui,sans-serif;color:#000;background:#fff}
  .print-sheet .ps-head{display:flex;justify-content:space-between;font-family:'IBM Plex Sans Arabic',system-ui,sans-serif;font-size:12pt;margin-bottom:6mm}
  .print-sheet .ps-row{display:flex;gap:9mm;align-items:baseline;height:20mm;border-bottom:1.5pt solid #999;border-top:.5pt dashed #ccc;font-size:40pt;line-height:1;margin-bottom:5mm;page-break-inside:avoid}
  .print-sheet .ps-row i{font-style:normal;color:#d4d4d4}
}
#s-splash{align-items:center;justify-content:center;background:#F6F4EE}
.splash-mark{animation:splash 1.2s ease-in-out infinite}
@keyframes splash{50%{transform:scale(1.06);opacity:.85}}
/* سجل النشاط */
#s-activity{background:#F6F4EE}
.act-open{display:flex;align-items:center;gap:10px;width:100%;margin:6px 0 4px;padding:12px 14px;border-radius:14px;border:2px solid #CDE9E1;background:#E3F3EF;color:#0B3F37;text-align:right;font-family:inherit}
.act-open span{font-size:20px}.act-open b{flex:1;font-size:15px}.act-open i{font-style:normal;font-size:20px;color:var(--green)}
.act-tabs button{color:#5B6B66}
.act-body{display:flex;flex-direction:column;gap:10px}
.act-stats{display:flex;gap:8px}
.act-stat{flex:1;padding:10px 6px;border-radius:16px;background:#fff;display:flex;flex-direction:column;align-items:center;text-align:center}
.act-stat b{font-size:22px}.act-stat span{font-size:12px;color:#5B6B66}
.act-stat.main{background:var(--green);color:#fff}.act-stat.main span{color:#E3F3EF}
.act-sess{padding:14px;border-radius:20px;background:#fff;display:flex;flex-direction:column;gap:8px}
.act-sess-head{display:flex;align-items:center;gap:8px}
.act-sess-head .dot{width:10px;height:10px;border-radius:50%;background:#16A34A;flex-shrink:0}
.act-sess-head b{font-size:15px}
.act-pill{margin-right:auto;padding:3px 10px;border-radius:999px;background:#E6F6EA;color:#166534;font-size:12px;font-weight:700;white-space:nowrap}
.act-evs{display:flex;flex-direction:column;gap:6px;padding-right:16px;margin-right:4px;border-right:2px solid #E7EFEC;font-size:14px}
.act-sess.idle{background:#FFF8EC;border:2px dashed var(--kid)}
.act-sess.idle .dot{background:#F59E0B}
.act-sess.idle .act-pill{background:#FFF1D6;color:#9A3412}
.warn{color:#9A3412;font-size:13px}
.act-empty{text-align:center;margin:10px 0}
.act-hero{padding:16px;border-radius:20px;background:var(--green);color:#fff;display:flex;flex-direction:column;gap:4px}
.act-hero small{font-size:13px;opacity:.85}
.act-hero .big{display:flex;align-items:baseline;gap:8px}.act-hero .big b{font-size:40px;line-height:1}.act-hero .big span{font-size:16px}
.act-card{padding:16px;border-radius:20px;background:#fff;display:flex;flex-direction:column;gap:8px}
.act-bars{height:160px;display:flex;align-items:flex-end;gap:6px;border-bottom:2px solid #E5E7EB}
.act-bar{flex:1;height:100%;display:flex;flex-direction:column;align-items:center;justify-content:flex-end;gap:4px}
.act-bar b{font-size:12px;color:#5B6B66}
.act-bar i{display:block;width:100%;max-width:32px;border-radius:8px 8px 0 0;background:#A7D8CB}
.act-bar.now i{background:var(--green)}
.act-bar.zero i{background:var(--kid)}
.act-bar small{font-size:10px;color:#5B6B66;white-space:nowrap}
.dev-btn{display:flex;align-items:center;gap:10px;padding:14px 16px;border-radius:16px;background:#1F2A27;color:#fff;text-decoration:none}.dev-btn span{font-size:20px}.dev-btn b{flex:1}.dev-btn i{font-style:normal;font-size:20px}
.swipe-back{position:fixed;top:50%;right:6px;z-index:90;width:46px;height:46px;border-radius:50%;background:#fff;color:var(--green);box-shadow:0 4px 16px rgba(0,0,0,.18);display:flex;align-items:center;justify-content:center;font-size:30px;font-weight:700;opacity:0;transform:translate(0,-50%) scale(.7);pointer-events:none}
.swipe-back.ready{background:var(--green);color:#fff}

/* ===== ربط جوال الطفل ===== */
.kid-code-btn{border:none;background:#FFF1D6;color:#7A4E00;border-radius:14px;padding:11px 16px;font:inherit;font-size:15px;font-weight:700;cursor:pointer}
.le-wrap{display:flex;flex-direction:column;align-items:center;text-align:center;gap:10px;padding-top:8px}
.le-wrap h2{margin:4px 0 0;font-size:24px}
.le-key{width:76px;height:76px;border-radius:24px;background:#FFE3A8;display:flex;align-items:center;justify-content:center;font-size:40px}
.code-boxes{display:flex;gap:8px;justify-content:center;margin:10px 0 4px}
.code-boxes span{width:44px;height:56px;border-radius:14px;background:#fff;font-size:30px;font-weight:700;display:flex;align-items:center;justify-content:center;border:2px solid #F3E2BF;color:#2A1E05}
.code-boxes span.cur{border-color:#F5B23E}
.code-boxes.big span{border-color:#D6E7E2;color:#0B6E5F;background:#F4FAF8}
.code-boxes.shake{animation:shk .35s}
@keyframes shk{25%{transform:translateX(-6px)}75%{transform:translateX(6px)}}
.keypad{display:grid;grid-template-columns:repeat(3,72px);gap:12px;justify-content:center;margin-top:6px}
.keypad button{width:72px;height:64px;border-radius:20px;border:none;background:#fff;font-size:28px;font-family:inherit;color:#2A1E05;cursor:pointer;box-shadow:0 2px 0 #F0DDB4}
.keypad button.bs{background:transparent;box-shadow:none}
.keypad button.gap{visibility:hidden}
.keypad button:disabled{opacity:.5}
.le-av{width:96px;height:96px;border-radius:50%;background:#FFE3A8;display:flex;align-items:center;justify-content:center;font-size:52px;overflow:hidden}
.le-av img{width:100%;height:100%;object-fit:cover}
#s-link-enter .signature{padding:16px 0 20px}
.lc-card{background:#fff;border:1px solid var(--line,#E3ECE9);border-radius:20px;padding:18px;text-align:center}
.lc-card p{margin:0 0 6px;line-height:1.7}
.lc-left{color:#8A5A00;font-weight:700}
.lc-left.out{color:#C0392B}
.lc-h{margin:22px 0 10px;font-size:17px}
.lc-dev{display:flex;align-items:center;gap:10px;background:#fff;border:1px solid var(--line,#E3ECE9);border-radius:16px;padding:12px 14px;margin-bottom:8px}
.lc-dev .t{flex:1;min-width:0}
.lc-dev .t b{display:block}
.lc-dev .t small{color:var(--muted)}
.lc-dev.new{border-color:#2BA37F;background:#EAF8F2}
.lc-tip{display:flex;gap:10px;background:#FFF8E6;border-radius:16px;padding:12px 14px;margin-top:16px}
.lc-tip p{margin:0;line-height:1.7;font-size:14.5px}
.link-kid{display:flex;align-items:center;gap:8px;width:100%;border:1px dashed #9CC9BD;background:#F4FAF8;color:#0B6E5F;border-radius:14px;padding:11px 14px;font:inherit;font-weight:700;margin-top:8px;cursor:pointer}
.link-kid i{margin-inline-start:auto;font-style:normal}

/* ===== لوحة العائلة وصفحة الطفل ===== */
.icon-btn{width:44px;height:44px;border-radius:14px;border:none;background:#fff;font-size:20px;cursor:pointer;flex:none}
.fam-entry{display:flex;align-items:center;gap:12px;width:100%;border:2px solid #CFE6DF;background:#fff;color:#1F2A27;border-radius:20px;padding:12px 14px;font:inherit;text-align:right;cursor:pointer;margin:10px 0 2px}
.fam-entry .fe-ic{font-size:28px}
.fam-entry .fe-txt{flex:1;display:flex;flex-direction:column}
.fam-entry .fe-txt b{font-size:16px}
.fam-entry .fe-txt small{color:#0B6E5F;font-size:13px;font-weight:700}
.fam-stats{display:flex;gap:8px;margin:4px 0 12px}
.fam-stats div{flex:1;min-width:0;background:#fff;border-radius:16px;padding:10px 6px;text-align:center}
.fam-stats b{display:block;font-size:19px;color:#0B6E5F}
.fam-stats b.gold{color:#B7791F}
.fam-stats span{font-size:12.5px;color:var(--muted)}
.fam-alert{display:flex;gap:10px;align-items:center;padding:10px 14px;border-radius:16px;background:#FDECEC;color:#8A1C1C;font-size:14px;margin-bottom:12px}
.fam-alert.soft{background:#FFF6DF;color:#6B4A00}
.fam-list{display:flex;flex-direction:column;gap:10px}
.fam-kid{display:flex;align-items:center;gap:12px;width:100%;padding:10px 12px;border-radius:20px;border:none;background:#fff;font:inherit;text-align:right;cursor:pointer;color:inherit}
.fam-kid .fk-av{position:relative;width:52px;height:52px;border-radius:50%;flex:none;display:flex;align-items:center;justify-content:center;font-size:28px;background:#FFE3A8}
.fam-kid .fk-av>*{width:100%;height:100%;border-radius:50%;display:flex;align-items:center;justify-content:center;overflow:hidden;object-fit:cover}
.fam-kid .fk-dot{position:absolute;bottom:0;left:0;width:14px;height:14px;border-radius:50%;border:2px solid #fff}
.dot-g{background:#2BA37F}.dot-y{background:#D99A00}.dot-r{background:#D64545}
.txt-g{color:#2BA37F}.txt-y{color:#B07D00}.txt-r{color:#D64545}
.fam-kid .fk-txt{flex:1;min-width:0;display:flex;flex-direction:column;gap:2px}
.fam-kid .fk-txt b{font-size:16px}
.fam-kid .fk-txt b small{font-weight:500;font-size:12.5px;margin-inline-start:4px}
.fam-kid .fk-txt>small{color:var(--muted);font-size:12.5px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.fam-kid .fk-txt>small.ph{color:#8A958F;font-size:12px}
.fam-kid .fk-end{display:flex;flex-direction:column;align-items:center}
.fam-kid .fk-end b{color:#B7791F;font-size:15px;white-space:nowrap}
.fam-kid .fk-end i{font-style:normal;color:#9AA5A1;font-size:20px}
.fam-rank{display:flex;align-items:center;gap:10px;padding:12px 14px;border-radius:18px;background:#FFF6DF;color:#6B4A00;font-size:14px;margin-top:12px;line-height:1.6}
.fam-rank>span:first-child{font-size:26px}
.fam-add{display:block;margin:14px auto 0}
#kp-open{width:100%;margin-bottom:10px}
.kp-tabs{display:flex;gap:6px;padding:4px;border-radius:14px;background:#E9E5DA;margin-bottom:10px}
.kp-tabs button{flex:1;height:38px;border-radius:11px;border:none;background:transparent;color:var(--muted);font:inherit;font-size:14px;font-weight:700;cursor:pointer}
.kp-tabs button.on{background:#fff;color:#0B6E5F}
.kp-body{background:#fff;border-radius:20px;padding:12px 14px;display:flex;flex-direction:column;gap:2px;min-height:120px}
.kp-row{display:flex;align-items:center;gap:10px;font-size:14.5px;padding:7px 0;border-bottom:1px solid #F1EEE6}
.kp-row:last-child{border-bottom:none}
.kp-row .ic{font-size:19px;width:26px;text-align:center;flex:none}
.kp-row .t{flex:1;min-width:0}
.kp-row .t small{display:block;color:var(--muted);font-size:12.5px}
.kp-row .s{color:var(--muted);font-size:13px;white-space:nowrap}
.kp-bar{height:8px;border-radius:6px;background:#EEF3F1;overflow:hidden;margin-top:4px}
.kp-bar i{display:block;height:100%;background:#2BA37F;border-radius:6px}
.kp-more{border:none;background:none;color:#0B6E5F;font:inherit;font-weight:700;padding:8px 0 2px;cursor:pointer;text-align:right}
.kp-empty{color:var(--muted);text-align:center;padding:18px 0}
#kp-dev .lc-dev{margin-top:12px}

/* ===== الباركود والموافقة ===== */
.le-scan{width:100%;max-width:320px;margin-top:6px}
.lc-qr{width:220px;height:220px;margin:6px auto 0;padding:10px;border:3px solid #E3F3EF;border-radius:22px;background:#fff;display:flex;align-items:center;justify-content:center}
.lc-qr svg{width:100%;height:100%;display:block}
.lc-qr.off{opacity:.15}
.lc-or{display:flex;align-items:center;gap:10px;color:#8A958F;font-size:13px;margin:8px 0 2px}
.lc-or::before,.lc-or::after{content:'';flex:1;height:1px;background:#E6E1D6}
#s-link-code .code-boxes.big span{width:36px;height:46px;font-size:24px}
.le-pair{display:flex;align-items:center;gap:8px;font-size:22px;color:#8A958F}
.le-pair .le-p{width:66px;height:66px;border-radius:50%;background:#E3F3EF;display:flex;align-items:center;justify-content:center;font-size:36px}
.le-pair .le-av{width:66px;height:66px;font-size:36px}
.le-points{list-style:none;margin:4px 0;padding:12px 14px;border-radius:16px;background:#fff;text-align:right;font-size:14.5px;line-height:1.9;width:100%;box-sizing:border-box;max-width:360px}
#le-ask .btn{width:100%;max-width:360px}
#s-scan{background:#121917;color:#fff;position:relative;overflow:hidden;min-height:100vh;min-height:100dvh;padding:0}
#scan-video{position:absolute;inset:0;width:100%;height:100%;object-fit:cover}
.scan-shade{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;pointer-events:none}
.scan-frame{position:relative;width:240px;height:240px;border-radius:28px;box-shadow:0 0 0 2000px rgba(0,0,0,.5);margin-top:-60px}
.scan-frame i{position:absolute;width:46px;height:46px;border:5px solid #F5B23E}
.scan-frame .c1{top:0;right:0;border-width:5px 5px 0 0;border-top-right-radius:28px}
.scan-frame .c2{top:0;left:0;border-width:5px 0 0 5px;border-top-left-radius:28px}
.scan-frame .c3{bottom:0;right:0;border-width:0 5px 5px 0;border-bottom-right-radius:28px}
.scan-frame .c4{bottom:0;left:0;border-width:0 0 5px 5px;border-bottom-left-radius:28px}
.scan-frame .line{left:16px;right:16px;width:auto;height:3px;border:none;background:#F5B23E;border-radius:2px;box-shadow:0 0 12px #F5B23E;animation:scanl 2s ease-in-out infinite alternate}
@keyframes scanl{from{top:20px}to{top:216px}}
.scan-top{position:relative;z-index:2}
.scan-top .back{background:rgba(255,255,255,.15);color:#fff}
.scan-top .ttl b{color:#fff}
.scan-help{position:absolute;left:24px;right:24px;top:calc(50% + 100px);text-align:center;font-size:16px;line-height:1.7;margin:0;z-index:2}
.scan-type{position:absolute;left:22px;right:22px;bottom:calc(30px + env(safe-area-inset-bottom));width:auto;color:#fff!important;border-color:rgba(255,255,255,.4)!important;z-index:2}

/* ===== مسار الكبار ===== */
.mist-card{display:flex;align-items:center;gap:10px;width:100%;border:none;background:#FDECEC;color:#8A1C1C;border-radius:18px;padding:12px 14px;font:inherit;text-align:right;cursor:pointer;margin-bottom:10px}
.mist-card .mc-ic{font-size:24px}
.mist-card .mc-txt{flex:1;display:flex;flex-direction:column}
.mist-card .mc-txt b{font-size:15px}
.mist-card .mc-go{font-weight:700;white-space:nowrap}
.mist-card.empty{background:#fff;color:var(--muted)}
.ap-stage{color:#8A958F;font-weight:700;font-size:13px;margin:12px 4px 6px;display:block}
.ap-item{display:flex;align-items:center;gap:12px;width:100%;padding:9px 12px;border-radius:16px;border:2px solid transparent;background:#fff;font:inherit;text-align:right;color:inherit;cursor:pointer;margin-bottom:6px}
.ap-item .ai-ic{width:40px;height:40px;border-radius:12px;background:#E3F3EF;display:flex;align-items:center;justify-content:center;font-size:21px;flex:none}
.ap-item .ai-t{flex:1;min-width:0;display:flex;flex-direction:column}
.ap-item .ai-t b{font-size:14.5px}
.ap-item .ai-t small{color:var(--muted);font-size:12.5px}
.ap-item .ai-end{font-size:13px;font-weight:700;color:#B7791F;white-space:nowrap}
.ap-item.cur{border-color:#0B6E5F}
.ap-item.cur .ai-ic{background:#0B6E5F}
.ap-item.cur .ai-end{color:#0B6E5F}
.ap-item.lock{background:#EFECE4;opacity:.6}
.ap-item.lock .ai-ic{background:#E2DED3}
.ap-more-h{display:block;margin:18px 0 8px}
.adone{display:flex;flex-direction:column;gap:14px;padding-top:30px;min-height:100vh;min-height:100dvh;box-sizing:border-box}
.ad-head{display:flex;flex-direction:column;align-items:center;gap:4px;text-align:center}
.ad-ic{font-size:54px}
.ad-head b{font-size:23px}
.ad-stars{font-size:32px;letter-spacing:4px}
.ad-head small{color:var(--muted)}
.ad-card{background:#fff;border-radius:20px;padding:14px;display:flex;flex-direction:column;gap:8px}
.ad-card>b{font-size:15px}
.mist-item{display:flex;flex-direction:column;gap:2px;padding:8px 10px;border-radius:14px;background:#F8F6F1}
.mist-item .bad{text-align:left;font-size:13.5px;color:#B42318;text-decoration:line-through}
.mist-item .good{text-align:left;font-size:15px;color:#0B6E5F;font-weight:700}
.mist-item small{color:var(--muted)}
.ad-tip{display:flex;gap:10px;padding:12px 14px;border-radius:18px;background:#E3F3EF;color:#0B3F37;font-size:14px;line-height:1.7}
.ad-btns{margin-top:auto;display:flex;flex-direction:column;gap:10px;align-items:stretch}
.ad-btns .link-inline{align-self:center;padding:6px}
.mist-list{display:flex;flex-direction:column;gap:8px;margin-bottom:12px}
.mrow{display:flex;align-items:center;gap:10px;padding:10px 12px;border-radius:16px;background:#fff}
.mrow .snd{width:38px;height:38px;border-radius:12px;border:none;background:#E3F3EF;font-size:18px;flex:none;cursor:pointer}
.mrow .tx{flex:1;min-width:0;display:flex;flex-direction:column;gap:1px}
.mrow .tx .bad{text-align:left;font-size:12.5px;color:#B42318;text-decoration:line-through}
.mrow .tx .good{text-align:left;font-size:14.5px;color:#0B6E5F;font-weight:700}
.mrow .tx small{color:var(--muted);font-size:12px}
.mrow .st{display:flex;flex-direction:column;align-items:center;gap:2px;font-size:11px;white-space:nowrap}
.mrow .st b{font-size:15px;letter-spacing:1px;color:#B7791F}
#mist-review{width:100%}
.mist-rv{background:#fff;border-radius:22px;padding:20px 16px;display:flex;flex-direction:column;align-items:center;gap:10px;text-align:center;margin-bottom:12px}
.rv-ar{font-size:20px}
.rv-bad{font-size:14px;color:#B42318}
.rv-mic{width:84px;height:84px;border-radius:50%;border:none;background:#0B6E5F;color:#fff;font-size:34px;cursor:pointer;margin-top:4px}
.rv-mic.listening{background:#D64545;animation:pulse 1s infinite}
.rv-type{display:flex;gap:8px;width:100%}
.rv-type input{flex:1;min-width:0;height:48px;border-radius:14px;border:2px solid #E3ECE9;padding:0 12px;font:inherit;font-size:16px}
.rv-type .btn{width:auto;padding:0 16px}
.rv-res{margin:0;font-weight:700;min-height:1.4em}
.rv-res.ok{color:#2BA37F}.rv-res.no{color:#B42318}
.rv-ans{display:flex;flex-direction:column;align-items:center;gap:2px}
.rv-ans b{font-size:17px;color:#0B6E5F}
.rv-ans small{color:var(--muted)}
#rv-next{width:100%}

/* ===== المستوى 5: أتهجّى / المستوى 6: أقرأ بنفسي ===== */
#s-spell .ttl,#s-readl .ttl{flex:1;display:flex;flex-direction:column;gap:4px;min-width:0}
.sp-wrap{display:flex;flex-direction:column;align-items:center;gap:12px}
.sp-card{width:100%;background:#fff;border-radius:26px;padding:16px;display:flex;flex-direction:column;align-items:center;gap:8px}
.sp-pic{font-size:84px;line-height:1;min-height:90px;display:flex;align-items:center;justify-content:center}
.sp-pic .swatch{width:90px;height:90px;border-radius:24px;display:block}
.sp-pic .digit{font-family:Fredoka,sans-serif;font-size:80px;font-weight:600;color:#0B6E5F}
.sp-hear{border:none;background:#FFE3A8;border-radius:14px;padding:10px 18px;font:inherit;font-weight:700;font-size:15px;cursor:pointer}
.sp-q{font-size:16px}
.sp-slots{display:flex;gap:8px;justify-content:center;flex-wrap:wrap}
.sp-slots span{width:52px;height:64px;border-radius:16px;background:#fff;border:3px dashed #E9D9B6;display:flex;align-items:center;justify-content:center;font-family:Fredoka,sans-serif;font-size:36px;font-weight:600;color:#0B6E5F}
.sp-slots span.cur{border-color:#F5B23E}
.sp-slots span.on{background:#E3F3EF;border-style:solid;border-color:#9CD3C2}
.sp-slots.win span{background:#DDF5EA;border-color:#2BA37F}
.sp-msg{margin:0;min-height:22px;font-weight:700;text-align:center}
.sp-msg.ok{color:#2BA37F}.sp-msg.no{color:#B42318}
.sp-tiles{display:flex;flex-wrap:wrap;gap:10px;justify-content:center;max-width:340px}
.sp-tiles button{width:58px;height:58px;border-radius:16px;border:none;background:#fff;box-shadow:0 3px 0 #F0DDB4;font-family:Fredoka,sans-serif;font-size:30px;font-weight:600;color:#2A1E05;cursor:pointer}
.sp-tiles button.used{opacity:.2;pointer-events:none}
.sp-tiles button.shake{animation:shk .35s;background:#FDECEC}
#sp-next,#rl-next{width:100%}
.rl-wrap{display:flex;flex-direction:column;align-items:center;gap:12px}
.rl-pic{width:100%;height:150px;border-radius:26px;background:linear-gradient(160deg,#DFF2EC,#FFF1D6);display:flex;align-items:center;justify-content:center;font-size:72px}
.rl-text{width:100%;box-sizing:border-box;background:#fff;border-radius:22px;padding:16px;display:flex;flex-wrap:wrap;gap:6px 8px;justify-content:center;font-family:Fredoka,sans-serif;font-size:30px;font-weight:600;line-height:1.3}
.rl-text span{padding:2px 8px;border-radius:10px;border-bottom:3px solid transparent;color:#2A1E05}
.rl-text span.ok{background:#E3F7EE;color:#13795B;border-color:#2BA37F}
.rl-text span.miss{background:#FFE8D1;color:#B45309;border-color:#F59E0B;cursor:pointer}
.rl-ar{text-align:center}
.rl-mic{width:92px;height:92px;border-radius:50%;border:none;background:#0B6E5F;color:#fff;font-size:38px;cursor:pointer}
.rl-mic.listening{background:#D64545;animation:pulse 1s infinite}
.rl-mic:disabled{opacity:.5}
.rl-label{text-align:center;font-size:15px;min-height:1.4em}
.rl-btns{display:flex;gap:8px;flex-wrap:wrap;justify-content:center}
.rl-btns .btn{width:auto;padding:0 14px;height:44px;font-size:14px}

.cert.grad{border:6px double #E2B54A}
.cert-gift{padding:12px 14px;border-radius:18px;background:#E3F3EF;color:#0B3F37;font-size:14px;line-height:1.7;text-align:center}

/* ===== صورتي والإطارات ===== */
.lv-av{cursor:pointer;position:relative;border-radius:50%;display:inline-flex;align-items:center;justify-content:center;min-width:44px;min-height:44px}
.lv-av.editable::after{content:'📷';position:absolute;bottom:-4px;left:-6px;width:20px;height:20px;border-radius:50%;background:#0B6E5F;font-size:11px;display:flex;align-items:center;justify-content:center}
.me-card{max-height:92vh;overflow:auto}
.me-head{display:flex;align-items:center;gap:14px;margin-bottom:12px;text-align:right}
.me-head b{font-size:19px}
.me-prev{width:84px;height:84px;border-radius:50%;background:#FFE3A8;display:flex;align-items:center;justify-content:center;font-size:46px;flex:none;overflow:hidden}
.me-prev .kid-photo{width:100%;height:100%;border:none}
.me-src{display:flex;gap:8px;margin-bottom:12px}
.me-src button{flex:1;height:66px;border-radius:16px;border:none;background:#E3F3EF;color:#0B3F37;font:inherit;font-size:14px;font-weight:700;cursor:pointer;line-height:1.4}
.me-src button.ch{background:#FFF1D6;color:#6B4A00}
.me-avs{display:flex;gap:8px;justify-content:center;margin-bottom:12px;flex-wrap:wrap}
.me-avs button{width:52px;height:52px;border-radius:50%;border:3px solid transparent;background:#FFF6DF;font-size:28px;cursor:pointer}
.me-avs button.on{border-color:#0B6E5F}
.me-fh{display:block;text-align:right;margin-bottom:8px}
.me-frames{display:grid;grid-template-columns:repeat(4,1fr);gap:10px 6px;margin-bottom:10px}
.me-frames button{display:flex;flex-direction:column;align-items:center;gap:4px;border:none;background:none;font:inherit;padding:0;cursor:pointer}
.me-frames .fr{width:52px;height:52px;border-radius:50%;border:4px solid;display:flex;align-items:center;justify-content:center;font-size:21px;background:#fff}
.me-frames .lock .fr{border-color:#D9D3C4!important;background:#F1EDE3}
.me-frames .lock{opacity:.75}
.me-frames .on .fr{box-shadow:0 0 0 3px #0B6E5F}
.me-frames small{font-size:11px;line-height:1.3;color:#5B4A22}
.me-tip{margin:0 0 10px;padding:10px 12px;border-radius:14px;background:#FFF6DF;font-size:13.5px;color:#6B4A00;text-align:center;min-height:1.4em}
.ph-alert{background:#fff;border:2px solid #CFE6DF;border-radius:20px;padding:14px;display:flex;flex-direction:column;gap:12px;margin-bottom:12px}
.ph-alert .pa-row{display:flex;align-items:center;justify-content:center;gap:14px}
.ph-alert .pa-one{display:flex;flex-direction:column;align-items:center;gap:4px;font-size:12px;color:var(--muted)}
.ph-alert .pa-av{width:64px;height:64px;border-radius:50%;background:#FFE3A8;display:flex;align-items:center;justify-content:center;font-size:34px;overflow:hidden}
.ph-alert .pa-av img{width:100%;height:100%;object-fit:cover}
.ph-alert .pa-old{opacity:.6}
.ph-alert .pa-btns{display:flex;gap:8px}
.ph-alert .pa-btns button{flex:1;height:46px;border-radius:14px;font:inherit;font-size:15px;font-weight:700;cursor:pointer}
.ph-alert .pa-ok{border:none;background:#0B6E5F;color:#fff}
.ph-alert .pa-undo{border:2px solid #FECACA;background:#fff;color:#B42318}
.fam-kid .fk-txt>small.fr-won{color:#B7791F;font-size:12px}

/* ===== خطي: الحرف خطوة خطوة + ربط الحروف ===== */
.hw-steps{display:flex;gap:6px;margin:8px 0}
.hw-steps button{flex:1;height:40px;border-radius:12px;border:none;background:#F1E7D2;color:var(--kid-ink);font:inherit;font-size:12.5px;font-weight:700;cursor:pointer;padding:0 2px}
.hw-steps button.on{background:#0B6E5F;color:#fff}
.hw-steps button.ok{background:#CFE6DF}
.hw-wrap canvas{display:block;width:100%;height:300px;touch-action:none}
.hw-badges{display:flex;gap:6px;justify-content:center;margin:8px 0;flex-wrap:wrap}
.hw-badges span{padding:5px 10px;border-radius:10px;background:#fff;font-size:12.5px;color:#5B4A22}
.hw-badges span.ok{background:#E3F7EE;color:#13795B}
.hw-badges span.no{background:#FDECEC;color:#B42318}
.hw-btns{gap:8px}
.hw-btns .btn{flex:1;padding:0 6px;font-size:14px}
.hw-btns .btn.kidbtn{flex:2}
.hj-list{display:flex;flex-direction:column;gap:10px}
.hj-stage b{display:block;margin:4px 2px 6px;font-size:14px}
.hj-items{display:flex;flex-wrap:wrap;gap:8px}
.hj-items button{min-width:58px;height:44px;padding:0 12px;border-radius:12px;border:2px solid #F3E2BF;background:#fff;font-family:Fredoka,system-ui,sans-serif;font-size:19px;color:var(--kid-ink);cursor:pointer;position:relative}
.hj-items button.on{border-color:var(--green);background:#E6F6EA}
.hj-items button.done::after{content:'✓';position:absolute;top:-6px;right:-4px;font-size:12px;color:#fff;background:#16A34A;border-radius:50%;width:16px;height:16px;line-height:16px;text-align:center}
.hj-items button.lock{opacity:.45}
.ps-svg{height:22mm;width:auto;flex:none;align-self:center}
@media print{.print-sheet .ps-row.has-svg{height:24mm;align-items:center}.print-sheet .ps-row.has-svg>span{display:none}.print-sheet .ps-row i{white-space:nowrap;overflow:hidden}}

/* ===== ورقة الخط الذكية + صوّر ورقتك ===== */
.ws-preview{background:#fff;border-radius:10px;box-shadow:0 6px 20px rgba(0,0,0,.08);padding:10px;max-height:420px;overflow:auto;margin-bottom:10px}
.ws-sheet{font-family:'IBM Plex Sans Arabic',system-ui,sans-serif;color:#2A1E05;display:flex;flex-direction:column;gap:6px}
.ws-head{display:flex;justify-content:space-between;align-items:center;font-size:11px;border-bottom:2px solid #F3E2BF;padding-bottom:4px;gap:8px;flex-wrap:wrap}
.ws-head b{font-size:13px}
.ws-sub{font-size:10px;color:#8A7A55}
.ws-row{border:1.5px solid #F1E7D2;border-radius:10px;padding:4px 6px;page-break-inside:avoid}
.ws-rh{display:flex;align-items:center;gap:6px;font-size:11px}
.ws-rh .why{color:#8A7A55}
.ws-rh .ex{margin-inline-start:auto;font-family:Fredoka,system-ui,sans-serif;font-size:13px}
.ws-row svg,.ws-words svg{display:block;width:100%;height:auto}
.ws-steps{display:flex;gap:10px;font-size:9px;color:#8A7A55;direction:ltr}
.ws-words{border:1.5px dashed #F5B23E;border-radius:10px;padding:4px 6px}
.ws-words b{font-size:11px}
.ws-foot{display:flex;align-items:center;gap:8px;padding:6px 8px;border-radius:10px;background:#E3F3EF;font-size:10.5px}
#wr-snap-btn{margin-top:8px}
.sr-wrap{display:flex;flex-direction:column;gap:12px}
.sr-wait{display:flex;flex-direction:column;align-items:center;gap:12px;text-align:center;padding-top:10px}
.sr-img{width:220px;height:280px;border-radius:18px;overflow:hidden;background:#fff;position:relative}
.sr-img img{width:100%;height:100%;object-fit:cover}
.sr-img::after{content:'';position:absolute;left:0;right:0;height:4px;background:#F5B23E;box-shadow:0 0 12px #F5B23E;animation:scanl2 1.6s ease-in-out infinite alternate}
@keyframes scanl2{from{top:6px}to{top:270px}}
#sr-res{display:flex;flex-direction:column;gap:12px}
.sr-head{background:#fff;border-radius:20px;padding:14px;text-align:center;display:flex;flex-direction:column;gap:4px}
.sr-stars{font-size:32px;letter-spacing:4px}
.sr-head b{font-size:18px}
.sr-items{display:flex;flex-direction:column;gap:8px}
.sr-item{display:flex;align-items:center;gap:10px;padding:8px 12px;border-radius:14px;background:#fff}
.sr-item.good{background:#E3F7EE}.sr-item.fix{background:#FDECEC}.sr-item.ok{background:#FFF6DF}
.sr-item b{font-family:Fredoka,system-ui,sans-serif;font-size:22px;min-width:34px;text-align:center}
.sr-item span{flex:1;font-size:14px}
@media print{
  .print-sheet .ws-sheet{gap:3mm}
  .print-sheet .ws-head{font-size:10pt}.print-sheet .ws-head b{font-size:13pt}
  .print-sheet .ws-sub{font-size:9pt}
  .print-sheet .ws-rh{font-size:10pt}.print-sheet .ws-rh .ex{font-size:13pt}
  .print-sheet .ws-steps{font-size:8pt}
  .print-sheet .ws-foot{font-size:9.5pt;-webkit-print-color-adjust:exact;print-color-adjust:exact}
  .print-sheet svg{-webkit-print-color-adjust:exact;print-color-adjust:exact}
}
.ws-wline{display:flex;flex-wrap:wrap;gap:10px;align-items:center}
.ws-words .ws-wline svg{width:auto;height:58px;display:block}
@media print{.print-sheet .ws-words .ws-wline svg{height:17mm}}

/* ===== الإتقان: خطة اليوم + اختبار المستوى ===== */
.plan-card{background:#fff;border-radius:22px;padding:12px;display:flex;flex-direction:column;gap:8px;margin-bottom:10px}
.plan-card>b{font-size:16px}
.plan-item{display:flex;align-items:center;gap:12px;width:100%;padding:10px 12px;border-radius:16px;border:2px solid #F1E7D2;background:#fff;font:inherit;text-align:right;color:var(--kid-ink);cursor:pointer}
.plan-item.next{border-color:#F5B23E}
.plan-item.done{background:#F2FBF6;border-color:#CDEBDD}
.plan-item .pi-ic{font-size:24px}
.plan-item .pi-t{flex:1;min-width:0;display:flex;flex-direction:column}
.plan-item .pi-t b{font-size:15px}
.plan-item .pi-t small{color:#6B5A33;font-size:12.5px}
.plan-item .pi-e{font-size:13px;font-weight:700;white-space:nowrap;color:#0B6E5F}
.plan-item.done .pi-e{color:#2BA37F}
.plan-item.rev .pi-e{color:#B42318}
.plan-tip{font-size:13px;color:#6B5A33;text-align:center;margin:0}
.mast-card{background:#fff;border-radius:20px;padding:12px 14px;display:flex;flex-direction:column;gap:8px;margin-bottom:12px}
.mast-card b{font-size:15px}
.mast-bar{display:flex;height:14px;border-radius:8px;overflow:hidden;background:#F1E7D2}
.mast-bar i{display:block;height:100%}
.mast-legend{display:flex;justify-content:space-between;font-size:12.5px;flex-wrap:wrap;gap:4px}
.lv-test{margin-top:6px}
.lt2-wrap{display:flex;flex-direction:column;gap:12px}
#s-ltest .ttl{flex:1;display:flex;flex-direction:column;gap:4px;min-width:0}
.lt2-kinds{display:flex;gap:6px;justify-content:center;flex-wrap:wrap}
.lt2-kinds span{padding:5px 10px;border-radius:10px;background:#F1E7D2;font-size:12.5px}
.lt2-kinds span.on{background:#0B6E5F;color:#fff}
.lt2-card{background:#fff;border-radius:24px;padding:18px;display:flex;flex-direction:column;align-items:center;gap:12px;text-align:center}
.lt2-hear{width:66px;height:66px;border-radius:50%;border:none;background:#FFE3A8;font-size:28px;cursor:pointer}
.lt2-show{font-family:Fredoka,system-ui,sans-serif;font-size:30px;font-weight:600;min-height:0}
.lt2-show .pic{font-size:64px;line-height:1;font-family:system-ui}
.lt2-show .swatch{display:inline-block;width:70px;height:70px;border-radius:20px}
.lt2-ask{font-size:16px}
.lt2-opts{display:grid;grid-template-columns:1fr 1fr;gap:10px;width:100%}
.lt2-opts.col{grid-template-columns:1fr}
.lt2-opts button{min-height:64px;border-radius:16px;border:3px solid #F1E7D2;background:#fff;font:inherit;font-size:17px;padding:8px;cursor:pointer;color:var(--kid-ink)}
.lt2-opts button.big{font-size:42px}
.lt2-opts button.en{font-family:Fredoka,system-ui,sans-serif;font-size:19px;direction:ltr}
.lt2-opts button.good{border-color:#2BA37F;background:#E3F7EE}
.lt2-opts button.bad{border-color:#E5484D;background:#FDECEC}
.lt2-fb{margin:0;text-align:center;font-weight:700;min-height:1.4em}
.lt2-fb.ok{color:#2BA37F}.lt2-fb.no{color:#B42318}
#lt2-next,#lt2-go{width:100%}
#lt2-res{display:flex;flex-direction:column;gap:12px}
.lt2-rcard{background:#fff;border-radius:24px;padding:20px;display:flex;flex-direction:column;align-items:center;gap:8px;text-align:center}
.lt2-ric{font-size:60px}
.lt2-rcard b{font-size:21px}
.lt2-break{display:flex;gap:8px;flex-wrap:wrap;justify-content:center;font-size:13px}
.lt2-weak{display:flex;flex-wrap:wrap;gap:6px;justify-content:center}
.lt2-weak span{padding:6px 10px;border-radius:10px;background:#FDECEC;font-family:Fredoka,system-ui,sans-serif;font-size:16px}
.kp-mast .mast-bar{height:16px}
.kp-mast .big{font-size:32px;color:#0B6E5F;font-weight:700}
.kp-bars{display:flex;align-items:flex-end;gap:8px;height:80px}
.kp-bars div{flex:1;display:flex;flex-direction:column;align-items:center;gap:3px;font-size:10px}
.kp-bars i{display:block;width:100%;border-radius:6px 6px 2px 2px;background:#2BA37F}
.kp-forget{display:flex;flex-wrap:wrap;gap:6px;direction:ltr}
.kp-forget span{padding:5px 9px;border-radius:10px;background:#FDECEC;font-family:Fredoka,system-ui,sans-serif}
.kp-cfg{display:flex;align-items:center;gap:8px;font-size:14px;margin-top:6px}
.kp-cfg select{font:inherit;border-radius:10px;border:2px solid #E3ECE9;padding:4px 8px;background:#fff}
