/* Online reader. Same tokens as the site: brand blue, stone greys, Inter. */
:root {
	--lx-brand: #3e6cae;
	--lx-ink: #1c1917;
	--lx-ink-3: #78716c;
	--lx-line: #e7e5e4;
	--lx-tile: #f5f5f4;
	--lx-desk: #e9e6e2;
}
* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body { display: flex; flex-direction: column; height: 100dvh; background: var(--lx-desk); color: var(--lx-ink); font: 15px/1.4 Inter, system-ui, sans-serif; }
svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; flex: none; }

.lx-bar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 56px; padding: 0 max(12px, env(safe-area-inset-right)) 0 max(8px, env(safe-area-inset-left)); background: #fff; border-bottom: 1px solid var(--lx-line); }
.lx-back { display: flex; align-items: center; gap: .35rem; min-width: 0; min-height: 44px; padding: 0 .6rem 0 .3rem; border-radius: 10px; color: var(--lx-ink); text-decoration: none; }
.lx-back:hover { background: var(--lx-tile); }
.lx-title { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 500; }
.lx-tools { display: flex; align-items: center; gap: .25rem; flex: none; }
.lx-page { margin-right: .5rem; color: var(--lx-ink-3); font-variant-numeric: tabular-nums; white-space: nowrap; }
.lx-btn { display: inline-grid; place-items: center; min-width: 40px; height: 40px; padding: 0 .55rem; border: 0; border-radius: 10px; background: transparent; color: var(--lx-ink); font: inherit; font-size: .875rem; font-weight: 500; cursor: pointer; text-decoration: none; }
.lx-btn:hover { background: var(--lx-tile); }
.lx-btn:focus-visible, .lx-back:focus-visible { outline: 2px solid var(--lx-brand); outline-offset: 2px; }
.lx-btn[hidden] { display: none; }

.lx-pages { flex: 1; overflow: auto; display: flex; flex-direction: column; align-items: center; gap: 16px; padding: 24px 32px 48px; outline: none; -webkit-overflow-scrolling: touch; }
.lx-page-box { position: relative; flex: none; background: #fff; box-shadow: 0 1px 2px rgba(28, 25, 23, .08), 0 8px 24px rgba(28, 25, 23, .12); }
.lx-page-box canvas { display: block; width: 100%; height: 100%; }
.lx-status { margin: 30vh 0 0; color: var(--lx-ink-3); }

@media (max-width: 639px) {
	.lx-pages { padding: 8px 8px 32px; gap: 8px; }
	.lx-fit { display: none; }
	.lx-page { margin-right: .25rem; font-size: .8125rem; }
	.lx-bar { gap: .5rem; }
}
@media print { .lx-bar { display: none; } }
