:root{color-scheme:dark;font-family:system-ui,-apple-system,BlinkMacSystemFont,sans-serif;color:#f5f3df;background:#112b34;font-synthesis:none}
*{box-sizing:border-box;-webkit-tap-highlight-color:transparent}
html,body{margin:0;width:100%;height:100%;overflow:hidden;overscroll-behavior:none}
body{display:flex;justify-content:center;background:radial-gradient(ellipse at 50% 30%,#284955,#102830 75%)}
button{font:inherit;cursor:pointer;touch-action:manipulation;border:0;color:inherit}
button:focus-visible,canvas:focus-visible{outline:3px solid #fbd688;outline-offset:-4px}
button:disabled{opacity:.25;cursor:default}
[hidden]{display:none!important}
#app{position:relative;width:100%;max-width:520px;height:100%;height:100dvh;overflow:hidden;background:#315a62;isolation:isolate;box-shadow:0 0 100px #06181c70;touch-action:none;user-select:none;-webkit-user-select:none}
#field{display:block;width:100%;height:100%;touch-action:none;outline:none}
.icon-button{width:44px;height:44px;display:grid;place-items:center;background:#1537418c;border:1px solid #9ec0be38;border-radius:12px;flex:none}
.icon-button svg{width:21px;height:21px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
#hud{position:absolute;top:calc(env(safe-area-inset-top,0px) + 14px);left:20px;right:20px;pointer-events:none}
.hud-row{display:flex;align-items:center;gap:18px}
.hud-stat{display:flex;align-items:center;gap:9px;min-width:92px}
.hud-stat>span{font-size:11px;font-weight:750;letter-spacing:.7px;text-transform:uppercase;color:#bed3ce}
.hud-stat>strong{font:850 31px/1 ui-monospace,SFMono-Regular,monospace;color:#b3eaff;letter-spacing:-2px}
.hud-weapon{display:flex;align-items:center;gap:8px;flex:1}
#weapon-dot{height:6px;width:6px;border-radius:50%;background:#ffe9a6}
.hud-weapon small{display:block;color:#bed3ce;font-size:10px;line-height:1.2}
.hud-weapon strong{font-size:14px;font-weight:750}
#pause{pointer-events:auto;width:38px;height:38px;border-radius:10px}
.progress-line{display:flex;justify-content:space-between;font:600 10px ui-monospace,SFMono-Regular,monospace;color:#d3dfd3;margin-top:13px}
.progress{position:relative;height:3px;background:#142f3d60;border-radius:2px;margin:8px 2px 0 0}
.progress>i{display:block;height:100%;width:0;background:#aee7cb;border-radius:2px}
.boss-marker{position:absolute;right:-3px;top:-7px;width:16px;height:16px;background:#2d4a48;border-radius:4px}
.boss-marker svg{width:16px;height:16px;fill:#2d4a48;stroke:#d5dccc;stroke-width:1.4}
#boss-hud{position:absolute;top:calc(env(safe-area-inset-top,0px) + 112px);left:60px;right:60px;background:#173b42d9;padding:10px 12px;border:1px solid #d4a88159;border-radius:8px}
#boss-hud>div:first-child{display:flex;justify-content:space-between;font-size:11px;line-height:1.4;font-weight:750;color:#ffd0aa}
#boss-percent{font:600 10px ui-monospace,SFMono-Regular,monospace}
.boss-bar{height:5px;background:#0c2934;margin-top:6px;border-radius:2px;overflow:hidden}
.boss-bar i{display:block;height:100%;background:#f4a175;width:100%;transition:width .1s linear}
#announcement{position:absolute;top:33%;left:16px;right:16px;text-align:center;pointer-events:none;opacity:0;transform:translateY(10px);transition:opacity .18s,transform .18s;font-size:25px;line-height:1.1;font-weight:850;letter-spacing:-.6px;color:#fff1c7;text-shadow:0 2px 15px #153535b3}
#announcement.show{opacity:1;transform:translateY(0)}
#announcement small{display:block;font:700 10px ui-monospace,SFMono-Regular,monospace;letter-spacing:2px;margin-bottom:8px;color:#cce8d8;text-transform:uppercase}
#tip{position:absolute;bottom:calc(env(safe-area-inset-bottom,0px) + 42px);left:15px;right:15px;pointer-events:none;text-align:center;text-shadow:0 1px 8px #183e43}
#tip strong{display:block;font-size:12px;color:#fffce3}
#tip>span:last-child{display:block;font-size:10px;margin-top:4px;color:#dfedda}
.drag-arrows{display:flex;justify-content:center;align-items:center;gap:10px;color:#f8edc9;font:500 27px/1 ui-monospace,monospace;margin-bottom:8px}
.drag-arrows i{display:block;width:55px;height:3px;background:#edebd0a6;border-radius:4px}
#run-footer{position:absolute;bottom:calc(env(safe-area-inset-bottom,0px) + 13px);left:20px;right:20px;display:flex;justify-content:space-between;color:#e0e8cf;font:650 10px ui-monospace,monospace;text-shadow:0 1px 5px #1f483e}
.screen{position:absolute;inset:0;display:flex;flex-direction:column;padding:calc(env(safe-area-inset-top,0px) + 23px) 30px calc(env(safe-area-inset-bottom,0px) + 14px);background:linear-gradient(#173b46c9 0%,#173b4615 38%,#15374110 43%,#153741f2 68%,#153741 100%)}
.home-header{display:flex;justify-content:space-between;align-items:center;gap:8px}
.eyebrow{font:750 9px/1.4 ui-monospace,SFMono-Regular,monospace;letter-spacing:1.3px;color:#bcd6cb}
.home-header>.eyebrow{font-size:8px;letter-spacing:1px;max-width:190px}
.home-title{margin-top:22px}
h1{font-size:clamp(58px,17vw,89px);line-height:.95;letter-spacing:-6px;margin:0;font-weight:880;color:#fff4d4}
h1>span{color:#efb974}
.home-title p{font-size:14px;line-height:1.5;font-weight:550;color:#e0e5d5;margin-top:17px}
.home-bottom{margin-top:auto}
.mode-switch{display:flex;padding:4px;background:#0f2c355c;border:1px solid #91b1ab38;border-radius:10px;gap:4px}
.mode-switch button{flex:1;background:transparent;border-radius:6px;height:36px;font-size:12px;font-weight:750;color:#aec8c2}
.mode-switch button[aria-pressed=true]{background:#3d6064;color:#fff3d5}
#sector-picker{display:flex;align-items:center;justify-content:space-between;gap:10px;text-align:center;min-height:114px;padding:14px 0}
#sector-picker h2,#endless-summary h2{margin:4px 0 3px;font-size:24px;font-weight:800;letter-spacing:-.6px}
#sector-picker p,#endless-summary p{margin:0;color:#acc7bd;font-size:11px;line-height:1.5}
.arrow-button{background:transparent;font-size:32px;line-height:1;width:36px;height:50px;color:#d2dfcc}
#endless-summary{text-align:center;min-height:114px;padding:18px 0}
.primary{width:100%;min-height:56px;padding:15px 20px;background:#f2ca83;color:#223c3e;border-radius:10px;display:flex;align-items:center;justify-content:center;gap:10px;font-size:16px;line-height:1.3;font-weight:800;box-shadow:0 4px 0 #a97d49;transition:background .12s}
.primary:active{transform:translateY(2px);box-shadow:0 2px 0 #a97d49}
.primary>span{margin-left:auto;font-size:22px;line-height:1}
#play{justify-content:space-between}
.home-help{text-align:center;color:#a9c5bc;font-size:9px;margin:15px -10px 6px}
.text-button{display:block;background:transparent;color:#e0dec6;margin:0 auto;padding:7px 12px;font-size:11px;text-decoration:underline;text-decoration-color:#7e9c91;text-underline-offset:4px}
.overlay{position:absolute;inset:0;background:#0b252caf;display:flex;align-items:center;justify-content:center;padding:calc(env(safe-area-inset-top,0px) + 20px) 22px calc(env(safe-area-inset-bottom,0px) + 20px);backdrop-filter:blur(5px)}
.panel{background:#1c4049;border:1px solid #9db3a445;padding:27px 25px 22px;border-radius:16px;width:100%;max-height:100%;overflow:auto;box-shadow:0 25px 70px #08202a70;outline:none;touch-action:pan-y}
.panel>.eyebrow{color:#d6ba8b}
.panel h2{font-size:36px;font-weight:830;letter-spacing:-1.5px;line-height:1.1;margin:10px 0 12px;color:#fff1d0}
#panel-copy{font-size:13px;line-height:1.6;color:#b8cec2;margin:0 0 21px;white-space:pre-line}
#result-stats{display:grid;grid-template-columns:repeat(3,1fr);gap:10px;border-top:1px solid #91ada333;border-bottom:1px solid #91ada333;padding:18px 0;margin-bottom:25px}
#result-stats strong{display:block;font:750 23px ui-monospace,SFMono-Regular,monospace;color:#f2dfb5;letter-spacing:-1px}
#result-stats span{display:block;font-size:10px;color:#a8c2b8;margin-top:4px}
.secondary{width:100%;background:transparent;color:#c2d5ca;padding:14px 0 0;min-height:42px;font-size:12px;font-weight:650}
#instructions{margin:10px 0 23px}
#instructions>div{display:flex;gap:12px;align-items:flex-start;margin-bottom:16px}
#instructions p{font-size:11px;line-height:1.6;color:#b8cec2;margin:0}
#instructions strong{display:block;color:#eee8cd;font-weight:700}
.lesson-icon{width:35px;height:35px;flex-shrink:0;display:grid;place-items:center;font:800 18px ui-monospace,monospace;border-radius:7px}
.blue{background:#2b687d;color:#a8e6ff}.green{background:#2d6c5a;color:#b4e8c5}.gold{background:#706347;color:#f0d496}.red{background:#855344;color:#ffd0ab}
#pause-options{border-top:1px solid #91ada333;margin-bottom:20px}
.setting-row{display:flex;align-items:center;justify-content:space-between;background:transparent;font-size:13px;width:100%;height:50px}
.setting-row span{color:#d7bd8d}
#version{position:absolute;right:12px;bottom:8px;pointer-events:none;font:600 7px ui-monospace,monospace;letter-spacing:1px;color:#8fb0a277}
body.playing #version{display:none}
.desktop-note{position:fixed;bottom:30px;left:30px;color:#9bb3ad}
.desktop-note>span{font-size:21px;font-weight:800;letter-spacing:-1px;color:#d7dfc7}
.desktop-note p{font-size:11px;line-height:1.7}
@media(max-width:850px){.desktop-note{display:none}}
@media(max-height:720px){.screen{padding-top:calc(env(safe-area-inset-top,0px) + 13px)}.home-title{margin-top:14px}.home-title h1{font-size:66px}.home-title p{font-size:12px;margin-top:10px}.home-header>.eyebrow{font-size:7px}.home-header .icon-button{height:35px;width:35px}.mode-switch button{height:30px}#sector-picker,#endless-summary{min-height:97px;padding:11px 0}#sector-picker h2,#endless-summary h2{font-size:21px}.primary{min-height:49px}.home-help{font-size:8px;margin-top:13px}.text-button{font-size:10px;padding:5px 10px}.panel{padding:22px}.panel h2{font-size:30px}#instructions>div{margin-bottom:12px}#instructions p{font-size:10px}.lesson-icon{height:30px;width:30px}}
@media(max-width:350px){.screen{padding-left:22px;padding-right:22px}#hud{left:14px;right:14px}.hud-row{gap:10px}.hud-stat{min-width:82px}.hud-weapon strong{font-size:12px}.hud-stat>strong{font-size:27px}.home-title h1{font-size:62px}.panel{padding:20px}.overlay{padding-left:15px;padding-right:15px}.panel h2{font-size:29px}#result-stats strong{font-size:20px}}
@media(orientation:landscape) and (max-height:600px){#app{max-width:calc(100dvh * .64)}.screen{padding:9px 18px}.home-header>.eyebrow{font-size:6px;max-width:120px}.home-header .icon-button{width:28px;height:28px}.home-title{margin-top:5px}.home-title h1{font-size:43px;letter-spacing:-3px}.home-title p{font-size:9px;line-height:1.25;margin:6px 0}.mode-switch button{height:24px;font-size:10px}#sector-picker,#endless-summary{min-height:66px;padding:7px 0}#sector-picker h2,#endless-summary h2{font-size:17px}#sector-picker p,#endless-summary p{font-size:8px}.eyebrow{font-size:7px}.primary{min-height:34px;padding:7px 12px;font-size:13px}.home-help{font-size:6px;margin:8px -10px 0}.text-button{font-size:8px;padding:3px 8px}#version{display:none}#hud{top:7px;left:10px;right:10px}.hud-stat{gap:5px;min-width:65px}.hud-stat>span{font-size:8px}.hud-stat>strong{font-size:22px}.hud-weapon small{font-size:8px}.hud-weapon strong{font-size:10px}.hud-row{gap:6px}#pause{width:28px;height:28px}.progress-line{font-size:8px;margin-top:7px}.progress{margin-top:5px}#boss-hud{top:77px;left:30px;right:30px}#tip strong{font-size:8px}#tip>span:last-child{font-size:7px}.drag-arrows{font-size:18px;margin-bottom:3px}#tip{bottom:24px}#run-footer{bottom:8px;left:12px;right:12px;font-size:8px}.overlay{padding:10px}.panel{padding:18px}.panel h2{font-size:24px}.panel>.eyebrow{font-size:7px}#panel-copy{font-size:10px;margin-bottom:12px}#result-stats{padding:12px 0;margin-bottom:15px}#result-stats strong{font-size:17px}#result-stats span{font-size:8px}.secondary{font-size:10px;padding-top:10px;min-height:30px}}
@media(prefers-reduced-motion:reduce){*{transition:none!important}.overlay{backdrop-filter:none}}
