I just glanced through it again, and it seems to me that aside from styling, every section of code fulfills an important purpose. But it could definitely benefit from being more broken out into components and library-like, so that the only code surfaced in index.html is the UI code.
https://www.maxlaumeister.com/pagecrypt/
Mine was originally in-browser, but thanks to some contributors (Zoltán Gálli and Nial Francis) it has Python and PowerShell CLIs now.
I like your use of async to make sure the work stays off the main thread.