:root {
  --ink: #302b4e;
  --muted: #77718d;
  --purple: #7867d8;
  --purple-dark: #5e51b5;
  --lavender: #eeeafd;
  --peach: #ffdcca;
  --peach-deep: #f3a582;
  --mint: #dff5ec;
  --yellow: #fff1a7;
  --blue: #dff0ff;
  --pink: #ffe5ef;
  --white: #fffdfb;
  --shadow: 0 18px 45px rgba(81, 67, 145, .12);
  --soft-shadow: 0 8px 22px rgba(81, 67, 145, .09);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; min-width: 320px; color: var(--ink); background: #fbfaff; font-family: 'Nunito', system-ui, sans-serif; }
button, input { font: inherit; }
button { cursor: pointer; border: 0; }
button:focus-visible, input:focus-visible { outline: 3px solid rgba(120, 103, 216, .45); outline-offset: 3px; }
.page-shell { min-height: 100vh; overflow: hidden; position: relative; background: radial-gradient(circle at 90% 10%, #fff4ed 0, transparent 22%), radial-gradient(circle at 10% 80%, #f1ecff 0, transparent 24%), #fbfaff; }
.ambient { position: absolute; border-radius: 999px; pointer-events: none; filter: blur(2px); opacity: .55; }
.ambient-one { width: 320px; height: 320px; right: -160px; top: 230px; background: var(--mint); }
.ambient-two { width: 260px; height: 260px; left: -150px; bottom: 80px; background: var(--peach); }
.topbar { max-width: 1200px; margin: 0 auto; padding: 25px 34px 10px; display: flex; justify-content: space-between; align-items: center; position: relative; z-index: 2; }
.brand { display: inline-flex; align-items: center; gap: 10px; background: transparent; padding: 0; color: var(--ink); text-align: left; }
.brand-mark { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 14px; color: var(--purple); background: var(--yellow); transform: rotate(-8deg); box-shadow: 3px 4px 0 #eadb89; font-size: 21px; }
.brand-text { display: flex; flex-direction: column; line-height: 1; }
.brand-text strong { font-family: 'Baloo 2', cursive; font-size: 20px; letter-spacing: -.3px; }
.brand-text em { font-size: 10px; font-weight: 900; letter-spacing: 1.6px; text-transform: uppercase; color: var(--purple); font-style: normal; margin-top: 3px; }
.topbar-actions { display: flex; align-items: center; gap: 12px; }
.language-pill { background: rgba(255,255,255,.75); border: 1px solid #ebe7f7; border-radius: 99px; padding: 8px 13px; font-size: 12px; font-weight: 800; color: var(--muted); }
.dot, .live-dot { display: inline-block; width: 7px; height: 7px; background: #61c99e; border-radius: 50%; margin-right: 6px; box-shadow: 0 0 0 4px rgba(97,201,158,.15); }
.icon-btn { height: 38px; width: 38px; border-radius: 50%; color: var(--purple); background: var(--white); box-shadow: var(--soft-shadow); border: 1px solid #f0ebf8; }
main { position: relative; z-index: 1; }
.screen { display: none; max-width: 1200px; margin: 0 auto; padding: 38px 34px 70px; animation: screenIn .45s ease both; }
.screen.active { display: block; }
@keyframes screenIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
.hero-grid { min-height: 600px; display: grid; grid-template-columns: 1.03fr .97fr; align-items: center; gap: 44px; }
.eyebrow, .result-kicker { color: var(--purple); text-transform: uppercase; font-size: 11px; font-weight: 900; letter-spacing: 1.8px; }
.eyebrow-star { display: inline-block; color: #f4af57; font-size: 18px; transform: translateY(2px); margin-right: 4px; }
h1, h2, h3, p { margin-top: 0; }
h1 { font-family: 'Baloo 2', cursive; font-size: clamp(58px, 7.3vw, 94px); line-height: .86; letter-spacing: -3px; margin: 18px 0 26px; }
h1 span, h2 span { color: var(--purple); }
.hero-lede { max-width: 450px; color: var(--muted); font-size: 17px; line-height: 1.7; font-weight: 600; }
.hero-actions { display: flex; align-items: center; gap: 22px; margin-top: 30px; flex-wrap: wrap; }
.primary-btn { display: inline-flex; align-items: center; justify-content: center; gap: 18px; min-height: 54px; padding: 0 24px; color: white; border-radius: 17px; background: var(--purple); box-shadow: 0 8px 0 #5c50ad, 0 14px 24px rgba(120,103,216,.2); font-size: 14px; font-weight: 900; transition: transform .18s ease, box-shadow .18s ease, background .18s ease; }
.primary-btn:hover { transform: translateY(-2px); box-shadow: 0 10px 0 #5c50ad, 0 18px 28px rgba(120,103,216,.24); background: #8373e4; }
.primary-btn:active { transform: translateY(4px); box-shadow: 0 4px 0 #5c50ad; }
.primary-btn b { font-size: 22px; line-height: 0; font-weight: 600; }
.text-btn, .back-link { color: var(--purple-dark); background: transparent; font-size: 13px; font-weight: 900; padding: 8px 0; }
.text-btn span { display: inline-block; margin-left: 6px; font-size: 18px; transition: transform .15s; }
.text-btn:hover span { transform: translate(3px,-3px); }
.hero-stats { display: flex; gap: 34px; margin-top: 54px; }
.hero-stats div { display: flex; flex-direction: column; gap: 1px; }
.hero-stats strong { font-family: 'Baloo 2'; font-size: 24px; color: var(--ink); line-height: 1; }
.hero-stats span { font-size: 11px; color: var(--muted); font-weight: 800; }
.hero-art-wrap { position: relative; min-height: 560px; display: grid; place-items: center; }
.art-card { position: relative; width: min(100%, 430px); height: 485px; border-radius: 47% 47% 30px 30px; background: linear-gradient(145deg, #eeeafd 0%, #e6defe 55%, #d9ebf8 100%); box-shadow: var(--shadow); overflow: hidden; border: 9px solid rgba(255,255,255,.7); }
.art-card:before { content: ''; position: absolute; width: 280px; height: 280px; border-radius: 50%; top: -105px; right: -55px; background: rgba(255,255,255,.4); }
.character { position: absolute; z-index: 2; bottom: -14px; left: 5%; width: 90%; height: 92%; object-fit: contain; object-position: bottom center; filter: drop-shadow(0 14px 9px rgba(84,67,137,.13)); }
.ground-shadow { position: absolute; bottom: 19px; left: 21%; width: 58%; height: 30px; border-radius: 50%; background: rgba(80,68,146,.12); filter: blur(4px); }
.art-note { position: absolute; z-index: 3; font-family: 'Baloo 2'; font-size: 17px; font-weight: 700; padding: 10px 15px; border-radius: 15px; box-shadow: var(--soft-shadow); transform: rotate(-7deg); }
.note-one { top: 60px; left: -45px; background: var(--yellow); }
.note-two { right: -37px; bottom: 130px; background: var(--peach); transform: rotate(7deg); }
.spark { position: absolute; color: #efad6e; font-size: 30px; z-index: 4; animation: bob 3s ease-in-out infinite; }
.spark-a { top: 38px; left: 9%; }.spark-b { right: 4%; top: 143px; color: var(--purple); font-size: 18px; animation-delay: .6s; }.spark-c { bottom: 70px; left: 6%; color: #6bc5a1; animation-delay: 1.1s; }
.orbit { position: absolute; border: 1px dashed #c8bff6; border-radius: 50%; transform: rotate(22deg); pointer-events: none; }.orbit-one { width: 500px; height: 165px; }.orbit-two { width: 440px; height: 240px; border-color: #f7cbb9; transform: rotate(-32deg); }
@keyframes bob { 0%,100% { transform: translateY(0) rotate(0); } 50% { transform: translateY(-10px) rotate(8deg); } }
.rule-teaser { display: flex; align-items: center; gap: 15px; padding: 20px 22px; border-radius: 24px; background: rgba(255,255,255,.76); border: 1px solid #eeeaf8; box-shadow: var(--soft-shadow); max-width: 620px; }
.teaser-icon { width: 43px; height: 43px; border-radius: 14px; display: grid; place-items: center; color: #e8a56b; background: var(--yellow); font-size: 24px; }
.rule-teaser div:nth-child(2) { display: flex; flex-direction: column; gap: 2px; flex: 1; }.rule-teaser strong { font-family: 'Baloo 2'; font-size: 18px; }.rule-teaser span { font-size: 12px; color: var(--muted); font-weight: 700; }.round-arrow { width: 34px; height: 34px; color: var(--purple); background: var(--lavender); border-radius: 50%; font-size: 20px; }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin-bottom: 40px; }.compact-heading { align-items: center; }.section-heading h2 { font-family: 'Baloo 2'; font-size: clamp(42px, 6vw, 64px); line-height: .88; letter-spacing: -2px; margin: 12px 0 0; }.learn-layout { display: grid; grid-template-columns: 1.2fr .8fr; gap: 24px; align-items: stretch; }.recipe-card { padding: 27px; border-radius: 28px; background: linear-gradient(135deg, #fff 0%, #f5f1ff 100%); border: 1px solid #ebe6fa; box-shadow: var(--shadow); }.recipe-top { display: flex; justify-content: space-between; align-items: center; }.mini-label { font-size: 10px; font-weight: 900; letter-spacing: 1.7px; color: var(--purple); }.sound-chip { height: 34px; padding: 0 12px; color: var(--purple); background: var(--lavender); border-radius: 12px; font-size: 15px; }.formula-line { display: flex; gap: 11px; align-items: center; flex-wrap: wrap; padding: 22px 17px; margin-top: 20px; border-radius: 20px; background: rgba(255,255,255,.86); font-family: 'Baloo 2'; font-size: clamp(19px, 3vw, 28px); box-shadow: 0 5px 0 rgba(120,103,216,.06); }.formula-line + .formula-line { margin-top: 12px; }.formula-line b { color: #b7b1cc; }.formula-subject { color: var(--ink); }.formula-was { color: #f09a83; }.formula-were { color: #59a8c8; }.formula-ing { color: var(--purple); }.tip-box { display: flex; align-items: flex-start; gap: 10px; margin-top: 24px; padding: 16px; border-radius: 16px; background: var(--yellow); color: #705d46; }.tip-box span { font-size: 21px; }.tip-box p { margin: 0; font-size: 13px; line-height: 1.5; font-weight: 600; }.tip-box strong { color: var(--ink); }.learn-side { display: flex; flex-direction: column; gap: 17px; }.mini-rule { display: flex; gap: 16px; padding: 22px; border-radius: 23px; background: white; border: 1px solid #eeeaf8; box-shadow: var(--soft-shadow); }.rule-badge { flex: 0 0 39px; height: 39px; border-radius: 13px; display: grid; place-items: center; font-family: 'Baloo 2'; font-size: 24px; }.rule-badge.pink { background: var(--pink); color: #e982aa; }.rule-badge.blue { background: var(--blue); color: #56a8cb; }.mini-rule strong { font-family: 'Baloo 2'; font-size: 20px; }.mini-rule p { margin: 5px 0 0; color: var(--muted); font-size: 13px; line-height: 1.5; font-weight: 700; }.mini-rule b { color: var(--purple); }.arabic-hint { margin-top: auto; padding: 19px 21px; border-radius: 22px; color: #496c63; background: var(--mint); }.arabic-hint span { display: inline-block; margin-bottom: 6px; color: #38a77d; font-size: 10px; font-weight: 900; letter-spacing: 1.4px; text-transform: uppercase; }.arabic-hint p { direction: rtl; text-align: right; margin: 0; font-size: 14px; line-height: 1.6; font-weight: 700; }.learn-footer { text-align: center; margin-top: 36px; }
.challenge-screen { max-width: 920px; }.challenge-topline { display: flex; justify-content: space-between; align-items: center; gap: 14px; margin-bottom: 23px; }.challenge-label { font-size: 11px; letter-spacing: 1.5px; color: var(--purple); font-weight: 900; }.tiny-star { color: #f1b06d; margin-left: 4px; }.score-chip { padding: 9px 13px; border-radius: 99px; color: #6f654c; background: var(--yellow); font-size: 12px; font-weight: 900; }.progress-row { display: flex; align-items: center; gap: 14px; color: var(--muted); font-size: 11px; font-weight: 900; margin-bottom: 19px; }.progress-track { height: 9px; background: #ece9f7; border-radius: 99px; flex: 1; overflow: hidden; }.progress-fill { height: 100%; width: 5%; border-radius: inherit; background: linear-gradient(90deg, #f2b18c, var(--purple)); transition: width .35s ease; }.question-card { min-height: 495px; padding: 34px 38px 30px; background: rgba(255,255,255,.92); border: 1px solid #ebe7f7; border-radius: 32px; box-shadow: var(--shadow); }.question-meta { display: flex; align-items: center; gap: 10px; }.question-number { display: grid; place-items: center; width: 43px; height: 43px; border-radius: 14px; color: var(--purple); background: var(--lavender); font-family: 'Baloo 2'; font-size: 21px; }.question-type { color: var(--muted); font-size: 11px; font-weight: 900; text-transform: uppercase; letter-spacing: 1.2px; }.question-sound { margin-left: auto; display: inline-flex; align-items: center; gap: 6px; border-radius: 12px; padding: 9px 12px; color: var(--purple); background: #f8f6ff; font-size: 13px; font-weight: 900; }.question-prompt { max-width: 760px; font-family: 'Baloo 2'; font-size: clamp(33px, 5vw, 50px); letter-spacing: -.8px; line-height: 1.02; margin: 35px 0 8px; }.question-help { color: var(--muted); font-size: 14px; font-weight: 700; min-height: 20px; margin-bottom: 24px; }.answer-area { min-height: 117px; }.option-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }.option-btn { min-height: 58px; padding: 13px 16px; border: 2px solid #eeeaf8; border-radius: 16px; color: var(--ink); background: #fff; font-size: 16px; font-weight: 900; text-align: left; transition: all .16s ease; }.option-btn:hover:not(:disabled) { border-color: #bdb3f3; transform: translateY(-2px); box-shadow: 0 7px 16px rgba(120,103,216,.11); }.option-btn:disabled { cursor: default; }.option-btn.selected { border-color: var(--purple); background: var(--lavender); color: var(--purple-dark); }.option-btn.correct { border-color: #62c59e; background: #e4f8ee; color: #2d8c69; }.option-btn.incorrect { border-color: #ef9c99; background: #fff0ed; color: #c96769; }.fill-layout { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }.answer-input { flex: 1 1 220px; min-height: 58px; border: 2px solid #e9e5f5; border-radius: 16px; padding: 0 17px; color: var(--ink); background: #fff; font-size: 17px; font-weight: 800; }.check-btn { min-height: 58px; padding: 0 20px; border-radius: 16px; color: var(--purple-dark); background: var(--lavender); font-size: 14px; font-weight: 900; }.word-bank { display: flex; flex-wrap: wrap; gap: 9px; margin-bottom: 12px; }.word-chip { border: 2px solid #e8e3f8; color: var(--purple-dark); background: #fff; border-radius: 13px; padding: 10px 14px; font-size: 15px; font-weight: 900; transition: all .15s; }.word-chip:hover:not(:disabled) { background: var(--lavender); transform: translateY(-2px); }.word-chip.used { color: #aaa4bc; background: #f5f3fb; border-color: #f0edf8; text-decoration: line-through; }.assembled { min-height: 51px; display: flex; flex-wrap: wrap; gap: 7px; align-items: center; padding: 8px; margin-bottom: 12px; border-radius: 15px; border: 2px dashed #d3ccf4; background: #fbfaff; }.assembled:empty:before { content: 'Tap the words in order…'; color: #aaa3bb; font-size: 13px; font-weight: 700; padding: 4px; }.assembled-word { padding: 7px 10px; border-radius: 10px; color: var(--purple-dark); background: var(--lavender); font-size: 14px; font-weight: 900; }.feedback { display: none; margin-top: 23px; padding: 14px 16px; border-radius: 17px; align-items: center; gap: 11px; }.feedback.show { display: flex; }.feedback.correct { color: #2d8968; background: #e6f8ef; }.feedback.incorrect { color: #b35e67; background: #fff0ed; }.feedback-icon { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: rgba(255,255,255,.62); font-weight: 900; }.feedback-copy { font-size: 13px; font-weight: 800; line-height: 1.45; }.feedback-copy strong { display: block; font-family: 'Baloo 2'; font-size: 18px; line-height: 1; margin-bottom: 2px; }.challenge-nav { display: flex; justify-content: space-between; align-items: center; gap: 15px; margin-top: 22px; }.secondary-btn { min-height: 51px; padding: 0 18px; color: var(--muted); background: rgba(255,255,255,.72); border: 1px solid #e9e5f5; border-radius: 16px; font-size: 13px; font-weight: 900; }.secondary-btn:disabled, .next-btn:disabled { cursor: not-allowed; opacity: .48; box-shadow: none; transform: none; }.nav-hint { color: #9993ac; font-size: 11px; font-weight: 800; text-align: center; }.next-btn { min-height: 51px; }
.result-wrap { max-width: 850px; margin: 16px auto 0; text-align: center; position: relative; }.result-kicker { color: #d49261; }.result-wrap h2 { font-family: 'Baloo 2'; font-size: clamp(48px, 7vw, 76px); line-height: .9; letter-spacing: -2px; margin: 20px 0 10px; }.result-sub { color: var(--muted); font-size: 16px; font-weight: 700; }.score-burst { margin: 33px auto 34px; display: flex; align-items: center; justify-content: center; gap: 28px; max-width: 480px; padding: 22px 28px; border-radius: 28px; background: linear-gradient(135deg, #fff4d1, #ffe8db); box-shadow: var(--soft-shadow); }.score-ring { width: 145px; height: 145px; flex: 0 0 145px; display: flex; flex-direction: column; align-items: center; justify-content: center; border-radius: 50%; border: 10px solid #fff; box-shadow: 0 0 0 3px #f1c987; background: var(--yellow); }.score-ring strong { color: var(--purple-dark); font-family: 'Baloo 2'; font-size: 57px; line-height: .8; }.score-ring span { margin-top: 8px; color: #856b54; font-size: 11px; font-weight: 900; }.score-copy { text-align: left; }.score-copy strong { display: block; color: var(--purple-dark); font-family: 'Baloo 2'; font-size: 30px; }.score-copy p { color: #956851; font-size: 16px; font-weight: 800; }.review-panel { text-align: left; padding: 22px; border-radius: 25px; background: white; border: 1px solid #ebe7f7; box-shadow: var(--soft-shadow); }.review-header { display: flex; justify-content: space-between; align-items: baseline; gap: 15px; margin-bottom: 12px; }.review-header h3 { font-family: 'Baloo 2'; font-size: 24px; margin: 0; }.review-header span { color: var(--muted); font-size: 11px; font-weight: 900; }.review-list { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; max-height: 245px; overflow: auto; padding-right: 3px; }.review-item { display: flex; align-items: flex-start; gap: 8px; padding: 10px; border-radius: 13px; font-size: 11px; line-height: 1.35; font-weight: 800; }.review-item.good { background: #edf9f3; color: #398c6e; }.review-item.bad { background: #fff2ef; color: #bb6a6b; }.review-status { width: 20px; height: 20px; flex: 0 0 20px; border-radius: 50%; display: grid; place-items: center; background: rgba(255,255,255,.8); font-size: 11px; }.review-item b { display: block; color: var(--ink); margin-bottom: 2px; }.review-item small { display: block; color: inherit; opacity: .82; }.result-actions { display: flex; justify-content: center; align-items: center; gap: 23px; margin-top: 29px; }.result-confetti span { position: absolute; color: #f3b26e; animation: bob 2.6s ease-in-out infinite; }.result-confetti span:nth-child(1) { left: 10%; top: 6%; font-size: 29px; }.result-confetti span:nth-child(2) { right: 11%; top: 13%; color: var(--purple); animation-delay: .5s; }.result-confetti span:nth-child(3) { left: 3%; top: 32%; color: #6dc6a2; animation-delay: .8s; }.result-confetti span:nth-child(4) { right: 3%; top: 40%; color: #f09b80; animation-delay: 1.1s; }.result-confetti span:nth-child(5) { left: 19%; top: 1%; color: #7ebce2; animation-delay: 1.5s; }
.footer { max-width: 1200px; margin: 0 auto; padding: 18px 34px 24px; display: flex; justify-content: space-between; gap: 15px; color: #aaa4b8; font-size: 10px; font-weight: 800; position: relative; z-index: 1; }
@media (max-width: 800px) { .topbar { padding: 18px 20px 8px; }.language-pill { display: none; }.screen { padding: 28px 20px 48px; }.hero-grid { grid-template-columns: 1fr; gap: 28px; min-height: auto; }.hero-copy { text-align: center; }.hero-lede { margin-left: auto; margin-right: auto; }.hero-actions { justify-content: center; }.hero-stats { justify-content: center; margin-top: 38px; }.hero-art-wrap { min-height: 420px; transform: scale(.88); margin: -18px 0 -35px; }.rule-teaser { margin: 0 auto; }.learn-layout { grid-template-columns: 1fr; }.learn-side { display: grid; grid-template-columns: repeat(2, 1fr); }.arabic-hint { grid-column: 1 / -1; }.question-card { padding: 26px 22px 24px; min-height: 480px; }.question-prompt { margin-top: 28px; }.question-sound span { display: none; }.challenge-nav { flex-wrap: wrap; }.nav-hint { order: 3; width: 100%; }.footer { padding: 15px 20px 20px; flex-direction: column; text-align: center; } }
@media (max-width: 500px) { h1 { font-size: 59px; }.hero-art-wrap { transform: scale(.76); margin: -34px -30px 30px; }.hero-stats { gap: 19px; }.hero-stats span { font-size: 9px; }.section-heading { align-items: flex-start; flex-direction: column; margin-bottom: 25px; }.section-heading h2 { font-size: 48px; }.formula-line { gap: 7px; font-size: 20px; padding: 18px 13px; }.learn-side { display: flex; }.challenge-topline { flex-wrap: wrap; }.challenge-label { order: 3; width: 100%; text-align: center; }.progress-row { gap: 8px; }.progress-row span { font-size: 10px; }.question-meta { align-items: flex-start; }.question-type { max-width: 120px; line-height: 1.25; }.question-prompt { font-size: 36px; }.option-grid { grid-template-columns: 1fr; }.option-btn { min-height: 54px; }.score-burst { flex-direction: column; gap: 17px; }.score-copy { text-align: center; }.review-list { grid-template-columns: 1fr; }.review-header { flex-direction: column; gap: 3px; }.result-actions { flex-direction: column; gap: 12px; }.result-actions .text-btn { order: 2; } }
