in script.js [741:757]
function handleDragEnter(e) {
// Remove drag-over class from all items first
document.querySelectorAll('.tree-item.drag-over').forEach(item => {
item.classList.remove('drag-over');
});
// Find the tree item element (could be a child element that received the event)
const treeItem = e.target.closest('.tree-item');
if (treeItem) {
// Only apply drag-over to the most specific (lowest level) item
// This prevents multiple highlighted ancestors
treeItem.classList.add('drag-over');
// Stop the event from bubbling to prevent parent handlers from firing
e.stopPropagation();
}
}