  We study the Hilbert space of a system of $n$ black holes with an inner
product induced by replica wormholes. This takes the form of a sum over
permutations, which we interpret in terms of a gauge symmetry. The resulting
inner product is degenerate, with null states lying in representations
corresponding to Young diagrams with too many rows. We count the remaining
states in a large $n$ limit, which is governed by an emergent collective
Coulomb gas description describing the shape of typical Young diagrams. This
exhibits a third-order phase transition when the null states become numerous.
We find that the dimension of the black hole Hilbert space accords with a
microscopic interpretation of Bekenstein-Hawking entropy.
