Hydrogels locked by molecular recognition aiming at responsiveness and functionality