ding();
            }

            // Storage helper that falls back to memory when localStorage is unavailable
            const storage = {
                data: {},
                getItem: function (key) {
                    try {
                        return localStorage.getItem(key);
                    } catch (e) {
                        return this.data[key] || null;
                    }
                },
                setItem: function (key, value) {
                    try {
             