html,body,#app,#app * {
 -webkit-text-size-adjust:100% !important;text-size-adjust:100% !important;
}
#gameSurface {--ui-unit:1;--ui-scale:1;--unity-modal-left:64px;--unity-modal-right:28px}
.force-landscape #gameSurface {--hud-bottom:env(safe-area-inset-left,0px)}
#gameSurface #app > :is(header,footer) {
 display:contents;zoom:1;pointer-events:none;
}
#gameSurface #app .hud-anchor {
 position:fixed;inset:auto;display:block;zoom:1;flex:none;gap:0;margin:0;padding:0;
 min-width:0;max-width:none;min-height:0;max-height:none;
 background:transparent !important;border:0;box-shadow:none;
 pointer-events:none;z-index:25;transform:scale(var(--unity-hud-scale));
}
#gameSurface #app .hud-anchor button:not([hidden]) {pointer-events:auto;touch-action:manipulation}
#gameSurface #app .hud-anchor :is(.hud-comms,.resources,.hud-boosts,.galaxy-toolbar) {
 pointer-events:none;
}
#gameSurface #app #hud-anchor-top-left {
 top:var(--unity-hud-top,max(8px,var(--hud-top)));left:var(--unity-hud-left,max(8px,var(--hud-left)));
 width:298px;height:416px;transform-origin:left top;
}
#gameSurface #hud-anchor-top-left .commander {
 width:100%;height:68px;min-height:0;display:grid;grid-template-columns:56px minmax(0,1fr);align-items:center;
}
#gameSurface #hud-anchor-top-left #hudCommanderPower {height:68px;min-height:0}
#gameSurface #hud-anchor-top-left .hud-portrait {width:52px;height:52px}
#gameSurface #hud-anchor-top-left .hud-commander-meta {min-width:0;width:auto}
#gameSurface #hud-anchor-top-left .hud-commander-meta strong {font-size:21px;line-height:1.1}
#gameSurface #hud-anchor-top-left #subProfileBar {
 position:absolute;top:74px;left:0;
}
#gameSurface #hud-anchor-top-left > aside {
 display:grid;gap:6px;position:absolute;top:134px;left:0;right:auto;bottom:auto;
 transform:none;zoom:1;margin:0;padding:0;width:max-content;height:auto;pointer-events:none;
}
#gameSurface :is(#app #hud-anchor-top-center,#notification-zone) {
 top:max(3px,var(--hud-top,0px));
 left:calc(50% + (var(--unity-hud-left,8px) - var(--unity-hud-right,8px)) / 2);width:470px;
 --resource-icon-size:30px;--resource-value-size:19px;
 transform:translateX(-50%) scale(var(--unity-hud-scale));transform-origin:center top;
}
#gameSurface.unity-mobile :is(#app #hud-anchor-top-center,#notification-zone) {
 width:420px;--resource-icon-size:26px;--resource-value-size:17px;
}
#gameSurface > #notification-zone {
 margin-top:calc(55px * var(--unity-hud-scale));
}
#gameSurface #hud-anchor-top-center .resources {
 display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:4px;margin:0;padding:0;
}
#gameSurface #hud-anchor-top-center .resources > div {padding:0}
#gameSurface #hud-anchor-top-center :is(.resource-open,.resource-balance) {
 width:100%;min-height:50px;justify-content:center;gap:3px;padding:0;
}
#gameSurface #hud-anchor-top-center .resources img {
 flex:none;width:var(--resource-icon-size);height:var(--resource-icon-size);
 filter:brightness(1.18) drop-shadow(0 0 3px var(--resource-glow));
}
#gameSurface #hud-anchor-top-center .resource-credits {--resource-glow:#e6ae49;--resource-color:#ffd482}
#gameSurface #hud-anchor-top-center .resource-metal {--resource-glow:#dbbd86;--resource-color:#eee3c5}
#gameSurface #hud-anchor-top-center .resource-polymer {--resource-glow:#69e4b7;--resource-color:#66cdfb}
#gameSurface #hud-anchor-top-center .resource-antimatter {--resource-glow:#b39bff;--resource-color:#81d0a0}
#gameSurface #hud-anchor-top-center .resource-quantum {--resource-glow:#76dfff;--resource-color:#b3ebff}
#gameSurface #hud-anchor-top-center .resources b {
 color:var(--resource-color);font-size:var(--resource-value-size);font-variant-numeric:tabular-nums;
 white-space:nowrap;text-shadow:0 1px 4px #000;
}
#gameSurface #app #hud-anchor-top-right {
 top:var(--unity-hud-top,max(8px,var(--hud-top)));right:var(--unity-hud-right,max(8px,var(--hud-right)));
 width:max-content;transform-origin:right top;
}
#gameSurface #hud-anchor-top-right .hud-map-row {display:flex;align-items:center;gap:8px}
#gameSurface #hud-anchor-top-right #hudBoosts {
 display:flex;flex-wrap:wrap;justify-content:flex-end;max-width:247px;gap:8px;
}
#gameSurface #hud-anchor-top-right #hudBoosts .hud-boost {width:43px;height:43px;min-width:43px;min-height:43px}
#gameSurface #hud-anchor-top-right #hudMapToggle {
 display:grid;place-items:center;width:72px;height:72px;min-width:72px;min-height:72px;
}
#gameSurface #app #hud-anchor-bottom-left {
 bottom:var(--unity-hud-bottom,max(8px,var(--hud-bottom)));left:var(--unity-hud-left,max(8px,var(--hud-left)));
 width:376px;height:128px;transform-origin:left bottom;
}
#gameSurface #app #hud-anchor-bottom-left #quest-hud {
 position:absolute;inset:auto auto 76px 0;width:256px;height:52px;
 min-width:0;min-height:0;max-width:none;
}
#gameSurface #hud-anchor-bottom-left #chat-hud {
 position:absolute;inset:auto auto 0 0;width:376px;height:68px;
 min-width:0;min-height:0;max-width:none;
}
#gameSurface #hud-anchor-bottom-left #hudChatText {font-size:16px;line-height:1.35}
#gameSurface #app #hud-anchor-bottom-right {
 bottom:var(--unity-hud-bottom,max(8px,var(--hud-bottom)));right:var(--unity-hud-right,max(8px,var(--hud-right)));
 display:grid;grid-template-columns:repeat(7,minmax(0,1fr));grid-template-rows:68px;
 width:724px;height:68px;gap:8px;overflow:visible;transform-origin:right bottom;
}
#gameSurface #app #hud-anchor-bottom-right button {position:relative;width:100%;height:68px;min-width:0;min-height:0;margin:0}
#gameSurface #app #hud-anchor-bottom-right #dockAllianceRelay span {font-size:12px;letter-spacing:0}
#gameSurface #app #hud-anchor-bottom-right #reportsCount {position:absolute;top:3px;right:5px}
#gameSurface #app .hud-anchor [hidden] {display:none !important}
#gameSurface.unity-mobile #hud-anchor-top-left > aside {top:130px;gap:4px}
#gameSurface.unity-mobile #app #hud-anchor-bottom-left,
#gameSurface.unity-mobile #hud-anchor-bottom-left #chat-hud {width:340px}

