@font-face { font-family: 'Baloo'; src: url(fonts/baloo-bhaijaan-2-arabic.woff2) format('woff2');
  unicode-range: U+0600-06FF, U+0750-077F, U+FB50-FDFF, U+FE70-FEFF; font-display: swap; }
@font-face { font-family: 'Baloo'; src: url(fonts/baloo-bhaijaan-2-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF; font-display: swap; }

:root {
  --ink: #1f3b2d; --muted: #5c7567; --paper: #fffdf6; --sky1: #cfeeff; --sky2: #f3fbe6;
  --green: #2f8a3e; --green-d: #23702f; --soft: #e8f3df; --amber: #fff0c9; --amber-ink: #7a5300; --line: #cfe3c3;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; min-height: 100%; }
body {
  font-family: 'Baloo', system-ui, sans-serif; color: var(--ink); line-height: 1.6;
  background: linear-gradient(var(--sky1), var(--sky2) 60%) fixed; font-size: 20px;
  padding: env(safe-area-inset-top) 0 env(safe-area-inset-bottom);
}
.top { display: flex; justify-content: space-between; gap: 8px; max-width: 560px; margin: 0 auto; padding: 10px 16px 0; }
main { max-width: 560px; margin: 0 auto; padding: 8px 16px 40px; }
h1, h2 { margin: 8px 0; line-height: 1.3; }
h1 { font-size: 1.5rem; } h2 { font-size: 1.2rem; }
p { margin: 6px 0; }

button { font: inherit; color: inherit; cursor: pointer; border: 0; }
button:focus-visible { outline: 3px solid #2b6cb0; outline-offset: 2px; }
.ghost { background: rgba(255,255,255,.65); border-radius: 999px; padding: 6px 14px; font-size: .85rem; min-height: 44px; }
.btn { background: var(--green); color: #fff; border-radius: 18px; padding: 12px 22px; min-height: 56px; font-size: 1.1rem;
  box-shadow: 0 4px 0 var(--green-d); }
.btn:active { transform: translateY(2px); box-shadow: 0 2px 0 var(--green-d); }
.btn.alt { background: #fff; color: var(--ink); box-shadow: 0 4px 0 var(--line); border: 2px solid var(--line); }
.btn[disabled] { opacity: .45; }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; justify-content: center; margin: 12px 0; }

/* garden */
.garden { position: relative; border-radius: 24px; overflow: hidden; padding: 12px 8px 0; margin: 8px 0 14px;
  background: linear-gradient(#bfe8ff, #e3f6c9 70%); border: 2px solid #fff; }
.garden .sun { position: absolute; top: 10px; left: 14px; font-size: 2rem; }
.beds { display: flex; justify-content: space-around; align-items: flex-end; min-height: 190px; position: relative; z-index: 1; }
.bed { background: none; display: flex; flex-direction: column; align-items: center; width: 33%; padding: 0; }
.bed svg { width: 100%; max-width: 130px; height: auto; }
.bed .cap { font-size: .8rem; background: rgba(255,255,255,.8); border-radius: 12px; padding: 0 8px; margin-bottom: 6px; }
.ground { height: 22px; background: #8bc76a; margin: 0 -8px; }
.cards { display: grid; gap: 10px; }
.card { display: flex; align-items: center; gap: 14px; background: var(--paper); border: 2px solid var(--line); border-radius: 20px;
  padding: 12px 16px; text-align: right; width: 100%; min-height: 72px; }
.card .em { font-size: 2.2rem; }
.card .t { font-size: 1.1rem; }
.card .s { font-size: .8rem; color: var(--muted); }

/* story */
.scene { text-align: center; font-size: 4.2rem; background: var(--paper); border-radius: 24px; border: 2px solid var(--line);
  padding: 18px 8px; margin: 8px 0; letter-spacing: 6px; }
.text { background: var(--paper); border-radius: 20px; border: 2px solid var(--line); padding: 16px 18px; font-size: 1.6rem; line-height: 2.1; }
.text .w { border-radius: 8px; padding: 0 2px; transition: background .12s; }
.text .w.on { background: #ffe58a; }
.dots { display: flex; justify-content: center; gap: 8px; margin: 10px 0; }
.dots i { width: 12px; height: 12px; border-radius: 50%; background: var(--line); }
.dots i.on { background: var(--green); }
.rec { font-size: .85rem; color: var(--muted); text-align: center; min-height: 1.4em; }

/* quiz */
.q { background: var(--paper); border: 2px solid var(--line); border-radius: 22px; padding: 16px; margin: 8px 0; }
.q .qt { font-size: 1.5rem; line-height: 1.9; }
.big-letter { text-align: center; font-size: 6rem; line-height: 1.1; color: #7a5cc7; margin: 0; }
.opts { display: grid; gap: 10px; margin-top: 12px; }
.opt { background: #fff; border: 2px solid var(--line); border-radius: 18px; padding: 12px 16px; font-size: 1.4rem; min-height: 60px;
  display: flex; align-items: center; gap: 12px; text-align: right; width: 100%; }
.opt .em { font-size: 2rem; }
.opt.right { background: #d9f2cf; border-color: var(--green); }
.opt.chosen-wrong { background: var(--amber); border-color: #e0b04a; }
.opt[disabled] { cursor: default; }
.note { background: var(--amber); color: var(--amber-ink); border-radius: 16px; padding: 10px 14px; margin: 10px 0; font-size: 1.1rem; }
.note.good { background: #d9f2cf; color: #1d5a28; }
.note .quote { font-size: 1.3rem; line-height: 2; color: var(--ink); }
.progress { text-align: center; color: var(--muted); font-size: .85rem; }

/* result flower */
.bloom { text-align: center; }
.bloom svg { width: 70%; max-width: 260px; height: auto; }
.bloom .petal { transform-box: fill-box; transform-origin: 50% 100%; animation: pop .6s ease-out both; }
@keyframes pop { from { transform: scale(0); opacity: 0; } to { transform: scale(1); opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .bloom .petal { animation: none; } }

/* parents */
table { width: 100%; border-collapse: collapse; font-size: .9rem; background: var(--paper); border-radius: 14px; overflow: hidden; }
th, td { padding: 8px 10px; text-align: right; border-bottom: 1px solid var(--line); }
.small { font-size: .8rem; color: var(--muted); }
