Improved device media query