@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Fredoka:wght@400;500;600&display=swap');
:root{font-family:'DM Sans',sans-serif;color:#193e42;background:#f5f8f7;font-synthesis:none;--ink:#193e42;--green:#267663;--gold:#ffce54;--line:#d4dfdc;--muted:#506967}*{box-sizing:border-box}body{margin:0}button,input,a{touch-action:manipulation}button,input{font:inherit}button,a{ -webkit-tap-highlight-color:transparent}button{cursor:pointer}button:disabled{cursor:not-allowed}button:focus-visible,a:focus-visible,input:focus-visible{outline:3px solid #197cc0;outline-offset:4px}header{min-height:88px;padding:18px 4%;display:flex;align-items:center;justify-content:space-between;gap:20px;border-bottom:1px solid var(--line);background:white}.hub{text-decoration:none;color:var(--ink);font-size:14px;font-weight:700}.hub span{margin-right:9px}.brand{font-weight:800;font-size:19px;letter-spacing:2px}.brand span{font-weight:400}.tools{display:flex;gap:8px}.quiet{border:1px solid var(--line);border-radius:10px;padding:11px 14px;background:white;color:var(--ink);font-size:14px;font-weight:600}.quiet:hover{background:#eaf2ef}main{max-width:1500px;margin:auto;padding:35px 4% 24px;min-height:calc(100svh - 140px)}h1,h2,h3,p{margin-top:0}h1,h2,h3{font-family:'Fredoka',sans-serif;font-weight:500}h1{font-size:clamp(38px,4vw,60px);line-height:1.05;letter-spacing:-1px;margin-bottom:12px}h2{font-size:32px}.eyebrow{font-size:13px;font-weight:800;letter-spacing:2px;color:var(--green);margin-bottom:13px}.intro{display:flex;justify-content:space-between;gap:20px;align-items:center;margin-bottom:25px}.intro p{color:var(--muted);margin:0;font-size:16px}.tag{padding:10px 14px;background:#e6efe9;border-radius:30px;font-size:14px;font-weight:700;white-space:nowrap}.menu-layout{display:grid;grid-template-columns:minmax(0,1.15fr) minmax(350px,1fr);gap:30px}.hero-scene{position:relative;min-height:380px;border:1px solid #c7dfdf;border-radius:24px;overflow:hidden;background:#eaf5f8;display:flex;align-items:center;justify-content:center}.hero-scene img{width:100%;display:block}.scene-label{position:absolute;top:20px;left:20px;background:white;border-radius:10px;padding:10px 14px;font-size:14px;font-weight:700;box-shadow:0 3px 0 #193e4210}.scene-caption{position:absolute;bottom:18px;left:18px;right:18px;text-align:center;background:#ffffffed;padding:12px;border-radius:12px;color:var(--muted);font-size:14px}.select-panel{background:white;border:1px solid var(--line);border-radius:24px;padding:26px}.panel-title{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:20px}.panel-title h2{font-size:25px;margin:0}.small{font-size:14px;color:var(--muted)}.levels{display:grid;grid-template-columns:repeat(4,1fr);gap:10px}.level{min-height:78px;border:1px solid var(--line);border-radius:12px;background:white;color:var(--ink);display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px;font-size:25px;font-family:'Fredoka',sans-serif}.level small{font-family:'DM Sans',sans-serif;font-size:12px}.level:disabled{background:#f0f3f2;color:#657873;border-color:#e4eae7}.level.selected{background:var(--ink);border-color:var(--ink);color:white;box-shadow:0 4px 0 #102c30}.level.completed:not(.selected){background:#e6f4ec;border-color:#a3c8b6}.mode-row{display:flex;align-items:center;justify-content:space-between;gap:10px;border-top:1px solid var(--line);margin-top:23px;padding:18px 0}.mode-row label{display:flex;gap:9px;align-items:center;font-weight:700;font-size:14px}.mode-row input{width:19px;height:19px;accent-color:var(--green)}.mode-row span{font-size:13px;color:var(--muted)}.primary{background:var(--gold);color:#243b36;border:1px solid #e2ad32;border-radius:12px;padding:16px 22px;font-weight:800;box-shadow:0 4px 0 #deb145;font-size:17px}.primary:hover{background:#ffda79}.wide{width:100%}.selection-info{font-size:14px;color:var(--muted);margin:15px 0 0;text-align:center;min-height:20px}.how{display:flex;gap:24px;margin-top:24px;padding:0 5px;font-size:14px;color:var(--muted)}.how b{color:var(--ink);margin-right:6px}.game-heading{display:flex;justify-content:space-between;align-items:center;gap:16px;margin-bottom:22px}.game-heading h1{font-size:32px;margin:0}.game-heading p{margin:6px 0 0;color:var(--muted);font-size:14px}.game-layout{display:grid;grid-template-columns:minmax(0,1fr) 330px;gap:24px}.build-panel{border:1px solid #c7dfdf;background:#eaf5f8;border-radius:24px;overflow:hidden;position:relative;display:flex;flex-direction:column;justify-content:center;min-height:470px}.build-panel canvas{width:100%;height:auto;display:block;aspect-ratio:3/2}.build-top{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:20px 24px;font-size:14px}.build-bottom{padding:18px 24px;background:white;margin-top:auto}.progress-label{display:flex;justify-content:space-between;margin-bottom:10px;font-size:14px;font-weight:700}progress{height:12px;width:100%;appearance:none;border:0;border-radius:20px;overflow:hidden;background:#e3ede9}progress::-webkit-progress-bar{background:#e3ede9}progress::-webkit-progress-value{background:var(--green);border-radius:20px}progress::-moz-progress-bar{background:var(--green)}.question-panel{background:white;border:1px solid var(--line);border-radius:24px;padding:24px;display:flex;flex-direction:column}.timer{display:flex;justify-content:space-between;align-items:center;border-bottom:1px solid var(--line);padding-bottom:18px;margin-bottom:22px;font-size:14px}.timer strong{font-variant-numeric:tabular-nums;font-family:'Fredoka',sans-serif;font-size:32px;font-weight:500}.timer.urgent{color:#b5412e}.question-count{font-size:13px;text-transform:uppercase;letter-spacing:1.5px;font-weight:700;color:var(--muted);margin-bottom:12px}.equation{font-family:'Fredoka',sans-serif;font-size:48px;white-space:nowrap;margin-bottom:22px;font-weight:500}.answer-label{display:block;font-size:14px;margin-bottom:8px}#answer{width:100%;height:63px;border:2px solid #8ea8a0;border-radius:12px;text-align:center;font-size:30px;font-weight:600;color:var(--ink);background:#fafcfb}#answer[aria-invalid=true]{border-color:#b5412e}.feedback{min-height:49px;padding:12px 0 6px;font-size:14px;line-height:1.5;margin:0;color:var(--green);font-weight:600}.feedback.error{color:#a13627}.keypad{display:grid;grid-template-columns:repeat(3,1fr);gap:7px;margin-bottom:16px}.keypad button{height:41px;border:1px solid var(--line);border-radius:8px;background:#f4f7f6;color:var(--ink);font-weight:700;font-size:18px}.keypad button:hover{background:#e2ece8}.keypad .small-key{font-size:13px}.keyboard-hint{margin:13px 0 0;font-size:12px;color:var(--muted);text-align:center}.result{margin:auto;max-width:1050px;display:grid;grid-template-columns:1.1fr 1fr;align-items:center;gap:35px;background:white;border:1px solid var(--line);border-radius:24px;padding:32px}.result img{width:100%;border-radius:18px}.result h1{font-size:52px;color:var(--green)}.result p{line-height:1.6;color:var(--muted)}.result-actions{display:flex;flex-direction:column;gap:12px}.stats{display:flex;gap:24px;margin:22px 0}.stats strong{font-family:'Fredoka',sans-serif;font-size:28px;display:block;color:var(--ink)}.result canvas{width:100%;aspect-ratio:3/2}.skip{position:fixed;left:10px;top:-100px;background:white;padding:12px;z-index:20}.skip:focus{top:10px}footer{display:flex;justify-content:space-between;gap:18px;padding:15px 4% 20px;color:var(--muted);font-size:12px}dialog{max-width:420px;border:1px solid var(--line);border-radius:18px;padding:28px;color:var(--ink)}dialog::backdrop{background:#12333780}dialog p{line-height:1.6}dialog .result-actions{margin-top:22px}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}@media(min-width:1500px){main{padding-top:45px}.hero-scene{min-height:460px}}@media(max-width:950px){header{padding:15px 3%}.brand{display:none}.menu-layout{grid-template-columns:1fr 1fr;gap:20px}.select-panel{padding:20px}.hero-scene{min-height:330px}.game-layout{grid-template-columns:minmax(0,1fr) 290px;gap:15px}.question-panel{padding:18px}.build-panel{min-height:400px}.how{gap:14px}.equation{font-size:42px}}@media(max-width:700px){header{min-height:72px;gap:7px}.hub{font-size:12px}.hub span{margin-right:3px}.quiet{padding:10px 8px;font-size:12px}.tools{gap:5px}main{padding:24px 4% 18px}.intro{align-items:flex-start}.intro p{font-size:14px}.tag{font-size:12px;padding:8px 10px}.menu-layout{grid-template-columns:1fr}.hero-scene{min-height:0;max-height:250px}.hero-scene img{max-height:250px;object-fit:contain}.scene-caption{display:none}.scene-label{font-size:12px;top:12px;left:12px}.select-panel{padding:20px}.level{min-height:67px}.how{flex-wrap:wrap;gap:12px;margin-top:18px}.game-layout{grid-template-columns:1fr}.game-heading h1{font-size:27px}.build-panel{min-height:0}.build-panel canvas{max-height:230px;object-fit:contain}.build-top{padding:13px 16px}.build-bottom{padding:13px 16px}.question-panel{padding:20px}.timer{padding-bottom:12px;margin-bottom:15px}.equation{font-size:42px;margin-bottom:15px}.question-panel form{display:grid;grid-template-columns:1fr 1fr;gap:0 16px}.question-panel form .answer-group{grid-column:1}.question-panel form .keypad{grid-column:2;grid-row:1/4;margin-bottom:0}.question-panel form .primary{grid-column:1;margin-bottom:4px;padding:12px 10px;font-size:14px}.feedback{min-height:59px}.keyboard-hint{display:none}.keypad button{height:42px}.result{grid-template-columns:1fr;padding:24px;gap:20px}.result img,.result canvas{max-height:240px;object-fit:contain}.result h1{font-size:42px}footer{flex-direction:column;gap:6px;font-size:12px}}@media(prefers-reduced-motion:no-preference){button{transition:background .15s,transform .15s}button:active:not(:disabled){transform:translateY(2px)}}
header{position:sticky;top:0;z-index:10}.hero-scene{background:#c5edfc}
@media(max-width:700px){.hero-scene{height:210px;max-height:210px}.hero-scene img{height:210px;width:100%;object-fit:contain}.game-heading{margin-bottom:12px}.game-heading p{font-size:13px}.build-panel canvas{height:150px;max-height:150px}.build-top{padding:10px 16px}.build-bottom{padding:10px 16px}.question-panel{padding:16px}.timer{margin-bottom:10px;padding-bottom:9px}.timer strong{font-size:28px}.equation{font-size:36px;margin-bottom:12px}.question-count{margin-bottom:8px}.game-layout{gap:12px}main{padding-top:20px}.keypad button{height:44px}}
