Replace HTML-splitting pagination with CSS columns for true paginated
viewing. This simplifies the implementation and relies on the browser's
native column-fill behavior for accurate page breaks.
Changes:
- view-modes.ts: Use CSS columns with column-fill: auto instead of
pre-splitting HTML content into page chunks. Calculate page count
from scrollHeight / viewportHeight.
- reader-navigation.ts: Navigate by scrolling viewport height instead of
extracting discrete page content. Track page position via scroll
offset. Simplified renderSpineItem to load full spine content.
- page-calculator.ts: Simplified to track spine info (charCount,
estimatedPages) only. No more height-based content splitting.
Page calculation happens in real-time from DOM scroll position.
Benefits:
- Accurate pagination without estimation errors
- Works correctly across different font sizes and screen sizes
- Simpler code with fewer edge cases
- Natural page breaks at element boundaries via CSS