:root{
  --green:#0B6E4F;
  --green-dark:#064832;
  --gold:#C7A440;
  --cream:#FBF8F0;
  --ink:#17352B;
  --muted:#6D7A73;
  --pale-green:#EAF4EF;
  --pale-gold:#F7F0DA;
  --white:#FFFFFF;
  --danger:#B54646;
  font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
  color:var(--ink);
  background:#e9ecea;
}
*{box-sizing:border-box}
html,body{margin:0;min-height:100%;background:#e9ecea}
body{min-height:100vh}
button{font:inherit}
button:focus-visible,[role="button"]:focus-visible{outline:3px solid rgba(199,164,64,.55);outline-offset:3px}
.app-host{min-height:100vh;display:grid;place-items:center;padding:0}
.phone{
  width:min(100vw,390px);
  min-height:100dvh;
  background:var(--white);
  overflow:hidden;
  position:relative;
}
@media (min-width:520px){
  .app-host{padding:24px}
  .phone{width:390px;min-height:844px;height:min(844px,calc(100vh - 48px));border-radius:32px;box-shadow:0 18px 60px rgba(6,72,50,.12)}
}
.status-bar{
  height:36px;
  padding:0 24px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  font-size:11px;
  font-weight:600;
  background:var(--white);
  color:var(--ink);
}
.status-icons{letter-spacing:2px;font-size:9px}
.screen{
  min-height:calc(100dvh - 36px);
  padding:24px;
  display:flex;
  flex-direction:column;
  gap:14px;
  background:var(--white);
}
@media (min-width:520px){.screen{min-height:808px;height:808px;overflow:auto}}
.screen.centered{justify-content:center;gap:18px}
.screen.completion{justify-content:center;gap:16px}
.loading-card{width:min(342px,calc(100vw - 48px));margin:auto;min-height:100vh;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:12px}
.brand-mark{
  width:92px;height:92px;border-radius:28px;background:var(--green);color:#fff;
  display:grid;place-items:center;font-family:"Noto Sans Arabic","Noto Naskh Arabic",Tahoma,Arial,sans-serif;
  font-size:30px;font-weight:700;
}
.brand-mark.small{width:54px;height:54px;border-radius:17px;font-size:19px}
h1,h2,h3,p{margin:0}
.title-brand{font-size:28px;line-height:1.1;color:var(--green-dark);font-weight:800}
.hero-title{font-size:24px;text-align:center;line-height:1.2;font-weight:800;width:100%}
.hero-copy{font-size:15px;line-height:1.45;color:var(--muted);text-align:center;padding:0 8px}
.pills{display:flex;flex-wrap:wrap;gap:8px}
.pills.center{justify-content:center}
.pill{
  border:0;border-radius:999px;padding:7px 12px;background:var(--pale-green);color:var(--green);
  font-size:12px;font-weight:700;cursor:pointer;
}
.pill.gold{background:var(--pale-gold);color:var(--green-dark)}
.pill.active{background:var(--green);color:#fff}
.hero-arabic{
  width:100%;height:168px;border-radius:24px;background:var(--pale-green);
  display:flex;flex-direction:column;align-items:center;justify-content:center;gap:6px;
}
.arabic-display,.arabic-letter{
  font-family:"Noto Sans Arabic","Noto Naskh Arabic",Tahoma,Arial,sans-serif;
}
.arabic-display{font-size:54px;line-height:1.25;color:var(--green);font-weight:700}
.hero-arabic small{font-size:13px;color:var(--muted);font-weight:500}
.btn{
  width:100%;min-height:56px;border:0;border-radius:16px;padding:14px 18px;
  background:var(--green);color:#fff;font-weight:700;font-size:16px;cursor:pointer;
}
.btn.secondary{background:var(--pale-green);color:var(--green)}
.btn:disabled{opacity:.48;cursor:not-allowed}
.link-button{
  width:44px;height:44px;border:0;background:transparent;color:var(--green);
  font-size:22px;font-weight:700;cursor:pointer;padding:0;text-align:left;
}
.top-row{display:flex;align-items:flex-start;justify-content:space-between;width:100%;min-height:44px}
.top-row.centered-title{align-items:flex-start}
.top-row .top-title{font-weight:700;font-size:15px;color:var(--ink);padding-top:4px}
.more{color:var(--muted);text-align:right}
.page-title{font-size:28px;line-height:1.15;font-weight:800}
.page-copy{font-size:14px;line-height:1.45;color:var(--muted)}
.learner-card{
  width:100%;min-height:92px;padding:16px;border:1.5px solid transparent;border-radius:20px;background:#fff;
  display:flex;gap:14px;align-items:center;text-align:left;cursor:pointer;color:var(--ink);
}
.learner-card.selected{background:var(--pale-green);border-color:var(--green)}
.icon-circle{
  flex:0 0 auto;width:52px;height:52px;border-radius:50%;display:grid;place-items:center;
  background:var(--pale-gold);color:var(--green-dark);font-weight:800;
}
.learner-card.selected .icon-circle{background:var(--green);color:#fff}
.learner-info{flex:1;min-width:0;display:flex;flex-direction:column;gap:4px}
.learner-info strong{font-size:17px}
.learner-info span{font-size:13px;color:var(--muted)}
.selected-badge{font-size:12px;font-weight:700;background:var(--green);color:#fff;border-radius:999px;padding:7px 12px}
.spacer{flex:1;min-height:8px}
.dashboard-header{display:flex;align-items:flex-start;justify-content:space-between;min-height:58px}
.greeting strong{display:block;font-size:21px;line-height:1.2}
.greeting span{font-size:13px;color:var(--muted)}
.avatar{width:46px;height:46px;border-radius:50%;background:var(--pale-gold);display:grid;place-items:center;color:var(--green-dark);font-weight:800}
.goal-card{height:118px;border-radius:22px;padding:18px;background:var(--green);color:#fff;display:flex;flex-direction:column;gap:8px}
.goal-row{display:flex;justify-content:space-between;font-size:15px;font-weight:700}
.goal-row b{font-size:14px}
.progress-track{width:100%;height:10px;border-radius:99px;overflow:hidden;background:var(--pale-green)}
.goal-card .progress-track{height:9px;background:rgba(255,255,255,.22)}
.progress-fill{height:100%;background:var(--green);border-radius:99px;transition:width .25s}
.goal-card .progress-fill{background:#fff}
.goal-card small{font-size:12px}
.section-title{font-size:18px;font-weight:800}
.lesson-card,.quran-card,.score-card,.practice-card{border-radius:22px;background:#fff;box-shadow:0 8px 24px rgba(6,72,50,.055)}
.lesson-card{min-height:174px;padding:18px;display:flex;flex-direction:column;gap:10px}
.lesson-row{display:flex;gap:12px;align-items:center}
.lesson-row .icon-circle{background:var(--pale-green);color:var(--green)}
.lesson-text{flex:1;display:flex;flex-direction:column;gap:3px}
.lesson-text strong{font-size:19px}
.lesson-text span{font-size:13px;color:var(--muted)}
.percent{background:var(--pale-gold);color:var(--green-dark);border-radius:999px;padding:7px 12px;font-size:12px;font-weight:700}
.continue-row{border:0;background:transparent;padding:0;color:var(--green);display:flex;align-items:center;justify-content:space-between;font-weight:700;font-size:14px;cursor:pointer}
.continue-row .arrow{font-size:20px}
.quran-card{min-height:86px;padding:16px;background:var(--pale-gold);display:flex;align-items:center;gap:12px;border:0;width:100%;text-align:left;color:var(--ink);cursor:pointer;font:inherit}
.quran-card .icon-circle{width:50px;height:50px;background:#fff}
.quran-card strong{font-size:16px}
.quran-card span{font-size:12px;color:var(--muted)}
.bottom-nav{margin-top:auto;min-height:70px;padding:12px;border-radius:22px;display:flex;align-items:flex-start;justify-content:space-between;background:#fff;box-shadow:0 8px 24px rgba(6,72,50,.055)}
.nav-item{border:0;background:transparent;color:var(--muted);display:flex;flex-direction:column;align-items:center;gap:3px;font-size:11px;cursor:pointer;min-width:58px}
.nav-item b{font-size:14px}
.nav-item.active{color:var(--green);font-weight:700}
.lesson-title{font-size:26px;font-weight:800}
.lesson-sub{font-size:14px;color:var(--muted);line-height:1.4}
.letter-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:10px;min-height:160px}
.letter-card{
  border:0;border-radius:24px;background:#fff;min-width:0;height:160px;display:flex;flex-direction:column;
  justify-content:center;align-items:center;gap:6px;cursor:pointer;color:var(--muted);
  box-shadow:0 8px 24px rgba(6,72,50,.045);
}
.letter-card .arabic-letter{font-size:58px;line-height:1.15;color:var(--green);font-weight:700}
.letter-card span:last-child{font-size:13px;font-weight:700}
.letter-card.selected{background:var(--green);color:#fff}
.letter-card.selected .arabic-letter{color:#fff}
.tip{min-height:74px;border-radius:18px;background:var(--pale-green);padding:16px;display:flex;align-items:center;gap:12px}
.tip .icon-circle{width:42px;height:42px;background:#fff;color:var(--green)}
.tip-text{display:flex;flex-direction:column;gap:2px}
.tip-text strong{font-size:14px}.tip-text span{font-size:12px;color:var(--muted)}
.practice-card{min-height:126px;padding:18px;display:flex;flex-direction:column;gap:8px}
.practice-card small{font-size:13px;color:var(--muted);font-weight:700}
.practice-card strong{font-size:16px}
.quick-choices{display:flex;gap:8px}
.quick-choice{min-width:42px;border:0;border-radius:999px;padding:7px 12px;background:var(--pale-green);color:var(--green);font-weight:700;cursor:pointer}
.quick-choice.selected{background:var(--green);color:#fff}
.quiz-heading{font-size:24px;font-weight:800}
.hearts{font-size:14px;color:var(--gold);letter-spacing:1px}
.quiz-letter{height:220px;border-radius:28px;background:var(--pale-green);display:grid;place-items:center}
.quiz-letter .arabic-letter{font-size:92px;line-height:1;color:var(--green);font-weight:700}
.answers{display:flex;flex-direction:column;gap:10px}
.answer{
  width:100%;min-height:58px;border:1px solid var(--pale-green);border-radius:16px;padding:0 18px;background:#fff;
  color:var(--ink);display:flex;align-items:center;justify-content:space-between;font-size:15px;font-weight:700;cursor:pointer;
}
.answer.selected,.answer.correct{background:var(--green);color:#fff;border-color:var(--green)}
.answer.wrong{border-color:#e8b7b7;background:#fff4f4;color:var(--danger)}
.feedback{min-height:68px;border-radius:16px;background:var(--pale-green);padding:14px;display:flex;align-items:flex-start;gap:10px}
.feedback .check{font-size:20px;color:var(--green);font-weight:800}
.feedback.wrong .check{color:var(--danger)}
.feedback-text{display:flex;flex-direction:column;gap:2px}
.feedback-text strong{font-size:14px;color:var(--green)}
.feedback.wrong .feedback-text strong{color:var(--danger)}
.feedback-text span{font-size:12px;color:var(--muted)}
.completion-icon{width:94px;height:94px;border-radius:50%;background:var(--pale-gold);display:grid;place-items:center;color:var(--gold);font-size:24px;font-weight:800}
.completion-title{font-size:28px;color:var(--green-dark);font-weight:800}
.completion-sub{font-size:19px;font-weight:700}
.completion-copy{width:100%;max-width:300px;text-align:center;color:var(--muted);font-size:14px}
.score-card{min-height:104px;padding:18px;display:grid;grid-template-columns:1fr 1fr;gap:18px}
.metric{display:flex;flex-direction:column;gap:3px}
.metric span{font-size:12px;color:var(--muted)}
.metric strong{font-size:25px;color:var(--green)}
.metric.stars strong{font-size:22px;color:var(--gold);letter-spacing:1px}
.streak{min-height:78px;border-radius:20px;background:var(--pale-green);padding:16px;display:flex;align-items:center;gap:12px}
.streak .icon-circle{width:46px;height:46px;background:var(--green);color:#fff}
.streak-text{display:flex;flex-direction:column;gap:2px}
.streak-text strong{font-size:14px}.streak-text span{font-size:12px;color:var(--muted)}
.toast{
  position:fixed;z-index:20;left:50%;bottom:24px;transform:translate(-50%,20px);
  max-width:min(342px,calc(100vw - 48px));padding:10px 14px;border-radius:12px;background:var(--green-dark);
  color:#fff;font-size:13px;opacity:0;pointer-events:none;transition:.2s;
}
.toast.show{opacity:1;transform:translate(-50%,0)}
.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
.error-state{min-height:100vh;display:grid;place-items:center;padding:24px;background:#fff}
.error-card{max-width:342px;text-align:center;display:flex;flex-direction:column;gap:14px}
.error-card h1{font-size:24px}.error-card p{font-size:14px;color:var(--muted)}
