We explain the appearance of magic angles and fractional Chern insulators in twisted K-valley homobilayer transition metal dichalcogenides by mapping their continuum model to a Landau level problem. Our approach relies on an adiabatic approximation for the quantum mechanics of valence band holes in a layer-pseudospin field that is valid for sufficiently small twist angles and on a lowest Landau level approximation that is valid for sufficiently large twist angles. It provides a simple qualitative explanation for the nearly ideal quantum geometry of the lowest moiré miniband at particular twist angles, predicts that topological flat bands occur only when the valley-dependent moiré potential is sufficiently strong compared to the interlayer tunneling amplitude, and provides a convenient starting point for the study of interactions.