In this case, "fair and square" means honestly and justly, often in the context of a competition or game.
Here's why it's not a literary device:
* Literary devices are specific techniques used by authors to achieve a particular effect, like metaphors, similes, alliteration, etc.
* Idioms are simply phrases that have a commonly understood meaning different from the literal meaning of the words.
While idioms aren't literary devices, they can add color, vividness, and understanding to writing.