We propose a scenario to retrodict the top and bottom mass and the Abelian gauge coupling from first principles in a microscopic model including quantum gravity. In our approximation, antiscreening quantum-gravity fluctuations induce an asymptotically safe fixed point for the Abelian hypercharge leading to a uniquely fixed infrared value that is observationally viable for a particular choice of microscopic gravitational parameters. The unequal quantum numbers of the top and bottom quark lead to different fixed-point values for the top and bottom Yukawa couplings under the impact of gauge and gravity fluctuations. This results in a dynamically generated mass difference between the two quarks. To work quantitatively, the preferred ratio of electric charges of bottom and top in our approximation lies in close vicinity to the standard-model value of Qb/Qt=-1/2.