/* PDF viewer page. Everything is scoped under .pv so it cannot touch other pages. */
.pv .vhead { padding-block: 1.2rem 1.2rem; display: flex; flex-wrap: wrap; gap: 0.8rem 2rem; align-items: center; justify-content: space-between; }
.pv .vhead h1 { font-size: clamp(1.8rem, 4vw, 2.8rem); }
.pv .vact { display: flex; flex-wrap: wrap; gap: 0.6rem; }
.pv .vback, .pv .vdl, .pv a.rbtn { display: inline-flex; align-items: center; justify-content: center; gap: 0.4rem; min-height: 2.75rem; padding: 0 1.1rem; border-radius: 8px; font-weight: 600; text-decoration: none; font: inherit; font-weight: 600; }
.pv .vback { background: var(--lamp); color: var(--night); border: 0; }
.pv .vback:hover { background: var(--lamp-deep); }
.pv .vback svg { width: 1rem; height: 1rem; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.pv .vdl { color: var(--moon); border: 1px solid var(--line); }
.pv .vdl:hover { border-color: var(--lamp); }
.pv a.rbtn { background: var(--lamp); color: var(--night); }

.pv .vstage { background: #e6dec9; border: 1px solid var(--line); border-radius: 14px; padding: clamp(0.5rem, 2.5vw, 1.8rem); min-height: 14rem; }
html:not([data-theme="light"]) .pv .vstage { background: #070c14; }
.pv #pages { display: grid; gap: clamp(0.6rem, 2vw, 1.2rem); justify-items: center; }
.pv .pg { position: relative; width: 100%; max-width: 56rem; background: #fff; border-radius: 3px; box-shadow: 0 14px 34px -20px rgba(70, 45, 10, .5); overflow: hidden; }
.pv .pg canvas { display: block; width: 100%; height: 100%; }
.pv .vmsg { text-align: center; color: var(--moon-dim); padding: 3rem 1rem; }
.pv .vmsg a { color: var(--lamp); font-weight: 600; }
.pv .vmsg[hidden] { display: none; }

/* current page, floating above the phone tab bar */
.pv .vcount { position: fixed; left: 50%; bottom: calc(var(--tabh, 0px) + 1rem); transform: translateX(-50%); z-index: 30; background: var(--night-3); color: var(--moon); border: 1px solid var(--line); border-radius: 999px; padding: 0.35rem 1rem; font-size: 0.9rem; font-variant-numeric: tabular-nums; box-shadow: 0 8px 22px -10px rgba(0, 0, 0, .4); pointer-events: none; }
.pv .vcount[hidden] { display: none; }

@media (max-width: 600px) {
  .pv .vact { width: 100%; }
  .pv .vback, .pv .vdl { flex: 1 1 auto; }
  .pv .vstage { padding: 0.4rem; border-radius: 10px; }
}
