Unless I’m going to the beach, I keep it on me. In a money belt or a zippered pocket. Never needed the passport except leaving Europe or crossing two borders in 8 trips over the past 27 years, but why risk a hassle? Or a lost passport?
If I’m going to the beach, I’ll keep it in the hotel safe, except once in Barcelona I hid it above a ceiling panel and behind a recessed light fixture.
From what we saw (and heard) in Barcelona in 1999, theft from tourists was over the top, so I decided not to trust the hotel room safe. Even the locals on the Metro wore their backpacks over their chests/stomachs, with at least one hand on it. Women’s purses had zippers in the straps, so they could wear their purses over both shoulders.
And no, I’m not up tight about crime and always on the defense, though I am placing my wallet in my unzipped, back pocket less than I used to. I just don’t want to spend vacation time explaining myself to local police or at the US Consulate.