12. When $s$ and $t$ take all real values, the minimum value that $(s+5-3|\cos t|)^{2}+(s-2|\sin t|)^{2}$ can reach is $\qquad$
Solve the system $\left\{\begin{array}{l}x=s+5, \\ y=s\end{array} \Rightarrow x-y-5=0,\left\{\begin{array}{l}x=3|\cos t|, \\ y=2|\sin t|\end{array} \Rightarrow \frac{x^{2}}{9}+\frac{y^{2}}{4}=1(x, y \geqslant 0)\right.\right.$, thus the original expression represents the square of the minimum distance from points on the ellipse $\frac{x^{2}}{9}+\frac{y^{2}}{4}=1$ in the first quadrant to the line $x-y-5=0$. Let $P(3 \cos t, 2 \sin t), t \in\left[0, \frac{\pi}{2}\right]$,
then $d=\frac{|3 \cos t-2 \sin t-5|}{\sqrt{2}}=\frac{|\sqrt{13} \cos (t+\varphi)-5|}{\sqrt{2}}=\frac{5-\sqrt{13} \cos (t+\varphi)}{\sqrt{2}}$, where $\cos \varphi=\frac{3}{\sqrt{13}}, \sin \varphi=\frac{2}{\sqrt{13}}, y=\cos x$ is monotonically decreasing on $\left[\varphi, \frac{\pi}{2}+\varphi\right]$, thus when $t=0$, $d$ achieves its minimum value $\sqrt{2}$.
Therefore, the minimum value of $(s+5-3|\cos t|)^{2}+(s-2|\sin t|)^{2}$ is 2.