gallery.css: fix gallery layout on smartphones