7. For a regular quadrilateral pyramid $P-ABCD$ with base and lateral edge lengths all being $a$, $M$ and $N$ are moving points on the base edges $CD$ and $CB$ respectively, and $CM = CN$. When the volume of the tetrahedron $P-AMN$ is maximized, the angle between line $PA$ and plane $PMN$ is $\qquad$
7. $\frac{\pi}{4}$.

Let $C M=x(0 \leqslant x \leqslant a)$. Then
$$
\begin{array}{l}
S_{\triangle A M N}=a x-\frac{1}{2} x^{2} \\
=\frac{1}{2} x(2 a-x) \leqslant \frac{1}{2} a^{2} .
\end{array}
$$

When $x=a$, that is, when point $M$ coincides with $D$, the equality holds above.

Given $A C \perp$ plane $P B D$, the angle between line $P A$ and plane $P M N$ is $\frac{\pi}{4}$.