Pixels are in fact DPI-independent too, the CSS spec makes them exactly 0.75 of a point, which comes out to 96 DPI regardless of the device. Devices are then free to scale that up or down as they like: phones typically scale it down a touch because they’re held closer to the eyes.
What a bloody confusing way to define a unit of measure called a "pixel". 1px should be one device pixel, and 1pt should be 1/72 of an inch on the device!
Sheesh.
Eh, logical pixels have been a thing since at least X11, which is where we got that 96DPI thing to begin with. It certainly is confusing that they’re named the same thing though.