Universal Approach to Optimal Photon Storage in Atomic Media | Synapse