d6e981e568
PR #4383 inlined custom `@font-face` rules at the very front of the iframe stylesheet, ahead of the `@namespace epub` declaration that lived inside `getPageLayoutStyles`. Per the CSS spec a `@namespace` rule is only honored when it precedes every style and `@font-face` rule; a misplaced one is silently ignored. That dropped the namespaced `aside[epub|type~="footnote"]` hide rule, so EPUBs whose footnote `<aside>` carries a `border: 3px #333 double` rendered a stray horizontal line below the annotation marker — but only for users who had custom fonts loaded (otherwise `customFontFaces` is empty and `@namespace` stayed first). Hoist the `@namespace` declaration to the very start of the assembled stylesheet, before the inlined custom `@font-face` rules, and drop it from `getPageLayoutStyles`. Custom faces still precede the `--serif`/`--sans-serif` font lists that reference them, preserving #4383's first-paint behavior. Verified in Chromium against the reported book's CSS: the aside goes from `display: block` (3px double border visible) back to `display: none`. Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>