Moduli stack of algebraic curves