From Liouville theory to the quantum geometry of Riemann surfaces