/* صفحة بيع اللعبة — من نَواة */
:root {
  --sky: #7FD3FF;
  --sky-l: #D9F2FF;
  --mint: #4FD1A5;
  --mint-d: #2BA982;
  --mint-l: #DDF8EE;
  --yellow: #FFD23F;
  --yellow-d: #E0A800;
  --yellow-l: #FFF4C7;
  --pink: #FF5CAA;
  --pink-d: #D93A87;
  --pink-l: #FFE1EF;
  --purple: #8E5CF6;
  --purple-d: #6B3CD6;
  --purple-l: #ECE3FF;
  --ink: #2A2340;
  --ink-2: #5A5373;
  --paper: #FFFDF7;
  --line: #ECE6F5;
  --r: 26px;
  --font: 'Baloo Bhaijaan 2', 'Segoe UI', Tahoma, 'Noto Sans Arabic', system-ui, sans-serif;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--paper);
  font-size: 17px;
  line-height: 1.65;
  overflow-x: hidden;
}
img, svg, canvas { display: block; max-width: 100%; }
h1, h2, h3, h4 { margin: 0; line-height: 1.25; }
p { margin: 0; }
a { color: inherit; }
button { font: inherit; }

.wrap { width: 100%; max-width: 1140px; margin: 0 auto; padding: 0 16px; }
.wrap-narrow { max-width: 780px; }

.skip {
  position: absolute; inset-inline-start: 12px; top: -60px; z-index: 50;
  background: var(--ink); color: #fff; padding: 8px 14px; border-radius: 12px; text-decoration: none;
}
.skip:focus { top: 10px; }

