:root {
  --bg: #fafaf7;
  --fg: #1c1c22;
  --muted: #6b6b76;
  --line: #e2e2dc;
  --accent: #2b59c3;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root { --bg: #16161d; --fg: #ececf1; --muted: #9a9aa6; --line: #2c2c36; --accent: #8fb0ff; }
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--fg); }
body { font: 17px/1.6 system-ui, -apple-system, "Segoe UI", sans-serif; }
main { max-width: 40rem; margin: 0 auto; padding: 3rem 1rem; }
h1 { font-size: 1.8rem; margin: 0 0 1rem; }
h2 { font-size: 1.1rem; margin-top: 2.5rem; }
a { color: var(--accent); }
.muted, .meta { color: var(--muted); }
#library { list-style: none; padding: 0; margin: 0; }
#library li { display: flex; gap: .75rem; align-items: baseline; padding: .6rem 0; border-bottom: 1px solid var(--line); }
#library a { flex: 1; min-width: 0; overflow-wrap: anywhere; }
#library .meta { font-size: .85rem; white-space: nowrap; }
#library button { font: inherit; font-size: .8rem; color: var(--muted); background: none; border: 1px solid var(--line); border-radius: 4px; padding: .1rem .5rem; cursor: pointer; }
footer { margin-top: 3rem; font-size: .85rem; }
#frame { position: fixed; inset: 0; width: 100%; height: 100%; border: 0; background: var(--bg); }
#pager { position: fixed; right: 12px; bottom: 12px; display: flex; align-items: center; gap: .4rem; padding: .25rem .4rem; border-radius: 999px; background: rgba(22, 22, 29, .78); color: #fff; font-size: .85rem; backdrop-filter: blur(4px); }
#pager button { font: inherit; font-size: 1.2rem; line-height: 1; width: 2rem; height: 2rem; border: 0; border-radius: 50%; background: transparent; color: #fff; cursor: pointer; }
#pager button:disabled { opacity: .3; cursor: default; }
[hidden] { display: none !important; }
