Gas drag in primordial circumplanetary envelopes: A mechanism for satellite capture