Either the track has come loose or is broken, or the "finger" that rides in the track has broken off. Removing the glass is not too difficult but you may want to arrange for replacement parts to be on hand before you open this can of worms.
Glass and Sunshade Replacement
1. Open the glass fully.
2. To remove the glass, first remove:
O Rail holder cover
O Rail cover
O Sunshade rail holder
O Deflector
O Link stopper
O Lift-up guide
3. Slide the glass forward using the moonroof wrench, then remove the front sliders from the sunshade rails. NOTE: Do not scratch the roof panel with the front slider.
4. Lift the sunshade rail with the guide rail and insert a space such as a wooden block to prevent interference between the sunshade rail and bolt.
5. Remove the link slider from the inner cable sliders by lifting the glass, then remove the glass.
6. Slide the sunshade forward, then remove the sunshade. Eliminate this step if you're not removing the shade, just the glass.
7. Install the glass and sunshade in the reverse order of removal~ NOTE :
O Take care not to pinch the drain seal in the sunshade rail.
O Check for water leaks.