*{box-sizing:border-box}html,body{margin:0;min-height:100%;font-family:'Trebuchet MS',Arial,sans-serif;color:#294c57;background:#5ac0c8}button,input,select{font:inherit;color:inherit}button{border:0;border-radius:14px;min-height:48px;padding:10px 18px;background:#99d2d2;box-shadow:0 5px 0 #6badaf;font-weight:bold;cursor:pointer;touch-action:manipulation;transition:transform .15s,background .15s}button:active{transform:translateY(3px);box-shadow:0 2px 0 #6badaf}button:disabled{opacity:.45;cursor:default}button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible{outline:3px solid #294c57;outline-offset:4px}button:hover:not(:disabled){background:#b4dfdf}button.orange{background:#efac61;box-shadow:0 5px 0 #ce8646;color:#483b31}button.primary{background:#afd58d;box-shadow:0 5px 0 #84ad62}[hidden]{display:none!important}.stage{max-width:1920px;margin:auto;padding:14px;min-height:100dvh;display:flex;flex-direction:column;gap:14px}.board{flex:1;min-height:650px;border-radius:24px;background:#fffdf9;overflow:hidden;display:flex;flex-direction:column;position:relative}header{display:flex;align-items:center;justify-content:space-between;gap:15px;background:#fbf0df;padding:16px 28px;border-radius:0 0 50% 8%/0 0 10px 8px}.brand{display:flex;align-items:center;gap:12px}.brand svg{width:80px;height:64px}h1{font-size:clamp(25px,2.8vw,50px);color:#8c493f;margin:0}nav{display:flex;gap:12px}nav button{background:#fffdf9;min-width:52px;font-size:25px}nav span{font-size:17px}#work{flex:1;min-height:390px;padding:14px 28px 6px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:12px}h2{font-size:clamp(22px,2vw,34px);margin:4px 0 10px;text-align:center}p{line-height:1.5}.intro{margin:0;text-align:center;font-size:20px}.total,.node{border:4px solid #e4b777;border-radius:50%;background:#fbf0df;width:90px;height:90px;display:flex;justify-content:center;align-items:center;font-size:48px;font-weight:bold;flex-shrink:0}.total{box-shadow:0 5px 0 #ecd4ad}.bins{width:100%;display:flex;gap:20px;justify-content:center}.bin{flex:1;min-height:145px;border:3px dashed #99c5c6;border-radius:24px;padding:12px;background:#f0f8f6;display:flex;flex-wrap:wrap;align-content:center;justify-content:center;gap:6px;position:relative}.bin.middle{width:min(100%,1000px);flex:none;min-height:95px;background:#fffaf1;border-color:#e9c899}.bin h3{width:100%;text-align:center;font-size:22px;margin:0 0 4px}.bin.target{background:#e2f2ce;border-style:solid}.object{width:52px;height:55px;padding:2px;box-shadow:none;background:transparent;touch-action:none;border-radius:10px;flex-shrink:0}.object svg{width:100%;height:100%;pointer-events:none}.object.selected{outline:4px solid #ce8646;background:#ffedcf}.token-ten{width:72px;background:#99d2d2;font-size:25px;border:2px solid #6badaf}.tools{display:flex;justify-content:center;gap:10px;flex-wrap:wrap}.tools button{font-size:16px;min-height:44px}.equation{display:flex;align-items:center;justify-content:center;flex-wrap:wrap;gap:16px;font-size:clamp(32px,4vw,64px);font-weight:bold}.field{display:inline-flex;align-items:center;gap:6px}.field input{width:104px;height:85px;border:3px solid #99d2d2;border-radius:18px;background:white;text-align:center;font-size:48px;font-weight:bold;appearance:textfield}.field input::-webkit-inner-spin-button{appearance:none}.step{display:flex;flex-direction:column;gap:4px}.step button{min-height:32px;padding:0 9px;font-size:22px;border-radius:8px;box-shadow:none}.field.active input{border-color:#ce8646}.keypad{display:grid;grid-template-columns:repeat(6,60px);gap:9px;margin-top:10px}.keypad button{font-size:24px}.tree{display:flex;align-items:center;flex-direction:column;position:relative;gap:44px;margin:10px 0}.tree:before,.tree:after{content:'';position:absolute;top:97px;width:95px;height:4px;background:#85b56d;transform:rotate(30deg);left:50%}.tree:after{transform:rotate(-30deg);left:auto;right:50%}.branches{display:flex;gap:100px}.tree .field input{border-radius:50%;height:100px}.tree .node{width:100px;height:100px}.flower{position:relative;width:600px;max-width:100%;height:410px}.flower .total{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);background:#efcf79;z-index:1}.petal{position:absolute;left:var(--x);top:var(--y);transform:translate(-50%,-50%);border-radius:50%;background:#e8efdd;border:3px solid #b4cca2;padding:12px;display:flex;align-items:center;gap:5px;font-size:21px}.petal input{width:57px;height:48px;font-size:27px;border-radius:50%}.petal .step{display:none}.discovery{display:flex;gap:24px;align-items:start;justify-content:center;flex-wrap:wrap}.table-wrap{max-height:240px;overflow:auto;min-width:260px}table{border-collapse:collapse;width:100%;text-align:center;font-size:24px}th,td{padding:8px 22px;border-bottom:2px solid #d9e8e3}th{font-size:16px}.support{display:flex;gap:5px;flex-wrap:wrap;justify-content:center;max-width:650px;background:#f4f6e9;padding:12px;border-radius:16px}.support svg{width:28px;height:28px}.dot{width:15px;height:15px;border-radius:50%;background:#85b56d;display:inline-block}.ten{padding:8px;background:#99d2d2;border-radius:6px}#feedback{text-align:center;min-height:30px;margin:8px 14px;font-size:21px;font-weight:bold;color:#55734a}#feedback.warning{color:#996029}.actions{display:flex;justify-content:center;gap:14px;flex-wrap:wrap;padding:0 20px 12px}#progress{text-align:center;min-height:26px;font-size:16px;padding-bottom:8px}footer{display:flex;align-items:center;gap:20px}footer>span{margin-right:auto;font-size:18px}.credit{display:block;background:#fffdf9;box-shadow:0 5px 0 #3f9299;border-radius:14px;overflow:hidden;width:250px;height:60px}.credit img{width:100%;height:100%;object-fit:cover}footer button{background:#fffdf9;box-shadow:0 5px 0 #3f9299}#shade{position:fixed;inset:0;background:#294c5766;z-index:9}aside{position:fixed;right:0;top:0;bottom:0;width:420px;max-width:100%;background:#fffdf9;z-index:10;box-shadow:-10px 0 40px #294c5733;display:flex;flex-direction:column}.panel-heading{display:flex;justify-content:space-between;align-items:center;padding:20px;background:#fbf0df}.panel-heading h2{margin:0}#form{overflow:auto;padding:0 22px 20px;flex:1}fieldset{border:0;margin:0;padding:22px 0}legend{font-size:22px;font-weight:bold;padding-top:18px;color:#8c493f}label{display:flex;flex-direction:column;gap:7px;margin:14px 0;font-size:17px}select,input[type=number]{min-height:46px;border:2px solid #b7cece;border-radius:10px;padding:7px;background:white}label.check{flex-direction:row;align-items:center}input[type=checkbox]{width:24px;height:24px;accent-color:#3f9299}.mode-grid{display:grid;grid-template-columns:1fr 1fr;gap:10px}.mode-grid button{font-size:16px;text-align:left;padding:12px;min-height:75px}.mode-grid button[aria-pressed=true]{background:#afd58d;outline:3px solid #84ad62}.panel-actions{display:flex;gap:12px;flex-wrap:wrap;padding:16px 22px 22px;background:#fbf0df}.panel-actions button{flex:1}dialog{border:0;border-radius:24px;background:#fffdf9;max-width:600px;padding:30px;color:#294c57}dialog::backdrop{background:#294c5780}.success input{border-color:#84ad62}.invalid input{border-color:#df9d4d}.result{background:#f0f6e8;padding:20px 35px;border-radius:24px;text-align:center}.large-off .equation{font-size:36px}.large-off .field input{font-size:32px}.contrast{color:#102b35}.contrast .board{background:white}.contrast button{color:#102b35;border:2px solid #294c57}.no-animation *{transition:none!important;animation:none!important}.print-title{display:none}
@media(max-width:800px){header{flex-wrap:wrap;padding:12px}.brand svg{width:50px;height:45px}nav{gap:8px;flex-wrap:wrap}nav button{min-height:44px;font-size:22px;padding:6px 12px}nav span{display:none}.stage{padding:8px}.board{min-height:780px}#work{padding:12px}.actions{gap:10px}.actions button{font-size:16px}.bins{gap:10px}.bin{padding:6px}.object{width:42px;height:45px}.token-ten{width:60px}.equation{gap:8px}.field input{width:80px;height:70px;font-size:38px}.branches{gap:40px}.flower{height:440px}.petal{padding:8px;font-size:18px}.petal input{width:42px;font-size:23px}footer{flex-wrap:wrap;gap:10px}.credit{width:185px;height:44px}footer>span{display:none}footer button{margin-left:auto}.keypad{grid-template-columns:repeat(6,minmax(38px,48px));gap:7px}.keypad button{padding:8px}#feedback{font-size:18px}.tools{gap:8px}.tools button{padding:8px;font-size:14px}}
@media(max-width:450px){aside{width:100%}.flower{height:490px}.petal{font-size:16px;gap:2px}.petal input{width:36px;height:40px}.petal .field{gap:0}.flower .total{width:70px;height:70px;font-size:36px}.field input{width:70px}.step button{padding:0 6px}.equation{font-size:32px}.brand h1{font-size:29px}}
@media(prefers-reduced-motion:reduce){*{transition:none!important;animation:none!important}}
@media print{@page{size:A4 portrait;margin:15mm}body{background:white}.stage{padding:0;display:block}.board{min-height:0;border-radius:0;overflow:visible}header,footer,.actions,#progress,#feedback,.tools,.keypad,.support,aside,#shade,dialog,.step{display:none!important}#work{padding:10px;min-height:0}.print-title{display:block}.flower{max-width:100%;height:500px}.table-wrap{max-height:none;overflow:visible}button.object{box-shadow:none}input{border-color:#333!important}.bin{break-inside:avoid}}

/* Instellingen vormen het eerste scherm binnen de vertrouwde werkkaart. */
.setup #settings{position:static;inset:auto;width:100%;max-width:none;flex:1;box-shadow:none;z-index:auto;background:transparent}.setup .panel-heading{background:transparent;padding:24px 28px 8px;gap:16px}.setup .panel-heading h2{text-align:left;color:#8c493f}.setup .panel-heading p{margin:8px 0}.setup #form{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));align-items:start;gap:0 28px;overflow:visible;padding:0 28px 20px}.setup #form fieldset{min-width:0}.setup #form>p{grid-column:1/-1;margin-bottom:0}.setup .panel-actions{justify-content:flex-end;padding:20px 28px 26px}.setup .panel-actions button{flex:0 1 auto;min-width:200px}.setup nav [data-action="settings"],.setup nav [data-action="new"],.setup nav [data-action="undo"],.setup footer [data-action="settings"]{display:none}.setup #work,.setup #feedback,.setup #progress,.setup .actions{display:none!important}.setup #shade{display:none!important}
@media(max-width:1100px){.setup #form{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:650px){.setup #form{grid-template-columns:1fr;padding:0 18px 20px}.setup .panel-heading{padding:20px 18px 8px}.setup .panel-actions{padding:18px;flex-direction:column}.setup .panel-actions button{width:100%;min-width:0}.setup #form>p{grid-column:auto}}

/* Dezelfde vaste witte werkkaart en onderbalk als Sinterklaas tellen. */
@media screen{
body{min-height:100svh;display:flex;align-items:center;justify-content:center}.stage{width:min(100%,calc((var(--app-height,100dvh) - 120px)*1.9 + 16px));height:auto;min-height:0;margin:auto;padding:clamp(8px,1vw,20px);gap:14px}.board{flex:none;width:100%;min-height:0;aspect-ratio:1881/941;border-radius:1.28cqw;container-type:inline-size;background:#fffdf9}.board-content{position:absolute;left:0;top:0;width:1881px;height:941px;display:flex;flex-direction:column;transform:scale(var(--board-scale,1));transform-origin:top left}header{min-height:110px;padding:20px 38px;justify-content:center;flex-wrap:nowrap;flex-shrink:0}.brand svg{width:80px;height:64px}.brand h1{font-size:50px}#work{min-height:0;overflow:auto;padding:14px 48px 6px;gap:12px}#work h2{font-size:34px}.equation{font-size:64px}.field input{width:104px;height:85px;font-size:48px}.intro{font-size:24px}.flower{width:680px;height:410px;flex-shrink:0}.flower .total{width:90px;height:90px;font-size:48px}.petal{font-size:21px;padding:12px;gap:5px}.petal input{width:57px;height:48px;font-size:27px}.total,.node{width:90px;height:90px;font-size:48px}.branches{gap:100px}.bin{min-height:145px;padding:12px}.bins{gap:20px}.object{width:58px;height:60px}.tools button{font-size:20px;padding:10px 18px}.keypad{grid-template-columns:repeat(6,60px);gap:9px}.keypad button{padding:10px 18px}.actions{flex-shrink:0;padding:0 28px 14px;gap:14px}.actions button{font-size:23px;min-height:58px}#feedback{flex-shrink:0;font-size:24px;min-height:32px}#progress{flex-shrink:0;font-size:20px;min-height:32px}.table-wrap{flex-shrink:1}.support{flex-shrink:0}
.setup #settings{min-height:0;overflow:hidden}.setup .panel-heading{padding:18px 38px 8px;flex-shrink:0}.setup .panel-heading h2{font-size:34px}.setup .panel-heading p{font-size:22px}.setup #form{grid-template-columns:repeat(3,minmax(0,1fr));overflow-y:auto;min-height:0;gap:0 28px;padding:0 38px 20px;overscroll-behavior:contain}.setup #form legend{font-size:26px}.setup #form label{font-size:22px}.setup #form select,.setup #form input[type=number]{min-height:54px}.setup .mode-grid button{font-size:21px;min-height:82px}.setup .panel-actions{flex-shrink:0;flex-direction:row;padding:20px 38px 26px}.setup .panel-actions button{width:auto;font-size:24px;min-height:60px}.setup nav [data-action="settings"]{display:none}
footer{flex-shrink:0;display:flex;flex-wrap:nowrap;justify-content:flex-end;align-items:center;gap:clamp(8px,1.25vw,24px);padding-bottom:6px}.credit{width:clamp(185px,22vw,336px);height:clamp(44px,5.25vw,80px);margin-right:auto;flex-shrink:0;background:#fffdf9;box-shadow:0 5px 0 #3f9299;border-radius:14px}footer nav{display:flex;align-items:center;gap:clamp(8px,1.25vw,24px)}footer button{min-width:44px;min-height:44px;height:clamp(44px,5.25vw,80px);border-radius:14px;padding:0 clamp(12px,1.45vw,28px);font-size:clamp(16px,1.6vw,30px);background:#fffdf9;box-shadow:0 5px 0 #3f9299;margin:0}footer nav span{font-size:inherit}#sound,#fullscreen{width:clamp(44px,5.25vw,80px);flex-shrink:0;padding:clamp(10px,1vw,17px)}footer svg{width:100%;height:100%;display:block}footer svg path:not([fill]),.sound-waves{fill:none;stroke:currentColor;stroke-width:4;stroke-linecap:round;stroke-linejoin:round}.sound-muted,.contract{display:none}#sound[aria-pressed=false] .sound-waves{display:none}#sound[aria-pressed=false] .sound-muted{display:block}html:fullscreen .expand{display:none}html:fullscreen .contract{display:block}
@media(max-width:800px){footer{flex-wrap:wrap}.credit{margin-right:auto}footer nav{margin-left:auto;flex-wrap:wrap;justify-content:flex-end}footer nav span{display:none}footer button{padding:0 12px}}
@media(max-width:600px){.stage{width:100%;min-height:0;padding:8px}footer{gap:9px}.credit{width:185px;height:44px}footer nav{gap:9px}footer button,#sound,#fullscreen{height:44px;min-width:44px}footer nav{width:100%}}
}
@media print{.board-content{position:static;transform:none;width:auto;height:auto;display:block}}

.petal.correct{background:#afd58d!important;border-color:#84ad62}.petal.correct input,.success .field input{background:#e7f4d9;border-color:#84ad62}.success .node,.success .total{background:#afd58d;border-color:#84ad62}#confetti{position:absolute;inset:0;pointer-events:none;overflow:hidden;border-radius:24px;z-index:5}.confetti-piece{position:absolute;bottom:-20px;width:14px;height:25px;border-radius:3px;will-change:transform,opacity}@media print{#confetti{display:none!important}}

/* Vast totaal en twee selecteerbare cirkels met aansluitende takken. */
.tree{position:relative;width:400px;height:290px;flex-shrink:0;gap:0;display:block;margin:5px 0}.tree:before,.tree:after{display:none}.tree-lines{position:absolute;inset:0;width:400px;height:270px;pointer-events:none}.tree-lines path{fill:none;stroke:#85b56d;stroke-width:7;stroke-linecap:round}.tree .tree-total{position:absolute;left:150px;top:0;width:100px;height:100px;background:#fbf0df;border-color:#e4b777}.tree .branches{position:absolute;left:22px;right:22px;top:182px;display:flex;justify-content:space-between;gap:0}.tree .field{width:100px;height:100px}.tree .field input{width:100px;height:100px;border-radius:50%;padding:0;text-align:center;font-size:48px;cursor:pointer;background:#fffdf9}.tree .field.active input{border:5px solid #ce8646;box-shadow:0 0 0 7px #f8e3c9}.tree .field input:focus{outline:none}.tree .field input:focus-visible{outline:3px solid #294c57;outline-offset:10px}.success .tree .field input{background:#e7f4d9;border-color:#84ad62}.tree .field input::-webkit-inner-spin-button,.tree .field input::-webkit-outer-spin-button{appearance:none}

#settings-toggle{width:clamp(44px,5.25vw,80px);flex-shrink:0;padding:clamp(10px,1vw,17px)}#settings-toggle svg{width:100%;height:100%;display:block}.setup #settings-toggle{display:none}@media(max-width:600px){#settings-toggle{width:44px;height:44px}}

.credit{transition:transform .15s ease,box-shadow .15s ease,background-color .15s ease}@media(hover:hover) and (pointer:fine){.credit:hover{transform:translateY(-3px);box-shadow:0 8px 0 #3f9299}}.credit:active{transform:translateY(3px);box-shadow:0 2px 0 #3f9299}@media(prefers-reduced-motion:reduce){.credit{transition:none}}

.solution .field input,.solution .node{background:#e7f4d9;border-color:#84ad62}.solution .petal{background:#afd58d!important;border-color:#84ad62}#settings-toggle svg{overflow:visible}

.setup .mode-grid{grid-template-columns:1fr;gap:14px}.setup .mode-grid button{display:flex;align-items:center;gap:18px;min-height:94px;padding:10px 18px}.mode-icon{display:block;width:68px;height:64px;flex-shrink:0}.mode-grid button span{flex:1}

/* De vier blaadjes vormen samen één getekende bloem. */
.flower.illustrated{width:640px;height:440px;max-width:none;position:relative;flex-shrink:0}.flower-art{position:absolute;inset:0;width:640px;height:440px;pointer-events:none}.flower.illustrated .total{top:50%;left:50%;width:86px;height:86px;border:0;box-shadow:none;background:transparent;font-size:48px;color:#70572f;transform:translate(-50%,-50%)}.flower.illustrated .petal{width:190px;height:86px;justify-content:center;gap:10px;padding:0;border:0;border-radius:0;background:transparent!important;font-weight:bold;font-size:32px;z-index:2}.flower.illustrated .petal .field{gap:0}.flower.illustrated .petal input{width:72px;height:66px;min-height:0;font-size:36px;border:3px solid #fffdf9;border-radius:16px;background:#fffdf9;text-align:center;padding:4px;box-shadow:0 4px 0 #294c5720}.flower.illustrated .petal .field.active input{border-color:#ce8646;outline:3px solid #fffdf9;outline-offset:3px}.flower-lobe.correct path:first-child{fill:#afd58d}.flower.illustrated .petal.correct input{border-color:#84ad62;background:#e7f4d9}.mode-icon[viewBox="0 0 640 440"]{height:64px;width:68px;overflow:visible}

.tree .branches .tree-given{width:100px;height:100px;background:#fbf0df;border-color:#e4b777;font-size:48px}

.tree-error .tree .field.active input{background:#e77e73;border-color:#bd5c54;box-shadow:0 0 0 7px #f6d5cf;color:#612d29}

/* Goed leesbaar eindscherm op het digibord. */
.result{width:1200px;max-width:95%;padding:30px 50px;border-radius:32px;box-shadow:0 8px 0 #d8e6c8}.result h2,#work .result h2{font-size:60px;margin:0 0 18px;color:#55734a}.result p{font-size:32px;line-height:1.45;margin:16px 0}.result .tools{gap:24px;margin-top:26px}.result .tools button{font-size:30px;min-height:72px;padding:14px 30px}

@media(hover:hover) and (pointer:fine){button.orange:hover:not(:disabled){background:#f4ba79;box-shadow:0 8px 0 #ce8646}}.flower-lobe.incorrect path:first-child{fill:#e77e73}.flower.illustrated .petal.incorrect input{background:#fbe5df;border-color:#bd5c54}.flower.illustrated .petal.incorrect .field.active input{border-color:#bd5c54}

.input-error .field input{background:#e77e73;border-color:#bd5c54;box-shadow:0 0 0 5px #f6d5cf;color:#612d29}

.field input{font-size:56px}.tree .field input{font-size:56px}.flower.illustrated .petal input{font-size:44px;width:78px;height:72px}

/* Grotere splitsboom en één duidelijke vraag. */
#work.tree-work{gap:10px}.tree-question{font-size:40px;font-weight:bold;line-height:1.2;margin:0 0 8px}.tree{width:520px;height:377px;margin:0}.tree-lines{width:520px;height:351px}.tree .tree-total{left:195px;width:130px;height:130px;font-size:72px}.tree .branches{left:28.6px;right:28.6px;top:236.6px}.tree .field,.tree .field input,.tree .branches .tree-given{width:130px;height:130px}.tree .field input,.tree .branches .tree-given{font-size:72px}.tree-work .keypad{margin-top:0}

.keypad{grid-template-columns:repeat(11,64px);gap:10px}.keypad button{font-size:28px;padding:8px;min-height:52px}

/* De selectie blijft duidelijk zichtbaar tijdens gebruik van de getalknoppen. */
#work .field.active input{outline:6px solid #ce8646;outline-offset:5px;box-shadow:0 0 0 13px #f8e3c9}#work .field:not(.active) input{outline:none}
