A simple locally accurate uniform approximation for the nodeless wave function is constructed for a neutral system of two Coulomb charges of different masses $(\ensuremath{-}q,{m}_{1})$ and $(q,{m}_{2})$ at rest in a constant uniform magnetic field for the states of positive and negative parity, $(1{s}_{0})$ and $(2{p}_{0})$, respectively. It is shown that by keeping the mass and charge of one of the bodies fixed, all systems with different second-body masses are related. This allows one to consider the second body as infinitely massive and to take such a system as basic. Three physical systems are considered in detail: the hydrogen atom with (in)finitely massive proton (deuteron, triton) and the positronium atom $(\ensuremath{-}e,e)$. We derive the Riccati-Bloch and generalized Bloch equations, which describe the domains of small and large distances, respectively. Based on the interpolation of the small- and large-distance behavior of the logarithm of the wave function, a compact ten-parametric function is proposed. Taken as a variational trial function, it provides accuracy of not less than six significant digits (SDs) ($\ensuremath{\lesssim}{10}^{\ensuremath{-}6}$ in relative deviation) for the total energy in the whole domain of considered magnetic fields $[0\phantom{\rule{0.16em}{0ex}},\phantom{\rule{0.16em}{0ex}}{10}^{4}]$ a.u. and not less than three SDs for the quadrupole moment ${Q}_{zz}$. To get reference points, the Lagrange mesh method with 16 K mesh points was used to get from ten to six SDs in energy from small to large magnetic fields. Based on the Riccati-Bloch equation, the first 100 perturbative coefficients for the energy, in the form of rational numbers, are calculated and, using the Pad\'e-Borel resummation procedure, the energy is found with not less than ten SDs at magnetic fields $\ensuremath{\le}1\phantom{\rule{0.16em}{0ex}}\mathrm{a}.\mathrm{u}.$