.className = 'tooltip-popup';
                tooltipEl.textContent = text;
                document.body.appendChild(tooltipEl);

                const rect = el.getBoundingClientRect();
                const padding = 8;
                const maxWidth = 440;

                const baseCharWidth = 8;
                let dynamicMinWidth = Math.min(Math.max(text.length * baseCharWidth + 24, 80), 200);

                tooltipEl.style.width = 'auto';
                tooltipEl.style.maxWidth = maxWidth + 'px';