  In any dimension $n\geq 3$, we prove an optimal stability estimate for the
M\"obius group among maps $u\colon \mathbb S^{n-1} \to \mathbb R^n$, of the
form $\inf_{\lambda>0,\phi\in \mathrm{M\"ob}(\mathbb S^{n-1})} \int_{\mathbb
S^{n-1}}\left|\frac 1\lambda \nabla_{T} u -\nabla_{ T}\phi\right|^{n-1}
d\mathcal H^{n-1} \leq C_n \mathcal E_{n-1}(u).$ Here, $\mathcal E_{n-1}(u)$ is
a conformally invariant deficit which measures simultaneously lack of
conformality and the deviation of $u(\mathbb S^{n-1})$ from being a round
sphere in an isoperimetric sense. This entails in particular the following
qualitative statement: sequences with vanishing deficit, once appropriately
normalized by the action of the M\"obius group, are compact. Both the
qualitative and the quantitative results are new for all dimensions $n\geq 4$.
