 'error', backgroundColor: '#ef4444' }] });
            const sleep = (ms) => new Promise(resolve => setTimeout(resolve, ms));
            const initTooltips = () => { tippy('[data-tippy-content]', { arrow: true, animation: 'fade', theme: 'light-border', allowHTML: true }); };

            // --- Core Operations ---
            const clearHighlights = () => {
                stack.value.forEach(item => item.highlight = null);
            };

            const resetStack = async () => {
           