@font-face{font-family:StarCraftUI;src:url('ui/eurostile.woff2') format('woff2');font-display:swap}
body,header,button,#gameUI,#menu,#modal{font-family:StarCraftUI,'Segoe UI',sans-serif}
header *,#gameUI *,#menu *,#modal *{font-family:StarCraftUI,'Segoe UI',sans-serif!important}
#overlay{background:rgba(0,2,9,.12);backdrop-filter:none;padding:24px}
#modal{position:relative;width:min(880px,94vw);max-width:1040px;max-height:90vh;overflow:auto;padding:26px 30px;border:1px solid #0b2464!important;border-image:none!important;border-radius:0;background:linear-gradient(115deg,rgba(3,23,62,.91),rgba(0,10,35,.93));box-shadow:inset 0 0 55px #06173f77,0 10px 38px #0005;color:#deddf1}
#modal:before{content:'';position:absolute;inset:0;pointer-events:none;opacity:.14;background:repeating-linear-gradient(0deg,transparent 0 3px,#21425c33 4px 5px)}
#modal h2{font:32px/1.2 StarCraftUI,sans-serif;color:#dfdff4;letter-spacing:0;text-shadow:1px 2px #0009;margin:0 0 22px}
#modal p{color:#d2d1e6;font-size:17px;line-height:1.5}
#modal .eyebrow{color:#9fadd1;font-size:11px;letter-spacing:1px}
#modal button,header button,#menu button,#gameUI .utility button{border:1px solid #4635ed!important;border-image:none!important;border-radius:4px;background:rgba(3,11,36,.75);box-shadow:inset 0 0 0 3px #020c27,inset 0 0 0 4px #22248b;color:#eee45b;letter-spacing:0;text-shadow:1px 1px #000;font-weight:400}
#modal button:hover,#modal button:focus-visible,header button:hover,#menu button:hover{background:#10244f;color:#ffffa6;outline:1px solid #6e67fd;outline-offset:2px}
#modal .primary{color:#fff294;background:#071530}
#modal .actions{gap:16px;margin-top:24px}
#modal .actions button{padding:11px 20px;font-size:20px;min-height:48px}
#modal .pauseDialog{min-height:390px;display:flex;flex-direction:column}
#modal .pauseDialog h2{text-align:center;margin-bottom:24px}
#modal .pauseDialog>p{font-size:23px;line-height:1.5;margin:0 0 18px}
#modal .pauseTip{margin-top:auto;padding-top:24px;color:#babbd8}
#modal .pauseTip b{font-weight:400;color:#e8e7f7}
#modal .pauseDialog .actions{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));margin-top:28px}
#modal .pauseDialog .actions button{padding:10px 9px;font-size:25px}
#modal .upgradeChoices button{background:#03122cbd;border:2px solid var(--tier-color)!important;box-shadow:inset 0 0 22px #0d2f5355;min-height:210px}
#modal .upgradeChoices strong{font-size:23px;line-height:1.15;margin-top:20px}
#modal .upgradeChoices p{font-size:16px!important;line-height:1.35}
#modal .upgradeChoices small,#modal .tierLabel{font-size:12px}
#modal .inventoryLayout p{font-size:14px}
#modal .inventoryLayout h3{font-size:21px}
#modal .gearDetail,.unitStatGrid,.defenseStatGrid{background:#020e2cbf;border-color:#23347a;color:#cfcee8}
#modal .gearTile{box-shadow:none;border:2px solid var(--rarity)!important;border-radius:0;background:#04112b}
#modal .artifactTotals span{background:#051434;color:#c9cfe5;border-color:#263967}
#modal .inventoryTabs button,#modal .bulkSellActions button,#modal .gearActions button{font-size:13px}
#modal .unitUpgradeList>div{background:#06132d}
#modal .controls{color:#d0d3e8;font-size:16px;line-height:1.4}
#modal .controls b{color:#ede45e}
#modal .armoryList button{padding:14px;font-size:18px}
@media(max-width:760px){#modal{padding:20px;max-height:94vh}#modal h2{font-size:26px}#modal .pauseDialog{min-height:340px}#modal .pauseDialog>p{font-size:19px}#modal .pauseDialog .actions{gap:8px}#modal .pauseDialog .actions button{font-size:18px}#modal .upgradeChoices strong{font-size:19px}#modal .upgradeChoices p{font-size:14px!important}#modal .controls{font-size:13px}}
.unitStatGrid small{display:inline-block;margin-left:5px;font-size:12px;color:#9caaca!important;white-space:nowrap}

.upgradeAffected{display:flex;flex-wrap:wrap;gap:7px;margin:12px 0;align-items:flex-start}.upgradeAffected>span{display:flex;flex-direction:column;align-items:center;max-width:68px}.tierChoice .upgradeAffected img{position:static;float:none;width:48px;height:48px;object-fit:contain;margin:0}.upgradeAffected em{font-size:10px;font-style:normal;line-height:1.15;text-align:center;color:#b8c9d9}

/* Keep every upgrade card on the same horizontal content rows. */
.upgradeChoices .tierChoice{display:flex;flex-direction:column;justify-content:flex-start;align-items:stretch;text-align:left}
.upgradeChoices .tierChoice .upgradeAffected{display:flex;align-content:flex-start;align-items:flex-start;justify-content:flex-start;gap:4px;height:var(--affected-height,68px);min-height:var(--affected-height,68px);margin:8px 0 10px;flex-shrink:0}
.upgradeChoices .tierChoice .upgradeAffected>span{width:42px;max-width:42px;flex:0 0 42px;height:60px}
.upgradeChoices .tierChoice .upgradeAffected img{display:block;width:40px;height:40px;object-fit:contain;float:none;margin:0}
.upgradeChoices .tierChoice .upgradeAffected em{font-size:9px;line-height:10px;max-width:42px}
.upgradeChoices .tierChoice>small{display:block;min-height:32px;margin:0 0 10px;line-height:16px}
.upgradeChoices .tierChoice>strong{display:block;min-height:54px;margin:0;line-height:27px}
.upgradeChoices .tierChoice>p{display:block;margin:10px 0 0}

.gearTile .artifactItemArt{display:block;width:40px;height:40px;object-fit:contain;margin:auto}.artifactSlot{cursor:pointer}.artifactSlot:hover image{filter:brightness(1.2)}

.artifactAutoSell{display:flex;gap:6px;align-items:center;flex-wrap:wrap;margin:12px 0}.artifactAutoSell b{font-size:11px;margin-right:6px}.artifactAutoSell button{font-size:11px;padding:6px 8px}.artifactAutoSell button[aria-pressed="true"]{border-color:#84cc8e;background:#163529}

/* Squad controls align beside the hero status panel. */
#skillBar{top:14px;bottom:auto;left:340px;right:auto;transform:none;justify-content:flex-start;align-items:flex-start;max-width:calc(100vw - 360px);flex-wrap:wrap;z-index:2}
#skillBar .passiveSkills{max-width:100%;flex-wrap:wrap}
@media(max-width:760px){#skillBar{top:8px;left:265px;max-width:calc(100vw - 280px)}}
@media(max-width:600px){#skillBar{top:88px;left:8px;max-width:calc(100vw - 16px)}}

/* Preserve terrain proportions inside the responsive minimap panel. */
.minimap canvas#mini{width:100%;height:100%;object-fit:contain;object-position:center;background:#000}

#skillBar .passiveSkills{position:relative;padding-top:12px;margin-left:4px;border-left:1px solid #7b8ca5}.passiveHeading{position:absolute;left:8px;top:0;font-size:9px;line-height:10px;letter-spacing:1px;color:#b8c9dc}

/* Inventory keeps a stable frame; only the item list and details scroll. */
#modal.artifactInventoryModal{height:90vh;max-height:90vh;display:flex;flex-direction:column;overflow:hidden;gap:8px}
#modal.artifactInventoryModal>.eyebrow{flex-shrink:0}
#modal.artifactInventoryModal .inventoryHeading{flex-shrink:0;margin:0}
#modal.artifactInventoryModal .inventoryHeading h2{margin:0 0 4px}
#modal.artifactInventoryModal .inventoryLayout{flex:1;min-height:0;max-height:none;overflow:hidden;grid-template-columns:310px minmax(0,1fr);align-items:stretch;gap:20px}
#modal.artifactInventoryModal .wheelPanel{min-height:0;overflow-y:auto;scrollbar-gutter:stable}
#modal.artifactInventoryModal .artifactWheel{display:block;width:100%;height:auto;flex-shrink:0}
#modal.artifactInventoryModal .inventoryLayout>div:last-child{display:grid;grid-template-rows:32px 24px minmax(80px,1fr) minmax(140px,1fr);min-width:0;min-height:0;gap:4px}
#modal.artifactInventoryModal .inventoryTabs{margin:0;white-space:nowrap}
#modal.artifactInventoryModal .bagHeading{margin:0;min-height:24px}
#modal.artifactInventoryModal .bagGrid{height:100%;min-height:0;max-height:none;overflow-y:auto;overflow-x:hidden;scrollbar-gutter:stable;align-content:start;grid-template-columns:repeat(8,minmax(0,1fr))}
#modal.artifactInventoryModal .gearTile,#modal.artifactInventoryModal .emptyGear{height:48px;min-width:0;padding:0}
#modal.artifactInventoryModal .gearTile .artifactItemArt{width:36px;height:36px}
#modal.artifactInventoryModal .gearDetail{min-height:0;height:100%;margin:0;overflow-y:auto;overflow-x:hidden;scrollbar-gutter:stable;padding:10px}
#modal.artifactInventoryModal>.artifactAutoSell,#modal.artifactInventoryModal>.bulkSellActions,#modal.artifactInventoryModal>.actions{flex-shrink:0;margin:0;gap:6px}
#modal.artifactInventoryModal .artifactAutoSell button,#modal.artifactInventoryModal .bulkSellActions button,#modal.artifactInventoryModal>.actions button{padding:5px 8px;font-size:11px}
@media(max-width:1000px){#modal.artifactInventoryModal .inventoryLayout{grid-template-columns:260px minmax(0,1fr);gap:12px}}
@media(max-width:700px){#modal.artifactInventoryModal{height:94vh;max-height:94vh;padding:14px}#modal.artifactInventoryModal .inventoryLayout{grid-template-columns:145px minmax(0,1fr);gap:8px}#modal.artifactInventoryModal .bagGrid{grid-template-columns:repeat(4,minmax(0,1fr))}#modal.artifactInventoryModal .inventoryTabs button{font-size:10px;padding:4px}#modal.artifactInventoryModal .artifactTotals{display:none}#modal.artifactInventoryModal .inventoryLayout>div:last-child{grid-template-rows:30px 24px minmax(60px,1fr) minmax(120px,1fr)}}

.artifactSetBonus{padding:7px;margin:6px 0;border-left:2px solid #627092;background:#07152b;font-size:11px}.artifactSetBonus p{font-size:11px!important;margin:4px 0!important}.artifactSetBonus small{color:#a4b8cc}.artifactSetBonus.activeSet{border-color:#7fe2b0}.artifactSetBonus.activeSet b{color:#7fe2b0}

/* Shared Vaspene Gas resource, purple in both HUD displays. */
#energyBar{border-color:#8662a7;background:#160b26}#energyFill{background:linear-gradient(#d59bfa,#8a40bf)}

/* Persistent top action row; separate selling from equipment/storage actions. */
#modal.artifactInventoryModal .inventoryLayout>div:last-child{grid-template-rows:40px 32px 24px minmax(70px,1fr) minmax(130px,1fr)}
#modal.artifactInventoryModal .inventoryItemActions{display:flex;align-items:center;flex-wrap:nowrap;gap:7px;margin:0;min-width:0}
#modal.artifactInventoryModal .inventoryItemActions button{padding:6px 8px;font-size:11px;white-space:nowrap}
#modal.artifactInventoryModal .inventoryItemActions .sellArtifactAction{margin-left:auto;border-left-color:#aa7464}
@media(max-width:700px){#modal.artifactInventoryModal .inventoryLayout>div:last-child{grid-template-rows:66px 30px 24px minmax(50px,1fr) minmax(110px,1fr)}#modal.artifactInventoryModal .inventoryItemActions{flex-wrap:wrap;align-content:start;gap:4px}#modal.artifactInventoryModal .inventoryItemActions button{font-size:9px;padding:5px}#modal.artifactInventoryModal .inventoryItemActions .sellArtifactAction{margin-left:14px}}