/* أزرار */
.btn {
  --bg: var(--yellow); --sh: var(--yellow-d); --fg: var(--ink);
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 0; cursor: pointer; text-decoration: none; white-space: nowrap;
  font-weight: 800; color: var(--fg); background: var(--bg);
  border-radius: 999px; box-shadow: 0 6px 0 var(--sh);
  transition: transform .12s ease, box-shadow .12s ease, filter .12s ease;
  -webkit-tap-highlight-color: transparent;
}
.btn:hover { filter: brightness(1.04); transform: translateY(-1px); box-shadow: 0 7px 0 var(--sh); }
.btn:active { transform: translateY(5px); box-shadow: 0 1px 0 var(--sh); }
.btn:focus-visible { outline: 4px solid var(--purple); outline-offset: 4px; }
.btn-lg { font-size: 20px; padding: 14px 28px 12px; min-height: 58px; }
.btn-md { font-size: 17px; padding: 10px 22px 8px; min-height: 48px; }
.btn-sm { font-size: 15px; padding: 6px 14px 4px; min-height: 38px; box-shadow: 0 4px 0 var(--sh); }
.btn-sm:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--sh); }
.btn-block { width: 100%; }
.btn-yellow { --bg: var(--yellow); --sh: var(--yellow-d); }
.btn-white { --bg: #fff; --sh: #C9C1DA; }
.btn-mint { --bg: var(--mint); --sh: var(--mint-d); --fg: #fff; }
.btn-ghost { --bg: rgba(255,255,255,.7); --sh: rgba(42,35,64,.18); }

/* الشريط العلوي */
.topbar {
  position: sticky; top: 0; z-index: 30;
  background: rgba(127, 211, 255, .92);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255,255,255,.5);
}
.topbar-in { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 60px; }
.brand { display: flex; align-items: center; gap: 8px; text-decoration: none; font-weight: 800; font-size: 24px; }
.brand-dot {
  width: 30px; height: 30px; border-radius: 50%; background: var(--mint);
  box-shadow: inset -4px -5px 0 var(--mint-d); position: relative; flex: none;
}
.brand-dot::before {
  content: ''; position: absolute; width: 9px; height: 9px; border-radius: 50%;
  background: var(--yellow); top: -8px; inset-inline-start: 11px; box-shadow: 0 0 0 2px #fff;
}
.brand-dot::after {
  content: ''; position: absolute; width: 5px; height: 5px; border-radius: 50%;
  background: var(--ink); top: 10px; inset-inline-start: 8px; box-shadow: 9px 0 0 var(--ink);
}
.topnav { display: flex; align-items: center; gap: 8px; }
.navlink { display: none; text-decoration: none; font-weight: 700; padding: 6px 8px; border-radius: 10px; }
.navlink:hover { background: rgba(255,255,255,.5); }

/* البطل */
.hero {
  position: relative; overflow: hidden;
  background: linear-gradient(180deg, var(--sky) 0%, #A9E2FF 60%, #CFF0FF 100%);
  padding: 26px 0 70px;
}
.hero-in { position: relative; display: grid; gap: 26px; z-index: 2; }
.eyebrow {
  display: inline-block; background: #fff; color: var(--purple-d); font-weight: 800;
  font-size: 15px; padding: 4px 14px; border-radius: 999px; box-shadow: 0 3px 0 rgba(42,35,64,.12);
}
.hero-title {
  margin-top: 12px;
  font-size: clamp(64px, 18vw, 120px); line-height: 1.05; font-weight: 800;
  color: #fff;
  text-shadow: 0 5px 0 var(--purple), 0 10px 0 rgba(42,35,64,.18);
  letter-spacing: 0;
  min-height: 1.05em;
}
.hero-promise { margin-top: 14px; font-size: clamp(22px, 5.6vw, 30px); font-weight: 800; line-height: 1.35; }
.hero-sub { margin-top: 10px; color: #3A3356; font-size: 18px; max-width: 34em; }
.cta-row { display: flex; flex-wrap: wrap; gap: 14px 12px; margin-top: 22px; }
.chips { list-style: none; padding: 0; margin: 20px 0 0; display: flex; flex-wrap: wrap; gap: 8px; }
.chips li {
  background: rgba(255,255,255,.65); border-radius: 999px; padding: 3px 14px;
  font-weight: 700; font-size: 15px;
}
.chips li::before { content: '✓'; color: var(--mint-d); font-weight: 800; margin-inline-end: 6px; }

.stage-frame {
  position: relative; border-radius: 30px; overflow: hidden;
  background: #fff; padding: 8px;
  box-shadow: 0 10px 0 rgba(42,35,64,.14), 0 24px 50px rgba(42,35,64,.14);
  transform: rotate(-1.2deg);
}
#hero-canvas { width: 100%; aspect-ratio: 4 / 3; border-radius: 22px; }

.cloud { position: absolute; background: #fff; border-radius: 999px; opacity: .8; z-index: 1; }
.cloud::before, .cloud::after { content: ''; position: absolute; background: #fff; border-radius: 50%; }
.c1 { width: 120px; height: 34px; top: 80px; left: -30px; animation: drift 38s linear infinite; }
.c1::before { width: 56px; height: 56px; top: -26px; left: 22px; }
.c1::after { width: 40px; height: 40px; top: -16px; left: 62px; }
.c2 { width: 90px; height: 26px; top: 200px; right: -20px; animation: drift 46s linear infinite reverse; opacity: .6; }
.c2::before { width: 42px; height: 42px; top: -20px; left: 16px; }
.c2::after { width: 30px; height: 30px; top: -12px; left: 46px; }
.c3 { width: 150px; height: 40px; bottom: 80px; left: 40%; opacity: .45; animation: drift 60s linear infinite; }
.c3::before { width: 64px; height: 64px; top: -30px; left: 30px; }
.c3::after { width: 48px; height: 48px; top: -20px; left: 80px; }
@keyframes drift { from { transform: translateX(-30px); } 50% { transform: translateX(40px); } to { transform: translateX(-30px); } }

.hero-wave {
  position: absolute; bottom: -1px; left: 0; right: 0; height: 46px; z-index: 2;
  background: var(--paper);
  -webkit-mask: radial-gradient(30px 24px at 50% 0, transparent 98%, #000) 0 0 / 60px 46px repeat-x;
  mask: radial-gradient(30px 24px at 50% 0, transparent 98%, #000) 0 0 / 60px 46px repeat-x;
}

/* أقسام */
.section { padding: 56px 0; scroll-margin-top: 60px; }
.section-sky { background: var(--sky-l); }
.section-mint { background: var(--mint-l); }
.section-soft { background: #FFF8E6; }
.h2 { font-size: clamp(30px, 7vw, 44px); font-weight: 800; text-align: center; display: flex; align-items: center; justify-content: center; gap: 10px; flex-wrap: wrap; }
.h2-emoji { width: 44px; height: 44px; }
.lead { text-align: center; color: var(--ink-2); font-size: 18px; margin: 8px auto 30px; max-width: 34em; }

.card {
  background: #fff; border-radius: var(--r); padding: 22px;
  box-shadow: 0 6px 0 var(--line), 0 14px 30px rgba(42,35,64,.06);
  border: 2px solid var(--line);
}
.card h3 { font-size: 22px; font-weight: 800; margin-bottom: 6px; }
.card p { color: var(--ink-2); }

/* ماذا يتعلّم */
.learn-grid { display: grid; gap: 16px; }
.learn-card { position: relative; }
.tiles { display: flex; gap: 8px; margin-bottom: 14px; }
.tiles span {
  width: 54px; height: 54px; border-radius: 16px; display: grid; place-items: center;
  font-size: 32px; font-weight: 800; color: #fff; line-height: 1;
  background: var(--t, var(--mint)); box-shadow: 0 5px 0 var(--td, var(--mint-d));
}
.tiles span:nth-child(2) { transform: rotate(-6deg); }
.tiles span:nth-child(3) { transform: rotate(5deg); }
.tone-mint { --t: var(--mint); --td: var(--mint-d); }
.tone-sky { --t: #3FAEF0; --td: #1F87C8; }
.tone-purple { --t: var(--purple); --td: var(--purple-d); }
.tone-pink { --t: var(--pink); --td: var(--pink-d); }
.tone-yellow { --t: var(--yellow); --td: var(--yellow-d); }
.tiles-en span { font-family: 'Baloo Bhaijaan 2', 'Arial Rounded MT Bold', system-ui, sans-serif; }
.tiles-spell span:nth-child(1) { transform: rotate(4deg); }
.mic-tile { width: 54px; }

/* خطوات الجولة */
.steps, .get-steps { list-style: none; padding: 0; margin: 0; display: grid; gap: 22px; }
.step, .get { position: relative; text-align: center; padding-top: 28px; }
.step-num {
  position: absolute; top: -16px; inset-inline-start: 50%; transform: translateX(50%);
  width: 42px; height: 42px; border-radius: 50%;
  display: grid; place-items: center; font-weight: 800; font-size: 22px; line-height: 1;
  background: var(--pink); color: #fff; box-shadow: 0 4px 0 var(--pink-d);
}
.step-art {
  border-radius: 20px; overflow: hidden; margin-bottom: 14px;
  background: linear-gradient(180deg, #BDE9FF, #E6F7FF);
}
.step-art canvas { width: 100%; aspect-ratio: 16 / 10; }

/* المزايا */
.feat-grid { display: grid; gap: 16px; }
.feat { display: flex; flex-direction: column; }
.feat-wide { background: var(--yellow-l); border-color: #FBE7A1; box-shadow: 0 6px 0 #F5DC8A, 0 14px 30px rgba(42,35,64,.06); }
.feat-art { border-radius: 20px; overflow: hidden; background: radial-gradient(circle at 50% 80%, #FFE98F, #FFF6CF 70%); margin-bottom: 14px; }
.feat-art canvas { width: 100%; aspect-ratio: 16 / 9; }
.feat-emoji { width: 64px; height: 64px; margin-bottom: 10px; }
.feat-svg { width: 64px; height: 64px; display: block; margin-bottom: 10px; }
.feat-svg svg { width: 100%; height: 100%; }
.feat-icons { display: flex; gap: 8px; margin-bottom: 12px; }
.pw {
  width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center;
  background: var(--purple-l); padding: 8px;
}
.pw svg, .pw img { width: 100%; height: 100%; }
.pw-x2 { background: var(--yellow); color: var(--ink); font-weight: 800; font-size: 22px; box-shadow: 0 4px 0 var(--yellow-d); }
.worlds { display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px; margin-bottom: 12px; max-width: 320px; }
.w { aspect-ratio: 1; border-radius: 12px; position: relative; overflow: hidden; }
.w::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 38%; }
.w-garden { background: #9BE1FF; } .w-garden::after { background: #5BC95A; }
.w-beach { background: #7FD3FF; } .w-beach::after { background: linear-gradient(#3FA9F5 0 40%, #F6DC97 40%); }
.w-desert { background: #FFD9A0; } .w-desert::after { background: #E9B460; border-radius: 50% 50% 0 0; }
.w-snow { background: #CFE8FF; } .w-snow::after { background: #fff; }
.w-candy { background: #FFC6E3; } .w-candy::after { background: repeating-linear-gradient(90deg, #FF5CAA 0 6px, #fff 6px 12px); }
.w-night { background: #2E2A6E; } .w-night::before { content: ''; position: absolute; width: 8px; height: 8px; border-radius: 50%; background: #FFE98F; top: 18%; right: 22%; box-shadow: -14px 6px 0 -2px #fff; }
.w-night::after { background: #3C4C8E; }

/* الحصول عليها */
.get-emoji { width: 56px; height: 56px; margin: 0 auto 8px; }
.get p { margin-bottom: 16px; }
.get-install { text-align: start; }
.get-install > h3 { text-align: center; margin-bottom: 14px; }
.install { display: grid; gap: 14px; }
.install-box { background: #F7F4FC; border-radius: 20px; padding: 16px; }
.install-box h4 { display: flex; align-items: center; gap: 8px; font-size: 19px; font-weight: 800; margin-bottom: 6px; }
.install-box p { margin-bottom: 12px; }
.install-box .note { font-size: 14px; margin: 10px 0 0; }
.os { width: 28px; height: 28px; flex: none; }
.os svg { width: 100%; height: 100%; }
.ios-steps { margin: 0 0 14px; padding-inline-start: 22px; color: var(--ink-2); }
.ios-steps li { margin-bottom: 4px; }
.share-ico { display: inline-grid; place-items: center; vertical-align: middle; color: #1F87C8; background: #fff; border-radius: 6px; width: 26px; height: 26px; }

/* السعر */
.price-grid { display: grid; gap: 22px; max-width: 860px; margin: 0 auto; align-items: start; }
.price { position: relative; }
.price .amount { margin: 6px 0 14px; display: flex; align-items: baseline; flex-wrap: wrap; gap: 6px 10px; }
.price .amount b { font-size: 44px; line-height: 1.1; font-weight: 800; color: var(--ink); }
.price .amount span { color: var(--ink-2); font-weight: 700; }
.price-full {
  border: 3px solid var(--purple);
  box-shadow: 0 8px 0 var(--purple-d), 0 20px 40px rgba(142,92,246,.18);
  background: linear-gradient(180deg, #fff 0%, #FBF8FF 100%);
}
.price-full .amount b { font-size: 64px; color: var(--purple-d); }
.price-emoji { width: 56px; height: 56px; position: absolute; top: -26px; inset-inline-end: 22px; }
.ribbon {
  display: inline-block; background: var(--pink); color: #fff; font-weight: 800; font-size: 14px;
  padding: 2px 12px; border-radius: 999px; margin-bottom: 8px; box-shadow: 0 3px 0 var(--pink-d);
}
.ticks { list-style: none; padding: 0; margin: 0 0 20px; display: grid; gap: 8px; }
.ticks li { display: flex; gap: 10px; align-items: flex-start; font-weight: 600; }
.ticks li::before {
  content: ''; flex: none; width: 24px; height: 24px; margin-top: 2px;
  background: url('img/check.png') center / contain no-repeat;
}

/* الأسئلة */
.faq { display: grid; gap: 12px; }
.faq details {
  background: #fff; border-radius: 20px; border: 2px solid #F3E6BF;
  box-shadow: 0 4px 0 #F3E6BF;
}
.faq summary {
  cursor: pointer; list-style: none; padding: 16px 18px; font-weight: 800; font-size: 18px;
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: '+'; flex: none; width: 32px; height: 32px; border-radius: 50%;
  display: grid; place-items: center; background: var(--yellow); font-size: 22px; line-height: 1;
  transition: transform .2s ease;
}
.faq details[open] summary::after { transform: rotate(45deg); }
.faq summary:focus-visible { outline: 3px solid var(--purple); outline-offset: 2px; border-radius: 18px; }
.faq-a { padding: 0 18px 18px; color: var(--ink-2); }

/* دعوة أخيرة */
.final {
  background: linear-gradient(135deg, var(--purple) 0%, #6E48E0 55%, var(--pink) 130%);
  color: #fff; padding: 40px 0 50px; overflow: hidden;
}
.final-in { display: grid; gap: 10px; align-items: center; text-align: center; }
.final .cta-row { justify-content: center; }
.final-canvas { width: 220px; height: 200px; margin: 0 auto; }
.h2-light { color: #fff; }
.lead-light { color: rgba(255,255,255,.88); margin-bottom: 0; }

/* الفوتر */
.footer { background: var(--ink); color: #D9D3EA; padding: 30px 0 calc(30px + env(safe-area-inset-bottom)); }
.footer-in { display: grid; gap: 14px; justify-items: center; text-align: center; }
.from-nawah { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: #fff; font-size: 20px; }
.from-nawah img { width: 34px; height: auto; }
.from-nawah:hover b { text-decoration: underline; }
.footer-text { font-size: 15px; }
.footer-links { display: flex; flex-wrap: wrap; gap: 6px 18px; justify-content: center; }
.footer-links a { color: #fff; font-weight: 700; text-decoration: none; opacity: .85; }
.footer-links a:hover { opacity: 1; text-decoration: underline; }

/* تنبيه */
.toast {
  position: fixed; left: 50%; bottom: calc(22px + env(safe-area-inset-bottom)); z-index: 60;
  transform: translate(-50%, 30px); opacity: 0; pointer-events: none;
  background: var(--ink); color: #fff; font-weight: 700; font-size: 17px;
  padding: 12px 22px; border-radius: 999px; box-shadow: 0 8px 24px rgba(0,0,0,.25);
  transition: transform .25s ease, opacity .25s ease; max-width: calc(100vw - 32px); text-align: center;
}
.toast.show { transform: translate(-50%, 0); opacity: 1; }

/* شاشات صغيرة جداً */
@media (max-width: 370px) {
  .brand { font-size: 20px; }
  .btn-sm { font-size: 14px; padding: 6px 10px 4px; }
  .btn-lg { font-size: 18px; padding: 12px 20px 10px; }
}

/* تابلت */
@media (min-width: 640px) {
  .learn-grid { grid-template-columns: 1fr 1fr; }
  .feat-grid { grid-template-columns: 1fr 1fr; }
  .feat-wide { grid-column: 1 / -1; display: grid; grid-template-columns: 1.1fr 1fr; gap: 20px; align-items: center; }
  .feat-wide .feat-art { margin-bottom: 0; }
  .price-grid { grid-template-columns: 1fr 1.25fr; }
  .install { grid-template-columns: 1fr 1fr; }
  .feat:last-child { grid-column: 1 / -1; }
}

/* سطح المكتب */
@media (min-width: 900px) {
  body { font-size: 18px; }
  .navlink { display: inline-block; }
  .hero { padding: 48px 0 96px; }
  .hero-in { grid-template-columns: 1fr 1.05fr; align-items: center; gap: 40px; }
  .section { padding: 84px 0; }
  .learn-grid { grid-template-columns: repeat(4, 1fr); }
  .steps { grid-template-columns: repeat(3, 1fr); gap: 26px; }
  .feat-grid { grid-template-columns: repeat(3, 1fr); }
  .feat-wide { grid-column: span 2; }
  .feat:last-child { grid-column: auto; }
  .get-steps { grid-template-columns: 1fr 1fr; }
  .get-install { grid-column: 1 / -1; }
  .final-in { grid-template-columns: auto 1fr; text-align: start; gap: 30px; }
  .final .cta-row, .final .h2 { justify-content: flex-start; }
  .final .lead { text-align: start; margin-inline: 0; }
  .final-canvas { width: 260px; height: 230px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .cloud { animation: none; }
  .btn, .toast { transition: none; }
}

/* ===== نافذة طلب الشراء ===== */
.buy-modal { position: fixed; inset: 0; z-index: 100; background: rgba(42,35,64,.55); display: flex; align-items: center; justify-content: center; padding: 16px; }
.buy-modal[hidden] { display: none; }
.buy-card { position: relative; background: #fff; border-radius: 28px; padding: 26px 22px 22px; width: 100%; max-width: 440px; max-height: calc(100vh - 32px); overflow-y: auto; box-shadow: 0 10px 0 rgba(0,0,0,.12); }
.buy-card h3 { margin: 0 0 14px; font-size: 24px; text-align: center; }
.buy-x { position: absolute; top: 10px; left: 12px; width: 40px; height: 40px; border: 0; border-radius: 50%; background: #F1EEF8; font-size: 26px; line-height: 1; cursor: pointer; color: #2A2340; }
.buy-form { display: flex; flex-direction: column; gap: 10px; }
.buy-form label { display: flex; flex-direction: column; gap: 4px; font-weight: 700; font-size: 16px; }
.buy-form input { font: inherit; font-size: 18px; padding: 10px 14px; border-radius: 14px; border: 3px solid #E3DDF0; }
.buy-form input:focus { outline: none; border-color: #8E5CF6; }
.buy-form .hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.buy-err { margin: 0; color: #C0392B; font-weight: 700; }
.buy-note { margin: 0; font-size: 14px; opacity: .75; text-align: center; }
.buy-done { display: flex; flex-direction: column; gap: 10px; text-align: center; }
.buy-done[hidden], .buy-form[hidden], .buy-err[hidden] { display: none; }
.buy-done p { margin: 0; font-size: 18px; }
.buy-done .ok { font-size: 28px; font-weight: 800; color: #17A86A; }
body.no-scroll { overflow: hidden; }
