/* Basisstijl van de OJW-tools. Kleuren per tool via de variabelen in body. */
:root {
  --bg1: #e0f2fe; --bg2: #f0f9ff;
  --ink: #0f172a; --muted: #475569;
  --a: #0284c7; --a2: #0369a1; --a-licht: #e0f2fe;
  --card: #ffffff; --line: #cbd5e1;
  --good: #16a34a; --good-licht: #dcfce7;
  --bad: #dc2626; --bad-licht: #fee2e2;
  --gold: #f59e0b;
  --radius: 18px;
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
html { background: var(--bg2) linear-gradient(180deg, var(--bg1), var(--bg2) 360px) no-repeat; min-height: 100%; }
body {
  color: var(--ink);
  font-family: "Nunito", "Segoe UI Rounded", "SF Pro Rounded", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 18px; line-height: 1.4;
  -webkit-tap-highlight-color: transparent;
  overflow-x: hidden;
}
button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; }
button:disabled { cursor: default; }
.hidden { display: none !important; }

.top {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 10px 18px; background: var(--a); color: #fff;
  position: sticky; top: 0; z-index: 20; height: 58px; box-shadow: 0 2px 10px rgba(0,0,0,.12);
}
.logo { font-weight: 900; font-size: 23px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.top-actions { display: flex; gap: 8px; }
.top-btn { background: rgba(255,255,255,.18); border: 1px solid rgba(255,255,255,.35); border-radius: 12px; padding: 7px 12px; font-size: 16px; font-weight: 800; color: #fff; white-space: nowrap; }
.top-btn:hover { background: rgba(255,255,255,.3); }

main { max-width: 1000px; margin: 0 auto; padding: 16px; }

/* ---------- menu ---------- */
.intro { text-align: center; margin: 6px 0 18px; }
.intro h1 { margin: 0 0 6px; font-size: 32px; line-height: 1.15; }
.intro p { margin: 0 auto; color: var(--muted); max-width: 640px; }
.meta { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; margin-top: 10px; }
.pill { background: var(--card); border: 1px solid var(--line); border-radius: 99px; padding: 3px 12px; font-size: 15px; font-weight: 800; color: var(--a2); }
.levels { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; }
.lv {
  position: relative; display: flex; align-items: center; gap: 12px; text-align: left;
  background: var(--card); border: 2px solid var(--line); border-radius: var(--radius); padding: 12px 14px;
  transition: transform .12s, border-color .12s, box-shadow .12s;
}
.lv:not(.dicht):hover { transform: translateY(-2px); border-color: var(--a); box-shadow: 0 6px 16px rgba(0,0,0,.08); }
.lv.gehaald { border-color: color-mix(in srgb, var(--a) 45%, var(--line)); }
.lv.dicht { opacity: .55; }
.lv-num { flex: 0 0 46px; height: 46px; border-radius: 14px; background: var(--a); color: #fff; font-weight: 900; font-size: 22px; display: grid; place-items: center; }
.lv.dicht .lv-num { background: #94a3b8; font-size: 18px; }
.lv-txt { flex: 1; min-width: 0; }
.lv-txt b { display: block; font-size: 18px; line-height: 1.2; }
.lv-txt small { display: block; color: var(--muted); font-size: 14px; line-height: 1.25; margin-top: 2px; }
.lv-st { color: var(--gold); font-size: 20px; letter-spacing: 1px; white-space: nowrap; }
.lv-tijd { position: absolute; top: -9px; right: 10px; font-size: 16px; background: var(--card); border-radius: 99px; padding: 0 4px; }
.menu-actions { text-align: center; margin: 20px 0 8px; }
.howto { margin-top: 20px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 18px; }
.howto h2 { margin: 0 0 10px; font-size: 20px; }
.howto-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; }
.howto-grid b { display: block; }
.howto-grid span { color: var(--muted); font-size: 15px; }
.note { color: var(--muted); font-size: 14px; margin: 10px 0 0; }

/* ---------- knoppen ---------- */
.big-btn {
  background: var(--a); color: #fff; border-radius: 16px; padding: 13px 26px; font-weight: 900; font-size: 20px;
  box-shadow: 0 4px 0 var(--a2); transition: transform .08s, box-shadow .08s;
}
.big-btn:hover { filter: brightness(1.06); }
.big-btn:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--a2); }
.big-btn.ghost { background: var(--card); color: var(--a2); border: 2px solid var(--a); box-shadow: 0 4px 0 var(--line); }
.big-btn:disabled { opacity: .55; filter: grayscale(.5); }
.link-btn { color: var(--a2); text-decoration: underline; font-weight: 700; margin-top: 12px; }
.start-row { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-top: 18px; }

.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; box-shadow: 0 4px 18px rgba(15,23,42,.05); }

