/* ══ مغامرة العدد ٢٠ — نظام التصميم (Claymorphism • Light) ══ */
:root {
  --color-primary: #2563EB;
  --color-primary-dark: #1D4ED8;
  --color-on-primary: #FFFFFF;
  --color-secondary: #F59E0B;
  --color-secondary-dark: #D97706;
  --color-accent: #EC4899;
  --color-background: #EFF6FF;
  --color-foreground: #0F172A;
  --color-muted: #F1F5FD;
  --color-border: #E4ECFC;
  --color-destructive: #DC2626;
  --success: #15803D;
  --success-soft: #DCFCE7;
  --success-border: #86EFAC;
  --danger-soft: #FEE2E2;
  --danger-border: #FCA5A5;
  --radius-sm: 12px;
  --radius: 20px;
  --radius-lg: 28px;
  --radius-pill: 999px;
  --shadow-clay: 0 8px 0 -3px rgba(37,99,235,.10), 0 14px 28px rgba(37,99,235,.12);
  --shadow-clay-lg: 0 12px 0 -4px rgba(37,99,235,.12), 0 22px 44px rgba(37,99,235,.16);
  --shadow-in: inset 0 3px 8px rgba(15,23,42,.06), inset 0 -4px 10px rgba(255,255,255,.9);
  --font-heading: 'Baloo Bhaijaan 2', 'Baloo 2', system-ui, 'Segoe UI', Tahoma, sans-serif;
  --font-body: 'Tajawal', 'Comic Neue', system-ui, 'Segoe UI', Tahoma, sans-serif;
}
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font-body);
  background: var(--color-background);
  color: var(--color-foreground);
  min-height: 100dvh;
  line-height: 1.7;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4, .btn, .badge, .hud-chip { font-family: var(--font-heading); font-weight: 700; }
