Weird, I can’t repro so far but similar to what you did you can probably have this css:
body.mobile-device.composer-open #captioned-gallery {
display: none;
}
If I could repro, I would probably try to play with z-index of #captioned-galery too, maybe z-index: 1.