:root{--ink:#173f49;--muted:#52747a;--teal:#087d89;--cream:#fffaf0;--coral:#e66550;--water:#39bdd0;--shadow:0 14px 40px #235c4c0d;font-family:ui-rounded,'SF Pro Rounded','Avenir Next','Trebuchet MS',sans-serif;color:var(--ink);background:#edf7f3;font-synthesis:none;color-scheme:light}
*{box-sizing:border-box}body{margin:0;background:radial-gradient(ellipse at 1% 95%,#d5efe3,transparent 45%),radial-gradient(ellipse at 100% 5%,#fff7de,transparent 40%),#edf7f3;min-height:100svh}button,input{font:inherit}button{cursor:pointer;touch-action:manipulation;-webkit-tap-highlight-color:transparent;user-select:none}button:focus-visible,[tabindex]:focus-visible,input:focus-visible{outline:3px solid #c45a17;outline-offset:4px}button:disabled{cursor:default;opacity:.6}button{transition:background .15s,transform .15s}button:active:not(:disabled){transform:translateY(2px)}button svg{width:24px;height:24px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}button[hidden],[hidden]{display:none!important}.app-shell{max-width:1280px;margin:auto;padding:22px 40px 12px}.topbar{display:flex;justify-content:space-between;align-items:center;gap:20px;margin-bottom:26px}.brand{display:flex;align-items:center;gap:13px}h1{font-size:24px;letter-spacing:-.8px;margin:0;font-weight:850}h1 span{color:var(--teal)}.brand p{font-size:12px;margin:4px 0 0;color:var(--muted);letter-spacing:.2px}.utilities{display:flex;gap:10px}.icon-button{display:inline-flex;align-items:center;justify-content:center;width:46px;height:46px;border:1px solid #ccdfd7;background:#ffffffb3;border-radius:15px;color:var(--ink)}.icon-button:hover{background:white}main{display:grid;grid-template-columns:minmax(0,1.32fr) minmax(340px,1fr);gap:30px;align-items:start}.pool-heading{display:flex;justify-content:space-between;align-items:center;padding:0 16px}.eyebrow{font-size:10px;font-weight:850;letter-spacing:1.7px;color:var(--teal)}.pool-heading h2{font-size:24px;letter-spacing:-.5px;margin:4px 0 0}.total-badge{display:flex;align-items:center;gap:7px;padding:10px 14px;border-radius:30px;background:#fffaf0;border:1px solid #e8dfc8;font-size:14px}.total-badge strong{font-size:20px}.total-badge>span{color:#647b7b}.total-badge svg{width:21px;height:21px;fill:#ffcf70;stroke:#c08a25;stroke-width:1.2}.pool-art{width:100%;height:min(65svh,620px);min-height:380px;display:flex;align-items:center;justify-content:center;margin-top:3px;overflow:visible}.pool-art>svg{height:100%;width:100%;overflow:visible}.pool-bottom{display:flex;align-items:center;gap:8px;margin:2px 15px 0;font-size:12px}.pool-bottom p{margin:0;flex:1;color:var(--muted)}.small-wave{font-size:26px;color:var(--teal)}.pace-tag{background:#d7ece4;border-radius:20px;padding:7px 11px;font-size:10px;font-weight:800;white-space:nowrap}.challenge{background:#fffdf8;border:1px solid #e3e8d9;border-radius:28px;padding:25px 27px 17px;box-shadow:var(--shadow)}.lane-heading{display:flex;align-items:center;gap:11px}.lane-badge{display:flex;align-items:center;justify-content:center;width:42px;height:46px;background:#e4f1eb;border-radius:14px;font-size:25px;font-weight:850;color:var(--teal)}.lane-heading h2{font-size:19px;letter-spacing:-.5px;margin:3px 0 0}.lane-symbol{margin-left:auto;color:#dfa952;font-size:27px}.steps{display:flex;gap:7px;margin:17px 0 22px}.step{height:7px;background:#e5ece5;border-radius:10px;flex:1}.step.done{background:var(--teal)}.step.current{background:#a4d7cc}.instruction{text-align:center;font-size:12px;color:var(--muted);margin:0 0 13px}.equation{display:flex;justify-content:center;align-items:center;gap:17px;font-weight:850;font-size:clamp(38px,4.5vw,57px);line-height:1.2;letter-spacing:-2px;font-variant-numeric:tabular-nums}.operator{font-size:.73em;font-weight:600;color:var(--teal)}.answer{margin:14px auto 0;display:flex;justify-content:center;align-items:center;min-width:130px;width:56%;height:65px;border:2px solid #b3d9cf;background:#eff7f2;border-radius:16px;font-size:38px;font-weight:800;letter-spacing:2px;font-variant-numeric:tabular-nums;color:var(--teal)}.answer.has-value{background:white;border-color:var(--teal);color:var(--ink)}.answer-cursor{height:28px;border-right:2px solid #7eafa7;margin-left:3px}.has-value .answer-cursor{display:none}.feedback{text-align:center;min-height:37px;padding-top:11px;font-size:12px;line-height:1.5;font-weight:600}.feedback.success{color:#087568}.hint-toggle{display:block;margin:3px auto 16px;background:transparent;border:0;color:#6d5a37;font-size:12px;min-height:44px;padding:6px 12px}.hint-toggle>span{color:#a96d13;font-size:21px;vertical-align:-2px;margin-right:5px}.hint{padding:14px;background:#fff4d8;border-radius:16px;margin-bottom:16px;font-size:13px;color:#65522c;line-height:1.5}.hint p{margin:0 0 10px}.hint p:last-child{margin:8px 0 0}.dot-row{display:flex;align-items:center;flex-wrap:wrap;gap:5px}.dot{display:inline-block;width:12px;height:12px;border-radius:50%;background:var(--teal);flex:0 0 12px}.dot.alt{background:#bc6033}.dot.removed{background:#d7cab4;position:relative}.dot.removed:after{content:'';position:absolute;left:0;right:0;top:5px;border-top:2px solid #745a49;transform:rotate(-45deg)}.dot-group{display:flex;gap:4px;flex-wrap:wrap;max-width:98px;padding:7px;border:1px solid #d9c9a2;border-radius:10px;background:#fffaf0}.hint-symbol{font-size:21px;margin:0 4px}.keypad{display:grid;grid-template-columns:repeat(3,1fr);gap:8px}.keypad button{height:52px;background:#f1f5ef;border:1px solid #dfe6da;border-bottom:3px solid #d6e1d6;border-radius:12px;font-size:25px;font-weight:750;color:var(--ink)}.keypad button:hover{background:#e2eee6}.keypad .key-action{font-size:12px;color:var(--muted);background:#f8f6ee}.key-action svg{vertical-align:middle}.primary-button{display:flex;align-items:center;justify-content:center;gap:20px;width:100%;min-height:53px;border:0;border-bottom:4px solid #046570;border-radius:14px;background:var(--teal);color:white;font-size:16px;font-weight:800;margin-top:12px}.primary-button:hover{background:#076e79}.primary-button>span{font-size:23px}.reassurance{text-align:center;font-size:10px;color:var(--muted);margin:12px 0 0}footer{display:flex;justify-content:space-between;gap:20px;color:#5d7a76;font-size:10px;padding-top:22px}dialog{border:1px solid #d5e3d9;border-radius:29px;background:var(--cream);color:var(--ink);padding:32px;max-width:440px;width:calc(100% - 32px);box-shadow:0 24px 100px #143c4d33;max-height:90svh;overflow:auto}dialog::backdrop{background:#153f499c;backdrop-filter:blur(5px)}dialog h2{font-size:29px;letter-spacing:-1px;line-height:1.12;margin:10px 0 15px}dialog p{font-size:14px;line-height:1.6}dialog .eyebrow{font-size:10px}#celebration{text-align:center;padding:28px 34px 34px}.celebration-art{position:relative;height:139px;width:170px;margin:auto}.medal-ribbon{position:absolute;background:linear-gradient(90deg,#e36c58 48%,#f48c73 49%);width:66px;height:85px;top:4px;left:52px;clip-path:polygon(0 0,100% 0,75% 100%,25% 100%)}.medal{position:absolute;bottom:4px;left:39px;width:94px;height:94px;border-radius:50%;border:6px solid #e4b04d;background:#ffdc80;box-shadow:0 5px 0 #c28b34,inset 0 0 0 3px #fff0b1;font-size:52px;line-height:80px;color:#ac752c}.sparkle{position:absolute;color:#d7a140;font-size:29px}.sparkle.one{top:39px;left:0}.sparkle.two{bottom:8px;right:0}.close-dialog{float:right;margin:-12px -12px 8px 15px;font-size:27px}.secondary-button{display:block;width:100%;min-height:48px;border:1px solid #c9d9cd;background:transparent;border-radius:13px;color:var(--ink);font-weight:750;font-size:14px;margin-top:13px}fieldset{border:0;padding:0;margin:24px 0 16px}legend{font-size:12px;font-weight:750;margin-bottom:10px}.mode-option{display:flex;gap:13px;border:1px solid #d7e3d5;border-radius:14px;padding:14px;margin-bottom:9px;cursor:pointer;align-items:center}.mode-option input{accent-color:var(--teal);width:21px;height:21px}.mode-option strong{display:block;font-size:14px}.mode-option small{display:block;font-size:11px;line-height:1.5;margin-top:3px;color:var(--muted)}dialog .settings-note,dialog .privacy-note{font-size:11px;color:var(--muted)}dialog .privacy-note{border-top:1px solid #dbe4d4;padding-top:17px;margin-top:20px}.confetti{position:fixed;inset:0;pointer-events:none;overflow:hidden;z-index:20}.confetti i{position:absolute;top:-20px;width:10px;height:16px;border-radius:3px;animation:fall 2.8s ease-in forwards}#swimmer{transition:transform .7s cubic-bezier(.45,0,.2,1)}.swimmer-orientation{transition:transform .4s}.swim-arm{transform-box:fill-box;transform-origin:50% 85%;animation:stroke 1.8s ease-in-out infinite alternate}.swim-arm.right{animation-delay:-1.8s}.swim-leg{transform-box:fill-box;transform-origin:center top;animation:kick .65s ease-in-out infinite alternate}.swim-leg.right{animation-delay:-.65s}.ripples{animation:ripple 2.3s ease-in-out infinite}.water-shimmer{animation:shimmer 8s ease-in-out infinite alternate}.lane-marker{fill:#fff9e9;stroke:#d8d4bf;stroke-width:1.5}.lane-number{fill:#77958d;font-size:22px;font-weight:850;text-anchor:middle;dominant-baseline:middle}.lane-active .lane-marker{fill:var(--teal);stroke:var(--teal)}.lane-active .lane-number{fill:white}.lane-finished .lane-marker{fill:#ffe0a1;stroke:#e0b966}.lane-finished .lane-number{fill:#725629}.lane-glow{opacity:0;transition:opacity .5s}.lane-active .lane-glow{opacity:1}@keyframes stroke{from{transform:rotate(-14deg)}to{transform:rotate(15deg)}}@keyframes kick{to{transform:rotate(12deg)}}@keyframes ripple{50%{opacity:.45}}@keyframes shimmer{to{transform:translate(6px,-10px);opacity:.45}}@keyframes fall{to{transform:translateY(110vh) rotate(620deg)}}
@media(min-width:1250px){.challenge{padding:28px 34px 20px}.keypad button{height:57px}.pool-art{height:min(68svh,650px)}}
@media(max-width:1050px) and (min-width:900px){.app-shell{padding:20px 24px 12px}main{gap:20px;grid-template-columns:minmax(0,1.15fr) minmax(330px,1fr)}.challenge{padding:20px}.topbar{margin-bottom:20px}.pool-art{height:580px;min-height:0}.steps{margin:14px 0 18px}.keypad button{height:49px}}
@media(max-width:899px){.app-shell{max-width:820px;padding:18px 28px 16px}.topbar{margin-bottom:16px}main{grid-template-columns:1fr;gap:17px}.pool-heading{padding:0 20px}.pool-heading h2{font-size:21px}.pool-art{height:390px;min-height:0;margin:0}.pool-bottom{max-width:600px;width:100%;margin:0 auto}.challenge{display:grid;grid-template-columns:1fr 1fr;gap:28px;padding:22px 25px}.keypad button{height:53px}.lane-heading h2{font-size:18px}.steps{margin:16px 0 22px}.equation{font-size:48px}.instruction{font-size:11px}.answer{height:59px}.hint-toggle{margin-bottom:0}.hint{margin-top:8px}.reassurance{margin-bottom:0}footer{padding-top:17px}.pool-art svg{max-width:500px}.pool-heading{max-width:610px;width:100%;margin:auto}}
@media(max-width:540px){.app-shell{padding:16px 16px 14px}.topbar{gap:8px;margin-bottom:20px}.brand{gap:9px}.brand img{width:40px;height:40px}h1{font-size:18px;letter-spacing:-.6px}.brand p{font-size:9px}.utilities{gap:5px}.icon-button{width:44px;height:44px;border-radius:13px}.pool-heading{padding:0 8px}.pool-heading h2{font-size:21px}.total-badge{padding:7px 10px;font-size:11px}.total-badge strong{font-size:17px}.pool-art{height:350px;margin:-3px 0}.pool-bottom{margin-top:-3px;font-size:10px;gap:5px}.pace-tag{font-size:9px}.challenge{display:block;padding:21px;border-radius:23px}.lane-heading h2{font-size:20px}.steps{margin-bottom:18px}.equation{font-size:51px}.answer{height:61px;margin-top:13px}.hint-toggle{margin-bottom:12px}.keypad{gap:9px}.keypad button{height:54px}.primary-button{min-height:56px}.reassurance{font-size:11px}footer{font-size:9px;line-height:1.5;gap:10px}footer>span:last-child{max-width:90px;text-align:right}}
@media(max-height:820px) and (min-width:900px){.app-shell{padding-top:14px}.topbar{margin-bottom:15px}.pool-art{height:510px}.challenge{padding:18px 24px 14px}.steps{margin:12px 0 15px}.equation{font-size:43px}.answer{height:54px;margin-top:10px}.hint-toggle{margin:0 auto 9px}.keypad button{height:45px}.feedback{min-height:32px}.primary-button{min-height:48px}.reassurance{margin-top:9px}footer{padding-top:13px}}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{animation:none!important;transition:none!important;scroll-behavior:auto!important}.confetti{display:none}}
