Detect RTL direction from shaped buffers and right-align those lines in the demo. Uses the average width of RTL lines as the alignment target for a balanced look. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>