/* Supertopo — vrolijk, groot en duidelijk, ook op tablet en telefoon */
:root {
  --bg: #e8f6ff;
  --card: #ffffff;
  --ink: #1d2b3a;
  --muted: #5b6b7c;
  --blue: #1f9bd1;
  --blue-dark: #12709a;
  --green: #3fbf5f;
  --green-dark: #2b9446;
  --red: #ff5a5f;
  --yellow: #ffcb2e;
  --orange: #ff8c2e;
  --purple: #8a5cf6;
  --water: #9fd8f2;
  --sea: #b9e3f7;
  --land: #c9e7a3;
  --land-line: #6e9a4a;
  --radius: 22px;
  --shadow: 0 6px 0 rgba(20, 60, 90, 0.12), 0 10px 24px rgba(20, 60, 90, 0.1);
  --font: ui-rounded, "SF Pro Rounded", "Nunito", "Varela Round", "Segoe UI", system-ui, -apple-system, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg) radial-gradient(circle at 10% 0%, #fff7d6 0, transparent 40%) no-repeat;
  font-size: 18px;
  line-height: 1.35;
  -webkit-tap-highlight-color: transparent;
  min-height: 100vh;
}
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; }
.loading { text-align: center; margin-top: 30vh; font-size: 1.5rem; }

/* ---------- bovenbalk */
.topbar {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; gap: 10px;
  padding: 10px max(12px, env(safe-area-inset-left)) 10px max(12px, env(safe-area-inset-right));
  background: var(--blue); color: #fff;
  box-shadow: 0 3px 0 var(--blue-dark);
}
.topbar h1 { flex: 1; margin: 0; font-size: 1.3rem; text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.logo, .spacer { width: 48px; font-size: 1.8rem; text-align: center; }
.icon-btn {
  display: inline-grid; place-items: center; width: 48px; height: 48px;
  border: 0; border-radius: 16px; background: rgba(255, 255, 255, 0.22); font-size: 1.4rem;
}
.icon-btn:active { transform: scale(0.94); }

main { max-width: 980px; margin: 0 auto; padding: 16px; }
.card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px; margin-bottom: 16px; }
.card.center { text-align: center; max-width: 620px; margin: 24px auto; }
.section-title { margin: 22px 4px 10px; font-size: 1.25rem; }
.hint-text, .credit { color: var(--muted); font-size: 0.9rem; text-align: center; }

