The complete quantum theory of covariant closed strings is constructed in detail. The nonpolynomial action is defined by elementary vertices satisfying recursion relations that give rise to Jacobi-like identities for an infinite chain of string field products. The genus zero string field algebra is the homotopy Lie algebra L∞ encoding the gauge symmetry of the classical theory. The higher genus algebraic structure implies the Batalin-Vilkovisky (BV) master equation and thus consistent BRST quantization of the quantum action. From the L∞ algebra, and the BV equation on the off-shell state space we derive the L∞ algebra, and the BV equation on physical states that were recently constructed in d = 2 string theory. The string diagrams are surfaces with minimal area metrics, foliated by closed geodesics of length 2 π. These metrics generalize quadratic differentials in that foliation bands can cross. The string vertices are succinctly characterized; they include the surfaces whose foliation bands are all of height smaller than 2 π.