Just looking at your schematic my guess is that the red & brown are the primary power/ground connections. I'm thinking that the switches on the overhead operate based on those two, and that the red/brown and white/brown are alternate power and ground from the heat & AC, and maybe just the AC. My guess is that if you have the sunroof open and turn on the AC the sunroof gets a close command from the Comfort System. Not much way to be sure from what they show you, as both the motor and the Comfort System are black boxes with no internal wiring shown. I'll look through the manual Charlie linked in later today and see if it shows anything more for the sunroof controls.