Clustering and phase transitions in hot, dense stellar matter