Confined smart hydrogels for applications in chemomechanical sensors for physiological monitoring