        // --- Lifecycle Hooks ---
            watch(stack, () => { nextTick(() => { initTooltips(); }); }, { deep: true, immediate: true });
            onMounted(() => { resetStack(); });

            return {
                stack, capacity, top, isBusy, inputs, size, isEmpty, isFull,
                resetStack, push, pop, peek
            };
        }
    }).mount('#app');
</script>

</body>
</html>