/* BLACK PIRATE KINGDOM V18.12 — final HUD + deterministic boss battle */
html.v187 #resources{
  display:flex!important;
  flex-wrap:nowrap!important;
  align-items:stretch!important;
  gap:5px!important;
  min-height:64px!important;
  height:64px!important;
  padding:5px 7px!important;
  overflow-x:auto!important;
  overflow-y:hidden!important;
  scrollbar-width:thin;
}
html.v187 #resources .pill{
  flex:1 1 118px!important;
  min-width:112px!important;
  max-width:170px!important;
  height:54px!important;
  min-height:54px!important;
  padding:5px 7px!important;
  display:grid!important;
  grid-template-columns:19px minmax(0,1fr)!important;
  grid-template-rows:13px 18px 11px!important;
  column-gap:6px!important;
  align-content:center!important;
  overflow:hidden!important;
  border-radius:8px!important;
}
html.v187 #resources .pill>img,
html.v187 #resources .pill>.v184KitGlyph{
  grid-column:1!important;
  grid-row:1/4!important;
  align-self:center!important;
  justify-self:center!important;
  width:17px!important;
  height:17px!important;
  object-fit:contain!important;
  font-size:15px!important;
  line-height:17px!important;
}
html.v187 #resources .pill>span:not(.v184KitGlyph):not(.energyMeta){
  grid-column:2!important;
  grid-row:1!important;
  align-self:end!important;
  font:800 7px/12px Arial!important;
  white-space:nowrap!important;
  overflow:hidden!important;
  text-overflow:ellipsis!important;
}
html.v187 #resources .pill>b{
  grid-column:2!important;
  grid-row:2!important;
  align-self:start!important;
  font:900 11px/17px Arial!important;
  white-space:nowrap!important;
  overflow:hidden!important;
  text-overflow:ellipsis!important;
}
html.v187 #resources .pill[title*="Beta SOL"]{font-size:15px!important;line-height:17px!important}
html.v187 #resources .pill>.energyMeta{
  grid-column:2!important;
  grid-row:3!important;
  display:block!important;
  margin:0!important;
  font:700 7px/10px Arial!important;
  color:#78c8d3!important;
  white-space:nowrap!important;
  overflow:hidden!important;
  text-overflow:ellipsis!important;
}
html.v187 #resources .poolPill{
  grid-template-columns:minmax(0,1fr)!important;
  grid-template-rows:16px 20px!important;
  min-width:132px!important;
  max-width:180px!important;
  background:linear-gradient(135deg,#102a32,#211707)!important;
  border-color:#80652d!important;
}
html.v187 #resources .poolPill>span{
  grid-column:1!important;
  grid-row:1!important;
  width:auto!important;
  height:auto!important;
  justify-self:start!important;
  font:800 7px/14px Arial!important;
}
html.v187 #resources .poolPill>b{
  grid-column:1!important;
  grid-row:2!important;
  font:900 11px/18px Arial!important;
  color:#f3c75d!important;
}

