ContentLoaded", () => {
        document
          .querySelectorAll("button.toggle[data-target]")
          .forEach((btn) => {
            const hid = document.getElementById(btn.dataset.target);
            const state = hid ? parseInt(hid.value, 10) : 0;
            renderToggle(btn, isNaN(state) ? 0 : state);
          });
      });
    </script>

    <pyxel-run root="." name="mml_studio.py"></pyxel-run>
  </body>
</html>
