Text this: Ideal topological flat bands in chiral symmetric moiré systems from non-holomorphic functions