/* Keep a full-screen background with one centered, hardware-scaled reference stage. */
#gameSurface #overlay:not([hidden]) {
 position:fixed;inset:0;z-index:200;display:block;margin:0;padding:0;
 background:#061422;backdrop-filter:none;-webkit-backdrop-filter:none;
 --stage-top:var(--hud-top,0px);--stage-bottom:var(--hud-bottom,0px);
 --stage-w:calc(100cqw - var(--unity-modal-left) - var(--unity-modal-right));
 --stage-h:calc(100cqh - var(--stage-top) - var(--stage-bottom));

}
#gameSurface #overlay.chat-overlay:not([hidden]) {
 inset:var(--chat-top,0px) auto auto var(--chat-left,0px);
 width:var(--chat-width,100cqw);height:var(--chat-height,100cqh);
 --stage-w:calc(var(--chat-width,100cqw) - var(--unity-modal-left) - var(--unity-modal-right));
 --stage-h:calc(var(--chat-height,100cqh) - var(--stage-top) - var(--stage-bottom));
}
#gameSurface #overlay > #panel.modal-fixed-stage {
 --panel-scale:1;--safe-left:24px;--safe-right:24px;
 --close-top:12px;--close-right:12px;--close-size:60px;--panel-toolbar:84px;
 position:absolute;inset:auto;
 left:calc(var(--unity-modal-left) + var(--stage-w) / 2);
 top:calc(var(--stage-top) + var(--stage-h) / 2);
 width:var(--unity-modal-width,1280px);height:var(--unity-modal-height,720px);max-width:none;max-height:none;
 transform:translate(-50%,-50%) scale(var(--chat-stage-scale,var(--unity-modal-scale)));
 transform-origin:center;zoom:1;margin:0;padding:0 !important;
 container:game-frame / size;container-name:game-frame modal-frame;
}
#gameSurface #overlay > #panel.modal-fixed-stage > #panelBody {padding-inline:24px!important;padding-bottom:12px}
#gameSurface #overlay > #panel.modal-fixed-stage > .panel-head {padding:0 90px 0 24px!important}
#gameSurface #overlay > #panel.modal-fixed-stage > #panelError {margin-inline:24px}
#gameSurface #overlay > #panel.modal-fixed-stage .panel-dismiss #panelClose {width:60px;height:60px;min-height:60px;font-size:28px}
#gameSurface #overlay .modal-fixed-stage #panelClose::before {inset:-12px}
#gameSurface #overlay .modal-fixed-stage .recovery-survivors {gap:14px}
#gameSurface #overlay.chat-overlay #panel.modal-fixed-stage .chat-message {font-size:16px;line-height:1.42;margin-bottom:8px}
#gameSurface #overlay.chat-overlay #panel.modal-fixed-stage .chat-compose-row {--compose-height:48px}
#gameSurface #overlay.chat-overlay #panel.modal-fixed-stage #chat-input {font-size:16px}
#gameSurface #overlay.chat-overlay.chat-keyboard-compact:not([hidden]) {overflow:hidden;background:#030f1c66}
.force-landscape #gameSurface #overlay.chat-overlay.chat-keyboard-compact {transform:rotate(-90deg);transform-origin:top left}
#gameSurface #overlay.chat-keyboard-compact > #panel.modal-fixed-stage {
 left:max(8px,env(safe-area-inset-left));right:max(8px,env(safe-area-inset-right));top:auto;bottom:4px;
 width:auto;height:auto;max-height:calc(100% - 8px);transform:none;display:flex;flex-direction:column;
 overflow:auto;container-type:normal;
}
#gameSurface #overlay.chat-keyboard-compact > #panel.modal-fixed-stage > #panelBody {min-height:0;flex:none;padding:5px!important}
#gameSurface #overlay.chat-keyboard-compact > #panel.modal-fixed-stage > #panelError {margin-inline:5px}
#gameSurface #overlay.chat-keyboard-compact #panel > :is(.panel-head,.panel-dismiss,#panelThreat),
#gameSurface #overlay.chat-keyboard-compact #chat-screen > :not(#chat-compose) {display:none}
#gameSurface #overlay.chat-keyboard-compact #chat-screen {height:auto;min-height:0}
#gameSurface #overlay.chat-overlay #panel.modal-fixed-stage #chat-keyboard-dismiss {display:none}
#gameSurface #overlay.chat-keyboard-compact #panel.modal-fixed-stage #chat-keyboard-dismiss {
 display:block;flex:0 0 44px;min-width:44px;padding:0;font-size:25px;
}
#gameSurface #overlay.production-screen #panel.modal-fixed-stage .unit-hangar {height:155px}
#gameSurface #overlay.fleet-target-screen #panel.modal-fixed-stage .unit-hangar {height:112px}
#gameSurface #overlay #panel.modal-fixed-stage .beacon-choice {grid-template-rows:auto 16px 16px}
#gameSurface #overlay #panel.modal-fixed-stage .beacon-choice > b {white-space:normal;line-height:1.2}
#gameSurface #app #hud-anchor-bottom-right button {overflow:hidden}
#gameSurface #app .hud-anchor button::before,
#gameSurface #app .hud-anchor button::after {pointer-events:none}
