Not knowing the gender of a French noun seems as impossible as not knowing its first letter.
I understand that this information is phonetically hidden and you may feel uncomfortable grouping a noun with its article and adjectives. The only way is to learn noun phrases with at least the article rather than isolated nouns.
Note that most of the time, you can go random. Statistically, you'll be right 50%. As you don't hear the final e of most adjectives, you'll be right more than 95% for adjectives. Only remains the article/possessive/demonstrative for which you have to count on tolerance from French native speakers.
In facts, telling me "Celui/Celle-ci est pour toi", already indicates me that French is not your first language. I know straight not have to rely on the gender to convey a significant information.
As the emphasis in on the cup of coffee, not what you do with it, the focus is on the possessive. So I would have expected:
- C'est le tien (for a cup of coffee).
- C'est la tienne (for a cup of coffee).
Your construct with pour is more used when you want to focus on the action:
- Celui-ci est pour boire.
- Celui-ci, je l'ai préparé pour toi