Safest thing to do is just leave no possible room for doubt. This means you can’t be friends with your coworkers, which is disappointing, but the tail risk of accidentally saying something that crosses the line is too severe when it comes to professional consequences.
I cannot tell if this is /s or not but yikes…
Yes! Good Working drone! You must keep on working, that’s your purpose after all!
Fear is a bad advisor! I take the risk because i know that most people around me know me and trust that i say such things in good faith, without patronizing or overly flirting with people of the opposite sex. If it should have any profesional consequences, then maybe i would have the wrong employer.
You seem to be to afraid to be friends with your coworkers because of potential consequences? If that is so, i'm sorry, you are missing out a great deal in life.