Current status (as of recent Firefox versions) The exact CSS sometimes needs small adjustments after major UI updates (e.g., Proton in 2021, or changes around Firefox 113+), but the approach still works in current versions. Step-by-step guide to do it
Enable userChrome.css support (only needs to be done once): Open Firefox and go to about:config in the address bar. Search for: toolkit.legacyUserProfileCustomizations.stylesheets Set it to true (double-click it).
Locate your profile folder: Go to about:support. Next to "Profile Folder", click Show in Finder.
Create the chrome folder and file (if they don't exist): Inside the profile folder, create a new folder called chrome (lowercase). Inside that chrome folder, create a plain text file called userChrome.css (also lowercase).
Add CSS code to move the close button to the left: