I know to capitalize a title when used with the name, i.e. Prince John, and not if it is general - "any prince will do." But if Queen Eleanor has been identified and I write as "the queen" in the same paragraph obviously referring to Eleanor, is it capitalized? The same would work for all church and nobility titles I presume.
Basically, it seems it's up to you. According to GrammarBook.com:
Capitalize titles when they are used before names, unless the title is followed by a comma. Do not capitalize the title if it is used after a name or instead of a name.
However, they add a note that:
Out of respect, some writers and publishers choose to capitalize the highest ranks in government, royalty, religion, etc.
The President arrived.
The Queen spoke.
The Pope decreed.
Many American writers believe this to be a wrongheaded policy in a country where, theoretically, all humans are perceived as equal.
So, basically, it's your choice. I don't think anyone will fault you either way.
A noun (when not at the start of a sentence) should be capitalised if and only if it is a proper noun, which refers to a specific person, place, thing or idea without taking a limiting modifier.
- "The Queen (of England) visited my school."
Since the word "Queen" is capitalised here, we know that it must be referring to a specific queen. The words "of x country" do not have to be included.
- "She dreamed that one day, she would be the queen."
In this sentence, the word "queen" is not capitalised as it does not refer to a specific person.