18 (12 points) In $\triangle A B C$, the sides opposite to angles $A, B, C$ are $a, b, c$ respectively, and it satisfies $(2 a-c) \cos B=b \cos C, \sin ^{2} A=\sin ^{2} B+\sin ^{2} C-\lambda \sin B \sin C$ $(\lambda \in \mathbf{R})$.
(1) Find the size of angle $B$;
(2) If $\lambda=\sqrt{3}$, determine the shape of $\triangle A B C$;
(3) If $\triangle A B C$ is an obtuse triangle, find the range of the real number $\lambda$.
(18) (1) Since $(2 a-c) \cos B=b \cos C$, by the Law of Sines, we get
$$
(2 \sin A-\sin C) \cos B=\sin B \cos C,
$$

which simplifies to
$$
2 \sin A \cos B=\sin C \cos B+\sin B \cos C .
$$

Since $A+B+C=\pi, 0<A<\pi$, we have
$$
2 \sin A \cos B=\sin (B+C)=\sin A,
$$

thus $\cos B=\frac{1}{2}$. Given $0<B<\pi$, it follows that $B=\frac{\pi}{3}$.
(2) Since
$$
\sin ^{2} A=\sin ^{2} B+\sin ^{2} C-\lambda \sin B \sin C(\lambda \in \mathbf{R}),
$$

by the Law of Sines, we get: $a^{2}=b^{2}+c^{2}-\lambda b c$, so
$$
\cos A=\frac{b^{2}+c^{2}-a^{2}}{2 b c}=\frac{\lambda b c}{2 b c}=\frac{\lambda}{2} .
$$

If $\lambda=\sqrt{3}$, since $0<A<\pi$, we have $A=\frac{\pi}{6}$. Given $B=\frac{\pi}{3}$, it follows that $C=\frac{\pi}{2}$, and $\triangle A B C$ is a right triangle with $\angle C$ as the right angle.
(3) If $\triangle A B C$ is an obtuse triangle, and since $B=\frac{\pi}{3}$, we have $\frac{\pi}{2}<A<\frac{2 \pi}{3}$ or $0<A<\frac{\pi}{6}$. Therefore, $-\frac{1}{2}<\cos A<0$ or $\frac{\sqrt{3}}{2}<\cos A<1$.

From the reasoning in (2) above, $\cos A=\frac{\lambda}{2}$, so $-\frac{1}{2}<\frac{\lambda}{2}<0$ or $\frac{\sqrt{3}}{2}<\frac{\lambda}{2}<1$, thus the range of real values for $\lambda$ is $(-1,0) \cup(\sqrt{3}, 2)$.