Sea and storm: coastal habitats offer strongest defense