Gravitational phase transitions and the late-type stars