ops}|${dur}`;
      }

      function getHighStore() {
        try {
          const raw = localStorage.getItem('mpd_high_scores');
          return raw ? JSON.parse(raw) : {};
        } catch (e) {
          return {};
        }
      }

      function setHighStore(obj) {
        try { localStorage.setItem('mpd_high_scores', JSON.stringify(obj)); } catch (e) {}
      }

      function getHighScoreForCurrentMode() {
        const store = getHighStore();
        const key = getModeKey();
        return store