A CO2-responsive hydrogel film for optical sensing of dissolved CO2.