Custom CSS for TTRPG statblocks?

If I understand you correctly, something using tags comes to mind.

.sb-table-widget:has(.hashtag[data-tag-name="table-to-style"]) {
  outline: red solid 5px;
}

If you now have a table

| A | B #table |
|---|---|
| 1 | 2 |

With the tag you specified you can style that table. You can also hide the tag using css. Tables without that tag don’t get styled. There are probably easier solutions, but this comes to mind right now.

If this doesn’t work maybe this API is of use to you. It’s a little lower level but you can just insert html with any style you want.