:root{color-scheme:dark;font-family:system-ui,-apple-system,sans-serif;color:#dfedf0;background:#09131c}*{box-sizing:border-box}body{margin:0;background:radial-gradient(at 90% 10%,#153741,transparent 55%),#09131c}header,main,footer{max-width:1160px;margin:auto;padding:22px}header{display:flex;justify-content:space-between;align-items:center;border-bottom:1px solid #29404b}small,.tag{letter-spacing:2px;color:#79d8cc;font-size:12px}h1{font-size:24px;margin:8px 0}h1 span{font-size:14px;color:#91a7b5}h2{font-size:42px;line-height:1.2;margin:22px 0}p{color:#b4c8d0;line-height:1.8}button,select,input{font:inherit;border:1px solid #43626e;border-radius:9px;background:#172d39;color:#edfaff;padding:12px 17px;min-height:48px}button{cursor:pointer}button:hover{background:#294d5c}button:focus-visible,input:focus-visible{outline:3px solid #8cf1db}button:disabled{opacity:.45}.primary{background:#8be6ce;color:#071b22;font-weight:750}.cards{display:grid;grid-template-columns:repeat(3,1fr);gap:16px;margin:30px 0}.cards article{background:#12232ee8;border:1px solid #294a57;border-top:3px solid #6bdac2;padding:20px;border-radius:12px}.cards b{color:#9ae9db}label{display:inline-flex;gap:12px;align-items:center;flex-wrap:wrap}.hud{display:flex;gap:8px;flex-wrap:wrap;align-items:center}.hud b{margin-right:auto;color:#8be6ce}.arena{position:relative;margin-top:15px;border:1px solid #456878;border-radius:12px;overflow:hidden}canvas{width:100%;display:block;touch-action:none;background:#132430}.legend{position:absolute;bottom:6px;left:10px;font-size:12px;color:#b8cfda;pointer-events:none}.touch{display:none;justify-content:space-around;align-items:center;margin:14px}.pad{width:95px;height:95px;border:2px solid #78bdae;border-radius:50%;display:grid;place-items:center;touch-action:none;background:#173744}dialog{width:min(620px,94vw);border:1px solid #77cdbc;border-radius:16px;background:#112633;color:#e4f3f7;padding:26px;max-height:90vh;overflow:auto}dialog::backdrop{background:#030b13ce}dialog h2{font-size:26px}#prompt{font-size:23px;color:white}#feedback{line-height:1.8;margin:18px 0;white-space:pre-line}#visual{display:flex;gap:18px;margin:15px 0;flex-wrap:wrap}.fraction{display:flex;gap:3px;align-items:center}.fraction i{height:22px;width:16px;background:#274652;border:1px solid #6d8994}.fraction i.filled{background:#72d7be}.actions{display:flex;gap:8px;flex-wrap:wrap}footer{font-size:12px;color:#91a7b5}[hidden]{display:none!important}@media(max-width:700px){header,main{padding:14px}h2{font-size:32px}.cards{grid-template-columns:1fr;gap:10px}.cards article{padding:14px}.hud b{width:100%}.hud button{padding:10px;font-size:14px}.touch{display:flex}h1 span{display:block}canvas{min-height:280px}#answerForm{display:flex;flex-wrap:wrap;gap:10px}input{width:180px}}
@media(pointer:coarse){.touch{display:flex;gap:12px}.pad{width:100px;height:100px}#fire{width:100px;height:90px;background:#73dfc6;color:#09232b;font-weight:bold}#game{touch-action:none;user-select:none}#field{min-height:0}header{padding-top:max(10px,env(safe-area-inset-top))}main{padding-left:max(12px,env(safe-area-inset-left));padding-right:max(12px,env(safe-area-inset-right))}.touch{padding-bottom:env(safe-area-inset-bottom)}#keypad{margin-bottom:14px}#keypad button{min-width:48px}}
@media(pointer:coarse) and (orientation:landscape){body:has(#game:not([hidden])) header{display:none}body:has(#game:not([hidden])) footer{display:none}#game .arena{width:min(100%,calc((100dvh - 190px)*1.5625));margin:8px auto}#game .touch{margin:5px auto;max-width:800px}#game .pad{height:76px;width:76px}#game #fire{height:70px}#game #mission{display:none}#game .legend{font-size:11px}}
#home{background:linear-gradient(90deg,#081721fa 20%,#081721bb),url(assets/training-floor.jpg) center/cover;border-radius:16px;padding:28px}#equipment .cards{gap:10px}#equipment article{padding:12px}#equipment button{width:100%;margin:4px 0;text-align:left;font-size:13px}#equipment small{display:block;margin:3px 8px;letter-spacing:0}.gear-preview{height:100px;background-image:url(assets/unit-atlas.png);background-size:200% 200%;background-repeat:no-repeat;filter:drop-shadow(0 5px 8px #0007)}.gear-preview.weapon{background-position:left bottom}.gear-preview.armor{background-position:right bottom}.gear-preview.optic{background-position:left top}#keypad button{flex:1;min-width:45px}#keypad{gap:7px}#fire{touch-action:none}button{touch-action:manipulation}body{overscroll-behavior:none}@media(max-width:700px){#home{padding:16px}}
.gear-preview{width:100px;margin:auto;background-size:200px 200px}
.arena{aspect-ratio:1.5625;background:#142b38}#field{width:100%;height:100%;min-height:0;touch-action:none;cursor:crosshair}#radar{position:absolute;right:12px;top:12px;width:150px;height:100px;min-height:0;border:1px solid #669b9e;border-radius:7px;pointer-events:none}.crosshair{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);font-size:24px;color:#c5fff4;pointer-events:none;text-shadow:0 1px 3px #000}.objective{position:absolute;top:16px;left:16px;display:flex;flex-direction:column;gap:6px;pointer-events:none;text-shadow:0 1px 4px #000}.objective small{font-size:10px;color:#7fdac7}.objective b{font-size:16px;color:#fff2cb}.objective span{font-size:12px}.pad{position:relative;background:radial-gradient(circle,#2d5d6388,#102934);border-color:#608e93;color:#b8d6d8;user-select:none}.pad::after{content:'';position:absolute;left:calc(50% - 16px);top:calc(50% - 16px);width:32px;height:32px;border-radius:50%;background:#76d6c633;border:1px solid #8cc9c1;transform:translate(var(--dx,0px),var(--dy,0px));pointer-events:none}.pad{font-size:12px;padding-top:62px}#pauseOverlay{position:absolute;inset:0;display:grid;place-items:center;background:#08172399;color:#b8eee0;font-size:24px;pointer-events:none}.touch{max-width:900px;gap:12px;justify-content:space-between}.touch button{padding:12px;min-width:66px}#interact.ready{border:2px solid #ffe6a0;color:#ffe6a0}.gameOptions{display:flex;gap:10px;align-items:center;margin:10px 0}.gameOptions select,.gameOptions button{padding:7px 12px;min-height:40px;font-size:13px}.hud button{padding:10px 12px}.legend{font-size:11px}#keypad{display:grid;grid-template-columns:repeat(5,1fr)}#keypad button{min-width:40px}#visual .fraction{flex-wrap:wrap;max-width:100%}#visual .fraction i{width:13px}#visual .fraction span{min-width:35px}@media(pointer:coarse) and (orientation:landscape){#game .arena{width:min(100%,calc((100dvh - 200px)*1.5625))}#game .gameOptions{position:absolute;bottom:max(2px,env(safe-area-inset-bottom));left:15px;right:15px;justify-content:center;margin:0}#game .gameOptions select,#game .gameOptions button{min-height:28px;padding:2px 7px;font-size:11px}#game .pad{padding-top:47px}#game .touch{padding-bottom:30px}.objective b{font-size:13px}#radar{width:120px;height:80px}}@media(max-width:700px){#radar{width:100px;height:67px}.objective{top:10px;left:10px}.objective b{font-size:12px}.touch{gap:6px;margin:10px 0}.touch .pad{width:74px;height:74px;padding-top:49px}#fire{width:70px;height:70px}#desktopInteract{display:none}.legend{display:none}.touch button{min-width:52px;font-size:13px;padding:7px}.hud b{font-size:13px}#home h3{margin-bottom:0}}
#warning{position:absolute;left:50%;top:10px;transform:translateX(-50%);background:#4b2e1de6;color:#ffcc99;padding:7px 12px;border:1px solid #cf9161;border-radius:7px;font-size:12px;pointer-events:none}
@media(pointer:coarse){body:has(#game:not([hidden])){overflow:hidden}body:has(#game:not([hidden])) header,body:has(#game:not([hidden])) footer{display:none}body:has(#game:not([hidden])) main{height:100dvh;padding:10px max(10px,env(safe-area-inset-right)) max(10px,env(safe-area-inset-bottom)) max(10px,env(safe-area-inset-left))}#game{height:100%;display:flex;flex-direction:column;gap:5px}#game .hud{flex-shrink:0}#game .arena{flex:1;min-height:180px;aspect-ratio:auto;width:100%;margin:4px 0}#game .touch{flex-shrink:0;width:100%;margin:2px auto;padding-bottom:0;max-width:980px}#game .gameOptions{position:static;flex-shrink:0;justify-content:center;margin:0}#game #mission,#desktopInteract,#reload{display:none}#game .gameOptions button,#game .gameOptions select{min-height:30px;padding:3px 8px;font-size:12px}#move{order:0}#touchReload{order:1}#interact{order:2}#aim{order:3}#fire{order:4}}
.portal-link{display:inline-flex;align-items:center;justify-content:center;min-height:44px;padding:10px 12px;border:1px solid #43626e;border-radius:9px;color:#c5ede4;text-decoration:none;font-size:13px;white-space:nowrap}.portal-link:hover{background:#294d5c}.portal-link:focus-visible{outline:3px solid #8cf1db;outline-offset:2px}header{gap:12px;flex-wrap:wrap}@media(max-width:700px){.hud .portal-link{padding:8px;font-size:12px}}

@media(pointer:fine){body:has(#game:not([hidden])) header,body:has(#game:not([hidden])) footer{display:none}body:has(#game:not([hidden])) main{max-width:1500px;height:100dvh;padding:14px 24px}#game{height:100%;display:flex;flex-direction:column}#game .arena{flex:1;min-height:260px;aspect-ratio:auto;margin:10px 0}#game .touch{display:none}#game .legend{display:none}#mission{margin:0;font-size:13px;color:#b6d5d0}.hud{flex-shrink:0}.gameOptions{flex-shrink:0}#field:focus-visible{outline:2px solid #6adfc6;outline-offset:2px}}

.math-fraction{display:inline-flex;vertical-align:middle;flex-direction:column;text-align:center;line-height:1.2;margin:0 .22em;min-width:1.3em;font-variant-numeric:tabular-nums}.math-fraction>span:first-child{border-bottom:2px solid currentColor;padding:0 .15em .1em}.math-fraction>span:last-child{padding:.1em .15em 0}#prompt{font-size:24px;line-height:2}#feedback{white-space:pre-wrap;line-height:1.8}#choiceList{display:grid;grid-template-columns:repeat(2,1fr);gap:12px}#choiceList button{font-size:22px;min-height:68px}#choiceList button.selected{outline:3px solid #8ef1d0;background:#244e4c}#choices{border:0;padding:0;margin:0 0 16px}#choices legend{margin-bottom:12px}.fraction-input{display:grid;grid-template-columns:44px 120px;gap:4px 10px;align-items:center;margin:12px 0 18px}.fraction-input input{width:120px;text-align:center;font-size:24px}.input-rule{grid-column:2;border-top:2px solid #b7e5de;height:1px}.fraction-input label{font-size:12px;color:#9ac6bf}#singleInput{display:block;margin:12px 0}#singleInput input{font-size:22px}
