*{box-sizing:border-box}html,body{margin:0;width:100%;height:100%;overflow:hidden;background:#080d16;color:#ecfaff;font-family:Arial,"Microsoft YaHei",sans-serif}canvas{display:block;width:100%;height:100%}.vignette{position:fixed;inset:0;pointer-events:none;box-shadow:inset 0 0 180px #02050bc0}header{position:absolute;top:32px;left:40px;right:40px;display:flex;justify-content:space-between;align-items:center;pointer-events:none}.brand{font-size:19px;font-weight:800;letter-spacing:3px}.brand span{color:#76f6d4}.brand small{display:block;font-size:9px;letter-spacing:3px;color:#8a9fae;margin-top:8px}.status{font-size:10px;letter-spacing:2px;color:#a1b4c0}.status i{display:inline-block;width:6px;height:6px;background:#7ffbd4;border-radius:50%;margin-right:9px;box-shadow:0 0 12px #7ffbd4}.status span{margin-left:28px;border:1px solid #476070;padding:9px}main{position:absolute;inset:0;display:flex;align-items:center;padding:0 10%;background:linear-gradient(90deg,#050d17ed 0%,#07101abb 38%,#09131c10 100%)}.menu-card{max-width:620px}.eyebrow{font-size:10px;letter-spacing:3px;color:#87f7d8;margin-bottom:28px}h1{font-size:clamp(48px,6.6vw,94px);line-height:1.08;letter-spacing:4px;margin:0;font-weight:900}h1 span{color:#83fbd7}h1 i{display:block;font-size:15px;font-style:normal;font-weight:400;letter-spacing:12px;margin-top:18px;color:#c2d4dc}p{color:#a1b4c0;font-size:14px;line-height:2;margin:34px 0}button{border:0;background:#85fbd7;color:#06251f;min-width:255px;padding:20px 24px;text-align:left;font-size:15px;letter-spacing:3px;font-weight:bold;cursor:pointer;box-shadow:0 0 35px #65f5d01a;transition:.2s}button:hover{background:#b0ffe8;transform:translateY(-2px);box-shadow:0 0 35px #65f5d044}button span{float:right;font-size:23px;line-height:19px}.menu-meta{display:flex;gap:24px;margin-top:38px;padding-top:22px;border-top:1px solid #50657955;font-size:10px;color:#b0c1cb;letter-spacing:1px}.hint{font-size:11px;line-height:1.9;color:#718999;margin-top:23px}.side-label{position:absolute;right:6%;bottom:14%;font-size:10px;line-height:2.3;letter-spacing:3px;color:#82c9bd}.side-label strong{font-weight:normal;color:#aab9c5}.side-label div{width:150px;height:1px;background:#68b9aa66;margin:14px 0}.hidden{display:none!important}.top-stats{position:absolute;top:34px;left:50%;transform:translateX(-50%);display:flex;gap:40px;text-align:center;font-size:10px;color:#9fb6c5;letter-spacing:2px}.top-stats strong{display:block;color:#e3fff7;font-size:27px;margin-top:8px;font-weight:400}.bottom-hud{position:absolute;bottom:62px;left:40px;right:40px;display:flex;align-items:flex-end;justify-content:space-between}.health{width:225px}label{font-size:11px;letter-spacing:2px;color:#aac1c8}.health strong{float:right;font-size:22px;color:#a3ffdf;margin-top:-8px}.bar{height:4px;background:#ffffff22;margin-top:15px}.bar i{display:block;height:100%;background:#85fbd7;transition:width .2s}.weapon-info{text-align:right}.weapon-info>span{font-size:10px;letter-spacing:2px;color:#9fb6c5}.weapon-info strong{display:block;font-size:44px;font-weight:400;margin:7px 0}.weapon-info em{font-style:normal}.weapon-info small{font-size:22px;color:#718b9b}.controls{position:absolute;bottom:23px;left:50%;transform:translateX(-50%);white-space:nowrap;font-size:10px;letter-spacing:1px;color:#9fb6c5}.controls span{color:#647d8c;margin:0 8px}#crosshair{position:absolute;top:50%;left:50%;width:0;height:0}#crosshair b{position:absolute;background:#bfffe8;box-shadow:0 0 3px #000}#crosshair b:nth-child(1){width:8px;height:2px;left:-16px;top:-1px}#crosshair b:nth-child(2){width:8px;height:2px;left:8px;top:-1px}#crosshair b:nth-child(3){width:2px;height:8px;top:-16px;left:-1px}#crosshair b:nth-child(4){width:2px;height:8px;top:8px;left:-1px}#notice{position:absolute;top:24%;width:100%;text-align:center;font-size:16px;letter-spacing:4px;color:#a2ffe3;text-shadow:0 2px 10px #000}#hitmarker{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);font-size:40px;color:white;opacity:0} @media(max-width:700px){header{left:20px;right:20px;top:20px}.status{display:none}.side-label{display:none}.menu-meta{gap:12px}.top-stats{top:90px;gap:24px}.controls{font-size:8px}.bottom-hud{left:20px;right:20px}.health{width:150px}}
 .settings{max-width:360px;margin-top:22px}.settings label{display:flex;justify-content:space-between;align-items:center}.settings output{color:#85fbd7;font-size:14px;letter-spacing:0}.settings input{width:100%;margin:12px 0 7px;accent-color:#85fbd7;cursor:pointer}.settings>div{display:flex;justify-content:space-between;font-size:10px;color:#718999}.settings>div span{margin:0 14px}.settings input:focus-visible{outline:2px solid #85fbd7;outline-offset:4px}@media(max-height:800px){main{overflow-y:auto;align-items:flex-start;padding-top:100px;padding-bottom:35px}.menu-meta{margin-top:22px}.eyebrow{margin-bottom:16px}h1{font-size:48px}p{margin:20px 0}.hint{margin-top:14px}}
/* Armory stays accessible beside the menu, and stacks on smaller screens. */
main{gap:clamp(24px,5vw,90px);padding:110px 6% 40px;overflow-y:auto;align-items:flex-start;background:linear-gradient(90deg,#050d17ed,#07101add)}
.menu-card{flex:1;min-width:0;max-width:620px}
.side-label{display:none}
.shop{flex:1;min-width:320px;max-width:540px;padding:24px;background:#0b1724ed;border:1px solid #52748155;align-self:flex-start}
.shop-heading{display:flex;align-items:center;justify-content:space-between;gap:20px}
.shop h2{margin:0;font-size:20px;letter-spacing:3px}
.shop h2 small{display:block;font-size:9px;color:#718999;letter-spacing:4px;margin-top:8px}
.shop-heading>strong,.top-stats .coin-stat strong{color:#ffda83}
.shop>p{font-size:11px;line-height:1.8;margin:18px 0;color:#92a9b8}
.weapon-card{border:1px solid #37516077;border-left:3px solid var(--weapon-color);padding:13px 12px;display:flex;align-items:center;justify-content:space-between;gap:12px;margin-top:10px;background:#0a1220}
.weapon-card.equipped{background:#18312e;border-color:#85fbd777}
.weapon-card h3{margin:0;color:var(--weapon-color);font-size:13px}
.weapon-card p{font-size:10px;margin:6px 0;line-height:1.5}
.weapon-card small{font-size:10px;color:#a7bac6}
.weapon-card button{min-width:96px;padding:12px 8px;font-size:11px;letter-spacing:0;text-align:center;flex-shrink:0}
.weapon-card button:disabled{cursor:default;transform:none;box-shadow:none;background:#263641;color:#8395a2}
#shop-message{min-height:30px;padding-top:14px;color:#ffda83;font-size:11px;line-height:1.6}
@media(max-width:1050px){main{flex-direction:column;padding:100px 7% 35px}.menu-card,.shop{width:100%;max-width:620px;flex:auto}.shop{min-width:0}.top-stats{top:88px;gap:20px}.menu-card h1{font-size:48px}}
 .map-settings{margin:0 0 20px;max-width:430px}.map-settings label{display:block;margin-bottom:9px}.map-settings select{width:100%;padding:12px;background:#10202d;color:#bfffe8;border:1px solid #527481;font-size:12px;cursor:pointer}.map-settings select:disabled{opacity:.6;cursor:default}.map-settings small{display:block;font-size:10px;color:#94abb8;line-height:1.7;margin-top:8px}
.watermark{position:fixed;bottom:12px;left:0;right:0;z-index:10;text-align:center;color:rgba(191,255,232,.7);font-size:12px;letter-spacing:2px;text-shadow:0 1px 5px #000;pointer-events:none;user-select:none}

/* Touch controls and safe-area layout. Desktop defaults above remain unchanged. */
:root{--safe-top:env(safe-area-inset-top,0px);--safe-right:env(safe-area-inset-right,0px);--safe-bottom:env(safe-area-inset-bottom,0px);--safe-left:env(safe-area-inset-left,0px)}
html,body{overscroll-behavior:none;-webkit-user-select:none;user-select:none;-webkit-touch-callout:none}
canvas{touch-action:none}
button:focus-visible,a:focus-visible{outline:2px solid #85fbd7;outline-offset:3px}
#touch-controls,#rotate-notice,.touch-hint,.menu-fullscreen{display:none}
#touch-controls [hidden],#rotate-notice [hidden],#menu-fullscreen[hidden]{display:none!important}
.fullscreen-message{display:block;color:#ffda83;font-size:11px;line-height:1.6}
.touch-ui,.touch-ui body{height:100%;height:100dvh}
.touch-ui body.playing #touch-controls{display:block}
#touch-controls{position:fixed;inset:0;pointer-events:none;z-index:30}
#look-zone{position:absolute;left:43%;right:0;top:50px;bottom:0;touch-action:none;pointer-events:auto}
#look-zone>span{position:absolute;top:42%;right:20%;font-size:10px;letter-spacing:2px;color:#b3d6e644;pointer-events:none}
#joystick{position:absolute;left:calc(var(--safe-left) + 18px);bottom:calc(var(--safe-bottom) + 18px);width:116px;height:116px;border:1px solid #9dffe878;border-radius:50%;background:radial-gradient(circle,#73d8c320,#112b3d70);box-shadow:inset 0 0 20px #88ffe814;touch-action:none;pointer-events:auto}
#joystick::before,#joystick::after{content:"";position:absolute;background:#b4fff02b;pointer-events:none}
#joystick::before{width:1px;top:10px;bottom:10px;left:50%}
#joystick::after{height:1px;left:10px;right:10px;top:50%}
#joystick>span{position:absolute;inset:auto 0 6px;text-align:center;font-size:9px;color:#b3d6e6;pointer-events:none}
#joystick-knob{position:absolute;left:50%;top:50%;width:43px;height:43px;transform:translate(-50%,-50%);border:1px solid #b5ffe8;background:#7debdc45;border-radius:50%;box-shadow:0 0 16px #85fbd724;pointer-events:none}
#joystick.is-down{border-color:#b5ffe8;background:#285b6680}
.touch-actions{position:absolute;right:calc(var(--safe-right) + 18px);bottom:calc(var(--safe-bottom) + 18px);display:grid;grid-template-columns:50px 74px;grid-template-rows:44px 44px;gap:10px;pointer-events:none}
#touch-controls button{min-width:0;min-height:44px;padding:0;border:1px solid #a8d6e788;border-radius:12px;background:#122b3ad9;color:#d3f4ff;font-size:12px;letter-spacing:1px;text-align:center;box-shadow:none;transition:background .12s;touch-action:none;pointer-events:auto;-webkit-tap-highlight-color:transparent}
#touch-controls button:hover{transform:none;background:#122b3ad9;box-shadow:none}
#touch-controls button.is-down{background:#83fbd7;color:#07281f;border-color:#baffed}
#touch-fire{grid-area:1 / 2 / 3 / 3;align-self:center;width:74px;height:74px;border-radius:50%!important;border-color:#99ffe3!important;background:#1c574fd9!important;font-weight:bold;font-size:15px!important}
#touch-fire.is-down{background:#99ffe3!important;color:#06251f!important}
#touch-reload{grid-area:1 / 1}
#touch-swap{grid-area:2 / 1}
#touch-scope{position:absolute;right:0;bottom:108px;width:74px;height:44px}
.touch-top-actions{position:absolute;right:calc(var(--safe-right) + 12px);top:calc(var(--safe-top) + 8px);display:flex;gap:6px;pointer-events:none}
.touch-top-actions button{width:46px;font-size:10px!important;letter-spacing:0!important;border-radius:7px!important;height:44px;min-height:44px!important}
.touch-ui header{left:calc(var(--safe-left) + 12px);right:calc(var(--safe-right) + 12px);top:calc(var(--safe-top) + 10px)}
.touch-ui .brand{font-size:12px;letter-spacing:1px}
.touch-ui .brand small,.touch-ui .status,.touch-ui .controls{display:none}
.touch-ui body:not(.playing) #hud{display:none}
.touch-ui .top-stats{top:calc(var(--safe-top) + 9px);gap:16px;font-size:8px;letter-spacing:0;pointer-events:none}
.touch-ui .top-stats strong{font-size:18px;margin-top:3px}
.touch-ui .bottom-hud{top:calc(var(--safe-top) + 57px);left:calc(var(--safe-left) + 14px);right:calc(var(--safe-right) + 14px);bottom:auto;align-items:flex-start;pointer-events:none}
.touch-ui .health{width:100px}
.touch-ui .health label{font-size:8px;letter-spacing:0}
.touch-ui .health strong{font-size:15px;margin-top:-2px}
.touch-ui .bar{margin-top:7px;height:3px}
.touch-ui .weapon-info{max-width:140px}
.touch-ui .weapon-info>span{font-size:8px;letter-spacing:0}
.touch-ui .weapon-info strong{font-size:26px;margin:2px 0}
.touch-ui .weapon-info small{font-size:14px}
.touch-ui .weapon-info label{font-size:8px;letter-spacing:0}
.touch-ui #notice{top:27%;left:30%;width:40%;font-size:11px;letter-spacing:1px;line-height:1.6;pointer-events:none}
.touch-ui #menu{position:fixed;display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:20px;padding:calc(var(--safe-top) + 52px) calc(var(--safe-right) + 18px) calc(var(--safe-bottom) + 76px) calc(var(--safe-left) + 18px);overflow-y:auto;overscroll-behavior:contain;touch-action:pan-y;align-content:start}
.touch-ui .menu-card,.touch-ui .shop{width:100%;max-width:none;min-width:0}
.touch-ui .menu-card .eyebrow{font-size:8px;letter-spacing:1px;margin-bottom:10px}
.touch-ui .menu-card h1{font-size:34px;letter-spacing:2px}
.touch-ui .menu-card h1 i{font-size:10px;letter-spacing:5px;margin-top:8px}
.touch-ui #description{font-size:12px;margin:12px 0;line-height:1.7}
.touch-ui .map-settings{margin:12px 0}
.touch-ui .map-settings label{font-size:10px;margin-bottom:6px}
.touch-ui .map-settings select{font-size:12px;min-height:42px;padding:9px}
.touch-ui #start{width:100%;min-width:0;min-height:46px;padding:13px 16px;font-size:14px;letter-spacing:2px}
.touch-ui .menu-meta,.touch-ui .desktop-hint{display:none}
.touch-ui .touch-hint{display:block}
.touch-ui .hint{font-size:10px;margin-top:12px;line-height:1.7}
.touch-ui .settings{max-width:none;margin-top:16px}
.touch-ui .settings input{min-height:30px;margin:4px 0;touch-action:none}
.touch-ui .settings label{font-size:10px;letter-spacing:1px}
.touch-ui .settings>div{font-size:9px}
.touch-ui #menu-fullscreen{display:block;background:transparent;border:1px solid #527481;color:#b3d6e6;box-shadow:none;min-width:0;width:100%;margin-top:12px;padding:10px;font-size:12px;letter-spacing:1px;min-height:42px}
.touch-ui .shop{padding:16px}
.touch-ui .shop h2{font-size:16px}
.touch-ui .shop>p{font-size:10px;line-height:1.7;margin:12px 0}
.touch-ui .weapon-card{padding:10px 9px;gap:9px}
.touch-ui .weapon-card h3{font-size:12px}
.touch-ui .weapon-card p{font-size:10px}
.touch-ui .weapon-card button{min-width:78px;min-height:44px;padding:9px 7px;font-size:12px}
.touch-ui .watermark{font-size:9px;letter-spacing:1px;bottom:calc(var(--safe-bottom) + 10px);left:calc(var(--safe-left) + 10px);right:calc(var(--safe-right) + 10px);text-align:left;max-width:50%}
.touch-ui .lab-home{right:calc(var(--safe-right) + 12px);bottom:calc(var(--safe-bottom) + 12px);padding:8px 12px;font-size:11px;min-height:38px}
.touch-ui #rotate-notice{display:none;position:fixed;inset:0;z-index:2000;background:#08121bf5;padding:calc(var(--safe-top) + 24px) calc(var(--safe-right) + 24px) calc(var(--safe-bottom) + 24px) calc(var(--safe-left) + 24px);flex-direction:column;align-items:center;justify-content:center;text-align:center;touch-action:pan-y;overflow:auto}
.touch-ui.portrait #rotate-notice{display:flex}
#rotate-notice .rotate-icon{font-size:60px;color:#85fbd7;line-height:1}
#rotate-notice h2{font-size:26px;letter-spacing:3px;margin:22px 0 0}
#rotate-notice p{font-size:13px;margin:18px 0 24px;line-height:2}
#rotate-notice button{min-width:190px;min-height:48px;text-align:center;padding:13px 20px;font-size:14px;letter-spacing:1px;border-radius:6px;touch-action:manipulation}
#rotate-notice a{color:#a6d4df;font-size:12px;margin-top:22px;padding:10px}
#rotate-notice .fullscreen-message{margin-top:14px;max-width:280px}
@media(max-width:700px){.touch-ui #menu{grid-template-columns:minmax(0,1fr);gap:18px}.touch-ui .menu-card,.touch-ui .shop{max-width:480px;margin-inline:auto}.touch-ui .top-stats{gap:12px;font-size:7px}.touch-ui .top-stats strong{font-size:16px}.touch-ui .brand{font-size:10px}}
@media(max-height:360px){.touch-ui #joystick{width:102px;height:102px;left:calc(var(--safe-left) + 14px);bottom:calc(var(--safe-bottom) + 14px)}.touch-ui #joystick-knob{width:39px;height:39px}.touch-ui .touch-actions{right:calc(var(--safe-right) + 14px);bottom:calc(var(--safe-bottom) + 14px);gap:8px;grid-template-columns:48px 68px}.touch-ui #touch-fire{width:68px;height:68px}.touch-ui .top-stats{gap:11px}.touch-ui .touch-top-actions button{width:44px}.touch-ui #notice{font-size:10px}.touch-ui #menu{padding-top:calc(var(--safe-top) + 46px)}}
@media(prefers-reduced-motion:reduce){button,.bar i{transition:none}}

.touch-ui body.playing .lab-home{display:none}

/* Keep menu controls in normal flow; floating links/watermarks must not cover shop actions. */
.touch-ui .watermark{display:none}
.touch-ui .menu-card .lab-home{position:static;display:inline-flex;align-items:center;margin-top:14px;min-height:42px;max-width:100%;width:max-content;z-index:auto}
.touch-ui #menu{padding-bottom:calc(var(--safe-bottom) + 32px)}

#rotate-continue{background:#85fbd7;color:#062025;border:1px solid #85fbd7;margin-bottom:12px;flex-shrink:0}
