Use container.clientWidth/clientHeight instead of getBoundingClientRect and stop overriding canvas style dimensions. CSS 100% handles display sizing, canvas.width/height handles DPR-scaled render resolution. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>