@font-face { font-family: 'Cairo'; font-weight: 400; font-display: swap; src: url(fonts/cairo-arabic-400-normal.woff2) format('woff2'); unicode-range: U+0600-06FF,U+0750-077F,U+0870-088E,U+0890-0891,U+0898-08E1,U+08E3-08FF,U+200C-200E,U+2010-2011,U+204F,U+2E41,U+FB50-FDFF,U+FE70-FE74,U+FE76-FEFC; }
@font-face { font-family: 'Cairo'; font-weight: 700; font-display: swap; src: url(fonts/cairo-arabic-700-normal.woff2) format('woff2'); unicode-range: U+0600-06FF,U+0750-077F,U+0870-088E,U+0890-0891,U+0898-08E1,U+08E3-08FF,U+200C-200E,U+2010-2011,U+204F,U+2E41,U+FB50-FDFF,U+FE70-FE74,U+FE76-FEFC; }
@font-face { font-family: 'Cairo'; font-weight: 400; font-display: swap; src: url(fonts/cairo-latin-400-normal.woff2) format('woff2'); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+2000-206F,U+2074,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: 'Cairo'; font-weight: 700; font-display: swap; src: url(fonts/cairo-latin-700-normal.woff2) format('woff2'); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+2000-206F,U+2074,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
:root { --ds-page: #fff8ec; --ds-ink: #1d2b4f; --ds-ink-2: #5b6785; --ds-hairline: #eadfcb; --ds-teal: #1fa38a; --ds-surface: #fff; }
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; font-family: 'Cairo', 'Segoe UI', Tahoma, 'Noto Naskh Arabic', sans-serif; color: var(--ds-ink); background: radial-gradient(circle at 15% 0%, #ffeab8 0, transparent 38%), radial-gradient(circle at 100% 20%, #d7ecff 0, transparent 40%), #fff8ec; background-attachment: fixed; line-height: 1.8; font-size: 17px; -webkit-tap-highlight-color: transparent; }
.wrap { max-width: 980px; margin: 0 auto; padding: 14px 16px 40px; padding-top: max(14px, env(safe-area-inset-top)); }
header h1 { margin: 0 0 4px; font-size: 26px; }
h1, h2, h3 { line-height: 1.4; } p { margin: 6px 0; }
.caption { color: var(--ds-ink-2); font-size: 14px; margin: 4px 0; }
.callout { background: #fff3d6; border: 2px solid #ffb703; border-radius: 16px; padding: 10px 14px; margin: 10px 0; }
.group { border-top: 2px dashed var(--ds-hairline); padding: 6px 0 4px; margin: 10px 0; } .group h3 { margin: 6px 0; font-size: 19px; }
.closing { color: var(--ds-ink-2); font-size: 13px; margin-top: 28px; padding-top: 10px; border-top: 1px solid var(--ds-hairline); }
.btn { font: inherit; font-weight: 700; min-height: 50px; padding: 8px 22px; border-radius: 26px; border: 0; cursor: pointer; background: linear-gradient(180deg, #ffc42e, #ffa400); color: #1d2b4f; box-shadow: 0 4px 0 #d98a00; margin: 6px 0 8px 8px; transition: transform .12s, box-shadow .12s; }
.btn:active { transform: translateY(3px); box-shadow: 0 1px 0 #d98a00; }
.btn.secondary { background: #fff; color: #1d2b4f; box-shadow: 0 4px 0 #cfd8ec; border: 2px solid #cfd8ec; }
.btn.ghost { background: transparent; box-shadow: none; color: var(--ds-ink-2); text-decoration: underline; min-height: 44px; }
.btn.compact { min-height: 44px; padding: 4px 16px; font-size: 15px; }
.btn:disabled { opacity: .5; cursor: default; }
.field { display: block; margin: 10px 0; } .field span { display: block; color: var(--ds-ink-2); font-size: 14px; }
.field input { width: 100%; min-height: 50px; font: inherit; font-size: 18px; border-radius: 14px; border: 2px solid #cfd8ec; padding: 6px 12px; background: #fff; color: inherit; }
.field input:focus { outline: 3px solid #4dabf7; border-color: #4dabf7; }
button:focus-visible, a:focus-visible { outline: 3px solid #4dabf7; outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }
html, body, #root { margin: 0; min-height: 100%; }
body { background: var(--ds-page); }
html, body, #root { margin: 0; min-height: 100%; }

.file-nav { display: flex; flex-wrap: wrap; gap: 20px; border-bottom: 1px solid var(--ds-hairline); }
.file-nav a { padding: 10px 0; color: var(--ds-ink-2); text-decoration: none; }
.file-nav a[aria-current="page"] { color: var(--ds-ink); box-shadow: inset 0 -1px 0 var(--ds-ink); }
@media (max-width: 600px) { .file-nav a { display: inline-flex; align-items: center; min-height: 44px; } }
.ms-stage { display: flex; gap: 12px; align-items: flex-start; margin: 8px 0 16px; }
.ms-teacher { width: 120px; height: 132px; flex: none; }
.ms-bubble { flex: 1; background: var(--ds-surface, #fff); border: 1.5px solid var(--ds-hairline); border-radius: 16px; padding: 10px 14px; line-height: 1.8; min-height: 60px; }
.ms-mouth { transform-origin: 100px 124px; opacity: 0; }
.ms-teacher.talk .ms-mouth { opacity: 1; animation: ms-talk .32s infinite alternate ease-in-out; }
.ms-teacher.talk .ms-smile { opacity: 0; }
.ms-teacher.talk .ms-body { animation: ms-bob .6s infinite alternate ease-in-out; }
.ms-teacher.cheer .ms-body { animation: ms-hop .4s 3 ease-in-out; }
.ms-eyes { transform-origin: 100px 94px; animation: ms-blink 4s infinite; }
@keyframes ms-talk { from { transform: scaleY(.6) scaleX(.9); } to { transform: scaleY(2.6) scaleX(.8); } }
@keyframes ms-bob { from { transform: translateY(0); } to { transform: translateY(-3px); } }
@keyframes ms-hop { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
@keyframes ms-blink { 0%,94%,100% { transform: scaleY(1); } 97% { transform: scaleY(.1); } }
@media (prefers-reduced-motion: reduce) { .ms-teacher .ms-body, .ms-teacher .ms-mouth, .ms-eyes { animation: none !important; } }
.ms-phases { display: flex; gap: 6px; margin: 8px 0 12px; flex-wrap: wrap; }
.ms-phases span { flex: 1; min-width: 90px; text-align: center; padding: 6px 4px; border-radius: 10px; background: var(--ds-hairline); color: var(--ds-ink-2); font-size: 13px; }
.ms-phases span.on { background: #cfe9e5; color: var(--ds-ink); }
.ms-phases span.now { background: var(--ds-teal, #1f8a8a); color: #fff; }
.ms-card { border-top: 1px solid var(--ds-hairline); padding: 10px 0; }
.ms-card h3, .ms-board h3, .ms-h { margin: 0 0 6px; font-size: 20px; }
.ms-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0; }
.ms-chip { border: 1.5px solid var(--ds-hairline); border-radius: 12px; padding: 8px 12px; display: flex; flex-direction: column; min-width: 90px; }
.ms-chip b { font-size: 22px; }
.ms-chip span { font-size: 13px; color: var(--ds-ink-2); }
.ms-sentence { font-size: 26px; line-height: 2; margin: 8px 0; }
.ms-prompt { font-size: 20px; line-height: 1.8; margin: 4px 0 8px; }
.ms-opts, .ms-words { display: flex; flex-wrap: wrap; gap: 10px; margin: 8px 0; }
.ms-opt, .ms-word { min-height: 52px; border-radius: 14px; border: 1.5px solid var(--ds-hairline); background: var(--ds-page); font: inherit; font-size: 20px; color: inherit; cursor: pointer; padding: 8px 16px; }
.ms-opts .ms-opt { flex: 1 1 140px; }
.ms-opt:disabled, .ms-word:disabled { opacity: .6; cursor: default; }
.ms-word.c-fil { background: #fbd5d5; } .ms-word.c-ism { background: #d5e8fb; } .ms-word.c-harf { background: #d5f2d5; }
.ms-tag { display: block; font-size: 13px; color: var(--ds-ink-2); }
.ms-btnrow { display: flex; gap: 8px; flex-wrap: wrap; margin: 8px 0; }
.ms-big { font-size: 56px; text-align: center; margin: 8px 0; }
.ms-badges { display: flex; flex-wrap: wrap; gap: 8px; }
.ms-badge { padding: 6px 12px; border-radius: 16px; border: 1px solid var(--ds-hairline); color: var(--ds-ink-2); font-size: 14px; }
.ms-badge.on { background: #fff2c2; color: var(--ds-ink); border-color: #e0c24a; }
.ms-opt.correct, .ms-word.correct { background: #d5f2d5; border-color: #3a9a5a; opacity: 1 !important; }
.app-nav { display: flex; flex-wrap: wrap; gap: 6px; padding: 8px 0; position: sticky; top: 0; background: var(--ds-page); z-index: 5; border-bottom: 1px solid var(--ds-hairline); }
.app-nav button { flex: 1 0 auto; min-height: 46px; padding: 6px 14px; border-radius: 23px; border: 1.5px solid var(--ds-hairline); background: transparent; font: inherit; color: var(--ds-ink-2); cursor: pointer; white-space: nowrap; transition: background .2s, transform .15s; }
.app-nav button:active { transform: scale(.96); }
.app-nav button.on { background: var(--ds-teal, #1f8a8a); color: #fff; border-color: transparent; }
.app-body { padding: 12px 0; animation: app-in .3s ease; }
@keyframes app-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.today { background: #e7f4f2; border-radius: 18px; padding: 14px 16px; margin: 8px 0 14px; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 10px; margin: 12px 0; }
.stats div { border: 1.5px solid var(--ds-hairline); border-radius: 14px; padding: 10px; text-align: center; display: flex; flex-direction: column; }
.stats b { font-size: 28px; } .stats span { font-size: 13px; color: var(--ds-ink-2); }
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; margin: 12px 0; }
.subj, .badge { text-align: start; font: inherit; color: inherit; border: 1.5px solid var(--ds-hairline); border-radius: 18px; padding: 14px; background: var(--ds-page); display: flex; flex-direction: column; gap: 4px; cursor: pointer; transition: transform .15s; }
.subj:active { transform: scale(.98); }
.subj.off, .badge { cursor: default; } .subj.off { opacity: .6; }
.badge.on { background: #fff2c2; border-color: #e0c24a; }
.ic { width: 44px; height: 44px; border-radius: 50%; background: var(--ds-teal, #1f8a8a); color: #fff; display: grid; place-items: center; font-size: 22px; }
.unit-tabs { display: flex; gap: 6px; flex-wrap: wrap; margin: 6px 0; } .unit-tabs button { font: inherit; color: inherit; border: 0; min-height: 40px; cursor: pointer; padding: 4px 12px; border-radius: 12px; background: var(--ds-hairline); font-size: 13px; } .unit-tabs span { padding: 4px 10px; border-radius: 12px; background: var(--ds-hairline); font-size: 13px; } .unit-tabs button.on, .unit-tabs span.on { background: #cfe9e5; }
.lessons { list-style: none; padding: 0; margin: 8px 0; display: flex; flex-direction: column; gap: 8px; }
.lessons li { border: 1.5px solid var(--ds-hairline); border-radius: 14px; padding: 10px 12px; display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; }
.lessons li.soon { opacity: .6; } .lessons li.live { border-color: var(--ds-teal, #1f8a8a); background: #f1faf8; }
.lessons .kind { display: block; font-size: 12px; color: var(--ds-ink-2); } .lessons .st { font-size: 13px; padding: 3px 10px; border-radius: 12px; background: var(--ds-hairline); }
.tbl { width: 100%; border-collapse: collapse; } .tbl td { padding: 8px 4px; border-bottom: 1px solid var(--ds-hairline); vertical-align: top; }
@media (max-width: 600px) { .ms-teacher { width: 90px; height: 100px; } .ms-sentence { font-size: 22px; } }
.hero { display: flex; justify-content: space-between; align-items: center; gap: 12px; background: linear-gradient(135deg, #1d2b4f 0%, #27507a 60%, #2bb39a 130%); color: #fff; border-radius: 22px; padding: 14px 20px; margin: 4px 0 10px; overflow: hidden; }
.hero h1 { margin: 2px 0; font-size: 34px; color: #fff; } .hero small, .hero span { color: #ffe3a3; font-size: 14px; }
.hero .ms-teacher { width: 120px; height: 120px; flex: none; } .hero.small { padding: 10px 18px; } .hero.small h1 { font-size: 22px; }
.app-nav a { flex: 1 0 auto; min-height: 46px; padding: 6px 14px; border-radius: 23px; border: 1.5px solid var(--ds-hairline); color: var(--ds-ink-2); text-decoration: none; display: inline-flex; align-items: center; justify-content: center; white-space: nowrap; transition: background .2s, transform .15s; }
.app-nav a.on { background: #1d2b4f; color: #fff; border-color: transparent; } .app-nav a:active { transform: scale(.96); }
.warn { background: #fff3d6; border: 1.5px solid #f5a623; border-radius: 14px; padding: 10px 14px; margin: 8px 0; line-height: 1.8; font-size: 15px; }
.speech { background: #fff; border: 2px solid #f5a623; border-radius: 18px; padding: 12px 16px; margin: 6px 0 12px; line-height: 1.9; font-size: 18px; }
.mission { background: #eef4ff; border-radius: 20px; padding: 16px 18px; margin: 10px 0; border: 1.5px solid #cfdcf5; } .mission h2 { margin: 6px 0; font-size: 24px; } .soonbox { background: #f4f1ec; border-color: var(--ds-hairline); }
.tag { display: inline-block; background: #f5a623; color: #1d2b4f; font-size: 13px; font-weight: 600; border-radius: 10px; padding: 2px 10px; }
.h { font-size: 24px; margin: 10px 0; } .h2 { font-size: 19px; margin: 16px 0 6px; }
.prog { margin: 12px 0; } .prog-h { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 6px; font-size: 15px; } .bar { height: 12px; border-radius: 6px; background: var(--ds-hairline); overflow: hidden; margin-top: 6px; } .bar i { display: block; height: 100%; min-width: 4px; background: linear-gradient(90deg, #2bb39a, #f5a623); transition: width .6s; }
a.subj { text-decoration: none; } .subj.big { grid-column: 1 / -1; } .subj .soon { background: var(--ds-hairline); border-radius: 10px; padding: 0 8px; align-self: flex-start; font-size: 13px; }
.ic { background: #1d2b4f; } .badge.on { background: #fff2c2; }
.unitlist { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; } .unitrow { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 12px 14px; border-radius: 14px; background: #eef4ff; color: inherit; text-decoration: none; min-height: 52px; } .unitrow small { display: block; color: var(--ds-ink-2); } .chev { font-size: 24px; }
.back { display: inline-block; padding: 10px 0; color: #27507a; text-decoration: none; min-height: 44px; }
.unit-tabs a { padding: 8px 14px; border-radius: 14px; background: var(--ds-hairline); color: inherit; text-decoration: none; font-size: 14px; display: inline-flex; min-height: 40px; align-items: center; } .unit-tabs a.on { background: #1d2b4f; color: #fff; }
.lessons li a { color: inherit; text-decoration: none; display: block; flex: 1; min-height: 44px; } .lessons li small { color: var(--ds-ink-2); } .lessons .st.go { background: #2bb39a; color: #fff; }
.lessons li.live { border-color: #2bb39a; background: #effaf7; }
.parts { padding-inline-start: 18px; line-height: 1.9; } .parts li b { display: block; }
@media (max-width: 600px) { .hero h1 { font-size: 26px; } .hero .ms-teacher { width: 84px; height: 84px; } .speech { font-size: 16px; } }
.hero { padding: 8px 18px; margin: 0 0 8px; } .hero h1 { font-size: 28px; } .hero .ms-teacher { width: 84px; height: 84px; }
.app-nav { padding: 6px 0; } .app-nav a { min-height: 44px; }
.warn { padding: 6px 12px; margin: 6px 0; font-size: 14px; line-height: 1.6; }
@media (max-width: 600px) { .hero h1 { font-size: 22px; } .hero .ms-teacher { width: 64px; height: 64px; } }

.app-nav { background: rgba(255,248,236,.92); backdrop-filter: blur(6px); }
.app-nav a.on { background: #1d2b4f; }
.hero { background: linear-gradient(135deg, #1d2b4f 0%, #2a5a9a 55%, #1fa38a 120%); box-shadow: 0 6px 0 #101a33; position: relative; }
.hero::after { content: '★ ✦ ★'; position: absolute; top: 8px; left: 16px; color: #ffd36b; opacity: .6; letter-spacing: 8px; font-size: 14px; }
.mission { background: #fff; border: 2px solid #cfdcf5; box-shadow: 0 5px 0 #cfdcf5; }
.today, .stats div, .subj, .badge, .lessons li { background: #fff; }
.stats div { border: 2px solid #eadfcb; box-shadow: 0 4px 0 #eadfcb; }
.stats div:nth-child(1) b { color: #f59f00; } .stats div:nth-child(2) b { color: #1fa38a; } .stats div:nth-child(3) b { color: #4c6ef5; } .stats div:nth-child(4) b { color: #e8590c; }
.subj { border: 2px solid #eadfcb; box-shadow: 0 5px 0 #eadfcb; }
.ms-opt, .ms-word { border: 2px solid #cfd8ec; background: #fff; box-shadow: 0 4px 0 #cfd8ec; min-height: 56px; font-weight: 700; }
.ms-opt:active, .ms-word:active { transform: translateY(3px); box-shadow: 0 1px 0 #cfd8ec; }
.ms-bubble { border: 2px solid #ffb703; background: #fff; }
.field.sel, .field.ta { width: 100%; font: inherit; padding: 12px; border-radius: 14px; border: 2px solid #cfd8ec; background: #fff; color: #1d2b4f; }
.field.ta { min-height: 104px; resize: vertical; line-height: 1.9; }
.diagcard { border-color: #ffd36b !important; box-shadow: 0 5px 0 #ffd36b !important; }
.parts li b { display: block; margin-bottom: 3px; }
.stats div b { font-size: 30px; line-height: 1.1; }
