Is wifi on when the iPhone is idle?
In general, it's up to the App to detect and decide not to use cellular data over Wi-Fi data and you are correct, that in absence of a process actively using Wi-Fi - it goes asleep. Even if the app prefers Wi-Fi - there can be a burp where it drops signal or sync with the base station and falls over onto cellular.

You can test an app quite easily by pulling the SIM card and seeing how it behaves as the device goes to sleep. I don't use pandora - but most apps that stream also have a setting to avoid cellular usage if they don't pause the stream when a networking change is detected.