  We consider the transverse-momentum distribution of heavy flavours in
photon-hadron collisions. We present a formalism in which large
transverse-momentum logarithms are resummed to the next-to-leading level, and
mass effects are included exactly up to order alpha_em alpha_s^2, so as to
retain predictivity at both small and large transverse momenta.
Phenomenological applications relevant to charm photoproduction at HERA are
given.
