The gender of two words combined

On page 123 Section 277 we see a sentence (line 5):

Terra et mare sunt inimica.

Here “terra” is feminine, “mare” is neuter, and the adjective used to refer to these two nouns here is neuter and plural.
So does it mean “feminine”+“neuter”=“neuter”?
What if it’s “masculine”+“feminine”? and “masc”+“neuter”? Then in what gender should the adjective used to refer to them be?

Thanks in advance for your responses. :smiley:

With esse and similar verbs, the basic rule is that it’s masculine if it’s for human beings and neuter for things, but for all the details, it’s probably best to check out Allen & Greenough’s grammar, specifically the section on rules of agreement for adjectvies, 286 - 287.

Thank you very much modus.irrealis!