Inspired by the center-vortex dominance in the infrared sector of $SU(N)$ Yang-Mills theory observed on the lattice, we propose a vacuum wave functional localized on an ensemble of correlated center vortices endowed with stiffness and magnetic monopoles that change the orientation of the vortex flux. In the electric-field representation, this wave functional becomes an effective partition function for N complex scalar fields. The inclusion of both oriented and nonoriented vortices as well as so-called N-vortex matchings leads to an effective potential that has only a center symmetry left. In the center-vortex condensed phase, this symmetry is spontaneously broken. In this case, the Wilson loop average can be approximated by a solitonic saddle point localized around the minimal surface. The asymptotic string tension thus obtained displays Casimir scaling.