Light pollution impairs urban nocturnal pollinators but less so in areas with high tree cover.