Experimental hints for lepton-flavor universality violation in the muon's magnetic moment as well as neutral-and charged-current B-meson decays require Standard-Model extensions by particles such as leptoquarks that generically lead to unacceptably fast rates of charged lepton flavor violation and proton decay. We propose a model based on a gauged U (1)L µ−Lτ that eliminates all these unwanted decays by symmetry rather than finetuning and efficiently explains (g − 2)µ, R K ( * ) , R D ( * ) , and neutrino masses. The U (1)L µ−Lτ furthermore acts as a stabilizing symmetry for dark matter and the light Z gauge boson mediates velocity-dependent dark-matter self-interactions that resolve the small-scale structure problems. Lastly, even the Hubble tension can be ameliorated via the light Z contribution to the relativistic degrees of freedom.