18. (12 points) Let $\angle A, \angle B, \angle C$ be the three interior angles of $\triangle ABC$. If the vectors
$m=\left(1-\cos (A+B), \cos \frac{A-B}{2}\right)$,
$n=\left(\frac{5}{8}, \cos \frac{A-B}{2}\right)$, and $m \cdot n=\frac{9}{8}$.
(1) Prove that $\tan A \cdot \tan B=\frac{1}{9}$;
(2) Find the maximum value of $\frac{a b \sin C}{a^{2}+b^{2}-c^{2}}$.
18. (1) From $m \cdot n=\frac{9}{8}$, we get
$$
\frac{5}{8}[1-\cos (A+B)]+\cos ^{2} \frac{A-B}{2}=\frac{9}{8},
$$

which means $\frac{5}{8}[1-\cos (A+B)]+\frac{1+\cos (A-B)}{2}=\frac{9}{8}$,
or equivalently, $4 \cos (A-B)=5 \cos (A+B)$.
Therefore, $\tan A \cdot \tan B=\frac{1}{9}$.
(2) Since $\frac{a b \sin C}{a^{2}+b^{2}-c^{2}}=\frac{a b \sin C}{2 a b \cos C}=\frac{1}{2} \tan C$, and
$$
\begin{array}{l}
\tan (A+B)=\frac{\tan A+\tan B}{1-\tan A \cdot \tan B} \\
=\frac{9}{8}(\tan A+\tan B) \\
\geqslant \frac{9}{8} \times 2 \sqrt{\tan A \cdot \tan B}=\frac{3}{4},
\end{array}
$$

thus, $\tan (A+B)$ has a minimum value of $\frac{3}{4}$.
When $\tan A=\tan B=\frac{1}{3}$, the minimum value is achieved.
Since $\tan C=-\tan (A+B)$, then $\tan C$ has a maximum value of $-\frac{3}{4}$. Therefore, the maximum value of $\frac{a b \sin C}{a^{2}+b^{2}-c^{2}}$ is $-\frac{3}{8}$.