Why are my particles turning yellow from below instead of from above?

I have one particle system in the given blender file where I want the color of the particles to slowly turn from red


to yellow after a certain point (gradually).

But I want that the yellow should start from the top, instead of bottom (as given in the above image).

Here are the material nodes:

Note: Flipping the color ramp doesn’t do the job, and perhaps it’s something to do with tweaking the map range.

Please help me figure out how make the particles turn yellow from top.

It is sure that tweaking of Map Range node, will not help you.
Location is a vector corresponding to an array of X, Y, Z range.

But your Map Range node is set to Float instead of Vector.
So, the tweaking you made on Map Range node is affecting 3 axis.
If you set Map Range node to Vector, your tweaking would be more precise.

If you want to tweak only one float, that would probably be more pertinent to color according to age instead of location.
If you want to color according to camera frame, that may be more pertinent to color at Compositing, instead of doing it in shader.