// React (and similar frameworks) override the native input.value setter
// to track changes internally. If we set .value directly, React never
// "sees" the change, so its own onChange/append logic breaks.
// This function uses the ORIGINAL native setter, then fires a real
// input event so React's internal state updates correctly too.
// avoid infinite loop: only reformat when raw value doesn't already match
}, true); // capture phase: run before React's own listener sees the raw value