:root {
  --bg1: #1e1b4b;
  --bg2: #4c1d95;
  --card: rgba(255,255,255,0.96);
  --ink: #241b33;
  --muted: #6b6178;
  --blue: #3b82f6;
  --red: #ef4444;
  --pink: #ec4899;
  --amber: #f59e0b;
  --green: #10b981;
}

* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
html { -webkit-text-size-adjust: 100%; }

body {
  font-family: "Tajawal", "Segoe UI", Tahoma, Arial, sans-serif;
  color: var(--ink);
  min-height: 100vh;
  background: linear-gradient(160deg, var(--bg1), var(--bg2) 60%, #7e22ce);
  background-attachment: fixed;
  padding-bottom: 96px;
  overflow-x: hidden;
}

/* floating bg emojis */
body::before {
  content: "🥐 🗼 🎈 🥖 🎨";
  position: fixed; inset: 0; z-index: 0;
  font-size: 44px; opacity: 0.07; letter-spacing: 60px; line-height: 3.4;
  pointer-events: none;
  animation: drift 26s linear infinite alternate;
}
@keyframes drift { from { transform: translateY(0) } to { transform: translateY(-60px) } }

.view { display: none; position: relative; z-index: 1; max-width: 640px; margin: 0 auto; padding: 20px 16px 8px; }
.view.active { display: block; animation: viewIn 0.35s ease; }
@keyframes viewIn { from { opacity: 0; transform: translateY(14px) } to { opacity: 1; transform: none } }

/* ── home hero ── */
.hero { text-align: center; padding-top: 26px; }
.flags { font-size: 30px; animation: wave 2.2s ease-in-out infinite; }
@keyframes wave { 0%,100% { transform: scale(1) } 50% { transform: scale(1.18) rotate(4deg) } }
.hero h1 {
  font-size: 52px; font-weight: 900; color: #fff; letter-spacing: 1px;
  text-shadow: 0 4px 0 rgba(0,0,0,0.18);
  margin-top: 6px;
}
.hero h1 span { color: var(--amber); display: inline-block; animation: bounce 1.4s ease infinite; }
@keyframes bounce { 0%,100% { transform: translateY(0) } 40% { transform: translateY(-10px) } }
.tag { color: rgba(255,255,255,0.85); margin-top: 6px; font-size: 16.5px; }
.hero-img {
  width: 100%; border-radius: 24px; margin: 18px 0 4px;
  border: 3px solid rgba(255,255,255,0.35);
  box-shadow: 0 20px 44px -16px rgba(0,0,0,0.5);
}
.hero-btns { display: grid; gap: 12px; margin-top: 18px; }

.big-btn {
  border: 0; border-radius: 20px; padding: 17px 18px;
  font-family: inherit; font-size: 19px; font-weight: 800; color: #fff;
  cursor: pointer; box-shadow: 0 8px 0 rgba(0,0,0,0.22), 0 16px 30px -12px rgba(0,0,0,0.45);
  transition: transform 0.08s ease, box-shadow 0.08s ease;
}
.big-btn:active { transform: translateY(6px); box-shadow: 0 2px 0 rgba(0,0,0,0.22); }
.b1 { background: linear-gradient(135deg, #3b82f6, #60a5fa); }
.b2 { background: linear-gradient(135deg, #ec4899, #f472b6); }
.b3 { background: linear-gradient(135deg, #f59e0b, #fbbf24); }

.best { color: rgba(255,255,255,0.8); margin-top: 16px; font-weight: 700; }
.disclaimer { color: rgba(255,255,255,0.55); font-size: 13px; text-align: center; margin-top: 22px; }

/* ── view titles ── */
.view-title { color: #fff; font-size: 26px; font-weight: 900; }
.view-sub { color: rgba(255,255,255,0.75); font-size: 15px; margin: 6px 0 16px; }

/* ── lesson sections ── */
.lesson-sec {
  background: var(--card); border-radius: 22px; margin-bottom: 14px;
  overflow: hidden; box-shadow: 0 14px 30px -16px rgba(0,0,0,0.45);
}
.lesson-sec > button.sec-head {
  width: 100%; border: 0; background: transparent; cursor: pointer;
  display: flex; align-items: center; gap: 12px; padding: 16px;
  font-family: inherit; text-align: start;
}
.sec-head .ico {
  width: 48px; height: 48px; border-radius: 15px; font-size: 24px;
  display: flex; align-items: center; justify-content: center; color: #fff; flex-shrink: 0;
}
.sec-head b { font-size: 18px; }
.sec-head small { display: block; color: var(--muted); font-weight: 400; font-size: 13px; }
.sec-head .chev { margin-inline-start: auto; transition: transform 0.25s; color: var(--muted); font-size: 18px; }
.lesson-sec.open .chev { transform: rotate(180deg); }
.sec-body { display: none; padding: 4px 14px 16px; }
.lesson-sec.open .sec-body { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; animation: viewIn 0.3s ease; }

button.w {
  border: 1.5px solid #e7e1f2; background: #fff; border-radius: 14px;
  padding: 10px 12px; font-family: inherit; cursor: pointer; text-align: start;
  font-size: 17px; font-weight: 800; color: var(--ink);
  display: flex; flex-direction: column; gap: 2px;
  transition: transform 0.1s, border-color 0.1s, background 0.1s;
}
button.w span { font-size: 13px; font-weight: 400; color: var(--muted); }
button.w:active, button.w.playing { transform: scale(0.95); border-color: var(--blue); background: #eff6ff; }
button.w .dot { display: inline-block; width: 14px; height: 14px; border-radius: 50%; }

/* grammar */
.card { background: var(--card); border-radius: 22px; padding: 18px; margin-bottom: 14px; box-shadow: 0 14px 30px -16px rgba(0,0,0,0.45); }
.grammar h3 { font-size: 18px; }
.g-sub { color: var(--muted); font-size: 14px; margin: 4px 0 12px; }
.conj { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.conj h4 { color: var(--blue); margin-bottom: 8px; font-size: 16px; }
.conj > div { display: grid; gap: 7px; align-content: start; }
.conj button.w { font-size: 15.5px; }
.soon { color: var(--muted); font-size: 14.5px; }

/* ── flashcards ── */
.fc-stage { perspective: 1000px; margin: 8px 0 16px; }
.flashcard {
  position: relative; width: 100%; height: 300px; cursor: pointer;
  transform-style: preserve-3d; transition: transform 0.55s cubic-bezier(0.2, 0.9, 0.3, 1.2);
}
.flashcard.flipped { transform: rotateY(180deg); }
.fc-face {
  position: absolute; inset: 0; border-radius: 26px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px;
  backface-visibility: hidden; -webkit-backface-visibility: hidden;
  box-shadow: 0 18px 38px -14px rgba(0,0,0,0.5);
}
.fc-front { background: linear-gradient(150deg, #ffffff, #eef2ff); }
.fc-back { background: linear-gradient(150deg, #3b82f6, #8b5cf6); color: #fff; transform: rotateY(180deg); }
.fc-emoji { font-size: 56px; }
.fc-fr { font-size: 34px; font-weight: 900; color: var(--ink); direction: ltr; }
.fc-hint { color: var(--muted); font-size: 13.5px; }
.fc-ar { font-size: 30px; font-weight: 800; padding: 0 16px; text-align: center; }
.fc-controls { display: flex; gap: 8px; }
.ctl {
  flex: 1; border: 0; border-radius: 15px; padding: 12px 6px;
  font-family: inherit; font-weight: 800; font-size: 15px; cursor: pointer;
  background: rgba(255,255,255,0.16); color: #fff;
  border: 1px solid rgba(255,255,255,0.3);
  transition: transform 0.1s, background 0.15s;
}
.ctl:active { transform: scale(0.94); }
.ctl.shuffle { background: linear-gradient(135deg, #ec4899, #a855f7); border: 0; }
.fc-count { text-align: center; color: rgba(255,255,255,0.75); margin-top: 12px; font-weight: 700; }

/* ── quiz ── */
#quiz-box { text-align: center; }
.q-progress { display: flex; gap: 5px; justify-content: center; margin-bottom: 16px; }
.q-progress i { width: 26px; height: 8px; border-radius: 6px; background: rgba(255,255,255,0.25); }
.q-progress i.done { background: var(--green); }
.q-progress i.bad { background: var(--red); }
.q-card {
  background: var(--card); border-radius: 24px; padding: 26px 18px;
  box-shadow: 0 18px 38px -14px rgba(0,0,0,0.5);
}
.q-word { font-size: 36px; font-weight: 900; direction: ltr; }
.q-say { margin-top: 8px; border: 0; background: #eff6ff; color: var(--blue); border-radius: 30px; padding: 8px 18px; font-family: inherit; font-weight: 800; font-size: 15px; cursor: pointer; }
.q-ask { color: var(--muted); margin-top: 8px; font-size: 14.5px; }
.q-opts { display: grid; gap: 10px; margin-top: 18px; }
.q-opt {
  border: 2px solid #e7e1f2; background: #fff; border-radius: 16px;
  padding: 14px; font-family: inherit; font-size: 17.5px; font-weight: 800; cursor: pointer;
  transition: transform 0.1s;
}
.q-opt:active { transform: scale(0.96); }
.q-opt.right { border-color: var(--green); background: #d1fae5; animation: pop 0.35s ease; }
.q-opt.wrong { border-color: var(--red); background: #fee2e2; animation: shake 0.4s ease; }
@keyframes pop { 0% { transform: scale(1) } 50% { transform: scale(1.06) } 100% { transform: scale(1) } }
@keyframes shake { 0%,100% { transform: translateX(0) } 25% { transform: translateX(-7px) } 75% { transform: translateX(7px) } }
.q-result { color: #fff; }
.q-result .score { font-size: 64px; font-weight: 900; color: var(--amber); text-shadow: 0 4px 0 rgba(0,0,0,0.2); }
.q-result p { color: rgba(255,255,255,0.85); margin: 8px 0 18px; }

/* confetti */
#confetti { position: fixed; inset: 0; pointer-events: none; z-index: 50; }
#confetti i {
  position: absolute; top: -20px; font-size: 22px; font-style: normal;
  animation: fall linear forwards;
}
@keyframes fall { to { transform: translateY(110vh) rotate(720deg); opacity: 0.4; } }

/* ── tab bar ── */
.tabbar {
  position: fixed; bottom: 12px; inset-inline: 12px; z-index: 40;
  max-width: 616px; margin: 0 auto;
  display: flex; gap: 6px;
  background: rgba(30, 27, 75, 0.85); backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: 22px; padding: 8px;
}
.tab {
  flex: 1; border: 0; background: transparent; color: rgba(255,255,255,0.65);
  font-family: inherit; font-size: 13px; font-weight: 800; cursor: pointer;
  border-radius: 15px; padding: 8px 2px;
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  transition: background 0.15s, color 0.15s;
}
.tab span { font-size: 20px; }
.tab.active { background: linear-gradient(135deg, #3b82f6, #8b5cf6); color: #fff; }

/* ── v3: منهج + امتحانات ── */
.b4 { background: linear-gradient(135deg, #10b981, #34d399); }
.sec-body { display: none; }
.lesson-sec.open .sec-body { display: block; grid-template-columns: none; }
.lesson-block { margin-bottom: 6px; }
.lesson-block + .lesson-block { border-top: 2px dashed #ece5f7; padding-top: 10px; margin-top: 10px; }
.lesson-t { font-size: 16.5px; margin: 8px 0 10px; }
.lesson-t small { display: block; color: var(--muted); font-weight: 400; font-size: 12.5px; direction: ltr; text-align: start; }
.w-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.grammar-in { background: #f6f2ff; border: 1.5px solid #e7ddf8; border-radius: 16px; padding: 12px; margin-top: 12px; }
.grammar-in h5 { font-size: 15px; margin-bottom: 2px; }
.grammar-in p { color: var(--muted); font-size: 13px; margin-bottom: 10px; }
.grammar-in .w-grid { grid-template-columns: 1fr; }
.exam-card h3 { font-size: 18px; }
.exam-src { color: var(--muted); font-size: 12.5px; margin: 2px 0 12px; }
.exam-best { color: var(--green); font-weight: 800; font-size: 14px; margin-top: 8px; }

/* ── فيديوهات شرح الوحدات ── */
.video-card { background: linear-gradient(135deg, #fff5f5, #fdf2f8); border: 1.5px solid #fecdd3; border-radius: 18px; padding: 12px; margin-bottom: 14px; }
.video-t { font-weight: 800; font-size: 14.5px; margin-bottom: 10px; }
.video-wrap { position: relative; border-radius: 14px; overflow: hidden; aspect-ratio: 16 / 9; background: #0f172a; }
.video-wrap iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.video-facade { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; padding: 0; cursor: pointer; background: none; }
.video-facade img { width: 100%; height: 100%; object-fit: cover; display: block; }
.video-play { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: 62px; height: 62px; border-radius: 50%; background: #ef4444; color: #fff; display: flex; align-items: center; justify-content: center; font-size: 22px; box-shadow: 0 8px 24px rgba(0,0,0,.35); }
.video-facade:hover .video-play { transform: translate(-50%, -50%) scale(1.08); }
.video-c { color: var(--muted); font-size: 12.5px; margin-top: 8px; }

/* ── v5: جرامر مفصل + ملء الشاشة ── */
.grammar-d { margin-top: 10px; background: #fff; border: 1.5px dashed #d9ccf0; border-radius: 14px; padding: 10px 12px; }
.grammar-d h6 { font-size: 13.5px; margin-bottom: 6px; color: #7c3aed; }
.grammar-d p { font-size: 13.5px; line-height: 1.85; margin-bottom: 8px; color: #3f3d56; }
.grammar-d p:last-child { margin-bottom: 0; }
.video-fs { background: linear-gradient(135deg, #ef4444, #f97316); color: #fff; border: 0; border-radius: 999px; padding: 5px 12px; font-size: 12px; font-weight: 800; font-family: inherit; cursor: pointer; margin-inline-start: 8px; }
.video-wrap:fullscreen { border-radius: 0; }
.video-wrap:fullscreen iframe { width: 100%; height: 100%; }

/* ── v6: PWA + بدائل الفيديو ── */
.video-actions { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.video-actions .video-fs { margin-inline-start: 0; }
.video-yt { background: #0f172a; color: #fff; border-radius: 999px; padding: 5px 14px; font-size: 12px; font-weight: 800; text-decoration: none; display: inline-flex; align-items: center; }
.video-note { color: #b45309; background: #fef3c7; border-radius: 10px; font-size: 11.5px; padding: 6px 10px; margin-top: 8px; line-height: 1.6; }

/* ═══ كريدت المطور ═══ */
.dev-credit { margin: 26px auto 8px; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 4px; animation: viewIn .6s ease both; }
.dev-label { font-size: 12px; font-weight: 800; letter-spacing: 1px; color: #c4b5fd; opacity: .9; }
.dev-name {
  font-family: 'Tajawal', sans-serif;
  font-size: 30px; font-weight: 900; letter-spacing: .5px;
  background: linear-gradient(90deg, #3b82f6, #8b5cf6, #ec4899, #f59e0b, #10b981, #3b82f6);
  background-size: 300% 100%;
  -webkit-background-clip: text; background-clip: text; color: transparent;
  animation: devShine 6s linear infinite, devFloat 3.5s ease-in-out infinite;
  filter: drop-shadow(0 2px 10px rgba(139, 92, 246, .45));
}
@keyframes devShine { to { background-position: 300% 0; } }
@keyframes devFloat { 0%,100% { transform: translateY(0) } 50% { transform: translateY(-4px) } }

/* ═══ v8: كلمة اليوم + السلسلة + النقاط + اختبار الدرس ═══ */
.hero-stats { display: flex; gap: 8px; justify-content: center; margin-top: 10px; flex-wrap: wrap; }
.stat-chip { font-size: 12px; font-weight: 800; padding: 6px 14px; border-radius: 999px; color: #fff; }
.stat-chip.fire { background: linear-gradient(135deg, #ef4444, #f97316); box-shadow: 0 4px 14px rgba(249, 115, 22, .4); }
.stat-chip.star { background: linear-gradient(135deg, #8b5cf6, #6366f1); box-shadow: 0 4px 14px rgba(139, 92, 246, .4); }

.wotd { margin: 18px auto 0; background: linear-gradient(135deg, #fffbeb, #fef3c7); border: 1.5px solid #fcd34d; border-radius: 20px; padding: 14px 16px; text-align: center; box-shadow: 0 6px 20px rgba(245, 158, 11, .18); animation: viewIn .5s ease both; }
.wotd-label { font-size: 12px; font-weight: 800; color: #b45309; margin: 0 0 6px; }
.wotd-body { display: flex; align-items: center; justify-content: center; gap: 10px; }
.wotd-emoji { font-size: 26px; }
.wotd-fr { font-size: 24px; font-weight: 900; color: #78350f; }
.wotd-say { border: 0; background: linear-gradient(135deg, #3b82f6, #60a5fa); color: #fff; font-size: 16px; width: 38px; height: 38px; border-radius: 50%; cursor: pointer; box-shadow: 0 4px 10px rgba(59, 130, 246, .4); }
.wotd-say.playing { animation: wave .6s ease infinite; }
.wotd-ar { margin: 6px 0 0; font-size: 15px; font-weight: 700; color: #92400e; }

.lesson-quiz-btn { display: block; width: 100%; margin-top: 10px; border: 0; border-radius: 14px; padding: 10px; font-family: inherit; font-size: 14px; font-weight: 800; color: #fff; cursor: pointer; background: linear-gradient(135deg, #f59e0b, #ec4899); box-shadow: 0 5px 16px rgba(236, 72, 153, .3); transition: transform .15s; }
.lesson-quiz-btn:active { transform: scale(.97); }
.lesson-quiz-btn small { display: block; font-size: 11px; font-weight: 700; opacity: .85; }

/* ═══ v9: تصريف + إملاء ═══ */
.dict-card { text-align: center; }
.dict-hint { font-size: 14px; font-weight: 800; color: #6d28d9; }
.dict-inp { width: 100%; margin: 12px 0; padding: 12px 14px; font-size: 18px; font-family: inherit; border: 2px solid #c4b5fd; border-radius: 14px; outline: none; }
.dict-inp:focus { border-color: #8b5cf6; box-shadow: 0 0 0 4px rgba(139, 92, 246, .15); }
.dict-ar { font-size: 13px; color: #7c3aed; font-weight: 700; }
.dict-fb { font-size: 16px; font-weight: 800; margin-top: 12px; }
.dict-fb.ok { color: #059669; }
.dict-fb.no { color: #dc2626; }
.dict-play.playing { animation: wave .6s ease infinite; }
#quiz-box .big-btn { width: 100%; margin-bottom: 10px; }

/* ═══ v10: امتحان بوقت ═══ */
.q-timer { display: inline-block; margin: 8px 0; padding: 6px 16px; border-radius: 999px; background: linear-gradient(135deg, #0ea5e9, #38bdf8); color: #fff; font-weight: 900; font-size: 15px; }
.q-timer.low { background: linear-gradient(135deg, #ef4444, #f97316); animation: pop 1s ease infinite; }
.b5 { background: linear-gradient(135deg, #ef4444, #fb7185); }

/* ═══ v11: ثيم ملصق فرنسا (كحلي + علم + كريمي + لافندر + سماوي) ═══ */
:root {
  --bg1: #101c33;
  --bg2: #1e3157;
  --ink: #1f2433;
  --muted: #5d6478;
  --blue: #0055A4;
  --red: #d8362c;
  --lav: #8f7cc4;
  --sky: #6fa3d8;
  --cream: #f6efe3;
}
body { background: linear-gradient(160deg, #101c33, #1e3157 55%, #3a4f86); background-attachment: fixed; }
.hero h1 { color: var(--cream); }
.hero h1 span { color: var(--red); }
.hero-img { border-color: rgba(246,239,227,0.5); }
.b1 { background: linear-gradient(135deg, #0055A4, #3d7bd6); }
.b2 { background: linear-gradient(135deg, #d8362c, #f2604d); }
.b3 { background: linear-gradient(135deg, #7e6ab8, #b3a4d9); }
.b4 { background: linear-gradient(135deg, #4a86c2, #8fc0e8); }
.b5 { background: linear-gradient(135deg, #b02a22, #f2604d); }
.tab.active { background: linear-gradient(135deg, #0055A4, #8f7cc4); }
.fc-back { background: linear-gradient(150deg, #0055A4, #8f7cc4); }
.ctl.shuffle { background: linear-gradient(135deg, #7e6ab8, #b3a4d9); }
.stat-chip.star { background: linear-gradient(135deg, #7e6ab8, #a793d6); box-shadow: 0 4px 14px rgba(143, 124, 196, .4); }
.lesson-quiz-btn { background: linear-gradient(135deg, #d8362c, #8f7cc4); box-shadow: 0 5px 16px rgba(216, 54, 44, .3); }
.wotd { background: linear-gradient(135deg, #faf5ea, #f3e9d2); border-color: #e3d3b0; box-shadow: 0 6px 20px rgba(16, 28, 51, .25); }
.wotd-label { color: #8a6d3b; }
.wotd-fr { color: #1e3157; }
.wotd-ar { color: #6b5732; }
.wotd-say { background: linear-gradient(135deg, #0055A4, #3d7bd6); }
.dev-name {
  background: linear-gradient(90deg, #6fa3d8, #8f7cc4, #f2604d, #f6efe3, #3d7bd6, #6fa3d8);
  background-size: 300% 100%;
  -webkit-background-clip: text; background-clip: text;
}
.dict-hint { color: #1e3157; }
.dict-inp { border-color: #b3a4d9; }
.dict-inp:focus { border-color: #8f7cc4; box-shadow: 0 0 0 4px rgba(143, 124, 196, .18); }
.dict-ar { color: #4c5b86; }
.q-timer { background: linear-gradient(135deg, #4a86c2, #8fc0e8); }
.q-timer.low { background: linear-gradient(135deg, #d8362c, #f2604d); }
.exam-card { border-color: #dfe6f2; }

/* ═══════ v12: جرامر ═══════ */
.view-sub { color: #c7cfef; font-size: 14px; margin: -8px 0 16px; line-height: 1.8; }
.g-unit { margin-bottom: 22px; }
.g-unit-t { color: #f4ecd8; font-size: 19px; margin: 18px 0 12px; display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.g-unit-t small { color: #9fb0e8; font-size: 13px; font-weight: 400; }
.g-card { background: linear-gradient(160deg, #1c2b52, #16224a); border: 1px solid #2c3f75; border-radius: 18px; padding: 16px; margin-bottom: 12px; box-shadow: 0 6px 18px rgba(0,0,0,.3); }
.g-card-h h4 { color: #ffd9a0; font-size: 17px; margin: 0 0 6px; }
.g-card-h p { color: #c7cfef; font-size: 13.5px; margin: 0; line-height: 1.7; }
.g-card-b { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 12px; flex-wrap: wrap; }
.g-play-btn { background: linear-gradient(135deg, #e63946, #c1121f); color: #fff; border: none; border-radius: 999px; padding: 10px 18px; font-size: 14.5px; font-weight: 700; cursor: pointer; box-shadow: 0 4px 14px rgba(230,57,70,.45); font-family: inherit; }
.g-play-btn:active { transform: scale(.96); }
.g-steps-n { color: #8fa0d8; font-size: 12px; }

/* المشغّل */
#gplay { position: fixed; inset: 0; z-index: 400; background: linear-gradient(180deg, #0d1830, #101c33 40%, #182a52); display: none; flex-direction: column; direction: rtl; }
#gplay.open { display: flex; }
.gp-head { display: flex; align-items: center; gap: 12px; padding: 14px 16px 6px; }
.gp-x { background: #ffffff22; color: #fff; border: none; width: 38px; height: 38px; border-radius: 50%; font-size: 17px; cursor: pointer; flex-shrink: 0; }
.gp-title { color: #ffd9a0; font-size: 16px; font-weight: 700; line-height: 1.5; }
.gp-bar { height: 6px; background: #ffffff1c; border-radius: 99px; margin: 8px 16px 4px; overflow: hidden; }
.gp-bar-in { height: 100%; width: 0; background: linear-gradient(90deg, #4d7cfe, #7aa8ff, #e63946); border-radius: 99px; transition: width .45s ease; }
.gp-stage { flex: 1; overflow-y: auto; padding: 18px 18px 10px; display: flex; flex-direction: column; gap: 14px; }
.gp-step-n { color: #8fa0d8; font-size: 13px; text-align: center; }
.gp-ar { background: #f7f1e3; color: #1b2547; border-radius: 20px; padding: 20px; font-size: 19px; line-height: 2; font-weight: 600; box-shadow: 0 10px 30px rgba(0,0,0,.35); }
.gp-fr-box { display: flex; flex-direction: column; gap: 10px; }
.gp-chip { background: #22335f; border: 1px solid #3a4f8c; border-radius: 16px; padding: 12px 14px; display: flex; align-items: center; gap: 12px; }
.gp-say { background: linear-gradient(135deg, #4d7cfe, #3155c9); border: none; color: #fff; width: 42px; height: 42px; border-radius: 50%; font-size: 18px; cursor: pointer; flex-shrink: 0; }
.gp-say.playing { animation: gpPulse 1s infinite; }
@keyframes gpPulse { 0%,100% { box-shadow: 0 0 0 0 rgba(122,168,255,.7); } 50% { box-shadow: 0 0 0 10px rgba(122,168,255,0); } }
.gp-chip-t { display: flex; flex-direction: column; gap: 3px; }
.gp-chip-t b { color: #bcd0ff; font-size: 16.5px; direction: ltr; text-align: right; }
.gp-chip-t span { color: #9fb0e8; font-size: 13px; }
.gp-hear { background: #6a5fb8; color: #fff; border: none; border-radius: 999px; padding: 11px; font-size: 14.5px; font-weight: 700; cursor: pointer; font-family: inherit; margin-top: 2px; }
.gp-in { animation: gpIn .5s ease both; }
@keyframes gpIn { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
.gp-ctrl { display: flex; gap: 8px; padding: 10px 14px 6px; }
.gp-btn { flex: 1; border: none; border-radius: 14px; padding: 13px 6px; font-size: 14px; font-weight: 700; cursor: pointer; font-family: inherit; background: #2a3c6e; color: #dfe7ff; }
.gp-btn:active { transform: scale(.96); }
.gp-auto { background: linear-gradient(135deg, #e63946, #c1121f); color: #fff; }
.gp-hint { color: #7c8dc8; font-size: 11.5px; text-align: center; margin: 4px 14px 14px; line-height: 1.7; }

/* ═══════ v13: مساعد المنهج ═══════ */
.assist { background: linear-gradient(160deg, #1c2b52, #141f42); border: 1px solid #2c3f75; border-radius: 22px; padding: 20px 16px; margin: 18px 0; box-shadow: 0 8px 24px rgba(0,0,0,.35); }
.assist h3 { color: #ffd9a0; font-size: 20px; margin: 0 0 6px; }
.assist-sub { color: #c7cfef; font-size: 13px; line-height: 1.8; margin: 0 0 14px; }
.assist-row { display: flex; gap: 8px; }
#assist-q { flex: 1; background: #0e1834; border: 1px solid #3a4f8c; border-radius: 14px; padding: 13px 14px; color: #eef2ff; font-size: 15px; font-family: inherit; }
#assist-q::placeholder { color: #6f80bd; font-size: 13px; }
#assist-q:focus { outline: 2px solid #4d7cfe; }
#assist-go { background: linear-gradient(135deg, #4d7cfe, #3155c9); color: #fff; border: none; border-radius: 14px; padding: 0 20px; font-size: 15px; font-weight: 700; cursor: pointer; font-family: inherit; }
#assist-go:active { transform: scale(.95); }
.assist-chips { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 10px; }
.assist-chip { background: #22335f; color: #bcd0ff; border: 1px solid #3a4f8c; border-radius: 999px; padding: 6px 12px; font-size: 12px; cursor: pointer; font-family: inherit; }
.assist-chip:active { transform: scale(.95); }
#assist-out { margin-top: 4px; }
.a-head { color: #9fe8b1; font-size: 13.5px; font-weight: 700; margin: 12px 0 8px; }
.a-hit { background: #0e1834; border: 1px solid #2c3f75; border-radius: 14px; padding: 12px 14px; margin-bottom: 8px; animation: gpIn .4s ease both; }
.a-hit-t { display: flex; flex-direction: column; gap: 3px; }
.a-hit-t b { color: #bcd0ff; font-size: 16px; }
.a-rule .a-hit-t b { color: #ffd9a0; }
.a-hit-t span { color: #c7cfef; font-size: 13.5px; line-height: 1.7; }
.a-det { color: #f4ecd8; font-size: 13px; line-height: 1.8; margin: 8px 0 0; border-top: 1px dashed #2c3f75; padding-top: 8px; }
.a-hit-btns { display: flex; gap: 6px; margin-top: 10px; flex-wrap: wrap; }
.a-mini { background: #2a3c6e; color: #dfe7ff; border: none; border-radius: 999px; padding: 7px 13px; font-size: 12.5px; font-weight: 700; cursor: pointer; font-family: inherit; }
.a-mini.playing { animation: gpPulse 1s infinite; }
.a-mini-red { background: linear-gradient(135deg, #e63946, #c1121f); color: #fff; }
.a-mini:active { transform: scale(.94); }
.a-none { color: #f0b8be; font-size: 13.5px; line-height: 1.9; background: #2a1a2e; border: 1px solid #5c2e42; border-radius: 14px; padding: 14px; margin-top: 12px; }
.ami-btn { display: flex; flex-direction: column; gap: 3px; background: linear-gradient(135deg, #25d366, #128c5e); color: #fff; text-decoration: none; border-radius: 16px; padding: 13px 16px; margin-top: 14px; box-shadow: 0 6px 16px rgba(37,211,102,.35); }
.ami-btn b { font-size: 16px; }
.ami-btn small { font-size: 11.5px; opacity: .9; line-height: 1.6; }
.ami-btn:active { transform: scale(.97); }

/* ═══════ v14: حساب الطالب ═══════ */
.acct { background: linear-gradient(160deg, #1c2b52, #141f42); border: 1px solid #2c3f75; border-radius: 22px; padding: 18px 16px; margin: 18px 0 0; box-shadow: 0 8px 24px rgba(0,0,0,.35); }
.acct h3 { color: #ffd9a0; font-size: 19px; margin: 0 0 6px; }
.acct-sub { color: #c7cfef; font-size: 13px; line-height: 1.8; margin: 0 0 12px; }
.acct-tabs { display: flex; gap: 8px; margin-bottom: 10px; }
.acct-tab { flex: 1; background: #0e1834; color: #9fb0e8; border: 1px solid #2c3f75; border-radius: 12px; padding: 9px; font-size: 14px; font-weight: 700; cursor: pointer; font-family: inherit; }
.acct-tab.on { background: linear-gradient(135deg, #4d7cfe, #3155c9); color: #fff; border-color: #4d7cfe; }
.acct input { display: block; width: 100%; box-sizing: border-box; background: #0e1834; border: 1px solid #3a4f8c; border-radius: 12px; padding: 12px 14px; color: #eef2ff; font-size: 14.5px; font-family: inherit; margin-bottom: 8px; }
.acct input::placeholder { color: #6f80bd; font-size: 12.5px; }
.acct input:focus { outline: 2px solid #4d7cfe; }
.acct-main { width: 100%; background: linear-gradient(135deg, #e63946, #c1121f); color: #fff; border: none; border-radius: 14px; padding: 13px; font-size: 15.5px; font-weight: 800; cursor: pointer; font-family: inherit; box-shadow: 0 4px 14px rgba(230,57,70,.4); }
.acct-main:disabled { opacity: .6; }
.acct-main:active { transform: scale(.97); }
.acct-status { color: #9fe8b1; font-size: 13px; line-height: 1.7; margin: 8px 0 0; min-height: 0; }
.acct-status:empty { display: none; }
.acct-in { display: flex; align-items: center; gap: 12px; }
.acct-ava { width: 52px; height: 52px; border-radius: 50%; background: linear-gradient(135deg, #e63946, #7aa8ff); color: #fff; font-size: 24px; font-weight: 900; display: flex; align-items: center; justify-content: center; flex-shrink: 0; box-shadow: 0 4px 12px rgba(0,0,0,.4); }
.acct-info { flex: 1; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.acct-info b { color: #f4ecd8; font-size: 16.5px; }
.acct-info span { color: #8fa0d8; font-size: 12px; direction: ltr; text-align: right; }
.acct-info small { color: #9fe8b1; font-size: 12px; margin-top: 2px; }
.acct-acts { display: flex; flex-direction: column; gap: 6px; }
.acct-btn { background: #2a3c6e; color: #dfe7ff; border: none; border-radius: 10px; padding: 8px 12px; font-size: 12px; font-weight: 700; cursor: pointer; font-family: inherit; white-space: nowrap; }
.acct-out { background: #3a2340; color: #f0b8be; }
.acct-btn:active { transform: scale(.95); }

/* ═══════ v15: خطة المذاكرة ═══════ */
.plan { background: linear-gradient(160deg, #1c2b52, #141f42); border: 1px solid #2c3f75; border-radius: 22px; padding: 20px 16px; margin: 18px 0 0; box-shadow: 0 8px 24px rgba(0,0,0,.35); }
.plan h3 { color: #ffd9a0; font-size: 19px; margin: 0 0 6px; }
.plan-sub { color: #c7cfef; font-size: 13px; line-height: 1.8; margin: 0 0 12px; }
.plan-set { display: flex; gap: 8px; }
.plan-set input { flex: 1; background: #0e1834; border: 1px solid #3a4f8c; border-radius: 12px; padding: 11px; color: #eef2ff; font-size: 14px; font-family: inherit; color-scheme: dark; }
#plan-make { background: linear-gradient(135deg, #4d7cfe, #3155c9); color: #fff; border: none; border-radius: 12px; padding: 0 16px; font-size: 14px; font-weight: 700; cursor: pointer; font-family: inherit; white-space: nowrap; }
.plan-status { color: #f0b8be; font-size: 13px; margin: 8px 0 0; }
.plan-status:empty { display: none; }
.plan-count { color: #f4ecd8; font-size: 18px; font-weight: 700; text-align: center; margin: 4px 0 2px; }
.plan-count b { color: #ff8f9c; font-size: 26px; }
.plan-date-l { color: #8fa0d8; font-size: 11.5px; text-align: center; margin-bottom: 12px; }
.plan-prog { height: 10px; background: #0e1834; border-radius: 99px; overflow: hidden; }
.plan-prog-in { height: 100%; background: linear-gradient(90deg, #4d7cfe, #7aa8ff, #e63946); border-radius: 99px; transition: width .5s ease; }
.plan-prog-t { color: #9fb0e8; font-size: 12px; margin: 6px 0 12px; text-align: center; }
.plan-today-t { color: #ffd9a0; font-size: 15px; margin: 0 0 8px; }
.plan-task { display: flex; align-items: center; gap: 10px; background: #0e1834; border: 1px solid #2c3f75; border-radius: 12px; padding: 10px 12px; margin-bottom: 7px; }
.plan-task.done { opacity: .55; }
.plan-task.done .plan-task-t { text-decoration: line-through; }
.plan-check { background: none; border: none; font-size: 19px; cursor: pointer; padding: 0; }
.plan-task-t { flex: 1; color: #dfe7ff; font-size: 13.5px; line-height: 1.6; }
.plan-go { background: #2a3c6e; border: none; border-radius: 8px; padding: 6px 10px; cursor: pointer; font-size: 13px; }
.plan-all-toggle { width: 100%; background: #22335f; color: #bcd0ff; border: 1px solid #3a4f8c; border-radius: 12px; padding: 10px; font-size: 13px; font-weight: 700; cursor: pointer; font-family: inherit; margin-top: 6px; }
.plan-all { margin-top: 10px; max-height: 340px; overflow-y: auto; }
.plan-acts { margin-top: 8px; text-align: center; }
.plan-edit { background: none; border: none; color: #6f80bd; font-size: 12px; cursor: pointer; font-family: inherit; text-decoration: underline; }

/* ═══════ v16: ألقاب وشارات ═══════ */
.stat-chip.ttl { background: linear-gradient(135deg, #7a5fd0, #4d7cfe); color: #fff; }
.badges { background: linear-gradient(160deg, #1c2b52, #141f42); border: 1px solid #2c3f75; border-radius: 22px; padding: 18px 16px; margin: 18px 0 0; box-shadow: 0 8px 24px rgba(0,0,0,.35); }
.badges h3 { color: #ffd9a0; font-size: 19px; margin: 0 0 10px; }
.badge-title-row { display: flex; flex-direction: column; gap: 4px; margin-bottom: 12px; }
.badge-cur { color: #f4ecd8; font-size: 17px; font-weight: 800; }
.badge-next { color: #8fa0d8; font-size: 12px; }
.badge-strip { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 6px; }
.badge { flex: 0 0 auto; width: 78px; background: #0e1834; border: 1px solid #2c3f75; border-radius: 14px; padding: 10px 6px; display: flex; flex-direction: column; align-items: center; gap: 5px; filter: grayscale(1); opacity: .45; }
.badge.on { filter: none; opacity: 1; border-color: #ffd9a0; background: linear-gradient(160deg, #24365f, #1a2a52); box-shadow: 0 4px 12px rgba(255,217,160,.15); }
.badge-ic { font-size: 24px; }
.badge-nm { color: #dfe7ff; font-size: 10.5px; font-weight: 700; text-align: center; line-height: 1.4; }
.badge-count { color: #8fa0d8; font-size: 11.5px; margin: 8px 0 0; text-align: center; }
.badge-toast { position: fixed; bottom: 90px; left: 50%; transform: translateX(-50%) translateY(20px); background: linear-gradient(135deg, #ffd9a0, #f4ecd8); color: #1b2547; border-radius: 16px; padding: 13px 20px; font-size: 14.5px; z-index: 500; opacity: 0; transition: all .4s ease; box-shadow: 0 10px 30px rgba(0,0,0,.5); }
.badge-toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ═══════ v17: خريطة فرنسا ═══════ */
.mapcard { background: linear-gradient(160deg, #1c2b52, #141f42); border: 1px solid #2c3f75; border-radius: 22px; padding: 18px 16px; margin: 18px 0 0; box-shadow: 0 8px 24px rgba(0,0,0,.35); }
.mapcard h3 { color: #ffd9a0; font-size: 19px; margin: 0 0 4px; }
.map-sub { color: #8fa0d8; font-size: 12px; margin: 0 0 8px; line-height: 1.7; }
.map-area { position: relative; height: 300px; background: linear-gradient(180deg, #16224a, #101c3d); border-radius: 16px; overflow: hidden; border: 1px solid #22335f; }
.map-road { position: absolute; inset: 0; width: 100%; height: 100%; }
.map-city { position: absolute; transform: translate(50%, -50%); background: #22335f; border: 2px solid #3a4f8c; border-radius: 16px; padding: 8px 10px; display: flex; flex-direction: column; align-items: center; gap: 2px; cursor: pointer; font-family: inherit; min-width: 74px; box-shadow: 0 6px 14px rgba(0,0,0,.4); transition: transform .2s; }
.map-city:active { transform: translate(50%, -50%) scale(.93); }
.map-city.active { border-color: #ffd9a0; background: linear-gradient(160deg, #2a3c6e, #1f2f5c); box-shadow: 0 0 18px rgba(255,217,160,.3); }
.map-city.done { border-color: #6ee7a0; }
.map-city.locked { opacity: .5; cursor: default; }
.map-ic { font-size: 26px; }
.map-nm { color: #f4ecd8; font-size: 13px; font-weight: 800; }
.map-pc { color: #9fb0e8; font-size: 10.5px; }
.map-plane { position: absolute; top: -26px; right: -8px; font-size: 22px; animation: planeFly 2.4s ease-in-out infinite; }
@keyframes planeFly { 0%,100% { transform: translate(0,0) rotate(-15deg); } 50% { transform: translate(-10px,-8px) rotate(-15deg); } }

/* ═══════ v18: تحدي السرعة ═══════ */
#speed-ov { position: fixed; inset: 0; z-index: 450; background: linear-gradient(180deg, #0d1830, #101c33 40%, #1a2b56); direction: rtl; display: flex; flex-direction: column; }
.sp-top { padding: 12px 16px 0; }
.sp-stats { display: flex; justify-content: space-between; color: #ffd9a0; font-size: 16px; font-weight: 800; margin: 8px 0; }
.sp-target { background: #f7f1e3; color: #1b2547; border-radius: 16px; padding: 14px; font-size: 19px; font-weight: 700; text-align: center; box-shadow: 0 8px 20px rgba(0,0,0,.35); }
.sp-target b { color: #c1121f; }
.sp-target.sp-ok { animation: spOk .5s; }
.sp-target.sp-no { animation: spNo .5s; }
@keyframes spOk { 0% { background: #9fe8b1; } 100% { background: #f7f1e3; } }
@keyframes spNo { 0%,100% { transform: translateX(0); } 25% { transform: translateX(8px); background: #f0b8be; } 75% { transform: translateX(-8px); background: #f0b8be; } }
.sp-hint { color: #8fa0d8; font-size: 12px; text-align: center; margin-top: 8px; }
.sp-field { flex: 1; position: relative; overflow: hidden; }
.sp-card { position: absolute; background: linear-gradient(160deg, #22335f, #1a2a52); color: #bcd0ff; border: 2px solid #4d7cfe; border-radius: 14px; padding: 13px 18px; font-size: 16.5px; font-weight: 800; cursor: pointer; font-family: inherit; box-shadow: 0 8px 18px rgba(0,0,0,.45); max-width: 44%; }
.sp-wrong { border-color: #e63946 !important; color: #ff8f9c !important; animation: spNo .3s; }
.sp-end { flex: 1; display: flex; align-items: center; justify-content: center; padding: 20px; }
.sp-end-in { background: #16224a; border: 1px solid #2c3f75; border-radius: 22px; padding: 26px 22px; text-align: center; width: 100%; max-width: 360px; }
.sp-end-in h3 { color: #ffd9a0; font-size: 22px; margin: 0 0 8px; }
.sp-end-score { color: #fff; font-size: 40px; font-weight: 900; margin: 4px 0; }
.sp-end-rounds { color: #9fe8b1; font-size: 14px; margin: 4px 0; }
.sp-end-best { color: #8fa0d8; font-size: 13px; margin: 4px 0 16px; }
.sp-end-in .big-btn { display: block; width: 100%; margin-bottom: 10px; }

/* ═══════ v19: ليلة الامتحان ═══════ */
.nb-card { background: linear-gradient(160deg, #2a1a3e, #1a1330); border: 1px solid #4a3566; border-radius: 22px; padding: 18px 16px; margin-bottom: 18px; }
.nb-card h3 { color: #e0c3fc; font-size: 19px; margin: 0 0 6px; }
.nb-card p { color: #c7b8e8; font-size: 13px; line-height: 1.8; margin: 0 0 12px; }
#nb-ov { position: fixed; inset: 0; z-index: 450; background: linear-gradient(180deg, #160f28, #1d1435 50%, #241a45); direction: rtl; display: flex; flex-direction: column; }
.nb-head { padding: 14px 16px 0; }
.nb-head h3 { color: #e0c3fc; font-size: 20px; margin: 8px 0 10px; }
.nb-tabs { display: flex; gap: 6px; }
.nb-tab { flex: 1; background: #241a45; color: #b9a8dd; border: 1px solid #4a3566; border-radius: 12px; padding: 9px 4px; font-size: 12.5px; font-weight: 700; cursor: pointer; font-family: inherit; }
.nb-tab.on { background: linear-gradient(135deg, #7a5fd0, #5b3fae); color: #fff; border-color: #8f70e8; }
.nb-body { flex: 1; overflow-y: auto; padding: 14px 16px 20px; }
.nb-intro { color: #c7b8e8; font-size: 13px; margin: 0 0 12px; line-height: 1.7; }
.nb-rule { background: #241a45; border: 1px solid #4a3566; border-radius: 14px; padding: 13px 14px; margin-bottom: 9px; }
.nb-rule b { color: #ffd9a0; font-size: 14.5px; display: block; margin-bottom: 5px; }
.nb-rule p { color: #d9cfee; font-size: 13px; line-height: 1.8; margin: 0; }
.nb-rule-btns { display: flex; gap: 6px; margin-top: 9px; }
.nb-flash { background: #f7f1e3; border-radius: 20px; min-height: 170px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; cursor: pointer; box-shadow: 0 10px 26px rgba(0,0,0,.4); transition: transform .25s; }
.nb-flash:active { transform: scale(.97); }
.nb-flash b { color: #1b2547; font-size: 26px; padding: 0 16px; text-align: center; }
.nb-flash.flip b { color: #c1121f; }
.nb-flash small { color: #8a7f6a; font-size: 11.5px; }
.nb-flash-btns { display: flex; gap: 8px; justify-content: center; margin-top: 12px; }
.nb-count { color: #8f7fb8; font-size: 12px; text-align: center; margin-top: 10px; }
.nb-tip { display: flex; gap: 10px; align-items: flex-start; background: #241a45; border: 1px solid #4a3566; border-radius: 14px; padding: 11px 13px; margin-bottom: 8px; }
.nb-tip span { background: #7a5fd0; color: #fff; font-size: 13px; font-weight: 800; width: 26px; height: 26px; border-radius: 50%; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.nb-tip p { color: #d9cfee; font-size: 13.5px; line-height: 1.8; margin: 2px 0 0; }

/* ═══════ v20: التقرير والتقويم ═══════ */
.report { background: linear-gradient(160deg, #1c2b52, #141f42); border: 1px solid #2c3f75; border-radius: 22px; padding: 18px 16px; margin: 18px 0 0; box-shadow: 0 8px 24px rgba(0,0,0,.35); }
.report h3 { color: #ffd9a0; font-size: 19px; margin: 0 0 12px; }
.rep-stats { display: flex; gap: 8px; margin-bottom: 10px; }
.rep-stat { flex: 1; background: #0e1834; border: 1px solid #2c3f75; border-radius: 14px; padding: 10px 4px; text-align: center; }
.rep-stat b { color: #7aa8ff; font-size: 20px; display: block; }
.rep-stat span { color: #8fa0d8; font-size: 10.5px; line-height: 1.5; display: block; margin-top: 2px; }
.rep-best { color: #9fe8b1; font-size: 12.5px; margin: 0 0 10px; }
.rep-h { color: #c7cfef; font-size: 13.5px; margin: 12px 0 8px; }
.rep-graph { display: flex; align-items: flex-end; gap: 4px; height: 70px; background: #0e1834; border-radius: 12px; padding: 8px; }
.rep-bar { flex: 1; background: linear-gradient(180deg, #7aa8ff, #4d7cfe); border-radius: 4px 4px 2px 2px; min-height: 4px; }
.rep-cal { display: grid; grid-template-columns: repeat(10, 1fr); gap: 5px; }
.rep-day { background: #0e1834; border: 1px solid #22335f; border-radius: 8px; aspect-ratio: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.rep-day span { font-size: 9px; height: 12px; }
.rep-day b { color: #5f70a8; font-size: 10.5px; }
.rep-day.on { border-color: #6ee7a0; background: #14332a; }
.rep-day.on b { color: #9fe8b1; }
.rep-day.today { border-color: #ffd9a0; box-shadow: 0 0 8px rgba(255,217,160,.35); }
.rep-graph { direction: ltr; }

/* ═══════ v21: التحدي اليومي ═══════ */
.daily { background: linear-gradient(160deg, #1c2b52, #141f42); border: 1px solid #2c3f75; border-radius: 22px; padding: 18px 16px; margin: 18px 0 0; box-shadow: 0 8px 24px rgba(0,0,0,.35); }
.daily-row { display: flex; gap: 10px; }
.daily-half { flex: 1; background: #0e1834; border: 1px solid #2c3f75; border-radius: 16px; padding: 13px 12px; text-align: center; }
.daily-half h3 { color: #ffd9a0; font-size: 15.5px; margin: 0 0 6px; }
.daily-sub { color: #9fb0e8; font-size: 11.5px; line-height: 1.6; margin: 0 0 10px; }
.daily-done { color: #9fe8b1; font-size: 13px; font-weight: 700; margin: 6px 0 2px; }
.daily-half small { color: #6f80bd; font-size: 10.5px; }
.daily-win { color: #ffd9a0; font-size: 14px; font-weight: 800; margin: 8px 0 2px; }
.daily-btn { background: linear-gradient(135deg, #e63946, #c1121f); color: #fff; border: none; border-radius: 12px; padding: 10px 14px; font-size: 13px; font-weight: 800; cursor: pointer; font-family: inherit; width: 100%; }
.daily-btn.gift { background: linear-gradient(135deg, #7a5fd0, #5b3fae); }
.daily-btn:active { transform: scale(.96); }
#daily-quiz { margin-top: 12px; }

/* ═══════ v22: ثيم الجاكيت (أزرق فاتح + كريمي/أبيض) ═══════ */
body { background: linear-gradient(165deg, #dcecfa 0%, #eef5fc 35%, #f8f3e8 100%); background-attachment: fixed; color: #22385c; }
body::before { opacity: .05; }
.hero h1 { color: #22385c; }
.hero h1 span { color: #d8362c; }
.hero .tag { color: #4a628a; }
.hero-img { border-color: #fff; box-shadow: 0 12px 30px rgba(80,130,190,.3); }
.hero-jackets { width: 100%; border-radius: 22px; border: 5px solid #fff; box-shadow: 0 12px 30px rgba(80,130,190,.3); margin: 12px 0 4px; display: block; }
.best { color: #6a5f94; }
.stat-chip.fire { background: linear-gradient(135deg, #f2604d, #d8362c); }
.view-title { color: #22385c; }
.view-sub { color: #4a628a; }
.disclaimer { color: #5a6f96; }
.dev-label { color: #6a7ea6; }
/* الكروت كلها بقت فاتحة */
.acct, .assist, .plan, .badges, .mapcard, .report, .daily, .nb-card, .g-card, .assist-chip, .g-unit-t, .lesson-sec, .sec-head {
  background: linear-gradient(160deg, #ffffff, #f4f8fd) !important;
  border-color: #cfe0f2 !important;
  box-shadow: 0 8px 22px rgba(90,140,200,.18) !important;
}
.acct h3, .assist h3, .plan h3, .badges h3, .mapcard h3, .report h3, .daily-half h3, .nb-card h3, .g-card-h h4, .g-unit-t, .plan-today-t { color: #2a5a94 !important; }
.acct-sub, .assist-sub, .plan-sub, .map-sub, .view-sub, .nb-card p { color: #4a628a !important; }
.acct input, .assist-row #assist-q, .plan-set input { background: #f2f7fd !important; border-color: #c4d8ef !important; color: #22385c !important; }
.acct input::placeholder, #assist-q::placeholder { color: #8aa2c6 !important; }
.acct-tab { background: #eef4fb !important; color: #4a628a !important; border-color: #c4d8ef !important; }
.acct-tab.on { background: linear-gradient(135deg, #6fa3d8, #4a86c2) !important; color: #fff !important; border-color: #4a86c2 !important; }
#assist-go { background: linear-gradient(135deg, #4a86c2, #2f6bb3) !important; }
.assist-chip { background: #eef4fb !important; color: #2a5a94 !important; }
.a-hit { background: #f4f8fd !important; border-color: #cfe0f2 !important; }
.a-hit-t b { color: #2a5a94 !important; }
.a-rule .a-hit-t b { color: #b02a22 !important; }
.a-hit-t span, .a-det { color: #44597f !important; }
.a-det { border-top-color: #d8e4f2 !important; }
.a-head { color: #1e7a46 !important; }
.a-none { background: #fdeef0 !important; border-color: #f2c4cb !important; color: #a03040 !important; }
.a-mini { background: #dde9f7 !important; color: #2a5a94 !important; }
.acct-info b { color: #22385c !important; }
.acct-info span { color: #7a90b8 !important; }
.acct-info small { color: #1e7a46 !important; }
.acct-btn { background: #dde9f7 !important; color: #2a5a94 !important; }
.acct-out { background: #fbe4e6 !important; color: #b02a22 !important; }
.acct-status { color: #1e7a46 !important; }
.daily-half { background: #f4f8fd !important; border-color: #cfe0f2 !important; }
.daily-sub { color: #6a82ac !important; }
.daily-half small { color: #8aa2c6 !important; }
.daily-done { color: #1e7a46 !important; }
.daily-win { color: #b02a22 !important; }
.daily-btn.gift { background: linear-gradient(135deg, #9fb9e8, #6fa3d8) !important; }
.plan-count { color: #22385c !important; }
.plan-count b { color: #d8362c !important; }
.plan-date-l, .plan-prog-t { color: #6a82ac !important; }
.plan-prog { background: #e6eef8 !important; }
.plan-task { background: #f4f8fd !important; border-color: #cfe0f2 !important; }
.plan-task-t { color: #33487a !important; }
.plan-go { background: #dde9f7 !important; }
.plan-all-toggle { background: #dde9f7 !important; color: #2a5a94 !important; border-color: #c4d8ef !important; }
.plan-edit { color: #8aa2c6 !important; }
.plan-status { color: #b02a22 !important; }
.badge { background: #f4f8fd !important; border-color: #cfe0f2 !important; }
.badge.on { background: linear-gradient(160deg, #e7f1fc, #dcebfb) !important; border-color: #6fa3d8 !important; box-shadow: 0 4px 12px rgba(111,163,216,.3) !important; }
.badge-nm { color: #33487a !important; }
.badge-cur { color: #22385c !important; }
.badge-next, .badge-count { color: #6a82ac !important; }
.map-area { background: linear-gradient(180deg, #eaf3fc, #dcebfb) !important; border-color: #c4d8ef !important; }
.map-city { background: #ffffff !important; border-color: #a9c6e8 !important; }
.map-city.active { border-color: #4a86c2 !important; box-shadow: 0 0 16px rgba(74,134,194,.4) !important; }
.map-city.done { border-color: #3fae6e !important; }
.map-nm { color: #22385c !important; }
.map-pc { color: #6a82ac !important; }
.map-road path { stroke: #8fb4dd !important; }
.rep-stat { background: #f4f8fd !important; border-color: #cfe0f2 !important; }
.rep-stat b { color: #2f6bb3 !important; }
.rep-stat span { color: #6a82ac !important; }
.rep-best { color: #1e7a46 !important; }
.rep-h { color: #44597f !important; }
.rep-graph { background: #eaf2fb !important; }
.rep-day { background: #f4f8fd !important; border-color: #d8e4f2 !important; }
.rep-day b { color: #8aa2c6 !important; }
.rep-day.on { background: #e2f4e9 !important; border-color: #6ec99a !important; }
.rep-day.on b { color: #1e7a46 !important; }
.rep-day.today { border-color: #d8362c !important; box-shadow: 0 0 8px rgba(216,54,44,.3) !important; }
.g-card-h p { color: #44597f !important; }
.g-steps-n { color: #8aa2c6 !important; }
.nb-card { background: linear-gradient(160deg, #f2ecfa, #e9e0f7) !important; border-color: #d5c6ee !important; }
.nb-card h3 { color: #6a4fb0 !important; }
.nb-card p { color: #6f5f96 !important; }
/* التاب بار والهيدر */
.tabbar { background: rgba(255,255,255,.92) !important; border-top-color: #cfe0f2 !important; box-shadow: 0 -6px 20px rgba(90,140,200,.15) !important; }
.tab { color: #6a82ac !important; }
.tab.active { background: linear-gradient(135deg, #4a86c2, #6fa3d8) !important; color: #fff !important; }
/* الدروس والكلمات */
.sec-head { color: #22385c; }
.sec-head small { color: #6a82ac !important; }
.w { background: #fff !important; border-color: #cfe0f2 !important; }
.w b, .w-fr { color: #2a5a94 !important; }
.w small, .w-ar { color: #5a7199 !important; }
.lesson-t { color: #22385c !important; }
.lesson-t small { color: #6a82ac !important; }
.grammar-in { background: #f4f8fd !important; border-color: #cfe0f2 !important; }
.grammar-in h5 { color: #b02a22 !important; }
.grammar-in p, .grammar-d p { color: #44597f !important; }
.grammar-d h6 { color: #2a5a94 !important; }
.q-card, .quiz-box .q-card { background: #fff !important; }
.exam-card { background: #fff !important; border-color: #cfe0f2 !important; }
.exam-card h3 { color: #22385c !important; }
.exam-card p { color: #4a628a !important; }
.video-card { background: #fff !important; border-color: #cfe0f2 !important; }
.video-t { color: #22385c !important; }
.video-c, .video-note { color: #6a82ac !important; }
.lesson-quiz-btn small { color: #ffe3e1 !important; }

/* v23: شهادات + مشاركة */
.cert { background: #fff; border-radius: 22px; padding: 16px; margin: 14px 0; box-shadow: 0 8px 24px rgba(80,130,190,.14); }
.cert-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.cert-head h3 { margin: 0; color: #22385c; }
.cert-row { display: flex; align-items: center; gap: 10px; padding: 10px 8px; border-radius: 14px; background: #f4f8fd; margin-bottom: 8px; }
.cert-row.done { background: linear-gradient(90deg,#eaf3ff,#fdf8ec); border: 1.5px solid #cfe0f5; }
.cert-ic { font-size: 26px; }
.cert-tx { flex: 1; display: flex; flex-direction: column; }
.cert-tx b { color: #22385c; font-size: 15px; }
.cert-tx small { color: #6b7b95; font-size: 12px; }
.cert-lock { font-size: 20px; opacity: .6; }
.btn-gold { background: linear-gradient(135deg,#f2c94c,#e8a93c); color: #4a3200; border: none; }
.modal { position: fixed; inset: 0; background: rgba(20,35,60,.5); display: none; align-items: center; justify-content: center; z-index: 90; padding: 18px; }
.modal.on { display: flex; }
.modal-box { background: #fff; border-radius: 22px; padding: 20px; max-width: 420px; width: 100%; box-shadow: 0 20px 50px rgba(0,0,0,.25); }
.modal-box h3 { margin-top: 0; color: #22385c; }
.share-txt { background: #f4f8fd; border-radius: 12px; padding: 12px; color: #41536e; font-size: 14px; line-height: 1.7; }
.modal-btns { display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; }
.btn-green { background: #22b45e; color: #fff; text-decoration: none; }
.btn-gray { background: #e8edf4; color: #41536e; }

/* v24: اختبار النطق */
#pronun-ov { position: fixed; inset: 0; background: linear-gradient(160deg,#eaf4ff,#fdf8ec); z-index: 80; overflow-y: auto; padding: 14px; }
.pr-box { position: relative; max-width: 460px; margin: 10px auto; background: #fff; border-radius: 24px; padding: 20px 16px; box-shadow: 0 14px 40px rgba(80,130,190,.2); text-align: center; }
.pr-head { display: flex; justify-content: space-between; color: #6b7b95; font-size: 14px; margin-bottom: 6px; }
.pr-word { font-size: 30px; font-weight: 800; color: #22385c; direction: ltr; margin: 8px 0 2px; }
.pr-ar { color: #6b7b95; margin-bottom: 12px; }
.pr-mic { width: 84px; height: 84px; border-radius: 50%; border: none; font-size: 36px; margin: 14px auto 8px; display: block; background: linear-gradient(135deg,#5f9de0,#4a86c2); box-shadow: 0 10px 24px rgba(74,134,194,.4); cursor: pointer; transition: transform .15s; }
.pr-mic:active { transform: scale(.93); }
.pr-mic.rec { background: linear-gradient(135deg,#e2574c,#c0392b); animation: prpulse 1s infinite; }
@keyframes prpulse { 0%,100% { box-shadow: 0 0 0 0 rgba(226,87,76,.5);} 50% { box-shadow: 0 0 0 18px rgba(226,87,76,0);} }
.pr-status { color: #6b7b95; font-size: 13px; }
.pr-heard { color: #41536e; font-size: 14px; margin-top: 10px; direction: ltr; }
.pr-score { font-size: 20px; font-weight: 800; color: #22385c; margin-top: 4px; }
.btn-b5, .big-btn.b5 { background: linear-gradient(135deg,#5f9de0,#3d6fa8); color: #fff; }

/* ═══════ v25: وضع ليلي + تنظيم احترافي ═══════ */
/* زرار التبديل */
#theme-toggle { position: fixed; top: 12px; left: 12px; z-index: 70; width: 46px; height: 46px; border-radius: 50%; border: 1.5px solid #cfe0f2; background: rgba(255,255,255,.92); font-size: 21px; cursor: pointer; box-shadow: 0 6px 16px rgba(90,140,200,.25); display: flex; align-items: center; justify-content: center; transition: transform .15s; }
#theme-toggle:active { transform: scale(.9); }
html.dark #theme-toggle { background: #1c2e47; border-color: #33507a; }

/* الوضع الليلي */
html.dark body { background: linear-gradient(165deg, #0d1b2e 0%, #13253d 45%, #1a2f4a 100%) !important; color: #e8f0fa !important; }
html.dark body::before { opacity: .06; }
html.dark .hero h1 { color: #eaf3ff !important; }
html.dark .hero h1 span { color: #ff7a6e !important; }
html.dark .hero .tag { color: #a8c0e0 !important; }
html.dark .hero-img, html.dark .hero-jackets { border-color: #2c4666 !important; box-shadow: 0 14px 34px rgba(0,0,0,.5) !important; }
html.dark .best { color: #9db6d8 !important; }
html.dark .view-title { color: #eaf3ff !important; }
html.dark .view-sub, html.dark .disclaimer, html.dark .dev-label { color: #9db6d8 !important; }
html.dark .acct, html.dark .assist, html.dark .plan, html.dark .badges, html.dark .mapcard, html.dark .report, html.dark .daily, html.dark .nb-card, html.dark .g-card, html.dark .assist-chip, html.dark .g-unit-t, html.dark .lesson-sec, html.dark .sec-head, html.dark .cert, html.dark .modal-box, html.dark .pr-box {
  background: linear-gradient(160deg, #1b2d47, #172740) !important;
  border-color: #2c4a70 !important;
  box-shadow: 0 8px 24px rgba(0,0,0,.35) !important;
}
html.dark .acct h3, html.dark .assist h3, html.dark .plan h3, html.dark .badges h3, html.dark .mapcard h3, html.dark .report h3, html.dark .daily-half h3, html.dark .nb-card h3, html.dark .g-card-h h4, html.dark .g-unit-t, html.dark .plan-today-t, html.dark .cert-head h3, html.dark .modal-box h3, html.dark .pr-word { color: #a8ccf0 !important; }
html.dark .acct-sub, html.dark .assist-sub, html.dark .plan-sub, html.dark .map-sub, html.dark .view-sub, html.dark .nb-card p, html.dark .pr-ar, html.dark .pr-status, html.dark .pr-head { color: #9db6d8 !important; }
html.dark .acct input, html.dark .assist-row #assist-q, html.dark .plan-set input { background: #122238 !important; border-color: #2c4a70 !important; color: #e8f0fa !important; }
html.dark .acct input::placeholder, html.dark #assist-q::placeholder { color: #5d7ba3 !important; }
html.dark .acct-tab { background: #122238 !important; color: #9db6d8 !important; border-color: #2c4a70 !important; }
html.dark .acct-tab.on { background: linear-gradient(135deg, #4a86c2, #2f6bb3) !important; color: #fff !important; }
html.dark .assist-chip { background: #122238 !important; color: #a8ccf0 !important; }
html.dark .a-hit, html.dark .daily-half, html.dark .plan-task, html.dark .badge, html.dark .rep-stat, html.dark .rep-day, html.dark .cert-row, html.dark .grammar-in, html.dark .share-txt { background: #122238 !important; border-color: #24405f !important; }
html.dark .cert-row.done, html.dark .badge.on { background: linear-gradient(160deg, #1d3554, #1a2c46) !important; border-color: #4a86c2 !important; }
html.dark .a-hit-t b, html.dark .grammar-d h6, html.dark .w b, html.dark .w-fr { color: #a8ccf0 !important; }
html.dark .a-rule .a-hit-t b { color: #ff8a80 !important; }
html.dark .a-hit-t span, html.dark .a-det, html.dark .grammar-in p, html.dark .grammar-d p, html.dark .g-card-h p { color: #9db6d8 !important; }
html.dark .a-head { color: #5fd39a !important; }
html.dark .a-none { background: #3a1f26 !important; border-color: #6b3340 !important; color: #ff9aa6 !important; }
html.dark .a-mini, html.dark .acct-btn, html.dark .plan-go, html.dark .plan-all-toggle { background: #1d3554 !important; color: #a8ccf0 !important; }
html.dark .acct-info b { color: #e8f0fa !important; }
html.dark .acct-info span { color: #7d9ac2 !important; }
html.dark .acct-info small, html.dark .acct-status, html.dark .daily-done, html.dark .rep-best, html.dark .rep-day.on b { color: #5fd39a !important; }
html.dark .acct-out { background: #3a1f26 !important; color: #ff8a80 !important; }
html.dark .daily-sub, html.dark .daily-half small, html.dark .plan-date-l, html.dark .plan-prog-t, html.dark .badge-next, html.dark .badge-count, html.dark .rep-stat span, html.dark .rep-h, html.dark .g-steps-n, html.dark .sec-head small, html.dark .lesson-t small, html.dark .map-pc, html.dark .cert-tx small, html.dark .plan-edit { color: #7d9ac2 !important; }
html.dark .daily-win, html.dark .plan-status, html.dark .plan-count b { color: #ff8a80 !important; }
html.dark .daily-btn.gift { background: linear-gradient(135deg, #3d6fa8, #2f5583) !important; }
html.dark .plan-count, html.dark .rep-stat b, html.dark .badge-cur, html.dark .cert-tx b, html.dark .lesson-t, html.dark .sec-head, html.dark .map-nm, html.dark .exam-card h3, html.dark .video-t, html.dark .pr-score { color: #e8f0fa !important; }
html.dark .plan-prog { background: #122238 !important; }
html.dark .plan-task-t { color: #c3d8f0 !important; }
html.dark .map-area { background: linear-gradient(180deg, #132540, #0f1e33) !important; border-color: #2c4a70 !important; }
html.dark .map-city { background: #1b2d47 !important; border-color: #33507a !important; }
html.dark .map-city.active { border-color: #6fa3d8 !important; box-shadow: 0 0 16px rgba(111,163,216,.35) !important; }
html.dark .map-city.done { border-color: #3fae6e !important; }
html.dark .map-road path { stroke: #33507a !important; }
html.dark .rep-graph { background: #122238 !important; }
html.dark .rep-day.on { background: #17352a !important; border-color: #3fae6e !important; }
html.dark .rep-day.today { border-color: #e2574c !important; box-shadow: 0 0 8px rgba(226,87,76,.4) !important; }
html.dark .grammar-in h5 { color: #ff8a80 !important; }
html.dark .q-card, html.dark .quiz-box .q-card, html.dark .exam-card, html.dark .video-card, html.dark .w { background: #1b2d47 !important; border-color: #2c4a70 !important; }
html.dark .w small, html.dark .w-ar, html.dark .exam-card p, html.dark .video-c, html.dark .video-note, html.dark .cert-tx small { color: #9db6d8 !important; }
html.dark .nb-card { background: linear-gradient(160deg, #241f3f, #1c1832) !important; border-color: #3d3466 !important; }
html.dark .nb-card h3 { color: #b9a3ee !important; }
html.dark .nb-card p { color: #9d8fc7 !important; }
html.dark .tabbar { background: rgba(15,30,51,.95) !important; border-top-color: #24405f !important; box-shadow: 0 -6px 20px rgba(0,0,0,.4) !important; }
html.dark .tab { color: #7d9ac2 !important; }
html.dark .tab.active { background: linear-gradient(135deg, #4a86c2, #2f6bb3) !important; color: #fff !important; }
html.dark .modal { background: rgba(4,10,20,.6) !important; }
html.dark #pronun-ov { background: linear-gradient(160deg, #0d1b2e, #1a2f4a) !important; }
html.dark .pr-heard { color: #c3d8f0 !important; }
html.dark .btn-gray { background: #24405f !important; color: #c3d8f0 !important; }
html.dark .stat-chip.star, html.dark .stat-chip.ttl { background: rgba(27,45,71,.9) !important; color: #e8f0fa !important; border-color: #33507a !important; }

/* تنظيم احترافي: شبكة أزرار الهوم ٢×٢ + محاذاة موحدة */
.hero-btns { grid-template-columns: 1fr 1fr; gap: 10px; }
.hero-btns .big-btn { margin: 0; min-height: 58px; display: flex; align-items: center; justify-content: center; text-align: center; font-size: 15.5px; }
.hero-stats { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 12px; }
.hero-stats .stat-chip { margin: 0; }
.acct, .assist, .plan, .badges, .mapcard, .report, .daily, .cert, .nb-card { border-radius: 22px; padding: 16px; }
.acct h3, .assist h3, .plan h3, .badges h3, .mapcard h3, .report h3, .nb-card h3 { font-size: 18px; margin: 0 0 6px; }
.tabbar { display: grid; grid-template-columns: repeat(6, 1fr); }
.tab { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; }

/* v26: دوري الطلبة + المنافسة */
.board { background: #fff; border-radius: 22px; padding: 16px; margin: 14px 0; box-shadow: 0 8px 24px rgba(80,130,190,.14); }
.board-namerow { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; font-size: 13px; color: #6a82ac; }
.board-namerow input { flex: 1; background: #f2f7fd; border: 1.5px solid #c4d8ef; border-radius: 12px; padding: 8px 10px; font-family: inherit; font-size: 14px; color: #22385c; }
.board-row { display: flex; align-items: center; gap: 8px; padding: 9px 10px; border-radius: 14px; background: #f4f8fd; margin-bottom: 6px; }
.board-row.me { background: linear-gradient(90deg,#e7f1fc,#fdf6e3); border: 1.5px solid #6fa3d8; }
.board-row.rival { border: 1.5px dashed #d8362c; }
.board-rank { width: 30px; text-align: center; font-weight: 800; color: #2a5a94; }
.board-name { flex: 1; font-weight: 700; color: #22385c; font-size: 14.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.board-pts { color: #2f6bb3; font-weight: 800; font-size: 14px; }
.board-pts small { color: #8aa2c6; font-weight: 400; }
.board-vs { border: none; background: #fdeef0; border-radius: 10px; padding: 5px 8px; font-size: 15px; cursor: pointer; }
.board-tag { font-size: 11px; color: #b02a22; font-weight: 800; }
.board-loading { text-align: center; color: #8aa2c6; padding: 10px; font-size: 13px; }
.board-status { text-align: center; color: #8aa2c6; font-size: 11.5px; margin-top: 6px; }
.rival-card { background: linear-gradient(135deg,#fff5f4,#fdf6e3); border: 1.5px solid #f2c4cb; border-radius: 16px; padding: 12px; margin-bottom: 10px; }
.rival-h { font-size: 14px; color: #22385c; display: flex; align-items: center; gap: 4px; }
.rival-h b { color: #b02a22; }
.rival-x { margin-inline-start: auto; border: none; background: none; color: #b02a22; font-size: 15px; cursor: pointer; }
.rival-grid { display: grid; grid-template-columns: 1fr auto 1fr; gap: 8px; align-items: center; margin: 8px 0; }
.rival-side { text-align: center; background: #fff; border-radius: 12px; padding: 8px; }
.rival-side b { font-size: 22px; color: #22385c; display: block; }
.rival-side span { font-size: 12px; color: #6a82ac; }
.rival-side.me b { color: #1e7a46; }
.rival-mid { font-size: 13px; font-weight: 800; color: #b02a22; text-align: center; }
.rival-days { text-align: center; font-size: 11.5px; color: #8aa2c6; }
html.dark .board { background: linear-gradient(160deg,#1b2d47,#172740) !important; border-color: #2c4a70 !important; }
html.dark .board h3, html.dark .board-name { color: #e8f0fa !important; }
html.dark .board-row { background: #122238 !important; }
html.dark .board-row.me { background: linear-gradient(90deg,#1d3554,#1a2c46) !important; }
html.dark .board-namerow, html.dark .board-loading, html.dark .board-status, html.dark .rival-days { color: #7d9ac2 !important; }
html.dark .board-namerow input { background: #122238 !important; border-color: #2c4a70 !important; color: #e8f0fa !important; }
html.dark .board-rank, html.dark .board-pts { color: #a8ccf0 !important; }
html.dark .rival-card { background: linear-gradient(135deg,#2c1d24,#26221a) !important; border-color: #6b3340 !important; }
html.dark .rival-h { color: #e8f0fa !important; }
html.dark .rival-h b, html.dark .rival-mid, html.dark .board-tag { color: #ff8a80 !important; }
html.dark .rival-side { background: #122238 !important; }
html.dark .rival-side b { color: #e8f0fa !important; }
html.dark .rival-side.me b { color: #5fd39a !important; }
html.dark .rival-side span { color: #7d9ac2 !important; }
html.dark .board-vs { background: #3a1f26 !important; }

/* ═══════ v27: أيقونات SVG مخصصة + خلفية فرنساوية مرسومة ═══════ */
.ic { width: 21px; height: 21px; vertical-align: -4px; fill: currentColor; }
.ic .ic-l { fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.ic .ic-b { fill: #fff; opacity: .85; }
.tab .ic { width: 23px; height: 23px; padding: 4px; border-radius: 9px; box-sizing: content-box; }
.tab .ic-home { color: #2f6bb3; background: #e3eefb; }
.tab .ic-book { color: #1e7a46; background: #e2f4e9; }
.tab .ic-nib { color: #b02a22; background: #fde7e5; }
.tab .ic-card { color: #b97b0e; background: #fbf0d7; }
.tab .ic-trophy { color: #7a4fc9; background: #efe6fb; }
.tab .ic-exam { color: #0e7a8a; background: #dff3f6; }
.tab.active .ic { color: #fff; background: rgba(255,255,255,.22); }
.big-btn .ic { width: 24px; height: 24px; margin-inline-end: 6px; }
.hero-btns .big-btn, #speed-start, #pronun-start, #nb-start { display: flex; align-items: center; justify-content: center; gap: 4px; }
html.dark .tab .ic-home { color: #8db8e8; background: #1d3554; }
html.dark .tab .ic-book { color: #5fd39a; background: #17352a; }
html.dark .tab .ic-nib { color: #ff9aa6; background: #3a1f26; }
html.dark .tab .ic-card { color: #f2c94c; background: #33290f; }
html.dark .tab .ic-trophy { color: #b9a3ee; background: #241f3f; }
html.dark .tab .ic-exam { color: #6fd4e2; background: #12333a; }
/* الخلفية المرسومة */
body::before { display: none; }
.bg-art { position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
.bg-i { position: absolute; stroke: #4a86c2; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; opacity: .1; animation: bgfloat 9s ease-in-out infinite; }
.bi1 { width: 92px; top: 5%; right: 4%; animation-duration: 10s; }
.bi2 { width: 78px; top: 24%; left: 3%; stroke: #d8a03c; animation-duration: 12s; animation-delay: -3s; }
.bi3 { width: 62px; top: 46%; right: 6%; stroke: #d8362c; animation-duration: 8s; animation-delay: -5s; }
.bi4 { width: 80px; top: 63%; left: 5%; stroke: #4a86c2; animation-duration: 11s; animation-delay: -2s; }
.bi5 { width: 66px; top: 80%; right: 8%; stroke: #b97b0e; animation-duration: 9s; animation-delay: -6s; }
.bi6 { width: 54px; top: 34%; left: 10%; stroke: #7a4fc9; animation-duration: 13s; animation-delay: -4s; }
@keyframes bgfloat { 0%,100% { transform: translateY(0) rotate(-2deg); } 50% { transform: translateY(-14px) rotate(3deg); } }
html.dark .bg-i { opacity: .16; }
@media (max-width: 480px) { .bi2, .bi6 { display: none; } }

/* v28 */
#parentrep-btn { margin-top: 10px; width: 100%; padding: 10px; border-radius: 14px; font-weight: 800; font-size: 14px; border: none; cursor: pointer; }

/* v29: توقيع المطور الكريتيف */
.dev-credit { margin: 22px 0 6px; display: flex; flex-direction: column; align-items: center; gap: 4px; }
.dev-label { font-family: "Segoe UI", Tahoma, sans-serif; font-size: 12px; letter-spacing: 6px; text-transform: uppercase; color: #6a7ea6; }
.dev-label::before, .dev-label::after { content: "✦"; color: #4a86c2; margin: 0 8px; letter-spacing: 0; }
.dev-name { font-family: "Brush Script MT", "Segoe Script", "Lucida Handwriting", cursive; font-size: 34px; font-weight: 700; background: linear-gradient(120deg, #2f6bb3, #6fa3d8 40%, #d8a03c 75%, #b02a22); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; color: transparent; animation: devshine 6s linear infinite; background-size: 220% 100%; }
@keyframes devshine { 0% { background-position: 0% 0; } 100% { background-position: 220% 0; } }
html.dark .dev-label { color: #7d9ac2; }

/* v31: قصص */
#story-ov { position: fixed; inset: 0; background: linear-gradient(160deg,#eaf4ff,#fdf8ec); z-index: 80; overflow-y: auto; padding: 14px; }
.st-box { position: relative; max-width: 520px; margin: 10px auto; background: #fff; border-radius: 24px; padding: 20px 16px; box-shadow: 0 14px 40px rgba(80,130,190,.2); }
.st-item { display: flex; align-items: center; gap: 12px; width: 100%; background: #f4f8fd; border: 1.5px solid #cfe0f2; border-radius: 16px; padding: 12px; margin-bottom: 8px; cursor: pointer; font-family: inherit; text-align: right; }
.st-ic { font-size: 26px; }
.st-tx { flex: 1; display: flex; flex-direction: column; }
.st-tx b { color: #22385c; font-size: 16px; }
.st-tx small { color: #6a82ac; }
.st-para { background: #f4f8fd; border-radius: 14px; padding: 10px 12px; margin-bottom: 8px; }
.st-fr { color: #22385c; font-size: 15.5px; line-height: 1.7; margin: 0 0 4px; }
.st-ar { color: #6a82ac; font-size: 13px; line-height: 1.6; margin: 0 0 6px; }
html.dark #story-ov { background: linear-gradient(160deg,#0d1b2e,#1a2f4a) !important; }
html.dark .st-box { background: linear-gradient(160deg,#1b2d47,#172740) !important; }
html.dark .st-item, html.dark .st-para { background: #122238 !important; border-color: #24405f !important; }
html.dark .st-tx b, html.dark .st-fr, html.dark .st-box h3 { color: #e8f0fa !important; }
html.dark .st-ar, html.dark .st-tx small, html.dark .st-box p { color: #9db6d8 !important; }

/* ═══ v32: لوحة الطالب ═══ */
.dash{background:var(--card);border:1px solid #e3d3b0;border-radius:20px;padding:16px;margin:12px 0;box-shadow:0 4px 18px rgba(16,28,51,.10)}
.dash-top{display:flex;align-items:center;justify-content:space-between;gap:12px}
.dash-hi h3{font-size:19px;margin:0 0 4px}
.dash-sub{margin:0;font-size:13px;color:var(--muted,#5b6b84);font-weight:700}
.dash-namerow{display:flex;gap:8px}
.dash-namerow input{flex:1;border:1.5px solid #e3d3b0;border-radius:12px;padding:9px 12px;font-family:inherit;font-size:14px;background:var(--cream,#f7f3ea);color:inherit;min-width:0}
.dash-ring{--pct:0;width:74px;height:74px;min-width:74px;border-radius:50%;background:conic-gradient(var(--amber,#e8a51c) calc(var(--pct)*1%),#e3d3b0 0);display:flex;flex-direction:column;align-items:center;justify-content:center;position:relative}
.dash-ring::before{content:'';position:absolute;inset:7px;border-radius:50%;background:var(--card)}
.dash-ring span,.dash-ring small{position:relative;z-index:1}
.dash-ring span{font-weight:900;font-size:17px}
.dash-ring small{font-size:10px;color:var(--muted,#5b6b84)}
.dash-bar{height:8px;border-radius:99px;background:#e3d3b0;overflow:hidden;margin-top:12px}
.dash-bar i{display:block;height:100%;border-radius:99px;background:linear-gradient(90deg,var(--amber,#e8a51c),#d4760e);transition:width .6s}
.dash-meta{font-size:12px;color:var(--muted,#5b6b84);margin:8px 0 0}
.dash-actions{margin-top:10px}
.dash-btn{display:block;width:100%;border:none;border-radius:14px;padding:12px;font-family:inherit;font-size:15px;font-weight:800;cursor:pointer;color:#fff}
.dash-btn.go{background:linear-gradient(135deg,#1d6fd8,#0b4fa8);box-shadow:0 4px 14px rgba(29,111,216,.3)}
.dash-btn.rev{background:linear-gradient(135deg,#e8a51c,#d4760e);margin-top:8px}
.dash-weak{margin-top:14px;border-top:1px dashed #e3d3b0;padding-top:12px}
.dash-weak-head b{font-size:14.5px}
.dash-weak-head small{display:block;font-size:12px;color:var(--muted,#5b6b84);margin-top:2px}
.dash-weak-chips{display:flex;flex-wrap:wrap;gap:6px;margin-top:8px}
.weak-chip{border:1.5px solid #d4760e;background:transparent;color:inherit;border-radius:10px;padding:6px 10px;font-family:inherit;font-size:13px;font-weight:700;cursor:pointer;direction:ltr}
.weak-chip small{color:#d4760e}

/* ═══ v33: نظام الكلمات ═══ */
.fc-modes{display:flex;gap:6px;margin:10px 0;flex-wrap:wrap;justify-content:center}
.fc-mode{border:1.5px solid var(--blue,#0055A4);background:transparent;color:inherit;border-radius:12px;padding:8px 14px;font-family:inherit;font-size:13px;font-weight:800;cursor:pointer}
.fc-mode.on{background:linear-gradient(135deg,#0055A4,#8f7cc4);color:#fff;border-color:transparent}
.fc-set-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(105px,1fr));gap:8px;margin:8px 0 12px;max-height:220px;overflow-y:auto}
.fc-set{border:1.5px solid #e3d3b0;background:var(--card,#fff);color:inherit;border-radius:12px;padding:10px 6px;font-family:inherit;font-size:12.5px;font-weight:800;cursor:pointer}
.fc-set small{display:block;font-weight:400;font-size:11px;color:var(--muted);margin-top:3px}
.fc-set.on{border-color:var(--amber,#f59e0b);background:linear-gradient(135deg,#fff8ec,#ffefd0)}
.fc-know-row{display:flex;gap:8px;margin:10px 0}
.know-btn{flex:1;border:none;border-radius:12px;padding:11px 6px;font-family:inherit;font-size:13.5px;font-weight:800;cursor:pointer;color:#fff}
.know-btn.ok{background:linear-gradient(135deg,#10b981,#0d9b64)}
.know-btn.no{background:linear-gradient(135deg,#ef4444,#c62828)}
.know-btn.sayb{background:linear-gradient(135deg,#0055A4,#3d7bd6);flex:.8}
.fc-quiz-link{display:inline-block;margin-inline-start:8px;border:none;background:linear-gradient(135deg,#f59e0b,#d4760e);color:#fff;border-radius:10px;padding:5px 12px;font-family:inherit;font-size:12.5px;font-weight:800;cursor:pointer}
.hard-box{margin-top:14px;border:1.5px dashed #ef9a9a;border-radius:14px;padding:12px;background:rgba(239,68,68,.05)}
.hard-box>b{font-size:14px}
.hard-list{margin-top:8px}
.hard-row{display:flex;align-items:center;gap:8px;padding:6px 0;border-bottom:1px dashed rgba(0,0,0,.08)}
.hard-row:last-child{border-bottom:none}
.hard-fr{direction:ltr;font-weight:800;font-size:13.5px}
.hard-ar{flex:1;color:var(--muted);font-size:12.5px}
.hard-say,.hard-ok{border:none;background:transparent;font-size:16px;cursor:pointer}

/* ═══ v34: شرح الإجابات + سجل الدرجات ═══ */
.q-why{margin-top:10px;background:#fff8e6;border:1.5px solid #efd78f;border-radius:12px;padding:10px 12px;font-size:13.5px;line-height:1.9;color:#6b5300;text-align:right}
.q-why.ok{background:#e8f9f0;border-color:#9fe0bc;color:#0b6b41}
.hist-box{background:var(--card,#fff);border:1px solid #e3d3b0;border-radius:16px;padding:12px 14px;margin-bottom:12px}
.hist-box>b{font-size:15px}
.hist-list{margin-top:8px}
.hist-row{display:flex;align-items:center;gap:8px;padding:5px 0;border-bottom:1px dashed rgba(0,0,0,.08);font-size:12.5px}
.hist-row:last-child{border-bottom:none}
.hist-t{flex:1;font-weight:700}
.hist-s{font-weight:900;min-width:44px;text-align:center;border-radius:8px;padding:2px 6px}
.hist-s.g{background:#e8f9f0;color:#0b6b41}
.hist-s.y{background:#fff8e6;color:#8a6d00}
.hist-s.r{background:#fdeaea;color:#a02020}
.hist-d{color:var(--muted);font-size:11.5px}
.full-exam{border:2px solid var(--amber,#f59e0b)}

/* ═══ v35: القواعد الموضوعي + المدرس ═══ */
.tutor{border:2px solid var(--lav,#8f7cc4)}
.tutor-row{display:flex;gap:8px;margin-top:8px}
.tutor-row input{flex:1;border:1.5px solid #e3d3b0;border-radius:12px;padding:11px 12px;font-family:inherit;font-size:14px;background:var(--card,#fff);color:inherit;min-width:0}
.tutor-row button{border:none;border-radius:12px;padding:11px 18px;font-family:inherit;font-size:14.5px;font-weight:800;cursor:pointer;color:#fff;background:linear-gradient(135deg,#7e6ab8,#8f7cc4)}
.tutor-chips{display:flex;flex-wrap:wrap;gap:6px;margin-top:10px}
.tutor-chip{border:1.5px solid var(--lav,#8f7cc4);background:transparent;color:inherit;border-radius:10px;padding:6px 12px;font-family:inherit;font-size:12.5px;font-weight:800;cursor:pointer}
.t-ans{margin-top:12px;background:rgba(143,124,196,.08);border:1.5px solid var(--lav,#8f7cc4);border-radius:14px;padding:12px 14px}
.t-q{direction:ltr;text-align:left;font-weight:800;font-size:14.5px}
.t-ar{color:var(--muted);font-size:13px;margin:4px 0 8px}
.t-opt{border-radius:10px;padding:7px 10px;font-size:13.5px;font-weight:800;margin:4px 0;direction:ltr;text-align:left}
.t-opt.ok{background:#e8f9f0;color:#0b6b41;border:1px solid #9fe0bc}
.t-opt.no{background:#fdeaea;color:#a02020;border:1px solid #f0b4b4}
.t-why{margin-top:8px;font-size:13.5px;line-height:1.9}
.t-topic-t{font-weight:900;font-size:15px;margin-bottom:6px}
.t-p{font-size:13.5px;line-height:1.9;margin:6px 0}
.t-open{margin-top:8px;border:none;border-radius:10px;padding:8px 14px;font-family:inherit;font-size:13px;font-weight:800;cursor:pointer;color:#fff;background:linear-gradient(135deg,#0055A4,#3d7bd6)}
.g2-title{margin:18px 0 10px}
.g2-topic{background:var(--card,#fff);border:1px solid #e3d3b0;border-radius:16px;margin-bottom:10px;overflow:hidden}
.g2-head{display:flex;justify-content:space-between;align-items:center;padding:14px 16px;cursor:pointer;font-weight:900;font-size:15.5px}
.g2-chev{color:var(--muted);transition:transform .25s}
.g2-topic.open .g2-chev{transform:rotate(180deg)}
.g2-body{display:none;padding:0 16px 14px}
.g2-topic.open .g2-body{display:block}
.g2-p{font-size:13.5px;line-height:1.95;margin:8px 0;color:inherit}
.g2-ex{margin:10px 0}
.g2-row{display:flex;gap:8px;align-items:center;padding:6px 0;border-bottom:1px dashed rgba(0,0,0,.08)}
.g2-row:last-child{border-bottom:none}
.g2-say{border:none;background:transparent;font-size:16px;cursor:pointer}
.g2-fr{font-weight:800;font-size:13.5px;text-align:left}
.g2-ar{color:var(--muted);font-size:12.5px}
.g2-quiz-btn{width:100%;margin-top:6px}
.g2-quizbox{margin-top:10px}

/* ═══ v36: كشكول الأخطاء + الإعدادات ═══ */
#mistake-card{margin-bottom:12px}
.nb2-empty{background:var(--card,#fff);border:1.5px dashed #e3d3b0;border-radius:14px;padding:12px 14px;font-size:13px;color:var(--muted);text-align:center}
.nb2-box{background:var(--card,#fff);border:1px solid #e3d3b0;border-radius:16px;padding:12px 14px}
.nb2-head{display:flex;justify-content:space-between;align-items:center;gap:8px;flex-wrap:wrap}
.nb2-head b{font-size:15px}
.nb2-retest{border:none;border-radius:10px;padding:8px 14px;font-family:inherit;font-size:12.5px;font-weight:800;cursor:pointer;color:#fff;background:linear-gradient(135deg,#ef4444,#c62828)}
.nb2-list{margin-top:8px}
.nb2-row{padding:8px 0;border-bottom:1px dashed rgba(0,0,0,.08)}
.nb2-row:last-child{border-bottom:none}
.nb2-q{font-weight:800;font-size:13.5px;text-align:right}
.nb2-a{font-size:13px;margin-top:3px;color:#0b6b41}
.nb2-a s{color:#a02020;margin-inline-start:6px}
.nb2-why{font-size:12.5px;color:#6b5300;background:#fff8e6;border-radius:8px;padding:5px 8px;margin-top:4px;line-height:1.8}
.nb2-meta{font-size:11px;color:var(--muted);margin-top:3px}
.nb2-more{font-size:12px;color:var(--muted);margin-top:6px;text-align:center}
#settings-btn{position:fixed;top:62px;left:12px;z-index:60;width:42px;height:42px;border-radius:50%;border:none;background:var(--card,#fff);box-shadow:0 4px 14px rgba(0,0,0,.18);font-size:19px;cursor:pointer}
.settings-box{text-align:right}
.set-row{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:10px 0;border-bottom:1px dashed rgba(0,0,0,.1)}
.set-row.set-col{flex-direction:column;align-items:stretch}
.set-toggle{border:none;border-radius:99px;padding:7px 16px;font-family:inherit;font-size:13px;font-weight:800;cursor:pointer;background:#10b981;color:#fff}
.set-toggle.off{background:#94a3b8}
.set-fs{display:flex;gap:6px}
.set-fs button{border:1.5px solid var(--blue,#0055A4);background:transparent;color:inherit;border-radius:10px;padding:6px 14px;font-family:inherit;font-size:13px;font-weight:800;cursor:pointer}
.set-fs button.on{background:var(--blue,#0055A4);color:#fff}
.set-note{font-size:12px;color:var(--muted);line-height:1.8;margin:6px 0}
.set-btns{display:flex;gap:8px;flex-wrap:wrap}
#set-backup{width:100%;min-height:70px;border:1.5px solid #e3d3b0;border-radius:10px;padding:8px;font-family:inherit;font-size:11px;margin-top:8px;background:var(--card,#fff);color:inherit;direction:ltr}
.modal{position:fixed;inset:0;background:rgba(10,16,32,.55);display:none;align-items:center;justify-content:center;z-index:100;padding:16px}
.modal.open{display:flex}
.settings-box{background:var(--card,#fff);border-radius:20px;padding:18px;max-width:420px;width:100%;max-height:86vh;overflow-y:auto}

/* ═══ v37: إصلاح شامل للوضع الليلي ═══ */
html.dark { --card:#1b2d47; --ink:#e8f0fa; --muted:#9db6d8; --cream:#122238; }
html.dark .dash, html.dark .hist-box, html.dark .fc-set, html.dark .g2-topic, html.dark .nb2-box, html.dark .nb2-empty,
html.dark .tutor-row input, html.dark .dash-namerow input, html.dark .settings-box, html.dark #set-backup { border-color:#2c4a70 !important; }
html.dark .dash-hi h3 { color:#eaf3ff; }
html.dark .dash-bar { background:#24405f; }
html.dark .dash-weak { border-top-color:#2c4a70; }
html.dark .fc-set small { color:#9db6d8; }
html.dark .fc-set.on { background:linear-gradient(135deg,#33290f,#4a3a12); border-color:#f2c94c; }
html.dark .hard-box { background:rgba(239,68,68,.1); border-color:#6b3340; }
html.dark .hard-row, html.dark .hist-row, html.dark .g2-row, html.dark .nb2-row { border-bottom-color:rgba(255,255,255,.1); }
html.dark .q-why { background:#33290f !important; border-color:#8a6d00 !important; color:#f2d98c !important; }
html.dark .q-why.ok { background:#123324 !important; border-color:#2e7d54 !important; color:#8fe6bb !important; }
html.dark .hist-s.g { background:#123324; color:#8fe6bb; }
html.dark .hist-s.y { background:#33290f; color:#f2d98c; }
html.dark .hist-s.r { background:#3a1f26; color:#ff9aa6; }
html.dark .t-opt.ok { background:#123324; color:#8fe6bb; border-color:#2e7d54; }
html.dark .t-opt.no { background:#3a1f26; color:#ff9aa6; border-color:#6b3340; }
html.dark .t-ans { background:rgba(143,124,196,.12); }
html.dark .w small, html.dark .w-ar { color:#9db6d8 !important; }
html.dark button.w:active, html.dark button.w.playing { background:#1d3554 !important; border-color:#4a86c2 !important; }
html.dark .q-opt { background:#122238 !important; border-color:#24405f !important; color:#e8f0fa !important; }
html.dark .q-opt.right { background:#123324 !important; border-color:#22c55e !important; color:#8fe6bb !important; }
html.dark .q-opt.wrong { background:#3a1f26 !important; border-color:#ef4444 !important; color:#ff9aa6 !important; }
html.dark .grammar-in { background:#122238 !important; border-color:#24405f !important; }
html.dark .grammar-in h5 { color:#ff8a80 !important; }
html.dark .grammar-d { background:#0f1e33 !important; border-color:#33507a !important; }
html.dark .rep-graph { background:#122238 !important; }
html.dark .rep-day { background:#0f1e33 !important; border-color:#24405f !important; }
html.dark .rep-day b { color:#7d9ac2 !important; }
html.dark .rep-day.on { background:#123324 !important; border-color:#2e7d54 !important; }
html.dark .rep-day.on b { color:#5fd39a !important; }
html.dark .video-c, html.dark .video-note { color:#9db6d8 !important; }
html.dark .exam-card h3 { color:#eaf3ff !important; }
html.dark .exam-card p { color:#9db6d8 !important; }
html.dark .cert, html.dark .board { background:linear-gradient(160deg,#1b2d47,#172740) !important; border:1px solid #2c4a70 !important; }
html.dark .cert-head h3 { color:#a8ccf0 !important; }
html.dark .cert-row { background:#122238 !important; }
html.dark .cert-tx b { color:#e8f0fa !important; }
html.dark .cert-tx small { color:#7d9ac2 !important; }
html.dark .board-namerow { color:#9db6d8 !important; }
html.dark .board-namerow input { background:#122238 !important; border-color:#2c4a70 !important; color:#e8f0fa !important; }
html.dark .board-row { background:#122238 !important; }
html.dark .board-row.me { background:linear-gradient(160deg,#1d3554,#1a2c46) !important; }
html.dark .board-rank, html.dark .board-pts { color:#a8ccf0 !important; }
html.dark .board-name { color:#e8f0fa !important; }
html.dark .nb2-head b, html.dark .nb2-q { color:#e8f0fa; }
html.dark .nb2-a { color:#8fe6bb; }
html.dark .nb2-a s { color:#ff9aa6; }
html.dark .nb2-why { background:#33290f; color:#f2d98c; }
html.dark .nb2-empty { background:#122238; border-color:#2c4a70; }
html.dark .settings-box { background:#1b2d47 !important; color:#e8f0fa; }
html.dark .set-row { border-bottom-color:rgba(255,255,255,.12); }
html.dark .set-fs button { color:#e8f0fa; }
html.dark #set-backup { background:#122238 !important; border-color:#2c4a70 !important; }

/* ═══ v37: ترتيب الأيقونات ═══ */
.tab { min-height: 58px; justify-content: center; gap: 4px; padding: 7px 2px; }
.tab .ic { width: 24px; height: 24px; padding: 5px; border-radius: 9px; display: block; margin: 0 auto; }
.tabbar { gap: 4px; padding: 7px; }
.big-btn { display: flex; align-items: center; justify-content: center; gap: 6px; text-align: center; }

/* ═══ v37: معمل النطق ═══ */
.lab-box{background:var(--card,#fff);border:1px solid #e3d3b0;border-radius:18px;padding:16px;margin-bottom:12px}
.lab-box h3{font-size:18px;margin-bottom:6px}
.lab-hint{font-size:12.5px;color:var(--muted);line-height:1.9;background:rgba(0,85,164,.06);border-radius:10px;padding:8px 10px;margin-bottom:10px}
html.dark .lab-hint{background:rgba(111,163,216,.1);color:#9db6d8}
.lab-stats{font-size:13.5px;font-weight:800;color:var(--blue,#0055A4);margin-bottom:8px}
html.dark .lab-stats{color:#a8ccf0}
.lab-nosr{text-align:center;padding:18px 10px}
.lab-nosr p{font-size:13.5px;line-height:1.9;margin-top:8px;color:var(--muted)}
.lab-modes{display:flex;gap:6px;margin:8px 0 12px}
.lab-modes button{flex:1;border:1.5px solid var(--blue,#0055A4);background:transparent;color:inherit;border-radius:12px;padding:9px 4px;font-family:inherit;font-size:13px;font-weight:800;cursor:pointer}
.lab-modes button.on{background:linear-gradient(135deg,#0055A4,#8f7cc4);color:#fff;border-color:transparent}
.lab-units{display:flex;gap:6px;flex-wrap:wrap;justify-content:center}
.lab-units button{border:1.5px solid #e3d3b0;background:var(--card,#fff);color:inherit;border-radius:10px;padding:7px 12px;font-family:inherit;font-size:12.5px;font-weight:800;cursor:pointer}
.lab-units button.on{border-color:var(--amber,#f59e0b);background:linear-gradient(135deg,#fff8ec,#ffefd0)}
html.dark .lab-units button{border-color:#2c4a70}
html.dark .lab-units button.on{background:linear-gradient(135deg,#33290f,#4a3a12);border-color:#f2c94c}
.lab-round{text-align:center;padding:6px 0}
.lab-round-head{display:flex;justify-content:space-between;font-weight:800;font-size:13.5px;color:var(--muted)}
.lab-word{font-size:26px;font-weight:900;direction:ltr;margin:14px 0 4px;color:var(--ink)}
.lab-ar{font-size:14px;color:var(--muted);margin-bottom:12px}
.lab-mic{display:block;margin:14px auto 8px;width:74px;height:74px;border-radius:50%;border:none;font-size:32px;cursor:pointer;background:linear-gradient(135deg,#ef4444,#c62828);box-shadow:0 6px 20px rgba(239,68,68,.4);transition:transform .15s}
.lab-mic:active{transform:scale(.93)}
.lab-mic.rec{animation:labpulse 1.1s infinite;background:linear-gradient(135deg,#c62828,#8e1616)}
@keyframes labpulse{0%{box-shadow:0 0 0 0 rgba(239,68,68,.5)}70%{box-shadow:0 0 0 18px rgba(239,68,68,0)}100%{box-shadow:0 0 0 0 rgba(239,68,68,0)}}
.lab-status{font-size:13px;color:var(--muted);margin-top:6px}
.lab-heard{font-size:13.5px;margin-top:10px;color:var(--ink)}
.lab-marks{display:flex;flex-wrap:wrap;gap:6px;justify-content:center;margin-top:8px}
.lab-mark{border-radius:10px;padding:5px 10px;font-size:13px;font-weight:800}
.lab-mark.ok{background:#e8f9f0;color:#0b6b41;border:1px solid #9fe0bc}
.lab-mark.no{background:#fdeaea;color:#a02020;border:1px solid #f0b4b4}
html.dark .lab-mark.ok{background:#123324;color:#8fe6bb;border-color:#2e7d54}
html.dark .lab-mark.no{background:#3a1f26;color:#ff9aa6;border-color:#6b3340}
.lab-score{font-size:17px;font-weight:900;margin-top:10px}
.lab-hist-sec{margin-top:12px;text-align:right}
.lab-hist-sec>b{font-size:14px}
.lab-hist-row{display:flex;justify-content:space-between;align-items:center;gap:8px;width:100%;border:none;background:transparent;color:inherit;font-family:inherit;padding:7px 4px;border-bottom:1px dashed rgba(0,0,0,.08);font-size:13.5px;cursor:pointer;text-align:left}
.lab-hist-row.static{cursor:default}
html.dark .lab-hist-row{border-bottom-color:rgba(255,255,255,.1)}
.lab-hist-row .ok{color:#0b6b41;font-weight:900}
.lab-hist-row .mid{color:#8a6d00;font-weight:900}
.lab-hist-row .no{color:#a02020;font-weight:900}
html.dark .lab-hist-row .ok{color:#8fe6bb}
html.dark .lab-hist-row .mid{color:#f2d98c}
html.dark .lab-hist-row .no{color:#ff9aa6}

/* ═══ v38: غرفة المحادثة ═══ */
.room-box{background:var(--card,#fff);border:1px solid #e3d3b0;border-radius:18px;padding:16px;margin-bottom:12px}
.room-box h3{font-size:18px;margin-bottom:6px}
.room-hint{font-size:12.5px;color:var(--muted);line-height:1.9;background:rgba(0,85,164,.06);border-radius:10px;padding:8px 10px;margin-bottom:10px}
html.dark .room-hint{background:rgba(111,163,216,.1);color:#9db6d8}
.room-scene{font-size:13px;line-height:1.9;color:var(--muted);background:rgba(143,124,196,.08);border-radius:10px;padding:8px 10px;margin-bottom:10px}
.room-item{display:flex;align-items:center;gap:12px;width:100%;background:var(--card,#fff);border:1.5px solid #e3d3b0;border-radius:16px;padding:12px;margin-bottom:8px;cursor:pointer;font-family:inherit;text-align:right;color:inherit}
html.dark .room-item{border-color:#2c4a70}
.room-ic{font-size:26px}
.room-tx{flex:1;display:flex;flex-direction:column}
.room-tx b{font-size:15.5px}
.room-tx small{color:var(--muted);font-size:12px;margin-top:2px}
.room-round-head{display:flex;justify-content:space-between;font-weight:800;font-size:13.5px;color:var(--muted);margin-bottom:10px}
.room-bot{display:flex;gap:10px;align-items:flex-start;margin-bottom:12px}
.room-avatar{font-size:30px}
.room-bubble{flex:1;background:#eef4fb;border-radius:16px 16px 16px 4px;padding:10px 12px}
html.dark .room-bubble{background:#122238}
.room-fr{font-weight:800;font-size:15px;text-align:left;color:#22385c}
html.dark .room-fr{color:#e8f0fa}
.room-ar{font-size:12.5px;color:var(--muted);margin-top:3px}
.room-say{margin-top:6px;border:none;border-radius:8px;padding:5px 12px;font-family:inherit;font-size:12px;font-weight:800;cursor:pointer;color:#fff;background:linear-gradient(135deg,#0055A4,#3d7bd6)}
.room-choices{display:grid;gap:8px}
.room-choice{border:1.5px solid #e3d3b0;background:var(--card,#fff);border-radius:14px;padding:10px 12px;font-family:inherit;cursor:pointer;text-align:right;color:inherit;display:flex;flex-direction:column;gap:2px}
html.dark .room-choice{border-color:#2c4a70}
.room-c-fr{font-weight:800;font-size:14px;text-align:left}
.room-c-ar{font-size:12px;color:var(--muted)}
.room-choice.ok{background:#e8f9f0 !important;border-color:#22c55e !important}
.room-choice.no{background:#fdeaea !important;border-color:#ef4444 !important}
html.dark .room-choice.ok{background:#123324 !important}
html.dark .room-choice.no{background:#3a1f26 !important}
.room-micbtn{display:block;width:100%;margin-top:10px;border:none;border-radius:14px;padding:12px;font-family:inherit;font-size:14.5px;font-weight:800;cursor:pointer;color:#fff;background:linear-gradient(135deg,#ef4444,#c62828)}
.room-micbtn.rec{animation:labpulse 1.1s infinite}
.room-nosr{margin-top:10px;font-size:12.5px;color:var(--muted);text-align:center}
.room-status{margin-top:10px;font-size:14px;font-weight:800;line-height:1.9;text-align:center}
.room-status small{font-weight:400;color:var(--muted)}
.room-next-row{margin-top:10px}

/* ═══ v39: تحدي الأسبوع + التحليلات ═══ */
.wk-box{background:var(--card,#fff);border:1px solid #e3d3b0;border-radius:18px;padding:16px;margin-bottom:12px}
.wk-box h3{font-size:18px}
.wk-hint{font-size:12.5px;color:var(--muted);line-height:1.9}
.stt-box{background:var(--card,#fff);border:1px solid #e3d3b0;border-radius:18px;padding:16px;margin-bottom:12px}
.stt-box h3{font-size:18px;margin-bottom:10px}
.stt-grid{display:grid;grid-template-columns:repeat(2,1fr);gap:8px;margin-bottom:12px}
.stt-cell{background:var(--cream,#f7f3ea);border:1px solid #e3d3b0;border-radius:14px;padding:10px;display:flex;flex-direction:column;gap:2px;text-align:center}
html.dark .stt-cell{background:#122238;border-color:#2c4a70}
.stt-cell span{font-size:12px;color:var(--muted);font-weight:800}
.stt-cell b{font-size:20px}
.stt-cell small{font-size:11px;color:var(--muted)}
.stt-sec{margin-top:12px;border-top:1px dashed #e3d3b0;padding-top:10px}
html.dark .stt-sec{border-top-color:#2c4a70}
.stt-sec>b{font-size:14px}
.stt-bar{height:10px;border-radius:99px;background:#e3d3b0;overflow:hidden;margin:8px 0 4px}
html.dark .stt-bar{background:#24405f}
.stt-bar i{display:block;height:100%;background:linear-gradient(90deg,#10b981,#0055A4)}
.stt-line{font-size:13px;line-height:1.9;margin-top:4px}
.stt-weak{display:flex;flex-wrap:wrap;gap:6px;margin-top:8px}
.stt-tips{background:rgba(143,124,196,.08);border-radius:12px;padding:10px 12px;border-top:none}
.t-lvl{font-size:12px;color:var(--muted);margin:6px 0 0}

/* v42: مركز المراجعة */
.rev-head h3{margin-bottom:4px}
.rev-list{display:flex;flex-direction:column;gap:10px;margin:12px 0}
.rev-step{display:flex;align-items:center;justify-content:space-between;gap:10px;background:var(--card,#fff);border:1px solid var(--line,#e4e9f2);border-radius:16px;padding:12px 14px;box-shadow:0 2px 10px rgba(13,43,69,.06)}
.rev-step.done{opacity:.75}
.rev-info{display:flex;flex-direction:column;gap:2px}
.rev-info b{font-size:14.5px}
.rev-info small{color:var(--ink2,#5b7290);font-size:12px;line-height:1.7}
.rev-done{color:#16a34a;font-weight:700;font-size:13px;white-space:nowrap}
.rev-empty{background:var(--card,#fff);border:1px solid var(--line,#e4e9f2);border-radius:16px;padding:18px;text-align:center;font-weight:700;line-height:2}
.rev-foot{margin-top:12px;font-size:13px;color:var(--ink2,#5b7290);background:var(--bg2,#f2f6fc);border-radius:12px;padding:10px 12px;line-height:1.9}

/* ═══ v43: نطق تقريبي + مفضلة + اتصال + سبلاش ═══ */
.fc-phon{display:block;margin-top:6px;font-size:17px;font-weight:700;color:#7a5af8;min-height:20px;letter-spacing:.3px}
.dark .fc-phon{color:#b9a5ff}
.know-btn.favb{font-size:22px;padding:8px 14px;background:#fff7e0;border:2px solid #f2d67c;color:#b8860b}
.know-btn.favb.on{background:linear-gradient(135deg,#ffd94d,#ffb300);border-color:#e8a400;color:#5c3d00;transform:scale(1.06)}
.dark .know-btn.favb{background:#3a3a52;border-color:#6b5fae;color:#d9ccff}
.dark .know-btn.favb.on{background:linear-gradient(135deg,#8a6a00,#b8860b);color:#ffe9a8}
#conn-chip{position:fixed;top:12px;inset-inline-start:12px;z-index:60;border:none;border-radius:999px;padding:6px 13px;font:700 12.5px Tajawal,sans-serif;cursor:pointer;box-shadow:0 3px 10px rgba(20,40,80,.18);transition:all .3s}
#conn-chip.on{background:#e3f8ee;color:#0d7a45}
#conn-chip.off{background:#ffe4e0;color:#b3371f;animation:connPulse 2s infinite}
@keyframes connPulse{50%{opacity:.65}}
#splash{position:fixed;inset:0;z-index:200;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:12px;background:linear-gradient(160deg,#0d1b33,#1d3461 55%,#27509b);transition:opacity .45s}
#splash.out{opacity:0;pointer-events:none}
#splash img{width:96px;height:96px;border-radius:24px;box-shadow:0 12px 34px rgba(0,0,0,.45);animation:spPop .6s cubic-bezier(.2,1.6,.4,1)}
#splash b{font:900 44px Tajawal,sans-serif;color:#fff}
#splash b span{color:#ffd94d}
#splash i{font:700 15px Tajawal,sans-serif;color:#bcd0f5;font-style:normal}
@keyframes spPop{from{transform:scale(.5);opacity:0}}

/* ═══ v44: بنّاء الجمل ═══ */
.games-title{margin:22px 0 4px;font:900 19px Tajawal,sans-serif;color:#22385c;text-align:center}
.dark .games-title{color:#dbe6ff}
.sb-game{max-width:560px;margin:0 auto}
.sb-head{display:flex;justify-content:space-between;font:800 15px Tajawal,sans-serif;color:#22385c;margin-bottom:10px}
.dark .sb-head{color:#dbe6ff}
.sb-ar{background:linear-gradient(135deg,#fff3d6,#ffe8b0);border-radius:14px;padding:14px;font:800 19px Tajawal,sans-serif;color:#6b4a00;text-align:center;margin-bottom:10px}
.dark .sb-ar{background:#3a3a52;color:#ffe9a8}
.sb-hear{display:block;margin:0 auto 12px;background:#eef2ff;border:2px solid #c3cffe;border-radius:999px;padding:7px 18px;font:700 14px Tajawal,sans-serif;color:#3b4a9e;cursor:pointer}
.sb-answer{min-height:56px;border:2px dashed #b6c3e2;border-radius:14px;padding:8px;display:flex;flex-wrap:wrap;gap:6px;align-items:center;justify-content:center;background:#fff;margin-bottom:12px}
.dark .sb-answer{background:#23233a;border-color:#4a5580}
.sb-ph{color:#94a3bd;font:700 13px Tajawal,sans-serif}
.sb-answer.shake{animation:sbShake .45s}
@keyframes sbShake{20%{transform:translateX(6px)}40%{transform:translateX(-6px)}60%{transform:translateX(4px)}80%{transform:translateX(-4px)}}
.sb-chips{display:flex;flex-wrap:wrap;gap:8px;justify-content:center;margin-bottom:14px}
.sb-chip{border:2px solid #7a5af8;background:#f4f1ff;color:#4527a0;border-radius:12px;padding:9px 14px;font:800 16px Tajawal,sans-serif;cursor:pointer;transition:all .15s;direction:ltr}
.sb-chip:active{transform:scale(.94)}
.sb-chip.used{opacity:.25;pointer-events:none}
.sb-chip.placed{background:linear-gradient(135deg,#7a5af8,#5b8cff);color:#fff;border-color:#5b8cff;pointer-events:auto}
.dark .sb-chip{background:#2b2b45;color:#cfc4ff;border-color:#6b5fae}
.dark .sb-chip.placed{background:linear-gradient(135deg,#6b4de0,#4a6fd0);color:#fff}
.sb-actions{display:flex;gap:10px;justify-content:center}
.sb-msg{text-align:center;margin-top:12px;font:800 16px Tajawal,sans-serif;min-height:24px}
.sb-ok{color:#0d7a45}.sb-no{color:#b3371f}

/* ═══ v45: محقق الاستماع ═══ */
.ld-sentence{background:#fff;border:2px solid #c3cffe;border-radius:14px;padding:14px;font:800 19px Tajawal,sans-serif;color:#22385c;text-align:center;margin-bottom:10px;letter-spacing:.4px}
.dark .ld-sentence{background:#23233a;color:#dbe6ff;border-color:#4a5580}
.ld-tip{text-align:center;color:#6b7b95;font:700 13px Tajawal,sans-serif;margin:0 0 12px}
.sb-chip.right{background:linear-gradient(135deg,#22b573,#0d9a5f)!important;color:#fff!important;border-color:#0d9a5f!important;opacity:1!important;pointer-events:none}

/* ═══ v46: عجلة الفرنساوي ═══ */
.wh-game{max-width:560px;margin:0 auto;text-align:center}
.wh-wrap{position:relative;width:210px;height:230px;margin:8px auto 14px}
.wh-pointer{position:absolute;top:-6px;left:50%;transform:translateX(-50%);font-size:26px;z-index:2;filter:drop-shadow(0 2px 2px rgba(0,0,0,.3))}
.wh-wheel{position:absolute;top:14px;left:50%;margin-left:-95px;width:190px;height:190px;border-radius:50%;border:6px solid #fff;box-shadow:0 10px 30px rgba(20,40,80,.28);transition:transform .3s}
.wh-lab{position:absolute;top:50%;left:50%;margin:-10px 0 0 -30px;width:60px;font:800 12.5px Tajawal,sans-serif;color:#fff;text-shadow:0 1px 3px rgba(0,0,0,.5);text-align:center}
#wh-spin:disabled{opacity:.5}

/* ═══ v47: عالم الكلمات ═══ */
.wu-game{max-width:560px;margin:0 auto}
.wu-unit{margin-bottom:10px}
.wu-unit-head{width:100%;display:flex;justify-content:space-between;align-items:center;background:#fff;border:2px solid #dbe4f5;border-radius:14px;padding:12px 16px;font:800 15px Tajawal,sans-serif;color:#22385c;cursor:pointer}
.dark .wu-unit-head{background:#23233a;color:#dbe6ff;border-color:#4a5580}
.wu-prog{background:#eef2ff;border-radius:999px;padding:3px 12px;font:800 13px Tajawal,sans-serif;color:#3b4a9e}
.dark .wu-prog{background:#2b2b45;color:#cfc4ff}
.wu-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(100px,1fr));gap:8px;padding:10px 2px}
.wu-planet{min-height:74px;border-radius:16px;border:2px solid #c9d4ea;background:#f4f7fd;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;padding:8px 6px;cursor:pointer;font-family:Tajawal,sans-serif;transition:all .2s}
.wu-planet small{font:700 11.5px Tajawal,sans-serif;color:#6b7b95}
.wu-planet b{font:800 13px Tajawal,sans-serif;color:#22385c;direction:ltr}
.wu-planet .wu-lock{font-size:20px;opacity:.6}
.wu-planet.open{background:linear-gradient(135deg,#e8fff3,#d2f5e5);border-color:#52c98e}
.wu-planet.open b{color:#0d6b45}
.wu-planet.just{animation:wuPop .8s}
@keyframes wuPop{0%{transform:scale(.6);box-shadow:0 0 0 0 rgba(82,201,142,.7)}60%{transform:scale(1.12)}100%{transform:scale(1);box-shadow:0 0 0 18px rgba(82,201,142,0)}}
.dark .wu-planet{background:#23233a;border-color:#4a5580}
.dark .wu-planet b{color:#dbe6ff}
.dark .wu-planet.open{background:linear-gradient(135deg,#123a2a,#0f4d33);border-color:#2e9e6b}
.dark .wu-planet.open b{color:#8df0c0}

/* ═══ v48: محقق القواعد ═══ */
.gd-bad{background:#ffe0dc;color:#b3371f;border-radius:6px;padding:1px 6px;text-decoration:underline wavy #e05656}

/* ═══ v49: مرآة النطق ═══ */
.pm-mic{display:block;margin:10px auto;font-size:34px;width:76px;height:76px;border-radius:50%;border:none;background:linear-gradient(135deg,#7a5af8,#5b8cff);cursor:pointer;box-shadow:0 8px 22px rgba(90,80,220,.4)}
.pm-mic.rec{animation:pmPulse 1s infinite;background:linear-gradient(135deg,#e05656,#e8862e)}
@keyframes pmPulse{50%{transform:scale(1.12)}}
.pm-mirror{background:#fff;border:2px solid #dbe4f5;border-radius:14px;padding:14px;margin-top:12px;text-align:center}
.dark .pm-mirror{background:#23233a;border-color:#4a5580}
.pm-pct{font:900 30px Tajawal,sans-serif;color:#22385c}
.dark .pm-pct{color:#dbe6ff}
.pm-words{margin:8px 0;font-size:17px;font-weight:800}
.pm-w{border-radius:6px;padding:1px 5px;margin:0 1px}
.pm-w.ok{background:#d9f7e8;color:#0d6b45}
.pm-w.no{background:#ffe0dc;color:#b3371f;text-decoration:underline wavy}
.pm-heard{font:700 12.5px Tajawal,sans-serif;color:#6b7b95;margin-top:6px}

/* ═══ v50: ساحة الإملاء ═══ */
.da-bar{height:10px;background:#e6ecf8;border-radius:99px;overflow:hidden;margin-bottom:12px}
.da-fill{height:100%;width:100%;background:linear-gradient(90deg,#22b573,#e8c22e,#e05656);border-radius:99px;transition:width .12s linear}
.dark .da-bar{background:#2b2b45}
.da-input{width:100%;box-sizing:border-box;border:2.5px solid #b6c3e2;border-radius:14px;padding:13px 16px;font:800 19px Tajawal,sans-serif;color:#22385c;text-align:center;margin:4px 0 12px;background:#fff}
.da-input:focus{outline:none;border-color:#7a5af8;box-shadow:0 0 0 4px rgba(122,90,248,.15)}
.dark .da-input{background:#23233a;color:#dbe6ff;border-color:#4a5580}
.da-combo{text-align:center;font:900 16px Tajawal,sans-serif;color:#e8862e;margin-bottom:8px;animation:pmPulse 1s infinite}

/* ═══ v51: تدريبات تكيفية ═══ */
.ad-level{display:flex;align-items:center;justify-content:space-between;background:#fff;border:2px solid #dbe4f5;border-radius:12px;padding:8px 14px;margin-bottom:12px;font:800 13.5px Tajawal,sans-serif;color:#22385c}
.dark .ad-level{background:#23233a;color:#dbe6ff;border-color:#4a5580}
.ad-meter{display:flex;gap:5px}
.ad-meter i{width:34px;height:9px;border-radius:99px;background:#e6ecf8}
.dark .ad-meter i{background:#3a3a52}
.ad-meter i.on:nth-child(1){background:#22b573}
.ad-meter i.on:nth-child(2){background:#e8c22e}
.ad-meter i.on:nth-child(3){background:#e05656}

/* ═══ v52: غرفة الهروب ═══ */
.er-locks{display:flex;gap:10px;justify-content:center;margin:6px 0 16px}
.er-lock{width:100px;padding:14px 6px;border-radius:16px;background:#f4f7fd;border:2px solid #c9d4ea;text-align:center;font-size:30px;display:flex;flex-direction:column;gap:6px;align-items:center}
.er-lock small{font:800 11px Tajawal,sans-serif;color:#6b7b95}
.er-lock.open{background:linear-gradient(135deg,#e8fff3,#d2f5e5);border-color:#52c98e;animation:wuPop .7s}
.er-lock.open small{color:#0d6b45}
.dark .er-lock{background:#23233a;border-color:#4a5580}
.dark .er-lock.open{background:linear-gradient(135deg,#123a2a,#0f4d33);border-color:#2e9e6b}

/* ═══ v53: أشعة الامتحان ═══ */
.xr-card{background:#fff;border:2px solid #dbe4f5;border-radius:16px;padding:14px;margin-bottom:12px}
.dark .xr-card{background:#23233a;border-color:#4a5580}
.xr-exam{font:800 14.5px Tajawal,sans-serif;color:#22385c;margin-bottom:12px;text-align:center}
.dark .xr-exam{color:#dbe6ff}
.xr-row{display:flex;align-items:center;gap:10px;margin:8px 0}
.xr-name{width:110px;font:800 14px Tajawal,sans-serif;color:#22385c;flex-shrink:0}
.dark .xr-name{color:#dbe6ff}
.xr-flag{font:800 10.5px Tajawal,sans-serif;color:#b3371f;background:#ffe4e0;border-radius:99px;padding:2px 8px;white-space:nowrap}
.xr-mid{flex:1}
.xr-bar{height:12px;background:#e6ecf8;border-radius:99px;overflow:hidden}
.dark .xr-bar{background:#3a3a52}
.xr-fill{height:100%;border-radius:99px;transition:width .8s}
.xr-fill.g{background:linear-gradient(90deg,#22b573,#4ade80)}
.xr-fill.y{background:linear-gradient(90deg,#e8c22e,#fbbf24)}
.xr-fill.r{background:linear-gradient(90deg,#e05656,#f87171)}
.xr-pct{width:48px;text-align:left;font:900 13px Tajawal,sans-serif;color:#41536e;flex-shrink:0}
.dark .xr-pct{color:#b9c6e2}
.xr-sub{font:700 12px Tajawal,sans-serif;color:#6b7b95;margin:-2px 0 8px;text-align:center}
.xr-fix{background:linear-gradient(135deg,#fff3d6,#ffe8b0);border:2px solid #f2d67c;border-radius:16px;padding:14px;text-align:center;font:800 14.5px Tajawal,sans-serif;color:#6b4a00;line-height:1.9}
.dark .xr-fix{background:#3a3a52;border-color:#6b5fae;color:#ffe9a8}

/* ═══ v54: متحف الإنجازات ═══ */
.ms-hall-title{font:900 17px Tajawal,sans-serif;color:#22385c;margin:16px 0 10px;text-align:center}
.ms-hall-title small{display:block;font:700 12px Tajawal,sans-serif;color:#6b7b95;margin-top:2px}
.dark .ms-hall-title{color:#dbe6ff}
.ms-hall{display:grid;grid-template-columns:repeat(auto-fill,minmax(105px,1fr));gap:10px;margin-bottom:6px}
.ms-ped{background:linear-gradient(180deg,#f4f7fd,#e9eef9);border:2px solid #c9d4ea;border-radius:14px 14px 8px 8px;border-bottom-width:6px;padding:12px 6px;text-align:center;display:flex;flex-direction:column;gap:4px;align-items:center}
.ms-ped .ms-statue{font-size:30px}
.ms-ped .ms-name{font:800 12.5px Tajawal,sans-serif;color:#22385c}
.ms-ped .ms-best{font:700 10.5px Tajawal,sans-serif;color:#6b7b95;line-height:1.5}
.ms-ped.locked{filter:grayscale(1);opacity:.55}
.ms-ped.bronze{background:linear-gradient(180deg,#fdf3e7,#f7e3c8);border-color:#d9a05b}
.ms-ped.gold{background:linear-gradient(180deg,#fff7db,#ffe9a8);border-color:#e8b72e;box-shadow:0 6px 18px rgba(232,183,46,.3)}
.ms-ped .ms-crown{font:800 11px Tajawal,sans-serif;color:#8a6a00}
.ms-bar{width:90%;height:7px;background:#e6ecf8;border-radius:99px;overflow:hidden}
.ms-bar i{display:block;height:100%;background:linear-gradient(90deg,#d9a05b,#e8b72e);border-radius:99px}
.dark .ms-ped{background:#23233a;border-color:#4a5580}
.dark .ms-ped .ms-name{color:#dbe6ff}
.dark .ms-ped.gold{background:linear-gradient(180deg,#4a3f10,#6b5a1a);border-color:#b8860b}
.dark .ms-ped.bronze{background:#2b2b45;border-color:#8a6a3b}

/* ═══ v55: محاكي الحياة ═══ */
.ls-day{display:flex;justify-content:center;gap:6px;margin-bottom:12px}
.ls-dot{width:38px;height:38px;border-radius:50%;background:#eef2ff;border:2px solid #c3cffe;display:flex;align-items:center;justify-content:center;font-size:18px;opacity:.45}
.ls-dot.done{opacity:1;background:#e8fff3;border-color:#52c98e}
.ls-dot.now{opacity:1;border-color:#7a5af8;background:#f4f1ff;animation:pmPulse 1.4s infinite}
.ls-opts{display:flex;flex-direction:column;gap:8px;margin-bottom:8px}
.ls-opt{border:2px solid #7a5af8;background:#f4f1ff;color:#4527a0;border-radius:14px;padding:12px 16px;font:800 15.5px Tajawal,sans-serif;cursor:pointer;text-align:left;transition:all .15s}
.ls-opt:active{transform:scale(.98)}
.ls-opt.used{opacity:.35;pointer-events:none}
.ls-opt.right{background:linear-gradient(135deg,#22b573,#0d9a5f);color:#fff;border-color:#0d9a5f;text-align:left}
.dark .ls-opt{background:#2b2b45;color:#cfc4ff;border-color:#6b5fae}
.dark .ls-opt.right{background:linear-gradient(135deg,#1a7a4e,#0d9a5f);color:#fff}
