Stabilization of ammonia-rich hydrate inside icy planets