/* الدسوقي أكاديمي — تأسيس | shared styles, mobile-first, RTL */
* { box-sizing: border-box; margin: 0; padding: 0; }
:root {
  --brand: #b45309;
  --brand-soft: #f59e0b;
  --blue: #1d4ed8;
  --green: #059669;
  --bg: #fffbeb;
  --card: #ffffff;
  --ink: #1f2937;
  --muted: #6b7280;
}
html { direction: rtl; }
body {
  font-family: "Segoe UI", Tahoma, Arial, sans-serif;
  background: var(--bg);
  color: var(--ink);
  min-height: 100vh;
  font-size: 17px;
  line-height: 1.7;
}
body.adult { --bg: #f1f5f9; --brand: #1d4ed8; --brand-soft: #3b82f6; }
.wrap { max-width: 520px; margin: 0 auto; padding: 14px 14px 90px; }
.center { text-align: center; }
.muted { color: var(--muted); font-size: 14px; }
h1 { font-size: 24px; }
h2 { font-size: 20px; margin: 14px 0 8px; }

.topbar {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 4px;
}
.topbar img { width: 44px; height: 44px; border-radius: 50%; }
.topbar .name { font-weight: 800; color: var(--brand); font-size: 18px; }
.backbtn {
  display: inline-flex; align-items: center; gap: 4px;
  background: var(--blue); color: #fff; border: none; border-radius: 999px;
  padding: 8px 16px; font-size: 15px; font-weight: 700; text-decoration: none;
  cursor: pointer;
}

.hero {
  background: var(--card); border-radius: 20px; padding: 22px 16px;
  text-align: center; box-shadow: 0 2px 10px rgba(0,0,0,.06); margin-top: 8px;
}
.hero img { width: 110px; height: 110px; border-radius: 50%; }
.hero h1 { color: var(--brand); margin: 10px 0 4px; }

.btn {
  display: block; width: 100%; border: none; border-radius: 16px;
  padding: 16px; font-size: 19px; font-weight: 800; cursor: pointer;
  margin: 10px 0; text-decoration: none; text-align: center;
}
.btn-start { background: #facc15; color: #713f12; }
.btn-kids { background: var(--brand-soft); color: #fff; }
.btn-adult { background: var(--blue); color: #fff; }
.btn-green { background: var(--green); color: #fff; }
.btn-ghost { background: #e5e7eb; color: var(--ink); }
.btn:disabled { background: #d1d5db; color: #9ca3af; cursor: not-allowed; }
.btn small { display: block; font-size: 13px; font-weight: 600; opacity: .85; }

.statbar {
  display: flex; gap: 8px; margin: 10px 0;
}
.stat {
  flex: 1; background: var(--card); border-radius: 14px; padding: 8px 6px;
  text-align: center; box-shadow: 0 1px 4px rgba(0,0,0,.05);
}
.stat b { display: block; font-size: 19px; color: var(--brand); }
.stat span { font-size: 12px; color: var(--muted); }

.maprow {
  display: flex; align-items: center; gap: 12px;
  background: var(--card); border-radius: 16px; padding: 10px 14px;
  margin: 8px 0; box-shadow: 0 1px 4px rgba(0,0,0,.05);
  text-decoration: none; color: var(--ink);
}
.maprow .circle {
  width: 52px; height: 52px; border-radius: 50%; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 24px; font-weight: 800; color: #fff; background: var(--brand-soft);
}
.maprow.blend .circle { background: var(--green); font-size: 20px; }
.maprow.locked { opacity: .55; }
.maprow.locked .circle { background: #9ca3af; }
.maprow.done .circle { background: var(--green); }
.maprow .t { flex: 1; }
.maprow .t b { display: block; font-size: 17px; }
.maprow .t span { font-size: 13px; color: var(--muted); }
.maprow .state { font-size: 22px; }

.stepcard {
  background: var(--card); border-radius: 18px; padding: 16px;
  margin: 12px 0; box-shadow: 0 2px 8px rgba(0,0,0,.06);
}
.stepcard h3 { color: var(--brand); font-size: 18px; margin-bottom: 8px; }
.stepnum {
  display: inline-block; background: var(--brand); color: #fff;
  border-radius: 999px; padding: 2px 12px; font-size: 13px; font-weight: 700;
}

.bigletter {
  font-size: 110px; font-weight: 900; color: var(--brand);
  text-align: center; line-height: 1.1; direction: ltr;
}

.cards { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.tcard {
  background: #fff; border: 3px solid var(--brand-soft); border-radius: 16px;
  width: 31%; min-width: 96px; padding: 10px 6px; text-align: center;
  cursor: pointer; user-select: none;
}
.tcard .em { font-size: 44px; display: block; }
.tcard .en { font-weight: 800; font-size: 16px; direction: ltr; display: block; }
.tcard .ar { font-size: 13px; color: var(--muted); display: block; }
.tcard:active { transform: scale(.95); }
.tcard.picked { border-color: var(--green); background: #ecfdf5; }
.tcard.wrong { border-color: #dc2626; background: #fef2f2; }

.blendrow {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  direction: ltr; margin: 10px 0; font-size: 30px; font-weight: 800;
}
.blendrow .pc {
  background: #eff6ff; border: 2px solid var(--blue); color: var(--blue);
  border-radius: 12px; padding: 6px 14px; cursor: pointer;
}
.blendrow .res {
  background: #ecfdf5; border: 2px solid var(--green); color: var(--green);
  border-radius: 12px; padding: 6px 14px; cursor: pointer;
}
.blendrow .op { color: var(--muted); }

.videobox {
  background: #111827; color: #d1d5db; border-radius: 14px;
  aspect-ratio: 16/9; display: flex; align-items: center; justify-content: center;
  text-align: center; padding: 10px; overflow: hidden;
}
.videobox iframe { width: 100%; height: 100%; border: 0; border-radius: 14px; }

canvas.trace {
  width: 100%; height: 220px; background: #fff; border-radius: 14px;
  border: 2px dashed var(--brand-soft); touch-action: none;
}

.quizopt {
  display: block; width: 100%; background: #fff; border: 3px solid #e5e7eb;
  border-radius: 14px; padding: 12px; margin: 8px 0; font-size: 17px;
  font-weight: 700; cursor: pointer; text-align: center;
}
.quizopt.right { border-color: var(--green); background: #ecfdf5; }
.quizopt.bad { border-color: #dc2626; background: #fef2f2; }

.toast {
  position: fixed; bottom: 18px; right: 50%; transform: translateX(50%);
  background: var(--ink); color: #fff; border-radius: 999px;
  padding: 10px 22px; font-weight: 700; z-index: 50; display: none;
}
.starbust { font-size: 60px; text-align: center; animation: pop .5s; }
@keyframes pop { 0% { transform: scale(0); } 80% { transform: scale(1.2); } 100% { transform: scale(1); } }

.badgechip {
  display: inline-block; background: #fff7ed; border: 2px solid var(--brand-soft);
  border-radius: 999px; padding: 4px 12px; margin: 3px; font-size: 14px; font-weight: 700;
}
.badgechip.off { opacity: .35; filter: grayscale(1); }

.footer-note { text-align: center; color: var(--muted); font-size: 12px; margin-top: 20px; }
input[type=text], input[type=url], select {
  width: 100%; padding: 12px; border-radius: 12px; border: 2px solid #e5e7eb;
  font-size: 16px; margin: 6px 0; font-family: inherit;
}
