Solution (source code)

= Solution

Because $|D|$ has no <fixed components>, choose two members $G_1,G_2$ with no common component. This uses the infinitude of the algebraically closed field and avoidance of finitely many proper linear subspaces of the section space. On a <smooth algebraic surface>, their <intersection number> is the sum of local <intersection multiplicities>. Since $G_1\cdot G_2=D^2=0$, they are disjoint. A basepoint of $|D|$ would belong to both, so \b[$|D|$ is basepoint-free].

The resulting <morphism> has nonconstant image since $\dim|D|\geq1$. Its image cannot be a surface: a generically finite morphism defined by $D$ would make $D^2$ the positive product of its degree and the degree of its image. Thus the image is a curve. Apply <Stein factorization> to obtain $g:X\to C$ with connected fibers and $g_*\mathcal O_X=\mathcal O_C$, where $C$ is a smooth projective curve. There is a positive-degree <line bundle> $L$ on $C$ with $\mathcal O_X(D)=g^*L$. The <projection formula for sheaves> and <Riemann-Roch theorem> give $h^0(X,mD)=h^0(C,L^m)=m\deg L+O(1)$. Therefore
$$
\boxed{\kappa(D)=1.}
$$