/* Basis: algemene opmaak, knoppen, kaarten, schermen en de sommen-speler */
:root{color-scheme:light;box-sizing:border-box;padding-top:env(safe-area-inset-top,0px);padding-bottom:env(safe-area-inset-bottom,0px)}
html{scroll-padding-top:env(safe-area-inset-top,0px)}
body{margin:0;padding:0;font:14px -apple-system,BlinkMacSystemFont,sans-serif;background:#faf9f5;color:#141413}
img{max-width:100%}
[hidden]:not([hidden=until-found i]){display:none!important}

:root {
  --bg: #FFF8EC;
  --card: #FFFFFF;
  --ink: #2B2350;
  --muted: #6E6890;
  --line: #ECE4D6;
  --primary: #6C4CF1;
  --primary-ink: #FFFFFF;
  --accent: #FFB800;
  --ok: #2BB673;
  --ok-bg: #E3F7EC;
  --bad: #FF5A5F;
  --bad-bg: #FFE8E8;
  --g3: #FF8A3D; --g4: #F2B000; --g5: #2BB673; --g6: #2D9CDB; --g7: #6C4CF1; --g8: #E94C89;
  --radius: 22px;
  --shadow: 0 4px 0 rgba(43, 35, 80, .08), 0 10px 24px rgba(43, 35, 80, .06);
  --font: ui-rounded, "SF Pro Rounded", "Nunito", "Varela Round", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color-scheme: light;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink); font-family: var(--font);
  font-size: 18px; line-height: 1.45; min-height: 100vh;
  -webkit-tap-highlight-color: transparent;
  padding-bottom: env(safe-area-inset-bottom);
}
a { color: var(--primary); }
h1 { font-size: 1.8rem; line-height: 1.15; margin: .4em 0 .5em; }
h2 { font-size: 1.25rem; margin: 1.2em 0 .5em; }
.emoji { font-family: "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", sans-serif; }
.emoji.huge { font-size: 4rem; line-height: 1; }

