OH this should be comedy gold given the sheer ignorance and inpetitude of both Failwind and Svelte.
"Let's start" -- with a metric ***-ton of unnecessary DIV and even more unnecessary classes. That first code block ALONE of DIV DIV DIV DIV class class class class class class class class class class class class class class class class class class class class class class class class class class class is such an epic /FAIL/ at web development, doing the job of what? A Section tag with an ID and ONE class (.modal), and a single DIV inside it?
Then of course one has to piss on caching models my slopping static SVG into the markup, hooking for scripting instead of a gracefully degrading target methodology...
*SIGH* and people wonder why I say those who use garbage like react/svelte/failwind haven't learned enough about HTML or CSS to be using JavaScript yet.
That you don't even provide a working example also speaks volumes.