Dihedral angle of gaseous and crystalline HOOH Why does hydrogen peroxide exhibit a dihedral angle of $111.5^\circ$ in the gaseous state? And a dihedral angle of $90.2^\circ$ in the crystalline phase?

I know that in general, there is likely to be more hydrogen bonding in the crystalline phase than in the vapor phase.
But what's up with 1) the bond angles themselves in the first place and 2) the bond angle expansion in the gas phase? How can one rationalize them?
I know that there exist lone pairs on the oxygens and lone-pair/lone-pair repulsion should probably be minimized, but what it is about these conformers that minimizes energy? I'm guessing that we'd also want to minimize eclipsed and gauche interactions ... Newman projection time?
It seems that there is only one Newman projection possible for $\ce{HOOH}$; i.e. we'll have the inevitable lone-pair/lone-pair interaction, and the lone-pair/hydrogen interaction. I guess all we can do is minimize these interactions; i.e. the energy-minimized conformer is probably not the one with them all eclipsed. However, why does it seem that the energy-minimized conformer for vapor $\ce{HOOH}$ is one that puts the lone-pairs so close to each other in terms of dihedral angles?
You've already answered your own question - hydrogen bonding.
First, don't think of it as to why is the gas state different than solid-state.  Rather, think about why is the solid-state different than the gas state. In the gas state, there is very little intermolecular interaction (very, very few species do not follow the ideal gas law to many significant digits). The gas state geometry is close to what is expected for $\mathrm{sp^3}$ tetrahedral geometry and may be considered normal. The link below is a paper discussing the gas phase microwave spectroscopy of $\ce{H2O2}$ in far greater detail than I can hope to here. The description of the torsional rotation energies was not trivial.
Internal‐Rotation in Hydrogen Peroxide: The Far‐Infrared Spectrum and the Determination of the Hindering Potential by
Robert H. Hunt, Robert A. Leacock, C. Wilbur Peters, Karl T. Hecht, The Journal of Chemical Physics 1965, 42, 1931-1946, https://doi.org/10.1063/1.1696228,
mirror
When condensed to the solid-state, molecules get close enough to allow intermolecular forces (in this case hydrogen bonding to a much greater extent than van der Waals). Additionally, the energies of the crystal lattice must be considered.  In this case, th