  A noiseless, photon counting detector, which resolves the energy of each
photon, could radically change astronomy, biophysics and quantum optics.
Superconducting detectors promise an intrinsic resolving power at visible
wavelengths of $R=E/\delta E\approx100$ due to their low excitation energy. We
study superconducting energy-resolving Microwave Kinetic Inductance Detectors
(MKIDs), which hold particular promise for larger cameras. A
visible/near-infrared photon absorbed in the superconductor creates a few
thousand quasiparticles through several stages of electron-phonon interaction.
Here we demonstrate experimentally that the resolving power of MKIDs at visible
to near-infrared wavelengths is limited by the loss of hot phonons during this
process. We measure the resolving power of our aluminum-based detector as a
function of photon energy using four lasers with wavelengths between $1545-402$
nm. For detectors on thick SiN/Si and sapphire substrates the resolving power
is limited to $10-21$ for the respective wavelengths, consistent with the loss
of hot phonons. When we suspend the sensitive part of the detector on a 110 nm
thick SiN membrane, the measured resolving power improves to $19-52$
respectively. The improvement is equivalent to a factor $8\pm2$ stronger phonon
trapping on the membrane, which is consistent with a geometrical phonon
propagation model for these hot phonons. We discuss a route towards the Fano
limit by phonon engineering.
