Four. (20 points) Given points $A$ and $B$ are the upper and lower vertices of the ellipse $\frac{y^{2}}{a^{2}}+\frac{x^{2}}{b^{2}}=1(a>b>0)$, and $P$ is a point on the hyperbola $\frac{y^{2}}{a^{2}}-\frac{x^{2}}{b^{2}}=1$ in the first quadrant. The lines $PA$ and $PB$ intersect the ellipse at points $C$ and $D$, respectively, and $D$ is exactly the midpoint of $PB$.
(1) Find the slope of the line $CD$;
(2) If $CD$ passes through the upper focus of the ellipse, find the eccentricity of the hyperbola.
(1) Let $P\left(x_{0}, y_{0}\right), A(0, a), B(0,-a)$. Then $\frac{y_{0}^{2}}{a^{2}}-\frac{x_{0}^{2}}{b^{2}}=1$.

Also, the midpoint $D\left(\frac{x_{0}}{2}, \frac{y_{0}-a}{2}\right)$ of $P B$ lies on the ellipse, so we have $\frac{\left(y_{0}-a\right)^{2}}{4 a^{2}}+\frac{x_{0}^{2}}{4 b^{2}}=1$.

From equations (1) and (2), we solve to get $x_{0}=\sqrt{3} b, y_{0}=2 a$.
Substituting the equation of line $P A$ into the ellipse, we get $C\left(-\frac{\sqrt{3}}{2} b, \frac{a}{2}\right)$.
Thus, $y_{C}=y_{D}$. Therefore, $k_{C D}=0$.
(2) Let the semi-focal distance of the ellipse be $c_{1}$, and the semi-focal distance of the hyperbola be $c_{2}$. Since $C D$ passes through the upper focus of the ellipse, we have $\frac{a}{2}=c_{1}$. Thus,
$$
\begin{array}{l}
a=2 c_{1}, b=\sqrt{3} c_{1} . \\
\text { Also } c_{2}^{2}=a^{2}+b^{2}=7 c_{1}^{2}, \text { so, } \\
c_{2}=\sqrt{7} c_{1}, e=\frac{c_{2}}{a}=\frac{\sqrt{7}}{2} .
\end{array}
$$