/* Replace every older boss overlay rule with one exact layout. */
html.v187 #bossBattleStage.v1812BattleStage{
  position:fixed!important;
  inset:8px!important;
  z-index:5000!important;
  display:grid!important;
  grid-template-columns:minmax(0,1fr)!important;
  grid-template-rows:50px minmax(0,1fr) 88px!important;
  grid-template-areas:"controls" "arena" "log"!important;
  gap:7px!important;
  width:auto!important;
  height:calc(100vh - 16px)!important;
  min-height:0!important;
  max-height:calc(100vh - 16px)!important;
  padding:9px!important;
  overflow:hidden!important;
  border:1px solid #b8872f!important;
  border-radius:15px!important;
  background:radial-gradient(circle at 50% 8%,#16475d,#031017 68%)!important;
  box-shadow:0 0 0 9999px #000e,0 25px 90px #000!important;
}
html.v187 #bossBattleStage.v1812BattleStage>.battleControls{
  grid-area:controls!important;
  display:flex!important;
  justify-content:space-between!important;
  align-items:center!important;
  width:100%!important;
  height:50px!important;
  min-height:50px!important;
  margin:0!important;
  padding:0 4px 7px!important;
  border-bottom:1px solid #715627!important;
  background:transparent!important;
  overflow:hidden!important;
}
html.v187 #bossBattleStage.v1812BattleStage>#battleArena{
  grid-area:arena!important;
  position:relative!important;
  display:grid!important;
  grid-template-columns:minmax(270px,1fr) 86px minmax(270px,1fr)!important;
  align-items:stretch!important;
  gap:12px!important;
  width:100%!important;
  height:100%!important;
  min-height:0!important;
  max-height:none!important;
  margin:0!important;
  padding:12px 16px!important;
  overflow:hidden!important;
  border:1px solid #2d5e6d!important;
  border-radius:12px!important;
  background:linear-gradient(180deg,#0b3c54 0 43%,#073147 44%,#031b29 100%)!important;
}
html.v187 #bossBattleStage.v1812BattleStage>#battleLog{
  grid-area:log!important;
  display:block!important;
  width:100%!important;
  height:88px!important;
  min-height:88px!important;
  max-height:88px!important;
  margin:0!important;
  padding:5px 8px!important;
  overflow:hidden!important;
  border:1px solid #2d5967!important;
  border-radius:10px!important;
  background:#031019f7!important;
}
html.v187 #bossBattleStage.v1812BattleStage>#battleLog .v1812LogHead{
  height:20px!important;
  display:flex!important;
  align-items:center!important;
  justify-content:space-between!important;
  padding:0 3px 3px!important;
  border-bottom:1px solid #244955!important;
}
html.v187 #bossBattleStage.v1812BattleStage>#battleLog .v1812LogHead h3{
  margin:0!important;
  font:900 10px/16px Arial!important;
  color:#efc75f!important;
}
html.v187 #bossBattleStage.v1812BattleStage>#battleLog .v1812LogHead span{
  font:700 7px/14px Arial!important;
  color:#8fb8c1!important;
}
html.v187 #bossBattleStage.v1812BattleStage>#battleLog .battleLogRows{
  height:57px!important;
  max-height:57px!important;
  overflow-y:auto!important;
  overflow-x:hidden!important;
}
html.v187 #bossBattleStage.v1812BattleStage>#battleLog .battleLogRows>div{
  display:grid!important;
  grid-template-columns:52px minmax(0,1fr)!important;
  gap:7px!important;
  padding:2px 5px!important;
  border-bottom:1px solid #14333d!important;
  font:8px/1.15 Arial!important;
}
html.v187 #bossBattleStage.v1812BattleStage>#battleLog .battleLogRows>div>b{color:#f0c65c!important}
html.v187 #bossBattleStage.v1812BattleStage .v1812Fleet{
  display:grid!important;
  grid-template-rows:auto repeat(3,minmax(68px,1fr))!important;
  gap:6px!important;
  min-width:0!important;
  min-height:0!important;
}
html.v187 #bossBattleStage.v1812BattleStage .v1812Fleet>h3{
  margin:0!important;
  padding:3px!important;
  text-align:center!important;
  font:900 10px/15px Arial!important;
  letter-spacing:.12em!important;
  color:#d9edf0!important;
}
html.v187 #bossBattleStage.v1812BattleStage .v1812Ship{
  position:relative!important;
  display:grid!important;
  grid-template-columns:100px minmax(0,1fr)!important;
  align-items:center!important;
  gap:9px!important;
  min-height:68px!important;
  padding:6px 9px!important;
  overflow:visible!important;
  border:1px solid #3d7280!important;
  border-radius:10px!important;
  background:linear-gradient(135deg,#0b2a36ed,#05151ced)!important;
  box-shadow:0 7px 16px #0007!important;
}
html.v187 #bossBattleStage.v1812BattleStage .v1812Fleet.enemy .v1812Ship{
  grid-template-columns:minmax(0,1fr) 100px!important;
}
html.v187 #bossBattleStage.v1812BattleStage .v1812Fleet.enemy .v1812Ship>img{grid-column:2;grid-row:1}
html.v187 #bossBattleStage.v1812BattleStage .v1812Fleet.enemy .v1812Ship>.v1812ShipInfo{grid-column:1;grid-row:1;text-align:right}
html.v187 #bossBattleStage.v1812BattleStage .v1812Ship>img{
  width:100px!important;
  height:58px!important;
  object-fit:contain!important;
  filter:drop-shadow(0 7px 6px #000b)!important;
}
html.v187 #bossBattleStage.v1812BattleStage .v1812ShipInfo{display:grid!important;gap:3px!important;min-width:0!important}
html.v187 #bossBattleStage.v1812BattleStage .v1812ShipInfo>b{font:900 11px/14px Arial!important;color:#f2d384!important;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
html.v187 #bossBattleStage.v1812BattleStage .v1812ShipInfo>span,
html.v187 #bossBattleStage.v1812BattleStage .v1812ShipInfo>small{font:8px/11px Arial!important;color:#b9d1d5!important}
html.v187 #bossBattleStage.v1812BattleStage .v1812Center{display:grid!important;place-items:center!important;text-align:center!important;align-content:center!important;gap:6px!important}
html.v187 #bossBattleStage.v1812BattleStage .v1812Center>b{font:900 46px Georgia!important;color:#f0c45c!important;text-shadow:0 0 18px #f0c45c55!important}
html.v187 #bossBattleStage.v1812BattleStage .v1812Center>small{font:800 8px/1.3 Arial!important;color:#bdd5da!important}
html.v187 #bossBattleStage.v1812BattleStage .v1812Ship.destroyed{opacity:.42!important;filter:grayscale(.8) brightness(.45)!important;transform:scale(.96)!important}
html.v187 #bossBattleStage.v1812BattleStage .v1812Ship.hit{filter:brightness(1.55) saturate(1.4)!important}
html.v187 #bossBattleStage.v1812BattleStage .v1812Ship.firing{transform:translateX(5px)!important}
html.v187 #bossBattleStage.v1812BattleStage .v1812Fleet.enemy .v1812Ship.firing{transform:translateX(-5px)!important}

