Solution (source code)

= Solution

In the <CP1 spinor representation>,
$$
n_i=z^\dagger\sigma_i z,
\qquad z^\dagger z=1,
$$
where the $\sigma_i$ are <Pauli matrices>. The transformation $z\mapsto e^{i\alpha(x,t)}z$ leaves $\mathbf n$ unchanged. For $U\in SU(2)$,
$$
U^\dagger\sigma_iU=R_{ij}\sigma_j
$$
with $R$ in the <special orthogonal group> $SO(3)$, so $z\mapsto Uz$ induces $n_i\mapsto R_{ij}n_j$.

A rotationally invariant first-order term is the <Ferromagnetic Wess–Zumino term>
$$
\mathcal L_{\rm WZ}=i\kappa z^\dagger\dot z.
$$
Under the phase redundancy it changes as $\mathcal L_{\rm WZ}\mapsto\mathcal L_{\rm WZ}-\kappa\dot\alpha$. The change is a <total derivative>, so the action has the required invariance.