So is पानी masculine, despite its ending?
Yep, it happens sometimes (e.g. आदमी).
Why isn't this "how much do you drink water"?
Because you are referring to the time, how often. The sentence is asking hiw much water, not how much time
Why isn't it "How much water are you drinking?"
Different tense. That would be तुम कितना पानी पी रही हो?