  Conditionally on the Tate--Shafarevich and Bloch--Kato Conjectures, we give
an explicit upper bound on the size of the $p$-adic Chabauty--Kim locus, and
hence on the number of rational points, of a smooth projective curve
$X/\mathbb{Q}$ of genus $g\geq2$ in terms of $p$, $g$, the Mordell--Weil rank
$r$ of its Jacobian, and the reduction types of $X$ at bad primes. This is
achieved using the effective Chabauty--Kim method, generalising bounds found by
Coleman and Balakrishnan--Dogra using the abelian and quadratic Chabauty
methods.
