Improve gallery CSS nesting