
/* Companion HUD becomes normal document flow directly below the arena.
   This intentionally overrides V6.287's absolute HP-overlay rule. */
.v6287-summon-roster.v6304-roster-docked{
  position:relative!important;
  inset:auto!important;
  left:auto!important;
  right:auto!important;
  top:auto!important;
  bottom:auto!important;
  transform:none!important;
  z-index:8!important;
  width:100%!important;
  max-width:none!important;
  margin:6px 0 8px!important;
  pointer-events:none!important;
}

/* On Dungeon the bar now sits BETWEEN arena and combat log. */
#dungeonBattleCard > .v6287-summon-roster.v6304-roster-docked{
  margin:7px 0 9px!important;
}

/* Old V6.287 left/top/size values were !important and displaced every new
   trajectory. The animation coordinate system always starts at arena 0/0. */
.v6287-summon-fx{
  left:0!important;
  top:0!important;
  margin:0!important;
}

/* Impacts belong in the artwork half of the arena, never at the HP baseline. */
#battleStage .v6303-companion-impact,
#v636QuestBattleStage .v6303-companion-impact,
#tower .v6303-companion-impact,
#pvp .v6303-companion-impact,
#v111BossScene .v6303-companion-impact{
  z-index:145!important;
}

/* Keep companion actors visually in front of fighters/background. */
#battleStage .v6287-summon-fx,
#v636QuestBattleStage .v6287-summon-fx,
#tower .v6287-summon-fx,
#pvp .v6287-summon-fx,
#v111BossScene .v6287-summon-fx{
  z-index:144!important;
}

/* The HUD should be readable but substantially flatter than in V6.303. */
.v6304-roster-docked .v6303-roster-grid{
  gap:3px!important;
}
.v6304-roster-docked .v6303-comp-card{
  height:36px!important;
}
.v6304-roster-docked .v6303-portrait{
  width:25px!important;
  height:28px!important;
}
.v6304-roster-docked .v6303-comp-card{
  grid-template-columns:26px minmax(0,1fr)!important;
}
.v6304-roster-docked .v6303-roster-head,
.v6304-roster-docked .v6303-roster-foot{
  min-height:13px!important;
}

@media(max-width:560px){
  .v6287-summon-roster.v6304-roster-docked{
    width:100%!important;
    margin:5px 0 7px!important;
    padding:4px 5px!important;
  }
  .v6304-roster-docked .v6303-comp-card{
    height:34px!important;
    grid-template-columns:24px minmax(0,1fr)!important;
  }
  .v6304-roster-docked .v6303-portrait{
    width:23px!important;
    height:26px!important;
  }
}
