:root{color-scheme:dark;--surface:#192321;--line:#3c4943;--ink:#f0f3e9;--muted:#acbab1;--lime:#cef985;--blue:#51cafa;--mono:ui-monospace,"SFMono-Regular",Consolas,monospace;font:16px/1.35 Inter,-apple-system,BlinkMacSystemFont,"Segoe UI",Arial,sans-serif;color:var(--ink);background:#202e29}
*{box-sizing:border-box}body{margin:0;overflow:hidden}button,input{font:inherit}button{cursor:pointer;color:inherit}button:focus-visible,input:focus-visible{outline:2px solid var(--lime);outline-offset:3px}button:disabled{opacity:.55;cursor:default}button:not(:disabled):hover{filter:brightness(1.16)}[hidden]{display:none!important}button svg,h2 svg{width:19px;height:19px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
header{height:64px;padding:0 clamp(16px,2.6vw,42px);display:flex;align-items:center;gap:17px;background:#141d1b;border-bottom:1px solid #455149;position:relative;z-index:2}.brand,.head-actions,.invite,.network,.location,.mode,.team-note,.board h2,.player-top,.dialog-head{display:flex;align-items:center}.brand{gap:11px}.brand strong{font-size:22px;font-style:italic;font-weight:900;letter-spacing:-1.4px}.brand img{width:32px;height:32px}.header-line{height:22px;width:1px;background:var(--line)}.header-sub{font-size:14px;color:var(--muted)}.head-actions{margin-left:auto;gap:9px}.network{gap:7px;margin-right:13px;font:12px var(--mono);color:var(--muted)}.network i,.mode i,.team-note i,.human-dot{width:7px;height:7px;border-radius:50%;display:inline-block;background:#ccab65}.network i.online,.mode i{background:var(--lime)}.icon-btn,.invite{height:34px;background:#202b27;border:1px solid #435148;border-radius:5px}.icon-btn{width:35px;display:grid;place-items:center;font-weight:700;font-family:var(--mono)}.invite{padding:0 12px;gap:8px;font-size:14px;font-weight:600;background:#2d3a32}.invite svg{height:16px}
main{height:calc(100vh - 64px);height:calc(100dvh - 64px);position:relative;overflow:hidden;isolation:isolate}#field{position:absolute;inset:0;width:100%;height:100%;touch-action:none}.playing #field{cursor:crosshair}.panel,dialog{background:var(--surface);border:1px solid #4d5b50;border-radius:9px;box-shadow:0 7px 20px #09110d40}.panel{position:absolute}.location{position:absolute;top:23px;left:clamp(16px,2.7vw,44px);gap:12px;pointer-events:none;text-shadow:0 1px 4px #0009}.loc-symbol{font-size:31px;line-height:1;color:var(--lime)}.location small{display:block;color:#c0ccbf;font:10px var(--mono);letter-spacing:1.6px}.location b{display:block;font-size:17px;margin-top:2px}.mono{font-family:var(--mono)}
.lobby{width:306px;left:clamp(16px,3.8vw,64px);top:50%;transform:translateY(-50%);overflow:hidden;box-shadow:0 20px 65px #0b130e70}.lobby-art{height:116px;border-bottom:1px solid #40524b;position:relative;background:#22362f}.lobby-art canvas{display:block;width:100%;height:100%}.tech,.tech-cross{position:absolute;color:#8ca598;font-size:12px}.tech{bottom:10px;left:15px;letter-spacing:1.3px}.tech-cross{right:13px;top:6px;font-size:20px;font-weight:300}.lobby-body{padding:21px 22px 19px}.mode{gap:8px;color:var(--lime);font:600 10px var(--mono);letter-spacing:1.55px}.mode i{width:6px;height:6px}.lobby h1,.death h1{font-size:clamp(34px,3vw,43px);line-height:1;margin:11px 0 10px;letter-spacing:-2px;font-weight:780}.lobby p,.death p,dialog p{color:var(--muted);font-size:14px;line-height:1.5}.lobby p{margin:0 0 20px}.lobby label,#share label{display:block;font-size:13px;color:#e2e8df;margin:0 0 6px;font-weight:600}input{width:100%;background:#101a17;border:1px solid #546256;color:var(--ink);padding:10px 12px;border-radius:5px;height:40px}input::placeholder{color:#91a197}.primary{margin-top:10px;border:1px solid #defeae;background:var(--lime);color:#1b2a14;border-radius:5px;display:flex;align-items:center;justify-content:center;width:100%;height:43px;gap:7px;font-size:16px;font-weight:750}.primary svg{width:14px;height:14px;fill:currentColor}.team-note{justify-content:center;color:#a8b8af;font-size:12px;gap:6px;margin-top:13px}.team-note i{background:var(--blue);width:6px;height:6px}.team-note span{color:#697569}
.board,.radar{right:clamp(14px,2.5vw,40px);width:198px;background:#19231ff5}.board{top:22px;padding:14px 15px 0}.panel h2,dialog h2{margin:0;font-size:15px;font-weight:650;letter-spacing:-.25px}.board h2{gap:8px}.board h2 svg{color:var(--lime);height:16px;width:16px}#scores{display:grid;gap:9px;margin:15px 0}.score{display:grid;grid-template-columns:8px 1fr auto;gap:8px;align-items:center;font-size:13px}.score i{color:var(--c);font:12px/1 Arial,sans-serif;text-align:center}.score b{font:12px var(--mono);color:#ced6cc}.board footer{display:flex;justify-content:space-between;border-top:1px solid var(--line);padding:9px 0;font:11px var(--mono);color:var(--muted)}.human-dot{width:5px;height:5px;background:#b7c4b5;margin:0 5px 1px 0}.radar{bottom:24px;width:166px;padding:11px}.radar h2{display:flex;justify-content:space-between;align-items:center;font-size:12px}.radar h2 .mono{font-size:10px;color:var(--muted)}#minimap{margin-top:8px;width:100%;height:115px;background:#222f28;border:1px solid #47574a;display:block}
#hints{position:absolute;bottom:23px;left:clamp(16px,2.7vw,44px);display:flex;gap:15px;padding:7px 10px;border:1px solid #48574c;border-radius:5px;background:#1a241fe8;pointer-events:none}#hints span{font-size:12px;color:#c0cbbf}#hints b{font-weight:400}#hints kbd{font:11px var(--mono);color:#f1f4e8;padding:2px 4px;border:1px solid #576558;border-radius:3px;margin-right:3px;background:#2c382e}
.death{width:min(310px,90%);left:50%;top:50%;transform:translate(-50%,-50%);padding:24px}.death #result{font:13px var(--mono);color:var(--lime)}
#toast{position:absolute;z-index:4;top:18px;left:50%;transform:translate(-50%,-12px);opacity:0;transition:.18s;background:#17251d;border:1px solid #708566;border-radius:5px;padding:8px 14px;pointer-events:none;font-size:14px;max-width:80vw;text-align:center}#toast.show{opacity:1;transform:translate(-50%,0)}dialog{width:min(420px,92vw);padding:22px;color:var(--ink)}dialog::backdrop{background:#101813bc}.dialog-head{justify-content:space-between;margin-bottom:16px}.dialog-head h2{font-size:23px}.dialog-head button{font-size:22px}dl{display:grid;grid-template-columns:1fr 1.2fr;gap:8px 12px;font-size:14px}dt{font:13px var(--mono);color:var(--lime)}dd{margin:0;color:#dce5d8}dialog p:last-child{margin-bottom:0}.touch-controls{position:absolute;bottom:max(20px,env(safe-area-inset-bottom));border:1px solid #9da99080;border-radius:50%;width:90px;height:90px;background:#17201970;touch-action:none}.touch-controls i{position:absolute;width:36%;height:36%;left:32%;top:32%;border:1px solid #b0c0ad88;background:#647863b0;border-radius:50%}#touch-move{left:19px}#touch-fire{right:19px}
@media(max-width:760px){.header-sub,.header-line{display:none}.board{width:155px;padding:10px 11px 0}.board h2{font-size:13px}.radar{width:126px}.radar canvas{height:82px!important}.lobby{width:282px}.location{top:13px}.network{margin-right:0}header{gap:9px}.head-actions{gap:6px}#hints{gap:8px}}
@media(max-width:570px){header{height:52px;padding:0 12px}.brand{gap:7px}.brand strong{font-size:17px}.brand img{width:27px;height:27px}.network span{display:none}.network{margin:0 3px}.invite{padding:0 8px}.invite span{font-size:12px}.icon-btn{width:29px;height:30px}.invite{height:30px}main{height:calc(100dvh - 52px)}.location{left:14px;top:12px;gap:6px}.location b{font-size:13px}.location small{font-size:9px}.loc-symbol{font-size:23px}.lobby{width:min(285px,82vw);left:50%;transform:translate(-50%,-50%);top:51%}.lobby-art{height:88px}.lobby-body{padding:16px}.lobby p{margin-bottom:12px}.board{right:9px;top:10px;width:122px;padding:8px 8px 0}.board h2{font-size:11px}.board h2 svg{display:none}#scores{gap:3px;margin:6px 0}.score{font-size:10px;gap:3px}.score b{font-size:10px}.board footer{font-size:9px;padding:4px 0}.radar{bottom:11px;right:10px;width:88px;padding:6px}.radar h2{font-size:10px}.radar canvas{height:56px!important;margin-top:3px!important}.lobby-open .radar{display:none}#hints{display:none}}
@media(pointer:coarse){#hints{display:none}.playing .radar{bottom:112px}}
@media(max-height:640px) and (min-width:571px){.lobby-art{height:72px}.lobby-body{padding:12px 17px}.lobby p{margin-bottom:8px}.lobby h1{font-size:31px;margin:7px 0}.team-note{margin-top:7px}.lobby{left:20px}.location{top:8px}.radar{width:125px}.radar canvas{height:75px!important}}
@media(max-height:480px){header{height:40px}main{height:calc(100dvh - 40px)}.lobby{top:50%;width:245px}.lobby-art,.location,.radar,#hints{display:none}.lobby-body{padding:12px}.lobby h1{font-size:28px}.lobby p{font-size:12px}.board{width:145px}.touch-controls{width:78px;height:78px}}

body{display:flex;flex-direction:column;height:100vh;height:100dvh}
body>header,body>footer{flex:none}
body>main#arena{flex:1 1 0;min-height:0;height:auto}
.playing #hints{display:none}
.board{padding:0;overflow:hidden;background:rgb(20 32 25 / 58%);pointer-events:none}
.board h2{display:flex;align-items:center;gap:7px;padding:10px 12px;font-size:13px;font-weight:650;margin:0}
.board #scores,.board footer{margin:0 12px 8px}
.board footer{margin-bottom:0}
#player{background:var(--surface);border-top:1px solid var(--line);padding:0 max(12px,env(safe-area-inset-right)) env(safe-area-inset-bottom) max(12px,env(safe-area-inset-left))}
.status-row{display:flex;align-items:center;gap:clamp(8px,2vw,26px);min-height:52px;max-width:1150px;margin:auto}
.player-info{display:flex;align-items:center;gap:8px;min-width:0;font-size:14px}
.player-info b{max-width:11em;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.level{white-space:nowrap;color:#192712;background:var(--lime);border-radius:4px;padding:4px 6px;font:bold 12px var(--mono)}
#class-name{color:var(--muted);font-size:12px}
.vital-stat{width:clamp(100px,15vw,175px)}
.xp-stat{width:clamp(64px,11vw,125px)}
.meter-label{display:flex;align-items:center;justify-content:space-between;gap:7px;font-size:12px;color:var(--muted);white-space:nowrap}
.meter-label :last-child{font-family:var(--mono)}
#hp{color:var(--health-color);font-size:14px}
.meter{height:5px;margin-top:4px;background:#39483d;border-radius:3px;overflow:hidden}
.meter i,.tank-health i{display:block;height:100%;transition:width .12s}
.health{height:7px}.health i,.tank-health i{width:var(--health-fill);background:var(--health-color)}.experience i{background:var(--lime)}
#tank-vitals{position:absolute;top:0;left:0;pointer-events:none;display:grid;justify-items:center;gap:2px;white-space:nowrap;font:bold 12px/1.2 var(--mono);color:#fff;text-shadow:0 1px 2px #07100c,1px 0 2px #07100c,-1px 0 2px #07100c}
.tank-health{display:block;width:66px;height:8px;background:#1b241f;border:1px solid #e4eee3;border-radius:3px;box-shadow:0 1px 3px #0c1712;overflow:hidden}
.status-row button{border:1px solid #546959;background:#27382e;border-radius:5px;color:var(--ink)}
.status-row button{min-height:34px;padding:5px 9px;white-space:nowrap}
#spin-toggle{display:flex;align-items:center;gap:5px;margin-left:auto}
#spin-toggle span{font-size:21px;line-height:1}
#spin-toggle[aria-pressed=true]{color:var(--lime);border-color:var(--lime)}
#workshop{
  --workshop-bottom:clamp(76px,20%,158px);
  position:absolute;left:clamp(10px,1.6vw,22px);bottom:var(--workshop-bottom);
  width:clamp(180px,20vw,226px);max-height:calc(100% - var(--workshop-bottom) - 52px);
  display:flex;flex-direction:column;overflow:hidden;border:1px solid #9cb8a055;
  border-radius:8px;background:rgb(16 27 22 / 50%);color:#f2f6ed;
  text-shadow:0 1px 2px #122019;pointer-events:none;
}
#workshop h2{display:flex;align-items:center;gap:6px;margin:0;padding:8px 10px;font-size:14px;font-weight:650}
#points{margin-left:auto;font:600 12px var(--mono);color:var(--lime)}
#upgrades{min-height:0;overflow-y:auto;overscroll-behavior:contain;padding:0 8px 8px}
#stat-list{display:grid;gap:4px}
#evolutions{display:flex;flex-wrap:wrap;gap:4px}
#stat-list:not([hidden])+#evolutions:not(:empty){margin-top:6px}
#upgrades button{
  pointer-events:auto;  display:flex;align-items:center;gap:6px;min-height:28px;padding:4px 6px;
  border:1px solid #a8c3a754;border-radius:4px;background:rgb(43 62 50 / 32%);
  font-size:12px;text-align:left;text-shadow:inherit;
}
#upgrades button:hover{background:rgb(61 85 66 / 55%)}
#upgrades small{color:#d3dfd2;margin-left:auto}
#upgrades strong,#evolutions button{color:var(--lime)}
@media(pointer:coarse){#workshop{--workshop-bottom:max(118px,calc(102px + env(safe-area-inset-bottom)))}}
@media(max-width:570px){#workshop{width:min(175px,47vw)}}
@media(max-height:480px){#workshop{--workshop-bottom:100px;max-height:calc(100% - var(--workshop-bottom) - 8px)}}
@media(max-width:720px){#class-name{display:none}.status-row{gap:8px}.player-info b{max-width:7em}.board h2{padding:7px 9px}}
@media(max-width:570px){#player{padding-inline:7px}.status-row{min-height:45px;gap:6px}.player-info b,.xp-stat{display:none}.level{padding:4px;font-size:10px}.status-row button{padding:4px 6px;min-height:32px}#spin-toggle kbd{display:none}#workshop h2{font-size:12px}.vital-stat{flex:1 1 80px;max-width:145px;width:auto}.meter-label{font-size:10px}#hp{font-size:11px}.board h2{font-size:11px}.tank-health{width:55px}}

@media(max-width:570px){.level{border-bottom:3px solid transparent;background:linear-gradient(var(--lime),var(--lime)) padding-box,linear-gradient(to right,#8db957 var(--xp-fill),#46503f var(--xp-fill)) border-box}.radar h2 span:first-child{white-space:nowrap}}

@media(max-height:480px) and (min-aspect-ratio:4/3){
  #workshop{width:min(330px,48vw)}
  #workshop h2{padding:4px 8px}
  #stat-list{grid-template-columns:repeat(2,minmax(0,1fr))}
  #upgrades button{min-height:23px;padding:2px 4px;gap:3px;font-size:11px}
  .board #scores{gap:3px}.board h2{padding:5px 9px}.board footer{padding:4px 0}
}

@media(prefers-reduced-motion:no-preference){
  #workshop:not([hidden]){animation:show-workshop .14s ease-out}
  @keyframes show-workshop{from{opacity:0;transform:translateX(-5px)}to{opacity:1;transform:none}}
}