/* ---- bovenbalk ---- */
.top {
  position: sticky; top: 0; z-index: 10; display: flex; align-items: center; gap: 8px;
  padding: calc(8px + env(safe-area-inset-top)) 16px 8px; background: rgba(255, 248, 236, .92);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); border-bottom: 2px solid var(--line);
}
/* label op de testsite (zie IS_TEST in js/config.js) */
.test-label { font-size: .65rem; font-weight: 800; letter-spacing: .05em; color: #fff; background: #E94C89; border-radius: 6px; padding: 2px 6px; }
.logo { font-weight: 800; font-size: 1.25rem; color: var(--ink); text-decoration: none; display: flex; gap: 6px; align-items: center; }
.top-right { margin-left: auto; display: flex; gap: 6px; align-items: center; }
.stars-pill { background: #FFF1C2; border-radius: 99px; padding: 4px 12px; font-weight: 700; white-space: nowrap; }
.icon-btn {
  width: 42px; height: 42px; border-radius: 50%; border: 0; background: var(--card); box-shadow: var(--shadow);
  font-size: 1.2rem; display: inline-grid; place-items: center; cursor: pointer; text-decoration: none; color: var(--ink);
}
.icon-btn[hidden] { display: none; }

main { max-width: 860px; margin: 0 auto; padding: 8px 16px 48px; outline: none; }

/* ---- algemene elementen ---- */
.card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; border: 0; cursor: pointer;
  border-radius: 16px; padding: 12px 20px; font: inherit; font-weight: 700; color: var(--ink); background: #EFEAFD;
  text-decoration: none; box-shadow: 0 4px 0 rgba(43, 35, 80, .12); transition: transform .08s, box-shadow .08s;
  min-height: 48px; touch-action: manipulation;
}
.btn:active { transform: translateY(3px); box-shadow: 0 1px 0 rgba(43, 35, 80, .12); }
.btn:focus-visible, .key:focus-visible, a:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.btn.primary { background: var(--primary); color: var(--primary-ink); box-shadow: 0 4px 0 #4A2FC4; }
.btn.accent { background: var(--accent); color: var(--ink); box-shadow: 0 4px 0 #C78F00; }
.btn.danger { background: var(--bad-bg); color: #B3261E; }
.btn.big { font-size: 1.15rem; padding: 14px 24px; min-height: 58px; }
.row { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; margin-top: 16px; }
.row.sticky { position: sticky; bottom: 12px; }
.crumb { font-size: .95rem; margin-top: 8px; }
.foot { text-align: center; color: var(--muted); margin-top: 32px; font-size: .95rem; }

/* ---- home ---- */
.hero { display: flex; gap: 16px; align-items: center; margin: 12px 0 18px; }
.hero h1 { margin: 0; }
.hero p { margin: 4px 0 0; color: var(--muted); }
.avatar { font-size: 3.2rem; width: 84px; height: 84px; border-radius: 50%; background: var(--card); box-shadow: var(--shadow); display: grid; place-items: center; flex: none; }
.tiles { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.tile {
  display: flex; flex-direction: column; gap: 2px; padding: 20px; border-radius: var(--radius); color: #fff;
  text-decoration: none; box-shadow: var(--shadow); min-height: 140px; transition: transform .1s;
}
.tile:active { transform: scale(.97); }
.tile .emoji { font-size: 2.4rem; }
.tile b { font-size: 1.2rem; margin-top: auto; }
.tile small { opacity: .92; }
.tile:first-child { grid-column: span 2; }
.t1 { background: linear-gradient(135deg, #6C4CF1, #8F6BFF); }
.t2 { background: linear-gradient(135deg, #FF5A5F, #FF8A6A); }
.t3 { background: linear-gradient(135deg, #2D9CDB, #56C2F0); }
.t4 { background: linear-gradient(135deg, #F29E00, #FFC233); color: var(--ink); }
.t5 { background: linear-gradient(135deg, #2BB673, #5AD69A); }
.install { display: flex; gap: 12px; align-items: center; margin-top: 18px; flex-wrap: wrap; }
.install .emoji { font-size: 2rem; }
.install div { flex: 1; min-width: 180px; display: flex; flex-direction: column; }
.install small { color: var(--muted); }

/* ---- groepen & onderwerpen ---- */
.tabs { display: flex; gap: 8px; overflow-x: auto; padding: 4px 2px 10px; scrollbar-width: none; }
.tab { flex: none; padding: 8px 14px; border-radius: 99px; background: var(--card); text-decoration: none; color: var(--ink); font-weight: 700; box-shadow: var(--shadow); border: 3px solid transparent; }
.tab.on { color: #fff; }
.g3 { --g: var(--g3); } .g4 { --g: var(--g4); } .g5 { --g: var(--g5); } .g6 { --g: var(--g6); } .g7 { --g: var(--g7); } .g8 { --g: var(--g8); }
.tab.on { background: var(--g); }
.tab:not(.on) { border-color: var(--g); }
.topics { display: grid; gap: 12px; }
.topic {
  display: flex; align-items: center; gap: 14px; background: var(--card); border-radius: var(--radius); padding: 14px 18px;
  text-decoration: none; color: var(--ink); box-shadow: var(--shadow); border-left: 8px solid var(--g);
}
.topic .emoji { font-size: 2rem; width: 52px; height: 52px; display: grid; place-items: center; border-radius: 14px; background: color-mix(in srgb, var(--g) 14%, white); flex: none; }
.topic .tt { flex: 1; display: flex; flex-direction: column; }
.topic small { color: var(--muted); }
.topic .st, .prog .st { color: var(--accent); font-size: 1.2rem; letter-spacing: 1px; white-space: nowrap; }
.topic.big { background: color-mix(in srgb, var(--g) 10%, white); }

/* ---- uitleg ---- */
.uitleg { border-top: 8px solid var(--g, var(--primary)); margin-bottom: 16px; }
.uitleg h2 { margin-top: 0; }
.uitleg ul, .uitleg ol { padding-left: 1.3em; }
.uitleg li { margin: .25em 0; }
.voorbeeld { background: #F5F1FF; border-radius: 14px; padding: 10px 14px; margin: 10px 0; font-size: 1.1rem; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.voorbeeld .pie { width: 70px; height: 70px; }
.voorbeeldsom { text-align: center; margin-bottom: 16px; }
.voorbeeldsom h2 { margin-top: 0; font-size: 1rem; color: var(--muted); }
.vt { border-collapse: collapse; margin: 8px 0; font-size: 1.05rem; }
.vt th, .vt td { border: 2px solid var(--line); padding: 6px 12px; text-align: center; }
.vt th { background: #FAF6EE; text-align: left; }

/* ---- breuken ---- */
.frac { display: inline-flex; flex-direction: column; vertical-align: middle; text-align: center; line-height: 1.05; margin: 0 .12em; font-size: .9em; }
.frac > span:first-child { border-bottom: 2px solid currentColor; padding: 0 .15em; }

/* ---- oefenen / toets ---- */
.ex { display: flex; flex-direction: column; gap: 12px; padding-top: 8px; }
.ex-head { display: flex; justify-content: space-between; gap: 8px; align-items: baseline; }
.ex-title { font-size: 1rem; }
.count { color: var(--muted); font-weight: 700; white-space: nowrap; }
.progress { height: 14px; background: #EDE6D8; border-radius: 99px; overflow: hidden; }
.bar { height: 100%; width: 0; background: linear-gradient(90deg, var(--accent), #FF8A3D); border-radius: 99px; transition: width .3s; }
.qcard { text-align: center; padding: 24px 16px; }
.qcard.small { padding: 12px; }
.q { font-size: 1.9rem; font-weight: 800; line-height: 1.3; }
.q.big { font-size: 2.8rem; }
.q b { color: var(--primary); }
.qarea .q:not(:only-child) { margin-bottom: 12px; }
.qarea .q { font-size: clamp(1.25rem, 4.5vw, 1.9rem); }
.feedback { min-height: 1.5em; text-align: center; font-weight: 700; font-size: 1.15rem; border-radius: 16px; }
.feedback.ok { color: var(--ok); }
.feedback.bad { color: #C2272D; background: var(--bad-bg); padding: 12px; }
.feedback .hint { color: var(--ink); font-weight: 500; font-size: 1rem; margin-top: 6px; }
.feedback .btn { margin-top: 10px; }
.display-wrap { display: flex; align-items: center; justify-content: center; gap: 10px; }
.display {
  min-width: 180px; max-width: 100%; min-height: 72px; padding: 8px 20px; border-radius: 18px; background: var(--card);
  border: 3px solid var(--primary); font-size: 2.4rem; font-weight: 800; text-align: center; display: flex; align-items: center; justify-content: center;
}
.display .ph { color: #CFC7E8; }
.unit { font-size: 1.6rem; font-weight: 800; color: var(--muted); }
.pad { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; max-width: 420px; margin: 12px auto 0; width: 100%; }
.key {
  font: inherit; font-size: 1.7rem; font-weight: 800; border: 0; border-radius: 16px; background: var(--card); color: var(--ink);
  height: 64px; box-shadow: 0 4px 0 rgba(43, 35, 80, .12); cursor: pointer; touch-action: manipulation;
}
.key:active { transform: translateY(3px); box-shadow: 0 1px 0 rgba(43, 35, 80, .12); }
.key.del { background: #FFE9D6; }
.key.ok { grid-column: span 3; background: var(--ok); color: #fff; box-shadow: 0 4px 0 #1E8A56; font-size: 1.4rem; }
.choices { display: grid; grid-template-columns: 1fr; gap: 12px; max-width: 560px; margin: 0 auto; width: 100%; }
.choices.four { grid-template-columns: 1fr 1fr; }
.choices.three { grid-template-columns: repeat(3, 1fr); margin-top: 16px; }
.choice { font-size: 1.4rem; min-height: 72px; background: var(--card); }
.choice.sym { font-size: 2.4rem; }
.choice.ok { background: var(--ok); color: #fff; }
.choice.bad { background: var(--bad); color: #fff; }
.choice.picked { background: var(--primary); color: #fff; }
.choice:disabled { opacity: .8; }
.shake { animation: shake .35s; }
@keyframes shake { 20%, 60% { transform: translateX(-8px); } 40%, 80% { transform: translateX(8px); } }

/* ---- plaatjes ---- */
.dots { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; max-width: 330px; margin: 0 auto; }
.dots i { width: 24px; height: 24px; border-radius: 50%; display: block; }
.dots .d1 { background: var(--bad); }
.dots .d2 { background: var(--g6); }
.dots .dx { background: #E5DFD3; position: relative; }
.dots .dx::after { content: "✕"; position: absolute; inset: 0; display: grid; place-items: center; font-size: 15px; color: #A39A8A; font-style: normal; }
.split { display: inline-flex; flex-direction: column; align-items: center; margin: 4px auto; font-weight: 800; font-size: 1.6rem; }
.split .roof { width: 152px; height: 62px; background: var(--bad); clip-path: polygon(50% 0, 100% 100%, 0 100%); color: #fff; display: flex; align-items: flex-end; justify-content: center; padding-bottom: 4px; }
.split .rooms { display: grid; grid-template-columns: 1fr 1fr; width: 152px; border: 4px solid var(--ink); border-top: 0; }
.split .rooms div { padding: 8px; text-align: center; background: #fff; }
.split .rooms div + div { border-left: 4px solid var(--ink); }
.clock { width: min(220px, 60vw); height: auto; display: block; margin: 0 auto; }
.clock .face { fill: #fff; stroke: var(--ink); stroke-width: 3; }
.clock .tick { stroke: #B9B2CF; stroke-width: 1; }
.clock .tick.big { stroke: var(--ink); stroke-width: 2; }
.clock .num { font-size: 9px; font-weight: 800; text-anchor: middle; fill: var(--ink); font-family: var(--font); }
.clock .hand { stroke-linecap: round; }
.clock .hand.hour { stroke: var(--bad); stroke-width: 5; }
.clock .hand.min { stroke: var(--primary); stroke-width: 3; }
.clock .pin { fill: var(--ink); }
.pie { width: min(180px, 50vw); height: auto; display: block; margin: 0 auto; }
.pie path { stroke: var(--ink); stroke-width: 2; stroke-linejoin: round; }
.pie .on { fill: var(--accent); }
.pie .off { fill: #fff; }
.shapes { width: min(300px, 80vw); height: auto; display: block; margin: 0 auto; }
.shapes .shape { fill: color-mix(in srgb, var(--g6) 25%, white); stroke: var(--g6); stroke-width: 3; }
.shapes .corner { fill: none; stroke: var(--g6); stroke-width: 2; }
.shapes .lbl { font-size: 14px; font-weight: 800; text-anchor: middle; fill: var(--ink); font-family: var(--font); }

/* ---- resultaat ---- */
.result { text-align: center; margin-top: 16px; }
.bigscore { font-size: 3rem; font-weight: 900; margin: 0; color: var(--primary); }
.bigscore small { font-size: 1rem; color: var(--muted); font-weight: 600; }
.cijfer { font-size: 1.2rem; }
.cijfer b { color: var(--primary); }
.review { list-style: none; padding: 0; text-align: left; display: grid; gap: 10px; }
.review li { background: #FAF6EE; border-radius: 14px; padding: 12px 14px; display: flex; flex-direction: column; gap: 4px; }
.review .rq { font-weight: 700; }
.review s { color: var(--bad); }
.review b { color: var(--ok); }
.review small { color: var(--muted); }
.review .rvis svg, .review .rvis .dots { width: 120px; max-width: 120px; margin: 0; }
.review .rvis .split { transform: scale(.7); transform-origin: left top; margin-bottom: -30px; }

/* ---- spelletjes ---- */
.games { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; }
.game {
  position: relative; display: flex; flex-direction: column; gap: 4px; padding: 20px; border-radius: var(--radius);
  background: var(--card); color: var(--ink); text-decoration: none; box-shadow: var(--shadow); border-top: 8px solid var(--c);
}
.game .emoji { font-size: 2.6rem; }
.game b { font-size: 1.2rem; }
.game small { color: var(--muted); }
.badge { position: absolute; top: 12px; right: 12px; background: #FFF1C2; border-radius: 99px; padding: 2px 10px; font-size: .85rem; font-weight: 700; }
.game-intro { text-align: center; margin-top: 16px; }
.game-intro p { max-width: 460px; margin: 8px auto 16px; }
.tafelkeuze { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; max-width: 460px; margin: 0 auto; }
.tafelkeuze .btn { font-size: 1.4rem; min-height: 60px; }
.tafelkeuze .wide { grid-column: 1 / -1; }
.hud { display: flex; justify-content: space-between; gap: 12px; margin: 8px 0 12px; }
.hud div { background: var(--card); border-radius: 16px; padding: 6px 16px; box-shadow: var(--shadow); display: flex; flex-direction: column; align-items: center; min-width: 96px; }
.hud small { color: var(--muted); font-size: .8rem; }
.hud b { font-size: 1.4rem; }
.sky {
  position: relative; height: min(62vh, 560px); margin-top: 12px; border-radius: var(--radius); overflow: hidden;
  background: linear-gradient(#BEE7FF, #E9F7FF 70%, #D7F2D0); touch-action: none; user-select: none; -webkit-user-select: none;
}
.balloon {
  position: absolute; top: 0; width: 76px; height: 92px; border: 0; padding: 0; cursor: pointer; will-change: transform;
  background: radial-gradient(circle at 32% 28%, rgba(255, 255, 255, .55) 0 12%, transparent 13%), var(--c);
  border-radius: 50% 50% 48% 48% / 56% 56% 44% 44%; color: #fff; font: inherit; font-size: 1.35rem; font-weight: 900;
  text-shadow: 0 2px 2px rgba(0, 0, 0, .25); touch-action: none;
}
.balloon::after { content: ""; position: absolute; left: 50%; top: 100%; width: 2px; height: 40px; background: rgba(43, 35, 80, .35); }
.balloon.pop { animation: pop .25s forwards; }
.balloon.wrong { filter: grayscale(.6) brightness(.9); }
@keyframes pop { to { scale: 1.6; opacity: 0; } }
.memory { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; perspective: 800px; max-width: 520px; margin: 0 auto; }
.mcard { position: relative; aspect-ratio: 3 / 4; border: 0; padding: 0; background: none; cursor: pointer; transform-style: preserve-3d; transition: transform .35s; font: inherit; }
.mcard span { position: absolute; inset: 0; border-radius: 16px; display: grid; place-items: center; backface-visibility: hidden; -webkit-backface-visibility: hidden; box-shadow: var(--shadow); font-weight: 800; padding: 4px; }
.mcard .back { background: linear-gradient(135deg, var(--primary), #8F6BFF); color: #fff; font-size: 2rem; }
.mcard .front { background: var(--card); transform: rotateY(180deg); font-size: clamp(.95rem, 3.6vw, 1.5rem); color: var(--ink); }
.mcard.a .front { background: #FFF6D9; }
.mcard.flip, .mcard.done { transform: rotateY(180deg); }
.mcard.done .front { background: var(--ok-bg); outline: 3px solid var(--ok); }
.vergelijk { display: grid; grid-template-columns: 1fr auto 1fr; gap: 10px; align-items: stretch; }
.side { display: grid; place-items: center; font-size: clamp(1.3rem, 5vw, 2rem); font-weight: 800; text-align: center; min-height: 110px; padding: 10px; }
.side.mid { min-width: 90px; font-size: 2.2rem; background: #F5F1FF; }
.side.mid small { font-size: .9rem; color: var(--muted); }
.side.ok { background: var(--ok-bg); }
.side.bad { background: var(--bad-bg); }
.nline { position: relative; height: 120px; margin: 28px 20px 0; touch-action: none; cursor: crosshair; }
.nline .track { position: absolute; left: 0; right: 0; top: 60px; height: 8px; background: var(--ink); border-radius: 99px; }
.nline .tick { position: absolute; top: 48px; width: 4px; height: 32px; margin-left: -2px; background: var(--ink); border-radius: 2px; }
.nline .tick:not(.end) { height: 20px; top: 54px; background: #9D96B8; }
.nline .tick span { position: absolute; top: 38px; left: 50%; transform: translateX(-50%); font-weight: 800; white-space: nowrap; }
.nline .marker { position: absolute; transform: translateX(-50%); font-size: 1.8rem; line-height: 1; pointer-events: none; }
.nline .marker.guess { top: 20px; color: var(--primary); }
.nline .marker.real { top: 72px; }
.nline .marker[hidden] { display: none; }

/* ---- voortgang ---- */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.stat { text-align: center; padding: 14px 8px; display: flex; flex-direction: column; }
.stat b { font-size: 1.5rem; }
.stat small { color: var(--muted); }
.badges { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.bdg { text-align: center; padding: 14px 10px; display: flex; flex-direction: column; gap: 2px; opacity: .55; filter: grayscale(1); }
.bdg.on { opacity: 1; filter: none; }
.bdg .emoji { font-size: 2rem; }
.bdg small { color: var(--muted); font-size: .8rem; }
.prog { margin-bottom: 10px; border-left: 8px solid var(--g); padding: 14px 18px; }
.prog summary { font-weight: 800; cursor: pointer; font-size: 1.1rem; }
.prog ul { list-style: none; padding: 0; margin: 10px 0 0; }
.prog li { display: grid; grid-template-columns: 1fr auto auto; gap: 12px; padding: 8px 0; border-top: 1px solid var(--line); align-items: center; }
.prog li a { color: var(--ink); text-decoration: none; }
.hist { width: 100%; border-collapse: collapse; font-size: .95rem; }
.hist th, .hist td { text-align: left; padding: 8px 6px; border-bottom: 1px solid var(--line); }
.hist th { color: var(--muted); font-weight: 700; }

/* ---- profiel ---- */
.profile { max-width: 560px; margin: 16px auto; text-align: center; }
.profile form { display: grid; gap: 18px; text-align: left; margin-top: 16px; }
.profile label { font-weight: 700; display: grid; gap: 6px; }
.profile input[name=name] { font: inherit; font-size: 1.3rem; padding: 12px 16px; border-radius: 14px; border: 3px solid var(--line); background: #fff; color: var(--ink); }
.profile input[name=name]:focus { border-color: var(--primary); outline: none; }
.profile fieldset { border: 0; padding: 0; margin: 0; }
.profile legend { font-weight: 700; margin-bottom: 8px; }
.grp, .av { display: flex; flex-wrap: wrap; gap: 8px; }
.grp label, .av label { display: block; }
.grp input, .av input { position: absolute; opacity: 0; pointer-events: none; }
.grp span, .av span { display: grid; place-items: center; width: 56px; height: 56px; border-radius: 16px; background: #fff; border: 3px solid var(--line); font-size: 1.5rem; font-weight: 800; cursor: pointer; }
.grp label span { border-color: var(--g); color: var(--g); }
.grp input:checked + span { background: var(--g); color: #fff; }
.av input:checked + span { border-color: var(--primary); background: #F0EBFF; transform: scale(1.08); }
.grp input:focus-visible + span, .av input:focus-visible + span { outline: 3px solid var(--accent); outline-offset: 2px; }
.profile hr { border: 0; border-top: 2px solid var(--line); margin: 24px 0 16px; }

.confetti { position: fixed; inset: 0; pointer-events: none; z-index: 100; }

@media (max-width: 520px) {
  body { font-size: 17px; }
  h1 { font-size: 1.5rem; }
  .tile { min-height: 120px; padding: 16px; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .key { height: 58px; }
  .logo { font-size: 1.05rem; }
  .hud div { min-width: 0; flex: 1; }
  .tafelkeuze { gap: 8px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ======================= v2: menu, categorieën, methodes ======================= */
.small { font-size: .9rem; }
.muted { color: var(--muted); }
.center { text-align: center; }
.note { background: #FFF1C2; border-radius: 14px; padding: 10px 14px; }
.recent { text-align: center; color: var(--muted); margin-top: 16px; }
.link { background: none; border: 0; color: var(--primary); font: inherit; font-weight: 700; cursor: pointer; padding: 4px 0; text-decoration: underline; }
.btn.small { min-height: 40px; padding: 8px 14px; font-size: .95rem; }
.row.left { justify-content: flex-start; }
.tab:not([class*=" g"]) { border-color: var(--ink); }
.tab.on:not([class*=" g"]) { background: var(--ink); }

.domains { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; margin-top: 6px; }
.domain { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 14px; border-top: 8px solid var(--dc); }
.domain h2 { margin: 0 0 10px; font-size: 1.1rem; }
.d-automatiseren { --dc: #FF5A5F; } .d-getallen { --dc: #2D9CDB; } .d-meten { --dc: #2BB673; } .d-verhoudingen { --dc: #6C4CF1; } .d-verbanden { --dc: #F29E00; }
.cats { display: grid; gap: 8px; }
.catcard { display: flex; gap: 10px; align-items: center; padding: 10px 12px; border-radius: 14px; background: color-mix(in srgb, var(--dc) 9%, white); color: var(--ink); text-decoration: none; }
.catcard:active { transform: scale(.98); }
.catcard .emoji { font-size: 1.6rem; }
.catcard .tt { flex: 1; display: flex; flex-direction: column; gap: 5px; }
.clockbadge { font-size: 1rem; opacity: .7; }
.mbar { display: flex; height: 7px; background: #EDE6D8; border-radius: 99px; overflow: hidden; min-width: 60px; }
.mbar i { display: block; background: var(--ok); }
.mbar i.b { background: var(--accent); }
.mbar.small { width: 80px; flex: none; }

details.uitleg > summary { font-weight: 800; font-size: 1.15rem; cursor: pointer; }
details.uitleg[open] > summary { margin-bottom: 8px; }
.subs { display: grid; gap: 12px; margin-bottom: 90px; }
.sub { border: 0; margin: 0; padding: 14px 16px; }
.sub legend { float: left; width: 100%; padding: 0; margin-bottom: 4px; font-size: 1.1rem; }
.sub legend small { color: var(--muted); font-weight: 600; font-size: .8rem; margin-left: 6px; }
.subtools { clear: both; display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 4px; }
.exrow { display: grid; grid-template-columns: auto 1fr auto auto; gap: 10px; align-items: center; padding: 9px 4px; border-top: 1px solid var(--line); cursor: pointer; }
.exrow input { width: 24px; height: 24px; accent-color: var(--primary); }
.exname { font-weight: 600; }
.exex { color: var(--muted); font-size: .85rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 38vw; }
.mi { font-size: .9rem; }
.mi.m { color: var(--ok); } .mi.b { color: var(--accent); }
.actionbar {
  position: fixed; left: 12px; right: 12px; margin: 0 auto; width: fit-content; bottom: calc(10px + env(safe-area-inset-bottom)); z-index: 5;
  display: flex; gap: 8px; align-items: center; background: var(--ink); color: #fff; padding: 8px 8px 8px 16px; border-radius: 99px;
  box-shadow: 0 8px 24px rgba(0,0,0,.25); max-width: calc(100% - 24px); flex-wrap: wrap; justify-content: center;
}
.actionbar #selcount { font-weight: 700; margin-right: 4px; }
.actionbar .btn { min-height: 44px; padding: 8px 14px; }
.actionbar .btn:disabled { opacity: .45; }
.actionbar .btn:not(.primary):not(.accent) { background: #fff; }

.methods { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; }
.method { position: relative; display: flex; flex-direction: column; gap: 3px; padding: 18px; border-radius: var(--radius); background: var(--card); color: var(--ink); text-decoration: none; box-shadow: var(--shadow); border-left: 8px solid var(--c); }
.method .emoji { font-size: 2rem; }
.method small { color: var(--muted); }
.blokken { display: grid; gap: 10px; }
.blok > summary { display: flex; gap: 10px; align-items: center; cursor: pointer; font-size: 1.1rem; }
.blok > summary b { flex: 1; }
.blok > summary small { color: var(--muted); }
.items { list-style: none; padding: 0; margin: 10px 0; }
.items li { display: flex; justify-content: space-between; gap: 8px; padding: 8px 2px; border-top: 1px solid var(--line); }
.items a { color: var(--ink); font-weight: 600; text-decoration: none; }
.items a::before { content: "▶ "; color: var(--primary); font-size: .8em; }

/* ======================= v2: vraag-widgets ======================= */
.vis { margin-top: 10px; overflow-x: auto; }
:where(.vis) svg { max-width: min(100%, 420px); height: auto; }
:where(.choice) svg { max-width: 140px; height: auto; }
.bar.low { background: var(--bad); }
.blank {
  display: inline-flex; align-items: center; justify-content: center; min-width: 64px; height: 50px; margin: 2px 3px; vertical-align: middle;
  border-radius: 12px; border: 3px dashed #BDB3DE; background: #fff; font: inherit; font-size: 1.4rem; font-weight: 800; color: var(--ink); cursor: pointer; padding: 0 8px;
}
.blank.act { border: 3px solid var(--primary); background: #F2EEFF; }
.blank.good { border: 3px solid var(--ok); background: var(--ok-bg); }
.order-ans { min-height: 64px; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; justify-content: center; padding: 10px; border-radius: 16px; border: 3px dashed #CFC7E8; background: #fff; }
.order-pool { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-top: 12px; min-height: 56px; }
.chip { font: inherit; font-size: 1.3rem; font-weight: 800; border: 0; border-radius: 14px; padding: 10px 16px; background: var(--card); box-shadow: 0 4px 0 rgba(43,35,80,.12); cursor: pointer; color: var(--ink); }
.chip.on { background: #F2EEFF; }
.lt { font-weight: 900; color: var(--muted); }
.ph { color: #A79FC4; font-weight: 600; }
.q-line { margin: 24px 24px 8px; }
.clockset { display: flex; gap: 16px; align-items: center; justify-content: center; flex-wrap: wrap; }
.clock.big { width: min(240px, 64vw); }
.clock.small { width: 120px; }
.cs-ctrl { display: grid; gap: 12px; }
.cs-ctrl div { display: grid; grid-template-columns: auto 64px 64px; gap: 8px; align-items: center; }
.cs-ctrl small { font-weight: 700; color: var(--muted); min-width: 92px; }
.extra { margin-top: 8px; }
.countbox { min-height: 120px; background: #fff; border-radius: 18px; border: 3px dashed #CFC7E8; padding: 12px; display: grid; place-items: center; }
.paybox { background: #fff; border-radius: 18px; border: 3px dashed #CFC7E8; padding: 10px; min-height: 96px; }
.paybox small { color: var(--muted); font-weight: 700; }
.pb-wallet { margin-top: 12px; justify-content: center; }
.cgrid { display: grid; grid-template-columns: repeat(var(--cols), 1fr); gap: 0; max-width: 520px; margin: 0 auto; border: 3px solid var(--ink); border-radius: 8px; overflow: hidden; }
.cell { aspect-ratio: 1; min-height: 32px; border: 0; border-right: 2px solid var(--ink); border-bottom: 2px solid var(--ink); background: #fff; cursor: pointer; padding: 0; }
.cell.on { background: var(--accent); }
.key.sp { grid-column: span 4; height: 48px; font-size: 1.1rem; }

/* ======================= v2: generieke plaatjes ======================= */
.plaatjes { display: grid; grid-template-columns: repeat(min(var(--per), 10), auto); gap: 4px 6px; justify-content: center; font-size: 1.9rem; line-height: 1.1; }
.plaatjes .p5 { margin-right: 10px; }
.digital { display: inline-block; font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 2.6rem; font-weight: 800; background: #1F1B3A; color: #7CFFB2; padding: 8px 18px; border-radius: 14px; letter-spacing: 2px; box-shadow: inset 0 0 0 4px #3A3466; }
.strip { width: min(320px, 90%); height: auto; }
.strip rect { stroke: var(--ink); stroke-width: 2; }
.strip .on { fill: var(--accent); } .strip .off { fill: #fff; }
.nlsvg { width: min(340px, 100%); height: auto; }
.nlsvg .axis { stroke: var(--ink); stroke-width: 3; }
.nlsvg .tk { stroke: var(--ink); stroke-width: 2; }
.nlsvg .lb { font-size: 12px; font-weight: 800; text-anchor: middle; fill: var(--ink); font-family: var(--font); }
.nlsvg .arrow { fill: var(--bad); }
.money { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: center; }
.coin, .bill { font: inherit; font-weight: 800; border: 0; display: inline-grid; place-items: center; cursor: default; color: #3D2E00; }
button.coin, button.bill { cursor: pointer; box-shadow: 0 3px 0 rgba(0,0,0,.18); }
button.coin:active, button.bill:active { transform: translateY(2px); }
.coin { border-radius: 50%; width: 50px; height: 50px; font-size: .85rem; background: radial-gradient(circle at 35% 30%, #FFF2B0, #E2B23C); box-shadow: inset 0 0 0 3px #C99A2E; }
.coin.m5, .coin.m1, .coin.m2 { background: radial-gradient(circle at 35% 30%, #FFD3B0, #C8733C); box-shadow: inset 0 0 0 3px #A85A2A; width: 42px; height: 42px; }
.coin.m100, .coin.m200 { background: radial-gradient(circle at 50% 50%, #F5D36B 0 45%, #C9CED6 47%); box-shadow: inset 0 0 0 3px #9AA0AA; width: 56px; height: 56px; }
.bill { border-radius: 6px; width: 78px; height: 44px; font-size: 1rem; color: #fff; text-shadow: 0 1px 1px rgba(0,0,0,.3); }
.bill.m500 { background: #8E9AA6; } .bill.m1000 { background: #D9534F; } .bill.m2000 { background: #3E7CC1; } .bill.m5000 { background: #E08A2E; }
.bill.m10000 { background: #3FA36B; } .bill.m20000 { background: #D4A72C; } .bill.m50000 { background: #8A5FB8; }
.tbl { border-collapse: collapse; margin: 8px auto; font-size: 1rem; background: #fff; }
.tbl th, .tbl td { border: 2px solid var(--line); padding: 6px 10px; text-align: center; }
.tbl th { background: #F5F1FF; }
@media (max-width: 520px) {
  .exex { display: none; }
  .exrow { grid-template-columns: auto 1fr auto; }
  .blank { min-width: 52px; height: 44px; font-size: 1.2rem; }
  .actionbar { padding: 6px; gap: 6px; flex-wrap: nowrap; }
  .actionbar #selcount { display: none; }
  .actionbar .btn { padding: 8px 10px; font-size: .95rem; white-space: nowrap; }
}
