You could use this code in a "header"-tagged passage:
{
(print: "<script>$('html').removeClass(\)</script>")
(if: (passage:)'s tags's length > 0)[
(print: "<script>$('html').addClass('" + (passage:)'s tags.join(' ') + "'\)</script>")
]
}
Then, in the story stylesheet you can adress passages via their tags like:
html.tagName{
background-color: white;}