:root {
  --achtergrond: #fdf8ef;
  --kaart: #ffffff;
  --tekst: #3b3a4a;
  --zacht: #7a7889;
  --rood: #e8687a;
  --groen: #4cb38a;
  --blauw: #4a9fd8;
  --geel: #e8b84d;
  --rand: #ece4d4;
  --schaduw: 0 4px 0 rgba(0, 0, 0, .08);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--achtergrond);
  color: var(--tekst);
  font-family: 'Baloo Bhaijaan 2', system-ui, sans-serif;
  font-size: 18px;
  -webkit-tap-highlight-color: transparent;
}

#app { max-width: 720px; margin: 0 auto; padding: 16px; }

button { font: inherit; color: inherit; cursor: pointer; }
a { color: inherit; text-decoration: none; }
[lang="ar"] { font-family: 'Baloo Bhaijaan 2', 'Noto Naskh Arabic', serif; }

.knop {
  display: inline-block;
  padding: 10px 22px;
  border: 0;
  border-radius: 14px;
  background: var(--kaart);
  box-shadow: var(--schaduw), inset 0 0 0 2px var(--rand);
  font-weight: 700;
}
.knop.hoofd { background: var(--geel); color: #fff; box-shadow: var(--schaduw); }
.knop:active { transform: translateY(2px); }

/* ---------- Menu ---------- */

.kop { text-align: center; margin: 8px 0 24px; }
.kop h1 { font-size: 64px; margin: 0; line-height: 1.2; }
.kop h1 span:nth-child(1) { color: var(--rood); }
.kop h1 span:nth-child(2) { color: var(--groen); }
.kop h1 span:nth-child(3) { color: var(--blauw); }
.kop p { margin: 0; color: #c98a3c; font-size: 20px; }

.thema h2 { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 22px; margin: 0 0 12px; }
.themanr {
  display: grid; place-items: center;
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--groen); color: #fff; font-size: 18px;
}
.thema-ar { color: var(--zacht); font-size: 18px; font-weight: 500; }

.lessen { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.les {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 14px;
  background: var(--kaart);
  border-radius: 16px;
  box-shadow: var(--schaduw), inset 0 0 0 2px var(--rand);
}
.les:active { transform: translateY(2px); }
.les .nr {
  flex: none; display: grid; place-items: center;
  width: 36px; height: 36px; border-radius: 12px;
  background: var(--blauw); color: #fff; font-weight: 700;
}
.les .titel { flex: 1; font-weight: 500; }
.sterren { flex: none; white-space: nowrap; }
.ster { color: #ddd5c4; font-size: 20px; }
.ster.aan { color: var(--geel); }

/* ---------- Spelscherm ---------- */

.spelkop { display: flex; align-items: center; gap: 12px; margin-bottom: 8px; }
.spelkop h2 { margin: 0; font-size: 22px; }
.terug {
  flex: none; display: grid; place-items: center;
  width: 44px; height: 44px; border-radius: 14px;
  background: var(--kaart); box-shadow: var(--schaduw), inset 0 0 0 2px var(--rand);
  font-size: 22px;
}

.opdracht { font-size: 20px; margin: 8px 0; text-align: center; }
.teller { text-align: center; color: var(--zacht); font-weight: 700; margin-bottom: 8px; }

/* Kennismaken */
.kaarten { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; margin: 16px 0 24px; }
.letterkaart {
  display: flex; flex-direction: column; align-items: center;
  padding: 16px; border: 0; border-radius: 22px;
  background: var(--kaart); box-shadow: var(--schaduw), inset 0 0 0 3px var(--rand);
}
.letterkaart.gehoord { box-shadow: var(--schaduw), inset 0 0 0 3px var(--groen); }
.letterkaart .groot { font-size: 110px; line-height: 1.3; color: var(--rood); }
.letterkaart:nth-child(2) .groot { color: var(--groen); }
.letterkaart .naam { font-weight: 700; font-size: 20px; }
.letterkaart .vormen { font-size: 34px; color: var(--zacht); letter-spacing: 6px; }
.spel > .knop.hoofd { display: block; margin: 0 auto; font-size: 22px; }

/* Ballonnen */
.doel {
  border: 0; border-radius: 12px; padding: 0 14px;
  background: var(--geel); color: #fff; font-size: 30px; line-height: 1.4;
  vertical-align: middle;
}
.lucht {
  position: relative; height: 62vh; min-height: 360px; overflow: hidden;
  border-radius: 22px; background: linear-gradient(#bfe3fb, #eef8ff);
  touch-action: manipulation;
}
.ballon {
  position: absolute; bottom: -100px;
  width: 76px; height: 92px; padding: 0; border: 0; background: none;
  animation: stijg linear forwards;
}
.ballon::after {
  content: ''; position: absolute; left: 50%; top: 100%;
  width: 2px; height: 26px; background: rgba(0, 0, 0, .2);
}
.ballon .bol {
  display: grid; place-items: center;
  width: 100%; height: 100%;
  border-radius: 50% 50% 46% 46%;
  background: var(--kleur);
  color: #fff; font-size: 42px; line-height: 1;
  box-shadow: inset -8px -10px 0 rgba(0, 0, 0, .1);
}
.ballon.weg .bol { animation: knal .3s forwards; }
@keyframes stijg { to { transform: translateY(calc(-62vh - 140px)); } }
@keyframes knal { to { transform: scale(1.7); opacity: 0; } }

/* Meerkeuze */
.vraag { display: flex; flex-direction: column; align-items: center; min-height: 150px; justify-content: center; }
.luister { font-size: 22px; }
.vorm { font-size: 110px; line-height: 1.3; }
.positie { margin: 0; color: var(--zacht); }
.keuzes { display: flex; justify-content: center; gap: 16px; margin-top: 16px; }
.keuze {
  width: 120px; height: 120px; border: 0; border-radius: 24px;
  background: var(--kaart); box-shadow: var(--schaduw), inset 0 0 0 3px var(--rand);
  font-size: 64px; line-height: 1;
}
.keuze.goed { background: var(--groen); color: #fff; box-shadow: var(--schaduw); }

/* Slepen */
.vakken { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin: 12px 0; }
.vak {
  min-height: 150px; padding: 8px; border-radius: 20px;
  border: 3px dashed var(--rand); background: var(--kaart);
}
.vakletter { display: block; text-align: center; font-size: 48px; line-height: 1.2; color: var(--blauw); }
.vak .inhoud { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; }
.vak .woordkaart { width: 64px; padding: 4px; font-size: 14px; }
.vak .woordkaart .beeld { font-size: 28px; }
.stapel { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.woordkaart {
  display: flex; flex-direction: column; align-items: center;
  width: 92px; padding: 8px 4px; border-radius: 16px;
  background: var(--kaart); box-shadow: var(--schaduw), inset 0 0 0 2px var(--rand);
  font-size: 20px; touch-action: none; user-select: none; cursor: grab;
}
.woordkaart .beeld { font-size: 44px; line-height: 1.1; }
.woordkaart.sleept { position: relative; z-index: 10; cursor: grabbing; box-shadow: 0 10px 20px rgba(0, 0, 0, .15); }

/* Resultaat */
.resultaat { text-align: center; padding: 40px 0; }
.grote-sterren .ster { font-size: 72px; }
.lof { font-size: 30px; font-weight: 700; margin: 8px 0 24px; }
.knoppen { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }

.schud { animation: schud .35s; }
@keyframes schud {
  25% { transform: translateX(-8px); }
  75% { transform: translateX(8px); }
}

@media (max-width: 480px) {
  .kop h1 { font-size: 52px; }
  .keuze { width: 104px; height: 104px; font-size: 56px; }
  .letterkaart .groot { font-size: 90px; }
}
