.account-trigger{border:1px solid #71836f;background:#23392b;color:#e8ead9;padding:10px 16px;font:600 13px inherit;cursor:pointer;border-radius:4px}.account-overlay{position:fixed;inset:0;background:#07100dd9;z-index:100;display:grid;place-items:center;padding:20px;backdrop-filter:blur(8px)}.account-overlay.hidden{display:none}.account-panel{width:min(540px,100%);max-height:90dvh;overflow:auto;background:#16241d;border:1px solid #667a58;color:#e9eedf;padding:26px;border-radius:8px;box-shadow:0 25px 90px #0008}.account-panel header{display:flex;justify-content:space-between;align-items:center;margin-bottom:18px}.account-panel small{letter-spacing:3px;color:#dbb86d}.account-panel h2{font-size:25px;margin:6px 0}.account-panel p{font-size:14px;line-height:1.7;color:#c3cbbd}.account-panel label{display:block;font-size:13px;margin:14px 0 5px}.account-panel input,.account-panel select{display:block;width:100%;padding:12px;border:1px solid #60715a;background:#0e1b14;color:#f4f4dc;border-radius:4px;box-sizing:border-box;font:inherit}.account-panel button{cursor:pointer}.account-panel .primary,.account-panel .secondary{margin-top:12px;min-height:46px}.account-tabs{display:flex;gap:8px;flex-wrap:wrap;margin-bottom:14px}.account-tabs button{flex:1;background:#263a2c;color:#e1e5d8;border:1px solid #5e7355;padding:10px;border-radius:4px}.account-panel .form-row{display:flex;gap:10px;align-items:end}.form-row>div{flex:1}.form-row button{width:auto!important;white-space:nowrap}.account-panel code{word-break:break-all}.account-panel .session-row{border-top:1px solid #3b4e3b;padding:10px 0;font-size:13px}.account-panel .session-row button{float:right;background:#344532;border:1px solid #5e7355;color:#eee;padding:5px}.account-panel .danger{border-color:#b46d56;color:#ffbea5}.account-panel details{margin-top:18px;border-top:1px solid #42573e;padding-top:12px}.account-panel summary{cursor:pointer;font-size:14px}.account-panel a{color:#ead08a}.account-panel output{font-size:13px;overflow-wrap:anywhere}.account-panel .badge-list{display:flex;flex-wrap:wrap;gap:6px;margin:8px 0}.badge-list span{font-size:12px;background:#354b2d;padding:5px 8px;border-radius:3px}#accountMessage{font-size:13px;line-height:1.6;color:#f1bf78;min-height:22px;white-space:pre-wrap}.next-unlock{font-size:12px!important;color:#dcc786!important;margin:8px 0!important;line-height:1.5}.difficulty-select{font-size:12px;color:#c7d1bc;display:flex;justify-content:space-between;align-items:center;margin:7px 0}.difficulty-select select{background:#233b2b;color:#e8edda;border:1px solid #52644a;padding:6px}.upgrade-panel{position:absolute;inset:20% 6% auto;z-index:25;padding:24px;background:#15261ff5;border:1px solid #baa36c;box-shadow:0 0 0 400px #07120dcc;border-radius:5px;color:#edf0df;text-align:center}.upgrade-panel.hidden{display:none}.upgrade-panel small{color:#cbb077;letter-spacing:3px}.upgrade-panel h2{font-size:23px;margin:8px 0}.upgrade-panel p{font-size:12px;color:#bfcab8}.upgrade-card{display:block;width:100%;text-align:left;margin:10px 0;padding:15px;background:#2b402f;border:1px solid #70815e;color:#f2edd7;border-radius:4px;cursor:pointer;transition:background .15s}.upgrade-card:hover{background:#405635}.upgrade-card b{display:block;font-size:17px}.upgrade-card span{display:block;font-size:12px;line-height:1.5;margin-top:5px;color:#cad4c0}.catalog-card.locked{opacity:.6}.lock-label{font-size:11px;color:#ebbf7e;display:block;margin-top:4px}.catalog-card img{object-fit:contain;image-rendering:pixelated}.catalog-card .weapon-reference{width:100%;height:88px;object-fit:cover;border-radius:3px}.network-notice{position:fixed;bottom:16px;left:50%;transform:translateX(-50%);background:#263b2ef5;color:#f3dfb2;padding:12px 18px;border:1px solid #9b885b;border-radius:5px;z-index:150;max-width:90%;font-size:13px;box-shadow:0 8px 30px #0007}.network-notice.hidden{display:none}#syncStatus{font-size:13px;color:#c8daa9;white-space:pre-wrap;line-height:1.6}button:focus-visible,input:focus-visible,select:focus-visible{outline:2px solid #f3d58d;outline-offset:3px}#game{touch-action:none;image-rendering:pixelated}.frame{isolation:isolate}.game-bottom{z-index:12}.hud{z-index:12}.modal-overlay{z-index:24}.catalog{z-index:27}.account-trigger{min-height:44px}.briefing{min-height:64px}.skill-button{min-width:80px;min-height:56px}.icon-button{min-width:44px;min-height:44px}
@media(max-width:700px){.topbar{padding-top:max(8px,env(safe-area-inset-top))}.connection{display:none}.account-trigger{font-size:12px;padding:8px}.account-panel{padding:20px;max-height:calc(100dvh - 36px)}.frame{width:min(calc((100dvh - env(safe-area-inset-top) - env(safe-area-inset-bottom) - 62px)*480/900),100vw);height:auto;aspect-ratio:480/900;max-height:calc(100dvh - env(safe-area-inset-top) - env(safe-area-inset-bottom) - 62px);margin:auto}.layout{padding:0!important;min-height:0!important}.game-bottom{padding:10px 8px!important}.loadout{max-width:38%}.loadout strong{font-size:12px!important}.member-count b{font-size:27px!important}.skill-button span{font-size:12px}.start-panel h2{font-size:clamp(23px,6vw,36px)!important}.start-panel{padding:18px!important}.intro{font-size:12px!important}.start-foot{font-size:9px!important}.start-foot b{font-size:9px!important}.start-panel .primary{min-height:48px!important}.start-panel .briefing{padding:10px!important}.upgrade-panel{padding:16px;inset:18% 4% auto}.upgrade-panel h2{font-size:19px}.upgrade-card{padding:10px}.page-footer{display:none}.boss-hud{top:95px!important}.hud-top{padding:10px!important}.hud-actions{gap:1px!important}.mission b{font-size:14px!important}.hud .icon-button{min-width:40px;width:40px}.game-bottom .weapon-mark{display:none}}

.catalog-card{color:#e7eddc}.catalog-card strong{display:block;font-size:13px;margin:6px 0}.catalog-card small{font:10px monospace;color:#dbbd82}.catalog-card img{height:90px;max-width:100%;width:100%;object-fit:contain}.account-panel output{display:block;white-space:pre-wrap}.start-panel{max-height:100%;overflow:auto}.overlay{overflow:auto}.catalog-list{grid-template-columns:repeat(2,minmax(0,1fr))}

/* Keep the account entry available when the decorative desktop header is hidden. */
@media(max-width:1050px){
 .topbar{display:flex;inset:auto 0 max(4px,env(safe-area-inset-bottom));height:50px;padding:0 12px;justify-content:center}
 .topbar>.brand,.topbar>.connection{display:none}
 .account-trigger{min-width:160px;min-height:44px}
}
@media(min-width:701px) and (max-width:1050px){
 .layout{padding-bottom:64px}
 .frame{width:min(calc((100dvh - 84px)*480/900),calc(100vw - 26px));height:auto;max-height:calc(100dvh - 84px);aspect-ratio:480/900}
}
/* The loadout is a combat HUD; it must not cover the lobby start button or notes. */
.frame:has(#startOverlay:not(.hidden)) .game-bottom{visibility:hidden}
.account-panel .account-hint{font-size:12px;line-height:1.5;margin:6px 0 0;color:#b8c6b3}

/* Home is the single entry point; combat controls stay inside the battle. */
#startOverlay{z-index:14;align-items:flex-end;padding:26px 24px;background:linear-gradient(#0c171644 0%,#0c1716e6 40%,#0c1716 70%);touch-action:pan-y}
#startOverlay .start-panel{padding:0!important;max-height:100%;overflow-y:auto;scrollbar-width:thin}
#startOverlay h2{font-size:38px!important;margin:0 0 12px;letter-spacing:.04em}
#startOverlay h2 span{display:block;font-size:16px;font-weight:500;letter-spacing:.06em;margin-top:8px}
#startOverlay .intro{line-height:1.6;margin:0 0 12px;font-size:12px!important}
#startOverlay .sector{font-size:9px;letter-spacing:.12em;flex-wrap:wrap;gap:7px;margin-bottom:12px}
#startOverlay .sector span{color:#c0cdb8;letter-spacing:0;margin-left:auto}
.home-identity{display:flex;align-items:center;gap:8px;font-size:12px;color:#c4d3bc;margin:0 0 12px;overflow-wrap:anywhere}
.home-identity:before{content:'';width:6px;height:6px;background:#bfd88f;border-radius:50%;flex-shrink:0}
.home-actions{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin:10px 0 16px}
.home-actions button{padding:13px 10px;min-height:46px;border:1px solid #93a78766;border-radius:4px;background:#26382ecb;font-size:13px;color:#f2ebd7}
.home-actions button:hover{background:#3c4d38}
#leaderboardBtn{grid-column:1/-1;display:flex;justify-content:space-between;text-align:left}
.home-links{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-top:8px}
.home-links button,.home-links a{font:11px inherit;font-size:11px;color:#c6cbb9;background:none;text-decoration:none;min-height:40px;display:flex;align-items:center;padding:4px}
.home-links a:hover,.home-links button:hover{color:#ffd191}
.asset-status{font-size:11px;color:#dec083;margin:8px 0;line-height:1.4;min-height:0}
.asset-status:empty{display:none}
#continueBtn{margin:0 0 8px;background:#3a4b30;color:#e0f0c7}
#startOverlay .briefing{margin:0;gap:8px;min-height:58px}
#startOverlay .next-unlock{font-size:10px!important;line-height:1.6}
#startOverlay .start-foot{margin-top:4px}
.frame:has(#startOverlay:not(.hidden)) .hud,.frame:has(#startOverlay:not(.hidden)) .game-bottom{visibility:hidden}
.topbar #accountBtn{display:none}
.play-options{display:flex;align-items:center;justify-content:space-between;gap:8px;flex-wrap:wrap;margin-bottom:12px}
.play-options .difficulty{margin:0}.play-options .difficulty button{min-height:44px;font-size:12px;padding:8px 13px}
.play-options .difficulty-select{gap:10px;margin:0}
.catalog{touch-action:pan-y}
.catalog-list{grid-auto-rows:max-content;align-items:start;align-content:start}
.catalog-card{display:flex;flex-direction:column;min-height:0;height:auto;align-self:start;padding:12px;gap:10px;overflow:visible;min-width:0}
.catalog-card>div{width:100%;overflow-wrap:anywhere}
.catalog-card img{flex:none;display:block;margin:0;width:100%;height:96px;max-width:100%;object-fit:contain;object-position:center;image-rendering:pixelated;border-radius:3px;background:#0d191755}
.catalog-card[data-kind="levels"] img{height:130px}
.catalog-card[data-kind="weapons"] img{height:74px;image-rendering:auto}
.catalog-card small{font-size:10px}.catalog-card strong{font-size:14px;line-height:1.5;margin:4px 0}.catalog-card p{font-size:11px;line-height:1.6}
.catalog-card.locked{opacity:1}.catalog-card.locked img{opacity:.65}
.catalog-card .lock-label{font-size:10px;line-height:1.5}
.catalog-card .asset-unavailable{display:grid;place-items:center;height:96px;font-size:12px;color:#c4bb96}
.account-tabs button[aria-pressed="true"]{border-color:#e5b16a;color:#f5cf8e;background:#3c432c}
.account-panel .account-hint{font-size:11px}
#accountMessage:empty{display:none}.account-panel #authForm .primary{margin-top:20px}
.account-panel .auth-note{font-size:12px}.account-panel .auth-dismiss{margin-top:8px}
.leaderboard-panel{width:min(540px,100%)}.leaderboard-panel .ranking-rule{font-size:12px;color:#b4c4ab;line-height:1.7}
.ranking-table{border-collapse:collapse;width:100%;font-size:13px;font-variant-numeric:tabular-nums}
.ranking-table th,.ranking-table td{padding:13px 7px;border-bottom:1px solid #a1b28e26;text-align:left}
.ranking-table th{font-size:11px;color:#b6c6ad;font-weight:500}.ranking-table td:last-child,.ranking-table th:last-child{text-align:right}
.ranking-table .is-you{background:#e5b36712;color:#f4ca89}.ranking-table td:nth-child(2){overflow-wrap:anywhere;max-width:200px}
.ranking-table small{display:block;color:#d9b96e;letter-spacing:2px;margin-top:4px;font-size:10px}
.ranking-empty{padding:26px 12px;border:1px dashed #9bb08a44;border-radius:5px;text-align:center;color:#c7d4bf;font-size:13px;line-height:1.8}
@media(max-width:1050px){.topbar{display:none}.left-rail,.right-rail,.page-footer{display:none}.layout{display:grid;grid-template-columns:minmax(0,480px);justify-content:center;height:100dvh;min-height:0;padding:12px!important}.frame{width:min(calc((100dvh - 24px)*480/900),100%);height:auto;max-height:calc(100dvh - 24px);aspect-ratio:480/900;margin:auto}}
@media(max-width:700px){.layout{padding:0!important;display:flex;align-items:center;justify-content:center}.frame{width:min(calc((100dvh - env(safe-area-inset-top) - env(safe-area-inset-bottom))*480/900),100vw);max-height:calc(100dvh - env(safe-area-inset-top) - env(safe-area-inset-bottom));height:auto;aspect-ratio:480/900}#startOverlay{padding:20px 18px}#startOverlay h2{font-size:30px!important}#startOverlay h2 span{font-size:14px}.home-actions{margin-bottom:12px}.catalog{padding:16px 12px}.catalog header{padding-bottom:12px}.catalog h2{font-size:19px}.catalog-card{padding:10px;gap:8px}.catalog-card img{height:84px}.catalog-card[data-kind="levels"] img{height:110px}.catalog-card[data-kind="weapons"] img{height:62px}.catalog-card strong{font-size:13px}.catalog-card p{font-size:10px}}
@media(max-height:700px){#startOverlay{padding:15px}#startOverlay h2{font-size:27px!important;margin-bottom:8px}#startOverlay h2 span{font-size:12px;margin-top:5px}#startOverlay .intro{margin-bottom:8px;font-size:11px!important}#startOverlay .sector{margin-bottom:8px}.home-identity{margin-bottom:8px;font-size:11px}.home-actions{gap:6px;margin:8px 0}.home-actions button{min-height:44px;padding:10px}#startOverlay .briefing{min-height:54px}#startOverlay .next-unlock{display:none}.home-links{margin-top:2px}}

@media(min-width:1051px){.left-rail h1{font-size:44px;line-height:1.25;letter-spacing:-.04em}}

.home-actions:has(#loginBtn.hidden) #registerBtn{grid-column:1/-1}

.ranking-tabs{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin:18px 0 12px}.ranking-tabs button{min-height:46px;background:#15231f;border:1px solid #ffffff26;border-radius:5px;color:#aebaab;font-size:14px}.ranking-tabs button.selected{background:#f5a548;color:#17231f;border-color:#f5a548;font-weight:700}.ranking-help{font-size:12px;color:#bac8b0;margin:10px 0 18px;line-height:1.8}.ranking-help summary{cursor:pointer;min-height:32px}.ranking-help p{font-size:12px}.ranking-note{font-size:12px!important;color:#e9bb7e!important}.ranking-table{table-layout:fixed;font-variant-numeric:tabular-nums}.ranking-table th:first-child{width:42px}.ranking-table th:nth-child(2){width:36%}.ranking-table td{overflow-wrap:anywhere}.ranking-table th:nth-child(n+3),.ranking-table td:nth-child(n+3){text-align:right}.ranking-table th,.ranking-table td{padding:11px 5px}.ranking-table small{display:block;color:#9eac98;margin-top:5px}.result-grid{gap:12px 10px;padding:14px 0;margin:10px 0}.result-grid>div:last-child{grid-column:1/-1}
