Magnesium optical one-shot sensor based on a coumarin chromoionophore.