button { font: inherit; cursor: pointer; }
[hidden] { display: none !important; }
.sr-only {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}
/* ══ خلفية ناعمة ══ */
.bg-decor { position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
.blob { position: absolute; border-radius: 50%; filter: blur(60px); opacity: .5; }
.b1 { width: 460px; height: 460px; background: #BFDBFE; top: -160px; right: -120px; }
.b2 { width: 380px; height: 380px; background: #FDE68A; top: 30%; left: -150px; opacity: .42; }
.b3 { width: 420px; height: 420px; background: #FBCFE8; bottom: -180px; right: 12%; opacity: .4; }
@media (prefers-reduced-motion: no-preference) {
  @keyframes floaty { 0%,100% { transform: translateY(0) } 50% { transform: translateY(-18px) } }
  .b2 { animation: floaty 14s ease-in-out infinite; }
  .b3 { animation: floaty 18s ease-in-out infinite reverse; }
}

/* ══ الشريط الأعلى ══ */
.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: .6rem clamp(.75rem, 3vw, 2rem);
  background: rgba(255,255,255,.78);
  backdrop-filter: blur(14px);
  border-bottom: 3px solid #fff;
  box-shadow: 0 6px 24px rgba(37,99,235,.08);
}
.brand { display: flex; align-items: center; gap: .7rem; min-width: 0; }
.brand-mascot { width: 46px; height: 46px; flex: none; }
.brand-text { display: flex; flex-direction: column; min-width: 0; }
.brand-text h1 { font-size: clamp(1rem, 2.4vw, 1.35rem); line-height: 1.2; letter-spacing: -.01em; }
.brand-sub { font-size: clamp(.62rem, 1.5vw, .74rem); color: #64748B; font-weight: 500; }
.hud { display: flex; align-items: center; gap: .4rem; flex: none; }
.hud-chip {
  display: inline-flex; align-items: center; gap: .3rem;
  background: #fff; border: 2px solid var(--color-border); border-radius: var(--radius-pill);
  padding: .28rem .7rem; font-size: .95rem; color: var(--color-primary);
  box-shadow: 0 4px 0 -1px rgba(37,99,235,.10);
}
.hud-chip svg { width: 17px; height: 17px; }
.hud-chip:nth-child(2) { color: var(--color-secondary-dark); border-color: #FDE68A; }
.icon-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; border-radius: 14px;
  background: #fff; border: 2px solid var(--color-border); color: #475569;
  box-shadow: 0 4px 0 -1px rgba(37,99,235,.10);
  transition: transform .18s ease, box-shadow .18s ease, color .18s ease, background .18s;
}
.icon-btn svg { width: 20px; height: 20px; }
.icon-btn:hover { transform: translateY(-2px); color: var(--color-primary); box-shadow: var(--shadow-clay); }
.icon-btn:active { transform: translateY(1px) scale(.97); box-shadow: none; }
.icon-btn.off { color: #CBD5E1; background: var(--color-muted); }
/* ══ أزرار ══ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .45rem;
  padding: .7rem 1.5rem; border-radius: var(--radius-pill); font-size: 1.02rem;
  border: 3px solid transparent; text-decoration: none; white-space: nowrap;
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease, opacity .2s;
}
.btn svg { width: 20px; height: 20px; }
.btn-primary {
  background: var(--color-primary); color: #fff;
  box-shadow: 0 7px 0 -2px var(--color-primary-dark), 0 14px 26px rgba(37,99,235,.28);
}
.btn-primary:hover { transform: translateY(-3px); box-shadow: 0 10px 0 -2px var(--color-primary-dark), 0 20px 34px rgba(37,99,235,.34); }
.btn-primary:active { transform: translateY(3px); box-shadow: 0 2px 0 -1px var(--color-primary-dark); }
.btn-ghost {
  background: #fff; color: #334155; border-color: var(--color-border);
  box-shadow: 0 6px 0 -2px rgba(37,99,235,.10);
}
.btn-ghost:hover { transform: translateY(-2px); color: var(--color-primary); border-color: #BFDBFE; }
.btn-ghost:active { transform: translateY(2px); box-shadow: none; }
.btn-sm { padding: .42rem 1rem; font-size: .9rem; }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }
.badge {
  display: inline-flex; align-items: center; gap: .35rem;
  background: #fff; border: 2px solid var(--color-border); color: var(--color-primary);
  border-radius: var(--radius-pill); padding: .25rem .8rem; font-size: .82rem;
}
.badge svg { width: 15px; height: 15px; }

/* ══ الشاشات ══ */
#app { position: relative; z-index: 1; padding: clamp(1rem, 3vw, 2rem) clamp(.75rem, 3vw, 2rem) 4rem; max-width: 1080px; margin: 0 auto; }
.screen { display: none; }
.screen.active { display: block; animation: fadeUp .45s ease both; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(18px) } to { opacity: 1; transform: none } }
/* ══ الواجهة الرئيسية ══ */
.hero {
  display: grid; grid-template-columns: minmax(180px, 300px) 1fr; gap: clamp(1rem, 3vw, 2.2rem);
  align-items: center; background: #fff; border: 3px solid var(--color-border);
  border-radius: var(--radius-lg); padding: clamp(1.2rem, 3vw, 2.2rem); box-shadow: var(--shadow-clay-lg);
}
.hero-mascot { width: 100%; max-width: 300px; justify-self: center; }
.hero-copy h2 { font-size: clamp(1.5rem, 4.2vw, 2.5rem); line-height: 1.25; margin: .7rem 0 .5rem; letter-spacing: -.02em; }
.hero-copy .hl { color: var(--color-primary); position: relative; }
.hero-copy p { color: #475569; font-size: clamp(.95rem, 2.2vw, 1.05rem); max-width: 46ch; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .7rem; margin-top: 1.1rem; }
.section-title {
  display: flex; align-items: center; gap: .5rem; font-size: 1.3rem;
  margin: 2rem 0 1rem; color: var(--color-foreground);
}
.section-title svg { width: 22px; height: 22px; color: var(--color-secondary-dark); }
.stations { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 1rem; }
.station {
  position: relative; text-align: right; background: #fff; border: 3px solid var(--color-border);
  border-radius: var(--radius); padding: 1.1rem 1.2rem; box-shadow: var(--shadow-clay);
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s;
}
button.station { width: 100%; }
.station:hover:not(.locked) { transform: translateY(-4px); box-shadow: var(--shadow-clay-lg); border-color: #BFDBFE; }
.station:active:not(.locked) { transform: translateY(0); }
.station-head { display: flex; align-items: center; gap: .6rem; margin-bottom: .3rem; }
.station-icon {
  display: inline-flex; align-items: center; justify-content: center; flex: none;
  width: 42px; height: 42px; border-radius: 14px; background: var(--color-muted); color: var(--color-primary);
  box-shadow: var(--shadow-in);
}
.station-icon svg { width: 22px; height: 22px; }
.station h4 { font-size: 1.06rem; }
.station p { color: #64748B; font-size: .88rem; }
.station .stars-row { display: flex; gap: .15rem; margin-top: .6rem; }
.stars-row svg { width: 18px; height: 18px; color: #CBD5E1; }
.stars-row svg.on { color: var(--color-secondary); fill: var(--color-secondary); }
.station.locked { opacity: .62; background: var(--color-muted); cursor: not-allowed; }
.station-tag {
  position: absolute; top: -12px; left: 14px; font-size: .72rem; font-family: var(--font-heading);
  background: var(--color-accent); color: #fff; padding: .1rem .6rem; border-radius: var(--radius-pill);
}
.station-tag.grey { background: #94A3B8; }
.hint-line { color: #64748B; font-size: .86rem; margin-top: .9rem; text-align: center; }

/* ══ شاشة السؤال ══ */
.quiz-top { display: flex; align-items: center; justify-content: space-between; gap: .6rem; flex-wrap: wrap; margin-bottom: .8rem; }
.qmeta { display: flex; flex-direction: column; align-items: center; text-align: center; }
.qmeta strong { font-family: var(--font-heading); font-size: 1.05rem; color: var(--color-primary); }
.qmeta span { font-size: .8rem; color: #64748B; }
.bar { height: 16px; background: #DBEAFE; border: 2px solid #fff; border-radius: var(--radius-pill); overflow: hidden; box-shadow: var(--shadow-in); }
.bar-fill {
  height: 100%; width: 0; border-radius: var(--radius-pill);
  background: linear-gradient(90deg, var(--color-secondary), var(--color-accent));
  transition: width .45s cubic-bezier(.34,1.4,.5,1);
}
.qcard {
  margin-top: 1rem; background: #fff; border: 3px solid var(--color-border);
  border-radius: var(--radius-lg); padding: clamp(1rem, 3vw, 1.8rem);
  box-shadow: var(--shadow-clay-lg); text-align: center;
}
.qcard.shake { animation: shake .42s ease; }
@keyframes shake { 0%,100% { transform: translateX(0) } 25% { transform: translateX(-9px) } 75% { transform: translateX(9px) } }
.qcard.pop { animation: pop .45s cubic-bezier(.34,1.5,.5,1); }
@keyframes pop { 0% { transform: scale(1) } 45% { transform: scale(1.035) } 100% { transform: scale(1) } }
.q-text { font-family: var(--font-heading); font-size: clamp(1.15rem, 3.4vw, 1.7rem); line-height: 1.6; margin-bottom: 1rem; }
.q-text b { color: var(--color-primary); }
.q-text .ask { color: var(--color-accent); }
/* ── المنصّة البصرية: إطارات العشرة، الأعداد، الآلة ── */
.q-visual { display: flex; flex-wrap: wrap; gap: .8rem; justify-content: center; align-items: center; margin: 0 auto 1.2rem; min-height: 40px; }
.tframe {
  display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px;
  padding: 12px; background: var(--color-muted); border: 3px solid #DBEAFE; border-radius: var(--radius);
  box-shadow: var(--shadow-in);
}
.cell {
  width: clamp(22px, 5.4vw, 34px); aspect-ratio: 1; border-radius: 10px;
  background: #E2E8F5; display: grid; place-items: center; font-size: .8rem;
}
.cell i { display: block; width: 74%; height: 74%; border-radius: 50%; background: linear-gradient(160deg, #60A5FA, var(--color-primary)); box-shadow: inset 0 -3px 0 rgba(0,0,0,.18); }
.cell.on i { background: linear-gradient(160deg, #FBBF24, var(--color-secondary-dark)); }
.cell.unknown { background: #FFF7E6; border: 2px dashed var(--color-secondary); }
.cell.unknown::after { content: ''; width: 60%; height: 60%; border-radius: 50%; background: #FDE68A; }
.counter-strip { display: flex; flex-wrap: wrap; gap: .35rem; justify-content: center; max-width: 420px; }
.counter {
  width: clamp(18px, 4.4vw, 26px); aspect-ratio: 1; border-radius: 50%;
  background: linear-gradient(160deg, #34D399, #059669); box-shadow: inset 0 -3px 0 rgba(0,0,0,.18);
}
.counter.blue { background: linear-gradient(160deg, #60A5FA, var(--color-primary)); }
.dots-eq { font-family: var(--font-heading); font-size: clamp(1.3rem, 4vw, 1.9rem); color: #334155; }
.numline { width: 100%; max-width: 620px; }
.numline svg { width: 100%; height: auto; }
.numline text { font-family: var(--font-heading); }
.machine { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; justify-content: center; }
.mbox {
  min-width: 78px; padding: .5rem .9rem; border-radius: var(--radius); background: #fff;
  border: 3px solid var(--color-border); font-family: var(--font-heading); font-size: 1.5rem;
  box-shadow: var(--shadow-clay);
}
.mbox.gear { background: var(--color-muted); border-color: #FDE68A; color: var(--color-secondary-dark); }
.mbox.out { border-color: #A7F3D0; color: var(--success); }

/* ── أزرار الإجابات ── */
.answers { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: .75rem; max-width: 620px; margin: 0 auto; }
.ans {
  position: relative; padding: .9rem .6rem; border-radius: var(--radius); background: #fff;
  border: 3px solid var(--color-border); font-family: var(--font-heading); font-size: 1.5rem;
  color: var(--color-foreground); box-shadow: var(--shadow-clay);
  transition: transform .16s ease, box-shadow .16s ease, border-color .16s, background .16s;
}
.ans small { display: block; font-family: var(--font-body); font-size: .78rem; color: #94A3B8; }
.ans:hover:not(:disabled) { transform: translateY(-3px); border-color: #BFDBFE; box-shadow: var(--shadow-clay-lg); }
.ans:active:not(:disabled) { transform: translateY(2px); box-shadow: none; }
.ans:disabled { cursor: default; }
.ans.correct { background: var(--success-soft); border-color: var(--success-border); color: var(--success); }
.ans.wrong { background: var(--danger-soft); border-color: var(--danger-border); color: var(--color-destructive); }
.ans.dim { opacity: .45; }
/* ── لوحة الأرقام ── */
.numpad { display: grid; gap: .7rem; max-width: 420px; margin: 0 auto; }
.numpad-display {
  min-height: 68px; display: grid; place-items: center; border-radius: var(--radius);
  background: var(--color-muted); border: 3px dashed #BFDBFE; box-shadow: var(--shadow-in);
  font-family: var(--font-heading); font-size: 2rem; color: var(--color-primary);
}
.numpad-display.empty { color: #94A3B8; font-size: 1.1rem; font-family: var(--font-body); }
.numpad-keys { display: grid; grid-template-columns: repeat(5, 1fr); gap: .5rem; }
.key {
  padding: .6rem 0; border-radius: 14px; background: #fff; border: 3px solid var(--color-border);
  font-family: var(--font-heading); font-size: 1.25rem; color: var(--color-foreground);
  box-shadow: 0 5px 0 -2px rgba(37,99,235,.12); transition: transform .14s, box-shadow .14s, background .14s;
}
.key:hover { transform: translateY(-2px); background: #F8FBFF; }
.key:active { transform: translateY(2px); box-shadow: none; }
.key.wide { grid-column: span 2; font-size: 1rem; color: #334155; }
.key.check { background: var(--color-primary); color: #fff; border-color: var(--color-primary); font-size: 1.05rem; }
.key.check:disabled { opacity: .5; }
/* ── التغذية الراجعة ── */
.feedback {
  max-width: 640px; margin: 1rem auto 0; border-radius: var(--radius); padding: 0 1rem;
  display: grid; gap: .55rem; font-family: var(--font-heading);
}
.fb {
  display: flex; align-items: flex-start; gap: .6rem; padding: .85rem 1rem; border-radius: var(--radius);
  border: 3px solid transparent; animation: fadeUp .3s ease both;
}
.fb svg { width: 22px; height: 22px; flex: none; margin-top: 2px; }
.fb.ok { background: var(--success-soft); border-color: var(--success-border); color: #14532D; }
.fb.no { background: var(--danger-soft); border-color: var(--danger-border); color: #7F1D1D; }
.fb.tip { background: #FFF7E6; border-color: #FDE68A; color: #78350F; font-family: var(--font-body); }
.fb p { font-size: .96rem; line-height: 1.6; }
.fb strong { display: block; }

/* ══ شاشة النتيجة ══ */
.result-card {
  background: #fff; border: 3px solid var(--color-border); border-radius: var(--radius-lg);
  padding: clamp(1.2rem, 3vw, 2.2rem); text-align: center; box-shadow: var(--shadow-clay-lg);
}
.result-mascot { width: clamp(110px, 22vw, 170px); margin-bottom: .4rem; }
.result-card h2 { font-size: clamp(1.5rem, 4.5vw, 2.2rem); }
.muted { color: #64748B; }
.stars-big { display: flex; justify-content: center; gap: .5rem; margin: 1rem 0; }
.stars-big svg { width: clamp(38px, 9vw, 60px); height: clamp(38px, 9vw, 60px); color: #CBD5E1; }
.stars-big svg.on { color: var(--color-secondary); fill: var(--color-secondary); animation: pop .5s cubic-bezier(.34,1.6,.5,1) both; }
.result-nums { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: .8rem; margin: 1.2rem 0; }
.num-box { background: var(--color-muted); border: 2px solid var(--color-border); border-radius: var(--radius); padding: .8rem; }
.num-box strong { display: block; font-family: var(--font-heading); font-size: 1.8rem; color: var(--color-primary); }
.num-box span { font-size: .82rem; color: #64748B; }
.coach { background: #FFF7E6; border: 3px solid #FDE68A; border-radius: var(--radius); padding: .9rem 1.1rem; color: #78350F; margin-bottom: 1.1rem; }
/* ══ لوحة التقدّم ══ */
.panel {
  background: #fff; border: 3px solid var(--color-border); border-radius: var(--radius-lg);
  padding: clamp(1.1rem, 3vw, 2rem); box-shadow: var(--shadow-clay-lg);
}
.panel h2 { display: flex; align-items: center; gap: .5rem; font-size: 1.4rem; margin-bottom: 1rem; }
.panel h2 svg { width: 24px; height: 24px; color: var(--color-primary); }
.panel-actions { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: 1.2rem; }
.prow { display: grid; grid-template-columns: 1fr auto; gap: .6rem; align-items: center; padding: .7rem 0; border-bottom: 2px dashed var(--color-border); }
.prow:last-child { border-bottom: none; }
.prow .pt { font-family: var(--font-heading); }
.prow .ps { font-size: .82rem; color: #64748B; }
.meter { height: 12px; background: var(--color-muted); border-radius: var(--radius-pill); overflow: hidden; margin-top: .35rem; }
.meter i { display: block; height: 100%; border-radius: var(--radius-pill); background: linear-gradient(90deg, #60A5FA, var(--color-primary)); }
.badges { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: .6rem; margin-top: .8rem; }
.bcard { text-align: center; padding: .7rem .5rem; border-radius: var(--radius); background: var(--color-muted); border: 2px solid var(--color-border); color: #94A3B8; }
.bcard.on { background: #FFF7E6; border-color: #FDE68A; color: #92400E; }
.bcard svg { width: 26px; height: 26px; }
.bcard span { display: block; font-size: .8rem; font-family: var(--font-heading); }
.field-label { display: block; font-family: var(--font-heading); font-size: .95rem; margin-bottom: .4rem; }
input[type="text"] {
  width: 100%; max-width: 380px; padding: .7rem 1rem; border-radius: var(--radius);
  border: 3px solid var(--color-border); background: #fff; font: inherit; outline: none;
  transition: border-color .2s, box-shadow .2s;
}
input[type="text"]:focus { border-color: var(--color-primary); box-shadow: 0 0 0 4px rgba(37,99,235,.14); }

/* ══ الشهادة ══ */
.cert-preview { margin-top: 1.2rem; }
.cert {
  position: relative; background: linear-gradient(160deg, #FFFFFF, #F8FBFF);
  border: 6px double var(--color-secondary); border-radius: var(--radius); padding: 1.6rem;
  text-align: center; overflow: hidden;
}
.cert::before, .cert::after { content: ''; position: absolute; width: 130px; height: 130px; border-radius: 50%; opacity: .16; }
.cert::before { background: var(--color-primary); top: -60px; right: -50px; }
.cert::after { background: var(--color-accent); bottom: -70px; left: -40px; }
.cert .cert-top { font-family: var(--font-heading); color: var(--color-primary); font-size: 1rem; }
.cert h3 { font-size: clamp(1.2rem, 3.4vw, 1.7rem); margin: .3rem 0 .1rem; }
.cert .cert-name { font-family: var(--font-heading); font-size: clamp(1.4rem, 4.2vw, 2rem); color: var(--color-accent); border-bottom: 3px dotted #FBCFE8; display: inline-block; padding: 0 1rem .2rem; min-width: 220px; }
.cert .cert-line { color: #475569; margin-top: .6rem; }
.cert .cert-stars { display: flex; justify-content: center; gap: .3rem; margin: .7rem 0; }
.cert .cert-stars svg { width: 26px; height: 26px; color: var(--color-secondary); fill: var(--color-secondary); }
.cert .cert-foot { display: flex; justify-content: space-between; gap: 1rem; margin-top: 1rem; font-size: .84rem; color: #64748B; }
/* ══ نافذة المساعدة ══ */
.overlay {
  position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; padding: 1rem;
  background: rgba(15,23,42,.55); backdrop-filter: blur(5px); animation: fadeUp .25s ease both;
}
.overlay[hidden] { display: none; }
.modal {
  background: #fff; border: 4px solid var(--color-border); border-radius: var(--radius-lg);
  padding: clamp(1.2rem, 3vw, 2rem); max-width: 560px; width: 100%; box-shadow: var(--shadow-clay-lg);
  animation: pop .35s cubic-bezier(.34,1.5,.5,1) both;
}
.modal h2 { display: flex; align-items: center; gap: .5rem; font-size: 1.3rem; margin-bottom: .8rem; }
.modal h2 svg { width: 24px; height: 24px; color: var(--color-primary); }
.help-list { list-style: none; display: grid; gap: .6rem; margin-bottom: 1.2rem; }
.help-list li { padding-right: 1.5rem; position: relative; color: #334155; font-size: .95rem; }
.help-list li::before { content: ''; position: absolute; right: 0; top: .55em; width: 9px; height: 9px; border-radius: 50%; background: var(--color-secondary); }
.kbd {
  display: inline-block; background: var(--color-muted); border: 2px solid var(--color-border);
  border-radius: 8px; padding: 0 .4rem; font-family: var(--font-heading); font-size: .85rem;
}
/* ══ التنبيهات ══ */
.toast-wrap { position: fixed; bottom: 1.2rem; right: 1.2rem; z-index: 90; display: grid; gap: .5rem; }
.toast {
  display: flex; align-items: center; gap: .5rem; background: #fff; color: #0F172A;
  border: 3px solid var(--color-border); border-radius: var(--radius); padding: .65rem 1rem;
  font-family: var(--font-heading); box-shadow: var(--shadow-clay-lg); animation: fadeUp .3s ease both;
}
.toast svg { width: 20px; height: 20px; }
.toast.good { border-color: var(--success-border); color: var(--success); }
.toast.bad { border-color: var(--danger-border); color: var(--color-destructive); }
.toast.info { border-color: #FDE68A; color: var(--color-secondary-dark); }
/* ══ الاستجابة ══ */
@media (max-width: 720px) {
  .hero { grid-template-columns: 1fr; text-align: center; }
  .hero-mascot { max-width: 190px; }
  .hero-actions, .panel-actions { justify-content: center; }
  .brand-sub { display: none; }
  .qmeta { order: 3; width: 100%; }
}
@media (max-width: 420px) {
  .hud-chip { font-size: .82rem; padding: .2rem .5rem; }
  .icon-btn { width: 36px; height: 36px; }
  .answers { grid-template-columns: repeat(2, 1fr); }
  .numpad-keys { grid-template-columns: repeat(5, 1fr); }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
}
@media print {
  .topbar, .bg-decor, .panel-actions, .toast-wrap, .field-label, #cert-name, .hint-line { display: none !important; }
  body { background: #fff; }
  #app > .screen { display: none !important; }
  #screen-cert { display: block !important; }
  .panel { border: none; box-shadow: none; padding: 0; }
  .panel h2 { display: none; }
}
