r animation
                requestAnimationFrame(() => {
                    wrapper.classList.add('show');
                });

                currentMessage = wrapper;

                // TTS support
                if (window.initTTS && urlParams.has('tts')) {
                    const ttsText = content.chatmessage ? 
                        content.chatmessage.replace(/<[^>]*>/g, '') : '';
                    if (ttsText) {
                        window.speak(content.chatname + ' says ' +