.math-adventure{max-width:1000px;margin:24px auto;padding:28px;border:3px solid #173458;border-radius:24px;background:#fff;color:#173458;box-shadow:0 8px 0 #173458}.adventure-heading h2{font-size:clamp(26px,4vw,40px);line-height:1.2;margin:10px 0}.adventure-heading p,.adventure-setup p{font-size:16px;line-height:1.6}.adventure-scene{display:flex;align-items:center;justify-content:center;gap:22px;border:2px solid #173458;border-radius:20px;min-height:160px;padding:14px;background:#ffe5b2;overflow:hidden}.adventure-pond .adventure-scene{background:#bceffc}.adventure-lab .adventure-scene{background:#fff096}.adventure-scene img{width:120px;height:120px;object-fit:contain}.adventure-scene-label{font-size:20px;font-weight:800;text-align:center;max-width:270px}.adventure-setup{padding-top:20px}.adventure-setup label{display:grid;gap:8px;font-size:16px;font-weight:700;max-width:350px}.adventure-setup input,.array-controls select,.split-fields input{border:2px solid #173458;border-radius:12px;padding:12px;background:white;color:#173458;font-size:18px;min-width:0}.adventure-hud{display:flex;justify-content:space-between;gap:10px;font-size:18px;margin-top:20px}.adventure-meter{width:100%;height:18px;accent-color:#159c71;margin-top:10px}.adventure-question{font-size:24px;line-height:1.4}.adventure-work{padding:16px;background:#f0f7ff;border-radius:16px;overflow:auto}.adventure-options{display:flex;flex-wrap:wrap;gap:12px;justify-content:center}.adventure-options button{min-width:66px;min-height:54px;padding:12px 18px;border:2px solid #173458;border-radius:16px;background:#fff;color:#173458;font-size:20px;font-weight:800;cursor:pointer}.adventure-pond .adventure-options button{background:#d2f8cb;border-radius:50%;min-width:75px}.adventure-options button[aria-pressed=true]{background:#ffdb43;box-shadow:0 0 0 3px #173458}.adventure-options button:disabled{opacity:.75}.adventure-controls{display:flex;flex-wrap:wrap;gap:12px;margin-top:20px}.adventure-controls button{font-size:16px;min-height:48px}.adventure-feedback{min-height:70px;font-size:18px;line-height:1.6;background:#fff5d0;padding:16px;border-radius:14px}.array-controls{display:flex;gap:20px}.array-controls label{display:grid;gap:8px;font-weight:700;font-size:16px}.array-live{font-size:16px}.berry-array{display:grid;grid-template-columns:repeat(var(--cols),minmax(20px,1fr));gap:3px;width:max-content;max-width:none;margin:12px auto;padding:8px;border:2px dashed #688bb2;border-radius:12px}.berry-array span{display:flex;align-items:center;justify-content:center;width:24px;height:27px;font-size:20px;background:#ffe2d4;border-radius:4px}.berry-array .array-second{background:#bceafc}.array-view{max-height:320px;overflow:auto}.split-fields{display:flex;flex-wrap:wrap;gap:12px;margin-top:18px}.split-fields label{display:grid;gap:8px;flex:1;min-width:110px;font-size:16px;font-weight:800}.split-fields input{width:100%;box-sizing:border-box}.adventure-result{text-align:center;padding:22px}.adventure-result h3{font-size:28px}.adventure-result p{font-size:18px}.adventure-result .adventure-controls{justify-content:center}.adventure-trophy{font-size:72px}.adventure-yay .adventure-buddy{animation:adventure-hop .65s ease-in-out 2}.adventure-yay .adventure-friend{animation:adventure-wiggle .5s ease-in-out 2}.adventure-oops .adventure-friend{animation:adventure-roll .8s ease-out}.adventure-oops .adventure-buddy{animation:adventure-wiggle .25s ease-in-out 3}.math-adventure button:focus-visible,.math-adventure input:focus-visible,.math-adventure select:focus-visible{outline:3px solid #235dd5;outline-offset:4px}@keyframes adventure-hop{50%{transform:translateY(-18px) rotate(-12deg)}}@keyframes adventure-wiggle{25%{transform:rotate(-14deg) scale(1.08)}75%{transform:rotate(14deg)}}@keyframes adventure-roll{50%{transform:rotate(180deg)}100%{transform:rotate(360deg)}}@media(max-width:600px){.math-adventure{padding:16px;margin:16px 8px}.adventure-scene{gap:6px;min-height:110px;padding:8px}.adventure-scene img{width:74px;height:88px}.adventure-scene-label{font-size:16px}.adventure-question{font-size:21px}.adventure-hud{font-size:16px}.adventure-work{padding:10px}.berry-array span{width:20px;height:24px;font-size:17px}.berry-array{gap:2px;grid-template-columns:repeat(var(--cols),20px)}.adventure-feedback{font-size:16px}.adventure-result{padding:16px 0}.adventure-controls button{flex:1}.split-fields{flex-direction:column}}@media(prefers-reduced-motion:reduce){.math-adventure *{animation:none!important}}
