@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@400;600;700;900&family=Caveat:wght@600;700&display=swap');

:root {
  --bg: #f4f6fb;
  --ink: #16213a;
  --muted: #6b7690;
  --accent: #2f5df6;
  --accent-dark: #1e44c2;
  --card: #ffffff;
  --line: #e3e8f4;
  --green: #0a9d6c;
  --orange: #e08a00;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: 'Cairo', 'Segoe UI', Tahoma, sans-serif;
  background: var(--bg);
  color: var(--ink);
  min-height: 100vh;
}

a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }

/* ---------- Footer (روابط المعلم والدعم) ---------- */
.site-footer {
  background: #fff; border-top: 1px solid var(--line);
  text-align: initial; padding: 0; margin-top: 34px;
}
.foot-inner {
  max-width: 1200px; margin: 0 auto; padding: 16px 24px;
  display: flex; align-items: center; justify-content: space-between;
  gap: 14px; flex-wrap: wrap;
}
.foot-brand { font-weight: 800; font-size: 13px; color: #46506e; }
.foot-links { display: flex; gap: 10px; flex-wrap: wrap; }
.foot-link {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 7px 15px; border-radius: 999px;
  background: #f1f4fb; color: #46506e;
  font-size: 12.5px; font-weight: 800; text-decoration: none;
  border: 1.5px solid transparent; transition: all .15s;
}
.foot-link svg { width: 15px; height: 15px; flex-shrink: 0; }
.foot-link:hover { background: #e9efff; transform: translateY(-1px); }
.foot-link.ig:hover { color: #d63384; border-color: #f3c6dd; }
.foot-link.yt:hover { color: #e02b20; border-color: #f6c8c5; }
.foot-link.wa:hover { color: #128c4b; border-color: #bfe6d2; }

/* فوتر صفحة الحصة — نحيف ولا يزاحم اللوح */
.site-footer.slim { margin-top: 0; flex-shrink: 0; }
.site-footer.slim .foot-inner { padding: 7px 24px; }
body.board-zoom .site-footer { display: none; }

/* ---------- Header صفحة الحصة — صفان منظّمان ---------- */
.lesson-topbar {
  max-width: 1780px;
  display: flex; flex-direction: column; gap: 7px;
  padding: 10px 20px;
}
.tb-top { display: flex; align-items: center; gap: 14px; min-width: 0; }
.tb-top #lesson-title {
  flex: 1; min-width: 0; margin: 0;
  font-size: 17px; font-weight: 900; color: #1d2438;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.tb-home { display: inline-flex; align-items: center; gap: 9px; text-decoration: none; flex-shrink: 0; }
.tb-home .tb-mark { width: 34px; height: 34px; border-radius: 10px; font-size: 16px; }
.tb-home-txt { font-weight: 900; font-size: 13.5px; color: #1d2438; line-height: 1.15; }
.tb-home-txt small { display: block; font-size: 10px; color: var(--muted); font-weight: 700; }
.tb-tools { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.tb-sep { width: 1px; height: 22px; background: var(--line); flex-shrink: 0; }
.tb-spacer { flex: 1; }
.tb-tools .chip { padding: 5px 12px; font-size: 12.5px; }
.tb-tools .badges { display: flex; gap: 8px; flex-wrap: wrap; }
.tb-tools .badge { font-size: 11.5px; }
@media (max-width: 700px) {
  .topbar-inner { padding: 10px 12px; gap: 8px; }
  .logo { font-size: 17px; gap: 8px; }
  .logo-mark { width: 34px; height: 34px; font-size: 16px; border-radius: 10px; }
  .logo small { display: none; }
  .chip { padding: 5px 10px; font-size: 12px; }
  .chip-label { display: none; }
  .hero h1 { font-size: 24px; }
}
@media (max-width: 640px) {
  .lesson-topbar { padding: 8px 10px; gap: 6px; }
  .tb-top { gap: 8px; }
  .back-btn { padding: 8px 12px; font-size: 12.5px; }
  .tb-home { display: none; }
  .tb-top #lesson-title { font-size: 14.5px; }
  .tb-tools { gap: 7px; }
  .tb-tools .chip { padding: 4px 9px; font-size: 11.5px; }
  .tb-tools .badge { font-size: 10px; padding: 3px 9px; }
  .tb-sep { display: none; }
  .controls-bar { padding: 8px 8px; gap: 6px; flex-wrap: wrap; }
  .play-btn { width: 46px; height: 46px; }
  .ctrl-btn { padding: 7px 10px; font-size: 12px; }
  .ask-btn { padding: 8px 14px; font-size: 12.5px; }
  .auto-img-card { max-width: 42% !important; }
  .auto-img-card img { max-height: 110px; }
}
@media (max-width: 640px) {
  .tb-home-txt { display: none; }
  .lesson-topbar { padding: 8px 12px; }
}

/* ---------- Header ---------- */
.topbar {
  background: #ffffffee;
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 50;
}
.topbar-inner {
  max-width: 1200px; margin: 0 auto; padding: 14px 24px;
  display: flex; align-items: center; gap: 16px;
}
.logo { display: flex; align-items: center; gap: 12px; font-weight: 900; font-size: 22px; }
.logo-mark {
  width: 42px; height: 42px; border-radius: 12px;
  background: linear-gradient(135deg, var(--accent), #7b9bff);
  display: grid; place-items: center; color: #fff; font-size: 20px; font-weight: 900;
  box-shadow: 0 4px 14px #2f5df644;
}
.logo small { display: block; font-size: 11px; color: var(--muted); font-weight: 600; }
.topbar .spacer { flex: 1; }
.chip-group { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.chip-label { font-size: 12px; color: var(--muted); font-weight: 700; }
.chip {
  padding: 6px 14px; border-radius: 999px; font-size: 13px; font-weight: 700;
  background: #eef1fb; color: #46506e; border: 1.5px solid transparent;
  transition: all .15s;
}
.chip:hover { background: #e3e9fd; }
.chip.active { background: var(--accent); color: #fff; box-shadow: 0 3px 10px #2f5df655; }

/* ---------- Home ---------- */
.hero {
  max-width: 1200px; margin: 0 auto; padding: 48px 24px 20px; text-align: center;
}
.hero h1 { font-size: 34px; font-weight: 900; }
.hero h1 em { color: var(--accent); font-style: normal; }
.hero p { color: var(--muted); margin-top: 10px; font-size: 16px; max-width: 640px; margin-inline: auto; line-height: 1.8; }
.hero .ai-badge {
  display: inline-flex; align-items: center; gap: 8px; margin-top: 18px;
  background: #fff; border: 1px solid var(--line); border-radius: 999px;
  padding: 8px 18px; font-size: 13px; font-weight: 700; color: #3d4a6b;
  box-shadow: 0 4px 18px #16213a10;
}
.hero .ai-badge .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--green); animation: pulse 1.6s infinite; }
@keyframes pulse { 0%,100% { opacity: 1; transform: scale(1);} 50% { opacity: .5; transform: scale(.8);} }

.grade-tabs {
  display: flex; gap: 12px; justify-content: center; margin: 30px auto 26px; padding: 0 24px;
  max-width: 1200px; flex-wrap: wrap;
}
/* التسلسل الشجري: صف التخصص فوق الصفوف، وصف الفرع تحت الصفوف */
.spec-tabs {
  display: flex; gap: 10px; justify-content: center; align-items: center;
  margin: 30px auto 0; padding: 0 24px; max-width: 1200px; flex-wrap: wrap;
}
.spec-tab {
  display: inline-flex; align-items: center; gap: 10px;
  background: #fff; border: 1.5px solid var(--line); border-radius: 16px;
  padding: 13px 30px; font-size: 15.5px; font-weight: 800; color: #46506e;
  transition: all .15s; box-shadow: 0 2px 8px #16213a08;
}
.spec-tab .sp-ic { font-size: 19px; line-height: 1; }
.spec-tab:hover { border-color: #b9c6f5; }
.spec-tab.active { background: var(--accent); color: #fff; border-color: var(--accent); box-shadow: 0 6px 20px #2f5df644; }
.spec-tabs + .grade-tabs { margin-top: 12px; }
.branch-tabs {
  display: flex; gap: 8px; justify-content: center; align-items: center;
  margin: -8px auto 20px; padding: 0 24px; max-width: 1200px; flex-wrap: wrap;
}
.branch-tab {
  background: #fff; border: 1.5px solid #e3e8f4; border-radius: 999px;
  padding: 8px 20px; font-size: 13.5px; font-weight: 800; color: #46506e;
  transition: all .15s;
}
.branch-tab:hover { border-color: #f2cf8f; }
.branch-tab.active { background: #e08a00; color: #fff; border-color: #e08a00; box-shadow: 0 3px 10px #e08a0044; }
.badge.opt { background: #f3ecfd; color: #7c3aed; }

/* ---------- نقطة تفاعلية داخل الحصة ---------- */
.cp-overlay {
  position: fixed; inset: 0; z-index: 1200;
  background: #101623bf; backdrop-filter: blur(4px);
  display: grid; place-items: center; padding: clamp(12px, 4dvh, 32px);
  opacity: 0; transition: opacity .3s;
}
.cp-overlay.on { opacity: 1; }
.cp-card {
  background: #fff; border-radius: 22px; max-width: 860px; width: 100%;
  min-height: 0; max-height: 100%; overflow: auto; padding: 26px 30px;
  overscroll-behavior: contain; overflow-wrap: anywhere;
  box-shadow: 0 24px 70px #16213a55;
}
.cp-card.shake { animation: cpshake .4s; }
@keyframes cpshake { 0%,100% { transform: translateX(0); } 25% { transform: translateX(-9px); } 75% { transform: translateX(9px); } }
.cp-head { font-weight: 900; font-size: 17px; color: var(--accent); margin-bottom: 12px; }
.cp-q { font-weight: 800; font-size: 18px; color: #1d2438; line-height: 1.9; margin-bottom: 16px; }
.cp-body { margin-bottom: 14px; }
.cp-opt {
  display: block; width: 100%; text-align: start;
  background: #f1f4fb; border: 1.5px solid transparent; border-radius: 14px;
  padding: 13px 18px; margin-bottom: 10px; font-weight: 700; font-size: 14.5px;
  color: #2b3350; transition: all .15s;
}
.cp-opt:hover { background: #e8eeff; border-color: #b9c6f5; }
.cp-opt.wrong { background: #fdeaea; border-color: #e08a8a; }
.cp-input {
  width: 100%; border: 1.5px solid var(--line); border-radius: 14px;
  padding: 14px 18px; font-size: 17px; font-weight: 800; font-family: inherit;
}
.cp-input:focus { outline: none; border-color: var(--accent); }
.cp-code {
  width: 100%; min-height: 130px; border: 1.5px solid var(--line); border-radius: 14px;
  padding: 14px 16px; font-family: Consolas, monospace; font-size: 14.5px;
  background: #f7f9fd; color: #1d2438; line-height: 1.7; resize: vertical;
}
.cp-code:focus { outline: none; border-color: var(--accent); }
.cp-actions { display: flex; gap: 10px; margin-top: 12px; }
.cp-run {
  background: var(--accent); color: #fff; border-radius: 12px;
  padding: 12px 26px; font-weight: 800; font-size: 14.5px;
}
.cp-run:disabled { opacity: .6; }
.cp-out {
  background: #101623; color: #b7f5c8; border-radius: 12px;
  padding: 14px 16px; font-family: Consolas, monospace; font-size: 13.5px;
  margin-top: 12px; white-space: pre-wrap; direction: ltr; text-align: left;
}
.cp-fb { font-weight: 800; font-size: 14px; line-height: 1.8; min-height: 22px; margin-bottom: 10px; }
.cp-fb.good { color: #0a9d6c; }
.cp-fb.bad { color: #cf3d3d; }
.cp-fb.info { color: #46506e; }
.cp-foot { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.cp-skip {
  background: none; border: 1.5px solid var(--line); border-radius: 999px;
  padding: 9px 20px; font-weight: 800; font-size: 13px; color: #6b7690;
}
.cp-reveal {
  background: #fff4e0; color: #e08a00; border-radius: 999px;
  padding: 9px 20px; font-weight: 800; font-size: 13px;
}

/* ---------- ميكروفون الأسئلة ---------- */
.qa-mic {
  width: 44px; height: 44px; border-radius: 12px; flex-shrink: 0;
  background: #eef1fb; font-size: 18px; transition: all .15s;
}
.qa-mic:hover { background: #e3e9fd; }
.qa-mic.rec { background: #fdeaea; animation: micpulse 1.1s infinite; }
@keyframes micpulse { 0%,100% { box-shadow: 0 0 0 0 #cf3d3d55; } 50% { box-shadow: 0 0 0 9px #cf3d3d00; } }

/* ---------- أزرار الكتاب: خريطة + اختبار ---------- */
.map-btn, .quiz-btn {
  background: #f1f4fb; border-radius: 999px; padding: 6px 15px;
  font-size: 12px; font-weight: 800; color: #46506e; transition: all .15s;
}
.map-btn:hover { background: #e3ecff; color: var(--accent); }
.quiz-btn { background: #e8f8f1; color: #0a9d6c; }
.quiz-btn:hover { background: #d0f0e3; }

/* ---------- خريطة تقدم الوحدة ---------- */
.roadmap-overlay {
  position: fixed; inset: 0; z-index: 90;
  background: #101623b8; backdrop-filter: blur(5px);
  display: grid; place-items: center; padding: 5%;
}
.roadmap-card {
  background: #fff; border-radius: 24px; max-width: 760px; width: 100%;
  max-height: 88vh; overflow: auto; padding: 26px 28px; position: relative;
  box-shadow: 0 24px 70px #16213a55;
}
.roadmap-close {
  position: absolute; top: 14px; inset-inline-end: 14px;
  width: 38px; height: 38px; border-radius: 12px; background: #f1f4fb;
  font-size: 15px; font-weight: 800; color: #46506e;
}
.roadmap-head { font-weight: 900; font-size: 17px; color: #1d2438; margin-bottom: 18px; padding-inline-end: 44px; }
.roadmap-path { display: flex; flex-direction: column; }
.roadmap-step {
  display: flex; gap: 14px; align-items: flex-start; position: relative;
  padding: 0 0 18px 0;
}
.roadmap-step::before {
  content: ''; position: absolute; top: 40px; inset-inline-start: 18px;
  width: 3px; height: calc(100% - 40px); background: var(--line);
}
.roadmap-step:last-child::before { display: none; }
.roadmap-dot {
  width: 38px; height: 38px; border-radius: 50%; flex-shrink: 0; z-index: 1;
  display: grid; place-items: center; font-weight: 900; font-size: 14px;
}
.roadmap-step.live .roadmap-dot { background: var(--accent); color: #fff; box-shadow: 0 3px 10px #2f5df655; }
.roadmap-step.soon .roadmap-dot { background: #eef1fb; color: #9aa3bd; }
.roadmap-box { flex: 1; padding-top: 4px; }
.roadmap-step.live:hover .roadmap-title { color: var(--accent); }
.roadmap-title { font-weight: 800; font-size: 14.5px; color: #1d2438; line-height: 1.6; }
.roadmap-meta { font-size: 12px; color: var(--muted); font-weight: 700; margin-top: 3px; }

/* ---------- صفحة الاختبار ---------- */
.quiz-main { flex: 1; min-height: 0; max-width: 860px; width: 100%; margin: 0 auto; padding: 22px 16px 30px; display: flex; flex-direction: column; }
.quiz-progress { display: flex; gap: 7px; justify-content: center; margin-bottom: 16px; flex-wrap: wrap; }
.qp-dot { width: 12px; height: 12px; border-radius: 50%; background: #d7dceb; }
.qp-dot.cur { background: var(--accent); }
.qp-dot.done { background: #9db1f7; }
.qp-dot.ok { background: var(--green); }
.qp-dot.no { background: #cf3d3d; }
.quiz-card {
  background: #fff; border-radius: 24px; padding: 30px 34px; flex: 1;
  box-shadow: 0 12px 40px #16213a14; overflow: auto;
}
.quiz-boot { text-align: center; color: var(--muted); font-weight: 700; padding: 40px 0; }
.quiz-intro { text-align: center; padding: 22px 0 12px; }
.quiz-big { font-size: 22px; font-weight: 900; color: #1d2438; margin-bottom: 10px; }
.quiz-sub { color: var(--muted); font-weight: 700; font-size: 14.5px; margin-bottom: 22px; }
.quiz-start {
  background: var(--accent); color: #fff; border-radius: 999px;
  padding: 14px 44px; font-weight: 900; font-size: 16px;
  box-shadow: 0 8px 24px #2f5df655;
}
.quiz-qhead { display: flex; justify-content: space-between; gap: 10px; align-items: center; margin-bottom: 16px; flex-wrap: wrap; }
.quiz-count { background: var(--accent); color: #fff; border-radius: 999px; padding: 5px 15px; font-size: 12.5px; font-weight: 800; }
.quiz-src { font-size: 12px; color: var(--muted); font-weight: 700; }
.quiz-q { font-size: 18px; font-weight: 800; color: #1d2438; line-height: 1.9; margin-bottom: 18px; }
.quiz-opts { display: flex; flex-direction: column; gap: 10px; }
.quiz-opt {
  text-align: start; background: #f1f4fb; border: 1.5px solid transparent;
  border-radius: 14px; padding: 14px 18px; font-weight: 700; font-size: 14.5px;
  color: #2b3350; transition: all .15s;
}
.quiz-opt:hover:not(:disabled) { background: #e8eeff; border-color: #b9c6f5; }
.quiz-opt.right { background: #e8f8f1; border-color: #0a9d6c; color: #0a9d6c; }
.quiz-opt.wrong { background: #fdeaea; border-color: #cf3d3d; color: #cf3d3d; }
.quiz-fb { font-weight: 800; font-size: 14px; line-height: 1.8; margin-top: 14px; }
.quiz-fb.good { color: #0a9d6c; }
.quiz-fb.bad { color: #cf3d3d; }
.quiz-next {
  margin-top: 14px; background: var(--accent); color: #fff; border-radius: 12px;
  padding: 12px 28px; font-weight: 800; font-size: 14.5px;
}
.quiz-result { text-align: center; padding: 10px 0; }
.quiz-score {
  width: 120px; height: 120px; border-radius: 50%; margin: 0 auto 16px;
  display: grid; place-items: center; font-size: 30px; font-weight: 900; color: #fff;
}
.quiz-score.pass { background: var(--green); box-shadow: 0 10px 30px #0a9d6c55; }
.quiz-score.fail { background: #e08a00; box-shadow: 0 10px 30px #e08a0055; }
.quiz-line { font-weight: 800; font-size: 15.5px; color: #1d2438; margin-bottom: 8px; }
.quiz-verdict { font-weight: 900; font-size: 17px; margin-bottom: 18px; }
.quiz-verdict.good { color: var(--green); }
.quiz-verdict.bad { color: #e08a00; }
.quiz-review { text-align: start; border-top: 1.5px dashed var(--line); padding-top: 14px; margin-bottom: 18px; }
.qr-row { font-size: 13px; font-weight: 700; color: #46506e; padding: 7px 0; line-height: 1.7; }
.qr-row.ok .qr-mark { color: var(--green); }
.qr-row.no .qr-mark { color: #cf3d3d; }
.qr-mark { font-weight: 900; margin-inline-end: 8px; }
.quiz-btns { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.quiz-again {
  background: var(--accent); color: #fff; border-radius: 999px;
  padding: 12px 32px; font-weight: 800; font-size: 14.5px;
}
.quiz-home {
  background: #fff; border: 1.5px solid var(--line); border-radius: 999px;
  padding: 12px 32px; font-weight: 800; font-size: 14.5px; color: #46506e; text-decoration: none;
}

/* ---------- نتاجات التعلم المطوية (أكورديون لكل مادة) ---------- */
.outcomes-toggle-btn {
  background: #eef1fb; border-radius: 999px; padding: 6px 15px;
  font-size: 12px; font-weight: 800; color: #4655a8; transition: all .15s;
}
.outcomes-toggle-btn:hover { background: #e0e8ff; color: var(--accent); }
.book-outcomes { display: none; margin-top: 6px; }
.book-outcomes.open { display: block; }
.outcome-block { margin-bottom: 10px; border: 1.5px solid var(--line); border-radius: 16px; background: #fff; overflow: hidden; }
.outcome-block.open { border-color: #b9c6f5; }
.outcome-toggle {
  width: 100%; display: flex; align-items: center; gap: 14px;
  padding: 14px 18px; text-align: start; background: #f8f9fd;
  transition: background .15s;
}
.outcome-toggle:hover { background: #eef2fe; }
.outcome-block.open .outcome-toggle { background: #eef1fd; }
.outcome-toggle .outcome-letter {
  width: 42px; height: 42px; border-radius: 12px; flex-shrink: 0;
  background: var(--accent); color: #fff; display: grid; place-items: center;
  font-weight: 900; font-size: 19px;
}
.outcome-block.open .outcome-letter { background: #0a9d6c; }
.outcome-toggle-txt { flex: 1; min-width: 0; }
.outcome-toggle .outcome-label { font-size: 11px; color: var(--muted); font-weight: 800; }
.outcome-toggle .outcome-title { font-size: 14.5px; font-weight: 800; color: #1d2438; line-height: 1.6; margin: 0; }
.oc-chev { font-size: 15px; color: #8a94ad; transition: transform .25s; flex-shrink: 0; }
.outcome-block.open .oc-chev { transform: rotate(180deg); color: var(--accent); }
.lesson-grid.collapsed { display: none; }
.lesson-grid.open { display: grid; animation: gridin .25s ease; }
@keyframes gridin { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
.grade-tab {
  background: #fff; border: 1.5px solid var(--line); border-radius: 16px;
  padding: 14px 30px; font-size: 16px; font-weight: 800; color: #46506e;
  transition: all .15s; box-shadow: 0 2px 8px #16213a08; text-align: center;
}
.grade-tab small { display: block; font-size: 11px; color: var(--muted); font-weight: 600; margin-top: 2px; }
.grade-tab:hover { border-color: #b9c6f5; }
.grade-tab.active { background: var(--accent); color: #fff; border-color: var(--accent); box-shadow: 0 6px 20px #2f5df644; }
.grade-tab.active small { color: #dce5ff; }

.lessons-wrap { max-width: 1200px; margin: 0 auto; padding: 0 24px 60px; }
.book-section { margin-bottom: 34px; }
.book-title { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.book-title .bicon {
  width: 38px; height: 38px; border-radius: 10px; background: #eef1fb;
  display: grid; place-items: center; font-size: 18px;
}
.book-title h2 { font-size: 18px; font-weight: 800; }
.book-title .unit-tag { font-size: 12px; background: #eef1fb; color: #46506e; padding: 3px 12px; border-radius: 999px; font-weight: 700; }

/* عداد الحصص + تغطية الوحدة */
.count-btn {
  background: var(--accent); color: #fff; font-size: 12.5px; font-weight: 800;
  padding: 8px 18px; border-radius: 999px; box-shadow: 0 3px 10px #2f5df644;
  transition: all .15s;
}
.count-btn:hover { background: var(--accent-dark); transform: scale(1.04); }
.coverage {
  width: 140px; height: 6px; background: #e3e8f4; border-radius: 4px; overflow: hidden;
}
.coverage-fill { height: 100%; background: var(--green); border-radius: 4px; }

/* رؤوس نتاجات التعلم */
.outcome-head { display: flex; gap: 14px; align-items: center; margin: 28px 0 14px; }
.outcome-letter {
  width: 46px; height: 46px; border-radius: 14px; flex-shrink: 0;
  background: linear-gradient(135deg, var(--accent), #7b9bff); color: #fff;
  display: grid; place-items: center; font-size: 22px; font-weight: 900;
  box-shadow: 0 4px 14px #2f5df644;
}
.outcome-label { font-size: 12px; color: var(--muted); font-weight: 800; }
.outcome-title { font-size: 16.5px; font-weight: 800; line-height: 1.6; }

/* شارات المعايير وحجم الحصة */
.badge.order { background: #16213a; color: #fff; }
.badge.crit { font-size: 11.5px; letter-spacing: .3px; }
.badge.crit.P { background: #e8f8f1; color: #0a9d6c; }
.badge.crit.M { background: #fff4e0; color: #e08a00; }
.badge.crit.D { background: #f3ecfd; color: #7c3aed; }
.crit-row { display: flex; gap: 6px; flex-wrap: wrap; }

/* كتب إضافية قريباً */
.book-soon-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 12px; }
.book-soon {
  background: #fff; border: 1px dashed #ccd3e6; border-radius: 14px;
  padding: 14px 16px; font-size: 13.5px; font-weight: 700; color: #46506e;
  display: flex; gap: 10px; align-items: center;
}
.book-soon .soon-tag2 {
  margin-inline-start: auto; font-size: 11px; color: var(--muted);
  background: #f1f3fa; padding: 3px 10px; border-radius: 999px; white-space: nowrap;
}

.lesson-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 16px; }
.lesson-card {
  background: var(--card); border: 1px solid var(--line); border-radius: 18px;
  padding: 20px 22px; display: flex; flex-direction: column; gap: 10px;
  transition: all .18s; position: relative; overflow: hidden;
}
.lesson-card:hover { transform: translateY(-3px); box-shadow: 0 10px 30px #16213a14; border-color: #b9c6f5; }
.lesson-card .badges { display: flex; gap: 8px; flex-wrap: wrap; }
.badge { font-size: 11px; font-weight: 800; padding: 4px 12px; border-radius: 999px; }
.badge.level { background: #e8f8f1; color: var(--green); }
.badge.time { background: #fff4e0; color: var(--orange); }
.badge.lang { background: #edf1fd; color: #4655a8; }
.lesson-card h3 { font-size: 17px; font-weight: 800; line-height: 1.5; }
.lesson-card p { font-size: 13px; color: var(--muted); line-height: 1.8; flex: 1; }
.lesson-card .start-btn {
  align-self: flex-start; background: var(--accent); color: #fff; font-weight: 800;
  padding: 10px 26px; border-radius: 12px; font-size: 14px;
  box-shadow: 0 4px 14px #2f5df644; transition: all .15s;
}
.lesson-card .start-btn:hover { background: var(--accent-dark); }
.lesson-card.coming { opacity: .72; }
.lesson-card.coming .soon-tag {
  position: absolute; top: 14px; inset-inline-start: 14px;
  background: #f1f3fa; color: var(--muted); font-size: 11px; font-weight: 800;
  padding: 4px 12px; border-radius: 999px;
}

/* ---------- Lesson (player) page ---------- */
.player-body {
  background: #eef1f7;
  height: 100vh;
  height: 100dvh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.player-body .topbar { position: static; flex-shrink: 0; }
.player-body .lesson-topbar { width: 100%; max-width: 1780px; min-width: 0; align-items: stretch; }
.player-body .tb-top { width: 100%; }
.player-body .back-btn { flex-shrink: 0; }
.player-main {
  flex: 1; min-height: 0;
  display: flex; flex-direction: column;
  width: 100%; max-width: 1780px; margin: 0 auto;
  padding: 10px 14px 12px;
}
.board-area {
  flex: 1; min-height: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px;
}
.board-area:fullscreen { background: #eef1f7; }

/* أزرار ملء الشاشة أسفل الرسم حتى لا تغطي محتواه. */
.fs-controls {
  flex-shrink: 0; max-width: 100%;
  display: none; gap: 8px; justify-content: center; flex-wrap: wrap;
}
.board-area:fullscreen .fs-controls { display: flex; }
body.board-zoom .fs-controls { display: flex; }

/* وضع تكبير اللوح البديل (CSS) — يخفي كل شيء عدا اللوح */
body.board-zoom .topbar,
body.board-zoom .controls-bar { display: none; }
body.board-zoom .player-main { padding: 8px; max-width: none; }
.fs-controls button {
  width: 46px; height: 46px; border-radius: 14px; font-size: 19px;
  background: #16213ab8; color: #fff; border: 1px solid #ffffff30;
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  transition: background .15s;
}
.fs-controls button:hover { background: #16213ae6; }
.board-frame {
  display: inline-flex; flex-direction: column;
  flex-shrink: 0;
  background: linear-gradient(160deg, #d9dee9, #c3c9d8);
  border-radius: 22px; padding: 10px;
  box-shadow: 0 18px 50px #16213a26, inset 0 1px 0 #fff8;
  max-width: 100%; max-height: 100%;
}
.board-wrap { position: relative; border-radius: 12px; overflow: hidden; background: #fdfdfa; width: 960px; height: 540px; max-width: 100%; }
.board-svg { display: block; width: 100%; height: 100%; background: #fdfdfa; }
.board-dim {
  position: absolute; inset: 0; background: #fdfdfa; opacity: 0; pointer-events: none;
  transition: opacity .5s; z-index: 5;
}
.board-dim.on { opacity: .55; }

/* الترجمة لها مساحة مستقلة أسفل الرسم، بما فيها وضع ملء الشاشة. */
.subtitle-overlay {
  position: relative; flex-shrink: 0;
  width: 100%; max-width: 1300px;
  max-height: min(18dvh, 112px); overflow-y: auto; overflow-wrap: anywhere;
  background: rgba(15, 20, 35, 0.62);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  color: #fff; font-weight: 700; line-height: 1.85;
  font-size: clamp(15px, 2.1vw, 26px);
  text-align: center; padding: 12px 28px; border-radius: 14px;
  text-shadow: 0 1px 3px #00000099;
  box-shadow: 0 4px 24px #0000002e;
  pointer-events: auto; scrollbar-width: thin;
  transition: opacity .35s;
}
.subtitle-overlay:empty { display: none; }
.subtitle-overlay.off { display: none; }

/* ---------- شريط التقدم (ستايل يوتيوب) ---------- */
.seek-wrap {
  position: absolute; left: 0; right: 0; bottom: 0; height: 20px; z-index: 15;
  display: flex; align-items: flex-end; cursor: pointer; touch-action: none;
}
.seek-track {
  position: relative; width: 100%; height: 5px;
  background: #16213a30; transition: height .15s;
}
.seek-wrap:hover .seek-track { height: 9px; }
.seek-fill {
  position: absolute; inset-inline-start: 0; top: 0; bottom: 0; width: 0;
  background: var(--accent); border-radius: 0 3px 3px 0;
}
.seek-knob {
  position: absolute; inset-inline-start: 0; top: 50%; width: 13px; height: 13px;
  margin-inline-start: -6.5px; border-radius: 50%; background: var(--accent);
  box-shadow: 0 1px 6px #16213a66; opacity: 0; transition: opacity .15s;
}
.seek-wrap:hover .seek-knob { opacity: 1; }
.seek-tip {
  position: absolute; bottom: 24px; max-width: 360px;
  background: #1d2438ee; color: #fff; font-size: 12.5px; font-weight: 700;
  padding: 8px 14px; border-radius: 10px; pointer-events: none;
  display: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  z-index: 16;
}
.seek-wrap:hover .seek-tip { display: block; }
.seek-tip .seek-time { color: #9db1f7; margin-inline-start: 8px; }

.resume-btn {
  background: #fff; color: var(--accent); border: 2px solid var(--accent);
  border-radius: 999px; padding: 12px 36px; font-weight: 800; font-size: 15px;
  transition: all .15s;
}
.resume-btn:hover { background: #eef1fd; transform: scale(1.03); }
.start-overlay { gap: 14px; }

/* مستويات حجم نص الترجمة */
.subtitle-overlay.sz-1 { font-size: clamp(14px, 1.8vw, 21px); padding: 10px 24px; }
.subtitle-overlay.sz-2 { font-size: clamp(12px, 1.4vw, 16px); padding: 8px 20px; }
.subtitle-overlay.sz-3 { font-size: clamp(18px, 2.7vw, 34px); padding: 14px 30px; }

.back-btn {
  display: inline-flex; align-items: center; gap: 6px; background: #fff;
  border: 1px solid var(--line); border-radius: 12px; padding: 9px 18px;
  font-weight: 800; font-size: 14px; color: #46506e; transition: all .15s;
}
.back-btn:hover { border-color: #b9c6f5; color: var(--accent); }

.img-card {
  position: absolute; z-index: 6; width: 34%; min-width: 240px;
  background: #fff; border-radius: 14px; padding: 12px 12px 14px;
  box-shadow: 0 24px 60px #16213a55, 0 0 0 1px #e6e6e0;
  opacity: 0; transform: translateY(30px) rotate(3deg) scale(.9);
  transition: opacity .45s, transform .45s cubic-bezier(.2,1.4,.4,1);
}
.img-card.on { opacity: 1; transform: translateY(0) rotate(1.5deg) scale(1); }
.img-card img { width: 100%; border-radius: 8px; display: block; max-height: 300px; object-fit: cover; }
.img-card .img-fallback { font-size: 84px; text-align: center; padding: 30px 0; }
.img-card figcaption {
  font-size: 14px; font-weight: 800; text-align: center; margin-top: 10px; color: #333;
}

.marker-tray {
  height: 34px; margin: 0 auto; width: 46%;
  background: linear-gradient(#c8cdd9, #aab1c2);
  border-radius: 0 0 14px 14px; box-shadow: inset 0 3px 6px #16213a33;
  display: flex; align-items: center; justify-content: center; gap: 26px; position: relative;
}
.marker-tray .marker { width: 26px; height: 12px; border-radius: 4px 4px 3px 3px; box-shadow: 0 2px 3px #0003, inset 0 -3px 0 #0002; }
.marker-tray .eraser-ic { width: 34px; height: 14px; border-radius: 3px; background: linear-gradient(#4a5568, #2d3748); box-shadow: 0 2px 3px #0003; }

/* (شريط الترجمة القديم أُستبدل بـ subtitle-overlay الشفاف فوق اللوح) */

.controls-bar {
  margin-top: 10px; background: #fff; border: 1px solid var(--line); border-radius: 16px;
  padding: 10px 18px; display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  box-shadow: 0 4px 16px #16213a0e; flex-shrink: 0;
}
.play-btn {
  width: 52px; height: 52px; border-radius: 50%; background: var(--accent); color: #fff;
  font-size: 20px; display: grid; place-items: center; box-shadow: 0 6px 18px #2f5df655;
  transition: all .15s; flex-shrink: 0;
}
.play-btn:hover { background: var(--accent-dark); transform: scale(1.05); }
.ctrl-btn {
  padding: 10px 16px; border-radius: 12px; background: #f1f3fa; font-weight: 800;
  font-size: 13px; color: #46506e; transition: all .15s; white-space: nowrap;
}
.ctrl-btn:hover { background: #e6eaf7; }
.ctrl-btn.active { background: var(--accent); color: #fff; }
.ctrl-group { display: flex; gap: 6px; align-items: center; }
.ctrl-sep { width: 1px; height: 30px; background: var(--line); }
.scene-dots { display: flex; gap: 7px; margin-inline: auto; flex-wrap: wrap; }
.scene-dot {
  width: 11px; height: 11px; border-radius: 50%; background: #d7dcec; transition: all .2s; cursor: pointer;
}
.scene-dot:hover { background: #a9b4d8; }
.scene-dot.done { background: #9db1f7; }
.scene-dot.current { background: var(--accent); transform: scale(1.45); }

.start-overlay {
  position: absolute; inset: 0; z-index: 20; display: grid; place-items: center;
  background: #fdfdfadd; backdrop-filter: blur(2px);
}
.start-overlay .big-start {
  background: var(--accent); color: #fff; font-size: 20px; font-weight: 900;
  padding: 18px 52px; border-radius: 999px; box-shadow: 0 10px 30px #2f5df666;
  display: flex; align-items: center; gap: 12px; transition: transform .15s;
}
.start-overlay .big-start:hover { transform: scale(1.05); }

.toast {
  position: fixed; bottom: 26px; left: 50%; transform: translateX(-50%) translateY(80px);
  background: #1d2438; color: #fff; padding: 12px 26px; border-radius: 999px;
  font-size: 14px; font-weight: 700; opacity: 0; transition: all .3s; z-index: 99;
  box-shadow: 0 10px 30px #0004; pointer-events: none;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

footer { text-align: center; padding: 26px; color: var(--muted); font-size: 12px; }

.ask-btn {
  padding: 10px 22px; border-radius: 12px; font-weight: 800;
  font-size: 14px; color: #fff; white-space: nowrap;
  background: var(--green); box-shadow: 0 4px 14px #0a9d6c44;
  transition: all .15s;
}
.ask-btn:hover { filter: brightness(1.1); transform: scale(1.03); }/* ---------- لوحة الأسئلة والأجوبة ---------- */
.qa-panel {
  position: absolute; inset-inline: 10%; top: 5%; bottom: 5%;
  background: #fff; border-radius: 18px; z-index: 30;
  box-shadow: 0 30px 70px #16213a44;
  display: none; flex-direction: column; overflow: hidden;
}
.qa-panel.on { display: flex; animation: qaIn .3s cubic-bezier(.2,1.3,.4,1); }
@keyframes qaIn { from { opacity: 0; transform: translateY(24px) scale(.97);} to { opacity: 1; transform: none;} }

.qa-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 20px; background: linear-gradient(135deg, var(--accent), #6a8dff);
  color: #fff; flex-shrink: 0;
}
.qa-title { font-weight: 800; font-size: 16px; }
.qa-head-actions { display: flex; gap: 8px; }
.qa-key-btn, .qa-close {
  width: 34px; height: 34px; border-radius: 10px; font-size: 16px;
  background: #ffffff2b; color: #fff; transition: all .15s;
}
.qa-key-btn:hover, .qa-close:hover { background: #ffffff44; }

.qa-key-box {
  padding: 12px 20px; background: #f0f4ff; border-bottom: 1px solid var(--line);
  flex-shrink: 0; display: flex; flex-wrap: wrap; gap: 8px; align-items: center;
}
.qa-key-box input {
  flex: 1; min-width: 180px; border: 1.5px solid #c9d4f5; border-radius: 10px;
  padding: 9px 14px; font-family: inherit; font-size: 13px; outline: none;
}
.qa-key-box input:focus { border-color: var(--accent); }
.qa-key-box button {
  background: var(--accent); color: #fff; font-weight: 800; font-size: 13px;
  padding: 9px 20px; border-radius: 10px;
}
.qa-key-note { width: 100%; font-size: 11px; color: var(--muted); }

.qa-msgs { flex: 1; min-height: 0; overflow-y: auto; padding: 16px 18px; display: flex; flex-direction: column; gap: 12px; }
.qa-msgs::-webkit-scrollbar { width: 8px; }
.qa-msgs::-webkit-scrollbar-thumb { background: #ccd3e6; border-radius: 8px; }
.qa-msgs::-webkit-scrollbar-track { background: transparent; }
.qa-msg { max-width: 88%; padding: 12px 16px; border-radius: 14px; font-size: 14.5px; line-height: 1.9; }
.qa-msg.user {
  align-self: flex-end; background: var(--accent); color: #fff;
  border-bottom-right-radius: 4px; font-weight: 600;
}
.qa-msg.teacher {
  align-self: flex-start; background: #f1f4fc; color: #232a3f;
  border-bottom-left-radius: 4px; border: 1px solid var(--line);
}
.qa-msg .qa-src {
  display: block; margin-top: 6px; font-size: 11px; color: var(--muted); font-weight: 700;
}
.qa-typing { align-self: flex-start; display: flex; gap: 5px; padding: 12px 18px; background: #f1f4fc; border-radius: 14px; border: 1px solid var(--line); }
.qa-typing span { width: 8px; height: 8px; border-radius: 50%; background: #8fa3d8; animation: qab 1.2s infinite; }
.qa-typing span:nth-child(2) { animation-delay: .2s; }
.qa-typing span:nth-child(3) { animation-delay: .4s; }
@keyframes qab { 0%,60%,100% { transform: translateY(0); opacity: .5;} 30% { transform: translateY(-5px); opacity: 1;} }

.qa-chips {
  display: flex; gap: 8px; padding: 10px 14px 4px; align-items: center;
  flex-shrink: 0; overflow-x: auto; scrollbar-width: none;
}
.qa-chips::-webkit-scrollbar { display: none; }
.qa-chips-label {
  font-size: 11px; color: var(--muted); font-weight: 800;
  white-space: nowrap; flex-shrink: 0;
}
.qa-chip {
  background: #eef6ff; color: #2b5bbd; border: 1px solid #cadffa;
  font-size: 12px; font-weight: 700; padding: 7px 14px; border-radius: 999px;
  white-space: nowrap; flex-shrink: 0;
  transition: all .15s;
}
.qa-chip:hover { background: #dcebff; }

.qa-input-row { display: flex; gap: 10px; padding: 12px 18px; border-top: 1px solid var(--line); flex-shrink: 0; }
.qa-input-row input {
  flex: 1; border: 1.5px solid #d5dcef; border-radius: 12px; padding: 12px 16px;
  font-family: inherit; font-size: 14.5px; outline: none; background: #fbfcff;
}
.qa-input-row input:focus { border-color: var(--accent); }
.qa-input-row button {
  background: var(--accent); color: #fff; font-weight: 800; font-size: 14px;
  padding: 12px 26px; border-radius: 12px;
}
.qa-input-row button:disabled { opacity: .5; cursor: wait; }

.qa-continue {
  margin: 0 18px 16px; padding: 14px 20px; border-radius: 12px;
  background: var(--green); color: #fff; font-weight: 900; font-size: 15px;
  box-shadow: 0 6px 18px #0a9d6c44; animation: qaIn .3s;
}
.qa-continue:hover { filter: brightness(1.08); }

@media (max-width: 720px) {
  .hero h1 { font-size: 26px; }
  .subtitle-overlay { padding: 10px 16px; width: 94%; }
  .controls-bar { gap: 8px; }
  .img-card { min-width: 200px; }
}

/* ---------- إعدادات الصوت HD ---------- */
.hd-chip { letter-spacing: .3px; }
.hd-chip.active { background: var(--green); box-shadow: 0 3px 10px #0a9d6c55; }
.hd-box {
  position: fixed; top: 66px; inset-inline-end: 14px; width: 360px;
  background: #fff; border: 1px solid var(--line); border-radius: 16px;
  box-shadow: 0 20px 60px #16213a44; z-index: 99;
  padding: 16px; display: none; flex-direction: column; gap: 10px;
}
.hd-box.on { display: flex; animation: qaIn .25s cubic-bezier(.2,1.3,.4,1); }
.hd-head { display: flex; align-items: center; justify-content: space-between; }
.hd-close { width: 30px; height: 30px; border-radius: 8px; background: #f1f3fa; font-size: 14px; }
.hd-close:hover { background: #e6eaf7; }
.hd-note { font-size: 12px; color: var(--muted); line-height: 1.8; margin: 0; }
.hd-box input[type="password"], .hd-box select {
  width: 100%; border: 1.5px solid #d5dcef; border-radius: 10px;
  padding: 10px 12px; font-family: inherit; font-size: 13px; outline: none; background: #fbfcff;
}
.hd-box input:focus, .hd-box select:focus { border-color: var(--accent); }
.hd-row { display: flex; gap: 8px; }
.hd-row select { flex: 1; min-width: 0; }
.hd-row button {
  background: var(--accent); color: #fff; font-weight: 800; font-size: 12.5px;
  padding: 10px 14px; border-radius: 10px; white-space: nowrap;
}
.hd-row #hd-test { background: var(--green); }
.hd-row #hd-off { background: #8a93ab; }
.hd-quota { font-size: 12px; font-weight: 700; color: #46506e; }
.hd-status { font-size: 12px; color: var(--orange); font-weight: 700; min-height: 4px; }

@media (max-width: 720px) {
  .hd-box { width: calc(100vw - 24px); inset-inline-end: 12px; }
}

@media (max-width: 720px) {
  .qa-panel { inset-inline: 4%; top: 4%; bottom: 4%; }
  .qa-msg { font-size: 13.5px; }
}

/* شريط حصص التطبيق العملي */
.practicals-strip {
  background: #f0faf5; border: 1px dashed #7fd6b8; border-radius: 14px;
  padding: 14px 20px; margin-top: 6px; font-size: 13.5px; font-weight: 700;
  color: #0a7d5a; line-height: 1.8;
}

/* تبويبات الفصول الدراسية */
.semester-tabs {
  display: flex; gap: 8px; justify-content: center; align-items: center;
  margin: -16px auto 22px; padding: 0 24px; max-width: 1200px; flex-wrap: wrap;
}
.sem-label { font-size: 12px; color: #6b7690; font-weight: 800; }
.semester-tab {
  background: #ffffff; border: 1.5px solid #e3e8f4; border-radius: 999px;
  padding: 8px 22px; font-size: 13.5px; font-weight: 800; color: #46506e;
  transition: all .15s;
}
.semester-tab:hover { border-color: #b9c6f5; }
.semester-tab.active { background: #0a9d6c; color: #ffffff; border-color: #0a9d6c; box-shadow: 0 3px 10px #0a9d6c44; }

/* حالة فراغ الفصل */
.empty-sem {
  background: #ffffff; border: 1.5px dashed #ccd3e6; border-radius: 18px;
  padding: 34px 26px; text-align: center; font-size: 15px; font-weight: 700;
  color: #6b7690; line-height: 1.9; max-width: 700px; margin: 0 auto;
}

/* القانون 8: الصورة الحقيقية التلقائية لكل مشهد */
.auto-img-card {
  position: absolute; z-index: 8; width: 190px;
  background: #fff; border-radius: 12px; padding: 8px 8px 6px;
  box-shadow: 0 10px 30px #16213a44, 0 0 0 1px #e6e6e0;
  opacity: 0; transform: translateY(-14px) rotate(-1.5deg) scale(.92);
  transition: opacity .4s, transform .4s cubic-bezier(.2,1.3,.4,1);
}
.auto-img-card.on { opacity: 1; transform: none; }
.auto-img-card img { width: 100%; border-radius: 8px; display: block; max-height: 150px; object-fit: cover; }
.auto-img-card img[alt] { cursor: default; }
.auto-img-card figcaption { font-size: 11px; font-weight: 800; text-align: center; margin-top: 5px; color: #333; }
/* ---------- بوابة رمز الوصول ---------- */
.access-gate {
  position: fixed; inset: 0; z-index: 200;
  background: linear-gradient(160deg, #16213a, #2f5df6);
  display: none; place-items: center; padding: 20px;
}
.access-gate.on { display: grid; }
.gate-card {
  background: #fff; border-radius: 28px; max-width: 480px; width: 100%;
  padding: 40px 38px; text-align: center; box-shadow: 0 30px 80px #0a0f1c66;
}
.gate-logo {
  width: 64px; height: 64px; border-radius: 18px; margin: 0 auto 16px;
  background: linear-gradient(135deg, var(--accent), #7b9bff);
  display: grid; place-items: center; color: #fff; font-size: 30px; font-weight: 900;
  box-shadow: 0 8px 24px #2f5df655;
}
.gate-card h1 { font-size: 21px; font-weight: 900; color: #1d2438; margin-bottom: 10px; }
.gate-card p { color: var(--muted); font-size: 13.5px; font-weight: 700; line-height: 1.9; margin-bottom: 18px; }
.gate-card input {
  width: 100%; border: 1.5px solid var(--line); border-radius: 14px;
  padding: 15px 18px; font-size: 18px; font-weight: 900; letter-spacing: 3px;
  text-align: center; margin-bottom: 12px;
}
.gate-card input:focus { outline: none; border-color: var(--accent); }
.gate-btn {
  width: 100%; background: var(--accent); color: #fff; border-radius: 14px;
  padding: 15px; font-size: 16px; font-weight: 900;
  box-shadow: 0 8px 24px #2f5df655;
}
.gate-error { font-weight: 800; font-size: 13px; min-height: 20px; margin-top: 10px; color: #cf3d3d; }

/* شريط نطاق الطالب المقفل */
.scope-pill {
  background: #e8f8f1; border: 1.5px solid #bfe6d2; border-radius: 999px;
  padding: 10px 26px; font-size: 14.5px; font-weight: 900; color: #0a9d6c;
}
.spec-tabs.locked { margin-top: 20px; }
.foot-link.reset-access { background: #fff4e0; color: #e08a00; }
.gate-step { display: flex; flex-direction: column; gap: 12px; }
.gate-label { font-size: 12.5px; font-weight: 800; color: #46506e; text-align: start; }
.gate-error.ok { color: #0a9d6c; }
.gate-card input[type="tel"], .gate-card input[maxlength="6"] { letter-spacing: 2px; }
.gate-whatsapp { margin-top: 14px; text-align: center; }
.gate-whatsapp .foot-link { display: inline-flex; }

/* ---------- قائمة المستخدم في الهيدر (سهم الحساب) ---------- */
.user-menu { position: relative; }
.user-arrow {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 9px 16px; border-radius: 999px;
  background: #f1f4fb; border: 1.5px solid transparent;
  cursor: pointer; font-weight: 800; font-size: 13px;
  color: #46506e; font-family: inherit; transition: all .15s;
}
.user-arrow:hover { background: #e9efff; border-color: var(--line); }
.u-caret { font-size: 10px; transition: transform .18s; }
.user-menu.open .u-caret { transform: rotate(180deg); }
.user-drop {
  position: absolute; top: calc(100% + 8px); left: 0;
  min-width: 200px; background: #fff;
  border: 1.5px solid var(--line); border-radius: 14px;
  box-shadow: 0 14px 34px rgba(15, 25, 60, .16);
  padding: 8px; display: none; z-index: 40;
}
.user-menu.open .user-drop { display: block; }
.user-drop a {
  display: flex; align-items: center; gap: 8px;
  padding: 11px 14px; border-radius: 10px;
  font-size: 13px; font-weight: 800; color: #46506e;
  text-decoration: none; transition: all .12s;
}
.user-drop a:hover { background: #eef1fb; color: var(--accent); }

/* ---------- فوتر احترافي ---------- */
.foot-brand-block { display: flex; flex-direction: column; gap: 5px; min-width: 300px; }
.foot-sup { font-size: 11.5px; color: #8a94ad; font-weight: 600; }
.foot-inner { gap: 18px; }
