:root{font-family:ui-rounded,"Avenir Next","Trebuchet MS",system-ui,sans-serif;color:#fff8e9;--navy:#171936;--ink:#222b53;--gold:#ffd273;--coral:#f4847d;--lavender:#ae96fa}*{box-sizing:border-box;-webkit-tap-highlight-color:transparent}html,body{margin:0;min-height:100%;overflow-x:hidden}body{background:#171936 url('/assets/images/math/observatory.webp') center/cover fixed no-repeat}button{font:inherit;cursor:pointer;touch-action:manipulation}button:focus-visible,a:focus-visible{outline:3px solid #ffe39a;outline-offset:3px}a{text-decoration:none;color:inherit}[hidden]{display:none!important}.math-shell{width:100%;min-height:100dvh;display:flex;flex-direction:column;align-items:center;padding:10px 12px 12px;background:linear-gradient(#10153028,#1015302b)}.math-nav{width:min(100%,790px);min-height:46px;display:grid;grid-template-columns:1fr auto 1fr;align-items:center;gap:8px}.math-home,.math-lang{justify-self:start;padding:8px 12px;border:1px solid #d8ccff69;border-radius:12px;background:#17183dbd;box-shadow:0 3px 0 #0b0c27;color:#fff5df;font-size:12px;font-weight:900}.math-home:hover,.math-lang:hover{background:#373472}.math-lang{justify-self:end}.math-brand{font-weight:1000;letter-spacing:-.04em;font-size:18px;color:#fff8ed;text-shadow:0 2px 6px #080a22}.math-brand strong{color:#ffcb7a}.math-cabinet{position:relative;width:min(100%,730px);margin:6px auto 0;padding:12px 19px 16px;border:3px solid #af8ce1;border-bottom-color:#6c65ba;border-radius:28px;background:linear-gradient(155deg,#292c63ee,#1c214de9 52%,#222554f0);box-shadow:0 8px 0 #111431,0 21px 55px #06091cbd,inset 0 2px 0 #f0d8ff72;overflow:hidden}.math-cabinet:before{content:"";position:absolute;inset:0;pointer-events:none;background:radial-gradient(circle at 50% -50%,#b17aff65,transparent 54%)}.math-cabinet>*{position:relative}.math-cabinet-head{height:64px;display:flex;align-items:center;gap:8px;border-bottom:1px solid #c8b7f75c}.math-head-owl{width:54px;height:58px;object-fit:contain;object-position:center bottom;filter:drop-shadow(0 5px 6px #080c24a5)}.math-heading{flex:1;min-width:0}.math-heading span{display:block;font-size:10px;font-weight:1000;letter-spacing:.19em;text-transform:uppercase;color:#f9c682}.math-heading h1{margin:1px 0 0;font-size:clamp(21px,3.7vw,30px);line-height:1.08;letter-spacing:-.04em;color:#fffaf1;text-shadow:0 2px #171939}.math-help{width:35px;height:35px;border:2px solid #fce1a2;border-radius:12px;background:#f6c56b;color:#53345d;box-shadow:0 3px 0 #a96e5a;font-size:20px;font-weight:1000}.math-hud{display:grid;grid-template-columns:repeat(3,minmax(0,1fr)) 83px;align-items:center;gap:8px;margin:10px 0 9px}.math-hud-item{min-width:0;display:flex;flex-direction:column;justify-content:center;align-items:center;height:65px;border:1px solid #ac96e178;border-radius:15px;background:#171b42ad;box-shadow:inset 0 2px 0 #b5a6ef1d;text-align:center}.math-hud-item small{color:#d2c5f6;font-size:10px;font-weight:950;letter-spacing:.09em}.math-hud-item strong{font-size:27px;line-height:1.1;font-variant-numeric:tabular-nums;color:#fff6de;text-shadow:0 2px #0d1230}.math-clock{width:76px;height:76px;display:grid;place-items:center;border-radius:50%;padding:6px;margin:auto;background:conic-gradient(#ffc675 var(--clock,100%),#353a6c 0);box-shadow:0 0 0 2px #e5bc80,0 4px 12px #090c27}.math-clock-face{width:100%;height:100%;display:flex;flex-direction:column;align-items:center;justify-content:center;border-radius:50%;background:#20234e;box-shadow:inset 0 2px 5px #101434}.math-clock strong{font-size:25px;line-height:1;font-variant-numeric:tabular-nums;color:#fff8de}.math-clock small{font-size:7px;font-weight:950;letter-spacing:.09em;color:#d6c5ff}.math-clock.urgent{background:conic-gradient(#ff776f var(--clock,0%),#353a6c 0);animation:urgent-glow .85s alternate infinite}.math-time-track{height:7px;overflow:hidden;border-radius:10px;background:#0e1538;box-shadow:inset 0 1px 2px #0b102c}.math-time-track span{display:block;height:100%;width:100%;border-radius:10px;background:linear-gradient(90deg,#ff967b,#ffe2a1);transition:width .1s linear}.math-question-stage{min-height:170px;display:flex;flex-direction:column;align-items:center;justify-content:center;margin:12px 0 14px;padding:13px 16px 9px;border:3px solid #efcc8b;border-radius:21px;background:linear-gradient(165deg,#fff8de,#faeac4);box-shadow:0 5px 0 #8f5a69,0 12px 26px #080e3280,inset 0 2px 0 #fff;color:#2b3560;transition:filter .2s,transform .2s}.math-question-top{width:100%;display:flex;justify-content:space-between;align-items:center;color:#8d6499;font-size:10px;font-weight:1000;letter-spacing:.12em}.math-question{flex:1;display:flex;align-items:center;justify-content:center;text-align:center;font-size:clamp(46px,8vw,75px);line-height:1.06;font-weight:1000;letter-spacing:-.055em;font-variant-numeric:tabular-nums;text-shadow:0 2px #fff;white-space:nowrap}.math-feedback{min-height:21px;margin:0;font-size:14px;font-weight:1000;color:#77518d}.math-question-stage.answer-good{animation:stage-good .35s ease-out}.math-question-stage.answer-good .math-feedback{color:#1e8a69}.math-question-stage.answer-bad{animation:stage-bad .25s ease-out}.math-question-stage.answer-bad .math-feedback{color:#c75359}.math-options{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:11px}.math-option{position:relative;height:74px;border:2px solid #e3d8ff;border-bottom-color:#b4a6ee;border-radius:16px;background:linear-gradient(#fffdf5,#ebe5fa);box-shadow:0 5px 0 #695a9a,0 10px 15px #0a0e2f88;color:#2b345d;display:flex;align-items:center;justify-content:center;transition:transform .12s,filter .12s,background .12s}.math-option:hover:not(:disabled){transform:translateY(-2px);filter:brightness(1.03)}.math-option:active:not(:disabled){transform:translateY(3px);box-shadow:0 2px 0 #695a9a}.math-option:disabled{cursor:default}.math-option small{position:absolute;left:10px;top:9px;display:grid;place-items:center;width:23px;height:23px;border-radius:8px;background:#e2d8fb;color:#694fa8;font-size:12px;font-weight:1000}.math-option strong{font-size:33px;line-height:1;font-variant-numeric:tabular-nums}.math-option.correct,.math-option.reveal{background:linear-gradient(#b9f2d7,#83d8b6);border-color:#e4fff0;color:#194d48;box-shadow:0 5px 0 #398f77,0 10px 18px #0b2d2b99}.math-option.incorrect{background:linear-gradient(#ffc9c3,#f3a29e);border-color:#ffe4dc;color:#773d50;box-shadow:0 5px 0 #b6606e}.math-controls{display:flex;justify-content:center;gap:9px;margin:17px auto 1px}.math-controls button{min-width:94px;min-height:36px;padding:5px 14px;border:1px solid #d2bdf3;border-radius:11px;background:#433e80;color:#fff9ed;box-shadow:0 3px 0 #19193f;font-size:11px;font-weight:950}.math-controls button:hover{background:#5f55a0}.math-controls button:active,.math-help:active,.math-big-button:active{transform:translateY(2px);box-shadow:none}.math-credit{margin:14px 0 0;color:#fff1dc;text-align:center;font-size:10px;font-weight:900;letter-spacing:.12em;text-shadow:0 2px 8px #070b29}.math-overlay{position:fixed;z-index:50;inset:0;display:grid;place-items:center;padding:12px;background:#171a3be8;backdrop-filter:blur(6px)}.math-overlay-card{width:min(100%,520px);max-height:calc(100dvh - 24px);overflow-y:auto;padding:17px 20px 19px;border:3px solid #f8d591;border-radius:24px;background:linear-gradient(165deg,#fff8e5,#f5dbba);box-shadow:0 6px 0 #a8736b,0 18px 34px #080b2ca8;text-align:center;color:#384264}.math-mascot{display:block;width:100%;height:132px;object-fit:contain;object-position:center bottom;margin:0 auto 4px;filter:drop-shadow(0 5px 5px #7a5b8570);animation:mascot-bob 2.5s ease-in-out infinite alternate}.math-mascot.small{height:112px}.math-overlay-kicker{display:block;margin:3px 0 3px;color:#af5e73;font-size:10px;font-weight:1000;letter-spacing:.2em;text-transform:uppercase}.math-overlay-card h2{margin:3px 0 6px;color:#453d80;font-size:clamp(25px,5vw,35px);line-height:1.1;letter-spacing:-.05em}.math-overlay-card p{max-width:410px;margin:6px auto 13px;font-size:13px;line-height:1.45}.math-mode-label{display:block;margin:9px 0 7px;color:#7c668c;font-size:10px;font-weight:1000;letter-spacing:.14em}.math-modes{display:grid;grid-template-columns:repeat(3,1fr);gap:7px;margin:0 0 14px}.math-mode{min-height:62px;padding:7px 4px;border:2px solid #e5d8e9;border-radius:12px;background:#fffaf0;color:#534a80;box-shadow:0 3px 0 #b8a1aa}.math-mode.selected{border-color:#785ed1;background:#ebe2ff;box-shadow:0 3px 0 #7b6bb4}.math-mode strong,.math-mode small{display:block}.math-mode strong{font-size:13px}.math-mode small{margin-top:3px;font-size:9px;line-height:1.15;color:#756b8b}.math-big-button{display:block;width:100%;min-height:49px;padding:9px 18px;border:2px solid #ffebba;border-radius:14px;background:linear-gradient(#ffd781,#f5a866);box-shadow:0 5px 0 #b86e61;color:#5c3b5d;font-size:17px;font-weight:1000;letter-spacing:.015em}.math-big-button:hover{filter:brightness(1.05)}.math-key-tip{display:block;margin-top:12px;color:#8d7b8d;font-size:10px;font-weight:750}.math-quiet-button{margin-top:11px;padding:6px 10px;border:0;background:transparent;color:#786394;font-size:12px;font-weight:900}.math-pause-avatar{display:block;height:96px;width:96px;object-fit:contain;object-position:center top;margin:0 auto 6px}.math-result-score{margin:7px auto;padding:4px 10px;width:max-content;color:#7052b3;font-size:52px;line-height:1;font-weight:1000;text-shadow:0 2px #fff}.math-results{display:grid;grid-template-columns:repeat(3,1fr);gap:5px;margin:0 0 15px}.math-results span{display:flex;flex-direction:column;align-items:center;justify-content:center;min-height:48px;border:1px solid #e0d0d9;border-radius:10px;background:#fffaf1;color:#846d89;font-size:9px;font-weight:950}.math-results b{display:block;color:#4c467c;font-size:21px;line-height:1.1}@keyframes stage-good{50%{transform:scale(1.018);filter:brightness(1.07)}}@keyframes stage-bad{25%{transform:translateX(-4px)}75%{transform:translateX(4px)}}@keyframes mascot-bob{to{transform:translateY(-5px)}}@keyframes urgent-glow{to{box-shadow:0 0 0 2px #ffbaa4,0 0 16px #ff8278}}@media(max-width:600px){.math-shell{padding:5px 7px 10px}.math-nav{min-height:40px}.math-brand{font-size:15px}.math-home,.math-lang{font-size:10px;padding:7px 9px}.math-cabinet{margin-top:3px;padding:7px 9px 11px;border-radius:20px}.math-cabinet-head{height:53px}.math-head-owl{width:44px;height:49px}.math-heading h1{font-size:22px}.math-hud{grid-template-columns:repeat(3,minmax(0,1fr)) 64px;gap:4px;margin:7px 0}.math-hud-item{height:51px;border-radius:10px}.math-hud-item small{font-size:8px}.math-hud-item strong{font-size:21px}.math-clock{width:58px;height:58px;padding:5px}.math-clock strong{font-size:20px}.math-clock small{font-size:6px}.math-question-stage{min-height:151px;margin:10px 0 12px;padding:10px 10px 6px;border-radius:16px}.math-question{font-size:clamp(43px,12vw,57px)}.math-question-top{font-size:9px}.math-feedback{font-size:12px;min-height:17px}.math-options{gap:9px}.math-option{height:68px;border-radius:13px}.math-option strong{font-size:29px}.math-controls{margin-top:14px;gap:6px}.math-controls button{min-width:0;flex:1;min-height:34px;padding:5px 7px;font-size:10px}.math-credit{margin-top:10px;font-size:9px}.math-overlay-card{padding:14px 12px 17px}.math-mascot{height:113px}.math-mascot.small{height:96px}.math-overlay-card p{font-size:12px}.math-mode{min-height:60px}.math-mode strong{font-size:12px}.math-mode small{font-size:8px}}@media(max-width:350px), (max-height:650px){.math-shell{padding-top:3px}.math-nav{min-height:34px}.math-cabinet-head{height:47px}.math-hud-item{height:44px}.math-clock{width:54px;height:54px}.math-question-stage{min-height:121px;margin:7px 0 9px}.math-question{font-size:clamp(37px,11vw,49px)}.math-option{height:55px}.math-controls{margin-top:10px}.math-mascot{height:82px}.math-overlay-card p{margin-bottom:8px}.math-mode{min-height:49px}.math-mode small{display:none}.math-overlay-card{max-height:calc(100dvh - 50px)}}@media(prefers-reduced-motion:reduce){*,*:before,*:after{animation-duration:.01ms!important;transition-duration:.01ms!important;scroll-behavior:auto!important}}
