The mass ratios of the quarks and charged leptons follow a simple pattern. The logarithmic generation steps come in a two to one ratio, a note to its octave, and the ordering is mirrored between the up-down and down-lepton comparisons. The pattern, read as charge counting on a ZN clock, is realized at level four and at no level that is not a multiple of four, which motivates modular level four and the finite group S4, with the generations in the triplet at T charges (3,1,0) and the mirror in the sign singlet. The charged-lepton mass ratios lie on a theta-dressed lattice at 0.02%, which sets the base ε=0.18664, taken as 14/75, and the harmonic modulus τ=1.0685i. Five postulates in the weight one-half theta constants, identified on the same data, reproduce the six quark masses from three lepton masses and the electroweak scale. Two more and one empirical relation for ∣Vtd∣ close the CKM matrix, giving ∣Vus∣=md/ms=0.2255, ∣Vcb∣=0.04197, ∣Vub∣=0.003721, and δ=1.138 against the measured 1.139±0.023, with no continuous parameter. The unitarity triangle follows, with apex (0.161,0.348) against the measured (0.161±0.010,0.347±0.010), and J=3.11×10−5 against (3.09±0.07)×10−5. The same structure carries the neutrinos. A single theta insertion gives sinθ13=θ2(τ)m2/m3, which holds at 0.7σ on the 207-day JUNO data, and the harmonic condition completes a normal-ordered spectrum with m1=0.25~meV, Σmν=0.0589~eV, a CP-conserving phase δCP=π, and effective Majorana masses quantized at 1.3 to 3.9~meV. The ultraviolet completion belongs to the magnetized torus class, with Pati--Salam the natural gauge embedding.