If anyone ever writes AO3 fics that include text message convos, I wrote a little generator to create the CSS and HTML needed to style it nicely, with fallbacks for when the CSS is disabled: https://momijizukamori.github.io/txtmsg.html
It's based on CSS other people created and wrote a tutorial for on AO3 ( https://archiveofourown.org/chapters/14729722 ) though I did add a few tweaks to make it handle images better.