/* Topo-avontuur – vrolijke ontdekkingsreizigersstijl */
:root {
  --zand: #fbf4e6;
  --zand-donker: #f1e3c6;
  --papier: #fffdf8;
  --inkt: #23313a;
  --inkt-zacht: #5b6870;
  --zee: #0f6f86;
  --zee-donker: #0a4f60;
  --zee-licht: #dff1f4;
  --zon: #f39a1e;
  --zon-donker: #d27806;
  --zon-licht: #fff0d6;
  --goed: #2f9e57;
  --goed-licht: #e3f6e9;
  --fout: #d9534f;
  --fout-licht: #fde8e6;
  --bijna: #e0a100;
  --bijna-licht: #fff6d9;
  --lijn: #e6d7b8;
  --schaduw: 0 2px 0 rgba(35, 49, 58, .08), 0 8px 24px rgba(35, 49, 58, .08);
  --rond: 18px;
  --balk: 64px;
  font-family: ui-rounded, "SF Pro Rounded", "Avenir Next", "Nunito", "Trebuchet MS", system-ui, sans-serif;
  color: var(--inkt);
  -webkit-text-size-adjust: 100%;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  background: var(--zand);
  background-image:
    radial-gradient(circle at 12% 18%, rgba(243, 154, 30, .07) 0 120px, transparent 121px),
    radial-gradient(circle at 88% 82%, rgba(15, 111, 134, .07) 0 160px, transparent 161px);
  font-size: 17px;
  line-height: 1.45;
}
button, input { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 3px solid var(--zon); outline-offset: 2px; }
.verborgen { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ------------------------------------------------------------ bovenbalk */
.balk {
  height: var(--balk);
  display: flex; align-items: center; gap: 12px;
  padding: 0 16px;
  background: var(--zee);
  color: #fff;
  box-shadow: 0 3px 0 var(--zee-donker);
  position: relative; z-index: 5;
}
.balk .logo {
  display: flex; align-items: center; gap: 10px;
  font-weight: 800; font-size: 22px; letter-spacing: .3px;
  color: #fff; text-decoration: none;
}
.logo-kompas {
  width: 38px; height: 38px; border-radius: 50%;
  background: var(--zon); display: grid; place-items: center;
  box-shadow: inset 0 -3px 0 var(--zon-donker);
  font-size: 22px;
}
.balk .hoofdstuk { opacity: .85; font-size: 15px; }
.balk .ruimte { flex: 1; }
.balk-knop {
  border: 0; border-radius: 999px; padding: 8px 14px;
  background: rgba(255, 255, 255, .16); color: #fff; font-weight: 700;
  text-decoration: none; display: inline-flex; gap: 6px; align-items: center;
  min-height: 44px;
}
.balk-knop:hover { background: rgba(255, 255, 255, .26); }

main { min-height: calc(100% - var(--balk)); }

/* ------------------------------------------------------------ knoppen */
.knop {
  border: 0; border-radius: 14px;
  padding: 12px 20px; min-height: 52px;
  font-weight: 800; font-size: 18px;
  background: var(--zon); color: #fff;
  box-shadow: 0 4px 0 var(--zon-donker);
  transition: transform .08s, box-shadow .08s, filter .15s;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  text-decoration: none;
}
.knop:hover { filter: brightness(1.05); }
.knop:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--zon-donker); }
.knop[disabled] { opacity: .5; cursor: default; }
.knop.zee { background: var(--zee); box-shadow: 0 4px 0 var(--zee-donker); }
.knop.zee:active { box-shadow: 0 1px 0 var(--zee-donker); }
.knop.licht { background: var(--papier); color: var(--zee-donker); box-shadow: 0 4px 0 var(--lijn); border: 2px solid var(--lijn); }
.knop.licht:active { box-shadow: 0 1px 0 var(--lijn); }
.knop.rood { background: var(--fout); box-shadow: 0 4px 0 #a8322e; }
.knop.klein { min-height: 44px; padding: 8px 14px; font-size: 16px; color: #fff; font-weight: 800; } /* niet grijs door .klein */
.knop.licht.klein { color: var(--zee-donker); }
.knop.breed { width: 100%; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  border: 2px solid var(--lijn); background: var(--papier);
  border-radius: 999px; padding: 8px 14px; min-height: 44px;
  font-weight: 700; color: var(--inkt-zacht);
}
.chip[aria-pressed="true"] { background: var(--zee); border-color: var(--zee); color: #fff; }

.label {
  display: inline-block; border-radius: 999px; padding: 2px 10px;
  font-size: 13px; font-weight: 800; letter-spacing: .3px; text-transform: uppercase;
  background: var(--zee-licht); color: var(--zee-donker);
}
.label.provincie { background: #fde2e0; color: #9b2c27; }
.label.plaats { background: var(--zon-licht); color: #8a4b00; }
.label.water { background: var(--zee-licht); color: var(--zee-donker); }

/* status-bolletjes */
.st { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; font-size: 14px; white-space: nowrap; }
.st::before { content: ""; width: 12px; height: 12px; border-radius: 50%; background: #c9c2b2; }
.st.beheerst::before { background: var(--goed); }
.st.bijna::before { background: var(--bijna); }
.st.lastig::before { background: var(--fout); }
.st.oefenen::before { background: #8fb7c4; }

/* ------------------------------------------------------------ startscherm */
.start { max-width: 1100px; margin: 0 auto; padding: 24px 16px 40px; }
.held {
  display: grid; grid-template-columns: 1.2fr 1fr; gap: 24px; align-items: center;
  background: var(--papier); border-radius: 26px; padding: 26px;
  box-shadow: var(--schaduw); border: 2px solid var(--lijn);
  position: relative; overflow: hidden;
}
.held h1 { margin: 0 0 4px; font-size: 40px; line-height: 1.1; color: var(--zee-donker); }
.held .sub { margin: 0 0 16px; color: var(--inkt-zacht); font-size: 18px; }
.held-kaart {
  border-radius: 18px; overflow: hidden; border: 3px solid var(--zand-donker);
  aspect-ratio: 4 / 3; background: #79c6ec center 42% / 150% auto no-repeat;
  transform: rotate(1.5deg); box-shadow: var(--schaduw);
}
.voortgang-balk {
  display: flex; height: 18px; border-radius: 999px; overflow: hidden;
  background: #ece3cf; margin: 10px 0 6px;
}
.voortgang-balk span { display: block; height: 100%; transition: width .6s ease; }
.vb-beheerst { background: var(--goed); }
.vb-bijna { background: var(--bijna); }
.vb-lastig { background: var(--fout); }
.vb-oefenen { background: #8fb7c4; }
.legenda { display: flex; flex-wrap: wrap; gap: 6px 14px; color: var(--inkt-zacht); font-size: 14px; }

.tegels {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 22px;
}
.tegel {
  position: relative;
  display: flex; flex-direction: column; gap: 6px; align-items: flex-start;
  text-align: left; padding: 20px; min-height: 150px;
  border-radius: var(--rond); border: 2px solid var(--lijn);
  background: var(--papier); box-shadow: 0 5px 0 var(--lijn);
  text-decoration: none; color: inherit;
  transition: transform .15s ease, box-shadow .15s ease;
}
.tegel:hover { transform: translateY(-3px); box-shadow: 0 8px 0 var(--lijn); }
.tegel:active { transform: translateY(2px); box-shadow: 0 2px 0 var(--lijn); }
.tegel .icoon {
  width: 56px; height: 56px; border-radius: 16px; display: grid; place-items: center;
  font-size: 30px; background: var(--zon-licht);
}
.tegel:nth-child(2) .icoon { background: #fde2e0; }
.tegel:nth-child(3) .icoon { background: var(--zee-licht); }
.tegel:nth-child(4) .icoon { background: #e6f0d8; }
.tegel:nth-child(5) .icoon { background: #f1e4f7; }
.tegel:nth-child(6) .icoon { background: #e5e9f8; }
.tegel h2 { margin: 6px 0 0; font-size: 21px; color: var(--zee-donker); }
.tegel p { margin: 0; color: var(--inkt-zacht); font-size: 15px; }
.tegel .teller {
  position: absolute; top: 14px; right: 14px; font-weight: 800; font-size: 14px;
  background: var(--zee); color: #fff; border-radius: 999px; padding: 3px 10px;
}
.tegel .teller.rood { background: var(--fout); }

.badge-strook {
  margin-top: 22px; display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  background: var(--papier); border: 2px solid var(--lijn); border-radius: var(--rond); padding: 14px 18px;
}
.badge-strook .mini { display: flex; gap: 6px; flex-wrap: wrap; flex: 1; }
.mini-badge {
  width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; font-size: 21px;
  background: var(--zon-licht); border: 2px solid var(--zon);
}
.voetnoot { margin-top: 18px; color: var(--inkt-zacht); font-size: 14px; text-align: center; }
.voetnoot a { color: var(--zee-donker); font-weight: 700; }

/* ------------------------------------------------------------ speelveld: kaart + paneel */
.speelveld {
  display: grid; grid-template-columns: minmax(0, 1fr) 400px;
  height: calc(100vh - var(--balk)); height: calc(100dvh - var(--balk));
}
.kaart-vak { position: relative; padding: 12px; min-height: 0; }
.paneel {
  background: var(--papier); border-left: 2px solid var(--lijn);
  padding: 18px; overflow-y: auto; display: flex; flex-direction: column; gap: 14px;
}
.paneel h1 { margin: 0; font-size: 26px; color: var(--zee-donker); line-height: 1.15; }
.paneel h2 { margin: 0; font-size: 20px; color: var(--zee-donker); }
.paneel .uitleg { margin: 0; color: var(--inkt-zacht); }
.paneel-kop { display: flex; align-items: center; gap: 10px; }
.terug {
  border: 0; background: var(--zand); border-radius: 12px; width: 44px; height: 44px; flex: none;
  font-size: 22px; font-weight: 800; color: var(--zee-donker);
}

/* de kaart zelf */
.kaart {
  position: relative; width: 100%; height: 100%; overflow: hidden;
  border-radius: 20px; background: #79c6ec;
  border: 4px solid var(--papier); box-shadow: 0 0 0 2px var(--lijn), var(--schaduw);
  touch-action: none; user-select: none; -webkit-user-select: none; cursor: crosshair;
}
.kaart-podium { position: absolute; left: 0; top: 0; transform-origin: 0 0; will-change: transform; }
.kaart-podium.glijd { transition: transform .55s cubic-bezier(.2, .8, .25, 1); }
.kaart-podium img { display: block; width: 100%; height: 100%; pointer-events: none; }
.kaart-svg { position: absolute; left: 0; top: 0; overflow: visible; pointer-events: none; }
.kaart-knoppen {
  position: absolute; right: 10px; top: 10px; display: flex; flex-direction: column; gap: 8px; z-index: 2;
}
.kaart-knoppen button {
  width: 48px; height: 48px; border-radius: 14px; border: 2px solid var(--lijn);
  background: var(--papier); font-size: 26px; font-weight: 800; color: var(--zee-donker);
  box-shadow: 0 3px 0 var(--lijn); line-height: 1;
}
.kaart-knoppen button:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--lijn); }

/* markeringen op de kaart */
.markering .m-ring { fill: none; stroke-width: 4; vector-effect: non-scaling-stroke; }
.markering .m-kern { stroke: #fff; stroke-width: 2; vector-effect: non-scaling-stroke; }
.markering .m-lijn { fill: none; stroke-width: 7; stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.markering .m-gloed { fill: none; stroke-width: 16; stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; opacity: .35; }
.markering .m-vlak { stroke-width: 3.5; vector-effect: non-scaling-stroke; stroke-linejoin: round; }

.m-doel .m-ring, .m-doel .m-lijn, .m-doel .m-gloed { stroke: #ff7a00; }
.m-doel .m-kern { fill: #ff7a00; }
.m-doel .m-vlak { fill: rgba(255, 122, 0, .28); stroke: #ff7a00; }
.m-doel { animation: puls 1.6s ease-in-out infinite; }

.m-goed .m-ring, .m-goed .m-lijn, .m-goed .m-gloed { stroke: var(--goed); }
.m-goed .m-kern { fill: var(--goed); }
.m-goed .m-vlak { fill: rgba(47, 158, 87, .3); stroke: var(--goed); }

.m-fout .m-ring, .m-fout .m-lijn, .m-fout .m-gloed { stroke: var(--fout); }
.m-fout .m-kern { fill: var(--fout); }
.m-fout .m-vlak { fill: rgba(217, 83, 79, .22); stroke: var(--fout); stroke-dasharray: 8 6; }

.m-ontdek .m-ring, .m-ontdek .m-lijn, .m-ontdek .m-gloed { stroke: #7a3fd1; }
.m-ontdek .m-kern { fill: #7a3fd1; }
.m-ontdek .m-vlak { fill: rgba(122, 63, 209, .2); stroke: #7a3fd1; }

.m-zacht .m-vlak { fill: rgba(15, 111, 134, .12); stroke: var(--zee); stroke-dasharray: 10 7; }
.m-zacht .m-ring { stroke: var(--zee); }
.m-zacht .m-kern { fill: var(--zee); }

.hint-cirkel {
  fill: rgba(243, 154, 30, .12); stroke: var(--zon-donker); stroke-width: 3; stroke-dasharray: 10 8;
  vector-effect: non-scaling-stroke;
}
.label-ring { fill: rgba(243, 154, 30, .15); stroke: #ff7a00; stroke-width: 4; vector-effect: non-scaling-stroke; }
.kruisje circle { fill: var(--fout); stroke: #fff; stroke-width: 2.5; vector-effect: non-scaling-stroke; }
.rimpel { fill: none; stroke: var(--zee-donker); stroke-width: 3; vector-effect: non-scaling-stroke; animation: rimpel .7s ease-out forwards; transform-box: fill-box; transform-origin: center; }

.laag-namen text {
  font-weight: 800; fill: var(--inkt); paint-order: stroke; stroke: #fff; stroke-width: 4px;
  stroke-linejoin: round; vector-effect: non-scaling-stroke;
}
.laag-namen .naam-provincie { fill: #9b2c27; font-style: italic; }
.laag-namen .naam-water { fill: var(--zee-donker); }

.route { fill: none; stroke: #8a4b00; stroke-width: 4; stroke-dasharray: 2 10; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.route.af { stroke: var(--zon-donker); stroke-dasharray: none; stroke-width: 5; }
.vlag circle { fill: #fff; stroke: #8a4b00; stroke-width: 3; vector-effect: non-scaling-stroke; }
.vlag text { font-size: calc(15px * var(--inv)); font-weight: 800; fill: #8a4b00; }
.vlag.af circle { fill: var(--zon); stroke: var(--zon-donker); }
.vlag.af text { fill: #fff; }
.vlag.dicht circle { fill: #eee; stroke: #aaa; }
.vlag.dicht text { fill: #999; }
.vlag.nu circle { fill: var(--zee); stroke: var(--zee-donker); }
.vlag.nu text { fill: #fff; }
.vlag.nu { animation: puls 1.6s ease-in-out infinite; }

@keyframes puls { 0%, 100% { opacity: 1; } 50% { opacity: .55; } }
@keyframes rimpel { from { transform: scale(.6); opacity: 1; } to { transform: scale(2.4); opacity: 0; } }

/* ------------------------------------------------------------ vraagpaneel */
.stippen { display: flex; gap: 6px; flex-wrap: wrap; }
.stippen span {
  width: 26px; height: 10px; border-radius: 999px; background: #e7dcc5; transition: background .3s;
}
.stippen span.nu { background: var(--zee); }
.stippen span.goed { background: var(--goed); }
.stippen span.hulp { background: #8fcf9f; }
.stippen span.spelling { background: var(--bijna); }
.stippen span.fout { background: var(--fout); }
.stippen span.herkansing { border: 2px dashed var(--fout); background: transparent; }

.vraag {
  background: var(--zee-licht); border-radius: var(--rond); padding: 16px;
  border: 2px solid #bfe1e8;
}
.vraag .label { margin-bottom: 8px; }
.vraag-tekst { font-size: 26px; font-weight: 800; line-height: 1.2; color: var(--zee-donker); }
.vraag-tekst b { color: var(--zon-donker); }
.vraag-tip { margin-top: 6px; color: var(--inkt-zacht); font-size: 15px; }

.antwoord-rij { display: flex; gap: 8px; }
.antwoord-rij input {
  flex: 1; min-width: 0; min-height: 56px; padding: 10px 14px;
  border-radius: 14px; border: 3px solid var(--lijn); background: #fff; font-size: 22px; font-weight: 700;
}
.antwoord-rij input:focus { border-color: var(--zee); outline: none; }

.keuzes { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.keuze {
  min-height: 64px; border-radius: 14px; border: 3px solid var(--lijn); background: #fff;
  font-weight: 800; font-size: 18px; padding: 8px 10px; color: var(--zee-donker);
  box-shadow: 0 4px 0 var(--lijn); transition: transform .08s;
}
.keuze:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--lijn); }
.keuze.goed { border-color: var(--goed); background: var(--goed-licht); color: #1d6b3a; }
.keuze.fout { border-color: var(--fout); background: var(--fout-licht); color: #9b2c27; }
.keuze[disabled] { cursor: default; }

.hulprij { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.hint-tekst {
  background: var(--zon-licht); border-radius: 14px; padding: 10px 14px; font-weight: 700; color: #8a4b00;
  border: 2px dashed var(--zon);
}
.hint-patroon { font-family: ui-monospace, Menlo, monospace; letter-spacing: 3px; font-size: 20px; }

.melding {
  border-radius: var(--rond); padding: 14px 16px; font-weight: 700;
  display: flex; gap: 12px; align-items: flex-start;
  animation: pop .35s ease;
}
.melding .groot { font-size: 30px; line-height: 1; }
.melding p { margin: 2px 0 0; font-weight: 600; }
.melding.goed { background: var(--goed-licht); border: 2px solid #9fd8b3; color: #1d6b3a; }
.melding.fout { background: var(--fout-licht); border: 2px solid #f2b6b2; color: #8f2a26; }
.melding.bijna { background: var(--bijna-licht); border: 2px solid #f0d27a; color: #7a5800; }
.melding.info { background: var(--zee-licht); border: 2px solid #bfe1e8; color: var(--zee-donker); }
.schud { animation: schud .4s ease; }

@keyframes pop { 0% { transform: scale(.92); opacity: 0; } 100% { transform: scale(1); opacity: 1; } }
@keyframes schud { 0%, 100% { transform: translateX(0); } 25% { transform: translateX(-6px); } 75% { transform: translateX(6px); } }

/* ontdekkaart-info */
.info-kaart {
  background: #fff; border: 2px solid var(--lijn); border-radius: var(--rond); padding: 16px;
  animation: pop .3s ease;
}
.info-kaart h2 { font-size: 26px; margin: 6px 0 4px; }
.info-kaart .meta { color: var(--inkt-zacht); font-size: 15px; margin: 0 0 8px; }
.info-kaart .weetje { margin: 0; background: var(--zon-licht); border-radius: 12px; padding: 10px 12px; }
.teller-groot { font-weight: 800; color: var(--zee-donker); }
.schakel { display: flex; align-items: center; gap: 10px; font-weight: 700; min-height: 44px; cursor: pointer; }
.schakel input { width: 24px; height: 24px; accent-color: var(--zee); }

/* ------------------------------------------------------------ resultaat */
.sterren { display: flex; gap: 6px; font-size: 40px; justify-content: center; }
.sterren span { filter: grayscale(1) opacity(.3); transition: filter .3s; }
.sterren span.aan { filter: none; animation: pop .4s ease backwards; }
.uitslag-groot { text-align: center; font-size: 22px; font-weight: 800; color: var(--zee-donker); margin: 0; }
.lijst { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.lijst li {
  display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 14px;
  background: #fff; border: 2px solid var(--lijn);
}
.lijst li .naam { font-weight: 800; flex: 1; }
.lijst li .klein { color: var(--inkt-zacht); font-size: 14px; }
.lijst li.fout { border-color: #f2b6b2; background: var(--fout-licht); }
.lijst li.spelling { border-color: #f0d27a; background: var(--bijna-licht); }
.lijst li.goed { border-color: #9fd8b3; background: var(--goed-licht); }
.code-bol {
  width: 34px; height: 34px; border-radius: 50%; flex: none; display: grid; place-items: center;
  border: 2px solid var(--inkt); font-weight: 800; font-size: 14px; background: #fff;
}
.code-bol.box { border-radius: 6px; }
.code-bol.ruit { border-radius: 4px; transform: rotate(45deg); width: 28px; height: 28px; margin: 3px; }
.code-bol.ruit span { transform: rotate(-45deg); }

/* ------------------------------------------------------------ reis */
.etappes { display: flex; flex-direction: column; gap: 10px; }
.etappe {
  display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: var(--rond);
  border: 2px solid var(--lijn); background: #fff; text-align: left; width: 100%;
}
.etappe .nr {
  width: 44px; height: 44px; border-radius: 50%; flex: none; display: grid; place-items: center;
  font-weight: 800; font-size: 20px; background: var(--zand-donker); color: #8a4b00;
}
.etappe.af .nr { background: var(--zon); color: #fff; }
.etappe.open { border-color: var(--zee); box-shadow: 0 4px 0 #bfe1e8; }
.etappe.open .nr { background: var(--zee); color: #fff; }
.etappe.dicht { opacity: .6; }
.etappe .tekst { flex: 1; }
.etappe .tekst b { display: block; color: var(--zee-donker); }
.etappe .tekst small { color: var(--inkt-zacht); }
.etappe .bdg { font-size: 26px; }
.verhaal {
  background: var(--zon-licht); border: 2px solid #f6d29a; border-radius: var(--rond); padding: 14px 16px;
  font-weight: 600; color: #6b3d00;
}

/* ------------------------------------------------------------ toetsen */
.toets-keuzes { display: flex; flex-direction: column; gap: 12px; }
.toets-kaart {
  display: flex; gap: 14px; align-items: center; padding: 16px; border-radius: var(--rond);
  border: 2px solid var(--lijn); background: #fff; text-align: left; width: 100%;
  box-shadow: 0 4px 0 var(--lijn);
}
.toets-kaart:active { transform: translateY(2px); box-shadow: 0 2px 0 var(--lijn); }
.toets-kaart .icoon { font-size: 32px; width: 56px; height: 56px; border-radius: 16px; display: grid; place-items: center; background: var(--zee-licht); flex: none; }
.toets-kaart b { display: block; font-size: 19px; color: var(--zee-donker); }
.toets-kaart small { color: var(--inkt-zacht); }

.schoolblad h3 { margin: 18px 0 8px; font-size: 16px; color: #b3261e; font-style: italic; }
.schoolblad .veld {
  display: flex; align-items: center; gap: 8px; margin-bottom: 8px;
}
.schoolblad .veld label { width: 40px; flex: none; text-align: right; font-weight: 800; color: var(--inkt-zacht); }
.schoolblad .veld input {
  flex: 1; min-width: 0; min-height: 46px; border-radius: 12px; border: 2px solid var(--lijn);
  padding: 6px 12px; font-size: 18px; font-weight: 600; background: #fff;
}
.schoolblad .veld input:focus { border-color: var(--zon); outline: none; background: var(--zon-licht); }
.schoolblad .veld.ingevuld input { border-color: #bfe1e8; }
.plak-onder { position: sticky; bottom: -18px; background: var(--papier); padding: 12px 0 18px; border-top: 2px solid var(--lijn); margin-top: auto; }

/* ------------------------------------------------------------ badges */
.badge-raster { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 14px; }
.badge {
  text-align: center; padding: 16px 10px; border-radius: var(--rond); background: #fff; border: 2px solid var(--lijn);
}
.badge .medaille {
  width: 76px; height: 76px; margin: 0 auto 8px; border-radius: 50%; display: grid; place-items: center;
  font-size: 38px; background: var(--zon-licht); border: 4px solid var(--zon);
  box-shadow: inset 0 -5px 0 rgba(0, 0, 0, .06);
}
.badge.nee .medaille { filter: grayscale(1); opacity: .35; border-color: #bbb; }
.badge b { display: block; color: var(--zee-donker); }
.badge small { color: var(--inkt-zacht); }

/* ------------------------------------------------------------ dialoog en feest */
dialog {
  border: 0; border-radius: 24px; padding: 24px; max-width: min(460px, calc(100vw - 32px));
  box-shadow: 0 20px 60px rgba(0, 0, 0, .3); background: var(--papier); color: var(--inkt);
}
dialog::backdrop { background: rgba(10, 40, 50, .45); }
dialog h2 { margin: 0 0 8px; color: var(--zee-donker); }
dialog .knoppen { display: flex; gap: 10px; justify-content: flex-end; margin-top: 18px; flex-wrap: wrap; }

.feest { text-align: center; }
.feest .medaille {
  width: 120px; height: 120px; margin: 0 auto 12px; border-radius: 50%; display: grid; place-items: center;
  font-size: 64px; background: var(--zon-licht); border: 6px solid var(--zon);
  animation: medaille .8s cubic-bezier(.2, 1.6, .4, 1) both;
}
@keyframes medaille { from { transform: scale(.2) rotate(-30deg); opacity: 0; } to { transform: scale(1) rotate(0); opacity: 1; } }
.confetti { position: fixed; inset: 0; pointer-events: none; z-index: 50; overflow: hidden; }
.confetti i {
  position: absolute; top: -20px; width: 10px; height: 16px; border-radius: 3px;
  animation: val 1.6s ease-in forwards;
}
@keyframes val { to { transform: translateY(105vh) rotate(540deg); opacity: .8; } }

.toast-laag { position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); z-index: 40; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; } /* meldingen mogen nooit een knop eronder blokkeren (iPad) */
.toast {
  background: var(--inkt); color: #fff; padding: 12px 18px; border-radius: 999px; font-weight: 700;
  box-shadow: var(--schaduw); animation: pop .3s ease;
}

.ouders { max-width: 980px; margin: 0 auto; padding: 24px 16px 40px; }
.ouders section { background: var(--papier); border: 2px solid var(--lijn); border-radius: var(--rond); padding: 18px 20px; margin-bottom: 16px; }
.ouders h1 { color: var(--zee-donker); }
.ouders h2 { margin-top: 0; color: var(--zee-donker); }
.tabel { width: 100%; border-collapse: collapse; font-size: 15px; }
.tabel th, .tabel td { text-align: left; padding: 6px 8px; border-bottom: 1px solid var(--lijn); }
.tabel th { color: var(--inkt-zacht); font-size: 13px; text-transform: uppercase; }
.tabel td.num { text-align: center; }
.waarschuwing { background: var(--fout-licht); border: 2px solid #f2b6b2; border-radius: 14px; padding: 10px 14px; color: #8f2a26; font-weight: 700; }

/* ------------------------------------------------------------ smallere schermen (tablet) */
@media (max-width: 1100px) {
  .speelveld { grid-template-columns: minmax(0, 1fr) 340px; }
}
@media (max-width: 860px) {
  .speelveld { display: flex; flex-direction: column; height: auto; }
  .kaart-vak { height: 56vh; height: 56dvh; min-height: 320px; padding: 8px; }
  .paneel { border-left: 0; border-top: 2px solid var(--lijn); overflow: visible; }
  .plak-onder { bottom: 0; }
  .held { grid-template-columns: 1fr; }
  .held-kaart { display: none; }
  .tegels { grid-template-columns: 1fr 1fr; }
  .vraag-tekst { font-size: 23px; }
}
@media (max-width: 520px) {
  .tegels { grid-template-columns: 1fr; }
  .tegel { min-height: 0; }
  .held h1 { font-size: 32px; }
  .balk .hoofdstuk { display: none; }
  .balk .logo { font-size: 19px; white-space: nowrap; }
  .balk .knop-tekst { display: none; }
  .keuzes { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* ============================================================ accounts */
.balk-rechts { display: flex; align-items: center; gap: 8px; flex-wrap: nowrap; }
.balk-knop.uitlog { background: var(--zon); box-shadow: inset 0 -3px 0 var(--zon-donker); cursor: pointer; }
.naam-chip { max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.opslag-status { font-size: 14px; font-weight: 700; color: #d7f0f5; white-space: nowrap; }
.opslag-status.bezig { color: #ffe3b0; }
.opslag-status.fout button, .opslag-status.uitgelogd {
  background: var(--fout); color: #fff; border: 0; border-radius: 999px; padding: 8px 12px; font-weight: 800; min-height: 40px;
  animation: puls 1.6s ease-in-out infinite;
}
.groet { margin: 0 0 4px; font-size: 22px; font-weight: 800; color: var(--zon-donker); }
.mono { font-family: ui-monospace, Menlo, Consolas, monospace; letter-spacing: .5px; }
.klein { font-size: 14px; color: var(--inkt-zacht); font-weight: 600; }

.inloggen { min-height: calc(100vh - var(--balk)); display: grid; place-items: center; padding: 24px 16px; }
.inlog-kaart {
  width: min(480px, 100%); background: var(--papier); border: 2px solid var(--lijn); border-radius: 26px;
  padding: 26px; box-shadow: var(--schaduw); display: flex; flex-direction: column; gap: 16px;
}
.inlog-kop { display: flex; gap: 14px; align-items: center; }
.inlog-kop h1 { margin: 0; font-size: 26px; color: var(--zee-donker); line-height: 1.15; }
.inlog-kop p { margin: 4px 0 0; }
.logo-kompas.groot { width: 64px; height: 64px; font-size: 36px; flex: none; }
.inlog-form, .toevoeg-form { display: flex; flex-direction: column; gap: 12px; }
.inlog-form label, .toevoeg-form label { display: flex; flex-direction: column; gap: 4px; font-weight: 800; color: var(--zee-donker); }
.inlog-form label.schakel, .toevoeg-form label.schakel { flex-direction: row; }
.inlog-form input:not([type=checkbox]), .toevoeg-form input:not([type=checkbox]):not([type=radio]), .toevoeg-form textarea,
.rij-form input, .dialoog-veld {
  min-height: 52px; border-radius: 14px; border: 3px solid var(--lijn); background: #fff; padding: 8px 14px;
  font-size: 20px; font-weight: 700; font-family: inherit;
}
.toevoeg-form textarea { min-height: 100px; font-size: 18px; }
.inlog-form input:focus, .toevoeg-form input:focus, .toevoeg-form textarea:focus, .rij-form input:focus { border-color: var(--zee); outline: none; }
.klas-gevonden { margin: -6px 0 0; font-weight: 800; min-height: 1em; }
.klas-gevonden.goed { color: var(--goed); }
.klas-gevonden.fout { color: var(--fout); }
.uitleg.klein { font-size: 14px; }
.account-naam { font-size: 20px; }

/* ============================================================ beheer */
.beheer { max-width: 1180px; margin: 0 auto; padding: 20px 16px 48px; }
.beheer h1 { color: var(--zee-donker); margin: 6px 0 10px; }
.beheer h2 { color: var(--zee-donker); }
.kruimel { margin: 0; font-weight: 700; }
.kruimel a, .beheer a:not(.knop):not(.chip) { color: var(--zee-donker); }
.tabs { margin-bottom: 14px; }
.tabs .chip { text-decoration: none; display: inline-flex; align-items: center; }
.klas-raster { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.klas-kaart, .blok {
  background: var(--papier); border: 2px solid var(--lijn); border-radius: var(--rond); padding: 16px 18px; margin-bottom: 14px;
}
.klas-kaart h2 { margin: 0 0 6px; }
.klas-kaart p { margin: 0 0 8px; }
.rij-form { display: flex; gap: 10px; flex-wrap: wrap; }
.rij-form input { flex: 1; min-width: 200px; }
.inspring { padding-left: 34px; flex-direction: row !important; align-items: center; gap: 8px !important; }
.inspring input { width: 110px; }
.tabel-wrap, .raster-wrap { overflow-x: auto; background: var(--papier); border: 2px solid var(--lijn); border-radius: var(--rond); padding: 6px 10px; margin-bottom: 16px; }
.tabel tr.uit, .beheer-lijst li.uit { opacity: .6; }
.beheer-lijst li { flex-wrap: wrap; }
.knop.gevaar { color: #9b2c27; border-color: #f2b6b2; }
.raster { border-collapse: separate; border-spacing: 2px; font-size: 12px; }
.raster th { font-weight: 700; color: var(--inkt-zacht); padding: 2px 4px; white-space: nowrap; }
.raster tbody th { text-align: right; padding-right: 8px; font-size: 14px; color: var(--inkt); }
.cel { width: 18px; height: 22px; border-radius: 4px; background: #e2dccd; }
.cel.lastig { background: var(--fout); }
.cel.oefenen { background: #8fb7c4; }
.cel.bijna { background: var(--bijna); }
.cel.beheerst { background: var(--goed); }
.beheer .legenda { margin-bottom: 12px; }

/* inlogkaartjes */
.kaartjes { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; margin-top: 16px; }
.inlogkaartje {
  border: 2px dashed #8a4b00; border-radius: 16px; padding: 14px 16px; background: #fff; break-inside: avoid;
}
.kaartje-kop { margin: 0 0 6px; font-weight: 800; font-size: 20px; color: var(--zee-donker); }
.kaartje-bijnaam { margin: 0 0 6px; font-weight: 800; }
.inlogkaartje dl { display: grid; grid-template-columns: auto 1fr; gap: 4px 10px; margin: 0; }
.inlogkaartje dt { color: var(--inkt-zacht); font-size: 13px; font-weight: 700; align-self: center; }
.inlogkaartje dd { margin: 0; font-weight: 800; word-break: break-all; }
.inlogkaartje dd.groot { font-size: 22px; }
.kaartje-voet { margin: 8px 0 0; font-size: 12px; color: var(--inkt-zacht); }

@media print {
  .balk, .niet-printen, .toast-laag { display: none !important; }
  body { background: #fff; }
  .beheer { padding: 0; max-width: none; }
  .kaartjes { grid-template-columns: repeat(2, 1fr); gap: 8mm; }
  .inlogkaartje { page-break-inside: avoid; }
}
@media (max-width: 860px) {
  .balk { gap: 6px; padding: 0 10px; }
  .balk .knop-tekst { display: none; }
  .balk-knop { padding: 8px 10px; }
}

@media (max-width: 560px) {
  .balk .logo-tekst { display: none; }
  .balk .hoofdstuk { display: none; }
  .opslag-status.ok { font-size: 18px; }
  .naam-chip { max-width: 44px; }
}
.toevoeg-form select {
  min-height: 52px; border-radius: 14px; border: 3px solid var(--lijn); background: #fff; padding: 8px 12px;
  font-size: 18px; font-weight: 700; font-family: inherit; color: var(--inkt);
}
.toevoeg-form select:focus { border-color: var(--zee); outline: none; }

/* ============================================================ Tafelavontuur */
:root { --zelf: #8fcf9f; --zelf-donker: #2f7d4a; --hulp: #f2b233; }
.st.zelfstandig::before { background: var(--zelf); }
.st.metHulp::before { background: var(--hulp); }
.vb-zelf { background: var(--zelf); }
.cel.zelfstandig { background: var(--zelf); }
.cel.metHulp { background: var(--hulp); }

/* startkeuze: Topo-avontuur of Tafelavontuur */
.startkeuze { max-width: 960px; }
.tafel-start > h1 { color: var(--zee-donker); margin: 8px 0 8px; }
.keuze-titel { margin: 0 0 18px; font-size: 36px; line-height: 1.15; color: var(--zee-donker); }
.keuze-tegels { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.keuze-tegel {
  display: flex; gap: 18px; align-items: flex-start; padding: 24px; min-height: 190px;
  border-radius: 26px; border: 3px solid var(--lijn); background: var(--papier); box-shadow: 0 6px 0 var(--lijn);
  text-decoration: none; color: inherit; transition: transform .12s ease, box-shadow .12s ease;
}
.keuze-tegel:active { transform: translateY(3px); box-shadow: 0 2px 0 var(--lijn); }
.keuze-tegel h2 { margin: 2px 0 4px; font-size: 28px; color: var(--zee-donker); }
.keuze-tegel p { margin: 0 0 6px; color: var(--inkt-zacht); }
.keuze-tegel .sub { font-weight: 700; color: var(--zee-donker); }
.keuze-icoon {
  flex: none; width: 76px; height: 76px; border-radius: 22px; display: grid; place-items: center; font-size: 42px;
  background: var(--zee-licht); box-shadow: inset 0 -4px 0 rgba(0, 0, 0, .06);
}
.keuze-tegel.tafels .keuze-icoon { background: var(--zon-licht); }
.keuze-tegel.uit { opacity: .65; }

/* startscherm tafels */
.tafel-start.smal { max-width: 820px; }
.tafel-held { grid-template-columns: 1.4fr 1fr; }
.held-figuur { display: grid; place-items: center; gap: 6px; background: var(--zon-licht); border-radius: 20px; padding: 18px; border: 3px solid #f6d29a; }
.held-figuur p { margin: 0; font-weight: 800; font-size: 26px; color: #8a4b00; }
.aandacht-regel { margin: 12px 0 0; font-weight: 700; color: var(--zee-donker); }
.tafel-tegels .tegel:nth-child(7) .icoon { background: #fde2e0; }
.tafelkaart-blok { margin-top: 22px; }
.tafelkaart-blok h2 { margin: 0 0 4px; color: var(--zee-donker); }
.tafelkaart-blok .uitleg { margin: 0 0 10px; color: var(--inkt-zacht); }
.tafelkaart-wrap { overflow-x: auto; }
.tafelkaart { border-collapse: separate; border-spacing: 4px; margin: 0 auto 8px; }
.tafelkaart th { font-size: 13px; color: var(--inkt-zacht); font-weight: 800; padding: 0 4px; }
.tafelkaart tbody th a { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; background: var(--zee-licht); color: var(--zee-donker); text-decoration: none; font-size: 16px; }
.tk { width: 44px; height: 34px; border-radius: 8px; text-align: center; font-weight: 800; font-size: 14px; background: #ece3cf; color: #fff; }
.tk.beheerst { background: var(--goed); }
.tk.zelfstandig { background: var(--zelf); color: #1d4f2e; }
.tk.metHulp { background: var(--hulp); color: #5c3b00; }
.tk.oefenen { background: var(--fout); }

/* oefenronde: vraag links, cijferknoppen rechts (iPad liggend); onder elkaar op smallere schermen */
.tafel-scherm { max-width: 1100px; margin: 0 auto; padding: 16px; }
.tafel-speel { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 18px; align-items: start; }
.tafel-vraagvak, .tafel-invoervak {
  background: var(--papier); border: 2px solid var(--lijn); border-radius: var(--rond); padding: 16px 18px;
  display: flex; flex-direction: column; gap: 14px;
}
.tafel-invoervak { position: sticky; top: 12px; }
.tafel-vraagvak h1 { margin: 0; font-size: 22px; color: var(--zee-donker); }
.tafel-vraag { display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.tafel-som { font-size: 52px; font-weight: 800; line-height: 1.1; color: var(--zee-donker); letter-spacing: .5px; font-variant-numeric: tabular-nums; }
.tafel-som.klein-som { font-size: 34px; }
.vraag-zin { margin: 0; font-size: 20px; font-weight: 700; color: var(--inkt); }
.invoer-vak {
  display: inline-block; min-width: 1.9em; padding: 0 .25em; text-align: center; border-radius: 14px;
  border: 4px dashed #9cc9d4; background: #fff; color: #9cc9d4;
}
.invoer-vak.gevuld { border-style: solid; border-color: var(--zee); color: var(--zee-donker); }
.vraag-stippen { width: 100%; }
.label.herhaal { background: var(--zon-licht); color: #8a4b00; }
.stippen span.nu-klaar { background: #8fb7c4; }

.cijferblok { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.cijfer {
  min-height: 72px; border-radius: 18px; border: 3px solid var(--lijn); background: #fff;
  font-size: 34px; font-weight: 800; color: var(--zee-donker); box-shadow: 0 5px 0 var(--lijn);
  touch-action: manipulation; -webkit-tap-highlight-color: transparent; user-select: none; -webkit-user-select: none;
  transition: transform .06s;
}
.cijfer:active { transform: translateY(3px); box-shadow: 0 2px 0 var(--lijn); }
.cijfer.wis { font-size: 28px; color: var(--inkt-zacht); }
.cijfer.ok { background: var(--goed); border-color: var(--goed); color: #fff; box-shadow: 0 5px 0 #1f7a41; }
.cijfer.ok[disabled] { opacity: .45; cursor: default; }
.tafel-keuzes .keuze { min-height: 76px; font-size: 26px; }

/* stippen: groepjes / rijen */
.stip-veld { align-self: flex-start; display: inline-flex; flex-direction: column; gap: calc(var(--stip) * .35); padding: 10px; background: #fff; border-radius: 14px; border: 2px solid var(--lijn); max-width: 100%; }
.stip-rij { display: flex; gap: calc(var(--stip) * .35); }
.stip-rij.vijf { margin-top: calc(var(--stip) * .45); }
.stip-rij i { display: block; width: var(--stip); height: var(--stip); border-radius: 50%; background: var(--zee); flex: none; }
.stip-rij i.vijf { margin-left: calc(var(--stip) * .45); }
.stip-rij.d1 i { background: var(--zon); }
.draai-in { animation: draaiIn .4s ease both; }
.draai-terug { animation: draaiTerug .4s ease both; }
@keyframes draaiIn { from { transform: rotate(-90deg); opacity: .4; } to { transform: rotate(0); opacity: 1; } }
@keyframes draaiTerug { from { transform: rotate(90deg); opacity: .4; } to { transform: rotate(0); opacity: 1; } }
.draai-uitleg { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 8px; font-size: 26px; }
.tussenstap { display: flex; flex-direction: column; gap: 8px; margin-top: 8px; color: var(--inkt); }
.stap-tekst { margin: 0; font-size: 19px; font-weight: 800; color: var(--zee-donker); }
.stap-tip { margin: 0; font-weight: 700; color: #8a4b00; }
.probeer { margin: 6px 0 0; font-size: 18px; }

/* einde ronde */
.ronde-klaar { display: flex; flex-direction: column; gap: 16px; }
.ronde-klaar .feest h1 { margin: 0; color: var(--zee-donker); }
.ronde-klaar .medaille { width: 96px; height: 96px; font-size: 50px; }
.knoppen-rij { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 12px; }
.knoppen-rij .knop { flex: 1; min-width: 180px; }
.som-chip { display: inline-block; border: 0; border-radius: 999px; padding: 6px 12px; margin: 2px 0; font-weight: 800; background: var(--zee-licht); color: var(--zee-donker); font-size: 16px; white-space: nowrap; }
.som-chip.rood { background: var(--fout-licht); color: #8f2a26; }
.som-chip.oranje { background: #fff1d1; color: #7a5200; }
.som-chip.groen { background: var(--goed-licht); color: #1d6b3a; }
button.som-chip { min-height: 44px; font-size: 19px; cursor: pointer; }
.ontdekt { display: flex; gap: 16px; align-items: center; background: var(--zon-licht); border: 2px solid #f6d29a; border-radius: var(--rond); padding: 16px; animation: pop .35s ease; }
.ontdekt h2 { margin: 0 0 4px; color: #8a4b00; }
.ontdekt p { margin: 0; }
.plek-icoon.groot { font-size: 56px; }

/* Tafelreis */
.reis-kaart { list-style: none; padding: 0; margin: 16px 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; counter-reset: plek; }
.reis-plek { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 4px; padding: 14px 8px; border-radius: var(--rond); background: var(--papier); border: 2px solid var(--lijn); }
.reis-plek .plek-icoon { font-size: 40px; }
.reis-plek .plek-naam { font-weight: 800; color: var(--zee-donker); }
.reis-plek .plek-status { font-size: 13px; color: var(--inkt-zacht); font-weight: 700; }
.reis-plek.af { background: var(--goed-licht); border-color: #9fd8b3; }
.reis-plek.nu { border: 3px solid var(--zon); background: var(--zon-licht); }
.reis-plek.dicht { opacity: .7; }

/* Bouwspel */
.bouw-rij { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 16px; margin-top: 14px; }
.bouw-veld { position: relative; aspect-ratio: 4 / 3; border-radius: 26px; overflow: hidden; border: 3px solid var(--lijn); }
.bouw-veld.eiland { background: radial-gradient(ellipse 45% 37% at 50% 56%, #9fd57f 0 74%, #f4dfa6 76% 99%, transparent 100%), linear-gradient(#8fd3ef, #49a9d6); }
.bouw-veld.ruimte { background: radial-gradient(circle at 50% 120%, #9a8fb7 0 45%, transparent 46%), radial-gradient(2px 2px at 20% 30%, #fff 50%, transparent 51%), radial-gradient(2px 2px at 70% 20%, #fff 50%, transparent 51%), radial-gradient(1.5px 1.5px at 40% 60%, #fff 50%, transparent 51%), linear-gradient(#1b2350, #3b2d6b); }
.bouwwerk { position: absolute; transform: translate(-50%, -50%); font-size: clamp(28px, 5vw, 48px); animation: pop .35s ease; }
.bouw-leeg { position: absolute; inset: auto 0 12px; text-align: center; margin: 0; font-weight: 800; color: #fff; text-shadow: 0 1px 3px rgba(0, 0, 0, .4); }
.bouw-winkel { background: var(--papier); border: 2px solid var(--lijn); border-radius: var(--rond); padding: 12px 14px; max-height: 520px; overflow: auto; }
.bouw-winkel .stenen { margin: 0 0 8px; font-size: 20px; }
.bouw-winkel li { display: flex; gap: 10px; align-items: center; padding: 4px 0; }
.bouw-winkel li .naam { flex: 1; font-weight: 700; }
.bouw-winkel li.af { opacity: .6; }
.bouw-icoon { font-size: 26px; width: 34px; text-align: center; }

/* Kies een tafel */
.tafel-knoppen { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; margin: 12px 0 18px; }
.tafel-knoppen.uitdaging { grid-template-columns: repeat(5, 1fr); }
.tafel-knop {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-height: 92px;
  border-radius: 20px; border: 3px solid var(--lijn); background: #fff; box-shadow: 0 5px 0 var(--lijn);
  text-decoration: none; color: var(--zee-donker); touch-action: manipulation;
}
.tafel-knop b { font-size: 36px; line-height: 1; }
.tafel-knop small { color: var(--inkt-zacht); font-weight: 700; font-size: 13px; }
.tafel-knop.aandacht { border-color: var(--zon); background: var(--zon-licht); }
.tafel-knop[aria-pressed="true"] { background: var(--zee); border-color: var(--zee); color: #fff; }
.tafel-knop[aria-pressed="true"] small { color: #d7f0f5; }
.stappen-drie { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin: 16px 0; }
.stap-kaart {
  display: flex; flex-direction: column; gap: 4px; align-items: flex-start; text-align: left; padding: 14px; min-height: 130px;
  border-radius: var(--rond); border: 2px solid var(--lijn); background: #fff; box-shadow: 0 4px 0 var(--lijn); text-decoration: none; color: inherit; font: inherit;
}
.stap-kaart b { color: var(--zee-donker); font-size: 18px; }
.stap-kaart small { color: var(--inkt-zacht); }
.stap-nr { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--zon); color: #fff; font-weight: 800; }
.tafel-rij-lijst { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 6px 18px; }
.tafel-rij-lijst li { display: flex; gap: 10px; align-items: center; font-size: 20px; }
.tafel-rij-lijst li .klein { margin-left: auto; }

/* Uitleg */
.uitleg-blok h2 { margin: 0 0 6px; color: var(--zee-donker); }
.uitleg-bediening { display: flex; align-items: center; gap: 14px; margin: 10px 0; }
.uitleg-bediening .knop { min-width: 56px; font-size: 26px; }
.uitleg-som { font-size: 34px; font-weight: 800; color: var(--zee-donker); min-width: 6ch; text-align: center; font-variant-numeric: tabular-nums; }
.draai-houder { margin: 6px 0; overflow-x: auto; }
.uitleg-optel { font-weight: 700; color: var(--inkt-zacht); word-break: break-word; }
.toets-uitleg { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; }
.toets-uitleg li { background: var(--papier); border: 2px solid var(--lijn); border-radius: var(--rond); padding: 12px 14px; }
.toets-uitleg li p { margin: 0 0 6px; }
.toets-uitleg summary { cursor: pointer; font-weight: 700; color: var(--zee-donker); min-height: 32px; }

/* beheer: tafelinstellingen */
.tafel-inst { display: flex; flex-direction: column; gap: 10px; align-items: flex-start; }
.tafel-inst p { margin: 0; }
.tafelraster .cel { width: 26px; }

/* iPad staand en smaller */
@media (max-width: 1100px) {
  .tafel-speel { grid-template-columns: minmax(0, 1fr) 330px; }
}
@media (max-width: 860px) {
  .keuze-tegels { grid-template-columns: 1fr; }
  .tafel-held { grid-template-columns: 1fr; }
  .held-figuur { display: none; }
  .tafel-speel { grid-template-columns: 1fr; }
  .tafel-invoervak { position: static; }
  .cijferblok { gap: 12px; }
  .cijfer { min-height: 76px; }
  .tafel-som { font-size: 46px; }
  .bouw-rij { grid-template-columns: 1fr; }
  .reis-kaart { grid-template-columns: repeat(3, 1fr); }
  .stappen-drie { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px) {
  .keuze-titel { font-size: 28px; }
  .keuze-tegel { padding: 18px; min-height: 0; }
  .tafel-som { font-size: 38px; }
  .tafel-knoppen, .tafel-knoppen.uitdaging { grid-template-columns: repeat(3, 1fr); }
  .reis-kaart { grid-template-columns: 1fr 1fr; }
  .tafel-rij-lijst { grid-template-columns: 1fr; }
  .tk { width: 30px; height: 30px; font-size: 11px; }
}
#invoer.beantwoord { opacity: .45; pointer-events: none; transition: opacity .2s; }
/* vraag compact: stippen naast de som als er ruimte is, lege vakken weg */
.tafel-vraag { flex-direction: row; flex-wrap: wrap; align-items: center; column-gap: 22px; }
.tafel-vraag .vraag-labels, .tafel-vraag .verhaal, .tafel-vraag .vraag-zin { flex: 0 0 100%; margin: 0; }
.tafel-vraag .vraag-stippen { flex: 1 1 240px; width: auto; }
.tafel-vraag .vraag-stippen .vraag-tip { margin-top: 4px; }
.tafel-vraagvak > div:empty, .tafel-invoervak > div:empty { display: none; }

/* ============================================================ Studieavonturen: gezamenlijk overzicht */
/* Schriftblad (ruitjespapier met kantlijn): past bij elk schoolvak, zonder er één voor te trekken. */
.schrift {
  position: relative; overflow: hidden;
  padding: 26px 26px 26px 64px; margin-bottom: 20px;
  border-radius: 26px; border: 2px solid var(--lijn); box-shadow: var(--schaduw);
  background-color: #fffefa;
  background-image:
    linear-gradient(90deg, transparent 40px, rgba(217, 83, 79, .45) 40px, rgba(217, 83, 79, .45) 42px, transparent 42px),
    repeating-linear-gradient(0deg, rgba(15, 111, 134, .09) 0 1px, transparent 1px 22px),
    repeating-linear-gradient(90deg, rgba(15, 111, 134, .09) 0 1px, transparent 1px 22px);
}
.schrift-merk {
  display: inline-flex; align-items: center; gap: 6px; margin: 0 0 8px;
  padding: 4px 12px; border-radius: 999px; background: var(--zee); color: #fff; font-weight: 800; font-size: 15px; letter-spacing: .3px;
}
.schrift h1 { margin: 0 0 6px; font-size: 34px; line-height: 1.15; color: var(--zee-donker); }
.schrift-sub { margin: 0; color: var(--inkt-zacht); font-size: 18px; font-weight: 600; }
.keuze-tegels.een { grid-template-columns: minmax(0, 560px); }
.keuze-tegel { position: relative; overflow: hidden; padding-top: 30px; transition: transform .15s ease, box-shadow .15s ease; }
.keuze-tegel::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 10px; background: var(--zee); }
.keuze-tegel.tafels::before { background: var(--zon); }
.keuze-tegel:hover { transform: translateY(-3px); box-shadow: 0 9px 0 var(--lijn); }
.keuze-tekst { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; min-width: 0; }
.keuze-vak { font-size: 13px; font-weight: 800; letter-spacing: .5px; text-transform: uppercase; color: var(--zee); }
.keuze-tegel.tafels .keuze-vak { color: var(--zon-donker); }
.keuze-tegel p { font-size: 18px; color: var(--inkt); }
.keuze-stand { font-size: 15px; font-weight: 700; color: var(--inkt-zacht); }
.keuze-ga {
  margin-top: 12px; display: inline-flex; align-items: center; min-height: 48px; padding: 10px 18px;
  border-radius: 14px; background: var(--zee); color: #fff; font-weight: 800; box-shadow: 0 4px 0 var(--zee-donker);
}
.keuze-tegel.tafels .keuze-ga { background: var(--zon); box-shadow: 0 4px 0 var(--zon-donker); }
.terug-overzicht { margin: 0 0 12px; }
.terug-overzicht a {
  display: inline-flex; align-items: center; min-height: 44px; padding: 8px 14px; border-radius: 999px;
  background: var(--papier); border: 2px solid var(--lijn); color: var(--zee-donker); text-decoration: none; font-weight: 800;
}
.merk-regel { margin: 4px 0 0; font-weight: 800; color: var(--zee); }
@media (max-width: 560px) {
  .schrift { padding: 20px 16px 20px 54px; }
  .schrift h1 { font-size: 26px; }
}