/* ---------- knoppen */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 52px; padding: 10px 20px; margin: 6px;
  border: 0; border-radius: 18px; background: #eef4f8; font-weight: 700;
  box-shadow: 0 4px 0 #cfdbe4; transition: transform 0.08s;
}
.btn:active { transform: translateY(3px); box-shadow: 0 1px 0 #cfdbe4; }
.btn.big { min-height: 64px; font-size: 1.2rem; padding: 12px 26px; }
.btn.small { min-height: 40px; padding: 6px 14px; font-size: 1rem; }
.btn.primary { background: var(--green); color: #fff; box-shadow: 0 4px 0 var(--green-dark); }
.btn.learn { background: var(--yellow); box-shadow: 0 4px 0 #d9a400; }
.btn.practice { background: var(--purple); color: #fff; box-shadow: 0 4px 0 #6337d6; }
.btn.danger { background: #ffe1e2; color: #b3262b; box-shadow: 0 4px 0 #f3b3b5; }
.row-buttons { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px; margin: 8px 0; }

/* ---------- profiel */
.hello-emoji, .intro-emoji { font-size: 4rem; animation: wiggle 2s ease-in-out infinite; }
.name-input {
  width: 100%; max-width: 360px; font: inherit; font-size: 1.5rem; text-align: center;
  padding: 14px; border: 3px solid #cfe3ef; border-radius: 18px; outline: none;
}
.name-input:focus { border-color: var(--blue); }
.avatar-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; max-width: 420px; margin: 0 auto 16px; }
.avatar { font-size: 2rem; aspect-ratio: 1; border: 3px solid transparent; border-radius: 18px; background: #f2f7fa; }
.avatar.on { border-color: var(--orange); background: #fff1e3; transform: scale(1.08); }

/* ---------- home */
.hero { display: flex; align-items: center; gap: 16px; }
.hero h2 { margin: 0 0 4px; font-size: 1.6rem; }
.hero-avatar { font-size: 3.6rem; background: #fff4d1; border-radius: 50%; width: 88px; height: 88px; display: grid; place-items: center; flex: none; }
.rank { display: inline-block; background: #eef4ff; border-radius: 999px; padding: 3px 12px; font-weight: 700; color: #3651b4; }
.total-stars { margin-top: 6px; font-weight: 700; color: #b77f00; }
.lesson-list { display: grid; gap: 14px; }
.lesson-card {
  display: flex; align-items: center; gap: 14px; padding: 16px;
  background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow);
  border-left: 10px solid var(--accent);
}
.lesson-card:active { transform: scale(0.99); }
.lesson-emoji { font-size: 2.6rem; width: 64px; height: 64px; display: grid; place-items: center; border-radius: 18px; background: color-mix(in srgb, var(--accent, #1f9bd1) 18%, white); flex: none; }
.lesson-emoji.big { font-size: 3rem; width: 80px; height: 80px; }
.lesson-text { flex: 1; }
.lesson-sub { color: var(--muted); font-size: 0.9rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; }
.lesson-title { font-size: 1.35rem; font-weight: 800; }
.lesson-meta { color: var(--muted); }
.chev { font-size: 1.4rem; color: var(--accent); }
.lesson-head { display: flex; gap: 16px; align-items: center; }
.lesson-head h2 { margin: 2px 0; }

/* ---------- missie-pad */
.mission-path { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; position: relative; }
.mission-card {
  display: flex; align-items: center; gap: 14px; padding: 14px 16px;
  background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow);
}
.mission:nth-child(even) .mission-card { margin-left: 28px; }
.mission:nth-child(odd) .mission-card { margin-right: 28px; }
.mission-num { font-size: 2.2rem; width: 64px; height: 64px; display: grid; place-items: center; border-radius: 50%; background: #e3f4ff; flex: none; }
.mission.played .mission-num { background: #fff1c2; }
.mission.locked .mission-card { opacity: 0.7; background: #f1f4f6; }
.mission-text { flex: 1; }
.mission-title { font-weight: 800; font-size: 1.2rem; }
.mission-game, .mission-best { color: var(--muted); font-size: 0.95rem; }
.mission-lock { color: #8a5a00; font-size: 0.95rem; font-weight: 700; }
.stars { white-space: nowrap; font-size: 1.6rem; letter-spacing: 1px; }
.star { color: #d6dde3; }
.star.on { color: var(--yellow); text-shadow: 0 2px 0 #d9a400; }
.stars.big { font-size: 3.4rem; }
.stars.big .star.on { animation: pop 0.5s ease-out both; }
.stars.big .star:nth-child(2) { animation-delay: 0.25s; }
.stars.big .star:nth-child(3) { animation-delay: 0.5s; }

/* ---------- kaart */
.map-wrap { position: relative; background: var(--sea); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; touch-action: manipulation; }
svg.map { display: block; width: 100%; height: auto; max-height: calc(100vh - 230px); max-height: calc(100dvh - 230px); user-select: none; -webkit-user-select: none; }
.sea { fill: var(--sea); }
.neighbor { fill: #f3efe6; stroke: #f3efe6; stroke-width: 3; }
.neighbor-label { font-size: 22px; font-weight: 800; fill: #b9b2a3; text-anchor: middle; letter-spacing: 3px; }
.land { fill: var(--land); stroke: var(--land-line); stroke-width: 1.2; stroke-linejoin: round; }
.province-border { fill: none; stroke: #9fbf84; stroke-width: 0.9; stroke-dasharray: 3 3; }
.lake { fill: var(--water); stroke: var(--land-line); stroke-width: 1; }
.river { fill: none; stroke: #2f86c9; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
.canal { fill: none; stroke: #2f86c9; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.dike { fill: none; stroke: #7b5b3a; stroke-width: 4; stroke-linecap: round; }
.region-outline { fill: rgba(255, 255, 255, 0.12); stroke: #2d6a2d; stroke-width: 1.6; stroke-dasharray: 2 4; stroke-linecap: round; }

.hl { pointer-events: none; opacity: 0; transition: opacity 0.2s; }
.hl-line { fill: none; stroke-width: 9; stroke-linecap: round; stroke-linejoin: round; }
.hl-area { stroke-width: 3; }
.hl.focus, .hl.hint, .hl.ok, .hl.bad { opacity: 1; }
.hl-line.focus { stroke: var(--orange); }
.hl-area.focus { fill: rgba(255, 140, 46, 0.45); stroke: var(--orange); }
.hl-line.ok { stroke: var(--green); }
.hl-area.ok { fill: rgba(63, 191, 95, 0.45); stroke: var(--green-dark); }
.hl-line.bad { stroke: var(--red); }
.hl-area.bad { fill: rgba(255, 90, 95, 0.4); stroke: var(--red); }
.hl-line.hint { stroke: var(--yellow); animation: blink 0.8s ease-in-out infinite; }
.hl-area.hint { fill: rgba(255, 203, 46, 0.55); stroke: #d9a400; animation: blink 0.8s ease-in-out infinite; }
.hl.done { opacity: 0.55; }
.hl-line.done { stroke: var(--green); stroke-width: 5; }
.hl-area.done { fill: rgba(63, 191, 95, 0.25); stroke: none; }
.hl-spot.focus, .hl-spot.hint { animation: pulse 1.1s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }

.hit { cursor: pointer; }
.hit-line { fill: none; stroke: transparent; stroke-width: 26; stroke-linecap: round; pointer-events: stroke; }
.hit-area { fill: transparent; pointer-events: fill; }

.marker { cursor: pointer; outline: none; }
.marker-hit { fill: transparent; }
.marker-dot { fill: #fff; stroke: var(--blue-dark); stroke-width: 3; transition: r 0.15s; }
.marker.group-eilanden .marker-dot { stroke: #c2410c; }
.marker.group-streken .marker-dot { stroke: #2b7a2b; }
.marker-letter, .big-letter, .learn-letter, .tile b { font-family: Georgia, "Times New Roman", serif; font-style: italic; }
.marker-letter { font-size: 18px; font-weight: 800; text-anchor: middle; dominant-baseline: middle; fill: var(--ink); pointer-events: none; }
.marker:hover .marker-dot, .marker:focus-visible .marker-dot, .marker.over .marker-dot { r: 19; fill: #fff6d6; }
.marker.focus .marker-dot { r: 20; fill: var(--orange); stroke: #fff; }
.marker.focus .marker-letter { fill: #fff; }
.marker.ok .marker-dot { fill: var(--green); stroke: #fff; }
.marker.ok .marker-letter { fill: #fff; }
.marker.bad .marker-dot { fill: var(--red); stroke: #fff; }
.marker.hint .marker-dot { fill: var(--yellow); animation: grow 0.8s ease-in-out infinite; }
.marker.done .marker-dot { fill: #d9f5df; stroke: var(--green-dark); }
.marker.hidden { display: none; }

.label { pointer-events: none; opacity: 0; transition: opacity 0.2s; }
.label.show { opacity: 1; }
.label text {
  font-size: 19px; font-weight: 800; text-anchor: middle; fill: var(--ink);
  paint-order: stroke; stroke: #fff; stroke-width: 6px; stroke-linejoin: round;
}
.boat { font-size: 40px; transition: x 0.8s ease-in-out, y 0.8s ease-in-out; pointer-events: none; }

/* in spellen met antwoordknoppen moet de kaart kleiner, zodat alles in beeld past */
.game-boss svg.map, .game-island-hop svg.map { max-height: calc(100vh - 400px); max-height: calc(100dvh - 400px); min-height: 280px; }
.game-drag-label svg.map { max-height: calc(100vh - 330px); max-height: calc(100dvh - 330px); min-height: 300px; }
.game-balloons svg.map { max-height: calc(100vh - 480px); max-height: calc(100dvh - 480px); min-height: 260px; }
.game-time-race svg.map { max-height: calc(100vh - 290px); max-height: calc(100dvh - 290px); }

/* ---------- spel-HUD */
.game { padding-top: 10px; }
.hud { display: flex; align-items: center; gap: 12px; margin-bottom: 8px; }
.hud-note { font-weight: 800; white-space: nowrap; }
.hearts { font-size: 1.7rem; white-space: nowrap; }
.heart.on { display: inline-block; animation: pop 0.3s ease-out; }
.progress { flex: 1; height: 16px; background: #d8e9f3; border-radius: 999px; overflow: hidden; }
.progress-fill { height: 100%; width: 0; background: linear-gradient(90deg, var(--green), #8be08f); border-radius: 999px; transition: width 0.4s; }
.prompt {
  display: flex; align-items: center; gap: 10px; margin-bottom: 10px;
  background: var(--card); border-radius: 18px; box-shadow: var(--shadow); padding: 10px 14px;
}
.prompt.pop { animation: pop 0.35s ease-out; }
.prompt-text { flex: 1; font-size: 1.25rem; }
.prompt-target { font-size: 1.5rem; color: var(--blue-dark); margin-left: 6px; }
.speak { background: #e3f4ff; }

.answers { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin-top: 12px; }
.answer {
  min-height: 60px; border: 0; border-radius: 18px; background: #fff; font-weight: 800; font-size: 1.15rem;
  box-shadow: 0 4px 0 #cfdbe4; padding: 8px;
}
.answer:active { transform: translateY(3px); box-shadow: 0 1px 0 #cfdbe4; }
.answer.ok { background: var(--green); color: #fff; box-shadow: 0 4px 0 var(--green-dark); }
.answer.bad { background: #ffd5d6; color: #a32025; }

/* tijdrace */
.timer { position: relative; flex: 1; height: 30px; background: #d8e9f3; border-radius: 999px; overflow: hidden; }
.timer-fill { height: 100%; width: 100%; background: linear-gradient(90deg, #4cc3ff, var(--blue)); transition: width 0.1s linear; }
.timer-fill.low { background: linear-gradient(90deg, var(--orange), var(--red)); }
.timer-text { position: absolute; inset: 0; display: grid; place-items: center; font-weight: 800; }
.score-box { font-size: 1.5rem; font-weight: 800; white-space: nowrap; }
.combo { color: var(--orange); }
.race-track { position: relative; height: 44px; margin-bottom: 8px; background: repeating-linear-gradient(90deg, #bfe6fb 0 18px, #aedcf5 18px 36px); border-radius: 999px; }
.race-boat { position: absolute; left: 0; top: 2px; font-size: 32px; transform: scaleX(-1); transition: left 0.4s ease-out; }
.race-flag { position: absolute; right: 8px; top: 4px; font-size: 28px; }
.countdown {
  position: fixed; inset: 0; display: grid; place-items: center; z-index: 30;
  font-size: 7rem; font-weight: 900; color: #fff; text-shadow: 0 6px 0 var(--blue-dark); background: rgba(31, 155, 209, 0.35);
}
.countdown.pop { animation: pop 0.5s ease-out; }

/* eilandhoppen */
.tvtas { display: flex; justify-content: center; gap: 6px; margin-bottom: 10px; flex-wrap: wrap; }
.tile { min-width: 54px; padding: 6px 10px; border-radius: 14px; background: #fff; box-shadow: 0 3px 0 #cfdbe4; text-align: center; font-size: 1.05rem; }
.tile b { font-size: 1.5rem; color: var(--orange); }
.tile.next { outline: 4px solid var(--yellow); animation: grow 1s ease-in-out infinite; }
.tile.done { background: #e2f8e6; }
.tile.done b { color: var(--green-dark); }

/* slepen */
.tray { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-top: 12px; min-height: 64px; }
.chip {
  min-height: 56px; padding: 8px 18px; border: 0; border-radius: 16px; font-weight: 800; font-size: 1.15rem;
  background: #fffbe8; box-shadow: 0 4px 0 #e2cf83; touch-action: none; user-select: none; -webkit-user-select: none;
}
.chip.selected { outline: 4px solid var(--orange); }
.chip.dragging { opacity: 0.35; }
.chip.ghost { position: fixed; z-index: 40; transform: translate(-50%, -50%) rotate(-3deg) scale(1.1); pointer-events: none; box-shadow: 0 10px 20px rgba(0, 0, 0, 0.25); }

/* eindbaas */
.boss-bar { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; background: linear-gradient(135deg, #3b1c6e, #6a3fb5); color: #fff; border-radius: var(--radius); padding: 10px 14px; box-shadow: var(--shadow); }
.dragon { font-size: 3.6rem; transform: scaleX(-1); transition: transform 0.2s, filter 0.2s; }
.dragon.hit { filter: brightness(2) saturate(0.2); }
.dragon.defeated { transform: scaleX(-1) rotate(180deg); opacity: 0.4; }
.boss-info { flex: 1; }
.hp { height: 20px; background: rgba(255, 255, 255, 0.25); border-radius: 999px; overflow: hidden; margin-bottom: 6px; }
.hp-fill { height: 100%; width: 100%; background: linear-gradient(90deg, #ff5a5f, #ff9f43); transition: width 0.5s; }
.bubble { font-weight: 700; font-size: 1rem; }
.boss-question { text-align: center; font-size: 1.5rem; font-weight: 800; margin-bottom: 8px; }
.big-letter {
  display: inline-grid; place-items: center; min-width: 52px; height: 52px; padding: 0 8px; border-radius: 50%;
  background: var(--orange); color: #fff; font-size: 1.8rem; font-weight: 900; vertical-align: middle;
}

/* leren */
.learn-info { background: var(--card); border-radius: 18px; box-shadow: var(--shadow); padding: 12px 16px; margin-bottom: 10px; font-size: 1.2rem; min-height: 76px; }
.learn-info strong { font-size: 1.5rem; }
.tip { margin-top: 6px; font-size: 1rem; color: #6b4f00; background: #fff6d6; border-radius: 12px; padding: 6px 10px; }
.toggles { display: flex; gap: 8px; margin-bottom: 10px; flex-wrap: wrap; }
.toggle { min-height: 48px; padding: 8px 16px; border: 3px solid #cfe3ef; border-radius: 999px; background: #fff; font-weight: 800; }
.toggle.on { background: var(--blue); border-color: var(--blue); color: #fff; }
.toggle.big { display: flex; justify-content: space-between; width: 100%; min-height: 60px; margin-bottom: 10px; font-size: 1.15rem; }
.learn-lists { margin-top: 16px; }
.learn-lists h3 { margin-top: 0; }
.learn-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 8px; }
.learn-item { display: flex; align-items: center; gap: 10px; min-height: 52px; padding: 6px 10px; border: 0; border-radius: 14px; background: #f3f8fb; font-weight: 700; text-align: left; }
.learn-letter { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: #fff; border: 3px solid var(--blue-dark); font-weight: 900; flex: none; }
.learn-letter.group-eilanden { border-color: #c2410c; }
.learn-letter.group-streken { border-color: #2b7a2b; }
.tip-card { background: #fff6d6; font-weight: 700; }

/* intro + resultaat */
.intro-text, .result-text { font-size: 1.25rem; }
.intro-items { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin: 12px 0 18px; }
.pill { background: #e3f4ff; border-radius: 999px; padding: 4px 12px; font-weight: 700; font-size: 0.95rem; }
.pill.group-eilanden { background: #ffe9dc; }
.pill.group-streken { background: #e2f8e6; }
.result-title { font-size: 2.2rem; margin: 6px 0; }
.badge-new { display: inline-block; margin: 6px; padding: 8px 16px; border-radius: 999px; background: #fff1c2; font-weight: 800; animation: pop 0.5s ease-out; }
.badge-new.unlock { background: #e9e0ff; }
.settings { max-width: 520px; margin: 24px auto; display: flex; flex-direction: column; }

/* melding */
.toast {
  position: fixed; left: 50%; bottom: max(24px, env(safe-area-inset-bottom)); z-index: 50;
  transform: translate(-50%, 140%); transition: transform 0.25s ease-out;
  max-width: min(92vw, 560px); padding: 14px 22px; border-radius: 18px;
  background: var(--ink); color: #fff; font-weight: 800; font-size: 1.15rem; text-align: center; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
}
.toast.show { transform: translate(-50%, 0); }
.toast.good { background: var(--green-dark); }
.toast.bad { background: #c2410c; }
.confetti { position: fixed; inset: 0; width: 100vw; height: 100vh; pointer-events: none; z-index: 60; }

/* animaties */
@keyframes pop { 0% { transform: scale(0.6); opacity: 0; } 70% { transform: scale(1.12); opacity: 1; } 100% { transform: scale(1); } }
@keyframes blink { 50% { opacity: 0.35; } }
@keyframes grow { 50% { transform: scale(1.12); } }
@keyframes pulse { 0%, 100% { transform: scale(0.85); opacity: 0.6; } 50% { transform: scale(1.1); opacity: 1; } }
@keyframes wiggle { 0%, 100% { transform: rotate(-6deg); } 50% { transform: rotate(6deg); } }
@keyframes shake { 20%, 60% { transform: translateX(-8px); } 40%, 80% { transform: translateX(8px); } }
.shake { animation: shake 0.4s; }
.marker.hint .marker-dot, .tile.next { transform-box: fill-box; transform-origin: center; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

/* kleine schermen */
@media (max-width: 600px) {
  body { font-size: 17px; }
  main { padding: 10px; }
  .mission:nth-child(even) .mission-card, .mission:nth-child(odd) .mission-card { margin: 0; }
  .answers { grid-template-columns: 1fr 1fr; }
  .prompt-text { font-size: 1.1rem; }
  .prompt-target { font-size: 1.3rem; }
  .avatar-grid { grid-template-columns: repeat(4, 1fr); }
  /* kaart wordt klein: markeringen en namen groter maken zodat ze goed aan te tikken zijn */
  .marker-body { transform: scale(1.7); }
  .label text { font-size: 30px; stroke-width: 8px; }
  .boat { font-size: 56px; }
}
/* tablet liggend: kaart naast de knoppen */
@media (min-width: 900px) and (orientation: landscape) {
  .game-balloons { display: grid; grid-template-columns: 1.3fr 1fr; gap: 0 16px; align-items: start; }
  .game-balloons > .hud, .game-balloons > .prompt, .game-balloons > .tour-banner { grid-column: 1 / -1; }
  .game-balloons .map-wrap { grid-column: 1; }
  .game-balloons .sky { grid-column: 2; height: calc(100vh - 220px); margin-top: 0; }
  .game-balloons svg.map { max-height: calc(100vh - 220px); }
  .game-boss, .game-island-hop { display: grid; grid-template-columns: 1.4fr 1fr; gap: 0 16px; align-items: start; }
  .game-boss .map-wrap, .game-island-hop .map-wrap { grid-column: 1; grid-row: 2 / span 3; }
  .game-boss > :not(.map-wrap), .game-island-hop > :not(.map-wrap) { grid-column: 2; }
  .game-boss .answers, .game-island-hop .answers { grid-template-columns: 1fr; }
  svg.map { max-height: calc(100vh - 120px); }
}

/* ---------- samen doornemen */
.tour-banner {
  display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 8px;
  padding: 8px 14px; border-radius: 16px; background: #fff1c2; font-weight: 800;
}
.tour-banner { position: relative; flex-wrap: wrap; overflow: hidden; }
.tour-banner .btn { margin: 0; }
.auto-toggle { display: inline-flex; align-items: center; gap: 6px; font-weight: 800; cursor: pointer; padding: 6px 10px; border-radius: 12px; background: rgba(255, 255, 255, 0.7); }
.auto-toggle input { width: 24px; height: 24px; accent-color: var(--blue); }
.tour-countdown { position: absolute; left: 0; bottom: 0; height: 5px; width: 0; background: var(--orange); }
.tour-countdown.run { animation: count 5s linear forwards; }
@keyframes count { from { width: 0; } to { width: 100%; } }

/* ---------- spelers */
.player-list { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin: 10px 0; }
.player-btn {
  display: inline-flex; align-items: center; gap: 10px; min-height: 64px; padding: 8px 20px;
  border: 0; border-radius: 20px; background: #e3f4ff; font-size: 1.3rem; font-weight: 800; box-shadow: 0 4px 0 #b9dcf0;
}
.player-btn:active { transform: translateY(3px); box-shadow: 0 1px 0 #b9dcf0; }
.player-avatar { font-size: 2rem; }
.or { color: var(--muted); font-weight: 700; }
.hero { position: relative; flex-wrap: wrap; }
.switch { margin-left: auto; }

/* ---------- ballonnen */
.sky {
  position: relative; height: 240px; margin-top: 10px; overflow: hidden; border-radius: var(--radius);
  background: linear-gradient(#bfe9ff, #eaf8ff); box-shadow: var(--shadow);
}
.sky::after { content: '☁️'; position: absolute; left: 8%; top: 12px; font-size: 40px; opacity: 0.8; }
.balloon {
  position: absolute; bottom: -140px; width: clamp(104px, 24%, 170px); height: 124px; padding: 0;
  border: 0; background: none; animation: rise linear forwards; touch-action: manipulation;
}
.balloon::before {
  content: ''; position: absolute; inset: 0 0 18px 0; border-radius: 50% 50% 46% 46%;
  background: radial-gradient(circle at 30% 25%, rgba(255, 255, 255, 0.7), transparent 30%), var(--c);
  box-shadow: inset -8px -10px 0 rgba(0, 0, 0, 0.12);
}
.balloon::after { content: ''; position: absolute; left: 50%; bottom: 0; width: 2px; height: 22px; background: #7a8a99; }
.balloon-text { position: relative; display: grid; place-items: center; height: 100px; padding: 0 6px; font-weight: 900; font-size: clamp(0.8rem, 2.2vw, 1rem); color: #fff; text-shadow: 0 2px 2px rgba(0, 0, 0, 0.45); line-height: 1.1; hyphens: auto; -webkit-hyphens: auto; overflow-wrap: anywhere; }
.balloon.popped { animation-play-state: paused; }
.balloon::before, .balloon-text { transition: transform 0.35s ease-out, opacity 0.35s ease-out; }
.balloon.popped.good::before { transform: scale(1.7); opacity: 0; }
.balloon.popped.good .balloon-text { transform: scale(1.3); opacity: 0; }
.balloon.popped.good::after { opacity: 0; }
.balloon.popped.bad { filter: grayscale(1); opacity: 0.35; }
.balloon.popped.bad::before { transform: scale(0.8) rotate(12deg); }
.balloon.away { animation-play-state: paused; opacity: 0.25; transition: opacity 0.3s; }
@keyframes rise { from { bottom: -140px; } to { bottom: 105%; } }

/* ---------- eindbaas (extra) */
.game-boss .boss-bar { position: sticky; top: 70px; z-index: 5; }
.dragon { font-size: 4.6rem; line-height: 1; }
.dragon.angry { filter: hue-rotate(-90deg) saturate(2); animation: wiggle 0.6s ease-in-out infinite; }
.boss-info { position: relative; }
.hp { position: relative; height: 26px; }
.hp-text { position: absolute; inset: 0; display: grid; place-items: center; font-weight: 900; font-size: 0.9rem; text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5); }
.boss-bar { position: relative; overflow: visible; }
.damage { position: absolute; left: 30px; top: 0; font-size: 1.8rem; font-weight: 900; color: #ffe066; text-shadow: 0 2px 0 #b3262b; animation: floatup 0.9s ease-out forwards; pointer-events: none; }
@keyframes floatup { to { transform: translateY(-50px); opacity: 0; } }
.fire { position: absolute; left: 70px; top: 50%; font-size: 2.6rem; opacity: 0; pointer-events: none; transform: translateY(-50%); }
.fire.blow { animation: blow 1.1s ease-out; }
@keyframes blow { 0% { opacity: 1; transform: translate(0, -50%) scale(0.5); } 60% { opacity: 1; transform: translate(40vw, -20%) scale(1.6); } 100% { opacity: 0; transform: translate(60vw, 0) scale(2); } }
.answers-note { grid-column: 1 / -1; text-align: center; font-weight: 800; color: var(--muted); padding: 12px; }
.answer.yes { background: #e2f8e6; }
.answer.no { background: #ffe9e9; }
.boss-intro { position: relative; font-size: 7rem; line-height: 1; margin: 6px 0 16px; animation: wiggle 1.6s ease-in-out infinite; }
.fire-small { position: absolute; font-size: 2.6rem; right: -46px; top: 30px; animation: blink 0.6s infinite; }
@media (max-width: 600px) {
  .dragon { font-size: 3.4rem; }
  .sky { height: 210px; }
  .game-boss .boss-bar { top: 64px; }
}

/* ---------- stemkeuze */
.voice-box { background: #f5f9fc; border-radius: 18px; padding: 12px; margin: 4px 0 12px; }
.voice-box h3 { margin: 4px 0 10px; }
.voice-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; margin-bottom: 10px; }
.voice { min-height: 52px; border: 3px solid #d6e6f0; border-radius: 14px; background: #fff; font-weight: 800; display: flex; align-items: center; justify-content: center; gap: 6px; }
.voice.on { border-color: var(--blue); background: #e3f4ff; }
.voice-lang { font-size: 1.1rem; }
.slider { display: grid; grid-template-columns: 110px 1fr 44px; align-items: center; gap: 10px; font-weight: 700; margin: 8px 0; }
.slider input { width: 100%; accent-color: var(--blue); height: 28px; }
.slider-val { text-align: right; color: var(--muted); }

/* ---------- vraagtimer */
.qtimer { position: relative; height: 26px; margin-bottom: 8px; background: #d8e9f3; border-radius: 999px; overflow: hidden; }
.qtimer.hidden { display: none; }
.qtimer-fill { height: 100%; width: 100%; background: linear-gradient(90deg, #7fd36f, var(--green)); transition: width 0.1s linear; }
.qtimer-fill.low { background: linear-gradient(90deg, var(--orange), var(--red)); }
.qtimer-text { position: absolute; inset: 0; display: grid; place-items: center; font-weight: 900; font-size: 0.95rem; }

/* ---------- niveaukeuze */
.level-pick { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 10px 0 16px; }
.level-btn { min-height: 76px; border: 3px solid #d6e6f0; border-radius: 18px; background: #fff; font-weight: 800; font-size: 1.05rem; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; }
.level-btn .lv-emoji { font-size: 1.8rem; }
.level-btn .lv-stars { font-size: 0.85rem; color: #b77f00; }
.level-btn.on { border-color: var(--orange); background: #fff1e3; transform: scale(1.04); }
.level-desc { color: var(--muted); font-size: 1rem; min-height: 1.4em; }
.mission-levels { font-size: 0.9rem; color: var(--muted); }

.sky.many .balloon { width: clamp(84px, 19%, 150px); }

/* ---------- eindoverzicht */
.level-badge { display: inline-block; margin: 4px; padding: 4px 12px; border-radius: 999px; background: #eef4ff; font-weight: 800; }
.report, .practice-list { text-align: left; margin: 16px 0; }
.report h3, .practice-list h3 { text-align: center; }
.report-groups { display: grid; gap: 8px; margin-bottom: 12px; }
.report-group { display: grid; grid-template-columns: 130px 1fr auto; gap: 10px; align-items: center; font-weight: 700; }
.rg-bar { height: 16px; background: #e6eef3; border-radius: 999px; overflow: hidden; }
.rg-fill { height: 100%; background: linear-gradient(90deg, var(--green), #8be08f); }
.rg-num { color: var(--muted); font-size: 0.9rem; }
.report-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.report-col { background: #f5f9fc; border-radius: 16px; padding: 10px; }
.report-col.good { background: #ecfaef; }
.report-col.bad { background: #fff4e8; }
.report-col h4 { margin: 4px 0 8px; }
.report-col .intro-items { justify-content: flex-start; margin: 0; }
.pill.bad-pill { background: #ffe1c7; }
@media (max-width: 600px) { .report-cols { grid-template-columns: 1fr; } .report-group { grid-template-columns: 1fr; gap: 2px; } }
