/* reader: pages on a dark desk, centred, with a selectable text layer. Class names start with rd-. */
.rd-pages { display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 12px; width: max-content; min-width: 100%; box-sizing: border-box; }
.rd-page { position: relative; background: #fff; box-shadow: 0 2px 10px rgba(0, 0, 0, .35); flex: none; }
.rd-canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.rd-page.failed::after { content: "This page could not be drawn"; position: absolute; inset: 0; display: grid; place-items: center; color: #6b6b6b; font-size: 14px; }
.rd-text { position: absolute; inset: 0; overflow: hidden; line-height: 1; }
.rd-text span { position: absolute; white-space: pre; color: transparent; transform-origin: 0 0; cursor: text; font-family: sans-serif; }
.rd-text span::selection { background: rgba(242, 133, 0, .35); color: transparent; }
.rd-pageno {
  position: absolute; left: 50%; bottom: calc(18px + env(safe-area-inset-bottom)); transform: translateX(-50%);
  padding: 6px 14px; border-radius: 999px; background: rgba(20, 24, 28, .8); color: #fff; font-size: 14px; font-weight: 600;
  opacity: 0; transition: opacity .25s; pointer-events: none;
}
.rd-pageno.show { opacity: 1; }
.rd-loading { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; color: #fff; font-weight: 600; }
.rd-err { background: var(--surface); color: var(--text); padding: 18px; border-radius: var(--radius); max-width: 320px; text-align: center; }
.rd-zl { min-width: 60px; font-variant-numeric: tabular-nums; }
