Hi Nicole Ueberschär ,
I have noticed in the past, that defining css in the custom html pop-up. I once ended up changing completely the TOC of the web map due to overwriting the css through the pop-up.
It is strange that it shows the correct result but on refresh it rejects the css and converts it to plain text. I wonder, since the styles are already present in the web map, if you cannot use the styles and simply use them by name of id in the pop-up.