:root { color-scheme: dark; font-family: system-ui, sans-serif; background: #0e0e10; color: #fbfaf7; }
* { box-sizing: border-box; }
body { margin: 0; }
header { position: sticky; top: 0; z-index: 5; padding: 8px; background: #17171a; border-bottom: 1px solid #444; }
nav { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px; }
button, input { min-height: 44px; font: inherit; font-size: 16px; border: 1px solid #777; border-radius: 4px; color: #fbfaf7; background: #242428; }
button { min-width: 44px; padding: 7px 12px; cursor: pointer; }
button:disabled { opacity: .45; cursor: default; }
input { width: 4em; padding: 6px; text-align: center; }
label { font-size: 16px; }
:focus-visible { outline: 3px solid #ff6370; outline-offset: 3px; }
#status { margin: 0; padding: 8px 12px; text-align: center; font-size: 14px; color: #c6c1bb; }
#reader { overflow: auto; padding: 8px; }
#page { position: relative; margin: auto; background: white; }
canvas { display: block; }
.textLayer { z-index: 1; }
#links { position: absolute; inset: 0; z-index: 2; pointer-events: none; }
#links a, #links button { position: absolute; display: block; border: 0; border-radius: 0; background: transparent; padding: 0; min-width: 0; min-height: 0; pointer-events: auto; }
#links a:focus-visible, #links button:focus-visible { background: #ff637055; }
#error { padding: 28px; text-align: center; }
#error a { display: block; color: #fff; padding: 20px; }
