Horizontally aligned text not responsive

Has anyone managed to work out how to have groups aligned horizontally with an even amount of padding each side and that is responsive (growing/shrinking depending on length of word)?

I can’t seem to work this out or find a good solution to this. I’m looking to do something like flexbox or a grid would in CSS.

See example below for the problem. Words too long jump down to a new line and too short create weird uneven spacing.

Screen Shot 2021-07-01 at 16.22.37