@media(max-width:1150px){
  html.v187 #resources .pill{min-width:106px!important}
  html.v187 #bossBattleStage.v1812BattleStage>#battleArena{grid-template-columns:minmax(220px,1fr) 55px minmax(220px,1fr)!important}
  html.v187 #bossBattleStage.v1812BattleStage .v1812Ship{grid-template-columns:76px minmax(0,1fr)!important}
  html.v187 #bossBattleStage.v1812BattleStage .v1812Fleet.enemy .v1812Ship{grid-template-columns:minmax(0,1fr) 76px!important}
  html.v187 #bossBattleStage.v1812BattleStage .v1812Ship>img{width:76px!important;height:50px!important}
}
@media(max-width:760px){
  html.v187 #resources{height:auto!important;min-height:64px!important}
  html.v187 #bossBattleStage.v1812BattleStage{overflow:auto!important;grid-template-rows:50px auto 92px!important}
  html.v187 #bossBattleStage.v1812BattleStage>#battleArena{grid-template-columns:1fr!important;height:auto!important;min-height:660px!important}
  html.v187 #bossBattleStage.v1812BattleStage .v1812Center{order:-1!important}
}


/* V18.12.1 close controls + PvP cinematic overlay */
html.v187 #bossBattleStage.v1812BattleStage .v1812CloseX{
  position:absolute!important;right:9px!important;top:8px!important;z-index:30!important;
  width:34px!important;height:34px!important;min-width:34px!important;padding:0!important;
  display:grid!important;place-items:center!important;border:1px solid #e4a75a!important;
  border-radius:50%!important;background:#7b1d1d!important;color:#fff4dc!important;
  font:900 24px/1 Arial!important;box-shadow:0 4px 14px #0009!important;
}
html.v187 #bossBattleStage.v1812BattleStage .v1812CloseX:hover{background:#ad2d25!important;transform:scale(1.06)!important}
html.v187 #bossBattleStage.v1812BattleStage .v187BattleTitle em{display:block!important;margin-top:2px!important;color:#8fb6c1!important;font:700 7px/1 Arial!important;font-style:normal!important;letter-spacing:.08em!important}
html.v187 #bossBattleStage.v1812BattleStage .v187BattleButtons{padding-right:40px!important;display:flex!important;gap:6px!important;align-items:center!important}
html.v187 #bossBattleStage.v1812BattleStage.hide{display:none!important}
body.v181BattleOpen{overflow:hidden!important}
@media(max-width:760px){html.v187 #bossBattleStage.v1812BattleStage .v187BattleButtons button:nth-child(2){display:none!important}}