/* ---------- uitleg vooraf ---------- */
.intro-card { max-width: 860px; margin: 0 auto; }
.lv-kop { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 8px; }
.lv-kop h1 { margin: 0; font-size: 28px; }
.lv-badge { background: var(--a); color: #fff; border-radius: 99px; padding: 3px 12px; font-weight: 900; font-size: 15px; }
.ontdek p { margin: 8px 0; }
.ontdek .tip { background: var(--a-licht); border-left: 5px solid var(--a); border-radius: 10px; padding: 10px 14px; margin: 12px 0; }
.ontdek .let-op { background: #fef3c7; border-left: 5px solid var(--gold); border-radius: 10px; padding: 10px 14px; margin: 12px 0; }
.regels { display: flex; gap: 8px 18px; flex-wrap: wrap; justify-content: center; margin-top: 14px; color: var(--muted); font-weight: 700; font-size: 16px; }

/* ---------- spel ---------- */
.spel { position: relative; max-width: 900px; margin: 0 auto; }
.hud { display: flex; align-items: center; gap: 12px; background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 8px 14px; }
.hud-lv { flex: 1; min-width: 0; }
.hud-lv small { display: block; color: var(--muted); font-size: 13px; font-weight: 800; }
.hud-lv b { display: block; font-size: 17px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hud-nr { font-weight: 900; color: var(--a2); white-space: nowrap; }
.hud-hart { font-size: 18px; white-space: nowrap; }
.hud-punt { font-weight: 900; white-space: nowrap; min-width: 92px; text-align: right; }
.progress { height: 10px; background: rgba(15,23,42,.08); border-radius: 99px; margin: 8px 2px 0; overflow: hidden; }
.progress-fill { height: 100%; width: 0; background: var(--good); border-radius: 99px; transition: width .4s; }
.tijd { height: 8px; background: rgba(15,23,42,.08); border-radius: 99px; margin: 6px 2px 0; overflow: hidden; }
.tijd-fill { height: 100%; width: 100%; background: var(--a); border-radius: 99px; }
.tijd-fill.bijna { background: var(--bad); }
.vraag { text-align: center; font-size: 23px; font-weight: 900; margin: 14px 8px 10px; line-height: 1.25; min-height: 1.25em; }
.vraag small { display: block; font-size: 16px; font-weight: 700; color: var(--muted); margin-top: 4px; }
.stage { position: relative; }

.opties { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 10px; margin-top: 12px; }
.optie {
  background: var(--card); border: 2px solid var(--line); border-radius: 14px; padding: 12px 14px;
  font-weight: 800; font-size: 18px; text-align: center; box-shadow: 0 3px 0 var(--line);
  transition: border-color .1s, background .1s, transform .08s;
}
.optie:hover:not(:disabled) { border-color: var(--a); }
.optie:active:not(:disabled) { transform: translateY(2px); box-shadow: 0 1px 0 var(--line); }
.optie.goed { background: var(--good-licht); border-color: var(--good); }
.optie.fout { background: var(--bad-licht); border-color: var(--bad); }
.optie small { display: block; font-weight: 600; color: var(--muted); font-size: 14px; }

.feedback {
  position: fixed; left: 50%; bottom: 16px; transform: translateX(-50%); z-index: 30;
  width: min(680px, calc(100% - 24px)); border-radius: 18px; padding: 14px 18px;
  box-shadow: 0 10px 30px rgba(15,23,42,.25); animation: omhoog .22s ease-out;
  display: grid; grid-template-columns: 1fr auto; gap: 4px 14px; align-items: center;
}
@keyframes omhoog { from { transform: translate(-50%, 30px); opacity: 0; } }
.feedback.goed { background: var(--good-licht); border: 2px solid var(--good); }
.feedback.fout { background: #fff; border: 3px solid var(--bad); }
.fb-kop { font-weight: 900; font-size: 20px; grid-column: 1; }
.feedback.goed .fb-kop { color: #15803d; }
.feedback.fout .fb-kop { color: var(--bad); }
.fb-tekst { grid-column: 1; font-size: 17px; }
.verder { grid-column: 2; grid-row: 1 / span 3; background: var(--a); color: #fff; border-radius: 12px; padding: 10px 16px; font-weight: 900; white-space: nowrap; }
.feedback.goed .verder { background: var(--good); }

/* ---------- einde ---------- */
.einde { max-width: 560px; margin: 20px auto; text-align: center; }
.einde h1 { margin: 6px 0; }
.einde-emoji { font-size: 64px; }
.sterren-groot { color: var(--gold); font-size: 52px; letter-spacing: 6px; line-height: 1; margin: 6px 0; }

/* ---------- diploma ---------- */
.dip-bar { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-bottom: 16px; }
.naam-in { font: inherit; font-size: 20px; padding: 10px 14px; border: 2px solid var(--line); border-radius: 12px; min-width: 260px; }
.diploma {
  max-width: 720px; margin: 0 auto; background: #fff; border: 10px double var(--a); border-radius: 12px;
  padding: 28px 34px; text-align: center;
}
.dip-emoji { font-size: 56px; }
.dip-titel { font-size: 46px; font-weight: 900; color: var(--a2); letter-spacing: 2px; }
.dip-sub { font-size: 22px; font-weight: 800; margin-bottom: 16px; }
.dip-naam { font-size: 34px; font-weight: 900; border-bottom: 2px dashed var(--line); margin: 6px auto 12px; max-width: 460px; min-height: 48px; }
.dip-lijst { list-style: none; padding: 0; margin: 10px auto; max-width: 460px; text-align: left; }
.dip-lijst li { display: flex; justify-content: space-between; gap: 10px; border-bottom: 1px solid #e2e8f0; padding: 4px 0; }
.dip-lijst b { color: var(--gold); }
.dip-voet { display: flex; justify-content: space-between; margin-top: 16px; font-weight: 700; color: var(--muted); }
.dip-site { margin-top: 10px; font-size: 13px; color: var(--muted); }
@media print {
  .top, .no-print { display: none !important; }
  body { background: #fff; }
  main { padding: 0; }
  .diploma { border-color: #333; }
}

@media (max-width: 640px) {
  body { font-size: 17px; }
  .top { padding: 8px 12px; height: 52px; }
  .logo { font-size: 19px; }
  .bt { display: none; }
  main { padding: 10px; }
  .intro h1 { font-size: 26px; }
  .hud { flex-wrap: wrap; gap: 4px 10px; padding: 6px 10px; }
  .hud-lv { flex-basis: 100%; }
  .hud-lv b { font-size: 15px; }
  .hud-punt { min-width: 0; margin-left: auto; }
  .vraag { font-size: 20px; }
  .opties { grid-template-columns: 1fr 1fr; }
  .optie { font-size: 16px; padding: 10px 8px; }
  .feedback { grid-template-columns: 1fr; bottom: 8px; }
  .verder { grid-column: 1; grid-row: auto; justify-self: end; }
  .dip-titel { font-size: 34px; }
  .diploma { padding: 18px 14px; }
}
/* ---------- Aarde en zon ---------- */
:root { --bg1: #d7e3fb; --bg2: #f1f5ff; --a: #1d4ed8; --a2: #1e3a8a; --a-licht: #dbeafe; --line: #c7d4f0; }
.tekening { display: flex; justify-content: center; }
.tekening svg { width: 100%; max-width: 560px; height: auto; display: block; }
.ruimte { background: #0b1033; border-radius: 18px; }
.zon { fill: #fbbf24; filter: drop-shadow(0 0 12px rgba(251,191,36,.8)); }
.zon-txt { fill: #78350f; font-weight: 900; font-size: 16px; }
.zon-txt.midden { text-anchor: middle; }
.straal { stroke: #f59e0b; stroke-width: 3; stroke-dasharray: 8 6; }
.oceaan { fill: #3b82f6; }
.landje { fill: #22c55e; }
.nacht { fill: #020617; opacity: .72; }
.rand { fill: none; stroke: #bfdbfe; stroke-width: 3; }
.rand.dun { stroke-width: 2; }
.pool { fill: #fff; }
.pool-txt { fill: #e0f2fe; font-size: 12px; font-weight: 800; text-anchor: middle; }
.draaipijl { fill: none; stroke: #2dd4bf; stroke-width: 4; }
.draai-txt { fill: #99f6e4; font-size: 13px; font-weight: 800; text-anchor: middle; }
.halfrond { fill: #fef3c7; font-weight: 900; font-size: 15px; text-anchor: middle; opacity: .9; }
.halfrond.licht { fill: #cbd5e1; }
.huis-rond { fill: #fff; stroke: #f97316; stroke-width: 3; }
.huis { font-size: 18px; text-anchor: middle; }
.stip { fill: #fff; stroke: #0f172a; stroke-width: 2; }
.stip.doel { fill: #f472b6; }
.stad { fill: #fff; font-weight: 900; font-size: 14px; text-anchor: middle; paint-order: stroke; stroke: #0b1033; stroke-width: 4px; }
.stad.doel { fill: #f9a8d4; }
.baan { fill: none; stroke: #475569; stroke-width: 2; stroke-dasharray: 6 6; }
.baanpijl { fill: none; stroke: #94a3b8; stroke-width: 3; }
.as { stroke: #f8fafc; stroke-width: 3; stroke-linecap: round; }
.as-txt { fill: #f8fafc; font-weight: 900; font-size: 14px; text-anchor: middle; }
.nl-stip { fill: #f97316; stroke: #fff; stroke-width: 1.5; }
.au-stip { fill: #ef4444; stroke: #fff; stroke-width: 1.5; }
.raak { fill: transparent; }
.tikbaar .aardje, .tikbaar .maantje { cursor: pointer; }
.tikbaar .aardje:hover .raak, .tikbaar .maantje:hover .raak { fill: rgba(255,255,255,.12); }
.aardje.goed .raak, .maantje.goed .raak { fill: rgba(74,222,128,.35); stroke: #4ade80; stroke-width: 3; }
.aardje.fout .raak, .maantje.fout .raak { fill: rgba(248,113,113,.35); stroke: #f87171; stroke-width: 3; }
.aardje.actief .raak, .maantje.actief .raak { fill: rgba(250,204,21,.25); stroke: #facc15; stroke-width: 3; }
.seiz-lbl { fill: #fde68a; font-weight: 900; font-size: 15px; text-anchor: middle; }
.legenda-s text { fill: #cbd5e1; font-size: 13px; font-weight: 700; }
.aarde-txt { fill: #fff; font-size: 11px; font-weight: 900; text-anchor: middle; }
.maan-licht { fill: #f1f5f9; }
.maan-schaduw { fill: #1e293b; }
.maan-donker { fill: #334155; }
.nachtlucht { fill: #0b1033; }
.maanzicht { width: 120px; height: 120px; display: block; margin: 0 auto; }
.opties.vormen { grid-template-columns: repeat(4, 1fr); }
.opties.vormen .maanzicht { width: 70px; height: 70px; }
.maan-rij { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; text-align: center; margin: 10px 0; }
.maan-rij .maanzicht { width: 70px; height: 70px; }
.maan-rij small { font-weight: 800; }
.hemel .lucht { fill: #bae6fd; }
.hemel .grond { fill: #86efac; }
.hemel .boog { fill: none; stroke: #f59e0b; stroke-width: 4; stroke-dasharray: 8 6; }
.hemel .zon { filter: none; }
.boog-lbl { font-weight: 900; font-size: 20px; fill: #92400e; }
.wind { font-weight: 800; font-size: 14px; fill: #14532d; }
.draai-knoppen { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-top: 12px; }
.draai-knoppen .optie { min-width: 160px; }
.opties.twee { grid-template-columns: 1fr 1fr; max-width: 560px; margin: 12px auto 0; }
.ontdek-plaatje { float: right; width: 300px; margin: 0 0 10px 14px; }
.ontdek-plaatje.breed { float: none; width: 100%; max-width: 520px; margin: 0 auto 10px; }
.ontdek-plaatje svg { width: 100%; height: auto; }
.ontdek::after { content: ''; display: block; clear: both; }
@media (max-width: 640px) {
  .ontdek-plaatje { float: none; width: 100%; margin: 0 0 10px; }
  .opties.vormen { grid-template-columns: repeat(2, 1fr); }
  .draai-knoppen .optie { min-width: 0; flex: 1; }
}
.achtergrond { fill: #0b1033; }
