Design and function of smart polymer gels based on ion recognition